dsh-synapse 0.4.1 → 0.4.2
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 -21
- package/README.md +79 -81
- package/app.js +1344 -1344
- package/client.js +336 -241
- package/cordis.patch.yml +13 -13
- package/deepseek-mark.svg +3 -3
- package/docs/architecture.md +127 -104
- package/docs/development.md +138 -137
- package/docs/en/README.md +161 -161
- package/docs/images/native-webui.jpg +0 -0
- package/docs/images/synapse-map.jpg +0 -0
- package/docs/zh-CN/README.md +154 -154
- package/index.js +761 -754
- package/package.json +47 -45
- package/styles.css +317 -317
- package/docs/images/native-webui.png +0 -0
- package/docs/images/synapse-ui.png +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
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,81 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| [
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
[MIT](LICENSE)
|
|
1
|
+
<h1 align="center">dsh-synapse</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">DeepSeek Harness 的可视化对话工作台</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/dsh-synapse"><img src="https://img.shields.io/npm/v/dsh-synapse?style=flat-square&logo=npm&label=npm" alt="npm version"></a>
|
|
7
|
+
<a href="https://github.com/liangmianya/dsh-synapse/actions/workflows/main-tests.yml"><img src="https://github.com/liangmianya/dsh-synapse/actions/workflows/main-tests.yml/badge.svg?branch=main&style=flat-square" alt="Main branch tests"></a>
|
|
8
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-10b981?style=flat-square" alt="MIT license"></a>
|
|
9
|
+
<a href="package.json"><img src="https://img.shields.io/node/v/dsh-synapse?style=flat-square&logo=node.js&label=node" alt="Node.js version"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="docs/zh-CN/README.md">中文指南</a> ·
|
|
14
|
+
<a href="docs/en/README.md">English guide</a> ·
|
|
15
|
+
<a href="https://www.npmjs.com/package/dsh-synapse">npm</a> ·
|
|
16
|
+
<a href="docs/development.md">开发与发布</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
把同一工作区中的会话、追问和分支组织成一张可浏览、可拖拽、可缩放的地图,同时保留 DSH 原生会话作为唯一事实来源。
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
## 快速安装
|
|
24
|
+
|
|
25
|
+
需要 DeepSeek Harness `>= 0.1.7-rc.2`(本插件依赖该版本的 Host 会话与 Client 服务接口)、Node.js `>= 22.19.0`,以及 `web` profile。
|
|
26
|
+
|
|
27
|
+
> **兼容性提示:** 本版本包含破坏性变更,仅支持 DeepSeek Harness `>= 0.1.7-rc.2`,不再兼容更早版本。
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
corepack pnpm dsh plugin --profile web add dsh-synapse
|
|
31
|
+
corepack pnpm dsh web
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
启动后,在 DSH 顶部切换到 **会话地图**。Synapse 复用现有的 DSH Web Server,不会启动第二个应用或代理系统。
|
|
35
|
+
|
|
36
|
+
## 它解决什么问题
|
|
37
|
+
|
|
38
|
+
| 能力 | 说明 |
|
|
39
|
+
|---|---|
|
|
40
|
+
| 对话地图 | 把连续追问、分支和不同会话放到同一张可操作的画布上。 |
|
|
41
|
+
| 保留真实分支 | 按 DSH 原生 fork 关系连接卡片,不制造另一套会话历史。 |
|
|
42
|
+
| 追问更顺手 | 选中回答中的文字可直接带入新的追问;常用补充词可编辑。 |
|
|
43
|
+
| 双向同步 | 在地图或 DSH 原生对话中切换会话,当前上下文保持一致。 |
|
|
44
|
+
|
|
45
|
+
## 从原生对话进入
|
|
46
|
+
|
|
47
|
+
在 DSH 原生对话中,通过顶部的 **会话地图** 进入 Synapse;返回 **对话** 后,仍是同一个 DSH 会话。
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
## 文档
|
|
52
|
+
|
|
53
|
+
| 文档 | 内容 |
|
|
54
|
+
|---|---|
|
|
55
|
+
| [中文指南](docs/zh-CN/README.md) | 安装、启动、配置、使用、卸载和限制。 |
|
|
56
|
+
| [English guide](docs/en/README.md) | Installation, configuration, usage, cleanup, and limitations. |
|
|
57
|
+
| [开发与发布](docs/development.md) | 本地验证、GitHub Actions、版本标签和 npm 发布。 |
|
|
58
|
+
| [架构与边界](docs/architecture.md) | 会话归属、投影、数据存储和模型影响。 |
|
|
59
|
+
|
|
60
|
+
## 与 DSH 的边界
|
|
61
|
+
|
|
62
|
+
- DSH session log 保存真实会话内容;Synapse 只投影已提交的事件。
|
|
63
|
+
- Synapse 的画布布局数据保存在 `$DSH_HOME/synapse/`,删除它不会删除 DSH 会话。
|
|
64
|
+
- 插件不修改 prompt、模型请求、工具 schema、provider 路由或可复用 KV-cache 前缀。
|
|
65
|
+
- 内置 patch 仅支持 DSH 的 `web` profile。
|
|
66
|
+
|
|
67
|
+
## 开发
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
corepack pnpm install --frozen-lockfile
|
|
71
|
+
corepack pnpm run build
|
|
72
|
+
corepack pnpm test
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
完整的贡献、CI/CD 和发布流程见[开发与发布指南](docs/development.md)。
|
|
76
|
+
|
|
77
|
+
## 许可证
|
|
78
|
+
|
|
79
|
+
[MIT](LICENSE)
|