agentdb 1.1.4 → 1.1.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.
@@ -56,11 +56,18 @@ class AgentDBCLI {
56
56
  this.db.pragma('journal_mode = WAL');
57
57
  this.db.pragma('synchronous = NORMAL');
58
58
  this.db.pragma('cache_size = -64000');
59
- // Load schema if needed
60
- const schemaPath = path.join(__dirname, '../schemas/frontier-schema.sql');
61
- if (fs.existsSync(schemaPath)) {
62
- const schema = fs.readFileSync(schemaPath, 'utf-8');
63
- this.db.exec(schema);
59
+ // Load schemas (base + frontier)
60
+ const baseSchemaPath = path.join(__dirname, '../schemas/schema.sql');
61
+ const frontierSchemaPath = path.join(__dirname, '../schemas/frontier-schema.sql');
62
+
63
+ if (fs.existsSync(baseSchemaPath)) {
64
+ const baseSchema = fs.readFileSync(baseSchemaPath, 'utf-8');
65
+ this.db.exec(baseSchema);
66
+ }
67
+
68
+ if (fs.existsSync(frontierSchemaPath)) {
69
+ const frontierSchema = fs.readFileSync(frontierSchemaPath, 'utf-8');
70
+ this.db.exec(frontierSchema);
64
71
  }
65
72
  // Initialize embedding service
66
73
  this.embedder = new EmbeddingService({
@@ -87,9 +94,12 @@ class AgentDBCLI {
87
94
  log.info(`Cause: ${params.cause}`);
88
95
  log.info(`Effect: ${params.effect}`);
89
96
  log.info(`Uplift: ${params.uplift}`);
90
- const edgeId = this.causalGraph.addEdge({
91
- cause: params.cause,
92
- effect: params.effect,
97
+ const edgeId = this.causalGraph.addCausalEdge({
98
+ fromMemoryId: 0,
99
+ fromMemoryType: params.cause,
100
+ toMemoryId: 0,
101
+ toMemoryType: params.effect,
102
+ similarity: 0,
93
103
  uplift: params.uplift,
94
104
  confidence: params.confidence || 0.95,
95
105
  sampleSize: params.sampleSize || 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentdb",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "AgentDB - Frontier Memory Features: Causal reasoning, reflexion memory, skill library, explainable recall, and automated learning for AI agents. 150x faster vector search with HNSW indexing.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",