{"_id":"@atisse/provider-anthropic","_rev":"3-e0ba38fed577b3eac8da93a3357b0e3a","name":"@atisse/provider-anthropic","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@atisse/provider-anthropic","version":"1.0.0","_id":"@atisse/provider-anthropic@1.0.0","maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"dist":{"shasum":"f99fb1fa9fd1c35cbbca314cad908af0264b5ac1","tarball":"https://registry.npmjs.org/@atisse/provider-anthropic/-/provider-anthropic-1.0.0.tgz","fileCount":5,"integrity":"sha512-Pvp7NSjjY5Kq6K34/9y0mAluMhVMYV4B7199lRT336ZfHAynZI9TESKe9Vk5PVuxq3tUvsgr6QW4VTLAf9HWNQ==","signatures":[{"sig":"MEUCIQCq9ngD3BhU7ddgm6uUesaDLN4mAPjkYxFUA55XNp9wFQIgcDVW0+el6ozspWHNzlw7/5yw1jJ0yT0xxMVmkkbfvpM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26453},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"766fc1f9364cd3ca6750ca4c1dc4110f5b613b73","scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"softendo","email":"kadirkaradas5@gmail.com"},"_npmVersion":"11.17.0","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"packageManager":"pnpm@11.5.0","peerDependencies":{"@atisse/core":"workspace:*","@anthropic-ai/sdk":"^0.100.1"},"_npmOperationalInternal":{"tmp":"tmp/provider-anthropic_1.0.0_1781528308853_0.6872269713455186","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@atisse/provider-anthropic","version":"1.0.1","keywords":["llm","ai","anthropic","claude","provider","adapter","typescript","orchestration"],"author":"Abdulkadir Karadas(saferias)","license":"MIT","_id":"@atisse/provider-anthropic@1.0.1","maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"homepage":"https://github.com/abdulkadirkaradas/atisse#readme","bugs":{"url":"https://github.com/abdulkadirkaradas/atisse/issues"},"dist":{"shasum":"574614c08b2644c800a86d11fc5dc4bd705e9100","tarball":"https://registry.npmjs.org/@atisse/provider-anthropic/-/provider-anthropic-1.0.1.tgz","fileCount":7,"integrity":"sha512-PaQoabbrCblJBS92j2b9Ma/UUtkuRqXh1O/z8SdyzfwHeKQtj0Y0BEYYpeJaEoXoMh2+c4rHe3+5LEkjd4z4xg==","signatures":[{"sig":"MEUCIAin1hqkE0TI9q2NtyFWmP2+CvYQ5Fp1QhVplhk5v9peAiEA0cCxXIEwExiaKkydPUnc4txBzIrQ3lNhRYtUpfnvH0E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33214},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"softendo","email":"kadirkaradas5@gmail.com"},"repository":{"url":"git+https://github.com/abdulkadirkaradas/atisse.git","type":"git","directory":"packages/provider-anthropic"},"directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"peerDependencies":{"@atisse/core":"1.0.1","@anthropic-ai/sdk":"^0.100.1"},"_npmOperationalInternal":{"tmp":"tmp/provider-anthropic_1.0.1_1781790866749_0.7936909719374214","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"_id":"@atisse/provider-anthropic@1.0.2","bugs":{"url":"https://github.com/abdulkadirkaradas/atisse/issues"},"dist":{"shasum":"e426aa44f675d6a724c195b7308cc9896318d7f5","tarball":"https://registry.npmjs.org/@atisse/provider-anthropic/-/provider-anthropic-1.0.2.tgz","fileCount":7,"integrity":"sha512-YLHo/zmaHGp7jaX3HLXlAmkRbYmE1jZ8M3Y3JuSOo2N2ZzfAjQRmOjgOSlLM7f6xRn6ZD+lujcDWkKByaCGDPA==","signatures":[{"sig":"MEUCIQDleyCe+xscV/E06F5mfwbCB4em96+p4ssH0616P/F52wIgZpZGq5tNveaFJAYA8HI1HE1woVddKtV0jURhIc3w0to=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC5bZof49dT8MkDt1cfHw+Rr4Z+dER3yS0uqkO7oNArswIgUpQ7ISNg9ztK+pz2kuizwP1dqCEOS9aZSSoyqRL3juc="}],"unpackedSize":33214},"main":"./dist/index.js","name":"@atisse/provider-anthropic","type":"module","types":"./dist/index.d.ts","author":"Abdulkadir Karadas(saferias)","module":"./dist/index.js","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"license":"MIT","scripts":{"lint":"eslint src/","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage"},"version":"1.0.2","_npmUser":{"name":"softendo","email":"kadirkaradas5@gmail.com"},"homepage":"https://github.com/abdulkadirkaradas/atisse#readme","keywords":["llm","ai","anthropic","claude","provider","adapter","typescript","orchestration"],"repository":{"url":"git+https://github.com/abdulkadirkaradas/atisse.git","type":"git","directory":"packages/provider-anthropic"},"directories":{},"maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"peerDependencies":{"@atisse/core":"1.1.0","@anthropic-ai/sdk":"^0.125.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/provider-anthropic_1.0.2_1789407470746_0.05591789122727642"}}},"time":{"created":"2026-06-15T12:58:28.643Z","modified":"2026-09-14T17:37:51.003Z","1.0.0":"2026-06-15T12:58:28.995Z","1.0.1":"2026-06-18T13:54:26.884Z","1.0.2":"2026-09-14T17:37:50.836Z"},"bugs":{"url":"https://github.com/abdulkadirkaradas/atisse/issues"},"author":"Abdulkadir Karadas(saferias)","license":"MIT","homepage":"https://github.com/abdulkadirkaradas/atisse#readme","keywords":["llm","ai","anthropic","claude","provider","adapter","typescript","orchestration"],"repository":{"url":"git+https://github.com/abdulkadirkaradas/atisse.git","type":"git","directory":"packages/provider-anthropic"},"maintainers":[{"name":"softendo","email":"kadirkaradas5@gmail.com"}],"readme":"# @atisse/provider-anthropic\n\n[![npm version](https://img.shields.io/npm/v/@atisse/provider-anthropic.svg)](https://www.npmjs.com/package/@atisse/provider-anthropic)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../../LICENSE)\n\nAn Anthropic Claude provider adapter for `@atisse/core`. Implements the `AIProvider` interface to connect the orchestrator pipeline to Anthropic's Claude models, including Claude Sonnet 4.5.\n\n## Features\n\n- Full support for Claude models via the Anthropic Messages API\n- Streaming via `generateStream()` with per-character text deltas and tool call accumulation\n- Tool calling with automatic argument JSON parsing\n- Vision support via data URI image content\n- 200K context window\n- Automatic error mapping to `@atisse/core` error types (rate limit, auth, timeout, unavailable)\n- Provider options passthrough with reserved key validation\n- AbortSignal support for cancellation\n\n## Installation\n\n```bash\nnpm install @atisse/provider-anthropic\n# or\npnpm add @atisse/provider-anthropic\n```\n\n> `@atisse/core` and `@anthropic-ai/sdk@^0.100.1` are peer dependencies. Install them alongside this package.\n\n## Quick Start\n\n```typescript\nimport { Orchestrator } from '@atisse/core';\nimport { AnthropicProvider } from '@atisse/provider-anthropic';\n\nconst provider = new AnthropicProvider({\n  apiKey: process.env.ANTHROPIC_API_KEY,\n  model: 'claude-sonnet-4-5',\n});\n\nconst orchestrator = new Orchestrator({\n  provider,\n  systemPrompt: 'You are a concise assistant.',\n});\n\nconst result = await orchestrator.run({\n  prompt: 'Explain quantum computing in one sentence.',\n});\n\nconsole.log(result.text);\n```\n\n### With streaming\n\n```typescript\nconst stream = await orchestrator.run({\n  prompt: 'Write a haiku about streams.',\n  stream: true,\n});\n\nfor await (const chunk of stream) {\n  if (chunk.type === 'text') {\n    process.stdout.write(chunk.delta);\n  }\n}\n```\n\n### With tools\n\n```typescript\nconst orchestrator = new Orchestrator({\n  provider: new AnthropicProvider({\n    apiKey: process.env.ANTHROPIC_API_KEY,\n  }),\n  tools: [\n    {\n      name: 'get_weather',\n      description: 'Get current weather for a location',\n      inputSchema: {\n        type: 'object',\n        properties: {\n          location: { type: 'string' },\n        },\n        required: ['location'],\n      },\n      async execute(input: { location: string }) {\n        return { temperature: 22, condition: 'sunny' };\n      },\n    },\n  ],\n});\n\nconst result = await orchestrator.run({\n  prompt: 'What is the weather in London?',\n});\n```\n\n## API Reference\n\n`@atisse/provider-anthropic` package exports the following types and classes:\n\n<details>\n<summary>Click to expand</summary>\n\n### `AnthropicProvider`\n\nImplements `AIProvider` from `@atisse/core`.\n\n**Constructor**\n\n```typescript\nnew AnthropicProvider(config: AnthropicProviderConfig)\n```\n\n**`AnthropicProviderConfig` fields**\n\n| Field     | Type     | Default             | Description                    |\n| --------- | -------- | ------------------- | ------------------------------ |\n| `apiKey`  | `string` | —                   | Anthropic API key (required)   |\n| `model`   | `string` | `claude-sonnet-4-5` | Claude model identifier        |\n| `baseURL` | `string` | —                   | Custom API base URL (optional) |\n\n**Capabilities**\n\n| Property           | Value     |\n| ------------------ | --------- |\n| `streaming`        | `true`    |\n| `toolCalling`      | `true`    |\n| `vision`           | `true`    |\n| `maxContextTokens` | `200_000` |\n\n**Methods**\n\n| Method           | Signature                                                         | Description                                                                             |\n| ---------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------- |\n| `generate`       | `(request: PromptRequest) => Promise<PromptResponse>`             | Non-streaming completion. Maps messages, tools, and options into an Anthropic API call. |\n| `generateStream` | `(request: PromptRequest) => Promise<AsyncIterable<StreamChunk>>` | Streaming completion. Yields `text`, `tool_call`, and `done` chunks.                    |\n\n**Error mapping**\n\n| HTTP Status | Core Error                 | Retryable |\n| ----------- | -------------------------- | --------- |\n| 429         | `ProviderRateLimitError`   | Yes       |\n| 401, 403    | `ProviderAuthError`        | No        |\n| 408         | `ProviderTimeoutError`     | Yes       |\n| 500+        | `ProviderUnavailableError` | Yes       |\n\n</details>\n\n## Monorepo Ecosystem\n\n`@atisse/*` packages are part of the [atisse](https://github.com/abdulkadirkaradas/atisse) monorepo.\n\n- **[@atisse/core](../core)** — Execution kernel (required peer dependency)\n- **[@atisse/context-rag](../context-rag)** — RAG context provider\n- **[@atisse/memory-inmemory](../memory-inmemory)** — In-memory memory adapter\n- **[@atisse/memory-redis](../memory-redis)** — Redis memory adapter\n- **[@atisse/provider-openai](../provider-openai)** — OpenAI GPT provider\n\n## License\n\nMIT © [Abdulkadir Karadas(saferias)](https://github.com/abdulkadirkaradas)\n","readmeFilename":""}