dsh-extra-paths 0.1.1 → 0.2.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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ settings page plus a preview of the effective roots for the current workspace.
8
8
 
9
9
  ## Install
10
10
 
11
- Requires DSH `0.1.5` / `0.2.0` / `0.2.1` (outside that range the install gate refuses the package).
11
+ Requires DSH `0.1.5` / `0.2.0` / `0.2.1` / `0.2.2` (outside that range the install gate refuses the package).
12
12
 
13
13
  ```bash
14
14
  dsh plugin --profile <name> add dsh-extra-paths # <name> = your profile
@@ -21,7 +21,8 @@ pnpm install && pnpm build
21
21
  dsh plugin --profile <name> add /path/to/dsh-extra-paths # path = absolute path to this repo
22
22
  ```
23
23
 
24
- Then open the **Extra paths** card under **Settings → Plugins**, or **Extra writable paths** in the settings sidebar.
24
+ Then open **Extra writable paths** in the settings sidebar. In **Settings → Plugins** the same page lives on this
25
+ plugin's own row: open the `dsh-extra-paths` bundle, then hit that row's **Configure** button.
25
26
 
26
27
  ## Configuration
27
28
 
package/README.zh.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  ## 安装
9
9
 
10
- 需要 DSH `0.1.5` / `0.2.0` / `0.2.1`(不在范围内会被安装闸门拒绝)。
10
+ 需要 DSH `0.1.5` / `0.2.0` / `0.2.1` / `0.2.2`(不在范围内会被安装闸门拒绝)。
11
11
 
12
12
  ```bash
13
13
  dsh plugin --profile <name> add dsh-extra-paths # <name>=你的 profile 名
@@ -20,7 +20,8 @@ pnpm install && pnpm build
20
20
  dsh plugin --profile <name> add /path/to/dsh-extra-paths # 路径=本仓库的绝对路径
21
21
  ```
22
22
 
23
- 装好后打开 **设置 → 插件** 里的「Extra paths」卡片,或设置左栏的「额外可写路径」。
23
+ 装好后打开设置左栏的「额外可写路径」。在 **设置 → 插件** 里,同一页在这个插件自己那一行上:
24
+ 打开 `dsh-extra-paths` 组合包,点该行的「配置」。
24
25
 
25
26
  ## 配置
26
27
 
