Skip to content

Let a host start and observe a clip generation - #173

Merged
dazzatronus merged 4 commits into
mainfrom
derk/eng-868-generation-public-api
Sep 2, 2026
Merged

Let a host start and observe a clip generation#173
dazzatronus merged 4 commits into
mainfrom
derk/eng-868-generation-public-api

Conversation

@dazzatronus

Copy link
Copy Markdown
Contributor

Generation could only be started from the SDK's own toolbar, and only its own overlay could see
the result. An application embedding Studio with custom UI, a batch action or a test harness
could do neither. Clip capture — the same shape of per-clip async operation — was already public
on both counts.

generateClip(clipId) starts a generation for a prompt-bearing clip. The three
clip:generation* events move onto the public event map beside the capture events, so a host can
subscribe through edit.events.

No behaviour changes. The event strings are unchanged, the method body is untouched, and the
transient generation state stays out of the edit document as before.

One thing the docstring now states that a host needs: removing the clip, reloading the edit or
disposing it leaves the generation with no completed or failed event after its started. Anything
tracking progress from events alone has to handle that.

Verify: npm run verify:ci — lint, typecheck, coverage (2053 tests), build, package contract.
tests/generation-public-api.test.ts drives the SDK only through public API and fails all three
cases if generateClip is stubbed out.

@dazzatronus
dazzatronus merged commit 13c590a into main Sep 2, 2026
1 check passed
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant