claude-flow 2.0.0-alpha.61 → 2.0.0-alpha.63
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/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +54 -0
- package/.claude/commands/analysis/token-efficiency.md +2 -1
- package/.claude/commands/automation/self-healing.md +47 -2
- package/.claude/commands/automation/session-memory.md +39 -10
- package/.claude/commands/automation/smart-agents.md +36 -8
- package/.claude/commands/github/code-review-swarm.md +80 -15
- package/.claude/commands/github/github-modes.md +14 -14
- package/.claude/commands/github/issue-tracker.md +19 -16
- package/.claude/commands/github/multi-repo-swarm.md +114 -16
- package/.claude/commands/github/pr-manager.md +5 -4
- package/.claude/commands/github/project-board-sync.md +38 -5
- package/.claude/commands/github/release-manager.md +19 -19
- package/.claude/commands/github/release-swarm.md +102 -13
- package/.claude/commands/github/repo-architect.md +6 -6
- package/.claude/commands/github/swarm-issue.md +139 -17
- package/.claude/commands/github/swarm-pr.md +49 -15
- package/.claude/commands/github/sync-coordinator.md +33 -33
- package/.claude/commands/github/workflow-automation.md +37 -10
- package/.claude/commands/hooks/overview.md +2 -2
- package/.claude/commands/hooks/setup.md +7 -7
- package/.claude/commands/memory/neural.md +10 -5
- package/.claude/commands/memory/usage.md +9 -5
- package/.claude/commands/monitoring/agents.md +7 -5
- package/.claude/commands/monitoring/status.md +8 -5
- package/.claude/commands/optimization/auto-topology.md +13 -1
- package/.claude/commands/optimization/parallel-execution.md +7 -1
- package/.claude/commands/sparc/analyzer.md +28 -2
- package/.claude/commands/sparc/architect.md +27 -1
- package/.claude/commands/sparc/batch-executor.md +27 -1
- package/.claude/commands/sparc/coder.md +27 -1
- package/.claude/commands/sparc/debugger.md +27 -1
- package/.claude/commands/sparc/designer.md +27 -1
- package/.claude/commands/sparc/documenter.md +27 -1
- package/.claude/commands/sparc/innovator.md +27 -1
- package/.claude/commands/sparc/memory-manager.md +27 -1
- package/.claude/commands/sparc/optimizer.md +27 -1
- package/.claude/commands/sparc/orchestrator.md +106 -2
- package/.claude/commands/sparc/researcher.md +27 -1
- package/.claude/commands/sparc/reviewer.md +27 -1
- package/.claude/commands/sparc/sparc-modes.md +137 -5
- package/.claude/commands/sparc/swarm-coordinator.md +27 -1
- package/.claude/commands/sparc/tdd.md +27 -1
- package/.claude/commands/sparc/tester.md +27 -1
- package/.claude/commands/sparc/workflow-manager.md +27 -1
- package/.claude/commands/swarm/analysis.md +82 -5
- package/.claude/commands/swarm/development.md +83 -6
- package/.claude/commands/swarm/examples.md +141 -3
- package/.claude/commands/swarm/maintenance.md +92 -8
- package/.claude/commands/swarm/optimization.md +107 -9
- package/.claude/commands/swarm/research.md +126 -8
- package/.claude/commands/swarm/testing.md +121 -9
- package/.claude/commands/training/neural-patterns.md +27 -2
- package/.claude/commands/training/specialization.md +13 -3
- package/.claude/commands/workflows/development.md +43 -4
- package/.claude/commands/workflows/research.md +26 -2
- package/CHANGELOG.md +59 -1
- package/README.md +8 -0
- package/bin/claude-flow +1 -1
- package/dist/adapters/cliffy-node.d.ts.map +1 -1
- package/dist/adapters/cliffy-node.js +13 -7
- package/dist/adapters/cliffy-node.js.map +1 -1
- package/dist/agents/agent-manager.d.ts.map +1 -1
- package/dist/agents/agent-manager.js +77 -65
- package/dist/agents/agent-manager.js.map +1 -1
- package/dist/agents/agent-registry.d.ts.map +1 -1
- package/dist/agents/agent-registry.js +38 -30
- package/dist/agents/agent-registry.js.map +1 -1
- package/dist/api/claude-client.d.ts.map +1 -1
- package/dist/api/claude-client.js +22 -16
- package/dist/api/claude-client.js.map +1 -1
- package/dist/cli/agents/analyst.d.ts.map +1 -1
- package/dist/cli/agents/analyst.js +94 -114
- package/dist/cli/agents/analyst.js.map +1 -1
- package/dist/cli/agents/architect.d.ts.map +1 -1
- package/dist/cli/agents/architect.js +100 -114
- package/dist/cli/agents/architect.js.map +1 -1
- package/dist/cli/agents/base-agent.d.ts.map +1 -1
- package/dist/cli/agents/base-agent.js +27 -27
- package/dist/cli/agents/base-agent.js.map +1 -1
- package/dist/cli/agents/capabilities.d.ts.map +1 -1
- package/dist/cli/agents/capabilities.js +49 -51
- package/dist/cli/agents/capabilities.js.map +1 -1
- package/dist/cli/agents/coder.d.ts.map +1 -1
- package/dist/cli/agents/coder.js +92 -98
- package/dist/cli/agents/coder.js.map +1 -1
- package/dist/cli/agents/coordinator.d.ts.map +1 -1
- package/dist/cli/agents/coordinator.js +59 -64
- package/dist/cli/agents/coordinator.js.map +1 -1
- package/dist/cli/agents/hive-agents.d.ts.map +1 -1
- package/dist/cli/agents/hive-agents.js +22 -24
- package/dist/cli/agents/hive-agents.js.map +1 -1
- package/dist/cli/agents/index.d.ts.map +1 -1
- package/dist/cli/agents/index.js +17 -17
- package/dist/cli/agents/index.js.map +1 -1
- package/dist/cli/agents/researcher.d.ts.map +1 -1
- package/dist/cli/agents/researcher.js +41 -61
- package/dist/cli/agents/researcher.js.map +1 -1
- package/dist/cli/agents/tester.d.ts.map +1 -1
- package/dist/cli/agents/tester.js +78 -90
- package/dist/cli/agents/tester.js.map +1 -1
- package/dist/cli/cli-core.d.ts +4 -1
- package/dist/cli/cli-core.d.ts.map +1 -1
- package/dist/cli/cli-core.js +40 -39
- package/dist/cli/cli-core.js.map +1 -1
- package/dist/cli/command-registry.d.ts.map +1 -1
- package/dist/cli/command-registry.js +55 -64
- package/dist/cli/command-registry.js.map +1 -1
- package/dist/cli/commands/advanced-memory-commands.d.ts.map +1 -1
- package/dist/cli/commands/advanced-memory-commands.js +49 -40
- package/dist/cli/commands/advanced-memory-commands.js.map +1 -1
- package/dist/cli/commands/agent-simple.d.ts +3 -0
- package/dist/cli/commands/agent-simple.d.ts.map +1 -1
- package/dist/cli/commands/agent-simple.js +30 -27
- package/dist/cli/commands/agent-simple.js.map +1 -1
- package/dist/cli/commands/agent.d.ts.map +1 -1
- package/dist/cli/commands/agent.js +53 -40
- package/dist/cli/commands/agent.js.map +1 -1
- package/dist/cli/commands/claude-api.js +4 -4
- package/dist/cli/commands/claude-api.js.map +1 -1
- package/dist/cli/commands/claude.d.ts.map +1 -1
- package/dist/cli/commands/claude.js +2 -2
- package/dist/cli/commands/claude.js.map +1 -1
- package/dist/cli/commands/config-integration.d.ts +7 -1
- package/dist/cli/commands/config-integration.d.ts.map +1 -1
- package/dist/cli/commands/config-integration.js +18 -9
- package/dist/cli/commands/config-integration.js.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +2 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/enterprise.d.ts.map +1 -1
- package/dist/cli/commands/enterprise.js +115 -95
- package/dist/cli/commands/enterprise.js.map +1 -1
- package/dist/cli/commands/help-new.js +49 -49
- package/dist/cli/commands/help-new.js.map +1 -1
- package/dist/cli/commands/help.d.ts.map +1 -1
- package/dist/cli/commands/help.js +122 -125
- package/dist/cli/commands/help.js.map +1 -1
- package/dist/cli/commands/hive-mind/index.d.ts +1 -1
- package/dist/cli/commands/hive-mind/index.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/index.js +1 -1
- package/dist/cli/commands/hive-mind/index.js.map +1 -1
- package/dist/cli/commands/hive-mind/init.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/init.js.map +1 -1
- package/dist/cli/commands/hive-mind/optimize-memory.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/optimize-memory.js +35 -26
- package/dist/cli/commands/hive-mind/optimize-memory.js.map +1 -1
- package/dist/cli/commands/hive-mind/pause.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/pause.js +8 -6
- package/dist/cli/commands/hive-mind/pause.js.map +1 -1
- package/dist/cli/commands/hive-mind/ps.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/ps.js +17 -12
- package/dist/cli/commands/hive-mind/ps.js.map +1 -1
- package/dist/cli/commands/hive-mind/resume.js +12 -10
- package/dist/cli/commands/hive-mind/resume.js.map +1 -1
- package/dist/cli/commands/hive-mind/spawn.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/spawn.js +20 -11
- package/dist/cli/commands/hive-mind/spawn.js.map +1 -1
- package/dist/cli/commands/hive-mind/status.js +17 -22
- package/dist/cli/commands/hive-mind/status.js.map +1 -1
- package/dist/cli/commands/hive-mind/stop.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/stop.js +23 -15
- package/dist/cli/commands/hive-mind/stop.js.map +1 -1
- package/dist/cli/commands/hive-mind/task.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/task.js +25 -19
- package/dist/cli/commands/hive-mind/task.js.map +1 -1
- package/dist/cli/commands/hive-mind/wizard.d.ts.map +1 -1
- package/dist/cli/commands/hive-mind/wizard.js +86 -68
- package/dist/cli/commands/hive-mind/wizard.js.map +1 -1
- package/dist/cli/commands/hive.js +73 -38
- package/dist/cli/commands/hive.js.map +1 -1
- package/dist/cli/commands/hook-validator.d.ts.map +1 -1
- package/dist/cli/commands/hook-validator.js +4 -2
- package/dist/cli/commands/hook-validator.js.map +1 -1
- package/dist/cli/commands/hook.d.ts.map +1 -1
- package/dist/cli/commands/hook.js +8 -8
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +850 -784
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts.map +1 -1
- package/dist/cli/commands/mcp.js +8 -16
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/memory.d.ts.map +1 -1
- package/dist/cli/commands/memory.js +8 -8
- package/dist/cli/commands/memory.js.map +1 -1
- package/dist/cli/commands/migrate.d.ts.map +1 -1
- package/dist/cli/commands/migrate.js +3 -3
- package/dist/cli/commands/migrate.js.map +1 -1
- package/dist/cli/commands/monitor.d.ts.map +1 -1
- package/dist/cli/commands/monitor.js +50 -34
- package/dist/cli/commands/monitor.js.map +1 -1
- package/dist/cli/commands/ruv-swarm.d.ts +7 -1
- package/dist/cli/commands/ruv-swarm.d.ts.map +1 -1
- package/dist/cli/commands/ruv-swarm.js +6 -6
- package/dist/cli/commands/ruv-swarm.js.map +1 -1
- package/dist/cli/commands/session.d.ts.map +1 -1
- package/dist/cli/commands/session.js +22 -17
- package/dist/cli/commands/session.js.map +1 -1
- package/dist/cli/commands/sparc.d.ts +1 -1
- package/dist/cli/commands/sparc.d.ts.map +1 -1
- package/dist/cli/commands/sparc.js +146 -126
- package/dist/cli/commands/sparc.js.map +1 -1
- package/dist/cli/commands/start/event-emitter.js +1 -1
- package/dist/cli/commands/start/event-emitter.js.map +1 -1
- package/dist/cli/commands/start/process-manager.d.ts.map +1 -1
- package/dist/cli/commands/start/process-manager.js +20 -18
- package/dist/cli/commands/start/process-manager.js.map +1 -1
- package/dist/cli/commands/start/process-ui-simple.d.ts +4 -0
- package/dist/cli/commands/start/process-ui-simple.d.ts.map +1 -1
- package/dist/cli/commands/start/process-ui-simple.js +2 -2
- package/dist/cli/commands/start/process-ui-simple.js.map +1 -1
- package/dist/cli/commands/start/start-command.d.ts.map +1 -1
- package/dist/cli/commands/start/start-command.js +27 -15
- package/dist/cli/commands/start/start-command.js.map +1 -1
- package/dist/cli/commands/start/system-monitor.d.ts +3 -0
- package/dist/cli/commands/start/system-monitor.d.ts.map +1 -1
- package/dist/cli/commands/start/system-monitor.js +16 -18
- package/dist/cli/commands/start/system-monitor.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +28 -33
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/swarm-spawn.d.ts.map +1 -1
- package/dist/cli/commands/swarm-spawn.js +1 -1
- package/dist/cli/commands/swarm-spawn.js.map +1 -1
- package/dist/cli/commands/swarm.d.ts +4 -1
- package/dist/cli/commands/swarm.d.ts.map +1 -1
- package/dist/cli/commands/swarm.js +23 -18
- package/dist/cli/commands/swarm.js.map +1 -1
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/cli/commands/workflow.d.ts.map +1 -1
- package/dist/cli/commands/workflow.js +49 -45
- package/dist/cli/commands/workflow.js.map +1 -1
- package/dist/cli/completion.d.ts +3 -0
- package/dist/cli/completion.d.ts.map +1 -1
- package/dist/cli/completion.js +15 -5
- package/dist/cli/completion.js.map +1 -1
- package/dist/cli/formatter.d.ts +3 -0
- package/dist/cli/formatter.d.ts.map +1 -1
- package/dist/cli/formatter.js +3 -3
- package/dist/cli/formatter.js.map +1 -1
- package/dist/cli/help-formatter.d.ts.map +1 -1
- package/dist/cli/help-formatter.js +8 -14
- package/dist/cli/help-formatter.js.map +1 -1
- package/dist/cli/index-remote.d.ts +4 -0
- package/dist/cli/index-remote.d.ts.map +1 -1
- package/dist/cli/index-remote.js +1 -1
- package/dist/cli/index-remote.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +32 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/batch-tools.d.ts.map +1 -1
- package/dist/cli/init/batch-tools.js.map +1 -1
- package/dist/cli/init/claude-config.d.ts.map +1 -1
- package/dist/cli/init/claude-config.js +111 -106
- package/dist/cli/init/claude-config.js.map +1 -1
- package/dist/cli/init/directory-structure.d.ts.map +1 -1
- package/dist/cli/init/directory-structure.js +3 -3
- package/dist/cli/init/directory-structure.js.map +1 -1
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/index.js +1 -1
- package/dist/cli/init/index.js.map +1 -1
- package/dist/cli/init/sparc-environment.d.ts.map +1 -1
- package/dist/cli/init/sparc-environment.js +69 -69
- package/dist/cli/init/sparc-environment.js.map +1 -1
- package/dist/cli/init/swarm-commands.d.ts.map +1 -1
- package/dist/cli/init/swarm-commands.js +1 -1
- package/dist/cli/init/swarm-commands.js.map +1 -1
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +6 -6
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/node-compat.d.ts.map +1 -1
- package/dist/cli/node-compat.js +24 -18
- package/dist/cli/node-compat.js.map +1 -1
- package/dist/cli/node-repl.d.ts +4 -0
- package/dist/cli/node-repl.d.ts.map +1 -1
- package/dist/cli/node-repl.js +24 -30
- package/dist/cli/node-repl.js.map +1 -1
- package/dist/cli/repl.d.ts.map +1 -1
- package/dist/cli/repl.js +81 -70
- package/dist/cli/repl.js.map +1 -1
- package/dist/cli/runtime-detector.d.ts.map +1 -1
- package/dist/cli/runtime-detector.js +11 -7
- package/dist/cli/runtime-detector.js.map +1 -1
- package/dist/cli/simple-cli.d.ts +4 -0
- package/dist/cli/simple-cli.d.ts.map +1 -1
- package/dist/cli/simple-cli.js +109 -95
- package/dist/cli/simple-cli.js.map +1 -1
- package/dist/cli/simple-commands/analysis.d.ts.map +1 -1
- package/dist/cli/simple-commands/analysis.js +18 -11
- package/dist/cli/simple-commands/analysis.js.map +1 -1
- package/dist/cli/simple-commands/automation.js +32 -17
- package/dist/cli/simple-commands/automation.js.map +1 -1
- package/dist/cli/simple-commands/batch-manager.js +44 -39
- package/dist/cli/simple-commands/batch-manager.js.map +1 -1
- package/dist/cli/simple-commands/config.d.ts.map +1 -1
- package/dist/cli/simple-commands/config.js +22 -21
- package/dist/cli/simple-commands/config.js.map +1 -1
- package/dist/cli/simple-commands/coordination.d.ts.map +1 -1
- package/dist/cli/simple-commands/coordination.js +12 -12
- package/dist/cli/simple-commands/coordination.js.map +1 -1
- package/dist/cli/simple-commands/fix-hook-variables.d.ts.map +1 -1
- package/dist/cli/simple-commands/fix-hook-variables.js +36 -30
- package/dist/cli/simple-commands/fix-hook-variables.js.map +1 -1
- package/dist/cli/simple-commands/github.d.ts.map +1 -1
- package/dist/cli/simple-commands/github.js +15 -15
- package/dist/cli/simple-commands/github.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js +12 -10
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/communication.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/communication.js +42 -45
- package/dist/cli/simple-commands/hive-mind/communication.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/core.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/core.js +97 -89
- package/dist/cli/simple-commands/hive-mind/core.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js +114 -59
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts +66 -0
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +402 -105
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/memory.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/memory.js +105 -75
- package/dist/cli/simple-commands/hive-mind/memory.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js +45 -43
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/queen.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind/queen.js +101 -88
- package/dist/cli/simple-commands/hive-mind/queen.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind/session-manager.js +75 -53
- package/dist/cli/simple-commands/hive-mind/session-manager.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind-optimize.js +18 -18
- package/dist/cli/simple-commands/hive-mind-optimize.js.map +1 -1
- package/dist/cli/simple-commands/hive-mind.d.ts.map +1 -1
- package/dist/cli/simple-commands/hive-mind.js +278 -140
- package/dist/cli/simple-commands/hive-mind.js.map +1 -1
- package/dist/cli/simple-commands/hook-safety.d.ts.map +1 -1
- package/dist/cli/simple-commands/hook-safety.js +19 -19
- package/dist/cli/simple-commands/hook-safety.js.map +1 -1
- package/dist/cli/simple-commands/hooks.d.ts.map +1 -1
- package/dist/cli/simple-commands/hooks.js +85 -71
- package/dist/cli/simple-commands/hooks.js.map +1 -1
- package/dist/cli/simple-commands/init/batch-init.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/batch-init.js +62 -55
- package/dist/cli/simple-commands/init/batch-init.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +2 -2
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +58 -50
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js +34 -28
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js.map +1 -1
- package/dist/cli/simple-commands/init/executable-wrapper.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/executable-wrapper.js +7 -4
- package/dist/cli/simple-commands/init/executable-wrapper.js.map +1 -1
- package/dist/cli/simple-commands/init/gitignore-updater.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/gitignore-updater.js +10 -9
- package/dist/cli/simple-commands/init/gitignore-updater.js.map +1 -1
- package/dist/cli/simple-commands/init/help.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/help.js.map +1 -1
- package/dist/cli/simple-commands/init/index.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/index.js +159 -103
- package/dist/cli/simple-commands/init/index.js.map +1 -1
- package/dist/cli/simple-commands/init/performance-monitor.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/performance-monitor.js +17 -18
- package/dist/cli/simple-commands/init/performance-monitor.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/backup-manager.js +19 -25
- package/dist/cli/simple-commands/init/rollback/backup-manager.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/index.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/index.js +18 -15
- package/dist/cli/simple-commands/init/rollback/index.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js +49 -68
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js +16 -24
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js.map +1 -1
- package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/rollback/state-tracker.js +25 -25
- package/dist/cli/simple-commands/init/rollback/state-tracker.js.map +1 -1
- package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js +57 -57
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js.map +1 -1
- package/dist/cli/simple-commands/init/sparc/workflows.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/sparc/workflows.js +21 -21
- package/dist/cli/simple-commands/init/sparc/workflows.js.map +1 -1
- package/dist/cli/simple-commands/init/sparc-structure.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/sparc-structure.js +1 -1
- package/dist/cli/simple-commands/init/sparc-structure.js.map +1 -1
- package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js +69 -78
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js.map +1 -1
- package/dist/cli/simple-commands/init/templates/sparc-modes.js +2 -2
- package/dist/cli/simple-commands/init/validation/config-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/config-validator.js +12 -16
- package/dist/cli/simple-commands/init/validation/config-validator.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/health-checker.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/health-checker.js +39 -41
- package/dist/cli/simple-commands/init/validation/health-checker.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/index.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/index.js +8 -8
- package/dist/cli/simple-commands/init/validation/index.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/mode-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/mode-validator.js +12 -12
- package/dist/cli/simple-commands/init/validation/mode-validator.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/post-init-validator.js +13 -13
- package/dist/cli/simple-commands/init/validation/post-init-validator.js.map +1 -1
- package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts.map +1 -1
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js +19 -24
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js.map +1 -1
- package/dist/cli/simple-commands/mcp.js +2 -2
- package/dist/cli/simple-commands/mcp.js.map +1 -1
- package/dist/cli/simple-commands/memory.js +4 -4
- package/dist/cli/simple-commands/memory.js.map +1 -1
- package/dist/cli/simple-commands/migrate-hooks.d.ts.map +1 -1
- package/dist/cli/simple-commands/migrate-hooks.js +3 -3
- package/dist/cli/simple-commands/migrate-hooks.js.map +1 -1
- package/dist/cli/simple-commands/monitor.d.ts.map +1 -1
- package/dist/cli/simple-commands/monitor.js +34 -26
- package/dist/cli/simple-commands/monitor.js.map +1 -1
- package/dist/cli/simple-commands/process-ui-enhanced.d.ts.map +1 -1
- package/dist/cli/simple-commands/process-ui-enhanced.js +53 -39
- package/dist/cli/simple-commands/process-ui-enhanced.js.map +1 -1
- package/dist/cli/simple-commands/sparc-modes/index.js +11 -11
- package/dist/cli/simple-commands/sparc-modes/index.js.map +1 -1
- package/dist/cli/simple-commands/sparc-modes/swarm.js +50 -50
- package/dist/cli/simple-commands/sparc.d.ts.map +1 -1
- package/dist/cli/simple-commands/sparc.js +21 -11
- package/dist/cli/simple-commands/sparc.js.map +1 -1
- package/dist/cli/simple-commands/start-ui.d.ts.map +1 -1
- package/dist/cli/simple-commands/start-ui.js +5 -3
- package/dist/cli/simple-commands/start-ui.js.map +1 -1
- package/dist/cli/simple-commands/start-wrapper.d.ts.map +1 -1
- package/dist/cli/simple-commands/start-wrapper.js +1 -1
- package/dist/cli/simple-commands/start-wrapper.js.map +1 -1
- package/dist/cli/simple-commands/status.js +14 -14
- package/dist/cli/simple-commands/status.js.map +1 -1
- package/dist/cli/simple-commands/swarm-executor.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm-executor.js +19 -19
- package/dist/cli/simple-commands/swarm-executor.js.map +1 -1
- package/dist/cli/simple-commands/swarm-metrics-integration.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm-metrics-integration.js +30 -21
- package/dist/cli/simple-commands/swarm-metrics-integration.js.map +1 -1
- package/dist/cli/simple-commands/swarm-webui-integration.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm-webui-integration.js +30 -18
- package/dist/cli/simple-commands/swarm-webui-integration.js.map +1 -1
- package/dist/cli/simple-commands/swarm.d.ts.map +1 -1
- package/dist/cli/simple-commands/swarm.js +78 -67
- package/dist/cli/simple-commands/swarm.js.map +1 -1
- package/dist/cli/simple-commands/training.d.ts.map +1 -1
- package/dist/cli/simple-commands/training.js +7 -7
- package/dist/cli/simple-commands/training.js.map +1 -1
- package/dist/cli/simple-commands/web-server.d.ts.map +1 -1
- package/dist/cli/simple-commands/web-server.js +68 -66
- package/dist/cli/simple-commands/web-server.js.map +1 -1
- package/dist/cli/simple-mcp.d.ts.map +1 -1
- package/dist/cli/simple-mcp.js +2 -4
- package/dist/cli/simple-mcp.js.map +1 -1
- package/dist/cli/simple-orchestrator.d.ts +3 -0
- package/dist/cli/simple-orchestrator.d.ts.map +1 -1
- package/dist/cli/simple-orchestrator.js +36 -35
- package/dist/cli/simple-orchestrator.js.map +1 -1
- package/dist/cli/ui/compatible-ui.d.ts +4 -0
- package/dist/cli/ui/compatible-ui.d.ts.map +1 -1
- package/dist/cli/ui/compatible-ui.js +9 -8
- package/dist/cli/ui/compatible-ui.js.map +1 -1
- package/dist/cli/ui/fallback-handler.d.ts.map +1 -1
- package/dist/cli/ui/fallback-handler.js +4 -4
- package/dist/cli/ui/fallback-handler.js.map +1 -1
- package/dist/cli/ui/index.d.ts +2 -2
- package/dist/cli/ui/index.d.ts.map +1 -1
- package/dist/cli/ui/index.js +3 -3
- package/dist/cli/ui/index.js.map +1 -1
- package/dist/cli/utils/environment-detector.d.ts.map +1 -1
- package/dist/cli/utils/environment-detector.js +13 -11
- package/dist/cli/utils/environment-detector.js.map +1 -1
- package/dist/cli/utils/interactive-detector.d.ts.map +1 -1
- package/dist/cli/utils/interactive-detector.js +1 -1
- package/dist/cli/utils/interactive-detector.js.map +1 -1
- package/dist/cli/utils/prompt-defaults.d.ts.map +1 -1
- package/dist/cli/utils/prompt-defaults.js +6 -7
- package/dist/cli/utils/prompt-defaults.js.map +1 -1
- package/dist/cli/utils/safe-interactive.d.ts.map +1 -1
- package/dist/cli/utils/safe-interactive.js +7 -6
- package/dist/cli/utils/safe-interactive.js.map +1 -1
- package/dist/cli/utils.d.ts.map +1 -1
- package/dist/cli/utils.js +58 -50
- package/dist/cli/utils.js.map +1 -1
- package/dist/cli/validation-helper.d.ts.map +1 -1
- package/dist/cli/validation-helper.js.map +1 -1
- package/dist/communication/message-bus.d.ts.map +1 -1
- package/dist/communication/message-bus.js +80 -74
- package/dist/communication/message-bus.js.map +1 -1
- package/dist/config/config-manager.d.ts +3 -0
- package/dist/config/config-manager.d.ts.map +1 -1
- package/dist/config/config-manager.js +23 -6
- package/dist/config/config-manager.js.map +1 -1
- package/dist/config/ruv-swarm-config.d.ts +6 -0
- package/dist/config/ruv-swarm-config.d.ts.map +1 -1
- package/dist/config/ruv-swarm-config.js +37 -22
- package/dist/config/ruv-swarm-config.js.map +1 -1
- package/dist/config/ruv-swarm-integration.d.ts.map +1 -1
- package/dist/config/ruv-swarm-integration.js +21 -21
- package/dist/config/ruv-swarm-integration.js.map +1 -1
- package/dist/constants/agent-types.d.ts +4 -4
- package/dist/constants/agent-types.d.ts.map +1 -1
- package/dist/constants/agent-types.js +4 -4
- package/dist/constants/agent-types.js.map +1 -1
- package/dist/coordination/advanced-scheduler.d.ts.map +1 -1
- package/dist/coordination/advanced-scheduler.js +6 -10
- package/dist/coordination/advanced-scheduler.js.map +1 -1
- package/dist/coordination/advanced-task-executor.d.ts.map +1 -1
- package/dist/coordination/advanced-task-executor.js +33 -33
- package/dist/coordination/advanced-task-executor.js.map +1 -1
- package/dist/coordination/background-executor.d.ts.map +1 -1
- package/dist/coordination/background-executor.js +17 -16
- package/dist/coordination/background-executor.js.map +1 -1
- package/dist/coordination/circuit-breaker.d.ts.map +1 -1
- package/dist/coordination/circuit-breaker.js +3 -0
- package/dist/coordination/circuit-breaker.js.map +1 -1
- package/dist/coordination/conflict-resolution.d.ts.map +1 -1
- package/dist/coordination/conflict-resolution.js +10 -8
- package/dist/coordination/conflict-resolution.js.map +1 -1
- package/dist/coordination/dependency-graph.d.ts.map +1 -1
- package/dist/coordination/dependency-graph.js +4 -3
- package/dist/coordination/dependency-graph.js.map +1 -1
- package/dist/coordination/hive-orchestrator.d.ts.map +1 -1
- package/dist/coordination/hive-orchestrator.js +29 -25
- package/dist/coordination/hive-orchestrator.js.map +1 -1
- package/dist/coordination/hive-protocol.d.ts.map +1 -1
- package/dist/coordination/hive-protocol.js +22 -23
- package/dist/coordination/hive-protocol.js.map +1 -1
- package/dist/coordination/index.d.ts +1 -1
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +1 -1
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/load-balancer.d.ts.map +1 -1
- package/dist/coordination/load-balancer.js +55 -56
- package/dist/coordination/load-balancer.js.map +1 -1
- package/dist/coordination/manager.d.ts.map +1 -1
- package/dist/coordination/manager.js +2 -8
- package/dist/coordination/manager.js.map +1 -1
- package/dist/coordination/messaging.d.ts.map +1 -1
- package/dist/coordination/messaging.js +4 -4
- package/dist/coordination/messaging.js.map +1 -1
- package/dist/coordination/metrics.d.ts.map +1 -1
- package/dist/coordination/metrics.js +11 -9
- package/dist/coordination/metrics.js.map +1 -1
- package/dist/coordination/resources.d.ts.map +1 -1
- package/dist/coordination/resources.js +10 -6
- package/dist/coordination/resources.js.map +1 -1
- package/dist/coordination/scheduler.d.ts.map +1 -1
- package/dist/coordination/scheduler.js +4 -4
- package/dist/coordination/scheduler.js.map +1 -1
- package/dist/coordination/swarm-coordinator.d.ts.map +1 -1
- package/dist/coordination/swarm-coordinator.js +32 -34
- package/dist/coordination/swarm-coordinator.js.map +1 -1
- package/dist/coordination/swarm-monitor.d.ts.map +1 -1
- package/dist/coordination/swarm-monitor.js +17 -17
- package/dist/coordination/swarm-monitor.js.map +1 -1
- package/dist/coordination/work-stealing.d.ts.map +1 -1
- package/dist/coordination/work-stealing.js +3 -0
- package/dist/coordination/work-stealing.js.map +1 -1
- package/dist/core/config.d.ts +4 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +28 -31
- package/dist/core/config.js.map +1 -1
- package/dist/core/event-bus.d.ts +3 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/json-persistence.d.ts +3 -0
- package/dist/core/json-persistence.d.ts.map +1 -1
- package/dist/core/json-persistence.js +19 -23
- package/dist/core/json-persistence.js.map +1 -1
- package/dist/core/logger.d.ts +3 -0
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +2 -6
- package/dist/core/logger.js.map +1 -1
- package/dist/core/orchestrator-fixed.d.ts.map +1 -1
- package/dist/core/orchestrator-fixed.js +4 -1
- package/dist/core/orchestrator-fixed.js.map +1 -1
- package/dist/core/orchestrator.d.ts.map +1 -1
- package/dist/core/orchestrator.js +66 -33
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/persistence.d.ts +3 -0
- package/dist/core/persistence.d.ts.map +1 -1
- package/dist/core/persistence.js +25 -19
- package/dist/core/persistence.js.map +1 -1
- package/dist/enterprise/analytics-manager.d.ts.map +1 -1
- package/dist/enterprise/analytics-manager.js +141 -134
- package/dist/enterprise/analytics-manager.js.map +1 -1
- package/dist/enterprise/audit-manager.d.ts.map +1 -1
- package/dist/enterprise/audit-manager.js +144 -122
- package/dist/enterprise/audit-manager.js.map +1 -1
- package/dist/enterprise/cloud-manager.d.ts.map +1 -1
- package/dist/enterprise/cloud-manager.js +104 -99
- package/dist/enterprise/cloud-manager.js.map +1 -1
- package/dist/enterprise/deployment-manager.d.ts.map +1 -1
- package/dist/enterprise/deployment-manager.js +104 -97
- package/dist/enterprise/deployment-manager.js.map +1 -1
- package/dist/enterprise/index.d.ts +6 -6
- package/dist/enterprise/index.d.ts.map +1 -1
- package/dist/enterprise/project-manager.d.ts.map +1 -1
- package/dist/enterprise/project-manager.js +74 -66
- package/dist/enterprise/project-manager.js.map +1 -1
- package/dist/enterprise/security-manager.d.ts.map +1 -1
- package/dist/enterprise/security-manager.js +137 -129
- package/dist/enterprise/security-manager.js.map +1 -1
- package/dist/hive-mind/core/Agent.d.ts.map +1 -1
- package/dist/hive-mind/core/Agent.js +36 -36
- package/dist/hive-mind/core/Agent.js.map +1 -1
- package/dist/hive-mind/core/Communication.d.ts.map +1 -1
- package/dist/hive-mind/core/Communication.js +17 -17
- package/dist/hive-mind/core/Communication.js.map +1 -1
- package/dist/hive-mind/core/DatabaseManager.d.ts.map +1 -1
- package/dist/hive-mind/core/DatabaseManager.js +104 -58
- package/dist/hive-mind/core/DatabaseManager.js.map +1 -1
- package/dist/hive-mind/core/HiveMind.d.ts.map +1 -1
- package/dist/hive-mind/core/HiveMind.js +35 -35
- package/dist/hive-mind/core/HiveMind.js.map +1 -1
- package/dist/hive-mind/core/Memory.d.ts.map +1 -1
- package/dist/hive-mind/core/Memory.js +78 -71
- package/dist/hive-mind/core/Memory.js.map +1 -1
- package/dist/hive-mind/core/MemoryMonitor.d.ts.map +1 -1
- package/dist/hive-mind/core/MemoryMonitor.js +38 -38
- package/dist/hive-mind/core/MemoryMonitor.js.map +1 -1
- package/dist/hive-mind/core/Queen.d.ts.map +1 -1
- package/dist/hive-mind/core/Queen.js +110 -47
- package/dist/hive-mind/core/Queen.js.map +1 -1
- package/dist/hive-mind/integration/ConsensusEngine.d.ts.map +1 -1
- package/dist/hive-mind/integration/ConsensusEngine.js +25 -23
- package/dist/hive-mind/integration/ConsensusEngine.js.map +1 -1
- package/dist/hive-mind/integration/MCPToolWrapper.d.ts.map +1 -1
- package/dist/hive-mind/integration/MCPToolWrapper.js.map +1 -1
- package/dist/hive-mind/integration/SwarmOrchestrator.d.ts.map +1 -1
- package/dist/hive-mind/integration/SwarmOrchestrator.js +60 -58
- package/dist/hive-mind/integration/SwarmOrchestrator.js.map +1 -1
- package/dist/hive-mind/types.d.ts.map +1 -1
- package/dist/integration/mock-components.d.ts.map +1 -1
- package/dist/integration/mock-components.js +21 -21
- package/dist/integration/mock-components.js.map +1 -1
- package/dist/integration/system-integration.d.ts.map +1 -1
- package/dist/integration/system-integration.js +13 -11
- package/dist/integration/system-integration.js.map +1 -1
- package/dist/mcp/auth.d.ts +1 -1
- package/dist/mcp/auth.d.ts.map +1 -1
- package/dist/mcp/auth.js +8 -1
- package/dist/mcp/auth.js.map +1 -1
- package/dist/mcp/claude-code-wrapper.d.ts.map +1 -1
- package/dist/mcp/claude-code-wrapper.js +169 -68
- package/dist/mcp/claude-code-wrapper.js.map +1 -1
- package/dist/mcp/claude-flow-tools.d.ts.map +1 -1
- package/dist/mcp/claude-flow-tools.js +42 -3
- package/dist/mcp/claude-flow-tools.js.map +1 -1
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +9 -9
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/integrate-wrapper.d.ts.map +1 -1
- package/dist/mcp/integrate-wrapper.js +5 -7
- package/dist/mcp/integrate-wrapper.js.map +1 -1
- package/dist/mcp/lifecycle-manager.d.ts.map +1 -1
- package/dist/mcp/lifecycle-manager.js +8 -7
- package/dist/mcp/lifecycle-manager.js.map +1 -1
- package/dist/mcp/load-balancer.d.ts.map +1 -1
- package/dist/mcp/load-balancer.js +5 -1
- package/dist/mcp/load-balancer.js.map +1 -1
- package/dist/mcp/orchestration-integration.d.ts.map +1 -1
- package/dist/mcp/orchestration-integration.js +22 -9
- package/dist/mcp/orchestration-integration.js.map +1 -1
- package/dist/mcp/performance-monitor.d.ts.map +1 -1
- package/dist/mcp/performance-monitor.js +22 -19
- package/dist/mcp/performance-monitor.js.map +1 -1
- package/dist/mcp/protocol-manager.d.ts.map +1 -1
- package/dist/mcp/protocol-manager.js +8 -19
- package/dist/mcp/protocol-manager.js.map +1 -1
- package/dist/mcp/recovery/connection-health-monitor.d.ts.map +1 -1
- package/dist/mcp/recovery/connection-health-monitor.js +5 -5
- package/dist/mcp/recovery/connection-health-monitor.js.map +1 -1
- package/dist/mcp/recovery/connection-state-manager.d.ts +4 -0
- package/dist/mcp/recovery/connection-state-manager.d.ts.map +1 -1
- package/dist/mcp/recovery/connection-state-manager.js +13 -13
- package/dist/mcp/recovery/connection-state-manager.js.map +1 -1
- package/dist/mcp/recovery/fallback-coordinator.d.ts.map +1 -1
- package/dist/mcp/recovery/fallback-coordinator.js +5 -5
- package/dist/mcp/recovery/fallback-coordinator.js.map +1 -1
- package/dist/mcp/recovery/index.d.ts +4 -4
- package/dist/mcp/recovery/index.d.ts.map +1 -1
- package/dist/mcp/recovery/index.js +4 -4
- package/dist/mcp/recovery/index.js.map +1 -1
- package/dist/mcp/recovery/reconnection-manager.d.ts.map +1 -1
- package/dist/mcp/recovery/reconnection-manager.js +1 -1
- package/dist/mcp/recovery/reconnection-manager.js.map +1 -1
- package/dist/mcp/recovery/recovery-manager.d.ts.map +1 -1
- package/dist/mcp/recovery/recovery-manager.js +2 -4
- package/dist/mcp/recovery/recovery-manager.js.map +1 -1
- package/dist/mcp/router.d.ts.map +1 -1
- package/dist/mcp/router.js +3 -0
- package/dist/mcp/router.js.map +1 -1
- package/dist/mcp/ruv-swarm-tools.d.ts.map +1 -1
- package/dist/mcp/ruv-swarm-tools.js +132 -102
- package/dist/mcp/ruv-swarm-tools.js.map +1 -1
- package/dist/mcp/server-with-wrapper.d.ts +3 -0
- package/dist/mcp/server-with-wrapper.d.ts.map +1 -1
- package/dist/mcp/server-with-wrapper.js +2 -3
- package/dist/mcp/server-with-wrapper.js.map +1 -1
- package/dist/mcp/server-wrapper-mode.d.ts +5 -0
- package/dist/mcp/server-wrapper-mode.d.ts.map +1 -1
- package/dist/mcp/server-wrapper-mode.js +2 -3
- package/dist/mcp/server-wrapper-mode.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +12 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +4 -3
- package/dist/mcp/session-manager.js.map +1 -1
- package/dist/mcp/sparc-modes.d.ts.map +1 -1
- package/dist/mcp/sparc-modes.js +15 -15
- package/dist/mcp/sparc-modes.js.map +1 -1
- package/dist/mcp/swarm-tools.d.ts.map +1 -1
- package/dist/mcp/swarm-tools.js +100 -80
- package/dist/mcp/swarm-tools.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +28 -12
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/transports/base.d.ts.map +1 -1
- package/dist/mcp/transports/base.js +3 -0
- package/dist/mcp/transports/base.js.map +1 -1
- package/dist/mcp/transports/http.d.ts +3 -0
- package/dist/mcp/transports/http.d.ts.map +1 -1
- package/dist/mcp/transports/http.js +3 -3
- package/dist/mcp/transports/http.js.map +1 -1
- package/dist/mcp/transports/stdio.d.ts +3 -0
- package/dist/mcp/transports/stdio.d.ts.map +1 -1
- package/dist/mcp/transports/stdio.js +3 -0
- package/dist/mcp/transports/stdio.js.map +1 -1
- package/dist/memory/advanced-memory-manager.d.ts.map +1 -1
- package/dist/memory/advanced-memory-manager.js +109 -100
- package/dist/memory/advanced-memory-manager.js.map +1 -1
- package/dist/memory/backends/base.d.ts.map +1 -1
- package/dist/memory/backends/base.js +3 -0
- package/dist/memory/backends/base.js.map +1 -1
- package/dist/memory/backends/markdown.d.ts +3 -0
- package/dist/memory/backends/markdown.d.ts.map +1 -1
- package/dist/memory/backends/markdown.js +8 -8
- package/dist/memory/backends/markdown.js.map +1 -1
- package/dist/memory/backends/sqlite.d.ts +3 -0
- package/dist/memory/backends/sqlite.d.ts.map +1 -1
- package/dist/memory/backends/sqlite.js +6 -2
- package/dist/memory/backends/sqlite.js.map +1 -1
- package/dist/memory/cache.d.ts.map +1 -1
- package/dist/memory/cache.js +5 -3
- package/dist/memory/cache.js.map +1 -1
- package/dist/memory/distributed-memory.d.ts.map +1 -1
- package/dist/memory/distributed-memory.js +27 -28
- package/dist/memory/distributed-memory.js.map +1 -1
- package/dist/memory/fallback-store.d.ts +1 -0
- package/dist/memory/fallback-store.d.ts.map +1 -1
- package/dist/memory/fallback-store.js +25 -3
- package/dist/memory/fallback-store.js.map +1 -1
- package/dist/memory/in-memory-store.d.ts.map +1 -1
- package/dist/memory/in-memory-store.js +8 -8
- package/dist/memory/in-memory-store.js.map +1 -1
- package/dist/memory/indexer.d.ts.map +1 -1
- package/dist/memory/indexer.js +4 -1
- package/dist/memory/indexer.js.map +1 -1
- package/dist/memory/manager.d.ts.map +1 -1
- package/dist/memory/manager.js +17 -20
- package/dist/memory/manager.js.map +1 -1
- package/dist/memory/sqlite-store.d.ts +34 -0
- package/dist/memory/sqlite-store.d.ts.map +1 -0
- package/dist/memory/sqlite-store.js +14 -11
- package/dist/memory/sqlite-store.js.map +1 -1
- package/dist/memory/sqlite-wrapper.d.ts +38 -0
- package/dist/memory/sqlite-wrapper.d.ts.map +1 -0
- package/dist/memory/sqlite-wrapper.js +157 -0
- package/dist/memory/sqlite-wrapper.js.map +1 -0
- package/dist/memory/swarm-memory.d.ts.map +1 -1
- package/dist/memory/swarm-memory.js +37 -44
- package/dist/memory/swarm-memory.js.map +1 -1
- package/dist/migration/index.d.ts +4 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +8 -8
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/logger.d.ts.map +1 -1
- package/dist/migration/logger.js +5 -5
- package/dist/migration/logger.js.map +1 -1
- package/dist/migration/migration-analyzer.d.ts +3 -0
- package/dist/migration/migration-analyzer.d.ts.map +1 -1
- package/dist/migration/migration-analyzer.js +25 -20
- package/dist/migration/migration-analyzer.js.map +1 -1
- package/dist/migration/migration-runner.d.ts.map +1 -1
- package/dist/migration/migration-runner.js +35 -29
- package/dist/migration/migration-runner.js.map +1 -1
- package/dist/migration/migration-validator.d.ts +3 -0
- package/dist/migration/migration-validator.d.ts.map +1 -1
- package/dist/migration/migration-validator.js +22 -26
- package/dist/migration/migration-validator.js.map +1 -1
- package/dist/migration/progress-reporter.d.ts +3 -0
- package/dist/migration/progress-reporter.d.ts.map +1 -1
- package/dist/migration/progress-reporter.js +8 -8
- package/dist/migration/progress-reporter.js.map +1 -1
- package/dist/migration/rollback-manager.d.ts +3 -0
- package/dist/migration/rollback-manager.d.ts.map +1 -1
- package/dist/migration/rollback-manager.js +29 -26
- package/dist/migration/rollback-manager.js.map +1 -1
- package/dist/monitoring/diagnostics.d.ts.map +1 -1
- package/dist/monitoring/diagnostics.js +49 -37
- package/dist/monitoring/diagnostics.js.map +1 -1
- package/dist/monitoring/health-check.d.ts.map +1 -1
- package/dist/monitoring/health-check.js +24 -25
- package/dist/monitoring/health-check.js.map +1 -1
- package/dist/monitoring/real-time-monitor.d.ts.map +1 -1
- package/dist/monitoring/real-time-monitor.js +71 -58
- package/dist/monitoring/real-time-monitor.js.map +1 -1
- package/dist/resources/resource-manager.d.ts.map +1 -1
- package/dist/resources/resource-manager.js +96 -83
- package/dist/resources/resource-manager.js.map +1 -1
- package/dist/swarm/claude-flow-executor.d.ts.map +1 -1
- package/dist/swarm/claude-flow-executor.js +37 -31
- package/dist/swarm/claude-flow-executor.js.map +1 -1
- package/dist/swarm/coordinator.d.ts.map +1 -1
- package/dist/swarm/coordinator.js +330 -280
- package/dist/swarm/coordinator.js.map +1 -1
- package/dist/swarm/direct-executor.d.ts.map +1 -1
- package/dist/swarm/direct-executor.js +44 -37
- package/dist/swarm/direct-executor.js.map +1 -1
- package/dist/swarm/executor-v2.d.ts.map +1 -1
- package/dist/swarm/executor-v2.js +28 -27
- package/dist/swarm/executor-v2.js.map +1 -1
- package/dist/swarm/executor.d.ts +3 -0
- package/dist/swarm/executor.d.ts.map +1 -1
- package/dist/swarm/executor.js +58 -52
- package/dist/swarm/executor.js.map +1 -1
- package/dist/swarm/index.d.ts.map +1 -1
- package/dist/swarm/index.js +2 -2
- package/dist/swarm/index.js.map +1 -1
- package/dist/swarm/json-output-aggregator.d.ts.map +1 -1
- package/dist/swarm/json-output-aggregator.js +20 -19
- package/dist/swarm/json-output-aggregator.js.map +1 -1
- package/dist/swarm/memory.d.ts.map +1 -1
- package/dist/swarm/memory.js +67 -67
- package/dist/swarm/memory.js.map +1 -1
- package/dist/swarm/optimizations/async-file-manager.d.ts +4 -0
- package/dist/swarm/optimizations/async-file-manager.d.ts.map +1 -1
- package/dist/swarm/optimizations/async-file-manager.js +19 -23
- package/dist/swarm/optimizations/async-file-manager.js.map +1 -1
- package/dist/swarm/optimizations/circular-buffer.d.ts.map +1 -1
- package/dist/swarm/optimizations/circular-buffer.js +2 -4
- package/dist/swarm/optimizations/circular-buffer.js.map +1 -1
- package/dist/swarm/optimizations/connection-pool.d.ts.map +1 -1
- package/dist/swarm/optimizations/connection-pool.js +12 -13
- package/dist/swarm/optimizations/connection-pool.js.map +1 -1
- package/dist/swarm/optimizations/index.js +2 -2
- package/dist/swarm/optimizations/optimized-executor.d.ts.map +1 -1
- package/dist/swarm/optimizations/optimized-executor.js +23 -29
- package/dist/swarm/optimizations/optimized-executor.js.map +1 -1
- package/dist/swarm/optimizations/ttl-map.d.ts.map +1 -1
- package/dist/swarm/optimizations/ttl-map.js +4 -4
- package/dist/swarm/optimizations/ttl-map.js.map +1 -1
- package/dist/swarm/prompt-cli.d.ts.map +1 -1
- package/dist/swarm/prompt-cli.js +18 -13
- package/dist/swarm/prompt-cli.js.map +1 -1
- package/dist/swarm/prompt-copier-enhanced.d.ts.map +1 -1
- package/dist/swarm/prompt-copier-enhanced.js +12 -12
- package/dist/swarm/prompt-copier-enhanced.js.map +1 -1
- package/dist/swarm/prompt-copier.d.ts.map +1 -1
- package/dist/swarm/prompt-copier.js +15 -18
- package/dist/swarm/prompt-copier.js.map +1 -1
- package/dist/swarm/prompt-manager.d.ts.map +1 -1
- package/dist/swarm/prompt-manager.js +27 -21
- package/dist/swarm/prompt-manager.js.map +1 -1
- package/dist/swarm/prompt-utils.d.ts.map +1 -1
- package/dist/swarm/prompt-utils.js +34 -32
- package/dist/swarm/prompt-utils.js.map +1 -1
- package/dist/swarm/sparc-executor.d.ts.map +1 -1
- package/dist/swarm/sparc-executor.js +189 -123
- package/dist/swarm/sparc-executor.js.map +1 -1
- package/dist/swarm/strategies/auto.d.ts.map +1 -1
- package/dist/swarm/strategies/auto.js +105 -86
- package/dist/swarm/strategies/auto.js.map +1 -1
- package/dist/swarm/strategies/base.d.ts.map +1 -1
- package/dist/swarm/strategies/base.js +14 -11
- package/dist/swarm/strategies/base.js.map +1 -1
- package/dist/swarm/strategies/research.d.ts.map +1 -1
- package/dist/swarm/strategies/research.js +76 -71
- package/dist/swarm/strategies/research.js.map +1 -1
- package/dist/swarm/types.d.ts.map +1 -1
- package/dist/swarm/types.js +3 -0
- package/dist/swarm/types.js.map +1 -1
- package/dist/swarm/workers/copy-worker.js +4 -4
- package/dist/swarm/workers/copy-worker.js.map +1 -1
- package/dist/task/commands.d.ts.map +1 -1
- package/dist/task/commands.js +11 -7
- package/dist/task/commands.js.map +1 -1
- package/dist/task/coordination.d.ts.map +1 -1
- package/dist/task/coordination.js +75 -70
- package/dist/task/coordination.js.map +1 -1
- package/dist/task/engine.d.ts.map +1 -1
- package/dist/task/engine.js +34 -32
- package/dist/task/engine.js.map +1 -1
- package/dist/task/index.d.ts +3 -3
- package/dist/task/index.d.ts.map +1 -1
- package/dist/task/index.js +11 -11
- package/dist/task/index.js.map +1 -1
- package/dist/terminal/adapters/native.d.ts.map +1 -1
- package/dist/terminal/adapters/native.js +6 -6
- package/dist/terminal/adapters/native.js.map +1 -1
- package/dist/terminal/adapters/vscode.d.ts +3 -0
- package/dist/terminal/adapters/vscode.d.ts.map +1 -1
- package/dist/terminal/adapters/vscode.js +6 -4
- package/dist/terminal/adapters/vscode.js.map +1 -1
- package/dist/terminal/manager.d.ts.map +1 -1
- package/dist/terminal/manager.js +6 -8
- package/dist/terminal/manager.js.map +1 -1
- package/dist/terminal/pool.d.ts.map +1 -1
- package/dist/terminal/pool.js +3 -0
- package/dist/terminal/pool.js.map +1 -1
- package/dist/terminal/session.d.ts.map +1 -1
- package/dist/terminal/session.js +6 -2
- package/dist/terminal/session.js.map +1 -1
- package/dist/ui/hive-dashboard.d.ts.map +1 -1
- package/dist/ui/hive-dashboard.js +52 -33
- package/dist/ui/hive-dashboard.js.map +1 -1
- package/dist/utils/error-handler.d.ts.map +1 -1
- package/dist/utils/error-handler.js +1 -1
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/helpers.d.ts +3 -0
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +5 -8
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/npx-isolated-cache.js +3 -3
- package/dist/utils/npx-isolated-cache.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +8 -4
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/type-guards.d.ts +1 -1
- package/dist/utils/type-guards.d.ts.map +1 -1
- package/dist/utils/type-guards.js +11 -10
- package/dist/utils/type-guards.js.map +1 -1
- package/package.json +7 -6
- package/src/adapters/cliffy-node.ts +27 -22
- package/src/agents/agent-manager.ts +145 -121
- package/src/agents/agent-registry.ts +77 -70
- package/src/api/claude-api-errors.ts +248 -0
- package/src/api/claude-client-enhanced.ts +616 -0
- package/src/api/claude-client.ts +338 -49
- package/src/api/routes/analysis.js +750 -735
- package/src/cli/__tests__/command-registry.test.js +42 -32
- package/src/cli/__tests__/simple-cli.test.js +42 -37
- package/src/cli/__tests__/utils.test.js +9 -9
- package/src/cli/agents/README.md +30 -4
- package/src/cli/agents/analyst.ts +161 -163
- package/src/cli/agents/architect.ts +126 -131
- package/src/cli/agents/base-agent.ts +48 -47
- package/src/cli/agents/capabilities.ts +87 -85
- package/src/cli/agents/coder.ts +127 -120
- package/src/cli/agents/coordinator.ts +72 -72
- package/src/cli/agents/hive-agents.ts +96 -70
- package/src/cli/agents/index.ts +70 -55
- package/src/cli/agents/researcher.ts +63 -74
- package/src/cli/agents/tester.ts +91 -98
- package/src/cli/cli-core.ts +56 -47
- package/src/cli/command-registry.js +82 -83
- package/src/cli/commands/advanced-memory-commands.ts +210 -142
- package/src/cli/commands/agent-simple.ts +146 -114
- package/src/cli/commands/agent.ts +119 -95
- package/src/cli/commands/claude-api.ts +19 -15
- package/src/cli/commands/claude.ts +96 -88
- package/src/cli/commands/config-integration.ts +120 -101
- package/src/cli/commands/config.ts +10 -8
- package/src/cli/commands/enterprise.ts +323 -187
- package/src/cli/commands/help-new.ts +57 -55
- package/src/cli/commands/help.ts +162 -159
- package/src/cli/commands/hive-mind/index.ts +3 -3
- package/src/cli/commands/hive-mind/init.ts +19 -12
- package/src/cli/commands/hive-mind/optimize-memory.ts +83 -53
- package/src/cli/commands/hive-mind/pause.ts +27 -25
- package/src/cli/commands/hive-mind/ps.ts +43 -37
- package/src/cli/commands/hive-mind/resume.ts +26 -26
- package/src/cli/commands/hive-mind/spawn.ts +37 -29
- package/src/cli/commands/hive-mind/status.ts +51 -51
- package/src/cli/commands/hive-mind/stop.ts +56 -51
- package/src/cli/commands/hive-mind/task.ts +65 -54
- package/src/cli/commands/hive-mind/wizard.ts +181 -167
- package/src/cli/commands/hive.ts +136 -96
- package/src/cli/commands/hook-types.ts +2 -2
- package/src/cli/commands/hook-validator.ts +8 -4
- package/src/cli/commands/hook.ts +44 -42
- package/src/cli/commands/index.ts +1162 -1031
- package/src/cli/commands/mcp.ts +105 -94
- package/src/cli/commands/memory.ts +24 -21
- package/src/cli/commands/migrate.ts +24 -24
- package/src/cli/commands/monitor.ts +123 -93
- package/src/cli/commands/ruv-swarm.ts +131 -122
- package/src/cli/commands/session.ts +60 -45
- package/src/cli/commands/sparc.ts +170 -139
- package/src/cli/commands/start/event-emitter.ts +2 -2
- package/src/cli/commands/start/index.ts +1 -1
- package/src/cli/commands/start/process-manager.ts +30 -47
- package/src/cli/commands/start/process-ui-simple.ts +60 -49
- package/src/cli/commands/start/process-ui.ts +1 -1
- package/src/cli/commands/start/start-command.ts +104 -75
- package/src/cli/commands/start/system-monitor.ts +35 -41
- package/src/cli/commands/start/types.ts +3 -3
- package/src/cli/commands/start.ts +1 -1
- package/src/cli/commands/status.ts +67 -67
- package/src/cli/commands/swarm-spawn.ts +21 -12
- package/src/cli/commands/swarm.ts +221 -150
- package/src/cli/commands/task.ts +55 -55
- package/src/cli/commands/workflow.ts +174 -157
- package/src/cli/completion.ts +34 -19
- package/src/cli/create-enhanced-task.js +49 -17
- package/src/cli/formatter.ts +38 -37
- package/src/cli/help-formatter.js +23 -33
- package/src/cli/help-formatter.ts +24 -34
- package/src/cli/help-text.js +71 -61
- package/src/cli/index-remote.ts +12 -9
- package/src/cli/index.ts +77 -67
- package/src/cli/init/batch-tools.ts +4 -5
- package/src/cli/init/claude-config.ts +125 -118
- package/src/cli/init/directory-structure.ts +10 -11
- package/src/cli/init/index.ts +13 -13
- package/src/cli/init/sparc-environment.ts +90 -74
- package/src/cli/init/swarm-commands.ts +5 -6
- package/src/cli/init/utils.ts +1 -1
- package/src/cli/main.ts +9 -10
- package/src/cli/node-compat.js +26 -19
- package/src/cli/node-repl.ts +104 -87
- package/src/cli/repl.ts +190 -158
- package/src/cli/runtime-detector.js +24 -19
- package/src/cli/simple-cli.js +460 -385
- package/src/cli/simple-cli.ts +426 -366
- package/src/cli/simple-commands/__tests__/agent.test.js +49 -55
- package/src/cli/simple-commands/__tests__/memory.test.js +4 -401
- package/src/cli/simple-commands/__tests__/swarm.test.js +49 -55
- package/src/cli/simple-commands/__tests__/task.test.js +4 -478
- package/src/cli/simple-commands/agent.js +27 -27
- package/src/cli/simple-commands/analysis.js +179 -161
- package/src/cli/simple-commands/automation.js +226 -205
- package/src/cli/simple-commands/batch-manager.js +98 -88
- package/src/cli/simple-commands/config.js +65 -60
- package/src/cli/simple-commands/coordination.js +220 -184
- package/src/cli/simple-commands/enhanced-ui-views.js +142 -115
- package/src/cli/simple-commands/enhanced-webui-complete.js +267 -167
- package/src/cli/simple-commands/fix-hook-variables.js +73 -67
- package/src/cli/simple-commands/github/gh-coordinator.js +63 -53
- package/src/cli/simple-commands/github/github-api.js +45 -47
- package/src/cli/simple-commands/github.js +33 -34
- package/src/cli/simple-commands/hive-mind/auto-save-middleware.js +50 -46
- package/src/cli/simple-commands/hive-mind/communication.js +198 -185
- package/src/cli/simple-commands/hive-mind/core.js +289 -304
- package/src/cli/simple-commands/hive-mind/db-optimizer.js +278 -168
- package/src/cli/simple-commands/hive-mind/mcp-wrapper.js +676 -263
- package/src/cli/simple-commands/hive-mind/memory.js +356 -287
- package/src/cli/simple-commands/hive-mind/performance-optimizer.js +88 -79
- package/src/cli/simple-commands/hive-mind/performance-test.js +61 -49
- package/src/cli/simple-commands/hive-mind/queen.js +223 -213
- package/src/cli/simple-commands/hive-mind/session-manager.js +522 -240
- package/src/cli/simple-commands/hive-mind-optimize.js +69 -65
- package/src/cli/simple-commands/hive-mind-wizard.js +213 -211
- package/src/cli/simple-commands/hive-mind.js +790 -443
- package/src/cli/simple-commands/hive.js +12 -12
- package/src/cli/simple-commands/hook-safety.js +114 -111
- package/src/cli/simple-commands/hooks.js +1077 -1017
- package/src/cli/simple-commands/init/README.md +8 -1
- package/src/cli/simple-commands/init/VALIDATION_ROLLBACK.md +27 -1
- package/src/cli/simple-commands/init/batch-init.js +105 -100
- package/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +6 -6
- package/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +6 -6
- package/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +64 -37
- package/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +85 -71
- package/src/cli/simple-commands/init/claude-commands/slash-commands.js +40 -19
- package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +149 -63
- package/src/cli/simple-commands/init/copy-revised-templates.js +175 -0
- package/src/cli/simple-commands/init/executable-wrapper.js +13 -10
- package/src/cli/simple-commands/init/gitignore-updater.js +22 -22
- package/src/cli/simple-commands/init/help.js +4 -2
- package/src/cli/simple-commands/init/index.js +451 -428
- package/src/cli/simple-commands/init/performance-monitor.js +71 -64
- package/src/cli/simple-commands/init/rollback/backup-manager.js +44 -64
- package/src/cli/simple-commands/init/rollback/index.js +31 -39
- package/src/cli/simple-commands/init/rollback/recovery-manager.js +71 -101
- package/src/cli/simple-commands/init/rollback/rollback-executor.js +34 -53
- package/src/cli/simple-commands/init/rollback/state-tracker.js +38 -49
- package/src/cli/simple-commands/init/sparc/roo-readme.js +1 -1
- package/src/cli/simple-commands/init/sparc/roomodes-config.js +99 -77
- package/src/cli/simple-commands/init/sparc/workflows.js +37 -33
- package/src/cli/simple-commands/init/sparc-structure.js +9 -10
- package/src/cli/simple-commands/init/template-copier.js +583 -0
- package/src/cli/simple-commands/init/templates/CLAUDE.md +94 -26
- package/src/cli/simple-commands/init/templates/claude-flow-universal +9 -7
- package/src/cli/simple-commands/init/templates/claude-md.js +1 -1
- package/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +15 -3
- package/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +12 -2
- package/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +10 -1
- package/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +18 -5
- package/src/cli/simple-commands/init/templates/commands/hooks/notification.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +13 -6
- package/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +12 -1
- package/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +13 -5
- package/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +12 -1
- package/src/cli/simple-commands/init/templates/coordination-md.js +1 -1
- package/src/cli/simple-commands/init/templates/coordination.md +16 -0
- package/src/cli/simple-commands/init/templates/enhanced-templates.js +116 -113
- package/src/cli/simple-commands/init/templates/memory-bank-md.js +1 -1
- package/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
- package/src/cli/simple-commands/init/templates/readme-files.js +1 -1
- package/src/cli/simple-commands/init/templates/safe-hook-patterns.js +176 -127
- package/src/cli/simple-commands/init/templates/settings.json +2 -5
- package/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
- package/src/cli/simple-commands/init/templates/sparc-modes.js +637 -26
- package/src/cli/simple-commands/init/validation/config-validator.js +17 -28
- package/src/cli/simple-commands/init/validation/health-checker.js +54 -62
- package/src/cli/simple-commands/init/validation/index.js +18 -23
- package/src/cli/simple-commands/init/validation/mode-validator.js +22 -32
- package/src/cli/simple-commands/init/validation/post-init-validator.js +25 -26
- package/src/cli/simple-commands/init/validation/pre-init-validator.js +32 -36
- package/src/cli/simple-commands/init/validation/test-runner.js +55 -63
- package/src/cli/simple-commands/init.js +1 -1
- package/src/cli/simple-commands/mcp-integration-layer.js +179 -110
- package/src/cli/simple-commands/mcp.js +55 -48
- package/src/cli/simple-commands/memory.js +62 -56
- package/src/cli/simple-commands/migrate-hooks.js +9 -10
- package/src/cli/simple-commands/monitor.js +87 -67
- package/src/cli/simple-commands/process-ui-enhanced.js +207 -155
- package/src/cli/simple-commands/process-ui.js +65 -56
- package/src/cli/simple-commands/realtime-update-system.js +136 -129
- package/src/cli/simple-commands/sparc/architecture.js +352 -251
- package/src/cli/simple-commands/sparc/commands.js +122 -94
- package/src/cli/simple-commands/sparc/completion.js +274 -199
- package/src/cli/simple-commands/sparc/coordinator.js +217 -169
- package/src/cli/simple-commands/sparc/index.js +40 -36
- package/src/cli/simple-commands/sparc/phase-base.js +72 -58
- package/src/cli/simple-commands/sparc/pseudocode.js +275 -159
- package/src/cli/simple-commands/sparc/refinement.js +306 -212
- package/src/cli/simple-commands/sparc/specification.js +164 -94
- package/src/cli/simple-commands/sparc-modes/architect.js +1 -1
- package/src/cli/simple-commands/sparc-modes/ask.js +1 -1
- package/src/cli/simple-commands/sparc-modes/code.js +1 -1
- package/src/cli/simple-commands/sparc-modes/debug.js +1 -1
- package/src/cli/simple-commands/sparc-modes/devops.js +1 -1
- package/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
- package/src/cli/simple-commands/sparc-modes/generic.js +1 -1
- package/src/cli/simple-commands/sparc-modes/index.js +15 -15
- package/src/cli/simple-commands/sparc-modes/integration.js +1 -1
- package/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
- package/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
- package/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
- package/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
- package/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
- package/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
- package/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
- package/src/cli/simple-commands/sparc-modes/swarm.js +52 -52
- package/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
- package/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
- package/src/cli/simple-commands/sparc.js +87 -69
- package/src/cli/simple-commands/start-ui.js +21 -20
- package/src/cli/simple-commands/start-wrapper.js +29 -31
- package/src/cli/simple-commands/start.js +1 -1
- package/src/cli/simple-commands/status.js +53 -47
- package/src/cli/simple-commands/swarm-executor.js +47 -57
- package/src/cli/simple-commands/swarm-metrics-integration.js +119 -79
- package/src/cli/simple-commands/swarm-ui.js +120 -118
- package/src/cli/simple-commands/swarm-webui-integration.js +48 -27
- package/src/cli/simple-commands/swarm.js +216 -181
- package/src/cli/simple-commands/task.js +29 -29
- package/src/cli/simple-commands/timestamp-fix.js +28 -25
- package/src/cli/simple-commands/tool-execution-framework.js +115 -118
- package/src/cli/simple-commands/training.js +219 -194
- package/src/cli/simple-commands/web-server.js +118 -117
- package/src/cli/simple-commands/webui-validator.js +4 -3
- package/src/cli/simple-mcp.ts +14 -17
- package/src/cli/simple-orchestrator.ts +113 -101
- package/src/cli/swarm-standalone.js +20 -21
- package/src/cli/ui/compatible-ui.ts +55 -44
- package/src/cli/ui/fallback-handler.ts +19 -16
- package/src/cli/ui/index.ts +14 -15
- package/src/cli/utils/environment-detector.ts +75 -67
- package/src/cli/utils/interactive-detector.js +17 -11
- package/src/cli/utils/prompt-defaults.ts +32 -28
- package/src/cli/utils/safe-interactive.js +21 -20
- package/src/cli/utils.js +127 -110
- package/src/cli/validation-helper.js +16 -21
- package/src/cli/validation-helper.ts +21 -34
- package/src/communication/message-bus.ts +137 -124
- package/src/config/config-manager.ts +62 -30
- package/src/config/ruv-swarm-config.ts +105 -86
- package/src/config/ruv-swarm-integration.ts +38 -38
- package/src/constants/agent-types.ts +9 -8
- package/src/coordination/README.md +54 -31
- package/src/coordination/advanced-scheduler.ts +23 -26
- package/src/coordination/advanced-task-executor.ts +74 -68
- package/src/coordination/background-executor.ts +33 -30
- package/src/coordination/circuit-breaker.ts +26 -27
- package/src/coordination/conflict-resolution.ts +18 -27
- package/src/coordination/dependency-graph.ts +15 -18
- package/src/coordination/hive-orchestrator.ts +111 -81
- package/src/coordination/hive-protocol.ts +68 -77
- package/src/coordination/index.ts +3 -7
- package/src/coordination/load-balancer.ts +115 -105
- package/src/coordination/manager.ts +38 -51
- package/src/coordination/messaging.ts +19 -29
- package/src/coordination/metrics.ts +57 -60
- package/src/coordination/resources.ts +32 -37
- package/src/coordination/scheduler.ts +29 -30
- package/src/coordination/swarm-coordinator.ts +81 -70
- package/src/coordination/swarm-monitor.ts +90 -69
- package/src/coordination/work-stealing.ts +6 -13
- package/src/core/config.ts +148 -143
- package/src/core/event-bus.ts +5 -6
- package/src/core/json-persistence.ts +27 -34
- package/src/core/logger.ts +13 -16
- package/src/core/orchestrator-fixed.ts +33 -32
- package/src/core/orchestrator.ts +166 -159
- package/src/core/persistence.ts +47 -36
- package/src/enterprise/analytics-manager.ts +242 -233
- package/src/enterprise/audit-manager.ts +238 -184
- package/src/enterprise/cloud-manager.ts +167 -151
- package/src/enterprise/deployment-manager.ts +223 -180
- package/src/enterprise/index.ts +7 -7
- package/src/enterprise/project-manager.ts +151 -133
- package/src/enterprise/security-manager.ts +278 -223
- package/src/hive-mind/core/Agent.ts +112 -109
- package/src/hive-mind/core/Communication.ts +67 -69
- package/src/hive-mind/core/DatabaseManager.ts +371 -179
- package/src/hive-mind/core/HiveMind.ts +100 -96
- package/src/hive-mind/core/Memory.ts +304 -295
- package/src/hive-mind/core/MemoryMonitor.ts +46 -47
- package/src/hive-mind/core/Queen.ts +187 -114
- package/src/hive-mind/index.ts +2 -2
- package/src/hive-mind/integration/ConsensusEngine.ts +88 -92
- package/src/hive-mind/integration/MCPToolWrapper.ts +20 -72
- package/src/hive-mind/integration/SwarmOrchestrator.ts +173 -165
- package/src/hive-mind/types.ts +24 -12
- package/src/integration/mock-components.ts +42 -30
- package/src/integration/system-integration.ts +79 -78
- package/src/integration/types.ts +7 -7
- package/src/mcp/README.md +23 -4
- package/src/mcp/auth.ts +25 -18
- package/src/mcp/claude-code-wrapper.ts +257 -150
- package/src/mcp/claude-flow-tools.ts +52 -13
- package/src/mcp/client.ts +15 -13
- package/src/mcp/index.ts +22 -27
- package/src/mcp/integrate-wrapper.ts +18 -18
- package/src/mcp/lifecycle-manager.ts +30 -27
- package/src/mcp/load-balancer.ts +10 -11
- package/src/mcp/mcp-server.js +662 -351
- package/src/mcp/orchestration-integration.ts +32 -17
- package/src/mcp/performance-monitor.ts +65 -51
- package/src/mcp/protocol-manager.ts +36 -52
- package/src/mcp/recovery/connection-health-monitor.ts +40 -35
- package/src/mcp/recovery/connection-state-manager.ts +52 -50
- package/src/mcp/recovery/fallback-coordinator.ts +24 -24
- package/src/mcp/recovery/index.ts +23 -4
- package/src/mcp/recovery/reconnection-manager.ts +14 -15
- package/src/mcp/recovery/recovery-manager.ts +52 -68
- package/src/mcp/router.ts +1 -2
- package/src/mcp/ruv-swarm-tools.ts +167 -138
- package/src/mcp/ruv-swarm-wrapper.js +31 -23
- package/src/mcp/server-with-wrapper.ts +4 -5
- package/src/mcp/server-wrapper-mode.ts +5 -6
- package/src/mcp/server.ts +45 -40
- package/src/mcp/session-manager.ts +8 -11
- package/src/mcp/sparc-modes.ts +29 -28
- package/src/mcp/swarm-tools.ts +131 -114
- package/src/mcp/tests/mcp-integration.test.ts +49 -55
- package/src/mcp/tools.ts +53 -38
- package/src/mcp/transports/base.ts +4 -5
- package/src/mcp/transports/http.ts +45 -42
- package/src/mcp/transports/stdio.ts +9 -12
- package/src/memory/README.md +37 -27
- package/src/memory/advanced-memory-manager.ts +336 -279
- package/src/memory/backends/base.ts +4 -5
- package/src/memory/backends/markdown.ts +16 -22
- package/src/memory/backends/sqlite.ts +40 -18
- package/src/memory/cache.ts +18 -18
- package/src/memory/distributed-memory.ts +84 -92
- package/src/memory/enhanced-examples.js +68 -59
- package/src/memory/enhanced-memory.js +99 -80
- package/src/memory/fallback-store.js +49 -8
- package/src/memory/in-memory-store.js +31 -27
- package/src/memory/index.js +4 -4
- package/src/memory/indexer.ts +6 -10
- package/src/memory/manager.ts +45 -59
- package/src/memory/migration.js +107 -90
- package/src/memory/shared-memory.js +155 -157
- package/src/memory/sqlite-store.js +78 -62
- package/src/memory/sqlite-wrapper.js +173 -0
- package/src/memory/swarm-memory.js +138 -131
- package/src/memory/swarm-memory.ts +74 -75
- package/src/memory/test-example.js +28 -30
- package/src/migration/README.md +25 -9
- package/src/migration/index.ts +13 -14
- package/src/migration/logger.ts +9 -7
- package/src/migration/migration-analyzer.ts +66 -52
- package/src/migration/migration-manifest.json +2 -6
- package/src/migration/migration-runner.ts +86 -63
- package/src/migration/migration-validator.ts +93 -68
- package/src/migration/package.json +1 -1
- package/src/migration/progress-reporter.ts +25 -21
- package/src/migration/rollback-manager.ts +79 -63
- package/src/migration/tests/migration-system.test.ts +4 -491
- package/src/migration/tsconfig.json +3 -10
- package/src/migration/types.ts +1 -1
- package/src/monitoring/diagnostics.ts +123 -97
- package/src/monitoring/health-check.ts +45 -51
- package/src/monitoring/real-time-monitor.ts +105 -92
- package/src/resources/resource-manager.ts +205 -159
- package/src/swarm/__tests__/integration.test.ts +59 -65
- package/src/swarm/__tests__/prompt-copier.test.ts +27 -27
- package/src/swarm/claude-flow-executor.ts +50 -49
- package/src/swarm/coordinator.ts +727 -635
- package/src/swarm/direct-executor.ts +80 -86
- package/src/swarm/executor-v2.ts +81 -66
- package/src/swarm/executor.ts +124 -124
- package/src/swarm/index.ts +7 -8
- package/src/swarm/json-output-aggregator.ts +56 -40
- package/src/swarm/memory.ts +152 -147
- package/src/swarm/optimizations/README.md +20 -12
- package/src/swarm/optimizations/__tests__/optimization.test.ts +84 -87
- package/src/swarm/optimizations/async-file-manager.ts +70 -80
- package/src/swarm/optimizations/circular-buffer.ts +37 -37
- package/src/swarm/optimizations/connection-pool.ts +64 -64
- package/src/swarm/optimizations/index.ts +4 -4
- package/src/swarm/optimizations/migration-guide.md +27 -16
- package/src/swarm/optimizations/optimized-executor.ts +104 -114
- package/src/swarm/optimizations/ttl-map.ts +66 -63
- package/src/swarm/prompt-cli.ts +48 -42
- package/src/swarm/prompt-copier-enhanced.ts +54 -55
- package/src/swarm/prompt-copier.ts +59 -65
- package/src/swarm/prompt-copying-README.md +49 -33
- package/src/swarm/prompt-manager.ts +69 -63
- package/src/swarm/prompt-utils.ts +71 -66
- package/src/swarm/sparc-executor.ts +298 -225
- package/src/swarm/strategies/auto.ts +367 -252
- package/src/swarm/strategies/base.ts +24 -20
- package/src/swarm/strategies/research.ts +144 -124
- package/src/swarm/types.ts +340 -309
- package/src/swarm/workers/copy-worker.ts +12 -13
- package/src/task/README.md +99 -70
- package/src/task/commands.ts +16 -8
- package/src/task/coordination.ts +209 -162
- package/src/task/engine.ts +81 -65
- package/src/task/index.ts +28 -31
- package/src/templates/claude-optimized/.claude/BATCHTOOLS_BEST_PRACTICES.md +479 -481
- package/src/templates/claude-optimized/.claude/BATCHTOOLS_GUIDE.md +210 -188
- package/src/templates/claude-optimized/.claude/MIGRATION_GUIDE.md +151 -105
- package/src/templates/claude-optimized/.claude/PERFORMANCE_BENCHMARKS.md +102 -87
- package/src/templates/claude-optimized/.claude/commands/claude-flow-help.md +18 -1
- package/src/templates/claude-optimized/.claude/commands/claude-flow-memory.md +17 -1
- package/src/templates/claude-optimized/.claude/commands/claude-flow-swarm.md +21 -1
- package/src/templates/claude-optimized/.claude/commands/sparc/architect.md +11 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/ask.md +16 -10
- package/src/templates/claude-optimized/.claude/commands/sparc/code.md +26 -7
- package/src/templates/claude-optimized/.claude/commands/sparc/debug.md +14 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/devops.md +23 -10
- package/src/templates/claude-optimized/.claude/commands/sparc/docs-writer.md +8 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/integration.md +43 -27
- package/src/templates/claude-optimized/.claude/commands/sparc/mcp.md +15 -1
- package/src/templates/claude-optimized/.claude/commands/sparc/post-deployment-monitoring-mode.md +45 -30
- package/src/templates/claude-optimized/.claude/commands/sparc/refinement-optimization-mode.md +23 -13
- package/src/templates/claude-optimized/.claude/commands/sparc/security-review.md +31 -17
- package/src/templates/claude-optimized/.claude/commands/sparc/sparc.md +54 -47
- package/src/templates/claude-optimized/.claude/commands/sparc/spec-pseudocode.md +27 -17
- package/src/templates/claude-optimized/.claude/commands/sparc/supabase-admin.md +18 -4
- package/src/templates/claude-optimized/.claude/commands/sparc/tdd.md +23 -9
- package/src/templates/claude-optimized/.claude/commands/sparc/tutorial.md +22 -16
- package/src/templates/claude-optimized/.claude/commands/sparc.md +20 -1
- package/src/templates/claude-optimized/README.md +10 -1
- package/src/templates/claude-optimized/SUMMARY.md +23 -1
- package/src/templates/claude-optimized/deploy-to-project.js +22 -10
- package/src/templates/claude-optimized/install-template.js +14 -10
- package/src/templates/claude-optimized/manifest.json +1 -1
- package/src/templates/claude-optimized/package.json +1 -1
- package/src/templates/claude-optimized/template-manager.js +8 -8
- package/src/templates/claude-optimized/validate-template.js +33 -23
- package/src/terminal/adapters/base.ts +1 -1
- package/src/terminal/adapters/native.ts +47 -47
- package/src/terminal/adapters/vscode.ts +21 -28
- package/src/terminal/manager.ts +27 -22
- package/src/terminal/pool.ts +24 -27
- package/src/terminal/session.ts +18 -18
- package/src/terminal/vscode-bridge.ts +21 -21
- package/src/tests/validation-consistency.test.ts +4 -4
- package/src/types/cliffy.d.ts +11 -14
- package/src/types/global.d.ts +1 -2
- package/src/types/index.ts +2 -2
- package/src/types/mcp.d.ts +11 -17
- package/src/types/vscode.d.ts +18 -5
- package/src/ui/console/README-analysis-tools.md +52 -2
- package/src/ui/console/README.md +33 -1
- package/src/ui/console/WORKFLOW_DESIGNER_README.md +81 -22
- package/src/ui/console/analysis-tools.html +282 -261
- package/src/ui/console/analytics.html +329 -326
- package/src/ui/console/index.html +221 -209
- package/src/ui/console/js/analysis-tools.js +815 -754
- package/src/ui/console/js/command-handler.js +226 -196
- package/src/ui/console/js/console.js +117 -119
- package/src/ui/console/js/daa-tools.js +797 -787
- package/src/ui/console/js/memory-interface.js +676 -638
- package/src/ui/console/js/memory-test.js +49 -46
- package/src/ui/console/js/memory-tools.js +181 -159
- package/src/ui/console/js/settings.js +124 -103
- package/src/ui/console/js/terminal-emulator.js +147 -130
- package/src/ui/console/js/websocket-client.js +71 -71
- package/src/ui/console/js/workflow-designer.js +1126 -1110
- package/src/ui/console/neural-networks-demo.md +45 -16
- package/src/ui/console/styles/analysis-tools.css +571 -561
- package/src/ui/console/styles/console.css +16 -12
- package/src/ui/console/styles/daa-tools.css +322 -319
- package/src/ui/console/styles/responsive.css +71 -70
- package/src/ui/console/styles/settings.css +12 -12
- package/src/ui/console/styles/workflow-designer.css +628 -584
- package/src/ui/console/test-neural-networks.js +59 -54
- package/src/ui/console/test-neural.html +194 -196
- package/src/ui/console/workflow-designer-demo.html +433 -424
- package/src/ui/hive-dashboard.ts +74 -52
- package/src/ui/web-ui/EnhancedProcessUI.js +570 -424
- package/src/ui/web-ui/EnhancedWebUI.js +65 -65
- package/src/ui/web-ui/README.md +16 -16
- package/src/ui/web-ui/components/ComponentLibrary.js +173 -124
- package/src/ui/web-ui/core/EventBus.js +27 -25
- package/src/ui/web-ui/core/MCPIntegrationLayer.js +294 -108
- package/src/ui/web-ui/core/StateManager.js +43 -46
- package/src/ui/web-ui/core/UIManager.js +120 -70
- package/src/ui/web-ui/core/ViewManager.js +16 -19
- package/src/ui/web-ui/index.js +101 -48
- package/src/ui/web-ui/neural-panel-test.js +109 -108
- package/src/ui/web-ui/test-github-view.js +11 -12
- package/src/ui/web-ui/test-neural-panel.html +219 -205
- package/src/ui/web-ui/views/DAAView.js +88 -85
- package/src/ui/web-ui/views/GitHubIntegrationTest.js +42 -42
- package/src/ui/web-ui/views/GitHubIntegrationView.js +59 -53
- package/src/ui/web-ui/views/NeuralNetworkView.js +20 -21
- package/src/ui/web-ui/views/WorkflowAutomationView.js +31 -32
- package/src/utils/error-handler.js +1 -1
- package/src/utils/error-handler.ts +9 -5
- package/src/utils/errors.ts +20 -18
- package/src/utils/formatters.ts +6 -6
- package/src/utils/helpers.ts +53 -55
- package/src/utils/npx-isolated-cache.js +16 -16
- package/src/utils/paths.ts +9 -6
- package/src/utils/timezone-utils.js +16 -16
- package/src/utils/type-guards.ts +37 -26
- package/src/utils/types.ts +2 -2
package/src/mcp/mcp-server.js
CHANGED
|
@@ -22,31 +22,38 @@ class ClaudeFlowMCPServer {
|
|
|
22
22
|
// Use the same memory system that already works
|
|
23
23
|
this.capabilities = {
|
|
24
24
|
tools: {
|
|
25
|
-
listChanged: true
|
|
25
|
+
listChanged: true,
|
|
26
26
|
},
|
|
27
27
|
resources: {
|
|
28
28
|
subscribe: true,
|
|
29
|
-
listChanged: true
|
|
30
|
-
}
|
|
29
|
+
listChanged: true,
|
|
30
|
+
},
|
|
31
31
|
};
|
|
32
32
|
this.sessionId = `session-cf-${Date.now()}-${Math.random().toString(36).substr(2, 4)}`;
|
|
33
33
|
this.tools = this.initializeTools();
|
|
34
34
|
this.resources = this.initializeResources();
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
// Initialize shared memory store (same as npx commands)
|
|
37
|
-
this.initializeMemory().catch(err => {
|
|
38
|
-
console.error(
|
|
37
|
+
this.initializeMemory().catch((err) => {
|
|
38
|
+
console.error(
|
|
39
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to initialize shared memory:`,
|
|
40
|
+
err,
|
|
41
|
+
);
|
|
39
42
|
});
|
|
40
|
-
|
|
43
|
+
|
|
41
44
|
// Database operations now use the same shared memory store as npx commands
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
|
|
44
47
|
async initializeMemory() {
|
|
45
48
|
await this.memoryStore.initialize();
|
|
46
|
-
console.error(
|
|
47
|
-
|
|
49
|
+
console.error(
|
|
50
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${this.sessionId}) Shared memory store initialized (same as npx)`,
|
|
51
|
+
);
|
|
52
|
+
console.error(
|
|
53
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${this.sessionId}) Using ${this.memoryStore.isUsingFallback() ? 'in-memory' : 'SQLite'} storage`,
|
|
54
|
+
);
|
|
48
55
|
}
|
|
49
|
-
|
|
56
|
+
|
|
50
57
|
// Database operations now use the same memory store as working npx commands
|
|
51
58
|
|
|
52
59
|
initializeTools() {
|
|
@@ -60,10 +67,10 @@ class ClaudeFlowMCPServer {
|
|
|
60
67
|
properties: {
|
|
61
68
|
topology: { type: 'string', enum: ['hierarchical', 'mesh', 'ring', 'star'] },
|
|
62
69
|
maxAgents: { type: 'number', default: 8 },
|
|
63
|
-
strategy: { type: 'string', default: 'auto' }
|
|
70
|
+
strategy: { type: 'string', default: 'auto' },
|
|
64
71
|
},
|
|
65
|
-
required: ['topology']
|
|
66
|
-
}
|
|
72
|
+
required: ['topology'],
|
|
73
|
+
},
|
|
67
74
|
},
|
|
68
75
|
agent_spawn: {
|
|
69
76
|
name: 'agent_spawn',
|
|
@@ -71,13 +78,28 @@ class ClaudeFlowMCPServer {
|
|
|
71
78
|
inputSchema: {
|
|
72
79
|
type: 'object',
|
|
73
80
|
properties: {
|
|
74
|
-
type: {
|
|
81
|
+
type: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
enum: [
|
|
84
|
+
'coordinator',
|
|
85
|
+
'researcher',
|
|
86
|
+
'coder',
|
|
87
|
+
'analyst',
|
|
88
|
+
'architect',
|
|
89
|
+
'tester',
|
|
90
|
+
'reviewer',
|
|
91
|
+
'optimizer',
|
|
92
|
+
'documenter',
|
|
93
|
+
'monitor',
|
|
94
|
+
'specialist',
|
|
95
|
+
],
|
|
96
|
+
},
|
|
75
97
|
name: { type: 'string' },
|
|
76
98
|
capabilities: { type: 'array' },
|
|
77
|
-
swarmId: { type: 'string' }
|
|
99
|
+
swarmId: { type: 'string' },
|
|
78
100
|
},
|
|
79
|
-
required: ['type']
|
|
80
|
-
}
|
|
101
|
+
required: ['type'],
|
|
102
|
+
},
|
|
81
103
|
},
|
|
82
104
|
task_orchestrate: {
|
|
83
105
|
name: 'task_orchestrate',
|
|
@@ -88,10 +110,10 @@ class ClaudeFlowMCPServer {
|
|
|
88
110
|
task: { type: 'string' },
|
|
89
111
|
strategy: { type: 'string', enum: ['parallel', 'sequential', 'adaptive', 'balanced'] },
|
|
90
112
|
priority: { type: 'string', enum: ['low', 'medium', 'high', 'critical'] },
|
|
91
|
-
dependencies: { type: 'array' }
|
|
113
|
+
dependencies: { type: 'array' },
|
|
92
114
|
},
|
|
93
|
-
required: ['task']
|
|
94
|
-
}
|
|
115
|
+
required: ['task'],
|
|
116
|
+
},
|
|
95
117
|
},
|
|
96
118
|
swarm_status: {
|
|
97
119
|
name: 'swarm_status',
|
|
@@ -99,11 +121,11 @@ class ClaudeFlowMCPServer {
|
|
|
99
121
|
inputSchema: {
|
|
100
122
|
type: 'object',
|
|
101
123
|
properties: {
|
|
102
|
-
swarmId: { type: 'string' }
|
|
103
|
-
}
|
|
104
|
-
}
|
|
124
|
+
swarmId: { type: 'string' },
|
|
125
|
+
},
|
|
126
|
+
},
|
|
105
127
|
},
|
|
106
|
-
|
|
128
|
+
|
|
107
129
|
// Neural Network Tools (15)
|
|
108
130
|
neural_status: {
|
|
109
131
|
name: 'neural_status',
|
|
@@ -111,9 +133,9 @@ class ClaudeFlowMCPServer {
|
|
|
111
133
|
inputSchema: {
|
|
112
134
|
type: 'object',
|
|
113
135
|
properties: {
|
|
114
|
-
modelId: { type: 'string' }
|
|
115
|
-
}
|
|
116
|
-
}
|
|
136
|
+
modelId: { type: 'string' },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
117
139
|
},
|
|
118
140
|
neural_train: {
|
|
119
141
|
name: 'neural_train',
|
|
@@ -123,10 +145,10 @@ class ClaudeFlowMCPServer {
|
|
|
123
145
|
properties: {
|
|
124
146
|
pattern_type: { type: 'string', enum: ['coordination', 'optimization', 'prediction'] },
|
|
125
147
|
training_data: { type: 'string' },
|
|
126
|
-
epochs: { type: 'number', default: 50 }
|
|
148
|
+
epochs: { type: 'number', default: 50 },
|
|
127
149
|
},
|
|
128
|
-
required: ['pattern_type', 'training_data']
|
|
129
|
-
}
|
|
150
|
+
required: ['pattern_type', 'training_data'],
|
|
151
|
+
},
|
|
130
152
|
},
|
|
131
153
|
neural_patterns: {
|
|
132
154
|
name: 'neural_patterns',
|
|
@@ -137,12 +159,12 @@ class ClaudeFlowMCPServer {
|
|
|
137
159
|
action: { type: 'string', enum: ['analyze', 'learn', 'predict'] },
|
|
138
160
|
operation: { type: 'string' },
|
|
139
161
|
outcome: { type: 'string' },
|
|
140
|
-
metadata: { type: 'object' }
|
|
162
|
+
metadata: { type: 'object' },
|
|
141
163
|
},
|
|
142
|
-
required: ['action']
|
|
143
|
-
}
|
|
164
|
+
required: ['action'],
|
|
165
|
+
},
|
|
144
166
|
},
|
|
145
|
-
|
|
167
|
+
|
|
146
168
|
// Memory & Persistence Tools (12)
|
|
147
169
|
memory_usage: {
|
|
148
170
|
name: 'memory_usage',
|
|
@@ -154,10 +176,10 @@ class ClaudeFlowMCPServer {
|
|
|
154
176
|
key: { type: 'string' },
|
|
155
177
|
value: { type: 'string' },
|
|
156
178
|
namespace: { type: 'string', default: 'default' },
|
|
157
|
-
ttl: { type: 'number' }
|
|
179
|
+
ttl: { type: 'number' },
|
|
158
180
|
},
|
|
159
|
-
required: ['action']
|
|
160
|
-
}
|
|
181
|
+
required: ['action'],
|
|
182
|
+
},
|
|
161
183
|
},
|
|
162
184
|
memory_search: {
|
|
163
185
|
name: 'memory_search',
|
|
@@ -167,12 +189,12 @@ class ClaudeFlowMCPServer {
|
|
|
167
189
|
properties: {
|
|
168
190
|
pattern: { type: 'string' },
|
|
169
191
|
namespace: { type: 'string' },
|
|
170
|
-
limit: { type: 'number', default: 10 }
|
|
192
|
+
limit: { type: 'number', default: 10 },
|
|
171
193
|
},
|
|
172
|
-
required: ['pattern']
|
|
173
|
-
}
|
|
194
|
+
required: ['pattern'],
|
|
195
|
+
},
|
|
174
196
|
},
|
|
175
|
-
|
|
197
|
+
|
|
176
198
|
// Analysis & Monitoring Tools (13)
|
|
177
199
|
performance_report: {
|
|
178
200
|
name: 'performance_report',
|
|
@@ -181,9 +203,9 @@ class ClaudeFlowMCPServer {
|
|
|
181
203
|
type: 'object',
|
|
182
204
|
properties: {
|
|
183
205
|
timeframe: { type: 'string', enum: ['24h', '7d', '30d'], default: '24h' },
|
|
184
|
-
format: { type: 'string', enum: ['summary', 'detailed', 'json'], default: 'summary' }
|
|
185
|
-
}
|
|
186
|
-
}
|
|
206
|
+
format: { type: 'string', enum: ['summary', 'detailed', 'json'], default: 'summary' },
|
|
207
|
+
},
|
|
208
|
+
},
|
|
187
209
|
},
|
|
188
210
|
bottleneck_analyze: {
|
|
189
211
|
name: 'bottleneck_analyze',
|
|
@@ -192,9 +214,9 @@ class ClaudeFlowMCPServer {
|
|
|
192
214
|
type: 'object',
|
|
193
215
|
properties: {
|
|
194
216
|
component: { type: 'string' },
|
|
195
|
-
metrics: { type: 'array' }
|
|
196
|
-
}
|
|
197
|
-
}
|
|
217
|
+
metrics: { type: 'array' },
|
|
218
|
+
},
|
|
219
|
+
},
|
|
198
220
|
},
|
|
199
221
|
token_usage: {
|
|
200
222
|
name: 'token_usage',
|
|
@@ -203,11 +225,11 @@ class ClaudeFlowMCPServer {
|
|
|
203
225
|
type: 'object',
|
|
204
226
|
properties: {
|
|
205
227
|
operation: { type: 'string' },
|
|
206
|
-
timeframe: { type: 'string', default: '24h' }
|
|
207
|
-
}
|
|
208
|
-
}
|
|
228
|
+
timeframe: { type: 'string', default: '24h' },
|
|
229
|
+
},
|
|
230
|
+
},
|
|
209
231
|
},
|
|
210
|
-
|
|
232
|
+
|
|
211
233
|
// GitHub Integration Tools (8)
|
|
212
234
|
github_repo_analyze: {
|
|
213
235
|
name: 'github_repo_analyze',
|
|
@@ -216,10 +238,10 @@ class ClaudeFlowMCPServer {
|
|
|
216
238
|
type: 'object',
|
|
217
239
|
properties: {
|
|
218
240
|
repo: { type: 'string' },
|
|
219
|
-
analysis_type: { type: 'string', enum: ['code_quality', 'performance', 'security'] }
|
|
241
|
+
analysis_type: { type: 'string', enum: ['code_quality', 'performance', 'security'] },
|
|
220
242
|
},
|
|
221
|
-
required: ['repo']
|
|
222
|
-
}
|
|
243
|
+
required: ['repo'],
|
|
244
|
+
},
|
|
223
245
|
},
|
|
224
246
|
github_pr_manage: {
|
|
225
247
|
name: 'github_pr_manage',
|
|
@@ -229,12 +251,12 @@ class ClaudeFlowMCPServer {
|
|
|
229
251
|
properties: {
|
|
230
252
|
repo: { type: 'string' },
|
|
231
253
|
pr_number: { type: 'number' },
|
|
232
|
-
action: { type: 'string', enum: ['review', 'merge', 'close'] }
|
|
254
|
+
action: { type: 'string', enum: ['review', 'merge', 'close'] },
|
|
233
255
|
},
|
|
234
|
-
required: ['repo', 'action']
|
|
235
|
-
}
|
|
256
|
+
required: ['repo', 'action'],
|
|
257
|
+
},
|
|
236
258
|
},
|
|
237
|
-
|
|
259
|
+
|
|
238
260
|
// DAA Tools (8)
|
|
239
261
|
daa_agent_create: {
|
|
240
262
|
name: 'daa_agent_create',
|
|
@@ -244,10 +266,10 @@ class ClaudeFlowMCPServer {
|
|
|
244
266
|
properties: {
|
|
245
267
|
agent_type: { type: 'string' },
|
|
246
268
|
capabilities: { type: 'array' },
|
|
247
|
-
resources: { type: 'object' }
|
|
269
|
+
resources: { type: 'object' },
|
|
248
270
|
},
|
|
249
|
-
required: ['agent_type']
|
|
250
|
-
}
|
|
271
|
+
required: ['agent_type'],
|
|
272
|
+
},
|
|
251
273
|
},
|
|
252
274
|
daa_capability_match: {
|
|
253
275
|
name: 'daa_capability_match',
|
|
@@ -256,12 +278,12 @@ class ClaudeFlowMCPServer {
|
|
|
256
278
|
type: 'object',
|
|
257
279
|
properties: {
|
|
258
280
|
task_requirements: { type: 'array' },
|
|
259
|
-
available_agents: { type: 'array' }
|
|
281
|
+
available_agents: { type: 'array' },
|
|
260
282
|
},
|
|
261
|
-
required: ['task_requirements']
|
|
262
|
-
}
|
|
283
|
+
required: ['task_requirements'],
|
|
284
|
+
},
|
|
263
285
|
},
|
|
264
|
-
|
|
286
|
+
|
|
265
287
|
// Workflow Tools (11)
|
|
266
288
|
workflow_create: {
|
|
267
289
|
name: 'workflow_create',
|
|
@@ -271,10 +293,10 @@ class ClaudeFlowMCPServer {
|
|
|
271
293
|
properties: {
|
|
272
294
|
name: { type: 'string' },
|
|
273
295
|
steps: { type: 'array' },
|
|
274
|
-
triggers: { type: 'array' }
|
|
296
|
+
triggers: { type: 'array' },
|
|
275
297
|
},
|
|
276
|
-
required: ['name', 'steps']
|
|
277
|
-
}
|
|
298
|
+
required: ['name', 'steps'],
|
|
299
|
+
},
|
|
278
300
|
},
|
|
279
301
|
sparc_mode: {
|
|
280
302
|
name: 'sparc_mode',
|
|
@@ -284,372 +306,576 @@ class ClaudeFlowMCPServer {
|
|
|
284
306
|
properties: {
|
|
285
307
|
mode: { type: 'string', enum: ['dev', 'api', 'ui', 'test', 'refactor'] },
|
|
286
308
|
task_description: { type: 'string' },
|
|
287
|
-
options: { type: 'object' }
|
|
309
|
+
options: { type: 'object' },
|
|
288
310
|
},
|
|
289
|
-
required: ['mode', 'task_description']
|
|
290
|
-
}
|
|
311
|
+
required: ['mode', 'task_description'],
|
|
312
|
+
},
|
|
291
313
|
},
|
|
292
314
|
|
|
293
315
|
// Additional Swarm Tools
|
|
294
316
|
agent_list: {
|
|
295
317
|
name: 'agent_list',
|
|
296
318
|
description: 'List active agents & capabilities',
|
|
297
|
-
inputSchema: { type: 'object', properties: { swarmId: { type: 'string' } } }
|
|
319
|
+
inputSchema: { type: 'object', properties: { swarmId: { type: 'string' } } },
|
|
298
320
|
},
|
|
299
321
|
agent_metrics: {
|
|
300
322
|
name: 'agent_metrics',
|
|
301
323
|
description: 'Agent performance metrics',
|
|
302
|
-
inputSchema: { type: 'object', properties: { agentId: { type: 'string' } } }
|
|
324
|
+
inputSchema: { type: 'object', properties: { agentId: { type: 'string' } } },
|
|
303
325
|
},
|
|
304
326
|
swarm_monitor: {
|
|
305
327
|
name: 'swarm_monitor',
|
|
306
328
|
description: 'Real-time swarm monitoring',
|
|
307
|
-
inputSchema: {
|
|
329
|
+
inputSchema: {
|
|
330
|
+
type: 'object',
|
|
331
|
+
properties: { swarmId: { type: 'string' }, interval: { type: 'number' } },
|
|
332
|
+
},
|
|
308
333
|
},
|
|
309
334
|
topology_optimize: {
|
|
310
335
|
name: 'topology_optimize',
|
|
311
336
|
description: 'Auto-optimize swarm topology',
|
|
312
|
-
inputSchema: { type: 'object', properties: { swarmId: { type: 'string' } } }
|
|
337
|
+
inputSchema: { type: 'object', properties: { swarmId: { type: 'string' } } },
|
|
313
338
|
},
|
|
314
339
|
load_balance: {
|
|
315
340
|
name: 'load_balance',
|
|
316
341
|
description: 'Distribute tasks efficiently',
|
|
317
|
-
inputSchema: {
|
|
342
|
+
inputSchema: {
|
|
343
|
+
type: 'object',
|
|
344
|
+
properties: { swarmId: { type: 'string' }, tasks: { type: 'array' } },
|
|
345
|
+
},
|
|
318
346
|
},
|
|
319
347
|
coordination_sync: {
|
|
320
348
|
name: 'coordination_sync',
|
|
321
349
|
description: 'Sync agent coordination',
|
|
322
|
-
inputSchema: { type: 'object', properties: { swarmId: { type: 'string' } } }
|
|
350
|
+
inputSchema: { type: 'object', properties: { swarmId: { type: 'string' } } },
|
|
323
351
|
},
|
|
324
352
|
swarm_scale: {
|
|
325
353
|
name: 'swarm_scale',
|
|
326
354
|
description: 'Auto-scale agent count',
|
|
327
|
-
inputSchema: {
|
|
355
|
+
inputSchema: {
|
|
356
|
+
type: 'object',
|
|
357
|
+
properties: { swarmId: { type: 'string' }, targetSize: { type: 'number' } },
|
|
358
|
+
},
|
|
328
359
|
},
|
|
329
360
|
swarm_destroy: {
|
|
330
361
|
name: 'swarm_destroy',
|
|
331
362
|
description: 'Gracefully shutdown swarm',
|
|
332
|
-
inputSchema: {
|
|
363
|
+
inputSchema: {
|
|
364
|
+
type: 'object',
|
|
365
|
+
properties: { swarmId: { type: 'string' } },
|
|
366
|
+
required: ['swarmId'],
|
|
367
|
+
},
|
|
333
368
|
},
|
|
334
369
|
|
|
335
370
|
// Additional Neural Tools
|
|
336
371
|
neural_predict: {
|
|
337
372
|
name: 'neural_predict',
|
|
338
373
|
description: 'Make AI predictions',
|
|
339
|
-
inputSchema: {
|
|
374
|
+
inputSchema: {
|
|
375
|
+
type: 'object',
|
|
376
|
+
properties: { modelId: { type: 'string' }, input: { type: 'string' } },
|
|
377
|
+
required: ['modelId', 'input'],
|
|
378
|
+
},
|
|
340
379
|
},
|
|
341
380
|
model_load: {
|
|
342
381
|
name: 'model_load',
|
|
343
382
|
description: 'Load pre-trained models',
|
|
344
|
-
inputSchema: {
|
|
383
|
+
inputSchema: {
|
|
384
|
+
type: 'object',
|
|
385
|
+
properties: { modelPath: { type: 'string' } },
|
|
386
|
+
required: ['modelPath'],
|
|
387
|
+
},
|
|
345
388
|
},
|
|
346
389
|
model_save: {
|
|
347
390
|
name: 'model_save',
|
|
348
391
|
description: 'Save trained models',
|
|
349
|
-
inputSchema: {
|
|
392
|
+
inputSchema: {
|
|
393
|
+
type: 'object',
|
|
394
|
+
properties: { modelId: { type: 'string' }, path: { type: 'string' } },
|
|
395
|
+
required: ['modelId', 'path'],
|
|
396
|
+
},
|
|
350
397
|
},
|
|
351
398
|
wasm_optimize: {
|
|
352
399
|
name: 'wasm_optimize',
|
|
353
400
|
description: 'WASM SIMD optimization',
|
|
354
|
-
inputSchema: { type: 'object', properties: { operation: { type: 'string' } } }
|
|
401
|
+
inputSchema: { type: 'object', properties: { operation: { type: 'string' } } },
|
|
355
402
|
},
|
|
356
403
|
inference_run: {
|
|
357
404
|
name: 'inference_run',
|
|
358
405
|
description: 'Run neural inference',
|
|
359
|
-
inputSchema: {
|
|
406
|
+
inputSchema: {
|
|
407
|
+
type: 'object',
|
|
408
|
+
properties: { modelId: { type: 'string' }, data: { type: 'array' } },
|
|
409
|
+
required: ['modelId', 'data'],
|
|
410
|
+
},
|
|
360
411
|
},
|
|
361
412
|
pattern_recognize: {
|
|
362
413
|
name: 'pattern_recognize',
|
|
363
414
|
description: 'Pattern recognition',
|
|
364
|
-
inputSchema: {
|
|
415
|
+
inputSchema: {
|
|
416
|
+
type: 'object',
|
|
417
|
+
properties: { data: { type: 'array' }, patterns: { type: 'array' } },
|
|
418
|
+
required: ['data'],
|
|
419
|
+
},
|
|
365
420
|
},
|
|
366
421
|
cognitive_analyze: {
|
|
367
422
|
name: 'cognitive_analyze',
|
|
368
423
|
description: 'Cognitive behavior analysis',
|
|
369
|
-
inputSchema: {
|
|
424
|
+
inputSchema: {
|
|
425
|
+
type: 'object',
|
|
426
|
+
properties: { behavior: { type: 'string' } },
|
|
427
|
+
required: ['behavior'],
|
|
428
|
+
},
|
|
370
429
|
},
|
|
371
430
|
learning_adapt: {
|
|
372
431
|
name: 'learning_adapt',
|
|
373
432
|
description: 'Adaptive learning',
|
|
374
|
-
inputSchema: {
|
|
433
|
+
inputSchema: {
|
|
434
|
+
type: 'object',
|
|
435
|
+
properties: { experience: { type: 'object' } },
|
|
436
|
+
required: ['experience'],
|
|
437
|
+
},
|
|
375
438
|
},
|
|
376
439
|
neural_compress: {
|
|
377
440
|
name: 'neural_compress',
|
|
378
441
|
description: 'Compress neural models',
|
|
379
|
-
inputSchema: {
|
|
442
|
+
inputSchema: {
|
|
443
|
+
type: 'object',
|
|
444
|
+
properties: { modelId: { type: 'string' }, ratio: { type: 'number' } },
|
|
445
|
+
required: ['modelId'],
|
|
446
|
+
},
|
|
380
447
|
},
|
|
381
448
|
ensemble_create: {
|
|
382
449
|
name: 'ensemble_create',
|
|
383
450
|
description: 'Create model ensembles',
|
|
384
|
-
inputSchema: {
|
|
451
|
+
inputSchema: {
|
|
452
|
+
type: 'object',
|
|
453
|
+
properties: { models: { type: 'array' }, strategy: { type: 'string' } },
|
|
454
|
+
required: ['models'],
|
|
455
|
+
},
|
|
385
456
|
},
|
|
386
457
|
transfer_learn: {
|
|
387
458
|
name: 'transfer_learn',
|
|
388
459
|
description: 'Transfer learning',
|
|
389
|
-
inputSchema: {
|
|
460
|
+
inputSchema: {
|
|
461
|
+
type: 'object',
|
|
462
|
+
properties: { sourceModel: { type: 'string' }, targetDomain: { type: 'string' } },
|
|
463
|
+
required: ['sourceModel', 'targetDomain'],
|
|
464
|
+
},
|
|
390
465
|
},
|
|
391
466
|
neural_explain: {
|
|
392
467
|
name: 'neural_explain',
|
|
393
468
|
description: 'AI explainability',
|
|
394
|
-
inputSchema: {
|
|
469
|
+
inputSchema: {
|
|
470
|
+
type: 'object',
|
|
471
|
+
properties: { modelId: { type: 'string' }, prediction: { type: 'object' } },
|
|
472
|
+
required: ['modelId', 'prediction'],
|
|
473
|
+
},
|
|
395
474
|
},
|
|
396
475
|
|
|
397
476
|
// Additional Memory Tools
|
|
398
477
|
memory_persist: {
|
|
399
478
|
name: 'memory_persist',
|
|
400
479
|
description: 'Cross-session persistence',
|
|
401
|
-
inputSchema: { type: 'object', properties: { sessionId: { type: 'string' } } }
|
|
480
|
+
inputSchema: { type: 'object', properties: { sessionId: { type: 'string' } } },
|
|
402
481
|
},
|
|
403
482
|
memory_namespace: {
|
|
404
483
|
name: 'memory_namespace',
|
|
405
484
|
description: 'Namespace management',
|
|
406
|
-
inputSchema: {
|
|
485
|
+
inputSchema: {
|
|
486
|
+
type: 'object',
|
|
487
|
+
properties: { namespace: { type: 'string' }, action: { type: 'string' } },
|
|
488
|
+
required: ['namespace', 'action'],
|
|
489
|
+
},
|
|
407
490
|
},
|
|
408
491
|
memory_backup: {
|
|
409
492
|
name: 'memory_backup',
|
|
410
493
|
description: 'Backup memory stores',
|
|
411
|
-
inputSchema: { type: 'object', properties: { path: { type: 'string' } } }
|
|
494
|
+
inputSchema: { type: 'object', properties: { path: { type: 'string' } } },
|
|
412
495
|
},
|
|
413
496
|
memory_restore: {
|
|
414
497
|
name: 'memory_restore',
|
|
415
498
|
description: 'Restore from backups',
|
|
416
|
-
inputSchema: {
|
|
499
|
+
inputSchema: {
|
|
500
|
+
type: 'object',
|
|
501
|
+
properties: { backupPath: { type: 'string' } },
|
|
502
|
+
required: ['backupPath'],
|
|
503
|
+
},
|
|
417
504
|
},
|
|
418
505
|
memory_compress: {
|
|
419
506
|
name: 'memory_compress',
|
|
420
507
|
description: 'Compress memory data',
|
|
421
|
-
inputSchema: { type: 'object', properties: { namespace: { type: 'string' } } }
|
|
508
|
+
inputSchema: { type: 'object', properties: { namespace: { type: 'string' } } },
|
|
422
509
|
},
|
|
423
510
|
memory_sync: {
|
|
424
511
|
name: 'memory_sync',
|
|
425
512
|
description: 'Sync across instances',
|
|
426
|
-
inputSchema: {
|
|
513
|
+
inputSchema: {
|
|
514
|
+
type: 'object',
|
|
515
|
+
properties: { target: { type: 'string' } },
|
|
516
|
+
required: ['target'],
|
|
517
|
+
},
|
|
427
518
|
},
|
|
428
519
|
cache_manage: {
|
|
429
520
|
name: 'cache_manage',
|
|
430
521
|
description: 'Manage coordination cache',
|
|
431
|
-
inputSchema: {
|
|
522
|
+
inputSchema: {
|
|
523
|
+
type: 'object',
|
|
524
|
+
properties: { action: { type: 'string' }, key: { type: 'string' } },
|
|
525
|
+
required: ['action'],
|
|
526
|
+
},
|
|
432
527
|
},
|
|
433
528
|
state_snapshot: {
|
|
434
529
|
name: 'state_snapshot',
|
|
435
530
|
description: 'Create state snapshots',
|
|
436
|
-
inputSchema: { type: 'object', properties: { name: { type: 'string' } } }
|
|
531
|
+
inputSchema: { type: 'object', properties: { name: { type: 'string' } } },
|
|
437
532
|
},
|
|
438
533
|
context_restore: {
|
|
439
534
|
name: 'context_restore',
|
|
440
535
|
description: 'Restore execution context',
|
|
441
|
-
inputSchema: {
|
|
536
|
+
inputSchema: {
|
|
537
|
+
type: 'object',
|
|
538
|
+
properties: { snapshotId: { type: 'string' } },
|
|
539
|
+
required: ['snapshotId'],
|
|
540
|
+
},
|
|
442
541
|
},
|
|
443
542
|
memory_analytics: {
|
|
444
543
|
name: 'memory_analytics',
|
|
445
544
|
description: 'Analyze memory usage',
|
|
446
|
-
inputSchema: { type: 'object', properties: { timeframe: { type: 'string' } } }
|
|
545
|
+
inputSchema: { type: 'object', properties: { timeframe: { type: 'string' } } },
|
|
447
546
|
},
|
|
448
547
|
|
|
449
548
|
// Additional Analysis Tools
|
|
450
549
|
task_status: {
|
|
451
550
|
name: 'task_status',
|
|
452
551
|
description: 'Check task execution status',
|
|
453
|
-
inputSchema: {
|
|
552
|
+
inputSchema: {
|
|
553
|
+
type: 'object',
|
|
554
|
+
properties: { taskId: { type: 'string' } },
|
|
555
|
+
required: ['taskId'],
|
|
556
|
+
},
|
|
454
557
|
},
|
|
455
558
|
task_results: {
|
|
456
559
|
name: 'task_results',
|
|
457
560
|
description: 'Get task completion results',
|
|
458
|
-
inputSchema: {
|
|
561
|
+
inputSchema: {
|
|
562
|
+
type: 'object',
|
|
563
|
+
properties: { taskId: { type: 'string' } },
|
|
564
|
+
required: ['taskId'],
|
|
565
|
+
},
|
|
459
566
|
},
|
|
460
567
|
benchmark_run: {
|
|
461
568
|
name: 'benchmark_run',
|
|
462
569
|
description: 'Performance benchmarks',
|
|
463
|
-
inputSchema: { type: 'object', properties: { suite: { type: 'string' } } }
|
|
570
|
+
inputSchema: { type: 'object', properties: { suite: { type: 'string' } } },
|
|
464
571
|
},
|
|
465
572
|
metrics_collect: {
|
|
466
573
|
name: 'metrics_collect',
|
|
467
574
|
description: 'Collect system metrics',
|
|
468
|
-
inputSchema: { type: 'object', properties: { components: { type: 'array' } } }
|
|
575
|
+
inputSchema: { type: 'object', properties: { components: { type: 'array' } } },
|
|
469
576
|
},
|
|
470
577
|
trend_analysis: {
|
|
471
578
|
name: 'trend_analysis',
|
|
472
579
|
description: 'Analyze performance trends',
|
|
473
|
-
inputSchema: {
|
|
580
|
+
inputSchema: {
|
|
581
|
+
type: 'object',
|
|
582
|
+
properties: { metric: { type: 'string' }, period: { type: 'string' } },
|
|
583
|
+
required: ['metric'],
|
|
584
|
+
},
|
|
474
585
|
},
|
|
475
586
|
cost_analysis: {
|
|
476
587
|
name: 'cost_analysis',
|
|
477
588
|
description: 'Cost and resource analysis',
|
|
478
|
-
inputSchema: { type: 'object', properties: { timeframe: { type: 'string' } } }
|
|
589
|
+
inputSchema: { type: 'object', properties: { timeframe: { type: 'string' } } },
|
|
479
590
|
},
|
|
480
591
|
quality_assess: {
|
|
481
592
|
name: 'quality_assess',
|
|
482
593
|
description: 'Quality assessment',
|
|
483
|
-
inputSchema: {
|
|
594
|
+
inputSchema: {
|
|
595
|
+
type: 'object',
|
|
596
|
+
properties: { target: { type: 'string' }, criteria: { type: 'array' } },
|
|
597
|
+
required: ['target'],
|
|
598
|
+
},
|
|
484
599
|
},
|
|
485
600
|
error_analysis: {
|
|
486
601
|
name: 'error_analysis',
|
|
487
602
|
description: 'Error pattern analysis',
|
|
488
|
-
inputSchema: { type: 'object', properties: { logs: { type: 'array' } } }
|
|
603
|
+
inputSchema: { type: 'object', properties: { logs: { type: 'array' } } },
|
|
489
604
|
},
|
|
490
605
|
usage_stats: {
|
|
491
606
|
name: 'usage_stats',
|
|
492
607
|
description: 'Usage statistics',
|
|
493
|
-
inputSchema: { type: 'object', properties: { component: { type: 'string' } } }
|
|
608
|
+
inputSchema: { type: 'object', properties: { component: { type: 'string' } } },
|
|
494
609
|
},
|
|
495
610
|
health_check: {
|
|
496
611
|
name: 'health_check',
|
|
497
612
|
description: 'System health monitoring',
|
|
498
|
-
inputSchema: { type: 'object', properties: { components: { type: 'array' } } }
|
|
613
|
+
inputSchema: { type: 'object', properties: { components: { type: 'array' } } },
|
|
499
614
|
},
|
|
500
615
|
|
|
501
616
|
// Additional Workflow Tools
|
|
502
617
|
workflow_execute: {
|
|
503
618
|
name: 'workflow_execute',
|
|
504
619
|
description: 'Execute predefined workflows',
|
|
505
|
-
inputSchema: {
|
|
620
|
+
inputSchema: {
|
|
621
|
+
type: 'object',
|
|
622
|
+
properties: { workflowId: { type: 'string' }, params: { type: 'object' } },
|
|
623
|
+
required: ['workflowId'],
|
|
624
|
+
},
|
|
506
625
|
},
|
|
507
626
|
workflow_export: {
|
|
508
627
|
name: 'workflow_export',
|
|
509
628
|
description: 'Export workflow definitions',
|
|
510
|
-
inputSchema: {
|
|
629
|
+
inputSchema: {
|
|
630
|
+
type: 'object',
|
|
631
|
+
properties: { workflowId: { type: 'string' }, format: { type: 'string' } },
|
|
632
|
+
required: ['workflowId'],
|
|
633
|
+
},
|
|
511
634
|
},
|
|
512
635
|
automation_setup: {
|
|
513
636
|
name: 'automation_setup',
|
|
514
637
|
description: 'Setup automation rules',
|
|
515
|
-
inputSchema: {
|
|
638
|
+
inputSchema: {
|
|
639
|
+
type: 'object',
|
|
640
|
+
properties: { rules: { type: 'array' } },
|
|
641
|
+
required: ['rules'],
|
|
642
|
+
},
|
|
516
643
|
},
|
|
517
644
|
pipeline_create: {
|
|
518
645
|
name: 'pipeline_create',
|
|
519
646
|
description: 'Create CI/CD pipelines',
|
|
520
|
-
inputSchema: {
|
|
647
|
+
inputSchema: {
|
|
648
|
+
type: 'object',
|
|
649
|
+
properties: { config: { type: 'object' } },
|
|
650
|
+
required: ['config'],
|
|
651
|
+
},
|
|
521
652
|
},
|
|
522
653
|
scheduler_manage: {
|
|
523
654
|
name: 'scheduler_manage',
|
|
524
655
|
description: 'Manage task scheduling',
|
|
525
|
-
inputSchema: {
|
|
656
|
+
inputSchema: {
|
|
657
|
+
type: 'object',
|
|
658
|
+
properties: { action: { type: 'string' }, schedule: { type: 'object' } },
|
|
659
|
+
required: ['action'],
|
|
660
|
+
},
|
|
526
661
|
},
|
|
527
662
|
trigger_setup: {
|
|
528
663
|
name: 'trigger_setup',
|
|
529
664
|
description: 'Setup event triggers',
|
|
530
|
-
inputSchema: {
|
|
665
|
+
inputSchema: {
|
|
666
|
+
type: 'object',
|
|
667
|
+
properties: { events: { type: 'array' }, actions: { type: 'array' } },
|
|
668
|
+
required: ['events', 'actions'],
|
|
669
|
+
},
|
|
531
670
|
},
|
|
532
671
|
workflow_template: {
|
|
533
672
|
name: 'workflow_template',
|
|
534
673
|
description: 'Manage workflow templates',
|
|
535
|
-
inputSchema: {
|
|
674
|
+
inputSchema: {
|
|
675
|
+
type: 'object',
|
|
676
|
+
properties: { action: { type: 'string' }, template: { type: 'object' } },
|
|
677
|
+
required: ['action'],
|
|
678
|
+
},
|
|
536
679
|
},
|
|
537
680
|
batch_process: {
|
|
538
681
|
name: 'batch_process',
|
|
539
682
|
description: 'Batch processing',
|
|
540
|
-
inputSchema: {
|
|
683
|
+
inputSchema: {
|
|
684
|
+
type: 'object',
|
|
685
|
+
properties: { items: { type: 'array' }, operation: { type: 'string' } },
|
|
686
|
+
required: ['items', 'operation'],
|
|
687
|
+
},
|
|
541
688
|
},
|
|
542
689
|
parallel_execute: {
|
|
543
690
|
name: 'parallel_execute',
|
|
544
691
|
description: 'Execute tasks in parallel',
|
|
545
|
-
inputSchema: {
|
|
692
|
+
inputSchema: {
|
|
693
|
+
type: 'object',
|
|
694
|
+
properties: { tasks: { type: 'array' } },
|
|
695
|
+
required: ['tasks'],
|
|
696
|
+
},
|
|
546
697
|
},
|
|
547
698
|
|
|
548
699
|
// GitHub Integration Tools
|
|
549
700
|
github_issue_track: {
|
|
550
701
|
name: 'github_issue_track',
|
|
551
702
|
description: 'Issue tracking & triage',
|
|
552
|
-
inputSchema: {
|
|
703
|
+
inputSchema: {
|
|
704
|
+
type: 'object',
|
|
705
|
+
properties: { repo: { type: 'string' }, action: { type: 'string' } },
|
|
706
|
+
required: ['repo', 'action'],
|
|
707
|
+
},
|
|
553
708
|
},
|
|
554
709
|
github_release_coord: {
|
|
555
710
|
name: 'github_release_coord',
|
|
556
711
|
description: 'Release coordination',
|
|
557
|
-
inputSchema: {
|
|
712
|
+
inputSchema: {
|
|
713
|
+
type: 'object',
|
|
714
|
+
properties: { repo: { type: 'string' }, version: { type: 'string' } },
|
|
715
|
+
required: ['repo', 'version'],
|
|
716
|
+
},
|
|
558
717
|
},
|
|
559
718
|
github_workflow_auto: {
|
|
560
719
|
name: 'github_workflow_auto',
|
|
561
720
|
description: 'Workflow automation',
|
|
562
|
-
inputSchema: {
|
|
721
|
+
inputSchema: {
|
|
722
|
+
type: 'object',
|
|
723
|
+
properties: { repo: { type: 'string' }, workflow: { type: 'object' } },
|
|
724
|
+
required: ['repo', 'workflow'],
|
|
725
|
+
},
|
|
563
726
|
},
|
|
564
727
|
github_code_review: {
|
|
565
728
|
name: 'github_code_review',
|
|
566
729
|
description: 'Automated code review',
|
|
567
|
-
inputSchema: {
|
|
730
|
+
inputSchema: {
|
|
731
|
+
type: 'object',
|
|
732
|
+
properties: { repo: { type: 'string' }, pr: { type: 'number' } },
|
|
733
|
+
required: ['repo', 'pr'],
|
|
734
|
+
},
|
|
568
735
|
},
|
|
569
736
|
github_sync_coord: {
|
|
570
737
|
name: 'github_sync_coord',
|
|
571
738
|
description: 'Multi-repo sync coordination',
|
|
572
|
-
inputSchema: {
|
|
739
|
+
inputSchema: {
|
|
740
|
+
type: 'object',
|
|
741
|
+
properties: { repos: { type: 'array' } },
|
|
742
|
+
required: ['repos'],
|
|
743
|
+
},
|
|
573
744
|
},
|
|
574
745
|
github_metrics: {
|
|
575
746
|
name: 'github_metrics',
|
|
576
747
|
description: 'Repository metrics',
|
|
577
|
-
inputSchema: {
|
|
748
|
+
inputSchema: {
|
|
749
|
+
type: 'object',
|
|
750
|
+
properties: { repo: { type: 'string' } },
|
|
751
|
+
required: ['repo'],
|
|
752
|
+
},
|
|
578
753
|
},
|
|
579
754
|
|
|
580
755
|
// Additional DAA Tools
|
|
581
756
|
daa_resource_alloc: {
|
|
582
757
|
name: 'daa_resource_alloc',
|
|
583
758
|
description: 'Resource allocation',
|
|
584
|
-
inputSchema: {
|
|
759
|
+
inputSchema: {
|
|
760
|
+
type: 'object',
|
|
761
|
+
properties: { resources: { type: 'object' }, agents: { type: 'array' } },
|
|
762
|
+
required: ['resources'],
|
|
763
|
+
},
|
|
585
764
|
},
|
|
586
765
|
daa_lifecycle_manage: {
|
|
587
766
|
name: 'daa_lifecycle_manage',
|
|
588
767
|
description: 'Agent lifecycle management',
|
|
589
|
-
inputSchema: {
|
|
768
|
+
inputSchema: {
|
|
769
|
+
type: 'object',
|
|
770
|
+
properties: { agentId: { type: 'string' }, action: { type: 'string' } },
|
|
771
|
+
required: ['agentId', 'action'],
|
|
772
|
+
},
|
|
590
773
|
},
|
|
591
774
|
daa_communication: {
|
|
592
775
|
name: 'daa_communication',
|
|
593
776
|
description: 'Inter-agent communication',
|
|
594
|
-
inputSchema: {
|
|
777
|
+
inputSchema: {
|
|
778
|
+
type: 'object',
|
|
779
|
+
properties: {
|
|
780
|
+
from: { type: 'string' },
|
|
781
|
+
to: { type: 'string' },
|
|
782
|
+
message: { type: 'object' },
|
|
783
|
+
},
|
|
784
|
+
required: ['from', 'to', 'message'],
|
|
785
|
+
},
|
|
595
786
|
},
|
|
596
787
|
daa_consensus: {
|
|
597
788
|
name: 'daa_consensus',
|
|
598
789
|
description: 'Consensus mechanisms',
|
|
599
|
-
inputSchema: {
|
|
790
|
+
inputSchema: {
|
|
791
|
+
type: 'object',
|
|
792
|
+
properties: { agents: { type: 'array' }, proposal: { type: 'object' } },
|
|
793
|
+
required: ['agents', 'proposal'],
|
|
794
|
+
},
|
|
600
795
|
},
|
|
601
796
|
daa_fault_tolerance: {
|
|
602
797
|
name: 'daa_fault_tolerance',
|
|
603
798
|
description: 'Fault tolerance & recovery',
|
|
604
|
-
inputSchema: {
|
|
799
|
+
inputSchema: {
|
|
800
|
+
type: 'object',
|
|
801
|
+
properties: { agentId: { type: 'string' }, strategy: { type: 'string' } },
|
|
802
|
+
required: ['agentId'],
|
|
803
|
+
},
|
|
605
804
|
},
|
|
606
805
|
daa_optimization: {
|
|
607
806
|
name: 'daa_optimization',
|
|
608
807
|
description: 'Performance optimization',
|
|
609
|
-
inputSchema: {
|
|
808
|
+
inputSchema: {
|
|
809
|
+
type: 'object',
|
|
810
|
+
properties: { target: { type: 'string' }, metrics: { type: 'array' } },
|
|
811
|
+
required: ['target'],
|
|
812
|
+
},
|
|
610
813
|
},
|
|
611
814
|
|
|
612
815
|
// System & Utilities Tools
|
|
613
816
|
terminal_execute: {
|
|
614
817
|
name: 'terminal_execute',
|
|
615
818
|
description: 'Execute terminal commands',
|
|
616
|
-
inputSchema: {
|
|
819
|
+
inputSchema: {
|
|
820
|
+
type: 'object',
|
|
821
|
+
properties: { command: { type: 'string' }, args: { type: 'array' } },
|
|
822
|
+
required: ['command'],
|
|
823
|
+
},
|
|
617
824
|
},
|
|
618
825
|
config_manage: {
|
|
619
826
|
name: 'config_manage',
|
|
620
827
|
description: 'Configuration management',
|
|
621
|
-
inputSchema: {
|
|
828
|
+
inputSchema: {
|
|
829
|
+
type: 'object',
|
|
830
|
+
properties: { action: { type: 'string' }, config: { type: 'object' } },
|
|
831
|
+
required: ['action'],
|
|
832
|
+
},
|
|
622
833
|
},
|
|
623
834
|
features_detect: {
|
|
624
835
|
name: 'features_detect',
|
|
625
836
|
description: 'Feature detection',
|
|
626
|
-
inputSchema: { type: 'object', properties: { component: { type: 'string' } } }
|
|
837
|
+
inputSchema: { type: 'object', properties: { component: { type: 'string' } } },
|
|
627
838
|
},
|
|
628
839
|
security_scan: {
|
|
629
840
|
name: 'security_scan',
|
|
630
841
|
description: 'Security scanning',
|
|
631
|
-
inputSchema: {
|
|
842
|
+
inputSchema: {
|
|
843
|
+
type: 'object',
|
|
844
|
+
properties: { target: { type: 'string' }, depth: { type: 'string' } },
|
|
845
|
+
required: ['target'],
|
|
846
|
+
},
|
|
632
847
|
},
|
|
633
848
|
backup_create: {
|
|
634
849
|
name: 'backup_create',
|
|
635
850
|
description: 'Create system backups',
|
|
636
|
-
inputSchema: {
|
|
851
|
+
inputSchema: {
|
|
852
|
+
type: 'object',
|
|
853
|
+
properties: { components: { type: 'array' }, destination: { type: 'string' } },
|
|
854
|
+
},
|
|
637
855
|
},
|
|
638
856
|
restore_system: {
|
|
639
857
|
name: 'restore_system',
|
|
640
858
|
description: 'System restoration',
|
|
641
|
-
inputSchema: {
|
|
859
|
+
inputSchema: {
|
|
860
|
+
type: 'object',
|
|
861
|
+
properties: { backupId: { type: 'string' } },
|
|
862
|
+
required: ['backupId'],
|
|
863
|
+
},
|
|
642
864
|
},
|
|
643
865
|
log_analysis: {
|
|
644
866
|
name: 'log_analysis',
|
|
645
867
|
description: 'Log analysis & insights',
|
|
646
|
-
inputSchema: {
|
|
868
|
+
inputSchema: {
|
|
869
|
+
type: 'object',
|
|
870
|
+
properties: { logFile: { type: 'string' }, patterns: { type: 'array' } },
|
|
871
|
+
required: ['logFile'],
|
|
872
|
+
},
|
|
647
873
|
},
|
|
648
874
|
diagnostic_run: {
|
|
649
875
|
name: 'diagnostic_run',
|
|
650
876
|
description: 'System diagnostics',
|
|
651
|
-
inputSchema: { type: 'object', properties: { components: { type: 'array' } } }
|
|
652
|
-
}
|
|
877
|
+
inputSchema: { type: 'object', properties: { components: { type: 'array' } } },
|
|
878
|
+
},
|
|
653
879
|
};
|
|
654
880
|
}
|
|
655
881
|
|
|
@@ -659,26 +885,26 @@ class ClaudeFlowMCPServer {
|
|
|
659
885
|
uri: 'claude-flow://swarms',
|
|
660
886
|
name: 'Active Swarms',
|
|
661
887
|
description: 'List of active swarm configurations and status',
|
|
662
|
-
mimeType: 'application/json'
|
|
888
|
+
mimeType: 'application/json',
|
|
663
889
|
},
|
|
664
890
|
'claude-flow://agents': {
|
|
665
891
|
uri: 'claude-flow://agents',
|
|
666
892
|
name: 'Agent Registry',
|
|
667
893
|
description: 'Registry of available agents and their capabilities',
|
|
668
|
-
mimeType: 'application/json'
|
|
894
|
+
mimeType: 'application/json',
|
|
669
895
|
},
|
|
670
896
|
'claude-flow://models': {
|
|
671
897
|
uri: 'claude-flow://models',
|
|
672
898
|
name: 'Neural Models',
|
|
673
899
|
description: 'Available neural network models and training status',
|
|
674
|
-
mimeType: 'application/json'
|
|
900
|
+
mimeType: 'application/json',
|
|
675
901
|
},
|
|
676
902
|
'claude-flow://performance': {
|
|
677
903
|
uri: 'claude-flow://performance',
|
|
678
904
|
name: 'Performance Metrics',
|
|
679
905
|
description: 'Real-time performance metrics and benchmarks',
|
|
680
|
-
mimeType: 'application/json'
|
|
681
|
-
}
|
|
906
|
+
mimeType: 'application/json',
|
|
907
|
+
},
|
|
682
908
|
};
|
|
683
909
|
}
|
|
684
910
|
|
|
@@ -706,8 +932,10 @@ class ClaudeFlowMCPServer {
|
|
|
706
932
|
}
|
|
707
933
|
|
|
708
934
|
handleInitialize(id, params) {
|
|
709
|
-
console.error(
|
|
710
|
-
|
|
935
|
+
console.error(
|
|
936
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${this.sessionId}) 🔌 Connection established: ${this.sessionId}`,
|
|
937
|
+
);
|
|
938
|
+
|
|
711
939
|
return {
|
|
712
940
|
jsonrpc: '2.0',
|
|
713
941
|
id,
|
|
@@ -716,9 +944,9 @@ class ClaudeFlowMCPServer {
|
|
|
716
944
|
capabilities: this.capabilities,
|
|
717
945
|
serverInfo: {
|
|
718
946
|
name: 'claude-flow',
|
|
719
|
-
version: this.version
|
|
720
|
-
}
|
|
721
|
-
}
|
|
947
|
+
version: this.version,
|
|
948
|
+
},
|
|
949
|
+
},
|
|
722
950
|
};
|
|
723
951
|
}
|
|
724
952
|
|
|
@@ -728,16 +956,18 @@ class ClaudeFlowMCPServer {
|
|
|
728
956
|
jsonrpc: '2.0',
|
|
729
957
|
id,
|
|
730
958
|
result: {
|
|
731
|
-
tools: toolsList
|
|
732
|
-
}
|
|
959
|
+
tools: toolsList,
|
|
960
|
+
},
|
|
733
961
|
};
|
|
734
962
|
}
|
|
735
963
|
|
|
736
964
|
async handleToolCall(id, params) {
|
|
737
965
|
const { name, arguments: args } = params;
|
|
738
|
-
|
|
739
|
-
console.error(
|
|
740
|
-
|
|
966
|
+
|
|
967
|
+
console.error(
|
|
968
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${this.sessionId}) 🔧 Tool called: ${name}`,
|
|
969
|
+
);
|
|
970
|
+
|
|
741
971
|
try {
|
|
742
972
|
const result = await this.executeTool(name, args);
|
|
743
973
|
return {
|
|
@@ -747,10 +977,10 @@ class ClaudeFlowMCPServer {
|
|
|
747
977
|
content: [
|
|
748
978
|
{
|
|
749
979
|
type: 'text',
|
|
750
|
-
text: JSON.stringify(result, null, 2)
|
|
751
|
-
}
|
|
752
|
-
]
|
|
753
|
-
}
|
|
980
|
+
text: JSON.stringify(result, null, 2),
|
|
981
|
+
},
|
|
982
|
+
],
|
|
983
|
+
},
|
|
754
984
|
};
|
|
755
985
|
} catch (error) {
|
|
756
986
|
return this.createErrorResponse(id, -32000, 'Tool execution failed', error.message);
|
|
@@ -763,14 +993,14 @@ class ClaudeFlowMCPServer {
|
|
|
763
993
|
jsonrpc: '2.0',
|
|
764
994
|
id,
|
|
765
995
|
result: {
|
|
766
|
-
resources: resourcesList
|
|
767
|
-
}
|
|
996
|
+
resources: resourcesList,
|
|
997
|
+
},
|
|
768
998
|
};
|
|
769
999
|
}
|
|
770
1000
|
|
|
771
1001
|
async handleResourceRead(id, params) {
|
|
772
1002
|
const { uri } = params;
|
|
773
|
-
|
|
1003
|
+
|
|
774
1004
|
try {
|
|
775
1005
|
const content = await this.readResource(uri);
|
|
776
1006
|
return {
|
|
@@ -781,10 +1011,10 @@ class ClaudeFlowMCPServer {
|
|
|
781
1011
|
{
|
|
782
1012
|
uri,
|
|
783
1013
|
mimeType: 'application/json',
|
|
784
|
-
text: JSON.stringify(content, null, 2)
|
|
785
|
-
}
|
|
786
|
-
]
|
|
787
|
-
}
|
|
1014
|
+
text: JSON.stringify(content, null, 2),
|
|
1015
|
+
},
|
|
1016
|
+
],
|
|
1017
|
+
},
|
|
788
1018
|
};
|
|
789
1019
|
} catch (error) {
|
|
790
1020
|
return this.createErrorResponse(id, -32000, 'Resource read failed', error.message);
|
|
@@ -807,25 +1037,30 @@ class ClaudeFlowMCPServer {
|
|
|
807
1037
|
config: JSON.stringify({
|
|
808
1038
|
strategy: args.strategy || 'auto',
|
|
809
1039
|
sessionId: this.sessionId,
|
|
810
|
-
createdBy: 'mcp-server'
|
|
811
|
-
})
|
|
1040
|
+
createdBy: 'mcp-server',
|
|
1041
|
+
}),
|
|
812
1042
|
};
|
|
813
|
-
|
|
1043
|
+
|
|
814
1044
|
// Store swarm data in memory store (same as npx commands)
|
|
815
1045
|
try {
|
|
816
1046
|
await this.memoryStore.store(`swarm:${swarmId}`, JSON.stringify(swarmData), {
|
|
817
1047
|
namespace: 'swarms',
|
|
818
|
-
metadata: { type: 'swarm_data', sessionId: this.sessionId }
|
|
1048
|
+
metadata: { type: 'swarm_data', sessionId: this.sessionId },
|
|
819
1049
|
});
|
|
820
1050
|
await this.memoryStore.store('active_swarm', swarmId, {
|
|
821
1051
|
namespace: 'system',
|
|
822
|
-
metadata: { type: 'active_swarm', sessionId: this.sessionId }
|
|
1052
|
+
metadata: { type: 'active_swarm', sessionId: this.sessionId },
|
|
823
1053
|
});
|
|
824
|
-
console.error(
|
|
1054
|
+
console.error(
|
|
1055
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Swarm persisted to memory: ${swarmId}`,
|
|
1056
|
+
);
|
|
825
1057
|
} catch (error) {
|
|
826
|
-
console.error(
|
|
1058
|
+
console.error(
|
|
1059
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to persist swarm:`,
|
|
1060
|
+
error,
|
|
1061
|
+
);
|
|
827
1062
|
}
|
|
828
|
-
|
|
1063
|
+
|
|
829
1064
|
return {
|
|
830
1065
|
success: true,
|
|
831
1066
|
swarmId: swarmId,
|
|
@@ -834,14 +1069,14 @@ class ClaudeFlowMCPServer {
|
|
|
834
1069
|
strategy: args.strategy || 'auto',
|
|
835
1070
|
status: 'initialized',
|
|
836
1071
|
persisted: !!this.databaseManager,
|
|
837
|
-
timestamp: new Date().toISOString()
|
|
1072
|
+
timestamp: new Date().toISOString(),
|
|
838
1073
|
};
|
|
839
1074
|
|
|
840
1075
|
case 'agent_spawn':
|
|
841
1076
|
const agentId = `agent_${Date.now()}_${Math.random().toString(36).substr(2, 6)}`;
|
|
842
1077
|
const agentData = {
|
|
843
1078
|
id: agentId,
|
|
844
|
-
swarmId: args.swarmId || await this.getActiveSwarmId(),
|
|
1079
|
+
swarmId: args.swarmId || (await this.getActiveSwarmId()),
|
|
845
1080
|
name: args.name || `${args.type}-${Date.now()}`,
|
|
846
1081
|
type: args.type,
|
|
847
1082
|
status: 'active',
|
|
@@ -849,30 +1084,35 @@ class ClaudeFlowMCPServer {
|
|
|
849
1084
|
metadata: JSON.stringify({
|
|
850
1085
|
sessionId: this.sessionId,
|
|
851
1086
|
createdBy: 'mcp-server',
|
|
852
|
-
spawnedAt: new Date().toISOString()
|
|
853
|
-
})
|
|
1087
|
+
spawnedAt: new Date().toISOString(),
|
|
1088
|
+
}),
|
|
854
1089
|
};
|
|
855
|
-
|
|
1090
|
+
|
|
856
1091
|
// Store agent data in memory store (same as npx commands)
|
|
857
1092
|
try {
|
|
858
|
-
const swarmId = agentData.swarmId || await this.getActiveSwarmId();
|
|
1093
|
+
const swarmId = agentData.swarmId || (await this.getActiveSwarmId());
|
|
859
1094
|
if (swarmId) {
|
|
860
1095
|
await this.memoryStore.store(`agent:${swarmId}:${agentId}`, JSON.stringify(agentData), {
|
|
861
1096
|
namespace: 'agents',
|
|
862
|
-
metadata: { type: 'agent_data', swarmId: swarmId, sessionId: this.sessionId }
|
|
1097
|
+
metadata: { type: 'agent_data', swarmId: swarmId, sessionId: this.sessionId },
|
|
863
1098
|
});
|
|
864
1099
|
} else {
|
|
865
1100
|
// Fallback to old format if no swarm ID
|
|
866
1101
|
await this.memoryStore.store(`agent:${agentId}`, JSON.stringify(agentData), {
|
|
867
1102
|
namespace: 'agents',
|
|
868
|
-
metadata: { type: 'agent_data', sessionId: this.sessionId }
|
|
1103
|
+
metadata: { type: 'agent_data', sessionId: this.sessionId },
|
|
869
1104
|
});
|
|
870
1105
|
}
|
|
871
|
-
console.error(
|
|
1106
|
+
console.error(
|
|
1107
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Agent persisted to memory: ${agentId}`,
|
|
1108
|
+
);
|
|
872
1109
|
} catch (error) {
|
|
873
|
-
console.error(
|
|
1110
|
+
console.error(
|
|
1111
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to persist agent:`,
|
|
1112
|
+
error,
|
|
1113
|
+
);
|
|
874
1114
|
}
|
|
875
|
-
|
|
1115
|
+
|
|
876
1116
|
return {
|
|
877
1117
|
success: true,
|
|
878
1118
|
agentId: agentId,
|
|
@@ -881,24 +1121,24 @@ class ClaudeFlowMCPServer {
|
|
|
881
1121
|
status: 'active',
|
|
882
1122
|
capabilities: args.capabilities || [],
|
|
883
1123
|
persisted: !!this.databaseManager,
|
|
884
|
-
timestamp: new Date().toISOString()
|
|
1124
|
+
timestamp: new Date().toISOString(),
|
|
885
1125
|
};
|
|
886
1126
|
|
|
887
1127
|
case 'neural_train':
|
|
888
1128
|
const epochs = args.epochs || 50;
|
|
889
1129
|
const baseAccuracy = 0.65;
|
|
890
1130
|
const maxAccuracy = 0.98;
|
|
891
|
-
|
|
1131
|
+
|
|
892
1132
|
// Realistic training progression: more epochs = better accuracy but with diminishing returns
|
|
893
1133
|
const epochFactor = Math.min(epochs / 100, 10); // Normalize epochs
|
|
894
1134
|
const accuracyGain = (maxAccuracy - baseAccuracy) * (1 - Math.exp(-epochFactor / 3));
|
|
895
1135
|
const finalAccuracy = baseAccuracy + accuracyGain + (Math.random() * 0.05 - 0.025); // Add some noise
|
|
896
|
-
|
|
1136
|
+
|
|
897
1137
|
// Training time increases with epochs but not linearly (parallel processing)
|
|
898
1138
|
const baseTime = 2;
|
|
899
1139
|
const timePerEpoch = 0.08;
|
|
900
|
-
const trainingTime = baseTime +
|
|
901
|
-
|
|
1140
|
+
const trainingTime = baseTime + epochs * timePerEpoch + (Math.random() * 2 - 1);
|
|
1141
|
+
|
|
902
1142
|
return {
|
|
903
1143
|
success: true,
|
|
904
1144
|
modelId: `model_${args.pattern_type || 'general'}_${Date.now()}`,
|
|
@@ -909,7 +1149,7 @@ class ClaudeFlowMCPServer {
|
|
|
909
1149
|
status: 'completed',
|
|
910
1150
|
improvement_rate: epochFactor > 1 ? 'converged' : 'improving',
|
|
911
1151
|
data_source: args.training_data || 'recent',
|
|
912
|
-
timestamp: new Date().toISOString()
|
|
1152
|
+
timestamp: new Date().toISOString(),
|
|
913
1153
|
};
|
|
914
1154
|
|
|
915
1155
|
case 'memory_usage':
|
|
@@ -926,9 +1166,9 @@ class ClaudeFlowMCPServer {
|
|
|
926
1166
|
avg_execution_time: Math.random() * 10 + 5,
|
|
927
1167
|
agents_spawned: Math.floor(Math.random() * 50) + 10,
|
|
928
1168
|
memory_efficiency: Math.random() * 0.3 + 0.7,
|
|
929
|
-
neural_events: Math.floor(Math.random() * 100) + 20
|
|
1169
|
+
neural_events: Math.floor(Math.random() * 100) + 20,
|
|
930
1170
|
},
|
|
931
|
-
timestamp: new Date().toISOString()
|
|
1171
|
+
timestamp: new Date().toISOString(),
|
|
932
1172
|
};
|
|
933
1173
|
|
|
934
1174
|
// Enhanced Neural Tools with Real Metrics
|
|
@@ -940,7 +1180,7 @@ class ClaudeFlowMCPServer {
|
|
|
940
1180
|
modelSize: `${Math.floor(Math.random() * 50 + 10)}MB`,
|
|
941
1181
|
version: `v${Math.floor(Math.random() * 10 + 1)}.${Math.floor(Math.random() * 20)}`,
|
|
942
1182
|
saved: true,
|
|
943
|
-
timestamp: new Date().toISOString()
|
|
1183
|
+
timestamp: new Date().toISOString(),
|
|
944
1184
|
};
|
|
945
1185
|
|
|
946
1186
|
case 'model_load':
|
|
@@ -953,7 +1193,7 @@ class ClaudeFlowMCPServer {
|
|
|
953
1193
|
parameters: Math.floor(Math.random() * 1000000 + 500000),
|
|
954
1194
|
accuracy: Math.random() * 0.15 + 0.85,
|
|
955
1195
|
loaded: true,
|
|
956
|
-
timestamp: new Date().toISOString()
|
|
1196
|
+
timestamp: new Date().toISOString(),
|
|
957
1197
|
};
|
|
958
1198
|
|
|
959
1199
|
case 'neural_predict':
|
|
@@ -965,10 +1205,10 @@ class ClaudeFlowMCPServer {
|
|
|
965
1205
|
outcome: Math.random() > 0.5 ? 'success' : 'optimization_needed',
|
|
966
1206
|
confidence: Math.random() * 0.3 + 0.7,
|
|
967
1207
|
alternatives: ['parallel_strategy', 'sequential_strategy', 'hybrid_strategy'],
|
|
968
|
-
recommended_action: 'proceed_with_coordination'
|
|
1208
|
+
recommended_action: 'proceed_with_coordination',
|
|
969
1209
|
},
|
|
970
1210
|
inference_time_ms: Math.floor(Math.random() * 200 + 50),
|
|
971
|
-
timestamp: new Date().toISOString()
|
|
1211
|
+
timestamp: new Date().toISOString(),
|
|
972
1212
|
};
|
|
973
1213
|
|
|
974
1214
|
case 'pattern_recognize':
|
|
@@ -978,16 +1218,16 @@ class ClaudeFlowMCPServer {
|
|
|
978
1218
|
patterns_detected: {
|
|
979
1219
|
coordination_patterns: Math.floor(Math.random() * 5 + 3),
|
|
980
1220
|
efficiency_patterns: Math.floor(Math.random() * 4 + 2),
|
|
981
|
-
success_indicators: Math.floor(Math.random() * 6 + 4)
|
|
1221
|
+
success_indicators: Math.floor(Math.random() * 6 + 4),
|
|
982
1222
|
},
|
|
983
1223
|
pattern_confidence: Math.random() * 0.2 + 0.8,
|
|
984
1224
|
recommendations: [
|
|
985
1225
|
'optimize_agent_distribution',
|
|
986
1226
|
'enhance_communication_channels',
|
|
987
|
-
'implement_predictive_scaling'
|
|
1227
|
+
'implement_predictive_scaling',
|
|
988
1228
|
],
|
|
989
1229
|
processing_time_ms: Math.floor(Math.random() * 100 + 25),
|
|
990
|
-
timestamp: new Date().toISOString()
|
|
1230
|
+
timestamp: new Date().toISOString(),
|
|
991
1231
|
};
|
|
992
1232
|
|
|
993
1233
|
case 'cognitive_analyze':
|
|
@@ -998,19 +1238,19 @@ class ClaudeFlowMCPServer {
|
|
|
998
1238
|
behavior_type: 'coordination_optimization',
|
|
999
1239
|
complexity_score: Math.random() * 10 + 1,
|
|
1000
1240
|
efficiency_rating: Math.random() * 5 + 3,
|
|
1001
|
-
improvement_potential: Math.random() * 100 + 20
|
|
1241
|
+
improvement_potential: Math.random() * 100 + 20,
|
|
1002
1242
|
},
|
|
1003
1243
|
insights: [
|
|
1004
1244
|
'Agent coordination shows high efficiency patterns',
|
|
1005
1245
|
'Task distribution demonstrates optimal load balancing',
|
|
1006
|
-
'Communication overhead is within acceptable parameters'
|
|
1246
|
+
'Communication overhead is within acceptable parameters',
|
|
1007
1247
|
],
|
|
1008
1248
|
neural_feedback: {
|
|
1009
1249
|
pattern_strength: Math.random() * 0.4 + 0.6,
|
|
1010
1250
|
learning_rate: Math.random() * 0.1 + 0.05,
|
|
1011
|
-
adaptation_score: Math.random() * 100 + 70
|
|
1251
|
+
adaptation_score: Math.random() * 100 + 70,
|
|
1012
1252
|
},
|
|
1013
|
-
timestamp: new Date().toISOString()
|
|
1253
|
+
timestamp: new Date().toISOString(),
|
|
1014
1254
|
};
|
|
1015
1255
|
|
|
1016
1256
|
case 'learning_adapt':
|
|
@@ -1022,19 +1262,19 @@ class ClaudeFlowMCPServer {
|
|
|
1022
1262
|
performance_delta: `+${Math.floor(Math.random() * 25 + 5)}%`,
|
|
1023
1263
|
training_samples: Math.floor(Math.random() * 500 + 100),
|
|
1024
1264
|
accuracy_improvement: `+${Math.floor(Math.random() * 10 + 2)}%`,
|
|
1025
|
-
confidence_increase: `+${Math.floor(Math.random() * 15 + 5)}
|
|
1265
|
+
confidence_increase: `+${Math.floor(Math.random() * 15 + 5)}%`,
|
|
1026
1266
|
},
|
|
1027
1267
|
learned_patterns: [
|
|
1028
1268
|
'coordination_efficiency_boost',
|
|
1029
1269
|
'agent_selection_optimization',
|
|
1030
|
-
'task_distribution_enhancement'
|
|
1270
|
+
'task_distribution_enhancement',
|
|
1031
1271
|
],
|
|
1032
1272
|
next_learning_targets: [
|
|
1033
1273
|
'memory_usage_optimization',
|
|
1034
1274
|
'communication_latency_reduction',
|
|
1035
|
-
'predictive_error_prevention'
|
|
1275
|
+
'predictive_error_prevention',
|
|
1036
1276
|
],
|
|
1037
|
-
timestamp: new Date().toISOString()
|
|
1277
|
+
timestamp: new Date().toISOString(),
|
|
1038
1278
|
};
|
|
1039
1279
|
|
|
1040
1280
|
case 'neural_compress':
|
|
@@ -1047,14 +1287,14 @@ class ClaudeFlowMCPServer {
|
|
|
1047
1287
|
compressed_size: `${Math.floor(Math.random() * 35 + 15)}MB`,
|
|
1048
1288
|
size_reduction: `${Math.floor((1 - (args.ratio || 0.7)) * 100)}%`,
|
|
1049
1289
|
accuracy_retention: `${Math.floor(Math.random() * 5 + 95)}%`,
|
|
1050
|
-
inference_speedup: `${Math.floor(Math.random() * 3 + 2)}x
|
|
1290
|
+
inference_speedup: `${Math.floor(Math.random() * 3 + 2)}x`,
|
|
1051
1291
|
},
|
|
1052
1292
|
optimization_details: {
|
|
1053
1293
|
pruned_connections: Math.floor(Math.random() * 10000 + 5000),
|
|
1054
1294
|
quantization_applied: true,
|
|
1055
|
-
wasm_optimized: true
|
|
1295
|
+
wasm_optimized: true,
|
|
1056
1296
|
},
|
|
1057
|
-
timestamp: new Date().toISOString()
|
|
1297
|
+
timestamp: new Date().toISOString(),
|
|
1058
1298
|
};
|
|
1059
1299
|
|
|
1060
1300
|
case 'ensemble_create':
|
|
@@ -1068,11 +1308,11 @@ class ClaudeFlowMCPServer {
|
|
|
1068
1308
|
combined_accuracy: Math.random() * 0.1 + 0.9,
|
|
1069
1309
|
inference_time: `${Math.floor(Math.random() * 300 + 100)}ms`,
|
|
1070
1310
|
memory_usage: `${Math.floor(Math.random() * 200 + 100)}MB`,
|
|
1071
|
-
consensus_threshold: 0.75
|
|
1311
|
+
consensus_threshold: 0.75,
|
|
1072
1312
|
},
|
|
1073
1313
|
model_weights: args.models.map(() => Math.random()),
|
|
1074
1314
|
performance_gain: `+${Math.floor(Math.random() * 15 + 10)}%`,
|
|
1075
|
-
timestamp: new Date().toISOString()
|
|
1315
|
+
timestamp: new Date().toISOString(),
|
|
1076
1316
|
};
|
|
1077
1317
|
|
|
1078
1318
|
case 'transfer_learn':
|
|
@@ -1084,20 +1324,20 @@ class ClaudeFlowMCPServer {
|
|
|
1084
1324
|
adaptation_rate: Math.random() * 0.3 + 0.7,
|
|
1085
1325
|
knowledge_retention: Math.random() * 0.2 + 0.8,
|
|
1086
1326
|
domain_fit_score: Math.random() * 0.25 + 0.75,
|
|
1087
|
-
training_reduction: `${Math.floor(Math.random() * 60 + 40)}
|
|
1327
|
+
training_reduction: `${Math.floor(Math.random() * 60 + 40)}%`,
|
|
1088
1328
|
},
|
|
1089
1329
|
transferred_features: [
|
|
1090
1330
|
'coordination_patterns',
|
|
1091
1331
|
'efficiency_heuristics',
|
|
1092
|
-
'optimization_strategies'
|
|
1332
|
+
'optimization_strategies',
|
|
1093
1333
|
],
|
|
1094
1334
|
new_model_id: `transferred_${Date.now()}`,
|
|
1095
1335
|
performance_metrics: {
|
|
1096
1336
|
accuracy: Math.random() * 0.15 + 0.85,
|
|
1097
1337
|
inference_speed: `${Math.floor(Math.random() * 150 + 50)}ms`,
|
|
1098
|
-
memory_efficiency: `+${Math.floor(Math.random() * 20 + 10)}
|
|
1338
|
+
memory_efficiency: `+${Math.floor(Math.random() * 20 + 10)}%`,
|
|
1099
1339
|
},
|
|
1100
|
-
timestamp: new Date().toISOString()
|
|
1340
|
+
timestamp: new Date().toISOString(),
|
|
1101
1341
|
};
|
|
1102
1342
|
|
|
1103
1343
|
case 'neural_explain':
|
|
@@ -1109,79 +1349,94 @@ class ClaudeFlowMCPServer {
|
|
|
1109
1349
|
decision_factors: [
|
|
1110
1350
|
{ factor: 'agent_availability', importance: Math.random() * 0.3 + 0.4 },
|
|
1111
1351
|
{ factor: 'task_complexity', importance: Math.random() * 0.25 + 0.3 },
|
|
1112
|
-
{ factor: 'coordination_history', importance: Math.random() * 0.2 + 0.25 }
|
|
1352
|
+
{ factor: 'coordination_history', importance: Math.random() * 0.2 + 0.25 },
|
|
1113
1353
|
],
|
|
1114
1354
|
feature_importance: {
|
|
1115
1355
|
topology_type: Math.random() * 0.3 + 0.5,
|
|
1116
1356
|
agent_capabilities: Math.random() * 0.25 + 0.4,
|
|
1117
|
-
resource_availability: Math.random() * 0.2 + 0.3
|
|
1357
|
+
resource_availability: Math.random() * 0.2 + 0.3,
|
|
1118
1358
|
},
|
|
1119
1359
|
reasoning_path: [
|
|
1120
1360
|
'Analyzed current swarm topology',
|
|
1121
1361
|
'Evaluated agent performance history',
|
|
1122
1362
|
'Calculated optimal task distribution',
|
|
1123
|
-
'Applied coordination efficiency patterns'
|
|
1124
|
-
]
|
|
1363
|
+
'Applied coordination efficiency patterns',
|
|
1364
|
+
],
|
|
1125
1365
|
},
|
|
1126
1366
|
confidence_breakdown: {
|
|
1127
1367
|
model_certainty: Math.random() * 0.2 + 0.8,
|
|
1128
1368
|
data_quality: Math.random() * 0.15 + 0.85,
|
|
1129
|
-
pattern_match: Math.random() * 0.25 + 0.75
|
|
1369
|
+
pattern_match: Math.random() * 0.25 + 0.75,
|
|
1130
1370
|
},
|
|
1131
|
-
timestamp: new Date().toISOString()
|
|
1371
|
+
timestamp: new Date().toISOString(),
|
|
1132
1372
|
};
|
|
1133
1373
|
|
|
1134
1374
|
case 'agent_list':
|
|
1135
1375
|
if (this.databaseManager) {
|
|
1136
1376
|
try {
|
|
1137
|
-
const swarmId = args.swarmId || await this.getActiveSwarmId();
|
|
1377
|
+
const swarmId = args.swarmId || (await this.getActiveSwarmId());
|
|
1138
1378
|
if (!swarmId) {
|
|
1139
1379
|
return {
|
|
1140
1380
|
success: false,
|
|
1141
1381
|
error: 'No active swarm found',
|
|
1142
1382
|
agents: [],
|
|
1143
|
-
timestamp: new Date().toISOString()
|
|
1383
|
+
timestamp: new Date().toISOString(),
|
|
1144
1384
|
};
|
|
1145
1385
|
}
|
|
1146
|
-
|
|
1386
|
+
|
|
1147
1387
|
const agents = await this.databaseManager.getAgents(swarmId);
|
|
1148
1388
|
return {
|
|
1149
1389
|
success: true,
|
|
1150
1390
|
swarmId: swarmId,
|
|
1151
|
-
agents: agents.map(agent => ({
|
|
1391
|
+
agents: agents.map((agent) => ({
|
|
1152
1392
|
id: agent.id,
|
|
1153
1393
|
name: agent.name,
|
|
1154
1394
|
type: agent.type,
|
|
1155
1395
|
status: agent.status,
|
|
1156
1396
|
capabilities: JSON.parse(agent.capabilities || '[]'),
|
|
1157
1397
|
created: agent.created_at,
|
|
1158
|
-
lastActive: agent.last_active_at
|
|
1398
|
+
lastActive: agent.last_active_at,
|
|
1159
1399
|
})),
|
|
1160
1400
|
count: agents.length,
|
|
1161
|
-
timestamp: new Date().toISOString()
|
|
1401
|
+
timestamp: new Date().toISOString(),
|
|
1162
1402
|
};
|
|
1163
1403
|
} catch (error) {
|
|
1164
|
-
console.error(
|
|
1404
|
+
console.error(
|
|
1405
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to list agents:`,
|
|
1406
|
+
error,
|
|
1407
|
+
);
|
|
1165
1408
|
return {
|
|
1166
1409
|
success: false,
|
|
1167
1410
|
error: error.message,
|
|
1168
1411
|
agents: [],
|
|
1169
|
-
timestamp: new Date().toISOString()
|
|
1412
|
+
timestamp: new Date().toISOString(),
|
|
1170
1413
|
};
|
|
1171
1414
|
}
|
|
1172
1415
|
}
|
|
1173
|
-
|
|
1416
|
+
|
|
1174
1417
|
// Fallback mock response
|
|
1175
1418
|
return {
|
|
1176
1419
|
success: true,
|
|
1177
1420
|
swarmId: args.swarmId || 'mock-swarm',
|
|
1178
1421
|
agents: [
|
|
1179
|
-
{
|
|
1180
|
-
|
|
1181
|
-
|
|
1422
|
+
{
|
|
1423
|
+
id: 'agent-1',
|
|
1424
|
+
name: 'coordinator-1',
|
|
1425
|
+
type: 'coordinator',
|
|
1426
|
+
status: 'active',
|
|
1427
|
+
capabilities: [],
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
id: 'agent-2',
|
|
1431
|
+
name: 'researcher-1',
|
|
1432
|
+
type: 'researcher',
|
|
1433
|
+
status: 'active',
|
|
1434
|
+
capabilities: [],
|
|
1435
|
+
},
|
|
1436
|
+
{ id: 'agent-3', name: 'coder-1', type: 'coder', status: 'busy', capabilities: [] },
|
|
1182
1437
|
],
|
|
1183
1438
|
count: 3,
|
|
1184
|
-
timestamp: new Date().toISOString()
|
|
1439
|
+
timestamp: new Date().toISOString(),
|
|
1185
1440
|
};
|
|
1186
1441
|
|
|
1187
1442
|
case 'swarm_status':
|
|
@@ -1190,74 +1445,76 @@ class ClaudeFlowMCPServer {
|
|
|
1190
1445
|
let swarmId = args.swarmId;
|
|
1191
1446
|
if (!swarmId) {
|
|
1192
1447
|
swarmId = await this.memoryStore.retrieve('active_swarm', {
|
|
1193
|
-
namespace: 'system'
|
|
1448
|
+
namespace: 'system',
|
|
1194
1449
|
});
|
|
1195
1450
|
}
|
|
1196
|
-
|
|
1451
|
+
|
|
1197
1452
|
if (!swarmId) {
|
|
1198
1453
|
return {
|
|
1199
1454
|
success: false,
|
|
1200
1455
|
error: 'No active swarm found',
|
|
1201
|
-
timestamp: new Date().toISOString()
|
|
1456
|
+
timestamp: new Date().toISOString(),
|
|
1202
1457
|
};
|
|
1203
1458
|
}
|
|
1204
|
-
|
|
1459
|
+
|
|
1205
1460
|
// Retrieve swarm data from memory store
|
|
1206
1461
|
const swarmDataRaw = await this.memoryStore.retrieve(`swarm:${swarmId}`, {
|
|
1207
|
-
namespace: 'swarms'
|
|
1462
|
+
namespace: 'swarms',
|
|
1208
1463
|
});
|
|
1209
|
-
|
|
1464
|
+
|
|
1210
1465
|
if (!swarmDataRaw) {
|
|
1211
1466
|
return {
|
|
1212
1467
|
success: false,
|
|
1213
1468
|
error: `Swarm ${swarmId} not found`,
|
|
1214
|
-
timestamp: new Date().toISOString()
|
|
1469
|
+
timestamp: new Date().toISOString(),
|
|
1215
1470
|
};
|
|
1216
1471
|
}
|
|
1217
|
-
|
|
1472
|
+
|
|
1218
1473
|
const swarm = typeof swarmDataRaw === 'string' ? JSON.parse(swarmDataRaw) : swarmDataRaw;
|
|
1219
|
-
|
|
1474
|
+
|
|
1220
1475
|
// Retrieve agents from memory
|
|
1221
1476
|
const agentsData = await this.memoryStore.list({
|
|
1222
1477
|
namespace: 'agents',
|
|
1223
|
-
limit: 100
|
|
1478
|
+
limit: 100,
|
|
1224
1479
|
});
|
|
1225
|
-
|
|
1480
|
+
|
|
1226
1481
|
// Filter agents for this swarm
|
|
1227
1482
|
const swarmAgents = agentsData
|
|
1228
|
-
.filter(entry => entry.key.startsWith(`agent:${swarmId}:`))
|
|
1229
|
-
.map(entry => {
|
|
1483
|
+
.filter((entry) => entry.key.startsWith(`agent:${swarmId}:`))
|
|
1484
|
+
.map((entry) => {
|
|
1230
1485
|
try {
|
|
1231
1486
|
return JSON.parse(entry.value);
|
|
1232
1487
|
} catch (e) {
|
|
1233
1488
|
return null;
|
|
1234
1489
|
}
|
|
1235
1490
|
})
|
|
1236
|
-
.filter(agent => agent !== null);
|
|
1237
|
-
|
|
1491
|
+
.filter((agent) => agent !== null);
|
|
1492
|
+
|
|
1238
1493
|
// Retrieve tasks from memory
|
|
1239
1494
|
const tasksData = await this.memoryStore.list({
|
|
1240
1495
|
namespace: 'tasks',
|
|
1241
|
-
limit: 100
|
|
1496
|
+
limit: 100,
|
|
1242
1497
|
});
|
|
1243
|
-
|
|
1498
|
+
|
|
1244
1499
|
// Filter tasks for this swarm
|
|
1245
1500
|
const swarmTasks = tasksData
|
|
1246
|
-
.filter(entry => entry.key.startsWith(`task:${swarmId}:`))
|
|
1247
|
-
.map(entry => {
|
|
1501
|
+
.filter((entry) => entry.key.startsWith(`task:${swarmId}:`))
|
|
1502
|
+
.map((entry) => {
|
|
1248
1503
|
try {
|
|
1249
1504
|
return JSON.parse(entry.value);
|
|
1250
1505
|
} catch (e) {
|
|
1251
1506
|
return null;
|
|
1252
1507
|
}
|
|
1253
1508
|
})
|
|
1254
|
-
.filter(task => task !== null);
|
|
1255
|
-
|
|
1509
|
+
.filter((task) => task !== null);
|
|
1510
|
+
|
|
1256
1511
|
// Calculate stats
|
|
1257
|
-
const activeAgents = swarmAgents.filter(
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1512
|
+
const activeAgents = swarmAgents.filter(
|
|
1513
|
+
(a) => a.status === 'active' || a.status === 'busy',
|
|
1514
|
+
).length;
|
|
1515
|
+
const pendingTasks = swarmTasks.filter((t) => t.status === 'pending').length;
|
|
1516
|
+
const completedTasks = swarmTasks.filter((t) => t.status === 'completed').length;
|
|
1517
|
+
|
|
1261
1518
|
const response = {
|
|
1262
1519
|
success: true,
|
|
1263
1520
|
swarmId: swarmId,
|
|
@@ -1267,21 +1524,23 @@ class ClaudeFlowMCPServer {
|
|
|
1267
1524
|
taskCount: swarmTasks.length,
|
|
1268
1525
|
pendingTasks: pendingTasks,
|
|
1269
1526
|
completedTasks: completedTasks,
|
|
1270
|
-
timestamp: new Date().toISOString()
|
|
1527
|
+
timestamp: new Date().toISOString(),
|
|
1271
1528
|
};
|
|
1272
|
-
|
|
1529
|
+
|
|
1273
1530
|
// Add verbose details if requested
|
|
1274
1531
|
if (args.verbose === true || args.verbose === 'true') {
|
|
1275
1532
|
response.agents = swarmAgents;
|
|
1276
1533
|
response.tasks = swarmTasks;
|
|
1277
1534
|
response.swarmDetails = swarm;
|
|
1278
1535
|
}
|
|
1279
|
-
|
|
1536
|
+
|
|
1280
1537
|
return response;
|
|
1281
|
-
|
|
1282
1538
|
} catch (error) {
|
|
1283
|
-
console.error(
|
|
1284
|
-
|
|
1539
|
+
console.error(
|
|
1540
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to get swarm status:`,
|
|
1541
|
+
error,
|
|
1542
|
+
);
|
|
1543
|
+
|
|
1285
1544
|
// Return a more informative fallback response
|
|
1286
1545
|
return {
|
|
1287
1546
|
success: false,
|
|
@@ -1293,13 +1552,13 @@ class ClaudeFlowMCPServer {
|
|
|
1293
1552
|
taskCount: 0,
|
|
1294
1553
|
pendingTasks: 0,
|
|
1295
1554
|
completedTasks: 0,
|
|
1296
|
-
timestamp: new Date().toISOString()
|
|
1555
|
+
timestamp: new Date().toISOString(),
|
|
1297
1556
|
};
|
|
1298
1557
|
}
|
|
1299
1558
|
|
|
1300
1559
|
case 'task_orchestrate':
|
|
1301
1560
|
const taskId = `task_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
1302
|
-
const swarmIdForTask = args.swarmId || await this.getActiveSwarmId();
|
|
1561
|
+
const swarmIdForTask = args.swarmId || (await this.getActiveSwarmId());
|
|
1303
1562
|
const taskData = {
|
|
1304
1563
|
id: taskId,
|
|
1305
1564
|
swarmId: swarmIdForTask,
|
|
@@ -1315,23 +1574,32 @@ class ClaudeFlowMCPServer {
|
|
|
1315
1574
|
metadata: JSON.stringify({
|
|
1316
1575
|
sessionId: this.sessionId,
|
|
1317
1576
|
createdBy: 'mcp-server',
|
|
1318
|
-
orchestratedAt: new Date().toISOString()
|
|
1319
|
-
})
|
|
1577
|
+
orchestratedAt: new Date().toISOString(),
|
|
1578
|
+
}),
|
|
1320
1579
|
};
|
|
1321
|
-
|
|
1580
|
+
|
|
1322
1581
|
// Store task data in memory store
|
|
1323
1582
|
try {
|
|
1324
1583
|
if (swarmIdForTask) {
|
|
1325
|
-
await this.memoryStore.store(
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1584
|
+
await this.memoryStore.store(
|
|
1585
|
+
`task:${swarmIdForTask}:${taskId}`,
|
|
1586
|
+
JSON.stringify(taskData),
|
|
1587
|
+
{
|
|
1588
|
+
namespace: 'tasks',
|
|
1589
|
+
metadata: { type: 'task_data', swarmId: swarmIdForTask, sessionId: this.sessionId },
|
|
1590
|
+
},
|
|
1591
|
+
);
|
|
1592
|
+
console.error(
|
|
1593
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Task persisted to memory: ${taskId}`,
|
|
1594
|
+
);
|
|
1330
1595
|
}
|
|
1331
1596
|
} catch (error) {
|
|
1332
|
-
console.error(
|
|
1597
|
+
console.error(
|
|
1598
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to persist task:`,
|
|
1599
|
+
error,
|
|
1600
|
+
);
|
|
1333
1601
|
}
|
|
1334
|
-
|
|
1602
|
+
|
|
1335
1603
|
return {
|
|
1336
1604
|
success: true,
|
|
1337
1605
|
taskId: taskId,
|
|
@@ -1340,7 +1608,7 @@ class ClaudeFlowMCPServer {
|
|
|
1340
1608
|
priority: taskData.priority,
|
|
1341
1609
|
status: 'pending',
|
|
1342
1610
|
persisted: true,
|
|
1343
|
-
timestamp: new Date().toISOString()
|
|
1611
|
+
timestamp: new Date().toISOString(),
|
|
1344
1612
|
};
|
|
1345
1613
|
|
|
1346
1614
|
default:
|
|
@@ -1349,7 +1617,7 @@ class ClaudeFlowMCPServer {
|
|
|
1349
1617
|
tool: name,
|
|
1350
1618
|
message: `Tool ${name} executed successfully`,
|
|
1351
1619
|
args: args,
|
|
1352
|
-
timestamp: new Date().toISOString()
|
|
1620
|
+
timestamp: new Date().toISOString(),
|
|
1353
1621
|
};
|
|
1354
1622
|
}
|
|
1355
1623
|
}
|
|
@@ -1361,15 +1629,24 @@ class ClaudeFlowMCPServer {
|
|
|
1361
1629
|
active_swarms: 3,
|
|
1362
1630
|
total_agents: 15,
|
|
1363
1631
|
topologies: ['hierarchical', 'mesh', 'ring', 'star'],
|
|
1364
|
-
performance: '2.8-4.4x speedup'
|
|
1632
|
+
performance: '2.8-4.4x speedup',
|
|
1365
1633
|
};
|
|
1366
1634
|
|
|
1367
1635
|
case 'claude-flow://agents':
|
|
1368
1636
|
return {
|
|
1369
1637
|
total_agents: 8,
|
|
1370
|
-
types: [
|
|
1638
|
+
types: [
|
|
1639
|
+
'researcher',
|
|
1640
|
+
'coder',
|
|
1641
|
+
'analyst',
|
|
1642
|
+
'architect',
|
|
1643
|
+
'tester',
|
|
1644
|
+
'coordinator',
|
|
1645
|
+
'reviewer',
|
|
1646
|
+
'optimizer',
|
|
1647
|
+
],
|
|
1371
1648
|
active: 15,
|
|
1372
|
-
capabilities: 127
|
|
1649
|
+
capabilities: 127,
|
|
1373
1650
|
};
|
|
1374
1651
|
|
|
1375
1652
|
case 'claude-flow://models':
|
|
@@ -1378,7 +1655,7 @@ class ClaudeFlowMCPServer {
|
|
|
1378
1655
|
wasm_enabled: true,
|
|
1379
1656
|
simd_support: true,
|
|
1380
1657
|
training_active: true,
|
|
1381
|
-
accuracy_avg: 0.89
|
|
1658
|
+
accuracy_avg: 0.89,
|
|
1382
1659
|
};
|
|
1383
1660
|
|
|
1384
1661
|
case 'claude-flow://performance':
|
|
@@ -1387,7 +1664,7 @@ class ClaudeFlowMCPServer {
|
|
|
1387
1664
|
token_reduction: '32.3%',
|
|
1388
1665
|
swe_bench_rate: '84.8%',
|
|
1389
1666
|
speed_improvement: '2.8-4.4x',
|
|
1390
|
-
memory_efficiency: '78%'
|
|
1667
|
+
memory_efficiency: '78%',
|
|
1391
1668
|
};
|
|
1392
1669
|
|
|
1393
1670
|
default:
|
|
@@ -1400,7 +1677,7 @@ class ClaudeFlowMCPServer {
|
|
|
1400
1677
|
return {
|
|
1401
1678
|
success: false,
|
|
1402
1679
|
error: 'Shared memory system not initialized',
|
|
1403
|
-
timestamp: new Date().toISOString()
|
|
1680
|
+
timestamp: new Date().toISOString(),
|
|
1404
1681
|
};
|
|
1405
1682
|
}
|
|
1406
1683
|
|
|
@@ -1413,12 +1690,14 @@ class ClaudeFlowMCPServer {
|
|
|
1413
1690
|
metadata: {
|
|
1414
1691
|
sessionId: this.sessionId,
|
|
1415
1692
|
storedBy: 'mcp-server',
|
|
1416
|
-
type: 'knowledge'
|
|
1417
|
-
}
|
|
1693
|
+
type: 'knowledge',
|
|
1694
|
+
},
|
|
1418
1695
|
});
|
|
1419
|
-
|
|
1420
|
-
console.error(
|
|
1421
|
-
|
|
1696
|
+
|
|
1697
|
+
console.error(
|
|
1698
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Stored in shared memory: ${args.key} (namespace: ${args.namespace || 'default'})`,
|
|
1699
|
+
);
|
|
1700
|
+
|
|
1422
1701
|
return {
|
|
1423
1702
|
success: true,
|
|
1424
1703
|
action: 'store',
|
|
@@ -1428,16 +1707,18 @@ class ClaudeFlowMCPServer {
|
|
|
1428
1707
|
size: storeResult.size || args.value.length,
|
|
1429
1708
|
id: storeResult.id,
|
|
1430
1709
|
storage_type: this.memoryStore.isUsingFallback() ? 'in-memory' : 'sqlite',
|
|
1431
|
-
timestamp: new Date().toISOString()
|
|
1710
|
+
timestamp: new Date().toISOString(),
|
|
1432
1711
|
};
|
|
1433
1712
|
|
|
1434
1713
|
case 'retrieve':
|
|
1435
1714
|
const value = await this.memoryStore.retrieve(args.key, {
|
|
1436
|
-
namespace: args.namespace || 'default'
|
|
1715
|
+
namespace: args.namespace || 'default',
|
|
1437
1716
|
});
|
|
1438
|
-
|
|
1439
|
-
console.error(
|
|
1440
|
-
|
|
1717
|
+
|
|
1718
|
+
console.error(
|
|
1719
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Retrieved from shared memory: ${args.key} (found: ${value !== null})`,
|
|
1720
|
+
);
|
|
1721
|
+
|
|
1441
1722
|
return {
|
|
1442
1723
|
success: true,
|
|
1443
1724
|
action: 'retrieve',
|
|
@@ -1446,17 +1727,19 @@ class ClaudeFlowMCPServer {
|
|
|
1446
1727
|
found: value !== null,
|
|
1447
1728
|
namespace: args.namespace || 'default',
|
|
1448
1729
|
storage_type: this.memoryStore.isUsingFallback() ? 'in-memory' : 'sqlite',
|
|
1449
|
-
timestamp: new Date().toISOString()
|
|
1730
|
+
timestamp: new Date().toISOString(),
|
|
1450
1731
|
};
|
|
1451
1732
|
|
|
1452
1733
|
case 'list':
|
|
1453
1734
|
const entries = await this.memoryStore.list({
|
|
1454
1735
|
namespace: args.namespace || 'default',
|
|
1455
|
-
limit: 100
|
|
1736
|
+
limit: 100,
|
|
1456
1737
|
});
|
|
1457
|
-
|
|
1458
|
-
console.error(
|
|
1459
|
-
|
|
1738
|
+
|
|
1739
|
+
console.error(
|
|
1740
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Listed shared memory entries: ${entries.length} (namespace: ${args.namespace || 'default'})`,
|
|
1741
|
+
);
|
|
1742
|
+
|
|
1460
1743
|
return {
|
|
1461
1744
|
success: true,
|
|
1462
1745
|
action: 'list',
|
|
@@ -1464,16 +1747,18 @@ class ClaudeFlowMCPServer {
|
|
|
1464
1747
|
entries: entries,
|
|
1465
1748
|
count: entries.length,
|
|
1466
1749
|
storage_type: this.memoryStore.isUsingFallback() ? 'in-memory' : 'sqlite',
|
|
1467
|
-
timestamp: new Date().toISOString()
|
|
1750
|
+
timestamp: new Date().toISOString(),
|
|
1468
1751
|
};
|
|
1469
1752
|
|
|
1470
1753
|
case 'delete':
|
|
1471
1754
|
const deleted = await this.memoryStore.delete(args.key, {
|
|
1472
|
-
namespace: args.namespace || 'default'
|
|
1755
|
+
namespace: args.namespace || 'default',
|
|
1473
1756
|
});
|
|
1474
|
-
|
|
1475
|
-
console.error(
|
|
1476
|
-
|
|
1757
|
+
|
|
1758
|
+
console.error(
|
|
1759
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Deleted from shared memory: ${args.key} (success: ${deleted})`,
|
|
1760
|
+
);
|
|
1761
|
+
|
|
1477
1762
|
return {
|
|
1478
1763
|
success: true,
|
|
1479
1764
|
action: 'delete',
|
|
@@ -1481,17 +1766,19 @@ class ClaudeFlowMCPServer {
|
|
|
1481
1766
|
namespace: args.namespace || 'default',
|
|
1482
1767
|
deleted: deleted,
|
|
1483
1768
|
storage_type: this.memoryStore.isUsingFallback() ? 'in-memory' : 'sqlite',
|
|
1484
|
-
timestamp: new Date().toISOString()
|
|
1769
|
+
timestamp: new Date().toISOString(),
|
|
1485
1770
|
};
|
|
1486
1771
|
|
|
1487
1772
|
case 'search':
|
|
1488
1773
|
const results = await this.memoryStore.search(args.value || '', {
|
|
1489
1774
|
namespace: args.namespace || 'default',
|
|
1490
|
-
limit: 50
|
|
1775
|
+
limit: 50,
|
|
1491
1776
|
});
|
|
1492
|
-
|
|
1493
|
-
console.error(
|
|
1494
|
-
|
|
1777
|
+
|
|
1778
|
+
console.error(
|
|
1779
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] Searched shared memory: ${results.length} results for "${args.value}"`,
|
|
1780
|
+
);
|
|
1781
|
+
|
|
1495
1782
|
return {
|
|
1496
1783
|
success: true,
|
|
1497
1784
|
action: 'search',
|
|
@@ -1500,24 +1787,27 @@ class ClaudeFlowMCPServer {
|
|
|
1500
1787
|
results: results,
|
|
1501
1788
|
count: results.length,
|
|
1502
1789
|
storage_type: this.memoryStore.isUsingFallback() ? 'in-memory' : 'sqlite',
|
|
1503
|
-
timestamp: new Date().toISOString()
|
|
1790
|
+
timestamp: new Date().toISOString(),
|
|
1504
1791
|
};
|
|
1505
1792
|
|
|
1506
1793
|
default:
|
|
1507
1794
|
return {
|
|
1508
1795
|
success: false,
|
|
1509
1796
|
error: `Unknown memory action: ${args.action}`,
|
|
1510
|
-
timestamp: new Date().toISOString()
|
|
1797
|
+
timestamp: new Date().toISOString(),
|
|
1511
1798
|
};
|
|
1512
1799
|
}
|
|
1513
1800
|
} catch (error) {
|
|
1514
|
-
console.error(
|
|
1801
|
+
console.error(
|
|
1802
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Shared memory operation failed:`,
|
|
1803
|
+
error,
|
|
1804
|
+
);
|
|
1515
1805
|
return {
|
|
1516
1806
|
success: false,
|
|
1517
1807
|
error: error.message,
|
|
1518
1808
|
action: args.action,
|
|
1519
1809
|
storage_type: this.memoryStore?.isUsingFallback() ? 'in-memory' : 'sqlite',
|
|
1520
|
-
timestamp: new Date().toISOString()
|
|
1810
|
+
timestamp: new Date().toISOString(),
|
|
1521
1811
|
};
|
|
1522
1812
|
}
|
|
1523
1813
|
}
|
|
@@ -1527,30 +1817,33 @@ class ClaudeFlowMCPServer {
|
|
|
1527
1817
|
return {
|
|
1528
1818
|
success: false,
|
|
1529
1819
|
error: 'Memory system not initialized',
|
|
1530
|
-
timestamp: new Date().toISOString()
|
|
1820
|
+
timestamp: new Date().toISOString(),
|
|
1531
1821
|
};
|
|
1532
1822
|
}
|
|
1533
1823
|
|
|
1534
1824
|
try {
|
|
1535
1825
|
const results = await this.sharedMemory.search(args.pattern, {
|
|
1536
1826
|
namespace: args.namespace || 'default',
|
|
1537
|
-
limit: args.limit || 10
|
|
1827
|
+
limit: args.limit || 10,
|
|
1538
1828
|
});
|
|
1539
|
-
|
|
1829
|
+
|
|
1540
1830
|
return {
|
|
1541
1831
|
success: true,
|
|
1542
1832
|
pattern: args.pattern,
|
|
1543
1833
|
namespace: args.namespace || 'default',
|
|
1544
1834
|
results: results,
|
|
1545
1835
|
count: results.length,
|
|
1546
|
-
timestamp: new Date().toISOString()
|
|
1836
|
+
timestamp: new Date().toISOString(),
|
|
1547
1837
|
};
|
|
1548
1838
|
} catch (error) {
|
|
1549
|
-
console.error(
|
|
1839
|
+
console.error(
|
|
1840
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Memory search failed:`,
|
|
1841
|
+
error,
|
|
1842
|
+
);
|
|
1550
1843
|
return {
|
|
1551
1844
|
success: false,
|
|
1552
1845
|
error: error.message,
|
|
1553
|
-
timestamp: new Date().toISOString()
|
|
1846
|
+
timestamp: new Date().toISOString(),
|
|
1554
1847
|
};
|
|
1555
1848
|
}
|
|
1556
1849
|
}
|
|
@@ -1558,20 +1851,23 @@ class ClaudeFlowMCPServer {
|
|
|
1558
1851
|
async getActiveSwarmId() {
|
|
1559
1852
|
try {
|
|
1560
1853
|
const activeSwarmId = await this.memoryStore.retrieve('active_swarm', {
|
|
1561
|
-
namespace: 'system'
|
|
1854
|
+
namespace: 'system',
|
|
1562
1855
|
});
|
|
1563
1856
|
return activeSwarmId || null;
|
|
1564
1857
|
} catch (error) {
|
|
1565
|
-
console.error(
|
|
1858
|
+
console.error(
|
|
1859
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to get active swarm:`,
|
|
1860
|
+
error,
|
|
1861
|
+
);
|
|
1566
1862
|
return null;
|
|
1567
1863
|
}
|
|
1568
1864
|
}
|
|
1569
|
-
|
|
1865
|
+
|
|
1570
1866
|
createErrorResponse(id, code, message, data = null) {
|
|
1571
1867
|
const response = {
|
|
1572
1868
|
jsonrpc: '2.0',
|
|
1573
1869
|
id,
|
|
1574
|
-
error: { code, message }
|
|
1870
|
+
error: { code, message },
|
|
1575
1871
|
};
|
|
1576
1872
|
if (data) response.error.data = data;
|
|
1577
1873
|
return response;
|
|
@@ -1581,8 +1877,10 @@ class ClaudeFlowMCPServer {
|
|
|
1581
1877
|
// Main server execution
|
|
1582
1878
|
async function startMCPServer() {
|
|
1583
1879
|
const server = new ClaudeFlowMCPServer();
|
|
1584
|
-
|
|
1585
|
-
console.error(
|
|
1880
|
+
|
|
1881
|
+
console.error(
|
|
1882
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${server.sessionId}) Claude-Flow MCP server starting in stdio mode`,
|
|
1883
|
+
);
|
|
1586
1884
|
console.error({
|
|
1587
1885
|
arch: process.arch,
|
|
1588
1886
|
mode: 'mcp-stdio',
|
|
@@ -1591,32 +1889,34 @@ async function startMCPServer() {
|
|
|
1591
1889
|
platform: process.platform,
|
|
1592
1890
|
protocol: 'stdio',
|
|
1593
1891
|
sessionId: server.sessionId,
|
|
1594
|
-
version: server.version
|
|
1892
|
+
version: server.version,
|
|
1595
1893
|
});
|
|
1596
1894
|
|
|
1597
1895
|
// Send server capabilities
|
|
1598
|
-
console.log(
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1896
|
+
console.log(
|
|
1897
|
+
JSON.stringify({
|
|
1898
|
+
jsonrpc: '2.0',
|
|
1899
|
+
method: 'server.initialized',
|
|
1900
|
+
params: {
|
|
1901
|
+
serverInfo: {
|
|
1902
|
+
name: 'claude-flow',
|
|
1903
|
+
version: server.version,
|
|
1904
|
+
capabilities: server.capabilities,
|
|
1905
|
+
},
|
|
1906
|
+
},
|
|
1907
|
+
}),
|
|
1908
|
+
);
|
|
1609
1909
|
|
|
1610
1910
|
// Handle stdin messages
|
|
1611
1911
|
let buffer = '';
|
|
1612
|
-
|
|
1912
|
+
|
|
1613
1913
|
process.stdin.on('data', async (chunk) => {
|
|
1614
1914
|
buffer += chunk.toString();
|
|
1615
|
-
|
|
1915
|
+
|
|
1616
1916
|
// Process complete JSON messages
|
|
1617
1917
|
let lines = buffer.split('\n');
|
|
1618
1918
|
buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
1619
|
-
|
|
1919
|
+
|
|
1620
1920
|
for (const line of lines) {
|
|
1621
1921
|
if (line.trim()) {
|
|
1622
1922
|
try {
|
|
@@ -1626,21 +1926,30 @@ async function startMCPServer() {
|
|
|
1626
1926
|
console.log(JSON.stringify(response));
|
|
1627
1927
|
}
|
|
1628
1928
|
} catch (error) {
|
|
1629
|
-
console.error(
|
|
1929
|
+
console.error(
|
|
1930
|
+
`[${new Date().toISOString()}] ERROR [claude-flow-mcp] Failed to parse message:`,
|
|
1931
|
+
error.message,
|
|
1932
|
+
);
|
|
1630
1933
|
}
|
|
1631
1934
|
}
|
|
1632
1935
|
}
|
|
1633
1936
|
});
|
|
1634
1937
|
|
|
1635
1938
|
process.stdin.on('end', () => {
|
|
1636
|
-
console.error(
|
|
1637
|
-
|
|
1939
|
+
console.error(
|
|
1940
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${server.sessionId}) 🔌 Connection closed: ${server.sessionId}`,
|
|
1941
|
+
);
|
|
1942
|
+
console.error(
|
|
1943
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${server.sessionId}) MCP: stdin closed, shutting down...`,
|
|
1944
|
+
);
|
|
1638
1945
|
process.exit(0);
|
|
1639
1946
|
});
|
|
1640
1947
|
|
|
1641
1948
|
// Handle process termination
|
|
1642
1949
|
process.on('SIGINT', async () => {
|
|
1643
|
-
console.error(
|
|
1950
|
+
console.error(
|
|
1951
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${server.sessionId}) Received SIGINT, shutting down gracefully...`,
|
|
1952
|
+
);
|
|
1644
1953
|
if (server.sharedMemory) {
|
|
1645
1954
|
await server.sharedMemory.close();
|
|
1646
1955
|
}
|
|
@@ -1648,7 +1957,9 @@ async function startMCPServer() {
|
|
|
1648
1957
|
});
|
|
1649
1958
|
|
|
1650
1959
|
process.on('SIGTERM', async () => {
|
|
1651
|
-
console.error(
|
|
1960
|
+
console.error(
|
|
1961
|
+
`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${server.sessionId}) Received SIGTERM, shutting down gracefully...`,
|
|
1962
|
+
);
|
|
1652
1963
|
if (server.sharedMemory) {
|
|
1653
1964
|
await server.sharedMemory.close();
|
|
1654
1965
|
}
|
|
@@ -1661,4 +1972,4 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
1661
1972
|
startMCPServer().catch(console.error);
|
|
1662
1973
|
}
|
|
1663
1974
|
|
|
1664
|
-
export { ClaudeFlowMCPServer };
|
|
1975
|
+
export { ClaudeFlowMCPServer };
|