Commit Graph
2766 Commits
Author SHA1 Message Date
Miguel Angel Simon Sierra 0ff6bfa053 feat(studio): translate an authored track into the lane it draws on
An agent only ever knows data-track-index. Studio packs those onto
contiguous display lanes, so on any composition with gaps the number the
agent writes is not the row the user sees: authored 0, 4, 9 draws on
lanes 0, 1, 2.

This is the inverse of authoredTrackForLane and sits beside it so the two
stay readable against each other, with a round-trip test holding them to
agreeing. It is scoped by source file for the same reason the forward
direction is: an expanded sub-composition's rows carry authored numbers
from their own file, and matching one would draw on a row belonging to a
different composition.

A track with no clips yet reports provisional rather than snapping to the
nearest lane. An agent adding a whole new track is the most interesting
thing it can say, and it has to be drawable before the clips that would
give it a lane exist. The result is a discriminated shape, not a number
with a sentinel, because lane 0 is a real answer.
2026-08-06 07:55:42 -07:00
Miguel Angel Simon Sierra b94441697c feat(studio): let an agent say where it is about to add clips
The timeline can show what exists and what is being edited, but not what
is about to exist: an agent spending a minute writing three clips leaves
it silent until the file lands. An agent can now declare that, inline in
its prose, the same way it already declares an overlay state.

It gets its own marker rather than riding hf:overlay, which is one state
about one existing element and is last-declaration-wins. Sharing it would
mean an agent narrating "thinking" wipes the skeletons it declared a
sentence earlier.

Tracks are data-track-index values, the numbers the agent itself writes.
Studio packs lanes contiguously for display, so the two disagree the
moment a composition has gaps, and the agent has never seen a lane.

Entries are read one at a time, so one bad entry costs its own skeleton
rather than every sibling's, and an empty list is how an agent says it is
no longer adding. A declaration Studio cannot read leaves the previous
one standing.

Both declarations now share one reader and one stripper, so the two
cannot drift and neither can leak into the run's activity line.
2026-08-06 07:52:53 -07:00
Miguel Angel Simon Sierra 3c4ff64e45 feat(studio): stop and correct a run over ACP
Cancelling asks the agent to stop with session/cancel before its process
is taken away, so it can put its tools down rather than have them removed
mid-write; the kill still follows on a short leash for an agent that does
not take the hint.

Correcting is where the two transports genuinely differ. Claude Code
reads a correction into the turn it is already having. ACP has no way to
speak into an open turn, so a correction cancels this one and prompts
again on the same session: one job, one session id, everything the agent
has read still in hand — but it does start the turn over, and the run
says exactly that rather than implying the correction was slipped in.

Steering an ACP run also used to build the harness' native resume flags
for a command that is not the harness, so that path is closed.

Studio's own verdict on a run now outlives the agent acknowledging it: a
run failed for an unanswered question was being relabelled cancelled by
the stop reason its own cancel produced.

Verified against @agentclientprotocol/codex-acp: a live run told to make
the text BLUE instead of RED came back as one run, one session, the steer
recorded, and BLUE on disk.
2026-08-05 23:08:00 -07:00
Miguel Angel Simon Sierra 9752d1dc68 feat(studio): offer ACP harnesses in the picker
Codex and Claude Code both publish ACP adapters, so both appear as their
own entries alongside their native CLIs — same accounts, same models,
same machine, reached over a published contract instead of by reading
stdout. A registered custom agent can declare the transport too, which is
what lets anything in the ACP registry be added without a release here.

Availability cannot be a PATH lookup for an adapter that npx fetches on
demand: finding npx proves nothing and not finding the adapter proves
nothing either. A declared ACP agent is offered, and one that cannot run
says why when it is used, which beats an option silently missing.

That also broke naming a custom agent: every adapter launches through
npx, so sniffing the command for a known harness matched the first ACP
preset and called every npx-run agent Codex. Only presets whose command
IS the harness are sniffed for now.

