dsh-remote-vs 0.29.0 → 0.31.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 (58) hide show
  1. package/README.en.md +53 -20
  2. package/README.md +41 -19
  3. package/THIRD-PARTY-NOTICES.md +6 -6
  4. package/cordis.patch.yml +31 -76
  5. package/lib/client.js +319 -91
  6. package/lib/index.js +845 -129
  7. package/lib/p2-router-fs.js +15 -1
  8. package/lib/types/changes/recorder.d.ts +65 -10
  9. package/lib/types/changes/status.d.ts +48 -3
  10. package/lib/types/client/ConnectionsSection.d.ts +73 -0
  11. package/lib/types/client/WorkspacesView.d.ts +2 -0
  12. package/lib/types/client/api.d.ts +41 -2
  13. package/lib/types/client/composer.d.ts +8 -1
  14. package/lib/types/client/scm/actions.d.ts +25 -1
  15. package/lib/types/client/selection-popup.d.ts +1 -1
  16. package/lib/types/client/ui.d.ts +7 -4
  17. package/lib/types/p2/helper-rpc.d.ts +48 -0
  18. package/lib/types/p2/router-fs.d.ts +9 -1
  19. package/lib/types/p2/worlds.d.ts +51 -0
  20. package/lib/types/pool.d.ts +245 -10
  21. package/lib/types/protocol.d.ts +96 -0
  22. package/lib/{worlds-RG8K5eom.js → worlds-BdxLeKul.js} +134 -7
  23. package/package.json +46 -46
  24. package/src/changes/recorder.ts +151 -15
  25. package/src/changes/status.ts +59 -4
  26. package/src/client/ConnectionsSection.tsx +359 -0
  27. package/src/client/DirectoryFlow.tsx +8 -0
  28. package/src/client/EditorPane.tsx +5 -1
  29. package/src/client/HostsView.tsx +2 -0
  30. package/src/client/MonitorView.tsx +14 -0
  31. package/src/client/RemoteExplorer.tsx +11 -2
  32. package/src/client/RemoteRoot.tsx +1 -0
  33. package/src/client/SettingsHosts.tsx +1 -0
  34. package/src/client/WorkspaceWizard.tsx +1 -0
  35. package/src/client/WorkspacesView.tsx +21 -1
  36. package/src/client/api.ts +72 -4
  37. package/src/client/composer.ts +8 -1
  38. package/src/client/i18n.ts +50 -2
  39. package/src/client/scm/DiffView.tsx +5 -2
  40. package/src/client/scm/actions.ts +63 -12
  41. package/src/client/selection-popup.ts +1 -1
  42. package/src/client/ui.tsx +9 -7
  43. package/src/client/vsc/vsc.css +231 -3
  44. package/src/index.ts +31 -0
  45. package/src/p2/helper-rpc.ts +73 -5
  46. package/src/p2/router-fs.ts +29 -1
  47. package/src/p2/worlds.ts +116 -1
  48. package/src/pool.ts +736 -111
  49. package/src/protocol.ts +100 -0
  50. package/src/routes.ts +85 -13
  51. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.3-alpha.3-linux-x64.helper.json +20 -0
  52. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.3-alpha.3-linux-x64.tar.gz +4 -0
  53. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.3-alpha.3-linux-x64.tar.gz.sha256 +1 -0
  54. package/vendor/dsh-remote-helpers/pkg-sea-bare-import.patch +30 -0
  55. package/vendor/dsh-remote-helpers/ssh-helper-runtime-deps.patch +4 -3
  56. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.helper.json +0 -19
  57. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz +0 -4
  58. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz.sha256 +0 -1
package/README.en.md CHANGED
@@ -37,13 +37,27 @@ dsh plugin --profile web add dsh-remote-vs
37
37
  (From npm, recommended; installing straight from the repository also works:
38
38
  `dsh plugin --profile web add github:xiray-xia/dsh-remote-vs`.)
39
39
 
