@openclaw/mxc-sandbox 2026.7.2-beta.3 → 2026.7.2-beta.4
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/dist/index.js +13 -10
- package/npm-shrinkwrap.json +2 -2
- package/openclaw.plugin.json +46 -7
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -24,12 +24,12 @@ const DEFAULT_TIMEOUT_SECONDS = 120;
|
|
|
24
24
|
const DEFAULT_DEBUG = false;
|
|
25
25
|
const nonEmptyTrimmedString = (message) => z.string({ error: message }).trim().min(1, { error: message });
|
|
26
26
|
const MxcPluginConfigSchema = z.strictObject({
|
|
27
|
-
mxcBinaryPath: nonEmptyTrimmedString("mxcBinaryPath must be a non-empty string").optional(),
|
|
28
|
-
containment: z.enum(MXC_CONTAINMENTS, { error: `containment must be one of ${MXC_CONTAINMENTS.join(", ")}` }).optional(),
|
|
29
|
-
network: z.enum(MXC_NETWORK_MODES, { error: `network must be one of ${MXC_NETWORK_MODES.join(", ")}` }).optional(),
|
|
30
|
-
timeoutSeconds: z.number({ error: `timeoutSeconds must be a number between 1 and ${MAX_TIMER_TIMEOUT_SECONDS}` }).min(1, { error: "timeoutSeconds must be a number >= 1" }).max(MAX_TIMER_TIMEOUT_SECONDS, { error: `timeoutSeconds must be a number <= ${MAX_TIMER_TIMEOUT_SECONDS}` }).optional(),
|
|
31
|
-
debug: z.boolean({ error: "debug must be a boolean" }).optional(),
|
|
32
|
-
mxcPolicyPaths: z.array(nonEmptyTrimmedString("mxcPolicyPaths must be an array of non-empty strings"), { error: "mxcPolicyPaths must be an array of non-empty strings" }).optional()
|
|
27
|
+
mxcBinaryPath: nonEmptyTrimmedString("mxcBinaryPath must be a non-empty string").describe("Absolute path to the MXC executor (wxc-exec.exe). When unset, the executor is discovered from the installed @microsoft/mxc-sdk.").optional(),
|
|
28
|
+
containment: z.enum(MXC_CONTAINMENTS, { error: `containment must be one of ${MXC_CONTAINMENTS.join(", ")}` }).describe("Windows containment mode. 'process' and 'processcontainer' currently both resolve to the Windows ProcessContainer sandbox.").optional(),
|
|
29
|
+
network: z.enum(MXC_NETWORK_MODES, { error: `network must be one of ${MXC_NETWORK_MODES.join(", ")}` }).describe("Outbound network policy. 'none' blocks all network; 'default' allows outbound access via the internetClient capability.").optional(),
|
|
30
|
+
timeoutSeconds: z.number({ error: `timeoutSeconds must be a number between 1 and ${MAX_TIMER_TIMEOUT_SECONDS}` }).min(1, { error: "timeoutSeconds must be a number >= 1" }).max(MAX_TIMER_TIMEOUT_SECONDS, { error: `timeoutSeconds must be a number <= ${MAX_TIMER_TIMEOUT_SECONDS}` }).describe("Per-command execution timeout in seconds. Capped to the sandbox policy baseline timeout when both are set.").optional(),
|
|
31
|
+
debug: z.boolean({ error: "debug must be a boolean" }).describe("Forward verbose debug output from the MXC SDK launcher.").optional(),
|
|
32
|
+
mxcPolicyPaths: z.array(nonEmptyTrimmedString("mxcPolicyPaths must be an array of non-empty strings"), { error: "mxcPolicyPaths must be an array of non-empty strings" }).describe("Absolute MXC policy file paths applied on top of the built-in sandbox baseline policy.").optional()
|
|
33
33
|
});
|
|
34
34
|
function createMxcPluginConfigSchema() {
|
|
35
35
|
return buildPluginConfigSchema(MxcPluginConfigSchema, { safeParse(value) {
|
|
@@ -348,6 +348,9 @@ const DEFAULT_SANDBOX_BASELINE = {
|
|
|
348
348
|
timeoutSecondsConfigured: false
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
|
+
function firstNonBlankEnv(...values) {
|
|
352
|
+
return values.find((value) => value?.trim());
|
|
353
|
+
}
|
|
351
354
|
function resolveSandboxBaseline(input = {}) {
|
|
352
355
|
const timeoutSecondsConfigured = input.process?.timeoutSeconds !== void 0;
|
|
353
356
|
const timeoutSeconds = input.process?.timeoutSeconds ?? BASELINE_TIMEOUT_SECONDS;
|
|
@@ -365,13 +368,13 @@ function resolveSandboxBaseline(input = {}) {
|
|
|
365
368
|
};
|
|
366
369
|
}
|
|
367
370
|
function resolveSandboxTempDir(env = {}) {
|
|
368
|
-
return env.TEMP
|
|
371
|
+
return firstNonBlankEnv(env.TEMP, env.TMP) ?? "C:\\Windows\\Temp";
|
|
369
372
|
}
|
|
370
373
|
function resolveBaselineReadonlyPaths(env) {
|
|
371
|
-
const systemRoot = env.SystemRoot
|
|
374
|
+
const systemRoot = firstNonBlankEnv(env.SystemRoot, env.WINDIR) ?? "C:\\Windows";
|
|
372
375
|
return dedupeStable([
|
|
373
|
-
env.ProgramFiles
|
|
374
|
-
env["ProgramFiles(x86)"] ?? "C:\\Program Files (x86)",
|
|
376
|
+
firstNonBlankEnv(env.ProgramFiles, env.ProgramW6432) ?? "C:\\Program Files",
|
|
377
|
+
firstNonBlankEnv(env["ProgramFiles(x86)"]) ?? "C:\\Program Files (x86)",
|
|
375
378
|
win32.join(systemRoot, "System32"),
|
|
376
379
|
win32.join(systemRoot, "SysWOW64")
|
|
377
380
|
]);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mxc-sandbox",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/mxc-sandbox",
|
|
9
|
-
"version": "2026.7.2-beta.
|
|
9
|
+
"version": "2026.7.2-beta.4",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@microsoft/mxc-sdk": "0.7.0",
|
|
12
12
|
"zod": "4.4.3"
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "mxc",
|
|
3
3
|
"name": "MXC Sandbox Execution",
|
|
4
|
-
"description": "OS-level sandboxed tool execution via MXC
|
|
4
|
+
"description": "OS-level sandboxed tool execution via MXC: runs commands in a Windows ProcessContainer with configured MXC policy files.",
|
|
5
5
|
"activation": {
|
|
6
6
|
"onStartup": false,
|
|
7
7
|
"onConfigPaths": ["plugins.entries.mxc"]
|
|
@@ -12,31 +12,70 @@
|
|
|
12
12
|
"properties": {
|
|
13
13
|
"mxcBinaryPath": {
|
|
14
14
|
"type": "string",
|
|
15
|
-
"minLength": 1
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"description": "Absolute path to the MXC executor (wxc-exec.exe). When unset, the executor is discovered from the installed @microsoft/mxc-sdk."
|
|
16
17
|
},
|
|
17
18
|
"containment": {
|
|
18
19
|
"type": "string",
|
|
19
|
-
"enum": ["process", "processcontainer"]
|
|
20
|
+
"enum": ["process", "processcontainer"],
|
|
21
|
+
"description": "Windows containment mode. 'process' and 'processcontainer' currently both resolve to the Windows ProcessContainer sandbox."
|
|
20
22
|
},
|
|
21
23
|
"network": {
|
|
22
24
|
"type": "string",
|
|
23
|
-
"enum": ["none", "default"]
|
|
25
|
+
"enum": ["none", "default"],
|
|
26
|
+
"description": "Outbound network policy. 'none' blocks all network; 'default' allows outbound access via the internetClient capability."
|
|
24
27
|
},
|
|
25
28
|
"timeoutSeconds": {
|
|
26
29
|
"type": "number",
|
|
27
30
|
"minimum": 1,
|
|
28
|
-
"maximum": 2147000
|
|
31
|
+
"maximum": 2147000,
|
|
32
|
+
"description": "Per-command execution timeout in seconds. Capped to the sandbox policy baseline timeout when both are set."
|
|
29
33
|
},
|
|
30
34
|
"debug": {
|
|
31
|
-
"type": "boolean"
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"description": "Forward verbose debug output from the MXC SDK launcher."
|
|
32
37
|
},
|
|
33
38
|
"mxcPolicyPaths": {
|
|
34
39
|
"type": "array",
|
|
35
40
|
"items": {
|
|
36
41
|
"type": "string",
|
|
37
42
|
"minLength": 1
|
|
38
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"description": "Absolute MXC policy file paths applied on top of the built-in sandbox baseline policy."
|
|
39
45
|
}
|
|
40
46
|
}
|
|
47
|
+
},
|
|
48
|
+
"configContracts": {
|
|
49
|
+
"dangerousFlags": [{ "path": "network", "equals": "default" }]
|
|
50
|
+
},
|
|
51
|
+
"uiHints": {
|
|
52
|
+
"mxcBinaryPath": {
|
|
53
|
+
"label": "MXC Executor Path",
|
|
54
|
+
"help": "Optional absolute path to the MXC executor (wxc-exec.exe). Leave unset to auto-discover from the installed @microsoft/mxc-sdk.",
|
|
55
|
+
"advanced": true
|
|
56
|
+
},
|
|
57
|
+
"containment": {
|
|
58
|
+
"label": "Containment Mode",
|
|
59
|
+
"help": "Windows containment mode. 'process' and 'processcontainer' currently both resolve to the Windows ProcessContainer sandbox."
|
|
60
|
+
},
|
|
61
|
+
"network": {
|
|
62
|
+
"label": "Network Policy",
|
|
63
|
+
"help": "'none' blocks all outbound network; 'default' allows outbound access via the internetClient capability, which weakens sandbox isolation."
|
|
64
|
+
},
|
|
65
|
+
"timeoutSeconds": {
|
|
66
|
+
"label": "Command Timeout (seconds)",
|
|
67
|
+
"help": "Per-command execution timeout, from 1 to 2147000 seconds. Capped to the sandbox policy baseline timeout when both are set.",
|
|
68
|
+
"advanced": true
|
|
69
|
+
},
|
|
70
|
+
"debug": {
|
|
71
|
+
"label": "Debug Logging",
|
|
72
|
+
"help": "Forward verbose debug output from the MXC SDK launcher.",
|
|
73
|
+
"advanced": true
|
|
74
|
+
},
|
|
75
|
+
"mxcPolicyPaths": {
|
|
76
|
+
"label": "MXC Policy Files",
|
|
77
|
+
"help": "Absolute MXC policy file paths applied on top of the built-in sandbox baseline policy.",
|
|
78
|
+
"advanced": true
|
|
79
|
+
}
|
|
41
80
|
}
|
|
42
81
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mxc-sandbox",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.4",
|
|
4
4
|
"description": "OpenClaw MXC sandbox execution plugin for MXC-capable hosts",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"minHostVersion": ">=2026.6.11"
|
|
22
22
|
},
|
|
23
23
|
"compat": {
|
|
24
|
-
"pluginApi": ">=2026.7.2-beta.
|
|
24
|
+
"pluginApi": ">=2026.7.2-beta.4"
|
|
25
25
|
},
|
|
26
26
|
"build": {
|
|
27
|
-
"openclawVersion": "2026.7.2-beta.
|
|
27
|
+
"openclawVersion": "2026.7.2-beta.4",
|
|
28
28
|
"bundledDist": false,
|
|
29
29
|
"staticAssets": [
|
|
30
30
|
{
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"README.md"
|
|
49
49
|
],
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"openclaw": ">=2026.7.2-beta.
|
|
51
|
+
"openclaw": ">=2026.7.2-beta.4"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
54
|
"openclaw": {
|