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
|
@@ -5,12 +5,59 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Created with ❤️ by ruv.io
|
|
7
7
|
*/
|
|
8
|
+
var __assign = (this && this.__assign) || function () {
|
|
9
|
+
__assign = Object.assign || function(t) {
|
|
10
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
11
|
+
s = arguments[i];
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
17
|
+
return __assign.apply(this, arguments);
|
|
18
|
+
};
|
|
19
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
21
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
23
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
24
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
25
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
29
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
30
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
31
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
32
|
+
function step(op) {
|
|
33
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
34
|
+
while (_) try {
|
|
35
|
+
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;
|
|
36
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
37
|
+
switch (op[0]) {
|
|
38
|
+
case 0: case 1: t = op; break;
|
|
39
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
40
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
41
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
42
|
+
default:
|
|
43
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
44
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
45
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
46
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
47
|
+
if (t[2]) _.ops.pop();
|
|
48
|
+
_.trys.pop(); continue;
|
|
49
|
+
}
|
|
50
|
+
op = body.call(thisArg, _);
|
|
51
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
52
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
53
|
+
}
|
|
54
|
+
};
|
|
8
55
|
import { output } from '../output.js';
|
|
9
56
|
import { createPluginDiscoveryService, searchPlugins, getPluginSearchSuggestions, getFeaturedPlugins, getOfficialPlugins, } from '../plugins/store/index.js';
|
|
10
57
|
import { getPluginManager } from '../plugins/manager.js';
|
|
11
58
|
import { getBulkRatings } from '../services/registry-api.js';
|
|
12
59
|
// List subcommand - Now uses IPFS-based registry
|
|
13
|
-
|
|
60
|
+
var listCommand = {
|
|
14
61
|
name: 'list',
|
|
15
62
|
description: 'List installed and available plugins from IPFS registry',
|
|
16
63
|
options: [
|
|
@@ -28,150 +75,164 @@ const listCommand = {
|
|
|
28
75
|
{ command: 'claude-flow plugins list --official', description: 'List official plugins' },
|
|
29
76
|
{ command: 'claude-flow plugins list --category security', description: 'List security plugins' },
|
|
30
77
|
],
|
|
31
|
-
action:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
try {
|
|
44
|
-
const manager = getPluginManager();
|
|
45
|
-
await manager.initialize();
|
|
46
|
-
const installed = await manager.getInstalled();
|
|
47
|
-
if (installed.length === 0) {
|
|
48
|
-
output.writeln(output.dim('No plugins installed.'));
|
|
78
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
79
|
+
var installedOnly, category, type, official, featured, registryName, manager, installed, error_1, spinner, discovery, result, searchOptions, plugins, title, searchResult, realRatings_1, pluginIds, _a, pluginsWithRatings, error_2;
|
|
80
|
+
return __generator(this, function (_b) {
|
|
81
|
+
switch (_b.label) {
|
|
82
|
+
case 0:
|
|
83
|
+
installedOnly = ctx.flags.installed;
|
|
84
|
+
category = ctx.flags.category;
|
|
85
|
+
type = ctx.flags.type;
|
|
86
|
+
official = ctx.flags.official;
|
|
87
|
+
featured = ctx.flags.featured;
|
|
88
|
+
registryName = ctx.flags.registry;
|
|
89
|
+
if (!installedOnly) return [3 /*break*/, 5];
|
|
49
90
|
output.writeln();
|
|
50
|
-
output.writeln(output.
|
|
51
|
-
output.writeln(output.dim('
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
output.writeln(output.bold(title));
|
|
113
|
-
output.writeln(output.dim('─'.repeat(70)));
|
|
114
|
-
// Fetch real ratings from Cloud Function (non-blocking)
|
|
115
|
-
let realRatings = {};
|
|
116
|
-
try {
|
|
117
|
-
const pluginIds = plugins.map(p => p.name);
|
|
118
|
-
realRatings = await getBulkRatings(pluginIds, 'plugin');
|
|
119
|
-
}
|
|
120
|
-
catch {
|
|
121
|
-
// Fall back to static ratings if Cloud Function unavailable
|
|
122
|
-
}
|
|
123
|
-
if (ctx.flags.format === 'json') {
|
|
124
|
-
// Merge real ratings into plugin data
|
|
125
|
-
const pluginsWithRatings = plugins.map(p => ({
|
|
126
|
-
...p,
|
|
127
|
-
rating: realRatings[p.name]?.average || p.rating,
|
|
128
|
-
ratingCount: realRatings[p.name]?.count || 0,
|
|
129
|
-
}));
|
|
130
|
-
output.printJson(pluginsWithRatings);
|
|
131
|
-
return { success: true, data: pluginsWithRatings };
|
|
132
|
-
}
|
|
133
|
-
output.printTable({
|
|
134
|
-
columns: [
|
|
135
|
-
{ key: 'name', header: 'Plugin', width: 38 },
|
|
136
|
-
{ key: 'version', header: 'Version', width: 14 },
|
|
137
|
-
{ key: 'type', header: 'Type', width: 12 },
|
|
138
|
-
{ key: 'downloads', header: 'Downloads', width: 10, align: 'right' },
|
|
139
|
-
{ key: 'rating', header: 'Rating', width: 10, align: 'right' },
|
|
140
|
-
{ key: 'trust', header: 'Trust', width: 10 },
|
|
141
|
-
],
|
|
142
|
-
data: plugins.map(p => {
|
|
143
|
-
const liveRating = realRatings[p.name];
|
|
144
|
-
const ratingDisplay = liveRating && liveRating.count > 0
|
|
145
|
-
? `${liveRating.average.toFixed(1)}★(${liveRating.count})`
|
|
146
|
-
: `${p.rating.toFixed(1)}★`;
|
|
147
|
-
return {
|
|
148
|
-
name: p.name,
|
|
149
|
-
version: p.version,
|
|
150
|
-
type: p.type,
|
|
151
|
-
downloads: p.downloads.toLocaleString(),
|
|
152
|
-
rating: ratingDisplay,
|
|
153
|
-
trust: p.trustLevel === 'official' ? output.success('Official') :
|
|
154
|
-
p.trustLevel === 'verified' ? output.highlight('Verified') :
|
|
155
|
-
p.verified ? output.dim('Community') : output.dim('Unverified'),
|
|
91
|
+
output.writeln(output.bold('Installed Plugins'));
|
|
92
|
+
output.writeln(output.dim('─'.repeat(60)));
|
|
93
|
+
_b.label = 1;
|
|
94
|
+
case 1:
|
|
95
|
+
_b.trys.push([1, 4, , 5]);
|
|
96
|
+
manager = getPluginManager();
|
|
97
|
+
return [4 /*yield*/, manager.initialize()];
|
|
98
|
+
case 2:
|
|
99
|
+
_b.sent();
|
|
100
|
+
return [4 /*yield*/, manager.getInstalled()];
|
|
101
|
+
case 3:
|
|
102
|
+
installed = _b.sent();
|
|
103
|
+
if (installed.length === 0) {
|
|
104
|
+
output.writeln(output.dim('No plugins installed.'));
|
|
105
|
+
output.writeln();
|
|
106
|
+
output.writeln(output.dim('Run "claude-flow plugins list" to see available plugins'));
|
|
107
|
+
output.writeln(output.dim('Run "claude-flow plugins install -n <plugin>" to install'));
|
|
108
|
+
return [2 /*return*/, { success: true }];
|
|
109
|
+
}
|
|
110
|
+
output.printTable({
|
|
111
|
+
columns: [
|
|
112
|
+
{ key: 'name', header: 'Plugin', width: 38 },
|
|
113
|
+
{ key: 'version', header: 'Version', width: 14 },
|
|
114
|
+
{ key: 'source', header: 'Source', width: 10 },
|
|
115
|
+
{ key: 'status', header: 'Status', width: 10 },
|
|
116
|
+
],
|
|
117
|
+
data: installed.map(function (p) { return ({
|
|
118
|
+
name: p.name,
|
|
119
|
+
version: p.version,
|
|
120
|
+
source: p.source,
|
|
121
|
+
status: p.enabled ? output.success('Enabled') : output.dim('Disabled')
|
|
122
|
+
}); })
|
|
123
|
+
});
|
|
124
|
+
output.writeln();
|
|
125
|
+
output.writeln(output.dim("Plugins directory: " + manager.getPluginsDir()));
|
|
126
|
+
return [2 /*return*/, { success: true, data: installed }];
|
|
127
|
+
case 4:
|
|
128
|
+
error_1 = _b.sent();
|
|
129
|
+
output.printError("Failed to load installed plugins: " + String(error_1));
|
|
130
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
131
|
+
case 5:
|
|
132
|
+
spinner = output.createSpinner({ text: 'Discovering plugin registry via IPNS...', spinner: 'dots' });
|
|
133
|
+
spinner.start();
|
|
134
|
+
_b.label = 6;
|
|
135
|
+
case 6:
|
|
136
|
+
_b.trys.push([6, 12, , 13]);
|
|
137
|
+
discovery = createPluginDiscoveryService();
|
|
138
|
+
return [4 /*yield*/, discovery.discoverRegistry(registryName)];
|
|
139
|
+
case 7:
|
|
140
|
+
result = _b.sent();
|
|
141
|
+
if (!result.success || !result.registry) {
|
|
142
|
+
spinner.fail('Failed to discover registry');
|
|
143
|
+
output.printError(result.error || 'Unknown error');
|
|
144
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
145
|
+
}
|
|
146
|
+
spinner.succeed("Registry discovered: " + result.registry.totalPlugins + " plugins available");
|
|
147
|
+
output.writeln();
|
|
148
|
+
searchOptions = {
|
|
149
|
+
category: category,
|
|
150
|
+
type: type,
|
|
151
|
+
sortBy: 'downloads',
|
|
152
|
+
sortOrder: 'desc'
|
|
156
153
|
};
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
plugins = void 0;
|
|
155
|
+
title = void 0;
|
|
156
|
+
if (official) {
|
|
157
|
+
plugins = getOfficialPlugins(result.registry);
|
|
158
|
+
title = 'Official Plugins';
|
|
159
|
+
}
|
|
160
|
+
else if (featured) {
|
|
161
|
+
plugins = getFeaturedPlugins(result.registry);
|
|
162
|
+
title = 'Featured Plugins';
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
searchResult = searchPlugins(result.registry, searchOptions);
|
|
166
|
+
plugins = searchResult.plugins;
|
|
167
|
+
title = category ? category + " Plugins" : 'Available Plugins';
|
|
168
|
+
}
|
|
169
|
+
output.writeln(output.bold(title));
|
|
170
|
+
output.writeln(output.dim('─'.repeat(70)));
|
|
171
|
+
realRatings_1 = {};
|
|
172
|
+
_b.label = 8;
|
|
173
|
+
case 8:
|
|
174
|
+
_b.trys.push([8, 10, , 11]);
|
|
175
|
+
pluginIds = plugins.map(function (p) { return p.name; });
|
|
176
|
+
return [4 /*yield*/, getBulkRatings(pluginIds, 'plugin')];
|
|
177
|
+
case 9:
|
|
178
|
+
realRatings_1 = _b.sent();
|
|
179
|
+
return [3 /*break*/, 11];
|
|
180
|
+
case 10:
|
|
181
|
+
_a = _b.sent();
|
|
182
|
+
return [3 /*break*/, 11];
|
|
183
|
+
case 11:
|
|
184
|
+
if (ctx.flags.format === 'json') {
|
|
185
|
+
pluginsWithRatings = plugins.map(function (p) {
|
|
186
|
+
var _a, _b;
|
|
187
|
+
return (__assign(__assign({}, p), { rating: ((_a = realRatings_1[p.name]) === null || _a === void 0 ? void 0 : _a.average) || p.rating, ratingCount: ((_b = realRatings_1[p.name]) === null || _b === void 0 ? void 0 : _b.count) || 0 }));
|
|
188
|
+
});
|
|
189
|
+
output.printJson(pluginsWithRatings);
|
|
190
|
+
return [2 /*return*/, { success: true, data: pluginsWithRatings }];
|
|
191
|
+
}
|
|
192
|
+
output.printTable({
|
|
193
|
+
columns: [
|
|
194
|
+
{ key: 'name', header: 'Plugin', width: 38 },
|
|
195
|
+
{ key: 'version', header: 'Version', width: 14 },
|
|
196
|
+
{ key: 'type', header: 'Type', width: 12 },
|
|
197
|
+
{ key: 'downloads', header: 'Downloads', width: 10, align: 'right' },
|
|
198
|
+
{ key: 'rating', header: 'Rating', width: 10, align: 'right' },
|
|
199
|
+
{ key: 'trust', header: 'Trust', width: 10 },
|
|
200
|
+
],
|
|
201
|
+
data: plugins.map(function (p) {
|
|
202
|
+
var liveRating = realRatings_1[p.name];
|
|
203
|
+
var ratingDisplay = liveRating && liveRating.count > 0
|
|
204
|
+
? liveRating.average.toFixed(1) + "\u2605(" + liveRating.count + ")"
|
|
205
|
+
: p.rating.toFixed(1) + "\u2605";
|
|
206
|
+
return {
|
|
207
|
+
name: p.name,
|
|
208
|
+
version: p.version,
|
|
209
|
+
type: p.type,
|
|
210
|
+
downloads: p.downloads.toLocaleString(),
|
|
211
|
+
rating: ratingDisplay,
|
|
212
|
+
trust: p.trustLevel === 'official' ? output.success('Official') :
|
|
213
|
+
p.trustLevel === 'verified' ? output.highlight('Verified') :
|
|
214
|
+
p.verified ? output.dim('Community') : output.dim('Unverified')
|
|
215
|
+
};
|
|
216
|
+
})
|
|
217
|
+
});
|
|
218
|
+
output.writeln();
|
|
219
|
+
output.writeln(output.dim("Source: " + result.source + (result.fromCache ? ' (cached)' : '')));
|
|
220
|
+
if (result.cid) {
|
|
221
|
+
output.writeln(output.dim("Registry CID: " + result.cid.slice(0, 30) + "..."));
|
|
222
|
+
}
|
|
223
|
+
return [2 /*return*/, { success: true, data: plugins }];
|
|
224
|
+
case 12:
|
|
225
|
+
error_2 = _b.sent();
|
|
226
|
+
spinner.fail('Failed to fetch registry');
|
|
227
|
+
output.printError("Error: " + String(error_2));
|
|
228
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
229
|
+
case 13: return [2 /*return*/];
|
|
163
230
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
catch (error) {
|
|
167
|
-
spinner.fail('Failed to fetch registry');
|
|
168
|
-
output.printError(`Error: ${String(error)}`);
|
|
169
|
-
return { success: false, exitCode: 1 };
|
|
170
|
-
}
|
|
171
|
-
},
|
|
231
|
+
});
|
|
232
|
+
}); }
|
|
172
233
|
};
|
|
173
234
|
// Install subcommand - Now fetches from IPFS registry
|
|
174
|
-
|
|
235
|
+
var installCommand = {
|
|
175
236
|
name: 'install',
|
|
176
237
|
description: 'Install a plugin from IPFS registry or local path',
|
|
177
238
|
options: [
|
|
@@ -179,97 +240,115 @@ const installCommand = {
|
|
|
179
240
|
{ name: 'version', short: 'v', type: 'string', description: 'Specific version to install' },
|
|
180
241
|
{ name: 'global', short: 'g', type: 'boolean', description: 'Install globally' },
|
|
181
242
|
{ name: 'dev', short: 'd', type: 'boolean', description: 'Install as dev dependency' },
|
|
182
|
-
{ name: 'verify', type: 'boolean', description: 'Verify checksum (default: true)', default: true },
|
|
243
|
+
{ name: 'verify', type: 'boolean', description: 'Verify checksum (default: true)', "default": true },
|
|
183
244
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
184
245
|
],
|
|
185
246
|
examples: [
|
|
186
247
|
{ command: 'claude-flow plugins install -n community-analytics', description: 'Install plugin from IPFS' },
|
|
187
248
|
{ command: 'claude-flow plugins install -n ./my-plugin --dev', description: 'Install local plugin' },
|
|
188
249
|
],
|
|
189
|
-
action:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
250
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
251
|
+
var name, version, registryName, verify, isLocalPath, spinner, manager, existingPlugin, result, plugin, discovery, registryResult, installed, boxContent, error_3;
|
|
252
|
+
var _a, _b;
|
|
253
|
+
return __generator(this, function (_c) {
|
|
254
|
+
switch (_c.label) {
|
|
255
|
+
case 0:
|
|
256
|
+
name = ctx.flags.name;
|
|
257
|
+
version = ctx.flags.version || 'latest';
|
|
258
|
+
registryName = ctx.flags.registry;
|
|
259
|
+
verify = ctx.flags.verify !== false;
|
|
260
|
+
if (!name) {
|
|
261
|
+
output.printError('Plugin name is required');
|
|
262
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
263
|
+
}
|
|
264
|
+
isLocalPath = name.startsWith('./') || name.startsWith('/') || name.startsWith('../');
|
|
265
|
+
output.writeln();
|
|
266
|
+
output.writeln(output.bold('Installing Plugin'));
|
|
267
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
268
|
+
spinner = output.createSpinner({
|
|
269
|
+
text: isLocalPath ? "Installing from " + name + "..." : "Discovering " + name + " in registry...",
|
|
270
|
+
spinner: 'dots'
|
|
271
|
+
});
|
|
272
|
+
spinner.start();
|
|
273
|
+
_c.label = 1;
|
|
274
|
+
case 1:
|
|
275
|
+
_c.trys.push([1, 9, , 10]);
|
|
276
|
+
manager = getPluginManager();
|
|
277
|
+
return [4 /*yield*/, manager.initialize()];
|
|
278
|
+
case 2:
|
|
279
|
+
_c.sent();
|
|
280
|
+
return [4 /*yield*/, manager.getPlugin(name)];
|
|
281
|
+
case 3:
|
|
282
|
+
existingPlugin = _c.sent();
|
|
283
|
+
if (existingPlugin) {
|
|
284
|
+
spinner.fail("Plugin " + name + " is already installed (v" + existingPlugin.version + ")");
|
|
285
|
+
output.writeln();
|
|
286
|
+
output.writeln(output.dim('Use "claude-flow plugins upgrade -n ' + name + '" to update'));
|
|
287
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
288
|
+
}
|
|
289
|
+
result = void 0;
|
|
290
|
+
plugin = void 0;
|
|
291
|
+
if (!isLocalPath) return [3 /*break*/, 5];
|
|
292
|
+
// Install from local path
|
|
293
|
+
spinner.setText("Installing from " + name + "...");
|
|
294
|
+
return [4 /*yield*/, manager.installFromLocal(name)];
|
|
295
|
+
case 4:
|
|
296
|
+
result = _c.sent();
|
|
297
|
+
return [3 /*break*/, 8];
|
|
298
|
+
case 5:
|
|
299
|
+
// First, try to find in registry for metadata
|
|
300
|
+
spinner.setText("Discovering " + name + " in registry...");
|
|
301
|
+
discovery = createPluginDiscoveryService();
|
|
302
|
+
return [4 /*yield*/, discovery.discoverRegistry(registryName)];
|
|
303
|
+
case 6:
|
|
304
|
+
registryResult = _c.sent();
|
|
305
|
+
if (registryResult.success && registryResult.registry) {
|
|
306
|
+
plugin = registryResult.registry.plugins.find(function (p) { return p.name === name || p.id === name; });
|
|
307
|
+
}
|
|
308
|
+
if (plugin) {
|
|
309
|
+
spinner.setText("Found " + plugin.displayName + " v" + plugin.version);
|
|
310
|
+
}
|
|
311
|
+
// Install from npm (since IPFS is demo mode)
|
|
312
|
+
spinner.setText("Installing " + name + " from npm...");
|
|
313
|
+
return [4 /*yield*/, manager.installFromNpm(name, version !== 'latest' ? version : undefined)];
|
|
314
|
+
case 7:
|
|
315
|
+
result = _c.sent();
|
|
316
|
+
_c.label = 8;
|
|
317
|
+
case 8:
|
|
318
|
+
if (!result.success) {
|
|
319
|
+
spinner.fail("Installation failed: " + result.error);
|
|
320
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
321
|
+
}
|
|
322
|
+
installed = result.plugin;
|
|
323
|
+
spinner.succeed("Installed " + installed.name + "@" + installed.version);
|
|
324
|
+
output.writeln();
|
|
325
|
+
boxContent = [
|
|
326
|
+
"Plugin: " + installed.name,
|
|
327
|
+
"Version: " + installed.version,
|
|
328
|
+
"Source: " + installed.source,
|
|
329
|
+
"Path: " + (installed.path || 'N/A'),
|
|
330
|
+
"",
|
|
331
|
+
"Hooks registered: " + (((_a = installed.hooks) === null || _a === void 0 ? void 0 : _a.length) || 0),
|
|
332
|
+
"Commands added: " + (((_b = installed.commands) === null || _b === void 0 ? void 0 : _b.length) || 0),
|
|
333
|
+
];
|
|
334
|
+
if (plugin) {
|
|
335
|
+
boxContent.push("Trust: " + plugin.trustLevel);
|
|
336
|
+
boxContent.push("Permissions: " + (plugin.permissions.join(', ') || 'none'));
|
|
337
|
+
}
|
|
338
|
+
output.printBox(boxContent.join('\n'), 'Installation Complete');
|
|
339
|
+
return [2 /*return*/, { success: true, data: installed }];
|
|
340
|
+
case 9:
|
|
341
|
+
error_3 = _c.sent();
|
|
342
|
+
spinner.fail('Installation failed');
|
|
343
|
+
output.printError("Error: " + String(error_3));
|
|
344
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
345
|
+
case 10: return [2 /*return*/];
|
|
260
346
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
catch (error) {
|
|
265
|
-
spinner.fail('Installation failed');
|
|
266
|
-
output.printError(`Error: ${String(error)}`);
|
|
267
|
-
return { success: false, exitCode: 1 };
|
|
268
|
-
}
|
|
269
|
-
},
|
|
347
|
+
});
|
|
348
|
+
}); }
|
|
270
349
|
};
|
|
271
350
|
// Uninstall subcommand
|
|
272
|
-
|
|
351
|
+
var uninstallCommand = {
|
|
273
352
|
name: 'uninstall',
|
|
274
353
|
description: 'Uninstall a plugin',
|
|
275
354
|
options: [
|
|
@@ -279,44 +358,56 @@ const uninstallCommand = {
|
|
|
279
358
|
examples: [
|
|
280
359
|
{ command: 'claude-flow plugins uninstall -n community-analytics', description: 'Uninstall plugin' },
|
|
281
360
|
],
|
|
282
|
-
action:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
361
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
362
|
+
var name, spinner, manager, plugin, result, error_4;
|
|
363
|
+
return __generator(this, function (_a) {
|
|
364
|
+
switch (_a.label) {
|
|
365
|
+
case 0:
|
|
366
|
+
name = ctx.flags.name;
|
|
367
|
+
if (!name) {
|
|
368
|
+
output.printError('Plugin name is required');
|
|
369
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
370
|
+
}
|
|
371
|
+
output.writeln();
|
|
372
|
+
spinner = output.createSpinner({ text: "Uninstalling " + name + "...", spinner: 'dots' });
|
|
373
|
+
spinner.start();
|
|
374
|
+
_a.label = 1;
|
|
375
|
+
case 1:
|
|
376
|
+
_a.trys.push([1, 5, , 6]);
|
|
377
|
+
manager = getPluginManager();
|
|
378
|
+
return [4 /*yield*/, manager.initialize()];
|
|
379
|
+
case 2:
|
|
380
|
+
_a.sent();
|
|
381
|
+
return [4 /*yield*/, manager.getPlugin(name)];
|
|
382
|
+
case 3:
|
|
383
|
+
plugin = _a.sent();
|
|
384
|
+
if (!plugin) {
|
|
385
|
+
spinner.fail("Plugin " + name + " is not installed");
|
|
386
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
387
|
+
}
|
|
388
|
+
return [4 /*yield*/, manager.uninstall(name)];
|
|
389
|
+
case 4:
|
|
390
|
+
result = _a.sent();
|
|
391
|
+
if (!result.success) {
|
|
392
|
+
spinner.fail("Failed to uninstall: " + result.error);
|
|
393
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
394
|
+
}
|
|
395
|
+
spinner.succeed("Uninstalled " + name);
|
|
396
|
+
output.writeln();
|
|
397
|
+
output.writeln(output.dim("Removed " + plugin.version + " from " + manager.getPluginsDir()));
|
|
398
|
+
return [2 /*return*/, { success: true }];
|
|
399
|
+
case 5:
|
|
400
|
+
error_4 = _a.sent();
|
|
401
|
+
spinner.fail('Uninstall failed');
|
|
402
|
+
output.printError("Error: " + String(error_4));
|
|
403
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
404
|
+
case 6: return [2 /*return*/];
|
|
305
405
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
output.writeln(output.dim(`Removed ${plugin.version} from ${manager.getPluginsDir()}`));
|
|
309
|
-
return { success: true };
|
|
310
|
-
}
|
|
311
|
-
catch (error) {
|
|
312
|
-
spinner.fail('Uninstall failed');
|
|
313
|
-
output.printError(`Error: ${String(error)}`);
|
|
314
|
-
return { success: false, exitCode: 1 };
|
|
315
|
-
}
|
|
316
|
-
},
|
|
406
|
+
});
|
|
407
|
+
}); }
|
|
317
408
|
};
|
|
318
409
|
// Enable/Disable subcommand
|
|
319
|
-
|
|
410
|
+
var toggleCommand = {
|
|
320
411
|
name: 'toggle',
|
|
321
412
|
description: 'Enable or disable a plugin',
|
|
322
413
|
options: [
|
|
@@ -328,59 +419,78 @@ const toggleCommand = {
|
|
|
328
419
|
{ command: 'claude-flow plugins toggle -n analytics --enable', description: 'Enable plugin' },
|
|
329
420
|
{ command: 'claude-flow plugins toggle -n analytics --disable', description: 'Disable plugin' },
|
|
330
421
|
],
|
|
331
|
-
action:
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
422
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
423
|
+
var name, enable, disable, manager, plugin, result, action, newState, error_5;
|
|
424
|
+
var _a;
|
|
425
|
+
return __generator(this, function (_b) {
|
|
426
|
+
switch (_b.label) {
|
|
427
|
+
case 0:
|
|
428
|
+
name = ctx.flags.name;
|
|
429
|
+
enable = ctx.flags.enable;
|
|
430
|
+
disable = ctx.flags.disable;
|
|
431
|
+
if (!name) {
|
|
432
|
+
output.printError('Plugin name is required');
|
|
433
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
434
|
+
}
|
|
435
|
+
_b.label = 1;
|
|
436
|
+
case 1:
|
|
437
|
+
_b.trys.push([1, 10, , 11]);
|
|
438
|
+
manager = getPluginManager();
|
|
439
|
+
return [4 /*yield*/, manager.initialize()];
|
|
440
|
+
case 2:
|
|
441
|
+
_b.sent();
|
|
442
|
+
return [4 /*yield*/, manager.getPlugin(name)];
|
|
443
|
+
case 3:
|
|
444
|
+
plugin = _b.sent();
|
|
445
|
+
if (!plugin) {
|
|
446
|
+
output.printError("Plugin " + name + " is not installed");
|
|
447
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
448
|
+
}
|
|
449
|
+
result = void 0;
|
|
450
|
+
action = void 0;
|
|
451
|
+
newState = void 0;
|
|
452
|
+
if (!enable) return [3 /*break*/, 5];
|
|
453
|
+
return [4 /*yield*/, manager.enable(name)];
|
|
454
|
+
case 4:
|
|
455
|
+
result = _b.sent();
|
|
456
|
+
action = 'Enabled';
|
|
457
|
+
newState = true;
|
|
458
|
+
return [3 /*break*/, 9];
|
|
459
|
+
case 5:
|
|
460
|
+
if (!disable) return [3 /*break*/, 7];
|
|
461
|
+
return [4 /*yield*/, manager.disable(name)];
|
|
462
|
+
case 6:
|
|
463
|
+
result = _b.sent();
|
|
464
|
+
action = 'Disabled';
|
|
465
|
+
newState = false;
|
|
466
|
+
return [3 /*break*/, 9];
|
|
467
|
+
case 7: return [4 /*yield*/, manager.toggle(name)];
|
|
468
|
+
case 8:
|
|
469
|
+
// Toggle
|
|
470
|
+
result = _b.sent();
|
|
471
|
+
newState = (_a = result.enabled) !== null && _a !== void 0 ? _a : !plugin.enabled;
|
|
472
|
+
action = newState ? 'Enabled' : 'Disabled';
|
|
473
|
+
_b.label = 9;
|
|
474
|
+
case 9:
|
|
475
|
+
if (!result.success) {
|
|
476
|
+
output.printError("Failed to toggle: " + result.error);
|
|
477
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
478
|
+
}
|
|
479
|
+
output.writeln();
|
|
480
|
+
output.writeln(output.success(action + " " + name));
|
|
481
|
+
output.writeln(output.dim("Plugin is now " + (newState ? 'enabled' : 'disabled')));
|
|
482
|
+
return [2 /*return*/, { success: true, data: { enabled: newState } }];
|
|
483
|
+
case 10:
|
|
484
|
+
error_5 = _b.sent();
|
|
485
|
+
output.printError("Error: " + String(error_5));
|
|
486
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
487
|
+
case 11: return [2 /*return*/];
|
|
370
488
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
output.writeln(output.dim(`Plugin is now ${newState ? 'enabled' : 'disabled'}`));
|
|
374
|
-
return { success: true, data: { enabled: newState } };
|
|
375
|
-
}
|
|
376
|
-
catch (error) {
|
|
377
|
-
output.printError(`Error: ${String(error)}`);
|
|
378
|
-
return { success: false, exitCode: 1 };
|
|
379
|
-
}
|
|
380
|
-
},
|
|
489
|
+
});
|
|
490
|
+
}); }
|
|
381
491
|
};
|
|
382
492
|
// Info subcommand - Now fetches from IPFS registry
|
|
383
|
-
|
|
493
|
+
var infoCommand = {
|
|
384
494
|
name: 'info',
|
|
385
495
|
description: 'Show detailed plugin information from IPFS registry',
|
|
386
496
|
options: [
|
|
@@ -390,196 +500,223 @@ const infoCommand = {
|
|
|
390
500
|
examples: [
|
|
391
501
|
{ command: 'claude-flow plugins info -n @claude-flow/neural', description: 'Show plugin info' },
|
|
392
502
|
],
|
|
393
|
-
action:
|
|
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
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
{
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
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
|
-
|
|
503
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
504
|
+
var name, registryName, spinner, discovery, result, plugin, error_6;
|
|
505
|
+
return __generator(this, function (_a) {
|
|
506
|
+
switch (_a.label) {
|
|
507
|
+
case 0:
|
|
508
|
+
name = ctx.flags.name;
|
|
509
|
+
registryName = ctx.flags.registry;
|
|
510
|
+
if (!name) {
|
|
511
|
+
output.printError('Plugin name is required');
|
|
512
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
513
|
+
}
|
|
514
|
+
spinner = output.createSpinner({ text: 'Fetching plugin details...', spinner: 'dots' });
|
|
515
|
+
spinner.start();
|
|
516
|
+
_a.label = 1;
|
|
517
|
+
case 1:
|
|
518
|
+
_a.trys.push([1, 3, , 4]);
|
|
519
|
+
discovery = createPluginDiscoveryService();
|
|
520
|
+
return [4 /*yield*/, discovery.discoverRegistry(registryName)];
|
|
521
|
+
case 2:
|
|
522
|
+
result = _a.sent();
|
|
523
|
+
if (!result.success || !result.registry) {
|
|
524
|
+
spinner.fail('Failed to discover registry');
|
|
525
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
526
|
+
}
|
|
527
|
+
plugin = result.registry.plugins.find(function (p) { return p.name === name || p.id === name; });
|
|
528
|
+
if (!plugin) {
|
|
529
|
+
spinner.fail("Plugin not found: " + name);
|
|
530
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
531
|
+
}
|
|
532
|
+
spinner.succeed("Found " + plugin.displayName);
|
|
533
|
+
output.writeln();
|
|
534
|
+
output.writeln(output.bold("Plugin: " + plugin.displayName));
|
|
535
|
+
output.writeln(output.dim('─'.repeat(60)));
|
|
536
|
+
if (ctx.flags.format === 'json') {
|
|
537
|
+
output.printJson(plugin);
|
|
538
|
+
return [2 /*return*/, { success: true, data: plugin }];
|
|
539
|
+
}
|
|
540
|
+
// Basic info
|
|
541
|
+
output.writeln(output.bold('Basic Information'));
|
|
542
|
+
output.printTable({
|
|
543
|
+
columns: [
|
|
544
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
545
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
546
|
+
],
|
|
547
|
+
data: [
|
|
548
|
+
{ field: 'Name', value: plugin.name },
|
|
549
|
+
{ field: 'Display Name', value: plugin.displayName },
|
|
550
|
+
{ field: 'Version', value: plugin.version },
|
|
551
|
+
{ field: 'Type', value: plugin.type },
|
|
552
|
+
{ field: 'License', value: plugin.license },
|
|
553
|
+
{ field: 'Author', value: plugin.author.displayName || plugin.author.id },
|
|
554
|
+
{ field: 'Trust Level', value: plugin.trustLevel },
|
|
555
|
+
{ field: 'Verified', value: plugin.verified ? '✓ Yes' : '✗ No' },
|
|
556
|
+
]
|
|
557
|
+
});
|
|
558
|
+
output.writeln();
|
|
559
|
+
output.writeln(output.bold('Description'));
|
|
560
|
+
output.writeln(plugin.description);
|
|
561
|
+
// Storage info
|
|
562
|
+
output.writeln();
|
|
563
|
+
output.writeln(output.bold('Storage'));
|
|
564
|
+
output.printTable({
|
|
565
|
+
columns: [
|
|
566
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
567
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
568
|
+
],
|
|
569
|
+
data: [
|
|
570
|
+
{ field: 'CID', value: plugin.cid },
|
|
571
|
+
{ field: 'Size', value: (plugin.size / 1024).toFixed(1) + " KB" },
|
|
572
|
+
{ field: 'Checksum', value: plugin.checksum },
|
|
573
|
+
]
|
|
574
|
+
});
|
|
575
|
+
// Stats
|
|
576
|
+
output.writeln();
|
|
577
|
+
output.writeln(output.bold('Statistics'));
|
|
578
|
+
output.printTable({
|
|
579
|
+
columns: [
|
|
580
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
581
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
582
|
+
],
|
|
583
|
+
data: [
|
|
584
|
+
{ field: 'Downloads', value: plugin.downloads.toLocaleString() },
|
|
585
|
+
{ field: 'Rating', value: plugin.rating.toFixed(1) + "\u2605 (" + plugin.ratingCount + " ratings)" },
|
|
586
|
+
{ field: 'Created', value: plugin.createdAt },
|
|
587
|
+
{ field: 'Updated', value: plugin.lastUpdated },
|
|
588
|
+
]
|
|
589
|
+
});
|
|
590
|
+
// Hooks and commands
|
|
591
|
+
if (plugin.hooks.length > 0) {
|
|
592
|
+
output.writeln();
|
|
593
|
+
output.writeln(output.bold('Hooks'));
|
|
594
|
+
output.printList(plugin.hooks.map(function (h) { return output.highlight(h); }));
|
|
595
|
+
}
|
|
596
|
+
if (plugin.commands.length > 0) {
|
|
597
|
+
output.writeln();
|
|
598
|
+
output.writeln(output.bold('Commands'));
|
|
599
|
+
output.printList(plugin.commands.map(function (c) { return output.highlight(c); }));
|
|
600
|
+
}
|
|
601
|
+
// Permissions
|
|
602
|
+
if (plugin.permissions.length > 0) {
|
|
603
|
+
output.writeln();
|
|
604
|
+
output.writeln(output.bold('Required Permissions'));
|
|
605
|
+
output.printList(plugin.permissions.map(function (p) {
|
|
606
|
+
var icon = ['privileged', 'credentials', 'execute'].includes(p) ? '⚠️ ' : '';
|
|
607
|
+
return "" + icon + p;
|
|
608
|
+
}));
|
|
609
|
+
}
|
|
610
|
+
// Dependencies
|
|
611
|
+
if (plugin.dependencies.length > 0) {
|
|
612
|
+
output.writeln();
|
|
613
|
+
output.writeln(output.bold('Dependencies'));
|
|
614
|
+
output.printList(plugin.dependencies.map(function (d) {
|
|
615
|
+
return d.name + "@" + d.version + (d.optional ? ' (optional)' : '');
|
|
616
|
+
}));
|
|
617
|
+
}
|
|
618
|
+
// Security audit
|
|
619
|
+
if (plugin.securityAudit) {
|
|
620
|
+
output.writeln();
|
|
621
|
+
output.writeln(output.bold('Security Audit'));
|
|
622
|
+
output.printTable({
|
|
623
|
+
columns: [
|
|
624
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
625
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
626
|
+
],
|
|
627
|
+
data: [
|
|
628
|
+
{ field: 'Auditor', value: plugin.securityAudit.auditor },
|
|
629
|
+
{ field: 'Date', value: plugin.securityAudit.auditDate },
|
|
630
|
+
{ field: 'Passed', value: plugin.securityAudit.passed ? '✓ Yes' : '✗ No' },
|
|
631
|
+
{ field: 'Issues', value: String(plugin.securityAudit.issues.length) },
|
|
632
|
+
]
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
// Tags
|
|
636
|
+
output.writeln();
|
|
637
|
+
output.writeln(output.bold('Tags'));
|
|
638
|
+
output.writeln(plugin.tags.map(function (t) { return output.dim("#" + t); }).join(' '));
|
|
639
|
+
return [2 /*return*/, { success: true, data: plugin }];
|
|
640
|
+
case 3:
|
|
641
|
+
error_6 = _a.sent();
|
|
642
|
+
spinner.fail('Failed to fetch plugin info');
|
|
643
|
+
output.printError("Error: " + String(error_6));
|
|
644
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
645
|
+
case 4: return [2 /*return*/];
|
|
515
646
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
output.writeln(output.bold('Tags'));
|
|
519
|
-
output.writeln(plugin.tags.map(t => output.dim(`#${t}`)).join(' '));
|
|
520
|
-
return { success: true, data: plugin };
|
|
521
|
-
}
|
|
522
|
-
catch (error) {
|
|
523
|
-
spinner.fail('Failed to fetch plugin info');
|
|
524
|
-
output.printError(`Error: ${String(error)}`);
|
|
525
|
-
return { success: false, exitCode: 1 };
|
|
526
|
-
}
|
|
527
|
-
},
|
|
647
|
+
});
|
|
648
|
+
}); }
|
|
528
649
|
};
|
|
529
650
|
// Create subcommand
|
|
530
|
-
|
|
651
|
+
var createCommand = {
|
|
531
652
|
name: 'create',
|
|
532
653
|
description: 'Scaffold a new plugin project',
|
|
533
654
|
options: [
|
|
534
655
|
{ name: 'name', short: 'n', type: 'string', description: 'Plugin name', required: true },
|
|
535
|
-
{ name: 'template', short: 't', type: 'string', description: 'Template: basic, advanced, hooks', default: 'basic' },
|
|
536
|
-
{ name: 'path', short: 'p', type: 'string', description: 'Output path', default: '.' },
|
|
656
|
+
{ name: 'template', short: 't', type: 'string', description: 'Template: basic, advanced, hooks', "default": 'basic' },
|
|
657
|
+
{ name: 'path', short: 'p', type: 'string', description: 'Output path', "default": '.' },
|
|
537
658
|
],
|
|
538
659
|
examples: [
|
|
539
660
|
{ command: 'claude-flow plugins create -n my-plugin', description: 'Create basic plugin' },
|
|
540
661
|
{ command: 'claude-flow plugins create -n my-plugin -t hooks', description: 'Create hooks plugin' },
|
|
541
662
|
],
|
|
542
|
-
action:
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
663
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
664
|
+
var name, template, spinner, files, _i, files_1, file;
|
|
665
|
+
return __generator(this, function (_a) {
|
|
666
|
+
switch (_a.label) {
|
|
667
|
+
case 0:
|
|
668
|
+
name = ctx.flags.name;
|
|
669
|
+
template = ctx.flags.template || 'basic';
|
|
670
|
+
if (!name) {
|
|
671
|
+
output.printError('Plugin name is required');
|
|
672
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
673
|
+
}
|
|
674
|
+
output.writeln();
|
|
675
|
+
output.writeln(output.bold('Creating Plugin'));
|
|
676
|
+
output.writeln(output.dim('─'.repeat(40)));
|
|
677
|
+
spinner = output.createSpinner({ text: 'Scaffolding project...', spinner: 'dots' });
|
|
678
|
+
spinner.start();
|
|
679
|
+
files = ['package.json', 'src/index.ts', 'src/hooks.ts', 'README.md', 'tsconfig.json'];
|
|
680
|
+
_i = 0, files_1 = files;
|
|
681
|
+
_a.label = 1;
|
|
682
|
+
case 1:
|
|
683
|
+
if (!(_i < files_1.length)) return [3 /*break*/, 4];
|
|
684
|
+
file = files_1[_i];
|
|
685
|
+
spinner.setText("Creating " + file + "...");
|
|
686
|
+
return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, 150); })];
|
|
687
|
+
case 2:
|
|
688
|
+
_a.sent();
|
|
689
|
+
_a.label = 3;
|
|
690
|
+
case 3:
|
|
691
|
+
_i++;
|
|
692
|
+
return [3 /*break*/, 1];
|
|
693
|
+
case 4:
|
|
694
|
+
spinner.succeed('Plugin scaffolded');
|
|
695
|
+
output.writeln();
|
|
696
|
+
output.printBox([
|
|
697
|
+
"Plugin: " + name,
|
|
698
|
+
"Template: " + template,
|
|
699
|
+
"Location: ./" + name + "/",
|
|
700
|
+
"",
|
|
701
|
+
"Files created:",
|
|
702
|
+
" - package.json",
|
|
703
|
+
" - src/index.ts",
|
|
704
|
+
" - src/hooks.ts",
|
|
705
|
+
" - README.md",
|
|
706
|
+
" - tsconfig.json",
|
|
707
|
+
"",
|
|
708
|
+
"Next steps:",
|
|
709
|
+
" cd " + name,
|
|
710
|
+
" npm install",
|
|
711
|
+
" npm run build",
|
|
712
|
+
].join('\n'), 'Success');
|
|
713
|
+
return [2 /*return*/, { success: true }];
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}); }
|
|
580
717
|
};
|
|
581
718
|
// Upgrade subcommand
|
|
582
|
-
|
|
719
|
+
var upgradeCommand = {
|
|
583
720
|
name: 'upgrade',
|
|
584
721
|
description: 'Upgrade an installed plugin to a newer version',
|
|
585
722
|
options: [
|
|
@@ -590,45 +727,58 @@ const upgradeCommand = {
|
|
|
590
727
|
{ command: 'claude-flow plugins upgrade -n @claude-flow/neural', description: 'Upgrade to latest' },
|
|
591
728
|
{ command: 'claude-flow plugins upgrade -n @claude-flow/neural -v 3.1.0', description: 'Upgrade to specific version' },
|
|
592
729
|
],
|
|
593
|
-
action:
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
730
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
731
|
+
var name, version, spinner, manager, existing, oldVersion, result, plugin, error_7;
|
|
732
|
+
return __generator(this, function (_a) {
|
|
733
|
+
switch (_a.label) {
|
|
734
|
+
case 0:
|
|
735
|
+
name = ctx.flags.name;
|
|
736
|
+
version = ctx.flags.version;
|
|
737
|
+
if (!name) {
|
|
738
|
+
output.printError('Plugin name is required');
|
|
739
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
740
|
+
}
|
|
741
|
+
output.writeln();
|
|
742
|
+
spinner = output.createSpinner({ text: "Upgrading " + name + "...", spinner: 'dots' });
|
|
743
|
+
spinner.start();
|
|
744
|
+
_a.label = 1;
|
|
745
|
+
case 1:
|
|
746
|
+
_a.trys.push([1, 5, , 6]);
|
|
747
|
+
manager = getPluginManager();
|
|
748
|
+
return [4 /*yield*/, manager.initialize()];
|
|
749
|
+
case 2:
|
|
750
|
+
_a.sent();
|
|
751
|
+
return [4 /*yield*/, manager.getPlugin(name)];
|
|
752
|
+
case 3:
|
|
753
|
+
existing = _a.sent();
|
|
754
|
+
if (!existing) {
|
|
755
|
+
spinner.fail("Plugin " + name + " is not installed");
|
|
756
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
757
|
+
}
|
|
758
|
+
oldVersion = existing.version;
|
|
759
|
+
spinner.setText("Upgrading " + name + " from v" + oldVersion + "...");
|
|
760
|
+
return [4 /*yield*/, manager.upgrade(name, version)];
|
|
761
|
+
case 4:
|
|
762
|
+
result = _a.sent();
|
|
763
|
+
if (!result.success) {
|
|
764
|
+
spinner.fail("Upgrade failed: " + result.error);
|
|
765
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
766
|
+
}
|
|
767
|
+
plugin = result.plugin;
|
|
768
|
+
spinner.succeed("Upgraded " + name + ": v" + oldVersion + " -> v" + plugin.version);
|
|
769
|
+
return [2 /*return*/, { success: true, data: plugin }];
|
|
770
|
+
case 5:
|
|
771
|
+
error_7 = _a.sent();
|
|
772
|
+
spinner.fail('Upgrade failed');
|
|
773
|
+
output.printError("Error: " + String(error_7));
|
|
774
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
775
|
+
case 6: return [2 /*return*/];
|
|
618
776
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
return { success: true, data: plugin };
|
|
622
|
-
}
|
|
623
|
-
catch (error) {
|
|
624
|
-
spinner.fail('Upgrade failed');
|
|
625
|
-
output.printError(`Error: ${String(error)}`);
|
|
626
|
-
return { success: false, exitCode: 1 };
|
|
627
|
-
}
|
|
628
|
-
},
|
|
777
|
+
});
|
|
778
|
+
}); }
|
|
629
779
|
};
|
|
630
780
|
// Search subcommand - Search IPFS registry
|
|
631
|
-
|
|
781
|
+
var searchCommand = {
|
|
632
782
|
name: 'search',
|
|
633
783
|
description: 'Search plugins in the IPFS registry',
|
|
634
784
|
options: [
|
|
@@ -636,92 +786,102 @@ const searchCommand = {
|
|
|
636
786
|
{ name: 'category', short: 'c', type: 'string', description: 'Filter by category' },
|
|
637
787
|
{ name: 'type', short: 't', type: 'string', description: 'Filter by plugin type' },
|
|
638
788
|
{ name: 'verified', short: 'v', type: 'boolean', description: 'Show only verified plugins' },
|
|
639
|
-
{ name: 'limit', short: 'l', type: 'number', description: 'Maximum results', default: 20 },
|
|
789
|
+
{ name: 'limit', short: 'l', type: 'number', description: 'Maximum results', "default": 20 },
|
|
640
790
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
641
791
|
],
|
|
642
792
|
examples: [
|
|
643
793
|
{ command: 'claude-flow plugins search -q neural', description: 'Search for neural plugins' },
|
|
644
794
|
{ command: 'claude-flow plugins search -q security --verified', description: 'Search verified security plugins' },
|
|
645
795
|
],
|
|
646
|
-
action:
|
|
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
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
output.
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
796
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
797
|
+
var query, category, type, verified, limit, registryName, spinner, discovery, result, searchOptions, searchResult, suggestions, error_8;
|
|
798
|
+
return __generator(this, function (_a) {
|
|
799
|
+
switch (_a.label) {
|
|
800
|
+
case 0:
|
|
801
|
+
query = ctx.flags.query;
|
|
802
|
+
category = ctx.flags.category;
|
|
803
|
+
type = ctx.flags.type;
|
|
804
|
+
verified = ctx.flags.verified;
|
|
805
|
+
limit = ctx.flags.limit || 20;
|
|
806
|
+
registryName = ctx.flags.registry;
|
|
807
|
+
if (!query) {
|
|
808
|
+
output.printError('Search query is required');
|
|
809
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
810
|
+
}
|
|
811
|
+
spinner = output.createSpinner({ text: 'Searching plugin registry...', spinner: 'dots' });
|
|
812
|
+
spinner.start();
|
|
813
|
+
_a.label = 1;
|
|
814
|
+
case 1:
|
|
815
|
+
_a.trys.push([1, 3, , 4]);
|
|
816
|
+
discovery = createPluginDiscoveryService();
|
|
817
|
+
return [4 /*yield*/, discovery.discoverRegistry(registryName)];
|
|
818
|
+
case 2:
|
|
819
|
+
result = _a.sent();
|
|
820
|
+
if (!result.success || !result.registry) {
|
|
821
|
+
spinner.fail('Failed to discover registry');
|
|
822
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
823
|
+
}
|
|
824
|
+
searchOptions = {
|
|
825
|
+
query: query,
|
|
826
|
+
category: category,
|
|
827
|
+
type: type,
|
|
828
|
+
verified: verified,
|
|
829
|
+
limit: limit,
|
|
830
|
+
sortBy: 'downloads',
|
|
831
|
+
sortOrder: 'desc'
|
|
832
|
+
};
|
|
833
|
+
searchResult = searchPlugins(result.registry, searchOptions);
|
|
834
|
+
spinner.succeed("Found " + searchResult.total + " plugins matching \"" + query + "\"");
|
|
835
|
+
output.writeln();
|
|
836
|
+
output.writeln(output.bold("Search Results: \"" + query + "\""));
|
|
837
|
+
output.writeln(output.dim('─'.repeat(70)));
|
|
838
|
+
if (searchResult.plugins.length === 0) {
|
|
839
|
+
output.writeln(output.dim('No plugins found matching your query'));
|
|
840
|
+
output.writeln();
|
|
841
|
+
output.writeln('Suggestions:');
|
|
842
|
+
suggestions = getPluginSearchSuggestions(result.registry, query.slice(0, 3));
|
|
843
|
+
if (suggestions.length > 0) {
|
|
844
|
+
output.printList(suggestions.slice(0, 5));
|
|
845
|
+
}
|
|
846
|
+
else {
|
|
847
|
+
output.writeln(output.dim(' Try a different search term'));
|
|
848
|
+
}
|
|
849
|
+
return [2 /*return*/, { success: true, data: searchResult }];
|
|
850
|
+
}
|
|
851
|
+
if (ctx.flags.format === 'json') {
|
|
852
|
+
output.printJson(searchResult);
|
|
853
|
+
return [2 /*return*/, { success: true, data: searchResult }];
|
|
854
|
+
}
|
|
855
|
+
output.printTable({
|
|
856
|
+
columns: [
|
|
857
|
+
{ key: 'name', header: 'Plugin', width: 38 },
|
|
858
|
+
{ key: 'description', header: 'Description', width: 40 },
|
|
859
|
+
{ key: 'downloads', header: 'Downloads', width: 10, align: 'right' },
|
|
860
|
+
],
|
|
861
|
+
data: searchResult.plugins.map(function (p) { return ({
|
|
862
|
+
name: p.verified ? "\u2713 " + p.name : p.name,
|
|
863
|
+
description: p.description.slice(0, 33) + (p.description.length > 33 ? '...' : ''),
|
|
864
|
+
downloads: p.downloads.toLocaleString()
|
|
865
|
+
}); })
|
|
866
|
+
});
|
|
867
|
+
output.writeln();
|
|
868
|
+
output.writeln(output.dim("Showing " + searchResult.plugins.length + " of " + searchResult.total + " results"));
|
|
869
|
+
if (searchResult.hasMore) {
|
|
870
|
+
output.writeln(output.dim("Use --limit to see more results"));
|
|
871
|
+
}
|
|
872
|
+
return [2 /*return*/, { success: true, data: searchResult }];
|
|
873
|
+
case 3:
|
|
874
|
+
error_8 = _a.sent();
|
|
875
|
+
spinner.fail('Search failed');
|
|
876
|
+
output.printError("Error: " + String(error_8));
|
|
877
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
878
|
+
case 4: return [2 /*return*/];
|
|
713
879
|
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
catch (error) {
|
|
717
|
-
spinner.fail('Search failed');
|
|
718
|
-
output.printError(`Error: ${String(error)}`);
|
|
719
|
-
return { success: false, exitCode: 1 };
|
|
720
|
-
}
|
|
721
|
-
},
|
|
880
|
+
});
|
|
881
|
+
}); }
|
|
722
882
|
};
|
|
723
883
|
// Rate subcommand - Rate plugins via Cloud Function
|
|
724
|
-
|
|
884
|
+
var rateCommand = {
|
|
725
885
|
name: 'rate',
|
|
726
886
|
description: 'Rate a plugin (1-5 stars)',
|
|
727
887
|
options: [
|
|
@@ -732,40 +892,51 @@ const rateCommand = {
|
|
|
732
892
|
{ command: 'claude-flow plugins rate -n @claude-flow/embeddings -r 5', description: 'Rate 5 stars' },
|
|
733
893
|
{ command: 'claude-flow plugins rate -n my-plugin -r 4', description: 'Rate 4 stars' },
|
|
734
894
|
],
|
|
735
|
-
action:
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
895
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
896
|
+
var rateItem, name, rating, spinner, result, error_9;
|
|
897
|
+
return __generator(this, function (_a) {
|
|
898
|
+
switch (_a.label) {
|
|
899
|
+
case 0: return [4 /*yield*/, import('../services/registry-api.js')];
|
|
900
|
+
case 1:
|
|
901
|
+
rateItem = (_a.sent()).rateItem;
|
|
902
|
+
name = ctx.flags.name;
|
|
903
|
+
rating = parseInt(ctx.flags.rating, 10);
|
|
904
|
+
if (!name) {
|
|
905
|
+
output.printError('Plugin name is required');
|
|
906
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
907
|
+
}
|
|
908
|
+
if (!rating || rating < 1 || rating > 5) {
|
|
909
|
+
output.printError('Rating must be 1-5');
|
|
910
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
911
|
+
}
|
|
912
|
+
spinner = output.createSpinner({ text: 'Submitting rating...', spinner: 'dots' });
|
|
913
|
+
spinner.start();
|
|
914
|
+
_a.label = 2;
|
|
915
|
+
case 2:
|
|
916
|
+
_a.trys.push([2, 4, , 5]);
|
|
917
|
+
return [4 /*yield*/, rateItem(name, rating, 'plugin')];
|
|
918
|
+
case 3:
|
|
919
|
+
result = _a.sent();
|
|
920
|
+
spinner.succeed('Rating submitted');
|
|
921
|
+
output.writeln();
|
|
922
|
+
output.writeln("Plugin: " + output.highlight(name));
|
|
923
|
+
output.writeln("Your rating: " + '★'.repeat(rating) + '☆'.repeat(5 - rating));
|
|
924
|
+
output.writeln("New average: " + result.average.toFixed(1) + "\u2605 (" + result.count + " ratings)");
|
|
925
|
+
output.writeln();
|
|
926
|
+
output.writeln(output.dim('Thank you for your feedback!'));
|
|
927
|
+
return [2 /*return*/, { success: true, data: result }];
|
|
928
|
+
case 4:
|
|
929
|
+
error_9 = _a.sent();
|
|
930
|
+
spinner.fail('Failed to submit rating');
|
|
931
|
+
output.printError(String(error_9));
|
|
932
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
933
|
+
case 5: return [2 /*return*/];
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
}); }
|
|
766
937
|
};
|
|
767
938
|
// Main plugins command - Now with IPFS-based registry
|
|
768
|
-
export
|
|
939
|
+
export var pluginsCommand = {
|
|
769
940
|
name: 'plugins',
|
|
770
941
|
description: 'Plugin management with IPFS-based decentralized registry',
|
|
771
942
|
subcommands: [listCommand, searchCommand, installCommand, uninstallCommand, upgradeCommand, toggleCommand, infoCommand, createCommand, rateCommand],
|
|
@@ -775,46 +946,48 @@ export const pluginsCommand = {
|
|
|
775
946
|
{ command: 'claude-flow plugins install -n community-analytics', description: 'Install from IPFS' },
|
|
776
947
|
{ command: 'claude-flow plugins create -n my-plugin', description: 'Create new plugin' },
|
|
777
948
|
],
|
|
778
|
-
action:
|
|
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
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
949
|
+
action: function () { return __awaiter(void 0, void 0, Promise, function () {
|
|
950
|
+
return __generator(this, function (_a) {
|
|
951
|
+
output.writeln();
|
|
952
|
+
output.writeln(output.bold('RuFlo Plugin System'));
|
|
953
|
+
output.writeln(output.dim('Decentralized plugin marketplace via IPFS'));
|
|
954
|
+
output.writeln();
|
|
955
|
+
output.writeln('Subcommands:');
|
|
956
|
+
output.printList([
|
|
957
|
+
output.highlight('list') + " - List plugins from IPFS registry",
|
|
958
|
+
output.highlight('search') + " - Search plugins by query",
|
|
959
|
+
output.highlight('install') + " - Install a plugin from npm or local path",
|
|
960
|
+
output.highlight('uninstall') + " - Remove an installed plugin",
|
|
961
|
+
output.highlight('upgrade') + " - Upgrade an installed plugin",
|
|
962
|
+
output.highlight('toggle') + " - Enable or disable a plugin",
|
|
963
|
+
output.highlight('info') + " - Show detailed plugin information",
|
|
964
|
+
output.highlight('create') + " - Scaffold a new plugin project",
|
|
965
|
+
]);
|
|
966
|
+
output.writeln();
|
|
967
|
+
output.writeln(output.bold('IPFS-Based Features:'));
|
|
968
|
+
output.printList([
|
|
969
|
+
'Decentralized registry via IPNS for discoverability',
|
|
970
|
+
'Content-addressed storage for integrity verification',
|
|
971
|
+
'Ed25519 signatures for plugin verification',
|
|
972
|
+
'Trust levels: unverified, community, verified, official',
|
|
973
|
+
'Security audit tracking and vulnerability reporting',
|
|
974
|
+
]);
|
|
975
|
+
output.writeln();
|
|
976
|
+
output.writeln(output.bold('Official Plugins:'));
|
|
977
|
+
output.printList([
|
|
978
|
+
'@claude-flow/neural - Neural patterns and inference (WASM SIMD)',
|
|
979
|
+
'@claude-flow/security - Security scanning and CVE detection',
|
|
980
|
+
'@claude-flow/embeddings - Vector embeddings with hyperbolic support',
|
|
981
|
+
'@claude-flow/claims - Claims-based authorization',
|
|
982
|
+
'@claude-flow/performance - Performance profiling and benchmarks',
|
|
983
|
+
'@claude-flow/plugin-gastown-bridge - Gas Town orchestrator integration (WASM-accelerated)',
|
|
984
|
+
]);
|
|
985
|
+
output.writeln();
|
|
986
|
+
output.writeln(output.dim('Run "claude-flow plugins list --official" to see all official plugins'));
|
|
987
|
+
output.writeln(output.dim('Created with ❤️ by ruv.io'));
|
|
988
|
+
return [2 /*return*/, { success: true }];
|
|
989
|
+
});
|
|
990
|
+
}); }
|
|
818
991
|
};
|
|
819
992
|
export default pluginsCommand;
|
|
820
993
|
//# sourceMappingURL=plugins.js.map
|