dsh-deeppilot 0.6.2 → 0.7.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/COMPATIBILITY.md +44 -5
- package/README.md +37 -21
- package/README.zh-CN.md +25 -14
- package/SECURITY.md +1 -1
- package/lib/client.js +287 -166
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +34 -4
- package/lib/index.js +437 -116
- package/lib/index.js.map +1 -1
- package/package.json +19 -16
package/COMPATIBILITY.md
CHANGED
|
@@ -7,7 +7,7 @@ This file separates tested evidence from intended behavior. Passing unit tests d
|
|
|
7
7
|
| Component | Baseline | Evidence |
|
|
8
8
|
|---|---|---|
|
|
9
9
|
| Node.js | 22 or newer | package engine and CI |
|
|
10
|
-
| DSH CLI and Host API | `0.1.5-rc.1` minimum for plugin `0.
|
|
10
|
+
| DSH CLI and Host API | the `0.1.5-rc.*` and `0.1.6-*`/`0.1.6` lines, `0.1.5-rc.1` minimum, for plugin `0.7.x` | plugin source typecheck, unit suite (265 tests) and `tsdown` build run against the `0.1.5-rc.2`, `0.1.6-alpha.1` and `0.1.6-alpha.2` package families; the `deeppilot/report` contribution registered through both the `0.1.6-alpha.1` and the `0.1.6-alpha.2` `TypertRegistry`; bridge and `/phone` protocol tests |
|
|
11
11
|
| Host OS | macOS, Linux, Windows on packaged amd64/arm64 helper targets | helper checksums plus user-confirmed Windows/Linux Funnel launch and connection; local LAN validation remains part of alpha testing |
|
|
12
12
|
| Remote access | Tailscale Funnel, ports 443/8443/10000 | helper and supervisor tests |
|
|
13
13
|
| iOS | native DeepPilot client, protocol v2 | simulator build and v2 pairing/challenge evidence |
|
|
@@ -15,11 +15,50 @@ This file separates tested evidence from intended behavior. Passing unit tests d
|
|
|
15
15
|
## Protocol boundary
|
|
16
16
|
|
|
17
17
|
- Protocol v2 is the only supported wire version. Existing protocol-v1 devices must pair again after upgrading.
|
|
18
|
+
- The pairing QR now encodes a `deeppilot://pair` link, and the settings page shows that same string in one copy field. An app build that predates the link only parses the JSON payload, so it must be updated before pairing against this plugin; a link pasted into an older app is rejected instead of being half-applied. The current app still accepts the JSON payload.
|
|
19
|
+
- Plugin `0.7.x` serves the LAN listener over self-signed TLS only; devices paired over LAN with `0.6.x` or older must pair again so the app receives the certificate fingerprint. The DSH web server no longer carries `/phone` compatibility routes. Funnel pairings are unaffected.
|
|
18
20
|
- Bearer authentication, URL credentials, and first-frame shared tokens are rejected. A supported client registers a P-256 public key through `/phone/pair` and signs each WebSocket challenge.
|
|
19
21
|
- Without a compatible embedded helper, the core bridge and trusted-LAN mode can still run; remote Funnel reports `unavailable`.
|
|
20
22
|
- If a DSH Host API is missing, only the dependent capability should be disabled. The plugin must not crash the Host.
|
|
21
|
-
- Plugin `0.
|
|
22
|
-
versions used developer-preview DSH builds and remain historical
|
|
23
|
+
- Plugin `0.7.x` requires DSH `0.1.5-rc.1` or newer within the `0.1.x` line.
|
|
24
|
+
Older plugin versions used developer-preview DSH builds and remain historical
|
|
25
|
+
artifacts.
|
|
26
|
+
- The declared peer range is a disjunction,
|
|
27
|
+
`^0.1.5-rc.1 || >=0.1.6-alpha.1 <0.2.0-0`, because npm's prerelease rule only
|
|
28
|
+
lets a prerelease version satisfy a range whose comparators carry a
|
|
29
|
+
prerelease on the same `major.minor.patch` tuple. Neither `^0.1.5-rc.1` nor
|
|
30
|
+
`>=0.1.5-rc.1` alone admits a `0.1.6` prerelease. `tests/compatibility-metadata.test.ts`
|
|
31
|
+
asserts the range admits `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.6-alpha.1`,
|
|
32
|
+
`0.1.6-beta.1` and `0.1.6`, and rejects `0.2.0`.
|
|
33
|
+
- DSH `0.1.6-alpha.1` replaced `agent/session-start` with `agent/created`,
|
|
34
|
+
deprecated the synchronous `snapshotEvents`/`eventAt`/`ownEvents` history
|
|
35
|
+
readers, and renamed the PTC packages to the `ptc-runtime` family. The plugin
|
|
36
|
+
uses none of those surfaces: every host dependency is resolved structurally
|
|
37
|
+
from the Cordis context (`sessionController`, `workspaceController`,
|
|
38
|
+
`directoryPickerController`, `sessionProjections`) and the `session/event`
|
|
39
|
+
and `api-session/*` events, all of which kept their `0.1.5-rc` shape.
|
|
40
|
+
- DSH `0.1.6-alpha.2` changed the strict codec shape carried by an
|
|
41
|
+
`InvocationDescriptor`. Through `0.1.6-alpha.1` a descriptor published the
|
|
42
|
+
schema value itself and every consumer called `codec.schema.parse(value)`;
|
|
43
|
+
`alpha.2` instead validates a lazy `create()` factory at registration and the
|
|
44
|
+
Gateway parses through `codec.create().parse(value)`. A codec carrying only
|
|
45
|
+
`schema` is rejected by the `alpha.2` registry
|
|
46
|
+
(`typert: … strict codec has no create() factory`), which aborts plugin
|
|
47
|
+
activation. One `strictCodec()` helper in `src/report-wire.ts` emits both
|
|
48
|
+
keys — the same hand-written, dependency-free codec — so a single published
|
|
49
|
+
package registers and parses on either generation, and
|
|
50
|
+
`tests/report-wire.test.ts` pins both access paths.
|
|
51
|
+
The other `alpha.2` Typert change — a contributed schema's materialized
|
|
52
|
+
`schema` becoming a lazy `create()` factory — does not apply here: this
|
|
53
|
+
Remote contributes no schemas, which the same test asserts.
|
|
54
|
+
- DSH `0.1.6-alpha.2` made runtime plugin removal real, through both the
|
|
55
|
+
Plugin Manager and the client entry reconciler. Every long-lived resource is
|
|
56
|
+
registered through `ctx.effect`, and the settings-page stylesheet stamps
|
|
57
|
+
`data-plugin="dsh-deeppilot"` so the module system's `removeOwnedStyles()`
|
|
58
|
+
can delete it; the module system only auto-claims styles present during
|
|
59
|
+
factory materialization, while this sheet is injected from `apply()`.
|
|
60
|
+
Without that stamp, disabling the plugin would leave its sheet styling the
|
|
61
|
+
page.
|
|
23
62
|
- The compatibility facade converts the
|
|
24
63
|
current Session controller's raw event arrays into the stable wrapped
|
|
25
64
|
history entries consumed by the phone bridge. Sessions persisted by earlier
|
|
@@ -31,8 +70,8 @@ This file separates tested evidence from intended behavior. Passing unit tests d
|
|
|
31
70
|
|
|
32
71
|
- Intel macOS support for the embedded helper;
|
|
33
72
|
- signed/notarized helper distribution;
|
|
34
|
-
- repair or migration of persisted history rejected by the
|
|
35
|
-
|
|
73
|
+
- repair or migration of persisted history rejected by the Host's own session
|
|
74
|
+
reader;
|
|
36
75
|
- every DSH developer-preview revision;
|
|
37
76
|
- physical-device performance and every carrier/network combination;
|
|
38
77
|
- production APNs delivery without a real provider credential and device.
|
package/README.md
CHANGED
|
@@ -22,7 +22,8 @@ Host on your own Mac and does not replace or modify the DSH Web UI.
|
|
|
22
22
|
- Send prompts, switch models, create sessions, and answer approvals/questions.
|
|
23
23
|
- Pair with a five-minute single-use code and a per-device P-256 key; physical
|
|
24
24
|
iPhones keep the private key in Secure Enclave.
|
|
25
|
-
- Connect over
|
|
25
|
+
- Connect over the LAN (TLS with a Host-issued certificate pinned during
|
|
26
|
+
pairing) or the optional embedded Tailscale Funnel.
|
|
26
27
|
- Receive live notifications and optional APNs notifications while offline.
|
|
27
28
|
- Self-update hint: the settings page footer shows the installed plugin
|
|
28
29
|
version, with an inline "new version" link to the matching GitHub
|
|
@@ -37,10 +38,11 @@ does not require the helper.
|
|
|
37
38
|
|
|
38
39
|
| Plugin version | Required DSH | How to install |
|
|
39
40
|
|---|---|---|
|
|
40
|
-
| `0.
|
|
41
|
-
| `0.
|
|
41
|
+
| `0.7.x` (current stable, `latest`) | DSH `0.1.5-rc.1` or newer | `dsh plugin --profile web add dsh-deeppilot` |
|
|
42
|
+
| `0.6.x` (previous stable) | DSH `0.1.5-rc.1` or newer | `dsh plugin --profile web add dsh-deeppilot@0.6.2` |
|
|
43
|
+
| `0.5.x` (legacy) | DSH `0.1.1-rc.2`–`0.1.2-alpha.1` | `dsh plugin --profile web add dsh-deeppilot@0.5.0` |
|
|
42
44
|
|
|
43
|
-
`0.
|
|
45
|
+
`0.7.x` is built and typechecked against the DSH
|
|
44
46
|
[0.1.5-rc.1](https://www.npmjs.com/package/@deepseek-ai/dsh/v/0.1.5-rc.1)
|
|
45
47
|
Host and client package family. It uses the Gateway multi-client Remote Events
|
|
46
48
|
routing that keeps Web and DeepPilot independently answerable. Earlier plugin
|
|
@@ -56,13 +58,25 @@ dsh web
|
|
|
56
58
|
```
|
|
57
59
|
|
|
58
60
|
After DSH restarts, open **Settings → DeepPilot**, enable the connection, show
|
|
59
|
-
the pairing QR code, and scan it in the DeepPilot app.
|
|
60
|
-
shows
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
the pairing QR code, and scan it in the DeepPilot app. Below the QR code the same
|
|
62
|
+
panel shows one copyable piece of pairing info (address, single-use code and
|
|
63
|
+
certificate fingerprint) that can be pasted into the app in one step — useful for
|
|
64
|
+
Simulator or when the camera is unavailable. Switching between the LAN and
|
|
65
|
+
public address issues a matching new QR code and string immediately, with the
|
|
66
|
+
panel staying open.
|
|
67
|
+
|
|
68
|
+
LAN access is enabled by default on the plugin's independent TCP port `3098`
|
|
69
|
+
and is TLS-only. The plugin generates a self-signed certificate on first start
|
|
70
|
+
(key under `$DSH_HOME/deeppilot/lan-tls/`), and the pairing QR code carries its
|
|
71
|
+
public-key fingerprint so the app pins that exact Host. DSH may continue
|
|
72
|
+
listening only on `127.0.0.1:3080`; the plugin no longer registers any `/phone`
|
|
73
|
+
routes on the DSH web server. If a firewall is enabled, allow inbound TCP
|
|
74
|
+
`3098` on the networks you use. The port can be changed under **Advanced
|
|
75
|
+
settings**.
|
|
76
|
+
|
|
77
|
+
Upgrading from a plugin version that served plain `ws://` on the LAN: devices
|
|
78
|
+
paired over the LAN must pair again so they receive the certificate
|
|
79
|
+
fingerprint. Devices paired through Funnel are unaffected.
|
|
66
80
|
|
|
67
81
|
Package: [npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
|
|
68
82
|
|
|
@@ -78,14 +92,15 @@ DeepPilot state under `$DSH_HOME/deeppilot/`.
|
|
|
78
92
|
|
|
79
93
|
## Publishing (maintainers)
|
|
80
94
|
|
|
81
|
-
`0.
|
|
82
|
-
DSH `0.
|
|
95
|
+
`0.7.x` targets DSH `0.1.5-rc.1`+; `0.6.x` keeps the pre-TLS LAN transport for
|
|
96
|
+
the same DSH family during the migration window, and `0.5.x` stays compatible
|
|
97
|
+
with DSH `0.1.1-rc.2`–`0.1.2-alpha.1`. Keep them published:
|
|
83
98
|
|
|
84
99
|
1. Bump `version` in `package.json` and in the root `""` entry of
|
|
85
100
|
`package-lock.json`, then run `npm test && npm run typecheck && npm run build`
|
|
86
101
|
and inspect `npm pack --dry-run --json` (the check
|
|
87
|
-
`tests/compatibility-metadata.test.ts` enforces the
|
|
88
|
-
|
|
102
|
+
`tests/compatibility-metadata.test.ts` enforces the peer range and asserts it
|
|
103
|
+
admits both the `0.1.5-rc.*` and the `0.1.6-*` lines).
|
|
89
104
|
2. Commit the release and push it. `npm publish` runs `prepack` (build) and
|
|
90
105
|
`prepublishOnly` (test + typecheck) automatically.
|
|
91
106
|
3. Publish pre-releases without touching `latest`:
|
|
@@ -95,7 +110,7 @@ DSH `0.1.1-rc.2`–`0.1.2-alpha.1`. Keep both published:
|
|
|
95
110
|
```
|
|
96
111
|
|
|
97
112
|
After a successful publish, `npm view dsh-deeppilot dist-tags --json` shows
|
|
98
|
-
`"latest": "0.
|
|
113
|
+
`"latest": "0.7.x"` and `"alpha": "0.7.x-alpha.y"`. Verify the published
|
|
99
114
|
package by installing it into a DSH `0.1.5-rc.1` profile before pointing
|
|
100
115
|
users at it.
|
|
101
116
|
4. Tag the release commit `vX.Y.Z` and prepare a GitHub Release
|
|
@@ -109,11 +124,12 @@ Never run `npm publish` from a copy that still has an older version.
|
|
|
109
124
|
|
|
110
125
|
## Connection and privacy
|
|
111
126
|
|
|
112
|
-
Conversation traffic travels directly between the iPhone and your DSH Host
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
and
|
|
127
|
+
Conversation traffic travels directly between the iPhone and your DSH Host and
|
|
128
|
+
is always encrypted: the LAN listener on port `3098` serves TLS with a
|
|
129
|
+
self-signed certificate whose fingerprint the app receives during pairing, and
|
|
130
|
+
Funnel mode uses Tailscale-issued certificates. The app refuses plain `ws://`.
|
|
131
|
+
Both the LAN listener and optional Funnel mode expose only the DeepPilot
|
|
132
|
+
connection, one-time pairing, and health endpoints, not the complete DSH Web UI.
|
|
117
133
|
|
|
118
134
|
The DeepPilot settings page exposes **Connections per public source** under
|
|
119
135
|
the collapsed **Advanced settings** section. It defaults to `8`, accepts
|
package/README.zh-CN.md
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
- 发送提示词、切换模型、创建会话,并处理审批与提问;
|
|
22
22
|
- 使用 5 分钟有效的单次配对码与设备级 P-256 密钥;iPhone 真机私钥保存在
|
|
23
23
|
Secure Enclave;
|
|
24
|
-
-
|
|
24
|
+
- 局域网连接全程 TLS:插件自签证书,App 按配对二维码中的指纹固定信任;
|
|
25
|
+
也可选用内嵌 Tailscale Funnel 远程连接;
|
|
25
26
|
- 接收在线通知,以及可选的离线 APNs 推送;
|
|
26
27
|
- 更新提示:设置页底部显示当前插件版本,并在有新版本时附加一个指向
|
|
27
28
|
对应 GitHub Release 的链接(后台静默检查,仅比较稳定版,不引入第
|
|
@@ -34,10 +35,11 @@
|
|
|
34
35
|
|
|
35
36
|
| 插件版本 | 所需 DSH | 安装命令 |
|
|
36
37
|
|---|---|---|
|
|
37
|
-
| `0.
|
|
38
|
-
| `0.
|
|
38
|
+
| `0.7.x`(当前稳定版,`latest`) | DSH `0.1.5-rc.1` 或更高 | `dsh plugin --profile web add dsh-deeppilot` |
|
|
39
|
+
| `0.6.x`(旧版稳定版) | DSH `0.1.5-rc.1` 或更高 | `dsh plugin --profile web add dsh-deeppilot@0.6.2` |
|
|
40
|
+
| `0.5.x`(历史版本) | DSH `0.1.1-rc.2`–`0.1.2-alpha.1` | `dsh plugin --profile web add dsh-deeppilot@0.5.0` |
|
|
39
41
|
|
|
40
|
-
`0.
|
|
42
|
+
`0.7.x` 基于 DSH
|
|
41
43
|
[0.1.5-rc.1](https://www.npmjs.com/package/@deepseek-ai/dsh/v/0.1.5-rc.1)
|
|
42
44
|
的 Host 与 client 包族构建并完成类型检查。它使用 Gateway 多 Client Remote Events
|
|
43
45
|
路由,使 Web 与 DeepPilot 能独立处理同一交互。旧 alpha 仅保留为历史产物;安装
|
|
@@ -52,11 +54,18 @@ dsh web
|
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
DSH 重启后,打开 **设置 → DeepPilot**,启用连接并显示配对二维码,然后在
|
|
55
|
-
DeepPilot App
|
|
57
|
+
DeepPilot App 中扫码。二维码下方同时显示一段可复制的「配对信息」(含地址、一次性配对码
|
|
58
|
+
与证书指纹),在 App 里粘贴一次即可完成配对,适合模拟器或相机不可用时使用;在「内网 /
|
|
59
|
+
公网」之间切换会立即为所选地址生成新的二维码与配对信息,面板保持展开。
|
|
56
60
|
|
|
57
|
-
局域网连接默认使用插件独立的 TCP `3098`
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
局域网连接默认使用插件独立的 TCP `3098` 端口,且只提供 TLS。插件首次启动时生成
|
|
62
|
+
自签证书(私钥位于 `$DSH_HOME/deeppilot/lan-tls/`),配对二维码携带其公钥指纹,
|
|
63
|
+
App 只信任与该指纹一致的主机。DSH 可以继续只监听 `127.0.0.1:3080`;插件不再在
|
|
64
|
+
DSH Web 服务上注册任何 `/phone` 路由。启用系统防火墙时,请仅在你使用的网络放行
|
|
65
|
+
入站 TCP `3098`;端口可在“高级设置”中修改。
|
|
66
|
+
|
|
67
|
+
从仍在局域网提供明文 `ws://` 的旧版本插件升级:通过局域网配对的设备需要重新扫码
|
|
68
|
+
配对,以接收证书指纹;经 Funnel 配对的设备不受影响。
|
|
60
69
|
|
|
61
70
|
npm 包:[npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
|
|
62
71
|
|
|
@@ -71,13 +80,14 @@ dsh plugin --profile web remove dsh-deeppilot
|
|
|
71
80
|
|
|
72
81
|
## 发布说明(维护者)
|
|
73
82
|
|
|
74
|
-
`0.
|
|
75
|
-
|
|
83
|
+
`0.7.x` 面向 DSH `0.1.5-rc.1`+;`0.6.x` 在同一 DSH 版本族上保留 TLS 化之前的
|
|
84
|
+
局域网传输,供迁移期使用;`0.5.x` 保持兼容 DSH
|
|
85
|
+
`0.1.1-rc.2`–`0.1.2-alpha.1`,各版本线都要保持发布:
|
|
76
86
|
|
|
77
87
|
1. 同步修改 `package.json` 与 `package-lock.json` 根 `""` 条目中的
|
|
78
88
|
`version`,然后运行 `npm test && npm run typecheck && npm run build`,
|
|
79
89
|
并检查 `npm pack --dry-run --json`(`tests/compatibility-metadata.test.ts`
|
|
80
|
-
会强制校验
|
|
90
|
+
会强制校验 peer 范围,并断言它同时接纳 `0.1.5-rc.*` 与 `0.1.6-*` 两条线)。
|
|
81
91
|
2. 提交发布并推送。`npm publish` 会自动执行 `prepack`(构建)与
|
|
82
92
|
`prepublishOnly`(测试 + 类型检查)。
|
|
83
93
|
3. 发布预发布版本,不要动 `latest`:
|
|
@@ -87,7 +97,7 @@ dsh plugin --profile web remove dsh-deeppilot
|
|
|
87
97
|
```
|
|
88
98
|
|
|
89
99
|
发布成功后,`npm view dsh-deeppilot dist-tags --json` 应显示
|
|
90
|
-
`"latest": "0.
|
|
100
|
+
`"latest": "0.7.x"` 与 `"alpha": "0.7.x-alpha.y"`。向用户推荐前,请先在
|
|
91
101
|
DSH `0.1.5-rc.1` profile 中安装验证发布的包。
|
|
92
102
|
4. 为发布提交打 `vX.Y.Z` tag,并准备包含英文与简体中文说明的
|
|
93
103
|
GitHub Release,链接本 README 的发布说明。
|
|
@@ -99,8 +109,9 @@ dsh plugin --profile web remove dsh-deeppilot
|
|
|
99
109
|
|
|
100
110
|
## 连接与隐私
|
|
101
111
|
|
|
102
|
-
完整会话流量由 iPhone 直接连接用户自己的 DSH Host
|
|
103
|
-
|
|
112
|
+
完整会话流量由 iPhone 直接连接用户自己的 DSH Host,且始终加密:独立 `3098`
|
|
113
|
+
端口的局域网监听器使用自签证书提供 TLS,指纹在配对时下发给 App;Funnel 模式
|
|
114
|
+
使用 Tailscale 签发的证书。App 拒绝明文 `ws://`。局域网监听器和可选 Funnel
|
|
104
115
|
模式都只暴露经过认证的 DeepPilot 连接、单次配对与健康检查端点,不会暴露完整
|
|
105
116
|
DSH Web UI。
|
|
106
117
|
|
package/SECURITY.md
CHANGED
|
@@ -17,7 +17,7 @@ Do not open a public issue containing pairing codes, APNs device tokens, provide
|
|
|
17
17
|
- Protocol v1, shared Bearer tokens, query credentials, and `c2s.hello.auth` are not accepted. There is no remote downgrade switch.
|
|
18
18
|
- The server enforces explicit protocol scopes, while the normal settings UI grants the default scope set and exposes only the global connection switch plus per-device deletion. Deleting a device disconnects it immediately.
|
|
19
19
|
- The canonical `$DSH_HOME/deeppilot` directory is repaired to mode `0700`. `host-id` and `devices-v2.json` are owner-only.
|
|
20
|
-
-
|
|
20
|
+
- The independent LAN listener (default port `3098`) is TLS-only: the plugin serves a self-signed EC P-256 certificate, and the app pins its SPKI fingerprint delivered inside the pairing QR. There is no trust-on-first-use; a regenerated key forces re-pairing. The private key lives owner-only under `$DSH_HOME/deeppilot/lan-tls/`. Never forward the LAN port to the public Internet; public access should use Funnel HTTPS/WSS.
|
|
21
21
|
- The LAN listener and Funnel helper publish only `/phone`, `/phone/pair`, and `/phone/health`, never the complete DSH Web UI.
|
|
22
22
|
- Logs must never include pairing codes, key material, APNs tokens, or message bodies.
|
|
23
23
|
|