ruvector 0.2.10 → 0.2.11

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
@@ -8171,6 +8171,25 @@ brainCmd.command('transfer <source> <target>')
8171
8171
  } catch (e) { console.error(chalk.red(`Error: ${e.message}`)); process.exit(1); }
8172
8172
  });
8173
8173
 
8174
+ brainCmd.command('train')
8175
+ .description('Trigger a training cycle (SONA pattern learning + domain evolution)')
8176
+ .option('--url <url>', 'Brain server URL')
8177
+ .option('--key <key>', 'Pi key')
8178
+ .option('--json', 'Output as JSON')
8179
+ .action(async (opts) => {
8180
+ const config = getBrainConfig(opts);
8181
+ try {
8182
+ const result = await brainFetch(config, '/v1/train', { method: 'POST', body: {} });
8183
+ if (opts.json || !process.stdout.isTTY) { console.log(JSON.stringify(result, null, 2)); return; }
8184
+ console.log(chalk.bold.cyan('\nTraining Cycle Complete\n'));
8185
+ console.log(` ${chalk.bold('SONA:')} ${result.sona_message}`);
8186
+ console.log(` ${chalk.bold('Patterns:')} ${result.sona_patterns}`);
8187
+ console.log(` ${chalk.bold('Pareto:')} ${result.pareto_before} → ${result.pareto_after}`);
8188
+ console.log(` ${chalk.bold('Memories:')} ${result.memory_count}`);
8189
+ console.log(` ${chalk.bold('Votes:')} ${result.vote_count}`);
8190
+ } catch (e) { console.error(chalk.red(`Error: ${e.message}`)); process.exit(1); }
8191
+ });
8192
+
8174
8193
  brainCmd.command('sync [direction]')
8175
8194
  .description('Synchronize LoRA weights (pull, push, or both)')
8176
8195
  .option('--url <url>', 'Brain server URL')
package/bin/mcp-server.js CHANGED
@@ -428,7 +428,7 @@ class Intelligence {
428
428
  const server = new Server(
429
429
  {
430
430
  name: 'ruvector',
431
- version: '0.2.10',
431
+ version: '0.2.11',
432
432
  },
433
433
  {
434
434
  capabilities: {
@@ -1464,6 +1464,11 @@ const TOOLS = [
1464
1464
  }
1465
1465
  }
1466
1466
  },
1467
+ {
1468
+ name: 'brain_train',
1469
+ description: 'Trigger a training cycle — runs SONA pattern learning and domain evolution on accumulated data',
1470
+ inputSchema: { type: 'object', properties: {} }
1471
+ },
1467
1472
  // ── Brain AGI Tools (6) ── AGI subsystem diagnostics via direct fetch ──
1468
1473
  {
1469
1474
  name: 'brain_agi_status',
@@ -3466,7 +3471,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
3466
3471
  case 'brain_drift':
3467
3472
  case 'brain_partition':
3468
3473
  case 'brain_transfer':
3469
- case 'brain_sync': {
3474
+ case 'brain_sync':
3475
+ case 'brain_train': {
3470
3476
  try {
3471
3477
  const brainUrl = process.env.BRAIN_URL || 'https://pi.ruv.io';
3472
3478
  const brainKey = process.env.PI;
@@ -3536,6 +3542,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
3536
3542
  url = `${brainUrl}/v1/lora/latest${p.toString() ? '?' + p : ''}`;
3537
3543
  break;
3538
3544
  }
3545
+ case 'train': {
3546
+ url = `${brainUrl}/v1/train`;
3547
+ fetchOpts.method = 'POST';
3548
+ fetchOpts.body = JSON.stringify({});
3549
+ break;
3550
+ }
3539
3551
  }
3540
3552
  const resp = await proxyFetch(url, fetchOpts);
3541
3553
  if (!resp.ok) {
@@ -4120,7 +4132,7 @@ async function main() {
4120
4132
  transport: 'sse',
4121
4133
  sessions: sessions.size,
4122
4134
  tools: 91,
4123
- version: '0.2.10'
4135
+ version: '0.2.11'
4124
4136
  }));
4125
4137
 
4126
4138
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruvector",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
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",