cozo-memory 1.2.3 → 1.2.4

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2188,11 +2188,25 @@ ids[id] <- $ids
2188
2188
  const actualHeaders = validationRes.headers;
2189
2189
  const missingHeaders = expectedHeaders.filter(h => !actualHeaders.includes(h));
2190
2190
  if (missingHeaders.length > 0) {
2191
- return { error: `Invalid Datalog result set. Missing columns: ${missingHeaders.join(", ")}. Expected: ${expectedHeaders.join(", ")}` };
2191
+ return {
2192
+ error: `Invalid Datalog result set. Missing columns: ${missingHeaders.join(", ")}. Expected: ${expectedHeaders.join(", ")}`,
2193
+ hint: "Ensure all variables in the rule head are bound in the rule body. See cozo-memory-guide for examples."
2194
+ };
2192
2195
  }
2193
2196
  }
2194
2197
  catch (validationError) {
2195
- return { error: `Datalog syntax error: ${validationError.message}` };
2198
+ const errorMsg = validationError.message || String(validationError);
2199
+ let hint = "";
2200
+ if (errorMsg.includes("unbound")) {
2201
+ hint = "All variables in the rule head must appear in the rule body. Example: if you use 'relation_type' in the head, it must be bound to a value or extracted from a table in the body.";
2202
+ }
2203
+ else if (errorMsg.includes("syntax")) {
2204
+ hint = "Check Datalog syntax. Common issues: missing commas, incorrect table names, or malformed predicates.";
2205
+ }
2206
+ return {
2207
+ error: `Datalog syntax error: ${errorMsg}`,
2208
+ hint: hint || "See cozo-memory-guide for correct Datalog syntax and examples."
2209
+ };
2196
2210
  }
2197
2211
  const id = (0, uuid_1.v4)();
2198
2212
  const now = Date.now();
@@ -3778,7 +3792,15 @@ Note: Inference rules must return exactly 5 columns: [from_id, to_id, relation_t
3778
3792
 
3779
3793
  Use 'search' for quick lookups, 'adaptive_retrieval' for auto-optimization, or 'context' for comprehensive exploration.
3780
3794
 
3781
- Available actions: search, advancedSearch, context, entity_details, history, graph_rag, graph_walking, adaptive_retrieval, dynamic_fusion, agentic_search, spreading_activation, suggest_connections, get_zettelkasten_stats, get_activation_stats, get_salience_stats, qafd_search, hierarchical_memory_query.
3795
+ Available actions:
3796
+ - search, advancedSearch: Hybrid search with query (required)
3797
+ - context: Context retrieval with query (required)
3798
+ - entity_details, history: Entity info with entity_id (required)
3799
+ - graph_rag, graph_walking: Graph traversal with query (required)
3800
+ - adaptive_retrieval, dynamic_fusion, agentic_search: Advanced search with query (required)
3801
+ - spreading_activation, qafd_search, hierarchical_memory_query: Specialized search with query (required)
3802
+ - suggest_connections: Connection suggestions with entity_id (required)
3803
+ - get_zettelkasten_stats, get_activation_stats, get_salience_stats: Statistics (no params required)
3782
3804
 
3783
3805
  Note: User profile observations (entity_id='global_user_profile') are automatically boosted in searches. For detailed action descriptions and parameters, see the cozo-memory-guide steering file.`,
3784
3806
  parameters: QueryMemoryParameters,
@@ -4897,10 +4919,12 @@ Monitoring: health (status check), metrics (detailed stats)
4897
4919
  Data portability: export_memory (JSON/Markdown/Obsidian), import_memory (Mem0/MemGPT/Cozo)
4898
4920
  Backups: snapshot_create, snapshot_list, snapshot_diff
4899
4921
  Optimization: cleanup (LLM consolidation), defrag (merge duplicates), reflect (find contradictions)
4900
- Advanced: summarize_communities, compress_memory_levels, analyze_memory_distribution
4922
+ Advanced: summarize_communities, compress_memory_levels, analyze_memory_distribution, compact
4901
4923
 
4902
4924
  Important: Use confirm=false for dry-run before cleanup/defrag. clear_memory requires confirm=true.
4903
4925
 
4926
+ Note: For statistics (get_salience_stats, get_activation_stats, get_zettelkasten_stats), use query_memory tool instead.
4927
+
4904
4928
  For detailed action descriptions and parameters, see the cozo-memory-guide steering file.`,
4905
4929
  parameters: ManageSystemParameters,
4906
4930
  execute: async (args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozo-memory",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "mcpName": "io.github.tobs-code/cozo-memory",
5
5
  "description": "Local-first persistent memory system for AI agents with hybrid search, graph reasoning, and MCP integration",
6
6
  "main": "dist/index.js",