/**
 * Session Utilities
 *
 * Shared utilities for tmux session naming, parsing, and discovery.
 * Used by session/list.ts, session/attach.ts, session/health.ts, and session/peek.ts commands.
 */
/**
 * Capture the last N lines from a tmux pane.
 * Supports both host tmux sessions and container tmux sessions (via docker exec).
 *
 * @param sessionId - The tmux session ID to capture from
 * @param lines - Number of scrollback lines to capture
 * @param containerId - Optional container ID for container-based sessions
 * @returns The captured pane content, or null if capture fails
 */
export declare function captureTmuxPane(sessionId: string, lines: number, containerId?: string): string | null;
/**
 * Known action names used in session naming.
 * These are the actions defined in pmo/actions/ that may be used when spawning agents.
 */
export declare const KNOWN_ACTIONS: readonly ["Implement", "Review", "Fix", "Refactor", "Test", "Document", "work"];
/**
 * Parse a tmux session name following prlt naming convention.
 * Format: {ticketId}-{action}-{agentName}
 *
 * Note: Agent names can contain hyphens (like "stout-page"), so we match
 * from the end using known action names to correctly split the components.
 *
 * Example: "TKT-878-Implement-stout-page" -> { ticketId: "TKT-878", action: "Implement", agentName: "stout-page" }
 */
export declare function parseSessionName(sessionName: string): {
    ticketId: string;
    action: string;
    agentName: string;
} | null;
/**
 * Build expected session name from execution data.
 * Format: {ticketId}-{action}-{agentName}
 * This is the same format used by runners.ts buildSessionName()
 */
export declare function buildExpectedSessionName(ticketId: string, agentName: string, action?: string): string;
/**
 * Check if a session name matches the expected pattern for a ticket and agent.
 * Parses the session name and verifies the ticket ID and agent name match exactly.
 */
export declare function sessionMatchesExecution(sessionName: string, ticketId: string, agentName: string): boolean;
/**
 * Get list of host tmux session names.
 */
export declare function getHostTmuxSessionNames(): string[];
/**
 * Get map of containerId -> tmux session names.
 * Only checks containers with the devcontainer.local_folder label.
 */
export declare function getContainerTmuxSessionMap(): Map<string, string[]>;
/**
 * Flatten container sessions map into an array for easier iteration.
 */
export declare function flattenContainerSessions(containerTmuxSessions: Map<string, string[]>): Array<{
    sessionName: string;
    containerId: string;
}>;
/**
 * Find container sessions using prefix matching.
 * Handles short vs full container ID mismatches between DB records and docker output.
 */
export declare function findContainerSessionsByPrefix(containerTmuxSessions: Map<string, string[]>, containerId: string): string[];
/**
 * Try to find a matching tmux session for an execution with NULL sessionId.
 * First tries exact matches with known action names, then falls back to
 * partial matching with agent name verification.
 *
 * @returns The matched session name, or null if no match found
 */
export declare function findSessionForExecution(ticketId: string, agentName: string, availableSessions: string[]): string | null;
