Expand description
memory.* (port of ultron/memory.ts NativeMemoryService and the memory dispatch of worker-services.ts).
These calls are the model’s, made on purpose; the session’s automatic memory (session-core auto_memory) uses
the Rust-only MemoryService::recall_for_turn, MemoryService::retain_session_tail and
MemoryService::project_digest. The journal ({version, namespace, operations}) records every
prepare/propose/correct/forget/get with hashes and references, never memory text; text lives in the backend
(Hindsight). memory.reflect and memory.invalidate (Rust-only) are journaled nowhere. Only propose-created documents can be read, corrected or forgotten. A correction
supersedes the current claim on its document, and the local journal outranks a lagging backend index: recalled
entries of a superseded claim or a forgotten document are withheld (excluded). Interrupted operations are
settled on reopen and remote mutations are never replayed. A failed store write poisons the service.
Structs§
- Memory
Api memory.*as a host module;serviceisNonein a worker without Hindsight.- Memory
Error - A memory error: “Memory operation did not complete (
)”. No raw backend, store or gate error is exposed. The one exception is a journal written in an unsupported format version, which reports that version (TSUnsupportedFormatVersionError) so an older Ultron never overwrites it. - Memory
Service
Enums§
- Error
Code - The codes a
MemoryErrorand a journal record’serrorcarry.
Constants§
- BRIEF_
MAX_ CHARS - BRIEF_
MAX_ LINES - The startup brief’s budget: it opens every context, so it stays short.
- OUTAGE_
PAUSE - OUTAGE_
PAUSE_ AFTER - A memory server’s outage: after this many calls in a row without an answer (or, for automatic recall, too slow
to wait for), calls stop for
OUTAGE_PAUSE, so a server that is down costs a session no timeouts. One threshold for the memorantado client and automatic recall alike (session_core::auto_memory). - TOPIC_
MAX_ CHARS - TOPIC_
MAX_ LINES - A topic page’s budget.
Traits§
- Memory
Backend - A Hindsight-shaped document backend. An
Errwhose text is a memory error code (for example “HTTP_ERROR”) reports that code; any other text is an OPERATION_ERROR.
Functions§
- directory_
identity - A stable, non-reversible id for a directory (
projectIdentityof worker-services.ts). - handle
- Serves one
memory.*request as the session worker does.serviceisNonewhen Hindsight is not configured. - page_
budget - Whether
textfits a page’s budget: the reason when it does not. - staleness
- Why a memory is stale, from the quotes in its Hindsight
metadata(autolith’s check, with no model call): a quoted file underrootthat is gone, or that no longer holds its quote (whitespace aside).Nonewhen every quote still holds, the memory quotes nothing, or a file cannot be read for another reason. - worker_
gate - The worker’s gate: every recall runs; every write is kept unless it holds a secret.
- worker_
scope_ tags - A session’s scope tags, the same for every backend: its own id, its project directory’s identity and the home directory’s identity.
Type Aliases§
- Decide
judge.decide(state, questions, kind)as the session asks it: the verdict’s JSON.- Memory
Gate - Decides whether a recall runs (
{"retrieve", "probability"?}) and whether a write is kept ({"action": "keep" | "skip" | "sensitive", "confidence"?}).