memhouse 0.12.5 → 0.12.6
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/bin/memhouse.js
CHANGED
|
@@ -687,6 +687,11 @@ GRANT SELECT ON ${db}.* TO ${member} WITH GRANT OPTION;
|
|
|
687
687
|
-- trust model, flagged by \`memhouse doctor\`, and re-asserted on every \`ship --ensure-schema\`.
|
|
688
688
|
GRANT ALTER USER ON ${member} TO ${member};
|
|
689
689
|
|
|
690
|
+
-- See the OTHER members, read-only. SHOW USERS lets \`/mem:users\` list who is on this
|
|
691
|
+
-- ClickHouse (names only — no passwords, no data) so a member can find who to share with.
|
|
692
|
+
-- It grants no read of anyone's rows; reading a housemate's memory still needs /mem:share.
|
|
693
|
+
GRANT SHOW USERS ON *.* TO ${member};
|
|
694
|
+
|
|
690
695
|
-- Pin async_insert on the user (ADD SETTING merges; a bare SETTINGS clause would replace
|
|
691
696
|
-- the user's whole list). The pin keeps the user_id stamp honest: a MATERIALIZED
|
|
692
697
|
-- currentUser() is computed during the INSERT, and an async flush stores it as the empty
|
|
@@ -795,8 +800,14 @@ async function adminBootstrap(cfg, admin) {
|
|
|
795
800
|
// self-rotation.
|
|
796
801
|
try { await q(`GRANT ALTER USER ON ${admin.member} TO ${admin.member}`, { database: '' }); }
|
|
797
802
|
catch { /* admin without access-management: passwd stays admin-assisted for this member */ }
|
|
803
|
+
// See the OTHER members, read-only: SHOW USERS lets `/mem:users` list who is on this
|
|
804
|
+
// ClickHouse (names only — no passwords, no data) so a member can find who to share
|
|
805
|
+
// with. It grants no read of anyone's rows; that still needs an explicit /mem:share.
|
|
806
|
+
// Best-effort like ALTER USER above — an admin without access-management just skips it.
|
|
807
|
+
try { await q(`GRANT SHOW USERS ON *.* TO ${admin.member}`, { database: '' }); }
|
|
808
|
+
catch { /* no access-management: /mem:users section 4 stays admin-only for this member */ }
|
|
798
809
|
await q(`ALTER USER ${admin.member} ADD SETTING ${MEMBER_PIN}`, { database: '' });
|
|
799
|
-
console.log(ok(`granted the house: ALL ON ${cfg.db}.* to '${admin.member}', async_insert pinned`));
|
|
810
|
+
console.log(ok(`granted the house: ALL ON ${cfg.db}.* to '${admin.member}', SHOW USERS, async_insert pinned`));
|
|
800
811
|
} catch (e) {
|
|
801
812
|
console.log(bad(`could not grant the house to '${admin.member}': ${e.message}`));
|
|
802
813
|
if (createdUser) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mem",
|
|
3
3
|
"description": "Conversation memory for AI agents over the memhouse typed ClickHouse store: ask, search, browse, analyze, check, share, and invite across all 17 supported editors and machines. Skills install as /mem:hello, /mem:ask, /mem:search, /mem:sessions, /mem:share, /mem:invite, /mem:sql, /mem:status, and /mem:users.",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.6",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ramazan Polat"
|
|
7
7
|
},
|
|
@@ -103,5 +103,19 @@ Also worth naming: `memhouse start` serves a dashboard at http://localhost:4640
|
|
|
103
103
|
browsing and analytics outside the chat, and everything here is read-only for agents —
|
|
104
104
|
only the shipper writes.
|
|
105
105
|
|
|
106
|
+
**Freshness check** — quietly compare the installed client to the latest release; mention
|
|
107
|
+
it ONLY if there's a real gap (don't clutter the welcome otherwise):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
INSTALLED=$(memhouse version 2>/dev/null | head -1 | tr -d '[:space:]')
|
|
111
|
+
LATEST=$(curl -sS -m 5 https://registry.npmjs.org/memhouse/latest 2>/dev/null | sed -n 's/.*"version":"\([^"]*\)".*/\1/p')
|
|
112
|
+
echo "installed=${INSTALLED:-unknown} latest=${LATEST:-unknown}"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
If the installed version is a MINOR or MAJOR behind (or many patches), add one line:
|
|
116
|
+
"heads-up — you're on 0.A.B, 0.C.D is out; `memhouse update` upgrades it and refreshes
|
|
117
|
+
these `/mem:*` skills." A patch or two behind isn't worth mentioning here. Never run the
|
|
118
|
+
update yourself.
|
|
119
|
+
|
|
106
120
|
End by offering one concrete action: a search for something they mentioned recently, or
|
|
107
121
|
`/mem:status` if they seem unsure it's working. One offer, not a menu.
|
|
@@ -106,9 +106,34 @@ rows but NO `client_*` record is a **pre-0.10 memhouse still writing** — flag
|
|
|
106
106
|
re-ships delete retained parses, and the fixes are upgrade it or (as admin)
|
|
107
107
|
`REVOKE ALTER DELETE, ALTER UPDATE ON <db>.* FROM <member>`.
|
|
108
108
|
|
|
109
|
+
**5. Client freshness** — is the installed memhouse behind the published release? This is a
|
|
110
|
+
shell check, not SQL (it reads the local binary and the npm registry, no house involved):
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
INSTALLED=$(memhouse version 2>/dev/null | head -1 | tr -d '[:space:]')
|
|
114
|
+
LATEST=$(curl -sS -m 5 https://registry.npmjs.org/memhouse/latest 2>/dev/null | sed -n 's/.*"version":"\([^"]*\)".*/\1/p')
|
|
115
|
+
echo "installed=${INSTALLED:-unknown} latest=${LATEST:-unknown}"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Compare the two as `MAJOR.MINOR.PATCH`. Report freshness, and size the nudge to the gap:
|
|
119
|
+
|
|
120
|
+
- **up to date** (installed ≥ latest) — one line: "client 0.X.Y, current."
|
|
121
|
+
- **small gap** (same major+minor, a patch or two behind) — a gentle note: "a newer patch
|
|
122
|
+
0.X.Z is out; `memhouse update` when convenient."
|
|
123
|
+
- **big gap** (latest MAJOR or MINOR is ahead, or many patches) — surface it prominently and
|
|
124
|
+
**offer to update**: "your memhouse is 0.A.B but 0.C.D is released — run **`memhouse
|
|
125
|
+
update`** to upgrade; it also refreshes the `/mem:*` plugin, then `/reload-plugins`."
|
|
126
|
+
- either side **unknown** (no binary on PATH, or the registry did not answer) — say which,
|
|
127
|
+
don't guess. A plugin-only install with no CLI can't self-update; point at
|
|
128
|
+
`npm i -g memhouse`.
|
|
129
|
+
|
|
130
|
+
Never run `memhouse update` yourself — it restarts daemons and may migrate the house.
|
|
131
|
+
Offer the command; the pilot runs it.
|
|
132
|
+
|
|
109
133
|
## Presenting it
|
|
110
134
|
|
|
111
135
|
Lead with one line of verdict ("healthy: N sessions across M editors, last ingest X
|
|
112
136
|
minutes ago" — or the one thing wrong). Then the per-editor table, then anything from
|
|
113
|
-
sections 3–
|
|
114
|
-
|
|
137
|
+
sections 3–5 that needs action. A **big version gap (section 5) is an action** — put the
|
|
138
|
+
`memhouse update` offer near the top, not buried. Skip empty sections; do not pad. If the
|
|
139
|
+
house is unreachable, say which URL refused and stop — never guess another endpoint.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memhouse",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
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": {
|