A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
date: 2026-11-01 issue: 464
Restore a memory change from journal.jsonl
What and why
journal.jsonl (and a private Bot's own log) already keeps every memory change with
the line before and after, but nothing reads it for undo: a wrong remember, replace,
or forget is permanent unless the files are edited by hand. This adds a restore —
memory-restore on the api/bot channel — that applies the inverse of one journal
row, and the Change history page in the memory dialog that lists those rows with an
Undo button each (memory-history).
Shape
memory-historytakes the same owner params asmemory-view({botId}or{roomId}) plus an optionalbeforerow id for paging, and returns{ rows, more }, newest first, 50 rows a page. A Bot's panel reads its own scope and the team's — the shared log, or the Bot's own log when it is private (journalForresolves both) — a group's panel reads its group scope. Each row carries{ id, time, op, scope, text, by, restored };restoredmarks rows some later row already undid.archiverows are skipped.memory-restoretakes the same owner params plusid, the journal row to undo. A row outside the owner's scopes, or one already restored, is refused. On success it returns the fresh memory view, asmemory-forgetdoes.- The dialog's ⋯ menu gets "Change history" after "All entries": a page with a
back button, one row per change (the change line,
time · by, and Undo or a muted Undone), a Load more button whilemoreis set. - One row is undone with its inverse op, and only while what it reads still reads
as the row left it:
add→ the recordedafterline is taken back out, verbatim. A topic left with only its title is removed, and its## Indexlink with it — the same cleanup a forget does.remove→ thebeforeline is put back where a new entry would go (the original position is not in the row). A topic the remove took away is made again with its link; a line already back is not duplicated.replace→ the line that still readsafteris put back tobefore.
- Drift is a
NO_MATCHfailure, not a silent delete: the entry changed since, it is already back, or the line is there more than once. - Restored content goes through
checkSizelike any other change. archiverows move whole folders and are not undone this way; any other row that is not a well-formed add/remove/replace is refused.- A restore is itself a change: it is queued on the writer's line, published
through
publishlike the rest — pending record first, files, then its own journal row. The row is the inverse op carryingrestored: <id>of the row it undid, so a restore can itself be restored. - Writes the user may do are what may be restored:
writable(scope, user)— the deleted-Bot, deleted-group, and read-only guards all apply.
Deliberately out of scope
- No version tree, no git, no multi-step undo. One row, one inverse.
- The history page lists and undoes single changes only; multi-step undo stays out.
archiveis a different, folder-level path and stays irreversible here.