mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 00:49:41 +02:00
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>
18 lines
898 B
TypeScript
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;
|
|
}
|