dsh-deeppilot 0.4.0 → 0.6.0-alpha.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 CHANGED
@@ -1,36 +1,41 @@
1
1
  # Compatibility
2
2
 
3
- This file separates tested evidence from intended fallback behavior. Passing
4
- unit tests does not prove every DSH build, network, Mac, or iPhone combination.
3
+ This file separates tested evidence from intended behavior. Passing unit tests does not prove every DSH build, network, Mac, or iPhone combination.
5
4
 
6
5
  ## Public-beta baseline
7
6
 
8
7
  | Component | Baseline | Evidence |
9
8
  |---|---|---|
10
9
  | Node.js | 22 or newer | package engine and CI |
11
- | DSH packages | `0.1.1-rc.2` peer family | build/type contracts and isolated host smoke tests |
10
+ | DSH CLI and Host API | `0.1.2-alpha.2` minimum | published alpha.2 type/build checks, profile install and Host-start smoke test, plus 0.1.2 history and `/phone` protocol tests |
12
11
  | Host OS | macOS on Apple silicon | embedded helper artifact and local integration testing |
13
- | Remote access | Tailscale Funnel, ports 443/8443/10000 | helper and supervisor tests; real-tailnet acceptance remains release-specific |
14
- | iOS | native DeepPilot client, protocol v1 | simulator build and bridge pairing evidence |
15
-
16
- ## Expected degradation
17
-
18
- - Without a compatible embedded helper, the core bridge and trusted-LAN mode
19
- can still run; remote Funnel reports `unavailable`.
20
- - If a DSH host API is missing, only the dependent capability should be
21
- disabled. The plugin must not crash the host.
22
- - Query-string token authentication is legacy compatibility only. Current
23
- clients use Bearer or first-frame authentication.
12
+ | Remote access | Tailscale Funnel, ports 443/8443/10000 | helper and supervisor tests |
13
+ | iOS | native DeepPilot client, protocol v2 | simulator build and v2 pairing/challenge evidence |
14
+
15
+ ## Protocol boundary
16
+
17
+ - Protocol v2 is the only supported wire version. Existing protocol-v1 devices must pair again after upgrading.
18
+ - 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
+ - Without a compatible embedded helper, the core bridge and trusted-LAN mode can still run; remote Funnel reports `unavailable`.
20
+ - If a DSH Host API is missing, only the dependent capability should be disabled. The plugin must not crash the Host.
21
+ - DSH versions older than `0.1.2-alpha.2` are unsupported: they do not expose
22
+ the controller and client package family required by this plugin.
23
+ - On the tested `0.1.2-alpha.2` Host, the compatibility facade converts the
24
+ current Session controller's raw event arrays into the stable wrapped
25
+ history entries consumed by the phone bridge. Sessions persisted by earlier
26
+ Hosts can therefore be listed and opened when the alpha.2 Host's own
27
+ persistence reader accepts their log vocabulary. Unsupported persisted
28
+ formats still fail closed in the Host without modifying the original log.
24
29
 
25
30
  ## Not yet claimed
26
31
 
27
32
  - Intel macOS support for the embedded helper;
28
33
  - signed/notarized helper distribution;
29
34
  - Windows or Linux host validation;
35
+ - repair or migration of persisted history rejected by the `0.1.2-alpha.2`
36
+ Host's own session reader;
30
37
  - every DSH developer-preview revision;
31
38
  - physical-device performance and every carrier/network combination;
32
39
  - production APNs delivery without a real provider credential and device.
33
40
 
34
- When reporting an issue, include `node --version`, the exact DSH package
35
- version, plugin commit/tag, macOS version and architecture, connection mode,
36
- and sanitized status output. Never include bearer tokens or message content.
41
+ When reporting an issue, include `node --version`, the exact DSH package version, plugin commit/tag, macOS version and architecture, connection mode, and sanitized status output. Never include pairing codes, key material, APNs tokens, or message content.
package/PRIVACY.md CHANGED
@@ -1,64 +1,36 @@
1
1
  # Privacy and data flow
2
2
 
3
- DeepPilot is designed around a direct connection to the DSH Host controlled by
4
- the user. The plugin does not upload complete conversations to a DeepPilot
5
- application server.
3
+ DeepPilot connects directly to the DSH Host controlled by the user. The plugin does not upload complete conversations to a DeepPilot application server.
6
4
 
