pub enum ObsKind {
Read,
Grep,
Find,
Write,
Skill,
Tool,
Mcp,
Child,
Message,
Error,
}Expand description
What an observation was, so assembly can reason about it.
The serde rendering (read, grep, find, write, skill, tool, mcp,
child, message, error — snake_case, as Act and Effect already
are) is a wire format: it is what a persisted ledger’s kind column holds,
so each of those ten strings is a stored value that a later release may not
rename. It is deliberately not ObsKind::label, which renders different
words for a different reader — see the note there.
Variants§
Read
A file read into context.
Grep
A content search.
Find
A filename search.
Write
A file written.
Skill
A skill body loaded.
Tool
A tool the embedding program registered.
Mcp
A tool an MCP server offered.
Child
A sub-agent’s composed result.
Message
The model said something instead of calling a tool.
Error
A tool failed, or the policy refused it.
Implementations§
Source§impl ObsKind
impl ObsKind
Sourcepub fn target_is_the_subject(self) -> bool
pub fn target_is_the_subject(self) -> bool
Whether a later observation of the same target replaces this one.
True where the target is the subject of the answer: a path, a search pattern, a glob, a skill’s name. False where the target is only the name of the thing that answered — a registered or MCP tool called twice with different arguments gave two different answers, and stubbing the first as “superseded” would throw one of them away.
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
The word a stub uses for this kind — the same word the observation’s own header uses, so a stub reads as the thing it replaced.
Not the serialized form, and must not be unified with it. These are
English for the model and the operator reading a prompt (Write is
“wrote”, Mcp is “mcp tool”); the serde rendering on the type above is a
stored value. Making either one match the other changes the prompt text
or orphans every persisted ledger, and neither failure announces itself.
Trait Implementations§
impl Copy for ObsKind
Source§impl<'de> Deserialize<'de> for ObsKind
impl<'de> Deserialize<'de> for ObsKind
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 ObsKind
impl StructuralPartialEq for ObsKind
Auto Trait Implementations§
impl Freeze for ObsKind
impl RefUnwindSafe for ObsKind
impl Send for ObsKind
impl Sync for ObsKind
impl Unpin for ObsKind
impl UnsafeUnpin for ObsKind
impl UnwindSafe for ObsKind
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§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.