pub enum MemoryContextError {
Show 20 variants
SessionMismatch,
NotSessionLeaseMode {
mode: MemoryContextMode,
},
NotOneShotMode {
mode: MemoryContextMode,
},
OneShotAlreadyPending {
lease_id: MemoryLeaseId,
},
OneShotAlreadyConsumed {
lease_id: MemoryLeaseId,
},
NoPendingRecall,
LeaseExpired {
lease_id: MemoryLeaseId,
},
InvalidExpiry,
InvalidIdentifier {
field: &'static str,
},
RequiresHostConfirmation,
CapabilityUnavailable,
ProviderNotRegistered,
ProviderAmbiguous,
ContributionProjectMismatch,
ContributionOutOfBounds {
field: &'static str,
},
ContributionDuplicateMemoryId,
ContributionMalformed {
field: &'static str,
},
ContributionWithheldContent,
ContributionClassNotPermitted,
RecallBudgetBelowMinimum,
}Expand description
Typed memory-context failure. Deliberately content-free (spec §19: no content-bearing errors): only host-minted identities and static field names appear.
Variants§
SessionMismatch
The lease or revocation targets a different session.
NotSessionLeaseMode
install requires a session-lease mode (RecallEachPrompt,
CaptureOnly, CaptureAndRecall).
Fields
mode: MemoryContextModeThe rejected mode.
NotOneShotMode
install_one_shot requires RecallOnce.
Fields
mode: MemoryContextModeThe rejected mode.
OneShotAlreadyPending
A one-shot recall is already pending; consume or revoke it first.
Fields
lease_id: MemoryLeaseIdThe pending lease identity.
OneShotAlreadyConsumed
This one-shot lease was already consumed; retries cannot recall twice.
Fields
lease_id: MemoryLeaseIdThe consumed lease identity.
NoPendingRecall
No one-shot recall is pending.
LeaseExpired
The lease is expired.
Fields
lease_id: MemoryLeaseIdThe expired lease identity.
InvalidExpiry
expires_at is not strictly after granted_at.
InvalidIdentifier
A boundary identifier was empty, oversized, or contained control characters.
RequiresHostConfirmation
The requested transition can only be committed under deterministic,
host-owned proof of user intent (spec §6.3 ExplicitCommand from the
/memory frontend command, task A5). A model tool call is a proposal
(spec §7.2 rules) and cannot carry such proof through JSON parameters,
so it is refused without installing any lease.
No memory-context capability is wired into this execution context; lease-granting actions are unavailable and nothing was mutated.
ProviderNotRegistered
Enable-time provider validation failed (task A6, spec §7.1): no
loaded extension declares the requested context provider as a
validated deferred.context_providers capability. Fail closed —
nothing was granted.
ProviderAmbiguous
Enable-time provider validation failed (task A6): more than one installed extension declares an overlapping context-provider capability and no explicit provider id disambiguates the request. Fail closed — the host never picks one arbitrarily, and nothing was granted.
ContributionProjectMismatch
A recall contribution’s project identity does not match the host’s expected project (spec §5.2 isolation) — rejected fail-closed, the contribution never influences budgeting or request assembly.
ContributionOutOfBounds
A recall contribution exceeded a spec §10.3 bound (record count, per-record size, or engine-provided rendered budget). Content-free: only the static field name is carried.
ContributionDuplicateMemoryId
A recall contribution repeated a memory_id across its records
(spec §6.5). Rejected fail-closed: duplicates defeat per-record
accounting and supersession semantics. Content-free by design.
ContributionMalformed
A provider recall response did not parse as the bounded §6.5 wire shape (missing/mistyped field or out-of-vocabulary enum value). Content-free: only the static field name is carried; the recall path fails OPEN on it (task B4 — the turn proceeds without memory).
ContributionWithheldContent
A contribution record carried a NON-EMPTY body under a disclosure
class that gate_for_model withholds from model context
(spec §5.5 / §14.2). Defense in depth: a correct provider never
includes withheld content at all, so the whole contribution is
rejected. Content-free by design — the withheld body never appears
in the error.
ContributionClassNotPermitted
A contribution record’s disclosure class is not in the originating
recall request’s DisclosureGrantSet (spec §6.4
permitted_classes): a provider cannot volunteer classes the host
never authorized. Content-free by design.
RecallBudgetBelowMinimum
The computed §10.3 recall budget is below the minimum useful floor — recall is skipped rather than reducing core reserves; nothing was held.
Trait Implementations§
Source§impl Clone for MemoryContextError
impl Clone for MemoryContextError
Source§fn clone(&self) -> MemoryContextError
fn clone(&self) -> MemoryContextError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemoryContextError
impl Debug for MemoryContextError
Source§impl Display for MemoryContextError
impl Display for MemoryContextError
impl Eq for MemoryContextError
Source§impl Error for MemoryContextError
impl Error for MemoryContextError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for MemoryContextError
impl PartialEq for MemoryContextError
impl StructuralPartialEq for MemoryContextError
Auto Trait Implementations§
impl Freeze for MemoryContextError
impl RefUnwindSafe for MemoryContextError
impl Send for MemoryContextError
impl Sync for MemoryContextError
impl Unpin for MemoryContextError
impl UnsafeUnpin for MemoryContextError
impl UnwindSafe for MemoryContextError
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.