Verified in a running Studio against @agentclientprotocol/codex-acp: both
entries listed, the model chip filled with the account's real models and
their protocol-reported levels priced cheapest-first, and a run picked
from the picker edited the composition.
2026-08-05 22:56:12 -07:00
Miguel Angel Simon Sierra c932aacf8a feat(studio): read an ACP agent's models over the protocol
An ACP agent reports its models when a session opens, which is the only
answer that reflects the user's own account — the same reason Studio asks
Codex over its app-server rather than filtering a catalog. The existing
rules are unchanged from there: models.dev supplies prices, the harness
owns what each model accepts, and cheapest still wins by default.

ACP has no separate effort knob. The Codex adapter writes the level into
the id (gpt-5.6-sol[high]), so those are folded into one model that
offers levels instead of six models that differ by one word, and the
chosen level is written back the same way via session/set_model. An agent
with plain ids simply has no levels, which is already how Claude Code is
treated.

Asking now needs the whole harness rather than its kind: two ACP adapters
are both "custom" and are two different answers, so the model list, the
default model and the default effort all take how the agent is started.

Verified against @agentclientprotocol/codex-acp: four models with their
real level lists, the account's own default marked, set_model accepted.
2026-08-05 22:46:40 -07:00
Miguel Angel Simon Sierra 18b3caa9dc feat(studio): answer the agent's question from the run tray
A run stopped on a question now shows what it is being asked and the
agent's own options, one button each; clicking one sends that option's id
and the run carries on. The element says so too, in amber and still,
where every working state moves: a run that has stopped must not look
like one getting on with it. Being waited on leads the tray's headline
and outranks working in the canvas badge, because it is the only state
the reader can do something about.

Three files had to come apart first, all of them over the editor's
600-line cap and so uncommittable as they stood:

- the canvas connector moves out of InlineAgentComposer into its own
  file, and the composer's geometry joins the layout module that already
  owned the rest of it (813 -> 551)
- the queue's mutations move out of useAskAgentModal into useAgentQueue,
  which is where answering belongs (653 -> 598)
- useDomEditSession listed all 34 agent fields twice, once to
  destructure and once to return; it spreads them instead (604 -> 540)

Polling also treated a parked run as idle, so an answer took up to eight
seconds to look like it had landed.
2026-08-05 22:39:55 -07:00
Miguel Angel Simon Sierra 233338ddd4 feat(studio): let a run stop and ask before it acts
Over ACP an agent can ask permission before it writes or runs something.
A run that asks parks as `awaiting-permission` carrying the agent's own
question and its own options, keeps holding its element, and resumes the
moment the answer is forwarded. Studio only ever forwards an option the
agent itself offered; anything else is refused with a 409.

The wait is bounded, because a run that has stopped to ask is holding an
element while it does. Running out never means yes: the agent's own
refusal is used when it offered one, and the run fails naming the tool
when it did not.

Real agents ask about a tool call by id and put the title in the update
that announced it, so titles are remembered and the question is shown in
the agent's words rather than as "exec-282be8b3".

Both transports now share one cleanup path instead of two copies.

Verified against @agentclientprotocol/codex-acp in read-only mode: the
agent asked, the question parsed with its refusal option, answering
"Allow Once" ended the turn and the file was edited.
2026-08-05 22:23:26 -07:00
Miguel Angel Simon Sierra afb182059b feat(studio): run an edit as an ACP session
A preset that declares `transport: "acp"` is driven by the protocol
instead of by parsing stdout: the session id comes from `session/new`,
the activity line and the answer come from `session/update`, and the turn
ends with a stop reason rather than an exit code that has to be guessed
at. Everything downstream is unchanged — the same overlay contract, the
same activity shape, the same run log — because it is the same product
behaviour over a different wire. The native path is untouched.

An agent that fails answers with something as terse as "Internal error"
and explains itself on stderr, so stderr is kept and the last line of it
is what the run reports.

Verified against @agentclientprotocol/codex-acp: a real edit ran with
live activity, changed the file, and logged a well-formed line.
2026-08-05 21:48:48 -07:00
Miguel Angel Simon Sierra 94e78e806e feat(studio): talk to coding agents over the Agent Client Protocol
Studio's existing transport spawns a CLI and reads whatever it prints, so
every harness needs its own parser and an agent that wants to ask a
question has nobody to ask. ACP is the published standard for this
boundary: JSON-RPC over stdio, capabilities negotiated up front.

