Add AcceptWithOverrideCommand for approval decision

This commit is contained in:
Qiyao Qin
2026-03-13 00:19:41 -07:00
parent 76d8d174b1
commit 671cc4644b
22 changed files with 272 additions and 9 deletions
@@ -33,6 +33,31 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to execute a different argv vector instead of the original one-time request.",
"properties": {
"approved_override_command": {
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}
},
"required": [
"approved_override_command"
],
"title": "ApprovedOverrideCommandReviewDecision",
"type": "object"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
@@ -228,6 +228,31 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User approved the command, but wants to execute a different argv vector.",
"properties": {
"acceptWithOverrideCommand": {
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}
},
"required": [
"acceptWithOverrideCommand"
],
"title": "AcceptWithOverrideCommandCommandExecutionApprovalDecision",
"type": "object"
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"enum": [
@@ -10,6 +10,31 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User approved the command, but wants to execute a different argv vector.",
"properties": {
"acceptWithOverrideCommand": {
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}
},
"required": [
"acceptWithOverrideCommand"
],
"title": "AcceptWithOverrideCommandCommandExecutionApprovalDecision",
"type": "object"
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"enum": [
@@ -33,6 +33,31 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to execute a different argv vector instead of the original one-time request.",
"properties": {
"approved_override_command": {
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}
},
"required": [
"approved_override_command"
],
"title": "ApprovedOverrideCommandReviewDecision",
"type": "object"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
@@ -294,6 +294,31 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User approved the command, but wants to execute a different argv vector.",
"properties": {
"acceptWithOverrideCommand": {
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}
},
"required": [
"acceptWithOverrideCommand"
],
"title": "AcceptWithOverrideCommandCommandExecutionApprovalDecision",
"type": "object"
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"enum": [
@@ -1471,6 +1471,31 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User approved the command, but wants to execute a different argv vector.",
"properties": {
"acceptWithOverrideCommand": {
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}
},
"required": [
"acceptWithOverrideCommand"
],
"title": "AcceptWithOverrideCommandCommandExecutionApprovalDecision",
"type": "object"
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"enum": [
@@ -3214,6 +3239,31 @@
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to execute a different argv vector instead of the original one-time request.",
"properties": {
"approved_override_command": {
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"command"
],
"type": "object"
}
},
"required": [
"approved_override_command"
],
"title": "ApprovedOverrideCommandReviewDecision",
"type": "object"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
@@ -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_override_command": { command: Array<string>, } } | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "denied" | "abort";
@@ -4,4 +4,4 @@
import type { ExecPolicyAmendment } from "./ExecPolicyAmendment";
import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment";
export type CommandExecutionApprovalDecision = "accept" | "acceptForSession" | { "acceptWithExecpolicyAmendment": { execpolicy_amendment: ExecPolicyAmendment, } } | { "applyNetworkPolicyAmendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "decline" | "cancel";
export type CommandExecutionApprovalDecision = "accept" | { "acceptWithOverrideCommand": { command: Array<string>, } } | "acceptForSession" | { "acceptWithExecpolicyAmendment": { execpolicy_amendment: ExecPolicyAmendment, } } | { "applyNetworkPolicyAmendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "decline" | "cancel";