You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add `chat.store` — a typed, bidirectional shared data slot on `chat.agent`. Agent-side foundation for TRI-8602. Independent of AG-UI — the same primitive will back the AG-UI `STATE_SNAPSHOT` / `STATE_DELTA` translator later.
7
+
8
+
**New on the agent:**
9
+
-`chat.store.set(value)` — replace, emits a `store-snapshot` chunk on the existing chat output stream.
10
+
-`chat.store.patch([...])` — RFC 6902 JSON Patch, emits a `store-delta` chunk.
11
+
-`chat.store.get()` — read the current value (scoped to the run).
12
+
-`chat.store.onChange((value, ops) => ...)` — subscribe to changes.
13
+
-`hydrateStore?: (event) => value` config on `chat.agent` — mirrors `hydrateMessages`; restore the store after a continuation from your own persistence layer.
14
+
-`ChatTaskWirePayload.incomingStore` — optional wire field applied at turn start before `run()` fires (last-write-wins over `hydrateStore`).
15
+
16
+
**New in core:**
17
+
-`store-snapshot` / `store-delta` chunk types and `applyChatStorePatch` helper exported from `@trigger.dev/core/v3/chat-client`.
18
+
19
+
The store lives in memory for the lifetime of the run and is persisted by the existing chat output stream plus the `hydrateStore` hook across continuations — no new infrastructure.
20
+
21
+
Client-side pieces (transport `getStore` / `setStore` / `applyStorePatch` / listeners, `AgentChat` accessors, `useChatStore` React hook, reference demo, docs) land in a follow-up.
0 commit comments