@yankeguo/dsh-devlead-bundle 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +128 -2
- package/cordis.patch.yml +9 -0
- package/icon.svg +8 -0
- package/package.json +41 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Y.-K. Guo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "Dev Lead mode for DeepSeek Harness: turn one session into a lead that creates and steers ordinary Workspaces and Sessions, watches their state, and is woken on change."
|
|
3
|
+
kind: "package-bundle"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @yankeguo/dsh-devlead-bundle
|
|
7
|
+
|
|
8
|
+
一套面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的插件:
|
|
9
|
+
把**一个普通会话**升级成 **DevLead 会话**,让它能直接操纵 DSH 的 **Workspace** 与
|
|
10
|
+
**Session**,创建/续写其他会话、读取会话状态、在会话状态变化时被唤醒,从而在一个
|
|
11
|
+
人类可见、可参与的标准界面里统管多个仓库。
|
|
12
|
+
|
|
13
|
+
## 特性
|
|
14
|
+
|
|
15
|
+
- **DevLead 模式**:每个会话一个持久开关;打开后获得 8 个 `devlead_*` 工具、DevLead 系统
|
|
16
|
+
提示,以及两态 UI:未开启时只有 composer 工具条小图标,开启后才是 composer 上方的完整状态条。
|
|
17
|
+
开关是**人类专属操作**(`/devlead on|off` 或界面开关),模型无法自行打开。
|
|
18
|
+
- **产出物是标准 DSH 实体**:Workspace 真实注册进 `ctx.workspaceRegistry`,子会话是真实普通
|
|
19
|
+
Session(侧边栏可见、可被人类打开接管),**不是 subagent**。
|
|
20
|
+
- **监督与唤醒**:被 watch 的会话每个 `turn/end` 都写入 DevLead 会话的持久通知记录,Agent
|
|
21
|
+
存活时经合并窗口唤醒它决定下一步。
|
|
22
|
+
- **事件溯源**:模式 / watch 集合 / 通知以可忽略的 `plugin:devlead/*` 记录持久化,可跨重启 /
|
|
23
|
+
恢复 / fork;`devLead` Session projection 把状态同步到浏览器。
|
|
24
|
+
- **人类命令**:`/devlead`、`/devlead on|off`、`/devlead watch|unwatch <session>`。
|
|
25
|
+
- **两态 UI**:未开启时 composer 工具条里只有一个 ghost 图标(点击 `/devlead on`);开启后
|
|
26
|
+
composer 上方出现 DevLeadBar,显示开关、监督会话数 / 运行中数与最近通知。
|
|
27
|
+
|
|
28
|
+
## 本 bundle 包含的插件行
|
|
29
|
+
|
|
30
|
+
| entry id | 包 | 作用 |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `devlead` | `@yankeguo/dsh-devlead` | 核心服务 `ctx.devLead`:模式、Workspace/Session 编排、通知投递、`devLead` projection |
|
|
33
|
+
| `devlead-tool` | `@yankeguo/dsh-tool-devlead` | 8 个模型工具与条件 system prompt |
|
|
34
|
+
| `devlead-command` | `@yankeguo/dsh-command-devlead` | `/devlead` 人类命令 |
|
|
35
|
+
| `devlead-ui` | `@yankeguo/dsh-client-ui-devlead` | 浏览器两态 UI:工具条开关 + 开启后的 DevLeadBar |
|
|
36
|
+
|
|
37
|
+
依赖方向:`protocol ← devlead ← {tool, command}`;`client-ui` 只依赖 `protocol`(浏览器侧)。
|
|
38
|
+
|
|
39
|
+
## 安装
|
|
40
|
+
|
|
41
|
+
### 从 npm 安装(发布后,推荐)
|
|
42
|
+
|
|
43
|
+
在 **Plugins → Add plugin** 输入 `@yankeguo/dsh-devlead-bundle` 安装并启用;
|
|
44
|
+
或:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
安装后在 Plugins 页面确认 bundle 已启用(新安装的 bundle 通常默认启用;若显示未启用,
|
|
51
|
+
勾选一次即可),刷新 Web 页面。升级 / 卸载:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle@0.1.0 # 升级到指定版本
|
|
55
|
+
dsh plugin --profile desktop remove @yankeguo/dsh-devlead-bundle # 卸载
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 本地 checkout 安装
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
pnpm install && pnpm build
|
|
62
|
+
pnpm install:profile # 链接到 ~/.dsh/profiles/desktop 并启用 bundle
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
或直接 `--patch` 调试(不写 profile,先 `pnpm build`):
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
pnpm build
|
|
69
|
+
pnpm dev:patch
|
|
70
|
+
dsh web --patch .tmp/cordis.patch.yml --port 34000 --no-open
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 前置条件
|
|
74
|
+
|
|
75
|
+
- DSH `0.2.2-rc.1`(bundle 声明 `engines.dsh: >=0.2.2-rc.1 <0.3.0`);
|
|
76
|
+
- 从 npm 安装不需要本机 Node;本地构建 / 发布需要 Node.js ≥ 24.9 与 pnpm 12。
|
|
77
|
+
|
|
78
|
+
## 使用
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
/devlead # 状态:开关、监督会话、最近通知、帮助
|
|
82
|
+
/devlead on # 打开当前会话的 DevLead 模式(人类专属)
|
|
83
|
+
/devlead off # 关闭
|
|
84
|
+
/devlead watch <session> # 监督某个会话(完整 id 或唯一前缀)
|
|
85
|
+
/devlead unwatch <session> # 取消监督
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
打开模式后,让模型为它配置工作区并派发任务:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
先用 devlead_use_workspace 注册 /absolute/path/to/repo,
|
|
92
|
+
再用 devlead_create_session 在这个工作区创建一个子会话,下发下面的任务:……
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
子会话跑完后 DevLead 会话会收到通知摘要并被唤醒。详见仓库 README 的「使用」与
|
|
96
|
+
「通知机制」。
|
|
97
|
+
|
|
98
|
+
## 配置
|
|
99
|
+
|
|
100
|
+
bundle 的 patch 行没有显式写配置,核心服务使用 DESIGN 默认值;要覆盖时在 profile 的
|
|
101
|
+
`cordis.patch.yml` 里按 loader row id `devlead` 覆盖该行 `config`(DSH 的 patch 是整体替换
|
|
102
|
+
该行 config,需写全要保留的字段)。
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
- id: devlead
|
|
106
|
+
config:
|
|
107
|
+
notificationBatchMs: 400 # 通知合并窗口(毫秒)
|
|
108
|
+
maxWatchedSessions: 64 # 每个 lead 最多监督的会话数
|
|
109
|
+
maxListedSessions: 200 # 会话列表最大行数
|
|
110
|
+
wakeColdSession: false # 冷 DevLead 会话是否 resume 后唤醒
|
|
111
|
+
defaultAgentPreset: '' # 创建会话的默认 Agent preset
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 行为与限制
|
|
115
|
+
|
|
116
|
+
- 模式是**每个 Session 的持久状态**:打开后 DSH 重启 / 会话恢复仍然打开,需要人类关闭。
|
|
117
|
+
- 通知保留最近 64 条(projection 常量截断);更早的记录仍在 Session 日志里。
|
|
118
|
+
- 冷 DevLead 会话默认只留持久通知记录,不自动 resume(`wakeColdSession: false`)。
|
|
119
|
+
- watch 上限默认 64;命令的候选列表默认截断在 200 行,列表外的会话会回退到 core 的
|
|
120
|
+
`getSession` 解析。
|
|
121
|
+
- 不做 git 克隆 / worktree 管理;不跨进程编排;不替人类做权限决策。
|
|
122
|
+
- 兼容性:`engines.dsh: >=0.2.2-rc.1 <0.3.0`;本地构建 / 发布需要 Node.js ≥ 24.9、pnpm 12。
|
|
123
|
+
|
|
124
|
+
## 文档
|
|
125
|
+
|
|
126
|
+
- 仓库 [README](../../README.md):功能、安装、使用、通知机制、配置与故障排查
|
|
127
|
+
- [DESIGN](../../docs/DESIGN.md):领域模型、持久记录、核心服务 API、通知泵与权限模型
|
|
128
|
+
- [PUBLISHING](../../docs/PUBLISHING.md):npm trusted publishing 发布流程
|
|
129
|
+
- [v0.1.0 release notes](../../docs/releases/v0.1.0.md)
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<path d="M3 5.5h7.5v7.5H3z" />
|
|
3
|
+
<path d="M13.5 5.5H21v5h-7.5z" />
|
|
4
|
+
<path d="M13.5 13H21v5.5h-7.5z" />
|
|
5
|
+
<path d="M3 15.5h7.5V21H3z" />
|
|
6
|
+
<path d="M10.5 9.25h3" />
|
|
7
|
+
<path d="M13.5 15.75h-3" />
|
|
8
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yankeguo/dsh-devlead-bundle",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Dev Lead mode for DeepSeek Harness: turn one session into a lead that creates and steers ordinary Workspaces and Sessions, watches their state, and is woken on change.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"icon": "./icon.svg",
|
|
8
|
+
"dsh": {
|
|
9
|
+
"bundle": {
|
|
10
|
+
"patch": "./cordis.patch.yml",
|
|
11
|
+
"listedByDefault": false
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"cordis.patch.yml",
|
|
20
|
+
"icon.svg",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@yankeguo/dsh-devlead": "0.1.0",
|
|
25
|
+
"@yankeguo/dsh-tool-devlead": "0.1.0",
|
|
26
|
+
"@yankeguo/dsh-command-devlead": "0.1.0",
|
|
27
|
+
"@yankeguo/dsh-client-ui-devlead": "0.1.0"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@deepseek-ai/cordis": "~4.1.0"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"dsh": ">=0.2.2-rc.1 <0.3.0"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/yankeguo/dsh-devlead.git",
|
|
41
|
+
"directory": "packages/bundle"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/yankeguo/dsh-devlead#readme"
|
|
6
44
|
}
|