memhouse 0.18.12 → 0.20.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.
Files changed (169) hide show
  1. package/AGENTS.md +22 -151
  2. package/CHANGELOG.md +263 -29
  3. package/LICENSE +202 -22
  4. package/LICENSES/agentlytics-MIT.txt +21 -0
  5. package/LICENSES/memhouse-MIT-until-0.18.11.txt +22 -0
  6. package/LICENSES/models.dev-MIT.txt +22 -0
  7. package/NOTICE +28 -0
  8. package/README.md +42 -20
  9. package/SECURITY.md +21 -8
  10. package/bin/memhouse.js +2223 -311
  11. package/docs/README.md +11 -9
  12. package/docs/guides/admin-password.md +37 -10
  13. package/docs/guides/configuration.md +13 -6
  14. package/docs/guides/daemons.md +64 -3
  15. package/docs/guides/import-claude-ai.md +204 -0
  16. package/docs/guides/install.md +11 -6
  17. package/docs/guides/invite.md +21 -7
  18. package/docs/guides/operate.md +114 -7
  19. package/docs/guides/search-and-resume.md +72 -3
  20. package/docs/guides/share.md +91 -52
  21. package/docs/guides/storage.md +44 -4
  22. package/docs/guides/troubleshooting.md +121 -14
  23. package/docs/guides/uninstall.md +4 -3
  24. package/docs/guides/update.md +16 -0
  25. package/docs/guides/upgrade-to-0.20.md +188 -0
  26. package/docs/releases/README.md +2 -1
  27. package/docs/releases/v0.18.10.md +5 -5
  28. package/docs/releases/v0.18.11.md +3 -3
  29. package/docs/releases/v0.20.0.md +627 -0
  30. package/docs/releases/v0.20.1.md +114 -0
  31. package/docs/tutorials/01-first-house.md +10 -7
  32. package/docs/tutorials/02-join-a-house.md +24 -15
  33. package/docs/tutorials/03-share-your-memory.md +40 -31
  34. package/editors/antigravity.js +1 -80
  35. package/editors/base.js +463 -9
  36. package/editors/bridge.js +119 -0
  37. package/editors/claude.js +273 -105
  38. package/editors/codex.js +278 -52
  39. package/editors/copilot.js +1 -70
  40. package/editors/cursor.js +1 -75
  41. package/editors/derive-fingerprints.json +18 -0
  42. package/editors/harness-paths.js +69 -0
  43. package/editors/index.js +1 -20
  44. package/editors/normalise/agy.js +910 -0
  45. package/editors/normalise/copilot-cli.js +321 -0
  46. package/editors/normalise/cursor-agent.js +852 -0
  47. package/editors/normalise/cursor.js +474 -0
  48. package/editors/normalise/devin.js +575 -0
  49. package/editors/normalise/gemini-cli.js +602 -0
  50. package/editors/normalise/goose.js +673 -0
  51. package/editors/normalise/opencode.js +633 -0
  52. package/editors/normalise/vscode.js +549 -0
  53. package/editors/normalise/zed.js +473 -0
  54. package/editors/opencode-v4.js +119 -0
  55. package/editors/scope.js +14 -3
  56. package/editors/sessions-log.js +349 -0
  57. package/editors/sqlite.js +28 -1
  58. package/editors/vscode.js +1 -72
  59. package/editors/windsurf.js +1 -143
  60. package/examples/01-local-one-machine/README.md +24 -19
  61. package/examples/01-local-one-machine/run.sh +1 -1
  62. package/examples/02-existing-clickhouse/README.md +30 -22
  63. package/examples/02-existing-clickhouse/run.sh +5 -4
  64. package/examples/03-team-house/README.md +44 -37
  65. package/examples/03-team-house/run.sh +35 -18
  66. package/examples/04-self-hosted-team/README.md +29 -14
  67. package/examples/04-self-hosted-team/compose.yml +5 -2
  68. package/examples/04-self-hosted-team/smoke.sh +26 -12
  69. package/examples/README.md +8 -4
  70. package/examples/fixtures/README.md +4 -1
  71. package/examples/fixtures/make-sessions.js +8 -5
  72. package/memhouse/admin-secret.js +89 -24
  73. package/memhouse/argv-secrets.js +64 -0
  74. package/memhouse/channel.js +49 -9
  75. package/memhouse/codex-plugin.js +194 -0
  76. package/memhouse/delivery/AGENT-INSTALL-PROMPT.md +2 -1
  77. package/memhouse/delivery/AGENT-INSTALL.md +22 -11
  78. package/memhouse/delivery/INVITATION.md.tpl +44 -45
  79. package/memhouse/delivery/PROMPT.md +53 -5
  80. package/memhouse/delivery/UPGRADE.md.tpl +1 -1
  81. package/memhouse/delivery/codex/AGENTS-BLOCK.md +11 -0
  82. package/memhouse/delivery/codex/SKILL.md +50 -0
  83. package/memhouse/delivery/kernel-install.md +17 -9
  84. package/memhouse/delivery/plugin/.claude-plugin/plugin.json +2 -2
  85. package/memhouse/delivery/plugin/reference/HOUSE.md +168 -41
  86. package/memhouse/delivery/plugin/skills/access/SKILL.md +13 -5
  87. package/memhouse/delivery/plugin/skills/admin/SKILL.md +14 -6
  88. package/memhouse/delivery/plugin/skills/house/SKILL.md +25 -8
  89. package/memhouse/delivery/plugin/skills/recall/SKILL.md +66 -8
  90. package/memhouse/delivery/plugin/skills/sql/SKILL.md +66 -7
  91. package/memhouse/deploy.js +1 -1
  92. package/memhouse/flags.js +35 -18
  93. package/memhouse/help.js +37 -0
  94. package/memhouse/host.js +82 -2
  95. package/memhouse/house/HOUSE.md +2 -2
  96. package/memhouse/house/convert-profile.js +638 -0
  97. package/memhouse/house/convert-v3.js +742 -0
  98. package/memhouse/house/doctor-v3.js +324 -0
  99. package/memhouse/house/host-alias.js +85 -0
  100. package/memhouse/house/house.js +3 -3
  101. package/memhouse/house/migrate.js +2 -2
  102. package/memhouse/house/profile-dedupe.js +183 -0
  103. package/memhouse/house/profile-edges.js +554 -0
  104. package/memhouse/house/profile-house.js +430 -0
  105. package/memhouse/house/profile-rollup.js +190 -0
  106. package/memhouse/house/q-cli.js +863 -0
  107. package/memhouse/house/queries-v3.js +1013 -0
  108. package/memhouse/house/reconcile-v3.js +192 -0
  109. package/memhouse/house/records-to-profile.js +174 -0
  110. package/memhouse/house/records-to-rows.js +169 -0
  111. package/memhouse/house/relocate.js +2 -1
  112. package/memhouse/house/schema-choice.js +121 -0
  113. package/memhouse/house/schema-profile.js +290 -0
  114. package/memhouse/house/schema-profile.sql.tpl +398 -0
  115. package/memhouse/house/schema-v3.js +267 -0
  116. package/memhouse/house/schema-v3.sql.tpl +213 -0
  117. package/memhouse/import/claude-ai.js +420 -0
  118. package/memhouse/import/import.js +372 -0
  119. package/memhouse/import/pyjson.js +206 -0
  120. package/memhouse/import/records.js +64 -0
  121. package/memhouse/import/writer-profile.js +192 -0
  122. package/memhouse/import/writer-v3.js +240 -0
  123. package/memhouse/import/zip.js +112 -0
  124. package/memhouse/invitation.js +102 -0
  125. package/memhouse/invitefile.js +5 -2
  126. package/memhouse/plugin-copies.js +176 -0
  127. package/memhouse/provision.js +7 -2
  128. package/memhouse/release-hint.js +24 -0
  129. package/memhouse/resume.js +4 -4
  130. package/memhouse/server/api-v3.js +632 -0
  131. package/memhouse/server/dashboard-auth.js +181 -0
  132. package/memhouse/server/dashboard-port.js +91 -0
  133. package/memhouse/server/queries.js +30 -0
  134. package/memhouse/server/server.js +118 -20
  135. package/memhouse/service.js +1 -1
  136. package/memhouse/share.js +687 -1
  137. package/memhouse/shipper/adapter-capture.js +756 -0
  138. package/memhouse/shipper/capture.js +2571 -0
  139. package/memhouse/shipper/dedupe-profile.js +237 -0
  140. package/memhouse/shipper/dedupe-v3.js +1027 -0
  141. package/memhouse/shipper/forks.js +233 -0
  142. package/memhouse/shipper/log-adapter.js +219 -0
  143. package/memhouse/shipper/maintenance.js +49 -0
  144. package/memhouse/shipper/normalise-run.js +148 -0
  145. package/memhouse/shipper/passlog.js +68 -5
  146. package/memhouse/shipper/profile-capture.js +903 -0
  147. package/memhouse/shipper/ship.js +91 -8
  148. package/memhouse/shipper/snapshots.js +193 -0
  149. package/memhouse/shipper/source-roots.js +111 -0
  150. package/memhouse/version-notice.js +66 -0
  151. package/package.json +14 -7
  152. package/public/THIRD_PARTY_NOTICES.txt +2 -2
  153. package/public/assets/index-CcNnhfM3.js +78 -0
  154. package/public/index.html +1 -1
  155. package/ui/package-lock.json +56 -37
  156. package/ui/package.json +1 -0
  157. package/ui/src/App.jsx +29 -14
  158. package/ui/src/components/ChatSidebar.jsx +69 -12
  159. package/ui/src/lib/api.js +76 -0
  160. package/ui/src/lib/dashboard-token.js +41 -0
  161. package/ui/src/main.jsx +22 -5
  162. package/ui/src/pages/Dashboard.jsx +22 -36
  163. package/ui/third-party-notices.js +119 -0
  164. package/ui/vite.config.js +5 -1
  165. package/docs/releases/v0.18.12.md +0 -59
  166. package/memhouse/COMPETITION.md +0 -221
  167. package/memhouse/DESIGN.md +0 -222
  168. package/memhouse/RESUME-AND-UPDATE.md +0 -182
  169. package/public/assets/index-CnWzrjF3.js +0 -78
