claude-flow 3.5.1 → 3.5.3

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 (59) hide show
  1. package/.claude/helpers/statusline.cjs +3 -3
  2. package/.claude/settings.json +1 -1
  3. package/README.md +156 -26
  4. package/package.json +1 -2
  5. package/v3/@claude-flow/cli/README.md +156 -26
  6. package/v3/@claude-flow/cli/dist/src/appliance/gguf-engine.d.ts +91 -0
  7. package/v3/@claude-flow/cli/dist/src/appliance/gguf-engine.js +425 -0
  8. package/v3/@claude-flow/cli/dist/src/appliance/ruvllm-bridge.d.ts +102 -0
  9. package/v3/@claude-flow/cli/dist/src/appliance/ruvllm-bridge.js +292 -0
  10. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-builder.d.ts +44 -0
  11. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-builder.js +329 -0
  12. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-distribution.d.ts +97 -0
  13. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-distribution.js +370 -0
  14. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-format.d.ts +111 -0
  15. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-format.js +393 -0
  16. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-runner.d.ts +69 -0
  17. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-runner.js +237 -0
  18. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-signing.d.ts +123 -0
  19. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-signing.js +347 -0
  20. package/v3/@claude-flow/cli/dist/src/commands/appliance-advanced.d.ts +9 -0
  21. package/v3/@claude-flow/cli/dist/src/commands/appliance-advanced.js +215 -0
  22. package/v3/@claude-flow/cli/dist/src/commands/appliance.d.ts +8 -0
  23. package/v3/@claude-flow/cli/dist/src/commands/appliance.js +406 -0
  24. package/v3/@claude-flow/cli/dist/src/commands/benchmark.js +2 -2
  25. package/v3/@claude-flow/cli/dist/src/commands/claims.js +1 -1
  26. package/v3/@claude-flow/cli/dist/src/commands/config.js +1 -1
  27. package/v3/@claude-flow/cli/dist/src/commands/deployment.js +1 -1
  28. package/v3/@claude-flow/cli/dist/src/commands/doctor.js +25 -42
  29. package/v3/@claude-flow/cli/dist/src/commands/embeddings.js +1 -1
  30. package/v3/@claude-flow/cli/dist/src/commands/hooks.js +1 -1
  31. package/v3/@claude-flow/cli/dist/src/commands/index.d.ts +2 -0
  32. package/v3/@claude-flow/cli/dist/src/commands/index.js +6 -0
  33. package/v3/@claude-flow/cli/dist/src/commands/init.js +11 -11
  34. package/v3/@claude-flow/cli/dist/src/commands/memory.js +24 -0
  35. package/v3/@claude-flow/cli/dist/src/commands/neural.js +1 -1
  36. package/v3/@claude-flow/cli/dist/src/commands/performance.js +1 -1
  37. package/v3/@claude-flow/cli/dist/src/commands/plugins.js +1 -1
  38. package/v3/@claude-flow/cli/dist/src/commands/providers.js +1 -1
  39. package/v3/@claude-flow/cli/dist/src/commands/security.js +1 -1
  40. package/v3/@claude-flow/cli/dist/src/commands/start.js +11 -11
  41. package/v3/@claude-flow/cli/dist/src/commands/status.js +3 -3
  42. package/v3/@claude-flow/cli/dist/src/commands/transfer-store.js +1 -1
  43. package/v3/@claude-flow/cli/dist/src/index.js +2 -2
  44. package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.js +1 -1
  45. package/v3/@claude-flow/cli/dist/src/init/executor.js +20 -46
  46. package/v3/@claude-flow/cli/dist/src/init/settings-generator.js +68 -40
  47. package/v3/@claude-flow/cli/dist/src/init/statusline-generator.d.ts +1 -1
  48. package/v3/@claude-flow/cli/dist/src/init/statusline-generator.js +4 -4
  49. package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.js +1 -1
  50. package/v3/@claude-flow/cli/dist/src/mcp-tools/daa-tools.js +5 -5
  51. package/v3/@claude-flow/cli/dist/src/mcp-tools/github-tools.js +2 -2
  52. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +1 -1
  53. package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.js +1 -1
  54. package/v3/@claude-flow/cli/dist/src/mcp-tools/system-tools.js +21 -6
  55. package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.d.ts +6 -0
  56. package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.js +54 -2
  57. package/v3/@claude-flow/cli/dist/src/runtime/headless.js +3 -3
  58. package/v3/@claude-flow/cli/dist/src/services/claim-service.js +1 -1
  59. package/v3/@claude-flow/cli/package.json +1 -1
