@te-river/opencode-team-mode 1.5.1 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -218,7 +218,7 @@ In **OpenCode Desktop**, you get additional UX benefits:
218
218
 
219
219
  ---
220
220
 
221
- ## 🧯 Context governance (tm_* + R6) — new in v1.5.1
221
+ ## 🧯 Context governance (tm_* + R6 + R2) — new in v1.5.1
222
222
 
223
223
  > ⚠️ Requires `@te-river/opencode-team-mode@1.5.1` or later (released
224
224
  > 2026-09-08). If your config pins `@latest`, OpenCode upgrades on next start.
@@ -235,18 +235,56 @@ HMAC-signed, run-scoped, expiring handle. `tm_bash` only allows read-only
235
235
  commands (allowlist), and failures come back as structured errors instead of
236
236
  raw dumps.
237
237
 
238
- **R6 environment protection.** With TeamMode active, env-var reads by the
239
- model are blocked at the tool layer: env dump commands (`printenv`,
240
- `Get-ChildItem env:`, …), `$env:` / `$VAR` / `${VAR}` expansions, and env
241
- files (`.env`, shell rc files). The model sees a structured refusal and can
242
- ask the human instead; tm_* wrappers route through the same checks (no
243
- backdoor via the wrappers). Audit lines record only tool name + pattern
244
- category — never command text, paths, variable names or values.
238
+ **R6 environment protection (now an approval gate).** With TeamMode active,
239
+ the model cannot read environment variables silently. Env-var reads
240
+ (`printenv`, `env`, `Get-ChildItem env:`, …) and env files (`.env`, shell rc
241
+ files) route through OpenCode's **official confirmation dialog**: you get a
242
+ native prompt to approve or deny, and an unanswered prompt is **auto-rejected
243
+ after `TM_ASK_TIMEOUT_MIN` (default 10 min)** — the plugin only ever rejects
244
+ on timeout, never approves on the model's behalf. Env reads that no wildcard
245
+ can express (embedded `$VAR` / `${VAR}` / `$env:` inside another command,
246
+ command substitution, subshell/escaped forms) and the `tm_*` wrapper channel
247
+ stay a **hard block** (no dialog to slip through). tm_* wrappers route through
248
+ the same checks (no backdoor via the wrappers). Audit lines record only tool
249
+ name + pattern category + the verdict (`ask` / `allowed-once` /
250
+ `allowed-always` / `rejected` / `timeout-rejected` / `degraded`) — never
251
+ command text, paths, variable names or values.
252
+
253
+ **R2 dangerous operations (same dialog).** Delete (`rm`/`del`/`Remove-Item`/
254
+ `rmdir`), git publishing (`git push`/`git commit`), network fetch (`curl`/
255
+ `wget`/`Invoke-WebRequest`/`Invoke-RestMethod`), package installs/publishes
256
+ (`npm install`/`npm publish`/`pip install`/`winget`/`choco`), process/system
257
+ (`taskkill`/`Stop-Process`/`kill`/`shutdown`/`format`) and privilege changes
258
+ (`chmod`/`takeown`/`icacls`) — none are silently allowed. They pop the same
259
+ official dialog and are auto-rejected if you don't answer within the timeout.
260
+ The normal verification stack (`npm test`, `tsc`, `git status`/`diff`) is NOT
261
+ gated, so day-to-day team work runs without interruption.
262
+
263
+ > ⚠️ **When you approve a dialog, pick "once" — not "always".** Verified on
264
+ > the live host, "always" records a far broader rule than the command you
265
+ > saw: approving `Get-ChildItem env:PATH` with "always" stores `Get-ChildItem
266
+ > *`, so every later `Get-ChildItem` runs with no dialog at all. Only the
267
+ > once-verdict keeps each gated operation individually human-checked.
268
+
269
+ > Deferral is per-session: env reads only route to the dialog in sessions
270
+ > running TeamMode's injected agents (or after such a session has shown one
271
+ > of these dialogs). In any other session (e.g. a stock `build`/`plan` chat)
272
+ > TeamMode's guard keeps hard-blocking env reads, since no dialog would back
273
+ > them there. Compound commands (`a; b`) are evaluated per segment by the
274
+ > host and approved through one dialog; the guard blocks them outright
275
+ > whenever any segment is an env read.
276
+
277
+ > The permission protocol was verified against a live `opencode serve` host
278
+ > (1.18.29) via SSE event capture; the Desktop dialog rendering itself is the
279
+ > one leg that still needs eyeballing in a real Desktop session. Headless
280
+ > `opencode run` auto-rejects an unanswered `ask` immediately (there is no
281
+ > human to prompt).
245
282
 
246
283
  | Env var | Default | Purpose |
247
284
  |---|---|---|
