import type { Writable } from 'node:stream'; /** * Marks a run made on a delegating caller's behalf, where a command the registry does not define exits 0 * rather than failing. */ export declare const RUN_IF_PRESENT_ENV_VAR = "NMR_RUN_IF_PRESENT"; /** @internal */ export interface RunCliOptions { /** Post-slice CLI arguments (equivalent to `process.argv.slice(2)`). */ args: string[]; /** Working directory used to resolve the nmr execution context. */ cwd: string; /** Environment for `runCli` (used for `NMR_RUN_IF_PRESENT` reads and `-R` writes). */ env: NodeJS.ProcessEnv; /** Stream for normal output (help text, override messages). */ stdout: Writable; /** Stream for error output (unknown command, parse errors). */ stderr: Writable; } /** @internal */ export interface RunCliResult { exitCode: number; } /** * Executes the nmr CLI flow in-process and returns the resulting exit code. * Holds no global state, reads no `process.*` globals, never calls `process.exit`. * * @internal */ export declare function runCli(options: RunCliOptions): Promise;