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
//! [`CapabilityDescriptor`] — a registry entry describing one capability's dispatch shape.

use crate::CapabilityProtocol;

/// What a `CapabilityRegistry` returns for one capability name: the host
/// import name a granted, structurally-present capability wires to, and
/// which dispatcher family handles it.
///
/// Registry-internal, never serialized — see [`CapabilityProtocol`]'s own
/// doc comment for why.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct CapabilityDescriptor {
    /// The Wasm component-level import name this capability wires to
    /// (e.g. `"http-egress"`), matched against the component's own
    /// declared imports by the structural byte-ABI check.
    pub import_name: &'static str,
    /// Which dispatcher family resolves a call to this capability.
    pub protocol: CapabilityProtocol,
}