Skip to content

feat(mxc): add Windows MXC sandbox backend - #97086

Merged
RomneyDa merged 11 commits into
openclaw:mainfrom
paulcam206:mxc-sandbox-plugin
Jul 13, 2026
Merged

RomneyDa merged 11 commits into
openclaw:mainfrom
paulcam206:mxc-sandbox-plugin

Conversation

@paulcam206

@paulcam206 paulcam206 commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw does not currently have an official installable MXC sandbox backend for Windows hosts that can run sandboxed commands through Microsoft eXecution Containers. This leaves MXC-capable Windows environments without a first-party plugin path for ProcessContainer-backed execution and filesystem bridge operations.

Why This Change Was Made

This adds an official OpenShell-style external mxc sandbox plugin package (@openclaw/mxc-sandbox) with Windows-only readiness checks, plugin-owned MXC SDK dependency ownership, ProcessContainer payload construction, a plugin-side launcher, host-backed filesystem bridge support, sandbox policy loading, and targeted tests.

The plugin source lives under extensions/mxc, but it is packaged as an installable plugin (bundledDist: false) so the MXC SDK/native dependency is owned by the plugin package instead of an unshipped bundled node_modules tree. The backend uses the current MXC 0.7.0-alpha schema and keeps sandbox defaults conservative: strict plugin config, read-only isolated workspaces for none, a distinct read-only agent workspace for ro, writable agent workspaces for rw, fail-closed protected-skill overlap handling, guarded fs-safe host mutations, required explicit policy files/paths, and host-derived Windows baseline roots.

The MXC read-only skill mount resolver remains plugin-local instead of adding a plugin-specific public sandbox SDK export. The only new shared SDK surface is the narrow generic fs-safe recursive-remove seam requested by review because the sandbox bridge contract includes recursive/force behavior that the pinned fs-safe Root.remove API does not expose.

User Impact

Users on MXC-capable Windows hosts can install the official MXC sandbox plugin, restart the Gateway, configure sandbox.backend: "mxc", and run OpenClaw sandboxed commands through MXC. Non-Windows or unsupported Windows hosts remain unaffected because the plugin stays dormant when readiness probes fail.

Install command:

openclaw plugins install @openclaw/mxc-sandbox

Evidence

Related: microsoft/mxc#626

AI-assisted: yes. The implementation and review-response pass used Copilot CLI, with every accepted review finding checked against current OpenClaw code, the pinned fs-safe API, the MXC SDK source/types, focused tests, and native Windows behavior.

Final review-response refresh (2026-07-10)

  • Final pushed head: 92f6e6d62780c52a11976cc06ae0f3b76488a096.
  • Rebase base used for the validated pass: 2f9cb9200669fe5df86fd229b445685e9b1b81b1 (upstream/main at rebase time).
  • The first eight commits replayed with exact equality (=). The final SDK-surface commit changed only its pinned export budget to match current main: 10,494 public exports / 5,237 callable exports.
  • Addressed the July 10 review:
    • workspaceAccess: "ro" now maps the distinct agent workspace read-only in both ProcessContainer policy and the fs bridge.
    • host mkdir/remove/rename operations now use fs-safe Root operations; recursive removal uses one narrow shared fs-safe seam with force/not-found and rebind-race coverage.
    • configured policy files and explicit filesystem paths now fail closed with source/path provenance.
    • MXC config now follows the strict OpenShell-style Zod/plugin-schema pattern with the Node-safe timer cap and manifest parity.
    • container policy construction is split from execution lifecycle and uses the MXC SDK ContainerConfig type.
    • generic bundledDist: false static-asset behavior has direct regression coverage.
    • the MXC README and Chinese glossary are current.

Linux validation

