dsh-collab-workbench 0.0.0-stage → 0.1.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.

Potentially problematic release.


This version of dsh-collab-workbench might be problematic. Click here for more details.

package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,133 @@
1
- # Temporary Holding Version
1
+ # dsh-collab-workbench · 协作工作台 0.1.1
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ## 更新提示与手动安装(0.1.1)
4
+
5
+ 工作台侧栏底部提供“关于”页,可手动检查当前安装来源和新版本;仅 npm registry 安装包会查询 `latest`,有更新时才显示侧栏云朵提示。更新需用户在页面确认,安装后按提示重启 DSH;本地 tgz / 目录安装不会自动切换到 npm。网络异常只影响更新检查,不影响工作台及历史数据。
6
+
7
+ 0.1.0 是首次对外发布版本;下方 0.38.x 等编号仅用于记录此前内部开发,不代表已公开发布。
8
+
9
+ ## 内部开发记录:冷启动修复(0.38.1)
10
+
11
+ 浏览器 Client factory ID 与 npm 包的 `./client` 导入路径保持一致,修复改名后重启报 `duplicate factory registration`。台账、RPC 路径及持久化消息标识均未改动。
12
+
13
+ > npm 发布名自 0.38.0 起由 `dsh-workbench` 更名为 `dsh-collab-workbench`(原名在 npm 已被他人占用)。数据目录 `$DSH_HOME/dsh-workbench/`、RPC 端点与历史数据完全不受影响;从旧包升级时请先卸载旧 bundle 再安装新包。
14
+
15
+ ## 流程一致性修复(0.38.0)
16
+
17
+ - 任务执行只走持久调度路径:多任务号启动公告、未关联任务的执行成员 @ 不再回落另一套普通群会话;需明确 taskId。管理员协调保留,旧种子认领指示统一为独立执行汇报。
18
+ - 创建者身份从实际群会话推导并校验;无法确定创建者的自动通知署名“系统”,不再伪装成用户。
19
+ - 项目所有任务完成后,持久交接队列唤醒一名可用管理员进行最终复核,原成员回执不重复刷群。交接按项目任务版本去重,投递失败可恢复。负责人用 dwb_notify_user 完成最终交付,未完成任务不能提前交付,同版本不重复通知;新增/返工使旧交付失效。
20
+ - 升级时历史已完成项目只标记“待复核”,不自动重跑或批量唤醒旧项目,也不假定历史已经交付。以后新的完成转换会自动交接。
21
+ - 已有且唯一匹配项目目录的 SOPAI 工作项从工作台派生状态与证据;保留人工决策/调用历史和首页人工正文,不补造过去的记录。无项目工作项时不创建;匹配歧义/读写冲突明确记录错误。JSON 与首页分别原子更新,非跨文件事务,失败通过重试收敛。
22
+ - 审批与普通群消息按时间稳定穿插;审批结果原位更新,不再按待审批/已处理重排。原生授权能力、卡片样式和明暗主题令牌不变。
23
+ - execution.status 返回项目交付、工作项同步状态及交接队列,便于检查未交付和同步异常。
24
+
25
+ 验证:`npm test` 与 `npm run build`。测试使用隔离临时台账及宿主依赖替身;不代表已在用户页面完成审批或明暗主题实测。替换已安装插件后,按安装结果要求重启 Harness,再刷新原页面。
26
+
27
+
28
+ ## 群内原生权限审批(0.37.1)
29
+
30
+ 打开工作台项目群后,群聊消息区会展示成员会话的权限审批:成员、任务、命令、申请原因、权限范围,以及“允许一次 / 拒绝”。无需给 Agent 编写工具提示词,也不必离开群聊处理可安全匹配的请求。
31
+
32
+ - 群内卡片与原生会话使用同一个当前待审批交互对象;按钮直接调用原始用户回调。没有新增 Host 批准接口或供 Agent 使用的授权工具。
33
+ - 按当前 Session、callId、工具和原因关联;无法明确关联、同一调用存在多个未结请求、已取消或过期时禁用群内授权,保留“打开原会话”入口。审计 UUID 与 Client 本地交互 key 不混用。
34
+ - 宿主的 `approval/asked`、`approval/decided` 日志通过增量会话投影提供显示数据。已允许、已拒绝、取消及过期结果会同步到群内卡片;最近记录可查看,较早记录仍以原会话审计为准。
35
+ - 执行实例进入 `approval-wait`,任务仍属进行中但执行汇总显示“等待权限审批”;占用成员和并发额度,不触发无活动提醒、继续提示或自动重试。普通消息不会解除审批等待。
36
+ - 在原会话回答同一请求后,群内入口失效;在群内回答后,原请求也随即结算。终止任务会取消其请求,迟到结果不能复活任务。
37
+ - 刷新或重连后只复用宿主仍在等待的原始请求,不根据历史记录制造新的批准能力;宿主进程重启按原有有界恢复处理,旧卡片不可授权。
38
+ - 打开群时保留相关活动会话的 Client 引用以接收原生审批。切换群组或页签不会撤销尚未回答的原生请求;引用由插件后台维护,任务结束、群删除或插件卸载时释放。本版没有跨群全局审批收件箱。
39
+ - 页面刷新后使用新版界面。安装结果为 applied 不等于已经验证当前用户页面的视觉;明暗主题、批准、拒绝和取消已在隔离的真实 Harness + Chrome 中验证,未操作用户业务审批。
40
+
41
+ 复现验证:`npm test`、`npm run check`、`python3 test/native-e2e.py`、`python3 test/native-approval-browser.py`。真实浏览器测试只使用临时 profile、本地模拟模型及固定 `printf`;Chrome 启动若被工具沙箱拒绝,应申请单次测试权限,不关闭 Chrome 沙箱或修改用户环境。测试截图和结构化结果输出到 `test-artifacts/`。
42
+
43
+ 围绕角色和项目群协作的 DeepSeek Harness 插件。本版将任务从台账条目升级为由系统安排、记录和恢复的执行工作。
44
+
45
+ ## 自动执行
46
+
47
+ 1. 创建任务后,系统为每个指派成员建立独立执行实例与 Session,并持久保存初始输入。
48
+ 2. 按高/中/低优先级、前置依赖和可用执行额度启动;默认全局最多 3 个执行,同一个角色最多 1 个。
49
+ 3. 不同任务共享同一项目目录时顺序运行。同一个任务的多个指派成员可以协作并行;本版没有为每个成员自动建立 Git worktree。
50
+ 4. 执行者用 `dwb_report_execution` 汇报。完成必须有摘要、依据,并处理完已经收到的新输入;一轮聊天结束不代表任务完成。
51
+ 5. 全部当前指派成员完成后,任务自动变为“已完成”。等待、失败、暂停等详细状态独立保存在执行记录里,兼容原有任务界面的三种状态。
52
+ 6. 失败、阻塞、长时间没有活动时,系统通过持久通知队列在群内提醒,不会仅在后台日志里留下错误。
53
+
54
+ 修改任务标题、描述、依赖或指派会建立新版本并使旧执行失效。手工重新打开已完成任务会建立新一代执行记录。管理员仍可以人工关闭整个任务;执行成员只能提交自己的结果。
55
+
56
+ ## 任务话题与消息归属
57
+
58
+ - 消息可带 `taskId`,或者通过 `replyToSeq` 继承被回复消息的任务归属。
59
+ - 普通用户消息只含一个明确的 `task_N` 标识时,也可自动识别归属。
60
+ - 执行成员发言自动关联当前任务;有明确 @ 的任务消息送到相关指派成员的独立执行 Session。
61
+ - @ 未指派的管理员或评审成员时,保留原有群会话协调通道。
62
+ - 普通群消息仍按 @ 路由;无人被 @ 时先送管理员,无管理员时送全体。
63
+ - 不再通过相似任务标题猜测身份,跨群任务不能误关联。
64
+ - 群内进展汇报不会反过来唤醒自己,任务通知也不会另行唤醒一套群会话造成重复执行。
65
+
66
+ 所有成员沟通仍保留在项目群中。系统没有引入私聊产品通道。
67
+
68
+ ## 持久化、停止与恢复
69
+
70
+ 执行实例、输入、投递状态和重要通知都保存在原台账的 `execution` 字段。状态先持久保存,再创建 Session 或投递消息。Session 使用基于执行实例 ID 的稳定标识。
71
+
72
+ - 临时创建/投递或执行异常使用有上限的指数退避,默认每个自动恢复预算最多 3 次。
73
+ - 重启时检查真实 Session 日志,区分已入箱、已读、已取消与未提交输入;接着原 Session 继续工作,完成任务不会自动重放。
74
+ - 如果进程在无法确认消息接收的时刻崩溃,采用稳定输入 ID 的至少一次投递语义。不能宣称任意文件操作、命令或外部服务恰好执行一次,恢复提示要求先检查已有成果。
75
+ - 停止成员或停用角色会持久暂停其相关执行;重新启用角色本身不会偷偷重新开工。管理员可以显式 retry。
76
+ - `dwb_manage_execution(action=stop)` 是终止操作,保留已结束记录;需要再次执行时重新派发任务,或先修改任务范围建立新版本。
77
+ - 删群先持久标记 deleting 并取消任务,再按精确 Session ID 清理;自定义项目目录与收养的工作区保留。
78
+ - 存在可恢复的任务 Session 时,不移动默认群目录;请先完成或停止任务。自定义目录只改群名。
79
+
80
+ 当前 Watchdog 检查执行活动和缺失汇报:安静超过 15 分钟会提醒;没有最终汇报的结束轮次最多追加一次继续提醒,再次缺失会阻塞。它不会自动杀掉可能仍在运行的长命令,也不包含额外模型判断工作方向的语义审查。
81
+
82
+ ## 决策等待
83
+
84
+ 未答复的决策阻止新建任务与自动派发。已有执行应汇报阻塞并结束本轮。
85
+
86
+ - 原有决策卡选项字母仍可点击回复。
87
+ - 自由文本答案使用 `决策回复:具体答案`,或者 `decisions.resolve` RPC 带当前 seq 明确回复。
88
+ - 普通补充消息不会自动解除决策等待。
89
+ - 决策答案、解除等待及恢复输入在同一个台账提交里保存,避免重启丢失答案。
90
+
91
+ ## 新工具
92
+
93
+ | 工具 | 用途 |
94
+ |---|---|
95
+ | `dwb_task_execution` | 分页查询执行状态、结果依据和输入;用 inputId/inputOffset 续读长输入 |
96
+ | `dwb_report_execution` | 当前执行会话汇报自己的 running/waiting/blocked/completed/failed |
97
+ | `dwb_manage_execution` | 管理员显式 retry 或 stop |
98
+
99
+ `dwb_create_task` 与 `dwb_update_task` 增加 `dependencies`。`dwb_list_tasks` 返回任务 ID 与执行汇总。`dwb_post_group_message` 增加 `taskId`、`replyToSeq`。
100
+
101
+ 新增 RPC:`execution.status`、`execution.retry`、`execution.stop`、`decisions.resolve`。原有建角色、建群、任务和消息 API 保持入口兼容。
102
+
103
+ 本版继续使用原有预构建工作台界面:创建任务和停止成员会调用新业务逻辑,任务运行时的成员指示器包含任务 Session,失败和结果会写入群流。更详细的状态、历史恢复与重试通过新工具或 RPC 操作,未增加新的任务详情界面。
104
+
105
+ ## 升级
106
+
107
+ 首次升级时,历史未完成任务建立暂停记录,防止自动重做旧工作。需要继续的历史任务由管理员显式 retry。0.36.0 新建任务自动排队。原有角色、群组、工作目录、附件、个人和团队记忆保留。
108
+
109
+ 通过 Harness 插件管理器安装发布的 tgz,再按安装结果要求重启 Harness。包替换后 JavaScript 模块通常需要重启,不以页面刷新代替 Host 重启。
110
+
111
+ ## 开发与验证
112
+
113
+ 当前可维护目录由已安装的 0.35.1 包建立,保留其预构建 Client;旧包没有携带原 UI 源码及旧测试。本版新增针对业务和执行机制的回归测试,不声称运行了未取得的旧测试集。
114
+
115
+ ```bash
116
+ npm test
117
+ npm run check
118
+ npm run test:native
119
+ ```
120
+
121
+ `check` 验证 Host/Client JavaScript 语法、资源导出与本地化信息。没有 UI 源码重编译步骤。
122
+
123
+ `test:native` 使用临时 DSH_HOME、本地模拟模型和独立测试进程,验证真实桌面 Harness 的加载、稳定 Session、收件箱、工具所有权、多人完成及进程被终止后的原会话恢复。它不使用用户 profile、不调用外部模型,也不会留下替代用户 GUI 的服务器。脚本的桌面运行时路径需要与本机安装一致。
124
+
125
+ Host 依赖来自安装此包的 Harness,不为测试下载另一版本的内核。隔离业务测试使用遵守消息不可变性与事件形状的桩。
126
+
127
+ ## 数据和边界
128
+
129
+ 台账默认位于 `$DSH_HOME/dsh-workbench/state.json`,仍使用单文件原子替换,新增版本化保存排空机制;不能读取或损坏的台账会阻止写入,不会静默覆盖成空数据。记忆仍在同目录下的个人/团队 Markdown 中。
130
+
131
+ 执行依据由执行者提供,本版校验摘要和依据字段以及未读输入,不等于对成果进行了额外独立质量验收。自动调度保留 Harness 现有工具审批与文件权限,不提高执行权限。
132
+
133
+ 原创 SVG 图标随包以 Apache-2.0 许可提供。