ruvector 0.1.66 → 0.1.67

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.
@@ -121,5 +121,13 @@
121
121
  "rewardHistory": [
122
122
  1
123
123
  ]
124
+ },
125
+ "stats": {
126
+ "total_patterns": 0,
127
+ "total_memories": 0,
128
+ "total_trajectories": 0,
129
+ "total_errors": 0,
130
+ "session_count": 0,
131
+ "last_session": 0
124
132
  }
125
133
  }
package/bin/cli.js CHANGED
@@ -2609,8 +2609,13 @@ class Intelligence {
2609
2609
  }
2610
2610
 
2611
2611
  sessionEnd() {
2612
- const duration = this.now() - (this.sessionStartTime || this.data.stats.last_session);
2613
- const actions = this.data.trajectories.filter(t => t.timestamp >= this.data.stats.last_session).length;
2612
+ // Ensure stats exists with defaults
2613
+ if (!this.data.stats) {
2614
+ this.data.stats = { total_patterns: 0, total_memories: 0, total_trajectories: 0, total_errors: 0, session_count: 0, last_session: 0 };
2615
+ }
2616
+ const lastSession = this.data.stats.last_session || 0;
2617
+ const duration = this.now() - (this.sessionStartTime || lastSession);
2618
+ const actions = (this.data.trajectories || []).filter(t => t.timestamp >= lastSession).length;
2614
2619
 
2615
2620
  // Force learning cycle (only if engine already initialized)
2616
2621
  const eng = this.getEngineIfReady();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruvector",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "description": "High-performance vector database for Node.js with automatic native/WASM fallback",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/ruvector.db CHANGED
Binary file