import { type CommandIsolation } from './command-isolation.js'; export declare const DEFAULT_COMMAND_TIMEOUT_MS: number; export declare const MAX_COMMAND_TIMEOUT_MS: number; export type CommandStatus = 'running' | 'success' | 'failed' | 'cancelled' | 'timed_out' | 'interrupted'; export interface CommandResult { id: string; command: string; cwd: string; status: CommandStatus; exitCode: number | null; createdAtMs: number; durationMs: number; timedOut: boolean; stdout: string; stderr: string; aggregatedOutput: string; totalOutputBytes: number; captureTruncated: boolean; logPath: string; logTruncated: boolean; startRevision?: string; endRevision?: string; isolation?: 'host' | 'docker'; containerName?: string; } export declare function commandTimeout(raw: unknown, ceiling?: number): number; /** Foreground and background tools share ownership, cancellation, output and durable receipts. */ export declare class CommandRegistry { private readonly root; private readonly prunedAt; private readonly running; constructor(root?: string); private directory; private persist; private receipts; start(input: { owner: string; command: string; cwd: string; env: NodeJS.ProcessEnv; timeoutMs: number; workspace?: string; isolation?: CommandIsolation; maxOutputChars?: number; signal?: AbortSignal; snapshot?: boolean; onOutput?: (stream: 'stdout' | 'stderr', delta: string) => void; }): Promise; get(owner: string, id: string): CommandResult | undefined; wait(owner: string, id: string, waitMs?: number, signal?: AbortSignal): Promise; cancel(owner: string, id: string): Promise; write(owner: string, id: string, chars: string, end?: boolean): boolean; shutdown(): void; private prune; list(owner: string): CommandResult[]; } export declare function commandRegistry(): CommandRegistry;