/** * Gets the stream ID for a channel, if one exists. * @param channelName - The channel name to look up. * @returns The stream ID if found, undefined otherwise. */ export declare function getChannelStreamId(channelName: string): number | undefined; /** * Associates a channel name with a stream ID. * @param channelName - The channel name. * @param streamId - The stream ID to associate. */ export declare function setChannelStreamId(channelName: string, streamId: number): void; /** * Removes the channel-to-stream mapping for a channel. * @param channelName - The channel name to remove. */ export declare function deleteChannelStreamId(channelName: string): void; /** * Checks if termination has been initiated for a stream. * @param streamId - The stream ID to check. * @returns True if termination has been initiated, false otherwise. */ export declare function isTerminationInitiated(streamId: number): boolean; /** * Terminates a stream, cleaning up all resources. This is the authoritative termination function that all code paths should use for consistent cleanup. * * Note: This function does NOT call emitCurrentSystemStatus() to avoid circular dependencies with the browser module. Callers should call emitCurrentSystemStatus() * after termination if they need to update the SSE system status. * @param streamId - The numeric stream ID. * @param channelName - The channel name for channel mapping cleanup. * @param reason - The reason for termination (e.g., "idle timeout", "circuit breaker"). */ export declare function terminateStream(streamId: number, channelName: string, reason: string): void;