/**
 * @fileoverview Respawn event wiring — pure functions that connect RespawnController
 * events to SSE broadcasts, push notifications, and run summary tracking.
 *
 * Extracted from WebServer to keep respawn-specific event plumbing separate from
 * HTTP/session concerns. Follows the same DI pattern as session-listener-wiring.ts.
 */
import { Session } from '../session.js';
import { RespawnController, RespawnConfig } from '../respawn-controller.js';
import type { PersistedRespawnConfig } from '../types.js';
import type { RunSummaryTracker } from '../run-summary.js';
import type { TerminalMultiplexer } from '../mux-interface.js';
import type { TeamWatcher } from '../team-watcher.js';
export interface RespawnWiringDeps {
    broadcast(event: string, data: unknown): void;
    sendPushNotifications(event: string, data: Record<string, unknown>): void;
    persistSessionState(session: Session): void;
    getSession(sessionId: string): Session | undefined;
    sessionExists(sessionId: string): boolean;
    getRunSummaryTracker(sessionId: string): RunSummaryTracker | undefined;
    getRespawnControllers(): Map<string, RespawnController>;
    getRespawnTimers(): Map<string, {
        timer: NodeJS.Timeout;
        endAt: number;
        startedAt: number;
    }>;
    getPendingRespawnStarts(): Map<string, NodeJS.Timeout>;
    teamWatcher: TeamWatcher;
    serverStartTime: number;
    respawnRestoreGracePeriodMs: number;
    mux: TerminalMultiplexer;
}
/**
 * Wire a RespawnController's events to SSE broadcasts, push notifications,
 * and run summary tracking.
 */
export declare function wireRespawnListeners(sessionId: string, controller: RespawnController, deps: RespawnWiringDeps): void;
/**
 * Set up a duration-limited respawn timer that stops respawn after N minutes.
 */
export declare function setupTimedRespawn(sessionId: string, durationMinutes: number, deps: RespawnWiringDeps): void;
/**
 * Restore a RespawnController from persisted configuration.
 * Creates the controller, wires listeners, and starts after a grace period.
 */
export declare function restoreRespawnController(session: Session, config: PersistedRespawnConfig, source: string, deps: RespawnWiringDeps): void;
/**
 * Save respawn config to mux for restart recovery.
 */
export declare function saveRespawnConfig(sessionId: string, config: RespawnConfig, mux: TerminalMultiplexer, durationMinutes?: number): void;
//# sourceMappingURL=respawn-event-wiring.d.ts.map