package/lib/client.js CHANGED
@@ -340,6 +340,11 @@ window.__ModuleLoader__.load({
340
340
  * compositions that pass no standard props.
341
341
  * @module dsh-extra-paths/client/page
342
342
  */
343
+ /**
344
+ * Shown when the host refuses a write. The 0.2.x client API returns `false`
345
+ * rather than a message, so the page owns this explanation.
346
+ */
347
+ const SAVE_REFUSED_MESSAGE = "保存被宿主拒绝:该配置可能被 home patch 或命令行覆盖(设置页只写 profile 的 cordis.patch.yml)。请删掉 ~/.dsh/cordis.patch.yml 里同 id 的覆盖,或直接改 profile patch 后重启。";
343
348
  const NOOP_HOOK = () => void 0;
344
349
  const IDENTITY = (snapshot) => snapshot;
345
350
  function itemsOf(value) {
@@ -389,6 +394,24 @@ window.__ModuleLoader__.load({
389
394
  return snapshot;
390
395
  }
391
396
  /**
397
+ * The one-liner the plugin manager shows in its list (`view: 'summary'`).
398
+ *
399
+ * The manager renders every configuration entry twice: a compact summary in the
400
+ * list, and the full view on the entry's own page. Rendering the editor for both
401
+ * is what used to fill the Plugins page with the whole form, so the summary is a
402
+ * separate component that can never grow one.
403
+ * @param props - the bound settings scope.
404
+ */
405
+ function ExtraPathsSummary({ scope }) {
406
+ const { status, value } = useSnapshot(scope);
407
+ const rows = rowsOf(value).filter((row) => row.path.trim() !== "");
408
+ const text = status === "loading" ? "额外可写路径:读取中…" : status === "unavailable" ? "额外可写路径:宿主未提供该设置" : rows.length === 0 ? "额外可写路径:尚未配置" : `额外可写路径:${rows.length} 条 · 保存即生效,写入无需审批`;
409
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
410
+ style: styles.dim,
411
+ children: text
412
+ });
413
+ }
414
+ /**
392
415
  * Render the page.
393
416
  * @param props - the bound settings scope, the standard workspace hook, and the
394
417
  * lazy fallback used when the composition supplies no standard props.
@@ -467,10 +490,11 @@ window.__ModuleLoader__.load({
467
490
  const save = () => {
468
491
  setBusy(true);
469
492
  setError(void 0);
470
- scope.set("paths", payloadOf(rows)).then(() => {
471
- setDirty(false);
493
+ scope.set("paths", payloadOf(rows)).then((accepted) => {
494
+ if (accepted === false) setError(SAVE_REFUSED_MESSAGE);
495
+ else setDirty(false);
472
496
  }).catch((cause) => {
473
- setError(String(cause));
497
+ setError(cause instanceof Error ? cause.message : String(cause));
474
498
  }).finally(() => {
475
499
  setBusy(false);
476
500
  });
@@ -774,11 +798,28 @@ window.__ModuleLoader__.load({
774
798
  //#region src/client/index.tsx
775
799
  /**
776
800
  * Client half: contributes the Extra paths configuration page to the settings
777
- * dialog twice — as a `settings.section` nav row (the settings sidebar) and as
778
- * the plugin's own card (0.1.5: `settings.plugin.item`, keyed by the settings
779
- * namespace; 0.2.x: `plugins.item`, a list slot).
801
+ * dialog and to the plugin manager.
802
+ *
803
+ * THREE ENTRY POINTS, ONE PAGE — and the plugin manager asks for two different
804
+ * views of it. `view: 'summary'` is the one-liner it lays out in its list;
805
+ * anything else is the editor (`view: 'page'` on the entry's own page). Ignoring
806
+ * that split is what used to render the whole form inline in the plugin list,
807
+ * under the built-in plugins group, and pushed everything else off screen.
808
+ *
809
+ * - `settings.section` — a nav row in the settings dialog's left column. Declared
810
+ * by both host generations, so this is the entry point that always exists.
811
+ * - 0.2.x `plugins.row.config` — a KEYED slot spelled `<bundle name>#<entry id>`.
812
+ * Our own row inside the `dsh-extra-paths` bundle gains a 配置 control that
813
+ * opens this page in the plugin manager. Present in every 0.2.x release
814
+ * (checked against 0.2.0-rc.2 and 0.2.1-rc.5).
815
+ * - 0.1.5 `settings.plugin.item` — the keyed card of the older settings dialog,
816
+ * keyed by the settings namespace.
780
817
  *
781
- * TWO HOST GENERATIONS, ONE PAGE. The settings scope this page edits moved in
818
+ * The 0.2.x `plugins.item` slot is deliberately NOT registered: the shipped
819
+ * contract reserves it for the host's own plugins ("用于官方插件", rendered in the
820
+ * 内置插件配置 group). A third-party bundle belongs on its own row instead.
821
+ *
822
+ * TWO HOST GENERATIONS, ONE SCOPE. The settings scope this page edits moved in
782
823
  * 0.2.0: `ctx.settingsScope` (0.1.5) is gone and replaced by `ctx.configForms`
783
824
  * — which however exposes the SAME three methods the page was written against
784
825
  * (`getSnapshot`/`subscribe`/`set`). So the page keeps its narrow `PageScope`
@@ -788,10 +829,10 @@ window.__ModuleLoader__.load({
788
829
  * waiting forever.
789
830
  *
790
831
  * Slot keys, register shapes and the module table were taken from the RUNNING
791
- * version's own official occupants (`dsh-client-ui-settings-plugins`,
792
- * `dsh-client-ui-settings-agent-loop`) and their published contracts. A slot key
793
- * that nothing declares is inert under `ctx.slots.inject` (the callback never
794
- * runs), which is what lets one build register into both generations' cards.
832
+ * version's own official occupants (`dsh-client-ui-settings-agent-loop`,
833
+ * `dsh-client-ui-settings-shell`) and their published contracts. A slot key that
834
+ * nothing declares is inert under `ctx.slots.inject` (the callback never runs),
835
+ * which is what lets one build register into both generations.
795
836
  *
796
837
  * Every @deepseek-ai/* import here is TYPE-ONLY (erased): the runtime services
797
838
  * arrive through cordis, and react resolves from the page's module table
@@ -809,6 +850,14 @@ window.__ModuleLoader__.load({
809
850
  /** The settings namespace this page edits — the one the host half registers. */
810
851
  const NAMESPACE = "extra-paths";
811
852
  /**
853
+ * The plugin manager's key for our row: `<bundle name>#<entry id>`.
854
+ *
855
+ * The bundle name is the package name and the row id is the entry this repo's
856
+ * `cordis.patch.yml` inserts; `tests/client-slots.test.ts` pins it against both
857
+ * files so a rename cannot silently detach the config control.
858
+ */
859
+ const ROW_KEY = "dsh-extra-paths#extra-paths";
860
+ /**
812
861
  * A `PageScope` that forwards to whichever real scope arrives.
813
862
  *
814
863
  * Subscribers are held here rather than on the real scope so a page that mounted
@@ -834,7 +883,13 @@ window.__ModuleLoader__.load({
834
883
  listeners.delete(listener);
835
884
  };
836
885
  },
837
- set: (field, value) => real?.set(field, value) ?? Promise.resolve()
886
+ set: (field, value) => {
887
+ if (real === void 0) return Promise.resolve();
888
+ return real.set(field, value).then((accepted) => {
889
+ if (accepted === false) throw new Error(SAVE_REFUSED_MESSAGE);
890
+ return accepted;
891
+ });
892
+ }
838
893
  },
839
894
  attach: (next) => {
840
895
  if (next === void 0) return;
@@ -860,7 +915,7 @@ window.__ModuleLoader__.load({
860
915
  attach({
861
916
  getSnapshot: () => configForms.get(NAMESPACE).getSnapshot(),
862
917
  subscribe: (listener) => configForms.get(NAMESPACE).subscribe(listener),
863
- set: (field, value) => configForms.get(NAMESPACE).set(field, value).then(() => void 0)
918
+ set: (field, value) => configForms.get(NAMESPACE).set(field, value)
864
919
  });
865
920
  });
866
921
  const getWorkspaces = () => ctx.get("workspaces", false);
@@ -868,7 +923,14 @@ window.__ModuleLoader__.load({
868
923
  scope,
869
924
  getWorkspaces
870
925
  });
871
- const page = () => react.createElement(ExtraPathsPage, props());
926
+ /** The editor, forwarding the shell's workspace hook when the slot carries one. */
927
+ const renderPage = (slotProps) => react.createElement(ExtraPathsPage, {
928
+ scope,
929
+ getWorkspaces,
930
+ useWorkspaces: typeof slotProps?.useWorkspaces === "function" ? slotProps.useWorkspaces : void 0
931
+ });
932
+ /** The slot component: one line for `summary`, the editor for every other view. */
933
+ const card = (slotProps) => slotProps?.view === "summary" ? react.createElement(ExtraPathsSummary, { scope }) : renderPage(slotProps);
872
934
  ctx.slots.inject("settings.section", () => ctx.slots.register({
873
935
  name: "settings.section",
874
936
  id: NAMESPACE,
@@ -876,27 +938,26 @@ window.__ModuleLoader__.load({
876
938
  label: () => "额外可写路径",
877
939
  locale: NAMESPACE,
878
940
  inject: props
879
- }, page));
941
+ }, card));
880
942
  ctx.slots.inject("settings.plugin.item", () => ctx.slots.register({
881
943
  name: "settings.plugin.item",
882
944
  key: NAMESPACE,
883
945
  locale: NAMESPACE,
884
946
  inject: props
885
- }, page));
886
- const registerCard = () => ctx.slots.inject("plugins.item", () => ctx.slots.register({
887
- name: "plugins.item",
888
- id: NAMESPACE,
889
- order: 40,
890
- label: () => "额外可写路径",
947
+ }, card));
948
+ const registerRow = () => ctx.slots.inject("plugins.row.config", () => ctx.slots.register({
949
+ name: "plugins.row.config",
950
+ key: ROW_KEY,
891
951
  locale: NAMESPACE,
892
952
  inject: props
893
- }, page));
953
+ }, card));
894
954
  const forms = ctx.get("configForms", false);
