pub struct Scope {
pub scope_id: ScopeId,
pub trajectory_id: TrajectoryId,
pub parent_scope_id: Option<ScopeId>,
pub name: String,
pub purpose: Option<String>,
pub is_active: bool,
pub created_at: Timestamp,
pub closed_at: Option<Timestamp>,
pub checkpoint: Option<Checkpoint>,
pub token_budget: i32,
pub tokens_used: i32,
pub metadata: Option<Value>,
}Expand description
Scope - partitioned context window within a trajectory. Scopes provide isolation and checkpointing boundaries.
Fields§
§scope_id: ScopeId§trajectory_id: TrajectoryId§parent_scope_id: Option<ScopeId>§name: String§purpose: Option<String>§is_active: bool§created_at: Timestamp§closed_at: Option<Timestamp>§checkpoint: Option<Checkpoint>§token_budget: i32§tokens_used: i32§metadata: Option<Value>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scope
impl<'de> Deserialize<'de> for Scope
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EventSourced for Scope
impl EventSourced for Scope
Source§fn from_events(events: &[Event<Value>]) -> Option<Self>
fn from_events(events: &[Event<Value>]) -> Option<Self>
Reconstruct entity state from a sequence of events. Read more
Source§fn apply_event(&mut self, event: &Event<Value>)
fn apply_event(&mut self, event: &Event<Value>)
Apply a single event to update state (used for incremental updates).
Source§fn relevant_event_kinds() -> &'static [EventKind]
fn relevant_event_kinds() -> &'static [EventKind]
The event kinds this entity cares about.
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
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
Mutably borrows from an owned value. Read more