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,38 +1,86 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* V3 CLI Start Command
|
|
3
|
-
* System startup for
|
|
3
|
+
* System startup for Claude Flow orchestration
|
|
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 } from '../prompt.js';
|
|
7
54
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
8
55
|
import * as fs from 'fs';
|
|
9
56
|
import * as path from 'path';
|
|
10
57
|
// Default configuration
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
58
|
+
var DEFAULT_PORT = 3000;
|
|
59
|
+
var DEFAULT_TOPOLOGY = 'hierarchical-mesh';
|
|
60
|
+
var DEFAULT_MAX_AGENTS = 15;
|
|
14
61
|
// Check if project is initialized
|
|
15
62
|
function isInitialized(cwd) {
|
|
16
|
-
|
|
63
|
+
var configPath = path.join(cwd, '.claude-flow', 'config.yaml');
|
|
17
64
|
return fs.existsSync(configPath);
|
|
18
65
|
}
|
|
19
66
|
// Simple YAML parser for config (basic implementation)
|
|
20
67
|
function parseSimpleYaml(content) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
68
|
+
var result = {};
|
|
69
|
+
var lines = content.split('\n');
|
|
70
|
+
var stack = [
|
|
24
71
|
{ indent: -1, obj: result }
|
|
25
72
|
];
|
|
26
|
-
for (
|
|
73
|
+
for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
|
|
74
|
+
var line = lines_1[_i];
|
|
27
75
|
// Skip comments and empty lines
|
|
28
76
|
if (line.trim().startsWith('#') || line.trim() === '')
|
|
29
77
|
continue;
|
|
30
|
-
|
|
78
|
+
var match = line.match(/^(\s*)(\w+):\s*(.*)$/);
|
|
31
79
|
if (!match)
|
|
32
80
|
continue;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
81
|
+
var indent = match[1].length;
|
|
82
|
+
var key = match[2];
|
|
83
|
+
var value = match[3].trim();
|
|
36
84
|
// Parse value
|
|
37
85
|
if (value === '' || value === undefined) {
|
|
38
86
|
value = {};
|
|
@@ -56,10 +104,10 @@ function parseSimpleYaml(content) {
|
|
|
56
104
|
while (stack.length > 1 && stack[stack.length - 1].indent >= indent) {
|
|
57
105
|
stack.pop();
|
|
58
106
|
}
|
|
59
|
-
|
|
107
|
+
var parent = stack[stack.length - 1].obj;
|
|
60
108
|
if (typeof value === 'object' && value !== null) {
|
|
61
109
|
parent[key] = value;
|
|
62
|
-
stack.push({ indent, obj: value, key });
|
|
110
|
+
stack.push({ indent: indent, obj: value, key: key });
|
|
63
111
|
}
|
|
64
112
|
else {
|
|
65
113
|
parent[key] = value;
|
|
@@ -69,310 +117,359 @@ function parseSimpleYaml(content) {
|
|
|
69
117
|
}
|
|
70
118
|
// Load configuration
|
|
71
119
|
function loadConfig(cwd) {
|
|
72
|
-
|
|
120
|
+
var configPath = path.join(cwd, '.claude-flow', 'config.yaml');
|
|
73
121
|
if (!fs.existsSync(configPath))
|
|
74
122
|
return null;
|
|
75
123
|
try {
|
|
76
|
-
|
|
124
|
+
var content = fs.readFileSync(configPath, 'utf-8');
|
|
77
125
|
return parseSimpleYaml(content);
|
|
78
126
|
}
|
|
79
|
-
catch {
|
|
127
|
+
catch (_a) {
|
|
80
128
|
return null;
|
|
81
129
|
}
|
|
82
130
|
}
|
|
83
131
|
// Main start action
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
spinner.
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
var startAction = function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
133
|
+
var daemon, port, topology, skipMcp, cwd, config, swarmConfig, mcpConfig, finalTopology, maxAgents, autoStartMcp, mcpPort, spinner, swarmResult, mcpResult, error_1, healthResult, daemonPidPath_1, keepAlive_1, result, error_2;
|
|
134
|
+
var _a, _b, _c, _d, _e, _f;
|
|
135
|
+
return __generator(this, function (_g) {
|
|
136
|
+
switch (_g.label) {
|
|
137
|
+
case 0:
|
|
138
|
+
daemon = ctx.flags.daemon;
|
|
139
|
+
port = ctx.flags.port || DEFAULT_PORT;
|
|
140
|
+
topology = ctx.flags.topology || DEFAULT_TOPOLOGY;
|
|
141
|
+
skipMcp = ctx.flags['skip-mcp'];
|
|
142
|
+
cwd = ctx.cwd;
|
|
143
|
+
// Check initialization
|
|
144
|
+
if (!isInitialized(cwd)) {
|
|
145
|
+
output.printError('RuFlo is not initialized in this directory');
|
|
146
|
+
output.printInfo('Run "ruflo init" first to initialize');
|
|
147
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
148
|
+
}
|
|
149
|
+
config = loadConfig(cwd);
|
|
150
|
+
swarmConfig = (config === null || config === void 0 ? void 0 : config.swarm) || {};
|
|
151
|
+
mcpConfig = (config === null || config === void 0 ? void 0 : config.mcp) || {};
|
|
152
|
+
finalTopology = topology || swarmConfig.topology || DEFAULT_TOPOLOGY;
|
|
153
|
+
maxAgents = swarmConfig.maxAgents || DEFAULT_MAX_AGENTS;
|
|
154
|
+
autoStartMcp = mcpConfig.autoStart !== false && !skipMcp;
|
|
155
|
+
mcpPort = port || mcpConfig.serverPort || DEFAULT_PORT;
|
|
156
|
+
output.writeln();
|
|
157
|
+
output.writeln(output.bold('Starting RuFlo V3'));
|
|
158
|
+
output.writeln();
|
|
159
|
+
spinner = output.createSpinner({ text: 'Initializing system...' });
|
|
160
|
+
_g.label = 1;
|
|
161
|
+
case 1:
|
|
162
|
+
_g.trys.push([1, 8, , 9]);
|
|
163
|
+
// Step 1: Initialize swarm
|
|
164
|
+
spinner.start();
|
|
165
|
+
spinner.setText('Initializing V3 swarm...');
|
|
166
|
+
return [4 /*yield*/, callMCPTool('swarm_init', {
|
|
167
|
+
topology: finalTopology,
|
|
168
|
+
maxAgents: maxAgents,
|
|
169
|
+
autoScaling: swarmConfig.autoScale !== false,
|
|
170
|
+
v3Mode: true
|
|
171
|
+
})];
|
|
172
|
+
case 2:
|
|
173
|
+
swarmResult = _g.sent();
|
|
174
|
+
spinner.succeed("Swarm initialized (" + finalTopology + ")");
|
|
175
|
+
mcpResult = null;
|
|
176
|
+
if (!autoStartMcp) return [3 /*break*/, 6];
|
|
177
|
+
spinner.setText('Starting MCP server...');
|
|
178
|
+
spinner.start();
|
|
179
|
+
_g.label = 3;
|
|
180
|
+
case 3:
|
|
181
|
+
_g.trys.push([3, 5, , 6]);
|
|
182
|
+
return [4 /*yield*/, callMCPTool('mcp_start', {
|
|
183
|
+
port: mcpPort,
|
|
184
|
+
transport: mcpConfig.transportType || 'stdio',
|
|
185
|
+
tools: mcpConfig.tools || ['agent', 'swarm', 'memory', 'task']
|
|
186
|
+
})];
|
|
187
|
+
case 4:
|
|
188
|
+
mcpResult = _g.sent();
|
|
189
|
+
spinner.succeed("MCP server started on port " + mcpPort);
|
|
190
|
+
return [3 /*break*/, 6];
|
|
191
|
+
case 5:
|
|
192
|
+
error_1 = _g.sent();
|
|
133
193
|
spinner.fail('MCP server failed to start');
|
|
134
|
-
output.printWarning(
|
|
135
|
-
?
|
|
136
|
-
: String(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
else {
|
|
150
|
-
spinner.fail(`Health check: ${healthResult.status}`);
|
|
151
|
-
}
|
|
152
|
-
// Success output
|
|
153
|
-
output.writeln();
|
|
154
|
-
output.printSuccess('KynjalFlow V3 is running!');
|
|
155
|
-
output.writeln();
|
|
156
|
-
// Status display
|
|
157
|
-
output.printBox([
|
|
158
|
-
`Swarm ID: ${swarmResult.swarmId}`,
|
|
159
|
-
`Topology: ${finalTopology}`,
|
|
160
|
-
`Max Agents: ${maxAgents}`,
|
|
161
|
-
`MCP Server: ${autoStartMcp ? `localhost:${mcpPort}` : 'disabled'}`,
|
|
162
|
-
`Mode: ${daemon ? 'Daemon' : 'Foreground'}`,
|
|
163
|
-
`Health: ${healthResult.status}`
|
|
164
|
-
].join('\n'), 'System Status');
|
|
165
|
-
output.writeln();
|
|
166
|
-
output.writeln(output.bold('Quick Commands:'));
|
|
167
|
-
output.printList([
|
|
168
|
-
`${output.highlight('claude-flow status')} - View system status`,
|
|
169
|
-
`${output.highlight('claude-flow agent spawn -t coder')} - Spawn an agent`,
|
|
170
|
-
`${output.highlight('claude-flow swarm status')} - View swarm details`,
|
|
171
|
-
`${output.highlight('claude-flow stop')} - Stop the system`
|
|
172
|
-
]);
|
|
173
|
-
// Daemon mode
|
|
174
|
-
if (daemon) {
|
|
175
|
-
output.writeln();
|
|
176
|
-
output.printInfo('Running in daemon mode. Use "claude-flow stop" to stop.');
|
|
177
|
-
// Store PID for daemon management
|
|
178
|
-
const daemonPidPath = path.join(cwd, '.claude-flow', 'daemon.pid');
|
|
179
|
-
fs.writeFileSync(daemonPidPath, String(process.pid));
|
|
180
|
-
// Detach from parent process for true daemon behavior
|
|
181
|
-
if (process.platform !== 'win32') {
|
|
182
|
-
// Unix-like systems: create new session
|
|
183
|
-
try {
|
|
184
|
-
process.stdin.unref?.();
|
|
185
|
-
process.stdout.unref?.();
|
|
186
|
-
process.stderr.unref?.();
|
|
194
|
+
output.printWarning(error_1 instanceof MCPClientError
|
|
195
|
+
? error_1.message
|
|
196
|
+
: String(error_1));
|
|
197
|
+
return [3 /*break*/, 6];
|
|
198
|
+
case 6:
|
|
199
|
+
// Step 3: Run health check
|
|
200
|
+
spinner.setText('Running health checks...');
|
|
201
|
+
spinner.start();
|
|
202
|
+
return [4 /*yield*/, callMCPTool('swarm_health', {
|
|
203
|
+
swarmId: swarmResult.swarmId
|
|
204
|
+
})];
|
|
205
|
+
case 7:
|
|
206
|
+
healthResult = _g.sent();
|
|
207
|
+
if (healthResult.status === 'healthy') {
|
|
208
|
+
spinner.succeed('Health checks passed');
|
|
187
209
|
}
|
|
188
|
-
|
|
189
|
-
|
|
210
|
+
else {
|
|
211
|
+
spinner.fail("Health check: " + healthResult.status);
|
|
190
212
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
213
|
+
// Success output
|
|
214
|
+
output.writeln();
|
|
215
|
+
output.printSuccess('RuFlo V3 is running!');
|
|
216
|
+
output.writeln();
|
|
217
|
+
// Status display
|
|
218
|
+
output.printBox([
|
|
219
|
+
"Swarm ID: " + swarmResult.swarmId,
|
|
220
|
+
"Topology: " + finalTopology,
|
|
221
|
+
"Max Agents: " + maxAgents,
|
|
222
|
+
"MCP Server: " + (autoStartMcp ? "localhost:" + mcpPort : 'disabled'),
|
|
223
|
+
"Mode: " + (daemon ? 'Daemon' : 'Foreground'),
|
|
224
|
+
"Health: " + healthResult.status
|
|
225
|
+
].join('\n'), 'System Status');
|
|
226
|
+
output.writeln();
|
|
227
|
+
output.writeln(output.bold('Quick Commands:'));
|
|
228
|
+
output.printList([
|
|
229
|
+
output.highlight('claude-flow status') + " - View system status",
|
|
230
|
+
output.highlight('claude-flow agent spawn -t coder') + " - Spawn an agent",
|
|
231
|
+
output.highlight('claude-flow swarm status') + " - View swarm details",
|
|
232
|
+
output.highlight('claude-flow stop') + " - Stop the system"
|
|
233
|
+
]);
|
|
234
|
+
// Daemon mode
|
|
235
|
+
if (daemon) {
|
|
236
|
+
output.writeln();
|
|
237
|
+
output.printInfo('Running in daemon mode. Use "claude-flow stop" to stop.');
|
|
238
|
+
daemonPidPath_1 = path.join(cwd, '.claude-flow', 'daemon.pid');
|
|
239
|
+
fs.writeFileSync(daemonPidPath_1, String(process.pid));
|
|
240
|
+
// Detach from parent process for true daemon behavior
|
|
241
|
+
if (process.platform !== 'win32') {
|
|
242
|
+
// Unix-like systems: create new session
|
|
243
|
+
try {
|
|
244
|
+
(_b = (_a = process.stdin).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
245
|
+
(_d = (_c = process.stdout).unref) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
246
|
+
(_f = (_e = process.stderr).unref) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
247
|
+
}
|
|
248
|
+
catch (_h) {
|
|
249
|
+
// Ignore errors if streams can't be unref'd
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
keepAlive_1 = setInterval(function () {
|
|
253
|
+
// Heartbeat - check if we should still be running
|
|
254
|
+
if (!fs.existsSync(daemonPidPath_1)) {
|
|
255
|
+
clearInterval(keepAlive_1);
|
|
256
|
+
process.exit(0);
|
|
257
|
+
}
|
|
258
|
+
}, 5000);
|
|
259
|
+
keepAlive_1.unref(); // Don't prevent process from exiting if no other work
|
|
198
260
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
261
|
+
result = {
|
|
262
|
+
swarmId: swarmResult.swarmId,
|
|
263
|
+
topology: finalTopology,
|
|
264
|
+
maxAgents: maxAgents,
|
|
265
|
+
mcp: mcpResult ? {
|
|
266
|
+
port: mcpPort,
|
|
267
|
+
transport: mcpConfig.transportType || 'stdio'
|
|
268
|
+
} : null,
|
|
269
|
+
health: healthResult.status,
|
|
270
|
+
daemon: daemon,
|
|
271
|
+
startedAt: new Date().toISOString()
|
|
272
|
+
};
|
|
273
|
+
if (ctx.flags.format === 'json') {
|
|
274
|
+
output.printJson(result);
|
|
275
|
+
}
|
|
276
|
+
return [2 /*return*/, { success: true, data: result }];
|
|
277
|
+
case 8:
|
|
278
|
+
error_2 = _g.sent();
|
|
279
|
+
spinner.fail('Startup failed');
|
|
280
|
+
if (error_2 instanceof MCPClientError) {
|
|
281
|
+
output.printError("Failed to start: " + error_2.message);
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
output.printError("Unexpected error: " + String(error_2));
|
|
285
|
+
}
|
|
286
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
287
|
+
case 9: return [2 /*return*/];
|
|
226
288
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
};
|
|
289
|
+
});
|
|
290
|
+
}); };
|
|
230
291
|
// Stop subcommand
|
|
231
|
-
|
|
292
|
+
var stopCommand = {
|
|
232
293
|
name: 'stop',
|
|
233
|
-
description: 'Stop the
|
|
294
|
+
description: 'Stop the RuFlo system',
|
|
234
295
|
options: [
|
|
235
296
|
{
|
|
236
297
|
name: 'force',
|
|
237
298
|
short: 'f',
|
|
238
299
|
description: 'Force stop without graceful shutdown',
|
|
239
300
|
type: 'boolean',
|
|
240
|
-
default: false
|
|
301
|
+
"default": false
|
|
241
302
|
},
|
|
242
303
|
{
|
|
243
304
|
name: 'timeout',
|
|
244
305
|
description: 'Shutdown timeout in seconds',
|
|
245
306
|
type: 'number',
|
|
246
|
-
default: 30
|
|
307
|
+
"default": 30
|
|
247
308
|
}
|
|
248
309
|
],
|
|
249
|
-
action:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
graceful: !force,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
310
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
311
|
+
var force, timeout, confirmed, spinner, _a, _b, daemonPidPath, error_3;
|
|
312
|
+
return __generator(this, function (_c) {
|
|
313
|
+
switch (_c.label) {
|
|
314
|
+
case 0:
|
|
315
|
+
force = ctx.flags.force;
|
|
316
|
+
timeout = ctx.flags.timeout;
|
|
317
|
+
output.writeln();
|
|
318
|
+
output.writeln(output.bold('Stopping RuFlo'));
|
|
319
|
+
output.writeln();
|
|
320
|
+
if (!(!force && ctx.interactive)) return [3 /*break*/, 2];
|
|
321
|
+
return [4 /*yield*/, confirm({
|
|
322
|
+
message: 'Are you sure you want to stop RuFlo?',
|
|
323
|
+
"default": false
|
|
324
|
+
})];
|
|
325
|
+
case 1:
|
|
326
|
+
confirmed = _c.sent();
|
|
327
|
+
if (!confirmed) {
|
|
328
|
+
output.printInfo('Operation cancelled');
|
|
329
|
+
return [2 /*return*/, { success: true }];
|
|
330
|
+
}
|
|
331
|
+
_c.label = 2;
|
|
332
|
+
case 2:
|
|
333
|
+
spinner = output.createSpinner({ text: 'Stopping system...' });
|
|
334
|
+
spinner.start();
|
|
335
|
+
_c.label = 3;
|
|
336
|
+
case 3:
|
|
337
|
+
_c.trys.push([3, 12, , 13]);
|
|
338
|
+
// Stop MCP server
|
|
339
|
+
spinner.setText('Stopping MCP server...');
|
|
340
|
+
_c.label = 4;
|
|
341
|
+
case 4:
|
|
342
|
+
_c.trys.push([4, 6, , 7]);
|
|
343
|
+
return [4 /*yield*/, callMCPTool('mcp_stop', { graceful: !force, timeout: timeout })];
|
|
344
|
+
case 5:
|
|
345
|
+
_c.sent();
|
|
346
|
+
spinner.succeed('MCP server stopped');
|
|
347
|
+
return [3 /*break*/, 7];
|
|
348
|
+
case 6:
|
|
349
|
+
_a = _c.sent();
|
|
350
|
+
spinner.fail('MCP server was not running');
|
|
351
|
+
return [3 /*break*/, 7];
|
|
352
|
+
case 7:
|
|
353
|
+
// Stop swarm
|
|
354
|
+
spinner.setText('Stopping swarm...');
|
|
355
|
+
spinner.start();
|
|
356
|
+
_c.label = 8;
|
|
357
|
+
case 8:
|
|
358
|
+
_c.trys.push([8, 10, , 11]);
|
|
359
|
+
return [4 /*yield*/, callMCPTool('swarm_stop', {
|
|
360
|
+
graceful: !force,
|
|
361
|
+
timeout: timeout,
|
|
362
|
+
saveState: true
|
|
363
|
+
})];
|
|
364
|
+
case 9:
|
|
365
|
+
_c.sent();
|
|
366
|
+
spinner.succeed('Swarm stopped');
|
|
367
|
+
return [3 /*break*/, 11];
|
|
368
|
+
case 10:
|
|
369
|
+
_b = _c.sent();
|
|
370
|
+
spinner.fail('Swarm was not running');
|
|
371
|
+
return [3 /*break*/, 11];
|
|
372
|
+
case 11:
|
|
373
|
+
daemonPidPath = path.join(ctx.cwd, '.claude-flow', 'daemon.pid');
|
|
374
|
+
if (fs.existsSync(daemonPidPath)) {
|
|
375
|
+
fs.unlinkSync(daemonPidPath);
|
|
376
|
+
}
|
|
377
|
+
output.writeln();
|
|
378
|
+
output.printSuccess('RuFlo stopped successfully');
|
|
379
|
+
return [2 /*return*/, {
|
|
380
|
+
success: true,
|
|
381
|
+
data: { stopped: true, force: force, stoppedAt: new Date().toISOString() }
|
|
382
|
+
}];
|
|
383
|
+
case 12:
|
|
384
|
+
error_3 = _c.sent();
|
|
385
|
+
spinner.fail('Stop failed');
|
|
386
|
+
output.printError("Failed to stop: " + (error_3 instanceof Error ? error_3.message : String(error_3)));
|
|
387
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
388
|
+
case 13: return [2 /*return*/];
|
|
290
389
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (fs.existsSync(daemonPidPath)) {
|
|
294
|
-
fs.unlinkSync(daemonPidPath);
|
|
295
|
-
}
|
|
296
|
-
output.writeln();
|
|
297
|
-
output.printSuccess('KynjalFlow stopped successfully');
|
|
298
|
-
return {
|
|
299
|
-
success: true,
|
|
300
|
-
data: { stopped: true, force, stoppedAt: new Date().toISOString() }
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
catch (error) {
|
|
304
|
-
spinner.fail('Stop failed');
|
|
305
|
-
output.printError(`Failed to stop: ${error instanceof Error ? error.message : String(error)}`);
|
|
306
|
-
return { success: false, exitCode: 1 };
|
|
307
|
-
}
|
|
308
|
-
}
|
|
390
|
+
});
|
|
391
|
+
}); }
|
|
309
392
|
};
|
|
310
393
|
// Restart subcommand
|
|
311
|
-
|
|
394
|
+
var restartCommand = {
|
|
312
395
|
name: 'restart',
|
|
313
|
-
description: 'Restart the
|
|
396
|
+
description: 'Restart the RuFlo system',
|
|
314
397
|
options: [
|
|
315
398
|
{
|
|
316
399
|
name: 'force',
|
|
317
400
|
short: 'f',
|
|
318
401
|
description: 'Force restart',
|
|
319
402
|
type: 'boolean',
|
|
320
|
-
default: false
|
|
403
|
+
"default": false
|
|
321
404
|
}
|
|
322
405
|
],
|
|
323
|
-
action:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
406
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
407
|
+
var stopCtx, stopResult, startResult;
|
|
408
|
+
return __generator(this, function (_a) {
|
|
409
|
+
switch (_a.label) {
|
|
410
|
+
case 0:
|
|
411
|
+
output.writeln();
|
|
412
|
+
output.writeln(output.bold('Restarting RuFlo'));
|
|
413
|
+
output.writeln();
|
|
414
|
+
stopCtx = __assign(__assign({}, ctx), { flags: __assign({}, ctx.flags) });
|
|
415
|
+
return [4 /*yield*/, stopCommand.action(stopCtx)];
|
|
416
|
+
case 1:
|
|
417
|
+
stopResult = _a.sent();
|
|
418
|
+
if (stopResult && !stopResult.success) {
|
|
419
|
+
output.printWarning('Stop failed, attempting to start anyway...');
|
|
420
|
+
}
|
|
421
|
+
// Wait briefly
|
|
422
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000); })];
|
|
423
|
+
case 2:
|
|
424
|
+
// Wait briefly
|
|
425
|
+
_a.sent();
|
|
426
|
+
return [4 /*yield*/, startAction(ctx)];
|
|
427
|
+
case 3:
|
|
428
|
+
startResult = _a.sent();
|
|
429
|
+
return [2 /*return*/, {
|
|
430
|
+
success: startResult.success,
|
|
431
|
+
data: {
|
|
432
|
+
restarted: startResult.success,
|
|
433
|
+
restartedAt: new Date().toISOString()
|
|
434
|
+
}
|
|
435
|
+
}];
|
|
342
436
|
}
|
|
343
|
-
};
|
|
344
|
-
}
|
|
437
|
+
});
|
|
438
|
+
}); }
|
|
345
439
|
};
|
|
346
440
|
// Quick start subcommand
|
|
347
|
-
|
|
441
|
+
var quickCommand = {
|
|
348
442
|
name: 'quick',
|
|
349
443
|
aliases: ['q'],
|
|
350
444
|
description: 'Quick start with default settings',
|
|
351
|
-
action:
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
445
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
446
|
+
var initCommand, initCtx;
|
|
447
|
+
return __generator(this, function (_a) {
|
|
448
|
+
switch (_a.label) {
|
|
449
|
+
case 0:
|
|
450
|
+
if (!!isInitialized(ctx.cwd)) return [3 /*break*/, 3];
|
|
451
|
+
output.printInfo('Project not initialized, running init first...');
|
|
452
|
+
output.writeln();
|
|
453
|
+
return [4 /*yield*/, import('./init.js')];
|
|
454
|
+
case 1:
|
|
455
|
+
initCommand = (_a.sent()).initCommand;
|
|
456
|
+
initCtx = __assign(__assign({}, ctx), { flags: __assign(__assign({}, ctx.flags), { minimal: true }) });
|
|
457
|
+
return [4 /*yield*/, initCommand.action(initCtx)];
|
|
458
|
+
case 2:
|
|
459
|
+
_a.sent();
|
|
460
|
+
output.writeln();
|
|
461
|
+
_a.label = 3;
|
|
462
|
+
case 3:
|
|
463
|
+
// Start with defaults
|
|
464
|
+
return [2 /*return*/, startAction(__assign(__assign({}, ctx), { flags: __assign(__assign({}, ctx.flags), { topology: 'mesh' }) }))];
|
|
465
|
+
}
|
|
369
466
|
});
|
|
370
|
-
}
|
|
467
|
+
}); }
|
|
371
468
|
};
|
|
372
469
|
// Main start command
|
|
373
|
-
export
|
|
470
|
+
export var startCommand = {
|
|
374
471
|
name: 'start',
|
|
375
|
-
description: 'Start the
|
|
472
|
+
description: 'Start the RuFlo orchestration system',
|
|
376
473
|
subcommands: [stopCommand, restartCommand, quickCommand],
|
|
377
474
|
options: [
|
|
378
475
|
{
|
|
@@ -380,14 +477,14 @@ export const startCommand = {
|
|
|
380
477
|
short: 'd',
|
|
381
478
|
description: 'Run as daemon in background',
|
|
382
479
|
type: 'boolean',
|
|
383
|
-
default: false
|
|
480
|
+
"default": false
|
|
384
481
|
},
|
|
385
482
|
{
|
|
386
483
|
name: 'port',
|
|
387
484
|
short: 'p',
|
|
388
485
|
description: 'MCP server port',
|
|
389
486
|
type: 'number',
|
|
390
|
-
default: DEFAULT_PORT
|
|
487
|
+
"default": DEFAULT_PORT
|
|
391
488
|
},
|
|
392
489
|
{
|
|
393
490
|
name: 'topology',
|
|
@@ -400,7 +497,7 @@ export const startCommand = {
|
|
|
400
497
|
name: 'skip-mcp',
|
|
401
498
|
description: 'Skip starting MCP server',
|
|
402
499
|
type: 'boolean',
|
|
403
|
-
default: false
|
|
500
|
+
"default": false
|
|
404
501
|
}
|
|
405
502
|
],
|
|
406
503
|
examples: [
|