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