895
- if (typeof forms?.whileServed === "function" && typeof ctx.effect === "function") ctx.effect(() => forms.whileServed?.(["extra-paths"], registerCard) ?? registerCard(), "extra-paths: card while served");
896
- else registerCard();
955
+ if (typeof forms?.whileServed === "function" && typeof ctx.effect === "function") ctx.effect(() => forms.whileServed?.(["extra-paths"], registerRow) ?? registerRow(), "extra-paths: row page while served");
956
+ else registerRow();
897
957
  }
898
958
  //#endregion
899
959
  exports.NAMESPACE = NAMESPACE;
960
+ exports.ROW_KEY = ROW_KEY;
900
961
  exports.apply = apply;
901
962
  exports.inject = inject;
902
963
  exports.lateBoundScope = lateBoundScope;
package/lib/policy.js CHANGED
@@ -7,11 +7,24 @@
7
7
  * under a configured root. The mode rises to `workspace-write` because that is
8
8
  * this grant's meaning: a single call is allowed to write this root, while the
9
9
  * base class keeps owning resolution, atomic publication and the version guard.
10
+ *
11
+ * The caller's own `additionalWritableRoots` are dropped on purpose: under a
12
+ * `read-only` session an `always-write` grant must not smuggle the deployment's
13
+ * extra roots into the elevated call.
10
14
  * @param policy - the caller's resolved policy.
