mirror of
https://github.com/openai/codex.git
synced 2026-10-25 15:56:38 +00:00
## 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
40 lines
1.3 KiB
Rust
40 lines
1.3 KiB
Rust
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 ComputerUseConfigToml {
|
|
pub default_app_access: Option<AllowDenyRequirementToml>,
|
|
pub macos: Option<ComputerUseMacosConfigToml>,
|
|
pub windows: Option<ComputerUseWindowsConfigToml>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, JsonSchema)]
|
|
#[schemars(deny_unknown_fields)]
|
|
pub struct ComputerUseMacosConfigToml {
|
|
pub bundle_ids: Option<BTreeMap<String, AllowDenyRequirementToml>>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, JsonSchema)]
|
|
#[schemars(deny_unknown_fields)]
|
|
pub struct ComputerUseWindowsConfigToml {
|
|
pub aumids: Option<BTreeMap<String, AllowDenyRequirementToml>>,
|
|
pub exes: Option<Vec<ComputerUseWindowsExeConfigToml>>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema)]
|
|
#[schemars(deny_unknown_fields)]
|
|
pub struct ComputerUseWindowsExeConfigToml {
|
|
pub publisher_name: String,
|
|
pub product_name: String,
|
|
pub binary_name: Option<String>,
|
|
pub access: AllowDenyRequirementToml,
|
|
}
|
|
|
|
#[cfg(test)]
|
|
#[path = "computer_use_tests.rs"]
|
|
mod tests;
|