@te-river/opencode-team-mode 1.5.14 → 1.6.0
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 +788 -674
- package/README.zh-CN.md +712 -618
- package/dist/agents.d.ts +5 -3
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +19 -8
- package/dist/agents.js.map +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/capabilities.js +2 -2
- package/dist/capabilities.js.map +1 -1
- package/dist/host-hooks.d.ts +13 -2
- package/dist/host-hooks.d.ts.map +1 -1
- package/dist/host-hooks.js +19 -5
- package/dist/host-hooks.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -14
- package/dist/index.js.map +1 -1
- package/dist/prompts/lead.d.ts +1 -1
- package/dist/prompts/lead.d.ts.map +1 -1
- package/dist/prompts/lead.js +135 -17
- package/dist/prompts/lead.js.map +1 -1
- package/dist/prompts/shared.d.ts +2 -2
- package/dist/prompts/shared.d.ts.map +1 -1
- package/dist/prompts/shared.js +94 -16
- package/dist/prompts/shared.js.map +1 -1
- package/dist/prompts/specialists.d.ts +2 -2
- package/dist/prompts/specialists.d.ts.map +1 -1
- package/dist/prompts/specialists.js +43 -10
- package/dist/prompts/specialists.js.map +1 -1
- package/dist/task-offload.d.ts +67 -0
- package/dist/task-offload.d.ts.map +1 -0
- package/dist/task-offload.js +123 -0
- package/dist/task-offload.js.map +1 -0
- package/dist/tm/args-schema.d.ts +4 -0
- package/dist/tm/args-schema.d.ts.map +1 -1
- package/dist/tm/args-schema.js +44 -3
- package/dist/tm/args-schema.js.map +1 -1
- package/dist/tm/board.d.ts +113 -0
- package/dist/tm/board.d.ts.map +1 -0
- package/dist/tm/board.js +275 -0
- package/dist/tm/board.js.map +1 -0
- package/dist/tm/browser.d.ts +325 -6
- package/dist/tm/browser.d.ts.map +1 -1
- package/dist/tm/browser.js +1329 -135
- package/dist/tm/browser.js.map +1 -1
- package/dist/tm/config.d.ts +36 -1
- package/dist/tm/config.d.ts.map +1 -1
- package/dist/tm/config.js +29 -1
- package/dist/tm/config.js.map +1 -1
- package/dist/tm/dispatch.d.ts +118 -31
- package/dist/tm/dispatch.d.ts.map +1 -1
- package/dist/tm/dispatch.js +385 -131
- package/dist/tm/dispatch.js.map +1 -1
- package/dist/tm/dupe-guard.js +1 -1
- package/dist/tm/dupe-guard.js.map +1 -1
- package/dist/tm/egress.d.ts +44 -0
- package/dist/tm/egress.d.ts.map +1 -0
- package/dist/tm/egress.js +191 -0
- package/dist/tm/egress.js.map +1 -0
- package/dist/tm/guard.js +1 -1
- package/dist/tm/guard.js.map +1 -1
- package/dist/tm/index.d.ts +28 -2
- package/dist/tm/index.d.ts.map +1 -1
- package/dist/tm/index.js +198 -10
- package/dist/tm/index.js.map +1 -1
- package/dist/tm/perm-ask.d.ts +47 -5
- package/dist/tm/perm-ask.d.ts.map +1 -1
- package/dist/tm/perm-ask.js +98 -7
- package/dist/tm/perm-ask.js.map +1 -1
- package/dist/tm/pipelines.d.ts.map +1 -1
- package/dist/tm/pipelines.js +24 -2
- package/dist/tm/pipelines.js.map +1 -1
- package/dist/tm/ptc/tool.d.ts.map +1 -1
- package/dist/tm/ptc/tool.js +2 -4
- package/dist/tm/ptc/tool.js.map +1 -1
- package/dist/tm/pty.d.ts.map +1 -1
- package/dist/tm/pty.js +6 -3
- package/dist/tm/pty.js.map +1 -1
- package/dist/tm/search.d.ts +5 -0
- package/dist/tm/search.d.ts.map +1 -1
- package/dist/tm/search.js +19 -17
- package/dist/tm/search.js.map +1 -1
- package/dist/tm/stats.d.ts +46 -0
- package/dist/tm/stats.d.ts.map +1 -1
- package/dist/tm/stats.js +124 -7
- package/dist/tm/stats.js.map +1 -1
- package/dist/tm/store.d.ts +3 -0
- package/dist/tm/store.d.ts.map +1 -1
- package/dist/tm/store.js +6 -1
- package/dist/tm/store.js.map +1 -1
- package/dist/tm/webfetch.d.ts +52 -0
- package/dist/tm/webfetch.d.ts.map +1 -1
- package/dist/tm/webfetch.js +128 -22
- package/dist/tm/webfetch.js.map +1 -1
- package/dist/tool-coerce.d.ts +24 -0
- package/dist/tool-coerce.d.ts.map +1 -0
- package/dist/tool-coerce.js +63 -0
- package/dist/tool-coerce.js.map +1 -0
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/installation.md +69 -2
- package/package.json +61 -59
package/docs/installation.md
CHANGED
|
@@ -58,10 +58,46 @@ After restart, verify in this order:
|
|
|
58
58
|
|
|
59
59
|
1. The agent picker (`@` mentions) lists: **team, architect, implementer, reviewer, tester, researcher**.
|
|
60
60
|
2. Slash commands `/team-plan`, `/team-implement`, `/team-review`, `/team-test`, `/team-research`, `/team-run` autocomplete.
|
|
61
|
-
3.
|
|
61
|
+
3. Definitive check for the **running** build: ask an agent to run `tm_stats` and look at which rows appear. `npm view … version` queries the registry, not what OpenCode loads, so it misleads after an update; reading a `package.json` proves only the file, not the loaded code. A feature row (e.g. `宿主后台 task 注入`) either renders or it does not — that is the running build. Finally, ask the user to start a chat and confirm the **team** agent responds.
|
|
62
|
+
|
|
63
|
+
> **Where the loaded copy actually lives.** Under `~/.cache/opencode/packages/` the
|
|
64
|
+
> scoped layout is a **wrapper directory**: `packages/@te-river/opencode-team-mode@latest/`
|
|
65
|
+
> holds only `package.json` (`{"dependencies": {"@te-river/opencode-team-mode": "<version>"}}`),
|
|
66
|
+
> a `package-lock.json` and `node_modules/` — **the real package is the nested
|
|
67
|
+
> `…@latest/node_modules/@te-river/opencode-team-mode/`**, and that is the copy
|
|
68
|
+
> whose `dist/` executes. Overwriting a `dist/` at the wrapper root, or the one
|
|
69
|
+
> under `~/.config/opencode/node_modules/`, does nothing. (Costly to learn: it
|
|
70
|
+
> was found by a `tm_stats` row that refused to appear.)
|
|
62
71
|
|
|
63
72
|
Report which checks passed. If verification fails, see Troubleshooting.
|
|
64
73
|
|
|
74
|
+
### Step 5 — the visible sub-agent (the installer enables this)
|
|
75
|
+
|
|
76
|
+
OpenCode's own `task { background: true }` is the only sub-agent its interface
|
|
77
|
+
can **show**: the card links to the live child session, it does not block the
|
|
78
|
+
lead, and the host wakes the parent with the result. TeamMode then keeps that
|
|
79
|
+
result inside the token budget (`TM_TASK_OFFLOAD`).
|
|
80
|
+
|
|
81
|
+
It rides an OpenCode **experimental flag** read from the host process
|
|
82
|
+
environment at startup, so a plugin cannot set it — the installer writes it for
|
|
83
|
+
you:
|
|
84
|
+
|
|
85
|
+
| Platform | What the installer does | Revert |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| Windows | `setx OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS true` (user scope, survives reboot — **every program you start afterwards sees it, not just OpenCode**) | `REG delete HKCU\Environment /v OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS /f` |
|
|
88
|
+
| macOS | `launchctl setenv …` — reaches GUI apps this login, **not** after a logout | `launchctl unsetenv OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS` |
|
|
89
|
+
| Linux | `systemctl --user set-environment …` when a user session exists, else prints the `export` line | `systemctl --user unset-environment OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS` |
|
|
90
|
+
|
|
91
|
+
Skip it entirely: run `install.ps1 -NoBackgroundSubagents`, or set
|
|
92
|
+
`TEAMMODE_SKIP_BACKGROUND_SUBAGENTS=1` for a piped install. Without the flag
|
|
93
|
+
nothing breaks — `task` simply blocks the lead, and `tm_join` still collects
|
|
94
|
+
whatever children exist (snapshot, cancel, named-id read-back, restart recovery).
|
|
95
|
+
|
|
96
|
+
Cost, stated plainly: each finished background task wakes the lead and costs a
|
|
97
|
+
turn, and the host injects the child's reply verbatim until TeamMode replaces
|
|
98
|
+
an oversized one with a preview + pointer.
|
|
99
|
+
|
|
100
|
+
|
|
65
101
|
### Updating
|
|
66
102
|
|
|
67
103
|
> ⚠️ **OpenCode loads the plugin from this spec-string cache under
|
|
@@ -269,10 +305,41 @@ never re-resolved on its own).
|
|
|
269
305
|
|
|
270
306
|
1. Agent 选择器(`@` 提及)里出现:**team、architect、implementer、reviewer、tester、researcher**。
|
|
271
307
|
2. 斜杠命令 `/team-plan`、`/team-implement`、`/team-review`、`/team-test`、`/team-research`、`/team-run` 可以自动补全。
|
|
272
|
-
3.
|
|
308
|
+
3. 判定**运行版本**最可靠的办法:让 agent 跑一次 `tm_stats`,看表里出现了哪些行。`npm view … version` 查的是 registry,不是 OpenCode 实际加载的东西,升级后会误判;读 `package.json` 也只证明文件、不证明被执行的代码。而某一行特性(例如 `宿主后台 task 注入`)要么在要么不在——那就是正在运行的构建。最后请用户开一个会话确认 **team** agent 能正常响应。
|
|
309
|
+
|
|
310
|
+
> **被加载的那份到底在哪。** `~/.cache/opencode/packages/` 下的作用域式目录是一个
|
|
311
|
+
> **包装层**:`packages/@te-river/opencode-team-mode@latest/` 里只有 `package.json`
|
|
312
|
+
> (内容仅是 `{"dependencies": {"@te-river/opencode-team-mode": "<版本>"}}`)、
|
|
313
|
+
> `package-lock.json` 和 `node_modules/`——**真正的包是嵌套在里面的
|
|
314
|
+
> `…@latest/node_modules/@te-river/opencode-team-mode/`**,被执行的是它的 `dist/`。
|
|
315
|
+
> 覆盖包装层根上的 `dist/`、或覆盖 `~/.config/opencode/node_modules/` 里那份,都不生效。
|
|
316
|
+
> (这条是踩出来的:覆盖后 `tm_stats` 里新行死活不出现,才发现还有一层。)
|
|
273
317
|
|
|
274
318
|
报告哪些检查通过。验证失败时看"故障排查"。
|
|
275
319
|
|
|
320
|
+
### 第 5 步 — 可见的子代理(安装脚本已默认开启)
|
|
321
|
+
|
|
322
|
+
OpenCode 自带的 `task { background: true }` 是唯一能在它界面上**看见**的子代理:
|
|
323
|
+
卡片直接链到那个子会话、不阻塞 lead、完成时宿主把父会话唤醒。TeamMode 再把
|
|
324
|
+
回来的结果压在 token 预算内(`TM_TASK_OFFLOAD`)。
|
|
325
|
+
|
|
326
|
+
它依赖一个 OpenCode 的**实验性开关**,由宿主进程启动时读环境变量决定,插件无法
|
|
327
|
+
自己打开——所以安装脚本替你写:
|
|
328
|
+
|
|
329
|
+
| 平台 | 安装脚本做什么 | 撤销 |
|
|
330
|
+
|---|---|---|
|
|
331
|
+
| Windows | `setx OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS true`(用户级,重启仍在——**之后你启动的每个程序都看得到它,不只是 OpenCode**) | `REG delete HKCU\Environment /v OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS /f` |
|
|
332
|
+
| macOS | `launchctl setenv …`——本次登录对 GUI 生效,**注销后失效** | `launchctl unsetenv OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS` |
|
|
333
|
+
| Linux | 有用户级 systemd 就 `systemctl --user set-environment …`,否则打印 `export` 那行 | `systemctl --user unset-environment OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS` |
|
|
334
|
+
|
|
335
|
+
不想开:`install.ps1 -NoBackgroundSubagents`,或管道式安装前设
|
|
336
|
+
`TEAMMODE_SKIP_BACKGROUND_SUBAGENTS=1`。**不开也不会坏**——`task` 只是会阻塞 lead,
|
|
337
|
+
`tm_join` 照样负责回收(状态快照、取消、按 id 取回整篇回复、重启后接管)。
|
|
338
|
+
|
|
339
|
+
代价说明白:每个后台任务完成都会唤醒 lead 一次、花一轮;而且在 TeamMode 把超限
|
|
340
|
+
正文换成"预览 + 取回指针"之前,宿主注入的是全文。
|
|
341
|
+
|
|
342
|
+
|
|
276
343
|
### 更新
|
|
277
344
|
|
|
278
345
|
> ⚠️ **OpenCode 加载插件用的是这份按 spec 字符串缓存的副本——
|
package/package.json
CHANGED
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@te-river/opencode-team-mode",
|
|
3
|
-
"version": "1.
|
|
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
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"types": "./dist/index.d.ts"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist",
|
|
16
|
-
"README.md",
|
|
17
|
-
"README.zh-CN.md",
|
|
18
|
-
"LICENSE",
|
|
19
|
-
"docs"
|
|
20
|
-
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsc",
|
|
23
|
-
"test": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@te-river/opencode-team-mode",
|
|
3
|
+
"version": "1.6.0",
|
|
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
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md",
|
|
17
|
+
"README.zh-CN.md",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"docs"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"test": "node scripts/run-tests.mjs",
|
|
24
|
+
"test:serial": "node scripts/run-tests.mjs --serial",
|
|
25
|
+
"test:one": "node scripts/run-tests.mjs --no-build",
|
|
26
|
+
"prepublishOnly": "tsc",
|
|
27
|
+
"dev": "tsc --watch"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"opencode",
|
|
31
|
+
"opencode-plugin",
|
|
32
|
+
"plugin",
|
|
33
|
+
"team-mode",
|
|
34
|
+
"collaboration",
|
|
35
|
+
"multi-agent",
|
|
36
|
+
"desktop",
|
|
37
|
+
"ai-coding"
|
|
38
|
+
],
|
|
39
|
+
"author": "",
|
|
40
|
+
"license": "Apache-2.0",
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"optionalDependencies": {
|
|
45
|
+
"playwright-core": "1.63.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@opencode-ai/plugin": ">=0.1.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^26.4.0",
|
|
52
|
+
"typescript": "^5.5.0"
|
|
53
|
+
},
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "https://github.com/Te-River/Opencode-TeamMode.git"
|
|
57
|
+
},
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=18.0.0"
|
|
60
|
+
}
|
|
61
|
+
}
|