Expand description
oino-wasm-host: the wasmtime component host for oino:extension@2.0.0 (extension-api §5).
§Boundary
Implements oino_extension_api::ExtensionRuntime. Host imports that touch sessions, UI,
models or agents delegate to oino_extension_api::HostServices; process, http, fs,
timers, kv, log, host-info and provider-host are served here, each import checking
the manifest grant first (§5.3). LocalServices serves bus, services, secrets and tasks
until core takes them over. With feature core, core_bridge plugs the runtime into
oino-core’s extension runner.
§Unsafe
The crate denies unsafe_code; the only exception is the bindings module generated by
wasmtime::component::bindgen!, whose typed export accessors use TypedFunc::new_unchecked
(the types are checked against the component at instantiation).
§API map
| Item | Contents |
|---|---|
WasmRuntime, WasmRuntimeOptions, EngineRegistry, EngineShared | process-shared engine (async component model, epoch ticker, compile/InstancePre caches), linker, loading |
WasmInstance | one instance per extension; actor-driven concurrent calls, trap restart |
HostConfig | agent dir, cwd, proxy, versions |
LocalServices | bus, services, secrets, background tasks, host event delivery (one per agent dir per process) |
packages | package discovery (extension.json + component) |
core_bridge (feature core) | adapters to oino_core::extensions and services::ExtensionLoader |
testing (feature) | fixture builder + harness |
Modules§
- core_
bridge - Bridge to
oino-core’s extension runner (featurecore). - packages
- Package discovery:
<dir>/<package>/extension.json+ component (extension-api §7.1).
Structs§
- Engine
Registry - Process-wide engine and hub registry (E-ENGINE): one wasmtime engine (with one epoch
ticker thread and the in-memory component/
InstancePrecaches) per engine configuration, and oneLocalServiceshub per agent dir, shared by everyWasmRuntimeof the process — so everyCliLoader, the ACP factory and a multi-cwd host share one engine instead of multiplying them per service. - Engine
Shared - The wasmtime engine, linker, epoch ticker and compile caches shared by every
WasmRuntimeof one engine configuration (E-ENGINE). Obtain one throughEngineRegistry(orWasmRuntime::engine); the registry keeps it alive for the process so services created later reuse it instead of paying engine setup, a ticker thread and recompilation again. - Host
Config - Host-wide configuration shared by every instance.
- Local
Services - Process-wide local services shared by all instances of one
crate::WasmRuntime(one hub per agent dir per process,crate::EngineRegistry). - Secret
Store - The secrets file.
- Task
Info TaskInfo.- Task
Service - Tasks of every session in this process.
- Task
Spec TaskSpec(the host’s background tasks).- Wasm
Instance - A loaded extension component.
- Wasm
Runtime - The wasmtime component runtime.
- Wasm
Runtime Options - Options of
WasmRuntime.
Enums§
- Task
State - Task state.
- Wasm
Host Error - Engine-level failure.
Constants§
- EPOCH_
TICK - Epoch tick (deadline granularity).
- KV_
MAX_ BYTES - Maximum size of one
kv.json. - TASK_
NOTIFICATION_ TYPE - Custom message type of task completion notifications.
Functions§
- topic_
matches patternmatchestopic: exact, orprefix:*/*.- workspace_
id - D10 workspace id: first 16 hex chars of sha256(canonical project root).