mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
756b2fcae148f9c76120a953304bf691bb551fac
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
756b2fcae1 |
fix(cli): fixed-name outputs and history turn records replace a link, never write through it (#7911)
* fix(cli): fixed-name outputs and history turn records replace a link, never write through it transcript.json, hyperframes.json patches, the grade-compare sheet, the batch manifest, diff and measure outputs, lambda stack state and the history turn records are written through a temp file renamed into place. A linked hyperframes.json is left alone, and the default .hyperframes/<tool> output folder is used only when every folder on the way is real. * fix(cli): measure and diff pictures and sbs.mp4 replace a link, never write through it writeImage and the diff side-by-side now have ffmpeg write into a new private folder beside the output, then rename the file over its name. measure frames already staged and renamed its PNGs. |
||
|
|
2daedcdafc |
feat(skills): style templates on the HyperFrames plan (#6842)
* fix(cli,skills): say a step's credits are its total, and keep cost out of retries An out-of-credits refusal named what the step needs, and an agent read that as the shortfall. It now says the number is the step's total. After its last try, an agent told the person what was spent and what another try would cost. The HeyGen reference now says not to. * fix(cli): plan avatar credits from the HyperFrames price rows An avatar's credits came from its old API price, about five times what the plan charges, so --max-credits refused calls that fit and a top-up asked for too much. They now use the Avatar IV photo row plus the general avatar video row, 950 credits a minute. * fix(cli): pin the avatar price test and keep pricing under the comment share * fix(cli): plan avatar seconds on the Avatar IV row alone The general avatar row is only checked at admission and billed on seconds left after Avatar IV, so adding it to every second made a 15 s script plan at 238 instead of 200 and a 220 limit refuse a call that fits. * feat(skills): creator templates on the HyperFrames plan A Pro account asks for a video in a creator's format and the agent pulls that template on demand. The packs sit in the private bucket behind the plan-gated bundle route, so a Free account gets a 402 and the upgrade step. A pull costs no credits; making the film spends them as Reverse does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): make creator-remix the one template skill SKILL.md holds the catalog, the Pro openings, the pull and the credit rules. references/remix.md is how to make the episode, from Desktop's creator-remix with only what the app alone has swapped for the CLI. The packs now hold only the template, so their hashes change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): the creator-remix skill and its packs SKILL.md holds the catalog, the Pro openings, the pull and the credit rules. references/remix.md is how to make the episode, from Desktop's creator-remix with only what the app alone has swapped for the CLI. The packs now hold only the template, so their hashes change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(skills): word creator-remix's sign-in steps the way media-use does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): a creator-remix presenter runs on the plan by default The person's own HeyGen avatar is recommended, not required: without one, 小Lin's presenter is made with HeyGen Video 1 from their photo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): pin template packs whose voice bills the plan first Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): offload media named inside template tags References in a composition's <template> were never rewritten, because the DOM query stops at the tag and template.content does not serialize, so the file stayed in the zip. A stem matched as a plain word and a same-named file elsewhere counted as a mention too. A 5-minute presented film went from 196 MB to 71 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): lipsync, and avatars that speak a finished voice Video 1 takes audio as a reference and re-paces it, so a shot's lips follow its own track and drift up to a second from the voice. generate --type lipsync redoes the mouth to the exact voice. generate --type avatar takes --audio, and --avatar for the person's own look, so the lips land on the voice from one job. Also moves the plan rows to the 2026-10-30 price book, estimates a voice's credits so --max-credits can hold it, logs jobs from a folder with no project, and describes the resolve flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): presenters go avatar first, and a voice can be stock The person's own avatar, then Avatar IV from their photo, then Video 1 with lipsync. With no clone or recording, a stock voice named in the credits. Pins the five rebuilt packs. The archive test keeps its ../ under GNU tar with -P. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cli): fix avatar price and sfx provider tests, trim comments A wav gives the avatar price test an exact length on every platform. The sfx tests now expect HeyGen first. Comment share is back under the base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(core): read a font shorthand whose size nests parentheses `font: calc(var(--size) * 1px)/1 "X"` cut at the first closing parenthesis, so a bad family name failed the render. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): one ledger row per job, and search skips a template's own pictures A job done at once logs one row, transcribe logs to the project, and resolve no longer offers a component's file for a search. --reuse and --provider get help text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): pin the tested template packs, and a board needs no voice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cli): read the transcribe ledger row as JSON, for Windows paths Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): pin the Big Questions pack without the film length check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skills): call them style templates, and the docs example pulls a real slug Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): pin the cleaned template packs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skills): drop the stock-presenter ban and the no-spend-before-storyboard rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): pin the Paper Trail and Long Story Short packs without the stock-presenter ban Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): rename creator-remix to style-remix, and the five templates to names that say the look Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): style-remix lists the five templates when none is named Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): pin the Finance Explainer pack that varies its motion graphics Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): media-use generate --type cutout takes a shot out of its background on the plan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): pin the Finance Explainer pack without the provisional variety rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): pin the five style packs with variety rules measured on real films Animated Science gets a worlds-and-boards budget, 3D True Crime a main board and a brief corner note, 3D Brand caps by measured rate, Finance and Collage set pieces and more than one look. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skills): media-use names the on-plan cutout and lipsync commands, not the heygen CLI ones Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): cutout retries dedupe on request_id, uploads carry their real type; style-remix is public The background-removal route dedupes on the body's request_id and ignores the Idempotency-Key header, so a retry after a lost answer started a second job: runJob now also sends the key in the body for such a route. Uploads typed every non-MP4 file as audio, so WebM and MOV inputs were refused: they now take their type from the extension. Fails without the fix: the new cutout test in generate.test.ts sees audio/mpeg for WebM and MOV. style-remix drops metadata.internal and is listed with the other published skills. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): keep the comment share of the touched files at main's Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: count style-remix in the README and CLAUDE.md skill lists Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(skills): rename style-remix to style-sampling Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f2358315e5 |
feat(skills): re-land reverse any video on the HyperFrames plan, with clearer credit wording (#6833)
* fix(cli,skills): say a step's credits are its total, and keep cost out of retries An out-of-credits refusal named what the step needs, and an agent read that as the shortfall. It now says the number is the step's total. After its last try, an agent told the person what was spent and what another try would cost. The HeyGen reference now says not to. * fix(cli): plan avatar credits from the HyperFrames price rows An avatar's credits came from its old API price, about five times what the plan charges, so --max-credits refused calls that fit and a top-up asked for too much. They now use the Avatar IV photo row plus the general avatar video row, 950 credits a minute. * fix(cli): pin the avatar price test and keep pricing under the comment share * fix(cli): plan avatar seconds on the Avatar IV row alone The general avatar row is only checked at admission and billed on seconds left after Avatar IV, so adding it to every second made a 15 s script plan at 238 instead of 200 and a 220 limit refuse a call that fits. * fix(cli): the credits link opens the web plan page, which is live * test(cli): pin the production credits link too * chore(skills): regenerate the skills manifest after merging main * docs(cli): keep the person measure's doc comments to four lines * docs(cli): keep the measure doc comments to four lines * docs(cli): keep the measure comment lines to 120 characters --------- Co-authored-by: Miguel Angel Simon Sierra <miguel.sierra@heygen.com> |
||
|
|
b45e602faa |
revert: feat(skills): reverse any video (#6754) (#6840)
* revert: feat(skills): reverse any video (#6754)
Keep the reverse-any-video skill and its CLI billing commands out of main until
web subscriptions are live (/pricing and /account/plan return 404 today).
Re-land together with #6833 once those pages ship.
This reverts commit
|
||
|
|
cb2389cf35 |
feat(skills): reverse any video on the HyperFrames plan (#6754)
* feat(skills): reverse any video on the HyperFrames plan Reverse rebuilds a video as an editable HyperFrames project and re-shoots its people with HeyGen. It runs for a person signed in on HyperFrames Pro; Free is told it is a Pro feature and given the upgrade step. - skills: reverse-any-video; media-use is the one gate for HeyGen calls (sign-in, credits, refusals) - cli: media-use generate (image, video shot, avatar, voice, music) with --plan pricing and --max-credits; measure, diff and analyze for the rebuild; the HyperFrames plan in auth status; billing subscribe and top-up wait on the plans or credits page - remotion-to-hyperframes compares with `hyperframes diff` instead of its own shell scripts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(skills): satisfy CI gates for reverse-any-video - docs: list diff, measure, analyze and billing in "Find your command" in docs/packages/cli.mdx, each with its own section. - skills: bring media-use/SKILL.md under its 5120 B budget by pointing setup, direct-recipe and treatment detail at the references that already hold it; the sign-in, credits, --max-credits and billing rules stay in SKILL.md. - comments: register transcript.json and REVERSE.md as project files for the citation checker, and drop a history note from face.test.ts. - comments: cut restating prose or move it into names so every changed file is at or under its comment share. Allowlist the two deleted remotion scripts in check-no-main-deletions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): terminate measure's ffprobe options with -- probeVideo passed the input path straight after its options, so a path starting with "-" would be read as a flag; the producer's ffprobe argv contract test failed on it. runFfmpeg's fixed flags move to a constant so the contract no longer mistakes that ffmpeg wrapper for a probe. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(cli): split diff's video tests into three files under CI's per-file limit The file took ~131 s on CI against the flake gate's 120 s, and its heaviest test (four comparisons) hit the 20 s per-test limit. The video tests now live in three files sharing diff.test-helpers.ts, and that test is two tests of two comparisons each. analyze reads each part once and checks the bytes it read, instead of a stat then a read (CodeQL js/file-system-race). * fix(skills,cli): one credits rule; ask before dropping a step that won't fit On dev with a 100-credit limit the agent priced a re-shoot with --plan and dropped it without asking (J5), and in J6 it told the person a price. SKILL.md's Credits rule now covers both: --plan is for the agent, and when a step won't fit (a --plan over what is left, or a refused call) the agent says what doesn't fit and asks before dropping or shrinking it. setup-providers.md's older confirm-before-paying rule points to it. --plan now runs the same checks as the real call (checkRequest), so it no longer prices a request that would be refused. The re-shoot recipe in people.md gains the --prompt it needs. heygen.md: a sign-in also makes images, and --plan's usd is the API charge rounded to $1/60 while its credits come from the list price. * fix(cli): auth status drops 'balance unavailable' above the plan's credits; sign-in page title * test(cli): keep diff's video tests inside the flake gate's limits Under the gate's CPU contention every diff test needing face detection or optical flow paid opencv.js's 11 MB download and WebAssembly start-up, and every diffVideos call wrote four worst-moment pictures (about 28 ffmpeg runs) no assertion read. Tests ran 21-28 s against the 20 s limit. - loadOpenCvFirst() stages opencv.js in a beforeAll (from this machine's cache, a temp copy kept between runs, else the network). - diffVerdicts() runs diffVideos with worst: 0 for tests that only read verdicts; the worst-moment tests keep the pictures. - The carried-text test is split into its dirty and clean halves. Locally with 8 CPU burners on 8 cores: slowest test 7.7 s, files 24-30 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): generate --plan refuses what the real call refuses checkRequest now holds every pre-send check (the --out extension and --mask without --motion joined the route body and guide checks), and generate() runs it first, so --plan and the real call share one function. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): plans link uses from=cli and follows HYPERFRAMES_ENV; no balance notice beside the plan - pageUrl sets from=cli, the parameter the pricing page reads to send a CLI buyer back to the terminal. - The plans and credits pages are on dev.hyperframes.dev with HYPERFRAMES_ENV=dev, hyperframes.studio otherwise. - auth status --json omits the 'HyperFrames balance is unavailable' notice when the plan was read. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(skills): reverse-any-video re-checks sign-in on resume; REVERSE.md holds no prices Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(cli): split diff-people's whole-frame reuse test into three It ran five diff comparisons in one test and took 20.2-20.6 s under the flake gate's contention, over the 20 s limit. Each piece now runs at most two comparisons against a shared ledger: copy and burned-in title, footage cut whole, and cuts that only fed a generation. Under 24 CPU burners locally the slowest of the three takes 3.0 s, where the combined test took 4.9 s under 8. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli,skills): reverse resume asks after one failed retry; out-of-credits names the step's price - media-use generate: when HeyGen refuses for credits without saying how many, the refusal names the CLI's own price for the call (what --plan prints) as "needs about N" and "billing top-up --needed N", instead of "needs more". - reverse-any-video: never repeat auth status's plan/credits line; a step an earlier session gave up on gets one more try, then ask; a command stored in REVERSE.md is a note, rebuilt from its recipe and checked with --plan, never run as written. - people.md / heygen.md: a refused or failed job gets one more try, test calls included, then stop and ask. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli,skills): send a failed HeyGen job again as new; resume asks if the limit still applies - runJob: a key whose job failed or was refused is recorded in the config dir (heygen-failed-keys); the next run with the same inputs sends key-1, key-2, ... so HeyGen starts a new job. A finished or still-running job keeps its key and is picked up, so nothing is paid twice. "fix the request it names, then run again" now holds. - reverse-any-video: on resume after a run under a credit limit, just ask whether it still applies, naming no costs or numbers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * refactor(cli,skills): drop what reverse-any-video no longer uses The skill rebuilds from measure probe, cuts, frames, events and face, and checks with diff. analyze, diff --explain and eight measure commands (trail, box, ink, rhythm, objects, track, flow, continuity) have no caller, so they go, with their tests and docs. Examples now use original.mp4 instead of the old .reverse/source.mp4 evidence folder, and diff's --segments is described as a file rather than REVERSE.md. * fix(cli): check no longer copies VP9 and AV1 videos before it starts Chrome plays both, alpha included, and the proxy is made on demand if a browser ever asks. Copying remove-background's VP9 cutouts took minutes on projects that have them. * fix(cli,skills): keep paid retries, credit limits and lip sync honest Retries keep their key after 401, 403, 408, 409, 425 and 429, which say nothing about the job, and failed keys are scoped to the API and payer. Credits come from the plan's video rows instead of list dollars, and reference pictures past the first two count toward --max-credits. Lip sync reads sound on its own timestamps, so a delayed track fails the gate. Look and energy call two near-zero values the same. --plan refuses a missing input as the real call does. The skills teach the direct sign-in, its credential path and the billing commands. * chore(cli): keep the new pricing and energy files under the comment share * fix(cli): scope failed HeyGen keys to the signed-in account Failed keys were scoped by the local user block, which is absent for a host's token and display-only otherwise, so two accounts could share a scope and one could start a second paid job. The scope now comes from the account /v3/users/me reports for the token in use. When that cannot be told, no failure is recorded and the key stays the same. * fix(cli): fix a job's sender when it starts Failure scope was looked up again after polling, so a sign-in during a job could record one account's failure under another and rotate its finished key. The credential is now read once per job: it signs the POST and owns any failure, even if someone else signs in meanwhile. Prefer username to email, since /v3/users/me returns no user id. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: James <james.russo@heygen.com> |
||
|
|
9ad12da18a |
fix(cli): non-English transcription reaches whisper, and whisper failures say why (#5892)
* fix(cli): non-English transcription reaches whisper, and whisper failures say why transcribe --language <non-English> runs an installed whisper (Parakeet picks its own language); whisper models are pinned by size and sha256 and re-downloaded when damaged; a whisper-cli failure names its build, model file and last stderr lines without paths; the unused --dtw flag is dropped. * docs(cli): --engine and --language say a non-English language runs an installed whisper Also strips paths that follow a colon or a bracket from whisper-cli's error tail. |
||
|
|
943b6512b4 |
feat(cli): add hyperframes/api entry with transcribe and removeBackground (#5453)
* feat(cli): add hyperframes/api entry with transcribe and removeBackground HyperFrames Desktop runs the CLI as a child process, relaunching Electron with ELECTRON_RUN_AS_NODE=1. A programmatic entry lets it import plain functions and run them in a utilityProcess instead, so the RunAsNode fuse can be turned off. packages/cli/src/api.ts exports transcribe() and removeBackground(): typed options in, typed result out, progress through callbacks, failures thrown as TranscribeError / RemoveBackgroundError with a code and the original error as cause. Neither prints, reads argv or exits. The transcribe and remove-background commands now keep only flag handling, printing and exit codes, and call these functions. Their output, JSON and exit codes are unchanged. The package gains an exports map with "./api" (built dist plus d.ts) and "./package.json", generated from package-subpaths.json like the sibling packages. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): trim api.ts comments under the package's comment share Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): trim trailing dots without a quadratic regex CodeQL flags the trailing-dots regex on the Parakeet error now that it sits behind a library entry. Same result, linear time. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): make the transcribe API's signal stop every stage Review follow-ups on the api entry: - parakeet-mlx now runs as an async child that the caller's signal can kill. Its failures keep the synchronous run's message, status and stderr. - A pre-aborted signal throws before any setup. Whisper checks the signal before each setup stage, and the model download gets it. - onEngine reports the model whisper runs (small for Spanish, not small.en). The resolver moved to whisper/modelForLanguage.ts so both share it. - api/transcribe.ts imports everything at module scope. The command test hoists its whisper mock, since that module now loads during imports. - whisper's internal TranscribeOptions/TranscribeResult types are renamed WhisperOptions/RunnerResult, so the API's public names are unique. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): let an AbortSignal stop whisper's install and audio prep Review follow-ups on the api entry: - whisper's runtime install (brew, git clone, cmake) and its ffmpeg audio prep run through a new stoppableExecFile when an API caller passes a signal. The child runs off the event loop, an abort ends it and every process it started, and the call rejects with a "cancelled" TranscribeError once they are gone. A failure throws the same error execFileSync throws (message, code, errno, status, signal, stdout, stderr), compared field by field in stoppableExecFile.test.ts. parakeet-mlx uses the same helper. - Without a signal the helper is execFileSync, and the CLI passes none, so the CLI output stays byte for byte the same as hyperframes 0.8.146. - TranscribeOptions.signal now says what it covers: a tool lookup that is already running (capped at 10 seconds) finishes first. - New regressions in api.test.ts abort during a stand-in install step and during a stand-in ffmpeg convert. Both end in under 10 seconds with no process left, and both fail with the old synchronous calls. - Tests load every module at the top of the file: namespace spies replace the importOriginal partial mocks, and node:fs and node:child_process are spied through their default exports and synced with syncBuiltinESMExports. remove-background --info imports its manager statically. The scanner in api.test.ts now reads every file this PR touches and catches importOriginal and vi.importActual. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |