pub struct MemoryContextCapability { /* private fields */ }Expand description
Session-scoped memory-context capability handed to tool contexts (task
A4), mirroring the shape of crate::mcp::McpLeaseCapability and
crate::extensions::lease::ExtensionLeaseCapability: a small Clone
handle over the shared per-session SessionMemoryState that the
memory_context builtin uses to read and mutate memory-context state.
Authority discipline: construction is pub(crate) — only host wiring can
mint one — and every mutation routes through the exhaustive
apply_memory_context_action transition table. The capability can only
commit actions that are always locally safe/revocable (spec §7.2 rules:
disable, status, one-shot recall_once); durable enable and
index_history need deterministic host-owned proof (ExplicitCommand
from /memory, task A5) that never flows through this handle.
Implementations§
Source§impl MemoryContextCapability
impl MemoryContextCapability
Sourcepub fn status(&self) -> MemoryContextStatus
pub fn status(&self) -> MemoryContextStatus
Typed status snapshot — metadata-only, never spawns a provider (spec §7.2 “status does not spawn”).
Sourcepub fn disable(&self) -> MemoryContextStatus
pub fn disable(&self) -> MemoryContextStatus
Revoke this session’s memory context (spec §7.2 “disable is always
locally allowed”). Idempotent: revoking an already-off session is a
no-op that reports Off.
Trait Implementations§
Source§impl Clone for MemoryContextCapability
impl Clone for MemoryContextCapability
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryContextCapability
impl !UnwindSafe for MemoryContextCapability
impl Freeze for MemoryContextCapability
impl Send for MemoryContextCapability
impl Sync for MemoryContextCapability
impl Unpin for MemoryContextCapability
impl UnsafeUnpin for MemoryContextCapability
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.