7
5
  ## Data stored on the Mac
8
6
 
9
7
  By default, runtime state is stored under `$DSH_HOME/deeppilot/`:
10
8
 
11
- - `auth-token`: the pairing bearer token, mode `0600`;
12
- - `devices.json`: paired-device identifiers, names, app versions, last-seen
13
- timestamps, notification preferences, and APNs registrations;
14
- - `tailscale/`: local state for the optional embedded `tsnet` node.
9
+ - `host-id`: a random, non-secret stable audience identifier;
10
+ - `devices-v2.json`: paired public keys, fingerprints, scopes, device metadata, revocation/last-seen timestamps, notification preferences, and APNs registrations;
11
+ - `tailscale/`: local state for the optional embedded tsnet node.
15
12
 
16
- The pairing token and full APNs tokens are not rendered in routine logs. The
17
- settings report exposes only token readiness and masked/fingerprint values
18
- needed for diagnostics.
13
+ The directory is owner-only mode `0700`. The Mac never receives or stores iPhone private signing keys. Pairing codes exist only in plugin memory for up to five minutes and are not written to disk.
14
+
15
+ The settings report exposes public-key fingerprints, scopes, revocation state, and masked notification diagnostics. It does not expose full APNs tokens, pairing codes, or message bodies.
19
16
 
20
17
  ## Direct session connection
21
18
 
22
- Projects, session lists, conversation history, prompts, streaming events,
23
- approvals, questions, and model changes travel over the authenticated
24
- connection between the iPhone and the user's DSH Host.
19
+ Projects, history, prompts, streaming events, approvals, questions, and model changes travel over the authenticated connection between the iPhone and the user's DSH Host.
25
20
 
26
- - In LAN mode this is direct HTTP/WebSocket traffic and is not encrypted by the
27
- plugin. Use a trusted network.
28
- - In Funnel mode the phone uses HTTPS/WSS through Tailscale Funnel. The helper
29
- forwards only `/phone` and `/phone/health` to the local DSH origin.
21
+ - LAN mode is direct HTTP/WebSocket traffic and is not encrypted by the plugin. Use a trusted network.
22
+ - Funnel mode uses HTTPS/WSS. The helper forwards only `/phone`, `/phone/pair`, and `/phone/health`.
30
23
 
31
24
  ## Optional offline push
32
25
 
33
- Offline push is optional.
34
-
35
- ### Direct APNs mode
36
-
37
- When `provider: apns` is configured, the user's Mac sends the APNs device token
38
- and notification payload directly to Apple. The user supplies and controls the
39
- Apple provider credentials.
40
-
41
- ### DeepPilot relay mode
42
-
43
- When `provider: relay` is active, the plugin sends the following over HTTPS to
44
- the configured relay:
26
+ Direct APNs mode sends the device token and notification payload to Apple using user-controlled credentials. Relay mode sends over HTTPS:
45
27
 
46
28
  - a per-bridge relay authorization token;
47
- - target APNs device token and sandbox/production environment;
48
- - notification identifier, category, session identifier, title, and a short,
49
- truncated notification body.
50
-
51
- The body may contain a short assistant reply, session title, approval summary,
52
- or question text. The relay does not receive complete history, attachments,
53
- live token streams, prompts that are unrelated to the notification, the local
54
- pairing token, or the Tailscale node state.
29
+ - target APNs device token and environment;
30
+ - notification identifier, category, session identifier, title, and a short, truncated body.
55
31
 
56
- Apple receives the normal APNs alert payload in both modes. Users who do not
57
- want this disclosure can disable offline push; live WebSocket operation remains
58
- available.
32
+ The relay does not receive complete history, attachments, live token streams, unrelated prompts, pairing codes, device keys, the device registry, or Tailscale state. Disabling offline push removes this path.
59
33
 
60
34
  ## Logs
61
35
 