This is the connection half only: open a stream, complete the handshake,
clean the process up. A dead agent reports its exit code rather than the
transport's bare "connection closed", and a silent one fails on a
deadline naming the command instead of hanging.

Verified against @agentclientprotocol/codex-acp: the handshake returns
protocolVersion 1, loadSession, and three auth methods.
2026-08-05 21:36:24 -07:00
Miguel Angel Simon Sierra e8dbbebc1c fix(studio): use Codex's own app icon
The OpenAI wordmark stood in for Codex; this is the icon Codex actually ships,
white plate and gradient mark, so it reads the same in the picker as it does in
the dock.
2026-08-04 16:49:11 -07:00
Miguel Angel Simon Sierra 00ba1382c4 fix(studio): lay the composer and the answer out together
Both belong to the same element, so placed independently they landed on top of
each other. One pass now places both: the composer takes the side it prefers,
the answer takes the other, and where only one side has room the answer stacks
beyond the composer rather than across it. The bubble's tail keeps tracking the
element either way.
2026-08-04 16:38:49 -07:00
Miguel Angel Simon Sierra 688f886156 feat(studio): speak the agent's answer next to the element it is about
Not every instruction is an edit. "Why is this off-centre?" comes back as an
answer, and an answer that only lands in a run list is an answer nobody reads.
A finished run with something to say now surfaces as a bubble on the canvas,
its tail tracking the element's centre so a bubble pushed along by the canvas
edge still points back at what it answered. It can be expanded, dismissed for
good, or carried straight into a follow-up.

Also makes the element name in a run row read as the control it is — a target
glyph, a resting fill and a pointer — instead of looking like the caption
beside it.
2026-08-04 16:33:22 -07:00
Miguel Angel Simon Sierra 051886705f fix(studio): call it Hermes Agent, the name Nous Research ships it under 2026-08-04 16:26:15 -07:00
Miguel Angel Simon Sierra 04c4f6d380 feat(studio): choose reasoning effort beside the model, lowest by default
Effort levels come from the same catalog the models do — a model advertises
what it accepts, and Studio offers exactly that. Anthropic reasons on a token
budget rather than a level, so a Claude Code run carries no effort at all
instead of a knob that does nothing.

The chip sits to the right of the model, because it is the same decision: how
much thinking to buy. A run takes the lowest level the model offers unless the
user picks otherwise, the choice is remembered per harness, and each run in the
tray shows the effort it actually used.

Also drops the OS tooltips from the harness and model chips — they covered the
element they described — and portals the composer and ask handle out of the
canvas overlay. That overlay is a z-10 stacking context whose sibling motion
path sits at z-40, so nothing inside it could ever come out on top, however
high its own z-index was; the keyframe diamonds kept drawing through the pill.
2026-08-04 16:17:37 -07:00
Miguel Angel Simon Sierra efcf3942f7 refactor(studio): one JSON store behind every persisted setting
Three modules were each re-implementing the same four concerns — reaching a
Storage that can throw, parsing JSON that may be anything, deciding what a bad
value means, and writing without letting a quota error escape — with their own
try/catch and their own answer to each. createJsonStore owns the first, second
and fourth; a caller supplies only its key, its fallback, and how to read its
own shape.

UI preferences, agent drafts and render settings now sit on it. Validation
stays with each caller, since only it knows which fields are meaningful.
2026-08-04 15:57:28 -07:00
Miguel Angel Simon Sierra 6233723a43 fix(studio): keep a half-typed instruction across a reload
The agent edits files, the watcher reloads the preview, and the reload took the
composer's React state with it — an instruction being written while an earlier
run landed disappeared mid-sentence. Drafts are now stored per element, so a
reload (or a trip to another element and back) returns the words, and
submitting clears them.
2026-08-04 15:52:07 -07:00
Miguel Angel Simon Sierra 234c6cd482 fix(studio): keep the agent controls above the motion path
The composer and the ask handle sat at z-20 inside the canvas overlay, but the
overlay's own decorations climb to z-40 — so the motion path and its keyframe
diamonds drew straight through the pill. Both now sit above them, through one
named constant rather than a number picked per component.
2026-08-04 15:48:23 -07:00
Miguel Angel Simon Sierra 21f960cffa refactor(studio): one floating chrome for everything drawn over the canvas
The composer, run tray, both context menus and the ask handle each carried
their own copy of the same surface (layered shadow, hairline ring, blur) and
row treatment, which is how the menus and the tray drifted apart in the first
place. They now share components/ui/floatingSurface.

