Expand description
Reusable, product-neutral implementations of soma-provider-core
contracts, plus feature-gated bridges onto other shared engines
(soma-openapi, soma-codemode, soma-gateway). See plan section 3.9
and PR10’s deviation notes (in this crate’s individual module docs) for
the reasoning behind what did and did not move here from soma-service.
No module here may depend on a crates/soma/* or apps/* crate under
any feature — cargo tree -p soma-provider-adapters --all-features must
stay shared-only.
Modules§
- ai_sdk
- The generic AI-SDK / sandboxed-TypeScript-handler provider kind: runs a
drop-in
.tsprovider’scall(input)export in a bounded Node sidecar. Ported fromsoma-service::providers::ai_sdkwith product types swapped for theirsoma-provider-coreequivalents. - codemode
- Thin bridge from a drop-in provider tool onto
soma-codemode’s sandboxed JS snippet runner, satisfying plan section 3.9’sprovider-adapters::codemode delegates to soma-codemodebridge. - error
- Re-exports of the generic provider error type plus adapter-local error types shared across sidecar-executing adapters (ai-sdk, python).
- gateway
- Thin, product-neutral projections onto
soma-gateway, the canonical upstream-MCP connection/routing engine (plan section “Upstream MCP decision”). - manifest_
file - Generic manifest -> concrete-provider dispatch, factored out of Soma’s
drop-in provider directory loader
(
FileProviderSource::provider_for_catalog, now incrates/soma/application/src/providers/filesystem.rs). Given an already-parsed, already-validatedProviderManifestand the file it came from, builds the matching adapter for its declaredProviderKind. - openapi
- The generic OpenAPI provider kind: proxies a drop-in provider tool to a
declared
base_url+path/method, gated by the manifest’scapabilities.network.allowed_hostsgrant. - python
- The generic Python (/ LangChain / LlamaIndex) provider kind: introspects
and executes a drop-in
.pyprovider through a bounded Python sidecar runningpython_bridge::PYTHON_BRIDGE. Ported fromsoma-service::providers::python. - sidecar
- Bounded child-process sidecar execution shared by the ai-sdk and python
adapters (and any other adapter that shells out to a runtime process for
one bounded, stdin-in/stdout-out call). Ported from
soma-service::providers::sidecarwith the env-var prefix generalized to a caller-supplied parameter — see the crate-level docs on why generic shared crates must not hard-code a product’s env prefix. - static_
rust - The generic, declarative
static-rustprovider kind: a drop-in manifest with no external process, sidecar, or upstream call, whose tools either echo a cannedmeta.resultvalue or, absent one, echo their own call shape back for inspection/testing. Ported from the privateFileProviderstruct in Soma’s filesystem loader (originallysoma-service, nowcrates/soma/application), which is the actual product-neutral “static Rust provider abstraction” referenced by the architecture plan — Soma’s own concrete built-in-actions provider (also historically namedstatic_rust.rs) is a distinct, product-specific instance that dispatches intoSomaServiceand stays incrates/soma/application. - wasm
- The generic WASM provider kind: runs a drop-in
.wasmmodule’s exportedsoma_callABI in a fuel-bounded wasmtime sandbox. Ported unchanged (beyond product-type swaps) fromsoma-service::providers::wasm.
Constants§
- VERSION
- Crate version from Cargo metadata.