@vectorize-io/hindsight-openclaw 0.4.14 → 0.4.16

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/dist/types.d.ts CHANGED
@@ -24,6 +24,14 @@ export interface MoltbotConfig {
24
24
  };
25
25
  };
26
26
  }
27
+ export interface PluginHookAgentContext {
28
+ agentId?: string;
29
+ sessionKey?: string;
30
+ workspaceDir?: string;
31
+ messageProvider?: string;
32
+ channelId?: string;
33
+ senderId?: string;
34
+ }
27
35
  export interface PluginConfig {
28
36
  bankMission?: string;
29
37
  embedPort?: number;
@@ -40,6 +48,20 @@ export interface PluginConfig {
40
48
  bankIdPrefix?: string;
41
49
  excludeProviders?: string[];
42
50
  autoRecall?: boolean;
51
+ dynamicBankGranularity?: Array<'agent' | 'provider' | 'channel' | 'user'>;
52
+ autoRetain?: boolean;
53
+ retainRoles?: Array<'user' | 'assistant' | 'system' | 'tool'>;
54
+ recallBudget?: 'low' | 'mid' | 'high';
55
+ recallMaxTokens?: number;
56
+ recallTypes?: Array<'world' | 'experience' | 'observation'>;
57
+ recallRoles?: Array<'user' | 'assistant' | 'system' | 'tool'>;
58
+ retainEveryNTurns?: number;
59
+ retainOverlapTurns?: number;
60
+ recallTopK?: number;
61
+ recallContextTurns?: number;
62
+ recallMaxQueryChars?: number;
63
+ recallPromptPreamble?: string;
64
+ debug?: boolean;
43
65
  }
44
66
  export interface ServiceConfig {
45
67
  id: string;
@@ -59,6 +81,8 @@ export interface RetainResponse {
59
81
  export interface RecallRequest {
60
82
  query: string;
61
83
  max_tokens?: number;
84
+ budget?: 'low' | 'mid' | 'high';
85
+ types?: Array<'world' | 'experience' | 'observation'>;
62
86
  }
63
87
  export interface RecallResponse {
64
88
  results: MemoryResult[];
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "bankMission": {
19
19
  "type": "string",
20
- "description": "Custom mission/context for the memory bank",
20
+ "description": "Agent identity/purpose stored on the memory bank. Helps the memory engine understand context for better fact extraction during retain. Set once per bank on first use — this is not a recall prompt.",
21
21
  "default": "You are an AI assistant helping users across multiple communication channels (Telegram, Slack, Discord, etc.). Remember user preferences, instructions, and important context from conversations to provide personalized assistance."
22
22
  },
23
23
  "embedVersion": {
@@ -28,7 +28,15 @@
28
28
  "llmProvider": {
29
29
  "type": "string",
30
30
  "description": "LLM provider for Hindsight memory (e.g. 'openai', 'anthropic', 'gemini', 'groq', 'ollama', 'openai-codex', 'claude-code'). Takes priority over auto-detection but not over HINDSIGHT_API_LLM_PROVIDER env var.",
31
- "enum": ["openai", "anthropic", "gemini", "groq", "ollama", "openai-codex", "claude-code"]
31
+ "enum": [
32
+ "openai",
33
+ "anthropic",
34
+ "gemini",
35
+ "groq",
36
+ "ollama",
37
+ "openai-codex",
38
+ "claude-code"
39
+ ]
32
40
  },
33
41
  "llmModel": {
34
42
  "type": "string",
@@ -71,8 +79,119 @@
71
79
  },
72
80
  "excludeProviders": {
73
81
  "type": "array",
74
- "items": { "type": "string" },
82
+ "items": {
83
+ "type": "string"
84
+ },
75
85
  "description": "Message providers to exclude from recall and retain (e.g. ['telegram', 'discord'])"
86
+ },
87
+ "dynamicBankGranularity": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "string",
91
+ "enum": [
92
+ "agent",
93
+ "channel",
94
+ "user",
95
+ "provider"
96
+ ]
97
+ },
98
+ "description": "Fields used to derive bank ID. Controls memory isolation granularity. Default: ['agent', 'channel', 'user'].",
99
+ "default": [
100
+ "agent",
101
+ "channel",
102
+ "user"
103
+ ]
104
+ },
105
+ "autoRetain": {
106
+ "type": "boolean",
107
+ "description": "Automatically retain conversation as memories after each interaction. Set to false to disable.",
108
+ "default": true
109
+ },
110
+ "retainRoles": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "string",
114
+ "enum": [
115
+ "user",
116
+ "assistant",
117
+ "system",
118
+ "tool"
119
+ ]
120
+ },
121
+ "description": "Message roles to include in retained transcript. Default: ['user', 'assistant'].",
122
+ "default": [
123
+ "user",
124
+ "assistant"
125
+ ]
126
+ },
127
+ "retainEveryNTurns": {
128
+ "type": "integer",
129
+ "description": "Retain every Nth turn instead of every turn. 1 = every turn (default). Values > 1 enable chunked retention with a sliding window.",
130
+ "minimum": 1,
131
+ "default": 1
132
+ },
133
+ "retainOverlapTurns": {
134
+ "type": "integer",
135
+ "description": "Extra prior turns to include when chunked retention fires. Window = retainEveryNTurns + retainOverlapTurns. Only applies when retainEveryNTurns > 1.",
136
+ "minimum": 0,
137
+ "default": 0
138
+ },
139
+ "recallBudget": {
140
+ "type": "string",
141
+ "description": "Recall effort level. Higher budgets use more retrieval strategies for better results but take longer.",
142
+ "enum": ["low", "mid", "high"],
143
+ "default": "mid"
144
+ },
145
+ "recallMaxTokens": {
146
+ "type": "integer",
147
+ "description": "Maximum tokens for recall response. Controls how much memory context is injected per turn.",
148
+ "minimum": 1,
149
+ "default": 1024
150
+ },
151
+ "recallTypes": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "string",
155
+ "enum": ["world", "experience", "observation"]
156
+ },
157
+ "description": "Memory types to recall. Defaults to ['world', 'experience'] — excludes verbose observation entries.",
158
+ "default": ["world", "experience"]
159
+ },
160
+ "recallRoles": {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "string",
164
+ "enum": ["user", "assistant", "system", "tool"]
165
+ },
166
+ "description": "Roles to include when composing contextual recall query. Default: ['user', 'assistant'].",
167
+ "default": ["user", "assistant"]
168
+ },
169
+ "recallContextTurns": {
170
+ "type": "integer",
171
+ "minimum": 1,
172
+ "description": "Number of user turns to include in recall query context. 1 keeps latest-message-only behavior.",
173
+ "default": 1
174
+ },
175
+ "recallMaxQueryChars": {
176
+ "type": "integer",
177
+ "minimum": 1,
178
+ "description": "Maximum character length for composed recall query before calling recall.",
179
+ "default": 800
180
+ },
181
+ "recallTopK": {
182
+ "type": "integer",
183
+ "minimum": 1,
184
+ "description": "Maximum number of memories to inject per turn. Applied after API response as a hard cap."
185
+ },
186
+ "recallPromptPreamble": {
187
+ "type": "string",
188
+ "description": "Text shown above recalled memories in the injected context block.",
189
+ "default": "Relevant memories from past conversations (prioritize recent when conflicting). Only use memories that are directly useful to continue this conversation; ignore the rest:"
190
+ },
191
+ "debug": {
192
+ "type": "boolean",
193
+ "description": "Enable debug logging for Hindsight plugin operations.",
194
+ "default": false
76
195
  }
77
196
  },
78
197
  "additionalProperties": false
@@ -137,6 +256,61 @@
137
256
  "excludeProviders": {
138
257
  "label": "Excluded Providers",
139
258
  "placeholder": "e.g. telegram, discord"
259
+ },
260
+ "dynamicBankGranularity": {
261
+ "label": "Bank Granularity",
262
+ "placeholder": "e.g. ['agent', 'channel', 'user']"
263
+ },
264
+ "autoRetain": {
265
+ "label": "Auto-Retain",
266
+ "placeholder": "true (enable auto-retention)"
267
+ },
268
+ "retainRoles": {
269
+ "label": "Retain Roles",
270
+ "placeholder": "e.g. ['user', 'assistant']"
271
+ },
272
+ "retainEveryNTurns": {
273
+ "label": "Retain Every N Turns",
274
+ "placeholder": "1 (every turn, default)"
275
+ },
276
+ "retainOverlapTurns": {
277
+ "label": "Retain Overlap Turns",
278
+ "placeholder": "0 (no overlap, default)"
279
+ },
280
+ "recallBudget": {
281
+ "label": "Recall Budget",
282
+ "placeholder": "low, mid, or high"
283
+ },
284
+ "recallMaxTokens": {
285
+ "label": "Recall Max Tokens",
286
+ "placeholder": "1024 (default)"
287
+ },
288
+ "recallTypes": {
289
+ "label": "Recall Types",
290
+ "placeholder": "e.g. ['world', 'experience']"
291
+ },
292
+ "recallRoles": {
293
+ "label": "Recall Roles",
294
+ "placeholder": "e.g. ['user', 'assistant']"
295
+ },
296
+ "recallContextTurns": {
297
+ "label": "Recall Context Turns",
298
+ "placeholder": "1 (latest only, default)"
299
+ },
300
+ "recallMaxQueryChars": {
301
+ "label": "Recall Max Query Chars",
302
+ "placeholder": "800 (default)"
303
+ },
304
+ "recallTopK": {
305
+ "label": "Recall Top K",
306
+ "placeholder": "e.g. 5 (no limit by default)"
307
+ },
308
+ "recallPromptPreamble": {
309
+ "label": "Recall Prompt Preamble",
310
+ "placeholder": "Instruction shown above recalled memories in injected context"
311
+ },
312
+ "debug": {
313
+ "label": "Debug"
140
314
  }
141
315
  }
142
316
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorize-io/hindsight-openclaw",
3
- "version": "0.4.14",
3
+ "version": "0.4.16",
4
4
  "description": "Hindsight memory plugin for OpenClaw - biomimetic long-term memory with fact extraction",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -50,5 +50,8 @@
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=22"
53
+ },
54
+ "overrides": {
55
+ "rollup": "^4.59.0"
53
56
  }
54
57
  }