@yankeguo/dsh-devlead-bundle 0.1.1 → 0.2.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 CHANGED
@@ -14,16 +14,23 @@ kind: "package-bundle"
14
14
 
15
15
  - **DevLead 模式**:每个会话一个持久开关;打开后获得 8 个 `devlead_*` 工具、DevLead 系统
16
16
  提示,以及两态 UI:未开启时只有 composer 工具条小图标,开启后才是 composer 上方的完整状态条。
17
+ 已开启的会话还会在侧边栏会话行显示 DevLead 标记,关掉会话后仍可辨识(DSH rc.1 对
18
+ blank / 尚无 turn 的新会话行不渲染该 seat,首次 turn 后才显示)。
17
19
  开关是**人类专属操作**(`/devlead on|off` 或界面开关),模型无法自行打开。
18
20
  - **产出物是标准 DSH 实体**:Workspace 真实注册进 `ctx.workspaceRegistry`,子会话是真实普通
19
21
  Session(侧边栏可见、可被人类打开接管),**不是 subagent**。
20
- - **监督与唤醒**:被 watch 的会话每个 `turn/end` 都写入 DevLead 会话的持久通知记录,Agent
21
- 存活时经合并窗口唤醒它决定下一步。
22
+ - **监督与唤醒**:被 watch 的会话每个 `turn/end` 都写入 DevLead 会话的持久通知记录;Agent
23
+ 存活时经合并窗口唤醒它决定下一步。watch 索引在 Host 重启 / 插件重载后从持久记录重建
24
+ (cold lead rehydration),已 dispose 的 lead 继续观察;冷 lead 默认 resume 投递
25
+ (`wakeColdSession: true`)。
22
26
  - **事件溯源**:模式 / watch 集合 / 通知以可忽略的 `plugin:devlead/*` 记录持久化,可跨重启 /
23
- 恢复 / fork;`devLead` Session projection 把状态同步到浏览器。
24
- - **人类命令**:`/devlead`、`/devlead on|off`、`/devlead watch|unwatch <session>`。
27
+ 恢复 / fork;`devLead` Session projection 把状态同步到浏览器,summary 级 `devLeadMode`
28
+ 随每个会话列表行下发,供侧边栏标记使用。
29
+ - **人类命令**:`/devlead`、`/devlead on|off`、`/devlead reset`(损坏状态恢复)、
30
+ `/devlead watch|unwatch <session>`。
25
31
  - **两态 UI**:未开启时 composer 工具条里只有一个 ghost 图标(点击 `/devlead on`);开启后
26
- composer 上方出现 DevLeadBar,显示开关、监督会话数 / 运行中数与最近通知。
32
+ composer 上方出现 DevLeadBar,显示开关、监督会话数 / 运行中数与最近通知;侧边栏会话行
33
+ 同时带 DevLead 标记。
27
34
 
28
35
  ## 本 bundle 包含的插件行
29
36
 
@@ -32,7 +39,7 @@ kind: "package-bundle"
32
39
  | `devlead` | `@yankeguo/dsh-devlead` | 核心服务 `ctx.devLead`:模式、Workspace/Session 编排、通知投递、`devLead` projection |
33
40
  | `devlead-tool` | `@yankeguo/dsh-tool-devlead` | 8 个模型工具与条件 system prompt |
34
41
  | `devlead-command` | `@yankeguo/dsh-command-devlead` | `/devlead` 人类命令 |
35
- | `devlead-ui` | `@yankeguo/dsh-client-ui-devlead` | 浏览器两态 UI:工具条开关 + 开启后的 DevLeadBar |
42
+ | `devlead-ui` | `@yankeguo/dsh-client-ui-devlead` | 浏览器两态 UI:工具条开关 + 开启后的 DevLeadBar + 侧边栏会话行标记 |
36
43
 
37
44
  依赖方向:`protocol ← devlead ← {tool, command}`;`client-ui` 只依赖 `protocol`(浏览器侧)。
38
45
 
@@ -51,7 +58,7 @@ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
51
58
  勾选一次即可),刷新 Web 页面。升级 / 卸载:
52
59
 
53
60
  ```sh
54
- dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle@0.1.1 # 升级到指定版本
61
+ 'dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle@0.2.0 # 升级到指定版本
55
62
  dsh plugin --profile desktop remove @yankeguo/dsh-devlead-bundle # 卸载
56
63
  ```
57
64
 
