Skip to main content

validate_manifest_deferred

Function validate_manifest_deferred 

Source
pub fn validate_manifest_deferred(
    manifest: &ExtensionManifest,
) -> Result<(), &'static str>
Expand description

Manifest-level coupling checks for a deferred block (review fix A1/ A2). Passive declarations are CAPABILITY claims: cataloging a dormant tool descriptor (or provider metadata) grants the extension future runtime reach, so it MUST be backed by the exact permission the live registration would require — otherwise a manifest could obtain discoverable/activatable surface it was never authorized to register. Likewise lifecycle = "hook" without a real manifest hook subscription has NO authorized trigger and can never legitimately start: it fails closed here instead of lingering as unreachable-but-cataloged state.

Runs inside ExtensionManifest::validate — i.e. strictly BEFORE any spawn or catalog registration on every load path.