@stream-mdx/protocol
v0.5.0
Published
StreamMDX protocol types and event envelope for JSON/object streaming
Readme
@stream-mdx/protocol
@stream-mdx/protocol defines the transport-facing protocol types for structured StreamMDX event/object streaming. It is intended for consumers that need a stable, typed contract outside the React/browser UI layer.
Typical consumers include:
- TUIs and CLI tools
- NDJSON transports
- service boundaries that want typed event envelopes
- debugging or replay tooling that records and replays structured patch streams
Install
npm install @stream-mdx/protocolWhat This Package Provides
| Surface | Purpose | | --- | --- | | Event envelope types | Transport-safe event/message contracts | | Capability metadata | Describe supported features or modes | | Token/block payload types | Structured-clone-safe payload shapes |
Typical Pairings
| Pair with | Why |
| --- | --- |
| @stream-mdx/tui | NDJSON helpers and snapshot store |
| @stream-mdx/core | Shared low-level types and helpers |
| @stream-mdx/worker | Worker-side generation/consumption paths |
Documentation
- Start from the runnable example path with
npm run example:tui-minimalfrom the repo root. ../../examples/tui-minimal/README.md../../docs/TUI_MINIMAL_EXAMPLE.md../../docs/TUI_GUIDE.md../../docs/STREAMMDX_JSON_DIFF_SPEC.md../../docs/CLI_USAGE.md../../docs/PUBLIC_API.md
