# task-011 status: done ## goal Implement DefaultRouterRepository using EventReplayer to rebuild RouterState from the event store for a given session. ## target artifact core/router/src/main/kotlin/com/correx/core/router/RouterRepository.kt ## execution steps - Create `RouterRepository.kt` containing: - `interface RouterRepository` with `fun getRouterState(sessionId: SessionId): RouterState` - `class DefaultRouterRepository(private val replayer: EventReplayer) : RouterRepository` - `getRouterState` delegates to `replayer.rebuild(sessionId)` - No suspension needed — `EventReplayer.rebuild()` is non-suspend and operates purely in-memory from `EventStore.read()` - Follow the exact same pattern as `DefaultToolRepository` in `core:tools` ## changed artifacts - `core/router/src/main/kotlin/com/correx/core/router/RouterRepository.kt` (new) ## blockers - None ## notes - Epic-14 spec proposes `suspend fun getRouterState(...)`, but `EventReplayer.rebuild()` is non-suspend (reads from EventStore in-memory). Following the `DefaultToolRepository` precedent (which mirrors this same pattern). - Path in epic-14 mentions `state/` subdirectory but the task artifact and actual codebase structure place files directly in `core/router/`.