/** * Process-lifetime cache of a forge's default-repo lookup (`gh repo view`, * `glab repo view`) keyed by absolute cwd. * * The shared lookup is intentionally **not** bound to any caller's * AbortSignal. Cancelling one caller would otherwise kill the underlying * subprocess for every concurrent waiter on the same cwd. Each caller's * signal is honored at the wait point via `untilAborted` instead, so an abort * unwinds only that caller. Failures are not cached. */ export declare class CwdLookupMemo { #private; private readonly lookup; constructor(lookup: (cwd: string) => Promise); get(cwd: string, signal?: AbortSignal): Promise; clear(): void; } /** Captured result of a completed forge CLI (`gh`/`glab`) invocation. */ export interface ForgeCliResult { exitCode: number; stdout: string; stderr: string; /** True when stdout exceeded the subprocess capture byte cap. */ stdoutTruncated?: boolean; } /** Static description of a forge CLI binary and how to spawn it. */ export interface ForgeCliSpec { bin: string; displayName: string; /** Thrown as a `ToolError` when the binary is not on PATH. */ installMessage: string; env: Record; timeoutMs: number; } /** Env shared by every forge CLI: disables git/ssh credential and editor prompts. */ export declare const FORGE_NON_INTERACTIVE_ENV: Record; /** Run a forge CLI command with bounded capture and a deadline. Does not throw on non-zero exit. */ export declare function runForgeCli(spec: ForgeCliSpec, cwd: string, args: string[], signal: AbortSignal | undefined, trimOutput: boolean): Promise;