diff options
| author | Adam Malczewski <[email protected]> | 2026-06-07 16:07:35 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-07 16:07:35 +0900 |
| commit | 904c6d7cc882ea6e092f03f9f487d80b75426440 (patch) | |
| tree | 0b97107a859f8d347071c01a6907c778dd9cd05a /packages/cli/src | |
| parent | efddee1edd2924725a4dd240894666ede97b67b9 (diff) | |
| download | dispatch-904c6d7cc882ea6e092f03f9f487d80b75426440.tar.gz dispatch-904c6d7cc882ea6e092f03f9f487d80b75426440.zip | |
feat(wire,kernel,conversation-store): step grouping via stepId for batched tool calls
Expose a per-step grouping key so a client can render a model's batched/parallel
tool calls (those emitted in one step) as one unit, on both the live stream and
replayed history. Key = branded StepId, derived turnId#stepIndex (0-based).
- [email protected]: required stepId on Turn{Tool,ToolResult}Event; optional stepId on
Tool{Call,Result}Chunk (generation provenance on the chunk, not the StoredChunk
envelope — StoredChunk unchanged). [email protected] (re-export bump).
- kernel-runtime: mint stepId per step; stamp on tool chunks + tool events.
- conversation-store: chunk-carried stepId round-trips append/load/loadSince for
free; reconcile copies it onto synthesized (interrupted) results.
- cli: stepId added to event test fixtures (renderer unchanged).
typecheck clean; 509 vitest + 89 bun; biome 0/0. FE courier reply + reference
snapshots regenerated in ../dispatch-web.
Diffstat (limited to 'packages/cli/src')
| -rw-r--r-- | packages/cli/src/render.test.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/cli/src/render.test.ts b/packages/cli/src/render.test.ts index bfdb791..c638584 100644 --- a/packages/cli/src/render.test.ts +++ b/packages/cli/src/render.test.ts @@ -1,4 +1,5 @@ import type { AgentEvent } from "@dispatch/transport-contract"; +import type { StepId } from "@dispatch/wire"; import { describe, expect, it } from "vitest"; import { renderEvent } from "./render.js"; @@ -41,6 +42,7 @@ describe("renderEvent", () => { type: "tool-call", conversationId: "c", turnId: "t", + stepId: "t1#0" as StepId, toolCallId: "tc1", toolName: "read_file", input: { path: "/foo" }, @@ -67,6 +69,7 @@ describe("renderEvent", () => { type: "tool-result", conversationId: "c", turnId: "t", + stepId: "t1#0" as StepId, toolCallId: "tc1", toolName: "read_file", content: "file contents", @@ -82,6 +85,7 @@ describe("renderEvent", () => { type: "tool-result", conversationId: "c", turnId: "t", + stepId: "t1#0" as StepId, toolCallId: "tc1", toolName: "read_file", content: "not found", |
