Separate Windows sandbox implementations from legacy setup modes (#45737)

## Why

`allowedWindowsSandboxImplementations` uses the legacy setup-mode type, which cannot represent `mxc`.

## What changed

- Introduce `WindowsSandboxImplementation` with `elevated`, `unelevated`, and `mxc` variants for configuration requirements, and update the generated schemas and TypeScript and Python types.
- Keep `WindowsSandboxSetupMode` limited to `elevated` and `unelevated`, and update the requirements mapping and its test assertions to use the new type.
- Document that clients selecting `mxc` skip the legacy setup and readiness APIs and use the standard `command/exec` streaming and process-control path.

GitOrigin-RevId: c926e853f0bbdb29d4b437866c284c1394a7ea13
This commit is contained in:
iceweasel-oai authored and copyberry committed 2026-09-15 17:17:07 +00:00
1 parent eeded5ba1a
commit fbad00774b
13 files changed
+68 -16

No files matched your search

@@ -4,7 +4,7 @@ use super::AskForApproval;
use super::BrowserUseConfig;
use super::ComputerUseConfig;
use super::SandboxMode;
use super::WindowsSandboxSetupMode;
use super::WindowsSandboxImplementation;
use super::shared::default_enabled;
use crate::JsonSchema;
use crate::TS;
@@ -423,7 +423,7 @@ pub struct ConfigRequirements {
#[experimental("configRequirements/read.allowedApprovalsReviewers")]
pub allowed_approvals_reviewers: Option<Vec<ApprovalsReviewer>>,
pub allowed_sandbox_modes: Option<Vec<SandboxMode>>,
pub allowed_windows_sandbox_implementations: Option<Vec<WindowsSandboxSetupMode>>,
pub allowed_windows_sandbox_implementations: Option<Vec<WindowsSandboxImplementation>>,
pub allowed_permission_profiles: Option<BTreeMap<String, bool>>,
pub default_permissions: Option<String>,
pub allowed_web_search_modes: Option<Vec<WebSearchMode>>,
@@ -21,6 +21,15 @@ pub enum WindowsSandboxSetupMode {
Unelevated,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(rename_all = "camelCase", export_to = "v2/")]
pub enum WindowsSandboxImplementation {
Elevated,
Unelevated,
Mxc,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]