claude-flow 2.7.0 → 2.7.2
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 +42 -0
- package/README.md +83 -22
- package/bin/claude-flow +1 -1
- package/dist/src/cli/commands/memory.js +64 -1
- package/dist/src/cli/commands/memory.js.map +1 -1
- package/dist/src/cli/help-formatter.js +3 -5
- package/dist/src/cli/help-formatter.js.map +1 -1
- package/dist/src/cli/simple-cli.js +104 -0
- package/dist/src/cli/simple-cli.js.map +1 -1
- package/dist/src/cli/validation-helper.js.map +1 -1
- package/dist/src/core/version.js +1 -1
- package/dist/src/core/version.js.map +1 -1
- package/dist/src/mcp/mcp-server.js +261 -3
- package/dist/src/mcp/mcp-server.js.map +1 -1
- package/dist/src/memory/agentdb-adapter.js +214 -0
- package/dist/src/memory/agentdb-adapter.js.map +1 -0
- package/dist/src/memory/backends/agentdb.js +234 -0
- package/dist/src/memory/backends/agentdb.js.map +1 -0
- package/dist/src/memory/index.js +11 -2
- package/dist/src/memory/index.js.map +1 -1
- package/dist/src/memory/migration/legacy-bridge.js +222 -0
- package/dist/src/memory/migration/legacy-bridge.js.map +1 -0
- package/dist/src/memory/swarm-memory.js +421 -340
- package/dist/src/memory/swarm-memory.js.map +1 -1
- package/dist/src/utils/metrics-reader.js +41 -29
- package/dist/src/utils/metrics-reader.js.map +1 -1
- package/docs/.claude-flow/metrics/performance.json +80 -2
- package/docs/.claude-flow/metrics/task-metrics.json +3 -3
- package/docs/INDEX.md +37 -12
- package/docs/README.md +92 -4
- package/docs/agentdb/AGENT3_FINAL_REPORT.md +643 -0
- package/docs/agentdb/AGENT3_SUMMARY.md +354 -0
- package/docs/agentdb/AGENTDB_INTEGRATION_PLAN.md +1258 -0
- package/docs/agentdb/BACKWARD_COMPATIBILITY_GUARANTEE.md +421 -0
- package/docs/agentdb/OPTIMIZATION_REPORT.md +360 -0
- package/docs/agentdb/PRODUCTION_READINESS.md +499 -0
- package/docs/agentdb/PUBLISHING_CHECKLIST.md +364 -0
- package/docs/agentdb/README.md +58 -0
- package/docs/agentdb/SWARM_COORDINATION.md +393 -0
- package/docs/agentdb/SWARM_IMPLEMENTATION_COMPLETE.md +538 -0
- package/docs/agentdb/agentdb-integration-summary.md +331 -0
- package/docs/agentdb/benchmarks/baseline-report.json +75 -0
- package/docs/development/AGENT1_COMPLETION_REPORT.md +466 -0
- package/docs/development/README.md +22 -0
- package/docs/fixes/PATTERN_FIX_CONFIRMATION.md +513 -0
- package/docs/fixes/PATTERN_PERSISTENCE_FIX.md +328 -0
- package/docs/fixes/README.md +33 -0
- package/docs/guides/README.md +29 -0
- package/docs/{skills-tutorial.md → guides/skills-tutorial.md} +2 -2
- package/docs/integrations/agentic-flow/INTEGRATION-TEST-v1.7.1.md +419 -0
- package/docs/integrations/agentic-flow/MIGRATION_v1.7.0.md +381 -0
- package/docs/integrations/agentic-flow/README.md +229 -0
- package/docs/integrations/agentic-flow/RELEASE-v1.7.0.md +348 -0
- package/docs/integrations/agentic-flow/RELEASE-v1.7.1.md +547 -0
- package/docs/integrations/agentic-flow/VERIFICATION-v1.7.4.md +556 -0
- package/docs/performance/README.md +31 -0
- package/docs/releases/ALPHA_TAG_UPDATE.md +150 -0
- package/docs/releases/README.md +25 -0
- package/docs/{RELEASE-NOTES-v2.7.0-alpha.10.md → releases/v2.7.0-alpha.10/RELEASE-NOTES-v2.7.0-alpha.10.md} +1 -1
- package/docs/releases/v2.7.1/RELEASE_SUMMARY_v2.7.1.md +340 -0
- package/docs/releases/v2.7.1/RELEASE_v2.7.1.md +244 -0
- package/docs/validation/DOCKER_VERIFICATION_REPORT.md +371 -0
- package/docs/validation/README.md +25 -0
- package/docs/validation/REGRESSION_ANALYSIS_v2.7.1.md +357 -0
- package/package.json +4 -3
- package/scripts/fix-agentdb-imports.sh +18 -0
- package/scripts/run-docker-regression.sh +101 -0
- package/scripts/verify-agentdb-integration.sh +220 -0
- package/src/cli/commands/memory.ts +95 -1
- package/src/mcp/mcp-server.js +302 -2
- package/src/memory/README-AGENTDB.md +366 -0
- package/src/memory/agentdb-adapter.js +373 -0
- package/src/memory/backends/agentdb.js +360 -0
- package/src/memory/index.js +32 -3
- package/src/memory/migration/legacy-bridge.js +330 -0
- package/dist/agents/agent-loader.d.ts +0 -103
- package/dist/agents/agent-loader.d.ts.map +0 -1
- package/dist/agents/agent-loader.js +0 -220
- package/dist/agents/agent-loader.js.map +0 -1
- package/dist/agents/agent-manager.d.ts +0 -191
- package/dist/agents/agent-manager.d.ts.map +0 -1
- package/dist/agents/agent-manager.js +0 -1405
- package/dist/agents/agent-manager.js.map +0 -1
- package/dist/api/claude-api-errors.d.ts +0 -115
- package/dist/api/claude-api-errors.d.ts.map +0 -1
- package/dist/api/claude-api-errors.js +0 -198
- package/dist/api/claude-api-errors.js.map +0 -1
- package/dist/api/claude-client.d.ts +0 -197
- package/dist/api/claude-client.d.ts.map +0 -1
- package/dist/api/claude-client.js +0 -525
- package/dist/api/claude-client.js.map +0 -1
- package/dist/cli/cli-core.d.ts +0 -52
- package/dist/cli/cli-core.d.ts.map +0 -1
- package/dist/cli/cli-core.js +0 -264
- package/dist/cli/cli-core.js.map +0 -1
- package/dist/cli/command-registry.d.ts +0 -10
- package/dist/cli/command-registry.d.ts.map +0 -1
- package/dist/cli/command-registry.js +0 -1126
- package/dist/cli/command-registry.js.map +0 -1
- package/dist/cli/commander-fix.d.ts +0 -4
- package/dist/cli/commander-fix.d.ts.map +0 -1
- package/dist/cli/commander-fix.js +0 -6
- package/dist/cli/commander-fix.js.map +0 -1
- package/dist/cli/commands/agent.d.ts +0 -6
- package/dist/cli/commands/agent.d.ts.map +0 -1
- package/dist/cli/commands/agent.js +0 -382
- package/dist/cli/commands/agent.js.map +0 -1
- package/dist/cli/commands/config.d.ts +0 -4
- package/dist/cli/commands/config.d.ts.map +0 -1
- package/dist/cli/commands/config.js +0 -88
- package/dist/cli/commands/config.js.map +0 -1
- package/dist/cli/commands/enterprise.d.ts +0 -3
- package/dist/cli/commands/enterprise.d.ts.map +0 -1
- package/dist/cli/commands/enterprise.js +0 -1506
- package/dist/cli/commands/enterprise.js.map +0 -1
- package/dist/cli/commands/help.d.ts +0 -6
- package/dist/cli/commands/help.d.ts.map +0 -1
- package/dist/cli/commands/help.js +0 -936
- package/dist/cli/commands/help.js.map +0 -1
- package/dist/cli/commands/hive-mind/index.d.ts +0 -18
- package/dist/cli/commands/hive-mind/index.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/index.js +0 -30
- package/dist/cli/commands/hive-mind/index.js.map +0 -1
- package/dist/cli/commands/hive-mind/init.d.ts +0 -9
- package/dist/cli/commands/hive-mind/init.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/init.js +0 -68
- package/dist/cli/commands/hive-mind/init.js.map +0 -1
- package/dist/cli/commands/hive-mind/pause.d.ts +0 -8
- package/dist/cli/commands/hive-mind/pause.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/pause.js +0 -81
- package/dist/cli/commands/hive-mind/pause.js.map +0 -1
- package/dist/cli/commands/hive-mind/ps.d.ts +0 -8
- package/dist/cli/commands/hive-mind/ps.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/ps.js +0 -120
- package/dist/cli/commands/hive-mind/ps.js.map +0 -1
- package/dist/cli/commands/hive-mind/resume.d.ts +0 -8
- package/dist/cli/commands/hive-mind/resume.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/resume.js +0 -62
- package/dist/cli/commands/hive-mind/resume.js.map +0 -1
- package/dist/cli/commands/hive-mind/spawn.d.ts +0 -9
- package/dist/cli/commands/hive-mind/spawn.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/spawn.js +0 -174
- package/dist/cli/commands/hive-mind/spawn.js.map +0 -1
- package/dist/cli/commands/hive-mind/status.d.ts +0 -9
- package/dist/cli/commands/hive-mind/status.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/status.js +0 -204
- package/dist/cli/commands/hive-mind/status.js.map +0 -1
- package/dist/cli/commands/hive-mind/stop.d.ts +0 -8
- package/dist/cli/commands/hive-mind/stop.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/stop.js +0 -125
- package/dist/cli/commands/hive-mind/stop.js.map +0 -1
- package/dist/cli/commands/hive-mind/task.d.ts +0 -9
- package/dist/cli/commands/hive-mind/task.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/task.js +0 -294
- package/dist/cli/commands/hive-mind/task.js.map +0 -1
- package/dist/cli/commands/hive-mind/wizard.d.ts +0 -9
- package/dist/cli/commands/hive-mind/wizard.d.ts.map +0 -1
- package/dist/cli/commands/hive-mind/wizard.js +0 -531
- package/dist/cli/commands/hive-mind/wizard.js.map +0 -1
- package/dist/cli/commands/hive.d.ts +0 -6
- package/dist/cli/commands/hive.d.ts.map +0 -1
- package/dist/cli/commands/hive.js +0 -409
- package/dist/cli/commands/hive.js.map +0 -1
- package/dist/cli/commands/index.d.ts +0 -3
- package/dist/cli/commands/index.d.ts.map +0 -1
- package/dist/cli/commands/index.js +0 -2624
- package/dist/cli/commands/index.js.map +0 -1
- package/dist/cli/commands/mcp.d.ts +0 -5
- package/dist/cli/commands/mcp.d.ts.map +0 -1
- package/dist/cli/commands/mcp.js +0 -169
- package/dist/cli/commands/mcp.js.map +0 -1
- package/dist/cli/commands/memory.d.ts +0 -26
- package/dist/cli/commands/memory.d.ts.map +0 -1
- package/dist/cli/commands/memory.js +0 -225
- package/dist/cli/commands/memory.js.map +0 -1
- package/dist/cli/commands/migrate.d.ts +0 -5
- package/dist/cli/commands/migrate.d.ts.map +0 -1
- package/dist/cli/commands/migrate.js +0 -139
- package/dist/cli/commands/migrate.js.map +0 -1
- package/dist/cli/commands/monitor.d.ts +0 -5
- package/dist/cli/commands/monitor.d.ts.map +0 -1
- package/dist/cli/commands/monitor.js +0 -493
- package/dist/cli/commands/monitor.js.map +0 -1
- package/dist/cli/commands/session.d.ts +0 -5
- package/dist/cli/commands/session.d.ts.map +0 -1
- package/dist/cli/commands/session.js +0 -548
- package/dist/cli/commands/session.js.map +0 -1
- package/dist/cli/commands/sparc.d.ts +0 -3
- package/dist/cli/commands/sparc.d.ts.map +0 -1
- package/dist/cli/commands/sparc.js +0 -472
- package/dist/cli/commands/sparc.js.map +0 -1
- package/dist/cli/commands/start/event-emitter.d.ts +0 -13
- package/dist/cli/commands/start/event-emitter.d.ts.map +0 -1
- package/dist/cli/commands/start/event-emitter.js +0 -35
- package/dist/cli/commands/start/event-emitter.js.map +0 -1
- package/dist/cli/commands/start/index.d.ts +0 -10
- package/dist/cli/commands/start/index.d.ts.map +0 -1
- package/dist/cli/commands/start/index.js +0 -9
- package/dist/cli/commands/start/index.js.map +0 -1
- package/dist/cli/commands/start/process-manager.d.ts +0 -31
- package/dist/cli/commands/start/process-manager.d.ts.map +0 -1
- package/dist/cli/commands/start/process-manager.js +0 -283
- package/dist/cli/commands/start/process-manager.js.map +0 -1
- package/dist/cli/commands/start/process-ui-simple.d.ts +0 -29
- package/dist/cli/commands/start/process-ui-simple.d.ts.map +0 -1
- package/dist/cli/commands/start/process-ui-simple.js +0 -334
- package/dist/cli/commands/start/process-ui-simple.js.map +0 -1
- package/dist/cli/commands/start/process-ui.d.ts +0 -5
- package/dist/cli/commands/start/process-ui.d.ts.map +0 -1
- package/dist/cli/commands/start/process-ui.js +0 -5
- package/dist/cli/commands/start/process-ui.js.map +0 -1
- package/dist/cli/commands/start/start-command.d.ts +0 -2
- package/dist/cli/commands/start/start-command.d.ts.map +0 -1
- package/dist/cli/commands/start/start-command.js +0 -462
- package/dist/cli/commands/start/start-command.js.map +0 -1
- package/dist/cli/commands/start/system-monitor.d.ts +0 -25
- package/dist/cli/commands/start/system-monitor.d.ts.map +0 -1
- package/dist/cli/commands/start/system-monitor.js +0 -265
- package/dist/cli/commands/start/system-monitor.js.map +0 -1
- package/dist/cli/commands/start/types.d.ts +0 -64
- package/dist/cli/commands/start/types.d.ts.map +0 -1
- package/dist/cli/commands/start/types.js +0 -22
- package/dist/cli/commands/start/types.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -6
- package/dist/cli/commands/start.d.ts.map +0 -1
- package/dist/cli/commands/start.js +0 -6
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/status.d.ts +0 -2
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js +0 -304
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/swarm.d.ts +0 -6
- package/dist/cli/commands/swarm.d.ts.map +0 -1
- package/dist/cli/commands/swarm.js +0 -465
- package/dist/cli/commands/swarm.js.map +0 -1
- package/dist/cli/commands/task.d.ts +0 -2
- package/dist/cli/commands/task.d.ts.map +0 -1
- package/dist/cli/commands/task.js +0 -75
- package/dist/cli/commands/task.js.map +0 -1
- package/dist/cli/commands/workflow.d.ts +0 -2
- package/dist/cli/commands/workflow.d.ts.map +0 -1
- package/dist/cli/commands/workflow.js +0 -624
- package/dist/cli/commands/workflow.js.map +0 -1
- package/dist/cli/completion.d.ts +0 -19
- package/dist/cli/completion.d.ts.map +0 -1
- package/dist/cli/completion.js +0 -545
- package/dist/cli/completion.js.map +0 -1
- package/dist/cli/formatter.d.ts +0 -69
- package/dist/cli/formatter.d.ts.map +0 -1
- package/dist/cli/formatter.js +0 -277
- package/dist/cli/formatter.js.map +0 -1
- package/dist/cli/help-formatter.d.ts +0 -49
- package/dist/cli/help-formatter.d.ts.map +0 -1
- package/dist/cli/help-formatter.js +0 -108
- package/dist/cli/help-formatter.js.map +0 -1
- package/dist/cli/help-text.d.ts +0 -25
- package/dist/cli/help-text.d.ts.map +0 -1
- package/dist/cli/help-text.js +0 -1051
- package/dist/cli/help-text.js.map +0 -1
- package/dist/cli/index-remote.d.ts +0 -7
- package/dist/cli/index-remote.d.ts.map +0 -1
- package/dist/cli/index-remote.js +0 -125
- package/dist/cli/index-remote.js.map +0 -1
- package/dist/cli/index.d.ts +0 -7
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -189
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/node-compat.d.ts +0 -81
- package/dist/cli/node-compat.d.ts.map +0 -1
- package/dist/cli/node-compat.js +0 -229
- package/dist/cli/node-compat.js.map +0 -1
- package/dist/cli/repl.d.ts +0 -5
- package/dist/cli/repl.d.ts.map +0 -1
- package/dist/cli/repl.js +0 -949
- package/dist/cli/repl.js.map +0 -1
- package/dist/cli/runtime-detector.d.ts +0 -128
- package/dist/cli/runtime-detector.d.ts.map +0 -1
- package/dist/cli/runtime-detector.js +0 -267
- package/dist/cli/runtime-detector.js.map +0 -1
- package/dist/cli/simple-cli.d.ts +0 -7
- package/dist/cli/simple-cli.d.ts.map +0 -1
- package/dist/cli/simple-cli.js +0 -3085
- package/dist/cli/simple-cli.js.map +0 -1
- package/dist/cli/simple-commands/agent.d.ts +0 -6
- package/dist/cli/simple-commands/agent.d.ts.map +0 -1
- package/dist/cli/simple-commands/agent.js +0 -128
- package/dist/cli/simple-commands/agent.js.map +0 -1
- package/dist/cli/simple-commands/analysis.d.ts +0 -2
- package/dist/cli/simple-commands/analysis.d.ts.map +0 -1
- package/dist/cli/simple-commands/analysis.js +0 -473
- package/dist/cli/simple-commands/analysis.js.map +0 -1
- package/dist/cli/simple-commands/automation-executor.d.ts +0 -188
- package/dist/cli/simple-commands/automation-executor.d.ts.map +0 -1
- package/dist/cli/simple-commands/automation-executor.js +0 -1383
- package/dist/cli/simple-commands/automation-executor.js.map +0 -1
- package/dist/cli/simple-commands/automation.d.ts +0 -2
- package/dist/cli/simple-commands/automation.d.ts.map +0 -1
- package/dist/cli/simple-commands/automation.js +0 -531
- package/dist/cli/simple-commands/automation.js.map +0 -1
- package/dist/cli/simple-commands/batch-manager.d.ts +0 -2
- package/dist/cli/simple-commands/batch-manager.d.ts.map +0 -1
- package/dist/cli/simple-commands/batch-manager.js +0 -290
- package/dist/cli/simple-commands/batch-manager.js.map +0 -1
- package/dist/cli/simple-commands/claude-telemetry.d.ts +0 -14
- package/dist/cli/simple-commands/claude-telemetry.d.ts.map +0 -1
- package/dist/cli/simple-commands/claude-telemetry.js +0 -263
- package/dist/cli/simple-commands/claude-telemetry.js.map +0 -1
- package/dist/cli/simple-commands/config.d.ts +0 -6
- package/dist/cli/simple-commands/config.d.ts.map +0 -1
- package/dist/cli/simple-commands/config.js +0 -116
- package/dist/cli/simple-commands/config.js.map +0 -1
- package/dist/cli/simple-commands/coordination.d.ts +0 -2
- package/dist/cli/simple-commands/coordination.d.ts.map +0 -1
- package/dist/cli/simple-commands/coordination.js +0 -249
- package/dist/cli/simple-commands/coordination.js.map +0 -1
- package/dist/cli/simple-commands/env-template.d.ts +0 -42
- package/dist/cli/simple-commands/env-template.d.ts.map +0 -1
- package/dist/cli/simple-commands/env-template.js +0 -183
- package/dist/cli/simple-commands/env-template.js.map +0 -1
- package/dist/cli/simple-commands/fix-hook-variables.d.ts +0 -16
- package/dist/cli/simple-commands/fix-hook-variables.d.ts.map +0 -1
- package/dist/cli/simple-commands/fix-hook-variables.js +0 -320
- package/dist/cli/simple-commands/fix-hook-variables.js.map +0 -1
- package/dist/cli/simple-commands/github/init.d.ts +0 -6
- package/dist/cli/simple-commands/github/init.d.ts.map +0 -1
- package/dist/cli/simple-commands/github/init.js +0 -506
- package/dist/cli/simple-commands/github/init.js.map +0 -1
- package/dist/cli/simple-commands/github.d.ts +0 -3
- package/dist/cli/simple-commands/github.d.ts.map +0 -1
- package/dist/cli/simple-commands/github.js +0 -356
- package/dist/cli/simple-commands/github.js.map +0 -1
- package/dist/cli/simple-commands/goal.d.ts +0 -3
- package/dist/cli/simple-commands/goal.d.ts.map +0 -1
- package/dist/cli/simple-commands/goal.js +0 -136
- package/dist/cli/simple-commands/goal.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts +0 -68
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js +0 -264
- package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/communication.d.ts +0 -176
- package/dist/cli/simple-commands/hive-mind/communication.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/communication.js +0 -611
- package/dist/cli/simple-commands/hive-mind/communication.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/core.d.ts +0 -306
- package/dist/cli/simple-commands/hive-mind/core.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/core.js +0 -839
- package/dist/cli/simple-commands/hive-mind/core.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts +0 -32
- package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js +0 -702
- package/dist/cli/simple-commands/hive-mind/db-optimizer.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts +0 -270
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +0 -1211
- package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/memory.d.ts +0 -334
- package/dist/cli/simple-commands/hive-mind/memory.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/memory.js +0 -1068
- package/dist/cli/simple-commands/hive-mind/memory.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/metrics-reader.js +0 -274
- package/dist/cli/simple-commands/hive-mind/metrics-reader.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts +0 -256
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js +0 -520
- package/dist/cli/simple-commands/hive-mind/performance-optimizer.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/queen.d.ts +0 -235
- package/dist/cli/simple-commands/hive-mind/queen.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/queen.js +0 -697
- package/dist/cli/simple-commands/hive-mind/queen.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind/session-manager.d.ts +0 -140
- package/dist/cli/simple-commands/hive-mind/session-manager.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind/session-manager.js +0 -1000
- package/dist/cli/simple-commands/hive-mind/session-manager.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind-optimize.d.ts +0 -6
- package/dist/cli/simple-commands/hive-mind-optimize.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind-optimize.js +0 -317
- package/dist/cli/simple-commands/hive-mind-optimize.js.map +0 -1
- package/dist/cli/simple-commands/hive-mind.d.ts +0 -22
- package/dist/cli/simple-commands/hive-mind.d.ts.map +0 -1
- package/dist/cli/simple-commands/hive-mind.js +0 -2722
- package/dist/cli/simple-commands/hive-mind.js.map +0 -1
- package/dist/cli/simple-commands/hook-safety.d.ts +0 -177
- package/dist/cli/simple-commands/hook-safety.d.ts.map +0 -1
- package/dist/cli/simple-commands/hook-safety.js +0 -590
- package/dist/cli/simple-commands/hook-safety.js.map +0 -1
- package/dist/cli/simple-commands/hooks.d.ts +0 -3
- package/dist/cli/simple-commands/hooks.d.ts.map +0 -1
- package/dist/cli/simple-commands/hooks.js +0 -1298
- package/dist/cli/simple-commands/hooks.js.map +0 -1
- package/dist/cli/simple-commands/init/agent-copier.d.ts +0 -65
- package/dist/cli/simple-commands/init/agent-copier.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/agent-copier.js +0 -320
- package/dist/cli/simple-commands/init/agent-copier.js.map +0 -1
- package/dist/cli/simple-commands/init/batch-init.d.ts +0 -137
- package/dist/cli/simple-commands/init/batch-init.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/batch-init.js +0 -558
- package/dist/cli/simple-commands/init/batch-init.js.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts +0 -2
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js +0 -433
- package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts +0 -2
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +0 -871
- package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts +0 -2
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +0 -332
- package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts +0 -3
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +0 -488
- package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts +0 -2
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.js +0 -51
- package/dist/cli/simple-commands/init/claude-commands/slash-commands.js.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts +0 -3
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js +0 -288
- package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js.map +0 -1
- package/dist/cli/simple-commands/init/copy-revised-templates.d.ts +0 -29
- package/dist/cli/simple-commands/init/copy-revised-templates.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/copy-revised-templates.js +0 -166
- package/dist/cli/simple-commands/init/copy-revised-templates.js.map +0 -1
- package/dist/cli/simple-commands/init/executable-wrapper.d.ts +0 -2
- package/dist/cli/simple-commands/init/executable-wrapper.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/executable-wrapper.js +0 -116
- package/dist/cli/simple-commands/init/executable-wrapper.js.map +0 -1
- package/dist/cli/simple-commands/init/gitignore-updater.d.ts +0 -23
- package/dist/cli/simple-commands/init/gitignore-updater.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/gitignore-updater.js +0 -128
- package/dist/cli/simple-commands/init/gitignore-updater.js.map +0 -1
- package/dist/cli/simple-commands/init/help.d.ts +0 -2
- package/dist/cli/simple-commands/init/help.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/help.js +0 -131
- package/dist/cli/simple-commands/init/help.js.map +0 -1
- package/dist/cli/simple-commands/init/hive-mind-init.d.ts +0 -152
- package/dist/cli/simple-commands/init/hive-mind-init.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/hive-mind-init.js +0 -699
- package/dist/cli/simple-commands/init/hive-mind-init.js.map +0 -1
- package/dist/cli/simple-commands/init/index.d.ts +0 -2
- package/dist/cli/simple-commands/init/index.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/index.js +0 -1784
- package/dist/cli/simple-commands/init/index.js.map +0 -1
- package/dist/cli/simple-commands/init/performance-monitor.d.ts +0 -73
- package/dist/cli/simple-commands/init/performance-monitor.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/performance-monitor.js +0 -277
- package/dist/cli/simple-commands/init/performance-monitor.js.map +0 -1
- package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts +0 -95
- package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/rollback/backup-manager.js +0 -486
- package/dist/cli/simple-commands/init/rollback/backup-manager.js.map +0 -1
- package/dist/cli/simple-commands/init/rollback/index.d.ts +0 -114
- package/dist/cli/simple-commands/init/rollback/index.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/rollback/index.js +0 -353
- package/dist/cli/simple-commands/init/rollback/index.js.map +0 -1
- package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts +0 -161
- package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js +0 -686
- package/dist/cli/simple-commands/init/rollback/recovery-manager.js.map +0 -1
- package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts +0 -112
- package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js +0 -480
- package/dist/cli/simple-commands/init/rollback/rollback-executor.js.map +0 -1
- package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts +0 -121
- package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/rollback/state-tracker.js +0 -432
- package/dist/cli/simple-commands/init/rollback/state-tracker.js.map +0 -1
- package/dist/cli/simple-commands/init/skills-copier.d.ts +0 -41
- package/dist/cli/simple-commands/init/skills-copier.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/skills-copier.js +0 -192
- package/dist/cli/simple-commands/init/skills-copier.js.map +0 -1
- package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts +0 -2
- package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/sparc/roo-readme.js +0 -61
- package/dist/cli/simple-commands/init/sparc/roo-readme.js.map +0 -1
- package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts +0 -2
- package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js +0 -80
- package/dist/cli/simple-commands/init/sparc/roomodes-config.js.map +0 -1
- package/dist/cli/simple-commands/init/sparc/workflows.d.ts +0 -2
- package/dist/cli/simple-commands/init/sparc/workflows.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/sparc/workflows.js +0 -36
- package/dist/cli/simple-commands/init/sparc/workflows.js.map +0 -1
- package/dist/cli/simple-commands/init/sparc-structure.d.ts +0 -2
- package/dist/cli/simple-commands/init/sparc-structure.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/sparc-structure.js +0 -63
- package/dist/cli/simple-commands/init/sparc-structure.js.map +0 -1
- package/dist/cli/simple-commands/init/template-copier.d.ts +0 -27
- package/dist/cli/simple-commands/init/template-copier.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/template-copier.js +0 -538
- package/dist/cli/simple-commands/init/template-copier.js.map +0 -1
- package/dist/cli/simple-commands/init/templates/claude-md.d.ts +0 -6
- package/dist/cli/simple-commands/init/templates/claude-md.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/templates/claude-md.js +0 -1097
- package/dist/cli/simple-commands/init/templates/claude-md.js.map +0 -1
- package/dist/cli/simple-commands/init/templates/coordination-md.d.ts +0 -4
- package/dist/cli/simple-commands/init/templates/coordination-md.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/templates/coordination-md.js +0 -338
- package/dist/cli/simple-commands/init/templates/coordination-md.js.map +0 -1
- package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts +0 -21
- package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js +0 -2304
- package/dist/cli/simple-commands/init/templates/enhanced-templates.js.map +0 -1
- package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts +0 -4
- package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/templates/memory-bank-md.js +0 -257
- package/dist/cli/simple-commands/init/templates/memory-bank-md.js.map +0 -1
- package/dist/cli/simple-commands/init/templates/readme-files.d.ts +0 -3
- package/dist/cli/simple-commands/init/templates/readme-files.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/templates/readme-files.js +0 -71
- package/dist/cli/simple-commands/init/templates/readme-files.js.map +0 -1
- package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts +0 -30
- package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/templates/sparc-modes.js +0 -1375
- package/dist/cli/simple-commands/init/templates/sparc-modes.js.map +0 -1
- package/dist/cli/simple-commands/init/templates/verification-claude-md.d.ts +0 -3
- package/dist/cli/simple-commands/init/templates/verification-claude-md.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/templates/verification-claude-md.js +0 -432
- package/dist/cli/simple-commands/init/templates/verification-claude-md.js.map +0 -1
- package/dist/cli/simple-commands/init/validation/config-validator.d.ts +0 -63
- package/dist/cli/simple-commands/init/validation/config-validator.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/validation/config-validator.js +0 -308
- package/dist/cli/simple-commands/init/validation/config-validator.js.map +0 -1
- package/dist/cli/simple-commands/init/validation/health-checker.d.ts +0 -117
- package/dist/cli/simple-commands/init/validation/health-checker.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/validation/health-checker.js +0 -539
- package/dist/cli/simple-commands/init/validation/health-checker.js.map +0 -1
- package/dist/cli/simple-commands/init/validation/index.d.ts +0 -55
- package/dist/cli/simple-commands/init/validation/index.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/validation/index.js +0 -347
- package/dist/cli/simple-commands/init/validation/index.js.map +0 -1
- package/dist/cli/simple-commands/init/validation/mode-validator.d.ts +0 -76
- package/dist/cli/simple-commands/init/validation/mode-validator.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/validation/mode-validator.js +0 -343
- package/dist/cli/simple-commands/init/validation/mode-validator.js.map +0 -1
- package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts +0 -62
- package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/validation/post-init-validator.js +0 -349
- package/dist/cli/simple-commands/init/validation/post-init-validator.js.map +0 -1
- package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts +0 -86
- package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts.map +0 -1
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js +0 -260
- package/dist/cli/simple-commands/init/validation/pre-init-validator.js.map +0 -1
- package/dist/cli/simple-commands/inject-memory-protocol.d.ts +0 -34
- package/dist/cli/simple-commands/inject-memory-protocol.d.ts.map +0 -1
- package/dist/cli/simple-commands/inject-memory-protocol.js +0 -229
- package/dist/cli/simple-commands/inject-memory-protocol.js.map +0 -1
- package/dist/cli/simple-commands/mcp.d.ts +0 -2
- package/dist/cli/simple-commands/mcp.d.ts.map +0 -1
- package/dist/cli/simple-commands/mcp.js +0 -369
- package/dist/cli/simple-commands/mcp.js.map +0 -1
- package/dist/cli/simple-commands/memory-consolidation.d.ts +0 -73
- package/dist/cli/simple-commands/memory-consolidation.d.ts.map +0 -1
- package/dist/cli/simple-commands/memory-consolidation.js +0 -537
- package/dist/cli/simple-commands/memory-consolidation.js.map +0 -1
- package/dist/cli/simple-commands/memory.d.ts +0 -2
- package/dist/cli/simple-commands/memory.d.ts.map +0 -1
- package/dist/cli/simple-commands/memory.js +0 -778
- package/dist/cli/simple-commands/memory.js.map +0 -1
- package/dist/cli/simple-commands/migrate-hooks.d.ts +0 -10
- package/dist/cli/simple-commands/migrate-hooks.d.ts.map +0 -1
- package/dist/cli/simple-commands/migrate-hooks.js +0 -57
- package/dist/cli/simple-commands/migrate-hooks.js.map +0 -1
- package/dist/cli/simple-commands/monitor.d.ts +0 -3
- package/dist/cli/simple-commands/monitor.d.ts.map +0 -1
- package/dist/cli/simple-commands/monitor.js +0 -366
- package/dist/cli/simple-commands/monitor.js.map +0 -1
- package/dist/cli/simple-commands/neural.d.ts +0 -3
- package/dist/cli/simple-commands/neural.d.ts.map +0 -1
- package/dist/cli/simple-commands/neural.js +0 -137
- package/dist/cli/simple-commands/neural.js.map +0 -1
- package/dist/cli/simple-commands/pair.d.ts +0 -3
- package/dist/cli/simple-commands/pair.d.ts.map +0 -1
- package/dist/cli/simple-commands/pair.js +0 -735
- package/dist/cli/simple-commands/pair.js.map +0 -1
- package/dist/cli/simple-commands/performance-hooks.d.ts +0 -20
- package/dist/cli/simple-commands/performance-hooks.d.ts.map +0 -1
- package/dist/cli/simple-commands/performance-hooks.js +0 -127
- package/dist/cli/simple-commands/performance-hooks.js.map +0 -1
- package/dist/cli/simple-commands/performance-metrics.d.ts +0 -153
- package/dist/cli/simple-commands/performance-metrics.d.ts.map +0 -1
- package/dist/cli/simple-commands/performance-metrics.js +0 -759
- package/dist/cli/simple-commands/performance-metrics.js.map +0 -1
- package/dist/cli/simple-commands/process-ui-enhanced.d.ts +0 -55
- package/dist/cli/simple-commands/process-ui-enhanced.d.ts.map +0 -1
- package/dist/cli/simple-commands/process-ui-enhanced.js +0 -680
- package/dist/cli/simple-commands/process-ui-enhanced.js.map +0 -1
- package/dist/cli/simple-commands/proxy.d.ts +0 -5
- package/dist/cli/simple-commands/proxy.d.ts.map +0 -1
- package/dist/cli/simple-commands/proxy.js +0 -346
- package/dist/cli/simple-commands/proxy.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/architect.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/architect.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/architect.js +0 -126
- package/dist/cli/simple-commands/sparc-modes/architect.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/ask.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/ask.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/ask.js +0 -127
- package/dist/cli/simple-commands/sparc-modes/ask.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/code.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/code.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/code.js +0 -149
- package/dist/cli/simple-commands/sparc-modes/code.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/debug.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/debug.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/debug.js +0 -113
- package/dist/cli/simple-commands/sparc-modes/debug.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/devops.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/devops.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/devops.js +0 -138
- package/dist/cli/simple-commands/sparc-modes/devops.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/docs-writer.js +0 -39
- package/dist/cli/simple-commands/sparc-modes/docs-writer.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/generic.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/generic.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/generic.js +0 -35
- package/dist/cli/simple-commands/sparc-modes/generic.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/index.d.ts +0 -17
- package/dist/cli/simple-commands/sparc-modes/index.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/index.js +0 -196
- package/dist/cli/simple-commands/sparc-modes/index.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/integration.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/integration.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/integration.js +0 -56
- package/dist/cli/simple-commands/sparc-modes/integration.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/mcp.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/mcp.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/mcp.js +0 -39
- package/dist/cli/simple-commands/sparc-modes/mcp.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/monitoring.js +0 -39
- package/dist/cli/simple-commands/sparc-modes/monitoring.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/optimization.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/optimization.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/optimization.js +0 -39
- package/dist/cli/simple-commands/sparc-modes/optimization.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/security-review.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/security-review.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/security-review.js +0 -131
- package/dist/cli/simple-commands/sparc-modes/security-review.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js +0 -168
- package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js +0 -39
- package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.js +0 -150
- package/dist/cli/simple-commands/sparc-modes/supabase-admin.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/swarm.d.ts +0 -81
- package/dist/cli/simple-commands/sparc-modes/swarm.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/swarm.js +0 -428
- package/dist/cli/simple-commands/sparc-modes/swarm.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/tdd.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/tdd.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/tdd.js +0 -113
- package/dist/cli/simple-commands/sparc-modes/tdd.js.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts +0 -2
- package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc-modes/tutorial.js +0 -278
- package/dist/cli/simple-commands/sparc-modes/tutorial.js.map +0 -1
- package/dist/cli/simple-commands/sparc.d.ts +0 -2
- package/dist/cli/simple-commands/sparc.d.ts.map +0 -1
- package/dist/cli/simple-commands/sparc.js +0 -477
- package/dist/cli/simple-commands/sparc.js.map +0 -1
- package/dist/cli/simple-commands/start-ui.d.ts +0 -2
- package/dist/cli/simple-commands/start-ui.d.ts.map +0 -1
- package/dist/cli/simple-commands/start-ui.js +0 -135
- package/dist/cli/simple-commands/start-ui.js.map +0 -1
- package/dist/cli/simple-commands/start-wrapper.d.ts +0 -2
- package/dist/cli/simple-commands/start-wrapper.d.ts.map +0 -1
- package/dist/cli/simple-commands/start-wrapper.js +0 -264
- package/dist/cli/simple-commands/start-wrapper.js.map +0 -1
- package/dist/cli/simple-commands/start.d.ts +0 -2
- package/dist/cli/simple-commands/start.d.ts.map +0 -1
- package/dist/cli/simple-commands/start.js +0 -3
- package/dist/cli/simple-commands/start.js.map +0 -1
- package/dist/cli/simple-commands/status.d.ts +0 -2
- package/dist/cli/simple-commands/status.d.ts.map +0 -1
- package/dist/cli/simple-commands/status.js +0 -292
- package/dist/cli/simple-commands/status.js.map +0 -1
- package/dist/cli/simple-commands/stream-chain.d.ts +0 -7
- package/dist/cli/simple-commands/stream-chain.d.ts.map +0 -1
- package/dist/cli/simple-commands/stream-chain.js +0 -433
- package/dist/cli/simple-commands/stream-chain.js.map +0 -1
- package/dist/cli/simple-commands/stream-processor.d.ts +0 -32
- package/dist/cli/simple-commands/stream-processor.d.ts.map +0 -1
- package/dist/cli/simple-commands/stream-processor.js +0 -318
- package/dist/cli/simple-commands/stream-processor.js.map +0 -1
- package/dist/cli/simple-commands/swarm-executor.d.ts +0 -68
- package/dist/cli/simple-commands/swarm-executor.d.ts.map +0 -1
- package/dist/cli/simple-commands/swarm-executor.js +0 -218
- package/dist/cli/simple-commands/swarm-executor.js.map +0 -1
- package/dist/cli/simple-commands/swarm-metrics-integration.d.ts +0 -69
- package/dist/cli/simple-commands/swarm-metrics-integration.d.ts.map +0 -1
- package/dist/cli/simple-commands/swarm-metrics-integration.js +0 -294
- package/dist/cli/simple-commands/swarm-metrics-integration.js.map +0 -1
- package/dist/cli/simple-commands/swarm-webui-integration.d.ts +0 -68
- package/dist/cli/simple-commands/swarm-webui-integration.d.ts.map +0 -1
- package/dist/cli/simple-commands/swarm-webui-integration.js +0 -265
- package/dist/cli/simple-commands/swarm-webui-integration.js.map +0 -1
- package/dist/cli/simple-commands/swarm.d.ts +0 -2
- package/dist/cli/simple-commands/swarm.d.ts.map +0 -1
- package/dist/cli/simple-commands/swarm.js +0 -2104
- package/dist/cli/simple-commands/swarm.js.map +0 -1
- package/dist/cli/simple-commands/task.d.ts +0 -2
- package/dist/cli/simple-commands/task.d.ts.map +0 -1
- package/dist/cli/simple-commands/task.js +0 -250
- package/dist/cli/simple-commands/task.js.map +0 -1
- package/dist/cli/simple-commands/token-tracker.d.ts +0 -73
- package/dist/cli/simple-commands/token-tracker.d.ts.map +0 -1
- package/dist/cli/simple-commands/token-tracker.js +0 -319
- package/dist/cli/simple-commands/token-tracker.js.map +0 -1
- package/dist/cli/simple-commands/training-pipeline.d.ts +0 -166
- package/dist/cli/simple-commands/training-pipeline.d.ts.map +0 -1
- package/dist/cli/simple-commands/training-pipeline.js +0 -760
- package/dist/cli/simple-commands/training-pipeline.js.map +0 -1
- package/dist/cli/simple-commands/training.d.ts +0 -2
- package/dist/cli/simple-commands/training.d.ts.map +0 -1
- package/dist/cli/simple-commands/training.js +0 -240
- package/dist/cli/simple-commands/training.js.map +0 -1
- package/dist/cli/simple-commands/verification-training-integration.d.ts +0 -181
- package/dist/cli/simple-commands/verification-training-integration.d.ts.map +0 -1
- package/dist/cli/simple-commands/verification-training-integration.js +0 -561
- package/dist/cli/simple-commands/verification-training-integration.js.map +0 -1
- package/dist/cli/simple-commands/verification.d.ts +0 -10
- package/dist/cli/simple-commands/verification.d.ts.map +0 -1
- package/dist/cli/simple-commands/verification.js +0 -476
- package/dist/cli/simple-commands/verification.js.map +0 -1
- package/dist/cli/simple-commands/web-server.d.ts +0 -152
- package/dist/cli/simple-commands/web-server.d.ts.map +0 -1
- package/dist/cli/simple-commands/web-server.js +0 -816
- package/dist/cli/simple-commands/web-server.js.map +0 -1
- package/dist/cli/utils/interactive-detector.d.ts +0 -25
- package/dist/cli/utils/interactive-detector.d.ts.map +0 -1
- package/dist/cli/utils/interactive-detector.js +0 -129
- package/dist/cli/utils/interactive-detector.js.map +0 -1
- package/dist/cli/utils/safe-interactive.d.ts +0 -30
- package/dist/cli/utils/safe-interactive.d.ts.map +0 -1
- package/dist/cli/utils/safe-interactive.js +0 -134
- package/dist/cli/utils/safe-interactive.js.map +0 -1
- package/dist/cli/utils.d.ts +0 -75
- package/dist/cli/utils.d.ts.map +0 -1
- package/dist/cli/utils.js +0 -567
- package/dist/cli/utils.js.map +0 -1
- package/dist/config/config-manager.d.ts +0 -212
- package/dist/config/config-manager.d.ts.map +0 -1
- package/dist/config/config-manager.js +0 -550
- package/dist/config/config-manager.js.map +0 -1
- package/dist/constants/agent-types.d.ts +0 -57
- package/dist/constants/agent-types.d.ts.map +0 -1
- package/dist/constants/agent-types.js +0 -57
- package/dist/constants/agent-types.js.map +0 -1
- package/dist/coordination/advanced-scheduler.d.ts +0 -121
- package/dist/coordination/advanced-scheduler.d.ts.map +0 -1
- package/dist/coordination/advanced-scheduler.js +0 -382
- package/dist/coordination/advanced-scheduler.js.map +0 -1
- package/dist/coordination/background-executor.d.ts +0 -69
- package/dist/coordination/background-executor.d.ts.map +0 -1
- package/dist/coordination/background-executor.js +0 -363
- package/dist/coordination/background-executor.js.map +0 -1
- package/dist/coordination/circuit-breaker.d.ts +0 -124
- package/dist/coordination/circuit-breaker.d.ts.map +0 -1
- package/dist/coordination/circuit-breaker.js +0 -301
- package/dist/coordination/circuit-breaker.js.map +0 -1
- package/dist/coordination/conflict-resolution.d.ts +0 -133
- package/dist/coordination/conflict-resolution.d.ts.map +0 -1
- package/dist/coordination/conflict-resolution.js +0 -360
- package/dist/coordination/conflict-resolution.js.map +0 -1
- package/dist/coordination/dependency-graph.d.ts +0 -78
- package/dist/coordination/dependency-graph.d.ts.map +0 -1
- package/dist/coordination/dependency-graph.js +0 -387
- package/dist/coordination/dependency-graph.js.map +0 -1
- package/dist/coordination/manager.d.ts +0 -66
- package/dist/coordination/manager.d.ts.map +0 -1
- package/dist/coordination/manager.js +0 -354
- package/dist/coordination/manager.js.map +0 -1
- package/dist/coordination/messaging.d.ts +0 -37
- package/dist/coordination/messaging.d.ts.map +0 -1
- package/dist/coordination/messaging.js +0 -219
- package/dist/coordination/messaging.js.map +0 -1
- package/dist/coordination/metrics.d.ts +0 -153
- package/dist/coordination/metrics.d.ts.map +0 -1
- package/dist/coordination/metrics.js +0 -436
- package/dist/coordination/metrics.js.map +0 -1
- package/dist/coordination/resources.d.ts +0 -36
- package/dist/coordination/resources.d.ts.map +0 -1
- package/dist/coordination/resources.js +0 -254
- package/dist/coordination/resources.js.map +0 -1
- package/dist/coordination/scheduler.d.ts +0 -48
- package/dist/coordination/scheduler.d.ts.map +0 -1
- package/dist/coordination/scheduler.js +0 -308
- package/dist/coordination/scheduler.js.map +0 -1
- package/dist/coordination/swarm-coordinator.d.ts +0 -116
- package/dist/coordination/swarm-coordinator.d.ts.map +0 -1
- package/dist/coordination/swarm-coordinator.js +0 -563
- package/dist/coordination/swarm-coordinator.js.map +0 -1
- package/dist/coordination/swarm-monitor.d.ts +0 -101
- package/dist/coordination/swarm-monitor.d.ts.map +0 -1
- package/dist/coordination/swarm-monitor.js +0 -340
- package/dist/coordination/swarm-monitor.js.map +0 -1
- package/dist/coordination/work-stealing.d.ts +0 -44
- package/dist/coordination/work-stealing.d.ts.map +0 -1
- package/dist/coordination/work-stealing.js +0 -158
- package/dist/coordination/work-stealing.js.map +0 -1
- package/dist/core/config.d.ts +0 -243
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js +0 -1125
- package/dist/core/config.js.map +0 -1
- package/dist/core/event-bus.d.ts +0 -63
- package/dist/core/event-bus.d.ts.map +0 -1
- package/dist/core/event-bus.js +0 -153
- package/dist/core/event-bus.js.map +0 -1
- package/dist/core/json-persistence.d.ts +0 -55
- package/dist/core/json-persistence.d.ts.map +0 -1
- package/dist/core/json-persistence.js +0 -111
- package/dist/core/json-persistence.js.map +0 -1
- package/dist/core/logger.d.ts +0 -62
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js +0 -252
- package/dist/core/logger.js.map +0 -1
- package/dist/core/orchestrator-fixed.d.ts +0 -81
- package/dist/core/orchestrator-fixed.d.ts.map +0 -1
- package/dist/core/orchestrator-fixed.js +0 -213
- package/dist/core/orchestrator-fixed.js.map +0 -1
- package/dist/core/orchestrator.d.ts +0 -141
- package/dist/core/orchestrator.d.ts.map +0 -1
- package/dist/core/orchestrator.js +0 -1166
- package/dist/core/orchestrator.js.map +0 -1
- package/dist/core/version.d.ts +0 -10
- package/dist/core/version.d.ts.map +0 -1
- package/dist/core/version.js +0 -36
- package/dist/core/version.js.map +0 -1
- package/dist/enterprise/analytics-manager.d.ts +0 -489
- package/dist/enterprise/analytics-manager.d.ts.map +0 -1
- package/dist/enterprise/analytics-manager.js +0 -956
- package/dist/enterprise/analytics-manager.js.map +0 -1
- package/dist/enterprise/audit-manager.d.ts +0 -459
- package/dist/enterprise/audit-manager.d.ts.map +0 -1
- package/dist/enterprise/audit-manager.js +0 -1014
- package/dist/enterprise/audit-manager.js.map +0 -1
- package/dist/enterprise/cloud-manager.d.ts +0 -435
- package/dist/enterprise/cloud-manager.d.ts.map +0 -1
- package/dist/enterprise/cloud-manager.js +0 -789
- package/dist/enterprise/cloud-manager.js.map +0 -1
- package/dist/enterprise/deployment-manager.d.ts +0 -328
- package/dist/enterprise/deployment-manager.d.ts.map +0 -1
- package/dist/enterprise/deployment-manager.js +0 -830
- package/dist/enterprise/deployment-manager.js.map +0 -1
- package/dist/enterprise/project-manager.d.ts +0 -228
- package/dist/enterprise/project-manager.d.ts.map +0 -1
- package/dist/enterprise/project-manager.js +0 -537
- package/dist/enterprise/project-manager.js.map +0 -1
- package/dist/enterprise/security-manager.d.ts +0 -422
- package/dist/enterprise/security-manager.d.ts.map +0 -1
- package/dist/enterprise/security-manager.js +0 -910
- package/dist/enterprise/security-manager.js.map +0 -1
- package/dist/execution/agent-executor.d.ts +0 -80
- package/dist/execution/agent-executor.d.ts.map +0 -1
- package/dist/execution/agent-executor.js +0 -220
- package/dist/execution/agent-executor.js.map +0 -1
- package/dist/execution/provider-manager.d.ts +0 -65
- package/dist/execution/provider-manager.d.ts.map +0 -1
- package/dist/execution/provider-manager.js +0 -144
- package/dist/execution/provider-manager.js.map +0 -1
- package/dist/hive-mind/core/Agent.d.ts +0 -137
- package/dist/hive-mind/core/Agent.d.ts.map +0 -1
- package/dist/hive-mind/core/Agent.js +0 -567
- package/dist/hive-mind/core/Agent.js.map +0 -1
- package/dist/hive-mind/core/Communication.d.ts +0 -116
- package/dist/hive-mind/core/Communication.d.ts.map +0 -1
- package/dist/hive-mind/core/Communication.js +0 -407
- package/dist/hive-mind/core/Communication.js.map +0 -1
- package/dist/hive-mind/core/DatabaseManager.d.ts +0 -99
- package/dist/hive-mind/core/DatabaseManager.d.ts.map +0 -1
- package/dist/hive-mind/core/DatabaseManager.js +0 -648
- package/dist/hive-mind/core/DatabaseManager.js.map +0 -1
- package/dist/hive-mind/core/HiveMind.d.ts +0 -90
- package/dist/hive-mind/core/HiveMind.d.ts.map +0 -1
- package/dist/hive-mind/core/HiveMind.js +0 -455
- package/dist/hive-mind/core/HiveMind.js.map +0 -1
- package/dist/hive-mind/core/Memory.d.ts +0 -235
- package/dist/hive-mind/core/Memory.d.ts.map +0 -1
- package/dist/hive-mind/core/Memory.js +0 -1192
- package/dist/hive-mind/core/Memory.js.map +0 -1
- package/dist/hive-mind/core/Queen.d.ts +0 -115
- package/dist/hive-mind/core/Queen.d.ts.map +0 -1
- package/dist/hive-mind/core/Queen.js +0 -649
- package/dist/hive-mind/core/Queen.js.map +0 -1
- package/dist/hive-mind/integration/ConsensusEngine.d.ts +0 -117
- package/dist/hive-mind/integration/ConsensusEngine.d.ts.map +0 -1
- package/dist/hive-mind/integration/ConsensusEngine.js +0 -478
- package/dist/hive-mind/integration/ConsensusEngine.js.map +0 -1
- package/dist/hive-mind/integration/MCPToolWrapper.d.ts +0 -172
- package/dist/hive-mind/integration/MCPToolWrapper.d.ts.map +0 -1
- package/dist/hive-mind/integration/MCPToolWrapper.js +0 -217
- package/dist/hive-mind/integration/MCPToolWrapper.js.map +0 -1
- package/dist/hive-mind/integration/SwarmOrchestrator.d.ts +0 -172
- package/dist/hive-mind/integration/SwarmOrchestrator.d.ts.map +0 -1
- package/dist/hive-mind/integration/SwarmOrchestrator.js +0 -748
- package/dist/hive-mind/integration/SwarmOrchestrator.js.map +0 -1
- package/dist/hive-mind/types.d.ts +0 -314
- package/dist/hive-mind/types.d.ts.map +0 -1
- package/dist/hive-mind/types.js +0 -7
- package/dist/hive-mind/types.js.map +0 -1
- package/dist/mcp/auth.d.ts +0 -80
- package/dist/mcp/auth.d.ts.map +0 -1
- package/dist/mcp/auth.js +0 -350
- package/dist/mcp/auth.js.map +0 -1
- package/dist/mcp/claude-flow-tools.d.ts +0 -13
- package/dist/mcp/claude-flow-tools.d.ts.map +0 -1
- package/dist/mcp/claude-flow-tools.js +0 -1398
- package/dist/mcp/claude-flow-tools.js.map +0 -1
- package/dist/mcp/load-balancer.d.ts +0 -88
- package/dist/mcp/load-balancer.d.ts.map +0 -1
- package/dist/mcp/load-balancer.js +0 -393
- package/dist/mcp/load-balancer.js.map +0 -1
- package/dist/mcp/router.d.ts +0 -54
- package/dist/mcp/router.d.ts.map +0 -1
- package/dist/mcp/router.js +0 -204
- package/dist/mcp/router.js.map +0 -1
- package/dist/mcp/ruv-swarm-tools.d.ts +0 -58
- package/dist/mcp/ruv-swarm-tools.d.ts.map +0 -1
- package/dist/mcp/ruv-swarm-tools.js +0 -568
- package/dist/mcp/ruv-swarm-tools.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -75
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -538
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/session-manager.d.ts +0 -60
- package/dist/mcp/session-manager.d.ts.map +0 -1
- package/dist/mcp/session-manager.js +0 -323
- package/dist/mcp/session-manager.js.map +0 -1
- package/dist/mcp/swarm-tools.d.ts +0 -87
- package/dist/mcp/swarm-tools.d.ts.map +0 -1
- package/dist/mcp/swarm-tools.js +0 -731
- package/dist/mcp/swarm-tools.js.map +0 -1
- package/dist/mcp/tools.d.ts +0 -145
- package/dist/mcp/tools.d.ts.map +0 -1
- package/dist/mcp/tools.js +0 -434
- package/dist/mcp/tools.js.map +0 -1
- package/dist/mcp/transports/base.d.ts +0 -22
- package/dist/mcp/transports/base.d.ts.map +0 -1
- package/dist/mcp/transports/base.js +0 -5
- package/dist/mcp/transports/base.js.map +0 -1
- package/dist/mcp/transports/http.d.ts +0 -48
- package/dist/mcp/transports/http.d.ts.map +0 -1
- package/dist/mcp/transports/http.js +0 -400
- package/dist/mcp/transports/http.js.map +0 -1
- package/dist/mcp/transports/stdio.d.ts +0 -37
- package/dist/mcp/transports/stdio.d.ts.map +0 -1
- package/dist/mcp/transports/stdio.js +0 -206
- package/dist/mcp/transports/stdio.js.map +0 -1
- package/dist/memory/advanced-serializer.d.ts +0 -159
- package/dist/memory/advanced-serializer.d.ts.map +0 -1
- package/dist/memory/advanced-serializer.js +0 -564
- package/dist/memory/advanced-serializer.js.map +0 -1
- package/dist/memory/backends/base.d.ts +0 -21
- package/dist/memory/backends/base.d.ts.map +0 -1
- package/dist/memory/backends/base.js +0 -5
- package/dist/memory/backends/base.js.map +0 -1
- package/dist/memory/backends/markdown.d.ts +0 -35
- package/dist/memory/backends/markdown.d.ts.map +0 -1
- package/dist/memory/backends/markdown.js +0 -223
- package/dist/memory/backends/markdown.js.map +0 -1
- package/dist/memory/backends/sqlite.d.ts +0 -33
- package/dist/memory/backends/sqlite.d.ts.map +0 -1
- package/dist/memory/backends/sqlite.js +0 -291
- package/dist/memory/backends/sqlite.js.map +0 -1
- package/dist/memory/cache.d.ts +0 -65
- package/dist/memory/cache.d.ts.map +0 -1
- package/dist/memory/cache.js +0 -188
- package/dist/memory/cache.js.map +0 -1
- package/dist/memory/distributed-memory.d.ts +0 -188
- package/dist/memory/distributed-memory.d.ts.map +0 -1
- package/dist/memory/distributed-memory.js +0 -710
- package/dist/memory/distributed-memory.js.map +0 -1
- package/dist/memory/enhanced-session-serializer.d.ts +0 -115
- package/dist/memory/enhanced-session-serializer.d.ts.map +0 -1
- package/dist/memory/enhanced-session-serializer.js +0 -478
- package/dist/memory/enhanced-session-serializer.js.map +0 -1
- package/dist/memory/fallback-store.d.ts +0 -28
- package/dist/memory/fallback-store.d.ts.map +0 -1
- package/dist/memory/fallback-store.js +0 -101
- package/dist/memory/fallback-store.js.map +0 -1
- package/dist/memory/in-memory-store.d.ts +0 -37
- package/dist/memory/in-memory-store.d.ts.map +0 -1
- package/dist/memory/in-memory-store.js +0 -174
- package/dist/memory/in-memory-store.js.map +0 -1
- package/dist/memory/indexer.d.ts +0 -52
- package/dist/memory/indexer.d.ts.map +0 -1
- package/dist/memory/indexer.js +0 -191
- package/dist/memory/indexer.js.map +0 -1
- package/dist/memory/manager.d.ts +0 -58
- package/dist/memory/manager.d.ts.map +0 -1
- package/dist/memory/manager.js +0 -423
- package/dist/memory/manager.js.map +0 -1
- package/dist/memory/sqlite-store.d.ts +0 -34
- package/dist/memory/sqlite-store.d.ts.map +0 -1
- package/dist/memory/sqlite-store.js +0 -268
- package/dist/memory/sqlite-store.js.map +0 -1
- package/dist/memory/sqlite-wrapper.d.ts +0 -38
- package/dist/memory/sqlite-wrapper.d.ts.map +0 -1
- package/dist/memory/sqlite-wrapper.js +0 -152
- package/dist/memory/sqlite-wrapper.js.map +0 -1
- package/dist/memory/swarm-memory.d.ts +0 -91
- package/dist/memory/swarm-memory.d.ts.map +0 -1
- package/dist/memory/swarm-memory.js +0 -454
- package/dist/memory/swarm-memory.js.map +0 -1
- package/dist/memory/unified-memory-manager.d.ts +0 -116
- package/dist/memory/unified-memory-manager.d.ts.map +0 -1
- package/dist/memory/unified-memory-manager.js +0 -397
- package/dist/memory/unified-memory-manager.js.map +0 -1
- package/dist/migration/logger.d.ts +0 -26
- package/dist/migration/logger.d.ts.map +0 -1
- package/dist/migration/logger.js +0 -145
- package/dist/migration/logger.js.map +0 -1
- package/dist/migration/migration-analyzer.d.ts +0 -18
- package/dist/migration/migration-analyzer.d.ts.map +0 -1
- package/dist/migration/migration-analyzer.js +0 -284
- package/dist/migration/migration-analyzer.js.map +0 -1
- package/dist/migration/migration-runner.d.ts +0 -26
- package/dist/migration/migration-runner.d.ts.map +0 -1
- package/dist/migration/migration-runner.js +0 -505
- package/dist/migration/migration-runner.js.map +0 -1
- package/dist/migration/migration-validator.d.ts +0 -17
- package/dist/migration/migration-validator.d.ts.map +0 -1
- package/dist/migration/migration-validator.js +0 -309
- package/dist/migration/migration-validator.js.map +0 -1
- package/dist/migration/progress-reporter.d.ts +0 -28
- package/dist/migration/progress-reporter.d.ts.map +0 -1
- package/dist/migration/progress-reporter.js +0 -163
- package/dist/migration/progress-reporter.js.map +0 -1
- package/dist/migration/rollback-manager.d.ts +0 -24
- package/dist/migration/rollback-manager.d.ts.map +0 -1
- package/dist/migration/rollback-manager.js +0 -351
- package/dist/migration/rollback-manager.js.map +0 -1
- package/dist/migration/types.d.ts +0 -103
- package/dist/migration/types.d.ts.map +0 -1
- package/dist/migration/types.js +0 -6
- package/dist/migration/types.js.map +0 -1
- package/dist/reasoningbank/reasoningbank-adapter.d.ts +0 -93
- package/dist/reasoningbank/reasoningbank-adapter.d.ts.map +0 -1
- package/dist/reasoningbank/reasoningbank-adapter.js +0 -365
- package/dist/reasoningbank/reasoningbank-adapter.js.map +0 -1
- package/dist/sdk/query-control.d.ts +0 -131
- package/dist/sdk/query-control.d.ts.map +0 -1
- package/dist/sdk/query-control.js +0 -363
- package/dist/sdk/query-control.js.map +0 -1
- package/dist/sdk/session-forking.d.ts +0 -109
- package/dist/sdk/session-forking.d.ts.map +0 -1
- package/dist/sdk/session-forking.js +0 -275
- package/dist/sdk/session-forking.js.map +0 -1
- package/dist/swarm/types.d.ts +0 -578
- package/dist/swarm/types.d.ts.map +0 -1
- package/dist/swarm/types.js +0 -54
- package/dist/swarm/types.js.map +0 -1
- package/dist/terminal/adapters/base.d.ts +0 -40
- package/dist/terminal/adapters/base.d.ts.map +0 -1
- package/dist/terminal/adapters/base.js +0 -5
- package/dist/terminal/adapters/base.js.map +0 -1
- package/dist/terminal/adapters/native.d.ts +0 -19
- package/dist/terminal/adapters/native.d.ts.map +0 -1
- package/dist/terminal/adapters/native.js +0 -414
- package/dist/terminal/adapters/native.js.map +0 -1
- package/dist/terminal/adapters/vscode.d.ts +0 -23
- package/dist/terminal/adapters/vscode.d.ts.map +0 -1
- package/dist/terminal/adapters/vscode.js +0 -267
- package/dist/terminal/adapters/vscode.js.map +0 -1
- package/dist/terminal/manager.d.ts +0 -59
- package/dist/terminal/manager.d.ts.map +0 -1
- package/dist/terminal/manager.js +0 -235
- package/dist/terminal/manager.js.map +0 -1
- package/dist/terminal/pool.d.ts +0 -32
- package/dist/terminal/pool.d.ts.map +0 -1
- package/dist/terminal/pool.js +0 -208
- package/dist/terminal/pool.js.map +0 -1
- package/dist/terminal/session.d.ts +0 -41
- package/dist/terminal/session.d.ts.map +0 -1
- package/dist/terminal/session.js +0 -210
- package/dist/terminal/session.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -14
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/error-handler.js +0 -29
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -121
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -194
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/formatters.d.ts +0 -15
- package/dist/utils/formatters.d.ts.map +0 -1
- package/dist/utils/formatters.js +0 -75
- package/dist/utils/formatters.js.map +0 -1
- package/dist/utils/helpers.d.ts +0 -134
- package/dist/utils/helpers.d.ts.map +0 -1
- package/dist/utils/helpers.js +0 -444
- package/dist/utils/helpers.js.map +0 -1
- package/dist/utils/key-redactor.d.ts +0 -46
- package/dist/utils/key-redactor.d.ts.map +0 -1
- package/dist/utils/key-redactor.js +0 -153
- package/dist/utils/key-redactor.js.map +0 -1
- package/dist/utils/metrics-reader.d.ts +0 -67
- package/dist/utils/metrics-reader.d.ts.map +0 -1
- package/dist/utils/metrics-reader.js +0 -201
- package/dist/utils/metrics-reader.js.map +0 -1
- package/dist/utils/npx-isolated-cache.d.ts +0 -17
- package/dist/utils/npx-isolated-cache.d.ts.map +0 -1
- package/dist/utils/npx-isolated-cache.js +0 -140
- package/dist/utils/npx-isolated-cache.js.map +0 -1
- package/dist/utils/project-root.d.ts +0 -35
- package/dist/utils/project-root.d.ts.map +0 -1
- package/dist/utils/project-root.js +0 -115
- package/dist/utils/project-root.js.map +0 -1
- package/dist/utils/type-guards.d.ts +0 -117
- package/dist/utils/type-guards.d.ts.map +0 -1
- package/dist/utils/type-guards.js +0 -166
- package/dist/utils/type-guards.js.map +0 -1
- package/dist/utils/types.d.ts +0 -568
- package/dist/utils/types.d.ts.map +0 -1
- package/dist/utils/types.js +0 -37
- package/dist/utils/types.js.map +0 -1
- /package/docs/{COMMANDS_TO_SKILLS_MIGRATION.md → development/COMMANDS_TO_SKILLS_MIGRATION.md} +0 -0
- /package/docs/{FINAL_INIT_STRUCTURE.md → development/FINAL_INIT_STRUCTURE.md} +0 -0
- /package/docs/{CLI-MEMORY-COMMANDS-WORKING.md → fixes/CLI-MEMORY-COMMANDS-WORKING.md} +0 -0
- /package/docs/{PERFORMANCE-JSON-IMPROVEMENTS.md → performance/PERFORMANCE-JSON-IMPROVEMENTS.md} +0 -0
- /package/docs/{PERFORMANCE-METRICS-GUIDE.md → performance/PERFORMANCE-METRICS-GUIDE.md} +0 -0
- /package/docs/{RELEASE-NOTES-v2.7.0-alpha.9.md → releases/v2.7.0-alpha.9/RELEASE-NOTES-v2.7.0-alpha.9.md} +0 -0
|
@@ -1,1405 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Comprehensive agent management system
|
|
3
|
-
*/
|
|
4
|
-
import { EventEmitter } from 'node:events';
|
|
5
|
-
import { spawn } from 'node:child_process';
|
|
6
|
-
import { generateId } from '../utils/helpers.js';
|
|
7
|
-
/**
|
|
8
|
-
* Comprehensive agent lifecycle and resource management
|
|
9
|
-
*/
|
|
10
|
-
export class AgentManager extends EventEmitter {
|
|
11
|
-
logger;
|
|
12
|
-
eventBus;
|
|
13
|
-
memory;
|
|
14
|
-
config;
|
|
15
|
-
// Agent tracking
|
|
16
|
-
agents = new Map();
|
|
17
|
-
processes = new Map();
|
|
18
|
-
templates = new Map();
|
|
19
|
-
clusters = new Map();
|
|
20
|
-
pools = new Map();
|
|
21
|
-
// Health monitoring
|
|
22
|
-
healthChecks = new Map();
|
|
23
|
-
healthInterval;
|
|
24
|
-
heartbeatInterval;
|
|
25
|
-
// Scaling and policies
|
|
26
|
-
scalingPolicies = new Map();
|
|
27
|
-
scalingOperations = new Map();
|
|
28
|
-
// Resource tracking
|
|
29
|
-
resourceUsage = new Map();
|
|
30
|
-
performanceHistory = new Map();
|
|
31
|
-
constructor(config, logger, eventBus, memory) {
|
|
32
|
-
super();
|
|
33
|
-
this.logger = logger;
|
|
34
|
-
this.eventBus = eventBus;
|
|
35
|
-
this.memory = memory;
|
|
36
|
-
this.config = {
|
|
37
|
-
maxAgents: 50,
|
|
38
|
-
defaultTimeout: 30000,
|
|
39
|
-
heartbeatInterval: 10000,
|
|
40
|
-
healthCheckInterval: 30000,
|
|
41
|
-
autoRestart: true,
|
|
42
|
-
resourceLimits: {
|
|
43
|
-
memory: 512 * 1024 * 1024, // 512MB
|
|
44
|
-
cpu: 1.0,
|
|
45
|
-
disk: 1024 * 1024 * 1024, // 1GB
|
|
46
|
-
},
|
|
47
|
-
agentDefaults: {
|
|
48
|
-
autonomyLevel: 0.7,
|
|
49
|
-
learningEnabled: true,
|
|
50
|
-
adaptationEnabled: true,
|
|
51
|
-
},
|
|
52
|
-
environmentDefaults: {
|
|
53
|
-
runtime: 'deno',
|
|
54
|
-
workingDirectory: './agents',
|
|
55
|
-
tempDirectory: './tmp',
|
|
56
|
-
logDirectory: './logs',
|
|
57
|
-
},
|
|
58
|
-
...config,
|
|
59
|
-
};
|
|
60
|
-
this.setupEventHandlers();
|
|
61
|
-
this.initializeDefaultTemplates();
|
|
62
|
-
}
|
|
63
|
-
setupEventHandlers() {
|
|
64
|
-
this.eventBus.on('agent:heartbeat', (data) => {
|
|
65
|
-
const heartbeatData = data;
|
|
66
|
-
this.handleHeartbeat(heartbeatData);
|
|
67
|
-
});
|
|
68
|
-
this.eventBus.on('agent:error', (data) => {
|
|
69
|
-
const errorData = data;
|
|
70
|
-
this.handleAgentError(errorData);
|
|
71
|
-
});
|
|
72
|
-
this.eventBus.on('task:assigned', (data) => {
|
|
73
|
-
const taskData = data;
|
|
74
|
-
this.updateAgentWorkload(taskData.agentId, 1);
|
|
75
|
-
});
|
|
76
|
-
this.eventBus.on('task:completed', (data) => {
|
|
77
|
-
const completedData = data;
|
|
78
|
-
this.updateAgentWorkload(completedData.agentId, -1);
|
|
79
|
-
if (completedData.metrics) {
|
|
80
|
-
this.updateAgentMetrics(completedData.agentId, completedData.metrics);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
this.eventBus.on('resource:usage', (data) => {
|
|
84
|
-
const resourceData = data;
|
|
85
|
-
this.updateResourceUsage(resourceData.agentId, resourceData.usage);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
initializeDefaultTemplates() {
|
|
89
|
-
// Research agent template
|
|
90
|
-
this.templates.set('researcher', {
|
|
91
|
-
name: 'Research Agent',
|
|
92
|
-
type: 'researcher',
|
|
93
|
-
capabilities: {
|
|
94
|
-
codeGeneration: false,
|
|
95
|
-
codeReview: false,
|
|
96
|
-
testing: false,
|
|
97
|
-
documentation: true,
|
|
98
|
-
research: true,
|
|
99
|
-
analysis: true,
|
|
100
|
-
webSearch: true,
|
|
101
|
-
apiIntegration: true,
|
|
102
|
-
fileSystem: true,
|
|
103
|
-
terminalAccess: false,
|
|
104
|
-
languages: [],
|
|
105
|
-
frameworks: [],
|
|
106
|
-
domains: ['research', 'analysis', 'information-gathering'],
|
|
107
|
-
tools: ['web-search', 'document-analysis', 'data-extraction'],
|
|
108
|
-
maxConcurrentTasks: 5,
|
|
109
|
-
maxMemoryUsage: 256 * 1024 * 1024,
|
|
110
|
-
maxExecutionTime: 600000,
|
|
111
|
-
reliability: 0.9,
|
|
112
|
-
speed: 0.8,
|
|
113
|
-
quality: 0.9,
|
|
114
|
-
},
|
|
115
|
-
config: {
|
|
116
|
-
autonomyLevel: 0.8,
|
|
117
|
-
learningEnabled: true,
|
|
118
|
-
adaptationEnabled: true,
|
|
119
|
-
maxTasksPerHour: 20,
|
|
120
|
-
maxConcurrentTasks: 5,
|
|
121
|
-
timeoutThreshold: 600000,
|
|
122
|
-
reportingInterval: 30000,
|
|
123
|
-
heartbeatInterval: 10000,
|
|
124
|
-
permissions: ['web-access', 'file-read'],
|
|
125
|
-
trustedAgents: [],
|
|
126
|
-
expertise: { research: 0.9, analysis: 0.8, documentation: 0.7 },
|
|
127
|
-
preferences: { verbose: true, detailed: true },
|
|
128
|
-
},
|
|
129
|
-
environment: {
|
|
130
|
-
runtime: 'deno',
|
|
131
|
-
version: '1.40.0',
|
|
132
|
-
workingDirectory: './agents/researcher',
|
|
133
|
-
tempDirectory: './tmp/researcher',
|
|
134
|
-
logDirectory: './logs/researcher',
|
|
135
|
-
apiEndpoints: {},
|
|
136
|
-
credentials: {},
|
|
137
|
-
availableTools: ['web-search', 'document-reader', 'data-extractor'],
|
|
138
|
-
toolConfigs: {},
|
|
139
|
-
},
|
|
140
|
-
startupScript: './scripts/start-researcher.ts',
|
|
141
|
-
});
|
|
142
|
-
// Developer agent template
|
|
143
|
-
this.templates.set('coder', {
|
|
144
|
-
name: 'Developer Agent',
|
|
145
|
-
type: 'coder',
|
|
146
|
-
capabilities: {
|
|
147
|
-
codeGeneration: true,
|
|
148
|
-
codeReview: true,
|
|
149
|
-
testing: true,
|
|
150
|
-
documentation: true,
|
|
151
|
-
research: false,
|
|
152
|
-
analysis: true,
|
|
153
|
-
webSearch: false,
|
|
154
|
-
apiIntegration: true,
|
|
155
|
-
fileSystem: true,
|
|
156
|
-
terminalAccess: true,
|
|
157
|
-
languages: ['typescript', 'javascript', 'python', 'rust'],
|
|
158
|
-
frameworks: ['deno', 'node', 'react', 'svelte'],
|
|
159
|
-
domains: ['web-development', 'backend', 'api-design'],
|
|
160
|
-
tools: ['git', 'editor', 'debugger', 'linter', 'formatter'],
|
|
161
|
-
maxConcurrentTasks: 3,
|
|
162
|
-
maxMemoryUsage: 512 * 1024 * 1024,
|
|
163
|
-
maxExecutionTime: 1200000,
|
|
164
|
-
reliability: 0.95,
|
|
165
|
-
speed: 0.7,
|
|
166
|
-
quality: 0.95,
|
|
167
|
-
},
|
|
168
|
-
config: {
|
|
169
|
-
autonomyLevel: 0.6,
|
|
170
|
-
learningEnabled: true,
|
|
171
|
-
adaptationEnabled: true,
|
|
172
|
-
maxTasksPerHour: 10,
|
|
173
|
-
maxConcurrentTasks: 3,
|
|
174
|
-
timeoutThreshold: 1200000,
|
|
175
|
-
reportingInterval: 60000,
|
|
176
|
-
heartbeatInterval: 15000,
|
|
177
|
-
permissions: ['file-read', 'file-write', 'terminal-access', 'git-access'],
|
|
178
|
-
trustedAgents: [],
|
|
179
|
-
expertise: { coding: 0.95, testing: 0.8, debugging: 0.9 },
|
|
180
|
-
preferences: { codeStyle: 'functional', testFramework: 'deno-test' },
|
|
181
|
-
},
|
|
182
|
-
environment: {
|
|
183
|
-
runtime: 'deno',
|
|
184
|
-
version: '1.40.0',
|
|
185
|
-
workingDirectory: './agents/developer',
|
|
186
|
-
tempDirectory: './tmp/developer',
|
|
187
|
-
logDirectory: './logs/developer',
|
|
188
|
-
apiEndpoints: {},
|
|
189
|
-
credentials: {},
|
|
190
|
-
availableTools: ['git', 'deno', 'editor', 'debugger'],
|
|
191
|
-
toolConfigs: {},
|
|
192
|
-
},
|
|
193
|
-
startupScript: './scripts/start-developer.ts',
|
|
194
|
-
});
|
|
195
|
-
// Add more templates...
|
|
196
|
-
this.initializeSpecializedTemplates();
|
|
197
|
-
}
|
|
198
|
-
initializeSpecializedTemplates() {
|
|
199
|
-
// Analyzer template
|
|
200
|
-
this.templates.set('analyst', {
|
|
201
|
-
name: 'Analyzer Agent',
|
|
202
|
-
type: 'analyst',
|
|
203
|
-
capabilities: {
|
|
204
|
-
codeGeneration: false,
|
|
205
|
-
codeReview: true,
|
|
206
|
-
testing: false,
|
|
207
|
-
documentation: true,
|
|
208
|
-
research: false,
|
|
209
|
-
analysis: true,
|
|
210
|
-
webSearch: false,
|
|
211
|
-
apiIntegration: true,
|
|
212
|
-
fileSystem: true,
|
|
213
|
-
terminalAccess: false,
|
|
214
|
-
languages: ['python', 'r', 'sql'],
|
|
215
|
-
frameworks: ['pandas', 'numpy', 'matplotlib'],
|
|
216
|
-
domains: ['data-analysis', 'statistics', 'visualization'],
|
|
217
|
-
tools: ['data-processor', 'chart-generator', 'statistical-analyzer'],
|
|
218
|
-
maxConcurrentTasks: 4,
|
|
219
|
-
maxMemoryUsage: 1024 * 1024 * 1024,
|
|
220
|
-
maxExecutionTime: 900000,
|
|
221
|
-
reliability: 0.9,
|
|
222
|
-
speed: 0.75,
|
|
223
|
-
quality: 0.9,
|
|
224
|
-
},
|
|
225
|
-
config: {
|
|
226
|
-
autonomyLevel: 0.7,
|
|
227
|
-
learningEnabled: true,
|
|
228
|
-
adaptationEnabled: true,
|
|
229
|
-
maxTasksPerHour: 15,
|
|
230
|
-
maxConcurrentTasks: 4,
|
|
231
|
-
timeoutThreshold: 900000,
|
|
232
|
-
reportingInterval: 45000,
|
|
233
|
-
heartbeatInterval: 12000,
|
|
234
|
-
permissions: ['file-read', 'data-access'],
|
|
235
|
-
trustedAgents: [],
|
|
236
|
-
expertise: { analysis: 0.95, visualization: 0.8, statistics: 0.85 },
|
|
237
|
-
preferences: { outputFormat: 'detailed', includeCharts: true },
|
|
238
|
-
},
|
|
239
|
-
environment: {
|
|
240
|
-
runtime: 'deno',
|
|
241
|
-
version: '1.40.0',
|
|
242
|
-
workingDirectory: './agents/analyzer',
|
|
243
|
-
tempDirectory: './tmp/analyzer',
|
|
244
|
-
logDirectory: './logs/analyzer',
|
|
245
|
-
apiEndpoints: {},
|
|
246
|
-
credentials: {},
|
|
247
|
-
availableTools: ['data-processor', 'chart-gen', 'stats-calc'],
|
|
248
|
-
toolConfigs: {},
|
|
249
|
-
},
|
|
250
|
-
startupScript: './scripts/start-analyzer.ts',
|
|
251
|
-
});
|
|
252
|
-
// Requirements Engineer Agent Template
|
|
253
|
-
this.templates.set('requirements-engineer', {
|
|
254
|
-
name: 'Requirements Engineer Agent',
|
|
255
|
-
type: 'requirements-engineer',
|
|
256
|
-
capabilities: {
|
|
257
|
-
codeGeneration: false,
|
|
258
|
-
codeReview: false,
|
|
259
|
-
testing: false,
|
|
260
|
-
documentation: true,
|
|
261
|
-
research: true,
|
|
262
|
-
analysis: true,
|
|
263
|
-
webSearch: true,
|
|
264
|
-
apiIntegration: false,
|
|
265
|
-
fileSystem: true,
|
|
266
|
-
terminalAccess: false,
|
|
267
|
-
languages: [],
|
|
268
|
-
frameworks: [],
|
|
269
|
-
domains: ['requirements-engineering', 'user-stories', 'ears-notation'],
|
|
270
|
-
tools: ['document-writer', 'nlp-processor', 'web-search'],
|
|
271
|
-
maxConcurrentTasks: 2,
|
|
272
|
-
maxMemoryUsage: 256 * 1024 * 1024,
|
|
273
|
-
maxExecutionTime: 300000,
|
|
274
|
-
reliability: 0.95,
|
|
275
|
-
speed: 0.8,
|
|
276
|
-
quality: 0.95,
|
|
277
|
-
},
|
|
278
|
-
config: {
|
|
279
|
-
autonomyLevel: 0.8,
|
|
280
|
-
learningEnabled: true,
|
|
281
|
-
adaptationEnabled: true,
|
|
282
|
-
maxTasksPerHour: 10,
|
|
283
|
-
maxConcurrentTasks: 2,
|
|
284
|
-
timeoutThreshold: 300000,
|
|
285
|
-
reportingInterval: 30000,
|
|
286
|
-
heartbeatInterval: 10000,
|
|
287
|
-
permissions: ['file-read', 'file-write'],
|
|
288
|
-
trustedAgents: [],
|
|
289
|
-
expertise: { requirements: 0.95, documentation: 0.9, analysis: 0.8 },
|
|
290
|
-
preferences: { format: 'markdown', style: 'formal' },
|
|
291
|
-
},
|
|
292
|
-
environment: {
|
|
293
|
-
runtime: 'deno',
|
|
294
|
-
version: '1.40.0',
|
|
295
|
-
workingDirectory: './agents/requirements-engineer',
|
|
296
|
-
tempDirectory: './tmp/requirements-engineer',
|
|
297
|
-
logDirectory: './logs/requirements-engineer',
|
|
298
|
-
apiEndpoints: {},
|
|
299
|
-
credentials: {},
|
|
300
|
-
availableTools: ['document-writer', 'nlp-processor'],
|
|
301
|
-
toolConfigs: {},
|
|
302
|
-
},
|
|
303
|
-
startupScript: './scripts/start-requirements-engineer.ts',
|
|
304
|
-
});
|
|
305
|
-
// Design Architect Agent Template
|
|
306
|
-
this.templates.set('design-architect', {
|
|
307
|
-
name: 'Design Architect Agent',
|
|
308
|
-
type: 'design-architect',
|
|
309
|
-
capabilities: {
|
|
310
|
-
codeGeneration: false,
|
|
311
|
-
codeReview: true,
|
|
312
|
-
testing: false,
|
|
313
|
-
documentation: true,
|
|
314
|
-
research: true,
|
|
315
|
-
analysis: true,
|
|
316
|
-
webSearch: false,
|
|
317
|
-
apiIntegration: true,
|
|
318
|
-
fileSystem: true,
|
|
319
|
-
terminalAccess: false,
|
|
320
|
-
languages: ['typescript', 'javascript', 'python'],
|
|
321
|
-
frameworks: [],
|
|
322
|
-
domains: ['software-architecture', 'system-design', 'data-modeling'],
|
|
323
|
-
tools: ['diagram-generator', 'code-analyzer', 'api-designer'],
|
|
324
|
-
maxConcurrentTasks: 1,
|
|
325
|
-
maxMemoryUsage: 512 * 1024 * 1024,
|
|
326
|
-
maxExecutionTime: 600000,
|
|
327
|
-
reliability: 0.9,
|
|
328
|
-
speed: 0.7,
|
|
329
|
-
quality: 0.95,
|
|
330
|
-
},
|
|
331
|
-
config: {
|
|
332
|
-
autonomyLevel: 0.7,
|
|
333
|
-
learningEnabled: true,
|
|
334
|
-
adaptationEnabled: true,
|
|
335
|
-
maxTasksPerHour: 5,
|
|
336
|
-
maxConcurrentTasks: 1,
|
|
337
|
-
timeoutThreshold: 600000,
|
|
338
|
-
reportingInterval: 60000,
|
|
339
|
-
heartbeatInterval: 15000,
|
|
340
|
-
permissions: ['file-read', 'file-write'],
|
|
341
|
-
trustedAgents: [],
|
|
342
|
-
expertise: { architecture: 0.95, design: 0.9, modeling: 0.85 },
|
|
343
|
-
preferences: { diagramFormat: 'mermaid', detailLevel: 'high' },
|
|
344
|
-
},
|
|
345
|
-
environment: {
|
|
346
|
-
runtime: 'deno',
|
|
347
|
-
version: '1.40.0',
|
|
348
|
-
workingDirectory: './agents/design-architect',
|
|
349
|
-
tempDirectory: './tmp/design-architect',
|
|
350
|
-
logDirectory: './logs/design-architect',
|
|
351
|
-
apiEndpoints: {},
|
|
352
|
-
credentials: {},
|
|
353
|
-
availableTools: ['diagram-gen', 'code-analyzer'],
|
|
354
|
-
toolConfigs: {},
|
|
355
|
-
},
|
|
356
|
-
startupScript: './scripts/start-design-architect.ts',
|
|
357
|
-
});
|
|
358
|
-
// Task Planner Agent Template
|
|
359
|
-
this.templates.set('task-planner', {
|
|
360
|
-
name: 'Task Planner Agent',
|
|
361
|
-
type: 'task-planner',
|
|
362
|
-
capabilities: {
|
|
363
|
-
codeGeneration: false,
|
|
364
|
-
codeReview: false,
|
|
365
|
-
testing: false,
|
|
366
|
-
documentation: true,
|
|
367
|
-
research: false,
|
|
368
|
-
analysis: true,
|
|
369
|
-
webSearch: false,
|
|
370
|
-
apiIntegration: false,
|
|
371
|
-
fileSystem: true,
|
|
372
|
-
terminalAccess: false,
|
|
373
|
-
languages: [],
|
|
374
|
-
frameworks: [],
|
|
375
|
-
domains: ['project-management', 'task-breakdown', 'agile-planning'],
|
|
376
|
-
tools: ['task-scheduler', 'dependency-analyzer'],
|
|
377
|
-
maxConcurrentTasks: 3,
|
|
378
|
-
maxMemoryUsage: 256 * 1024 * 1024,
|
|
379
|
-
maxExecutionTime: 300000,
|
|
380
|
-
reliability: 0.95,
|
|
381
|
-
speed: 0.85,
|
|
382
|
-
quality: 0.9,
|
|
383
|
-
},
|
|
384
|
-
config: {
|
|
385
|
-
autonomyLevel: 0.8,
|
|
386
|
-
learningEnabled: true,
|
|
387
|
-
adaptationEnabled: true,
|
|
388
|
-
maxTasksPerHour: 20,
|
|
389
|
-
maxConcurrentTasks: 3,
|
|
390
|
-
timeoutThreshold: 300000,
|
|
391
|
-
reportingInterval: 30000,
|
|
392
|
-
heartbeatInterval: 10000,
|
|
393
|
-
permissions: ['file-read', 'file-write'],
|
|
394
|
-
trustedAgents: [],
|
|
395
|
-
expertise: { planning: 0.95, 'task-management': 0.9, optimization: 0.8 },
|
|
396
|
-
preferences: { outputFormat: 'markdown-checkbox', granularity: 'fine' },
|
|
397
|
-
},
|
|
398
|
-
environment: {
|
|
399
|
-
runtime: 'deno',
|
|
400
|
-
version: '1.40.0',
|
|
401
|
-
workingDirectory: './agents/task-planner',
|
|
402
|
-
tempDirectory: './tmp/task-planner',
|
|
403
|
-
logDirectory: './logs/task-planner',
|
|
404
|
-
apiEndpoints: {},
|
|
405
|
-
credentials: {},
|
|
406
|
-
availableTools: ['task-scheduler', 'dependency-analyzer'],
|
|
407
|
-
toolConfigs: {},
|
|
408
|
-
},
|
|
409
|
-
startupScript: './scripts/start-task-planner.ts',
|
|
410
|
-
});
|
|
411
|
-
// Developer Agent Template (already exists, but ensure it's aligned)
|
|
412
|
-
this.templates.set('developer', {
|
|
413
|
-
name: 'Developer Agent',
|
|
414
|
-
type: 'developer',
|
|
415
|
-
capabilities: {
|
|
416
|
-
codeGeneration: true,
|
|
417
|
-
codeReview: true,
|
|
418
|
-
testing: true,
|
|
419
|
-
documentation: true,
|
|
420
|
-
research: false,
|
|
421
|
-
analysis: true,
|
|
422
|
-
webSearch: false,
|
|
423
|
-
apiIntegration: true,
|
|
424
|
-
fileSystem: true,
|
|
425
|
-
terminalAccess: true,
|
|
426
|
-
languages: ['typescript', 'javascript', 'python', 'rust'],
|
|
427
|
-
frameworks: ['deno', 'node', 'react', 'svelte'],
|
|
428
|
-
domains: ['web-development', 'backend', 'api-design'],
|
|
429
|
-
tools: ['git', 'editor', 'debugger', 'linter', 'formatter'],
|
|
430
|
-
maxConcurrentTasks: 3,
|
|
431
|
-
maxMemoryUsage: 512 * 1024 * 1024,
|
|
432
|
-
maxExecutionTime: 1200000,
|
|
433
|
-
reliability: 0.95,
|
|
434
|
-
speed: 0.7,
|
|
435
|
-
quality: 0.95,
|
|
436
|
-
},
|
|
437
|
-
config: {
|
|
438
|
-
autonomyLevel: 0.6,
|
|
439
|
-
learningEnabled: true,
|
|
440
|
-
adaptationEnabled: true,
|
|
441
|
-
maxTasksPerHour: 10,
|
|
442
|
-
maxConcurrentTasks: 3,
|
|
443
|
-
timeoutThreshold: 1200000,
|
|
444
|
-
reportingInterval: 60000,
|
|
445
|
-
heartbeatInterval: 15000,
|
|
446
|
-
permissions: ['file-read', 'file-write', 'terminal-access', 'git-access'],
|
|
447
|
-
trustedAgents: [],
|
|
448
|
-
expertise: { coding: 0.95, testing: 0.8, debugging: 0.9 },
|
|
449
|
-
preferences: { codeStyle: 'functional', testFramework: 'deno-test' },
|
|
450
|
-
},
|
|
451
|
-
environment: {
|
|
452
|
-
runtime: 'deno',
|
|
453
|
-
version: '1.40.0',
|
|
454
|
-
workingDirectory: './agents/developer',
|
|
455
|
-
tempDirectory: './tmp/developer',
|
|
456
|
-
logDirectory: './logs/developer',
|
|
457
|
-
apiEndpoints: {},
|
|
458
|
-
credentials: {},
|
|
459
|
-
availableTools: ['git', 'deno', 'editor', 'debugger'],
|
|
460
|
-
toolConfigs: {},
|
|
461
|
-
},
|
|
462
|
-
startupScript: './scripts/start-developer.ts',
|
|
463
|
-
});
|
|
464
|
-
// System Architect Agent Template
|
|
465
|
-
this.templates.set('system-architect', {
|
|
466
|
-
name: 'System Architect Agent',
|
|
467
|
-
type: 'system-architect',
|
|
468
|
-
capabilities: {
|
|
469
|
-
codeGeneration: false,
|
|
470
|
-
codeReview: true,
|
|
471
|
-
testing: false,
|
|
472
|
-
documentation: true,
|
|
473
|
-
research: true,
|
|
474
|
-
analysis: true,
|
|
475
|
-
webSearch: false,
|
|
476
|
-
apiIntegration: true,
|
|
477
|
-
fileSystem: true,
|
|
478
|
-
terminalAccess: false,
|
|
479
|
-
languages: ['typescript', 'javascript', 'python'],
|
|
480
|
-
frameworks: ['microservices', 'distributed-systems'],
|
|
481
|
-
domains: ['system-architecture', 'scalability', 'performance', 'distributed-systems'],
|
|
482
|
-
tools: ['architecture-analyzer', 'system-modeler', 'performance-analyzer'],
|
|
483
|
-
maxConcurrentTasks: 1,
|
|
484
|
-
maxMemoryUsage: 512 * 1024 * 1024,
|
|
485
|
-
maxExecutionTime: 900000,
|
|
486
|
-
reliability: 0.95,
|
|
487
|
-
speed: 0.7,
|
|
488
|
-
quality: 0.95,
|
|
489
|
-
},
|
|
490
|
-
config: {
|
|
491
|
-
autonomyLevel: 0.8,
|
|
492
|
-
learningEnabled: true,
|
|
493
|
-
adaptationEnabled: true,
|
|
494
|
-
maxTasksPerHour: 5,
|
|
495
|
-
maxConcurrentTasks: 1,
|
|
496
|
-
timeoutThreshold: 900000,
|
|
497
|
-
reportingInterval: 60000,
|
|
498
|
-
heartbeatInterval: 15000,
|
|
499
|
-
permissions: ['file-read', 'file-write'],
|
|
500
|
-
trustedAgents: [],
|
|
501
|
-
expertise: { 'system-architecture': 0.95, scalability: 0.9, performance: 0.85 },
|
|
502
|
-
preferences: { scope: 'system-wide', focusArea: 'architecture' },
|
|
503
|
-
},
|
|
504
|
-
environment: {
|
|
505
|
-
runtime: 'deno',
|
|
506
|
-
version: '1.40.0',
|
|
507
|
-
workingDirectory: './agents/system-architect',
|
|
508
|
-
tempDirectory: './tmp/system-architect',
|
|
509
|
-
logDirectory: './logs/system-architect',
|
|
510
|
-
apiEndpoints: {},
|
|
511
|
-
credentials: {},
|
|
512
|
-
availableTools: ['architecture-analyzer', 'system-modeler'],
|
|
513
|
-
toolConfigs: {},
|
|
514
|
-
},
|
|
515
|
-
startupScript: './scripts/start-system-architect.ts',
|
|
516
|
-
});
|
|
517
|
-
// Tester Agent Template
|
|
518
|
-
this.templates.set('tester', {
|
|
519
|
-
name: 'Testing Agent',
|
|
520
|
-
type: 'tester',
|
|
521
|
-
capabilities: {
|
|
522
|
-
codeGeneration: false,
|
|
523
|
-
codeReview: true,
|
|
524
|
-
testing: true,
|
|
525
|
-
documentation: true,
|
|
526
|
-
research: false,
|
|
527
|
-
analysis: true,
|
|
528
|
-
webSearch: false,
|
|
529
|
-
apiIntegration: true,
|
|
530
|
-
fileSystem: true,
|
|
531
|
-
terminalAccess: true,
|
|
532
|
-
languages: ['typescript', 'javascript', 'python'],
|
|
533
|
-
frameworks: ['deno-test', 'jest', 'vitest', 'cypress'],
|
|
534
|
-
domains: ['testing', 'quality-assurance', 'test-automation'],
|
|
535
|
-
tools: ['test-runner', 'coverage-analyzer', 'test-generator'],
|
|
536
|
-
maxConcurrentTasks: 3,
|
|
537
|
-
maxMemoryUsage: 256 * 1024 * 1024,
|
|
538
|
-
maxExecutionTime: 600000,
|
|
539
|
-
reliability: 0.9,
|
|
540
|
-
speed: 0.8,
|
|
541
|
-
quality: 0.9,
|
|
542
|
-
},
|
|
543
|
-
config: {
|
|
544
|
-
autonomyLevel: 0.7,
|
|
545
|
-
learningEnabled: true,
|
|
546
|
-
adaptationEnabled: true,
|
|
547
|
-
maxTasksPerHour: 15,
|
|
548
|
-
maxConcurrentTasks: 3,
|
|
549
|
-
timeoutThreshold: 600000,
|
|
550
|
-
reportingInterval: 45000,
|
|
551
|
-
heartbeatInterval: 12000,
|
|
552
|
-
permissions: ['file-read', 'file-write', 'terminal-access'],
|
|
553
|
-
trustedAgents: [],
|
|
554
|
-
expertise: { testing: 0.9, 'quality-assurance': 0.85, automation: 0.8 },
|
|
555
|
-
preferences: { testFramework: 'deno-test', coverage: 'comprehensive' },
|
|
556
|
-
},
|
|
557
|
-
environment: {
|
|
558
|
-
runtime: 'deno',
|
|
559
|
-
version: '1.40.0',
|
|
560
|
-
workingDirectory: './agents/tester',
|
|
561
|
-
tempDirectory: './tmp/tester',
|
|
562
|
-
logDirectory: './logs/tester',
|
|
563
|
-
apiEndpoints: {},
|
|
564
|
-
credentials: {},
|
|
565
|
-
availableTools: ['test-runner', 'coverage-tool', 'test-gen'],
|
|
566
|
-
toolConfigs: {},
|
|
567
|
-
},
|
|
568
|
-
startupScript: './scripts/start-tester.ts',
|
|
569
|
-
});
|
|
570
|
-
// Code Reviewer Agent Template
|
|
571
|
-
this.templates.set('reviewer', {
|
|
572
|
-
name: 'Code Review Agent',
|
|
573
|
-
type: 'reviewer',
|
|
574
|
-
capabilities: {
|
|
575
|
-
codeGeneration: false,
|
|
576
|
-
codeReview: true,
|
|
577
|
-
testing: false,
|
|
578
|
-
documentation: true,
|
|
579
|
-
research: false,
|
|
580
|
-
analysis: true,
|
|
581
|
-
webSearch: false,
|
|
582
|
-
apiIntegration: false,
|
|
583
|
-
fileSystem: true,
|
|
584
|
-
terminalAccess: false,
|
|
585
|
-
languages: ['typescript', 'javascript', 'python', 'rust'],
|
|
586
|
-
frameworks: ['static-analysis', 'code-quality'],
|
|
587
|
-
domains: ['code-review', 'quality-assurance', 'best-practices'],
|
|
588
|
-
tools: ['static-analyzer', 'code-quality-checker', 'security-scanner'],
|
|
589
|
-
maxConcurrentTasks: 2,
|
|
590
|
-
maxMemoryUsage: 256 * 1024 * 1024,
|
|
591
|
-
maxExecutionTime: 450000,
|
|
592
|
-
reliability: 0.95,
|
|
593
|
-
speed: 0.8,
|
|
594
|
-
quality: 0.95,
|
|
595
|
-
},
|
|
596
|
-
config: {
|
|
597
|
-
autonomyLevel: 0.8,
|
|
598
|
-
learningEnabled: true,
|
|
599
|
-
adaptationEnabled: true,
|
|
600
|
-
maxTasksPerHour: 12,
|
|
601
|
-
maxConcurrentTasks: 2,
|
|
602
|
-
timeoutThreshold: 450000,
|
|
603
|
-
reportingInterval: 30000,
|
|
604
|
-
heartbeatInterval: 10000,
|
|
605
|
-
permissions: ['file-read'],
|
|
606
|
-
trustedAgents: [],
|
|
607
|
-
expertise: { 'code-review': 0.95, 'quality-assurance': 0.9, security: 0.8 },
|
|
608
|
-
preferences: { style: 'thorough', focus: 'quality-and-security' },
|
|
609
|
-
},
|
|
610
|
-
environment: {
|
|
611
|
-
runtime: 'deno',
|
|
612
|
-
version: '1.40.0',
|
|
613
|
-
workingDirectory: './agents/reviewer',
|
|
614
|
-
tempDirectory: './tmp/reviewer',
|
|
615
|
-
logDirectory: './logs/reviewer',
|
|
616
|
-
apiEndpoints: {},
|
|
617
|
-
credentials: {},
|
|
618
|
-
availableTools: ['static-analyzer', 'quality-checker'],
|
|
619
|
-
toolConfigs: {},
|
|
620
|
-
},
|
|
621
|
-
startupScript: './scripts/start-reviewer.ts',
|
|
622
|
-
});
|
|
623
|
-
// Steering Author Agent Template
|
|
624
|
-
this.templates.set('steering-author', {
|
|
625
|
-
name: 'Steering Author Agent',
|
|
626
|
-
type: 'steering-author',
|
|
627
|
-
capabilities: {
|
|
628
|
-
codeGeneration: false,
|
|
629
|
-
codeReview: true,
|
|
630
|
-
testing: false,
|
|
631
|
-
documentation: true,
|
|
632
|
-
research: true,
|
|
633
|
-
analysis: true,
|
|
634
|
-
webSearch: false,
|
|
635
|
-
apiIntegration: false,
|
|
636
|
-
fileSystem: true,
|
|
637
|
-
terminalAccess: false,
|
|
638
|
-
languages: [],
|
|
639
|
-
frameworks: [],
|
|
640
|
-
domains: ['documentation', 'knowledge-management', 'governance'],
|
|
641
|
-
tools: ['document-writer', 'content-analyzer'],
|
|
642
|
-
maxConcurrentTasks: 1,
|
|
643
|
-
maxMemoryUsage: 256 * 1024 * 1024,
|
|
644
|
-
maxExecutionTime: 300000,
|
|
645
|
-
reliability: 0.95,
|
|
646
|
-
speed: 0.7,
|
|
647
|
-
quality: 0.98,
|
|
648
|
-
},
|
|
649
|
-
config: {
|
|
650
|
-
autonomyLevel: 0.7,
|
|
651
|
-
learningEnabled: true,
|
|
652
|
-
adaptationEnabled: true,
|
|
653
|
-
maxTasksPerHour: 5,
|
|
654
|
-
maxConcurrentTasks: 1,
|
|
655
|
-
timeoutThreshold: 300000,
|
|
656
|
-
reportingInterval: 30000,
|
|
657
|
-
heartbeatInterval: 10000,
|
|
658
|
-
permissions: ['file-read', 'file-write'],
|
|
659
|
-
trustedAgents: [],
|
|
660
|
-
expertise: { documentation: 0.98, governance: 0.9, 'content-creation': 0.85 },
|
|
661
|
-
preferences: { style: 'concise', tone: 'formal' },
|
|
662
|
-
},
|
|
663
|
-
environment: {
|
|
664
|
-
runtime: 'deno',
|
|
665
|
-
version: '1.40.0',
|
|
666
|
-
workingDirectory: './agents/steering-author',
|
|
667
|
-
tempDirectory: './tmp/steering-author',
|
|
668
|
-
logDirectory: './logs/steering-author',
|
|
669
|
-
apiEndpoints: {},
|
|
670
|
-
credentials: {},
|
|
671
|
-
availableTools: ['document-writer', 'content-analyzer'],
|
|
672
|
-
toolConfigs: {},
|
|
673
|
-
},
|
|
674
|
-
startupScript: './scripts/start-steering-author.ts',
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
async initialize() {
|
|
678
|
-
this.logger.info('Initializing agent manager', {
|
|
679
|
-
maxAgents: this.config.maxAgents,
|
|
680
|
-
templates: this.templates.size,
|
|
681
|
-
});
|
|
682
|
-
// Start health monitoring
|
|
683
|
-
this.startHealthMonitoring();
|
|
684
|
-
// Start heartbeat monitoring
|
|
685
|
-
this.startHeartbeatMonitoring();
|
|
686
|
-
// Initialize default scaling policies
|
|
687
|
-
this.initializeScalingPolicies();
|
|
688
|
-
this.emit('agent-manager:initialized');
|
|
689
|
-
}
|
|
690
|
-
async shutdown() {
|
|
691
|
-
this.logger.info('Shutting down agent manager');
|
|
692
|
-
// Stop monitoring
|
|
693
|
-
if (this.healthInterval)
|
|
694
|
-
clearInterval(this.healthInterval);
|
|
695
|
-
if (this.heartbeatInterval)
|
|
696
|
-
clearInterval(this.heartbeatInterval);
|
|
697
|
-
// Gracefully shutdown all agents
|
|
698
|
-
const shutdownPromises = Array.from(this.agents.keys()).map((agentId) => this.stopAgent(agentId, 'shutdown'));
|
|
699
|
-
await Promise.all(shutdownPromises);
|
|
700
|
-
this.emit('agent-manager:shutdown');
|
|
701
|
-
}
|
|
702
|
-
// === AGENT LIFECYCLE ===
|
|
703
|
-
async createAgent(templateName, overrides = {}) {
|
|
704
|
-
if (this.agents.size >= this.config.maxAgents) {
|
|
705
|
-
throw new Error('Maximum agent limit reached');
|
|
706
|
-
}
|
|
707
|
-
const template = this.templates.get(templateName);
|
|
708
|
-
if (!template) {
|
|
709
|
-
throw new Error(`Template ${templateName} not found`);
|
|
710
|
-
}
|
|
711
|
-
const agentId = generateId('agent');
|
|
712
|
-
const swarmId = 'default'; // Could be parameterized
|
|
713
|
-
const agent = {
|
|
714
|
-
id: { id: agentId, swarmId, type: template.type, instance: 1 },
|
|
715
|
-
name: overrides.name || `${template.name}-${agentId.slice(-8)}`,
|
|
716
|
-
type: template.type,
|
|
717
|
-
status: 'initializing',
|
|
718
|
-
capabilities: { ...template.capabilities },
|
|
719
|
-
metrics: this.createDefaultMetrics(),
|
|
720
|
-
workload: 0,
|
|
721
|
-
health: 1.0,
|
|
722
|
-
config: {
|
|
723
|
-
autonomyLevel: template.config.autonomyLevel ?? this.config.agentDefaults.autonomyLevel,
|
|
724
|
-
learningEnabled: template.config.learningEnabled ?? this.config.agentDefaults.learningEnabled,
|
|
725
|
-
adaptationEnabled: template.config.adaptationEnabled ?? this.config.agentDefaults.adaptationEnabled,
|
|
726
|
-
maxTasksPerHour: template.config.maxTasksPerHour ?? 10,
|
|
727
|
-
maxConcurrentTasks: template.config.maxConcurrentTasks ?? 3,
|
|
728
|
-
timeoutThreshold: template.config.timeoutThreshold ?? 300000,
|
|
729
|
-
reportingInterval: template.config.reportingInterval ?? 30000,
|
|
730
|
-
heartbeatInterval: template.config.heartbeatInterval ?? 10000,
|
|
731
|
-
permissions: template.config.permissions ?? [],
|
|
732
|
-
trustedAgents: template.config.trustedAgents ?? [],
|
|
733
|
-
expertise: template.config.expertise ?? {},
|
|
734
|
-
preferences: template.config.preferences ?? {},
|
|
735
|
-
...overrides.config,
|
|
736
|
-
},
|
|
737
|
-
environment: {
|
|
738
|
-
runtime: template.environment.runtime ?? this.config.environmentDefaults.runtime,
|
|
739
|
-
version: template.environment.version ?? '1.40.0',
|
|
740
|
-
workingDirectory: template.environment.workingDirectory ?? this.config.environmentDefaults.workingDirectory,
|
|
741
|
-
tempDirectory: template.environment.tempDirectory ?? this.config.environmentDefaults.tempDirectory,
|
|
742
|
-
logDirectory: template.environment.logDirectory ?? this.config.environmentDefaults.logDirectory,
|
|
743
|
-
apiEndpoints: template.environment.apiEndpoints ?? {},
|
|
744
|
-
credentials: template.environment.credentials ?? {},
|
|
745
|
-
availableTools: template.environment.availableTools ?? [],
|
|
746
|
-
toolConfigs: template.environment.toolConfigs ?? {},
|
|
747
|
-
...overrides.environment,
|
|
748
|
-
},
|
|
749
|
-
endpoints: [],
|
|
750
|
-
lastHeartbeat: new Date(),
|
|
751
|
-
taskHistory: [],
|
|
752
|
-
errorHistory: [],
|
|
753
|
-
childAgents: [],
|
|
754
|
-
collaborators: [],
|
|
755
|
-
};
|
|
756
|
-
this.agents.set(agentId, agent);
|
|
757
|
-
this.healthChecks.set(agentId, this.createDefaultHealth(agentId));
|
|
758
|
-
this.logger.info('Created agent', {
|
|
759
|
-
agentId,
|
|
760
|
-
name: agent.name,
|
|
761
|
-
type: agent.type,
|
|
762
|
-
template: templateName,
|
|
763
|
-
});
|
|
764
|
-
this.emit('agent:created', { agent });
|
|
765
|
-
// Store in memory for persistence
|
|
766
|
-
await this.memory.store(`agent:${agentId}`, agent, {
|
|
767
|
-
type: 'agent-state',
|
|
768
|
-
tags: [agent.type, 'active'],
|
|
769
|
-
partition: 'state',
|
|
770
|
-
});
|
|
771
|
-
return agentId;
|
|
772
|
-
}
|
|
773
|
-
async startAgent(agentId) {
|
|
774
|
-
const agent = this.agents.get(agentId);
|
|
775
|
-
if (!agent) {
|
|
776
|
-
throw new Error(`Agent ${agentId} not found`);
|
|
777
|
-
}
|
|
778
|
-
if (agent.status !== 'initializing' && agent.status !== 'offline') {
|
|
779
|
-
throw new Error(`Agent ${agentId} cannot be started from status ${agent.status}`);
|
|
780
|
-
}
|
|
781
|
-
try {
|
|
782
|
-
agent.status = 'initializing';
|
|
783
|
-
this.updateAgentStatus(agentId, 'initializing');
|
|
784
|
-
// Spawn agent process
|
|
785
|
-
const process = await this.spawnAgentProcess(agent);
|
|
786
|
-
this.processes.set(agentId, process);
|
|
787
|
-
// Wait for agent to signal ready
|
|
788
|
-
await this.waitForAgentReady(agentId, this.config.defaultTimeout);
|
|
789
|
-
agent.status = 'idle';
|
|
790
|
-
this.updateAgentStatus(agentId, 'idle');
|
|
791
|
-
this.logger.info('Started agent', { agentId, name: agent.name });
|
|
792
|
-
this.emit('agent:started', { agent });
|
|
793
|
-
}
|
|
794
|
-
catch (error) {
|
|
795
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
796
|
-
agent.status = 'error';
|
|
797
|
-
this.addAgentError(agentId, {
|
|
798
|
-
timestamp: new Date(),
|
|
799
|
-
type: 'startup_failed',
|
|
800
|
-
message: errorMessage,
|
|
801
|
-
context: { agentId },
|
|
802
|
-
severity: 'critical',
|
|
803
|
-
resolved: false,
|
|
804
|
-
});
|
|
805
|
-
this.logger.error('Failed to start agent', { agentId, error });
|
|
806
|
-
throw error;
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
async stopAgent(agentId, reason = 'user_request') {
|
|
810
|
-
const agent = this.agents.get(agentId);
|
|
811
|
-
if (!agent) {
|
|
812
|
-
throw new Error(`Agent ${agentId} not found`);
|
|
813
|
-
}
|
|
814
|
-
if (agent.status === 'offline' || agent.status === 'terminated') {
|
|
815
|
-
return; // Already stopped
|
|
816
|
-
}
|
|
817
|
-
try {
|
|
818
|
-
agent.status = 'terminating';
|
|
819
|
-
this.updateAgentStatus(agentId, 'terminating');
|
|
820
|
-
// Send graceful shutdown signal
|
|
821
|
-
const process = this.processes.get(agentId);
|
|
822
|
-
if (process && !process.killed) {
|
|
823
|
-
process.kill('SIGTERM');
|
|
824
|
-
// Force kill after timeout
|
|
825
|
-
setTimeout(() => {
|
|
826
|
-
if (process && !process.killed) {
|
|
827
|
-
process.kill('SIGKILL');
|
|
828
|
-
}
|
|
829
|
-
}, this.config.defaultTimeout);
|
|
830
|
-
}
|
|
831
|
-
// Wait for process to exit
|
|
832
|
-
await this.waitForProcessExit(agentId, this.config.defaultTimeout);
|
|
833
|
-
agent.status = 'terminated';
|
|
834
|
-
this.updateAgentStatus(agentId, 'terminated');
|
|
835
|
-
// Cleanup
|
|
836
|
-
this.processes.delete(agentId);
|
|
837
|
-
this.logger.info('Stopped agent', { agentId, reason });
|
|
838
|
-
this.emit('agent:stopped', { agent, reason });
|
|
839
|
-
}
|
|
840
|
-
catch (error) {
|
|
841
|
-
this.logger.error('Failed to stop agent gracefully', { agentId, error });
|
|
842
|
-
// Force cleanup
|
|
843
|
-
this.processes.delete(agentId);
|
|
844
|
-
agent.status = 'terminated';
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
async restartAgent(agentId, reason = 'restart_requested') {
|
|
848
|
-
this.logger.info('Restarting agent', { agentId, reason });
|
|
849
|
-
await this.stopAgent(agentId, `restart:${reason}`);
|
|
850
|
-
await this.startAgent(agentId);
|
|
851
|
-
this.emit('agent:restarted', { agentId, reason });
|
|
852
|
-
}
|
|
853
|
-
async removeAgent(agentId) {
|
|
854
|
-
const agent = this.agents.get(agentId);
|
|
855
|
-
if (!agent) {
|
|
856
|
-
throw new Error(`Agent ${agentId} not found`);
|
|
857
|
-
}
|
|
858
|
-
// Stop agent if running
|
|
859
|
-
if (agent.status !== 'terminated' && agent.status !== 'offline') {
|
|
860
|
-
await this.stopAgent(agentId, 'removal');
|
|
861
|
-
}
|
|
862
|
-
// Remove from all data structures
|
|
863
|
-
this.agents.delete(agentId);
|
|
864
|
-
this.healthChecks.delete(agentId);
|
|
865
|
-
this.resourceUsage.delete(agentId);
|
|
866
|
-
this.performanceHistory.delete(agentId);
|
|
867
|
-
// Remove from pools and clusters
|
|
868
|
-
this.removeAgentFromPoolsAndClusters(agentId);
|
|
869
|
-
// Remove from memory
|
|
870
|
-
await this.memory.deleteEntry(`agent:${agentId}`);
|
|
871
|
-
this.logger.info('Removed agent', { agentId });
|
|
872
|
-
this.emit('agent:removed', { agentId });
|
|
873
|
-
}
|
|
874
|
-
// === AGENT POOLS ===
|
|
875
|
-
async createAgentPool(name, templateName, config) {
|
|
876
|
-
const template = this.templates.get(templateName);
|
|
877
|
-
if (!template) {
|
|
878
|
-
throw new Error(`Template ${templateName} not found`);
|
|
879
|
-
}
|
|
880
|
-
const poolId = generateId('pool');
|
|
881
|
-
const pool = {
|
|
882
|
-
id: poolId,
|
|
883
|
-
name,
|
|
884
|
-
type: template.type,
|
|
885
|
-
minSize: config.minSize,
|
|
886
|
-
maxSize: config.maxSize,
|
|
887
|
-
currentSize: 0,
|
|
888
|
-
availableAgents: [],
|
|
889
|
-
busyAgents: [],
|
|
890
|
-
template,
|
|
891
|
-
autoScale: config.autoScale || false,
|
|
892
|
-
scaleUpThreshold: config.scaleUpThreshold || 0.8,
|
|
893
|
-
scaleDownThreshold: config.scaleDownThreshold || 0.3,
|
|
894
|
-
};
|
|
895
|
-
this.pools.set(poolId, pool);
|
|
896
|
-
// Create minimum agents
|
|
897
|
-
for (let i = 0; i < config.minSize; i++) {
|
|
898
|
-
const agentId = await this.createAgent(templateName, {
|
|
899
|
-
name: `${name}-${i + 1}`,
|
|
900
|
-
});
|
|
901
|
-
await this.startAgent(agentId);
|
|
902
|
-
pool.availableAgents.push({
|
|
903
|
-
id: agentId,
|
|
904
|
-
swarmId: 'default',
|
|
905
|
-
type: template.type,
|
|
906
|
-
instance: i + 1,
|
|
907
|
-
});
|
|
908
|
-
pool.currentSize++;
|
|
909
|
-
}
|
|
910
|
-
this.logger.info('Created agent pool', { poolId, name, minSize: config.minSize });
|
|
911
|
-
this.emit('pool:created', { pool });
|
|
912
|
-
return poolId;
|
|
913
|
-
}
|
|
914
|
-
async scalePool(poolId, targetSize) {
|
|
915
|
-
const pool = this.pools.get(poolId);
|
|
916
|
-
if (!pool) {
|
|
917
|
-
throw new Error(`Pool ${poolId} not found`);
|
|
918
|
-
}
|
|
919
|
-
if (targetSize < pool.minSize || targetSize > pool.maxSize) {
|
|
920
|
-
throw new Error(`Target size ${targetSize} outside pool limits [${pool.minSize}, ${pool.maxSize}]`);
|
|
921
|
-
}
|
|
922
|
-
const currentSize = pool.currentSize;
|
|
923
|
-
const delta = targetSize - currentSize;
|
|
924
|
-
if (delta > 0) {
|
|
925
|
-
// Scale up
|
|
926
|
-
for (let i = 0; i < delta; i++) {
|
|
927
|
-
const agentId = await this.createAgent(pool.template.name, {
|
|
928
|
-
name: `${pool.name}-${currentSize + i + 1}`,
|
|
929
|
-
});
|
|
930
|
-
await this.startAgent(agentId);
|
|
931
|
-
pool.availableAgents.push({
|
|
932
|
-
id: agentId,
|
|
933
|
-
swarmId: 'default',
|
|
934
|
-
type: pool.type,
|
|
935
|
-
instance: currentSize + i + 1,
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
else if (delta < 0) {
|
|
940
|
-
// Scale down
|
|
941
|
-
const agentsToRemove = pool.availableAgents.slice(0, Math.abs(delta));
|
|
942
|
-
for (const agentId of agentsToRemove) {
|
|
943
|
-
await this.removeAgent(agentId.id);
|
|
944
|
-
pool.availableAgents = pool.availableAgents.filter((a) => a.id !== agentId.id);
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
pool.currentSize = targetSize;
|
|
948
|
-
this.logger.info('Scaled pool', { poolId, fromSize: currentSize, toSize: targetSize });
|
|
949
|
-
this.emit('pool:scaled', { pool, fromSize: currentSize, toSize: targetSize });
|
|
950
|
-
}
|
|
951
|
-
// === HEALTH MONITORING ===
|
|
952
|
-
startHealthMonitoring() {
|
|
953
|
-
this.healthInterval = setInterval(() => {
|
|
954
|
-
this.performHealthChecks();
|
|
955
|
-
}, this.config.healthCheckInterval);
|
|
956
|
-
this.logger.info('Started health monitoring', {
|
|
957
|
-
interval: this.config.healthCheckInterval,
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
|
-
startHeartbeatMonitoring() {
|
|
961
|
-
this.heartbeatInterval = setInterval(() => {
|
|
962
|
-
this.checkHeartbeats();
|
|
963
|
-
}, this.config.heartbeatInterval);
|
|
964
|
-
this.logger.info('Started heartbeat monitoring', {
|
|
965
|
-
interval: this.config.heartbeatInterval,
|
|
966
|
-
});
|
|
967
|
-
}
|
|
968
|
-
async performHealthChecks() {
|
|
969
|
-
const healthPromises = Array.from(this.agents.keys()).map((agentId) => this.checkAgentHealth(agentId));
|
|
970
|
-
await Promise.allSettled(healthPromises);
|
|
971
|
-
}
|
|
972
|
-
async checkAgentHealth(agentId) {
|
|
973
|
-
const agent = this.agents.get(agentId);
|
|
974
|
-
if (!agent)
|
|
975
|
-
return;
|
|
976
|
-
const health = this.healthChecks.get(agentId);
|
|
977
|
-
if (!health)
|
|
978
|
-
return;
|
|
979
|
-
const now = new Date();
|
|
980
|
-
try {
|
|
981
|
-
// Check responsiveness
|
|
982
|
-
const responsiveness = await this.checkResponsiveness(agentId);
|
|
983
|
-
health.components.responsiveness = responsiveness;
|
|
984
|
-
// Check performance
|
|
985
|
-
const performance = this.calculatePerformanceScore(agentId);
|
|
986
|
-
health.components.performance = performance;
|
|
987
|
-
// Check reliability
|
|
988
|
-
const reliability = this.calculateReliabilityScore(agentId);
|
|
989
|
-
health.components.reliability = reliability;
|
|
990
|
-
// Check resource usage
|
|
991
|
-
const resourceScore = this.calculateResourceScore(agentId);
|
|
992
|
-
health.components.resourceUsage = resourceScore;
|
|
993
|
-
// Calculate overall health
|
|
994
|
-
const overall = (responsiveness + performance + reliability + resourceScore) / 4;
|
|
995
|
-
health.overall = overall;
|
|
996
|
-
health.lastCheck = now;
|
|
997
|
-
// Update agent health
|
|
998
|
-
agent.health = overall;
|
|
999
|
-
// Check for issues
|
|
1000
|
-
this.detectHealthIssues(agentId, health);
|
|
1001
|
-
// Auto-restart if critically unhealthy
|
|
1002
|
-
if (overall < 0.3 && this.config.autoRestart) {
|
|
1003
|
-
this.logger.warn('Agent critically unhealthy, restarting', { agentId, health: overall });
|
|
1004
|
-
await this.restartAgent(agentId, 'health_critical');
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
catch (error) {
|
|
1008
|
-
this.logger.error('Health check failed', { agentId, error });
|
|
1009
|
-
health.overall = 0;
|
|
1010
|
-
health.lastCheck = now;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
async checkResponsiveness(agentId) {
|
|
1014
|
-
// Send ping and measure response time
|
|
1015
|
-
try {
|
|
1016
|
-
// This would send an actual ping to the agent
|
|
1017
|
-
// For now, simulate based on last heartbeat
|
|
1018
|
-
const agent = this.agents.get(agentId);
|
|
1019
|
-
if (!agent)
|
|
1020
|
-
return 0;
|
|
1021
|
-
const timeSinceHeartbeat = Date.now() - agent.lastHeartbeat.getTime();
|
|
1022
|
-
if (timeSinceHeartbeat > this.config.heartbeatInterval * 3) {
|
|
1023
|
-
return 0; // Unresponsive
|
|
1024
|
-
}
|
|
1025
|
-
else if (timeSinceHeartbeat > this.config.heartbeatInterval * 2) {
|
|
1026
|
-
return 0.5; // Slow
|
|
1027
|
-
}
|
|
1028
|
-
else {
|
|
1029
|
-
return 1.0; // Responsive
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
catch (error) {
|
|
1033
|
-
return 0; // Failed to respond
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
calculatePerformanceScore(agentId) {
|
|
1037
|
-
const history = this.performanceHistory.get(agentId) || [];
|
|
1038
|
-
if (history.length === 0)
|
|
1039
|
-
return 1.0;
|
|
1040
|
-
// Calculate average task completion time vs expected
|
|
1041
|
-
const recent = history.slice(-10); // Last 10 entries
|
|
1042
|
-
const avgTime = recent.reduce((sum, entry) => sum + entry.metrics.averageExecutionTime, 0) / recent.length;
|
|
1043
|
-
// Normalize based on expected performance (simplified)
|
|
1044
|
-
const expectedTime = 60000; // 1 minute baseline
|
|
1045
|
-
return Math.max(0, Math.min(1, expectedTime / avgTime));
|
|
1046
|
-
}
|
|
1047
|
-
calculateReliabilityScore(agentId) {
|
|
1048
|
-
const agent = this.agents.get(agentId);
|
|
1049
|
-
if (!agent)
|
|
1050
|
-
return 0;
|
|
1051
|
-
const totalTasks = agent.metrics.tasksCompleted + agent.metrics.tasksFailed;
|
|
1052
|
-
if (totalTasks === 0)
|
|
1053
|
-
return 1.0;
|
|
1054
|
-
return agent.metrics.tasksCompleted / totalTasks;
|
|
1055
|
-
}
|
|
1056
|
-
calculateResourceScore(agentId) {
|
|
1057
|
-
const usage = this.resourceUsage.get(agentId);
|
|
1058
|
-
if (!usage)
|
|
1059
|
-
return 1.0;
|
|
1060
|
-
const limits = this.config.resourceLimits;
|
|
1061
|
-
const memoryScore = 1 - usage.memory / limits.memory;
|
|
1062
|
-
const cpuScore = 1 - usage.cpu / limits.cpu;
|
|
1063
|
-
const diskScore = 1 - usage.disk / limits.disk;
|
|
1064
|
-
return Math.max(0, (memoryScore + cpuScore + diskScore) / 3);
|
|
1065
|
-
}
|
|
1066
|
-
detectHealthIssues(agentId, health) {
|
|
1067
|
-
const issues = [];
|
|
1068
|
-
if (health.components.responsiveness < 0.5) {
|
|
1069
|
-
issues.push({
|
|
1070
|
-
type: 'communication',
|
|
1071
|
-
severity: health.components.responsiveness < 0.2 ? 'critical' : 'high',
|
|
1072
|
-
message: 'Agent is not responding to heartbeats',
|
|
1073
|
-
timestamp: new Date(),
|
|
1074
|
-
resolved: false,
|
|
1075
|
-
recommendedAction: 'Restart agent or check network connectivity',
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
if (health.components.performance < 0.6) {
|
|
1079
|
-
issues.push({
|
|
1080
|
-
type: 'performance',
|
|
1081
|
-
severity: health.components.performance < 0.3 ? 'high' : 'medium',
|
|
1082
|
-
message: 'Agent performance is below expected levels',
|
|
1083
|
-
timestamp: new Date(),
|
|
1084
|
-
resolved: false,
|
|
1085
|
-
recommendedAction: 'Check resource allocation or agent configuration',
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
if (health.components.resourceUsage < 0.4) {
|
|
1089
|
-
issues.push({
|
|
1090
|
-
type: 'resource',
|
|
1091
|
-
severity: health.components.resourceUsage < 0.2 ? 'critical' : 'high',
|
|
1092
|
-
message: 'Agent resource usage is critically high',
|
|
1093
|
-
timestamp: new Date(),
|
|
1094
|
-
resolved: false,
|
|
1095
|
-
recommendedAction: 'Increase resource limits or reduce workload',
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
health.issues = issues;
|
|
1099
|
-
}
|
|
1100
|
-
checkHeartbeats() {
|
|
1101
|
-
const now = Date.now();
|
|
1102
|
-
const timeout = this.config.heartbeatInterval * 3;
|
|
1103
|
-
for (const [agentId, agent] of Array.from(this.agents.entries())) {
|
|
1104
|
-
const timeSinceHeartbeat = now - agent.lastHeartbeat.getTime();
|
|
1105
|
-
if (timeSinceHeartbeat > timeout &&
|
|
1106
|
-
agent.status !== 'offline' &&
|
|
1107
|
-
agent.status !== 'terminated') {
|
|
1108
|
-
this.logger.warn('Agent heartbeat timeout', { agentId, timeSinceHeartbeat });
|
|
1109
|
-
agent.status = 'error';
|
|
1110
|
-
this.addAgentError(agentId, {
|
|
1111
|
-
timestamp: new Date(),
|
|
1112
|
-
type: 'heartbeat_timeout',
|
|
1113
|
-
message: 'Agent failed to send heartbeat within timeout period',
|
|
1114
|
-
context: { timeout, timeSinceHeartbeat },
|
|
1115
|
-
severity: 'high',
|
|
1116
|
-
resolved: false,
|
|
1117
|
-
});
|
|
1118
|
-
this.emit('agent:heartbeat-timeout', { agentId, timeSinceHeartbeat });
|
|
1119
|
-
// Auto-restart if enabled
|
|
1120
|
-
if (this.config.autoRestart) {
|
|
1121
|
-
this.restartAgent(agentId, 'heartbeat_timeout').catch((error) => {
|
|
1122
|
-
this.logger.error('Failed to auto-restart agent', { agentId, error });
|
|
1123
|
-
});
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
// === UTILITY METHODS ===
|
|
1129
|
-
async spawnAgentProcess(agent) {
|
|
1130
|
-
const env = {
|
|
1131
|
-
...process.env,
|
|
1132
|
-
AGENT_ID: agent.id.id,
|
|
1133
|
-
AGENT_TYPE: agent.type,
|
|
1134
|
-
AGENT_NAME: agent.name,
|
|
1135
|
-
WORKING_DIR: agent.environment.workingDirectory,
|
|
1136
|
-
LOG_DIR: agent.environment.logDirectory,
|
|
1137
|
-
};
|
|
1138
|
-
const args = [
|
|
1139
|
-
'run',
|
|
1140
|
-
'--allow-all',
|
|
1141
|
-
agent.environment.availableTools[0] || './agents/generic-agent.ts',
|
|
1142
|
-
'--config',
|
|
1143
|
-
JSON.stringify(agent.config),
|
|
1144
|
-
];
|
|
1145
|
-
const childProcess = spawn(agent.environment.runtime, args, {
|
|
1146
|
-
env,
|
|
1147
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
1148
|
-
cwd: agent.environment.workingDirectory,
|
|
1149
|
-
});
|
|
1150
|
-
// Handle process events
|
|
1151
|
-
childProcess.on('exit', (code) => {
|
|
1152
|
-
this.handleProcessExit(agent.id.id, code);
|
|
1153
|
-
});
|
|
1154
|
-
childProcess.on('error', (error) => {
|
|
1155
|
-
this.handleProcessError(agent.id.id, error);
|
|
1156
|
-
});
|
|
1157
|
-
return childProcess;
|
|
1158
|
-
}
|
|
1159
|
-
async waitForAgentReady(agentId, timeout) {
|
|
1160
|
-
return new Promise((resolve, reject) => {
|
|
1161
|
-
const timer = setTimeout(() => {
|
|
1162
|
-
reject(new Error(`Agent ${agentId} startup timeout`));
|
|
1163
|
-
}, timeout);
|
|
1164
|
-
const handler = (data) => {
|
|
1165
|
-
const readyData = data;
|
|
1166
|
-
if (readyData.agentId === agentId) {
|
|
1167
|
-
clearTimeout(timer);
|
|
1168
|
-
this.eventBus.off('agent:ready', handler);
|
|
1169
|
-
resolve();
|
|
1170
|
-
}
|
|
1171
|
-
};
|
|
1172
|
-
this.eventBus.on('agent:ready', handler);
|
|
1173
|
-
});
|
|
1174
|
-
}
|
|
1175
|
-
async waitForProcessExit(agentId, timeout) {
|
|
1176
|
-
return new Promise((resolve) => {
|
|
1177
|
-
const process = this.processes.get(agentId);
|
|
1178
|
-
if (!process || process.killed) {
|
|
1179
|
-
resolve();
|
|
1180
|
-
return;
|
|
1181
|
-
}
|
|
1182
|
-
const timer = setTimeout(() => {
|
|
1183
|
-
resolve(); // Timeout, continue anyway
|
|
1184
|
-
}, timeout);
|
|
1185
|
-
process.on('exit', () => {
|
|
1186
|
-
clearTimeout(timer);
|
|
1187
|
-
resolve();
|
|
1188
|
-
});
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
handleProcessExit(agentId, code) {
|
|
1192
|
-
const agent = this.agents.get(agentId);
|
|
1193
|
-
if (!agent)
|
|
1194
|
-
return;
|
|
1195
|
-
this.logger.info('Agent process exited', { agentId, exitCode: code });
|
|
1196
|
-
if (code !== 0 && code !== null) {
|
|
1197
|
-
this.addAgentError(agentId, {
|
|
1198
|
-
timestamp: new Date(),
|
|
1199
|
-
type: 'process_exit',
|
|
1200
|
-
message: `Agent process exited with code ${code}`,
|
|
1201
|
-
context: { exitCode: code },
|
|
1202
|
-
severity: 'high',
|
|
1203
|
-
resolved: false,
|
|
1204
|
-
});
|
|
1205
|
-
}
|
|
1206
|
-
agent.status = 'offline';
|
|
1207
|
-
this.emit('agent:process-exit', { agentId, exitCode: code });
|
|
1208
|
-
}
|
|
1209
|
-
handleProcessError(agentId, error) {
|
|
1210
|
-
this.logger.error('Agent process error', { agentId, error });
|
|
1211
|
-
this.addAgentError(agentId, {
|
|
1212
|
-
timestamp: new Date(),
|
|
1213
|
-
type: 'process_error',
|
|
1214
|
-
message: error instanceof Error ? error.message : String(error),
|
|
1215
|
-
context: { error: error.toString() },
|
|
1216
|
-
severity: 'critical',
|
|
1217
|
-
resolved: false,
|
|
1218
|
-
});
|
|
1219
|
-
this.emit('agent:process-error', { agentId, error });
|
|
1220
|
-
}
|
|
1221
|
-
handleHeartbeat(data) {
|
|
1222
|
-
const agent = this.agents.get(data.agentId);
|
|
1223
|
-
if (!agent)
|
|
1224
|
-
return;
|
|
1225
|
-
agent.lastHeartbeat = data.timestamp;
|
|
1226
|
-
if (data.metrics) {
|
|
1227
|
-
this.updateAgentMetrics(data.agentId, data.metrics);
|
|
1228
|
-
}
|
|
1229
|
-
// Update health if agent was previously unresponsive
|
|
1230
|
-
if (agent.status === 'error') {
|
|
1231
|
-
agent.status = 'idle';
|
|
1232
|
-
this.updateAgentStatus(data.agentId, 'idle');
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
handleAgentError(data) {
|
|
1236
|
-
this.addAgentError(data.agentId, data.error);
|
|
1237
|
-
const agent = this.agents.get(data.agentId);
|
|
1238
|
-
if (agent && data.error.severity === 'critical') {
|
|
1239
|
-
agent.status = 'error';
|
|
1240
|
-
this.updateAgentStatus(data.agentId, 'error');
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
updateAgentStatus(agentId, status) {
|
|
1244
|
-
const agent = this.agents.get(agentId);
|
|
1245
|
-
if (!agent)
|
|
1246
|
-
return;
|
|
1247
|
-
const oldStatus = agent.status;
|
|
1248
|
-
agent.status = status;
|
|
1249
|
-
this.emit('agent:status-changed', { agentId, from: oldStatus, to: status });
|
|
1250
|
-
}
|
|
1251
|
-
updateAgentWorkload(agentId, delta) {
|
|
1252
|
-
const agent = this.agents.get(agentId);
|
|
1253
|
-
if (!agent)
|
|
1254
|
-
return;
|
|
1255
|
-
agent.workload = Math.max(0, agent.workload + delta);
|
|
1256
|
-
}
|
|
1257
|
-
updateAgentMetrics(agentId, metrics) {
|
|
1258
|
-
const agent = this.agents.get(agentId);
|
|
1259
|
-
if (!agent)
|
|
1260
|
-
return;
|
|
1261
|
-
agent.metrics = { ...agent.metrics, ...metrics };
|
|
1262
|
-
// Store performance history
|
|
1263
|
-
const history = this.performanceHistory.get(agentId) || [];
|
|
1264
|
-
history.push({ timestamp: new Date(), metrics: { ...metrics } });
|
|
1265
|
-
// Keep only last 100 entries
|
|
1266
|
-
if (history.length > 100) {
|
|
1267
|
-
history.shift();
|
|
1268
|
-
}
|
|
1269
|
-
this.performanceHistory.set(agentId, history);
|
|
1270
|
-
}
|
|
1271
|
-
updateResourceUsage(agentId, usage) {
|
|
1272
|
-
this.resourceUsage.set(agentId, usage);
|
|
1273
|
-
}
|
|
1274
|
-
addAgentError(agentId, error) {
|
|
1275
|
-
const agent = this.agents.get(agentId);
|
|
1276
|
-
if (!agent)
|
|
1277
|
-
return;
|
|
1278
|
-
agent.errorHistory.push(error);
|
|
1279
|
-
// Keep only last 50 errors
|
|
1280
|
-
if (agent.errorHistory.length > 50) {
|
|
1281
|
-
agent.errorHistory.shift();
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
createDefaultMetrics() {
|
|
1285
|
-
return {
|
|
1286
|
-
tasksCompleted: 0,
|
|
1287
|
-
tasksFailed: 0,
|
|
1288
|
-
averageExecutionTime: 0,
|
|
1289
|
-
successRate: 1.0,
|
|
1290
|
-
cpuUsage: 0,
|
|
1291
|
-
memoryUsage: 0,
|
|
1292
|
-
diskUsage: 0,
|
|
1293
|
-
networkUsage: 0,
|
|
1294
|
-
codeQuality: 0.8,
|
|
1295
|
-
testCoverage: 0,
|
|
1296
|
-
bugRate: 0,
|
|
1297
|
-
userSatisfaction: 0.8,
|
|
1298
|
-
totalUptime: 0,
|
|
1299
|
-
lastActivity: new Date(),
|
|
1300
|
-
responseTime: 0,
|
|
1301
|
-
};
|
|
1302
|
-
}
|
|
1303
|
-
createDefaultHealth(agentId) {
|
|
1304
|
-
return {
|
|
1305
|
-
agentId,
|
|
1306
|
-
overall: 1.0,
|
|
1307
|
-
components: {
|
|
1308
|
-
responsiveness: 1.0,
|
|
1309
|
-
performance: 1.0,
|
|
1310
|
-
reliability: 1.0,
|
|
1311
|
-
resourceUsage: 1.0,
|
|
1312
|
-
},
|
|
1313
|
-
issues: [],
|
|
1314
|
-
lastCheck: new Date(),
|
|
1315
|
-
trend: 'stable',
|
|
1316
|
-
};
|
|
1317
|
-
}
|
|
1318
|
-
removeAgentFromPoolsAndClusters(agentId) {
|
|
1319
|
-
// Remove from pools
|
|
1320
|
-
for (const pool of Array.from(this.pools.values())) {
|
|
1321
|
-
pool.availableAgents = pool.availableAgents.filter((a) => a.id !== agentId);
|
|
1322
|
-
pool.busyAgents = pool.busyAgents.filter((a) => a.id !== agentId);
|
|
1323
|
-
pool.currentSize = pool.availableAgents.length + pool.busyAgents.length;
|
|
1324
|
-
}
|
|
1325
|
-
// Remove from clusters
|
|
1326
|
-
for (const cluster of Array.from(this.clusters.values())) {
|
|
1327
|
-
cluster.agents = cluster.agents.filter((a) => a.id !== agentId);
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
initializeScalingPolicies() {
|
|
1331
|
-
// Default auto-scaling policy
|
|
1332
|
-
const defaultPolicy = {
|
|
1333
|
-
name: 'default-autoscale',
|
|
1334
|
-
enabled: true,
|
|
1335
|
-
cooldownPeriod: 300000, // 5 minutes
|
|
1336
|
-
maxScaleOperations: 10,
|
|
1337
|
-
rules: [
|
|
1338
|
-
{
|
|
1339
|
-
metric: 'pool-utilization',
|
|
1340
|
-
threshold: 0.8,
|
|
1341
|
-
comparison: 'gt',
|
|
1342
|
-
action: 'scale-up',
|
|
1343
|
-
amount: 1,
|
|
1344
|
-
},
|
|
1345
|
-
{
|
|
1346
|
-
metric: 'pool-utilization',
|
|
1347
|
-
threshold: 0.3,
|
|
1348
|
-
comparison: 'lt',
|
|
1349
|
-
action: 'scale-down',
|
|
1350
|
-
amount: 1,
|
|
1351
|
-
},
|
|
1352
|
-
],
|
|
1353
|
-
};
|
|
1354
|
-
this.scalingPolicies.set('default', defaultPolicy);
|
|
1355
|
-
}
|
|
1356
|
-
// === PUBLIC API ===
|
|
1357
|
-
getAgent(agentId) {
|
|
1358
|
-
return this.agents.get(agentId);
|
|
1359
|
-
}
|
|
1360
|
-
getAllAgents() {
|
|
1361
|
-
return Array.from(this.agents.values());
|
|
1362
|
-
}
|
|
1363
|
-
getAgentsByType(type) {
|
|
1364
|
-
return Array.from(this.agents.values()).filter((agent) => agent.type === type);
|
|
1365
|
-
}
|
|
1366
|
-
getAgentsByStatus(status) {
|
|
1367
|
-
return Array.from(this.agents.values()).filter((agent) => agent.status === status);
|
|
1368
|
-
}
|
|
1369
|
-
getAgentHealth(agentId) {
|
|
1370
|
-
return this.healthChecks.get(agentId);
|
|
1371
|
-
}
|
|
1372
|
-
getPool(poolId) {
|
|
1373
|
-
return this.pools.get(poolId);
|
|
1374
|
-
}
|
|
1375
|
-
getAllPools() {
|
|
1376
|
-
return Array.from(this.pools.values());
|
|
1377
|
-
}
|
|
1378
|
-
getAgentTemplates() {
|
|
1379
|
-
return Array.from(this.templates.values());
|
|
1380
|
-
}
|
|
1381
|
-
getSystemStats() {
|
|
1382
|
-
const agents = Array.from(this.agents.values());
|
|
1383
|
-
const healthChecks = Array.from(this.healthChecks.values());
|
|
1384
|
-
const healthyAgents = healthChecks.filter((h) => h.overall > 0.7).length;
|
|
1385
|
-
const averageHealth = healthChecks.reduce((sum, h) => sum + h.overall, 0) / healthChecks.length || 1;
|
|
1386
|
-
const resourceUsages = Array.from(this.resourceUsage.values());
|
|
1387
|
-
const avgCpu = resourceUsages.reduce((sum, r) => sum + r.cpu, 0) / resourceUsages.length || 0;
|
|
1388
|
-
const avgMemory = resourceUsages.reduce((sum, r) => sum + r.memory, 0) / resourceUsages.length || 0;
|
|
1389
|
-
const avgDisk = resourceUsages.reduce((sum, r) => sum + r.disk, 0) / resourceUsages.length || 0;
|
|
1390
|
-
return {
|
|
1391
|
-
totalAgents: agents.length,
|
|
1392
|
-
activeAgents: agents.filter((a) => a.status === 'idle' || a.status === 'busy').length,
|
|
1393
|
-
healthyAgents,
|
|
1394
|
-
pools: this.pools.size,
|
|
1395
|
-
clusters: this.clusters.size,
|
|
1396
|
-
averageHealth,
|
|
1397
|
-
resourceUtilization: {
|
|
1398
|
-
cpu: avgCpu,
|
|
1399
|
-
memory: avgMemory,
|
|
1400
|
-
disk: avgDisk,
|
|
1401
|
-
},
|
|
1402
|
-
};
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
//# sourceMappingURL=agent-manager.js.map
|