Local WSL2 Ubuntu-24.04, isolated Linux-filesystem clones, Node v24.13.0, pnpm 11.2.2:

  • final-head Oxfmt check and git diff --check passed.
  • focused MXC/fs-safe/plugin-SDK/runtime-postbuild tests passed.
  • pnpm test:extension mxc passed: 8 files passed / 2 Windows-only files skipped; 57 tests passed / 52 skipped.
  • pnpm check:test-types passed.
  • pnpm build passed on production-equivalent head 104bc7aad8d3d63ebc2659dd0ea20dee96b23318; the final delta only updates extensions/mxc/test/mxc-backend.test.ts.
  • plugin inventory, docs map, i18n glossary, and changed-shrinkwrap checks passed before the final test-only delta.
  • pnpm check:changed could not run locally because its selected Crabbox/Testbox binary failed its own --version/--help sanity check on both candidate and base; this is environment/tooling, not candidate-specific.

Native Windows validation

SSH target [email protected], exact final head, Node v24.18.0, pnpm 11.2.2:

  • focused MXC tests passed: 2 files / 52 tests.
  • pnpm test:extension mxc passed: 10 files / 109 tests.
  • plugin-specific runtime build passed with node scripts/lib/plugin-npm-runtime-build.mjs extensions/mxc.
  • packed openclaw-mxc-sandbox-2026.6.11.tgz: 32 files, including package/dist/index.js, package/dist/mxc-spawn-launcher.mjs, and package/npm-shrinkwrap.json.
  • managed npm-pack: install passed; openclaw plugins inspect mxc --runtime --json reported status: "loaded" from isolated managed plugin state.
  • native wxc-exec.exe ProcessContainer smoke passed:
    • MXC_PROCESSCONTAINER_OK.
    • none denied access to the distinct agent workspace.
    • ro allowed reads and denied mutation.
    • rw persisted MXC_RW_MARKER.
    • protected skill overlap failed closed.
    • missing configured policy file/path failed closed.

Review closeout

Copilot autoreview was split into complete production, test, and docs bundles because the single complete PR bundle exceeded Copilot's input limit.

  • production/docs bundles were clean after review-response updates.
  • Copilot identified a binary-override test mock that did not exercise the configured path; the mock/assertion now verify the real wiring.
  • Copilot questioned rw protected-skill behavior; direct MXC source inspection and native Windows proof confirm a nested read-only grant does not override a writable parent, so the overlap guard remains intentionally fail-closed and the README now states that limitation accurately.
  • follow-up commit reviews for 104bc7aad8 and c0a242c368 exited clean with no accepted/actionable findings.
  • CI lint follow-up ab74106328 fixes the two extension Oxlint findings (import type and preserved caught-error cause); targeted Oxlint and Copilot autoreview are clean.
  • SDK surface follow-up 92f6e6d627 moves recursive removal out of broad infra-runtime and keeps it only on focused file-access-runtime. After rebasing onto current main, the compact-shard test, surface check, focused tests, MXC extension suite, test types, SDK package boundary check, full WSL2 build, and Copilot autoreview are clean.

Remaining maintainer gates

@paulcam206
paulcam206 requested a review from a team as a code owner June 26, 2026 18:54
@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/mxc/npm-shrinkwrap.json
  • extensions/mxc/package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jun 26, 2026
@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes are blocked

OpenClaw does not accept dependency graph changes through PRs unless a repository admin or security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph.

Detected dependency graph changes:

  • extensions/mxc/npm-shrinkwrap.json changed.
  • pnpm-lock.yaml changed.
  • extensions/mxc/package.json changed dependencies, devDependencies, name, version.

Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:

  • extensions/mxc/package.json changed dependencies, devDependencies, name, version.

Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed.

To remove lockfile changes, restore them from the target branch:

git fetch origin
git checkout 'origin/main' -- 'extensions/mxc/npm-shrinkwrap.json' 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git push

If this PR intentionally needs a dependency graph change, ask a repository admin or member of @openclaw/openclaw-secops to comment:

/allow-dependencies-change

