@openclaw/mxc-sandbox 2026.9.1 → 2026.9.2
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 +15 -17
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -131,6 +131,12 @@ function resolveMxcBinaryPath(configOverride) {
|
|
|
131
131
|
return found;
|
|
132
132
|
}
|
|
133
133
|
//#endregion
|
|
134
|
+
//#region extensions/mxc/src/path-comparison.ts
|
|
135
|
+
function normalizeMxcPathForComparison(value) {
|
|
136
|
+
const resolved = path.resolve(value);
|
|
137
|
+
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
134
140
|
//#region extensions/mxc/src/workspace-skill-mounts.ts
|
|
135
141
|
const MATERIALIZED_SANDBOX_SKILLS_WORKSPACE_PARTS = [".openclaw", "sandbox-skills"];
|
|
136
142
|
function containerJoin(root, ...parts) {
|
|
@@ -299,7 +305,7 @@ function resolveWorkspaceMounts(sandbox) {
|
|
|
299
305
|
containerRoot,
|
|
300
306
|
writable: false
|
|
301
307
|
}];
|
|
302
|
-
if (sandbox.workspaceAccess === "ro" &&
|
|
308
|
+
if (sandbox.workspaceAccess === "ro" && normalizeMxcPathForComparison(agentWorkspaceDir) !== normalizeMxcPathForComparison(workspaceDir)) mounts.push({
|
|
303
309
|
hostRoot: agentWorkspaceDir,
|
|
304
310
|
containerRoot: agentWorkspaceDir,
|
|
305
311
|
writable: false
|
|
@@ -324,7 +330,7 @@ function normalizeMxcProtectedSkillMount(mount) {
|
|
|
324
330
|
function dedupeAndSortMounts(mounts) {
|
|
325
331
|
const deduped = /* @__PURE__ */ new Map();
|
|
326
332
|
for (const mount of mounts) {
|
|
327
|
-
const key = `${
|
|
333
|
+
const key = `${normalizeMxcPathForComparison(mount.hostRoot)}::${normalizeMxcPathForComparison(mount.containerRoot)}`;
|
|
328
334
|
if (!deduped.has(key)) deduped.set(key, mount);
|
|
329
335
|
}
|
|
330
336
|
return [...deduped.values()].toSorted((left, right) => {
|
|
@@ -338,11 +344,7 @@ function resolveRelativeParentPath(relativePath) {
|
|
|
338
344
|
return parent === "." || parent === "" ? null : parent;
|
|
339
345
|
}
|
|
340
346
|
function isSameMountRoot(first, second) {
|
|
341
|
-
return
|
|
342
|
-
}
|
|
343
|
-
function normalizePathForComparison$1(value) {
|
|
344
|
-
const resolved = path.resolve(value);
|
|
345
|
-
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
347
|
+
return normalizeMxcPathForComparison(first) === normalizeMxcPathForComparison(second);
|
|
346
348
|
}
|
|
347
349
|
//#endregion
|
|
348
350
|
//#region extensions/mxc/src/sandbox-baseline.ts
|
|
@@ -646,7 +648,7 @@ function resolveWorkspaceReadwritePathSpecs(workspace) {
|
|
|
646
648
|
function resolveWorkspaceReadonlyPathSpecs(workspace) {
|
|
647
649
|
if (workspace.workspaceAccess === "rw") return [];
|
|
648
650
|
const readonlyPathSpecs = [requiredFilesystemPath(workspace.workspaceDir)];
|
|
649
|
-
if (workspace.workspaceAccess === "ro" &&
|
|
651
|
+
if (workspace.workspaceAccess === "ro" && normalizeMxcPathForComparison(workspace.agentWorkspaceDir) !== normalizeMxcPathForComparison(workspace.workspaceDir)) readonlyPathSpecs.push(requiredFilesystemPath(workspace.agentWorkspaceDir));
|
|
650
652
|
return readonlyPathSpecs;
|
|
651
653
|
}
|
|
652
654
|
function resolveBaselineReadonlyPathSpecs(baseline, context) {
|
|
@@ -656,9 +658,9 @@ function resolveMxcProtectedSkillPolicyPaths(context) {
|
|
|
656
658
|
const deduped = /* @__PURE__ */ new Map();
|
|
657
659
|
for (const mount of resolveMxcProtectedSkillMounts(context)) {
|
|
658
660
|
const hostPath = path.resolve(mount.hostPath);
|
|
659
|
-
deduped.set(
|
|
661
|
+
deduped.set(normalizeMxcPathForComparison(hostPath), hostPath);
|
|
660
662
|
const containerPath = path.resolve(mount.containerPath);
|
|
661
|
-
deduped.set(
|
|
663
|
+
deduped.set(normalizeMxcPathForComparison(containerPath), containerPath);
|
|
662
664
|
}
|
|
663
665
|
return [...deduped.values()];
|
|
664
666
|
}
|
|
@@ -676,7 +678,7 @@ function resolveMxcProtectedSkillMounts(context) {
|
|
|
676
678
|
function resolveExistingFilesystemPaths(pathSpecs, accessLabel) {
|
|
677
679
|
const deduped = /* @__PURE__ */ new Map();
|
|
678
680
|
for (const pathSpec of pathSpecs) {
|
|
679
|
-
const key =
|
|
681
|
+
const key = normalizeMxcPathForComparison(pathSpec.path);
|
|
680
682
|
const existing = deduped.get(key);
|
|
681
683
|
if (existing) {
|
|
682
684
|
existing.required ||= pathSpec.required;
|
|
@@ -740,14 +742,10 @@ function assertNoMxcReadwriteReadonlyOverlap(params) {
|
|
|
740
742
|
for (const readwritePath of params.readwritePaths) for (const readonlyPath of params.readonlyPaths) if (pathsOverlap(readwritePath, readonlyPath)) throw new Error(`MXC readwrite path ${readwritePath} overlaps read-only path ${readonlyPath}. Windows MXC cannot safely enforce nested read-only overlays under writable paths.`);
|
|
741
743
|
}
|
|
742
744
|
function pathsOverlap(first, second) {
|
|
743
|
-
const left =
|
|
744
|
-
const right =
|
|
745
|
+
const left = normalizeMxcPathForComparison(first);
|
|
746
|
+
const right = normalizeMxcPathForComparison(second);
|
|
745
747
|
return isPathInside(left, right) || isPathInside(right, left);
|
|
746
748
|
}
|
|
747
|
-
function normalizePathForComparison(value) {
|
|
748
|
-
const resolved = path.resolve(value);
|
|
749
|
-
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
750
|
-
}
|
|
751
749
|
function hostPathExists(candidatePath) {
|
|
752
750
|
try {
|
|
753
751
|
statSync(candidatePath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/mxc-sandbox",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.2",
|
|
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.9.
|
|
24
|
+
"pluginApi": ">=2026.9.2"
|
|
25
25
|
},
|
|
26
26
|
"build": {
|
|
27
|
-
"openclawVersion": "2026.9.
|
|
27
|
+
"openclawVersion": "2026.9.2",
|
|
28
28
|
"bundledDist": false,
|
|
29
29
|
"staticAssets": [
|
|
30
30
|
{
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"README.md"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"openclaw": ">=2026.9.
|
|
50
|
+
"openclaw": ">=2026.9.2"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"openclaw": {
|