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,832 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Main Setup Script for Claude Flow Novice
5
- * Automated installation and configuration orchestration
6
- */
7
-
8
- import { existsSync, writeFileSync, mkdirSync, readFileSync, chmodSync } from 'fs';
9
- import { join, dirname, resolve } from 'path';
10
- import { homedir, platform, arch } from 'os';
11
- import { execSync, spawn } from 'child_process';
12
- import { createInterface } from 'readline';
13
- import chalk from 'chalk';
14
- import ora from 'ora';
15
- import boxen from 'boxen';
16
- import { fileURLToPath } from 'url';
17
-
18
- const __filename = fileURLToPath(import.meta.url);
19
- const __dirname = dirname(__filename);
20
-
21
- class SetupManager {
22
- constructor() {
23
- this.rootDir = resolve(__dirname, '../..');
24
- this.configDir = join(this.rootDir, 'config');
25
- this.scriptsDir = join(this.rootDir, 'scripts');
26
- this.nodeModulesDir = join(this.rootDir, 'node_modules');
27
- this.platform = platform();
28
- this.arch = arch();
29
- this.spinner = ora();
30
- this.rl = createInterface({
31
- input: process.stdin,
32
- output: process.stdout
33
- });
34
- this.setupLog = [];
35
- this.rollbackStack = [];
36
- }
37
-
38
- async run(options = {}) {
39
- console.log(boxen(
40
- chalk.cyan.bold('šŸš€ Claude Flow Novice - Automated Setup'),
41
- {
42
- padding: 1,
43
- borderColor: 'cyan',
44
- borderStyle: 'round'
45
- }
46
- ));
47
-
48
- console.log(chalk.yellow('\nšŸŽÆ Starting automated installation and setup...\n'));
49
-
50
- try {
51
- // Step 1: Check prerequisites
52
- await this.checkPrerequisites(options.skipPrerequisites);
53
-
54
- // Step 2: Load or create configuration
55
- await this.loadOrCreateConfiguration(options.interactive !== false);
56
-
57
- // Step 3: Install dependencies
58
- await this.installDependencies(options.skipDeps);
59
-
60
- // Step 4: Setup Redis
61
- await this.setupRedis();
62
-
63
- // Step 5: Create configuration files
64
- await this.createConfigurationFiles();
65
-
66
- // Step 6: Setup development environment
67
- await this.setupDevelopmentEnvironment();
68
-
69
- // Step 7: Validate installation
70
- await this.validateInstallation();
71
-
72
- // Step 8: Create startup scripts
73
- await this.createStartupScripts();
74
-
75
- this.displaySuccessMessage();
76
- this.logSetupCompletion();
77
-
78
- } catch (error) {
79
- console.error(chalk.red('\nāŒ Setup failed:'), error.message);
80
- this.logError(error);
81
-
82
- if (options.autoRollback !== false) {
83
- const shouldRollback = await this.promptRollback();
84
- if (shouldRollback) {
85
- await this.performRollback();
86
- }
87
- }
88
-
89
- process.exit(1);
90
- } finally {
91
- this.rl.close();
92
- }
93
- }
94
-
95
- async checkPrerequisites(skip = false) {
96
- if (skip) {
97
- console.log(chalk.yellow('āš ļø Skipping prerequisites check'));
98
- return;
99
- }
100
-
101
- this.spinner.start('Checking system prerequisites...');
102
-
103
- try {
104
- // Import and run prerequisites checker
105
- const { default: PrerequisitesChecker } = await import('./check-prerequisites.js');
106
- const checker = new PrerequisitesChecker();
107
- const passed = await checker.checkAll();
108
-
109
- if (!passed) {
110
- this.spinner.fail('Prerequisites check failed');
111
- throw new Error('System prerequisites not met. Please resolve the issues and try again.');
112
- }
113
-
114
- this.spinner.succeed('Prerequisites check passed');
115
- this.addLog('Prerequisites validation completed successfully');
116
- } catch (error) {
117
- this.spinner.fail('Prerequisites check failed');
118
- throw error;
119
- }
120
- }
121
-
122
- async loadOrCreateConfiguration(interactive = true) {
123
- this.spinner.start('Loading configuration...');
124
-
125
- try {
126
- const configPath = join(this.configDir, 'claude-flow-config.json');
127
-
128
- if (existsSync(configPath) && !interactive) {
129
- // Load existing configuration
130
- const configData = readFileSync(configPath, 'utf8');
131
- this.config = JSON.parse(configData);
132
- this.spinner.succeed('Configuration loaded from existing file');
133
- } else {
134
- this.spinner.stop();
135
-
136
- if (interactive) {
137
- // Run configuration wizard
138
- console.log(chalk.blue('\nšŸ“ Running configuration wizard...\n'));
139
- const { default: ConfigWizard } = await import('./config-wizard.js');
140
- const wizard = new ConfigWizard();
141
- await wizard.run();
142
-
143
- // Load the generated configuration
144
- const configData = readFileSync(configPath, 'utf8');
145
- this.config = JSON.parse(configData);
146
- } else {
147
- // Use default configuration
148
- this.config = this.getDefaultConfiguration();
149
- await this.saveConfiguration(this.config);
150
- console.log(chalk.green('āœ… Using default configuration'));
151
- }
152
- }
153
-
154
- this.addLog('Configuration loaded successfully');
155
- } catch (error) {
156
- this.spinner.fail('Configuration setup failed');
157
- throw error;
158
- }
159
- }
160
-
161
- getDefaultConfiguration() {
162
- return {
163
- basic: {
164
- environment: 'development',
165
- projectName: 'claude-flow-novice-project',
166
- projectDescription: 'AI agent orchestration project',
167
- author: 'Developer',
168
- logLevel: 'info'
169
- },
170
- redis: {
171
- useRedis: true,
172
- redisType: 'local',
173
- redisHost: 'localhost',
174
- redisPort: '6379',
175
- redisPassword: '',
176
- installRedis: true
177
- },
178
- swarm: {
179
- maxAgents: '10',
180
- swarmStrategy: 'development',
181
- swarmMode: 'mesh',
182
- enablePersistence: true,
183
- consensusThreshold: '0.90',
184
- enableRealTime: true
185
- },
186
- security: {
187
- enableAuth: false,
188
- enableRateLimit: true,
189
- rateLimitWindow: '15',
190
- rateLimitMax: '100',
191
- enableCORS: true
192
- },
193
- development: {
194
- enableHotReload: true,
195
- enableDebugMode: true,
196
- enableTestMode: false,
197
- devServerPort: '3000',
198
- enableMockData: false,
199
- databaseType: 'sqlite'
200
- },
201
- monitoring: {
202
- enableMetrics: true,
203
- enableHealthChecks: true,
204
- enableAlerts: true,
205
- healthCheckInterval: '30',
206
- logFormat: 'json',
207
- enableDashboard: true
208
- }
209
- };
210
- }
211
-
212
- async saveConfiguration(config) {
213
- const configPath = join(this.configDir, 'claude-flow-config.json');
214
- if (!existsSync(this.configDir)) {
215
- mkdirSync(this.configDir, { recursive: true });
216
- }
217
- writeFileSync(configPath, JSON.stringify(config, null, 2));
218
- this.config = config;
219
- }
220
-
221
- async installDependencies(skip = false) {
222
- if (skip) {
223
- console.log(chalk.yellow('āš ļø Skipping dependency installation'));
224
- return;
225
- }
226
-
227
- this.spinner.start('Installing dependencies...');
228
-
229
- try {
230
- // Check if node_modules exists
231
- if (!existsSync(this.nodeModulesDir)) {
232
- this.addRollbackAction(() => {
233
- if (existsSync(this.nodeModulesDir)) {
234
- execSync(`rm -rf "${this.nodeModulesDir}"`, { cwd: this.rootDir });
235
- }
236
- });
237
- }
238
-
239
- // Install npm dependencies
240
- execSync('npm install', {
241
- cwd: this.rootDir,
242
- stdio: 'pipe',
243
- encoding: 'utf8'
244
- });
245
-
246
- this.spinner.succeed('Dependencies installed successfully');
247
- this.addLog('Dependencies installed successfully');
248
- } catch (error) {
249
- this.spinner.fail('Dependency installation failed');
250
- throw new Error(`Failed to install dependencies: ${error.message}`);
251
- }
252
- }
253
-
254
- async setupRedis() {
255
- if (!this.config.redis.useRedis) {
256
- console.log(chalk.yellow('āš ļø Redis configuration disabled'));
257
- return;
258
- }
259
-
260
- this.spinner.start('Setting up Redis...');
261
-
262
- try {
263
- if (this.config.redis.redisType === 'local' && this.config.redis.installRedis) {
264
- await this.installRedisLocally();
265
- }
266
-
267
- // Test Redis connection
268
- if (this.config.redis.redisType !== 'cloud') {
269
- await this.testRedisConnection();
270
- }
271
-
272
- this.spinner.succeed('Redis setup completed');
273
- this.addLog('Redis setup completed successfully');
274
- } catch (error) {
275
- this.spinner.fail('Redis setup failed');
276
- throw new Error(`Redis setup failed: ${error.message}`);
277
- }
278
- }
279
-
280
- async installRedisLocally() {
281
- try {
282
- // Check if Redis is already installed
283
- execSync('redis-server --version', { encoding: 'utf8', stdio: 'pipe' });
284
- console.log(chalk.green('Redis is already installed'));
285
- return;
286
- } catch {
287
- // Redis not installed, proceed with installation
288
- }
289
-
290
- console.log(chalk.blue('Installing Redis locally...'));
291
-
292
- if (this.platform === 'win32') {
293
- await this.installRedisWindows();
294
- } else if (this.platform === 'darwin') {
295
- await this.installRedisMacOS();
296
- } else if (this.platform === 'linux') {
297
- await this.installRedisLinux();
298
- } else {
299
- throw new Error(`Unsupported platform for Redis installation: ${this.platform}`);
300
- }
301
-
302
- this.addRollbackAction(() => {
303
- // Add Redis uninstallation logic if needed
304
- console.log('Note: Redis uninstallation may require manual intervention');
305
- });
306
- }
307
-
308
- async installRedisWindows() {
309
- console.log(chalk.yellow('Windows Redis installation...'));
310
- console.log('Please download and install Redis from: https://github.com/microsoftarchive/redis/releases');
311
-
312
- const { confirm } = await this.prompt('\nHave you installed Redis manually?', { default: false });
313
- if (!confirm) {
314
- throw new Error('Redis installation required for Windows');
315
- }
316
- }
317
-
318
- async installRedisMacOS() {
319
- try {
320
- // Try Homebrew installation
321
- execSync('brew install redis', { stdio: 'pipe' });
322
- console.log(chalk.green('āœ… Redis installed via Homebrew'));
323
- } catch {
324
- console.log(chalk.yellow('Homebrew not available. Please install Redis manually:'));
325
- console.log('brew install redis');
326
- throw new Error('Redis installation failed');
327
- }
328
- }
329
-
330
- async installRedisLinux() {
331
- try {
332
- // Try apt-get (Ubuntu/Debian)
333
- execSync('sudo apt-get update && sudo apt-get install -y redis-server', { stdio: 'pipe' });
334
- console.log(chalk.green('āœ… Redis installed via apt-get'));
335
- } catch {
336
- try {
337
- // Try yum (CentOS/RHEL)
338
- execSync('sudo yum install -y redis', { stdio: 'pipe' });
339
- console.log(chalk.green('āœ… Redis installed via yum'));
340
- } catch {
341
- console.log(chalk.yellow('Please install Redis manually:'));
342
- console.log('Ubuntu/Debian: sudo apt-get install redis-server');
343
- console.log('CentOS/RHEL: sudo yum install redis');
344
- throw new Error('Redis installation failed');
345
- }
346
- }
347
- }
348
-
349
- async testRedisConnection() {
350
- try {
351
- execSync('redis-cli ping', { encoding: 'utf8', timeout: 5000, stdio: 'pipe' });
352
- console.log(chalk.green('āœ… Redis connection successful'));
353
- } catch {
354
- console.log(chalk.yellow('Starting Redis server...'));
355
- try {
356
- // Try to start Redis server
357
- spawn('redis-server', { detached: true });
358
- // Give it a moment to start
359
- await new Promise(resolve => setTimeout(resolve, 2000));
360
-
361
- // Test connection again
362
- execSync('redis-cli ping', { encoding: 'utf8', timeout: 5000, stdio: 'pipe' });
363
- console.log(chalk.green('āœ… Redis server started and connection successful'));
364
- } catch (error) {
365
- throw new Error('Failed to start Redis server');
366
- }
367
- }
368
- }
369
-
370
- async createConfigurationFiles() {
371
- this.spinner.start('Creating configuration files...');
372
-
373
- try {
374
- // Create .env file
375
- const envContent = this.generateEnvContent();
376
- writeFileSync(join(this.rootDir, '.env'), envContent);
377
-
378
- // Create .env.example
379
- const exampleContent = this.generateEnvExampleContent();
380
- writeFileSync(join(this.rootDir, '.env.example'), exampleContent);
381
-
382
- // Create additional config files
383
- await this.createAdditionalConfigFiles();
384
-
385
- this.spinner.succeed('Configuration files created');
386
- this.addLog('Configuration files created successfully');
387
- } catch (error) {
388
- this.spinner.fail('Configuration file creation failed');
389
- throw error;
390
- }
391
- }
392
-
393
- generateEnvContent() {
394
- const lines = [
395
- '# Claude Flow Novice Environment Configuration',
396
- '# Generated on ' + new Date().toISOString(),
397
- '',
398
- `NODE_ENV=${this.config.basic.environment}`,
399
- `PROJECT_NAME=${this.config.basic.projectName}`,
400
- `LOG_LEVEL=${this.config.basic.logLevel}`,
401
- ''
402
- ];
403
-
404
- if (this.config.redis.useRedis) {
405
- lines.push('# Redis Configuration');
406
- if (this.config.redis.redisType === 'cloud') {
407
- lines.push(`REDIS_URL=${this.config.redis.redisUrl}`);
408
- } else {
409
- lines.push(`REDIS_HOST=${this.config.redis.redisHost}`);
410
- lines.push(`REDIS_PORT=${this.config.redis.redisPort}`);
411
- if (this.config.redis.redisPassword) {
412
- lines.push(`REDIS_PASSWORD=${this.config.redis.redisPassword}`);
413
- }
414
- }
415
- lines.push('');
416
- }
417
-
418
- lines.push('# Swarm Configuration');
419
- lines.push(`MAX_AGENTS=${this.config.swarm.maxAgents}`);
420
- lines.push(`SWARM_STRATEGY=${this.config.swarm.swarmStrategy}`);
421
- lines.push(`SWARM_MODE=${this.config.swarm.swarmMode}`);
422
- lines.push(`CONSENSUS_THRESHOLD=${this.config.swarm.consensusThreshold}`);
423
- lines.push('');
424
-
425
- lines.push('# Development Configuration');
426
- lines.push(`DEV_SERVER_PORT=${this.config.development.devServerPort}`);
427
- lines.push(`HOT_RELOAD=${this.config.development.enableHotReload}`);
428
- lines.push(`DEBUG_MODE=${this.config.development.enableDebugMode}`);
429
- lines.push('');
430
-
431
- return lines.join('\n');
432
- }
433
-
434
- generateEnvExampleContent() {
435
- return this.generateEnvContent()
436
- .replace(/=.+$/, '=')
437
- .replace(/REDIS_PASSWORD=.+$/, 'REDIS_PASSWORD=your-redis-password');
438
- }
439
-
440
- async createAdditionalConfigFiles() {
441
- // Create user directory structure
442
- const userDirs = [
443
- join(this.rootDir, '.claude-flow-novice'),
444
- join(this.rootDir, '.claude-flow-novice/logs'),
445
- join(this.rootDir, '.claude-flow-novice/data'),
446
- join(this.rootDir, '.claude-flow-novice/cache'),
447
- join(this.rootDir, '.claude-flow-novice/temp')
448
- ];
449
-
450
- userDirs.forEach(dir => {
451
- if (!existsSync(dir)) {
452
- mkdirSync(dir, { recursive: true });
453
- }
454
- });
455
-
456
- // Create default configuration files
457
- const configs = [
458
- {
459
- path: join(this.configDir, 'development.json'),
460
- content: JSON.stringify({
461
- server: { port: 3000 },
462
- redis: { host: 'localhost', port: 6379 },
463
- logging: { level: 'debug' }
464
- }, null, 2)
465
- },
466
- {
467
- path: join(this.configDir, 'production.json'),
468
- content: JSON.stringify({
469
- server: { port: 8080 },
470
- redis: { host: 'localhost', port: 6379 },
471
- logging: { level: 'info' }
472
- }, null, 2)
473
- }
474
- ];
475
-
476
- configs.forEach(config => {
477
- if (!existsSync(config.path)) {
478
- writeFileSync(config.path, config.content);
479
- }
480
- });
481
- }
482
-
483
- async setupDevelopmentEnvironment() {
484
- this.spinner.start('Setting up development environment...');
485
-
486
- try {
487
- // Create development scripts
488
- await this.createDevScripts();
489
-
490
- // Setup Git hooks if git repository
491
- if (existsSync(join(this.rootDir, '.git'))) {
492
- await this.setupGitHooks();
493
- }
494
-
495
- // Create IDE configuration files
496
- await this.createIDEConfigs();
497
-
498
- this.spinner.succeed('Development environment setup completed');
499
- this.addLog('Development environment setup completed');
500
- } catch (error) {
501
- this.spinner.fail('Development environment setup failed');
502
- throw error;
503
- }
504
- }
505
-
506
- async createDevScripts() {
507
- const scripts = [
508
- {
509
- name: 'start-dev',
510
- content: `#!/bin/bash
511
- echo "šŸš€ Starting Claude Flow Novice in development mode..."
512
- npm run dev
513
- `,
514
- executable: true
515
- },
516
- {
517
- name: 'start-prod',
518
- content: `#!/bin/bash
519
- echo "šŸš€ Starting Claude Flow Novice in production mode..."
520
- npm run start
521
- `,
522
- executable: true
523
- },
524
- {
525
- name: 'redis-start',
526
- content: `#!/bin/bash
527
- echo "šŸ”“ Starting Redis server..."
528
- redis-server --daemonize yes
529
- sleep 2
530
- redis-cli ping
531
- `,
532
- executable: true
533
- },
534
- {
535
- name: 'redis-stop',
536
- content: `#!/bin/bash
537
- echo "šŸ”“ Stopping Redis server..."
538
- redis-cli shutdown
539
- `,
540
- executable: true
541
- }
542
- ];
543
-
544
- const scriptsDir = join(this.rootDir, 'scripts', 'dev');
545
- if (!existsSync(scriptsDir)) {
546
- mkdirSync(scriptsDir, { recursive: true });
547
- }
548
-
549
- scripts.forEach(script => {
550
- const scriptPath = join(scriptsDir, script.name);
551
- writeFileSync(scriptPath, script.content);
552
- if (script.executable) {
553
- chmodSync(scriptPath, '755');
554
- }
555
- });
556
- }
557
-
558
- async setupGitHooks() {
559
- const hooksDir = join(this.rootDir, '.git', 'hooks');
560
- const preCommitHook = `#!/bin/bash
561
- echo "šŸ” Running pre-commit checks..."
562
- npm run lint
563
- npm run test:unit
564
- `;
565
-
566
- const preCommitPath = join(hooksDir, 'pre-commit');
567
- if (!existsSync(preCommitPath)) {
568
- writeFileSync(preCommitPath, preCommitHook);
569
- chmodSync(preCommitPath, '755');
570
- }
571
- }
572
-
573
- async createIDEConfigs() {
574
- // VS Code settings
575
- const vscodeDir = join(this.rootDir, '.vscode');
576
- if (!existsSync(vscodeDir)) {
577
- mkdirSync(vscodeDir, { recursive: true });
578
- }
579
-
580
- const vscodeSettings = {
581
- "editor.formatOnSave": true,
582
- "editor.codeActionsOnSave": {
583
- "source.fixAll.eslint": true
584
- },
585
- "typescript.preferences.importModuleSpecifier": "relative",
586
- "files.exclude": {
587
- "**/.claude-flow-novice": true,
588
- "**/node_modules": true,
589
- "**/dist": true
590
- }
591
- };
592
-
593
- writeFileSync(
594
- join(vscodeDir, 'settings.json'),
595
- JSON.stringify(vscodeSettings, null, 2)
596
- );
597
- }
598
-
599
- async validateInstallation() {
600
- this.spinner.start('Validating installation...');
601
-
602
- try {
603
- // Check if critical files exist
604
- const criticalFiles = [
605
- join(this.rootDir, 'package.json'),
606
- join(this.configDir, 'claude-flow-config.json'),
607
- join(this.rootDir, '.env')
608
- ];
609
-
610
- for (const file of criticalFiles) {
611
- if (!existsSync(file)) {
612
- throw new Error(`Critical file missing: ${file}`);
613
- }
614
- }
615
-
616
- // Validate configuration
617
- this.validateConfiguration();
618
-
619
- // Test basic functionality
620
- await this.testBasicFunctionality();
621
-
622
- this.spinner.succeed('Installation validation completed');
623
- this.addLog('Installation validation passed');
624
- } catch (error) {
625
- this.spinner.fail('Installation validation failed');
626
- throw error;
627
- }
628
- }
629
-
630
- validateConfiguration() {
631
- const requiredFields = [
632
- 'basic.environment',
633
- 'basic.projectName',
634
- 'swarm.maxAgents',
635
- 'swarm.swarmStrategy'
636
- ];
637
-
638
- for (const field of requiredFields) {
639
- const value = field.split('.').reduce((obj, key) => obj?.[key], this.config);
640
- if (!value) {
641
- throw new Error(`Missing required configuration: ${field}`);
642
- }
643
- }
644
- }
645
-
646
- async testBasicFunctionality() {
647
- try {
648
- // Test if the main CLI command works
649
- const result = execSync('node .claude-flow-novice/dist/src/cli/main.js --help', {
650
- cwd: this.rootDir,
651
- encoding: 'utf8',
652
- timeout: 10000,
653
- stdio: 'pipe'
654
- });
655
-
656
- if (!result.includes('claude-flow-novice')) {
657
- throw new Error('CLI command validation failed');
658
- }
659
- } catch (error) {
660
- console.log(chalk.yellow('Note: CLI validation failed, but installation can continue'));
661
- console.log('This may be expected if the project hasn\'t been built yet');
662
- }
663
- }
664
-
665
- async createStartupScripts() {
666
- this.spinner.start('Creating startup scripts...');
667
-
668
- try {
669
- // Create quick start script
670
- const quickStartScript = this.generateQuickStartScript();
671
- writeFileSync(join(this.rootDir, 'scripts', 'quick-start.js'), quickStartScript);
672
-
673
- // Make it executable
674
- chmodSync(join(this.rootDir, 'scripts', 'quick-start.js'), '755');
675
-
676
- this.spinner.succeed('Startup scripts created');
677
- this.addLog('Startup scripts created successfully');
678
- } catch (error) {
679
- this.spinner.fail('Startup script creation failed');
680
- throw error;
681
- }
682
- }
683
-
684
- generateQuickStartScript() {
685
- return `#!/usr/bin/env node
686
-
687
- /**
688
- * Quick Start Script for Claude Flow Novice
689
- */
690
-
691
- import { spawn } from 'child_process';
692
- import { existsSync } from 'fs';
693
- import chalk from 'chalk';
694
-
695
- console.log(chalk.cyan.bold('šŸš€ Claude Flow Novice - Quick Start'));
696
- console.log('');
697
-
698
- async function quickStart() {
699
- try {
700
- // Check if Redis is running
701
- console.log('šŸ”“ Checking Redis...');
702
- try {
703
- spawn('redis-cli', ['ping'], { stdio: 'pipe' });
704
- console.log(chalk.green('āœ… Redis is running'));
705
- } catch {
706
- console.log(chalk.yellow('āš ļø Starting Redis...'));
707
- spawn('redis-server', ['--daemonize', 'yes']);
708
- await new Promise(resolve => setTimeout(resolve, 3000));
709
- }
710
-
711
- // Start the application
712
- console.log('šŸš€ Starting Claude Flow Novice...');
713
- const child = spawn('npm', ['run', 'dev'], {
714
- stdio: 'inherit',
715
- cwd: process.cwd()
716
- });
717
-
718
- child.on('close', (code) => {
719
- console.log(\`Process exited with code \${code}\`);
720
- });
721
-
722
- } catch (error) {
723
- console.error(chalk.red('Failed to start:'), error.message);
724
- process.exit(1);
725
- }
726
- }
727
-
728
- quickStart();
729
- `;
730
- }
731
-
732
- async promptRollback() {
733
- const { confirm } = await this.prompt('\nāŒ Setup failed. Would you like to rollback changes?', { default: true });
734
- return confirm;
735
- }
736
-
737
- async performRollback() {
738
- console.log(chalk.yellow('\nšŸ”„ Rolling back changes...'));
739
-
740
- for (const action of this.rollbackStack.reverse()) {
741
- try {
742
- await action();
743
- console.log(chalk.green('āœ… Rollback step completed'));
744
- } catch (error) {
745
- console.log(chalk.red('āŒ Rollback step failed:'), error.message);
746
- }
747
- }
748
-
749
- console.log(chalk.yellow('\nāš ļø Rollback completed. Some manual cleanup may be required.'));
750
- }
751
-
752
- addRollbackAction(action) {
753
- this.rollbackStack.push(action);
754
- }
755
-
756
- prompt(question, options = {}) {
757
- return new Promise((resolve) => {
758
- this.rl.question(question, (answer) => {
759
- if (options.default && typeof options.default === 'boolean') {
760
- resolve({ confirm: answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes' });
761
- } else {
762
- resolve(answer);
763
- }
764
- });
765
- });
766
- }
767
-
768
- addLog(message) {
769
- const timestamp = new Date().toISOString();
770
- this.setupLog.push({ timestamp, message });
771
- }
772
-
773
- logError(error) {
774
- this.addLog(`ERROR: ${error.message}`);
775
- this.addLog(`STACK: ${error.stack}`);
776
- }
777
-
778
- logSetupCompletion() {
779
- const logPath = join(this.rootDir, '.claude-flow-novice', 'setup.log');
780
- writeFileSync(logPath, JSON.stringify(this.setupLog, null, 2));
781
- }
782
-
783
- displaySuccessMessage() {
784
- console.log('\n' + boxen(
785
- chalk.green.bold('šŸŽ‰ Claude Flow Novice setup completed successfully!'),
786
- {
787
- padding: 1,
788
- borderColor: 'green',
789
- borderStyle: 'round'
790
- }
791
- ));
792
-
793
- console.log(chalk.blue('\nšŸ“ Created files:'));
794
- console.log(' • .env (environment configuration)');
795
- console.log(' • config/claude-flow-config.json');
796
- console.log(' • scripts/dev/ (development scripts)');
797
- console.log(' • .claude-flow-novice/ (user data directory)');
798
-
799
- console.log(chalk.blue('\nšŸš€ Quick start commands:'));
800
- console.log(' npm run dev # Start development server');
801
- console.log(' npm start # Start production server');
802
- console.log(' node scripts/quick-start.js # Quick start with Redis');
803
- console.log(' npm run config:wizard # Reconfigure settings');
804
-
805
- if (this.config.redis.useRedis) {
806
- console.log(chalk.blue('\nšŸ”“ Redis commands:'));
807
- console.log(' npm run redis:start # Start Redis server');
808
- console.log(' npm run redis:stop # Stop Redis server');
809
- }
810
-
811
- console.log(chalk.green('\n✨ Your Claude Flow Novice environment is ready!'));
812
- console.log(chalk.gray('Check the documentation for more information about available features.'));
813
- }
814
- }
815
-
816
- // Run if executed directly
817
- if (import.meta.url === `file://${process.argv[1]}`) {
818
- const setup = new SetupManager();
819
-
820
- // Parse command line arguments
821
- const args = process.argv.slice(2);
822
- const options = {
823
- skipPrerequisites: args.includes('--skip-prereqs'),
824
- skipDeps: args.includes('--skip-deps'),
825
- interactive: !args.includes('--non-interactive'),
826
- autoRollback: !args.includes('--no-rollback')
827
- };
828
-
829
- setup.run(options).catch(console.error);
830
- }
831
-
832
- export default SetupManager;