@psiclawops/hypermem 0.9.3 → 0.9.4

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 (51) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/INSTALL.md +71 -68
  3. package/README.md +11 -29
  4. package/assets/default-config.json +47 -0
  5. package/bin/hypermem-doctor.mjs +76 -2
  6. package/bin/hypermem-status.mjs +255 -7
  7. package/dist/adaptive-lifecycle.d.ts +39 -0
  8. package/dist/adaptive-lifecycle.d.ts.map +1 -1
  9. package/dist/adaptive-lifecycle.js +87 -9
  10. package/dist/background-indexer.d.ts.map +1 -1
  11. package/dist/background-indexer.js +7 -5
  12. package/dist/compositor.d.ts.map +1 -1
  13. package/dist/compositor.js +239 -20
  14. package/dist/hybrid-retrieval.d.ts +8 -0
  15. package/dist/hybrid-retrieval.d.ts.map +1 -1
  16. package/dist/hybrid-retrieval.js +112 -10
  17. package/dist/index.d.ts +15 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +17 -0
  20. package/dist/message-store.d.ts +62 -1
  21. package/dist/message-store.d.ts.map +1 -1
  22. package/dist/message-store.js +355 -2
  23. package/dist/open-domain.d.ts.map +1 -1
  24. package/dist/open-domain.js +3 -2
  25. package/dist/proactive-pass.d.ts +42 -2
  26. package/dist/proactive-pass.d.ts.map +1 -1
  27. package/dist/proactive-pass.js +294 -39
  28. package/dist/topic-synthesizer.d.ts.map +1 -1
  29. package/dist/topic-synthesizer.js +9 -3
  30. package/dist/types.d.ts +99 -0
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/vector-store.d.ts +10 -1
  33. package/dist/vector-store.d.ts.map +1 -1
  34. package/dist/vector-store.js +45 -9
  35. package/docs/DIAGNOSTICS.md +87 -0
  36. package/docs/INTEGRATION_VALIDATION.md +40 -1
  37. package/docs/ROADMAP.md +25 -12
  38. package/docs/TUNING.md +45 -4
  39. package/install.sh +5 -60
  40. package/memory-plugin/dist/index.js +192 -0
  41. package/memory-plugin/openclaw.plugin.json +199 -2
  42. package/memory-plugin/package.json +2 -2
  43. package/package.json +21 -8
  44. package/plugin/dist/index.d.ts +2 -0
  45. package/plugin/dist/index.d.ts.map +1 -1
  46. package/plugin/dist/index.js +175 -8
  47. package/plugin/dist/index.js.map +1 -1
  48. package/plugin/openclaw.plugin.json +199 -2
  49. package/plugin/package.json +2 -2
  50. package/scripts/install-packed-runtime.mjs +99 -0
  51. package/scripts/install-runtime.mjs +164 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to hypermem are documented here.
4
4
 
5
+ ## 0.9.4 - 2026-04-28
6
+
7
+ - **Recall surface re-enriched.** Bootstrap, warmup, and steady lifecycle bands now carry larger warming fractions, `/new` and topic-shift recall surge harder, and topic-bearing warmup avoids heartbeat/small-talk decay.
8
+ - **Adjacency-aware preservation added.** Hybrid retrieval boosts recent antecedents while filtering heartbeat/system noise, and compose eviction guards the literal antecedent under non-critical pressure.
9
+ - **Install path hardened.** `hypermem-install` ships the doctor, bench, and default config artifacts, writes `~/.openclaw/hypermem/config.json` only when missing, probes the default Ollama embedder, preserves existing config, supports CI-safe flags, and rejects unknown options.
10
+ - **Fresh-install smoke gate added.** `release-gate-internal/fresh-install-smoke.sh` packs the npm artifact, installs it in the PsiClawOps Docker test image without a source mount, verifies graceful no-tools failure, verifies skip-mode staging, and proves existing config is not overwritten.
11
+ - **Installer failure artifacts captured.** Failed smoke runs now preserve logs, generated configs, package metadata, the packed tarball, and container `/tmp` inventories under `.artifacts/fresh-install-smoke/` for postmortem reuse.
12
+
13
+ ## 0.9.3 - OpenClaw 2026.4.26 compatibility hardening
14
+
15
+ - **Plugin manifests declare runtime config schema.** HyperCompositor and HyperMem memory manifests now expose the supported config surface for OpenClaw 2026.4.26 registry/config validation.
16
+ - **Install and doctor flow aligned with persisted plugin registry.** Operator guidance and `hypermem-doctor` now include registry refresh, doctor repair, and plugin-list verification steps.
17
+ - **Native compaction collision guard added.** `hypermem-doctor` warns when `agents.defaults.compaction.maxActiveTranscriptBytes` is set; HyperMem deployments should leave it unset so HyperMem remains the single trim/compose pressure owner.
18
+ - **Embedding query/document asymmetry supported.** HyperMem config now supports query/document input types and prefixes, with defaults for `nomic-embed-text`, `qwen3-embedding`, and `mxbai-embed-large`.
19
+ - **Forked subagent warm-start repair.** `prepareSubagentSpawn()` falls back to durable runtime history when the hot cache is empty, so forked children inherit parent working context instead of silently starting cold.
20
+
5
21
  ## 0.9.2 - 0.9.1 republish + publish-path hardening
6
22
 