@@ -95,9 +102,13 @@ profile,且 `desktop` profile 已启用本 bundle(重复插入相同 row id
95
102
  - 撤销:删除 profile 的 `node_modules/devlead-repo`;`pnpm uninstall:profile` 负责撤销
96
103
  `install:profile` 创建的包链接与 bundle 选择。
97
104
 
98
- 本地一键校验:`pnpm verify`(typecheck + 单元测试 + 构建);`pnpm e2e` 用隔离的
99
- `/tmp` DSH_HOME 分别验收 `dev:patch` 与 `install:profile` 两条本地加载路径(需要本机
100
- 已安装 DSH,因此不在 CI 中运行)。
105
+ 本地一键校验:`pnpm verify`(typecheck + 单元测试 + 构建);`pnpm e2e` 默认走
106
+ `--flow patch`,`pnpm e2e --flow installed` 走 `install-profile`,两者都用隔离的
107
+ `os.tmpdir()` DSH_HOME 验收本地加载路径(需要本机已安装 DSH,因此不在 CI 中运行)。
108
+ 0.2.0 起 E2E 分多阶段:阶段 1 保持默认组合断言(含 `Worktree isolation: unavailable`),
109
+ 阶段 1b 用同一加载流/scratch home 重启验证冷 lead 索引重建,阶段 2 在同一 scratch profile 里
110
+ 追加官方实验 forge bundle 并验证 worktree happy path;两条加载流各 **61/61**(阶段 1 27 +
111
+ 阶段 1b 12 + 阶段 2 22),`--no-worktree` 跳过阶段 2(**39/39**,阶段 1 + 1b)。
101
112
 
102
113
  ### 前置条件
103
114
 
@@ -109,11 +120,15 @@ profile,且 `desktop` profile 已启用本 bundle(重复插入相同 row id
109
120
  ```
110
121
  /devlead # 状态:开关、监督会话、最近通知、帮助
111
122
  /devlead on # 打开当前会话的 DevLead 模式(人类专属)
112
- /devlead off # 关闭
123
+ /devlead off # 关闭(fold 冻结时同时完成隐式 reset 恢复)
124
+ /devlead reset # 人类专属恢复:丢弃本会话的 DevLead 状态(模式/watch/digest)
113
125
  /devlead watch <session> # 监督某个会话(完整 id 或唯一前缀)
114
126
  /devlead unwatch <session> # 取消监督
115
127
  ```
116
128
 
129
+ `/devlead status` 还会打印 `Worktree isolation: available|unavailable`,让人类直接判断当前
130
+ profile 是否组合了可选的实验性 worktree 隔离能力。
131
+
117
132
  打开模式后,让模型为它配置工作区并派发任务:
118
133
 
119
134
  ```
@@ -121,8 +136,8 @@ profile,且 `desktop` profile 已启用本 bundle(重复插入相同 row id
121
136
  再用 devlead_create_session 在这个工作区创建一个子会话,下发下面的任务:……
122
137
  ```
123
138
 
124
- 子会话跑完后 DevLead 会话会收到通知摘要并被唤醒。详见仓库 README 的「使用」与
125
- 「通知机制」。
139
+ 子会话跑完后(lead 仍被索引时)DevLead 会话会收到通知摘要并被唤醒。详见仓库 README 的
140
+ 「使用」与「通知机制」。
126
141
 
127
142
  ## 配置
128
143
 
@@ -133,10 +148,10 @@ bundle 的 patch 行没有显式写配置,核心服务使用 DESIGN 默认值
133
148
  ```yaml
134
149
  - id: devlead
135
150
  config:
136
- notificationBatchMs: 400 # 通知合并窗口(毫秒)
151
+ notificationBatchMs: 400 # 通知合并窗口(0–2147483647 毫秒)
137
152
  maxWatchedSessions: 64 # 每个 lead 最多监督的会话数
138
153
  maxListedSessions: 200 # 会话列表最大行数
139
- wakeColdSession: false # 冷 DevLead 会话是否 resume 后唤醒
154
+ wakeColdSession: true # resume 冷 DevLead 会话以投递其排队的通知(默认)
140
155
  defaultAgentPreset: '' # 创建会话的默认 Agent preset
141
156
  ```
142
157
 
@@ -144,15 +159,36 @@ bundle 的 patch 行没有显式写配置,核心服务使用 DESIGN 默认值
144
159
 
145
160
  - 模式是**每个 Session 的持久状态**:打开后 DSH 重启 / 会话恢复仍然打开,需要人类关闭。
146
161
  - 通知保留最近 64 条(projection 常量截断);更早的记录仍在 Session 日志里。
147
- - 冷 DevLead 会话默认只留持久通知记录,不自动 resume(`wakeColdSession: false`)。
162
+ - watch 索引在 Host 重启 / 插件重载后从持久记录重建(projection cache 预筛 + 精确折叠,
163
+ 无法分类的候选全量读取上限 64);`agent/disposed` 不再丢索引,已 dispose 的 lead 继续观察。
164
+ - 冷 lead 有排队通知时默认 resume 投递(`wakeColdSession: true`);设为 `false` 只把队列留在
165
+ 内存,等人类打开 lead Session 时补写并投递。插件卸载期间结束的 turn 无法补发。
166
+ - 损坏的 `plugin:devlead/*` 记录会让 fold 冻结(`DEVLEAD_PROJECTION_INVALID`),人类可用
167
+ `/devlead reset`(或冻结时 `/devlead off`)追加 reset 记录恢复;旧版本无法执行该恢复。
168
+ - Workspace 注册(`devlead_use_workspace` / core `useWorkspace`)默认**不创建**缺失目录:
169
+ `create` 默认 `false`,只有人类明确要求建目录时才传 `true`。
148
170
  - watch 上限默认 64;命令的候选列表默认截断在 200 行,列表外的会话会回退到 core 的
149
- `getSession` 解析。
150
- - 不做 git 克隆 / worktree 管理;不跨进程编排;不替人类做权限决策。
171
+ `getSession` 解析;前缀引用在变更前还会用 core 的穷尽 resolver 确认唯一性。
172
+ - 不做 git 克隆 / 通用 worktree 管理;不跨进程编排;不替人类做权限决策。实验性 DSH worktree
173
+ 服务被组合时,`devlead_create_session` 可传 `isolation: "worktree"` 为新会话尽力提供隔离检出;
174
+ 缺少该服务时退化为共享 checkout 并如实上报,绝不失败(默认 Web 组合即无此能力)。
151
175
  - 兼容性:`engines.dsh: >=0.2.2-rc.1 <0.3.0`;本地构建 / 发布需要 Node.js ≥ 24.9、pnpm 12。
152
176
 
153
177
  ## 文档
154
178
 
155
- - 仓库 [README](../../README.md):功能、安装、使用、通知机制、配置与故障排查
156
- - [DESIGN](../../docs/DESIGN.md):领域模型、持久记录、核心服务 API、通知泵与权限模型
157
- - [PUBLISHING](../../docs/PUBLISHING.md):npm trusted publishing 发布流程
158
- - [v0.1.1 release notes](../../docs/releases/v0.1.1.md)
179
+ - 仓库 [README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md):功能、安装、使用、通知机制、配置与故障排查(英文版见 [README.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.md))
180
+ - [DESIGN](https://github.com/yankeguo/dsh-devlead/blob/main/docs/DESIGN.md):领域模型、持久记录、核心服务 API、通知泵与权限模型
181
+ - [PUBLISHING](https://github.com/yankeguo/dsh-devlead/blob/main/docs/PUBLISHING.md):npm staged publish 发布流程(CI 只 stage、维护者人工 approve 后公开)
182
+ - [v0.2.0 release notes](https://github.com/yankeguo/dsh-devlead/blob/main/docs/releases/v0.2.0.md)
183
+ - 包 README:[protocol](https://github.com/yankeguo/dsh-devlead/blob/main/packages/protocol/README.md) · [devlead](https://github.com/yankeguo/dsh-devlead/blob/main/packages/devlead/README.md) ·
184
+ [tool](https://github.com/yankeguo/dsh-devlead/blob/main/packages/tool/README.md) · [command](https://github.com/yankeguo/dsh-devlead/blob/main/packages/command/README.md) ·
185
+ [client-ui](https://github.com/yankeguo/dsh-devlead/blob/main/packages/client-ui/README.md)
186
+
187
+ ## English summary
188
+
189
+ `@yankeguo/dsh-devlead-bundle` installs the whole DevLead suite - the core `ctx.devLead` service,
190
+ eight `devlead_*` tools, the `/devlead` human command, and the Web UI (composer switch/status
191
+ strip plus sidebar marks). The suite targets the default DSH Web composition
192
+ (`dsh-base` + `dsh-web-app`) and has no hard dependency on experimental plugins. Full docs:
193
+ [README.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.md) (English), [README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md) (中文), and
194
+ [DESIGN.md](https://github.com/yankeguo/dsh-devlead/blob/main/docs/DESIGN.md).
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DevLead Suite",
4
+ "description": "Installing this bundle provides DevLead mode: a mode service, model tools, the /devlead command, and a Web UI that let one Session lead other Workspaces and Sessions."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "DevLead 套件",
4
+ "description": "安装此套件即可获得 DevLead 模式:模式服务、模型工具、/devlead 命令与 Web 界面,让一个会话作为 lead 管理其他 Workspace 与会话。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yankeguo/dsh-devlead-bundle",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
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
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,18 +13,20 @@
13
13
  },
14
14
  "exports": {
15
15
  "./cordis.patch.yml": "./cordis.patch.yml",
16
+ "./locale/*.json": "./locale/*.json",
16
17
  "./package.json": "./package.json"
17
18
  },
18
19
  "files": [
19
20
  "cordis.patch.yml",
20
21
  "icon.svg",
22
+ "locale/*.json",
21
23
  "README.md"
22
24
  ],
23
25
  "dependencies": {
24
- "@yankeguo/dsh-devlead": "0.1.1",
25
- "@yankeguo/dsh-tool-devlead": "0.1.1",
26
- "@yankeguo/dsh-command-devlead": "0.1.1",
27
- "@yankeguo/dsh-client-ui-devlead": "0.1.1"
26
+ "@yankeguo/dsh-devlead": "0.2.1",
27
+ "@yankeguo/dsh-tool-devlead": "0.2.1",
28
+ "@yankeguo/dsh-command-devlead": "0.2.1",
29
+ "@yankeguo/dsh-client-ui-devlead": "0.2.1"
28
30
  },
29
31
  "peerDependencies": {
30
32
  "@deepseek-ai/cordis": "~4.1.0"