@@ -12,7 +12,7 @@
12
12
  /**
13
13
  * Generate optimized statusline script
14
14
  * Output format:
15
- * ▊ Claude Flow V3 ● user │ ⎇ branch │ Opus 4.6
15
+ * ▊ RuFlo V3 ● user │ ⎇ branch │ Opus 4.6
16
16
  * ─────────────────────────────────────────────────────
17
17
  * 🏗️ DDD Domains [●●○○○] 2/5 ⚡ HNSW 150x
18
18
  * 🤖 Swarm ◉ [ 5/15] 👥 2 🪝 10/17 🟢 CVE 3/3 💾 4MB 🧠 63%
@@ -23,7 +23,7 @@ export function generateStatuslineScript(options) {
23
23
  const maxAgents = options.runtime.maxAgents;
24
24
  return `#!/usr/bin/env node
25
25
  /**
26
- * Claude Flow V3 Statusline Generator (Optimized)
26
+ * RuFlo V3 Statusline Generator (Optimized)
27
27
  * Displays real-time V3 implementation progress and system status
28
28
  *
29
29
  * Usage: node statusline.cjs [--json] [--compact]
@@ -578,7 +578,7 @@ function generateStatusline() {
578
578
  const lines = [];
579
579
 
580
580
  // Header
581
- let header = c.bold + c.brightPurple + '\\u258A Claude Flow V3 ' + c.reset;
581
+ let header = c.bold + c.brightPurple + '\\u258A RuFlo V3 ' + c.reset;
582
582
  header += (swarm.coordinationActive ? c.brightCyan : c.dim) + '\\u25CF ' + c.brightCyan + git.name + c.reset;
583
583
  if (git.gitBranch) {
584
584
  header += ' ' + c.dim + '\\u2502' + c.reset + ' ' + c.brightBlue + '\\u23C7 ' + git.gitBranch + c.reset;
@@ -789,7 +789,7 @@ export function generateStatuslineHook(options) {
789
789
  return '#!/bin/bash\n# Statusline disabled\n';
790
790
  }
791
791
  return `#!/bin/bash
792
- # Claude Flow V3 Statusline Hook
792
+ # RuFlo V3 Statusline Hook
793
793
  # Source this in your .bashrc/.zshrc for terminal statusline
794
794
 
795
795
  # Function to get statusline
@@ -411,7 +411,7 @@ export const coordinationTools = [
411
411
  type: 'object',
412
412
  properties: {
413
413
  task: { type: 'string', description: 'Task to orchestrate' },
414
- agents: { type: 'array', description: 'Agent IDs to coordinate' },
414
+ agents: { type: 'array', items: { type: 'string' }, description: 'Agent IDs to coordinate' },
415
415
  strategy: { type: 'string', enum: ['parallel', 'sequential', 'pipeline', 'broadcast'], description: 'Orchestration strategy' },
416
416
  timeout: { type: 'number', description: 'Timeout in ms' },
417
417
  },
@@ -56,7 +56,7 @@ export const daaTools = [
56
56
  cognitivePattern: { type: 'string', enum: ['convergent', 'divergent', 'lateral', 'systems', 'critical', 'adaptive'], description: 'Cognitive pattern' },
57
57
  learningRate: { type: 'number', description: 'Learning rate (0-1)' },
58
58
  enableMemory: { type: 'boolean', description: 'Enable persistent memory' },
59
- capabilities: { type: 'array', description: 'Agent capabilities' },
59
+ capabilities: { type: 'array', items: { type: 'string' }, description: 'Agent capabilities' },
60
60
  },
61
61
  required: ['id'],
62
62
  },
@@ -106,7 +106,7 @@ export const daaTools = [
106
106
  agentId: { type: 'string', description: 'Agent ID' },
107
107
  feedback: { type: 'string', description: 'Feedback message' },
108
108
  performanceScore: { type: 'number', description: 'Performance score (0-1)' },
109
- suggestions: { type: 'array', description: 'Improvement suggestions' },
109
+ suggestions: { type: 'array', items: { type: 'string' }, description: 'Improvement suggestions' },
110
110
  },
111
111
  required: ['agentId'],
112
112
  },
@@ -149,7 +149,7 @@ export const daaTools = [
149
149
  properties: {
150
150
  id: { type: 'string', description: 'Workflow ID' },
151
151
  name: { type: 'string', description: 'Workflow name' },
152
- steps: { type: 'array', description: 'Workflow steps' },
152
+ steps: { type: 'array', items: { type: 'object' }, description: 'Workflow steps' },
153
153
  strategy: { type: 'string', enum: ['parallel', 'sequential', 'adaptive'], description: 'Execution strategy' },
154
154
  dependencies: { type: 'object', description: 'Step dependencies' },
155
155
  },
@@ -189,7 +189,7 @@ export const daaTools = [
189
189
  type: 'object',
190
190
  properties: {
191
191
  workflowId: { type: 'string', description: 'Workflow ID' },
192
- agentIds: { type: 'array', description: 'Agent IDs to use' },
192
+ agentIds: { type: 'array', items: { type: 'string' }, description: 'Agent IDs to use' },
193
193
  parallelExecution: { type: 'boolean', description: 'Enable parallel execution' },
194
194
  },
195
195
  required: ['workflowId'],
@@ -229,7 +229,7 @@ export const daaTools = [
229
229
  type: 'object',
230
230
  properties: {
231
231
  sourceAgentId: { type: 'string', description: 'Source agent ID' },
232
- targetAgentIds: { type: 'array', description: 'Target agent IDs' },
232
+ targetAgentIds: { type: 'array', items: { type: 'string' }, description: 'Target agent IDs' },
233
233
  knowledgeDomain: { type: 'string', description: 'Knowledge domain' },
234
234
  knowledgeContent: { type: 'object', description: 'Knowledge to share' },
235
235
  },
@@ -200,8 +200,8 @@ export const githubTools = [
200
200
  issueNumber: { type: 'number', description: 'Issue number' },
201
201
  title: { type: 'string', description: 'Issue title' },
202
202
  body: { type: 'string', description: 'Issue body' },
203
- labels: { type: 'array', description: 'Issue labels' },
204
- assignees: { type: 'array', description: 'Assignees' },
203
+ labels: { type: 'array', items: { type: 'string' }, description: 'Issue labels' },
204
+ assignees: { type: 'array', items: { type: 'string' }, description: 'Assignees' },
205
205
  },
206
206
  },
207
207
  handler: async (input) => {
@@ -2124,7 +2124,7 @@ export const hooksIntelligenceLearn = {
2124
2124
  inputSchema: {
2125
2125
  type: 'object',
2126
2126
  properties: {
2127
- trajectoryIds: { type: 'array', description: 'Specific trajectories to learn from' },
2127
+ trajectoryIds: { type: 'array', items: { type: 'string' }, description: 'Specific trajectories to learn from' },
2128
2128
  consolidate: { type: 'boolean', description: 'Run EWC++ consolidation' },
2129
2129
  },
2130
2130
  },
@@ -57,7 +57,7 @@ export const performanceTools = [
57
57
  properties: {
58
58
  timeRange: { type: 'string', description: 'Time range (1h, 24h, 7d)' },
59
59
  format: { type: 'string', enum: ['json', 'summary', 'detailed'], description: 'Report format' },
60
- components: { type: 'array', description: 'Components to include' },
60
+ components: { type: 'array', items: { type: 'string' }, description: 'Components to include' },
61
61
  },
62
62
  },
63
63
  handler: async (input) => {
@@ -9,8 +9,23 @@
9
9
  * - os module for system information
10
10
  */
