dsh-deeppilot 0.9.11 → 0.9.14

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,28 +1,34 @@
1
1
  # Compatibility
2
2
 
3
- This branch targets exactly **six DSH releases**: `0.2.0-rc.2`; the `alpha`
4
- channel releases `0.2.1-alpha.3`, `0.2.1-alpha.4`, and `0.2.1-alpha.5`; and the
5
- `next` channel releases `0.2.1-rc.2` and `0.2.1-rc.3`. The npm channels have
6
- moved since: `latest` now points at `0.2.1-rc.2`, promoted from `next`, and
7
- `next` at `0.2.1-rc.3`. All six are
8
- named in both `engines.dsh` and `peerDependencies`; no other version is accepted.
9
- DSH evaluates that declaration before composing a profile — on every start, not
10
- only on install — so a newly published DSH release deactivates this plugin until
11
- the list is widened deliberately. That is the intended trade: a plugin that
12
- cannot run on an unaudited host fails visibly instead of misbehaving quietly.
13
- The decision and the reversal it represents are recorded in
14
- [`docs/决策记录.md`](./docs/决策记录.md) (章节一), with the supporting audit in
3
+ This branch accepts DSH hosts inside the rolling compatibility range
4
+ `>=0.2.1-rc.5 <0.3.0-0`. The lower bound is the newest audited `rc` release at
5
+ decision time — npm `latest` and `next` both point at `0.2.1-rc.5` — and every
6
+ later `0.2.x` release is admitted without a per-release source audit, including
7
+ the `alpha` channel release `0.2.2-alpha.2` and later alphas, later rc releases,
8
+ and `0.2.x` GA. `0.3.0` and its prereleases stay refused until a fresh audit.
9
+ The bound is written `<0.3.0-0` because DSH evaluates the range with
10
+ `semver.satisfies(..., { includePrerelease: true })`, where `<0.3.0` would admit
11
+ `0.3.0-rc.1`. The range is named in both `engines.dsh` and `peerDependencies`; a
12
+ host outside it is refused. DSH evaluates that declaration before composing a
13
+ profile — on every start, not only on install.
14
+
15
+ This is a deliberate policy trade: a new DSH release inside the range activates
16
+ without waiting for a per-release audit, so a breaking change inside `0.2.x`
17
+ would surface at runtime instead of at the activation gate. The gate that
18
+ remains is the `0.3.0` boundary. The decision, its predecessor policies, and the
19
+ reversals are recorded in the maintainers' local decision record
20
+ `docs/adr/0001-dsh-compatibility-policy.md`, with the supporting audits in
15
21
  [`docs/DSH_RELEASE_MEMORY.md`](./docs/DSH_RELEASE_MEMORY.md).
16
22
 
17
- The development packages this branch builds and typechecks against stay pinned
18
- to the exact release-candidate baseline, currently `0.2.0-rc.2`; the audited
19
- `alpha` and `rc` hosts are covered by the isolated composes and live runs
20
- recorded in the release memory.
23
+ The development packages this branch builds and typechecks against are pinned to
24
+ the lower bound, currently `0.2.1-rc.5`; the audited host lines above it are
25
+ covered by the isolated composes and live runs recorded in the release memory.
21
26
 
22
27
  | Component | Current contract | Evidence |
23
28
  |---|---|---|
24
29
  | Node.js | 22 or newer | Package engine and CI |
25
- | DSH CLI and Host API | `engines.dsh` and `peerDependencies` both name `0.2.0-rc.2 \|\| 0.2.1-alpha.3 \|\| 0.2.1-alpha.4 \|\| 0.2.1-alpha.5 \|\| 0.2.1-rc.2 \|\| 0.2.1-rc.3` (dev pins `0.2.0-rc.2`) | Peer metadata, source typecheck, unit tests, bundle build, and config schema projection against a real 0.2.0-rc.2 CLI, plus isolated composes and live phone-protocol runs with the published 0.2.1-alpha.2, 0.2.1-alpha.3, and 0.2.1-alpha.4 CLIs, an isolated 0.2.1-alpha.5 host where this plugin now composes, starts, and answers `/phone/health` with 200 on its own LAN listener, a pre-widening 0.2.1-rc.2 host run where the unchanged declaration is refused at compose time, and an isolated 0.2.1-rc.3 host where the widened declaration composes, starts, and answers `/phone/health` with 200 (audits below) |
30
+ | DSH CLI and Host API | `engines.dsh` and `peerDependencies` both name the rolling range `>=0.2.1-rc.5 <0.3.0-0` (dev pins `0.2.1-rc.5`) | Peer metadata, source typecheck, unit tests, bundle build, and config schema projection against a real 0.2.1-rc.5 CLI, plus isolated composes and live phone-protocol runs across the audited hosts recorded below (0.2.1-alpha.2 through 0.2.2-alpha.2), a full-tree audit of 0.2.1-rc.5 against 0.2.1-rc.4, and an isolated rc.5 host that composes, starts, and answers `/phone/health` with 200 (`0.2.1-rc.5 audit outcome` below) |
31
+ | DSH history read | `SessionController.inspect` when the host has it, `SessionController.page` otherwise | DSH 0.2.2-alpha.2 removed `inspect`; the adapter branches on its presence and maps the host page's `{type:'event',event}` records onto the bridge's `{event}` contract, expressing the phone's exclusive `beforeSeq` as the inclusive `throughSeq` cut. Unit tests cover both branches (audits below) |
26
32
  | iOS bridge | DeepPilot protocol v2 | Bridge protocol tests; device behavior must be checked with the running Host and app |
