dsh-remote-vs 0.21.1 → 0.23.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 (52) hide show
  1. package/README.en.md +489 -473
  2. package/README.md +434 -424
  3. package/cordis.patch.yml +13 -5
  4. package/lib/client.js +946 -256
  5. package/lib/index.js +187 -15
  6. package/lib/p2-router-fs.js +6 -7
  7. package/lib/types/changes/recorder.d.ts +21 -0
  8. package/lib/types/changes/status.d.ts +41 -1
  9. package/lib/types/changes/text-diff.d.ts +18 -0
  10. package/lib/types/client/changes/ChangesDock.d.ts +9 -2
  11. package/lib/types/client/changes/model.d.ts +3 -1
  12. package/lib/types/client/changes/review-state.d.ts +67 -0
  13. package/lib/types/client/notices.d.ts +35 -0
  14. package/lib/types/client/store.d.ts +51 -0
  15. package/lib/types/client/vsc/change-marks.d.ts +17 -0
  16. package/lib/types/client/vsc/kit.d.ts +9 -0
  17. package/lib/types/deploy.d.ts +28 -2
  18. package/lib/types/notices.d.ts +22 -0
  19. package/lib/types/p2/router-fs.d.ts +4 -5
  20. package/lib/types/p2/worlds.d.ts +10 -0
  21. package/lib/types/protocol.d.ts +37 -1
  22. package/lib/{worlds-DSzyajOB.js → worlds-DXdP4SMn.js} +80 -4
  23. package/package.json +37 -37
  24. package/src/changes/recorder.ts +93 -28
  25. package/src/changes/status.ts +69 -2
  26. package/src/changes/text-diff.ts +42 -0
  27. package/src/client/DirectoryFlow.tsx +65 -5
  28. package/src/client/api.ts +5 -0
  29. package/src/client/changes/ChangesDock.tsx +241 -39
  30. package/src/client/changes/changes.css +122 -9
  31. package/src/client/changes/model.ts +106 -22
  32. package/src/client/changes/review-state.ts +133 -0
  33. package/src/client/i18n.ts +48 -8
  34. package/src/client/index.tsx +24 -5
  35. package/src/client/notices.ts +86 -0
  36. package/src/client/store.tsx +186 -2
  37. package/src/client/vsc/change-marks.ts +39 -6
  38. package/src/client/vsc/kit.tsx +16 -1
  39. package/src/client/vsc/vsc.css +23 -0
  40. package/src/deploy.ts +38 -2
  41. package/src/http.ts +12 -1
  42. package/src/notices.ts +37 -0
  43. package/src/p2/router-fs.ts +5 -6
  44. package/src/p2/worlds.ts +46 -2
  45. package/src/protocol.ts +37 -1
  46. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.helper.json +19 -0
  47. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz +4 -0
  48. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz.sha256 +1 -0
  49. package/vendor/dsh-remote-helpers/ssh-helper-runtime-deps.patch +14 -0
  50. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.1-alpha.2-linux-x64.helper.json +0 -16
  51. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.1-alpha.2-linux-x64.tar.gz +0 -4
  52. package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.1-alpha.2-linux-x64.tar.gz.sha256 +0 -1
package/src/protocol.ts CHANGED
@@ -471,6 +471,18 @@ export interface RemoteChangedFile {
471
471
  oversized?: true
472
472
  /** Change kind from --name-status; undefined when git gave none. */
473
473
  status?: 'A' | 'M' | 'D' | 'R' | 'C' | 'T' | 'U'
474
+ /**
475
+ * What "undo this file" may do, decided by the HOST (the client never guesses).
476
+ *
477
+ * - `patch`: a real reverse patch exists — reverting restores the session
478
+ * baseline in one `git apply -R`.
479
+ * - `delete`: the file is a whole-file CREATION git has a copy of (a tracked
480
+ * addition), so the only reverse is deleting it. Recoverable from the index,
481
+ * but still a destructive write, so the client must confirm it.
482
+ * - absent: nothing can be undone — an UNTRACKED creation (git holds no copy),
483
+ * a binary, or a file whose bytes were withheld by the size caps.
484
+ */
485
+ revert?: 'patch' | 'delete'
474
486
  }