11
15
  * @param workspaceRoot - the canonical configured root that matched the target.
16
+ * @param additionalWritableRoots - further configured roots to grant in the
17
+ * same call (DSH 0.2.2+ only; used by `moveFile` when both ends lie under
18
+ * different configured roots).
12
19
  * @returns the policy to hand the base implementation.
13
20
  */
14
- export function syntheticPolicy(policy, workspaceRoot) {
15
- return { ...policy, mode: 'workspace-write', workspaceRoot };
21
+ export function syntheticPolicy(policy, workspaceRoot, additionalWritableRoots) {
22
+ const { additionalWritableRoots: _callerRoots, ...rest } = policy;
23
+ return {
24
+ ...rest,
25
+ mode: 'workspace-write',
26
+ workspaceRoot,
27
+ ...(additionalWritableRoots === undefined ? {} : { additionalWritableRoots }),
28
+ };
16
29
  }
17
30
  //# sourceMappingURL=policy.js.map
package/lib/policy.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"policy.js","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,MAAkB,EAAE,aAAqB;IACvE,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAA;AAC9D,CAAC"}
1
+ {"version":3,"file":"policy.js","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAkB,EAClB,aAAqB,EACrB,uBAA2C;IAE3C,MAAM,EAAE,uBAAuB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;IACjE,OAAO;QACL,GAAG,IAAI;QACP,IAAI,EAAE,iBAAiB;QACvB,aAAa;QACb,GAAG,CAAC,uBAAuB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,CAAC;KAC9E,CAAA;AACH,CAAC"}
@@ -7,6 +7,16 @@ import type { SandboxModeLike } from './grant.js';
7
7
  export interface PolicyLike {
8
8
  readonly mode: SandboxModeLike;
9
9
  readonly workspaceRoot: string;
10
+ /**
11
+ * Explicit extra writable directories a policy may carry (DSH 0.2.2+).
12
+ *
13
+ * The 0.2.2 enforcement layers derive their allow-list from the workspace
14
+ * root PLUS this list, so a single synthetic policy can grant more than one
15
+ * configured root — which is what a move between two configured roots needs.
16
+ * Older hosts have no such field and ignore it; the wrapper only sets it for
17
+ * the 0.2.2-only `moveFile` surface.
18
+ */
19
+ readonly additionalWritableRoots?: readonly string[];
10
20
  readonly sessionId?: unknown;
11
21
  }
12
22
  /**
@@ -14,8 +24,15 @@ export interface PolicyLike {
14
24
  * under a configured root. The mode rises to `workspace-write` because that is
15
25
  * this grant's meaning: a single call is allowed to write this root, while the
16
26
  * base class keeps owning resolution, atomic publication and the version guard.
27
+ *
28
+ * The caller's own `additionalWritableRoots` are dropped on purpose: under a
29
+ * `read-only` session an `always-write` grant must not smuggle the deployment's
30
+ * extra roots into the elevated call.
17
31
  * @param policy - the caller's resolved policy.
18
32
  * @param workspaceRoot - the canonical configured root that matched the target.
33
+ * @param additionalWritableRoots - further configured roots to grant in the
34
+ * same call (DSH 0.2.2+ only; used by `moveFile` when both ends lie under
35
+ * different configured roots).
19
36
  * @returns the policy to hand the base implementation.
20
37
  */