@@ -0,0 +1,114 @@
1
+ # memhouse 0.20.1 — 2026-11-02
2
+
3
+ A patch release on 0.20.0, with no schema change. Install it with `memhouse update`, or
4
+ `npm install -g memhouse`.
5
+
6
+ - **An invite's password expires.** It stops working 7 days after the invite unless it is
7
+ installed first. A file that sits unused, or that was read where it should not have been,
8
+ stops working on its own.
9
+ - **Codex gets memhouse on request.** `memhouse plugins install codex` adds a short rules block
10
+ to Codex's `AGENTS.md` and a `memhouse` skill with the read recipes. `plugins remove codex`
11
+ takes out exactly those.
12
+ - **Clearer answers from the CLI:**
13
+ - `memhouse <command> --help` prints that command's help;
14
+ - a refused credential is named before anything is written;
15
+ - `share --list` also shows the shares you received;
16
+ - `members` tells a share from a member's own tables;
17
+ - `discover` and `update` stop reporting problems that belong to nobody.
18
+ - **A new minor version's first run says so,** and names the release notes to read.
19
+
20
+ ## Read this before upgrading
21
+
22
+ Nothing in the house changes, and there is no migration. Three things behave differently:
23
+
24
+ - **Inviting: the password now expires.** `memhouse invite` sets the expiry on the new account
25
+ using the server's clock. The default is 7 days; `--expires <days>` takes 1 to 365. The
26
+ output, the invite file and `MEMHOUSE-INVITATION.md` all give the date. An invitee who
27
+ installs after that date is refused with "this invite expired at … ask whoever invited you
28
+ for a new one". To invite them again under the same name, remove the unused account first
29
+ with `DROP USER <name>`, as the administrator; their tables are kept and reused. Invites
30
+ made by 0.20.0 or earlier carry no expiry and keep working as before.
31
+ - **The first command after moving to a new minor version prints one line** to stderr. It
32
+ names the version it replaces and the release notes. Patch releases, downgrades and fresh
33
+ installs print nothing.
34
+ - **Codex is opt-in.** Nothing is written under `~/.codex` (or `CODEX_HOME`) unless you run
35
+ `memhouse plugins install codex`.
36
+
37
+ ```bash
38
+ memhouse update # then: memhouse status — every line a check mark
39
+ ```
40
+
41
+ ## Invites
42
+
43
+ - **The expiry is set by the server**, as `VALID UNTIL` on the new account, so it holds no
44
+ matter what the file says. `install --env` also checks the date in the file and refuses
45
+ before contacting the server.
46
+ - **Installing lifts it.** A password change removes the expiry, and so does
47
+ `--keep-password`, which keeps the invited password.
48
+ - **`invite --print-sql`** prints the same `ALTER USER … VALID UNTIL` statement for an
49
+ administrator who runs the plan by hand. The date is left as a placeholder, so the
50
+ statement does not parse until a real date is put in.
51
+ - **Re-inviting an unused name** used to fail with the install message, "give their
52
+ password". It now says the invite was never installed, gives its expiry, and names the
53
+ remedy.
54
+
55
+ ## Codex
56
+
57
+ Codex puts `AGENTS.md` into every prompt and lists each skill by its name and description,
58
+ reading the body only when the skill is used. memhouse uses both, and only when asked:
59
+
60
+ - **The block** in `AGENTS.md` holds what must always apply:
61
+ - never read or print the env file or a `MEMHOUSE_*` value;
62
+ - `MEMHOUSE_URL` is the house and `MEMHOUSE_PORT` the dashboard;
63
+ - questions about past sessions go to the skill.
64
+
65
+ It sits between `<!-- memhouse:begin … -->` and `<!-- memhouse:end -->` markers. A reinstall
66
+ replaces it where it stands. Remove takes it out and leaves the rest of the file
67
+ byte-identical. A file that held only the block is deleted, unless it is a symlink: then its
68
+ target is emptied and the link kept.
69
+ - **The skill**, `skills/memhouse/`, carries the read recipes:
70
+ - `memhouse q` for search, sessions, activity by hour, spend, models, tools and machines;
71
+ - `--member` for a housemate's shared sessions;
72
+ - `memhouse room-sql` for anything else.
73
+
74
+ It is memhouse's only if it holds `.memhouse.json`. A `skills/memhouse` without that file is
75
+ never replaced or removed.
76
+ - **An instance with its own home or binary** is named in both, as `MEMHOUSE_HOME=<home>
77
+ <binary>`.
78
+ - **After an upgrade,** the first command refreshes an installed copy, as it does the `/mem`
79
+ copies. A block you took out by hand stays out.
80
+ - **The `/mem` skills are still for Claude Code.**
81
+
82
+ ## Smaller changes
83
+
84
+ - **`memhouse <command> --help`** prints that command's entry. A command with no entry of its
85
+ own still gets the whole page. `memhouse q --help` lists the named queries.
86
+ - **A refused credential is named up front.** When ClickHouse refuses the credential (code
87
+ 516, or 194 for a missing password), `install`, `invite` and `deploy --local` stop before
88
+ writing anything, with "could not authenticate as '<user>' at <url>".
89
+ - **`share --list` also lists the shares you received,** with the command that reads each
90
+ one. `--json` adds `received`.
91
+ - **`members` tells a share from a member's own tables:**
92
+ - own tables;
93
+ - each member whose sessions this account reads, scoped or full;
94
+ - any other grant.
95
+
96
+ `--json` adds `own`, `shares` and `other`.
97
+ - **`discover`** shows an unreachable `http://localhost:8123` as a plain line when nothing is
98
+ configured to use it, instead of a ✗.
99
+ - **`update` on a machine with no member install** (an administrator's machine) skips the
100
+ schema heal and migration check, instead of printing the default member's authentication
101
+ failures.
102
+ - **`doctor`** names the release channel when it says a release is the latest. Offline, it no
103
+ longer says the install is current.
104
+ - **Dashboard:** a browser that refuses sessionStorage keeps the access token in memory for
105
+ that page load, instead of showing the "open it with `memhouse dashboard`" page.
106
+ - **/mem skills:** the schema-2 raw-SQL recipe runs `memhouse room-sql <<'SQL'` directly. It
107
+ used to wrap the call in a shell function, so every call asked for approval.
108
+
109
+ ## Deprecated
110
+
111
+ Unchanged from 0.20.0: passwords on the command line (`--password`, `--member-password`,
112
+ `--to-password`), and `MEMHOUSE_USER` / `MEMHOUSE_PASSWORD` as the admin for `migrate --v3-*`,
113
+ still work with a warning and are refused from the next minor release. See
114
+ [0.20.0's Deprecated](v0.20.0.md#deprecated).
@@ -41,9 +41,10 @@ This does four things:
41
41
  1. It starts ClickHouse in a container bound to `127.0.0.1:8123`, so only this machine
42
42
  can reach it. The data lives in a named volume.
43
43
  2. It creates two users. `memhouse_root` administers the house. A **member** named after
44
- your OS user (`sam`, say) ships your sessions, and holds one grant: `mem.sam_*`.
45
- Your rooms are `mem.sam_sessions`, `mem.sam_messages`, `mem.sam_tool_calls`, and
46
- so on.
44
+ your OS user (`sam`, say) ships your sessions. It holds `mem.sam_*`, where your
45
+ sessions live (`mem.sam_session_parts`, `mem.sam_sessions` and four more), and its
46
+ own two tables in the capture archive (`mem_archive.sam_session_units`,
47
+ `_session_sources`), which keep every transcript byte as captured.
47
48
  3. It writes both credentials to `~/.memhouse/env`, mode 600. A local house is the one
48
49
  case where the admin credential is kept, so that `memhouse invite` works later with
49
50
  no flags.
@@ -58,7 +59,7 @@ it. See [the install guide](../guides/install.md).
58
59
  memhouse status
59
60
  ```
60
61
 
61
- Look for a connection check mark, row counts in your rooms, and a recent "last shipped"
62
+ Look for a connection check mark, row counts in your tables, and a recent "last shipped"
62
63
  time. `memhouse doctor` goes further. It checks the whole pipeline and names anything
63
64
  skipped.
64
65
 
@@ -66,11 +67,13 @@ skipped.
66
67
 
67
68
  ```bash
68
69
  memhouse start
70
+ memhouse dashboard
69
71
  ```
70
72
 
71
- This starts two background daemons. The shipper runs an incremental pass every five
72
- minutes. The dashboard runs at **http://localhost:4640**: sessions, cost by model and
73
- editor, tool calls, and which machine wrote what.
73
+ `start` runs two background daemons. The shipper runs an incremental pass every five
74
+ minutes. The dashboard shows sessions, cost by model and editor, tool calls, and which
75
+ machine wrote what. `memhouse dashboard` opens it in your browser; the dashboard requires a
76
+ token only your account can read, and that command hands it to the page.
74
77
 
75
78
  Those daemons do not survive a reboot. To make them permanent:
76
79
 
@@ -1,7 +1,7 @@
1
1
  # Tutorial 2: join a team's house
2
2
 
3
3
  Someone runs a house and invited you. They gave you a file named `invite-<you>.env`. At the
4
- end of this tutorial your sessions ship into your own rooms in their house, under a
4
+ end of this tutorial your sessions ship into your own tables in their house, under a
5
5
  password only you know.
6
6
 
7
7
  **You need:**
@@ -26,16 +26,25 @@ memhouse install --env invite-<you>.env
26
26
  ```
27
27
 
28
28
  This reads the house's address, your member name and a starting password from the file.
29
- It then connects, checks that you can write to your rooms, and ships every session on
30
- this machine. Your rooms already exist and are named for you: `mem.<you>_messages`,
31
- `mem.<you>_sessions`, and so on. You hold one grant, on `mem.<you>_*`, and nothing else in
32
- the database.
33
-
34
- Then it **offers to change the password** to one only this machine knows. Say yes. The
35
- person who invited you set the starting password, and once you rotate it, theirs stops
36
- working. Then it deletes the invite file, which is spent.
37
-
38
- Scripted, with no terminal: `--yes` rotates without asking.
29
+ It then connects, checks that you can write to your tables, and ships every session on
30
+ this machine. Your tables are named for you: `mem.<you>_session_parts`, `mem.<you>_sessions`
31
+ and four more conversation tables in `mem`, and your two in the capture archive, `mem_archive.<you>_session_units`
32
+ and `_session_sources`. You hold `mem.<you>_*` and those two, and nothing else on the server.
33
+
34
+ If the house is still on the 0.18 rooms (its admin has not converted it yet), the install
35
+ follows the house and ships into `mem.<you>_messages` and the other 0.18 rooms. On
36
+ schema 3 it prints `schema 3 tables for '<you>'`, and `~/.memhouse/env` holds
37
+ `MEMHOUSE_SCHEMA=3`.
38
+
39
+ Then it **changes the password** to a new one only this machine knows, and saves it in
40
+ `~/.memhouse/env`. In a terminal it asks first; say yes. The person who invited you set the
41
+ starting password, and once it is changed, theirs stops working. Then it deletes the invite
42
+ file, which is spent.
43
+
44
+ Scripted, or run by an agent with no terminal, it changes the password without asking.
45
+ `--keep-password` keeps the invited one, and then the person who invited you still knows it.
46
+ If the change fails, the install still completes, keeps the invite file, and tells you to
47
+ run `memhouse passwd`.
39
48
 
40
49
  ## 3. Check who you are
41
50
 
@@ -54,12 +63,12 @@ memhouse start # shipper + dashboard, until the next reboot
54
63
  memhouse service install # or: survive reboots (systemd --user / LaunchAgent)
55
64
  ```
56
65
 
57
- Your dashboard is at http://localhost:4640. It reads the house, so it shows your
58
- sessions from every machine you install on, not just this one.
66
+ `memhouse dashboard` opens your dashboard in the browser. It reads the house, so it shows
67
+ your sessions from every machine you install on, not just this one.
59
68
 
60
69
  ## 5. More machines
61
70
 
62
- Every machine you own ships into the same rooms, and the `host` column tells them apart.
71
+ Every machine you own ships into the same tables, and the `host` column tells them apart.
63
72
  The invite file is spent, so set up the next machine from this one's env file:
64
73
 
65
74
  1. Copy `~/.memhouse/env` to the new machine over a trusted channel, to any path, say
@@ -78,7 +87,7 @@ mints its own.
78
87
 
79
88
  ## 6. Read your teammates' memory
80
89
 
81
- Not yet. Nobody can read your rooms, and you cannot read theirs, until someone runs
90
+ Not yet. Nobody can read your tables, and you cannot read theirs, until someone runs
82
91
  `memhouse share`. [Tutorial 3](03-share-your-memory.md) covers it from both sides.
83
92
 
84
93
  ## When something goes wrong
@@ -1,11 +1,13 @@
1
1
  # Tutorial 3: share your memory
2
2
 
3
- Two members of one house: `alice` and `bob`. Each owns their rooms, and neither can read
4
- the other's. In this tutorial, alice lets bob read one project's history, then everything,
3
+ Two members of one house: `alice` and `bob`. Each owns their tables, and neither can read
4
+ the other's. In this tutorial, alice lets bob read one project's history, then all of it,
5
5
  then takes it back. Bob reads it from his own agent.
6
6
 
7
- **You need:** two members of the same house. If you have one house of your own, see
8
- [Invite members](../guides/invite.md) to add a second.
7
+ **You need:** two members of the same house, on memhouse 0.20. If you have one house of
8
+ your own, see [Invite members](../guides/invite.md) to add a second. On a house still on
9
+ the 0.18 rooms, `share` works the 0.18 way; see
10
+ [Share and revoke](../guides/share.md#a-house-on-the-018-rooms).
9
11
 
10
12
  ## 1. Alice shares one project
11
13
 
@@ -15,57 +17,64 @@ On alice's machine:
15
17
  memhouse share bob --only project=memhouse
16
18
  ```
17
19
 
18
- What this does:
20
+ What this does, in this order:
19
21
 
20
- - grants bob `SELECT` on exactly three of alice's rooms: `alice_sessions`,
21
- `alice_messages` and `alice_tool_calls`;
22
- - adds row policies so that, in those rooms, bob sees only rows where
23
- `project = 'memhouse'`.
22
+ 1. adds a row policy to each of alice's six conversation tables, so bob sees only rows
23
+ where `project = 'memhouse'`. The three tables with a `project` column
24
+ (`alice_session_parts`, `alice_calls`, `alice_sessions`) pass those rows; the usage, link
25
+ and lifecycle tables have none, so they pass nothing, and the `sessions` row carries the
26
+ totals;
27
+ 2. grants bob `SELECT` on exactly those six tables.
24
28
 
25
- Bob gets nothing else. Alice's stats tables, `meta` and `events` stay closed to him, as
26
- does any room alice gains later.
29
+ The filters go in before the grant, so bob never holds an unfiltered moment. He gets
30
+ nothing else: not alice's capture archive (`mem_archive`), not `alice_meta` or
31
+ `alice_events`, and no table alice gains later.
27
32
 
28
33
  Other scopes work the same way:
29
34
 
30
- - `session=…`
31
- - `host=…`
32
- - `source=…` (an editor, as stored: `claude-code`, `codex`, …)
35
+ - `session=…`: a session ref as `memhouse q recent` prints it (`<harness>:<id>~…`), or a
36
+ bare id
37
+ - `harness=…`: an editor, as stored (`claude-code`, `codex`, `opencode`, …); `source=`
38
+ means the same
39
+ - `host=…`: one machine, by the id `memhouse doctor` lists under "host identity"
33
40
  - `folder=…`
34
- - `since=…` and `until=…` (dates)
41
+ - `since=…` and `until=…`: dates; message parts, usage, calls and lifecycle records by their
42
+ own time, sessions by their start. A row with no time never matches, and neither does a
43
+ link
35
44
 
36
45
  Before it creates the first policy, `share` checks how the server treats readers that
37
46
  have no policy of their own: alice, and anyone with a full share. On some server
38
47
  configurations, a table's first row policy blinds those readers to every row. On such a
39
- server, `share` refuses rather than lock alice out of her own rooms.
48
+ server, `share` refuses rather than lock alice out of her own tables.
40
49
 
41
50
  ## 2. Bob reads it
42
51
 
43
- Bob's credential can now see three of alice's rooms. From any ClickHouse client, or
44
- `/mem:sql` in bob's agent:
52
+ Bob's credential can now see six of alice's tables. From any ClickHouse client, or by
53
+ asking his agent (`/mem:sql`):
45
54
 
46
55
  ```sql
47
- SELECT project, count() FROM mem.alice_messages GROUP BY project
56
+ SELECT project, count() FROM mem.alice_session_parts FINAL WHERE removed = 0 GROUP BY project
48
57
  -- one row: memhouse
49
58
 
50
- SELECT count() FROM mem.alice_session_stats
59
+ SELECT count() FROM mem.alice_meta
51
60
  -- refused: bob holds no grant on it
52
61
  ```
53
62
 
54
- A query that strays outside the scope returns nothing, or is refused for the tables bob
55
- was never granted. It never returns more than the scope.
63
+ A query that strays outside the scope returns nothing, or is refused for a table bob was
64
+ never granted. It never returns more than the scope.
56
65
 
57
- ## 3. Alice widens it to everything
66
+ ## 3. Alice widens it to all her sessions
58
67
 
59
68
  ```bash
60
69
  memhouse share bob
61
70
  ```
62
71
 
63
- A **full share** with no `--only`. Bob can now read all of `mem.alice_*`, including the
64
- stats, `meta` (alice's other share records among it) and `events`. The command says so
65
- when it runs. Use a full share for someone you would hand your laptop to.
72
+ A **full share**, with no `--only`. Bob keeps `SELECT` on the same six tables, and the
73
+ row policies are dropped once the grant is confirmed, so he now reads every session.
74
+ That is all a full share reaches: the archive, `meta` and `events` stay closed.
66
75
 
67
- Going back from full to scoped is the same `--only` command. It takes the wildcard grant
68
- back first, so a failure part-way leaves bob with less access, never more.
76
+ Going back from full to scoped is the same `--only` command. The filters are written first,
77
+ so bob's view narrows before anything else changes.
69
78
 
70
79
  ## 4. See who can read what
71
80
 
@@ -88,9 +97,9 @@ part-way, the policies stay, so bob never ends up with an unfiltered share.
88
97
  ## What sharing cannot do
89
98
 
90
99
  - **Recall what was already read.** Bob may have copied rows while he could read them.
91
- - **Write.** A share is read-only. Only alice writes into alice's rooms.
100
+ - **Write.** A share is read-only. Only alice writes into alice's tables.
92
101
  - **End with a password change.** Grants belong to the user, not the password. To cut
93
102
  bob off, revoke.
94
103
 
95
- More detail, including what a full share exposes and why scoped shares are table by
96
- table: [Share and revoke](../guides/share.md).
104
+ More detail, including how a 0.18 share moves when a house is converted:
105
+ [Share and revoke](../guides/share.md).
@@ -882,85 +882,6 @@ function getMessages(chat) {
882
882
  return messages;
883
883
  }
884
884
 
885
- // ============================================================
886
- // Usage / quota data from language server RPC
887
- // ============================================================
888
-
889
- function getUsage() {
890
- const { isSubscriptionAccessAllowed } = require('./base');
891
- if (!isSubscriptionAccessAllowed()) return null;
892
- const resp = callRpc('GetUserStatus', {});
893
- if (!resp || !resp.userStatus) return null;
894
-
895
- const us = resp.userStatus;
896
- const ps = us.planStatus || {};
897
- const pi = ps.planInfo || {};
898
- const modelConfigs = (us.cascadeModelConfigData || {}).clientModelConfigs || [];
899
-
900
- const models = modelConfigs.map((m) => {
901
- const qi = m.quotaInfo || {};
902
- return {
903
- label: m.label || null,
904
- model: m.modelOrAlias?.model || null,
905
- remainingFraction: qi.remainingFraction != null ? qi.remainingFraction : null,
906
- resetTime: qi.resetTime || null,
907
- supportsImages: m.supportsImages || false,
908
- };
909
- });
910
-
911
- // Antigravity returns credits already in display units (no ÷100 needed)
912
- const promptAlloc = ps.availablePromptCredits || 0;
913
- const promptUsed = ps.usedPromptCredits || 0;
914
- const flexAlloc = ps.availableFlexCredits || 0;
915
- const flexUsed = ps.usedFlexCredits || 0;
916
- const flowAlloc = ps.availableFlowCredits || 0;
917
-
918
- const remainingPrompt = Math.max(0, promptAlloc - promptUsed);
919
- const remainingFlex = Math.max(0, flexAlloc - flexUsed);
920
- const totalRemaining = remainingPrompt + remainingFlex;
921
-
922
- // Credit multipliers per model
923
- const creditMultipliers = (pi.creditMultiplierOverrides || []).reduce((acc, entry) => {
924
- const model = entry.modelOrAlias?.model;
925
- if (model && entry.creditMultiplier != null) acc[model] = entry.creditMultiplier;
926
- return acc;
927
- }, {});
928
-
929
- return {
930
- source: 'antigravity',
931
- plan: {
932
- name: pi.planName || null,
933
- tier: pi.teamsTier || null,
934
- monthlyPromptCredits: (pi.monthlyPromptCredits || 0) / 100,
935
- monthlyFlowCredits: (pi.monthlyFlowCredits || 0) / 100,
936
- canBuyMoreCredits: pi.canBuyMoreCredits || false,
937
- },
938
- usage: {
939
- promptCredits: { allocated: promptAlloc, used: promptUsed, remaining: remainingPrompt },
940
- flexCredits: { allocated: flexAlloc, used: flexUsed, remaining: remainingFlex },
941
- flowCredits: { allocated: flowAlloc },
942
- totalRemainingCredits: totalRemaining,
943
- },
944
- billingCycle: {
945
- start: ps.planStart || null,
946
- end: ps.planEnd || null,
947
- },
948
- features: {
949
- webSearch: pi.cascadeWebSearchEnabled || false,
950
- browser: pi.browserEnabled || false,
951
- knowledgeBase: pi.knowledgeBaseEnabled || false,
952
- autoRunCommands: pi.cascadeCanAutoRunCommands || false,
953
- commitMessages: pi.canGenerateCommitMessages || false,
954
- },
955
- models,
956
- creditMultipliers,
957
- user: {
958
- name: us.name || null,
959
- email: us.email || null,
960
- },
961
- };
962
- }
963
-
964
885
  function resetCache() { _lsCache = null; _lsCacheCheckedAt = 0; _modelMap = null; _sessionFolderMap = null; }
965
886
 
966
887
  const labels = { 'antigravity': 'Antigravity' };
@@ -1048,4 +969,4 @@ function getMCPServers() {
1048
969
  ];
1049
970
  }
1050
971
 
1051
- module.exports = { name, labels, getChats, getMessages, resetCache, getUsage, getArtifacts, getMCPServers };
972
+ module.exports = { name, labels, getChats, getMessages, resetCache, getArtifacts, getMCPServers };