memhouse 0.7.1 → 0.9.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 +79 -43
- package/bin/memhouse.js +153 -147
- package/editors/antigravity.js +7 -15
- package/editors/cursor.js +18 -24
- package/editors/goose.js +9 -21
- package/editors/index.js +19 -70
- package/editors/opencode.js +6 -15
- package/editors/sqlite.js +74 -0
- package/editors/windsurf.js +3 -3
- package/editors/zed.js +10 -15
- package/memhouse/COMPETITION.md +9 -5
- package/memhouse/DESIGN.md +29 -30
- package/memhouse/RESUME-AND-UPDATE.md +7 -10
- package/memhouse/delivery/AGENT-INSTALL.md +15 -13
- package/memhouse/delivery/PROMPT.md +7 -9
- package/memhouse/delivery/kernel-install.md +18 -33
- package/memhouse/delivery/plugin/skills/search/SKILL.md +25 -38
- package/memhouse/delivery/plugin/skills/sessions/SKILL.md +15 -28
- package/memhouse/delivery/plugin/skills/sql/SKILL.md +23 -36
- package/memhouse/host.js +1 -1
- package/memhouse/house/HOUSE.md +74 -0
- package/memhouse/house/house.js +170 -0
- package/memhouse/{per-member/schema-member.sql.tpl → house/schema.sql.tpl} +8 -11
- package/memhouse/resume.js +1 -1
- package/memhouse/self-update.js +4 -4
- package/memhouse/server/queries.js +8 -2
- package/memhouse/shipper/ship.js +30 -37
- package/package.json +2 -6
- package/memhouse/per-member/INSTALL.md +0 -228
- package/memhouse/per-member/PLAN.md +0 -174
- package/memhouse/per-member/PROVISIONING.md +0 -177
- package/memhouse/per-member/README.md +0 -48
- package/memhouse/per-member/SCHEMA.md +0 -120
- package/memhouse/per-member/SHARING.md +0 -149
- package/memhouse/per-member/provision.js +0 -297
- package/memhouse/per-member/rooms.js +0 -252
- package/memhouse/per-member/schema-merge.sql.tpl +0 -24
package/README.md
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
# memhouse
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
**Claude Code deletes your transcripts after 30 days.** (`cleanupPeriodDays`,
|
|
4
|
+
default 30 — session files are removed at startup.) Measured on the machine this
|
|
5
|
+
was built on: months of daily use, and the oldest surviving local transcript was
|
|
6
|
+
nine days old. Every problem you solved before that exists nowhere — unless
|
|
7
|
+
something durable was keeping it.
|
|
8
|
+
|
|
9
|
+
memhouse is that something. It reads the session transcripts your editors already
|
|
10
|
+
write to disk — **17 of them**: Claude Code, Codex, Cursor, Zed, Copilot, Gemini
|
|
11
|
+
CLI and the rest — parses them locally, and ships typed rows into a ClickHouse
|
|
12
|
+
**you own**. Nothing is proxied, intercepted, or sent to anyone's cloud. Then you
|
|
13
|
+
can search every past session, see what it cost, resume the conversation that
|
|
14
|
+
solved this before, and let an agent query its own history.
|
|
15
|
+
|
|
16
|
+
And every row says where it came from, in a way no client can fake: `user_id` is
|
|
17
|
+
stamped **by the server** (`MATERIALIZED currentUser()`, async inserts pinned off
|
|
18
|
+
so the stamp cannot be skipped) and `host` is a fingerprint minted once per
|
|
19
|
+
install. A team pointed at one house is a team memory with real attribution — not
|
|
20
|
+
a label somebody's client claimed.
|
|
8
21
|
|
|
9
22
|
```bash
|
|
10
|
-
npm install -g memhouse
|
|
23
|
+
npm install -g memhouse
|
|
11
24
|
memhouse onboard
|
|
12
25
|
```
|
|
13
26
|
|
|
14
|
-
That is the whole install. `onboard` finds your
|
|
15
|
-
and starts the dashboard.
|
|
16
|
-
[below](#the-allow-scripts-flag).
|
|
27
|
+
That is the whole install — no flags, nothing to compile. `onboard` finds your
|
|
28
|
+
editors, sets up a house, ships, and starts the dashboard.
|
|
17
29
|
|
|
18
30
|
**On most Linux distros that first line needs `sudo`.** A distro-packaged Node puts
|
|
19
31
|
its global prefix under `/usr`, which you do not own, so npm stops with `EACCES`.
|
|
@@ -22,7 +34,7 @@ Ubuntu machine:
|
|
|
22
34
|
|
|
23
35
|
```bash
|
|
24
36
|
ls -ld "$(npm prefix -g)" # root-owned? use sudo. Owned by you? do NOT — see EACCES below
|
|
25
|
-
sudo npm install -g memhouse
|
|
37
|
+
sudo npm install -g memhouse
|
|
26
38
|
```
|
|
27
39
|
|
|
28
40
|
If the prefix is yours (Homebrew, fnm, nvm, volta), `sudo` is the wrong fix and
|
|
@@ -36,6 +48,13 @@ makes it worse — [EACCES on install](#eacces-on-install) tells them apart.
|
|
|
36
48
|
memhouse deploy --local # a loopback-bound ClickHouse, then install and ship
|
|
37
49
|
```
|
|
38
50
|
|
|
51
|
+
The house it stands up is **yours by name**: its superuser defaults to your OS
|
|
52
|
+
username (`polat`, not `memhouse_root` — override with `--user`), and the house
|
|
53
|
+
database defaults to the same name, so your memory lives at `polat.messages` and
|
|
54
|
+
`WHERE user_id = 'polat'` reads like it should. The name
|
|
55
|
+
and password are fixed when the data volume is first initialised, like any ClickHouse
|
|
56
|
+
container, and reused on every redeploy after that.
|
|
57
|
+
|
|
39
58
|
Otherwise point at one you already run, or hand the SQL to whoever administers it:
|
|
40
59
|
|
|
41
60
|
```bash
|
|
@@ -142,13 +161,11 @@ memhouse update # upgrade, restart the daemons, check the house schem
|
|
|
142
161
|
memhouse update --check # compare versions, change nothing
|
|
143
162
|
```
|
|
144
163
|
|
|
145
|
-
A bare `npm i -g memhouse@latest` does
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
checkout it rebuilds `public/` — otherwise `git pull` serves you the previous release's
|
|
151
|
-
dashboard forever.
|
|
164
|
+
A bare `npm i -g memhouse@latest` does half the job. It does not restart the daemons,
|
|
165
|
+
which keep parsing with the code they booted with (a shipper here once ran 1d16h out of
|
|
166
|
+
a directory that had been *moved*); and it does not check whether your house predates a
|
|
167
|
+
room the new shipper needs. `update` does both, and from a checkout it rebuilds
|
|
168
|
+
`public/` — otherwise `git pull` serves you the previous release's dashboard forever.
|
|
152
169
|
|
|
153
170
|
The daemons also notice on their own: each one compares the installed version against
|
|
154
171
|
what it booted with and hands over — exiting under systemd/launchd so the supervisor
|
|
@@ -157,19 +174,30 @@ immediate.
|
|
|
157
174
|
|
|
158
175
|
## How your memory is stored
|
|
159
176
|
|
|
160
|
-
**
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
177
|
+
**A house is a database; its rooms are three shared tables.** `sessions`, `messages`
|
|
178
|
+
and `tool_calls` live in whatever database you point at — your own name by default
|
|
179
|
+
(`polat.messages`), a team's (`team_a.messages`), even `default`. Everyone in the
|
|
180
|
+
house writes into the same tables with their own credential, and every row says where
|
|
181
|
+
it came from: `user_id`, stamped by the server (`MATERIALIZED currentUser()`, with
|
|
182
|
+
async inserts pinned off so the stamp cannot be skipped), and `host`, the machine's
|
|
183
|
+
install fingerprint.
|
|
184
|
+
|
|
185
|
+
`WHERE user_id = 'alice'` is one person. `WHERE host = '…'` is one machine. No filter
|
|
186
|
+
is the whole house — which is exactly what a team dashboard wants.
|
|
164
187
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
(`all_sessions`) plus a `GRANT`, which narrows to whatever the caller can already
|
|
168
|
-
see. Sharing a whole room needs no operator.
|
|
188
|
+
Sharing is not a feature bolted on top; it IS the house. A team makes a database,
|
|
189
|
+
grants each person `ALL` on it, and their shippers all write into the same rooms:
|
|
169
190
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
191
|
+
```sql
|
|
192
|
+
CREATE DATABASE team_a;
|
|
193
|
+
CREATE USER alice IDENTIFIED BY '…';
|
|
194
|
+
GRANT ALL ON team_a.* TO alice; -- repeat per housemate
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
`ALL` on your own house reaches nothing outside it — the database is the boundary,
|
|
198
|
+
which is also why joining a ClickHouse someone else runs (a kernel's, a team's) needs
|
|
199
|
+
no negotiation beyond a database and a credential. Housemates are collaborators;
|
|
200
|
+
groups that should not see each other get separate houses.
|
|
173
201
|
|
|
174
202
|
### Imported history is protected
|
|
175
203
|
|
|
@@ -192,24 +220,22 @@ has it wrong, so an old house cannot be corrupted by a new shipper.
|
|
|
192
220
|
|
|
193
221
|
## Troubleshooting
|
|
194
222
|
|
|
195
|
-
###
|
|
196
|
-
|
|
197
|
-
Five adapters — **cursor, zed, opencode, goose, antigravity** — read sessions out
|
|
198
|
-
of SQLite files, and `better-sqlite3` builds its native binding from an install
|
|
199
|
-
script. npm 12 blocks install scripts by default, so without the flag those five
|
|
200
|
-
read nothing and you ship a partial history.
|
|
223
|
+
### An editor reads zero sessions
|
|
201
224
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
225
|
+
Five adapters — **cursor, zed, opencode, goose, antigravity** — read sessions out of
|
|
226
|
+
SQLite files. That used to mean `better-sqlite3`, whose native binding is built by
|
|
227
|
+
an npm install script; npm 12 blocks install scripts by default, so a plain install left
|
|
228
|
+
all five reading nothing and the fix was a flag
|
|
229
|
+
(`--allow-scripts=better-sqlite3`) you had to re-type on every upgrade. SQLite is
|
|
230
|
+
`node:sqlite` now — part of Node — so that failure class is gone along with the flag.
|
|
205
231
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
232
|
+
What can still go wrong is one store at a time: a `state.vscdb` locked by a running
|
|
233
|
+
editor, a corrupt file, a schema a new editor release changed. None of it is silent —
|
|
234
|
+
`memhouse discover` and `memhouse doctor` both name the skipped adapter and say why,
|
|
235
|
+
and the other sixteen keep working.
|
|
210
236
|
|
|
211
237
|
```bash
|
|
212
|
-
npx
|
|
238
|
+
npx -y memhouse discover # no flags here either
|
|
213
239
|
```
|
|
214
240
|
|
|
215
241
|
### `EACCES` on install
|
|
@@ -244,7 +270,7 @@ A rootless podman house has the same problem for the same reason, and
|
|
|
244
270
|
## Working from a checkout
|
|
245
271
|
|
|
246
272
|
```bash
|
|
247
|
-
npm install #
|
|
273
|
+
npm install # two runtime deps, no build step
|
|
248
274
|
node bin/memhouse.js …
|
|
249
275
|
npm test # syntax gate + unit checks
|
|
250
276
|
```
|
|
@@ -275,6 +301,16 @@ In constellation terms (`TERMINOLOGY.md`) memhouse is an **agency**: a **house**
|
|
|
275
301
|
alone would hold; the shipper is what makes it act. It competes with
|
|
276
302
|
memory-house; if it wins, it becomes memory-house v4.
|
|
277
303
|
|
|
304
|
+
## What's supported
|
|
305
|
+
|
|
306
|
+
| Surface | Status |
|
|
307
|
+
|---|---|
|
|
308
|
+
| macOS | primary — developed and driven here daily |
|
|
309
|
+
| Linux | real — installs, ships, `service install` (systemd `--user`), rootless podman `deploy --local`; exercised on Debian and Ubuntu machines |
|
|
310
|
+
| Windows | **untested** — the adapters declare Windows paths but no one has run a single install; treat it as unknown until this row changes |
|
|
311
|
+
| ClickHouse | 25.11 and 26.x, both in CI; 26.2+ needs no flags, 25.x needs the text-index flag the shipper already passes |
|
|
312
|
+
| Node | **≥ 24** — SQLite comes from `node:sqlite`, which is stable in 24. It works flagless on 22.13+ but prints `ExperimentalWarning` on every command (measured on v22.23.2), and Node 20 is past EOL. There is no native dependency and no build step at any version. |
|
|
313
|
+
|
|
278
314
|
## Heritage & license
|
|
279
315
|
|
|
280
316
|
Built on [agentlytics](https://github.com/f/agentlytics) by Fatih Kadir Akın (MIT)
|