475
487
 
476
488
  /**
@@ -493,8 +505,23 @@ export interface RemoteChangesSummary {
493
505
  deleted: number
494
506
  /** Wall-clock ms when this summary was last recomputed. */
495
507
  at: number
496
- /** More files than the cap: `files` is truncated but the totals are whole. */
508
+ /**
509
+ * More files than the cap: `files` is truncated and so are `added` / `deleted`.
510
+ *
511
+ * The totals are summed from the rows that made it into `files` (the cost of
512
+ * counting the rest is a read per path), which is why the panel says "N files
513
+ * changed" about a subset and must not present the counts as whole-tree
514
+ * totals.
515
+ */
497
516
  truncated?: true
517
+ /**
518
+ * Directory names the new-file scan was told to skip (build output, caches).
519
+ *
520
+ * Present only when the exclusion ran, and listed rather than merely applied:
521
+ * a file the user expected to see must never be missing without a reason. The
522
+ * SCM panel stays the surface that shows every path.
523
+ */
524
+ excludedDirs?: string[]
498
525
  /** A scan is running right now (the slow one counts); the list will refresh. */
499
526
  pending: boolean
500
527
  /** Why this session has no ledger (local session, no git, timeout, …). */
@@ -509,6 +536,15 @@ export interface RemoteChangesDiff {
509
536
  display: string
510
537
  /** Text hunks (empty for binary/missing). */
511
538
  hunks: UnifiedHunk[]
539
+ /**
540
+ * The WHOLE file as one reverse-applicable patch (`git apply -R`).
541
+ *
542
+ * One write instead of one per hunk, which is what "revert everything this
543
+ * session did to this file" needs. Empty when the reverse is not expressible
544
+ * as a patch (see `RemoteChangedFile.revert`), which is the fail-closed answer
545
+ * the client must not try to build itself.
546
+ */
547
+ patch?: string
512
548
  /** File status at turn end (A/M/D/…), when git reported one. */
513
549
  status?: 'A' | 'M' | 'D' | 'R' | 'C' | 'T' | 'U'
514
550
  /** The diff was cut at the byte cap: `hunks` is a prefix. */
@@ -0,0 +1,19 @@
1
+ {
2
+ "kind": "executable",
3
+ "version": "0.2.2-rc.4",
4
+ "platform": "linux-x64",
5
+ "target": "node24-linux-x64",
6
+ "tarball": "dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz",
7
+ "tarballSha256": "05c50b383b1f0b5c5673d7ef962cb0ab36774b40e2beb523ffef0ce92b075705",
8
+ "binarySha256": "8b400153e7071825402faf76ed7dd50deb0c81babd9f961307e18a278dcf27e1",
9
+ "protocol": 3,
10
+ "nodeVersion": "v24.22.3",
11
+ "glibcCeiling": "2.35",
12
+ "builtAt": "2026-11-18T14:21:26+08:00",
13
+ "builtOn": "WSL2 Ubuntu-22.04 (glibc 2.35), build host node v24.21.0 / pkg-embedded node v24.22.3, pnpm 11.28.5, tag dsh-v0.2.2-rc.4 (3f321d32bfe382212a8ed8785c1d47a5a300aa23)",
14
+ "sourcePatch": [
15
+ "glibc-ceiling.patch",
16
+ "ssh-helper-runtime-deps.patch"
17
+ ],
18
+ "notes": "Protocol 3 (generation G2: fs.patch/fs.delete/fs.move present). Two upstream tag defects required source patches: (1) @deepseek-ai/dsh-error is a required peer of dsh-llm/dsh-sandbox/dsh-subprocess/dsh-win32-process but missing from packages/ssh/ssh-helper-runtime dependencies -> verifyRuntimeClosure aborts; (2) @deepseek-ai/dsh-fs-patch is a dependency of dsh-fs-local but compileRuntime() only builds packages listed in that manifest, so its lib/ never existed -> probeHelper handshake ERR_MODULE_NOT_FOUND. Both fixed by ssh-helper-runtime-deps.patch (2 added dependencies). glibc ceiling relaxed from upstream 2.28 to 2.35 because there is no docker for the manylinux pty recompile and the fleet glibc is 2.35. Official 8-check suite passed (verify-ssh-helper-artifact --archive=... --sandbox=required): executable-handshake, guarded-files-and-streams, managed-process-output, process-cancellation, native-pty, native-flock, embedded-ptc-and-deadline, sandbox-enforcement."
19
+ }
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz
3
+ size: 47234718 bytes
4
+ sha256: 05c50b383b1f0b5c5673d7ef962cb0ab36774b40e2beb523ffef0ce92b075705
@@ -0,0 +1 @@
1
+ 05c50b383b1f0b5c5673d7ef962cb0ab36774b40e2beb523ffef0ce92b075705 dsh-ssh-helper-0.2.2-rc.4-linux-x64.tar.gz
@@ -0,0 +1,14 @@
1
+ diff --git a/packages/ssh/ssh-helper-runtime/package.json b/packages/ssh/ssh-helper-runtime/package.json
2
+ index f58eabc2..34dd09c8 100644
3
+ --- a/packages/ssh/ssh-helper-runtime/package.json
4
+ +++ b/packages/ssh/ssh-helper-runtime/package.json
5
+ @@ -62,6 +62,8 @@
6
+ "@deepseek-ai/dsh-util-values": "workspace:*",
7
+ "@deepseek-ai/dsh-win32-process": "workspace:*",
8
+ "@deepseek-ai/node-addon-system": "workspace:~",
9
+ - "@deepseek-ai/schemastery": "workspace:~"
10
+ + "@deepseek-ai/schemastery": "workspace:~",
11
+ + "@deepseek-ai/dsh-error": "workspace:*",
12
+ + "@deepseek-ai/dsh-fs-patch": "workspace:*"
13
+ }
14
+ }
@@ -1,16 +0,0 @@
1
- {
2
- "kind": "executable",
3
- "version": "0.2.1-alpha.2",
4
- "platform": "linux-x64",
5
- "target": "node24-linux-x64",
6
- "tarball": "dsh-ssh-helper-0.2.1-alpha.2-linux-x64.tar.gz",
7
- "tarballSha256": "241c1e96e4fec14808440ac767bce5df64d566164f9fb3f338f2474aa2c50421",
8
- "binarySha256": "a19a508d4e0659713f88ea32307a2cec4b4c16afa62e92c0a9fb8e41bdf7c3da",
9
- "protocol": 2,
10
- "nodeVersion": "v24.21.0",
11
- "glibcCeiling": "2.35",
12
- "builtAt": "2026-10-12T14:27:00+08:00",
13
- "builtOn": "WSL2 Ubuntu-22.04 (glibc 2.35), node v24.21.0, pnpm 11.28.5, tag dsh-v0.2.1-alpha.2 (d7432673)",
14
- "sourcePatch": "glibc-ceiling.patch",
15
- "notes": "Upstream gate (2.28) relaxed to 2.35 via DSH_GLIBC_CEILING: no docker for the manylinux pty recompile; fleet glibc is 2.35. Official 8-check suite passed (verify-ssh-helper-artifact --sandbox=required)."
16
- }
@@ -1,4 +0,0 @@
1
- [diffend] Oversized file quarantined before diffing.
2
- name: package/vendor/dsh-remote-helpers/dsh-ssh-helper-0.2.1-alpha.2-linux-x64.tar.gz
3
- size: 46734323 bytes
4
- sha256: 241c1e96e4fec14808440ac767bce5df64d566164f9fb3f338f2474aa2c50421
@@ -1 +0,0 @@
1
- 241c1e96e4fec14808440ac767bce5df64d566164f9fb3f338f2474aa2c50421 dsh-ssh-helper-0.2.1-alpha.2-linux-x64.tar.gz