@etzelm/openclaw-memory-hindsight 0.5.0 → 0.6.0
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 +17 -0
- package/README.md +4 -9
- package/dist/config.js +1 -1
- package/dist/tools.js +0 -22
- package/openclaw.plugin.json +1 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
### Upgrade notes
|
|
6
|
+
|
|
7
|
+
- Needs an OpenClaw build with openclaw/openclaw#197274 (merged 2026-11-11) for `hindsight_*`
|
|
8
|
+
tools on claude-cli sessions. That host change passes the turn's memory audience when it lists
|
|
9
|
+
claude-cli MCP tools, so the tools list through the normal audience route. On an older
|
|
10
|
+
2026.11.x host, claude-cli sessions keep auto-recall but lose the `hindsight_*` tools; stay on
|
|
11
|
+
0.5.0 there.
|
|
12
|
+
- `listToolsWithoutAudience` is deprecated and ignored. The key still validates, so an existing
|
|
13
|
+
config keeps loading; remove it. A later major release rejects it.
|
|
14
|
+
|
|
15
|
+
### Removed
|
|
16
|
+
|
|
17
|
+
- The `listToolsWithoutAudience` workaround from 0.5.0: a tool context without a memory audience
|
|
18
|
+
gets no `hindsight_*` tools again, whatever the config says.
|
|
19
|
+
|
|
3
20
|
## 0.5.0 (2026-11-10)
|
|
4
21
|
|
|
5
22
|
### Upgrade notes
|
package/README.md
CHANGED
|
@@ -129,7 +129,6 @@ tool conflict.
|
|
|
129
129
|
| `recallCacheTtlMs` | `0` (off) | Auto-recall cache per session and bank, 0 to 3600000 ms; a repeated query skips the API call |
|
|
130
130
|
| `recallFollowupMaxWords` | `0` (off) | At most N words, no URL or path: skip after a recent recall with hits, else add the prior user turn |
|
|
131
131
|
| `knowledgeReadTools` | `false` | Offer the read-only knowledge-base tools (see below); turning it on needs a gateway restart |
|
|
132
|
-
| `listToolsWithoutAudience` | `false` | List the `hindsight_*` tools when the host builds the tool list without an audience (see below) |
|
|
133
132
|
|
|
134
133
|
Session patterns: `*` matches any run of characters except `:`, `**` matches anything including
|
|
135
134
|
`:`, everything else is literal. Patterns match the trimmed session key. `ignoreSessionPatterns`
|
|
@@ -149,14 +148,10 @@ prompt, so the cached prefix stays stable). Knowledge-base tool caps: a response
|
|
|
149
148
|
the tree shows 500 entries, then `(truncated, N more entries)`; search shows at most 50 hits
|
|
150
149
|
with snippets cut at 500 characters and names and ids at 200.
|
|
151
150
|
|
|
152
|
-
`
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
tools listed anyway. The host then builds the callable copy with the audience from the run's grant,
|
|
157
|
-
and that copy alone reaches Hindsight; a call that still has no audience fails with an error before
|
|
158
|
-
any request. The session filters (`memoryMode`, incognito, `excludeProviders`,
|
|
159
|
-
`skipOperationalSessions`) apply as before, and an audience for another agent is still refused.
|
|
151
|
+
`hindsight_*` tools on claude-cli sessions need an OpenClaw build that passes the turn's memory
|
|
152
|
+
audience when it lists MCP tools (openclaw/openclaw#197274). On older 2026.11.x builds those
|
|
153
|
+
sessions get auto-recall but no `hindsight_*` tools. `listToolsWithoutAudience` (0.5.0) is
|
|
154
|
+
deprecated and ignored since 0.6.0; remove it from your config.
|
|
160
155
|
|
|
161
156
|
Config changes apply without a restart: the plugin re-reads its entry from the host's current
|
|
162
157
|
config snapshot (`api.runtime.config.current()`), falling back to the register-time
|
package/dist/config.js
CHANGED
|
@@ -40,6 +40,7 @@ const CONFIG_KEYS = [
|
|
|
40
40
|
"retainQueueMaxItems",
|
|
41
41
|
"retainQueueMaxAgeMs",
|
|
42
42
|
"knowledgeReadTools",
|
|
43
|
+
// Deprecated in 0.6.0 and ignored: accepted so a config that still sets it keeps validating.
|
|
43
44
|
"listToolsWithoutAudience",
|
|
44
45
|
"recallCacheTtlMs",
|
|
45
46
|
"recallFollowupMaxWords",
|
|
@@ -227,7 +228,6 @@ export const hindsightConfigSchema = {
|
|
|
227
228
|
retainQueueMaxItems: readPositiveInt(value, "retainQueueMaxItems", DEFAULT_RETAIN_QUEUE_MAX_ITEMS, MAX_RETAIN_QUEUE_MAX_ITEMS),
|
|
228
229
|
retainQueueMaxAgeMs: readPositiveInt(value, "retainQueueMaxAgeMs", DEFAULT_RETAIN_QUEUE_MAX_AGE_MS),
|
|
229
230
|
knowledgeReadTools: readBool(value, "knowledgeReadTools", false),
|
|
230
|
-
listToolsWithoutAudience: readBool(value, "listToolsWithoutAudience", false),
|
|
231
231
|
recallCacheTtlMs: readNonNegativeInt(value, "recallCacheTtlMs", 0, MAX_RECALL_CACHE_TTL_MS),
|
|
232
232
|
recallFollowupMaxWords: readNonNegativeInt(value, "recallFollowupMaxWords", 0, MAX_RECALL_FOLLOWUP_WORDS),
|
|
233
233
|
};
|
package/dist/tools.js
CHANGED
|
@@ -24,19 +24,6 @@ function requiredString(params, name) {
|
|
|
24
24
|
}
|
|
25
25
|
return value.trim();
|
|
26
26
|
}
|
|
27
|
-
export const NO_AUDIENCE_AT_CALL = "This session has no host memory audience for this call, so Hindsight memory is unavailable.";
|
|
28
|
-
/**
|
|
29
|
-
* A tool listed for a session whose tool list the host built without a memory audience. Reading
|
|
30
|
-
* `bankId` throws, so `execute` fails before any request; the host builds the callable tool again
|
|
31
|
-
* with the session's audience, and that copy gets a real bank.
|
|
32
|
-
*/
|
|
33
|
-
function deferredBank() {
|
|
34
|
-
return {
|
|
35
|
-
get bankId() {
|
|
36
|
-
throw new Error(NO_AUDIENCE_AT_CALL);
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
27
|
/**
|
|
41
28
|
* Resolves the bank for one tool context, or null when the session must not get the tool.
|
|
42
29
|
* The bank comes only from the host-minted audience; the model never names a bank.
|
|
@@ -52,15 +39,6 @@ function resolveToolBank(service, ctx, purpose) {
|
|
|
52
39
|
})) {
|
|
53
40
|
return null;
|
|
54
41
|
}
|
|
55
|
-
// Some hosts list a session's tools before they attach its audience (claude-cli MCP tool
|
|
56
|
-
// projection on OpenClaw 2026.11.x). Opt-in: list the tool for an agent session with a key, and
|
|
57
|
-
// let only the audience-bearing copy built for the call reach Hindsight.
|
|
58
|
-
if (config.listToolsWithoutAudience &&
|
|
59
|
-
!ctx.memoryAudience &&
|
|
60
|
-
ctx.agentId?.trim() &&
|
|
61
|
-
ctx.sessionKey?.trim()) {
|
|
62
|
-
return deferredBank();
|
|
63
|
-
}
|
|
64
42
|
const route = routeAudience(ctx.agentId, ctx.memoryAudience, config.agentBankMap);
|
|
65
43
|
return route.ok ? { bankId: route.bankId } : null;
|
|
66
44
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -96,11 +96,6 @@
|
|
|
96
96
|
"label": "Knowledge Base Read Tools",
|
|
97
97
|
"help": "Offer hindsight_get_knowledge_base_tree, hindsight_search_knowledge_base and hindsight_get_knowledge_page on the same bank as hindsight_recall",
|
|
98
98
|
"advanced": true
|
|
99
|
-
},
|
|
100
|
-
"listToolsWithoutAudience": {
|
|
101
|
-
"label": "List Tools Without Audience",
|
|
102
|
-
"help": "List the hindsight_* tools when the host builds a session's tool list before it attaches the memory audience (claude-cli sessions on OpenClaw 2026.11.x). Calls still need the audience",
|
|
103
|
-
"advanced": true
|
|
104
99
|
}
|
|
105
100
|
},
|
|
106
101
|
"configSchema": {
|
|
@@ -223,7 +218,7 @@
|
|
|
223
218
|
"listToolsWithoutAudience": {
|
|
224
219
|
"type": "boolean",
|
|
225
220
|
"default": false,
|
|
226
|
-
"description": "
|
|
221
|
+
"description": "Deprecated since 0.6.0 and ignored. The host now passes the memory audience when it lists claude-cli tools (openclaw/openclaw#197274). Remove this key; a later major release rejects it"
|
|
227
222
|
},
|
|
228
223
|
"agentBankMap": {
|
|
229
224
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etzelm/openclaw-memory-hindsight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Native Hindsight memory engine for OpenClaw: memory slot provider runtime, auto-recall, auto-retain, pre-compaction flush and hindsight_* agent tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hindsight",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
38
38
|
"test": "vitest run",
|
|
39
39
|
"test:coverage": "vitest run --coverage",
|
|
40
|
-
"lint": "oxlint src",
|
|
40
|
+
"lint": "oxlint --deny-warnings src",
|
|
41
41
|
"format": "oxfmt --write .",
|
|
42
42
|
"format:check": "oxfmt --check .",
|
|
43
43
|
"prepack": "npm run build"
|