Files
Codeman/src/web/ports/event-port.ts
T
arkonandClaude Opus 4.6 67d0b0b538 feat: add tunnel status indicator with control panel in header
Green pulsing dot in the desktop header shows when Cloudflare tunnel is active.
Clicking opens a dropdown panel with tunnel URL, remote client count, auth
sessions, and start/stop/QR/revoke controls. Detects tunnel clients via
Cf-Connecting-Ip header to exclude local connections from the count.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:06:15 +01:00

16 lines
595 B
TypeScript

/**
* @fileoverview Event port — capabilities for broadcasting events to SSE clients.
* Route modules that need to notify the frontend depend on this port.
*/
import type { BackgroundTask } from '../../session.js';
export interface EventPort {
broadcast(event: string, data: unknown): void;
sendPushNotifications(event: string, data: Record<string, unknown>): void;
batchTerminalData(sessionId: string, data: string): void;
broadcastSessionStateDebounced(sessionId: string): void;
batchTaskUpdate(sessionId: string, task: BackgroundTask): void;
getSseClientCount(): number;
}