62
- Routine logs contain lifecycle state, delivery outcomes, and masked token
63
- prefixes. They are designed not to contain pairing tokens or message bodies.
64
- Frame-level diagnostics are emitted only when `debug` is enabled.
36
+ Routine logs contain lifecycle state, delivery outcomes, and process-local salted hashes for source/device identifiers. Logs are designed not to contain pairing codes, key material, APNs tokens, or message bodies. Frame diagnostics appear only with `debug`.
package/README.md CHANGED
@@ -20,7 +20,8 @@ Host on your own Mac and does not replace or modify the DSH Web UI.
20
20
 
21
21
  - Browse projects, sessions, history, and live agent output from iPhone.
22
22
  - Send prompts, switch models, create sessions, and answer approvals/questions.
23
- - Pair through a QR code with the secret stored on the Mac and in iOS Keychain.
23
+ - Pair with a five-minute single-use code and a per-device P-256 key; physical
24
+ iPhones keep the private key in Secure Enclave.
24
25
  - Connect over a trusted LAN or the optional embedded Tailscale Funnel.
25
26
  - Receive live notifications and optional APNs notifications while offline.
26
27
  - Self-update hint: the settings page footer shows the installed plugin
@@ -30,16 +31,33 @@ Host on your own Mac and does not replace or modify the DSH Web UI.
30
31
 
31
32
  ## Install from npm
32
33
 
33
- Requirements: Node.js 22+, a DSH `web` profile, and macOS. The bundled Funnel
34
- helper currently supports Apple silicon; trusted-LAN mode does not require it.
34
+ Requirements: Node.js 22+, DSH with a `web` profile, and macOS. The bundled
35
+ Funnel helper currently supports Apple silicon; trusted-LAN mode does not
36
+ require it.
37
+
38
+ | Plugin version | Required DSH | How to install |
39
+ |---|---|---|
40
+ | `0.6.0-alpha.x` (new, `alpha` tag) | DSH `0.1.2-alpha.2` or newer | `dsh plugin --profile web add dsh-deeppilot@alpha` |
41
+ | `0.5.x` (previous stable, `latest`) | DSH `0.1.1-rc.2`–`0.1.2-alpha.1` | `dsh plugin --profile web add dsh-deeppilot` |
42
+
43
+ The `0.6.0` alpha line is built against the DSH
44
+ [0.1.2-alpha.2](https://www.npmjs.com/package/@deepseek-ai/dsh/v/0.1.2-alpha.2)
45
+ controller and client package family, so it requires DSH `0.1.2-alpha.2` or
46
+ newer (its `alpha` npm dist-tag). Earlier DSH builds do not provide the Host
47
+ APIs required by this plugin. Users who need a DSH release before that must
48
+ stay on the `0.5.x` plugin.
35
49
 
36
50
  ```sh
51
+ # DSH 0.1.2-alpha.2 or newer (recommended):
52
+ dsh plugin --profile web add dsh-deeppilot@alpha
53
+ # DSH 0.1.1-rc.2 through 0.1.2-alpha.1 (previous stable):
37
54
  dsh plugin --profile web add dsh-deeppilot
38
55
  dsh web
39
56
  ```
40
57
 
41
58
  After DSH restarts, open **Settings → DeepPilot**, enable the connection, show
42
- the pairing QR code, and scan it in the DeepPilot app.
59
+ the pairing QR code, and scan it in the DeepPilot app. The same panel also
60
+ shows a copyable pairing code for Simulator or manual entry.
43
61
 
44
62
  Package: [npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
45
63
 
@@ -53,17 +71,55 @@ dsh plugin --profile web remove dsh-deeppilot
53
71
  Restart DSH after updating. Uninstalling the package does not delete the local
54
72
  DeepPilot state under `$DSH_HOME/deeppilot/`.
55
73
 
74
+ ## Publishing (maintainers)
75
+
76
+ `0.6.0-alpha.x` targets DSH `0.1.2-alpha.2`+; `0.5.x` stays compatible with
77
+ DSH `0.1.1-rc.2`–`0.1.2-alpha.1`. Keep both published:
78
+
79
+ 1. Bump `version` in `package.json` and in the root `""` entry of
80
+ `package-lock.json`, then run `npm test && npm run typecheck && npm run build`
81
+ and inspect `npm pack --dry-run --json` (the check
82
+ `tests/compatibility-metadata.test.ts` enforces the `^0.1.2-alpha.2` peer
83
+ ranges).
84
+ 2. Commit the release and push it. `npm publish` runs `prepack` (build) and
85
+ `prepublishOnly` (test + typecheck) automatically.
86
+ 3. Publish the alpha line without touching `latest`:
87
+
88
+ ```sh
89
+ npm publish --tag alpha
90
+ ```
91
+
92
+ After a successful publish, `npm view dsh-deeppilot dist-tags --json` shows
93
+ `"latest": "0.5.x"` and `"alpha": "0.6.0-alpha.x"`. Verify the published
94
+ package by installing it into a DSH `0.1.2-alpha.2` profile before pointing
95
+ users at it.
96
+ 4. Tag the release commit `v0.6.0-alpha.x` and prepare a GitHub Release
97
+ (English + 简体中文 notes) that links this README section.
98
+ 5. When the alpha graduates to stable, bump to `0.6.0` and publish with
99
+ `npm publish --tag latest`, which moves `latest` to the new line. Stable
100
+ releases must never be published with `--tag alpha`.
101
+
102
+ Never run `npm publish` from a copy that still has the old `0.5.x` version.
103
+
104
+
56
105
  ## Connection and privacy
57
106
 
58
107
  Conversation traffic travels directly between the iPhone and your DSH Host.
59
108
  Trusted-LAN `ws://` traffic is unencrypted, so use it only on a network you
60
- trust. Optional Funnel mode exposes only the authenticated DeepPilot connection
61
- and health endpoints, not the complete DSH Web UI.
109
+ trust. Optional Funnel mode exposes only the DeepPilot connection, one-time
110
+ pairing, and health endpoints, not the complete DSH Web UI.
111
+
112
+ The DeepPilot settings page exposes **Connections per public source** under
113
+ the collapsed **Advanced settings** section. It defaults to `8`, accepts
114
+ `1`–`16`, and briefly restarts the Funnel helper when changed, so connected
115
+ remote clients reconnect once.
62
116
 
63
117
  Offline push is optional. Relay mode sends only the target APNs device token
64
118
  and a limited notification payload; full conversation history and live output
65
119
  do not pass through the relay. Read [PRIVACY.md](./PRIVACY.md) and
66
- [SECURITY.md](./SECURITY.md) before enabling remote access or push.
120
+ [SECURITY.md](./SECURITY.md) before enabling remote access or push. Protocol-v2
121
+ implementation status and remaining release validation are tracked in
122
+ [docs/SECURITY_ROADMAP.md](./docs/SECURITY_ROADMAP.md).
67
123
 
68
124
  ## Screenshots
69
125
 
@@ -80,8 +136,9 @@ reporting an issue.
80
136
  ## Protocol
81
137
 
82
138
  [PROTOCOL.md](./PROTOCOL.md) is the normative DeepPilot bridge protocol. Any
83
- wire change must update that document and `src/protocol.ts` together, preserve
84
- protocol-v1 compatibility, and be coordinated with the private iOS client.
139
+ wire change must update that document and `src/protocol.ts` together and be
140
+ coordinated with the private iOS client. Protocol v2 is the only supported wire
141
+ version; upgrades from v1 require re-pairing.
85
142
 
86
143
  ## Development
87
144
 
package/README.zh-CN.md CHANGED
@@ -19,7 +19,8 @@
19
19
 
20
20
  - 在 iPhone 查看项目、会话、历史记录和 Agent 实时输出;
21
21
  - 发送提示词、切换模型、创建会话,并处理审批与提问;
22
- - 扫描二维码配对,密钥保存在 Mac iOS Keychain;
22
+ - 使用 5 分钟有效的单次配对码与设备级 P-256 密钥;iPhone 真机私钥保存在
23
+ Secure Enclave;
23
24
  - 使用可信局域网,或可选的内嵌 Tailscale Funnel 远程连接;
24
25
  - 接收在线通知,以及可选的离线 APNs 推送;
25
26
  - 更新提示:设置页底部显示当前插件版本,并在有新版本时附加一个指向
@@ -28,16 +29,30 @@
28
29
 
29
30
  ## 从 npm 安装
30
31
 
31
- 需要 Node.js 22+、DSH `web` profile macOS。内嵌 Funnel helper 目前支持
32
- Apple silicon;可信局域网模式不依赖 helper。
32
+ 需要 Node.js 22+、带 `web` profile DSH,以及 macOS。内嵌 Funnel helper
33
+ 目前支持 Apple silicon;可信局域网模式不依赖 helper。
34
+
35
+ | 插件版本 | 所需 DSH | 安装命令 |
36
+ |---|---|---|
37
+ | `0.6.0-alpha.x`(新版,`alpha` tag) | DSH `0.1.2-alpha.2` 或更高 | `dsh plugin --profile web add dsh-deeppilot@alpha` |
38
+ | `0.5.x`(旧版稳定版,`latest`) | DSH `0.1.1-rc.2`–`0.1.2-alpha.1` | `dsh plugin --profile web add dsh-deeppilot` |
39
+
40
+ `0.6.0` alpha 系列基于 DSH
41
+ [0.1.2-alpha.2](https://www.npmjs.com/package/@deepseek-ai/dsh/v/0.1.2-alpha.2)
42
+ 的 controller 与 client 包族构建,因此要求 DSH `0.1.2-alpha.2` 或更高版本
43
+ (对应 npm `alpha` dist-tag)。更早的 DSH 版本不提供本插件依赖的 Host API;
44
+ 需要更早 DSH 版本的用户请继续使用 `0.5.x` 插件。
33
45
 
34
46
  ```sh
47
+ # DSH 0.1.2-alpha.2 或更高(推荐):
48
+ dsh plugin --profile web add dsh-deeppilot@alpha
49
+ # DSH 0.1.1-rc.2 至 0.1.2-alpha.1(旧版稳定):
35
50
  dsh plugin --profile web add dsh-deeppilot
36
51
  dsh web
37
52
  ```
38
53
 
39
54
  DSH 重启后,打开 **设置 → DeepPilot**,启用连接并显示配对二维码,然后在
40
- DeepPilot App 中扫码。
55
+ DeepPilot App 中扫码。同一面板也会显示可复制的配对码,供模拟器或手动输入使用。
41
56
 
42
57
  npm 包:[npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
43
58
 
@@ -50,15 +65,48 @@ dsh plugin --profile web remove dsh-deeppilot
50
65
 
51
66
  更新后请重启 DSH。卸载 npm 包不会删除 `$DSH_HOME/deeppilot/` 下的本地数据。
52
67
 
68
+ ## 发布说明(维护者)
69
+
70
+ `0.6.0-alpha.x` 面向 DSH `0.1.2-alpha.2`+;`0.5.x` 保持兼容 DSH
71
+ `0.1.1-rc.2`–`0.1.2-alpha.1`,两个版本线都要保持发布:
72
+
73
+ 1. 同步修改 `package.json` 与 `package-lock.json` 根 `""` 条目中的
74
+ `version`,然后运行 `npm test && npm run typecheck && npm run build`,
75
+ 并检查 `npm pack --dry-run --json`(`tests/compatibility-metadata.test.ts`
76
+ 会强制校验 `^0.1.2-alpha.2` 的 peer 范围)。
77
+ 2. 提交发布并推送。`npm publish` 会自动执行 `prepack`(构建)与
78
+ `prepublishOnly`(测试 + 类型检查)。
79
+ 3. 发布 alpha 版本线,不要动 `latest`:
80
+
81
+ ```sh
82
+ npm publish --tag alpha
83
+ ```
84
+
85
+ 发布成功后,`npm view dsh-deeppilot dist-tags --json` 应显示
86
+ `"latest": "0.5.x"` 与 `"alpha": "0.6.0-alpha.x"`。向用户推荐前,请先在
87
+ DSH `0.1.2-alpha.2` profile 中安装验证发布的包。
88
+ 4. 为发布提交打 `v0.6.0-alpha.x` tag,并准备包含英文与简体中文说明的
89
+ GitHub Release,链接本 README 的发布说明。
90
+ 5. alpha 转正时升级到 `0.6.0`,用 `npm publish --tag latest` 发布,使
91
+ `latest` 切换到新版线。稳定版绝不使用 `--tag alpha` 发布。
92
+
93
+ 绝不要从仍是旧 `0.5.x` 版本的副本执行 `npm publish`。
94
+
95
+
53
96
  ## 连接与隐私
54
97
 
55
98
  完整会话流量由 iPhone 直接连接用户自己的 DSH Host。可信局域网中的 `ws://`
56
99
  是明文流量,只应在可信网络使用。可选 Funnel 模式只暴露经过认证的 DeepPilot
57
- 连接与健康检查端点,不会暴露完整 DSH Web UI。
100
+ 连接、单次配对与健康检查端点,不会暴露完整 DSH Web UI。
101
+
102
+ DeepPilot 设置页在默认折叠的“高级设置”中提供“每个公网来源的连接上限”,默认
103
+ `8`,可设置为 `1`–`16`。修改后 Funnel helper 会短暂重启,已连接的远程客户端
104
+ 会自动重连一次。
58
105
 
59
106
  离线推送是可选功能。中继模式只发送目标 APNs 设备 Token 和有限的通知内容;
60
107
  完整会话历史与实时输出不会经过中继。启用远程访问或推送前,请阅读
61
- [PRIVACY.md](./PRIVACY.md) 与 [SECURITY.md](./SECURITY.md)
108
+ [PRIVACY.md](./PRIVACY.md) 与 [SECURITY.md](./SECURITY.md)。协议 v2 的实现状态与
109
+ 剩余发布验证记录在 [docs/SECURITY_ROADMAP.zh-CN.md](./docs/SECURITY_ROADMAP.zh-CN.md)。
62
110
 
63
111
  ## App 截图
64
112
 
@@ -74,8 +122,8 @@ dsh plugin --profile web remove dsh-deeppilot
74
122
  ## 协议
75
123
 
76
124
  [PROTOCOL.md](./PROTOCOL.md) 是 DeepPilot 桥接协议的规范性文档。任何 wire
77
- 变更都必须同步更新该文档与 `src/protocol.ts`,保持协议 v1 向后兼容,并与
78
- 私有 iOS 客户端协调。
125
+ 变更都必须同步更新该文档与 `src/protocol.ts`,并与私有 iOS 客户端协调。
126
+ 协议 v2 是唯一支持的 wire version;从 v1 升级必须重新配对。
79
127
 
80
128
  ## 开发
81
129
 
package/SECURITY.md CHANGED
@@ -2,43 +2,41 @@
2
2
 
3
3
  ## Supported releases
4
4
 
5
- Until the first stable release, only the latest tagged public-beta release is
6
- supported. DSH itself is a developer preview, so reports must include the exact
7
- DSH version, plugin commit or tag, operating system, architecture, and whether
8
- LAN or Funnel mode was used.
5
+ Until the first stable release, only the latest tagged public-beta release is supported. Reports must include the exact DSH version, plugin commit or tag, operating system, architecture, and whether LAN or Funnel mode was used.
9
6
 
10
7
  ## Reporting a vulnerability
11
8
 
12
- Do not open a public issue containing pairing tokens, APNs device tokens,
13
- provider keys, relay credentials, private hostnames, conversation content, or
14
- an unpatched exploit. Use GitHub's private vulnerability reporting for
15
- `Mars-Sea/dsh-deeppilot` when available. If that channel is unavailable, open a
16
- minimal public issue requesting a private contact channel without including
17
- the sensitive details.
18
-
19
- ## Trust boundaries
20
-
21
- - `/phone` and `/phone/health` require the pairing bearer token.
22
- - New clients authenticate with the `Authorization: Bearer` header or the
23
- first WebSocket frame. Query-string tokens exist only for legacy clients.
24
- - The token is stored with mode `0600` on the Mac and in iOS Keychain.
25
- - Pairing QR codes contain the bearer secret. Treat screenshots as leaked
26
- credentials and rotate the token from the DeepPilot settings page.
27
- - LAN `ws://` is unencrypted. Use it only on a trusted network.
28
- - The optional Funnel helper publishes only `/phone` and `/phone/health`, not
29
- the complete DSH Web UI.
30
- - Debug logs may include status and masked identifiers, but must never include
31
- pairing tokens or message bodies.
9
+ Do not open a public issue containing pairing codes, APNs device tokens, provider keys, relay credentials, private hostnames, conversation content, or an unpatched exploit. Use GitHub private vulnerability reporting for `Mars-Sea/dsh-deeppilot` when available. Otherwise open a minimal issue asking for a private contact channel without sensitive details.
10
+
11
+ ## Protocol-v2 trust boundaries
12
+
13
+ - `/phone/pair` accepts only a short-lived, single-use pairing code and a P-256 public key. The code expires after five minutes and is invalidated after one successful registration.
14
+ - `/phone` upgrades anonymously, then sends a fresh 30-second challenge bound to the stable Host audience. The client proves possession of its registered P-256 private key with ECDSA/SHA-256.
15
+ - The iOS app uses a non-exportable Secure Enclave key on physical devices. The Mac stores only public keys and metadata.
16
+ - `GET /phone/health` is intentionally unauthenticated and returns only minimal readiness/version facts.
17
+ - Protocol v1, shared Bearer tokens, query credentials, and `c2s.hello.auth` are not accepted. There is no remote downgrade switch.
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
+ - The canonical `$DSH_HOME/deeppilot` directory is repaired to mode `0700`. `host-id` and `devices-v2.json` are owner-only.
20
+ - LAN `ws://` is unencrypted. Use it only on a trusted network. Public access should use Funnel HTTPS/WSS.
21
+ - The Funnel helper publishes only `/phone`, `/phone/pair`, and `/phone/health`, never the complete DSH Web UI.
22
+ - Logs must never include pairing codes, key material, APNs tokens, or message bodies.
23
+
24
+ ## Online attack controls
25
+
26
+ - The Funnel helper allows at most 60 requests per source per minute and 600 globally. Concurrent WebSockets per public source are configurable from 1 to 16 and default to 8.
27
+ - The Node bridge independently allows at most 12 anonymous authentication or pairing attempts per source per minute, 120 globally, and two concurrent unauthenticated WebSockets per source.
28
+ - Five failures within ten minutes block that source for 15 minutes. A blocked request receives HTTP 429 with `Retry-After`.
29
+ - The bridge ignores caller-supplied forwarding headers on non-loopback sockets.
30
+ - Audit logs use process-local salted hashes, preventing stable source/device correlation across restarts.
31
+
32
+ If a QR code is exposed before expiry, invalidate it or issue a new one. If a paired device is lost or suspected compromised, delete that device from the settings list; other devices remain valid.
32
33
 
33
34
  ## Release integrity
34
35
 
35
- The public beta includes a prebuilt macOS Apple-silicon helper. Verify it from
36
- the repository root with:
36
+ Verify the public-beta helper from the repository root with:
37
37
 
38
38
  ```bash
39
39
  cd bin && shasum -a 256 -c SHA256SUMS
40
40
  ```
41
41
 
42
- Developer ID signing and notarization are release gates for broad end-user
43
- distribution. Until those gates are complete, the helper is a public-beta
44
- artifact and not a production-readiness claim.
42
+ Developer ID signing and notarization remain release gates for broad end-user distribution.
package/bin/SHA256SUMS CHANGED
@@ -1,6 +1,6 @@
1
- 6f7caac1655a0d2bce606bcfde2e53a4dde6aea89dff8d99fe2fb3d055d4461f ./darwin-amd64/dsh-deeppilot-tunnel
2
- 1eaa95742dbe592ab6e5c8bc00715fa63028b975a11876841e221390657535df ./darwin-arm64/dsh-deeppilot-tunnel
3
- 766c4dfdd70e1b7607b276d4e0cc66cfb6398904c9b841f973641622d9da26ab ./linux-amd64/dsh-deeppilot-tunnel
4
- a61bc73b2eca7b6b8358d0c6ff3e6475de8200448d1ac423647d95c37b4d9a2f ./linux-arm64/dsh-deeppilot-tunnel
5
- 205f598f9c79138f4d8cef372f7a4aa9883f6a70d313bd5277ebac442e46063c ./windows-amd64/dsh-deeppilot-tunnel.exe
6
- 0282ee0a0a20bb1d220f9a6d4158a5f17d4c4afbbdb2451a22a246f219bbcde5 ./windows-arm64/dsh-deeppilot-tunnel.exe
1
+ 1f7f29e139f978a68da0bc80c5755e37aca311de06e5e2a14fb09ccb34647571 ./darwin-amd64/dsh-deeppilot-tunnel
2
+ a7c879a104468c6ab7c782176f4ca4f1c87fbbffef298dc3a1009fa8960a801f ./darwin-arm64/dsh-deeppilot-tunnel
3
+ 210a182ca76f09a244d8439f071b68c606157e5bdd18f383c16b2454b72d117c ./linux-amd64/dsh-deeppilot-tunnel
4
+ fb7d93a5edb2eeff8b867aa5c745618ef44f425bb7c4cd6aa6289116efef9fb2 ./linux-arm64/dsh-deeppilot-tunnel
5
+ c1a23b917d4fcde70b449574b00cd4e453cd7e13d4777a7f7affaad9e0efbbac ./windows-amd64/dsh-deeppilot-tunnel.exe
6
+ eff7c91008f5846ccebdd8c7eb51f65ef96455c46f489de7c4d3d6b888a4f3f5 ./windows-arm64/dsh-deeppilot-tunnel.exe
@@ -0,0 +1,24 @@
1
+ # Protocol-v2 security status
2
+
3
+ [简体中文](./SECURITY_ROADMAP.zh-CN.md)
4
+
5
+ Status: implemented on the development branch. `PROTOCOL.md` is normative. Protocol v1 is not retained; all devices must pair again.
6
+
7
+ ## Implemented
8
+
9
+ - five-minute, single-use, high-entropy pairing codes;
10
+ - P-256 device identities, Secure Enclave on physical iOS devices with a simulator Keychain fallback;
11
+ - per-connection nonce/audience/timestamp challenge signatures;
12
+ - host-side public-key fingerprints, per-device scopes and immediate revocation;
13
+ - anonymous-endpoint rate limits, source blocking, bounded unauthenticated concurrency, and a bounded registry;
14
+ - minimal unauthenticated health response; no Bearer or URL credentials;
15
+ - privacy-preserving audit identifiers, a global connection switch, and per-device deletion; scopes remain enforced at the protocol layer.
16
+
17
+ ## Remaining release validation
18
+
19
+ - share fixed canonical/signature vectors between TypeScript and Swift tests;
20
+ - exercise pairing, reconnect/resume, and per-device deletion through both real LAN and Funnel paths;
21
+ - add abuse tests for malformed requests, connection churn, replay, and many-source pressure;
22
+ - document local recovery when `devices-v2.json` is lost;
23
+ - decide whether high-impact approval responses should require fresh local biometric/user-presence confirmation;
24
+ - keep dependency scanning and CodeQL green, then sign and notarize every distributed helper before claiming production readiness.
@@ -0,0 +1,24 @@
1
+ # 协议 v2 安全状态
2
+
3
+ [English](./SECURITY_ROADMAP.md)
4
+
5
+ 状态:已在开发分支实现,`PROTOCOL.md` 为规范来源。不保留协议 v1,所有设备都需要重新配对。
6
+
7
+ ## 已实现
8
+
9
+ - 5 分钟有效、单次使用的高熵配对码;
10
+ - P-256 设备身份;iOS 真机使用 Secure Enclave,模拟器使用钥匙串回退;
11
+ - 每次连接使用 nonce、audience 和时间戳完成挑战签名;
12
+ - 主机侧公钥指纹、单设备 scope 和即时撤销;
13
+ - 匿名入口限速、来源封禁、未认证连接并发上限和设备表容量上限;
14
+ - 最小化匿名探活响应,不接受 Bearer 或 URL 凭据;
15
+ - 隐私化审计标识、全局连接开关和逐设备删除入口;scope 继续由协议层强制执行。
16
+
17
+ ## 发布前剩余验证
18
+
19
+ - 在 TypeScript 与 Swift 测试间共享固定的规范化编码/签名向量;
20
+ - 通过真实 LAN 与 Funnel 验证配对、重连/恢复和逐设备删除;
21
+ - 补充畸形请求、连接抖动、重放和多来源压力测试;
22
+ - 记录 `devices-v2.json` 丢失后的本机恢复流程;
23
+ - 决定高影响审批是否要求新的本地生物识别/用户在场确认;
24
+ - 保持依赖扫描与 CodeQL 通过,并在宣称生产可用前签名、公证所有分发 helper。