Documentation
¶
Overview ¶
Package memory is dax-memory, the extension that gives the model a memory between sessions: a store with the user's scope and one for each project, the workspace the tools act in, the memory tools, and the memory block in the system prompt. It is built only from what package extension offers any extension, and dax's private-directory check.
Index ¶
Constants ¶
const Name = "dax-memory"
Name is the extension's name, and so its rules' source: extension:dax-memory.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New is dax-memory over the store in dir, which is made private (0700) when the session starts, with a warning if it was not. The model reads and writes a user scope and the scope of the project the tools act in (WorkspaceScope). It owns the memory tools and ships one rule: a search runs unasked, while a save, a patch and a forget ask.
func ProjectScope ¶
func ProjectScope(dir string) agentmemory.Scope
ProjectScope is the memory scope of a working directory. One store holds every project's memory beside the user's, so each project gets a scope of its own, named for its directory and a hash of its path.
func WorkspaceScope ¶ added in v0.0.19
func WorkspaceScope(d workspace.Descriptor, dir string) agentmemory.Scope
WorkspaceScope is the memory scope of the project a session's tools act in, d, for a session started in dir on this machine. It is exported so that a program built on dax that reads the store finds a session's project where dax-memory keeps it.
This machine's workspace (kind local and no ref, which is what workspace.Local says) is ProjectScope(dir), the scope a project had before the workspace decided, so the memory kept then is still the project's. Any other, a container or a host an executor runs on, is named for the base of its root with a hash of its kind, ref and root: two sandboxes started from one directory here are two projects, and one sandbox is one project from wherever dax was started.
Types ¶
This section is empty.