* 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(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(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.
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.
* 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(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(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>
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(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.
The bypass entry for a restricted browser's page server now always names its
port, so a default port no longer admits every port on the host. Studio
thumbnails take the server's own origin, not a request's Host header. A stop
signal that lands while the temp profile is being made removes it and launches
no Chrome. The wiring test follows renamed and namespaced calls, requires the
callback to pass on the network's args and profile, and refuses an unset
pageServerUrl.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): own render-slot lock dir; refuse cache files other accounts can write
Sharing one render slot across accounts no longer means sharing HYPERFRAMES_CACHE_DIR,
which holds the browser, packages and helpers each account runs.
HYPERFRAMES_RENDER_LOCK_DIR names a folder of lock records only, created sticky and
writable by all (1777); the per-user lock folder is created 0700. Help text, errors and
docs no longer suggest sharing the cache or chmod 777.
foreignWritablePath (core/cache-dir) refuses a cached file whose path up to the cache
root is owned by another account or is group/world-writable. Chrome (CLI, engine,
inspector), optional packages (incl. the Sherpa runtime), the whisper.cpp build, the TTS
script, the Apple audio helpers, opencv.js and the Lambda handler reinstall or rebuild
instead of running such a file, and trustedCacheRoot moves their installs to
~/.cache/hyperframes when another account can write HYPERFRAMES_CACHE_DIR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): seal own cache installs against umask 002 and repair old lock folder modes
sealCacheInstall (core/cache-dir) takes group and world write off what this account just
installed and the folders above it up to the cache root, so an install made under umask
002 passes foreignWritablePath on the next run instead of being refused and fetched again.
Chrome, optional packages, the whisper.cpp build, opencv.js, the TTS script, the Apple
audio helpers and the Lambda handler call it after installing.
ensureLockDir makes an existing per-user lock folder 0700 again when an older release left
it open, and adds the sticky bit to an existing HYPERFRAMES_RENDER_LOCK_DIR folder, warning
once with the folder's name when it cannot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(cli): drop added comments to pass the comment ratchet
The explanations move into names: the mode bits in core/cache-dir are GROUP_OR_WORLD_WRITE
and WITHOUT_GROUP_OR_WORLD_WRITE, and the owner check is anotherAccountCanWrite. No change
in behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): verify the lock folder through a no-follow handle and stage installs owner-only
The render lock folder is opened with O_NOFOLLOW | O_DIRECTORY and checked and chmod-ed
through that descriptor: a link, or a folder another account owns (root may own a shared
one), is refused with RenderLockFolderRefused instead of being made world-writable or
used as is.
Chrome staging, the optional-package staging folder, the whisper.cpp build folder and the
opencv, TTS, Apple helper and Lambda handler folders are created 0700, and Chrome's staged
tree is sealed before it leaves staging, so nothing is group-writable while it installs.
foreignWritablePath accepts a sticky folder owned by this account or root, as /tmp is, and
tolerates a statSync without options; tests whose cache sat directly in /tmp, and tests
that mock statSync, failed on both. Docs note that a record naming a live process of
another account holds the shared slot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cli): skip the uid-based Chrome cache refusal cases where there is no uid
Windows has no process.getuid, so the ownership check never runs there and the two cases
that expect a refusal cannot hold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(core): raise the unpacked size budget for the cache ownership checks
core grew to 4418013 bytes unpacked with foreignWritablePath, sealCacheInstall
and trustedCacheRoot; the budget follows the usual 5% headroom over that size.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): never write project records through symlinks under .hyperframes
The committed team descriptor (.hyperframes/project.json) and the HeyGen job
log (.hyperframes/heygen-jobs.jsonl) were written with path-based mkdir/write/
append calls that follow links, so a cloned project could point either file,
or .hyperframes itself, at a file outside the project and have publish or a
paid HeyGen job overwrite or append to it.
- projectRecords: add appendRecord (O_NOFOLLOW open, same plain file checked
by fstat/lstat, real folders from .hyperframes) and recordKind.
- writeTeamProject goes through writeRecord (exclusive temp + rename), so a
link at project.json is replaced, never written through, and a linked
.hyperframes is refused.
- readTeamProject refuses a linked or non-plain descriptor (or a linked
.hyperframes) instead of reading it as absent, which stops publish before it
would write one.
- The job log and project voice picks go through appendRecord and fail with
a Fix when refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): route every remaining .hyperframes write through link-refusing helpers
Writers that still made or wrote into a project's .hyperframes with
path-based mkdir/write calls now refuse a linked or non-folder .hyperframes
and never write through a link:
- project lock: folder via recordFolder (the exclusive lock create stays)
- lambda stack state: writeRecord
- received-files record: recordFolder + writeRecord, so a link to another
project file is replaced instead of overwritten
- check reports: folder via recordFolder (the wx create stays)
- check and snapshot frame folders: new projectFolder, which holds a folder
inside .hyperframes to recordFolder and makes one elsewhere as asked
- template pull staging: recordFolder
- share render record: writeRecord
- studio server state folder: recordFolder
- share storage: the atomic JSON temp file is opened with wx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(cli): drop doc comments the comment ratchet counts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): refuse to append to a project record with more than one hard link
A hard link at .hyperframes/heygen-jobs.jsonl names an outside file as a
plain file, so the O_NOFOLLOW open and the same-file check let the job log
append to it. The append now refuses a file whose link count is above one.
Whole-file record writes go through a temp file renamed into place, which
replaces the name rather than writing to a linked inode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): check and info --media leave remote media sources unprobed
mediaPath handed an http(s) src to ffprobe, so check's HDR and sound
probes and info --media's clip lengths opened composition URLs from the
CLI process. Remote sources are now left unprobed, as timeline and
check's clip audit already do. check's report lists the remote video
and image sources HDR inspection skipped under hdr.remoteNotInspected,
and a remote video that may carry sound keeps the film from being
reported as silent.
* fix(cli): drop credentials from remoteNotInspected and document unprobed remote media
* fix(cli): open starts the desktop app in the home folder, not the folder it runs in
* style(cli): keep launchApp's note on one comment line
* fix(cli): open starts the desktop app without the project's .env values
* fix(cli): studio thumbnails and Ctrl-C cleanup under a restricted page network
Studio's thumbnail browser now gets the preview's server as its page server, so
with PRODUCER_RESTRICT_PAGE_NETWORK on the proxy no longer refuses the Studio's
own preview. A restricted CLI browser's proxy and temp profile are released by
the CLI's stop-signal handler, which waits for them before exiting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cli): every composition Chrome launch goes through the page-network fence
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep the follow-up inside the package's comment share
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): commands that open a composition honor PRODUCER_RESTRICT_PAGE_NETWORK
check, snapshot, compare, grade-compare, layout, validate and the motion shot
launched Chrome with no page-network restriction, so a composition page
could reach loopback, the LAN and link-local addresses even when the caller
set PRODUCER_RESTRICT_PAGE_NETWORK=true, as a render honors it.
Every composition browser now launches through launchWithPageNetwork. When
the flag is on, it starts the engine's public-only capture proxy and profile,
the same ones a render uses. The page server is the only direct host, and the
proxy and profile live as long as the browser. The prelaunch path, which
starts Chrome before the page server exists, is skipped when the network is
restricted. A restricted launch without a page URL throws instead of running
unrestricted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep the page-network change inside the package's comment share
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(engine,producer): media inputs refuse formats that open other files
Composition media read by ffprobe/ffmpeg now passes a format allowlist on every
input: the demuxers the installed ffmpeg reports, minus the ones that open other
files or URLs on their own (DASH, IMF and similar). hls and concat stay allowed,
since ffmpeg carries the list into every file they open. The HDR window,
alpha-plane, GIF, HEIC, audio-sidecar and snapshot reads that skipped it now use it.
The not-media check skips ID3v2 tags before it looks at the first byte, refuses a
playlist entry that is a document, and refuses JSON or non-SVG markup as an <img> src.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(engine,parsers,core,lint,cli): format allowlist reads old listings and covers every media probe
The demuxer listing is read from the binary that enforces the flag, accepts ffmpeg 4's
two-column output, and a failed listing is asked again next time. The lint HEVC probe,
the grade analyzer and the snapshot probes use it too. A nested playlist entry is refused
only for a real document signature, so encrypted segments and keys are kept; an image whose
prolog outruns the sniff window, or that is UTF-16, is no longer refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(parsers,producer): trim comments added with the media format list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(engine): keep the format-limit probe's argv in the shape the ffprobe contract reads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(engine): the image markup check reads a doctype without regex backtracking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(parsers): raise the parsers size budget for the media format list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): a .hyperframes folder in a subfolder stays private too
The private-file rule treated .hyperframes as the app's records folder only at
the project root. A project copied into a subfolder keeps its own
.hyperframes/, and its chat history, hand-off and other records there were
listed in the file tree and served by Studio's file and preview routes and by
the other file servers that share the rule.
A .hyperframes segment at any depth is now private, in every spelling Windows
opens. Studio's own files and the prepared-assets and requests folders stay
servable only at the root, the one place Studio reads and writes them. The file
tree also skips .hyperframes/backup at any depth.
* fix(cli): the capture --local-file page server answers only its own host
The page server that capture --local-file starts on a loopback port answered a
request whatever its Host header said. A site whose name resolves to 127.0.0.1
could then read the files it serves from the browser.
The server now refuses, before any file lookup, a request whose Host is not its
own loopback name and port, with the same isOwnLoopbackHost rule the static
project server and the engine file server use. Every response carries
X-Content-Type-Options: nosniff. The capture browser loads the page by
127.0.0.1 and its port, and fetchLocalPageUrl reads from disk, so both work as
before.
* fix(skills): a plugin manifest in the project pins no CLI release
The skills launcher read a plugin manifest from the folder above skills/
wherever the skills were installed. For a project-level install that folder is
the project itself or its .agents or .claude folder, so a plugin.json shipped
with a project could pin an old hyperframes release and turn off update checks
and standalone skill refreshes.
The launcher now reads a manifest only from a bundle of its own: a folder whose
name does not start with a dot and that is neither the folder the CLI works in
nor one that contains it. Plugin managers install bundles into their own
folders, so those keep their pin. A manifest anywhere else leaves the call the
same as with no manifest. A manifest that pins a release older than 0.9.34, the
launcher's floor, is refused. The agent-facing plugin rules and the skills
guide say the same.
* fix(skills): a plugin bundle inside the working folder pins only behind a dot folder
A package inside a monorepo could still pin the CLI: with the agent working at
the monorepo root, <mono>/packages/video/plugin.json sat beside a skills folder
the launcher took for a bundle.
The launcher now also refuses a bundle inside the working folder unless a
folder whose name starts with a dot lies between them, as .claude does in
~/.claude/plugins/cache when the agent works in the home folder. Bundles in
~/.claude/plugins, ~/.cursor/plugins and ~/.gemini/extensions keep their pin
from the home folder or a project. The plugin rules and the skills guide now
state the three conditions the launcher checks.
* docs(cli): a .hyperframes folder in a subfolder is left out and not served
The private-file rule now treats a .hyperframes/ folder at any depth as the
app's records. Files stored in one inside a subfolder, assets included, stay out
of uploads and are not served by Studio, preview or render. The cloud render
section now says so beside the rule it already describes.
* fix(cli): capture pages keep loading scripts with no or unlisted extensions
With nosniff on every response, a script the capture page server did not
know the type of (a .cjs file, or a file with no extension) was served as
application/octet-stream, and the browser refused to run it.
The server now names .cjs, .wasm, .xml, source maps, web manifests, CSV,
WebVTT, glTF and more audio, video and image types. A file whose type is still
unlisted is served without nosniff, so the browser sniffs it as it did before
and such a script runs. Every listed type and every empty error response keeps
nosniff.
* fix(share): sync and share leave out a .hyperframes folder below the root
The .hyperframes rules in the source path policy matched only at the project
root, so a copy's records in a subfolder, such as
sub/.hyperframes/agent-runs.jsonl, fell through to the default rule and
travelled with share and sync.
A new nested-hyperframes-state rule leaves out a .hyperframes folder at any
depth below the root. It sits before the first allow rule, as the contract's
rule order requires. The root folder's Studio files and other portable files
travel as before. Stored snapshot reads skip the new rule through
stored_manifest.legacy_rule_regexes, the shape the server and Desktop copies
already use, so snapshots and bindings captured earlier still read.
* test(studio-server): a sub-composition build past its deadline is refused off the request thread
* fix(studio-server): sub-composition previews build off the request thread within a deadline
* fix(studio-server): every parse of a sub-composition page runs on the build worker
* test(studio-server): a page built inside its deadline keeps the request thread free
* test(studio-server): a refused page leaves the next one built whole, hf-ids and all
* chore(studio-server): the build worker's comments fit its package's share
* fix(engine,producer): render media readers treat private project files as missing
A video, audio, GIF or HEIC src that names a file the file servers refuse
(git metadata, env, credentials, tool state, app records), as written or
through a link, is now treated as missing by every render-time reader:
the compile-time duration probe and keyframe advisory, GIF and HEIC prep,
the media drop step, the HDR probe, frame extraction and the audio mixer.
The engine's isPrivateUnderAssetRoots judges a path from every asset root
that holds it, so a render's own work folder inside the project's
.hyperframes/ keeps its downloaded and prepared files.
* fix(engine): probe refuses a text file that ffmpeg reads as text-art video
ffmpeg's tty and bintext demuxers turn a text file (such as .asc or .nfo)
into a video stream that draws the text into frames. Every probe now
refuses an input whose container is tty or whose video codec is ansi,
bintext, xbin or idf, as not media. Probing, frame extraction and audio
reads all go through the same probe, on every render. No demuxer for real
video or audio produces these, so local renders keep every other format.
* fix(engine,producer,cli): playlist entries and check probes skip private files
- A media playlist (HLS segment, key or map URI, ffconcat file) that names a
private file inside its own folder is refused as not media, like one that
names a file outside it.
- `hyperframes check` no longer probes a media source outside the project or
private in it: mediaPath returns null for such a file and the audio,
heard-clip and HDR checks skip it.
- The compiler's duration probe and keyframe check judge privacy from every
asset root, as the render-time readers do.
* docs(skills): style-sampling pulls the template every time, so a received copy is checked first
* chore(skills): regenerate the skills manifest for the style-sampling change
* test(skills): style-sampling must pull before using a template, resuming included
* fix: warnings that name project files print control characters as visible escapes
The CLI already escaped control characters in the text its own commands
print, but warnings from core, producer and engine went to the terminal
raw. A composition whose sub-composition path held ESC or BEL still
drove the terminal through the bundler's "Skipping sub-composition"
warning in `info --media` and `snapshot`.
terminalText moves to core so there is one sanitiser, the CLI imports it
from there, and the library warnings that carry project text (the
bundler, the producer logger, the file server, render path skips, asset
load failures, FrameCapture, the import map, fonts, figma and atomic
file warnings) pass that text through it.
* fix: every library warning that carries project text escapes control characters
* fix(media-use): audio engine reads and writes only inside the project folder
A voice line id must be a plain file name and a recording path must stay
inside the project. The engine never writes through a link or into a folder
that leads outside the project. wait-bgm reads only the renderer's own log in
assets/bgm, and a carried-over BGM job keeps its pid and log only when that
log is the engine's own.
* fix(media-use): engine outputs and recordings stay inside the project
A recording that is a playlist or list naming other files is refused,
and ffmpeg is pinned to the probed format with file-only input. The
media manifest, its index, bgm_status.json and an in-project
audio_meta.json are never written through a link, and a .media folder
that leads outside the project is refused. Index cells keep each record
on one line. wait-bgm ignores a track path outside the project and
drops a pid whose log is not the engine's own.
* fix(cli): the published skills leave their test files out of the package
* fix(cli): batch outputs from a template that starts with a placeholder stay in the working folder
* fix(cli): the bare {path} template is named, not commented
* fix(cli): the CLI trusts a preview only once it proves this user started it
* test(cli): a listener that cannot prove it is the user's preview is never trusted
* test(cli): stand-in previews answer the challenge as the user's own do
* style(cli): format the preview proof changes
* fix(cli): a preview's proof names its own endpoint and config, and the token file must be private
* style(cli): format the proof changes
* test(studio): the fake request in the host check has a socket, as every real one does
* fix(studio): a Studio started by hand proves it is the user's, so the CLI still finds it
* fix(cli): the challenge travels in a header, so Studio's routes keep their exact paths
* style(studio): keep the config producer compact