7
23
  - **0.9.1 was a broken publish.** The npm tarballs for `@psiclawops/hypermem@0.9.1`, `@psiclawops/hypercompositor@0.9.1`, and `@psiclawops/hypermem-memory@0.9.1` shipped without `dist/`, so `import` against the registry artifact fails with `ERR_MODULE_NOT_FOUND`. **Skip 0.9.1.** Operators currently on 0.9.1 should upgrade to 0.9.2.
package/INSTALL.md CHANGED
@@ -5,17 +5,17 @@ This is the canonical install procedure. Keep README shorter and point operators
5
5
  ## Prerequisites
6
6
 
7
7
  - **Node.js 22+** (uses built-in `node:sqlite`)
8
- - **OpenClaw** must already be installed, onboarded, and running. HyperMem is a plugin for an existing OpenClaw deployment -- it does not bootstrap OpenClaw itself. If you have never run `openclaw gateway start` or completed OpenClaw onboarding, do that first. The HyperMem install guide picks up after OpenClaw is operational.
8
+ - **OpenClaw** must already be installed, onboarded, and running. HyperMem is a plugin for an existing OpenClaw deployment -- it does not bootstrap OpenClaw itself. If you have never run `openclaw daemon start` or completed OpenClaw onboarding, do that first. The HyperMem install guide picks up after OpenClaw is operational.
9
9
  - **Disk space:** allow at least 2 GB free. Plugin builds pull OpenClaw as a dev dependency.
10
10
 
11
11
  **Verify before starting:**
12
12
 
13
13
  ```bash
14
- openclaw gateway status # should show "running" or "ready"
14
+ openclaw daemon status # should show "running" or "ready"
15
15
  openclaw config get gateway # should return gateway config, not an error
16
16
  ```
17
17
 
18
- If `gateway status` shows "disabled" or "not configured", complete OpenClaw onboarding first. `openclaw gateway restart` only works when the gateway service is already set up. On a brand-new OpenClaw install that has never been started, you need `openclaw gateway start` (or the full onboarding flow) before installing plugins.
18
+ If `gateway status` shows "disabled" or "not configured", complete OpenClaw onboarding first. `openclaw daemon restart` only works when the gateway service is already set up. On a brand-new OpenClaw install that has never been started, you need `openclaw daemon start` (or the full onboarding flow) before installing plugins.
19
19
 
20
20
  ## Non-OpenClaw usage
21
21
 
@@ -58,7 +58,9 @@ npm install @psiclawops/hypermem
58
58
  npx hypermem-install
59
59
  ```
60
60
 
61
- `hypermem-install` stages the plugin runtime into `~/.openclaw/plugins/hypermem`. It does **not** modify your OpenClaw config and does **not** restart the gateway. That means a successful `npx hypermem-install` is **not** a completed install. It is only a completed staging step.
61
+ `hypermem-install` stages the plugin runtime into `~/.openclaw/plugins/hypermem` and writes `~/.openclaw/hypermem/config.json` only if that file does not already exist. It does **not** modify your OpenClaw config and does **not** restart the gateway. That means a successful `npx hypermem-install` is **not** a completed install. It is only a completed staging step.
62
+
63
+ For local release validation, use `npm run install:runtime:packed` from the repo. That command builds an npm tarball, installs that tarball into a temporary app, and stages the runtime from the installed package. Do not validate production behavior from a repo symlink or copied working-tree files.
62
64
 
63
65
  The shell installer is now a thin npm-first wrapper around this same path:
64
66
 
@@ -66,44 +68,28 @@ The shell installer is now a thin npm-first wrapper around this same path:
66
68
  curl -fsSL https://raw.githubusercontent.com/PsiClawOps/hypermem/main/install.sh | bash
67
69
  ```
68
70
 
69
- It installs the npm package into `~/.hypermem`, backs up any existing staged runtime when confirmed, stages the runtime with `hypermem-install`, writes a lightweight starter config only if no config exists, and prints merge-safe OpenClaw activation commands. It does not edit OpenClaw config and does not restart the gateway.
71
+ It installs the npm package into `~/.hypermem`, backs up any existing staged runtime when confirmed, stages the runtime with `hypermem-install`, writes the recall-friendly starter config only if no config exists, and prints merge-safe OpenClaw activation commands. It does not edit OpenClaw config and does not restart the gateway.
70
72
 
71
73
  Release validation details live in [docs/INTEGRATION_VALIDATION.md](./docs/INTEGRATION_VALIDATION.md). Diagnostic surfaces live in [docs/DIAGNOSTICS.md](./docs/DIAGNOSTICS.md).
72
74
 
73
- > **Prerequisites:** OpenClaw must be installed and onboarded. Run `openclaw gateway status` to confirm. If the gateway is not configured, complete OpenClaw setup first.
75
+ > **Prerequisites:** OpenClaw must be installed and onboarded. Run `openclaw daemon status` to confirm. If the gateway is not configured, complete OpenClaw setup first.
74
76
  >
75
77
  > **Config merge warning:** if you already have values in `plugins.load.paths` or `plugins.allow`, merge them instead of overwriting blindly.
76
78
 
77
- Create the config directory and write the current recommended fresh-install starter config. This does 2 things:
79
+ `hypermem-install` creates the current recommended starter config automatically when `~/.openclaw/hypermem/config.json` is missing. The shipped starter config is recall-friendly standard mode:
80
+
81
+ - `embedding.provider: "ollama"` with `nomic-embed-text`
82
+ - `warmHistoryBudgetFraction: 0.45`
83
+ - standard fact, keystone, and history caps
78
84
 
