soma_provider_core/lib.rs
1// Render per-item feature-requirement badges when rustdoc runs on nightly with
2// `--cfg docsrs` (docs.rs posture; locally via `cargo xtask doc --docsrs-cfg`).
3// Inert under the stable CI doc gate: stable rustdoc never sets `docsrs`.
4#![cfg_attr(docsrs, feature(doc_auto_cfg))]
5//! Transport-neutral provider contracts and immutable registry dispatch.
6//!
7//! `soma-provider-core` defines provider manifests, executable [`ToolSpec`]
8//! metadata, validation, provider calls and outputs, and the registry that
9//! indexes and dispatches them. It deliberately has no Soma product policy,
10//! auth, configuration, process lifecycle, or concrete provider adapters.
11//!
12//! Build a registry with [`ProviderRegistry::builder`], register implementations
13//! of [`Provider`], then dispatch a [`ProviderCall`]. Registry snapshots are
14//! immutable and carry a deterministic [`RegistryFingerprint`].
15
16#![forbid(unsafe_code)]
17
18mod call;
19mod error;
20mod id;
21mod manifest;
22mod output;
23mod provider;
24mod registry;
25mod surface;
26mod validation;
27
28pub use call::ProviderCall;
29pub use error::{ProviderError, redact_public};
30pub use id::{ProviderId, ProviderIdError};
31pub use manifest::*;
32pub use output::ProviderOutput;
33pub use provider::Provider;
34pub use registry::{
35 ProviderIndexes, ProviderRegistry, ProviderRegistryBuilder, RegisteredTool,
36 RegistryFingerprint, RegistrySnapshot,
37};
38pub use surface::ProviderSurface;
39pub use validation::{
40 ProviderValidationError, validate_manifest_schema, validate_provider_manifest,
41 validate_provider_manifest_value,
42};