feat: add @spec2tools/sdk-tanstack package for generating TanStack AI tools#13
Merged
feat: add @spec2tools/sdk-tanstack package for generating TanStack AI tools#13
Conversation
… tools Creates a new package that converts OpenAPI specifications into TanStack AI ServerTool instances using toolDefinition().server() from @tanstack/ai. Mirrors the @spec2tools/sdk pattern but targets @tanstack/ai's chat() API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add README.md with usage examples for createTools and convertToolsToCodeMode - Add LICENSE (MIT) - Add convertToolsToCodeMode function that converts ServerTool[] into 2 code-mode tools (search + execute) using Monty Python interpreter, mirroring the same pattern as @spec2tools/sdk - Add codeMode option to createTools - Add @pydantic/monty as a dependency for code mode execution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add examples/* glob to pnpm-workspace.yaml so examples are workspace packages that resolve monorepo deps via workspace:* - Add examples/sdk-tanstack-node: a minimal Node.js script that uses @spec2tools/sdk-tanstack + @tanstack/ai to answer prompts against a JSONPlaceholder OpenAPI spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… examples - code-mode.ts: same OpenAPI spec but with codeMode: true (2 tools) - convert-code-mode.ts: convertToolsToCodeMode with hand-written mock tools - Update package.json with start:code-mode and start:convert scripts - Update README to document all three examples Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename index.ts → example-basic.ts, code-mode.ts → example-code-mode.ts, convert-code-mode.ts → example-convert-code-mode.ts. Update package.json scripts and README accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move zod to peerDependencies with ^3.25.0 || ^4.0.0 in core, sdk, and sdk-tanstack to let consumers choose the version. Update internal imports to zod/v3 for compatibility. Fix excessively deep type instantiation in stdio-mcp by double-casting mcpClient.tools() result. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creates a new package that converts OpenAPI specifications into TanStack AI ServerTool instances using toolDefinition().server() from @tanstack/ai. Mirrors the @spec2tools/sdk pattern but targets @tanstack/ai's chat() API.
Fixes #12