memhouse 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/bin/memhouse.js +1 -1
- package/memhouse/shipper/ship.js +8 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -237,6 +237,27 @@ an old house cannot be corrupted by a new shipper. `memhouse migrate-rooms` rebu
|
|
|
237
237
|
copy, atomic swap, and the old room kept as `<room>_pre_epoch` for you to drop. The house
|
|
238
238
|
records the move in `house_events`, and `memhouse doctor` reads it back.
|
|
239
239
|
|
|
240
|
+
## Upgrading
|
|
241
|
+
|
|
242
|
+
`memhouse update` upgrades the code, restarts the daemons, and — from 0.10.0 onward —
|
|
243
|
+
detects a schema migration the house needs and prompts to run it.
|
|
244
|
+
|
|
245
|
+
**One exception: upgrading from 0.9.x.** That release predates migrations, and `update`
|
|
246
|
+
runs the *old* version's code (it replaces itself mid-run), so it cannot prompt. After
|
|
247
|
+
the upgrade the first ship refuses (nothing is lost) and tells you the one command to
|
|
248
|
+
run by hand:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
memhouse update # installs the new version, refuses to ship the old-schema house
|
|
252
|
+
memhouse migrate # the one-time rebuild it named — copy + atomic swap, nothing deleted
|
|
253
|
+
memhouse doctor # every line a check mark
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
If other machines ship into the same house as the same member, upgrade them too — a
|
|
257
|
+
pre-0.10 shipper still deletes-before-reinsert; `memhouse doctor` flags any that are
|
|
258
|
+
behind, and prints the `REVOKE ALTER DELETE, ALTER UPDATE` fallback that stops them
|
|
259
|
+
destructively until you can.
|
|
260
|
+
|
|
240
261
|
## Troubleshooting
|
|
241
262
|
|
|
242
263
|
### An editor reads zero sessions
|
package/bin/memhouse.js
CHANGED
|
@@ -1607,7 +1607,7 @@ async function cmdDoctor() {
|
|
|
1607
1607
|
} else {
|
|
1608
1608
|
keysCorrect = wrongKeys.length === 0;
|
|
1609
1609
|
add(keysCorrect, `sorting keys${keysCorrect ? ` carry origin and epoch correctly (${checked}/${ROOM_TYPES.length} rooms)` : `: wrong on ${wrongKeys.join(', ')}`}`,
|
|
1610
|
-
'those rooms predate the epoch key, so the shipper refuses to write into them.\n rebuild them (nothing is deleted): memhouse migrate
|
|
1610
|
+
'those rooms predate the epoch key, so the shipper refuses to write into them.\n rebuild them (nothing is deleted): memhouse migrate');
|
|
1611
1611
|
}
|
|
1612
1612
|
} catch (e) { add(false, 'sorting keys', e.message); }
|
|
1613
1613
|
// What the house says about ITSELF — its schema generation and whether a rebuild was
|
package/memhouse/shipper/ship.js
CHANGED
|
@@ -387,13 +387,15 @@ async function assertRoomKeys(client, rooms) {
|
|
|
387
387
|
}
|
|
388
388
|
if (wrong.length) {
|
|
389
389
|
throw new Error(
|
|
390
|
-
'
|
|
390
|
+
'this house needs a one-time migration before it can be shipped to. Run:\n'
|
|
391
|
+
+ '\n memhouse migrate\n'
|
|
392
|
+
+ '\n (an upgrade from a pre-0.10 memhouse cannot prompt for this itself — the old\n'
|
|
393
|
+
+ ' `update` command predates migrations, so run the line above once, by hand.)\n'
|
|
394
|
+
+ '\n Why: these rooms have the wrong sorting key, so a ship pass would corrupt them:\n'
|
|
391
395
|
+ wrong.map((s) => ` ${s}`).join('\n')
|
|
392
|
-
+ '\n ORDER BY cannot be altered in place
|
|
393
|
-
+ '\n
|
|
394
|
-
+ '
|
|
395
|
-
+ '\n keeps the old one as <room>_pre_epoch for you to drop. Nothing is deleted.'
|
|
396
|
-
+ '\n A house with no imported rows can also just be re-shipped from scratch.');
|
|
396
|
+
+ '\n ORDER BY cannot be altered in place, so migrate copies each room into one with\n'
|
|
397
|
+
+ ' the current key, swaps them atomically, and keeps the old one as <room>_pre_epoch\n'
|
|
398
|
+
+ ' for you to drop. Nothing is deleted.');
|
|
397
399
|
}
|
|
398
400
|
}
|
|
399
401
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memhouse",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "memhouse — agent conversation memory across 17 editors: parse-on-client shippers, a typed ClickHouse store with one set of rooms per member, kernel-agency install, and the agentlytics dashboard",
|
|
5
5
|
"main": "bin/memhouse.js",
|
|
6
6
|
"bin": {
|