{"_id":"@aie-plugins/tool-calls","name":"@aie-plugins/tool-calls","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aie-plugins/tool-calls","version":"0.1.0","description":"aie plugin — capture which Claude Code tool ran on which file (body-free metadata) and stream collapsed tool-call cards into the chat","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","bun":"./dist/index.js","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"bun run build.ts","prepack":"bun run build.ts","test":"bun test"},"engines":{"bun":">=1.0.0"},"peerDependencies":{"aie":">=1.1.1"},"devDependencies":{"@types/bun":"latest","aie":">=1.1.1","typescript":"^5.9.0"},"keywords":["aie","aie-plugin","claude-code","tool-calls","hook","bun"],"license":"UNLICENSED","author":{"name":"arafathusayn"},"gitHead":"1b8ae9b0413b1ec18ad280831c4129fcbf363c90","_id":"@aie-plugins/tool-calls@0.1.0","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-6EpUVlVlUML6mpKI7YednEmvGEFW1LH0lCk3Xo7KIXJhgIsz51XAdtfTJfj0waUemioRRP4dN3lSs9W7mzX9kw==","shasum":"ef1a872d6ce73c53ad86cd19c6e64bf9845338cd","tarball":"https://registry.npmjs.org/@aie-plugins/tool-calls/-/tool-calls-0.1.0.tgz","fileCount":9,"unpackedSize":23990,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCw4jOh0FcWGUDjokARLg8iYBsUkLnSqWkQ0nrxn1IGMwIgGlmuBiZUdu/ncxqLS1npBpUIKLhAW7ftHd2B45/LY+A="}]},"_npmUser":{"name":"arafathusayn","email":"arafathusayn@gmail.com"},"directories":{},"maintainers":[{"name":"arafathusayn","email":"arafathusayn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tool-calls_0.1.0_1783255212077_0.5533375690397389"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-05T12:40:11.943Z","0.1.0":"2026-07-05T12:40:12.228Z","modified":"2026-07-05T12:40:12.421Z"},"maintainers":[{"name":"arafathusayn","email":"arafathusayn@gmail.com"}],"description":"aie plugin — capture which Claude Code tool ran on which file (body-free metadata) and stream collapsed tool-call cards into the chat","keywords":["aie","aie-plugin","claude-code","tool-calls","hook","bun"],"author":{"name":"arafathusayn"},"license":"UNLICENSED","readme":"# @aie-plugins/tool-calls\n\nAn [aie](https://www.npmjs.com/package/aie) plugin that records **which Claude Code tool ran on which\nfile** — plus body-free metadata — and streams each call as a collapsed card into the aie chat.\n\nIt captures the Bash **command** so you can see what ran, plus body-free structural metadata for every\nother tool — never file content, `Edit` strings, a full URL, or a prompt (offsets, lengths, counts,\nflags, globs, the host of a URL). It also filters out noise: `aie`'s own commands, and tool calls whose\ntarget files are all git-ignored (build artifacts, `node_modules`, `.aie`, …) or Claude Code task-output\nfiles (`…/tasks/*.output`), are never recorded.\n\n## Install\n\n```jsonc\n// your project's package.json\n\"dependencies\": {\n  \"aie\": \">=1.1.1\",\n  \"@aie-plugins/tool-calls\": \"^0.1.0\"\n}\n```\n\n## Enable it\n\nList the plugin in an `aie.config.ts` at the directory you run the aie server from:\n\n```ts\nimport type { AieConfig } from 'aie/kernel'\n\nexport default {\n  plugins: [{ module: '@aie-plugins/tool-calls', config: { max: 500 } }],\n} satisfies AieConfig\n```\n\nThen run the server from that directory (`bunx aie serve`) so it loads the plugin.\n\n## Wire the Claude Code hook\n\nAdd a hook that runs `aie cc-hook` on each tool event — in `~/.claude/settings.json` (global) or\n`<project>/.claude/settings.json` (project-scoped):\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [{ \"matcher\": \"\", \"hooks\": [{ \"type\": \"command\", \"command\": \"aie cc-hook\" }] }]\n  }\n}\n```\n\n`aie cc-hook` reads the hook JSON on stdin, appends a record to `<cwd>/.aie/tool-calls.jsonl`, and\nbest-effort POSTs it to the running server. It always exits 0 and writes nothing to stdout, so it can\nnever block or slow a tool call. Set `AIE_SESSION` (matching your `<AIE sessionId>`) so calls also\nstream into the live panel.\n\n## Read the log\n\n```\naie tool-calls                 # summary: totals, by tool, by file\naie tool-calls json            # one JSON record per line\naie tool-calls tool:Edit       # filter by tool\naie tool-calls file:src/App    # filter by file substring\n```\n\nThe JSONL under `.aie/` is the durable source of truth; the live panel is a per-session ring.\n\n## What gets provided\n\nThe default export is an aie `PluginModule` — `{ server, client, cli }`:\n\n- **server** — HTTP routes for the live SSE stream, the record intake, the side panel, and the\n  browser client module.\n- **client** — a tiny React-free browser module the aie chrome loads to render inline collapsed\n  tool-call cards, streamed live.\n- **cli** — the `aie cc-hook` (the Claude Code hook) and `aie tool-calls` (the report) commands.\n\nRequires `aie >= 1.1.1` as a peer dependency and runs under Bun (the aie server/CLI process).\n","readmeFilename":"README.md","_rev":"1-c7f75f7b610f0574b613399aced35676"}