dsh-deeppilot 0.2.0

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.
Files changed (53) hide show
  1. package/COMPATIBILITY.md +36 -0
  2. package/LICENSE +21 -0
  3. package/PRIVACY.md +64 -0
  4. package/README.md +97 -0
  5. package/README.zh-CN.md +91 -0
  6. package/SECURITY.md +44 -0
  7. package/THIRD_PARTY_NOTICES.md +20 -0
  8. package/bin/SHA256SUMS +1 -0
  9. package/bin/darwin-arm64/dsh-deeppilot-tunnel +0 -0
  10. package/cordis.patch.yml +20 -0
  11. package/lib/client.js +3398 -0
  12. package/lib/client.js.map +1 -0
  13. package/lib/index.d.ts +586 -0
  14. package/lib/index.js +3654 -0
  15. package/lib/index.js.map +1 -0
  16. package/package.json +102 -0
  17. package/third_party/licenses/filippo.io/edwards25519/LICENSE +27 -0
  18. package/third_party/licenses/github.com/Mars-Sea/dsh-deeppilot/helper/LICENSE +21 -0
  19. package/third_party/licenses/github.com/coder/websocket/LICENSE.txt +13 -0
  20. package/third_party/licenses/github.com/creachadair/msync/trigger/LICENSE +26 -0
  21. package/third_party/licenses/github.com/fxamacker/cbor/v2/LICENSE +21 -0
  22. package/third_party/licenses/github.com/gaissmai/bart/LICENSE +21 -0
  23. package/third_party/licenses/github.com/go-json-experiment/json/LICENSE +27 -0
  24. package/third_party/licenses/github.com/golang/groupcache/lru/LICENSE +191 -0
  25. package/third_party/licenses/github.com/google/btree/LICENSE +202 -0
  26. package/third_party/licenses/github.com/hdevalence/ed25519consensus/LICENSE +28 -0
  27. package/third_party/licenses/github.com/huin/goupnp/LICENSE +23 -0
  28. package/third_party/licenses/github.com/klauspost/compress/LICENSE +304 -0
  29. package/third_party/licenses/github.com/klauspost/compress/internal/snapref/LICENSE +27 -0
  30. package/third_party/licenses/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt +22 -0
  31. package/third_party/licenses/github.com/mitchellh/go-ps/LICENSE.md +21 -0
  32. package/third_party/licenses/github.com/pires/go-proxyproto/LICENSE +201 -0
  33. package/third_party/licenses/github.com/tailscale/certstore/LICENSE.md +21 -0
  34. package/third_party/licenses/github.com/tailscale/hujson/LICENSE +27 -0
  35. package/third_party/licenses/github.com/tailscale/peercred/LICENSE +29 -0
  36. package/third_party/licenses/github.com/tailscale/web-client-prebuilt/LICENSE +28 -0
  37. package/third_party/licenses/github.com/tailscale/wireguard-go/LICENSE +17 -0
  38. package/third_party/licenses/github.com/x448/float16/LICENSE +22 -0
  39. package/third_party/licenses/go4.org/mem/LICENSE +202 -0
  40. package/third_party/licenses/go4.org/netipx/LICENSE +27 -0
  41. package/third_party/licenses/golang.org/x/crypto/LICENSE +27 -0
  42. package/third_party/licenses/golang.org/x/exp/LICENSE +27 -0
  43. package/third_party/licenses/golang.org/x/net/LICENSE +27 -0
  44. package/third_party/licenses/golang.org/x/oauth2/LICENSE +27 -0
  45. package/third_party/licenses/golang.org/x/sync/errgroup/LICENSE +27 -0
  46. package/third_party/licenses/golang.org/x/sys/LICENSE +27 -0
  47. package/third_party/licenses/golang.org/x/term/LICENSE +27 -0
  48. package/third_party/licenses/golang.org/x/text/LICENSE +27 -0
  49. package/third_party/licenses/golang.org/x/time/rate/LICENSE +27 -0
  50. package/third_party/licenses/gvisor.dev/gvisor/pkg/LICENSE +254 -0
  51. package/third_party/licenses/npm/dijkstrajs/LICENSE +17 -0
  52. package/third_party/licenses/npm/qrcode/LICENSE +21 -0
  53. package/third_party/licenses/tailscale.com/LICENSE +28 -0
