wasm-capability-contract 0.3.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
//! [`ValidateComponentRequest`] — input to [`crate::ComponentValidator::validate`].

use serde::{Deserialize, Serialize};

use crate::{CapabilityGrant, ComponentManifest};

/// Everything a `ComponentValidator` needs to check one component before
/// its route is registered: the manifest it claims, the real bytes it
/// ships, and what the route was actually granted.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ValidateComponentRequest {
    /// The component's own claimed manifest.
    pub manifest: ComponentManifest,
    /// The real `.wasm` component bytes — checked against
    /// `manifest.artifact_provenance.checksum_sha256` and structurally
    /// inspected for its actual imports.
    pub component_bytes: Vec<u8>,
    /// What this route was actually granted, independent of what the
    /// manifest declares wanting.
    pub granted_capabilities: Vec<CapabilityGrant>,
}