/** * WebSocket Server for aurasecurity * * Provides real-time updates to connected clients: * - Audit started/completed events * - Finding notifications * - Settings changes * - Server status updates */ export interface WSMessage { type: 'audit_started' | 'audit_completed' | 'finding' | 'settings_changed' | 'status' | 'ping' | 'pong'; payload: unknown; timestamp: string; } export interface AuditStartedPayload { auditId: string; type: string; target: string; } export interface AuditCompletedPayload { auditId: string; type: string; target: string; summary: { critical: number; high: number; medium: number; low: number; }; duration?: number; } export interface FindingPayload { auditId: string; severity: 'critical' | 'high' | 'medium' | 'low'; type: string; message: string; file?: string; line?: number; } export declare class AuditorWebSocket { private port; private wss; private clients; private pingInterval; constructor(port?: number); /** * Start the WebSocket server */ start(): Promise; /** * Stop the WebSocket server */ stop(): Promise; /** * Handle incoming messages from clients */ private handleMessage; /** * Send message to a specific client */ private sendTo; /** * Broadcast message to all connected clients */ broadcast(message: WSMessage): void; /** * Notify clients that an audit has started */ notifyAuditStarted(payload: AuditStartedPayload): void; /** * Notify clients that an audit has completed */ notifyAuditCompleted(payload: AuditCompletedPayload): void; /** * Notify clients of a finding during an audit */ notifyFinding(payload: FindingPayload): void; /** * Notify clients that settings have changed */ notifySettingsChanged(section?: string): void; /** * Get the number of connected clients */ getClientCount(): number; } export declare function getWebSocketServer(port?: number): AuditorWebSocket; export declare function closeWebSocketServer(): Promise;