pub struct AppStateProbes { /* private fields */ }Expand description
Registry of application-defined state probes surfaced through the app_state
MCP tool.
Probes give an agent first-class, discoverable access to domain state that
would otherwise require query_db + log-grepping (e.g. a scoring pipeline’s
version, queue depth, or cache stats). Because a probe runs in the Rust
process with direct access to whatever state the app captured into it, it
reads backend state with no IPC round-trip and no frontend involvement —
the kind of introspection a browser-external tool like CDP cannot do.
Implementations§
Source§impl AppStateProbes
impl AppStateProbes
Sourcepub fn register(&self, name: impl Into<String>, probe: Arc<ProbeFn>)
pub fn register(&self, name: impl Into<String>, probe: Arc<ProbeFn>)
Register (or replace) a probe under name.
Sourcepub fn run(&self, name: &str) -> Option<Value>
pub fn run(&self, name: &str) -> Option<Value>
Run the named probe and return its JSON snapshot, or None if no probe is
registered under that name.
Trait Implementations§
Source§impl Clone for AppStateProbes
impl Clone for AppStateProbes
Auto Trait Implementations§
impl Freeze for AppStateProbes
impl RefUnwindSafe for AppStateProbes
impl Send for AppStateProbes
impl Sync for AppStateProbes
impl Unpin for AppStateProbes
impl UnsafeUnpin for AppStateProbes
impl UnwindSafe for AppStateProbes
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