27
33
  | Remote access | Tailscale Funnel on ports 443, 8443, or 10000 | Helper and supervisor tests |
28
34
  | Funnel helper platforms | macOS 13 Ventura or later, Linux, and Windows, each on amd64/arm64; built with Go 1.27, which dropped macOS 12 | CI starts the committed helper on a native runner for each of the six targets (`helper-smoke`); no runner covers macOS 13 itself |
@@ -41,6 +47,7 @@ recorded in the release memory.
41
47
  - The current app accepts the `deeppilot://pair` link and the JSON pairing payload. Bearer authentication, URL credentials, and first-frame shared tokens are rejected; devices register a P-256 public key and sign each WebSocket challenge.
42
48
  - The plugin's persisted device and Funnel state migration remains separate from DSH API version support. Session logs written by earlier DSH builds are readable only when the current Host's own history reader accepts them; this plugin does not rewrite those logs.
43
49
  - An unavailable optional OS facility, transport, or controller disables its dependent capability without crashing the Host.
50
+ - Binary frames (`welcome.capabilities.binaryFrames`) are a plugin-level option between this plugin and the phone and do not depend on the DSH Host. The phone opts in per request with `binary: true`; older apps never do and keep receiving base64 text frames byte-for-byte as before, and older plugins ignore the field. The Funnel helper is a standard reverse proxy and passes binary WebSocket frames through unchanged.
44
51
 
45
52
  ## Schedules ship with the Web composition
46
53
 
@@ -65,7 +72,23 @@ built. The bridge mounts on `sessionController` / `connection` /
65
72
  `typertGateway`, all of which become ready before the Schedule service finishes
66
73
  its own initialization, so a probe taken at that moment would report `false` for
67
74
  the bridge's whole lifetime. On a live host with the service mounted the bit is
68
- `true` and the schedule list/create/history/delete flow passes.
75
+ `true` and the schedule list/create/history/delete flow passes on audited hosts
76
+ up to `0.2.2-alpha.2`.
77
+
78
+ **Known limitation on `0.2.2-alpha.3`.** That release moved automation to
79
+ host-level task management and rewrote the `dsh-schedule` service: `update` and
80
+ `delete` no longer exist (`edit({ action })` replaces them), `list` returns a
81
+ page object instead of an array, `create` takes its request first, and the
82
+ request body carries `timing` / `target` instead of the selector fields. The
83
+ bridge now serves both contracts from one adapter chosen by service shape, not
84
+ by version string: the legacy per-session path is unchanged, and the host-level
85
+ path adds the optional `schedulesHost` capability with host-level frames
86
+ (list / view / create / edit / run / limits) while projecting the legacy frames
87
+ onto host-level tasks, so an older App keeps schedule list, create, edit and
88
+ delete on that host. The wire contract is documented under
89
+ [`PROTOCOL.md`](./PROTOCOL.md) "Schedule 宿主级任务扩展". The audit and the
90
+ decision are recorded in
91
+ [`docs/DSH_RELEASE_MEMORY.md`](./docs/DSH_RELEASE_MEMORY.md).
69
92
 
70
93
  ## Configuration migration
71
94
 
@@ -75,6 +98,138 @@ carries the old top-level `debug: true` is accepted but that value is ignored:
75
98
  verbose logging must be turned on again from the settings page. No other config
76
99
  field changed shape, and the old key is not read anywhere in this version.
77
100
 
