@dsh-electron/dsh-plugin-multi-root-workspace 0.1.10 → 0.1.12

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 (60) hide show
  1. package/CHANGELOG.en.md +25 -1
  2. package/CHANGELOG.md +25 -1
  3. package/README.en.md +11 -9
  4. package/README.md +11 -9
  5. package/cordis.patch.yml +3 -2
  6. package/lib/auto-review.js +1 -1
  7. package/lib/client.js +252 -129
  8. package/lib/client.js.map +1 -1
  9. package/lib/{command-BGdz7VBH.js → command-CmLekG1M.js} +3 -2
  10. package/lib/command.js +1 -1
  11. package/lib/{compat-D-MljsPV.js → compat-Bg2HFVMX.js} +6 -1
  12. package/lib/compat.js +1 -1
  13. package/lib/{sandbox-CXk5h-ct.js → dialects-Dr4rDR-H.js} +6 -264
  14. package/lib/{fs-BTXySwSG.js → fs-CfzJq2wd.js} +23 -8
  15. package/lib/fs.js +1 -1
  16. package/lib/index.js +7 -6
  17. package/lib/{instructions-MePoRigy.js → instructions-KsUwUFE0.js} +53 -37
  18. package/lib/instructions.js +1 -1
  19. package/lib/lsp.js +19 -16
  20. package/lib/native-win32-2waCRkPI.js +312 -0
  21. package/lib/process-fence.js +62 -12
  22. package/lib/protocol-4zdwV7u4.js +641 -0
  23. package/lib/{registry-KSsmU393.js → registry-YTUOjmVu.js} +368 -25
  24. package/lib/registry-operation-C2ZV3Jhw.js +116 -0
  25. package/lib/registry.js +3 -2
  26. package/lib/{review-context-AH-SXHmj.js → review-context-NDpKeMCc.js} +1 -1
  27. package/lib/review-context.js +1 -1
  28. package/lib/sandbox-C-vCJCp3.js +278 -0
  29. package/lib/sandbox.js +1 -1
  30. package/lib/scope.js +70 -10
  31. package/lib/skills.js +48 -29
  32. package/lib/types/authority/native-win32.d.ts +7 -0
  33. package/lib/types/authority/native.d.ts +23 -0
  34. package/lib/types/authority/protocol.d.ts +70 -0
  35. package/lib/types/client/open-in-app/OpenInAppAction.d.ts +5 -3
  36. package/lib/types/client/open-in-app/OpenTargetButton.d.ts +16 -10
  37. package/lib/types/client/open-in-app/adapter.d.ts +5 -1
  38. package/lib/types/client/open-in-app/controller.d.ts +5 -2
  39. package/lib/types/client/open-in-app/device.d.ts +11 -0
  40. package/lib/types/client/open-in-app/locales.d.ts +1 -1
  41. package/lib/types/client/open-in-app/open-path.d.ts +6 -5
  42. package/lib/types/client/open-in-app/open-toast.d.ts +39 -0
  43. package/lib/types/client/open-in-app/outcome.d.ts +23 -0
  44. package/lib/types/client/styles.d.ts +1 -1
  45. package/lib/types/compat/authority-storage.d.ts +6 -0
  46. package/lib/types/compat/dsh-version.d.ts +4 -4
  47. package/lib/types/compat/open-in-app-device.d.ts +23 -0
  48. package/lib/types/compat/process-entrypoints.d.ts +2 -0
  49. package/lib/types/compat/process-profile.d.ts +3 -0
  50. package/lib/types/compat/sandbox-confine.d.ts +2 -0
  51. package/lib/types/fs.d.ts +4 -1
  52. package/lib/types/instructions.d.ts +0 -47
  53. package/lib/types/registry-operation.d.ts +31 -0
  54. package/lib/types/registry.d.ts +47 -6
  55. package/lib/types/scope.d.ts +12 -0
  56. package/lib/types/skills/catalog.d.ts +3 -0
  57. package/lib/types/skills/pool.d.ts +1 -1
  58. package/lib/workspace-files.js +63 -7
  59. package/package.json +87 -80
  60. package/lib/types/client/open-in-app/open-failure-toast.d.ts +0 -11
