import type { DeclLeaf, DeclNode, TransportKind, ManifestTimeouts, CommandManifestIssue } from './schema.js'; export interface ValidatedCoreMount { /** The explicitly extensible core branch receiving this plugin node. */ parent: string[]; node: DeclNode; } export interface ValidatedCommandManifest { schemaVersion: 1; baseUrl?: string; timeouts?: ManifestTimeouts; /** Top-level plugin branches or repository-fragment nodes, ready to mount. */ roots: DeclNode[]; /** Plugin nodes mounted below an explicitly extensible core branch. */ coreMounts: ValidatedCoreMount[]; /** Core command path (space-joined, e.g. "cron add") โ†’ attributed addendum * text appended beneath that core command's help. Append-only product * guidance โ€” a plugin can never alter core contract text. */ helpAddenda?: Readonly>; } export interface CommandManifestValidation { /** The validated, materialized manifest (present only if all issues are fixed). */ manifest?: ValidatedCommandManifest; /** All typed validation issues. Any issue means zero contributions. */ issues: CommandManifestIssue[]; } /** * Validates a HTTP-transport plugin manifest exactly per ยง4, performing strict atomic * validation and order-independent forest materialization. Returns either a * valid manifest with roots ready to mount, or a complete issues list with * zero contributions. */ export declare function validateCommandManifest(raw: unknown, options: { transport: TransportKind; reservedCoreNames: ReadonlySet; /** Every core command path (space-joined). Supplied at the strict gates * (install, bundle parse, doctor/inspect reports) so a helpAddenda key * naming no core command fails there โ€” and by the help-render lookup * (`collectHelpAddenda`), which reproduces the gate's verdict so render * and ingress report can never disagree. Omitted on the tolerant compose * path, where mounting ignores addenda entirely, and on that lookup's * claimant pass, which only needs to know whether any addendum targets the * rendered path at all. */ coreCommandPaths?: ReadonlySet; /** A repository fragment attaches roots below an existing extensible branch. */ extensionFragment?: boolean; /** Core branch names that accept plugin children. */ extensibleCoreBranches?: ReadonlySet; }): CommandManifestValidation;