From 7c459c7d919d1e08a228e8abc56129be174d8abe Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sun, 7 Jun 2026 17:46:53 +0900 Subject: feat(wire,kernel,session-orchestrator): live turn metrics on the stream Expose the backend's authoritative token+timing metrics on the live AgentEvent stream (observability-only -> now also client-facing). All additive/optional. - wire@0.3.0: new TurnStepCompleteEvent (type:step-complete) with per-step ttftMs/decodeMs/genTotalMs; usage += stepId; tool-result += durationMs (exec); done += durationMs (turn wall-clock) + usage (turn total). RunTurnInput += now?. transport-contract@0.3.0 (re-export bump). - kernel-runtime: when now injected, measures + emits the above (reuses the ttft/decode first-token detection); omits timing gracefully without a clock. - session-orchestrator: adds now? to deps, threads into RunTurnInput; extension activate injects () => Date.now(). - transport/cli/host-bin: untouched (verbatim pass-through; additive fields). FE handoff: frontend-metrics-handoff.md. typecheck clean; 520 vitest + 89 bun; biome 0/0. Replay/persistence = deferred Pass 2 (documented in tasks.md). --- packages/wire/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/wire/package.json') diff --git a/packages/wire/package.json b/packages/wire/package.json index 6098703..762c06e 100644 --- a/packages/wire/package.json +++ b/packages/wire/package.json @@ -1,6 +1,6 @@ { "name": "@dispatch/wire", - "version": "0.2.0", + "version": "0.3.0", "type": "module", "private": true, "main": "dist/index.js", -- cgit v1.2.3