Skip to content
    ↑↓ select↵ openesc close
    English中文
    404MaximWang

    Trace

    v0.1.5Observability
    @lucentia/opencode-trace

    OpenCode plugin that saves raw JSON LLM request and response traces as JSONL

    GitHub stars

    4

    +1 in 30 days

    Monthly installs

    226

    13 in 7 days

    Composite scoreSCORE

    40.2

    Multi-signal model

    Last commit

    1 month ago

    2026-07-07

    Install and configure

    opencode.json

    Writes 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"]
    }

    opencode 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