import { type ShellConfig } from "../../utils/shell.ts"; import type { TaskId, WaitOutcome, WaitPolicy } from "../tasks/contracts.js"; import type { OwnerLease, TaskLease, TaskSupervisor, WaitLease } from "../tasks/supervisor.js"; import { type OutputAccumulatorOptions } from "./output-accumulator.ts"; export declare function resetNativePtyBindingCache(): void; export interface SupervisedCommandOwner { supervisor: TaskSupervisor; owner: OwnerLease; waitForTask?: (taskId: TaskId, budgetMs?: number, onRegistered?: (wait: WaitLease) => void) => ReturnType; /** Narrow a shared owner to the tasks this binding launched. */ ownsTask?: (taskId: TaskId) => boolean; onCommandStarted?: (taskId: TaskId) => void; } export declare function lookupOwnedTask(context: SupervisedCommandOwner, id: string): TaskLease; export interface SupervisedCommandResult { exitCode: number | null; observation?: WaitOutcome; } export declare function waitForSupervisedCommand(context: SupervisedCommandOwner | undefined, id: string, budgetMs?: number, signal?: AbortSignal, outputOptions?: OutputAccumulatorOptions): Promise<{ content: { type: "text"; text: string; }[]; details: { observation: WaitOutcome; exitCode?: number | undefined; truncation?: import("./truncate.ts").TruncationResult | undefined; fullOutputPath?: string | undefined; }; }>; export declare function validateBashWait(wait: WaitPolicy | undefined, ownerSupported?: boolean): void; export declare function executeSupervisedCommand(command: string, cwd: string, options: NativePtyExecOptions, pty: boolean): Promise; export interface NativePtyExecOptions { onData: (data: Buffer) => void; signal?: AbortSignal; timeout?: number; wait?: WaitPolicy; env?: NodeJS.ProcessEnv; shellPath?: string; shellConfig?: ShellConfig; commandDescription?: string; cols?: number; rows?: number; taskOwner?: SupervisedCommandOwner; } export declare function executeNativePty(command: string, cwd: string, options: NativePtyExecOptions): Promise; //# sourceMappingURL=bash-pty-native.d.ts.map