dsh-extra-paths 0.0.0-stage → 0.1.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 +79 -2
- package/cordis.patch.yml +6 -0
- package/lib/argv.js +45 -0
- package/lib/argv.js.map +1 -0
- package/lib/client.js +905 -0
- package/lib/config.js +123 -0
- package/lib/config.js.map +1 -0
- package/lib/context.js +30 -0
- package/lib/context.js.map +1 -0
- package/lib/grant.js +21 -0
- package/lib/grant.js.map +1 -0
- package/lib/index.js +173 -0
- package/lib/index.js.map +1 -0
- package/lib/listener.js +57 -0
- package/lib/listener.js.map +1 -0
- package/lib/paths.js +70 -0
- package/lib/paths.js.map +1 -0
- package/lib/pattern.js +206 -0
- package/lib/pattern.js.map +1 -0
- package/lib/policy.js +17 -0
- package/lib/policy.js.map +1 -0
- package/lib/preview.js +126 -0
- package/lib/preview.js.map +1 -0
- package/lib/resolve.js +153 -0
- package/lib/resolve.js.map +1 -0
- package/lib/schema.js +54 -0
- package/lib/schema.js.map +1 -0
- package/lib/types/argv.d.ts +17 -0
- package/lib/types/config.d.ts +55 -0
- package/lib/types/context.d.ts +13 -0
- package/lib/types/grant.d.ts +17 -0
- package/lib/types/index.d.ts +86 -0
- package/lib/types/listener.d.ts +40 -0
- package/lib/types/paths.d.ts +32 -0
- package/lib/types/pattern.d.ts +88 -0
- package/lib/types/policy.d.ts +21 -0
- package/lib/types/preview.d.ts +77 -0
- package/lib/types/resolve.d.ts +63 -0
- package/lib/types/schema.d.ts +42 -0
- package/lib/types/wrap-fs.d.ts +50 -0
- package/lib/types/wrap-sandbox.d.ts +60 -0
- package/lib/wrap-fs.js +75 -0
- package/lib/wrap-fs.js.map +1 -0
- package/lib/wrap-sandbox.js +89 -0
- package/lib/wrap-sandbox.js.map +1 -0
- package/package.json +113 -4
package/lib/wrap-fs.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The filesystem half of the plugin: a transparent Proxy over `ctx.fs` that
|
|
3
|
+
* re-stamps ONE call's policy when its target lies under a configured root.
|
|
4
|
+
*
|
|
5
|
+
* Transparency rules (verified against cordis 4.0.2 by
|
|
6
|
+
* spike/cordis-get-wrap-baseline.mjs): forward every property with the inner
|
|
7
|
+
* value as the receiver, bind methods to the inner instance — except
|
|
8
|
+
* `constructor`, whose binding breaks the framework's own `instanceof`
|
|
9
|
+
* (`Service[Symbol.hasInstance]` walks `instance.constructor`).
|
|
10
|
+
* @module dsh-extra-paths/wrap-fs
|
|
11
|
+
*/
|
|
12
|
+
import { grantFor } from './grant.js';
|
|
13
|
+
import { isUnder } from './paths.js';
|
|
14
|
+
import { syntheticPolicy } from './policy.js';
|
|
15
|
+
import { resolveRoots } from './resolve.js';
|
|
16
|
+
/**
|
|
17
|
+
* Whether a service is the sandboxed filesystem: mutating methods plus the
|
|
18
|
+
* capability fact (`sandboxMode`) that only a confining backend exposes.
|
|
19
|
+
* A plain local filesystem is left unwrapped — nothing confines it.
|
|
20
|
+
* @param value - the service read from the context.
|
|
21
|
+
* @returns true when the wrapper applies.
|
|
22
|
+
*/
|
|
23
|
+
export function isConfiningFs(value) {
|
|
24
|
+
const fs = value;
|
|
25
|
+
return typeof fs?.writeText === 'function'
|
|
26
|
+
&& typeof fs.editText === 'function'
|
|
27
|
+
&& typeof fs.resolve === 'function'
|
|
28
|
+
&& typeof fs.sandboxMode === 'string';
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Wrap one filesystem service.
|
|
32
|
+
* @param inner - the service instance read from the context.
|
|
33
|
+
* @param deps - configuration and policy sources.
|
|
34
|
+
* @returns a transparent proxy that grants configured roots on mutation.
|
|
35
|
+
*/
|
|
36
|
+
export function wrapFs(inner, deps) {
|
|
37
|
+
const bound = new Map();
|
|
38
|
+
const translate = async (target, policy, delegate) => {
|
|
39
|
+
if (policy === undefined || policy.mode === 'danger-full-access')
|
|
40
|
+
return delegate(policy);
|
|
41
|
+
const granted = grantFor(policy.mode, resolveRoots(deps.readConfig(), policy.workspaceRoot).roots, 'fs');
|
|
42
|
+
if (granted.length === 0)
|
|
43
|
+
return delegate(policy);
|
|
44
|
+
// Re-canonicalise NOW, exactly like the base fence does, so the identity we
|
|
45
|
+
// matched is the identity the base will check.
|
|
46
|
+
const fresh = await inner.resolve(target.displayPath);
|
|
47
|
+
const match = granted.find(root => isUnder(String(fresh.targetKey), root.root));
|
|
48
|
+
if (match === undefined)
|
|
49
|
+
return delegate(policy);
|
|
50
|
+
return delegate(syntheticPolicy(policy, match.root));
|
|
51
|
+
};
|
|
52
|
+
// Built ONCE per wrapper: reading a method twice must hand back the same
|
|
53
|
+
// function (and a fresh closure per read is pure allocation). Nothing here
|
|
54
|
+
// captures read-time state — the policy is resolved inside each call.
|
|
55
|
+
const writeText = (t, content, expected, signal, policy) => translate(t, policy ?? deps.fallbackPolicy(), effective => inner.writeText(t, content, expected, signal, effective));
|
|
56
|
+
const editText = (t, edit, expected, signal, policy) => translate(t, policy ?? deps.fallbackPolicy(), effective => inner.editText(t, edit, expected, signal, effective));
|
|
57
|
+
return new Proxy(inner, {
|
|
58
|
+
get(target, prop) {
|
|
59
|
+
if (prop === 'writeText')
|
|
60
|
+
return writeText;
|
|
61
|
+
if (prop === 'editText')
|
|
62
|
+
return editText;
|
|
63
|
+
const value = Reflect.get(target, prop, target);
|
|
64
|
+
if (typeof value !== 'function' || prop === 'constructor')
|
|
65
|
+
return value;
|
|
66
|
+
const cached = bound.get(prop);
|
|
67
|
+
if (cached !== undefined)
|
|
68
|
+
return cached;
|
|
69
|
+
const fn = value.bind(target);
|
|
70
|
+
bound.set(prop, fn);
|
|
71
|
+
return fn;
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=wrap-fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrap-fs.js","sourceRoot":"","sources":["../src/wrap-fs.ts"],"names":[],"mappings":"AAAA;;;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AU,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"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The subprocess half of the plugin: a transparent Proxy over `ctx.sandbox`
|
|
3
|
+
* that appends one write grant per configured root to the argv the base
|
|
4
|
+
* provider already wrapped. An unrecognised runner dialect fails closed: the
|
|
5
|
+
* argv is returned untouched (the write stays denied) and a warning is logged.
|
|
6
|
+
*
|
|
7
|
+
* THE WRAPPER MIRRORS THE INNER PROVIDER'S SYNC-NESS, because that changed
|
|
8
|
+
* between host generations and both must work:
|
|
9
|
+
*
|
|
10
|
+
* - 0.1.5 returns the confinement record SYNCHRONOUSLY and its callers read
|
|
11
|
+
* `.argv` off the result without awaiting
|
|
12
|
+
* (`return sandbox.confine(argv, policy).argv`). An `async` wrapper there
|
|
13
|
+
* yields `undefined` and every confined process dies with "Cannot read
|
|
14
|
+
* properties of undefined (reading '0')".
|
|
15
|
+
* - 0.2.x declares `confine(argv, policy, signal): Promise<ConfinedArgv>` and
|
|
16
|
+
* every caller awaits it.
|
|
17
|
+
*
|
|
18
|
+
* So a synchronous result is widened synchronously, and a thenable result is
|
|
19
|
+
* widened in a continuation instead of being forced through `async` — the same
|
|
20
|
+
* code satisfies a caller that awaits and one that does not.
|
|
21
|
+
*
|
|
22
|
+
* A dialect the wrapper does not recognise (`windows-acl`, a remote
|
|
23
|
+
* `sandbox-ssh` runner) also fails closed, as does an unknown one.
|
|
24
|
+
* @module dsh-extra-paths/wrap-sandbox
|
|
25
|
+
*/
|
|
26
|
+
import { widenArgv } from './argv.js';
|
|
27
|
+
import { grantFor } from './grant.js';
|
|
28
|
+
import { resolveRoots } from './resolve.js';
|
|
29
|
+
/** Whether a provider answered with a thenable instead of the record itself. */
|
|
30
|
+
function isThenable(value) {
|
|
31
|
+
return typeof value.then === 'function';
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Whether a service is a process-sandbox provider.
|
|
35
|
+
*
|
|
36
|
+
* Only `confine` is probed: it is the provider's whole public surface, the
|
|
37
|
+
* abstract base declares it, and every concrete runner implements it. A false
|
|
38
|
+
* positive could only wrap a service that already answers `confine`.
|
|
39
|
+
* @param value - the service read from the context.
|
|
40
|
+
* @returns true when the value looks like a sandbox provider.
|
|
41
|
+
*/
|
|
42
|
+
export function isConfiningSandbox(value) {
|
|
43
|
+
return typeof value?.confine === 'function';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Wrap one sandbox provider.
|
|
47
|
+
* @param inner - the provider read from the context.
|
|
48
|
+
* @param deps - configuration source and warning sink.
|
|
49
|
+
* @returns a transparent proxy that widens profiles for configured roots.
|
|
50
|
+
*/
|
|
51
|
+
export function wrapSandbox(inner, deps) {
|
|
52
|
+
const bound = new Map();
|
|
53
|
+
const widen = (confined, wrappedLength, policy) => {
|
|
54
|
+
const granted = grantFor(policy.mode, resolveRoots(deps.readConfig(), policy.workspaceRoot).roots, 'shell');
|
|
55
|
+
if (granted.length === 0)
|
|
56
|
+
return confined;
|
|
57
|
+
const widened = widenArgv(confined.argv, wrappedLength, granted.map(root => root.root));
|
|
58
|
+
if (widened === undefined) {
|
|
59
|
+
deps.warn(`extra-paths: unrecognised sandbox runner dialect (${JSON.stringify(confined.argv[0])}); `
|
|
60
|
+
+ 'extra paths are NOT granted for this command');
|
|
61
|
+
return confined;
|
|
62
|
+
}
|
|
63
|
+
return { ...confined, argv: widened };
|
|
64
|
+
};
|
|
65
|
+
// Deliberately NOT `async` (see the module comment): the caller reads `.argv`
|
|
66
|
+
// synchronously off this call's result.
|
|
67
|
+
const confine = (argv, policy, signal) => {
|
|
68
|
+
const confined = inner.confine(argv, policy, signal);
|
|
69
|
+
if (isThenable(confined))
|
|
70
|
+
return confined.then(record => widen(record, argv.length, policy));
|
|
71
|
+
return widen(confined, argv.length, policy);
|
|
72
|
+
};
|
|
73
|
+
return new Proxy(inner, {
|
|
74
|
+
get(target, prop) {
|
|
75
|
+
if (prop === 'confine')
|
|
76
|
+
return confine;
|
|
77
|
+
const value = Reflect.get(target, prop, target);
|
|
78
|
+
if (typeof value !== 'function' || prop === 'constructor')
|
|
79
|
+
return value;
|
|
80
|
+
const cached = bound.get(prop);
|
|
81
|
+
if (cached !== undefined)
|
|
82
|
+
return cached;
|
|
83
|
+
const fn = value.bind(target);
|
|
84
|
+
bound.set(prop, fn);
|
|
85
|
+
return fn;
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=wrap-sandbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrap-sandbox.js","sourceRoot":"","sources":["../src/wrap-sandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAyB3C,gFAAgF;AAChF,SAAS,UAAU,CAAC,KAAmD;IACrE,OAAO,OAAQ,KAA8B,CAAC,IAAI,KAAK,UAAU,CAAA;AACnE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAQ,KAAsC,EAAE,OAAO,KAAK,UAAU,CAAA;AAC/E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,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CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC,CAAA;IAED,OAAO,IAAI,KAAK,CAAC,KAAK,EAAE;QACtB,GAAG,CAAC,MAAM,EAAE,IAAI;YACd,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO,OAAO,CAAA;YACtC,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,115 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-extra-paths",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"default": "./lib/client.js"
|
|
15
|
+
},
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"lib",
|
|
20
|
+
"cordis.patch.yml",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"dsh": {
|
|
24
|
+
"bundle": {
|
|
25
|
+
"patch": "./cordis.patch.yml"
|
|
26
|
+
},
|
|
27
|
+
"client": {
|
|
28
|
+
"platform": "web",
|
|
29
|
+
"inject": [
|
|
30
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
31
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"paths": "node scripts/dsh-paths.mjs",
|
|
37
|
+
"prepare": "node scripts/dsh-paths.mjs --tolerant",
|
|
38
|
+
"build": "pnpm run build:host && pnpm run build:client",
|
|
39
|
+
"build:host": "node scripts/dsh-paths.mjs && tsc -p tsconfig.json",
|
|
40
|
+
"build:client": "tsdown",
|
|
41
|
+
"watch:client": "tsdown --watch",
|
|
42
|
+
"typecheck": "node scripts/dsh-paths.mjs && tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
|
|
43
|
+
"test": "vitest run"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@deepseek-ai/schemastery": "^3.18.4"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^24.13.3",
|
|
50
|
+
"@types/react": "~18.3.1",
|
|
51
|
+
"react": "^18.2.0",
|
|
52
|
+
"react-dom": "^18.2.0",
|
|
53
|
+
"tsdown": "^0.14.0",
|
|
54
|
+
"typescript": "^5.9.3",
|
|
55
|
+
"vitest": "^3.2.4"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"dsh",
|
|
59
|
+
"deepseek",
|
|
60
|
+
"harness",
|
|
61
|
+
"dsh-plugin",
|
|
62
|
+
"cordis",
|
|
63
|
+
"sandbox",
|
|
64
|
+
"permissions",
|
|
65
|
+
"writable-roots",
|
|
66
|
+
"filesystem",
|
|
67
|
+
"settings",
|
|
68
|
+
"bash"
|
|
69
|
+
],
|
|
70
|
+
"license": "UNLICENSED",
|
|
71
|
+
"repository": {
|
|
72
|
+
"type": "git",
|
|
73
|
+
"url": "git+https://github.com/0x7a76/dsh-extra-paths.git"
|
|
74
|
+
},
|
|
75
|
+
"homepage": "https://github.com/0x7a76/dsh-extra-paths#readme",
|
|
76
|
+
"bugs": {
|
|
77
|
+
"url": "https://github.com/0x7a76/dsh-extra-paths/issues"
|
|
78
|
+
},
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">=20",
|
|
81
|
+
"dsh": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
85
|
+
"@deepseek-ai/dsh-fs": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
86
|
+
"@deepseek-ai/dsh-sandbox": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
87
|
+
"@deepseek-ai/dsh-sandbox-policy": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
88
|
+
"@deepseek-ai/dsh-settings": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
89
|
+
"@deepseek-ai/dsh-fs-sandbox": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
90
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
91
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
92
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0",
|
|
93
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.5-0 <0.1.6-0 || >=0.2.0-0 <0.2.2-0"
|
|
94
|
+
},
|
|
95
|
+
"peerDependenciesMeta": {
|
|
96
|
+
"@deepseek-ai/dsh-fs-sandbox": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"@deepseek-ai/dsh-settings": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"@deepseek-ai/dsh-system-prompt": {
|
|
103
|
+
"optional": true
|
|
104
|
+
},
|
|
105
|
+
"@deepseek-ai/dsh-host-webserver": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
108
|
+
"@deepseek-ai/dsh-client-ui-settings": {
|
|
109
|
+
"optional": true
|
|
110
|
+
},
|
|
111
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
112
|
+
"optional": true
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|