memhouse 0.17.0 → 0.18.0
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 +96 -30
- package/bin/memhouse.js +418 -196
- package/editors/antigravity.js +2 -0
- package/editors/claude.js +3 -1
- package/editors/codebuff.js +2 -0
- package/editors/codex.js +4 -1
- package/editors/commandcode.js +2 -1
- package/editors/copilot-jetbrains.js +2 -1
- package/editors/copilot.js +2 -1
- package/editors/cursor-agent.js +2 -1
- package/editors/cursor.js +2 -0
- package/editors/gemini.js +2 -1
- package/editors/goose.js +2 -1
- package/editors/index.js +8 -1
- package/editors/kiro.js +3 -2
- package/editors/opencode.js +2 -1
- package/editors/scope.js +126 -0
- package/editors/vscode.js +2 -0
- package/editors/zed.js +2 -1
- package/memhouse/DESIGN.md +31 -8
- package/memhouse/channel.js +50 -0
- package/memhouse/delivery/AGENT-INSTALL-PROMPT.md +2 -1
- package/memhouse/delivery/AGENT-INSTALL.md +1 -1
- package/memhouse/delivery/INVITATION.md.tpl +130 -0
- package/memhouse/delivery/PROMPT.md +6 -5
- package/memhouse/delivery/kernel-install.md +4 -2
- package/memhouse/delivery/plugin/.claude-plugin/plugin.json +1 -1
- package/memhouse/delivery/plugin/reference/HOUSE.md +31 -12
- package/memhouse/delivery/plugin/skills/access/SKILL.md +8 -8
- package/memhouse/delivery/plugin/skills/admin/SKILL.md +1 -1
- package/memhouse/delivery/plugin/skills/house/SKILL.md +2 -2
- package/memhouse/flags.js +5 -4
- package/memhouse/house/HOUSE.md +25 -11
- package/memhouse/house/house.js +110 -27
- package/memhouse/house/migrate.js +7 -6
- package/memhouse/house/relocate.js +2 -2
- package/memhouse/house/schema.sql.tpl +3 -3
- package/memhouse/provision.js +100 -0
- package/memhouse/shipper/ship.js +87 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,9 +9,12 @@ something durable was keeping it.
|
|
|
9
9
|
memhouse is that something. It reads the session transcripts your editors already
|
|
10
10
|
write to disk — **17 of them**: Claude Code, Codex, Cursor, Zed, Copilot, Gemini
|
|
11
11
|
CLI and the rest — parses them locally, and ships typed rows into a ClickHouse
|
|
12
|
-
**you
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
**you choose**: a container on this laptop, a box you run, your company's cluster,
|
|
13
|
+
or ClickHouse Cloud. memhouse runs no service of its own — there is no memhouse
|
|
14
|
+
cloud to sign up for and nothing is proxied through anyone — so the account is
|
|
15
|
+
yours and the data is wherever you decided to put it. Then you can search every
|
|
16
|
+
past session, see what it cost, resume the conversation that solved this before,
|
|
17
|
+
and let an agent query its own history.
|
|
15
18
|
|
|
16
19
|
And every row says where it came from, in a way no client can fake: `user_id` is
|
|
17
20
|
stamped **by the server** (`MATERIALIZED currentUser()`, async inserts pinned off
|
|
@@ -72,19 +75,26 @@ container engine, install one of the two.
|
|
|
72
75
|
memhouse onboard | install | setup | discover | doctor | uninstall | reset
|
|
73
76
|
memhouse ship [--full|--loop N] | search <terms> | stats | status
|
|
74
77
|
memhouse resume <session-id> print the command that reopens a session
|
|
75
|
-
memhouse update [--check]
|
|
78
|
+
memhouse update [--check] [--channel TAG] upgrade along the channel this install follows,
|
|
79
|
+
restart daemons, check the schema
|
|
76
80
|
memhouse start | stop dashboard + shipper as daemons
|
|
77
81
|
memhouse service install | uninstall survive a reboot
|
|
78
82
|
memhouse deploy --local | --down stand up (or remove) a local house
|
|
79
83
|
memhouse invite <name> mint a member + house, hand them one env file
|
|
84
|
+
memhouse members [--db X] who is in a house, and what each can reach
|
|
85
|
+
memhouse whoami [--admin] which credential is in play, and what it may do
|
|
86
|
+
memhouse rooms what your rooms are actually called
|
|
87
|
+
memhouse share <user> [--only …|--revoke|--list]
|
|
88
|
+
let a housemate read yours, in whole or in part
|
|
89
|
+
memhouse sessions-query print the session rollup SQL
|
|
80
90
|
memhouse passwd rotate this member's password
|
|
81
91
|
memhouse migrate | migrate-rooms [--dry-run] [--yes]
|
|
82
92
|
run whatever this house still needs
|
|
83
93
|
memhouse relocate --to <url> copy this house to a new ClickHouse, then repoint
|
|
84
94
|
memhouse nightly [--out DIR] build an installable tarball from this checkout
|
|
85
|
-
memhouse plugins install claude
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
memhouse plugins install claude 5 skills — house, recall, sql, access,
|
|
96
|
+
admin — into every Claude Code config
|
|
97
|
+
dir found
|
|
88
98
|
memhouse prompt memory snippet for an agent's system prompt
|
|
89
99
|
memhouse prompt --install an install prompt, rendered for this machine
|
|
90
100
|
```
|
|
@@ -108,6 +118,50 @@ Config resolves: flags → `MEMHOUSE_*` env → `$MEMHOUSE_HOME/env` (default
|
|
|
108
118
|
commands that read or write memory refuse and say so rather than guessing
|
|
109
119
|
`localhost:8123`, which on a lot of machines is a real house belonging to someone else.
|
|
110
120
|
|
|
121
|
+
## Which sessions ship
|
|
122
|
+
|
|
123
|
+
Everything on the machine, by default: every adapter, from wherever that editor keeps its
|
|
124
|
+
sessions. `memhouse discover` prints what each adapter is watching and the variable that
|
|
125
|
+
moves it:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Watched directories (override with the variable shown, in the env file):
|
|
129
|
+
claude ~/.claude, ~/.claude-playbooks/kommander, … [MEMHOUSE_CLAUDE_ROOTS]
|
|
130
|
+
codex ~/.codex [MEMHOUSE_CODEX_ROOTS]
|
|
131
|
+
gemini-cli ~/.gemini [MEMHOUSE_GEMINI_CLI_ROOTS]
|
|
132
|
+
cursor ~/Library/Application Support/Cursor/User, … [built-in]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Two kinds of line in the env file narrow it, or `--editors` / `--claude-roots` at install:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
MEMHOUSE_EDITORS='claude'
|
|
139
|
+
MEMHOUSE_CLAUDE_ROOTS='~/.claude-playbooks/kommander-chaos'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
`MEMHOUSE_EDITORS` names the adapters to run. `MEMHOUSE_<EDITOR>_ROOTS` replaces one
|
|
143
|
+
adapter's location: the adapter's name upper-cased, dashes to underscores. Claude is the
|
|
144
|
+
one adapter with many roots (every Claude Code config directory), so its list may hold
|
|
145
|
+
several; every other adapter has one store, so one path. Adapters marked `[built-in]`
|
|
146
|
+
resolve a platform app-data directory and cannot be moved yet.
|
|
147
|
+
|
|
148
|
+
An adapter name or a directory that does not exist is refused and reported against that
|
|
149
|
+
adapter, never shipped from the default instead: a typo that quietly shipped nothing would
|
|
150
|
+
look like a working install with an empty house, and one that quietly shipped the wrong
|
|
151
|
+
store would be worse.
|
|
152
|
+
|
|
153
|
+
## Channels
|
|
154
|
+
|
|
155
|
+
`memhouse update` follows the npm dist-tag the install came from, not `latest` by
|
|
156
|
+
reflex. A house published under another tag — `npm publish --tag team`, so one team can
|
|
157
|
+
run a newer layout without every other house being dragged along — installs with
|
|
158
|
+
`npm install -g memhouse@team`, and `update` keeps it there. The channel is inferred from
|
|
159
|
+
the installed version; pin it with `MEMHOUSE_CHANNEL='team'` in the env file or
|
|
160
|
+
`memhouse update --channel team`, which writes the same line. A tarball or checkout
|
|
161
|
+
build sits on no tag and is never auto-updated; `update --check` says so and names the
|
|
162
|
+
way forward. An invite from a house on a channel carries it, so the invitee follows it
|
|
163
|
+
too.
|
|
164
|
+
|
|
111
165
|
## Going back into a session
|
|
112
166
|
|
|
113
167
|
`search` finds the conversation; `resume` hands you back into it.
|
|
@@ -184,30 +238,43 @@ immediate.
|
|
|
184
238
|
|
|
185
239
|
## How your memory is stored
|
|
186
240
|
|
|
187
|
-
**A house is a database; its rooms are
|
|
188
|
-
|
|
189
|
-
(`
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
241
|
+
**A house is a database; its rooms are tables.** `sessions`, `messages` and `tool_calls`
|
|
242
|
+
hold your turns. Every row says where it came from: `user_id`, stamped by the server
|
|
243
|
+
(`MATERIALIZED currentUser()`, with async inserts pinned off so the stamp cannot be
|
|
244
|
+
skipped), and `host`, the machine's install fingerprint. `WHERE user_id = 'alice'` is one
|
|
245
|
+
person; `WHERE host = '…'` is one machine. Neither is forgeable from the client.
|
|
246
|
+
|
|
247
|
+
**Your rooms are named for you, and one grant covers them.** Every member of a house holds
|
|
248
|
+
`GRANT … ON mem.<name>_* TO <name>`: their own rooms, present and future, and nothing else
|
|
249
|
+
in the database. That is the whole access model, and it is the same on a laptop, a team's
|
|
250
|
+
server, or a kernel:
|
|
251
|
+
|
|
252
|
+
| | rooms | the member holds |
|
|
253
|
+
|---|---|---|
|
|
254
|
+
| alone on your laptop | `mem.polat_*` | one grant on `mem.polat_*` |
|
|
255
|
+
| a team on one server | `mem.polat_*`, `mem.alice_*`, … | each their own |
|
|
256
|
+
|
|
257
|
+
A colleague can read their isolation back with `SHOW GRANTS` in one line, which is the
|
|
258
|
+
property this rests on. There is no row policy to trust and no database-wide grant to
|
|
259
|
+
worry about: `ALL ON mem.*` would cover rooms created later, which is how two people in one
|
|
260
|
+
database once became a leak, so memhouse never issues it — not to a member, not to you.
|
|
194
261
|
|
|
195
|
-
|
|
196
|
-
|
|
262
|
+
Standalone is a team of one. `memhouse deploy --local` creates the house with an admin
|
|
263
|
+
credential (`memhouse_root`) and a member named after your OS user, keeps both in the env
|
|
264
|
+
file, and ships as the member. Inviting a colleague later is `memhouse invite <name>`; the
|
|
265
|
+
admin credential is already there.
|
|
197
266
|
|
|
198
|
-
|
|
199
|
-
grants each person `ALL` on it, and their shippers all write into the same rooms:
|
|
267
|
+
Reading across everyone is a `UNION ALL` over the rooms you hold:
|
|
200
268
|
|
|
201
269
|
```sql
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
270
|
+
SELECT user_id, count() FROM mem.polat_messages GROUP BY user_id
|
|
271
|
+
UNION ALL
|
|
272
|
+
SELECT user_id, count() FROM mem.alice_messages GROUP BY user_id
|
|
205
273
|
```
|
|
206
274
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
groups that should not see each other get separate houses.
|
|
275
|
+
An operator with an admin credential reads every room; a member reads the ones they own
|
|
276
|
+
plus whatever was shared with them, and naming a room they do not hold is an error rather
|
|
277
|
+
than a silent omission.
|
|
211
278
|
|
|
212
279
|
### The house never destroys what it cannot rebuild
|
|
213
280
|
|
|
@@ -245,7 +312,7 @@ count its messages twice.
|
|
|
245
312
|
The shipper verifies the sorting keys before it writes and refuses if they are wrong, so
|
|
246
313
|
an old house cannot be corrupted by a new shipper. `memhouse migrate-rooms` rebuilds it:
|
|
247
314
|
copy, atomic swap, and the old room kept as `<room>_pre_epoch` for you to drop. The house
|
|
248
|
-
records the move in `
|
|
315
|
+
records the move in `events`, and `memhouse doctor` reads it back.
|
|
249
316
|
|
|
250
317
|
## Upgrading
|
|
251
318
|
|
|
@@ -341,10 +408,9 @@ and are not part of `npm test`.
|
|
|
341
408
|
| `agency/` | the earlier agentlytics-agency wrap — prior art, not how memhouse works |
|
|
342
409
|
| `TERMINOLOGY.md` | the constellation terminology canon |
|
|
343
410
|
|
|
344
|
-
Deeper reading: `memhouse/DESIGN.md` (the
|
|
345
|
-
`memhouse/
|
|
346
|
-
`memhouse/
|
|
347
|
-
`memhouse/COMPETITION.md`.
|
|
411
|
+
Deeper reading: `memhouse/DESIGN.md` (the bets, and why the room layout has moved three
|
|
412
|
+
times), `memhouse/house/HOUSE.md` (the layout and the schema), `SECURITY.md` (what
|
|
413
|
+
holds, and what does not), `memhouse/delivery/kernel-install.md`, `memhouse/COMPETITION.md`.
|
|
348
414
|
|
|
349
415
|
Deferred designs (captured, not yet built): `docs/design/host-repoint-reconciliation.md`
|
|
350
416
|
— what should happen when the shipper is repointed at a new, empty host (house identity,
|