diff --git a/.changeset/ag-ui-interrupts.md b/.changeset/ag-ui-interrupts.md deleted file mode 100644 index a3a23ff85..000000000 --- a/.changeset/ag-ui-interrupts.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@tanstack/ai': minor -'@tanstack/ai-client': minor -'@tanstack/ai-react': minor -'@tanstack/ai-preact': minor -'@tanstack/ai-solid': minor -'@tanstack/ai-vue': minor -'@tanstack/ai-svelte': minor -'@tanstack/ai-angular': minor ---- - -Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and -client-tool execution, with typed bound resolvers, atomic batches, and -structured errors. Interrupts run ephemerally by resuming from the full client -message history in a fresh child run — no persistence required. - -This changes native approval and client-tool streams from legacy custom events -to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated -`pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and -legacy event readers remain as limited compatibility surfaces for migration; -`addToolResult` remains supported. diff --git a/.changeset/interrupt-binding-ownership.md b/.changeset/interrupt-binding-ownership.md deleted file mode 100644 index b681fe9dd..000000000 --- a/.changeset/interrupt-binding-ownership.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -'@tanstack/ai-client': minor -'@tanstack/ai': minor ---- - -Make interrupt ownership explicit rather than assumed. - -An AG-UI `Interrupt` is a shared envelope — a workflow engine's durable -approval or another agent framework's pause can arrive on the same stream. What -makes a pause resumable through `chat()` is the binding this package attaches -under `tanstack:interruptBinding`. - -- Interrupts that carry no binding this client understands now surface as - `kind: 'unbound'` with `canResolve: false`, instead of being given a - synthesized binding and rendered as resolvable generic interrupts. Resolving - those produced an answer submitted against a run with nothing pending, which - failed as `unknown-interrupt` only after the user had filled in the form. - Unbound items never block submission of the interrupts that are yours. -- The binding carries a wire version (`INTERRUPT_BINDING_VERSION`). Readers - reject a version they don't recognise rather than duck-typing its fields. A - binding written before the field existed is still read. -- `INTERRUPT_BINDING_METADATA_KEY`, `withInterruptBinding()` and - `readInterruptBinding()` are exported, so anything producing an interrupt this - package must later resume attaches the binding through a supported API - instead of copying the metadata key. -- Interrupt classification is driven by the binding alone. `Interrupt.reason` is - free-form AG-UI text another producer can also use, so it is now a display - hint only and never decides ownership. -- The interrupt protocol surface is enumerated instead of `export *`. The - unimplemented durable-recovery contract (`InterruptRecoveryStateV1`, - `InterruptRecoveryQuery`, the never-called `loadInterruptState` adapter hook, - and the `persistence-required` / `atomic-commit-unsupported` / - `recovery-unavailable` error codes) is removed rather than published. diff --git a/.changeset/interrupts-validation-ownership.md b/.changeset/interrupts-validation-ownership.md deleted file mode 100644 index 122b0687b..000000000 --- a/.changeset/interrupts-validation-ownership.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'@tanstack/ai': minor -'@tanstack/ai-client': minor ---- - -Interrupts: the application owns wire-schema validation, and the hashing -dependency is gone. - -The library no longer transforms a generic interrupt's wire JSON Schema into a -validator or validates the resolved value against it, on either the client or -the server. Whatever you pass to `resolveInterrupt` (client) or send in the -`resume` batch (server) flows through as-is. Validate it yourself if you need to -trust it, e.g. with `z.fromJSONSchema(interrupt.responseSchema).safeParse(value)` -on the client and your own check on the server. Validation of a tool's -code-authored Standard Schema (`approvalSchema` / `inputSchema`) is unchanged. - -This drops the `ajv` and `ajv-formats` dependencies. Interrupt binding hashes and -resolution fingerprints now use a small bundled SHA-256 instead of -`@noble/hashes`, so that dependency is gone too. The wire hash shape -(`sha256:`) is unchanged. diff --git a/.changeset/resumable-streams.md b/.changeset/resumable-streams.md deleted file mode 100644 index 35b6ebfd7..000000000 --- a/.changeset/resumable-streams.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -'@tanstack/ai': minor -'@tanstack/ai-client': minor -'@tanstack/ai-durable-stream': minor ---- - -Resumable streams: reconnect to an in-flight SSE **or NDJSON** response without -re-running the provider. - -`toServerSentEventsResponse` and `toHttpResponse` both accept a -`durability: { adapter, batch }` option. The adapter (`StreamDurability`) -records every chunk to an ordered log before delivery and tags each event with -an opaque, adapter-owned offset — an SSE `id:` line, or the `id` of an NDJSON -`{ id, chunk }` envelope (NDJSON has no native event-id). A reconnect -(`Last-Event-ID`) or an explicit `?offset` read replays strictly after that -offset from the log — the lazy provider stream is never iterated on resume. -Producers terminalize the log on cancellation and failure (`RUN_ERROR` append - -- `close()`) and on completion when the source stream emits its own terminal - event (`chat()` always does), so readers are never parked on a dead run. - -Two adapters ship: `memoryStream(request)` in `@tanstack/ai` (process-local, -for development and tests) and the new `@tanstack/ai-durable-stream` package, -a Durable Streams protocol adapter for production backends. - -For the `GET` handler that a reload or a second tab reconnects to, -`resumeServerSentEventsResponse({ adapter })` and `resumeHttpResponse({ adapter })` -replay a run straight from the durability log. They need no producer stream and -return a 400 when the request carries no resume offset. - -On the client, all four HTTP adapters are now resumable — `fetchServerSentEvents`, -`fetchHttpStream`, `xhrServerSentEvents`, and `xhrHttpStream`. Each tracks the -per-event offset, auto-reconnects with `Last-Event-ID`, de-duplicates the -replayed prefix, and exposes `joinRun(runId)` to attach to an in-flight or -finished run from the start (read-only GET with `offset=-1`). Untagged streams -behave exactly as before. A durable run that ends with no terminal event and no -forward progress now throws `DurableStreamIncompleteError` instead of hanging. - -Reconnection and durability are bounded so failures surface rather than hang or -loop: - -- `memoryStream` evicts completed logs after a grace window (unbounded growth - is gone); resuming an expired/unknown run throws, and a from-start join to a - run that never produces fails after `MemoryStreamOptions.firstChunkDeadlineMs`. -- all four HTTP adapters accept `reconnect: { maxAttempts, delayMs }` — a - throttle plus a ceiling on CONSECUTIVE no-progress reconnects (default 5; - forward progress resets it) that fails with the new `StreamReconnectLimitError` - instead of reconnecting endlessly, without penalizing a healthy long-lived run. -- `durableStream` accepts `reconnect: { maxReadFailures, delayMs }` to bound its - read-retry loop, and `server` is now optional when `fetch` is provided (e.g. a - Cloudflare service binding). -- `toServerSentEventsResponse` accepts `debug` to record durability terminal / - close failures server-side, where a replaying joiner cannot observe them. diff --git a/.changeset/shared-scope.md b/.changeset/shared-scope.md deleted file mode 100644 index fc71894c4..000000000 --- a/.changeset/shared-scope.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'@tanstack/ai': minor ---- - -**Add a shared `Scope` identity type to `@tanstack/ai`.** - -`Scope` is the single identity/isolation vocabulary for the subsystems that -persist or recall per-conversation data — `@tanstack/ai-persistence` and -`@tanstack/ai-memory`. Rather than each subsystem inventing its own notion of -"whose data is this?", both import one type: - -```ts -interface Scope { - threadId: string // required — the single conversation key (same as ctx.threadId) - userId?: string // durable end-user identity; required in practice for multi-user apps - tenantId?: string // multi-tenant boundary - namespace?: string // reserved logical partition; no subsystem keys on it yet -} -``` - -`threadId` is the one conversation key across the codebase (matching -`ChatMiddlewareContext.threadId`, with `conversationId` already deprecated in -favor of it) — subsystems must not introduce a second name (`sessionId`, …) for -the same concept. Every field is an isolation boundary and must be derived -server-side from trusted session state, never from client input. - -This is additive: nothing consumes `Scope` yet. It lands ahead of the -persistence and memory PRs so both build on one settled, unambiguous identity -contract instead of diverging. diff --git a/examples/ag-ui/CHANGELOG.md b/examples/ag-ui/CHANGELOG.md index 41d1e2e02..281ab4c33 100644 --- a/examples/ag-ui/CHANGELOG.md +++ b/examples/ag-ui/CHANGELOG.md @@ -1,5 +1,14 @@ # ag-ui +## 0.0.3 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288)]: + - @tanstack/ai-client@0.23.0 + - @tanstack/ai-react@0.19.0 + - @tanstack/ai-react-ui@0.8.16 + ## 0.0.2 ### Patch Changes diff --git a/examples/ag-ui/package.json b/examples/ag-ui/package.json index 3475ab6f6..2eb3f2b18 100644 --- a/examples/ag-ui/package.json +++ b/examples/ag-ui/package.json @@ -2,7 +2,7 @@ "name": "ag-ui", "private": true, "type": "module", - "version": "0.0.2", + "version": "0.0.3", "scripts": { "detect-servers": "node scripts/detect-servers.mjs", "predev": "node scripts/detect-servers.mjs", diff --git a/packages/ai-acp/CHANGELOG.md b/packages/ai-acp/CHANGELOG.md index 663b6797f..4ac8d2d50 100644 --- a/packages/ai-acp/CHANGELOG.md +++ b/packages/ai-acp/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-acp +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-sandbox@0.2.5 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-acp/package.json b/packages/ai-acp/package.json index 7f766d480..dcb042296 100644 --- a/packages/ai-acp/package.json +++ b/packages/ai-acp/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-acp", - "version": "0.2.3", + "version": "0.2.4", "description": "Shared Agent Client Protocol (ACP) transport, session, and AG-UI translation for TanStack AI harness adapters.", "author": "", "license": "MIT", diff --git a/packages/ai-angular/CHANGELOG.md b/packages/ai-angular/CHANGELOG.md index 32645461d..f3a2c0f36 100644 --- a/packages/ai-angular/CHANGELOG.md +++ b/packages/ai-angular/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-angular +## 0.4.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-client@0.23.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/ai-angular/package.json b/packages/ai-angular/package.json index 0cc622277..fb1d48aa9 100644 --- a/packages/ai-angular/package.json +++ b/packages/ai-angular/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-angular", - "version": "0.3.1", + "version": "0.4.0", "description": "Angular signals integration for TanStack AI streaming chat, structured outputs, and media generation.", "author": "", "license": "MIT", diff --git a/packages/ai-anthropic/CHANGELOG.md b/packages/ai-anthropic/CHANGELOG.md index f9f654410..b4b772afb 100644 --- a/packages/ai-anthropic/CHANGELOG.md +++ b/packages/ai-anthropic/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-anthropic +## 0.16.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.16.3 ### Patch Changes diff --git a/packages/ai-anthropic/package.json b/packages/ai-anthropic/package.json index 4f6702cbb..ba67655c8 100644 --- a/packages/ai-anthropic/package.json +++ b/packages/ai-anthropic/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-anthropic", - "version": "0.16.3", + "version": "0.16.4", "description": "Anthropic Claude adapter for TanStack AI chat, tool calling, thinking, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-bedrock/CHANGELOG.md b/packages/ai-bedrock/CHANGELOG.md index d737219ad..7fa4672c2 100644 --- a/packages/ai-bedrock/CHANGELOG.md +++ b/packages/ai-bedrock/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-bedrock +## 0.1.5 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/openai-base@0.9.10 + ## 0.1.4 ### Patch Changes diff --git a/packages/ai-bedrock/package.json b/packages/ai-bedrock/package.json index 1981b2b4c..5ac0ae8fa 100644 --- a/packages/ai-bedrock/package.json +++ b/packages/ai-bedrock/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-bedrock", - "version": "0.1.4", + "version": "0.1.5", "type": "module", "description": "Amazon Bedrock adapter for TanStack AI — OpenAI-compatible chat, responses, tools, and reasoning.", "author": "", diff --git a/packages/ai-claude-code/CHANGELOG.md b/packages/ai-claude-code/CHANGELOG.md index 048c0b7d7..8c46b67f7 100644 --- a/packages/ai-claude-code/CHANGELOG.md +++ b/packages/ai-claude-code/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-claude-code +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-sandbox@0.2.5 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-claude-code/package.json b/packages/ai-claude-code/package.json index 9d960189c..fa976a33f 100644 --- a/packages/ai-claude-code/package.json +++ b/packages/ai-claude-code/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-claude-code", - "version": "0.2.3", + "version": "0.2.4", "description": "Claude Code harness adapter for TanStack AI — run Claude Code as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-client/CHANGELOG.md b/packages/ai-client/CHANGELOG.md index e0b56d32f..1593eb784 100644 --- a/packages/ai-client/CHANGELOG.md +++ b/packages/ai-client/CHANGELOG.md @@ -1,5 +1,115 @@ # @tanstack/ai-client +## 0.23.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Make interrupt ownership explicit rather than assumed. + + An AG-UI `Interrupt` is a shared envelope — a workflow engine's durable + approval or another agent framework's pause can arrive on the same stream. What + makes a pause resumable through `chat()` is the binding this package attaches + under `tanstack:interruptBinding`. + - Interrupts that carry no binding this client understands now surface as + `kind: 'unbound'` with `canResolve: false`, instead of being given a + synthesized binding and rendered as resolvable generic interrupts. Resolving + those produced an answer submitted against a run with nothing pending, which + failed as `unknown-interrupt` only after the user had filled in the form. + Unbound items never block submission of the interrupts that are yours. + - The binding carries a wire version (`INTERRUPT_BINDING_VERSION`). Readers + reject a version they don't recognise rather than duck-typing its fields. A + binding written before the field existed is still read. + - `INTERRUPT_BINDING_METADATA_KEY`, `withInterruptBinding()` and + `readInterruptBinding()` are exported, so anything producing an interrupt this + package must later resume attaches the binding through a supported API + instead of copying the metadata key. + - Interrupt classification is driven by the binding alone. `Interrupt.reason` is + free-form AG-UI text another producer can also use, so it is now a display + hint only and never decides ownership. + - The interrupt protocol surface is enumerated instead of `export *`. The + unimplemented durable-recovery contract (`InterruptRecoveryStateV1`, + `InterruptRecoveryQuery`, the never-called `loadInterruptState` adapter hook, + and the `persistence-required` / `atomic-commit-unsupported` / + `recovery-unavailable` error codes) is removed rather than published. + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Interrupts: the application owns wire-schema validation, and the hashing + dependency is gone. + + The library no longer transforms a generic interrupt's wire JSON Schema into a + validator or validates the resolved value against it, on either the client or + the server. Whatever you pass to `resolveInterrupt` (client) or send in the + `resume` batch (server) flows through as-is. Validate it yourself if you need to + trust it, e.g. with `z.fromJSONSchema(interrupt.responseSchema).safeParse(value)` + on the client and your own check on the server. Validation of a tool's + code-authored Standard Schema (`approvalSchema` / `inputSchema`) is unchanged. + + This drops the `ajv` and `ajv-formats` dependencies. Interrupt binding hashes and + resolution fingerprints now use a small bundled SHA-256 instead of + `@noble/hashes`, so that dependency is gone too. The wire hash shape + (`sha256:`) is unchanged. + +- [#955](https://github.com/TanStack/ai/pull/955) [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288) - Resumable streams: reconnect to an in-flight SSE **or NDJSON** response without + re-running the provider. + + `toServerSentEventsResponse` and `toHttpResponse` both accept a + `durability: { adapter, batch }` option. The adapter (`StreamDurability`) + records every chunk to an ordered log before delivery and tags each event with + an opaque, adapter-owned offset — an SSE `id:` line, or the `id` of an NDJSON + `{ id, chunk }` envelope (NDJSON has no native event-id). A reconnect + (`Last-Event-ID`) or an explicit `?offset` read replays strictly after that + offset from the log — the lazy provider stream is never iterated on resume. + Producers terminalize the log on cancellation and failure (`RUN_ERROR` append + - `close()`) and on completion when the source stream emits its own terminal + event (`chat()` always does), so readers are never parked on a dead run. + + Two adapters ship: `memoryStream(request)` in `@tanstack/ai` (process-local, + for development and tests) and the new `@tanstack/ai-durable-stream` package, + a Durable Streams protocol adapter for production backends. + + For the `GET` handler that a reload or a second tab reconnects to, + `resumeServerSentEventsResponse({ adapter })` and `resumeHttpResponse({ adapter })` + replay a run straight from the durability log. They need no producer stream and + return a 400 when the request carries no resume offset. + + On the client, all four HTTP adapters are now resumable — `fetchServerSentEvents`, + `fetchHttpStream`, `xhrServerSentEvents`, and `xhrHttpStream`. Each tracks the + per-event offset, auto-reconnects with `Last-Event-ID`, de-duplicates the + replayed prefix, and exposes `joinRun(runId)` to attach to an in-flight or + finished run from the start (read-only GET with `offset=-1`). Untagged streams + behave exactly as before. A durable run that ends with no terminal event and no + forward progress now throws `DurableStreamIncompleteError` instead of hanging. + + Reconnection and durability are bounded so failures surface rather than hang or + loop: + - `memoryStream` evicts completed logs after a grace window (unbounded growth + is gone); resuming an expired/unknown run throws, and a from-start join to a + run that never produces fails after `MemoryStreamOptions.firstChunkDeadlineMs`. + - all four HTTP adapters accept `reconnect: { maxAttempts, delayMs }` — a + throttle plus a ceiling on CONSECUTIVE no-progress reconnects (default 5; + forward progress resets it) that fails with the new `StreamReconnectLimitError` + instead of reconnecting endlessly, without penalizing a healthy long-lived run. + - `durableStream` accepts `reconnect: { maxReadFailures, delayMs }` to bound its + read-retry loop, and `server` is now optional when `fetch` is provided (e.g. a + Cloudflare service binding). + - `toServerSentEventsResponse` accepts `debug` to record durability terminal / + close failures server-side, where a replaying joiner cannot observe them. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.22.1 ### Patch Changes diff --git a/packages/ai-client/package.json b/packages/ai-client/package.json index 2423f6948..1d11e6141 100644 --- a/packages/ai-client/package.json +++ b/packages/ai-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-client", - "version": "0.22.1", + "version": "0.23.0", "description": "Framework-agnostic headless client for TanStack AI chat, realtime sessions, streaming transports, and media generations.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-code-mode-skills/CHANGELOG.md b/packages/ai-code-mode-skills/CHANGELOG.md index 94c22b6a9..c957fc363 100644 --- a/packages/ai-code-mode-skills/CHANGELOG.md +++ b/packages/ai-code-mode-skills/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-code-mode-skills +## 0.3.12 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-code-mode@0.3.9 + ## 0.3.11 ### Patch Changes diff --git a/packages/ai-code-mode-skills/package.json b/packages/ai-code-mode-skills/package.json index 48ffd8d90..64782b2f7 100644 --- a/packages/ai-code-mode-skills/package.json +++ b/packages/ai-code-mode-skills/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-code-mode-skills", - "version": "0.3.11", + "version": "0.3.12", "description": "Persistent runtime skill library for TanStack AI Code Mode agents and sandboxed tool orchestration.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-code-mode/CHANGELOG.md b/packages/ai-code-mode/CHANGELOG.md index 3ca87fd9d..046882ee1 100644 --- a/packages/ai-code-mode/CHANGELOG.md +++ b/packages/ai-code-mode/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-code-mode +## 0.3.9 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.3.8 ### Patch Changes diff --git a/packages/ai-code-mode/package.json b/packages/ai-code-mode/package.json index 85a837d0b..90fb51501 100644 --- a/packages/ai-code-mode/package.json +++ b/packages/ai-code-mode/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-code-mode", - "version": "0.3.8", + "version": "0.3.9", "description": "Secure TypeScript Code Mode for TanStack AI agents to execute sandboxed tool orchestration programs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-codex/CHANGELOG.md b/packages/ai-codex/CHANGELOG.md index 6710f31d7..cabea7b0f 100644 --- a/packages/ai-codex/CHANGELOG.md +++ b/packages/ai-codex/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-codex +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-sandbox@0.2.5 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-codex/package.json b/packages/ai-codex/package.json index 4bdfad50c..2ba51c787 100644 --- a/packages/ai-codex/package.json +++ b/packages/ai-codex/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-codex", - "version": "0.2.3", + "version": "0.2.4", "description": "Codex harness adapter for TanStack AI — run OpenAI Codex as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-devtools/CHANGELOG.md b/packages/ai-devtools/CHANGELOG.md index 9a00d78c5..dd21b7d7d 100644 --- a/packages/ai-devtools/CHANGELOG.md +++ b/packages/ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-devtools-core +## 0.4.25 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.4.24 ### Patch Changes diff --git a/packages/ai-devtools/package.json b/packages/ai-devtools/package.json index e0a766d97..edcdbeb71 100644 --- a/packages/ai-devtools/package.json +++ b/packages/ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-devtools-core", - "version": "0.4.24", + "version": "0.4.25", "description": "Core TanStack AI Devtools plugin for inspecting chat messages, tool calls, streams, and errors.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-durable-stream/CHANGELOG.md b/packages/ai-durable-stream/CHANGELOG.md new file mode 100644 index 000000000..d9a0dbd46 --- /dev/null +++ b/packages/ai-durable-stream/CHANGELOG.md @@ -0,0 +1,56 @@ +# @tanstack/ai-durable-stream + +## 0.1.0 + +### Minor Changes + +- [#955](https://github.com/TanStack/ai/pull/955) [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288) - Resumable streams: reconnect to an in-flight SSE **or NDJSON** response without + re-running the provider. + + `toServerSentEventsResponse` and `toHttpResponse` both accept a + `durability: { adapter, batch }` option. The adapter (`StreamDurability`) + records every chunk to an ordered log before delivery and tags each event with + an opaque, adapter-owned offset — an SSE `id:` line, or the `id` of an NDJSON + `{ id, chunk }` envelope (NDJSON has no native event-id). A reconnect + (`Last-Event-ID`) or an explicit `?offset` read replays strictly after that + offset from the log — the lazy provider stream is never iterated on resume. + Producers terminalize the log on cancellation and failure (`RUN_ERROR` append + - `close()`) and on completion when the source stream emits its own terminal + event (`chat()` always does), so readers are never parked on a dead run. + + Two adapters ship: `memoryStream(request)` in `@tanstack/ai` (process-local, + for development and tests) and the new `@tanstack/ai-durable-stream` package, + a Durable Streams protocol adapter for production backends. + + For the `GET` handler that a reload or a second tab reconnects to, + `resumeServerSentEventsResponse({ adapter })` and `resumeHttpResponse({ adapter })` + replay a run straight from the durability log. They need no producer stream and + return a 400 when the request carries no resume offset. + + On the client, all four HTTP adapters are now resumable — `fetchServerSentEvents`, + `fetchHttpStream`, `xhrServerSentEvents`, and `xhrHttpStream`. Each tracks the + per-event offset, auto-reconnects with `Last-Event-ID`, de-duplicates the + replayed prefix, and exposes `joinRun(runId)` to attach to an in-flight or + finished run from the start (read-only GET with `offset=-1`). Untagged streams + behave exactly as before. A durable run that ends with no terminal event and no + forward progress now throws `DurableStreamIncompleteError` instead of hanging. + + Reconnection and durability are bounded so failures surface rather than hang or + loop: + - `memoryStream` evicts completed logs after a grace window (unbounded growth + is gone); resuming an expired/unknown run throws, and a from-start join to a + run that never produces fails after `MemoryStreamOptions.firstChunkDeadlineMs`. + - all four HTTP adapters accept `reconnect: { maxAttempts, delayMs }` — a + throttle plus a ceiling on CONSECUTIVE no-progress reconnects (default 5; + forward progress resets it) that fails with the new `StreamReconnectLimitError` + instead of reconnecting endlessly, without penalizing a healthy long-lived run. + - `durableStream` accepts `reconnect: { maxReadFailures, delayMs }` to bound its + read-retry loop, and `server` is now optional when `fetch` is provided (e.g. a + Cloudflare service binding). + - `toServerSentEventsResponse` accepts `debug` to record durability terminal / + close failures server-side, where a replaying joiner cannot observe them. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 diff --git a/packages/ai-durable-stream/package.json b/packages/ai-durable-stream/package.json index 2ce39ffb8..dd3b365fb 100644 --- a/packages/ai-durable-stream/package.json +++ b/packages/ai-durable-stream/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-durable-stream", - "version": "0.0.0", + "version": "0.1.0", "description": "Delivery durability for TanStack AI over the durable-streams HTTP protocol — a resumable StreamDurability transport sink (append/read/resume) that stores zero delivery events itself.", "author": "", "license": "MIT", diff --git a/packages/ai-elevenlabs/CHANGELOG.md b/packages/ai-elevenlabs/CHANGELOG.md index e441d6d16..e4b39bfcf 100644 --- a/packages/ai-elevenlabs/CHANGELOG.md +++ b/packages/ai-elevenlabs/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-elevenlabs +## 0.2.35 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.2.34 ### Patch Changes diff --git a/packages/ai-elevenlabs/package.json b/packages/ai-elevenlabs/package.json index ee1c39d20..d4d7e6648 100644 --- a/packages/ai-elevenlabs/package.json +++ b/packages/ai-elevenlabs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-elevenlabs", - "version": "0.2.34", + "version": "0.2.35", "description": "ElevenLabs adapter for TanStack AI realtime voice, text-to-speech, transcription, music, and sound effects.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-fal/CHANGELOG.md b/packages/ai-fal/CHANGELOG.md index e7239bcc4..879637121 100644 --- a/packages/ai-fal/CHANGELOG.md +++ b/packages/ai-fal/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-fal +## 0.9.13 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.9.12 ### Patch Changes diff --git a/packages/ai-fal/package.json b/packages/ai-fal/package.json index 8290805ba..bb7e6b134 100644 --- a/packages/ai-fal/package.json +++ b/packages/ai-fal/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-fal", - "version": "0.9.12", + "version": "0.9.13", "description": "fal.ai adapter for TanStack AI image, video, audio, speech, and transcription generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-gemini/CHANGELOG.md b/packages/ai-gemini/CHANGELOG.md index 7c2f00957..36cc43576 100644 --- a/packages/ai-gemini/CHANGELOG.md +++ b/packages/ai-gemini/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-gemini +## 0.20.2 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.20.1 ### Patch Changes @@ -22,7 +29,9 @@ ```ts createOpenaiImage('gpt-image-1', apiKey, { allowUrlFetch: true }) createOpenaiVideo('sora-2', apiKey, { allowUrlFetch: true }) - createGeminiVideo('veo-3.1-generate-preview', apiKey, { allowUrlFetch: true }) + createGeminiVideo('veo-3.1-generate-preview', apiKey, { + allowUrlFetch: true, + }) ``` Migration: if you passed HTTP(S) URL image inputs to these adapters, either fetch the bytes yourself and pass a `data:` URI, pass a `gs://` reference (Veo), or set `allowUrlFetch: true`. diff --git a/packages/ai-gemini/package.json b/packages/ai-gemini/package.json index 412fa0a58..e7cb5e9a5 100644 --- a/packages/ai-gemini/package.json +++ b/packages/ai-gemini/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-gemini", - "version": "0.20.1", + "version": "0.20.2", "description": "Google Gemini adapter for TanStack AI chat, images, speech, audio generation, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-grok-build/CHANGELOG.md b/packages/ai-grok-build/CHANGELOG.md index bb7a7132f..9b584fa60 100644 --- a/packages/ai-grok-build/CHANGELOG.md +++ b/packages/ai-grok-build/CHANGELOG.md @@ -1,5 +1,14 @@ # @tanstack/ai-grok-build +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-acp@0.2.4 + - @tanstack/ai-sandbox@0.2.5 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-grok-build/package.json b/packages/ai-grok-build/package.json index 7aeb00977..274841c7c 100644 --- a/packages/ai-grok-build/package.json +++ b/packages/ai-grok-build/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-grok-build", - "version": "0.2.3", + "version": "0.2.4", "description": "Grok Build harness adapter for TanStack AI — run Grok Build as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-grok/CHANGELOG.md b/packages/ai-grok/CHANGELOG.md index 80eb945ea..6dee1bebd 100644 --- a/packages/ai-grok/CHANGELOG.md +++ b/packages/ai-grok/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-grok +## 0.14.10 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/openai-base@0.9.10 + ## 0.14.9 ### Patch Changes diff --git a/packages/ai-grok/package.json b/packages/ai-grok/package.json index caae1ee0c..3b32629da 100644 --- a/packages/ai-grok/package.json +++ b/packages/ai-grok/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-grok", - "version": "0.14.9", + "version": "0.14.10", "description": "xAI Grok adapter for TanStack AI chat, image generation, realtime, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-groq/CHANGELOG.md b/packages/ai-groq/CHANGELOG.md index b3a32a8cc..d7fdc2df2 100644 --- a/packages/ai-groq/CHANGELOG.md +++ b/packages/ai-groq/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-groq +## 0.5.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/openai-base@0.9.10 + ## 0.5.3 ### Patch Changes diff --git a/packages/ai-groq/package.json b/packages/ai-groq/package.json index 2f1aaef65..2bd567d15 100644 --- a/packages/ai-groq/package.json +++ b/packages/ai-groq/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-groq", - "version": "0.5.3", + "version": "0.5.4", "description": "Groq adapter for TanStack AI low-latency chat, tool calling, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-isolate-cloudflare/CHANGELOG.md b/packages/ai-isolate-cloudflare/CHANGELOG.md index eacf35de7..f8ea64db3 100644 --- a/packages/ai-isolate-cloudflare/CHANGELOG.md +++ b/packages/ai-isolate-cloudflare/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-isolate-cloudflare +## 0.2.39 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.9 + ## 0.2.38 ### Patch Changes diff --git a/packages/ai-isolate-cloudflare/package.json b/packages/ai-isolate-cloudflare/package.json index 726e3b45c..5ee9a3fca 100644 --- a/packages/ai-isolate-cloudflare/package.json +++ b/packages/ai-isolate-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-cloudflare", - "version": "0.2.38", + "version": "0.2.39", "description": "Cloudflare Workers sandbox driver for TanStack AI Code Mode TypeScript execution at the edge.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-isolate-node/CHANGELOG.md b/packages/ai-isolate-node/CHANGELOG.md index 355dae5c8..97bdb1d36 100644 --- a/packages/ai-isolate-node/CHANGELOG.md +++ b/packages/ai-isolate-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-isolate-node +## 0.1.48 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.9 + ## 0.1.47 ### Patch Changes diff --git a/packages/ai-isolate-node/package.json b/packages/ai-isolate-node/package.json index 18b95cf4c..1c484f827 100644 --- a/packages/ai-isolate-node/package.json +++ b/packages/ai-isolate-node/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-node", - "version": "0.1.47", + "version": "0.1.48", "description": "Node.js isolated-vm sandbox driver for TanStack AI Code Mode TypeScript execution.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-isolate-quickjs/CHANGELOG.md b/packages/ai-isolate-quickjs/CHANGELOG.md index 21b609c72..77cf64afc 100644 --- a/packages/ai-isolate-quickjs/CHANGELOG.md +++ b/packages/ai-isolate-quickjs/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-isolate-quickjs +## 0.1.48 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.9 + ## 0.1.47 ### Patch Changes diff --git a/packages/ai-isolate-quickjs/package.json b/packages/ai-isolate-quickjs/package.json index 27a7640f6..84a1e3c16 100644 --- a/packages/ai-isolate-quickjs/package.json +++ b/packages/ai-isolate-quickjs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-quickjs", - "version": "0.1.47", + "version": "0.1.48", "description": "QuickJS WASM sandbox driver for TanStack AI Code Mode TypeScript execution across runtimes.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-mcp/CHANGELOG.md b/packages/ai-mcp/CHANGELOG.md index 68604fba8..b710dbaa4 100644 --- a/packages/ai-mcp/CHANGELOG.md +++ b/packages/ai-mcp/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-mcp +## 0.2.6 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.2.5 ### Patch Changes diff --git a/packages/ai-mcp/package.json b/packages/ai-mcp/package.json index 860f77701..13fb511e1 100644 --- a/packages/ai-mcp/package.json +++ b/packages/ai-mcp/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-mcp", - "version": "0.2.5", + "version": "0.2.6", "description": "Host-side Model Context Protocol client for TanStack AI: discover and run MCP server tools, resources, and prompts in any adapter's chat() loop, with generated end-to-end types.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-mistral/CHANGELOG.md b/packages/ai-mistral/CHANGELOG.md index 5bd877325..d54805cb3 100644 --- a/packages/ai-mistral/CHANGELOG.md +++ b/packages/ai-mistral/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-mistral +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-mistral/package.json b/packages/ai-mistral/package.json index 177210044..1d5c84639 100644 --- a/packages/ai-mistral/package.json +++ b/packages/ai-mistral/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-mistral", - "version": "0.2.3", + "version": "0.2.4", "type": "module", "description": "Mistral adapter for TanStack AI", "author": "", diff --git a/packages/ai-ollama/CHANGELOG.md b/packages/ai-ollama/CHANGELOG.md index 80f9fa2ef..ce469d4ed 100644 --- a/packages/ai-ollama/CHANGELOG.md +++ b/packages/ai-ollama/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-ollama +## 0.8.17 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.8.16 ### Patch Changes diff --git a/packages/ai-ollama/package.json b/packages/ai-ollama/package.json index 8b414b3a4..f57636beb 100644 --- a/packages/ai-ollama/package.json +++ b/packages/ai-ollama/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-ollama", - "version": "0.8.16", + "version": "0.8.17", "description": "Ollama adapter for TanStack AI local LLM chat, tool calling, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-openai/CHANGELOG.md b/packages/ai-openai/CHANGELOG.md index 90c8fa673..bc58b4037 100644 --- a/packages/ai-openai/CHANGELOG.md +++ b/packages/ai-openai/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-openai +## 0.17.2 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/openai-base@0.9.10 + ## 0.17.1 ### Patch Changes @@ -21,7 +29,9 @@ ```ts createOpenaiImage('gpt-image-1', apiKey, { allowUrlFetch: true }) createOpenaiVideo('sora-2', apiKey, { allowUrlFetch: true }) - createGeminiVideo('veo-3.1-generate-preview', apiKey, { allowUrlFetch: true }) + createGeminiVideo('veo-3.1-generate-preview', apiKey, { + allowUrlFetch: true, + }) ``` Migration: if you passed HTTP(S) URL image inputs to these adapters, either fetch the bytes yourself and pass a `data:` URI, pass a `gs://` reference (Veo), or set `allowUrlFetch: true`. diff --git a/packages/ai-openai/package.json b/packages/ai-openai/package.json index c10867be9..7ec0cc798 100644 --- a/packages/ai-openai/package.json +++ b/packages/ai-openai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openai", - "version": "0.17.1", + "version": "0.17.2", "description": "OpenAI adapter for TanStack AI chat, tools, images, video, speech, transcription, realtime, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-opencode/CHANGELOG.md b/packages/ai-opencode/CHANGELOG.md index 809af39b4..1695eba1b 100644 --- a/packages/ai-opencode/CHANGELOG.md +++ b/packages/ai-opencode/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-opencode +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-sandbox@0.2.5 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-opencode/package.json b/packages/ai-opencode/package.json index 091203639..ff8583692 100644 --- a/packages/ai-opencode/package.json +++ b/packages/ai-opencode/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-opencode", - "version": "0.2.3", + "version": "0.2.4", "description": "OpenCode harness adapter for TanStack AI — run OpenCode as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-openrouter/CHANGELOG.md b/packages/ai-openrouter/CHANGELOG.md index 49d91c73f..02e65d14a 100644 --- a/packages/ai-openrouter/CHANGELOG.md +++ b/packages/ai-openrouter/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-openrouter +## 0.15.11 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.15.10 ### Patch Changes diff --git a/packages/ai-openrouter/package.json b/packages/ai-openrouter/package.json index 5aa817ade..d3d4d8506 100644 --- a/packages/ai-openrouter/package.json +++ b/packages/ai-openrouter/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openrouter", - "version": "0.15.10", + "version": "0.15.11", "description": "TanStack AI adapter for OpenRouter chat, provider tools, structured outputs, and access to hundreds of LLMs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-preact/CHANGELOG.md b/packages/ai-preact/CHANGELOG.md index 1f66e75ad..f60547247 100644 --- a/packages/ai-preact/CHANGELOG.md +++ b/packages/ai-preact/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-preact +## 0.12.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-client@0.23.0 + ## 0.11.1 ### Patch Changes diff --git a/packages/ai-preact/package.json b/packages/ai-preact/package.json index 3fae2bba4..4bc2b91e5 100644 --- a/packages/ai-preact/package.json +++ b/packages/ai-preact/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-preact", - "version": "0.11.1", + "version": "0.12.0", "description": "Preact hooks for TanStack AI streaming chat and typed messages.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-react-ui/CHANGELOG.md b/packages/ai-react-ui/CHANGELOG.md index 1de3edb2c..988062e96 100644 --- a/packages/ai-react-ui/CHANGELOG.md +++ b/packages/ai-react-ui/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-react-ui +## 0.8.16 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288)]: + - @tanstack/ai-client@0.23.0 + - @tanstack/ai-react@0.19.0 + ## 0.8.15 ### Patch Changes diff --git a/packages/ai-react-ui/package.json b/packages/ai-react-ui/package.json index 05058a215..2747a47e7 100644 --- a/packages/ai-react-ui/package.json +++ b/packages/ai-react-ui/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-react-ui", - "version": "0.8.15", + "version": "0.8.16", "description": "Headless React components for building TanStack AI chat interfaces with streamed message parts.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-react/CHANGELOG.md b/packages/ai-react/CHANGELOG.md index 25bdce91d..128e9ff55 100644 --- a/packages/ai-react/CHANGELOG.md +++ b/packages/ai-react/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-react +## 0.19.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-client@0.23.0 + ## 0.18.1 ### Patch Changes diff --git a/packages/ai-react/package.json b/packages/ai-react/package.json index 8cf8747e4..1940f79ff 100644 --- a/packages/ai-react/package.json +++ b/packages/ai-react/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-react", - "version": "0.18.1", + "version": "0.19.0", "description": "React hooks for TanStack AI streaming chat, realtime voice, structured outputs, and media generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-sandbox-cloudflare/CHANGELOG.md b/packages/ai-sandbox-cloudflare/CHANGELOG.md index 214f16495..0d7a8e8aa 100644 --- a/packages/ai-sandbox-cloudflare/CHANGELOG.md +++ b/packages/ai-sandbox-cloudflare/CHANGELOG.md @@ -1,5 +1,14 @@ # @tanstack/ai-sandbox-cloudflare +## 0.2.5 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-sandbox@0.2.5 + - @tanstack/ai-sandbox-local-process@0.2.0 + ## 0.2.4 ### Patch Changes diff --git a/packages/ai-sandbox-cloudflare/package.json b/packages/ai-sandbox-cloudflare/package.json index e8c644836..f47f6f1ac 100644 --- a/packages/ai-sandbox-cloudflare/package.json +++ b/packages/ai-sandbox-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-cloudflare", - "version": "0.2.4", + "version": "0.2.5", "description": "Cloudflare sandbox provider for TanStack AI — run harness adapters inside Cloudflare Containers (edge) through the uniform SandboxHandle.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox/CHANGELOG.md b/packages/ai-sandbox/CHANGELOG.md index 6f3ee0dc9..c43429df8 100644 --- a/packages/ai-sandbox/CHANGELOG.md +++ b/packages/ai-sandbox/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-sandbox +## 0.2.5 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.2.4 ### Patch Changes diff --git a/packages/ai-sandbox/package.json b/packages/ai-sandbox/package.json index 924b25279..6fab07e1b 100644 --- a/packages/ai-sandbox/package.json +++ b/packages/ai-sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox", - "version": "0.2.4", + "version": "0.2.5", "description": "Provider-agnostic sandbox layer for TanStack AI — run harness adapters inside isolated sandboxes (defineSandbox, defineWorkspace, withSandbox) with a uniform SandboxHandle, workspace bootstrap, policy, and resumable lifecycle.", "author": "", "license": "MIT", diff --git a/packages/ai-solid-ui/CHANGELOG.md b/packages/ai-solid-ui/CHANGELOG.md index 29c42b34b..a39eca649 100644 --- a/packages/ai-solid-ui/CHANGELOG.md +++ b/packages/ai-solid-ui/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-solid-ui +## 0.7.15 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288)]: + - @tanstack/ai-client@0.23.0 + - @tanstack/ai-solid@0.16.0 + ## 0.7.14 ### Patch Changes diff --git a/packages/ai-solid-ui/package.json b/packages/ai-solid-ui/package.json index 17cdecd3b..5670e789d 100644 --- a/packages/ai-solid-ui/package.json +++ b/packages/ai-solid-ui/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-solid-ui", - "version": "0.7.14", + "version": "0.7.15", "description": "Headless Solid components for building TanStack AI chat interfaces with streamed message parts.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-solid/CHANGELOG.md b/packages/ai-solid/CHANGELOG.md index 1e502f29a..e20047ec0 100644 --- a/packages/ai-solid/CHANGELOG.md +++ b/packages/ai-solid/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-solid +## 0.16.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-client@0.23.0 + ## 0.15.1 ### Patch Changes diff --git a/packages/ai-solid/package.json b/packages/ai-solid/package.json index 2518689b1..f03de7491 100644 --- a/packages/ai-solid/package.json +++ b/packages/ai-solid/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-solid", - "version": "0.15.1", + "version": "0.16.0", "description": "Solid hooks for TanStack AI streaming chat, structured outputs, and media generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-svelte/CHANGELOG.md b/packages/ai-svelte/CHANGELOG.md index 514279b95..06159aad5 100644 --- a/packages/ai-svelte/CHANGELOG.md +++ b/packages/ai-svelte/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-svelte +## 0.16.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-client@0.23.0 + ## 0.15.1 ### Patch Changes diff --git a/packages/ai-svelte/package.json b/packages/ai-svelte/package.json index ddb1e59b5..2c2606d6d 100644 --- a/packages/ai-svelte/package.json +++ b/packages/ai-svelte/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-svelte", - "version": "0.15.1", + "version": "0.16.0", "description": "Svelte 5 bindings for TanStack AI streaming chat, structured outputs, and media generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-vue-ui/CHANGELOG.md b/packages/ai-vue-ui/CHANGELOG.md index c8db6f736..b81b32a14 100644 --- a/packages/ai-vue-ui/CHANGELOG.md +++ b/packages/ai-vue-ui/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-vue-ui +## 0.2.35 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a)]: + - @tanstack/ai-vue@0.16.0 + ## 0.2.34 ### Patch Changes diff --git a/packages/ai-vue-ui/package.json b/packages/ai-vue-ui/package.json index 9036d8330..86801bccb 100644 --- a/packages/ai-vue-ui/package.json +++ b/packages/ai-vue-ui/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-vue-ui", - "version": "0.2.34", + "version": "0.2.35", "description": "Headless Vue components for building TanStack AI chat interfaces with streamed message parts.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-vue/CHANGELOG.md b/packages/ai-vue/CHANGELOG.md index e7ed5fa20..311b960b1 100644 --- a/packages/ai-vue/CHANGELOG.md +++ b/packages/ai-vue/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-vue +## 0.16.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + - @tanstack/ai-client@0.23.0 + ## 0.15.1 ### Patch Changes diff --git a/packages/ai-vue/package.json b/packages/ai-vue/package.json index fc57375f0..abcce741b 100644 --- a/packages/ai-vue/package.json +++ b/packages/ai-vue/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-vue", - "version": "0.15.1", + "version": "0.16.0", "description": "Vue composables for TanStack AI streaming chat, structured outputs, and media generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai/CHANGELOG.md b/packages/ai/CHANGELOG.md index a95900586..414a73376 100644 --- a/packages/ai/CHANGELOG.md +++ b/packages/ai/CHANGELOG.md @@ -1,5 +1,136 @@ # @tanstack/ai +## 0.43.0 + +### Minor Changes + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Adopt the AG-UI interrupt lifecycle for tool approvals, generic responses, and + client-tool execution, with typed bound resolvers, atomic batches, and + structured errors. Interrupts run ephemerally by resuming from the full client + message history in a fresh child run — no persistence required. + + This changes native approval and client-tool streams from legacy custom events + to snapshot-plus-`RUN_FINISHED` interrupt outcomes. Deprecated + `pendingInterrupts`, `addToolApprovalResponse`, raw `resumeInterrupts`, and + legacy event readers remain as limited compatibility surfaces for migration; + `addToolResult` remains supported. + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Make interrupt ownership explicit rather than assumed. + + An AG-UI `Interrupt` is a shared envelope — a workflow engine's durable + approval or another agent framework's pause can arrive on the same stream. What + makes a pause resumable through `chat()` is the binding this package attaches + under `tanstack:interruptBinding`. + - Interrupts that carry no binding this client understands now surface as + `kind: 'unbound'` with `canResolve: false`, instead of being given a + synthesized binding and rendered as resolvable generic interrupts. Resolving + those produced an answer submitted against a run with nothing pending, which + failed as `unknown-interrupt` only after the user had filled in the form. + Unbound items never block submission of the interrupts that are yours. + - The binding carries a wire version (`INTERRUPT_BINDING_VERSION`). Readers + reject a version they don't recognise rather than duck-typing its fields. A + binding written before the field existed is still read. + - `INTERRUPT_BINDING_METADATA_KEY`, `withInterruptBinding()` and + `readInterruptBinding()` are exported, so anything producing an interrupt this + package must later resume attaches the binding through a supported API + instead of copying the metadata key. + - Interrupt classification is driven by the binding alone. `Interrupt.reason` is + free-form AG-UI text another producer can also use, so it is now a display + hint only and never decides ownership. + - The interrupt protocol surface is enumerated instead of `export *`. The + unimplemented durable-recovery contract (`InterruptRecoveryStateV1`, + `InterruptRecoveryQuery`, the never-called `loadInterruptState` adapter hook, + and the `persistence-required` / `atomic-commit-unsupported` / + `recovery-unavailable` error codes) is removed rather than published. + +- [#970](https://github.com/TanStack/ai/pull/970) [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a) - Interrupts: the application owns wire-schema validation, and the hashing + dependency is gone. + + The library no longer transforms a generic interrupt's wire JSON Schema into a + validator or validates the resolved value against it, on either the client or + the server. Whatever you pass to `resolveInterrupt` (client) or send in the + `resume` batch (server) flows through as-is. Validate it yourself if you need to + trust it, e.g. with `z.fromJSONSchema(interrupt.responseSchema).safeParse(value)` + on the client and your own check on the server. Validation of a tool's + code-authored Standard Schema (`approvalSchema` / `inputSchema`) is unchanged. + + This drops the `ajv` and `ajv-formats` dependencies. Interrupt binding hashes and + resolution fingerprints now use a small bundled SHA-256 instead of + `@noble/hashes`, so that dependency is gone too. The wire hash shape + (`sha256:`) is unchanged. + +- [#955](https://github.com/TanStack/ai/pull/955) [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288) - Resumable streams: reconnect to an in-flight SSE **or NDJSON** response without + re-running the provider. + + `toServerSentEventsResponse` and `toHttpResponse` both accept a + `durability: { adapter, batch }` option. The adapter (`StreamDurability`) + records every chunk to an ordered log before delivery and tags each event with + an opaque, adapter-owned offset — an SSE `id:` line, or the `id` of an NDJSON + `{ id, chunk }` envelope (NDJSON has no native event-id). A reconnect + (`Last-Event-ID`) or an explicit `?offset` read replays strictly after that + offset from the log — the lazy provider stream is never iterated on resume. + Producers terminalize the log on cancellation and failure (`RUN_ERROR` append + - `close()`) and on completion when the source stream emits its own terminal + event (`chat()` always does), so readers are never parked on a dead run. + + Two adapters ship: `memoryStream(request)` in `@tanstack/ai` (process-local, + for development and tests) and the new `@tanstack/ai-durable-stream` package, + a Durable Streams protocol adapter for production backends. + + For the `GET` handler that a reload or a second tab reconnects to, + `resumeServerSentEventsResponse({ adapter })` and `resumeHttpResponse({ adapter })` + replay a run straight from the durability log. They need no producer stream and + return a 400 when the request carries no resume offset. + + On the client, all four HTTP adapters are now resumable — `fetchServerSentEvents`, + `fetchHttpStream`, `xhrServerSentEvents`, and `xhrHttpStream`. Each tracks the + per-event offset, auto-reconnects with `Last-Event-ID`, de-duplicates the + replayed prefix, and exposes `joinRun(runId)` to attach to an in-flight or + finished run from the start (read-only GET with `offset=-1`). Untagged streams + behave exactly as before. A durable run that ends with no terminal event and no + forward progress now throws `DurableStreamIncompleteError` instead of hanging. + + Reconnection and durability are bounded so failures surface rather than hang or + loop: + - `memoryStream` evicts completed logs after a grace window (unbounded growth + is gone); resuming an expired/unknown run throws, and a from-start join to a + run that never produces fails after `MemoryStreamOptions.firstChunkDeadlineMs`. + - all four HTTP adapters accept `reconnect: { maxAttempts, delayMs }` — a + throttle plus a ceiling on CONSECUTIVE no-progress reconnects (default 5; + forward progress resets it) that fails with the new `StreamReconnectLimitError` + instead of reconnecting endlessly, without penalizing a healthy long-lived run. + - `durableStream` accepts `reconnect: { maxReadFailures, delayMs }` to bound its + read-retry loop, and `server` is now optional when `fetch` is provided (e.g. a + Cloudflare service binding). + - `toServerSentEventsResponse` accepts `debug` to record durability terminal / + close failures server-side, where a replaying joiner cannot observe them. + +- [#980](https://github.com/TanStack/ai/pull/980) [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa) - **Add a shared `Scope` identity type to `@tanstack/ai`.** + + `Scope` is the single identity/isolation vocabulary for the subsystems that + persist or recall per-conversation data — `@tanstack/ai-persistence` and + `@tanstack/ai-memory`. Rather than each subsystem inventing its own notion of + "whose data is this?", both import one type: + + ```ts + interface Scope { + threadId: string // required — the single conversation key (same as ctx.threadId) + userId?: string // durable end-user identity; required in practice for multi-user apps + tenantId?: string // multi-tenant boundary + namespace?: string // reserved logical partition; no subsystem keys on it yet + } + ``` + + `threadId` is the one conversation key across the codebase (matching + `ChatMiddlewareContext.threadId`, with `conversationId` already deprecated in + favor of it) — subsystems must not introduce a second name (`sessionId`, …) for + the same concept. Every field is an isolation boundary and must be derived + server-side from trusted session state, never from client input. + + This is additive: nothing consumes `Scope` yet. It lands ahead of the + persistence and memory PRs so both build on one settled, unambiguous identity + contract instead of diverging. + ## 0.42.0 ### Minor Changes diff --git a/packages/ai/package.json b/packages/ai/package.json index 31cf76284..c29a16540 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai", - "version": "0.42.0", + "version": "0.43.0", "description": "Type-safe TypeScript AI SDK for streaming chat, tool calling, agents, structured outputs, and multimodal generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/openai-base/CHANGELOG.md b/packages/openai-base/CHANGELOG.md index 16a2b786a..5293fed2b 100644 --- a/packages/openai-base/CHANGELOG.md +++ b/packages/openai-base/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/openai-base +## 0.9.10 + +### Patch Changes + +- Updated dependencies [[`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`3301398`](https://github.com/TanStack/ai/commit/330139878958fc5c5c167a69347c884fa35b792a), [`7c7aa09`](https://github.com/TanStack/ai/commit/7c7aa09a7402b45e6285ebc78a606131aec3e288), [`4ce7600`](https://github.com/TanStack/ai/commit/4ce7600d5b543d4b7e3bd6d63cdf5ecf91cdeeaa)]: + - @tanstack/ai@0.43.0 + ## 0.9.9 ### Patch Changes diff --git a/packages/openai-base/package.json b/packages/openai-base/package.json index 63532ef4e..eb9241884 100644 --- a/packages/openai-base/package.json +++ b/packages/openai-base/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/openai-base", - "version": "0.9.9", + "version": "0.9.10", "description": "Shared OpenAI SDK base adapters for TanStack AI providers using Chat Completions and Responses APIs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/preact-ai-devtools/CHANGELOG.md b/packages/preact-ai-devtools/CHANGELOG.md index adf1ffa56..300fc277a 100644 --- a/packages/preact-ai-devtools/CHANGELOG.md +++ b/packages/preact-ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/preact-ai-devtools +## 0.1.68 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.25 + ## 0.1.67 ### Patch Changes diff --git a/packages/preact-ai-devtools/package.json b/packages/preact-ai-devtools/package.json index c33f8246f..dbe39533d 100644 --- a/packages/preact-ai-devtools/package.json +++ b/packages/preact-ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/preact-ai-devtools", - "version": "0.1.67", + "version": "0.1.68", "description": "Preact Devtools plugin for inspecting TanStack AI chat messages, tool calls, streams, and errors.", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-ai-devtools/CHANGELOG.md b/packages/react-ai-devtools/CHANGELOG.md index 7f137cae6..ba70b1e15 100644 --- a/packages/react-ai-devtools/CHANGELOG.md +++ b/packages/react-ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-ai-devtools +## 0.2.68 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.25 + ## 0.2.67 ### Patch Changes diff --git a/packages/react-ai-devtools/package.json b/packages/react-ai-devtools/package.json index 18dc96f51..fabdc3642 100644 --- a/packages/react-ai-devtools/package.json +++ b/packages/react-ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-ai-devtools", - "version": "0.2.67", + "version": "0.2.68", "description": "React Devtools plugin for inspecting TanStack AI chat messages, tool calls, streams, and errors.", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-ai-devtools/CHANGELOG.md b/packages/solid-ai-devtools/CHANGELOG.md index b0b43c73c..69c245c0e 100644 --- a/packages/solid-ai-devtools/CHANGELOG.md +++ b/packages/solid-ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/solid-ai-devtools +## 0.2.68 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.25 + ## 0.2.67 ### Patch Changes diff --git a/packages/solid-ai-devtools/package.json b/packages/solid-ai-devtools/package.json index 492ed6a9a..85cf57124 100644 --- a/packages/solid-ai-devtools/package.json +++ b/packages/solid-ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-ai-devtools", - "version": "0.2.67", + "version": "0.2.68", "description": "Solid Devtools plugin for inspecting TanStack AI chat messages, tool calls, streams, and errors.", "author": "Tanner Linsley", "license": "MIT",