refactor: rename macos chromium permission

This commit is contained in:
viyatb-oai
2026-03-05 14:31:30 -08:00
parent d860b6441d
commit ea4344dd2f
12 changed files with 19 additions and 21 deletions

View File

@@ -52,7 +52,7 @@
"null"
]
},
"chromiumMachPortRendezvous": {
"chromium": {
"type": [
"boolean",
"null"

View File

@@ -3689,7 +3689,7 @@
"null"
]
},
"chromium_mach_port_rendezvous": {
"chromium": {
"type": [
"boolean",
"null"

View File

@@ -52,7 +52,7 @@
"null"
]
},
"chromiumMachPortRendezvous": {
"chromium": {
"type": [
"boolean",
"null"

View File

@@ -48,7 +48,7 @@
"null"
]
},
"chromiumMachPortRendezvous": {
"chromium": {
"type": [
"boolean",
"null"
@@ -5144,7 +5144,7 @@
"null"
]
},
"chromium_mach_port_rendezvous": {
"chromium": {
"type": [
"boolean",
"null"

View File

@@ -7252,7 +7252,7 @@
"null"
]
},
"chromium_mach_port_rendezvous": {
"chromium": {
"type": [
"boolean",
"null"

View File

@@ -4,4 +4,4 @@
import type { MacOsAutomationValue } from "./MacOsAutomationValue";
import type { MacOsPreferencesValue } from "./MacOsPreferencesValue";
export type MacOsPermissions = { preferences: MacOsPreferencesValue | null, automations: MacOsAutomationValue | null, accessibility: boolean | null, calendar: boolean | null, chromium_mach_port_rendezvous: boolean | null, };
export type MacOsPermissions = { preferences: MacOsPreferencesValue | null, automations: MacOsAutomationValue | null, accessibility: boolean | null, calendar: boolean | null, chromium: boolean | null, };

View File

@@ -4,4 +4,4 @@
import type { MacOsAutomationValue } from "../MacOsAutomationValue";
import type { MacOsPreferencesValue } from "../MacOsPreferencesValue";
export type AdditionalMacOsPermissions = { preferences: MacOsPreferencesValue | null, automations: MacOsAutomationValue | null, accessibility: boolean | null, calendar: boolean | null, chromiumMachPortRendezvous: boolean | null, };
export type AdditionalMacOsPermissions = { preferences: MacOsPreferencesValue | null, automations: MacOsAutomationValue | null, accessibility: boolean | null, calendar: boolean | null, chromium: boolean | null, };

View File

@@ -840,7 +840,7 @@ pub struct AdditionalMacOsPermissions {
pub automations: Option<CoreMacOsAutomationValue>,
pub accessibility: Option<bool>,
pub calendar: Option<bool>,
pub chromium_mach_port_rendezvous: Option<bool>,
pub chromium: Option<bool>,
}
impl From<CoreMacOsPermissions> for AdditionalMacOsPermissions {
@@ -850,7 +850,7 @@ impl From<CoreMacOsPermissions> for AdditionalMacOsPermissions {
automations: value.automations,
accessibility: value.accessibility,
calendar: value.calendar,
chromium_mach_port_rendezvous: value.chromium_mach_port_rendezvous,
chromium: value.chromium,
}
}
}

View File

@@ -742,7 +742,7 @@ Certain actions (shell commands or modifying files) may require explicit user ap
Order of messages:
1. `item/started` — shows the pending `commandExecution` item with `command`, `cwd`, and other fields so you can render the proposed action.
2. `item/commandExecution/requestApproval` (request) — carries the same `itemId`, `threadId`, `turnId`, optionally `approvalId` (for subcommand callbacks), and `reason`. For normal command approvals, it also includes `command`, `cwd`, and `commandActions` for friendly display. When `initialize.params.capabilities.experimentalApi = true`, it may also include experimental `additionalPermissions` describing requested per-command sandbox access; any filesystem paths in that payload are absolute on the wire, network access is represented as `additionalPermissions.network.enabled`, and macOS-specific flags such as `additionalPermissions.macos.chromiumMachPortRendezvous` are exposed in camelCase. For network-only approvals, those command fields may be omitted and `networkApprovalContext` is provided instead. Optional persistence hints may also be included via `proposedExecpolicyAmendment` and `proposedNetworkPolicyAmendments`. Clients can prefer `availableDecisions` when present to render the exact set of choices the server wants to expose, while still falling back to the older heuristics if it is omitted.
2. `item/commandExecution/requestApproval` (request) — carries the same `itemId`, `threadId`, `turnId`, optionally `approvalId` (for subcommand callbacks), and `reason`. For normal command approvals, it also includes `command`, `cwd`, and `commandActions` for friendly display. When `initialize.params.capabilities.experimentalApi = true`, it may also include experimental `additionalPermissions` describing requested per-command sandbox access; any filesystem paths in that payload are absolute on the wire, network access is represented as `additionalPermissions.network.enabled`, and macOS-specific flags such as `additionalPermissions.macos.chromium` are exposed in camelCase. For network-only approvals, those command fields may be omitted and `networkApprovalContext` is provided instead. Optional persistence hints may also be included via `proposedExecpolicyAmendment` and `proposedNetworkPolicyAmendments`. Clients can prefer `availableDecisions` when present to render the exact set of choices the server wants to expose, while still falling back to the older heuristics if it is omitted.
3. Client response — for example `{ "decision": "accept" }`, `{ "decision": "acceptForSession" }`, `{ "decision": { "acceptWithExecpolicyAmendment": { "execpolicy_amendment": [...] } } }`, `{ "decision": { "applyNetworkPolicyAmendment": { "network_policy_amendment": { "host": "example.com", "action": "allow" } } } }`, `{ "decision": "decline" }`, or `{ "decision": "cancel" }`.
4. `serverRequest/resolved``{ threadId, requestId }` confirms the pending request has been resolved or cleared, including lifecycle cleanup on turn start/complete/interrupt.
5. `item/completed` — final `commandExecution` item with `status: "completed" | "failed" | "declined"` and execution output. Render this as the authoritative result.

View File

@@ -1471,7 +1471,7 @@ permissions:
- "com.apple.Notes"
accessibility: true
calendar: true
chromium_mach_port_rendezvous: true
chromium: true
"#,
);
@@ -1496,7 +1496,7 @@ permissions:
)),
accessibility: Some(true),
calendar: Some(true),
chromium_mach_port_rendezvous: Some(true),
chromium: Some(true),
}),
..Default::default()
})
@@ -1520,7 +1520,7 @@ permissions:
- "com.apple.Notes"
accessibility: true
calendar: true
chromium_mach_port_rendezvous: true
chromium: true
"#,
);
@@ -1545,7 +1545,7 @@ permissions:
)),
accessibility: Some(true),
calendar: Some(true),
chromium_mach_port_rendezvous: Some(true),
chromium: Some(true),
}),
..Default::default()
})

