kynjal-cli 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/appliance/gguf-engine.d.ts +91 -0
- package/dist/src/appliance/gguf-engine.d.ts.map +1 -0
- package/dist/src/appliance/gguf-engine.js +286 -525
- package/dist/src/appliance/gguf-engine.js.map +1 -1
- package/dist/src/appliance/ruvllm-bridge.d.ts +102 -0
- package/dist/src/appliance/ruvllm-bridge.d.ts.map +1 -0
- package/dist/src/appliance/ruvllm-bridge.js +203 -403
- package/dist/src/appliance/ruvllm-bridge.js.map +1 -1
- package/dist/src/appliance/rvfa-builder.d.ts +44 -0
- package/dist/src/appliance/rvfa-builder.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-builder.js +154 -208
- package/dist/src/appliance/rvfa-builder.js.map +1 -1
- package/dist/src/appliance/rvfa-distribution.d.ts +97 -0
- package/dist/src/appliance/rvfa-distribution.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-distribution.js +260 -423
- package/dist/src/appliance/rvfa-distribution.js.map +1 -1
- package/dist/src/appliance/rvfa-format.d.ts +111 -0
- package/dist/src/appliance/rvfa-format.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-format.js +128 -200
- package/dist/src/appliance/rvfa-format.js.map +1 -1
- package/dist/src/appliance/rvfa-runner.d.ts +69 -0
- package/dist/src/appliance/rvfa-runner.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-runner.js +168 -304
- package/dist/src/appliance/rvfa-runner.js.map +1 -1
- package/dist/src/appliance/rvfa-signing.d.ts +123 -0
- package/dist/src/appliance/rvfa-signing.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-signing.js +173 -295
- package/dist/src/appliance/rvfa-signing.js.map +1 -1
- package/dist/src/benchmarks/pretrain/index.d.ts +58 -0
- package/dist/src/benchmarks/pretrain/index.d.ts.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +331 -542
- package/dist/src/benchmarks/pretrain/index.js.map +1 -1
- package/dist/src/commands/agent.js +574 -697
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.js +1218 -1548
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/appliance-advanced.js +158 -267
- package/dist/src/commands/appliance-advanced.js.map +1 -1
- package/dist/src/commands/appliance.js +318 -493
- package/dist/src/commands/appliance.js.map +1 -1
- package/dist/src/commands/benchmark.js +372 -523
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/claims.js +274 -364
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.js +113 -157
- package/dist/src/commands/cleanup.js.map +1 -1
- package/dist/src/commands/completions.js +477 -118
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +237 -303
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.js +487 -596
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.js +194 -275
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.js +504 -686
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.js +1293 -1543
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/guidance.js +449 -596
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.js +854 -938
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.js +3112 -3519
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +115 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +126 -308
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.js +788 -940
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.js +383 -558
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.js +493 -605
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.js +833 -1026
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +282 -347
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.js +1289 -1563
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.js +497 -643
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/plugins.js +668 -841
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.js +392 -447
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.js +162 -256
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +150 -220
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/route.js +520 -665
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/ruvector/backup.js +505 -651
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js +349 -401
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/import.js +224 -266
- package/dist/src/commands/ruvector/import.js.map +1 -1
- package/dist/src/commands/ruvector/index.js +37 -75
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/init.js +336 -359
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js +335 -322
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js +375 -431
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/setup.js +703 -117
- package/dist/src/commands/ruvector/setup.js.map +1 -1
- package/dist/src/commands/ruvector/status.js +364 -419
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/security.js +485 -608
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.js +504 -626
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.js +267 -364
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.js +380 -486
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.js +408 -488
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.js +423 -538
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/transfer-store.js +322 -412
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.js +196 -291
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.js +386 -486
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/config-adapter.d.ts +15 -0
- package/dist/src/config-adapter.d.ts.map +1 -0
- package/dist/src/config-adapter.js +38 -39
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.d.ts +77 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +309 -411
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/in-memory-repositories.d.ts +68 -0
- package/dist/src/infrastructure/in-memory-repositories.d.ts.map +1 -0
- package/dist/src/infrastructure/in-memory-repositories.js +246 -507
- package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts +25 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -0
- package/dist/src/init/claudemd-generator.js +368 -78
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts +41 -0
- package/dist/src/init/executor.d.ts.map +1 -0
- package/dist/src/init/executor.js +1307 -996
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts +60 -0
- package/dist/src/init/helpers-generator.d.ts.map +1 -0
- package/dist/src/init/helpers-generator.js +657 -12
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/index.d.ts +1 -1
- package/dist/src/init/index.d.ts.map +1 -1
- package/dist/src/init/index.js +1 -1
- package/dist/src/init/index.js.map +1 -1
- package/dist/src/init/mcp-generator.js +33 -37
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.js +76 -77
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.js +801 -3
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +76 -59
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts +92 -0
- package/dist/src/mcp-client.d.ts.map +1 -0
- package/dist/src/mcp-client.js +81 -125
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts +161 -0
- package/dist/src/mcp-server.d.ts.map +1 -0
- package/dist/src/mcp-server.js +470 -757
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +391 -492
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.js +332 -533
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.js +172 -236
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.d.ts +83 -0
- package/dist/src/mcp-tools/auto-install.d.ts.map +1 -0
- package/dist/src/mcp-tools/auto-install.js +80 -142
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +252 -375
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +473 -565
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +197 -272
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +500 -572
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +286 -364
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +582 -693
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +260 -311
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +573 -640
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2215 -2648
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +350 -505
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +315 -412
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +420 -480
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +204 -278
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.js +163 -279
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +297 -429
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +185 -234
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +207 -260
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +276 -325
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +270 -336
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +148 -196
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +186 -333
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/types.d.ts +31 -0
- package/dist/src/mcp-tools/types.d.ts.map +1 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js +133 -280
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +405 -450
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.d.ts +295 -0
- package/dist/src/memory/ewc-consolidation.d.ts.map +1 -0
- package/dist/src/memory/ewc-consolidation.js +190 -303
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts +338 -0
- package/dist/src/memory/intelligence.d.ts.map +1 -0
- package/dist/src/memory/intelligence.js +569 -794
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +407 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge.js +1170 -1640
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +412 -0
- package/dist/src/memory/memory-initializer.d.ts.map +1 -0
- package/dist/src/memory/memory-initializer.js +1836 -1851
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts +227 -0
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -0
- package/dist/src/memory/sona-optimizer.js +199 -329
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/output.d.ts +2 -2
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +242 -272
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.d.ts +51 -0
- package/dist/src/parser.d.ts.map +1 -0
- package/dist/src/parser.js +140 -187
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.d.ts +133 -0
- package/dist/src/plugins/manager.d.ts.map +1 -0
- package/dist/src/plugins/manager.js +285 -521
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.d.ts +88 -0
- package/dist/src/plugins/store/discovery.d.ts.map +1 -0
- package/dist/src/plugins/store/discovery.js +271 -358
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/index.d.ts +76 -0
- package/dist/src/plugins/store/index.d.ts.map +1 -0
- package/dist/src/plugins/store/index.js +48 -105
- package/dist/src/plugins/store/index.js.map +1 -1
- package/dist/src/plugins/store/search.d.ts +46 -0
- package/dist/src/plugins/store/search.d.ts.map +1 -0
- package/dist/src/plugins/store/search.js +69 -107
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/plugins/store/types.d.ts +274 -0
- package/dist/src/plugins/store/types.d.ts.map +1 -0
- package/dist/src/plugins/tests/demo-plugin-store.js +113 -160
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
- package/dist/src/plugins/tests/standalone-test.js +172 -223
- package/dist/src/plugins/tests/standalone-test.js.map +1 -1
- package/dist/src/plugins/tests/test-plugin-store.js +190 -228
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
- package/dist/src/production/circuit-breaker.d.ts +101 -0
- package/dist/src/production/circuit-breaker.d.ts.map +1 -0
- package/dist/src/production/circuit-breaker.js +62 -126
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.d.ts +92 -0
- package/dist/src/production/error-handler.d.ts.map +1 -0
- package/dist/src/production/error-handler.js +86 -156
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.d.ts +161 -0
- package/dist/src/production/monitoring.d.ts.map +1 -0
- package/dist/src/production/monitoring.js +139 -220
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.d.ts +80 -0
- package/dist/src/production/rate-limiter.d.ts.map +1 -0
- package/dist/src/production/rate-limiter.js +74 -93
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.d.ts +48 -0
- package/dist/src/production/retry.d.ts.map +1 -0
- package/dist/src/production/retry.js +75 -167
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/prompt.d.ts +44 -0
- package/dist/src/prompt.d.ts.map +1 -0
- package/dist/src/prompt.js +436 -560
- package/dist/src/prompt.js.map +1 -1
- package/dist/src/runtime/headless.d.ts +60 -0
- package/dist/src/runtime/headless.d.ts.map +1 -0
- package/dist/src/runtime/headless.js +197 -286
- package/dist/src/runtime/headless.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.d.ts +182 -0
- package/dist/src/ruvector/agent-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/agent-wasm.js +156 -351
- package/dist/src/ruvector/agent-wasm.js.map +1 -1
- package/dist/src/ruvector/ast-analyzer.d.ts +67 -0
- package/dist/src/ruvector/ast-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +145 -232
- package/dist/src/ruvector/ast-analyzer.js.map +1 -1
- package/dist/src/ruvector/coverage-router.d.ts +160 -0
- package/dist/src/ruvector/coverage-router.d.ts.map +1 -0
- package/dist/src/ruvector/coverage-router.js +287 -419
- package/dist/src/ruvector/coverage-router.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +56 -101
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/ruvector/diff-classifier.d.ts +175 -0
- package/dist/src/ruvector/diff-classifier.d.ts.map +1 -0
- package/dist/src/ruvector/diff-classifier.js +324 -451
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts +146 -0
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -0
- package/dist/src/ruvector/enhanced-model-router.js +260 -336
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/ruvector/flash-attention.d.ts +195 -0
- package/dist/src/ruvector/flash-attention.d.ts.map +1 -0
- package/dist/src/ruvector/flash-attention.js +223 -254
- package/dist/src/ruvector/flash-attention.js.map +1 -1
- package/dist/src/ruvector/graph-analyzer.d.ts +187 -0
- package/dist/src/ruvector/graph-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/graph-analyzer.js +486 -680
- package/dist/src/ruvector/graph-analyzer.js.map +1 -1
- package/dist/src/ruvector/index.d.ts +40 -0
- package/dist/src/ruvector/index.d.ts.map +1 -0
- package/dist/src/ruvector/index.js +36 -106
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/lora-adapter.d.ts +218 -0
- package/dist/src/ruvector/lora-adapter.d.ts.map +1 -0
- package/dist/src/ruvector/lora-adapter.js +155 -248
- package/dist/src/ruvector/lora-adapter.js.map +1 -1
- package/dist/src/ruvector/model-router.d.ts +220 -0
- package/dist/src/ruvector/model-router.d.ts.map +1 -0
- package/dist/src/ruvector/model-router.js +175 -248
- package/dist/src/ruvector/model-router.js.map +1 -1
- package/dist/src/ruvector/moe-router.d.ts +206 -0
- package/dist/src/ruvector/moe-router.d.ts.map +1 -0
- package/dist/src/ruvector/moe-router.js +228 -286
- package/dist/src/ruvector/moe-router.js.map +1 -1
- package/dist/src/ruvector/q-learning-router.d.ts +211 -0
- package/dist/src/ruvector/q-learning-router.d.ts.map +1 -0
- package/dist/src/ruvector/q-learning-router.js +257 -338
- package/dist/src/ruvector/q-learning-router.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.d.ts +179 -0
- package/dist/src/ruvector/ruvllm-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/ruvllm-wasm.js +270 -434
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -1
- package/dist/src/ruvector/semantic-router.d.ts +77 -0
- package/dist/src/ruvector/semantic-router.d.ts.map +1 -0
- package/dist/src/ruvector/semantic-router.js +60 -67
- package/dist/src/ruvector/semantic-router.js.map +1 -1
- package/dist/src/ruvector/vector-db.d.ts +69 -0
- package/dist/src/ruvector/vector-db.d.ts.map +1 -0
- package/dist/src/ruvector/vector-db.js +119 -205
- package/dist/src/ruvector/vector-db.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.d.ts +50 -0
- package/dist/src/services/agentic-flow-bridge.d.ts.map +1 -0
- package/dist/src/services/agentic-flow-bridge.js +32 -105
- package/dist/src/services/agentic-flow-bridge.js.map +1 -1
- package/dist/src/services/claim-service.d.ts +204 -0
- package/dist/src/services/claim-service.d.ts.map +1 -0
- package/dist/src/services/claim-service.js +615 -940
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/container-worker-pool.d.ts +197 -0
- package/dist/src/services/container-worker-pool.d.ts.map +1 -0
- package/dist/src/services/container-worker-pool.js +398 -666
- package/dist/src/services/container-worker-pool.js.map +1 -1
- package/dist/src/services/headless-worker-executor.d.ts +304 -0
- package/dist/src/services/headless-worker-executor.d.ts.map +1 -0
- package/dist/src/services/headless-worker-executor.js +441 -467
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/index.d.ts +4 -4
- package/dist/src/services/index.d.ts.map +1 -1
- package/dist/src/services/index.js +4 -4
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/registry-api.d.ts +58 -0
- package/dist/src/services/registry-api.d.ts.map +1 -0
- package/dist/src/services/registry-api.js +92 -200
- package/dist/src/services/registry-api.js.map +1 -1
- package/dist/src/services/ruvector-training.d.ts +222 -0
- package/dist/src/services/ruvector-training.d.ts.map +1 -0
- package/dist/src/services/ruvector-training.js +257 -337
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/services/worker-daemon.d.ts +228 -0
- package/dist/src/services/worker-daemon.d.ts.map +1 -0
- package/dist/src/services/worker-daemon.js +591 -849
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/services/worker-queue.d.ts +194 -0
- package/dist/src/services/worker-queue.d.ts.map +1 -0
- package/dist/src/services/worker-queue.js +331 -548
- package/dist/src/services/worker-queue.js.map +1 -1
- package/dist/src/suggest.d.ts +53 -0
- package/dist/src/suggest.d.ts.map +1 -0
- package/dist/src/suggest.js +45 -55
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/anonymization/index.js +29 -37
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/deploy-seraphine.js +128 -155
- package/dist/src/transfer/deploy-seraphine.js.map +1 -1
- package/dist/src/transfer/export.d.ts +25 -0
- package/dist/src/transfer/export.d.ts.map +1 -0
- package/dist/src/transfer/export.js +84 -142
- package/dist/src/transfer/export.js.map +1 -1
- package/dist/src/transfer/index.d.ts +1 -1
- package/dist/src/transfer/index.d.ts.map +1 -1
- package/dist/src/transfer/index.js +0 -2
- package/dist/src/transfer/index.js.map +1 -1
- package/dist/src/transfer/ipfs/client.d.ts +109 -0
- package/dist/src/transfer/ipfs/client.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/client.js +187 -337
- package/dist/src/transfer/ipfs/client.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.d.ts +95 -0
- package/dist/src/transfer/ipfs/upload.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/upload.js +288 -434
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/models/seraphine.d.ts +72 -0
- package/dist/src/transfer/models/seraphine.d.ts.map +1 -0
- package/dist/src/transfer/models/seraphine.js +55 -55
- package/dist/src/transfer/models/seraphine.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.d.ts +49 -0
- package/dist/src/transfer/serialization/cfp.d.ts.map +1 -0
- package/dist/src/transfer/serialization/cfp.js +30 -31
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.d.ts +82 -0
- package/dist/src/transfer/storage/gcs.d.ts.map +1 -0
- package/dist/src/transfer/storage/gcs.js +165 -232
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.d.ts +84 -0
- package/dist/src/transfer/store/discovery.d.ts.map +1 -0
- package/dist/src/transfer/store/discovery.js +239 -349
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.d.ts +70 -0
- package/dist/src/transfer/store/download.d.ts.map +1 -0
- package/dist/src/transfer/store/download.js +243 -365
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/index.d.ts +84 -0
- package/dist/src/transfer/store/index.d.ts.map +1 -0
- package/dist/src/transfer/store/index.js +63 -130
- package/dist/src/transfer/store/index.js.map +1 -1
- package/dist/src/transfer/store/publish.d.ts +76 -0
- package/dist/src/transfer/store/publish.d.ts.map +1 -0
- package/dist/src/transfer/store/publish.js +184 -258
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.js +50 -72
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.d.ts +54 -0
- package/dist/src/transfer/store/search.d.ts.map +1 -0
- package/dist/src/transfer/store/search.js +64 -96
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/transfer/store/tests/standalone-test.js +174 -231
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
- package/dist/src/transfer/test-seraphine.js +95 -130
- package/dist/src/transfer/test-seraphine.js.map +1 -1
- package/dist/src/transfer/tests/test-store.js +194 -239
- package/dist/src/transfer/tests/test-store.js.map +1 -1
- package/dist/src/transfer/types.d.ts +245 -0
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/types.d.ts +198 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +26 -55
- package/dist/src/types.js.map +1 -1
- package/dist/src/update/checker.d.ts +34 -0
- package/dist/src/update/checker.d.ts.map +1 -0
- package/dist/src/update/checker.js +106 -183
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.d.ts +32 -0
- package/dist/src/update/executor.d.ts.map +1 -0
- package/dist/src/update/executor.js +135 -198
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.d.ts +33 -0
- package/dist/src/update/index.d.ts.map +1 -0
- package/dist/src/update/index.js +38 -85
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.d.ts +20 -0
- package/dist/src/update/rate-limiter.d.ts.map +1 -0
- package/dist/src/update/rate-limiter.js +19 -31
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.d.ts +17 -0
- package/dist/src/update/validator.d.ts.map +1 -0
- package/dist/src/update/validator.js +38 -64
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2,878 +2,744 @@
|
|
|
2
2
|
* V3 CLI Init Command
|
|
3
3
|
* Comprehensive initialization for Claude Flow with Claude Code integration
|
|
4
4
|
*/
|
|
5
|
-
var __assign = (this && this.__assign) || function () {
|
|
6
|
-
__assign = Object.assign || function(t) {
|
|
7
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
-
s = arguments[i];
|
|
9
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
-
t[p] = s[p];
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
};
|
|
14
|
-
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
27
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
-
function step(op) {
|
|
30
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
32
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
-
switch (op[0]) {
|
|
35
|
-
case 0: case 1: t = op; break;
|
|
36
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
-
default:
|
|
40
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
-
if (t[2]) _.ops.pop();
|
|
45
|
-
_.trys.pop(); continue;
|
|
46
|
-
}
|
|
47
|
-
op = body.call(thisArg, _);
|
|
48
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
5
|
import { output } from '../output.js';
|
|
53
6
|
import { confirm, select, multiSelect, input } from '../prompt.js';
|
|
54
7
|
import * as fs from 'fs';
|
|
55
8
|
import * as path from 'path';
|
|
56
9
|
import { executeInit, executeUpgrade, executeUpgradeWithMissing, DEFAULT_INIT_OPTIONS, MINIMAL_INIT_OPTIONS, FULL_INIT_OPTIONS, } from '../init/index.js';
|
|
57
10
|
// Codex initialization action
|
|
58
|
-
function initCodexAction(ctx, options) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
function () { return __awaiter(_this, void 0, void 0, function () {
|
|
103
|
-
var execSync, globalPath, codexPath, mod;
|
|
104
|
-
return __generator(this, function (_a) {
|
|
105
|
-
switch (_a.label) {
|
|
106
|
-
case 0: return [4 /*yield*/, import('child_process')];
|
|
107
|
-
case 1:
|
|
108
|
-
execSync = (_a.sent()).execSync;
|
|
109
|
-
globalPath = execSync('npm root -g', { encoding: 'utf-8' }).trim();
|
|
110
|
-
codexPath = path.join(globalPath, '@claude-flow', 'codex', 'dist', 'index.js');
|
|
111
|
-
if (!fs.existsSync(codexPath)) return [3 /*break*/, 3];
|
|
112
|
-
return [4 /*yield*/, import("file://" + codexPath)];
|
|
113
|
-
case 2:
|
|
114
|
-
mod = _a.sent();
|
|
115
|
-
return [2 /*return*/, mod.CodexInitializer];
|
|
116
|
-
case 3: throw new Error('Not found globally');
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}); },
|
|
120
|
-
];
|
|
121
|
-
_i = 0, resolutionStrategies_1 = resolutionStrategies;
|
|
122
|
-
_f.label = 2;
|
|
123
|
-
case 2:
|
|
124
|
-
if (!(_i < resolutionStrategies_1.length)) return [3 /*break*/, 7];
|
|
125
|
-
strategy = resolutionStrategies_1[_i];
|
|
126
|
-
_f.label = 3;
|
|
127
|
-
case 3:
|
|
128
|
-
_f.trys.push([3, 5, , 6]);
|
|
129
|
-
return [4 /*yield*/, strategy()];
|
|
130
|
-
case 4:
|
|
131
|
-
CodexInitializer = _f.sent();
|
|
132
|
-
if (CodexInitializer)
|
|
133
|
-
return [3 /*break*/, 7];
|
|
134
|
-
return [3 /*break*/, 6];
|
|
135
|
-
case 5:
|
|
136
|
-
_a = _f.sent();
|
|
137
|
-
return [3 /*break*/, 6];
|
|
138
|
-
case 6:
|
|
139
|
-
_i++;
|
|
140
|
-
return [3 /*break*/, 2];
|
|
141
|
-
case 7:
|
|
142
|
-
if (!CodexInitializer) {
|
|
143
|
-
throw new Error('Cannot find module @claude-flow/codex');
|
|
144
|
-
}
|
|
145
|
-
initializer = new CodexInitializer();
|
|
146
|
-
return [4 /*yield*/, initializer.initialize({
|
|
147
|
-
projectPath: ctx.cwd,
|
|
148
|
-
template: template,
|
|
149
|
-
force: force,
|
|
150
|
-
dual: dualMode
|
|
151
|
-
})];
|
|
152
|
-
case 8:
|
|
153
|
-
result = _f.sent();
|
|
154
|
-
if (!result.success) {
|
|
155
|
-
spinner.fail('Codex initialization failed');
|
|
156
|
-
if (result.errors) {
|
|
157
|
-
for (_b = 0, _c = result.errors; _b < _c.length; _b++) {
|
|
158
|
-
error = _c[_b];
|
|
159
|
-
output.printError(error);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
163
|
-
}
|
|
164
|
-
spinner.succeed('Codex project initialized successfully!');
|
|
165
|
-
output.writeln();
|
|
166
|
-
summary = [];
|
|
167
|
-
summary.push("Files: " + result.filesCreated.length + " created");
|
|
168
|
-
summary.push("Skills: " + result.skillsGenerated.length + " installed");
|
|
169
|
-
output.printBox(summary.join('\n'), 'Summary');
|
|
170
|
-
output.writeln();
|
|
171
|
-
// Show what was created
|
|
172
|
-
output.printBox([
|
|
173
|
-
"AGENTS.md: Main project instructions",
|
|
174
|
-
".agents/config.toml: Project configuration",
|
|
175
|
-
".agents/skills/: " + result.skillsGenerated.length + " skills",
|
|
176
|
-
".codex/: Local overrides (gitignored)",
|
|
177
|
-
dualMode ? "CLAUDE.md: Claude Code compatibility" : '',
|
|
178
|
-
].filter(Boolean).join('\n'), 'OpenAI Codex Integration');
|
|
179
|
-
output.writeln();
|
|
180
|
-
// Warnings
|
|
181
|
-
if (result.warnings && result.warnings.length > 0) {
|
|
182
|
-
output.printWarning('Warnings:');
|
|
183
|
-
for (_d = 0, _e = result.warnings.slice(0, 5); _d < _e.length; _d++) {
|
|
184
|
-
warning = _e[_d];
|
|
185
|
-
output.printInfo(" \u2022 " + warning);
|
|
186
|
-
}
|
|
187
|
-
if (result.warnings.length > 5) {
|
|
188
|
-
output.printInfo(" ... and " + (result.warnings.length - 5) + " more");
|
|
189
|
-
}
|
|
190
|
-
output.writeln();
|
|
191
|
-
}
|
|
192
|
-
// Next steps
|
|
193
|
-
output.writeln(output.bold('Next steps:'));
|
|
194
|
-
output.printList([
|
|
195
|
-
"Review " + output.highlight('AGENTS.md') + " for project instructions",
|
|
196
|
-
"Add skills with " + output.highlight('$skill-name') + " syntax",
|
|
197
|
-
"Configure " + output.highlight('.agents/config.toml') + " for your project",
|
|
198
|
-
dualMode ? "Claude Code users can use " + output.highlight('CLAUDE.md') : '',
|
|
199
|
-
].filter(Boolean));
|
|
200
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
201
|
-
case 9:
|
|
202
|
-
error_1 = _f.sent();
|
|
203
|
-
spinner.fail('Codex initialization failed');
|
|
204
|
-
errorMessage = error_1 instanceof Error ? error_1.message : String(error_1);
|
|
205
|
-
// Handle module not found error gracefully
|
|
206
|
-
if (errorMessage.includes('Cannot find module') || errorMessage.includes('@claude-flow/codex')) {
|
|
207
|
-
output.printError('The @claude-flow/codex package is not installed.');
|
|
208
|
-
output.printInfo('Install it with: npm install @claude-flow/codex');
|
|
209
|
-
output.writeln();
|
|
210
|
-
output.printInfo('Alternatively, copy skills manually from .claude/skills/ to .agents/skills/');
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
output.printError("Failed to initialize: " + errorMessage);
|
|
214
|
-
}
|
|
215
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
216
|
-
case 10: return [2 /*return*/];
|
|
11
|
+
async function initCodexAction(ctx, options) {
|
|
12
|
+
const { force, minimal, full, dualMode } = options;
|
|
13
|
+
output.writeln();
|
|
14
|
+
output.writeln(output.bold('Initializing RuFlo V3 for OpenAI Codex'));
|
|
15
|
+
output.writeln();
|
|
16
|
+
// Determine template
|
|
17
|
+
const template = minimal ? 'minimal' : full ? 'full' : 'default';
|
|
18
|
+
const spinner = output.createSpinner({ text: 'Initializing Codex project...' });
|
|
19
|
+
spinner.start();
|
|
20
|
+
try {
|
|
21
|
+
// Dynamic import of the Codex initializer with lazy loading fallback
|
|
22
|
+
let CodexInitializer;
|
|
23
|
+
// Try multiple resolution strategies for the @claude-flow/codex package
|
|
24
|
+
// Use a variable to prevent TypeScript from statically resolving the optional module
|
|
25
|
+
const codexModuleId = '@claude-flow/codex';
|
|
26
|
+
const resolutionStrategies = [
|
|
27
|
+
// Strategy 1: Direct import (works if installed as CLI dependency)
|
|
28
|
+
async () => (await import(codexModuleId)).CodexInitializer,
|
|
29
|
+
// Strategy 2: Project node_modules (works if installed in user's project)
|
|
30
|
+
async () => {
|
|
31
|
+
const projectPath = path.join(ctx.cwd, 'node_modules', '@claude-flow', 'codex', 'dist', 'index.js');
|
|
32
|
+
if (fs.existsSync(projectPath)) {
|
|
33
|
+
const mod = await import(`file://${projectPath}`);
|
|
34
|
+
return mod.CodexInitializer;
|
|
35
|
+
}
|
|
36
|
+
throw new Error('Not found in project');
|
|
37
|
+
},
|
|
38
|
+
// Strategy 3: Global node_modules
|
|
39
|
+
async () => {
|
|
40
|
+
const { execSync } = await import('child_process');
|
|
41
|
+
const globalPath = execSync('npm root -g', { encoding: 'utf-8' }).trim();
|
|
42
|
+
const codexPath = path.join(globalPath, '@claude-flow', 'codex', 'dist', 'index.js');
|
|
43
|
+
if (fs.existsSync(codexPath)) {
|
|
44
|
+
const mod = await import(`file://${codexPath}`);
|
|
45
|
+
return mod.CodexInitializer;
|
|
46
|
+
}
|
|
47
|
+
throw new Error('Not found globally');
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
for (const strategy of resolutionStrategies) {
|
|
51
|
+
try {
|
|
52
|
+
CodexInitializer = await strategy();
|
|
53
|
+
if (CodexInitializer)
|
|
54
|
+
break;
|
|
217
55
|
}
|
|
56
|
+
catch {
|
|
57
|
+
// Try next strategy
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (!CodexInitializer) {
|
|
61
|
+
throw new Error('Cannot find module @claude-flow/codex');
|
|
62
|
+
}
|
|
63
|
+
const initializer = new CodexInitializer();
|
|
64
|
+
const result = await initializer.initialize({
|
|
65
|
+
projectPath: ctx.cwd,
|
|
66
|
+
template: template,
|
|
67
|
+
force,
|
|
68
|
+
dual: dualMode,
|
|
218
69
|
});
|
|
219
|
-
|
|
70
|
+
if (!result.success) {
|
|
71
|
+
spinner.fail('Codex initialization failed');
|
|
72
|
+
if (result.errors) {
|
|
73
|
+
for (const error of result.errors) {
|
|
74
|
+
output.printError(error);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return { success: false, exitCode: 1 };
|
|
78
|
+
}
|
|
79
|
+
spinner.succeed('Codex project initialized successfully!');
|
|
80
|
+
output.writeln();
|
|
81
|
+
// Display summary
|
|
82
|
+
const summary = [];
|
|
83
|
+
summary.push(`Files: ${result.filesCreated.length} created`);
|
|
84
|
+
summary.push(`Skills: ${result.skillsGenerated.length} installed`);
|
|
85
|
+
output.printBox(summary.join('\n'), 'Summary');
|
|
86
|
+
output.writeln();
|
|
87
|
+
// Show what was created
|
|
88
|
+
output.printBox([
|
|
89
|
+
`AGENTS.md: Main project instructions`,
|
|
90
|
+
`.agents/config.toml: Project configuration`,
|
|
91
|
+
`.agents/skills/: ${result.skillsGenerated.length} skills`,
|
|
92
|
+
`.codex/: Local overrides (gitignored)`,
|
|
93
|
+
dualMode ? `CLAUDE.md: Claude Code compatibility` : '',
|
|
94
|
+
].filter(Boolean).join('\n'), 'OpenAI Codex Integration');
|
|
95
|
+
output.writeln();
|
|
96
|
+
// Warnings
|
|
97
|
+
if (result.warnings && result.warnings.length > 0) {
|
|
98
|
+
output.printWarning('Warnings:');
|
|
99
|
+
for (const warning of result.warnings.slice(0, 5)) {
|
|
100
|
+
output.printInfo(` • ${warning}`);
|
|
101
|
+
}
|
|
102
|
+
if (result.warnings.length > 5) {
|
|
103
|
+
output.printInfo(` ... and ${result.warnings.length - 5} more`);
|
|
104
|
+
}
|
|
105
|
+
output.writeln();
|
|
106
|
+
}
|
|
107
|
+
// Next steps
|
|
108
|
+
output.writeln(output.bold('Next steps:'));
|
|
109
|
+
output.printList([
|
|
110
|
+
`Review ${output.highlight('AGENTS.md')} for project instructions`,
|
|
111
|
+
`Add skills with ${output.highlight('$skill-name')} syntax`,
|
|
112
|
+
`Configure ${output.highlight('.agents/config.toml')} for your project`,
|
|
113
|
+
dualMode ? `Claude Code users can use ${output.highlight('CLAUDE.md')}` : '',
|
|
114
|
+
].filter(Boolean));
|
|
115
|
+
return { success: true, data: result };
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
spinner.fail('Codex initialization failed');
|
|
119
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
120
|
+
// Handle module not found error gracefully
|
|
121
|
+
if (errorMessage.includes('Cannot find module') || errorMessage.includes('@claude-flow/codex')) {
|
|
122
|
+
output.printError('The @claude-flow/codex package is not installed.');
|
|
123
|
+
output.printInfo('Install it with: npm install @claude-flow/codex');
|
|
124
|
+
output.writeln();
|
|
125
|
+
output.printInfo('Alternatively, copy skills manually from .claude/skills/ to .agents/skills/');
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
output.printError(`Failed to initialize: ${errorMessage}`);
|
|
129
|
+
}
|
|
130
|
+
return { success: false, exitCode: 1 };
|
|
131
|
+
}
|
|
220
132
|
}
|
|
221
133
|
// Check if project is already initialized
|
|
222
134
|
function isInitialized(cwd) {
|
|
223
|
-
|
|
224
|
-
|
|
135
|
+
const claudePath = path.join(cwd, '.claude', 'settings.json');
|
|
136
|
+
const claudeFlowPath = path.join(cwd, '.claude-flow', 'config.yaml');
|
|
225
137
|
return {
|
|
226
138
|
claude: fs.existsSync(claudePath),
|
|
227
|
-
claudeFlow: fs.existsSync(claudeFlowPath)
|
|
139
|
+
claudeFlow: fs.existsSync(claudeFlowPath),
|
|
228
140
|
};
|
|
229
141
|
}
|
|
230
142
|
// Init subcommand (default)
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
143
|
+
const initAction = async (ctx) => {
|
|
144
|
+
const force = ctx.flags.force;
|
|
145
|
+
const minimal = ctx.flags.minimal;
|
|
146
|
+
const full = ctx.flags.full;
|
|
147
|
+
const skipClaude = ctx.flags['skip-claude'];
|
|
148
|
+
const onlyClaude = ctx.flags['only-claude'];
|
|
149
|
+
const codexMode = ctx.flags.codex;
|
|
150
|
+
const dualMode = ctx.flags.dual;
|
|
151
|
+
const cwd = ctx.cwd;
|
|
152
|
+
// If codex mode, use the Codex initializer
|
|
153
|
+
if (codexMode || dualMode) {
|
|
154
|
+
return initCodexAction(ctx, { codexMode, dualMode, force, minimal, full });
|
|
155
|
+
}
|
|
156
|
+
// Check if already initialized
|
|
157
|
+
const initialized = isInitialized(cwd);
|
|
158
|
+
const hasExisting = initialized.claude || initialized.claudeFlow;
|
|
159
|
+
if (hasExisting && !force) {
|
|
160
|
+
output.printWarning('RuFlo appears to be already initialized');
|
|
161
|
+
if (initialized.claude)
|
|
162
|
+
output.printInfo(' Found: .claude/settings.json');
|
|
163
|
+
if (initialized.claudeFlow)
|
|
164
|
+
output.printInfo(' Found: .claude-flow/config.yaml');
|
|
165
|
+
output.printInfo('Use --force to reinitialize');
|
|
166
|
+
if (ctx.interactive) {
|
|
167
|
+
const proceed = await confirm({
|
|
168
|
+
message: 'Do you want to reinitialize? This will overwrite existing configuration.',
|
|
169
|
+
default: false,
|
|
170
|
+
});
|
|
171
|
+
if (!proceed) {
|
|
172
|
+
return { success: true, message: 'Initialization cancelled' };
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return { success: false, exitCode: 1, message: 'Already initialized' };
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
output.writeln();
|
|
180
|
+
output.writeln(output.bold('Initializing RuFlo V3'));
|
|
181
|
+
output.writeln();
|
|
182
|
+
// Build init options based on flags
|
|
183
|
+
let options;
|
|
184
|
+
if (minimal) {
|
|
185
|
+
options = { ...MINIMAL_INIT_OPTIONS, targetDir: cwd, force };
|
|
186
|
+
}
|
|
187
|
+
else if (full) {
|
|
188
|
+
options = { ...FULL_INIT_OPTIONS, targetDir: cwd, force };
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
options = { ...DEFAULT_INIT_OPTIONS, targetDir: cwd, force };
|
|
192
|
+
}
|
|
193
|
+
// Handle --skip-claude and --only-claude flags
|
|
194
|
+
if (skipClaude) {
|
|
195
|
+
options.components.settings = false;
|
|
196
|
+
options.components.skills = false;
|
|
197
|
+
options.components.commands = false;
|
|
198
|
+
options.components.agents = false;
|
|
199
|
+
options.components.helpers = false;
|
|
200
|
+
options.components.statusline = false;
|
|
201
|
+
options.components.mcp = false;
|
|
202
|
+
options.components.claudeMd = false;
|
|
203
|
+
}
|
|
204
|
+
if (onlyClaude) {
|
|
205
|
+
options.components.runtime = false;
|
|
206
|
+
}
|
|
207
|
+
// Create spinner
|
|
208
|
+
const spinner = output.createSpinner({ text: 'Initializing...' });
|
|
209
|
+
spinner.start();
|
|
210
|
+
try {
|
|
211
|
+
// Execute initialization
|
|
212
|
+
const result = await executeInit(options);
|
|
213
|
+
if (!result.success) {
|
|
214
|
+
spinner.fail('Initialization failed');
|
|
215
|
+
for (const error of result.errors) {
|
|
216
|
+
output.printError(error);
|
|
217
|
+
}
|
|
218
|
+
return { success: false, exitCode: 1 };
|
|
219
|
+
}
|
|
220
|
+
spinner.succeed('RuFlo V3 initialized successfully!');
|
|
221
|
+
output.writeln();
|
|
222
|
+
// Display summary
|
|
223
|
+
const summary = [];
|
|
224
|
+
if (result.created.directories.length > 0) {
|
|
225
|
+
summary.push(`Directories: ${result.created.directories.length} created`);
|
|
226
|
+
}
|
|
227
|
+
if (result.created.files.length > 0) {
|
|
228
|
+
summary.push(`Files: ${result.created.files.length} created`);
|
|
229
|
+
}
|
|
230
|
+
if (result.skipped.length > 0) {
|
|
231
|
+
summary.push(`Skipped: ${result.skipped.length} (already exist)`);
|
|
232
|
+
}
|
|
233
|
+
output.printBox(summary.join('\n'), 'Summary');
|
|
234
|
+
output.writeln();
|
|
235
|
+
// Show what was created
|
|
236
|
+
if (options.components.claudeMd || options.components.settings || options.components.skills || options.components.commands || options.components.agents) {
|
|
237
|
+
output.printBox([
|
|
238
|
+
options.components.claudeMd ? `CLAUDE.md: Swarm guidance & configuration` : '',
|
|
239
|
+
options.components.settings ? `Settings: .claude/settings.json` : '',
|
|
240
|
+
options.components.skills ? `Skills: .claude/skills/ (${result.summary.skillsCount} skills)` : '',
|
|
241
|
+
options.components.commands ? `Commands: .claude/commands/ (${result.summary.commandsCount} commands)` : '',
|
|
242
|
+
options.components.agents ? `Agents: .claude/agents/ (${result.summary.agentsCount} agents)` : '',
|
|
243
|
+
options.components.helpers ? `Helpers: .claude/helpers/` : '',
|
|
244
|
+
options.components.mcp ? `MCP: .mcp.json` : '',
|
|
245
|
+
].filter(Boolean).join('\n'), 'Claude Code Integration');
|
|
246
|
+
output.writeln();
|
|
247
|
+
}
|
|
248
|
+
if (options.components.runtime) {
|
|
249
|
+
output.printBox([
|
|
250
|
+
`Config: .claude-flow/config.yaml`,
|
|
251
|
+
`Data: .claude-flow/data/`,
|
|
252
|
+
`Logs: .claude-flow/logs/`,
|
|
253
|
+
`Sessions: .claude-flow/sessions/`,
|
|
254
|
+
].join('\n'), 'V3 Runtime');
|
|
255
|
+
output.writeln();
|
|
256
|
+
}
|
|
257
|
+
// Hooks summary
|
|
258
|
+
if (result.summary.hooksEnabled > 0) {
|
|
259
|
+
output.printInfo(`Hooks: ${result.summary.hooksEnabled} hook types enabled in settings.json`);
|
|
260
|
+
output.writeln();
|
|
261
|
+
}
|
|
262
|
+
// Handle --start-all or --start-daemon
|
|
263
|
+
const startAll = ctx.flags['start-all'] || ctx.flags.startAll;
|
|
264
|
+
const startDaemon = ctx.flags['start-daemon'] || ctx.flags.startDaemon || startAll;
|
|
265
|
+
if (startDaemon || startAll) {
|
|
266
|
+
output.writeln();
|
|
267
|
+
output.printInfo('Starting services...');
|
|
268
|
+
const { execSync } = await import('child_process');
|
|
269
|
+
// Initialize memory database
|
|
270
|
+
if (startAll) {
|
|
271
|
+
try {
|
|
272
|
+
output.writeln(output.dim(' Initializing memory database...'));
|
|
273
|
+
execSync('npx @claude-flow/cli@latest memory init 2>/dev/null', {
|
|
274
|
+
stdio: 'pipe',
|
|
275
|
+
cwd: ctx.cwd,
|
|
276
|
+
timeout: 30000
|
|
277
|
+
});
|
|
278
|
+
output.writeln(output.success(' ✓ Memory initialized'));
|
|
352
279
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
if (!(startDaemon || startAll)) return [3 /*break*/, 7];
|
|
356
|
-
output.writeln();
|
|
357
|
-
output.printInfo('Starting services...');
|
|
358
|
-
return [4 /*yield*/, import('child_process')];
|
|
359
|
-
case 6:
|
|
360
|
-
execSync = (_b.sent()).execSync;
|
|
361
|
-
// Initialize memory database
|
|
362
|
-
if (startAll) {
|
|
363
|
-
try {
|
|
364
|
-
output.writeln(output.dim(' Initializing memory database...'));
|
|
365
|
-
execSync('npx @claude-flow/cli@latest memory init 2>/dev/null', {
|
|
366
|
-
stdio: 'pipe',
|
|
367
|
-
cwd: ctx.cwd,
|
|
368
|
-
timeout: 30000
|
|
369
|
-
});
|
|
370
|
-
output.writeln(output.success(' ✓ Memory initialized'));
|
|
371
|
-
}
|
|
372
|
-
catch (_c) {
|
|
373
|
-
output.writeln(output.dim(' Memory database already exists'));
|
|
374
|
-
}
|
|
280
|
+
catch {
|
|
281
|
+
output.writeln(output.dim(' Memory database already exists'));
|
|
375
282
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
catch (_d) {
|
|
388
|
-
output.writeln(output.warning(' Daemon may already be running'));
|
|
389
|
-
}
|
|
283
|
+
}
|
|
284
|
+
// Start daemon
|
|
285
|
+
if (startDaemon) {
|
|
286
|
+
try {
|
|
287
|
+
output.writeln(output.dim(' Starting daemon...'));
|
|
288
|
+
execSync('npx @claude-flow/cli@latest daemon start 2>/dev/null &', {
|
|
289
|
+
stdio: 'pipe',
|
|
290
|
+
cwd: ctx.cwd,
|
|
291
|
+
timeout: 10000
|
|
292
|
+
});
|
|
293
|
+
output.writeln(output.success(' ✓ Daemon started'));
|
|
390
294
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
try {
|
|
394
|
-
output.writeln(output.dim(' Initializing swarm...'));
|
|
395
|
-
execSync('npx @claude-flow/cli@latest swarm init --topology hierarchical 2>/dev/null', {
|
|
396
|
-
stdio: 'pipe',
|
|
397
|
-
cwd: ctx.cwd,
|
|
398
|
-
timeout: 30000
|
|
399
|
-
});
|
|
400
|
-
output.writeln(output.success(' ✓ Swarm initialized'));
|
|
401
|
-
}
|
|
402
|
-
catch (_e) {
|
|
403
|
-
output.writeln(output.dim(' Swarm initialization skipped'));
|
|
404
|
-
}
|
|
295
|
+
catch {
|
|
296
|
+
output.writeln(output.warning(' Daemon may already be running'));
|
|
405
297
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
case 7:
|
|
410
|
-
withEmbeddings = ctx.flags['with-embeddings'] || ctx.flags.withEmbeddings;
|
|
411
|
-
embeddingModel = (ctx.flags['embedding-model'] || ctx.flags.embeddingModel || 'all-MiniLM-L6-v2');
|
|
412
|
-
if (!withEmbeddings) return [3 /*break*/, 9];
|
|
413
|
-
output.writeln();
|
|
414
|
-
output.printInfo('Initializing ONNX embedding subsystem...');
|
|
415
|
-
return [4 /*yield*/, import('child_process')];
|
|
416
|
-
case 8:
|
|
417
|
-
execSync = (_b.sent()).execSync;
|
|
298
|
+
}
|
|
299
|
+
// Initialize swarm
|
|
300
|
+
if (startAll) {
|
|
418
301
|
try {
|
|
419
|
-
output.writeln(output.dim(
|
|
420
|
-
|
|
421
|
-
execSync("npx @claude-flow/cli@latest embeddings init --model " + embeddingModel + " --no-download --force 2>/dev/null", {
|
|
302
|
+
output.writeln(output.dim(' Initializing swarm...'));
|
|
303
|
+
execSync('npx @claude-flow/cli@latest swarm init --topology hierarchical 2>/dev/null', {
|
|
422
304
|
stdio: 'pipe',
|
|
423
305
|
cwd: ctx.cwd,
|
|
424
306
|
timeout: 30000
|
|
425
307
|
});
|
|
426
|
-
output.writeln(output.success(' ✓
|
|
427
|
-
output.writeln(output.dim(' Run "embeddings init --download" to download model'));
|
|
428
|
-
}
|
|
429
|
-
catch (err) {
|
|
430
|
-
output.writeln(output.warning(' Embedding initialization skipped (run manually)'));
|
|
308
|
+
output.writeln(output.success(' ✓ Swarm initialized'));
|
|
431
309
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
if (!startDaemon && !startAll) {
|
|
435
|
-
// Next steps (only if not auto-starting)
|
|
436
|
-
output.writeln(output.bold('Next steps:'));
|
|
437
|
-
output.printList([
|
|
438
|
-
"Run " + output.highlight('claude-flow daemon start') + " to start background workers",
|
|
439
|
-
"Run " + output.highlight('claude-flow memory init') + " to initialize memory database",
|
|
440
|
-
"Run " + output.highlight('claude-flow swarm init') + " to initialize a swarm",
|
|
441
|
-
"Or use " + output.highlight('claude-flow init --start-all') + " to do all of the above",
|
|
442
|
-
options.components.settings ? "Review " + output.highlight('.claude/settings.json') + " for hook configurations" : '',
|
|
443
|
-
].filter(Boolean));
|
|
310
|
+
catch {
|
|
311
|
+
output.writeln(output.dim(' Swarm initialization skipped'));
|
|
444
312
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
313
|
+
}
|
|
314
|
+
output.writeln();
|
|
315
|
+
output.printSuccess('All services started');
|
|
316
|
+
}
|
|
317
|
+
// Handle --with-embeddings
|
|
318
|
+
const withEmbeddings = ctx.flags['with-embeddings'] || ctx.flags.withEmbeddings;
|
|
319
|
+
const embeddingModel = (ctx.flags['embedding-model'] || ctx.flags.embeddingModel || 'all-MiniLM-L6-v2');
|
|
320
|
+
if (withEmbeddings) {
|
|
321
|
+
output.writeln();
|
|
322
|
+
output.printInfo('Initializing ONNX embedding subsystem...');
|
|
323
|
+
const { execSync } = await import('child_process');
|
|
324
|
+
try {
|
|
325
|
+
output.writeln(output.dim(` Model: ${embeddingModel}`));
|
|
326
|
+
output.writeln(output.dim(' Hyperbolic: Enabled (Poincaré ball)'));
|
|
327
|
+
execSync(`npx @claude-flow/cli@latest embeddings init --model ${embeddingModel} --no-download --force 2>/dev/null`, {
|
|
328
|
+
stdio: 'pipe',
|
|
329
|
+
cwd: ctx.cwd,
|
|
330
|
+
timeout: 30000
|
|
331
|
+
});
|
|
332
|
+
output.writeln(output.success(' ✓ Embeddings initialized'));
|
|
333
|
+
output.writeln(output.dim(' Run "embeddings init --download" to download model'));
|
|
334
|
+
}
|
|
335
|
+
catch (err) {
|
|
336
|
+
output.writeln(output.warning(' Embedding initialization skipped (run manually)'));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (!startDaemon && !startAll) {
|
|
340
|
+
// Next steps (only if not auto-starting)
|
|
341
|
+
output.writeln(output.bold('Next steps:'));
|
|
342
|
+
output.printList([
|
|
343
|
+
`Run ${output.highlight('claude-flow daemon start')} to start background workers`,
|
|
344
|
+
`Run ${output.highlight('claude-flow memory init')} to initialize memory database`,
|
|
345
|
+
`Run ${output.highlight('claude-flow swarm init')} to initialize a swarm`,
|
|
346
|
+
`Or use ${output.highlight('claude-flow init --start-all')} to do all of the above`,
|
|
347
|
+
options.components.settings ? `Review ${output.highlight('.claude/settings.json')} for hook configurations` : '',
|
|
348
|
+
].filter(Boolean));
|
|
349
|
+
}
|
|
350
|
+
if (ctx.flags.format === 'json') {
|
|
351
|
+
output.printJson(result);
|
|
455
352
|
}
|
|
456
|
-
|
|
457
|
-
}
|
|
353
|
+
return { success: true, data: result };
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
spinner.fail('Initialization failed');
|
|
357
|
+
output.printError(`Failed to initialize: ${error instanceof Error ? error.message : String(error)}`);
|
|
358
|
+
return { success: false, exitCode: 1 };
|
|
359
|
+
}
|
|
360
|
+
};
|
|
458
361
|
// Wizard subcommand for interactive setup
|
|
459
|
-
|
|
362
|
+
const wizardCommand = {
|
|
460
363
|
name: 'wizard',
|
|
461
364
|
description: 'Interactive setup wizard for comprehensive configuration',
|
|
462
|
-
action:
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
options: [
|
|
526
|
-
{ value: 'core', label: 'Core', hint: 'Swarm, memory, SPARC skills', selected: true },
|
|
527
|
-
{ value: 'agentdb', label: 'AgentDB', hint: 'Vector database skills', selected: true },
|
|
528
|
-
{ value: 'github', label: 'GitHub', hint: 'GitHub integration skills', selected: true },
|
|
529
|
-
{ value: 'flowNexus', label: 'Flow Nexus', hint: 'Cloud platform skills', selected: false },
|
|
530
|
-
{ value: 'v3', label: 'V3', hint: 'V3 implementation skills', selected: true },
|
|
531
|
-
]
|
|
532
|
-
})];
|
|
533
|
-
case 6:
|
|
534
|
-
skillSets = _b.sent();
|
|
365
|
+
action: async (ctx) => {
|
|
366
|
+
output.writeln();
|
|
367
|
+
output.writeln(output.bold('RuFlo V3 Setup Wizard'));
|
|
368
|
+
output.writeln(output.dim('Answer questions to configure your project'));
|
|
369
|
+
output.writeln();
|
|
370
|
+
try {
|
|
371
|
+
// Start with base options
|
|
372
|
+
const options = { ...DEFAULT_INIT_OPTIONS, targetDir: ctx.cwd };
|
|
373
|
+
// Configuration preset
|
|
374
|
+
const preset = await select({
|
|
375
|
+
message: 'Select configuration preset:',
|
|
376
|
+
options: [
|
|
377
|
+
{ value: 'default', label: 'Default', hint: 'Recommended settings for most projects' },
|
|
378
|
+
{ value: 'minimal', label: 'Minimal', hint: 'Core features only' },
|
|
379
|
+
{ value: 'full', label: 'Full', hint: 'All features enabled' },
|
|
380
|
+
{ value: 'custom', label: 'Custom', hint: 'Choose each component' },
|
|
381
|
+
],
|
|
382
|
+
});
|
|
383
|
+
if (preset === 'minimal') {
|
|
384
|
+
Object.assign(options, MINIMAL_INIT_OPTIONS);
|
|
385
|
+
options.targetDir = ctx.cwd;
|
|
386
|
+
}
|
|
387
|
+
else if (preset === 'full') {
|
|
388
|
+
Object.assign(options, FULL_INIT_OPTIONS);
|
|
389
|
+
options.targetDir = ctx.cwd;
|
|
390
|
+
}
|
|
391
|
+
else if (preset === 'custom') {
|
|
392
|
+
// Component selection
|
|
393
|
+
const components = await multiSelect({
|
|
394
|
+
message: 'Select components to initialize:',
|
|
395
|
+
options: [
|
|
396
|
+
{ value: 'claudeMd', label: 'CLAUDE.md', hint: 'Swarm guidance and project configuration', selected: true },
|
|
397
|
+
{ value: 'settings', label: 'settings.json', hint: 'Claude Code hooks configuration', selected: true },
|
|
398
|
+
{ value: 'skills', label: 'Skills', hint: 'Claude Code skills in .claude/skills/', selected: true },
|
|
399
|
+
{ value: 'commands', label: 'Commands', hint: 'Claude Code commands in .claude/commands/', selected: true },
|
|
400
|
+
{ value: 'agents', label: 'Agents', hint: 'Agent definitions in .claude/agents/', selected: true },
|
|
401
|
+
{ value: 'helpers', label: 'Helpers', hint: 'Utility scripts in .claude/helpers/', selected: true },
|
|
402
|
+
{ value: 'statusline', label: 'Statusline', hint: 'Shell statusline integration', selected: false },
|
|
403
|
+
{ value: 'mcp', label: 'MCP', hint: '.mcp.json for MCP server configuration', selected: true },
|
|
404
|
+
{ value: 'runtime', label: 'Runtime', hint: '.claude-flow/ directory for V3 runtime', selected: true },
|
|
405
|
+
],
|
|
406
|
+
});
|
|
407
|
+
options.components.claudeMd = components.includes('claudeMd');
|
|
408
|
+
options.components.settings = components.includes('settings');
|
|
409
|
+
options.components.skills = components.includes('skills');
|
|
410
|
+
options.components.commands = components.includes('commands');
|
|
411
|
+
options.components.agents = components.includes('agents');
|
|
412
|
+
options.components.helpers = components.includes('helpers');
|
|
413
|
+
options.components.statusline = components.includes('statusline');
|
|
414
|
+
options.components.mcp = components.includes('mcp');
|
|
415
|
+
options.components.runtime = components.includes('runtime');
|
|
416
|
+
// Skills selection
|
|
417
|
+
if (options.components.skills) {
|
|
418
|
+
const skillSets = await multiSelect({
|
|
419
|
+
message: 'Select skill sets:',
|
|
420
|
+
options: [
|
|
421
|
+
{ value: 'core', label: 'Core', hint: 'Swarm, memory, SPARC skills', selected: true },
|
|
422
|
+
{ value: 'agentdb', label: 'AgentDB', hint: 'Vector database skills', selected: true },
|
|
423
|
+
{ value: 'github', label: 'GitHub', hint: 'GitHub integration skills', selected: true },
|
|
424
|
+
{ value: 'flowNexus', label: 'Flow Nexus', hint: 'Cloud platform skills', selected: false },
|
|
425
|
+
{ value: 'v3', label: 'V3', hint: 'V3 implementation skills', selected: true },
|
|
426
|
+
],
|
|
427
|
+
});
|
|
535
428
|
options.skills.core = skillSets.includes('core');
|
|
536
429
|
options.skills.agentdb = skillSets.includes('agentdb');
|
|
537
430
|
options.skills.github = skillSets.includes('github');
|
|
538
431
|
options.skills.flowNexus = skillSets.includes('flowNexus');
|
|
539
432
|
options.skills.v3 = skillSets.includes('v3');
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
case 8:
|
|
556
|
-
hooks = _b.sent();
|
|
433
|
+
}
|
|
434
|
+
// Hooks selection
|
|
435
|
+
if (options.components.settings) {
|
|
436
|
+
const hooks = await multiSelect({
|
|
437
|
+
message: 'Select hooks to enable:',
|
|
438
|
+
options: [
|
|
439
|
+
{ value: 'preToolUse', label: 'PreToolUse', hint: 'Before tool execution', selected: true },
|
|
440
|
+
{ value: 'postToolUse', label: 'PostToolUse', hint: 'After tool execution', selected: true },
|
|
441
|
+
{ value: 'userPromptSubmit', label: 'UserPromptSubmit', hint: 'Task routing', selected: true },
|
|
442
|
+
{ value: 'sessionStart', label: 'SessionStart', hint: 'Session initialization', selected: true },
|
|
443
|
+
{ value: 'stop', label: 'Stop', hint: 'Task completion evaluation', selected: true },
|
|
444
|
+
{ value: 'notification', label: 'Notification', hint: 'Swarm notifications', selected: true },
|
|
445
|
+
{ value: 'permissionRequest', label: 'PermissionRequest', hint: 'Auto-allow claude-flow tools', selected: true },
|
|
446
|
+
],
|
|
447
|
+
});
|
|
557
448
|
options.hooks.preToolUse = hooks.includes('preToolUse');
|
|
558
449
|
options.hooks.postToolUse = hooks.includes('postToolUse');
|
|
559
450
|
options.hooks.userPromptSubmit = hooks.includes('userPromptSubmit');
|
|
560
451
|
options.hooks.sessionStart = hooks.includes('sessionStart');
|
|
561
452
|
options.hooks.stop = hooks.includes('stop');
|
|
562
453
|
options.hooks.notification = hooks.includes('notification');
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
spinner.succeed('Setup complete!');
|
|
666
|
-
embeddingsInitialized = false;
|
|
667
|
-
if (!enableEmbeddings) return [3 /*break*/, 24];
|
|
668
|
-
output.writeln();
|
|
669
|
-
output.printInfo('Initializing ONNX embedding subsystem...');
|
|
670
|
-
return [4 /*yield*/, import('child_process')];
|
|
671
|
-
case 23:
|
|
672
|
-
execSync = (_b.sent()).execSync;
|
|
673
|
-
try {
|
|
674
|
-
execSync("npx @claude-flow/cli@latest embeddings init --model " + embeddingModel + " --no-download --force 2>/dev/null", {
|
|
675
|
-
stdio: 'pipe',
|
|
676
|
-
cwd: ctx.cwd,
|
|
677
|
-
timeout: 30000
|
|
678
|
-
});
|
|
679
|
-
output.writeln(output.success(' ✓ Embeddings configured'));
|
|
680
|
-
embeddingsInitialized = true;
|
|
681
|
-
}
|
|
682
|
-
catch (_c) {
|
|
683
|
-
output.writeln(output.dim(' Embeddings will be configured on first use'));
|
|
684
|
-
}
|
|
685
|
-
_b.label = 24;
|
|
686
|
-
case 24:
|
|
687
|
-
output.writeln();
|
|
688
|
-
// Summary table
|
|
689
|
-
output.printTable({
|
|
690
|
-
columns: [
|
|
691
|
-
{ key: 'setting', header: 'Setting', width: 20 },
|
|
692
|
-
{ key: 'value', header: 'Value', width: 40 },
|
|
693
|
-
],
|
|
694
|
-
data: [
|
|
695
|
-
{ setting: 'Preset', value: preset },
|
|
696
|
-
{ setting: 'Topology', value: options.runtime.topology },
|
|
697
|
-
{ setting: 'Max Agents', value: String(options.runtime.maxAgents) },
|
|
698
|
-
{ setting: 'Memory Backend', value: options.runtime.memoryBackend },
|
|
699
|
-
{ setting: 'HNSW Indexing', value: options.runtime.enableHNSW ? 'Enabled' : 'Disabled' },
|
|
700
|
-
{ setting: 'Neural Learning', value: options.runtime.enableNeural ? 'Enabled' : 'Disabled' },
|
|
701
|
-
{ setting: 'Self-Learning', value: options.runtime.enableLearningBridge ? 'LearningBridge + Graph + Scopes' : 'Disabled' },
|
|
702
|
-
{ setting: 'Embeddings', value: enableEmbeddings ? embeddingModel + " (hyperbolic)" : 'Disabled' },
|
|
703
|
-
{ setting: 'Skills', value: result.summary.skillsCount + " installed" },
|
|
704
|
-
{ setting: 'Commands', value: result.summary.commandsCount + " installed" },
|
|
705
|
-
{ setting: 'Agents', value: result.summary.agentsCount + " installed" },
|
|
706
|
-
{ setting: 'Hooks', value: result.summary.hooksEnabled + " enabled" },
|
|
707
|
-
]
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
// Swarm topology (for all presets)
|
|
457
|
+
const topology = await select({
|
|
458
|
+
message: 'Select swarm topology:',
|
|
459
|
+
options: [
|
|
460
|
+
{ value: 'hierarchical-mesh', label: 'Hierarchical Mesh', hint: 'Best for complex projects (recommended)' },
|
|
461
|
+
{ value: 'mesh', label: 'Mesh', hint: 'Peer-to-peer coordination' },
|
|
462
|
+
{ value: 'hierarchical', label: 'Hierarchical', hint: 'Tree-based coordination' },
|
|
463
|
+
{ value: 'adaptive', label: 'Adaptive', hint: 'Dynamic topology switching' },
|
|
464
|
+
],
|
|
465
|
+
});
|
|
466
|
+
options.runtime.topology = topology;
|
|
467
|
+
// Max agents
|
|
468
|
+
const maxAgents = await input({
|
|
469
|
+
message: 'Maximum concurrent agents:',
|
|
470
|
+
default: String(options.runtime.maxAgents),
|
|
471
|
+
validate: (v) => {
|
|
472
|
+
const n = parseInt(v);
|
|
473
|
+
return (!isNaN(n) && n > 0 && n <= 50) || 'Enter a number between 1 and 50';
|
|
474
|
+
},
|
|
475
|
+
});
|
|
476
|
+
options.runtime.maxAgents = parseInt(maxAgents);
|
|
477
|
+
// Memory backend
|
|
478
|
+
const memoryBackend = await select({
|
|
479
|
+
message: 'Select memory backend:',
|
|
480
|
+
options: [
|
|
481
|
+
{ value: 'hybrid', label: 'Hybrid', hint: 'SQLite + AgentDB (recommended)' },
|
|
482
|
+
{ value: 'agentdb', label: 'AgentDB', hint: '150x faster vector search' },
|
|
483
|
+
{ value: 'sqlite', label: 'SQLite', hint: 'Standard SQL storage' },
|
|
484
|
+
{ value: 'memory', label: 'In-Memory', hint: 'Fast but non-persistent' },
|
|
485
|
+
],
|
|
486
|
+
});
|
|
487
|
+
options.runtime.memoryBackend = memoryBackend;
|
|
488
|
+
// HNSW indexing
|
|
489
|
+
if (memoryBackend === 'agentdb' || memoryBackend === 'hybrid') {
|
|
490
|
+
const enableHNSW = await confirm({
|
|
491
|
+
message: 'Enable HNSW indexing for faster vector search?',
|
|
492
|
+
default: true,
|
|
493
|
+
});
|
|
494
|
+
options.runtime.enableHNSW = enableHNSW;
|
|
495
|
+
}
|
|
496
|
+
// Neural learning
|
|
497
|
+
const enableNeural = await confirm({
|
|
498
|
+
message: 'Enable neural pattern learning?',
|
|
499
|
+
default: options.runtime.enableNeural,
|
|
500
|
+
});
|
|
501
|
+
options.runtime.enableNeural = enableNeural;
|
|
502
|
+
// ADR-049: Self-Learning Memory capabilities
|
|
503
|
+
if (memoryBackend === 'agentdb' || memoryBackend === 'hybrid') {
|
|
504
|
+
const enableSelfLearning = await confirm({
|
|
505
|
+
message: 'Enable self-learning memory? (LearningBridge + Knowledge Graph + Agent Scopes)',
|
|
506
|
+
default: true,
|
|
507
|
+
});
|
|
508
|
+
options.runtime.enableLearningBridge = enableSelfLearning && enableNeural;
|
|
509
|
+
options.runtime.enableMemoryGraph = enableSelfLearning;
|
|
510
|
+
options.runtime.enableAgentScopes = enableSelfLearning;
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
options.runtime.enableLearningBridge = false;
|
|
514
|
+
options.runtime.enableMemoryGraph = false;
|
|
515
|
+
options.runtime.enableAgentScopes = false;
|
|
516
|
+
}
|
|
517
|
+
// Embeddings configuration
|
|
518
|
+
const enableEmbeddings = await confirm({
|
|
519
|
+
message: 'Enable ONNX embedding system with hyperbolic support?',
|
|
520
|
+
default: true,
|
|
521
|
+
});
|
|
522
|
+
let embeddingModel = 'all-MiniLM-L6-v2';
|
|
523
|
+
if (enableEmbeddings) {
|
|
524
|
+
embeddingModel = await select({
|
|
525
|
+
message: 'Select embedding model:',
|
|
526
|
+
options: [
|
|
527
|
+
{ value: 'all-MiniLM-L6-v2', label: 'MiniLM L6 (384d)', hint: 'Fast, good quality (recommended)' },
|
|
528
|
+
{ value: 'all-mpnet-base-v2', label: 'MPNet Base (768d)', hint: 'Higher quality, more memory' },
|
|
529
|
+
],
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
// Execute initialization
|
|
533
|
+
output.writeln();
|
|
534
|
+
const spinner = output.createSpinner({ text: 'Initializing...' });
|
|
535
|
+
spinner.start();
|
|
536
|
+
const result = await executeInit(options);
|
|
537
|
+
if (!result.success) {
|
|
538
|
+
spinner.fail('Initialization failed');
|
|
539
|
+
for (const error of result.errors) {
|
|
540
|
+
output.printError(error);
|
|
541
|
+
}
|
|
542
|
+
return { success: false, exitCode: 1 };
|
|
543
|
+
}
|
|
544
|
+
spinner.succeed('Setup complete!');
|
|
545
|
+
// Initialize embeddings if enabled
|
|
546
|
+
let embeddingsInitialized = false;
|
|
547
|
+
if (enableEmbeddings) {
|
|
548
|
+
output.writeln();
|
|
549
|
+
output.printInfo('Initializing ONNX embedding subsystem...');
|
|
550
|
+
const { execSync } = await import('child_process');
|
|
551
|
+
try {
|
|
552
|
+
execSync(`npx @claude-flow/cli@latest embeddings init --model ${embeddingModel} --no-download --force 2>/dev/null`, {
|
|
553
|
+
stdio: 'pipe',
|
|
554
|
+
cwd: ctx.cwd,
|
|
555
|
+
timeout: 30000
|
|
708
556
|
});
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
}
|
|
716
|
-
throw error_3;
|
|
717
|
-
case 26: return [2 /*return*/];
|
|
557
|
+
output.writeln(output.success(' ✓ Embeddings configured'));
|
|
558
|
+
embeddingsInitialized = true;
|
|
559
|
+
}
|
|
560
|
+
catch {
|
|
561
|
+
output.writeln(output.dim(' Embeddings will be configured on first use'));
|
|
562
|
+
}
|
|
718
563
|
}
|
|
719
|
-
|
|
720
|
-
|
|
564
|
+
output.writeln();
|
|
565
|
+
// Summary table
|
|
566
|
+
output.printTable({
|
|
567
|
+
columns: [
|
|
568
|
+
{ key: 'setting', header: 'Setting', width: 20 },
|
|
569
|
+
{ key: 'value', header: 'Value', width: 40 },
|
|
570
|
+
],
|
|
571
|
+
data: [
|
|
572
|
+
{ setting: 'Preset', value: preset },
|
|
573
|
+
{ setting: 'Topology', value: options.runtime.topology },
|
|
574
|
+
{ setting: 'Max Agents', value: String(options.runtime.maxAgents) },
|
|
575
|
+
{ setting: 'Memory Backend', value: options.runtime.memoryBackend },
|
|
576
|
+
{ setting: 'HNSW Indexing', value: options.runtime.enableHNSW ? 'Enabled' : 'Disabled' },
|
|
577
|
+
{ setting: 'Neural Learning', value: options.runtime.enableNeural ? 'Enabled' : 'Disabled' },
|
|
578
|
+
{ setting: 'Self-Learning', value: options.runtime.enableLearningBridge ? 'LearningBridge + Graph + Scopes' : 'Disabled' },
|
|
579
|
+
{ setting: 'Embeddings', value: enableEmbeddings ? `${embeddingModel} (hyperbolic)` : 'Disabled' },
|
|
580
|
+
{ setting: 'Skills', value: `${result.summary.skillsCount} installed` },
|
|
581
|
+
{ setting: 'Commands', value: `${result.summary.commandsCount} installed` },
|
|
582
|
+
{ setting: 'Agents', value: `${result.summary.agentsCount} installed` },
|
|
583
|
+
{ setting: 'Hooks', value: `${result.summary.hooksEnabled} enabled` },
|
|
584
|
+
],
|
|
585
|
+
});
|
|
586
|
+
return { success: true, data: result };
|
|
587
|
+
}
|
|
588
|
+
catch (error) {
|
|
589
|
+
if (error instanceof Error && error.message === 'User cancelled') {
|
|
590
|
+
output.printInfo('Setup cancelled');
|
|
591
|
+
return { success: true };
|
|
592
|
+
}
|
|
593
|
+
throw error;
|
|
594
|
+
}
|
|
595
|
+
},
|
|
721
596
|
};
|
|
722
597
|
// Check subcommand
|
|
723
|
-
|
|
598
|
+
const checkCommand = {
|
|
724
599
|
name: 'check',
|
|
725
600
|
description: 'Check if RuFlo is initialized',
|
|
726
|
-
action:
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
initialized
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
if (
|
|
744
|
-
output.
|
|
745
|
-
if (initialized.claude) {
|
|
746
|
-
output.printInfo(" Claude Code: .claude/settings.json");
|
|
747
|
-
}
|
|
748
|
-
if (initialized.claudeFlow) {
|
|
749
|
-
output.printInfo(" V3 Runtime: .claude-flow/config.yaml");
|
|
750
|
-
}
|
|
601
|
+
action: async (ctx) => {
|
|
602
|
+
const initialized = isInitialized(ctx.cwd);
|
|
603
|
+
const result = {
|
|
604
|
+
initialized: initialized.claude || initialized.claudeFlow,
|
|
605
|
+
claude: initialized.claude,
|
|
606
|
+
claudeFlow: initialized.claudeFlow,
|
|
607
|
+
paths: {
|
|
608
|
+
claudeSettings: initialized.claude ? path.join(ctx.cwd, '.claude', 'settings.json') : null,
|
|
609
|
+
claudeFlowConfig: initialized.claudeFlow ? path.join(ctx.cwd, '.claude-flow', 'config.yaml') : null,
|
|
610
|
+
},
|
|
611
|
+
};
|
|
612
|
+
if (ctx.flags.format === 'json') {
|
|
613
|
+
output.printJson(result);
|
|
614
|
+
return { success: true, data: result };
|
|
615
|
+
}
|
|
616
|
+
if (result.initialized) {
|
|
617
|
+
output.printSuccess('RuFlo is initialized');
|
|
618
|
+
if (initialized.claude) {
|
|
619
|
+
output.printInfo(` Claude Code: .claude/settings.json`);
|
|
751
620
|
}
|
|
752
|
-
|
|
753
|
-
output.
|
|
754
|
-
output.printInfo('Run "ruflo init" to initialize');
|
|
621
|
+
if (initialized.claudeFlow) {
|
|
622
|
+
output.printInfo(` V3 Runtime: .claude-flow/config.yaml`);
|
|
755
623
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
output.printWarning('RuFlo is not initialized in this directory');
|
|
627
|
+
output.printInfo('Run "ruflo init" to initialize');
|
|
628
|
+
}
|
|
629
|
+
return { success: true, data: result };
|
|
630
|
+
},
|
|
759
631
|
};
|
|
760
632
|
// Skills subcommand
|
|
761
|
-
|
|
633
|
+
const skillsCommand = {
|
|
762
634
|
name: 'skills',
|
|
763
635
|
description: 'Initialize only skills',
|
|
764
636
|
options: [
|
|
765
|
-
{ name: 'all', description: 'Install all skills', type: 'boolean',
|
|
766
|
-
{ name: 'core', description: 'Install core skills', type: 'boolean',
|
|
767
|
-
{ name: 'agentdb', description: 'Install AgentDB skills', type: 'boolean',
|
|
768
|
-
{ name: 'github', description: 'Install GitHub skills', type: 'boolean',
|
|
769
|
-
{ name: 'v3', description: 'Install V3 skills', type: 'boolean',
|
|
637
|
+
{ name: 'all', description: 'Install all skills', type: 'boolean', default: false },
|
|
638
|
+
{ name: 'core', description: 'Install core skills', type: 'boolean', default: true },
|
|
639
|
+
{ name: 'agentdb', description: 'Install AgentDB skills', type: 'boolean', default: false },
|
|
640
|
+
{ name: 'github', description: 'Install GitHub skills', type: 'boolean', default: false },
|
|
641
|
+
{ name: 'v3', description: 'Install V3 skills', type: 'boolean', default: false },
|
|
770
642
|
],
|
|
771
|
-
action:
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
output.printError(error);
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
return [2 /*return*/, { success: result.success, data: result }];
|
|
643
|
+
action: async (ctx) => {
|
|
644
|
+
const options = {
|
|
645
|
+
...MINIMAL_INIT_OPTIONS,
|
|
646
|
+
targetDir: ctx.cwd,
|
|
647
|
+
force: ctx.flags.force,
|
|
648
|
+
components: {
|
|
649
|
+
settings: false,
|
|
650
|
+
skills: true,
|
|
651
|
+
commands: false,
|
|
652
|
+
agents: false,
|
|
653
|
+
helpers: false,
|
|
654
|
+
statusline: false,
|
|
655
|
+
mcp: false,
|
|
656
|
+
runtime: false,
|
|
657
|
+
claudeMd: false,
|
|
658
|
+
},
|
|
659
|
+
skills: {
|
|
660
|
+
all: ctx.flags.all,
|
|
661
|
+
core: ctx.flags.core,
|
|
662
|
+
agentdb: ctx.flags.agentdb,
|
|
663
|
+
github: ctx.flags.github,
|
|
664
|
+
flowNexus: false,
|
|
665
|
+
browser: false,
|
|
666
|
+
v3: ctx.flags.v3,
|
|
667
|
+
dualMode: false,
|
|
668
|
+
},
|
|
669
|
+
};
|
|
670
|
+
const spinner = output.createSpinner({ text: 'Installing skills...' });
|
|
671
|
+
spinner.start();
|
|
672
|
+
const result = await executeInit(options);
|
|
673
|
+
if (result.success) {
|
|
674
|
+
spinner.succeed(`Installed ${result.summary.skillsCount} skills`);
|
|
675
|
+
}
|
|
676
|
+
else {
|
|
677
|
+
spinner.fail('Failed to install skills');
|
|
678
|
+
for (const error of result.errors) {
|
|
679
|
+
output.printError(error);
|
|
812
680
|
}
|
|
813
|
-
}
|
|
814
|
-
|
|
681
|
+
}
|
|
682
|
+
return { success: result.success, data: result };
|
|
683
|
+
},
|
|
815
684
|
};
|
|
816
685
|
// Hooks subcommand
|
|
817
|
-
|
|
686
|
+
const hooksCommand = {
|
|
818
687
|
name: 'hooks',
|
|
819
688
|
description: 'Initialize only hooks configuration',
|
|
820
689
|
options: [
|
|
821
|
-
{ name: 'all', description: 'Enable all hooks', type: 'boolean',
|
|
822
|
-
{ name: 'minimal', description: 'Enable only essential hooks', type: 'boolean',
|
|
690
|
+
{ name: 'all', description: 'Enable all hooks', type: 'boolean', default: true },
|
|
691
|
+
{ name: 'minimal', description: 'Enable only essential hooks', type: 'boolean', default: false },
|
|
823
692
|
],
|
|
824
|
-
action:
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
output.printError(error);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
return [2 /*return*/, { success: result.success, data: result }];
|
|
693
|
+
action: async (ctx) => {
|
|
694
|
+
const minimal = ctx.flags.minimal;
|
|
695
|
+
const options = {
|
|
696
|
+
...DEFAULT_INIT_OPTIONS,
|
|
697
|
+
targetDir: ctx.cwd,
|
|
698
|
+
force: ctx.flags.force,
|
|
699
|
+
components: {
|
|
700
|
+
settings: true,
|
|
701
|
+
skills: false,
|
|
702
|
+
commands: false,
|
|
703
|
+
agents: false,
|
|
704
|
+
helpers: false,
|
|
705
|
+
statusline: false,
|
|
706
|
+
mcp: false,
|
|
707
|
+
runtime: false,
|
|
708
|
+
claudeMd: false,
|
|
709
|
+
},
|
|
710
|
+
hooks: minimal
|
|
711
|
+
? {
|
|
712
|
+
preToolUse: true,
|
|
713
|
+
postToolUse: true,
|
|
714
|
+
userPromptSubmit: false,
|
|
715
|
+
sessionStart: false,
|
|
716
|
+
stop: false,
|
|
717
|
+
preCompact: false,
|
|
718
|
+
notification: false,
|
|
719
|
+
teammateIdle: false,
|
|
720
|
+
taskCompleted: false,
|
|
721
|
+
timeout: 5000,
|
|
722
|
+
continueOnError: true,
|
|
723
|
+
}
|
|
724
|
+
: DEFAULT_INIT_OPTIONS.hooks,
|
|
725
|
+
};
|
|
726
|
+
const spinner = output.createSpinner({ text: 'Creating hooks configuration...' });
|
|
727
|
+
spinner.start();
|
|
728
|
+
const result = await executeInit(options);
|
|
729
|
+
if (result.success) {
|
|
730
|
+
spinner.succeed(`Created settings.json with ${result.summary.hooksEnabled} hooks enabled`);
|
|
731
|
+
}
|
|
732
|
+
else {
|
|
733
|
+
spinner.fail('Failed to create hooks configuration');
|
|
734
|
+
for (const error of result.errors) {
|
|
735
|
+
output.printError(error);
|
|
871
736
|
}
|
|
872
|
-
}
|
|
873
|
-
|
|
737
|
+
}
|
|
738
|
+
return { success: result.success, data: result };
|
|
739
|
+
},
|
|
874
740
|
};
|
|
875
741
|
// Upgrade subcommand - updates helpers without losing user data
|
|
876
|
-
|
|
742
|
+
const upgradeCommand = {
|
|
877
743
|
name: 'upgrade',
|
|
878
744
|
description: 'Update statusline and helpers while preserving existing data',
|
|
879
745
|
options: [
|
|
@@ -882,144 +748,126 @@ var upgradeCommand = {
|
|
|
882
748
|
short: 'v',
|
|
883
749
|
description: 'Show detailed output',
|
|
884
750
|
type: 'boolean',
|
|
885
|
-
|
|
751
|
+
default: false,
|
|
886
752
|
},
|
|
887
753
|
{
|
|
888
754
|
name: 'add-missing',
|
|
889
755
|
short: 'a',
|
|
890
756
|
description: 'Add any new skills, agents, and commands that are missing',
|
|
891
757
|
type: 'boolean',
|
|
892
|
-
|
|
758
|
+
default: false,
|
|
893
759
|
},
|
|
894
760
|
{
|
|
895
761
|
name: 'settings',
|
|
896
762
|
short: 's',
|
|
897
763
|
description: 'Merge new settings (Agent Teams, hooks) into existing settings.json',
|
|
898
764
|
type: 'boolean',
|
|
899
|
-
|
|
765
|
+
default: false,
|
|
900
766
|
},
|
|
901
767
|
],
|
|
902
|
-
action:
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
case 2:
|
|
936
|
-
_a = _f.sent();
|
|
937
|
-
return [3 /*break*/, 5];
|
|
938
|
-
case 3: return [4 /*yield*/, executeUpgrade(ctx.cwd, upgradeSettings)];
|
|
939
|
-
case 4:
|
|
940
|
-
_a = _f.sent();
|
|
941
|
-
_f.label = 5;
|
|
942
|
-
case 5:
|
|
943
|
-
result = _a;
|
|
944
|
-
if (!result.success) {
|
|
945
|
-
spinner.fail('Upgrade failed');
|
|
946
|
-
for (_i = 0, _b = result.errors; _i < _b.length; _i++) {
|
|
947
|
-
error = _b[_i];
|
|
948
|
-
output.printError(error);
|
|
949
|
-
}
|
|
950
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
951
|
-
}
|
|
952
|
-
spinner.succeed('Upgrade complete!');
|
|
953
|
-
output.writeln();
|
|
954
|
-
// Show what was updated
|
|
955
|
-
if (result.updated.length > 0) {
|
|
956
|
-
output.printBox(result.updated.map(function (f) { return "\u2713 " + f; }).join('\n'), 'Updated (latest version)');
|
|
957
|
-
output.writeln();
|
|
958
|
-
}
|
|
959
|
-
// Show what was created
|
|
960
|
-
if (result.created.length > 0) {
|
|
961
|
-
output.printBox(result.created.map(function (f) { return "+ " + f; }).join('\n'), 'Created (new files)');
|
|
962
|
-
output.writeln();
|
|
963
|
-
}
|
|
964
|
-
// Show what was preserved
|
|
965
|
-
if (result.preserved.length > 0 && ctx.flags.verbose) {
|
|
966
|
-
output.printBox(result.preserved.map(function (f) { return "\u2022 " + f; }).join('\n'), 'Preserved (existing data kept)');
|
|
967
|
-
output.writeln();
|
|
968
|
-
}
|
|
969
|
-
else if (result.preserved.length > 0) {
|
|
970
|
-
output.printInfo("Preserved " + result.preserved.length + " existing data files");
|
|
971
|
-
output.writeln();
|
|
972
|
-
}
|
|
973
|
-
// Show added assets (when --add-missing flag is used)
|
|
974
|
-
if (result.addedSkills && result.addedSkills.length > 0) {
|
|
975
|
-
output.printBox(result.addedSkills.map(function (s) { return "+ " + s; }).join('\n'), "Added Skills (" + result.addedSkills.length + " new)");
|
|
976
|
-
output.writeln();
|
|
977
|
-
}
|
|
978
|
-
if (result.addedAgents && result.addedAgents.length > 0) {
|
|
979
|
-
output.printBox(result.addedAgents.map(function (a) { return "+ " + a; }).join('\n'), "Added Agents (" + result.addedAgents.length + " new)");
|
|
980
|
-
output.writeln();
|
|
981
|
-
}
|
|
982
|
-
if (result.addedCommands && result.addedCommands.length > 0) {
|
|
983
|
-
output.printBox(result.addedCommands.map(function (c) { return "+ " + c; }).join('\n'), "Added Commands (" + result.addedCommands.length + " new)");
|
|
984
|
-
output.writeln();
|
|
985
|
-
}
|
|
986
|
-
// Show settings updates
|
|
987
|
-
if (result.settingsUpdated && result.settingsUpdated.length > 0) {
|
|
988
|
-
output.printBox(result.settingsUpdated.map(function (s) { return "+ " + s; }).join('\n'), 'Settings Updated');
|
|
989
|
-
output.writeln();
|
|
990
|
-
}
|
|
991
|
-
output.printSuccess('Your statusline helper has been updated to the latest version');
|
|
992
|
-
output.printInfo('Existing metrics and learning data were preserved');
|
|
993
|
-
// Show settings summary
|
|
994
|
-
if (upgradeSettings && result.settingsUpdated && result.settingsUpdated.length > 0) {
|
|
995
|
-
output.printSuccess('Settings.json updated with new Agent Teams configuration');
|
|
996
|
-
}
|
|
997
|
-
// Show summary for --add-missing
|
|
998
|
-
if (addMissing) {
|
|
999
|
-
totalAdded = (((_c = result.addedSkills) === null || _c === void 0 ? void 0 : _c.length) || 0) + (((_d = result.addedAgents) === null || _d === void 0 ? void 0 : _d.length) || 0) + (((_e = result.addedCommands) === null || _e === void 0 ? void 0 : _e.length) || 0);
|
|
1000
|
-
if (totalAdded > 0) {
|
|
1001
|
-
output.printSuccess("Added " + totalAdded + " missing assets to your project");
|
|
1002
|
-
}
|
|
1003
|
-
else {
|
|
1004
|
-
output.printInfo('All skills, agents, and commands are already up to date');
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
if (ctx.flags.format === 'json') {
|
|
1008
|
-
output.printJson(result);
|
|
1009
|
-
}
|
|
1010
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
1011
|
-
case 6:
|
|
1012
|
-
error_4 = _f.sent();
|
|
1013
|
-
spinner.fail('Upgrade failed');
|
|
1014
|
-
output.printError("Failed to upgrade: " + (error_4 instanceof Error ? error_4.message : String(error_4)));
|
|
1015
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1016
|
-
case 7: return [2 /*return*/];
|
|
768
|
+
action: async (ctx) => {
|
|
769
|
+
const addMissing = (ctx.flags['add-missing'] || ctx.flags.addMissing);
|
|
770
|
+
const upgradeSettings = (ctx.flags.settings);
|
|
771
|
+
output.writeln();
|
|
772
|
+
output.writeln(output.bold('Upgrading RuFlo'));
|
|
773
|
+
if (addMissing && upgradeSettings) {
|
|
774
|
+
output.writeln(output.dim('Updates helpers, settings, and adds any missing skills/agents/commands'));
|
|
775
|
+
}
|
|
776
|
+
else if (addMissing) {
|
|
777
|
+
output.writeln(output.dim('Updates helpers and adds any missing skills/agents/commands'));
|
|
778
|
+
}
|
|
779
|
+
else if (upgradeSettings) {
|
|
780
|
+
output.writeln(output.dim('Updates helpers and merges new settings (Agent Teams, hooks)'));
|
|
781
|
+
}
|
|
782
|
+
else {
|
|
783
|
+
output.writeln(output.dim('Updates helpers while preserving your existing data'));
|
|
784
|
+
}
|
|
785
|
+
output.writeln();
|
|
786
|
+
const spinnerText = upgradeSettings
|
|
787
|
+
? 'Upgrading helpers and settings...'
|
|
788
|
+
: (addMissing ? 'Upgrading and adding missing assets...' : 'Upgrading...');
|
|
789
|
+
const spinner = output.createSpinner({ text: spinnerText });
|
|
790
|
+
spinner.start();
|
|
791
|
+
try {
|
|
792
|
+
const result = addMissing
|
|
793
|
+
? await executeUpgradeWithMissing(ctx.cwd, upgradeSettings)
|
|
794
|
+
: await executeUpgrade(ctx.cwd, upgradeSettings);
|
|
795
|
+
if (!result.success) {
|
|
796
|
+
spinner.fail('Upgrade failed');
|
|
797
|
+
for (const error of result.errors) {
|
|
798
|
+
output.printError(error);
|
|
799
|
+
}
|
|
800
|
+
return { success: false, exitCode: 1 };
|
|
1017
801
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
802
|
+
spinner.succeed('Upgrade complete!');
|
|
803
|
+
output.writeln();
|
|
804
|
+
// Show what was updated
|
|
805
|
+
if (result.updated.length > 0) {
|
|
806
|
+
output.printBox(result.updated.map(f => `✓ ${f}`).join('\n'), 'Updated (latest version)');
|
|
807
|
+
output.writeln();
|
|
808
|
+
}
|
|
809
|
+
// Show what was created
|
|
810
|
+
if (result.created.length > 0) {
|
|
811
|
+
output.printBox(result.created.map(f => `+ ${f}`).join('\n'), 'Created (new files)');
|
|
812
|
+
output.writeln();
|
|
813
|
+
}
|
|
814
|
+
// Show what was preserved
|
|
815
|
+
if (result.preserved.length > 0 && ctx.flags.verbose) {
|
|
816
|
+
output.printBox(result.preserved.map(f => `• ${f}`).join('\n'), 'Preserved (existing data kept)');
|
|
817
|
+
output.writeln();
|
|
818
|
+
}
|
|
819
|
+
else if (result.preserved.length > 0) {
|
|
820
|
+
output.printInfo(`Preserved ${result.preserved.length} existing data files`);
|
|
821
|
+
output.writeln();
|
|
822
|
+
}
|
|
823
|
+
// Show added assets (when --add-missing flag is used)
|
|
824
|
+
if (result.addedSkills && result.addedSkills.length > 0) {
|
|
825
|
+
output.printBox(result.addedSkills.map(s => `+ ${s}`).join('\n'), `Added Skills (${result.addedSkills.length} new)`);
|
|
826
|
+
output.writeln();
|
|
827
|
+
}
|
|
828
|
+
if (result.addedAgents && result.addedAgents.length > 0) {
|
|
829
|
+
output.printBox(result.addedAgents.map(a => `+ ${a}`).join('\n'), `Added Agents (${result.addedAgents.length} new)`);
|
|
830
|
+
output.writeln();
|
|
831
|
+
}
|
|
832
|
+
if (result.addedCommands && result.addedCommands.length > 0) {
|
|
833
|
+
output.printBox(result.addedCommands.map(c => `+ ${c}`).join('\n'), `Added Commands (${result.addedCommands.length} new)`);
|
|
834
|
+
output.writeln();
|
|
835
|
+
}
|
|
836
|
+
// Show settings updates
|
|
837
|
+
if (result.settingsUpdated && result.settingsUpdated.length > 0) {
|
|
838
|
+
output.printBox(result.settingsUpdated.map(s => `+ ${s}`).join('\n'), 'Settings Updated');
|
|
839
|
+
output.writeln();
|
|
840
|
+
}
|
|
841
|
+
output.printSuccess('Your statusline helper has been updated to the latest version');
|
|
842
|
+
output.printInfo('Existing metrics and learning data were preserved');
|
|
843
|
+
// Show settings summary
|
|
844
|
+
if (upgradeSettings && result.settingsUpdated && result.settingsUpdated.length > 0) {
|
|
845
|
+
output.printSuccess('Settings.json updated with new Agent Teams configuration');
|
|
846
|
+
}
|
|
847
|
+
// Show summary for --add-missing
|
|
848
|
+
if (addMissing) {
|
|
849
|
+
const totalAdded = (result.addedSkills?.length || 0) + (result.addedAgents?.length || 0) + (result.addedCommands?.length || 0);
|
|
850
|
+
if (totalAdded > 0) {
|
|
851
|
+
output.printSuccess(`Added ${totalAdded} missing assets to your project`);
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
output.printInfo('All skills, agents, and commands are already up to date');
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
if (ctx.flags.format === 'json') {
|
|
858
|
+
output.printJson(result);
|
|
859
|
+
}
|
|
860
|
+
return { success: true, data: result };
|
|
861
|
+
}
|
|
862
|
+
catch (error) {
|
|
863
|
+
spinner.fail('Upgrade failed');
|
|
864
|
+
output.printError(`Failed to upgrade: ${error instanceof Error ? error.message : String(error)}`);
|
|
865
|
+
return { success: false, exitCode: 1 };
|
|
866
|
+
}
|
|
867
|
+
},
|
|
1020
868
|
};
|
|
1021
869
|
// Main init command
|
|
1022
|
-
export
|
|
870
|
+
export const initCommand = {
|
|
1023
871
|
name: 'init',
|
|
1024
872
|
description: 'Initialize RuFlo in the current directory',
|
|
1025
873
|
subcommands: [wizardCommand, checkCommand, skillsCommand, hooksCommand, upgradeCommand],
|
|
@@ -1029,69 +877,69 @@ export var initCommand = {
|
|
|
1029
877
|
short: 'f',
|
|
1030
878
|
description: 'Overwrite existing configuration',
|
|
1031
879
|
type: 'boolean',
|
|
1032
|
-
|
|
880
|
+
default: false,
|
|
1033
881
|
},
|
|
1034
882
|
{
|
|
1035
883
|
name: 'minimal',
|
|
1036
884
|
short: 'm',
|
|
1037
885
|
description: 'Create minimal configuration',
|
|
1038
886
|
type: 'boolean',
|
|
1039
|
-
|
|
887
|
+
default: false,
|
|
1040
888
|
},
|
|
1041
889
|
{
|
|
1042
890
|
name: 'full',
|
|
1043
891
|
description: 'Create full configuration with all components',
|
|
1044
892
|
type: 'boolean',
|
|
1045
|
-
|
|
893
|
+
default: false,
|
|
1046
894
|
},
|
|
1047
895
|
{
|
|
1048
896
|
name: 'skip-claude',
|
|
1049
897
|
description: 'Skip .claude/ directory creation (runtime only)',
|
|
1050
898
|
type: 'boolean',
|
|
1051
|
-
|
|
899
|
+
default: false,
|
|
1052
900
|
},
|
|
1053
901
|
{
|
|
1054
902
|
name: 'only-claude',
|
|
1055
903
|
description: 'Only create .claude/ directory (skip runtime)',
|
|
1056
904
|
type: 'boolean',
|
|
1057
|
-
|
|
905
|
+
default: false,
|
|
1058
906
|
},
|
|
1059
907
|
{
|
|
1060
908
|
name: 'start-all',
|
|
1061
909
|
description: 'Auto-start daemon, memory, and swarm after init',
|
|
1062
910
|
type: 'boolean',
|
|
1063
|
-
|
|
911
|
+
default: false,
|
|
1064
912
|
},
|
|
1065
913
|
{
|
|
1066
914
|
name: 'start-daemon',
|
|
1067
915
|
description: 'Auto-start daemon after init',
|
|
1068
916
|
type: 'boolean',
|
|
1069
|
-
|
|
917
|
+
default: false,
|
|
1070
918
|
},
|
|
1071
919
|
{
|
|
1072
920
|
name: 'with-embeddings',
|
|
1073
921
|
description: 'Initialize ONNX embedding subsystem with hyperbolic support',
|
|
1074
922
|
type: 'boolean',
|
|
1075
|
-
|
|
923
|
+
default: false,
|
|
1076
924
|
},
|
|
1077
925
|
{
|
|
1078
926
|
name: 'embedding-model',
|
|
1079
927
|
description: 'ONNX embedding model to use',
|
|
1080
928
|
type: 'string',
|
|
1081
|
-
|
|
1082
|
-
choices: ['all-MiniLM-L6-v2', 'all-mpnet-base-v2']
|
|
929
|
+
default: 'all-MiniLM-L6-v2',
|
|
930
|
+
choices: ['all-MiniLM-L6-v2', 'all-mpnet-base-v2'],
|
|
1083
931
|
},
|
|
1084
932
|
{
|
|
1085
933
|
name: 'codex',
|
|
1086
934
|
description: 'Initialize for OpenAI Codex CLI (creates AGENTS.md, .agents/)',
|
|
1087
935
|
type: 'boolean',
|
|
1088
|
-
|
|
936
|
+
default: false,
|
|
1089
937
|
},
|
|
1090
938
|
{
|
|
1091
939
|
name: 'dual',
|
|
1092
940
|
description: 'Initialize for both Claude Code and OpenAI Codex',
|
|
1093
941
|
type: 'boolean',
|
|
1094
|
-
|
|
942
|
+
default: false,
|
|
1095
943
|
},
|
|
1096
944
|
],
|
|
1097
945
|
examples: [
|
|
@@ -1115,7 +963,7 @@ export var initCommand = {
|
|
|
1115
963
|
{ command: 'claude-flow init --codex --full', description: 'Codex init with all 137+ skills' },
|
|
1116
964
|
{ command: 'claude-flow init --dual', description: 'Initialize for both Claude Code and Codex' },
|
|
1117
965
|
],
|
|
1118
|
-
action: initAction
|
|
966
|
+
action: initAction,
|
|
1119
967
|
};
|
|
1120
968
|
export default initCommand;
|
|
1121
969
|
//# sourceMappingURL=init.js.map
|