79
- 1. sets `embedding.provider` to `none` so a clean install does not try to use Ollama by default
80
- 2. applies the current recommended lean compositor settings so fresh installs start from the same OpenClaw and HyperMem guidance we want operators to use
85
+ If Ollama is not running or `nomic-embed-text` is not installed, `hypermem-install` fails with a remediation block instead of silently staging a degraded semantic-recall install. For CI, container practice, or intentional FTS-only installs, either run:
81
86
 
82
87
  ```bash
83
- mkdir -p ~/.openclaw/hypermem
84
- cat > ~/.openclaw/hypermem/config.json <<'JSON'
85
- {
86
- "embedding": {
87
- "provider": "none"
88
- },
89
- "compositor": {
90
- "budgetFraction": 0.55,
91
- "contextWindowReserve": 0.25,
92
- "targetBudgetFraction": 0.50,
93
- "warmHistoryBudgetFraction": 0.27,
94
- "maxFacts": 25,
95
- "maxHistoryMessages": 500,
96
- "maxCrossSessionContext": 4000,
97
- "maxRecentToolPairs": 3,
98
- "maxProseToolPairs": 10,
99
- "keystoneHistoryFraction": 0.15,
100
- "keystoneMaxMessages": 12,
101
- "wikiTokenCap": 500
102
- }
103
- }
104
- JSON
88
+ npx hypermem-install --skip-embedding-check
105
89
  ```
106
90
 
91
+ or pre-create `~/.openclaw/hypermem/config.json` with `{"embedding":{"provider":"none"}}` before running the installer. Existing config files are preserved unchanged.
92
+
107
93
  If you want a lighter or richer memory profile later, adjust from this baseline using the tuning guidance below instead of starting from the older code defaults.
108
94
 
109
95
  ### Install states
@@ -141,6 +127,8 @@ openclaw config set plugins.load.paths "$HYPERMEM_PATHS" --strict-json
141
127
  # Set the context engine and memory slots:
142
128
  openclaw config set plugins.slots.contextEngine hypercompositor
143
129
  openclaw config set plugins.slots.memory hypermem
130
+ openclaw plugins registry --refresh
131
+ openclaw doctor --fix --yes
144
132
 
145
133
  # Only set plugins.allow if your OpenClaw config already uses an allowlist.
146
134
  # If `openclaw config get plugins.allow` returns null, empty, or unset, skip this step.
@@ -153,7 +141,7 @@ openclaw config set plugins.allow '["existing-plugin","hypercompositor","hyperme
153
141
  **Step 3: Restart.**
154
142
 
155
143
  ```bash
156
- openclaw gateway restart
144
+ openclaw daemon restart
157
145
  ```
158
146
 
159
147
  OpenClaw loads the plugin runtime from `~/.openclaw/plugins/hypermem/`.
@@ -231,7 +219,7 @@ Upgrades preserve the HyperMem data directory and existing config. The runtime s
231
219
  cp -a ~/.openclaw/plugins/hypermem ~/.openclaw/plugins/hypermem.backup.$(date +%Y%m%d-%H%M%S) 2>/dev/null || true
232
220
  npm install @psiclawops/hypermem@latest
233
221
  npx hypermem-install
234
- openclaw gateway restart
222
+ openclaw daemon restart
235
223
  ```
236
224
 
237
225
  Then validate:
@@ -256,7 +244,7 @@ Rollback disables HyperMem without deleting data:
256
244
  ```bash
257
245
  openclaw config set plugins.slots.contextEngine legacy
258
246
  openclaw config set plugins.slots.memory none
259
- openclaw gateway restart
247
+ openclaw daemon restart
260
248
  ```
261
249
 
262
250
  ---
@@ -561,6 +549,8 @@ openclaw config set plugins.load.paths "$HYPERMEM_PATHS" --strict-json
561
549
  # Set the context engine and memory slots:
562
550
  openclaw config set plugins.slots.contextEngine hypercompositor
563
551
  openclaw config set plugins.slots.memory hypermem
552
+ openclaw plugins registry --refresh
553
+ openclaw doctor --fix --yes
564
554
 
565
555
  # Only set plugins.allow if your OpenClaw config already uses an allowlist.
566
556
  # If it returns an array, append the HyperMem plugin ids to that existing array.
@@ -574,7 +564,7 @@ openclaw config set plugins.allow '["existing-plugin","hypercompositor","hyperme
574
564
  See [Embedding Providers](#embedding-providers) above.
575
565
 
576
566
  - **Lightweight (no embedder):** create `~/.openclaw/hypermem/config.json` with `{"embedding":{"provider":"none"}}`. The Quick Start block above already does this. Without this file, the default provider is `ollama` and you'll see a non-fatal init warning if Ollama isn't running.
577
- - **Local:** `ollama pull nomic-embed-text`. No config file needed (Ollama is the default).
567
+ - **Local:** `ollama pull nomic-embed-text`. No config file needed (Ollama is the default). HyperMem applies retrieval query/document prefixes for supported Ollama embedders (`nomic-embed-text`, `qwen3-embedding`, `mxbai-embed-large`) unless `queryPrefix` / `documentPrefix` are set explicitly.
578
568
  - **Hosted/Gemini:** create `~/.openclaw/hypermem/config.json` with the provider config block from the relevant section above.
579
569
 
580
570
  ### Step 4 — Restart and verify
@@ -582,7 +572,7 @@ See [Embedding Providers](#embedding-providers) above.
582
572
  Do not start tuning before this section passes. If HyperMem is not loaded and composing, the next problem is installation, not tuning.
583
573
 
584
574
  ```bash
