441 Commits
Author SHA1 Message Date
Michael Wang a4139e9ead fix(engine): give each superset extraction a folder of its own (#7901)
* fix(engine): give each superset extraction a folder of its own

A superset group extracted into a folder named from the group index and the
process id, and deleted and recreated it by that name in the cache root that
every render shares. Two renders in one process could share the folder and
remove each other's frames.

Partial folders are now created with mkdtemp, so each extraction writes only
into a folder it made. A cache entry is published only when its frame count
is the one the extraction wrote.

* fix(engine): make the partial folders with createStagingDir; raise the engine size budget
2026-11-16 02:10:35 +00:00
Michael Wang 82fdf406c4 fix(producer): compile and render-telemetry tag scans run in linear time (#7896)
* fix(producer): compile and render-telemetry tag scans run in linear time

The compiler's gsap script rewrite, crossorigin and preload strips, remote
media and image src scans and inline-script scan, and the render telemetry's
tag counts, now use forward scans that return exactly what the regexes they
replace returned. Those regexes rescanned to the end of the page from every
tag opener that never closed, or from every character of a long whitespace
run in one tag. The telemetry's script and style strip stops after 8 passes.

* test(producer): give the scan fuzz tests room on CI and raise the producer size budget
2026-11-16 02:08:44 +00:00
Miguel Ángel 98208241e7 fix(lint): keep agent-made scenes and sound effects on one timeline lane (#7775)
* test(lint): density warning ignores lanes

* fix(lint): count dense timelines per file so agents keep scenes on one lane

* chore(skills): make room for the lane pointer in the entry skill

* fix(lint): plain comment on the per-file density count

* chore(skills): say why the entry skill budget grew

* test(skills): pin the one-lane wording agents follow

* style(skills): format the lane wording test

* chore(skills): regenerate skills manifest

* docs(skills): overlapping sound effects take a second lane
2026-11-16 01:50:04 +00:00
Miguel Ángel d9488119be fix(aws-lambda): the release ships the arm64 ffmpeg only when it matches its committed digest (#7872)
* fix(aws-lambda): the release ships the arm64 ffmpeg only when it matches its committed digest

* style(ci): format the release workflow tests
2026-11-16 01:09:58 +00:00
Xuanru Li 7bd6b9daf8 fix(ci): publishing workflows run only for main (#7875)
* fix(ci): publishing workflows run only for main

A workflow_dispatch on any branch ran the ClawHub sync with CLAWHUB_TOKEN and the
MCP registry publish with an OIDC token, publishing that branch's skills/ or
server.json under heygen-com. Each publishing job now skips unless github.ref is
refs/heads/main and checks out the triggering commit without stored credentials.

* test: split the main-only publish check into small checks

* test: close main-only publishing policy gaps

* refactor: separate publishing push filter classification
2026-11-16 01:06:52 +00:00
Miguel Ángel 5dc3b336aa fix(cli): no test fixture is shaped like a live HeyGen key, and CI refuses one (#7876)
* fix(cli): no test fixture is shaped like a live HeyGen key, and CI refuses one

* style(cli): format the key fixture and committed-key check
2026-11-16 00:21:21 +00:00
Michael Wang 3fc3050bc3 fix(skills): run the CLI through the launcher for standalone installs too (#7879)
Every skill now starts the CLI through hyperframes/scripts/plugin-cli.mjs, which starts npm in
the home folder. A standalone install, with no plugin manifest, runs the newest release that
moves into HYPERFRAMES_PLUGIN_CWD. The skills no longer prefer a project's own wrapper over the
CLI.
2026-11-16 00:18:47 +00:00
Michael Wang a54de748ee ci(publish): name npm-publish as the approval gate for every publish (#7870)
* ci(publish): publish prebuilt tarballs from a job that runs no release-commit code

Builds, lifecycle scripts and packing move to a pack job with a read-only
token and no secrets. The publish job, which holds the npm token and the
write token, checks each tarball's name and version against the release and
uploads it with lifecycle scripts off. A version already on npm with other
contents fails the first attempt instead of being skipped.

* ci(publish): prerelease tag pushes publish only after a maintainer approves

A prerelease tag can come from any prerelease branch, which no PR review
covers. Tag-push runs now use the npm-prerelease environment, which requires
a maintainer's approval. Merged release PRs keep the npm-publish environment.

* ci(publish): keep every publish in the approval-gated npm-publish environment

npm's trusted publishers are pinned to npm-publish, and that environment now
requires a maintainer's approval with self-review prevented. A second
environment would fail npm auth, so the workflow keeps npm-publish for every
trigger. The docs and test name it as the approval gate.
2026-11-16 00:04:25 +00:00
James RussoandClaude Opus 5.5 b856a1d63f fix(parsers): bound canvas scaffold dimension extraction (#7873)
* fix(parsers): bound canvas scaffold dimension extraction

* chore(parsers): raise packed size budget for linear scaffold scanners

The bounded scanners replace three regexes with a small amount of
procedural code; @hyperframes/parsers packs to 210414 bytes (+1.2%).

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 00:00:41 +00:00
Michael Wang af0560c859 ci(publish): publish prebuilt tarballs from a job that runs no release-commit code (#7869)
Builds, lifecycle scripts and packing move to a pack job with a read-only
token and no secrets. The publish job, which holds the npm token and the
write token, checks each tarball's name and version against the release and
uploads it with lifecycle scripts off. A version already on npm with other
contents fails the first attempt instead of being skipped.
2026-11-15 23:21:03 +00:00
Miguel Ángel 56a2d0c53f fix(engine): a cached browser is used only when its files match the pinned build (#7865)
* fix(engine): a cached browser is used only when its files match the pinned build

* ci: install the pinned headless shell for the engine and producer test jobs

* ci: record the producer test job's new setup step for test reachability
2026-11-15 22:53:06 +00:00
Michael Wang a2f9267089 fix: snapshot escapes composition text in its output; stills sweep the transcode cache (#7832)
* fix(cli): snapshot shows control characters in composition text as escapes

* fix(studio-server): making or serving a still sweeps the transcode cache
2026-11-15 17:10:12 +00:00
Miguel Ángel ef42bef9c3 refactor(core): Studio's key combo and typing-target rules live in core (#7835)
* refactor(core): Studio's key combo and typing-target rules live in core

* chore(core): raise the packed size budget for the key-combo and typing-target subpaths
2026-11-15 15:42:04 +00:00
Michael WangandClaude Opus 5.5 ac02474105 fix(cli): play and present check the Host like preview; local render leaves out outside files for a received composition (#7792)
* 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>

* fix(cli): play and present answer only local host names and allowed hosts

play and present listen on every interface. Each request now passes the
same Host check preview uses: localhost, loopback addresses and this
machine's own addresses and names are answered, and any other host name
gets a 403 naming HYPERFRAMES_PREVIEW_ALLOWED_HOSTS until it is listed
there. Phones and other machines on the network still open them by LAN
address or .local name.

* fix(cli): a local render of a received composition leaves out files outside the project

When the composition a local render opens is listed in the project's
received-files record, hyperframes render (full and range) no longer
brings in files outside the project. It prints one line naming the
references it leaves out and why. An unreadable record counts as
received. A project whose entry is the person's own, or that has no
record, renders exactly as before.

* fix(cli): received-render scan reads safely and treats an unreadable record as unknown

The scan behind the received-composition notice skips a file it cannot
read, finds url() references with a linear forward scan, and reads at
most 2 MB of each file. An unreadable received-files record no longer
counts as everything received for local render: the render keeps
outside files and names the record it could not read. Publish and cloud
upload still treat it as received. The notice now says the render stops
on a sub-composition outside the project rather than leaving it out.

* fix(cli): the studio render of a received composition leaves out files outside the project

The Studio render route applies the same rule as hyperframes render:
when the composition it renders is listed in the received-files record,
the job does not bring in files outside the project, and the server log
names the references it refuses.

* chore(cli): name the unreadable received-files record helper without a comment

* fix(cli): local render refuses outside files when any composition it plays was received

The received-file rule for local render (CLI and Studio) now checks
every page and stylesheet the render pulls in, not only the entry, so
an own index.html that plays a received scene also reads nothing
outside the project, and the notice names the received file. An
unreadable, truncated or empty received-files record refuses outside
files too, as publish and cloud upload do, and the notice names the
record it could not read.

* fix(cli): decide a received render from the files the compiler reads

Local render (CLI and Studio) now leaves outside-file handling as it is
for a project with no received-files record or an empty one, without
scanning anything. When the record lists files, the compiler's own read
list for the composition decides: the bundler runs out of process with a
deadline and reports every project file it reads, so stylesheet imports
and files past any scan limit count. A received file in that list, a
build that fails or runs past its deadline, or an unreadable record
refuses outside files. The scan that names refused references in the
notice is advisory only: it guards every file system call, tracks visited
files by real path, and caps the files and bytes it reads.

* fix(cli,producer): decide a received render with the render compiler's own composition traversal

The producer exports renderCompositionFiles, which walks
data-composition-src with the same resolution, normalization and private
file rules the render's sub-composition pass uses; that pass now calls
the same helper. The received-render decision adds those files to the
bundler's read list, so leading-slash and percent-encoded references the
render reads count. The advisory scan resolves compositions the same way
and reads template contents.

* fix(cli): refuse outside files in a local render whenever the project has received files

A local render (CLI and Studio) reads nothing outside the project when
the project's received-files record lists any file, or cannot be read.
No static list matches what a render consumes: the page loads its
stylesheets and scripts through the browser at capture time, and
scripts can load more, so the decision no longer depends on one. The
reference scan stays only to name what the notice says is left out. This
drops the out-of-process bundler read list and the producer composition
walk added for that decision.

* fix(cli): refuse outside files only when a received file can load other files

A local render (CLI and Studio) reads nothing outside the project when
the received-files record cannot be read, or lists a received file that
can reference others: an .html, .htm, .css, .js, .mjs, .cjs or .svg
name, or content that reads as HTML, SVG or CSS. A project that only
received images, video, audio or fonts keeps bringing in outside files
as before.

* fix(cli): keep outside files only when every received file is positively media, a font or an image

A local render keeps bringing in outside files only when each file the
received-files record lists has a known media, font or image extension
and starts with that type's signature bytes. Any other received file, a
listed file that is missing or unreadable, or a mismatch between name
and content refuses outside files. An ancestor record's entries now
match a subfolder whose name is spelled in another Unicode form; the
entry keeps its own spelling on disk.

* fix(producer,core): a sub-composition must be an .html file

The render compiler and the runtime load a data-composition-src only
when it names an .html or .htm file. Any other file, such as an image or
video, is refused as a page: render stops naming it, and the runtime
reports the load failure without fetching it.

* fix(producer,cli): the render and static file servers forbid type sniffing

Both servers send X-Content-Type-Options: nosniff with every response,
so the browser loads a file only as the type its extension names: an
image or video cannot run as a script or apply as a stylesheet. .cjs is
served as JavaScript.

* test(cli): a received media file in a composition slot is refused as a page

* test(cli): an empty nested received-files record cannot hide an outer record's received page

* fix(cli): a received media file reached under another name refuses outside files

The received-render decision now compares file identities, not names.
It walks the project once, bounded by entry count and time, and refuses
outside files when a hardlink or a symlink with a name that is not
media reaches a received file, or when the walk cannot finish. A
received file with no identity matches nothing, as in the received
files check.

* fix(cli): compare received files by link target and keep outside files for an empty record

A received media file and every other project name are now compared by the
identity of the file they reach with links followed. A linked folder that
leads outside the project, or a file whose identity cannot be read, counts as
unchecked and refuses outside files. An empty received-files record keeps
outside files without walking the project.

* chore: raise the producer unpacked size budget for the composition file checks

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:48:01 +00:00
Michael WangandClaude Opus 5.5 c4d60c347f fix: Studio media routes refuse cross-site load, CLI escapes terminal text, batch outputs stay in their folder (#7779)
* fix(cli): batch render outputs stay inside the --output folder

A row value may still name a subfolder of the folder written before the
template's first placeholder, but a value that resolves outside it stops
the batch before any folder is made or file is written.

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

* fix(cli): project text shows control characters as visible escapes

compositions, lint, snapshot and info --media print composition ids, sources,
element ids, lint messages and media paths through one helper that writes
C0, DEL and C1 control characters out as \xNN, so they reach the terminal as
text. The CLI's own colors are unchanged.

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

* fix(studio-server): waveform and peaks key one cache entry per file and refuse other sites

Both caches are keyed on the resolved project-relative path, so another
spelling of the same file (a doubled or trailing slash) reads the cached
peaks instead of decoding again. Waveform and peaks requests that another
site makes are refused the way thumbnail requests already are; the Studio
page asks for both as itself.

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

* fix(studio-server): preview stills run at most four at a time

A video's stand-in still is made through a small job queue: four at once,
32 more waiting, and a 503 with Retry-After beyond that. A waiting request
whose client goes away leaves the queue without starting ffmpeg.

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

* fix(cli): batch output folder check keeps backslash names and row-named paths

A trailing backslash counts as a separator only where it is one, and the
check compares path segments. A template that starts with a placeholder names
no folder, so each row's value is the whole output path as before.

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

* fix(cli): lint header shows control characters in file names as escapes

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

* fix(studio-server): a finished or in-progress still never waits for a still slot

Only a still that is neither on disk nor already being made takes one of
the four slots, through a hook resolveStill gives the route. Waiters queue
without a cap and nothing answers 503, since a poster is never asked for
again. A waiter whose client leaves still never starts ffmpeg; a request
that shared that waiter's still tries again on its own.

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

* chore: raise the studio-server packed budget to 172000

main already packs about 170 KB against a 168500 budget; the request guards,
still slots and cache-key change here add about 550 bytes.

* fix(core,studio-server): a preview served to another site offers no editing port

When the Studio server answers a preview document to another site's
request, it now marks the document, and the runtime's editing agent
ignores every connect in a marked document. The Studio's own frames,
which load the preview from the same origin, keep the editing port.
The marked copy carries no ETag, so it is never revalidated in place of
the unmarked one.

* fix(studio-server): a media still stops when no request waits on it

Each still job now counts the requests waiting on it. A request whose
connection closes leaves the job, and when the last one leaves, the
job's ffmpeg is killed and the job is forgotten, so the next request
starts afresh. A caller that passes no signal keeps the job running,
and a request that has already closed starts nothing.

* test(studio-server): group the still cancellation tests after the real-ffmpeg still test

* fix(studio-server): a preview framed by another site is never revalidated

A frame load of a preview from another site now drops If-None-Match and
If-Modified-Since before the route answers, so it always gets a fresh,
marked document instead of a 304 that could reuse the unmarked copy a
browser cached for the Studio's own page on the same site. Subresource
loads keep their validators.

* fix(cli): check findings and keyframes headers show control characters as escapes

check prints each finding's message, source file, selector and fix hint, and
keyframes prints each composition's name and source, through terminalText.

* test(studio-server): a request sharing an abandoned still waiter gets its still

* chore(studio-server): raise the unpacked size budget for the still job slots and cross-site guards

* fix(cli): layout and contrast lines in check show control characters as escapes

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:57:32 +00:00
Michael Wang ded5e3eec2 perf: CSS url, @import, @font-face, style and comment scans run in linear time (#7809)
* 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.
2026-11-15 08:22:52 +00:00
Michael WangandClaude Opus 5.5 f667111d17 fix(producer): keep the render server local unless a token guards it (#7814)
* fix(producer): keep the render server local unless a token guards it

startServer listened on every interface and trusted any caller without
Origin/Sec-Fetch-Site headers, while /render, /render/stream and /lint used
caller-supplied projectDir, entryFile and outputPath as arbitrary paths.

- Listen on 127.0.0.1 by default (hostname / PRODUCER_HOST). A non-loopback
  address needs authToken / PRODUCER_AUTH_TOKEN, which createProducerApp then
  requires as a bearer token on every route but /health. Log the real address.
- Confine request paths, symlinks included: projectDir to projectsDir
  (PRODUCER_PROJECTS_DIR, default cwd), entryFile to the project, outputPath
  to rendersDir, checked before any directory is created. The debug dir is
  never project content.
- Refuse debug: true unless allowDebug / PRODUCER_ALLOW_DEBUG=1, drop
  perf.renderId from responses, and stop echoing resolved absolute paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqRB2bN8KsmaW2KUs9k6cb

* fix(producer): apply the request policy at the public app, not the shared handlers

createRenderHandlers is also mounted by trusted embedded services that pass
absolute temp project and output paths and no projectsDir. Confining it by
default turned their renders into 400s.

- New confineRequests option: createProducerApp and startServer default it to
  true; createRenderHandlers keeps its old contract unless a caller opts in.
- Under the policy, /lint refuses an entry that leaves the project through a
  symlink or reaches the debug dir, through an optional guard on
  prepareHyperframeLintBody (trusted callers are unchanged).
- A blank auth token counts as no token, so it no longer unlocks a
  non-loopback listen address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqRB2bN8KsmaW2KUs9k6cb

* chore(producer): trim added comments and raise the producer size budget

The comment ratchet refused the comment lines the hardening added to
server.ts and hyperframeLint.ts; they are cut or folded into one line.

The producer tarball grew to 900392 bytes packed (budget 890000, 1%
tolerance) with the auth middleware, request policy and lint entry guard,
which ship in each of the producer's server bundles. The budget moves to
901000 to cover that code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqRB2bN8KsmaW2KUs9k6cb

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 08:17:05 +00:00
Michael Wang b7c26ff844 fix(catalog): payload check treats the optional caption-overrides.json as absent, not failed (#7813)
* fix(registry): catalog payload check passes a missing caption-overrides.json

The runtime requests an optional caption-overrides.json on any page with a
.caption-group and reads a 404 as "no overrides". The docs host has no such
file, so every caption payload that uses .caption-group (caption-emoji-pop,
caption-neon-accent, caption-pill-karaoke, caption-weight-shift) failed
verify:catalog-payloads with a 404, its console line, and an aborted request.
The check only ran on those payloads once a change regenerated them.

The verifier now sets that miss aside, as `hyperframes validate` already does
through shouldIgnoreHttpError. A non-404 status, any other failure on that URL,
and an invalid overrides file still fail. To match the console line by URL,
checkPageLoads now appends the resource URL to Chrome's "Failed to load
resource" message, whose text leaves it out.

* style(producer): name the failed resource URL instead of commenting it
2026-11-15 07:22:20 +00:00
Michael WangandClaude Opus 5.5 55b5147098 fix: Cloud Run renders reach only public addresses; frame cache folder is private to its user (#7777)
* fix(gcp-cloud-run): render pages cannot reach the service's own dispatch endpoint

The Cloud Run image now sets PRODUCER_RESTRICT_PAGE_NETWORK=true, so a
rendered page reaches only its own project server and public addresses,
not loopback ports or the metadata server. The dispatch endpoint also
refuses any POST that carries an Origin header: browsers send one on every
POST and Cloud Workflows never does.

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

* fix(engine): the default frame cache folder is private to the user who renders

The default extraction cache sits in the shared temp folder. It is now
created with mode 0700, an existing one owned by the same user is closed
to others (its entries stay, so cache hits carry over), and one that is a
link or belongs to another user is not used: that render runs without the
cache and prints a warning. The animated GIF cache under the same folder
follows the same rule. A folder set with HYPERFRAMES_EXTRACT_CACHE_DIR is
left as it is.

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

* feat(gcp-cloud-run): a Terraform variable turns the page network restriction off

restrict_page_network (default true) sets PRODUCER_RESTRICT_PAGE_NETWORK on
the service. The package README and docs say what the restriction refuses
and how to turn it off for trusted compositions that need private hosts.

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

* test(engine): restore an unset TMPDIR as unset after the cache-root tests

Assigning undefined to process.env stores the string "undefined", so on a
runner with no TMPDIR every later test made its temp folder under ./undefined.

* test(engine): the frame-extractor link test also restores an unset TMPDIR as unset

* chore(engine): raise the packed size budget to 500000

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 06:34:11 +00:00
ClippyandClaude Opus 5.5 28d4ba50f1 fix(deps): refresh zod, smol-toml, aws-cdk-lib and related resolutions in bun.lock (#7741)
* fix(deps): refresh zod, smol-toml, aws-cdk-lib and related resolutions in bun.lock

Lock-only re-resolution within existing ranges:
- zod 4.4.3 -> 4.6.7 (GHSA-mrhx-c7xc-m3w5)
- smol-toml 1.6.1 -> 1.9.0 (GHSA-7w5x-hrqm-74c2, GHSA-r4xh-jqrq-34v2)
- aws-cdk-lib 2.254.0 -> 2.260.0 (GHSA-vcrf-j523-4mrf)
- fast-xml-parser 5.7.3 -> 5.12.0 (GHSA-474x-hrwr-fgx4)
- @babel/core 7.29.0 -> 7.29.6 (GHSA-4x5r-pxfx-6jf8)
- postcss-selector-parser 7.1.7 -> 7.1.8

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

* chore(inspector): raise unpacked size budget for postcss-selector-parser 7.1.8

The inspector bundles postcss-selector-parser; 7.1.8 inlines its escaping
(drops cssesc) and adds the hardened parser paths, which grows the unpacked
inspector bundle by about 10 KB and tips it past the 1% tolerance.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 05:42:15 +00:00
Miguel Ángel 04ee926d97 fix(engine): render refusals name the address an IPv6-mapped or NAT64 host carries (#7802)
* fix(engine): render refusals name the address an IPv6-mapped or NAT64 host carries

* chore(engine): raise the engine size budget for bounded downloads and refusal classes
2026-11-14 23:02:07 -05:00
James RussoandClaude Opus 5.5 7c7ff6d89e fix(docs): check catalog link values and keep them out of copied commands (#7783)
* fix(docs): check catalog link values by type and isolate the preview

A catalog page restores its variable values from the query string, so a
shared link decides what the preview composition is given. Values from a
link are now kept only when they fit the variable they name: a finite
number, a boolean, one of an enum's options, a colour, an image address,
or text with no angle brackets. Anything else opens at its default.

The preview player now runs the composition with an opaque origin
(sandbox-origin="opaque"), so a composition cannot reach the docs page.
The bootstrap already drives the player only through its API and
postMessage, and every docs asset is served with CORS, so playback,
seek-on-remount and edits behave as before.

chatgpt-exchange sets its editable text with textContent instead of
building innerHTML from it. A new check, check:registry-innerhtml, fails
any registry file that reads variables and adds markup writes; the files
that do so today are listed with their current counts and may only go
down.

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

* fix(docs): keep a link's text out of copied commands until the reader sets it (#7785)

A catalog page restores tuned values from its link, and the install
command, the render command and the agent request carried those values
as if the reader had typed them. The commands quote only for bash and
zsh, and the agent request is pasted as the reader's own words.

The page now tracks which variables the reader set on it. A value that
only came with the link goes into a command when it is a number, a
boolean, or short text of letters, digits, spaces and plain punctuation,
and into the agent request only when it is a number, a boolean or one of
the item's own options. A page opened with values from its link says so
and offers "Reset to defaults", and the install command wraps instead of
scrolling so the whole line is visible.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 02:12:42 +00:00
James RussoandClaude Opus 5.5 9320c44e13 fix: docs image upload publishes only regular files, and CI rejects new symlinks (#7776)
scripts/upload-docs-images.sh synced docs/images/ with the AWS CLI's default
of following symbolic links, so a link committed under docs/images/ would
publish whatever it pointed to on the machine running the upload. The script
now stops before any AWS call when docs/images is not a real folder in the
checkout or when anything under it is a link or not a regular file, and the
sync passes --no-follow-symlinks as well.

A new check, scripts/check-symlinks.mjs, fails CI when a tracked symbolic
link is not one of the two the repo already means to have.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 00:47:08 +00:00
Michael WangandClaude Opus 5.5 870b1fa4dc fix(cli,studio-server): received-file guard covers subfolders and spellings; playlists named as media never reach ffmpeg (#7771)
* 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>
2026-11-15 00:33:29 +00:00
Michael WangandClaude Opus 5.5 12832e3a98 perf(lint): rules scan script, style and comment blocks in linear time (#7770)
* perf(lint): rules scan script, style and comment blocks in linear time

Several always-on rules matched open/any/close regexes over the whole
document, which rescan to the end from every unclosed opener, so lint
time grew with the square of the page on pages of unclosed <script,
<style, <pre or /* openers. Those scans are now forward passes in
lint/src/linearScans.ts that return exactly what the regexes did:
block-comment stripping, the malformed </script check, the style-tag
balance count, the visible-comment rule's protected blocks and tag
tracking, the structural line count, the script-src check, and the
slideshow island lookup.

A fuzz test compares each scan with its regex on 20,000 generated pages,
and 4 MB pages of unclosed openers finish in milliseconds. On a 140 KB
page of unclosed <script> openers lintHyperframeHtml drops from about
2.6 s to 45 ms.

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

* test(lint): compare each fuzz page in one assertion so the run fits the default timeout

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

* chore(player): raise the packed size budget for the bundled slideshow island scan

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 23:43:21 +00:00
Miguel Ángel a6ff3922b4 fix(engine): renders reach only public addresses from every part of the browser (#7758)
* 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
2026-11-14 16:38:35 -05:00
Miguel Ángel 8e0f196a8b fix(scripts): the comment check names a git too old for check-attr --source (#7750) 2026-11-14 17:00:47 +00:00
Miguel Ángel 32f562bbd0 feat(core): a folder with index.html is one a step can work on, apart from finding projects (#7734)
* feat(core): a folder with index.html is one a step can work on, apart from finding projects

isHyperframesProject needs index.html and a marker file, which is right for finding projects on a computer (a
website's folder must not be listed) but not for what a step works on. isCompositionFolder says that: any folder
whose index.html is the composition.

* build(core): raise core's unpacked size budget for the step folder rule
2026-11-14 14:02:28 +00:00
Miguel Ángel 45882027bd feat(cli): check warns when text leaves the 9:16 social safe areas (#7680)
* 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
2026-11-14 02:00:15 +00:00
James RussoandClaude Opus 5.5 6bdf929164 feat(studio): drag and resize on an opaque preview start from one gesture-start read (#7657)
* feat(studio): drag and resize on an opaque preview start from one gesture-start read

A gesture on a preview frame Studio cannot script read nothing from the
frame as it started. A drag snapped to nothing; a layer GSAP holds moved by
a CSS translate that its save then dropped; a resize grew from the overlay
rect, the layer's GSAP scale included; and the pointer reached the element
only through the canvas zoom.

The runtime answers a new `gesture-start` request. For each pressed element
it gives the overlay geometry, the transform-free layout size, how far the
centre moves per px of translate (probed the way a draft draws it, every
transform above it applied), and GSAP's x/y when GSAP owns its position,
with whether a tween moves it. It also lists the boxes of the page the
gesture can snap to, walked by the rule Studio's own snap collection now
takes from core.

On an opaque preview every press waits for that one read, on the existing
waiting-press path, and the gesture starts from it: the snap targets, the
move route and GSAP base (so the save writes GSAP's x plus the drag, not the
drag alone), the pointer-to-offset matrix, and the resize's base size. A
layer a tween moves is refused with a notice, since saving that move still
reads the frame.

Same-origin frames do not change: their presses start at once from the
element, and their snap collection walks the same elements by the same rule.

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

* chore(inspector): raise the packed size budget for the gesture-start runtime

The inspector bundles core's preview runtime. Main alone packs to 866206
bytes, 420 under the 1% tolerance on the old 858046 budget; the
gesture-start request adds 713 bytes (866919), which tipped the merge
queue's Build over. Set the budget to 880000 to leave room for the
remaining opaque-preview requests.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 19:42:26 +00:00
jf-hgeng 85503a352b test(cli): remove committed TLS private key and generate test certificates (#7644)
* test(cli): generate TLS fixtures instead of committing private keys

* test(ci): allow the intentional removal of plaintext TLS fixtures
2026-11-13 19:37:56 +00:00
Miguel Ángel d7202bd42a fix(release): draft the changelog from a freshly fetched origin/main (#7660) 2026-11-13 19:15:42 +00:00
James RussoandClaude Opus 5.5 2c2b399bfa fix(producer): local renders bring in only media, font, CSS and JS from outside the project (#7647)
* 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>
2026-11-13 16:26:19 +00:00
James RussoandClaude Opus 5.5 7e04f3cce8 feat(studio): canvas click, hover and timeline select read an opaque preview over its channel (#7637)
* feat(studio): canvas click, hover and timeline select read an opaque preview over its channel

The runtime answers a new pointer-targets request with the canvas pick and its
cycle stack; the hit-test moves to core so Studio picks by the same rule on a
frame it can script. A data: value under the description limit now arrives
whole, so a small data: image is selectable on an opaque frame. Drill-in,
hover, timeline clips known only by clip id, and the stand-in attribute reads
in double-click, ungroup, path-offset and the agent selection context work
there too.

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

* chore(core): raise the core unpacked size budget for the pointer-targets hit-test

The hit-test moves from Studio into core's editing runtime, which core ships
in its runtime bundles; CI measured the unpacked tarball at 4,329,030 bytes.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:16:20 +00:00
James RussoandClaude Opus 5.5 faff4e16a8 feat(studio): read overlay geometry from an opaque preview over its channel (#7628)
* feat(studio): read overlay geometry from an opaque preview over its channel

The runtime's editing channel gains a `geometry` request: per element
handle its client rect, the corners it paints at when rotated, whether it
renders, its clip-path, its source boundary's size, a group wrapper's
member rects, and optionally one element's descendant boxes. On a preview
frame Studio cannot script, the selection, child, group and hover boxes,
the root scale (from the mirrored stage size) and a press held across a
preview change read that geometry, with one read in flight at a time.
Same-origin frames keep reading the DOM directly; the measuring code they
use now lives in core so both paths share one rule.

Also from the review of #7613: opaque selections carry `hasAudio` and
`src` read off the description, a description with a cut attribute or
inline style builds no selection, a failed computed-styles or root read
builds none either, and the group refresh threads its frame and leaves a
group the user changed meanwhile. `findClosestByAttribute`, left without
a caller by #7613, is removed.

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

* chore(producer): raise the packed size budget for the runtime's geometry read

The producer ships the preview runtime, which now carries the editing
channel's `geometry` request and the measuring code it shares with Studio.
The packed tarball measured 888,810 bytes in CI against an 880,000 budget.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 00:26:30 +00:00
WaterrrForeverandClaude Opus 5.5 33304cff04 refactor(skills): move the Python encoding guard out of the skills root (#7606)
skills/python-encoding.test.mjs was the only loose file in skills/, whose
top level otherwise holds one directory per skill. It checks every skill's
Python scripts, so it is a repo-level guard and belongs next to the others
of its kind in scripts/ (check-skill-import-boundaries,
check-media-use-copy-parity).

Renamed to scripts/check-skill-python-encoding.test.mjs. The test now
resolves skills/ relative to its new home. The skills CI job no longer
finds it with its skills/ glob, so it is appended to SKILLS_TESTS next to
the copy-parity guard and added to the skills path filter. The
test-reachability manifest is updated to match, keyed to skills/**/*.py.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 19:58:01 +00:00
Miguel Ángel 5d2914f7ce fix(ci): a release fails its checks when its notes miss a commit merged after the cut (#7601)
* fix(ci): a release fails its checks when its notes miss a commit merged after the cut

* fix(ci): shorten the release checks comment

* fix(ci): find the last release by subject and say to link a deliberate omission
2026-11-12 11:39:42 +00:00
Miguel Ángel 1ec03c4e19 chore: release v0.9.38 (#7594)
* fix(scripts): release:prepare refuses a baseline that skips a release whose tag this clone lacks

* chore: release v0.9.38
2026-11-12 08:29:06 +00:00
James RussoandClaude Opus 5.5 03ddfb189f fix(producer): render servers only load assets from inside the project (#7579)
* fix(producer): render servers only load assets from inside the project

The HTTP render handlers and the distributed planner now compile with
outside-project imports off: markup that reaches a file beyond the project
directory (through ../, an absolute path, a file: URL or a symlink) is no
longer copied into the compiled directory, served to the page, probed or
extracted. Local `hyperframes render`, `--start/--end` range renders,
`hyperframes benchmark` and Studio renders pass allowOutsideProjectAssets
and keep importing outside files exactly as before.

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

* test(producer): render the symlinked-assets fixture as a trusted local render

The render-symlinked-assets fixture links src/shared to a sibling folder
outside the project to keep local renders working like preview. The
regression harness now reads renderConfig.allowOutsideProjectAssets from a
fixture's meta.json and passes it to the in-process and
distributed-simulated renders, and this fixture sets it.

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

* fix(producer): render servers read compositions and media only from inside the project

Without the trusted-local opt-in, a sub-composition or entry file that
leads outside the project once symlinks resolve is refused, the same as a
../ sub-composition already is. Local media that resolves outside the
project, compiled and download folders, including absolute paths, file:
URLs and percent-encoded ../ paths, is reported as a missing source and
never probed or extracted. Remote media fetched during the render keeps
working. A missing file is no longer probed for the compile-time advice.

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

* chore(producer): raise the unpacked size budget for the project-folder checks

The producer tarball grows by about 12.5 KB unpacked: the new checks live
in the compiler and render stages, which the index, public-server and
distributed bundles each include. No test files ship in the package.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 02:31:36 +00:00
Michael WangandClaude Opus 5.5 a243169f8a fix: keep private project files out of preview bundles and local sharing (#7563)
* fix(core): keep git metadata and env files out of bundled HTML

The bundler now checks every file it reads against the project's private
paths (git metadata and env files, spelled directly or through a link)
and leaves a refused reference as authored instead of inlining it.
Bundle options gain a canRead predicate; Studio's preview passes its own
private-file rule so the preview document matches what the file routes
serve.

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

* fix(studio-server): check capture read grants against the decoded path

A capture page's read grant now looks at the path the way the static
preview route decodes it, including encoded separators, so a URL that
resolves to a dotfile or into a dot-folder gets no CORS grant. Ordinary
project files keep loading in thumbnails.

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

* fix(cli): accept local share requests only from loopback connections

The local share routes already require loopback Host and same-origin
headers. They now also require the connection itself to come from this
machine, so a Studio bound to a network address still keeps sharing
local to the person running it.

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

* fix(studio-server): ask the bundler for Studio's private-file rule as plain data

The preview route passed a fresh `canRead` callback on every build. A host that builds on a
worker thread cannot send a function across, so it built on its own thread, and it could no
longer share one build between two same-content requests.

The bundler now takes `privateFiles: "studio"`, a plain string, and applies Studio's
private-file rule itself. That rule (git metadata, env files, and the app's records under
`.hyperframes/`) now lives in `@hyperframes/core/safe-path`, and studio-server reuses it.
The `canRead` option is removed.

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

* fix(studio-server): do not serve a preview main file linked to a private file

When index.html (or <id>.html) is a link to an env file or into git metadata, the
bundler refuses it and the route falls back to reading the main file from disk. That
fallback now skips a candidate that is a private project file, by the same rule the
file routes use. A main file linked from outside the project is still served.

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

* fix(producer): never inline git or env files as render sub-compositions

The render compiler resolved data-composition-src and inlined the file it named, so
`data-composition-src=".env"` put the env file's text into the render page. It now
refuses git metadata and env files with the same shared rule the bundler uses. The
pre-render check names the refused reference and stops the render.

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

* chore: raise the inspector unpacked size budget to 3,722,000 bytes

The inspector already sat about 36.8 KB over its 3,684,092 budget, just inside the 1%
tolerance. Moving Studio's private-file rule into core added a few hundred bytes to the
bundles it ships, which pushed it to 3,721,419 bytes and over the tolerance.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:31:24 +00:00
Michael WangandClaude Opus 5.5 9a048ac019 fix: find helper programs without a by-name lookup or the Windows working directory (#7562)
* fix(parsers): find helper programs by walking PATH in-process

The trusted lookup ran `which` by name through the full PATH before
applying the trusted-folder rule, so a relative or project-local PATH
entry could supply the lookup program itself. Walk the trusted PATH
folders in-process on every platform, as Windows already did, for
findTrustedExecutable, findFfBinary and the doctor's unzip check.

The walk keeps what `which` did for valid installs: first match in PATH
order, regular files only, and a leading `~` in a PATH entry read as the
home folder.

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

* fix(cli): start the media-use engine with the Windows working-directory lookup off

mediaUseEngineEnv now sets NoDefaultCurrentDirectoryInExePath for the
engine on Windows itself instead of relying on the CLI's own environment,
and keeps a value the person set. When no PATH folder passes the trusted
rule, PATH names a folder that is never created rather than an empty
value, which a shell or execvp reads as the working directory.

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

* fix(skills): helper scripts skip the Windows working-directory program lookup

On Windows a program started by name is looked up in the working
directory before PATH. The plugin launcher and the media-use, hyperframes
and figma helper scripts run inside project folders and start ffmpeg,
ffprobe, Python and other tools by name, either through the launcher or
directly from a standalone skill install.

Each skill now ships a small module that sets
NoDefaultCurrentDirectoryInExePath for the process (keeping a value the
person set), and every script that starts programs imports it first, so
the helpers and every program they start skip the working directory.
Tools installed on PATH resolve as before; macOS and Linux are
unaffected. A test checks that each such script loads the module.

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

* fix(cli): ship the Windows lookup guard with the CLI's media-use scripts

The CLI build replaces the published media-use scripts/lib folder with
packages/cli/src/media-use/lib. That folder had no windows-exe-search.mjs,
so every bundled media-use script that imports it, including the engine
behind `hyperframes media-use`, failed to load on every platform.

The guard is now a generated copy in the CLI lib, next to the skill copies.
A parity test checks that each scripts/lib module a published media-use
script imports exists in the CLI lib.

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

* test(skills): load the win32 stub by file URL so the launcher test runs on Windows

On Windows, `node --import D:\...` reads the drive letter as a URL scheme
and fails before the launcher starts. The test now passes a file URL and
reports the child's stderr when it exits non-zero.

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

* fix(skills): resolve the Python helper's ffmpeg and drop relative PATH entries

extract-audio-data.py ran ffmpeg by bare name, which Windows looks up in
the working directory first. It now runs the absolute path that
trusted_program.find_program finds in absolute PATH folders outside the
working directory. A miss raises the same FileNotFoundError as before.

On macOS and Linux the shared guard now drops relative and empty PATH
entries, which point into the project folder, and leaves absolute ones in
order. If none is absolute, PATH is unset rather than left empty.

The guard census now also requires every skill Python script that imports
subprocess to resolve programs through trusted_program.

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

* test(skills): satisfy the Python UTF-8 and ffprobe argv sweeps

trusted_program.py carries the same UTF-8 stdio pin as every skill Python
script. The guard test's planted-program probe uses a literal-only argv,
which the ffprobe argv contract test reads as a capability check.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 18:47:16 +00:00
James RussoandClaude Opus 5.5 ef5cdeb0a0 feat(core): give the preview parent a typed editing port to prepare for an opaque frame (#7556)
* feat(core): give the preview parent a typed editing port to prepare for an opaque frame

Studio reads the preview frame's window and document directly, which stops
working once the preview runs in an opaque origin. This adds the runtime half
of the replacement, with no Studio consumer changed yet:

- runtime/editingPort.ts: a versioned request/reply protocol, a validator
  that turns any bad request into a typed error, and a promise-based parent
  client with request ids, timeouts and dispose. Exported as
  @hyperframes/core/runtime/editing-port.
- runtime/editingAgent.ts: on the parent's connect, the runtime hands
  window.parent a MessagePort once and answers hello, runtime-snapshot,
  wait-for-seek and set-loop-start on it. A connect from anything but the
  parent is ignored and does not use up the handoff.

Playback transport stays on the existing control protocol.

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

* fix(core): type the handed-off port under the runtime's strict index checks

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

* fix(core): emit the editing-port module so the published subpath resolves

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

* chore(producer): raise the packed size budget for the runtime's editing agent

The producer ships the preview runtime, which now carries the editing agent
and its request validator. The packed tarball measured 878,763 bytes in CI
against an 870,000 budget.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 16:54:46 +00:00
James RussoandClaude Opus 5.5 ffb13c3b62 fix(studio-server): load fonts and modules only in the Studio's own preview frames (#7553)
* fix(studio-server): let opaque preview frames load project fonts and module scripts

A preview framed with an opaque origin, such as the Compositions hover
preview, makes its font and module-script loads in CORS mode with
`Origin: null`. Without a CORS grant they failed: the frame fell back to a
system font and module scripts never ran.

The preview asset route now answers those two loads with
`Access-Control-Allow-Origin: null`, `Vary: Origin` and
`X-Content-Type-Options: nosniff`. The grant is chosen by `Sec-Fetch-Dest`,
which the browser sets and page script cannot: `font` for a font file and
`script` for a .js/.mjs file, served with the matching content type. A
page's own `fetch()` is always `empty`, so it still gets no grant and
composition script still cannot read project files.

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

* refactor(studio-server): keep opaque-frame grant comments within the package share

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

* fix(studio-server): let opaque preview frames load project fonts

Narrow the opaque-frame grant to fonts. Every sandboxed frame sends the
same `Origin: null` and fetch metadata, so a CORS grant for module
scripts could not be limited to frames the Studio itself serves. Module
scripts stay unloaded in the hover preview for now; fonts keep their
grant, and `Sec-Fetch-Dest: script` loads of .js/.mjs get none.

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

* fix(studio-server): load fonts and modules only in the Studio's own preview frames

A CORS grant to `Origin: null` reaches every sandboxed frame, whichever
page it sits in. The grant now lives on a per-project path instead:
`/projects/:id/preview/~<token>/...` serves exactly what `/preview/...`
serves, and only there do font loads (`Sec-Fetch-Dest: font`, a font file
served as `font/*`) and module-script loads (`script`, a .js/.mjs file
served as `text/javascript`) from an opaque frame get
`Access-Control-Allow-Origin: null`. The plain path gets no grant.

The token is an HMAC-SHA256 of the project id under a random per-server
secret, compared in constant time. The Studio reads it from
`/projects/:id/frame-token`, which refuses cross-site and same-site
requests, and the Compositions hover preview frames its composition at
the token path. Documents served there are re-based under the token and
carry `Referrer-Policy: no-referrer`.

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

* chore(studio-server): raise the packed size budget for the preview frame tokens

The per-project frame-token path adds server code to the package, and the
packed tarball measured 166941 bytes in CI against a 164800 budget. Set the
budget to the measured size plus about 1% headroom.

— Rames Jusso

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:47:32 +00:00
terencecho 04947d99f7 feat(cli): share rendered videos through unified reviews (#7135)
* feat(cli): share rendered videos through unified reviews (#7135)

* feat(share): attach editable project sources to reviews (#7137)

* feat(share): measure local sharing outcomes (#7138)

* feat(cli): stage the sixty-day publish transition (#7136)

* feat(studio): share review pages from local preview (#7140)

Advertise the CLI sharing bridge before bootstrapping it so standalone Studio does not
request unsupported routes. Preserve origin and session checks.

Budget the intended sharing artifact: clean main packs at 8,060,519 bytes versus
8,162,979 with sharing (8,169,168 in CI). Required policy and Unicode tables, bundled
sharing code, and Studio controls account for the growth. Set the packed-only budget
to 8,577,627, following the 5% headroom convention; retain the unpacked cap and all
package checks.

* fix(share): persist refusals and improve CLI retry feedback

* fix(ci): restore render diagnostics and include sharing workspace

* fix(cli): keep sharing owner error codes stable

* fix(share): clarify update feedback and align audience changes

* fix(share): clarify updates and avoid scratch-file rerenders

* fix(cli): report active shares and preserve update channels

* fix(cli): resolve update channel when checking registry

* fix(ci): refresh sharing package budgets after rebase

* fix(share): require consent before uploading project files
2026-11-11 06:26:24 +00:00
Miguel Ángel 2b86c49dc2 test(cli): give each test file its own home so renders never wait on another file's lock (#7526)
* test(cli): give each test file its own home so renders never wait on another file's lock

* test(cli): pin the cli test config after adding the per-file home setup
2026-11-11 02:58:32 +00:00
terencecho b37e4b026f fix(share): publish fallback locks with their owner (#7516)
* fix(share): publish fallback locks with their owner

* fix(share): cover lock reaping races and retry transient renames
2026-11-10 23:31:43 +00:00
Michael WangandClaude Opus 5.5 24508ce2da fix: harden docs snippets, SVG sanitizer, lint regexes, GSAP writers and registry pins (#7512)
* fix(docs): escape catalog preview values and the install command's --vars argument

The catalog preview embeds variable values as JSON that cannot close a
script element or attribute, accepts value messages only from the page
that embeds it, and reads only declared ids with primitive values from
the link. The install command shell-quotes its --vars JSON and keeps
only variable-id keys with primitive values.

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

* fix(core): fold CSS line endings before decoding escapes in the SVG sanitizer

A browser folds CR LF, CR and form feed into one newline before it reads
CSS escapes, so the whitespace after a hex escape can be a CR LF pair.
The sanitizer now does the same, so an escaped function name split by a
line ending is checked under its real name. The media-use bundle is
regenerated from the source.

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

* fix(lint): match template ids and CSS rules in linear time

A getElementById template literal is matched against document ids with
an in-order indexOf scan instead of a regex of joined wildcards, so the
time no longer grows with the number of placeholders. The CSS rule
scanners only start a match at the beginning of a brace-free run, which
finds the same rules without rescanning long brace-less text. Lint
results on every HTML file in the repository are unchanged.

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

* fix(parsers): keep GSAP writer output inside its script element

String literals and quoted keys the GSAP writers emit now encode a
script closer or comment opener as \u003c, so a value can no longer end
the inline script that holds the timeline. Strings without those
sequences are written exactly as before. The writers also refuse a tween
method outside set, to, from and fromTo, and a motion path whose
coordinates or curviness are not numbers, since both are emitted as code.

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

* fix(scripts): confine registry asset hosting to files inside the item

The asset hosting script now refuses a manifest path that leaves the
item directory or reaches its file through a symlink, before anything is
read, staged, uploaded or removed. A repository test fails when the
registry tracks a symlink or a manifest path that leaves its item.

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

* fix(registry): pin the map blocks' d3 and atlas files to exact versions

The five map blocks load d3 7.9.2, the build the d3@7 range serves today,
with a subresource integrity hash, and fetch us-atlas 3.0.1 and
world-atlas 2.0.2, the files their ranges serve today. The bytes are
unchanged, so the blocks render the same. A repository test fails when a
registry item names an npm CDN package by range, tag or no version.

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

* fix(registry): pin map blocks to d3 7.9.0

7.9.0 has been the stable release since 2024; 7.9.1 and 7.9.2 were published days ago. Pin the
long-standing version, with its subresource integrity hash.

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

* fix(registry): keep the map block PR source-only and formatted

Restore the generated catalog pages and payloads, which the catalog
publish job regenerates from the item sources. Name the us-atlas URL
in us-map-flow so the call fits on one line and formatting is unchanged.

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

* refactor(scripts): check registry asset containment with one prefix test

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

* fix(lint): scan simple CSS rules in linear time

The two CSS-rule scans in the gsap rules took a body that could cross
'{', so a closed style of many '{' with no '}' rescanned to its end from
every brace. A scanner now returns the same selector and body pairs and
remembers the next '}', so each scan is linear. Findings are identical
on every tracked HTML file.

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

* test(core): label the form-feed sanitizer case as a guard

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:01:29 +00:00
James RussoandClaude Opus 5.5 12d954a1fe ci(release): keep the publish job's write token out of the checkout (#7502)
The publish job's checkout persisted its contents:write token in
.git/config, where every later step, including the package install and
build, could read it. Check out without persisting credentials and give
the token only to "Create release tag", the one step that pushes. It
authenticates its own git calls through step-scoped GIT_CONFIG_* env and
masks the encoded value. The gh steps keep their own GH_TOKEN.

The workflow test now covers the checkout flag, which steps may receive
the token and under what name, the auth header the tag push actually
carries, and that nothing is written to .git/config.

— Rames Jusso

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:53:32 +00:00
James RussoandClaude Opus 5.5 265ec660b7 ci(publish): build the Lambda handler zip in a read-only job and verify its hash before release (#7495)
* ci(publish): build the Lambda handler zip in a read-only job and verify its hash before release

The handler zip build runs dependency install and bundling code. It moves out of the
publish job into its own job with `contents: read`, no secrets and no persisted git
credentials. The publish job downloads the artifact, checks its sha256 against the
build job's output, then pins and attaches it as before. A retried run still reuses
the zip already on the release.

Refs #7485

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

* test(ci): cover the read-only Lambda zip build job and the pin step's hash check

The publish workflow test still looked for the old "Build Lambda handler zip"
step. It now checks the build job's read-only permissions and the publish job's
dependency on it, and runs the pin step for the retry, matching-hash,
mismatched-hash and empty-hash cases.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:42:13 +00:00
Miguel Ángel 5c57999756 fix(producer): a render uses the CLI's own GSAP, so the default CDN's file needs no network (#7388)
* fix(producer): a render uses the CLI's own GSAP, so the default CDN's file needs no network

* fix(cli): the GSAP vendor lookup runs as ESM from source, so render starts again

* chore(producer): raise the unpacked size budget by the bundled-script module's 3 KB
2026-11-10 13:57:59 +00:00