4
近 30 天 +1
226
近 7 天 13
40.2
生态多维模型
1 个月前
2026-07-07
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@lucentia/opencode-trace@0.1.5"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@lucentia/opencode-trace@0.1.5"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @lucentia/opencode-traceopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
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