@openclaw/mxc-sandbox 2026.7.2-beta.3 → 2026.7.2-beta.5

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 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 ?? env.TMP ?? "C:\\Windows\\Temp";
371
+ return firstNonBlankEnv(env.TEMP, env.TMP) ?? "C:\\Windows\\Temp";
369
372
  }
370
373
  function resolveBaselineReadonlyPaths(env) {
371
- const systemRoot = env.SystemRoot ?? env.WINDIR ?? "C:\\Windows";
374
+ const systemRoot = firstNonBlankEnv(env.SystemRoot, env.WINDIR) ?? "C:\\Windows";
372
375
  return dedupeStable([
373
- env.ProgramFiles ?? env.ProgramW6432 ?? "C:\\Program Files",
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
  ]);
@@ -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 for MXC-capable Windows hosts: runs commands in ProcessContainer (Windows) with configured MXC policy files.",
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",
3
+ "version": "2026.7.2-beta.5",
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.3"
24
+ "pluginApi": ">=2026.7.2-beta.5"
25
25
  },
26
26
  "build": {
27
- "openclawVersion": "2026.7.2-beta.3",
27
+ "openclawVersion": "2026.7.2-beta.5",
28
28
  "bundledDist": false,
29
29
  "staticAssets": [
30
30
  {
@@ -44,11 +44,10 @@
44
44
  "files": [
45
45
  "dist/**",
46
46
  "openclaw.plugin.json",
47
- "npm-shrinkwrap.json",
48
47
  "README.md"
49
48
  ],
50
49
  "peerDependencies": {
51
- "openclaw": ">=2026.7.2-beta.3"
50
+ "openclaw": ">=2026.7.2-beta.5"
52
51
  },
53
52
  "peerDependenciesMeta": {
54
53
  "openclaw": {
@@ -1,66 +0,0 @@
1
- {
2
- "name": "@openclaw/mxc-sandbox",
3
- "version": "2026.7.2-beta.3",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "@openclaw/mxc-sandbox",
9
- "version": "2026.7.2-beta.3",
10
- "dependencies": {
11
- "@microsoft/mxc-sdk": "0.7.0",
12
- "zod": "4.4.3"
13
- }
14
- },
15
- "node_modules/@microsoft/mxc-sdk": {
16
- "version": "0.7.0",
17
- "resolved": "https://registry.npmjs.org/@microsoft/mxc-sdk/-/mxc-sdk-0.7.0.tgz",
18
- "integrity": "sha512-EWhz2pKkcPluZHAOI1yneV+JK0NO/3hdh7nABBb0x4PjyUWMeSWPTBAjtIu+BhtMYOqlaijSPZMZ0Hs/J4ZL4A==",
19
- "license": "MIT",
20
- "dependencies": {
21
- "node-pty": "^1.2.0-beta.12",
22
- "semver": "^7.7.4"
23
- },
24
- "engines": {
25
- "node": ">=18.0.0"
26
- }
27
- },
28
- "node_modules/node-addon-api": {
29
- "version": "7.1.1",
30
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
31
- "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
32
- "license": "MIT"
33
- },
34
- "node_modules/node-pty": {
35
- "version": "1.2.0-beta.14",
36
- "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-1.2.0-beta.14.tgz",
37
- "integrity": "sha512-XORU9BQgpxVgqr7WivjJ17mLenOHUgKKWzuZZNaw3NDYgHc/wPJQMSaoLDrpEgqV6aU1nNwil1o/OqYj6lWmUA==",
38
- "hasInstallScript": true,
39
- "license": "MIT",
40
- "dependencies": {
41
- "node-addon-api": "^7.1.0"
42
- }
43
- },
44
- "node_modules/semver": {
45
- "version": "7.8.5",
46
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
47
- "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
48
- "license": "ISC",
49
- "bin": {
50
- "semver": "bin/semver.js"
51
- },
52
- "engines": {
53
- "node": ">=10"
54
- }
55
- },
56
- "node_modules/zod": {
57
- "version": "4.4.3",
58
- "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
59
- "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
60
- "license": "MIT",
61
- "funding": {
62
- "url": "https://github.com/sponsors/colinhacks"
63
- }
64
- }
65
- }
66
- }