8 months ago
385dea4Split the session monolith into focused modules and keep AgentSession as a composition root/facade. - Move AgentSession to src/server/session/AgentSession.ts - Introduce shared SessionContext and SessionRuntimeState types - Promote HistoryManager, McpManager, and TurnExecutionManager from pass-through wrappers - Extract SkillManager, SessionMetadataManager, SessionBackupController, and SessionAdminManager - Keep websocket protocol/handlers unchanged (startServer only updates AgentSession import path) - Add targeted manager seam tests in test/session.managers.test.ts Validated with: - bun test test/session.managers.test.ts test/session.test.ts test/session.stream-pipeline.test.ts test/server.test.ts test/server.toolstream.test.ts Co-authored-by: Codex <noreply@openai.com>
Parent9c7f4d7