Also reworks the ask affordance: a mark at rest that widens into "Ask ⌘K" on
hover, in CSS, instead of the native OS tooltip that covered the element it
pointed at.

Selection chrome on a 3D-transformed element: rect + angle cannot describe a
keystoned projection, so the overlay drew a rotated box beside the element and
the crop frame landed somewhere else entirely. A projection that is not a
rotated rectangle now reports its axis-aligned bounds and says so, and crop —
which only exists in the element's own plane — stands down.
2026-08-04 15:41:02 -07:00
Miguel Angel Simon Sierra 4380c7067f fix(studio): offer the agent on the selection instead of opening on it
Auto-opening the composer on every selection put a panel on the canvas whether
or not the user wanted to ask for anything. The entry point is now a small
harness mark pinned to the selection: it sits where the eye already is, opens
the composer on click, and names the ⌘K shortcut in its tooltip — discoverable
without taking the canvas.

Also gives the run tray an inline z-index. It carried a utility class that lost
to the timeline ruler and the panels, so the ruler drew straight through the
tray's rows.
2026-08-04 15:28:02 -07:00
Miguel Angel Simon Sierra 87ad9804f8 feat(studio): composer follows the selection, and speaks for a whole one
Selecting an element now opens the composer on it — the selection was already
the ask, and waiting for a second gesture on the thing just clicked was a step
for nothing. A multi-selection carries through: the prompt names every
co-selected element and widens its guardrail to "change every one of them", and
the field says how many it is talking about.

The harness and model lists are capped and scroll on their own instead of
growing the composer, and they declare they own their wheel so the canvas
underneath stays put.

Adds usage telemetry for the whole surface — composer opened, run submitted,
harness and model chosen, custom harness added — carrying the harness, model
and element count, never the instruction text.
2026-08-04 15:19:15 -07:00
Miguel Angel Simon Sierra c1697c9b50 feat(studio): model beside the harness, and bring your own harness
The model was buried at the bottom of the harness menu, where it read as a
detail of the harness rather than the other half of "who will do this". It is
now its own chip to the right of the harness, with its own list.

Harnesses are no longer limited to the four Studio ships presets for: the
picker can register one, with the same fields a preset carries — command, args
before the stdin prompt, its own mark, and the flag it takes a model on. They
live in <project>/.hyperframes/agents.json, so the choice travels with the work
instead of being an environment variable one machine knows about.

Harness selection is by id now rather than kind, since two custom harnesses can
share the "custom" kind.
2026-08-04 15:07:13 -07:00
Miguel Angel Simon Sierra 3aa6976275 refactor(studio-server): declare JSON boundaries as schemas, not hand guards
The selection route validated its payload with ~75 lines of isRecord /
hasString / isFiniteNumber helpers sitting next to a hand-written interface
describing the same shape — two definitions that could drift, and the pattern
the agent routes were copied from. Both are now one zod schema with the public
types inferred from it, so the validator and the type cannot disagree. The
Google Fonts metadata parse follows.

Net -115 lines, same behaviour: the existing selection route tests pass
unchanged.
2026-08-04 14:51:47 -07:00
Miguel Angel Simon Sierra 6da40a2a14 feat(studio): pick the model per run, defaulting to the cheapest that can run
Models come from the models.dev catalog — the same community index other agent
tools read — filtered to the provider each harness authenticates against and to
models that can actually call tools. Nothing about a model is hardcoded here: a
model released next week shows up without a change to Studio, and the catalog's
own pricing decides the default, which is the cheapest model that can drive a
run rather than whatever the harness would reach for.

The composer's picker gained a model list (cheapest first, with input price),
the choice is remembered per harness in the studio preferences, and each run in
the tray shows the model it actually used.