40
- **Requires DSH `0.2.2-rc.5` or newer and below `0.3.0`** (`engines.dsh` enforces the range;
41
- **adapted to and typechecked against `0.2.2-rc.5`**). On Host `0.2.2-rc.4` use plugin `0.23.0`; `0.2.2-rc.2` / `0.2.2-rc.3` use plugin `0.22.0`; on `0.2.2-alpha.3` / `0.2.2-rc.1` use `0.20.1`; the
40
+ **Requires DSH `0.2.3-alpha.3` or newer and below `0.3.0`** (`engines.dsh` enforces the range;
41
+ **adapted to and typechecked against `0.2.3-alpha.3`**). Note that the alpha.3 Host itself requires
42
+ **Node `^24.22.3 || >=26.13.1`** — upgrade Node before DSH when Node is older. On Host `0.2.2-rc.5`
43
+ use plugin `0.30.0`; on `0.2.2-rc.4` use plugin `0.23.0`; `0.2.2-rc.2` / `0.2.2-rc.3` use plugin `0.22.0`; on `0.2.2-alpha.3` / `0.2.2-rc.1` use `0.20.1`; the
42
44
  `0.2.2-alpha.2` generation needs `0.17.0`. `--profile web` selects which profile to install, so it has to go into the profile your Web GUI runs from (`web` is
43
45
  the common name; use your own profile's name). Desktop uses the reserved `desktop`
44
46
  profile instead — see [Desktop](#desktop-dsh-desktop) below.
45
47
 
46
- > **Upgrading from `0.22.0` (or older)**: the remote helper's wire protocol moves from **2 to 3** (`0.23.0` onward keeps the helper stable, and `0.23.0 → 0.24.0` re-pushes nothing).
48
+ > **Upgrading from `0.30.0` (DSH `0.2.2-rc.5`) to this release**: the alpha.3 helper moves from
49
+ > **G2 to G3** (adds `fs.writeBytes`, up to 8 MiB per call) while the **wire protocol stays 3**.
50
+ > So:
51
+ > - an existing host's old helper shares the plugin's protocol and is **not re-pushed
52
+ > automatically** (the upgrade self-heal only recognises a protocol difference);
53
+ > - press **Deploy** once per host under Settings → Remote Hosts (or create a remote workspace,
54
+ > whose wizard pushes automatically) to move to G3; each host pays one ~47 MB upload, and the
55
+ > old version directory is kept remotely for rollback;
56
+ > - not pushing still works: browsing/editing/terminal and text + patch/delete/move are
57
+ > unaffected, and only capabilities backed by `fs.writeBytes` (e.g. the experimental IM
58
+ > plugin staging a file attachment as bytes into a remote workspace) fail.
59
+ >
60
+ > **Upgrading from `0.22.0` (or older)**: the remote helper's wire protocol moves from **2 to 3** (`0.23.0` through `0.30.0` re-push nothing; `0.31.0` moves to G3, see above).
47
61
  > Existing host records are recognised as an older generation and the new helper is pushed
48
62
  > automatically on the first connection (this needs the old build to still be in the local
49
63
  > helper cache; if that cache was cleared, press **Push** once in Settings). Each host pays
@@ -72,7 +86,7 @@ Install either way:
72
86
  `desktop` is reserved for the Electron application: an **npm-installed `dsh` cannot manage
73
87
  it** (it answers `profile "desktop" is managed exclusively by the Electron application`),
74
88
  so one of the two routes above is required. The Desktop release version equals the DSH
75
- runtime it bundles, and it must satisfy `engines.dsh` (`>=0.2.2-rc.5`; check About);
89
+ runtime it bundles, and it must satisfy `engines.dsh` (`>=0.2.3-alpha.3`; check About);
76
90
  older releases make the Plugins page refuse the install. Desktop opens no visible Web
77
91
  port, but the plugin's HTTP routes and terminal socket are forwarded through Desktop's
78
92
  Host (the terminal resolves its address from `__DSH_TRANSPORT__.streamBaseUrl`), so no
@@ -119,8 +133,8 @@ extra configuration is needed.
119
133
  | Push pipeline | Remote arch/OS probe → version compare → skip-if-same / else push; the executable channel pushes a self-built helper. A failed deploy no longer retries on every remote file operation: it backs off from **5 seconds up to 5 minutes**, and the Settings "Push" button forces an immediate retry; **an automatic push (first contact or upgrade self-heal) raises a bottom-right toast on success** (`alias: pushed remote helper <version>`), while a manual push stays quiet (Settings already shows its state) |
120
134
  | Remote files | SFTP browse / read / write / create / delete / rename. Boundaries hardened: 0-byte files no longer deadlock, and every SFTP operation times out at 60s and releases its channel; **a single directory listing is capped at 20000 entries** (the first 20000 after sorting — directories first, then names — announced in the host log; the protocol carries no "truncated" field, so the UI has no marker); **a save goes through a side file and a rename** (server-side `posix-rename` when available, otherwise backup-rename-rollback), **writes through symlinks** (the link itself survives) and keeps the mode bits **on a best-effort basis**; SCM status parsing unquotes git's C-quoted paths (any name with whitespace is quoted) |
121
135
  | Remote terminal | ssh2 PTY + WebSocket, xterm rendering (copy-paste/theme-follow/reconnect-on-refresh; **the selection highlight is a visible blue in the light theme** — `#add6ff` light / `#264f78` dark, plus unfocused variants — no more white-on-white); `Shift+Insert` / `Ctrl+Shift+V` **paste exactly once** (xterm calls the key hook for keyup too, so the gesture used to run twice); **a reattach only takes over, it does not resize** (a page reload no longer shrinks a running shell to 80×24), and no resize frame is sent when rows/columns did not change; an output backlog applies real backpressure to the far end, and output within a short window is **coalesced into one frame** (flushed immediately past 64 KiB, and always before the exit frame) **Ctrl+click a path** reveals its folder in the directory tree (absolute / `~/` / relative tokens containing `/`, validated by stat in cwd → workspace-root → home order); a **"snippets" panel** next to the title stores name+command pairs, a click pastes into the command line **without Enter**, `Ctrl+B` adds one, and rows can be edited, deleted and dragged (Alt+Up/Down too), persisted in localStorage; echo after idle is flushed immediately, the client output path does not wait on xterm render callbacks, a closing socket releases its unsettled backpressure bytes, and the marks are 2 MiB / 512 KiB. so a busy command (`cat` of a large log, `dmesg`) costs far fewer frames and JSON parses; the terminal dials **its own SSH connection** per host (+1 connection, shared one as fallback) so bulk SFTP/git traffic no longer queues ahead of terminal I/O; **frames are capped at 1 MiB**, and pastes past 64 Ki characters are chunked on code points by the client instead of dropping the connection |
122
- | Concurrent channels | At most **6** remote channels per host at a time (no longer colliding with the far end's sshd `MaxSessions`); the 7th queues for up to **30 seconds** and then fails with `remote host <alias> is busy` instead of piling on connections |
123
- | Monitor | A sidebar **"Monitor"** page samples one host or every host **only while the panel and the page are visible**, at the configured refresh interval (5 s by default; 5/10/30 s in its settings): CPU, memory, disk, load, network rate, temperature and uptime, with 60-point history curves plus manual refresh and pause. The scope is "current host / a named host / all hosts" and survives a reload. The **first sample reports CPU% and the network rate as unknown** (both are deltas and need a second sample), and a non-Linux host shows unknown instead of 0. The Host caches one sample per alias for 3 seconds and joins concurrent requests, so one sample uses one exec channel and never the port-forward budget. Samples live in memory only — nothing is written to disk. A **process section** (single host, collapsed by default, sampled only while expanded) shows a `ps` snapshot sorted by CPU/memory/PID, filterable by command/user/PID, with a confirmed **End** action per row; a PID must come from the latest snapshot, and a host without a usable `ps` says it cannot enumerate. |
136
+ | Concurrent channels | The shared connection counts by purpose: **4** exec channels + **2** network-verb channels (fetch/pull/push) + **3** git-command channels (status/diff/log, the ledger's scans, and local writes such as commit/stage) = **9 counted**; one session is deliberately left free for the transient capability probe / group kill, so the total stays inside the measured `MaxSessions` (10) — a **bounded design, not spare headroom** (that one slot moved from exec to git: several workspaces/repositories scanning at once is more common than concurrent exec, at the cost of exec dropping from five to four — the fifth concurrent exec queues instead of being refused); a surplus operation queues for up to **30 seconds** (instead of being refused hard by sshd, which looks like a broken host) and then fails with `remote host <alias> is busy`. File transfer, terminals and port forwards ride their own connections and never take any of those 9 |
137
+ | Monitor | A sidebar **"Monitor"** page samples one host or every host **only while the panel and the page are visible**, at the configured refresh interval (5 s by default; 5/10/30 s in its settings): CPU, memory, disk, load, network rate, temperature and uptime, with 60-point history curves plus manual refresh and pause. The scope is "current host / a named host / all hosts" and survives a reload. The **first sample reports CPU% and the network rate as unknown** (both are deltas and need a second sample), and a non-Linux host shows unknown instead of 0. The Host caches one sample per alias for 3 seconds and joins concurrent requests, so one sample uses one exec channel and never the port-forward budget. Samples live in memory only — nothing is written to disk. A **process section** (single host, collapsed by default, sampled only while expanded) shows a `ps` snapshot sorted by CPU/memory/PID, filterable by command/user/PID, with a confirmed **End** action per row; a PID must come from the latest snapshot, and a host without a usable `ps` says it cannot enumerate. An **SSH connections section** (collapsed by default, sampled only while expanded) shows, per host, the four connection kinds (shared / terminals / port forwards / file transfer) as "open or closed · N channels", with the route the shared connection **actually took** on that line (direct / HTTP or SOCKS5 proxy / jump host, the same wording the connection chip uses); below it one line per channel budget, **each with its own queue**: `Shared channels 3/4 · 0 queued`, then — when the Host reports them — `File-transfer channels 1/6 · 0 queued`, `Network-verb channels 2/2 · 1 queued` (git fetch/pull/push) and `Git-command channels 2/3 · 1 queued` (git status/diff/log, the session ledger's own scans, and local writes such as commit/stage). At most four lines, and a line appears only while that budget has something running or waiting. The **helper** (the p2 transport) keeps its own SSH connection too: when the Host reports it, one more lane follows the four pool kinds — `Helper` with `open · 1 ch · 3 calls in flight` — and that last part is the number of RPC calls in flight, **not a queue**, so it never adds to the queue badge, the summary's queued count or the ordering. A Host that cannot report the helper omits the lane entirely rather than claiming "closed". **The host this workspace is bound to always leads**, then a host with work queued (which shows its queue count); the rest keep a stable alias order. Numbers are tabular so a refresh does not make the text jump. When a host refused its own SFTP connection and file operations fall back to the shared one, the file-transfer lane says so under it (`sftpFallback`, not an error state). The data is a local read of the pool the Host already holds in memory (no remote command rides it); a Host that does not know the route leaves the header plus one muted line. |
124
138
  | Timeouts and process cleanup | Ordinary git commands default to 300 s (configurable); the **network verbs (fetch/pull/push/sync) default to 20 minutes with a 30-minute ceiling**. exec runs in its own session (`setsid --wait`); on timeout OR cancel it sends TERM and **escalates to KILL after 3 seconds**, reaping the child processes with it; a host without `setsid --wait` is detected by a one-shot probe and falls back to the old behaviour, with a host-log line saying the timed-out remote command may still be running; **directory / multi-selection archive downloads carry a 600 s server-side budget** (remote `timeout -k 3 600`; a host without GNU `timeout` falls back to the unbudgeted old behaviour) and fail with the real reason when it expires |
125
139
  | Git graph | Remote repo status + branches + SVG commit graph + commit details/contents/diff pane (exec + frontend parsing, zero Host additions) |
126
140
  | Import | One-click import from `~/.ssh/config` and from an existing `dsh-ssh.json` (read once, no coupling); `Host a b` multi-pattern entries are expanded one by one, `Include` is reported as not expanded instead of being silently dropped, and every skipped host names an actionable reason (no User / no IdentityFile / invalid port …) |
@@ -259,6 +273,7 @@ dsh_remote_vs/
259
273
  │ ├── ai-review.ts # AI review prompt builder (single diff / whole commit, byte tiers, pure)
260
274
  │ ├── api.ts # typed fetch wrapper over /api/dsh-remote
261
275
  │ ├── MonitorView.tsx # monitor panel (one/all hosts, curves, pause/refresh, persisted scope)
276
+ │ ├── ConnectionsSection.tsx # monitor SSH pool section (four kinds/channels/slots+queues/actual egress; no sampling while collapsed)
262
277
  │ ├── metrics-model.ts # monitor model (history window/sparkline geometry/capacity+rate formatting)
263
278
  │ ├── HostsView / WorkspacesView / WorkspaceWizard / TerminalView / XTerm / PortsView / Dialog
264
279
  │ ├── SettingsHosts.tsx # settings occupants (host mgmt/binding list/default egress, self-fetching)
@@ -268,7 +283,7 @@ dsh_remote_vs/
268
283
  ├── vendor/dsh-remote-helpers/ # helper seeds (shipped, seeded into cache at startup, see below)
269
284
  ├── docs/ # local-only working docs (only docs/media/ screenshots ship)
270
285
  │ ├── MAINTENANCE.md # local-only (.gitignore), not shipped: upgrade impact, checklist, pitfalls, release
271
- │ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.29.0)
286
+ │ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.31.0)
272
287
  │ └── GATES.md # local-only: local gate inventory and measured assertion counts
273
288
  ├── locale/ # bilingual plugin metadata
274
289
  └── lib/ # build output (**must be committed**; only .map is ignored; restart after link install)
@@ -372,6 +387,10 @@ when the seat changes.
372
387
  `/proc`, so other platforms show unknown; temperature exists only when the host exposes a thermal
373
388
  zone (many VMs do not); CPU% and the network rate are deltas, so the **first frame is unknown**;
374
389
  samples live in memory only and the curves restart after a page reload.
390
+ - **Pool section limits**: sampled only while the section is expanded, the Monitor panel is the visible
391
+ view AND the page is in the foreground (collapsed means zero requests and zero traffic); it reads the
392
+ connection state the Host holds in memory, never a remote command; a Host that does not know the route
393
+ (404) leaves the header plus one muted line and is not asked again.
375
394
 
376
395
  ## Session change review (Cursor style)
377
396
 
@@ -382,6 +401,12 @@ change?". Its data comes from the plugin's own change ledger (`/api/dsh-remote/c
382
401
  `workspaceChanges` — the latter cannot see a routed session at all (the probe measured 58 remote sessions
383
402
  with zero change events).
384
403
 
404
+ - **How new files are found**: the untracked scan first runs a cheap `git ls-files --others --directory`
405
+ (an untracked directory is reported once instead of being walked file by file, which is what made this step
406
+ expensive on a monorepo), then expands only the reported directories **within bounds** (one batched command for all of them, so a directory holding nothing visible costs no round trip; at most 20 directories,
407
+ the same 500-row cap, one 60-second budget shared with the walk). Hitting any limit — or an expansion failing —
408
+ marks the list **incomplete** and says so in the panel instead of silently listing fewer files; with no
409
+ untracked directory it runs **no extra command at all**.
385
410
  - **The panel**: one row per file (file-type icon + relative path + `+a −b` on the right), aligned left and
386
411
  right with the composer card; click the header to collapse/expand, `⟳` forces an immediate rescan. With no
387
412
  changes it says "this session has not changed any file yet"; when it cannot compute, it states the
@@ -550,20 +575,27 @@ over helper RPC (fs) / ssh2 (processes), local stays untouched; both share one H
550
575
  Upstream never published helper binaries (all Release assets are empty), so this plugin builds its own:
551
576
 
552
577
  - Build machine: WSL2 Ubuntu-22.04 (glibc 2.35, matching the remote targets), build-host Node v24.21.0 + pnpm 11.28.5;
553
- the node **embedded by pkg is v24.22.3** (that is what `helper.json`'s `nodeVersion` records)
554
- - Sources: the `dsh-v0.2.2-rc.4` tag (commit `3f321d32…`) — the **build baseline tracks the wire protocol version, not the Host version**;
555
- this generation is **protocol 3 (G2)**: besides the hello protocol literal and `policySchema.additionalWritableRoots`,
556
- it adds `fs.patch` / `fs.delete` / `fs.move` (31 vs 28 methods). **"Protocol 3" does not imply those three methods**:
557
- the G1 generation (`dsh-v0.2.2-alpha.2`) also reports protocol 3 but lacks them, so the helper must be built from a
558
- G2 tag (≥ alpha.3)
578
+ the node **embedded by pkg is v24.23.0** (that is what `helper.json`'s `nodeVersion` records; pkg 6.21.0 resolves
579
+ the latest 24.x patch release from nodejs.org at build time — v24.22.3 on the rc.4 build day)
580
+ - Sources: the `dsh-v0.2.3-alpha.3` tag (commit `841f76d3…`) — the **build baseline tracks the wire protocol version, not the Host version**;
581
+ this generation is **protocol 3 (G3)**: on top of G2's `fs.patch` / `fs.delete` / `fs.move` it adds
582
+ `fs.writeBytes` (8 MiB per call, base64). **"Protocol 3" does not imply those methods are present**:
583
+ the G1 generation (`dsh-v0.2.2-alpha.2`) also reports protocol 3 but lacks patch/delete/move, and the
584
+ G2 generation (`dsh-v0.2.2-rc.4`) lacks `fs.writeBytes`, so the helper must be built from a G3 tag (`dsh-v0.2.3-alpha.3`)
559
585
  - Command: stock script `pnpm exec tsx scripts/build-exe-for-ssh-helper.ts --target=node24-linux-x64`
560
586
  - Deviation 1: no docker for the manylinux 2.28 rebuild, so a `DSH_GLIBC_CEILING`
561
587
  env override was added (default stays 2.28); this build targets 2.35 (see `glibc-ceiling.patch`)
562
- - Deviation 2: the upstream tag's own helper build path is missing two dependencies (`@deepseek-ai/dsh-error` is a
563
- required peer, `@deepseek-ai/dsh-fs-patch` is never built into the runtime by `compileRuntime()`); without them the
564
- closure gate aborts / the handshake fails with `ERR_MODULE_NOT_FOUND`. The patch is archived as `ssh-helper-runtime-deps.patch`
588
+ - Deviation 2: the upstream tag's own helper build path is missing three dependencies (`@deepseek-ai/dsh-error` is a
589
+ required peer; `@deepseek-ai/dsh-fs-patch` and alpha.3's new `@deepseek-ai/dsh-attachment` are never built into the
590
+ runtime by `compileRuntime()`); without them the closure gate aborts / the handshake fails with
591
+ `ERR_MODULE_NOT_FOUND`. The patch is archived as `ssh-helper-runtime-deps.patch`
592
+ - Deviation 3: `@yao-pkg/pkg` 6.21.0 SEA resolves a bare import made from a real file outside the snapshot starting at
593
+ the mount point `/snapshot/node_modules`, while the payload lives at `/snapshot/<project>/.../staging/node_modules`;
594
+ alpha.3's new scoped-repl PTC evaluates programs as real files, so the official `native-flock` check failed with
595
+ `ERR_MODULE_NOT_FOUND`. `pkg-sea-bare-import.patch` starts the lookup at the packaged entrypoint's directory; it
596
+ patches dependency sources (`node_modules/@yao-pkg/pkg/prelude/sea-bootstrap.bundle.js`) after `pnpm install`
565
597
  - Checks: stock `verify-ssh-helper-artifact.ts --archive=<tarball> --sandbox=required`, all 8 green
566
- - Size and cache: the linux-x64 archive is **47 MB** (47,234,718 B); cache `$DSH_HOME/dsh-remote-helpers/`
598
+ - Size and cache: the linux-x64 archive is **47 MB** (47,497,147 B); cache `$DSH_HOME/dsh-remote-helpers/`
567
599
  (`*.tar.gz` + `.sha256` + `.helper.json` with binarySha256, feeding P2's helperHash)
568
600
  - Full rebuild procedure for upgrades: the local-only `docs/MAINTENANCE.md` §4 (gitignored, not distributed)
569
601
 
@@ -651,6 +683,7 @@ MIT © 2026 xiray-xia — see [LICENSE](./LICENSE).
651
683
  Third-party components bundled in or required by the published package are listed in
652
684
  [THIRD-PARTY-NOTICES.md](./THIRD-PARTY-NOTICES.md).
653
685
 
654
- The `vendor/` helper seed is built from DeepSeek Harness sources (MIT) at tag `dsh-v0.2.2-rc.4`
655
- with the stock build script; see "Self-built helper" above for the exact procedure and the two
656
- documented deviations (`glibc-ceiling.patch` and `ssh-helper-runtime-deps.patch` in the seed set).
686
+ The `vendor/` helper seed is built from DeepSeek Harness sources (MIT) at tag `dsh-v0.2.3-alpha.3`
687
+ with the stock build script; see "Self-built helper" above for the exact procedure and the three
688
+ documented deviations (`glibc-ceiling.patch`, `ssh-helper-runtime-deps.patch` and
689
+ `pkg-sea-bare-import.patch` in the seed set).
package/README.md CHANGED
@@ -34,13 +34,22 @@ dsh plugin --profile web add dsh-remote-vs
34
34
 
35
35
  (从 npm 装,推荐;也可以直接跟仓库装:`dsh plugin --profile web add github:xiray-xia/dsh-remote-vs`。)
36
36
 
37
- **需要 DSH `0.2.2-rc.5` 及以上、`0.3.0` 以下**(`engines.dsh` 门到底;已按 rc.5 适配并通过类型检查与本地全量门禁)。
38
- Host 仍是 `0.2.2-rc.4` 的请用插件 `0.23.0`;`0.2.2-rc.2` / `0.2.2-rc.3` 的请用插件 `0.22.0`;`0.2.2-alpha.3` / `0.2.2-rc.1` 的请用 `0.20.1`;`0.2.2-alpha.2` 一代请用 `0.17.0`。
37
+ **需要 DSH `0.2.3-alpha.3` 及以上、`0.3.0` 以下**(`engines.dsh` 门到底;已按 alpha.3 适配并通过类型检查与本地全量门禁)。
38
+ 注意 alpha.3 宿主自身要求 **Node `^24.22.3 || >=26.13.1`**,Node 更旧时先升级 Node 再升 DSH。
39
+ Host 仍是 `0.2.2-rc.5` 的请用插件 `0.30.0`;`0.2.2-rc.4` 的请用插件 `0.23.0`;`0.2.2-rc.2` / `0.2.2-rc.3` 的请用插件 `0.22.0`;`0.2.2-alpha.3` / `0.2.2-rc.1` 的请用 `0.20.1`;`0.2.2-alpha.2` 一代请用 `0.17.0`。
39
40
  `--profile web` 指明装进哪个 profile,
40
41
  要装进 Web GUI 所用的那个(`web` 是常见命名,以你自己的 profile 名为准);
41
42
  桌面端用的是保留 profile `desktop`,见下面「桌面端」。
42
43
 
43
- > **从 `0.22.0`(或更早)升级要注意**:远端 helper 的 wire 协议由 **2 升到 3**(`0.23.0` 起 helper 不再变化,`0.23.0 → 0.24.0` 不涉及 helper 重推)。已有主机的部署记录会被识别为旧代,
44
+ > **从 `0.30.0`(DSH `0.2.2-rc.5`)升到本版要注意**:alpha.3 的 helper 能力代从 **G2 升到 G3**
45
+ > (新增 `fs.writeBytes`,单次 ≤8 MiB),但 **wire 协议号仍是 3**。所以:
46
+ > - 已有主机的旧 helper 与插件"协议相同",**不会自动重推**(升级自愈只认协议号差异);
47
+ > - 需要到「设置 → 远程主机」对每台主机点一次「部署」(或新建一个远程工作区,向导会自动推),
48
+ > 才会换成 G3;每台首次约 47 MB 上传,旧版本目录在远端保留、可回滚;
49
+ > - 不推也能正常用:浏览/编辑/终端/文本与 patch/delete/move 都不受影响,只有依赖 `fs.writeBytes`
50
+ > 的能力(如实验性 IM 插件把文件附件按字节落进远端工作区)会报错。
51
+ >
52
+ > **从 `0.22.0`(或更早)升级要注意**:远端 helper 的 wire 协议由 **2 升到 3**(`0.23.0` → `0.30.0` 期间 helper 不重推;`0.31.0` 起改推 G3,见上一条)。已有主机的部署记录会被识别为旧代,
44
53
  > 首次连接该主机时自动重推新 helper(本机缓存里还留有旧版构建即可自动判定;缓存被清理过时,在设置页点一次
45
54
  > 「推送」即可),每台主机首次会多一次约 47 MB 的上传。旧 helper 目录会保留,回滚就是推回旧版本。
46
55
 
@@ -61,7 +70,7 @@ Host 仍是 `0.2.2-rc.4` 的请用插件 `0.23.0`;`0.2.2-rc.2` / `0.2.2-rc.3`
61
70
  注意:`desktop` 是桌面端独占的保留 profile,**npm 全局安装的 `dsh` 不能管理它**
62
71
  (会报 `profile "desktop" is managed exclusively by the Electron application`),
63
72
  只能走上面两条路径。桌面端的版本号等于它捆绑的 DSH 运行时版本,同样要满足
64
- `engines.dsh` 要求(`>=0.2.2-rc.5`,关于面板可看);低于该版本时插件页会直接拒绝
73
+ `engines.dsh` 要求(`>=0.2.3-alpha.3`,关于面板可看);低于该版本时插件页会直接拒绝
65
74
  安装。桌面端没有可见的 Web 端口,但本插件的 HTTP 路由与终端 socket 都经桌面端的
66
75
  Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无需额外设置。
67
76
 
@@ -104,8 +113,8 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
104
113
  | 推送流水线 | 远端 arch/系统探测 → 版本比对 → 一致跳过 / 否则推送;executable 通道推送自编译 helper。失败后不再每次远端文件操作都重试:按 **5 秒起步、上限 5 分钟**的退避重试,设置页「推送」按钮可强制立即重试;**首次连接或协议自愈触发的自动推送成功后,右下角弹一条提示**(`alias:已自动推送远端 helper <版本>`),手动推送不弹(设置页已有状态) |
105
114
  | 远端文件 | SFTP 浏览 / 读 / 写 / 新建 / 删除 / 改名。边界已加固:0 字节文件不再卡死,每个 SFTP 操作 60s 超时回收通道;**单个目录列表上限 20000 条**(按"目录在前、其余按名"排序后取前 20000,宿主日志说明——协议里没有"已截断"字段,界面上没有标记);**保存走侧文件 + 重命名**(优先服务端 `posix-rename`,不支持时备份-重命名-失败回滚),**写穿符号链接**(链接本身保留)并**尽力保留权限位**;SCM 状态解析会反解 git 的 C-quote 路径(凡名字含空格都会被加引号) |
106
115
  | 远端终端 | ssh2 PTY + WebSocket,xterm 渲染(复制粘贴/主题跟随/刷新重连;**亮色主题下的选中高亮是可见的蓝底**(亮 `#add6ff` / 暗 `#264f78` + 失焦变体),不再是白底白字);`Shift+Insert` / `Ctrl+Shift+V` **只粘贴一次**(xterm 的按键钩子对 keyup 也会回调,此前同一个手势被处理两遍);**重新挂接只接管、不改尺寸**(刷新页面不会把运行中的 shell 缩成 80×24),行列没变化时不再发 resize 帧;**Ctrl+点击路径**在目录树里定位到该目录(绝对路径/`~/`/带 `/` 的相对路径,先按 shell 上报的 cwd、再按工作区根、最后按 home 逐个 stat 验证;路径不在任何工作区内会明确提示);**「常用指令」**面板(标题旁按钮)保存「指令名 + 指令内容」,点一条只粘贴到命令行**不发送**,`Ctrl+B` 快速新增,支持编辑/删除/拖拽排序(Alt+↑↓ 亦可),存在浏览器 localStorage;输入输出方面:**echo 走即时通道**(空闲后的第一段输出不等合并窗口)、一个短窗口内的输出**合并成一帧**(缓冲超过 64 KiB 立即刷、退出帧前必刷)、客户端输出**不依赖 xterm 的渲染回调**(渲染被节流时不再堵住后续输出)、socket 断开时释放未结算的背压字节(否则通道会被永久暂停),背压高水位 2 MiB / 低水位 512 KiB(在"内存有界"与"echo 延迟有界"之间取更偏交互的一侧);**终端独占一条 SSH 连接**(每主机 +1 条,握手失败回落共享连接),SFTP/git 的大流量不再排在终端输入输出前面;**单帧上限 1 MiB**,超过 64 Ki 字符的粘贴在客户端按码点分块发送,不再撑断连接 |
107
- | 并发通道 | 每主机同时最多 **6 条**远端通道(不再撞远端 sshd 的 `MaxSessions`);第 7 个排队最多等 **30 秒**,超时明确报 `remote host <alias> is busy`,而不是无限堆连接 |
108
- | 运行监控 | 侧栏「监控」页:**仅在面板可见且页面在前台时**按刷新设置(默认 5 秒,可改 5/10/30 秒)采样一台/全部主机的 CPU、内存、磁盘、负载、网络速率、温度与运行时长,带 60 点历史曲线、手动刷新与暂停;范围可选「当前主机 / 指定主机 / 全部主机」并跨刷新记住。**首帧 CPU% 与网络速率显示「未知」**(差分需要第二帧),Linux 之外的平台如实显示「未知」而不是 0;Host 侧按 alias 缓存 3 秒并合并并发请求,一次采样只占一条执行通道、不占端口转发预算;样本只在内存,不落盘。**进程分区**(单主机、默认折叠、展开才采样):`ps` 快照按 CPU/内存/PID 排序,可按命令/用户/PID 过滤,行尾「结束」先确认;PID 必须来自最近快照,`ps` 不可用时明确显示无法枚举 |
116
+ | 并发通道 | 共享连接上按用途分开计数:**4 条**执行通道 + **2 条**网络命令通道(fetch/pull/push)+ **3 条 git 命令通道**(status/diff/log 与账本扫描、以及 commit/stage 等本地写)= **9 条计入上限**,另留 1 条给瞬时的能力探测/组 kill,合计不超过远端 sshd 实测的 `MaxSessions`(10)——**这是有界设计,不是余量**(这 1 个名额是从执行通道挪给 git 的:多工作区/多仓库同时扫描比并发 exec 更常见,代价是执行通道从 5 降到 4,第 5 个并发 exec 会排队而不是被拒);超出的操作排队最多等 **30 秒**(而不是被 sshd 硬拒,那会看起来像主机坏了),超时明确报 `remote host <alias> is busy`。文件传输、终端、端口转发各走自己的连接,不占这 9 条 |
117
+ | 运行监控 | 侧栏「监控」页:**仅在面板可见且页面在前台时**按刷新设置(默认 5 秒,可改 5/10/30 秒)采样一台/全部主机的 CPU、内存、磁盘、负载、网络速率、温度与运行时长,带 60 点历史曲线、手动刷新与暂停;范围可选「当前主机 / 指定主机 / 全部主机」并跨刷新记住。**首帧 CPU% 与网络速率显示「未知」**(差分需要第二帧),Linux 之外的平台如实显示「未知」而不是 0;Host 侧按 alias 缓存 3 秒并合并并发请求,一次采样只占一条执行通道、不占端口转发预算;样本只在内存,不落盘。**进程分区**(单主机、默认折叠、展开才采样):`ps` 快照按 CPU/内存/PID 排序,可按命令/用户/PID 过滤,行尾「结束」先确认;PID 必须来自最近快照,`ps` 不可用时明确显示无法枚举。**SSH 连接分区**(默认折叠、展开才采样):每台主机四类连接(共享 / 终端 / 端口转发 / 文件传输)各显示「开着或未开 · N 通道」,共享那一行附带这条连接**实际走的路**(直连 / HTTP 或 SOCKS5 代理 / 跳板,与连接 chip 同一套文案);下一行起是**通道预算与排队**,每个预算一行、**各自独立排队**:共享 `共享通道 3/4 · 排队 0`;宿主报告时再加 `文件传输通道 1/6 · 排队 0`、`网络命令通道 2/2 · 排队 1`(git fetch/pull/push)与 `git 命令通道 2/3 · 排队 1`(git status/diff/log 与会话账本扫描,以及 commit/stage/discard 等本地写)——**最多四行**,且只在对应预算有活跃或排队时出现。此外,**helper(p2 传输)走自己的 SSH 连接**:宿主报告时在四类连接之后再出一行 `helper 工具`(`开着 · 1 通道 · 3 个调用进行中`),括号外那半句是在飞 RPC 调用数——**不是队列**,所以它不计入排队徽标、摘要排队数与排序;宿主拿不到 helper 状态时整行不出现(不谎报「未开」)。**当前工作区绑定的主机始终排最前**,其次排队 >0 的主机(并标出排队数),其余按 alias 稳定排序;数字等宽,刷新不跳。主机拒绝专用 SFTP 连接、文件操作回落到共享连接时,「文件传输」行下方标出原因(读 `sftpFallback`,不是错误态)。数据是宿主对自己内存里连接池的一次本地读取(不发远端命令),宿主版本不认识该接口时只留标题 + 一行说明 |
109
118
  | 超时与进程清理 | 普通 git 命令默认 300s(设置可调);**网络动词(fetch/pull/push/sync)默认 20 分钟、上限 30 分钟**。exec 跑在独立会话里(`setsid --wait`),超时/取消都先发 TERM、**3 秒后升级 KILL**,连同子进程一起收掉;远端没有 `setsid --wait` 时探测一次即知,退回旧行为并在宿主日志里写明"超时可能没停掉远端命令";**目录/多选归档下载有 600 秒服务端预算**(远端 `timeout -k 3 600`;远端没有 GNU `timeout` 时退回无预算的旧行为),超时以真实原因失败 |
110
119
  | Git 图谱 | 远端仓库状态 + 分支 + SVG 提交图 + 提交详情/内容/差异面板(exec + 前端解析,零 Host 增量)|
111
120
  | 导入 | 从 `~/.ssh/config`、从现有 `dsh-ssh.json` 一键导入(只读一次,不耦合);`Host a b` 这类多模式条目会逐个展开,`Include` 如实报告为未展开,被跳过的主机会给出可操作原因(缺 User / 缺 IdentityFile / 端口非法等)|
@@ -236,6 +245,7 @@ dsh_remote_vs/
236
245
  │ ├── ai-review.ts # AI 审查 prompt 构造(单文件 diff / 整提交,按字节分级,纯函数)
237
246
  │ ├── api.ts # /api/dsh-remote 类型化 fetch 封装
238
247
  │ ├── MonitorView.tsx # 监控面板(单机/全部主机、曲线、暂停/刷新、范围持久化)
248
+ │ ├── ConnectionsSection.tsx # 监控页 SSH 连接池分区(四类连接/通道数/槽位排队/实际出口;折叠即零采样)
239
249
  │ ├── metrics-model.ts # 监控纯模型(历史窗口/Sparkline 几何/容量与速率格式化)
240
250
  │ ├── HostsView / WorkspacesView / WorkspaceWizard / TerminalView / XTerm / PortsView / Dialog
241
251
  │ ├── SettingsHosts.tsx # 设置两节 occupant(主机管理/绑定列表/默认网络出口,自取数)
@@ -245,7 +255,7 @@ dsh_remote_vs/
245
255
  ├── vendor/dsh-remote-helpers/ # helper 种子(随包发布,启动铺缓存,见下)
246
256
  ├── docs/ # 本地工作文档(不推送 GitHub;只有 docs/media/ 的截图随仓库公开)
247
257
  │ ├── MAINTENANCE.md # 本地私有(.gitignore,不入库):升级影响面/检查清单/踩坑/发布流程
248
- │ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.29.0)
258
+ │ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.31.0)
249
259
  │ └── GATES.md # 本地私有:本地门禁清单与实跑条数
250
260
  ├── locale/ # 插件元信息双语
251
261
  └── lib/ # 构建产物(**必须入库**,只有 .map 忽略;link 安装后重启即生效)
@@ -331,6 +341,8 @@ dsh_remote_vs/
331
341
  - **监控的边界**:采样只在「监控」面板可见且页面在前台时进行(隐藏即完全停止,不产生远端流量);完整指标来自 Linux `/proc`,
332
342
  其它平台显示「未知」;温度只在主机暴露 thermal zone 时有值(很多虚拟机没有);CPU% 与网络速率是两帧差分,**首帧为未知**;
333
343
  样本只进内存,刷新页面后曲线从头开始。
344
+ - **连接池分区的边界**:采样同样只在「分区已展开 + 面板可见 + 页面在前台」时进行(折叠即零请求,不产生任何流量);
345
+ 它读的是宿主内存里的连接状态,不发远端命令;宿主版本不认识该接口(404)时只留标题与一行说明,之后不再重复请求。
334
346
 
335
347
  ## 会话改动审阅(Cursor 式)
336
348
 
@@ -340,6 +352,10 @@ dsh_remote_vs/
340
352
  会话改动账本(`/api/dsh-remote/changes`),不是 DSH 的 `workspaceChanges` —— 后者看不见被路由的会话
341
353
  (探针实测:58 个远端会话、0 个改动事件)。
342
354
 
355
+ - **新文件怎么扫**:未跟踪文件先跑一次 `git ls-files --others --directory` 的**快走**(遇到未跟踪目录只报目录、
356
+ 不再逐个下潜,monorepo 上省掉整趟遍历),再只对报出来的目录做**有界展开**(一条批量命令问全部目录,空目录不花往返;最多 20 个目录、累计文件仍受
357
+ 500 行上限、与快走共用一个 60 秒预算);超限/超时/展开失败会把列表标成**不完整**并在面板说明,不会静默少列。
358
+ 没有未跟踪目录时这一步**不发任何额外命令**。
343
359
  - **面板**:一行一个文件(文件类型图标 + 相对路径 + 右侧 `+a −b`),宽度与输入卡**左右对齐**;
344
360
  点标题栏折叠/展开,`⟳` 强制立即重扫。没有改动时显示「本会话还没有改动文件。」;统计不出来时显示
345
361
  **具体原因**(见下面的边界),不会丢一个空列表让人猜。
@@ -463,19 +479,25 @@ helper RPC(fs)/ ssh2(进程),本地一切不变;两者同 Host、共
463
479
  官方从未发布 helper 二进制(Release assets 全空),本插件走自编译:
464
480
 
465
481
  - 构建机:WSL2 Ubuntu-22.04(glibc 2.35,与目标远端一致),构建机 Node v24.21.0 + pnpm 11.28.5;
466
- pkg 内嵌的 node 是 **v24.22.3**(`helper.json` 的 `nodeVersion` 记它)
467
- - 源码:`dsh-v0.2.2-rc.4` tag(commit `3f321d32…`)—— **构建基线对齐的是 wire 协议号,不是 Host 版本号**;
468
- 这一代是**协议 3(G2 代)**:除 hello 的协议字面量与 `policySchema.additionalWritableRoots` 外,
469
- 还多出 `fs.patch` / `fs.delete` / `fs.move` 三个方法(31 vs 28)。**"协议 3"不等于有这三个方法**:
470
- G1 代(`dsh-v0.2.2-alpha.2`)自报的也是协议 3,但没有它们,必须按 G2 tag(≥ alpha.3)编
482
+ pkg 内嵌的 node 是 **v24.23.0**(`helper.json` 的 `nodeVersion` 记它;pkg 6.21.0 在构建时从 nodejs.org
483
+ 取 24.x 的最新补丁版,rc.4 构建那天是 v24.22.3)
484
+ - 源码:`dsh-v0.2.3-alpha.3` tag(commit `841f76d3…`)—— **构建基线对齐的是 wire 协议号,不是 Host 版本号**;
485
+ 这一代是**协议 3(G3 代)**:在 G2 的 `fs.patch` / `fs.delete` / `fs.move` 之外,新增 `fs.writeBytes`
486
+ (8 MiB/次,base64 传输)。**"协议 3"不等于这些方法都在**:G1 代(`dsh-v0.2.2-alpha.2`)自报的也是协议 3
487
+ 但没有 patch/delete/move,G2 代(`dsh-v0.2.2-rc.4`)没有 `fs.writeBytes`,必须按 G3 tag(`dsh-v0.2.3-alpha.3`)编
471
488
  - 命令:官方原脚本 `pnpm exec tsx scripts/build-exe-for-ssh-helper.ts --target=node24-linux-x64`
472
489
  - 偏离一:无 docker 跑不了 manylinux 2.28 重编,加了 `DSH_GLIBC_CEILING`
473
490
  环境覆盖(默认仍 2.28),本次以 2.35 构建(见 `glibc-ceiling.patch`)
474
- - 偏离二:上游 tag 的 helper 构建路径自身缺两个依赖(`@deepseek-ai/dsh-error` 是必需 peer、
475
- `@deepseek-ai/dsh-fs-patch` 没被 `compileRuntime()` 编进运行时),不补就是闭包门中止 / 握手
476
- `ERR_MODULE_NOT_FOUND`;补丁留档为 `ssh-helper-runtime-deps.patch`
491
+ - 偏离二:上游 tag 的 helper 构建路径自身缺三个依赖(`@deepseek-ai/dsh-error` 是必需 peer;
492
+ `@deepseek-ai/dsh-fs-patch` 与 alpha.3 新增的 `@deepseek-ai/dsh-attachment` 没被 `compileRuntime()` 编进运行时),
493
+ 不补就是闭包门中止 / 握手 `ERR_MODULE_NOT_FOUND`;补丁留档为 `ssh-helper-runtime-deps.patch`
494
+ - 偏离三:`@yao-pkg/pkg` 6.21.0 的 SEA 对「从快照外的真实文件发起的裸包导入」从挂载点
495
+ `/snapshot/node_modules` 开始找,而载荷实际在 `/snapshot/<project>/.../staging/node_modules`;
496
+ alpha.3 的新 scoped-repl PTC 以真实文件执行程序,官方验证的 `native-flock` 会 `ERR_MODULE_NOT_FOUND`。
497
+ `pkg-sea-bare-import.patch` 把查找起点改到打包入口目录(改的是依赖源码,`pnpm install` 后对
498
+ `node_modules/@yao-pkg/pkg/prelude/sea-bootstrap.bundle.js` 应用)
477
499
  - 校验:官方 `verify-ssh-helper-artifact.ts --archive=<tarball> --sandbox=required` 8 项全绿
478
- - 体积与缓存:linux-x64 包 **47 MB**(47,234,718 B);缓存 `$DSH_HOME/dsh-remote-helpers/`
500
+ - 体积与缓存:linux-x64 包 **47 MB**(47,497,147 B);缓存 `$DSH_HOME/dsh-remote-helpers/`
479
501
  (`*.tar.gz` + `.sha256` + `.helper.json` 含 binarySha256,供 P2 的 helperHash)
480
502
  - 升级重编全流程见本地维护文档 `docs/MAINTENANCE.md` §4(.gitignore,不随仓库分发)
481
503
 
@@ -554,6 +576,6 @@ MIT © 2026 xiray-xia —— 见 [LICENSE](./LICENSE)。
554
576
 
555
577
  发行包内联/依赖的第三方组件与许可证见 [THIRD-PARTY-NOTICES.md](./THIRD-PARTY-NOTICES.md)。
556
578
 
557
- `vendor/` 里的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.2-rc.4`
558
- tag 以官方原脚本构建,具体流程与两处有记录的偏离见上文"Helper 自编译"节
559
- (种子包里的 `glibc-ceiling.patch` 与 `ssh-helper-runtime-deps.patch`)。
579
+ `vendor/` 里的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.3-alpha.3`
580
+ tag 以官方原脚本构建,具体流程与三处有记录的偏离见上文"Helper 自编译"节
581
+ (种子包里的 `glibc-ceiling.patch`、`ssh-helper-runtime-deps.patch` 与 `pkg-sea-bare-import.patch`)。
@@ -43,9 +43,9 @@
43
43
  |---|---|---|---|
44
44
  | ws | 8.22.0(`package.json` 声明 `^8.18.0`) | MIT | `Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>`、`Copyright (c) 2013 Arnout Kazemier and contributors`、`Copyright (c) 2016 Luigi Pinca and contributors` |
45
45
  | zod | 4.6.6(精确 pin) | MIT | `Copyright (c) 2025 Colin McDonnell` |
46
- | `@deepseek-ai/dsh-ssh` | 0.2.2-rc.5(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
47
- | `@deepseek-ai/dsh-fs-ssh` | 0.2.2-rc.5(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
48
- | `@deepseek-ai/schemastery` | 3.19.0(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
46
+ | `@deepseek-ai/dsh-ssh` | 0.2.3-alpha.3(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
47
+ | `@deepseek-ai/dsh-fs-ssh` | 0.2.3-alpha.3(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
48
+ | `@deepseek-ai/schemastery` | 3.20.0-alpha.2(精确 pin) | MIT(DSH 项目) | 见 npm 包内 `LICENSE` |
49
49
 
50
50
  ## 4. 由宿主提供的平台依赖(不随本包分发)
51
51
 
@@ -53,13 +53,13 @@
53
53
  (`cordis`、`dsh-*`;DSH 以 MIT 发布)由 DSH 宿主提供,本包只声明 peer、不打包其代码;§3 里的三个
54
54
  `@deepseek-ai/*` 是本包的**运行期依赖**(非 peer),由 npm 随包安装、同样不内联。
55
55
 
56
- `@deepseek-ai/dsh-client-ui-primitives`(`0.2.2-rc.5`,MIT,`Copyright (c) 2026 DeepSeek`)是
56
+ `@deepseek-ai/dsh-client-ui-primitives`(`0.2.3-alpha.3`,MIT,`Copyright (c) 2026 DeepSeek`)是
57
57
  **客户端平台模块表提供的组件**(Markdown 预览使用其 `MarkdownText`):本包只在 `devDependencies`
58
58
  声明它以便类型检查/构建,客户端构建按 external 解析,不内联、也不随本包安装;运行时由 DSH web shell
59
59
  的模块表提供。
60
60
 
61
- `vendor/` 下的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.2-rc.4` tag 用官方脚本构建,并内嵌
62
- Node.js 运行时(MIT);构建流程与两处偏离见 README「Helper 自编译」。
61
+ `vendor/` 下的 helper 种子由 DeepSeek Harness 源码(MIT)按 `dsh-v0.2.3-alpha.3` tag 用官方脚本构建,并内嵌
62
+ Node.js 运行时(MIT);构建流程与三处偏离见 README「Helper 自编译」。
63
63
 
64
64
  ## 5. 许可证正文与获取位置
65
65
 
package/cordis.patch.yml CHANGED
@@ -53,37 +53,35 @@
53
53
  name: dsh-remote-vs/p2-router-refs
54
54
  inject: [localFileReferences, remoteWorlds]
55
55
 
56
- # Remote agent preset, bound to this bundle's lifecycle.
57
- # Mirrored from preset-standard @ dsh 0.2.2-rc.4. rc.4 note: the stock
58
- # `presets/standard.patch.yml` is byte-identical to rc.2 (verified by hash),
59
- # so this round adds no mirror delta — only the intentional diffs below.
60
- # Mirrored from preset-standard @ dsh 0.2.2-rc.2. rc.2 deltas adopted:
61
- # skill-filesystem customSkillDirs, tool-subagent-control interrupt:false,
62
- # tool-office row.
63
- # Mirrored from preset-standard @ dsh 0.2.2-alpha.2 with these diffs:
56
+ # Mirrored from preset-standard @ dsh 0.2.3-alpha.3. alpha.3 deltas adopted:
57
+ # tool-office renamed tool-document, new tool-cordis row, tool-fs no longer
58
+ # writes applyPatch (it now defaults to the resolved edit value, so the
59
+ # remote preset keeps offering apply_patch without stating it), and the
60
+ # stock tool-bash/tool-pwsh platform pair is still replaced by our isolated
61
+ # remote shell group below.
62
+ # Earlier mirror history (kept so a future diff against stock stays obvious):
63
+ # rc.4 note: stock standard.patch.yml was byte-identical to rc.2.
64
+ # rc.2 deltas: skill-filesystem customSkillDirs, tool-subagent-control
65
+ # interrupt:false, tool-office row.
66
+ # Intentional diffs from stock (do NOT re-add these to the mirror):
64
67
  # 1. persona prefix reframed for remote SSH work (transparent routing);
65
68
  # 2. tool-bash moved into an isolated shell group with our routed bash
66
69
  # executor (stock root shell stays pwsh on Windows);
67
70
  # 3. tool-pwsh row dropped;
68
- # 4. tool-fs `applyPatch: true` — intentional divergence from stock's
69
- # `false`: 0.23.0 speaks helper protocol 3, so the remote half really
70
- # implements patch/delete/move (fs.patch/fs.delete/fs.move) and the
71
- # apply_patch tool is no longer a local-only promise. Stock default stays
72
- # false for compositions that do not mount our remote fs.
71
+ # 4. tool-fs applyPatch: the remote world speaks helper protocol 3 and
72
+ # implements fs.patch/delete/move, so apply_patch must stay offered.
73
+ # Since alpha.3 applyPatch defaults to `edit`, the key is no longer
74
+ # written here; stock and this mirror therefore agree on the value.
73
75
  # Everything else is byte-identical so future diffs against stock stay obvious.
74
- # alpha.3 note: stock dropped `toolFilter` (subagent children now inherit
75
- # the parent composition; fork must not select presets) — our mirror drops
76
- # both blocks with it.
76
+ # alpha.3 note: stock dropped `toolFilter` (subagent children now inherit the
77
+ # parent composition; fork must not select presets) — our mirror drops both
78
+ # blocks with it.
77
79
  # alpha.4 note: stock added `tool-plugin-market` (disabled: true in every
78
- # preset) right after `tool-plugin-manager` — mirrored here for the same
79
- # reason as above: a row missing from the mirror is a preset that silently
80
- # loads a different toolset than stock.
80
+ # preset) right after `tool-plugin-manager`.
81
81
  # 0.2.2-alpha.2 note: stock dropped `tool-subagent-list-agents` (the
82
82
  # `dsh-tool-subagent-control/list-agents` subpath is gone from the package),
83
83
  # renamed `modelSelectionSettings` to `modelSelection` + `modelDiscovery`,
84
- # and made the plugin-manager row conditional on `profileContext`. All
85
- # three are mirrored here: the first one is a hard module-resolution error,
86
- # the other two are schema drift.
84
+ # and made the plugin-manager row conditional on `profileContext`.
87
85
  - id: preset-remote
88
86
  name: '@deepseek-ai/dsh-agent-preset'
89
87
  config:
@@ -122,11 +120,6 @@
122
120
  name: '@deepseek-ai/dsh-tool-bash'
123
121
  - id: tool-fs
124
122
  name: '@deepseek-ai/dsh-tool-fs'
125
- config:
126
- # Intentional divergence from the stock `false`: the remote world
127
- # serves protocol 3 (fs.patch/fs.delete/fs.move), so apply_patch is
128
- # real for remote files as well as local ones. Stock stays false.
129
- applyPatch: true
130
123
  - id: tool-fs-search
131
124
  name: '@deepseek-ai/dsh-tool-fs-search'
132
125
  config:
@@ -155,58 +148,18 @@
155
148
  - id: plan-mode
156
149
  name: '@deepseek-ai/dsh-plan-mode'
157
150
  config:
158
- section: >
159
- You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode
160
- or switches the session mode. Imperative
161
- language to implement changes means plan the implementation, not
162
- execute it. A user's conversational agreement — including an
163
- answer confirming something you asked — approves nothing and
164
- does not end plan mode; fold the confirmed decision into the
165
- plan and submit it through exit_plan_mode.
166
-
167
-
168
- Explore first. Use non-mutating reads, searches, static
169
- analysis, and checks to ground the plan in the actual
170
- repository. Do not edit or write files, change configuration,
171
- run formatters or code generation that rewrites tracked files,
172
- commit, or otherwise carry out the plan. Prefer existing
173
- functions and patterns over new machinery.
174
-
175
-
176
- The tool catalog stays the same across modes for request-cache
177
- stability. These plan-mode rules override any later tool
178
- description or guidance that suggests using mutation tools;
179
- those tools remain listed to keep the tool catalog unchanged. Do
180
- not use todo_write to track this planning phase: it tracks
181
- implementation after an approved plan, while the plan itself
182
- belongs in exit_plan_mode.
183
-
151
+ section: |
152
+ You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
184
153
 
185
- Resolve discoverable facts by inspection. Use ask_user_question
186
- only for user-owned choices or material ambiguity that
187
- inspection cannot answer. Do not ask the user where code lives
188
- or how current behavior works when you can find out.
154
+ Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
189
155
 
156
+ The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
190
157
 
191
- Make the plan decision-complete: state the goal and success
192
- criteria; group implementation changes by subsystem; identify
193
- public API, schema, and data-flow changes; cover edge cases,
194
- failure modes, tests, acceptance criteria, and explicit
195
- assumptions. Keep it concise enough to review but detailed
196
- enough that another engineer can implement it without making
197
- design decisions.
158
+ Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
198
159
 
160
+ Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
199
161
 
200
- When ready, call exit_plan_mode with the complete plan markdown,
201
- starting with a # title. Make exit_plan_mode the only and final
202
- tool call in that assistant response: it presents the plan for
203
- approval, and implementation begins only in a later step after
204
- approval. Do not paste the final plan as a plain reply or ask
205
- "should I proceed?" through prose or ask_user_question. If
206
- review rejects it, incorporate the feedback and present again.
207
- If the review channel is unavailable or aborted, stay in plan
208
- mode and ask the user to switch modes manually; do not proceed
209
- with implementation.
162
+ When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
210
163
  - id: compaction
211
164
  name: cordis:group
212
165
  group: true
@@ -263,10 +216,12 @@
263
216
  config:
264
217
  fetch: true
265
218
  searchTimeoutMs: 60000
219
+ - id: tool-cordis
220
+ name: '@deepseek-ai/dsh-tool-cordis'
266
221
  - id: present
267
222
  name: '@deepseek-ai/dsh-tool-present'
268
- - id: tool-office
269
- name: '@deepseek-ai/dsh-tool-office'
223
+ - id: tool-document
224
+ name: '@deepseek-ai/dsh-tool-document'
270
225
  - id: tool-plugin-manager
271
226
  name: '@deepseek-ai/dsh-plugin-manager/tools'
272
227
  disabled: !!js "!ctx.get('profileContext')"