@tanstack/ai-anthropic 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/esm/anthropic-adapter.d.ts +69 -0
- package/dist/esm/anthropic-adapter.js +473 -0
- package/dist/esm/anthropic-adapter.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/message-types.d.ts +69 -0
- package/dist/esm/model-meta.d.ts +215 -0
- package/dist/esm/model-meta.js +42 -0
- package/dist/esm/model-meta.js.map +1 -0
- package/dist/esm/text/text-provider-options.d.ts +139 -0
- package/dist/esm/text/text-provider-options.js +30 -0
- package/dist/esm/text/text-provider-options.js.map +1 -0
- package/dist/esm/tools/bash-tool.d.ts +5 -0
- package/dist/esm/tools/bash-tool.js +8 -0
- package/dist/esm/tools/bash-tool.js.map +1 -0
- package/dist/esm/tools/code-execution-tool.d.ts +5 -0
- package/dist/esm/tools/code-execution-tool.js +8 -0
- package/dist/esm/tools/code-execution-tool.js.map +1 -0
- package/dist/esm/tools/computer-use-tool.d.ts +5 -0
- package/dist/esm/tools/computer-use-tool.js +8 -0
- package/dist/esm/tools/computer-use-tool.js.map +1 -0
- package/dist/esm/tools/custom-tool.d.ts +25 -0
- package/dist/esm/tools/custom-tool.js +21 -0
- package/dist/esm/tools/custom-tool.js.map +1 -0
- package/dist/esm/tools/index.d.ts +10 -0
- package/dist/esm/tools/memory-tool.d.ts +5 -0
- package/dist/esm/tools/memory-tool.js +11 -0
- package/dist/esm/tools/memory-tool.js.map +1 -0
- package/dist/esm/tools/text-editor-tool.d.ts +5 -0
- package/dist/esm/tools/text-editor-tool.js +10 -0
- package/dist/esm/tools/text-editor-tool.js.map +1 -0
- package/dist/esm/tools/tool-converter.d.ts +27 -0
- package/dist/esm/tools/tool-converter.js +35 -0
- package/dist/esm/tools/tool-converter.js.map +1 -0
- package/dist/esm/tools/web-fetch-tool.d.ts +5 -0
- package/dist/esm/tools/web-fetch-tool.js +12 -0
- package/dist/esm/tools/web-fetch-tool.js.map +1 -0
- package/dist/esm/tools/web-search-tool.d.ts +5 -0
- package/dist/esm/tools/web-search-tool.js +16 -0
- package/dist/esm/tools/web-search-tool.js.map +1 -0
- package/package.json +53 -0
- package/src/anthropic-adapter.ts +680 -0
- package/src/index.ts +25 -0
- package/src/message-types.ts +85 -0
- package/src/model-meta.ts +482 -0
- package/src/text/text-provider-options.ts +205 -0
- package/src/tools/bash-tool.ts +19 -0
- package/src/tools/code-execution-tool.ts +24 -0
- package/src/tools/computer-use-tool.ts +24 -0
- package/src/tools/custom-tool.ts +64 -0
- package/src/tools/index.ts +30 -0
- package/src/tools/memory-tool.ts +20 -0
- package/src/tools/text-editor-tool.ts +28 -0
- package/src/tools/tool-converter.ts +61 -0
- package/src/tools/web-fetch-tool.ts +23 -0
- package/src/tools/web-search-tool.ts +81 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-tool.js","sources":["../../../src/tools/custom-tool.ts"],"sourcesContent":["import { convertZodToJsonSchema } from '@tanstack/ai'\nimport type { Tool } from '@tanstack/ai'\nimport type { z } from 'zod'\nimport type { CacheControl } from '../text/text-provider-options'\n\nexport interface CustomTool {\n /**\n * The name of the tool.\n */\n name: string\n type: 'custom'\n /**\n * A brief description of what the tool does. Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.\n */\n description: string\n /**\n * This defines the shape of the input that your tool accepts and that the model will produce.\n */\n input_schema: {\n type: 'object'\n properties: Record<string, any> | null\n required?: Array<string> | null\n }\n\n cache_control?: CacheControl | null\n}\n\nexport function convertCustomToolToAdapterFormat(tool: Tool): CustomTool {\n const metadata =\n (tool.metadata as { cacheControl?: CacheControl | null } | undefined) || {}\n\n // Convert Zod schema to JSON Schema\n const jsonSchema = convertZodToJsonSchema(tool.inputSchema)\n\n const inputSchema = {\n type: 'object' as const,\n properties: jsonSchema?.properties || null,\n required: jsonSchema?.required || null,\n }\n\n return {\n name: tool.name,\n type: 'custom',\n description: tool.description,\n input_schema: inputSchema,\n cache_control: metadata.cacheControl || null,\n }\n}\n\nexport function customTool(\n name: string,\n description: string,\n inputSchema: z.ZodType,\n cacheControl?: CacheControl | null,\n): Tool {\n return {\n name,\n description,\n inputSchema,\n metadata: {\n cacheControl,\n },\n }\n}\n"],"names":[],"mappings":";AA2BO,SAAS,iCAAiC,MAAwB;AACvE,QAAM,WACH,KAAK,YAAmE,CAAA;AAG3E,QAAM,aAAa,uBAAuB,KAAK,WAAW;AAE1D,QAAM,cAAc;AAAA,IAClB,MAAM;AAAA,IACN,YAAY,YAAY,cAAc;AAAA,IACtC,UAAU,YAAY,YAAY;AAAA,EAAA;AAGpC,SAAO;AAAA,IACL,MAAM,KAAK;AAAA,IACX,MAAM;AAAA,IACN,aAAa,KAAK;AAAA,IAClB,cAAc;AAAA,IACd,eAAe,SAAS,gBAAgB;AAAA,EAAA;AAE5C;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BashTool } from './bash-tool.js';
|
|
2
|
+
import { CodeExecutionTool } from './code-execution-tool.js';
|
|
3
|
+
import { ComputerUseTool } from './computer-use-tool.js';
|
|
4
|
+
import { CustomTool } from './custom-tool.js';
|
|
5
|
+
import { MemoryTool } from './memory-tool.js';
|
|
6
|
+
import { TextEditorTool } from './text-editor-tool.js';
|
|
7
|
+
import { WebFetchTool } from './web-fetch-tool.js';
|
|
8
|
+
import { WebSearchTool } from './web-search-tool.js';
|
|
9
|
+
export type AnthropicTool = BashTool | CodeExecutionTool | ComputerUseTool | CustomTool | MemoryTool | TextEditorTool | WebFetchTool | WebSearchTool;
|
|
10
|
+
export type { CustomTool, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BetaMemoryTool20250818 } from '@anthropic-ai/sdk/resources/beta';
|
|
2
|
+
import { Tool } from '@tanstack/ai';
|
|
3
|
+
export type MemoryTool = BetaMemoryTool20250818;
|
|
4
|
+
export declare function convertMemoryToolToAdapterFormat(tool: Tool): MemoryTool;
|
|
5
|
+
export declare function memoryTool(config?: MemoryTool): Tool;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-tool.js","sources":["../../../src/tools/memory-tool.ts"],"sourcesContent":["import type { BetaMemoryTool20250818 } from '@anthropic-ai/sdk/resources/beta'\nimport type { Tool } from '@tanstack/ai'\n\nexport type MemoryTool = BetaMemoryTool20250818\n\nexport function convertMemoryToolToAdapterFormat(tool: Tool): MemoryTool {\n const metadata = tool.metadata as Omit<MemoryTool, 'type'>\n return {\n type: 'memory_20250818',\n ...metadata,\n }\n}\n\nexport function memoryTool(config?: MemoryTool): Tool {\n return {\n name: 'memory',\n description: '',\n metadata: config,\n }\n}\n"],"names":[],"mappings":"AAKO,SAAS,iCAAiC,MAAwB;AACvE,QAAM,WAAW,KAAK;AACtB,SAAO;AAAA,IACL,MAAM;AAAA,IACN,GAAG;AAAA,EAAA;AAEP;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ToolTextEditor20250124, ToolTextEditor20250429, ToolTextEditor20250728 } from '@anthropic-ai/sdk/resources/messages';
|
|
2
|
+
import { Tool } from '@tanstack/ai';
|
|
3
|
+
export type TextEditorTool = ToolTextEditor20250124 | ToolTextEditor20250429 | ToolTextEditor20250728;
|
|
4
|
+
export declare function convertTextEditorToolToAdapterFormat(tool: Tool): TextEditorTool;
|
|
5
|
+
export declare function textEditorTool<T extends TextEditorTool>(config: T): Tool;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-editor-tool.js","sources":["../../../src/tools/text-editor-tool.ts"],"sourcesContent":["import type {\n ToolTextEditor20250124,\n ToolTextEditor20250429,\n ToolTextEditor20250728,\n} from '@anthropic-ai/sdk/resources/messages'\nimport type { Tool } from '@tanstack/ai'\n\nexport type TextEditorTool =\n | ToolTextEditor20250124\n | ToolTextEditor20250429\n | ToolTextEditor20250728\n\nexport function convertTextEditorToolToAdapterFormat(\n tool: Tool,\n): TextEditorTool {\n const metadata = tool.metadata as TextEditorTool\n return {\n ...metadata,\n }\n}\n\nexport function textEditorTool<T extends TextEditorTool>(config: T): Tool {\n return {\n name: 'str_replace_editor',\n description: '',\n metadata: config,\n }\n}\n"],"names":[],"mappings":"AAYO,SAAS,qCACd,MACgB;AAChB,QAAM,WAAW,KAAK;AACtB,SAAO;AAAA,IACL,GAAG;AAAA,EAAA;AAEP;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AnthropicTool } from '.';
|
|
2
|
+
import { Tool } from '@tanstack/ai';
|
|
3
|
+
/**
|
|
4
|
+
* Converts standard Tool format to Anthropic-specific tool format
|
|
5
|
+
*
|
|
6
|
+
* @param tools - Array of standard Tool objects
|
|
7
|
+
* @returns Array of Anthropic-specific tool definitions
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const tools: Tool[] = [{
|
|
12
|
+
* type: "function",
|
|
13
|
+
* function: {
|
|
14
|
+
* name: "get_weather",
|
|
15
|
+
* description: "Get weather for a location",
|
|
16
|
+
* parameters: {
|
|
17
|
+
* type: "object",
|
|
18
|
+
* properties: { location: { type: "string" } },
|
|
19
|
+
* required: ["location"]
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* }];
|
|
23
|
+
*
|
|
24
|
+
* const anthropicTools = convertToolsToProviderFormat(tools);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function convertToolsToProviderFormat<TTool extends Tool>(tools: Array<TTool>): Array<AnthropicTool>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { convertBashToolToAdapterFormat } from "./bash-tool.js";
|
|
2
|
+
import { convertCodeExecutionToolToAdapterFormat } from "./code-execution-tool.js";
|
|
3
|
+
import { convertComputerUseToolToAdapterFormat } from "./computer-use-tool.js";
|
|
4
|
+
import { convertCustomToolToAdapterFormat } from "./custom-tool.js";
|
|
5
|
+
import { convertMemoryToolToAdapterFormat } from "./memory-tool.js";
|
|
6
|
+
import { convertTextEditorToolToAdapterFormat } from "./text-editor-tool.js";
|
|
7
|
+
import { convertWebFetchToolToAdapterFormat } from "./web-fetch-tool.js";
|
|
8
|
+
import { convertWebSearchToolToAdapterFormat } from "./web-search-tool.js";
|
|
9
|
+
function convertToolsToProviderFormat(tools) {
|
|
10
|
+
return tools.map((tool) => {
|
|
11
|
+
const name = tool.name;
|
|
12
|
+
switch (name) {
|
|
13
|
+
case "bash":
|
|
14
|
+
return convertBashToolToAdapterFormat(tool);
|
|
15
|
+
case "code_execution":
|
|
16
|
+
return convertCodeExecutionToolToAdapterFormat(tool);
|
|
17
|
+
case "computer":
|
|
18
|
+
return convertComputerUseToolToAdapterFormat(tool);
|
|
19
|
+
case "memory":
|
|
20
|
+
return convertMemoryToolToAdapterFormat(tool);
|
|
21
|
+
case "str_replace_editor":
|
|
22
|
+
return convertTextEditorToolToAdapterFormat(tool);
|
|
23
|
+
case "web_fetch":
|
|
24
|
+
return convertWebFetchToolToAdapterFormat(tool);
|
|
25
|
+
case "web_search":
|
|
26
|
+
return convertWebSearchToolToAdapterFormat(tool);
|
|
27
|
+
default:
|
|
28
|
+
return convertCustomToolToAdapterFormat(tool);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
convertToolsToProviderFormat
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=tool-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-converter.js","sources":["../../../src/tools/tool-converter.ts"],"sourcesContent":["import { convertBashToolToAdapterFormat } from './bash-tool'\nimport { convertCodeExecutionToolToAdapterFormat } from './code-execution-tool'\nimport { convertComputerUseToolToAdapterFormat } from './computer-use-tool'\nimport { convertCustomToolToAdapterFormat } from './custom-tool'\nimport { convertMemoryToolToAdapterFormat } from './memory-tool'\nimport { convertTextEditorToolToAdapterFormat } from './text-editor-tool'\nimport { convertWebFetchToolToAdapterFormat } from './web-fetch-tool'\nimport { convertWebSearchToolToAdapterFormat } from './web-search-tool'\nimport type { AnthropicTool } from '.'\nimport type { Tool } from '@tanstack/ai'\n\n/**\n * Converts standard Tool format to Anthropic-specific tool format\n *\n * @param tools - Array of standard Tool objects\n * @returns Array of Anthropic-specific tool definitions\n *\n * @example\n * ```typescript\n * const tools: Tool[] = [{\n * type: \"function\",\n * function: {\n * name: \"get_weather\",\n * description: \"Get weather for a location\",\n * parameters: {\n * type: \"object\",\n * properties: { location: { type: \"string\" } },\n * required: [\"location\"]\n * }\n * }\n * }];\n *\n * const anthropicTools = convertToolsToProviderFormat(tools);\n * ```\n */\nexport function convertToolsToProviderFormat<TTool extends Tool>(\n tools: Array<TTool>,\n): Array<AnthropicTool> {\n return tools.map((tool) => {\n const name = tool.name\n\n switch (name) {\n case 'bash':\n return convertBashToolToAdapterFormat(tool)\n case 'code_execution':\n return convertCodeExecutionToolToAdapterFormat(tool)\n case 'computer':\n return convertComputerUseToolToAdapterFormat(tool)\n case 'memory':\n return convertMemoryToolToAdapterFormat(tool)\n case 'str_replace_editor':\n return convertTextEditorToolToAdapterFormat(tool)\n case 'web_fetch':\n return convertWebFetchToolToAdapterFormat(tool)\n case 'web_search':\n return convertWebSearchToolToAdapterFormat(tool)\n default:\n return convertCustomToolToAdapterFormat(tool)\n }\n })\n}\n"],"names":[],"mappings":";;;;;;;;AAmCO,SAAS,6BACd,OACsB;AACtB,SAAO,MAAM,IAAI,CAAC,SAAS;AACzB,UAAM,OAAO,KAAK;AAElB,YAAQ,MAAA;AAAA,MACN,KAAK;AACH,eAAO,+BAA+B,IAAI;AAAA,MAC5C,KAAK;AACH,eAAO,wCAAwC,IAAI;AAAA,MACrD,KAAK;AACH,eAAO,sCAAsC,IAAI;AAAA,MACnD,KAAK;AACH,eAAO,iCAAiC,IAAI;AAAA,MAC9C,KAAK;AACH,eAAO,qCAAqC,IAAI;AAAA,MAClD,KAAK;AACH,eAAO,mCAAmC,IAAI;AAAA,MAChD,KAAK;AACH,eAAO,oCAAoC,IAAI;AAAA,MACjD;AACE,eAAO,iCAAiC,IAAI;AAAA,IAAA;AAAA,EAElD,CAAC;AACH;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BetaWebFetchTool20250910 } from '@anthropic-ai/sdk/resources/beta';
|
|
2
|
+
import { Tool } from '@tanstack/ai';
|
|
3
|
+
export type WebFetchTool = BetaWebFetchTool20250910;
|
|
4
|
+
export declare function convertWebFetchToolToAdapterFormat(tool: Tool): WebFetchTool;
|
|
5
|
+
export declare function webFetchTool(config?: Omit<WebFetchTool, 'type' | 'name'>): Tool;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function convertWebFetchToolToAdapterFormat(tool) {
|
|
2
|
+
const metadata = tool.metadata;
|
|
3
|
+
return {
|
|
4
|
+
name: "web_fetch",
|
|
5
|
+
type: "web_fetch_20250910",
|
|
6
|
+
...metadata
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
convertWebFetchToolToAdapterFormat
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=web-fetch-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-fetch-tool.js","sources":["../../../src/tools/web-fetch-tool.ts"],"sourcesContent":["import type { BetaWebFetchTool20250910 } from '@anthropic-ai/sdk/resources/beta'\nimport type { Tool } from '@tanstack/ai'\n\nexport type WebFetchTool = BetaWebFetchTool20250910\n\nexport function convertWebFetchToolToAdapterFormat(tool: Tool): WebFetchTool {\n const metadata = tool.metadata as Omit<WebFetchTool, 'type' | 'name'>\n return {\n name: 'web_fetch',\n type: 'web_fetch_20250910',\n ...metadata,\n }\n}\n\nexport function webFetchTool(\n config?: Omit<WebFetchTool, 'type' | 'name'>,\n): Tool {\n return {\n name: 'web_fetch',\n description: '',\n metadata: config,\n }\n}\n"],"names":[],"mappings":"AAKO,SAAS,mCAAmC,MAA0B;AAC3E,QAAM,WAAW,KAAK;AACtB,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,GAAG;AAAA,EAAA;AAEP;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { WebSearchTool20250305 } from '@anthropic-ai/sdk/resources/messages';
|
|
2
|
+
import { Tool } from '@tanstack/ai';
|
|
3
|
+
export type WebSearchTool = WebSearchTool20250305;
|
|
4
|
+
export declare function convertWebSearchToolToAdapterFormat(tool: Tool): WebSearchTool;
|
|
5
|
+
export declare function webSearchTool(config: WebSearchTool): Tool;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function convertWebSearchToolToAdapterFormat(tool) {
|
|
2
|
+
const metadata = tool.metadata;
|
|
3
|
+
return {
|
|
4
|
+
name: "web_search",
|
|
5
|
+
type: "web_search_20250305",
|
|
6
|
+
allowed_domains: metadata.allowedDomains,
|
|
7
|
+
blocked_domains: metadata.blockedDomains,
|
|
8
|
+
max_uses: metadata.maxUses,
|
|
9
|
+
user_location: metadata.userLocation,
|
|
10
|
+
cache_control: metadata.cacheControl || null
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
convertWebSearchToolToAdapterFormat
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=web-search-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-search-tool.js","sources":["../../../src/tools/web-search-tool.ts"],"sourcesContent":["import type { WebSearchTool20250305 } from '@anthropic-ai/sdk/resources/messages'\nimport type { CacheControl } from '../text/text-provider-options'\nimport type { Tool } from '@tanstack/ai'\n\nexport type WebSearchTool = WebSearchTool20250305\n\nconst validateDomains = (tool: WebSearchTool) => {\n if (tool.allowed_domains && tool.blocked_domains) {\n throw new Error(\n 'allowed_domains and blocked_domains cannot be used together.',\n )\n }\n}\n\nconst validateUserLocation = (tool: WebSearchTool) => {\n const userLocation = tool.user_location\n if (userLocation) {\n if (\n userLocation.city &&\n (userLocation.city.length < 1 || userLocation.city.length > 255)\n ) {\n throw new Error(\n 'user_location.city must be between 1 and 255 characters.',\n )\n }\n if (userLocation.country && userLocation.country.length !== 2) {\n throw new Error('user_location.country must be exactly 2 characters.')\n }\n if (\n userLocation.region &&\n (userLocation.region.length < 1 || userLocation.region.length > 255)\n ) {\n throw new Error(\n 'user_location.region must be between 1 and 255 characters.',\n )\n }\n if (\n userLocation.timezone &&\n (userLocation.timezone.length < 1 || userLocation.timezone.length > 255)\n ) {\n throw new Error(\n 'user_location.timezone must be between 1 and 255 characters.',\n )\n }\n }\n}\n\nexport function convertWebSearchToolToAdapterFormat(tool: Tool): WebSearchTool {\n const metadata = tool.metadata as {\n allowedDomains?: Array<string> | null\n blockedDomains?: Array<string> | null\n maxUses?: number | null\n userLocation?: {\n type: 'approximate'\n city?: string | null\n country?: string | null\n region?: string | null\n timezone?: string | null\n } | null\n cacheControl?: CacheControl | null\n }\n return {\n name: 'web_search',\n type: 'web_search_20250305',\n allowed_domains: metadata.allowedDomains,\n blocked_domains: metadata.blockedDomains,\n max_uses: metadata.maxUses,\n user_location: metadata.userLocation,\n cache_control: metadata.cacheControl || null,\n }\n}\n\nexport function webSearchTool(config: WebSearchTool): Tool {\n validateDomains(config)\n validateUserLocation(config)\n return {\n name: 'web_search',\n description: '',\n metadata: config,\n }\n}\n"],"names":[],"mappings":"AA+CO,SAAS,oCAAoC,MAA2B;AAC7E,QAAM,WAAW,KAAK;AAatB,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB,SAAS;AAAA,IAC1B,iBAAiB,SAAS;AAAA,IAC1B,UAAU,SAAS;AAAA,IACnB,eAAe,SAAS;AAAA,IACxB,eAAe,SAAS,gBAAgB;AAAA,EAAA;AAE5C;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tanstack/ai-anthropic",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Anthropic Claude adapter for TanStack AI",
|
|
5
|
+
"author": "",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/TanStack/ai.git",
|
|
10
|
+
"directory": "packages/typescript/ai-anthropic"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ai",
|
|
14
|
+
"anthropic",
|
|
15
|
+
"claude",
|
|
16
|
+
"tanstack",
|
|
17
|
+
"adapter"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"module": "./dist/esm/index.js",
|
|
21
|
+
"types": "./dist/esm/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/esm/index.d.ts",
|
|
25
|
+
"import": "./dist/esm/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"src"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@anthropic-ai/sdk": "^0.71.0",
|
|
34
|
+
"@tanstack/ai": "0.0.1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@vitest/coverage-v8": "4.0.14",
|
|
38
|
+
"zod": "^4.1.13"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@tanstack/ai": "0.0.1"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "vite build",
|
|
45
|
+
"clean": "premove ./build ./dist",
|
|
46
|
+
"lint:fix": "eslint ./src --fix",
|
|
47
|
+
"test:build": "publint --strict",
|
|
48
|
+
"test:eslint": "eslint ./src",
|
|
49
|
+
"test:lib": "vitest",
|
|
50
|
+
"test:lib:dev": "pnpm test:lib --watch",
|
|
51
|
+
"test:types": "tsc"
|
|
52
|
+
}
|
|
53
|
+
}
|