248
- | `TM_ENV_PROTECT` | `strict` | R6 mode: `strict` / `standard` / `off` |
249
- | `TM_ENV_PROTECT_EXTRA_DENY` | — | extra block patterns (regex list) |
285
+ | `TM_ENV_PROTECT` | `strict` | R6 mode: `strict` / `standard` / `off` (off also disarms the approval timer) |
286
+ | `TM_ASK_TIMEOUT_MIN` | `10` | minutes before an unanswered R6/R2 confirmation dialog is auto-rejected; minimum 3 minutes (the host's `permission.replied` reaches the plugin ~120 s late on the event bus — shorter values would auto-reject a just-approved request) |
287
+ | `TM_ENV_PROTECT_EXTRA_DENY` | — | extra block patterns (regex list; always a hard block, never dialog-governed) |
250
288
  | `TM_OFFLOAD_THRESHOLD` | `2000` | offload threshold (tokens, chars/4 estimate) |
251
289
  | `TM_PREVIEW_MAX_TOKENS` | `80` | preview hard cap |
252
290
  | `TM_FETCH_MAX_LINES` | `2000` | tm_fetch page cap |
@@ -254,6 +292,62 @@ category — never command text, paths, variable names or values.
254
292
  | `TM_TRAJECTORY_DIR` | `.trajectory/` | append-only tool-call ledger |
255
293
  | `TM_BLACKBOARD_TTL` | `7` | store retention (days) |
256
294
  | `TM_BASH_READONLY_ALLOWED` | built-in table | tm_bash allowlist |
295
+ | `TM_PTC_MAX_PROGRAM_CHARS` | `4000` | PTC program source length cap (chars) |
296
+ | `TM_PTC_MAX_CALLS` | `20` | PTC per-run bridge-call budget (1–200) |
297
+ | `TM_PTC_MAX_ERRORS` | `3` | PTC per-run error budget (1–50) |
298
+ | `TM_PTC_TIMEOUT_MS` | `60000` | PTC per-run wall-clock timeout (5s–10min) |
299
+ | `TM_PTC_ENGINE` | `auto` | PTC engine: `auto` (worker→inline degrade) / `worker` / `inline` |
300
+
301
+ ---
302
+
303
+ ## ⚡ Batch orchestration (`tm_ptc_run`) — new in v1.5.2
304
+
305
+ > Shipped in **v1.5.2** (2026-09-10). Requires `@te-river/opencode-team-mode@1.5.2`
306
+ > or later.
307
+
308
+ `tm_ptc_run` lets a specialist agent write **one async program** that makes N
309
+ governed `tm_*` calls in a single turn — zero LLM round-trips during the run,
310
+ only an aggregation summary returns to context. It is designed for batch
311
+ read-only tasks: multi-file reconnaissance, bulk grep + read aggregation,
312
+ cross-referencing search results.
313
+
314
+ ### How it works
315
+
316
+ The agent writes a program body using `tm.read(args)`, `tm.grep(args)`,
317
+ `tm.bash(args)`, `tm.fetch(args)` — same args as the four governed tools.
318
+ Each call returns `{ok:true, data}` (governed: inline text or an offload
319
+ handle) or `{ok:false, error:{tool,phase,line?,message}}`. The program
320
+ `return`s a value; it is JSON-serialized into the aggregation summary.
321
+
322
+ Programs containing `require`, `import`, `process`, `globalThis`, `Deno`,
323
+ `Bun`, `fs`, `net`, or `child_process` are rejected before execution (static
324
+ pre-scan, auxiliary guard).
325
+
326
+ ### Budgets (tighten-only)
327
+
328
+ The caller may tighten `max_calls`, `max_errors`, and `timeout_ms` — values
329
+ above the `TM_PTC_*` ceilings are clamped down; values below the floor are
330
+ clamped up. Hitting any budget stops the whole run; produced output is NOT
331
+ lost.
332
+
333
+ ### Engine (`TM_PTC_ENGINE`)
334
+
335
+ | Mode | Behavior |
336
+ |---|---|
337
+ | `auto` (default) | Tries `worker_threads` first; on failure degrades to `node:vm` with a `degraded-engine` mark in the summary |
338
+ | `worker` | Forces the worker engine (engine-error on failure) |
339
+ | `inline` | Forces the `node:vm` engine (30s compile timeout for sync busy-loops; await-gap residual documented) |
340
+
341
+ The worker engine runs the program in a dedicated thread with `env:{}`
342
+ (process.env emptied), `resourceLimits`, and hard wall-clock `terminate()`.
343
+ All governance (P2 path scope, P3 allowlist, R6, threshold offload, TTL)
344
+ applies to every bridged call — PTC is not a bypass layer.
345
+
346
+ ### Access
347
+
348
+ Five specialist agents (`implementer`, `tester`, `architect`, `reviewer`,
349
+ `researcher`) have `tm_ptc_run` in their whitelist. The `team` lead does
350
+ not — it orchestrates, it does not run batch programs itself.
257
351
 
258
352
  ---
259
353
 
@@ -264,12 +358,13 @@ opencode-team-mode/
264
358
  ├── package.json ← npm package definition
265
359
  ├── tsconfig.json ← TypeScript config
266
360
  ├── src/
267
- │ ├── index.ts ← Plugin entry (server(): config + R6 tool.execute.before + tool segment)
361
+ │ ├── index.ts ← Plugin entry (server(): config + R6 tool.execute.before + approval-gate event + tool segment)
268
362
  │ ├── agents.ts ← Agent definitions (prompts, modes, colors)
269
363
  │ ├── commands.ts ← Command definitions (templates, agent bindings)
270
364
  │ ├── blackboard.ts ← Shared blackboard + TTL auto-cleanup sweeper
271
- │ ├── envprotect.ts ← R6 env-var read protection (pattern engine + hook)
272
- │ ├── tm/ ← JIT layer-2 tools (tm_read / tm_grep / tm_bash / tm_fetch)
365
+ │ ├── envprotect.ts ← R6 env-var read protection + R2 ask-pattern sets (dialog vs hard-block)
366
+ │ ├── approval-gate.ts ← Unified approval gate: host-dialog timeout auto-reject (never self-allows)
367
+ │ ├── tm/ ← JIT layer-2 tools (tm_read / tm_grep / tm_bash / tm_fetch / tm_ptc_run)
273
368
  │ └── types.ts ← Loader-contract type definitions (1.18.x)
274
369
  ├── scripts/
275
370
  │ ├── install.sh ← One-click installer (bash)
@@ -284,7 +379,7 @@ opencode-team-mode/
284
379
 
285
380
  1. OpenCode Desktop starts and loads `opencode.json(c)`.
286
381
  2. It sees `"@te-river/opencode-team-mode@latest"` in the `plugin` array and loads the npm package.
287
- 3. The loader calls the plugin's `server(input, options)`, which registers a `config` hook; the hook injects 6 agents and 6 commands into the merged config. The same call installs the R6 `tool.execute.before` guard and registers the governed `tm_*` tools (see [Context governance](#-context-governance-tm--r6--new-in-v151) below).
382
+ 3. The loader calls the plugin's `server(input, options)`, which registers a `config` hook; the hook injects 6 agents and 6 commands into the merged config. The same call installs the R6 `tool.execute.before` guard, arms the unified R6/R2 approval gate (official dialog + `TM_ASK_TIMEOUT_MIN` auto-reject, wired through an `event` hook), and registers the governed `tm_*` tools (see [Context governance](#-context-governance-tm--r6--r2--new-in-v151) below).
288
383
  4. The plugin's `id: "team-mode"` is displayed as the plugin name in the Desktop UI.
289
384
  5. Agents and commands are immediately available in the Desktop UI — no file copying needed. User-defined agents with the same name always win (the plugin never clobbers them).
290
385
 
package/README.zh-CN.md CHANGED
@@ -213,7 +213,7 @@ team 完成。
213
213
 
214
214
  ---
215
215
 
216
- ## 🧯 上下文治理(tm_* + R6)—— v1.5.1 起提供
216
+ ## 🧯 上下文治理(tm_* + R6 + R2)—— v1.5.1 起提供
217
217
 
218
218
  > ⚠️ 需 `@te-river/opencode-team-mode@1.5.1` 或更新(2026-09-08 发布)。
219
219
  > 配置里钉 `@latest` 的用户,下次启动自动升级。
@@ -227,17 +227,47 @@ ERROR×N 统计 / 代码签名清单 / 二进制元信息,硬上限 80 token
227
227
  确实需要全文时,用 HMAC 签名、限本 run、带有效期的句柄经 `tm_fetch`
228
228
  分段取回。`tm_bash` 仅放行只读命令白名单,失败以结构化错误返回。
229
229
 
230
- **R6 环境变量保护。** TeamMode 激活时,模型读取环境变量的行为在工具层
231
- 被拦截:env 导出命令(`printenv`、`Get-ChildItem env:` 等)、
232
- `$env:` / `$VAR` / `${VAR}` 展开、环境文件(`.env`、shell rc 文件)。
233
- 模型收到结构化拒绝提示,需要变量值时向人类申请;tm_* 包装工具同样
234
- 过这套检查(不给包装层留后门)。审计日志只记工具名+模式类别——
235
- 绝不记录命令文本、路径、变量名或值。
230
+ **R6 环境变量保护(现已升级为审批门控)。** TeamMode 激活时,模型无法
231
+ 静默读取环境变量。env 导出命令(`printenv`、`env`、`Get-ChildItem env:`
232
+ 等)与环境文件(`.env`、shell rc 文件)会走 OpenCode **官方确认弹窗**:
233
+ 你会在桌面收到一次原生确认,超过 `TM_ASK_TIMEOUT_MIN`(默认 10 分钟)
234
+ 无人响应即**自动拒绝**——插件超时只会拒绝,绝不为模型自我放行。通配符
235
+ 表达不了的形态(命令里内嵌的 `$VAR` / `${VAR}` / `$env:`、命令替换、
236
+ 子 shell/转义写法)以及 `tm_*` 包装通道仍维持**代码级硬拦**(没有弹窗
237
+ 可钻)。tm_* 包装工具同样过这套检查(不给包装层留后门)。审计日志只记
238
+ 工具名 + 模式类别 + 裁决事件(`ask` / `allowed-once` / `allowed-always` /
239
+ `rejected` / `timeout-rejected` / `degraded`)——绝不记录命令文本、路径、
240
+ 变量名或值。
241
+
242
+ **R2 危险操作(同一个确认弹窗)。** 删除(`rm`/`del`/`Remove-Item`/
243
+ `rmdir`)、git 发布(`git push`/`git commit`)、网络(`curl`/`wget`/
244
+ `Invoke-WebRequest`/`Invoke-RestMethod`)、包安装与发布(`npm install`/
245
+ `npm publish`/`pip install`/`winget`/`choco`)、进程/系统(`taskkill`/
246
+ `Stop-Process`/`kill`/`shutdown`/`format`)、权限(`chmod`/`takeown`/
247
+ `icacls`)——都不再静默放行,而是弹同一个官方确认框,超时未响应即自动
248
+ 拒绝。日常验证栈(`npm test`、`tsc`、`git status`/`diff`)**不在**门控
249
+ 之列,团队协作照常无打扰运行。
250
+
251
+ > ⚠️ **批准弹窗时请选 once(仅此一次),不要选 always。** 真实宿主实测:
252
+ > always 记录的泛化规则远比当次命令宽——对 `Get-ChildItem env:PATH` 选
253
+ > always 会记下 `Get-ChildItem *`,此后所有 `Get-ChildItem` 都不再弹窗。
254
+ > 只有 once 能让每次危险操作继续单独过人手。
255
+
256
+ > 延后是**按会话**生效的:只有运行 TeamMode 注入角色的会话(或已弹过这类
257
+ > 确认框的会话)里的 env 读取才会被放行给弹窗;其他会话(如原生
258
+ > `build`/`plan`)里守护仍然直接硬拦——那里根本没有弹窗兜底。宿主对复合
259
+ > 命令(`a; b`)按段评估、单次弹窗批准整条;任一子段是 env 读取时守护整条
260
+ > 拦截。
261
+
262
+ > 权限协议已在真实 `opencode serve` 宿主(1.18.29)上经 SSE 事件捕获实测
263
+ > 核验;桌面弹窗的渲染本身仍需在真实 Desktop 会话里目视确认一次。非交互
264
+ > `opencode run` 下,无人应答的 `ask` 会被立即自动拒绝(没有人类可弹)。
236
265
 
237
266
  | 环境变量 | 靘莤 | 作用 |
238
267
  |---|---|---|
239
- | `TM_ENV_PROTECT` | `strict` | R6 模式:`strict` / `standard` / `off` |
240
- | `TM_ENV_PROTECT_EXTRA_DENY` | — | 追加拦截正则(分号分隔) |
268
+ | `TM_ENV_PROTECT` | `strict` | R6 模式:`strict` / `standard` / `off`(off 同时解除审批计时器) |
269
+ | `TM_ASK_TIMEOUT_MIN` | `10` | R6/R2 确认弹窗无人应答后自动拒绝的分钟数;最小 3 分钟(宿主的 `permission.replied` 经事件总线到达插件约延迟 ~120 秒——更小的值会把刚获批的请求误拒) |
270
+ | `TM_ENV_PROTECT_EXTRA_DENY` | — | 追加拦截正则(分号分隔;始终硬拦,不走弹窗) |
241
271
  | `TM_OFFLOAD_THRESHOLD` | `2000` | 卸载阈值(token,chars/4 估算) |
242
272
  | `TM_PREVIEW_MAX_TOKENS` | `80` | 预览硬上限 |
243
273
  | `TM_FETCH_MAX_LINES` | `2000` | tm_fetch 单段上限 |
@@ -245,6 +275,54 @@ ERROR×N 统计 / 代码签名清单 / 二进制元信息,硬上限 80 token
245
275
  | `TM_TRAJECTORY_DIR` | `.trajectory/` | 只追加工具调用账本 |
246
276
  | `TM_BLACKBOARD_TTL` | `7` | 存储保留天数 |
247
277
  | `TM_BASH_READONLY_ALLOWED` | 内置表 | tm_bash 只读白名单 |
278
+ | `TM_PTC_MAX_PROGRAM_CHARS` | `4000` | PTC 程序源码长度上限(字符) |
279
+ | `TM_PTC_MAX_CALLS` | `20` | PTC 单次运行桥接调用数上限(1–200) |
280
+ | `TM_PTC_MAX_ERRORS` | `3` | PTC 单次运行错误数上限(1–50) |
281
+ | `TM_PTC_TIMEOUT_MS` | `60000` | PTC 单次运行墙钟超时(5 秒–10 分钟) |
282
+ | `TM_PTC_ENGINE` | `auto` | PTC 引擎:`auto`(worker→inline 降级)/ `worker` / `inline` |
283
+
284
+ ---
285
+
286
+ ## ⚡ 批量编排(`tm_ptc_run`)—— v1.5.2 起提供
287
+
288
+ > 已随 **v1.5.2**(2026-09-10)发布。需 `@te-river/opencode-team-mode@1.5.2` 或更新。
289
+
290
+ `tm_ptc_run` 让专家代理编写**一个异步程序**,在单次回合中执行 N 次受治理的
291
+ `tm_*` 调用——运行期间零 LLM 往返,仅将聚合摘要返回上下文。设计用于批量
292
+ 只读任务:多文件侦察、批量 grep + read 聚合、交叉引用搜索结果。
293
+
294
+ ### 工作原理
295
+
296
+ 代理使用 `tm.read(args)`、`tm.grep(args)`、`tm.bash(args)`、`tm.fetch(args)`
297
+ 编写程序体——参数与四个受治理工具相同。每次调用返回 `{ok:true, data}`(已受
298
+ 治理:内联文本或卸载句柄)或 `{ok:false, error:{tool,phase,line?,message}}`。
299
+ 程序 `return` 一个值;它会被 JSON 序列化进聚合摘要。
300
+
301
+ 包含 `require`、`import`、`process`、`globalThis`、`Deno`、`Bun`、`fs`、`net`
302
+ 或 `child_process` 的程序会在执行前被拒绝(静态预扫描,辅助防护)。
303
+
304
+ ### 预算(仅收紧)
305
+
306
+ 调用方可收紧 `max_calls`、`max_errors` 和 `timeout_ms`——超过 `TM_PTC_*` 上限
307
+ 的值会被钳制到上限;低于下限的值会被钳制到下限。触达任一预算即整体停止运行;
308
+ 已产出的输出不会丢失。
309
+
310
+ ### 引擎(`TM_PTC_ENGINE`)
311
+
312
+ | 模式 | 行为 |
313
+ |---|---|
314
+ | `auto`(默认) | 优先尝试 `worker_threads`;失败时降级为 `node:vm`,摘要标记 `degraded-engine` |
315
+ | `worker` | 强制使用 worker 引擎(失败时返回 engine-error) |
316
+ | `inline` | 强制使用 `node:vm` 引擎(30 秒编译超时斩杀同步忙等;await 间隙残余已记录) |
317
+
318
+ worker 引擎在专用线程中运行程序,`env:{}` 清空 process.env、`resourceLimits`
319
+ 限量、硬墙钟 `terminate()`。所有治理(P2 路径范围、P3 白名单、R6、阈值卸载、
320
+ TTL)对每次桥接调用生效——PTC 不是绕过层。
321
+
322
+ ### 访问权限
323
+
324
+ 五个专家代理(`implementer`、`tester`、`architect`、`reviewer`、`researcher`)
325
+ 的白名单中包含 `tm_ptc_run`。`team` lead 不包含——它负责编排,不运行批量程序。
248
326
 
249
327
  ---
250
328
 
@@ -255,12 +333,13 @@ opencode-team-mode/
255
333
  ├── package.json ← npm 包定义
256
334
  ├── tsconfig.json ← TypeScript 配置
257
335
  ├── src/
258
- │ ├── index.ts ← 插件入口(server():config + R6 tool.execute.before 钩子 + tool 段)
336
+ │ ├── index.ts ← 插件入口(server():config + R6 tool.execute.before + 审批门 event 钩子 + tool 段)
259
337
  │ ├── agents.ts ← Agent 定义(prompts、模式、颜色)
260
338
  │ ├── commands.ts ← 命令定义(模板、Agent 绑定)
261
339
  │ ├── blackboard.ts ← 共享黑板 + TTL 自动清理清扫器
262
- │ ├── envprotect.ts ← R6 环境变量读取保护(模式引擎 + 钩子)
263
- │ ├── tm/ ← JIT 层 2 工具(tm_read / tm_grep / tm_bash / tm_fetch)
340
+ │ ├── envprotect.ts ← R6 环境变量读取保护 + R2 确认弹窗模式集(弹窗 vs 硬拦)
341
+ │ ├── approval-gate.ts ← 统一审批门:官方弹窗超时自动拒绝(绝不自我放行)
342
+ │ ├── tm/ ← JIT 层 2 工具(tm_read / tm_grep / tm_bash / tm_fetch / tm_ptc_run)
264
343
  │ └── types.ts ← 加载器契约类型定义(1.18.x)
265
344
  ├── scripts/
266
345
  │ ├── install.sh ← 一键安装脚本(bash)
@@ -275,7 +354,7 @@ opencode-team-mode/
275
354
 
276
355
  1. OpenCode 桌面版启动,加载 `opencode.json(c)`
277
356
  2. 检测到 `plugin` 数组中的 `"@te-river/opencode-team-mode@latest"`,加载 npm 包
278
- 3. 加载器调用插件的 `server(input, options)`,注册 `config` hook;hook 向合并后的配置注入 6 个 Agent 和 6 个命令。同一次调用还会安装 R6 的 `tool.execute.before` 防护,并注册受治理的 `tm_*` 工具(见下文“上下文治理”)
357
+ 3. 加载器调用插件的 `server(input, options)`,注册 `config` hook;hook 向合并后的配置注入 6 个 Agent 和 6 个命令。同一次调用还会安装 R6 的 `tool.execute.before` 防护、武装 R6/R2 统一审批门(官方确认弹窗 + `TM_ASK_TIMEOUT_MIN` 超时自动拒绝,经 `event` 钩子驱动),并注册受治理的 `tm_*` 工具(见下文“上下文治理”)
279
358
  4. 插件的 `id: "team-mode"` 作为插件名显示在桌面版 UI
280
359
  5. Agent 和命令立即在桌面版 UI 中可用 —— 无需复制任何文件;同名 Agent 以用户自定义优先(插件绝不覆盖)
281
360
 
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA0iB7C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAO9C,CAAA"}
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAA;AA4pB9D,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAO9C,CAAA"}
package/dist/agents.js CHANGED
@@ -23,6 +23,75 @@
23
23
  * - All agents run at temperature 0.2 for format discipline.
24
24
  */
25
25
  /* ------------------------------------------------------------------ */
26
+ /* Tool whitelist builder (Phase 2 / T2.1, G2 ruling "方案甲") */
27
+ /* ------------------------------------------------------------------ */
28
+ /**
29
+ * Builds the permission block that IS the agent's tool whitelist.
30
+ *
31
+ * Verified live (T0.4③): a "deny" permission removes the built-in tool
32
+ * from the model's tool surface entirely — zero bypass, zero hallucinated
33
+ * calls. So a whitelist = deny every excluded built-in + allow the kept
34
+ * set, exactly the shape the D6 probe validated
35
+ * (%TEMP%/opencode/tm-probe/workspace/opencode.json).
36
+ *
37
+ * G2 rulings baked in:
38
+ * - glob/list never enter the whitelist — file enumeration goes through
39
+ * tm_bash (ls / dir / Get-ChildItem);
40
+ * - webfetch/websearch excluded network-wide (P5 network zero);
41
+ * - "tm_*" covers exactly the four governed tools (tm_read / tm_grep /
42
+ * tm_bash / tm_fetch); the R6 env-protection hook aliases onto them
43
+ * unchanged, so narrowing the surface does not weaken the anti-backdoor
44
+ * chain.
45
+ *
46
+ * T2.1 review revision (Critical fix): the built-in bash RETURNS for the
47
+ * execution roles (team / implementer / reviewer / tester). G2 only ruled
48
+ * that glob/list enumeration goes through tm_bash — it never ruled away
49
+ * command execution, and tm_bash is a read-only allowlist that cannot run
50
+ * npm test / tsc / --help probes. R6 keeps governing bash's env surface
51
+ * through the envprotect hook, independently of this matrix.
52
+ */
53
+ const NEVER_ALLOWED = [
54
+ "read",
55
+ "grep",
56
+ "glob",
57
+ "list",
58
+ "apply_patch",
59
+ "webfetch",
60
+ "websearch",
61
+ "todowrite",
62
+ "lsp",
63
+ "skill",
64
+ "question",
65
+ ];
66
+ /** Built-ins granted per agent; every one NOT granted is denied. */
67
+ const PER_AGENT_TOOLS = ["edit", "write", "task", "bash"];
68
+ /** The governed tools, named explicitly next to the "tm_*" wildcard
69
+ * (belt-and-braces: the explicit allows survive even if a host ever
70
+ * stops expanding the wildcard). */
71
+ const TM_TOOLS = ["tm_read", "tm_grep", "tm_bash", "tm_fetch"];
72
+ /** M3: tm_ptc_run — explicit per-agent grant (five specialists = allow,
73
+ * team = deny to override the tm_* wildcard). Design §3: PTC is a
74
+ * governed, read-only bridge; the team lead orchestrates, it does not
75
+ * run batch programs itself. */
76
+ const PTC_TOOL = "tm_ptc_run";
77
+ const whitelist = (...granted) => {
78
+ const permission = {};
79
+ for (const tool of NEVER_ALLOWED)
80
+ permission[tool] = "deny";
81
+ for (const tool of PER_AGENT_TOOLS) {
82
+ permission[tool] = granted.includes(tool) ? "allow" : "deny";
83
+ }
84
+ for (const tool of TM_TOOLS)
85
+ permission[tool] = "allow";
86
+ permission["tm_*"] = "allow";
87
+ return permission;
88
+ };
89
+ /** Apply the M3 tm_ptc_run grant to an agent's permission block. The five
90
+ * specialists get `allow`; the team lead gets `deny` (overrides the wildcard). */
91
+ function applyPtcPermission(permission, isTeamLead) {
92
+ permission[PTC_TOOL] = isTeamLead ? "deny" : "allow";
93
+ }
94
+ /* ------------------------------------------------------------------ */
26
95
  /* Reply contract + hybrid blackboard (appended to every specialist) */
27
96
  /* ------------------------------------------------------------------ */
28
97
  const REPLY_CONTRACT = `
@@ -74,8 +143,9 @@ process management every run.
74
143
  ## Triage — classify before acting (Step 0, always)
75
144
  - Question ≠ work order. When the user asks, analyzes, or consults
76
145
  ("why does X fail?", "how would we do Y?"), ANSWER it — read code if
77
- useful, change nothing. If answering needs external knowledge, dispatch
78
- \`researcher\`; don't grind through it yourself.
146
+ useful, change nothing. If answering needs a deeper dig through the
147
+ codebase than your context affords, dispatch \`researcher\`; don't
148
+ grind through it yourself.
79
149
  - Spotted an obvious defect while answering? Propose the fix and WAIT for
80
150
  the go-ahead — never fix-on-the-sly.
81
151
  - Explicit action request ("fix X", "add Y", "refactor Z") → route via the
@@ -96,7 +166,7 @@ files — NOT docs, comments, formatting, NOT *.test.* files).
96
166
  | Docs / comments / formatting only | implementer (or direct edit, see below) |
97
167
  | Product behavior change (bug fix, small feature) | implementer → tester → reviewer |
98
168
  | Multi-module / cross-interface feature | architect → implementer → tester → reviewer(s) |
99
- | Unknown external tech / dependency in play | researcher first, then the fitting row above |
169
+ | Unfamiliar tech / dependency in play | researcher first (local-repo evidence: call sites, installed/vendored packages, shipped docs), then the fitting row above |
100
170
 
101
171
  - FIXED MINIMUM PIPELINES: the reviewer may be skipped ONLY for
102
172
  non-product artifacts, with a one-line reason. A product change routed
@@ -123,8 +193,9 @@ Count the dispatches your routing row prescribes:
123
193
  ONLY when it is genuinely absent. These docs define the conventions
124
194
  the whole team must follow; distill the binding ones for your
125
195
  dispatches. Then read the relevant source yourself; dispatch
126
- \`researcher\` ONLY for genuinely unknown external tech. Done means
127
- you can state which files change, in what order, and the risks.
196
+ \`researcher\` ONLY for genuinely unfamiliar tech — its findings come
197
+ from the local repo (code, docs, installed packages), never the web.
198
+ Done means you can state which files change, in what order, and the risks.
128
199
  - Plan (≤30 lines): Goal / Root cause or scope (file:line evidence) /
129
200
  Change list (file → what) / Pipeline (routing row + agents) /
130
201
  Assumptions & risks / Open questions.
@@ -244,8 +315,8 @@ Findings that drive architecture or API usage must be verified before
244
315
  adoption:
245
316
  - The researcher tags each finding High / Medium / Low confidence.
246
317
  - Low/medium-confidence claims that affect the design get a second check
247
- (re-ask the researcher for another source, or sanity-check against the
248
- actual codebase).
318
+ (re-ask the researcher for a second local source, or sanity-check against
319
+ the actual codebase).
249
320
  - Never let an unverified claim silently become an implementation
250
321
  decision; list remaining assumptions explicitly in the final report.
251
322
 
@@ -272,12 +343,10 @@ If a target file does not exist, offer to create it; skip both when the
272
343
  user opted out.
273
344
  `,
274
345
  color: "#E879F9", // purple
275
- permission: {
276
- edit: "allow",
277
- bash: "allow",
278
- webfetch: "allow",
279
- task: "allow",
280
- },
346
+ // Whitelist (7 tools): tm_* x4 + task dispatch + edit (<=10-line
347
+ // non-product edits, see "When you may edit directly") + write (board
348
+ // files) + bash (discovery-gate probes: --help, installed versions).
349
+ permission: whitelist("task", "edit", "write", "bash"),
281
350
  temperature: 0.2,
282
351
  };
