oino-wasm-host 1.0.1

Wasmtime component host for oino:extension@2.0.0 components
//! `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 |

#![doc(
    html_logo_url = "https://raw.githubusercontent.com/Neuron-Mr-White/Oino/main/docs/assets/brand/png/oino-256.png",
    html_favicon_url = "https://raw.githubusercontent.com/Neuron-Mr-White/Oino/main/docs/assets/brand/oino.ico"
)]
#![deny(unsafe_code)]
#![cfg_attr(
    test,
    allow(
        clippy::unwrap_used,
        clippy::expect_used,
        clippy::panic,
        reason = "tests assert by unwrapping"
    )
)]

#[allow(
    unsafe_code,
    reason = "generated by wasmtime bindgen (TypedFunc::new_unchecked)"
)]
mod bindings;
mod convert;
#[cfg(feature = "core")]
pub mod core_bridge;
mod engine;
mod http;
mod hub;
mod imports;
mod instance;
mod kv;
mod logging;
pub mod packages;
mod paths;
mod process;
mod resources;
mod secrets;
mod state;
mod streams;
mod tasks;
#[cfg(feature = "testing")]
pub mod testing;
mod timers;
mod wasi;

pub use engine::{
    EPOCH_TICK, EngineRegistry, EngineShared, WasmHostError, WasmRuntime, WasmRuntimeOptions,
};
pub use hub::{LocalServices, TASK_NOTIFICATION_TYPE, topic_matches};
pub use instance::WasmInstance;
pub use kv::KV_MAX_BYTES;
pub use paths::workspace_id;
pub use secrets::SecretStore;
pub use state::HostConfig;
pub use tasks::{TaskInfo, TaskService, TaskSpec, TaskState};