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.
Files changed (347) hide show
  1. package/dist/src/booster/performance-benchmark.js +1 -1
  2. package/dist/src/booster/wasm-demo.js +1 -1
  3. package/dist/src/cli/command-registry.js +2 -2
  4. package/dist/src/cli/help-formatter.js +137 -109
  5. package/dist/src/cli/simple-cli.js +2528 -2121
  6. package/dist/src/cli/simple-commands/sparc/refinement.js +3 -3
  7. package/dist/src/cli/validation-helper.js +98 -49
  8. package/dist/src/commands/suggest-templates.js +4 -4
  9. package/dist/src/core/version.js +23 -15
  10. package/dist/src/memory/swarm-memory.js +603 -470
  11. package/dist/src/slash-commands/fullstack.js +2 -2
  12. package/dist/src/slash-commands/parse-epic.js +1 -1
  13. package/package.json +1 -1
  14. package/scripts/postinstall.js +41 -31
  15. package/dist/scripts/.claude-flow/metrics/agent-metrics.json +0 -1
  16. package/dist/scripts/.claude-flow/metrics/performance.json +0 -9
  17. package/dist/scripts/.claude-flow/metrics/task-metrics.json +0 -10
  18. package/dist/scripts/CLEANUP_OPTIMIZATION_REPORT.json +0 -312
  19. package/dist/scripts/CLEANUP_PERFORMANCE_OPTIMIZATION.md +0 -387
  20. package/dist/scripts/CLEANUP_QUICK_START.md +0 -268
  21. package/dist/scripts/CLEANUP_TEST_RESULTS.md +0 -205
  22. package/dist/scripts/README.md +0 -339
  23. package/dist/scripts/ace-query.sh +0 -384
  24. package/dist/scripts/agent-token-analysis.js +0 -430
  25. package/dist/scripts/auto-setup.js +0 -332
  26. package/dist/scripts/build/README.md +0 -167
  27. package/dist/scripts/build/build-config.js +0 -27
  28. package/dist/scripts/build/build-prompt-copier.sh +0 -30
  29. package/dist/scripts/build/performance-monitor.js +0 -869
  30. package/dist/scripts/build/prepare-publish.js +0 -150
  31. package/dist/scripts/build/typescript-fixer.js +0 -621
  32. package/dist/scripts/build/unified-builder.sh +0 -428
  33. package/dist/scripts/build/update-bin-version.js +0 -32
  34. package/dist/scripts/build/validate-agents.js +0 -238
  35. package/dist/scripts/build-index.js +0 -43
  36. package/dist/scripts/build-orchestrator.js +0 -320
  37. package/dist/scripts/check-routing-stats.cjs +0 -122
  38. package/dist/scripts/ci-validation.js +0 -375
  39. package/dist/scripts/cleanup-blocking-coordination.sh +0 -420
  40. package/dist/scripts/cleanup-idle-sessions.sh +0 -118
  41. package/dist/scripts/collect-build-metrics.js +0 -65
  42. package/dist/scripts/demo/README.md +0 -79
  43. package/dist/scripts/demo/autoscaling-demo-simplified.js +0 -963
  44. package/dist/scripts/demo/comprehensive-dashboard-test.js +0 -693
  45. package/dist/scripts/demo/confidence-log.js +0 -87
  46. package/dist/scripts/demo/confidence-report.js +0 -82
  47. package/dist/scripts/demo/demo-multi-swarm-coordination.js +0 -325
  48. package/dist/scripts/demo/demo-production-deployment.js +0 -399
  49. package/dist/scripts/demo/demo-visualization-system.js +0 -149
  50. package/dist/scripts/demo/performance-analysis.cjs +0 -71
  51. package/dist/scripts/demo/performance-analysis.js +0 -71
  52. package/dist/scripts/demo/test-autoscaling-demo.js +0 -314
  53. package/dist/scripts/dependency-optimizer.js +0 -349
  54. package/dist/scripts/dependency-security-assessment.js +0 -331
  55. package/dist/scripts/deploy-sdk.sh +0 -176
  56. package/dist/scripts/deployment-readiness-report.json +0 -179
  57. package/dist/scripts/dev/README.md +0 -264
  58. package/dist/scripts/dev/claude-flow-wrapper.sh +0 -35
  59. package/dist/scripts/dev/claude-monitor.py +0 -419
  60. package/dist/scripts/dev/claude-sparc.sh +0 -562
  61. package/dist/scripts/dev/claude-wrapper.sh +0 -17
  62. package/dist/scripts/dev/demo-phase3-compliance.js +0 -172
  63. package/dist/scripts/dev/demo-task-system.ts +0 -224
  64. package/dist/scripts/dev/deployment-validator.js +0 -315
  65. package/dist/scripts/dev/spawn-claude-terminal.sh +0 -32
  66. package/dist/scripts/dev/start-portal.sh +0 -506
  67. package/dist/scripts/dev/start-web-ui.js +0 -15
  68. package/dist/scripts/dev/stop-portal.sh +0 -311
  69. package/dist/scripts/dev/validate-examples.ts +0 -288
  70. package/dist/scripts/dev/validate-phase2.cjs +0 -451
  71. package/dist/scripts/dev/validate-phase2.js +0 -785
  72. package/dist/scripts/dev/validate-phase3.cjs +0 -208
  73. package/dist/scripts/dev/validate-security-remediation.js +0 -1
  74. package/dist/scripts/ecosystem.config.cjs +0 -90
  75. package/dist/scripts/enhanced-memory-spiral-killer.sh +0 -221
  76. package/dist/scripts/fix-js-extensions.js +0 -167
  77. package/dist/scripts/generate-basic-types.js +0 -73
  78. package/dist/scripts/generate-changelog.js +0 -318
  79. package/dist/scripts/git-hooks/pre-commit.sh +0 -143
  80. package/dist/scripts/health-checks.js +0 -634
  81. package/dist/scripts/hook-wrapper.sh +0 -54
  82. package/dist/scripts/install/README.md +0 -375
  83. package/dist/scripts/install/REDIS_SETUP_VALIDATION.json +0 -245
  84. package/dist/scripts/install/check-prerequisites.js +0 -303
  85. package/dist/scripts/install/config-wizard.js +0 -606
  86. package/dist/scripts/install/dependency-checker.js +0 -385
  87. package/dist/scripts/install/health-check.js +0 -765
  88. package/dist/scripts/install/install.js +0 -256
  89. package/dist/scripts/install/installation-benchmark.js +0 -461
  90. package/dist/scripts/install/quick-install.js +0 -720
  91. package/dist/scripts/install/quick-start-wizard.js +0 -295
  92. package/dist/scripts/install/redis-cli.js +0 -289
  93. package/dist/scripts/install/redis-install-guides.md +0 -407
  94. package/dist/scripts/install/redis-setup.js +0 -559
  95. package/dist/scripts/install/redis-test.js +0 -278
  96. package/dist/scripts/install/service-manager.js +0 -672
  97. package/dist/scripts/install/setup.js +0 -832
  98. package/dist/scripts/install/uninstall.js +0 -526
  99. package/dist/scripts/install/update.js +0 -461
  100. package/dist/scripts/install-pre-commit-hook.sh +0 -127
  101. package/dist/scripts/legacy/README.md +0 -272
  102. package/dist/scripts/legacy/batch-fix-ts.sh +0 -54
  103. package/dist/scripts/legacy/build-migration.sh +0 -105
  104. package/dist/scripts/legacy/build-monitor.js +0 -209
  105. package/dist/scripts/legacy/build-with-filter.sh +0 -84
  106. package/dist/scripts/legacy/build-workaround.sh +0 -71
  107. package/dist/scripts/legacy/fix-ts-advanced.js +0 -358
  108. package/dist/scripts/legacy/fix-ts-final.sh +0 -50
  109. package/dist/scripts/legacy/fix-ts-targeted.sh +0 -49
  110. package/dist/scripts/legacy/fix-typescript-errors.js +0 -305
  111. package/dist/scripts/legacy/force-build.sh +0 -63
  112. package/dist/scripts/legacy/optimize-performance.js +0 -400
  113. package/dist/scripts/legacy/performance-monitor.js +0 -263
  114. package/dist/scripts/legacy/performance-monitoring.js +0 -532
  115. package/dist/scripts/legacy/performance-test-runner.js +0 -645
  116. package/dist/scripts/legacy/quick-fix-ts.js +0 -281
  117. package/dist/scripts/legacy/safe-build.sh +0 -63
  118. package/dist/scripts/memory-monitor-coordinator.js +0 -451
  119. package/dist/scripts/migrate-to-sdk.sh +0 -520
  120. package/dist/scripts/migration/QUICK-START.md +0 -189
  121. package/dist/scripts/migration/QUICK-START.md.backup-1760135091363 +0 -189
  122. package/dist/scripts/migration/README.md +0 -464
  123. package/dist/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md +0 -500
  124. package/dist/scripts/migration/TASK-1.3.2-COMPLETION-REPORT.md.backup-1760135091348 +0 -500
  125. package/dist/scripts/migration/UPDATE-PATHS-README.md +0 -464
  126. package/dist/scripts/migration/UPDATE-PATHS-README.md.backup-1760135091337 +0 -464
  127. package/dist/scripts/migration/example-patterns.json +0 -19
  128. package/dist/scripts/migration/install-arm64.js +0 -78
  129. package/dist/scripts/migration/install.js +0 -83
  130. package/dist/scripts/migration/migrate-hooks.js +0 -173
  131. package/dist/scripts/migration/migration-examples.ts +0 -318
  132. package/dist/scripts/migration/reorganize-workspace.js +0 -504
  133. package/dist/scripts/migration/test-update-paths.js +0 -359
  134. package/dist/scripts/migration/update-paths.js +0 -664
  135. package/dist/scripts/migration/validate-migration.js +0 -647
  136. package/dist/scripts/monitor-loop.sh +0 -65
  137. package/dist/scripts/monitor-memory.sh +0 -47
  138. package/dist/scripts/monitor-migration.js +0 -339
  139. package/dist/scripts/monitor.py +0 -43
  140. package/dist/scripts/monitoring/README.md +0 -178
  141. package/dist/scripts/monitoring/alert-monitor.sh +0 -220
  142. package/dist/scripts/monitoring/analyze-resources.sh +0 -199
  143. package/dist/scripts/monitoring/dashboards/rate-limiting-dashboard.json +0 -211
  144. package/dist/scripts/monitoring/dynamic-monitor.sh +0 -85
  145. package/dist/scripts/monitoring/launch-stability-test.sh +0 -184
  146. package/dist/scripts/monitoring/monitor-test.sh +0 -93
  147. package/dist/scripts/monitoring/pre-test-validation.sh +0 -208
  148. package/dist/scripts/monitoring/quick-test-alerting.sh +0 -118
  149. package/dist/scripts/monitoring/quick-test-rate-limiting.sh +0 -206
  150. package/dist/scripts/monitoring/rate-limiting-monitor.sh +0 -380
  151. package/dist/scripts/monitoring/resource-monitor.sh +0 -126
  152. package/dist/scripts/monitoring/stability-monitor.js +0 -429
  153. package/dist/scripts/monitoring/test-monitor-quick.sh +0 -54
  154. package/dist/scripts/monitoring/view-alerts.sh +0 -307
  155. package/dist/scripts/npm-metrics-collector.js +0 -482
  156. package/dist/scripts/npm-package-validation.cjs +0 -299
  157. package/dist/scripts/optimization/build-optimizer.js +0 -438
  158. package/dist/scripts/optimization/config-validator.js +0 -761
  159. package/dist/scripts/optimization/test-optimization.js +0 -432
  160. package/dist/scripts/optimization/unified-activation.js +0 -839
  161. package/dist/scripts/optimize-package-swarm.js +0 -54
  162. package/dist/scripts/performance/ACTIVATION_COMMANDS.md +0 -292
  163. package/dist/scripts/performance/sqlite-enhanced-activation.sh +0 -583
  164. package/dist/scripts/performance/test-enhanced-backend.sh +0 -504
  165. package/dist/scripts/performance-monitor.js +0 -644
  166. package/dist/scripts/performance-test-runner.js +0 -698
  167. package/dist/scripts/post-deployment-monitoring.js +0 -350
  168. package/dist/scripts/post-edit-pipeline.js +0 -2091
  169. package/dist/scripts/post-install-claude-md.js +0 -78
  170. package/dist/scripts/postinstall.js +0 -84
  171. package/dist/scripts/pre-publish-validation.cjs +0 -212
  172. package/dist/scripts/pre-publish-validation.js +0 -429
  173. package/dist/scripts/redis-lua/cleanup-blocking-coordination.lua +0 -198
  174. package/dist/scripts/release-announcement.js +0 -425
  175. package/dist/scripts/release-notification.js +0 -248
  176. package/dist/scripts/release-rollback.js +0 -376
  177. package/dist/scripts/release-validation.js +0 -460
  178. package/dist/scripts/rollback-sdk.sh +0 -66
  179. package/dist/scripts/run-production-validation.ts +0 -590
  180. package/dist/scripts/run-stability-validation.sh +0 -687
  181. package/dist/scripts/security/README.md +0 -339
  182. package/dist/scripts/security/deployment-validation.cjs +0 -279
  183. package/dist/scripts/security/envelope-encryption-confidence-report.cjs +0 -422
  184. package/dist/scripts/security/install-git-hooks.sh +0 -132
  185. package/dist/scripts/security/install-git-secrets.sh +0 -295
  186. package/dist/scripts/security/rotate-api-keys.js +0 -469
  187. package/dist/scripts/security/ruv-swarm-safe.js +0 -74
  188. package/dist/scripts/security/security-audit.cjs +0 -538
  189. package/dist/scripts/security/setup-redis-auth.sh +0 -397
  190. package/dist/scripts/security/validate-envelope-encryption.cjs +0 -340
  191. package/dist/scripts/security-scan.js +0 -492
  192. package/dist/scripts/src/web/frontend/.claude-flow/metrics/agent-metrics.json +0 -1
  193. package/dist/scripts/src/web/frontend/.claude-flow/metrics/performance.json +0 -9
  194. package/dist/scripts/src/web/frontend/.claude-flow/metrics/task-metrics.json +0 -10
  195. package/dist/scripts/switch-api.sh +0 -159
  196. package/dist/scripts/sync-agents.js +0 -290
  197. package/dist/scripts/test/50-agent-test.js +0 -625
  198. package/dist/scripts/test/NEW_STABILITY_TEST_GUIDE.md +0 -407
  199. package/dist/scripts/test/README.md +0 -236
  200. package/dist/scripts/test/STABILITY_TEST_EXAMPLE.md +0 -347
  201. package/dist/scripts/test/STABILITY_TEST_README.md +0 -480
  202. package/dist/scripts/test/agent-worker.js +0 -309
  203. package/dist/scripts/test/ai-coordination-test.js +0 -650
  204. package/dist/scripts/test/ai-mesh-coordination-test.js +0 -416
  205. package/dist/scripts/test/check-links.ts +0 -274
  206. package/dist/scripts/test/check-performance-regression.ts +0 -168
  207. package/dist/scripts/test/cli-agent-coordination-test.js +0 -313
  208. package/dist/scripts/test/coordinator-multilingual-test.js +0 -396
  209. package/dist/scripts/test/coordinator-transparency-demo.js +0 -585
  210. package/dist/scripts/test/coverage-report.ts +0 -692
  211. package/dist/scripts/test/generate-swarm-tests.js +0 -633
  212. package/dist/scripts/test/integration-test-validation.cjs +0 -253
  213. package/dist/scripts/test/load-test-swarm.js +0 -576
  214. package/dist/scripts/test/mesh-coordination-zero-overlap-test.js +0 -740
  215. package/dist/scripts/test/multilingual-hello-world-test.js +0 -390
  216. package/dist/scripts/test/quick-multilingual-demo.js +0 -464
  217. package/dist/scripts/test/real-agent-test.js +0 -312
  218. package/dist/scripts/test/run-phase3-compliance-tests.js +0 -427
  219. package/dist/scripts/test/run-stability-test-examples.sh +0 -292
  220. package/dist/scripts/test/stability-results/stability-metrics.jsonl +0 -83
  221. package/dist/scripts/test/stability-results/stability-test-report.json +0 -128
  222. package/dist/scripts/test/stability-results/stability-test.log +0 -1827
  223. package/dist/scripts/test/stability-test-50-agents.js +0 -734
  224. package/dist/scripts/test/test-batch-tasks.ts +0 -29
  225. package/dist/scripts/test/test-byzantine-resolution.js +0 -246
  226. package/dist/scripts/test/test-claude-spawn-options.sh +0 -63
  227. package/dist/scripts/test/test-cli-wizard.js +0 -331
  228. package/dist/scripts/test/test-comprehensive.js +0 -401
  229. package/dist/scripts/test/test-coordination-features.ts +0 -238
  230. package/dist/scripts/test/test-fallback-systems.js +0 -276
  231. package/dist/scripts/test/test-init-command.ts +0 -302
  232. package/dist/scripts/test/test-mcp.ts +0 -251
  233. package/dist/scripts/test/test-runner.ts +0 -568
  234. package/dist/scripts/test/test-swarm-integration.sh +0 -92
  235. package/dist/scripts/test/test-swarm.ts +0 -142
  236. package/dist/scripts/test/validation-summary.ts +0 -408
  237. package/dist/scripts/test-cleanup-performance.sh +0 -416
  238. package/dist/scripts/test-dashboard-auth.cjs +0 -203
  239. package/dist/scripts/test-docker-deployment.sh +0 -207
  240. package/dist/scripts/test-npm-package.cjs +0 -167
  241. package/dist/scripts/test-provider-routing.cjs +0 -226
  242. package/dist/scripts/test-routing-telemetry.cjs +0 -147
  243. package/dist/scripts/test-runner.cjs +0 -154
  244. package/dist/scripts/test-zai-10k.cjs +0 -81
  245. package/dist/scripts/test-zai-api.cjs +0 -191
  246. package/dist/scripts/test-zai-diagnostic.cjs +0 -151
  247. package/dist/scripts/test-zai-final.cjs +0 -128
  248. package/dist/scripts/test-zai-with-env.cjs +0 -85
  249. package/dist/scripts/toggle-cost-savings.cjs +0 -302
  250. package/dist/scripts/unified-memory-monitor.js +0 -526
  251. package/dist/scripts/utils/README.md +0 -261
  252. package/dist/scripts/utils/clean-build-artifacts.sh +0 -94
  253. package/dist/scripts/utils/cleanup-root.sh +0 -69
  254. package/dist/scripts/utils/fix-cliffy-imports.js +0 -307
  255. package/dist/scripts/utils/fix-duplicate-imports.js +0 -114
  256. package/dist/scripts/utils/fix-error-handling.cjs +0 -70
  257. package/dist/scripts/utils/fix-import-paths.js +0 -104
  258. package/dist/scripts/utils/fix-imports.js +0 -116
  259. package/dist/scripts/utils/fix-shebang.js +0 -78
  260. package/dist/scripts/utils/fix-test-modules.js +0 -27
  261. package/dist/scripts/utils/fix-timezone-issue-246.js +0 -200
  262. package/dist/scripts/utils/fix-ts-comprehensive.py +0 -182
  263. package/dist/scripts/utils/fix-ts-targeted-batch.js +0 -250
  264. package/dist/scripts/utils/remove-benchmark-conflicts.sh +0 -140
  265. package/dist/scripts/utils/simple-test-fixer.js +0 -190
  266. package/dist/scripts/utils/validate-metrics-structure.cjs +0 -144
  267. package/dist/scripts/validate-agent-hooks.js +0 -506
  268. package/dist/scripts/validate-changelog.js +0 -241
  269. package/dist/scripts/validate-coordination-cli.js +0 -69
  270. package/dist/scripts/validate-coordination-toggle-integration.cjs +0 -501
  271. package/dist/scripts/validate-docker-infrastructure.sh +0 -502
  272. package/dist/scripts/validate-entry-points.js +0 -300
  273. package/dist/scripts/validate-memory-monitoring.sh +0 -225
  274. package/dist/scripts/validate-stage3-performance.ts +0 -377
  275. package/dist/scripts/validate-template-bundling.js +0 -180
  276. package/dist/scripts/validation/README.md +0 -33
  277. package/dist/scripts/validation/acl-security-validation.cjs +0 -214
  278. package/dist/scripts/validation/acl-security-validation.js +0 -402
  279. package/dist/scripts/validation/byzantine-verification.js +0 -407
  280. package/dist/scripts/validation/final-phase-2-consensus.cjs +0 -219
  281. package/dist/scripts/validation/final-security-validation.js +0 -791
  282. package/dist/scripts/validation/final-wasm-validation.cjs +0 -840
  283. package/dist/scripts/validation/integration-test-analysis.js +0 -105
  284. package/dist/scripts/validation/phase-0-comprehensive-validation.js +0 -474
  285. package/dist/scripts/validation/phase-0-consensus-report.js +0 -139
  286. package/dist/scripts/validation/phase-0-final-report.js +0 -112
  287. package/dist/scripts/validation/phase-0-redis-consensus-report.js +0 -129
  288. package/dist/scripts/validation/phase-0-validation-improved.js +0 -490
  289. package/dist/scripts/validation/phase-0-validation-test.js +0 -65
  290. package/dist/scripts/validation/phase-1-consensus-report.cjs +0 -342
  291. package/dist/scripts/validation/phase-1-consensus-validation.cjs +0 -551
  292. package/dist/scripts/validation/phase-1-consensus-validation.js +0 -551
  293. package/dist/scripts/validation/phase-2-consensus-report.cjs +0 -186
  294. package/dist/scripts/validation/phase-2-validation.cjs +0 -171
  295. package/dist/scripts/validation/phase-2-validation.js +0 -171
  296. package/dist/scripts/validation/phase-4-consensus-report.js +0 -181
  297. package/dist/scripts/validation/phase-4-final-validation.js +0 -351
  298. package/dist/scripts/validation/phase-5-consensus-report.cjs +0 -113
  299. package/dist/scripts/validation/phase-5-consensus-report.js +0 -113
  300. package/dist/scripts/validation/security-analysis.js +0 -49
  301. package/dist/scripts/validation/security-validation.js +0 -492
  302. package/dist/scripts/validation/simple-security-validation.js +0 -464
  303. package/dist/scripts/verify-installation.js +0 -112
  304. package/dist/scripts/verify-mcp-server.js +0 -86
  305. package/dist/scripts/verify-sdk-phase1.cjs +0 -293
  306. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/browser/accessibilityService.js +0 -88
  307. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/common/accessibility.js +0 -9
  308. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/action.js +0 -7
  309. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/actionCommonCategories.js +0 -13
  310. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionList.js +0 -276
  311. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionWidget.js +0 -248
  312. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/common/actionWidget.js +0 -5
  313. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actions/common/actions.js +0 -409
  314. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/audioCues/browser/audioCueService.js +0 -176
  315. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/browser/clipboardService.js +0 -141
  316. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/common/clipboardService.js +0 -6
  317. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/commands/common/commands.js +0 -80
  318. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configuration.js +0 -86
  319. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationModels.js +0 -554
  320. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationRegistry.js +0 -317
  321. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurations.js +0 -41
  322. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/browser/contextKeyService.js +0 -432
  323. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkey.js +0 -1547
  324. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkeys.js +0 -18
  325. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuHandler.js +0 -124
  326. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuService.js +0 -101
  327. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextView.js +0 -7
  328. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextViewService.js +0 -72
  329. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dialogs/common/dialogs.js +0 -2
  330. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dnd/browser/dnd.js +0 -36
  331. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/editor/common/editor.js +0 -17
  332. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/environment/common/environment.js +0 -2
  333. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/extensions/common/extensions.js +0 -47
  334. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/files/common/files.js +0 -9
  335. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +0 -105
  336. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/descriptors.js +0 -11
  337. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/extensions.js +0 -15
  338. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/abstractKeybindingService.js +0 -277
  339. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -53
  340. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -354
  341. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/browser/defaultStyles.js +0 -162
  342. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/common/colorRegistry.js +0 -482
  343. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/abap/abap.js +0 -10
  344. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/apex/apex.js +0 -10
  345. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/azcli/azcli.js +0 -10
  346. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bat/bat.js +0 -10
  347. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bicep/bicep.js +0 -11
