claude-flow-novice 2.3.5 → 2.3.6
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/dist/src/booster/performance-benchmark.js +1 -1
- package/dist/src/booster/wasm-demo.js +1 -1
- package/dist/src/cli/command-registry.js +2 -2
- package/dist/src/cli/help-formatter.js +137 -109
- package/dist/src/cli/simple-cli.js +2528 -2121
- package/dist/src/cli/simple-commands/sparc/refinement.js +3 -3
- package/dist/src/cli/validation-helper.js +98 -49
- package/dist/src/commands/suggest-templates.js +4 -4
- package/dist/src/core/version.js +23 -15
- package/dist/src/memory/swarm-memory.js +603 -470
- package/dist/src/slash-commands/fullstack.js +2 -2
- package/dist/src/slash-commands/parse-epic.js +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +40 -6
- package/dist/scripts/.claude-flow/metrics/agent-metrics.json +0 -1
- package/dist/scripts/.claude-flow/metrics/performance.json +0 -9
- package/dist/scripts/.claude-flow/metrics/task-metrics.json +0 -10
- package/dist/scripts/CLEANUP_OPTIMIZATION_REPORT.json +0 -312
- package/dist/scripts/CLEANUP_PERFORMANCE_OPTIMIZATION.md +0 -387
- package/dist/scripts/CLEANUP_QUICK_START.md +0 -268
- package/dist/scripts/CLEANUP_TEST_RESULTS.md +0 -205
- package/dist/scripts/README.md +0 -339
- package/dist/scripts/ace-query.sh +0 -384
- package/dist/scripts/agent-token-analysis.js +0 -430
- package/dist/scripts/auto-setup.js +0 -332
- package/dist/scripts/build/README.md +0 -167
- package/dist/scripts/build/build-config.js +0 -27
- package/dist/scripts/build/build-prompt-copier.sh +0 -30
- package/dist/scripts/build/performance-monitor.js +0 -869
- package/dist/scripts/build/prepare-publish.js +0 -150
- package/dist/scripts/build/typescript-fixer.js +0 -621
- package/dist/scripts/build/unified-builder.sh +0 -428
- package/dist/scripts/build/update-bin-version.js +0 -32
- package/dist/scripts/build/validate-agents.js +0 -238
- package/dist/scripts/build-index.js +0 -43
- package/dist/scripts/build-orchestrator.js +0 -320
- package/dist/scripts/check-routing-stats.cjs +0 -122
- package/dist/scripts/ci-validation.js +0 -375
- package/dist/scripts/cleanup-blocking-coordination.sh +0 -420
- package/dist/scripts/cleanup-idle-sessions.sh +0 -118
- package/dist/scripts/collect-build-metrics.js +0 -65
- package/dist/scripts/demo/README.md +0 -79
- package/dist/scripts/demo/autoscaling-demo-simplified.js +0 -963
- package/dist/scripts/demo/comprehensive-dashboard-test.js +0 -693
- package/dist/scripts/demo/confidence-log.js +0 -87
- package/dist/scripts/demo/confidence-report.js +0 -82
- package/dist/scripts/demo/demo-multi-swarm-coordination.js +0 -325
- package/dist/scripts/demo/demo-production-deployment.js +0 -399
- package/dist/scripts/demo/demo-visualization-system.js +0 -149
- package/dist/scripts/demo/performance-analysis.cjs +0 -71
- package/dist/scripts/demo/performance-analysis.js +0 -71
- package/dist/scripts/demo/test-autoscaling-demo.js +0 -314
- package/dist/scripts/dependency-optimizer.js +0 -349
- package/dist/scripts/dependency-security-assessment.js +0 -331
- package/dist/scripts/deploy-sdk.sh +0 -176
- package/dist/scripts/deployment-readiness-report.json +0 -179
- package/dist/scripts/dev/README.md +0 -264
- package/dist/scripts/dev/claude-flow-wrapper.sh +0 -35
- package/dist/scripts/dev/claude-monitor.py +0 -419
- package/dist/scripts/dev/claude-sparc.sh +0 -562
- package/dist/scripts/dev/claude-wrapper.sh +0 -17
- package/dist/scripts/dev/demo-phase3-compliance.js +0 -172
- package/dist/scripts/dev/demo-task-system.ts +0 -224
- package/dist/scripts/dev/deployment-validator.js +0 -315
- package/dist/scripts/dev/spawn-claude-terminal.sh +0 -32
- package/dist/scripts/dev/start-portal.sh +0 -506
- package/dist/scripts/dev/start-web-ui.js +0 -15
- package/dist/scripts/dev/stop-portal.sh +0 -311
- package/dist/scripts/dev/validate-examples.ts +0 -288
- package/dist/scripts/dev/validate-phase2.cjs +0 -451
- package/dist/scripts/dev/validate-phase2.js +0 -785
- package/dist/scripts/dev/validate-phase3.cjs +0 -208
- package/dist/scripts/dev/validate-security-remediation.js +0 -1
- package/dist/scripts/ecosystem.config.cjs +0 -90
- package/dist/scripts/enhanced-memory-spiral-killer.sh +0 -221
- package/dist/scripts/fix-js-extensions.js +0 -167
- package/dist/scripts/generate-basic-types.js +0 -73
- package/dist/scripts/generate-changelog.js +0 -318
- package/dist/scripts/git-hooks/pre-commit.sh +0 -143
- package/dist/scripts/health-checks.js +0 -634
- package/dist/scripts/hook-wrapper.sh +0 -54
- package/dist/scripts/install/README.md +0 -375
- package/dist/scripts/install/REDIS_SETUP_VALIDATION.json +0 -245
- package/dist/scripts/install/check-prerequisites.js +0 -303
- package/dist/scripts/install/config-wizard.js +0 -606
- package/dist/scripts/install/dependency-checker.js +0 -385
- package/dist/scripts/install/health-check.js +0 -765
- package/dist/scripts/install/install.js +0 -256
- package/dist/scripts/install/installation-benchmark.js +0 -461
- package/dist/scripts/install/quick-install.js +0 -720
- package/dist/scripts/install/quick-start-wizard.js +0 -295
- package/dist/scripts/install/redis-cli.js +0 -289
- package/dist/scripts/install/redis-install-guides.md +0 -407
- package/dist/scripts/install/redis-setup.js +0 -559
- package/dist/scripts/install/redis-test.js +0 -278
- package/dist/scripts/install/service-manager.js +0 -672
- package/dist/scripts/install/setup.js +0 -832
- package/dist/scripts/install/uninstall.js +0 -526
- package/dist/scripts/install/update.js +0 -461
- package/dist/scripts/install-pre-commit-hook.sh +0 -127
- package/dist/scripts/legacy/README.md +0 -272
- package/dist/scripts/legacy/batch-fix-ts.sh +0 -54
- package/dist/scripts/legacy/build-migration.sh +0 -105
- package/dist/scripts/legacy/build-monitor.js +0 -209
- package/dist/scripts/legacy/build-with-filter.sh +0 -84
- package/dist/scripts/legacy/build-workaround.sh +0 -71
- package/dist/scripts/legacy/fix-ts-advanced.js +0 -358
- package/dist/scripts/legacy/fix-ts-final.sh +0 -50
- package/dist/scripts/legacy/fix-ts-targeted.sh +0 -49
- package/dist/scripts/legacy/fix-typescript-errors.js +0 -305
- package/dist/scripts/legacy/force-build.sh +0 -63
- package/dist/scripts/legacy/optimize-performance.js +0 -400
- package/dist/scripts/legacy/performance-monitor.js +0 -263
- package/dist/scripts/legacy/performance-monitoring.js +0 -532
- package/dist/scripts/legacy/performance-test-runner.js +0 -645
- package/dist/scripts/legacy/quick-fix-ts.js +0 -281
- package/dist/scripts/legacy/safe-build.sh +0 -63
- package/dist/scripts/memory-monitor-coordinator.js +0 -451
- package/dist/scripts/migrate-to-sdk.sh +0 -520
- package/dist/scripts/migration/QUICK-START.md +0 -189
- package/dist/scripts/migration/QUICK-START.md.backup-1760135091363 +0 -189
- package/dist/scripts/migration/README.md +0 -464
- package/dist/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md +0 -500
- package/dist/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md.backup-1760135091348 +0 -500
- package/dist/scripts/migration/UPDATE-PATHS-README.md +0 -464
- package/dist/scripts/migration/UPDATE-PATHS-README.md.backup-1760135091337 +0 -464
- package/dist/scripts/migration/example-patterns.json +0 -19
- package/dist/scripts/migration/install-arm64.js +0 -78
- package/dist/scripts/migration/install.js +0 -83
- package/dist/scripts/migration/migrate-hooks.js +0 -173
- package/dist/scripts/migration/migration-examples.ts +0 -318
- package/dist/scripts/migration/reorganize-workspace.js +0 -504
- package/dist/scripts/migration/test-update-paths.js +0 -359
- package/dist/scripts/migration/update-paths.js +0 -664
- package/dist/scripts/migration/validate-migration.js +0 -647
- package/dist/scripts/monitor-loop.sh +0 -65
- package/dist/scripts/monitor-memory.sh +0 -47
- package/dist/scripts/monitor-migration.js +0 -339
- package/dist/scripts/monitor.py +0 -43
- package/dist/scripts/monitoring/README.md +0 -178
- package/dist/scripts/monitoring/alert-monitor.sh +0 -220
- package/dist/scripts/monitoring/analyze-resources.sh +0 -199
- package/dist/scripts/monitoring/dashboards/rate-limiting-dashboard.json +0 -211
- package/dist/scripts/monitoring/dynamic-monitor.sh +0 -85
- package/dist/scripts/monitoring/launch-stability-test.sh +0 -184
- package/dist/scripts/monitoring/monitor-test.sh +0 -93
- package/dist/scripts/monitoring/pre-test-validation.sh +0 -208
- package/dist/scripts/monitoring/quick-test-alerting.sh +0 -118
- package/dist/scripts/monitoring/quick-test-rate-limiting.sh +0 -206
- package/dist/scripts/monitoring/rate-limiting-monitor.sh +0 -380
- package/dist/scripts/monitoring/resource-monitor.sh +0 -126
- package/dist/scripts/monitoring/stability-monitor.js +0 -429
- package/dist/scripts/monitoring/test-monitor-quick.sh +0 -54
- package/dist/scripts/monitoring/view-alerts.sh +0 -307
- package/dist/scripts/npm-metrics-collector.js +0 -482
- package/dist/scripts/npm-package-validation.cjs +0 -299
- package/dist/scripts/optimization/build-optimizer.js +0 -438
- package/dist/scripts/optimization/config-validator.js +0 -761
- package/dist/scripts/optimization/test-optimization.js +0 -432
- package/dist/scripts/optimization/unified-activation.js +0 -839
- package/dist/scripts/optimize-package-swarm.js +0 -54
- package/dist/scripts/performance/ACTIVATION_COMMANDS.md +0 -292
- package/dist/scripts/performance/sqlite-enhanced-activation.sh +0 -583
- package/dist/scripts/performance/test-enhanced-backend.sh +0 -504
- package/dist/scripts/performance-monitor.js +0 -644
- package/dist/scripts/performance-test-runner.js +0 -698
- package/dist/scripts/post-deployment-monitoring.js +0 -350
- package/dist/scripts/post-edit-pipeline.js +0 -2091
- package/dist/scripts/post-install-claude-md.js +0 -78
- package/dist/scripts/postinstall.js +0 -60
- package/dist/scripts/pre-publish-validation.cjs +0 -212
- package/dist/scripts/pre-publish-validation.js +0 -429
- package/dist/scripts/redis-lua/cleanup-blocking-coordination.lua +0 -198
- package/dist/scripts/release-announcement.js +0 -425
- package/dist/scripts/release-notification.js +0 -248
- package/dist/scripts/release-rollback.js +0 -376
- package/dist/scripts/release-validation.js +0 -460
- package/dist/scripts/rollback-sdk.sh +0 -66
- package/dist/scripts/run-production-validation.ts +0 -590
- package/dist/scripts/run-stability-validation.sh +0 -687
- package/dist/scripts/security/README.md +0 -339
- package/dist/scripts/security/deployment-validation.cjs +0 -279
- package/dist/scripts/security/envelope-encryption-confidence-report.cjs +0 -422
- package/dist/scripts/security/install-git-hooks.sh +0 -132
- package/dist/scripts/security/install-git-secrets.sh +0 -295
- package/dist/scripts/security/rotate-api-keys.js +0 -469
- package/dist/scripts/security/ruv-swarm-safe.js +0 -74
- package/dist/scripts/security/security-audit.cjs +0 -538
- package/dist/scripts/security/setup-redis-auth.sh +0 -397
- package/dist/scripts/security/validate-envelope-encryption.cjs +0 -340
- package/dist/scripts/security-scan.js +0 -492
- package/dist/scripts/src/web/frontend/.claude-flow/metrics/agent-metrics.json +0 -1
- package/dist/scripts/src/web/frontend/.claude-flow/metrics/performance.json +0 -9
- package/dist/scripts/src/web/frontend/.claude-flow/metrics/task-metrics.json +0 -10
- package/dist/scripts/switch-api.sh +0 -159
- package/dist/scripts/sync-agents.js +0 -290
- package/dist/scripts/test/50-agent-test.js +0 -625
- package/dist/scripts/test/NEW_STABILITY_TEST_GUIDE.md +0 -407
- package/dist/scripts/test/README.md +0 -236
- package/dist/scripts/test/STABILITY_TEST_EXAMPLE.md +0 -347
- package/dist/scripts/test/STABILITY_TEST_README.md +0 -480
- package/dist/scripts/test/agent-worker.js +0 -309
- package/dist/scripts/test/ai-coordination-test.js +0 -650
- package/dist/scripts/test/ai-mesh-coordination-test.js +0 -416
- package/dist/scripts/test/check-links.ts +0 -274
- package/dist/scripts/test/check-performance-regression.ts +0 -168
- package/dist/scripts/test/cli-agent-coordination-test.js +0 -313
- package/dist/scripts/test/coordinator-multilingual-test.js +0 -396
- package/dist/scripts/test/coordinator-transparency-demo.js +0 -585
- package/dist/scripts/test/coverage-report.ts +0 -692
- package/dist/scripts/test/generate-swarm-tests.js +0 -633
- package/dist/scripts/test/integration-test-validation.cjs +0 -253
- package/dist/scripts/test/load-test-swarm.js +0 -576
- package/dist/scripts/test/mesh-coordination-zero-overlap-test.js +0 -740
- package/dist/scripts/test/multilingual-hello-world-test.js +0 -390
- package/dist/scripts/test/quick-multilingual-demo.js +0 -464
- package/dist/scripts/test/real-agent-test.js +0 -312
- package/dist/scripts/test/run-phase3-compliance-tests.js +0 -427
- package/dist/scripts/test/run-stability-test-examples.sh +0 -292
- package/dist/scripts/test/stability-results/stability-metrics.jsonl +0 -83
- package/dist/scripts/test/stability-results/stability-test-report.json +0 -128
- package/dist/scripts/test/stability-results/stability-test.log +0 -1827
- package/dist/scripts/test/stability-test-50-agents.js +0 -734
- package/dist/scripts/test/test-batch-tasks.ts +0 -29
- package/dist/scripts/test/test-byzantine-resolution.js +0 -246
- package/dist/scripts/test/test-claude-spawn-options.sh +0 -63
- package/dist/scripts/test/test-cli-wizard.js +0 -331
- package/dist/scripts/test/test-comprehensive.js +0 -401
- package/dist/scripts/test/test-coordination-features.ts +0 -238
- package/dist/scripts/test/test-fallback-systems.js +0 -276
- package/dist/scripts/test/test-init-command.ts +0 -302
- package/dist/scripts/test/test-mcp.ts +0 -251
- package/dist/scripts/test/test-runner.ts +0 -568
- package/dist/scripts/test/test-swarm-integration.sh +0 -92
- package/dist/scripts/test/test-swarm.ts +0 -142
- package/dist/scripts/test/validation-summary.ts +0 -408
- package/dist/scripts/test-cleanup-performance.sh +0 -416
- package/dist/scripts/test-dashboard-auth.cjs +0 -203
- package/dist/scripts/test-docker-deployment.sh +0 -207
- package/dist/scripts/test-npm-package.cjs +0 -167
- package/dist/scripts/test-provider-routing.cjs +0 -226
- package/dist/scripts/test-routing-telemetry.cjs +0 -147
- package/dist/scripts/test-runner.cjs +0 -154
- package/dist/scripts/test-zai-10k.cjs +0 -81
- package/dist/scripts/test-zai-api.cjs +0 -191
- package/dist/scripts/test-zai-diagnostic.cjs +0 -151
- package/dist/scripts/test-zai-final.cjs +0 -128
- package/dist/scripts/test-zai-with-env.cjs +0 -85
- package/dist/scripts/toggle-cost-savings.cjs +0 -302
- package/dist/scripts/unified-memory-monitor.js +0 -526
- package/dist/scripts/utils/README.md +0 -261
- package/dist/scripts/utils/clean-build-artifacts.sh +0 -94
- package/dist/scripts/utils/cleanup-root.sh +0 -69
- package/dist/scripts/utils/fix-cliffy-imports.js +0 -307
- package/dist/scripts/utils/fix-duplicate-imports.js +0 -114
- package/dist/scripts/utils/fix-error-handling.cjs +0 -70
- package/dist/scripts/utils/fix-import-paths.js +0 -104
- package/dist/scripts/utils/fix-imports.js +0 -116
- package/dist/scripts/utils/fix-shebang.js +0 -78
- package/dist/scripts/utils/fix-test-modules.js +0 -27
- package/dist/scripts/utils/fix-timezone-issue-246.js +0 -200
- package/dist/scripts/utils/fix-ts-comprehensive.py +0 -182
- package/dist/scripts/utils/fix-ts-targeted-batch.js +0 -250
- package/dist/scripts/utils/remove-benchmark-conflicts.sh +0 -140
- package/dist/scripts/utils/simple-test-fixer.js +0 -190
- package/dist/scripts/utils/validate-metrics-structure.cjs +0 -144
- package/dist/scripts/validate-agent-hooks.js +0 -506
- package/dist/scripts/validate-changelog.js +0 -241
- package/dist/scripts/validate-coordination-cli.js +0 -69
- package/dist/scripts/validate-coordination-toggle-integration.cjs +0 -501
- package/dist/scripts/validate-docker-infrastructure.sh +0 -502
- package/dist/scripts/validate-entry-points.js +0 -300
- package/dist/scripts/validate-memory-monitoring.sh +0 -225
- package/dist/scripts/validate-stage3-performance.ts +0 -377
- package/dist/scripts/validate-template-bundling.js +0 -180
- package/dist/scripts/validation/README.md +0 -33
- package/dist/scripts/validation/acl-security-validation.cjs +0 -214
- package/dist/scripts/validation/acl-security-validation.js +0 -402
- package/dist/scripts/validation/byzantine-verification.js +0 -407
- package/dist/scripts/validation/final-phase-2-consensus.cjs +0 -219
- package/dist/scripts/validation/final-security-validation.js +0 -791
- package/dist/scripts/validation/final-wasm-validation.cjs +0 -840
- package/dist/scripts/validation/integration-test-analysis.js +0 -105
- package/dist/scripts/validation/phase-0-comprehensive-validation.js +0 -474
- package/dist/scripts/validation/phase-0-consensus-report.js +0 -139
- package/dist/scripts/validation/phase-0-final-report.js +0 -112
- package/dist/scripts/validation/phase-0-redis-consensus-report.js +0 -129
- package/dist/scripts/validation/phase-0-validation-improved.js +0 -490
- package/dist/scripts/validation/phase-0-validation-test.js +0 -65
- package/dist/scripts/validation/phase-1-consensus-report.cjs +0 -342
- package/dist/scripts/validation/phase-1-consensus-validation.cjs +0 -551
- package/dist/scripts/validation/phase-1-consensus-validation.js +0 -551
- package/dist/scripts/validation/phase-2-consensus-report.cjs +0 -186
- package/dist/scripts/validation/phase-2-validation.cjs +0 -171
- package/dist/scripts/validation/phase-2-validation.js +0 -171
- package/dist/scripts/validation/phase-4-consensus-report.js +0 -181
- package/dist/scripts/validation/phase-4-final-validation.js +0 -351
- package/dist/scripts/validation/phase-5-consensus-report.cjs +0 -113
- package/dist/scripts/validation/phase-5-consensus-report.js +0 -113
- package/dist/scripts/validation/security-analysis.js +0 -49
- package/dist/scripts/validation/security-validation.js +0 -492
- package/dist/scripts/validation/simple-security-validation.js +0 -464
- package/dist/scripts/verify-installation.js +0 -112
- package/dist/scripts/verify-mcp-server.js +0 -86
- package/dist/scripts/verify-sdk-phase1.cjs +0 -293
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/browser/accessibilityService.js +0 -88
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/common/accessibility.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/action.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/actionCommonCategories.js +0 -13
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionList.js +0 -276
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionWidget.js +0 -248
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/common/actionWidget.js +0 -5
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actions/common/actions.js +0 -409
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/audioCues/browser/audioCueService.js +0 -176
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/browser/clipboardService.js +0 -141
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/common/clipboardService.js +0 -6
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/commands/common/commands.js +0 -80
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configuration.js +0 -86
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationModels.js +0 -554
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationRegistry.js +0 -317
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurations.js +0 -41
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/browser/contextKeyService.js +0 -432
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkey.js +0 -1547
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkeys.js +0 -18
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuHandler.js +0 -124
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuService.js +0 -101
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextView.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextViewService.js +0 -72
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dialogs/common/dialogs.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dnd/browser/dnd.js +0 -36
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/editor/common/editor.js +0 -17
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/environment/common/environment.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/extensions/common/extensions.js +0 -47
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/files/common/files.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +0 -105
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/descriptors.js +0 -11
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/extensions.js +0 -15
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/abstractKeybindingService.js +0 -277
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -53
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -354
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/browser/defaultStyles.js +0 -162
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/common/colorRegistry.js +0 -482
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/abap/abap.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/apex/apex.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/azcli/azcli.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bat/bat.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bicep/bicep.js +0 -11
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Comprehensive Test Runner for Claude Flow v2.0.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { spawn } from 'child_process';
|
|
8
|
-
import chalk from 'chalk';
|
|
9
|
-
import path from 'path';
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
11
|
-
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
const __dirname = path.dirname(__filename);
|
|
14
|
-
const projectRoot = path.join(__dirname, '..');
|
|
15
|
-
|
|
16
|
-
// Test configurations
|
|
17
|
-
const testSuites = [
|
|
18
|
-
{
|
|
19
|
-
name: 'Unit Tests',
|
|
20
|
-
command: 'npm',
|
|
21
|
-
args: ['run', 'test:unit'],
|
|
22
|
-
description: 'Run all unit tests for individual components',
|
|
23
|
-
timeout: 120000 // 2 minutes
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'Integration Tests',
|
|
27
|
-
command: 'npm',
|
|
28
|
-
args: ['run', 'test:integration'],
|
|
29
|
-
description: 'Run integration tests for system components',
|
|
30
|
-
timeout: 300000 // 5 minutes
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'End-to-End Tests',
|
|
34
|
-
command: 'npm',
|
|
35
|
-
args: ['run', 'test:e2e'],
|
|
36
|
-
description: 'Run end-to-end swarm coordination tests',
|
|
37
|
-
timeout: 600000 // 10 minutes
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: 'Performance Tests',
|
|
41
|
-
command: 'npm',
|
|
42
|
-
args: ['run', 'test:performance'],
|
|
43
|
-
description: 'Run performance benchmark tests',
|
|
44
|
-
timeout: 900000 // 15 minutes
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'CLI Tests',
|
|
48
|
-
command: 'npm',
|
|
49
|
-
args: ['run', 'test:cli'],
|
|
50
|
-
description: 'Run CLI command tests',
|
|
51
|
-
timeout: 180000 // 3 minutes
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
// Load tests (optional)
|
|
56
|
-
const loadTests = [
|
|
57
|
-
{
|
|
58
|
-
name: 'Swarm Load Test',
|
|
59
|
-
command: 'node',
|
|
60
|
-
args: ['scripts/load-test-swarm.js'],
|
|
61
|
-
description: 'Test swarm coordination under heavy load',
|
|
62
|
-
timeout: 1200000 // 20 minutes
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'Memory Load Test',
|
|
66
|
-
command: 'node',
|
|
67
|
-
args: ['scripts/load-test-memory.js'],
|
|
68
|
-
description: 'Test memory management under high throughput',
|
|
69
|
-
timeout: 600000 // 10 minutes
|
|
70
|
-
}
|
|
71
|
-
];
|
|
72
|
-
|
|
73
|
-
// Docker tests (optional)
|
|
74
|
-
const dockerTests = [
|
|
75
|
-
{
|
|
76
|
-
name: 'Docker Build Test',
|
|
77
|
-
command: 'docker',
|
|
78
|
-
args: ['build', '-t', 'claude-flow:test', '.'],
|
|
79
|
-
description: 'Test Docker image build',
|
|
80
|
-
timeout: 600000 // 10 minutes
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: 'Docker Container Test',
|
|
84
|
-
command: 'docker',
|
|
85
|
-
args: ['run', '--rm', 'claude-flow:test', 'claude-flow', '--version'],
|
|
86
|
-
description: 'Test Docker container execution',
|
|
87
|
-
timeout: 120000 // 2 minutes
|
|
88
|
-
}
|
|
89
|
-
];
|
|
90
|
-
|
|
91
|
-
// NPX tests (optional)
|
|
92
|
-
const npxTests = [
|
|
93
|
-
{
|
|
94
|
-
name: 'NPX Installation Test',
|
|
95
|
-
command: 'npm',
|
|
96
|
-
args: ['pack'],
|
|
97
|
-
description: 'Test NPX package creation',
|
|
98
|
-
timeout: 180000 // 3 minutes
|
|
99
|
-
}
|
|
100
|
-
];
|
|
101
|
-
|
|
102
|
-
class TestRunner {
|
|
103
|
-
constructor(options = {}) {
|
|
104
|
-
this.verbose = options.verbose || false;
|
|
105
|
-
this.includeLoad = options.load || false;
|
|
106
|
-
this.includeDocker = options.docker || false;
|
|
107
|
-
this.includeNpx = options.npx || false;
|
|
108
|
-
this.parallel = options.parallel || false;
|
|
109
|
-
this.results = new Map();
|
|
110
|
-
this.startTime = Date.now();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
log(message, level = 'info') {
|
|
114
|
-
const timestamp = new Date().toISOString();
|
|
115
|
-
const prefix = `[${timestamp}]`;
|
|
116
|
-
|
|
117
|
-
switch (level) {
|
|
118
|
-
case 'success':
|
|
119
|
-
console.log(chalk.green(`${prefix} ✅ ${message}`));
|
|
120
|
-
break;
|
|
121
|
-
case 'error':
|
|
122
|
-
console.log(chalk.red(`${prefix} ❌ ${message}`));
|
|
123
|
-
break;
|
|
124
|
-
case 'warning':
|
|
125
|
-
console.log(chalk.yellow(`${prefix} ⚠️ ${message}`));
|
|
126
|
-
break;
|
|
127
|
-
case 'info':
|
|
128
|
-
default:
|
|
129
|
-
console.log(chalk.blue(`${prefix} ℹ️ ${message}`));
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
async runTest(test) {
|
|
135
|
-
this.log(`Starting: ${test.name} - ${test.description}`);
|
|
136
|
-
|
|
137
|
-
const startTime = Date.now();
|
|
138
|
-
|
|
139
|
-
return new Promise((resolve) => {
|
|
140
|
-
const child = spawn(test.command, test.args, {
|
|
141
|
-
cwd: projectRoot,
|
|
142
|
-
stdio: this.verbose ? 'inherit' : 'pipe',
|
|
143
|
-
shell: process.platform === 'win32'
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
let stdout = '';
|
|
147
|
-
let stderr = '';
|
|
148
|
-
|
|
149
|
-
if (!this.verbose) {
|
|
150
|
-
child.stdout?.on('data', (data) => {
|
|
151
|
-
stdout += data.toString();
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
child.stderr?.on('data', (data) => {
|
|
155
|
-
stderr += data.toString();
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Set timeout
|
|
160
|
-
const timeoutId = setTimeout(() => {
|
|
161
|
-
child.kill('SIGTERM');
|
|
162
|
-
const result = {
|
|
163
|
-
name: test.name,
|
|
164
|
-
success: false,
|
|
165
|
-
error: 'Test timed out',
|
|
166
|
-
duration: Date.now() - startTime,
|
|
167
|
-
stdout: stdout,
|
|
168
|
-
stderr: stderr
|
|
169
|
-
};
|
|
170
|
-
this.results.set(test.name, result);
|
|
171
|
-
resolve(result);
|
|
172
|
-
}, test.timeout);
|
|
173
|
-
|
|
174
|
-
child.on('close', (code) => {
|
|
175
|
-
clearTimeout(timeoutId);
|
|
176
|
-
const duration = Date.now() - startTime;
|
|
177
|
-
|
|
178
|
-
const result = {
|
|
179
|
-
name: test.name,
|
|
180
|
-
success: code === 0,
|
|
181
|
-
exitCode: code,
|
|
182
|
-
duration: duration,
|
|
183
|
-
stdout: stdout,
|
|
184
|
-
stderr: stderr
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
if (code === 0) {
|
|
188
|
-
this.log(`Completed: ${test.name} (${duration}ms)`, 'success');
|
|
189
|
-
} else {
|
|
190
|
-
this.log(`Failed: ${test.name} (exit code: ${code})`, 'error');
|
|
191
|
-
if (!this.verbose && stderr) {
|
|
192
|
-
console.log(chalk.red('Error output:'));
|
|
193
|
-
console.log(stderr);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
this.results.set(test.name, result);
|
|
198
|
-
resolve(result);
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
child.on('error', (error) => {
|
|
202
|
-
clearTimeout(timeoutId);
|
|
203
|
-
const result = {
|
|
204
|
-
name: test.name,
|
|
205
|
-
success: false,
|
|
206
|
-
error: error.message,
|
|
207
|
-
duration: Date.now() - startTime,
|
|
208
|
-
stdout: stdout,
|
|
209
|
-
stderr: stderr
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
this.log(`Error: ${test.name} - ${error.message}`, 'error');
|
|
213
|
-
this.results.set(test.name, result);
|
|
214
|
-
resolve(result);
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
async runTestSuite(tests, suiteName) {
|
|
220
|
-
this.log(`\n🏃♂️ Running ${suiteName} (${tests.length} tests)`);
|
|
221
|
-
|
|
222
|
-
if (this.parallel) {
|
|
223
|
-
const results = await Promise.all(tests.map(test => this.runTest(test)));
|
|
224
|
-
return results;
|
|
225
|
-
} else {
|
|
226
|
-
const results = [];
|
|
227
|
-
for (const test of tests) {
|
|
228
|
-
const result = await this.runTest(test);
|
|
229
|
-
results.push(result);
|
|
230
|
-
|
|
231
|
-
// Short delay between tests
|
|
232
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
233
|
-
}
|
|
234
|
-
return results;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
generateReport() {
|
|
239
|
-
const totalTime = Date.now() - this.startTime;
|
|
240
|
-
const results = Array.from(this.results.values());
|
|
241
|
-
const passed = results.filter(r => r.success).length;
|
|
242
|
-
const failed = results.filter(r => !r.success).length;
|
|
243
|
-
const total = results.length;
|
|
244
|
-
|
|
245
|
-
console.log('\n' + '='.repeat(80));
|
|
246
|
-
console.log(chalk.bold.blue('📊 CLAUDE FLOW v2.0.0 TEST REPORT'));
|
|
247
|
-
console.log('='.repeat(80));
|
|
248
|
-
|
|
249
|
-
console.log(`\n📈 Summary:`);
|
|
250
|
-
console.log(` Total Tests: ${total}`);
|
|
251
|
-
console.log(` Passed: ${chalk.green(passed)}`);
|
|
252
|
-
console.log(` Failed: ${chalk.red(failed)}`);
|
|
253
|
-
console.log(` Success Rate: ${chalk.cyan(((passed / total) * 100).toFixed(1))}%`);
|
|
254
|
-
console.log(` Total Time: ${chalk.yellow((totalTime / 1000).toFixed(2))}s`);
|
|
255
|
-
|
|
256
|
-
if (failed > 0) {
|
|
257
|
-
console.log(`\n❌ Failed Tests:`);
|
|
258
|
-
results.filter(r => !r.success).forEach(result => {
|
|
259
|
-
console.log(` • ${chalk.red(result.name)}: ${result.error || `Exit code ${result.exitCode}`}`);
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
console.log(`\n✅ Passed Tests:`);
|
|
264
|
-
results.filter(r => r.success).forEach(result => {
|
|
265
|
-
console.log(` • ${chalk.green(result.name)}: ${(result.duration / 1000).toFixed(2)}s`);
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
// Performance summary
|
|
269
|
-
const performanceResults = results.filter(r => r.name.includes('Performance'));
|
|
270
|
-
if (performanceResults.length > 0) {
|
|
271
|
-
console.log(`\n⚡ Performance Summary:`);
|
|
272
|
-
performanceResults.forEach(result => {
|
|
273
|
-
if (result.success) {
|
|
274
|
-
console.log(` • ${result.name}: ${chalk.green('PASSED')} (${(result.duration / 1000).toFixed(2)}s)`);
|
|
275
|
-
} else {
|
|
276
|
-
console.log(` • ${result.name}: ${chalk.red('FAILED')}`);
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
console.log('\n' + '='.repeat(80));
|
|
282
|
-
|
|
283
|
-
return {
|
|
284
|
-
total,
|
|
285
|
-
passed,
|
|
286
|
-
failed,
|
|
287
|
-
successRate: (passed / total) * 100,
|
|
288
|
-
totalTime,
|
|
289
|
-
results
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
async run() {
|
|
294
|
-
this.log('🚀 Starting Claude Flow v2.0.0 Comprehensive Test Suite');
|
|
295
|
-
|
|
296
|
-
try {
|
|
297
|
-
// Core test suites
|
|
298
|
-
await this.runTestSuite(testSuites, 'Core Test Suites');
|
|
299
|
-
|
|
300
|
-
// Optional test suites
|
|
301
|
-
if (this.includeLoad) {
|
|
302
|
-
await this.runTestSuite(loadTests, 'Load Tests');
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if (this.includeDocker) {
|
|
306
|
-
await this.runTestSuite(dockerTests, 'Docker Tests');
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
if (this.includeNpx) {
|
|
310
|
-
await this.runTestSuite(npxTests, 'NPX Tests');
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
} catch (error) {
|
|
314
|
-
this.log(`Test runner error: ${error.message}`, 'error');
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
const report = this.generateReport();
|
|
318
|
-
|
|
319
|
-
// Exit with appropriate code
|
|
320
|
-
process.exit(report.failed > 0 ? 1 : 0);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// CLI handling
|
|
325
|
-
function parseArgs() {
|
|
326
|
-
const args = process.argv.slice(2);
|
|
327
|
-
const options = {
|
|
328
|
-
verbose: args.includes('--verbose') || args.includes('-v'),
|
|
329
|
-
load: args.includes('--load') || args.includes('-l'),
|
|
330
|
-
docker: args.includes('--docker') || args.includes('-d'),
|
|
331
|
-
npx: args.includes('--npx') || args.includes('-n'),
|
|
332
|
-
parallel: args.includes('--parallel') || args.includes('-p'),
|
|
333
|
-
help: args.includes('--help') || args.includes('-h')
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
return options;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
function showHelp() {
|
|
340
|
-
console.log(`
|
|
341
|
-
${chalk.bold.blue('Claude Flow v2.0.0 Comprehensive Test Runner')}
|
|
342
|
-
|
|
343
|
-
${chalk.bold('Usage:')}
|
|
344
|
-
node scripts/test-comprehensive.js [options]
|
|
345
|
-
|
|
346
|
-
${chalk.bold('Options:')}
|
|
347
|
-
-v, --verbose Show detailed test output
|
|
348
|
-
-l, --load Include load tests
|
|
349
|
-
-d, --docker Include Docker tests
|
|
350
|
-
-n, --npx Include NPX tests
|
|
351
|
-
-p, --parallel Run tests in parallel (faster but less stable)
|
|
352
|
-
-h, --help Show this help message
|
|
353
|
-
|
|
354
|
-
${chalk.bold('Examples:')}
|
|
355
|
-
node scripts/test-comprehensive.js # Run core tests
|
|
356
|
-
node scripts/test-comprehensive.js --verbose # Run with detailed output
|
|
357
|
-
node scripts/test-comprehensive.js --load --docker # Include load and Docker tests
|
|
358
|
-
node scripts/test-comprehensive.js --parallel # Run tests in parallel
|
|
359
|
-
|
|
360
|
-
${chalk.bold('Test Suites:')}
|
|
361
|
-
• Unit Tests - Individual component tests
|
|
362
|
-
• Integration Tests - System integration tests
|
|
363
|
-
• End-to-End Tests - Complete workflow tests
|
|
364
|
-
• Performance Tests - Benchmark and load tests
|
|
365
|
-
• CLI Tests - Command-line interface tests
|
|
366
|
-
• Load Tests - Heavy load and stress tests (optional)
|
|
367
|
-
• Docker Tests - Container and deployment tests (optional)
|
|
368
|
-
• NPX Tests - Package distribution tests (optional)
|
|
369
|
-
`);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
// Main execution
|
|
373
|
-
async function main() {
|
|
374
|
-
const options = parseArgs();
|
|
375
|
-
|
|
376
|
-
if (options.help) {
|
|
377
|
-
showHelp();
|
|
378
|
-
process.exit(0);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
const runner = new TestRunner(options);
|
|
382
|
-
await runner.run();
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// Handle uncaught errors
|
|
386
|
-
process.on('uncaughtException', (error) => {
|
|
387
|
-
console.error(chalk.red('Uncaught Exception:'), error);
|
|
388
|
-
process.exit(1);
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
process.on('unhandledRejection', (reason, promise) => {
|
|
392
|
-
console.error(chalk.red('Unhandled Rejection at:'), promise, chalk.red('reason:'), reason);
|
|
393
|
-
process.exit(1);
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
// Run if called directly
|
|
397
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
398
|
-
main();
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
export default TestRunner;
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S deno run --allow-all
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Test script for advanced coordination features
|
|
5
|
-
* Demonstrates:
|
|
6
|
-
* - Resource management and deadlock detection
|
|
7
|
-
* - Task dependencies and scheduling
|
|
8
|
-
* - Work stealing and load balancing
|
|
9
|
-
* - Circuit breakers and fault tolerance
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { EventBus } from '../src/core/event-bus.ts';
|
|
13
|
-
import { Logger } from '../src/core/logger.js';
|
|
14
|
-
import { CoordinationManager } from '../src/coordination/manager.ts';
|
|
15
|
-
import { Task, SystemEvents } from '../src/utils/types.ts';
|
|
16
|
-
import { delay } from '../src/utils/helpers.ts';
|
|
17
|
-
|
|
18
|
-
async function testCoordinationFeatures() {
|
|
19
|
-
console.log('🔄 Testing Claude-Flow Coordination Features\n');
|
|
20
|
-
|
|
21
|
-
const eventBus = new EventBus();
|
|
22
|
-
const logger = new Logger({ level: 'info', format: 'json', destination: 'console' });
|
|
23
|
-
|
|
24
|
-
const config = {
|
|
25
|
-
maxRetries: 3,
|
|
26
|
-
retryDelay: 1000,
|
|
27
|
-
resourceTimeout: 5000,
|
|
28
|
-
deadlockDetection: true,
|
|
29
|
-
priorityLevels: 5,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const coordinator = new CoordinationManager(config, eventBus, logger);
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
await coordinator.initialize();
|
|
36
|
-
console.log('✅ Coordination manager initialized\n');
|
|
37
|
-
|
|
38
|
-
// Test 1: Resource Management
|
|
39
|
-
console.log('📋 Test 1: Resource Management');
|
|
40
|
-
console.log('Testing resource acquisition and release...');
|
|
41
|
-
|
|
42
|
-
// Agent 1 acquires resource A
|
|
43
|
-
await coordinator.acquireResource('resource-A', 'agent-1');
|
|
44
|
-
console.log('✅ Agent 1 acquired resource A');
|
|
45
|
-
|
|
46
|
-
// Agent 2 tries to acquire resource A (should wait)
|
|
47
|
-
const acquire2Promise = coordinator.acquireResource('resource-A', 'agent-2');
|
|
48
|
-
console.log('⏳ Agent 2 waiting for resource A...');
|
|
49
|
-
|
|
50
|
-
// Release after delay
|
|
51
|
-
setTimeout(async () => {
|
|
52
|
-
await coordinator.releaseResource('resource-A', 'agent-1');
|
|
53
|
-
console.log('✅ Agent 1 released resource A');
|
|
54
|
-
}, 1000);
|
|
55
|
-
|
|
56
|
-
await acquire2Promise;
|
|
57
|
-
console.log('✅ Agent 2 acquired resource A\n');
|
|
58
|
-
|
|
59
|
-
// Test 2: Task Dependencies
|
|
60
|
-
console.log('📋 Test 2: Task Dependencies');
|
|
61
|
-
|
|
62
|
-
const parentTask: Task = {
|
|
63
|
-
id: 'parent-task',
|
|
64
|
-
type: 'process',
|
|
65
|
-
description: 'Parent task',
|
|
66
|
-
priority: 90,
|
|
67
|
-
dependencies: [],
|
|
68
|
-
status: 'pending',
|
|
69
|
-
input: {},
|
|
70
|
-
createdAt: new Date(),
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const childTask: Task = {
|
|
74
|
-
id: 'child-task',
|
|
75
|
-
type: 'process',
|
|
76
|
-
description: 'Child task (depends on parent)',
|
|
77
|
-
priority: 80,
|
|
78
|
-
dependencies: ['parent-task'],
|
|
79
|
-
status: 'pending',
|
|
80
|
-
input: {},
|
|
81
|
-
createdAt: new Date(),
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
await coordinator.assignTask(parentTask, 'agent-1');
|
|
85
|
-
console.log('✅ Assigned parent task to agent-1');
|
|
86
|
-
|
|
87
|
-
try {
|
|
88
|
-
await coordinator.assignTask(childTask, 'agent-2');
|
|
89
|
-
} catch (error) {
|
|
90
|
-
console.log('✅ Child task correctly blocked by dependency');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Complete parent task
|
|
94
|
-
eventBus.emit(SystemEvents.TASK_COMPLETED, {
|
|
95
|
-
taskId: 'parent-task',
|
|
96
|
-
result: { data: 'parent result' },
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
await delay(100);
|
|
100
|
-
|
|
101
|
-
// Now child should be assignable
|
|
102
|
-
await coordinator.assignTask(childTask, 'agent-2');
|
|
103
|
-
console.log('✅ Child task assigned after parent completion\n');
|
|
104
|
-
|
|
105
|
-
// Test 3: Deadlock Detection
|
|
106
|
-
console.log('📋 Test 3: Deadlock Detection');
|
|
107
|
-
console.log('Creating potential deadlock scenario...');
|
|
108
|
-
|
|
109
|
-
// Agent 3 holds B, wants A
|
|
110
|
-
await coordinator.acquireResource('resource-B', 'agent-3');
|
|
111
|
-
const agent3WantsA = coordinator.acquireResource('resource-A', 'agent-3')
|
|
112
|
-
.catch(() => console.log('✅ Deadlock detected and resolved'));
|
|
113
|
-
|
|
114
|
-
// Agent 2 holds A, wants B (creates cycle)
|
|
115
|
-
const agent2WantsB = coordinator.acquireResource('resource-B', 'agent-2')
|
|
116
|
-
.catch(() => console.log('✅ Agent 2 resource request failed'));
|
|
117
|
-
|
|
118
|
-
// Wait for deadlock detection
|
|
119
|
-
await delay(2000);
|
|
120
|
-
|
|
121
|
-
// Clean up resources
|
|
122
|
-
await coordinator.releaseResource('resource-A', 'agent-2');
|
|
123
|
-
await coordinator.releaseResource('resource-B', 'agent-3');
|
|
124
|
-
console.log('✅ Resources cleaned up\n');
|
|
125
|
-
|
|
126
|
-
// Test 4: Advanced Scheduling
|
|
127
|
-
console.log('📋 Test 4: Advanced Scheduling Features');
|
|
128
|
-
coordinator.enableAdvancedScheduling();
|
|
129
|
-
console.log('✅ Advanced scheduling enabled');
|
|
130
|
-
|
|
131
|
-
// Create tasks with different priorities
|
|
132
|
-
const highPriorityTask: Task = {
|
|
133
|
-
id: 'high-priority',
|
|
134
|
-
type: 'urgent',
|
|
135
|
-
description: 'High priority task',
|
|
136
|
-
priority: 100,
|
|
137
|
-
dependencies: [],
|
|
138
|
-
status: 'pending',
|
|
139
|
-
input: {},
|
|
140
|
-
createdAt: new Date(),
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
const lowPriorityTask: Task = {
|
|
144
|
-
id: 'low-priority',
|
|
145
|
-
type: 'batch',
|
|
146
|
-
description: 'Low priority task',
|
|
147
|
-
priority: 10,
|
|
148
|
-
dependencies: [],
|
|
149
|
-
status: 'pending',
|
|
150
|
-
input: {},
|
|
151
|
-
createdAt: new Date(),
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
await coordinator.assignTask(lowPriorityTask, 'agent-1');
|
|
155
|
-
await coordinator.assignTask(highPriorityTask, 'agent-1');
|
|
156
|
-
console.log('✅ Tasks assigned with priority scheduling\n');
|
|
157
|
-
|
|
158
|
-
// Test 5: Conflict Resolution
|
|
159
|
-
console.log('📋 Test 5: Conflict Resolution');
|
|
160
|
-
|
|
161
|
-
// Report a resource conflict
|
|
162
|
-
await coordinator.reportConflict('resource', 'shared-resource', ['agent-1', 'agent-2']);
|
|
163
|
-
console.log('✅ Resource conflict reported and auto-resolved');
|
|
164
|
-
|
|
165
|
-
// Report a task conflict
|
|
166
|
-
await coordinator.reportConflict('task', 'disputed-task', ['agent-1', 'agent-2']);
|
|
167
|
-
console.log('✅ Task conflict reported and auto-resolved\n');
|
|
168
|
-
|
|
169
|
-
// Test 6: Health and Metrics
|
|
170
|
-
console.log('📋 Test 6: Health Monitoring and Metrics');
|
|
171
|
-
|
|
172
|
-
const health = await coordinator.getHealthStatus();
|
|
173
|
-
console.log('🏥 Health Status:', health.healthy ? 'Healthy' : 'Unhealthy');
|
|
174
|
-
|
|
175
|
-
const metrics = await coordinator.getCoordinationMetrics();
|
|
176
|
-
console.log('📊 Coordination Metrics:');
|
|
177
|
-
console.log(` Tasks assigned: ${metrics.assigned || 0}`);
|
|
178
|
-
console.log(` Resources managed: ${metrics.resources || 0}`);
|
|
179
|
-
console.log(` Conflicts resolved: ${metrics.conflicts?.resolved || 0}`);
|
|
180
|
-
console.log(` Advanced scheduling: ${metrics.advancedScheduling ? 'Enabled' : 'Disabled'}`);
|
|
181
|
-
|
|
182
|
-
// Test 7: Message Routing
|
|
183
|
-
console.log('\n📋 Test 7: Inter-Agent Messaging');
|
|
184
|
-
|
|
185
|
-
// Set up message handler
|
|
186
|
-
let messagesReceived = 0;
|
|
187
|
-
eventBus.on('message:agent-2', (data: any) => {
|
|
188
|
-
messagesReceived++;
|
|
189
|
-
console.log(`✅ Agent 2 received message: ${data.message.content}`);
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
// Send messages
|
|
193
|
-
await coordinator.sendMessage('agent-1', 'agent-2', {
|
|
194
|
-
type: 'status',
|
|
195
|
-
content: 'Task completed'
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
await coordinator.sendMessage('agent-1', 'agent-2', {
|
|
199
|
-
type: 'data',
|
|
200
|
-
content: 'Results available'
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
await delay(100);
|
|
204
|
-
console.log(`✅ Sent and received ${messagesReceived} messages\n`);
|
|
205
|
-
|
|
206
|
-
// Perform maintenance
|
|
207
|
-
console.log('📋 Performing maintenance...');
|
|
208
|
-
await coordinator.performMaintenance();
|
|
209
|
-
console.log('✅ Maintenance completed');
|
|
210
|
-
|
|
211
|
-
// Shutdown
|
|
212
|
-
await coordinator.shutdown();
|
|
213
|
-
console.log('\n✅ Coordination manager shut down successfully');
|
|
214
|
-
|
|
215
|
-
// Summary
|
|
216
|
-
console.log('\n' + '='.repeat(50));
|
|
217
|
-
console.log('✅ ALL COORDINATION TESTS PASSED!');
|
|
218
|
-
console.log('='.repeat(50));
|
|
219
|
-
console.log('\nFeatures tested:');
|
|
220
|
-
console.log(' ✓ Resource management with mutual exclusion');
|
|
221
|
-
console.log(' ✓ Task dependencies and scheduling');
|
|
222
|
-
console.log(' ✓ Deadlock detection and prevention');
|
|
223
|
-
console.log(' ✓ Advanced scheduling with priorities');
|
|
224
|
-
console.log(' ✓ Conflict detection and resolution');
|
|
225
|
-
console.log(' ✓ Health monitoring and metrics');
|
|
226
|
-
console.log(' ✓ Inter-agent messaging');
|
|
227
|
-
console.log(' ✓ System maintenance');
|
|
228
|
-
|
|
229
|
-
} catch (error) {
|
|
230
|
-
console.error('❌ Test failed:', error);
|
|
231
|
-
throw error;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Run the test
|
|
236
|
-
if (import.meta.main) {
|
|
237
|
-
testCoordinationFeatures().catch(console.error);
|
|
238
|
-
}
|