opencode-to-atif-tracesOpenCode plugin to generate ATIF traces.
0
13
5 in 7 days
21.6
Multi-signal model
3 months ago
2026-05-07
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-to-atif-traces@0.0.2"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-to-atif-traces@0.0.2"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D opencode-to-atif-tracesopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode plugin to export Agent Trajectory Interchange Format (ATIF) traces.
Usage
Set the ATIF env var to the output path and run opencode as you normally would:
ATIF=traces.json \
opencode run "Refactor the XML parser to use a tree structure."
Tracing happens in the background, so you still get the normal stdout / stderr output from opencode in your terminal. This is in contrast with OpenCode's native --format=json, which replaces stdout with the JSON event stream and makes the run much less pleasant to watch interactively.
Status
Work in progress, and not yet battle-tested. The plan is to add tests that mirror the Harbor team's implementation, and to keep the schema in sync as ATIF evolves.
Contributions, issues, and feedback are very welcome. Please open an issue or PR if something is broken or could be better.
Install
Add the package to the plugin array in your opencode.json (see the OpenCode plugin docs):
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-to-atif-traces"]
}
OpenCode installs and caches plugin dependencies automatically on startup.
Acknowledgements
- Event subscription and emission (
tool_use,step_start,step_finish,text,reasoning) follows OpenCode's own JSON-format path inpackages/opencode/src/cli/cmd/run.ts. - Per-event ingest that groups events into turns by
step_start/step_finishis based on the Harbor team'ssrc/harbor/agents/installed/opencode.py(see commit6752089).
License
MIT