dsh-session-group 0.0.0-stage → 0.2.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 +201 -0
- package/README.md +378 -2
- package/cordis.patch.yml +6 -0
- package/dist/client.js +22298 -0
- package/dist/index.js +15625 -0
- package/dist/index.js.map +7 -0
- package/icon.svg +1 -0
- package/locale/en.json +1 -0
- package/locale/zh.json +1 -0
- package/package.json +71 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,379 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./icon.svg" alt="DSH 会话群组" width="88" height="88" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">DSH 会话群组</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>把分散的 AI 会话,放进一个协作群。</strong><br />
|
|
9
|
+
@ 指定会话执行任务,让成员交流方案,在同一处查看结果与总结。
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="./package.json"><img alt="Version 0.2.0" src="https://img.shields.io/badge/version-0.2.0-007AFF?style=flat-square" /></a>
|
|
14
|
+
<a href="#installation"><img alt="Node.js 24+" src="https://img.shields.io/badge/Node.js-24%2B-339933?style=flat-square" /></a>
|
|
15
|
+
<a href="#installation"><img alt="DSH Web plugin" src="https://img.shields.io/badge/DSH-Web_plugin-365FD4?style=flat-square" /></a>
|
|
16
|
+
<a href="https://github.com/VibeDev-Si/deepseek-harness-group-messages/blob/main/LICENSE"><img alt="License Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-586069?style=flat-square" /></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="#demo">界面演示</a> ·
|
|
21
|
+
<a href="#features">功能一览</a> ·
|
|
22
|
+
<a href="#installation">安装</a> ·
|
|
23
|
+
<a href="#quick-start">开始群聊</a> ·
|
|
24
|
+
<a href="#collaboration">会话协作</a> ·
|
|
25
|
+
<a href="#conversation-controls">消息回退</a> ·
|
|
26
|
+
<a href="#faq">常见问题</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
**DSH 会话群组**是一个 DeepSeek Harness 插件。你可以把同一个 Host 中的原生会话加入群组,像使用社交群聊一样分配工作、共享结果和跟进进度。
|
|
32
|
+
|
|
33
|
+
群聊从左侧栏进入,在 Harness 的**原生右侧标签页**中打开。主会话仍然保留,每个成员也继续使用自己的原生会话上下文。
|
|
34
|
+
|
|
35
|
+
<a name="demo"></a>
|
|
36
|
+
|
|
37
|
+
## 界面演示
|
|
38
|
+
|
|
39
|
+
[](./assets/readme/group-chat-wide.jpg)
|
|
40
|
+
|
|
41
|
+
<p align="center"><sub>会话 A 发出消息,B 回传“验收完成”,A 确认收到;右侧同时显示成员与任务状态。</sub></p>
|
|
42
|
+
|
|
43
|
+
适合这些协作场景:
|
|
44
|
+
|
|
45
|
+
- **方案与评审**:A 提出方案,B 评审,A 根据反馈修订。
|
|
46
|
+
- **前端与后端**:分别派发实现任务,再共享接口约定与验证结果。
|
|
47
|
+
- **多模型对照**:为成员选择不同模型,将各自结论放在同一轮中比较。
|
|
48
|
+
- **阶段收尾**:结束本轮任务,生成带来源记录的总结,再开启下一轮。
|
|
49
|
+
|
|
50
|
+
<a name="features"></a>
|
|
51
|
+
|
|
52
|
+
## 功能一览
|
|
53
|
+
|
|
54
|
+
| 能力 | 使用方式 |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| **工作区组群** | 按实际工作区选择已有会话,支持跨工作区选择、群内别名和新建原生会话。 |
|
|
57
|
+
| **@ 原文派发** | 选择一个或多个接收者,发送输入框正文,保留空格与换行。 |
|
|
58
|
+
| **成员互聊** | 显式开启后,成员可通过群工具向其他会话投递消息、读取本轮共享信息。 |
|
|
59
|
+
| **成员独立配置** | 分别选择模型、推理等级与权限预设,保留每次执行时的配置。 |
|
|
60
|
+
| **文件与图片** | 添加、粘贴或拖入附件,在群内预览图片、下载文件。 |
|
|
61
|
+
| **原生指令** | 从目标会话的指令列表选择 `/` 指令,交给 Harness 指令服务执行。 |
|
|
62
|
+
| **任务与消息控制** | 暂停、继续、取消、重试任务;撤回消息,或通过会话分支回退对话。 |
|
|
63
|
+
| **总结与历史** | 结束本轮后统一总结,保留轮次和执行来源,支持 Markdown 导出。 |
|
|
64
|
+
|
|
65
|
+
<a name="installation"></a>
|
|
66
|
+
|
|
67
|
+
## 安装
|
|
68
|
+
|
|
69
|
+
### 环境要求
|
|
70
|
+
|
|
71
|
+
| 项目 | 当前验证范围 |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| Node.js | **24 或更高版本** |
|
|
74
|
+
| DeepSeek Harness | 最低 `0.1.7-rc.2`;适配 `0.2.0`、`0.2.1`、`0.2.2` 发布线,已验证标签见下表 |
|
|
75
|
+
| Cordis | `4.0.4`、`4.0.5`(含 alpha)、`4.0.6-alpha.1` |
|
|
76
|
+
| 使用入口 | Harness **Web profile** |
|
|
77
|
+
| 模型 | 使用 Host 中已经配置的模型与提供方 |
|
|
78
|
+
|
|
79
|
+
### 版本兼容
|
|
80
|
+
|
|
81
|
+
插件按实际接口选择兼容路径。旧版缺少新版 RPC 辅助模块时,使用插件自带的严格 RPC 描述;旧版图片通过原生图片输入发送,新版继续使用图片上传凭证。
|
|
82
|
+
|
|
83
|
+
| DSH 标签 | 验证范围 | 群组独立模型设置 |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| `0.1.7-rc.2` | 历史 Cordis、Host / Client Gateway 和插件构建产物的集成验证 | 沿用原会话模型 |
|
|
86
|
+
| `0.2.0-rc.2` | 同上 | 沿用原会话模型 |
|
|
87
|
+
| `0.2.1-alpha.1`、`0.2.1-alpha.3`、`0.2.1-rc.4` | 同上,覆盖统一调用者身份引入前后的接口边界 | 沿用原会话模型 |
|
|
88
|
+
| `0.2.2-alpha.2` | 同上,并有当前版本的本地联调记录 | 支持群内独立设置 |
|
|
89
|
+
|
|
90
|
+
旧版模型切换接口会同时改写全局默认模型,因此群组中只提供“沿用会话当前配置”,并提示到原会话设置模型和推理等级。已经保存的独立模型覆盖若无法在旧版执行,会在派发前明确报错;可在成员设置中改回沿用会话配置。权限设置、普通消息和成员互聊继续按宿主提供的能力工作。
|
|
91
|
+
|
|
92
|
+
附件存储、上传和指令服务为可选宿主能力,缺少时不阻止基础群组服务启动;调用相应功能会提示服务不可用。原生指令只接收文件附件,图片保留为模型图片输入。
|
|
93
|
+
|
|
94
|
+
历史版本验证覆盖插件加载、原生侧栏注册、严格 RPC、持久化、取消和调用者身份;会话、上传和 UI 数据源使用测试替身,不等于每个旧版都完成了完整浏览器和真实模型端到端验收。更早版本不在兼容范围内。
|
|
95
|
+
|
|
96
|
+
### 从 npm 安装
|
|
97
|
+
|
|
98
|
+
包名为 `dsh-session-group`,版本号由 npm 单独管理,例如 `dsh-session-group@0.2.0`;下载的安装包文件名为 `dsh-session-group-0.2.0.tgz`。npm 包已包含构建产物,无需自行构建。
|
|
99
|
+
|
|
100
|
+
在 Harness 源码目录执行:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pnpm dsh plugin --profile web add dsh-session-group@0.2.0
|
|
104
|
+
pnpm dsh web
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
已全局安装 `dsh` 时,可省略命令开头的 `pnpm`。也可以把 `.tgz` 文件的绝对路径传给同一条 `plugin add` 命令。
|
|
108
|
+
|
|
109
|
+
### 从源码安装
|
|
110
|
+
|
|
111
|
+
**从源码安装前需要先构建。** 当前的 `bootstrap:local` 会从一份已安装开发依赖的 Harness 源码中链接依赖,因此请先准备好可运行的 Harness 源码目录。
|
|
112
|
+
|
|
113
|
+
以下路径中的 `/absolute/path/to/...` 是占位符,请替换为你本机的实际路径。
|
|
114
|
+
|
|
115
|
+
### 1. 获取源码并构建
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git clone https://github.com/VibeDev-Si/deepseek-harness-group-messages.git
|
|
119
|
+
cd deepseek-harness-group-messages
|
|
120
|
+
|
|
121
|
+
# 指向已经安装开发依赖的 Harness 源码目录
|
|
122
|
+
npm run bootstrap:local -- /absolute/path/to/deepseek-harness
|
|
123
|
+
|
|
124
|
+
npm run typecheck
|
|
125
|
+
npm run build
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
如果本仓库与 `deepseek-harness` 目录并列,链接依赖时也可以直接运行 `npm run bootstrap:local`。该脚本仅在本项目的 `node_modules/` 建立链接;构建产物写入 `dist/`。
|
|
129
|
+
|
|
130
|
+
### 2. 安装到 Web profile
|
|
131
|
+
|
|
132
|
+
在 **Harness 源码目录**中执行:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
cd /absolute/path/to/deepseek-harness
|
|
136
|
+
|
|
137
|
+
pnpm dsh plugin --profile web add /absolute/path/to/deepseek-harness-group-messages
|
|
138
|
+
pnpm dsh web
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
通过 `dsh web` 打印的完整鉴权地址打开页面。打开一个原生会话后,在左侧栏点击 **会话群组**。
|
|
142
|
+
|
|
143
|
+
> Harness 接口仍处于预稳定阶段。兼容处理依据实际服务能力;上表列出已验证标签,同一发布线的其他标签仍需按实际部署确认。升级插件后,请重新构建、重启 Host,并刷新页面。
|
|
144
|
+
|
|
145
|
+
<a name="quick-start"></a>
|
|
146
|
+
|
|
147
|
+
## 开始群聊
|
|
148
|
+
|
|
149
|
+
### 创建第一个群
|
|
150
|
+
|
|
151
|
+
1. 打开左侧栏的 **会话群组**,点击 **新建群组**。
|
|
152
|
+
2. 填写群名,按工作区选择会话。切换工作区会保留已选项,也可以直接创建原生会话。
|
|
153
|
+
3. 为成员设置唯一别名,例如 `A`、`B`,或 `前端`、`后端`。
|
|
154
|
+
4. 在输入框中键入 `@` 或点击 `@`,**从列表选择接收者**,再输入正文。
|
|
155
|
+
5. 按 **Enter** 发送;按 **Shift + Enter** 换行。中文输入法确认候选词不会触发发送。
|
|
156
|
+
|
|
157
|
+
一组最多添加 **16 位会话**。没有选择接收者的消息只保存在群内,不调用模型。
|
|
158
|
+
|
|
159
|
+
### 原文派发
|
|
160
|
+
|
|
161
|
+
假设已选择接收者 `A`,输入框正文为:
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
请检查登录页面的表单校验,并给出修改建议。
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
A 收到的就是这段正文。插件不会在正文中附加群名、角色、群目标或额外完成要求;目标成员单独保存在消息的接收者信息中。
|
|
168
|
+
|
|
169
|
+
选择多个接收者时,每个会话收到同一份正文。需要不同分工时,分别发送消息。原生会话自身已有的上下文、系统配置与权限仍然生效。
|
|
170
|
+
|
|
171
|
+
### 配置模型、推理等级和权限
|
|
172
|
+
|
|
173
|
+
点击已选接收者标签上的 **设置图标**,或进入 **群详情** 设置成员。
|
|
174
|
+
|
|
175
|
+
| 设置 | 行为 |
|
|
176
|
+
| --- | --- |
|
|
177
|
+
| 模型 | 选择 Host 已配置、当前可用的模型;也可以沿用会话当前配置。 |
|
|
178
|
+
| 推理等级 | 根据所选模型提供可用等级;不支持推理等级的模型不会出现可选值。 |
|
|
179
|
+
| 权限预设 | 使用 Host 提供的可用预设;启用更广泛的权限时需要确认。 |
|
|
180
|
+
|
|
181
|
+
设置用于后续新任务,以及你明确重试、继续的任务。每次尝试保存当时的配置,正在执行的任务不会被打断,全局默认模型也不会因此改变。
|
|
182
|
+
|
|
183
|
+
[](./assets/readme/member-settings-wide.jpg)
|
|
184
|
+
|
|
185
|
+
<p align="center"><sub>成员设置在右侧页面中打开,原生主会话继续保留;图中展示模型、Low 推理等级与只读权限。</sub></p>
|
|
186
|
+
|
|
187
|
+
### 添加附件与调用指令
|
|
188
|
+
|
|
189
|
+
从输入框的 **`+`** 菜单添加文件、图片,或选择目标会话支持的原生指令。也可以粘贴、拖入附件。
|
|
190
|
+
|
|
191
|
+
- 每条消息最多 **8 个附件**,单个最多 **10 MB**,合计最多 **25 MB**。
|
|
192
|
+
- 图片支持 **PNG、JPEG、WebP、GIF**,群内可预览;模型能否理解图片取决于其原生能力。
|
|
193
|
+
- 调用指令前先选择接收者。指令直接由 Harness 执行,例如查询权限的 `/permission`。
|
|
194
|
+
- 需要按字面发送 `/` 开头的正文时,选择 **作为普通消息**。
|
|
195
|
+
|
|
196
|
+
[](./assets/readme/attachments-wide.jpg)
|
|
197
|
+
|
|
198
|
+
<p align="center"><sub>群内图片与文本附件实拍;演示素材为合成图片和文本文件。</sub></p>
|
|
199
|
+
|
|
200
|
+
<a name="collaboration"></a>
|
|
201
|
+
|
|
202
|
+
## 让会话互相交流
|
|
203
|
+
|
|
204
|
+
成员互聊**默认关闭**。在 **群详情 → 成员互聊 → 设置** 中开启,设置本轮最多自动投递的数量,再向成员派发任务。
|
|
205
|
+
|
|
206
|
+
### 一个 A → B → A 的例子
|
|
207
|
+
|
|
208
|
+
先为两位成员设置别名 `A`、`B`,开启互聊,然后通过 `@` 选择 `A`,发送以下正文:
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
请提出一个实现方案,用 group_send 发给 B 评审。
|
|
212
|
+
发给 B 的消息中,请说明:评审完成后,用 group_send 把意见发回 A。
|
|
213
|
+
|
|
214
|
+
发出消息后结束当前任务,不要等待对方。
|
|
215
|
+
收到评审意见后,给出修订版方案。
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
```mermaid
|
|
219
|
+
sequenceDiagram
|
|
220
|
+
actor User as 你
|
|
221
|
+
participant Group as 会话群组
|
|
222
|
+
participant A as 会话 A
|
|
223
|
+
participant B as 会话 B
|
|
224
|
+
User->>Group: 选择 A,发送任务正文
|
|
225
|
+
Group->>A: 原文派发
|
|
226
|
+
A->>Group: group_send 向 B 发送方案
|
|
227
|
+
Group-->>A: 返回排队回执
|
|
228
|
+
Note over A,B: A 结束当前任务,不等待 B
|
|
229
|
+
Group->>B: 投递 A 的消息原文
|
|
230
|
+
B->>Group: group_send 向 A 发送评审意见
|
|
231
|
+
Group-->>B: 返回排队回执
|
|
232
|
+
Group->>A: 作为新任务投递评审意见
|
|
233
|
+
A-->>Group: 返回修订结果
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
A、B 的往来会显示在群内,标明发送方、接收方和任务状态。实际是否调用工具、是否按要求完成协作,由所选模型决定。
|
|
237
|
+
|
|
238
|
+
### 群工具
|
|
239
|
+
|
|
240
|
+
| 工具 | 用途 |
|
|
241
|
+
| --- | --- |
|
|
242
|
+
| `group_send` | 向群内其他成员原文投递消息,返回排队回执;可附带本轮已有的附件 ID。 |
|
|
243
|
+
| `group_read` | 读取本轮最近的群消息、成员和执行结果;较长内容带截断标记。 |
|
|
244
|
+
|
|
245
|
+
例如,A 可以调用:
|
|
246
|
+
|
|
247
|
+
```javascript
|
|
248
|
+
group_send({
|
|
249
|
+
to: ["B"],
|
|
250
|
+
message: "请评审这个方案,并把意见发回 A。"
|
|
251
|
+
})
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
这些工具由插件临时提供给已启用互聊的群任务,用户不需要在终端运行上述示例。成员和路由说明放在工具定义中,不拼接到用户消息正文。
|
|
255
|
+
|
|
256
|
+
**投递控制:**
|
|
257
|
+
|
|
258
|
+
- 至少需要两位成员。每轮默认最多自动投递 **8 次**,可设置为 **1–30 次**;每位接收者计一次。
|
|
259
|
+
- 互聊投递是异步的,排队回执不代表对方已完成任务。尤其在同工作目录串行调度时,发送方应结束当前任务,让接收方继续。
|
|
260
|
+
- 暂停或结束本轮会停止接收新的自动投递。单独关闭互聊只禁止新增投递;已经排队的任务可以在任务列表中暂停或取消。
|
|
261
|
+
- 普通回复中的 `@B` 不会自动派发任务,成员需要显式调用 `group_send`。
|
|
262
|
+
|
|
263
|
+
如果只想手动共享结果,可以在已完成回复下选择 **转发给会话**;选择 **引用结果** 则会先把内容放回可编辑的输入框,确认后再发。
|
|
264
|
+
|
|
265
|
+
<a name="conversation-controls"></a>
|
|
266
|
+
|
|
267
|
+
## 暂停、撤回与回退
|
|
268
|
+
|
|
269
|
+
| 操作 | 作用 | 保留什么 |
|
|
270
|
+
| --- | --- | --- |
|
|
271
|
+
| **暂停 / 继续** | 请求中断所属任务;确认结束后标记暂停。继续时原文发起新一次尝试。 | 既有输出、历史尝试和来源记录。 |
|
|
272
|
+
| **取消** | 取消排队任务,或请求停止所属执行。 | 已发生的操作和执行记录。 |
|
|
273
|
+
| **撤回** | 标记原消息已撤回,并取消关联的未完成任务。 | 已完成事实与原生会话历史。 |
|
|
274
|
+
| **回退** | 从准确日志位置创建会话分支和新一轮群聊,把原请求恢复为可编辑草稿。 | 原会话、旧轮次和全部历史记录。 |
|
|
275
|
+
|
|
276
|
+
**回退恢复的是对话上下文。已经发生的文件修改、命令、权限配置和远程操作,不会因此撤销。**
|
|
277
|
+
|
|
278
|
+
回退前需要先处理相关的未完成任务。对互聊消息执行回退时,会追溯到触发它的原始用户请求。多会话分支创建不是跨会话事务;中途失败时不会提交群组回退状态,但可能保留未使用的辅助分支。
|
|
279
|
+
|
|
280
|
+
任务显示 **待确认** 时,请先打开原会话核对。插件不会自动重复派发这类任务;明确确认后重试,仍可能产生重复操作。
|
|
281
|
+
|
|
282
|
+
## 结束一轮并总结
|
|
283
|
+
|
|
284
|
+
在聊天头部的 **更多操作 → 结束并总结** 中,选择:
|
|
285
|
+
|
|
286
|
+
- **等待完成后总结**:继续等待未完成任务,包括恢复暂停任务,全部结束后总结。
|
|
287
|
+
- **停止未完成任务并总结**:先请求停止未完成任务,再生成总结。
|
|
288
|
+
|
|
289
|
+
总结使用 Host 的默认模型,结合结构化执行记录归纳交付、分歧、失败与下一步,并保留 `task`、`session`、`turn`、`seq` 来源。总结生成不调用工具,也不会重新执行成员任务。
|
|
290
|
+
|
|
291
|
+
总结失败时可以 **只重试总结**。结束后开启下一轮,或导出 Markdown,历史轮次与报告继续保留。
|
|
292
|
+
|
|
293
|
+
<a name="faq"></a>
|
|
294
|
+
|
|
295
|
+
## 常见问题
|
|
296
|
+
|
|
297
|
+
<details>
|
|
298
|
+
<summary><strong>安装后没有看到“会话群组”入口?</strong></summary>
|
|
299
|
+
|
|
300
|
+
确认已完成构建,并安装到启动时使用的 `web` profile。先打开一个原生会话,再从左侧栏进入。群组页面在右侧标签页中显示。
|
|
301
|
+
|
|
302
|
+
更新插件后,Client 和 Host 的重载时机可能不同。全部群任务结束后,可以在 **插件 → 会话群组 → 包含的组件** 中关闭再开启该组件。若当前 Host 不支持热重载,再处理完正在运行的工作后重新启动 `dsh web`。
|
|
303
|
+
|
|
304
|
+
</details>
|
|
305
|
+
|
|
306
|
+
<details>
|
|
307
|
+
<summary><strong>为什么发送消息后没有会话执行?</strong></summary>
|
|
308
|
+
|
|
309
|
+
请确认已经从 `@` 列表选择接收者。无接收者的消息只保存在群内。目标会话被其他工作占用,或同目录已有群任务运行时,任务会等待空闲;本轮处于暂停状态时,请先继续本轮。
|
|
310
|
+
|
|
311
|
+
</details>
|
|
312
|
+
|
|
313
|
+
<details>
|
|
314
|
+
<summary><strong>同一工作区的 A 和 B 为什么没有同时执行?</strong></summary>
|
|
315
|
+
|
|
316
|
+
调度器会将相同会话、规范化后相同工作目录的群任务串行处理,默认最多同时执行 3 项群任务。这个策略不提供文件锁,也不会隔离其他进程对工作区的写入。
|
|
317
|
+
|
|
318
|
+
</details>
|
|
319
|
+
|
|
320
|
+
<details>
|
|
321
|
+
<summary><strong>图片上传成功,但模型没有识别?</strong></summary>
|
|
322
|
+
|
|
323
|
+
上传和群内预览不等于模型支持图片输入。请切换到具备图片输入能力的模型;如果原任务失败,可以在修改成员配置后明确重试。
|
|
324
|
+
|
|
325
|
+
</details>
|
|
326
|
+
|
|
327
|
+
<details>
|
|
328
|
+
<summary><strong>关闭页面会停止任务吗?</strong></summary>
|
|
329
|
+
|
|
330
|
+
不会。群组状态保存在 Host,调度也由 Host 执行。需要停止时,请在群内暂停、取消或结束任务。Host 或插件重新加载后,无法确认所属执行状态的任务会显示“待确认”,需要核对原会话后再处理。
|
|
331
|
+
|
|
332
|
+
</details>
|
|
333
|
+
|
|
334
|
+
<details>
|
|
335
|
+
<summary><strong>这是多人聊天或跨机器协作吗?</strong></summary>
|
|
336
|
+
|
|
337
|
+
当前范围是同一 Host、当前所有者的会话协调。Remote API 仅允许 Host 所有者访问;不提供多个人类用户聊天、跨 Host 调度或工作区改动自动合并。
|
|
338
|
+
|
|
339
|
+
</details>
|
|
340
|
+
|
|
341
|
+
## 源码与开发
|
|
342
|
+
|
|
343
|
+
```text
|
|
344
|
+
.
|
|
345
|
+
├── src/
|
|
346
|
+
│ ├── client/ # 群聊侧栏、成员设置、输入框与附件
|
|
347
|
+
│ ├── core/ # 数据模型、队列、任务控制与总结记录
|
|
348
|
+
│ ├── host/ # Harness 会话、权限、模型与工具适配
|
|
349
|
+
│ └── rpc.ts # Host / Client 严格 Remote 协议
|
|
350
|
+
├── scripts/
|
|
351
|
+
│ ├── bootstrap-local.mjs # 从本机 Harness 源码链接开发依赖
|
|
352
|
+
│ └── build.mjs # 构建 Host / Client 入口
|
|
353
|
+
├── locale/ # 插件注册文案
|
|
354
|
+
├── cordis.patch.yml # Cordis 插件注册配置
|
|
355
|
+
├── icon.svg
|
|
356
|
+
└── package.json
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
完成依赖链接后,使用 `npm run check` 运行类型检查、回归测试和构建。仓库仅保存源码及必要配置,`dist/` 与 `node_modules/` 由本地生成。
|
|
360
|
+
|
|
361
|
+
在保留发布标签的 Harness Git 源码旁,可以重复运行历史版本集成验证:
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
npm run check:compat -- --harness /absolute/path/to/deepseek-harness
|
|
365
|
+
# 也可在末尾指定单个标签,例如 dsh-v0.2.0-rc.2
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
该检查使用各标签的真实 Cordis、Typert 协议和双端 Gateway,加载当前 `dist/` 构建产物。它只读取 Harness 源码,在本项目 `.acceptance/compat/` 写入临时 bundle 和结果,不修改 Harness,不连接网络,也不调用模型;请先执行构建。
|
|
369
|
+
|
|
370
|
+
群组数据使用 Harness storage 的独立 KV unit `session_groups`,格式版本为 `1`。该版本的新增字段保持可选,可读取已有群组记录;文件与图片的二进制由 Harness 原生附件存储管理。
|
|
371
|
+
|
|
372
|
+
反馈问题时,可以在 [Issues](https://github.com/VibeDev-Si/deepseek-harness-group-messages/issues) 中附上 Harness 版本、插件版本、操作步骤和报错信息。
|
|
373
|
+
|
|
374
|
+
## 许可证与相关项目
|
|
375
|
+
|
|
376
|
+
本 GitHub 仓库采用 [Apache License 2.0](https://github.com/VibeDev-Si/deepseek-harness-group-messages/blob/main/LICENSE)。
|
|
377
|
+
|
|
378
|
+
- [DSH 插件主题](https://github.com/topics/dsh-plugin)
|
|
379
|
+
- [Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
|