@@ -1,785 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Phase 2 Validation Script
4
- * Comprehensive validation of Phase 2 User Configuration System implementation
5
- *
6
- * Validates all critical requirements:
7
- * - Interactive setup wizard (<5 minute completion)
8
- * - Framework detection (>90% accuracy)
9
- * - CLI commands functionality
10
- * - Configuration persistence
11
- * - Byzantine security integration
12
- */
13
-
14
- import fs from 'fs/promises';
15
- import path from 'path';
16
- import { fileURLToPath } from 'url';
17
- import chalk from 'chalk';
18
- import { InteractiveSetupWizard } from '../src/validation/cli/interactive-setup-wizard.js';
19
- import { ValidationCommands } from '../src/validation/cli/validation-commands.js';
20
- import { FrameworkDetector } from '../src/completion/framework-detector.js';
21
- import { TruthConfigManager } from '../src/validation/truth-config-manager.js';
22
-
23
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
24
- const TEMP_TEST_DIR = path.join(__dirname, '..', 'temp-validation');
25
-
26
- class Phase2Validator {
27
- constructor() {
28
- this.results = {
29
- interactiveWizard: { passed: 0, failed: 0, tests: [] },
30
- frameworkDetection: { passed: 0, failed: 0, tests: [] },
31
- cliCommands: { passed: 0, failed: 0, tests: [] },
32
- configPersistence: { passed: 0, failed: 0, tests: [] },
33
- byzantineSecurity: { passed: 0, failed: 0, tests: [] },
34
- performance: { passed: 0, failed: 0, tests: [] }
35
- };
36
- }
37
-
38
- async runValidation() {
39
- console.log(chalk.blue.bold('🔍 Phase 2 User Configuration System Validation\n'));
40
-
41
- try {
42
- await this.setupTestEnvironment();
43
-
44
- await this.validateInteractiveWizard();
45
- await this.validateFrameworkDetection();
46
- await this.validateCLICommands();
47
- await this.validateConfigurationPersistence();
48
- await this.validateByzantineSecurity();
49
- await this.validatePerformanceRequirements();
50
-
51
- await this.cleanupTestEnvironment();
52
-
53
- this.displayResults();
54
-
55
- } catch (error) {
56
- console.error(chalk.red(`\n❌ Validation failed: ${error.message}`));
57
- process.exit(1);
58
- }
59
- }
60
-
61
- async setupTestEnvironment() {
62
- console.log(chalk.gray('🔧 Setting up test environment...'));
63
-
64
- await fs.rm(TEMP_TEST_DIR, { recursive: true, force: true });
65
- await fs.mkdir(TEMP_TEST_DIR, { recursive: true });
66
-
67
- console.log(chalk.green('✅ Test environment ready\n'));
68
- }
69
-
70
- async cleanupTestEnvironment() {
71
- console.log(chalk.gray('\n🧹 Cleaning up test environment...'));
72
- await fs.rm(TEMP_TEST_DIR, { recursive: true, force: true });
73
- }
74
-
75
- async validateInteractiveWizard() {
76
- console.log(chalk.blue('📋 Validating Interactive Setup Wizard'));
77
-
78
- await this.runTest('interactiveWizard', 'Wizard initialization', async () => {
79
- const projectDir = await this.createTestProject('javascript');
80
- const wizard = new InteractiveSetupWizard({ basePath: projectDir });
81
-
82
- // Should initialize without errors
83
- expect(wizard).toBeDefined();
84
- expect(wizard.basePath).toBe(projectDir);
85
-
86
- await wizard.cleanup();
87
- });
88
-
89
- await this.runTest('interactiveWizard', 'Setup completion time (<5 minutes)', async () => {
90
- const projectDir = await this.createTestProject('javascript');
91
- const wizard = new InteractiveSetupWizard({ basePath: projectDir });
92
-
93
- const startTime = Date.now();
94
-
95
- // Mock automated setup
96
- const result = await wizard.runSetupWizard({
97
- automated: true,
98
- inputs: {
99
- experienceLevel: 'novice',
100
- framework: 'javascript',
101
- autoHooks: true
102
- }
103
- });
104
-
105
- const setupTime = (Date.now() - startTime) / 1000;
106
-
107
- expect(result.success).toBe(true);
108
- expect(setupTime).toBeLessThan(300); // Less than 5 minutes
109
-
110
- await wizard.cleanup();
111
- });
112
-
113
- await this.runTest('interactiveWizard', 'Configuration file creation', async () => {
114
- const projectDir = await this.createTestProject('javascript');
115
- const wizard = new InteractiveSetupWizard({ basePath: projectDir });
116
-
117
- await wizard.runSetupWizard({
118
- automated: true,
119
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
120
- });
121
-
122
- const configPath = path.join(projectDir, '.swarm', 'user-preferences.json');
123
- const configExists = await this.fileExists(configPath);
124
-
125
- expect(configExists).toBe(true);
126
-
127
- const configContent = JSON.parse(await fs.readFile(configPath, 'utf8'));
128
- expect(configContent.experienceLevel).toBe('novice');
129
- expect(configContent.setupDate).toBeDefined();
130
-
131
- await wizard.cleanup();
132
- });
133
- }
134
-
135
- async validateFrameworkDetection() {
136
- console.log(chalk.blue('🔍 Validating Framework Detection (>90% accuracy requirement)'));
137
-
138
- await this.runTest('frameworkDetection', 'JavaScript detection accuracy', async () => {
139
- const projectDir = await this.createJavaScriptProject();
140
- const detector = new FrameworkDetector({ basePath: projectDir });
141
- await detector.initialize();
142
-
143
- const result = await detector.detectFramework();
144
-
145
- expect(result.detected).toBe('javascript');
146
- expect(result.confidence).toBeGreaterThan(0.9);
147
-
148
- await detector.close();
149
- });
150
-
151
- await this.runTest('frameworkDetection', 'TypeScript detection accuracy', async () => {
152
- const projectDir = await this.createTypeScriptProject();
153
- const detector = new FrameworkDetector({ basePath: projectDir });
154
- await detector.initialize();
155
-
156
- const result = await detector.detectFramework();
157
-
158
- expect(result.detected).toBe('typescript');
159
- expect(result.confidence).toBeGreaterThan(0.9);
160
-
161
- await detector.close();
162
- });
163
-
164
- await this.runTest('frameworkDetection', 'Python detection accuracy', async () => {
165
- const projectDir = await this.createPythonProject();
166
- const detector = new FrameworkDetector({ basePath: projectDir });
167
- await detector.initialize();
168
-
169
- const result = await detector.detectFramework();
170
-
171
- expect(result.detected).toBe('python');
172
- expect(result.confidence).toBeGreaterThan(0.9);
173
-
174
- await detector.close();
175
- });
176
-
177
- await this.runTest('frameworkDetection', 'React framework detection', async () => {
178
- const projectDir = await this.createReactProject();
179
- const detector = new FrameworkDetector({ basePath: projectDir });
180
- await detector.initialize();
181
-
182
- const result = await detector.detectFramework();
183
-
184
- expect(['javascript', 'typescript']).toContain(result.detected);
185
- expect(result.evidence.webFrameworks).toBeDefined();
186
- expect(result.evidence.webFrameworks.some(f => f.name === 'react')).toBe(true);
187
- expect(result.confidence).toBeGreaterThan(0.9);
188
-
189
- await detector.close();
190
- });
191
-
192
- await this.runTest('frameworkDetection', 'Detection performance', async () => {
193
- const projectDir = await this.createTypeScriptProject();
194
- const detector = new FrameworkDetector({ basePath: projectDir });
195
- await detector.initialize();
196
-
197
- const startTime = Date.now();
198
- const result = await detector.detectFramework();
199
- const detectionTime = Date.now() - startTime;
200
-
201
- expect(detectionTime).toBeLessThan(5000); // Less than 5 seconds
202
- expect(result.metadata.detectionTime).toBeLessThan(3000); // Less than 3 seconds
203
-
204
- await detector.close();
205
- });
206
- }
207
-
208
- async validateCLICommands() {
209
- console.log(chalk.blue('⚙️ Validating CLI Commands'));
210
-
211
- const testCommands = [
212
- 'setup', 'check', 'show-config', 'enable-hooks', 'disable-hooks',
213
- 'add-framework', 'configure-gates'
214
- ];
215
-
216
- for (const command of testCommands) {
217
- await this.runTest('cliCommands', `Command: ${command}`, async () => {
218
- const projectDir = await this.createTestProject('javascript');
219
- const commands = new ValidationCommands({ basePath: projectDir });
220
-
221
- let result;
222
-
223
- switch (command) {
224
- case 'setup':
225
- result = await commands.setupCommand({
226
- automated: true,
227
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
228
- });
229
- break;
230
-
231
- case 'show-config':
232
- // Setup first
233
- await commands.setupCommand({
234
- automated: true,
235
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
236
- });
237
- result = await commands.showConfigCommand();
238
- break;
239
-
240
- case 'check':
241
- // Setup first
242
- await commands.setupCommand({
243
- automated: true,
244
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
245
- });
246
- result = await commands.checkCommand();
247
- break;
248
-
249
- case 'enable-hooks':
250
- // Setup first
251
- await commands.setupCommand({
252
- automated: true,
253
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
254
- });
255
- result = await commands.enableHooksCommand();
256
- break;
257
-
258
- case 'disable-hooks':
259
- // Setup and enable first
260
- await commands.setupCommand({
261
- automated: true,
262
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
263
- });
264
- await commands.enableHooksCommand();
265
- result = await commands.disableHooksCommand();
266
- break;
267
-
268
- case 'add-framework':
269
- // Setup first
270
- await commands.setupCommand({
271
- automated: true,
272
- inputs: { experienceLevel: 'expert', framework: 'javascript' }
273
- });
274
- result = await commands.addFrameworkCommand({
275
- automated: true,
276
- inputs: {
277
- name: 'Test Framework',
278
- filePatterns: ['*.test'],
279
- testingFramework: 'unit',
280
- truthThreshold: 0.8
281
- }
282
- });
283
- break;
284
-
285
- case 'configure-gates':
286
- // Setup first
287
- await commands.setupCommand({
288
- automated: true,
289
- inputs: { experienceLevel: 'intermediate', framework: 'javascript' }
290
- });
291
- result = await commands.configureGatesCommand({
292
- automated: true,
293
- inputs: {
294
- truthScore: 0.85,
295
- testCoverage: 90,
296
- codeQuality: 'A',
297
- documentationCoverage: 80
298
- }
299
- });
300
- break;
301
- }
302
-
303
- expect(result).toBeDefined();
304
- if (result.success !== undefined) {
305
- expect(result.success).toBe(true);
306
- }
307
- });
308
- }
309
- }
310
-
311
- async validateConfigurationPersistence() {
312
- console.log(chalk.blue('💾 Validating Configuration Persistence'));
313
-
314
- await this.runTest('configPersistence', 'Configuration saves correctly', async () => {
315
- const projectDir = await this.createTestProject('javascript');
316
- const configManager = new TruthConfigManager({
317
- configDir: path.join(projectDir, '.swarm', 'configs')
318
- });
319
-
320
- await configManager.initialize();
321
-
322
- const config = await configManager.createFromFramework('TDD');
323
- const saveResult = await configManager.saveConfiguration(config, 'test_config');
324
-
325
- expect(saveResult.configId).toBeDefined();
326
- expect(saveResult.filepath).toBeDefined();
327
-
328
- const savedExists = await this.fileExists(saveResult.filepath);
329
- expect(savedExists).toBe(true);
330
-
331
- await configManager.cleanup();
332
- });
333
-
334
- await this.runTest('configPersistence', 'Configuration persists across sessions', async () => {
335
- const projectDir = await this.createTestProject('javascript');
336
-
337
- // First session - setup
338
- const commands1 = new ValidationCommands({ basePath: projectDir });
339
- const setupResult = await commands1.setupCommand({
340
- automated: true,
341
- inputs: { experienceLevel: 'intermediate', framework: 'javascript' }
342
- });
343
-
344
- expect(setupResult.success).toBe(true);
345
-
346
- // Second session - verify persistence
347
- const commands2 = new ValidationCommands({ basePath: projectDir });
348
- const configResult = await commands2.showConfigCommand();
349
-
350
- expect(configResult.success).toBe(true);
351
- expect(configResult.config.experienceLevel).toBe('intermediate');
352
- });
353
-
354
- await this.runTest('configPersistence', 'Configuration can be updated', async () => {
355
- const projectDir = await this.createTestProject('javascript');
356
- const commands = new ValidationCommands({ basePath: projectDir });
357
-
358
- // Initial setup
359
- await commands.setupCommand({
360
- automated: true,
361
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
362
- });
363
-
364
- // Update quality gates
365
- const updateResult = await commands.configureGatesCommand({
366
- automated: true,
367
- inputs: {
368
- truthScore: 0.95,
369
- testCoverage: 98,
370
- codeQuality: 'A',
371
- documentationCoverage: 90
372
- }
373
- });
374
-
375
- expect(updateResult.success).toBe(true);
376
-
377
- // Verify update persisted
378
- const configResult = await commands.showConfigCommand();
379
- expect(configResult.config.qualityGates.truthScore).toBe(0.95);
380
- });
381
- }
382
-
383
- async validateByzantineSecurity() {
384
- console.log(chalk.blue('🛡️ Validating Byzantine Security Integration'));
385
-
386
- await this.runTest('byzantineSecurity', 'Valid configurations pass Byzantine validation', async () => {
387
- const configManager = new TruthConfigManager({
388
- configDir: path.join(TEMP_TEST_DIR, 'byzantine-test')
389
- });
390
- await configManager.initialize();
391
-
392
- const config = await configManager.createFromFramework('TDD');
393
- const validation = await configManager.validateConfiguration(config);
394
-
395
- expect(validation.valid).toBe(true);
396
- expect(validation.byzantineFaultTolerant).toBe(true);
397
- expect(validation.validationId).toBeDefined();
398
-
399
- await configManager.cleanup();
400
- });
401
-
402
- await this.runTest('byzantineSecurity', 'Malicious patterns are detected', async () => {
403
- const configManager = new TruthConfigManager({
404
- configDir: path.join(TEMP_TEST_DIR, 'byzantine-test-malicious')
405
- });
406
- await configManager.initialize();
407
-
408
- // Create suspicious configuration
409
- const maliciousConfig = {
410
- framework: 'TDD',
411
- threshold: 0.05, // Suspiciously low
412
- weights: {
413
- agentReliability: 0.95, // Excessive concentration
414
- crossValidation: 0.01,
415
- externalVerification: 0.01,
416
- factualConsistency: 0.02,
417
- logicalCoherence: 0.01
418
- },
419
- checks: {
420
- historicalValidation: false,
421
- crossAgentValidation: false,
422
- externalValidation: false,
423
- logicalValidation: false,
424
- statisticalValidation: false
425
- },
426
- confidence: {
427
- level: 0.5,
428
- minSampleSize: 1,
429
- maxErrorMargin: 0.45
430
- }
431
- };
432
-
433
- const validation = await configManager.validateConfiguration(maliciousConfig);
434
-
435
- expect(validation.valid).toBe(false);
436
- expect(validation.byzantineFaultTolerant).toBe(false);
437
- expect(validation.warnings.length).toBeGreaterThan(0);
438
-
439
- await configManager.cleanup();
440
- });
441
-
442
- await this.runTest('byzantineSecurity', 'Configuration integrity checking', async () => {
443
- const configManager = new TruthConfigManager({
444
- configDir: path.join(TEMP_TEST_DIR, 'integrity-test')
445
- });
446
- await configManager.initialize();
447
-
448
- const config = await configManager.createFromFramework('SPARC');
449
- const hash1 = configManager.hashConfig(config);
450
-
451
- // Small delay to ensure different timestamp
452
- await new Promise(resolve => setTimeout(resolve, 10));
453
-
454
- const hash2 = configManager.hashConfig(config);
455
-
456
- expect(hash1).toBe(hash2); // Same config should produce same hash
457
-
458
- await configManager.cleanup();
459
- });
460
- }
461
-
462
- async validatePerformanceRequirements() {
463
- console.log(chalk.blue('🚀 Validating Performance Requirements'));
464
-
465
- await this.runTest('performance', 'Setup wizard completes in <5 minutes', async () => {
466
- const projectDir = await this.createTestProject('typescript');
467
- const wizard = new InteractiveSetupWizard({ basePath: projectDir });
468
-
469
- const startTime = Date.now();
470
-
471
- const result = await wizard.runSetupWizard({
472
- automated: true,
473
- inputs: {
474
- experienceLevel: 'intermediate',
475
- framework: 'typescript',
476
- customGates: true,
477
- truthScore: 0.85,
478
- testCoverage: 95
479
- }
480
- });
481
-
482
- const setupTime = (Date.now() - startTime) / 1000;
483
-
484
- expect(result.success).toBe(true);
485
- expect(setupTime).toBeLessThan(300); // Less than 5 minutes
486
- expect(setupTime).toBeLessThan(60); // Ideally less than 1 minute
487
-
488
- await wizard.cleanup();
489
- });
490
-
491
- await this.runTest('performance', 'Framework detection is fast', async () => {
492
- const projectDir = await this.createReactProject();
493
- const detector = new FrameworkDetector({ basePath: projectDir });
494
- await detector.initialize();
495
-
496
- const startTime = Date.now();
497
- const result = await detector.detectFramework();
498
- const detectionTime = Date.now() - startTime;
499
-
500
- expect(detectionTime).toBeLessThan(10000); // Less than 10 seconds
501
- expect(result.metadata.detectionTime).toBeLessThan(5000); // Less than 5 seconds
502
-
503
- await detector.close();
504
- });
505
-
506
- await this.runTest('performance', 'CLI commands respond quickly', async () => {
507
- const projectDir = await this.createTestProject('javascript');
508
- const commands = new ValidationCommands({ basePath: projectDir });
509
-
510
- // Setup first
511
- const setupStart = Date.now();
512
- await commands.setupCommand({
513
- automated: true,
514
- inputs: { experienceLevel: 'novice', framework: 'javascript' }
515
- });
516
- const setupTime = Date.now() - setupStart;
517
-
518
- // Test show-config performance
519
- const configStart = Date.now();
520
- await commands.showConfigCommand();
521
- const configTime = Date.now() - configStart;
522
-
523
- expect(setupTime).toBeLessThan(30000); // Less than 30 seconds for setup
524
- expect(configTime).toBeLessThan(2000); // Less than 2 seconds for show-config
525
- });
526
- }
527
-
528
- async runTest(category, testName, testFn) {
529
- try {
530
- await testFn();
531
- this.results[category].passed++;
532
- this.results[category].tests.push({ name: testName, status: 'PASS' });
533
- console.log(chalk.green(` ✅ ${testName}`));
534
- } catch (error) {
535
- this.results[category].failed++;
536
- this.results[category].tests.push({
537
- name: testName,
538
- status: 'FAIL',
539
- error: error.message
540
- });
541
- console.log(chalk.red(` ❌ ${testName}: ${error.message}`));
542
- }
543
- }
544
-
545
- displayResults() {
546
- console.log(chalk.blue.bold('\n📊 Validation Results Summary\n'));
547
-
548
- let totalPassed = 0;
549
- let totalFailed = 0;
550
-
551
- for (const [category, results] of Object.entries(this.results)) {
552
- const categoryName = category.replace(/([A-Z])/g, ' $1').replace(/^./, str => str.toUpperCase());
553
- const total = results.passed + results.failed;
554
-
555
- totalPassed += results.passed;
556
- totalFailed += results.failed;
557
-
558
- let status = '✅';
559
- if (results.failed > 0) {
560
- status = results.failed > results.passed ? '❌' : '⚠️';
561
- }
562
-
563
- console.log(`${status} ${chalk.bold(categoryName)}: ${chalk.green(results.passed)}/${total} passed`);
564
-
565
- if (results.failed > 0) {
566
- const failedTests = results.tests.filter(t => t.status === 'FAIL');
567
- failedTests.forEach(test => {
568
- console.log(chalk.red(` • ${test.name}: ${test.error}`));
569
- });
570
- }
571
- }
572
-
573
- console.log(chalk.blue('\n' + '='.repeat(50)));
574
- console.log(chalk.bold(`Total: ${chalk.green(totalPassed)} passed, ${totalFailed > 0 ? chalk.red(totalFailed) : '0'} failed`));
575
-
576
- // Phase 2 Critical Requirements Check
577
- const criticalRequirements = this.checkCriticalRequirements();
578
-
579
- console.log(chalk.blue.bold('\n🎯 Phase 2 Critical Requirements Status'));
580
- criticalRequirements.forEach(req => {
581
- const icon = req.met ? '✅' : '❌';
582
- const color = req.met ? chalk.green : chalk.red;
583
- console.log(`${icon} ${color(req.requirement)}`);
584
- });
585
-
586
- const allRequirementsMet = criticalRequirements.every(req => req.met);
587
-
588
- if (allRequirementsMet && totalFailed === 0) {
589
- console.log(chalk.green.bold('\n🎉 Phase 2 User Configuration System - VALIDATION PASSED!'));
590
- console.log(chalk.green('All critical requirements have been successfully implemented.'));
591
- process.exit(0);
592
- } else {
593
- console.log(chalk.red.bold('\n❌ Phase 2 User Configuration System - VALIDATION FAILED!'));
594
- console.log(chalk.red('Some critical requirements are not met or tests failed.'));
595
- process.exit(1);
596
- }
597
- }
598
-
599
- checkCriticalRequirements() {
600
- return [
601
- {
602
- requirement: 'Interactive setup wizard completes in <5 minutes for 95% of users',
603
- met: this.results.interactiveWizard.passed > 0 && this.results.performance.passed > 0
604
- },
605
- {
606
- requirement: 'Framework detection achieves >90% accuracy',
607
- met: this.results.frameworkDetection.passed >= 4 && this.results.frameworkDetection.failed === 0
608
- },
609
- {
610
- requirement: 'All essential CLI commands work with helpful error messages',
611
- met: this.results.cliCommands.passed >= 7 && this.results.cliCommands.failed === 0
612
- },
613
- {
614
- requirement: 'Custom framework support allows users to add frameworks',
615
- met: this.results.cliCommands.tests.some(t => t.name.includes('add-framework') && t.status === 'PASS')
616
- },
617
- {
618
- requirement: 'Configuration persistence works correctly across sessions',
619
- met: this.results.configPersistence.passed >= 2 && this.results.configPersistence.failed === 0
620
- },
621
- {
622
- requirement: 'Byzantine security prevents invalid configuration submissions',
623
- met: this.results.byzantineSecurity.passed >= 2 && this.results.byzantineSecurity.failed === 0
624
- }
625
- ];
626
- }
627
-
628
- // Test project creation methods
629
-
630
- async createTestProject(type) {
631
- const projectDir = path.join(TEMP_TEST_DIR, `${type}-${Date.now()}`);
632
- await fs.mkdir(projectDir, { recursive: true });
633
-
634
- switch (type) {
635
- case 'javascript':
636
- return await this.createJavaScriptProject(projectDir);
637
- case 'typescript':
638
- return await this.createTypeScriptProject(projectDir);
639
- case 'python':
640
- return await this.createPythonProject(projectDir);
641
- case 'react':
642
- return await this.createReactProject(projectDir);
643
- }
644
-
645
- return projectDir;
646
- }
647
-
648
- async createJavaScriptProject(dir = null) {
649
- if (!dir) {
650
- dir = path.join(TEMP_TEST_DIR, `js-${Date.now()}`);
651
- await fs.mkdir(dir, { recursive: true });
652
- }
653
-
654
- const packageJson = {
655
- name: 'test-js-project',
656
- version: '1.0.0',
657
- main: 'index.js',
658
- scripts: { test: 'jest' },
659
- devDependencies: { jest: '^29.0.0' }
660
- };
661
-
662
- await fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(packageJson, null, 2));
663
- await fs.writeFile(path.join(dir, 'index.js'), 'console.log("Hello World");');
664
-
665
- return dir;
666
- }
667
-
668
- async createTypeScriptProject(dir = null) {
669
- if (!dir) {
670
- dir = path.join(TEMP_TEST_DIR, `ts-${Date.now()}`);
671
- await fs.mkdir(dir, { recursive: true });
672
- }
673
-
674
- const packageJson = {
675
- name: 'test-ts-project',
676
- version: '1.0.0',
677
- devDependencies: {
678
- typescript: '^5.0.0',
679
- '@types/node': '^20.0.0',
680
- jest: '^29.0.0'
681
- }
682
- };
683
-
684
- const tsConfig = {
685
- compilerOptions: {
686
- target: 'ES2020',
687
- module: 'commonjs',
688
- strict: true
689
- }
690
- };
691
-
692
- await fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(packageJson, null, 2));
693
- await fs.writeFile(path.join(dir, 'tsconfig.json'), JSON.stringify(tsConfig, null, 2));
694
- await fs.writeFile(path.join(dir, 'index.ts'), 'const message: string = "Hello TypeScript";');
695
-
696
- return dir;
697
- }
698
-
699
- async createPythonProject(dir = null) {
700
- if (!dir) {
701
- dir = path.join(TEMP_TEST_DIR, `py-${Date.now()}`);
702
- await fs.mkdir(dir, { recursive: true });
703
- }
704
-
705
- await fs.writeFile(path.join(dir, 'requirements.txt'), 'pytest>=7.0.0\nrequests>=2.28.0');
706
- await fs.writeFile(path.join(dir, 'setup.py'), 'from setuptools import setup\nsetup(name="test")');
707
- await fs.writeFile(path.join(dir, 'main.py'), 'def hello():\n return "Hello Python"');
708
-
709
- return dir;
710
- }
711
-
712
- async createReactProject(dir = null) {
713
- if (!dir) {
714
- dir = path.join(TEMP_TEST_DIR, `react-${Date.now()}`);
715
- await fs.mkdir(dir, { recursive: true });
716
- }
717
-
718
- const packageJson = {
719
- name: 'test-react-project',
720
- version: '1.0.0',
721
- dependencies: {
722
- react: '^18.0.0',
723
- 'react-dom': '^18.0.0'
724
- }
725
- };
726
-
727
- await fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(packageJson, null, 2));
728
- await fs.mkdir(path.join(dir, 'src'), { recursive: true });
729
- await fs.writeFile(
730
- path.join(dir, 'src', 'App.jsx'),
731
- 'import React from "react";\nfunction App() { return <h1>Hello React</h1>; }\nexport default App;'
732
- );
733
-
734
- return dir;
735
- }
736
-
737
- async fileExists(filePath) {
738
- try {
739
- await fs.access(filePath);
740
- return true;
741
- } catch {
742
- return false;
743
- }
744
- }
745
- }
746
-
747
- // Simple expect implementation for testing
748
- global.expect = (actual) => ({
749
- toBe: (expected) => {
750
- if (actual !== expected) {
751
- throw new Error(`Expected ${expected}, got ${actual}`);
752
- }
753
- },
754
- toEqual: (expected) => {
755
- if (JSON.stringify(actual) !== JSON.stringify(expected)) {
756
- throw new Error(`Expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`);
757
- }
758
- },
759
- toBeDefined: () => {
760
- if (actual === undefined) {
761
- throw new Error('Expected value to be defined');
762
- }
763
- },
764
- toBeGreaterThan: (expected) => {
765
- if (actual <= expected) {
766
- throw new Error(`Expected ${actual} to be greater than ${expected}`);
767
- }
768
- },
769
- toBeLessThan: (expected) => {
770
- if (actual >= expected) {
771
- throw new Error(`Expected ${actual} to be less than ${expected}`);
772
- }
773
- },
774
- toContain: (expected) => {
775
- if (!actual.includes(expected)) {
776
- throw new Error(`Expected ${JSON.stringify(actual)} to contain ${expected}`);
777
- }
778
- }
779
- });
780
-
781
- // Run validation if this script is executed directly
782
- if (process.argv[1] === fileURLToPath(import.meta.url)) {
783
- const validator = new Phase2Validator();
784
- validator.runValidation().catch(console.error);
785
- }