Skip to content

OpenCode Configuration Inventory

盘点 OpenCode(sst / anomalyco, v1.17.11)所有配置项、存储位置、读写方式

日期:2026-06-28 状态:verified(实验 + 官方文档交叉验证) 关联:Profile Tab 补全、Library Extension(mcp / skill / agents / plugins)


0. 方法论

每个结论标注来源:

标记含义
🧪实验验证(agent-box 创建 exp-opencode profile + 现有 opencode-main profile 观察)
📖官方文档(opencode.ai/docs + GitHub sst/opencode / anomalyco/opencode)
🧪📖实验 + 文档双重验证

环境:OpenCode 1.17.11(Go 二进制,npm 安装),配置 ~/.config/opencode/,数据 ~/.local/share/opencode/,agent-box 模板在 src/agent_box/templates/opencode/ + templates/opencode-data/


1. 配置版图总览

1.1 用户可编辑配置(agent-box 应管理)

#配置项OpenCode 读取路径Profile 内对应路径写入方式验证
1opencode.jsonc~/.config/opencode/opencode.jsonc (JSONC)dot-opencode/opencode.jsoncJSON 合并🧪📖
2auth.json~/.local/share/opencode/auth.jsondot-opencode-data/auth.jsonJSON 覆盖🧪📖
3Provider configopencode.jsoncprovider.<id>同 opencode.jsoncJSON 写入🧪📖
4MCP Serversopencode.jsoncmcp同 opencode.jsoncJSON 内嵌,无独立文件🧪📖
5MCP OAuth~/.local/share/opencode/mcp-auth.jsondot-opencode-data/mcp-auth.jsonJSON 覆盖(auto-generated)📖
6Agentsopencode.jsoncagent.<name> + agents/ 目录dot-opencode/agents/Markdown 文件 + JSON📖
7Skills~/.config/opencode/skills/ + .opencode/skills/ + ~/.agents/skills/ + ~/.claude/skills/dot-opencode/skills/目录拷贝📖
8Commandsopencode.jsonccommand + commands/ 目录dot-opencode/commands/Markdown + JSON📖
9Pluginsopencode.jsoncplugin 数组 + plugins/ 目录dot-opencode/node_modules/npm install + 文件📖
10Tools permissionopencode.jsoncpermission同 opencode.jsoncJSON 写入📖
11Tools enabled/disabledopencode.jsonctools同 opencode.jsoncJSON 写入📖
12LSPopencode.jsonclsp同 opencode.jsoncJSON 写入📖
13Formatteropencode.jsoncformatter同 opencode.jsoncJSON 写入📖
14Instructions pathsopencode.jsoncinstructions同 opencode.jsoncJSON 写入📖
15Compaction / Snapshot / Autoupdate / Shareopencode.jsonc 顶层 keys同 opencode.jsoncJSON 写入📖
16Server / Watcheropencode.jsonc 顶层 keys同 opencode.jsoncJSON 写入📖

1.2 OpenCode 自动生成(agent-box 不管理,但需保留)

#路径内容验证
17~/.local/share/opencode/opencode.db* (db + shm + wal)运行时状态数据库(sessions, messages, etc.)🧪📖
18~/.local/share/opencode/log/opencode.log运行日志🧪📖
19~/.local/share/opencode/repos/已克隆的 git 仓库缓存🧪
20~/.local/share/opencode/snapshot/<hash>/文件快照(受 snapshot config 控制)🧪📖
21~/.local/share/opencode/tool-output/<id>/大工具输出临时文件🧪
22~/.local/share/opencode/auth.json (除手动添加的 provider 外)OAuth / 自动刷新的凭据🧪
23~/.local/share/opencode/mcp-auth.jsonMCP OAuth tokens📖
24~/.config/opencode/node_modules/ (npm plugin 安装)plugin npm 包🧪📖
25~/.config/opencode/package.json + package-lock.jsonplugin 依赖 manifest🧪
26~/.config/opencode/.gitignore自动生成(避免 node_modules 等进 git)🧪