Payloads that cross a boundary — request bodies, the run log, the catalog — are
now zod schemas with inferred types instead of hand-written `unknown` readers
and casts.
2026-08-04 14:46:12 -07:00
Miguel Angel Simon Sierra fe242efa4e feat(studio): name the harness everywhere, ⌘K to ask, tray out of the canvas
Every agent affordance now names the harness that will actually run — the
context menus, the inspector footer and the empty state read one effective
value, so a picked Codex can never sit behind a menu still offering Claude
Code. ⌘K opens the composer on the current selection.

The marks are the vendors' own: OpenClaw's pixel lobster and the Nous Research
portrait Hermes ships, alongside Claude's and OpenAI's.

The run tray moved off the canvas — it floats over the shell, drags anywhere,
and remembers where it was parked. Harness pick, tray position and collapsed
state all live in the studio preferences file rather than being re-chosen every
session.

Context menu rows were rebuilt as inset items so a hover fill covers the whole
row instead of leaving gutters at the edges.
2026-08-04 14:25:59 -07:00
Miguel Angel Simon Sierra ca3198d8b9 fix(studio): read a run's state from its own row, not a status dot
The dot repeated what the row already said. A run in flight now carries a
progress rail instead — sweeping while the agent works, still while it waits —
and a waiting run says where it sits ("Next up", "#3 in line") rather than
just "Queued".

History written before runs recorded their harness fell back to the neutral
mark; the harness is now recovered from the logged label, so past Claude Code
runs stop rendering as an anonymous spark.
2026-08-04 14:03:20 -07:00
Miguel Angel Simon Sierra ebb38675e9 feat(studio): pick the harness per run, reveal the element it edited
The composer header is now a picker: every harness Studio knows is listed with
whether it is installed, so a queue can mix Claude Code, Codex, Hermes and
OpenClaw instead of taking whatever was auto-detected. Each carries its own
vendor mark, and the tray stacks one mark per harness in play (only when more
than one is).

Each run also carries its session id and the coordinates of the element it
edited: clicking the element name seeks back to that moment and re-selects it.

Fixes a wheel over the run list panning the canvas underneath instead of
scrolling the list — floating overlays now declare that they own their own
scrolling, which the preview checks before it pans or zooms.
2026-08-04 13:58:11 -07:00
Miguel Angel Simon Sierra 88a8ef5924 feat(studio): editable agent queue and a durable run log
The queue was a promise chain, so a waiting run could only be watched. It is
now an explicit list: queued runs can be moved sooner or later, dropped before
they start, and a run already going can be stopped (the tray reveals those
controls on hover).

Every settled run is appended to <project>/.hyperframes/agent-runs.jsonl —
when it ran, which element, the instruction, how long it took and what the
agent reported back. Studio reads that log when a project is first listed, so
the history survives a server restart instead of living only in memory.
2026-08-04 13:37:27 -07:00
Miguel Angel Simon Sierra 28484de469 fix(studio): name the harness in the composer header
The header repeated the selected element, which the field's own placeholder
already says. It now names the agent that will run the instruction (Claude
Code, Codex, …), falling back to the element when no harness is installed.
2026-08-04 13:14:42 -07:00
Miguel Angel Simon Sierra 2fd04398de feat(studio): queue agent runs server-side with a live run tray
Runs become server-owned jobs instead of one blocking request. Submitting
clears the field immediately, so several instructions can be fired at
different elements in a row; per project they execute one at a time, since two
agents rewriting the same composition would clobber each other.

A tray on the canvas lists every run with what the agent is doing right now
(Claude Code runs in stream-json so each tool call surfaces as it happens),
its target, elapsed time and final message. The list is read from the server,
so a page reload lands back on the work still in flight.