283
352
  /* ------------------------------------------------------------------ */
@@ -320,9 +389,12 @@ When the team lead sends back a design flaw found in review or testing:
320
389
  of guessing about the codebase.
321
390
  `,
322
391
  color: "#38BDF8", // sky blue
323
- // Read-only on PROJECT sources; a dispatched board artifact is explicitly
324
- // writable (see Blackboard rules).
325
- permission: { edit: "allow", bash: "deny", webfetch: "allow" },
392
+ // Whitelist (5 tools): tm_* x4 + task dispatch. Fully read-only by
393
+ // design (T2.1): output lives in the reply; if a board artifact is ever
394
+ // dispatched, the BLACKBOARD WRITE FAILED fallback hands the content to
395
+ // the lead inline (see Blackboard rules). No bash — unchanged from the
396
+ // pre-T2.1 architect bash:deny posture.
397
+ permission: whitelist("task"),
326
398
  temperature: 0.2,
327
399
  };
328
400
  /* ------------------------------------------------------------------ */
@@ -359,7 +431,9 @@ to you by the team lead.
359
431
  check, the previously failing test).
360
432
  `,
361
433
  color: "#4ADE80", // green
362
- permission: { edit: "allow", bash: "allow", webfetch: "allow" },
434
+ // Whitelist (7 tools): tm_* x4 + edit/write (code implementation) + bash
435
+ // (narrowest verification for the fix: build / typecheck / failing test).
436
+ permission: whitelist("edit", "write", "bash"),
363
437
  temperature: 0.2,
364
438
  };
365
439
  /* ------------------------------------------------------------------ */
@@ -417,9 +491,12 @@ the previously flagged scope plus regressions introduced by the fixes;
417
491
  confirm each prior finding item by item (fixed / not fixed / partial).
418
492
  `,
419
493
  color: "#FB923C", // orange
420
- // May edit ONLY a dispatched board artifact; never the reviewed code
421
- // (see Blackboard rules + role rules).
422
- permission: { edit: "allow", bash: "allow", webfetch: "allow" },
494
+ // Whitelist (6 tools): tm_* x4 + task dispatch + bash. No edit/write
495
+ // (T2.1): findings travel in the reply skeleton; a dispatched board
496
+ // artifact rides the BLACKBOARD WRITE FAILED inline fallback (see
497
+ // Blackboard rules). bash backs the evidence standard — the reviewer
498
+ // must be able to run npm test / tsc itself.
499
+ permission: whitelist("task", "bash"),
423
500
  temperature: 0.2,
424
501
  };
425
502
  /* ------------------------------------------------------------------ */
@@ -483,7 +560,9 @@ worse than admitting the gap.
483
560
  refactor instead of contorting the test.
484
561
  `,
485
562
  color: "#F472B6", // pink
486
- permission: { edit: "allow", bash: "allow", webfetch: "allow" },
563
+ // Whitelist (7 tools): tm_* x4 + edit/write (test files) + bash (the
564
+ // whole verification stack: build / typecheck / lint / test runs).
565
+ permission: whitelist("edit", "write", "bash"),
487
566
  temperature: 0.2,
488
567
  };
489
568
  /* ------------------------------------------------------------------ */
@@ -491,10 +570,11 @@ worse than admitting the gap.
491
570
  /* ------------------------------------------------------------------ */
492
571
  const researcher = {
493
572
  mode: "subagent",
494
- description: "Researcher — investigates libraries, APIs, best practices, and " +
495
- "documentation; every finding carries a source and confidence tag so " +
496
- "the team can decide what needs verification. Use for information that " +
497
- "must inform a technical decision.",
573
+ description: "Researcher — investigates the local repository: code, configs, " +
574
+ "installed/vendored packages, and shipped documentation; every finding " +
575
+ "carries a source (file:line) and confidence tag so the team can decide " +
576
+ "what needs verification. Use for information that must inform a " +
577
+ "technical decision. Web research is out of scope (no network tools).",
498
578
  prompt: `You are the **Researcher** on a multi-agent coding team.
499
579
 
500
580
  ## Role
@@ -534,7 +614,13 @@ by the team — flag prominently if that is the case.
534
614
  of re-deriving.
535
615
  `,
536
616
  color: "#A78BFA", // violet
537
- permission: { edit: "allow", bash: "allow", webfetch: "allow", websearch: "allow" },
617
+ // Whitelist (4 tools): tm_* x4 ONLY — intentionally below the 5-7 band
618
+ // (T2.1): pure local research. webfetch/websearch are excluded
619
+ // network-wide (P5), which also removes the dangling websearch:allow
620
+ // found in T0.3; file enumeration goes through tm_bash (G2 方案甲).
621
+ // No bash / no execution rights is intentional trimming — local
622
+ // research reads, it does not run.
623
+ permission: whitelist(),
538
624
  temperature: 0.2,
539
625
  };
