#[non_exhaustive]pub struct CommandPermissionSubject {
pub command: String,
pub cwd: AbsolutePath,
pub tool_call_id: Option<ToolCallId>,
pub terminal_id: Option<TerminalId>,
pub meta: Option<Meta>,
}unstable_protocol_v2 only.Expand description
Permission request details for a command.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.command: StringThe command that would be run if permission is granted.
cwd: AbsolutePathThe absolute working directory for the command.
tool_call_id: Option<ToolCallId>The associated tool call, when known. Omitted and null are equivalent.
terminal_id: Option<TerminalId>The associated terminal, when already known. Omitted and null are equivalent.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys. Omitted and null are equivalent and mean no subject metadata was provided.
See protocol docs: Extensibility
Implementations§
Source§impl CommandPermissionSubject
impl CommandPermissionSubject
Sourcepub fn new(command: impl Into<String>, cwd: impl Into<AbsolutePath>) -> Self
pub fn new(command: impl Into<String>, cwd: impl Into<AbsolutePath>) -> Self
Builds command permission details with the required command and working directory.
Sourcepub fn tool_call_id(self, tool_call_id: impl IntoOption<ToolCallId>) -> Self
pub fn tool_call_id(self, tool_call_id: impl IntoOption<ToolCallId>) -> Self
Sets or clears the associated tool-call ID.
Sourcepub fn terminal_id(self, terminal_id: impl IntoOption<TerminalId>) -> Self
pub fn terminal_id(self, terminal_id: impl IntoOption<TerminalId>) -> Self
Sets or clears the associated terminal ID.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
Sets or clears subject-scoped metadata.
Trait Implementations§
Source§impl Clone for CommandPermissionSubject
impl Clone for CommandPermissionSubject
Source§fn clone(&self) -> CommandPermissionSubject
fn clone(&self) -> CommandPermissionSubject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandPermissionSubject
impl Debug for CommandPermissionSubject
Source§impl<'de> Deserialize<'de> for CommandPermissionSubject
impl<'de> Deserialize<'de> for CommandPermissionSubject
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>,
Source§impl From<CommandPermissionSubject> for RequestPermissionSubject
impl From<CommandPermissionSubject> for RequestPermissionSubject
Source§fn from(subject: CommandPermissionSubject) -> Self
fn from(subject: CommandPermissionSubject) -> Self
Source§impl JsonSchema for CommandPermissionSubject
impl JsonSchema for CommandPermissionSubject
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more