refactor: migrate EventStore and MessageStore to :outbox-api and :journal-api
ci / JVM build + tests (push) Failing after 1m9s
ci / JVM build + tests (push) Failing after 1m9s
- Replaced usages of `:message-store-api` and `:working-memory-api` with `:journal-api`, `:outbox-api`, and `:context-api`. - Deprecated legacy `EventStore` and `MessageStore` interfaces, added `typealias` for backward compatibility. - Updated imports across all modules with references to `:journal-api` and `:outbox-api`. - Introduced `journalRoutes` and `outboxRoutes` in `:server` for audit log and live event stream endpoints. - Adjusted `Agent` to expose read-only `journal` and `outbox` stores for improved modularity and clarity. - Removed legacy Event and AgentEvent definitions from `:proto`, migrated to `:outbox-api`. - Storage-related modules have been updated to support the new APIs consistently.
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@ package pw.binom.agentik.storage.inmemory
|
||||
import pw.binom.agentik.messageLog.MutableMessageStore
|
||||
import pw.binom.agentik.messageStore.ConversationStore
|
||||
import pw.binom.agentik.messageStore.ReflectionStore
|
||||
import pw.binom.agentik.workingMemory.WorkingMemoryStore
|
||||
import pw.binom.agentik.context.ContextStore
|
||||
import kotlin.time.Clock
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ object InMemoryStorage {
|
||||
data class Bundle(
|
||||
val conversationStore: ConversationStore,
|
||||
val messageStore: MutableMessageStore,
|
||||
val workingMemoryStore: WorkingMemoryStore,
|
||||
val workingMemoryStore: ContextStore,
|
||||
val reflectionStore: ReflectionStore,
|
||||
)
|
||||
|
||||
|
||||
+4
-4
@@ -3,9 +3,9 @@ package pw.binom.agentik.storage.inmemory
|
||||
import kotlinx.coroutines.sync.Mutex
|
||||
import kotlinx.coroutines.sync.withLock
|
||||
import pw.binom.agentik.messageStore.Ids
|
||||
import pw.binom.agentik.workingMemory.WorkingMemoryEntry
|
||||
import pw.binom.agentik.workingMemory.WorkingMemoryRow
|
||||
import pw.binom.agentik.workingMemory.WorkingMemoryStore
|
||||
import pw.binom.agentik.context.WorkingMemoryEntry
|
||||
import pw.binom.agentik.context.WorkingMemoryRow
|
||||
import pw.binom.agentik.context.ContextStore
|
||||
import kotlin.time.Instant
|
||||
|
||||
/**
|
||||
@@ -17,7 +17,7 @@ import kotlin.time.Instant
|
||||
*
|
||||
* Семантика 1:1 с SQLite-имплом (см. `:storage-sqlite` после commit 3).
|
||||
*/
|
||||
class InMemoryWorkingMemoryStore : WorkingMemoryStore {
|
||||
class InMemoryWorkingMemoryStore : ContextStore {
|
||||
|
||||
private val byConv: MutableMap<String, MutableList<WorkingMemoryRow>> = mutableMapOf()
|
||||
private val mutex = Mutex()
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package pw.binom.agentik.storage.inmemory
|
||||
|
||||
import pw.binom.agentik.messageLog.Content
|
||||
import pw.binom.agentik.messageLog.MessageRecord
|
||||
import pw.binom.agentik.journal.Content
|
||||
import pw.binom.agentik.journal.MessageRecord
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertNull
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package pw.binom.agentik.storage.inmemory
|
||||
|
||||
import pw.binom.agentik.messageLog.Content
|
||||
import pw.binom.agentik.workingMemory.WorkingMemoryEntry
|
||||
import pw.binom.agentik.journal.Content
|
||||
import pw.binom.agentik.context.WorkingMemoryEntry
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertNull
|
||||
|
||||
Reference in New Issue
Block a user