Update test framework: fix run_tests.py to support all test files, add auto-import-check for test files

This commit is contained in:
qiaoxinjiu
2026-05-09 15:11:30 +08:00
parent eb053a347f
commit eaba8328da
21739 changed files with 2236758 additions and 719 deletions

View File

@@ -0,0 +1,46 @@
import { SSEServerConfig, SSEEvent } from './types';
/**
* Server-Sent Events Server Class
* Handles real-time event streaming to connected clients
*/
export declare class SSEServer {
private config;
private clients;
private server;
private actualPort?;
constructor(config: SSEServerConfig);
/**
* Start the SSE server
* @param config Server configuration
* @returns Promise resolving to the actual port number used
*/
start(config: SSEServerConfig): Promise<number>;
/**
* Broadcast an event to all connected clients
* @param event Event to broadcast
*/
broadcast(event: SSEEvent): void;
/**
* Send an event to a specific client
* @param clientId Target client ID
* @param event Event to send
*/
sendToClient(clientId: string, event: SSEEvent): void;
/**
* Get list of connected client IDs
* @returns Array of client IDs
*/
getConnectedClients(): string[];
/**
* Stop the SSE server and cleanup resources
*/
stop(): Promise<void>;
/**
* Get the actual port the server is running on
*/
getPort(): number | undefined;
/**
* Get connected clients count
*/
getClientCount(): number;
}