diff --git a/.changeset/audio-recording.md b/.changeset/audio-recording.md deleted file mode 100644 index 1c6e4d4a46..0000000000 --- a/.changeset/audio-recording.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@tanstack/ai-client': minor -'@tanstack/ai-react': minor -'@tanstack/ai-solid': minor -'@tanstack/ai-vue': minor -'@tanstack/ai-svelte': minor -'@tanstack/ai-angular': minor ---- - -Add `AudioRecorder` (`@tanstack/ai-client`) and framework hooks for recording an -audio message in the browser: `useAudioRecorder` (React/Solid/Vue), -`createAudioRecorder` (Svelte), and `injectAudioRecorder` (Angular). The -recording exposes a ready-to-use audio content part (`.part`) for `sendMessage` -and base64 (`.base64`) for the generation hooks. Native recorder output -(webm/mp4), no transcoding, no new dependency. - -Each hook also returns a reactive `recording` field — the latest resolved -recording (`AudioRecording | null`), available without awaiting `stop()`. Pass -`onComplete: (recording) => T | Promise` to transform the output: `stop()` -then resolves to `T` and `recording` becomes `T | null`. Omitting `onComplete` -keeps the raw `AudioRecording`. diff --git a/.changeset/fix-generation-hooks-onresult-inference.md b/.changeset/fix-generation-hooks-onresult-inference.md deleted file mode 100644 index 02fb9ea8f9..0000000000 --- a/.changeset/fix-generation-hooks-onresult-inference.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'@tanstack/ai-react': patch -'@tanstack/ai-solid': patch -'@tanstack/ai-svelte': patch -'@tanstack/ai-vue': patch -'@tanstack/ai-angular': patch ---- - -Fix `onResult` transform type inference on the generation hooks across every -framework package — the base generation hook plus `generateImage`, -`generateAudio`, `generateSpeech`, `generateVideo`, `transcription`, and -`summarize` (React `use*`, Vue `use*`, Solid `use*`, Svelte `create*`, and -Angular `inject*`). - -The hooks declared the `onResult` transform via a single defaulted type -parameter inferred from an optional nested property, which TypeScript collapses -to its default — leaving the callback parameter typed `any` (a hard error under -`strict`) and never narrowing `result` to the transform's return type. The -hooks now infer the transform type from the `onResult` return position (a -covariant inference site that works for an optional nested property), so the -callback parameter is typed as the raw result and `result` narrows to the -transform's return type; omitting the transform keeps the raw result type. See -issue #848. diff --git a/.changeset/grok-summarize-adapter-assignability.md b/.changeset/grok-summarize-adapter-assignability.md deleted file mode 100644 index 7f3a327fcb..0000000000 --- a/.changeset/grok-summarize-adapter-assignability.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@tanstack/ai-grok': patch ---- - -Fix `grokSummarize`/`createGrokSummarize` not being assignable to `summarize()`'s -`adapter` param for any current Grok model (`grok-4.3`, `grok-build-0.1`). - -`GrokTextProviderOptions` was declared as an `interface` extending -`Record`, giving it an explicit index signature. Under -`strictFunctionTypes`, the `SummarizeAdapter` constraint is checked -contravariantly, which requires `object` to be assignable to the provider -options — but `object` is not assignable to an index-signature type, so the -check failed (Grok-only; OpenAI's all-optional, no-index-signature options -passed). The options are now a type-alias intersection matching the OpenAI -shape, and the text adapter's provider-options constraint is widened to -`Record` to mirror `OpenAITextAdapter`. diff --git a/.changeset/mcp-apps.md b/.changeset/mcp-apps.md deleted file mode 100644 index 0d2f82d7f8..0000000000 --- a/.changeset/mcp-apps.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@tanstack/ai': minor -'@tanstack/ai-mcp': minor -'@tanstack/ai-client': minor -'@tanstack/ai-react': minor -'@tanstack/ai-preact': minor ---- - -feat: MCP Apps support — render interactive `ui://` widgets served by MCP servers - -Adds support for the ratified [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) standard, letting MCP server tools return interactive UI widgets that render in the chat. - -- **`@tanstack/ai`** — MCP tool results that link a `ui://` resource (via `_meta.ui.resourceUri`) now surface as a new `UIResourcePart` on the assistant `UIMessage` (carried as an AG-UI `CUSTOM` event). The widget never enters model input. The `ui://` resource is read eagerly during the run, fail-soft. -- **`@tanstack/ai-mcp`** — tool discovery now captures `serverId` + the UI resource link; `MCPClient` gains a public `callTool` and `getInfo()` (returns the client's transport descriptor); `MCPClients` gains `getServers()` (returns all pool entries' descriptors). New `@tanstack/ai-mcp/apps` subpath exports `createMcpAppCallHandler` — a server-side tool-call proxy for interactive widgets that takes the MCP client(s)/pool you already created (`clients: MCPClient | MCPClients | Array`), reads each client's transport descriptor via `MCPClient.getInfo()` / `MCPClients.getServers()` (pure config, no live socket required), and **reconnects per call** (stateless, serverless-safe by default, same-server allowlist). Also exports an in-memory `McpSessionStore` seam for stateful transports. -- **`@tanstack/ai-client`** — `createMcpAppBridge`, a framework-agnostic bridge routing widget tool-calls to the call handler, follow-up prompts into the chat, and blocking links unless a handler is supplied. -- **`@tanstack/ai-react` / `@tanstack/ai-preact`** — a `MCPAppResource` component (new `./mcp-apps` subpath) that renders a `UIResourcePart` via `@mcp-ui/client`'s `AppRenderer` (optional peer dependency), wired to the bridge. Plus a `useMcpAppBridge` hook (main entry) that returns a stable `createMcpAppBridge` for a given `threadId`/`callEndpoint` while always calling the latest `sendMessage`/`onLink`. - -Persistence is intentionally out of scope (in-memory seams only); Solid/Vue/Svelte/Angular renderers are deferred (the renderer SDK is currently React-only). diff --git a/.changeset/openrouter-forward-tool-cache-control.md b/.changeset/openrouter-forward-tool-cache-control.md deleted file mode 100644 index c8583e358e..0000000000 --- a/.changeset/openrouter-forward-tool-cache-control.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-openrouter': patch ---- - -Forward tool-definition `cacheControl` through the OpenRouter function-tool converter so Anthropic prompt caching of tool definitions works over OpenRouter. Previously `metadata.cacheControl` was dropped before serialization, so the cache breakpoint never reached the wire. The OpenRouter SDK already accepts `cacheControl` on a function tool and remaps it to `cache_control`; this mirrors `convertCustomToolToAdapterFormat` in `@tanstack/ai-anthropic`. diff --git a/packages/ai-angular/CHANGELOG.md b/packages/ai-angular/CHANGELOG.md index 7d32039530..0c5e1041f2 100644 --- a/packages/ai-angular/CHANGELOG.md +++ b/packages/ai-angular/CHANGELOG.md @@ -1,5 +1,44 @@ # @tanstack/ai-angular +## 0.2.0 + +### Minor Changes + +- [#810](https://github.com/TanStack/ai/pull/810) [`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40) - Add `AudioRecorder` (`@tanstack/ai-client`) and framework hooks for recording an + audio message in the browser: `useAudioRecorder` (React/Solid/Vue), + `createAudioRecorder` (Svelte), and `injectAudioRecorder` (Angular). The + recording exposes a ready-to-use audio content part (`.part`) for `sendMessage` + and base64 (`.base64`) for the generation hooks. Native recorder output + (webm/mp4), no transcoding, no new dependency. + + Each hook also returns a reactive `recording` field — the latest resolved + recording (`AudioRecording | null`), available without awaiting `stop()`. Pass + `onComplete: (recording) => T | Promise` to transform the output: `stop()` + then resolves to `T` and `recording` becomes `T | null`. Omitting `onComplete` + keeps the raw `AudioRecording`. + +### Patch Changes + +- [#856](https://github.com/TanStack/ai/pull/856) [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662) - Fix `onResult` transform type inference on the generation hooks across every + framework package — the base generation hook plus `generateImage`, + `generateAudio`, `generateSpeech`, `generateVideo`, `transcription`, and + `summarize` (React `use*`, Vue `use*`, Solid `use*`, Svelte `create*`, and + Angular `inject*`). + + The hooks declared the `onResult` transform via a single defaulted type + parameter inferred from an optional nested property, which TypeScript collapses + to its default — leaving the callback parameter typed `any` (a hard error under + `strict`) and never narrowing `result` to the transform's return type. The + hooks now infer the transform type from the `onResult` return position (a + covariant inference site that works for an optional nested property), so the + callback parameter is typed as the raw result and `result` narrows to the + transform's return type; omitting the transform keeps the raw result type. See + issue [#848](https://github.com/TanStack/ai/issues/848). + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai@0.38.0 + ## 0.1.11 ### Patch Changes diff --git a/packages/ai-angular/package.json b/packages/ai-angular/package.json index 21f09c5b8a..0e40e657f6 100644 --- a/packages/ai-angular/package.json +++ b/packages/ai-angular/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-angular", - "version": "0.1.11", + "version": "0.2.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 e4c6ba3899..15a4c84b38 100644 --- a/packages/ai-anthropic/CHANGELOG.md +++ b/packages/ai-anthropic/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-anthropic +## 0.15.11 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.15.10 ### Patch Changes diff --git a/packages/ai-anthropic/package.json b/packages/ai-anthropic/package.json index 721cea5b54..3747640dd0 100644 --- a/packages/ai-anthropic/package.json +++ b/packages/ai-anthropic/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-anthropic", - "version": "0.15.10", + "version": "0.15.11", "description": "Anthropic Claude adapter for TanStack AI chat, tool calling, thinking, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-client/CHANGELOG.md b/packages/ai-client/CHANGELOG.md index 1ecd9d0f05..a10043f9a0 100644 --- a/packages/ai-client/CHANGELOG.md +++ b/packages/ai-client/CHANGELOG.md @@ -1,5 +1,37 @@ # @tanstack/ai-client +## 0.19.0 + +### Minor Changes + +- [#810](https://github.com/TanStack/ai/pull/810) [`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40) - Add `AudioRecorder` (`@tanstack/ai-client`) and framework hooks for recording an + audio message in the browser: `useAudioRecorder` (React/Solid/Vue), + `createAudioRecorder` (Svelte), and `injectAudioRecorder` (Angular). The + recording exposes a ready-to-use audio content part (`.part`) for `sendMessage` + and base64 (`.base64`) for the generation hooks. Native recorder output + (webm/mp4), no transcoding, no new dependency. + + Each hook also returns a reactive `recording` field — the latest resolved + recording (`AudioRecording | null`), available without awaiting `stop()`. Pass + `onComplete: (recording) => T | Promise` to transform the output: `stop()` + then resolves to `T` and `recording` becomes `T | null`. Omitting `onComplete` + keeps the raw `AudioRecording`. + +- [#843](https://github.com/TanStack/ai/pull/843) [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb) - feat: MCP Apps support — render interactive `ui://` widgets served by MCP servers + + Adds support for the ratified [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) standard, letting MCP server tools return interactive UI widgets that render in the chat. + - **`@tanstack/ai`** — MCP tool results that link a `ui://` resource (via `_meta.ui.resourceUri`) now surface as a new `UIResourcePart` on the assistant `UIMessage` (carried as an AG-UI `CUSTOM` event). The widget never enters model input. The `ui://` resource is read eagerly during the run, fail-soft. + - **`@tanstack/ai-mcp`** — tool discovery now captures `serverId` + the UI resource link; `MCPClient` gains a public `callTool` and `getInfo()` (returns the client's transport descriptor); `MCPClients` gains `getServers()` (returns all pool entries' descriptors). New `@tanstack/ai-mcp/apps` subpath exports `createMcpAppCallHandler` — a server-side tool-call proxy for interactive widgets that takes the MCP client(s)/pool you already created (`clients: MCPClient | MCPClients | Array`), reads each client's transport descriptor via `MCPClient.getInfo()` / `MCPClients.getServers()` (pure config, no live socket required), and **reconnects per call** (stateless, serverless-safe by default, same-server allowlist). Also exports an in-memory `McpSessionStore` seam for stateful transports. + - **`@tanstack/ai-client`** — `createMcpAppBridge`, a framework-agnostic bridge routing widget tool-calls to the call handler, follow-up prompts into the chat, and blocking links unless a handler is supplied. + - **`@tanstack/ai-react` / `@tanstack/ai-preact`** — a `MCPAppResource` component (new `./mcp-apps` subpath) that renders a `UIResourcePart` via `@mcp-ui/client`'s `AppRenderer` (optional peer dependency), wired to the bridge. Plus a `useMcpAppBridge` hook (main entry) that returns a stable `createMcpAppBridge` for a given `threadId`/`callEndpoint` while always calling the latest `sendMessage`/`onLink`. + + Persistence is intentionally out of scope (in-memory seams only); Solid/Vue/Svelte/Angular renderers are deferred (the renderer SDK is currently React-only). + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.18.6 ### Patch Changes diff --git a/packages/ai-client/package.json b/packages/ai-client/package.json index d1cd67a5e6..28cf40b6d6 100644 --- a/packages/ai-client/package.json +++ b/packages/ai-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-client", - "version": "0.18.6", + "version": "0.19.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 efb863a399..dac55d1931 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.5 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + - @tanstack/ai-code-mode@0.3.2 + ## 0.3.4 ### Patch Changes diff --git a/packages/ai-code-mode-skills/package.json b/packages/ai-code-mode-skills/package.json index 78db5e4369..3743e5a2c1 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.4", + "version": "0.3.5", "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 af93caaf2c..ea1957ba58 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.2 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.3.1 ### Patch Changes diff --git a/packages/ai-code-mode/package.json b/packages/ai-code-mode/package.json index 1d983f29f9..258011724b 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.1", + "version": "0.3.2", "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-devtools/CHANGELOG.md b/packages/ai-devtools/CHANGELOG.md index e74c766fac..20624e94a7 100644 --- a/packages/ai-devtools/CHANGELOG.md +++ b/packages/ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-devtools-core +## 0.4.19 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.4.18 ### Patch Changes diff --git a/packages/ai-devtools/package.json b/packages/ai-devtools/package.json index 66484c70a3..8de070bfe0 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.18", + "version": "0.4.19", "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-elevenlabs/CHANGELOG.md b/packages/ai-elevenlabs/CHANGELOG.md index cb2438722f..f930069b15 100644 --- a/packages/ai-elevenlabs/CHANGELOG.md +++ b/packages/ai-elevenlabs/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-elevenlabs +## 0.2.30 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.2.29 ### Patch Changes diff --git a/packages/ai-elevenlabs/package.json b/packages/ai-elevenlabs/package.json index 4bf92d6fcc..09449ae88f 100644 --- a/packages/ai-elevenlabs/package.json +++ b/packages/ai-elevenlabs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-elevenlabs", - "version": "0.2.29", + "version": "0.2.30", "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 d86ac4bd00..10d180a60e 100644 --- a/packages/ai-fal/CHANGELOG.md +++ b/packages/ai-fal/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-fal +## 0.9.7 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.9.6 ### Patch Changes diff --git a/packages/ai-fal/package.json b/packages/ai-fal/package.json index 0a77b58ad7..73b9a3947e 100644 --- a/packages/ai-fal/package.json +++ b/packages/ai-fal/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-fal", - "version": "0.9.6", + "version": "0.9.7", "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 1dbafa3a20..21637ebd5c 100644 --- a/packages/ai-gemini/CHANGELOG.md +++ b/packages/ai-gemini/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-gemini +## 0.18.3 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.18.2 ### Patch Changes diff --git a/packages/ai-gemini/package.json b/packages/ai-gemini/package.json index a2a4418885..e2b5fdb384 100644 --- a/packages/ai-gemini/package.json +++ b/packages/ai-gemini/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-gemini", - "version": "0.18.2", + "version": "0.18.3", "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/CHANGELOG.md b/packages/ai-grok/CHANGELOG.md index 0511a280e0..85d26bea77 100644 --- a/packages/ai-grok/CHANGELOG.md +++ b/packages/ai-grok/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-grok +## 0.14.5 + +### Patch Changes + +- [#854](https://github.com/TanStack/ai/pull/854) [`301adc3`](https://github.com/TanStack/ai/commit/301adc3529992e7ebf0a04283f1359595f899f4f) - Fix `grokSummarize`/`createGrokSummarize` not being assignable to `summarize()`'s + `adapter` param for any current Grok model (`grok-4.3`, `grok-build-0.1`). + + `GrokTextProviderOptions` was declared as an `interface` extending + `Record`, giving it an explicit index signature. Under + `strictFunctionTypes`, the `SummarizeAdapter` constraint is checked + contravariantly, which requires `object` to be assignable to the provider + options — but `object` is not assignable to an index-signature type, so the + check failed (Grok-only; OpenAI's all-optional, no-index-signature options + passed). The options are now a type-alias intersection matching the OpenAI + shape, and the text adapter's provider-options constraint is widened to + `Record` to mirror `OpenAITextAdapter`. + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + - @tanstack/openai-base@0.9.5 + ## 0.14.4 ### Patch Changes diff --git a/packages/ai-grok/package.json b/packages/ai-grok/package.json index 0547130d58..8d15b16e84 100644 --- a/packages/ai-grok/package.json +++ b/packages/ai-grok/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-grok", - "version": "0.14.4", + "version": "0.14.5", "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 9b70d8d3af..b4264e84c6 100644 --- a/packages/ai-groq/CHANGELOG.md +++ b/packages/ai-groq/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-groq +## 0.4.15 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + - @tanstack/openai-base@0.9.5 + ## 0.4.14 ### Patch Changes diff --git a/packages/ai-groq/package.json b/packages/ai-groq/package.json index e570bcbd69..bc2eaee23f 100644 --- a/packages/ai-groq/package.json +++ b/packages/ai-groq/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-groq", - "version": "0.4.14", + "version": "0.4.15", "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 8bc81723be..38beeec592 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.32 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.2 + ## 0.2.31 ### Patch Changes diff --git a/packages/ai-isolate-cloudflare/package.json b/packages/ai-isolate-cloudflare/package.json index 4b865ddc63..3cd7b7df0a 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.31", + "version": "0.2.32", "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 98309d5644..ccde69c8a8 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.41 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.2 + ## 0.1.40 ### Patch Changes diff --git a/packages/ai-isolate-node/package.json b/packages/ai-isolate-node/package.json index 454b0c0bc4..719ac78a5d 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.40", + "version": "0.1.41", "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 86a621cee5..cb8002087b 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.41 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.2 + ## 0.1.40 ### Patch Changes diff --git a/packages/ai-isolate-quickjs/package.json b/packages/ai-isolate-quickjs/package.json index c93bcd1f2b..09a1e57291 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.40", + "version": "0.1.41", "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 105e5ea279..937d2ca53a 100644 --- a/packages/ai-mcp/CHANGELOG.md +++ b/packages/ai-mcp/CHANGELOG.md @@ -1,5 +1,24 @@ # @tanstack/ai-mcp +## 0.2.0 + +### Minor Changes + +- [#843](https://github.com/TanStack/ai/pull/843) [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb) - feat: MCP Apps support — render interactive `ui://` widgets served by MCP servers + + Adds support for the ratified [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) standard, letting MCP server tools return interactive UI widgets that render in the chat. + - **`@tanstack/ai`** — MCP tool results that link a `ui://` resource (via `_meta.ui.resourceUri`) now surface as a new `UIResourcePart` on the assistant `UIMessage` (carried as an AG-UI `CUSTOM` event). The widget never enters model input. The `ui://` resource is read eagerly during the run, fail-soft. + - **`@tanstack/ai-mcp`** — tool discovery now captures `serverId` + the UI resource link; `MCPClient` gains a public `callTool` and `getInfo()` (returns the client's transport descriptor); `MCPClients` gains `getServers()` (returns all pool entries' descriptors). New `@tanstack/ai-mcp/apps` subpath exports `createMcpAppCallHandler` — a server-side tool-call proxy for interactive widgets that takes the MCP client(s)/pool you already created (`clients: MCPClient | MCPClients | Array`), reads each client's transport descriptor via `MCPClient.getInfo()` / `MCPClients.getServers()` (pure config, no live socket required), and **reconnects per call** (stateless, serverless-safe by default, same-server allowlist). Also exports an in-memory `McpSessionStore` seam for stateful transports. + - **`@tanstack/ai-client`** — `createMcpAppBridge`, a framework-agnostic bridge routing widget tool-calls to the call handler, follow-up prompts into the chat, and blocking links unless a handler is supplied. + - **`@tanstack/ai-react` / `@tanstack/ai-preact`** — a `MCPAppResource` component (new `./mcp-apps` subpath) that renders a `UIResourcePart` via `@mcp-ui/client`'s `AppRenderer` (optional peer dependency), wired to the bridge. Plus a `useMcpAppBridge` hook (main entry) that returns a stable `createMcpAppBridge` for a given `threadId`/`callEndpoint` while always calling the latest `sendMessage`/`onLink`. + + Persistence is intentionally out of scope (in-memory seams only); Solid/Vue/Svelte/Angular renderers are deferred (the renderer SDK is currently React-only). + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.1.10 ### Patch Changes diff --git a/packages/ai-mcp/package.json b/packages/ai-mcp/package.json index b9de7b0699..360ac7ea21 100644 --- a/packages/ai-mcp/package.json +++ b/packages/ai-mcp/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-mcp", - "version": "0.1.10", + "version": "0.2.0", "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-ollama/CHANGELOG.md b/packages/ai-ollama/CHANGELOG.md index 6b10c12a02..ec89f893e2 100644 --- a/packages/ai-ollama/CHANGELOG.md +++ b/packages/ai-ollama/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-ollama +## 0.8.11 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.8.10 ### Patch Changes diff --git a/packages/ai-ollama/package.json b/packages/ai-ollama/package.json index c77c89ddd4..0a5f1957d5 100644 --- a/packages/ai-ollama/package.json +++ b/packages/ai-ollama/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-ollama", - "version": "0.8.10", + "version": "0.8.11", "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 1ffddc47d7..5be762ee87 100644 --- a/packages/ai-openai/CHANGELOG.md +++ b/packages/ai-openai/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-openai +## 0.15.9 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + - @tanstack/openai-base@0.9.5 + ## 0.15.8 ### Patch Changes diff --git a/packages/ai-openai/package.json b/packages/ai-openai/package.json index 39af843856..6df43c6ce8 100644 --- a/packages/ai-openai/package.json +++ b/packages/ai-openai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openai", - "version": "0.15.8", + "version": "0.15.9", "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-openrouter/CHANGELOG.md b/packages/ai-openrouter/CHANGELOG.md index cce89b7927..520b41d9ee 100644 --- a/packages/ai-openrouter/CHANGELOG.md +++ b/packages/ai-openrouter/CHANGELOG.md @@ -1,5 +1,14 @@ # @tanstack/ai-openrouter +## 0.15.4 + +### Patch Changes + +- [#823](https://github.com/TanStack/ai/pull/823) [`234d54e`](https://github.com/TanStack/ai/commit/234d54e394034a568e531c3b2e3027a451a59567) - Forward tool-definition `cacheControl` through the OpenRouter function-tool converter so Anthropic prompt caching of tool definitions works over OpenRouter. Previously `metadata.cacheControl` was dropped before serialization, so the cache breakpoint never reached the wire. The OpenRouter SDK already accepts `cacheControl` on a function tool and remaps it to `cache_control`; this mirrors `convertCustomToolToAdapterFormat` in `@tanstack/ai-anthropic`. + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.15.3 ### Patch Changes diff --git a/packages/ai-openrouter/package.json b/packages/ai-openrouter/package.json index dd085869e8..6260bb322d 100644 --- a/packages/ai-openrouter/package.json +++ b/packages/ai-openrouter/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openrouter", - "version": "0.15.3", + "version": "0.15.4", "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 9a7fd4b46a..be0121c604 100644 --- a/packages/ai-preact/CHANGELOG.md +++ b/packages/ai-preact/CHANGELOG.md @@ -1,5 +1,25 @@ # @tanstack/ai-preact +## 0.10.0 + +### Minor Changes + +- [#843](https://github.com/TanStack/ai/pull/843) [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb) - feat: MCP Apps support — render interactive `ui://` widgets served by MCP servers + + Adds support for the ratified [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) standard, letting MCP server tools return interactive UI widgets that render in the chat. + - **`@tanstack/ai`** — MCP tool results that link a `ui://` resource (via `_meta.ui.resourceUri`) now surface as a new `UIResourcePart` on the assistant `UIMessage` (carried as an AG-UI `CUSTOM` event). The widget never enters model input. The `ui://` resource is read eagerly during the run, fail-soft. + - **`@tanstack/ai-mcp`** — tool discovery now captures `serverId` + the UI resource link; `MCPClient` gains a public `callTool` and `getInfo()` (returns the client's transport descriptor); `MCPClients` gains `getServers()` (returns all pool entries' descriptors). New `@tanstack/ai-mcp/apps` subpath exports `createMcpAppCallHandler` — a server-side tool-call proxy for interactive widgets that takes the MCP client(s)/pool you already created (`clients: MCPClient | MCPClients | Array`), reads each client's transport descriptor via `MCPClient.getInfo()` / `MCPClients.getServers()` (pure config, no live socket required), and **reconnects per call** (stateless, serverless-safe by default, same-server allowlist). Also exports an in-memory `McpSessionStore` seam for stateful transports. + - **`@tanstack/ai-client`** — `createMcpAppBridge`, a framework-agnostic bridge routing widget tool-calls to the call handler, follow-up prompts into the chat, and blocking links unless a handler is supplied. + - **`@tanstack/ai-react` / `@tanstack/ai-preact`** — a `MCPAppResource` component (new `./mcp-apps` subpath) that renders a `UIResourcePart` via `@mcp-ui/client`'s `AppRenderer` (optional peer dependency), wired to the bridge. Plus a `useMcpAppBridge` hook (main entry) that returns a stable `createMcpAppBridge` for a given `threadId`/`callEndpoint` while always calling the latest `sendMessage`/`onLink`. + + Persistence is intentionally out of scope (in-memory seams only); Solid/Vue/Svelte/Angular renderers are deferred (the renderer SDK is currently React-only). + +### Patch Changes + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai@0.38.0 + ## 0.9.15 ### Patch Changes diff --git a/packages/ai-preact/package.json b/packages/ai-preact/package.json index 8025b6ef0e..9936851baf 100644 --- a/packages/ai-preact/package.json +++ b/packages/ai-preact/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-preact", - "version": "0.9.15", + "version": "0.10.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 a63d0994bd..85358d8e27 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.12 + +### Patch Changes + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai-react@0.16.0 + ## 0.8.11 ### Patch Changes diff --git a/packages/ai-react-ui/package.json b/packages/ai-react-ui/package.json index 54f453d83e..c0b99b3831 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.11", + "version": "0.8.12", "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 edeba59672..271741cce8 100644 --- a/packages/ai-react/CHANGELOG.md +++ b/packages/ai-react/CHANGELOG.md @@ -1,5 +1,54 @@ # @tanstack/ai-react +## 0.16.0 + +### Minor Changes + +- [#810](https://github.com/TanStack/ai/pull/810) [`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40) - Add `AudioRecorder` (`@tanstack/ai-client`) and framework hooks for recording an + audio message in the browser: `useAudioRecorder` (React/Solid/Vue), + `createAudioRecorder` (Svelte), and `injectAudioRecorder` (Angular). The + recording exposes a ready-to-use audio content part (`.part`) for `sendMessage` + and base64 (`.base64`) for the generation hooks. Native recorder output + (webm/mp4), no transcoding, no new dependency. + + Each hook also returns a reactive `recording` field — the latest resolved + recording (`AudioRecording | null`), available without awaiting `stop()`. Pass + `onComplete: (recording) => T | Promise` to transform the output: `stop()` + then resolves to `T` and `recording` becomes `T | null`. Omitting `onComplete` + keeps the raw `AudioRecording`. + +- [#843](https://github.com/TanStack/ai/pull/843) [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb) - feat: MCP Apps support — render interactive `ui://` widgets served by MCP servers + + Adds support for the ratified [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) standard, letting MCP server tools return interactive UI widgets that render in the chat. + - **`@tanstack/ai`** — MCP tool results that link a `ui://` resource (via `_meta.ui.resourceUri`) now surface as a new `UIResourcePart` on the assistant `UIMessage` (carried as an AG-UI `CUSTOM` event). The widget never enters model input. The `ui://` resource is read eagerly during the run, fail-soft. + - **`@tanstack/ai-mcp`** — tool discovery now captures `serverId` + the UI resource link; `MCPClient` gains a public `callTool` and `getInfo()` (returns the client's transport descriptor); `MCPClients` gains `getServers()` (returns all pool entries' descriptors). New `@tanstack/ai-mcp/apps` subpath exports `createMcpAppCallHandler` — a server-side tool-call proxy for interactive widgets that takes the MCP client(s)/pool you already created (`clients: MCPClient | MCPClients | Array`), reads each client's transport descriptor via `MCPClient.getInfo()` / `MCPClients.getServers()` (pure config, no live socket required), and **reconnects per call** (stateless, serverless-safe by default, same-server allowlist). Also exports an in-memory `McpSessionStore` seam for stateful transports. + - **`@tanstack/ai-client`** — `createMcpAppBridge`, a framework-agnostic bridge routing widget tool-calls to the call handler, follow-up prompts into the chat, and blocking links unless a handler is supplied. + - **`@tanstack/ai-react` / `@tanstack/ai-preact`** — a `MCPAppResource` component (new `./mcp-apps` subpath) that renders a `UIResourcePart` via `@mcp-ui/client`'s `AppRenderer` (optional peer dependency), wired to the bridge. Plus a `useMcpAppBridge` hook (main entry) that returns a stable `createMcpAppBridge` for a given `threadId`/`callEndpoint` while always calling the latest `sendMessage`/`onLink`. + + Persistence is intentionally out of scope (in-memory seams only); Solid/Vue/Svelte/Angular renderers are deferred (the renderer SDK is currently React-only). + +### Patch Changes + +- [#856](https://github.com/TanStack/ai/pull/856) [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662) - Fix `onResult` transform type inference on the generation hooks across every + framework package — the base generation hook plus `generateImage`, + `generateAudio`, `generateSpeech`, `generateVideo`, `transcription`, and + `summarize` (React `use*`, Vue `use*`, Solid `use*`, Svelte `create*`, and + Angular `inject*`). + + The hooks declared the `onResult` transform via a single defaulted type + parameter inferred from an optional nested property, which TypeScript collapses + to its default — leaving the callback parameter typed `any` (a hard error under + `strict`) and never narrowing `result` to the transform's return type. The + hooks now infer the transform type from the `onResult` return position (a + covariant inference site that works for an optional nested property), so the + callback parameter is typed as the raw result and `result` narrows to the + transform's return type; omitting the transform keeps the raw result type. See + issue [#848](https://github.com/TanStack/ai/issues/848). + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai@0.38.0 + ## 0.15.15 ### Patch Changes diff --git a/packages/ai-react/package.json b/packages/ai-react/package.json index e40425b3c3..20beb92691 100644 --- a/packages/ai-react/package.json +++ b/packages/ai-react/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-react", - "version": "0.15.15", + "version": "0.16.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-solid-ui/CHANGELOG.md b/packages/ai-solid-ui/CHANGELOG.md index 505ac6c78a..380f9e52a5 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.11 + +### Patch Changes + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai-solid@0.14.0 + ## 0.7.10 ### Patch Changes diff --git a/packages/ai-solid-ui/package.json b/packages/ai-solid-ui/package.json index 41b87c4dc7..efcc02a0b0 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.10", + "version": "0.7.11", "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 650699f36f..8588a9a966 100644 --- a/packages/ai-solid/CHANGELOG.md +++ b/packages/ai-solid/CHANGELOG.md @@ -1,5 +1,44 @@ # @tanstack/ai-solid +## 0.14.0 + +### Minor Changes + +- [#810](https://github.com/TanStack/ai/pull/810) [`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40) - Add `AudioRecorder` (`@tanstack/ai-client`) and framework hooks for recording an + audio message in the browser: `useAudioRecorder` (React/Solid/Vue), + `createAudioRecorder` (Svelte), and `injectAudioRecorder` (Angular). The + recording exposes a ready-to-use audio content part (`.part`) for `sendMessage` + and base64 (`.base64`) for the generation hooks. Native recorder output + (webm/mp4), no transcoding, no new dependency. + + Each hook also returns a reactive `recording` field — the latest resolved + recording (`AudioRecording | null`), available without awaiting `stop()`. Pass + `onComplete: (recording) => T | Promise` to transform the output: `stop()` + then resolves to `T` and `recording` becomes `T | null`. Omitting `onComplete` + keeps the raw `AudioRecording`. + +### Patch Changes + +- [#856](https://github.com/TanStack/ai/pull/856) [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662) - Fix `onResult` transform type inference on the generation hooks across every + framework package — the base generation hook plus `generateImage`, + `generateAudio`, `generateSpeech`, `generateVideo`, `transcription`, and + `summarize` (React `use*`, Vue `use*`, Solid `use*`, Svelte `create*`, and + Angular `inject*`). + + The hooks declared the `onResult` transform via a single defaulted type + parameter inferred from an optional nested property, which TypeScript collapses + to its default — leaving the callback parameter typed `any` (a hard error under + `strict`) and never narrowing `result` to the transform's return type. The + hooks now infer the transform type from the `onResult` return position (a + covariant inference site that works for an optional nested property), so the + callback parameter is typed as the raw result and `result` narrows to the + transform's return type; omitting the transform keeps the raw result type. See + issue [#848](https://github.com/TanStack/ai/issues/848). + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai@0.38.0 + ## 0.13.15 ### Patch Changes diff --git a/packages/ai-solid/package.json b/packages/ai-solid/package.json index a50d7d61d6..8cfc2be342 100644 --- a/packages/ai-solid/package.json +++ b/packages/ai-solid/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-solid", - "version": "0.13.15", + "version": "0.14.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 7755c1bff5..f8b15cc014 100644 --- a/packages/ai-svelte/CHANGELOG.md +++ b/packages/ai-svelte/CHANGELOG.md @@ -1,5 +1,44 @@ # @tanstack/ai-svelte +## 0.14.0 + +### Minor Changes + +- [#810](https://github.com/TanStack/ai/pull/810) [`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40) - Add `AudioRecorder` (`@tanstack/ai-client`) and framework hooks for recording an + audio message in the browser: `useAudioRecorder` (React/Solid/Vue), + `createAudioRecorder` (Svelte), and `injectAudioRecorder` (Angular). The + recording exposes a ready-to-use audio content part (`.part`) for `sendMessage` + and base64 (`.base64`) for the generation hooks. Native recorder output + (webm/mp4), no transcoding, no new dependency. + + Each hook also returns a reactive `recording` field — the latest resolved + recording (`AudioRecording | null`), available without awaiting `stop()`. Pass + `onComplete: (recording) => T | Promise` to transform the output: `stop()` + then resolves to `T` and `recording` becomes `T | null`. Omitting `onComplete` + keeps the raw `AudioRecording`. + +### Patch Changes + +- [#856](https://github.com/TanStack/ai/pull/856) [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662) - Fix `onResult` transform type inference on the generation hooks across every + framework package — the base generation hook plus `generateImage`, + `generateAudio`, `generateSpeech`, `generateVideo`, `transcription`, and + `summarize` (React `use*`, Vue `use*`, Solid `use*`, Svelte `create*`, and + Angular `inject*`). + + The hooks declared the `onResult` transform via a single defaulted type + parameter inferred from an optional nested property, which TypeScript collapses + to its default — leaving the callback parameter typed `any` (a hard error under + `strict`) and never narrowing `result` to the transform's return type. The + hooks now infer the transform type from the `onResult` return position (a + covariant inference site that works for an optional nested property), so the + callback parameter is typed as the raw result and `result` narrows to the + transform's return type; omitting the transform keeps the raw result type. See + issue [#848](https://github.com/TanStack/ai/issues/848). + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai@0.38.0 + ## 0.13.15 ### Patch Changes diff --git a/packages/ai-svelte/package.json b/packages/ai-svelte/package.json index 68655ef206..ff0329690d 100644 --- a/packages/ai-svelte/package.json +++ b/packages/ai-svelte/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-svelte", - "version": "0.13.15", + "version": "0.14.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 bfeacbc4b2..42113bdfc4 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.28 + +### Patch Changes + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662)]: + - @tanstack/ai-vue@0.14.0 + ## 0.2.27 ### Patch Changes diff --git a/packages/ai-vue-ui/package.json b/packages/ai-vue-ui/package.json index 0cf3c27ba0..9762fce2a0 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.27", + "version": "0.2.28", "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 4198a3f16d..9d9a0f2cc1 100644 --- a/packages/ai-vue/CHANGELOG.md +++ b/packages/ai-vue/CHANGELOG.md @@ -1,5 +1,44 @@ # @tanstack/ai-vue +## 0.14.0 + +### Minor Changes + +- [#810](https://github.com/TanStack/ai/pull/810) [`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40) - Add `AudioRecorder` (`@tanstack/ai-client`) and framework hooks for recording an + audio message in the browser: `useAudioRecorder` (React/Solid/Vue), + `createAudioRecorder` (Svelte), and `injectAudioRecorder` (Angular). The + recording exposes a ready-to-use audio content part (`.part`) for `sendMessage` + and base64 (`.base64`) for the generation hooks. Native recorder output + (webm/mp4), no transcoding, no new dependency. + + Each hook also returns a reactive `recording` field — the latest resolved + recording (`AudioRecording | null`), available without awaiting `stop()`. Pass + `onComplete: (recording) => T | Promise` to transform the output: `stop()` + then resolves to `T` and `recording` becomes `T | null`. Omitting `onComplete` + keeps the raw `AudioRecording`. + +### Patch Changes + +- [#856](https://github.com/TanStack/ai/pull/856) [`c22c663`](https://github.com/TanStack/ai/commit/c22c6632fdca761033cb9c4273bf61fc8ce86662) - Fix `onResult` transform type inference on the generation hooks across every + framework package — the base generation hook plus `generateImage`, + `generateAudio`, `generateSpeech`, `generateVideo`, `transcription`, and + `summarize` (React `use*`, Vue `use*`, Solid `use*`, Svelte `create*`, and + Angular `inject*`). + + The hooks declared the `onResult` transform via a single defaulted type + parameter inferred from an optional nested property, which TypeScript collapses + to its default — leaving the callback parameter typed `any` (a hard error under + `strict`) and never narrowing `result` to the transform's return type. The + hooks now infer the transform type from the `onResult` return position (a + covariant inference site that works for an optional nested property), so the + callback parameter is typed as the raw result and `result` narrows to the + transform's return type; omitting the transform keeps the raw result type. See + issue [#848](https://github.com/TanStack/ai/issues/848). + +- Updated dependencies [[`33acdd4`](https://github.com/TanStack/ai/commit/33acdd4df4aef13d594700d9b52087252091bd40), [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai-client@0.19.0 + - @tanstack/ai@0.38.0 + ## 0.13.15 ### Patch Changes diff --git a/packages/ai-vue/package.json b/packages/ai-vue/package.json index 85f3f7f02c..f5f9f6224a 100644 --- a/packages/ai-vue/package.json +++ b/packages/ai-vue/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-vue", - "version": "0.13.15", + "version": "0.14.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 858905f6da..105f802c88 100644 --- a/packages/ai/CHANGELOG.md +++ b/packages/ai/CHANGELOG.md @@ -1,5 +1,19 @@ # @tanstack/ai +## 0.38.0 + +### Minor Changes + +- [#843](https://github.com/TanStack/ai/pull/843) [`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb) - feat: MCP Apps support — render interactive `ui://` widgets served by MCP servers + + Adds support for the ratified [MCP Apps](https://modelcontextprotocol.io/extensions/apps/overview) standard, letting MCP server tools return interactive UI widgets that render in the chat. + - **`@tanstack/ai`** — MCP tool results that link a `ui://` resource (via `_meta.ui.resourceUri`) now surface as a new `UIResourcePart` on the assistant `UIMessage` (carried as an AG-UI `CUSTOM` event). The widget never enters model input. The `ui://` resource is read eagerly during the run, fail-soft. + - **`@tanstack/ai-mcp`** — tool discovery now captures `serverId` + the UI resource link; `MCPClient` gains a public `callTool` and `getInfo()` (returns the client's transport descriptor); `MCPClients` gains `getServers()` (returns all pool entries' descriptors). New `@tanstack/ai-mcp/apps` subpath exports `createMcpAppCallHandler` — a server-side tool-call proxy for interactive widgets that takes the MCP client(s)/pool you already created (`clients: MCPClient | MCPClients | Array`), reads each client's transport descriptor via `MCPClient.getInfo()` / `MCPClients.getServers()` (pure config, no live socket required), and **reconnects per call** (stateless, serverless-safe by default, same-server allowlist). Also exports an in-memory `McpSessionStore` seam for stateful transports. + - **`@tanstack/ai-client`** — `createMcpAppBridge`, a framework-agnostic bridge routing widget tool-calls to the call handler, follow-up prompts into the chat, and blocking links unless a handler is supplied. + - **`@tanstack/ai-react` / `@tanstack/ai-preact`** — a `MCPAppResource` component (new `./mcp-apps` subpath) that renders a `UIResourcePart` via `@mcp-ui/client`'s `AppRenderer` (optional peer dependency), wired to the bridge. Plus a `useMcpAppBridge` hook (main entry) that returns a stable `createMcpAppBridge` for a given `threadId`/`callEndpoint` while always calling the latest `sendMessage`/`onLink`. + + Persistence is intentionally out of scope (in-memory seams only); Solid/Vue/Svelte/Angular renderers are deferred (the renderer SDK is currently React-only). + ## 0.37.0 ### Minor Changes diff --git a/packages/ai/package.json b/packages/ai/package.json index 034db0aae1..b9fc37dcd9 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai", - "version": "0.37.0", + "version": "0.38.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 3408587ce5..d3ee9d1020 100644 --- a/packages/openai-base/CHANGELOG.md +++ b/packages/openai-base/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/openai-base +## 0.9.5 + +### Patch Changes + +- Updated dependencies [[`c1a8732`](https://github.com/TanStack/ai/commit/c1a87327b4a3463d37158f32ca90184b5fd092bb)]: + - @tanstack/ai@0.38.0 + ## 0.9.4 ### Patch Changes diff --git a/packages/openai-base/package.json b/packages/openai-base/package.json index e5087e8867..ecfcd44ab8 100644 --- a/packages/openai-base/package.json +++ b/packages/openai-base/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/openai-base", - "version": "0.9.4", + "version": "0.9.5", "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 9d1d1da375..8e4eac5504 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.62 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.19 + ## 0.1.61 ### Patch Changes diff --git a/packages/preact-ai-devtools/package.json b/packages/preact-ai-devtools/package.json index 0d442e98cc..3971628215 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.61", + "version": "0.1.62", "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 c0d29ccc91..d728c80194 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.62 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.19 + ## 0.2.61 ### Patch Changes diff --git a/packages/react-ai-devtools/package.json b/packages/react-ai-devtools/package.json index 3a3cca883e..fa10fb9666 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.61", + "version": "0.2.62", "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 70a0c63db2..d599e6a06e 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.62 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.19 + ## 0.2.61 ### Patch Changes diff --git a/packages/solid-ai-devtools/package.json b/packages/solid-ai-devtools/package.json index 36cb5bef17..2c5629af12 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.61", + "version": "0.2.62", "description": "Solid Devtools plugin for inspecting TanStack AI chat messages, tool calls, streams, and errors.", "author": "Tanner Linsley", "license": "MIT",