import type { InstalledPlugin } from '../../types.js'; import type { Field } from '../help.js'; export interface ExternalLeafSpec { plugin: InstalledPlugin; /** Absolute, resolved executable path. */ executable: string; /** Full canonical command path, e.g. ['app', 'show']. */ commandPath: string[]; /** Declared leaf output fields — validated against the result before render. */ output: Field[]; } /** Validates a result object against declared output field descriptors. * Returns null if valid; otherwise returns a { field, receivedType } error. * Transport-neutral: used by both command-plugin and configured-CLI adapters. */ export declare function validateDeclaredResult(output: Field[], result: Record): { field: string; receivedType?: string; } | null; /** Execute one external leaf and return its result object (crtr renders it via * the generic renderer; `--json` mirrors it). Throws a CrtrError for any * protocol violation or the plugin's own recoverable error. */ export declare function executeExternalLeaf(spec: ExternalLeafSpec, input: Record): Record;