Adds Hermes and OpenClaw presets alongside Claude Code and Codex, each with
its own mark, and HYPERFRAMES_AGENT_ICON to point any other harness at a real
icon file.
2026-08-04 13:11:18 -07:00
Miguel Angel Simon Sierra 2db190780c feat(studio): draggable agent composer with the running harness mark
The composer can cover the element it edits, so its header is now a drag
handle. The header also shows which harness is running: the server reports a
kind alongside the label (claude / codex, sniffed from a custom
HYPERFRAMES_AGENT_CMD and defaulting to claude when inconclusive) so the mark
is never blank.
2026-08-04 12:25:29 -07:00
Miguel Angel Simon Sierra 6d48919c12 feat(studio): inline the agent composer on the canvas
Replace the full-screen Ask agent modal with a composer anchored to the
selected element: no backdrop, the composition stays visible while the agent
edits it, and the box stays open between runs so the next instruction is one
keystroke away. Status (working / finished / failed) reports in the composer
itself instead of a toast, and the canvas right-click menu gets the same
entry as the timeline clip menu.

Drops the never-set anchor-point plumbing and the modal's context-preview
builder along with the modal.
2026-08-04 12:19:57 -07:00
Miguel Angel Simon Sierra 0f62ba2950 feat(studio): run the user's agent CLI from Studio
The Ask agent modal could only copy a prompt to the clipboard. Studio now
hands that same prompt to whichever harness CLI is installed (claude, codex,
or HYPERFRAMES_AGENT_CMD), runs it in the project dir, and lets the existing
file watcher reload the preview. Timeline clips get the same entry point via
their context menu, resolved back to the live DOM element so the prompt
carries full element context.
2026-08-04 11:42:24 -07:00
Vance Ingalls f9ec93459f Merge pull request #2945 from heygen-com/ffprobe-6-argv-sweep
fix(cli,core,lint,producer,studio-server): terminate ffprobe options everywhere, pin the contract
2026-08-04 10:43:14 -07:00
Vance IngallsandClaude Opus 5 1664fe6ad7 fix(core,producer,skills): unicode paths, non-Error rejections, shell callers
Three R3 findings.

The redactor's segment classes were ASCII `\w`, so `/数据/客户/秘密视频.mp4` and
`/data/客户/secret.mp4` went out verbatim — and the generic redactor also feeds
CLI telemetry and producer observation messages, where no known-path list
compensates. Segments are now defined by their delimiters instead of an
alphabet, which is correct for every script by construction rather than
requiring Unicode classes to be kept correct. The bare-relative lookbehind had
the same ASCII assumption and let a match start mid-token, redacting
`客户/秘密/视频.mp4` to `客户[path]`; it is now a token boundary, and
bare-relative runs before absolute so it claims the whole token.

sanitizeProbeFailure cast the rejection reason to Error and read `.message`.
An injected probe can reject with anything, so `Promise.reject("failed")` gave
`undefined` and threw inside the redactor — converting a returned failure
result into a rejected promise. Normalized at the boundary, and
redactKnownPaths no longer throws on a non-string.

The contract only admitted .ts/.js/.mjs/.cjs, so it missed shipped shell and
Python callers. frame_strip.sh passed a user-controlled path as ffprobe's last
positional with no terminator; render-and-composite.sh had four more. Both
fixed, and the sweep now covers .py/.sh. Python list argvs are bracket
literals so they get the same position check; shell command lines get a
separate presence check, because checking position there needs a shell parser
— stated as the weaker guarantee it is rather than implied to be equal.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 03:18:21 -07:00
Vance IngallsandClaude Opus 5 6c5403f7cd fix(producer): drop the ReDoS-prone literal-argv regex for a linear scan
CodeQL flagged js/redos on the all-literal argv matcher. It was right: the
`(?:"[^"]*"\s*,?\s*)+` form nests a quantifier inside a quantifier with an
optional separator, so whitespace can be matched two ways and a long
non-matching argv backtracks exponentially.

Replaced with a linear scan — find the spawn head, slice to the closing
bracket, and check the entries — plus small named helpers. Same behaviour: an
all-literal argv is treated as taking no input, an argv with a bare identifier
still has to be understood (verified by adding one and watching the guard fail).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:41:39 -07:00
Vance IngallsandClaude Opus 5 c81f68b592 test(producer): treat an all-literal probe argv as taking no input
CI runs the PR merged with main, so it saw a caller my branch predated:
`spawnSync("ffprobe", ["-version"])` in engine/src/utils/ffprobe.test.ts. That
is a capability check with no runtime path, so there is nothing to terminate,
but the unclassified guard flagged it as a caller it could not parse.

