pub struct ToolMutationEffects(/* private fields */);Expand description
Typed mutation effects for one tool call.
ToolCallEffect deliberately remains the compact observation/mutation
summary used by older persisted events. This set carries the detail needed
by policy and completion accounting so an incidental build-cache write does
not satisfy a requested source edit, and a local write does not satisfy a
requested remote deployment.
Implementations§
Source§impl ToolMutationEffects
impl ToolMutationEffects
pub const PROTOCOL_NAMES: [&'static str; 13]
pub const NONE: ToolMutationEffects
Sourcepub const LOCAL_SOURCE_WRITE: ToolMutationEffects
pub const LOCAL_SOURCE_WRITE: ToolMutationEffects
A write to user-authored files through a path-aware editing tool.
Sourcepub const LOCAL_WORKSPACE_WRITE: ToolMutationEffects
pub const LOCAL_WORKSPACE_WRITE: ToolMutationEffects
A local write whose target is not typed precisely (shell redirect, copy, generated file, and similar workspace activity).
Sourcepub const LOCAL_DERIVED_WRITE: ToolMutationEffects
pub const LOCAL_DERIVED_WRITE: ToolMutationEffects
Compiler caches, dependency directories, and other reproducible output.
Sourcepub const REPOSITORY_WRITE: ToolMutationEffects
pub const REPOSITORY_WRITE: ToolMutationEffects
Git refs, index state, commits, and related repository metadata.
Sourcepub const REMOTE_MUTATION: ToolMutationEffects
pub const REMOTE_MUTATION: ToolMutationEffects
A remote state change that is not specifically a deployment.
Sourcepub const REMOTE_DEPLOY: ToolMutationEffects
pub const REMOTE_DEPLOY: ToolMutationEffects
Publishing a new application/site deployment or version.
Sourcepub const EXTERNAL_DELIVERY: ToolMutationEffects
pub const EXTERNAL_DELIVERY: ToolMutationEffects
Sending, posting, uploading, or otherwise delivering content.
Sourcepub const PROCESS_STATE: ToolMutationEffects
pub const PROCESS_STATE: ToolMutationEffects
Starting, stopping, restarting, or killing a process/service.
Sourcepub const CONFIGURATION: ToolMutationEffects
pub const CONFIGURATION: ToolMutationEffects
Mutating configuration, permissions, packages, or runtime setup.
Sourcepub const DESTRUCTIVE: ToolMutationEffects
pub const DESTRUCTIVE: ToolMutationEffects
Deletion or another intentionally destructive local/remote operation.
Sourcepub const UNSPECIFIED: ToolMutationEffects
pub const UNSPECIFIED: ToolMutationEffects
A command can mutate, but static inspection cannot state how. This is intentionally not allowed to satisfy a more specific required outcome.
Sourcepub const SCHEDULED_WORK: ToolMutationEffects
pub const SCHEDULED_WORK: ToolMutationEffects
Creating or changing the daemon’s own goals, schedules and reminders. Nothing leaves the machine; the work it sets up is judged when it runs.
Sourcepub const MEMORY_WRITE: ToolMutationEffects
pub const MEMORY_WRITE: ToolMutationEffects
Saving to the daemon’s own long-term memory. Nothing leaves the machine and no workspace file changes.
Sourcepub const fn bits(self) -> u32
pub const fn bits(self) -> u32
Stable bit representation retained for durable telemetry and audits. Human-readable names are emitted alongside it; consumers must never interpret a raw bitset as a count.
Sourcepub const fn from_bits(bits: u32) -> ToolMutationEffects
pub const fn from_bits(bits: u32) -> ToolMutationEffects
Rehydrate a durable effect set without interpreting the bits as a
count. Unknown future bits remain visible to telemetry_value and do
not silently become a known effect.
Sourcepub fn protocol_names(self) -> Vec<&'static str>
pub fn protocol_names(self) -> Vec<&'static str>
Return the protocol names represented by this effect set. These names describe typed adapter effects, not natural-language task wording.
Sourcepub fn telemetry_value(self) -> Value
pub fn telemetry_value(self) -> Value
Machine-readable telemetry projection that keeps unknown future bits visible instead of silently dropping them.
pub const fn union(self, other: ToolMutationEffects) -> ToolMutationEffects
Sourcepub const fn intersect(self, other: ToolMutationEffects) -> ToolMutationEffects
pub const fn intersect(self, other: ToolMutationEffects) -> ToolMutationEffects
Keep only effects present in both sets. This is used when an adapter projects a task’s typed obligation onto the subset it can actually report; it never interprets the bitset as a count.
Sourcepub fn from_protocol_name(name: &str) -> Option<ToolMutationEffects>
pub fn from_protocol_name(name: &str) -> Option<ToolMutationEffects>
Parse a protocol enum value. These names are structured tool metadata, not natural-language routing keywords.
pub const fn is_empty(&self) -> bool
pub const fn contains(self, other: ToolMutationEffects) -> bool
pub const fn intersects(self, other: ToolMutationEffects) -> bool
pub const fn has_specific_effects(self) -> bool
Sourcepub const fn satisfies(self, required: ToolMutationEffects) -> bool
pub const fn satisfies(self, required: ToolMutationEffects) -> bool
Whether observed effects fulfill every typed requirement.
Known effects are checked strictly: cache output, repository metadata,
and directory scaffolding cannot masquerade as authored source. Opaque
execution surfaces report UNSPECIFIED, but unknown evidence is never
allowed to prove a more specific effect. A caller that requires a source
edit, deployment, or delivery must observe that exact typed effect.
Trait Implementations§
Source§impl Clone for ToolMutationEffects
impl Clone for ToolMutationEffects
Source§fn clone(&self) -> ToolMutationEffects
fn clone(&self) -> ToolMutationEffects
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ToolMutationEffects
Source§impl Debug for ToolMutationEffects
impl Debug for ToolMutationEffects
Source§impl Default for ToolMutationEffects
impl Default for ToolMutationEffects
Source§fn default() -> ToolMutationEffects
fn default() -> ToolMutationEffects
Source§impl<'de> Deserialize<'de> for ToolMutationEffects
impl<'de> Deserialize<'de> for ToolMutationEffects
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolMutationEffects, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolMutationEffects, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ToolMutationEffects
Source§impl PartialEq for ToolMutationEffects
impl PartialEq for ToolMutationEffects
Source§impl Serialize for ToolMutationEffects
impl Serialize for ToolMutationEffects
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ToolMutationEffects
Auto Trait Implementations§
impl Forget for ToolMutationEffects
impl Freeze for ToolMutationEffects
impl Move for ToolMutationEffects
impl RefUnwindSafe for ToolMutationEffects
impl Send for ToolMutationEffects
impl Sync for ToolMutationEffects
impl Unpin for ToolMutationEffects
impl UnsafeUnpin for ToolMutationEffects
impl UnwindSafe for ToolMutationEffects
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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