From 44e27177892a48a51c440676ff3f6613deef5164 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sat, 6 Jun 2026 19:39:05 +0900 Subject: feat(wire,conversation-store): per-chunk seq sync cursor (StoredChunk) Add StoredChunk { seq, role, chunk } to @dispatch/wire (re-exported via the kernel contract shims). Keeps Chunk pure (provider-facing, no cursor); the sync cursor lives only on the envelope. conversation-store: rekey conv::msg: -> conv::chunk:; append explodes messages into role-tagged seq'd chunks (1-based, gap-free, monotonic) with internal boundary metadata so load() round-trips ChatMessage[] losslessly and still reconciles; new loadSince(id, sinceSeq?) raw sync stream. session-orchestrator test fake conforms to the widened interface. FE Slice 2 backend prereq (per-chunk seq). typecheck clean, 469 vitest, biome clean. --- packages/kernel/src/contracts/conversation.ts | 1 + packages/kernel/src/contracts/index.ts | 1 + 2 files changed, 2 insertions(+) (limited to 'packages/kernel') diff --git a/packages/kernel/src/contracts/conversation.ts b/packages/kernel/src/contracts/conversation.ts index ec9a389..0080964 100644 --- a/packages/kernel/src/contracts/conversation.ts +++ b/packages/kernel/src/contracts/conversation.ts @@ -11,6 +11,7 @@ export type { ErrorChunk, Role, StepId, + StoredChunk, SystemChunk, TextChunk, ThinkingChunk, diff --git a/packages/kernel/src/contracts/index.ts b/packages/kernel/src/contracts/index.ts index 6f6954e..1698486 100644 --- a/packages/kernel/src/contracts/index.ts +++ b/packages/kernel/src/contracts/index.ts @@ -18,6 +18,7 @@ export type { ErrorChunk, Role, StepId, + StoredChunk, SystemChunk, TextChunk, ThinkingChunk, -- cgit v1.2.3