wasm-capability-contract 0.4.0

Generic, domain-agnostic capability pattern: CapabilityEngine/CapabilityRegistry/CapabilityDispatcher trait shapes + component/capability types. Trait definitions only -- see wasm-capability-core for this pattern's own default implementation, extracted from agent-runtime's ADR-001 (agent-runtime#31, ADR-011).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! [`ComponentLoadRequest`] — input to [`crate::CapabilityEngine::load`].

use crate::ComponentManifest;

/// Request to load an already-validated component artifact into the engine.
///
/// Callers must run [`crate::ComponentValidator::validate`] against
/// `manifest`/`component_bytes` first — `load` is not required to
/// re-validate the manifest, only to fail if the bytes cannot be
/// instantiated per the (already-validated) manifest's declared contract.
#[derive(Debug, Clone)]
pub struct ComponentLoadRequest {
    /// The component's manifest, already validated by
    /// [`crate::ComponentValidator`].
    pub manifest: ComponentManifest,
    /// The raw Wasm component binary.
    pub component_bytes: Vec<u8>,
}