/** * bundle-install.ts * * The activation-planning layer that binds a verified capability bundle to the * existing plugin capability + quarantine machinery. Installing a bundle does * three things, in order: * * 1. resolve the bundle's declared security capabilities against the trust * tier (via the plugin model's `resolveCapabilityManifest`), so a bundle * never receives more than its tier permits; * 2. decide quarantine, if the bundle declared high-risk capabilities the * tier does not grant, the bundle activates QUARANTINED with those * capabilities revoked (the same posture the runtime quarantine engine * applies to a live plugin), rather than being granted them; * 3. hand back a deny-by-default surface guard for the granted set. * * This is where "quarantine machinery applies on install" is realized: an * over-reaching bundle is not rejected outright (its safe capabilities still * work) but its high-risk asks are withheld and recorded, not silently granted. */ import type { PluginCapability, PluginCapabilityManifest } from '../plugins/types.js'; import type { PluginTrustTier } from '../plugins/trust.js'; import { type BundleCapabilityGuard, type CapabilityBundleManifest } from './bundle-manifest.js'; /** The quarantine decision produced when a bundle over-reaches its trust tier. */ export interface BundleQuarantineDecision { /** True when high-risk capabilities were withheld and the bundle is quarantined. */ readonly required: boolean; /** Capabilities withheld from the bundle at activation. */ readonly revokedCapabilities: readonly PluginCapability[]; /** Human-readable reason, present when `required` is true. */ readonly reason?: string | undefined; } /** The full plan for activating a verified bundle. */ export interface BundleActivationPlan { readonly manifest: CapabilityBundleManifest; readonly trustTier: PluginTrustTier; /** Resolved security capabilities (granted / denied / reasons). */ readonly capabilityManifest: PluginCapabilityManifest; readonly quarantine: BundleQuarantineDecision; /** Deny-by-default guard scoped to the GRANTED capabilities and declared surfaces. */ readonly guard: BundleCapabilityGuard; } /** * Plan the activation of a verified bundle at a given trust tier. Pure: it makes * the grant/quarantine decision and returns a guard, but performs no IO. The * guard it returns is scoped to the GRANTED security capabilities, a bundle * whose high-risk capability was withheld cannot exercise it even if declared. */ export declare function planBundleActivation(manifest: CapabilityBundleManifest, options?: { readonly trustTier?: PluginTrustTier; }): BundleActivationPlan; //# sourceMappingURL=bundle-install.d.ts.map