mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-23 11:29:54 +00:00
5e1008124bcb82d283f8451e9203bf276ab59e54
375
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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 |
||
|
|
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> |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
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. |
||
|
|
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 |
||
|
|
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 |
||
|
|
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. |
||
|
|
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. |
||
|
|
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 |
||
|
|
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> |
||
|
|
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 |
||
|
|
b4acc1a1da | fix(studio-server): a project file is never served as a service worker's script (#8064) | ||
|
|
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 |
||
|
|
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 |
||
|
|
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. |
||
|
|
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. |
||
|
|
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. |
||
|
|
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 |
||
|
|
19743ea094 |
fix(studio): the copied render command carries no composition text a shell can run (#8012)
* fix(studio): the copied render command carries no composition text a shell can run The Variables panel's "Copy render command" put every variable value inline, quoted for POSIX shells only. A shared project's author chooses those values, so in PowerShell, cmd.exe (including npx.cmd's re-parse) or fish a default such as `x'; calc.exe; '` ran as commands when the command was pasted. The command is now fixed text: `npx hyperframes render -c <composition> --variables-file .hyperframes/render-variables.json`. Copying it saves the previewed values to that file through a new PUT /projects/:id/render-variables route, which refuses a link standing in for .hyperframes and replaces, rather than writes through, a link at the file itself. A composition path that is not one plain word in every shell (letters, digits, `_ . / -`) gets no command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(scripts): the comment checker skips a template nested in a substitution stripLiterals ended a template literal at the first backtick, including one that opens a nested template inside `${...}`. On a line such as `'${value.replace(/'/g, `'\\''`)}'` that left a backtick unmatched, so scanCLike read the rest of the file as one template and counted none of its comments. The ratchet then measured VariablesPanel.tsx on main at 1 comment line instead of 31 and failed any change that removed that line. A `${...}` is now scanned as code: strings, regexes and templates inside it are skipped, and its closing brace returns to the outer template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(studio-server): read the replaced render-variables record through one no-follow descriptor The link test checked the record with lstat and then read it by path, two lookups CodeQL reports as a file-system race. Opening it once with O_NOFOLLOW fails if a link is still there and reads the file that open checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5f6995fe77 |
fix(studio-server): audio decodes are bounded, stop when nobody waits, and their cache is capped (#7991)
* fix(studio-server): audio decodes are bounded, stop when nobody waits, and their cache is capped The waveform and peaks routes each started a full-file ffmpeg decode per request, with no limit on how many ran at once, no sharing on the waveform route, and no way to stop one after its request went away. Their cache folder also grew without end. - Both routes now decode through one shared queue of 4 slots, one decode per cache entry, shared by every request that wants it. When the last request waiting on a decode leaves, its ffmpeg is killed (or it leaves the queue). - `.waveform-cache` keeps at most 500 entries; a write past that drops the oldest. — Rames Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): trim comments to the package's comment share Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio-server): raise the packed size budget for the audio decode limits The bounded decode queue, the abort when nobody waits and the capped cache add about 485 bytes to the packed tarball. Main had already reached 178,489 bytes against a 178,000 budget, so together they pass the 1% tolerance (179,877 bytes). The new budget is the measured size plus the script's 5% headroom. — Rames Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): waveform decodes keep a fixed-size peak buffer, time out, and the cache is byte-capped LRU - decodeAudioPeaks streams samples into a 65536-entry max-abs buffer that merges neighbouring runs when full, instead of buffering and concatenating the whole decode. - A shared decode is stopped after 10 minutes and its slot freed. - .waveform-cache is capped at 256 MB as well as 500 entries; a cache hit marks its entry used, so eviction drops the least recently used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio-server): raise the unpacked size budget after rebasing onto main Measured with pnpm pack after the rebase: 697160 unpacked bytes, over the 690000 budget by more than 1%. The new budget is the measured size plus 5%. — Rames Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
22b615f1a7 |
fix(cli): files from outside the project are uploaded only once approved (#7995)
* fix(cli): files from outside the project are uploaded only once approved publish, cloud render and feedback --file-issue copied every image, video, audio, font and CSS file a composition named from outside the project folder, and every project file that links outside it, and only listed them. A project that came from someone else could pull a file from anywhere on the uploader's disk into an upload. Now each such file needs approval. In a terminal the command lists them and asks, defaulting to no; a yes is remembered per project in the CLI's config folder (~/.hyperframes/outside-files.json), never in the project. --yes, --json, --dry-run and unattended runs leave them out with a warning naming each file and saying how to include it. --include-outside-files uploads them without asking. — Rames Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cli): check the approvals file mode only where files have POSIX modes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
bffe8d5985 |
fix(studio-server): bound preview stills and keep proxy work to the Studio's own pages (#8007)
* fix(studio-server): bound preview stills and keep proxy work to the Studio's own pages - Queue at most 16 stills behind the 4 being made; past that, answer 503 with Retry-After. - Refuse a still past the end of the source before starting ffmpeg (404). - Refuse a ?hf-proxy request on a plain preview path when another site asks for it. The Studio's own opaque frames already load through the frame-token path, and sandboxed thumbnail captures now do too. — Rames Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio-server): raise packed size budget for the still-queue and cross-site checks The bounded still queue, the past-end refusal and the cross-site proxy check add about 2.2 KB to the packed studio-server (180252 bytes in CI). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
581a43bb6a |
fix(producer): local renders leave out scripts from outside the project unless included (#7998)
A local render brought in .js and .mjs files that markup or a project link reached outside the project, so an imported composition could copy a script from elsewhere on disk into the page it runs and read it. Images, video, audio, fonts and CSS still come in. Scripts are left out with a warning that names each one and how to include it: move it into the project, or pass the new --include-outside-files to hyperframes render. The policy covers the compiler's outside-asset copy, the file server's linked files and the distributed plan's project copy. — Rames Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
32fe10a8b3 |
fix(studio-server): history writes and claims follow Studio's write rule (#7988)
History undo, restore and Cmd+Z now leave alone every file that Studio's file routes refuse to write. This covers tool-trusted, private, hidden and node_modules paths, and scripts the project's package.json runs. Cmd+Z passes over an edit that only changed such files. A claim no longer takes such a file's pending change. A claim's `overwrote` version now counts only when the server itself saw that version at that path. A version stored for another file can no longer become a file's earlier state. The write rule also refuses more files that tools and agents load on their own: opencode and crush settings, compose override files, Dockerfile.* and Containerfile, every lefthook spelling, mise, nodemon, devbox, wrangler, vercel and netlify settings, *.config.jsonc, tsconfig.*.json, Taskfile.dist, simple-git-hooks, Ruby build files, and .nix and .fish scripts. |
||
|
|
c68c78445d |
fix: hidden and credential files stay out of Studio, history and lint (#7979)
* fix: hidden and credential files stay out of Studio, history and lint - The private-file rule now refuses every hidden file or folder in a project, except Studio's own files, the root .media folder, and pictures, video, sound, fonts, stylesheets and scripts a page can load. It also refuses Terraform state and variable files and more key-store types. - Project history never tracks, lists or serves a private file, and the blob route serves only bytes a listed file had, so copies kept by an older version are no longer readable. - Lint reads a linked stylesheet, script, import map or sub-composition only when the private-file rule allows it and the file is the kind its link names, so no finding quotes a private file. - The rule moves to @hyperframes/parsers/private-path so lint can use it; @hyperframes/core/safe-path re-exports it unchanged. * fix(studio-server): a refused history blob reads as not a history blob * fix(core): keep realpath in core, so its file-system callers and tests see one module |
||
|
|
2a28e43685 |
fix(studio-server): no write route touches files other tools run or trust (#7964)
* fix(studio-server): no write route touches files other tools run or trust A composition previewed in Studio runs same-origin with the API, and the write rule refused only private paths, node_modules and hidden names. Its script could create, overwrite, rename or delete package.json, lock files, agent instruction files and scripts, which a package manager, build tool or coding agent then runs with the developer's rights. Core now names these files in one predicate, toolTrustedFileKind, read in every spelling a case-insensitive file system or Windows opens. Studio's write rule and the registry installer's target rule both use it, so every write route (PUT, POST, PATCH, DELETE, upload, duplicate-file, file-mutations and gsap-mutations) refuses such a target. Deleting or moving a folder that holds one is refused too. Ordinary composition, stylesheet, script-asset and media writes still succeed. * fix(core): fold look-alike letters before matching files other tools trust A case-insensitive macOS volume opens "AGENTſ.md" (long s) as AGENTS.md and "Makefile" (fi ligature) as Makefile, but lower-casing alone does not map either letter. Project path segments now fold names the way such a volume does: NFKC, upper-then-lower case, and invisible characters dropped. Every rule built on the segments gets the fold. Also: - name JSON, YAML and TOML tool config, compose files, turbo.json, nx.json, pyproject.toml and gulp or grunt files - treat a ~N name as a short name only when it has the 8.3 shape and an extension a trusted file's could shorten to, so take~2.mp4 stays writable - refuse to delete or move a folder holding node_modules or .git, walking it without the listing's ignore rules - report an upload refused by the write rule in `skipped` |
||
|
|
e8f1fff5fd |
fix(studio-server): a host that built a page on the build worker can exit (#7939)
* fix(studio-server): a host that built a page on the build worker can exit * test(studio-server): a dead build worker's exit code is left to the platform * refactor(studio-server): every build-worker queue change sets its ref in one place |
||
|
|
d5f0b1a5bf |
fix: nested .hyperframes stays private, capture page server checks Host, project manifests pin no CLI (#7927)
* fix(core): a .hyperframes folder in a subfolder stays private too The private-file rule treated .hyperframes as the app's records folder only at the project root. A project copied into a subfolder keeps its own .hyperframes/, and its chat history, hand-off and other records there were listed in the file tree and served by Studio's file and preview routes and by the other file servers that share the rule. A .hyperframes segment at any depth is now private, in every spelling Windows opens. Studio's own files and the prepared-assets and requests folders stay servable only at the root, the one place Studio reads and writes them. The file tree also skips .hyperframes/backup at any depth. * fix(cli): the capture --local-file page server answers only its own host The page server that capture --local-file starts on a loopback port answered a request whatever its Host header said. A site whose name resolves to 127.0.0.1 could then read the files it serves from the browser. The server now refuses, before any file lookup, a request whose Host is not its own loopback name and port, with the same isOwnLoopbackHost rule the static project server and the engine file server use. Every response carries X-Content-Type-Options: nosniff. The capture browser loads the page by 127.0.0.1 and its port, and fetchLocalPageUrl reads from disk, so both work as before. * fix(skills): a plugin manifest in the project pins no CLI release The skills launcher read a plugin manifest from the folder above skills/ wherever the skills were installed. For a project-level install that folder is the project itself or its .agents or .claude folder, so a plugin.json shipped with a project could pin an old hyperframes release and turn off update checks and standalone skill refreshes. The launcher now reads a manifest only from a bundle of its own: a folder whose name does not start with a dot and that is neither the folder the CLI works in nor one that contains it. Plugin managers install bundles into their own folders, so those keep their pin. A manifest anywhere else leaves the call the same as with no manifest. A manifest that pins a release older than 0.9.34, the launcher's floor, is refused. The agent-facing plugin rules and the skills guide say the same. * fix(skills): a plugin bundle inside the working folder pins only behind a dot folder A package inside a monorepo could still pin the CLI: with the agent working at the monorepo root, <mono>/packages/video/plugin.json sat beside a skills folder the launcher took for a bundle. The launcher now also refuses a bundle inside the working folder unless a folder whose name starts with a dot lies between them, as .claude does in ~/.claude/plugins/cache when the agent works in the home folder. Bundles in ~/.claude/plugins, ~/.cursor/plugins and ~/.gemini/extensions keep their pin from the home folder or a project. The plugin rules and the skills guide now state the three conditions the launcher checks. * docs(cli): a .hyperframes folder in a subfolder is left out and not served The private-file rule now treats a .hyperframes/ folder at any depth as the app's records. Files stored in one inside a subfolder, assets included, stay out of uploads and are not served by Studio, preview or render. The cloud render section now says so beside the rule it already describes. * fix(cli): capture pages keep loading scripts with no or unlisted extensions With nosniff on every response, a script the capture page server did not know the type of (a .cjs file, or a file with no extension) was served as application/octet-stream, and the browser refused to run it. The server now names .cjs, .wasm, .xml, source maps, web manifests, CSV, WebVTT, glTF and more audio, video and image types. A file whose type is still unlisted is served without nosniff, so the browser sniffs it as it did before and such a script runs. Every listed type and every empty error response keeps nosniff. * fix(share): sync and share leave out a .hyperframes folder below the root The .hyperframes rules in the source path policy matched only at the project root, so a copy's records in a subfolder, such as sub/.hyperframes/agent-runs.jsonl, fell through to the default rule and travelled with share and sync. A new nested-hyperframes-state rule leaves out a .hyperframes folder at any depth below the root. It sits before the first allow rule, as the contract's rule order requires. The root folder's Studio files and other portable files travel as before. Stored snapshot reads skip the new rule through stored_manifest.legacy_rule_regexes, the shape the server and Desktop copies already use, so snapshots and bindings captured earlier still read. |
||
|
|
d159ec51c0 |
fix(studio-server): sub-composition previews build off the request thread within a deadline (#7857)
* test(studio-server): a sub-composition build past its deadline is refused off the request thread * fix(studio-server): sub-composition previews build off the request thread within a deadline * fix(studio-server): every parse of a sub-composition page runs on the build worker * test(studio-server): a page built inside its deadline keeps the request thread free * test(studio-server): a refused page leaves the next one built whole, hf-ids and all * chore(studio-server): the build worker's comments fit its package's share |
||
|
|
2be03408db |
fix(studio): recovery drafts are kept by each project's own server, never the browser (#7904)
* fix(studio): recovery drafts are kept by each project's own server, never the browser * fix(studio): a restored draft stays offered when Studio settles which composition is open * fix(studio): a draft read never waits on a pipe or loads an oversized record * test(studio): the draft read's child fixture is an entry point, and its note sits in the test * chore(studio-server): size budget covers the recovery-draft route * chore(cli): unpacked size budget covers the recovery-draft route |
||
|
|
9b5a3ce74a |
fix(cli,studio-server): no lookup of another computer's share path before refusing it (#7914)
On Windows even a stat or realpath of a \\host\share path connects to that host and signs in as the current user. Three readers looked such paths up before refusing them: - `hyperframes compositions` resolved a data-composition-src with path.resolve, so an absolute or share src reached readProjectFile. It now uses resolveCompositionSrc, the resolver preview and render use. - The timeline reader (`timeline`, `audio`, measure) realpath'd a sub-composition before its containment check. It now refuses a path on another network root first. - Artifact bookkeeping for render, check and snapshot looked up the paths recorded in .hyperframes/video-state.json. A recorded path must now be spelled inside a .hyperframes/artifacts/<kind> folder on the project's own root before cleanup looks at it, and a record naming another share counts as gone without a lookup. |
||
|
|
478313ba0e |
fix(studio-server): history restores stay inside the project and use only intact copies (#7902)
* fix(studio-server): history restores stay inside the project and use only intact copies * fix(studio-server): a history path's trailing dots and spaces are trimmed by a scan, not a regex |
||
|
|
014326b40b |
fix: every composition file server refuses credential and tool-state files (#7889)
* wip: paused before review * test: cover credential files on the preview routes and the deploy notice * refactor: name the inspector's file lookup for what it serves * fix(cli): a link to a private file outside the project keeps its own left-out reason * fix: escape the upload notice and skip private files from old manifests |
||
|
|
bbac8900ea |
fix(studio-server): other sites cannot start lint or probe work (#7894)
* wip: paused before review * fix(studio-server): key shared lint runs on project content; test cross-site refusals |
||
|
|
6efa6b6353 |
fix(cli): history turn ids from the project folder are checked and sent encoded (#7883)
* fix(cli): history turn ids from the project folder are checked and sent encoded * test(cli): history turn fixtures use the id shape the CLI mints * fix(cli): a turn's label and agent name are kept as written; only ids are checked * style(cli): format the turn reader * refactor(cli): the turn reader checks a marker through small predicates |
||
|
|
ceb969dbac |
fix(studio-server): sub-composition head and root tag scans take linear time (#7866)
rootHeadContent and tagRootCompositionFile ran an opener, then [^>]* or a lazy run, then a required literal, over the project's own HTML. When the literal never came, each opener rescanned to the end of the page: about 10 s for 250 KB of "<head" or of "<a". Both are now plain scans that give the same results: only the first <head can match, and each start tag is checked up to its own > once. |
||
|
|
c030e3193d |
fix(cli): publish and cloud render staging skip other computers' network shares (#7858)
* fix(cli): never open another computer's share while staging an upload publish and cloud render now leave out a reference to another computer's network share or a Windows device path before any file-system call on it, and report it as left out with the network_share reason. A page that came in with an imported project has its outside references left out before the files they name are checked. * test(cli): the Windows staging test's lstat mock honours throwIfNoEntry |
||
|
|
ae5829db7e | fix(studio-server): a sealed preview's wait for a video's proxy copy passes its preflight (#7856) | ||
|
|
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 |
||
|
|
88ffe087ca |
feat(studio-server): an opaque preview loads its images, media and fetched files (#7806)
* feat(studio-server): an opaque preview loads its images, media and fetched files * refactor(studio-server): the fetch grant's reach is named, not commented * test(studio-server): the main preview loads under the frame-token path |
||
|
|
2ceb682f92 |
fix: LAN-host previews and play pages refuse other sites without fetch metadata (#7836)
* fix(studio-server): previews with no fetch metadata on a LAN host count as another site Browsers send no Sec-Fetch-Site header over plain HTTP to a non-loopback name, such as a LAN address used with HYPERFRAMES_PREVIEW_HOST. The preview guards now count such a request as the Studio's own page only when its Referer names the same host. Otherwise the preview is marked and sandboxed, its validators are dropped, and the thumbnail, waveform, peaks and frame-token routes refuse it. * fix(cli): play marks and sandboxes compositions another site loads The play server's /composition/* route now applies the same another-site decision as the Studio preview. A load from another site comes back with the sandbox CSP and without validators, and its HTML carries the hyperframes-preview-for-another-site mark, so the runtime offers that site no editing port. The play page's own player is unchanged. * fix(player): send a same-origin Referer from the composition frame The player's composition iframe used no-referrer, so on a plain-HTTP LAN host its own composition load carried neither Sec-Fetch-Site nor Referer and the Studio and play servers sandboxed it as another site's load. same-origin sends the host page's URL only to a composition on the same origin, so another origin still learns nothing about the embedding page. |
||
|
|
04202e8a4c |
fix(cli): uploads leave out outside scripts; .ts counts as video only when it is one (#7818)
* fix(cli): uploads leave out outside scripts; .ts counts as video only when it is one * chore(studio-server): raise unpacked size budget for the upload file-type rule * fix(studio-server): transport stream check never waits on a pipe and needs binary bytes |
||
|
|
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> |
||
|
|
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> |