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,765 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Claude Flow Novice - Health Check Script
|
|
5
|
-
*
|
|
6
|
-
* Comprehensive system health verification
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { execSync, spawn } from 'child_process';
|
|
10
|
-
import { existsSync, readFileSync, accessSync, constants } from 'fs';
|
|
11
|
-
import { join, dirname } from 'path';
|
|
12
|
-
import { homedir, platform, totalmem, freemem, cpus } from 'os';
|
|
13
|
-
import chalk from 'chalk';
|
|
14
|
-
import ora from 'ora';
|
|
15
|
-
import boxen from 'boxen';
|
|
16
|
-
|
|
17
|
-
class HealthChecker {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.platform = platform();
|
|
20
|
-
this.homeDir = homedir();
|
|
21
|
-
this.configDir = join(this.homeDir, '.claude-flow-novice', 'config');
|
|
22
|
-
this.results = {
|
|
23
|
-
overall: 'unknown',
|
|
24
|
-
categories: {
|
|
25
|
-
system: { status: 'unknown', checks: [] },
|
|
26
|
-
dependencies: { status: 'unknown', checks: [] },
|
|
27
|
-
configuration: { status: 'unknown', checks: [] },
|
|
28
|
-
services: { status: 'unknown', checks: [] },
|
|
29
|
-
network: { status: 'unknown', checks: [] }
|
|
30
|
-
},
|
|
31
|
-
warnings: [],
|
|
32
|
-
errors: [],
|
|
33
|
-
recommendations: []
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async check() {
|
|
38
|
-
console.log(chalk.blue.bold('š„ Claude Flow Novice Health Check\n'));
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
await this.checkSystemHealth();
|
|
42
|
-
await this.checkDependencies();
|
|
43
|
-
await this.checkConfiguration();
|
|
44
|
-
await this.checkServices();
|
|
45
|
-
await this.checkNetwork();
|
|
46
|
-
|
|
47
|
-
this.calculateOverallStatus();
|
|
48
|
-
this.displayResults();
|
|
49
|
-
|
|
50
|
-
return this.results;
|
|
51
|
-
} catch (error) {
|
|
52
|
-
console.error(chalk.red('ā Health check failed:'), error.message);
|
|
53
|
-
this.results.errors.push(error.message);
|
|
54
|
-
this.results.overall = 'error';
|
|
55
|
-
return this.results;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async checkSystemHealth() {
|
|
60
|
-
const spinner = ora('Checking system health...').start();
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
const checks = [];
|
|
64
|
-
|
|
65
|
-
// CPU Check
|
|
66
|
-
const cpuInfo = cpus();
|
|
67
|
-
const cpuCores = cpuInfo.length;
|
|
68
|
-
const cpuModel = cpuInfo[0].model;
|
|
69
|
-
checks.push({
|
|
70
|
-
name: 'CPU',
|
|
71
|
-
status: 'pass',
|
|
72
|
-
message: `${cpuCores} cores - ${cpuModel}`,
|
|
73
|
-
details: { cores: cpuCores, model: cpuModel }
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// Memory Check
|
|
77
|
-
const totalMem = totalmem();
|
|
78
|
-
const freeMem = freemem();
|
|
79
|
-
const usedMem = totalMem - freeMem;
|
|
80
|
-
const memUsagePercent = (usedMem / totalMem) * 100;
|
|
81
|
-
|
|
82
|
-
let memStatus = 'pass';
|
|
83
|
-
if (memUsagePercent > 90) memStatus = 'fail';
|
|
84
|
-
else if (memUsagePercent > 75) memStatus = 'warn';
|
|
85
|
-
|
|
86
|
-
checks.push({
|
|
87
|
-
name: 'Memory',
|
|
88
|
-
status: memStatus,
|
|
89
|
-
message: `${Math.round(memUsagePercent)}% used (${Math.round(freeMem / 1024 / 1024)}MB free)`,
|
|
90
|
-
details: {
|
|
91
|
-
total: Math.round(totalMem / 1024 / 1024),
|
|
92
|
-
free: Math.round(freeMem / 1024 / 1024),
|
|
93
|
-
usage: Math.round(memUsagePercent)
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// Disk Space Check
|
|
98
|
-
const diskInfo = await this.getDiskInfo();
|
|
99
|
-
const diskUsagePercent = ((diskInfo.used / diskInfo.total) * 100);
|
|
100
|
-
|
|
101
|
-
let diskStatus = 'pass';
|
|
102
|
-
if (diskUsagePercent > 95) diskStatus = 'fail';
|
|
103
|
-
else if (diskUsagePercent > 85) diskStatus = 'warn';
|
|
104
|
-
|
|
105
|
-
checks.push({
|
|
106
|
-
name: 'Disk Space',
|
|
107
|
-
status: diskStatus,
|
|
108
|
-
message: `${Math.round(diskUsagePercent)}% used (${Math.round(diskInfo.free / 1024 / 1024)}MB free)`,
|
|
109
|
-
details: diskInfo
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// Node.js Version Check
|
|
113
|
-
const nodeVersion = process.version;
|
|
114
|
-
const nodeMajor = parseInt(nodeVersion.slice(1).split('.')[0]);
|
|
115
|
-
let nodeStatus = nodeMajor >= 20 ? 'pass' : 'fail';
|
|
116
|
-
checks.push({
|
|
117
|
-
name: 'Node.js Version',
|
|
118
|
-
status: nodeStatus,
|
|
119
|
-
message: nodeVersion,
|
|
120
|
-
details: { version: nodeVersion, major: nodeMajor }
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
this.results.categories.system.checks = checks;
|
|
124
|
-
this.results.categories.system.status = this.calculateCategoryStatus(checks);
|
|
125
|
-
|
|
126
|
-
spinner.succeed('System health check completed');
|
|
127
|
-
} catch (error) {
|
|
128
|
-
spinner.fail('System health check failed');
|
|
129
|
-
this.results.categories.system.status = 'error';
|
|
130
|
-
this.results.categories.system.checks.push({
|
|
131
|
-
name: 'System Check',
|
|
132
|
-
status: 'error',
|
|
133
|
-
message: error.message
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
async getDiskInfo() {
|
|
139
|
-
try {
|
|
140
|
-
let output;
|
|
141
|
-
if (this.platform === 'win32') {
|
|
142
|
-
output = execSync('wmic logicaldisk get size,freespace,caption', { encoding: 'utf8' });
|
|
143
|
-
const lines = output.split('\n').filter(line => line.trim());
|
|
144
|
-
const data = lines[1].split(/\s+/);
|
|
145
|
-
return {
|
|
146
|
-
total: parseInt(data[1]) || 0,
|
|
147
|
-
free: parseInt(data[2]) || 0,
|
|
148
|
-
used: (parseInt(data[1]) || 0) - (parseInt(data[2]) || 0)
|
|
149
|
-
};
|
|
150
|
-
} else {
|
|
151
|
-
output = execSync('df -h ~', { encoding: 'utf8' });
|
|
152
|
-
const lines = output.split('\n');
|
|
153
|
-
const data = lines[1].split(/\s+/);
|
|
154
|
-
return {
|
|
155
|
-
total: this.parseDiskSpace(data[1]),
|
|
156
|
-
used: this.parseDiskSpace(data[2]),
|
|
157
|
-
free: this.parseDiskSpace(data[3])
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
} catch (error) {
|
|
161
|
-
return { total: 0, used: 0, free: 0 };
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
parseDiskSpace(spaceStr) {
|
|
166
|
-
const units = { K: 1024, M: 1024 * 1024, G: 1024 * 1024 * 1024, T: 1024 * 1024 * 1024 * 1024 };
|
|
167
|
-
const match = spaceStr.match(/^(\d+\.?\d*)(K|M|G|T)?$/);
|
|
168
|
-
if (!match) return 0;
|
|
169
|
-
|
|
170
|
-
const [, value, unit] = match;
|
|
171
|
-
const multiplier = units[unit] || 1;
|
|
172
|
-
return parseFloat(value) * multiplier;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
async checkDependencies() {
|
|
176
|
-
const spinner = ora('Checking dependencies...').start();
|
|
177
|
-
|
|
178
|
-
try {
|
|
179
|
-
const checks = [];
|
|
180
|
-
const dependencies = [
|
|
181
|
-
{ name: 'npm', command: 'npm --version', minVersion: '9.0.0' },
|
|
182
|
-
{ name: 'redis-cli', command: 'redis-cli --version', optional: true },
|
|
183
|
-
{ name: 'git', command: 'git --version', optional: true },
|
|
184
|
-
{ name: 'docker', command: 'docker --version', optional: true }
|
|
185
|
-
];
|
|
186
|
-
|
|
187
|
-
for (const dep of dependencies) {
|
|
188
|
-
try {
|
|
189
|
-
const output = execSync(dep.command, { encoding: 'utf8' }).trim();
|
|
190
|
-
const version = output.split(' ').pop();
|
|
191
|
-
|
|
192
|
-
let status = 'pass';
|
|
193
|
-
if (dep.minVersion && this.compareVersions(version, dep.minVersion) < 0) {
|
|
194
|
-
status = 'fail';
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
checks.push({
|
|
198
|
-
name: dep.name,
|
|
199
|
-
status,
|
|
200
|
-
message: version,
|
|
201
|
-
details: { version, optional: dep.optional || false }
|
|
202
|
-
});
|
|
203
|
-
} catch (error) {
|
|
204
|
-
if (dep.optional) {
|
|
205
|
-
checks.push({
|
|
206
|
-
name: dep.name,
|
|
207
|
-
status: 'warn',
|
|
208
|
-
message: 'Not installed',
|
|
209
|
-
details: { optional: true }
|
|
210
|
-
});
|
|
211
|
-
} else {
|
|
212
|
-
checks.push({
|
|
213
|
-
name: dep.name,
|
|
214
|
-
status: 'fail',
|
|
215
|
-
message: 'Not installed',
|
|
216
|
-
details: { optional: false }
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Check claude-flow-novice installation
|
|
223
|
-
try {
|
|
224
|
-
const output = execSync('claude-flow-novice --version', { encoding: 'utf8' }).trim();
|
|
225
|
-
checks.push({
|
|
226
|
-
name: 'claude-flow-novice',
|
|
227
|
-
status: 'pass',
|
|
228
|
-
message: output,
|
|
229
|
-
details: { version: output }
|
|
230
|
-
});
|
|
231
|
-
} catch (error) {
|
|
232
|
-
checks.push({
|
|
233
|
-
name: 'claude-flow-novice',
|
|
234
|
-
status: 'fail',
|
|
235
|
-
message: 'Not installed or not in PATH',
|
|
236
|
-
details: {}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
this.results.categories.dependencies.checks = checks;
|
|
241
|
-
this.results.categories.dependencies.status = this.calculateCategoryStatus(checks);
|
|
242
|
-
|
|
243
|
-
spinner.succeed('Dependency check completed');
|
|
244
|
-
} catch (error) {
|
|
245
|
-
spinner.fail('Dependency check failed');
|
|
246
|
-
this.results.categories.dependencies.status = 'error';
|
|
247
|
-
this.results.categories.dependencies.checks.push({
|
|
248
|
-
name: 'Dependency Check',
|
|
249
|
-
status: 'error',
|
|
250
|
-
message: error.message
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
async checkConfiguration() {
|
|
256
|
-
const spinner = ora('Checking configuration...').start();
|
|
257
|
-
|
|
258
|
-
try {
|
|
259
|
-
const checks = [];
|
|
260
|
-
|
|
261
|
-
// Check config directory exists
|
|
262
|
-
const configDirExists = existsSync(this.configDir);
|
|
263
|
-
checks.push({
|
|
264
|
-
name: 'Configuration Directory',
|
|
265
|
-
status: configDirExists ? 'pass' : 'fail',
|
|
266
|
-
message: configDirExists ? 'Exists' : 'Not found',
|
|
267
|
-
details: { path: this.configDir }
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
if (configDirExists) {
|
|
271
|
-
// Check required config files
|
|
272
|
-
const configFiles = [
|
|
273
|
-
'config.json',
|
|
274
|
-
'redis.json',
|
|
275
|
-
'services.json',
|
|
276
|
-
'.env'
|
|
277
|
-
];
|
|
278
|
-
|
|
279
|
-
for (const file of configFiles) {
|
|
280
|
-
const filePath = join(this.configDir, file);
|
|
281
|
-
const exists = existsSync(filePath);
|
|
282
|
-
|
|
283
|
-
checks.push({
|
|
284
|
-
name: `Config File: ${file}`,
|
|
285
|
-
status: exists ? 'pass' : 'warn',
|
|
286
|
-
message: exists ? 'Exists' : 'Not found',
|
|
287
|
-
details: { path: filePath }
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
if (exists && file.endsWith('.json')) {
|
|
291
|
-
try {
|
|
292
|
-
JSON.parse(readFileSync(filePath, 'utf8'));
|
|
293
|
-
} catch (error) {
|
|
294
|
-
checks.push({
|
|
295
|
-
name: `Config Validity: ${file}`,
|
|
296
|
-
status: 'fail',
|
|
297
|
-
message: 'Invalid JSON',
|
|
298
|
-
details: { error: error.message }
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// Check file permissions
|
|
306
|
-
try {
|
|
307
|
-
const testPath = join(this.configDir, '.health-check');
|
|
308
|
-
require('fs').writeFileSync(testPath, 'test');
|
|
309
|
-
require('fs').unlinkSync(testPath);
|
|
310
|
-
|
|
311
|
-
checks.push({
|
|
312
|
-
name: 'File Permissions',
|
|
313
|
-
status: 'pass',
|
|
314
|
-
message: 'Read/Write access confirmed',
|
|
315
|
-
details: {}
|
|
316
|
-
});
|
|
317
|
-
} catch (error) {
|
|
318
|
-
checks.push({
|
|
319
|
-
name: 'File Permissions',
|
|
320
|
-
status: 'fail',
|
|
321
|
-
message: 'No write access',
|
|
322
|
-
details: { error: error.message }
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
this.results.categories.configuration.checks = checks;
|
|
327
|
-
this.results.categories.configuration.status = this.calculateCategoryStatus(checks);
|
|
328
|
-
|
|
329
|
-
spinner.succeed('Configuration check completed');
|
|
330
|
-
} catch (error) {
|
|
331
|
-
spinner.fail('Configuration check failed');
|
|
332
|
-
this.results.categories.configuration.status = 'error';
|
|
333
|
-
this.results.categories.configuration.checks.push({
|
|
334
|
-
name: 'Configuration Check',
|
|
335
|
-
status: 'error',
|
|
336
|
-
message: error.message
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
async checkServices() {
|
|
342
|
-
const spinner = ora('Checking services...').start();
|
|
343
|
-
|
|
344
|
-
try {
|
|
345
|
-
const checks = [];
|
|
346
|
-
|
|
347
|
-
// Check Redis
|
|
348
|
-
try {
|
|
349
|
-
const redisInfo = await this.getRedisServiceInfo();
|
|
350
|
-
checks.push({
|
|
351
|
-
name: 'Redis Service',
|
|
352
|
-
status: 'pass',
|
|
353
|
-
message: `Running (PID: ${redisInfo.pid})`,
|
|
354
|
-
details: redisInfo
|
|
355
|
-
});
|
|
356
|
-
} catch (error) {
|
|
357
|
-
checks.push({
|
|
358
|
-
name: 'Redis Service',
|
|
359
|
-
status: 'fail',
|
|
360
|
-
message: 'Not running or not accessible',
|
|
361
|
-
details: { error: error.message }
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// Check Dashboard
|
|
366
|
-
try {
|
|
367
|
-
const dashboardInfo = await this.getDashboardServiceInfo();
|
|
368
|
-
if (dashboardInfo.running) {
|
|
369
|
-
checks.push({
|
|
370
|
-
name: 'Dashboard Service',
|
|
371
|
-
status: 'pass',
|
|
372
|
-
message: `Running on port ${dashboardInfo.port}`,
|
|
373
|
-
details: dashboardInfo
|
|
374
|
-
});
|
|
375
|
-
} else {
|
|
376
|
-
checks.push({
|
|
377
|
-
name: 'Dashboard Service',
|
|
378
|
-
status: 'warn',
|
|
379
|
-
message: 'Not running',
|
|
380
|
-
details: dashboardInfo
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
} catch (error) {
|
|
384
|
-
checks.push({
|
|
385
|
-
name: 'Dashboard Service',
|
|
386
|
-
status: 'warn',
|
|
387
|
-
message: 'Not configured',
|
|
388
|
-
details: {}
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
// Check Monitoring
|
|
393
|
-
try {
|
|
394
|
-
const monitoringInfo = await this.getMonitoringServiceInfo();
|
|
395
|
-
if (monitoringInfo.running) {
|
|
396
|
-
checks.push({
|
|
397
|
-
name: 'Monitoring Service',
|
|
398
|
-
status: 'pass',
|
|
399
|
-
message: `Running (PID: ${monitoringInfo.pid})`,
|
|
400
|
-
details: monitoringInfo
|
|
401
|
-
});
|
|
402
|
-
} else {
|
|
403
|
-
checks.push({
|
|
404
|
-
name: 'Monitoring Service',
|
|
405
|
-
status: 'warn',
|
|
406
|
-
message: 'Not running',
|
|
407
|
-
details: monitoringInfo
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
} catch (error) {
|
|
411
|
-
checks.push({
|
|
412
|
-
name: 'Monitoring Service',
|
|
413
|
-
status: 'warn',
|
|
414
|
-
message: 'Not configured',
|
|
415
|
-
details: {}
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
this.results.categories.services.checks = checks;
|
|
420
|
-
this.results.categories.services.status = this.calculateCategoryStatus(checks);
|
|
421
|
-
|
|
422
|
-
spinner.succeed('Service check completed');
|
|
423
|
-
} catch (error) {
|
|
424
|
-
spinner.fail('Service check failed');
|
|
425
|
-
this.results.categories.services.status = 'error';
|
|
426
|
-
this.results.categories.services.checks.push({
|
|
427
|
-
name: 'Service Check',
|
|
428
|
-
status: 'error',
|
|
429
|
-
message: error.message
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
async getRedisServiceInfo() {
|
|
435
|
-
const info = execSync('redis-cli info server', { encoding: 'utf8' });
|
|
436
|
-
const lines = info.split('\r\n');
|
|
437
|
-
const result = {};
|
|
438
|
-
|
|
439
|
-
lines.forEach(line => {
|
|
440
|
-
if (line.includes(':')) {
|
|
441
|
-
const [key, value] = line.split(':');
|
|
442
|
-
result[key] = value;
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
return {
|
|
447
|
-
pid: parseInt(result.process_id),
|
|
448
|
-
uptime: parseInt(result.uptime_in_seconds),
|
|
449
|
-
version: result.redis_version,
|
|
450
|
-
connected_clients: parseInt(result.connected_clients)
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
async getDashboardServiceInfo() {
|
|
455
|
-
const configPath = join(this.configDir, 'services.json');
|
|
456
|
-
if (!existsSync(configPath)) {
|
|
457
|
-
return { running: false };
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
const services = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
461
|
-
const dashboardConfig = services.services?.dashboard;
|
|
462
|
-
|
|
463
|
-
if (!dashboardConfig?.enabled) {
|
|
464
|
-
return { running: false, disabled: true };
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
try {
|
|
468
|
-
const port = dashboardConfig.port || 3000;
|
|
469
|
-
const response = await fetch(`http://localhost:${port}/health`, { timeout: 5000 });
|
|
470
|
-
|
|
471
|
-
return {
|
|
472
|
-
running: response.ok,
|
|
473
|
-
port,
|
|
474
|
-
status: response.status
|
|
475
|
-
};
|
|
476
|
-
} catch (error) {
|
|
477
|
-
return { running: false, port: dashboardConfig.port || 3000 };
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
async getMonitoringServiceInfo() {
|
|
482
|
-
try {
|
|
483
|
-
const output = execSync('ps aux | grep claude-flow-monitor | grep -v grep', { encoding: 'utf8' });
|
|
484
|
-
if (output.trim()) {
|
|
485
|
-
const parts = output.trim().split(/\s+/);
|
|
486
|
-
return {
|
|
487
|
-
running: true,
|
|
488
|
-
pid: parseInt(parts[1]),
|
|
489
|
-
command: parts.slice(10).join(' ')
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
|
-
} catch (error) {
|
|
493
|
-
// Process not found
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
return { running: false };
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
async checkNetwork() {
|
|
500
|
-
const spinner = ora('Checking network connectivity...').start();
|
|
501
|
-
|
|
502
|
-
try {
|
|
503
|
-
const checks = [];
|
|
504
|
-
|
|
505
|
-
// Check internet connectivity
|
|
506
|
-
try {
|
|
507
|
-
const response = await fetch('https://api.github.com', { timeout: 5000 });
|
|
508
|
-
checks.push({
|
|
509
|
-
name: 'Internet Connectivity',
|
|
510
|
-
status: response.ok ? 'pass' : 'warn',
|
|
511
|
-
message: response.ok ? 'Connected' : 'Limited connectivity',
|
|
512
|
-
details: { status: response.status }
|
|
513
|
-
});
|
|
514
|
-
} catch (error) {
|
|
515
|
-
checks.push({
|
|
516
|
-
name: 'Internet Connectivity',
|
|
517
|
-
status: 'warn',
|
|
518
|
-
message: 'No internet connection',
|
|
519
|
-
details: { error: error.message }
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// Check npm registry
|
|
524
|
-
try {
|
|
525
|
-
execSync('npm ping', { stdio: 'ignore', timeout: 10000 });
|
|
526
|
-
checks.push({
|
|
527
|
-
name: 'NPM Registry',
|
|
528
|
-
status: 'pass',
|
|
529
|
-
message: 'Accessible',
|
|
530
|
-
details: {}
|
|
531
|
-
});
|
|
532
|
-
} catch (error) {
|
|
533
|
-
checks.push({
|
|
534
|
-
name: 'NPM Registry',
|
|
535
|
-
status: 'fail',
|
|
536
|
-
message: 'Not accessible',
|
|
537
|
-
details: { error: error.message }
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
// Check port availability
|
|
542
|
-
const ports = [3000, 6379, 8080];
|
|
543
|
-
for (const port of ports) {
|
|
544
|
-
try {
|
|
545
|
-
const output = execSync(`netstat -an | grep :${port}`, { stdio: 'ignore' });
|
|
546
|
-
checks.push({
|
|
547
|
-
name: `Port ${port}`,
|
|
548
|
-
status: 'pass',
|
|
549
|
-
message: 'Available',
|
|
550
|
-
details: { port, inUse: true }
|
|
551
|
-
});
|
|
552
|
-
} catch (error) {
|
|
553
|
-
checks.push({
|
|
554
|
-
name: `Port ${port}`,
|
|
555
|
-
status: 'pass',
|
|
556
|
-
message: 'Available',
|
|
557
|
-
details: { port, inUse: false }
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
this.results.categories.network.checks = checks;
|
|
563
|
-
this.results.categories.network.status = this.calculateCategoryStatus(checks);
|
|
564
|
-
|
|
565
|
-
spinner.succeed('Network check completed');
|
|
566
|
-
} catch (error) {
|
|
567
|
-
spinner.fail('Network check failed');
|
|
568
|
-
this.results.categories.network.status = 'error';
|
|
569
|
-
this.results.categories.network.checks.push({
|
|
570
|
-
name: 'Network Check',
|
|
571
|
-
status: 'error',
|
|
572
|
-
message: error.message
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
calculateCategoryStatus(checks) {
|
|
578
|
-
const hasFailures = checks.some(check => check.status === 'fail' || check.status === 'error');
|
|
579
|
-
const hasWarnings = checks.some(check => check.status === 'warn');
|
|
580
|
-
|
|
581
|
-
if (hasFailures) return 'fail';
|
|
582
|
-
if (hasWarnings) return 'warn';
|
|
583
|
-
return 'pass';
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
calculateOverallStatus() {
|
|
587
|
-
const categories = Object.values(this.results.categories);
|
|
588
|
-
const hasFailures = categories.some(cat => cat.status === 'fail' || cat.status === 'error');
|
|
589
|
-
const hasWarnings = categories.some(cat => cat.status === 'warn');
|
|
590
|
-
|
|
591
|
-
if (hasFailures) this.results.overall = 'fail';
|
|
592
|
-
else if (hasWarnings) this.results.overall = 'warn';
|
|
593
|
-
else this.results.overall = 'pass';
|
|
594
|
-
|
|
595
|
-
// Collect warnings and errors
|
|
596
|
-
categories.forEach(category => {
|
|
597
|
-
category.checks.forEach(check => {
|
|
598
|
-
if (check.status === 'fail' || check.status === 'error') {
|
|
599
|
-
this.results.errors.push(`${check.name}: ${check.message}`);
|
|
600
|
-
} else if (check.status === 'warn') {
|
|
601
|
-
this.results.warnings.push(`${check.name}: ${check.message}`);
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
});
|
|
605
|
-
|
|
606
|
-
// Generate recommendations
|
|
607
|
-
this.generateRecommendations();
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
generateRecommendations() {
|
|
611
|
-
const recommendations = [];
|
|
612
|
-
|
|
613
|
-
// System recommendations
|
|
614
|
-
const systemChecks = this.results.categories.system.checks;
|
|
615
|
-
const memoryCheck = systemChecks.find(check => check.name === 'Memory');
|
|
616
|
-
if (memoryCheck && memoryCheck.details.usage > 75) {
|
|
617
|
-
recommendations.push('Consider closing unused applications to free up memory');
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
const diskCheck = systemChecks.find(check => check.name === 'Disk Space');
|
|
621
|
-
if (diskCheck && diskCheck.details.free < 1024) { // Less than 1GB
|
|
622
|
-
recommendations.push('Free up disk space for optimal performance');
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
// Dependency recommendations
|
|
626
|
-
const depChecks = this.results.categories.dependencies.checks;
|
|
627
|
-
const redisCheck = depChecks.find(check => check.name === 'redis-cli');
|
|
628
|
-
if (redisCheck && redisCheck.status === 'warn') {
|
|
629
|
-
recommendations.push('Install Redis for full functionality');
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
// Service recommendations
|
|
633
|
-
const serviceChecks = this.results.categories.services.checks;
|
|
634
|
-
const dashboardCheck = serviceChecks.find(check => check.name === 'Dashboard Service');
|
|
635
|
-
if (dashboardCheck && dashboardCheck.status === 'warn') {
|
|
636
|
-
recommendations.push('Start the dashboard service for web interface');
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
this.results.recommendations = recommendations;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
displayResults() {
|
|
643
|
-
console.log('\n' + chalk.blue.bold('š Health Check Results\n'));
|
|
644
|
-
|
|
645
|
-
// Overall status
|
|
646
|
-
const statusColors = {
|
|
647
|
-
pass: chalk.green,
|
|
648
|
-
warn: chalk.yellow,
|
|
649
|
-
fail: chalk.red,
|
|
650
|
-
error: chalk.red
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
const statusIcons = {
|
|
654
|
-
pass: 'ā
',
|
|
655
|
-
warn: 'ā ļø',
|
|
656
|
-
fail: 'ā',
|
|
657
|
-
error: 'š„'
|
|
658
|
-
};
|
|
659
|
-
|
|
660
|
-
const overallColor = statusColors[this.results.overall];
|
|
661
|
-
const overallIcon = statusIcons[this.results.overall];
|
|
662
|
-
|
|
663
|
-
console.log(overallColor.bold(`${overallIcon} Overall Status: ${this.results.overall.toUpperCase()}\n`));
|
|
664
|
-
|
|
665
|
-
// Category results
|
|
666
|
-
for (const [categoryName, category] of Object.entries(this.results.categories)) {
|
|
667
|
-
const categoryColor = statusColors[category.status];
|
|
668
|
-
const categoryIcon = statusIcons[category.status];
|
|
669
|
-
|
|
670
|
-
console.log(categoryColor.bold(`${categoryIcon} ${categoryName.charAt(0).toUpperCase() + categoryName.slice(1)}:`));
|
|
671
|
-
|
|
672
|
-
category.checks.forEach(check => {
|
|
673
|
-
const checkColor = statusColors[check.status];
|
|
674
|
-
const checkIcon = statusIcons[check.status];
|
|
675
|
-
console.log(` ${checkColor} ${checkIcon} ${check.name}: ${check.message}`);
|
|
676
|
-
});
|
|
677
|
-
|
|
678
|
-
console.log();
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
// Warnings
|
|
682
|
-
if (this.results.warnings.length > 0) {
|
|
683
|
-
console.log(chalk.yellow.bold('ā ļø Warnings:'));
|
|
684
|
-
this.results.warnings.forEach(warning => {
|
|
685
|
-
console.log(chalk.yellow(` ⢠${warning}`));
|
|
686
|
-
});
|
|
687
|
-
console.log();
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
// Errors
|
|
691
|
-
if (this.results.errors.length > 0) {
|
|
692
|
-
console.log(chalk.red.bold('ā Errors:'));
|
|
693
|
-
this.results.errors.forEach(error => {
|
|
694
|
-
console.log(chalk.red(` ⢠${error}`));
|
|
695
|
-
});
|
|
696
|
-
console.log();
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// Recommendations
|
|
700
|
-
if (this.results.recommendations.length > 0) {
|
|
701
|
-
console.log(chalk.cyan.bold('š” Recommendations:'));
|
|
702
|
-
this.results.recommendations.forEach(rec => {
|
|
703
|
-
console.log(chalk.cyan(` ⢠${rec}`));
|
|
704
|
-
});
|
|
705
|
-
console.log();
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
// Summary
|
|
709
|
-
const summary = this.results.overall === 'pass'
|
|
710
|
-
? chalk.green.bold('š All systems are healthy!')
|
|
711
|
-
: this.results.overall === 'warn'
|
|
712
|
-
? chalk.yellow.bold('ā ļø Some issues detected - review recommendations')
|
|
713
|
-
: chalk.red.bold('ā Critical issues found - immediate attention required');
|
|
714
|
-
|
|
715
|
-
console.log(boxen(summary, {
|
|
716
|
-
padding: 1,
|
|
717
|
-
margin: 1,
|
|
718
|
-
borderStyle: 'round',
|
|
719
|
-
borderColor: this.results.overall === 'pass' ? 'green' : this.results.overall === 'warn' ? 'yellow' : 'red'
|
|
720
|
-
}));
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
compareVersions(version1, version2) {
|
|
724
|
-
const v1parts = version1.split('.').map(Number);
|
|
725
|
-
const v2parts = version2.split('.').map(Number);
|
|
726
|
-
const maxLength = Math.max(v1parts.length, v2parts.length);
|
|
727
|
-
|
|
728
|
-
for (let i = 0; i < maxLength; i++) {
|
|
729
|
-
const v1part = v1parts[i] || 0;
|
|
730
|
-
const v2part = v2parts[i] || 0;
|
|
731
|
-
|
|
732
|
-
if (v1part > v2part) return 1;
|
|
733
|
-
if (v1part < v2part) return -1;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
return 0;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// CLI Interface with options
|
|
741
|
-
async function main() {
|
|
742
|
-
const options = {
|
|
743
|
-
verbose: process.argv.includes('--verbose'),
|
|
744
|
-
json: process.argv.includes('--json'),
|
|
745
|
-
quiet: process.argv.includes('--quiet')
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
const checker = new HealthChecker();
|
|
749
|
-
const results = await checker.check();
|
|
750
|
-
|
|
751
|
-
if (options.json) {
|
|
752
|
-
console.log(JSON.stringify(results, null, 2));
|
|
753
|
-
} else if (options.verbose) {
|
|
754
|
-
console.log(chalk.blue('\nš Detailed health report generated.'));
|
|
755
|
-
console.log(chalk.gray(`Check completed at: ${new Date().toISOString()}\n`));
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
process.exit(results.overall === 'pass' ? 0 : 1);
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
762
|
-
main();
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
export default HealthChecker;
|