pub enum KernelError {
Show 58 variants
UnknownSession(SessionId),
SessionAlreadyExists(SessionId),
Session(SessionError),
CapabilityExpired,
CapabilityNotYetValid,
CapabilityRevoked(CapabilityId),
InvalidSignature,
UntrustedIssuer,
CapabilityIssuanceFailed(String),
CapabilityIssuanceDenied(String),
OutOfScope {
tool: String,
server: String,
},
OutOfScopeResource {
uri: String,
},
OutOfScopePrompt {
prompt: String,
},
BudgetExhausted(CapabilityId),
CapturedBudgetReplay(CapabilityId),
DirectDispatchUnavailable,
SubjectMismatch {
expected: String,
actual: String,
},
DelegationChainRevoked(CapabilityId),
DelegationInvalid(String),
InvalidConstraint(String),
GovernedTransactionDenied(String),
GuardDenied(String),
ToolServerError(String),
RequestIncomplete(String),
ToolNotRegistered(String),
ResourceNotRegistered(String),
ResourceRootDenied {
uri: String,
reason: String,
},
PromptNotRegistered(String),
SamplingNotAllowedByPolicy,
SamplingNotNegotiated,
SamplingContextNotSupported,
SamplingToolUseNotAllowedByPolicy,
SamplingToolUseNotNegotiated,
ElicitationNotAllowedByPolicy,
ElicitationNotNegotiated,
ElicitationFormNotSupported,
ElicitationUrlNotSupported,
UrlElicitationsRequired {
message: String,
elicitations: Vec<CreateElicitationOperation>,
},
RootsNotNegotiated,
InvalidChildRequestParent,
RequestCancelled {
request_id: RequestId,
reason: String,
},
ReceiptSigningFailed(String),
ReceiptPersistence(ReceiptStoreError),
RevocationStore(RevocationStoreError),
BudgetStore(BudgetStoreError),
DurableAdmission(String),
NoCrossCurrencyOracle {
base: String,
quote: String,
},
CrossCurrencyOracle(String),
Web3EvidenceUnavailable(String),
SettlementConfiguration(SettlementRuntimeConfigError),
Internal(String),
DpopVerificationFailed(String),
ApprovalRejected(String),
SyncBridgeIncompatibleWithCurrentThreadRuntime,
ReservingAuthorizationRejectsPresentedNonce,
Overloaded {
resource: OverloadResource,
},
HotPathDeadlineExceeded {
stage: HotPathStage,
budget_ms: u64,
},
ReceiptWriterUnavailable(String),
}Expand description
Errors that can occur during kernel operations.
Variants§
UnknownSession(SessionId)
SessionAlreadyExists(SessionId)
Session(SessionError)
CapabilityExpired
CapabilityNotYetValid
CapabilityRevoked(CapabilityId)
InvalidSignature
UntrustedIssuer
CapabilityIssuanceFailed(String)
CapabilityIssuanceDenied(String)
OutOfScope
OutOfScopeResource
OutOfScopePrompt
BudgetExhausted(CapabilityId)
CapturedBudgetReplay(CapabilityId)
SubjectMismatch
DelegationChainRevoked(CapabilityId)
DelegationInvalid(String)
InvalidConstraint(String)
GovernedTransactionDenied(String)
GuardDenied(String)
ToolServerError(String)
RequestIncomplete(String)
ToolNotRegistered(String)
ResourceNotRegistered(String)
ResourceRootDenied
PromptNotRegistered(String)
SamplingNotAllowedByPolicy
SamplingNotNegotiated
SamplingContextNotSupported
SamplingToolUseNotAllowedByPolicy
SamplingToolUseNotNegotiated
ElicitationNotAllowedByPolicy
ElicitationNotNegotiated
ElicitationFormNotSupported
ElicitationUrlNotSupported
UrlElicitationsRequired
RootsNotNegotiated
InvalidChildRequestParent
RequestCancelled
ReceiptSigningFailed(String)
ReceiptPersistence(ReceiptStoreError)
RevocationStore(RevocationStoreError)
BudgetStore(BudgetStoreError)
DurableAdmission(String)
NoCrossCurrencyOracle
CrossCurrencyOracle(String)
SettlementConfiguration(SettlementRuntimeConfigError)
Internal(String)
DpopVerificationFailed(String)
ApprovalRejected(String)
A human-in-the-loop approval token failed to satisfy the pending approval contract (bad binding, bad signature, expired, or replayed).
SyncBridgeIncompatibleWithCurrentThreadRuntime
The sync evaluate_tool_call path was invoked from a context
where the only available Tokio runtime is a current-thread
runtime. The async tool-dispatch path cannot be safely driven
on a current-thread runtime: bridging via
futures::executor::block_on parks the caller’s thread, and
Tokio I/O timers / reactor wakers cannot progress on the same
parked thread. Returning a typed error rather than deadlocking
lets callers move the dispatch onto a multi-thread runtime.
The public async evaluate_tool_call path is still backed by the
blocking evaluator on this branch, so it is not a current-thread
escape hatch.
ReservingAuthorizationRejectsPresentedNonce
The reserving pre-execution authorization entry point received a request carrying a presented execution nonce. That entry point mints nonces; it never settles them. Accepting a presented nonce would silently skip the reserve path and fall through to dispatch, so it is rejected fail-closed.
Overloaded
The kernel shed load to stay within its memory budget. Always a deny; never admits a call and never grows a collection.
Fields
resource: OverloadResourceHotPathDeadlineExceeded
A mediation-path stage exceeded its configured wall-clock budget. The invocation is aborted fail-closed through the shared unwind path: budget holds are reversed and, for a dispatch expiry, the runtime-admission reservation is retained and marked auditable. Never yields Allow.
The receipt commit writer is wedged, saturated, or dead, as reported by the receipt-writer watchdog. Enforced at the pre-dispatch readiness gate so no tool side effect runs while receipts cannot be durably persisted.
Implementations§
Source§impl KernelError
impl KernelError
pub fn report(&self) -> StructuredErrorReport
Trait Implementations§
Source§impl Debug for KernelError
impl Debug for KernelError
Source§impl Display for KernelError
impl Display for KernelError
Source§impl Error for KernelError
impl Error for KernelError
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 From<AdmissionOperationError> for KernelError
impl From<AdmissionOperationError> for KernelError
Source§fn from(error: AdmissionOperationError) -> Self
fn from(error: AdmissionOperationError) -> Self
Source§impl From<BudgetStoreError> for KernelError
impl From<BudgetStoreError> for KernelError
Source§fn from(source: BudgetStoreError) -> Self
fn from(source: BudgetStoreError) -> Self
Source§impl From<ExecutionNonceError> for KernelError
impl From<ExecutionNonceError> for KernelError
Source§fn from(err: ExecutionNonceError) -> Self
fn from(err: ExecutionNonceError) -> Self
Source§impl From<ReceiptStoreError> for KernelError
impl From<ReceiptStoreError> for KernelError
Source§fn from(source: ReceiptStoreError) -> Self
fn from(source: ReceiptStoreError) -> Self
Source§impl From<RevocationStoreError> for KernelError
impl From<RevocationStoreError> for KernelError
Source§fn from(source: RevocationStoreError) -> Self
fn from(source: RevocationStoreError) -> Self
Source§impl From<SessionError> for KernelError
impl From<SessionError> for KernelError
Source§fn from(source: SessionError) -> Self
fn from(source: SessionError) -> Self
Source§impl From<SettlementRuntimeConfigError> for KernelError
impl From<SettlementRuntimeConfigError> for KernelError
Source§fn from(source: SettlementRuntimeConfigError) -> Self
fn from(source: SettlementRuntimeConfigError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for KernelError
impl !UnwindSafe for KernelError
impl Freeze for KernelError
impl Send for KernelError
impl Sync for KernelError
impl Unpin for KernelError
impl UnsafeUnpin for KernelError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.