import type { CommandContribution, CommandRegistrySnapshot, ContributorIssue } from '../command-manifests/registry.js'; /** Raw configured candidates before cross-contributor collision resolution: * the contributions from every registration with a valid stored manifest, the * validation issues from every registration whose stored manifest is present * but invalid, and the names of registrations whose store reads as absent (the * hydration-eligible set, for a caller deciding whether a miss should fetch). */ export interface ConfiguredCliDiscovery { candidates: CommandContribution[]; issues: ContributorIssue[]; /** Effective registrations with no readable stored manifest (§5.1 hydration). */ absentStoreNames: string[]; } /** Discover configured-CLI candidates from stored manifests only — zero network. * Each effective registration (project over user) contributes its valid roots, * reports its invalid-manifest issues, or is noted as absent-store. */ export declare function discoverConfiguredCliCandidates(reservedCoreNames: ReadonlySet): ConfiguredCliDiscovery; /** Build THE unified external-command snapshot: every effective command plugin * and every effective configured CLI, resolved through ONE collision pass, with * every issue (plugin-structural, configured-manifest-invalid, and cross- * contributor collision) merged into one list. Performs zero network I/O — all * manifests read from disk. This exact result is consumed by dispatch/root * composition, `pkg cli show`/`pkg plugin show`, and `sys doctor`, so their * accepted-command and issue views can never diverge. `reservedCoreNames` are * the core top-level subtree names — core always wins. */ export declare function buildExternalCommandSnapshot(reservedCoreNames: ReadonlySet): CommandRegistrySnapshot; /** Outcome of a miss-triggered absent-store hydration pass. */ export interface AbsentStoreHydration { /** True if at least one absent-store registration now has freshly stored * bytes — the signal for the caller to rebuild the tree and re-resolve once. */ hydratedAny: boolean; /** One concise stderr line per failed hydration (naming the registration, its * fetch error, and the refresh remedy). No NETWORK precedence: a failure here * never changes the caller's eventual `unknown_path`/USAGE outcome. */ diagnostics: string[]; } /** Hydrate EVERY effective absent-store registration exactly once (§5.1). For * each registration with no readable stored manifest, perform one authenticated * `GET endpoint`, storing the exact bytes on success. A fetch failure (network, * non-2xx, or named-but-empty auth env) leaves the store absent and records a * one-line diagnostic — it never throws and never earns NETWORK precedence over * the caller's `unknown_path`/USAGE classification. Registrations that already * hold a stored manifest (valid OR merely schema-invalid) are skipped, so with * every manifest stored this performs zero network I/O. * * Intended caller: dispatch (E2), on an unknown-first-token miss, followed by a * single tree rebuild + re-resolve when `hydratedAny` is true. */ export declare function hydrateAbsentConfiguredClis(): Promise;