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.6 KiB
1.6 KiB
task-007
status: done
goal
Define RouterConfig as a serializable data class holding conversation keep-last count and token budget parameters.
target artifact
core/router/src/main/kotlin/com/correx/core/router/model/RouterConfig.kt
execution steps
- Add
@Serializableannotation toTokenBudgetincore/context/src/main/kotlin/com/correx/core/context/model/TokenBudget.kt(pre-existing type must be serializable for RouterConfig to compile with@Serializable) - Create
RouterConfig.ktwith@Serializabledata class:keepLast: Int— conversation history keep-last count (default10)tokenBudget: TokenBudget— token budget from:core:context(defaultTokenBudget(limit = 5000))
- Compile
:core:context:compileKotlin— succeeds - Compile
:core:router:compileKotlin— succeeds - Compile dependent modules (
infrastructure,apps:server,apps:cli) — all succeed - Run
:core:router:detekt— clean - Run
:core:context:detekt— clean
changed artifacts
core/context/src/main/kotlin/com/correx/core/context/model/TokenBudget.kt— added@Serializableannotationcore/router/src/main/kotlin/com/correx/core/router/model/RouterConfig.kt— new file
blockers
- None
notes
TokenBudgetwas missing@Serializabledespite being a data class used as a field type. Adding the annotation is a minimal necessary change — it has onlyIntproperties and no custom serialization logic needed.RouterConfigreferencesTokenBudgetfrom:core:contextvia the existing dependency declared incore/router/build.gradle.