The action will approve the current head SHA (5a9469c369cfe322104c02d4f0cb588b544d7d6a) when it reruns. A later push requires a fresh approval.

@socket-security

socket-security Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​microsoft/​mxc-sdk@​0.7.08110010094100

View full report

@socket-security

socket-security Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@clawsweeper

clawsweeper Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 13, 2026, 1:47 AM ET / 05:47 UTC.

Summary
Adds an external installable Windows MXC sandbox plugin with ProcessContainer execution, filesystem and workspace policy enforcement, package metadata, documentation, and regression tests.

PR surface: Source +2720, Tests +2805, Docs +384, Config +67, Other +70. Total +6046 across 52 files.

Reproducibility: not applicable. This PR introduces a new Windows MXC sandbox backend rather than fixing an established current-main bug.

Review metrics: 2 noteworthy metrics.

  • Plugin config surface: 6 keys added. The new MXC settings become an operator-facing support and compatibility contract when the plugin is enabled.
  • Native dependency boundary: 1 direct SDK plus 1 transitive native PTY. The resolved graph includes packaged executors and an install-script dependency requiring exact-head security approval.

Stored data model
Persistent data-model change detected: serialized state: extensions/mxc/src/fs-bridge.ts, serialized state: extensions/mxc/src/mxc-spawn-launcher.mjs, serialized state: extensions/mxc/test/mxc-spawn-launcher.test.ts, serialized state: extensions/mxc/test/sandbox-policy-loader.test.ts, serialized state: src/infra/fs-safe-remove.test.ts, serialized state: test/scripts/runtime-postbuild.test.ts, and 2 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦀 challenger crab ✨ media proof bonus
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] The exact current head adds @microsoft/mxc-sdk, packaged native executors, a transitive node-pty installation script, lock and shrinkwrap entries, and a native build allowance that require admin or secops authorization. (github.com)
  • [P1] The upstream SDK places the full encoded sandbox request on process argv, potentially exposing command lines, filesystem paths, environment-derived values, and policy details to local process observers. (github.com)
  • [P1] The new official backend and six plugin configuration keys create a first-party Windows operator, compatibility, and support contract despite the plugin being opt-in. (github.com)

Maintainer options:

  1. Approve the exact head after security review (recommended)
    Have admin or secops approve the current SHA's native SDK, executor packaging, node-pty install script, and argv transport before merge.
  2. Pause for a non-argv transport
    Wait for upstream MXC to provide a safer request transport and refresh Windows package and runtime proof on the revised dependency.
  3. Keep distribution independent
    Do not add the package to OpenClaw's official plugin inventory until the dependency and operator-support boundary matures.

Next step before merge

  • [P2] A maintainer or secops owner must approve the exact dependency graph and decide whether the preview SDK argv exposure is acceptable; there is no remaining narrow automated repair.

Maintainer decision needed

  • Question: Should OpenClaw accept the exact-head native MXC dependency graph and upstream argv-carried sandbox envelope as a first-party Windows sandbox plugin boundary?
  • Rationale: The known implementation defects have been repaired and the real behavior proof is strong, but automation cannot authorize native dependency execution or decide whether process-list exposure of the sandbox request is acceptable.
  • Likely owner: steipete — The live PR assigns this security-sensitive product and dependency decision to steipete.
  • Options:
    • Approve with secops signoff (recommended): Accept the current dependency graph and preview argv transport after exact-head admin or secops review, then proceed through normal merge gates.
    • Wait for safer transport: Keep the PR open until the MXC SDK supports a file, stdin, pipe, or equivalent non-argv request transport.
    • Decline first-party ownership: Keep MXC independently distributed until OpenClaw is ready to own the native dependency and Windows support contract.

Security
Needs attention: The patch is coherent, but exact-head native dependency approval and explicit acceptance of the upstream argv exposure are required before merge.

Review details

Best possible solution:

