{"_id":"@aegis-kernel/anthropic","_rev":"3-4e842677b09d5ecfd3e63917479f98b4","name":"@aegis-kernel/anthropic","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@aegis-kernel/anthropic","version":"1.0.0","keywords":["anthropic","claude","tool-use","ai-safety","guardrails","llm-security"],"author":{"name":"Sneh Gabani","email":"sneh@aegis-kernel.dev"},"license":"MIT","_id":"@aegis-kernel/anthropic@1.0.0","maintainers":[{"name":"aegis-kernel","email":"sneh.gabani1999@gmail.com"}],"homepage":"https://aegis-kernel.dev","bugs":{"url":"https://github.com/Snehgabani/aegis-kernel/issues"},"dist":{"shasum":"42d04cc96629605128ab16aa0f808d060ff7baeb","tarball":"https://registry.npmjs.org/@aegis-kernel/anthropic/-/anthropic-1.0.0.tgz","fileCount":8,"integrity":"sha512-FDeoTBwNdWyZh+jedjoqQJTQUUB/XORJeNNvAi1NZXZncnYnMqjFz1jSvA+hJPrOKi8ObY6RUzjIyttDOVzOGQ==","signatures":[{"sig":"MEUCIGAmluWTge4AEEaWpYwSjZH+0Kwj+u81WwvSqh8AW6PMAiEApyWuFzrL7HECm69MAZ4aYCI9soc78FnogNzFOyQ7si0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17279},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":{"import":"./dist/index.d.ts","require":"./dist/index.d.cts"},"import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a5d907eb2f205ff5d5a96abcf5da33d1b900eaff","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsup"},"_npmUser":{"name":"aegis-kernel","email":"sneh.gabani1999@gmail.com"},"repository":{"url":"git+https://github.com/Snehgabani/aegis-kernel.git","type":"git","directory":"packages/anthropic"},"_npmVersion":"10.9.8","description":"Anthropic Claude tool_use deterministic invariant safety guard","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aegis-kernel/core":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","vitest":"^4.1.10","typescript":"^5.7.3","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/anthropic_1.0.0_1787148130892_0.5625789832622168","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0":{"name":"@aegis-kernel/anthropic","version":"1.1.0","keywords":["anthropic","claude","tool-use","ai-safety","guardrails","llm-security"],"author":{"name":"Sneh Gabani","email":"sneh@aegis-kernel.dev"},"license":"MIT","_id":"@aegis-kernel/anthropic@1.1.0","maintainers":[{"name":"aegis-kernel","email":"sneh.gabani1999@gmail.com"}],"homepage":"https://snehgabani.github.io/aegis-kernel/","bugs":{"url":"https://github.com/Snehgabani/aegis-kernel/issues"},"dist":{"shasum":"f252099eed371146b0851d8dc8a01cb52c29761b","tarball":"https://registry.npmjs.org/@aegis-kernel/anthropic/-/anthropic-1.1.0.tgz","fileCount":8,"integrity":"sha512-3+SmGuncDdUlEpTvT78LxBFyVt1zxBL/gnWKo49ZwHe0lN/ZaT90XBbLiwQVVGXvGZKxaCYjp8vafanKmIrgxQ==","signatures":[{"sig":"MEQCICxsvdFiQ+kP5JTOQLbm72gYQw9/Pbwg2Q0MPAfqIl8dAiA+yXMajm1ybSbn7z5q7MDVpGQX2V/edKT44ZOwg6okSg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aegis-kernel%2fanthropic@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17305},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":{"import":"./dist/index.d.ts","require":"./dist/index.d.cts"},"import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"6d41f24ec5a43c311fef98c4d2bb6f4962974295","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsup"},"_npmUser":{"name":"aegis-kernel","email":"sneh.gabani1999@gmail.com"},"repository":{"url":"git+https://github.com/Snehgabani/aegis-kernel.git","type":"git","directory":"packages/anthropic"},"_npmVersion":"10.8.2","description":"Anthropic Claude tool_use deterministic invariant safety guard","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@aegis-kernel/core":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","vitest":"^4.1.10","typescript":"^5.7.3","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/anthropic_1.1.0_1787306498815_0.9911072777813024","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2026-08-19T14:02:10.732Z","modified":"2026-08-30T02:36:06.237Z","1.0.0":"2026-08-19T14:02:11.025Z","1.1.0":"2026-08-21T10:01:38.963Z"},"bugs":{"url":"https://github.com/Snehgabani/aegis-kernel/issues"},"author":{"name":"Sneh Gabani","email":"sneh@aegis-kernel.dev"},"license":"MIT","homepage":"https://snehgabani.github.io/aegis-kernel/","keywords":["anthropic","claude","tool-use","ai-safety","guardrails","llm-security"],"repository":{"url":"git+https://github.com/Snehgabani/aegis-kernel.git","type":"git","directory":"packages/anthropic"},"description":"Anthropic Claude tool_use deterministic invariant safety guard","maintainers":[{"name":"aegis-kernel","email":"sneh.gabani1999@gmail.com"}],"readme":"# 🛡️ @aegis-kernel/anthropic\n\n> **Anthropic Claude Tool-Use Deterministic Safety Clearance Guard**  \n> *Pre-Execution Clearance • Claude `tool_use` / `tool_result` Interception • Structured Self-Healing Feedback*\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18.0-green.svg)](https://nodejs.org/)\n\n---\n\n## 🚀 Overview\n\n`@aegis-kernel/anthropic` intercepts Anthropic Claude `tool_use` content blocks and evaluates deterministic security invariants before tool execution occurs. If a tool call violates a policy invariant, it constructs a standardized `tool_result` error block containing actionable self-healing guidance for Claude to re-ask safely.\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install @aegis-kernel/anthropic @aegis-kernel/core\n```\n\n---\n\n## ⚡ Quickstart\n\n```typescript\nimport Anthropic from '@anthropic-ai/sdk';\nimport { AegisAnthropicGuard } from '@aegis-kernel/anthropic';\n\nconst anthropic = new Anthropic();\nconst guard = new AegisAnthropicGuard({\n  mode: 'enforce',\n  packs: ['@aegis/sql-guard', '@aegis/data-guard'],\n});\n\nconst response = await anthropic.messages.create({\n  model: 'claude-3-5-sonnet-20241022',\n  max_tokens: 1024,\n  messages: [{ role: 'user', content: 'Delete records older than 30 days' }],\n  tools: myClaudeTools,\n});\n\nfor (const content of response.content) {\n  if (content.type === 'tool_use') {\n    // Intercept, evaluate invariants, and execute\n    const resultBlock = await guard.handleToolUse(content, async (input) => {\n      return await executeMyTool(content.name, input);\n    });\n\n    // Feed resultBlock back to Claude in next turn\n    nextTurnMessages.push({ role: 'user', content: [resultBlock] });\n  }\n}\n```\n\n---\n\n## 📄 License\n\nDistributed under the [MIT License](https://opensource.org/licenses/MIT). Copyright (c) 2026 Sneh Gabani.\n","readmeFilename":"README.md"}