Skip to content

vox-skill-runtime API Reference (generated)

Crate: vox-skill-runtime · Version: 0.6.0 · Target: Library (lib.rs)

Abstract sandbox runtime trait for skill execution. Implementations ship as plugins (wasm, container).

Abstract sandbox runtime trait for Vox skill execution.

Defines the SkillRuntime trait and the detect_runtime() dispatch surface. Implementations are shipped as plugins:

  • vox-plugin-runtime-wasm — wasmtime-based WASI sandbox (default for pure-compute skills)
  • vox-plugin-runtime-container — Docker/Podman OCI sandbox (fallback for subprocess/GPU skills)
vox-skills::SandboxedSkillRunner
└─ vox_skill_runtime::detect_runtime(pref)
└─ SkillRuntime trait object
├─ WasmRuntime (plugin: vox-plugin-runtime-wasm)
└─ DockerRuntime / PodmanRuntime (plugin: vox-plugin-runtime-container)
ModuleDescription
detect—
runtime—
Dependency Topology, diagram 15 nodes, 4 edges: vox-orchestrator → vox-skill-runtime; vox-plugin-runtime-cont… → vox-skill-runtime; vox-plugin-runtime-wasm → vox-skill-runtime; vox-skills → vox-skill-runtimevox-skill-runtimevox-orchestratorvox-plugin-runtime-containervox-plugin-runtime-wasmvox-skills
Diagram source
graph {
direction: right
node vox_skill_runtime: "vox-skill-runtime"
node vox_orchestrator: "vox-orchestrator"
vox_orchestrator -> vox_skill_runtime
node vox_plugin_runtime_container: "vox-plugin-runtime-container"
vox_plugin_runtime_container -> vox_skill_runtime
node vox_plugin_runtime_wasm: "vox-plugin-runtime-wasm"
vox_plugin_runtime_wasm -> vox_skill_runtime
node vox_skills: "vox-skills"
vox_skills -> vox_skill_runtime
}
Consumer CrateRole
vox-orchestratorDirect workspace dependent
vox-plugin-runtime-containerDirect workspace dependent
vox-plugin-runtime-wasmDirect workspace dependent
vox-skillsDirect workspace dependent
KindSymbolSignatureSourceDescription
enumdetect::RuntimePreferencepub enum RuntimePreferencecrates/vox-skill-runtime/src/detect.rs#L26-L37Preferred skill runtime selection strategy.
enumdetect::RuntimeChoicepub enum RuntimeChoicecrates/vox-skill-runtime/src/detect.rs#L59-L66Which runtime was chosen by probe. Returned by [detect_runtime] when a full Box<dyn SkillRuntime> is not needed immediately — callers can branch on this to load the appropriate plugin.
fndetect::namepub fn name(self) -> &'static strcrates/vox-skill-runtime/src/detect.rs#L70-L76Human-readable name.
fndetect::detect_choicepub fn detect_choice(preference: RuntimePreference) -> anyhow::Result<RuntimeChoice>crates/vox-skill-runtime/src/detect.rs#L98-L127Detect the best available RuntimeChoice for the given preference.
fndetect::detect_runtimepub fn detect_runtime(_preference: RuntimePreference) -> Option<Box<dyn SkillRuntime>>crates/vox-skill-runtime/src/detect.rs#L135-L158Detect and return the best available skill runtime for the given preference. Returns a concrete Box<dyn SkillRuntime> backed by an inline probe. For WASM preference (the default), always succeeds since Wasmtime is in-process. For Docker/Podman, probes the CLI and returns an error if not available.
fndetect::plan_for_min_tierpub fn plan_for_min_tier(min_tier: Tier) -> anyhow::Result<RuntimeChoice>crates/vox-skill-runtime/src/detect.rs#L166-L188Choose the best available RuntimeChoice satisfying the minimum tier. - Tier::BareMetal → RuntimeChoice::Wasm (WASM is the least available tier in the selector) - Tier::Wasm → RuntimeChoice::Wasm - Tier::Container → Docker or Podman if available, else error - Tier::MicroVm → always Err in Phase 6 (no real micro-VM backend)
structruntime::BuildOptspub struct BuildOptscrates/vox-skill-runtime/src/runtime.rs#L20-L29Options for the “build” phase of a skill runtime. For container runtimes: builds an OCI image. For WASM runtimes: validates or precompiles the .wasm artifact. For bare-metal: no-op.
structruntime::RunOptspub struct RunOptscrates/vox-skill-runtime/src/runtime.rs#L36-L54Options for running a skill in its sandbox. This is also the JSON request shape the SkillRuntime plugin extension’s invoke_skill accepts (serde field names match the struct fields).
structruntime::RunOutcomepub struct RunOutcomecrates/vox-skill-runtime/src/runtime.rs#L74-L83The captured outcome of a skill execution. Also the JSON response shape returned by the SkillRuntime plugin extension’s invoke_skill.
fnruntime::successpub fn success(&self) -> boolcrates/vox-skill-runtime/src/runtime.rs#L87-L89Returns true if the skill exited successfully (exit code 0).
enumruntime::Tierpub enum Tiercrates/vox-skill-runtime/src/runtime.rs#L97-L107Sandbox isolation tier for skill execution (P6-T3). Ordered from least to most isolated. The planner prefers the highest tier available that satisfies the skill’s declared requirements.
traitruntime::SkillRuntimepub trait SkillRuntime: Send + Synccrates/vox-skill-runtime/src/runtime.rs#L117-L157Abstract sandbox runtime for skill execution. Implementations exist for: - WASM (vox-plugin-runtime-wasm, the default for pure-compute skills) - Docker/Podman (vox-plugin-runtime-container, fallback for subprocess/GPU skills) The runtime is selected by vox-skill-runtime::detect::detect_runtime() based on the skill’s declared requirements.