🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix: resolve issues #1390, #1391, #1392 — v3.5.42 (#1393)
rUv0590bf29c42d
diff --git a/package.json b/package.jsonindex a6864e8fbf..42c6cf9119 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "claude-flow",- "version": "3.5.40",+ "version": "3.5.42","description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration","main": "dist/index.js","type": "module",diff --git a/ruflo/package.json b/ruflo/package.jsonindex 1c9f1c122c..6aed734f88 100644--- a/ruflo/package.json+++ b/ruflo/package.json@@ -1,6 +1,6 @@{"name": "ruflo",- "version": "3.5.40",+ "version": "3.5.42","description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration","main": "bin/ruflo.js","type": "module",diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.jsonindex 8aeb5cf34c..37e8d0752a 100644--- a/v3/@claude-flow/cli/package.json+++ b/v3/@claude-flow/cli/package.json@@ -1,6 +1,6 @@{"name": "@claude-flow/cli",- "version": "3.5.40",+ "version": "3.5.42","type": "module","description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code","main": "dist/src/index.js",diff --git a/v3/@claude-flow/cli/src/commands/hive-mind.ts b/v3/@claude-flow/cli/src/commands/hive-mind.tsindex c0ce2bba60..9401e2b457 100644--- a/v3/@claude-flow/cli/src/commands/hive-mind.ts+++ b/v3/@claude-flow/cli/src/commands/hive-mind.ts@@ -97,36 +97,36 @@ ${workerTypes.map(type => `• ${type}: ${workerGroups[type].length} agents`).jo🔧 AVAILABLE MCP TOOLS FOR HIVE MIND COORDINATION:1️⃣ **COLLECTIVE INTELLIGENCE**- mcp__claude-flow__hive-mind_consensus - Democratic decision making- mcp__claude-flow__hive-mind_memory - Share knowledge across the hive- mcp__claude-flow__hive-mind_broadcast - Broadcast to all workers- mcp__claude-flow__neural_patterns - Neural pattern recognition+ mcp__ruflo__hive-mind_consensus - Democratic decision making+ mcp__ruflo__hive-mind_memory - Share knowledge across the hive+ mcp__ruflo__hive-mind_broadcast - Broadcast to all workers+ mcp__ruflo__neural_patterns - Neural pattern recognition2️⃣ **QUEEN COORDINATION**- mcp__claude-flow__hive-mind_status - Monitor swarm health- mcp__claude-flow__task_create - Create and delegate tasks- mcp__claude-flow__task_orchestrate - Orchestrate task distribution- mcp__claude-flow__agent_spawn - Spawn additional workers+ mcp__ruflo__hive-mind_status - Monitor swarm health+ mcp__ruflo__task_create - Create and delegate tasks+ mcp__ruflo__coordination_orchestrate - Orchestrate task distribution+ mcp__ruflo__agent_spawn - Spawn additional workers3️⃣ **WORKER MANAGEMENT**- mcp__claude-flow__agent_list - List all active agents- mcp__claude-flow__agent_status - Check agent status- mcp__claude-flow__agent_metrics - Track worker performance- mcp__claude-flow__hive-mind_join - Add agent to hive- mcp__claude-flow__hive-mind_leave - Remove agent from hive+ mcp__ruflo__agent_list - List all active agents+ mcp__ruflo__agent_status - Check agent status+ mcp__ruflo__agent_health - Check worker health+ mcp__ruflo__hive-mind_join - Add agent to hive+ mcp__ruflo__hive-mind_leave - Remove agent from hive4️⃣ **TASK ORCHESTRATION**- mcp__claude-flow__task_create - Create hierarchical tasks- mcp__claude-flow__task_status - Track task progress- mcp__claude-flow__task_complete - Mark tasks complete- mcp__claude-flow__workflow_create - Create workflows+ mcp__ruflo__task_assign - Assign tasks to workers+ mcp__ruflo__task_status - Track task progress+ mcp__ruflo__task_complete - Mark tasks complete+ mcp__ruflo__workflow_create - Create workflows5️⃣ **MEMORY & LEARNING**- mcp__claude-flow__memory_store - Store collective knowledge- mcp__claude-flow__memory_retrieve - Access shared memory- mcp__claude-flow__memory_search - Search memory patterns- mcp__claude-flow__neural_train - Learn from experiences- mcp__claude-flow__hooks_intelligence_pattern-store - Store patterns+ mcp__ruflo__memory_store - Store collective knowledge+ mcp__ruflo__memory_retrieve - Access shared memory+ mcp__ruflo__memory_search - Search memory patterns+ mcp__ruflo__neural_train - Learn from experiences+ mcp__ruflo__hooks_intelligence_pattern-store - Store patterns📋 HIVE MIND EXECUTION PROTOCOL:@@ -158,11 +158,11 @@ ${workerTypes.map(type => `• ${type}: ${workerGroups[type].length} agents`).jo${objective}💡 COORDINATION TIPS:-• Use mcp__claude-flow__hive-mind_broadcast for swarm-wide announcements-• Check worker status regularly with mcp__claude-flow__hive-mind_status+• Use mcp__ruflo__hive-mind_broadcast for swarm-wide announcements+• Check worker status regularly with mcp__ruflo__hive-mind_status• Store important decisions in shared memory for persistence• Use consensus for any decisions affecting multiple workers-• Monitor task progress and reassign if workers are blocked+• Use mcp__ruflo__task_assign to assign tasks to workers, then mcp__ruflo__task_complete when done🚀 BEGIN HIVE MIND COORDINATION NOW!Start by checking the current hive status and then proceed with the objective.diff --git a/v3/@claude-flow/cli/src/mcp-server.ts b/v3/@claude-flow/cli/src/mcp-server.tsindex a6d276f526..5c156b4952 100644--- a/v3/@claude-flow/cli/src/mcp-server.ts+++ b/v3/@claude-flow/cli/src/mcp-server.ts@@ -333,7 +333,7 @@ export class MCPServerManager extends EventEmitter {method: 'server.initialized',params: {serverInfo: {- name: 'claude-flow',+ name: 'ruflo',version: VERSION,capabilities: {tools: { listChanged: true },@@ -437,7 +437,7 @@ export class MCPServerManager extends EventEmitter {id: message.id,result: {protocolVersion: '2024-11-05',- serverInfo: { name: 'claude-flow', version: '3.0.0' },+ serverInfo: { name: 'ruflo', version: '3.0.0' },capabilities: {tools: { listChanged: true },resources: { subscribe: true, listChanged: true },diff --git a/v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.tsindex 697221fa6f..2ac1b1409d 100644--- a/v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts@@ -341,6 +341,29 @@ export const hiveMindTools: MCPTool[] = [const state = loadHiveState();const uptime = state.createdAt ? Date.now() - new Date(state.createdAt).getTime() : 0;++ // Load agent store once for all workers+ const agentStore = loadAgentStore();++ // Compute real task metrics from task store+ const taskStorePath = join(process.cwd(), '.claude-flow', 'tasks', 'store.json');+ let pendingTaskCount = 0;+ let activeTaskCount = 0;+ let completedTaskCount = 0;+ try {+ if (existsSync(taskStorePath)) {+ const taskStore = JSON.parse(readFileSync(taskStorePath, 'utf-8'));+ for (const task of Object.values(taskStore.tasks || {}) as Array<{ status: string }>) {+ if (task.status === 'pending') pendingTaskCount++;+ else if (task.status === 'in_progress') activeTaskCount++;+ else if (task.status === 'completed') completedTaskCount++;+ }+ }+ } catch { /* ignore */ }++ const workerCount = Math.max(1, state.workers.length);+ const realLoad = activeTaskCount / workerCount;+const status = {// CLI expected fieldshiveId: `hive-${state.createdAt ? new Date(state.createdAt).getTime() : Date.now()}`,@@ -351,13 +374,12 @@ export const hiveMindTools: MCPTool[] = [id: state.queen.agentId,agentId: state.queen.agentId,status: 'active',- load: 0.3 + Math.random() * 0.4, // Simulated load- tasksQueued: state.consensus.pending.length,+ load: Math.round(realLoad * 1000) / 1000,+ tasksQueued: pendingTaskCount,electedAt: state.queen.electedAt,term: state.queen.term,} : { id: 'N/A', status: 'offline', load: 0, tasksQueued: 0 },workers: state.workers.map(w => {- const agentStore = loadAgentStore();const agent = agentStore.agents[w] as Record<string, unknown> | undefined;return {id: w,@@ -368,10 +390,11 @@ export const hiveMindTools: MCPTool[] = [};}),metrics: {- totalTasks: state.consensus.history.length + state.consensus.pending.length,- completedTasks: state.consensus.history.length,+ totalTasks: pendingTaskCount + activeTaskCount + completedTaskCount,+ completedTasks: completedTaskCount,+ activeTasks: activeTaskCount,+ pendingTasks: pendingTaskCount,failedTasks: 0,- avgTaskTime: 150,consensusRounds: state.consensus.history.length,memoryUsage: `${Object.keys(state.sharedMemory).length * 2} KB`,},diff --git a/v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/memory-tools.tsindex c47267576f..ec9c51c507 100644--- a/v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts@@ -199,11 +199,22 @@ export const memoryTools: MCPTool[] = [const key = input.key as string;const namespace = (input.namespace as string) || 'default';- const value = typeof input.value === 'string' ? input.value : JSON.stringify(input.value);+ const rawValue = input.value;+ const value = typeof rawValue === 'string' ? rawValue : (rawValue !== undefined ? JSON.stringify(rawValue) : '');const tags = (input.tags as string[]) || [];const ttl = input.ttl as number | undefined;const upsert = (input.upsert as boolean) || false;+ if (!value) {+ return {+ success: false,+ key,+ stored: false,+ hasEmbedding: false,+ error: 'Value is required and cannot be empty',+ };+ }+validateMemoryInput(key, value);const startTime = performance.now();diff --git a/v3/@claude-flow/cli/src/mcp-tools/task-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/task-tools.tsindex 7e83d42a0a..3b1a5d93fb 100644--- a/v3/@claude-flow/cli/src/mcp-tools/task-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/task-tools.ts@@ -240,6 +240,28 @@ export const taskTools: MCPTool[] = [task.result = (input.result as Record<string, unknown>) || {};saveTaskStore(store);+ // Sync assigned agents back to idle and increment taskCount+ if (task.assignedTo.length > 0) {+ const agentStorePath = join(process.cwd(), STORAGE_DIR, 'agents.json');+ try {+ let agentStore: { agents: Record<string, Record<string, unknown>> } = { agents: {} };+ if (existsSync(agentStorePath)) {+ agentStore = JSON.parse(readFileSync(agentStorePath, 'utf-8'));+ }+ for (const agentId of task.assignedTo) {+ if (agentStore.agents[agentId]) {+ agentStore.agents[agentId].status = 'idle';+ agentStore.agents[agentId].currentTask = null;+ agentStore.agents[agentId].taskCount =+ ((agentStore.agents[agentId].taskCount as number) || 0) + 1;+ }+ }+ writeFileSync(agentStorePath, JSON.stringify(agentStore, null, 2), 'utf-8');+ } catch {+ // Best-effort agent sync+ }+ }+return {taskId: task.taskId,status: task.status,@@ -330,19 +352,63 @@ export const taskTools: MCPTool[] = [const previouslyAssigned = [...task.assignedTo];+ // Load agent store to sync worker state+ const agentStorePath = join(process.cwd(), STORAGE_DIR, 'agents.json');+ let agentStore: { agents: Record<string, Record<string, unknown>> } = { agents: {} };+ try {+ if (existsSync(agentStorePath)) {+ agentStore = JSON.parse(readFileSync(agentStorePath, 'utf-8'));+ }+ } catch { /* ignore */ }+if (input.unassign) {+ // Revert previously assigned agents to idle+ for (const agentId of previouslyAssigned) {+ if (agentStore.agents[agentId]) {+ agentStore.agents[agentId].status = 'idle';+ agentStore.agents[agentId].currentTask = null;+ }+ }task.assignedTo = [];} else {const agentIds = (input.agentIds as string[]) || [];+ // Revert old agents to idle+ for (const agentId of previouslyAssigned) {+ if (!agentIds.includes(agentId) && agentStore.agents[agentId]) {+ agentStore.agents[agentId].status = 'idle';+ agentStore.agents[agentId].currentTask = null;+ }+ }+ // Set new agents to active+ for (const agentId of agentIds) {+ if (agentStore.agents[agentId]) {+ agentStore.agents[agentId].status = 'active';+ agentStore.agents[agentId].currentTask = taskId;+ }+ }task.assignedTo = agentIds;+ // Auto-transition task to in_progress if pending+ if (task.status === 'pending' && agentIds.length > 0) {+ task.status = 'in_progress';+ if (!task.startedAt) {+ task.startedAt = new Date().toISOString();+ }+ }}saveTaskStore(store);+ // Save agent store+ const agentDir = join(process.cwd(), STORAGE_DIR);+ if (!existsSync(agentDir)) {+ mkdirSync(agentDir, { recursive: true });+ }+ writeFileSync(agentStorePath, JSON.stringify(agentStore, null, 2), 'utf-8');return {taskId: task.taskId,assignedTo: task.assignedTo,previouslyAssigned,+ status: task.status,};},},diff --git a/v3/pnpm-lock.yaml b/v3/pnpm-lock.yamlindex be92610a1c..c1cdb59808 100644--- a/v3/pnpm-lock.yaml+++ b/v3/pnpm-lock.yaml@@ -104,7 +104,7 @@ importers:specifier: ^3.0.0-alpha.8version: link:../mcp'@claude-flow/shared':- specifier: ^3.0.0-alpha.1+ specifier: ^3.0.0-alpha.7version: link:../shared'@noble/ed25519':specifier: ^2.1.0@@ -140,21 +140,12 @@ importers:'@ruvector/router':specifier: ^0.1.27version: 0.1.28- '@ruvector/ruvllm-wasm':- specifier: ^2.0.2- version: 2.0.2- '@ruvector/rvagent-wasm':- specifier: ^0.1.0- version: 0.1.0'@ruvector/sona':specifier: ^0.1.5version: 0.1.5agentic-flow:specifier: ^3.0.0-alpha.1version: 3.0.0-alpha.1- ruvector:- specifier: ^0.2.16- version: 0.2.16(@ruvector/[email protected])([email protected])devDependencies:typescript:specifier: ^5.3.0@@ -302,7 +293,7 @@ importers:dependencies:agentic-flow:specifier: ^2.0.0-alpha+ version: 2.0.0-alpha(@types/[email protected])([email protected])([email protected])([email protected])optionalDependencies:agent-booster:specifier: ^0.2.2@@ -377,7 +368,7 @@ importers:optionalDependencies:agentdb:specifier: ^2.0.0 || ^3.0.0-alpha.1'@claude-flow/performance':dependencies:@@ -3815,12 +3806,6 @@ packages:dev: falseoptional: true- /@ruvector/[email protected]:- resolution: {integrity: sha512-jVu+t710JvEzU6UZZvKrTp+dWsm3hKzOqB+yxrcqFsVaccVfeKyQuvCx13qVENvuntbnfslryErn9QbydH76yQ==}- requiresBuild: true- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-ksm+AZVqkkYLVq2Rbc7Rx+gSH7egFWlcH3E5dQpro98Oslc7jUH+uNDRjDVUS3lZXchV+Ot5WPLM4pClRxFm9w==}engines: {node: '>= 18'}@@ -3846,12 +3831,6 @@ packages:'@ruvector/ruvllm-win32-x64-msvc': 0.2.0dev: false- /@ruvector/[email protected]:- resolution: {integrity: sha512-zhcnU7XfBEfDwkDFscehq6qGU/TW4LNr287xHHXCuNsaTBPlb8YSnkuMNWg6BBIK/X+UdWAsyYESN5jbNQEaBQ==}- requiresBuild: true- dev: false- optional: true-/@ruvector/[email protected]:resolution: {integrity: sha512-vll3WJwDn3oOfy1PB10IG7/f3zBpFiMNHL2/2tdJmeRR8La/rSPJ0ZH5MDIsfleiVtaWzh9bvVCtVkZ6uo2jeg==}cpu: [arm64]@@ -5074,15 +5053,15 @@ packages:- supports-colordev: false+ /[email protected](@types/[email protected])([email protected])([email protected])([email protected]):resolution: {integrity: sha512-bUqO5o2VpWomh2xGOHdQoX00CGrPcIAH6zDCt5oa0SeJWAO+bbB7SiElb1TxwcrJQKe96HkiSh2T8z4vFypsxg==}engines: {node: '>=18.0.0'}hasBin: truerequiresBuild: truedependencies:- '@modelcontextprotocol/sdk': 1.27.1([email protected])+ '@modelcontextprotocol/sdk': 1.25.1([email protected])([email protected])'@opentelemetry/api': 1.9.0- '@ruvector/attention': 0.1.31+ '@ruvector/attention': 0.1.4'@ruvector/gnn': 0.1.25'@ruvector/graph-node': 0.1.26'@ruvector/router': 0.1.26@@ -5097,9 +5076,9 @@ packages:jsonwebtoken: 9.0.3marked-terminal: 6.2.0([email protected])ora: 7.0.1- ruvector: 0.1.100([email protected])+ ruvector: 0.1.95([email protected])ruvector-attention-wasm: 0.1.0- sql.js: 1.14.0+ sql.js: 1.13.0zod: 3.25.76optionalDependencies:'@opentelemetry/auto-instrumentations-node': 0.47.1(@opentelemetry/[email protected])@@ -5129,6 +5108,7 @@ packages:- bluebird- encoding- express+ - hono- marked- react-native-b4a- supports-color@@ -5240,55 +5220,6 @@ packages:- supports-colordev: false- resolution: {integrity: sha512-Sk3yRRR44obOHRHKagD9svC5dYksVTMDB96+PeRTWcD9gPRPLhvGhVati8eS8cHW+RxPjfSzuQ7syuzlpY3BvQ==}- engines: {node: '>=18.0.0'}- hasBin: true- requiresBuild: true- peerDependencies:- '@xenova/transformers': ^2.17.2- better-sqlite3: ^11.8.1- sqlite3: ^5.1.7- peerDependenciesMeta:- '@xenova/transformers':- optional: true- better-sqlite3:- optional: true- sqlite3:- optional: true- dependencies:- '@modelcontextprotocol/sdk': 1.25.1([email protected])([email protected])- '@ruvector/graph-transformer': 2.0.4- ajv: 8.17.1- ruvector: 0.1.100([email protected])- sql.js: 1.13.0- zod: 3.25.76- optionalDependencies:- '@ruvector/attention': 0.1.31- '@ruvector/gnn': 0.1.25- '@ruvector/graph-node': 2.0.2- '@ruvector/router': 0.1.28- '@ruvector/sona': 0.1.5- chalk: 5.6.2- cli-table3: 0.6.5- commander: 12.1.0- dotenv: 16.6.1- hnswlib-node: 3.0.0- inquirer: 9.3.8(@types/[email protected])- marked-terminal: 6.2.0([email protected])- ora: 7.0.1- ruvector-attention-wasm: 0.1.32- ruvector-graph-transformer-wasm: 2.0.4- sqlite: 5.1.1- transitivePeerDependencies:- - '@cfworker/json-schema'- - '@types/node'- - hono- - marked- - supports-color- dev: false- optional: true-/[email protected](@modelcontextprotocol/[email protected]):resolution: {integrity: sha512-h3d1KNUFkmdFdtjwn792/MPqYrEf7OId2LIIXlJDGM4epx0Vcm5FQ+ROrjxWDE04xgG3AHQ5dNynxPTDdkC7RA==}engines: {node: '>=18.0.0'}@@ -5330,7 +5261,7 @@ packages:dev: falseoptional: true+ /[email protected](@types/[email protected])([email protected])([email protected])([email protected]):resolution: {integrity: sha512-lbBEr7LiOq0lcBFnxrTZEGfXp9KzPsiNtIkWDIve0y+LMW+ZUKl8FNraT0Lwcc7zcKMQoqCfvZksvyEFG+E0Fg==}engines: {node: '>=18.0.0', npm: '>=8.0.0'}hasBin: true@@ -5355,7 +5286,7 @@ packages:'@types/react-dom': 19.2.3(@types/[email protected])'@vitejs/plugin-react-swc': 4.2.2([email protected])'@xenova/transformers': 2.17.2+ agentdb: 2.0.0-alpha.3.4(@types/[email protected])([email protected])([email protected])([email protected])agentic-payments: 0.1.13([email protected])autoprefixer: 10.4.23([email protected])axios: 1.13.2@@ -5391,6 +5322,7 @@ packages:- debug- effect- encoding+ - hono- jiti- jose- less@@ -10294,39 +10226,6 @@ packages:- zoddev: false- resolution: {integrity: sha512-hTaFjQ1YSgksL1K3+od3fd+geMAWaAwHdi+cHTds8anPCkEOxvHsBj3Wiy1psM6+Q1ZbcrJVG8ek8utHHafiOw==}- engines: {node: '>=18.0.0'}- hasBin: true- requiresBuild: true- peerDependencies:- '@ruvector/router': '>=0.1.0'- '@ruvector/ruvllm': '>=2.0.0'- peerDependenciesMeta:- '@ruvector/router':- optional: true- '@ruvector/ruvllm':- optional: true- dependencies:- '@modelcontextprotocol/sdk': 1.27.1([email protected])- '@ruvector/attention': 0.1.31- '@ruvector/core': 0.1.30- '@ruvector/gnn': 0.1.25- '@ruvector/router': 0.1.28- '@ruvector/sona': 0.1.5- chalk: 4.1.2- commander: 11.1.0- glob: 10.5.0- ora: 5.4.1- optionalDependencies:- '@ruvector/rvf': 0.1.9- transitivePeerDependencies:- - '@cfworker/json-schema'- - supports-color- - zod- dev: false- optional: true-resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==}dependencies:@@ -10691,6 +10590,7 @@ packages:resolution: {integrity: sha512-NXYh+kFqLiYRCNAaHD0PcbjFgXyjuolEKLMk5vRt2DgPENtF1kkNzzMlg42dUk5wIsH8MhUzsRhaUxIisoSlZQ==}requiresBuild: truedev: false+ optional: trueresolution: {integrity: sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==}