1.3 项目级配置(不在 Profile 内,非 agent-box 管辖)

#配置项路径备注验证
27Project config<repo>/opencode.json / .opencode/项目根 opencode.json 优先于全局📖
28Project agents<repo>/.opencode/agents/项目级 subagents📖
29Project skills<repo>/.opencode/skills/项目级 skills📖
30Project commands<repo>/.opencode/commands/项目级 slash commands📖
31Project plugins<repo>/.opencode/plugins/项目级 JS/TS plugins📖
32Project modes<repo>/.opencode/modes/项目级 modes📖
33Project tools<repo>/.opencode/tools/项目级自定义 tools📖
34Project themes<repo>/.opencode/themes/项目级主题📖
35Remote .well-known<remote>/.well-known/opencode远程默认配置(最低优先级)📖
36MDM plist(macOS MDM managed)最高优先级,管理员部署📖

2. 关键配置项详解

2.1 opencode.jsonc 完整 schema

路径~/.config/opencode/opencode.jsonc → Profile dot-opencode/opencode.jsonc

优先级(从低到高,📖 官方):

Remote .well-known/opencode
  > global ~/.config/opencode/opencode.jsonc
  > custom OPENCODE_CONFIG env
  > project opencode.json (项目根)
  > .opencode/ directory
  > inline content
  > managed files
  > MDM plist

主要 schema

jsonc
{
  "$schema": "https://opencode.ai/config.json",

  // ── Provider ──
  "provider": {
    "custom-provider": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Custom Provider",
      "options": {
        "baseURL": "https://api.example.com/v1",
        "apiKey": "{env:CUSTOM_API_KEY}", // {env:VAR} 或 {file:path}
        "setCacheKey": true,
        "headers": { "X-Custom": "value" },
      },
      "models": {
        "model-id": {
          "name": "Display Name",
          "limit": { "context": 128000, "output": 4096 },
        },
      },
      "blacklist": ["bad-model-id"],
      "whitelist": ["allowed-model-id"],
    },
  },

  // ── Model ──
  "model": "custom-provider/model-id",
  "small_model": "custom-provider/cheaper-model",

  // ── Agent 覆盖 ──
  "agent": {
    "build": {
      "description": "...",
      "model": "...",
      "prompt": "{file:./prompts/build.txt}",
      "tools": { "bash": true, "edit": true },
      "permission": { "edit": "allow", "bash": "ask" },
      "temperature": 0.7,
      "steps": 100,
      "mode": "primary",
      "hidden": false,
      "color": "#FF0000",
      "top_p": 0.9,
    },
  },

  // ── Default agent ──
  "default_agent": "build", // "plan" | "build"

  // ── MCP Servers(嵌入,无独立文件)──
  "mcp": {
    "my-server": {
      "type": "local", // local|remote
      "command": ["npx", "-y", "@some/mcp"],
      "cwd": "/srv",
      "environment": { "API_KEY": "..." },
      "enabled": true,
      "timeout": 30000,
    },
    "my-http": {
      "type": "remote",
      "url": "https://example.com/mcp",
      "headers": { "Authorization": "..." },
      "oauth": {/* ... */},
      "enabled": true,
      "timeout": 30000,
    },
  },

  // ── Plugins(npm 包名数组)──
  "plugin": ["@opencode/plugin-foo", "@opencode/plugin-bar"],

  // ── Tools 控制 ──
  "tools": {
    "bash": true,
    "edit": true,
    "webfetch": true,
    "my-mcp-*": false, // 通配符禁启用
  },

  // ── Permission(每工具)──
  "permission": {
    "edit": "allow", // allow|ask|deny
    "bash": "ask",
    "webfetch": "allow",
  },

  // ── Command(自定义 slash commands)──
  "command": {
    "my-command": {
      "template": "Do something with $ARGUMENTS",
      "description": "My custom command",
      "agent": "build",
    },
  },

  // ── LSP ──
  "lsp": {
    "tsserver": { "enabled": true },
    "pyright": { "disabled": true },
  },

  // ── Formatter ──
  "formatter": {
    "prettier": { "disabled": false },
  },

  // ── Instructions paths ──
  "instructions": ["./AGENTS.md", "**/.opencode/instructions.md"],

  // ── Behavior ──
  "compaction": { "enabled": true, "max_tokens": 80000 },
  "snapshot": true, // 文件变更追踪
  "autoupdate": "notify", // true|false|"notify"
  "share": "manual", // "manual"|"auto"|"disabled"
  "watcher": { "ignore": ["node_modules/**", ".git/**"] },

  // ── Provider enable/disable ──
  "enabled_providers": ["anthropic", "openai"],
  "disabled_providers": ["cohere"],

  // ── Server ──
  "server": {
    "port": 0,
    "hostname": "127.0.0.1",
    "mdns": false,
    "mdnsDomain": "opencode.local",
    "cors": [],
  },

  // ── Shell ──
  "shell": { "path": "/bin/bash", "alias": {} },

  // ── Experimental ──
  "experimental": { "policies": true },

  // ── Attachment ──
  "attachment": {
    "image": { "auto_resize": true, "max_width": 2048 },
  },
}

