Files
openclaw/extensions/mxc/test
Paul Campbell 6bd83561ad fix(mxc): agent tools fail in Windows workspace subdirectories (#115399)
* fix(mxc): validate agent workdirs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: fc20c06c-e8c0-4649-9efd-ad87fac71a4f

* fix(mxc): treat non-directory parents as unavailable workdirs

validateWorkdir declares that unusable workdirs return null, but only ENOENT was classified as missing. A workdir nested under a file raises ENOTDIR on Linux, which escaped as a raw filesystem error instead of the normal unavailable-workdir result.

The same ENOENT-only classification appeared at three sibling sites in this file, so the shared isMissingPathError guard fixes the whole class rather than the single reported path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d7253887-71c9-4083-a591-91979c981e39

* fix(mxc): sandbox provisioning crashes reading containerWorkdir

MxcFsBridge initialized three fields from this.sandbox, but sandbox is a constructor parameter property. Plugin sources load through jiti, which evaluates field initializers before assigning parameter properties, so this.sandbox was still undefined and every MXC sandbox provisioning failed with SandboxProvisioningError: Cannot read properties of undefined (reading 'containerWorkdir').

Assign the derived fields in the constructor body from the sandbox parameter instead. The repo tsconfig sets useDefineForClassFields=false, so tsgo and Vitest (esbuild) both apply legacy ordering and could not observe the failure; only the jiti-loaded runtime path did.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d7253887-71c9-4083-a591-91979c981e39

---------

Copilot-Session: fc20c06c-e8c0-4649-9efd-ad87fac71a4f
Copilot-Session: d7253887-71c9-4083-a591-91979c981e39
2026-08-11 11:38:34 +08:00
..