585
- openclaw gateway restart
575
+ openclaw daemon restart
586
576
  ```
587
577
 
588
578
  > **If restart reports the gateway is disabled or not configured:** you need to complete OpenClaw onboarding before this step. See [Prerequisites](#prerequisites). `gateway restart` only works on an already-running gateway.
@@ -593,7 +583,7 @@ Send a message to any agent, then check:
593
583
  openclaw logs --limit 50 | grep hypermem
594
584
  ```
595
585
 
596
- > **If `openclaw logs` fails with an auth or token error:** the gateway API requires authentication. Run `openclaw gateway status` to confirm the gateway is running and accessible. If the gateway is running but logs fail, check `openclaw config get gateway.token` and ensure your shell session has the correct auth context.
586
+ > **If `openclaw logs` fails with an auth or token error:** the gateway API requires authentication. Run `openclaw daemon status` to confirm the gateway is running and accessible. If the gateway is running but logs fail, check `openclaw config get gateway.token` and ensure your shell session has the correct auth context.
597
587
 
598
588
  Expected:
599
589
  ```
@@ -678,7 +668,7 @@ architect: 'infrastructure',
678
668
  ```bash
679
669
  npm run build
680
670
  npm --prefix plugin run build
681
- openclaw gateway restart
671
+ openclaw daemon restart
682
672
  ```
683
673
 
684
674
  Agents not listed in `AGENT_DOMAIN_MAP` default to domain `'general'`, which is fine for most setups. The org registry only matters if you use cross-agent memory visibility (org-scoped or council-scoped facts). If all your facts are agent-private or fleet-wide, you can skip the org structure entirely.
@@ -696,7 +686,7 @@ npm install
696
686
  npm run build
697
687
  npm --prefix plugin install && npm --prefix plugin run build
698
688
  npm --prefix memory-plugin install && npm --prefix memory-plugin run build
699
- openclaw gateway restart
689
+ openclaw daemon restart
700
690
  ```
701
691
 
702
692
  What changed on the path from 0.5.x to current:
@@ -775,9 +765,11 @@ openclaw config set agents.defaults.compaction.reserveTokens 16384 --strict-json
775
765
  openclaw config set agents.defaults.compaction.keepRecentTokens 6000 --strict-json
776
766
  openclaw config set agents.defaults.compaction.reserveTokensFloor 15000 --strict-json
777
767
  openclaw config set agents.defaults.compaction.maxHistoryShare 0.65 --strict-json
768
+ # Recommended for HyperMem: leave OpenClaw transcript byte rotation unset.
769
+ openclaw config unset agents.defaults.compaction.maxActiveTranscriptBytes
778
770
  ```
779
771
 
780
- This reserves 16k tokens for reply generation. HyperMem's own pressure system (afterTurn at 80%, nuclear at 85%) fires first in normal operation. OpenClaw's safeguard catches edge cases.
772
+ This reserves 16k tokens for reply generation. HyperMem's own pressure system (afterTurn at 80%, nuclear at 85%) fires first in normal operation. OpenClaw's safeguard catches edge cases. Leave `agents.defaults.compaction.maxActiveTranscriptBytes` unset while HyperMem owns context pressure; native transcript byte rotation can evict transcript spans before HyperMem's fences and repair gates see them.
781
773
 
782
774
  ### LLM idle timeout
783
775
 
@@ -824,41 +816,52 @@ Resolution order is: (1) `plugins.entries.hypercompositor.config` in `openclaw.j
824
816
 
825
817
  These settings live in `~/.openclaw/hypermem/config.json` under the `compositor` key. All fields are optional — omit any knob to get the code-level default. Gateway restart required after changes.
826
818
 
827
- The recommended starting config for a standard single-agent deployment is intentionally lean on turn-1 warming. Semantic recall and fact triggers fire against each incoming message, so topic-relevant context surfaces as the conversation takes shape. This produces a steadier pressure profile than aggressive pre-loading and avoids the warm→trim→compact cycling you see when every session starts near the top of the budget.
819
+ The recommended starting config for a standard single-agent deployment is the same recall-friendly profile shipped in `assets/default-config.json` and written by `hypermem-install` when no config exists. It keeps semantic recall active, protects topic-bearing warm context, boosts recent antecedents, and guards the literal antecedent of the current user turn under non-critical pressure.
820
+
821
+ Key 0.9.4 defaults:
828
822
 