package/CHANGELOG.en.md CHANGED
@@ -8,6 +8,28 @@ This file records the user-visible changes of every **released** version.
8
8
  - For installation sources, the supported upstream runtimes, and known limitations, see the [README](./README.en.md).
9
9
  - The evidence, numbering, and release state of each version live in the [roadmap progress ledger](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账). The body of each GitHub Release is generated from the commit history by `scripts/release-notes.mjs` and is the complete raw list behind this file.
10
10
 
11
+ ## [0.1.12] - 2026-10-30
12
+
13
+ ### Added
14
+
15
+ - **Multiple Hosts can use additional roots at the same time (on by default)**: the bundle now configures a shared storage authority (`sharedStorageRoot`) — previously only the Host holding the store lease could use additional roots, and a second Host sharing the same registry was fail-closed. Now a single owner opens the storage medium and manages persistence, while the other Hosts read and write through their own Registry facades over kernel-authenticated local IPC; every mutation and each new operation's admission is ordered at the owner: operations that arrive after a revocation are refused immediately, ones admitted before it may finish, and a disconnect preserves the established deny boundary; when the owner exits or crashes a follower contends, takes over, and recovers under a new epoch, and a lost committed reply is never replayed. Copied exec argv and expired handles cannot stand in for a fresh admission, the synchronous confine/spawn entry points keep their return shape, and every consumer path (fs, sandbox, shell/PTC/agent PTY, LSP, Files/watch, instructions, Skills) goes through admission. Profiles without `sharedStorageRoot` keep the legacy contended-fail-closed behavior ([ADR-0024](./docs/decisions/ADR-0024-registry-operation-admission.md), [ADR-0025](./docs/decisions/ADR-0025-shared-registry-authority.md), [shared service architecture](./docs/architecture/registry-authority-service.md)).
16
+ - **Exact support for DSH `0.2.1-rc.5`**: the delta from `0.2.1-rc.4` does not touch this plugin's interfaces, so no new adapter branch is needed; the dev pin stays at `0.2.2-alpha.2` and the support matrix now covers 20 exact releases.
17
+
18
+ ### Changed
19
+
20
+ - **Dependency security floors raised**: the plugin's direct `zod` floor moves to `^4.6.7`; on the development side `vitest` moves to `^4.1.12`, and `@modelcontextprotocol/sdk` `^1.32.2` is declared explicitly to keep GenAI's optional `mcpToTool` capability on a fixed release. The full development tree's advisories drop from 1 critical / 17 high / 27 moderate to 5 high / 6 moderate; the remaining advisories in host trees are introduced by DSH's own exact pins (e.g. zod `4.4.3`, Undici `8.11.2`) and are not resolved by this plugin release ([dependency security review](./docs/troubleshooting/dependency-security-alerts.md)).
21
+
22
+ ## [0.1.11] - 2026-10-29
23
+
24
+ ### Added
25
+
26
+ - **Exact support for DSH `0.2.1-rc.4` and `0.2.2-alpha.2`**: the `rc.4` probe was fully green with no adapter changes; `0.2.2-alpha.2` splits tool execution out of `dsh-tools` into executors and gives `AgentRegistry` a new `sessionProjections` injection — neither touches plugin source. Upstream's new `SandboxExecutionPolicy.additionalWritableRoots` (a native third writable-root path unrelated to this fork) composes correctly with the widened provider, pinned by a new regression spec asserting both grants take effect. The dev pin moves to `0.2.2-alpha.2` (cordis `4.0.6-alpha.1`, Node ≥24.9). The client forks (files-tree, open-in-app) are re-synced to the `0.2.2-alpha.2` baseline — hover rules moved under `@media (hover: hover)` and open-in-app failure feedback became an app-wide `shell.overlay` outcome toast.
27
+ - **Upgrade lane and CI**: the CI verify matrix now routes by a known list — `0.1.*` / `0.2.0` / `0.2.1` run on Node `22.19.0`, everything else (including 0.2.2 and later) on `24.9.0`; the upgrade script additionally pins the target release's own cordis ecosystem (plugin-loader/group/include, schemastery, cosmokit) when repointing, so an older tree cannot mix with the alpha-line packages the committed lockfile prefers.
28
+
29
+ ### Fixed
30
+
31
+ - **Skills refresh feedback loop caused by repeated Registry-authority notifications ([Issue #24](https://github.com/cherrchen/dsh-plugin-multi-root-workspace/issues/24))**: while a second DSH process contends for the registry lease (or the store fails to open), every additional-root Skills query retried the lease through `refresh()`; on failure `setRegistryAuthority(false)` notified listeners even though the state had not changed, invalidating the Skills cache and broadcasting `skills/change` — clients re-query on every event, closing an unbounded feedback loop: the contending Host burned about one CPU core while idle, grew memory, and eventually died of V8 OOM, and zero additional roots did not prevent it. Listeners are now notified only on a real `available`/`unavailable` transition; the lease retry, takeover after the holder exits, and the fail-closed "primary root only while authority is unavailable" semantics are unchanged ([troubleshooting](./docs/troubleshooting/registry-owned-by-another-process.md#skills-查询导致持续刷新issue-24), [ADR-0023 revision](./docs/decisions/ADR-0023-multi-root-skill-discovery-and-invocation.md#4-生命周期缓存与撤销)).
32
+
11
33
  ## [0.1.10] - 2026-10-25
12
34
 
13
35
  ### Added
@@ -181,7 +203,9 @@ The first release: the three MVP milestones (M1–M3).
181
203
 
182
204
  - All eight findings of the pre-release external review (three of them release-blocking) are fixed, each with a regression test: a registered directory replaced by a symlink transplanting its authority (which introduced `recordedPath` — **re-resolving a path is not re-authorizing it**), concurrent registry mutations losing a write or reviving a revoked grant (per-primary-root mutations are serialized), a refresh not re-checking directories, a typed path being overwritten by the directory picker, the `reveal` response contract and failure code, duplicate ids not validated, the primary root missing from nesting validation, and CI testing before building.
183
205
 
184
- [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.10...HEAD
206
+ [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.12...HEAD
207
+ [0.1.12]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.11...v0.1.12
208
+ [0.1.11]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.10...v0.1.11
185
209
  [0.1.10]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.9...v0.1.10
186
210
  [0.1.9]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.8...v0.1.9
187
211
  [0.1.8]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.7...v0.1.8
package/CHANGELOG.md CHANGED
@@ -8,6 +8,28 @@ English: [CHANGELOG.en.md](./CHANGELOG.en.md)
8
8
  - 安装方式、受支持的上游运行时与已知限制见 [README](./README.md)。
9
9
  - 每个版本的实施证据、编号口径与发布状态见[路线图 §进度总账](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账);GitHub Release 的正文由 `scripts/release-notes.mjs` 从 commit 历史生成,是本文件之外的完整原始清单。
10
10
 
11
+ ## [0.1.12] - 2026-10-30
12
+
13
+ ### Added
14
+
15
+ - **多个 Host 可同时使用附加根(默认开启)**:bundle 现默认配置共享存储权威(`sharedStorageRoot`)——此前只有持有 store 租约的 Host 能使用附加根,共享同一登记的第二个 Host 一律 fail-closed。现在唯一 owner 打开存储介质并管理持久化,其余 Host 经本机内核认证的 IPC 通过各自的 Registry facade 读写;所有变更与每个新操作的授权在 owner 处统一排序:撤权后的新操作立即被拒,撤权前已准入的操作可以完成,断线/失联时保留既有拒绝边界;owner 退出或崩溃时 follower 竞选接管并以新 epoch 恢复,丢失的已提交应答不会自动重放。已复制的执行参数与过期句柄不能顶替新准入,同步 confine/spawn 入口保持原有返回形状;fs、sandbox、shell/PTC/agent PTY、LSP、Files/watch、指令与 Skills 消费路径全部接入准入。未启用 `sharedStorageRoot` 的 profile 保留旧的「争用即 fail-closed」行为([ADR-0024](./docs/decisions/ADR-0024-registry-operation-admission.md)、[ADR-0025](./docs/decisions/ADR-0025-shared-registry-authority.md)、[共享服务架构](./docs/architecture/registry-authority-service.md))。
16
+ - **精确支持 DSH `0.2.1-rc.5`**:相对 `0.2.1-rc.4` 没有触及本插件的接口变化,不新增适配分支;开发 pin 保持 `0.2.2-alpha.2`,支持矩阵现为 20 个精确版本。
17
+
18
+ ### Changed
19
+
20
+ - **依赖安全下限提升**:本插件直接依赖的 `zod` 下限升至 `^4.6.7`;开发侧 `vitest` 升至 `^4.1.12`,并显式声明 `@modelcontextprotocol/sdk` `^1.32.2` 以保留 GenAI `mcpToTool` 的可选能力。完整开发树的公告告警从 1 critical / 17 high / 27 moderate 降为 5 high / 6 moderate;宿主树中剩余告警均由 DSH 精确 pin 引入(如 zod `4.4.3`、Undici `8.11.2`),不随本插件版本解决([依赖安全排查](./docs/troubleshooting/dependency-security-alerts.md))。
21
+
22
+ ## [0.1.11] - 2026-10-29
23
+
24
+ ### Added
25
+
26
+ - **精确支持 DSH `0.2.1-rc.4` 与 `0.2.2-alpha.2`**:`rc.4` 探针全绿、无需任何适配改动;`0.2.2-alpha.2` 把工具执行从 `dsh-tools` 拆出为独立执行器,`AgentRegistry` 新增注入 `sessionProjections`,本插件源码均不受影响。上游新增 `SandboxExecutionPolicy.additionalWritableRoots`(原生与 fork 无关的第三路可写根),宽授权 provider 与其正确复合——新回归用例钉住双方 grant 同时生效。开发 pin 提升到 `0.2.2-alpha.2`(cordis `4.0.6-alpha.1`,Node ≥24.9)。客户端 fork(files-tree、open-in-app)已对齐 `0.2.2-alpha.2` 基线——hover 规则移入 `@media (hover: hover)`,open-in-app 失败反馈改为应用级 `shell.overlay` outcome toast。
27
+ - **升级通道与 CI**:CI verify 矩阵改为按已知名单分流——`0.1.*` / `0.2.0` / `0.2.1` 走 Node `22.19.0`,其余(含 0.2.2 及以后)走 Node `24.9.0`;升级脚本在重指旧版本时会顺带钉住该版本自带的 cordis 生态(plugin-loader/group/include、schemastery、cosmokit),避免与提交锁文件的 alpha 行混树。
28
+
29
+ ### Fixed
30
+
31
+ - **Registry Authority 重复通知引发的 Skills 刷新反馈循环([Issue #24](https://github.com/cherrchen/dsh-plugin-multi-root-workspace/issues/24))**:第二个 DSH 进程争用登记表 lease(或存储打开失败)时,附加根 Skills 的每次查询都经 `refresh()` 重试 lease;失败后 `setRegistryAuthority(false)` 即使状态没有变化也通知监听者,使 Skills 缓存失效并广播 `skills/change`,收到事件的客户端立即重查,形成无界反馈循环——等待方 Host 空闲时持续占用约一个 CPU 核心、内存增长直至 V8 OOM,零附加根同样可触发。现在仅在实际状态变化时通知;lease 重试、持锁方退出后的接管、以及「权限不可用时仅主根可写」的 fail-closed 语义不变([故障排查](./docs/troubleshooting/registry-owned-by-another-process.md#skills-查询导致持续刷新issue-24)、[ADR-0023 修订](./docs/decisions/ADR-0023-multi-root-skill-discovery-and-invocation.md#4-生命周期缓存与撤销))。
32
+
11
33
  ## [0.1.10] - 2026-10-25
12
34
 
13
35
  ### Added
@@ -181,7 +203,9 @@ English: [CHANGELOG.en.md](./CHANGELOG.en.md)
181
203
 
182
204
  - 发布前外部评审提出的 8 项发现(其中 3 项发布阻断)全部修复,每项各带一个回归测试:登记目录被替换为符号链接后授权转移(引入 `recordedPath`,**重新解析路径不等于重新授权**)、并发修改注册表丢写或复活已撤销的授权(每个主根的变更串行)、刷新不重新检查目录、手输路径被目录选择器覆盖、`reveal` 的应答契约与失败码、重复 id 未校验、主根未纳入嵌套校验、CI 先测后构建。
183
205
 
184
- [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.10...HEAD
206
+ [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.12...HEAD
207
+ [0.1.12]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.11...v0.1.12
208
+ [0.1.11]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.10...v0.1.11
185
209
  [0.1.10]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.9...v0.1.10
186
210
  [0.1.9]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.8...v0.1.9
187
211
  [0.1.8]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.7...v0.1.8
package/README.en.md CHANGED
@@ -20,7 +20,7 @@ Not every project is a monorepo. A real development project is usually several i
20
20
  - **Additional-root Skills**: discovers `.dsh/skills` and `.agents/skills` inside additional folders, invoked through the namespaced `/alias-id:skill-name` reference and the native `skill` tool; each root has an independent toggle and editable `aliasId`, with a global setting that defaults to on.
21
21
  - **Absent when absent**: with no additional root configured, its behavior is item-for-item identical to an uninstalled harness; every misconfiguration fails loudly instead of silently degrading.
22
22
 
23
- Current released version: `v0.1.10`. The user-visible changes of each version live in the [CHANGELOG](./CHANGELOG.en.md); progress and release state live in the [roadmap progress ledger](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账).
23
+ Current released version: `v0.1.12`. The user-visible changes of each version live in the [CHANGELOG](./CHANGELOG.en.md); progress and release state live in the [roadmap progress ledger](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账).
24
24
 
25
25
  ## Quick Start
26
26
 
@@ -49,11 +49,12 @@ The agent can now read, write, and run bash in that directory — the default is
49
49
  | `0.1.6` | `0.1.6-alpha.1`, `0.1.6-alpha.2` |
50
50
  | `0.1.7` | `0.1.7-alpha.1`, `0.1.7-alpha.2`, `0.1.7-rc.1`, `0.1.7-rc.2` |
51
51
  | `0.2.0` | `0.2.0-rc.1`, `0.2.0-rc.2` |
52
- | `0.2.1` | `0.2.1-alpha.1`, `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3` |
52
+ | `0.2.1` | `0.2.1-alpha.1`, `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.1-rc.5` |
53
+ | `0.2.2` | `0.2.2-alpha.2` |
53
54
 
54
55
  The plugin does not start — as if it were not installed — when the DSH release is not in the table or the `@deepseek-ai/dsh-*` packages disagree on a version.
55
56
 
56
- **Building from source / contributing**: Node.js `^22.19.0 || >=24`, pnpm `11.25.0` (enable via corepack); the dev-pinned DSH is `0.2.1-rc.3`.
57
+ **Building from source / contributing**: Node.js `^22.19.0 || >=24`, pnpm `11.25.0` (enable via corepack); the dev-pinned DSH is `0.2.2-alpha.2` (Node ≥24.9).
57
58
 
58
59
  **Platforms**: macOS (Seatbelt), Linux (bwrap / Landlock), Windows (root-set ACL runner).
59
60
 
@@ -92,8 +93,8 @@ This installs pre-built artifacts; the first install needs the `allowBuilds` add
92
93
  ```sh
93
94
  pnpm pack @dsh-electron/dsh-plugin-multi-root-workspace
94
95
  # or download the tgz from the GitHub Release assets, e.g.:
95
- # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.10/dsh-electron-dsh-plugin-multi-root-workspace-0.1.10.tgz
96
- dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.10.tgz
96
+ # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.12/dsh-electron-dsh-plugin-multi-root-workspace-0.1.12.tgz
97
+ dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.12.tgz
97
98
  ```
98
99
 
99
100
  Also pre-built, handy for air-gapped or offline delivery; the first install needs the same `allowBuilds` addition.
@@ -112,10 +113,10 @@ allowBuilds:
112
113
  koffi: true
113
114
  ```
114
115
 
115
- Pinning a version (e.g. `#v0.1.10`) is recommended so a later push cannot silently change what actually runs:
116
+ Pinning a version (e.g. `#v0.1.12`) is recommended so a later push cannot silently change what actually runs:
116
117
 
117
118
  ```sh
118
- dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.10
119
+ dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.12
119
120
  ```
120
121
 
121
122
  ### Install from a local clone
@@ -180,6 +181,7 @@ Expected output:
180
181
  - id: multi-root-registry
181
182
  name: '@dsh-electron/dsh-plugin-multi-root-workspace/registry'
182
183
  config:
184
+ sharedStorageRoot: !!js dshHomePath('storages')
183
185
  leasePath: !!js dshHomePath('storages/multi_root_workspace.lock')
184
186
  maxAdditionalRoots: 16
185
187
  - id: multi-root-instructions
@@ -259,7 +261,7 @@ For multi-root reviewer context, enable the default-disabled [Auto Review row](.
259
261
  .
260
262
  ├── src/
261
263
  │ ├── roots.ts pure rules: canonicalization, conflict validation, record classification (available/missing/redirected/invalid)
262
- │ ├── registry.ts the root registry: dsh-storage-domain persistence, mutations of one primary root serialized in one queue
264
+ │ ├── registry.ts one storage core and Host facades, store-wide ordering of mutations and admissions
263
265
  │ ├── registry-lease.ts cross-process Registry Authority: POSIX flock (the kernel releases it on process death)
264
266
  │ ├── registry-lease-win32.ts ditto, the Windows named-semaphore implementation
265
267
  │ ├── scope.ts ctx.multiRootScope: the single authorization source, plus the model-visible topology snapshot
@@ -294,7 +296,7 @@ Issues and PRs are welcome:
294
296
  ## Known Limitations
295
297
 
296
298
  - An additional root's instruction files arrive as they become relevant: the one at the root's top level is injected before the session's first step, and a subdirectory's is injected once the session has **successfully** worked in that directory. A nested file is re-examined only when its directory is examined (the root's own every step; a subdirectory's because it was delivered from, or because of a fresh touch), delivery state is in-process (so a resumed session may be told again), and only the `read` / `write` / `edit` tool names count. The primary root's chain and the user-global file remain upstream's job, and this plugin does not inject them a second time ([ADR-0010](./docs/decisions/ADR-0010-additional-root-instruction-scope.md)).
297
- - Single writer per store: only one DSH process at a time may hold the root registry for a given `$DSH_HOME`; another process reports the registry as unavailable (`registry-contended`) and takes over on refresh once the holder exits or crashes. That is deliberate fail-closed behavior, not a race waiting to be fixed ([ADR-0007](./docs/decisions/ADR-0007-registry-authority-lease.md)).
299
+ - Hosts share one Registry service: one Host owns storage and each instance obtains admission for new operations. Disconnection stops new additional-root grants; a successor takes over through the kernel lease. Sharing is local to one user and lock namespace; Linux requires SO_PEERPIDFD, and Windows is limited to one login session. Existing processes and PTYs retain their launch snapshot ([architecture](./docs/architecture/registry-authority-service.md), Chinese).
298
300
  - The supported matrix is an exact-version allowlist: on a host whose release is not on the list, or whose core packages disagree about the release, the `fs` / `sandbox` / `registry` / `instructions` / `lsp` / `workspace-files` rows **do not start** and the composition degrades to "the plugin is not installed" ([ADR-0009](./docs/decisions/ADR-0009-dsh-compat-contract.md)).
299
301
  - The Windows multi-root runner inherits upstream partial enforcement, caller-owned directory requirements, and private-temp isolation. Running processes retain their initial roots; later processes use the updated set ([ADR-0011](./docs/decisions/ADR-0011-multi-root-workspace-consumers.md)).
300
302
  - **Network and device paths cannot be additional roots on Windows**: UNC (`\\server\share`), `\\?\`, `\\.\`, and mapped network drives are rejected at registration with `unsupported-path` — the restricted token's capability SID cannot be shown to bind SMB access ([ADR-0011 amendment](./docs/decisions/ADR-0011-multi-root-workspace-consumers.md)).
package/README.md CHANGED
@@ -20,7 +20,7 @@
20
20
  - **附属根 Skills**:发现附属目录的 `.dsh/skills` 与 `.agents/skills`,附属根经 `/alias-id:skill-name` 命名空间调用原生 `skill` 工具;每根独立开关、可编辑 `aliasId`,全局设置默认开启。
21
21
  - **不配等于没装**:未登记附加根时行为与未装插件逐项一致;配置错误一律明确报错,从不静默降级。
22
22
 
23
- 当前发布版本 `v0.1.10`。各版本的用户可见变更见 [CHANGELOG](./CHANGELOG.md);进度与发布状态见[路线图 §进度总账](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账)。
23
+ 当前发布版本 `v0.1.12`。各版本的用户可见变更见 [CHANGELOG](./CHANGELOG.md);进度与发布状态见[路线图 §进度总账](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账)。
24
24
 
25
25
  ## 快速开始
26
26
 
@@ -51,11 +51,12 @@ tarball、GitHub、本地源码等其他安装方式见[安装](#安装)。
51
51
  | `0.1.6` | `0.1.6-alpha.1`、`0.1.6-alpha.2` |
52
52
  | `0.1.7` | `0.1.7-alpha.1`、`0.1.7-alpha.2`、`0.1.7-rc.1`、`0.1.7-rc.2` |
53
53
  | `0.2.0` | `0.2.0-rc.1`、`0.2.0-rc.2` |
54
- | `0.2.1` | `0.2.1-alpha.1`、`0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2`、`0.2.1-rc.3` |
54
+ | `0.2.1` | `0.2.1-alpha.1`、`0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4`、`0.2.1-rc.5` |
55
+ | `0.2.2` | `0.2.2-alpha.2` |
55
56
 
56
57
  DSH 版本不在表内、或 `@deepseek-ai/dsh-*` 各包版本不一致时,插件不会启动,行为等同没装。
57
58
 
58
- **从源码构建 / 贡献**:Node.js `^22.19.0 || >=24`,pnpm `11.25.0`(建议经 corepack 启用);开发 pin 的 DSH 为 `0.2.1-rc.3`。
59
+ **从源码构建 / 贡献**:Node.js `^22.19.0 || >=24`,pnpm `11.25.0`(建议经 corepack 启用);开发 pin 的 DSH 为 `0.2.2-alpha.2`(Node ≥24.9)。
59
60
 
60
61
  **运行平台**:macOS(Seatbelt)、Linux(bwrap / Landlock)、Windows(root-set ACL runner)。
61
62
 
@@ -94,8 +95,8 @@ dsh plugin --profile web add @dsh-electron/dsh-plugin-multi-root-workspace
94
95
  ```sh
95
96
  pnpm pack @dsh-electron/dsh-plugin-multi-root-workspace
96
97
  # 或从 GitHub Release 资产下载,例如:
97
- # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.10/dsh-electron-dsh-plugin-multi-root-workspace-0.1.10.tgz
98
- dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.10.tgz
98
+ # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.12/dsh-electron-dsh-plugin-multi-root-workspace-0.1.12.tgz
99
+ dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.12.tgz
99
100
  ```
100
101
 
101
102
  同样是预构建产物,适合内网或离线环境交付;首次安装同样需要添加 `allowBuilds`。
@@ -114,10 +115,10 @@ allowBuilds:
114
115
  koffi: true
115
116
  ```
116
117
 
117
- 建议锁定版本(如 `#v0.1.10`),让后续推送无法悄悄改变实际运行的内容:
118
+ 建议锁定版本(如 `#v0.1.12`),让后续推送无法悄悄改变实际运行的内容:
118
119
 
119
120
  ```sh
120
- dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.10
121
+ dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.12
121
122
  ```
122
123
 
123
124
  ### 从本地源码安装
@@ -182,6 +183,7 @@ dsh --profile web --dump-config | grep -A3 'multi-root'
182
183
  - id: multi-root-registry
183
184
  name: '@dsh-electron/dsh-plugin-multi-root-workspace/registry'
184
185
  config:
186
+ sharedStorageRoot: !!js dshHomePath('storages')
185
187
  leasePath: !!js dshHomePath('storages/multi_root_workspace.lock')
186
188
  maxAdditionalRoots: 16
187
189
  - id: multi-root-instructions
@@ -261,7 +263,7 @@ Settings → Plugins → Multi-root Workspace 中的 **启用附属根 Skills**
261
263
  .
262
264
  ├── src/
263
265
  │ ├── roots.ts 纯规则层:canonical 化、冲突校验、登记状态分类(available/missing/redirected/invalid)
264
- │ ├── registry.ts 根注册表:dsh-storage-domain 持久化,同一主根的变更在一条队列里串行
266
+ │ ├── registry.ts 根注册表:dsh-storage-domain 持久化,唯一存储核心与 Host facade,store-wide 准入/变更排序
265
267
  │ ├── registry-lease.ts 跨进程 Registry Authority:POSIX flock(进程死亡由内核释放)
266
268
  │ ├── registry-lease-win32.ts 同上,Windows named semaphore 实现
267
269
  │ ├── scope.ts ctx.multiRootScope:唯一的授权源,兼发模型可见的拓扑快照
@@ -296,7 +298,7 @@ Settings → Plugins → Multi-root Workspace 中的 **启用附属根 Skills**
296
298
  ## 已知限制
297
299
 
298
300
  - 附加根的指令文件按需到达模型:根目录顶层的那一份在会话第一步之前注入,子目录里的那一份在本会话**成功**触碰过该目录之后注入;nested 文件只会在其目录被考察到时重新检查(根层每一步,子目录依赖已投递或有新触碰),投递状态是进程内的(resume 后可能再告知一次),也只识别 `read` / `write` / `edit` 三个工具名。主根与 user-global 的指令链仍由上游负责,本插件不重复注入([ADR-0010](./docs/decisions/ADR-0010-additional-root-instruction-scope.md))。
299
- - 跨进程单写者:同一 `$DSH_HOME` 上同时只允许一个 DSH 进程持有根登记表;另一个进程显示登记表不可用(`registry-contended`),持锁者退出或崩溃后刷新即接管——这是刻意的 fail-closed,不是待修的竞态([ADR-0007](./docs/decisions/ADR-0007-registry-authority-lease.md))。
301
+ - 多 Host 共享同一登记服务:只有一个 Host 管理存储,各实例逐操作取得授权;断线停止新附加授权,权威退出后按内核锁接管。限同机器、同用户及同锁命名空间;Linux 共享连接需要 SO_PEERPIDFD,Windows 限同登录会话。旧进程/PTY 保留启动快照([共享架构](./docs/architecture/registry-authority-service.md))。
300
302
  - 支持矩阵是精确版本 allowlist:宿主版本不在清单上、或核心包混装了不同版本时,`fs` / `sandbox` / `registry` / `instructions` / `lsp` / `workspace-files` 六行**不启动**,组合退化为"没装这个插件"([ADR-0009](./docs/decisions/ADR-0009-dsh-compat-contract.md))。
301
303
  - Windows 多根 runner 继承上游 partial enforcement、caller-owned 目录及 private temp 分离条件;已启动进程保留启动时根集合,后续进程使用更新后的集合([ADR-0011](./docs/decisions/ADR-0011-multi-root-workspace-consumers.md))。
302
304
  - **Windows 上的网络与设备路径不能成为附加根**:UNC(`\\server\share`)、`\\?\`、`\\.\` 与映射网络盘在登记时即以 `unsupported-path` 拒绝——restricted token 的 capability SID 无法绑定 SMB 访问([ADR-0011 修订](./docs/decisions/ADR-0011-multi-root-workspace-consumers.md))。
package/cordis.patch.yml CHANGED
@@ -79,8 +79,9 @@
79
79
  - id: multi-root-registry
80
80
  name: '@dsh-electron/dsh-plugin-multi-root-workspace/registry'
81
81
  config:
82
- # Store-wide kernel lease beside the JSON domain document. A custom
83
- # storage-json.root must override this path in lockstep (ADR-0007).
82
+ # Shared authority owns this explicit JSON medium; followers use IPC.
83
+ # Change both paths together for a custom Registry store (ADR-0025).
84
+ sharedStorageRoot: !!js dshHomePath('storages')
84
85
  leasePath: !!js dshHomePath('storages/multi_root_workspace.lock')
85
86
  # Cap on stored additional-root records per primary root (integer,
86
87
  # 1..64; the count covers every state, so it is stable). A store that
@@ -1,4 +1,4 @@
1
- import { n as assertAutoReviewRelease, t as MultiRootReviewContext } from "./review-context-AH-SXHmj.js";
1
+ import { n as assertAutoReviewRelease, t as MultiRootReviewContext } from "./review-context-NDpKeMCc.js";
2
2
  import { t as assertForkPackages } from "./auto-review-packages-nRjnb4pU.js";
3
3
  import { t as wrapMethod } from "./method-wrapper-CFY3p3j2.js";
4
4
  //#region src/compat/auto-review-loader.ts