Skip to main content

Module sidecar

Module sidecar 

Source
Expand description

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::sidecar with 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.

Structs§

BoundedOutput
ExecutionEnvelope
The stdin wire envelope sent to every sidecar-executing adapter (ai-sdk, python). Field names and shape are load-bearing: they match the pre-extraction ProviderExecutionEnvelope byte-for-byte so drop-in TypeScript/Python provider handlers written against the documented input shape keep working unchanged.

Functions§

collect_provider_env
Resolves a provider/tool’s declared env requirements against the process environment. prefix is the caller’s product env-namespace (e.g. "SOMA") — this crate has no product identity of its own, so callers must supply it explicitly rather than this module hard-coding one.
execution_payload
Serializes call into the sidecar stdin wire envelope.
output_exceeded_message
resolve_sidecar_command
run_bounded_sidecar
sidecar_base_env