Skip to main content

StatusTool

Struct StatusTool 

Source
pub struct StatusTool { /* private fields */ }

Implementations§

Source§

impl StatusTool

Source

pub const NAME: &'static str = "status"

The name this tool answers to, read by its registration and by mode::core_tools.

Source

pub fn new(snapshot: StatusSnapshot) -> Result<StatusTool, AxError>

A run that hands nothing down.

§Errors

Propagates a malformed parameter schema.

Source

pub fn watching( snapshot: StatusSnapshot, children: Box<dyn Fn() -> Vec<ChildStatus> + Send + Sync>, ) -> Result<StatusTool, AxError>

A run whose delegate desk is asked every time the model calls status.

A closure rather than a field, because delegation happens after this tool is built: a snapshot taken before the run started is empty for the whole run. A closure rather than a seam, because the desk lives in collab and this crate may not depend on it - the assembly layer owns both ends and hands one to the other.

§Errors

Propagates a malformed parameter schema.

Source

pub fn metering(self, context: ContextReading) -> StatusTool

The reading the run records the provider’s count into, which the ctx line reports (crates/runtime/spec/Tools.lean §8-14, status).

Source

pub fn clocked(self, clock: ClockReading) -> StatusTool

The reading the run’s clock hook keeps, which the now line reports (crates/runtime/spec/Clock.lean §8-53). It reports the time whatever the run’s stamp granularity: now is a field of this tool’s answer, not an envelope attachment, and a city that turned stamps off has not asked its model to stop knowing the time.

Source

pub fn reporting(self, backlog: Backlog) -> StatusTool

The table whose members at this run’s address the thirteenth line reports (crates/runtime/spec/Backlog.lean §8-28-2).

Trait Implementations§

Source§

impl Tool for StatusTool

Source§

fn meta(&self) -> &ToolMeta

Source§

fn invoke(&self, call: &ToolCall) -> Result<ToolOutcome, AxError>

Fail-closed identity: a call whose name differs from meta().name must return E_INVALID_ARGS, never route silently.
Source§

fn subject(&self, _call: &ToolCall) -> Result<GateSubject, AxError>

What this call is about, read by the grammar this tool already parses its arguments with. Read more
Source§

fn writes(&self, _call: &ToolCall) -> Writes

What this call may have written to the city’s tree once it ran; the default reads the declared effect and nothing more.

Auto Trait Implementations§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.