* fix(deps): bump @mcp-b/global to 6.1.0 to clear @modelcontextprotocol/server advisories
@mcp-b/global 5.x and 6.0.x pin @modelcontextprotocol/server 2.0.0, which is
affected by GHSA-f897-62hf-6gxq, GHSA-46jr-4wx8-v453, GHSA-jm63-cq47-j5jp and
GHSA-rvq5-wwqv-78pq (>=2.0.0 <2.3.0). 6.1.0 is the first release that pins
server 2.4.0.
6.x installs the W3C WebMCP polyfill and passes { signal } to execute; the
real-package tests now drive the 6.x surface (secure context, MCP tools/call).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): close the WebMCP polyfill after the real-package suite
6.x's BrowserMcpServer sends a tools-changed event on a timer after the
last tool unregisters. Without cleanupWebModelContext() it fired after jsdom
teardown and vitest failed the run on an unhandled rejection. Also scope the
transport test's header to the MCP transports it actually checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): menu row highlight follows the menu's corner
* fix(studio): keep the menu row's comment share flat
* fix(studio): export the menu row class so hosts reuse it
* feat(studio): press ? to open the keyboard shortcuts panel
Adds a rebindable `shortcuts` action bound to `?` (Shift+/) that toggles
the shortcuts panel; Esc still closes it. The key is ignored while focus
is in an input, textarea or contenteditable, and the panel lists `?`
under Panels.
Refs heygen-com/hyperframes#5580
* docs(studio): document the ? shortcut for the shortcuts panel
* fix(studio): edit clips added to a project outside Studio
A clip written into a composition after its ids were last stamped (a hand
edit, an outside agent) has a data-hf-id only in the served preview. The
timeline's client-side patch looked that id up in the file's raw bytes, so
Hide, Mute, move, resize and attribute saves failed with "Unable to patch
timeline element ... (by hf-id; no file on the clip)".
Resolve the target against the file stamped in place the way the preview
stamps it, as the server's own saves and the GSAP save already do. The save
then persists that id.
* fix(studio): save volume on several clips added outside Studio
The multi-clip attribute save (gain or volume on a selection) patched each
clip in the file's raw bytes, so a clip with no ids on disk was skipped and
the save reported success with nothing written.
The by-target read and patch helpers now resolve a clip by the id the
preview served it with, so every caller finds it. The multi-clip save goes
through the same batch patch as the other timeline saves, which refuses a
clip the file does not hold; the error reaches the person instead of a
silent no-op. The preview picker finds the file holding an unstamped
element the same way.
* feat(cli): check warns when text leaves the 9:16 social safe areas
* feat(core): safe areas owned by core; check adds --safe-zone standard
* style(cli): format
* refactor(core): name the safe-area band fields
* fix(cli): defects outrank safe-zone warnings at the issue cap
* style(cli): format
* test: read the safe-box constants from core
* feat(studio): drag and resize on an opaque preview start from one gesture-start read
A gesture on a preview frame Studio cannot script read nothing from the
frame as it started. A drag snapped to nothing; a layer GSAP holds moved by
a CSS translate that its save then dropped; a resize grew from the overlay
rect, the layer's GSAP scale included; and the pointer reached the element
only through the canvas zoom.
The runtime answers a new `gesture-start` request. For each pressed element
it gives the overlay geometry, the transform-free layout size, how far the
centre moves per px of translate (probed the way a draft draws it, every
transform above it applied), and GSAP's x/y when GSAP owns its position,
with whether a tween moves it. It also lists the boxes of the page the
gesture can snap to, walked by the rule Studio's own snap collection now
takes from core.
On an opaque preview every press waits for that one read, on the existing
waiting-press path, and the gesture starts from it: the snap targets, the
move route and GSAP base (so the save writes GSAP's x plus the drag, not the
drag alone), the pointer-to-offset matrix, and the resize's base size. A
layer a tween moves is refused with a notice, since saving that move still
reads the frame.
Same-origin frames do not change: their presses start at once from the
element, and their snap collection walks the same elements by the same rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(inspector): raise the packed size budget for the gesture-start runtime
The inspector bundles core's preview runtime. Main alone packs to 866206
bytes, 420 under the 1% tolerance on the old 858046 budget; the
gesture-start request adds 713 bytes (866919), which tipped the merge
queue's Build over. Set the budget to 880000 to leave room for the
remaining opaque-preview requests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): drag and resize draw live on an opaque preview over its channel
On a preview frame Studio cannot script, a drag moved only the selection
outline: the element stayed put until the save reloaded the preview. A
resize threw on every pointer move (it measured the frame's element for the
centre pin), saved its size without the centring shift, and then a drag or
resize save threw while re-syncing the preview's timeline, which stopped the
save queue and paused the preview.
The runtime answers a new `draft` request: it adds a gesture's translate to
the one the element had and sets its border box, the way the save writes
them, and an end either keeps what is drawn (the save landed) or puts back
what was there (a cancel, a tap, a failed save). Studio mirrors what a
gesture draws on an opaque selection's stand-in to the frame, one request in
flight per frame with later moves merged into the next. An opaque resize
grows the outline about its centre from the size it wrote rather than
measuring the frame. The timeline re-sync after a save reports a frame it
cannot reach, so its caller re-seeks or reloads instead of throwing.
A stand-in now starts with the inline translate and Studio size and offset
of the element it stands for, so a drag on a freshly reloaded preview starts
from where the element is. Before, a second drag after a reload saved only
its own distance and dropped the first.
Same-origin frames do not change: only an opaque selection's stand-in is
mirrored, and the re-sync change only catches a read such a frame refuses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): draft writes test an element by its namespace, not its realm
The runtime preview guard bans instanceof HTMLElement/SVGElement in the
runtime, since a node from another realm fails it; the draft handler uses
isStylableElement from domRealm.ts, as other runtime style writes do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): keep the opaque preview's gesture drafts in step with the saved edit
- Grabbing a layer again before its last save settles keeps that save's draft
on the frame and draws the new gesture from there; the movement probe's
restore no longer ends a draft it never drew.
- A move on an opaque preview starts from the px the frame renders the
translate at (%, em, var(), or a stylesheet translate), records the author's
own value for Reset, and refuses a % it cannot size instead of dropping it.
The frame's draft base resolves % to px, so a resize can't shift it again.
- The stand-in carries Studio's translate marks, so Reset after a reload
restores the author's translate.
- A resize with no offset member keeps its draft once saved.
- An undo painted over a pending move draws the move again when it is put back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): update happy-dom to ^21.0.4
happy-dom 21 turns off iframe page loading by default. The player and
sdk test environments load same-origin iframe documents, so they opt
back in through their vitest happyDOM settings.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: adapt studio and cli tests to happy-dom 21
Studio tests load same-origin iframe documents, so they opt back in to
iframe page loading. happy-dom 21 adds Element.checkVisibility, which
reads the real styles rather than the mocked getComputedStyle, so the
motion-signature decoys are hidden in the DOM as well as in the mock.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): fix remaining studio tests on happy-dom 21
- happy-dom now implements getAnimations, so Base UI deferred popup
unmounts to animation frames; test setup sets Base UI's
BASE_UI_ANIMATIONS_DISABLED, matching the old synchronous behaviour.
- happy-dom 21 drops vendor-prefixed properties it does not list, so the
-webkit-text-fill-color tests move to a jsdom file with shared helpers.
- The scaled-iframe drag test builds its own Window, which now needs
enableIframePageLoading.
- NLEPreview.slowBoot's per-file environment options never applied the
disable setting and now wiped the config's iframe opt-in; drop them.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): inline fill-test helpers instead of a shared module
Keeps the moved -webkit-text-fill-color tests self-contained and leaves
the original test file's helpers untouched.
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): drop the Base UI flag comment for the comment ratchet
— Clippy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* 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
A pointer move superseded by a newer move or a leave returned null, not just
skipped the hover update. The right-click path awaits that same lookup for its
target when nothing is selected, so on a sandboxed preview, where the lookup
crosses the frame's channel, a 1px jitter during the right-click bumped the
counter and the menu never opened. The stale hover is still dropped; the
result is returned either way.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): layers panel and marquee read an opaque preview over its channel
The runtime answers a new layers request with the Layers walk: each layer's
handle, depth, child count, z-index and kind, by the rules Studio walks a
scriptable frame with, which move to core. On an opaque frame the Layers
panel lists, selects and drills in from it, and the marquee measures its
candidates over the channel and selects from their descriptions. An opaque
selection maps to a timeline clip known only by its clip id, so a marquee's
picks survive the timeline sync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): opaque preview hover, layers drill-in, marquee paging and delete path
Review follow-ups for the opaque-preview Layers panel and marquee:
- Delete on an opaque selection runs the DOM delete again. The clip-id match
that lets a selection find a row known only by its clip id is now opt-in
(`clipIdScope`), passed only by selection sync and the Layers seek, never by
delete or group commits, which need a patch target that row lacks. A row
with no file reads as in the open composition, as the forward lookup does.
- The runtime's `layers` reports a drill-in group it no longer has
(`missingGroup`) and lists nothing, so the panel leaves the drill-in after a
reload as the same-origin branch does, rather than list the whole page.
- `layers` takes an `offset`, and the marquee pages through every layer, so
elements past one reply's 2,048 cap still band-select.
- A Layers refresh that lands while an opaque read is in flight runs once more
when it settles, instead of being dropped.
- A hover resolved for a pointer move that a leave or newer move superseded is
dropped.
- `pointer-targets` reads the hit stack once per request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(core): keep the layers paging test inside the Windows runner's timeout
The paging test walked the 2,051-layer page three times with every row
mapped, which ran past 5 s on windows-latest. It now maps only the last
page's rows and has its own 20 s timeout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): canvas click, hover and timeline select read an opaque preview over its channel
The runtime answers a new pointer-targets request with the canvas pick and its
cycle stack; the hit-test moves to core so Studio picks by the same rule on a
frame it can script. A data: value under the description limit now arrives
whole, so a small data: image is selectable on an opaque frame. Drill-in,
hover, timeline clips known only by clip id, and the stand-in attribute reads
in double-click, ungroup, path-offset and the agent selection context work
there too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(core): raise the core unpacked size budget for the pointer-targets hit-test
The hit-test moves from Studio into core's editing runtime, which core ships
in its runtime bundles; CI measured the unpacked tarball at 4,329,030 bytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): read overlay geometry from an opaque preview over its channel
The runtime's editing channel gains a `geometry` request: per element
handle its client rect, the corners it paints at when rotated, whether it
renders, its clip-path, its source boundary's size, a group wrapper's
member rects, and optionally one element's descendant boxes. On a preview
frame Studio cannot script, the selection, child, group and hover boxes,
the root scale (from the mirrored stage size) and a press held across a
preview change read that geometry, with one read in flight at a time.
Same-origin frames keep reading the DOM directly; the measuring code they
use now lives in core so both paths share one rule.
Also from the review of #7613: opaque selections carry `hasAudio` and
`src` read off the description, a description with a cut attribute or
inline style builds no selection, a failed computed-styles or root read
builds none either, and the group refresh threads its frame and leaves a
group the user changed meanwhile. `findClosestByAttribute`, left without
a caller by #7613, is removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(producer): raise the packed size budget for the runtime's geometry read
The producer ships the preview runtime, which now carries the editing
channel's `geometry` request and the measuring code it shares with Studio.
The packed tarball measured 888,810 bytes in CI against an 880,000 budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): timeline select and selection refresh read an opaque preview over its channel
On a preview frame Studio cannot script, timeline select, a selection
refresh and a group refresh build the selection from the runtime's element
descriptions. The rules that pick the element (group capture and drill-in,
the clip ancestor, the walk to an addressable element, timeline-locked, the
lookups and the master-view root fallback) move to a pure module over an
ancestor chain, used by both paths, so both select the same element.
Same-origin frames keep their direct reads.
The editing port gains `ancestors` (each handle's chain, parent first) and
`query` (a selector's matches with their source facts), and
`computed-styles` also names its element by handle. An opaque selection
carries the element's handle; its `element` is a tag-only stand-in in a
document with no window.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(studio): keep the selection rules' comment share at the package's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(core): runtime element handles for the editing channel
The runtime gives each element a numeric handle for one page load and
answers two new editing-port requests: `elements-at-point` (the stack under
a viewport point) and `describe` (handles to plain-data descriptions). Each
description carries the element's stable selector, the source facts Studio
resolves to a file, earlier class-selector matches counted per source,
attributes, inline styles, text, child handles and its client rect.
The stable-selector rule and source-attribute read move to core so Studio
and the runtime address elements one way; Studio re-exports them and
resolves a description's source file and selector index with its own map.
Studio adds `PreviewElement` (a checked description) and client helpers.
Every channel read now gives up after the agent probe when the frame's
runtime has no editing agent, as the seek wait already did. `computed-styles`
accepts custom property names with any case or `_`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): per-load element handles and a light elements-at-point reply
Handles are now "<load>:<n>" strings, where the load id is random per page
load, so a handle from an earlier load reads as null like a removed
element. `describe` checks the exact format.
`elements-at-point` returns only {handle, tag, rect}; callers describe the
one they keep. Descriptions cap each attribute and inline-style value, keep
only a `data:` value's header, leave <script> and <style> text out, and say
when anything was cut. A handle's entry goes once its element is collected
or found disconnected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): draw the element-handle load id on first use
A render seeds crypto.getRandomValues from virtual time, so drawing the
load id when the runtime loads shifted every random value the composition
drew after it, and the random-stagger-workers render no longer matched its
baseline. The id is now drawn the first time a handle is made, which a
render never does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): keep a parked element's handle, and cut data: headers only from values
A scene the preview parks and puts back keeps its element handles: an entry
now goes only once its element is garbage-collected. Text that starts with
"data:" is no longer cut to a header; that rule applies to attribute and
inline-style values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): show the move, resize and rotate readout as a chip under the element
The chip now sits below the element, then beside it, then above the text toolbar, and keeps its side for the whole gesture. It uses the toolbar's own material and reads X / Y, W / H or an angle, so the floating text toolbar no longer covers it.
* fix(studio): keep the rotate readout clear of the turned element
While rotating, the chip was placed under the element's own box, so it overlapped the rotated text. It now clears the rotated bounding box.
* fix(studio): keep the readout chip inside the preview stage at the edges
The chip was bounded by the whole canvas area, so near the bottom it hung past the stage's edge. It is now bounded by the stage itself.
* refactor(studio): split the readout chip placement into small steps
The placement function scored over Fallow's complexity limit and added comment lines the comment ratchet refuses. The placement now lives in its own module of small functions, and the added comments are gone.
* fix(studio): keep the position readout chip clear of the preview toolbar
* fix(studio): keep side readout chips on the stage and clear of rotated elements
* style(studio): format the readout test file
* fix(studio): place the readout chip from the painted angle under rotated parents
* feat(studio): add a light @hyperframes/studio/keys subpath for key parsing and defaults
parseCombo, matchCombo and DEFAULT_STUDIO_KEYS, with their types, from an
entry that imports nothing else, so a host can read Studio's keys without
loading the editor. The defaults move to a module of their own, which
studioShortcuts re-exports as before.
* fix(studio): declare the keys subpath in package-subpaths.json and regenerate the manifest
* test(studio): read the keys import graph with platform paths so it passes on Windows
First slice of moving Studio's selection and overlay readers off the
preview frame's DOM. Same-origin frames keep their direct reads; only a
frame Studio cannot script takes the new paths.
- Runtime editing port: a validated computed-styles request, answered
with the same logical opacity Studio reads (moved to core).
- Element picker: on an opaque frame, the picked element's computed
styles come from the runtime. Picker posts are taken only from an
origin the posting frame can have.
- Composition rect: an opaque frame's declared size comes from the
runtime's stage-size post, mirrored only for registered frames and
their origins.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): a later connect from the preview parent gets a fresh editing port
A parent that disposes its editing client and creates a new one for the same
frame (a remount that keeps the iframe) used to wait forever: the runtime
handed its port over once per page load. Each valid connect from the parent
now closes the previous port and hands over a new one. Connects from any
other sender are still ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): playback and timeline reads go over the preview's message channel
Prepares Studio's preview to run on an opaque origin, where the parent cannot
read the frame's window.
- previewChannel: one editing-port client per frame load, plus the loop start,
seek-painted and clip-manifest reads over it.
- bridgePlayback: a playback adapter that sends play, pause and seek as
control-bridge messages and mirrors the runtime's state and timeline posts.
It is used only for a frame Studio cannot script; a same-origin frame keeps
the direct adapter.
- The loop start and the state-tick manifest recovery now always use the
editing port. The shadow reload's seek-painted wait uses it for a frame
Studio cannot script.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(core,studio): trim comments back under each file's comment share
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): keep the direct loop-start and manifest reads for frames Studio can script
A host can pair this Studio with a runtime older than the editing port. The
loop start and the state-tick manifest recovery now read a same-origin frame
directly, exactly as before; only a frame Studio cannot script uses the port.
previewFrameOpaque replaces previewFrameScriptable and treats a frame with no
window as not opaque, so a detached frame keeps its old no-op path too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core,studio): keep every editing port the parent receives working on an opaque preview
The runtime posts ready before it installs its editing agent, so a client can
connect twice and receive two ports. Closing the earlier port on each connect
left a client that took the first one with a dead channel for the rest of the
frame load. The agent now keeps earlier ports open (a disposed client closes
its own end) and closes all of them on teardown.
For an opaque preview:
- the restore-seek wait gives up after a 1 s probe when no editing port
arrives, so a runtime without the agent no longer holds a reload for 15 s;
- the bridge playback mirror keeps a seek until the runtime confirms it, so
a state posted before the seek cannot undo a quick frame step;
- sceneSwapFor returns no swap instead of reading the frame's window, so a
reload falls back to a full reload.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): call a frame opaque only when its window refuses a read
previewFrameOpaque treated any frame whose contentDocument was null as opaque.
A same-origin window can still report a null contentDocument (an iframe that is
not in the document), and that sent it down the opaque path. A frame is opaque
now only when reading its window's document throws, as it does across origins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): mirror playback only from preview frames Studio built, at frame precision
The bridge playback mirror took a state or timeline post from any window and
made a mirror for it. It now takes a post only from a frame Player registered
(watchPreviewFrame, called before the frame loads, so the boot-time timeline
is not missed), and only when the post's origin is one that frame can have:
null for an opaque sandbox or a data: URL, the parent's origin for srcdoc,
about: or no src, else the origin of its src.
A pending seek now counts as confirmed by the frame the runtime lands it on,
the frame at or before it, rather than by a 1 ms match. An off-grid seek used
to drop every state post for 500 ms, freezing the playhead and its play state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): keep the editing-client tests' fake frame detached from the document
Main's test harness now attaches its fake iframe, and happy-dom then fires
that frame's about:blank load on its own, which ends the editing client's
frame load mid-test. These tests build their own detached frame instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(studio): share the detached fake frame with the manifest router test
The manifest router test had the same race: the attached harness frame's own
about:blank load ended the editing client before the port answered, which
lost on the slower Windows runner. The harness now exports
detachedFakeIframe, which makeFakeIframe builds on, and both opaque-frame
test files use it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): a preview reload survives its pane unmounting mid-load
When the preview pane unmounted while a shadow reload was loading, its
Player removed the shadow frame but the reload kept timing it, so the
edit was dropped with "Its page had got to: no-page" and the previous
preview stayed. The reload now pauses while its frame is off the page
and starts its budgets again when the pane mounts a new frame.
The Player's comment on callback refs said the mutable-ref branch was
the only one in use; the shadow reload passes a callback ref, so the
comment now says why those are left alone.
* refactor(studio): name the left-page flag instead of explaining it in comments
* style(studio): format the shadow reattach guard
* 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
The media panel's Volume slider wrote a keyframe at the playhead, so a clip with a fade (or none) changed only around where the playhead sat. Volume now sets the clip's gain, the whole fade moves with it, and the keyframe toggle still adds automation on purpose. The separate Gain slider is folded into it, and the Audio Gain dialog no longer refuses clips that have a volume lane.
* 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>
* 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>
* 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
* fix(studio): run the composition hover preview in an opaque origin
The Compositions panel hover preview framed the composition with
allow-scripts and allow-same-origin, so the composition's scripts ran in
the Studio's own origin. The frame now gets only allow-scripts. The card
no longer reads the frame: it plays the preview muted when the runtime
posts "ready", and sizes the stage from the runtime's "timeline" message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): name the hover preview's sandbox and bridge steps instead of commenting them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* 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>
* feat(studio): type an exact preview zoom and see a pixel grid at high zoom
Clicking the preview's zoom readout opens an input: Enter applies the typed
percentage (clamped to the zoom limits, keeping the view's centre), Esc or
blur cancels. Above 800% a one-pixel grid is drawn over the stage, one cell
per composition pixel. It lives in Studio's DOM, so renders and snapshots
never include it.
The max preview zoom goes from 400% to 1600% so the 800% grid is reachable.
Closes#5587
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(studio): move preview zoom reasoning from comments to the PR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(studio): show live canvas gesture measurements
Candidate source; required readout regressions pass. Browser captures and full Studio validation remain in progress.
* test(studio): explain the React test flag typing boundary
* fix(studio): derive gesture readout from pointer drafts
* feat(studio): show the agent's storyboard in a Storyboard tab beside the preview
The board an agent writes per the storyboard recipe (boards/storyboard.html,
or a root storyboard.html) now shows in Studio the way HyperFrames Desktop
shows it: a Preview | Storyboard strip over the preview panel, only while the
project has a board. Studio reads the page's class="frame" boxes into a board
of stills, with acts, titles, times and words, and one frame at a time with
arrow keys. A page with no frames shows as written in a script-less iframe.
A board written while Studio is open brings its tab to the front, as Desktop
does at the agent's stop. A rewrite of the page, a still beside it or
STORYBOARD.md reloads it in place, and a dot marks a rewrite seen from the
preview. "Show in preview" goes back to the film at the frame's start.
Notes, drawings and the go belong to Desktop's agent, so the board's bar
carries the desktop-app button. Its funnel events now say which button was
pressed (placement: header or storyboard).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* refactor(studio): split the storyboard view and its frame reader into smaller parts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* docs(skills): the agent's storyboard stop points at the Storyboard tab, not the file
With the board shown beside the preview in Studio as in Desktop, the recipe's
stop and style-sampling's stop 1 tell the person to look in the Storyboard
tab, and to start a preview and give its link when none is running, instead
of handing over boards/storyboard.html to open from disk.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* fix(studio): the storyboard listens on Studio's own file-change channel, and its notes are trimmed
The board opened its own /api/events stream, which the Vite dev server
behind the runtime smoke does not serve. It now subscribes through
subscribeFileChanges, the one channel picker the external-change
coordinator already uses (test adapter, Vite HMR, then SSE), so dev and
built Studio deliver the same changes to both.
The new files' comments are cut to the package's share, and the recipe's
Storyboard-tab line moves to the paragraph that names the board, leaving
the stop step as it was.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* fix(studio): the board hears file changes through the coordinator, not a second subscription
The external-change coordinator stays the one subscriber to the file-change
transport (HMR in dev, SSE when built), as externalFileChangeOwnership
asserts. It announces each decoded change through fileChangeFanout, and the
storyboard listens there. Mounting EditorShell alone, as its tests do, no
longer opens an EventSource, and the coordinator file stays under the line cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* feat(studio): the storyboard's Open in desktop app asks the app to open on the board, and its card says why
- The storyboard bar's button posts `doc: "storyboard"` with its page id. The preview server passes only that value
on, and `openInDesktop` writes it into `.hyperframes/desktop-cta.json` beside the page id, so the app can open the
project on its Storyboard tab with Build in sight (hyperframes-internal reads it).
- The guide card opened from the storyboard says "Approve this storyboard in the desktop app" and "Comment on a frame,
draw on it, then press Build", and its last step says the app opens on this storyboard. The header's card is
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* feat(studio): approve the storyboard in Studio; comments on frames stay in the desktop app
A Studio user without the desktop app had no way to approve the board from the tab, and the bar said approval was
in the desktop app, so the tab read as a dead end. Studio talks to the person's own agent through their chat, so the
bar's Approve copies "The storyboard is approved. Build the video from it." for them to paste to it, and says so in
a toast (or spells the words out when the clipboard refuses). Commenting and drawing on frames stay in the desktop
app. The storyboard recipe tells the agent those pasted words are the person's go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* fix(studio): the storyboard's desktop card offers commenting, since approving now happens in Studio
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* fix(studio): hand-off intent before dispatch, steady film under the board, stills outside the board folder
- openInDesktop writes desktop-cta.json before sending the folder, so a running
app reads the storyboard ask on arrival; a plain or header open drops an
earlier storyboard ask; a failed open puts the earlier record back.
- PreviewStage keeps the film at one place in the tree with or without a board,
so a board appearing never remounts it; the automatic switch goes through the
same pause as a click, and a play while the board is up is paused.
- The board reloads when a still it draws changes, including a root board's
stills/ and a boards/ page's ../assets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* chore(cli): fit the Storyboard tab in the CLI's size budget; reword a record helper's doc
The CLI tarball carries Studio's build, which now holds the Storyboard tab; merged
with main it measures 7,982,002 bytes packed, 7 bytes past the 1% tolerance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
* fix(studio): hold the player while the storyboard covers the film
A pause after the fact let J's reverse loop schedule its next frame, so the
hidden film kept seeking. The stage now takes the player's own hold while the
board is up (and only when no one else holds it), so J, Space and playback
requests are refused before they start; Preview releases it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(core): auto motion blur draws with the filter tier
Capture stays available as data-motion-blur-tier="capture". auto now draws with the
filter tier (reasonCode tier-auto), so the capture-only defects leave the default path.
Removes the translation-only hand-off and its Discovery field, adds a filter arm to the
differential, and updates the check, guide, skill and Blur panel label.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(core): measured cost and known limits of the filter tier, the new auto default
spacex-launch (77 movers) takes 2.9x the CPU of no blur on the filter tier and 1.7x on
capture; say so, and list the filter tier's measured limits (sweep D, E, F, I, O, B).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(core): word the filter tier's cost and limits as measured, not as mechanism
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(core): do not say every filter-tier limit is pinned by a sweep test
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* test(engine): split the blur differential so each file fits the flake gate's 120 s run
The filter arm moves to its own file and skips fixtures that already draw with the filter
tier; inside cases get their own file; a fixture's blur-off page is opened once per file.
Shared helpers live in __fixtures__/motionBlur/differentialPage.ts.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* feat(studio): alt marquee removes the covered items from the selection
Shift already adds marquee hits to the selection on the canvas and the
timeline; there was no way to take a few items back out of a large
selection. Both marquee paths now carry a MarqueeSelectionMode
(replace | add | subtract) resolved from the pointer modifiers in one
helper, with Alt winning over Shift. Subtracting the primary re-anchors
on a surviving member; subtracting everything clears the selection. The
band and candidate outlines turn the danger colour while subtracting.
Closes#5586
* fix(studio): same alt marquee rules on the canvas and the timeline
Both surfaces now let the modifiers held at release decide: the timeline
re-applies the marquee from the pointerup event before it finishes, so
letting go of Alt mid-drag turns a subtract back into a replace, as the
canvas already did. Alt at pointerdown no longer bakes a timeline base
mode; Cmd/Ctrl still sets add. While subtracting, the canvas outlines
only candidates that are in the current selection, so the band never
suggests removing something that is not selected. The timeline commit
helpers move to timelineMarqueeCommit.ts to keep the hook under the
file-size cap.
* feat(core): data-motion-blur-phase sets when the shutter opens
Page motion blur always centres the shutter on the frame. Add a phase in degrees of a
frame, -360 to 360: the window starts at t + phase / 360 / fps and lasts shutter / 360 /
fps. Unset stays centred, so a page without the attribute renders the same bytes.
Both tiers take the window from one place, shutterTimes in frames.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(core): the motion blur report carries the shutter phase
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* chore(core): drop the phaseDeg doc comment, the comment-share ratchet may only fall
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): a film that cuts one file into many clips plays smoothly while their durations load
* test(studio): the metadata test counts one store write per file
* fix(core): motion blur notices a WebGL canvas the Studio page touched first
When a same-origin host page (Studio) reaches a preview element before the
scene does, for example through a MutationObserver record, Chrome gives that
element the host's prototype. The scene's getContext("webgl") then ran the
host's unpatched getContext, so the canvas never reached the accelerated
canvas set, capture motion blur stayed on, and the WebGL canvas froze during
preview playback.
The tracker now records a canvas in the set of the canvas's own window, and
installs itself in a same-origin parent too, compiled with the parent's own
Function. Cross-origin parents are skipped.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(studio): track accelerated canvases in Studio's window, not the embedder's
The preview runtime no longer installs the canvas tracker in its parent
window. That ran on every preview boot, so any same-origin page embedding
the player got its getContext wrapped, and a host CSP without
unsafe-eval reported a violation on each load. Studio now installs the
tracker in its own window when its Player module loads, and core
exposes it at @hyperframes/core/page-motion-blur.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore: keep the comment share of the touched files from rising
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A restore that removes the GSAP script cannot be patched in place, so the preview reloads - and until it lands it keeps the transform the timeline composed, though the file it is going back to places the box with CSS alone. Only the elements the restored script stops animating are repainted; anything it still animates keeps what the timeline gave it.