memhouse 0.11.2 → 0.11.3

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
@@ -336,6 +336,11 @@ Deeper reading: `memhouse/DESIGN.md` (the four bets),
336
336
  `memhouse/per-member/SCHEMA.md`, `memhouse/delivery/kernel-install.md`,
337
337
  `memhouse/COMPETITION.md`.
338
338
 
339
+ Deferred designs (captured, not yet built): `docs/design/host-repoint-reconciliation.md`
340
+ — what should happen when the shipper is repointed at a new, empty host (house identity,
341
+ local binding state, and a refuse-then-`init-here` gate so transcripts never land on the
342
+ wrong server).
343
+
339
344
  In constellation terms (`TERMINOLOGY.md`) memhouse is an **agency**: a **house**
340
345
  — the `mem` database — plus a **resident** working in it, the shipper. The house
341
346
  alone would hold; the shipper is what makes it act. It competes with
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ask
3
- description: Answer a question FROM conversation memory — retrieve the relevant past sessions out of the memhouse ClickHouse store, read the actual transcripts, and synthesize an answer with citations. Use when the user asks something their past work already answered, e.g. "how did I fix X last time", "what approach did we settle on for Y", "why did we choose Z", "have I solved this error before", "what did the reviewer say about W". This is the retrieve-and-answer skill; /mem:search is find-the-session, /mem:sql is run-a-query.
3
+ description: Answer a question FROM conversation memory — retrieve the relevant past sessions out of the memhouse ClickHouse store, read the actual transcripts, and synthesize an answer with citations. Use when the user asks something their past work already answered, e.g. "how did I fix X last time", "what approach did we settle on for Y", "why did we choose Z", "have I solved this error before", "what did the reviewer say about W". Also answers from a friend's house shared with you when they name it ("how did yigit fix X", "ask yigit's memory"). This is the retrieve-and-answer skill; /mem:search is find-the-session, /mem:sql is run-a-query.
4
4
  user-invocable: true
5
5
  argument-hint: "<question about past work>"
6
6
  allowed-tools: Bash
@@ -47,6 +47,25 @@ SQL
47
47
 
48
48
  `readonly=1` is pinned on every request: this skill never writes.
49
49
 
50
+ ## Answering from another person's house (shared with you)
51
+
52
+ The house is a ClickHouse database; a share is a read-only GRANT on it. When the user asks
53
+ about a FRIEND's memory — "how did yigit fix X", "in yigit's house", "ask yigit's memory",
54
+ "from yigit" — answer from THEIR house without changing your credentials:
55
+
56
+ 1. **Resolve the house.** `SHOW DATABASES` returns what your credential may read; a name
57
+ that is not `system` / `information_schema` / `default` and not your own `$MEMHOUSE_DB`
58
+ is a house shared with you. Match the named person to one; set `HOUSE=yigit`. With no
59
+ house named, `HOUSE=$MEMHOUSE_DB`.
60
+ 2. **Point the connection at it:** replace `database=${MEMHOUSE_DB:-mem}` with
61
+ `database=<HOUSE>` in the recipe above. The rooms (`messages`, `sessions`) resolve by
62
+ the connection's database, so retrieval, the transcript read, and the citation all run
63
+ against that house — leave the table names bare.
64
+ 3. **Cite the house.** Say whose memory the answer came from ("from yigit's house") so the
65
+ user never mistakes a friend's session for their own.
66
+ 4. **Read-only, thin by design.** A refused SELECT means the house was not shared with you
67
+ (or the share was revoked) — say so; never guess another database.
68
+
50
69
  ## The method — retrieve, read, answer, cite
51
70
 
52
71
  **Escaping, before anything touches SQL.** Search terms, session ids and user ids are
@@ -92,6 +92,12 @@ And around other people — **inviting comes before sharing**:
92
92
  hand them one env file; they install with it and have their own memory
93
93
  - `/mem:share <name>` — once they exist, open a read-only window into YOUR memory
94
94
  (`/mem:share revoke <name>` closes it); `/mem:users` shows who's around
95
+ - **Read a friend's shared memory** — once they've shared theirs with you, name their
96
+ house right in the question: `/mem:ask <question> in <their-house>`, or
97
+ `/mem:search <terms> in <their-house>` / `/mem:sql … on <their-house>`. It reads THEIR
98
+ house read-only, with your own credentials; `/mem:users` lists the houses shared with
99
+ you. (A house is a whole ClickHouse database — sharing grants read on it, not on single
100
+ sessions.)
95
101
 
96
102
  Also worth naming: `memhouse start` serves a dashboard at http://localhost:4640 for
97
103
  browsing and analytics outside the chat, and everything here is read-only for agents —
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: search
3
- description: Full-text search across ALL shipped agent conversations — every session from all 17 supported editors (Claude Code, Codex, Cursor, VS Code, Zed, OpenCode, Gemini CLI, …), every project, every machine — stored in the memhouse ClickHouse. Use whenever the user refers to something from the past that isn't in the current context, e.g. "what did I say about X", "find that conversation about Y", "when did I work on Z", "did I ever try W", "the chat where we discussed it", "remind me how I did it". Reach for this before saying you don't know about prior work.
3
+ description: Full-text search across ALL shipped agent conversations — every session from all 17 supported editors (Claude Code, Codex, Cursor, VS Code, Zed, OpenCode, Gemini CLI, …), every project, every machine — stored in the memhouse ClickHouse. Use whenever the user refers to something from the past that isn't in the current context, e.g. "what did I say about X", "find that conversation about Y", "when did I work on Z", "did I ever try W", "the chat where we discussed it", "remind me how I did it". Searches your own house by default, or a friend's house shared with you when they name it ("find X in yigit's memory"). Reach for this before saying you don't know about prior work.
4
4
  user-invocable: true
