/**
 * Terminal manager service.
 *
 * Manages PTY processes using node-pty. Tracks active terminals,
 * handles creation, stdin, resize, kill, and emits stdout/exit events.
 */
import * as pty from "node-pty";
import type { Message } from "@pocketcoder/shared";
interface ManagedTerminal {
    id: string;
    pty: pty.IPty;
    projectId: string;
}
/**
 * Set the send function used to emit terminal events to the gateway.
 */
export declare function setTerminalSendFn(fn: (message: Message) => void): void;
/**
 * Create a new terminal PTY process for a project.
 */
export declare function createTerminal(projectId: string, projectPath: string, cols?: number, rows?: number): string;
/**
 * Write data to a terminal's stdin.
 */
export declare function writeTerminal(terminalId: string, data: string): void;
/**
 * Resize a terminal.
 */
export declare function resizeTerminal(terminalId: string, cols: number, rows: number): void;
/**
 * Kill a terminal.
 */
export declare function killTerminal(terminalId: string): void;
/**
 * Get a terminal by ID, or undefined if not found.
 */
export declare function getTerminal(terminalId: string): ManagedTerminal | undefined;
/**
 * Kill all active terminals. Used during shutdown.
 */
export declare function killAllTerminals(): void;
export {};
//# sourceMappingURL=terminal-manager.d.ts.map