@xdarkicex/openclaw-memory-libravdb 1.10.5 → 1.10.7

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
@@ -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. `{"agent1": "t1"}`. Unlisted agents fall through to `tenantId` → `userId`. |
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 / People Lookup (OVERRIDES memory_search)",
31160
- "When asked about a specific person ('who is X', 'what do you know",
31161
- "about X', 'tell me about X'): call `get_user_card` or `list_user_cards`",
31162
- "FIRST. User cards are the canonical identity record written by you.",
31163
- "Only use `memory_search` AFTER the card if the card lacks detail.",
31164
- "Do NOT call memory_search first for people questions.",
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,13 @@ function buildToolGuidance(availableTools) {
31177
31178
  const hasListCards = availableTools.has("list_user_cards");
31178
31179
  if (hasGetCard || hasListCards) {
31179
31180
  lines.push(
31180
- "**Identity/People questions \u2014 ALWAYS use user cards first:**",
31181
- hasGetCard ? "- `get_user_card(user_id)` \u2014 primary lookup for a specific person." : "",
31182
- hasListCards ? "- `list_user_cards()` \u2014 list everyone you have cards for, or when unsure who has cards." : "",
31183
- "User cards are the canonical identity record. Call these FIRST before memory_search for any",
31184
- "person question like 'who is X', 'what do you know about X', 'tell me about X'.",
31185
- "Only use memory_search to supplement details the card doesn't cover.",
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.",
31186
31188
  ""
31187
31189
  );
31188
31190
  }
@@ -31708,7 +31710,7 @@ function createGetUserCardTool(getClient, logger = console) {
31708
31710
  return {
31709
31711
  name: "get_user_card",
31710
31712
  label: "Get User Card",
31711
- description: "PRIMARY identity lookup. Call this FIRST whenever someone asks about a person ('who is X', 'tell me about X', 'what do you know about X'). Returns the full prose identity card with metadata. Only use memory_search AFTER get_user_card if the card lacks detail.",
31713
+ 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
31714
  parameters: GET_USER_CARD_SCHEMA,
31713
31715
  execute: async (_toolCallId, rawParams) => {
31714
31716
  try {
@@ -31733,7 +31735,7 @@ function createListUserCardsTool(getClient, logger = console) {
31733
31735
  return {
31734
31736
  name: "list_user_cards",
31735
31737
  label: "List User Cards",
31736
- description: "List every person you have a user card for. Returns user IDs and card previews. Use this FIRST when asked about multiple people, 'who do you know?', 'who is everyone?', or when you're unsure which people have cards. Then use get_user_card on specific IDs for full detail. Use memory_search only to supplement gaps.",
31738
+ 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
31739
  parameters: { type: "object", additionalProperties: false, properties: {} },
31738
31740
  execute: async (_toolCallId, _rawParams) => {
31739
31741
  try {
@@ -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 / People Lookup (OVERRIDES memory_search)",
11
- "When asked about a specific person ('who is X', 'what do you know",
12
- "about X', 'tell me about X'): call `get_user_card` or `list_user_cards`",
13
- "FIRST. User cards are the canonical identity record written by you.",
14
- "Only use `memory_search` AFTER the card if the card lacks detail.",
15
- "Do NOT call memory_search first for people questions.",
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/People questions — ALWAYS use user cards first:**", hasGetCard ? "- `get_user_card(user_id)` — primary lookup for a specific person." : "", hasListCards ? "- `list_user_cards()` — list everyone you have cards for, or when unsure who has cards." : "", "User cards are the canonical identity record. Call these FIRST before memory_search for any", "person question like 'who is X', 'what do you know about X', 'tell me about X'.", "Only use memory_search to supplement details the card doesn't cover.", "");
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.", "");
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: "PRIMARY identity lookup. Call this FIRST whenever someone asks about a person " +
522
- "('who is X', 'tell me about X', 'what do you know about X'). " +
523
- "Returns the full prose identity card with metadata. " +
524
- "Only use memory_search AFTER get_user_card if the card lacks detail.",
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: "List every person you have a user card for. Returns user IDs and card previews. " +
552
- "Use this FIRST when asked about multiple people, 'who do you know?', 'who is everyone?', " +
553
- "or when you're unsure which people have cards. Then use get_user_card on specific IDs " +
554
- "for full detail. Use memory_search only to supplement gaps.",
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 {
@@ -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",
5
+ "version": "1.10.7",
6
6
  "kind": [
7
7
  "memory",
8
8
  "context-engine"
@@ -83,8 +83,20 @@
83
83
  },
84
84
  "tenantIdByAgent": {
85
85
  "type": "object",
86
- "additionalProperties": { "type": "string" },
87
- "description": "Per-agent tenant overrides. Maps agentId to tenantId. Agents not listed fall through to tenantId -> userId. Example: {\"jarvis\": \"jarvis\", \"gideon\": \"gideon\"}."
86
+ "additionalProperties": {
87
+ "anyOf": [
88
+ { "type": "string" },
89
+ {
90
+ "type": "object",
91
+ "properties": {
92
+ "primary": { "type": "string" },
93
+ "readAccess": { "type": "array", "items": { "type": "string" } }
94
+ },
95
+ "required": ["primary"]
96
+ }
97
+ ]
98
+ },
99
+ "description": "Per-agent tenant overrides. String = primary only. Object = { primary, readAccess?: [] } for cross-tenant search. Unlisted agents fall through to tenantId -> userId."
88
100
  },
89
101
  "maxRules": {
90
102
  "type": "number",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.10.5",
3
+ "version": "1.10.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",