opencode-trace-logger
v0.1.6
Published
OpenCode plugin for collecting coding-agent traces
Readme
opencode-trace-logger
OpenCode plugin that records agent events and tool calls to local JSONL trace files.
Traces are written under:
~/ai-traces/<project>/<session>/Each session directory includes:
events.jsonlfor plugin, event, and tool execution recordsfinal.diffcaptured when opencode exitsgit-status-final.txtcaptured when opencode exits
The logger redacts common API keys, GitHub tokens, bearer tokens, passwords, and token fields before writing events.
Install
Install into opencode with:
opencode plugin opencode-trace-loggerOr add it manually to ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-trace-logger"]
}Restart opencode after changing config so the plugin is loaded.
This package includes a TUI target for opencode's plugin installer, but trace collection runs through the server plugin entrypoint above.
Local Development
Build the package:
npm run buildTest the local build by adding the compiled file to opencode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["file:///absolute/path/to/opencode-trace-logger/dist/index.js"]
}If testing through the TUI plugin installer, use the package root rather than dist/index.js; the TUI target is exported at opencode-trace-logger/tui.
