export type CachedExecutable = 'claude' | 'brain' | 'agency' | 'copilot' | 'codex' | 'yeaft' | 'pi'; export type ResolvedExecPaths = Partial>; /** * Warm the executable path cache. Call once at process startup: * - In foreground (interactive) mode the full user PATH is available, so * `resolveViaWhich` will find tools in non-standard locations. * - In daemon mode the foreground process passes resolved paths via * `AGENTLINK_CACHED_*` env vars; this function seeds the cache from those. */ export declare function warmExecPaths(initialPaths?: ResolvedExecPaths): void; /** * Return env vars that should be spread into the daemon child's spawn env * so the cached paths cross the process boundary. */ export declare function getCachedPathEnvVars(): Record; export declare function getResolvedExecPaths(): ResolvedExecPaths; export declare function getCachedExecutablePath(name: CachedExecutable): string | null; export declare function resolveExecutablePath(name: CachedExecutable): string | null; export declare function resetCachedExecutablePath(name: CachedExecutable): void; export declare function isWindows(): boolean; export declare function getDefaultClaudeCodePath(): string; export declare function getCleanEnv(): NodeJS.ProcessEnv; export interface ResolvedCommand { command: string; prefixArgs: string[]; spawnOpts: Record; } export declare function resolveWindowsNpmWrapper(commandPath: string): ResolvedCommand | null; export declare function resolvePiCommand(): ResolvedCommand; export declare function resolveYeaftCommand(): ResolvedCommand; /** * Resolve the claude executable into spawn-ready components. * On Windows npm installs, parses the .cmd wrapper to call node directly, * avoiding cmd.exe flash and PowerShell execution policy issues. */ export declare function resolveClaudeCommand(): ResolvedCommand; /** * Resolve the brain executable into spawn-ready components. * Brain is installed at ~/.brain/bin/brain(.cmd) — daemon processes may not * have it on PATH, so we check well-known locations first. */ export declare function resolveBrainCommand(): ResolvedCommand; export declare function resolveAgencyCommand(prefixArgs?: string[]): ResolvedCommand; /** * Pipe an AsyncIterable of messages into a child stdin as JSON lines. */ export declare function streamToStdin(stream: AsyncIterable, stdin: NodeJS.WritableStream, abort?: AbortSignal): Promise;