11
11
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
12
- import { join } from 'node:path';
12
+ import { join, dirname } from 'node:path';
13
+ import { fileURLToPath } from 'node:url';
13
14
  import * as os from 'node:os';
15
+ // Read version dynamically from package.json
16
+ function getPackageVersion() {
17
+ try {
18
+ const __filename = fileURLToPath(import.meta.url);
19
+ const __dirname = dirname(__filename);
20
+ const pkgPath = join(__dirname, '..', '..', 'package.json');
21
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
22
+ return pkg.version || '3.0.0';
23
+ }
24
+ catch {
25
+ return '3.0.0';
26
+ }
27
+ }
28
+ const PKG_VERSION = getPackageVersion();
14
29
  // Storage paths
15
30
  const STORAGE_DIR = '.claude-flow';
16
31
  const SYSTEM_DIR = 'system';
@@ -63,7 +78,7 @@ export const systemTools = [
63
78
  type: 'object',
64
79
  properties: {
65
80
  verbose: { type: 'boolean', description: 'Include detailed information' },
66
- components: { type: 'array', description: 'Specific components to check' },
81
+ components: { type: 'array', items: { type: 'string' }, description: 'Specific components to check' },
67
82
  },
68
83
  },
69
84
  handler: async (input) => {
@@ -73,7 +88,7 @@ export const systemTools = [
73
88
  status: metrics.health >= 0.8 ? 'healthy' : metrics.health >= 0.5 ? 'degraded' : 'unhealthy',
74
89
  uptime,
75
90
  uptimeFormatted: `${Math.floor(uptime / 3600000)}h ${Math.floor((uptime % 3600000) / 60000)}m`,
76
- version: '3.0.0-alpha',
91
+ version: PKG_VERSION,
77
92
  components: {
78
93
  swarm: { status: 'running', health: metrics.health },
79
94
  memory: { status: 'running', health: 0.95 },
@@ -171,7 +186,7 @@ export const systemTools = [
171
186
  type: 'object',
172
187
  properties: {
173
188
  deep: { type: 'boolean', description: 'Perform deep health check' },
174
- components: { type: 'array', description: 'Components to check' },
189
+ components: { type: 'array', items: { type: 'string' }, description: 'Components to check' },
175
190
  fix: { type: 'boolean', description: 'Attempt to fix issues' },
176
191
  },
177
192
  },
@@ -244,12 +259,12 @@ export const systemTools = [
244
259
  inputSchema: {
245
260
  type: 'object',
246
261
  properties: {
247
- include: { type: 'array', description: 'Information to include' },
262
+ include: { type: 'array', items: { type: 'string' }, description: 'Information to include' },
248
263
  },
249
264
  },
250
265
  handler: async () => {
251
266
  return {
252
- version: '3.0.0-alpha',
267
+ version: PKG_VERSION,
253
268
  nodeVersion: process.version,
254
269
  platform: process.platform,
255
270
  arch: process.arch,
@@ -150,6 +150,12 @@ export interface MemoryInitResult {
150
150
  hnswIndexing: boolean;
151
151
  migrationTracking: boolean;
152
152
  };
153
+ /** ADR-053: Controllers activated via ControllerRegistry */
154
+ controllers?: {
155
+ activated: string[];
156
+ failed: string[];
157
+ initTimeMs: number;
158
+ };
153
159
  error?: string;
154
160
  }
155
161
  /**
@@ -914,6 +914,51 @@ export async function checkAndMigrateLegacy(options) {
914
914
  }
915
915
  return { needsMigration: false };
916
916
  }
917
+ /**
918
+ * ADR-053: Activate ControllerRegistry so AgentDB v3 controllers
919
+ * (ReasoningBank, SkillLibrary, ExplainableRecall, etc.) are instantiated.
920
+ *
921
+ * Uses the memory-bridge's getControllerRegistry() which lazily creates
922
+ * a singleton ControllerRegistry and initializes it with the given dbPath.
923
+ * After this call, all enabled controllers are ready for immediate use.
924
+ *
925
+ * Failures are isolated: if @claude-flow/memory or agentdb is not installed,
926
+ * this returns an empty result without throwing.
927
+ */
928
+ async function activateControllerRegistry(dbPath, verbose) {
929
+ const startTime = performance.now();
930
+ const activated = [];
931
+ const failed = [];
932
+ try {
933
+ const bridge = await getBridge();
934
+ if (!bridge) {
935
+ return { activated, failed, initTimeMs: performance.now() - startTime };
936
+ }
937
+ const registry = await bridge.getControllerRegistry(dbPath);
938
+ if (!registry) {
939
+ return { activated, failed, initTimeMs: performance.now() - startTime };
940
+ }
941
+ // Collect controller status from the registry
942
+ if (typeof registry.listControllers === 'function') {
943
+ const controllers = registry.listControllers();
944
+ for (const ctrl of controllers) {
945
+ if (ctrl.enabled) {
946
+ activated.push(ctrl.name);
947
+ }
948
+ else {
949
+ failed.push(ctrl.name);
950
+ }
951
+ }
952
+ }
953
+ if (verbose && activated.length > 0) {
954
+ console.log(`ControllerRegistry: ${activated.length} controllers activated`);
955
+ }
956
+ }
957
+ catch {
958
+ // ControllerRegistry activation is best-effort
959
+ }
960
+ return { activated, failed, initTimeMs: performance.now() - startTime };
961
+ }
917
962
  /**
918
963
  * Initialize the memory database properly using sql.js
919
964
  */
@@ -987,6 +1032,9 @@ export async function initializeMemoryDatabase(options) {
987
1032
  // Also create schema file for reference
988
1033
  const schemaPath = path.join(dbDir, 'schema.sql');
989
1034
  fs.writeFileSync(schemaPath, MEMORY_SCHEMA_V3 + '\n' + getInitialMetadata(backend));
1035
+ // ADR-053: Activate ControllerRegistry so controllers (ReasoningBank,
1036
+ // SkillLibrary, ExplainableRecall, etc.) are instantiated during init
1037
+ const controllerResult = await activateControllerRegistry(dbPath, verbose);
990
1038
  return {
991
1039
  success: true,
992
1040
  backend,
@@ -1024,7 +1072,8 @@ export async function initializeMemoryDatabase(options) {
1024
1072
  temporalDecay: true,
1025
1073
  hnswIndexing: true,
1026
1074
  migrationTracking: true
1027
- }
1075
+ },
1076
+ controllers: controllerResult,
1028
1077
  };
1029
1078
  }
1030
1079
  else {
@@ -1044,6 +1093,8 @@ export async function initializeMemoryDatabase(options) {
1044
1093
  sqliteHeader[26] = 0x20; // min embedded payload
1045
1094
  sqliteHeader[27] = 0x20; // leaf payload
1046
1095
  fs.writeFileSync(dbPath, sqliteHeader);
1096
+ // ADR-053: Activate ControllerRegistry even on fallback path
1097
+ const controllerResult = await activateControllerRegistry(dbPath, verbose);
1047
1098
  return {
1048
1099
  success: true,
1049
1100
  backend,
@@ -1067,7 +1118,8 @@ export async function initializeMemoryDatabase(options) {
1067
1118
  temporalDecay: true,
1068
1119
  hnswIndexing: true,
1069
1120
  migrationTracking: true
1070
- }
1121
+ },
1122
+ controllers: controllerResult,
1071
1123
  };
1072
1124
  }
1073
1125
  }
@@ -63,7 +63,7 @@ function parseArgs() {
63
63
  */
64
64
  function showHelp() {
65
65
  console.log(`
66
- Headless Runtime for Claude Flow V3
66
+ Headless Runtime for RuFlo V3
67
67
 
68
68
  Usage:
69
69
  headless --worker <type> Run a specific worker
@@ -150,7 +150,7 @@ async function runDaemon() {
150
150
  * Run benchmarks
151
151
  */
152
152
  async function runBenchmarks() {
153
- console.log('=== Claude Flow V3 Performance Benchmarks ===\n');
153
+ console.log('=== RuFlo V3 Performance Benchmarks ===\n');
154
154
  // Initialize intelligence
155
155
  await initializeIntelligence();
156
156
  // SONA Benchmark
@@ -216,7 +216,7 @@ async function runBenchmarks() {
216
216
  * Show system status
217
217
  */
218
218
  async function showStatus() {
219
- console.log('=== Claude Flow V3 System Status ===\n');
219
+ console.log('=== RuFlo V3 System Status ===\n');
220
220
  // Check daemon
221
221
  const daemon = getDaemon();
222
222
  console.log('Daemon:');
@@ -675,7 +675,7 @@ export class GitHubSync {
675
675
  const claimantStr = claimant.type === 'human'
676
676
  ? `@${claimant.name.replace(/[^a-zA-Z0-9_-]/g, '')}`
677
677
  : `Agent: ${(claimant.agentType || 'unknown').replace(/[^a-zA-Z0-9_-]/g, '')}`;
678
- const comment = `🤖 **Issue claimed** by ${claimantStr}\n\n_Coordinated by Claude Flow V3_`;
678
+ const comment = `🤖 **Issue claimed** by ${claimantStr}\n\n_Coordinated by RuFlo V3_`;
679
679
  try {
680
680
  execFileSync('gh', [
681
681
  'issue', 'comment', String(issueNumber),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
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",