21
- export declare function syntheticPolicy(policy: PolicyLike, workspaceRoot: string): PolicyLike;
38
+ export declare function syntheticPolicy(policy: PolicyLike, workspaceRoot: string, additionalWritableRoots?: readonly string[]): PolicyLike;
@@ -2,6 +2,13 @@
2
2
  * The filesystem half of the plugin: a transparent Proxy over `ctx.fs` that
3
3
  * re-stamps ONE call's policy when its target lies under a configured root.
4
4
  *
5
+ * The host generation decides how many mutations this surface has. 0.2.0/0.2.1
6
+ * fence `writeText`/`editText`; 0.2.2 additionally fences `patchText`,
7
+ * `deleteFile` and `moveFile` (the `apply_patch` tool and the delete/move
8
+ * operations). The wrapper therefore overrides every mutation the INNER service
9
+ * actually exposes, and never invents one: on a 0.2.1 service the three newer
10
+ * methods stay absent, exactly as the base class declared them.
11
+ *
5
12
  * Transparency rules (verified against cordis 4.0.2 by
6
13
  * spike/cordis-get-wrap-baseline.mjs): forward every property with the inner
7
14
  * value as the receiver, bind methods to the inner instance — except
@@ -24,6 +31,12 @@ export interface FsInnerLike {
24
31
  }): Promise<FsTargetLike>;
25
32
  writeText(target: FsTargetLike, content: string, expected?: unknown, signal?: AbortSignal, policy?: PolicyLike): Promise<unknown>;
26
33
  editText(target: FsTargetLike, edit: unknown, expected?: unknown, signal?: AbortSignal, policy?: PolicyLike): Promise<unknown>;
34
+ /** DSH 0.2.2+: apply parsed hunks (the `apply_patch` tool's surface). */
35
+ patchText?(target: FsTargetLike, hunks: unknown, expected?: unknown, signal?: AbortSignal, policy?: PolicyLike): Promise<unknown>;
36
+ /** DSH 0.2.2+: remove one regular file. */
37
+ deleteFile?(target: FsTargetLike, expected?: unknown, signal?: AbortSignal, policy?: PolicyLike): Promise<unknown>;
38
+ /** DSH 0.2.2+: publish a destination and remove the source. */
39
+ moveFile?(source: FsTargetLike, destination: FsTargetLike, options?: unknown, signal?: AbortSignal, policy?: PolicyLike): Promise<unknown>;
27
40
  readonly sandboxMode?: string;
28
41
  }
29
42
  /** What the wrapper needs from the plugin. */
package/lib/wrap-fs.js CHANGED
@@ -2,6 +2,13 @@
2
2
  * The filesystem half of the plugin: a transparent Proxy over `ctx.fs` that
3
3
  * re-stamps ONE call's policy when its target lies under a configured root.
4
4
  *
5
+ * The host generation decides how many mutations this surface has. 0.2.0/0.2.1
6
+ * fence `writeText`/`editText`; 0.2.2 additionally fences `patchText`,
7
+ * `deleteFile` and `moveFile` (the `apply_patch` tool and the delete/move
8
+ * operations). The wrapper therefore overrides every mutation the INNER service
9
+ * actually exposes, and never invents one: on a 0.2.1 service the three newer
10
+ * methods stay absent, exactly as the base class declared them.
11
+ *
5
12
  * Transparency rules (verified against cordis 4.0.2 by
6
13
  * spike/cordis-get-wrap-baseline.mjs): forward every property with the inner
7
14
  * value as the receiver, bind methods to the inner instance — except
@@ -9,6 +16,8 @@
9
16
  * (`Service[Symbol.hasInstance]` walks `instance.constructor`).
10
17
  * @module dsh-extra-paths/wrap-fs
11
18
  */
19
+ import { realpathSync, statSync } from 'node:fs';
20
+ import { resolve as resolvePath } from 'node:path';
12
21
  import { grantFor } from './grant.js';
13
22
  import { isUnder } from './paths.js';
14
23
  import { syntheticPolicy } from './policy.js';
@@ -27,6 +36,22 @@ export function isConfiningFs(value) {
27
36
  && typeof fs.resolve === 'function'
28
37
  && typeof fs.sandboxMode === 'string';
29
38
  }
