You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposes a shared, strongly typed one-shot SDK contract for Rust, C#, and Node. The design introduces versioned request and run/spawn option types, carries them through a typed mxc_ffi boundary, and moves Node in-process through a thin Koffi adapter.
The existing versioned JSON path remains supported for executor binaries. This PR is a design proposal only; implementation will follow in reviewable stages.
RunOptions advertises dryRun, but run_config returns a process Output even though no process or WaitOutcome exists in a dry run; the current streaming SDK run path also rejects requests marked dry-run. Specify whether this uses the engine's validation-only path and what Output/MxcRunResult contains, or use a dedicated validation result/remove this option, so each language does not invent different semantics. docs/design/json-first-one-shot-sandbox-apis.md:132
A thin wrapper cannot inspect process.timeout, but the current C# streaming wrapper reads SandboxPolicy.TimeoutMs and enforces an absolute deadline because mxc_sandbox_try_wait does not enforce it and a later blocking wait starts a fresh timeout budget. Require the returned native handle to retain and enforce the parsed deadline from spawn time, or expose that deadline to wrappers; otherwise SpawnConfig can silently run longer than the same config through current APIs/CLI.
Removing the runtime version leaves normalization underspecified. The current Rust builder requires SandboxPolicy.version, copies it into ExecutionRequest.schema_version (src/core/mxc_engine/src/policy.rs:767-785,820-824), and backends branch on that value for different enforcement contracts (for example src/backends/bubblewrap/common/src/bwrap_command.rs:133-150). Without a fixed mapping, the same SandboxRequestV1 could receive 0.7 or 0.9 behavior depending on implementation/release, and the “equivalent executor JSON” criterion is ambiguous. Bind V1 to explicit, stable normalization semantics (and a schema version for JSON conversion), with semantic changes requiring V2.
off the JavaScript event-loop thread. TypeScript marshals its V1 request into
the matching C request and option representations and adapts results and
handles to promises and Node streams.
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
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.
📖 Description
Proposes a shared, strongly typed one-shot SDK contract for Rust, C#, and Node. The design introduces versioned request and run/spawn option types, carries them through a typed
mxc_ffiboundary, and moves Node in-process through a thin Koffi adapter.The existing versioned JSON path remains supported for executor binaries. This PR is a design proposal only; implementation will follow in reviewable stages.
Read the rendered proposal
🔗 References
None.
🔍 Validation
Documentation-only proposal; no runtime behavior changed.
✅ Checklist
Cargo.lock, thedependency-feed-checkcheck passes (see docs/pull-requests.md)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow