@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 +52 -17
- package/README.zh-CN.md +41 -12
- package/dist/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
175
|
-
|
|
176
|
-
|
|
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 **
|
|
332
|
-
|
|
333
|
-
the switcher pins the default agent to the **first
|
|
334
|
-
everything else alphabetically, so
|
|
335
|
-
|
|
336
|
-
|
|
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
|
|
339
|
-
|
|
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":
|
|
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
|
|
358
|
+
always respected untouched — the plugin never clobbers it.
|
|
352
359
|
|
|
353
|
-
**Upgrade note:**
|
|
354
|
-
|
|
355
|
-
|
|
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
|
-
|
|
175
|
-
|
|
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
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
319
|
+
TeamMode 默认**把 Team 设为你的默认代理**——新会话直接由团队调度者接管。
|
|
320
|
+
占默认槽附带一个排序效应:选择器会把**默认代理钉在第一位**、其余按名称
|
|
321
|
+
字母升序,所以顺序为 **team, build, plan**。(想让 Team 排在 Plan 之下?
|
|
322
|
+
那必须放弃默认槽——见下方退出开关;按服务端的排序规则二者不可兼得。)
|
|
318
323
|
|
|
319
|
-
|
|
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":
|
|
329
|
+
["@te-river/opencode-team-mode@latest", { "defaultAgent": false }]
|
|
326
330
|
]
|
|
327
331
|
}
|
|
328
332
|
```
|
|
329
333
|
|
|
330
|
-
|
|
334
|
+
用户显式配置的非 `build` 默认代理永远原样保留——插件从不覆写。
|
|
331
335
|
|
|
332
|
-
|
|
333
|
-
|
|
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` →
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
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` →
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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-
|
|
81
|
-
const promote = options?.defaultAgent
|
|
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
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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,iEAAiE;AACjE,SAAS,cAAc,CAAC,IAAY,EAAE,OAAe;IACnD,OAAO;QACL,EAAE;QACF,EAAE;QACF,kDAAkD;QAClD,qBAAqB,IAAI,IAAI;QAC7B,qFAAqF;QACrF,qFAAqF;QACrF,uFAAuF;QACvF,qFAAqF;QACrF,yDAAyD;QACzD,sGAAsG;QACtG,yEAAyE,OAAO,gCAAgC;QAChH,sFAAsF;KACvF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC;AAED,MAAM,MAAM,GAAmB;IAC7B,EAAE,EAAE,WAAW;IAEf,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC/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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.
|
|
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",
|