Commit Graph
7466 Commits
Author SHA1 Message Date
Miguel Ángel 94cc7558e7 docs: say Desktop exports on your computer are unlimited on every plan (#8093)
Free's 5 cloud exports a month read as a cap on every export. One sentence in the FAQ's cost answer and on the Export page says local exports are unlimited.
2026-11-17 17:28:18 +00:00
Miguel Ángel f1f8ca31c3 fix(core): hover and thumbnail captures never wait for a 4K clip's preview copy (#8079)
* test(core): a hover capture page keeps a 4K clip's file instead of waiting for its copy

* fix(core): hover and thumbnail captures never wait for a 4K clip's preview copy

* fix(core): keep mediaProxy's comment share flat

* test(core): keep the capture-page test comment within 120 characters
2026-11-17 17:26:46 +00:00
Michael Wang 2749aafb36 fix(media-use): escape control characters in the adopt skip line (#8087)
scanExistingAssets printed the project's own file and folder names to
stderr as they are. A name holding escape sequences could rewrite or
hide terminal lines. The line now goes through terminalText, like the
rest of media-use's output.
2026-11-17 17:19:34 +00:00
WaterrrForeverandClaude Fable 5.2 820d63d7f9 feat(cli): check finds text over a face, measure cuts names resumed takes, measure hands (#8074)
* feat(cli): check reports text drawn over a face in a video

The layout audit reports text painted in front of an opaque video with its
word boxes and where the video's frame lands; Node finds the faces in the
video file with the detector `measure face` uses and adds a `text_over_face`
finding (info from 5% of the face covered, warning from 30%) with
`coveredFraction` and `faceRect`. `layout.faceCheck` in the report says
whether the pass looked. `data-layout-allow-on-face` waives it.

Also reads a two-token `object-position` whose first token is "50%" as the
horizontal one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(cli): measure cuts names the shot a take resumes

A shot that returns to an earlier camera setup after at least one other
shot (a wide take, a close-up cut into it, the wide take again) carries
`continues`: the index in `shots` of the shot it resumes. It is read from
the signatures `cuts` already decodes, by the scene's edges, so a person
who has moved or an exposure that drifted does not hide the match.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(cli): measure hands follows a hand through a clip

`measure hands <video>` reports where a hand's palm (with the hand's
size), index fingertip or pinch is in each sampled frame of a stretch of
up to 15 s, from MediaPipe's hand landmarker. A frame with no such hand
is null, never filled in. The landmarker runs in the CLI's headless
Chrome on a page answered from disk; its code and model are not shipped
and are downloaded on first use, pinned by size and sha256, into the
trusted cache.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(cli): text_over_face is info only, and a stalled OpenCV download no longer stalls check

The face detector can take texture for a face, so text_over_face is
reported as info however much of the face is covered and never fails
--strict.

check passes its deadline and a 30 s limit into the detector's first-use
OpenCV download. A download that does not answer costs the face pass
only: faceCheck is { ran: false, reason }, the other findings are kept
and the process exits.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 17:16:20 +00:00
Michael Wang f5ccfcc960 fix: narrow the private-file rule for hidden files, build output and lint (#7990)
* fix: refuse framework build output and service-account files; lint skips private compositions

Review follow-ups:
- Hidden framework build-output folders (.next, .nuxt, .output, .svelte-kit,
  .vercel, .netlify, .wrangler, .astro, .turbo) are private whatever the file
  type, since their scripts can carry inlined server environment values.
- credentials.json and common service-account key names are private.
- Lint's compositions/ walk skips private files and folders, and an explicit
  lint entry that is a private file is refused.
- New lint tests link .git/m.json, .mcp.json and a .hyperframes record as an
  import map; they fail when lint's private-file check is removed.

* fix: a hidden file is private whatever its type; files in hidden folders keep the asset rule
2026-11-17 17:08:14 +00:00
zhengqiuyang 401991669d fix(lint): derive the root duration with the parser's timing reader (#8032)
* fix(lint): derive the root duration with the parser's timing reader

`deriveDurationFromClips` read `data-start` with a raw `Number()`, so a clip
authored at `data-start="-2"` produced an end of `-1`. `resolveCompositionDuration`
only counts positive ends, so the clip vanished from the derivation and the
composition was reported as having no duration source at all — a hard error that
blocks strict renders, even though the parser clamps the same start to zero and
renders the clip for its full length.

Read the start through `readClipTiming`, the same contract parser the renderer
uses, and keep the media-duration default for untimed images.

* fix(lint): derive the root duration with the parser's timing reader

`deriveDurationFromClips` read `data-start` with a raw `Number()`, so a clip
authored at `data-start="-2"` produced a negative end and vanished from the
derivation. Read the start through `readClipTiming`, which clamps it to zero,
and keep `readAuthoredDurationSeconds` for the authored length so a valid
`data-end` still backs an unparseable `data-duration`.
2026-11-17 17:08:08 +00:00
Miguel Ángel b22ca1a58e fix(release): count every pusher of a release, need a second maintainer, date approvals (#8076)
* test(release): a release's approver must not have pushed it, and a second maintainer must have

* fix(release): count every pusher of a release, need a second maintainer, date approvals

* docs(release): who may approve a stable release, and the second maintainer it needs

* test(release): a push the activity log records with no account stops the release

* fix(release): a push recorded with no account stops the release
2026-11-17 16:55:33 +00:00
Michael Wang 90de9b6196 fix(cli): a project .env provider key prints a note when it is used (#8056)
A provider key from a project .env is still used when no own credential
competes. Capture vision (OpenRouter, Gemini, Google and both Vertex parts),
snapshot --describe, Gemini speech and Lyria music now print one note per key
before it is first used, naming the variable and the escaped .env path, as
the ElevenLabs note does. The ignoring notes escape the path too, and the
media-use skill gets a generated copy of the CLI's terminal-text helper.
2026-11-17 16:52:55 +00:00
zhengqiuyang c84c30fd8d fix(lint): read a sub-composition mount's timing through the parser (#8037)
`subcomposition_blanks_before_host` read `data-start` and `data-duration` with a
raw `Number()`, so a mount with a reference start (`intro + 0.5`) looked like it
started at 0 and was reported as leaving a blank tail that may not exist. A
negative start was measured from the raw value, so the reported gap and the
`data-duration` fix hint were wrong in the other direction.

Read the mount through `readClipTiming`, the same contract parser the renderer
uses: a runtime-resolved start is skipped (its end cannot be known statically),
and a negative start is measured from zero.
2026-11-17 16:49:33 +00:00
Miguel Ángel cda94eb0f6 fix(studio): timeline rows in a sealed preview know their element, source file and audio group (#8078)
* test(studio): a sealed preview's timeline rows bind to their elements

* fix(studio): timeline rows in a sealed preview know their element, source file and audio group
2026-11-17 16:49:19 +00:00
James RussoandClaude Opus 5.5 4bea3e79c2 fix(cli,studio): refuse ?hf-proxy when a request carries no same-site signal (#8066)
A media-proxy request with neither Sec-Fetch-Site nor a Referer naming the
host was treated as same-site. Play, the static project server and Studio now
require a positive signal and refuse the request otherwise. The check
command's own re-request of failed media sends a Referer for its origin so it
keeps working.

— Rames

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 16:45:34 +00:00
Miguel Ángel a56fa2caf3 fix(studio): scrubbing the playhead plays the music track in a sealed preview (#8082)
* test(studio): scrubbing a sealed preview plays the music track

* fix(studio): scrubbing the playhead plays the music track in a sealed preview

* fix(core): the scrub uses the runtime's wall-clock timers and media-time writer
2026-11-17 16:25:29 +00:00
Santhi Prakash 9797faea05 fix(core): drop motion-blur state on __hfRuntimeTeardown (#7996)
The blur's filter <svg> is appended to <html>, outside the body swap a
same-document re-init performs. A torn-down run left it (and
window.__hfMotionBlur) behind, so the next run's hf-mb-0 collided with
the stale id and url(#hf-mb-N) drew movers through the old filter
region, rendering them blank.

Fixes #7986
2026-11-17 16:13:03 +00:00
Miguel Ángel e86594759c chore: release v0.9.63 (#8080) v0.9.63 2026-11-17 15:55:44 +00:00
Miguel Ángel 9b565c8e02 fix(release): a release merged in one push with other PRs publishes at its own commit (#8077)
* test(release): a release merged in one push with other PRs is found and published at its own commit

* fix(release): a release merged in one push with other PRs publishes at its own commit
2026-11-17 15:22:14 +00:00
Miguel Ángel 5f8b7a6eee fix(studio): the edit bench reads a sealed preview through its editing port (#8010)
* test(studio): the edit bench measures an element inside a sealed preview

* fix(studio): the edit bench reads a sealed preview through its editing port

* fix(studio): the edit bench drops a preview reply that lands after a release or the next drag

* fix(studio): the edit bench pairs each frame's pushed geometry with the pointer at that moment

* fix(studio): the edit bench pairs Studio's outlines and the watched element by time, not arrival

* fix(studio): the edit bench starts a drag only once the preview has measured the element
2026-11-17 14:36:04 +00:00
Miguel Ángel 0be1a0719c fix(producer): frames start drawing while the audio mix finishes (#7985)
* fix(producer): frames start drawing while the audio mix finishes

* fix(producer): keep the encode stage's comment share

* fix(producer): on machines with under 4 CPUs frames wait for the audio mix

* test(producer): a mix that fails during capture is reported as the audio stage's failure

* fix(producer): a mix that fails during capture names the audio stage as where the render failed
2026-11-17 14:35:07 +00:00
Miguel Ángel 72925380cc fix: render, capture and inspector servers never serve a service worker's script (#8073)
* fix(engine): the render file server never serves a project file as a service worker's script

* fix(producer): render, capture and inspector servers never serve a service worker's script
2026-11-17 14:15:52 +00:00
Miguel Ángel fbcdf4cad7 chore: release v0.9.62 (#8075) 2026-11-17 14:15:36 +00:00
Miguel Ángel df31ce2b15 fix(studio): a layer reorder is one undo step again (#8072)
* fix(studio): a layer reorder is one undo step again

* fix(studio): a lane drag's save still paints back at once inside a reorder gesture
2026-11-17 13:35:06 +00:00
Miguel Ángel 93a4d29c03 fix(studio): audio meters and audio groups work in a sealed preview (#8011)
* test(studio): audio meters and group volume in a sealed preview

* fix(studio): audio meters and audio groups work in a sealed preview

* chore(inspector): raise the unpacked size budget for the preview's audio editing kinds

* test(studio): the sealed audio test serves a Studio-marked preview, as the editing port now requires
2026-11-17 13:26:15 +00:00
Miguel Ángel b064e40e13 fix(studio): adding a track no longer remounts every clip on the timeline (#8068)
* test(studio): adding a track keeps every existing timeline clip mounted

* fix(studio): adding a track no longer remounts every clip on the timeline
2026-11-17 12:37:23 +00:00
Miguel Ángel b4acc1a1da fix(studio-server): a project file is never served as a service worker's script (#8064) 2026-11-17 12:36:14 +00:00
Miguel Ángel f9c5ed07bf feat(core): the preview can stream an element's geometry to the editor every frame (#8052)
* feat(core): the preview can stream an element's geometry to the editor every frame

* refactor(core): the editing client hands unasked pushes to one function

* fix(core): geometry watches are capped per page; a lost port or failed measure stops nothing else

* fix(core): the preview measures watched geometry after the frame renders, not inside rAF

* fix(core): watched geometry is measured in the frame's resize-observer step, just before paint

* docs(core): a hidden preview's geometry pushes pause until it has a size

* test(core): keep the fake resize observer's note within the line limit
2026-11-17 12:35:23 +00:00
Miguel Ángel 8ec97da011 perf(engine): check still frames on several pages at once so text films start sooner (#7997)
* perf(engine): check still frames on several pages at once so text films start sooner

* fix(engine): parallel still-frame check keeps its full time budget

* test(engine): give the Bun download check the minute its spawn already allows
2026-11-17 12:21:00 +00:00
Miguel Ángel c106793f79 fix(release): publish to npm with the job's OIDC token, not a stored token (#8070)
* test(release): npm publishes with the job's OIDC token, no stored token named

* fix(release): publish to npm with the job's OIDC token, not a stored token

* test(release): catch a secret named by index or inherited, not only secrets.X
2026-11-17 12:20:49 +00:00
Miguel Ángel 43e5b7cecd fix(core): a held video picture is drawn through a VideoFrame closed after the draw (#7971)
* test(core): a held picture is drawn through a closed VideoFrame

* fix(core): a held video picture is drawn through a VideoFrame closed after the draw

* test(core): read the held frame's closed flag only once it is a VideoFrame
2026-11-17 12:09:33 +00:00
Miguel Ángel 34f98e6a04 test(core): the reloaded-video playhead test builds a smaller film so busy CI never times it out (#8069)
* test(core): the reloaded-video playhead test builds a smaller film so busy CI never times it out

* test(core): keep the playhead fixture note inside the comment line limit
2026-11-17 11:53:32 +00:00
James RussoandClaude Opus 5.5 fbb4838525 fix(producer): leave outside links out of site listings by default and warn SDK callers (#8065)
A bare listSiteFiles now leaves out files and folders linked in from outside
the project; a caller that wants them passes "include". listSiteFilesForUpload
warns on the console when the caller passes no onNotice, so SDK callers learn
that files were left out. The regression harness keeps its fixtures' outside
links with "include".

— Rames

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:35:51 +00:00
Miguel Ángel 7a0bec6828 fix(studio): a service worker a project left behind is gone before a preview frame loads (#8067)
* fix(studio): a service worker a project left behind is gone before a preview frame loads

* fix(cli): the player page's inlined script list is escaped for a script tag
2026-11-17 11:05:40 +00:00
Miguel Ángel 3599623f92 chore: release v0.9.61 (#8051) v0.9.61 2026-11-17 10:56:12 +00:00
Miguel Ángel d317abcdba fix(cli): cloud render --json reports re-encode progress and times out a stalled cache check (#7755)
* fix(cli): cloud render --json reports re-encode progress and times out a stalled cache check

* refactor(parsers): share the ffmpeg progress reader from ff-binaries

The reader lived in a new studio-server entry point, which pushed its packed size over budget and left package.json out of step with package-subpaths.json. Both callers already depend on parsers. The re-encode now gets a progress callback only when someone listens.

* style(cli): format the offload test
2026-11-17 10:30:43 +00:00
Andy CheighandClaude Opus 5.5 524ea46bf9 fix(producer,parsers): render compile never looks for a scene's assets on another computer (#8063)
A scene mounted as `\\host\share/scene.html` read its own file from inside the
project, but its sibling assets were looked up next to `\\host\share`, which on
Windows connects to that host and sends the user's login. The compile's asset
checks now report any path outside the project as missing without touching the
disk, and a data-composition-src with a leading `\` or `./` is rewritten to the
project file it names before its assets are resolved.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:41:24 +00:00
Miguel Ángel c8df284b2e feat(engine): render telemetry says why a page cannot reuse still frames (#7993)
* feat(engine): render telemetry says why a page cannot reuse still frames

* fix(engine): keep the ineligible cause's comment on its one owner
2026-11-17 09:37:22 +00:00
Miguel Ángel 4807799c4e fix(publish): a stable release needs a maintainer's approval, not any account's (#8062)
* test(publish): a stable release counts only maintainers' reviews, never the approver's own push

* fix(publish): a stable release needs a maintainer's approval, not any account's

* fix(publish): only approvers and change requesters are looked up, and a failed lookup always refuses

* style(publish): the release gate's comments and lines fit the 120-character limit
2026-11-17 09:33:45 +00:00
James RussoandClaude Opus 5.5 f97e289058 fix(cli): refuse media-proxy copies another site asks for in play and the static server (#8058)
A `?hf-proxy=` request makes this machine run ffmpeg. Studio already refuses
one that comes from another site; the `play` composition route and the static
project server (used by check, snapshot and capture) still served it. Both now
answer 403 to a cross-site or same-site `?hf-proxy=` request before any probe
or transcode starts. Their own pages and plain asset requests are unchanged.

— Rames

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:32:18 +00:00
James RussoandClaude Opus 5.5 4721739ee7 fix(producer): readers re-check outside-linked compositions, and the refusal names a step every surface can take (#8034)
- parseSubCompositions and the inliner's disk fallback check again right before they
  read a composition, so a file swapped for an outside link after the pre-flight is
  refused too. recompileWithResolutions carries the outside-file policy.
- The refusal says any scripts in the file would run, which holds whether or not it
  has any, and offers moving the file into the project, which Studio and benchmark
  renders can do without the CLI flag.

— Rames

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:26:17 +00:00
James RussoandClaude Opus 5.5 39347da9de fix(cli): leave files from outside the project out of Lambda and Cloud Run site uploads (#8060)
* fix(cli): leave files from outside the project out of Lambda and Cloud Run site uploads

A site upload for `lambda` or `cloudrun` followed every symlink in the project and
shipped what it pointed at, wherever that was on the machine. `publish` and `cloud
render` already ask first. Site uploads now leave a file or folder linked in from
outside the project out and name each one; `--include-outside-files` (or
`includeOutsideFiles` in the SDK's deploySite, renderToLambda and renderToCloudRun)
uploads them. publishProjectArchive called without a prepared archive now leaves
outside files out too, since nothing approved them.

— Rames

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(producer): drop the new option comments the comment ratchet refuses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:25:25 +00:00
Miguel Ángel efc91fc877 feat(studio): an element's source-parsed animations are part of Studio's API (#8061) 2026-11-17 09:03:19 +00:00
Xuanru Li 5ea86450a2 fix(cli): a host can name projects whose received files are expected or all received (#8025)
* fix(cli): a host can name projects whose received files are expected or all received

HYPERFRAMES_RECEIVED_STATE_FILE points at a JSON file a host app keeps,
listing project folders (by path, and optionally by device and inode) as
"expected" or "all". For an expected project, a missing received-files
record counts every file as received and is not started afresh; for an
all project, every file counts as received whatever the record lists. A
state file that is named but cannot be read counts every file as received.

A record lock dated in the future is taken over like a stale one.

* fix(cli): read host provenance state through one file handle

* fix(cli): canonicalize host state paths like record writes

* test(cli): expect canonical received warning paths
2026-11-17 08:54:39 +00:00
Miguel Ángel 55291c00c2 fix(core): only Studio's own preview pages get the editing port, and undo sets only safe attributes (#8057)
* fix(core): only Studio's own preview pages get the editing port, and undo sets only safe attributes

restore-attributes now changes only class, style and the editor's timing, layout, audio and label data- attributes, and drops only data- ones; any other change answers applied: false and Studio reloads the preview. The editing agent hands its port over only when the page carries Studio's preview mark and not the another-site mark, so a page no Studio marked never offers it.

* fix(core): undo on a lazily loaded image still applies in place

The preview server adds loading="lazy" to timed images and the saved file does not have it, so the restore now may drop loading; dropping it loads nothing new.

* style(core): keep the restore plan's doc comment within the line limit
2026-11-17 08:46:24 +00:00
Ular Kimsanov 3e01f691db fix(lint): match a timed wrapper's close tag literally (#8028)
* fix(lint): match a timed wrapper's close tag literally

The parser keeps any tag name up to whitespace, / or >, so a wrapper's
name can hold regex syntax. closeTag built its pattern from the raw name:
an unbalanced name threw a SyntaxError that rejected the whole lint, and a
nested-quantifier name backtracked exponentially over the text before a
nested video. Escape the name with the file's own escapeRegExp.

* refactor(lint): name the escaped close-tag pattern instead of commenting it

The comment ratchet keeps a file's comment share from rising.
2026-11-17 08:44:40 +00:00
Miguel Ángel 647bdd4d7c fix(studio): each drag shows as its own undo step once its save lands (#8033)
* test(studio): three quick drags give three undo entries in the history list

* fix(studio): each drag shows as its own undo step once its save lands

* test(studio): the edit bench fails a gesture missing from the history list

* refactor(studio): the held-entry close is a plain function, and the bench helper stays private

* chore(studio): mark the history hook's existing complexity the way other large hooks are

* fix(studio): a drag's history claim waits for the previous drag's close to land
2026-11-17 08:08:46 +00:00
Miguel Ángel 53080581cb fix(cli): a refused reverse start reports whether HeyGen sent the refusal (#8053)
* fix(cli): a refused reverse start reports whether HeyGen sent the refusal

* fix(cli): a refusal body that is not JSON is never read

* refactor(cli): drop the comments the names already say

* refactor(cli): reading a refusal's source lives in one helper
2026-11-17 08:04:58 +00:00
Michael Wang b29e40d707 fix(producer): cap a render's total sub-composition expansion (#8045)
* fix(producer): cap a render's total sub-composition expansion

The 16 MB limit checked each composition file alone, so a few small files
that mount each other many times assembled a page far larger, and the
pre-flight walk and sub-composition compile redid their work for every mount.

The pre-flight walk now reads each file once and charges every mount to one
budget: 32 MB of composition HTML across at most 10,000 mounts. Past either
limit the render fails with the existing non-retryable COMPOSITION_TOO_LARGE
error, before compiling. Sub-composition compilation handles each path once,
and the inliner charges each mount to the same budget as it builds the page.

* docs: describe the total sub-composition expansion limit

* fix(producer): check each mount path and read each fallback file once

The pre-flight walk resolved and checked a mount's path on disk for every
mount, and the inliner's disk fallback did the same for every mount it
inlined. Both now do it once per path, so a refused fan-out costs about
half a second instead of several. The test now covers both a fan-out the
pre-flight refuses and one inside templates, which only the inliner sees.

* fix(producer): the pre-flight charges mounts inside templates to the budget

The pre-flight walk could not see mounts inside a <template>, so a
template-wrapped fan-out was only refused by the inliner, after seconds of
work. The walk now charges those mounts to the same budget without
reporting them, since the inliner still only warns about a broken one.
The refusal now names which limit it passed, and the tests assert the
mount count instead of a time.
2026-11-17 07:55:06 +00:00
Michael Wang 909a9b183c build: raise the producer packed-size budget to 936,000 bytes (#8054)
With the sub-composition expansion budget (#8045) on top of the probe
pre-check change (#8044), the producer packs to 930,774 bytes. That is
over its 921,000 budget by more than the 1% tolerance, so the merge
queue's Build step refuses #8045. The growth is the new expansion budget
class and pre-flight walk in the compiler.
2026-11-17 07:55:00 +00:00
Miguel Ángel f91bbf0dac fix(inspector): the inspector's Chrome starts as root or in a container (#8050)
* test(inspector): the inspector's Chrome follows the host sandbox rule, and probes retry without it

* fix(inspector): the inspector's Chrome starts as root or in a container

* test(producer): the page check and the inspector retry Chrome without the sandbox when it refuses

* fix(producer): the page check retries Chrome without the sandbox when it refuses, like the inspector

* chore(inspector): raise the packed size budget for the shared sandbox rule
2026-11-17 07:43:53 +00:00
Michael Wang fe93f9cd47 fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern (#8047)
* fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern

ffmpeg's image2 demuxer reads %d, %03d, %% and a % before a wildcard in an
input path as a pattern of other files, folders included. Every project,
private-file and received-file check approves the literal path, so a
composition could name a placeholder whose pattern reaches images outside
the project and get them back as video frames.

Every ffmpeg and ffprobe input built from a project file now goes through
assertLiteralMediaInput, which refuses such a local path before ffmpeg runs.
The engine's urlInputArgs, the parsers' mediaInputFormatArgs and the
studio-server's new mediaInputArgs all take the input path, so the CLI
snapshot and cloud offload, lint, core grade analysis and studio-server
callers are covered too. URLs and other percent signs, such as %20, are
read as before.

* build(parsers): declare the literal-media-input subpath

* build: raise the parsers packed-size budget for the literal-media-input subpath

The new subpath adds its own built entry, type file and export map rows,
about 2.7 KB packed. It is a separate module so test suites that mock
ff-binaries still run the real path check.

* test(parsers): a harmless name shaped like a pattern is refused too
2026-11-17 07:28:09 +00:00
Michael Wang 14c4e4c268 fix(cli): a project .env provider key gives way to the person's own credential (#8041)
* fix(cli): a project .env provider key gives way to the person's own credential

A project .env could set OPENROUTER_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY,
the Vertex settings or ELEVENLABS_API_KEY and outrank a credential the person
set in their shell or saved settings. The earlier rule covered only received
projects; a cloned or downloaded project still won.

Now every project .env provider key is unset, with a note naming the file,
when a competing provider has a credential from a surer source: the shell or
saved settings first, then the person's own project .env, then a received
one. A project key with no competing credential is still used, model and
timeout settings still apply, and the media-use scripts note an ElevenLabs
key from any project .env before speech starts.

In the CLI process an own-project key yields only within the vision choice;
the media-use scripts remake the Gemini audio choice from the passed key
origins.

* fix(cli): weigh an own project's provider key only against credentials its feature can use

Review found that the global yield removed a person's own project keys where
the shell credential could not do the job: snapshot's Gemini key next to a
shell OpenRouter key, and a Gemini key that music needs next to a shell
service account.

- Startup keeps the received-project rule only.
- Capture drops a project .env vision key only when the shell or settings
  hold another complete vision credential; the two Vertex parts are one
  credential and are not weighed against each other.
- A key dropped once is not brought back when capture re-reads the same .env,
  so its note prints once.
- In the audio scripts, an own project's Gemini key gives way only to the
  other Gemini API key, which speech and music both accept, and an own
  ElevenLabs key stays for an explicit provider choice.
2026-11-17 07:20:22 +00:00
Michael Wang c4439890cf fix(cli): escape audio and media-use output, pin model files (#8013)
* fix(cli): audio and media-use print control characters from project files as visible escapes

hyperframes audio, audio --read and media-use resolve (including
--candidates) printed file names, element ids, transcript words, model
descriptions and media manifest fields as they were. They now pass
through terminalText, so a control character shows as a visible \xNN
escape. The media-use engine runs without the CLI's packages, so it
carries a small copy of the helper. --json output is unchanged.

* fix(engine): playlist check refuses drive-relative and other colon-prefixed entries

ffmpeg reads an HLS or ffconcat entry with a colon before its first
separator as a URL or a drive, and opens it apart from the list's
folder. The folder check read entries such as C:Videos\a.mp4 or c:x.mp4
as names inside the folder and approved them. It now refuses any entry,
raw or percent-decoded, whose colon comes before its first /, \, ? or #,
as it already refuses absolute and parent-folder paths. http and https
segments are still kept.

* fix(cli): background-removal and Kokoro TTS model files are pinned to a sha256

The u2net_human_seg weights and the Kokoro model and voices files were
downloaded from release URLs and used whatever bytes arrived, and any
cached copy was trusted because it existed. Each file now has a pinned
size and sha256. A cached copy is checked before it is loaded and
downloaded again when it does not match. A download that does not
match is discarded with a message that names the file.

* fix(engine): playlist check reads entries from the folder ffmpeg uses

ffmpeg resolves a list's entries against its path cut at the first ? or
#. A list at proj/h#z/list.m3u8 naming ../h#z/x.ts was judged against
proj/h#z and approved, while ffmpeg opened proj/../h#z/x.ts. Entries are
now judged against the same cut folder. A list in a folder such as
"Take #2" still passes when its entries resolve inside that folder.

* fix(cli): a pinned model's cached copy is checked and removed under the download lock

ensurePinnedFile removed a cached copy that failed its check before the
download lock was taken, so a concurrent run could delete a file another
run had just published. downloadFile now takes a keepExisting check and
runs it under the lock: a copy that passes is kept, one that fails is
removed and downloaded again. The mismatch error now says the file does
not match its expected checksum, and that a retry helps only if the
download was interrupted or corrupted.

* fix(cli): audio escapes each field's line breaks, and media-use escapes recipe and stats output

The audio formatters escaped their output line by line, so a newline
inside a src, warning or transcript still printed as a real line break.
Each output line is now escaped whole with terminalText, which shows a
newline inside a field as \x0a. media-use resolve also escapes its
recipe lines and its --stats lines, which print recipe names, paths and
missed intents.

* fix(cli): media-use error messages show control characters as visible escapes

resolve printed error messages as they were, and some name project or
cache data, such as the known recipe names when a recipe is not found.
Every error: line now passes through terminalText, as the success lines
already do.

* ci: the edit accuracy filter includes the CLI model file check

The CLI's pinned model download now imports whisper/modelFile.ts, so a
change to it must run the edit accuracy bench too.

* test(cli): pinned model tests use private temp folders and rename like downloadFile

The tests wrote fixtures under fixed names in the shared temp folder,
and their download stand-in checked for a file before replacing it.
Each test now works in its own mkdtemp folder, and the stand-in asks
keepExisting directly and renames the part file into place, as
downloadFile does.

* test(cli): the media-use terminalText copy is checked against core's

The media-use engine keeps its own copy of terminalText. A CLI test now
compares the two over U+0000 to U+00A0, so a change to either fails
until both match. keepsDest moves above downloadFile's doc comment,
which belongs to downloadFile.
2026-11-17 07:16:03 +00:00