What one import run knows: each notes file it has touched, read from disk
once and kept in step with what the run has stored since, in a dry run
too. That is what makes the lines of one run be judged against each
other, and a dry run report what the real run then does.
Host-resolved project identity: the canonical workspace root, digested
into a stable scope key. The HOST constructs this from trusted execution
context — it is never accepted solely from model-authored arguments.
Sensitivity class of a memory record (spec §9.5). Enforcement at the
model-visibility boundary lives in the memory tools: Secret bodies are
never returned to model context.
Append one record. Validates namespace, content size. One line is one
write to a file opened for append, and the file is synced before this
returns (see append_jsonl_line).
Fetch exact record ids within a project scope. EVERY id must resolve in
this scope or the whole call fails closed with MemoryError::NotFound
— other projects’ ids are indistinguishable from unknown ids.
Tombstone one record in a project scope (append-only forget). Fails
closed with MemoryError::NotFound for unknown, already-tombstoned,
or other-project ids.
Import one JSONL line of another store’s notes into the plain-file store
under base: a note (a MemoryRecord line) or a tombstone line
({"tombstone":"<id>","timestamp_ms":…}).
Open (creating it, mode 0600, never through a symlink) a lock file. Read
and write access: Windows locks only a handle that has one of them.
The folder is not created. Public for synaps memory import-notes, whose
one lock for a whole run is opened as a notes file’s lock is.
The notes file of the project with this key under base: where a save,
a forget and an import of that project’s notes write. Only the path:
nothing is created, and the key is not checked.