@dsh-electron/dsh-plugin-multi-root-workspace 0.1.15 → 0.1.16

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 (39) hide show
  1. package/CHANGELOG.en.md +13 -1
  2. package/CHANGELOG.md +13 -1
  3. package/README.en.md +6 -6
  4. package/README.md +6 -6
  5. package/lib/auto-review.js +1 -1
  6. package/lib/client.js +761 -74
  7. package/lib/client.js.map +1 -1
  8. package/lib/{command-y5tfcAeC.js → command-DaVJ-mK3.js} +55 -1
  9. package/lib/command.js +1 -1
  10. package/lib/index.js +4 -4
  11. package/lib/{instructions-Ck9wp4J4.js → instructions-Ca80SkZq.js} +1 -1
  12. package/lib/instructions.js +1 -1
  13. package/lib/lsp.js +1 -1
  14. package/lib/process-fence.js +95 -12
  15. package/lib/{registry-DyDNDSJZ.js → registry-BibiukWk.js} +1 -1
  16. package/lib/{registry-operation-C2ZV3Jhw.js → registry-operation-CIlmt6_c.js} +5 -1
  17. package/lib/registry.js +1 -1
  18. package/lib/{review-context-B-oHkU6a.js → review-context-OxO-fMWR.js} +1 -1
  19. package/lib/review-context.js +1 -1
  20. package/lib/{sandbox-CZElTNPz.js → sandbox-aobdyQGi.js} +6 -3
  21. package/lib/sandbox.js +1 -1
  22. package/lib/scope.js +91 -4
  23. package/lib/skills.js +1 -1
  24. package/lib/types/client/files-tree/FilesTree.d.ts +49 -6
  25. package/lib/types/client/files-tree/adapter.d.ts +69 -16
  26. package/lib/types/client/files-tree/face.d.ts +31 -2
  27. package/lib/types/client/files-tree/locate.d.ts +74 -0
  28. package/lib/types/client/files-tree/navigator.d.ts +98 -0
  29. package/lib/types/client/index.d.ts +7 -0
  30. package/lib/types/client/locales.d.ts +2 -0
  31. package/lib/types/client/styles.d.ts +1 -1
  32. package/lib/types/compat/files-tree.d.ts +8 -1
  33. package/lib/types/compat/forge-entrypoints.d.ts +44 -0
  34. package/lib/types/compat/session-existence.d.ts +41 -0
  35. package/lib/types/registry-operation.d.ts +7 -0
  36. package/lib/types/roots.d.ts +3 -1
  37. package/lib/types/scope.d.ts +67 -1
  38. package/lib/workspace-files.js +1 -1
  39. package/package.json +1 -1
package/CHANGELOG.en.md CHANGED
@@ -8,6 +8,17 @@ 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.16] - 2026-11-08
12
+
13
+ ### Added
14
+
15
+ - **The preview Folder navigator now works for additional roots**: the document-preview Folder navigator introduced upstream in `0.2.2-alpha.3` is rooted at the session cwd, so previewing a file under an additional root and opening Folder showed the primary root without locating the file. The plugin now retargets the navigator's body to the longest additional root containing the previewed file and replicates the native reveal contract — expanding ancestors level by level, marking the current row with `aria-current` plus the active highlight, and scrolling it into view; opening a row keeps the native `replaceTab` semantics; closing and reopening Folder restores the expansion set and scroll offset. When no additional root matches (including primary-root files), the address belongs to another session, or the host does not mount that navigator, the native navigator is untouched ([ADR-0015](./docs/decisions/ADR-0015-files-tab-plugin-owned-browsing.md), [ADR-0016](./docs/decisions/ADR-0016-files-tab-native-tree-fork.md), Chinese).
16
+
17
+ ### Fixed
18
+
19
+ - **Third-party unadmitted confined spawns are restored to the primary-clamped launch (forge bundle)**: since per-operation admission landed in `v0.1.12`, third-party consumers that call `ctx.sandbox.confine(...)` followed directly by `ctx.subprocess.spawn(...)` outside this plugin's wrapped seams — for example the experimental forge bundle's panel Git checks and worktrees service — were hard-rejected by the process fence as argv of unknown origin. The scope now keeps a bounded minted-profile ledger keyed by the **dispatch-time** publication: only a primary-bounded profile (`clamped` / `read-only`) minted by this process may launch without admission, and only while that publication stays current; any root-table content change or authority flip invalidates it. Reachable `worktrees` / `forgePanel` Session entry points now take a real ordered admission, falling back to unadmitted execution with a warning when admission is unreachable. Forged argv, argv from another process, profiles minted under a superseded publication, and leftovers from expired admission frames stay refused, and OPS protection windows still treat ledger mints as unowned spawns. Known limitation: when the session repository sits in an additional root, panel worktree creation/restoration still runs with the primary-clamped profile, so writes on the additional-root path are denied by the kernel; the model's worktree tool is unaffected ([ADR-0035](./docs/decisions/ADR-0035-unadmitted-confined-spawn.md), Chinese).
20
+ - **The panel distinguishes sessions that exist but are not live in this instance**: when another DSH instance holds a session (cross-process writer lock), or it is still resuming or awaiting a format migration, it never enters this process's SessionStore, so the panel used to answer `session-not-found` ("That session is not active") even though the session is visible on screen — and its retry hint did not apply. `dispatchPanelRequest` now re-runs the resolver at the catch and probes `sessionPersistence.stat`, reclassifying to `session-not-live` only when a persisted snapshot proves existence, with actionable localized copy; a live session that still cannot name a root (missing or non-absolute cwd) and anything the probe cannot prove keep `session-not-found`. Authority is unchanged: only live sessions in this process resolve a primary root ([ADR-0008 amendment](./docs/decisions/ADR-0008-panel-session-derived-authority.md#修订失败码按持久化存在性细分2026-11-07amendment), Chinese).
21
+
11
22
  ## [0.1.15] - 2026-11-06
