Add request_permissions profile persistence core support

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Dylan Hurd
2026-03-23 22:27:25 -07:00
co-authored by Codex
parent 2227248cd6
commit 7e2d60d27d
37 changed files with 557 additions and 49 deletions
@@ -65,6 +65,13 @@
],
"type": "string"
},
{
"description": "User has approved this request and wants the requested filesystem permissions persisted into a named permission profile.",
"enum": [
"approved_persist_to_profile"
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
@@ -65,6 +65,13 @@
],
"type": "string"
},
{
"description": "User has approved this request and wants the requested filesystem permissions persisted into a named permission profile.",
"enum": [
"approved_persist_to_profile"
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
@@ -3368,6 +3368,13 @@
],
"type": "string"
},
{
"description": "User has approved this request and wants the requested filesystem permissions persisted into a named permission profile.",
"enum": [
"approved_persist_to_profile"
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
@@ -7,4 +7,4 @@ import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment";
/**
* User's decision in response to an ExecApprovalRequest.
*/
export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "denied" | "abort";
export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | "approved_persist_to_profile" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "denied" | "abort";
@@ -1023,6 +1023,7 @@ impl From<CoreReviewDecision> for CommandExecutionApprovalDecision {
execpolicy_amendment: proposed_execpolicy_amendment.into(),
},
CoreReviewDecision::ApprovedForSession => Self::AcceptForSession,
CoreReviewDecision::ApprovedPersistToProfile => Self::Accept,
CoreReviewDecision::NetworkPolicyAmendment {
network_policy_amendment,
} => Self::ApplyNetworkPolicyAmendment {