Syncs respire-memory with upstream v0.3.14 (risense-ai/respire-magpie f921268). Before an update overwrites a memory, the worker now saves the old body as an encrypted backup (AES-256-GCM, written to a temp file and renamed over) under the state dir's backups/. The update fails closed if the show receipt is invalid or the backup can't be written. Backups are pruned after seven days once the queue drains. The per-turn rules text drops "immediately read the engine's complete policy after the first recall". Store's encryption moved into encryptRecord/decryptRecord/writeFileAtomic, with no change to the format. No new host, dependency or install script.
By luodaoyi (#596), reviewed at 264a905.
Run on the Mac mini with Bun 1.4.2, node 22 and HOME=$(mktemp -d), on 264a905 merged with main 1a05a77:
- `bun test packages/respire-memory`: 1 pass, 0 fail. `node scripts/check.mjs` in the package: every section passed, including "encrypted update backups with fail-closed validation and seven-day retention".
- Broken by hand: with the putBackup call turned off, check.mjs exits 1 (ENOENT on backups/).
- Whole repo `bun test` (with #606 and #599 merged in too): 4592 pass, 11 skip, 0 fail. `bun scripts/check.mjs`: exit 0.
Not tried: a real Respire engine.