memhouse 0.11.0 → 0.11.2

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 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-rooms');
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
@@ -34,6 +34,25 @@ fi
34
34
 
35
35
  (Do not print the env values, and do not narrate that you are withholding them — just use them.)
36
36
 
37
+ ## What memhouse is — the overview (give this in every state, before the tour)
38
+
39
+ One paragraph, grounded not sold: **memhouse is your personal, permanent archive of every
40
+ AI coding session.** A background shipper reads the session files your editors write —
41
+ Claude Code, Codex, Cursor, VS Code, Zed, OpenCode, Gemini CLI and 10 more, 17 in all —
42
+ and ships them into a ClickHouse database you own, called a **house**. YOU choose that
43
+ ClickHouse: a local one on your laptop, one on your own VM, or any ClickHouse server you
44
+ control — managed or remote. memhouse itself is not a hosted service and phones nothing
45
+ home; your sessions go only to the house you point it at, and it runs no LLM in its write
46
+ or read path — it stores rows, the agent reading them (this chat) does the thinking. It
47
+ outlives the transcripts on disk: editors compact and delete their local session files
48
+ after weeks, so for anything older than ~30 days the house is the only place it still
49
+ exists. One archive spans every editor, every project, every machine you ship from.
50
+
51
+ What it gives you, in one breath: **ask** your own history a question and get a cited
52
+ answer, **search** for the session you half-remember, **query** the raw data for numbers,
53
+ browse a **dashboard**, and **invite** other people onto your ClickHouse so memories can be
54
+ **shared** read-only. The tour below names each.
55
+
37
56
  ## Then introduce it — three states, three openings
38
57
 
39
58
  **Configured and answering** — open with the numbers: "Your memory holds N sessions
@@ -61,6 +80,12 @@ What you can DO from this chat:
61
80
  - `/mem:sql <question or SQL>` — ad-hoc analytics (tokens, costs, rankings)
62
81
  - `/mem:status` — is it healthy, how much is stored, which machines ship into it
63
82
 
83
+ The first three overlap — same words work in each — so give the reader the rule that
84
+ separates them: **want a session → search. Want an answer → ask. Want a number → sql.**
85
+ `ask` runs a `search` first, then reads the turns it finds and writes you a cited answer;
86
+ `search` stops at the ranked list of sessions; `sql` counts and aggregates the columns
87
+ rather than hunting text.
88
+
64
89
  And around other people — **inviting comes before sharing**:
65
90
 
66
91
  - `/mem:invite <name>` — mint a friend's account + their own house on your ClickHouse,
@@ -387,13 +387,15 @@ async function assertRoomKeys(client, rooms) {
387
387
  }
388
388
  if (wrong.length) {
389
389
  throw new Error(
390
- 'these rooms have the wrong sorting key, so a ship pass would corrupt them:\n'
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 — the rooms have to be rebuilt:'
393
- + '\n memhouse migrate-rooms'
394
- + '\n It copies each room into one with the current key, swaps them atomically, and'
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.0",
3
+ "version": "0.11.2",
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": {