{"_id":"@dysporium-sdk/anthropic","_rev":"4-d57d4b8c4be0943265286214aa79a826","name":"@dysporium-sdk/anthropic","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"@dysporium-sdk/anthropic","version":"1.0.0","keywords":["ai","sdk","anthropic","claude","llm"],"license":"MIT","_id":"@dysporium-sdk/anthropic@1.0.0","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"dist":{"shasum":"035ff5ee66565881dfeeb0db6bfaf00537206b63","tarball":"https://registry.npmjs.org/@dysporium-sdk/anthropic/-/anthropic-1.0.0.tgz","fileCount":5,"integrity":"sha512-Uaiz8BRDd7xbsKJlBmd6unNyMKD3P2E8daUWBVxcuU3zWN4LlPzOd8HJ7sXXBdLEd6FJJANfSecPNPDmj7gYrw==","signatures":[{"sig":"MEQCICqmjcUdXD2Fja5N2aMkWYROB726rrhGWSuPmBzIwx+NAiAWyErPD0iMMkmExNxafL2d0uCKVz9zhmzUJSw2gDy8dA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66464},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0263ef9600d800d0f356a3be9f532319462f2d5c","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/anthropic"},"_npmVersion":"11.1.0","description":"Anthropic provider for Dysporium SDK","directories":{},"_nodeVersion":"20.18.2","dependencies":{"zod":"^3.22.4","@dysporium-sdk/core":"workspace:*","@dysporium-sdk/provider":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/anthropic_1.0.0_1765866508895_0.29829650823603493","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@dysporium-sdk/anthropic","version":"1.1.1","keywords":["ai","sdk","anthropic","claude","llm"],"license":"MIT","_id":"@dysporium-sdk/anthropic@1.1.1","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"dist":{"shasum":"3dcb39409777c1a649be92e7baff08af82ff0bfe","tarball":"https://registry.npmjs.org/@dysporium-sdk/anthropic/-/anthropic-1.1.1.tgz","fileCount":6,"integrity":"sha512-ZUR3nNwXCeIbV8YMIBWG1zmxWu/BQBCrzoaajpcQWVR32O0dSjzpYoyouMqa6nmvZb60CqNh/4+FviGdjtefOg==","signatures":[{"sig":"MEUCIBlLibJ2alOEDkyiaVucVa/88J3EbjRcwfzgPla8lkGKAiEAyFHFsWDXSCyIS5mYPsnGet/WNsq32tNXq/u2NHJeOqA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67583},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-anthropic-1.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\77e3db2d0b665207ed79b2d8bca409db\\dysporium-sdk-anthropic-1.1.1.tgz","_integrity":"sha512-ZUR3nNwXCeIbV8YMIBWG1zmxWu/BQBCrzoaajpcQWVR32O0dSjzpYoyouMqa6nmvZb60CqNh/4+FviGdjtefOg==","repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/anthropic"},"_npmVersion":"11.1.0","description":"Anthropic provider for Dysporium SDK","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.22.4","@dysporium-sdk/core":"^1.0.0","@dysporium-sdk/provider":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/anthropic_1.1.1_1766506836025_0.20954781507648224","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@dysporium-sdk/anthropic","version":"2.0.0","keywords":["ai","sdk","anthropic","claude","llm"],"license":"MIT","_id":"@dysporium-sdk/anthropic@2.0.0","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"dist":{"shasum":"4d305b33db9f4e2ee66fbeb7ab29fd1d78f151c6","tarball":"https://registry.npmjs.org/@dysporium-sdk/anthropic/-/anthropic-2.0.0.tgz","fileCount":6,"integrity":"sha512-0Xh5YT93SR8i4SMDBc+bA9ME7OHtbDSlVpmoYREtvWaKsW1MHszpg+50ZpOQ1mspXOVwltVPhdZ15Rb7J2/kSQ==","signatures":[{"sig":"MEQCICyIOaU4Kl+1EokZDslIjKulYvvKk8N6SmJgjgoQJeC2AiBVARSykx6fUTv2mz3YK7MUD3y3+NK+MHY41xzc2OB11A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69621},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-anthropic-2.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\ae14fb1e9a23ff60025ca5adb5fb2f90\\dysporium-sdk-anthropic-2.0.0.tgz","_integrity":"sha512-0Xh5YT93SR8i4SMDBc+bA9ME7OHtbDSlVpmoYREtvWaKsW1MHszpg+50ZpOQ1mspXOVwltVPhdZ15Rb7J2/kSQ==","repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/anthropic"},"_npmVersion":"11.1.0","description":"Anthropic provider for Dysporium SDK","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.22.4","@dysporium-sdk/core":"^2.0.0","@dysporium-sdk/provider":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/anthropic_2.0.0_1766772945490_0.18073206957068177","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@dysporium-sdk/anthropic","version":"3.0.0","description":"Anthropic provider for Dysporium SDK","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"keywords":["ai","sdk","anthropic","claude","llm"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","directory":"packages/anthropic"},"publishConfig":{"access":"public"},"dependencies":{"@dysporium-sdk/core":"^3.0.0","@dysporium-sdk/provider":"^3.0.0","@dysporium-sdk/utils":"^3.0.0","zod":"^3.22.4"},"devDependencies":{"@types/node":"^20.10.0","tsup":"^8.0.0","typescript":"^5.3.0"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"rm -rf dist"},"_id":"@dysporium-sdk/anthropic@3.0.0","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","_integrity":"sha512-DmvCwmYL7fhi3HUV/eVKr10q/wns90UKZzC++XfqmIqqFMVnfzMbOql0VfAqr2GXR96A05EPAsji+3GuL6Ok0Q==","_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\e5dbae96c7ab8719424b28dd4e6f3e1c\\dysporium-sdk-anthropic-3.0.0.tgz","_from":"file:dysporium-sdk-anthropic-3.0.0.tgz","_nodeVersion":"20.19.6","_npmVersion":"11.1.0","dist":{"integrity":"sha512-DmvCwmYL7fhi3HUV/eVKr10q/wns90UKZzC++XfqmIqqFMVnfzMbOql0VfAqr2GXR96A05EPAsji+3GuL6Ok0Q==","shasum":"2a6dc2ca1178a9f9f7f40d9cd680c1f6b43964f4","tarball":"https://registry.npmjs.org/@dysporium-sdk/anthropic/-/anthropic-3.0.0.tgz","fileCount":6,"unpackedSize":69659,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH1jcpf+FLSbzBO+OgeWZ7wynT+SzruirEmoVCAvzgwtAiEAkw8SwVKLGWUk+P2ixHYNZTgKAujkTZbgd88GaE3GQF4="}]},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"directories":{},"maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/anthropic_3.0.0_1766839876011_0.15905599966195494"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-16T06:28:28.803Z","modified":"2025-12-27T12:51:16.354Z","1.0.0":"2025-12-16T06:28:29.071Z","1.1.1":"2025-12-23T16:20:36.202Z","2.0.0":"2025-12-26T18:15:45.691Z","3.0.0":"2025-12-27T12:51:16.171Z"},"bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"license":"MIT","homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","keywords":["ai","sdk","anthropic","claude","llm"],"repository":{"type":"git","url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","directory":"packages/anthropic"},"description":"Anthropic provider for Dysporium SDK","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"readme":"# @dysporium-sdk/anthropic\r\n\r\nAnthropic provider for Dysporium SDK - integrate Claude models with a simple, type-safe API.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @dysporium-sdk/anthropic\r\n# or\r\npnpm add @dysporium-sdk/anthropic\r\n# or\r\nyarn add @dysporium-sdk/anthropic\r\n```\r\n\r\n> **Note:** This package includes all exports from `@dysporium-sdk/core`, so you only need to install this single package.\r\n\r\n## Quick Start\r\n\r\n```typescript\r\nimport { createAnthropic, generateText, streamText } from '@dysporium-sdk/anthropic';\r\n\r\nconst anthropic = createAnthropic({\r\n  apiKey: process.env.ANTHROPIC_API_KEY,\r\n});\r\n\r\n// Generate text\r\nconst result = await generateText({\r\n  model: anthropic('claude-sonnet-4-5'),\r\n  messages: [{ role: 'user', content: 'Hello!' }],\r\n});\r\n\r\nconsole.log(result.text);\r\n```\r\n\r\n## Features\r\n\r\n- Full Anthropic API support (Claude 4.5 Sonnet/Haiku/Opus, Claude 4, Claude 3.7, and legacy models)\r\n- Streaming responses\r\n- Tool/function calling\r\n- Automatic retries with exponential backoff\r\n- Full TypeScript support\r\n\r\n## Usage\r\n\r\n### Text Generation\r\n\r\n```typescript\r\nimport { createAnthropic, generateText } from '@dysporium-sdk/anthropic';\r\n\r\nconst anthropic = createAnthropic({ apiKey: 'your-api-key' });\r\n\r\nconst result = await generateText({\r\n  model: anthropic('claude-sonnet-4-5'),\r\n  messages: [\r\n    { role: 'user', content: 'What is the capital of France?' },\r\n  ],\r\n  maxTokens: 100,\r\n  temperature: 0.7,\r\n});\r\n\r\nconsole.log(result.text);\r\nconsole.log(result.usage); // { inputTokens, outputTokens, totalTokens }\r\n```\r\n\r\n### Streaming\r\n\r\n```typescript\r\nimport { createAnthropic, streamText } from '@dysporium-sdk/anthropic';\r\n\r\nconst anthropic = createAnthropic({ apiKey: 'your-api-key' });\r\n\r\nconst stream = await streamText({\r\n  model: anthropic('claude-sonnet-4-5'),\r\n  messages: [{ role: 'user', content: 'Write a poem about coding' }],\r\n});\r\n\r\nfor await (const chunk of stream) {\r\n  if (chunk.type === 'text-delta') {\r\n    process.stdout.write(chunk.textDelta);\r\n  }\r\n}\r\n```\r\n\r\n### Tool Calling\r\n\r\n```typescript\r\nimport { createAnthropic, generateText } from '@dysporium-sdk/anthropic';\r\n\r\nconst anthropic = createAnthropic({ apiKey: 'your-api-key' });\r\n\r\nconst result = await generateText({\r\n  model: anthropic('claude-sonnet-4-5'),\r\n  messages: [{ role: 'user', content: 'What is the weather in Paris?' }],\r\n  tools: [\r\n    {\r\n      name: 'get_weather',\r\n      description: 'Get current weather for a location',\r\n      parameters: {\r\n        type: 'object',\r\n        properties: {\r\n          location: { type: 'string', description: 'City name' },\r\n        },\r\n        required: ['location'],\r\n      },\r\n    },\r\n  ],\r\n});\r\n\r\nif (result.toolCalls) {\r\n  console.log(result.toolCalls);\r\n}\r\n```\r\n\r\n## Supported Models\r\n\r\n### Latest Models (Claude 4.5)\r\n\r\n- `claude-sonnet-4-5-20250929` / `claude-sonnet-4-5` - Best balance of intelligence, speed, and cost\r\n- `claude-haiku-4-5-20251001` / `claude-haiku-4-5` - Fastest model with near-frontier intelligence\r\n- `claude-opus-4-5-20251101` / `claude-opus-4-5` - Maximum intelligence with practical performance\r\n\r\n### Claude 4 Models\r\n\r\n- `claude-opus-4-1-20250805` / `claude-opus-4-1` - Enhanced Claude 4.1 Opus\r\n- `claude-sonnet-4-20250514` / `claude-sonnet-4-0` - Claude 4 Sonnet\r\n- `claude-opus-4-20250514` / `claude-opus-4-0` - Claude 4 Opus\r\n\r\n### Legacy Models\r\n\r\n- `claude-3-7-sonnet-20250219` - Claude 3.7 Sonnet\r\n- `claude-3-5-haiku-20241022` - Claude 3.5 Haiku\r\n- `claude-3-haiku-20240307` - Claude 3 Haiku (fast and efficient)\r\n\r\n## Configuration\r\n\r\n```typescript\r\nconst anthropic = createAnthropic({\r\n  apiKey: 'your-api-key',\r\n  baseURL: 'https://api.anthropic.com/v1', // Optional: custom base URL\r\n  retry: {\r\n    maxRetries: 3,\r\n    initialDelay: 1000,\r\n    maxDelay: 30000,\r\n  },\r\n});\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n\r\n","readmeFilename":"README.md"}