Skip to main content

Module codemode

Module codemode 

Source
Expand description

Thin bridge from a drop-in provider tool onto soma-codemode’s sandboxed JS snippet runner, satisfying plan section 3.9’s provider-adapters::codemode delegates to soma-codemode bridge.

There is exactly one Code Mode execution engine in the workspace (soma_codemode::execute::execute_inline, which spawns the bounded soma-codemode-runner subprocess); this adapter calls it directly rather than re-implementing any part of the runner, sandbox, or result-shaping pipeline.

soma_provider_core::ProviderKind has no CodeMode variant yet, so this adapter is not reachable through crate::manifest_file::build_provider’s drop-in-manifest kind dispatch — it is real, compiles, and is unit-tested, but wiring a ProviderKind::CodeMode drop-in manifest shape is a schema change appropriately scoped to a follow-up.

Structs§

CodeModeSnippetProvider
Runs one fixed JS snippet on every call, ignoring call.params beyond exposing them to the snippet as soma.input is out of scope for this thin bridge — the snippet itself decides what, if anything, to do with arguments passed through the surrounding provider manifest.