compositionSrcsIn read template.content at every nesting level. linkedom
builds that fragment by deep-cloning the template's children, so a file of
nested templates cost work and memory that grew with the square of the
depth. The scan now walks the parsed tree once and tracks whether each
element sits inside a template.
A Studio delete took a received page's line off the record, and files
created afterwards were not followed. A script in the preview could
delete every received page and create it again with new bytes, so the
project no longer counted as received and outside files were read.
A deleted page, stylesheet or script now stays listed, so whatever is
written in its place counts as received. A received page renamed to a
media name keeps its old line too. Deleted or renamed media, fonts and
images still drop off, so a media-only project keeps working.
* 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
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.
* 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>
* 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
* 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`.
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.
`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.
* 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
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>
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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>
* 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
* 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
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>
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>
- 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>
* 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>
* 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
* 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
* 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.
* 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
* 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
* 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.
* 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
* 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
* 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.
* 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.
* fix(producer): keep the probe stage's media pre-checks linear in page size
hasRuntimeMediaChanges now collects the page's media elements in one walk,
answers id lookups from a set, de-duplicates selectors and checks them only
against media elements. Past a fixed number of checks it lets the browser
probe decide.
hasVariableBoundMedia parses each element's variable attributes once per scan
and shares one step budget across the ancestor walks. Past the budget it gives
the conservative answer and probes in the browser.
* fix(producer): bound the media-source scan by selector length, and walk every top-level element
The selector budget now counts selector characters times media elements,
since each match parses the selector again. A selector with a sibling
combinator goes to the browser probe. The media walk starts from every
top-level element, so a page written without the html tag is still scanned.
Tests now count lookups and JSON parses instead of timing them.
The local lookup that runs before a proxied download took no abort signal,
so a stalled resolver held the request past its timeout. It now settles
when the request's signal aborts.
Its pass-through list now matches what dns.lookup reports: ENOTFOUND,
EAI_AGAIN and EAI_FAIL go to the proxy; ENODATA and ESERVFAIL, which the
lookup never returns, are gone.
Adds a test that runs the real GIF step on a source saved in Studio's
private downloads folder.