import { WebSocket } from 'ws';
export interface AgentSession {
    ws: WebSocket;
    agentId: string;
    name: string;
    hostname: string;
    workDir: string;
    version: string;
    sessionId: string;
    sessionKey: Uint8Array | null;
    connectedAt: Date;
    isAlive: boolean;
    passwordHash: string | null;
    passwordSalt: string | null;
    entra: boolean;
}
export interface WebClient {
    ws: WebSocket;
    clientId: string;
    sessionId: string;
    sessionKey: Uint8Array | null;
    connectedAt: Date;
    isAlive: boolean;
}
export declare class SessionManager {
    readonly agents: Map<string, AgentSession>;
    readonly sessionToAgent: Map<string, string>;
    readonly webClients: Map<string, WebClient>;
    generateSessionId(): string;
    registerAgent(agentId: string, agent: AgentSession): void;
    removeAgent(agentId: string): void;
    getAgent(agentId: string): AgentSession | undefined;
    getAgentBySession(sessionId: string): AgentSession | undefined;
    registerClient(clientId: string, client: WebClient): void;
    removeClient(clientId: string): void;
    getClient(clientId: string): WebClient | undefined;
    getClientsForSession(sessionId: string): WebClient[];
    cleanupDeadConnections(notifyFn: (client: WebClient, msg: {
        type: string;
    }) => void): {
        removedAgents: string[];
        removedClients: string[];
    };
}
export declare const sessions: SessionManager;