5
5
  argument-hint: "<search terms> [in <project>] [last <N> days] [from <editor>]"
6
6
  allowed-tools: Bash
@@ -142,9 +142,32 @@ LIMIT 10
142
142
  FORMAT PrettyCompact
143
143
  ```
144
144
 
145
+ ## Reading another person's house (shared with you)
146
+
147
+ Every house is its own ClickHouse database on the same server; a share is a read-only
148
+ GRANT on that database. To read a friend's memory you keep YOUR credentials and point the
149
+ connection at THEIR house — the rooms (`messages`, `sessions`, `tool_calls`) resolve by
150
+ the connection's `database`, so one change redirects every query in this skill.
151
+
152
+ 1. **Resolve the target house.** `SHOW DATABASES` lists what your credential may read; the
153
+ names that are not `system` / `information_schema` / `default` and not your own
154
+ `$MEMHOUSE_DB` are houses shared with you. If the user names one — "yigit's memory",
155
+ "in yigit", "house yigit", "from yigit" — set `HOUSE=yigit`; otherwise leave
156
+ `HOUSE=$MEMHOUSE_DB`.
157
+ 2. **Point the connection at it:** in the recipe above, replace
158
+ `database=${MEMHOUSE_DB:-mem}` with `database=<HOUSE>`. Leave the table names bare —
159
+ they resolve to that house. Nothing else in the query changes.
160
+ 3. **A house wins over `in <project>`.** A name that matches a readable house is a HOUSE,
161
+ not a project filter — otherwise "in yigit" silently filters YOUR house's project
162
+ column and returns nothing. If a real project in your own house shares the name, keep
163
+ the possessive ("<name>'s memory") or say "project <name>" to force the project reading.
164
+ 4. **Read-only, thin by design.** If the SELECT is refused, that house was not shared with
165
+ you (or the share was revoked) — say so; never guess another database.
166
+
145
167
  ## Qualifiers
146
168
 
147
- - `in <project>` → `AND m.project ILIKE '%<project>%'`
169
+ - `in <project>` → `AND m.project ILIKE '%<project>%'` — but a name matching a readable
170
+ house is a HOUSE (see above), not a project.
148
171
  - `last N days` → `AND m.ts > now() - INTERVAL N DAY`
149
172
  - `from <editor>` → `AND m.source = '<id>'` (ids: `claude-code`, `codex`,
150
173
  `cursor`, `cursor-agent`, `vscode`, `zed`, `opencode`, `gemini-cli`,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sql
3
- description: Run free-form read-only SQL against memhouse conversation memory (typed sessions/messages/tool_calls tables on ClickHouse, shared by the house). Use for ad-hoc analytics the other memhouse skills don't cover — token spend, model/editor usage, tool rankings, activity heatmaps, busiest days/projects, cache-hit ratios, or any custom question over conversation data.
3
+ description: Run free-form read-only SQL against memhouse conversation memory (typed sessions/messages/tool_calls tables on ClickHouse, shared by the house). Use for ad-hoc analytics the other memhouse skills don't cover — token spend, model/editor usage, tool rankings, activity heatmaps, busiest days/projects, cache-hit ratios, or any custom question over conversation data — over your own house, or a friend's house shared with you when they name it.
4
4
  user-invocable: true
5
5
  argument-hint: "<question or SQL>"
6
6
  allowed-tools: Bash
@@ -100,6 +100,16 @@ writes into the same tables; `user_id` (stamped by the server) says whose row it
100
100
  `host` says which machine shipped it. Filter with `WHERE user_id = '<name>'` when you want
101
101
  one person, or leave it off for the whole house.
102
102
 
103
+ **Another person's house (shared with you).** A house is a database; a share is a
104
+ read-only GRANT on it. Because the rooms resolve by the connection's database, you read a
105
+ friend's memory by pointing the connection at THEIR house — same credentials, different
106
+ `database`. `SHOW DATABASES` lists what you may read; a name that is not `system` /
107
+ `information_schema` / `default` and not your own `$MEMHOUSE_DB` is a house shared with
108
+ you. When the user names one ("query yigit's house", "on yigit", "from yigit"), replace
109
+ `database=${MEMHOUSE_DB:-mem}` with `database=<house>` in the connection recipe and leave
110
+ the table names bare — or, to join across houses in one query, qualify tables explicitly
111
+ (`yigit.messages`). Read-only: a refused SELECT means that house was not shared with you.
112
+
103
113
  **Keep the SQL heredoc quoted (`<<'SQL'`).** This skill once told the agent to substitute
104
114
  a shell variable into the table names, which cannot expand inside a quoted heredoc — so
105
115
  the agent unquotes it, and then the SEARCH TERMS expand too. Both instances driving this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memhouse",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
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": {