import type { InputParam, Field } from '../help.js'; import type { RestMapping, ManifestTimeouts } from '../command-manifests/schema.js'; import type { LeafRunContext } from '../command.js'; export interface ConfiguredCliInvokerSpec { /** The effective registration: local name, manifest endpoint, optional auth env var. */ registration: { name: string; endpoint: string; authEnvVar?: string; }; /** Manifest-level REST base override (§4.2); falls back to the endpoint origin. */ baseUrl?: string; /** Manifest-level timeout overrides (§6.6); each clock has a crtr default. */ timeouts?: ManifestTimeouts; /** Declared leaf params (authored kebab names), used to resolve descriptors + presence. */ params: InputParam[]; /** The validated REST mapping for this leaf. */ rest: RestMapping; /** Declared output fields — validated against a unary 2xx body before render. */ output: Field[]; /** Full canonical command path, e.g. ['device', 'reboot'] — for error labels only. */ commandPath: string[]; } /** * Execute one configured-CLI leaf. Unary leaves return the validated response * object (crtr's ordinary dispatcher renders it, or mirrors it under --json). * Streaming leaves relay NDJSON frames to stdout incrementally and return void. * * Pre-network failures (missing auth, unreadable local file, illegal header * value) and pre-first-frame transport / protocol failures throw a structured * CrtrError for handle() to render. A streaming transport failure AFTER any * frame has been emitted writes only a stderr diagnostic and sets * process.exitCode = NETWORK — it never throws into handle() and never writes a * second result/error object to stdout. */ export declare function invokeConfiguredLeaf(spec: ConfiguredCliInvokerSpec, input: Record, context?: LeafRunContext): Promise | void>;