@te-river/opencode-team-mode 1.4.0 → 1.4.2

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
@@ -162,7 +162,7 @@ TeamMode adds six slash commands to OpenCode. Type them in the chat input:
162
162
 
163
163
  You can also invoke agents directly using the `@` mention in OpenCode Desktop:
164
164
 
165
- - `@team-lead` — Orchestrate a complex task
165
+ - `@team` — Orchestrate a complex task
166
166
  - `@architect` — Design a system or module
167
167
  - `@implementer` — Write code
168
168
  - `@reviewer` — Review code quality
@@ -187,11 +187,11 @@ opencode-team-mode/
187
187
  ├── package.json ← npm package definition
188
188
  ├── tsconfig.json ← TypeScript config
189
189
  ├── src/
190
- │ ├── index.ts ← Plugin entry (v2 format, id: "team-mode")
190
+ │ ├── index.ts ← Plugin entry (server() + config hook, id: "team-mode")
191
191
  │ ├── agents.ts ← Agent definitions (prompts, modes, colors)
192
192
  │ ├── commands.ts ← Command definitions (templates, agent bindings)
193
193
  │ ├── blackboard.ts ← Shared blackboard + TTL auto-cleanup sweeper
194
- │ └── types.ts ← v2 Plugin API type definitions
194
+ │ └── types.ts ← Loader-contract type definitions (1.18.x)
195
195
  ├── scripts/
196
196
  │ ├── install.sh ← One-click installer (bash)
197
197
  │ └── install.ps1 ← One-click installer (PowerShell)
@@ -202,11 +202,11 @@ opencode-team-mode/
202
202
 
203
203
  ### How it works
204
204
 
205
- 1. OpenCode Desktop starts and loads `opencode.json`.
205
+ 1. OpenCode Desktop starts and loads `opencode.json(c)`.
206
206
  2. It sees `"@te-river/opencode-team-mode@latest"` in the `plugin` array and loads the npm package.
207
- 3. The plugin's v2 `setup` function runs, using `ctx.agent.transform()` and `ctx.command.transform()` to inject 6 agents and 6 commands.
207
+ 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.
208
208
  4. The plugin's `id: "team-mode"` is displayed as the plugin name in the Desktop UI.
209
- 5. Agents and commands are immediately available in the Desktop UI — no file copying needed.
209
+ 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).
210
210
 
211
211
  ---
212
212
 
@@ -254,6 +254,24 @@ Default is **5 days**. To choose your own, use the tuple plugin form in
254
254
  `ttlDays` accepts any number of days in `(0, 365]`; invalid values silently
255
255
  fall back to 5.
256
256
 
257
+ ### Default agent
258
+
259
+ TeamMode makes **`team` the default agent** (replacing the built-in `build`)
260
+ so every new chat starts with the team orchestrator — it appears above the
261
+ rest in the switcher's default slot. To keep `build` (or any other agent)
262
+ as the default, or pin a different one:
263
+
264
+ ```jsonc
265
+ {
266
+ "plugin": [
267
+ ["@te-river/opencode-team-mode@latest", { "defaultAgent": false }]
268
+ ]
269
+ }
270
+ ```
271
+
272
+ An explicitly configured non-`build` `default_agent` is always respected
273
+ untouched.
274
+
257
275
  ---
258
276
 
259
277
  ## 🔧 Customization
package/README.zh-CN.md CHANGED
@@ -162,7 +162,7 @@ TeamMode 为 OpenCode 添加了六个斜杠命令,在聊天输入框中输入
162
162
 
163
163
  你也可以在 OpenCode 桌面版中使用 `@` 直接调用 Agent:
164
164
 
165
- - `@team-lead` — 调度复杂任务
165
+ - `@team` — 调度复杂任务
166
166
  - `@architect` — 设计系统或模块
167
167
  - `@implementer` — 编写代码
168
168
  - `@reviewer` — 审查代码质量
@@ -187,11 +187,11 @@ opencode-team-mode/
187
187
  ├── package.json ← npm 包定义
