pub enum Object {
Path {
canonical: String,
asked: String,
},
Command {
argv: Vec<String>,
argv_sha256: String,
cwd: String,
executable: String,
network: bool,
},
Tool {
name: String,
digest: String,
},
Agent {
agent: String,
call: String,
argvs: Vec<Vec<String>>,
paths: Vec<String>,
input: String,
},
}Expand description
What a person’s decision covers: exactly one resolved object — never the request’s spelling and never a pattern (constitution V). A path is the canonical file a write reaches; a command is its exact argv with the directory it runs in and the executable it resolves to; an MCP tool is its name with the digest of its definition.
Variants§
Path
write_file / edit_file of this file.
Fields
Command
run_command with exactly this argv.
Fields
Tool
This MCP tool, as its server defines it now.
Fields
Agent
An external agent’s own action, in its own process: exactly these commands and paths — never covered by a grant of speccoder’s own calls, nor covering one.
Fields
Implementations§
Source§impl Object
impl Object
Sourcepub fn command(
argv: Vec<String>,
cwd: String,
executable: String,
network: bool,
) -> Self
pub fn command( argv: Vec<String>, cwd: String, executable: String, network: bool, ) -> Self
A command object; the argv’s hash is computed.
Sourcepub fn grant_id(&self) -> String
pub fn grant_id(&self) -> String
Its grant id: g-<16 hex> over what the object is — the
canonical path, every field of a command, a tool’s name and digest —
so one id names one object and nothing else.
Sourcepub fn short(&self) -> String
pub fn short(&self) -> String
The short form events and lists carry: the path, argv#<12 hex>,
<tool>@<12 hex> — never more of the argv than the target shows.
Sourcepub fn same_name(&self, other: &Self) -> bool
pub fn same_name(&self, other: &Self) -> bool
Whether other names the same thing as this one by the request’s
spelling (the path as asked, the argv, the tool’s name) — the case
in which a different object is worth telling the person about.
Sourcepub fn changed_from(&self, earlier: &Self) -> Option<String>
pub fn changed_from(&self, earlier: &Self) -> Option<String>
What differs from earlier, an object of the same name a person
approved: executable /usr/bin/make → /w/bin/make.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Object
impl<'de> Deserialize<'de> for Object
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 Object
Auto Trait Implementations§
impl Forget for Object
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
impl UnwindSafe for Object
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more