import type { CommandResult } from './types.js'; export type BinRef = { bin: string; package: string; }; export declare const manifestOf: (dir: string) => { bin?: Record | string; version?: string; }; /** So a globally installed CLI reaches its own copies. */ export declare const SELF: string; export declare const UNKNOWN_VERSION = "an unknown version"; type Found = { note: string; path: string; }; /** Falling back to the CLI's bundled bin over a repo pinning another is declared != loaded one level up; it still beats refusing, so it is printed. */ export declare const findBin: (cwd: string, ref: BinRef) => Found; export type BinStreams = { exitCode: number; notice: string; stderr: string; stdout: string; }; export declare const spawnBin: (cwd: string, ref: BinRef, args: readonly string[]) => BinStreams; /** stdout and stderr are joined: a caller reading one misses the refusal written to the other. */ export declare const runBin: (cwd: string, ref: BinRef, args: readonly string[]) => Promise; export {};