{"_id":"@ageflow/runner-claude","_rev":"7-eb77de1c4ccdc4c88ad8b4c34fb61690","name":"@ageflow/runner-claude","dist-tags":{"latest":"0.3.5"},"versions":{"0.1.0":{"name":"@ageflow/runner-claude","version":"0.1.0","_id":"@ageflow/runner-claude@0.1.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"dist":{"shasum":"26a5a7b87be9d5e98cfb0f95681bb08b51fb4115","tarball":"https://registry.npmjs.org/@ageflow/runner-claude/-/runner-claude-0.1.0.tgz","fileCount":10,"integrity":"sha512-Niajo6XbaR+jJZPvwtirZuUOw0RoybjY+NBzpSMM3a7r1nhn/0MoZEpubev8GQpAt2P1GQF94vaXcGRTwC6AEw==","signatures":[{"sig":"MEUCIGm/DCP+GbvI/evca1gef/hxfvHtAut7BL6B3EwZcHg+AiEAjvVs9/n5DavNw5zKb87yrCFPMbqDjAPP1vcWZkisQ9w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70487},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"eae9a8649a06fea53d806b347241c2855d71a6ba","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"_npmVersion":"11.11.0","directories":{},"_nodeVersion":"25.8.1","dependencies":{"@ageflow/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","@types/bun":"^1.1.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/runner-claude_0.1.0_1776288856847_0.19732707570132324","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ageflow/runner-claude","version":"0.2.0","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/runner-claude@0.2.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/agentflow/packages/runners/claude","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"9e61097431ccaef9adb851932cc3e4f524e8789d","tarball":"https://registry.npmjs.org/@ageflow/runner-claude/-/runner-claude-0.2.0.tgz","fileCount":11,"integrity":"sha512-HU/GucCTethLtIlEYt3dKyFcKcK3Wr6BNTGP//K+4Nc5CDU37Q/NN2jt9b8HjB25gUbWxa5GyDVbN6zp9IoCHQ==","signatures":[{"sig":"MEUCIQD+PiYeumYk1IArRQe3mGpj+BX10Cd+NGHsODlhcIflWQIgJYKuDCu4uj8hIszSjurcXyTpm0//IbW7VJQsnmaexlg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72818},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c9ec02fd33cba8108a1255623ba329097acfe908","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Claude CLI subprocess runner for ageflow","directories":{},"_nodeVersion":"25.8.1","dependencies":{"@ageflow/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","@types/bun":"^1.1.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/runner-claude_0.2.0_1776330791280_0.9105757635526215","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ageflow/runner-claude","version":"0.3.0","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/runner-claude@0.3.0","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/runners/claude","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"9e2a9cfe0e089aa03aa29d4ab7bb174179c6d367","tarball":"https://registry.npmjs.org/@ageflow/runner-claude/-/runner-claude-0.3.0.tgz","fileCount":15,"integrity":"sha512-RSz0F9DwY3Ky/loVole7HL53hQXthzoyIY/YdLBOnP7RfCoLMhz6EKMR8pBr936ak1tyktpWYnsgKDnPrX93SA==","signatures":[{"sig":"MEUCIE4R2Ti/tfNq7J5hKHnOcJCBzffqfuRdFoiPOP+E+/QqAiEAon725vjcBBBT+LeMakFe4y5G6OBC2WMoCw5ydChNcR8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79976},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f055450765c4b4f8e6a06d3bcedb2e337395adb8","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Claude CLI subprocess runner for ageflow","directories":{},"_nodeVersion":"25.8.1","dependencies":{"@ageflow/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","@types/bun":"^1.1.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/runner-claude_0.3.0_1776377986626_0.7206512914513499","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@ageflow/runner-claude","version":"0.3.2","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/runner-claude@0.3.2","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/runners/claude","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"54a829ccfe2ad004725cb23bac415527b3385fee","tarball":"https://registry.npmjs.org/@ageflow/runner-claude/-/runner-claude-0.3.2.tgz","fileCount":19,"integrity":"sha512-1vyJaufykAIB/pmsR6hVfXi9TgpXSSyHcqjCSd5sBW9JA36dvFfu7OqW8vnQ+wkuJeMzsvaOCXqbSLNifoH17Q==","signatures":[{"sig":"MEYCIQCwbrdfD6xk1FMOfxNUd5nzhipndw+XGTLCG+tlkkKsXQIhAPdopOycw1TU5KEnCEevutbZq+wsZo7IuA1LcpM+gonu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80610},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"67e25292e8f64b4c7643f1ac12164e771122c632","private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Claude CLI subprocess runner for ageflow","directories":{},"_nodeVersion":"25.8.1","dependencies":{"@ageflow/core":"^0.3.2"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","@types/bun":"^1.1.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/runner-claude_0.3.2_1776395148809_0.6544844516638482","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@ageflow/runner-claude","version":"0.3.3","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/runner-claude@0.3.3","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/runners/claude","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"72e3315cf62dbd469fddae721d6f90ac0b67bf7c","tarball":"https://registry.npmjs.org/@ageflow/runner-claude/-/runner-claude-0.3.3.tgz","fileCount":23,"integrity":"sha512-14xaOBKE8VASgKe7On+nro0fKrZkKUE/uLa+M4uclzFETvITeXW9PaRRVkM/9yRG+KytD5onYddKpAcbQgmNDg==","signatures":[{"sig":"MEYCIQCmy64T6VnchsI8R9RJMsXSOZFfilHrigZ/ysXulsXB1AIhAKUAgDj0zRKdEo2tc3sWjDex7HSZ/SC8wi2F0hfEzevv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81059},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Claude CLI subprocess runner for ageflow","directories":{},"_nodeVersion":"25.8.1","dependencies":{"@ageflow/core":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","@types/bun":"^1.1.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/runner-claude_0.3.3_1776415465524_0.6890616609817743","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@ageflow/runner-claude","version":"0.3.4","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/runner-claude@0.3.4","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/runners/claude","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"dist":{"shasum":"9aed5bf1273a9fb5a69eaf0ece51101ec4b0b839","tarball":"https://registry.npmjs.org/@ageflow/runner-claude/-/runner-claude-0.3.4.tgz","fileCount":15,"integrity":"sha512-cyUyjNWOvtV1uMFJK4gvsX6dmh7gcAfaSa+SkgsZ/2Oj700dX/qEHy/OtB7KCoKrBa+ES9oVU94/w4mY8LMsvA==","signatures":[{"sig":"MEUCIHXePaOFikMmDSBPT7kUH4jUgIrD41D45aNomkYP5RjHAiEA50b8WMPsz+VbE/LeaAQhD993Ku1IyRSS9nAYHoVBDWU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79966},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"private":false,"scripts":{"lint":"biome check src/","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"repository":{"url":"git+https://github.com/Neftedollar/ageflow.git","type":"git"},"_npmVersion":"11.11.0","description":"Claude CLI subprocess runner for ageflow","directories":{},"_nodeVersion":"25.8.1","dependencies":{"@ageflow/core":"^0.5.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.0","@types/bun":"^1.1.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/runner-claude_0.3.4_1776422114667_0.13679935104384855","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@ageflow/runner-claude","version":"0.3.5","description":"Claude CLI subprocess runner for ageflow","homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/runners/claude","type":"module","private":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"vitest run","lint":"biome check src/"},"dependencies":{"@ageflow/core":"^0.6.0"},"devDependencies":{"@types/bun":"^1.1.0","@types/node":"^22.0.0","vitest":"^2.1.0"},"repository":{"type":"git","url":"git+https://github.com/Neftedollar/ageflow.git"},"keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"license":"MIT","_id":"@ageflow/runner-claude@0.3.5","bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"_nodeVersion":"25.8.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-EcyFFVL/FZJQSgpiSR6PjgkSqQN3Q/tTlkzECog03WhjXOOtiPDyyhJIvCmvnrHEAC9zkf67fj6xT6N9ZW4EMA==","shasum":"ec7e0d0deefad5bc6c1c98be47a36f6c3c9061e6","tarball":"https://registry.npmjs.org/@ageflow/runner-claude/-/runner-claude-0.3.5.tgz","fileCount":15,"unpackedSize":80457,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAvsEZ2d9IxjWmCYyt8+rvRLm7LZ31TCtUDfEDaml/ZvAiATXwD7tGZguQiI1QCubrTmw7qw0wXqTWOwhvKzxJIPGQ=="}]},"_npmUser":{"name":"neftedollar","email":"oildollar@gmail.com"},"directories":{},"maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/runner-claude_0.3.5_1776434943476_0.6767302927010517"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-15T21:34:16.759Z","modified":"2026-04-17T14:09:03.798Z","0.1.0":"2026-04-15T21:34:16.988Z","0.2.0":"2026-04-16T09:13:11.420Z","0.3.0":"2026-04-16T22:19:46.775Z","0.3.2":"2026-04-17T03:05:48.958Z","0.3.3":"2026-04-17T08:44:25.672Z","0.3.4":"2026-04-17T10:35:14.801Z","0.3.5":"2026-04-17T14:09:03.659Z"},"bugs":{"url":"https://github.com/Neftedollar/ageflow/issues"},"license":"MIT","homepage":"https://github.com/Neftedollar/ageflow/tree/master/packages/runners/claude","keywords":["ai","agents","workflow","llm","dsl","typescript","claude","openai","multi-agent"],"repository":{"type":"git","url":"git+https://github.com/Neftedollar/ageflow.git"},"description":"Claude CLI subprocess runner for ageflow","maintainers":[{"name":"neftedollar","email":"oildollar@gmail.com"}],"readme":"# @ageflow/runner-claude\n\n[![npm](https://img.shields.io/npm/v/@ageflow/runner-claude)](https://www.npmjs.com/package/@ageflow/runner-claude)\n\nClaude CLI runner for [ageflow](../../../README.md). Spawns the [`claude`](https://github.com/anthropics/claude-code) CLI as a subprocess and parses its JSON output.\n\n## Install\n\n```bash\nbun add @ageflow/runner-claude\n```\n\nRequires the Claude CLI to be installed and authenticated:\n\n```bash\nnpm install -g @anthropic-ai/claude-code\nclaude --version  # verify\n```\n\n## Usage\n\n```ts\nimport { registerRunner } from \"@ageflow/core\";\nimport { ClaudeRunner } from \"@ageflow/runner-claude\";\n\nregisterRunner(\"claude\", new ClaudeRunner());\n```\n\nThen use `runner: \"claude\"` in any `defineAgent` call:\n\n```ts\nconst myAgent = defineAgent({\n  runner: \"claude\",\n  model: \"claude-sonnet-4-6\",   // or \"claude-opus-4-6\", \"claude-haiku-4-5\"\n  input: z.object({ prompt: z.string() }),\n  output: z.object({ result: z.string() }),\n  prompt: ({ prompt }) => prompt,\n});\n```\n\n## Features\n\n- **Session continuity** — when an agent uses `sessionToken`, the runner passes `--resume <session_id>` to the CLI, preserving conversation context across calls\n- **HITL detection** — if Claude requests a tool the workflow hasn't approved, the runner surfaces a `HITLRequest` instead of throwing\n- **Automatic retries** — handled by the executor; the runner itself is stateless per call\n- **JSON output** — parses Claude's `--output-format json` JSONL stream, extracts the result line\n\n## Supported models\n\nAny model supported by your `claude` CLI version. Common values:\n\n| Model | ID |\n|---|---|\n| Claude Sonnet 4.6 | `claude-sonnet-4-6` |\n| Claude Opus 4.6 | `claude-opus-4-6` |\n| Claude Haiku 4.5 | `claude-haiku-4-5` |\n\n## Using MCP servers\n\nPass MCP server configuration via `mcp.servers` on any `defineAgent` call. The\nClaude runner passes `--mcp-config` with inline JSON and `--strict-mcp-config`\nto the Claude CLI — no external config file is required.\n\n```ts\nimport { defineAgent, safePath } from \"@ageflow/core\";\nimport { z } from \"zod\";\n\nconst fileAgent = defineAgent({\n  runner: \"claude\",\n  model: \"claude-sonnet-4-6\",\n  input: z.object({ query: z.string() }),\n  output: z.object({ result: z.string() }),\n  prompt: ({ query }) => query,\n  mcp: {\n    servers: [\n      {\n        name: \"filesystem\",\n        command: \"npx\",\n        args: [\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/workspace\"],\n        // Allowlist — only these tools are exposed to the model\n        tools: [\"read_file\", \"list_directory\"],\n        // Refine — validate path args before forwarding to the server\n        refine: {\n          read_file: z.object({ path: safePath({ allowAbsolute: false }) }),\n        },\n        // ${env:VAR} is resolved at launch time by the executor\n        env: { NODE_ENV: \"${env:NODE_ENV}\" },\n      },\n    ],\n  },\n});\n```\n\n**Allowlist** (`tools`): when set, only the listed tools are passed to the CLI\nvia `--allowedTools mcp__filesystem__read_file` flag (comma-joined). Unlisted tools are\ndenied before they reach the model.\n\n**Refine** (`refine`): a map of tool name → Zod schema. Arguments are validated\nagainst the schema before the call is dispatched. Use `safePath()` to prevent\npath traversal.\n\n**Environment expansion** (`env`): values of the form `${env:VAR}` are replaced\nwith the corresponding process environment variable at launch time.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}