An argv whose entries are all string literals carries no input by
construction. Those are dropped before the check; an argv with a bare
identifier still has to be understood, verified by adding one and watching the
guard fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:29:19 -07:00
Vance IngallsandClaude Opus 5 255cf92915 fix(skills,producer): terminate ffprobe options in shipped skill scripts
The contract test only walked packages/*/src and only .ts, so it could not see
the shipped agent tools under skills/**, which are .mjs/.cjs. 19 call sites
there and in package tests were still missing `--` immediately before the
input while the suite reported the bug class closed — a dash-prefixed filename
is parsed as an option and fails the same way.

Sweeps packages/, skills/ and scripts/ now, including .mjs/.cjs and test
files (dither.test.mjs was one of the broken sites). Excludes only the
contract test itself, which documents the contract with example argvs
including a deliberately misordered one.

Two guards were fixed while widening: the terminator must never be inserted
after `-i`, which consumes the next token (a blind pass hit an ffmpeg input
and a base64 -i), and comment prose describing a spawn is not a spawn.

Also routes every audioPadTrim probe failure through one sanitizer at the
boundary. runFfprobeJson scrubbed its own stderr, but
defaultProbeVideoFrameInfo threw `no video stream in ${videoPath}` raw into
the public PadTrimAudioResult.error, and an injected probe can throw anything.
The redaction unit tests all passed with the caller wiring deleted; the new
public-path regressions fail without it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:23:35 -07:00
Vance IngallsandClaude Opus 5 e79ab3ab31 fix(core,producer): redact bare relative paths and the known input path
The generic scrub still missed a relative path with no `./` prefix:
`customer/acme-secret/video.mp4` and `assets/bgm.mp3` reached telemetry
completely unredacted, because the absolute rule needs a leading slash and
the `./` rule needs the dot. Adds a rule for them that still leaves `N/A`,
`24/1` and `48000/1001` alone.

Shape matching is a net with holes by construction, so audioPadTrim now
also redacts the exact path it put in the argv, plus its basename, before
the generic scrub runs. It built the argv, so it does not have to guess.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:23:35 -07:00
Vance IngallsandClaude Opus 5 d04569e37f fix(core): redact any path in telemetry, not an allowlist of roots
redactTelemetryString enumerated roots — /Users, /home, /opt, /tmp and a
handful more — so a project on /data, /Volumes, an NFS mount or any root a
user invented reached telemetry verbatim. Relative paths and bare basenames
were never redacted at all, and audioPadTrim routes raw ffprobe stderr
through this on every probe failure.

Now redacts by shape: absolute paths under any root (two or more segments,
so N/A and a 24/1 frame rate are not mistaken for one), relative paths
including dash-prefixed ones, and bare basenames with an asset extension.
URLs still keep their host and drop only the query.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:23:35 -07:00
Vance IngallsandClaude Opus 5 91a7cb1f5b test(producer): discover ffprobe callers and pin terminator position
The prior contract test scanned a hardcoded file list for a format flag
followed by a bare identifier, so it only matched the shape it was written
against. Mutation testing showed removing `--` from engine/utils/ffprobe.ts
and cli/commands/init.ts did not fail it.

Now walks packages/*/src and finds callers itself, checks that `--` is
immediately BEFORE the input rather than merely present, and compares
discovery against a manifest so a regex regression cannot silently stop
checking a known caller. A separate guard fails on any file that spawns a
probe binary but builds an argv this test cannot parse.

All 11 seams mutation-tested for both removal and misordering.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:23:34 -07:00
Vance IngallsandClaude Opus 5 d0dbf11ef5 fix(producer,studio-server): finish the ffprobe argv sweep, pin the contract
The previous commit claimed "all nine now terminate their options". That
was false: `producer/src/utils/audioRegression.ts:307` still passed the
path bare, and it is production source used by the regression harness.
A repo-wide audit found two more in studio-server
(`mediaValidation.ts`, `mediaMetadata.ts`) — their current callers pass
absolute paths, so they were defence-in-depth rather than live bugs, but
the exhaustiveness claim should be true rather than narrowed.

Eleven sites total, all terminated.

