Skip to content

v0.4.1 — scenes and personas as append-only versions; newer data is refused

Choose a tag to compare

@github-actions github-actions released this 23 Oct 02:41
· 19 commits to main since this release
Immutable release. Only release title and notes can be modified.
15c3141

Before you upgrade

Warning

Going back to 0.4.0 after this upgrade means restoring the backup. Scenes and personas move to new tables at startup, which 0.4.0 does not read. If 0.4.0 runs on the upgraded data:

  • it shows the scenes and persona from before the upgrade;
  • what it writes is not carried over by a later upgrade.

upgrade.sh takes the backup; UPGRADE → Roll back restores it.

git fetch --tags && git checkout v0.4.1
./upgrade.sh

Schema migration 3 runs when memory-core starts:

  • every version in profile_files is copied into scenes, scene_versions and persona_versions;
  • profile_files is kept, but no longer written;
  • clients see the same scenes and persona, and the API paths are unchanged.

Then update amem on each client (REMOTE-CLIENTS §4).

Details: UPGRADE → To 0.4.1.

What's new

Scenes (L2) and personas (L3) are append-only versions (#52, part of #51). This is the groundwork for recording which memories a scene is built from.

  • Nothing is rewritten or deleted.
    • An L2 update, a merge, an API write and /v3/scenario/rm each add a version.
    • Clearing a chat memory is the one operation that deletes history.
  • Lineage.
    • Every scene has a fixed scene_id.
    • A merge records the versions it absorbed and retires them.
    • Retired scenes stay readable by version, or by scene_id once another scene takes their name.
    • read returns each version's op, parents and author.
  • Key fields are columns; the rest stays flexible. Name, summary, heat, op, author and time are columns. The body stays markdown, and other attributes are kept as they are.
  • The persona stores its body only. The Scene Navigation is rendered from the current scenes when the persona is read, so the persona no longer gets a new version each time a scene changes.
  • Your edits win over a running L2. A scene you write or remove through the API while L2 waits for its model keeps your version. L2 drops the operations it planned on the older view; those memories stay in L1.
  • Newer data is refused. memory-core stops with an error, instead of misreading data or migrating over it, when SQLite, Postgres or Redis holds data written by a newer version. This protects later rollbacks; 0.4.0 does not have the check.

Full changelog: CHANGELOG.md · v0.4.0...v0.4.1