claude-flow-novice 2.3.4 ā 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 +41 -31
- 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 -84
- 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,761 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Configuration Validation Scripts
|
|
5
|
-
*
|
|
6
|
-
* Validates all optimization configurations before and after activation
|
|
7
|
-
* Ensures system integrity and performance compliance
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
11
|
-
import { dirname, join } from 'path';
|
|
12
|
-
import { existsSync, readFileSync, statSync } from 'fs';
|
|
13
|
-
import { performance } from 'perf_hooks';
|
|
14
|
-
import chalk from 'chalk';
|
|
15
|
-
import ora from 'ora';
|
|
16
|
-
|
|
17
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
-
const __dirname = dirname(__filename);
|
|
19
|
-
const PROJECT_ROOT = join(__dirname, '..', '..');
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Configuration Validator
|
|
23
|
-
*/
|
|
24
|
-
class ConfigurationValidator {
|
|
25
|
-
constructor(options = {}) {
|
|
26
|
-
this.options = {
|
|
27
|
-
strict: false,
|
|
28
|
-
verbose: false,
|
|
29
|
-
...options
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
this.validationRules = {
|
|
33
|
-
sqlite: this._getSQLiteValidationRules(),
|
|
34
|
-
performance: this._getPerformanceValidationRules(),
|
|
35
|
-
hardware: this._getHardwareValidationRules(),
|
|
36
|
-
monitoring: this._getMonitoringValidationRules()
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
this.validationResults = {
|
|
40
|
-
sqlite: [],
|
|
41
|
-
performance: [],
|
|
42
|
-
hardware: [],
|
|
43
|
-
monitoring: [],
|
|
44
|
-
overall: { passed: 0, failed: 0, warnings: 0 }
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Run comprehensive configuration validation
|
|
50
|
-
*/
|
|
51
|
-
async validate() {
|
|
52
|
-
const spinner = ora('š Starting Configuration Validation...').start();
|
|
53
|
-
|
|
54
|
-
try {
|
|
55
|
-
// Validate SQLite configurations
|
|
56
|
-
await this._validateSQLiteConfig(spinner);
|
|
57
|
-
|
|
58
|
-
// Validate performance configurations
|
|
59
|
-
await this._validatePerformanceConfig(spinner);
|
|
60
|
-
|
|
61
|
-
// Validate hardware configurations
|
|
62
|
-
await this._validateHardwareConfig(spinner);
|
|
63
|
-
|
|
64
|
-
// Validate monitoring configurations
|
|
65
|
-
await this._validateMonitoringConfig(spinner);
|
|
66
|
-
|
|
67
|
-
// Generate final report
|
|
68
|
-
const report = this._generateValidationReport();
|
|
69
|
-
|
|
70
|
-
spinner.succeed('ā
Configuration validation completed');
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
success: report.overall.failed === 0,
|
|
74
|
-
report,
|
|
75
|
-
recommendations: this._generateRecommendations()
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
} catch (error) {
|
|
79
|
-
spinner.fail('ā Configuration validation failed');
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Validate specific configuration type
|
|
86
|
-
*/
|
|
87
|
-
async validateType(type) {
|
|
88
|
-
if (!this.validationRules[type]) {
|
|
89
|
-
throw new Error(`Unknown validation type: ${type}`);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const methodName = `_validate${type.charAt(0).toUpperCase() + type.slice(1)}Config`;
|
|
93
|
-
if (typeof this[methodName] === 'function') {
|
|
94
|
-
await this[methodName]();
|
|
95
|
-
return this.validationResults[type];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
throw new Error(`Validation method not implemented for type: ${type}`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Private validation methods
|
|
102
|
-
|
|
103
|
-
async _validateSQLiteConfig(spinner) {
|
|
104
|
-
spinner.text = 'š¾ Validating SQLite configurations...';
|
|
105
|
-
|
|
106
|
-
const rules = this.validationRules.sqlite;
|
|
107
|
-
const results = this.validationResults.sqlite;
|
|
108
|
-
|
|
109
|
-
// Find database files
|
|
110
|
-
const dbPaths = this._findDatabaseFiles();
|
|
111
|
-
|
|
112
|
-
if (dbPaths.length === 0) {
|
|
113
|
-
results.push({
|
|
114
|
-
type: 'warning',
|
|
115
|
-
rule: 'database-existence',
|
|
116
|
-
message: 'No SQLite database files found',
|
|
117
|
-
impact: 'medium'
|
|
118
|
-
});
|
|
119
|
-
this.validationResults.overall.warnings++;
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
for (const dbPath of dbPaths) {
|
|
124
|
-
try {
|
|
125
|
-
const Database = (await import('better-sqlite3')).default;
|
|
126
|
-
const db = new Database(dbPath, { readonly: true });
|
|
127
|
-
|
|
128
|
-
// Validate schema version
|
|
129
|
-
const schemaVersion = this._getSchemaVersion(db);
|
|
130
|
-
if (schemaVersion < rules.minSchemaVersion) {
|
|
131
|
-
results.push({
|
|
132
|
-
type: 'error',
|
|
133
|
-
rule: 'schema-version',
|
|
134
|
-
message: `Database ${dbPath} schema version ${schemaVersion} below minimum ${rules.minSchemaVersion}`,
|
|
135
|
-
impact: 'high',
|
|
136
|
-
fix: 'Run database optimization to upgrade schema'
|
|
137
|
-
});
|
|
138
|
-
this.validationResults.overall.failed++;
|
|
139
|
-
} else {
|
|
140
|
-
results.push({
|
|
141
|
-
type: 'success',
|
|
142
|
-
rule: 'schema-version',
|
|
143
|
-
message: `Database ${dbPath} schema version ${schemaVersion} is current`,
|
|
144
|
-
impact: 'low'
|
|
145
|
-
});
|
|
146
|
-
this.validationResults.overall.passed++;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Validate indexes
|
|
150
|
-
const indexes = this._getIndexes(db);
|
|
151
|
-
const requiredIndexes = rules.requiredIndexes;
|
|
152
|
-
|
|
153
|
-
for (const requiredIndex of requiredIndexes) {
|
|
154
|
-
const indexExists = indexes.some(idx => idx.name === requiredIndex);
|
|
155
|
-
if (!indexExists) {
|
|
156
|
-
results.push({
|
|
157
|
-
type: 'error',
|
|
158
|
-
rule: 'required-indexes',
|
|
159
|
-
message: `Required index ${requiredIndex} missing from ${dbPath}`,
|
|
160
|
-
impact: 'high',
|
|
161
|
-
fix: 'Run database optimization to create missing indexes'
|
|
162
|
-
});
|
|
163
|
-
this.validationResults.overall.failed++;
|
|
164
|
-
} else {
|
|
165
|
-
results.push({
|
|
166
|
-
type: 'success',
|
|
167
|
-
rule: 'required-indexes',
|
|
168
|
-
message: `Required index ${requiredIndex} exists in ${dbPath}`,
|
|
169
|
-
impact: 'low'
|
|
170
|
-
});
|
|
171
|
-
this.validationResults.overall.passed++;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Validate pragma settings
|
|
176
|
-
const pragmaSettings = this._getPragmaSettings(db);
|
|
177
|
-
for (const [pragma, expectedValue] of Object.entries(rules.pragmaSettings)) {
|
|
178
|
-
const actualValue = pragmaSettings[pragma];
|
|
179
|
-
if (actualValue !== expectedValue) {
|
|
180
|
-
results.push({
|
|
181
|
-
type: 'warning',
|
|
182
|
-
rule: 'pragma-settings',
|
|
183
|
-
message: `Pragma ${pragma} is ${actualValue}, expected ${expectedValue} in ${dbPath}`,
|
|
184
|
-
impact: 'medium',
|
|
185
|
-
fix: `Run PRAGMA ${pragma} = ${expectedValue}`
|
|
186
|
-
});
|
|
187
|
-
this.validationResults.overall.warnings++;
|
|
188
|
-
} else {
|
|
189
|
-
results.push({
|
|
190
|
-
type: 'success',
|
|
191
|
-
rule: 'pragma-settings',
|
|
192
|
-
message: `Pragma ${pragma} correctly set to ${expectedValue} in ${dbPath}`,
|
|
193
|
-
impact: 'low'
|
|
194
|
-
});
|
|
195
|
-
this.validationResults.overall.passed++;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
db.close();
|
|
200
|
-
|
|
201
|
-
} catch (error) {
|
|
202
|
-
results.push({
|
|
203
|
-
type: 'error',
|
|
204
|
-
rule: 'database-access',
|
|
205
|
-
message: `Cannot access database ${dbPath}: ${error.message}`,
|
|
206
|
-
impact: 'critical',
|
|
207
|
-
fix: 'Check database file permissions and integrity'
|
|
208
|
-
});
|
|
209
|
-
this.validationResults.overall.failed++;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
async _validatePerformanceConfig(spinner) {
|
|
215
|
-
spinner.text = 'ā” Validating performance configurations...';
|
|
216
|
-
|
|
217
|
-
const rules = this.validationRules.performance;
|
|
218
|
-
const results = this.validationResults.performance;
|
|
219
|
-
|
|
220
|
-
// Check for performance configuration files
|
|
221
|
-
const perfConfigPath = join(PROJECT_ROOT, '.claude-flow', 'performance-config.json');
|
|
222
|
-
if (!existsSync(perfConfigPath)) {
|
|
223
|
-
results.push({
|
|
224
|
-
type: 'warning',
|
|
225
|
-
rule: 'config-file-existence',
|
|
226
|
-
message: 'Performance configuration file not found',
|
|
227
|
-
impact: 'medium',
|
|
228
|
-
fix: 'Run optimization activation to create performance configuration'
|
|
229
|
-
});
|
|
230
|
-
this.validationResults.overall.warnings++;
|
|
231
|
-
} else {
|
|
232
|
-
try {
|
|
233
|
-
const config = JSON.parse(readFileSync(perfConfigPath, 'utf8'));
|
|
234
|
-
|
|
235
|
-
// Validate performance targets
|
|
236
|
-
if (config.performanceTarget > rules.maxExecutionTime) {
|
|
237
|
-
results.push({
|
|
238
|
-
type: 'warning',
|
|
239
|
-
rule: 'performance-target',
|
|
240
|
-
message: `Performance target ${config.performanceTarget}ms exceeds recommended ${rules.maxExecutionTime}ms`,
|
|
241
|
-
impact: 'medium'
|
|
242
|
-
});
|
|
243
|
-
this.validationResults.overall.warnings++;
|
|
244
|
-
} else {
|
|
245
|
-
results.push({
|
|
246
|
-
type: 'success',
|
|
247
|
-
rule: 'performance-target',
|
|
248
|
-
message: `Performance target ${config.performanceTarget}ms within recommended limits`,
|
|
249
|
-
impact: 'low'
|
|
250
|
-
});
|
|
251
|
-
this.validationResults.overall.passed++;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// Validate compatibility target
|
|
255
|
-
if (config.compatibilityTarget < rules.minCompatibilityRate) {
|
|
256
|
-
results.push({
|
|
257
|
-
type: 'error',
|
|
258
|
-
rule: 'compatibility-target',
|
|
259
|
-
message: `Compatibility target ${config.compatibilityTarget} below minimum ${rules.minCompatibilityRate}`,
|
|
260
|
-
impact: 'high'
|
|
261
|
-
});
|
|
262
|
-
this.validationResults.overall.failed++;
|
|
263
|
-
} else {
|
|
264
|
-
results.push({
|
|
265
|
-
type: 'success',
|
|
266
|
-
rule: 'compatibility-target',
|
|
267
|
-
message: `Compatibility target ${config.compatibilityTarget} meets minimum requirements`,
|
|
268
|
-
impact: 'low'
|
|
269
|
-
});
|
|
270
|
-
this.validationResults.overall.passed++;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
} catch (error) {
|
|
274
|
-
results.push({
|
|
275
|
-
type: 'error',
|
|
276
|
-
rule: 'config-file-parsing',
|
|
277
|
-
message: `Cannot parse performance configuration: ${error.message}`,
|
|
278
|
-
impact: 'high'
|
|
279
|
-
});
|
|
280
|
-
this.validationResults.overall.failed++;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// Check Node.js optimization flags
|
|
285
|
-
const nodeOptions = process.env.NODE_OPTIONS || '';
|
|
286
|
-
for (const requiredFlag of rules.requiredNodeFlags) {
|
|
287
|
-
if (!nodeOptions.includes(requiredFlag)) {
|
|
288
|
-
results.push({
|
|
289
|
-
type: 'warning',
|
|
290
|
-
rule: 'node-flags',
|
|
291
|
-
message: `Required Node.js flag ${requiredFlag} not set`,
|
|
292
|
-
impact: 'medium',
|
|
293
|
-
fix: `Add ${requiredFlag} to NODE_OPTIONS environment variable`
|
|
294
|
-
});
|
|
295
|
-
this.validationResults.overall.warnings++;
|
|
296
|
-
} else {
|
|
297
|
-
results.push({
|
|
298
|
-
type: 'success',
|
|
299
|
-
rule: 'node-flags',
|
|
300
|
-
message: `Required Node.js flag ${requiredFlag} is set`,
|
|
301
|
-
impact: 'low'
|
|
302
|
-
});
|
|
303
|
-
this.validationResults.overall.passed++;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
async _validateHardwareConfig(spinner) {
|
|
309
|
-
spinner.text = 'š„ļø Validating hardware configurations...';
|
|
310
|
-
|
|
311
|
-
const rules = this.validationRules.hardware;
|
|
312
|
-
const results = this.validationResults.hardware;
|
|
313
|
-
|
|
314
|
-
// Check system memory
|
|
315
|
-
const totalMemory = require('os').totalmem();
|
|
316
|
-
const totalMemoryGB = totalMemory / (1024 * 1024 * 1024);
|
|
317
|
-
|
|
318
|
-
if (totalMemoryGB < rules.minMemoryGB) {
|
|
319
|
-
results.push({
|
|
320
|
-
type: 'error',
|
|
321
|
-
rule: 'system-memory',
|
|
322
|
-
message: `System memory ${totalMemoryGB.toFixed(1)}GB below minimum ${rules.minMemoryGB}GB`,
|
|
323
|
-
impact: 'critical'
|
|
324
|
-
});
|
|
325
|
-
this.validationResults.overall.failed++;
|
|
326
|
-
} else if (totalMemoryGB >= rules.optimalMemoryGB) {
|
|
327
|
-
results.push({
|
|
328
|
-
type: 'success',
|
|
329
|
-
rule: 'system-memory',
|
|
330
|
-
message: `System memory ${totalMemoryGB.toFixed(1)}GB meets optimal requirements`,
|
|
331
|
-
impact: 'low'
|
|
332
|
-
});
|
|
333
|
-
this.validationResults.overall.passed++;
|
|
334
|
-
} else {
|
|
335
|
-
results.push({
|
|
336
|
-
type: 'warning',
|
|
337
|
-
rule: 'system-memory',
|
|
338
|
-
message: `System memory ${totalMemoryGB.toFixed(1)}GB below optimal ${rules.optimalMemoryGB}GB`,
|
|
339
|
-
impact: 'medium'
|
|
340
|
-
});
|
|
341
|
-
this.validationResults.overall.warnings++;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
// Check CPU cores
|
|
345
|
-
const cpuCores = require('os').cpus().length;
|
|
346
|
-
if (cpuCores < rules.minCPUCores) {
|
|
347
|
-
results.push({
|
|
348
|
-
type: 'warning',
|
|
349
|
-
rule: 'cpu-cores',
|
|
350
|
-
message: `CPU cores ${cpuCores} below recommended ${rules.minCPUCores}`,
|
|
351
|
-
impact: 'medium'
|
|
352
|
-
});
|
|
353
|
-
this.validationResults.overall.warnings++;
|
|
354
|
-
} else {
|
|
355
|
-
results.push({
|
|
356
|
-
type: 'success',
|
|
357
|
-
rule: 'cpu-cores',
|
|
358
|
-
message: `CPU cores ${cpuCores} meets requirements`,
|
|
359
|
-
impact: 'low'
|
|
360
|
-
});
|
|
361
|
-
this.validationResults.overall.passed++;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
// Check Node.js version
|
|
365
|
-
const nodeVersion = process.version;
|
|
366
|
-
const majorVersion = parseInt(nodeVersion.slice(1).split('.')[0]);
|
|
367
|
-
|
|
368
|
-
if (majorVersion < rules.minNodeVersion) {
|
|
369
|
-
results.push({
|
|
370
|
-
type: 'error',
|
|
371
|
-
rule: 'node-version',
|
|
372
|
-
message: `Node.js version ${nodeVersion} below minimum ${rules.minNodeVersion}`,
|
|
373
|
-
impact: 'critical',
|
|
374
|
-
fix: `Upgrade Node.js to version ${rules.minNodeVersion} or higher`
|
|
375
|
-
});
|
|
376
|
-
this.validationResults.overall.failed++;
|
|
377
|
-
} else {
|
|
378
|
-
results.push({
|
|
379
|
-
type: 'success',
|
|
380
|
-
rule: 'node-version',
|
|
381
|
-
message: `Node.js version ${nodeVersion} meets requirements`,
|
|
382
|
-
impact: 'low'
|
|
383
|
-
});
|
|
384
|
-
this.validationResults.overall.passed++;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
async _validateMonitoringConfig(spinner) {
|
|
389
|
-
spinner.text = 'š Validating monitoring configurations...';
|
|
390
|
-
|
|
391
|
-
const rules = this.validationRules.monitoring;
|
|
392
|
-
const results = this.validationResults.monitoring;
|
|
393
|
-
|
|
394
|
-
// Check monitoring configuration file
|
|
395
|
-
const monitoringConfigPath = join(PROJECT_ROOT, '.claude-flow', 'monitoring-config.json');
|
|
396
|
-
if (!existsSync(monitoringConfigPath)) {
|
|
397
|
-
results.push({
|
|
398
|
-
type: 'error',
|
|
399
|
-
rule: 'config-file-existence',
|
|
400
|
-
message: 'Monitoring configuration file not found',
|
|
401
|
-
impact: 'high',
|
|
402
|
-
fix: 'Run optimization activation to create monitoring configuration'
|
|
403
|
-
});
|
|
404
|
-
this.validationResults.overall.failed++;
|
|
405
|
-
return;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
try {
|
|
409
|
-
const config = JSON.parse(readFileSync(monitoringConfigPath, 'utf8'));
|
|
410
|
-
|
|
411
|
-
// Validate required sections
|
|
412
|
-
for (const requiredSection of rules.requiredSections) {
|
|
413
|
-
if (!config[requiredSection]) {
|
|
414
|
-
results.push({
|
|
415
|
-
type: 'error',
|
|
416
|
-
rule: 'required-sections',
|
|
417
|
-
message: `Required monitoring section ${requiredSection} missing`,
|
|
418
|
-
impact: 'high'
|
|
419
|
-
});
|
|
420
|
-
this.validationResults.overall.failed++;
|
|
421
|
-
} else {
|
|
422
|
-
results.push({
|
|
423
|
-
type: 'success',
|
|
424
|
-
rule: 'required-sections',
|
|
425
|
-
message: `Required monitoring section ${requiredSection} present`,
|
|
426
|
-
impact: 'low'
|
|
427
|
-
});
|
|
428
|
-
this.validationResults.overall.passed++;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
// Validate performance thresholds
|
|
433
|
-
if (config.performanceThresholds) {
|
|
434
|
-
const thresholds = config.performanceThresholds;
|
|
435
|
-
|
|
436
|
-
if (thresholds.hookExecutionTime > rules.maxHookExecutionTime) {
|
|
437
|
-
results.push({
|
|
438
|
-
type: 'warning',
|
|
439
|
-
rule: 'performance-thresholds',
|
|
440
|
-
message: `Hook execution time threshold ${thresholds.hookExecutionTime}ms too high`,
|
|
441
|
-
impact: 'medium'
|
|
442
|
-
});
|
|
443
|
-
this.validationResults.overall.warnings++;
|
|
444
|
-
} else {
|
|
445
|
-
results.push({
|
|
446
|
-
type: 'success',
|
|
447
|
-
rule: 'performance-thresholds',
|
|
448
|
-
message: `Hook execution time threshold ${thresholds.hookExecutionTime}ms is appropriate`,
|
|
449
|
-
impact: 'low'
|
|
450
|
-
});
|
|
451
|
-
this.validationResults.overall.passed++;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
} catch (error) {
|
|
456
|
-
results.push({
|
|
457
|
-
type: 'error',
|
|
458
|
-
rule: 'config-file-parsing',
|
|
459
|
-
message: `Cannot parse monitoring configuration: ${error.message}`,
|
|
460
|
-
impact: 'high'
|
|
461
|
-
});
|
|
462
|
-
this.validationResults.overall.failed++;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
// Check monitoring service files
|
|
466
|
-
const servicesDir = join(PROJECT_ROOT, '.claude-flow', 'services');
|
|
467
|
-
if (!existsSync(servicesDir)) {
|
|
468
|
-
results.push({
|
|
469
|
-
type: 'warning',
|
|
470
|
-
rule: 'service-files',
|
|
471
|
-
message: 'Monitoring services directory not found',
|
|
472
|
-
impact: 'medium',
|
|
473
|
-
fix: 'Run optimization activation to start monitoring services'
|
|
474
|
-
});
|
|
475
|
-
this.validationResults.overall.warnings++;
|
|
476
|
-
} else {
|
|
477
|
-
const serviceFiles = require('fs').readdirSync(servicesDir);
|
|
478
|
-
const requiredServices = rules.requiredServices;
|
|
479
|
-
|
|
480
|
-
for (const service of requiredServices) {
|
|
481
|
-
const serviceFile = `${service}.pid`;
|
|
482
|
-
if (!serviceFiles.includes(serviceFile)) {
|
|
483
|
-
results.push({
|
|
484
|
-
type: 'warning',
|
|
485
|
-
rule: 'service-files',
|
|
486
|
-
message: `Monitoring service ${service} not running`,
|
|
487
|
-
impact: 'medium',
|
|
488
|
-
fix: `Start monitoring service: ${service}`
|
|
489
|
-
});
|
|
490
|
-
this.validationResults.overall.warnings++;
|
|
491
|
-
} else {
|
|
492
|
-
results.push({
|
|
493
|
-
type: 'success',
|
|
494
|
-
rule: 'service-files',
|
|
495
|
-
message: `Monitoring service ${service} is running`,
|
|
496
|
-
impact: 'low'
|
|
497
|
-
});
|
|
498
|
-
this.validationResults.overall.passed++;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
// Validation rule definitions
|
|
505
|
-
|
|
506
|
-
_getSQLiteValidationRules() {
|
|
507
|
-
return {
|
|
508
|
-
minSchemaVersion: 1.5,
|
|
509
|
-
requiredIndexes: [
|
|
510
|
-
'idx_agents_swarm',
|
|
511
|
-
'idx_agents_status',
|
|
512
|
-
'idx_tasks_swarm',
|
|
513
|
-
'idx_tasks_status',
|
|
514
|
-
'idx_memory_namespace'
|
|
515
|
-
],
|
|
516
|
-
pragmaSettings: {
|
|
517
|
-
journal_mode: 'WAL',
|
|
518
|
-
synchronous: 'NORMAL',
|
|
519
|
-
cache_size: 524288,
|
|
520
|
-
temp_store: 'memory'
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
_getPerformanceValidationRules() {
|
|
526
|
-
return {
|
|
527
|
-
maxExecutionTime: 100, // ms
|
|
528
|
-
minCompatibilityRate: 0.95,
|
|
529
|
-
requiredNodeFlags: [
|
|
530
|
-
'max-old-space-size',
|
|
531
|
-
'uv-threadpool-size'
|
|
532
|
-
]
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
_getHardwareValidationRules() {
|
|
537
|
-
return {
|
|
538
|
-
minMemoryGB: 16,
|
|
539
|
-
optimalMemoryGB: 96,
|
|
540
|
-
minCPUCores: 8,
|
|
541
|
-
minNodeVersion: 20
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
_getMonitoringValidationRules() {
|
|
546
|
-
return {
|
|
547
|
-
requiredSections: [
|
|
548
|
-
'performanceThresholds',
|
|
549
|
-
'alerting',
|
|
550
|
-
'metrics'
|
|
551
|
-
],
|
|
552
|
-
maxHookExecutionTime: 100,
|
|
553
|
-
requiredServices: [
|
|
554
|
-
'performance',
|
|
555
|
-
'system',
|
|
556
|
-
'database'
|
|
557
|
-
]
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
// Helper methods
|
|
562
|
-
|
|
563
|
-
_findDatabaseFiles() {
|
|
564
|
-
const dbPaths = [];
|
|
565
|
-
const searchPaths = [
|
|
566
|
-
join(PROJECT_ROOT, 'data'),
|
|
567
|
-
join(PROJECT_ROOT, '.swarm'),
|
|
568
|
-
join(PROJECT_ROOT, 'memory'),
|
|
569
|
-
join(PROJECT_ROOT, '.claude-flow')
|
|
570
|
-
];
|
|
571
|
-
|
|
572
|
-
for (const searchPath of searchPaths) {
|
|
573
|
-
if (existsSync(searchPath)) {
|
|
574
|
-
try {
|
|
575
|
-
const files = require('fs').readdirSync(searchPath, { recursive: true });
|
|
576
|
-
const dbFiles = files
|
|
577
|
-
.filter(file => file.endsWith('.db') || file.endsWith('.sqlite'))
|
|
578
|
-
.map(file => join(searchPath, file))
|
|
579
|
-
.filter(file => existsSync(file));
|
|
580
|
-
dbPaths.push(...dbFiles);
|
|
581
|
-
} catch (error) {
|
|
582
|
-
// Ignore errors reading directories
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
return [...new Set(dbPaths)]; // Remove duplicates
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
_getSchemaVersion(db) {
|
|
591
|
-
try {
|
|
592
|
-
const result = db.prepare('SELECT version FROM schema_version ORDER BY version DESC LIMIT 1').get();
|
|
593
|
-
return result ? result.version : 1.0;
|
|
594
|
-
} catch (error) {
|
|
595
|
-
return 1.0;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
_getIndexes(db) {
|
|
600
|
-
try {
|
|
601
|
-
return db.prepare("SELECT name FROM sqlite_master WHERE type='index'").all();
|
|
602
|
-
} catch (error) {
|
|
603
|
-
return [];
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
_getPragmaSettings(db) {
|
|
608
|
-
const settings = {};
|
|
609
|
-
const pragmas = ['journal_mode', 'synchronous', 'cache_size', 'temp_store'];
|
|
610
|
-
|
|
611
|
-
for (const pragma of pragmas) {
|
|
612
|
-
try {
|
|
613
|
-
const result = db.prepare(`PRAGMA ${pragma}`).get();
|
|
614
|
-
settings[pragma] = result[pragma];
|
|
615
|
-
} catch (error) {
|
|
616
|
-
settings[pragma] = 'unknown';
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
return settings;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
_generateValidationReport() {
|
|
624
|
-
const report = {
|
|
625
|
-
timestamp: new Date().toISOString(),
|
|
626
|
-
overall: this.validationResults.overall,
|
|
627
|
-
summary: {
|
|
628
|
-
total: this.validationResults.overall.passed +
|
|
629
|
-
this.validationResults.overall.failed +
|
|
630
|
-
this.validationResults.overall.warnings,
|
|
631
|
-
passRate: this.validationResults.overall.passed /
|
|
632
|
-
(this.validationResults.overall.passed + this.validationResults.overall.failed + this.validationResults.overall.warnings),
|
|
633
|
-
compliance: this.validationResults.overall.failed === 0 ? 'compliant' : 'non-compliant'
|
|
634
|
-
},
|
|
635
|
-
details: this.validationResults
|
|
636
|
-
};
|
|
637
|
-
|
|
638
|
-
return report;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
_generateRecommendations() {
|
|
642
|
-
const recommendations = [];
|
|
643
|
-
|
|
644
|
-
// Analyze errors and warnings to generate recommendations
|
|
645
|
-
const allResults = [
|
|
646
|
-
...this.validationResults.sqlite,
|
|
647
|
-
...this.validationResults.performance,
|
|
648
|
-
...this.validationResults.hardware,
|
|
649
|
-
...this.validationResults.monitoring
|
|
650
|
-
];
|
|
651
|
-
|
|
652
|
-
const errors = allResults.filter(r => r.type === 'error');
|
|
653
|
-
const warnings = allResults.filter(r => r.type === 'warning');
|
|
654
|
-
|
|
655
|
-
if (errors.length > 0) {
|
|
656
|
-
recommendations.push({
|
|
657
|
-
priority: 'CRITICAL',
|
|
658
|
-
action: 'Fix Configuration Errors',
|
|
659
|
-
description: `${errors.length} critical configuration errors must be resolved`,
|
|
660
|
-
fixes: errors.filter(e => e.fix).map(e => e.fix)
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
if (warnings.length > 0) {
|
|
665
|
-
recommendations.push({
|
|
666
|
-
priority: 'HIGH',
|
|
667
|
-
action: 'Address Configuration Warnings',
|
|
668
|
-
description: `${warnings.length} configuration warnings should be addressed for optimal performance`,
|
|
669
|
-
fixes: warnings.filter(w => w.fix).map(w => w.fix)
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
if (errors.length === 0 && warnings.length === 0) {
|
|
674
|
-
recommendations.push({
|
|
675
|
-
priority: 'INFO',
|
|
676
|
-
action: 'Configuration Validated',
|
|
677
|
-
description: 'All configurations are valid and optimized',
|
|
678
|
-
fixes: ['Continue monitoring system performance']
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
return recommendations;
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* CLI Interface
|
|
688
|
-
*/
|
|
689
|
-
async function main() {
|
|
690
|
-
const args = process.argv.slice(2);
|
|
691
|
-
const command = args[0] || 'validate';
|
|
692
|
-
const type = args[1];
|
|
693
|
-
|
|
694
|
-
const validator = new ConfigurationValidator({
|
|
695
|
-
strict: args.includes('--strict'),
|
|
696
|
-
verbose: args.includes('--verbose')
|
|
697
|
-
});
|
|
698
|
-
|
|
699
|
-
try {
|
|
700
|
-
let result;
|
|
701
|
-
|
|
702
|
-
switch (command) {
|
|
703
|
-
case 'validate':
|
|
704
|
-
if (type && ['sqlite', 'performance', 'hardware', 'monitoring'].includes(type)) {
|
|
705
|
-
console.log(chalk.blue(`š Validating ${type} configuration...`));
|
|
706
|
-
const typeResults = await validator.validateType(type);
|
|
707
|
-
console.log(JSON.stringify(typeResults, null, 2));
|
|
708
|
-
} else {
|
|
709
|
-
console.log(chalk.blue('š Running comprehensive configuration validation...'));
|
|
710
|
-
result = await validator.validate();
|
|
711
|
-
|
|
712
|
-
if (result.success) {
|
|
713
|
-
console.log(chalk.green('\nā
All configurations validated successfully!'));
|
|
714
|
-
} else {
|
|
715
|
-
console.log(chalk.red('\nā Configuration validation failed'));
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
console.log(chalk.blue('\nš Validation Summary:'));
|
|
719
|
-
console.log(` Passed: ${result.report.overall.passed}`);
|
|
720
|
-
console.log(` Failed: ${result.report.overall.failed}`);
|
|
721
|
-
console.log(` Warnings: ${result.report.overall.warnings}`);
|
|
722
|
-
console.log(` Pass Rate: ${(result.report.summary.passRate * 100).toFixed(1)}%`);
|
|
723
|
-
|
|
724
|
-
if (result.recommendations.length > 0) {
|
|
725
|
-
console.log(chalk.yellow('\nš Recommendations:'));
|
|
726
|
-
result.recommendations.forEach(rec => {
|
|
727
|
-
console.log(chalk.yellow(` ${rec.priority}: ${rec.action}`));
|
|
728
|
-
console.log(` ${rec.description}`);
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
break;
|
|
733
|
-
|
|
734
|
-
default:
|
|
735
|
-
console.log(chalk.yellow('Usage:'));
|
|
736
|
-
console.log(' node config-validator.js validate [type] - Validate configurations');
|
|
737
|
-
console.log('');
|
|
738
|
-
console.log('Types:');
|
|
739
|
-
console.log(' sqlite - Validate SQLite database configurations');
|
|
740
|
-
console.log(' performance - Validate performance system configurations');
|
|
741
|
-
console.log(' hardware - Validate hardware configurations');
|
|
742
|
-
console.log(' monitoring - Validate monitoring configurations');
|
|
743
|
-
console.log('');
|
|
744
|
-
console.log('Options:');
|
|
745
|
-
console.log(' --strict - Use strict validation rules');
|
|
746
|
-
console.log(' --verbose - Show detailed validation output');
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
} catch (error) {
|
|
750
|
-
console.error(chalk.red('ā Validation failed:'), error.message);
|
|
751
|
-
process.exit(1);
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
// Export for programmatic use
|
|
756
|
-
export { ConfigurationValidator };
|
|
757
|
-
|
|
758
|
-
// Run if called directly
|
|
759
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
760
|
-
main().catch(console.error);
|
|
761
|
-
}
|