变量替换(📖):{env:VAR_NAME}(环境变量)和 {file:path}(相对 config dir 或绝对路径)

Subdirectory naming.opencode/~/.config/opencode/ 下用复数目录:agents/, commands/, modes/, plugins/, skills/, tools/, themes/。单数形式为向后兼容保留。

2.2 auth.json 结构

路径~/.local/share/opencode/auth.json → Profile dot-opencode-data/auth.json

json
{
  "Provider Name": {
    "api_key": "sk-...",
    "base_url": "https://api.example.com/v1"
  },
  "Another Provider": {
    "api_key": "...",
    "base_url": "..."
  }
}

管理方式

  • TUI /connect 命令
  • CLI opencode auth(alias providers
  • opencode auth list — 列出已认证 providers

2.3 MCP Servers — 嵌入 opencode.jsonc

📖 OpenCode 没有独立的 MCP 文件(如 .mcp.json)。MCP 在 opencode.jsoncmcp 顶层 key 下。

Local (stdio) schema

jsonc
{
  "mcp": {
    "filesystem": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/tmp",
      ],
      "cwd": "/srv",
      "environment": { "LOG_LEVEL": "info" },
      "enabled": true,
      "timeout": 30000,
    },
  },
}

Remote (HTTP/SSE) schema

jsonc
{
  "mcp": {
    "my-http": {
      "type": "remote",
      "url": "https://example.com/mcp",
      "headers": { "X-Custom": "value" },
      "oauth": { "clientId": "...", "clientSecret": "..." },
      "enabled": true,
      "timeout": 30000,
    },
  },
}

