Expand description
byob’s memory: the bundled memory plugin’s backend, in-process. Memory is plain Markdown
the user can read and edit in any editor:
<config>/memory.md: notes for every chat (byob’s config folder);<workspace>/.byob/memory.md: notes for one workspace.
Each - line is one note; anything else in the files (headings, prose) is kept as it is.
A before_prompt hook puts the start of both files (PROMPT_CAP bytes each) into the
system prompt, remember(text, scope?) adds a note and forget(text, scope?) removes one
(by its text, a unique part of it, or its number), and a pane shows and edits both.
The plugin’s manifest (crates/bundled/plugins/memory) names it with "backend": {"native": "memory"}; the app registers factory under ID.
Structs§
Enums§
- Scope
- Which file.
Constants§
- ID
- The id manifests name (
"backend": {"native": "memory"}). - MAX_
FILE - Largest memory file
rememberstill adds to. - MAX_
NOTE_ CHARS - Longest note (characters).
- PROMPT_
CAP - Most bytes of each file that go into the system prompt.
- TOOLS
- The tools it serves, in the manifest’s order.
- VIEW
- The pane it draws.
- WORKSPACE_
FILE - The workspace file, relative to the workspace.
Functions§
- factory
- Makes a fresh backend (registered as
ID);configis byob’s config folder. - forget
- Remove a note:
queryis its text, a unique part of it, or its number (3,#3) in the file ofscope. Without a scope both files are searched. - pane
- The pane: both files, their notes with Forget buttons, a field to add one.
- prompt
- The system-prompt section.
- remember
- Add note
textto the file ofscope.