mirror of
https://github.com/openai/codex.git
synced 2026-11-18 23:02:23 +00:00
Expose browser and computer-use requirements through app-server (#40000)
## What changed - Expand `configRequirements/read` with the Browser/Computer Use umbrella policy and the complete browser-use policy, including origin-specific access, download, upload, auto-review, and approval controls. - Return computer-use persistent approval, default app access, macOS bundle ID rules, and Windows AUMID and executable rules. - Export the corresponding v2 protocol types and generated JSON and TypeScript schemas. ## Testing - Extend the config requirements RPC test to cover the new browser and platform-specific computer-use fields. GitOrigin-RevId: d1be93388701b06312a26853d640401b63b4d535
This commit is contained in:
1 parent
9cdc66904f
commit
0f1a30b5c2
21 files changed
+1099
-16
No files matched your search
@@ -396,6 +396,7 @@ pub struct ConfigRequirements {
|
||||
pub default_permissions: Option<String>,
|
||||
pub allowed_web_search_modes: Option<Vec<WebSearchMode>>,
|
||||
pub allow_managed_hooks_only: Option<bool>,
|
||||
pub allow_browser_and_computer_use: Option<bool>,
|
||||
pub allow_appshots: Option<bool>,
|
||||
pub allow_remote_control: Option<bool>,
|
||||
pub computer_use: Option<ComputerUseRequirements>,
|
||||
@@ -467,13 +468,75 @@ pub struct FeedbackRequirements {
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ComputerUseRequirements {
|
||||
pub allow_locked_computer_use: Option<bool>,
|
||||
pub allow_persistent_approval: Option<bool>,
|
||||
pub default_app_access: Option<AllowDenyRequirement>,
|
||||
pub macos: Option<ComputerUseMacosRequirements>,
|
||||
pub windows: Option<ComputerUseWindowsRequirements>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct BrowserUseRequirements {
|
||||
pub allow_history_access: Option<bool>,
|
||||
pub disable_auto_review: Option<bool>,
|
||||
pub allow_global_persistent_approval: Option<bool>,
|
||||
pub default_origin_policy: Option<BrowserUseOriginPolicy>,
|
||||
pub origins: Option<BTreeMap<String, BrowserUseOriginPolicy>>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct BrowserUseOriginPolicy {
|
||||
pub access: Option<AllowDenyRequirement>,
|
||||
pub downloads: Option<AllowDenyRequirement>,
|
||||
pub uploads: Option<AllowDenyRequirement>,
|
||||
pub full_cdp_access: Option<AllowDenyRequirement>,
|
||||
pub auto_review: Option<AllowDenyRequirement>,
|
||||
pub persistent_approval: Option<bool>,
|
||||
pub access_approval_lifetime: Option<BrowserUseAccessApprovalLifetime>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
#[ts(rename_all = "lowercase", export_to = "v2/")]
|
||||
pub enum AllowDenyRequirement {
|
||||
Allow,
|
||||
Deny,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
#[ts(rename_all = "lowercase", export_to = "v2/")]
|
||||
pub enum BrowserUseAccessApprovalLifetime {
|
||||
Turn,
|
||||
Thread,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ComputerUseMacosRequirements {
|
||||
pub bundle_ids: Option<BTreeMap<String, AllowDenyRequirement>>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ComputerUseWindowsRequirements {
|
||||
pub aumids: Option<BTreeMap<String, AllowDenyRequirement>>,
|
||||
pub exes: Option<Vec<ComputerUseWindowsExeRequirement>>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ComputerUseWindowsExeRequirement {
|
||||
pub publisher_name: String,
|
||||
pub product_name: String,
|
||||
pub binary_name: Option<String>,
|
||||
pub access: AllowDenyRequirement,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
|
||||
@@ -2057,6 +2057,7 @@ fn config_requirements_granular_allowed_approval_policy_is_marked_experimental()
|
||||
default_permissions: None,
|
||||
allowed_web_search_modes: None,
|
||||
allow_managed_hooks_only: None,
|
||||
allow_browser_and_computer_use: None,
|
||||
allow_appshots: None,
|
||||
allow_remote_control: None,
|
||||
computer_use: None,
|
||||
|
||||
Reference in new issue
Block a user