* fix(studio-server): project history lists files without holding the host's event loop
* test(studio-server): the history walk test counts the hold up to the sweep's end
* fix(studio-server): history rewrites video-state.json only when it changed
* refactor(studio-server): names carry what the history walk comments said
* fix(studio-server): reject cross-origin state-changing requests
Non-GET routes in createStudioApi answer 403 unless the shared
sameOriginPost predicate (lifted into studio-server's ./request-identity
subpath) accepts the request: the Host must be a server identity, a
present Sec-Fetch-Site must be same-origin, and a present Origin must
match the effective host and scheme. Hosts behind Codespaces or tunnels
allow their public name with HYPERFRAMES_PREVIEW_ALLOWED_HOSTS, read by
`hyperframes preview` and the Studio dev server.
Squashed from #6128 (42574a7, 110a300, 89011e1, 41c6626, 27193bb) onto
current main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): the preview server answers only the hosts it is reached by
Every route of `hyperframes preview` (the forwarded studio API, the SSE
stream, /__hyperframes_config and the Studio page) now answers only
loopback names, the HYPERFRAMES_PREVIEW_HOST bind, or a host listed in
HYPERFRAMES_PREVIEW_ALLOWED_HOSTS, the same list the write guard uses.
Only the Host header counts here, since a page can set X-Forwarded-Host
on its own requests and a read carries no Origin to compare it with.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Dextheking1 <Dextheking1@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio-server): buildSubCompositionHtml reads only compositions inside the project
The helper joined projectDir with compPath and read the result, trusting
every caller to have confined the path first. Studio's own preview route
does; an embedder that forgets would serve any readable file. The helper
now resolves compPath with core's resolveWithinProject and returns null
for a path outside the project, the same answer as a missing file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio-server): keep subComposition.ts's comment share flat
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio-server): the sub-composition head reads only an index.html inside the project
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio-server): history waits out a file a save has emptied, and rereads one written mid-copy
* style(studio-server): state the history copy's null result in the present tense
* style(studio-server): wrap the put doc comment
* style(studio-server): shorten the put doc comment to one line
* fix(studio-server): a file still changing as history opens starts at its first whole copy
* fix(cli): staging folders beside a project path no longer fail past 260 characters on Windows
mkdtemp does not get the long-path prefix that mkdir does, so every staging folder
made beside a project or output path failed once its full path passed 260 characters.
They now come from one helper, createStagingDir in @hyperframes/core/atomic-file, and a
scan test fails on a new mkdtemp beside a path.
* fix(cli): give mkdtemp the long-path form instead of replacing it
CodeQL treats mkdtemp as the safe way to make a folder under the system temp dir and
flagged every file written into a folder from the mkdir-based helper. createStagingDir
now calls mkdtemp with the long-path form of the path on Windows, so both hold.
* fix(cli): leave non-Windows paths alone when making a staging folder
The long-path form is now chosen by the shape of the path, not process.platform,
so tests that pretend to be Windows keep working and the comment share does not rise.
* fix(core): a staging folder keeps a Windows path that already names its namespace
* fix(core): a staging folder keeps a Windows device path as the caller gave it
* fix(core): the staging folder helper's comment fits the line limit
* perf(studio-server): a large project's first history copy takes a fraction of the time
* perf(studio-server): read a small file through one handle, with fewer comments
* fix(studio-server): small files keep their exact permissions in history under a strict umask
* fix(studio-server): a video with a codec nobody listed gets a playable preview copy
* refactor(studio-server): drop a comment the codec names already carry
* fix(studio-server): proxy MPEG-4 Part 2 and MJPEG video the browser cannot decode
* fix(studio-server): drop the codec comment the comment gate counts
* chore: release v0.9.17
* chore(producer): raise the unpacked size budget for windowed video frames
The new modules and this version bump put the unpacked package 49 bytes
past the 1% tolerance. No tests or source maps are in the tarball.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): normalize-audio --reference stops short of the peak ceiling instead of refusing
* docs(cli): the README says normalize-audio stops short of the ceilings instead of refusing
* fix(core): hlg footage tone-maps to sdr at the bt.2408 reference white
* fix(core): an HLG clip whose stream leaves its transfer unset keeps HLG's white
An SPS with an unspecified transfer takes the stream's tag, as its frames do; a failed keyframe read is not cached; the grey test needs ffmpeg 8.
* fix(studio-server): the cancel route replies once the adapter's stop has settled
* fix(studio-server): shorten the cancel route comments
* fix(studio-server): drop the added cancel comments so the comment share stays down
* fix(studio-server): the cancel route clears its timer when the stop throws
* fix(cli): check stops after 2 minutes of video copies and says how to finish
* fix(cli): check copies only the stretch of a video the composition plays
* docs(cli): check copies only the played stretch of a long video
* docs(cli): shorten two comments on the copy window
* fix(cli): finding crops and frames get the same copy windows as the check
* fix(cli): drop a comment the ratchet counts
* refactor(studio-server): keep runFfmpeg under the complexity gate
* fix(studio-server): a render that ran over 5 minutes can still be read after it finishes
* fix(studio-server): keep the finished-jobs helper's reasoning in its names
* fix(studio-server): a project's signature no longer freezes the host while it walks the files
* style(studio-server): format the signature changes
* fix(studio-server): keep the adapter for the preview's early-error script
* feat(studio-server): the preview records the kind and origin of each early error
* fix(studio-server): write preview script values with U+2028/2029 and < escaped
* fix(studio-server): two exports in the same second get separate jobs
* fix(studio-server): name the same-second job id helper instead of commenting it
* feat(preview): an unplayable video shows its own frame while its copy is made
* fix(preview): drop the comment on the copy's light flag
* fix(preview): shorten the still helper's doc comment
* test(preview): each proxy-wait test starts with no copy report left over
* fix(preview): cached still frames are swept with the proxy copies