pub struct RunIdentity {
pub run_id: String,
pub parent_run_id: Option<String>,
pub depth: usize,
pub conversation_id: Option<String>,
pub deadline_unix_ms: Option<u64>,
}Expand description
Identity of one agent run.
Threaded through child spawns so the loop, its plugins, and any
trajectory sink can answer “who am I, who is my parent, how deep am
I, what conversation, when do I expire” without consulting a
side-channel. The fields are typed at the same level as
AgentMessage — every run has identity, full stop. Today’s bridge
scatters these across LoopConfig.conversation_id,
RunnerJob.depth, ChildScope.parent_conversation_id, and
parent_deadline; RunIdentity is the merge target.
Identity is serializable so trajectory writers can pin every event to its run without inventing a parallel key store.
Fields§
§run_id: StringStable identifier for this run. UUIDv4 by default; callers may supply their own value (e.g. to keep run ids aligned with an external trace system).
parent_run_id: Option<String>Some(parent.run_id) when this run was spawned by another run;
None for top-level runs initiated by a user-facing entry
point.
depth: usize0 for top-level runs; +1 per nested spawn.
conversation_id: Option<String>Conversation this run belongs to (when the host runtime has
one). None for tests and isolated runs that don’t carry
conversation identity.
deadline_unix_ms: Option<u64>Wall-clock deadline as milliseconds since the UNIX epoch. The
loop does not enforce this directly — plugins that care
(wall-clock steering, soft-cancel) read it. None means no
parent-imposed deadline.
Implementations§
Source§impl RunIdentity
impl RunIdentity
Sourcepub fn child_of(parent: &Self) -> Self
pub fn child_of(parent: &Self) -> Self
Construct a child identity from a parent. Inherits
conversation_id and deadline_unix_ms, bumps depth, sets
parent_run_id, and generates a fresh run_id.
pub fn with_run_id(self, id: impl Into<String>) -> Self
pub fn with_conversation_id(self, id: impl Into<String>) -> Self
pub fn with_deadline_unix_ms(self, ms: u64) -> Self
Trait Implementations§
Source§impl Clone for RunIdentity
impl Clone for RunIdentity
Source§fn clone(&self) -> RunIdentity
fn clone(&self) -> RunIdentity
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 RunIdentity
impl Debug for RunIdentity
Source§impl<'de> Deserialize<'de> for RunIdentity
impl<'de> Deserialize<'de> for RunIdentity
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 PartialEq for RunIdentity
impl PartialEq for RunIdentity
Source§fn eq(&self, other: &RunIdentity) -> bool
fn eq(&self, other: &RunIdentity) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RunIdentity
impl Serialize for RunIdentity
impl Eq for RunIdentity
impl StructuralPartialEq for RunIdentity
Auto Trait Implementations§
impl Freeze for RunIdentity
impl RefUnwindSafe for RunIdentity
impl Send for RunIdentity
impl Sync for RunIdentity
impl Unpin for RunIdentity
impl UnsafeUnpin for RunIdentity
impl UnwindSafe for RunIdentity
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,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.