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::{
29 ProviderCall, ProviderInvocationContext, ProviderProgressEvent, ProviderProgressReporter,
30};
31pub use error::{ProviderError, redact_public};
32pub use id::{ProviderId, ProviderIdError};
33pub use manifest::*;
34pub use output::ProviderOutput;
35pub use provider::Provider;
36pub use registry::{
37 ProviderIndexes, ProviderRegistry, ProviderRegistryBuilder, RegisteredTool,
38 RegistryFingerprint, RegistrySnapshot,
39};
40pub use surface::ProviderSurface;
41pub use validation::{
42 ProviderValidationError, validate_manifest_schema, validate_provider_manifest,
43 validate_provider_manifest_value,
44};