Files
Codeman/src/web/ports/respawn-port.ts
T
arkonandClaude Opus 4.6 e05d507254 refactor: extract server.ts routes into domain modules (phase 3)
Split 6,710-line server.ts into focused route modules using port
interfaces for dependency injection. 107/109 routes extracted into
12 domain files with auth middleware, 5 port interfaces, and shared
helpers. Server.ts retains orchestration (SSE, lifecycle, state).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:12:45 +01:00

18 lines
898 B
TypeScript

/**
* @fileoverview Respawn port — capabilities for respawn controller management.
* Route modules that control respawn cycling depend on this port.
*/
import type { Session } from '../../session.js';
import type { RespawnController, RespawnConfig } from '../../respawn-controller.js';
import type { PersistedRespawnConfig } from '../../types.js';
export interface RespawnPort {
readonly respawnControllers: Map<string, RespawnController>;
readonly respawnTimers: Map<string, { timer: NodeJS.Timeout; endAt: number; startedAt: number }>;
setupRespawnListeners(sessionId: string, controller: RespawnController): void;
setupTimedRespawn(sessionId: string, durationMinutes: number): void;
restoreRespawnController(session: Session, config: PersistedRespawnConfig, source: string): void;
saveRespawnConfig(sessionId: string, config: RespawnConfig, durationMinutes?: number): void;
}