Add browser and computer use configuration (#40018)

## What changed

- Add typed `browser_use` settings for history access and per-origin access,
  download, upload, and full CDP policies.
- Add typed `computer_use` settings for default app access, macOS bundle IDs,
  Windows AUMIDs, and Windows executable identities.
- Expose the merged settings through app-server config reads and generated
  Rust, TypeScript, and JSON schemas.

## Testing

- Cover TOML serialization round trips, layered config reads with origin
  metadata, and app-server batch writes.

GitOrigin-RevId: 78065f6fec990602071fc81ff639ff97f7ad8cd5
This commit is contained in:
rafael-oai authored and copyberry committed 2026-08-21 21:41:55 +00:00
1 parent be6ebb1f6d
commit 95118dff65
27 files changed
+1481 -2

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
use crate::AllowDenyRequirementToml;
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
use std::collections::BTreeMap;
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, JsonSchema)]
#[schemars(deny_unknown_fields)]
pub struct BrowserUseConfigToml {
pub allow_history_access: Option<bool>,
pub default_origin_policy: Option<BrowserUseOriginPolicyConfigToml>,
pub origins: Option<BTreeMap<String, BrowserUseOriginPolicyConfigToml>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, JsonSchema)]
#[schemars(deny_unknown_fields)]
pub struct BrowserUseOriginPolicyConfigToml {
pub access: Option<AllowDenyRequirementToml>,
pub downloads: Option<AllowDenyRequirementToml>,
pub uploads: Option<AllowDenyRequirementToml>,
pub full_cdp_access: Option<AllowDenyRequirementToml>,
}
#[cfg(test)]
#[path = "browser_use_tests.rs"]
mod tests;