@@ -0,0 +1,36 @@
1
+ # Compatibility
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.
5
+
6
+ ## Public-beta baseline
7
+
8
+ | Component | Baseline | Evidence |
9
+ |---|---|---|
10
+ | 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 |
12
+ | 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.
24
+
25
+ ## Not yet claimed
26
+
27
+ - Intel macOS support for the embedded helper;
28
+ - signed/notarized helper distribution;
29
+ - Windows or Linux host validation;
30
+ - every DSH developer-preview revision;
31
+ - physical-device performance and every carrier/network combination;
32
+ - production APNs delivery without a real provider credential and device.
33
+
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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mars-Sea
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/PRIVACY.md ADDED
@@ -0,0 +1,64 @@
1
+ # Privacy and data flow
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.
6
+
7
+ ## Data stored on the Mac
8
+
9
+ By default, runtime state is stored under `$DSH_HOME/deeppilot/`:
10
+
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.
15
+
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.
19
+
20
+ ## Direct session connection
21
+
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.
25
+
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.
30
+
31
+ ## Optional offline push
32
+
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:
45
+
46
+ - 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.
55
+
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.
59
+
60
+ ## Logs
61
+
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.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # dsh-deeppilot
2
+
3
+ **English** | [简体中文](./README.zh-CN.md)
4
+
5
+ [![npm](https://img.shields.io/npm/v/dsh-deeppilot?style=flat-square)](https://www.npmjs.com/package/dsh-deeppilot)
6
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-plugin-4D6BFE?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
7
+ [![CI](https://github.com/Mars-Sea/dsh-deeppilot/actions/workflows/ci.yml/badge.svg)](https://github.com/Mars-Sea/dsh-deeppilot/actions/workflows/ci.yml)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
9
+
10
+ The open-source DSH companion plugin for **DeepPilot**, a native iPhone client
11
+ for using DeepSeek Harness remotely. It connects the app directly to the DSH
12
+ Host on your own Mac and does not replace or modify the DSH Web UI.
13
+
14
+ > DeepPilot is currently in TestFlight review. The invitation link will accept
15
+ > testers after Apple approves the build.
16
+
17
+ [Join the DeepPilot TestFlight](https://testflight.apple.com/join/JHb4j5DV)
18
+
19
+ ## What you get
20
+
21
+ - Browse projects, sessions, history, and live agent output from iPhone.
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.
24
+ - Connect over a trusted LAN or the optional embedded Tailscale Funnel.
25
+ - Receive live notifications and optional APNs notifications while offline.
26
+
27
+ ## Install from npm
28
+
29
+ Requirements: Node.js 22+, a DSH `web` profile, and macOS. The bundled Funnel
30
+ helper currently supports Apple silicon; trusted-LAN mode does not require it.
31
+
32
+ ```sh
33
+ dsh plugin --profile web add dsh-deeppilot
34
+ dsh web
35
+ ```
36
+
37
+ After DSH restarts, open **Settings → DeepPilot**, enable the connection, show
38
+ the pairing QR code, and scan it in the DeepPilot app.
39
+
40
+ Package: [npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
41
+
42
+ ## Update or uninstall
43
+
44
+ ```sh
45
+ dsh plugin --profile web update dsh-deeppilot
46
+ dsh plugin --profile web remove dsh-deeppilot
47
+ ```
48
+
49
+ Restart DSH after updating. Uninstalling the package does not delete the local
50
+ DeepPilot state under `$DSH_HOME/deeppilot/`.
51
+
52
+ ## Connection and privacy
53
+
54
+ Conversation traffic travels directly between the iPhone and your DSH Host.
55
+ Trusted-LAN `ws://` traffic is unencrypted, so use it only on a network you
56
+ trust. Optional Funnel mode exposes only the authenticated DeepPilot connection
57
+ and health endpoints, not the complete DSH Web UI.
58
+
59
+ Offline push is optional. Relay mode sends only the target APNs device token
60
+ and a limited notification payload; full conversation history and live output
61
+ do not pass through the relay. Read [PRIVACY.md](./PRIVACY.md) and
62
+ [SECURITY.md](./SECURITY.md) before enabling remote access or push.
63
+
64
+ ## Screenshots
65
+
66
+ Screenshots will be added after the current TestFlight review.
67
+
68
+ <!-- Add future app screenshots under assets/screenshots/ and replace this note. -->
69
+
70
+ ## Compatibility
71
+
72
+ See [COMPATIBILITY.md](./COMPATIBILITY.md) for the tested baseline and current
73
+ limitations. DSH is still evolving; include exact DSH and plugin versions when
74
+ reporting an issue.
75
+
76
+ ## Development
77
+
78
+ ```sh
79
+ npm ci
80
+ npm test
81
+ npm run typecheck
82
+ npm run build
83
+ cd helper && go test ./...
84
+ ```
85
+
86
+ ## Community and feedback
87
+
88
+ - [GitHub Issues](https://github.com/Mars-Sea/dsh-deeppilot/issues)
89
+ - [GitHub Releases](https://github.com/Mars-Sea/dsh-deeppilot/releases)
90
+ - [npm package](https://www.npmjs.com/package/dsh-deeppilot)
91
+
92
+ DeepPilot is an independent community project and is not affiliated with or
93
+ endorsed by DeepSeek.
94
+
95
+ ## License
96
+
97
+ MIT — see [LICENSE](./LICENSE).
@@ -0,0 +1,91 @@
1
+ # dsh-deeppilot
2
+
3
+ [English](./README.md) | **简体中文**
4
+
5
+ [![npm](https://img.shields.io/npm/v/dsh-deeppilot?style=flat-square)](https://www.npmjs.com/package/dsh-deeppilot)
6
+ [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-plugin-4D6BFE?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
7
+ [![CI](https://github.com/Mars-Sea/dsh-deeppilot/actions/workflows/ci.yml/badge.svg)](https://github.com/Mars-Sea/dsh-deeppilot/actions/workflows/ci.yml)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
9
+
10
+ **DeepPilot** 的开源 DSH 配套插件。DeepPilot 是一款原生 iPhone 客户端,
11
+ 可远程使用 DeepSeek Harness;插件让 App 直接连接用户自己 Mac 上的 DSH Host,
12
+ 不会替换或修改 DSH Web UI。
13
+
14
+ > DeepPilot 目前正在等待 TestFlight 审核。Apple 审核通过后,邀请链接即可加入测试。
15
+
16
+ [加入 DeepPilot TestFlight](https://testflight.apple.com/join/JHb4j5DV)
17
+
18
+ ## 功能
19
+
20
+ - 在 iPhone 查看项目、会话、历史记录和 Agent 实时输出;
21
+ - 发送提示词、切换模型、创建会话,并处理审批与提问;
22
+ - 扫描二维码配对,密钥保存在 Mac 与 iOS Keychain;
23
+ - 使用可信局域网,或可选的内嵌 Tailscale Funnel 远程连接;
24
+ - 接收在线通知,以及可选的离线 APNs 推送。
25
+
26
+ ## 从 npm 安装
27
+
28
+ 需要 Node.js 22+、DSH `web` profile 与 macOS。内嵌 Funnel helper 目前支持
29
+ Apple silicon;可信局域网模式不依赖 helper。
30
+
31
+ ```sh
32
+ dsh plugin --profile web add dsh-deeppilot
33
+ dsh web
34
+ ```
35
+
36
+ DSH 重启后,打开 **设置 → DeepPilot**,启用连接并显示配对二维码,然后在
37
+ DeepPilot App 中扫码。
38
+
39
+ npm 包:[npmjs.com/package/dsh-deeppilot](https://www.npmjs.com/package/dsh-deeppilot)
40
+
41
+ ## 更新或卸载
42
+
43
+ ```sh
44
+ dsh plugin --profile web update dsh-deeppilot
45
+ dsh plugin --profile web remove dsh-deeppilot
46
+ ```
47
+
48
+ 更新后请重启 DSH。卸载 npm 包不会删除 `$DSH_HOME/deeppilot/` 下的本地数据。
49
+
50
+ ## 连接与隐私
51
+
52
+ 完整会话流量由 iPhone 直接连接用户自己的 DSH Host。可信局域网中的 `ws://`
53
+ 是明文流量,只应在可信网络使用。可选 Funnel 模式只暴露经过认证的 DeepPilot
54
+ 连接与健康检查端点,不会暴露完整 DSH Web UI。
55
+
56
+ 离线推送是可选功能。中继模式只发送目标 APNs 设备 Token 和有限的通知内容;
57
+ 完整会话历史与实时输出不会经过中继。启用远程访问或推送前,请阅读
58
+ [PRIVACY.md](./PRIVACY.md) 与 [SECURITY.md](./SECURITY.md)。
59
+
60
+ ## App 截图
61
+
62
+ 当前 TestFlight 审核完成后再补充截图。
63
+
64
+ <!-- 后续将 App 截图放到 assets/screenshots/,并替换本段说明。 -->
65
+
66
+ ## 兼容性
67
+
68
+ 已验证的基线与当前限制见 [COMPATIBILITY.md](./COMPATIBILITY.md)。DSH 仍在快速
69
+ 迭代;提交问题时请附上准确的 DSH 与插件版本。
70
+
71
+ ## 开发
72
+
73
+ ```sh
74
+ npm ci
75
+ npm test
76
+ npm run typecheck
77
+ npm run build
78
+ cd helper && go test ./...
79
+ ```
80
+
81
+ ## 社区与反馈
82
+
83
+ - [GitHub Issues](https://github.com/Mars-Sea/dsh-deeppilot/issues)
84
+ - [GitHub Releases](https://github.com/Mars-Sea/dsh-deeppilot/releases)
85
+ - [npm 包](https://www.npmjs.com/package/dsh-deeppilot)
86
+
87
+ DeepPilot 是独立社区项目,与 DeepSeek 官方无隶属或背书关系。
88
+
89
+ ## 许可证
90
+
91
+ MIT — 见 [LICENSE](./LICENSE)。
package/SECURITY.md ADDED
@@ -0,0 +1,44 @@
1
+ # Security policy
2
+
3
+ ## Supported releases
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.
9
+
10
+ ## Reporting a vulnerability
11
+
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.
32
+
33
+ ## Release integrity
34
+
35
+ The public beta includes a prebuilt macOS Apple-silicon helper. Verify it from
36
+ the repository root with:
37
+
38
+ ```bash
39
+ cd bin && shasum -a 256 -c SHA256SUMS
40
+ ```
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.
@@ -0,0 +1,20 @@
1
+ # Third-party notices
2
+
3
+ The optional embedded `dsh-deeppilot-tunnel` helper is built with
4
+ [`tailscale.com/tsnet`](https://github.com/tailscale/tailscale), distributed
5
+ under the BSD 3-Clause License.
6
+
7
+ Binary redistributions of the helper include the detected dependency license
8
+ texts under `third_party/licenses/`. That directory is generated from the
9
+ pinned Go module graph with `go-licenses`; it must be regenerated and reviewed
10
+ whenever `helper/go.mod` or `helper/go.sum` changes.
11
+
12
+ The repository source and license are available at:
13
+
14
+ - https://github.com/tailscale/tailscale
15
+ - https://github.com/tailscale/tailscale/blob/main/LICENSE
16
+
17
+ The browser settings bundle uses [`qrcode`](https://github.com/soldair/node-qrcode)
18
+ and its bundled `dijkstrajs` dependency to generate pairing QR codes entirely
19
+ in the local browser. Both are distributed under the MIT License; their texts
20
+ are included under `third_party/licenses/npm/`.
package/bin/SHA256SUMS ADDED
@@ -0,0 +1 @@
1
+ 98b24ff04b40d2c4f9d6b003e263880e9d85bd235549a3193c014f8fdb4cb493 darwin-arm64/dsh-deeppilot-tunnel
@@ -0,0 +1,20 @@
1
+ # dsh-deeppilot bundle layer.
2
+ # Phone clients cannot interact with a native picker rendered on the Host Mac.
3
+ # Replace dsh-web-app's adaptive picker with the official browse pair while
4
+ # this bundle is composed, so host.listDirectory is available remotely.
5
+ # Removing this bundle restores the lower web-app auto row unchanged.
6
+ - id: directory-picker
7
+ disabled: true
8
+
9
+ # The name must be the FULL scoped specifier as installed in the profile's
10
+ # node_modules, quoted so YAML does not treat it as a directive.
11
+ - insert:
12
+ - id: deeppilot-directory-picker-browse
13
+ name: "@deepseek-ai/dsh-host-directory-picker-browse"
14
+
15
+ - id: deeppilot-directory-picker-browse-client
16
+ name: "@deepseek-ai/dsh-client-ui-directory-picker-browse"
17
+
18
+ - id: deeppilot
19
+ name: "dsh-deeppilot"
20
+ config: {}