Keep the external OpenShell-style plugin boundary, but land only after exact-head dependency approval and an explicit maintainer decision to accept the preview SDK argv exposure; otherwise pause until MXC provides a non-argv transport.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this PR introduces a new Windows MXC sandbox backend rather than fixing an established current-main bug.

Is this the best way to solve the issue?

Yes for implementation ownership: the external installable plugin follows the existing OpenShell precedent and keeps vendor-native dependencies out of core, but accepting its security boundary remains a human decision.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 807491e0f125.

Label changes

Label changes:

  • add merge-risk: 🚨 compatibility: Merging adds an official sandbox backend and six operator-facing configuration keys with fail-closed readiness and policy behavior.

Label justifications:

  • P2: This is a normal-priority optional Windows sandbox feature with limited blast radius until explicitly installed and configured.
  • merge-risk: 🚨 compatibility: Merging adds an official sandbox backend and six operator-facing configuration keys with fail-closed readiness and policy behavior.
  • merge-risk: 🚨 security-boundary: Merging adds native sandbox executors, an install-script dependency, and an upstream transport that exposes the encoded sandbox envelope on process argv.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦀 challenger crab and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR includes release-path Windows install and runtime-load proof plus native ProcessContainer execution and linked screenshot artifacts; the final registration-only commit is non-visible and has focused regression coverage. (github.com)
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR includes release-path Windows install and runtime-load proof plus native ProcessContainer execution and linked screenshot artifacts; the final registration-only commit is non-visible and has focused regression coverage. (github.com)
Evidence reviewed

PR surface:

Source +2720, Tests +2805, Docs +384, Config +67, Other +70. Total +6046 across 52 files.

View PR surface stats
Area Files Added Removed Net
Source 21 2721 1 +2720
Tests 14 2807 2 +2805
Docs 5 385 1 +384
Config 5 67 0 +67
Generated 0 0 0 0
Other 7 75 5 +70
Total 52 6055 9 +6046

Security concerns:

  • [medium] Approve the native MXC dependency graph — extensions/mxc/package.json:13
    The plugin introduces @microsoft/mxc-sdk, packaged executors, and transitive node-pty native installation; dependency guard correctly requires exact-head admin or secops authorization.
    Confidence: 0.98
  • [medium] Accept or replace argv envelope transport — extensions/mxc/src/mxc-spawn-launcher.mjs:125
    The upstream SDK passes the full encoded sandbox request to wxc-exec on argv, exposing command and policy details to local process inspection while it runs.
    Confidence: 0.99

What I checked:

