#[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§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>,
impl Eq for CommandPermissionSubject
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 moreSource§impl PartialEq for CommandPermissionSubject
impl PartialEq for CommandPermissionSubject
Source§impl Serialize for CommandPermissionSubject
impl Serialize for CommandPermissionSubject
impl StructuralPartialEq for CommandPermissionSubject
Auto Trait Implementations§
impl Freeze for CommandPermissionSubject
impl RefUnwindSafe for CommandPermissionSubject
impl Send for CommandPermissionSubject
impl Sync for CommandPermissionSubject
impl Unpin for CommandPermissionSubject
impl UnsafeUnpin for CommandPermissionSubject
impl UnwindSafe for CommandPermissionSubject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.