Reference
Chasing Mastery public platform
TypeScript SDK
The small public helper layer that validates packages, engines, worker adapters, and portable UI messages.
The package SDK re-exports public contracts and adds validated author helpers. It deliberately does not expose persistence, member data, Station, OBS, filesystem, network, or provider authority.
Engine contracts
Prop
Type
Prop
Type
Prop
Type
Portable bridge
Prop
Type
Validated helpers
| Helper | Purpose |
|---|---|
definePackage | Parse the full manifest and every contribution. |
defineActivityEngine | Validate descriptions, contexts, inputs, and transitions on direct calls. |
defineCoordinationEngine | Validate rosters, signals, and match transitions. |
defineNarrationDirector | Validate provider-neutral narration plans. |
createActivityWorkerHandler | Expose one engine through the isolated runtime protocol. |
createCoordinationWorkerHandler | Expose deterministic coordination policy. |
createNarrationWorkerHandler | Expose fact-to-cue planning. |
createPortablePackageUiBridge | Use one bounded transport in iframe and WebView hosts. |
parsePackageUiMessage / parseHostUiMessage | Validate portable UI frames at boundaries. |
Prefer these wrappers to custom transport or ad hoc validation. They keep local tests, Workbench, and production execution on the same contract.
SDK implementation
packages/sdk/src/index.tsExact exported helpers and validated worker adapters.
Contract barrel
packages/contracts/src/index.tsAllowlisted public schema and type exports.
SDK boundary test
test/package-workbench.test.tsPrevents private host or domain imports from leaking into public packages.