aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / crates / aien-mcp / src / error.rs
| 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | // Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | |
| 16 | use aien_capability::ProviderId; |
| 17 | use thiserror::Error; |
| 18 | |
| 19 | #[derive(Debug, Error, PartialEq, Eq)] |
| 20 | pub enum Error { |
| 21 | #[error("provider `{0}` is not admitted to the capability graph")] |
| 22 | NotAdmitted(ProviderId), |
| 23 | #[error("provider `{provider}` has no tool `{tool}`")] |
| 24 | UnknownTool { provider: ProviderId, tool: String }, |
| 25 | #[error("tool effect requires a committed winning world")] |
| 26 | EffectRequiresCommit, |
| 27 | #[error("local ephemeral tool requires a sandbox")] |
| 28 | SandboxRequired, |
| 29 | #[error("tool is speculation-safe and is not an external effect")] |
| 30 | SpeculationSafe, |
| 31 | #[error("authorized capability digest does not match the live catalog")] |
| 32 | StaleCapability, |
| 33 | #[error("effect outcome is uncertain and must be reconciled, not retried")] |
| 34 | ReconciliationRequired, |
| 35 | #[error("effect is already in flight")] |
| 36 | EffectInFlight, |
| 37 | #[error("idempotency key already belongs to a different effect")] |
| 38 | IdempotencyConflict, |
| 39 | #[error("tool call rejected: {0}")] |
| 40 | Rejected(String), |
| 41 | #[error("tool `{0}` has no enrolled effect class")] |
| 42 | UnclassifiedTool(String), |
| 43 | #[error("mcp transport failed: {0}")] |
| 44 | Transport(String), |
| 45 | #[error("approval is no longer reserved for this effect (it was cancelled)")] |
| 46 | ApprovalNotReserved, |
| 47 | #[error("approval expired before the effect could run; nothing was called")] |
| 48 | ApprovalExpired, |
| 49 | #[error( |
| 50 | "approved effect needs a clock to check expiry; build the lane with EffectLane::with_clock" |
| 51 | )] |
| 52 | ApprovalClockMissing, |
| 53 | } |