OAuth 凭据缓存~/.local/share/opencode/mcp-auth.json(独立于 auth.json

全局禁用 MCP:用 tools 配置 glob:

jsonc
{
  "tools": { "my-mcp-*": false }

CLI

  • opencode mcp add [name] — 添加(交互或 stdin)
  • opencode mcp list | ls — 列出
  • opencode mcp auth [name] — OAuth 认证
  • opencode mcp logout [name] — 删除 OAuth
  • opencode mcp debug <name> — 调试 OAuth 连接

实验验证(🧪):host opencode mcp list 返回 "No MCP servers configured",确认 host 配置(仅 $schema)未设置任何 MCP。

2.4 Skills — 多路径发现

📖 OpenCode 沿 6 个路径搜索 skills(按顺序):

顺序路径Scope
1.opencode/skills/<name>/SKILL.mdproject
2~/.config/opencode/skills/<name>/SKILL.mdglobal
3.claude/skills/<name>/SKILL.mdproject (Claude compat)
4~/.claude/skills/<name>/SKILL.mdglobal (Claude compat)
5.agents/skills/<name>/SKILL.mdproject (Agent compat)
6~/.agents/skills/<name>/SKILL.mdglobal (Agent compat)

Walk-up behavior:从 cwd 向上 walk 到 git worktree boundary,加载所有匹配的 SKILL.md

格式要求

markdown
---
name: my-skill # required, must match directory name
description: My skill # required
license: MIT # optional
compatibility: opencode>=1.0 # optional
metadata: # optional, string → string map
  author: someone
---

# Skill content

...

命名规则(regex):^[a-z0-9]+(-[a-z0-9]+)*$,长度 1-64 字符。

2.5 Agents — Built-in + Custom

Built-in primary agents(📖):

  • build — 完整工具访问
  • plan — 只读

Built-in subagents

  • general — 通用子代理
  • explore — 代码探索(专门)
  • scout — 搜索(专门)

Hidden system agents(不可 UI 选择):compaction, title, summary

配置位置

  1. JSON in opencode.jsoncagent.<name> 顶层 key
  2. Markdown file
    • Global: ~/.config/opencode/agents/<name>.md
    • Project: .opencode/agents/<name>.md

Markdown frontmatter schema

yaml
---
description: Brief description for picker
model: provider/model-id
temperature: 0.7
steps: 100
mode: primary # primary|subagent|all
hidden: false
color: "#FF0000"
top_p: 0.9
permission:
  edit: allow # allow|ask|deny
  bash: ask
  webfetch: allow
tools:
  bash: true
  edit: true
---

CLI

  • opencode agent create — 交互式创建(flags: --path, --description, --mode, --permissions/--tools, --model/-m
  • opencode agent list — 列出可用 agents

Permission tools(按 last-match wins): read, edit, bash, glob, grep, list, task, webfetch, websearch, lsp, skill, question, external_directory

Task permissions:用 glob 控制哪些 subagent 可以被调用。

2.6 Plugins — npm 或本地

两种来源

  1. npm package:在 opencode.jsoncplugin 数组中列出
jsonc
{
  "plugin": ["@opencode/plugin-foo", "@opencode/plugin-bar"],
}

OpenCode 会在 ~/.config/opencode/bun install 安装这些包到 node_modules/

  1. Local JS/TS files
    • Global: ~/.config/opencode/plugins/*.ts*.js
    • Project: .opencode/plugins/*.ts*.js

加载顺序(📖):global config → project config → global plugins dir → project plugins dir

Plugin shape

typescript
import type { Plugin } from "@opencode-ai/plugin";

export const myPlugin: Plugin = async ({
  project,
  client,
  $,
  directory,
  worktree,
}) => {
  return {
    // Hook categories: Tool, Session, File, Message, Shell,
    //                  Permission, LSP, TUI, Todo, Server, Command, Installation
    "tool.execute.before": async (input, output) => {
      /* ... */
    },
    "session.start": async (session) => {
      /* ... */
    },
  };
};

依赖管理:在 config dir 下加 package.json,OpenCode 启动时自动 bun install

2.7 Commands — 自定义 slash commands

配置位置

  1. JSON in opencode.jsonccommand.<name> 顶层 key
jsonc
{
  "command": {
    "my-cmd": {
      "template": "Run $ARGUMENTS with my-custom logic",
      "description": "What this command does",
      "agent": "build",
    },
  },
}
  1. Markdown files
    • Global: ~/.config/opencode/commands/<name>.md
    • Project: .opencode/commands/<name>.md

2.8 覆盖机制(CLI flags)

opencode run flags(📖):

