import type { ManagedSession, PTYManagerOptions, SessionRunner, StartFreshSessionOptions, StartSessionOptions, UserMessage } from "./types"; /** * Cursor CLI (`agent`) PTY runner. * * Spawn/resume flags come from the published CLI: `--workspace`, `--trust` * (headless, skip the workspace-trust prompt), `--resume=`, positional * opening prompt. TUI detection is deliberately generic: we have no verified * Ready/gate scrape, so boot settles on quiet or the 8s fallback, and a turn * returns to waiting_input after submit-stale silence. * * Input clears the compose line (`Ctrl+U`) before writing text — Cursor leaves * the previous prompt editable, and a bare write would concatenate turns. */ export declare class CursorPtyRunner implements SessionRunner { private sessions; private onOutput; private onStatusChange; private onReady; private onUserMessage; private log; private pendingReady; private queuedInputs; private quietCheckers; private readyFallbackTimers; private submitWatchTimers; private lastChunkAt; private startPromises; constructor(options?: PTYManagerOptions); start(sessionId: string, options: StartSessionOptions): Promise; private doStart; startFresh(options: StartFreshSessionOptions): Promise; private baseArgs; private launch; private armReadyFallback; private tryReadyFallback; sendKeys(sessionId: string, keys: string): void; sendRawKeys(sessionId: string, keys: string): void; sendInput(sessionId: string, input: string): number; private writeSubmit; private armSubmitWatch; private flushQueuedInputs; resize(sessionId: string, cols: number, rows: number): void; cancel(sessionId: string): void; killPid(pid: number): void; putOnHold(sessionId: string, signal?: NodeJS.Signals): void; getOutput(sessionId: string): string; getOutputLines(sessionId: string, maxLines: number): Promise; getInputHistory(sessionId: string): UserMessage[]; getPid(sessionId: string): number | null; private recordUserMessage; getSession(sessionId: string): ManagedSession | null; hasSession(sessionId: string): boolean; listSessions(): ManagedSession[]; dispose(): void; private handleOutput; private detectQuiet; private markReady; private handleExit; private clearSessionDetectors; } //# sourceMappingURL=cursor-pty-runner.d.ts.map