ruvector 0.2.4 → 0.2.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/cli.js CHANGED
@@ -8761,6 +8761,10 @@ function createSonaEngine(sona) {
8761
8761
  if (sona.SonaCoordinator) return new sona.SonaCoordinator(SONA_DEFAULT_DIM);
8762
8762
  throw new Error('No SONA engine class found');
8763
8763
  }
8764
+ function parseSonaResult(val) {
8765
+ if (typeof val === 'string') { try { return JSON.parse(val); } catch { return val; } }
8766
+ return val;
8767
+ }
8764
8768
 
8765
8769
  sonaCmd.command('status')
8766
8770
  .description('Show SONA learning engine status')
@@ -8769,7 +8773,7 @@ sonaCmd.command('status')
8769
8773
  const sona = loadSona();
8770
8774
  try {
8771
8775
  const engine = createSonaEngine(sona);
8772
- const status = engine.getStatus ? engine.getStatus() : { ready: true };
8776
+ const status = engine.getStatus ? parseSonaResult(engine.getStatus()) : { enabled: engine.isEnabled ? engine.isEnabled() : true, ...parseSonaResult(engine.getStats ? engine.getStats() : {}) };
8773
8777
  if (opts.json || !process.stdout.isTTY) { console.log(JSON.stringify(status, null, 2)); return; }
8774
8778
  console.log(chalk.bold.cyan('\nSONA Status\n'));
8775
8779
  Object.entries(status).forEach(([k, v]) => console.log(` ${chalk.bold(k + ':')} ${v}`));
@@ -8814,7 +8818,7 @@ sonaCmd.command('export')
8814
8818
  const sona = loadSona();
8815
8819
  try {
8816
8820
  const engine = createSonaEngine(sona);
8817
- const weights = engine.exportWeights ? engine.exportWeights() : engine.export ? engine.export() : {};
8821
+ const weights = parseSonaResult(engine.exportWeights ? engine.exportWeights() : engine.getStats ? engine.getStats() : {});
8818
8822
  fs.writeFileSync(opts.output, JSON.stringify(weights, null, 2));
8819
8823
  console.log(chalk.green(`Exported to ${opts.output}`));
8820
8824
  } catch (e) { console.error(chalk.red(`Error: ${e.message}`)); }
@@ -8827,7 +8831,7 @@ sonaCmd.command('stats')
8827
8831
  const sona = loadSona();
8828
8832
  try {
8829
8833
  const engine = createSonaEngine(sona);
8830
- const stats = engine.getStats ? engine.getStats() : engine.stats ? engine.stats() : {};
8834
+ const stats = parseSonaResult(engine.getStats ? engine.getStats() : engine.stats ? engine.stats() : {});
8831
8835
  if (opts.json || !process.stdout.isTTY) { console.log(JSON.stringify(stats, null, 2)); return; }
8832
8836
  console.log(chalk.bold.cyan('\nSONA Statistics\n'));
8833
8837
  Object.entries(stats).forEach(([k, v]) => console.log(` ${chalk.bold(k + ':')} ${v}`));
package/bin/mcp-server.js CHANGED
@@ -363,7 +363,7 @@ class Intelligence {
363
363
  const server = new Server(
364
364
  {
365
365
  name: 'ruvector',
366
- version: '0.2.4',
366
+ version: '0.2.5',
367
367
  },
368
368
  {
369
369
  capabilities: {
@@ -3787,7 +3787,7 @@ async function main() {
3787
3787
  transport: 'sse',
3788
3788
  sessions: sessions.size,
3789
3789
  tools: 91,
3790
- version: '0.2.4'
3790
+ version: '0.2.5'
3791
3791
  }));
3792
3792
 
3793
3793
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruvector",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
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",