pub enum CommandExecutionApprovalDecision {
Accept,
AcceptForSession,
AcceptWithExecpolicyAmendment {
execpolicy_amendment: Vec<String>,
},
ApplyNetworkPolicyAmendment {
network_policy_amendment: NetworkPolicyAmendment,
},
Decline,
Cancel,
}Expand description
CommandExecutionApprovalDecision
JSON schema
{
"oneOf": [
{
"description": "User approved the command.",
"type": "string",
"enum": [
"accept"
]
},
{
"description": "User approved the command and future prompts in the same session-scoped approval cache should run without prompting.",
"type": "string",
"enum": [
"acceptForSession"
]
},
{
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision",
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"type": "object",
"required": [
"acceptWithExecpolicyAmendment"
],
"properties": {
"acceptWithExecpolicyAmendment": {
"type": "object",
"required": [
"execpolicy_amendment"
],
"properties": {
"execpolicy_amendment": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false
},
{
"title": "ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision",
"description": "User chose a persistent network policy rule (allow/deny) for this host.",
"type": "object",
"required": [
"applyNetworkPolicyAmendment"
],
"properties": {
"applyNetworkPolicyAmendment": {
"type": "object",
"required": [
"network_policy_amendment"
],
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
}
}
},
"additionalProperties": false
},
{
"description": "User denied the command. The agent will continue the turn.",
"type": "string",
"enum": [
"decline"
]
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"type": "string",
"enum": [
"cancel"
]
}
]
}Variants§
Accept
User approved the command.
AcceptForSession
User approved the command and future prompts in the same session-scoped approval cache should run without prompting.
AcceptWithExecpolicyAmendment
User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.
ApplyNetworkPolicyAmendment
User chose a persistent network policy rule (allow/deny) for this host.
Fields
§
network_policy_amendment: NetworkPolicyAmendmentDecline
User denied the command. The agent will continue the turn.
Cancel
User denied the command. The turn will also be immediately interrupted.
Trait Implementations§
Source§impl Clone for CommandExecutionApprovalDecision
impl Clone for CommandExecutionApprovalDecision
Source§fn clone(&self) -> CommandExecutionApprovalDecision
fn clone(&self) -> CommandExecutionApprovalDecision
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for CommandExecutionApprovalDecision
impl<'de> Deserialize<'de> for CommandExecutionApprovalDecision
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CommandExecutionApprovalDecision
impl RefUnwindSafe for CommandExecutionApprovalDecision
impl Send for CommandExecutionApprovalDecision
impl Sync for CommandExecutionApprovalDecision
impl Unpin for CommandExecutionApprovalDecision
impl UnsafeUnpin for CommandExecutionApprovalDecision
impl UnwindSafe for CommandExecutionApprovalDecision
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more