The missing integration between wave-47's streaming substrate and
Joule-Code's coding-op cargo. Cursor / Copilot / Codex / Claude Code
stream typed-char + suggestion-appeared/accepted/rejected + cursor +
diagnostic events continuously, but no public standard types them up
so the cascade can gate per window and accepted suggestions can
materialize into a content-addressed coding-op cargo the federation
layer accepts.
This wave closes the gap end-to-end.
1. jouleclaw-coding-stream (new crate) — typed streaming primitives.
- CodingEvent { TypedChar | SuggestionAppeared | SuggestionAccepted
| SuggestionRejected | CursorMoved | DiagnosticDelta } —
distilled from production coding-agent event surfaces.
- CODING_STREAM_MIME = "application/x.jouleclaw-coding-event+json"
so coding events ride in jouleclaw-stream::Tick bytes WITHOUT
extending the tick schema. wave-47's conformance vectors stay
valid.
- CodingWindow::from_window extracts coding events from a
jouleclaw-stream::StreamWindow, skipping ticks that aren't
coding events (the stream often carries other channels).
- CodingOpMaterializer accumulates SuggestionAccepted across
windows, refuses overlapping edits (joule-code spec forbids
them), sorts by (path, start) — joule-code canonical
ordering — and emits a typed MaterializedCodingOp matching
joule-code-cargo's wire shape (alg, prior, edits, author,
intent, tier) plus a content-addressed `b3:...` op_id over
deterministic JSON.
- 11 tests.
2. jouleclaw-jcr1 — coding-window/1 schema.
- CodingWindowReceipt { jc_receipt, id, closed_at, steward,
stream_id, window_id, activity: CodingActivitySummary,
materialized_op_id, author_pubkey_hex }. Activity summary
carries typed_bytes + suggestions_{appeared, accepted,
rejected} + cursor_moves + diagnostic_delta_net.
materialized_op_id is empty for windows where the
materializer didn't seal; non-empty windows correlate with
a real joule-code cargo of the same id.
- Pairs with wave-47's stream-window/1 by sharing stream_id +
window_id. Downstream consumers correlate the two by those
fields to reconstruct the full coding session at the stream
level and the coding-op level simultaneously.
- 2 conformance vectors (typed-only window; op-materialized
window) with embedded byte-equal receipt_hash.
- 3 coding_window tests on top of the existing jcr1 surface.
3. Demo binary — examples/wave50_coding_stream.rs in
jouleclaw-stack. Five-window typed-coding session: user types
"fn ad" → "d()" → suggestion appears → rejected → second
suggestion appears → accepted → diagnostics clear → END.
Materializer seals at w04 with a content-addressed op_id;
each window mints a coding-window/1 receipt; the seal window's
receipt carries the op_id, correlating it to the joule-code
cargo the federation layer would accept.
Composition across waves 41-50:
Triangle (41-45) — conservation + cone + oracle + elicitor + Datum
Skill-compilation (e6741a1) — AgentTier hook
Wave-46 — context-store + fuzz oracle + cone-gated inject +
verified-code/1
Wave-47 — streaming substrate (stream + stream-oracle +
stream-window/1)
Wave-48 — UI ladder (ui-output + ui-oracle + ui-output/1)
Wave-49 — cross-standards binding (CrossStandardBinding +
invariant verifier + cross-binding/1)
Wave-50 — streaming coding ops (coding-stream + coding-window/1)
The triangle stays the type system; the streaming substrate stays
the per-window dispatch shape; this wave adds the coding-op cargo
materialization layer on top of both without modifying either.
A real coding agent now has: typed events on the wire, gated
per-window verification, accepted-suggestion accumulation across
windows, content-addressed op materialization matching joule-code's
spec, and a JCR-1 receipt correlating everything.
Workspace check clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>