* 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
* 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.
* 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
* 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>
* 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
* 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>
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.
* 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>
* 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>
* 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.
* 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
* 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>
* 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.
* 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.
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>
* 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>
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>
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.
* 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.
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.
* 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
* fix(cli): transcribe replaces a link at its output names instead of writing through it
whisper-cli now writes its JSON in a private temp folder, and the CLI puts
transcript.json in place by rename. The HeyGen engine, the SRT/VTT caption
file and the caption script patch also write by rename. A link planted at
transcript.json, transcript.srt or transcript.vtt is replaced by a regular
file, and the file it pointed to is left unchanged.
* test(cli): prove the link was replaced from file contents, not lstat
CodeQL reads an lstat followed by a read of the same path as a race. The
outside file staying unchanged while the output name holds the new
content already shows the link was replaced.
* test(cli): make a caption write fail the same way on every OS
A dangling link through a file was refused on POSIX but replaced on
Windows, where access() on it reports ENOENT and the rename takes its
place. Both are safe, so the failure-message tests now use a caption
name the disk accepts but whose temp sibling is too long.
* fix(cli): the credit limit counts no logged row below zero and resumes only keys this account sent
A job log row whose credits are negative or not finite now holds nothing,
so no row can lower the total spent against the limit. A logged job key
skips the limit check only when this account sent it before, as noted in
a per-account record in the config folder. A logged key it never sent is
priced as a new call, without the credits the log gives that key. Applied
to both copies of credit-limit.mjs.
* fix(cli): publish's prompt names the existing project it updates and says its visibility is kept
When the publish targets an existing project (an --update id, the folder's
.hyperframes/project.json, or this machine's earlier publish of the
folder), the confirmation now names that project and says it keeps its
current visibility, which may be public, instead of promising a private
upload. The id is shown as printable text only.
* docs(cli): credit-limit says a logged row never counts below zero
The earlier commit said no row can lower the total. That is not so: a
later row for the same key with credits 0 sets that key to zero, which is
how a refused call gives back its reservation and how a charge below the
estimate replaces it. What holds is that no row counts below zero.
* fix(cli): sent job keys are noted per account and project folder, privately and capped
A logged key now resumes unchecked only when this account sent it for the
same project folder, so a key sent for one project cannot skip the limit
in another. The record keeps its newest 10,000 keys, and the config
folder and key files are created readable by their owner only.
* fix(cli): publish's prompt names the existing project in every variant
Every prompt variant, --public included, now names the existing project a
publish would update. It says the update happens only when the person is
signed in and can access that project, and that otherwise a new project
is created, which is what a signed-out publish does.
* fix(cli): the credit limit reads this account's spending from its own ledger
Each account now keeps, in its config folder, a ledger of what its jobs in
each project folder hold: every charge, reservation and refund the CLI
logs is noted there too. The limit check counts this account's keys at
the ledger's value and ignores the project log's rows for them, so a row
a sync or a pull adds cannot lower them. Any other key in the project log
counts at the most it has been seen to hold, never less, and never lets a
call skip the check. This replaces the sent-key record; the ledger keeps
its newest 10,000 lines and is readable by its owner only.
* fix(cli): publish reads the sign-in before asking, so its prompt says what will happen
The credential is now read, and --update or --space without a login is
refused, before the confirmation prompt. The prompt names an existing
target project only for a login, which is the only case that updates it
in place; signed out or on an API key, the prompt describes the new
private upload that actually happens.
* fix(cli): creditsSpent skips a malformed or null job log line
One junk line in .hyperframes/heygen-jobs.jsonl no longer blocks every
priced call in the project; the reader skips it, as the account ledger
reader does. Applied to both copies of credit-limit.mjs.
* fix(cli): the credit limit refuses a paid call when it can't tell which account is signed in
Under a credit limit, a call whose signed-in account can't be named is
refused before anything is sent, since this account's ledger can't be
read or written then. With no limit set, nothing changes.
The ledger is trimmed through a temp file and a rename, and the project
being checked keeps its last line for every key it holds. A refusal that
counts credits from job log rows no longer in the project says so and
names the ledger file. The ledger scope notes that a moved or renamed
folder starts a new ledger. The private-mode check in the ledger test is
skipped on Windows, which has no POSIX modes.
* fix(cli): cache installs only use folders the current user owns
Code the CLI downloads or builds into its cache (Chrome, the TTS script,
audio helpers, whisper.cpp, OpenCV, the Lambda handler, optional packages)
now goes into folders created by the current user with owner-only write,
and each installed file is checked again before it is returned.
- A cache root that other accounts can add entries to, sticky or not, is
no longer used for code; the per-user cache is used instead.
- The ownership check reads links rather than following them, and a link
that leads out of the cache root is not trusted.
* fix(cli): validate cache ancestry before filesystem side effects
* fix(core): check links before parent path segments
* fix(cli): validate cached libraries and clarify private parent requirements
* fix(cli): use the shared staging directory helper for Apple builds
The lambda commands read the bucket and state machine from
.hyperframes/lambda-stack-<name>.json, which arrives with any project
someone sends. A file naming another account's bucket made render,
render-batch and sites create upload the project there.
- renderToLambda pins ExpectedBucketOwner to the state machine ARN's
account on every S3 request; deploySite takes expectedBucketOwner,
which sites create and render-batch pass.
- The state file is read only as a plain file in a real .hyperframes
folder, and its bucket, ARN, region and other fields are checked.
* fix: hidden and credential files stay out of Studio, history and lint
- The private-file rule now refuses every hidden file or folder in a project,
except Studio's own files, the root .media folder, and pictures, video,
sound, fonts, stylesheets and scripts a page can load. It also refuses
Terraform state and variable files and more key-store types.
- Project history never tracks, lists or serves a private file, and the blob
route serves only bytes a listed file had, so copies kept by an older
version are no longer readable.
- Lint reads a linked stylesheet, script, import map or sub-composition only
when the private-file rule allows it and the file is the kind its link
names, so no finding quotes a private file.
- The rule moves to @hyperframes/parsers/private-path so lint can use it;
@hyperframes/core/safe-path re-exports it unchanged.
* fix(studio-server): a refused history blob reads as not a history blob
* fix(core): keep realpath in core, so its file-system callers and tests see one module
* fix(cli): text from projects, pages and registries prints control characters as visible escapes
catch-up, capture, figma component, timeline, keyframes, layout/inspect,
catalog and add printed strings that come from a project folder, a captured
web page or a registry manifest straight to the terminal. A crafted value
could move the cursor, rewrite earlier lines, set the window title or write
the clipboard. Those values now go through terminalText(), the same helper
lint, check and snapshot already use. The CLI's own colours stay, and --json
output is unchanged.
layout/inspect also keeps only well-formed issues with a known code from the
page, the way check already does, by reusing check's parseLayoutIssue. The
browser-script loader moves to its own module so layout and check can share
the parser without importing each other.
* test(cli): catch-up test names files with control characters only where the OS allows it
* fix(cli): import terminalText from core after main moved it
* fix(cli): escape layout banner and failure, top-level errors and installed paths; keep line breaks
* fix(core): a page marked for another site gives that site only playback
The runtime control bridge trusted window.parent alone. In a document the
preview server marked as framed by another site, that parent is the other
site, so it could turn on pick mode, flash elements, set runtime data and
colour grading, and it received the timeline, diagnostics and picked
elements, which describe the composition.
In a marked page the bridge now takes only playback controls (play, pause,
seek, volume, mute, rate) and posts only the ready, state and stage-size
messages. Pages served to their own site are unchanged.
* fix(core): keep the bridge's handler lookup in the shape code scanning accepts
* fix(studio-server): no write route touches files other tools run or trust
A composition previewed in Studio runs same-origin with the API, and the write rule
refused only private paths, node_modules and hidden names. Its script could create,
overwrite, rename or delete package.json, lock files, agent instruction files and
scripts, which a package manager, build tool or coding agent then runs with the
developer's rights.
Core now names these files in one predicate, toolTrustedFileKind, read in every
spelling a case-insensitive file system or Windows opens. Studio's write rule and the
registry installer's target rule both use it, so every write route (PUT, POST, PATCH,
DELETE, upload, duplicate-file, file-mutations and gsap-mutations) refuses such a
target. Deleting or moving a folder that holds one is refused too. Ordinary
composition, stylesheet, script-asset and media writes still succeed.
* fix(core): fold look-alike letters before matching files other tools trust
A case-insensitive macOS volume opens "AGENTſ.md" (long s) as AGENTS.md
and "Makefile" (fi ligature) as Makefile, but lower-casing alone does not
map either letter. Project path segments now fold names the way such a
volume does: NFKC, upper-then-lower case, and invisible characters
dropped. Every rule built on the segments gets the fold.
Also:
- name JSON, YAML and TOML tool config, compose files, turbo.json,
nx.json, pyproject.toml and gulp or grunt files
- treat a ~N name as a short name only when it has the 8.3 shape and an
extension a trusted file's could shorten to, so take~2.mp4 stays
writable
- refuse to delete or move a folder holding node_modules or .git, walking
it without the listing's ignore rules
- report an upload refused by the write rule in `skipped`
* feat(cli): diff --hide scores a project's layer by what it adds
A project folder is captured a second time with the layer hidden (a clone, so its
fonts and sub-compositions stay). Where the captures differ is the layer's footprint;
over it, benefit = 1 - MAE(original, with) / MAE(original, without), and the
original's copy of the layer is fitted by position (+-40 px) and size (80-120%)
into an instruction such as "move down 12 px". Moments where leaving the layer out
already matches the original are not scored. Reported in the result's `layer`;
`pass` is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): diff --hide scores a layer over most of the frame without running out of stack
The footprint's box came from Math.min(...pixels), which throws RangeError past about
150k pixels (a 500x300 card at 1080p), aborting the whole diff. The box is now one loop,
and the position/size fit reads an evenly strided sample of at most 20k footprint
pixels; benefit still reads all of them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(lint): run Studio and producer lint off the host's own thread
A composition that sends the linter's parser into a runaway froze or
crashed the long-lived hosts that lint it in their own process.
CLI Studio's single-page lint now runs in a child process with a heap
cap and a 15 s limit. Producer /lint (runHyperframeLint) runs on a
worker thread with the same limits. A page that times out, runs out of
memory, or whose child or thread ends without an answer gets one
lint_aborted error finding and is never linted in the host process.
Studio's project lint keeps its timeout and gains a heap cap.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(producer): cap concurrent /lint workers at two
Each lint worker can hold up to 512 MB, so parallel /lint requests
multiplied that without bound. At most two run at once; the rest wait
in order, and a request still waiting when its own 15 s runs out gets
the lint_aborted result.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(producer): probe sub-composition media defaults
Sub-composition defaults declared on <html> disappear from the DOM
during inlining. The browser-probe gate then misses data-var-src
bindings, causing renders to use the authored placeholder source.
Pass the inliner's variablesByComp table through CompiledComposition
and consult the nearest composition scope when checking media bindings.
Give anonymous mounts distinct runtime scopes and reserve IDs as
nested mounts are processed, preserving each instance's variable values.
Add regression coverage for declared defaults, repeated mounts,
nested scopes, and named/anonymous mount collisions.
Fixes#7505
* fix(core): keep anonymous hosts unnamed, key their variables by the authored id
The previous commit made an anonymous mount claim its sub-composition's id on
the host element, which changed the DOM contract the runtime mount path and
the `missing-host-comp-id` regression golden pin: the compile paths put the
host's start/duration on the composition while the mount path kept them on an
unnamed timed element, so the producer parity test and the regression shard
failed on the first CI run.
Restore the contract: an anonymous host carries no composition id and its
flattened wrapper keeps the authored one. For #7505 that wrapper is already
the scope the probe gate (and `variableScope.ts`) resolves through, so the
inliner now keys an anonymous mount's merged defaults by the authored id
instead of skipping them. A named mount of the same file shares that scope;
its explicit instance values win regardless of inlining order, which the
replacement unit test pins in both orders. The id-reservation machinery for
claimed ids goes with the claim.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* fix(cli): validate and keyframes print project text with control characters as visible escapes
* test(cli): the CSS case prints a payload the declaration split keeps whole
* fix(cli): escape project-supplied object keys too, so keyframes prints tween property names safely
When an <audio> clip's source failed to load (a 404, a format Chrome
can't play), the slot-fit audit put it with the clips whose metadata
was still loading and told the person to re-run with a longer --timeout,
next to the http_error for the same file. The audit's probe already
stops waiting on the error, so the timeout was never the cause. Record
whether the element or its probe errored, and report those clips as
failed to load, without the timeout advice.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
citty's help appends "(Default: <value>)" to every arg whose `default` is
set, and 22 descriptions also spelled the default out, so `--help` read
"(default: 5) (Default: 5)". Drop the hand-written copies, reword the
lint-verbose and `measure extract --audio` flags whose "(default: a
one-line summary)" sat next to "(Default: false)", and add a test that
fails when a description with "(default:" has a `default` too.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): render --json gives each missing tool, a held slot and an old Node its own code
Every failed `render --json` answered with `error.code: "runtime_error"`, so a
script could only tell a missing FFmpeg from a busy render slot by matching the
human message. A CliRuntimeError now carries a code, as CliUsageError does, and
the envelope reports it: chrome_not_found, ffmpeg_not_found, ffprobe_not_found,
render_locked. A Node older than 22 prints the envelope too
(node_version_unsupported) when the run asked for --json. Other failures keep
runtime_error.
Refs #7408
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): give the bin entry test's runtimeVersion stub the new JSON export
bin/hyperframes.mjs now imports runtimeVersionJson, so the stub dist file
binEntry.test.ts writes must export it too, or the bin fails to load.
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
vite.config.ts imported createFsAdapter from @hyperframes/sdk/adapters/fs.
Vite leaves a bare import in a config file to Node, and that export points at
src/adapters/fs.ts, so Node had to load a .ts file itself. Node only does
that without a flag from 22.18, and on 22.0 to 22.17 build, dev and test all
stopped with ERR_UNKNOWN_FILE_EXTENSION, which also failed the last step of
the root build.
The config now imports the adapter by its relative source path, which Vite
bundles with the config on every Node version.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
The Contrast section printed every finding with the error mark, so a
failure seen at a single sample (a warning) read as "✗ ... 0 error(s),
1 warning(s)". It now uses the same severity icon as the other sections.
A finding on an element without an id is named by an nth-of-type path,
which does not say which text failed. The line now quotes the text the
audit judged, as `validate` already does.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(core): a clip the preview lets go of stays unloaded in Firefox
Releasing a clip dropped its src, called load() and set the src again.
Firefox treats preload="none" as "metadata" while an explicit load() is
pending, so every release fetched the clip's metadata and first frame. The
runtime then saw a far clip loading and released it again, in a loop: about
20,700 media requests over one 2:16 film, with 2-4 s stalls at cuts.
Setting src already runs the media load algorithm, which ends the fetch, so
the release now sets it again without load(). Chrome and Safari behave as
before: Blink clears its ignore-preload-none flag when src is set, and
WebKit's src set cancels the prepareToPlay that load() queued.
To reproduce: in Firefox, give a <video> with a src preload="none", then call
removeAttribute("src"), load() and setAttribute("src", src) in one task. It
loads to readyState 4; with the src set in a later task it stays at 0.
* fix(player): a film cut from one long recording plays through in Chrome and Firefox
A film whose clips are cut from one or two long recordings froze a few
seconds in, in Chrome and Firefox. Both keep a paused clip's request open
with its unread bytes, and every request to one host shares one HTTP/2 or
HTTP/3 connection window. With every clip of the file loading at parse, those
idle streams fill the window, and the request for the clip coming up is never
answered.
The player's frame now holds clips back on every engine, as it already did on
WebKit: each file keeps the clip on screen and the next one loading, and
frees the rest. The player also names its frame, because a composition in an
opaque sandbox cannot read frameElement to find the player's mark.
To reproduce: play a film of 37 clips cut from a 363 MB and a 180 MB .mov
served over HTTP/3 in <hyperframes-player>. On main it stops at 0:17 in
Chrome and at 0:09 in Firefox and never recovers.
* chore(player): raise the packed size budget for the frame name
Naming the player's frame adds 44 bytes to the packed player (158,706 to
158,750 bytes with pnpm 10.17.1). main was already 10 bytes under the 1%
tolerance of its 157,145-byte budget, so any growth fails the check. The
budget moves to 5% above the new measured size, as the check suggests.
* fix(core): seeking in the player stays as it was in Chrome and Firefox
Holding clips back in every player frame also moved Chrome and Firefox
player frames onto Studio's paused-seek path, which keeps the old picture
until every clip on screen has its new frame. In the player's scrub
benchmark the inline p95 rose from about 1.0 s on main to 1.9 s in CI,
and a seek could miss the benchmark's 1 s limit. In Firefox a paused seek
to a clip the player had let go showed no frame for about 5 s, because the
clip was released again each time it loaded.
Chrome and Firefox player frames now hold clips back and seek as they did
on main. Studio and Safari player frames keep the path they already had.
The button puts the whole player, controls included, in fullscreen and follows every
fullscreen change. Set disable-fullscreen to hide it.
It raises the player's package size budget. With pnpm 10.17.1, main packs to 158,705 bytes
(544,891 unpacked) and this branch to 160,137 (549,402).
* fix(engine): video warnings show control characters in the src as visible escapes
The missing-source and opaque-alpha warnings pass the authored src, and the path
built from it, through terminalText before writing them to stderr.
* fix(cli): snapshot never probes or decodes a private project file for a page video
projectLocalFile applies the same private-file rule as the render readers, judged as written
and with links resolved, so held-video probes and frame injection skip those files. Studio's
own prepared-assets and requests folders still resolve.
* fix(parsers,engine): media inputs never select a text-art demuxer
The media format allowlist leaves out tty, bin, xbin, idf and adf, so ffmpeg and ffprobe
cannot draw a text file as a video frame, whether or not ffprobe is installed. ffprobe's
refusal of one of these formats still reports the source as a text file.
A link inside the project whose target is outside it is still read by snapshot: links a
person puts in their own project are accepted, imported projects cannot carry links, and
render reads them the same way.
* fix(cli): registry warnings show control characters as visible escapes
A project's hyperframes.json can name the registry, so item names and deprecation text
from it pass through terminalText before the studio install, remote template and
item-loading warnings write them to stderr.
* fix(cli): failed render and frame read messages escape control characters
The render failure box escapes each line of the message, keeping its line breaks, and
snapshot's frame read errors escape the path and the ffmpeg or ffprobe text they quote.
* test(cli): probe a missing path with control characters instead of creating it
Windows cannot create a file with those characters in its name; the failed probe's
message still carries the path.