Likely related people:

  • steipete: The live PR assigns steipete, and the unresolved work is first-party ownership of the native dependency and sandbox security boundary rather than a mechanical contributor fix. (github.com) (role: assigned decision owner; confidence: medium; files: extensions/mxc/package.json, pnpm-lock.yaml, pnpm-workspace.yaml)
  • galiniliev: Provided the latest focused OpenShell/MXC parity review covering registration scope and protected workspace overlays, which the current head addresses. (github.com) (role: recent area reviewer; confidence: high; files: extensions/mxc/src/plugin.ts, extensions/mxc/src/mxc-backend.ts, extensions/mxc/test/mxc-backend.test.ts)
  • giodl73-repo: Steered the implementation from bundled dependency ownership toward the external installable plugin pattern and contributed the Windows binary-path repair in the supplied history. (role: packaging boundary reviewer; confidence: medium; commits: 4e2d39f09b14; files: extensions/mxc/package.json, extensions/mxc/src/binary-resolver.ts, scripts/lib/static-extension-assets.mjs)
  • shanselman: Approved the PR after reviewing an earlier rebased implementation, providing a positive feature-direction signal, though exact-head dependency approval remains outstanding. (github.com) (role: approver; confidence: medium; files: extensions/mxc/src/mxc-backend.ts, extensions/mxc/package.json)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (23 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-09T20:14:46.329Z sha 8499806046583551947faa4b52ac65b0723402ec :: needs maintainer review before merge. :: none
  • reviewed 2026-07-10T07:12:47.870Z sha e7d3ca60852ceff621376f43e96b7565839d1323 :: found issues before merge. :: [P1] Preserve the read-only agent workspace mapping | [P1] Use fs-safe operations for host mutations | [P1] Fail closed for explicitly configured policy
  • reviewed 2026-07-10T21:28:29.596Z sha c0a242c3689a5386c178ada78d9594e4038b2134 :: needs real behavior proof before merge. :: [P2] Make the workspace access import fully type-only | [P2] Preserve the caught policy validation error
  • reviewed 2026-07-10T21:49:22.384Z sha ab74106328608995d3122189d702b71fa71c0390 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-10T22:00:16.275Z sha ab74106328608995d3122189d702b71fa71c0390 :: found issues before merge. :: [P2] Update the public SDK surface budget for the new export
  • reviewed 2026-07-10T22:11:34.190Z sha ab74106328608995d3122189d702b71fa71c0390 :: needs changes before merge. :: [P2] Pin the public SDK budgets to the new surface
  • reviewed 2026-07-10T23:37:15.808Z sha 60a85fa8d9756daf88ea96be36b1b3784d9c1239 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-11T00:49:07.519Z sha 92f6e6d62780c52a11976cc06ae0f3b76488a096 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jun 26, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor

Thanks for the substantial MXC backend work. I took a maintainer pass over the current shape and wanted to separate the main blockers from the broader product/security decision.

As written, this is declared as a bundled OpenClaw plugin (extensions/mxc, plugin id mxc, package @openclaw/mxc), not a direct core module. However, because it is added to the main repo/workspace and registers sandbox.backend: "mxc", we need to review it as a first-party packaged sandbox surface unless the intended direction is to make it an external installable plugin instead.

Could you please address these before the next maintainer/security pass?

  1. Runtime dependency ownership / packaged install

@microsoft/mxc-sdk is declared only in extensions/mxc/package.json, but packaged OpenClaw excludes nested dist/extensions/*/node_modules/**, and bundled plugin postinstall does not install plugin package dependencies. That means this can work in a source checkout but fail after package install when the launcher imports/resolves the MXC SDK.

Please either:

  • make the root/package distribution intentionally own and ship the MXC SDK dependency path, with packaged-install proof, or
  • reshape this as an external installable plugin with the dependency installed by the plugin install/update flow.
  1. CI blockers

Current checks are still failing, including dependency guard, security-fast, check-dependencies, Opengrep, changed-path scan, check-additional-boundaries-bcd, and checks-node-compact-small-whole-2. A few concrete items from those logs:

  • extensions/mxc/src/mxc-backend.ts:122 uses host tmpdir() for payload files; the boundary check asks for resolvePreferredOpenClawTmpDir() or plugin-sdk temp helpers instead.
  • The new static asset dist/extensions/mxc/mxc-spawn-launcher.mjs needs to be reflected in the release/static asset metadata tests.
  • The dependency graph change needs explicit maintainer/security approval on the final exact head SHA, so it should be as small and intentional as possible before that approval is requested.
  1. Schema version

The backend hard-codes MXC schema 0.8.0-alpha, but the inspected @microsoft/[email protected] docs mark 0.7.0-alpha as the stable/current schema and 0.8.0-alpha as dev/experimental. Please switch to 0.7.0-alpha unless there is a specific MXC feature here that requires the dev schema, in which case please document that reason and the compatibility/proof expectation.

  1. Real packaged Windows proof

The hosted Windows unit checks are useful, but they do not prove the package/runtime path. Before approval we need redacted proof from a package-like Windows setup showing OpenClaw configured with sandbox.backend: "mxc", resolving the SDK/binary, executing a command successfully, and exercising the expected isolation defaults.

I think the direction is worth continuing, but the next revision needs to make the packaging/security boundary explicit before maintainers can approve the dependency override.

@giodl73-repo

Copy link
Copy Markdown
Contributor

Small clarification after comparing this with the existing sandbox backend layout:

The closest precedent here is extensions/openshell, not the built-in Docker backend. Docker/SSH are core sandbox backends under src/agents/sandbox, but vendor/platform-specific container backends can live as official plugins. OpenShell does that as an extension package with install/release metadata rather than relying on bundled root-package runtime deps.

So my recommended path for this PR is:

  • Keep MXC as an official OpenClaw plugin shape, not a direct core backend.
  • Add the missing plugin install/release/compat metadata following the OpenShell pattern if this is intended to ship as a first-party plugin.
  • Do not rely on extensions/mxc/node_modules being present in the root packaged OpenClaw install. The MXC SDK/native dependency should be owned by the plugin package/install flow, or explicitly moved to root ownership only if maintainers decide MXC should be bundled into the root package by default.
  • Keep the same security bar either way because it registers a sandbox backend: green CI, dependency approval on the final head, stable schema or documented exception, and real packaged Windows proof.

In short: the normal OpenClaw fit for this kind of optional Windows container backend looks like an official installable plugin, closer to OpenShell, rather than a core Docker-equivalent backend.

@paulcam206

paulcam206 commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Review follow-up pushed locally and ready to publish:

  • Converted MXC to an OpenShell-style external installable plugin package (@openclaw/mxc-sandbox) with bundledDist: false, npm/ClawHub release metadata, and plugin-owned @microsoft/mxc-sdk dependency.
  • Switched MXC config schema to stable 0.7.0-alpha for @microsoft/[email protected].
  • Reworked the env test helper to use allowlisted vi.stubEnv calls instead of arbitrary process.env mutation.
  • Added extensions/mxc/npm-shrinkwrap.json for the publishable plugin package.
  • Updated README install/config docs for openclaw plugins install @openclaw/mxc-sandbox.

Validation:

  • pnpm test:extension mxc -- --reporter=verbose
  • pnpm test:changed
  • pnpm release:plugins:npm:check -- --plugins @openclaw/mxc-sandbox
  • pnpm release:plugins:clawhub:check -- --plugins @openclaw/mxc-sandbox
  • pnpm check
  • pnpm build
  • Copilot autoreview clean after retry.

Dependency report generated with pnpm deps:changes:report -- --base-ref origin/main --markdown <session>/dependency-changes.md --json <session>/dependency-changes.json.

Remaining blocker: real Windows MXC behavior proof

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jun 27, 2026
@paulcam206

Copy link
Copy Markdown
Contributor Author

Pushed follow-up fixes in 570f47e673fba547d5b794026efd021ca5998ce7:

  • MXC launcher payload temp files now use the OpenClaw temp root via resolvePreferredOpenClawTmpDir().
  • Packed plugin launcher resolution now finds dist/mxc-spawn-launcher.mjs from the external package layout.
  • pnpm-lock.yaml no longer contains vulnerable [email protected]; [email protected] is kept on [email protected], and shrinkwrap generation now translates the pnpm scoped override into npm-compatible nested overrides.

Current validation:

  • pnpm test:extension mxc -- --reporter=verbose
  • pnpm test extensions\mxc test\scripts\generate-npm-shrinkwrap.test.ts -- --reporter=verbose
  • pnpm release:plugins:npm:check -- --plugins @openclaw/mxc-sandbox
  • pnpm release:plugins:clawhub:check -- --plugins @openclaw/mxc-sandbox
  • pnpm test:changed
  • pnpm check
  • pnpm build

Real Windows MXC package proof completed on Crabbox static SSH Windows:

  • provider ssh, lease static_10-127-3-94, target windows-normal
  • installed published [email protected] plus local @openclaw/[email protected] package
  • verified @microsoft/[email protected] and packaged wxc-exec.exe
  • registered backend mxc
  • ran echo MXC_PROOF_OK && cd through backend.runShellCommand
  • result: PROOF:exit=0, PROOF:stdout=MXC_PROOF_OK |...\workspace|, PROOF:stderr=

Copilot autoreview was retried twice on this head but the helper failed to parse Copilot MCP status-event noise as JSON before returning a structured review. No structured finding was produced.

@clawsweeper re-review

Maintainer/security note: Dependency Graph Guard still needs /allow-dependencies-change approval for this current head SHA if the dependency report and Socket findings are acceptable.

@clawsweeper

clawsweeper Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 27, 2026
@paulcam206

Copy link
Copy Markdown
Contributor Author

Additional user-facing plugin install proof is now available on the same static Windows Crabbox host:

  • provider ssh, lease static_10-127-3-94, target windows-normal
  • installed published [email protected] in an isolated temp project
  • ran node <published-openclaw>/dist/entry.js plugins install <local @openclaw/mxc-sandbox tgz> --force --pin
  • install succeeded with PROOF3:installExit=0
  • install output included Installing plugin dependencies…, Installed plugin: mxc, and Restart the gateway to load plugins.
  • config/install state proof:
    • PROOF3:configExists=True
    • PROOF3:configHasMxc=True
    • PROOF3:pluginRoot=...\state\extensions\mxc
    • PROOF3:installedPlugin=2026.6.10

This supplements the earlier Windows MXC backend execution proof on the same host, where the packaged plugin resolved @microsoft/[email protected], found packaged wxc-exec.exe, registered backend mxc, and ran echo MXC_PROOF_OK && cd through backend.runShellCommand with PROOF:exit=0.

@clawsweeper re-review

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 27, 2026
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 27, 2026
@paulcam206

Copy link
Copy Markdown
Contributor Author

Final CI/rebase refresh: force-pushed 92f6e6d62780c52a11976cc06ae0f3b76488a096 onto current upstream/main 2f9cb9200669fe5df86fd229b445685e9b1b81b1.

  • first eight commits are exact git range-diff matches;
  • final SDK-surface commit changed only the pinned budget for current main's source counts: 10,494 public exports / 5,237 callable exports;
  • local focused Oxfmt/Oxlint, helper/SDK tests, compact-shard surface test, and surface check passed;
  • clean Ubuntu 24.04 WSL2 clone passed install, focused tests, pnpm test:extension mxc, pnpm check:test-types, SDK package boundary check, surface check, and full pnpm build;
  • Copilot autoreview of the rebased final commit is clean.

The PR is mergeable again. Replacement CI is starting on the exact rebased head; dependency-guard remains the expected maintainer/secops gate.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@paulcam206

Copy link
Copy Markdown
Contributor Author

Final exact-head CI confirmation for 92f6e6d62780c52a11976cc06ae0f3b76488a096:

There are no remaining non-dependency CI failures or pending checks. dependency-guard is the sole remaining failure and still requires the expected maintainer/secops approval for the intentional native dependency graph.

paulcam206 and others added 11 commits July 12, 2026 22:26
Add the official MXC sandbox plugin package with Windows ProcessContainer execution, plugin-owned MXC SDK dependency packaging, host-backed filesystem bridge support, and configured MXC policy file loading via mxcPolicyPaths.

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 9ea19539-b8ca-44fb-93bd-b8496e3deb2c
@RomneyDa

Copy link
Copy Markdown
Member

Rebased and repaired CI at exact head 5a9469c369c: fixed MXC tuple/index typing, narrowed dead exports through the production factory boundary, and added the missing shrinkwrap declaration.

CI run 29226601562 completed green, including prod/test types, dead-export hygiene, extension package boundaries, lint, Windows, and all test shards. The only remaining failure is the intentionally deferred dependency-approval gate.

return resolvedOverride;
}

const binaryName = "wxc-exec.exe";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a module level const.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling dependencies-changed PR changes dependency-related files docker Docker and sandbox tooling docs Improvements or additions to documentation merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants