{"_id":"@alexion42/claude-agent-sdk-pi","_rev":"2-8d191aa398f9ea1e7d8b9f6f83b0d448","name":"@alexion42/claude-agent-sdk-pi","dist-tags":{"latest":"1.0.23"},"versions":{"1.0.22":{"name":"@alexion42/claude-agent-sdk-pi","version":"1.0.22","keywords":["pi-package"],"_id":"@alexion42/claude-agent-sdk-pi@1.0.22","maintainers":[{"name":"alexion42","email":"alexion@lexiupon.com"}],"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"b62d1576c2d0e6121e11ad13cdf8bdae095def52","tarball":"https://registry.npmjs.org/@alexion42/claude-agent-sdk-pi/-/claude-agent-sdk-pi-1.0.22.tgz","fileCount":7,"integrity":"sha512-TNlPM7iAv+WA/fDJ3ziiHJEP6ohSOIW8jFPrgcUYCVLoltIcdoisTkQxi/20gV6J4IAU5jXWKjGvtKCyfu/Zuw==","signatures":[{"sig":"MEYCIQDRj0v9RUOD+Bj9CY0R4nL7KLBBGJwy7ijYYO1dVRc2tgIhAKrFn3ZiemmBfnZUU4EeDnUe7kqjmiC0Wfmi48y5EXIl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":184170},"type":"module","gitHead":"4821050aceda523f7e48c4d05f46875b0caa187e","_npmUser":{"name":"alexion42","email":"alexion@lexiupon.com"},"_npmVersion":"11.1.0","description":"This extension registers a custom provider that routes LLM calls through the **Claude Agent SDK** while **pi executes tools** and renders tool results in the TUI.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"change-case":"^5.4.4","@anthropic-ai/sdk":"^0.73.0","@anthropic-ai/claude-agent-sdk":"0.2.126"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.3.0","@earendil-works/pi-ai":"^0.79.4","@earendil-works/pi-coding-agent":"^0.79.4"},"peerDependencies":{"@earendil-works/pi-ai":"^0.79.4","@earendil-works/pi-coding-agent":"^0.79.4"},"_npmOperationalInternal":{"tmp":"tmp/claude-agent-sdk-pi_1.0.22_1781549403075_0.33277326622698555","host":"s3://npm-registry-packages-npm-production"}},"1.0.23":{"name":"@alexion42/claude-agent-sdk-pi","version":"1.0.23","keywords":["pi-package"],"type":"module","dependencies":{"@anthropic-ai/claude-agent-sdk":"^0.3.183","@anthropic-ai/sdk":"^0.105.0","change-case":"^5.4.4"},"peerDependencies":{"@earendil-works/pi-ai":"^0.79.7","@earendil-works/pi-coding-agent":"^0.79.7"},"devDependencies":{"@earendil-works/pi-ai":"^0.79.7","@earendil-works/pi-coding-agent":"^0.79.7","@types/node":"^26.0.0","typescript":"^6.0.3"},"publishConfig":{"access":"public"},"pi":{"extensions":["./index.ts"]},"_id":"@alexion42/claude-agent-sdk-pi@1.0.23","gitHead":"59aff858c8ebe2a2645fca6110a26252d6567b54","description":"This extension registers a custom provider that routes LLM calls through the **Claude Agent SDK** while **pi executes tools** and renders tool results in the TUI.","_nodeVersion":"24.14.1","_npmVersion":"11.1.0","dist":{"integrity":"sha512-l9quwrGHnyL1u7y0uBM8+O9gvZ69LDuCCIgICADrk5ThJT5fDqqdjsUVKNNjb2iOdksro/eTwVHwXGWZgcAUpw==","shasum":"381f9d991e1828d19a6c1e622d4f021d9da90246","tarball":"https://registry.npmjs.org/@alexion42/claude-agent-sdk-pi/-/claude-agent-sdk-pi-1.0.23.tgz","fileCount":7,"unpackedSize":184201,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCgzKxwkFbAp8HrunRowyCoedg6/p1Inxi6x/H8ue999wIhANo2os1YNtH09OvfGw4NoAFv+M+zyWZgg57otD6K5t2S"}]},"_npmUser":{"name":"alexion42","email":"alexion@lexiupon.com"},"directories":{},"maintainers":[{"name":"alexion42","email":"alexion@lexiupon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/claude-agent-sdk-pi_1.0.23_1781858235728_0.8715346345303514"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-15T18:50:02.916Z","modified":"2026-06-19T08:37:16.034Z","1.0.22":"2026-06-15T18:50:03.257Z","1.0.23":"2026-06-19T08:37:15.923Z"},"keywords":["pi-package"],"description":"This extension registers a custom provider that routes LLM calls through the **Claude Agent SDK** while **pi executes tools** and renders tool results in the TUI.","maintainers":[{"name":"alexion42","email":"alexion@lexiupon.com"}],"readme":"# @alexion42/claude-agent-sdk-pi\n\nThis extension registers a custom provider that routes LLM calls through the **Claude Agent SDK** while **pi executes tools** and renders tool results in the TUI.\n\n## Highlights\n\n- Claude Agent SDK is used as the LLM backend (Claude Code auth or API key).\n- Tool execution is **blocked in Claude Code**; pi executes tools natively.\n- Built-in tool calls are mapped to Claude Code tool names.\n- Custom tools are exposed to Claude Code via in-process MCP.\n- Skills can be appended to Claude Code’s default system prompt (optional).\n\n## Demo\n\n![Demo](screenshot.png)\n\n## Setup\n\n1) Install the extension globally (npm is the preferred source now):\n\n```\npi install npm:@alexion42/claude-agent-sdk-pi\n```\n\n(You can pin a specific version for reproducible installs.)\n\n**Alternative (git):**\n\n```\npi install git:github.com/jcaose/claude-agent-sdk-pi\n```\n\nSee **pi-coding-agent** install docs for other install sources and paths.\n\n2) **Authenticate** (choose one):\n\n- **Claude Code login** (Pro/Max):\n  ```bash\n  npx @anthropic-ai/claude-code\n  ```\n  Ensure no API key env vars are set.\n\n- **API key** (API plan):\n  ```bash\n  export ANTHROPIC_API_KEY=sk-ant-...\n  ```\n\n3) Reload pi:\n\n```\n/reload\n```\n\n## Provider ID\n\n`claude-agent-sdk`\n\nUse `/model` to select:\n- `claude-agent-sdk/claude-opus-4-5`\n- `claude-agent-sdk/claude-haiku-4-5`\n\n## Tool Behavior\n\n- Claude Code **proposes** tool calls.\n- pi **executes** them.\n- Tool execution in Claude Code is **denied**.\n\nBuilt-in tool mapping (Claude Code → pi):\n\n- Read → read\n- Write → write\n- Edit → edit\n- Bash → bash\n- Grep → grep\n- Glob → find\n\nClaude Code only sees the tools that are active in pi.\n\n### Custom tools\n\nAny extra tools registered in pi are exposed to Claude Code via an in-process MCP server:\n\n- MCP server name: `custom-tools`\n- Claude Code tool name format: `mcp__custom-tools__<toolName>`\n- Example: `mcp__custom-tools__subagent`\n\nThe provider automatically maps these back to the pi tool name (e.g. `subagent`).\n\n## Context loading\n\n1) **Append to system prompt (Default)**\n   - Uses **AGENTS.md + skills** from pi and appends to Claude Code’s preset prompt.\n   - No extra config needed.\n\n2) **Use Claude Code’s dir (Recommended)**\n   - Set `appendSystemPrompt: false` so Claude Code loads its own resources from `.claude/`.\n   - By default it loads both user + project settings (`[\"user\",\"project\"]`).\n   - If you want to **ignore project-level `.claude/` folders**, set `settingSources: [\"user\"]`.\n   - This provider runs Claude Code in a **tool-denied** mode (pi executes tools), so auto-loading MCP servers from\n     `~/.claude.json` is usually just token overhead. By default, the provider passes `--strict-mcp-config` to prevent\n     that tool schema dump. Set `strictMcpConfig: false` to opt out.\n\n   **Config (user-only CLAUDE.md/skills + no MCP auto-load):**\n   ```json\n   {\n     \"claudeAgentSdkProvider\": {\n       \"appendSystemPrompt\": false,\n       \"settingSources\": [\"user\"],\n       \"strictMcpConfig\": true\n     }\n   }\n   ```\n\n   ```bash\n   ln -s ~/.pi/agent/AGENTS.md ~/.claude/CLAUDE.md\n   ln -s ~/.pi/agent/skills ~/.claude/skills\n   ```\n\n3) **Append + full isolation**\n   - Pi skills in the prompt, but no settings/MCP inheritance from Claude Code.\n\n   ```json\n   {\n     \"claudeAgentSdkProvider\": {\n       \"appendSystemPrompt\": true,\n       \"settingSources\": [],\n       \"strictMcpConfig\": true\n     }\n   }\n   ```\n","readmeFilename":"README.md"}