* perf(parsers): find CSS url() references in linear time
A new css-url-scans entry finds what each CSS url( regex in the compile path
and the runtime finds, match for match and group for group, with forward
scans. The regexes restart from every unclosed url(, @import or background:
and read to the end of the text each time, so their time grows with the
square or cube of the input. The scans read each character a bounded number
of times.
rewriteCssAssetUrls uses the scan in place of CSS_URL_RE, which stays
exported for existing callers. A fuzz test checks 20,000 generated pages
against the regexes, and timed tests cover 1 MB of each unclosed form.
The parsers packed-size budget rises to cover the new entry.
* perf(core): bundler, SVG id namespacing and runtime find CSS urls in linear time
The bundler's url() inlining, CSS-file rebasing and @import inlining and
hoisting, the SVG url(#id) rewrite, the runtime's sub-composition url()
rewrite and the scene swap's url and @import list now use the
@hyperframes/parsers css-url-scans entry. Each returns the same matches as
the regex it replaces, in time linear in the CSS length.
* perf(producer): compile finds CSS urls, imports and backgrounds in linear time
Asset collection, head-style @import coalescing, the ancestor
background-image check, remote background and font-face url localization and
local font embedding now use the @hyperframes/parsers css-url-scans entry,
which returns the same matches as the regexes it replaces. A timed test
covers remote background discovery on 200 KB of unclosed background urls.
* perf(parsers): scan style blocks, font-face blocks, comments and mask urls in linear time
css-url-scans gains forward scans for `<style>` blocks, `@font-face { }`
blocks, `/* */` comments, the quoted-or-bare `url()` form and the
`mask-image: … url()` declaration. Each returns the same matches and groups
as the regex in its doc comment. The fuzz test now checks all fifteen scans
on 20,000 generated pages, and the timed tests cover 1 MB of each unclosed
form.
* perf(core): strip and restore stylesheet comments in linear time
Bundling a stylesheet finds its comments with the parsers comment scan and
puts them back in one pass over the placeholders. A comment comes back
verbatim, including text such as `$'` that a string replacement pattern
would expand.
* perf(producer): find style and font-face blocks in linear time
Remote font discovery and local font embedding read `<style>` blocks and
`@font-face` rules with the parsers scans, which return the same blocks as
the regexes they replace.
* perf(lint): read stylesheet and mask-image urls in linear time
The missing stylesheet asset and texture mask rules find `url()` values with
the parsers scans, including the mask-image fallback for a stylesheet that
does not parse.
* perf(cli): rewrite published CSS urls in linear time
Publishing rewrites stylesheet `url()` references with the parsers scan in
place of CSS_URL_RE, with the same matches.
* chore: size budgets cover the CSS scans in parsers and inspector
verify:packed-manifests measures parsers at 894,913 unpacked bytes and
inspector at 3,764,456, both just over 1% above their budgets once the
linear CSS scans are bundled. The budgets rise to 900,000 and 3,790,000.
* perf(parsers): scan stylesheet links and CSS rules in linear time
css-url-scans gains forward scans for `<link … rel="stylesheet" …>` tags and
`selector { declarations }` rules that return the same matches and groups as
the regexes in their doc comments. Both join the 20,000-page fuzz test and
the 1 MB timed tests.
* perf(core): restore stylesheet imports and list scene font faces in linear time
Bundling a stylesheet puts its comment and @import placeholders back in one
pass, so an imported sheet comes back verbatim and is not searched again.
fontFaceBlocks lists @font-face rules with the parsers scan. A fuzz test
checks the one-pass restore against the sequential one on 20,000 sheets.
* perf(producer): find stylesheet links, CSS rules and font-face blocks in linear time
Font stylesheet inlining and project font discovery find stylesheet links,
and the ancestor background check finds CSS rules, with the parsers scans.
extractFontFaceBlocks matches every brace in one pass instead of counting
depth again from each @font-face; a fuzz test checks it against the depth
count on 20,000 sheets.
* test(core): time the CSS placeholder restore directly
The bundle test with 6,000 imports was timed mostly on 6,000 file reads,
which took 2.7 s on the Windows runner. The restore is now timed on its own
over 20,000 placeholders, and a short bundle test still checks that every
import of a sheet is inlined.
* fix(engine): the media playlist check reads HLS lines and attributes as ffmpeg does
The folder check now finds every name ffmpeg's hls demuxer would open:
- lines end at CR, LF or NUL, and a line is also read cut at ffmpeg's
4095-byte limit;
- URI attributes are split like ff_parse_key_value: quoted or bare values,
with backslash escapes removed;
- leading ID3v2 tags are skipped before the playlist signature, and a file
behind more than 16 of them is refused.
Each refused shape is checked against ffprobe 8 in the test: ffprobe opens
the outside file, and playlistLeavesItsFolder now refuses the list.
* fix(cli): snapshot never hands FFmpeg a project video that is a document or an escaping playlist
`hyperframes snapshot` decodes held project videos with FFmpeg and FFprobe.
It now runs the engine's media check first: a file that is a document, or an
HLS or ffconcat list naming files outside its folder (under any extension),
is skipped with a "not media" warning and never reaches FFprobe or FFmpeg.
Real clips and HLS lists of segments beside them snapshot as before.
* fix(engine): playlist check reads lines as bytes and refuses unreadable nested lists
- Playlist text is read as latin1, one character per byte, so a line is cut
at 4095 bytes exactly where ffmpeg cuts it, even when it holds bytes that
are not UTF-8. Nested names are opened by those same bytes.
- A nested name that exists but cannot be read is refused; a name that does
not exist, or is too long to exist, is still kept.
- Each name is checked once, each file is opened once (ID3 header and head
in one read), and each file's verdict is reused within a call: 100k
segments naming one file drop from seconds to tens of milliseconds.
* perf(cli): snapshot checks each project video once and warns once when it is refused
* test(engine): the ffprobe playlist proof ends its options with -- before the input
* chore(engine): raise the packed size budget to 500000 bytes
The byte-exact HLS playlist parser adds about 6 KB to the packed engine
(496647 in CI against a 490452 budget).
* fix(engine): media inspection never waits on a FIFO or device
The document sniff and the playlist walk open with O_RDONLY|O_NONBLOCK where
the platform has it, fstat the descriptor, and refuse anything that is not a
regular file before reading; a folder still fails as it did. A FIFO with no
writer, as a media source or named in a list, is refused at once.
* fix(cli): snapshot inspects project videos within the probe deadline and its cleanup scope
The held-video hints are gathered inside the capture's cleanup scope, and
every media inspection gives up after the same 30 s limit as the FFprobe
call it guards, treating the file as not media.
* fix(cli): printed Windows commands read folder names literally in PowerShell, cmd and Git Bash
shellArg's Windows branch wrapped any non-plain name in double quotes,
where PowerShell and Git Bash still expand $ and backticks. Names with
those characters (or PowerShell's curly quotes) are now single-quoted,
which both shells read literally; a name that cmd.exe would also split
on & | < > ^ gets no printed path, and the hint says to run the command
from the project folder. A bare comma or leading @ is quoted so
PowerShell does not read an array or a splat. Ordinary names with
spaces, accents and apostrophes print as before.
The background preview's stop footer uses the same helper instead of
JSON quoting, which left $(...) live in POSIX shells and PowerShell.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): printed Windows paths with backslashes keep them in Git Bash
A Windows word containing a backslash printed bare, and Git Bash strips
unquoted backslashes, so C:\Users\Bob\film reached the CLI as
C:UsersBobfilm. Such words now take double quotes, which PowerShell,
cmd.exe and Git Bash all read as written; trailing backslashes are
doubled so they do not escape the closing quote.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): open --json gives a null stopCommand when the folder has no safe spelling
When no spelling of the project folder is safe to paste in every Windows
shell, the left-running preview's stopCommand held prose. It is now null,
and stopCommandFromProject names the command to run from inside the
project folder. The printed line is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(cli): drop a comment the nullable return type already states
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): a Windows name with no spelling common to every shell prints no path
PowerShell single quotes do not group a word in cmd.exe, and Git Bash
reads 'it''s' as its, so the single-quoted form printed for names with
$, a backtick or a curly double quote was wrong in two of the three
shells. Those names now take the existing null fallback, and the hint
says to run the command from the project folder.
Round-trip tests check that every printed Windows word reaches the
program unchanged: through Git Bash everywhere, and through cmd.exe and
PowerShell on Windows, where the CLI's Windows CI job now runs them.
The names cover apostrophes, typographic quotes, mixed quotes, cmd
operators and trailing backslashes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cli): run the cmd.exe round-trip through spawnSync
execFileSync's options type has no windowsVerbatimArguments, so the
Windows-only cmd.exe test failed typecheck. spawnSync takes the option,
and the test now also checks the exit status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cli): expect the quoted Windows path in the relative open command
On Windows a relative path holds a backslash, which shellArg now prints in
double quotes so Git Bash keeps it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): a Windows name with %NAME% or ! prints no path
cmd.exe expands %NAME% inside double quotes, and interactive Git Bash
history-expands ! there, so neither name reads literally in every
Windows shell. Both now take the null fallback. A lone % such as 100%
still prints.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): a file is received when any record at or above the staged folder lists it
A received-files record inside a staged subfolder could list nothing and
hide the project's own record, so outside references from received files
were copied into the upload again. Every record from the staged folder up
is now read: a nested record can add received files but never remove them.
* fix(cli): a HeyGen key from a project .env never replaces a saved credential
A HEYGEN_API_KEY or HYPERFRAMES_API_KEY that only the folder's .env set now
ranks after the person's stored login and saved API key, in the CLI resolver
(cloud render, publish, media helpers) and in the media-use skill scripts.
With no saved credential the project key still works, and the first use
prints one line naming the variable and the .env it came from. A key
exported in the shell keeps its current precedence.
* fix(cli): capture's agent files count the page's fonts instead of naming them
Font family names come from the captured page, and a short phrase passed the
plain-name check into AGENTS.md, CLAUDE.md and .cursorrules. The Brand Summary
now gives the number of font families and points to extracted/tokens.json,
which already holds the names as data.
* fix(cli): only a received project .env key gives way to a saved credential
A HeyGen key from a project .env now comes after the stored login and
saved API key only when that .env came in with a received project: a
received-files record at or above the folder lists it, or a record there
cannot be read. A person's own .env keeps its priority. The media-use skill
scripts read the same records and apply the same rule.
* fix(cli): a shell key wins over a received .env key under either name
* docs(cli): a received project's .env key comes after the saved login and key
* fix(cli): drop the duplicate font count from capture's agent files
The Brand Summary repeated the font count the file table already gives,
and counted entries that are not font names. The table row stays.
* fix(cli): name the received-files record in the skill comment without a path
caption-emoji-pop and caption-neon-accent look a word up in KEYWORDS and
WORD_EMOJI after stripping everything outside a-z, and caption-glitch-rgb
counts a word's \w characters to decide on the aftershock. A Korean, Cyrillic
or accented word comes out empty or cut, so a keyword written in that script
never matches and a long word never pulses.
The three components now strip by Unicode letter (\p{L}) instead, which is
the same set for a lowercased English transcript.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
publish, cloud render and feedback --file-issue build their archive from a
walk of the project folder that only consulted .hyperframesignore, so a rule
re-including dotfiles also uploaded .env files. The walk now leaves out env
files, Git data and Studio's private records whatever the ignore rules say,
and reports each one as left out with the reason "private".
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): start helper programs only from trusted PATH folders on every platform
At startup the CLI and its worker entry points rewrite their own PATH to
absolute folders outside the working directory, on every platform, so a
program planted in the project (a relative or empty PATH entry,
node_modules/.bin, or any folder inside the cwd) is never run by name.
Child processes inherit the trimmed PATH. media-use reuses the same helper
instead of its private copy.
doctor resolves docker with findTrustedExecutable and runs it by absolute
path with execFileSync, no shell. A docker found only in the project's
node_modules/.bin is reported as not found, with a hint that it was skipped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep stale-install detection and Windows system folders after PATH trim
The stale hyperframes check for reverse start reads the PATH the process
started with, so an older copy in the project's node_modules/.bin is still
reported. It only reads the filesystem and never runs that copy.
On Windows the trim now keeps %SystemRoot%, System32, System32\Wbem and
the WindowsPowerShell folder even when the CLI starts inside them, so an
elevated prompt in C:\Windows\System32 can still run cmd, taskkill,
tasklist, powershell and tar. PATH entries wrapped in double quotes are
unquoted before the check instead of being dropped. PATH order is kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): resolve the empty-PATH placeholder only when it is needed
Computing it at import threw in test environments where import.meta.url is not a file URL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): a subfolder of an imported project keeps its received-files record
Publish, cloud render and feedback now read the received-files record at
the nearest folder at or above the one they stage, so staging a subfolder
of an imported project still leaves out the outside files its received
files reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): a received file counts under any spelling of the same file on disk
The received-files lookup now also matches a project file that is the
same file on disk as a listed path, so a name respelled in letter case on
a case-insensitive disk keeps its received status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): cloud render prepares only the GIFs staging kept
The entry GIF prep before a cloud render upload now reads only the staged
copies it is handed. An image whose source staging left out keeps its
reference as written and is never read from disk.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli,studio-server): never hand a playlist named as media to ffmpeg
A media file whose first bytes are an HLS playlist, an XML manifest or a
concat script now stays out of ffprobe and ffmpeg: cloud render leaves it
in the zip as authored, the media probe reports it as not media, and the
proxy copy refuses it. Real media never starts with these bytes, so it
probes and transcodes as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio-server): catch playlists with control bytes, and keep them from stills and audio probes
A text playlist or concat script is detected whatever bytes follow its
first line; only markup must be all text. A still frame and the audio
probe behind waveforms, peaks and loudness now refuse a file the probe
reads as not media, as the proxy copy already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): a parent folder's state the CLI cannot read never marks a project received
The walk up for a received-files record now skips a parent whose record
cannot be reached. Only a record file that is there but cannot be read
or parsed counts every file as received.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): a drive that reports no file ids matches no received file by identity
Some network and virtual drives report a file id of 0 for every file, so
the same-file match now gives such a file no identity instead of
matching it to every listed file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(studio-server): read a media file's first bytes with a read stream
The playlist check reads the first 64 bytes through a bounded read
stream instead of a raw file descriptor, and the audio-track probe's doc
comment sits on its function again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(studio-server): raise the packed size budget for the media playlist check
Main packs @hyperframes/studio-server close to the 1% tolerance on the
168500 budget, and the playlist check adds about 320 bytes, which put
the Build over. Set the budget to 172000.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli,studio-server): open media only through self-contained media demuxers
Every ffprobe and ffmpeg input that cloud render offload, the publish
proxy bake and Studio's media helpers open now carries a demuxer
whitelist built from the supported media extensions: MP4/MOV/M4A/AVIF,
Matroska/WebM, MXF, AVI, MPEG-PS/TS, FLV, ASF, Ogg, WAV, MP3, AAC, FLAC,
AIFF and the still-image formats. Playlist, manifest and concat demuxers
can no longer open, whatever a file's bytes say. The proxy's own concat
step is left as it is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli,studio-server): keep media probe argv flat, and expect the demuxer list in loudness args
Two probe argv literals built from nested spreads are flat again, so
"--" stays the visible second-to-last entry the argv contract checks.
The normalize-audio test expects the demuxer list before the input.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep Chrome's sandbox on for website capture where the host supports it
`hyperframes capture` added --no-sandbox on every Linux host. It now uses the
engine's host check, the same one rendering uses: the sandbox stays on unless
the process runs as root, in a container or serverless runtime, or with user
namespaces restricted. HYPERFRAMES_CHROME_SANDBOX=0/1 still overrides, and a
launch Chrome refuses with the sandbox is still retried without it. When the
host check turns the sandbox off, capture prints a one-time warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): drop the new comment block from the capture launch args
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep captured page text out of generated agent instruction files
The AGENTS.md / CLAUDE.md / .cursorrules files that `hyperframes capture`
writes are loaded by coding agents as instructions. The heading now uses the
captured site's hostname instead of the page title, font names are kept only
when they read as plain names, and the file states that everything the capture
saved from the website is data, not instructions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): trim the font-name comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(producer): shown-box sampling stays within the validated render duration
Sampling where each oversized video is drawn stepped through the authored
start and end in 0.25 s float steps with no bound, before the render
duration was checked. An enormous start never advanced the step, and an
unbounded end grew the sample set until memory ran out.
The render duration is now validated first, each window is cut at the
composition's end, a window that is not finite is skipped, and the loop
counts integer steps. Building the sample list happens inside the
measurement's try, so any failure falls back to full-size extraction.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: render and capture file servers refuse env files and Git data
The producer render file server, the engine file server and the CLI
static project server served every regular file under the project to the
page, including `.env*` files and anything under `.git`. Compile already
refuses to inline those files, and Studio preview and play refuse to
serve them.
All three now answer 404 for them through the shared isVcsOrSecretPath
rule, checked on the requested name and on a link's target, with the
case and Windows spelling variants it already covers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(engine): renders reach only public addresses from every part of the browser
* fix(engine): renders reach only public addresses from every part of the browser
* fix(engine): renders reach only public addresses from every part of the browser
* fix(engine): renders reach only public addresses from every part of the browser
* fix(cli): an unknown flag's list leaves out hidden rename shims
The list pointed agents at init's --template, --video-legacy and --agent,
which only print an error. It now shows the flags --help shows.
* fix(cli): an unknown flag never suggests a hidden rename shim
The did-you-mean search still used every spelling, so '--templat' on init
was pointed at the hidden --template. It now uses the same visible flags
the list shows.
The error only said to run --help, so an agent guessed another flag. It now
names every long flag the command declares, and --search points to --query.
* fix(registry): caption-highlight clears a short word's highlight when the word ends
On a word shorter than 0.05 s the 0.15 s fade-in outlived the fade-out, so
a frame inside that tail lit the highlight again until the phrase ended.
* fix(registry): leave the generated caption-highlight catalog files to the generator
check copies each canvas into a 2D context to see whether it moved. On WebGL
that readback makes Chrome log a GL driver Performance note, which check then
listed as a console warning from the composition.
* fix(cli): check times a line held across a split clip as one hold
A clip split in two hands its line to a second element at the same place.
line_unread timed each element alone, so the first half warned while the
same text stayed on screen.
* refactor(cli): name the split-clip line hand-off instead of commenting it
capture read --timeout with parseInt, so `--timeout 1s` became a 1 ms
page-load timeout. grade-compare dropped an invalid value without a
warning. Both now use the shared parseTimeoutMs helper that check and
snapshot already use, keeping their defaults of 120000 ms and 5000 ms.
Fixes#7671
`hyperframes docs rendering` said workers run 1-8, but the engine
clamps an explicit value to 24, and it never mentioned --format or
--gif-loop. The options now match render.ts and the engine limit.
Fixes#7668
`hyperframes init --non-interactive` closes with `cd <name> && npm run …`
lines for the person or agent to paste. The name went in as typed, so a
name with a space or a quote printed a command that fails as written:
`cd my first video` (bash: "cd: my: No such file or directory", zsh: "too
many arguments") and `cd it's mine` (an unterminated quote).
A new `shellArg` quotes a word only when a shell would split or expand
it: double quotes, or single quotes when the text holds `$`, a backtick,
`\`, `"` or `!`; on Windows, double quotes, with `\` paths left bare.
`hyperframes open` / `preview --stop` hints (desktopApp's `shownDir`)
already quoted whitespace with JSON.stringify and now use it too, so a
name like `it's` or `a&b` is covered there as well.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The settings line printed the encoder tier, so the default render said
"30fps · standard · …" while it encoded the looks preset at CRF 16, and
-q delivery said "high". A long-form render that came out at ~40 Mbps
read as "standard quality" in its own log.
The line now prints the --quality name as asked for and the CRF or
bitrate in effect: "looks (CRF 16)" by default, "looks (CRF 20)" with
--crf 20, "looks (10M)" with --video-bitrate 10M, "draft", "delivery".
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A color-graded <video> is painted into a canvas the runtime inserts after it,
with a runtime-generated id (__hf_color_grading_<video id>). Layout findings on
that canvas (e.g. container_overflow for a punch-in inside an overflow:hidden
box) named the canvas, so the fix hint "mark intentional overflow with
data-layout-allow-overflow" pointed at an element the author never wrote.
The audit already reads flags from the authored video (authoredElement);
uniqueSelectorFor now names that element too, so the finding's selector,
data attributes and source file are the video's.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
skills/gsap was folded into the animation skill in #1349, but build-copy
still listed it, so every CLI build printed "[build-copy] skill not found,
skipping: skills/gsap". Drop the entry, and add a test that every bundled
skill name has a SKILL.md so the next rename fails CI instead of warning.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A caller that runs several renders at once sets HYPERFRAMES_OWNER to a per-run id; every browser the CLI or
engine launches and the warm check server carry --hyperframes-owner=<id>, so the caller can tell one run's
leftovers from another's.
* feat(cli): check warns when text leaves the 9:16 social safe areas
* feat(core): safe areas owned by core; check adds --safe-zone standard
* style(cli): format
* refactor(core): name the safe-area band fields
* fix(cli): defects outrank safe-zone warnings at the issue cap
* style(cli): format
* test: read the safe-box constants from core
* fix(core): free a preview clip's decoder when the playhead leaves it
* fix(core): keep audio buffered when the playhead leaves it, free only video decoders
* fix(core): leave Safari's loaded video alone when the playhead leaves it
`catalog --type widget` exited 1 with a runtime_error. A bad flag value
is a usage mistake, so it now throws CliUsageError: exit 2, and under
--json a usage_error envelope with the same message.
Closes#7669
Claude-Session: https://claude.ai/code/session_01M3Xbw44WYGyVqg4AjkzFxj
Co-authored-by: Claude <noreply@anthropic.com>
* fix(cli): reject invalid check numeric flags as usage errors (#7672)
--samples, --max-issues, --max-transition-samples and --tolerance fell
back to their defaults on any value they could not parse, and parseInt
read 5abc as 5. A bad value now exits 2 with a usage_error that names the
flag and the value. Absent flags keep their defaults.
* fix(cli): drop added comment to satisfy the comment ratchet
Raise the direct ranges so the workspace and published packages resolve
patched releases: tar 7.5.22, hono 4.13.16, @hono/node-server 2.1.6,
adm-zip 0.6.1, sharp 0.35.5 and postcss-selector-parser 7.1.7. The CLI's
on-demand sharp install moves to 0.35.5 with them.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
oxfmt 0.41 pins tinypool 2.1.0 (GHSA-5gmw-xhrv-c9v3, GHSA-85c8-ppgw-ccpr).
Every oxfmt release before 0.67 pins 2.1.0, and 0.67+ reformats 66 files,
so override tinypool to the drop-in 2.1.2 patch instead of bumping oxfmt.
Also bump vite ^6.4.2 -> ^6.4.5 and vitest/@vitest/coverage-v8
^4.1.11 -> ^4.1.12 (pulls @vitest/mocker 4.1.12).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): update happy-dom to ^21.0.4
happy-dom 21 turns off iframe page loading by default. The player and
sdk test environments load same-origin iframe documents, so they opt
back in through their vitest happyDOM settings.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: adapt studio and cli tests to happy-dom 21
Studio tests load same-origin iframe documents, so they opt back in to
iframe page loading. happy-dom 21 adds Element.checkVisibility, which
reads the real styles rather than the mocked getComputedStyle, so the
motion-signature decoys are hidden in the DOM as well as in the mock.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): fix remaining studio tests on happy-dom 21
- happy-dom now implements getAnimations, so Base UI deferred popup
unmounts to animation frames; test setup sets Base UI's
BASE_UI_ANIMATIONS_DISABLED, matching the old synchronous behaviour.
- happy-dom 21 drops vendor-prefixed properties it does not list, so the
-webkit-text-fill-color tests move to a jsdom file with shared helpers.
- The scaled-iframe drag test builds its own Window, which now needs
enableIframePageLoading.
- NLEPreview.slowBoot's per-file environment options never applied the
disable setting and now wiped the config's iframe opt-in; drop them.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): inline fill-test helpers instead of a shared module
Keeps the moved -webkit-text-fill-color tests self-contained and leaves
the original test file's helpers untouched.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): drop the Base UI flag comment for the comment ratchet
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(producer): local renders bring in only media, font, CSS and JS from outside the project
Local renders (`render`, range render, `benchmark`, the Studio server and the
Vite Studio adapter) run with allowOutsideProjectAssets, which copied every
existing file that markup named outside the project into compiled/hf-ext, of
any type and from any folder, and served project links that lead outside
without looking at where they lead. Publish already applies a policy here:
outside references are kept, private locations are left out, and only image,
video, audio, font, CSS and JS files are copied. Local renders now follow the
same policy.
The publish predicates (private location, copied file type, left-out wording)
move from the CLI to a new `@hyperframes/studio-server/outside-file` subpath,
since the producer cannot import the CLI and already depends on studio-server.
The CLI re-exports them, so publish behaves as before. The media extension
sets move with them because the copied-type list includes them.
The producer decides with one predicate, `outsideAssetRefusal` in
utils/paths.ts, and applies it wherever allowOutsideProjectAssets lets an
outside file in, so no entry point can skip it:
- collectExternalAssets: src/href/url() references, which covers <a href> and
<link href>
- dropMediaOutsideProject: video/audio/image sources in any spelling the media
resolver accepts (file: URLs, percent-encoding), so nothing probes or
extracts them
- the render file server: project links that lead outside
- the distributed plan's project copy: the same links (range render)
- GIF/HEIC prep and sub-composition links: private locations only, since
those inputs are converted or compiled rather than copied as they are
Each left-out file logs the publish wording with "left out of the render".
To reproduce on main: a project whose index.html references
../../.ssh/id_key through <link href>, <a href> and url(), with a project
link to a file in .ssh, rendered locally, gets those files copied into
compiled/hf-ext and served.
Comment lines: the four in studio-server's outsideFile.ts moved verbatim from
the CLI files they replace. Two are new, in utils/paths.ts. The one on
outsideAssetRefusal states the policy once, so its six call sites carry no
comment. The one on refusesOutsideLink says its boolean means "refused, and
already warned", which the name alone does not say. Comment ratchet is clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep outsideFileType as a re-export of the shared module
The base repository's deletion guard rejects removing a file that exists on
main unless git pairs it as a rename. outsideFileType.ts moved into
studio-server/outside-file with enough added around it that git no longer
pairs the two, so CI's "Reject accidental file deletions" step failed.
The file stays as a two-name re-export and publish keeps importing from it,
so publishProject.ts and its file-type test are back to main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(producer): raise the unpacked size budgets for the outside-file policy
CI's packed-manifest check measured @hyperframes/producer at 3,244,665 bytes
unpacked (budget 3,210,000) and @hyperframes/studio-server at 653,506
(budget 646,000), both just past the 1% tolerance.
Both packages were already at the edge on main. Measured locally with
npm pack --dry-run, main is 3,237,162 for producer and 652,502 for
studio-server, so studio-server on main is already at its ceiling. This
branch adds about 7.9 KB unpacked to producer, because the new checks sit in
the compiler, render stages and file server, which each producer entry
bundles. It adds about 5.5 KB to studio-server for the new outside-file
entry and its declarations. No source maps, tests or assets were added to
either tarball.
The budgets go to 3,245,000 and 654,000, just above CI's measurements, the
same way #7579 raised producer's budget for the project-folder checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(producer): apply the outside-file policy to embedded local fonts
A project font file that links outside the project is now left out of
font embedding with the same warning the file server gives, instead of
being inlined into the compiled HTML.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): copy only media, font, CSS and JS files from outside the project
Publish, cloud render and feedback now copy an outside reference into _ext/
only when its extension is an image, video, audio, font, CSS or JS type,
taken from studio-server's MIME map (new ./mime subpath; .avif added).
Anything else outside the project is left out with a warning and a
left_out entry whose reason is file_type; telemetry counts it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep the new outside-type file under its package's comment share
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): copy the outside media cloud render re-encodes or converts
The outside allowlist now also takes the video, audio and still-image
extensions cloud render re-encodes or converts (.avi, .ogv, .aiff, .tif,
.bmp and the rest), from one shared list offload imports too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>