Commit Graph
7401 Commits
Author SHA1 Message Date
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
Michael Wang 6f81d5481d test(inspector): give the HTTP contract tests time for their server start-ups (#7984) 2026-11-16 23:38:43 +00:00
Michael Wang a694ae477d fix(cli): transcribe replaces a link at its output names instead of writing through it (#7982)
* 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.
2026-11-16 23:37:37 +00:00
Michael Wang 7623f4fa12 fix(cli): a received project's job log can't lower the credit limit, and publish names the project it updates (#7970)
* 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.
2026-11-16 23:33:53 +00:00
Xuanru Li ca25558083 fix(cli): enforce private cache install paths (#7981)
* 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
2026-11-16 23:28:26 +00:00
Michael Wang 1463158a4b fix(lambda): uploads go only to a bucket the state machine's account owns (#7983)
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.
2026-11-16 23:17:54 +00:00
Michael Wang c68c78445d fix: hidden and credential files stay out of Studio, history and lint (#7979)
* 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
2026-11-16 23:15:31 +00:00
Michael Wang 6f88be3941 fix(cli): escape control characters in project, page and registry text (#7913)
* 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
2026-11-16 23:11:33 +00:00
Michael Wang c4d607c7f8 fix(core): a page marked for another site gives that site only playback (#7980)
* 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
2026-11-16 22:53:30 +00:00
Miguel Ángel 33e1a36a39 revert(player): an app embedding the preview re-reads it after a script edit again (#7795) (#7978)
This reverts commit 42508c1ef1.
2026-11-16 21:54:40 +00:00
Xuanru Li 45ff3526c0 ci(mcp): run the MCP registry publish in the mcp-registry environment (#7966) 2026-11-16 21:54:12 +00:00
Michael Wang 2a28e43685 fix(studio-server): no write route touches files other tools run or trust (#7964)
* 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`
2026-11-16 21:30:32 +00:00
Miguel Ángel e368db138f fix(cli): the skills update check never reads a project's git config (#7975) 2026-11-16 20:34:39 +00:00
WaterrrForeverandClaude Opus 5.5 e6d5c699b1 feat(cli): diff --hide scores a project's layer by what it adds (#7972)
* 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>
2026-11-16 19:55:15 +00:00
Vance IngallsandClaude Sonnet 5.5 778a005641 fix(lint): run Studio and producer lint off the host's own thread (#7974)
* 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>
2026-11-16 12:10:39 -08:00
Ice colaandClaude Fable 5.1 95e4e7f880 fix(producer): probe sub-composition media defaults (#7550)
* 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>
2026-11-16 18:58:41 +00:00
James RussoandClaude Opus 5.5 af873924db docs(changelog): weekly digest 2026-11-09-2026-11-16 (#7969)
* docs(changelog): weekly digest 2026-11-09-2026-11-16

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

* docs(changelog): embed weekly video for 2026-11-09-2026-11-16

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 18:58:37 +00:00
Miguel Ángel a707e47379 docs(publish): say publishing waits for no approval and only admins push prerelease tags (#7960) 2026-11-16 18:37:38 +00:00
Miguel Ángel ce8d55d302 fix(cli): validate and keyframes print project text with control characters as visible escapes (#7958)
* 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
2026-11-16 18:37:36 +00:00
wonjangandClaude Opus 5.5 5e0c3db128 fix(check): a media source that failed to load is not reported as a timeout (#7954)
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>
2026-11-16 18:16:26 +00:00
wonjangandClaude Opus 5.5 d7f8d77fb4 fix(cli): help shows each option's default once (#7953)
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>
2026-11-16 18:16:19 +00:00
wonjangandClaude Fable 5.2 47d007e5b0 fix(cli): render --json gives each missing tool, a held slot and an old Node its own code (#7842)
* 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>
2026-11-16 18:16:11 +00:00
wonjangandClaude Fable 5.2 77e675574f fix(ci): a catalog publish run that main overtook ends clean instead of failing (#7816)
Every push to main starts its own Publish catalog run, so a run that finds
main ahead of its checkout has nothing left to do. It used to throw, which
marked 6 of the last 100 main runs red with nothing to fix.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 18:16:05 +00:00
wonjangandClaude Fable 5.2 c7876f3330 fix(sdk-playground): the Vite config loads on Node 22 before 22.18 (#7805)
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>
2026-11-16 18:15:59 +00:00
wonjangandClaude Fable 5.2 ec5a4e2a10 fix(check): mark a contrast finding by its severity and quote its text (#7752)
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>
2026-11-16 18:15:53 +00:00
Robin Ebers 42508c1ef1 fix(player): stop the preview freezing when many clips share one long recording (#7795)
* 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.
2026-11-16 18:15:46 +00:00
Robin Ebers 5be6c1580f feat(player): add a fullscreen button to the preview player (#7726)
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).
2026-11-16 18:15:38 +00:00
Michael Wang 8959deb00f fix: snapshot skips private files, no text-art demuxers, escaped warning text (#7943)
* 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.
2026-11-16 18:13:39 +00:00