Skip to content

windows: caller env for MXC commands; SDK as optional peer - #822

Merged
ig-ant merged 1 commit into
mainfrom
claude/kind-pasteur-5runtz
Nov 11, 2026
Merged

ig-ant merged 1 commit into
mainfrom
claude/kind-pasteur-5runtz

Conversation

@ig-ant

@ig-ant ig-ant commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Lets callers of spawnSandboxed() set environment variables on MXC commands, and stops installing @microsoft/mxc-sdk and its native dependencies (koffi, node-pty) for every user of this package.

  • spawnSandboxed() and MxcSandboxParams take env, applied over every other layer.
  • MXC child environments now merge ignoring case, as srt-win's do, so each proxy variable has one lowercase spelling. NODE_USE_ENV_PROXY is set when there is a proxy.
  • The SDK becomes an optional peer dependency. Bundlers that resolve its variable import() no longer pull it in.

Behaviour change: programs using windows.backend: 'mxc' through the npm SDK must install it themselves or pass windowsMxcSdk to initialize(). The README and the missing-SDK error say so. The Windows CI diagnostic step now installs the SDK itself.

Test plan

  • bun test on the MXC, winsrt and config-validation files: 617 pass, 0 fail, 97 skipped (Windows only). New tests cover env precedence, one spelling per name, and NODE_USE_ENV_PROXY.
  • tsc is clean.
  • Packed the tarball and installed it with no SDK: koffi and node-pty were absent, buildMxcRequest merged env as expected, and loadMxcSdk gave the new error.
  • Not run: ESLint (one dev dependency could not be installed in my environment), or anything on real Windows.

Generated by Claude Code

… peer

spawnSandboxed() takes env, and MXC child environments merge ignoring case as srt-win's do.
Installing the package no longer pulls in the SDK's native dependencies, so programs using the npm SDK must install it themselves.

Co-authored-by: ig <ig@anthropic.com>

@antdres antdres left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/stamp

@ig-ant
ig-ant merged commit 41501a6 into main Nov 11, 2026
16 checks passed
@ig-ant
ig-ant deleted the claude/kind-pasteur-5runtz branch November 11, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants