import { type CursorAgentExecutableDeps } from "./executable.ts";
import { type CursorCliArgsInput } from "./spawn-args.ts";
import { type CursorCliStreamEvent } from "./stream-parser.ts";
export declare const MAX_CURSOR_CLI_PROMPT_BYTES = 130000;
export declare const CURSOR_CLI_ABORT_GRACE_MS = 5000;
export declare class CursorCliPromptTooLargeError extends Error {
    readonly kind = "context_overflow";
    readonly limitBytes: number;
    readonly actualBytes: number;
    constructor(actualBytes: number, limitBytes?: number);
}
export declare class CursorCliAbortError extends Error {
    readonly type = "aborted";
    readonly kind = "aborted";
    constructor();
}
export type CursorCliTransportEvent = CursorCliStreamEvent | CursorCliAbortError;
export type CursorCliTransportCompletedOutcome = {
    readonly type: "completed";
    readonly exitCode: number | null;
    readonly signal: NodeJS.Signals | null;
    readonly stderr: string;
};
export type CursorCliTransportAbortedOutcome = {
    readonly type: "aborted";
    readonly error: CursorCliAbortError;
};
export type CursorCliTransportOutcome = CursorCliTransportCompletedOutcome | CursorCliTransportAbortedOutcome;
export type CursorCliTransportInput = CursorCliArgsInput & {
    readonly accountHome: string;
    readonly cwd: string;
    readonly signal?: AbortSignal;
    readonly executableDeps?: CursorAgentExecutableDeps;
};
export type CursorCliTransportHandle = {
    readonly pid: number;
    readonly events: AsyncIterable<CursorCliTransportEvent>;
    readonly completed: Promise<CursorCliTransportOutcome>;
    abort(): void;
};
/** Spawn one cursor-agent print-mode invocation with strict environment and process-group ownership. */
export declare function spawnCursorCli(input: CursorCliTransportInput): CursorCliTransportHandle;
//# sourceMappingURL=transport.d.ts.map