View File

@@ -149,9 +149,7 @@ fn build_macos_seatbelt_profile_extensions(
.accessibility
.unwrap_or(defaults.macos_accessibility),
macos_calendar: permissions.calendar.unwrap_or(defaults.macos_calendar),
macos_chromium: permissions
.chromium_mach_port_rendezvous
.unwrap_or(defaults.macos_chromium),
macos_chromium: permissions.chromium.unwrap_or(defaults.macos_chromium),
};
Some(extensions)
}
@@ -417,7 +415,7 @@ mod tests {
])),
accessibility: Some(true),
calendar: Some(true),
chromium_mach_port_rendezvous: Some(true),
chromium: Some(true),
}),
..Default::default()
}))

View File

@@ -73,7 +73,7 @@ pub struct MacOsPermissions {
pub automations: Option<MacOsAutomationValue>,
pub accessibility: Option<bool>,
pub calendar: Option<bool>,
pub chromium_mach_port_rendezvous: Option<bool>,
pub chromium: Option<bool>,
}
impl MacOsPermissions {
@@ -82,7 +82,7 @@ impl MacOsPermissions {
&& self.automations.is_none()
&& self.accessibility.is_none()
&& self.calendar.is_none()
&& self.chromium_mach_port_rendezvous.is_none()
&& self.chromium.is_none()
}
}