dsh-synapse 0.4.0 → 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/README.md +50 -52
- package/app.js +617 -63
- package/client.js +147 -28
- package/docs/architecture.md +23 -0
- package/docs/development.md +1 -0
- package/docs/en/README.md +1 -1
- package/docs/images/native-webui.jpg +0 -0
- package/docs/images/synapse-map.jpg +0 -0
- package/docs/zh-CN/README.md +1 -1
- package/index.js +63 -29
- package/package.json +5 -2
- package/styles.css +119 -9
- package/docs/images/native-webui.png +0 -0
- package/docs/images/synapse-ui.png +0 -0
package/README.md
CHANGED
|
@@ -1,62 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">dsh-synapse</h1>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-

|
|
5
|
-

|
|
6
|
-

|
|
3
|
+
<p align="center">DeepSeek Harness 的可视化对话工作台</p>
|
|
7
4
|
|
|
8
|
-
|
|
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>
|
|
9
11
|
|
|
10
|
-
|
|
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>
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
把同一工作区中的会话、追问和分支组织成一张可浏览、可拖拽、可缩放的地图,同时保留 DSH 原生会话作为唯一事实来源。
|
|
13
20
|
|
|
14
|
-

|
|
15
22
|
|
|
16
|
-
##
|
|
23
|
+
## 快速安装
|
|
17
24
|
|
|
18
|
-
|
|
25
|
+
需要 DeepSeek Harness `>= 0.1.7-rc.2`(本插件依赖该版本的 Host 会话与 Client 服务接口)、Node.js `>= 22.19.0`,以及 `web` profile。
|
|
19
26
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## Features
|
|
23
|
-
|
|
24
|
-
| | Feature | 功能 |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| 🗺️ | Browse sessions and turns as a connected canvas | 将会话和追问显示为连线画布 |
|
|
27
|
-
| 🌿 | Preserve native DSH fork lineage | 按真实分叉点显示 DSH 分支 |
|
|
28
|
-
| 📁 | Group sessions by DSH workspace and directory | 按工作区和目录组织会话 |
|
|
29
|
-
| 📥 | Project committed and streaming replies into cards | 将已提交和流式回复投影到卡片 |
|
|
30
|
-
| 🔧 | Fold tool calls and results into assistant replies | 将工具调用和结果折叠到助手回答 |
|
|
31
|
-
| ⚡ | Synchronize the active session with native chat | 与 DSH 原生对话双向同步当前会话 |
|
|
32
|
-
| 🎨 | Pan, zoom, drag, fold descendant subtrees, focus, and persist card positions | 支持平移、缩放、拖动、展开/折叠后续子树、定位和位置保存 |
|
|
33
|
-
|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
## Quick start
|
|
37
|
-
|
|
38
|
-
Requirements: DeepSeek Harness with the profile plugin mechanism, Node.js `>= 22.19.0`, and the `web` profile.
|
|
27
|
+
> **兼容性提示:** 本版本包含破坏性变更,仅支持 DeepSeek Harness `>= 0.1.7-rc.2`,不再兼容更早版本。
|
|
39
28
|
|
|
40
29
|
```powershell
|
|
41
30
|
corepack pnpm dsh plugin --profile web add dsh-synapse
|
|
42
31
|
corepack pnpm dsh web
|
|
43
32
|
```
|
|
44
33
|
|
|
45
|
-
|
|
34
|
+
启动后,在 DSH 顶部切换到 **会话地图**。Synapse 复用现有的 DSH Web Server,不会启动第二个应用或代理系统。
|
|
35
|
+
|
|
36
|
+
## 它解决什么问题
|
|
37
|
+
|
|
38
|
+
| 能力 | 说明 |
|
|
39
|
+
|---|---|
|
|
40
|
+
| 对话地图 | 把连续追问、分支和不同会话放到同一张可操作的画布上。 |
|
|
41
|
+
| 保留真实分支 | 按 DSH 原生 fork 关系连接卡片,不制造另一套会话历史。 |
|
|
42
|
+
| 追问更顺手 | 选中回答中的文字可直接带入新的追问;常用补充词可编辑。 |
|
|
43
|
+
| 双向同步 | 在地图或 DSH 原生对话中切换会话,当前上下文保持一致。 |
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
> Synapse extends the existing DSH Web profile. It does not start a second application server. The npm package needs no build permission; Git and local-checkout installs are documented in the installation guide.
|
|
45
|
+
## 从原生对话进入
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
在 DSH 原生对话中,通过顶部的 **会话地图** 进入 Synapse;返回 **对话** 后,仍是同一个 DSH 会话。
|
|
51
48
|
|
|
52
|
-
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
## 文档
|
|
52
|
+
|
|
53
|
+
| 文档 | 内容 |
|
|
53
54
|
|---|---|
|
|
54
|
-
| [中文指南](docs/zh-CN/README.md) |
|
|
55
|
-
| [English guide](docs/en/README.md) | Installation, configuration, usage, cleanup, and limitations |
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
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。
|
|
58
66
|
|
|
59
|
-
##
|
|
67
|
+
## 开发
|
|
60
68
|
|
|
61
69
|
```powershell
|
|
62
70
|
corepack pnpm install --frozen-lockfile
|
|
@@ -64,18 +72,8 @@ corepack pnpm run build
|
|
|
64
72
|
corepack pnpm test
|
|
65
73
|
```
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## Runtime boundaries
|
|
70
|
-
|
|
71
|
-
- DSH session logs remain the source of truth for conversation content.
|
|
72
|
-
- Synapse stores canvas metadata separately under `$DSH_HOME/synapse/`.
|
|
73
|
-
- Projected card text is capped at 8000 characters; the full message remains available in conversation details.
|
|
74
|
-
- The plugin does not modify prompts, model requests, tool schemas, provider routing, or reusable KV-cache prefixes.
|
|
75
|
-
- Only the DSH `web` profile is supported by the bundled patch.
|
|
76
|
-
|
|
77
|
-
See [Architecture and runtime boundaries](docs/architecture.md) for the complete model.
|
|
75
|
+
完整的贡献、CI/CD 和发布流程见[开发与发布指南](docs/development.md)。
|
|
78
76
|
|
|
79
|
-
##
|
|
77
|
+
## 许可证
|
|
80
78
|
|
|
81
79
|
[MIT](LICENSE)
|