Skip to main content

AnalyzeCtx

Struct AnalyzeCtx 

Source
pub struct AnalyzeCtx<'a> { /* private fields */ }
Expand description

The context handed to analyze. Read-only by construction.

Implementations§

Source§

impl<'a> AnalyzeCtx<'a>

Source

pub fn new( reader: &'a dyn SubstrateRead, params: &'a Params, namespaces: &'a [String], watermark_ms: Option<i64>, now_ms: i64, outcome_inputs: &'a [OutcomeInput], ) -> Self

Source

pub fn params(&self) -> &Params

Source

pub fn now_ms(&self) -> i64

Source

pub fn watermark_ms(&self) -> Option<i64>

Source

pub fn capabilities(&self) -> Capabilities

Source

pub fn outcome_inputs(&self) -> &[OutcomeInput]

Source

pub fn grains_of_type( &self, grain_type: &str, opts: ReadOpts, ) -> Result<Vec<GrainRecord>>

All grains of a type across the configured namespaces (or all namespaces when none are configured).

Source

pub fn facts(&self) -> Result<Vec<GrainRecord>>

Live facts across configured namespaces.

Source

pub fn observations(&self) -> Result<Vec<GrainRecord>>

Live observations across configured namespaces.

Source

pub fn grains_in( &self, grain_type: &str, namespace: &str, ) -> Result<Vec<GrainRecord>>

Live grains of one type in ONE explicit namespace — for analyzers whose datasource lives in a well-known system namespace (the run journals in agent:harness) regardless of the sweep’s configured scope.

Source

pub fn skills(&self) -> Result<Vec<GrainRecord>>

Live Skill grains across configured namespaces.

Source

pub fn goals(&self) -> Result<Vec<GrainRecord>>

Live Goal grains across configured namespaces.

Source

pub fn tools_since(&self, since_ms: Option<i64>) -> Result<Vec<GrainRecord>>

Tool grains (captured tool calls), optionally windowed by a since watermark, live only. The flagship analyzer’s input.

Source

pub fn heads(&self) -> Result<Vec<HeadGroup>>

Entities with more than one live head (requires the forks capability).

Source

pub fn telemetry(&self) -> Result<Option<TelemetryView>>

A snapshot of the recall-telemetry rollups (requires the telemetry capability). None when the substrate has no sidecar — a telemetry-fed analyzer then degrades to an activation-ladder entry.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for AnalyzeCtx<'a>

§

impl<'a> !Send for AnalyzeCtx<'a>

§

impl<'a> !Sync for AnalyzeCtx<'a>

§

impl<'a> !UnwindSafe for AnalyzeCtx<'a>

§

impl<'a> Freeze for AnalyzeCtx<'a>

§

impl<'a> Unpin for AnalyzeCtx<'a>

§

impl<'a> UnsafeUnpin for AnalyzeCtx<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.