2c459da009
Implements the full conversational router facade: RouterState, RouterReducer, RouterProjector, RouterRepository, RouterContextBuilder, RouterFacade, protocol types, WebSocket wiring, infrastructure factory, and deterministic test suite. Also fixes spec divergences found in post-implementation review: - Add SteeringNote domain object to core:context (epic prerequisite) - Rename RouterFacade.handleChat → onUserInput per spec interface contract - Add in-memory ConcurrentHashMap conversation history to DefaultRouterFacade - Make RouterRepository.getRouterState suspend - Rename RouterConfig.keepLast → conversationKeepLast, fix defaults (6, 4096) - Refactor InfrastructureModule.createRouterFacade to self-assemble internally - Fix FileReadTool: allowedPaths was dead constructor param (@SuppressUnusedParameter); now stored as private val and enforced in validateRequest - Disable koverVerify on modules tested via testing/ submodules or with hardware/integration dependencies (24 modules); build gate now passes clean
1.2 KiB
1.2 KiB
task-015
status:
- done
goal
Add RouterResponseMessage data class (sessionId: SessionId, content: String, steeringEmitted: Boolean) as the egress protocol type for router responses.
target artifact
apps/server/src/main/kotlin/com/correx/apps/server/protocol/ServerMessage.kt
execution steps
- Add a new
@Serializablenested data classRouterResponseMessageinside theServerMessagesealed class inServerMessage.kt, with fields:sessionId: SessionId,content: String,steeringEmitted: Boolean - Ensure
SessionIdis already imported (it is — already present on line 6) - No changes needed to
ProtocolSerializer.kt—encodeServerMessagealready uses polymorphic JSON encoding via theclassDiscriminator = "type"config
changed artifacts
apps/server/src/main/kotlin/com/correx/apps/server/protocol/ServerMessage.kt— addRouterResponseMessagedata class
blockers
- None
notes
- Depends on task-008 (RouterResponse model in core/router) — that task provides the domain type; this task adds the egress protocol message type.
- Non-goals: WebSocket handler logic (task-016), client message types (task-009).
- Follows the same sealed-nested-data-class pattern already used by all other
ServerMessagevariants.