claude-flow 3.70.0 → 3.71.1

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 (27) hide show
  1. package/node_modules/@claude-flow/mcp/dist/server.d.ts.map +1 -1
  2. package/node_modules/@claude-flow/mcp/dist/server.js +6 -0
  3. package/node_modules/@claude-flow/mcp/dist/server.js.map +1 -1
  4. package/node_modules/@claude-flow/mcp/dist/session-manager.d.ts +6 -0
  5. package/node_modules/@claude-flow/mcp/dist/session-manager.d.ts.map +1 -1
  6. package/node_modules/@claude-flow/mcp/dist/session-manager.js +20 -0
  7. package/node_modules/@claude-flow/mcp/dist/session-manager.js.map +1 -1
  8. package/node_modules/@claude-flow/mcp/package.json +1 -1
  9. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts.map +1 -1
  10. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js +3 -1
  11. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js.map +1 -1
  12. package/node_modules/@claude-flow/plugin-agent-federation/package.json +1 -1
  13. package/package.json +4 -4
  14. package/v3/@claude-flow/cli/catalog-manifest.json +2 -2
  15. package/v3/@claude-flow/cli/dist/src/commands/deployment.js +1 -1
  16. package/v3/@claude-flow/cli/dist/src/commands/ruvector/backup.js +1 -1
  17. package/v3/@claude-flow/cli/dist/src/commands/ruvector/migrate.js +1 -1
  18. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +8 -0
  19. package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.d.ts +6 -0
  20. package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.js +69 -10
  21. package/v3/@claude-flow/cli/dist/src/missions/schemas.d.ts +122 -122
  22. package/v3/@claude-flow/cli/dist/src/mods/command-registry/schema.d.ts +189 -189
  23. package/v3/@claude-flow/cli/dist/src/services/ruvector-training.js +18 -5
  24. package/v3/@claude-flow/cli/package.json +4 -4
  25. package/v3/@claude-flow/shared/dist/resilience/rate-limiter.js +2 -2
  26. package/v3/@claude-flow/shared/dist/resilience/retry.js +2 -2
  27. package/v3/@claude-flow/shared/package.json +1 -1
@@ -423,7 +423,8 @@ export function computeFlashAttention(query, keys, values) {
423
423
  if (!flashAttention) {
424
424
  throw new Error('Flash attention not initialized');
425
425
  }
426
- return flashAttention.computeRaw(query, keys, values);
426
+ // #4610: the @ruvector/attention classes expose compute(), not computeRaw().
427
+ return flashAttention.compute(query, keys, values);
427
428
  }
428
429
  /**
429
430
  * Compute MoE routing
@@ -432,7 +433,7 @@ export function computeMoEAttention(query, keys, values) {
432
433
  if (!moeAttention) {
433
434
  throw new Error('MoE attention not initialized');
434
435
  }
435
- return moeAttention.computeRaw(query, keys, values);
436
+ return moeAttention.compute(query, keys, values);
436
437
  }
437
438
  /**
438
439
  * Compute hyperbolic attention (for hierarchical patterns)
@@ -441,7 +442,7 @@ export function computeHyperbolicAttention(query, keys, values) {
441
442
  if (!hyperbolicAttention) {
442
443
  throw new Error('Hyperbolic attention not initialized');
443
444
  }
444
- return hyperbolicAttention.computeRaw(query, keys, values);
445
+ return hyperbolicAttention.compute(query, keys, values);
445
446
  }
446
447
  /**
447
448
  * Compute contrastive loss for training
@@ -450,8 +451,20 @@ export function computeContrastiveLoss(anchor, positives, negatives) {
450
451
  if (!contrastiveLoss) {
451
452
  throw new Error('Contrastive loss not initialized');
452
453
  }
453
- const loss = contrastiveLoss.compute(anchor, positives, negatives);
454
- const gradient = contrastiveLoss.backward(anchor, positives, negatives);
454
+ // #4610: InfoNceLoss has no backward(); computeWithGradients(anchor, positive,
455
+ // negatives) takes one positive and returns { loss, gradients }. Average over
456
+ // the positives so the list signature keeps its meaning.
457
+ if (positives.length === 0) {
458
+ throw new Error('Contrastive loss needs at least one positive');
459
+ }
460
+ let loss = 0;
461
+ const gradient = new Float32Array(anchor.length);
462
+ for (const positive of positives) {
463
+ const result = contrastiveLoss.computeWithGradients(anchor, positive, negatives);
464
+ loss += result.loss / positives.length;
465
+ for (let i = 0; i < gradient.length; i++)
466
+ gradient[i] += result.gradients[i] / positives.length;
467
+ }
455
468
  return { loss, gradient };
456
469
  }
457
470
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.70.0",
3
+ "version": "3.71.1",
4
4
  "type": "module",
5
5
  "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -103,11 +103,11 @@
103
103
  "@electron/asar": "^4.3.1",
104
104
  "@claude-flow/cli-core": "3.7.5",
105
105
  "@claude-flow/codex": "3.0.5",
106
- "@claude-flow/mcp": "3.1.5",
106
+ "@claude-flow/mcp": "3.1.6",
107
107
  "@claude-flow/neural": "3.0.2",
108
- "@claude-flow/plugin-agent-federation": "1.0.4",
108
+ "@claude-flow/plugin-agent-federation": "1.0.5",
109
109
  "@claude-flow/security": "3.0.6",
110
- "@claude-flow/shared": "3.0.6",
110
+ "@claude-flow/shared": "3.0.7",
111
111
  "@iarna/toml": "^2.2.5",
112
112
  "@noble/ed25519": "2.3.0",
113
113
  "@ruvector/rabitq-wasm": "0.1.0",
@@ -89,7 +89,7 @@ export class SlidingWindowRateLimiter {
89
89
  * Reset rate limit for a key
90
90
  */
91
91
  reset(key) {
92
- if (key) {
92
+ if (key !== undefined) {
93
93
  this.requests.delete(key);
94
94
  }
95
95
  else {
@@ -227,7 +227,7 @@ export class TokenBucketRateLimiter {
227
227
  * Reset bucket for a key
228
228
  */
229
229
  reset(key) {
230
- if (key) {
230
+ if (key !== undefined) {
231
231
  this.buckets.delete(key);
232
232
  }
233
233
  else {
@@ -150,11 +150,11 @@ export const RetryableErrors = {
150
150
  },
151
151
  /** Rate limit errors (429) */
152
152
  rateLimit: (error) => {
153
- return error.message.includes('429') || error.message.toLowerCase().includes('rate limit');
153
+ return /(^|\D)429(?!\d)/.test(error.message) || error.message.toLowerCase().includes('rate limit');
154
154
  },
155
155
  /** Server errors (5xx) */
156
156
  serverError: (error) => {
157
- return /5\d\d/.test(error.message) || error.message.includes('Internal Server Error');
157
+ return /(^|\D)5\d\d(?!\d)/.test(error.message) || error.message.includes('Internal Server Error');
158
158
  },
159
159
  /** Transient errors (network + rate limit + 5xx) */
160
160
  transient: (error) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/shared",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "type": "module",
5
5
  "description": "Shared module - common types, events, utilities, core interfaces",
6
6
  "main": "dist/index.js",