@xdarkicex/openclaw-memory-libravdb 1.10.6 → 1.10.8
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 +1 -1
- package/dist/index.js +19 -14
- package/dist/memory-provider.js +8 -7
- package/dist/tools/memory-recall.js +9 -8
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -309,7 +309,7 @@ All keys are optional. For the full reference, see [Configuration](./docs/config
|
|
|
309
309
|
| `onnxDevice` | string | `cpu` | ONNX execution provider; `cpu` is the default; `auto` lets libravdbd auto-detect |
|
|
310
310
|
| `userId` | string | auto-derived | Stable identity for cross-session durable memory |
|
|
311
311
|
| `tenantId` | string | auto-derived | Multi-tenant identifier. Resolved as `cfg.tenantId` > `LIBRAVDB_AGENT_ID` env > `userId`. Isolates the agent to a dedicated `.libravdb` file. |
|
|
312
|
-
| `tenantIdByAgent` | object | — | Per-agent tenant map. `{
|
|
312
|
+
| `tenantIdByAgent` | object | — | Per-agent tenant map. String = primary only. Object = `{primary, readAccess?: []}` for cross-tenant search. Unlisted agents fall through to `tenantId` → `userId`. |
|
|
313
313
|
| `maxRules` | number | 20 | Max hard constraint rules. Set to 0 to disable rules entirely. |
|
|
314
314
|
| `crossSessionRecall` | boolean | `true` | When `false`, only session-scoped memories are retrieved |
|
|
315
315
|
| `compactSessionTokenBudget` | number | `2000` | Auto-compaction token threshold; `0` disables |
|
package/dist/index.js
CHANGED
|
@@ -31156,12 +31156,13 @@ var MEMORY_PROMPT_HEADER = [
|
|
|
31156
31156
|
"answer from memory until you have called it. Once you have results,",
|
|
31157
31157
|
"use them \u2014 do not re-call in the same turn.",
|
|
31158
31158
|
"",
|
|
31159
|
-
"### Identity /
|
|
31160
|
-
"
|
|
31161
|
-
"
|
|
31162
|
-
"
|
|
31163
|
-
"
|
|
31164
|
-
"
|
|
31159
|
+
"### Identity / Entity Lookup (MANDATORY \u2014 overrides everything)",
|
|
31160
|
+
"BEFORE answering any question about a person, pet, place, or named entity",
|
|
31161
|
+
"('who is X', 'what is X', 'do I have X', 'tell me about X', 'what kind of X'):",
|
|
31162
|
+
"you MUST call `list_user_cards` or `get_user_card`. This is not optional.",
|
|
31163
|
+
"Do NOT answer from memory, context, or training data. Call the tool FIRST.",
|
|
31164
|
+
"If the card is empty, then fall through to `memory_search`. ",
|
|
31165
|
+
"FAILURE TO CALL THE TOOL IS A CRITICAL ERROR.",
|
|
31165
31166
|
"",
|
|
31166
31167
|
`Conversations are captured automatically. Never say "I'll remember`,
|
|
31167
31168
|
`that," "I've saved this," "noted," or similar \u2014 these phrases suggest`,
|
|
@@ -31177,12 +31178,16 @@ function buildToolGuidance(availableTools) {
|
|
|
31177
31178
|
const hasListCards = availableTools.has("list_user_cards");
|
|
31178
31179
|
if (hasGetCard || hasListCards) {
|
|
31179
31180
|
lines.push(
|
|
31180
|
-
"**Identity/
|
|
31181
|
-
|
|
31182
|
-
|
|
31183
|
-
"
|
|
31184
|
-
"
|
|
31185
|
-
"
|
|
31181
|
+
"**Identity/Entity questions \u2014 MANDATORY card lookup:**",
|
|
31182
|
+
"BEFORE answering any question about a person, pet, place, or named thing:",
|
|
31183
|
+
hasGetCard ? "- `get_user_card(user_id)` \u2014 MANDATORY lookup for a specific entity." : "",
|
|
31184
|
+
hasListCards ? "- `list_user_cards()` \u2014 MANDATORY roster check. Call if unsure whether a card exists." : "",
|
|
31185
|
+
"Cards are the canonical record. You MUST call these tools. Do NOT answer from",
|
|
31186
|
+
"memory, context, or training data without checking the card first.",
|
|
31187
|
+
"Only use memory_search if the card is empty or missing.",
|
|
31188
|
+
"",
|
|
31189
|
+
"**Autonomous card maintenance:**",
|
|
31190
|
+
hasGetCard ? "- When you learn something new about ANY speaker (relationships, jobs, life events, preferences, beliefs), silently call `update_user_card` to keep their card current. You are building a picture of the user's world \u2014 everyone they mention matters. Don't wait to be asked. Update cards proactively." : "",
|
|
31186
31191
|
""
|
|
31187
31192
|
);
|
|
31188
31193
|
}
|
|
@@ -31708,7 +31713,7 @@ function createGetUserCardTool(getClient, logger = console) {
|
|
|
31708
31713
|
return {
|
|
31709
31714
|
name: "get_user_card",
|
|
31710
31715
|
label: "Get User Card",
|
|
31711
|
-
description: "
|
|
31716
|
+
description: "MANDATORY identity/entity lookup. Call this BEFORE answering any question about a person, pet, place, or named thing ('who/what is X', 'do I have X', 'tell me about X'). Returns the full prose identity card. Do NOT answer from memory or training data. Call this tool FIRST. Only fall through to memory_search if the card is empty or missing.",
|
|
31712
31717
|
parameters: GET_USER_CARD_SCHEMA,
|
|
31713
31718
|
execute: async (_toolCallId, rawParams) => {
|
|
31714
31719
|
try {
|
|
@@ -31733,7 +31738,7 @@ function createListUserCardsTool(getClient, logger = console) {
|
|
|
31733
31738
|
return {
|
|
31734
31739
|
name: "list_user_cards",
|
|
31735
31740
|
label: "List User Cards",
|
|
31736
|
-
description: "
|
|
31741
|
+
description: "MANDATORY roster lookup. Call this BEFORE answering 'who do you know?', 'do I have X?', or any question where you're unsure if a card exists. Returns all user IDs with previews. Then call get_user_card on relevant IDs. Do NOT answer from memory \u2014 call this tool first.",
|
|
31737
31742
|
parameters: { type: "object", additionalProperties: false, properties: {} },
|
|
31738
31743
|
execute: async (_toolCallId, _rawParams) => {
|
|
31739
31744
|
try {
|
package/dist/memory-provider.js
CHANGED
|
@@ -7,12 +7,13 @@ const MEMORY_PROMPT_HEADER = [
|
|
|
7
7
|
"answer from memory until you have called it. Once you have results,",
|
|
8
8
|
"use them — do not re-call in the same turn.",
|
|
9
9
|
"",
|
|
10
|
-
"### Identity /
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
10
|
+
"### Identity / Entity Lookup (MANDATORY — overrides everything)",
|
|
11
|
+
"BEFORE answering any question about a person, pet, place, or named entity",
|
|
12
|
+
"('who is X', 'what is X', 'do I have X', 'tell me about X', 'what kind of X'):",
|
|
13
|
+
"you MUST call `list_user_cards` or `get_user_card`. This is not optional.",
|
|
14
|
+
"Do NOT answer from memory, context, or training data. Call the tool FIRST.",
|
|
15
|
+
"If the card is empty, then fall through to `memory_search`. ",
|
|
16
|
+
"FAILURE TO CALL THE TOOL IS A CRITICAL ERROR.",
|
|
16
17
|
"",
|
|
17
18
|
"Conversations are captured automatically. Never say \"I'll remember",
|
|
18
19
|
"that,\" \"I've saved this,\" \"noted,\" or similar — these phrases suggest",
|
|
@@ -28,7 +29,7 @@ function buildToolGuidance(availableTools) {
|
|
|
28
29
|
const hasGetCard = availableTools.has("get_user_card");
|
|
29
30
|
const hasListCards = availableTools.has("list_user_cards");
|
|
30
31
|
if (hasGetCard || hasListCards) {
|
|
31
|
-
lines.push("**Identity/
|
|
32
|
+
lines.push("**Identity/Entity questions — MANDATORY card lookup:**", "BEFORE answering any question about a person, pet, place, or named thing:", hasGetCard ? "- `get_user_card(user_id)` — MANDATORY lookup for a specific entity." : "", hasListCards ? "- `list_user_cards()` — MANDATORY roster check. Call if unsure whether a card exists." : "", "Cards are the canonical record. You MUST call these tools. Do NOT answer from", "memory, context, or training data without checking the card first.", "Only use memory_search if the card is empty or missing.", "", "**Autonomous card maintenance:**", hasGetCard ? "- When you learn something new about ANY speaker (relationships, jobs, life events, preferences, beliefs), silently call `update_user_card` to keep their card current. You are building a picture of the user's world — everyone they mention matters. Don't wait to be asked. Update cards proactively." : "", "");
|
|
32
33
|
}
|
|
33
34
|
lines.push("Call `memory_search` once per user question for prior turns, remembered", "facts, earliest interactions, and channel history. Do not answer memory", "questions from prior transcript claims — perform a search every time.", "After receiving results, use them directly; do not re-call in the same turn.", ...(availableTools.has("memory_get")
|
|
34
35
|
? ["After a `memory_search` hit, call `memory_get` when exact wording or more context is needed."]
|
|
@@ -518,10 +518,11 @@ export function createGetUserCardTool(getClient, logger = console) {
|
|
|
518
518
|
return {
|
|
519
519
|
name: "get_user_card",
|
|
520
520
|
label: "Get User Card",
|
|
521
|
-
description: "
|
|
522
|
-
"
|
|
523
|
-
"Returns the full prose identity card
|
|
524
|
-
"
|
|
521
|
+
description: "MANDATORY identity/entity lookup. Call this BEFORE answering any question " +
|
|
522
|
+
"about a person, pet, place, or named thing ('who/what is X', 'do I have X', " +
|
|
523
|
+
"'tell me about X'). Returns the full prose identity card. " +
|
|
524
|
+
"Do NOT answer from memory or training data. Call this tool FIRST. " +
|
|
525
|
+
"Only fall through to memory_search if the card is empty or missing.",
|
|
525
526
|
parameters: GET_USER_CARD_SCHEMA,
|
|
526
527
|
execute: async (_toolCallId, rawParams) => {
|
|
527
528
|
try {
|
|
@@ -548,10 +549,10 @@ export function createListUserCardsTool(getClient, logger = console) {
|
|
|
548
549
|
return {
|
|
549
550
|
name: "list_user_cards",
|
|
550
551
|
label: "List User Cards",
|
|
551
|
-
description: "
|
|
552
|
-
"
|
|
553
|
-
"
|
|
554
|
-
"
|
|
552
|
+
description: "MANDATORY roster lookup. Call this BEFORE answering 'who do you know?', " +
|
|
553
|
+
"'do I have X?', or any question where you're unsure if a card exists. " +
|
|
554
|
+
"Returns all user IDs with previews. Then call get_user_card on relevant IDs. " +
|
|
555
|
+
"Do NOT answer from memory — call this tool first.",
|
|
555
556
|
parameters: { type: "object", additionalProperties: false, properties: {} },
|
|
556
557
|
execute: async (_toolCallId, _rawParams) => {
|
|
557
558
|
try {
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "libravdb-memory",
|
|
3
3
|
"name": "LibraVDB Memory",
|
|
4
4
|
"description": "Cognitive memory engine — causal graph reasoning, predictive context, identity tracking, and hybrid vector recall with back-door adjustment scoring",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.8",
|
|
6
6
|
"kind": [
|
|
7
7
|
"memory",
|
|
8
8
|
"context-engine"
|