@sesionario/live-contracts
v1.1.0
Published
Shared types, Zod schemas, and JSON Schema for the Sesionario live streaming platform
Maintainers
Readme
@sesionario/live-contracts
Shared types, Zod schemas, JSON Schema, and OpenAPI for the Sesionario live streaming platform.
Published to npm as @sesionario/live-contracts (public registry).
Install
pnpm add @sesionario/live-contractsLocal development (before first publish)
In live or live-svc, link the package from this repo:
pnpm add ../live-contracts
# or
pnpm add file:../live-contractsBuild
pnpm install
pnpm run build # emits dist/ + regenerates schemas/*.json
pnpm run testReleases
Releases are automated via semantic-release on push to main or dev. Use Conventional Commits to drive version bumps:
feat:— minor bumpfix:— patch bumpfeat!:orBREAKING CHANGE:— major bump
Channels
| Branch | npm dist-tag | Install |
| ------ | ------------ | ---------------------------------------- |
| dev | rc | pnpm add @sesionario/live-contracts@rc |
| main | latest | pnpm add @sesionario/live-contracts |
RC versions look like 1.4.0-rc.1; stable versions like 1.4.0.
Git flow
- Open feature PRs against
dev. - Merging into
devpublishes a release candidate to thercdist-tag. - When ready, open a PR from
dev→mainto promote to a stable release onlatest.
npm trusted publishing (one-time setup)
Publishing uses OIDC trusted publishing from GitHub Actions — no long-lived NPM_TOKEN is stored in the repo.
- Create the package on npmjs (first publish) or ensure
@sesionario/live-contractsexists under the@sesionarioscope. - On npmjs.com → package → Settings → Trusted publishing, add:
- Provider: GitHub Actions
- Repository:
docufacil/live-contracts - Workflow filename:
release.yml(exact match, case-sensitive)
- Ensure the
devbranch exists on GitHub before the first RC release.
If branch protection blocks the release bot from pushing version bumps back, add the GitHub Actions bot to the branch bypass list, or drop @semantic-release/git from .releaserc.json.
Exports
@sesionario/live-contracts— TypeScript types + Zod schemas@sesionario/live-contracts/schemas/*— JSON Schema files@sesionario/live-contracts/openapi.yaml— public API spec forlive-svc
TypeScript ↔ Python correspondence (live-engine)
| TypeScript (@sesionario/live-contracts) | Python (live-engine) |
| ----------------------------------------- | ----------------------------- |
| StreamStatus | StreamStatus (Literal enum) |
| Stream | Stream (Pydantic BaseModel) |
| CreateStreamResponse | CreateStreamResponse |
| GetStreamResponse | GetStreamResponse |
| ListStreamsResponse | ListStreamsResponse |
| SpawnRequest | SpawnRequest |
| SpawnResponse | SpawnResponse |
| StopRequest | StopRequest |
| StopResponse | StopResponse |
| IngestReadyWebhook | IngestReadyWebhook |
| AuthorizeRequest | AuthorizeRequest |
| AuthorizeResponse | AuthorizeResponse |
| R2Credentials | R2Credentials |
Keep Python models in live-engine/src/models.py manually synchronized when contracts change.
License
MIT
