Exact native Mongo Agent publication adapter; public HMS stays read-only.
NativeMongoAgentWriter
NativeMongoAgentWriter(store: Any, domain: Any, journal: Any, scope: MemoryScope)
Private journal-bound WRITE and selected FLUSH over one owned pair.
Source code in src/symfonic/capabilities/memory/mongo_native_agent_writer.py
| def __init__(self, store: Any, domain: Any, journal: Any, scope: MemoryScope) -> None:
from symfonic.memory.backends.mongo_native_read import _owned_pair
from symfonic.memory.backends.mongo_operation_journal import MongoOperationJournal
if (
type(journal) is not MongoOperationJournal
or type(scope) is not MemoryScope
or scope.identity_version != 1
or store._graph is not domain.graph
or store._vectors is not domain.vector
or store._recall is None
or _owned_pair(store._graph, store._vectors) is not domain
or domain._receipt_database != journal._database
):
raise ConfigurationError("native Mongo Agent writer requires exact pair")
self.store, self.domain, self.journal, self.scope = store, domain, journal, scope
|