@etzelm/openclaw-memory-hindsight 0.1.2 → 0.3.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 +136 -0
- package/README.md +194 -41
- package/dist/client.js +136 -5
- package/dist/config.js +26 -1
- package/dist/index.js +54 -16
- package/dist/provider-runtime.js +1 -1
- package/dist/retain-queue.js +560 -0
- package/dist/routing.js +13 -0
- package/dist/service.js +125 -13
- package/dist/tools.js +179 -8
- package/dist/transcript.js +244 -2
- package/openclaw.plugin.json +62 -1
- package/package.json +5 -3
package/openclaw.plugin.json
CHANGED
|
@@ -18,7 +18,14 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"contracts": {
|
|
21
|
-
"tools": [
|
|
21
|
+
"tools": [
|
|
22
|
+
"hindsight_recall",
|
|
23
|
+
"hindsight_reflect",
|
|
24
|
+
"hindsight_retain",
|
|
25
|
+
"hindsight_get_knowledge_base_tree",
|
|
26
|
+
"hindsight_search_knowledge_base",
|
|
27
|
+
"hindsight_get_knowledge_page"
|
|
28
|
+
]
|
|
22
29
|
},
|
|
23
30
|
"toolMetadata": {
|
|
24
31
|
"hindsight_retain": {
|
|
@@ -50,10 +57,35 @@
|
|
|
50
57
|
"help": "Permit plain http to a non-loopback host. Token and conversation text are sent unencrypted; prefer https or a loopback tunnel",
|
|
51
58
|
"advanced": true
|
|
52
59
|
},
|
|
60
|
+
"retainQueueEnabled": {
|
|
61
|
+
"label": "Offline Retain Queue",
|
|
62
|
+
"help": "Keep auto-retains that fail because Hindsight is unreachable (network error, timeout, 5xx) in a local file under the state dir and send them later to the same bank",
|
|
63
|
+
"advanced": true
|
|
64
|
+
},
|
|
65
|
+
"retainQueueMaxItems": {
|
|
66
|
+
"label": "Retain Queue Max Items",
|
|
67
|
+
"help": "Oldest queued retains are dropped beyond this count",
|
|
68
|
+
"advanced": true
|
|
69
|
+
},
|
|
70
|
+
"retainQueueMaxAgeMs": {
|
|
71
|
+
"label": "Retain Queue Max Age (ms)",
|
|
72
|
+
"help": "Queued retains older than this are dropped (default 7 days)",
|
|
73
|
+
"advanced": true
|
|
74
|
+
},
|
|
53
75
|
"retainMission": {
|
|
54
76
|
"label": "Retain Mission",
|
|
55
77
|
"help": "Applied to each bank before its first write: what Hindsight should extract",
|
|
56
78
|
"advanced": true
|
|
79
|
+
},
|
|
80
|
+
"retainTags": {
|
|
81
|
+
"label": "Retain Tags",
|
|
82
|
+
"help": "Tags added to every retained memory (for example source:openclaw)",
|
|
83
|
+
"advanced": true
|
|
84
|
+
},
|
|
85
|
+
"knowledgeReadTools": {
|
|
86
|
+
"label": "Knowledge Base Read Tools",
|
|
87
|
+
"help": "Offer hindsight_get_knowledge_base_tree, hindsight_search_knowledge_base and hindsight_get_knowledge_page on the same bank as hindsight_recall",
|
|
88
|
+
"advanced": true
|
|
57
89
|
}
|
|
58
90
|
},
|
|
59
91
|
"configSchema": {
|
|
@@ -105,6 +137,12 @@
|
|
|
105
137
|
"retainContext": {
|
|
106
138
|
"type": "string"
|
|
107
139
|
},
|
|
140
|
+
"retainTags": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
108
146
|
"excludeProviders": {
|
|
109
147
|
"type": "array",
|
|
110
148
|
"items": {
|
|
@@ -114,6 +152,29 @@
|
|
|
114
152
|
"skipOperationalSessions": {
|
|
115
153
|
"type": "boolean"
|
|
116
154
|
},
|
|
155
|
+
"retainQueueEnabled": {
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"default": true,
|
|
158
|
+
"description": "Queue auto-retains that fail because Hindsight is unreachable (network error, timeout, HTTP 5xx) in <state dir>/hindsight-native/retain-queue.jsonl (mode 600) and replay them to the same bank; 4xx answers are not queued"
|
|
159
|
+
},
|
|
160
|
+
"retainQueueMaxItems": {
|
|
161
|
+
"type": "integer",
|
|
162
|
+
"minimum": 1,
|
|
163
|
+
"maximum": 10000,
|
|
164
|
+
"default": 500,
|
|
165
|
+
"description": "Most queued retains kept; the oldest are dropped beyond this"
|
|
166
|
+
},
|
|
167
|
+
"retainQueueMaxAgeMs": {
|
|
168
|
+
"type": "integer",
|
|
169
|
+
"minimum": 1,
|
|
170
|
+
"default": 604800000,
|
|
171
|
+
"description": "Queued retains older than this many milliseconds are dropped (default 7 days)"
|
|
172
|
+
},
|
|
173
|
+
"knowledgeReadTools": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"default": false,
|
|
176
|
+
"description": "Offer the read-only knowledge-base tools (tree, search, page) on the session's own memory bank"
|
|
177
|
+
},
|
|
117
178
|
"agentBankMap": {
|
|
118
179
|
"type": "object",
|
|
119
180
|
"additionalProperties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etzelm/openclaw-memory-hindsight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
37
37
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
38
38
|
"test": "vitest run",
|
|
39
|
+
"test:coverage": "vitest run --coverage",
|
|
39
40
|
"lint": "oxlint src",
|
|
40
41
|
"format": "oxfmt --write .",
|
|
41
42
|
"format:check": "oxfmt --check .",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@types/node": "26.6.6",
|
|
50
|
+
"@vitest/coverage-v8": "5.1.0",
|
|
49
51
|
"openclaw": "2026.10.10",
|
|
50
52
|
"oxfmt": "0.76.0",
|
|
51
53
|
"oxlint": "1.91.0",
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
"vitest": "5.1.0"
|
|
54
56
|
},
|
|
55
57
|
"peerDependencies": {
|
|
56
|
-
"openclaw": ">=2026.10.
|
|
58
|
+
"openclaw": ">=2026.10.10"
|
|
57
59
|
},
|
|
58
60
|
"peerDependenciesMeta": {
|
|
59
61
|
"openclaw": {
|
|
@@ -71,7 +73,7 @@
|
|
|
71
73
|
"npmSpec": "@etzelm/openclaw-memory-hindsight",
|
|
72
74
|
"clawhubSpec": "clawhub:@etzelm/openclaw-memory-hindsight",
|
|
73
75
|
"defaultChoice": "npm",
|
|
74
|
-
"minHostVersion": ">=2026.10.
|
|
76
|
+
"minHostVersion": ">=2026.10.10"
|
|
75
77
|
},
|
|
76
78
|
"compat": {
|
|
77
79
|
"pluginApi": ">=2026.10.1"
|