101
+ ## 0.2.2-rc.1 audit outcome
102
+
103
+ - **Same code as `0.2.2-alpha.3`.** 330 shared packages, zero structural
104
+ manifest changes, and only four non-manifest files differ (a build-commit
105
+ constant and three client bundles' version strings). The evaluator is
106
+ byte-identical, so the alpha.3 findings, including the host-level schedule
107
+ adapter, apply unchanged.
108
+ - **Vendor peers.** The host vendors `cordis 4.1.0` and `schemastery 3.19.0`,
109
+ the alpha.3 code renumbered as releases. The ranges append `~4.1.0` and
110
+ `~3.19.0`; earlier clauses stay because earlier hosts still vendor them. DSH's
111
+ evaluator ignores both peers; only npm's install-time resolution reads them.
112
+ - **Activation and boot.** The real rc.1 evaluator admits `0.9.14` and refuses
113
+ the published `0.9.13`. An isolated rc.1 host composes and starts the plugin,
114
+ and `/phone/health` answers 200 with `protocolVersion` 2.
115
+
116
+ ## 0.2.1-rc.5 audit outcome
117
+
118
+ The artifact-level audit of `dsh-v0.2.1-rc.5` (published to the npm registry
119
+ 2026-10-29T14:15:23Z; GitHub Release 2026-10-30T02:12:26Z, whose notes mention
120
+ only improved thinking-content display) against `dsh-v0.2.1-rc.4` found **no
121
+ runtime break**. The tree stays at 307 packages.
122
+
123
+ - **Whole-tree comparison.** 42,731 shared files: 42,421 byte-identical and 310
124
+ differing — 296 `package.json` files plus 14 non-manifest files in 7 packages;
125
+ one further file is new in rc.5 only
126
+ (`dsh-client-ui-chat/lib/types/client/reasoning-text.d.ts`, 363 B). `cordis`
127
+ and `schemastery` are byte-identical including their manifests, and the rc.4
128
+ tree fingerprint reproduced the previous audit's value, so both rounds compared
129
+ the same baseline.
130
+ - **No contract change.** All 307 manifests have zero `structural` changes (the
131
+ comparison covers the full 11,099-leaf union); the 3,706 dependency-spec
132
+ changes are mechanical `0.2.1-rc.4 → 0.2.1-rc.5` replacements. The evaluator
133
+ `dsh-app-boot/lib/index.js` is byte-identical to rc.4 (sha256 `5135179a…`), so
134
+ the activation gate behaves exactly as before.
135
+ - **The 15 non-manifest files (14 changed, 1 added) are outside this plugin's
136
+ surface.** `dsh-client-ui-chat` reworks the host's internal
137
+ `conversation.chat.reasoning.body` Slot (owner props gain `rawText`, and
138
+ reasoning text is stripped of its `<signature>` wrapper before display) plus
139
+ its types and three READMEs; `dsh-cordis-client-runner` updates the embedded
140
+ Slot registry metadata; `dsh-experimental-client-ui-cot-translation` changes
141
+ only JSDoc/type comments; `dsh-client-modules` changes a build-commit
142
+ constant; three settings/sidebar client bundles change only version strings
143
+ (same byte size). None of these packages is in the declaration surface (10
144
+ peers, 4 client injects, vendored cordis/schemastery) or the plugin call
145
+ surface, and a machine check over the 7 packages reports
146
+ `allOutsideDeclarationSurface`.
147
+ - **Patch anchor unchanged.** `dsh-web-app/cordis.patch.yml` is byte-identical to
148
+ rc.4 (same 595 lines / 117 entries / sha256 `cdceb423…`), so the
149
+ `id: directory-picker` block this plugin disables is untouched.
150
+ - **Export and client faces unchanged.** All 3,271 `lib/` modules and 681 entry
151
+ modules have identical export surfaces; the four client-injected packages are
152
+ byte-identical.
153
+ - **Activation matrix.** The previous closed list rejected `0.2.1-rc.5`; the
154
+ rolling range admits it together with `0.2.2-alpha.2`, `0.2.1`, later rc and
155
+ alpha releases and `0.2.x` GA. Twelve candidates are newly admitted and
156
+ exactly the seven former list members are newly refused; `0.3.0-rc.1`,
157
+ `0.3.0`, `0.3.0-0`, and `1.0.0` stay refused. Every verdict matched an
158
+ independent semver calculation. The range also admits unaudited
159
+ `0.2.2`/`0.2.3` prereleases by construction (`0.2.2-alpha.1`,
160
+ `0.2.2-alpha.2.1`, `0.2.2-ALPHA.2`, `0.2.2-0`); this is the accepted cost of a
161
+ rolling range, not an evaluator quirk.
162
+ - **Live load.** In an isolated `DSH_HOME` the rc.5 host composes the plugin
163
+ (`--dump-config` exit 0, no skip line), starts it, and the plugin's own LAN
164
+ listener answers `/phone/health` with 200; the isolated home receives
165
+ `deeppilot/host-id` and `deeppilot/lan-tls/`.
166
+ - **Vendor peers.** rc.5 still vendors `cordis 4.0.5` and `schemastery 3.18.5`,
167
+ both already inside the declared ranges, so no vendor clause changed.
168
+ - **Known boundary.** `dsh-client-ui-slots` has no artifact in either tree (same
169
+ as the rc.4 round), so it was not byte-compared; `react` was not compared; the
170
+ npm install-time resolution was not run.
171
+ - **Evidence.** `.rc5-verify/AUDIT.md`, `.rc5-verify/HOST-BOOT.md`, and the JSON
172
+ logs beside them.
173
+
174
+ ## 0.2.2-alpha.2 audit outcome
175
+
176
+ The artifact-level audit of `dsh-v0.2.2-alpha.2` (published to the npm registry
177
+ 2026-10-28T02:50:54Z, the `alpha` channel release; `latest` is still
178
+ `0.2.1-rc.2` and `next` moved to `0.2.1-rc.4`) against `dsh-v0.2.1-rc.3` found
179
+ **one break, confined to the history read**. The tree grows 307 → 332 packages.
180
+
181
+ - **The break.** `@deepseek-ai/dsh-api-session-controller` removed
182
+ `SessionController.inspect(sessionId, signal?)` — absent from both
183
+ `lib/types/index.d.ts` and the runtime `lib/index.js`. `sessions.history`
184
+ called it to read a whole log, so on this host the phone's history pagination
185
+ threw `TypeError`, while pairing, listing, prompting, the settings page, and
186
+ the plugin page kept working. The phone protocol itself is unchanged: the
187
+ `HistoryResult` shape is identical, only the host-side source moved.
188
+ - **The fix, one file.** `src/dsh-api-proxy.ts` now treats `inspect` as optional
189
+ and falls back to `SessionController.page`. The branch keys off `inspect`, not
190
+ off `page`: `page` exists on all eight admitted hosts, but its
191
+ `SessionPageRequest.throughSeq` is mandatory and validated on the seven older
192
+ ones, and this adapter has no log cursor to pass. On the `page` path the
193
+ phone's exclusive `beforeSeq` travels as the inclusive `throughSeq`, and the
194
+ host's `{type:'event',event}` records are unwrapped to the bridge's `{event}`.
195
+ - **Nothing else reaches this plugin.** 24 packages and 358 modules were
196
+ compared; 20 modules changed export surfaces, but only two at entry level
197
+ (`dsh-api-session-controller` dropping `buildModelCatalog`, `dsh-app-boot`
198
+ dropping five bundle-list constants and adding three platform helpers), and a
199
+ repo-wide grep shows the plugin uses none of them. The three packages the
200
+ plugin actually imports (`cordis`, `dsh-typert-protocol`, `schemastery`) have
201
+ unchanged export surfaces.
202
+ - **Patch anchor still valid.** The upstream `dsh-web-app/cordis.patch.yml`
203
+ gained and lost three ids, and the block this plugin disables
204
+ (`directory-picker`) moved from line 113 to 105 and byte 4664 to 4309, but the
205
+ block itself is byte-identical and the shared id order is unchanged; both
206
+ hosts' `loadOverlayPatches` resolve this plugin's patch to the same fields.
207
+ - **Vendor peers.** This host vendors `cordis 4.0.6-alpha.1` and
208
+ `schemastery 3.18.6-alpha.1`, which the previous ranges did not admit under
209
+ npm's default prerelease rule. The ranges now append `~4.0.6-alpha.1` and
210
+ `~3.18.6-alpha.1` rather than replacing the GA clauses, because every earlier
211
+ admitted host still vendors `4.0.5` / `3.18.5`. DSH's compatibility evaluator
212
+ ignores both peers; only npm's install-time resolution reads them.
213
+ - **Activation.** Before the widening this host refused the plugin with a single
214
+ `engines.dsh` requirement and skipped the whole bundle; after it the matrix
215
+ accepts exactly `0.2.2-alpha.2` with no new rejection, while `0.2.2-alpha.1`,
216
+ `0.2.2-alpha.3`, `0.2.2`, `0.2.2-rc.1`, `0.2.1`, and `0.3.0` stay refused.
217
+ - **One install-side prerequisite.** This host's `dsh` package raised
218
+ `engines.node` to `>= 24.9.0`; the plugin's own `engines.node` stays `>=22`.
219
+
220
+ ## 0.2.1-rc.4 audit outcome
221
+
222
+ The artifact-level audit of `dsh-v0.2.1-rc.4` (published 2026-10-28T02:49:58Z,
223
+ the `next` channel release) against `dsh-v0.2.1-rc.3` found **no change that
224
+ reaches this plugin**: 307 packages on both sides, 42,415 of 42,731 shared files
225
+ byte-identical, and 316 differing paths made of 296 `package.json` files plus 20
226
+ files in eight packages (MCP capability gating, one log call moved to stderr, one
227
+ View tooltip, four version strings, and documentation) — none of them in this
228
+ plugin's declaration or call surface. Export surfaces are unchanged across 3,271
229
+ modules, the evaluator is the same file as rc.3, and the patch anchor file is
230
+ byte-identical. The declaration admits exactly `0.2.1-rc.4` more and nothing
231
+ else.
232
+
78
233
  ## 0.2.1-rc.3 audit outcome
79
234
 
80
235
  The artifact-level audit of `dsh-v0.2.1-rc.3` (published to the npm registry
@@ -342,7 +497,7 @@ needs a documentation update, not a peer-range widening.
342
497
 
343
498
  > **Superseded 2026-10-14.** That open-ended range was narrowed back to the two
344
499
  > versions actually audited, `0.2.0-rc.2` and `0.2.1-alpha.3`; see the
345
- > 0.2.1-alpha.3 outcome above and `docs/决策记录.md` (章节一). The paragraphs in
500
+ > 0.2.1-alpha.3 outcome above and `docs/adr/0001-dsh-compatibility-policy.md`. The paragraphs in
346
501
  > this historical entry describe the policy as it stood on 2026-09-29.
347
502
  > **This note is in turn superseded:** `0.2.1-alpha.4` was added the next day by
348
503
  > the same deliberate audit step, `0.2.1-alpha.5` on 2026-10-16, and
package/README.md CHANGED
@@ -19,6 +19,13 @@ Host on your own computer and does not replace or modify the DSH Web UI.
19
19
  ## What you get
20
20
 
21
21
  - Browse projects, sessions, history, and live agent output from iPhone.
22
+ - Stream assistant text and reasoning while viewing a session; reconnects recover
23
+ the durable history rather than treating partial output as a completed answer.
24
+ - Export a full ZIP log archive, or share the conversation body as Markdown when
25
+ the Host provides that optional route.
26
+ - Check plugin updates from the app and install an explicitly confirmed compatible
27
+ version. The Host handles hot replacement and rollback; without hot reload the
28
+ app reports that a DSH restart is required.
22
29
  - Send prompts, switch models, create sessions, and answer approvals/questions.
23
30
  - Pair with a five-minute single-use code and a per-device P-256 key; physical
24
31
  iPhones keep the private key in Secure Enclave.
@@ -32,24 +39,24 @@ Host on your own computer and does not replace or modify the DSH Web UI.
32
39
 
33
40
  ## Install from npm
34
41
 
35
- This source checkout targets Node.js 22+ and the six DSH releases it has been
36
- audited against — `0.2.0-rc.2`, the `alpha` channel releases `0.2.1-alpha.3`,
37
- `0.2.1-alpha.4`, and `0.2.1-alpha.5`, and the two `next` channel releases it has
38
- admitted in turn, `0.2.1-rc.2` and `0.2.1-rc.3` — with a `web` profile. (The
39
- npm channels move: `latest` now points at `0.2.1-rc.2`, which was promoted
40
- from `next`, and `next` at `0.2.1-rc.3`.) DSH checks a plugin's declared
41
- requirements before composing a profile, on every start rather than only on
42
- install, so any other host version refuses to activate this plugin. From DSH
43
- `0.2.1-alpha.4` on, that check reads `engines.dsh` and ignores
44
- `peerDependencies`; older hosts know only the peer range, so both name the same
45
- six releases. The package includes Funnel helpers
46
- for macOS, Linux, and Windows on amd64/arm64; trusted-LAN mode does not require
47
- the helper. The helper is built with Go 1.27, which requires **macOS 13 Ventura
48
- or later**: on macOS 12 and earlier, Funnel mode cannot start, while
49
- trusted-LAN mode keeps working.
50
-
51
- The current working tree names exactly those six versions in `engines.dsh` and
52
- `peerDependencies` and is built/typechecked against `0.2.0-rc.2`. A previously
42
+ This source checkout targets Node.js 22+ and DSH hosts inside the rolling
43
+ compatibility range `>=0.2.1-rc.5 <0.3.0-0` with a `web` profile. The lower
44
+ bound is the newest audited `rc` release at decision time — npm `latest` and
45
+ `next` both point at `0.2.1-rc.5` — and every later `0.2.x` release is admitted
46
+ automatically, including the `alpha` channel release `0.2.2-alpha.2` and later
47
+ alphas, later rc releases, and `0.2.x` GA. `0.3.0` and its prereleases stay
48
+ refused until a fresh audit. DSH checks a plugin's declared requirements before
49
+ composing a profile, on every start rather than only on install, so a host
50
+ outside the range refuses to activate this plugin. From DSH `0.2.1-alpha.4` on,
51
+ that check reads `engines.dsh` and ignores `peerDependencies`; older hosts know
52
+ only the peer range, so both declare the identical range. The package includes
53
+ Funnel helpers for macOS, Linux, and Windows on amd64/arm64; trusted-LAN mode
54
+ does not require the helper. The helper is built with Go 1.27, which requires
55
+ **macOS 13 Ventura or later**: on macOS 12 and earlier, Funnel mode cannot
56
+ start, while trusted-LAN mode keeps working.
57
+
58
+ The current working tree declares that range in `engines.dsh` and
59
+ `peerDependencies` and is built/typechecked against `0.2.1-rc.5`. A previously
53
60
  published plugin package may still carry its own older compatibility
54
61
  declaration until a release is made from this tree.
55
62
 
package/README.zh-CN.md CHANGED
@@ -18,6 +18,10 @@
18
18
  ## 功能
19
19
 
20
20
  - 在 iPhone 查看项目、会话、历史记录和 Agent 实时输出;
21
+ - 打开会话时实时显示助手正文与思考,断线后以正式历史恢复,不把半截输出当成完整答复;
22
+ - 导出完整 ZIP 日志归档;宿主提供相应能力时,也可分享 Markdown 对话正文;
23
+ - 在 App 检查插件更新,明确确认后安装兼容版本。宿主负责热替换和失败回滚;
24
+ 未启用热重载时,App 明确提示需要重启 DSH;
21
25
  - 发送提示词、切换模型、创建会话,并处理审批与提问;
22
26
  - 使用 5 分钟有效的单次配对码与设备级 P-256 密钥;iPhone 真机私钥保存在
23
27
  Secure Enclave;
@@ -30,22 +34,22 @@
30
34
 
31
35
  ## 从 npm 安装
32
36
 
33
- 当前源码面向 Node.js 22+ 与带 `web` profile 的**六个已审计 DSH 版本**:
34
- `0.2.0-rc.2`、`alpha` 通道的 `0.2.1-alpha.3`、
35
- `0.2.1-alpha.4` 与 `0.2.1-alpha.5`,以及先后两版 `next` 通道的
36
- `0.2.1-rc.2` 与 `0.2.1-rc.3`(npm 通道会移动:`latest` 现指向由 `next` 转正的
37
- `0.2.1-rc.2`,`next` 指向 `0.2.1-rc.3`)。
38
- DSH 在组合 profile 前会校验插件声明的
39
- 兼容要求,且**每次启动都会校验**(不只是安装时),因此其他宿主版本会拒绝
40
- 激活本插件。从 DSH `0.2.1-alpha.4` 起,该校验只读 `engines.dsh` 并忽略
41
- `peerDependencies`;更早的宿主只认 peer 范围,因此两处列出同一组六个版本。
42
- npm 包内置 macOS、Linux、Windows 的 amd64/arm64 Funnel helper;可信局域网
43
- 模式不依赖 helper。helper 用 Go 1.27 编译,要求 **macOS 13 Ventura 或更高版本**:
44
- macOS 12 及更早版本无法启动 Funnel 模式,可信局域网模式不受影响。
45
-
46
- 当前工作树的 `engines.dsh` 与 `peerDependencies` 精确列出这六个版本,构建与
47
- 类型检查针对 `0.2.0-rc.2`。从此工作树发布新版本前,已发布的旧插件包仍可能
48
- 带有各自旧的兼容声明。
37
+ 当前源码面向 Node.js 22+ 与**滚动兼容区间** `>=0.2.1-rc.5 <0.3.0-0` 内的
38
+ DSH 宿主(带 `web` profile)。下界是决策时最新的已审计 `rc` 版本(npm
39
+ `latest` 与 `next` 均指向 `0.2.1-rc.5`);其后的所有 `0.2.x` 版本自动放行,
40
+ 包括 `alpha` 通道的 `0.2.2-alpha.2` 及之后的 alpha、之后的 rc 与 `0.2.x`
41
+ 正式版。`0.3.0` 及其预发布仍需重新审计,由上界 `<0.3.0-0` 拦下。
42
+ DSH 在组合 profile 前会校验插件声明的兼容要求,且**每次启动都会校验**(不只是
43
+ 安装时),因此区间外的宿主会拒绝激活本插件。从 DSH `0.2.1-alpha.4` 起,该校验
44
+ 只读 `engines.dsh` 并忽略 `peerDependencies`;更早的宿主只认 peer 范围,因此
45
+ 两处声明同一区间。npm 包内置 macOS、Linux、Windows 的 amd64/arm64 Funnel
46
+ helper;可信局域网模式不依赖 helper。helper 用 Go 1.27 编译,要求 **macOS 13
47
+ Ventura 或更高版本**:macOS 12 及更早版本无法启动 Funnel 模式,可信局域网模式
48
+ 不受影响。
49
+
50
+ 当前工作树的 `engines.dsh` 与 `peerDependencies` 声明该区间,构建与类型检查
51
+ 针对 `0.2.1-rc.5`。从此工作树发布新版本前,已发布的旧插件包仍可能带有各自旧的
52
+ 兼容声明。
49
53
 
50
54
  ```sh
51
55
  dsh plugin --profile web add dsh-deeppilot
package/bin/SHA256SUMS CHANGED
@@ -1,6 +1,6 @@
1
- 0e49860ffd7b6fd9ba5918481cbfa2fc0a788f0c16d500de69a162d31451d526 ./darwin-amd64/dsh-deeppilot-tunnel
2
- 16e0b6235cb097401dc52840f11c0dcf405925d23449934cdfea93ec89c071e9 ./darwin-arm64/dsh-deeppilot-tunnel
3
- ed3d60db2da2f3c17a5f7d04834faf4623a955ecc48a3aa0497c3903df8a2bce ./linux-amd64/dsh-deeppilot-tunnel
4
- b5e85cd9f9f928f4204cfc15067588d1c3dcdc683a5f5b85759d5454bce2110e ./linux-arm64/dsh-deeppilot-tunnel
5
- 836126376d0da12abc6bafb3ed163138436f812b201bd254eb1c7cae3f8a34c7 ./windows-amd64/dsh-deeppilot-tunnel.exe
6
- 6b74d0f4b73f9f53b01829a84abd178c17a64950c1e9949b8fae15ef274fb99f ./windows-arm64/dsh-deeppilot-tunnel.exe
1
+ c79c889415f6fce13a2d0f19c94e2ceb5cbfc06ec5c841c1002092783663a6a6 ./darwin-amd64/dsh-deeppilot-tunnel
2
+ affe9151e5356b574e1a85c806b198c39b5804f3a305b655cd3eb03c628ae0cc ./darwin-arm64/dsh-deeppilot-tunnel
3
+ a2475a2844250a6ef03853fe64db63eb1a163d9fcd7f3f438f3ec7a142d3a044 ./linux-amd64/dsh-deeppilot-tunnel
4
+ 6241de8d3c67e6e2af98e6b6040a10d9352183f893d3aed82c879a76c8b79432 ./linux-arm64/dsh-deeppilot-tunnel
5
+ 9449d3c48cc11446cd0f35c030f28000b5934512512fc1d7eeaa769d8d8304f3 ./windows-amd64/dsh-deeppilot-tunnel.exe
6
+ fd0c912b5b39ba8bd385cb05c39665d89519c75b6f5ddbc506b7554926f6545f ./windows-arm64/dsh-deeppilot-tunnel.exe
@@ -0,0 +1,78 @@
1
+ # DSH 0.2.2 能力接入
2
+
3
+ 本轮在既有协议 v2 上增加三个可选能力。正式 wire 契约以 [PROTOCOL.md](../PROTOCOL.md) 为准;[TypeScript 镜像](../src/protocol.ts) 与私有 App 的 Swift 镜像同步。能力缺失时保留原有行为,不要求重新配对。DSH 版本兼容性审计另见 [发布记忆](./DSH_RELEASE_MEMORY.md)。
4
+
5
+ ## 实际接口与阅读范围
6
+
7
+ 已扫描此次发布的能力清单,精读下列实际调用面。其余新 Web 插件、推荐、共享与工作树模块未接入,也不作为本次兼容性声明依据。
8
+
9
+ | 上游接口 | 方法或来源 | 本次阅读 | 桥接用途 |
10
+ |---|---|---|---|
11
+ | `/api/session.markdown` | GET,经 `connection.createSharedFetchHandler('/api')` 的 owner 调用 | 已读路由注册、处理器和依赖 | 复用现有导出分块,返回正文 `.md` |
12
+ | `/api/session.export` | GET,`includeDescendants=true` | 已读 | 缺省 ZIP 原 URL、分块及回执保持不变 |
13
+ | `connection.fetchRoutes` / `sessionQuery.readSession` | 已注册路由及非激活读取 | 已读 | 真正有 Markdown 路由和读取依赖时才声明能力 |
14
+ | `agent/assistant-stream` | `{agent,frame}`;start / chunk / end | 已读类型与实际发射次序 | 生成独立、无重放序号的 `s2c.session.delta` |
15
+ | `session/event` | 持久事件先于 committed stream end | 已读 | final 前发出窗口尾部,以 `streamId` 替换临时输出 |
16
+ | `typert.getPackage` | 公开 host face 类型反射 | 已读 | 识别 `SessionAssistantStreamFrame`;缺反射只降级流能力 |
17
+ | `pluginManager.listVersions` / `registries` | 公开版本目录及软件源配置 | 已读 | 显示候选版本,读取精确协议声明,确定实际候选源 |
18
+ | `pluginManager.updateBundle` / `listBundles` | 精确版本更新、实际安装清单 | 已读 | 由宿主完成 HMR 替换和失败回滚,再核对安装与运行版本 |
19
+ | `plugin-manager/registry.registryPlan` | 公开软件源选择规则 | 已读并建立对照测试 | 预检宿主可能回退到的全部来源,禁止不同协议或完整性摘要绕过闸门 |
20
+ | `locale/<lang>.json` 的 `meta.detail` | 插件管理页按语言链读取详情文档,缺省退回包根 README | 已读 `dsh-plugin-detail` 选择规则 | 英文 `README.md`、中文 `README.zh-CN.md` |
21
+ | `settings.section.icon` 插槽 | 设置壳按 `settings.section` 同 id 渲染,`{size, active}` | 已读壳渲染与插槽声明 | 导航行显示单色线性手机图标;旧宿主不声明该插槽,保留默认图标 |
22
+ | npm 精确版本 manifest | GET `{registry}/dsh-deeppilot/{version}` | 已读并限制响应大小及超时 | 核对包名、精确版本、bundle、`deepPilot.protocolVersion` 与强 SRI |
23
+ | 其他新模块 | 新增包及发布清单 | 仅盘点 | 未接入,不引入额外产品行为 |
24
+
25
+ ## 差异对照
26
+
27
+ | 类别 | 本轮范围内的状态 |
28
+ |---|---|
29
+ | 双方都有 | ZIP/Markdown 导出、瞬时流生命周期与正式事件关联、明确确认的更新及状态查询、兼容性闸门、宿主 HMR/回滚、断线后日志对账、插件详情页多语言文档、设置导航图标 |
30
+ | 上游有、我方未接 | Web 引用交互及其他 Web 专属入口(自动化任务批量清理已由下文 `deleteEnded` 接入);本轮未扩展手机对应功能 |
31
+ | 我方有、上游没有 | 手机专用分块传输、独立瞬时 wire 帧、设备隔离的持久更新日志、App 协议版本闸门 |
32
+ | 双方都没有 | 不支持的宿主上强制重启进程、手机静默安装、替用户发布 npm/GitHub 版本 |
33
+
34
+ ## 关键默认值与边界
35
+
36
+ - 导出缺省仍是 ZIP。Markdown 需要 `sessionMarkdown`,不会把旧桥接忽略 `format` 后返回的 ZIP 当作正文。Markdown 不含思考过程、系统指令及注入上下文。
37
+ - 流能力使用 `assistantStream`。50 ms 窗口只合并相邻同类文字,正文与推理保持到达顺序;容量满时提前发出。瞬时帧不占重放序号、不进入 APNs 或持久缓存;断线、弃置尝试及取消均丢弃未完成临时输出。
38
+ - 自更新使用 `pluginUpdate`;check 需要 `sessions.read`,apply 需要 `sessions.manage`,widget 均不可使用。查询不会安装,安装只由手机确认触发,不随断线取消或自动重试。
39
+ - 候选来源使用宿主真正的回退规则。所有可达源的精确目标必须具有相同协议和强完整性摘要;不可核验或不一致时拒绝受理。不会修改用户全局软件源配置。
40
+ - 更新接受回执在目标校验和日志耐久写入后发送。最近结果保留供重连对账;同请求编号不能更换目标,也不能重复安装。日志不保存凭据或会话内容,设备归属仅保存摘要并只向所属设备返回。
41
+ - “恢复”指 HMR 后重连并恢复当前会话。宿主无 HMR 时返回 `restart-required`;不会强杀宿主,不能声称已经自动重启。安装失败由宿主恢复旧版本,桥接只核验并呈现结果。
42
+
43
+ ## 宿主级计划任务(DSH 0.2.2-alpha.3)
44
+
45
+ `0.2.2-alpha.3` 把自动化任务改为宿主级模型(任务带 `target`,状态有
46
+ `active` / `paused` / `ended`),并重写了 `dsh-schedule` 服务面。插件按**服务形状**
47
+ (有 `edit`、无 `update`)选择适配器,不看版本号字符串;旧宿主逐字节保持原行为。
48
+ wire 契约见 [PROTOCOL.md](../PROTOCOL.md) 「Schedule 宿主级任务扩展」。
49
+
50
+ | 上游接口 | 本次阅读 | 桥接用途 |
51
+ |---|---|---|
52
+ | `schedule.list({active?,limit?,offset?})` | 分页对象 `{items,shown,total,limit,offset}` | 新帧 `c2s.schedule.host.list`;旧帧全量分页后过滤目标会话 |
53
+ | `schedule.view({id})` | 任务或 miss | `c2s.schedule.host.view` |
54
+ | `schedule.create(request, actorSessionId?, signal)` | `timing` + `target` 请求体 | `c2s.schedule.host.create`;旧帧把选择器转 `timing` + `target:{kind:"session"}` |
55
+ | `schedule.edit({id, action, patch?, expectedUpdatedAt?}, …)` | update/delete 合一 | `c2s.schedule.host.edit`;旧帧 update 用 `expected` 逐字段比较后转 `patch` |
56
+ | `schedule.run({id})` | 手动执行,执行中返回 `schedule_execution_pending` | `c2s.schedule.host.run`(E_BUSY 提示稍后) |
57
+ | `schedule.history({id,limit,before?})` | 与旧结构相同,不再校验会话归属 | 两种模型共用 `c2s.schedule.history`;宿主级忽略 `sessionId` |
58
+ | `schedule.deliveryLimits()` | `{newSessionIntervalSeconds}` | `c2s.schedule.host.limits` 只做展示,不自行节流 |
59
+ | `schedule.deleteInactive()` | `{deleted}`;alpha.3 删 `status="ended"`(alpha.2 判 `inactive`) | `c2s.schedule.host.deleteEnded`,回执 `deletedEnded`;手机端二次确认后才发 |
60
+ | 旧 `delete` / `update` / 按会话的 `list` | 仅在会话级宿主存在 | 旧帧原路径;宿主级宿主上由适配层映射 |
61
+
62
+ 差异对照补充:
63
+
64
+ | 类别 | 状态 |
65
+ |---|---|
66
+ | 双方都有 | 列表、创建、编辑、删除、清理已结束任务、投递历史、变更事件 |
67
+ | 上游有、我方未接 | `catalog`(不分页全量)——手机会话内入口改用分页列表连续翻页取全量,不需要单独的帧 |
68
+ | 我方有、上游没有 | 旧 App 的会话级视图(由宿主级任务反向投影)、按会话过滤的列表 |
69
+ | 双方都没有 | 任务执行结果回执、跨设备编辑锁(只用 `expectedUpdatedAt` 乐观冲突) |
70
+
71
+ 边界:旧视图过滤 `target.kind="session"` 且同会话、丢弃 `ended`、跳过 `rrule`(旧枚举无
72
+ 对应 kind,避免旧 App 整页解码失败);旧 `update` 的冲突保护是「`expected` 与当前任务
73
+ 逐字段比较」的尽力而为,旧视图没有 `updatedAt`;新帧用 `expectedUpdatedAt` 做真正的
74
+ 乐观冲突检测。`run` 按 `clientRequestId` 幂等,结果未知时客户端不得自动重试。
75
+
76
+ ## 验证入口
77
+
78
+ 插件用例:`tests/markdown-export.test.ts`、`tests/assistant-stream.test.ts`、`tests/plugin-update.test.ts`、`tests/schedule.test.ts`(双形态适配与七个新帧),以及 wire 注册表、历史适配和命令回归。iOS 测试及实机边界见私有项目的对接说明。真机、实际 npm 安装和 Funnel 验证不得由模拟或语法检查替代。