@psiclawops/hypermem 0.8.4 → 0.8.5
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/CHANGELOG.md +7 -0
- package/INSTALL.md +83 -26
- package/README.md +88 -12
- package/dist/background-indexer.js +9 -9
- package/dist/cache.d.ts +3 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cross-agent.d.ts +1 -1
- package/dist/cross-agent.js +17 -17
- package/dist/dreaming-promoter.d.ts +1 -1
- package/dist/dreaming-promoter.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/seed.d.ts +1 -1
- package/dist/seed.js +1 -1
- package/dist/session-flusher.d.ts +2 -2
- package/dist/session-flusher.js +2 -2
- package/dist/spawn-context.d.ts +1 -1
- package/dist/spawn-context.js +1 -1
- package/dist/topic-store.js +5 -5
- package/dist/topic-synthesizer.js +1 -1
- package/dist/trigger-registry.d.ts +1 -1
- package/dist/trigger-registry.js +4 -4
- package/dist/types.d.ts +2 -2
- package/docs/TUNING.md +11 -1
- package/install.sh +7 -7
- package/memory-plugin/package.json +1 -1
- package/package.json +1 -1
- package/plugin/dist/index.d.ts +26 -0
- package/plugin/dist/index.d.ts.map +1 -1
- package/plugin/dist/index.js +74 -19
- package/plugin/dist/index.js.map +1 -1
- package/plugin/package.json +1 -1
- package/scripts/install-runtime.mjs +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to hypermem are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.8.5 — provider/model-aware failover detection, release parity
|
|
6
|
+
|
|
7
|
+
- **Provider + model identity is now tracked explicitly in HyperCompositor model state.** Mid-session routing changes are detected on the full `provider/model` key, not budget alone, so `github-copilot/claude-sonnet-4-6` and `anthropic/claude-sonnet-4-6` are treated as different operational envelopes.
|
|
8
|
+
- **Downshift detection now keys off provider/model-aware state.** Budget-downshift handling still stays conservative, but verbose logs now surface provider swaps, model swaps, and budget deltas clearly during `context:assemble`.
|
|
9
|
+
- **Install docs now declare the full operator path.** README, INSTALL.md, and TUNING.md now separate staging from activation, document install states explicitly, add merge-safe wiring guidance, and clarify what healthy-but-empty looks like on a first run.
|
|
10
|
+
- **0.8.5 release parity.** Package versions are aligned for the next publish while preserving the npm-first installer and merge-safe config guidance landed from Pylon's install review.
|
|
11
|
+
|
|
5
12
|
## 0.8.4 — compaction fence fix, install-path fixes, zod runtime packaging
|
|
6
13
|
|
|
7
14
|
- **Compaction fence tail preservation fixed.** The recent-tail preservation fix is included so compaction no longer drops the protected recent tail during fence advancement.
|
package/INSTALL.md
CHANGED
|
@@ -17,6 +17,8 @@ If `gateway status` shows "disabled" or "not configured", complete OpenClaw onbo
|
|
|
17
17
|
|
|
18
18
|
## Quick Start
|
|
19
19
|
|
|
20
|
+
This guide is deliberately declarative. Follow the steps in order and verify each install state before moving on.
|
|
21
|
+
|
|
20
22
|
> **Release note:** if the npm package you installed does not contain `hypermem-install` or `install:runtime`, you are on an older public release. Use the source-clone path in this guide or wait for `0.8.4+`.
|
|
21
23
|
|
|
22
24
|
```bash
|
|
@@ -24,13 +26,16 @@ npm install @psiclawops/hypermem
|
|
|
24
26
|
npx hypermem-install
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
`hypermem-install` stages the plugin runtime into `~/.openclaw/plugins/hypermem`. It does **not** modify your OpenClaw config and does **not** restart the gateway.
|
|
29
|
+
`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.
|
|
28
30
|
|
|
29
31
|
> **Prerequisites:** OpenClaw must be installed and onboarded. Run `openclaw gateway status` to confirm. If the gateway is not configured, complete OpenClaw setup first.
|
|
30
32
|
>
|
|
31
33
|
> **Config merge warning:** if you already have values in `plugins.load.paths` or `plugins.allow`, merge them instead of overwriting blindly.
|
|
32
34
|
|
|
33
|
-
Create the config directory and
|
|
35
|
+
Create the config directory and write the current recommended fresh-install starter config. This does 2 things:
|
|
36
|
+
|
|
37
|
+
1. sets `embedding.provider` to `none` so a clean install does not try to use Ollama by default
|
|
38
|
+
2. applies the current recommended lean compositor settings so fresh installs start from the same OpenClaw and HyperMem guidance we want operators to use
|
|
34
39
|
|
|
35
40
|
```bash
|
|
36
41
|
mkdir -p ~/.openclaw/hypermem
|
|
@@ -38,11 +43,41 @@ cat > ~/.openclaw/hypermem/config.json <<'JSON'
|
|
|
38
43
|
{
|
|
39
44
|
"embedding": {
|
|
40
45
|
"provider": "none"
|
|
46
|
+
},
|
|
47
|
+
"compositor": {
|
|
48
|
+
"budgetFraction": 0.55,
|
|
49
|
+
"contextWindowReserve": 0.25,
|
|
50
|
+
"targetBudgetFraction": 0.50,
|
|
51
|
+
"warmHistoryBudgetFraction": 0.27,
|
|
52
|
+
"maxFacts": 25,
|
|
53
|
+
"maxHistoryMessages": 500,
|
|
54
|
+
"maxCrossSessionContext": 4000,
|
|
55
|
+
"maxRecentToolPairs": 3,
|
|
56
|
+
"maxProseToolPairs": 10,
|
|
57
|
+
"keystoneHistoryFraction": 0.15,
|
|
58
|
+
"keystoneMaxMessages": 12,
|
|
59
|
+
"wikiTokenCap": 500
|
|
41
60
|
}
|
|
42
61
|
}
|
|
43
62
|
JSON
|
|
44
63
|
```
|
|
45
64
|
|
|
65
|
+
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.
|
|
66
|
+
|
|
67
|
+
### Install states
|
|
68
|
+
|
|
69
|
+
Treat the install as 5 explicit states:
|
|
70
|
+
|
|
71
|
+
| State | Meaning | Success signal |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| 1. Package installed | npm package is present | `npm install` succeeds |
|
|
74
|
+
| 2. Runtime staged | plugin payload copied into `~/.openclaw/plugins/hypermem` | `npx hypermem-install` succeeds and files exist |
|
|
75
|
+
| 3. OpenClaw wired | config points at HyperMem plugins | `plugins.load.paths` and `plugins.slots.*` are set correctly |
|
|
76
|
+
| 4. Runtime loaded | gateway restarted and loaded both plugins | `openclaw plugins list` shows both plugins loaded |
|
|
77
|
+
| 5. Runtime active | HyperMem is actually composing turns | logs show `hypermem initialized` and compose activity |
|
|
78
|
+
|
|
79
|
+
Do not stop at state 2 and call the install done.
|
|
80
|
+
|
|
46
81
|
Wire both plugins into OpenClaw:
|
|
47
82
|
|
|
48
83
|
**Step 1: Check your existing config (mandatory — do this before wiring).**
|
|
@@ -52,7 +87,7 @@ openclaw config get plugins.load.paths
|
|
|
52
87
|
openclaw config get plugins.allow
|
|
53
88
|
```
|
|
54
89
|
|
|
55
|
-
Note any existing values. You must include them in the commands below.
|
|
90
|
+
Note any existing values. You must include them in the commands below. If `plugins.allow` is null, unset, or empty, skip the allowlist step entirely.
|
|
56
91
|
|
|
57
92
|
**Step 2: Wire plugins.**
|
|
58
93
|
|
|
@@ -83,30 +118,50 @@ OpenClaw loads the plugin runtime from `~/.openclaw/plugins/hypermem/`.
|
|
|
83
118
|
|
|
84
119
|
### Verification checkpoints
|
|
85
120
|
|
|
86
|
-
|
|
87
|
-
- root build succeeds
|
|
88
|
-
- `plugin` build succeeds
|
|
89
|
-
- `memory-plugin` build succeeds
|
|
90
|
-
|
|
91
|
-
2. **Wiring verified**
|
|
92
|
-
- OpenClaw accepts `plugins.load.paths`
|
|
93
|
-
- slots are set to `hypercompositor` and `hypermem`
|
|
94
|
-
- gateway restart succeeds
|
|
121
|
+
Walk the install state machine explicitly:
|
|
95
122
|
|
|
96
|
-
|
|
123
|
+
1. **Runtime staged**
|
|
124
|
+
```bash
|
|
125
|
+
ls ~/.openclaw/plugins/hypermem
|
|
126
|
+
```
|
|
127
|
+
Expected: `dist`, `plugin`, `memory-plugin`, and package metadata exist.
|
|
97
128
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
openclaw
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
129
|
+
2. **Wiring verified**
|
|
130
|
+
```bash
|
|
131
|
+
openclaw config get plugins.load.paths
|
|
132
|
+
openclaw config get plugins.slots.contextEngine
|
|
133
|
+
openclaw config get plugins.slots.memory
|
|
134
|
+
openclaw config get plugins.allow
|
|
135
|
+
```
|
|
136
|
+
Expected: HyperMem paths are present, slots point to `hypercompositor` and `hypermem`, and allowlist entries were merged only if the install already used an allowlist.
|
|
137
|
+
|
|
138
|
+
3. **Runtime loaded**
|
|
139
|
+
```bash
|
|
140
|
+
openclaw plugins list
|
|
141
|
+
```
|
|
142
|
+
Expected: both `hypercompositor` and `hypermem` show as loaded.
|
|
143
|
+
|
|
144
|
+
4. **Runtime healthy**
|
|
145
|
+
Run from the repo clone directory, because `bin/` is a relative path:
|
|
146
|
+
```bash
|
|
147
|
+
node bin/hypermem-status.mjs --health
|
|
148
|
+
```
|
|
149
|
+
Expected on fresh installs: the plugin may report `no sessions ingested` or empty counts. That means healthy but unused, not broken.
|
|
150
|
+
|
|
151
|
+
5. **Runtime active**
|
|
152
|
+
|
|
153
|
+
Send a message to any agent, then verify:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
openclaw logs --limit 100 | grep -E 'hypermem|context-engine'
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Expected lightweight-mode lines:
|
|
160
|
+
- `[hypermem] hypermem initialized`
|
|
161
|
+
- `[hypermem] Embedding provider: none — semantic search disabled, using FTS5 fallback`
|
|
162
|
+
- `[hypermem:compose]`
|
|
163
|
+
|
|
164
|
+
If you see a fallback like `falling back to default engine "legacy"`, the install is **not** fully active yet even if staging and wiring succeeded.
|
|
110
165
|
|
|
111
166
|
---
|
|
112
167
|
|
|
@@ -139,7 +194,7 @@ Everything runs in-process on SQLite memory databases. No external database serv
|
|
|
139
194
|
|
|
140
195
|
> **Package versions:** the root package (`hypermem`) and the two plugins (`hypercompositor`, `hypermem-memory`) are versioned independently. Plugin versions trail the core by one minor version when no plugin-facing API changes ship in a release — this is expected.
|
|
141
196
|
|
|
142
|
-
The **embedding layer** (L3 semantic search) requires a configured provider. Without one, hypermem falls back to FTS5 keyword matching. This is functional but degrades recall quality. See [Setup Styles](#setup-styles) below.
|
|
197
|
+
The **embedding layer** (L3 semantic search) requires a configured provider. Without one, hypermem falls back to FTS5 keyword matching. This is functional but degrades recall quality. Fresh installs should start with `provider: "none"` explicitly so the runtime behavior is intentional and easy to verify, then upgrade later. See [Setup Styles](#setup-styles) below.
|
|
143
198
|
|
|
144
199
|
---
|
|
145
200
|
|
|
@@ -428,6 +483,8 @@ See [Embedding Providers](#embedding-providers) above.
|
|
|
428
483
|
|
|
429
484
|
### Step 4 — Restart and verify
|
|
430
485
|
|
|
486
|
+
Do not start tuning before this section passes. If HyperMem is not loaded and composing, the next problem is installation, not tuning.
|
|
487
|
+
|
|
431
488
|
```bash
|
|
432
489
|
openclaw gateway restart
|
|
433
490
|
```
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
hypermem is a SQLite-backed runtime context engine for OpenClaw agents.
|
|
10
10
|
|
|
11
|
-
**Quick install** (
|
|
11
|
+
**Quick install** (runtime staging + guided OpenClaw wiring):
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm install @psiclawops/hypermem && npx hypermem-install
|
|
@@ -20,7 +20,7 @@ Or via the shell installer:
|
|
|
20
20
|
curl -fsSL https://raw.githubusercontent.com/PsiClawOps/hypermem/main/install.sh | bash
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Or install manually via `npm install @psiclawops/hypermem` — see [Installation](#installation) for plugin
|
|
23
|
+
Or install manually via `npm install @psiclawops/hypermem` — see [Installation](#installation) for the full declarative plugin path, verification checkpoints, and setup variants.
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
---
|
|
@@ -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.8.
|
|
389
|
+
**Current release: hypermem 0.8.5.** Changelog: [CHANGELOG.md](./CHANGELOG.md)
|
|
390
390
|
|
|
391
391
|
| Requirement | Version | Notes |
|
|
392
392
|
|---|---|---|
|
|
@@ -399,7 +399,7 @@ SQLite is a library, not a service. All four layers run in-process with no exter
|
|
|
399
399
|
**Runtime version constants** (importable from the package):
|
|
400
400
|
```typescript
|
|
401
401
|
import {
|
|
402
|
-
ENGINE_VERSION, // '0.8.
|
|
402
|
+
ENGINE_VERSION, // '0.8.5'
|
|
403
403
|
MIN_NODE_VERSION, // '22.0.0'
|
|
404
404
|
SQLITE_VEC_VERSION, // '0.1.9'
|
|
405
405
|
MAIN_SCHEMA_VERSION, // 10 (messages.db)
|
|
@@ -447,9 +447,29 @@ const composed = await hm.compose({
|
|
|
447
447
|
|
|
448
448
|
That's it. No gateway, no plugins, no config files. See [API](#api) for the full interface.
|
|
449
449
|
|
|
450
|
-
### OpenClaw plugin install
|
|
450
|
+
### OpenClaw plugin install
|
|
451
451
|
|
|
452
|
-
|
|
452
|
+
**Install contract:** HyperMem plugin install has 4 distinct states. Treat them separately.
|
|
453
|
+
|
|
454
|
+
1. **Package installed**: `npm install @psiclawops/hypermem`
|
|
455
|
+
2. **Runtime staged**: `npx hypermem-install` or `npm run install:runtime`
|
|
456
|
+
3. **OpenClaw wired**: plugin paths, slots, and optional allowlist merged into config
|
|
457
|
+
4. **Runtime verified active**: gateway restarted, plugins loaded, compose logs visible
|
|
458
|
+
|
|
459
|
+
If you only finish step 2, HyperMem is **not installed yet**. It is only staged.
|
|
460
|
+
|
|
461
|
+
> **Release note:** if the npm package you installed does not contain `hypermem-install` or `install:runtime`, you are on an older public release. Use the source-clone path below or wait for `0.8.5+`.
|
|
462
|
+
|
|
463
|
+
#### Path A: npm package, recommended for operators
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
npm install @psiclawops/hypermem
|
|
467
|
+
npx hypermem-install
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
`hypermem-install` stages the runtime payload into `~/.openclaw/plugins/hypermem`. It does **not** modify OpenClaw config and does **not** restart the gateway.
|
|
471
|
+
|
|
472
|
+
#### Path B: source clone, recommended for contributors
|
|
453
473
|
|
|
454
474
|
```bash
|
|
455
475
|
git clone https://github.com/PsiClawOps/hypermem.git
|
|
@@ -460,7 +480,11 @@ npm --prefix memory-plugin install && npm --prefix memory-plugin run build
|
|
|
460
480
|
npm run install:runtime
|
|
461
481
|
```
|
|
462
482
|
|
|
463
|
-
|
|
483
|
+
Both install paths converge here. The runtime payload is now staged under `~/.openclaw/plugins/hypermem`, but HyperMem is still **not active** until OpenClaw is wired and restarted.
|
|
484
|
+
|
|
485
|
+
#### Step 1, write the starter config
|
|
486
|
+
|
|
487
|
+
Before wiring the plugins, create the data directory and write the current recommended starter config:
|
|
464
488
|
|
|
465
489
|
```bash
|
|
466
490
|
mkdir -p ~/.openclaw/hypermem
|
|
@@ -468,14 +492,37 @@ cat > ~/.openclaw/hypermem/config.json <<'JSON'
|
|
|
468
492
|
{
|
|
469
493
|
"embedding": {
|
|
470
494
|
"provider": "none"
|
|
495
|
+
},
|
|
496
|
+
"compositor": {
|
|
497
|
+
"budgetFraction": 0.55,
|
|
498
|
+
"contextWindowReserve": 0.25,
|
|
499
|
+
"targetBudgetFraction": 0.50,
|
|
500
|
+
"warmHistoryBudgetFraction": 0.27,
|
|
501
|
+
"maxFacts": 25,
|
|
502
|
+
"maxHistoryMessages": 500,
|
|
503
|
+
"maxCrossSessionContext": 4000,
|
|
504
|
+
"maxRecentToolPairs": 3,
|
|
505
|
+
"maxProseToolPairs": 10,
|
|
506
|
+
"keystoneHistoryFraction": 0.15,
|
|
507
|
+
"keystoneMaxMessages": 12,
|
|
508
|
+
"wikiTokenCap": 500
|
|
471
509
|
}
|
|
472
510
|
}
|
|
473
511
|
JSON
|
|
474
512
|
```
|
|
475
513
|
|
|
476
|
-
This
|
|
514
|
+
This keeps a fresh install in lightweight embedding mode while also applying the current recommended lean compositor baseline for OpenClaw operators. Add an embedding provider later for semantic search without losing stored data. See [INSTALL.md](./INSTALL.md#embedding-providers) and [docs/TUNING.md](./docs/TUNING.md) for adjustments.
|
|
515
|
+
|
|
516
|
+
#### Step 2, inspect current OpenClaw plugin config
|
|
477
517
|
|
|
478
|
-
|
|
518
|
+
```bash
|
|
519
|
+
openclaw config get plugins.load.paths
|
|
520
|
+
openclaw config get plugins.allow
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
Record what is already there. You are going to **merge**, not replace.
|
|
524
|
+
|
|
525
|
+
#### Step 3, wire the plugins into OpenClaw
|
|
479
526
|
|
|
480
527
|
> **⚠️ Merge, don't overwrite.** If you already have values in `plugins.load.paths` or `plugins.allow`, check them first and include your existing entries alongside the new ones. Replacing the list drops whatever was there before.
|
|
481
528
|
>
|
|
@@ -503,7 +550,27 @@ openclaw gateway restart
|
|
|
503
550
|
|
|
504
551
|
Do **not** replace a working `plugins.allow` list with only `['hypercompositor','hypermem']`. That can disable bundled CLI surfaces and channel plugins.
|
|
505
552
|
|
|
506
|
-
|
|
553
|
+
If `plugins.allow` is unset, null, or empty, leave it alone. Do **not** create a new allowlist unless your OpenClaw install already uses one.
|
|
554
|
+
|
|
555
|
+
#### Step 4, restart the gateway
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
openclaw gateway restart
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
#### Step 5, verify install state
|
|
562
|
+
|
|
563
|
+
Verification should answer which state you are in, not just whether one command succeeded.
|
|
564
|
+
|
|
565
|
+
| State | What it means | How to verify |
|
|
566
|
+
|---|---|---|
|
|
567
|
+
| Runtime staged | files copied into plugin runtime dir | `ls ~/.openclaw/plugins/hypermem` |
|
|
568
|
+
| Wired | OpenClaw config points at HyperMem | `openclaw config get plugins.slots.contextEngine`, `openclaw config get plugins.slots.memory` |
|
|
569
|
+
| Loaded | gateway actually loaded both plugins | `openclaw plugins list` |
|
|
570
|
+
| Healthy but empty | plugin active, no real session data yet | `node bin/hypermem-status.mjs --health` may report no sessions ingested |
|
|
571
|
+
| Active | HyperMem is composing live turns | `openclaw logs --limit 50 | grep hypermem` shows compose activity |
|
|
572
|
+
|
|
573
|
+
Run these commands from the repo clone directory when using `bin/hypermem-status.mjs`, because `bin/` is a relative path:
|
|
507
574
|
|
|
508
575
|
```bash
|
|
509
576
|
openclaw plugins list # hypercompositor and hypermem should show as loaded
|
|
@@ -511,7 +578,14 @@ node bin/hypermem-status.mjs --health # confirms database initialization
|
|
|
511
578
|
openclaw logs --limit 50 | grep hypermem # should show "hypermem initialized"
|
|
512
579
|
```
|
|
513
580
|
|
|
514
|
-
|
|
581
|
+
Expected first-run outcomes:
|
|
582
|
+
|
|
583
|
+
- `openclaw plugins list` shows `hypercompositor` and `hypermem` loaded
|
|
584
|
+
- `node bin/hypermem-status.mjs --health` may say `no sessions ingested` on a fresh install, which is normal
|
|
585
|
+
- logs should show `hypermem initialized`
|
|
586
|
+
- logs should show compose activity after you send a real message to any agent
|
|
587
|
+
|
|
588
|
+
If you see `falling back to default engine "legacy"` in the logs, the install is **not active**. Check [INSTALL.md troubleshooting](./INSTALL.md#troubleshooting-clean-installs).
|
|
515
589
|
|
|
516
590
|
### One-line installer
|
|
517
591
|
|
|
@@ -521,7 +595,7 @@ curl -fsSL https://raw.githubusercontent.com/PsiClawOps/hypermem/main/install.sh
|
|
|
521
595
|
|
|
522
596
|
Interactive: detects hardware, selects embedding tier, writes config, registers plugins.
|
|
523
597
|
|
|
524
|
-
Full guide with embedding tiers, reranker setup, fleet config, and tuning: **[INSTALL.md](./INSTALL.md)**
|
|
598
|
+
Full guide with installation states, merge-safe config wiring, embedding tiers, reranker setup, fleet config, and tuning: **[INSTALL.md](./INSTALL.md)**
|
|
525
599
|
|
|
526
600
|
### Agent-assisted install
|
|
527
601
|
|
|
@@ -537,6 +611,8 @@ If you prefer, hand the install to your OpenClaw agent:
|
|
|
537
611
|
|
|
538
612
|
### Tuning
|
|
539
613
|
|
|
614
|
+
Do tuning **after** the install is verified active. If logs still show `legacy` fallback or no compose activity, you do not have a tuning problem yet. You have an install problem.
|
|
615
|
+
|
|
540
616
|
Two independent surfaces: **context assembly** (what fills the context window) and **output shaping** (how the model writes). Pick a profile first. Most deployments adjust one or two settings on top.
|
|
541
617
|
|
|
542
618
|
| Profile | Target window | Best for |
|
|
@@ -37,27 +37,27 @@ import { isSafeForSharedVisibility } from './secret-scanner.js';
|
|
|
37
37
|
// returns results. New agents default to 'general'.
|
|
38
38
|
//
|
|
39
39
|
// ── EXAMPLE DATA ──────────────────────────────────────────────────
|
|
40
|
-
// The agent names below (
|
|
40
|
+
// The agent names below (alice, director1, etc.) are PLACEHOLDERS.
|
|
41
41
|
// Replace them with your own agent IDs and domain labels to match
|
|
42
42
|
// your fleet. Single-agent installs don't need to edit this:
|
|
43
43
|
// unknown agents fall through to 'general' automatically.
|
|
44
44
|
// See INSTALL.md § "Configure your fleet" for details.
|
|
45
45
|
// ─────────────────────────────────────────────────────────────────
|
|
46
46
|
const AGENT_DOMAIN_MAP = {
|
|
47
|
-
|
|
47
|
+
alice: 'infrastructure',
|
|
48
48
|
director2: 'infrastructure',
|
|
49
49
|
director1: 'infrastructure',
|
|
50
50
|
director3: 'infrastructure',
|
|
51
|
-
|
|
51
|
+
bob: 'product',
|
|
52
52
|
director4: 'product',
|
|
53
53
|
director5: 'product',
|
|
54
54
|
director6: 'product',
|
|
55
|
-
|
|
55
|
+
dave: 'security',
|
|
56
56
|
director7: 'security',
|
|
57
57
|
director8: 'security',
|
|
58
58
|
agent4: 'ux',
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
carol: 'governance',
|
|
60
|
+
oscar: 'strategy',
|
|
61
61
|
specialist1: 'development',
|
|
62
62
|
specialist2: 'communications',
|
|
63
63
|
main: 'general',
|
|
@@ -94,7 +94,7 @@ function extractFactCandidates(content) {
|
|
|
94
94
|
// Preference patterns — medium confidence (0.60)
|
|
95
95
|
const preferencePatterns = [
|
|
96
96
|
/(?:prefer|always use|never use|don't use|avoid) (.{10,150})/gi,
|
|
97
|
-
/(?:operator
|
|
97
|
+
/(?:operator) (?:wants|prefers|likes|hates|dislikes) (.{10,150})/gi,
|
|
98
98
|
];
|
|
99
99
|
// Operational patterns: deployments, incidents, fixes — high confidence (0.70)
|
|
100
100
|
const operationalPatterns = [
|
|
@@ -148,7 +148,7 @@ const OPERATIONAL_BOILERPLATE = [
|
|
|
148
148
|
/still\s*waiting/i,
|
|
149
149
|
/will\s*pick\s*(it\s*)?up\s*(on\s*(next|the))?/i,
|
|
150
150
|
/message\s*is\s*in\s*(his|her|their|the)\s*queue/i,
|
|
151
|
-
/sent\s+to\s+(
|
|
151
|
+
/sent\s+to\s+(carol|bob|agent4|dave|oscar|alice)/i,
|
|
152
152
|
/dispatched\s+(it\s+)?to/i,
|
|
153
153
|
/timed\s*out\s*after/i,
|
|
154
154
|
/\bNO_REPLY\b/,
|
|
@@ -393,7 +393,7 @@ function detectTopic(content) {
|
|
|
393
393
|
if (!content || content.length < 50)
|
|
394
394
|
return null;
|
|
395
395
|
// Product/project name detection
|
|
396
|
-
const productMatch = content.match(/\b(HyperMem|ClawText|
|
|
396
|
+
const productMatch = content.match(/\b(HyperMem|ClawText|dashboard|canvas|council|automation|OpenClaw|dispatch)\b/i);
|
|
397
397
|
if (productMatch)
|
|
398
398
|
return productMatch[1];
|
|
399
399
|
// Infrastructure topic detection
|
package/dist/cache.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ import { DatabaseSync } from 'node:sqlite';
|
|
|
8
8
|
import type { CacheConfig, ComposeDiagnostics, SessionMeta, SessionCursor, StoredMessage, NeutralMessage } from './types.js';
|
|
9
9
|
export interface ModelState {
|
|
10
10
|
model: string;
|
|
11
|
+
modelKey?: string;
|
|
12
|
+
provider?: string;
|
|
13
|
+
modelId?: string;
|
|
11
14
|
tokenBudget: number;
|
|
12
15
|
composedAt: string;
|
|
13
16
|
historyDepth: number;
|
package/dist/cache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAiB,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE7H,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,kBAAkB,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAYD,qBAAa,UAAU;IACrB,OAAO,CAAC,EAAE,CAA6B;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,gBAAgB,CAAiB;IACzC,OAAO,CAAC,gBAAgB,CAAiB;IACzC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,mBAAmB,CAAiB;IAC5C,OAAO,CAAC,qBAAqB,CAA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AM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1F,gBAAgB,CACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE;QACL,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;QAC1B,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GACA,OAAO,CAAC,IAAI,CAAC;IAmBV,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IASpF,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAS9E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
|
package/dist/cross-agent.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface OrgRegistry {
|
|
|
27
27
|
* Default fleet org structure.
|
|
28
28
|
*
|
|
29
29
|
* ── EXAMPLE DATA ──────────────────────────────────────────────────────────
|
|
30
|
-
* The agent names below (
|
|
30
|
+
* The agent names below (alice, bob, director1, etc.) are PLACEHOLDERS.
|
|
31
31
|
* Replace them with your own agent IDs to match your fleet configuration.
|
|
32
32
|
*
|
|
33
33
|
* Single-agent installs: you don't need to edit this. Your agent ID is
|
package/dist/cross-agent.js
CHANGED
|
@@ -21,7 +21,7 @@ import { FleetStore } from './fleet-store.js';
|
|
|
21
21
|
* Default fleet org structure.
|
|
22
22
|
*
|
|
23
23
|
* ── EXAMPLE DATA ──────────────────────────────────────────────────────────
|
|
24
|
-
* The agent names below (
|
|
24
|
+
* The agent names below (alice, bob, director1, etc.) are PLACEHOLDERS.
|
|
25
25
|
* Replace them with your own agent IDs to match your fleet configuration.
|
|
26
26
|
*
|
|
27
27
|
* Single-agent installs: you don't need to edit this. Your agent ID is
|
|
@@ -34,27 +34,27 @@ import { FleetStore } from './fleet-store.js';
|
|
|
34
34
|
*/
|
|
35
35
|
export function defaultOrgRegistry() {
|
|
36
36
|
const agents = {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
alice: { agentId: 'alice', tier: 'council' },
|
|
38
|
+
bob: { agentId: 'bob', tier: 'council' },
|
|
39
39
|
agent4: { agentId: 'agent4', tier: 'council' },
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
director1: { agentId: 'director1', tier: 'director', org: '
|
|
44
|
-
director2: { agentId: 'director2', tier: 'director', org: '
|
|
45
|
-
director3: { agentId: 'director3', tier: 'director', org: '
|
|
46
|
-
director4: { agentId: 'director4', tier: 'director', org: '
|
|
47
|
-
director5: { agentId: 'director5', tier: 'director', org: '
|
|
48
|
-
director6: { agentId: 'director6', tier: 'director', org: '
|
|
49
|
-
director7: { agentId: 'director7', tier: 'director', org: '
|
|
50
|
-
director8: { agentId: 'director8', tier: 'director', org: '
|
|
40
|
+
dave: { agentId: 'dave', tier: 'council' },
|
|
41
|
+
carol: { agentId: 'carol', tier: 'council' },
|
|
42
|
+
oscar: { agentId: 'oscar', tier: 'council' },
|
|
43
|
+
director1: { agentId: 'director1', tier: 'director', org: 'alice-org', councilLead: 'alice' },
|
|
44
|
+
director2: { agentId: 'director2', tier: 'director', org: 'alice-org', councilLead: 'alice' },
|
|
45
|
+
director3: { agentId: 'director3', tier: 'director', org: 'alice-org', councilLead: 'alice' },
|
|
46
|
+
director4: { agentId: 'director4', tier: 'director', org: 'bob-org', councilLead: 'bob' },
|
|
47
|
+
director5: { agentId: 'director5', tier: 'director', org: 'bob-org', councilLead: 'bob' },
|
|
48
|
+
director6: { agentId: 'director6', tier: 'director', org: 'bob-org', councilLead: 'bob' },
|
|
49
|
+
director7: { agentId: 'director7', tier: 'director', org: 'dave-org', councilLead: 'dave' },
|
|
50
|
+
director8: { agentId: 'director8', tier: 'director', org: 'dave-org', councilLead: 'dave' },
|
|
51
51
|
specialist1: { agentId: 'specialist1', tier: 'specialist' },
|
|
52
52
|
specialist2: { agentId: 'specialist2', tier: 'specialist' },
|
|
53
53
|
};
|
|
54
54
|
const orgs = {
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
55
|
+
'alice-org': ['alice', 'director1', 'director2', 'director3'],
|
|
56
|
+
'bob-org': ['bob', 'director4', 'director5', 'director6'],
|
|
57
|
+
'dave-org': ['dave', 'director7', 'director8'],
|
|
58
58
|
};
|
|
59
59
|
return { orgs, agents };
|
|
60
60
|
}
|
|
@@ -67,7 +67,7 @@ export interface DreamerResult {
|
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Resolve the workspace directory for an agent.
|
|
70
|
-
* Council agents live at ~/.openclaw/workspace
|
|
70
|
+
* Council agents live at ~/.openclaw/workspace/{agentId}/
|
|
71
71
|
* Other agents at ~/.openclaw/workspace/{agentId}/
|
|
72
72
|
*/
|
|
73
73
|
export declare function resolveAgentWorkspacePath(agentId: string): Promise<string | null>;
|
|
@@ -31,12 +31,12 @@ export const DEFAULT_DREAMER_CONFIG = {
|
|
|
31
31
|
// ─── Workspace path resolution ───────────────────────────────────────────────
|
|
32
32
|
/**
|
|
33
33
|
* Resolve the workspace directory for an agent.
|
|
34
|
-
* Council agents live at ~/.openclaw/workspace
|
|
34
|
+
* Council agents live at ~/.openclaw/workspace/{agentId}/
|
|
35
35
|
* Other agents at ~/.openclaw/workspace/{agentId}/
|
|
36
36
|
*/
|
|
37
37
|
export async function resolveAgentWorkspacePath(agentId) {
|
|
38
38
|
const home = os.homedir();
|
|
39
|
-
const councilPath = path.join(home, '.openclaw', 'workspace
|
|
39
|
+
const councilPath = path.join(home, '.openclaw', 'workspace', agentId);
|
|
40
40
|
const workspacePath = path.join(home, '.openclaw', 'workspace', agentId);
|
|
41
41
|
try {
|
|
42
42
|
await fs.access(councilPath);
|
package/dist/index.d.ts
CHANGED
|
@@ -126,8 +126,8 @@ export interface StartupFleetSeedResult {
|
|
|
126
126
|
*
|
|
127
127
|
* Usage:
|
|
128
128
|
* const hm = await hypermem.create({ dataDir: '~/.openclaw/hypermem' });
|
|
129
|
-
* await hm.record('
|
|
130
|
-
* const result = await hm.compose({ agentId: '
|
|
129
|
+
* await hm.record('alice', 'agent:alice:webchat:main', userMsg);
|
|
130
|
+
* const result = await hm.compose({ agentId: 'alice', sessionKey: '...', ... });
|
|
131
131
|
*/
|
|
132
132
|
export declare class HyperMem {
|
|
133
133
|
readonly dbManager: DatabaseManager;
|
|
@@ -185,7 +185,7 @@ export declare class HyperMem {
|
|
|
185
185
|
/**
|
|
186
186
|
* List archived or forked contexts for an agent.
|
|
187
187
|
*
|
|
188
|
-
*
|
|
188
|
+
* operator-safe enumeration path. This is the approved archived-context
|
|
189
189
|
* listing surface. Active composition remains separate.
|
|
190
190
|
*/
|
|
191
191
|
listArchivedContexts(agentId: string, opts?: {
|
package/dist/index.js
CHANGED
|
@@ -97,7 +97,7 @@ const DEFAULT_CONFIG = {
|
|
|
97
97
|
cache: {
|
|
98
98
|
keyPrefix: 'hm:',
|
|
99
99
|
sessionTTL: 14400, // 4 hours — system/identity/meta slots
|
|
100
|
-
historyTTL: 604800, // 7 days — extended for
|
|
100
|
+
historyTTL: 604800, // 7 days — extended for canvas display
|
|
101
101
|
},
|
|
102
102
|
compositor: {
|
|
103
103
|
// TUNE-010 (2026-04-02): Raised from 65000 → 90000.
|
|
@@ -217,7 +217,7 @@ function mergeStartupCandidate(target, partial) {
|
|
|
217
217
|
function discoverStartupFleetCandidates(dbManager, opts = {}) {
|
|
218
218
|
const homeDir = process.env.HOME || os.homedir();
|
|
219
219
|
const workspaceRoots = opts.workspaceRoots ?? [
|
|
220
|
-
path.join(homeDir, '.openclaw', 'workspace
|
|
220
|
+
path.join(homeDir, '.openclaw', 'workspace'),
|
|
221
221
|
path.join(homeDir, '.openclaw', 'workspace'),
|
|
222
222
|
];
|
|
223
223
|
const candidates = new Map();
|
|
@@ -331,8 +331,8 @@ function discoverStartupFleetCandidates(dbManager, opts = {}) {
|
|
|
331
331
|
*
|
|
332
332
|
* Usage:
|
|
333
333
|
* const hm = await hypermem.create({ dataDir: '~/.openclaw/hypermem' });
|
|
334
|
-
* await hm.record('
|
|
335
|
-
* const result = await hm.compose({ agentId: '
|
|
334
|
+
* await hm.record('alice', 'agent:alice:webchat:main', userMsg);
|
|
335
|
+
* const result = await hm.compose({ agentId: 'alice', sessionKey: '...', ... });
|
|
336
336
|
*/
|
|
337
337
|
export class HyperMem {
|
|
338
338
|
dbManager;
|
|
@@ -531,7 +531,7 @@ export class HyperMem {
|
|
|
531
531
|
/**
|
|
532
532
|
* List archived or forked contexts for an agent.
|
|
533
533
|
*
|
|
534
|
-
*
|
|
534
|
+
* operator-safe enumeration path. This is the approved archived-context
|
|
535
535
|
* listing surface. Active composition remains separate.
|
|
536
536
|
*/
|
|
537
537
|
listArchivedContexts(agentId, opts) {
|
package/dist/seed.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
8
|
* const seeder = new WorkspaceSeeder(hypermem);
|
|
9
|
-
* const result = await seeder.seedWorkspace('/path/to/workspace', { agentId: '
|
|
9
|
+
* const result = await seeder.seedWorkspace('/path/to/workspace', { agentId: 'alice' });
|
|
10
10
|
*
|
|
11
11
|
* Idempotent: skips files whose source hash hasn't changed since last index.
|
|
12
12
|
* Atomic: each file's chunks are swapped in a single transaction.
|
package/dist/seed.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
8
|
* const seeder = new WorkspaceSeeder(hypermem);
|
|
9
|
-
* const result = await seeder.seedWorkspace('/path/to/workspace', { agentId: '
|
|
9
|
+
* const result = await seeder.seedWorkspace('/path/to/workspace', { agentId: 'alice' });
|
|
10
10
|
*
|
|
11
11
|
* Idempotent: skips files whose source hash hasn't changed since last index.
|
|
12
12
|
* Atomic: each file's chunks are swapped in a single transaction.
|