collective-memory-mcp 0.6.1 → 0.6.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "collective-memory-mcp",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "A persistent, graph-based memory system for AI agents with TF-IDF vector search (MCP Server)",
5
5
  "type": "module",
6
6
  "main": "src/server.js",
package/src/server.js CHANGED
@@ -693,7 +693,7 @@ Future agents will read your observations to learn. Write for them, not for your
693
693
  return { content: [{ type: "text", text: JSON.stringify(readGraph(), null, 2) }] };
694
694
 
695
695
  case "search_collective_memory":
696
- return { content: [{ type: "text", text: JSON.stringify(searchCollectiveMemory(args), null, 2) }] };
696
+ return { content: [{ type: "text", text: JSON.stringify(await searchCollectiveMemory(args), null, 2) }] };
697
697
 
698
698
  case "open_nodes":
699
699
  return { content: [{ type: "text", text: JSON.stringify(openNodes(args), null, 2) }] };
@@ -702,7 +702,7 @@ Future agents will read your observations to learn. Write for them, not for your
702
702
  return { content: [{ type: "text", text: JSON.stringify(recordTaskCompletion(args), null, 2) }] };
703
703
 
704
704
  case "find_similar_procedures":
705
- return { content: [{ type: "text", text: JSON.stringify(findSimilarProcedures(args), null, 2) }] };
705
+ return { content: [{ type: "text", text: JSON.stringify(await findSimilarProcedures(args), null, 2) }] };
706
706
 
707
707
  default:
708
708
  throw new Error(`Unknown tool: ${name}`);
@@ -7,7 +7,7 @@
7
7
  /**
8
8
  * Tokenize text into terms
9
9
  * - Converts to lowercase
10
- * - Removes special characters
10
+ * - Removes special characters (but keeps internal hyphens in compound words)
11
11
  * - Splits into words
12
12
  * - Filters stop words
13
13
  */
@@ -32,7 +32,8 @@ function tokenize(text) {
32
32
 
33
33
  return text
34
34
  .toLowerCase()
35
- .replace(/[^\w\s@#.-]/g, " ") // Keep @, #, ., - for technical terms
35
+ // Replace special chars with space, but keep word chars and internal hyphens
36
+ .replace(/[^\w\s-]/g, " ")
36
37
  .split(/\s+/)
37
38
  .filter(word => word.length > 2 && !stopWords.has(word));
38
39
  }