39
+ /**
40
+ * Whether a configured root can be expressed as an `additionalWritableRoots`
41
+ * entry for the 0.2.2 fence: an existing PHYSICAL directory. The base fence
42
+ * rejects missing, non-directory and symlinked entries by throwing, so a grant
43
+ * list is only assembled from roots that pass the same test.
44
+ * @param path - the canonical root to test.
45
+ * @returns true when the base fence would accept it.
46
+ */
47
+ function isPhysicalDirectory(path) {
48
+ try {
49
+ return statSync(path).isDirectory() && realpathSync.native(path) === resolvePath(path);
50
+ }
51
+ catch {
52
+ return false;
53
+ }
54
+ }
30
55
  /**
31
56
  * Wrap one filesystem service.
32
57
  * @param inner - the service instance read from the context.
@@ -35,10 +60,12 @@ export function isConfiningFs(value) {
35
60
  */
36
61
  export function wrapFs(inner, deps) {
37
62
  const bound = new Map();
63
+ /** Roots this call grants, or an empty list when the target set is not covered. */
64
+ const grantedFor = (policy) => grantFor(policy.mode, resolveRoots(deps.readConfig(), policy.workspaceRoot).roots, 'fs');
38
65
  const translate = async (target, policy, delegate) => {
39
66
  if (policy === undefined || policy.mode === 'danger-full-access')
40
67
  return delegate(policy);
41
- const granted = grantFor(policy.mode, resolveRoots(deps.readConfig(), policy.workspaceRoot).roots, 'fs');
68
+ const granted = grantedFor(policy);
42
69
  if (granted.length === 0)
43
70
  return delegate(policy);
44
71
  // Re-canonicalise NOW, exactly like the base fence does, so the identity we
@@ -49,17 +76,59 @@ export function wrapFs(inner, deps) {
49
76
  return delegate(policy);
50
77
  return delegate(syntheticPolicy(policy, match.root));
51
78
  };
79
+ /**
80
+ * A move is one call with TWO fenced targets. Both ends must land in the
81
+ * configured set; one policy then carries the union. When the ends share one
82
+ * configured root the workspace-root re-stamp is enough on every host; two
83
+ * different roots are expressed through `additionalWritableRoots` (0.2.2+,
84
+ * the only host generation that has `moveFile` at all).
85
+ */
86
+ const translateMove = async (source, destination, policy, delegate) => {
87
+ if (policy === undefined || policy.mode === 'danger-full-access')
88
+ return delegate(policy);
89
+ const granted = grantedFor(policy);
90
+ if (granted.length === 0)
91
+ return delegate(policy);
92
+ const [freshSource, freshDestination] = await Promise.all([
93
+ inner.resolve(source.displayPath),
94
+ inner.resolve(destination.displayPath),
95
+ ]);
96
+ const sourceRoot = granted.find(root => isUnder(String(freshSource.targetKey), root.root));
97
+ const destinationRoot = granted.find(root => isUnder(String(freshDestination.targetKey), root.root));
98
+ if (sourceRoot === undefined || destinationRoot === undefined)
99
+ return delegate(policy);
100
+ if (sourceRoot === destinationRoot)
101
+ return delegate(syntheticPolicy(policy, sourceRoot.root));
102
+ const roots = [sourceRoot.root, destinationRoot.root];
103
+ if (!roots.every(isPhysicalDirectory))
104
+ return delegate(policy);
105
+ return delegate(syntheticPolicy(policy, sourceRoot.root, [destinationRoot.root]));
106
+ };
52
107
  // Built ONCE per wrapper: reading a method twice must hand back the same
53
108
  // function (and a fresh closure per read is pure allocation). Nothing here
54
109
  // captures read-time state — the policy is resolved inside each call.
55
110
  const writeText = (t, content, expected, signal, policy) => translate(t, policy ?? deps.fallbackPolicy(), effective => inner.writeText(t, content, expected, signal, effective));
56
111
  const editText = (t, edit, expected, signal, policy) => translate(t, policy ?? deps.fallbackPolicy(), effective => inner.editText(t, edit, expected, signal, effective));
112
+ const patchText = (t, hunks, expected, signal, policy) => translate(t, policy ?? deps.fallbackPolicy(), effective => inner.patchText(t, hunks, expected, signal, effective));
113
+ const deleteFile = (t, expected, signal, policy) => translate(t, policy ?? deps.fallbackPolicy(), effective => inner.deleteFile(t, expected, signal, effective));
114
+ const moveFile = (source, destination, options, signal, policy) => translateMove(source, destination, policy ?? deps.fallbackPolicy(), effective => inner.moveFile(source, destination, options, signal, effective));
115
+ const overrides = new Map([
116
+ ['writeText', writeText],
117
+ ['editText', editText],
118
+ ]);
119
+ // Only override what the running host declares: a 0.2.1 service must keep
120
+ // answering `undefined` for the 0.2.2-only mutations.
121
+ if (typeof inner.patchText === 'function')
122
+ overrides.set('patchText', patchText);
123
+ if (typeof inner.deleteFile === 'function')
124
+ overrides.set('deleteFile', deleteFile);
125
+ if (typeof inner.moveFile === 'function')
126
+ overrides.set('moveFile', moveFile);
57
127
  return new Proxy(inner, {
58
128
  get(target, prop) {
59
- if (prop === 'writeText')
60
- return writeText;
61
- if (prop === 'editText')
62
- return editText;
129
+ const override = overrides.get(prop);
130
+ if (override !== undefined)
131
+ return override;
63
132
  const value = Reflect.get(target, prop, target);
64
133
  if (typeof value !== 'function' || prop === 'constructor')
65
134
  return value;
@@ -1 +1 @@
1
- {"version":3,"file":"wrap-fs.js","sourceRoot":"","sources":["../src/wrap-fs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,eAAe,EAAmB,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAwB3C;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,MAAM,EAAE,GAAG,KAAgC,CAAA;IAC3C,OAAO,OAAO,EAAE,EAAE,SAAS,KAAK,UAAU;WACrC,OAAO,EAAE,CAAC,QAAQ,KAAK,UAAU;WACjC,OAAO,EAAE,CAAC,OAAO,KAAK,UAAU;WAChC,OAAO,EAAE,CAAC,WAAW,KAAK,QAAQ,CAAA;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,KAAkB,EAAE,IAAgB;IACzD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAwB,CAAA;IAE7C,MAAM,SAAS,GAAG,KAAK,EACrB,MAAoB,EACpB,MAA8B,EAC9B,QAA8D,EAC5C,EAAE;QACpB,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,oBAAoB;YAAE,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAA;QACzF,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QACxG,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AAA;IAE7E,OAAO,IAAI,KAAK,CAAC,KAAK,EAAE;QACtB,GAAG,CAAC,MAAM,EAAE,IAAI;YACd,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YACpC,IAAI,QAAQ,KAAK,SAAS;gBAAE,OAAO,QAAQ,CAAA;YAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;YAC/C,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,IAAI,KAAK,aAAa;gBAAE,OAAO,KAAK,CAAA;YACvE,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAC9B,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,MAAM,CAAA;YACvC,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YAC7B,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YACnB,OAAO,EAAE,CAAA;QACX,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-extra-paths",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "配置一组额外可写根:fs 工具与受限 shell 首次尝试即可写、无需审批,带 Web 设置页与按目录结构锚定的路径模式。 · DSH plugin: configured extra writable roots for the fs tools and the sandboxed shell, with a Web settings page and structure-anchored path patterns.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -79,19 +79,19 @@
79
79
  },
80
80
  "engines": {
81
81
  "node": ">=20",
82
- "dsh": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0"
82
+ "dsh": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "@deepseek-ai/cordis": "^4.0.2",
86
- "@deepseek-ai/dsh-fs": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
87
- "@deepseek-ai/dsh-sandbox": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
88
- "@deepseek-ai/dsh-sandbox-policy": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
89
- "@deepseek-ai/dsh-settings": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
90
- "@deepseek-ai/dsh-fs-sandbox": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
91
- "@deepseek-ai/dsh-system-prompt": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
92
- "@deepseek-ai/dsh-host-webserver": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
93
- "@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
94
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0"
86
+ "@deepseek-ai/dsh-fs": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
87
+ "@deepseek-ai/dsh-sandbox": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
88
+ "@deepseek-ai/dsh-sandbox-policy": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
89
+ "@deepseek-ai/dsh-settings": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
90
+ "@deepseek-ai/dsh-fs-sandbox": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
91
+ "@deepseek-ai/dsh-system-prompt": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
92
+ "@deepseek-ai/dsh-host-webserver": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
93
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0",
94
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0 || >=0.2.2-0 <0.2.3-0"
95
95
  },
96
96
  "peerDependenciesMeta": {
97
97
  "@deepseek-ai/dsh-fs-sandbox": {