bash
opencode run [message..]
  --command, --continue/-c, --session/-s, --fork, --share
  --model/-m, --agent, --file/-f, --format, --title
  --attach, --password, --username, --dir
  --port, --variant, --thinking
  --dangerously-skip-permissions

Global flags

bash
--print-logs                 # logs to stderr
--log-level DEBUG|INFO|WARN|ERROR
--pure                       # 不加载 external plugins
--port, --hostname           # server 模式

Subcommand flags

  • upgrade --method curl/npm/pnpm/bun/brew
  • uninstall --keep-config/--keep-data/--dry-run/--force
  • serve + web 都支持 --port, --hostname, --mdns, --mdns-domain, --cors

Env vars

  • OPENCODE_CONFIG — 覆盖 config 路径
  • OPENCODE_CONFIG_DIR — 覆盖 config 目录
  • XDG_CONFIG_HOME / XDG_DATA_HOME — 覆盖 XDG 根

2.9 重要子命令

子命令用途
completion生成 shell completion 脚本
acp启动 ACP (Agent Client Protocol) server(stdin/stdout nd-JSON)
mcp管理 MCP servers(add/list/auth/logout/debug)
[project]默认 — 启动 TUI
attach <url>attach 到运行中的 opencode server
run [message..]headless 运行
debug调试和故障排查
providers管理 AI providers(alias auth
agent管理 agents(create/list)
upgrade升级到最新版本
uninstall卸载 + 清理
serve启动 headless server
web启动 server + web UI
models [provider]列出所有可用模型
statstoken 使用 + 成本统计
export导出会话为 JSON
import从 JSON 文件/URL 导入会话
github管理 GitHub agent
pr <number>拉取并 checkout PR, 然后运行 opencode
session管理 sessions
plugin安装 plugin 并更新 config
db [query]数据库工具(db path 看 SQLite 路径,query 支持 `--format json

3. 关键差异 vs Claude Code

维度Claude CodeOpenCode影响
配置格式JSONJSONC(带注释)agent-box JSON reader/writer 直接可用
双目录分割单目录 ~/.claude/双目录 ~/.config/opencode/ + ~/.local/share/opencode/agent-box 用两个 bind-mount(已有 dot-opencode + dot-opencode-data
MCP 文件~/.claude.json::mcpServersopencode.jsonc::mcp(嵌入)agent-box mcp.apply_opencode 写入 opencode.jsonc::mcp.servers.<id>
MCP schema{type, command, args, env, url, headers}`{type: localremote, command[], environment, url, headers}`
Skills 路径~/.claude/skills/ + ~/.agents/skills/6 路径(含 ~/.agents/skills/~/.claude/skills/agent-box skills.apply_opencode 复制到 dot-opencode/skills/<id>/
Pluginsmarketplace-based (enabledPlugins + extraKnownMarketplaces)npm package 数组 + 本地 plugins 目录不同的 plugin 机制,需独立实现
Agents无对应(只有 subagents via markdown)built-in (build, plan, general, explore, scout) + custom via markdown/JSONagent-box 可加 Agents tab
Commands~/.claude/commands/*.md~/.config/opencode/commands/*.md 或 JSON类似 markdown 文件
MCP OAuth 存储无对应~/.local/share/opencode/mcp-auth.jsonagent-box 可加 OAuth 凭据管理
DB 存储无 SQLite(jsonl 会话)SQLite (opencode.db)agent-box profile copy 时必须忽略 *.db, *.db-shm, *.db-wal
Snapshot 系统无对应~/.local/share/opencode/snapshot/<hash>/profile copy 必须忽略
node_modules~/.config/opencode/node_modules/ (npm plugins)profile copy 必须忽略(每个 profile 都重新 bun install 即可)
built-in agents无对应(用户写 subagent markdown)5 个(build, plan, general, explore, scout)agent-box 可选择性暴露 built-in agent 切换

4. agent-box 当前实现状态

4.1 ✅ 已实现

功能实现
MCP 应用mcp.py::_apply_opencode → 写入 opencode.jsonc::mcp.servers.<id>,unified→OpenCode 转换(stdio→local, sse/http→remote, command+args→command array, env→environment)
Skills 应用skills.py → 复制到 dot-opencode/skills/<id>/
Profile 模板templates/opencode/ + templates/opencode-data/ 双目录
双目录 mountlaunch.py 通过 profile_agent_data_dir 挂载 dot-opencode-data~/.local/share/opencode/
Providerproviders.py 支持写入 provider.<id> + model

4.2 ❌ 缺失 / 待实现

缺失项影响
Plugin 应用用户无法通过 GUI 管理 npm plugins 或 local plugins
Agent 应用用户无法通过 GUI 创建/管理 custom agents
Command 应用用户无法通过 GUI 创建/管理 custom slash commands
LSP 应用用户无法通过 GUI 切换 LSP server
Tools permission 应用用户无法通过 GUI 设置每工具的 allow/ask/deny
Snapshot / Compaction / Autoupdate 开关用户无法通过 GUI 控制这些 behavior flags
enabled_providers / disabled_providers 应用用户无法通过 GUI 启用/禁用 provider
db / stats / export / importGUI 无入口(通过 CLI 调用即可)
upgrade / uninstall / acpGUI 无入口(agent lifecycle 管理)
Agent .md file management只能通过文件系统管理 markdown agents
DB 备份profile copy 必忽略 opencode.db 系列文件
Snapshot 备份profile copy 必忽略 snapshot/<hash>/
Log 备份profile copy 必忽略 log/opencode.log
Tool-output 备份profile copy 必忽略 tool-output/<id>/
Repos 备份profile copy 必忽略 repos/
node_modules 备份profile copy 必忽略(重新 bun install 即可)
mcp-auth.json 备份profile copy 必忽略(OAuth 重新认证即可)
account.json 备份profile copy 必忽略(OpenCode 账户信息)
package.json + package-lock.json 备份profile copy 必忽略(plugin 依赖自动生成)
.gitignore 备份profile copy 必忽略(OpenCode 自动生成)
Plugin 路径歧义当前模板只放一个空 opencode.jsonc,未启用 plugin/npm 体系
Built-in agent 切换无法在 default_agent 切换 build/plan

5. Template 改进建议

src/agent_box/templates/opencode/ + templates/opencode-data/ 当前内容:

opencode/opencode.jsonc  — 24 行(schema + 一个 custom-provider 占位)
opencode-data/auth.json  — 7 行(Provider Name 占位)

建议补全 opencode.jsonc

jsonc
{
  "$schema": "https://opencode.ai/config.json",

  "provider": {
    "custom-provider": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Custom Provider",
      "options": {
        "baseURL": "",
        "apiKey": "",
        "setCacheKey": true,
      },
      "models": {
        "model-name": {
          "name": "Model Display Name",
          "limit": { "context": 128000, "output": 4096 },
        },
      },
    },
  },

  "model": "",
  "default_agent": "build", // plan|build

  "snapshot": true,
  "autoupdate": "notify",
  "share": "manual",

  "compaction": { "enabled": true },

  "watcher": {
    "ignore": ["node_modules/**", ".git/**", "dist/**", "build/**"],
  },

  "permission": {
    "edit": "ask",
    "bash": "ask",
    "webfetch": "allow",
    "websearch": "allow",
  },

  "tools": {
    "bash": true,
    "edit": true,
    "webfetch": true,
  },
}

建议补全 auth.json

json
{
  "Custom Provider": {
    "api_key": "",
    "base_url": ""
  }
}

新增模板文件

  • skills/.gitkeep — 让 skills 目录在 profile 落地时存在
  • agents/.gitkeep — agents markdown 目录
  • commands/.gitkeep — slash commands 目录
  • themes/.gitkeep — themes 目录
  • plugins/.gitkeep — local plugins 目录

Profile copy 时必须 ignore

路径模式原因
dot-opencode-data/opencode.db*SQLite 状态 DB(每次启动重建)
dot-opencode-data/log/运行日志
dot-opencode-data/snapshot/文件快照(自动生成)
dot-opencode-data/tool-output/大工具输出临时文件
dot-opencode-data/repos/克隆的 git 仓库
dot-opencode-data/mcp-auth.jsonOAuth tokens(重新认证即可)
dot-opencode-data/account.jsonOpenCode 账户信息
dot-opencode/node_modules/npm plugins(重新 bun install 即可)
dot-opencode/package*.jsonplugin 依赖 manifest(自动生成)
dot-opencode/.gitignoreOpenCode 自动生成

agent-box 当前 create()shutil.copytree(..., symlinks=True) 完整复制,需要新增 selective copy 机制 或在 profile_metadata 中维护 ignore 列表。


6. Profile Tab 设计建议

OpenCode profile 应包含以下 tab(基于本 inventory 的用户可编辑配置项):

Tab包含项编辑方式
Generaldisplay_name, description, agent_type, default_agent (build/plan)表单
Providerprovider map, model, small_model, enabled_providers, disabled_providersJSON 表单
Authauth.json (provider → {api_key, base_url})Key-value editor
MCP Servers启用/禁用 mcp entries (local/remote)Library 引用 + form
MCP OAuthmcp-auth.json 中的 server 状态只读 + 重新认证
Skills启用/禁用 skills (来自 Library)Library 引用
Agentsagent 列表(built-in + custom markdown/JSON)Markdown + JSON
Commandscommand 列表(JSON + markdown)Markdown + JSON
Pluginsplugin npm 数组 + local plugins表单
Toolstools enabled/disabled, per-tool permission表单
LSPlsp server 启用/禁用表单
Behaviorsnapshot, autoupdate, share, compaction表单
Watcherwatcher.ignore glob表单
Advancedraw opencode.jsoncJSONC editor

7. 待验证 / 已知缺口

状态备注
SQLite db 表结构📖 未确认需要 opencode db query 才能列出
account.json 来源🧪 观察到但 📖 未文档化可能由 TUI /connect 或 OAuth 创建
snapshot/<hash> 算法📖 未确认snapshot config 开关已确认
repos/ 用途🧪 观察到空目录 📖 未文档化推测为 git worktree 克隆缓存
tool-output/<id>/ 文件用途🧪 观察到空目录 📖 未文档化推测为 large-output 文件落地
Explore / Scout subagent schema📖 docs 提及但 schema 未详需要实测确认 prompt/tools 配置
Hidden system agents (compaction/title/summary)📖 docs 提及但不可选不应暴露给 GUI
mcp-auth.json 实际格式📖 docs 提及 OAuth 流程但未给 schema需要 OAuth 认证后查看实际文件
Built-in subagent prompt 内容📖 未确认影响 agent.prompt 默认值
acp server 协议完整规格📖 提及 stdio nd-JSON完整 protocol 未详

8. Sources

类型URL
📖 官方https://opencode.ai/docs/
📖 官方https://opencode.ai/docs/config/
📖 官方https://opencode.ai/docs/providers/
📖 官方https://opencode.ai/docs/cli/
📖 官方https://opencode.ai/docs/mcp-servers/
📖 官方https://opencode.ai/docs/skills/
📖 官方https://opencode.ai/docs/plugins/
📖 官方https://opencode.ai/docs/agents/
📖 GitHubhttps://github.com/sst/opencode (or anomalyco/opencode per docs footer)
🧪 实验~/.config/opencode/ + ~/.local/share/opencode/ host 目录结构(2026-06-28)
🧪 实验~/.agent-box/profiles/opencode-main/dot-opencode*/ 已运行 profile
🧪 实验agent-box create exp-opencode --type opencode(本次创建的 test profile)