summaryrefslogtreecommitdiffhomepage
path: root/src/core/chunks
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-07 18:56:16 +0900
committerAdam Malczewski <[email protected]>2026-06-07 18:56:16 +0900
commit03c58a7961f4ccf2a806bfb131984f7b118df51a (patch)
tree3cc3f88b30bf6a98b03cb3f2397a09c91afa4411 /src/core/chunks
parenta90a5533c4eb95a5a289fe6c9d0de03b0856c065 (diff)
downloaddispatch-web-03c58a7961f4ccf2a806bfb131984f7b118df51a.tar.gz
dispatch-web-03c58a7961f4ccf2a806bfb131984f7b118df51a.zip
fix(core): add step-complete contract guard for [email protected]
The backend's AgentEvent union now includes TurnStepCompleteEvent (wire/transport-contract 0.3.0). Add: no-op case in foldEvent (transcript reducer ignores timing metadata), exhaustiveness case in assertAgentEventExhaustive, and a step-complete sample in the conformance test (now 12 variants).
Diffstat (limited to 'src/core/chunks')
-rw-r--r--src/core/chunks/reducer.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/chunks/reducer.ts b/src/core/chunks/reducer.ts
index 1dcfa39..54b1922 100644
--- a/src/core/chunks/reducer.ts
+++ b/src/core/chunks/reducer.ts
@@ -148,6 +148,10 @@ export function foldEvent(state: TranscriptState, event: AgentEvent): Transcript
case "usage":
return { ...state, latestUsage: event.usage };
+ case "step-complete":
+ // Timing metadata — no content chunk; handled by the telemetry reducer.
+ return state;
+
case "done": {
const provisional = flushAccumulating(state.provisional, state.accumulating);
return {