Files
agentik/storage-inmemory
subochev d74af621d8
ci / JVM build + tests (push) Successful in 6m13s
refactor(storage): drop StorageBundle + legacy EventStore, add HttpEventStore
- Remove legacy pw.binom.agentik.messageStore.events.EventStore (EventRecord,
  EventType) and all three impls (in-memory, sqlite, ksqlite) + tests + .sq
- Drop :storage-bundle module entirely; ChatAgent / ChatConversation /
  ConversationLoop / DebugRoutes now take stores individually
  (conversationStore, messageStore, workingMemoryStore, reflectionStore,
  eventStore) instead of StorageBundle
- Delete server endpoints /events/replay and /conversations/{id}/events/replay;
  Route.agentikAgent no longer takes eventStore param
- Add :client/HttpEventStore implementing :event-store/EventStore over HTTP:
  events() -> GET /events/all, agentEvents() -> GET /events,
  conversationEvents(convId) -> GET /conversations/{id}/events;
  exposed via AgentClient.eventStore
- :event-store: add macosX64/macosArm64/linuxArm64 targets to match :client KMP
- :working-memory-api: drop api dep on :message-store-api (no longer needed)
- :storage-{inmemory,sqlite,ksqlite}: drop deps on :storage-bundle
2026-09-20 18:06:46 +03:00
..

:storage-inmemory — in-memory реализация :storage-core (KMP, jvm + native)

Что это

In-memory реализация MessageStore / WorkingMemoryStore / ConversationStore / ReflectionStore. Все структуры держит в ConcurrentHashMap + MutableList, фолотится на RAM (никаких файлов).

Решает: дешёвая тестовая среда без поднятия SQLite. Позволяет прогонять ChatAgentTest за миллисекунды и держать сценарии детерминированными.

Где используется

  • В тестах :standalone (AbstractITTest).
  • В Android-имплементации (in-memory + Android-database микс).
  • В любых юнит-тестах на агенте.

Как подключить

commonMain.dependencies {
    api("pw.binom.agentik:storage-inmemory:0.1.0")
    api("pw.binom.agentik:storage-core:0.1.0")
}

val storage = InMemoryStorageSystem()
val messages: MessageStore = storage.messages
val working: WorkingMemoryStore = storage.working

Версии

gradle/libs.versions.toml → [versions] agentik-storage-inmemory.

Тесты

./gradlew :storage-inmemory:allTests

Покрывают (через общие contract-tests): round-trip, paged flow, concurrent appends, working-memory replay, очистку.

Чего здесь НЕТ

  • Никакого persistence. Перезапуск процесса — данные пропали. Это нормально для тестов и Android in-memory.

Текущий статус

Используется продакшеном (в режиме тестов). Контракт-совместима с :storage-sqlite 1:1 — переключение AGENTIK_STORAGE_BACKEND=memory в :standalone.