Commit Graph
802 Commits
Author SHA1 Message Date
Miguel Ángel 7cb605c787 fix(studio-server): a preview file request no longer waits on a silent drive on the event loop (#8254)
* test(studio-server): a preview file request on a silent drive asks it nothing on the event loop

* fix(studio-server): a preview file request reads its project off the event loop

* ci(studio-server): refuse a new synchronous fs call in Studio's routes and history engine

* fix(studio-server): a preview file request and a miss stay off the event loop to the end

* test(studio-server): a shared still's remake no longer depends on busy requests' slot order

* fix(ci): the studio-server sync fs gate counts every sync call node:fs has, globSync included
2026-11-21 09:03:14 +00:00
Miguel Ángel ba81f67930 test(studio-server): a held save proves it never sleeps the thread, not a 100 ms stall bound (#8359) 2026-11-21 08:27:21 +00:00
Miguel Ángel a86ad213ed chore: release v0.9.77 (#8360) 2026-11-21 08:25:09 +00:00
Miguel Ángel d606c2a531 feat(studio-server): history names the bytes its next restore point would copy in (#8120)
* feat(studio-server): history names the bytes its next restore point would copy in

* fix(studio-server): count each unsaved blob once, and name the method for what it counts

* refactor(studio-server): a file the next restore point copies nothing of is its own check
2026-11-21 07:55:02 +00:00
Miguel Ángel 9bea44695b feat(studio-server): a host can name paths its project history never records (#8224)
* feat(studio-server): a host can name paths its project history never records

* test(studio-server): an ignored path loses its old targets, its pruned versions and every write

* fix(studio-server): an ignored path leaves old targets and the saved log, and is never written

* refactor(studio-server): opening a log that drops ignored paths is its own step

* perf(studio-server): a restore checks where each write lands without blocking the thread

* test(studio-server): an undo never writes an ignored file through a folder link

* test(studio-server): ignored kept files leave old undos, and no ignores keeps the link refusal

* fix(studio-server): ignored paths leave old kept files; only the host's rule skips a linked write

* test(studio-server): the link refusal is the thrown error, and no redo is offered
2026-11-21 06:43:23 +00:00
Miguel Ángel e1b951586f perf(studio-server): a root preview's parse passes run off the request thread (#7934)
* perf(studio-server): a root preview's parse passes run off the request thread

* test(studio-server): a root build's page passes counted off the request thread, not timed

* chore(studio-server): the root deadline's name says it; no comment over the ratchet
2026-11-21 05:56:44 +00:00
Miguel Ángel 7df3ae0a51 fix(studio-server): an undo never deletes a file a page it leaves still names (#8186)
* test(studio-server): an undo keeps a file a page it leaves still names

* fix(studio-server): an undo never deletes a file a page it leaves still names

* fix(studio-server): keep the undo's page check small and comment-free

* refactor(studio-server): the history reads file references without loading the file routes

* fix(studio-server): the history loads the file routes only when an undo would delete a file

* refactor(studio-server): history and renames share one core-free file reference matcher

* test(studio-server): undo steps past a kept upload and keeps a kept page's files

* fix(studio-server): undo steps past kept files and keeps what a kept page names

* refactor(studio-server): split the kept-empty undo check out of commit

* test(studio-server): a kept upload is redone, after reopening too, and a kept redo never traps undo

* fix(studio-server): an undo or redo records the files it kept, so redo and undo step past them

* test(studio-server): kept files go through redo's conflict check, newest redo and step paths

* fix(studio-server): a step over kept files checks later edits and names the files it writes

* test(studio-server): keep-later-edits over a kept upload leaves Cmd+Z on the earlier edit

* fix(studio-server): a redo that keeps every later edit records nothing, so Cmd+Z moves on
2026-11-21 04:47:30 +00:00
Miguel Ángel bf966b0cf3 chore: release v0.9.75 (#8343) 2026-11-21 04:47:22 +00:00
Miguel Ángel 63d1bb5596 fix(studio-server): history reads a project's folder off the thread when opening and pruning (#8340) 2026-11-21 03:22:10 +00:00
Miguel Ángel 80d968a94c chore: release v0.9.74 (#8338) 2026-11-21 01:44:02 +00:00
Miguel Ángel 047bd87dc9 chore: release v0.9.73 (#8277)
* chore: release v0.9.73

* docs(release): add main's later fixes to the v0.9.73 notes

* docs(release): add main's newest fixes to the v0.9.73 notes

* docs(release): add main's latest fixes to the v0.9.73 notes
2026-11-20 17:32:37 -05:00
Michael Wang 12eab05b5a fix(studio-server): refuse a sub-composition preview past the render's limits (#8308)
* fix(core): give the preview bundler the render's expansion budget

The preview bundler inlined every sub-composition mount with only a depth
limit, so a few small files that mount each other many times assembled a
page without bound. The producer's expansion budget now lives in core, and
the bundler charges every mount and the scripts and styles generated for
it to that budget, and checks each file's size before reading it. Studio
preview shows the refusal instead of falling back to the raw page, whose
mounts the browser would expand the same way.

* refactor: drop comments the names already carry

* fix(studio-server): refuse a sub-composition preview past the render's limits

The single sub-composition page is served without bundling its mounts, and
the browser runtime then fetches one copy for every data-composition-src
host in it, with no count or byte limit. The page build now charges each
host the browser will fetch to the shared expansion budget, reading each
target's size once, and the route serves the preview's refusal page.

Also moves the preview route's size-limit check above the comment it had
displaced, and uses core's check through a light subpath.

* fix(core): give the preview bundler the render's element cap

#8295 added a 100,000-element cap to the render's expansion budget. The
preview bundler now passes chargeElements to the shared inliner too, so
preview refuses the same compositions.

* fix(studio-server): charge a percent-encoded composition src for the file it serves

The comp page build looked up each data-composition-src by its raw text, so
an encoded spelling such as b%69g.html counted as a mount but was charged
0 bytes, while the preview route decodes it and serves big.html. Resolve
the same decoded path the route serves.

* test(core): give the preview fan-out budget test a 30 s timeout

The flake gate saw it pass 9 of 10 runs under CPU contention, timing out
at the default 5 s. The neighbouring scoper bound tests use 30 s too.
2026-11-20 22:09:10 +00:00
Michael Wang 19253b3c86 fix(core): give the preview bundler the render's expansion budget (#8306)
* fix(core): give the preview bundler the render's expansion budget

The preview bundler inlined every sub-composition mount with only a depth
limit, so a few small files that mount each other many times assembled a
page without bound. The producer's expansion budget now lives in core, and
the bundler charges every mount and the scripts and styles generated for
it to that budget, and checks each file's size before reading it. Studio
preview shows the refusal instead of falling back to the raw page, whose
mounts the browser would expand the same way.

* refactor: drop comments the names already carry

* test(core): give the preview fan-out budget test a 30 s timeout

The flake gate saw it pass 9 of 10 runs under CPU contention, timing out
at the default 5 s. The neighbouring scoper bound tests use 30 s too.
2026-11-20 21:22:17 +00:00
Miguel Ángel 5f024e34e2 fix(studio): thumbnails of compositions with no code of their own load in under a second (#8316)
* fix(studio): thumbnails of compositions with no code of their own load in under a second

Both thumbnail paths (the CLI's preview server and Studio's dev server) waited up to 5 s for
a GSAP timeline before shooting a card. A composition with no script never registers one, so
each of its cards took the full 5 s, and the route shoots one card at a time, so the third
card came at about 16 s.

The wait cannot simply go: a composition may register its timeline late, in a timer or a
load handler, after the runtime is ready, and shooting it then shows the wrong moment.

So the preview route now marks the page a thumbnail loads when nothing on it can register a
timeline: no script but Studio's own (the runtime, GSAP core, an import map, the registry
line), no inline event handler, frame, template or child composition loaded at run time, and
no Studio motion. A marked page is shot once the runtime is ready. Every other page is held
for its timeline exactly as before.

The rule lives once, in studio-server, and both thumbnail paths wait on it.

fails without the fix: "is skipped for a composition with no code of its own" and "holds for
a composition whose script registers its timeline late"
(packages/studio-server/src/routes/preview.thumbnailMark.test.ts), "thumbnailSeekReadyInBrowser"
(packages/studio-server/src/helpers/screenshotClip.test.ts), "hasAuthoredCode"
(packages/studio-server/src/helpers/authoredCode.test.ts), and "holds a thumbnail's shot on
the thumbnail readiness rule" (packages/cli/src/server/studioServer.test.ts and
packages/studio/vite.browser.test.ts).

* test(studio-server): the thumbnail mark test builds its page from elements, not parsed text

The test read the served page back through DOMParser and innerHTML to hand its metas to the
readiness rule, which code scanning reports as DOM text reinterpreted as HTML. It now finds
the served page's meta tags with the compiler's own tag scanner and creates each one as an
element, so no text is parsed as markup.

Also adds a row to the code check's table: a script inside an inline SVG counts as code.

fails without the fix: "is skipped for a composition with no code of its own"
(packages/studio-server/src/routes/preview.thumbnailMark.test.ts) still fails when the route
writes no mark.
2026-11-20 21:19:26 +00:00
Miguel Ángel 88c22a77f4 fix(studio-server): saving history on a drive that stops answering no longer freezes the app (#8294)
* fix(studio-server): saving history on a drive that stops answering no longer freezes the app

* test(studio-server): read the saved video state through one handle

* test(studio-server): open the silent state file by name only once
2026-11-20 15:35:09 +00:00
Wenbo ZhuandClaude Opus 5.5 4e3c960457 fix(cli): preview answers unknown paths with an inert refusal, not the Studio shell (#8161)
* fix(cli): preview answers unknown paths with an inert refusal, not the Studio shell

Studio routes by location.hash only, yet the preview server answered every
unknown GET with the Studio shell (200, same origin, query kept). An OAuth
redirect to the preview port (/oauth/callback?code=...&state=...) therefore
re-mounted the project, and project script read the code from the address.

The shell is now served only at / and /index.html. Any other path gets a
plain-text 404, and a request carrying `code` or `state` at any path (entry
and preview routes included) gets a plain-text 400. Both carry a sandbox CSP
(opaque origin), COOP same-origin, frame-ancestors 'none' / X-Frame-Options
DENY, nosniff, no-referrer and no-store, and never echo the request.

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

* fix(studio): preview's Vite modes refuse an OAuth return too

`preview` from a source checkout (dev mode) and with the local studio
(HYPERFRAMES_LOCAL_STUDIO=1) run packages/studio/vite.config.ts, whose SPA
fallback served the Studio shell at /oauth/callback?code=... with no COOP or
sandbox. devProjectApi now refuses a `code` or `state` at any path as its
first middleware, with the same inert response as the embedded server.

The refusal moves to @hyperframes/studio-server so both servers share one
helper.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:31:56 +00:00
Miguel Ángel 95a8a91b5e fix(core): a redo in a sealed preview puts Studio's edit marks back in place (#8264)
* fix(core): a redo in a sealed preview puts Studio's edit marks back in place instead of reloading

* fix(core): Studio's motion marks keep the reload; name the edit marks instead of commenting

* fix(core): a restore that needs the reapply script, or drops a motion mark, reloads

* fix(core): a restore waits for the reapply script to start, and any quoting finds its marks

* refactor(core): name the reapplied-mark check instead of commenting it

* fix(core): an in-place undo re-run refuses a reapplied mark until the reapply script started

* test(core): keep the soft-reload refusal test's comment under the line limit
2026-11-20 07:26:49 +00:00
Miguel Ángel 07928702f8 fix(studio-server): preview copies of long clips with sound finish again (#8253)
* fix(studio-server): preview copies of long clips with sound finish again

The piece join ran with ffmpeg's -xerror once it moved onto the shared concat input, which made the timestamp repair at each seam of a clip with sound fatal: the copy failed, its pieces stayed, and the clip waited for a copy that never came. The join opts out of -xerror; the video-only render joins keep it.

* fix(studio-server): a preview copy that joins short is refused and made again

Only a join of pieces with sound runs without -xerror, and every join is measured before it is kept: a copy shorter than its pieces is refused and its pieces are removed, so the next attempt makes them again. The sound test reads ffprobe's JSON so CRLF output parses too.

* fix(studio-server): a preview copy is measured against its own pieces

The join was compared with the source container's length, which counts tracks the copy leaves out, so a whole copy of a source with a longer subtitle or alternate audio track was refused on every try. It is now compared with the summed length of its pieces, which carry only the streams the copy maps; a piece that cannot be measured refuses the join.

* fix(studio-server): every piece of a preview copy is checked against its own stretch

The copy's length now comes from the picture and the sound it keeps (stream durations, or the Matroska DURATION tag), not the container, so its stretches end where those streams end. Each piece and the joined copy are measured against their own stretch, so a short piece can no longer lower the bar. A caller that leaves while the copy is measured stops the measuring, and a left copy is never written to the cache.

* fix(studio-server): long preview copies keep only the picture in pieces and add the sound once

AAC pieces overlap at every seam (each piece's priming frame reaches back into the one before), so a strict join refuses them. Pieces now carry only the picture and join strictly, exactly like the render joins; the sound is encoded once from the source and put with the picture by a stream copy that keeps both on the source's timeline. This replaces the length checks of the earlier commits, and old pieces with sound get a new name tag so they are never joined as picture-only pieces.

* fix(studio-server): each picture piece of a preview copy starts exactly where its stretch does

At a frame rate that does not divide 15 s, such as 29.97, every piece ran about 15 ms long and the join placed the next piece after it, so the picture drifted from the continuous sound (600 ms over 10 minutes). The join list now gives each piece its stretch's length (ffconcat duration), so pieces land on the source's timeline and the offset stays within a frame.

* fix(studio-server): a preview copy of a clip whose picture starts late keeps that start

On ffmpeg 8 the piece join moved the first piece to zero, so a picture that starts after the sound lost its lead against the sound added later. The join now keeps each piece's own timestamps (ffconcat inpoint 0 with each stretch's duration, and -copyts), on ffmpeg 7 and 8 alike. The long-source path moves into copyInPieces.

* fix(studio-server): a preview copy never keeps a short or broken piece from a stopped copy

A piece left by an earlier run is made again when it runs short of its stretch; when the join refuses one, every piece is dropped and made again once in the same run. A refused join no longer leaves its pieces or a picture temp behind; a stopped one keeps its pieces.

* fix(studio-server): a resumed preview copy remakes a piece a frame short and stops on cancel

A piece left by a stopped copy now has to run its stretch to within half a frame. The pieces are measured one at a time, and leaving the copy stops the running ffprobe (probeMediaMetadata takes a signal) and frees the copy.

* refactor(studio-server): read the piece check's frame rate outside the copy setup

* test(studio-server): run the real-ffmpeg join tests in their own file, inside the flake gate's limit

The flake gate runs each changed test file under full CPU load with 120 s per run. With this change's real-ffmpeg join tests added, proxyTranscoder.test.ts took about 108 s a run at a6d62ae2 and went over at 56cf7c74. Those tests move to proxyTranscoder.seams.test.ts; under 4-core load the two files take 15 s and 32 s.

* test(studio-server): keep the real-ffmpeg join tests inside the flake gate's limit

The seams file went over the gate's 120 s per run. Three tests whose checks the others already make are gone (plain copy with sound, the picture-and-sound-together clap case, the 5 s piece), each clip is measured in one ffmpeg pass, and the stopped-copy tests have their own file. On 4 busy cores the files take 15 s and 10 s. The cut piece keeps its header now, so the test reaches the retry after a refused join.
2026-11-20 06:29:05 +00:00
Ular Kimsanov 2c3427089c fix(share): ask before sharing from Studio and bind each action to the confirmed review (#8268)
* fix(share): ask before sharing from Studio, naming the review it changes

A composition's script runs on Studio's origin by default, and a received
folder's .hyperframes/review.json can point Studio at an existing review.
Every share action except sign-in now asks the person first, naming the
review (its link), who can open it, the workspace and whether project files
are uploaded. The request carries the manage link of the review that was
shown, and the server refuses it with share_target_changed when the
project's review no longer matches, so nothing is shared or changed.

* fix(share): bind each Studio share action to the review id the person confirmed

Studio now gets the id and title of the review an action reaches, including a folder
whose record names a review it never opened (a received folder can ship one). The
confirmation names that review, its workspace and who can open it, and says plainly
when a folder arrives already linked. Actions carry the confirmed id; a missing one is
refused as confirmation_required and a different one as share_target_changed, and
after that refusal Studio drops the earlier choice. The docs describe the
confirmation and that project files are included only when chosen.

* fix(share): show the review title on one quoted line in the confirmation

* fix(share): say a linked share also sets who can open it, and check the new state fields

* fix(share): separate the question from the details and say when a title is unknown

* docs(share): name the review record without a path the citation check reads as a file
2026-11-20 06:02:05 +00:00
Miguel Ángel ce0932e047 fix(studio): a video with no size of its own keeps its file's size while a lighter copy plays (#8233)
* fix(studio): a video with no size of its own keeps its file's size while a lighter copy plays

The preview plays a smaller copy of a large video, and a video the film gives no
size took the copy's size: a 1920x1080 file in a 1080p film drew at 456x257 at
Quality 1/2 and 608x342 at Full, while a render draws it at 1920x1080. While a
copy plays, a rule keyed by the copy's address now gives the video its file's
shown size (its pixels' aspect and turn included), at zero specificity so any
size the film's own CSS sets still wins. Studio's media facts now carry the
pixel aspect and turn, read by the same code the engine uses.

* fix(studio): size only a video the film leaves unsized while its copy plays, as Chromium lays it out

A video whose box is its file's own size (300x150 before the file loads) gets a
plain width and height at that size while a smaller copy plays, through a
preview-only mark and a rule keyed by mark and copy address. A video the film
sizes in either direction is left to the film's CSS, so authored aspect
ratios, box sizing, containment and earlier rules lay out as before. The size
is the original's decoded size when the browser has it, else its facts with
narrow pixels stretching the height as Chromium does. ffprobe is asked for the
side data list, which 4.x also knows, in Studio and in the CLI. A video shown
with object-fit none or scale-down keeps its file.

* fix(studio): an unsized video keeps its size when its copy is made cold behind a still

* test(core): a held video gets its file back when waiting for its copy throws

* fix(core): a copy wait that throws counts as not served, so a held video gets its file back

* test(core): each proxy test resets its own runtime's copy reporting, so none reports into the next

* test(core): the stale-runtime test runs past the report throttle, as a finished test does

* test(core): a framed proxy test's runtime must not report its copies into the next test

* test(core): every proxy test runtime loaded fresh has its copy reporting reset after the test
2026-11-20 05:57:26 +00:00
Miguel Ángel cf28a00053 chore: release v0.9.72 (#8265) 2026-11-19 22:02:17 -05:00
Miguel Ángel 8cb1945c90 chore: release v0.9.71 (#8251)
* chore: release v0.9.71

* chore: release notes for v0.9.71 link the commit after the first cut

* chore: release notes for v0.9.71 add the two commits merged after the review
2026-11-19 22:11:45 +00:00
Miguel Ángel d106f9c8c7 fix: stop crashing on SVG elements named template (#8241)
* test: pages holding an SVG element named template

* fix: read template content only from HTML templates

* test: SVG elements named template in previews, inline mounts and lint

* fix: treat only HTML templates as scenes and inline mounts

* test: scene ids next to SVG elements named template

* fix: take scene ids only from HTML templates
2026-11-19 12:27:21 +00:00
Miguel Ángel 592a9feff9 chore: release v0.9.70 (#8234)
* chore: release v0.9.70

* chore: release notes for v0.9.70 link the 3 commits after the first cut
2026-11-19 06:55:39 +00:00
Miguel Ángel 089e5f6b49 fix(engine): refuse to join files whose path holds a line break (#8219)
* test: a concat list refuses paths whose folder name holds a line break

* fix(engine): write every concat list through one writer that refuses control characters

* test: name the line-break folders without slashes; skip them on Windows

* Revert "fix(engine): write every concat list through one writer that refuses control characters"

This reverts commit 97d482340a.

* Reapply "fix(engine): write every concat list through one writer that refuses control characters"

This reverts commit 7d723fd276.

* test(engine): a chunk concat list ends with a newline
2026-11-19 00:08:22 +00:00
James RussoandClaude Opus 5.5 3229c3a8da chore: release v0.9.69 (#8220)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:28:58 +00:00
Miguel Ángel 1929f299b4 fix(studio): a sealed preview keeps Studio's size, move and turn edits after a seek (#8212)
* fix(studio): a sealed preview keeps Studio's size, move and turn edits after a seek

* fix(studio): a sealed preview reapplies Studio's edits on each frame it seeks or plays to

* fix(studio): build the sealed reapply script from constants, never a caller's value

* fix(studio): a sealed preview reapplies Studio's edits after a redraw at the same time

* fix(studio): serve the seek reapply only into sealed preview documents

* chore(core): shorten the redraw count's doc line
2026-11-18 22:17:54 +00:00
Miguel Ángel 3ae9e7302d chore: release v0.9.68 (#8214) 2026-11-18 20:50:58 +00:00
Michael Wang fadad3f12d fix(studio-server): proxy joins list pieces by name; a future-dated lock can't hold waiters (#8204)
* fix(studio-server): proxy piece list names only the pieces, not their folder

The chunked proxy join wrote each piece as an absolute path into a concat
list in the system temp folder. A line break in a folder name above the
project ended an entry early, so the rest of the path could be read as
further list lines naming other local files.

The list now sits in the cache folder beside the pieces and names each
piece by its own generated file name, and ffmpeg runs the join from that
folder. No project or folder name is written to the list, so folder names
with line breaks, quotes, '#' or '?' all join only the copy's own pieces.
The CLI publish bake uses the same join and is covered too.

* fix(studio-server): a proxy copy lock dated ahead of the clock no longer holds waiters

A copy waits for another process's lock while that owner's lock, temp and
piece files keep changing. The newest modified time was taken as is, so a
lock or temp file dated in the future looked like fresh progress forever,
and the waiter held its transcode slot without end. Preview and the
publish bake could then wait with nothing running.

Each file's modified time now counts as no later than the moment the
waiter first saw that time. A file dated ahead of the clock ages from
then, so the waiter gives up within the stall window and frees its slot.
An owner that keeps writing still sets a fresh time on each change and is
waited for exactly as before, even beside a future-dated file.

* fix(studio-server): keep the absolute piece list and default folder on Windows

On Windows the working folder is part of the DLL search, and a long cache
folder path may fail to start a process from it. Windows paths cannot hold
a line break, so the piece join there lists absolute piece paths again and
starts ffmpeg from the default folder. Elsewhere it still runs from the
cache folder with bare piece names.

The line-break test now injects an unquoted list line, so the old join
really pulls in another file, and it checks that the copy holds none of that
file's frames. A spawn test checks the join's folder and bare list name.
2026-11-18 19:34:09 +00:00
Michael Wang 43582dcb72 fix(producer): resume and proxy joins reuse only pieces this install made (#8089)
* fix(producer): resume checks the segment file the join reads, not the manifest's path

A resumed segmented render now validates each reusable segment at its own
computed path in the segment folder. It must be a plain file, not a link, and
match a slice of this render's plan. The path a manifest records is never
opened or probed.

* fix(engine,producer): concat joins open only the list and encoder containers

Both concat-demuxer joins (the engine's chunk and segment concat and the
distributed assemble join) now pass a format whitelist of concat, mov and
matroska. ffmpeg applies it to every file the list opens, so a listed file
that is a playlist or manifest cannot pull in other files, while mp4, mov and
webm joins work as before.

* fix(producer): resume reuses only segments this install recorded

Segment manifests are now signed with an HMAC keyed by a per-install secret
kept in the HyperFrames config folder, outside every project. Resume trusts a
manifest only when its signature checks out, so a segment folder copied from
another machine or shipped inside a project is captured again, while a
render's own interrupted run resumes as before.

* docs(producer): restore the segment path ordering comment and rewrap resume docs

* fix(producer): replace an empty or short resume key file

A key file too short to use is now replaced by a fresh key instead of
disabling resume for good. A missing key is still linked into place, so
renders that create it at the same time share one key; a test runs eight
processes against one path to check that.

* fix(producer): warn under --resume when no resume key is available

When the resume key can be neither read nor created, for example on a
read-only home folder, a file system without hard links or a serverless
runtime, --resume now logs one warning that every segment will be captured
again instead of only reporting zero complete segments.

* fix(engine): fail a concat join at a list entry ffmpeg refuses

The concat demuxer ends the stream at a listed file it cannot open and ffmpeg
still exits 0, which cut the output short without an error. -xerror on the
concat input makes the join fail instead. mp4, mov and webm joins still exit
0.

* fix(producer): resume checks each reused segment's SHA-256

Each finished segment's SHA-256 is now recorded in the signed manifest. The
hash is taken once when the segment closes, and on resume only the files
about to be reused are hashed again, so a file swapped for another of the
same size is captured again.

* docs(cli): note that resume re-checks segment hashes and recaptures older segments once

* fix(studio-server): proxy joins only its own pieces, through the shared concat input

Studio's chunked proxy copy now names its pieces with a tag keyed by the
user's preview token, so pieces that arrive inside a project folder sit at
names it never looks up and every piece is encoded fresh. A stopped copy of
the user's own still continues from its finished pieces.

The piece join uses concatListInputArgs, now in @hyperframes/parsers so the
engine, producer and Studio share it. It allows only local files in the
concat, mov or matroska formats and fails at a refused entry. The cache sweep
recognizes both tagged and older piece names.

* test(parsers): prove the concat protocol whitelist with a data: entry

ffmpeg already refuses http:// in a concat list opened from a file, so the
test passed without the whitelist. A data: entry opens by default; the test
now asserts it is refused as not on the 'file' whitelist.

* fix(studio-server): only the copy's own tagged pieces count as lock progress

The copy lock counted any .part-<key>- file as the owner's progress, so a
piece shipped with a future modified time kept a stalled lock looking active.
It now counts only names under the copy's own tagged piece prefix. The cache
sweep removes untagged pieces past the usual age even while that copy runs,
and measures age in both directions so a future-dated piece is swept too.

* fix(studio-server): say once when proxy pieces cannot be keyed to the user

Without a preview token, piece names use a per-process secret, so pieces are
reused only within that Studio process. Studio now logs that once, so a copy
restarting from its first piece after a restart has a visible cause.

* test(studio-server): name the proxy join test for what it checks

* fix(producer): derive the segment manifest key from the preview token

Sign segment manifests with an HMAC key derived from the per-user preview
token instead of a separate key file. The token is created with an exclusive
open, so concurrent renders never end up with different keys, and it is only
used when the file is private to this user.

Resume now checks a segment's SHA-256 before probing it, and a real-ffmpeg
test documents how the concat join treats an entry that is itself an ffconcat
list.

* docs(producer): describe the manifest key per user and the no-token case
2026-11-18 16:32:45 +00:00
Miguel Ángel 4a73363322 chore: release v0.9.67 (#8185) 2026-11-18 14:56:46 +00:00
Miguel Ángel f38e1e6def fix(studio-server): an inserted scene names its file from the project root, as the renderer reads it (#8150)
* fix(studio-server): an inserted scene names its file from the project root, as the renderer reads it

* test(studio-server): keep a test comment under the line limit
2026-11-18 12:47:29 +00:00
Miguel Ángel 1a82f6e9d6 chore: release v0.9.66 (#8172) 2026-11-18 12:11:13 +00:00
Michael Wang 7ea0129530 fix(studio): check every file a folder move or delete takes along (#8143)
A folder move or delete in Studio checked each file inside only by its
name. A script that package.json runs from a subfolder could be moved
aside or deleted with its folder. A move could also land a file on a
path a direct write refuses, such as a script package.json runs or
mise/config.toml, by moving a folder onto the right name.

Now each entry in the folder is checked at its current path with the
same rules a direct delete or rename uses, including the package.json
scripts. For a move, it is also checked at the path where it would
arrive. Ordinary folder moves still work.
2026-11-18 08:31:08 +00:00
andybpan 5f06e1b0a3 fix(core): treat files package managers run by default as tool-trusted (#8129)
npm, pnpm, yarn and bun run `node-gyp rebuild` on install when a binding.gyp
is present and package.json has no install script, and a .gyp file can include
any .gyp or .gypi. npm, pnpm and yarn run `node server.js` for start when
package.json has no start script. A project from `hyperframes init` has
neither script, so both defaults apply.

toolTrustedFileKind now classifies .gyp/.gypi files and server.js, in every
spelling projectPathSegments folds, so Studio's file routes and the registry
installer refuse to write them. Rename and duplicate refusals now report
why: protected_path when the destination is inside the project, as POST and
PUT already do.
2026-11-18 01:32:34 +00:00
Miguel Ángel 32ff8b3323 chore: release v0.9.65 (#8121) 2026-11-17 23:19:45 +00:00
Miguel Ángel 078e54d008 feat(studio-server): let a host count the requests the API refuses with 403 (#8049)
* feat(studio-server): let a host count the requests the API refuses with 403

* fix(studio-server): a refusal names the endpoint asked for, not the middleware that refused it

* style(studio-server): refusal reports carry their meaning in names, not comments

* fix(studio-server): a refusal the API sends through itself again is counted once

* fix(studio-server): a request sent through the API again is known before a middleware swaps it
2026-11-17 22:36:38 +00:00
Miguel Ángel f291b12598 chore: release v0.9.64 (#8097)
* chore: release v0.9.64

* chore: list #8090 and #8092 in the v0.9.64 notes
2026-11-17 18:25:31 +00:00
James RussoandClaude Opus 5.5 4bea3e79c2 fix(cli,studio): refuse ?hf-proxy when a request carries no same-site signal (#8066)
A media-proxy request with neither Sec-Fetch-Site nor a Referer naming the
host was treated as same-site. Play, the static project server and Studio now
require a positive signal and refuse the request otherwise. The check
command's own re-request of failed media sends a Referer for its origin so it
keeps working.

— Rames

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 16:45:34 +00:00
Miguel Ángel e86594759c chore: release v0.9.63 (#8080) 2026-11-17 15:55:44 +00:00
Miguel Ángel 72925380cc fix: render, capture and inspector servers never serve a service worker's script (#8073)
* fix(engine): the render file server never serves a project file as a service worker's script

* fix(producer): render, capture and inspector servers never serve a service worker's script
2026-11-17 14:15:52 +00:00
Miguel Ángel fbcdf4cad7 chore: release v0.9.62 (#8075) 2026-11-17 14:15:36 +00:00
Miguel Ángel b4acc1a1da fix(studio-server): a project file is never served as a service worker's script (#8064) 2026-11-17 12:36:14 +00:00
Miguel Ángel 3599623f92 chore: release v0.9.61 (#8051) 2026-11-17 10:56:12 +00:00
Miguel Ángel d317abcdba fix(cli): cloud render --json reports re-encode progress and times out a stalled cache check (#7755)
* fix(cli): cloud render --json reports re-encode progress and times out a stalled cache check

* refactor(parsers): share the ffmpeg progress reader from ff-binaries

The reader lived in a new studio-server entry point, which pushed its packed size over budget and left package.json out of step with package-subpaths.json. Both callers already depend on parsers. The re-encode now gets a progress callback only when someone listens.

* style(cli): format the offload test
2026-11-17 10:30:43 +00:00
Michael Wang fe93f9cd47 fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern (#8047)
* fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern

ffmpeg's image2 demuxer reads %d, %03d, %% and a % before a wildcard in an
input path as a pattern of other files, folders included. Every project,
private-file and received-file check approves the literal path, so a
composition could name a placeholder whose pattern reaches images outside
the project and get them back as video frames.

Every ffmpeg and ffprobe input built from a project file now goes through
assertLiteralMediaInput, which refuses such a local path before ffmpeg runs.
The engine's urlInputArgs, the parsers' mediaInputFormatArgs and the
studio-server's new mediaInputArgs all take the input path, so the CLI
snapshot and cloud offload, lint, core grade analysis and studio-server
callers are covered too. URLs and other percent signs, such as %20, are
read as before.

* build(parsers): declare the literal-media-input subpath

* build: raise the parsers packed-size budget for the literal-media-input subpath

The new subpath adds its own built entry, type file and export map rows,
about 2.7 KB packed. It is a separate module so test suites that mock
ff-binaries still run the real path check.

* test(parsers): a harmless name shaped like a pattern is refused too
2026-11-17 07:28:09 +00:00
Michael Wang 70820b386f fix(studio-server): cache reads never follow a link the project ships (#8039)
* fix(studio-server): cache reads never follow a link the project ships

The waveform and peaks caches, the thumbnail cache, the stored preview
documents and the preview proxy copies all live in folders inside the
project, which its author controls. Their reads opened entries with
link-following calls, so a project could ship a link at a predictable cache
name and have Studio return the file it pointed at.

Each of these reads now goes through readProjectCacheFile or
isProjectCacheFile: the entry must be a plain file, reached with no link
from the project folder down, and is opened without following links.
Anything else is a miss, and the entry is rebuilt.

- Waveform and peaks entries must also parse as an array of numbers.
- A proxy copy, its fast and content index files, and the pieces of a
  chunked copy count only as plain files.
- Stored preview documents carry an HMAC under the user's private preview
  token, so a document the project shipped is never served. Without a
  token, nothing is stored.

* fix(studio-server): the proxy copy lock treats a link at the copy name as not made

The copy lock tested "the copy already exists" with a link-following check,
and the transcoder returned the copy path unchecked when the lock said
another process had made it. A link at the copy name was then served.

- acquireCopyLock takes the caller's "copy made" test; the transcoder
  passes isProjectCacheFile and re-checks the path before returning it.
- Copy index files are written by rename, so a link at an index name is
  replaced instead of written through.
- Chunk pieces are checked from the project folder down, like every other
  cache entry.
- A cache entry with more than one name (a hard link) is a miss.
2026-11-17 06:31:06 +00:00
Michael Wang 5fcce21a64 fix(engine): check proxied download hosts; keep raw GIF downloads private (#8040)
* fix(engine): check proxied download hosts against local DNS; keep raw GIF downloads private

Behind an env proxy (HTTPS_PROXY with NODE_USE_ENV_PROXY=1 or
--use-env-proxy), composition downloads skipped the resolved-address check
and relied on the literal-host check alone. An internal DNS name passed, and
NO_PROXY hosts were dialled directly.

Now the downloader resolves the host on this machine first and refuses it
when any answer is non-public. A name this machine cannot resolve is still
left to the proxy, so proxy-only networks keep working.

Studio's remote GIF prep now picks only URLs whose path ends in .gif,
discards a downloaded body that does not start with a GIF signature, and
the raw downloads folder is no longer served to the page; only the converted
output is.

* fix(cli): read the downloaded GIF's header through a bounded read stream

CodeQL read the openSync call as a temp-file creation. The file sits in the
project's .hyperframes folder and is only read, but a six-byte read stream
does the same check without a file descriptor of our own.
2026-11-17 06:09:42 +00:00
Michael Wang f5bb3e5519 fix: a received-files record follows Studio renames, moves and deletes, and a nested record can't be moved out of reach (#7989)
* fix(cli): a received folder's record is read wherever Studio moves it

The search for received-files records now walks every folder a render,
preview or publish can load files from, including renders/, dist/, .next/,
coverage/ and Studio's own folders in the project's .hyperframes/. A
received folder moved there by Studio keeps its files received.

Studio's folder delete and move also refuse a folder holding a
received-files record that lists a file outside its own folder, since
that file would stay behind with no record. A received folder whose
record lists only its own files can still be deleted or moved.

* fix(cli): a renamed or moved received file stays listed under its new name

The CLI-hosted Studio now follows every rename, move or delete it
completes in the received-files records, whichever client sent it. A
renamed file, or every file in a moved folder, stays listed under its
new path; a file moved out of a received folder is listed in the
project's own record. Changes are made under the record's lock, and a
record that cannot be changed is left as it was.

The per-file readers used by publish, cloud render, feedback and add now
count every file as received when a record lists a file that is no
longer on disk, since that file may be there under another name. This
matches the local render check. Projects with no record are unaffected.

* fix(cli): received content that leaves the record still counts as received

When a Studio rename, move or delete takes a received file off a listed
path, the sha256 of its content is kept in .hyperframes/received-content.json,
the file and format the desktop app uses; other keys in it are kept. A
file holding the same bytes counts as received for publish, cloud render,
feedback, add and the local render check, so content brought back by undo
or renamed outside Studio stays received. Studio's own backups do not count.

A listed file that is gone from disk now makes only pages, stylesheets,
scripts, SVG and links out of the project count as received, and the
upload warning names the gone file.

The record follows a request spelled in another letter case or Unicode
form by matching the name the disk holds, and waits for the record's lock
without blocking the server. Studio's folder delete and move no longer
refuse a folder whose record lists a file outside it; that file's content
is kept as received instead.

* fix(cli): a folder delete or move keeps what a record inside it lists elsewhere

Before Studio deletes or moves a folder, every file that a received-files
record inside the folder lists outside it is listed in the project's own
record by its path from the project folder. Such a file stays received
after it is edited, and a listed link stays received too. When the
project's record cannot be written, the delete or move is refused.

Received content that cannot be read is never written over, so the
desktop app's keys in it are kept. The warning about a listed file that is
gone now says how to clear it.

* fix(cli): received-content checks skip large non-code files and name a skipped search

A file larger than 16 MB that is not a page, stylesheet, script or SVG is
no longer read to compare its content with received content, so a large
archive is not read on every check. When the project has too many folders
to search for received-files records, the upload warning now says so.

The case-matching publish test now expects the gone-file rule on a disk
that tells letter case apart, and a comment no longer names a file path.

* fix(cli): name a gone received file from the project folder on every system

The gone-file note now names the file from the same project path the
record search starts at. On Windows, a short (8.3) folder name in the
temp path made the two spellings differ, so the note showed a long
relative path instead of the file's name.

Content hashing opens a file once, checks it through that handle and
reads from the same handle, and the received-content file is read before
it is classified, so nothing is checked by path and then used by path.

* fix(cli): received files stay received through undo, saves, and partial folder deletes

An undo, redo or restore lists again every file it writes that holds received
content, and a Studio save lists such a file before it changes it. So a Studio
delete followed by an undo and an edit leaves the file received.

A Studio rename, move or delete now records the received side first, under the
record's lock, and is refused when that fails: the content leaving listed paths
is kept, a renamed file is listed under its new path, and every line of a
record inside a moved or deleted folder is copied into the project's record.
Once the files have moved, only lines whose file was there and whose content
was kept are taken off. Lines at a rename's destination and lines whose file was
already gone stay. The search for records inside the folder has no size limit,
and nothing is locked when nothing is listed.

* fix(cli): unreadable received content counts every file as received

The readers treat a received-content file they cannot read the way they treat
an unreadable received-files record: every file counts as received, and the
local render check names the file it could not read.

A record line that points outside the project is ignored, so a record in a
received folder cannot make the readers look at or report files outside the
project.

* fix(cli): the CLI's own history undo and restore keep received files listed

`hyperframes history undo` and `restore` with no Studio running now list again
every file they write that holds received content, the same way Studio's
history routes do. A delete in Studio, then an undo or restore from the CLI,
then an edit, leaves the file received.

A Studio edit that names its file in the request body, such as a freeze-frame
edit, now lists that file first when it holds received content.
2026-11-17 05:12:31 +00:00
Miguel Ángel b6e1e8dda9 fix(studio-server): a loopback page with no fetch metadata is marked unless the app framed it (#8017)
* test(studio-server): a loopback page with no fetch metadata is marked unless it is the app's own

* fix(studio-server): a loopback page with no fetch metadata is marked unless the app framed it

* test(studio-server): a page marked by its Referer names Referer in Vary

* fix(studio-server): a page marked by its Referer tells caches it varies by Referer
2026-11-17 05:05:41 +00:00