dsh-plugin-bridge 0.3.0 → 0.3.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 +9 -3
- package/README.zh.md +9 -3
- package/docs/guide.zh.md +4 -4
- package/docs/native-webui-feasibility.md +5 -3
- package/lib/client.d.ts +4 -3
- package/lib/client.js +50 -2
- package/lib/client.js.map +1 -1
- package/lib/command.js +2 -2
- package/lib/dsh-alpha-host.d.ts +67 -0
- package/lib/dsh-alpha-host.js +276 -0
- package/lib/index.d.ts +2 -3
- package/lib/index.js +6 -8
- package/lib/migrate.d.ts +2 -0
- package/lib/migrate.js +11 -1
- package/package.json +20 -15
- package/reports/dsh-0.1.2-alpha.2-compat-2026-08-31.md +64 -0
package/README.md
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
[](https://github.com/Totoro-qaq/dsh-plugin-bridge/actions/workflows/ci.yml)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](package.json)
|
|
12
|
-
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
13
13
|
[](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
|
|
14
|
+
[](https://dshfind.com/en/plugins/Totoro-qaq/dsh-plugin-bridge?ref=badge)
|
|
14
15
|
|
|
15
16
|
English | [中文](README.zh.md)
|
|
16
17
|
|
|
@@ -34,7 +35,7 @@ dsh plugin --profile web add dsh-plugin-bridge
|
|
|
34
35
|
Pinned GitHub fallback:
|
|
35
36
|
|
|
36
37
|
```bash
|
|
37
|
-
dsh plugin --profile web add github:Totoro-qaq/dsh-plugin-bridge#v0.3.
|
|
38
|
+
dsh plugin --profile web add github:Totoro-qaq/dsh-plugin-bridge#v0.3.1
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
Then type in the official WebUI:
|
|
@@ -55,6 +56,8 @@ UIs that implement the official `conversation.chat.commandview` slot receive the
|
|
|
55
56
|
/bridge code --go --file <path>
|
|
56
57
|
```
|
|
57
58
|
|
|
59
|
+
Preview edits are temporary until migration is confirmed. Restarting the client or system may discard them; the source session remains untouched, and you can regenerate the preview.
|
|
60
|
+
|
|
58
61
|
Uninstall with `dsh plugin --profile web remove dsh-plugin-bridge`, then restart `dsh web`.
|
|
59
62
|
|
|
60
63
|
## Why Bridge
|
|
@@ -81,6 +84,7 @@ The release gate is intentionally small and reproducible; these are regression r
|
|
|
81
84
|
| Confirm extra, paired nominal median | **+8.1%** vs `--continue` |
|
|
82
85
|
| Summary worker share of clean acceptance components | **20.74% nominal** |
|
|
83
86
|
| Native WebUI repeat gate (preview / target facts) | **3/3 · 3/3**, five facts each |
|
|
87
|
+
| DSH 0.1.2-alpha.2 npm install / doctor / target | **clean · 13/13 · PTC paused** |
|
|
84
88
|
|
|
85
89
|
The token percentage varies widely with preset, response length, and cache state. The worker share is composition, not causal overhead versus no Bridge; the stable product claim is one additional confirmation request. Read the [design and evidence boundaries](docs/design.md), [full release report](reports/v0.2.3-e2e-report.md), and [vision report](reports/v0.2.6-rc11-vision-report.md).
|
|
86
90
|
|
|
@@ -113,6 +117,7 @@ The five sections are Goal, Current state, Key decisions and conventions, Key fi
|
|
|
113
117
|
| 0.1.0-rc.6 | Yes | No | Narrow RPC contract and text compatibility tests |
|
|
114
118
|
| 0.1.0-rc.7 / rc.8 | Yes | Contract-checked | Client-module/command-slot contract plus server fallback |
|
|
115
119
|
| 0.1.1-rc.2 | Yes | Yes | Installed official WebUI: doctor 13/13, edit/confirm/auto-open, three-run repeat gate |
|
|
120
|
+
| 0.1.2-alpha.2 | Yes | Yes | Official npm install: typed controllers 13/13, split-client build, edit/confirm/PTC auto-open, clean removal |
|
|
116
121
|
|
|
117
122
|
CI covers Node.js 22 and 24. Run `/bridge --doctor` after every Harness upgrade; it names missing required gateway methods instead of failing vaguely.
|
|
118
123
|
|
|
@@ -133,6 +138,7 @@ The server command stays the compatibility core. The same package now adds an op
|
|
|
133
138
|
- [Release acceptance report](reports/v0.2.3-e2e-report.md)
|
|
134
139
|
- [Vision migration report](reports/v0.2.6-rc11-vision-report.md)
|
|
135
140
|
- [Native WebUI repeat acceptance](reports/native-workbench-2026-08-25.md)
|
|
141
|
+
- [DSH 0.1.2-alpha.2 compatibility acceptance](reports/dsh-0.1.2-alpha.2-compat-2026-08-31.md)
|
|
136
142
|
- [Historical compression benchmark](docs/benchmark.md)
|
|
137
143
|
|
|
138
144
|
## Development
|
|
@@ -142,7 +148,7 @@ npm ci
|
|
|
142
148
|
npm run verify
|
|
143
149
|
```
|
|
144
150
|
|
|
145
|
-
`verify` builds and type-checks both plugin halves, runs
|
|
151
|
+
`verify` builds and type-checks both plugin halves, runs 167 tests, checks generated `lib/` and datasets, then packs, installs, and imports the actual npm tarball. Tests spend no model tokens. `prepublishOnly` runs the same gate; GitHub releases also require the tag to match `package.json` before trusted npm publishing.
|
|
146
152
|
|
|
147
153
|
Community listings: [Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) · [Awesome DeepSeek Harness](https://github.com/Dominic789654/awesome-deepseek-harness)
|
|
148
154
|
|
package/README.zh.md
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
[](https://github.com/Totoro-qaq/dsh-plugin-bridge/actions/workflows/ci.yml)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](package.json)
|
|
12
|
-
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
13
13
|
[](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
|
|
14
|
+
[](https://dshfind.com/zh/plugins/Totoro-qaq/dsh-plugin-bridge?ref=badge)
|
|
14
15
|
|
|
15
16
|
[English](README.md) | 中文
|
|
16
17
|
|
|
@@ -34,7 +35,7 @@ dsh plugin --profile web add dsh-plugin-bridge
|
|
|
34
35
|
GitHub 固定版本备用路径:
|
|
35
36
|
|
|
36
37
|
```bash
|
|
37
|
-
dsh plugin --profile web add github:Totoro-qaq/dsh-plugin-bridge#v0.3.
|
|
38
|
+
dsh plugin --profile web add github:Totoro-qaq/dsh-plugin-bridge#v0.3.1
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
然后在官方 WebUI 输入:
|
|
@@ -55,6 +56,8 @@ DSH rc.7 及以上会在官方 WebUI 原生卡片中渲染 `/bridge`。「文本
|
|
|
55
56
|
/bridge code --go --file <路径>
|
|
56
57
|
```
|
|
57
58
|
|
|
59
|
+
预览中的修改在确认迁移前只是临时草稿。重启客户端或系统可能使其丢失;源会话始终不受影响,重新运行预览即可生成新的草稿。
|
|
60
|
+
|
|
58
61
|
卸载:`dsh plugin --profile web remove dsh-plugin-bridge`,然后重启 `dsh web`。
|
|
59
62
|
|
|
60
63
|
## 为什么是 Bridge
|
|
@@ -81,6 +84,7 @@ DSH rc.7 及以上会在官方 WebUI 原生卡片中渲染 `/bridge`。「文本
|
|
|
81
84
|
| Confirm 相对 `--continue` 的 nominal 配对中位额外成本 | **+8.1%** |
|
|
82
85
|
| 摘要 worker 在干净验收组件中的 nominal 占比 | **20.74%** |
|
|
83
86
|
| 原生 WebUI 重复门禁(预览 / 目标事实) | **3/3 · 3/3**,每次五项 |
|
|
87
|
+
| DSH 0.1.2-alpha.2 npm 安装 / doctor / 目标 | **干净 · 13/13 · PTC 已暂停** |
|
|
84
88
|
|
|
85
89
|
token 百分比会随 preset、回复长度和缓存状态大幅波动;worker 占比是组成,不是相对“无 Bridge”的因果开销。稳定结论是默认确认多一个请求。边界和原始证据见[设计与证据说明](docs/design.md)、[完整 release report](reports/v0.2.3-e2e-report.md)和[视觉迁移报告](reports/v0.2.6-rc11-vision-report.md)。
|
|
86
90
|
|
|
@@ -113,6 +117,7 @@ token 百分比会随 preset、回复长度和缓存状态大幅波动;worker
|
|
|
113
117
|
| 0.1.0-rc.6 | 支持 | 不支持 | 窄 RPC 契约与文本兼容测试 |
|
|
114
118
|
| 0.1.0-rc.7 / rc.8 | 支持 | 契约核对 | client module / command slot 契约与服务端回退 |
|
|
115
119
|
| 0.1.1-rc.2 | 支持 | 支持 | 官方 WebUI 实装:doctor 13/13、编辑/确认/自动跳转、三次重复门禁 |
|
|
120
|
+
| 0.1.2-alpha.2 | 支持 | 支持 | 官方 npm 实装:typed controllers 13/13、拆分 client 构建、编辑/确认/PTC 自动跳转、干净卸载 |
|
|
116
121
|
|
|
117
122
|
CI 覆盖 Node.js 22/24。每次升级 Harness 后先跑 `/bridge --doctor`;缺哪个必要网关方法会被直接点名。
|
|
118
123
|
|
|
@@ -133,6 +138,7 @@ CI 覆盖 Node.js 22/24。每次升级 Harness 后先跑 `/bridge --doctor`;
|
|
|
133
138
|
- [完整 release acceptance](reports/v0.2.3-e2e-report.md)
|
|
134
139
|
- [视觉迁移报告](reports/v0.2.6-rc11-vision-report.md)
|
|
135
140
|
- [原生 WebUI 重复验收](reports/native-workbench-2026-08-25.md)
|
|
141
|
+
- [DSH 0.1.2-alpha.2 兼容性验收](reports/dsh-0.1.2-alpha.2-compat-2026-08-31.md)
|
|
136
142
|
- [历史压缩档位 benchmark](docs/benchmark.md)
|
|
137
143
|
|
|
138
144
|
## 开发验证
|
|
@@ -142,7 +148,7 @@ npm ci
|
|
|
142
148
|
npm run verify
|
|
143
149
|
```
|
|
144
150
|
|
|
145
|
-
`verify` 会构建并类型检查插件两端、运行
|
|
151
|
+
`verify` 会构建并类型检查插件两端、运行 167 项测试、核对 `lib/` 与数据集,再把真实 npm tarball 打包、安装并导入。测试不消耗模型 token。`prepublishOnly` 使用同一个 gate;GitHub Release 还会先检查 tag 与 `package.json` 版本一致,再走可信 npm 发布。
|
|
146
152
|
|
|
147
153
|
社区收录:[Awesome DSH Plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) · [Awesome DeepSeek Harness](https://github.com/Dominic789654/awesome-deepseek-harness)
|
|
148
154
|
|
package/docs/guide.zh.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 1. 安装
|
|
6
6
|
|
|
7
|
-
前置:已安装 dsh(`dsh --version` 能输出版本,本插件已核对 0.1.0-rc.6 / rc.7 / rc.8
|
|
7
|
+
前置:已安装 dsh(`dsh --version` 能输出版本,本插件已核对 0.1.0-rc.6 / rc.7 / rc.8,在 0.1.1-rc.2 完成真实视觉迁移,并用官方 npm `0.1.2-alpha.2` 完成 typed-controller 安装、编辑、迁移与卸载验收),并有一个可跑的 web profile(跑过一次 `dsh web` 即会自动初始化)。
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
dsh plugin --profile web add dsh-plugin-bridge
|
|
@@ -13,7 +13,7 @@ dsh plugin --profile web add dsh-plugin-bridge
|
|
|
13
13
|
需要固定 GitHub tag 或 npm 暂时不可用时:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
dsh plugin --profile web add github:Totoro-qaq/dsh-plugin-bridge#v0.3.
|
|
16
|
+
dsh plugin --profile web add github:Totoro-qaq/dsh-plugin-bridge#v0.3.1
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
发生了什么(不用手动干预):
|
|
@@ -138,10 +138,10 @@ dsh-bridge migrate --to code --summary-file <path>
|
|
|
138
138
|
## 6. 常见问题
|
|
139
139
|
|
|
140
140
|
**Q:`/bridge` 打了没反应 / 提示未知命令?**
|
|
141
|
-
A:确认重启过 `dsh web`(插件在启动时挂载),并且用的是 `web` profile。命令注册依赖 `commands`
|
|
141
|
+
A:确认重启过 `dsh web`(插件在启动时挂载),并且用的是 `web` profile。命令注册依赖 `commands` 服务;执行时优先用 rc.2 的 `apiProxy`,alpha 则使用 typed Session / Workspace / Preset / Goal controllers。必要能力不完整时 `/bridge --doctor` 会逐项报告,不会假装可用。
|
|
142
142
|
|
|
143
143
|
**Q:升级了 dsh 之后还能用吗?**
|
|
144
|
-
A:先打一次 `/bridge --doctor`,它会告诉你这套 host
|
|
144
|
+
A:先打一次 `/bridge --doctor`,它会告诉你这套 host 暴露了十三项能力里的哪几项、当前模式是什么、生效配置是什么。全绿就是好的。缺能力它会点名,把那行连同你的 dsh 版本发到 issues 就行。rc.6 / rc.7 / rc.8 已逐条核对;0.1.1-rc.2 的原图迁移已实测;官方 npm `0.1.2-alpha.2` 的 typed-controller 13/13、三态编辑、PTC 自动跳转、暂停目标与干净卸载也已实测。
|
|
145
145
|
|
|
146
146
|
**Q:图片迁移需要怎么选模型?**
|
|
147
147
|
A:图片已有助手分析时,Bridge 逐字搬这段视觉证据,不需要再次烧视觉 token。图片还没被分析时,源会话应选 `deepseek-v4-flash-vision-exp` 等视觉路由;Bridge 会在 kickoff 前把源 provider/model/reasoning effort 复制到目标,再搬原图。文本模型仍不能识图,Bridge 也不会暗中启动本地视觉模型。
|
|
@@ -4,9 +4,9 @@ Status: **implemented on main; the server command remains the compatibility fall
|
|
|
4
4
|
|
|
5
5
|
## Verified extension path
|
|
6
6
|
|
|
7
|
-
The official rc.7 through `0.1.1-rc.2` WebUI
|
|
7
|
+
The official rc.7 through `0.1.1-rc.2` WebUI and the split `0.1.2-alpha.2` client packages support third-party browser modules through a package-level `dsh.client` manifest. The renderer exposes a slot registry, and official plugins register occupants such as conversation views, input docks, settings items, and command renderers. Bridge uses that path; it does not patch the DOM or fork the WebUI.
|
|
8
8
|
|
|
9
|
-
The host half
|
|
9
|
+
The host half hard-injects only `commands`: it prefers rc.2's `apiProxy` when present and otherwise maps alpha's typed Session, Workspace, Preset, and Goal controllers into `BridgeHost`. The client half registers the `bridge` key in `conversation.chat.commandview`, parses only the host result, renders Markdown or complete JSON, offers lossless five-section Text/Markdown editing, and sends the reviewed summary back through `/bridge --go --summary64`. `recordInput: false` keeps that encoded payload out of the durable command log.
|
|
10
10
|
|
|
11
11
|
## Product shape
|
|
12
12
|
|
|
@@ -54,7 +54,7 @@ if (card.phase === 'preview') {
|
|
|
54
54
|
- Edited summaries are bounded to 24,000 characters and base64url-encoded for one command invocation. Malformed or oversized payloads fail closed before target creation; emptiness checks do not trim the transmitted Markdown.
|
|
55
55
|
- A WebUI payload is accepted only while the exact preview ID for the matching source session and target preset is pending and unexpired. The preview is consumed before migration; retrying the same completed payload returns the first target result instead of creating another session, even if a newer preview has since been generated.
|
|
56
56
|
- Once a target session exists, an unconfirmed kickoff is returned as that same navigable target with a warning and cached result. Bridge does not restore the preview and create a second target when prompt delivery is ambiguous.
|
|
57
|
-
- The client contract shapes for rc.7, rc.8, `0.1.1-rc.1`,
|
|
57
|
+
- The client contract shapes for rc.7, rc.8, `0.1.1-rc.1`, `0.1.1-rc.2`, and `0.1.2-alpha.2` were compared. Both rc.2 and alpha.2 have installed official-WebUI evidence; alpha.2 uses the split `ui-chat`, Session Controller, renderer, and Session UI declarations.
|
|
58
58
|
|
|
59
59
|
## Acceptance evidence
|
|
60
60
|
|
|
@@ -68,3 +68,5 @@ The 2026-08-25 installed-WebUI gate covered:
|
|
|
68
68
|
- reviewed-payload migration, paused goal, and automatic target navigation.
|
|
69
69
|
|
|
70
70
|
Three fixed real-model runs preserved five facts in both preview and target, with worker times from 7.4 to 12.8 seconds. See the [native workbench report](../reports/native-workbench-2026-08-25.md). This is release evidence, not a statistical guarantee.
|
|
71
|
+
|
|
72
|
+
The 2026-08-31 npm-installed alpha.2 gate additionally covered typed-controller doctor 13/13, split-client compilation, localized primitive labels, Text-to-Markdown review, PTC auto-open, paused goal, and clean removal. See the [alpha.2 compatibility report](../reports/dsh-0.1.2-alpha.2-compat-2026-08-31.md).
|
package/lib/client.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/** Official WebUI half: one native `/bridge` command card, not a second WebUI. */
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
3
|
+
import type { SessionId } from '@deepseek-ai/dsh-api-remotes/client';
|
|
4
|
+
import type { CommandRowProps } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
4
5
|
import { type BridgeOutcome } from './client-contract.ts';
|
|
5
6
|
interface BridgeInjected {
|
|
6
7
|
readonly execute: (sessionId: SessionId, line: string) => Promise<BridgeOutcome>;
|
|
7
8
|
readonly openSession: (sessionId: SessionId) => Promise<void>;
|
|
8
9
|
}
|
|
9
|
-
type BridgeCommandCardProps =
|
|
10
|
+
type BridgeCommandCardProps = CommandRowProps & BridgeInjected;
|
|
10
11
|
/** Rich renderer for the durable command lifecycle keyed by name and isolated from every other plugin. */
|
|
11
12
|
export declare function BridgeCommandCard(props: BridgeCommandCardProps): import("react").JSX.Element;
|
|
12
13
|
/** Client services are supplied by the official WebUI module table. */
|
package/lib/client.js
CHANGED
|
@@ -569,6 +569,50 @@ window.__ModuleLoader__.load({
|
|
|
569
569
|
stalePreview: "This older preview has no secure confirmation ID. Run /bridge again or use the summary-file workflow."
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
|
+
const PRIMITIVE_LABELS = {
|
|
573
|
+
zh: {
|
|
574
|
+
markdown: {
|
|
575
|
+
code: {
|
|
576
|
+
copyLabel: "复制",
|
|
577
|
+
copiedLabel: "已复制"
|
|
578
|
+
},
|
|
579
|
+
footnotes: "脚注"
|
|
580
|
+
},
|
|
581
|
+
json: {
|
|
582
|
+
copyValue: "复制值",
|
|
583
|
+
copyJson: "复制 JSON",
|
|
584
|
+
copyPath: "复制属性路径",
|
|
585
|
+
copyPrettyJson: "复制格式化 JSON",
|
|
586
|
+
copyCompactJson: "复制紧凑 JSON",
|
|
587
|
+
copied: "已复制",
|
|
588
|
+
copyFailed: "复制失败",
|
|
589
|
+
collapseNode: "折叠 JSON 节点",
|
|
590
|
+
expandNode: "展开 JSON 节点",
|
|
591
|
+
copyButtonTitle: (action) => `${action};右键查看更多复制选项`
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
en: {
|
|
595
|
+
markdown: {
|
|
596
|
+
code: {
|
|
597
|
+
copyLabel: "Copy",
|
|
598
|
+
copiedLabel: "Copied"
|
|
599
|
+
},
|
|
600
|
+
footnotes: "Footnotes"
|
|
601
|
+
},
|
|
602
|
+
json: {
|
|
603
|
+
copyValue: "Copy value",
|
|
604
|
+
copyJson: "Copy JSON",
|
|
605
|
+
copyPath: "Copy property path",
|
|
606
|
+
copyPrettyJson: "Copy pretty JSON",
|
|
607
|
+
copyCompactJson: "Copy compact JSON",
|
|
608
|
+
copied: "Copied",
|
|
609
|
+
copyFailed: "Copy failed",
|
|
610
|
+
collapseNode: "Collapse JSON node",
|
|
611
|
+
expandNode: "Expand JSON node",
|
|
612
|
+
copyButtonTitle: (action) => `${action}; right-click for copy options`
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
572
616
|
function Header({ lang, route }) {
|
|
573
617
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
574
618
|
className: "dsh-bridge-head",
|
|
@@ -634,9 +678,13 @@ window.__ModuleLoader__.load({
|
|
|
634
678
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
635
679
|
className: "dsh-bridge-preview",
|
|
636
680
|
"aria-label": json === void 0 ? COPY[lang].markdownPreview : COPY[lang].json,
|
|
637
|
-
children: json === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
681
|
+
children: json === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, {
|
|
682
|
+
text: summary,
|
|
683
|
+
labels: PRIMITIVE_LABELS[lang].markdown
|
|
684
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.JsonTree, {
|
|
638
685
|
data: json,
|
|
639
|
-
label: COPY[lang].json
|
|
686
|
+
label: COPY[lang].json,
|
|
687
|
+
labels: PRIMITIVE_LABELS[lang].json
|
|
640
688
|
})
|
|
641
689
|
});
|
|
642
690
|
}
|