188
188
  ├── tsconfig.json ← TypeScript 配置
189
189
  ├── src/
190
- │ ├── index.ts ← 插件入口(v2 格式,id: "team-mode")
190
+ │ ├── index.ts ← 插件入口(server() + config hook,id: "team-mode")
191
191
  │ ├── agents.ts ← Agent 定义(prompts、模式、颜色)
192
192
  │ ├── commands.ts ← 命令定义(模板、Agent 绑定)
193
193
  │ ├── blackboard.ts ← 共享黑板 + TTL 自动清理清扫器
194
- │ └── types.ts ← v2 Plugin API 类型定义
194
+ │ └── types.ts ← 加载器契约类型定义(1.18.x)
195
195
  ├── scripts/
196
196
  │ ├── install.sh ← 一键安装脚本(bash)
197
197
  │ └── install.ps1 ← 一键安装脚本(PowerShell)
@@ -202,10 +202,11 @@ opencode-team-mode/
202
202
 
203
203
  ### 工作原理
204
204
 
205
- 1. OpenCode 桌面版启动,加载 `opencode.json`
205
+ 1. OpenCode 桌面版启动,加载 `opencode.json(c)`
206
206
  2. 检测到 `plugin` 数组中的 `"@te-river/opencode-team-mode@latest"`,加载 npm 包
207
- 3. 插件的 `setup` 函数执行,通过 `ctx.agent.transform()` `ctx.command.transform()` 注入 6 个 Agent 和 6 个命令
208
- 4. Agent 和命令立即在桌面版 UI 中可用 —— 无需复制任何文件
207
+ 3. 加载器调用插件的 `server(input, options)`,注册 `config` hook;hook 向合并后的配置注入 6 个 Agent 和 6 个命令
208
+ 4. 插件的 `id: "team-mode"` 作为插件名显示在桌面版 UI
209
+ 5. Agent 和命令立即在桌面版 UI 中可用 —— 无需复制任何文件;同名 Agent 以用户自定义优先(插件绝不覆盖)
209
210
 
210
211
  ---
211
212
 
@@ -245,6 +246,21 @@ opencode-team-mode/
245
246
 
246
247
  `ttlDays` 接受 `(0, 365]` 内的天数;非法值静默回退到 5 天。
247
248
 
249
+ ### 默认代理
250
+
251
+ TeamMode 会将 **`team` 设为默认代理**(替代内建 `build`),新会话直接由团队
252
+ 调度者接管。若想保持 `build` 或其他代理为默认:
253
+
254
+ ```jsonc
255
+ {
256
+ "plugin": [
257
+ ["@te-river/opencode-team-mode@latest", { "defaultAgent": false }]
258
+ ]
259
+ }
260
+ ```
261
+
262
+ 用户显式配置的非 `build` 默认代理永远原样保留。
263
+
248
264
  ---
249
265
 
