Evidence from a full adoption evaluation in creative-agent (verdict: not adoptable today — the product has no hand-rolled buffer/replay for the module to replace, and the module can't tap the streams the product actually has):
- Event-vocabulary mismatch (silent no-op hazard):
coalesceDeltas only recognizes tool-loop shapes ({type:'text'|'reasoning'} / {kind:'event'}). agent-runtime products stream ChatStreamEvent NDJSON ({type:'message.part.updated', data:{part, delta}}) — pumped through the buffer, every per-token delta persists as its own D1 row because the coalescer never fires. Needs a ChatStreamEvent coalescer or a pluggable coalesce seam.
- No seam into
handleChatTurn: pumpBufferedTurn wants to own source iteration + the live write, but agent-runtime's handleChatTurn owns both and exposes only hooks.onEvent and a finished body. Needs either RunChatTurnInput accepting a TurnEventStore (runtime-side) or an event-tap mode on the pump that doesn't own the live write.
- No thread→running-turn discovery: the store is keyed by
turnId only; a reloaded client (the main resume case — clientRunId lost on reload) can't find the in-flight turn to replay. Needs a listRunning(scopeId)-shaped query or a status row carrying the session/thread id.
Separately: resolveChatTurn turn-identity IS independently adoptable by these products (creative-agent approximates it with a user-turn count) — that's a small standalone adoption, not blocked by the above.
Evidence from a full adoption evaluation in creative-agent (verdict: not adoptable today — the product has no hand-rolled buffer/replay for the module to replace, and the module can't tap the streams the product actually has):
coalesceDeltasonly recognizes tool-loop shapes ({type:'text'|'reasoning'}/{kind:'event'}). agent-runtime products streamChatStreamEventNDJSON ({type:'message.part.updated', data:{part, delta}}) — pumped through the buffer, every per-token delta persists as its own D1 row because the coalescer never fires. Needs a ChatStreamEvent coalescer or a pluggablecoalesceseam.handleChatTurn:pumpBufferedTurnwants to own source iteration + the live write, but agent-runtime'shandleChatTurnowns both and exposes onlyhooks.onEventand a finished body. Needs eitherRunChatTurnInputaccepting aTurnEventStore(runtime-side) or an event-tap mode on the pump that doesn't own the live write.turnIdonly; a reloaded client (the main resume case — clientRunId lost on reload) can't find the in-flight turn to replay. Needs alistRunning(scopeId)-shaped query or a status row carrying the session/thread id.Separately:
resolveChatTurnturn-identity IS independently adoptable by these products (creative-agent approximates it with a user-turn count) — that's a small standalone adoption, not blocked by the above.