memory-lancedb-pro 1.0.6 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.7
4
+
5
+ - Fix: resolve `agentId` from hook context (`ctx?.agentId`) for `before_agent_start` and `agent_end`, restoring per-agent scope isolation when using multi-agent setups.
6
+
3
7
  ## 1.0.6
4
8
 
5
9
  - Fix: auto-recall injection now correctly skips cron prompts wrapped as `[cron:...] run ...` (reduces token usage for cron jobs).
package/index.ts CHANGED
@@ -365,14 +365,14 @@ const memoryLanceDBProPlugin = {
365
365
 
366
366
  // Auto-recall: inject relevant memories before agent starts
367
367
  if (config.autoRecall !== false) {
368
- api.on("before_agent_start", async (event) => {
368
+ api.on("before_agent_start", async (event, ctx) => {
369
369
  if (!event.prompt || shouldSkipRetrieval(event.prompt)) {
370
370
  return;
371
371
  }
372
372
 
373
373
  try {
374
374
  // Determine agent ID and accessible scopes
375
- const agentId = event.agentId || "main";
375
+ const agentId = ctx?.agentId || "main";
376
376
  const accessibleScopes = scopeManager.getAccessibleScopes(agentId);
377
377
 
378
378
  const results = await retriever.retrieve({
@@ -409,14 +409,14 @@ const memoryLanceDBProPlugin = {
409
409
 
410
410
  // Auto-capture: analyze and store important information after agent ends
411
411
  if (config.autoCapture !== false) {
412
- api.on("agent_end", async (event) => {
412
+ api.on("agent_end", async (event, ctx) => {
413
413
  if (!event.success || !event.messages || event.messages.length === 0) {
414
414
  return;
415
415
  }
416
416
 
417
417
  try {
418
418
  // Determine agent ID and default scope
419
- const agentId = event.agentId || "main";
419
+ const agentId = ctx?.agentId || "main";
420
420
  const defaultScope = scopeManager.getDefaultScope(agentId);
421
421
 
422
422
  // Extract text content from messages
@@ -2,7 +2,7 @@
2
2
  "id": "memory-lancedb-pro",
3
3
  "name": "Memory (LanceDB Pro)",
4
4
  "description": "Enhanced LanceDB-backed long-term memory with hybrid retrieval, multi-scope isolation, and management CLI",
5
- "version": "1.0.6",
5
+ "version": "1.0.7",
6
6
  "kind": "memory",
7
7
  "configSchema": {
8
8
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memory-lancedb-pro",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "OpenClaw enhanced LanceDB memory plugin with hybrid retrieval (Vector + BM25), cross-encoder rerank, multi-scope isolation, and management CLI",
5
5
  "type": "module",
6
6
  "main": "index.ts",