@lucentia/opencode-traceOpenCode plugin that saves raw JSON LLM request and response traces as JSONL
4
+1 in 30 days
226
13 in 7 days
40.2
Multi-signal model
1 month ago
2026-07-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": ["@lucentia/opencode-trace@0.1.5"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@lucentia/opencode-trace@0.1.5"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @lucentia/opencode-traceopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
This opencode plugin lets you see the raw json requests made to the LLM, and the responses. The output file is ${TRACE_FILENAME}.jsonl in TRACE_DIR.
This opencode plugin is designed specifically for FM-Agent.
Usage
This plugin strictly requires the provision of two environment variables: TRACE_DIR and TRACE_FILENAME. If either of these variables is missing, the plugin will take no action.
If the directory cannot be created or the file cannot be written, the plugin will take no action.
If the file already exists, the plugin's default behavior is to overwrite it.
Installation
Add the package to your OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@lucentia/opencode-trace"]
}
That installation path by default uses @latest, which opencode currently does't refresh when latest changes. You can force a refresh with rm -rf ~/.cache/opencode/packages/@lucentia/opencode-trace@latest