829
823
  ```json
830
824
  {
825
+ "embedding": {
826
+ "provider": "ollama",
827
+ "model": "nomic-embed-text",
828
+ "dims": 768,
829
+ "dimensions": 768
830
+ },
831
831
  "compositor": {
832
- "budgetFraction": 0.55,
832
+ "turnBudget": {
833
+ "budgetFraction": 0.6,
834
+ "minContextFraction": 0.18
835
+ },
836
+ "warming": {
837
+ "protectedFloorEnabled": true,
838
+ "shapedWarmupDecay": true
839
+ },
840
+ "adjacency": {
841
+ "enabled": true,
842
+ "boostMultiplier": 1.3,
843
+ "maxLookback": 5,
844
+ "maxClockDeltaMin": 10,
845
+ "evictionGuardMessages": 3,
846
+ "evictionGuardTokenCap": 4000
847
+ },
848
+ "budgetFraction": 0.6,
833
849
  "contextWindowReserve": 0.25,
834
850
  "targetBudgetFraction": 0.50,
835
- "warmHistoryBudgetFraction": 0.27,
836
- "maxFacts": 25,
837
- "maxHistoryMessages": 500,
838
- "maxCrossSessionContext": 4000,
839
- "maxRecentToolPairs": 3,
840
- "maxProseToolPairs": 10,
841
- "keystoneHistoryFraction": 0.15,
842
- "keystoneMaxMessages": 12,
843
- "wikiTokenCap": 500
851
+ "warmHistoryBudgetFraction": 0.45,
852
+ "maxFacts": 28,
853
+ "maxHistoryMessages": 250,
854
+ "maxCrossSessionContext": 0,
855
+ "keystoneHistoryFraction": 0.20,
856
+ "keystoneMaxMessages": 15,
857
+ "hyperformProfile": "standard"
844
858
  }
845
859
  }
846
860
  ```
847
861
 
848
- | Knob | Recommended | What it controls | Notes |
849
- |---|---|---|---|
850
- | `budgetFraction` | 0.55 | Fraction of the detected context window used as input budget | Raise to 0.65 for agents that aggressively tool-use. Autodetect only handles known model families see *Context window overrides* below for custom/local/finetuned models |
851
- | `contextWindowReserve` | 0.25 | Reserve left for output and tool results | Below 0.20 on large-context models invites late-turn overflow |
852
- | `targetBudgetFraction` | 0.50 | Split between context assembly and history | Higher = richer facts/wiki; lower = more conversation headroom |
853
- | `warmHistoryBudgetFraction` | 0.27 | History's share of first-turn warming | The key lever against tight trim cycles; don't push below 0.20 |
854
- | `maxFacts` | 25 | Structured facts injected per turn | Recall surfaces more as topics emerge; 35 is fine for long-memory seats |
855
- | `maxHistoryMessages` | 500 | Candidate pool for history ranking | Pool size, not load size. 300 is fine for short-session agents |
856
- | `maxCrossSessionContext` | 4000 | Cross-session context tokens | Solo agents with one session: set to 0 |
857
- | `maxRecentToolPairs` | 3 | Verbatim tool pairs kept | Raise to 5 for code agents with heavy tool output |
858
- | `maxProseToolPairs` | 10 | Compressed tool pairs before stubbing | |
859
- | `keystoneHistoryFraction` | 0.15 | Older significant turns reserved within history slot | |
860
- | `keystoneMaxMessages` | 12 | Max keystone candidates per turn | Raise to 18 if the agent loses track of older decisions |
861
- | `wikiTokenCap` | 500 | Cap on wiki/knowledge injection | Raise if your agent uses heavy doc content |
862
+ Run `hypermem-doctor --fix-plan` after upgrades. It flags older preserved configs that are missing the 0.9.4 recall-surface knobs, legacy `agents.defaults.memorySearch`, native compaction collisions, plugin wiring defects, and risky model-window autodetect paths.
863
+
864
+ `hypermem-status --master` also reports the active recall-surface config as `0.9.4 surface N/10 recommended knobs`, plus history-query health, vector coverage, and bounded maintenance debt. Fleet maintenance scans are bounded by default; use `--fleet-agent-limit`, `--max-candidates-per-conversation`, and `--top-agents` only when you intentionally widen the health check. Referenced-noise repair remains capped by `--repair-limit` with a hard max of 500.
862
865
 
863
866
  **Lean profile** (~35–45% fewer tokens per turn) — for constrained hosts, small models, or cost-sensitive deployments:
864
867
 
@@ -997,7 +1000,7 @@ Expected on fresh installs. Facts and episodes accumulate over real conversation
997
1000
 
998
1001
  **Lost bundled plugins after setting `plugins.allow`**
999
1002
 
1000
- If you set `plugins.allow` to only `["hypercompositor","hypermem"]` without including your pre-existing allowed plugins, OpenClaw can stop loading bundled CLI surfaces and channel plugins. Fix: restore the prior allowlist, append `hypercompositor` and `hypermem`, then `openclaw gateway restart`. If `plugins.allow` was previously unset or empty, remove the HyperMem-only allowlist instead of keeping it.
1003
+ If you set `plugins.allow` to only `["hypercompositor","hypermem"]` without including your pre-existing allowed plugins, OpenClaw can stop loading bundled CLI surfaces and channel plugins. Fix: restore the prior allowlist, append `hypercompositor` and `hypermem`, then `openclaw daemon restart`. If `plugins.allow` was previously unset or empty, remove the HyperMem-only allowlist instead of keeping it.
1001
1004
 
1002
1005
  **Plugin not found**
1003
1006
 
@@ -1045,7 +1048,7 @@ To return to OpenClaw's default context engine:
1045
1048
  ```bash
1046
1049
  openclaw config set plugins.slots.contextEngine legacy
1047
1050
  openclaw config set plugins.slots.memory none
1048
- openclaw gateway restart
1051
+ openclaw daemon restart
1049
1052
  ```
1050
1053
 
1051
1054
  Data in `~/.openclaw/hypermem/` is untouched. Re-enable by switching back.
