From 3213a2a82d928ff4b74def9d948c2094dbbc72d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 11:27:47 +0000 Subject: [PATCH] ci: Version Packages --- .changeset/fix-dangling-dts-barrel-imports.md | 14 --- .changeset/gemini-client-config-dts-import.md | 5 -- .changeset/gemini-image-url-passthrough.md | 5 -- .changeset/gemini-omni-flash-video.md | 5 -- ...emini-openai-url-input-error-by-default.md | 18 ---- .changeset/huge-lizards-admire.md | 8 -- .changeset/sandbox-file-diff-observability.md | 12 --- .changeset/tender-otters-tease.md | 20 ----- .changeset/tool-call-approval-gating.md | 55 ------------ .changeset/tool-call-part-parsed-input.md | 19 ---- .changeset/usechat-const-tools-inference.md | 18 ---- .../video-adapter-duration-constraint.md | 5 -- packages/ai-acp/CHANGELOG.md | 8 ++ packages/ai-acp/package.json | 2 +- packages/ai-angular/CHANGELOG.md | 17 ++++ packages/ai-angular/package.json | 2 +- packages/ai-anthropic/CHANGELOG.md | 17 ++++ packages/ai-anthropic/package.json | 2 +- packages/ai-bedrock/CHANGELOG.md | 18 ++++ packages/ai-bedrock/package.json | 2 +- packages/ai-claude-code/CHANGELOG.md | 8 ++ packages/ai-claude-code/package.json | 2 +- packages/ai-client/CHANGELOG.md | 62 +++++++++++++ packages/ai-client/package.json | 2 +- packages/ai-code-mode-skills/CHANGELOG.md | 8 ++ packages/ai-code-mode-skills/package.json | 2 +- packages/ai-code-mode/CHANGELOG.md | 7 ++ packages/ai-code-mode/package.json | 2 +- packages/ai-codex/CHANGELOG.md | 8 ++ packages/ai-codex/package.json | 2 +- packages/ai-devtools/CHANGELOG.md | 7 ++ packages/ai-devtools/package.json | 2 +- packages/ai-elevenlabs/CHANGELOG.md | 7 ++ packages/ai-elevenlabs/package.json | 2 +- packages/ai-fal/CHANGELOG.md | 17 ++++ packages/ai-fal/package.json | 2 +- packages/ai-gemini/CHANGELOG.md | 41 +++++++++ packages/ai-gemini/package.json | 2 +- packages/ai-grok-build/CHANGELOG.md | 9 ++ packages/ai-grok-build/package.json | 2 +- packages/ai-grok/CHANGELOG.md | 18 ++++ packages/ai-grok/package.json | 2 +- packages/ai-groq/CHANGELOG.md | 18 ++++ packages/ai-groq/package.json | 2 +- packages/ai-isolate-cloudflare/CHANGELOG.md | 7 ++ packages/ai-isolate-cloudflare/package.json | 2 +- packages/ai-isolate-node/CHANGELOG.md | 7 ++ packages/ai-isolate-node/package.json | 2 +- packages/ai-isolate-quickjs/CHANGELOG.md | 7 ++ packages/ai-isolate-quickjs/package.json | 2 +- packages/ai-mcp/CHANGELOG.md | 7 ++ packages/ai-mcp/package.json | 2 +- packages/ai-mistral/CHANGELOG.md | 17 ++++ packages/ai-mistral/package.json | 2 +- packages/ai-ollama/CHANGELOG.md | 17 ++++ packages/ai-ollama/package.json | 2 +- packages/ai-openai/CHANGELOG.md | 24 +++++ packages/ai-openai/package.json | 2 +- packages/ai-opencode/CHANGELOG.md | 8 ++ packages/ai-opencode/package.json | 2 +- packages/ai-openrouter/CHANGELOG.md | 17 ++++ packages/ai-openrouter/package.json | 2 +- packages/ai-preact/CHANGELOG.md | 17 ++++ packages/ai-preact/package.json | 2 +- packages/ai-react-ui/CHANGELOG.md | 8 ++ packages/ai-react-ui/package.json | 2 +- packages/ai-react/CHANGELOG.md | 21 +++++ packages/ai-react/package.json | 2 +- packages/ai-sandbox-cloudflare/CHANGELOG.md | 9 ++ packages/ai-sandbox-cloudflare/package.json | 2 +- packages/ai-sandbox/CHANGELOG.md | 15 ++++ packages/ai-sandbox/package.json | 2 +- packages/ai-solid-ui/CHANGELOG.md | 8 ++ packages/ai-solid-ui/package.json | 2 +- packages/ai-solid/CHANGELOG.md | 17 ++++ packages/ai-solid/package.json | 2 +- packages/ai-svelte/CHANGELOG.md | 17 ++++ packages/ai-svelte/package.json | 2 +- packages/ai-vue-ui/CHANGELOG.md | 7 ++ packages/ai-vue-ui/package.json | 2 +- packages/ai-vue/CHANGELOG.md | 17 ++++ packages/ai-vue/package.json | 2 +- packages/ai/CHANGELOG.md | 87 +++++++++++++++++++ packages/ai/package.json | 2 +- packages/openai-base/CHANGELOG.md | 7 ++ packages/openai-base/package.json | 2 +- packages/preact-ai-devtools/CHANGELOG.md | 7 ++ packages/preact-ai-devtools/package.json | 2 +- packages/react-ai-devtools/CHANGELOG.md | 7 ++ packages/react-ai-devtools/package.json | 2 +- packages/solid-ai-devtools/CHANGELOG.md | 7 ++ packages/solid-ai-devtools/package.json | 2 +- 92 files changed, 672 insertions(+), 224 deletions(-) delete mode 100644 .changeset/fix-dangling-dts-barrel-imports.md delete mode 100644 .changeset/gemini-client-config-dts-import.md delete mode 100644 .changeset/gemini-image-url-passthrough.md delete mode 100644 .changeset/gemini-omni-flash-video.md delete mode 100644 .changeset/gemini-openai-url-input-error-by-default.md delete mode 100644 .changeset/huge-lizards-admire.md delete mode 100644 .changeset/sandbox-file-diff-observability.md delete mode 100644 .changeset/tender-otters-tease.md delete mode 100644 .changeset/tool-call-approval-gating.md delete mode 100644 .changeset/tool-call-part-parsed-input.md delete mode 100644 .changeset/usechat-const-tools-inference.md delete mode 100644 .changeset/video-adapter-duration-constraint.md diff --git a/.changeset/fix-dangling-dts-barrel-imports.md b/.changeset/fix-dangling-dts-barrel-imports.md deleted file mode 100644 index 02c953e92..000000000 --- a/.changeset/fix-dangling-dts-barrel-imports.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@tanstack/ai': patch -'@tanstack/ai-anthropic': patch -'@tanstack/ai-bedrock': patch -'@tanstack/ai-fal': patch -'@tanstack/ai-gemini': patch -'@tanstack/ai-grok': patch -'@tanstack/ai-groq': patch -'@tanstack/ai-mistral': patch -'@tanstack/ai-ollama': patch -'@tanstack/ai-openrouter': patch ---- - -fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. diff --git a/.changeset/gemini-client-config-dts-import.md b/.changeset/gemini-client-config-dts-import.md deleted file mode 100644 index b7429aee6..000000000 --- a/.changeset/gemini-client-config-dts-import.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-gemini': patch ---- - -fix(ai-gemini): fix `GeminiClientConfig` type import in the published adapter declarations. The emitted `.d.ts` files imported `GeminiClientConfig` from a non-existent `'../utils.js'` (the barrel builds to `utils/index.js`), so under `skipLibCheck` it silently resolved to `any` in consumers — masking client-config type-checking for every adapter and producing a spurious "`httpOptions` does not exist" error on `createGeminiVideo`. Adapters now import the type from the concrete `'../utils/client'` module so the declarations resolve to the real type. diff --git a/.changeset/gemini-image-url-passthrough.md b/.changeset/gemini-image-url-passthrough.md deleted file mode 100644 index 02a31c395..000000000 --- a/.changeset/gemini-image-url-passthrough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-gemini': patch ---- - -fix(ai-gemini): stop fetching arbitrary HTTPS image URLs in `createGeminiImage`. URL sources in multimodal image-generation prompts now pass through as `fileData.fileUri` (Gemini fetches them server-side), matching the chat adapter. This avoids fetch + base64 double-buffering that could OOM on memory-constrained runtimes such as Cloudflare Workers. diff --git a/.changeset/gemini-omni-flash-video.md b/.changeset/gemini-omni-flash-video.md deleted file mode 100644 index 74d04a3da..000000000 --- a/.changeset/gemini-omni-flash-video.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-gemini': minor ---- - -Add Gemini Omni Flash (`gemini-omni-flash-preview`) video generation via the Interactions API. Omni only serves the Interactions API (`generateContent` rejects it), so the video adapter now routes by model: Veo models keep the `:predictLongRunning` operations flow, while `geminiVideo('gemini-omni-flash-preview')` creates a background interaction with `response_modalities: ['video']`, polls it by id, and returns the inline base64 MP4 as a `data:` URL (Files-API URI delivery passes through). Usage is mapped from the interaction's `output_tokens_by_modality`. Image and video prompt parts are sent as interaction content blocks, and `modelOptions.previous_interaction_id` chains a new prompt onto a prior Omni generation for conversational video editing. The top-level `size` option maps onto `response_format.aspect_ratio` (`'16:9' | '9:16'`) and `duration` onto `response_format.duration` — any value in the 3–10 second range (fractional seconds included, verified against the live API), defaulting to a 10-second clip when omitted. Raises the `@google/genai` floor to `^2.10.0` for the Interactions API surface. diff --git a/.changeset/gemini-openai-url-input-error-by-default.md b/.changeset/gemini-openai-url-input-error-by-default.md deleted file mode 100644 index ee65c83da..000000000 --- a/.changeset/gemini-openai-url-input-error-by-default.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@tanstack/ai-gemini': minor -'@tanstack/ai-openai': minor ---- - -fix(ai-gemini, ai-openai): don't buffer arbitrary HTTP(S) URL image inputs by default on paths that require uploaded bytes. - -Gemini **Veo** (`createGeminiVideo`), OpenAI image **edits** (`createOpenaiImage`), and OpenAI **Sora** `input_reference` (`createOpenaiVideo`) have no URL passthrough — the provider only accepts inline bytes (or, for Veo, a `gs://` reference). Previously an HTTP(S) URL image input was silently fetched and buffered in memory, which can OOM memory-constrained runtimes (e.g. Cloudflare Workers). - -These paths now **throw** on an HTTP(S) URL image input by default, with an error pointing to the alternatives. `data:` URIs (and `gs://` for Veo) still work without any flag. To opt back into fetching + buffering, set `allowUrlFetch: true` on the adapter config: - -```ts -createOpenaiImage('gpt-image-1', apiKey, { allowUrlFetch: true }) -createOpenaiVideo('sora-2', 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/.changeset/huge-lizards-admire.md b/.changeset/huge-lizards-admire.md deleted file mode 100644 index 977c6dd68..000000000 --- a/.changeset/huge-lizards-admire.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@tanstack/ai-gemini': minor -'@tanstack/ai-client': minor -'@tanstack/ai-react': minor -'@tanstack/ai': minor ---- - -Added Gemini Realtime Adapter diff --git a/.changeset/sandbox-file-diff-observability.md b/.changeset/sandbox-file-diff-observability.md deleted file mode 100644 index 77b527dc7..000000000 --- a/.changeset/sandbox-file-diff-observability.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@tanstack/ai-sandbox': patch ---- - -Make sandbox file-diff correct and observable (follow-up to #892): - -- `diff()` now synthesizes an add-patch for any file git isn't tracking (a file the agent created **and every later edit to it**), keyed on tracked-ness at the baseline rather than on the event being a `create` — so agent-created files no longer stream empty diffs. A tracked file identical to the baseline still diffs empty, and a transient git-show probe failure no longer fabricates a bogus add-patch. -- The synthesized patch now matches `git diff`'s add-file shape (`diff --git` header, `new file mode`, repo-relative paths). -- **git-ignored files are withheld from the diff feed**: the file event still fires (you're notified it changed) but `diff()` returns `''`, so a secret like a `.env` never has its contents surfaced. -- The native `fs.watch` watcher re-seeds lazily if its initial workspace listing fails, so a pre-existing file is correctly reported as a `change` (not a `create`) on first edit. -- The exec-poll watcher no longer fabricates phantom `create`/`delete` storms: a failed poll (thrown exec, or non-zero exit with no output) preserves the previous snapshot, a failed initial poll seeds without diffing, and a partial (`find` permission-denied) poll is merged rather than diffed so transiently-unreadable files aren't reported as deleted. -- Every swallowed git/exec/fs failure — in the diff accessors, both watcher paths (exec-poll and native `fs.watch`), the git-baseline capture, and per-hook dispatch — is now logged (real anomalies under `errors`, expected-empty conditions under the `sandbox` debug category) instead of silently becoming empty data. diff --git a/.changeset/tender-otters-tease.md b/.changeset/tender-otters-tease.md deleted file mode 100644 index 8bdb96596..000000000 --- a/.changeset/tender-otters-tease.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'@tanstack/ai': patch -'@tanstack/ai-anthropic': patch -'@tanstack/ai-bedrock': patch -'@tanstack/ai-fal': patch -'@tanstack/ai-gemini': patch -'@tanstack/ai-grok': patch -'@tanstack/ai-groq': patch -'@tanstack/ai-mistral': patch -'@tanstack/ai-ollama': patch -'@tanstack/ai-openrouter': patch ---- - -fix: resolve dangling relative imports in published declaration files - -Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to -concrete module paths so emitted `.d.ts` specifiers resolve under -`bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. - -Fixes #920 diff --git a/.changeset/tool-call-approval-gating.md b/.changeset/tool-call-approval-gating.md deleted file mode 100644 index eb7bc47eb..000000000 --- a/.changeset/tool-call-approval-gating.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -'@tanstack/ai': minor -'@tanstack/ai-client': minor ---- - -Gate the tool-call part's `approval` field on the tool's `needsApproval` flag. -Previously `approval?` was declared on every typed tool-call part regardless of -whether the tool could ever request approval. Now the flag is captured as a -literal type (`toolDefinition({ needsApproval: true })` → `true`) and threaded -through `ClientTool` / `ToolDefinitionInstance` / `ToolDefinition`, and -`ToolCallPartForTool` only includes `approval` for tools defined with -`needsApproval: true`: - -```ts -const { messages } = useChat({ tools: [getGuitars, addToCart] }) // addToCart: needsApproval: true -for (const part of message.parts) { - if (part.type !== 'tool-call') continue - if (part.name === 'addToCart') part.approval?.id // ✅ typed - if (part.name === 'getGuitars') part.approval // ✅ compile error — no such field -} -``` - -## ⚠️ Breaking change (types only) - -**This is the primary migration surface for this release.** When you pass a typed -`tools` array to `useChat` / `createChat` / `injectChat`, reading `part.approval` -on a mixed tool-call union **without first narrowing by `part.name`** no longer -compiles. Code that previously did `part.approval?.id` in a generic handler over -all tool-call parts must be updated: - -```ts -// ❌ No longer compiles on a typed mixed union -part.approval?.id - -// ✅ Narrow to an approval-required tool first -if (part.name === 'deleteAccount') part.approval?.id - -// ✅ Or guard with `in` -if ('approval' in part) part.approval?.id - -// ✅ Or type the handler against the base (untyped) ToolCallPart -function handleApproval(part: ToolCallPart) { - return part.approval?.id -} -``` - -Untyped `useChat()` (no inferred `tools` generic) and the base `ToolCallPart` -type are unaffected: `approval` stays available on every tool-call part there. -**Runtime behavior is unchanged** — only TypeScript narrowing is stricter. - -Adds a `TNeedsApproval extends boolean` type parameter (defaulting to `false`) -to the client tool types; existing explicit type arguments keep working via the -default. Literal capture requires `toolDefinition({ needsApproval: true })` at -the call site — a dynamic `needsApproval: boolean` variable will not gate the -type. diff --git a/.changeset/tool-call-part-parsed-input.md b/.changeset/tool-call-part-parsed-input.md deleted file mode 100644 index 53b9a3fcf..000000000 --- a/.changeset/tool-call-part-parsed-input.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@tanstack/ai': minor ---- - -Populate the parsed `input` on tool-call message parts. `ToolCallPart` already -declared a typed `input?` field, but it was never written at runtime — only the -raw `arguments` string (and `output`) were set, so `part.input` was always -`undefined` and consumers had to fall back to `part.input ?? JSON.parse(part.arguments)`. - -`input` is now set from the parsed arguments once they are complete -(`state: 'input-complete'` and later, including `approval-requested`), in the -streaming processor, the `TOOL_CALL_END`-with-parsed-input path, and when -hydrating history via `modelMessagesToUIMessages`. While arguments are still -streaming, `input` stays `undefined` and the raw `arguments` string remains the -live source. A tool call that terminates in an error state may also keep `input` -unset. `arguments` is unchanged, always present, and not deprecated. - -With typed tools (`useChat({ tools })`), `part.input` is fully typed per tool -via the `part.name` discriminant — matching `part.output`. diff --git a/.changeset/usechat-const-tools-inference.md b/.changeset/usechat-const-tools-inference.md deleted file mode 100644 index fb205f67a..000000000 --- a/.changeset/usechat-const-tools-inference.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@tanstack/ai-angular': patch -'@tanstack/ai-preact': patch -'@tanstack/ai-react': patch -'@tanstack/ai-solid': patch -'@tanstack/ai-svelte': patch -'@tanstack/ai-vue': patch ---- - -Add the `const` modifier to the `TTools` type parameter of `useChat` -(`createChat` in Svelte, `injectChat` in Angular) so a plain inline `tools` array -now yields full type-safe message chunks. Previously the array widened to -`Array` and lost the literal tool `name`s that drive the -discriminated `tool-call` part union, so callers had to wrap their tools in -`clientTools(...)` (or add `as const`) to get narrowing. That wrapper is now -optional — `tools: [toolA, toolB]` narrows `part.name`, `part.input`, and -`part.output` on its own. `clientTools(...)` still works and remains useful -for defining a shared tuple outside the hook call. diff --git a/.changeset/video-adapter-duration-constraint.md b/.changeset/video-adapter-duration-constraint.md deleted file mode 100644 index 093e86715..000000000 --- a/.changeset/video-adapter-duration-constraint.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai': patch ---- - -Fix `generateVideo` / `getVideoJobStatus` rejecting video adapters that declare a narrowed per-model duration union (e.g. Gemini's `4 | 6 | 8` for Veo or `10` for Omni Flash) at the type level. The activity's `TAdapter extends VideoAdapter` constraints left the input-modality and duration generics at their defaults, so `duration?: number` failed contravariance against the adapter's literal union. All video-activity constraints and helper conditionals now span all six `VideoAdapter` generics. diff --git a/packages/ai-acp/CHANGELOG.md b/packages/ai-acp/CHANGELOG.md index 6109f8389..eb2081315 100644 --- a/packages/ai-acp/CHANGELOG.md +++ b/packages/ai-acp/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-acp +## 0.2.2 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`1deaa29`](https://github.com/TanStack/ai/commit/1deaa299b560ad1599b9d96cda1d7b7415f9fc4a), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-sandbox@0.2.3 + ## 0.2.1 ### Patch Changes diff --git a/packages/ai-acp/package.json b/packages/ai-acp/package.json index 28ba9cb54..0930596f2 100644 --- a/packages/ai-acp/package.json +++ b/packages/ai-acp/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-acp", - "version": "0.2.1", + "version": "0.2.2", "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 5365ba9c5..8a7ba1409 100644 --- a/packages/ai-angular/CHANGELOG.md +++ b/packages/ai-angular/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-angular +## 0.2.4 + +### Patch Changes + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Add the `const` modifier to the `TTools` type parameter of `useChat` + (`createChat` in Svelte, `injectChat` in Angular) so a plain inline `tools` array + now yields full type-safe message chunks. Previously the array widened to + `Array` and lost the literal tool `name`s that drive the + discriminated `tool-call` part union, so callers had to wrap their tools in + `clientTools(...)` (or add `as const`) to get narrowing. That wrapper is now + optional — `tools: [toolA, toolB]` narrows `part.name`, `part.input`, and + `part.output` on its own. `clientTools(...)` still works and remains useful + for defining a shared tuple outside the hook call. +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-client@0.21.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-angular/package.json b/packages/ai-angular/package.json index b46f85212..dd711f781 100644 --- a/packages/ai-angular/package.json +++ b/packages/ai-angular/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-angular", - "version": "0.2.3", + "version": "0.2.4", "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 cf9d42f98..6a16e82a2 100644 --- a/packages/ai-anthropic/CHANGELOG.md +++ b/packages/ai-anthropic/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-anthropic +## 0.16.2 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.16.1 ### Patch Changes diff --git a/packages/ai-anthropic/package.json b/packages/ai-anthropic/package.json index d1367d22f..e8b11bf7b 100644 --- a/packages/ai-anthropic/package.json +++ b/packages/ai-anthropic/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-anthropic", - "version": "0.16.1", + "version": "0.16.2", "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 2e7970988..0a1945156 100644 --- a/packages/ai-bedrock/CHANGELOG.md +++ b/packages/ai-bedrock/CHANGELOG.md @@ -1,5 +1,23 @@ # @tanstack/ai-bedrock +## 0.1.3 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/openai-base@0.9.8 + ## 0.1.2 ### Patch Changes diff --git a/packages/ai-bedrock/package.json b/packages/ai-bedrock/package.json index df0b7a938..4b56ba96b 100644 --- a/packages/ai-bedrock/package.json +++ b/packages/ai-bedrock/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-bedrock", - "version": "0.1.2", + "version": "0.1.3", "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 a49cbd48d..551774feb 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.2 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`1deaa29`](https://github.com/TanStack/ai/commit/1deaa299b560ad1599b9d96cda1d7b7415f9fc4a), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-sandbox@0.2.3 + ## 0.2.1 ### Patch Changes diff --git a/packages/ai-claude-code/package.json b/packages/ai-claude-code/package.json index e488c1911..0c5301f9c 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.1", + "version": "0.2.2", "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 dd24968ef..cf5c7eccb 100644 --- a/packages/ai-client/CHANGELOG.md +++ b/packages/ai-client/CHANGELOG.md @@ -1,5 +1,67 @@ # @tanstack/ai-client +## 0.21.0 + +### Minor Changes + +- [#405](https://github.com/TanStack/ai/pull/405) [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1) - Added Gemini Realtime Adapter + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Gate the tool-call part's `approval` field on the tool's `needsApproval` flag. + Previously `approval?` was declared on every typed tool-call part regardless of + whether the tool could ever request approval. Now the flag is captured as a + literal type (`toolDefinition({ needsApproval: true })` → `true`) and threaded + through `ClientTool` / `ToolDefinitionInstance` / `ToolDefinition`, and + `ToolCallPartForTool` only includes `approval` for tools defined with + `needsApproval: true`: + + ```ts + const { messages } = useChat({ tools: [getGuitars, addToCart] }) // addToCart: needsApproval: true + for (const part of message.parts) { + if (part.type !== 'tool-call') continue + if (part.name === 'addToCart') part.approval?.id // ✅ typed + if (part.name === 'getGuitars') part.approval // ✅ compile error — no such field + } + ``` + + ## ⚠️ Breaking change (types only) + + **This is the primary migration surface for this release.** When you pass a typed + `tools` array to `useChat` / `createChat` / `injectChat`, reading `part.approval` + on a mixed tool-call union **without first narrowing by `part.name`** no longer + compiles. Code that previously did `part.approval?.id` in a generic handler over + all tool-call parts must be updated: + + ```ts + // ❌ No longer compiles on a typed mixed union + part.approval?.id + + // ✅ Narrow to an approval-required tool first + if (part.name === 'deleteAccount') part.approval?.id + + // ✅ Or guard with `in` + if ('approval' in part) part.approval?.id + + // ✅ Or type the handler against the base (untyped) ToolCallPart + function handleApproval(part: ToolCallPart) { + return part.approval?.id + } + ``` + + Untyped `useChat()` (no inferred `tools` generic) and the base `ToolCallPart` + type are unaffected: `approval` stays available on every tool-call part there. + **Runtime behavior is unchanged** — only TypeScript narrowing is stricter. + + Adds a `TNeedsApproval extends boolean` type parameter (defaulting to `false`) + to the client tool types; existing explicit type arguments keep working via the + default. Literal capture requires `toolDefinition({ needsApproval: true })` at + the call site — a dynamic `needsApproval: boolean` variable will not gate the + type. + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.20.0 ### Minor Changes diff --git a/packages/ai-client/package.json b/packages/ai-client/package.json index 37dfbd1b2..a7ec2c016 100644 --- a/packages/ai-client/package.json +++ b/packages/ai-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-client", - "version": "0.20.0", + "version": "0.21.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 5ab8c07f6..084534cdb 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.10 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-code-mode@0.3.7 + ## 0.3.9 ### Patch Changes diff --git a/packages/ai-code-mode-skills/package.json b/packages/ai-code-mode-skills/package.json index 8485acb3b..b6269c9ae 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.9", + "version": "0.3.10", "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 16e4312f4..4a18de703 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.7 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.3.6 ### Patch Changes diff --git a/packages/ai-code-mode/package.json b/packages/ai-code-mode/package.json index 78806347c..ffd51e502 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.6", + "version": "0.3.7", "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 ce3b00d06..0e59a7b1b 100644 --- a/packages/ai-codex/CHANGELOG.md +++ b/packages/ai-codex/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-codex +## 0.2.2 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`1deaa29`](https://github.com/TanStack/ai/commit/1deaa299b560ad1599b9d96cda1d7b7415f9fc4a), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-sandbox@0.2.3 + ## 0.2.1 ### Patch Changes diff --git a/packages/ai-codex/package.json b/packages/ai-codex/package.json index 89e61ad11..16245e77f 100644 --- a/packages/ai-codex/package.json +++ b/packages/ai-codex/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-codex", - "version": "0.2.1", + "version": "0.2.2", "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 7dd41bfb8..cd52ad3e5 100644 --- a/packages/ai-devtools/CHANGELOG.md +++ b/packages/ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-devtools-core +## 0.4.23 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.4.22 ### Patch Changes diff --git a/packages/ai-devtools/package.json b/packages/ai-devtools/package.json index b74377d04..23ed8212b 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.22", + "version": "0.4.23", "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 55313575d..d8ea2325e 100644 --- a/packages/ai-elevenlabs/CHANGELOG.md +++ b/packages/ai-elevenlabs/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-elevenlabs +## 0.2.33 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.2.32 ### Patch Changes diff --git a/packages/ai-elevenlabs/package.json b/packages/ai-elevenlabs/package.json index d7611a60e..58fa4a95f 100644 --- a/packages/ai-elevenlabs/package.json +++ b/packages/ai-elevenlabs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-elevenlabs", - "version": "0.2.32", + "version": "0.2.33", "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 a0d57a230..df901254a 100644 --- a/packages/ai-fal/CHANGELOG.md +++ b/packages/ai-fal/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-fal +## 0.9.11 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.9.10 ### Patch Changes diff --git a/packages/ai-fal/package.json b/packages/ai-fal/package.json index e02f0e0a6..3e8e9d714 100644 --- a/packages/ai-fal/package.json +++ b/packages/ai-fal/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-fal", - "version": "0.9.10", + "version": "0.9.11", "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 a4545adce..94abef6a3 100644 --- a/packages/ai-gemini/CHANGELOG.md +++ b/packages/ai-gemini/CHANGELOG.md @@ -1,5 +1,46 @@ # @tanstack/ai-gemini +## 0.20.0 + +### Minor Changes + +- [#886](https://github.com/TanStack/ai/pull/886) [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4) - Add Gemini Omni Flash (`gemini-omni-flash-preview`) video generation via the Interactions API. Omni only serves the Interactions API (`generateContent` rejects it), so the video adapter now routes by model: Veo models keep the `:predictLongRunning` operations flow, while `geminiVideo('gemini-omni-flash-preview')` creates a background interaction with `response_modalities: ['video']`, polls it by id, and returns the inline base64 MP4 as a `data:` URL (Files-API URI delivery passes through). Usage is mapped from the interaction's `output_tokens_by_modality`. Image and video prompt parts are sent as interaction content blocks, and `modelOptions.previous_interaction_id` chains a new prompt onto a prior Omni generation for conversational video editing. The top-level `size` option maps onto `response_format.aspect_ratio` (`'16:9' | '9:16'`) and `duration` onto `response_format.duration` — any value in the 3–10 second range (fractional seconds included, verified against the live API), defaulting to a 10-second clip when omitted. Raises the `@google/genai` floor to `^2.10.0` for the Interactions API surface. + +- [#908](https://github.com/TanStack/ai/pull/908) [`dcc7407`](https://github.com/TanStack/ai/commit/dcc74077dc9f27ca3b88b0c349159728f7868fbe) - fix(ai-gemini, ai-openai): don't buffer arbitrary HTTP(S) URL image inputs by default on paths that require uploaded bytes. + + Gemini **Veo** (`createGeminiVideo`), OpenAI image **edits** (`createOpenaiImage`), and OpenAI **Sora** `input_reference` (`createOpenaiVideo`) have no URL passthrough — the provider only accepts inline bytes (or, for Veo, a `gs://` reference). Previously an HTTP(S) URL image input was silently fetched and buffered in memory, which can OOM memory-constrained runtimes (e.g. Cloudflare Workers). + + These paths now **throw** on an HTTP(S) URL image input by default, with an error pointing to the alternatives. `data:` URIs (and `gs://` for Veo) still work without any flag. To opt back into fetching + buffering, set `allowUrlFetch: true` on the adapter config: + + ```ts + createOpenaiImage('gpt-image-1', apiKey, { allowUrlFetch: true }) + createOpenaiVideo('sora-2', 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`. + +- [#405](https://github.com/TanStack/ai/pull/405) [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1) - Added Gemini Realtime Adapter + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#919](https://github.com/TanStack/ai/pull/919) [`d453647`](https://github.com/TanStack/ai/commit/d453647500e33a1412f84a2cc91d486a11265b9b) - fix(ai-gemini): fix `GeminiClientConfig` type import in the published adapter declarations. The emitted `.d.ts` files imported `GeminiClientConfig` from a non-existent `'../utils.js'` (the barrel builds to `utils/index.js`), so under `skipLibCheck` it silently resolved to `any` in consumers — masking client-config type-checking for every adapter and producing a spurious "`httpOptions` does not exist" error on `createGeminiVideo`. Adapters now import the type from the concrete `'../utils/client'` module so the declarations resolve to the real type. + +- [#908](https://github.com/TanStack/ai/pull/908) [`dcc7407`](https://github.com/TanStack/ai/commit/dcc74077dc9f27ca3b88b0c349159728f7868fbe) - fix(ai-gemini): stop fetching arbitrary HTTPS image URLs in `createGeminiImage`. URL sources in multimodal image-generation prompts now pass through as `fileData.fileUri` (Gemini fetches them server-side), matching the chat adapter. This avoids fetch + base64 double-buffering that could OOM on memory-constrained runtimes such as Cloudflare Workers. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.19.1 ### Patch Changes diff --git a/packages/ai-gemini/package.json b/packages/ai-gemini/package.json index c2c3b0aa8..72539a6c7 100644 --- a/packages/ai-gemini/package.json +++ b/packages/ai-gemini/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-gemini", - "version": "0.19.1", + "version": "0.20.0", "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 dc8abcccc..e48a6fcb7 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.2 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`1deaa29`](https://github.com/TanStack/ai/commit/1deaa299b560ad1599b9d96cda1d7b7415f9fc4a), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-sandbox@0.2.3 + - @tanstack/ai-acp@0.2.2 + ## 0.2.1 ### Patch Changes diff --git a/packages/ai-grok-build/package.json b/packages/ai-grok-build/package.json index d319a8b29..c1583d00c 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.1", + "version": "0.2.2", "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 3f30d213c..4325c3c90 100644 --- a/packages/ai-grok/CHANGELOG.md +++ b/packages/ai-grok/CHANGELOG.md @@ -1,5 +1,23 @@ # @tanstack/ai-grok +## 0.14.8 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/openai-base@0.9.8 + ## 0.14.7 ### Patch Changes diff --git a/packages/ai-grok/package.json b/packages/ai-grok/package.json index 0fdec1ef3..f8739b8f1 100644 --- a/packages/ai-grok/package.json +++ b/packages/ai-grok/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-grok", - "version": "0.14.7", + "version": "0.14.8", "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 0e2f28d76..70c8c0505 100644 --- a/packages/ai-groq/CHANGELOG.md +++ b/packages/ai-groq/CHANGELOG.md @@ -1,5 +1,23 @@ # @tanstack/ai-groq +## 0.5.2 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/openai-base@0.9.8 + ## 0.5.1 ### Patch Changes diff --git a/packages/ai-groq/package.json b/packages/ai-groq/package.json index f97223856..2d0b20317 100644 --- a/packages/ai-groq/package.json +++ b/packages/ai-groq/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-groq", - "version": "0.5.1", + "version": "0.5.2", "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 f0dd1989c..ff77789e4 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.37 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.7 + ## 0.2.36 ### Patch Changes diff --git a/packages/ai-isolate-cloudflare/package.json b/packages/ai-isolate-cloudflare/package.json index de851aa1f..c05daf7e1 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.36", + "version": "0.2.37", "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 9dfe4ae82..430304abe 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.46 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.7 + ## 0.1.45 ### Patch Changes diff --git a/packages/ai-isolate-node/package.json b/packages/ai-isolate-node/package.json index 9fe15dad8..060e91d6d 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.45", + "version": "0.1.46", "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 73736493d..f26d22be5 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.46 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.3.7 + ## 0.1.45 ### Patch Changes diff --git a/packages/ai-isolate-quickjs/package.json b/packages/ai-isolate-quickjs/package.json index 02d1e223d..2b59ee59b 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.45", + "version": "0.1.46", "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 15d50a540..fd638efb8 100644 --- a/packages/ai-mcp/CHANGELOG.md +++ b/packages/ai-mcp/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-mcp +## 0.2.4 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/ai-mcp/package.json b/packages/ai-mcp/package.json index 980829473..1a88c8a63 100644 --- a/packages/ai-mcp/package.json +++ b/packages/ai-mcp/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-mcp", - "version": "0.2.3", + "version": "0.2.4", "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 89a7661fa..9fe312320 100644 --- a/packages/ai-mistral/CHANGELOG.md +++ b/packages/ai-mistral/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-mistral +## 0.2.2 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.2.1 ### Patch Changes diff --git a/packages/ai-mistral/package.json b/packages/ai-mistral/package.json index 4d47ae495..9689e87ca 100644 --- a/packages/ai-mistral/package.json +++ b/packages/ai-mistral/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-mistral", - "version": "0.2.1", + "version": "0.2.2", "type": "module", "description": "Mistral adapter for TanStack AI", "author": "", diff --git a/packages/ai-ollama/CHANGELOG.md b/packages/ai-ollama/CHANGELOG.md index 16ada3ba8..273b478f4 100644 --- a/packages/ai-ollama/CHANGELOG.md +++ b/packages/ai-ollama/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-ollama +## 0.8.15 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.8.14 ### Patch Changes diff --git a/packages/ai-ollama/package.json b/packages/ai-ollama/package.json index 0bf06677b..e39ae2f75 100644 --- a/packages/ai-ollama/package.json +++ b/packages/ai-ollama/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-ollama", - "version": "0.8.14", + "version": "0.8.15", "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 607c0a1b1..722bae7f7 100644 --- a/packages/ai-openai/CHANGELOG.md +++ b/packages/ai-openai/CHANGELOG.md @@ -1,5 +1,29 @@ # @tanstack/ai-openai +## 0.17.0 + +### Minor Changes + +- [#908](https://github.com/TanStack/ai/pull/908) [`dcc7407`](https://github.com/TanStack/ai/commit/dcc74077dc9f27ca3b88b0c349159728f7868fbe) - fix(ai-gemini, ai-openai): don't buffer arbitrary HTTP(S) URL image inputs by default on paths that require uploaded bytes. + + Gemini **Veo** (`createGeminiVideo`), OpenAI image **edits** (`createOpenaiImage`), and OpenAI **Sora** `input_reference` (`createOpenaiVideo`) have no URL passthrough — the provider only accepts inline bytes (or, for Veo, a `gs://` reference). Previously an HTTP(S) URL image input was silently fetched and buffered in memory, which can OOM memory-constrained runtimes (e.g. Cloudflare Workers). + + These paths now **throw** on an HTTP(S) URL image input by default, with an error pointing to the alternatives. `data:` URIs (and `gs://` for Veo) still work without any flag. To opt back into fetching + buffering, set `allowUrlFetch: true` on the adapter config: + + ```ts + createOpenaiImage('gpt-image-1', apiKey, { allowUrlFetch: true }) + createOpenaiVideo('sora-2', 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`. + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/openai-base@0.9.8 + ## 0.16.0 ### Minor Changes diff --git a/packages/ai-openai/package.json b/packages/ai-openai/package.json index 99d4677d1..0ff74e45f 100644 --- a/packages/ai-openai/package.json +++ b/packages/ai-openai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openai", - "version": "0.16.0", + "version": "0.17.0", "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 f66b4c9da..58d4fb1f7 100644 --- a/packages/ai-opencode/CHANGELOG.md +++ b/packages/ai-opencode/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-opencode +## 0.2.2 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`1deaa29`](https://github.com/TanStack/ai/commit/1deaa299b560ad1599b9d96cda1d7b7415f9fc4a), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-sandbox@0.2.3 + ## 0.2.1 ### Patch Changes diff --git a/packages/ai-opencode/package.json b/packages/ai-opencode/package.json index df715279c..ace1d345f 100644 --- a/packages/ai-opencode/package.json +++ b/packages/ai-opencode/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-opencode", - "version": "0.2.1", + "version": "0.2.2", "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 f8febd77d..d9a869bec 100644 --- a/packages/ai-openrouter/CHANGELOG.md +++ b/packages/ai-openrouter/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-openrouter +## 0.15.9 + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.15.8 ### Patch Changes diff --git a/packages/ai-openrouter/package.json b/packages/ai-openrouter/package.json index c113def7f..7f03cd9b5 100644 --- a/packages/ai-openrouter/package.json +++ b/packages/ai-openrouter/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openrouter", - "version": "0.15.8", + "version": "0.15.9", "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 d17f5a34b..498799552 100644 --- a/packages/ai-preact/CHANGELOG.md +++ b/packages/ai-preact/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-preact +## 0.10.4 + +### Patch Changes + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Add the `const` modifier to the `TTools` type parameter of `useChat` + (`createChat` in Svelte, `injectChat` in Angular) so a plain inline `tools` array + now yields full type-safe message chunks. Previously the array widened to + `Array` and lost the literal tool `name`s that drive the + discriminated `tool-call` part union, so callers had to wrap their tools in + `clientTools(...)` (or add `as const`) to get narrowing. That wrapper is now + optional — `tools: [toolA, toolB]` narrows `part.name`, `part.input`, and + `part.output` on its own. `clientTools(...)` still works and remains useful + for defining a shared tuple outside the hook call. +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-client@0.21.0 + ## 0.10.3 ### Patch Changes diff --git a/packages/ai-preact/package.json b/packages/ai-preact/package.json index c518efa3a..527a632e4 100644 --- a/packages/ai-preact/package.json +++ b/packages/ai-preact/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-preact", - "version": "0.10.3", + "version": "0.10.4", "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 c834a1f90..219bb74ad 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.14 + +### Patch Changes + +- Updated dependencies [[`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589)]: + - @tanstack/ai-client@0.21.0 + - @tanstack/ai-react@0.17.0 + ## 0.8.13 ### Patch Changes diff --git a/packages/ai-react-ui/package.json b/packages/ai-react-ui/package.json index 3ae610229..7a32dc516 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.13", + "version": "0.8.14", "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 b4dfce826..3380a95be 100644 --- a/packages/ai-react/CHANGELOG.md +++ b/packages/ai-react/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-react +## 0.17.0 + +### Minor Changes + +- [#405](https://github.com/TanStack/ai/pull/405) [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1) - Added Gemini Realtime Adapter + +### Patch Changes + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Add the `const` modifier to the `TTools` type parameter of `useChat` + (`createChat` in Svelte, `injectChat` in Angular) so a plain inline `tools` array + now yields full type-safe message chunks. Previously the array widened to + `Array` and lost the literal tool `name`s that drive the + discriminated `tool-call` part union, so callers had to wrap their tools in + `clientTools(...)` (or add `as const`) to get narrowing. That wrapper is now + optional — `tools: [toolA, toolB]` narrows `part.name`, `part.input`, and + `part.output` on its own. `clientTools(...)` still works and remains useful + for defining a shared tuple outside the hook call. +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-client@0.21.0 + ## 0.16.4 ### Patch Changes diff --git a/packages/ai-react/package.json b/packages/ai-react/package.json index a4ffca2b9..b0abc22f6 100644 --- a/packages/ai-react/package.json +++ b/packages/ai-react/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-react", - "version": "0.16.4", + "version": "0.17.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 d45d34629..2e0cf5e0c 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.3 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`1deaa29`](https://github.com/TanStack/ai/commit/1deaa299b560ad1599b9d96cda1d7b7415f9fc4a), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-sandbox@0.2.3 + - @tanstack/ai-sandbox-local-process@0.2.0 + ## 0.2.2 ### Patch Changes diff --git a/packages/ai-sandbox-cloudflare/package.json b/packages/ai-sandbox-cloudflare/package.json index 5b4603eeb..2ab5fa583 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.2", + "version": "0.2.3", "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 6398da628..3ee75415d 100644 --- a/packages/ai-sandbox/CHANGELOG.md +++ b/packages/ai-sandbox/CHANGELOG.md @@ -1,5 +1,20 @@ # @tanstack/ai-sandbox +## 0.2.3 + +### Patch Changes + +- [#917](https://github.com/TanStack/ai/pull/917) [`1deaa29`](https://github.com/TanStack/ai/commit/1deaa299b560ad1599b9d96cda1d7b7415f9fc4a) - Make sandbox file-diff correct and observable (follow-up to [#892](https://github.com/TanStack/ai/issues/892)): + - `diff()` now synthesizes an add-patch for any file git isn't tracking (a file the agent created **and every later edit to it**), keyed on tracked-ness at the baseline rather than on the event being a `create` — so agent-created files no longer stream empty diffs. A tracked file identical to the baseline still diffs empty, and a transient git-show probe failure no longer fabricates a bogus add-patch. + - The synthesized patch now matches `git diff`'s add-file shape (`diff --git` header, `new file mode`, repo-relative paths). + - **git-ignored files are withheld from the diff feed**: the file event still fires (you're notified it changed) but `diff()` returns `''`, so a secret like a `.env` never has its contents surfaced. + - The native `fs.watch` watcher re-seeds lazily if its initial workspace listing fails, so a pre-existing file is correctly reported as a `change` (not a `create`) on first edit. + - The exec-poll watcher no longer fabricates phantom `create`/`delete` storms: a failed poll (thrown exec, or non-zero exit with no output) preserves the previous snapshot, a failed initial poll seeds without diffing, and a partial (`find` permission-denied) poll is merged rather than diffed so transiently-unreadable files aren't reported as deleted. + - Every swallowed git/exec/fs failure — in the diff accessors, both watcher paths (exec-poll and native `fs.watch`), the git-baseline capture, and per-hook dispatch — is now logged (real anomalies under `errors`, expected-empty conditions under the `sandbox` debug category) instead of silently becoming empty data. + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.2.2 ### Patch Changes diff --git a/packages/ai-sandbox/package.json b/packages/ai-sandbox/package.json index ad9284c23..b0b36027a 100644 --- a/packages/ai-sandbox/package.json +++ b/packages/ai-sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox", - "version": "0.2.2", + "version": "0.2.3", "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 36bfc220a..1ca86fbc8 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.13 + +### Patch Changes + +- Updated dependencies [[`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589)]: + - @tanstack/ai-client@0.21.0 + - @tanstack/ai-solid@0.14.4 + ## 0.7.12 ### Patch Changes diff --git a/packages/ai-solid-ui/package.json b/packages/ai-solid-ui/package.json index f5f4d6905..aa3a173c5 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.12", + "version": "0.7.13", "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 60622d7f4..195827d1e 100644 --- a/packages/ai-solid/CHANGELOG.md +++ b/packages/ai-solid/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-solid +## 0.14.4 + +### Patch Changes + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Add the `const` modifier to the `TTools` type parameter of `useChat` + (`createChat` in Svelte, `injectChat` in Angular) so a plain inline `tools` array + now yields full type-safe message chunks. Previously the array widened to + `Array` and lost the literal tool `name`s that drive the + discriminated `tool-call` part union, so callers had to wrap their tools in + `clientTools(...)` (or add `as const`) to get narrowing. That wrapper is now + optional — `tools: [toolA, toolB]` narrows `part.name`, `part.input`, and + `part.output` on its own. `clientTools(...)` still works and remains useful + for defining a shared tuple outside the hook call. +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-client@0.21.0 + ## 0.14.3 ### Patch Changes diff --git a/packages/ai-solid/package.json b/packages/ai-solid/package.json index 3d83b1856..6a1baa1d8 100644 --- a/packages/ai-solid/package.json +++ b/packages/ai-solid/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-solid", - "version": "0.14.3", + "version": "0.14.4", "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 2748fa407..65b465094 100644 --- a/packages/ai-svelte/CHANGELOG.md +++ b/packages/ai-svelte/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-svelte +## 0.14.4 + +### Patch Changes + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Add the `const` modifier to the `TTools` type parameter of `useChat` + (`createChat` in Svelte, `injectChat` in Angular) so a plain inline `tools` array + now yields full type-safe message chunks. Previously the array widened to + `Array` and lost the literal tool `name`s that drive the + discriminated `tool-call` part union, so callers had to wrap their tools in + `clientTools(...)` (or add `as const`) to get narrowing. That wrapper is now + optional — `tools: [toolA, toolB]` narrows `part.name`, `part.input`, and + `part.output` on its own. `clientTools(...)` still works and remains useful + for defining a shared tuple outside the hook call. +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-client@0.21.0 + ## 0.14.3 ### Patch Changes diff --git a/packages/ai-svelte/package.json b/packages/ai-svelte/package.json index 808307237..a3cfe434f 100644 --- a/packages/ai-svelte/package.json +++ b/packages/ai-svelte/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-svelte", - "version": "0.14.3", + "version": "0.14.4", "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 4e92fcc9a..6a9c33c84 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.32 + +### Patch Changes + +- Updated dependencies [[`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589)]: + - @tanstack/ai-vue@0.14.4 + ## 0.2.31 ### Patch Changes diff --git a/packages/ai-vue-ui/package.json b/packages/ai-vue-ui/package.json index 840decc77..a7f748538 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.31", + "version": "0.2.32", "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 9b5f05ca2..6e2260769 100644 --- a/packages/ai-vue/CHANGELOG.md +++ b/packages/ai-vue/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-vue +## 0.14.4 + +### Patch Changes + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Add the `const` modifier to the `TTools` type parameter of `useChat` + (`createChat` in Svelte, `injectChat` in Angular) so a plain inline `tools` array + now yields full type-safe message chunks. Previously the array widened to + `Array` and lost the literal tool `name`s that drive the + discriminated `tool-call` part union, so callers had to wrap their tools in + `clientTools(...)` (or add `as const`) to get narrowing. That wrapper is now + optional — `tools: [toolA, toolB]` narrows `part.name`, `part.input`, and + `part.output` on its own. `clientTools(...)` still works and remains useful + for defining a shared tuple outside the hook call. +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + - @tanstack/ai-client@0.21.0 + ## 0.14.3 ### Patch Changes diff --git a/packages/ai-vue/package.json b/packages/ai-vue/package.json index 86add75f4..bbdb25d7a 100644 --- a/packages/ai-vue/package.json +++ b/packages/ai-vue/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-vue", - "version": "0.14.3", + "version": "0.14.4", "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 beacab69a..eba02e615 100644 --- a/packages/ai/CHANGELOG.md +++ b/packages/ai/CHANGELOG.md @@ -1,5 +1,92 @@ # @tanstack/ai +## 0.41.0 + +### Minor Changes + +- [#405](https://github.com/TanStack/ai/pull/405) [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1) - Added Gemini Realtime Adapter + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Gate the tool-call part's `approval` field on the tool's `needsApproval` flag. + Previously `approval?` was declared on every typed tool-call part regardless of + whether the tool could ever request approval. Now the flag is captured as a + literal type (`toolDefinition({ needsApproval: true })` → `true`) and threaded + through `ClientTool` / `ToolDefinitionInstance` / `ToolDefinition`, and + `ToolCallPartForTool` only includes `approval` for tools defined with + `needsApproval: true`: + + ```ts + const { messages } = useChat({ tools: [getGuitars, addToCart] }) // addToCart: needsApproval: true + for (const part of message.parts) { + if (part.type !== 'tool-call') continue + if (part.name === 'addToCart') part.approval?.id // ✅ typed + if (part.name === 'getGuitars') part.approval // ✅ compile error — no such field + } + ``` + + ## ⚠️ Breaking change (types only) + + **This is the primary migration surface for this release.** When you pass a typed + `tools` array to `useChat` / `createChat` / `injectChat`, reading `part.approval` + on a mixed tool-call union **without first narrowing by `part.name`** no longer + compiles. Code that previously did `part.approval?.id` in a generic handler over + all tool-call parts must be updated: + + ```ts + // ❌ No longer compiles on a typed mixed union + part.approval?.id + + // ✅ Narrow to an approval-required tool first + if (part.name === 'deleteAccount') part.approval?.id + + // ✅ Or guard with `in` + if ('approval' in part) part.approval?.id + + // ✅ Or type the handler against the base (untyped) ToolCallPart + function handleApproval(part: ToolCallPart) { + return part.approval?.id + } + ``` + + Untyped `useChat()` (no inferred `tools` generic) and the base `ToolCallPart` + type are unaffected: `approval` stays available on every tool-call part there. + **Runtime behavior is unchanged** — only TypeScript narrowing is stricter. + + Adds a `TNeedsApproval extends boolean` type parameter (defaulting to `false`) + to the client tool types; existing explicit type arguments keep working via the + default. Literal capture requires `toolDefinition({ needsApproval: true })` at + the call site — a dynamic `needsApproval: boolean` variable will not gate the + type. + +- [#918](https://github.com/TanStack/ai/pull/918) [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589) - Populate the parsed `input` on tool-call message parts. `ToolCallPart` already + declared a typed `input?` field, but it was never written at runtime — only the + raw `arguments` string (and `output`) were set, so `part.input` was always + `undefined` and consumers had to fall back to `part.input ?? JSON.parse(part.arguments)`. + + `input` is now set from the parsed arguments once they are complete + (`state: 'input-complete'` and later, including `approval-requested`), in the + streaming processor, the `TOOL_CALL_END`-with-parsed-input path, and when + hydrating history via `modelMessagesToUIMessages`. While arguments are still + streaming, `input` stays `undefined` and the raw `arguments` string remains the + live source. A tool call that terminates in an error state may also keep `input` + unset. `arguments` is unchanged, always present, and not deprecated. + + With typed tools (`useChat({ tools })`), `part.input` is fully typed per tool + via the `part.name` discriminant — matching `part.output`. + +### Patch Changes + +- [#924](https://github.com/TanStack/ai/pull/924) [`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5) - fix: resolve directory-barrel imports in published `.d.ts` files. Bare imports of `utils`/`tools`/`middleware` barrels were emitted as `../utils.js` (etc.), which do not resolve under bundler/node16/nodenext (no `/index` fallback for explicit `.js`). With consumer `skipLibCheck: true` those symbols silently became `any`. Imports now target concrete modules (e.g. `utils/client`, `middleware/types`) or explicit `/index` paths so public types resolve correctly. + +- [#922](https://github.com/TanStack/ai/pull/922) [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669) - fix: resolve dangling relative imports in published declaration files + + Switch directory-barrel imports (`../utils`, `../tools`, `../middleware`) to + concrete module paths so emitted `.d.ts` specifiers resolve under + `bundler`/`node16`/`nodenext` resolution. Adds a `test:dts` scanner guardrail. + + Fixes [#920](https://github.com/TanStack/ai/issues/920) + +- [#886](https://github.com/TanStack/ai/pull/886) [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4) - Fix `generateVideo` / `getVideoJobStatus` rejecting video adapters that declare a narrowed per-model duration union (e.g. Gemini's `4 | 6 | 8` for Veo or `10` for Omni Flash) at the type level. The activity's `TAdapter extends VideoAdapter` constraints left the input-modality and duration generics at their defaults, so `duration?: number` failed contravariance against the adapter's literal union. All video-activity constraints and helper conditionals now span all six `VideoAdapter` generics. + ## 0.40.0 ### Minor Changes diff --git a/packages/ai/package.json b/packages/ai/package.json index a1dcf9a97..84af775d1 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai", - "version": "0.40.0", + "version": "0.41.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 68e9a37ac..86eb637df 100644 --- a/packages/openai-base/CHANGELOG.md +++ b/packages/openai-base/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/openai-base +## 0.9.8 + +### Patch Changes + +- Updated dependencies [[`5fcaf90`](https://github.com/TanStack/ai/commit/5fcaf90dc82bc20b8c7a75faa3c129da04858af5), [`2665085`](https://github.com/TanStack/ai/commit/2665085970ab4d792778bb2b635ef27fbdcb6be1), [`e0bbbdd`](https://github.com/TanStack/ai/commit/e0bbbdd9608892293e09135aab4a3c77c8d65669), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`f830d9e`](https://github.com/TanStack/ai/commit/f830d9e7a41e3554c424c3e41ba847dfd1577589), [`de5fbb5`](https://github.com/TanStack/ai/commit/de5fbb52a916826cdc0ef31d18df402cd611b9d4)]: + - @tanstack/ai@0.41.0 + ## 0.9.7 ### Patch Changes diff --git a/packages/openai-base/package.json b/packages/openai-base/package.json index a7c0c2910..f28a410a0 100644 --- a/packages/openai-base/package.json +++ b/packages/openai-base/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/openai-base", - "version": "0.9.7", + "version": "0.9.8", "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 40cb94a47..e04659955 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.66 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.23 + ## 0.1.65 ### Patch Changes diff --git a/packages/preact-ai-devtools/package.json b/packages/preact-ai-devtools/package.json index c055c329e..a968143bf 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.65", + "version": "0.1.66", "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 52dea7f9f..0446cad42 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.66 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.23 + ## 0.2.65 ### Patch Changes diff --git a/packages/react-ai-devtools/package.json b/packages/react-ai-devtools/package.json index 6b0dc198b..afe0760b9 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.65", + "version": "0.2.66", "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 d9dbd2248..24f1dc96a 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.66 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.4.23 + ## 0.2.65 ### Patch Changes diff --git a/packages/solid-ai-devtools/package.json b/packages/solid-ai-devtools/package.json index d4a91236f..b00b21baf 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.65", + "version": "0.2.66", "description": "Solid Devtools plugin for inspecting TanStack AI chat messages, tool calls, streams, and errors.", "author": "Tanner Linsley", "license": "MIT",