250
266
  ## 🔧 自定义
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAyZ7C,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;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAka7C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAO9C,CAAA"}
package/dist/agents.js CHANGED
@@ -29,6 +29,9 @@ const BLACKBOARD_GUARANTEE = `
29
29
  - NEVER reply "append this verbatim for me" or hand the full deliverable
30
30
  back to the dispatcher to transcribe — that defeats the entire point of
31
31
  the blackboard. Reply with your summary + the file path, nothing else.
32
+ - Read ONLY the blackboard files explicitly listed in your dispatch. Do
33
+ not browse the task directory for "extra context" — the lead scoped the
34
+ reading deliberately, and stale rounds will only pollute yours.
32
35
  - If a write genuinely fails (permissions, missing directory), start your
33
36
  reply with the line \`BLACKBOARD WRITE FAILED: <reason>\` and only then
34
37
  include the full content as fallback, so the lead can retry the write
@@ -100,6 +103,12 @@ file blackboard (root path is appended at the end of this prompt):
100
103
  prior work in the text AND point to the blackboard file holding the full
101
104
  content. Summary-in-prompt + file-path is the belt-and-braces protocol —
102
105
  never rely on an agent "knowing" what another produced.
106
+ - Scope the reading: list ONLY the blackboard files the work package
107
+ actually needs (latest relevant round of each artifact) — never tell an
108
+ agent to "read everything in the directory".
109
+ - When an artifact is revised, write a new round-suffixed file
110
+ (e.g. \`03-review-findings-r2.md\`) and reference only the latest round
111
+ in dispatches, so stale iterations never enter a sub-agent's context.
103
112
  - Sub-agents reply with a summary plus their file path; read the file
104
113
  yourself when you need detail, then relay the relevant parts onward.
105
114
  - A specialist asking you to transcribe its output verbatim is a protocol
@@ -409,7 +418,7 @@ for (const a of [architect, implementer, reviewer, tester, researcher]) {
409
418
  /* Export all agents keyed by name */
410
419
  /* ------------------------------------------------------------------ */
411
420
  export const agents = {
412
- "team-lead": teamLead,
421
+ "team": teamLead,
413
422
  architect,
414
423
  implementer,
415
424
  reviewer,
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;oCAaO,CAAA;AAEpC,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MAAM,QAAQ,GAAgB;IAC5B,IAAI,EAAE,SAAS;IACf,WAAW,EACT,2EAA2E;QAC3E,qEAAqE;QACrE,2EAA2E;QAC3E,2EAA2E;QAC3E,4BAA4B;IAC9B,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GT;IACC,KAAK,EAAE,SAAS,EAAE,SAAS;IAC3B,UAAU,EAAE;QACV,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,OAAO;KACd;CACF,CAAA;AAED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MAAM,SAAS,GAAgB;IAC7B,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,2EAA2E;QAC3E,2EAA2E;QAC3E,0EAA0E;QAC1E,yCAAyC;IAC3C,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCT;IACC,KAAK,EAAE,SAAS,EAAE,WAAW;IAC7B,sEAAsE;IACtE,6CAA6C;IAC7C,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;CAC/D,CAAA;AAED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MA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do not fabricate URLs or API details.`,
94
94
  /* ------------------------------------------------------------------ */