@@ -1063,7 +1066,7 @@ Example:
1063
1066
  ```bash
1064
1067
  # Point hypermem at a different data location:
1065
1068
  export HYPERMEM_DATA_DIR=/mnt/data/hypermem
1066
- openclaw gateway restart
1069
+ openclaw daemon restart
1067
1070
  ```
1068
1071
 
1069
1072
  > The config file path (`~/.openclaw/hypermem/config.json`) is separate from the data directory. Moving `HYPERMEM_DATA_DIR` does not move the config file.
package/README.md CHANGED
@@ -386,7 +386,7 @@ Slot-level budget allocation is shown in the [hypercompositor diagram](#what-the
386
386
 
387
387
  ## Requirements
388
388
 
389
- **Current release: hypermem 0.9.2.** Changelog: [CHANGELOG.md](./CHANGELOG.md)
389
+ **Current release: hypermem 0.9.4.** Changelog: [CHANGELOG.md](./CHANGELOG.md)
390
390
 
391
391
  | Requirement | Version | Notes |
392
392
  |---|---|---|
@@ -398,7 +398,7 @@ SQLite is a library, not a service. All four layers run in-process with no exter
398
398
  **Runtime version constants** (importable from the package):
399
399
  ```typescript
400
400
  import {
401
- ENGINE_VERSION, // '0.9.2'
401
+ ENGINE_VERSION, // '0.9.4'
402
402
  MIN_NODE_VERSION, // '22.0.0'
403
403
  SQLITE_VEC_VERSION, // '0.1.9'
404
404
  MAIN_SCHEMA_VERSION, // 10 (messages.db)
@@ -423,7 +423,9 @@ npm install @psiclawops/hypermem
423
423
  npx hypermem-install
424
424
  ```
425
425
 
426
- `hypermem-install` stages the runtime payload into `~/.openclaw/plugins/hypermem`. It does **not** modify OpenClaw config and does **not** restart the gateway. HyperMem is active only after OpenClaw is wired, restarted, and compose activity appears in logs.
426
+ `hypermem-install` stages the runtime payload into `~/.openclaw/plugins/hypermem` and creates `~/.openclaw/hypermem/config.json` only when it is missing. It does **not** modify OpenClaw config and does **not** restart the gateway. HyperMem is active only after OpenClaw is wired, restarted, and compose activity appears in logs.
427
+
428
+ For production-shaped local validation, run `npm run install:runtime:packed` from the repo. It packs HyperMem, installs the tarball into a temporary app, and stages OpenClaw from that installed package. Avoid validating live gateway behavior from repo symlinks or copied working-tree files.
427
429
 
428
430
  Install states:
429
431
 
@@ -435,30 +437,7 @@ Install states:
435
437
  | Runtime loaded | gateway restarted and both plugins loaded |
436
438
  | Runtime active | logs show `hypermem initialized` and compose activity |
437
439
 
438
- Minimal starter config for lightweight FTS-only mode:
439
-
440
- ```bash
441
- mkdir -p ~/.openclaw/hypermem
442
- cat > ~/.openclaw/hypermem/config.json <<'JSON'
443
- {
444
- "embedding": { "provider": "none" },
445
- "compositor": {
446
- "budgetFraction": 0.55,
447
- "contextWindowReserve": 0.25,
448
- "targetBudgetFraction": 0.50,
449
- "warmHistoryBudgetFraction": 0.27,
450
- "maxFacts": 25,
451
- "maxHistoryMessages": 500,
452
- "maxCrossSessionContext": 4000,
453
- "maxRecentToolPairs": 3,
454
- "maxProseToolPairs": 10,
455
- "keystoneHistoryFraction": 0.15,
456
- "keystoneMaxMessages": 12,
457
- "wikiTokenCap": 500
458
- }
459
- }
460
- JSON
461
- ```
440
+ The installer writes the starter config for you when `~/.openclaw/hypermem/config.json` is missing. The default is recall-friendly standard mode with Ollama `nomic-embed-text`; if Ollama is not available, install it or run `npx hypermem-install --skip-embedding-check` for CI/container practice. To force lightweight FTS-only mode, pre-create `~/.openclaw/hypermem/config.json` with `{"embedding":{"provider":"none"}}` before running the installer.
462
441
 
463
442
  Then merge the staged plugin paths into OpenClaw config and set the slots:
464
443
 
@@ -480,7 +459,7 @@ hypermem-status --health
480
459
  hypermem-model-audit --strict
481
460
  ```
482
461
 
483
- `hypermem-doctor` is the confidence check: it validates plugin wiring, runtime load state, recommended OpenClaw settings such as `contextPruning.mode=off`, GPT-5 personality overlay off, startup/bootstrap injection sizing, compaction safety settings, HyperMem data files, and model context-window overrides for GPT/OpenAI-compatible/local gateways. It is read-only and prints a reviewable fix plan.
462
+ `hypermem-doctor` is the confidence check: it validates plugin wiring, plugin registry refresh readiness, runtime load state, recommended OpenClaw settings such as `contextPruning.mode=off`, GPT-5 personality overlay off, startup/bootstrap injection sizing, compaction safety settings including `maxActiveTranscriptBytes` remaining unset for HyperMem-managed compaction, HyperMem data files, and model context-window overrides for GPT/OpenAI-compatible/local gateways. It is read-only and prints a reviewable fix plan.
484
463
 
485
464
  Full install, upgrade, source-clone, embedding provider, reranker, fleet config, and rollback guidance lives in **[INSTALL.md](./INSTALL.md)**.
486
465
 
@@ -574,9 +553,12 @@ hypermem-status --health
574
553
  hypermem-status --master
575
554
  hypermem-model-audit --strict
576
555
  hypermem-bench --iterations 1000 --warmup 50 --agent main
556
+ # repo release validation:
557
+ npm run release:install-smoke
558
+ npm run validate:history-query
577
559
  ```
578
560
 
579
- Diagnostics and validation details: **[docs/DIAGNOSTICS.md](./docs/DIAGNOSTICS.md)** and **[docs/INTEGRATION_VALIDATION.md](./docs/INTEGRATION_VALIDATION.md)**.
561
+ Diagnostics and validation details: **[docs/DIAGNOSTICS.md](./docs/DIAGNOSTICS.md)** and **[docs/INTEGRATION_VALIDATION.md](./docs/INTEGRATION_VALIDATION.md)**. The master health surface reports 0.9.4 recall-surface config completeness, history-query readiness, vector coverage, bounded maintenance debt, and referenced-noise repair status.
580
562
 
581
563
  ## Pressure management
582
564
 
@@ -0,0 +1,47 @@
1
+ {
2
+ "embedding": {
3
+ "provider": "ollama",
4
+ "model": "nomic-embed-text",
5
+ "dims": 768,
6
+ "dimensions": 768,
7
+ "ollamaUrl": "http://localhost:11434",
8
+ "timeout": 10000,
9
+ "batchSize": 32
10
+ },
11
+ "compositor": {
12
+ "turnBudget": {
13
+ "budgetFraction": 0.6,
14
+ "minContextFraction": 0.18
15
+ },
16
+ "warming": {
17
+ "protectedFloorEnabled": true,
18
+ "shapedWarmupDecay": true
19
+ },
20
+ "adjacency": {
21
+ "enabled": true,
22
+ "boostMultiplier": 1.3,
23
+ "maxLookback": 5,
24
+ "maxClockDeltaMin": 10,
25
+ "evictionGuardMessages": 3,
26
+ "evictionGuardTokenCap": 4000
27
+ },
28
+ "contextWindowOverrides": {},
29
+ "budgetFraction": 0.6,
30
+ "contextWindowReserve": 0.25,
31
+ "targetBudgetFraction": 0.5,
32
+ "warmHistoryBudgetFraction": 0.45,
33
+ "maxFacts": 28,
34
+ "maxHistoryMessages": 250,
35
+ "maxCrossSessionContext": 0,
36
+ "keystoneHistoryFraction": 0.2,
37
+ "keystoneMaxMessages": 15,
38
+ "hyperformProfile": "standard"
39
+ },
40
+ "indexer": {
41
+ "enabled": true,
42
+ "factExtractionMode": "tiered",
43
+ "periodicInterval": 300000,
44
+ "batchSize": 128,
45
+ "maxMessagesPerTick": 500
46
+ }
47
+ }
@@ -123,6 +123,10 @@ function setCommand(pathKey, value, strictJson = false) {
123
123
  return `openclaw config set ${pathKey} ${shellQuote(rendered)}${strictJson ? ' --strict-json' : ''}`;
124
124
  }
125
125
 
126
+ function unsetCommand(pathKey) {
127
+ return `openclaw config unset ${pathKey}`;
128
+ }
129
+
126
130
  function shellQuote(value) {
127
131
  if (/^[A-Za-z0-9_./:@=-]+$/.test(value)) return value;
128
132
  return `'${String(value).replaceAll("'", "'\\''")}'`;
@@ -165,7 +169,7 @@ function checkConfigReadable() {
165
169
  } else if (hypermemRead.exists) {
166
170
  required('ok', 'hypermem-config-json', `HyperMem config readable: ${flags.hypermemConfig}`);
167
171
  } else {
168
- recommended('warn', 'hypermem-config-present', `No legacy HyperMem config found at ${flags.hypermemConfig}; ok if config lives in openclaw.json`);
172
+ recommended('warn', 'hypermem-config-present', `HyperMem config missing at ${flags.hypermemConfig}; run hypermem-install to create the 0.9.4 default config, or declare equivalent plugin config in openclaw.json`);
169
173
  }
170
174
  }
171
175
 
@@ -212,6 +216,15 @@ function checkRuntimePlugins() {
212
216
  recommended('ok', 'runtime-plugin-list', 'Runtime plugin load check skipped');
213
217
  return;
214
218
  }
219
+ const registryRefresh = spawnSync('openclaw', ['plugins', 'registry', '--refresh'], { encoding: 'utf8', timeout: 15000 });
220
+ if (registryRefresh.error) {
221
+ recommended('warn', 'plugin-registry-refresh', `Could not refresh OpenClaw plugin registry: ${registryRefresh.error.message}`);
222
+ } else if (registryRefresh.status === 0) {
223
+ recommended('ok', 'plugin-registry-refresh', 'OpenClaw plugin registry refresh command completed');
224
+ } else {
225
+ recommended('warn', 'plugin-registry-refresh', `OpenClaw plugin registry refresh exited ${registryRefresh.status}; run openclaw plugins registry --refresh after staging HyperMem`);
226
+ }
227
+
215
228
  const result = spawnSync('openclaw', ['plugins', 'list'], { encoding: 'utf8', timeout: 8000 });
216
229
  if (result.error) {
217
230
  recommended('warn', 'runtime-plugin-list', `Could not run openclaw plugins list: ${result.error.message}`);
@@ -224,7 +237,51 @@ function checkRuntimePlugins() {
224
237
  'runtime-plugin-list',
225
238
  hasComposer && hasMemory
226
239
  ? 'Runtime plugin list mentions hypercompositor and hypermem'
227
- : 'Runtime plugin list did not clearly show both hypercompositor and hypermem; restart gateway after config changes');
240
+ : 'Runtime plugin list did not clearly show both hypercompositor and hypermem; run openclaw plugins registry --refresh, openclaw doctor --fix --yes, then restart gateway after config changes');
241
+ }
242
+
243
+
244
+ function effectiveHyperMemConfig() {
245
+ return {
246
+ ...hypermem,
247
+ ...pluginConfig,
248
+ compositor: { ...(hypermem.compositor ?? {}), ...(pluginConfig.compositor ?? {}) },
249
+ embedding: { ...(hypermem.embedding ?? {}), ...(pluginConfig.embedding ?? {}) },
250
+ };
251
+ }
252
+
253
+ function checkRecallSurfaceRecommendations() {
254
+ const config = effectiveHyperMemConfig();
255
+ const compositor = config.compositor ?? {};
256
+ const expected = [
257
+ ['compositor.turnBudget.budgetFraction', 0.6],
258
+ ['compositor.turnBudget.minContextFraction', 0.18],
259
+ ['compositor.warming.protectedFloorEnabled', true],
260
+ ['compositor.warming.shapedWarmupDecay', true],
261
+ ['compositor.adjacency.enabled', true],
262
+ ['compositor.adjacency.boostMultiplier', 1.3],
263
+ ['compositor.adjacency.maxLookback', 5],
264
+ ['compositor.adjacency.maxClockDeltaMin', 10],
265
+ ['compositor.adjacency.evictionGuardMessages', 3],
266
+ ['compositor.adjacency.evictionGuardTokenCap', 4000],
267
+ ];
268
+
269
+ for (const [pathKey, value] of expected) {
270
+ const actual = get({ compositor }, pathKey);
271
+ const ok = actual === value;
272
+ recommended(ok ? 'ok' : 'warn', pathKey,
273
+ ok
274
+ ? `${pathKey} is recommended 0.9.4 value ${JSON.stringify(value)}`
275
+ : `${pathKey} is ${JSON.stringify(actual)}; recommended ${JSON.stringify(value)} for 0.9.4 recall-surface protection`);
276
+ }
277
+
278
+ const dims = config.embedding?.dims;
279
+ const dimensions = config.embedding?.dimensions;
280
+ if (dims != null && dimensions != null && dims !== dimensions) {
281
+ recommended('warn', 'embedding.dims-consistency', `embedding.dims (${dims}) and embedding.dimensions (${dimensions}) differ; keep them aligned while both aliases are supported`);
282
+ } else {
283
+ recommended('ok', 'embedding.dims-consistency', 'Embedding dimension aliases are absent or aligned');
284
+ }
228
285
  }
