@bd7pil/reeve

中文文档
0.2.12发布于 2026/10/29MITES Module零依赖构建来源已验证近 30 天下载 4534

REEVE orchestration layer for OpenCode v2: agent/skill registration, task ledger, GATE proxy (routing, fallback, ledger) and request stats

原始使用文档
文档目录8 节
  1. Requirements
  2. Install
  3. Tiers and agents
  4. GATE
  5. What the plugin adds to v2
  6. Options
  7. Tests
  8. License

@bd7pil/reeve — REEVE orchestration for OpenCode v2

This package is the whole REEVE system for OpenCode v2: agent definitions, the review skill, the child-task ledger with concurrency gates, wall-clock supervision and cross-restart reconciliation, and the in-process GATE proxy layer (routing, fallback chains, free lane, ledger, model catalog, stats).

There is no binary and no separate service. GATE is plain JavaScript inside the plugin; Bifrost and 9router are retired.

Requirements

  • Node.js >= 22
  • OpenCode v2 (tested 2.0.32 and 2.1.3)
  • Provider credentials in ~/.local/share/opencode/auth.json
  • Optional panel: OpenChamber >= 2.3.3, extension reeve from https://github.com/BD7PIL/reeve#reeve or the reeve-latest zip

Install

In ~/.config/opencode/opencode.jsonc:

{
  "model": "reeve/standard",
  "plugins": ["@bd7pil/reeve"]
}

The plugin registers five tiers and all agents. On first start it adds providers.reeve pointing at GATE (http://127.0.0.1:18080/v1) if missing; the write is additive and backed up. If 8080 is occupied, pin the port explicitly:

{
  "model": "reeve/standard",
  "plugins": [
    { "package": "@bd7pil/reeve", "options": { "gate": { "enabled": true, "port": 18080 } } }
  ],
  "providers": {
    "reeve": {
      "package": "@ai-sdk/openai-compatible",
      "settings": { "baseURL": "http://127.0.0.1:18080/v1" }
    }
  }
}

model is not optional: without it a bare opencode run or a fresh composer session can use the engine default and bypass GATE.

Tiers and agents

TierChainAgents
reeve/proreasoningplanner, advisor, critic
reeve/standardstandardexecutor, reviewer
reeve/flashfree-firstscout, librarian
reeve/multimodalvisionlooker (hidden, read-only, files on disk)

foreman is the visible primary orchestrator; it follows the session's model selection. 0.2.0 removed the reeve/manual single-target tier — pick a model directly in the composer when you want a specific one.

All tiers declare image input. A text-first reasoning request containing an image is routed to the vision chain for that request only; the session model does not change. Pasted images are handled at GATE; looker reads file paths.

GATE

  • Chains and providers: ~/.config/opencode/reeve/fallback.jsonc (panel-editable)
  • Free lane: discovers OpenCode Zen / OpenRouter models; free.require_image filters by modalities.input from models.dev (6h TTL, last-good cache); if metadata is unavailable it falls back to paid rather than using text-only free models.
  • Ledgers: ~/.reeve/ledger.json (panel snapshot) and ~/.reeve/gate.jsonl (request ledger, no keys).

What the plugin adds to v2

GapHow it is filled
no child-task statusreeve_task_status (read-only)
silent child deathterminal gate + grace window
no periodic reconciliationsession.hook("prompt")
no concurrency capadmission gate (limits)
no wall-clock timeoutsupervisor with exactly-once interrupt
hidden subagents missing from the tool rosterroster injected into the subagent description

It never writes agents.*.model; that key belongs to OpenChamber.

Options

{
  "plugins": [
    {
      "package": "@bd7pil/reeve",
      "options": {
        "wallClockMs": 1800000,
        "abortGraceMs": 10000,
        "retentionDays": 30,
        "limits": { "default": 8, "providers": {}, "models": {} },
        "snapshotPath": "~/.reeve/ledger.json",
        "gate": { "enabled": true, "port": 18080 },
        "agents": { "hideBuiltins": false }
      }
    }
  ]
}
  • limits.default: 0 means unlimited; an explicit value is recommended.
  • snapshotPath: read-only projection for the panel; writing it is optional.
  • gate.enabled: false disables the proxy layer (you then own the endpoint).
  • agents.hideBuiltins: false keeps the engine's native build / plan / general / explore agents visible in the composer picker (default true hides them — foreman is the default primary agent). Direct small tasks can then run on the native single-agent path while foreman keeps handling orchestrated ones.

Tests

From the repository root:

npm --prefix plugin test
npm run test:coverage

The suite covers routing, attempts/cooldown, error classification, free-lane discovery/expansion, config hot reload, image routing, concurrency, ledger, reconciliation, snapshot, stats, endpoint bootstrap, and the extension bridge. CI runs it on Ubuntu 22/24 and Windows 24.

License

MIT. See LICENSE in this package and the repository's NOTICE.md for third-party material. No oh-my-openagent (SUL-1.0) code or prompt literal is included.

版本与发布记录

@bd7pil/reeve 共发布 30 个版本,首次发布于 2026/10/20;过去 12 个月发布了 30 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.12latest2026/10/2910 天前
0.2.112026/10/2910 天前
0.2.102026/10/2711 天前
0.2.92026/10/2711 天前
0.2.82026/10/2712 天前
0.2.72026/10/2612 天前

关于 @bd7pil/reeve 的常见问题

@bd7pil/reeve 是什么?

REEVE orchestration layer for OpenCode v2: agent/skill registration, task ledger, GATE proxy (routing, fallback, ledger) and request stats

如何安装 @bd7pil/reeve?

在项目目录运行 npm install @bd7pil/reeve,或使用 pnpm add / yarn add / bun add。

@bd7pil/reeve 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bd7pil__reeve 是否存在。

@bd7pil/reeve 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bd7pil/reeve 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bd7pil/reeve 可以商用吗?

@bd7pil/reeve 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bd7pil/reeve 的下载量有多少?

根据 npm 官方下载统计,@bd7pil/reeve 在 2026/10/08 – 2026/11/06 这 30 天内被下载 4,534 次,日均约 151 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bd7pil/reeve 还在维护吗?

最新版本 0.2.12 发布于 2026/10/29(10 天前);至今共发布 30 个版本,其中过去 12 个月发布了 30 个;首次发布于 2026/10/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。