Commit Graph
7428 Commits
Author SHA1 Message Date
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
Michael Wang e21f56dcad fix(producer): keep the probe stage's media pre-checks linear in page size (#8044)
* 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.
2026-11-17 07:01:38 +00:00
Miguel Ángel d7d416124f fix(studio): colour grading works in a sealed preview (#7999)
* test(studio): colour grading previews and status on a sealed preview

* fix(studio): colour grading reads a sealed preview through the editing port
2026-11-17 07:00:14 +00:00
Michael Wang 06b632017c fix(engine): bound the proxied host pre-check by the download's timeout (#8048)
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.
2026-11-17 06:54:23 +00:00
Miguel Ángel 7b27fbc84a fix(engine): the GPU, host-ceiling and HDR launches keep the sandbox where the host allows it (#8038)
* test(engine): the GPU, host-ceiling and HDR launches keep the sandbox where the host allows it

* fix(engine): the GPU, host-ceiling and HDR launches keep the sandbox where the host allows it

* test(engine): the host-ceiling stub shell runs only where /bin/sh does
2026-11-17 06:49:28 +00:00
Michael Wang 70820b386f fix(studio-server): cache reads never follow a link the project ships (#8039)
* fix(studio-server): cache reads never follow a link the project ships

The waveform and peaks caches, the thumbnail cache, the stored preview
documents and the preview proxy copies all live in folders inside the
project, which its author controls. Their reads opened entries with
link-following calls, so a project could ship a link at a predictable cache
name and have Studio return the file it pointed at.

Each of these reads now goes through readProjectCacheFile or
isProjectCacheFile: the entry must be a plain file, reached with no link
from the project folder down, and is opened without following links.
Anything else is a miss, and the entry is rebuilt.

- Waveform and peaks entries must also parse as an array of numbers.
- A proxy copy, its fast and content index files, and the pieces of a
  chunked copy count only as plain files.
- Stored preview documents carry an HMAC under the user's private preview
  token, so a document the project shipped is never served. Without a
  token, nothing is stored.

* fix(studio-server): the proxy copy lock treats a link at the copy name as not made

The copy lock tested "the copy already exists" with a link-following check,
and the transcoder returned the copy path unchecked when the lock said
another process had made it. A link at the copy name was then served.

- acquireCopyLock takes the caller's "copy made" test; the transcoder
  passes isProjectCacheFile and re-checks the path before returning it.
- Copy index files are written by rename, so a link at an index name is
  replaced instead of written through.
- Chunk pieces are checked from the project folder down, like every other
  cache entry.
- A cache entry with more than one name (a hard link) is a miss.
2026-11-17 06:31:06 +00:00
Michael Wang 5fcce21a64 fix(engine): check proxied download hosts; keep raw GIF downloads private (#8040)
* fix(engine): check proxied download hosts against local DNS; keep raw GIF downloads private

Behind an env proxy (HTTPS_PROXY with NODE_USE_ENV_PROXY=1 or
--use-env-proxy), composition downloads skipped the resolved-address check
and relied on the literal-host check alone. An internal DNS name passed, and
NO_PROXY hosts were dialled directly.

Now the downloader resolves the host on this machine first and refuses it
when any answer is non-public. A name this machine cannot resolve is still
left to the proxy, so proxy-only networks keep working.

Studio's remote GIF prep now picks only URLs whose path ends in .gif,
discards a downloaded body that does not start with a GIF signature, and
the raw downloads folder is no longer served to the page; only the converted
output is.

* fix(cli): read the downloaded GIF's header through a bounded read stream

CodeQL read the openSync call as a temp-file creation. The file sits in the
project's .hyperframes folder and is only read, but a six-byte read stream
does the same check without a file descriptor of our own.
2026-11-17 06:09:42 +00:00
Michael Wang 5b2990fc10 fix(skills): locate.mjs reads the system font in place, not a shared /tmp copy (#8042)
locate.mjs copied a system font to the fixed path /tmp/locate-font.ttf and
trusted any file already there. Another local user could plant that path
first: a crafted font would mislabel the grid strips, a dangling link would
make the copy write through it, and an unreadable file would stop every run.

Pass the system font file to drawtext directly, quoted so a path with a
space parses. With no known font present, drawtext uses its default font.
2026-11-17 06:05:16 +00:00
Miguel Ángel 915021265f fix(studio): caption editing works in a sealed preview (#8002)
* test(studio): caption overlay shows and edits words in a sealed preview

* fix(studio): caption editing reads and moves words through the editing port in a sealed preview

* style(studio): format the caption port change and trim its comments

* fix(studio): keep the caption port change inside its files and under the size checks

* fix(studio): keep late caption frame answers from writing after Studio moves on

A caption detection, nudge or drag still waiting on a sealed preview no longer
writes after its effect is gone, and a frame-reported word transform past the
frame's own write bound is refused instead of stored. Each has a test against
the real editing agent that holds the frame's answer open.

* refactor(studio): move the sealed caption nudge queue next to the frame word helpers

Keeps the caption overlay under the studio file size limit and its comment share at the base. No behaviour change.

* refactor(studio): keep the sealed caption nudge request inside its helper file
2026-11-17 06:02:22 +00:00
zhengqiuyang f89f6d3d4b fix(producer): cap the software encoder to the cores capture leaves free (#8019)
`canEncodeWhileCapturing` started an H.264 export beside the capture workers
whenever `workerCount < cpuCount`, but `appendSoftwareEncoderThreadsArg` gave the
encoder every usable core, so the overlap spawned a full-width x264 pool next to
the capture workers (#7458).

The overlap now reserves the cores capture is using: `softwareEncoderThreads =
max(1, cpuCount - workerCount)` travels through the streaming encoder options to
ffmpeg's `-threads`, while the post-capture encode keeps the old default.
2026-11-17 05:56:12 +00:00
Miguel Ángel 9daa7e876d fix(studio): a sealed preview's reload shows in a fraction of a second, not after 8 s (#8015)
* fix(studio): a sealed preview's reload shows in a fraction of a second, not after 8 s

* fix(studio): the sealed reload's frame sits under the live one, so clicks stay on the live frame

* fix(studio): the sealed reload's frame stays on top but inert, so clicks reach the live frame

Under the live frame (z-index -1) the reload's frame was left unpromoted in a traced run; on top and inert it renders and swaps in, and hit testing skips it, its own frame included.

* refactor(studio): name the sealed reload's style for what it does, not in comments

* fix(studio): the reload code marks a sealed reload's player inert until it is promoted

Player keeps main's shape: the hook that owns the reload sets inert on the hidden frame's player element when its frame arrives and clears it at promotion.

* test(studio): keep the reload-inert test's comment under the line limit
2026-11-17 05:55:20 +00:00
Michael Wang 6115945cf4 fix(skills): run bundled TTS helpers from the skill folder, not the working directory (#8035)
The media-use TTS and captions references ran heygen-tts.mjs and
heygen-voice.mjs as skills/media-use/... paths relative to the working
directory. Agents run these commands from the user's project, so a project
that ships a file at that path would run instead of the bundled helper.

Name the helpers through <SKILL_DIR>, as the rest of media-use does, and add
a skill lint rule that fails when a code block or inline command runs node,
python, bash, sh, tsx or bun on a relative script path. Docs whose commands
run inside a HyperFrames checkout, or only on a checked template kit, opt out
with a marker that states the reason.
2026-11-17 05:52:10 +00:00
terencecho 8a13b2cafa feat(producer): enforce expected output dimensions before capture (#7871) 2026-11-17 05:37:05 +00:00
Miguel Ángel 5f6007ffc4 ci: publish a stable release from the push that merges its release PR (#8020)
* ci: publish a stable release from the push that merges its release PR

* test(ci): read the publish job's own concurrency, where a publish in flight now waits

* ci: a stable release needs another person's approval of its final commit

* ci: only a person's approval counts for a stable release
2026-11-17 05:20:53 +00:00
Michael Wang f5bb3e5519 fix: a received-files record follows Studio renames, moves and deletes, and a nested record can't be moved out of reach (#7989)
* fix(cli): a received folder's record is read wherever Studio moves it

The search for received-files records now walks every folder a render,
preview or publish can load files from, including renders/, dist/, .next/,
coverage/ and Studio's own folders in the project's .hyperframes/. A
received folder moved there by Studio keeps its files received.

Studio's folder delete and move also refuse a folder holding a
received-files record that lists a file outside its own folder, since
that file would stay behind with no record. A received folder whose
record lists only its own files can still be deleted or moved.

* fix(cli): a renamed or moved received file stays listed under its new name

The CLI-hosted Studio now follows every rename, move or delete it
completes in the received-files records, whichever client sent it. A
renamed file, or every file in a moved folder, stays listed under its
new path; a file moved out of a received folder is listed in the
project's own record. Changes are made under the record's lock, and a
record that cannot be changed is left as it was.

The per-file readers used by publish, cloud render, feedback and add now
count every file as received when a record lists a file that is no
longer on disk, since that file may be there under another name. This
matches the local render check. Projects with no record are unaffected.

* fix(cli): received content that leaves the record still counts as received

When a Studio rename, move or delete takes a received file off a listed
path, the sha256 of its content is kept in .hyperframes/received-content.json,
the file and format the desktop app uses; other keys in it are kept. A
file holding the same bytes counts as received for publish, cloud render,
feedback, add and the local render check, so content brought back by undo
or renamed outside Studio stays received. Studio's own backups do not count.

A listed file that is gone from disk now makes only pages, stylesheets,
scripts, SVG and links out of the project count as received, and the
upload warning names the gone file.

The record follows a request spelled in another letter case or Unicode
form by matching the name the disk holds, and waits for the record's lock
without blocking the server. Studio's folder delete and move no longer
refuse a folder whose record lists a file outside it; that file's content
is kept as received instead.

* fix(cli): a folder delete or move keeps what a record inside it lists elsewhere

Before Studio deletes or moves a folder, every file that a received-files
record inside the folder lists outside it is listed in the project's own
record by its path from the project folder. Such a file stays received
after it is edited, and a listed link stays received too. When the
project's record cannot be written, the delete or move is refused.

Received content that cannot be read is never written over, so the
desktop app's keys in it are kept. The warning about a listed file that is
gone now says how to clear it.

* fix(cli): received-content checks skip large non-code files and name a skipped search

A file larger than 16 MB that is not a page, stylesheet, script or SVG is
no longer read to compare its content with received content, so a large
archive is not read on every check. When the project has too many folders
to search for received-files records, the upload warning now says so.

The case-matching publish test now expects the gone-file rule on a disk
that tells letter case apart, and a comment no longer names a file path.

* fix(cli): name a gone received file from the project folder on every system

The gone-file note now names the file from the same project path the
record search starts at. On Windows, a short (8.3) folder name in the
temp path made the two spellings differ, so the note showed a long
relative path instead of the file's name.

Content hashing opens a file once, checks it through that handle and
reads from the same handle, and the received-content file is read before
it is classified, so nothing is checked by path and then used by path.

* fix(cli): received files stay received through undo, saves, and partial folder deletes

An undo, redo or restore lists again every file it writes that holds received
content, and a Studio save lists such a file before it changes it. So a Studio
delete followed by an undo and an edit leaves the file received.

A Studio rename, move or delete now records the received side first, under the
record's lock, and is refused when that fails: the content leaving listed paths
is kept, a renamed file is listed under its new path, and every line of a
record inside a moved or deleted folder is copied into the project's record.
Once the files have moved, only lines whose file was there and whose content
was kept are taken off. Lines at a rename's destination and lines whose file was
already gone stay. The search for records inside the folder has no size limit,
and nothing is locked when nothing is listed.

* fix(cli): unreadable received content counts every file as received

The readers treat a received-content file they cannot read the way they treat
an unreadable received-files record: every file counts as received, and the
local render check names the file it could not read.

A record line that points outside the project is ignored, so a record in a
received folder cannot make the readers look at or report files outside the
project.

* fix(cli): the CLI's own history undo and restore keep received files listed

`hyperframes history undo` and `restore` with no Studio running now list again
every file they write that holds received content, the same way Studio's
history routes do. A delete in Studio, then an undo or restore from the CLI,
then an edit, leaves the file received.

A Studio edit that names its file in the request body, such as a freeze-frame
edit, now lists that file first when it holds received content.
2026-11-17 05:12:31 +00:00
Miguel Ángel b6e1e8dda9 fix(studio-server): a loopback page with no fetch metadata is marked unless the app framed it (#8017)
* test(studio-server): a loopback page with no fetch metadata is marked unless it is the app's own

* fix(studio-server): a loopback page with no fetch metadata is marked unless the app framed it

* test(studio-server): a page marked by its Referer names Referer in Vary

* fix(studio-server): a page marked by its Referer tells caches it varies by Referer
2026-11-17 05:05:41 +00:00
Andy CheighandClaude Opus 5.5 19743ea094 fix(studio): the copied render command carries no composition text a shell can run (#8012)
* fix(studio): the copied render command carries no composition text a shell can run

The Variables panel's "Copy render command" put every variable value inline,
quoted for POSIX shells only. A shared project's author chooses those values,
so in PowerShell, cmd.exe (including npx.cmd's re-parse) or fish a default
such as `x'; calc.exe; '` ran as commands when the command was pasted.

The command is now fixed text: `npx hyperframes render -c <composition>
--variables-file .hyperframes/render-variables.json`. Copying it saves the
previewed values to that file through a new PUT /projects/:id/render-variables
route, which refuses a link standing in for .hyperframes and replaces, rather
than writes through, a link at the file itself. A composition path that is not
one plain word in every shell (letters, digits, `_ . / -`) gets no command.

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

* fix(scripts): the comment checker skips a template nested in a substitution

stripLiterals ended a template literal at the first backtick, including one
that opens a nested template inside `${...}`. On a line such as
`'${value.replace(/'/g, `'\\''`)}'` that left a backtick unmatched, so
scanCLike read the rest of the file as one template and counted none of its
comments. The ratchet then measured VariablesPanel.tsx on main at 1 comment
line instead of 31 and failed any change that removed that line.

A `${...}` is now scanned as code: strings, regexes and templates inside it
are skipped, and its closing brace returns to the outer template.

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

* test(studio-server): read the replaced render-variables record through one no-follow descriptor

The link test checked the record with lstat and then read it by path, two
lookups CodeQL reports as a file-system race. Opening it once with O_NOFOLLOW
fails if a link is still there and reads the file that open checked.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 05:05:28 +00:00
Michael Wang 8239fe4702 fix: the dev Studio's renders follow the received-project rule, and a received project's .env keys never replace the person's own (#8004)
* fix(studio): dev Studio renders apply the received-project rule for outside files

The Vite Studio adapter started every render with files from outside the
project allowed. It now asks the CLI's outsideAssetsAllowed, the same check
the CLI's embedded Studio, hyperframes render and benchmark use. A project
whose received-files record lists code files, or cannot be read, renders
without files from outside the project, and the reason prints with a
[studio] prefix.

The adapter loads the rule from the CLI source through the dev server, as it
already does for background removal. It runs only from a source checkout, so
studio takes no package dependency on the CLI.

* fix(cli): a received project's .env provider key never replaces your own credential

A received project's .env could set OPENROUTER_API_KEY, GEMINI_API_KEY,
GOOGLE_API_KEY or Vertex settings that outranked a vision or Gemini
credential the person set in the shell, so capture, snapshot describe and
media-use speech and music could send content to another account.

After the CLI and capture load a project .env, each provider key it set is
unset when that .env came with a received project (a received-files record
lists it, or a record cannot be read) and the person has their own
credential for a competing provider. One stderr line names the key, the
.env file and the credential used instead.

A person's own project .env keeps its keys and its current precedence, so
an OPENROUTER_API_KEY in a project .env still wins over a Gemini key in the
shell, as the docs describe. Voice needs no change: the person's HeyGen
credential already ranks above ElevenLabs.

* fix(cli,media-use): media-use scripts apply the received .env rule, ElevenLabs included

The media-use audio scripts read the project .env again, so a Gemini key the
CLI had left out came back. They now apply the same rule after loading: a
key from a received project's .env gives way to the person's own credential
for a competing provider. GEMINI_API_KEY and GOOGLE_API_KEY give way to the
person's Gemini key or service account. ELEVENLABS_API_KEY gives way to the
person's HeyGen sign-in, saved key or shell key. A dropped key gets one
stderr line that names the file and the credential used instead.

A received ElevenLabs key that is still used, because the person has no
competing credential, gets one stderr line naming the .env before speech
starts. hyperframes media-use tells the engine which keys it took from a
project .env (HYPERFRAMES_PROJECT_ENV_ORIGINS), so a key the CLI loaded is
not mistaken for the shell's.

When the project's folders are too many to scan for received-files
records, the CLI's note now says the project's origin could not be
checked, instead of calling it a received project.

* refactor(studio): check the shape of the CLI's outside-files rule before calling it

The Vite adapter loads outsideAssetsAllowed from the CLI source at run time.
It now checks that the export is a function and treats only a true result
as allowed, instead of casting the module's export.

* docs(auth): a received project's ElevenLabs key gives way to your HeyGen credential

* test(studio): load the received-project rule before render waits start
2026-11-17 05:04:15 +00:00
James RussoandClaude Opus 5.5 00d03a4122 fix(producer): trusted renders refuse outside-linked compositions unless --include-outside-files (#8024)
* fix(producer): trusted renders refuse outside-linked compositions unless --include-outside-files

A sub-composition or entry file whose real file is outside the project is
inlined into the render page, so its scripts run even though outside .js files
are left out without the flag. The pre-flight now refuses it with a message
naming --include-outside-files.

— Rames

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

* test(cli): read the linked outside scene with --include-outside-files in the received-render parity test

The parity test checks that the render compiler reaches an outside file through a
scene in a linked folder outside the project. Trusted renders now refuse that scene
unless --include-outside-files is passed, so the helper passes it.

— Rames

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 04:58:50 +00:00
Michael Wang 9fae4ffd81 ci(publish): a prerelease tag publishes only to an allow-listed dist-tag (#7963)
The publish job took the npm dist-tag from the pushed tag's suffix and refused
only an exact "latest". A tag such as v1.2.3-LATEST.1, or one with a new suffix,
still named its own dist-tag. The job's channel check now accepts only alpha,
beta, rc, next, canary, hdr, native and desktop, matched exactly.
2026-11-17 04:35:57 +00:00
Michael Wang 0ad24ba83f test(cli): a received project's preview still converts a photo inside it (#8021)
Pins that preview image prep, with outside files refused, still
converts an in-project HEIC. It runs on a real folder, so the Windows
CI lanes check it under Windows path rules.
2026-11-17 04:35:31 +00:00
James RussoandClaude Opus 5.5 5f6995fe77 fix(studio-server): audio decodes are bounded, stop when nobody waits, and their cache is capped (#7991)
* fix(studio-server): audio decodes are bounded, stop when nobody waits, and their cache is capped

The waveform and peaks routes each started a full-file ffmpeg decode per request, with no limit on how many ran
at once, no sharing on the waveform route, and no way to stop one after its request went away. Their cache
folder also grew without end.

- Both routes now decode through one shared queue of 4 slots, one decode per cache entry, shared by every
  request that wants it. When the last request waiting on a decode leaves, its ffmpeg is killed (or it leaves
  the queue).
- `.waveform-cache` keeps at most 500 entries; a write past that drops the oldest.

— Rames

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

* fix(studio-server): trim comments to the package's comment share

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

* chore(studio-server): raise the packed size budget for the audio decode limits

The bounded decode queue, the abort when nobody waits and the capped cache
add about 485 bytes to the packed tarball. Main had already reached 178,489
bytes against a 178,000 budget, so together they pass the 1% tolerance
(179,877 bytes). The new budget is the measured size plus the script's 5%
headroom.

— Rames

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

* fix(studio-server): waveform decodes keep a fixed-size peak buffer, time out, and the cache is byte-capped LRU

- decodeAudioPeaks streams samples into a 65536-entry max-abs buffer that merges
  neighbouring runs when full, instead of buffering and concatenating the whole decode.
- A shared decode is stopped after 10 minutes and its slot freed.
- .waveform-cache is capped at 256 MB as well as 500 entries; a cache hit marks its
  entry used, so eviction drops the least recently used.

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

* chore(studio-server): raise the unpacked size budget after rebasing onto main

Measured with pnpm pack after the rebase: 697160 unpacked bytes, over the
690000 budget by more than 1%. The new budget is the measured size plus 5%.

— Rames

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 04:34:40 +00:00
Miguel Ángel c8235f1235 fix(studio): a modal opened from a popover or menu closes first on Escape (#7976) 2026-11-17 04:24:56 +00:00
James RussoandClaude Opus 5.5 fb5f9e52ce fix(engine): GPU probe, HDR capture and host-ceiling probe keep a required sandbox (#8018)
* fix(engine): GPU probe, HDR capture and host-ceiling probe keep a required sandbox

These three launches always passed --no-sandbox, even where HYPERFRAMES_CHROME_SANDBOX=1
says Chrome must keep its sandbox. They now drop it in that case and behave as before
otherwise.

— Rames

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

* fix(engine): HDR capture passes --no-zygote only alongside --no-sandbox

Chrome exits at launch ("Zygote cannot be disabled if sandbox is enabled") when
--no-zygote is passed with its sandbox on, so HDR capture under
HYPERFRAMES_CHROME_SANDBOX=1 needs to drop it together with --no-sandbox.

— Rames

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 04:12:56 +00:00
Michael Wang e58fb3249b fix(cli): render --docker applies the received-project rule on the host (#8016)
* fix(cli): render --docker applies the received-files rule decided on the host

The container mounts only the project, so it cannot see a received-files record
in a folder above it. The host now makes that check for single and batch Docker
renders and passes --refuse-outside-files into the container when it refuses
outside files.

* fix(cli): a Docker batch decides the received-files rule once

A batch render now applies the received-files rule once and hands the result to
every row, so it warns once instead of once per row. A test now drives renderDocker
itself and checks the docker run arguments it starts.
2026-11-17 04:10:20 +00:00
Miguel Ángel fee03bfbe1 fix(studio): an undo on a sealed preview shows in place, not after a reload (#8009)
* fix(studio): an undo on a sealed preview shows in place, not after a reload

* fix(studio): split the sealed restore checks, and the inspector budget takes the new kind
2026-11-17 03:55:09 +00:00
James RussoandClaude Opus 5.5 22b615f1a7 fix(cli): files from outside the project are uploaded only once approved (#7995)
* fix(cli): files from outside the project are uploaded only once approved

publish, cloud render and feedback --file-issue copied every image, video, audio,
font and CSS file a composition named from outside the project folder, and every
project file that links outside it, and only listed them. A project that came from
someone else could pull a file from anywhere on the uploader's disk into an upload.

Now each such file needs approval. In a terminal the command lists them and asks,
defaulting to no; a yes is remembered per project in the CLI's config folder
(~/.hyperframes/outside-files.json), never in the project. --yes, --json, --dry-run
and unattended runs leave them out with a warning naming each file and saying how
to include it. --include-outside-files uploads them without asking.

— Rames

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

* test(cli): check the approvals file mode only where files have POSIX modes

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 03:34:57 +00:00
Michael Wang 346579b6b9 fix(cli): compare and keyframes --shot serve only the files a bare HTML file names (#8006)
* fix(cli): compare and keyframes --shot serve only the files a bare HTML file names

A bare .html file given to compare or keyframes --shot is staged with
only the files its markup, stylesheets and sub-compositions name inside
its own folder, and only types a composition loads. Private files stay
out. A scene its project's index.html mounts is staged from the
project, so it keeps its shell.

* fix(cli): stage root-relative names, string imports, SVG links and grading tables

A bare HTML file's staging now also copies the files named by a
leading-slash URL (resolved against the staged folder), a string-form
CSS @import, an SVG xlink:href and the LUT of data-color-grading.
compare and keyframes --shot print one line naming any file they left
out. The CLI docs describe the single-file rule.
2026-11-17 03:27:12 +00:00
Michael Wang f880693cf1 fix: preview image prep reads no HEIC or GIF outside the project unless render would (#8001)
* fix: preview image prep reads no HEIC or GIF outside the project unless render would

Image prep now keeps sources inside the project unless the caller
opts in with allowOutsideFiles. Studio preview opts in only when a
local render of the project would bring in outside files, so a
received project's preview converts nothing from outside it.

* fix: keep comment share flat; Windows share test takes the trusted path

The Windows path test checks that image prep never looks at a share.
It now passes allowOutsideFiles, so a local path is still looked up on
the widest path even though the fake project folder does not exist.

* test(cli): the Windows share preview test takes the trusted outside-file path

The fake C:\project folder does not exist on the test host, so the
received-project check fails closed and preview would contain every
source. The test mocks that check to allow outside files, so a local
path is still looked up on the widest path.
2026-11-17 03:15:26 +00:00
Vance IngallsandClaude Sonnet 5.5 38aaad1b20 fix(engine): the playlist folder check reads colon, query and fragment names as ffmpeg resolves them (#8014)
ffmpeg resolves playlist entries with URL rules, not Node path rules. An entry
with a colon before its first slash, backslash, query or fragment mark, and an
entry resolved from a folder whose name holds a query or fragment mark, now
count as leaving the folder, so the check no longer approves a list that ffmpeg
opens somewhere else. Entries that are http(s) URLs are unchanged.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 19:28:34 -08:00
James RussoandClaude Opus 5.5 bffe8d5985 fix(studio-server): bound preview stills and keep proxy work to the Studio's own pages (#8007)
* fix(studio-server): bound preview stills and keep proxy work to the Studio's own pages

- Queue at most 16 stills behind the 4 being made; past that, answer 503 with Retry-After.
- Refuse a still past the end of the source before starting ffmpeg (404).
- Refuse a ?hf-proxy request on a plain preview path when another site asks for it. The
  Studio's own opaque frames already load through the frame-token path, and sandboxed
  thumbnail captures now do too.

— Rames

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

* chore(studio-server): raise packed size budget for the still-queue and cross-site checks

The bounded still queue, the past-end refusal and the cross-site proxy
check add about 2.2 KB to the packed studio-server (180252 bytes in CI).

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 03:09:21 +00:00
James RussoandClaude Opus 5.5 581a43bb6a fix(producer): local renders leave out scripts from outside the project unless included (#7998)
A local render brought in .js and .mjs files that markup or a project link
reached outside the project, so an imported composition could copy a script
from elsewhere on disk into the page it runs and read it. Images, video,
audio, fonts and CSS still come in. Scripts are left out with a warning that
names each one and how to include it: move it into the project, or pass the
new --include-outside-files to hyperframes render.

The policy covers the compiler's outside-asset copy, the file server's
linked files and the distributed plan's project copy.

— Rames

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 02:38:22 +00:00
Michael Wang 02c1fb48e7 fix(cli): only the Studio's own origin may frame the Studio page (#8000)
The CLI Studio page now sends frame-ancestors 'self' and
X-Frame-Options SAMEORIGIN, as present and the engine file servers
already do. This covers the normal page and the missing-bundle page.
2026-11-17 02:37:32 +00:00
Miguel Ángel a6dd840eb1 chore: release v0.9.60 (#7994) 2026-11-17 01:59:35 +00:00
Michael Wang d53b6059bd fix(producer): linear probe media check, and renders refuse composition HTML over 16 MB (#7992)
* fix(producer): linear probe media check, and renders refuse composition HTML over 8 MB

The probe stage tested every inline script body with /<(?:video|audio)\b[^>]*>/i.
A body full of unclosed <video openers made that test take quadratic time on the
render server's main thread. hasClosedMediaTag finds the first opener and then
looks for one '>' after it, which gives the same answer in linear time.

Compile and probe work on a page also runs on the main thread, and its cost grows
with the page's size. Entry and sub-composition HTML files over 8 MB are now
refused before they are read, with the COMPOSITION_TOO_LARGE error code.

* fix(producer): raise the composition HTML limit to 16 MB

The largest real render pages are about 7 MB of HTML, so 8 MB left too little room.
16 MB is more than twice that, and still bounds one file's compile to about 12 s
on dense markup.
2026-11-17 01:40:57 +00:00
Michael Wang 32fe10a8b3 fix(studio-server): history writes and claims follow Studio's write rule (#7988)
History undo, restore and Cmd+Z now leave alone every file that Studio's
file routes refuse to write. This covers tool-trusted, private, hidden and
node_modules paths, and scripts the project's package.json runs. Cmd+Z
passes over an edit that only changed such files. A claim no longer takes
such a file's pending change.

A claim's `overwrote` version now counts only when the server itself saw
that version at that path. A version stored for another file can no longer
become a file's earlier state.

The write rule also refuses more files that tools and agents load on
their own: opencode and crush settings, compose override files,
Dockerfile.* and Containerfile, every lefthook spelling, mise, nodemon,
devbox, wrangler, vercel and netlify settings, *.config.jsonc,
tsconfig.*.json, Taskfile.dist, simple-git-hooks, Ruby build files, and
.nix and .fish scripts.
2026-11-17 00:48:03 +00:00
Miguel Ángel 5979991d5f fix(cli): error boxes and command failure lines print control characters as visible escapes (#7987)
* test(cli): error boxes and diff's failure line print control characters as escapes

* fix(cli): error boxes and command failure lines print control characters as visible escapes

* style(cli): format the escaped error lines
2026-11-17 00:31:19 +00:00
Miguel Ángel 028ab75535 chore: release v0.9.59 (#7973) v0.9.59 2026-11-17 00:10:38 +00:00
Miguel Ángel 602956a662 test(inspector): the no-browser answer is checked on an in-process server (#7962) 2026-11-17 00:06:17 +00:00