Skip to content

Add SDK state-aware support for the Windows Sandbox backend (Phase 3)#579

Open
MGudgin wants to merge 1 commit into
user/gudge/wsb-phase2-state-awarefrom
user/gudge/wsb-phase3-sdk
Open

Add SDK state-aware support for the Windows Sandbox backend (Phase 3)#579
MGudgin wants to merge 1 commit into
user/gudge/wsb-phase2-state-awarefrom
user/gudge/wsb-phase3-sdk

Conversation

@MGudgin

@MGudgin MGudgin commented Jun 26, 2026

Copy link
Copy Markdown
Member

Note

Stacked on #578 -> #577 -> #576. This PR's base is
user/gudge/wsb-phase2-state-aware, so the diff shows only the Phase 3
(SDK) commit. Merge order: #576 -> #577 -> #578 -> this PR. GitHub
auto-retargets the base to main as each parent merges.


Summary

Phase 3 (final) of the Windows Sandbox rewrite stack: extend the
@microsoft/mxc-sdk state-aware surface to the Windows Sandbox backend. The Rust
side (Phase 2) already accepts wsb: state-aware requests; this teaches the
TypeScript SDK the matching per-phase config types and wsb: id branding.

Details

  • state-aware-types.ts: add the Windows Sandbox per-phase typed *Config
    interfaces and wire wsb into the branded SandboxId<C> / prefix routing,
    alongside the existing iso (IsolationSession) backend.
  • state-aware-helper.ts / index.ts: export the new types so callers can drive
    provisionSandbox / startSandbox / execInSandbox / stopSandbox /
    deprovisionSandbox against a wsb: sandbox.
  • Docs: sdk/README.md documents the Windows Sandbox state-aware backend;
    sdk/CHANGELOG.md records the addition.
  • Tests: extend state-aware-types.test.ts and state-aware.test.ts for the
    wsb prefix / config shapes (all three changed test files already existed for
    IsolationSession, so the Node-20 explicit test:unit file list in package.json
    is unchanged).

Tests

  • npm run build (tsc): clean.
  • npm test: 196 tests, 192 passed, 0 failed (4 platform-specific skips on this
    Windows host).
  • node scripts/check-version-sync.js: OK (0.7.0).
Microsoft Reviewers: Open in CodeFlow

This PR extends the `@microsoft/mxc-sdk` state-aware surface to the Windows
Sandbox backend, completing the Windows Sandbox rewrite stack (Phase 3,
stacked on the Phase 2 lifecycle/daemon PR). The Rust side already accepts
`wsb:` state-aware requests; this teaches the TypeScript SDK the matching
per-phase config types and `wsb:` id branding.

Details

* `state-aware-types.ts`: add the Windows Sandbox per-(phase) typed
  `*Config` interfaces and wire `wsb` into the branded `SandboxId<C>` /
  prefix routing, alongside the existing `iso` (IsolationSession) backend.
* `state-aware-helper.ts` / `index.ts`: export the new types so callers can
  drive `provisionSandbox` / `startSandbox` / `execInSandbox` / `stopSandbox`
  / `deprovisionSandbox` against a `wsb:` sandbox.
* Docs: `sdk/README.md` documents the Windows Sandbox state-aware backend;
  `sdk/CHANGELOG.md` records the addition.
* Tests: extend `state-aware-types.test.ts` and `state-aware.test.ts` for
  the `wsb` prefix / config shapes (no new test files, so the Node-20
  explicit `test:unit` file list in package.json is unchanged).

Tests

* `npm run build` (tsc): clean.
* `npm test`: 196 tests, 192 passed, 0 failed (4 platform-specific skips on
  this Windows host).
* `node scripts/check-version-sync.js`: OK (0.7.0 -- SDK and Cargo
  workspace versions agree; unchanged by this PR).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Generated-with: claude-opus-4.8
@MGudgin MGudgin requested a review from a team as a code owner June 26, 2026 19:27
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.

1 participant