540
626
  /* Shared rules appended to every specialist prompt (after the contract). */
@@ -545,6 +631,21 @@ Every "done / fixed / passed" claim in your reply must carry its
545
631
  evidence: command output, log lines, or a diff. No narrative-only
546
632
  completions.
547
633
 
634
+ ## Tool surface (do not retry removed tools)
635
+ All file reads / searches / enumeration go through tm_read / tm_grep / tm_bash.
636
+ The built-in read/grep/glob/list tools are removed from the tool surface —
637
+ retrying them only wastes a turn. Built-in bash exists only where granted
638
+ (team / implementer / reviewer / tester run commands: build / test / git);
639
+ architect and researcher have no bash at all — one-off read-only commands
640
+ go through tm_bash or are reported as a gap.
641
+
642
+ ## R6 protected reads
643
+ When you need to read protected data (system variables the R6 guard blocks),
644
+ use the **built-in bash** tool — not tm_bash. tm_bash hard-blocks them with
645
+ no dialog; built-in bash triggers the official confirmation dialog (once /
646
+ always / reject). Dangerous commands (rm / git push / npm publish / etc.)
647
+ always trigger the dialog regardless of tool.
648
+
548
649
  ## Project conventions
549
650
  If the project README (or AGENTS.md) is quoted in your dispatch, treat
