mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
cd7e93baa0b83dbc6536490a876d00a51ba236aa
30
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
060e6e4a12 |
fix(cli): billing stops checkout work once the payment wait ends, even mid sign-in refresh (#7216)
* fix(cli): billing stops checkout work once the payment wait ends, and a token refresh can't hang it The wait for a purchase ends when the account shows it or at --timeout. Checkout work still in flight then kept going: a price read that answered late still created and printed a checkout, an Enter-time checkout that answered late still opened Stripe, and the command waited on that work past the purchase or the deadline. A token refresh with no deadline could hold any of these reads forever. readPlan, readOffer and createCheckout take the wait's stop signal, joined with their own deadline, and stop waiting on a sign-in refresh once it fires. Billing checks it after the price read and after each checkout before printing or opening anything. The token refresh POST gives up after 20 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXN7wsMK6GqT3MNtqXw * refactor(cli): billing's checkout failure and its two billing reads each live in one place The comment-share ratchet and the fallow audit failed on #7216: a new comment in billing.ts, readPlan and readOffer repeating the same eight-line request, and offerCheckout over the complexity threshold. The reads share getBilling, the failure report moves to reportCheckoutFailure, and the comment goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXN7wsMK6GqT3MNtqXw * fix(cli): billing's stop signal fires at --timeout, not only when the poll returns The checkout path stopped once the polling task ended, but the poll's readPlan carried no signal. A poll read stalled across the deadline kept the signal live, so a held offer could still create and print a checkout after --timeout. A timer now aborts the controller at the deadline on its own, the initial and polling plan reads take the same signal, and the deadline counts from the start of the command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXN7wsMK6GqT3MNtqXw --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1fecf5b82a |
fix(cli): two CLI fixes from Wenbo's reverse test (paywall link, plan label) (#7099)
* feat(cli): a paywall refusal carries its page link in its own url field An agent hit the Pro paywall, found the link only inside the fix sentence, and handed the person a shell command instead of the page. The link now also comes as url. * fix(cli): auth status says hyperframes is the plan, not the HeyGen app's An agent read user.subscription.plan (the HeyGen app's pro) as the HyperFrames plan and ran past Free. With the HyperFrames plan read, billing_notice now names which is which. * fix(cli): a paywall refusal with url null names no purchase link HeyGen sends url: null when it can't sell to this account right now. The refusal now says so and carries no link, as reverse start does since #7031; a missing url (older server) still gets the plans or credits page. |
||
|
|
a6e6717f2a |
feat(cli): checkout links name the CLI and the skill that sent them (#7177)
* feat(skills): every published skill reports its own run `hyperframes events --skill=<name>` exists so a skill can say it ran, but only reverse-any-video and figma asked the agent to call it, so the other skills' use was invisible. Each of the nine published skills now opens with a one-line usage beacon naming itself. The line says what it sends (the skill's name only) and that the telemetry opt-out applies. The router's `init` line also passes `--skill=hyperframes`, so renders of new projects carry the skill. check-core-skills fails a core skill that lacks its own beacon; each core skill's size budget grows by 192 B for the line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): checkout links name the CLI and the skill that sent them Only `billing subscribe` marked its pricing link `from=cli`, and the terminal's Press-Enter Pro checkout sent no return page, so a purchase made from the terminal looked like one made on the site. Now: - `pageUrl` adds `utm_source=cli` and `skill`: the one named, else the project's own `authoringSkill` from hyperframes.json. - `billing` takes `--skill`. The terminal Pro checkout returns to the plans page marked `from=cli&skill=...`, and retries without the return page if the server does not allow it. - Pricing links the server hands back (reverse's upgrade link, a refused media call's link) gain `from=cli` and the skill when they lack them. - The Pro gates name their skill: reverse -> reverse-any-video, templates -> style-sampling, paid media calls -> media-use, in the CLI's printed fix and in those skills' billing commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): report a refused checkout return page, and say where --skill goes When the server refuses the terminal checkout's return page, the CLI still sells Pro without it, but that purchase loses its CLI origin. A cli_billing_checkout_return_refused event now makes that visible. The --skill help said the skill is recorded with the purchase. It is sent with the pricing link; the purchase itself does not store it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
60ca970ed6 |
fix(cli): tell a failed billing checkout apart from a payment not finished in time (#7185)
* fix(cli): tell a failed billing checkout apart from a payment not finished in time * fix(cli): keep waiting for payment after a failed billing checkout * refactor(cli): split billing checkout opening out of offerCheckout |
||
|
|
21e2038595 | fix(cli): report why a reverse session could not be recorded (#7186) | ||
|
|
fb738015a0 |
fix(cli): bug-bash fixes for pull, offline, preview, check, cloud aspect, sfx search, and media-use avatars (#7170)
* fix(cli): an interrupted templates pull leaves no partial folder Unpacking now runs tar asynchronously and removes its .part folder on SIGINT/SIGTERM/SIGHUP before re-raising the signal. Part folders carry the owning pid, and the next pull clears any whose process is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): auth status and templates pull say when HeyGen cannot be reached Offline, both commands waited on unbounded requests and then printed only undici's 'fetch failed'. A new networkFailure helper names the host, the reason (DNS lookup, no route, refused, no answer in time, dropped) and the next step. The account and token-refresh requests now time out after 15 s, the template link after 15 s, and auth status reports an offline refresh at once instead of retrying with the stale token. describeCauseChain moves into the helper so the registry and auth share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): preview leaves the project's HTML files as they are Opening a project in preview stamped data-hf-id into every composition on disk. The preview route and every source mutation already mint the same content-keyed ids in memory, so the startup pass is dropped: files gain ids only when an edit to them is saved. The .hyperframes folder is still made before the watcher starts, so the preview cache creating it is not reported to Studio as a manifest change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): check runs the browser audits past a lint error A lint error made check skip runtime, layout, motion and contrast, so one known lint error hid every browser finding. The browser pass now runs whenever there is a composition to load, and the lint error still fails the check. Only a root with no data-composition-id skips it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): no desktop-app line for CI or a script reading render output The 'Keep editing by chatting with Framey' line printed on every render and preview, including CI and piped runs where nobody can open the app. It now prints for a person at a terminal, and for a coding agent, which the hyperframes skill tells to pass the line on; CI and other non-TTY runs get nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): cloud render takes a composition at any aspect ratio A 1920x960 composition got 'server will default aspect_ratio to 16:9' although the render kept 1920x960: at 1080p the cloud renders at the composition's own size and aspect_ratio only picks a 4K preset. The CLI now names the detected ratio (2:1) and says the size is kept, takes --aspect-ratio as any W:H checked against the composition, sends only the 16:9, 9:16 and 1:1 the API accepts, and refuses a 4K render of any other ratio before upload, where no preset fits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(media-use): a weak sound-effect match says so instead of passing silently resolve --type sfx returned a HeyGen sound at any score down to 0.4, and a project file that shared one word of its name with the intent, with nothing to tell them from a real match. Such a result now carries a match object in the JSON ({score, min_score, low_confidence} or the matched words and the intent the file was resolved for) and a low-confidence line on stderr. A HeyGen search with no hit says so with the min score it used, and a sound effect nothing matches fails with 'no sound effect matched'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): media-use avatars lists the film account's avatar looks Templates had to reach for 'heygen avatar list', a separate sign-in that can be another account. 'media-use avatars' lists the private looks on the HyperFrames account making the film (GET /v3/avatars/looks?ownership=private, following next_token up to --limit) as {avatars: [{avatar_id, name, ...}]}, the id that 'generate --type avatar --avatar' takes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(skills): leave style-sampling's avatar line to #7164, which owns that skill Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): templates pull removes only the part folders it marked as its own The abandoned-part cleanup deleted any sibling named '<slug>.part-*' whose next token was not a live pid, so a person's own 'sample.part-notes/', 'sample.part-reference.txt' or a symlink went with it. A pull now writes an ownership marker (owner tag + pid) into its part folder, and the cleanup removes only a real directory with the generated '<slug>.part-<pid>-XXXXXX' name whose marker names a dead pid. Files, symlinks, unmarked folders and older unmarked parts are left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): media-use avatars says it is offline when the login refresh cannot reach HeyGen A network failure while refreshing the stored login was reported as 'no HeyGen sign-in' with 'auth login' as the fix, though the login was still there. It now keeps the network failure's message and next step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(media-use): a reused weak sound keeps its low-confidence advisory The first resolve of a weak HeyGen sound or a name-matched project file flagged it, but an identical second resolve hit the project manifest and returned it with no match object. The advisory is now rebuilt from the record's provenance (the stored score, or the adopted file's name) on reuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(cli): keep the comment share of files this branch touched from rising Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): no check-then-use on pull markers, and the download is never written to disk CodeQL flagged the downloaded bundle written to a file before tar read it, and a stat-then-read in the preview test. The verified archive now streams into tar's stdin, so no network bytes reach a file the CLI writes. The abandoned-part scan takes the entry type from readdir instead of an lstat, reads the ownership marker through one O_NOFOLLOW descriptor it fstats, and the preview test reads each file once instead of stat-checking it first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(ci): raise the CLI's unpacked size budget to 5% over its measured size main's @hyperframes/cli was already about 0.99% over its 23722874-byte unpacked budget, so this branch's additions (networkFailure, the avatars command, the larger skill references) tip it past the 1% tolerance. This is the same value #7169 sets, 25159107 bytes (5% headroom over the measured size), so the two PRs merge cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(cli): split the pull-marker check and share the token-endpoint POST Fallow flagged pullOwner (CRAP 49.5, cyclomatic 13) and a 28-line clone between refreshOnce and exchangeCodeForTokens. pullOwner is now the name match, the O_NOFOLLOW marker read and the marker check as three small functions, with the same behaviour. Both token requests go through one postToTokenEndpoint, which keeps the 15 s timeout and the named network failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): a 4k cloud render checks the exact size against its preset before upload The aspect detector matches a ratio within ±0.05, so at 4k a 1920x1055 composition was sent as 16:9 and 1000x980 as 1:1, and the producer then refused both as an aspect mismatch. At 4k the matched ratio's preset (landscape-4k, portrait-4k, square-4k, the ones the API maps it to) now goes through the producer's own checkOutputResolutionCompatibility, and a composition it does not fit is refused locally with the producer's reason and the 1080p alternative. 1080p, where the render keeps the composition's own size, is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
50ce9fb514 |
fix(cli): an output in a drive root (D:\) no longer fails before it is written on Windows (#7151)
* fix(cli): an output in a drive root (D:\) no longer fails before it is written on Windows * fix(cli): keep the output folder helper's reason in its test * fix(cli): make the output folder only when nothing is there, as the producer does * fix(cli): keep the output folder's directory check and fix the stat mock that hid isDirectory |
||
|
|
76da5f6932 |
fix(cli): a credit limit the person names holds on every paid media call (#7145)
* fix(cli): a credit limit the person names holds on every paid media call A limit was only a per-call --max-credits flag that each caller had to remember, so kit tools, voice resolve and transcribe could spend past it. The limit now lives in the project's credit-limit file and runJob, which every paid call goes through, refuses a new job past what is left (unpriced calls included). Voice and avatar video resolved through the heygen CLI are refused under a limit, since they cannot be priced there. * fix(cli): keep a lost job's reserved credits, and hold the limit on the audio engine's voice A resumed job refused with a status that says nothing about the job released its reservation while the job may still be running. Only the call that reserved releases, and only for a refusal that rules the job out. The audio engine's HeyGen speech call now refuses under a limit too. * fix(cli): type withinLimit as returning whether it reserved * chore: regenerate the skills manifest * fix(cli): a credit-limit file is a run-time project file, and a lighter runJob catch * chore(cli): mark runJob's complexity as accepted |
||
|
|
19be35a463 |
fix(cli): the voice a film uses is listed from the HyperFrames account, never the heygen sign-in (#7144)
* fix(cli): the voice a film uses is listed from the HyperFrames account, never the heygen sign-in * fix(cli): drop a comment line and an unenforced range from the voices command |
||
|
|
c5a5e08827 | feat(cli): billing and upgrade links carry the signed-in workspace (#7103) | ||
|
|
3adc9f130d |
fix(cli): media-use sends a picture on a machine with no ffmpeg (#7112)
* fix(cli): media-use sends a picture on a machine with no ffmpeg * fix(cli): pictures fall back to ffmpeg when sharp cannot load * fix(cli): drop two comments the names already carry |
||
|
|
87a42e7470 |
feat(cli): billing shows the price and pays from the terminal on Enter (#7068)
* feat(cli): billing top-up becomes add-credits, top-up stays as an alias * fix(cli): keep the skills manifest and core-skills test in step with add-credits * revert: leave the core-skills test to its own PR * feat(cli): billing shows the price and pays from the terminal on Enter * fix(cli): the top-up page opens at the credit packs * test(cli): billing tests cover the checkout offer with no terminal * fix(cli): the purchase wait runs while Press Enter is open |
||
|
|
a5a6121332 |
fix(cli): don't invent a purchase link when the server withholds upgrade_url (#7031)
reverse/start answers upgrade_url: null when no plan can be bought right now. The CLI treated that like a missing field and built its own plans link, so a Free account under gate "block" was sent to a page where it can't buy. Now null means no link anywhere: the JSON prints upgrade_url: null and subscribe_command: null (billing subscribe would open that same plans page), the refusal says a plan can't be purchased right now instead of naming the subscribe command, and the skill runs nothing and passes on no link. Only an absent field (an older server) falls back to the plans page; a string is used as is. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
10bc426e32 |
feat(cli): call HeyGen's v3 media routes through the generated client (#7063)
* feat(cli): call HeyGen's v3 media routes through the generated client The media-use generate routes (image, video, avatar, voice, music), HeyGen transcription and the public voice list called fetch by hand. They now go through the generated cloud client, regenerated with the create and status methods for those routes. runJob takes a job route (its path, how it starts, how its status is read) in place of a path and a poll-path function. Keys, retries, timeouts, polling and error messages are unchanged. Speech answers in the request and the API takes no Idempotency-Key there, so it has no status to poll and no key header is sent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(cli): keep v3.ts comment share at the base Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(cli): regenerate the cloud client without API description text The generated client and types now carry names and types only, with no JSDoc taken from the API spec's summaries and descriptions. The source contract test checks that no method carries generated description text, in place of checking the uploadAsset description. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
d03bdeae9d |
fix(cli): prefer OAuth session over HEYGEN_API_KEY (#7051)
* fix(cli): prefer OAuth session over HEYGEN_API_KEY A signed-in `hyperframes auth login` session now wins over an API key in the environment, so a paid plan on the login is used even when the shell also exports HEYGEN_API_KEY. New order: HEYGEN_ACCESS_TOKEN (host app), the stored login (refreshed when expired), HEYGEN_API_KEY, HYPERFRAMES_API_KEY, the saved API key. The env key still comes first when HEYGEN_API_URL or HEYGEN_API_BASE names a host app's gateway, and takes over for the rest of the process when the login cannot be refreshed. The media-use audio helper follows the same order. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): fall back to the env key only when HeyGen refuses the refresh A 503, a network error or an overlapping refresh no longer switches the process to HEYGEN_API_KEY. The fallback now needs a refused grant or an expired login with no refresh token. A login another process stored since is re-read first, and refreshes that overlap in one process share one request. The media-use helper no longer treats HeyGen's own API base as a gateway. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(cli): keep the login when the refresh reply can't be read Only a 400/401 from the token endpoint marks the grant as refused and switches to the env key. A 200 whose body can't be parsed now throws and leaves the login in place, so the next call refreshes again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
7d3c225207 |
feat(cli): reverse start records a reverse run; cloud render carries its session (#7016)
* feat(cli): reverse start notes a reverse run with HeyGen and cloud render carries its session `npx hyperframes reverse start <video> [--dir <project>]` probes the video (the same JSON as `measure probe`), then, when signed in, calls POST /v1/hyperframes/reverse/start and saves the returned session id in the project's hyperframes.json. It never stops the run: signed out, offline, a 404 from a server without the route, or a malformed answer all continue with the probe and no session. `cloud render` sends `reverse_session_id` only when the project holds one, which only a successful /reverse/start writes. `init` now treats a folder holding only hyperframes.json as empty, so `reverse start --dir x` followed by `init x` works and keeps the session. The reverse-any-video skill opens with `reverse start` instead of `auth status` + `measure probe`, with a fallback for older CLIs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): keep the comment share of touched files from rising Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): reverse start keeps unknown-plan sessions, prints the attributed upgrade link, takes only rvs ids - A `plan: "unknown"` answer is a valid session: saved, `recorded: true`, printed as `plan: null`; it never blocks and never falls back to the client-side plan read. - On Free, `reverse.upgrade_url` is printed: the server's link, else the plans page with `feature=reverse&rs=<session>` (the fields checkout reads). The skill passes that exact link on instead of `billing subscribe`. - Session ids must match the render endpoint's pattern (`rvs_<lowercase uuid>`). A saved value that does not is ignored: not sent on `cloud render`, and `reverse start` opens a fresh session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skills): name no CLI version for reverse start's fallback 0.9.4 shipped without `reverse start` and skills go live from main before the CLI release, so the fallback is described as "a CLI without it" instead of a version number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
8089f0049c |
feat(skills): soft-launch reverse-any-video, and fix what Wanbi's Pro test found (#7006)
* feat(skills): publish reverse-any-video, render it at high quality, and stop on a stuck shot From Wanbi's Pro test of reverse-any-video (11-01, checked against 0.9.2): - A standard install never found the skill: it was internal, and /hyperframes did not route to it. It is now an on-demand skill on every catalog surface, and the routing line names it. - The cloud render in SKILL.md had no --quality high, so the final rendered at standard. - A re-shoot that stayed pending had no rule; the run waited four hours. people.md now runs the command once more after generate's 30-minute stop, then treats the shot as failed. * feat(cli): generate takes a language for --voice, so a Pro sign-in gets a HeyGen voice Wanbi's Pro run fell back to Kokoro: --voice needed an id, and the only way to list ids was the separate heygen CLI and its own login. /v3/voices answers on the HyperFrames sign-in, so: - --voice <language> picks HeyGen's first public voice in it and names it in the output. - A missing --voice lists six English voices to pick from instead of a bare error. - A voice id still goes straight through, with no extra call. * fix(cli): a voice picked by language stays with its request across re-runs Rames: `--voice Chinese` re-picked HeyGen's first voice on every run, and the voice is part of the body and the idempotency key. If the catalog reordered while a job was pending, the same command could start a second paid job instead of resuming the first. The pick is now bound to the request (every field, plus the account scope a job bills) in the project's heygen-jobs.jsonl, or the CLI config dir outside a project, and a re-run reuses it. Regression: a pending timeout, a reordered catalog, the same command, for voice and avatar; the second POST keeps the voice, body and key. * fix(cli): a voice pick waits for a known account instead of binding to none Rames: when /v3/users/me failed, senderScope() was null and the pick was bound to an empty scope; once the account came back, the same command missed that binding and could pick another voice and paid key. pickVoice now stops before picking or posting while the account is unknown, and never reads or writes a blank-account binding. Regressions, both directions: unknown then known refuses with no POST, then picks once; known then unknown refuses the re-run with no second POST, then resumes with the same body and key. Also README: a non-interactive install gets all 8 skills, not 7. |
||
|
|
6b0abb4eb5 |
fix(cli): a stale mask takes its frame's colours instead of delogo's streaks (#6950)
* fix(cli): a stale mask takes its frame's colours instead of delogo's streaks Delogo drew the box's edges across large boxes, and HeyGen painted the streaks into the shot. Shrink the box to 3x3 and blur it back, so no letter or streak survives. fails without the fix: leaves no streaks in a box filled while the picture changes * fix(cli): the stale mask fill drops gblur, which blacked out light boxes On a 3x3 picture gblur turned light fills black on an FFmpeg 8 build. Bicubic from 3x3 is already smooth. |
||
|
|
7f8ae5b4b6 |
fix(cli): a masked box follows the frame while the camera moves (#6948)
* fix(cli): a masked box follows the frame while the camera moves A temporal median under a moving camera froze older frames in the box, and HeyGen painted them in. Fill from the box's own edges on each frame when the picture round it changes. fails without the fix: fills a masked box from the current frame while the picture changes * fix(cli): the mask scan stops where the guide does, and small boxes still blur A long guide overflowed the decode buffer. A narrow box asked for more blur than its chroma plane holds. |
||
|
|
69400df276 |
fix(cli): the cut detector keeps real cuts in live footage (#6923)
* fix(cli): the cut detector keeps real cuts in live footage #6894 left held frames out of every baseline and called any run over 3 frames a fast move. On live footage that raised the baseline past real jump cuts and dropped blur transitions between shots. Only animation that moves and holds in turn gets the moving baseline now, and a run stays a cut when its tones change. * fix(cli): a wipe through black is a cut, and a cut near a guide's edge is refused A whip keeps its tones through every frame of the run, so that is the test, not only the two ends: johnny's wipes between two views of one map match at the ends alone. foldShort folds pieces of a few frames now. At 0.5 s it let a real cut through to a paid shot, and the classifier already handles the flashes it was there for. --allow-cuts is in the skills. * refactor(cli): name the whip check instead of commenting it |
||
|
|
439d01784c |
fix(cli): a shot from --first-frame comes back in that frame's shape (#6924)
* fix(cli): a shot from --first-frame comes back in that frame's shape HeyGen can answer 1344x768 for a 16:9 first frame. The crop only ran with --aspect or with no first frame, so these shots kept its size. Without --aspect the first frame now sets the shape. * refactor(cli): drop a comment the function name already says * fix(cli): the first frame's shape is the one sent, not the one stored A phone JPEG with Orientation=6 uploads as portrait but stores landscape pixels, so a correct portrait answer was cropped to 90x50. The shape now comes from the same conversion the upload uses. fails without the fix: keeps a portrait shot from a phone photo stored sideways |
||
|
|
5ce6b30bdb |
fix(cli): billing and Desktop handoff read their hosts from settings (#6897)
* fix(cli): billing and Desktop handoff read their hosts from settings * fix(cli): OAuth client and API hosts read from settings * test(cli): host and client settings tests run the same on any machine * chore(cli): format and refresh the skills manifest * chore(cli): trim a comment * chore(cli): keep the stylesheet as it was |
||
|
|
8a0b8a9c22 |
fix(cli): measure ink, one output-folder flag spelling, logo wordmark variant (#6891)
* feat(cli): measure ink reads text size, --out and --output both work, logo --variant wordmark measure ink reports the bounds, size and lines of text in a region of one frame, so a rebuild can be sized without a script. measure and snapshot take --out and --output for the same folder. media-use resolve --type logo --variant wordmark returns the brand's wordmark when theSVG has one. * fix(cli): measure ink stays under the complexity and comment limits, one projectOf * fix(cli): snapshot and measure also accept --output-dir * fix(cli): projectOf moves without adding comment lines * fix(cli): measure output alias list type-checks as an argument * fix(cli): a logo variant never answers a default logo request; test output flags * style(cli): format the new tests |
||
|
|
5259097261 |
fix(cli): one cut detector that tells real cuts from flashes and fast moves (#6894)
* fix(cli): one cut detector that tells real cuts from flashes and fast moves * fix(cli): a flash must come back within a few frames; trim comments, format * test(cli): the cut fixture gets a 60 s timeout; format * test(cli): drop a history comment |
||
|
|
4d44c0d0ab |
fix(cli): billing top-up opens the pricing page (#6887)
* fix(cli): billing top-up opens the pricing page * test(cli): pin the top-up link's query fields on every environment |
||
|
|
919e138fc2 |
fix(cli): fill --mask boxes from the picture behind and crop generated clips to the requested aspect (#6892)
* fix(cli): fill --mask boxes from the picture behind and crop generated clips to the requested aspect * fix(cli): shorten the mask fill comment |
||
|
|
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> |