12
23
 
13
24
  ### Changed
@@ -247,7 +258,8 @@ The first release: the three MVP milestones (M1–M3).
247
258
 
248
259
  - 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.
249
260
 
250
- [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.15...HEAD
261
+ [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.16...HEAD
262
+ [0.1.16]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.15...v0.1.16
251
263
  [0.1.15]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.14...v0.1.15
252
264
  [0.1.14]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.13...v0.1.14
253
265
  [0.1.13]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.12...v0.1.13
package/CHANGELOG.md CHANGED
@@ -8,6 +8,17 @@ 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.16] - 2026-11-08
12
+
13
+ ### Added
14
+
15
+ - **预览页 Folder 导航树支持附加根**:上游 `0.2.2-alpha.3` 引入的文档预览 Folder 导航树原本固定以会话 cwd 为树根,预览附加根中的文件时点开 Folder 看到的仍是主根目录、也不会定位当前文件。插件现在把该导航树的树体接管到被预览文件所在的最长前缀附加根,并复刻原生 reveal 契约:逐层展开祖先、以当前行标记与 `aria-current` 高亮并把该行滚动到可见位置;树内打开文件沿用 `replaceTab` 语义;关闭再打开 Folder 时恢复展开集合与滚动位置。没有匹配的附加根(含主根文件)、跨会话地址或宿主未挂载该导航树时,原生导航树完全不受影响([ADR-0015](./docs/decisions/ADR-0015-files-tab-plugin-owned-browsing.md)、[ADR-0016](./docs/decisions/ADR-0016-files-tab-native-tree-fork.md))。
16
+
17
+ ### Fixed
18
+
19
+ - **第三方插件的准入外受限 spawn 恢复为主根钳制启动(forge bundle)**:自 `v0.1.12` 的逐操作准入起,不经过本插件包装接缝、直接 `ctx.sandbox.confine(...)` 后 `ctx.subprocess.spawn(...)` 的第三方消费者(如实验性 forge bundle 的面板 Git 检查与 worktrees 服务)会被进程围栏当作来源不明的受限 argv 硬性拒绝。现在 scope 维护按**铸造时**发布代次键控的有界铸造台账:只有本进程铸出的主根形态 profile(`clamped` / `read-only`)在铸造发布仍然有效时可无准入启动,根表内容变化或权威可用性翻转即失效;可到达的 `worktrees` / `forgePanel` Session 入口改经真实有序准入包装,准入不可达时退回无准入执行并告警。伪造 argv、他进程 argv、被超越发布或过期准入帧遗留的 profile 继续拒绝,OPS 保护窗口仍把台账 mint 按无归属 spawn 处理。已知局限:Session 仓库位于附加根时,面板的 worktree 创建/恢复仍以主根钳制 profile 执行,附加根路径的写入会被内核拒绝;模型的 worktree 工具不受影响([ADR-0035](./docs/decisions/ADR-0035-unadmitted-confined-spawn.md))。
20
+ - **面板区分「会话存在但未在本实例激活」**:会话被另一个 DSH 实例持有(跨进程 writer 锁)、仍在恢复或等待格式迁移时不会进入本进程的 SessionStore,面板此前一律报 `session-not-found`(「找不到该会话」)——会话明明就在屏幕上,提示的重试动作也不适用。现在 `dispatchPanelRequest` 在失败处复跑 resolver 并探测 `sessionPersistence.stat`,只在能证明持久化快照存在时改报 `session-not-live`,并给出可操作的中英双语提示;活会话仍无法给出主根(cwd 缺失或非绝对)以及探测无法证明存在的情况保持 `session-not-found`。授权合同不变:仍然只有本进程的 live 会话能解析主根([ADR-0008 修订](./docs/decisions/ADR-0008-panel-session-derived-authority.md#修订失败码按持久化存在性细分2026-11-07amendment))。
21
+
11
22
  ## [0.1.15] - 2026-11-06
12
23
 
13
24
  ### Changed
@@ -247,7 +258,8 @@ English: [CHANGELOG.en.md](./CHANGELOG.en.md)
247
258
 
248
259
  - 发布前外部评审提出的 8 项发现(其中 3 项发布阻断)全部修复,每项各带一个回归测试:登记目录被替换为符号链接后授权转移(引入 `recordedPath`,**重新解析路径不等于重新授权**)、并发修改注册表丢写或复活已撤销的授权(每个主根的变更串行)、刷新不重新检查目录、手输路径被目录选择器覆盖、`reveal` 的应答契约与失败码、重复 id 未校验、主根未纳入嵌套校验、CI 先测后构建。
249
260
 
250
- [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.15...HEAD
261
+ [Unreleased]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.16...HEAD
262
+ [0.1.16]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.15...v0.1.16
251
263
  [0.1.15]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.14...v0.1.15
252
264
  [0.1.14]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.13...v0.1.14
253
265
  [0.1.13]: https://github.com/cherrchen/dsh-plugin-multi-root-workspace/compare/v0.1.12...v0.1.13
package/README.en.md CHANGED
@@ -16,12 +16,12 @@ Not every project is a monorepo. A real development project is usually several i
16
16
 
17
17
  - **No new tools**: the agent keeps using the native `read` / `write` / `edit` / `bash`; only the granted directories grow.
18
18
  - **Sandbox confinement**: an additional root may inherit the session's (primary root's) permission setting, or be pinned to read-only or read-write; under read-only and read-write, confinement does not rest on system prompts — it is enforced by an in-process filesystem fence plus kernel-level sandboxes (macOS Seatbelt / Linux bwrap / Landlock / Windows ACL), with native filesystem and bash calls passing through these fences sharing the same scope. Third-party tools that launch their own Workers need separate validation; see the current dsh-ops limitations below.
19
- - **Browse additional roots in the Files tab**: the Files tab header switches between the primary root and any registered additional root; an additional root's directory renders in the same native Files view, with open-file, open-in-app, and auto-refresh behaving identically.
19
+ - **Browse additional roots in the Files tab**: the Files tab header switches between the primary root and any registered additional root; an additional root's directory renders in the same native Files view, with open-file, open-in-app, and auto-refresh behaving identically. The document preview's Folder navigator tree lands on the root containing the previewed file too — locating, expanding, and highlighting exactly as the native navigator does.
20
20
  - **Optional Auto review (off by default)**: a fork of upstream's experimental auto-review that gives the reviewer the additional directories' context — the current workspace topology, each root's access level, and live instruction files; it ships disabled and only takes effect once the `@dsh-electron/dsh-plugin-multi-root-workspace/auto-review` row is explicitly enabled in the Plugin Manager row list, taking over the official bundle while on.
21
21
  - **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.
22
22
  - **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.
23
23
 
24
- Current released version: `v0.1.15`. 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
+ Current released version: `v0.1.16`. 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#进度总账).
25
25
 
26
26
  ## Quick Start
27
27
 
@@ -94,8 +94,8 @@ This installs pre-built artifacts; the first install needs the `allowBuilds` add
94
94
  ```sh
95
95
  pnpm pack @dsh-electron/dsh-plugin-multi-root-workspace
96
96
  # or download the tgz from the GitHub Release assets, e.g.:
97
- # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.15/dsh-electron-dsh-plugin-multi-root-workspace-0.1.15.tgz
98
- dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.15.tgz
97
+ # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.16/dsh-electron-dsh-plugin-multi-root-workspace-0.1.16.tgz
98
+ dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.16.tgz
99
99
  ```
100
100
 
101
101
  Also pre-built, handy for air-gapped or offline delivery; the first install needs the same `allowBuilds` addition.
@@ -114,10 +114,10 @@ allowBuilds:
114
114
  koffi: true
115
115
  ```
116
116
 
117
- Pinning a version (e.g. `#v0.1.15`) is recommended so a later push cannot silently change what actually runs:
117
+ Pinning a version (e.g. `#v0.1.16`) is recommended so a later push cannot silently change what actually runs:
118
118
 
119
119
  ```sh
120
- dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.15
120
+ dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.16
121
121
  ```
122
122
 
123
123
  ### Install from a local clone
package/README.md CHANGED
@@ -16,12 +16,12 @@
16
16
 
17
17
  - **不新增工具**:Agent 照旧使用原生 `read` / `write` / `edit` / `bash`,只是授权的目录变多了。
18
18
  - **沙箱约束**:附加根可继承会话(主目录)的权限设置,也可单独固定为只读或读写;在只读与读写下,约束不靠系统提示词,而由进程内文件围栏 + 内核级沙箱(macOS Seatbelt / Linux bwrap / Landlock / Windows ACL)执行,经本插件围栏的原生文件与 bash 共享同一份授权范围;自行启动 Worker 的第三方工具须单独验证,dsh-ops 的现存缺口见下方已知限制。
19
- - **Files 页签浏览附加根**:Files 页签头部可直接在主根与任一已登记附加根之间切换,附加根的目录树以与主根相同的原生 Files 视图呈现,打开文件、在外部应用打开、自动刷新等操作完全一致。
19
+ - **Files 页签浏览附加根**:Files 页签头部可直接在主根与任一已登记附加根之间切换,附加根的目录树以与主根相同的原生 Files 视图呈现,打开文件、在外部应用打开、自动刷新等操作完全一致;文件预览页的 Folder 导航树同样落在被预览文件所在的根,定位、展开与高亮与原生一致。
20
20
  - **可选 Auto review(默认关闭)**:fork 上游实验性「自动授权审查」,向 Reviewer 补充附加目录的审查上下文——当前工作区拓扑、各根访问级别与实时指令文件;出厂关闭,需在插件管理器的行列表中显式打开 `@dsh-electron/dsh-plugin-multi-root-workspace/auto-review` 行后生效,启用时接管官方同名 bundle。
21
21
  - **附属根 Skills**:发现附属目录的 `.dsh/skills` 与 `.agents/skills`,附属根经 `/alias-id:skill-name` 命名空间调用原生 `skill` 工具;每根独立开关、可编辑 `aliasId`,全局设置默认开启。
22
22
  - **不配等于没装**:未登记附加根时行为与未装插件逐项一致;配置错误一律明确报错,从不静默降级。
23
23
 
24
- 当前发布版本 `v0.1.15`。各版本的用户可见变更见 [CHANGELOG](./CHANGELOG.md);进度与发布状态见[路线图 §进度总账](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账)。
24
+ 当前发布版本 `v0.1.16`。各版本的用户可见变更见 [CHANGELOG](./CHANGELOG.md);进度与发布状态见[路线图 §进度总账](./docs/plans/active/2026-09-12-multi-root-workspace.md#进度总账)。
25
25
 
26
26
  ## 快速开始
27
27
 
@@ -96,8 +96,8 @@ dsh plugin --profile web add @dsh-electron/dsh-plugin-multi-root-workspace
96
96
  ```sh
97
97
  pnpm pack @dsh-electron/dsh-plugin-multi-root-workspace
98
98
  # 或从 GitHub Release 资产下载,例如:
99
- # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.15/dsh-electron-dsh-plugin-multi-root-workspace-0.1.15.tgz
100
- dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.15.tgz
99
+ # https://github.com/cherrchen/dsh-plugin-multi-root-workspace/releases/download/v0.1.16/dsh-electron-dsh-plugin-multi-root-workspace-0.1.16.tgz
100
+ dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.16.tgz
101
101
  ```
102
102
 
103
103
  同样是预构建产物,适合内网或离线环境交付;首次安装同样需要添加 `allowBuilds`。
@@ -116,10 +116,10 @@ allowBuilds:
116
116
  koffi: true
117
117
  ```
118
118
 
119
- 建议锁定版本(如 `#v0.1.15`),让后续推送无法悄悄改变实际运行的内容:
119
+ 建议锁定版本(如 `#v0.1.16`),让后续推送无法悄悄改变实际运行的内容:
120
120
 
121
121
  ```sh
122
- dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.15
122
+ dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.16
123
123
  ```
124
124
 
125
125
  ### 从本地源码安装
@@ -1,4 +1,4 @@
1
- import { n as assertAutoReviewRelease, t as MultiRootReviewContext } from "./review-context-B-oHkU6a.js";
1
+ import { n as assertAutoReviewRelease, t as MultiRootReviewContext } from "./review-context-OxO-fMWR.js";
2
2
  import { t as assertForkPackages } from "./auto-review-packages-nRjnb4pU.js";
3
3
  import { t as wrapMethod } from "./method-wrapper-D4oUCsEF.js";
4
4
  //#region src/compat/auto-review-loader.ts