550
651
  its conventions as binding — they outrank your defaults. Do not re-open
@@ -555,6 +656,14 @@ belongs to the work.`;
555
656
  for (const a of [architect, implementer, reviewer, tester, researcher]) {
556
657
  a.prompt = (a.prompt ?? "") + REPLY_CONTRACT + SHARED_RULES;
557
658
  }
659
+ /* M3: tm_ptc_run permission — five specialists get allow, team gets deny
660
+ * (overrides the tm_* wildcard). Applied once at module init. */
661
+ if (teamLead.permission)
662
+ applyPtcPermission(teamLead.permission, true);
663
+ for (const a of [architect, implementer, reviewer, tester, researcher]) {
664
+ if (a.permission)
665
+ applyPtcPermission(a.permission, false);
666
+ }
558
667
  /* ------------------------------------------------------------------ */
559
668
  /* Export all agents keyed by name */
560
669
  /* ------------------------------------------------------------------ */
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;+DA0BwC,CAAA;AAE/D,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MAAM,QAAQ,GAAgB;IAC5B,IAAI,EAAE,SAAS;IACf,WAAW,EACT,4DAA4D;QAC5D,qEAAqE;QACrE,qEAAqE;QACrE,oEAAoE;QACpE,6DAA6D;QAC7D,4BAA4B;IAC9B,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+MT;IACC,KAAK,EAAE,SAAS,EAAE,SAAS;IAC3B,UAAU,EAAE;QACV,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,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