claude-flow 2.0.0-alpha.61 → 2.0.0-alpha.62
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/CHANGELOG.md +59 -1
- 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.map +1 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +182 -103
- 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 +195 -135
- 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.map +1 -1
- 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.js +12 -8
- package/dist/memory/sqlite-store.js.map +1 -1
- 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-client.ts +59 -38
- 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 +69 -60
- 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 +197 -185
- 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 +44 -40
- 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 +352 -258
- 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 +217 -157
- 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 +598 -432
- 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 +20 -18
- 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 +6 -7
- package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +42 -33
- 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 +405 -303
- 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/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/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/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/sparc-modes.js +3 -3
- 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 +299 -166
- 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 +19 -15
- 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 +16 -7
- 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 +76 -59
- 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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getErrorMessage } from '../utils/error-handler.js';
|
|
2
1
|
import { EventEmitter } from 'events';
|
|
3
2
|
import { writeFile, readFile, mkdir, readdir } from 'fs/promises';
|
|
4
3
|
import { join } from 'path';
|
|
@@ -226,11 +225,14 @@ export interface UsageMetrics {
|
|
|
226
225
|
pagesPerSession: number;
|
|
227
226
|
};
|
|
228
227
|
features: {
|
|
229
|
-
adoption: Record<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
adoption: Record<
|
|
229
|
+
string,
|
|
230
|
+
{
|
|
231
|
+
users: number;
|
|
232
|
+
usage: number;
|
|
233
|
+
retention: number;
|
|
234
|
+
}
|
|
235
|
+
>;
|
|
234
236
|
mostUsed: string[];
|
|
235
237
|
leastUsed: string[];
|
|
236
238
|
};
|
|
@@ -258,7 +260,7 @@ export interface BusinessMetrics {
|
|
|
258
260
|
recurring: number;
|
|
259
261
|
growth: number;
|
|
260
262
|
arpu: number; // Average Revenue Per User
|
|
261
|
-
ltv: number;
|
|
263
|
+
ltv: number; // Lifetime Value
|
|
262
264
|
};
|
|
263
265
|
customers: {
|
|
264
266
|
total: number;
|
|
@@ -364,9 +366,9 @@ export interface AnalyticsConfiguration {
|
|
|
364
366
|
};
|
|
365
367
|
storage: {
|
|
366
368
|
retention: {
|
|
367
|
-
raw: string;
|
|
369
|
+
raw: string; // e.g., '7d'
|
|
368
370
|
aggregated: string; // e.g., '90d'
|
|
369
|
-
summary: string;
|
|
371
|
+
summary: string; // e.g., '1y'
|
|
370
372
|
};
|
|
371
373
|
compression: boolean;
|
|
372
374
|
encryption: boolean;
|
|
@@ -408,11 +410,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
408
410
|
private config: ConfigManager;
|
|
409
411
|
private configuration: AnalyticsConfiguration;
|
|
410
412
|
|
|
411
|
-
constructor(
|
|
412
|
-
analyticsPath: string = './analytics',
|
|
413
|
-
logger?: Logger,
|
|
414
|
-
config?: ConfigManager
|
|
415
|
-
) {
|
|
413
|
+
constructor(analyticsPath: string = './analytics', logger?: Logger, config?: ConfigManager) {
|
|
416
414
|
super();
|
|
417
415
|
this.analyticsPath = analyticsPath;
|
|
418
416
|
this.logger = logger || new Logger({ level: 'info', format: 'text', destination: 'console' });
|
|
@@ -428,11 +426,11 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
428
426
|
await mkdir(join(this.analyticsPath, 'insights'), { recursive: true });
|
|
429
427
|
await mkdir(join(this.analyticsPath, 'models'), { recursive: true });
|
|
430
428
|
await mkdir(join(this.analyticsPath, 'reports'), { recursive: true });
|
|
431
|
-
|
|
429
|
+
|
|
432
430
|
await this.loadConfigurations();
|
|
433
431
|
await this.initializeDefaultDashboards();
|
|
434
432
|
await this.startMetricsCollection();
|
|
435
|
-
|
|
433
|
+
|
|
436
434
|
this.logger.info('Analytics Manager initialized successfully');
|
|
437
435
|
} catch (error) {
|
|
438
436
|
this.logger.error('Failed to initialize Analytics Manager', { error });
|
|
@@ -444,7 +442,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
444
442
|
const fullMetric: AnalyticsMetric = {
|
|
445
443
|
id: `metric-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
446
444
|
timestamp: new Date(),
|
|
447
|
-
...metric
|
|
445
|
+
...metric,
|
|
448
446
|
};
|
|
449
447
|
|
|
450
448
|
const key = `${metric.category}-${metric.name}`;
|
|
@@ -458,7 +456,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
458
456
|
// Keep only recent metrics in memory (configurable retention)
|
|
459
457
|
const retentionPeriod = 24 * 60 * 60 * 1000; // 24 hours
|
|
460
458
|
const cutoff = Date.now() - retentionPeriod;
|
|
461
|
-
const filteredMetrics = metricArray.filter(m => m.timestamp.getTime() > cutoff);
|
|
459
|
+
const filteredMetrics = metricArray.filter((m) => m.timestamp.getTime() > cutoff);
|
|
462
460
|
this.metrics.set(key, filteredMetrics);
|
|
463
461
|
|
|
464
462
|
// Persist to disk for longer-term storage
|
|
@@ -481,8 +479,8 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
481
479
|
|
|
482
480
|
for (const metricName of query.metrics) {
|
|
483
481
|
const key = metricName.includes('-') ? metricName : `*-${metricName}`;
|
|
484
|
-
const matchingKeys = Array.from(this.metrics.keys()).filter(
|
|
485
|
-
key === '*' || k.includes(key.replace('*-', '')) || k === key
|
|
482
|
+
const matchingKeys = Array.from(this.metrics.keys()).filter(
|
|
483
|
+
(k) => key === '*' || k.includes(key.replace('*-', '')) || k === key,
|
|
486
484
|
);
|
|
487
485
|
|
|
488
486
|
let allMetrics: AnalyticsMetric[] = [];
|
|
@@ -492,18 +490,17 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
492
490
|
}
|
|
493
491
|
|
|
494
492
|
// Filter by time range
|
|
495
|
-
allMetrics = allMetrics.filter(
|
|
496
|
-
m.timestamp >= query.timeRange.start &&
|
|
497
|
-
m.timestamp <= query.timeRange.end
|
|
493
|
+
allMetrics = allMetrics.filter(
|
|
494
|
+
(m) => m.timestamp >= query.timeRange.start && m.timestamp <= query.timeRange.end,
|
|
498
495
|
);
|
|
499
496
|
|
|
500
497
|
// Apply filters
|
|
501
498
|
if (query.filters) {
|
|
502
499
|
for (const [field, value] of Object.entries(query.filters)) {
|
|
503
|
-
allMetrics = allMetrics.filter(m => {
|
|
500
|
+
allMetrics = allMetrics.filter((m) => {
|
|
504
501
|
if (field === 'tags') {
|
|
505
|
-
return Object.entries(value as Record<string, string>).every(
|
|
506
|
-
m.tags[k] === v
|
|
502
|
+
return Object.entries(value as Record<string, string>).every(
|
|
503
|
+
([k, v]) => m.tags[k] === v,
|
|
507
504
|
);
|
|
508
505
|
}
|
|
509
506
|
return (m as any)[field] === value;
|
|
@@ -541,28 +538,28 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
541
538
|
type: dashboardData.type,
|
|
542
539
|
widgets: dashboardData.widgets.map((widget, index) => ({
|
|
543
540
|
id: `widget-${Date.now()}-${index}`,
|
|
544
|
-
...widget
|
|
541
|
+
...widget,
|
|
545
542
|
})),
|
|
546
543
|
layout: {
|
|
547
544
|
columns: 12,
|
|
548
545
|
rows: 8,
|
|
549
546
|
grid: true,
|
|
550
|
-
responsive: true
|
|
547
|
+
responsive: true,
|
|
551
548
|
},
|
|
552
549
|
permissions: {
|
|
553
550
|
viewers: [],
|
|
554
551
|
editors: [],
|
|
555
552
|
public: false,
|
|
556
|
-
...dashboardData.permissions
|
|
553
|
+
...dashboardData.permissions,
|
|
557
554
|
},
|
|
558
555
|
schedule: {
|
|
559
556
|
autoRefresh: true,
|
|
560
|
-
refreshInterval: 30
|
|
557
|
+
refreshInterval: 30,
|
|
561
558
|
},
|
|
562
559
|
filters: [],
|
|
563
560
|
createdAt: new Date(),
|
|
564
561
|
updatedAt: new Date(),
|
|
565
|
-
createdBy: 'system'
|
|
562
|
+
createdBy: 'system',
|
|
566
563
|
};
|
|
567
564
|
|
|
568
565
|
this.dashboards.set(dashboard.id, dashboard);
|
|
@@ -579,14 +576,14 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
579
576
|
metrics?: string[];
|
|
580
577
|
timeRange?: { start: Date; end: Date };
|
|
581
578
|
categories?: string[];
|
|
582
|
-
} = {}
|
|
579
|
+
} = {},
|
|
583
580
|
): Promise<AnalyticsInsight[]> {
|
|
584
581
|
const insights: AnalyticsInsight[] = [];
|
|
585
582
|
|
|
586
583
|
// Default time range: last 24 hours
|
|
587
584
|
const timeRange = scope.timeRange || {
|
|
588
585
|
start: new Date(Date.now() - 24 * 60 * 60 * 1000),
|
|
589
|
-
end: new Date()
|
|
586
|
+
end: new Date(),
|
|
590
587
|
};
|
|
591
588
|
|
|
592
589
|
// Anomaly detection
|
|
@@ -644,24 +641,24 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
644
641
|
trainingData: {
|
|
645
642
|
samples: 0,
|
|
646
643
|
features: modelConfig.features.length,
|
|
647
|
-
timeRange: modelConfig.trainingPeriod
|
|
644
|
+
timeRange: modelConfig.trainingPeriod,
|
|
648
645
|
},
|
|
649
646
|
performance: {
|
|
650
647
|
precision: 0,
|
|
651
648
|
recall: 0,
|
|
652
|
-
f1Score: 0
|
|
649
|
+
f1Score: 0,
|
|
653
650
|
},
|
|
654
651
|
predictions: [],
|
|
655
|
-
status: 'training'
|
|
652
|
+
status: 'training',
|
|
656
653
|
};
|
|
657
654
|
|
|
658
655
|
try {
|
|
659
656
|
// Collect training data
|
|
660
657
|
const trainingData = await this.collectTrainingData(model);
|
|
661
|
-
|
|
658
|
+
|
|
662
659
|
// Train the model (simplified implementation)
|
|
663
660
|
const trained = await this.executeModelTraining(model, trainingData);
|
|
664
|
-
|
|
661
|
+
|
|
665
662
|
Object.assign(model, trained);
|
|
666
663
|
model.status = 'ready';
|
|
667
664
|
|
|
@@ -669,8 +666,9 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
669
666
|
await this.saveModel(model);
|
|
670
667
|
|
|
671
668
|
this.emit('model:trained', model);
|
|
672
|
-
this.logger.info(
|
|
673
|
-
|
|
669
|
+
this.logger.info(
|
|
670
|
+
`Predictive model trained: ${model.name} (${model.id}) - Accuracy: ${model.accuracy}%`,
|
|
671
|
+
);
|
|
674
672
|
} catch (error) {
|
|
675
673
|
model.status = 'error';
|
|
676
674
|
this.logger.error(`Model training failed: ${model.name}`, { error });
|
|
@@ -680,10 +678,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
680
678
|
return model;
|
|
681
679
|
}
|
|
682
680
|
|
|
683
|
-
async makePrediction(
|
|
684
|
-
modelId: string,
|
|
685
|
-
input: Record<string, any>
|
|
686
|
-
): Promise<PredictionResult> {
|
|
681
|
+
async makePrediction(modelId: string, input: Record<string, any>): Promise<PredictionResult> {
|
|
687
682
|
const model = this.models.get(modelId);
|
|
688
683
|
if (!model) {
|
|
689
684
|
throw new Error(`Model not found: ${modelId}`);
|
|
@@ -702,7 +697,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
702
697
|
input,
|
|
703
698
|
prediction: prediction.value,
|
|
704
699
|
confidence: prediction.confidence,
|
|
705
|
-
timestamp: new Date()
|
|
700
|
+
timestamp: new Date(),
|
|
706
701
|
};
|
|
707
702
|
|
|
708
703
|
model.predictions.push(result);
|
|
@@ -716,30 +711,28 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
716
711
|
return result;
|
|
717
712
|
}
|
|
718
713
|
|
|
719
|
-
async getPerformanceMetrics(
|
|
720
|
-
timeRange?: { start: Date; end: Date }
|
|
721
|
-
): Promise<PerformanceMetrics> {
|
|
714
|
+
async getPerformanceMetrics(timeRange?: { start: Date; end: Date }): Promise<PerformanceMetrics> {
|
|
722
715
|
const range = timeRange || {
|
|
723
716
|
start: new Date(Date.now() - 60 * 60 * 1000), // Last hour
|
|
724
|
-
end: new Date()
|
|
717
|
+
end: new Date(),
|
|
725
718
|
};
|
|
726
719
|
|
|
727
720
|
const systemMetrics = await this.queryMetrics({
|
|
728
721
|
metrics: ['cpu-usage', 'memory-usage', 'disk-usage', 'network-io'],
|
|
729
722
|
timeRange: range,
|
|
730
|
-
aggregation: 'avg'
|
|
723
|
+
aggregation: 'avg',
|
|
731
724
|
});
|
|
732
725
|
|
|
733
726
|
const appMetrics = await this.queryMetrics({
|
|
734
727
|
metrics: ['response-time', 'request-rate', 'error-rate', 'uptime'],
|
|
735
728
|
timeRange: range,
|
|
736
|
-
aggregation: 'avg'
|
|
729
|
+
aggregation: 'avg',
|
|
737
730
|
});
|
|
738
731
|
|
|
739
732
|
const dbMetrics = await this.queryMetrics({
|
|
740
733
|
metrics: ['db-connections', 'query-time', 'db-size'],
|
|
741
734
|
timeRange: range,
|
|
742
|
-
aggregation: 'avg'
|
|
735
|
+
aggregation: 'avg',
|
|
743
736
|
});
|
|
744
737
|
|
|
745
738
|
// Construct performance metrics (simplified)
|
|
@@ -748,95 +741,93 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
748
741
|
cpu: {
|
|
749
742
|
usage: this.getLatestValue(systemMetrics['cpu-usage']) || 0,
|
|
750
743
|
cores: 8, // Would be detected from system
|
|
751
|
-
loadAverage: [1.2, 1.5, 1.8] // Would be collected from system
|
|
744
|
+
loadAverage: [1.2, 1.5, 1.8], // Would be collected from system
|
|
752
745
|
},
|
|
753
746
|
memory: {
|
|
754
747
|
used: this.getLatestValue(systemMetrics['memory-usage']) || 0,
|
|
755
748
|
free: 4000000000, // Would be calculated
|
|
756
749
|
total: 8000000000,
|
|
757
|
-
usage: 50
|
|
750
|
+
usage: 50,
|
|
758
751
|
},
|
|
759
752
|
disk: {
|
|
760
753
|
used: this.getLatestValue(systemMetrics['disk-usage']) || 0,
|
|
761
754
|
free: 100000000000,
|
|
762
755
|
total: 500000000000,
|
|
763
756
|
usage: 20,
|
|
764
|
-
iops: 1000
|
|
757
|
+
iops: 1000,
|
|
765
758
|
},
|
|
766
759
|
network: {
|
|
767
760
|
bytesIn: 1000000,
|
|
768
761
|
bytesOut: 2000000,
|
|
769
762
|
packetsIn: 5000,
|
|
770
763
|
packetsOut: 6000,
|
|
771
|
-
errors: 5
|
|
772
|
-
}
|
|
764
|
+
errors: 5,
|
|
765
|
+
},
|
|
773
766
|
},
|
|
774
767
|
application: {
|
|
775
768
|
responseTime: {
|
|
776
769
|
avg: this.getLatestValue(appMetrics['response-time']) || 0,
|
|
777
770
|
p50: 150,
|
|
778
771
|
p95: 500,
|
|
779
|
-
p99: 1000
|
|
772
|
+
p99: 1000,
|
|
780
773
|
},
|
|
781
774
|
throughput: {
|
|
782
775
|
requestsPerSecond: this.getLatestValue(appMetrics['request-rate']) || 0,
|
|
783
|
-
transactionsPerSecond: 50
|
|
776
|
+
transactionsPerSecond: 50,
|
|
784
777
|
},
|
|
785
778
|
errors: {
|
|
786
779
|
rate: this.getLatestValue(appMetrics['error-rate']) || 0,
|
|
787
780
|
count: 10,
|
|
788
|
-
types: { '500': 5, '404': 3, '400': 2 }
|
|
781
|
+
types: { '500': 5, '404': 3, '400': 2 },
|
|
789
782
|
},
|
|
790
783
|
availability: {
|
|
791
784
|
uptime: this.getLatestValue(appMetrics['uptime']) || 0,
|
|
792
785
|
sla: 99.9,
|
|
793
|
-
incidents: 2
|
|
794
|
-
}
|
|
786
|
+
incidents: 2,
|
|
787
|
+
},
|
|
795
788
|
},
|
|
796
789
|
database: {
|
|
797
790
|
connections: {
|
|
798
791
|
active: 25,
|
|
799
792
|
idle: 75,
|
|
800
|
-
max: 100
|
|
793
|
+
max: 100,
|
|
801
794
|
},
|
|
802
795
|
queries: {
|
|
803
796
|
avgExecutionTime: this.getLatestValue(dbMetrics['query-time']) || 0,
|
|
804
797
|
slowQueries: 5,
|
|
805
|
-
deadlocks: 0
|
|
798
|
+
deadlocks: 0,
|
|
806
799
|
},
|
|
807
800
|
storage: {
|
|
808
801
|
size: this.getLatestValue(dbMetrics['db-size']) || 0,
|
|
809
802
|
growth: 1000000, // bytes per day
|
|
810
|
-
fragmentation: 5
|
|
811
|
-
}
|
|
803
|
+
fragmentation: 5,
|
|
804
|
+
},
|
|
812
805
|
},
|
|
813
806
|
infrastructure: {
|
|
814
807
|
containers: {
|
|
815
808
|
running: 12,
|
|
816
809
|
stopped: 2,
|
|
817
|
-
restarts: 3
|
|
810
|
+
restarts: 3,
|
|
818
811
|
},
|
|
819
812
|
services: {
|
|
820
813
|
healthy: 15,
|
|
821
814
|
unhealthy: 1,
|
|
822
|
-
degraded: 0
|
|
823
|
-
}
|
|
824
|
-
}
|
|
815
|
+
degraded: 0,
|
|
816
|
+
},
|
|
817
|
+
},
|
|
825
818
|
};
|
|
826
819
|
}
|
|
827
820
|
|
|
828
|
-
async getUsageMetrics(
|
|
829
|
-
timeRange?: { start: Date; end: Date }
|
|
830
|
-
): Promise<UsageMetrics> {
|
|
821
|
+
async getUsageMetrics(timeRange?: { start: Date; end: Date }): Promise<UsageMetrics> {
|
|
831
822
|
const range = timeRange || {
|
|
832
823
|
start: new Date(Date.now() - 24 * 60 * 60 * 1000), // Last 24 hours
|
|
833
|
-
end: new Date()
|
|
824
|
+
end: new Date(),
|
|
834
825
|
};
|
|
835
826
|
|
|
836
827
|
const usageData = await this.queryMetrics({
|
|
837
828
|
metrics: ['active-users', 'sessions', 'api-calls', 'feature-usage'],
|
|
838
829
|
timeRange: range,
|
|
839
|
-
aggregation: 'sum'
|
|
830
|
+
aggregation: 'sum',
|
|
840
831
|
});
|
|
841
832
|
|
|
842
833
|
return {
|
|
@@ -845,25 +836,25 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
845
836
|
active: this.getLatestValue(usageData['active-users']) || 0,
|
|
846
837
|
new: 50,
|
|
847
838
|
returning: 1500,
|
|
848
|
-
churn: 25
|
|
839
|
+
churn: 25,
|
|
849
840
|
},
|
|
850
841
|
sessions: {
|
|
851
842
|
total: this.getLatestValue(usageData['sessions']) || 0,
|
|
852
843
|
duration: {
|
|
853
844
|
avg: 15 * 60, // 15 minutes
|
|
854
|
-
median: 12 * 60
|
|
845
|
+
median: 12 * 60,
|
|
855
846
|
},
|
|
856
847
|
bounceRate: 25,
|
|
857
|
-
pagesPerSession: 4.5
|
|
848
|
+
pagesPerSession: 4.5,
|
|
858
849
|
},
|
|
859
850
|
features: {
|
|
860
851
|
adoption: {
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
852
|
+
dashboard: { users: 800, usage: 5000, retention: 85 },
|
|
853
|
+
reports: { users: 600, usage: 2000, retention: 70 },
|
|
854
|
+
analytics: { users: 400, usage: 1500, retention: 60 },
|
|
864
855
|
},
|
|
865
856
|
mostUsed: ['dashboard', 'reports', 'search'],
|
|
866
|
-
leastUsed: ['advanced-filters', 'export', 'integrations']
|
|
857
|
+
leastUsed: ['advanced-filters', 'export', 'integrations'],
|
|
867
858
|
},
|
|
868
859
|
api: {
|
|
869
860
|
calls: this.getLatestValue(usageData['api-calls']) || 0,
|
|
@@ -872,21 +863,19 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
872
863
|
errorRate: 2.5,
|
|
873
864
|
rateLimits: {
|
|
874
865
|
hit: 5,
|
|
875
|
-
consumed: 75
|
|
876
|
-
}
|
|
866
|
+
consumed: 75,
|
|
867
|
+
},
|
|
877
868
|
},
|
|
878
869
|
content: {
|
|
879
870
|
created: 100,
|
|
880
871
|
modified: 250,
|
|
881
872
|
deleted: 25,
|
|
882
|
-
views: 5000
|
|
883
|
-
}
|
|
873
|
+
views: 5000,
|
|
874
|
+
},
|
|
884
875
|
};
|
|
885
876
|
}
|
|
886
877
|
|
|
887
|
-
async getBusinessMetrics(
|
|
888
|
-
timeRange?: { start: Date; end: Date }
|
|
889
|
-
): Promise<BusinessMetrics> {
|
|
878
|
+
async getBusinessMetrics(timeRange?: { start: Date; end: Date }): Promise<BusinessMetrics> {
|
|
890
879
|
// This would integrate with business systems (CRM, billing, etc.)
|
|
891
880
|
return {
|
|
892
881
|
revenue: {
|
|
@@ -894,28 +883,28 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
894
883
|
recurring: 800000,
|
|
895
884
|
growth: 15,
|
|
896
885
|
arpu: 100,
|
|
897
|
-
ltv: 2400
|
|
886
|
+
ltv: 2400,
|
|
898
887
|
},
|
|
899
888
|
customers: {
|
|
900
889
|
total: 500,
|
|
901
890
|
new: 25,
|
|
902
891
|
retained: 450,
|
|
903
892
|
churned: 10,
|
|
904
|
-
satisfaction: 4.2
|
|
893
|
+
satisfaction: 4.2,
|
|
905
894
|
},
|
|
906
895
|
conversion: {
|
|
907
896
|
leads: 1000,
|
|
908
897
|
qualified: 400,
|
|
909
898
|
opportunities: 200,
|
|
910
899
|
closed: 50,
|
|
911
|
-
rate: 5
|
|
900
|
+
rate: 5,
|
|
912
901
|
},
|
|
913
902
|
support: {
|
|
914
903
|
tickets: 150,
|
|
915
904
|
resolved: 140,
|
|
916
905
|
avgResolutionTime: 4 * 60 * 60, // 4 hours
|
|
917
|
-
satisfaction: 4.5
|
|
918
|
-
}
|
|
906
|
+
satisfaction: 4.5,
|
|
907
|
+
},
|
|
919
908
|
};
|
|
920
909
|
}
|
|
921
910
|
|
|
@@ -926,36 +915,36 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
926
915
|
enabled: true,
|
|
927
916
|
samplingRate: 1.0,
|
|
928
917
|
batchSize: 1000,
|
|
929
|
-
flushInterval: 60000
|
|
918
|
+
flushInterval: 60000,
|
|
930
919
|
},
|
|
931
920
|
storage: {
|
|
932
921
|
retention: {
|
|
933
922
|
raw: '7d',
|
|
934
923
|
aggregated: '90d',
|
|
935
|
-
summary: '1y'
|
|
924
|
+
summary: '1y',
|
|
936
925
|
},
|
|
937
926
|
compression: true,
|
|
938
|
-
encryption: false
|
|
927
|
+
encryption: false,
|
|
939
928
|
},
|
|
940
929
|
processing: {
|
|
941
930
|
realTime: true,
|
|
942
931
|
batchProcessing: true,
|
|
943
|
-
aggregationIntervals: ['1m', '5m', '1h', '1d']
|
|
932
|
+
aggregationIntervals: ['1m', '5m', '1h', '1d'],
|
|
944
933
|
},
|
|
945
934
|
alerts: {
|
|
946
935
|
enabled: true,
|
|
947
936
|
channels: ['email', 'slack'],
|
|
948
937
|
escalation: {
|
|
949
938
|
levels: 3,
|
|
950
|
-
intervals: [5, 15, 30] // minutes
|
|
951
|
-
}
|
|
939
|
+
intervals: [5, 15, 30], // minutes
|
|
940
|
+
},
|
|
952
941
|
},
|
|
953
942
|
privacy: {
|
|
954
943
|
anonymization: true,
|
|
955
944
|
gdprCompliant: true,
|
|
956
|
-
dataMinimization: true
|
|
945
|
+
dataMinimization: true,
|
|
957
946
|
},
|
|
958
|
-
integrations: {}
|
|
947
|
+
integrations: {},
|
|
959
948
|
};
|
|
960
949
|
}
|
|
961
950
|
|
|
@@ -963,7 +952,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
963
952
|
try {
|
|
964
953
|
// Load dashboards
|
|
965
954
|
const dashboardFiles = await readdir(join(this.analyticsPath, 'dashboards'));
|
|
966
|
-
for (const file of dashboardFiles.filter(f => f.endsWith('.json'))) {
|
|
955
|
+
for (const file of dashboardFiles.filter((f) => f.endsWith('.json'))) {
|
|
967
956
|
const content = await readFile(join(this.analyticsPath, 'dashboards', file), 'utf-8');
|
|
968
957
|
const dashboard: AnalyticsDashboard = JSON.parse(content);
|
|
969
958
|
this.dashboards.set(dashboard.id, dashboard);
|
|
@@ -971,7 +960,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
971
960
|
|
|
972
961
|
// Load insights
|
|
973
962
|
const insightFiles = await readdir(join(this.analyticsPath, 'insights'));
|
|
974
|
-
for (const file of insightFiles.filter(f => f.endsWith('.json'))) {
|
|
963
|
+
for (const file of insightFiles.filter((f) => f.endsWith('.json'))) {
|
|
975
964
|
const content = await readFile(join(this.analyticsPath, 'insights', file), 'utf-8');
|
|
976
965
|
const insight: AnalyticsInsight = JSON.parse(content);
|
|
977
966
|
this.insights.set(insight.id, insight);
|
|
@@ -979,13 +968,15 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
979
968
|
|
|
980
969
|
// Load models
|
|
981
970
|
const modelFiles = await readdir(join(this.analyticsPath, 'models'));
|
|
982
|
-
for (const file of modelFiles.filter(f => f.endsWith('.json'))) {
|
|
971
|
+
for (const file of modelFiles.filter((f) => f.endsWith('.json'))) {
|
|
983
972
|
const content = await readFile(join(this.analyticsPath, 'models', file), 'utf-8');
|
|
984
973
|
const model: PredictiveModel = JSON.parse(content);
|
|
985
974
|
this.models.set(model.id, model);
|
|
986
975
|
}
|
|
987
976
|
|
|
988
|
-
this.logger.info(
|
|
977
|
+
this.logger.info(
|
|
978
|
+
`Loaded ${this.dashboards.size} dashboards, ${this.insights.size} insights, ${this.models.size} models`,
|
|
979
|
+
);
|
|
989
980
|
} catch (error) {
|
|
990
981
|
this.logger.warn('Failed to load some analytics configurations', { error });
|
|
991
982
|
}
|
|
@@ -1008,14 +999,14 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1008
999
|
metrics: ['cpu-usage'],
|
|
1009
1000
|
aggregation: 'avg' as const,
|
|
1010
1001
|
timeRange: '1h',
|
|
1011
|
-
groupBy: []
|
|
1002
|
+
groupBy: [],
|
|
1012
1003
|
},
|
|
1013
1004
|
visualization: {
|
|
1014
1005
|
chartType: 'gauge' as const,
|
|
1015
1006
|
options: { max: 100, unit: '%' },
|
|
1016
|
-
thresholds: { warning: 70, critical: 90 }
|
|
1007
|
+
thresholds: { warning: 70, critical: 90 },
|
|
1017
1008
|
},
|
|
1018
|
-
alerts: { enabled: true, conditions: [] }
|
|
1009
|
+
alerts: { enabled: true, conditions: [] },
|
|
1019
1010
|
},
|
|
1020
1011
|
{
|
|
1021
1012
|
title: 'Memory Usage',
|
|
@@ -1027,14 +1018,14 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1027
1018
|
metrics: ['memory-usage'],
|
|
1028
1019
|
aggregation: 'avg' as const,
|
|
1029
1020
|
timeRange: '1h',
|
|
1030
|
-
groupBy: []
|
|
1021
|
+
groupBy: [],
|
|
1031
1022
|
},
|
|
1032
1023
|
visualization: {
|
|
1033
1024
|
chartType: 'gauge' as const,
|
|
1034
1025
|
options: { max: 100, unit: '%' },
|
|
1035
|
-
thresholds: { warning: 80, critical: 95 }
|
|
1026
|
+
thresholds: { warning: 80, critical: 95 },
|
|
1036
1027
|
},
|
|
1037
|
-
alerts: { enabled: true, conditions: [] }
|
|
1028
|
+
alerts: { enabled: true, conditions: [] },
|
|
1038
1029
|
},
|
|
1039
1030
|
{
|
|
1040
1031
|
title: 'Response Time',
|
|
@@ -1046,15 +1037,15 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1046
1037
|
metrics: ['response-time'],
|
|
1047
1038
|
aggregation: 'avg' as const,
|
|
1048
1039
|
timeRange: '24h',
|
|
1049
|
-
groupBy: ['service']
|
|
1040
|
+
groupBy: ['service'],
|
|
1050
1041
|
},
|
|
1051
1042
|
visualization: {
|
|
1052
1043
|
chartType: 'line' as const,
|
|
1053
|
-
options: { unit: 'ms' }
|
|
1044
|
+
options: { unit: 'ms' },
|
|
1054
1045
|
},
|
|
1055
|
-
alerts: { enabled: false, conditions: [] }
|
|
1056
|
-
}
|
|
1057
|
-
]
|
|
1046
|
+
alerts: { enabled: false, conditions: [] },
|
|
1047
|
+
},
|
|
1048
|
+
],
|
|
1058
1049
|
},
|
|
1059
1050
|
{
|
|
1060
1051
|
name: 'Business KPIs',
|
|
@@ -1071,19 +1062,19 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1071
1062
|
metrics: ['active-users'],
|
|
1072
1063
|
aggregation: 'count' as const,
|
|
1073
1064
|
timeRange: '24h',
|
|
1074
|
-
groupBy: []
|
|
1065
|
+
groupBy: [],
|
|
1075
1066
|
},
|
|
1076
1067
|
visualization: {
|
|
1077
|
-
options: { unit: 'users' }
|
|
1068
|
+
options: { unit: 'users' },
|
|
1078
1069
|
},
|
|
1079
|
-
alerts: { enabled: false, conditions: [] }
|
|
1080
|
-
}
|
|
1081
|
-
]
|
|
1082
|
-
}
|
|
1070
|
+
alerts: { enabled: false, conditions: [] },
|
|
1071
|
+
},
|
|
1072
|
+
],
|
|
1073
|
+
},
|
|
1083
1074
|
];
|
|
1084
1075
|
|
|
1085
1076
|
for (const dashboardData of defaultDashboards) {
|
|
1086
|
-
if (!Array.from(this.dashboards.values()).some(d => d.name === dashboardData.name)) {
|
|
1077
|
+
if (!Array.from(this.dashboards.values()).some((d) => d.name === dashboardData.name)) {
|
|
1087
1078
|
await this.createDashboard(dashboardData);
|
|
1088
1079
|
}
|
|
1089
1080
|
}
|
|
@@ -1115,7 +1106,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1115
1106
|
value: Math.random() * 100,
|
|
1116
1107
|
tags: { host: 'localhost', service: 'system' },
|
|
1117
1108
|
source: 'system-monitor',
|
|
1118
|
-
metadata: {}
|
|
1109
|
+
metadata: {},
|
|
1119
1110
|
});
|
|
1120
1111
|
|
|
1121
1112
|
await this.recordMetric({
|
|
@@ -1127,7 +1118,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1127
1118
|
value: Math.random() * 100,
|
|
1128
1119
|
tags: { host: 'localhost', service: 'system' },
|
|
1129
1120
|
source: 'system-monitor',
|
|
1130
|
-
metadata: {}
|
|
1121
|
+
metadata: {},
|
|
1131
1122
|
});
|
|
1132
1123
|
|
|
1133
1124
|
await this.recordMetric({
|
|
@@ -1139,7 +1130,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1139
1130
|
value: Math.random() * 100,
|
|
1140
1131
|
tags: { host: 'localhost', service: 'system' },
|
|
1141
1132
|
source: 'system-monitor',
|
|
1142
|
-
metadata: {}
|
|
1133
|
+
metadata: {},
|
|
1143
1134
|
});
|
|
1144
1135
|
} catch (error) {
|
|
1145
1136
|
this.logger.error('Failed to collect system metrics', { error });
|
|
@@ -1158,7 +1149,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1158
1149
|
value: Math.random() * 1000 + 100,
|
|
1159
1150
|
tags: { service: 'api', endpoint: '/users' },
|
|
1160
1151
|
source: 'application',
|
|
1161
|
-
metadata: {}
|
|
1152
|
+
metadata: {},
|
|
1162
1153
|
});
|
|
1163
1154
|
|
|
1164
1155
|
await this.recordMetric({
|
|
@@ -1170,7 +1161,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1170
1161
|
value: Math.random() * 100 + 10,
|
|
1171
1162
|
tags: { service: 'api' },
|
|
1172
1163
|
source: 'application',
|
|
1173
|
-
metadata: {}
|
|
1164
|
+
metadata: {},
|
|
1174
1165
|
});
|
|
1175
1166
|
|
|
1176
1167
|
await this.recordMetric({
|
|
@@ -1182,7 +1173,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1182
1173
|
value: Math.random() * 5,
|
|
1183
1174
|
tags: { service: 'api' },
|
|
1184
1175
|
source: 'application',
|
|
1185
|
-
metadata: {}
|
|
1176
|
+
metadata: {},
|
|
1186
1177
|
});
|
|
1187
1178
|
} catch (error) {
|
|
1188
1179
|
this.logger.error('Failed to collect application metrics', { error });
|
|
@@ -1192,7 +1183,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1192
1183
|
private async persistMetric(metric: AnalyticsMetric): Promise<void> {
|
|
1193
1184
|
const date = metric.timestamp.toISOString().split('T')[0];
|
|
1194
1185
|
const filePath = join(this.analyticsPath, 'metrics', `${date}.json`);
|
|
1195
|
-
|
|
1186
|
+
|
|
1196
1187
|
try {
|
|
1197
1188
|
let existingData: AnalyticsMetric[] = [];
|
|
1198
1189
|
try {
|
|
@@ -1201,7 +1192,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1201
1192
|
} catch {
|
|
1202
1193
|
// File doesn't exist yet
|
|
1203
1194
|
}
|
|
1204
|
-
|
|
1195
|
+
|
|
1205
1196
|
existingData.push(metric);
|
|
1206
1197
|
await writeFile(filePath, JSON.stringify(existingData, null, 2));
|
|
1207
1198
|
} catch (error) {
|
|
@@ -1216,7 +1207,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1216
1207
|
const recent = historical.slice(-10);
|
|
1217
1208
|
const average = recent.reduce((sum, m) => sum + m.value, 0) / recent.length;
|
|
1218
1209
|
const stdDev = Math.sqrt(
|
|
1219
|
-
recent.reduce((sum, m) => sum + Math.pow(m.value - average, 2), 0) / recent.length
|
|
1210
|
+
recent.reduce((sum, m) => sum + Math.pow(m.value - average, 2), 0) / recent.length,
|
|
1220
1211
|
);
|
|
1221
1212
|
|
|
1222
1213
|
const threshold = 2; // 2 standard deviations
|
|
@@ -1237,7 +1228,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1237
1228
|
timeRange: { start: recent[0].timestamp, end: metric.timestamp },
|
|
1238
1229
|
values: { current: metric.value, average, stdDev },
|
|
1239
1230
|
baseline: { average, stdDev },
|
|
1240
|
-
deviation
|
|
1231
|
+
deviation,
|
|
1241
1232
|
},
|
|
1242
1233
|
recommendations: [
|
|
1243
1234
|
{
|
|
@@ -1247,30 +1238,30 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1247
1238
|
implementation: [
|
|
1248
1239
|
'Check recent deployments or configuration changes',
|
|
1249
1240
|
'Review system logs for errors or warnings',
|
|
1250
|
-
'Monitor related metrics for correlation'
|
|
1251
|
-
]
|
|
1252
|
-
}
|
|
1241
|
+
'Monitor related metrics for correlation',
|
|
1242
|
+
],
|
|
1243
|
+
},
|
|
1253
1244
|
],
|
|
1254
1245
|
status: 'new',
|
|
1255
1246
|
createdAt: new Date(),
|
|
1256
|
-
updatedAt: new Date()
|
|
1247
|
+
updatedAt: new Date(),
|
|
1257
1248
|
};
|
|
1258
1249
|
|
|
1259
1250
|
this.insights.set(insight.id, insight);
|
|
1260
1251
|
await this.saveInsight(insight);
|
|
1261
1252
|
|
|
1262
1253
|
this.emit('anomaly:detected', { metric, insight, deviation });
|
|
1263
|
-
this.logger.warn(`Anomaly detected in ${metric.name}`, {
|
|
1264
|
-
current: metric.value,
|
|
1265
|
-
average,
|
|
1266
|
-
deviation
|
|
1254
|
+
this.logger.warn(`Anomaly detected in ${metric.name}`, {
|
|
1255
|
+
current: metric.value,
|
|
1256
|
+
average,
|
|
1257
|
+
deviation,
|
|
1267
1258
|
});
|
|
1268
1259
|
}
|
|
1269
1260
|
}
|
|
1270
1261
|
|
|
1271
1262
|
private async detectAnomalies(
|
|
1272
1263
|
timeRange: { start: Date; end: Date },
|
|
1273
|
-
metrics?: string[]
|
|
1264
|
+
metrics?: string[],
|
|
1274
1265
|
): Promise<AnalyticsInsight[]> {
|
|
1275
1266
|
// Simplified anomaly detection
|
|
1276
1267
|
return [];
|
|
@@ -1278,22 +1269,23 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1278
1269
|
|
|
1279
1270
|
private async analyzeTrends(
|
|
1280
1271
|
timeRange: { start: Date; end: Date },
|
|
1281
|
-
metrics?: string[]
|
|
1272
|
+
metrics?: string[],
|
|
1282
1273
|
): Promise<AnalyticsInsight[]> {
|
|
1283
1274
|
// Simplified trend analysis
|
|
1284
1275
|
return [];
|
|
1285
1276
|
}
|
|
1286
1277
|
|
|
1287
|
-
private async analyzePerformance(
|
|
1288
|
-
|
|
1289
|
-
|
|
1278
|
+
private async analyzePerformance(timeRange: {
|
|
1279
|
+
start: Date;
|
|
1280
|
+
end: Date;
|
|
1281
|
+
}): Promise<AnalyticsInsight[]> {
|
|
1290
1282
|
const insights: AnalyticsInsight[] = [];
|
|
1291
1283
|
|
|
1292
1284
|
// Check response time trends
|
|
1293
1285
|
const responseTimeData = await this.queryMetrics({
|
|
1294
1286
|
metrics: ['response-time'],
|
|
1295
1287
|
timeRange,
|
|
1296
|
-
aggregation: 'avg'
|
|
1288
|
+
aggregation: 'avg',
|
|
1297
1289
|
});
|
|
1298
1290
|
|
|
1299
1291
|
if (responseTimeData['response-time']?.length > 0) {
|
|
@@ -1321,33 +1313,36 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1321
1313
|
timeRange,
|
|
1322
1314
|
values: { recent: recentAvg, earlier: earlierAvg, change },
|
|
1323
1315
|
},
|
|
1324
|
-
recommendations:
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1316
|
+
recommendations:
|
|
1317
|
+
change > 0
|
|
1318
|
+
? [
|
|
1319
|
+
{
|
|
1320
|
+
action: 'Investigate performance degradation',
|
|
1321
|
+
effort: 'medium',
|
|
1322
|
+
impact: 'Restore optimal response times',
|
|
1323
|
+
implementation: [
|
|
1324
|
+
'Check for increased load or traffic',
|
|
1325
|
+
'Review recent code deployments',
|
|
1326
|
+
'Analyze database query performance',
|
|
1327
|
+
'Monitor resource utilization',
|
|
1328
|
+
],
|
|
1329
|
+
},
|
|
1330
|
+
]
|
|
1331
|
+
: [
|
|
1332
|
+
{
|
|
1333
|
+
action: 'Document performance improvement',
|
|
1334
|
+
effort: 'low',
|
|
1335
|
+
impact: 'Understand what caused the improvement',
|
|
1336
|
+
implementation: [
|
|
1337
|
+
'Identify recent optimizations',
|
|
1338
|
+
'Document best practices',
|
|
1339
|
+
'Monitor sustainability',
|
|
1340
|
+
],
|
|
1341
|
+
},
|
|
1342
|
+
],
|
|
1348
1343
|
status: 'new',
|
|
1349
1344
|
createdAt: new Date(),
|
|
1350
|
-
updatedAt: new Date()
|
|
1345
|
+
updatedAt: new Date(),
|
|
1351
1346
|
});
|
|
1352
1347
|
}
|
|
1353
1348
|
}
|
|
@@ -1356,16 +1351,15 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1356
1351
|
return insights;
|
|
1357
1352
|
}
|
|
1358
1353
|
|
|
1359
|
-
private async analyzeUsage(
|
|
1360
|
-
timeRange: { start: Date; end: Date }
|
|
1361
|
-
): Promise<AnalyticsInsight[]> {
|
|
1354
|
+
private async analyzeUsage(timeRange: { start: Date; end: Date }): Promise<AnalyticsInsight[]> {
|
|
1362
1355
|
// Simplified usage analysis
|
|
1363
1356
|
return [];
|
|
1364
1357
|
}
|
|
1365
1358
|
|
|
1366
|
-
private async analyzeCostOptimization(
|
|
1367
|
-
|
|
1368
|
-
|
|
1359
|
+
private async analyzeCostOptimization(timeRange: {
|
|
1360
|
+
start: Date;
|
|
1361
|
+
end: Date;
|
|
1362
|
+
}): Promise<AnalyticsInsight[]> {
|
|
1369
1363
|
// Simplified cost optimization analysis
|
|
1370
1364
|
return [];
|
|
1371
1365
|
}
|
|
@@ -1375,14 +1369,17 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1375
1369
|
const data = await this.queryMetrics({
|
|
1376
1370
|
metrics: model.features,
|
|
1377
1371
|
timeRange: model.trainingData.timeRange,
|
|
1378
|
-
aggregation: 'avg'
|
|
1372
|
+
aggregation: 'avg',
|
|
1379
1373
|
});
|
|
1380
1374
|
|
|
1381
1375
|
// Transform data for ML training (simplified)
|
|
1382
1376
|
return Object.values(data).flat();
|
|
1383
1377
|
}
|
|
1384
1378
|
|
|
1385
|
-
private async executeModelTraining(
|
|
1379
|
+
private async executeModelTraining(
|
|
1380
|
+
model: PredictiveModel,
|
|
1381
|
+
data: any[],
|
|
1382
|
+
): Promise<Partial<PredictiveModel>> {
|
|
1386
1383
|
// Simplified model training
|
|
1387
1384
|
return {
|
|
1388
1385
|
accuracy: 85 + Math.random() * 10,
|
|
@@ -1390,40 +1387,50 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1390
1387
|
performance: {
|
|
1391
1388
|
precision: 0.85,
|
|
1392
1389
|
recall: 0.82,
|
|
1393
|
-
f1Score: 0.83
|
|
1390
|
+
f1Score: 0.83,
|
|
1394
1391
|
},
|
|
1395
1392
|
trainingData: {
|
|
1396
1393
|
...model.trainingData,
|
|
1397
|
-
samples: data.length
|
|
1398
|
-
}
|
|
1394
|
+
samples: data.length,
|
|
1395
|
+
},
|
|
1399
1396
|
};
|
|
1400
1397
|
}
|
|
1401
1398
|
|
|
1402
|
-
private async executePrediction(
|
|
1399
|
+
private async executePrediction(
|
|
1400
|
+
model: PredictiveModel,
|
|
1401
|
+
input: Record<string, any>,
|
|
1402
|
+
): Promise<{ value: any; confidence: number }> {
|
|
1403
1403
|
// Simplified prediction logic
|
|
1404
1404
|
const value = Math.random() * 100;
|
|
1405
1405
|
const confidence = 70 + Math.random() * 25;
|
|
1406
|
-
|
|
1406
|
+
|
|
1407
1407
|
return { value, confidence };
|
|
1408
1408
|
}
|
|
1409
1409
|
|
|
1410
|
-
private groupMetrics(
|
|
1410
|
+
private groupMetrics(
|
|
1411
|
+
metrics: AnalyticsMetric[],
|
|
1412
|
+
groupBy: string[],
|
|
1413
|
+
): Record<string, AnalyticsMetric[]> {
|
|
1411
1414
|
const groups: Record<string, AnalyticsMetric[]> = {};
|
|
1412
|
-
|
|
1415
|
+
|
|
1413
1416
|
for (const metric of metrics) {
|
|
1414
|
-
const key = groupBy
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1417
|
+
const key = groupBy
|
|
1418
|
+
.map((field) => {
|
|
1419
|
+
if (field === 'tags') {
|
|
1420
|
+
return Object.entries(metric.tags)
|
|
1421
|
+
.map(([k, v]) => `${k}:${v}`)
|
|
1422
|
+
.join(',');
|
|
1423
|
+
}
|
|
1424
|
+
return (metric as any)[field] || 'unknown';
|
|
1425
|
+
})
|
|
1426
|
+
.join('-');
|
|
1427
|
+
|
|
1421
1428
|
if (!groups[key]) {
|
|
1422
1429
|
groups[key] = [];
|
|
1423
1430
|
}
|
|
1424
1431
|
groups[key].push(metric);
|
|
1425
1432
|
}
|
|
1426
|
-
|
|
1433
|
+
|
|
1427
1434
|
return groups;
|
|
1428
1435
|
}
|
|
1429
1436
|
|
|
@@ -1432,7 +1439,7 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1432
1439
|
|
|
1433
1440
|
// Group by time buckets for time series aggregation
|
|
1434
1441
|
const buckets: Record<string, AnalyticsMetric[]> = {};
|
|
1435
|
-
|
|
1442
|
+
|
|
1436
1443
|
for (const metric of metrics) {
|
|
1437
1444
|
const bucket = new Date(Math.floor(metric.timestamp.getTime() / 60000) * 60000).toISOString();
|
|
1438
1445
|
if (!buckets[bucket]) {
|
|
@@ -1441,42 +1448,44 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1441
1448
|
buckets[bucket].push(metric);
|
|
1442
1449
|
}
|
|
1443
1450
|
|
|
1444
|
-
return Object.entries(buckets)
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1451
|
+
return Object.entries(buckets)
|
|
1452
|
+
.map(([timestamp, bucketMetrics]) => {
|
|
1453
|
+
const values = bucketMetrics.map((m) => m.value);
|
|
1454
|
+
let aggregatedValue: number;
|
|
1455
|
+
|
|
1456
|
+
switch (aggregation) {
|
|
1457
|
+
case 'sum':
|
|
1458
|
+
aggregatedValue = values.reduce((sum, v) => sum + v, 0);
|
|
1459
|
+
break;
|
|
1460
|
+
case 'min':
|
|
1461
|
+
aggregatedValue = Math.min(...values);
|
|
1462
|
+
break;
|
|
1463
|
+
case 'max':
|
|
1464
|
+
aggregatedValue = Math.max(...values);
|
|
1465
|
+
break;
|
|
1466
|
+
case 'count':
|
|
1467
|
+
aggregatedValue = values.length;
|
|
1468
|
+
break;
|
|
1469
|
+
case 'p95':
|
|
1470
|
+
values.sort((a, b) => a - b);
|
|
1471
|
+
aggregatedValue = values[Math.floor(values.length * 0.95)];
|
|
1472
|
+
break;
|
|
1473
|
+
case 'p99':
|
|
1474
|
+
values.sort((a, b) => a - b);
|
|
1475
|
+
aggregatedValue = values[Math.floor(values.length * 0.99)];
|
|
1476
|
+
break;
|
|
1477
|
+
case 'avg':
|
|
1478
|
+
default:
|
|
1479
|
+
aggregatedValue = values.reduce((sum, v) => sum + v, 0) / values.length;
|
|
1480
|
+
}
|
|
1473
1481
|
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1482
|
+
return {
|
|
1483
|
+
timestamp: new Date(timestamp),
|
|
1484
|
+
value: aggregatedValue,
|
|
1485
|
+
count: values.length,
|
|
1486
|
+
};
|
|
1487
|
+
})
|
|
1488
|
+
.sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime());
|
|
1480
1489
|
}
|
|
1481
1490
|
|
|
1482
1491
|
private getLatestValue(dataPoints: any[]): number {
|
|
@@ -1498,4 +1507,4 @@ export class AnalyticsManager extends EventEmitter {
|
|
|
1498
1507
|
const filePath = join(this.analyticsPath, 'models', `${model.id}.json`);
|
|
1499
1508
|
await writeFile(filePath, JSON.stringify(model, null, 2));
|
|
1500
1509
|
}
|
|
1501
|
-
}
|
|
1510
|
+
}
|