mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
aed28486f36eb555acc2cd0f7e6eec8bb5bbda41
342
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
0248ea033c |
fix(studio-server): history lock records are replaced, never written through links (#7821)
* fix(studio-server): replace lock start records by rename The owner lock's start records (owner.pid.start, owner.pid.evict.start) and the daily prune stamp are written through replaceFileAtomically: an exclusive temp sibling renamed over the name. A symlink, hard link or other entry already at that name is replaced rather than written through. Lock files (owner.pid, its start record, owner-url.json) are read with O_NOFOLLOW and O_NONBLOCK and only when they are regular files, so a link is not followed and a FIFO is not waited on. * fix(studio-server): clear lock records before replacing them The start records and the daily prune stamp are removed before the rename, so a symlink to a read-only file or a read-only file at that name no longer fails the write. The prune stamp is read without following links or waiting on a FIFO, like the other lock files. |
||
|
|
477a3aea13 |
fix(cli): upload archives always leave out env files and private records (#7796)
publish, cloud render and feedback --file-issue build their archive from a walk of the project folder that only consulted .hyperframesignore, so a rule re-including dotfiles also uploaded .env files. The walk now leaves out env files, Git data and Studio's private records whatever the ignore rules say, and reports each one as left out with the reason "private". Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
870b1fa4dc |
fix(cli,studio-server): received-file guard covers subfolders and spellings; playlists named as media never reach ffmpeg (#7771)
* fix(cli): a subfolder of an imported project keeps its received-files record Publish, cloud render and feedback now read the received-files record at the nearest folder at or above the one they stage, so staging a subfolder of an imported project still leaves out the outside files its received files reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): a received file counts under any spelling of the same file on disk The received-files lookup now also matches a project file that is the same file on disk as a listed path, so a name respelled in letter case on a case-insensitive disk keeps its received status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): cloud render prepares only the GIFs staging kept The entry GIF prep before a cloud render upload now reads only the staged copies it is handed. An image whose source staging left out keeps its reference as written and is never read from disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli,studio-server): never hand a playlist named as media to ffmpeg A media file whose first bytes are an HLS playlist, an XML manifest or a concat script now stays out of ffprobe and ffmpeg: cloud render leaves it in the zip as authored, the media probe reports it as not media, and the proxy copy refuses it. Real media never starts with these bytes, so it probes and transcodes as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): catch playlists with control bytes, and keep them from stills and audio probes A text playlist or concat script is detected whatever bytes follow its first line; only markup must be all text. A still frame and the audio probe behind waveforms, peaks and loudness now refuse a file the probe reads as not media, as the proxy copy already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): a parent folder's state the CLI cannot read never marks a project received The walk up for a received-files record now skips a parent whose record cannot be reached. Only a record file that is there but cannot be read or parsed counts every file as received. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): a drive that reports no file ids matches no received file by identity Some network and virtual drives report a file id of 0 for every file, so the same-file match now gives such a file no identity instead of matching it to every listed file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(studio-server): read a media file's first bytes with a read stream The playlist check reads the first 64 bytes through a bounded read stream instead of a raw file descriptor, and the audio-track probe's doc comment sits on its function again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio-server): raise the packed size budget for the media playlist check Main packs @hyperframes/studio-server close to the 1% tolerance on the 168500 budget, and the playlist check adds about 320 bytes, which put the Build over. Set the budget to 172000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli,studio-server): open media only through self-contained media demuxers Every ffprobe and ffmpeg input that cloud render offload, the publish proxy bake and Studio's media helpers open now carries a demuxer whitelist built from the supported media extensions: MP4/MOV/M4A/AVIF, Matroska/WebM, MXF, AVI, MPEG-PS/TS, FLV, ASF, Ogg, WAV, MP3, AAC, FLAC, AIFF and the still-image formats. Playlist, manifest and concat demuxers can no longer open, whatever a file's bytes say. The proxy's own concat step is left as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli,studio-server): keep media probe argv flat, and expect the demuxer list in loudness args Two probe argv literals built from nested spreads are flat again, so "--" stays the visible second-to-last entry the argv contract checks. The normalize-audio test expects the demuxer list before the input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a92498b903 |
fix(studio-server): save an edit Windows briefly holds without freezing the app (#7744)
* fix(studio-server): save an edit Windows briefly holds without freezing the app * fix(studio-server): keep later edits behind a held one, one backup per replay * fix(studio-server): send a held cut again, and keep the sync retry for rollbacks |
||
|
|
b746a0ee13 |
fix: check, render and downloads work on a drive without hard links (#7737)
* fix(studio-server): check and render keep their history on a drive without hard links The history lock had its own list of the errors that mean a drive cannot hard-link, and it lacked EISDIR, which Windows returns on a Google Drive folder. Every check report and render record there failed. The lock now uses core's list, the one owner, which also gains ENOSYS from the lock. * fix(engine): downloads and plan blobs publish on a drive without hard links The producer's plan publisher kept a third list of no-hard-link errors without EISDIR, and the downloader had no fallback, so both failed on a Google Drive folder. Both now use core's cannotHardLink; the downloader copies into an exclusively created file, so it still never overwrites. * fix(engine): a download on a drive without hard links publishes atomically Instead of copying into an exclusively created file, the fallback renames the staged download into place under the cache path lock when nothing is there yet, so a killed run never leaves a truncated file to reuse. |
||
|
|
b5e9bc6893 |
fix(studio-server): an edit to a read-only project file is refused and leaves it unchanged (#7731)
* fix(studio-server): an edit to a read-only project file is refused and leaves it unchanged * test(core): read the refused file without a stat check first |
||
|
|
2c2b399bfa |
fix(producer): local renders bring in only media, font, CSS and JS from outside the project (#7647)
* fix(producer): local renders bring in only media, font, CSS and JS from outside the project Local renders (`render`, range render, `benchmark`, the Studio server and the Vite Studio adapter) run with allowOutsideProjectAssets, which copied every existing file that markup named outside the project into compiled/hf-ext, of any type and from any folder, and served project links that lead outside without looking at where they lead. Publish already applies a policy here: outside references are kept, private locations are left out, and only image, video, audio, font, CSS and JS files are copied. Local renders now follow the same policy. The publish predicates (private location, copied file type, left-out wording) move from the CLI to a new `@hyperframes/studio-server/outside-file` subpath, since the producer cannot import the CLI and already depends on studio-server. The CLI re-exports them, so publish behaves as before. The media extension sets move with them because the copied-type list includes them. The producer decides with one predicate, `outsideAssetRefusal` in utils/paths.ts, and applies it wherever allowOutsideProjectAssets lets an outside file in, so no entry point can skip it: - collectExternalAssets: src/href/url() references, which covers <a href> and <link href> - dropMediaOutsideProject: video/audio/image sources in any spelling the media resolver accepts (file: URLs, percent-encoding), so nothing probes or extracts them - the render file server: project links that lead outside - the distributed plan's project copy: the same links (range render) - GIF/HEIC prep and sub-composition links: private locations only, since those inputs are converted or compiled rather than copied as they are Each left-out file logs the publish wording with "left out of the render". To reproduce on main: a project whose index.html references ../../.ssh/id_key through <link href>, <a href> and url(), with a project link to a file in .ssh, rendered locally, gets those files copied into compiled/hf-ext and served. Comment lines: the four in studio-server's outsideFile.ts moved verbatim from the CLI files they replace. Two are new, in utils/paths.ts. The one on outsideAssetRefusal states the policy once, so its six call sites carry no comment. The one on refusesOutsideLink says its boolean means "refused, and already warned", which the name alone does not say. Comment ratchet is clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): keep outsideFileType as a re-export of the shared module The base repository's deletion guard rejects removing a file that exists on main unless git pairs it as a rename. outsideFileType.ts moved into studio-server/outside-file with enough added around it that git no longer pairs the two, so CI's "Reject accidental file deletions" step failed. The file stays as a two-name re-export and publish keeps importing from it, so publishProject.ts and its file-type test are back to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(producer): raise the unpacked size budgets for the outside-file policy CI's packed-manifest check measured @hyperframes/producer at 3,244,665 bytes unpacked (budget 3,210,000) and @hyperframes/studio-server at 653,506 (budget 646,000), both just past the 1% tolerance. Both packages were already at the edge on main. Measured locally with npm pack --dry-run, main is 3,237,162 for producer and 652,502 for studio-server, so studio-server on main is already at its ceiling. This branch adds about 7.9 KB unpacked to producer, because the new checks sit in the compiler, render stages and file server, which each producer entry bundles. It adds about 5.5 KB to studio-server for the new outside-file entry and its declarations. No source maps, tests or assets were added to either tarball. The budgets go to 3,245,000 and 654,000, just above CI's measurements, the same way #7579 raised producer's budget for the project-folder checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(producer): apply the outside-file policy to embedded local fonts A project font file that links outside the project is now left out of font embedding with the same warning the file server gives, instead of being inlined into the compiled HTML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
0bce3315e6 |
fix(studio): a file held open or read-only answers 423 or 403 with a reason, not 404 or 500 (#7649)
* fix(studio): a file held open or read-only answers 423 or 403 with a reason, not 404 or 500 * fix(studio): valid workflow name for the Windows held-file test * test(studio): release the held file before the held-file test removes its folder * fix(studio): the code editor's save toast names a held or read-only file |
||
|
|
89a7aa3004 |
fix(cli): copy only media, font, CSS and JS files from outside the project (#7636)
* fix(cli): copy only media, font, CSS and JS files from outside the project Publish, cloud render and feedback now copy an outside reference into _ext/ only when its extension is an image, video, audio, font, CSS or JS type, taken from studio-server's MIME map (new ./mime subpath; .avif added). Anything else outside the project is left out with a warning and a left_out entry whose reason is file_type; telemetry counts it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): keep the new outside-type file under its package's comment share Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): copy the outside media cloud render re-encodes or converts The outside allowlist now also takes the video, audio and still-image extensions cloud render re-encodes or converts (.avi, .ogv, .aiff, .tif, .bmp and the rest), from one shared list offload imports too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4fad43db20 |
feat(studio): record the layer name on each history entry's target (#7586)
* feat(studio): record the layer name on each history entry's target * feat(studio): record the clip's name on timeline move and resize entries * chore(studio): drop doc comments the names already carry |
||
|
|
2a70733c15 |
fix: track local Studio sharing CTA interactions (#7566)
* fix: track local Studio sharing CTA intent * fix: tag local Studio and CLI share upgrade links with where they came from The local Studio share modal's Upgrade to Pro link opens /pricing?from=cli&entry=local_studio_share, and hyperframes share's source-files notice links /pricing?from=cli&entry=cli_share, so the pricing page can tell which link a visit came from and return the visitor to their terminal. The modal accepts its own pricing page with any query, still only on hyperframes.dev's two origins. share_upgrade_clicked carries cta=share_modal_upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: name the local Studio upgrade CTA and drop the explaining comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the local Studio upgrade link's return page unchanged Only entry=local_studio_share is added to the local Studio share window's Upgrade to Pro link. from=cli would have told these buyers to go back to their terminal after checkout, but they return to a browser tab. hyperframes share's link keeps from=cli, as the CLI's other upgrade links do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a243169f8a |
fix: keep private project files out of preview bundles and local sharing (#7563)
* fix(core): keep git metadata and env files out of bundled HTML The bundler now checks every file it reads against the project's private paths (git metadata and env files, spelled directly or through a link) and leaves a refused reference as authored instead of inlining it. Bundle options gain a canRead predicate; Studio's preview passes its own private-file rule so the preview document matches what the file routes serve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): check capture read grants against the decoded path A capture page's read grant now looks at the path the way the static preview route decodes it, including encoded separators, so a URL that resolves to a dotfile or into a dot-folder gets no CORS grant. Ordinary project files keep loading in thumbnails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): accept local share requests only from loopback connections The local share routes already require loopback Host and same-origin headers. They now also require the connection itself to come from this machine, so a Studio bound to a network address still keeps sharing local to the person running it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): ask the bundler for Studio's private-file rule as plain data The preview route passed a fresh `canRead` callback on every build. A host that builds on a worker thread cannot send a function across, so it built on its own thread, and it could no longer share one build between two same-content requests. The bundler now takes `privateFiles: "studio"`, a plain string, and applies Studio's private-file rule itself. That rule (git metadata, env files, and the app's records under `.hyperframes/`) now lives in `@hyperframes/core/safe-path`, and studio-server reuses it. The `canRead` option is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): do not serve a preview main file linked to a private file When index.html (or <id>.html) is a link to an env file or into git metadata, the bundler refuses it and the route falls back to reading the main file from disk. That fallback now skips a candidate that is a private project file, by the same rule the file routes use. A main file linked from outside the project is still served. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(producer): never inline git or env files as render sub-compositions The render compiler resolved data-composition-src and inlined the file it named, so `data-composition-src=".env"` put the env file's text into the render page. It now refuses git metadata and env files with the same shared rule the bundler uses. The pre-render check names the refused reference and stops the render. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: raise the inspector unpacked size budget to 3,722,000 bytes The inspector already sat about 36.8 KB over its 3,684,092 budget, just inside the 1% tolerance. Moving Studio's private-file rule into core added a few hundred bytes to the bundles it ships, which pushed it to 3,721,419 bytes and over the tolerance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ffb13c3b62 |
fix(studio-server): load fonts and modules only in the Studio's own preview frames (#7553)
* fix(studio-server): let opaque preview frames load project fonts and module scripts A preview framed with an opaque origin, such as the Compositions hover preview, makes its font and module-script loads in CORS mode with `Origin: null`. Without a CORS grant they failed: the frame fell back to a system font and module scripts never ran. The preview asset route now answers those two loads with `Access-Control-Allow-Origin: null`, `Vary: Origin` and `X-Content-Type-Options: nosniff`. The grant is chosen by `Sec-Fetch-Dest`, which the browser sets and page script cannot: `font` for a font file and `script` for a .js/.mjs file, served with the matching content type. A page's own `fetch()` is always `empty`, so it still gets no grant and composition script still cannot read project files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(studio-server): keep opaque-frame grant comments within the package share Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): let opaque preview frames load project fonts Narrow the opaque-frame grant to fonts. Every sandboxed frame sends the same `Origin: null` and fetch metadata, so a CORS grant for module scripts could not be limited to frames the Studio itself serves. Module scripts stay unloaded in the hover preview for now; fonts keep their grant, and `Sec-Fetch-Dest: script` loads of .js/.mjs get none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): load fonts and modules only in the Studio's own preview frames A CORS grant to `Origin: null` reaches every sandboxed frame, whichever page it sits in. The grant now lives on a per-project path instead: `/projects/:id/preview/~<token>/...` serves exactly what `/preview/...` serves, and only there do font loads (`Sec-Fetch-Dest: font`, a font file served as `font/*`) and module-script loads (`script`, a .js/.mjs file served as `text/javascript`) from an opaque frame get `Access-Control-Allow-Origin: null`. The plain path gets no grant. The token is an HMAC-SHA256 of the project id under a random per-server secret, compared in constant time. The Studio reads it from `/projects/:id/frame-token`, which refuses cross-site and same-site requests, and the Compositions hover preview frames its composition at the token path. Documents served there are re-based under the token and carry `Referrer-Policy: no-referrer`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio-server): raise the packed size budget for the preview frame tokens The per-project frame-token path adds server code to the package, and the packed tarball measured 166941 bytes in CI against a 164800 budget. Set the budget to the measured size plus about 1% headroom. — Rames Jusso Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
84799bdc59 |
fix: take helper programs only from install locations, never the project folder (#7524)
* fix(cli,parsers): take helper programs only from install locations, never the project folder FFmpeg, FFprobe, whisper-cli, parakeet-mlx, Python and system Chrome are now found through one shared rule: an absolute PATH entry outside the working directory, or a fixed install dir. A relative PATH entry and any folder inside the working directory are skipped, on every platform. Windows walks PATH itself instead of asking `where`, which lists the working directory first. FFmpeg discovery no longer falls back to `.hyperframes/bin` or to an installer package in the project's node_modules; an installer package installed next to HyperFrames still works. The env overrides are unchanged. The CLI skill reference stops suggesting the project-local folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cli): give the PATH-lookup tests a fixed PATH on Windows Windows now walks PATH instead of running `where`, so tests that faked `where` output found the runner's real python and cmake. Both tests now set PATH to a temp folder holding only the programs they expect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: report a missing helper program instead of running it by bare name When no trusted FFmpeg or FFprobe is found, the engine, the producer's probes and Studio's waveform, peak and audio-track helpers now report "not found" with the HYPERFRAMES_FFMPEG_PATH / HYPERFRAMES_FFPROBE_PATH hint instead of handing the bare name to the OS lookup. Callers that degraded on a missing binary still do: runFfmpeg returns a spawn_error result, the GPU and version probes report none, and Studio's audio helpers fail soft. The Lambda handler names its bundled ffmpeg and ffprobe by path, since they live under the task root, which is the working directory. brew, git and cmake for the whisper.cpp install, and the clipboard tool for `hyperframes add`, run by the absolute path the trusted lookup approved. The media-use engine gets a PATH holding only trusted folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(engine): fail a missing FFmpeg the way a failed spawn always has Throwing from getFfmpegBinary turned every caller's missing-binary path into a synchronous throw: the streaming encoder's "failure result, not a throw" contract broke, and unit lanes that run without FFmpeg crashed at module load. With no trusted copy the getters now return an absolute path inside HyperFrames' own install that is never created, named for the override to set. Spawning it fails with ENOENT exactly as before, and the OS still never looks the bare name up. The call-site guards and fixture changes that the throw needed are reverted. The whisper install tests match git and cmake by name and skip the brew case on Windows, where the lookup walks the real PATH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(engine): pin the found FFmpeg before the HDR test looks it up as macOS on Windows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f36463e292 |
fix(core): fall back to a direct write when link() is denied with EACCES (#7474)
* fix(core): fall back to a direct write when link() is denied with EACCES On Android app data (Termux, SELinux enforcing), link(2) fails with EACCES in a folder the temp file was just written to. createFileAtomically() and the studio history owner lock treated that as fatal, so `hyperframes init` left a half-scaffolded project and every render logged a recordRenderSuccess failure. Both now take their existing exclusive direct-write path, as they already do for EPERM. Fixes #7473 * fix(share): treat EACCES as no hard links in the project share lock Same Termux/SELinux link() denial as core and the studio history lock: the share lock's link-then-exclusive-create fallback now covers it too. Folds the Android note into the existing comment so no file's comment share rises. |
||
|
|
b96c82b785 |
fix(cli,studio-server): limit registry installs and Studio file writes to project content folders (#7523)
* fix(cli,studio-server): limit registry installs and Studio file writes to project content folders Registry blocks and components now install only into the project's compositions, components and assets folders (plus models/ and lib/, which the catalog uses, and notes at the root). node_modules, agent instruction files and programs or scripts are refused at any depth, matched case-insensitively with either separator, and checked again on the path the project's own links lead to. Studio's file routes never read or write git metadata or env files, and every route that writes, renames, deletes, copies or uploads a request-named path refuses the project folder itself, node_modules and hidden files or folders other than .hyperframes/ and .media/, on both the spelled and the link-resolved path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli,studio-server): trim comments added by the write allowlist Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli,studio-server): trim path segments in linear time The trailing dot/space and :stream trims used anchored regexes that backtrack quadratically on long runs of spaces, dots or colons in a request path. Trim with a plain scan instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): refuse example dependencies in add and allow only TEMPLATE.md at the root - addToProject now refuses a block or component that depends on an example, not only an example asked for by name. The installer lets an example write at the project root, so a dependency must not carry that through. - The only file a block may write at the project root is TEMPLATE.md, the catalog's usage note. Any other .md or .txt name could be one a tool loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
80cda85d76 |
fix(studio-server): run thumbnail captures in an opaque origin (#7528)
* fix(studio-server): run thumbnail captures in an opaque origin The thumbnail renderer loads each composition as a top-level page, so its scripts ran on the Studio's origin. The capture document (`?hf-capture`) now carries `Content-Security-Policy: sandbox allow-scripts`, so those scripts get an opaque origin. An opaque page's CORS-mode loads fail without a CORS header. The renderer that opened the page is trusted, so it adds `Access-Control-Allow-Origin: null` itself, over that page's own DevTools session, to the loads a frame needs: - fonts, module scripts and images; - the `.html` scenes, `.json` and `.cube` files the runtime fetches. Only GETs of the project's preview files qualify, matched by file type. Both thumbnail renderers do this: the CLI's and the Vite dev server's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): let an opaque capture wait for a video's preview copy A video the browser cannot decode is drawn from its `?hf-proxy=` copy. The runtime waits for that copy with a ranged fetch, preflighted when it carries the priority header. In the opaque capture page both failed, so each such thumbnail fell back to a still after about five seconds of retries. The renderer now answers that preflight itself. It also exposes the copy's status headers to the wait, for video files under the preview path only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(studio-server): keep capture-load comments within the package share Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): keep video pixels and project fetches in opaque thumbnail captures - Media loads: the renderer now grants them, and a capture document loads the project's own videos with `crossorigin="anonymous"`. Color grading and shader textures can then read their pixels. - Fetches: every GET of the project's preview files is granted, except a dotfile or dot-folder path such as `.env` or `.git/`. This covers the models and fonts that registry blocks fetch at runtime. - Opt-in: the capture sandbox is now a `createStudioApi` option, `sandboxThumbnailCaptures`, off by default. The CLI Studio server and the Vite dev server turn it on, because their thumbnail renderers install the grant. Another app keeps its current capture documents until its renderer does the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(shader-transitions): prepare transitions when IndexedDB is denied An opaque-origin document, such as a sandboxed preview or thumbnail capture, has no IndexedDB, and opening it throws. The snapshot cache now treats that as no cache, so the transitions still prepare and draw. Thumbnail captures also grant a CORS read of a missing preview file, so a fetch() sees its status as a same-origin page would. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): leave a video with another host's <source> out of capture CORS A video whose <source> child points to another host now keeps its plain load in a thumbnail capture. Adding crossorigin to it would make a CDN that sends no CORS headers refuse the video, leaving the clip blank. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
04947d99f7 |
feat(cli): share rendered videos through unified reviews (#7135)
* feat(cli): share rendered videos through unified reviews (#7135) * feat(share): attach editable project sources to reviews (#7137) * feat(share): measure local sharing outcomes (#7138) * feat(cli): stage the sixty-day publish transition (#7136) * feat(studio): share review pages from local preview (#7140) Advertise the CLI sharing bridge before bootstrapping it so standalone Studio does not request unsupported routes. Preserve origin and session checks. Budget the intended sharing artifact: clean main packs at 8,060,519 bytes versus 8,162,979 with sharing (8,169,168 in CI). Required policy and Unicode tables, bundled sharing code, and Studio controls account for the growth. Set the packed-only budget to 8,577,627, following the 5% headroom convention; retain the unpacked cap and all package checks. * fix(share): persist refusals and improve CLI retry feedback * fix(ci): restore render diagnostics and include sharing workspace * fix(cli): keep sharing owner error codes stable * fix(share): clarify update feedback and align audience changes * fix(share): clarify updates and avoid scratch-file rerenders * fix(cli): report active shares and preserve update channels * fix(cli): resolve update channel when checking registry * fix(ci): refresh sharing package budgets after rebase * fix(share): require consent before uploading project files |
||
|
|
1a9fb8acb6 |
feat: opt-in 4:4:4 chroma for SDR MP4 masters (#5820)
* feat(engine): decouple transparent background from png capture format PNG capture used to imply a cleared page background. A new CaptureOptions.transparentBackground lets lossless opaque PNG capture (4:4:4 MP4 output) keep the page background. Absent, it still follows format === "png", so alpha output and motion blur are unchanged. Opaque PNG skips drawElement, whose verification and worker-encode paths are JPEG-only. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(engine): add 4:4:4 chroma option to getEncoderPreset getEncoderPreset takes an optional chromaSubsampling ("420" by default). "444" returns yuv444p for SDR MP4, so libx264 encodes the High 4:4:4 Predictive profile and odd sizes need no even padding. WebM, MOV and HDR presets ignore it. The ChromaSubsampling type is exported for the producer. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(producer): chromaSubsampling render option with lossless png capture RenderConfig.chromaSubsampling ("420" by default) opts an SDR MP4 render into 4:4:4. "444" encodes libx264 yuv444p and captures every frame as opaque PNG: Chrome's quality-100 JPEG is already 4:2:0 on beginFrame and screenshot capture, and drawElement can fall back to screenshot mid-render, so PNG is the only capture that keeps the colour. drawElement is turned off for these renders. The probe and main capture options share resolveCaptureSurface, so they cannot disagree on format, quality or background. Formats other than mp4, GPU encoding and HDR output are rejected before any work starts, auto-detected HDR sources fail before capture, and distributed requests refuse 444. The default render is unchanged. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(producer,studio-server): accept chromaSubsampling on render routes The shared parseEncoderOptions validates chromaSubsampling and answers 400 for "444" with a non-mp4 format, gpu, or force-hdr, so a request that would come back 4:2:0 never starts a render. The Studio render route, both Studio adapters and the producer HTTP server forward it. The producer server also refuses "444" with outputDynamicRange "hdr", which parseEncoderOptions cannot see. No Studio UI control; the option is route-level like crf and hdrMode. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(cli): add --chroma-subsampling flag `hyperframes render --chroma-subsampling 444` opts an SDR MP4 render into full-resolution chroma (yuv444p with lossless PNG capture). The default stays 420. The plan rejects 444 with a non-mp4 format, --gpu or --hdr before anything renders, with a usage error that names the conflicting flag. The value reaches the local render request and, only when it is 444, the Docker argv, so default Docker invocations are unchanged. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: document 4:4:4 chroma subsampling Add a "4:4:4 masters" section to the rendering guide: when to use --chroma-subsampling 444, why it captures PNG, the measured chroma gain (large for text and UI, none for footage and gradients), its limits, and a player compatibility table to be filled in from testing. Document the flag in the CLI reference, the built-in rendering docs and the hyperframes-cli skill reference (with the regenerated skills manifest), and the chromaSubsampling option in the producer docs. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: add 4:4:4 player compatibility results Fill the 4:4:4 compatibility table from testing H.264 High 4:4:4 Predictive output. Chrome 155, Edge 155, VLC 3.0, Safari on iOS 26.6 and Safari 26.6 on macOS play it, and so does AVFoundation on macOS 26.6, the framework QuickTime Player plays through. Firefox 157 on Windows and both Windows media players do not. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: note the measured render cost of 4:4:4 output Replace the vague "slower capture" note with measured numbers: a text and UI composition rendered in about twice the default time, full-frame footage in about three and a half times, because PNG encoding cost grows with image detail. Refs #5555 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(producer): reject chromaSubsampling 444 in distributed render config Distributed configs have no chroma field and validateDistributedRenderConfig ignored unknown keys, so a JS caller passing chromaSubsampling: "444" to the Lambda or Cloud Run SDK got a 4:2:0 file with no error. Reject it, and make the rendering guide say so precisely. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(producer): check a 444 render reaches the encoder as yuv444p Every helper had tests, but nothing checked the orchestrator passes chromaSubsampling through, so dropping it from the encoder preset or capture surface would turn 444 renders back into 4:2:0 with all tests green. Render a small fixture with "444" and with the default and check pix_fmt with ffprobe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(producer): move the 444 drawElement gate into a helper Keeps runCompileStage under the fallow complexity threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: keep comment share at or below the merge-base comment-ratchet failed on 11 files this PR touched. Keep the 4:4:4 rationale once in chromaSubsampling.ts, move the distributed-render reason into its error message, and cut the rest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(producer): check a 444 render captures full-resolution chroma The encoder check alone passes when chromaSubsampling is dropped from the capture surface: frames are captured as JPEG and encoded yuv444p with 4:2:0 colour. Put a red/blue edge at an odd x, inside a 4:2:0 chroma pair, and require the two pixels to differ in Cb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(producer): trim the chromaSubsampling.ts header to the package comment share Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: finish switching to capturesAlpha from #6262 The merge that adopted main's transparent / capturesAlpha left these files uncommitted, so resolveCaptureSurface still returned transparentBackground. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(engine): use transparent / capturesAlpha from #6262 main added CaptureOptions.transparent and capturesAlpha (#6262), which do what this PR's transparentBackground did. Use them, keep the PNG check in drawElementWorkerEncodeEligible, and re-pin test-classification.mjs and the skills manifest against current main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(producer): cut the 4:4:4 comment blocks to one to three lines The reasoning lives in the PR description with the measurements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: reconcile 4:4:4 chroma with latest main Keep main's video-layer capture overrides, template entry resolution, ProRes profile parsing and blur-differential tests alongside the chroma option, and fold the encoder sub-parsers into one loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: keep main's compile-stage tests and regenerate the skills manifest Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
b8bb491900 |
fix(studio-server): harden preview paths, cache folders and local servers (#7510)
* fix(studio-server): keep cache writes inside the project and canonicalize preview paths - The tool's own folders (.hyperframes records, backups, preview documents, .thumbnails, .transcode-cache) are no longer written, pruned or emptied through a link that points outside the project. Thumbnails are still served when their cache folder is a link; they are just not cached. - The hf-id stamp record and the history id are replaced atomically instead of written through an existing link. - Sub-composition previews and thumbnails use the composition's canonical project-relative path, and the path is attribute-encoded in the document. - Thumbnail requests from another site are refused before any capture. - Saved GSAP scripts escape a `</script` sequence so the script element keeps its contents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(core): refuse a UNC or device path on another root before any disk access isSafePath now rejects a target whose root is a UNC or device root other than the project's own before it calls realpath or lstat. Projects on a share keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): answer WebMCP clients only from Studio's own page The polyfill now starts with its tab transport limited to Studio's origin and its frame transport off, so a page that frames Studio cannot list or call its tools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(inspector): check Host on the per-session preview server The preview page server applies the inspector API's loopback Host rule, so a rebound DNS name cannot read the bundled composition or project files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * revert(studio-server): keep writing media proxies through a linked .transcode-cache Refusing the folder made every proxied video in such a project answer 502. A linked cache folder now receives copies again; it is still never swept, so nothing already in the folder it points at is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(studio-server): drop a comment the comment ratchet refuses Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): skip HEIF and GIF preview prep when .hyperframes/prepared-assets is a link The preview transform wrote converted images into .hyperframes/prepared-assets through a link, so a project shipping .hyperframes as a link to another folder had files written there. Such a project now gets its preview with the images as written in the composition, unconverted, and nothing is written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio-server): never sweep a linked .transcode-cache, from Studio or hyperframes clean The link check moves into cleanupProxyCache, which both Studio's cache maintenance and `hyperframes clean` call, so neither removes files from the folder a linked .transcode-cache points at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
983e865ad7 |
fix(studio-server): thumbnail origin from the server, sandbox previews from other sites (#7492)
* fix(studio-server): thumbnail origin from the server, sandbox previews from other sites The thumbnail route builds the headless browser's URL from the server's own listening origin (a new optional `serverOrigin` on the adapter, wired in the CLI preview server and the Vite dev host) instead of the request's Host header. Hosts that report no origin fall back to a loopback Host only. Preview responses (bundled, sub-composition and project files) opened from another site carry `Content-Security-Policy: sandbox allow-scripts` and `Vary: Sec-Fetch-Site`. Studio's same-origin iframe, browser automation and non-browser clients are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(studio): build the thumbnail origin from a hostname bind name With HYPERFRAMES_PREVIEW_HOST set to a hostname, the listening address is the IP it resolved to, and the Host check accepts the bind name, not that IP. The thumbnail browser then loaded a 403 page. Use the bind name when it is a hostname; IP and wildcard binds keep the listening address. — Rames Jusso Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style(studio): drop the serverOrigin comment that put it over the package's comment share The hostname-bind rule is stated by its test name in serverOrigin.test.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
248f56fbaa | fix(studio-server): a claim waits for a changing file's first copy, so its edit stays undoable (#7497) | ||
|
|
61e720b0e7 |
fix(studio-server): history sweeps stop holding the host's event loop on large projects (#7491)
* 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 |
||
|
|
f318d3d08a |
fix(studio-server): refuse cross-origin writes and unknown hosts on the preview server (#7490)
* 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 ( |
||
|
|
724ab39b3f |
fix(studio-server): buildSubCompositionHtml reads only compositions inside the project (#7482)
* 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> |
||
|
|
e8416b2a41 |
fix(studio-server): history waits out a file a save has emptied, and rereads one written mid-copy (#7480)
* 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 |
||
|
|
b59fa20833 |
fix(cli): staging folders beside a project path no longer fail past 260 characters on Windows (#7338)
* 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 |
||
|
|
2927fe6155 |
perf(studio-server): a large project's first history copy takes a fraction of the time (#7415)
* 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 |
||
|
|
b7157bdabb |
feat(studio): scrub full-quality video with decoded preview frames (#7379)
* feat(studio): scrub full-quality video with decoded preview frames * fix(studio): release scrub decoders before native playback * fix(studio): bound paused fallback and tolerate decoder load failure * fix(studio): recover stalled native preview handoffs * fix(runtime): recognize cross-realm preview video elements * fix(studio): bound Play handoffs and drain transparent preview samples * fix(preview): recover retained video without chasing playback clock * fix(studio): drain finite alpha queries before disposing readers |
||
|
|
cf75dfd7af |
fix(studio-server): a video with a codec nobody listed gets a playable preview copy (#7356)
* 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 |
||
|
|
6004508e65 | fix(studio-server): MPEG-2 and DNxHD videos get a playable preview copy (#7348) | ||
|
|
f3e45b492e |
fix(studio-server): proxy MPEG-4 Part 2 and MJPEG video the browser cannot decode (#7310)
* 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 |
||
|
|
2f2195515b |
fix(cli): normalize-audio --reference stops short of the peak ceiling instead of refusing (#7254)
* 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 |