@bsbofmusic/memos-memu-local-memory-tools-for-agent 1.0.4 → 1.0.5

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/bin/mcp-server.js CHANGED
@@ -16,7 +16,7 @@ import { memuk_search } from '../src/tools/memuk.js';
16
16
  import { verify_memory_system } from '../src/tools/verify.js';
17
17
 
18
18
  const server = new Server(
19
- { name: 'memos-memu-local-memory-tools-for-agent', version: '1.0.4' },
19
+ { name: 'memos-memu-local-memory-tools-for-agent', version: '1.0.5' },
20
20
  { capabilities: { tools: {} } }
21
21
  );
22
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsbofmusic/memos-memu-local-memory-tools-for-agent",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "MCP server — one-shot install + query for memos (PostgreSQL) and memuK (SQLite) local memory. Designed for OpenClaw agents.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -37,7 +37,11 @@ FROM (
37
37
  };
38
38
  }
39
39
 
40
- const rows = parsePsqlJson(raw);
40
+ let rows = parsePsqlJson(raw);
41
+
42
+ // Defensive slice: enforce limit cap at application level
43
+ if (!Array.isArray(rows)) rows = [];
44
+ if (rows.length > lim) rows = rows.slice(0, lim);
41
45
 
42
46
  if (!rows.length) {
43
47
  return {
@@ -36,6 +36,10 @@ LIMIT ${lim};`.trim();
36
36
  };
37
37
  }
38
38
 
39
+ // Defensive slice: enforce limit cap at application level
40
+ if (!Array.isArray(rows)) rows = [];
41
+ if (rows.length > lim) rows = rows.slice(0, lim);
42
+
39
43
  if (!rows.length) {
40
44
  return {
41
45
  content: [{ type: 'text', text: `✅ memuK search "${query}" returned 0 results.` }],