dsh-collab-pair 1.0.0 → 1.0.1
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 +133 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,136 @@
|
|
|
1
1
|
# dsh-collab-pair
|
|
2
2
|
|
|
3
|
+
> A DSH plugin that links one project-manager conversation to one or more worker conversations. Every worker result is relayed back automatically, and a task board shows all collaborations with their live working state.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
dsh plugin add dsh-collab-pair
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or install `dsh-collab-pair` from the DSH plugin manager, refresh the page, and open **Settings → Collaboration pair**. The settings UI ships English and Chinese and follows the app language.
|
|
12
|
+
|
|
13
|
+
**The plugin only links conversations.** Goals, task breakdown, and acceptance criteria stay with the project manager; the plugin never asks for them again.
|
|
14
|
+
|
|
15
|
+
One manager can run several workers, each with its own round counter:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Project manager (owns the goal, breakdown, acceptance)
|
|
19
|
+
│ collab_dispatch(worker="A") — round N
|
|
20
|
+
▼
|
|
21
|
+
Worker A / Worker B / … (execute the task, then collab_report)
|
|
22
|
+
│ the worker turn ends → the plugin captures report + final output
|
|
23
|
+
▼
|
|
24
|
+
Manager receives a collaboration report → next round for that worker, or collab_done
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Visual settings page
|
|
28
|
+
|
|
29
|
+
**Settings → Collaboration pair**, top to bottom:
|
|
30
|
+
|
|
31
|
+
1. **Working conversation** — the conversation to act on (defaults to the open one).
|
|
32
|
+
2. **Current conversation · <title>** — this conversation's own links and status first:
|
|
33
|
+
- Project manager: the workers it manages (state, round, current task, latest report, unlink) plus a form to link another worker.
|
|
34
|
+
- Worker: its manager, current task, state, latest report, and a "Leave" action.
|
|
35
|
+
- Not linked: the link form.
|
|
36
|
+
3. **All tasks** — a board across every collaboration. Each row shows the worker, its manager, round, **working state** (`Working` / `Waiting for report` / `Idle` / `Finished`), waiting time, current task, and latest report. Refresh re-reads it.
|
|
37
|
+
|
|
38
|
+
The page only links, unlinks, and reports status. Goals, tasks, and acceptance stay in the manager conversation.
|
|
39
|
+
|
|
40
|
+
## Title prefixes
|
|
41
|
+
|
|
42
|
+
Linking adds a prefix to both conversations and removes it when the link ends (or the last worker finishes):
|
|
43
|
+
|
|
44
|
+
- Manager: `【项目经理】<title>`
|
|
45
|
+
- Worker: `【员工】<title>`
|
|
46
|
+
|
|
47
|
+
The prefix text is configurable and can be turned off.
|
|
48
|
+
|
|
49
|
+
## Quick start
|
|
50
|
+
|
|
51
|
+
1. Open the conversation that should manage the project and say:
|
|
52
|
+
|
|
53
|
+
> Link a worker. The goal is to finish XXX. Dispatch round one: …
|
|
54
|
+
|
|
55
|
+
The model calls `collab_link({ peer: "new" })` and `collab_dispatch({ task: "…" })`.
|
|
56
|
+
|
|
57
|
+
2. Link a second worker the same way. With several workers, dispatch with `worker`:
|
|
58
|
+
|
|
59
|
+
> Dispatch to worker B: … (worker="session-…")
|
|
60
|
+
|
|
61
|
+
3. Worker results come back automatically. Continue with `collab_dispatch`, or close that worker with `collab_done({ worker, summary })`.
|
|
62
|
+
|
|
63
|
+
For an existing conversation, call `collab_sessions` to get its id, then `collab_link({ peer: "<sessionId>" })`.
|
|
64
|
+
|
|
65
|
+
## Tools
|
|
66
|
+
|
|
67
|
+
| Tool | Role | Purpose |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| `collab_sessions` | anyone | List recent conversations (id / title / activity / link state) |
|
|
70
|
+
| `collab_link` | anyone | Link a worker; `role=worker` makes the current conversation the worker; `peer="new"` creates one |
|
|
71
|
+
| `collab_dispatch` | manager | Dispatch one round; `worker` selects the worker (optional with a single worker), `acceptance` optional |
|
|
72
|
+
| `collab_report` | worker | Report `summary` / `status`(done\|partial\|blocked) / `details` / `next` |
|
|
73
|
+
| `collab_status` | anyone | A manager sees every worker's progress; a worker sees its manager and pending task |
|
|
74
|
+
| `collab_configure` | manager | Set a worker's agent preset or model; without arguments it lists available presets |
|
|
75
|
+
| `collab_done` | manager | Finish one worker (or `all=true`) |
|
|
76
|
+
| `collab_unlink` | both | Remove a link; a manager uses `worker` or `all`, a worker leaves its own |
|
|
77
|
+
|
|
78
|
+
## `/collab` command
|
|
79
|
+
|
|
80
|
+
The settings page uses it; it can also be typed manually:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
/collab tasks
|
|
84
|
+
/collab status
|
|
85
|
+
/collab link {"peer":"new"}
|
|
86
|
+
/collab link {"peer":"session-…"}
|
|
87
|
+
/collab configure {"worker":"session-…","preset":"ptc"}
|
|
88
|
+
/collab configure {"worker":"session-…","provider":"deepseek-account","model":"deepseek-flash"}
|
|
89
|
+
/collab dispatch {"worker":"session-…","task":"…","acceptance":"…"}
|
|
90
|
+
/collab done {"worker":"session-…","summary":"…"}
|
|
91
|
+
/collab done {"all":true,"summary":"…"}
|
|
92
|
+
/collab unlink {"worker":"session-…"}
|
|
93
|
+
/collab unlink {"all":true}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`--key value` flags are accepted too: `/collab link --peer new`. `/collab tasks` returns the board data (all links plus live state).
|
|
97
|
+
|
|
98
|
+
## Configuration
|
|
99
|
+
|
|
100
|
+
The `collab-pair` row in `cordis.patch.yml`:
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
- id: collab-pair
|
|
104
|
+
name: 'dsh-collab-pair'
|
|
105
|
+
config:
|
|
106
|
+
maxRounds: 20 # rounds per worker
|
|
107
|
+
maxRelayChars: 12000 # max characters of the worker's final output in a relay
|
|
108
|
+
maxHistory: 20 # recent rounds kept per worker
|
|
109
|
+
notifyWorkerOnDone: true # tell the worker to stop when the link is finished
|
|
110
|
+
autoRelay: true # false records the report without delivering it
|
|
111
|
+
addPrefix: true # add the title prefix to linked conversations
|
|
112
|
+
prefixManager: '【项目经理】'
|
|
113
|
+
prefixWorker: '【员工】'
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Persistence
|
|
117
|
+
|
|
118
|
+
One record per worker lives in `$DSH_HOME/storages/collab_pair.json` (storage-domain `collab_pair`, table `links`). Links survive plugin reloads and DSH restarts; without the storage service the plugin falls back to memory and `collab_status.storage` reports `memory`.
|
|
119
|
+
|
|
120
|
+
## Limits
|
|
121
|
+
|
|
122
|
+
- A worker conversation belongs to one collaboration at a time; a manager can own several workers.
|
|
123
|
+
- A conversation cannot be both manager and worker.
|
|
124
|
+
- Worker conversations need a configured model (new conversations inherit the deployment default).
|
|
125
|
+
- Relayed results arrive as user messages in the manager conversation, with a report header and round marker. The generated message text is Chinese in this release; the settings UI is English.
|
|
126
|
+
- With a PTC preset the worker calls `collab_report` inside `run_code`; the plugin still reads the structured report.
|
|
127
|
+
- A new worker has no title until its first message; the prefix is applied once the title exists.
|
|
128
|
+
- The board is a snapshot on Refresh (working state comes from the agent status at that moment). It does not poll, which keeps command records out of the session log.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
# 中文说明
|
|
133
|
+
|
|
3
134
|
> DSH 插件:一个项目经理对话管理多个员工对话,任务自动流转,并提供全部任务看板。
|
|
4
135
|
|
|
5
136
|
## 安装
|
|
@@ -8,7 +139,7 @@
|
|
|
8
139
|
dsh plugin add dsh-collab-pair
|
|
9
140
|
```
|
|
10
141
|
|
|
11
|
-
或在 DSH 的插件管理里用包名 `dsh-collab-pair` 安装。安装后刷新页面,在 **设置 → 双对话协作**
|
|
142
|
+
或在 DSH 的插件管理里用包名 `dsh-collab-pair` 安装。安装后刷新页面,在 **设置 → 双对话协作** 打开。界面中英文跟随应用语言。
|
|
12
143
|
|
|
13
144
|
**插件只做一件事:把员工对话关联到项目经理对话。** 目标、任务拆解、验收标准都由项目经理在对话里掌握,插件不重复收集。
|
|
14
145
|
|
|
@@ -118,7 +249,7 @@ dsh plugin add dsh-collab-pair
|
|
|
118
249
|
- 员工对话同时只能属于一个协作;项目经理可以关联多个员工。
|
|
119
250
|
- 一个对话不能同时是项目经理和员工。
|
|
120
251
|
- 员工对话需要已配置模型(新建对话继承部署默认模型)。
|
|
121
|
-
-
|
|
252
|
+
- 回传以用户消息形式进入项目经理对话(带【协作回报】标题与轮次标记)。本版本生成的消息文本为中文,设置页支持英文。
|
|
122
253
|
- 员工用 PTC 预设时 `collab_report` 会在 `run_code` 里调用,插件仍能读到结构化汇报。
|
|
123
254
|
- 新建员工在产生第一条消息前没有标题,前缀会在它第一轮结束拿到标题后补上。
|
|
124
255
|
- 看板是点「刷新」时的快照(`工作中`/`等待回报` 来自当时的 agent 状态),不做轮询,避免往会话日志里反复写命令记录。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-collab-pair",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "DSH plugin: link one project-manager conversation with one or more worker conversations, dispatch rounds, relay every result back, and track all tasks from a visual board.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|