hippo-memory 0.29.2 → 0.29.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
@@ -60,6 +60,10 @@ hippo recall "data pipeline issues" --budget 2000
60
60
 
61
61
  ---
62
62
 
63
+ ### What's new in v0.29.3
64
+
65
+ - **Post-install banner for Claude Code users.** After `npm install -g hippo-memory`, if Claude Code is detected but the Hippo hook isn't wired yet, a three-line message points the user at `hippo init`. Silent on reinstalls or machines without Claude Code. Opt out via `HIPPO_SKIP_POSTINSTALL=1`.
66
+
63
67
  ### What's new in v0.29.2
64
68
 
65
69
  - **Fix UserPromptSubmit hook in fresh directories.** In v0.29.0/0.29.1, the `hippo context --pinned-only` hook errored with "No .hippo directory found" every time Claude Code opened a session in a cwd without a local hippo store, and would silently auto-create `.hippo/` there. Fixed: pinned-only falls back to global-only, leaves cwd untouched.
@@ -1,3 +1,6 @@
1
+ import * as fs from 'node:fs';
2
+ import * as os from 'node:os';
3
+ import * as path from 'node:path';
1
4
  import { ensureCodexWrapperInstalled } from './hooks.js';
2
5
  function main() {
3
6
  if (process.env.HIPPO_SKIP_POSTINSTALL === '1')
@@ -8,6 +11,58 @@ function main() {
8
11
  catch {
9
12
  // Never fail package install because auto-integration could not be applied.
10
13
  }
14
+ try {
15
+ printClaudeCodeNudge();
16
+ }
17
+ catch {
18
+ // Never fail package install because the install hint could not be printed.
19
+ }
20
+ }
21
+ /**
22
+ * Read-only nudge: if Claude Code is detected on the machine and the Hippo
23
+ * UserPromptSubmit hook is NOT yet installed, print a short message pointing
24
+ * the user at `hippo init`. No config writes. Silent otherwise.
25
+ *
26
+ * We avoid aggressively auto-patching ~/.claude/settings.json from a package
27
+ * postinstall — that's surprising, breaks the principle of least authority,
28
+ * and trips security scanners. A one-line visible prompt is the friendly
29
+ * middle ground.
30
+ */
31
+ function printClaudeCodeNudge() {
32
+ const home = os.homedir();
33
+ const claudeDir = path.join(home, '.claude');
34
+ if (!fs.existsSync(claudeDir))
35
+ return; // Claude Code not installed — silent
36
+ const settingsPath = path.join(claudeDir, 'settings.json');
37
+ if (fs.existsSync(settingsPath)) {
38
+ try {
39
+ const raw = fs.readFileSync(settingsPath, 'utf8');
40
+ if (raw.includes('hippo context --pinned-only'))
41
+ return; // already installed
42
+ }
43
+ catch {
44
+ // Fall through: on read failure, still show the nudge — a broken
45
+ // settings.json is a bigger problem for the user to see.
46
+ }
47
+ }
48
+ // Use stderr so the banner doesn't get piped into scripts reading package
49
+ // output on stdout.
50
+ const line = (s) => process.stderr.write(s + '\n');
51
+ line('');
52
+ line('hippo-memory installed. Claude Code detected on this machine.');
53
+ line('');
54
+ line('To wire Hippo into Claude Code (session hooks + mid-session pinned');
55
+ line('rule re-injection), run ONE of these in your project directory:');
56
+ line('');
57
+ line(' hippo init # initialize + install hooks for this project');
58
+ line(' hippo hook install claude-code # hooks only, no local store');
59
+ line('');
60
+ line('Or machine-wide pinned memories:');
61
+ line('');
62
+ line(' hippo init --global');
63
+ line('');
64
+ line('To skip this message on future installs: export HIPPO_SKIP_POSTINSTALL=1');
65
+ line('');
11
66
  }
12
67
  main();
13
68
  //# sourceMappingURL=postinstall.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../src/postinstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAEzD,SAAS,IAAI;IACX,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,GAAG;QAAE,OAAO;IAEvD,IAAI,CAAC;QACH,2BAA2B,EAAE,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,4EAA4E;IAC9E,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../src/postinstall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,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AAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,+DAA+D,CAAC,CAAC;IACtE,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,oEAAoE,CAAC,CAAC;IAC3E,IAAI,CAAC,iEAAiE,CAAC,CAAC;IACxE,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,+EAA+E,CAAC,CAAC;IACtF,IAAI,CAAC,mEAAmE,CAAC,CAAC;IAC1E,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,kCAAkC,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,IAAI,CAAC,0EAA0E,CAAC,CAAC;IACjF,IAAI,CAAC,EAAE,CAAC,CAAC;AACX,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  "id": "hippo-memory",
3
3
  "name": "Hippo Memory",
4
4
  "description": "Biologically-inspired memory for AI agents. Decay by default, retrieval strengthening, sleep consolidation.",
5
- "version": "0.29.2",
5
+ "version": "0.29.3",
6
6
 
7
7
  "configSchema": {
8
8
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hippo-memory",
3
- "version": "0.29.2",
3
+ "version": "0.29.3",
4
4
  "description": "Hippo Memory plugin for OpenClaw - biologically-inspired agent memory",
5
5
  "main": "index.ts",
6
6
  "openclaw": {
@@ -2,7 +2,7 @@
2
2
  "id": "hippo-memory",
3
3
  "name": "Hippo Memory",
4
4
  "description": "Biologically-inspired memory for AI agents. Decay by default, retrieval strengthening, sleep consolidation.",
5
- "version": "0.29.2",
5
+ "version": "0.29.3",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hippo-memory",
3
- "version": "0.29.2",
3
+ "version": "0.29.3",
4
4
  "description": "Biologically-inspired memory system for AI agents. Decay by default, strength through use.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",