soma_domain/lib.rs
1//! Soma's product-domain invariants (plan section 6.2): the action catalog,
2//! error taxonomy, scope/token-budget policy, and CLI provider-validation
3//! rules shared identically across REST, CLI, and MCP dispatch.
4//!
5//! Split out of `soma-contracts` in PR 13 rather than `soma-application`
6//! because `soma-service` (a dependency of `soma-application` during the
7//! PR 12 strangler migration) also builds its static-Rust provider catalog
8//! directly from these types; every consumer (application, service, api,
9//! cli, mcp, integrations, runtime, apps/soma) can already depend on
10//! `soma-domain` without creating a cycle. See the per-module
11//! "module-placement rationale" notes (e.g. the bottom of `actions.rs`) for
12//! the full reasoning.
13
14mod execution;
15mod principal;
16
17pub mod actions;
18pub mod authz;
19pub mod errors;
20pub mod provider_validation;
21pub mod scopes;
22pub mod token_limit;
23
24pub use execution::{
25 AuthorizationMode, Confirmation, RequestId, RequestIdError, Surface, TraceContext,
26};
27pub use principal::{Principal, ScopeSet};