diff options
| author | Adam Malczewski <[email protected]> | 2026-06-06 21:29:52 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-06 21:29:52 +0900 |
| commit | 2c5bc242a8a99e3b863c247f70b26f5883333677 (patch) | |
| tree | ce938fbef47d8dab44bfe5cce68ebfac7a91ca8a /packages/kernel/src/runtime/dispatch.ts | |
| parent | fedf9c2695476e9ee6f95776b0244acfc37f022f (diff) | |
| download | dispatch-2c5bc242a8a99e3b863c247f70b26f5883333677.tar.gz dispatch-2c5bc242a8a99e3b863c247f70b26f5883333677.zip | |
feat(kernel-runtime,session-orchestrator): emit turn lifecycle events
Close a gap found live: neither transport emitted turn-start/done/turn-sealed
(the wire defined them; nothing fired them). turn-sealed is the FE's
cache-commit signal (frontend-design §6.3); done ends the stream.
- kernel-runtime: runTurn emits turn-start first and done (with finishReason)
last, on every exit path (stop/tool-calls/max-steps/error/aborted).
- session-orchestrator: emits turn-sealed after conversationStore.append
succeeds (the kernel touches no DB, so the post-persist seal is the
orchestrator's). Not emitted if append throws.
No contract change (all three wire types already existed). Verified live: HTTP
/chat and WS chat both stream turn-start … done turn-sealed.
typecheck clean, 494 vitest + 80 bun, biome clean.
Diffstat (limited to 'packages/kernel/src/runtime/dispatch.ts')
0 files changed, 0 insertions, 0 deletions
