import type pino from "pino"; import type { SessionInboundMessage, SessionOutboundMessage } from "../server/messages.js"; import { type TerminalStreamFrame } from "@getpaseo/protocol/binary-frames/index"; import type { TerminalManager } from "./terminal-manager.js"; export interface TerminalSessionControllerOptions { terminalManager: TerminalManager | null; emit: (msg: SessionOutboundMessage) => void; emitBinary: (frame: Uint8Array) => void; hasBinaryChannel: () => boolean; isPathWithinRoot: (rootPath: string, candidatePath: string) => boolean; sessionLogger: pino.Logger; listTerminalWorkspaceRefs?: () => Promise; listTerminalWorkspaceRoots?: () => Promise; clientSupportsWrapReflow?: () => boolean; getClientBufferedAmount?: () => number | null; } interface TerminalWorkspaceRef { workspaceId: string; cwd: string; } export interface TerminalSessionControllerMetrics { directorySubscriptionCount: number; streamSubscriptionCount: number; } export declare class TerminalSessionController { private readonly terminalManager; private readonly emit; private readonly emitBinary; private readonly hasBinaryChannel; private readonly isPathWithinRoot; private readonly sessionLogger; private readonly listTerminalWorkspaceRefs; private readonly listTerminalWorkspaceRoots; private readonly clientSupportsWrapReflow; private readonly getClientBufferedAmount; private readonly terminalSizeOwner; private readonly subscribedDirectories; private unsubscribeTerminalsChanged; private readonly exitSubscriptions; private readonly activeStreams; private readonly idToSlot; private nextSlot; constructor(options: TerminalSessionControllerOptions); start(): void; getMetrics(): TerminalSessionControllerMetrics; dispatch(msg: SessionInboundMessage): Promise | undefined; handleBinaryFrame(frame: TerminalStreamFrame): void; killTerminalForClose(terminalId: string): { terminalId: string; success: boolean; }; killTerminalsForWorkspace(workspaceId: string): Promise; dispose(): void; private ensureExitSubscription; private handleTerminalExited; private emitTerminalsChangedSnapshot; private toTerminalInfo; private handleTerminalsChanged; private handleSubscribeTerminalsRequest; private handleUnsubscribeTerminalsRequest; private emitTerminalsSnapshotForSubscription; private handleListTerminalsRequest; private getAllTerminalSessions; private getTerminalsForWorkspaceRoot; private terminalBelongsToRoot; private resolveTerminalOwnerRoot; private isSamePath; private handleCreateTerminalRequest; private resolveLegacyTerminalWorkspaceId; private handleRenameTerminalRequest; private handleSubscribeTerminalRequest; private handleUnsubscribeTerminalRequest; private handleTerminalInput; private killTracked; private handleKillTerminalRequest; private handleCaptureTerminalRequest; private bindActiveStream; private trySendSnapshot; private emitLegacySnapshot; private emitRestoreSnapshot; private replayTerminalOutputAfterSnapshot; private allocateSlot; private detachStream; } export {}; //# sourceMappingURL=terminal-session-controller.d.ts.map