import type { ManifestRootEntry as DeclRootEntry, ManifestPassthrough as DeclPassthrough, ManifestLeafBase as DeclLeafBase, ManifestExecLeaf as ExecDeclLeaf, ManifestHttpLeaf as HttpDeclLeaf, ManifestLeaf as DeclLeaf, ManifestBranch as DeclBranch, ManifestNode as DeclNode, RestMethod, RestParamPlacement, RestParamMapping, RestMapping, ManifestTimeouts } from '../plugin-manifest-schema.js'; export type { DeclRootEntry, DeclPassthrough, DeclLeafBase, ExecDeclLeaf, HttpDeclLeaf, DeclLeaf, DeclBranch, DeclNode, RestMethod, RestParamPlacement, RestParamMapping, RestMapping, ManifestTimeouts, }; export interface CommandManifestIssue { code: CommandIssueCode; path?: string; message: string; received: string; expected: string; next: string; } export type CommandIssueCode = 'command_manifest_unreadable' | 'command_manifest_invalid' | 'command_schema_version' | 'command_path_unsafe' | 'command_not_executable' | 'command_parent_invalid' | 'command_node_invalid' | 'command_collision' | 'command_help_addendum_invalid' | 'command_rest_invalid' | 'command_extension_invalid'; type IssueFn = (code: CommandIssueCode, message: string, received: string, expected: string, next: string, path?: string) => void; export type TransportKind = 'exec' | 'http'; export interface CommandNodeValidationOptions { /** Plugin roots need rootEntry; repository-fragment roots attach under an existing branch and forbid it. */ topLevelRootEntry?: 'required' | 'forbidden'; /** Repository fragments have no passthrough escape hatch. */ allowPassthrough?: boolean; /** Only plugin manifests may mark their own top-level branch extensible. */ allowExtensible?: boolean; } export declare function validateCommandNode(raw: unknown, path: string[], topLevel: boolean, transport: TransportKind, issue: IssueFn, options?: CommandNodeValidationOptions): DeclBranch | DeclLeaf | null;