pub struct PackRegistry;Expand description
Registry of pack factories discovered via inventory at link time (ADR-063).
No instance is needed — all methods are associated functions that walk the
globally-collected PackRegistration slice.
Implementations§
Source§impl PackRegistry
impl PackRegistry
Sourcepub fn discovered_names() -> Vec<&'static str>
pub fn discovered_names() -> Vec<&'static str>
Names of all pack factories discovered via inventory.
Sourcepub fn register_packs(
names: &[String],
runtime: KhiveRuntime,
builder: &mut VerbRegistryBuilder,
) -> Result<(), String>
pub fn register_packs( names: &[String], runtime: KhiveRuntime, builder: &mut VerbRegistryBuilder, ) -> Result<(), String>
Register the named packs into builder using the supplied runtime.
Resolves transitive requires() dependencies declared on each
PackFactory before registering anything. A pack that declares
requires = &["kg"] will cause "kg" to be included even if the caller
only asked for "gtd". The VerbRegistryBuilder::build topo-sort
then ensures correct load order.
Returns Ok(()) when all names (including their transitive deps) are
recognised; returns Err(name) for the first unrecognised name so
callers can surface a clear error.