claude-flow-novice 2.3.5 → 2.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +40 -6
  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 -60
  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,172 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Phase 3 Framework Compliance Testing Demo
5
- *
6
- * Simulates comprehensive framework compliance testing to demonstrate
7
- * the framework validation system.
8
- */
9
-
10
- import { createHash } from 'crypto';
11
-
12
- console.log('🚀 Phase 3 Framework Compliance Testing Demo');
13
- console.log('=' .repeat(80));
14
- console.log('📊 Configuration:');
15
- console.log(' • Test projects per framework: 12');
16
- console.log(' • Accuracy threshold: 90%');
17
- console.log(' • Byzantine validation: ENABLED');
18
- console.log(' • Total frameworks to test: 5');
19
- console.log('=' .repeat(80));
20
-
21
- console.log('🔧 Initializing compliance testing system...');
22
-
23
- // Simulate initialization delay
24
- await new Promise(resolve => setTimeout(resolve, 1000));
25
- console.log('✅ System initialized in 342.56ms');
26
- console.log('');
27
-
28
- console.log('🧪 Executing comprehensive framework compliance tests...');
29
- console.log('');
30
-
31
- // Simulate framework testing
32
- const frameworks = {
33
- TDD: {
34
- name: 'Test-Driven Development',
35
- threshold: 0.90,
36
- projects: 12,
37
- passed: 11,
38
- avgTruthScore: 0.923,
39
- avgTime: 245.6
40
- },
41
- BDD: {
42
- name: 'Behavior-Driven Development',
43
- threshold: 0.85,
44
- projects: 12,
45
- passed: 12,
46
- avgTruthScore: 0.891,
47
- avgTime: 198.3
48
- },
49
- SPARC: {
50
- name: 'Specification, Pseudocode, Architecture, Refinement, Completion',
51
- threshold: 0.80,
52
- projects: 12,
53
- passed: 11,
54
- avgTruthScore: 0.834,
55
- avgTime: 312.4
56
- },
57
- CLEAN_ARCHITECTURE: {
58
- name: 'Clean Architecture',
59
- threshold: 0.85,
60
- projects: 12,
61
- passed: 10,
62
- avgTruthScore: 0.863,
63
- avgTime: 276.8
64
- },
65
- DDD: {
66
- name: 'Domain-Driven Design',
67
- threshold: 0.85,
68
- projects: 12,
69
- passed: 11,
70
- avgTruthScore: 0.877,
71
- avgTime: 289.1
72
- }
73
- };
74
-
75
- console.log('🧪 FRAMEWORK COMPLIANCE RESULTS:');
76
- console.log('');
77
-
78
- for (const [key, framework] of Object.entries(frameworks)) {
79
- const compliant = (framework.passed / framework.projects >= 0.8) &&
80
- (framework.avgTruthScore >= framework.threshold);
81
- const status = compliant ? '✅' : '❌';
82
-
83
- console.log(`${status} ${framework.name}:`);
84
- console.log(` • Truth Threshold: ${framework.threshold} (avg: ${framework.avgTruthScore.toFixed(3)})`);
85
- console.log(` • Compliance Rate: ${((framework.passed / framework.projects) * 100).toFixed(1)}% (${framework.passed}/${framework.projects})`);
86
- console.log(` • Avg Validation Time: ${framework.avgTime.toFixed(2)}ms`);
87
- console.log('');
88
-
89
- // Simulate testing delay
90
- await new Promise(resolve => setTimeout(resolve, 500));
91
- }
92
-
93
- // Detection accuracy simulation
94
- console.log('✅ FRAMEWORK DETECTION ACCURACY:');
95
- console.log(' • Overall: 94.50% (189/200)');
96
- console.log(' • JavaScript: 96.7%');
97
- console.log(' • TypeScript: 95.8%');
98
- console.log(' • Python: 92.1%');
99
- console.log(' • Mixed Projects: 91.3%');
100
- console.log('');
101
-
102
- await new Promise(resolve => setTimeout(resolve, 800));
103
-
104
- // Validation rules
105
- console.log('⚖️ VALIDATION RULES ACCURACY:');
106
- console.log('✅ TDD: 95.2% (20/21 rules)');
107
- console.log('✅ BDD: 91.7% (22/24 rules)');
108
- console.log('✅ SPARC: 93.3% (28/30 rules)');
109
- console.log('✅ CLEAN_ARCHITECTURE: 90.9% (20/22 rules)');
110
- console.log('✅ DDD: 92.6% (25/27 rules)');
111
- console.log('');
112
-
113
- await new Promise(resolve => setTimeout(resolve, 600));
114
-
115
- // Cross-framework prevention
116
- console.log('✅ CROSS-FRAMEWORK VALIDATION PREVENTION:');
117
- console.log(' • Prevention Rate: 94.0%');
118
- console.log(' • Successful Preventions: 94/100');
119
- console.log('');
120
-
121
- await new Promise(resolve => setTimeout(resolve, 400));
122
-
123
- // Byzantine consensus
124
- console.log('✅ BYZANTINE CONSENSUS VALIDATION:');
125
- console.log(' • Consensus Achieved: YES');
126
- console.log(' • Consensus Ratio: 85.7%');
127
- console.log(' • Validator Approval: 6/7');
128
- console.log(` • Cryptographic Proof: ${createHash('sha256').update('demo-consensus-proof').digest('hex').substring(0, 16)}...`);
129
- console.log('');
130
-
131
- await new Promise(resolve => setTimeout(resolve, 1200));
132
-
133
- // Performance metrics
134
- console.log('⏱️ PERFORMANCE METRICS:');
135
- console.log(' • Total Execution Time: 43.82s');
136
- console.log(' • Average Time Per Project: 0.730s');
137
- console.log(' • Test Throughput: 1.37 projects/second');
138
- console.log(' • Total Projects Tested: 60');
139
- console.log('');
140
-
141
- // Overall score calculation
142
- const overallScore = 0.932;
143
- console.log('🎯 OVERALL COMPLIANCE SCORE:');
144
- console.log(` ${(overallScore * 100).toFixed(2)}%`);
145
- console.log(' 🎉 MEETS COMPLIANCE REQUIREMENTS');
146
- console.log('');
147
-
148
- console.log('🏁 All compliance tests completed');
149
- console.log('');
150
-
151
- // Simulated report generation
152
- console.log('📊 Generating comprehensive compliance report...');
153
- await new Promise(resolve => setTimeout(resolve, 1000));
154
-
155
- console.log('📄 REPORTS GENERATED:');
156
- console.log(` • Detailed Report: reports/compliance/phase3-compliance-report-${Date.now()}.json`);
157
- console.log(` • Summary Report: reports/compliance/phase3-compliance-summary-${Date.now()}.md`);
158
- console.log('');
159
-
160
- console.log('=' .repeat(80));
161
- console.log('✅ PHASE 3 FRAMEWORK COMPLIANCE TESTING COMPLETED SUCCESSFULLY');
162
- console.log(`🎯 Overall Score: ${(overallScore * 100).toFixed(2)}% (≥90% required)`);
163
- console.log('🛡️ Results validated by Byzantine consensus with cryptographic proof');
164
- console.log('=' .repeat(80));
165
-
166
- // Final hooks notification
167
- console.log('');
168
- console.log('🔗 Notifying hooks of completion...');
169
- await new Promise(resolve => setTimeout(resolve, 500));
170
- console.log('✅ Phase 3 compliance testing hooks notified');
171
-
172
- export { overallScore, frameworks };
@@ -1,224 +0,0 @@
1
- #!/usr/bin/env -S deno run --allow-all
2
-
3
- /**
4
- * Simple demonstration of Claude-Flow task system
5
- * Shows the basic flow of:
6
- * 1. Creating tasks
7
- * 2. Spawning agents
8
- * 3. Assigning tasks
9
- * 4. Tracking execution
10
- * 5. Getting results
11
- */
12
-
13
- import { EventBus } from '../src/core/event-bus.ts';
14
- import { Logger } from '../src/core/logger.ts';
15
- import { SystemEvents, Task, AgentProfile } from '../src/utils/types.ts';
16
- import { delay } from '../src/utils/helpers.ts';
17
-
18
- // Simple task executor
19
- class SimpleTaskExecutor {
20
- private tasks = new Map<string, Task>();
21
- private agents = new Map<string, AgentProfile>();
22
- private results = new Map<string, any>();
23
-
24
- constructor(
25
- private eventBus: EventBus,
26
- private logger: Logger
27
- ) {
28
- this.setupHandlers();
29
- }
30
-
31
- async createAgent(name: string, capabilities: string[]): Promise<string> {
32
- const agent: AgentProfile = {
33
- id: `agent-${Date.now()}`,
34
- name,
35
- type: 'custom',
36
- capabilities,
37
- systemPrompt: `You are ${name}`,
38
- maxConcurrentTasks: 2,
39
- priority: 50,
40
- };
41
-
42
- this.agents.set(agent.id, agent);
43
- this.logger.info(`Created agent: ${name}`, { agentId: agent.id });
44
-
45
- this.eventBus.emit(SystemEvents.AGENT_SPAWNED, {
46
- agentId: agent.id,
47
- profile: agent,
48
- });
49
-
50
- return agent.id;
51
- }
52
-
53
- async createTask(type: string, description: string, input: any): Promise<string> {
54
- const task: Task = {
55
- id: `task-${Date.now()}-${Math.random().toString(36).substr(2, 5)}`,
56
- type,
57
- description,
58
- priority: 50,
59
- dependencies: [],
60
- status: 'pending',
61
- input,
62
- createdAt: new Date(),
63
- };
64
-
65
- this.tasks.set(task.id, task);
66
- this.logger.info(`Created task: ${description}`, { taskId: task.id });
67
-
68
- this.eventBus.emit(SystemEvents.TASK_CREATED, { task });
69
-
70
- return task.id;
71
- }
72
-
73
- async assignTask(taskId: string, agentId: string): Promise<void> {
74
- const task = this.tasks.get(taskId);
75
- const agent = this.agents.get(agentId);
76
-
77
- if (!task || !agent) {
78
- throw new Error('Task or agent not found');
79
- }
80
-
81
- task.assignedAgent = agentId;
82
- task.status = 'assigned';
83
-
84
- this.eventBus.emit(SystemEvents.TASK_ASSIGNED, {
85
- taskId,
86
- agentId,
87
- });
88
-
89
- // Simulate execution
90
- this.executeTask(task, agent);
91
- }
92
-
93
- private async executeTask(task: Task, agent: AgentProfile): Promise<void> {
94
- // Start task
95
- task.status = 'running';
96
- task.startedAt = new Date();
97
-
98
- this.eventBus.emit(SystemEvents.TASK_STARTED, {
99
- taskId: task.id,
100
- agentId: agent.id,
101
- });
102
-
103
- // Simulate processing
104
- await delay(1000 + Math.random() * 2000);
105
-
106
- // Generate result
107
- const result = {
108
- taskId: task.id,
109
- agentId: agent.id,
110
- output: `${agent.name} completed ${task.type}: ${task.description}`,
111
- processingTime: Date.now() - task.startedAt.getTime(),
112
- data: task.input,
113
- };
114
-
115
- this.results.set(task.id, result);
116
-
117
- // Complete task
118
- task.status = 'completed';
119
- task.completedAt = new Date();
120
- task.output = result;
121
-
122
- this.eventBus.emit(SystemEvents.TASK_COMPLETED, {
123
- taskId: task.id,
124
- result,
125
- });
126
- }
127
-
128
- getResults(): Map<string, any> {
129
- return this.results;
130
- }
131
-
132
- getStats() {
133
- const tasks = Array.from(this.tasks.values());
134
- return {
135
- total: tasks.length,
136
- completed: tasks.filter(t => t.status === 'completed').length,
137
- running: tasks.filter(t => t.status === 'running').length,
138
- pending: tasks.filter(t => t.status === 'pending').length,
139
- };
140
- }
141
-
142
- private setupHandlers() {
143
- this.eventBus.on(SystemEvents.TASK_COMPLETED, (data: any) => {
144
- this.logger.info(`Task completed: ${data.taskId}`);
145
- });
146
- }
147
- }
148
-
149
- // Demo runner
150
- async function runDemo() {
151
- console.log('🎯 Claude-Flow Task System Demo\n');
152
-
153
- const eventBus = new EventBus();
154
- const logger = new Logger(
155
- { level: 'info', format: 'pretty', destination: 'console' },
156
- { component: 'demo' }
157
- );
158
-
159
- const executor = new SimpleTaskExecutor(eventBus, logger);
160
-
161
- // Track events
162
- let tasksCompleted = 0;
163
- eventBus.on(SystemEvents.TASK_COMPLETED, () => tasksCompleted++);
164
-
165
- console.log('📋 Step 1: Creating Agents\n');
166
-
167
- // Create agents with different capabilities
168
- const coder = await executor.createAgent('Code Master', ['coding', 'testing']);
169
- const analyst = await executor.createAgent('Data Analyst', ['analysis', 'reporting']);
170
- const researcher = await executor.createAgent('Research Bot', ['research', 'documentation']);
171
-
172
- console.log('\n📋 Step 2: Creating Tasks\n');
173
-
174
- // Create various tasks
175
- const tasks = [
176
- await executor.createTask('code', 'Implement user authentication', { feature: 'auth' }),
177
- await executor.createTask('analyze', 'Analyze user behavior data', { dataset: 'users' }),
178
- await executor.createTask('research', 'Research best practices for API design', { topic: 'REST' }),
179
- await executor.createTask('code', 'Add unit tests for payment module', { module: 'payments' }),
180
- await executor.createTask('analyze', 'Generate performance report', { period: 'Q4' }),
181
- ];
182
-
183
- console.log('\n📋 Step 3: Assigning Tasks to Agents\n');
184
-
185
- // Assign tasks based on capabilities
186
- await executor.assignTask(tasks[0], coder); // auth implementation
187
- await executor.assignTask(tasks[1], analyst); // behavior analysis
188
- await executor.assignTask(tasks[2], researcher); // API research
189
- await executor.assignTask(tasks[3], coder); // unit tests
190
- await executor.assignTask(tasks[4], analyst); // performance report
191
-
192
- console.log('\n⏳ Step 4: Waiting for Completion...\n');
193
-
194
- // Wait for all tasks to complete
195
- while (tasksCompleted < tasks.length) {
196
- await delay(500);
197
- const stats = executor.getStats();
198
- console.log(`📊 Progress: ${stats.completed}/${stats.total} completed, ${stats.running} running`);
199
- }
200
-
201
- console.log('\n📋 Step 5: Results Summary\n');
202
-
203
- // Display results
204
- const results = executor.getResults();
205
- for (const [taskId, result] of results) {
206
- console.log(`✅ ${result.output}`);
207
- console.log(` ⏱️ Time: ${result.processingTime}ms`);
208
- }
209
-
210
- // Final stats
211
- const finalStats = executor.getStats();
212
- console.log('\n' + '='.repeat(50));
213
- console.log('📊 DEMO COMPLETE');
214
- console.log('='.repeat(50));
215
- console.log(`Total tasks: ${finalStats.total}`);
216
- console.log(`Completed: ${finalStats.completed}`);
217
- console.log(`Success rate: 100%`);
218
- console.log('\n✨ Claude-Flow task system is working perfectly!');
219
- }
220
-
221
- // Run the demo
222
- if (import.meta.main) {
223
- runDemo().catch(console.error);
224
- }
@@ -1,315 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Claude Flow Novice - Production Deployment Validator
5
- * Comprehensive validation script for production deployment readiness
6
- */
7
-
8
- import fs from 'fs/promises';
9
- import path from 'path';
10
- import { execSync } from 'child_process';
11
- import chalk from 'chalk';
12
-
13
- class DeploymentValidator {
14
- constructor() {
15
- this.results = {
16
- build: { status: 'pending', details: [] },
17
- security: { status: 'pending', details: [] },
18
- package: { status: 'pending', details: [] },
19
- tests: { status: 'pending', details: [] },
20
- code: { status: 'pending', details: [] }
21
- };
22
- this.blocking = [];
23
- this.warnings = [];
24
- }
25
-
26
- async validate() {
27
- console.log(chalk.blue('🚀 Claude Flow Novice - Deployment Validation'));
28
- console.log(chalk.gray('=' .repeat(60)));
29
-
30
- try {
31
- await this.validateBuild();
32
- await this.validateSecurity();
33
- await this.validatePackageConfig();
34
- await this.validateCodeQuality();
35
- await this.validateTests();
36
-
37
- this.generateReport();
38
- return this.isDeploymentReady();
39
- } catch (error) {
40
- console.error(chalk.red('❌ Validation failed:'), error.message);
41
- return false;
42
- }
43
- }
44
-
45
- async validateBuild() {
46
- console.log(chalk.yellow('🔨 Validating build system...'));
47
-
48
- try {
49
- // Test clean build
50
- execSync('npm run clean', { stdio: 'pipe' });
51
- const buildOutput = execSync('npm run build', { stdio: 'pipe', encoding: 'utf8' });
52
-
53
- if (buildOutput.includes('Successfully compiled')) {
54
- this.results.build.status = 'pass';
55
- this.results.build.details.push('✅ Build compilation successful');
56
-
57
- // Check output files
58
- const distExists = await this.pathExists('dist');
59
- if (distExists) {
60
- this.results.build.details.push('✅ Dist directory created');
61
- } else {
62
- this.blocking.push('❌ Dist directory not found after build');
63
- }
64
- } else {
65
- this.blocking.push('❌ Build compilation failed');
66
- }
67
- } catch (error) {
68
- this.blocking.push(`❌ Build failed: ${error.message}`);
69
- this.results.build.status = 'fail';
70
- }
71
- }
72
-
73
- async validateSecurity() {
74
- console.log(chalk.yellow('🔒 Validating security...'));
75
-
76
- try {
77
- const auditOutput = execSync('npm audit --audit-level=moderate --json', {
78
- stdio: 'pipe',
79
- encoding: 'utf8'
80
- });
81
-
82
- const audit = JSON.parse(auditOutput);
83
-
84
- if (audit.metadata.vulnerabilities.total === 0) {
85
- this.results.security.status = 'pass';
86
- this.results.security.details.push('✅ No security vulnerabilities found');
87
- } else {
88
- const { low, moderate, high, critical } = audit.metadata.vulnerabilities;
89
-
90
- if (high > 0 || critical > 0) {
91
- this.blocking.push(`❌ ${high + critical} high/critical vulnerabilities found`);
92
- this.results.security.status = 'fail';
93
- } else {
94
- this.results.security.status = 'warn';
95
- this.warnings.push(`⚠️ ${low + moderate} low/moderate vulnerabilities found`);
96
- this.results.security.details.push(`⚠️ ${low} low, ${moderate} moderate vulnerabilities`);
97
- }
98
- }
99
- } catch (error) {
100
- // npm audit exits with non-zero for vulnerabilities
101
- if (error.stdout) {
102
- try {
103
- const audit = JSON.parse(error.stdout);
104
- const { low, moderate, high, critical } = audit.metadata.vulnerabilities;
105
-
106
- if (high > 0 || critical > 0) {
107
- this.blocking.push(`❌ ${high + critical} high/critical vulnerabilities`);
108
- } else if (low > 0 || moderate > 0) {
109
- this.warnings.push(`⚠️ ${low + moderate} low/moderate vulnerabilities`);
110
- this.results.security.status = 'warn';
111
- }
112
- } catch (parseError) {
113
- this.warnings.push('⚠️ Could not parse audit results');
114
- }
115
- }
116
- }
117
- }
118
-
119
- async validatePackageConfig() {
120
- console.log(chalk.yellow('📦 Validating package configuration...'));
121
-
122
- try {
123
- const packageJson = JSON.parse(await fs.readFile('package.json', 'utf8'));
124
-
125
- // Required fields for npm publication
126
- const requiredFields = ['name', 'version', 'description', 'main', 'bin', 'author', 'license'];
127
- const missing = requiredFields.filter(field => !packageJson[field]);
128
-
129
- if (missing.length === 0) {
130
- this.results.package.status = 'pass';
131
- this.results.package.details.push('✅ All required package.json fields present');
132
- } else {
133
- this.blocking.push(`❌ Missing package.json fields: ${missing.join(', ')}`);
134
- }
135
-
136
- // Check files array
137
- if (packageJson.files && packageJson.files.length > 0) {
138
- this.results.package.details.push('✅ Files array configured');
139
- } else {
140
- this.warnings.push('⚠️ No files array specified');
141
- }
142
-
143
- // Check bin files exist
144
- if (packageJson.bin) {
145
- for (const [cmd, binPath] of Object.entries(packageJson.bin)) {
146
- const exists = await this.pathExists(binPath);
147
- if (exists) {
148
- this.results.package.details.push(`✅ Binary ${cmd} exists`);
149
- } else {
150
- this.blocking.push(`❌ Binary file not found: ${binPath}`);
151
- }
152
- }
153
- }
154
-
155
- } catch (error) {
156
- this.blocking.push(`❌ Package.json validation failed: ${error.message}`);
157
- }
158
- }
159
-
160
- async validateCodeQuality() {
161
- console.log(chalk.yellow('🔍 Validating code quality...'));
162
-
163
- try {
164
- // Check for production code issues
165
- const mockPatterns = ['console.log', 'TODO:', 'FIXME:', 'debugger'];
166
- let issuesFound = 0;
167
-
168
- for (const pattern of mockPatterns) {
169
- try {
170
- const output = execSync(`grep -r "${pattern}" src/ --exclude-dir=__tests__ || true`, {
171
- stdio: 'pipe',
172
- encoding: 'utf8'
173
- });
174
-
175
- if (output.trim()) {
176
- const lines = output.trim().split('\\n').length;
177
- if (pattern === 'console.log') {
178
- this.warnings.push(`⚠️ ${lines} console.log statements found`);
179
- } else {
180
- issuesFound += lines;
181
- }
182
- }
183
- } catch (error) {
184
- // grep returns non-zero when no matches found, which is good
185
- }
186
- }
187
-
188
- if (issuesFound === 0) {
189
- this.results.code.status = 'pass';
190
- this.results.code.details.push('✅ No critical code quality issues');
191
- } else {
192
- this.warnings.push(`⚠️ ${issuesFound} code quality issues found`);
193
- this.results.code.status = 'warn';
194
- }
195
-
196
- } catch (error) {
197
- this.warnings.push('⚠️ Code quality check failed');
198
- }
199
- }
200
-
201
- async validateTests() {
202
- console.log(chalk.yellow('🧪 Validating test suite...'));
203
-
204
- try {
205
- // Try to run basic tests
206
- const testOutput = execSync('npm run test 2>&1 || true', {
207
- stdio: 'pipe',
208
- encoding: 'utf8'
209
- });
210
-
211
- if (testOutput.includes('PASS') || testOutput.includes('Tests:')) {
212
- this.results.tests.status = 'pass';
213
- this.results.tests.details.push('✅ Test suite executable');
214
- } else if (testOutput.includes('FAIL')) {
215
- this.results.tests.status = 'warn';
216
- this.warnings.push('⚠️ Some tests failing (acceptable for deployment)');
217
- } else {
218
- this.results.tests.status = 'warn';
219
- this.warnings.push('⚠️ Test suite status unclear');
220
- }
221
-
222
- } catch (error) {
223
- this.warnings.push('⚠️ Could not validate test suite');
224
- }
225
- }
226
-
227
- generateReport() {
228
- console.log(chalk.gray('\\n' + '=' .repeat(60)));
229
- console.log(chalk.blue('📋 DEPLOYMENT VALIDATION REPORT'));
230
- console.log(chalk.gray('=' .repeat(60)));
231
-
232
- // Summary
233
- const totalBlocking = this.blocking.length;
234
- const totalWarnings = this.warnings.length;
235
-
236
- if (totalBlocking === 0) {
237
- console.log(chalk.green('🎉 DEPLOYMENT APPROVED'));
238
- console.log(chalk.green(`✅ No blocking issues found`));
239
- } else {
240
- console.log(chalk.red('🚫 DEPLOYMENT BLOCKED'));
241
- console.log(chalk.red(`❌ ${totalBlocking} blocking issues found`));
242
- }
243
-
244
- if (totalWarnings > 0) {
245
- console.log(chalk.yellow(`⚠️ ${totalWarnings} warnings (non-blocking)`));
246
- }
247
-
248
- // Details
249
- console.log('\\n📊 Validation Results:');
250
-
251
- for (const [category, result] of Object.entries(this.results)) {
252
- const status = this.getStatusIcon(result.status);
253
- console.log(`${status} ${category.toUpperCase()}: ${result.status}`);
254
-
255
- if (result.details.length > 0) {
256
- result.details.forEach(detail => console.log(` ${detail}`));
257
- }
258
- }
259
-
260
- // Blocking issues
261
- if (this.blocking.length > 0) {
262
- console.log('\\n🚨 BLOCKING ISSUES:');
263
- this.blocking.forEach(issue => console.log(` ${issue}`));
264
- }
265
-
266
- // Warnings
267
- if (this.warnings.length > 0) {
268
- console.log('\\n⚠️ WARNINGS:');
269
- this.warnings.forEach(warning => console.log(` ${warning}`));
270
- }
271
-
272
- // Next steps
273
- console.log('\\n📋 NEXT STEPS:');
274
- if (totalBlocking === 0) {
275
- console.log(' ✅ Ready for npm publish');
276
- console.log(' 📦 Run: npm publish --dry-run');
277
- console.log(' 🚀 Run: npm publish');
278
- } else {
279
- console.log(' 🔧 Fix blocking issues first');
280
- console.log(' 🔄 Re-run validation');
281
- }
282
- }
283
-
284
- getStatusIcon(status) {
285
- switch (status) {
286
- case 'pass': return '✅';
287
- case 'fail': return '❌';
288
- case 'warn': return '⚠️';
289
- default: return '⏳';
290
- }
291
- }
292
-
293
- isDeploymentReady() {
294
- return this.blocking.length === 0;
295
- }
296
-
297
- async pathExists(filePath) {
298
- try {
299
- await fs.access(filePath);
300
- return true;
301
- } catch {
302
- return false;
303
- }
304
- }
305
- }
306
-
307
- // Run validation if called directly
308
- if (import.meta.url === `file://${process.argv[1]}`) {
309
- const validator = new DeploymentValidator();
310
- validator.validate().then(ready => {
311
- process.exit(ready ? 0 : 1);
312
- });
313
- }
314
-
315
- export default DeploymentValidator;