229
286
 
230
287
  function checkOpenClawRecommendations() {
@@ -254,6 +311,22 @@ function checkOpenClawRecommendations() {
254
311
  else recommended(ok ? 'ok' : 'warn', pathKey, message, details);
255
312
  }
256
313
 
314
+ const legacyMemorySearch = get(openclaw, 'agents.defaults.memorySearch');
315
+ recommended(legacyMemorySearch == null ? 'ok' : 'warn',
316
+ 'agents.defaults.memorySearch',
317
+ legacyMemorySearch == null
318
+ ? 'Legacy agents.defaults.memorySearch is unset'
319
+ : `Legacy agents.defaults.memorySearch is ${JSON.stringify(legacyMemorySearch)}; HyperMem supersedes this path and it should be unset to avoid stale operator assumptions`,
320
+ legacyMemorySearch == null ? {} : { command: unsetCommand('agents.defaults.memorySearch') });
321
+
322
+ const maxActiveTranscriptBytes = get(openclaw, 'agents.defaults.compaction.maxActiveTranscriptBytes');
323
+ recommended(maxActiveTranscriptBytes == null ? 'ok' : 'warn',
324
+ 'agents.defaults.compaction.maxActiveTranscriptBytes',
325
+ maxActiveTranscriptBytes == null
326
+ ? 'agents.defaults.compaction.maxActiveTranscriptBytes is unset, as recommended for HyperMem-managed compaction'
327
+ : `agents.defaults.compaction.maxActiveTranscriptBytes is ${JSON.stringify(maxActiveTranscriptBytes)}; recommended unset so OpenClaw transcript rotation does not fight HyperMem fences`,
328
+ maxActiveTranscriptBytes == null ? {} : { command: unsetCommand('agents.defaults.compaction.maxActiveTranscriptBytes') });
329
+
257
330
  const injection = get(openclaw, 'agents.defaults.contextInjection');
258
331
  if (injection == null || injection === 'always' || injection === 'continuation-skip') {
259
332
  recommended('ok', 'agents.defaults.contextInjection', `Context injection mode is ${JSON.stringify(injection ?? 'default')}`);
@@ -367,6 +440,7 @@ if (openclawRead.value) {
367
440
  checkOpenClawRecommendations();
368
441
  checkModels();
369
442
  }
443
+ checkRecallSurfaceRecommendations();
370
444
  checkDataDir();
371
445
  checkRuntimePlugins();
372
446