@tanstack/ai-code-mode#
0.4.18#
Patch Changes#
- Updated dependencies [
37b2826,8e8ee26,c5c1996,3e30cde,0eb8f0b,f44b6b2,d632d41]:- @tanstack/ai@0.63.0
0.4.17#
Patch Changes#
#1487
04e8d16- State in the Code Mode system prompt and in theexecute_typescripttool description thatdiscover_toolsis a separate tool call. It is not a function inside the sandbox. Models no longer calldiscover_toolsfrom insideexecute_typescriptand get aReferenceError.Updated dependencies [
a450d00,c54e20c,a56192e,740ae66,5099a32,820429f,0abae97,8c68c2d]:- @tanstack/ai@0.62.0
0.4.16#
Patch Changes#
0.4.15#
Patch Changes#
- Updated dependencies [
ef0a00f]:- @tanstack/ai@0.60.0
0.4.14#
Patch Changes#
0.4.13#
Patch Changes#
- Updated dependencies [
796f2b5]:- @tanstack/ai@0.58.0
0.4.12#
Patch Changes#
0.4.11#
Patch Changes#
0.4.10#
Patch Changes#
0.4.9#
Patch Changes#
#1350
53e2ec0- docs(skills): type-check the code fences in every package skill with kiira and fix the ones that did not compileUpdated dependencies [
c17bc95,53e2ec0,6269eff]:- @tanstack/ai@0.54.0
0.4.8#
Patch Changes#
- Updated dependencies [
21775ee]:- @tanstack/ai@0.53.0
0.4.7#
Patch Changes#
0.4.6#
Patch Changes#
0.4.5#
Patch Changes#
0.4.4#
Patch Changes#
- Updated dependencies [
b7ebcb0]:- @tanstack/ai@0.49.0
0.4.3#
Patch Changes#
- Updated dependencies [
1c0415b]:- @tanstack/ai@0.48.0
0.4.2#
Patch Changes#
0.4.1#
Patch Changes#
0.4.0#
Minor Changes#
#1114
0fb8263- Rename Code Mode "skills" to "snippets" to disambiguate them from agent skills (theSKILL.mdpackaging system).Breaking — package rename.
@tanstack/ai-code-mode-skillsis now published as@tanstack/ai-code-mode-snippets. Update your dependency and imports. The/storagesubpath is unchanged.Breaking — API rename. Every
Skill/skillidentifier in the package public API becomesSnippet/snippet, for example:codeModeWithSkills()→codeModeWithSnippets()skillsToTools()/skillToTool()→snippetsToTools()/snippetToTool()skillsToBindings()/skillsToSimpleBindings()→snippetsToBindings()/snippetsToSimpleBindings()selectRelevantSkills()→selectRelevantSnippets()createSkillManagementTools()→createSnippetManagementTools()createSkillsSystemPrompt()→createSnippetsSystemPrompt()generateSkillTypes()→generateSnippetTypes()createFileSkillStorage()/createMemorySkillStorage()→createFileSnippetStorage()/createMemorySnippetStorage()- Types:
Skill,SkillStorage,SkillIndexEntry,SkillStats,SkillBinding,SkillsConfig,CodeModeWithSkillsOptions/Result→ theSnippet…equivalents - Options:
skills→snippets,skillsAsTools→snippetsAsTools,maxSkillsInContext→maxSnippetsInContext - Runtime tools:
search_skills/get_skill/register_skill→search_snippets/get_snippet/register_snippet - Sandbox bindings are now exposed with the
snippet_prefix (wasskill_)
Breaking — sandbox hook (
@tanstack/ai-code-mode). ThecreateCodeModeToolconfig optiongetSkillBindingsis renamed togetSnippetBindings(same signature — an optional() => Promise<Record<string, ToolBinding>>returning dynamic bindings merged at execution time).Breaking — wire contract (
@tanstack/ai). The Code Mode custom events are renamed:code_mode:skill_call/_result/_error→code_mode:snippet_*(payload fieldskill→snippet), andskill:registered→snippet:registered. The exported event typesCodeModeSkillCallEvent/CodeModeSkillResultEvent/CodeModeSkillErrorEvent/SkillRegisteredEventare renamed to theirSnippetequivalents.
Patch Changes#
0.3.11#
Patch Changes#
#750
b2b82e4- Add@tanstack/ai-isolate-quickjs-bun, a Code Mode isolate driver that runs QuickJS natively on the Bun runtime throughbun:ffi(viaquickjs-bun).It implements the same
IsolateDrivercontract as the existing drivers and is a drop-in replacement for@tanstack/ai-isolate-quickjson Bun servers:import { createQuickJSBunIsolateDriver } from '@tanstack/ai-isolate-quickjs-bun' import { createCodeModeTool } from '@tanstack/ai-code-mode' const executeTypescript = createCodeModeTool({ driver: createQuickJSBunIsolateDriver(), tools: [myTool], })Compared to the WASM driver:
- Native QuickJS through
bun:ffi— no WebAssembly or asyncify overhead, and no native build step (the QuickJS sources are compiled once per process by Bun's embedded TinyCC). - Each context gets a dedicated QuickJS runtime with its own memory and stack limits, so executions on different contexts are not serialized through a shared VM.
- Same normalized
MemoryLimitError/StackOverflowError/DisposedErrorcontract, console capture prefixes, and JSON tool-call protocol as the other drivers, plus a normalizedTimeoutErrorfor deadline expiry (the WASM driver surfaces timeouts asInternalError: interrupted). - A configurable
maxToolCallslimit (default 1000) bounds output and memory growth from untrusted sandbox code.
The driver requires Bun
>= 1.3.14and throws an error when used on Node.js.It pins
quickjs-bunto an exact version (0.1.2) rather than a range, because that package is still pre-1.0 and compiles QuickJS through TinyCC/bun:ffi— its API and platform support may shift between patch releases (see the package README for the compatibility note and the WindowsQUICKJS_BUN_NATIVE_LIBRARYrequirement).The
@tanstack/ai-code-modeREADME and bundled skill are updated to document the new driver.- Native QuickJS through
#1071
ea9c077- fix: publish internal dependency ranges as^x.y.zinstead of exact pinsInternal dependencies on other TanStack AI packages used
workspace:*independenciesandpeerDependencies. pnpm rewrites that to an exact version at publish time, so a released package asked for e.g.@tanstack/ai-utils@0.4.0rather than^0.4.0.Two consequences for consumers:
- Duplicate copies. An exact pin cannot dedupe. Installing a newer
@tanstack/aialongside a package pinned to the previous patch produced two copies in the tree, which breaksinstanceofchecks and module-level state, and inflates bundles. - Unsatisfiable peers. An exactly pinned
peerDependencyconflicts the moment the internal package ships its next patch, forcing consumers into overrides or--legacy-peer-deps.
These fields now use
workspace:^, which publishes as^x.y.z. Every package here is still0.x, so^0.43.1resolves to0.43.xonly — patches dedupe cleanly and no breaking minor is ever pulled in.devDependenciesdeliberately keepworkspace:*: they are never published, and*correctly means "always build against the local copy".- Duplicate copies. An exact pin cannot dedupe. Installing a newer
Updated dependencies [
59aa8b5,ee07854,b785cc4,47e2464,dd7ddf1,6903978,fdb791a,7aa4ae9,ea9c077]:- @tanstack/ai@0.44.0
0.3.10#
Patch Changes#
- Updated dependencies [
ed44467]:- @tanstack/ai@0.43.1
0.3.9#
Patch Changes#
- Updated dependencies [
7499171]:- @tanstack/ai@0.43.0
0.3.8#
Patch Changes#
- Updated dependencies [
3e1b510]:- @tanstack/ai@0.42.0
0.3.7#
Patch Changes#
0.3.6#
Patch Changes#
- Updated dependencies [
5deda27]:- @tanstack/ai@0.40.0
0.3.5#
Patch Changes#
0.3.4#
Patch Changes#
#431
8f8be19- fix(ai-code-mode): warn when tool parameters look like secretsAdd
warnIfBindingsExposeSecrets()that scans tool input schemas for secret-like parameter names (apiKey,token,password, etc.) and emitsconsole.warnduring development. Code Mode executes LLM-generated code — any secrets passed through tool parameters are accessible to generated code.
0.3.3#
Patch Changes#
0.3.2#
Patch Changes#
- Updated dependencies [
c1a8732]:- @tanstack/ai@0.38.0
0.3.1#
Patch Changes#
#844
a6cceba- Republish all packages with their compileddist/output.Releases
0.33.0–0.36.0were published without adist/directory: the release workflow relied on an Nx-cachedbuildwhose outputs were not materialized to disk beforechangeset publishpacked the tarballs, andfiles: ["dist"]silently includes nothing whendist/is absent. The published packages therefore contained onlysrc/, so every export (./dist/esm/*.js) resolved to a missing file and the packages were uninstallable.The publish step now runs a fresh, cache-bypassing build of all packages immediately before publishing, guaranteeing compiled artifacts are present in every tarball.
Updated dependencies [
a6cceba]:- @tanstack/ai@0.37.0
0.3.0#
Minor Changes#
- #726
fbd3762- Add lazy tool support (progressive disclosure) to Code Mode. Tools markedlazy: trueare kept out of theexecute_typescriptsystem prompt and listed in a discoverable catalog; the model fetches their TypeScript signatures on demand via a newdiscover_toolstool. A shared optionallazyToolsConfig(includeDescription: 'none' | 'first-sentence' | 'full') tunes the catalog detail for bothchat()andcreateCodeMode().createCodeModenow also returnsdiscoveryTooland atoolsarray (backward compatible —toolandsystemPromptare unchanged).
Patch Changes#
- Updated dependencies [
fbd3762]:- @tanstack/ai@0.36.0
0.2.13#
Patch Changes#
- Updated dependencies [
c04abd3]:- @tanstack/ai@0.35.0
0.2.12#
Patch Changes#
- Updated dependencies [
4188693]:- @tanstack/ai@0.34.1
0.2.11#
Patch Changes#
- Updated dependencies [
31de22b]:- @tanstack/ai@0.34.0
0.2.10#
Patch Changes#
#799
81e3aee- fix(code-mode): drop esbuild for edge-safe TypeScript stripping@tanstack/ai-code-modehard-depended onesbuildto strip TypeScript before sandbox execution. esbuild ships a Node-native binary and pulls in Node-only built-ins (e.g.require("pnpapi")), which broke browser bundles and edge runtimes such as Cloudflare Workers/Pages. The default transpiler is nowsucrase, a pure-JavaScript transform that is safe to bundle for browsers and edge runtimes.sucrase is a type-stripper rather than a down-leveler, so unlike esbuild it does not compile a few exotic constructs: TypeScript value
namespaceblocks are dropped, decorators / theaccessorkeyword pass through un-lowered, and post-ES2022 syntax (using, RegExp/v·/dflags) is left as-is (fine on modern V8/Node sandboxes, but may fail on older engines like QuickJS). A newtranspileescape hatch oncreateCodeModeToollets you swap in a heavier Node-only transpiler (e.g. esbuild) when you need that coverage and don't need edge safety.#794
3bf0dbf- fix(code-mode): validate tool input/output against schemasCode mode converted a tool's input/output schema to JSON Schema for the prompt but never validated against it — unlike the normal agent-loop path. A provided
inputSchema/outputSchemawas effectively just documentation: inner (external_*) tools received raw, un-coerced sandbox args and outputs went unchecked.toolToBindingnow runs the same Standard Schema validation, so defaults/coercions apply and invalid input/output throws an agent-readable error.Updated dependencies [
2cb0313,18e5f4d,21720dd,243b8fa]:- @tanstack/ai@0.33.0
0.2.9#
Patch Changes#
0.2.8#
Patch Changes#
- Updated dependencies [
07aaf8b]:- @tanstack/ai@0.31.0
0.2.7#
Patch Changes#
#769
1d1bb52- Add repository metadata (homepage,bugs,funding), fixrepository.directoryto point at each package, and include an MITLICENSEfile in every published package.Updated dependencies [
7103348,1d1bb52]:- @tanstack/ai@0.30.0
0.2.6#
Patch Changes#
0.2.5#
Patch Changes#
0.2.4#
Patch Changes#
- Updated dependencies [
6df32b5]:- @tanstack/ai@0.27.0
0.2.3#
Patch Changes#
- Updated dependencies []:
- @tanstack/ai@0.26.1
0.2.2#
Patch Changes#
- Updated dependencies [
5d6cd28]:- @tanstack/ai@0.26.0
0.2.1#
Patch Changes#
- Updated dependencies [
c251038]:- @tanstack/ai@0.25.0
0.2.0#
Minor Changes#
#628
8036b50- Add typed runtime context for tools and middleware.Tools and middleware can now declare the runtime context shape they require, and
chat(),ChatClient, and the frameworkuseChat/createChathooks infer the merged requirement and type-check thecontextoption you pass against it.type AppContext = { userId: string; db: Db } const listNotes = toolDefinition({ name: 'list_notes' /* ... */, }).server<AppContext>((_input, ctx) => ctx.context.db.notes.findMany({ userId: ctx.context.userId }), ) chat({ adapter, messages, tools: [listNotes], context: { userId, db }, // required and type-checked because listNotes declares AppContext })Runtime context is request-local application state for tool and middleware implementations (authenticated users, database clients, tenancy, feature flags, loggers, browser services). It is never sent to the model and is distinct from the AG-UI
RunAgentInput.contextprotocol field.Untyped tools and middleware continue to receive
unknowncontext and do not force acontextoption. Client tools receive client-local context viaChatClient/useChat; useforwardedPropsto hand serializable client data to the server and map it into server context explicitly. See the new Runtime Context guide for details.Behavior change: tool output validation now also runs when a tool returns
undefinedornull. Previously these values bypassedoutputSchemavalidation entirely; now the schema decides whether they are valid, so a tool whose schema forbidsundefined/nullsurfaces a validation error (output-error) instead of silently passing. Tools whose schema permitsnull/undefined(e.g. nullable or void outputs) are unaffected.
Patch Changes#
0.1.24#
Patch Changes#
- Updated dependencies [
94bb9c0]:- @tanstack/ai@0.23.1
0.1.23#
Patch Changes#
0.1.22#
Patch Changes#
- Updated dependencies []:
- @tanstack/ai@0.22.1
0.1.21#
Patch Changes#
- Updated dependencies [
02f7d04]:- @tanstack/ai@0.22.0
0.1.20#
Patch Changes#
- Updated dependencies [
e144a53]:- @tanstack/ai@0.21.3
0.1.19#
Patch Changes#
Refresh package README content and npm metadata for better discoverability. (#626)
Updated dependencies [
ebeb22e]:- @tanstack/ai@0.21.2
0.1.18#
Patch Changes#
- Updated dependencies [
573f12e]:- @tanstack/ai@0.21.1
0.1.17#
Patch Changes#
Adopt
@tanstack/eslint-config@0.4.0and clean up the local override layer. (#607)- Bump
@tanstack/eslint-configfrom0.3.3to0.4.0. - Drop dead
pnpm/enforce-catalogandpnpm/json-enforce-catalogdisables (upstream removedeslint-plugin-pnpmin0.3.1). - Drop the
no-case-declarations: offoverride — no current source actually violates it. - Drop the
no-shadow: offoverride — upstream sets it towarn, so it surfaces in editors without blocking CI. - Remove ~25 unnecessary type assertions across the publishable packages that the upgraded
typescript-eslintnow catches viano-unnecessary-type-assertion. One deliberately defensive cast inag-ui-wire.tsis preserved with an inline opt-out and a reason comment.
No public-API or runtime-behavior changes.
- Bump
Updated dependencies [
ec1393d,188fe11]:- @tanstack/ai@0.21.0
0.1.16#
Patch Changes#
Tighten TypeScript safety: enable
noImplicitOverride, (#579)noFallthroughCasesInSwitch, anduseDefineForClassFieldsin the roottsconfig.json; add a typed-ESLint block scoped topackages/*/src/**that turns onno-floating-promises,no-misused-promises,await-thenable,switch-exhaustiveness-check,consistent-type-exports,prefer-readonly, andno-non-null-assertion(errors), plusno-explicit-any(warning).@ts-ignoreand@ts-nocheckare disallowed in library source via@typescript-eslint/ban-ts-comment, andas unknown as <T>double-casts are blocked by ano-restricted-syntaxrule (escape hatches available with an inline reason). Two flags from the original five-flag set —noPropertyAccessFromIndexSignatureandexactOptionalPropertyTypes— were tried and rolled back: they produced ~500 lines of bracket- access and conditional-spread churn without catching any real bugs, andexactOptionalPropertyTypeswould have forced consumers using it themselves to deal with our internals' style preferences.User-visible API surface is unchanged; this is a hardening pass to keep streaming/agent-loop correctness and discriminated-union exhaustiveness honest going forward. See issue #564.
Updated dependencies [
2ad137b]:- @tanstack/ai@0.20.1
0.1.15#
Patch Changes#
- Updated dependencies [
496db9c]:- @tanstack/ai@0.20.0
0.1.14#
Patch Changes#
- Updated dependencies [
617b5b5]:- @tanstack/ai@0.19.1
0.1.13#
Patch Changes#
- Updated dependencies [
2e0e2eb]:- @tanstack/ai@0.19.0
0.1.12#
Patch Changes#
0.1.11#
Patch Changes#
0.1.10#
Patch Changes#
- Updated dependencies [
87f305c]:- @tanstack/ai@0.16.0
0.1.9#
Patch Changes#
0.1.8#
Patch Changes#
0.1.7#
Patch Changes#
- Updated dependencies [
c1fd96f]:- @tanstack/ai@0.13.0
0.1.6#
Patch Changes#
- Updated dependencies [
e32583e]:- @tanstack/ai@0.12.0
0.1.5#
Patch Changes#
- Updated dependencies [
633a3d9]:- @tanstack/ai@0.11.1
0.1.4#
Patch Changes#
- Updated dependencies [
12d43e5]:- @tanstack/ai@0.11.0
0.1.3#
Patch Changes#
- Updated dependencies [
c780bc1]:- @tanstack/ai@0.10.3
0.1.2#
Patch Changes#
- Updated dependencies [
4445410]:- @tanstack/ai@0.10.2
0.1.1#
Patch Changes#
Add @tanstack/intent agent skills for AI coding assistants (#432)
Adds 10 skill files covering chat-experience, tool-calling, media-generation, code-mode, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, and custom-backend-integration. Skills guide AI agents to generate correct TanStack AI code patterns and avoid common mistakes.
Updated dependencies [
1d1c58f]:- @tanstack/ai@0.10.1
0.1.0#
Minor Changes#
Add code mode and isolate packages for secure AI code execution (#362)
Also includes fixes for Ollama tool call argument streaming and usage reporting, OpenAI realtime adapter handling of missing call_id/item_id, realtime client guards for missing toolCallId, and new DevtoolsChatMiddleware type export from ai-event-client.
Patch Changes#
- Updated dependencies [
54abae0]:- @tanstack/ai@0.10.0