Add SDK state-aware support for the Windows Sandbox backend (Phase 3)#579
Open
MGudgin wants to merge 1 commit into
Open
Add SDK state-aware support for the Windows Sandbox backend (Phase 3)#579MGudgin wants to merge 1 commit into
MGudgin wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mainas each parent merges..github/copilot-instructions.md.Summary
Phase 3 (final) of the Windows Sandbox rewrite stack: extend the
@microsoft/mxc-sdkstate-aware surface to the Windows Sandbox backend. The Rustside (Phase 2) already accepts
wsb:state-aware requests; this teaches theTypeScript SDK the matching per-phase config types and
wsb:id branding.Details
state-aware-types.ts: add the Windows Sandbox per-phase typed*Configinterfaces and wire
wsbinto the brandedSandboxId<C>/ prefix routing,alongside the existing
iso(IsolationSession) backend.state-aware-helper.ts/index.ts: export the new types so callers can driveprovisionSandbox/startSandbox/execInSandbox/stopSandbox/deprovisionSandboxagainst awsb:sandbox.sdk/README.mddocuments the Windows Sandbox state-aware backend;sdk/CHANGELOG.mdrecords the addition.state-aware-types.test.tsandstate-aware.test.tsfor thewsbprefix / config shapes (all three changed test files already existed forIsolationSession, so the Node-20 explicit
test:unitfile list in package.jsonis unchanged).
Tests
npm run build(tsc): clean.npm test: 196 tests, 192 passed, 0 failed (4 platform-specific skips on thisWindows host).
node scripts/check-version-sync.js: OK (0.7.0).Microsoft Reviewers: Open in CodeFlow