debt(pre-router): resolved most of the technical debt that was noted while finishing epic-12 and epic-13.

This commit is contained in:
2026-05-16 14:55:45 +04:00
parent 2207a37549
commit f77efce10b
10 changed files with 107 additions and 43 deletions
@@ -3,6 +3,7 @@ package com.correx.core.events.stores
import com.correx.core.events.events.NewEvent
import com.correx.core.events.events.StoredEvent
import com.correx.core.events.types.SessionId
import kotlinx.coroutines.flow.Flow
interface EventStore {
@@ -34,4 +35,10 @@ interface EventStore {
* Get last sequence number for session.
*/
fun lastSequence(sessionId: SessionId): Long?
/**
* Subscribe to live events for a session. Emits each event as it is appended.
* Does not replay historical events — use [readFrom] for catch-up before subscribing.
*/
fun subscribe(sessionId: SessionId): Flow<StoredEvent>
}