@aie-plugins/tool-calls
v0.1.0
Published
aie plugin — capture which Claude Code tool ran on which file (body-free metadata) and stream collapsed tool-call cards into the chat
Maintainers
Readme
@aie-plugins/tool-calls
An aie plugin that records which Claude Code tool ran on which file — plus body-free metadata — and streams each call as a collapsed card into the aie chat.
It captures the Bash command so you can see what ran, plus body-free structural metadata for every
other tool — never file content, Edit strings, a full URL, or a prompt (offsets, lengths, counts,
flags, globs, the host of a URL). It also filters out noise: aie's own commands, and tool calls whose
target files are all git-ignored (build artifacts, node_modules, .aie, …) or Claude Code task-output
files (…/tasks/*.output), are never recorded.
Install
// your project's package.json
"dependencies": {
"aie": ">=1.1.1",
"@aie-plugins/tool-calls": "^0.1.0"
}Enable it
List the plugin in an aie.config.ts at the directory you run the aie server from:
import type { AieConfig } from 'aie/kernel'
export default {
plugins: [{ module: '@aie-plugins/tool-calls', config: { max: 500 } }],
} satisfies AieConfigThen run the server from that directory (bunx aie serve) so it loads the plugin.
Wire the Claude Code hook
Add a hook that runs aie cc-hook on each tool event — in ~/.claude/settings.json (global) or
<project>/.claude/settings.json (project-scoped):
{
"hooks": {
"PreToolUse": [{ "matcher": "", "hooks": [{ "type": "command", "command": "aie cc-hook" }] }]
}
}aie cc-hook reads the hook JSON on stdin, appends a record to <cwd>/.aie/tool-calls.jsonl, and
best-effort POSTs it to the running server. It always exits 0 and writes nothing to stdout, so it can
never block or slow a tool call. Set AIE_SESSION (matching your <AIE sessionId>) so calls also
stream into the live panel.
Read the log
aie tool-calls # summary: totals, by tool, by file
aie tool-calls json # one JSON record per line
aie tool-calls tool:Edit # filter by tool
aie tool-calls file:src/App # filter by file substringThe JSONL under .aie/ is the durable source of truth; the live panel is a per-session ring.
What gets provided
The default export is an aie PluginModule — { server, client, cli }:
- server — HTTP routes for the live SSE stream, the record intake, the side panel, and the browser client module.
- client — a tiny React-free browser module the aie chrome loads to render inline collapsed tool-call cards, streamed live.
- cli — the
aie cc-hook(the Claude Code hook) andaie tool-calls(the report) commands.
Requires aie >= 1.1.1 as a peer dependency and runs under Bun (the aie server/CLI process).