Adds a SOURCE-level contract test, which is the gap that let this
happen twice. #2740 fixed one of ten sites and shipped a regression
asserting the argv of that single site, so CI reported the class closed
while nine invocations still parsed `-intro.mp4` as an option. A
per-site unit test has the same blind spot for site twelve; scanning the
tree does not. The test also asserts its own coverage list has not
shrunk.

Verification: engine 1300, lint 511, core 1431, studio-server 398, cli
init/webmAlphaCheck/whisper 146, producer utils 51, audioPadTrim 18.
Removing any single terminator fails the contract test by name.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:23:34 -07:00
Vance IngallsandClaude Opus 5 47564ab94c fix(cli,core,lint,producer): terminate ffprobe options at every call site
#2740 added `--` to one of nine independent ffprobe invocations, so the
bug class it closed stayed open everywhere else while CI reported it
fixed — the regression test asserts the argv of that single site.

Reproduced on ffprobe 8.1.1: an asset named `-intro.mp4` probes fine
through extractMediaMetadata but fails with "Missing argument for option
'intro.mp4'" in audio pad/trim (mid-render), `hyperframes init`, whisper
duration probing and webmAlphaCheck. hevcPreviewLint catches and returns
false, so a dash-prefixed HEVC preview silently passes the lint rule.

Terminated at all of them:
  producer/services/render/audioPadTrim.ts (x2)
  producer/plan-parity-analysis.ts
  cli/commands/init.ts
  cli/utils/webmAlphaCheck.ts
  cli/whisper/transcribe.ts (x2)
  core/mediaGradeAnalyzer.ts
  lint/hevcPreviewLint.ts

audioPadTrim's runFfprobeJson is a near-verbatim clone of the engine's
runFfprobe and structurally cannot add the terminator itself, because
callers bake the input path into `args`. It now asserts the terminator
is present rather than letting a dash-prefixed path through, takes the
same stdio ["ignore", ...] as the engine helper, and redacts its stderr
— it was throwing raw ffprobe output, which echoes the input path, into
logs and telemetry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:23:34 -07:00
Vance Ingalls df8b9604fe chore: release v0.7.92 2026-08-04 01:49:05 -07:00
Miguel Ángel 0a70ba6717 fix(studio): scope timeline ease focus lifecycle (#2710) 2026-08-03 23:06:46 -07:00
Vance Ingalls 8c6cf90ff9 chore: release v0.7.91 2026-08-03 22:48:00 -07:00
Vance Ingalls 71fd96bbf1 Merge pull request #2854 from heygen-com/feat/canary-rollouts
feat(core): percentage-based canary rollouts + calibration experiment
2026-08-03 22:35:37 -07:00
Miguel Ángel 677fd31e9a perf(studio): stabilize virtualized beat gestures (#2709) 2026-08-03 21:35:40 -07:00
Miguel Ángel 423c5ffadb fix(studio): scope timeline context targets (#2708) 2026-08-03 21:19:49 -07:00
Miguel Ángel 4e7fcf7f2a fix(core): resolve sub-composition sibling asset paths everywhere (#2994)
Extends the studio-preview fix to the render path and the asset-discovery
utilities, which share the same resolver and had the same defect.

`rewriteAssetPath` takes an optional `assetExists` probe. A plain relative ref
authored in a sub-composition (`_shared.css`, `clip.mp4`) is re-pointed at the
composition's own directory when that sibling exists on disk; project-root refs
with no sibling (the registry's `assets/logo.png` convention) stay as authored.
Callers that can see the filesystem supply the probe, so the module stays free
of node:fs.

Also fixes a second defect in the inliner: `<head>` <link> hrefs and external
script srcs are hoisted into the root document but never went through the
rewrite at all, so even the documented `../` form escaped the project and 404'd
at render time.

Wired into the preview bundler, the producer compiler, the studio preview
builder, the HEVC preview lint, the project lint's asset scans, publish proxy
baking, and media-treatment source resolution.
2026-08-03 21:13:35 -07:00
Miguel Ángel 91d14744a0 perf(studio): virtualize timeline marquee selection (#2707) 2026-08-04 06:03:21 +02:00