@vectorize-io/hindsight-openclaw 0.4.16 → 0.4.18

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/README.md CHANGED
@@ -26,7 +26,7 @@ That's it! The plugin will automatically start capturing and recalling memories.
26
26
 
27
27
  ## Features
28
28
 
29
- - **Auto-capture** and **auto-recall** of memories each turn
29
+ - **Auto-capture** and **auto-recall** of memories each turn, injected into system prompt space so recalled memories stay out of the visible chat transcript
30
30
  - **Memory isolation** — configurable per agent, channel, user, or provider via `dynamicBankGranularity`
31
31
  - **Retention controls** — choose which message roles to retain and toggle auto-retain on/off
32
32
 
@@ -61,7 +61,7 @@ Optional settings in `~/.openclaw/openclaw.json` under `plugins.entries.hindsigh
61
61
  | `recallTopK` | — | Max number of memories to inject per turn. Applied after API response as a hard cap. |
62
62
  | `recallContextTurns` | `1` | Number of user turns to include when composing recall query context. `1` keeps latest-message-only behavior. |
63
63
  | `recallMaxQueryChars` | `800` | Maximum character length for the composed recall query before calling recall. |
64
- | `recallPromptPreamble` | built-in string | Prompt text placed above recalled memories in the injected `<hindsight_memories>` block. |
64
+ | `recallPromptPreamble` | built-in string | Prompt text placed above recalled memories in the injected `<hindsight_memories>` system-context block. |
65
65
  | `hindsightApiUrl` | — | External Hindsight API URL (skips local daemon) |
66
66
  | `hindsightApiToken` | — | Auth token for external API |
67
67
 
package/dist/index.js CHANGED
@@ -970,8 +970,9 @@ Current time - ${formatCurrentTimeForRecall()}
970
970
  ${memoriesFormatted}
971
971
  </hindsight_memories>`;
972
972
  debug(`[Hindsight] Auto-recall: Injecting ${results.length} memories from bank ${bankId}`);
973
- // Inject context before the user message
974
- return { prependContext: contextMessage };
973
+ // Inject recalled memories into system prompt space so they stay hidden from
974
+ // the end-user transcript/UI while still being available to the model.
975
+ return { prependSystemContext: contextMessage };
975
976
  }
976
977
  catch (error) {
977
978
  if (error instanceof DOMException && error.name === 'TimeoutError') {
package/dist/types.d.ts CHANGED
@@ -1,9 +1,11 @@
1
+ export interface PluginPromptHookResult {
2
+ prependContext?: string;
3
+ prependSystemContext?: string;
4
+ }
1
5
  export interface MoltbotPluginAPI {
2
6
  config: MoltbotConfig;
3
7
  registerService(config: ServiceConfig): void;
4
- on(event: string, handler: (event: any, ctx?: any) => void | Promise<void | {
5
- prependContext?: string;
6
- }>): void;
8
+ on(event: string, handler: (event: any, ctx?: any) => void | Promise<void | PluginPromptHookResult>): void;
7
9
  }
8
10
  export interface MoltbotConfig {
9
11
  agents?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorize-io/hindsight-openclaw",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
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",