feat(I199): StreamFrame wire shape (spec 23) #2

Merged
buildagent merged 3 commits from feat/i199-streaming-wire into main 2026-05-27 20:52:03 +02:00
Member

Summary

Adds the Cap'n Proto wire envelope for IXT streaming primitives —
ipc_streaming.capnp, a sibling to HandlePayload.

  • StreamFrame six-variant union (Open / Data / Error / Close / Cancel / Credit)
  • InteractionKind, CloseReason, CancelReason, StreamErrorCode enums with pinned ordinals
  • Open.context carried as opaque Data to match the existing HandlePayload.context pattern (spec 23 §10)

Lockstep — paired with:

  • ixt-sdk-rust: feat/i199-streaming-mirror (SDK mirror types + Cap'n Proto converters)
  • h-dv/ixt: feat/i199-part2-streaming (streaming module in ixt-core + MessageBus integration)

Merge order: this PR first, then ixt-sdk-rust, then the superproject.

Test plan

  • Schema compiles via capnpc (verified through ixt-core/build.rs symlink path)
  • Wire round-trips for every StreamFrame variant cover by ixt-core::streaming::wire tests
  • Wire round-trips also exercised by the SDK mirror in ixt-sdk-rust::stream_wire
## Summary Adds the Cap'n Proto wire envelope for IXT streaming primitives — `ipc_streaming.capnp`, a sibling to `HandlePayload`. - `StreamFrame` six-variant union (Open / Data / Error / Close / Cancel / Credit) - `InteractionKind`, `CloseReason`, `CancelReason`, `StreamErrorCode` enums with pinned ordinals - `Open.context` carried as opaque `Data` to match the existing `HandlePayload.context` pattern (spec 23 §10) Lockstep — paired with: - `ixt-sdk-rust`: feat/i199-streaming-mirror (SDK mirror types + Cap'n Proto converters) - `h-dv/ixt`: feat/i199-part2-streaming (streaming module in ixt-core + MessageBus integration) Merge order: this PR first, then ixt-sdk-rust, then the superproject. ## Test plan - [x] Schema compiles via `capnpc` (verified through `ixt-core/build.rs` symlink path) - [x] Wire round-trips for every `StreamFrame` variant cover by `ixt-core::streaming::wire` tests - [x] Wire round-trips also exercised by the SDK mirror in `ixt-sdk-rust::stream_wire`
Adds `ipc_streaming.capnp` — the wire envelope for IXT streaming
primitives. Sibling to `HandlePayload`, distinct because StreamFrame
carries a `StreamId`, has a six-variant union, and no per-frame topic.

Schema covers spec 23 §4 (StreamFrame envelope), §4.1-§4.6 (Open,
Data, Error, Close, Cancel, Credit), and the InteractionKind /
CloseReason / CancelReason / StreamErrorCode enums whose ordinals are
pinned by the wire format.

`Open.context` is opaque `Data` matching the existing
`HandlePayload.context` pattern (spec 23 §10) — the InvocationContext
schema evolves on its own version cadence and a typed reference would
couple them unnecessarily.

Lockstep — paired with the ixt-sdk-rust mirror and the ixt-core
streaming module.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Spec 20 §3.5 mandates only `Rejected/Dropped/Deferred/Killed` —
"no fifth term". `backpressure` was a fifth term that drifted from
the normative vocabulary. Rename the enum value to `rejected` so the
wire shape matches the spec vocabulary.

This is a wire-incompatible rename — accepted because no consumer
has shipped (pre-1.0, `feedback_no_premature_compat`).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Extends ixt-wasm.h with three new host functions for stream emission
(stream_send_data, stream_send_close, stream_send_error) and documents
the module-exported `ixt_module_handle_server_stream` callback the
runtime invokes once per frame on a stream the module is callee for.

Phase 2a covers WASM modules as stream CALLEES only — accepting opens,
emitting frames. The caller-side `stream_open` host function is
deferred to Phase 2b when the WASM async ABI lands (spec 23 §11).

Per-frame payload wire shape documented in the header. Modules need
only parse the 17-byte prefix (kind + stream_id) to echo or close.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
h-dv/ixt-public!2
No description provided.