@te-river/opencode-team-mode 1.4.4 → 1.4.5

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
@@ -108,6 +108,13 @@ That's it. The plugin automatically injects all team agents and commands when Op
108
108
 
109
109
  > 💡 **Tip:** After modifying `opencode.json`, **restart OpenCode Desktop** for changes to take effect.
110
110
 
111
+ > ⚠️ **Model choice matters.** Every judgment in the workflow — triage,
112
+ > decomposition, dispatch briefs, synthesis, review-loop verdicts — flows
113
+ > through the **Team Lead**. A weak model in that seat degrades the whole
114
+ > pipeline no matter how strong the specialists are. Pin your best
115
+ > reasoning model to the `team` agent (recipe in
116
+ > [Customization](#customization) below).
117
+
111
118
  ### Global install (all projects)
112
119
 
113
120
  To enable TeamMode in every project, add the plugin to your global config:
@@ -171,9 +178,9 @@ You can also invoke agents directly using the `@` mention in OpenCode Desktop:
171
178
 
172
179
  ### Demo
173
180
 
174
- A session transcript, recreated from how the flow actually looks. The user
175
- picks `team` in the agent switcher (or enables `defaultAgent`, see
176
- Configuration), then just types into a fresh chat:
181
+ A session transcript, recreated from how the flow actually looks. Team is the
182
+ default agent out of the box (see Configuration to opt out), so the user just
183
+ types into a fresh chat:
177
184
 
178
185
  > **User:** Add token-bucket rate limiting to our Express API — 100 requests
179
186
  > per minute per user, return 429 when exceeded. Don't touch anything under
@@ -328,36 +335,64 @@ fall back to 5.
328
335
 
329
336
  ### Default agent
330
337
 
331
- By default TeamMode **does not** touch the default agent — new chats start
332
- on the built-in `build` as before. This is a deliberate ordering trade-off:
333
- the switcher pins the default agent to the **first slot** and sorts
334
- everything else alphabetically, so "Team pinned as default (first)" and
335
- "Team shown after Plan" are mutually exclusive. Leaving the default slot
336
- alone gives you the picker order **build, plan, team**.
338
+ By default TeamMode **makes Team your default agent** — new chats open
339
+ directly in the team orchestrator. One side effect comes with the default
340
+ slot: the switcher pins the default agent to the **first position** and
341
+ sorts everything else alphabetically, so the picker order is
342
+ **team, build, plan**. (Want Team below Plan instead? That requires
343
+ giving up the default slot — see the opt-out below; the two are
344
+ mutually exclusive by the server's sort.)
337
345
 
338
- To promote Team as the default agent anyway (new chats start with the team
339
- orchestrator, and Team is pinned first — order becomes **team, build,
340
- plan**):
346
+ To opt out (`build` stays the default, picker order **build, plan,
347
+ team**):
341
348
 
342
349
  ```jsonc
343
350
  {
344
351
  "plugin": [
345
- ["@te-river/opencode-team-mode@latest", { "defaultAgent": true }]
352
+ ["@te-river/opencode-team-mode@latest", { "defaultAgent": false }]
346
353
  ]
347
354
  }
348
355
  ```
349
356
 
350
357
  An explicitly configured non-`build` `default_agent` in your own config is
351
- always respected untouched, even with `defaultAgent: true`.
358
+ always respected untouched the plugin never clobbers it.
352
359
 
353
- **Upgrade note:** since v1.4.4 the plugin no longer claims the default-agent
354
- slot by default. If you relied on Team being your default agent before
355
- (v1.4.2+), add `{ "defaultAgent": true }` to your plugin options.
360
+ **Upgrade note:** v1.4.4 briefly made this promotion opt-in; v1.4.5 restores
361
+ Team-as-default as the shipped behavior. If you pinned `{ "defaultAgent":
362
+ true }` during v1.4.4, you can drop that option (or switch it to `false` to
363
+ opt out).
356
364
 
357
365
  ---
358
366
 
359
367
  ## 🔧 Customization
360
368
 
369
+ ### The Team Lead's model matters most
370
+
371
+ The Lead is the orchestrating brain: it classifies every message, cuts the
372
+ work into packages, writes each dispatch manifest, judges reviewer/tester
373
+ findings, and synthesizes the final deliverable. Quality failures there
374
+ **multiply down the pipeline** — a mediocre Lead mis-decomposes, briefs the
375
+ experts vaguely, and waves weak work through; no specialist can rescue an
376
+ assignment it was never correctly given.
377
+
378
+ So run the strongest model you can afford **in the Lead seat**. The other
379
+ roles tolerate cheaper models — they work from tight briefs with scoped
380
+ reading. Pin models per agent:
381
+
382
+ ```jsonc
383
+ {
384
+ "agent": {
385
+ // Team Lead — orchestration earns your best model
386
+ "team": { "model": "anthropic/claude-opus-4-5" },
387
+ // specialists — cheaper models are usually fine
388
+ "implementer": { "model": "anthropic/claude-sonnet-4-6" }
389
+ }
390
+ }
391
+ ```
392
+
393
+ (Model IDs above are placeholders — use whatever your provider exposes.
394
+ Your own `agent.team` definition always takes precedence over the plugin's.)
395
+
361
396
  ### Override an agent
362
397
 
363
398
  Add an agent with the same name in your `opencode.json` — your definition takes precedence:
package/README.zh-CN.md CHANGED
@@ -108,6 +108,11 @@ npm link
108
108
 
109
109
  > 💡 **提示:** 修改 `opencode.json` 后,请**重启 OpenCode 桌面版**使更改生效。
110
110
 
111
+ > ⚠️ **模型选择很重要。** 工作流里的每一个判断——分诊、拆解、派发清单、
112
+ > 整合、审查/测试闭环裁决——都经过 **Team Lead**。这个位置上放弱模型,
113
+ > 专家再强也救不回整条流水线。请给你的 `team` agent 钉上你能负担的最强
114
+ > 推理模型(配方见下方「自定义」节)。
115
+
111
116
  ### 全局安装(所有项目生效)
112
117
 
113
118
  要在所有项目中启用 TeamMode,将插件添加到全局配置:
@@ -171,8 +176,8 @@ TeamMode 为 OpenCode 添加了六个斜杠命令,在聊天输入框中输入
171
176
 
172
177
  ### 演示
173
178
 
174
- 以下是一段会话实录的还原。用户在代理选择器中选中 `team`(或按下方配置开启
175
- `defaultAgent`),开新会话直接输入:
179
+ 以下是一段会话实录的还原。Team 出厂即默认代理(退出方法见下方配置),
180
+ 用户开新会话直接输入:
176
181
 
177
182
  > **用户:** 给我们的 Express API 加令牌桶限流——每用户每分钟 100 请求,
178
183
  > 超限返回 429。不要动 `src/legacy/` 下的任何东西。
@@ -311,31 +316,55 @@ Team Lead 不再删除任务目录 —— 跑完的黑板原地留给你回看
311
316
 
312
317
  ### 默认代理
313
318
 
314
- TeamMode 默认**不再占用默认代理槽**——新会话仍从内建 `build` 开始。这是刻意的
315
- 排序取舍:选择器会把**默认代理钉在第一位**,其余按名称字母升序,因此
316
- 「Team 排默认(首位)」与「Team 显示在 Plan 之后」不可兼得。不占槽时顺序为
317
- **build, plan, team**。
319
+ TeamMode 默认**把 Team 设为你的默认代理**——新会话直接由团队调度者接管。
320
+ 占默认槽附带一个排序效应:选择器会把**默认代理钉在第一位**、其余按名称
321
+ 字母升序,所以顺序为 **team, build, plan**。(想让 Team 排在 Plan 之下?
322
+ 那必须放弃默认槽——见下方退出开关;按服务端的排序规则二者不可兼得。)
318
323
 
319
- 若希望新会话直接由团队调度者接管(Team 被钉在首位,顺序变为
320
- **team, build, plan**),开启 `defaultAgent`:
324
+ 不想占用默认代理槽(`build` 保持默认,顺序 **build, plan, team**)则退出:
321
325
 
322
326
  ```jsonc
323
327
  {
324
328
  "plugin": [
325
- ["@te-river/opencode-team-mode@latest", { "defaultAgent": true }]
329
+ ["@te-river/opencode-team-mode@latest", { "defaultAgent": false }]
326
330
  ]
327
331
  }
328
332
  ```
329
333
 
330
- 即使用户显式配置了非 `build` 默认代理,也永远原样保留(开启与否都不覆写)。
334
+ 用户显式配置的非 `build` 默认代理永远原样保留——插件从不覆写。
331
335
 
332
- **升级提示**:自 v1.4.4 起,插件默认不再占用默认代理槽。此前依赖 Team 作为
333
- 默认代理(v1.4.2+)的用户,请在插件选项中添加 `{ "defaultAgent": true }`。
336
+ **升级提示**:v1.4.4 曾短暂改为 opt-in(默认不占用);v1.4.5 恢复
337
+ Team-as-default 出厂行为。若你在 v1.4.4 期间加过 `{ "defaultAgent": true }`,
338
+ 现在可以删掉该选项(或改为 `false` 主动退出)。
334
339
 
335
340
  ---
336
341
 
337
342
  ## 🔧 自定义
338
343
 
344
+ ### Team Lead 的模型最关键
345
+
346
+ Lead 是编排大脑:它给每条消息分类、把工作切成包、写每份派发清单、裁决
347
+ reviewer/tester 的发现、合成最终交付。这里的质量问题会**沿流水线放大**——
348
+ 平庸的 Lead 拆错任务、给专家的指令含糊、放走劣质产出;没有任何专家能
349
+ 救回一份从一开始就派错的工单。
350
+
351
+ 所以:**Lead 位上请放你负担得起的最强模型**。其他角色可以用便宜模型——
352
+ 它们拿到的指令书精确、阅读范围受限,容错更高。按 agent 钉模型:
353
+
354
+ ```jsonc
355
+ {
356
+ "agent": {
357
+ // Team Lead —— 编排值得最好的模型
358
+ "team": { "model": "anthropic/claude-opus-4-5" },
359
+ // 专家角色 —— 便宜一档通常够用
360
+ "implementer": { "model": "anthropic/claude-sonnet-4-6" }
361
+ }
362
+ }
363
+ ```
364
+
365
+ (以上模型 ID 仅为示例,换成你服务商实际提供的即可。你自定义的
366
+ `agent.team` 永远优先于插件注入的版本。)
367
+
339
368
  ### 覆盖某个 Agent
340
369
 
341
370
  在 `opencode.json` 中添加同名 Agent —— 你的定义会优先生效:
package/dist/index.d.ts CHANGED
@@ -17,13 +17,12 @@
17
17
  * Options (via the tuple plugin form):
18
18
  * "plugin": [["@te-river/opencode-team-mode@latest", { "ttlDays": 7 }]]
19
19
  * - `ttlDays` → blackboard auto-cleanup TTL; default 5.
20
- * - `defaultAgent` → promote Team as the default agent (opt-in: set `true`
21
- * to enable). Trade-off when NOT enabled: new chats
22
- * start on the built-in `build` agent, but the picker
23
- * keeps Team in plain alphabetical order — after `plan`
24
- * (the default agent is pinned first; everything else
25
- * sorts by name, so "team first" and "team after plan"
26
- * are mutually exclusive).
20
+ * - `defaultAgent` → Team is the default agent (opt-out: set `false`).
21
+ * Owning the default slot means the picker pins it
22
+ * FIRST order becomes team, build, plan. Set
23
+ * `false` for build-as-default with Team in its
24
+ * alphabetical slot: build, plan, team (the two are
25
+ * mutually exclusive by the server's sort).
27
26
  */
28
27
  import type { OpenCodePlugin } from "./types.js";
29
28
  declare const plugin: OpenCodePlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AA2BhE,QAAA,MAAM,MAAM,EAAE,cAyCb,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAA;AA2BhE,QAAA,MAAM,MAAM,EAAE,cAyCb,CAAA;AAED,eAAe,MAAM,CAAA"}
package/dist/index.js CHANGED
@@ -17,13 +17,12 @@
17
17
  * Options (via the tuple plugin form):
18
18
  * "plugin": [["@te-river/opencode-team-mode@latest", { "ttlDays": 7 }]]
19
19
  * - `ttlDays` → blackboard auto-cleanup TTL; default 5.
20
- * - `defaultAgent` → promote Team as the default agent (opt-in: set `true`
21
- * to enable). Trade-off when NOT enabled: new chats
22
- * start on the built-in `build` agent, but the picker
23
- * keeps Team in plain alphabetical order — after `plan`
24
- * (the default agent is pinned first; everything else
25
- * sorts by name, so "team first" and "team after plan"
26
- * are mutually exclusive).
20
+ * - `defaultAgent` → Team is the default agent (opt-out: set `false`).
21
+ * Owning the default slot means the picker pins it
22
+ * FIRST order becomes team, build, plan. Set
23
+ * `false` for build-as-default with Team in its
24
+ * alphabetical slot: build, plan, team (the two are
25
+ * mutually exclusive by the server's sort).
27
26
  */
28
27
  import { agents } from "./agents.js";
29
28
  import { commands } from "./commands.js";
@@ -77,8 +76,8 @@ const plugin = {
77
76
  continue;
78
77
  cfg.command[name] = def;
79
78
  }
80
- // ---------- make Team the default agent (opt-in: defaultAgent:true)
81
- const promote = options?.defaultAgent === true;
79
+ // ---------- make Team the default agent (opt-out: defaultAgent:false)
80
+ const promote = options?.defaultAgent !== false;
82
81
  if (promote && (!cfg.default_agent || cfg.default_agent === "build")) {
83
82
  cfg.default_agent = "team";
84
83
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,M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,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;oBACjD,mEAAmE;oBACnE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;wBAAE,SAAQ;oBAC7B,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG;wBAChB,GAAG,GAAG;wBACN,MAAM,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM;qBACjE,CAAA;gBACH,CAAC;gBAED,IAAI,CAAC,GAAG,CAAC,OAAO;oBAAE,GAAG,CAAC,OAAO,GAAG,EAAE,CAAA;gBAClC,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;oBACnD,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;wBAAE,SAAQ;oBAC/B,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;gBACzB,CAAC;gBAED,uEAAuE;gBACvE,MAAM,OAAO,GAAG,OAAO,EAAE,YAAY,KAAK,KAAK,CAAA;gBAC/C,IAAI,OAAO,IAAI,CAAC,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.4",
3
+ "version": "1.4.5",
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",