95
95
  const teamRun = {
96
96
  description: "Full team workflow — the team lead orchestrates all agents to complete a complex task end-to-end.",
97
- agent: "team-lead",
97
+ agent: "team",
98
98
  template: `Execute the full team workflow for the following task.
99
99
 
100
100
  ## Task
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wEAAwE;AACxE,MAAM,QAAQ,GAAkB;IAC9B,WAAW,EACT,+FAA+F;IACjG,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE;;;;;;;;;;;;;kDAasC;CACjD,CAAA;AAED,wEAAwE;AACxE,MAAM,aAAa,GAAkB;IACnC,WAAW,EACT,0FAA0F;IAC5F,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE;;;;;;;;4DAQgD;CAC3D,CAAA;AAED,wEAAwE;AACxE,MAAM,UAAU,GAAkB;IAChC,WAAW,EACT,0EAA0E;IAC5E,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE;;;;;;;;;;;;;gEAaoD;CAC/D,CAAA;AAED,wEAAwE;AACxE,MAAM,QAAQ,GAAkB;IAC9B,WAAW,EACT,2EAA2E;IAC7E,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE;;;;;;;;;;;8BAWkB;CAC7B,CAAA;AAED,wEAAwE;AACxE,MAAM,YAAY,GAAkB;IAClC,WAAW,EACT,uEAAuE;IACzE,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE;;;;;;;;;;;0DAW8C;CACzD,CAAA;AAED,wEAAwE;AACxE,MAAM,OAAO,GAAkB;IAC7B,WAAW,EACT,mGAAmG;IACrG,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;sEA0B0D;CACrE,CAAA;AAED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AAExE,MAAM,CAAC,MAAM,QAAQ,GAAk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gBAAgB,EAAE,aAAa;IAC/B,aAAa,EAAE,UAAU;IACzB,WAAW,EAAE,QAAQ;IACrB,eAAe,EAAE,YAAY;IAC7B,UAAU,EAAE,OAAO;CACpB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -16,7 +16,9 @@
16
16
  *
17
17
  * Options (via the tuple plugin form):
18
18
  * "plugin": [["@te-river/opencode-team-mode@latest", { "ttlDays": 7 }]]
19
- * `ttlDays` controls blackboard auto-cleanup; default 5.
19
+ * - `ttlDays` blackboard auto-cleanup TTL; default 5.
20
+ * - `defaultAgent` → promote Team as the default agent (replacing the
21
+ * built-in `build`); set `false` to opt out.
20
22
  */
21
23
  import type { OpenCodePlugin } from "./types.js";
22
24
  declare const plugin: OpenCodePlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AAsBhE,QAAA,MAAM,MAAM,EAAE,cAmCb,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AAsBhE,QAAA,MAAM,MAAM,EAAE,cAyCb,CAAA;AAED,eAAe,MAAM,CAAA"}
package/dist/index.js CHANGED
@@ -16,12 +16,14 @@
16
16
  *
17
17
  * Options (via the tuple plugin form):
18
18
  * "plugin": [["@te-river/opencode-team-mode@latest", { "ttlDays": 7 }]]
19
- * `ttlDays` controls blackboard auto-cleanup; default 5.
19
+ * - `ttlDays` blackboard auto-cleanup TTL; default 5.
20
+ * - `defaultAgent` → promote Team as the default agent (replacing the
21
+ * built-in `build`); set `false` to opt out.
20
22
  */
21
23
  import { agents } from "./agents.js";
22
24
  import { commands } from "./commands.js";
23
25
  import { startBlackboardMaintenance, resolveTtlMs, DEFAULT_TTL_DAYS, } from "./blackboard.js";
24
- /** Runtime addendum to the team-lead prompt: concrete board + TTL. */
26
+ /** Runtime addendum to the team prompt: concrete board + TTL. */
25
27
  function blackboardNote(root, ttlDays) {
26
28
  return [
27
29
  "",
@@ -55,7 +57,7 @@ const plugin = {
55
57
  continue;
56
58
  cfg.agent[name] = {
57
59
  ...def,
58
- prompt: name === "team-lead" ? (def.prompt ?? "") + note : def.prompt,
60
+ prompt: name === "team" ? (def.prompt ?? "") + note : def.prompt,
59
61
  };
60
62
  }
61
63
  if (!cfg.command)
@@ -65,6 +67,11 @@ const plugin = {
65
67
  continue;
66
68
  cfg.command[name] = def;
67
69
  }
70
+ // ---------- make Team the default agent (opt-out: defaultAgent:false)
71
+ const promote = options?.defaultAgent !== false;
72
+ if (promote && (!cfg.default_agent || cfg.default_agent === "build")) {
73
+ cfg.default_agent = "team";
74
+ }
68
75
  },
69
76
  };
70
77
  },
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AAExB,sEAAsE;AACtE,SAAS,cAAc,CAAC,IAAY,EAAE,OAAe;IACnD,OAAO;QACL,EAAE;QACF,EAAE;QACF,kDAAkD;QAClD,qBAAqB,IAAI,IAAI;QAC7B,wFAAwF;QACxF,yEAAyE,OAAO,QAAQ;QACxF,+EAA+E;KAChF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC;AAED,MAAM,MAAM,GAAmB;IAC7B,EAAE,EAAE,WAAW;IAEf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,CAAC,GAAG,CAAC,aAAa,IAAI,GAAG,CAAC,aAAa,KAAK,OAAO,CAAC,EAAE,CAAC;oBACrE,GAAG,CAAC,aAAa,GAAG,MAAM,CAAA;gBAC5B,CAAC;YACH,CAAC;SACF,CAAA;IACH,CAAC;CACF,CAAA;AAED,eAAe,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@te-river/opencode-team-mode",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Team collaboration mode plugin for OpenCode Desktop — injects specialized agents (architect, reviewer, implementer, tester, researcher) and team workflow commands into your OpenCode workspace.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",