kynjal-cli 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/appliance/gguf-engine.d.ts +91 -0
- package/dist/src/appliance/gguf-engine.d.ts.map +1 -0
- package/dist/src/appliance/gguf-engine.js +286 -525
- package/dist/src/appliance/gguf-engine.js.map +1 -1
- package/dist/src/appliance/ruvllm-bridge.d.ts +102 -0
- package/dist/src/appliance/ruvllm-bridge.d.ts.map +1 -0
- package/dist/src/appliance/ruvllm-bridge.js +203 -403
- package/dist/src/appliance/ruvllm-bridge.js.map +1 -1
- package/dist/src/appliance/rvfa-builder.d.ts +44 -0
- package/dist/src/appliance/rvfa-builder.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-builder.js +154 -208
- package/dist/src/appliance/rvfa-builder.js.map +1 -1
- package/dist/src/appliance/rvfa-distribution.d.ts +97 -0
- package/dist/src/appliance/rvfa-distribution.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-distribution.js +260 -423
- package/dist/src/appliance/rvfa-distribution.js.map +1 -1
- package/dist/src/appliance/rvfa-format.d.ts +111 -0
- package/dist/src/appliance/rvfa-format.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-format.js +128 -200
- package/dist/src/appliance/rvfa-format.js.map +1 -1
- package/dist/src/appliance/rvfa-runner.d.ts +69 -0
- package/dist/src/appliance/rvfa-runner.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-runner.js +168 -304
- package/dist/src/appliance/rvfa-runner.js.map +1 -1
- package/dist/src/appliance/rvfa-signing.d.ts +123 -0
- package/dist/src/appliance/rvfa-signing.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-signing.js +173 -295
- package/dist/src/appliance/rvfa-signing.js.map +1 -1
- package/dist/src/benchmarks/pretrain/index.d.ts +58 -0
- package/dist/src/benchmarks/pretrain/index.d.ts.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +331 -542
- package/dist/src/benchmarks/pretrain/index.js.map +1 -1
- package/dist/src/commands/agent.js +574 -697
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.js +1218 -1548
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/appliance-advanced.js +158 -267
- package/dist/src/commands/appliance-advanced.js.map +1 -1
- package/dist/src/commands/appliance.js +318 -493
- package/dist/src/commands/appliance.js.map +1 -1
- package/dist/src/commands/benchmark.js +372 -523
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/claims.js +274 -364
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.js +113 -157
- package/dist/src/commands/cleanup.js.map +1 -1
- package/dist/src/commands/completions.js +477 -118
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +237 -303
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.js +487 -596
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.js +194 -275
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.js +504 -686
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.js +1293 -1543
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/guidance.js +449 -596
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.js +854 -938
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.js +3112 -3519
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +115 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +126 -308
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.js +788 -940
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.js +383 -558
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.js +493 -605
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.js +833 -1026
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +282 -347
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.js +1289 -1563
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.js +497 -643
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/plugins.js +668 -841
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.js +392 -447
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.js +162 -256
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +150 -220
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/route.js +520 -665
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/ruvector/backup.js +505 -651
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js +349 -401
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/import.js +224 -266
- package/dist/src/commands/ruvector/import.js.map +1 -1
- package/dist/src/commands/ruvector/index.js +37 -75
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/init.js +336 -359
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js +335 -322
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js +375 -431
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/setup.js +703 -117
- package/dist/src/commands/ruvector/setup.js.map +1 -1
- package/dist/src/commands/ruvector/status.js +364 -419
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/security.js +485 -608
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.js +504 -626
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.js +267 -364
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.js +380 -486
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.js +408 -488
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.js +423 -538
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/transfer-store.js +322 -412
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.js +196 -291
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.js +386 -486
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/config-adapter.d.ts +15 -0
- package/dist/src/config-adapter.d.ts.map +1 -0
- package/dist/src/config-adapter.js +38 -39
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.d.ts +77 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +309 -411
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/in-memory-repositories.d.ts +68 -0
- package/dist/src/infrastructure/in-memory-repositories.d.ts.map +1 -0
- package/dist/src/infrastructure/in-memory-repositories.js +246 -507
- package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts +25 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -0
- package/dist/src/init/claudemd-generator.js +368 -78
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts +41 -0
- package/dist/src/init/executor.d.ts.map +1 -0
- package/dist/src/init/executor.js +1307 -996
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts +60 -0
- package/dist/src/init/helpers-generator.d.ts.map +1 -0
- package/dist/src/init/helpers-generator.js +657 -12
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/index.d.ts +1 -1
- package/dist/src/init/index.d.ts.map +1 -1
- package/dist/src/init/index.js +1 -1
- package/dist/src/init/index.js.map +1 -1
- package/dist/src/init/mcp-generator.js +33 -37
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.js +76 -77
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.js +801 -3
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +76 -59
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts +92 -0
- package/dist/src/mcp-client.d.ts.map +1 -0
- package/dist/src/mcp-client.js +81 -125
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts +161 -0
- package/dist/src/mcp-server.d.ts.map +1 -0
- package/dist/src/mcp-server.js +470 -757
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +391 -492
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.js +332 -533
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.js +172 -236
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.d.ts +83 -0
- package/dist/src/mcp-tools/auto-install.d.ts.map +1 -0
- package/dist/src/mcp-tools/auto-install.js +80 -142
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +252 -375
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +473 -565
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +197 -272
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +500 -572
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +286 -364
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +582 -693
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +260 -311
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +573 -640
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2215 -2648
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +350 -505
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +315 -412
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +420 -480
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +204 -278
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.js +163 -279
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +297 -429
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +185 -234
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +207 -260
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +276 -325
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +270 -336
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +148 -196
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +186 -333
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/types.d.ts +31 -0
- package/dist/src/mcp-tools/types.d.ts.map +1 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js +133 -280
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +405 -450
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.d.ts +295 -0
- package/dist/src/memory/ewc-consolidation.d.ts.map +1 -0
- package/dist/src/memory/ewc-consolidation.js +190 -303
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts +338 -0
- package/dist/src/memory/intelligence.d.ts.map +1 -0
- package/dist/src/memory/intelligence.js +569 -794
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +407 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge.js +1170 -1640
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +412 -0
- package/dist/src/memory/memory-initializer.d.ts.map +1 -0
- package/dist/src/memory/memory-initializer.js +1836 -1851
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts +227 -0
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -0
- package/dist/src/memory/sona-optimizer.js +199 -329
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/output.d.ts +2 -2
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +242 -272
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.d.ts +51 -0
- package/dist/src/parser.d.ts.map +1 -0
- package/dist/src/parser.js +140 -187
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.d.ts +133 -0
- package/dist/src/plugins/manager.d.ts.map +1 -0
- package/dist/src/plugins/manager.js +285 -521
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.d.ts +88 -0
- package/dist/src/plugins/store/discovery.d.ts.map +1 -0
- package/dist/src/plugins/store/discovery.js +271 -358
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/index.d.ts +76 -0
- package/dist/src/plugins/store/index.d.ts.map +1 -0
- package/dist/src/plugins/store/index.js +48 -105
- package/dist/src/plugins/store/index.js.map +1 -1
- package/dist/src/plugins/store/search.d.ts +46 -0
- package/dist/src/plugins/store/search.d.ts.map +1 -0
- package/dist/src/plugins/store/search.js +69 -107
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/plugins/store/types.d.ts +274 -0
- package/dist/src/plugins/store/types.d.ts.map +1 -0
- package/dist/src/plugins/tests/demo-plugin-store.js +113 -160
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
- package/dist/src/plugins/tests/standalone-test.js +172 -223
- package/dist/src/plugins/tests/standalone-test.js.map +1 -1
- package/dist/src/plugins/tests/test-plugin-store.js +190 -228
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
- package/dist/src/production/circuit-breaker.d.ts +101 -0
- package/dist/src/production/circuit-breaker.d.ts.map +1 -0
- package/dist/src/production/circuit-breaker.js +62 -126
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.d.ts +92 -0
- package/dist/src/production/error-handler.d.ts.map +1 -0
- package/dist/src/production/error-handler.js +86 -156
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.d.ts +161 -0
- package/dist/src/production/monitoring.d.ts.map +1 -0
- package/dist/src/production/monitoring.js +139 -220
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.d.ts +80 -0
- package/dist/src/production/rate-limiter.d.ts.map +1 -0
- package/dist/src/production/rate-limiter.js +74 -93
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.d.ts +48 -0
- package/dist/src/production/retry.d.ts.map +1 -0
- package/dist/src/production/retry.js +75 -167
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/prompt.d.ts +44 -0
- package/dist/src/prompt.d.ts.map +1 -0
- package/dist/src/prompt.js +436 -560
- package/dist/src/prompt.js.map +1 -1
- package/dist/src/runtime/headless.d.ts +60 -0
- package/dist/src/runtime/headless.d.ts.map +1 -0
- package/dist/src/runtime/headless.js +197 -286
- package/dist/src/runtime/headless.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.d.ts +182 -0
- package/dist/src/ruvector/agent-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/agent-wasm.js +156 -351
- package/dist/src/ruvector/agent-wasm.js.map +1 -1
- package/dist/src/ruvector/ast-analyzer.d.ts +67 -0
- package/dist/src/ruvector/ast-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +145 -232
- package/dist/src/ruvector/ast-analyzer.js.map +1 -1
- package/dist/src/ruvector/coverage-router.d.ts +160 -0
- package/dist/src/ruvector/coverage-router.d.ts.map +1 -0
- package/dist/src/ruvector/coverage-router.js +287 -419
- package/dist/src/ruvector/coverage-router.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +56 -101
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/ruvector/diff-classifier.d.ts +175 -0
- package/dist/src/ruvector/diff-classifier.d.ts.map +1 -0
- package/dist/src/ruvector/diff-classifier.js +324 -451
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts +146 -0
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -0
- package/dist/src/ruvector/enhanced-model-router.js +260 -336
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/ruvector/flash-attention.d.ts +195 -0
- package/dist/src/ruvector/flash-attention.d.ts.map +1 -0
- package/dist/src/ruvector/flash-attention.js +223 -254
- package/dist/src/ruvector/flash-attention.js.map +1 -1
- package/dist/src/ruvector/graph-analyzer.d.ts +187 -0
- package/dist/src/ruvector/graph-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/graph-analyzer.js +486 -680
- package/dist/src/ruvector/graph-analyzer.js.map +1 -1
- package/dist/src/ruvector/index.d.ts +40 -0
- package/dist/src/ruvector/index.d.ts.map +1 -0
- package/dist/src/ruvector/index.js +36 -106
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/lora-adapter.d.ts +218 -0
- package/dist/src/ruvector/lora-adapter.d.ts.map +1 -0
- package/dist/src/ruvector/lora-adapter.js +155 -248
- package/dist/src/ruvector/lora-adapter.js.map +1 -1
- package/dist/src/ruvector/model-router.d.ts +220 -0
- package/dist/src/ruvector/model-router.d.ts.map +1 -0
- package/dist/src/ruvector/model-router.js +175 -248
- package/dist/src/ruvector/model-router.js.map +1 -1
- package/dist/src/ruvector/moe-router.d.ts +206 -0
- package/dist/src/ruvector/moe-router.d.ts.map +1 -0
- package/dist/src/ruvector/moe-router.js +228 -286
- package/dist/src/ruvector/moe-router.js.map +1 -1
- package/dist/src/ruvector/q-learning-router.d.ts +211 -0
- package/dist/src/ruvector/q-learning-router.d.ts.map +1 -0
- package/dist/src/ruvector/q-learning-router.js +257 -338
- package/dist/src/ruvector/q-learning-router.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.d.ts +179 -0
- package/dist/src/ruvector/ruvllm-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/ruvllm-wasm.js +270 -434
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -1
- package/dist/src/ruvector/semantic-router.d.ts +77 -0
- package/dist/src/ruvector/semantic-router.d.ts.map +1 -0
- package/dist/src/ruvector/semantic-router.js +60 -67
- package/dist/src/ruvector/semantic-router.js.map +1 -1
- package/dist/src/ruvector/vector-db.d.ts +69 -0
- package/dist/src/ruvector/vector-db.d.ts.map +1 -0
- package/dist/src/ruvector/vector-db.js +119 -205
- package/dist/src/ruvector/vector-db.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.d.ts +50 -0
- package/dist/src/services/agentic-flow-bridge.d.ts.map +1 -0
- package/dist/src/services/agentic-flow-bridge.js +32 -105
- package/dist/src/services/agentic-flow-bridge.js.map +1 -1
- package/dist/src/services/claim-service.d.ts +204 -0
- package/dist/src/services/claim-service.d.ts.map +1 -0
- package/dist/src/services/claim-service.js +615 -940
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/container-worker-pool.d.ts +197 -0
- package/dist/src/services/container-worker-pool.d.ts.map +1 -0
- package/dist/src/services/container-worker-pool.js +398 -666
- package/dist/src/services/container-worker-pool.js.map +1 -1
- package/dist/src/services/headless-worker-executor.d.ts +304 -0
- package/dist/src/services/headless-worker-executor.d.ts.map +1 -0
- package/dist/src/services/headless-worker-executor.js +441 -467
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/index.d.ts +4 -4
- package/dist/src/services/index.d.ts.map +1 -1
- package/dist/src/services/index.js +4 -4
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/registry-api.d.ts +58 -0
- package/dist/src/services/registry-api.d.ts.map +1 -0
- package/dist/src/services/registry-api.js +92 -200
- package/dist/src/services/registry-api.js.map +1 -1
- package/dist/src/services/ruvector-training.d.ts +222 -0
- package/dist/src/services/ruvector-training.d.ts.map +1 -0
- package/dist/src/services/ruvector-training.js +257 -337
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/services/worker-daemon.d.ts +228 -0
- package/dist/src/services/worker-daemon.d.ts.map +1 -0
- package/dist/src/services/worker-daemon.js +591 -849
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/services/worker-queue.d.ts +194 -0
- package/dist/src/services/worker-queue.d.ts.map +1 -0
- package/dist/src/services/worker-queue.js +331 -548
- package/dist/src/services/worker-queue.js.map +1 -1
- package/dist/src/suggest.d.ts +53 -0
- package/dist/src/suggest.d.ts.map +1 -0
- package/dist/src/suggest.js +45 -55
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/anonymization/index.js +29 -37
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/deploy-seraphine.js +128 -155
- package/dist/src/transfer/deploy-seraphine.js.map +1 -1
- package/dist/src/transfer/export.d.ts +25 -0
- package/dist/src/transfer/export.d.ts.map +1 -0
- package/dist/src/transfer/export.js +84 -142
- package/dist/src/transfer/export.js.map +1 -1
- package/dist/src/transfer/index.d.ts +1 -1
- package/dist/src/transfer/index.d.ts.map +1 -1
- package/dist/src/transfer/index.js +0 -2
- package/dist/src/transfer/index.js.map +1 -1
- package/dist/src/transfer/ipfs/client.d.ts +109 -0
- package/dist/src/transfer/ipfs/client.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/client.js +187 -337
- package/dist/src/transfer/ipfs/client.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.d.ts +95 -0
- package/dist/src/transfer/ipfs/upload.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/upload.js +288 -434
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/models/seraphine.d.ts +72 -0
- package/dist/src/transfer/models/seraphine.d.ts.map +1 -0
- package/dist/src/transfer/models/seraphine.js +55 -55
- package/dist/src/transfer/models/seraphine.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.d.ts +49 -0
- package/dist/src/transfer/serialization/cfp.d.ts.map +1 -0
- package/dist/src/transfer/serialization/cfp.js +30 -31
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.d.ts +82 -0
- package/dist/src/transfer/storage/gcs.d.ts.map +1 -0
- package/dist/src/transfer/storage/gcs.js +165 -232
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.d.ts +84 -0
- package/dist/src/transfer/store/discovery.d.ts.map +1 -0
- package/dist/src/transfer/store/discovery.js +239 -349
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.d.ts +70 -0
- package/dist/src/transfer/store/download.d.ts.map +1 -0
- package/dist/src/transfer/store/download.js +243 -365
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/index.d.ts +84 -0
- package/dist/src/transfer/store/index.d.ts.map +1 -0
- package/dist/src/transfer/store/index.js +63 -130
- package/dist/src/transfer/store/index.js.map +1 -1
- package/dist/src/transfer/store/publish.d.ts +76 -0
- package/dist/src/transfer/store/publish.d.ts.map +1 -0
- package/dist/src/transfer/store/publish.js +184 -258
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.js +50 -72
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.d.ts +54 -0
- package/dist/src/transfer/store/search.d.ts.map +1 -0
- package/dist/src/transfer/store/search.js +64 -96
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/transfer/store/tests/standalone-test.js +174 -231
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
- package/dist/src/transfer/test-seraphine.js +95 -130
- package/dist/src/transfer/test-seraphine.js.map +1 -1
- package/dist/src/transfer/tests/test-store.js +194 -239
- package/dist/src/transfer/tests/test-store.js.map +1 -1
- package/dist/src/transfer/types.d.ts +245 -0
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/types.d.ts +198 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +26 -55
- package/dist/src/types.js.map +1 -1
- package/dist/src/update/checker.d.ts +34 -0
- package/dist/src/update/checker.d.ts.map +1 -0
- package/dist/src/update/checker.js +106 -183
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.d.ts +32 -0
- package/dist/src/update/executor.d.ts.map +1 -0
- package/dist/src/update/executor.js +135 -198
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.d.ts +33 -0
- package/dist/src/update/index.d.ts.map +1 -0
- package/dist/src/update/index.js +38 -85
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.d.ts +20 -0
- package/dist/src/update/rate-limiter.d.ts.map +1 -0
- package/dist/src/update/rate-limiter.js +19 -31
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.d.ts +17 -0
- package/dist/src/update/validator.d.ts.map +1 -0
- package/dist/src/update/validator.js +38 -64
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,59 +5,12 @@
|
|
|
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
|
-
};
|
|
55
8
|
import { output } from '../output.js';
|
|
56
9
|
import { createPluginDiscoveryService, searchPlugins, getPluginSearchSuggestions, getFeaturedPlugins, getOfficialPlugins, } from '../plugins/store/index.js';
|
|
57
10
|
import { getPluginManager } from '../plugins/manager.js';
|
|
58
11
|
import { getBulkRatings } from '../services/registry-api.js';
|
|
59
12
|
// List subcommand - Now uses IPFS-based registry
|
|
60
|
-
|
|
13
|
+
const listCommand = {
|
|
61
14
|
name: 'list',
|
|
62
15
|
description: 'List installed and available plugins from IPFS registry',
|
|
63
16
|
options: [
|
|
@@ -75,164 +28,150 @@ var listCommand = {
|
|
|
75
28
|
{ command: 'claude-flow plugins list --official', description: 'List official plugins' },
|
|
76
29
|
{ command: 'claude-flow plugins list --category security', description: 'List security plugins' },
|
|
77
30
|
],
|
|
78
|
-
action:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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");
|
|
31
|
+
action: async (ctx) => {
|
|
32
|
+
const installedOnly = ctx.flags.installed;
|
|
33
|
+
const category = ctx.flags.category;
|
|
34
|
+
const type = ctx.flags.type;
|
|
35
|
+
const official = ctx.flags.official;
|
|
36
|
+
const featured = ctx.flags.featured;
|
|
37
|
+
const registryName = ctx.flags.registry;
|
|
38
|
+
// For installed-only, read from local manifest
|
|
39
|
+
if (installedOnly) {
|
|
40
|
+
output.writeln();
|
|
41
|
+
output.writeln(output.bold('Installed Plugins'));
|
|
42
|
+
output.writeln(output.dim('─'.repeat(60)));
|
|
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.'));
|
|
147
49
|
output.writeln();
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
50
|
+
output.writeln(output.dim('Run "claude-flow plugins list" to see available plugins'));
|
|
51
|
+
output.writeln(output.dim('Run "claude-flow plugins install -n <plugin>" to install'));
|
|
52
|
+
return { success: true };
|
|
53
|
+
}
|
|
54
|
+
output.printTable({
|
|
55
|
+
columns: [
|
|
56
|
+
{ key: 'name', header: 'Plugin', width: 38 },
|
|
57
|
+
{ key: 'version', header: 'Version', width: 14 },
|
|
58
|
+
{ key: 'source', header: 'Source', width: 10 },
|
|
59
|
+
{ key: 'status', header: 'Status', width: 10 },
|
|
60
|
+
],
|
|
61
|
+
data: installed.map((p) => ({
|
|
62
|
+
name: p.name,
|
|
63
|
+
version: p.version,
|
|
64
|
+
source: p.source,
|
|
65
|
+
status: p.enabled ? output.success('Enabled') : output.dim('Disabled'),
|
|
66
|
+
})),
|
|
67
|
+
});
|
|
68
|
+
output.writeln();
|
|
69
|
+
output.writeln(output.dim(`Plugins directory: ${manager.getPluginsDir()}`));
|
|
70
|
+
return { success: true, data: installed };
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
output.printError(`Failed to load installed plugins: ${String(error)}`);
|
|
74
|
+
return { success: false, exitCode: 1 };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// Discover registry via IPFS
|
|
78
|
+
const spinner = output.createSpinner({ text: 'Discovering plugin registry via IPNS...', spinner: 'dots' });
|
|
79
|
+
spinner.start();
|
|
80
|
+
try {
|
|
81
|
+
const discovery = createPluginDiscoveryService();
|
|
82
|
+
const result = await discovery.discoverRegistry(registryName);
|
|
83
|
+
if (!result.success || !result.registry) {
|
|
84
|
+
spinner.fail('Failed to discover registry');
|
|
85
|
+
output.printError(result.error || 'Unknown error');
|
|
86
|
+
return { success: false, exitCode: 1 };
|
|
87
|
+
}
|
|
88
|
+
spinner.succeed(`Registry discovered: ${result.registry.totalPlugins} plugins available`);
|
|
89
|
+
output.writeln();
|
|
90
|
+
// Build search options
|
|
91
|
+
const searchOptions = {
|
|
92
|
+
category,
|
|
93
|
+
type: type,
|
|
94
|
+
sortBy: 'downloads',
|
|
95
|
+
sortOrder: 'desc',
|
|
96
|
+
};
|
|
97
|
+
let plugins;
|
|
98
|
+
let title;
|
|
99
|
+
if (official) {
|
|
100
|
+
plugins = getOfficialPlugins(result.registry);
|
|
101
|
+
title = 'Official Plugins';
|
|
102
|
+
}
|
|
103
|
+
else if (featured) {
|
|
104
|
+
plugins = getFeaturedPlugins(result.registry);
|
|
105
|
+
title = 'Featured Plugins';
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const searchResult = searchPlugins(result.registry, searchOptions);
|
|
109
|
+
plugins = searchResult.plugins;
|
|
110
|
+
title = category ? `${category} Plugins` : 'Available Plugins';
|
|
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'),
|
|
153
156
|
};
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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*/];
|
|
157
|
+
}),
|
|
158
|
+
});
|
|
159
|
+
output.writeln();
|
|
160
|
+
output.writeln(output.dim(`Source: ${result.source}${result.fromCache ? ' (cached)' : ''}`));
|
|
161
|
+
if (result.cid) {
|
|
162
|
+
output.writeln(output.dim(`Registry CID: ${result.cid.slice(0, 30)}...`));
|
|
230
163
|
}
|
|
231
|
-
|
|
232
|
-
|
|
164
|
+
return { success: true, data: plugins };
|
|
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
|
+
},
|
|
233
172
|
};
|
|
234
173
|
// Install subcommand - Now fetches from IPFS registry
|
|
235
|
-
|
|
174
|
+
const installCommand = {
|
|
236
175
|
name: 'install',
|
|
237
176
|
description: 'Install a plugin from IPFS registry or local path',
|
|
238
177
|
options: [
|
|
@@ -240,115 +179,97 @@ var installCommand = {
|
|
|
240
179
|
{ name: 'version', short: 'v', type: 'string', description: 'Specific version to install' },
|
|
241
180
|
{ name: 'global', short: 'g', type: 'boolean', description: 'Install globally' },
|
|
242
181
|
{ name: 'dev', short: 'd', type: 'boolean', description: 'Install as dev dependency' },
|
|
243
|
-
{ name: 'verify', type: 'boolean', description: 'Verify checksum (default: true)',
|
|
182
|
+
{ name: 'verify', type: 'boolean', description: 'Verify checksum (default: true)', default: true },
|
|
244
183
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
245
184
|
],
|
|
246
185
|
examples: [
|
|
247
186
|
{ command: 'claude-flow plugins install -n community-analytics', description: 'Install plugin from IPFS' },
|
|
248
187
|
{ command: 'claude-flow plugins install -n ./my-plugin --dev', description: 'Install local plugin' },
|
|
249
188
|
],
|
|
250
|
-
action:
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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*/];
|
|
346
|
-
}
|
|
189
|
+
action: async (ctx) => {
|
|
190
|
+
const name = ctx.flags.name;
|
|
191
|
+
const version = ctx.flags.version || 'latest';
|
|
192
|
+
const registryName = ctx.flags.registry;
|
|
193
|
+
const verify = ctx.flags.verify !== false;
|
|
194
|
+
if (!name) {
|
|
195
|
+
output.printError('Plugin name is required');
|
|
196
|
+
return { success: false, exitCode: 1 };
|
|
197
|
+
}
|
|
198
|
+
// Check if it's a local path
|
|
199
|
+
const isLocalPath = name.startsWith('./') || name.startsWith('/') || name.startsWith('../');
|
|
200
|
+
output.writeln();
|
|
201
|
+
output.writeln(output.bold('Installing Plugin'));
|
|
202
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
203
|
+
const spinner = output.createSpinner({
|
|
204
|
+
text: isLocalPath ? `Installing from ${name}...` : `Discovering ${name} in registry...`,
|
|
205
|
+
spinner: 'dots'
|
|
347
206
|
});
|
|
348
|
-
|
|
207
|
+
spinner.start();
|
|
208
|
+
try {
|
|
209
|
+
const manager = getPluginManager();
|
|
210
|
+
await manager.initialize();
|
|
211
|
+
// Check if already installed
|
|
212
|
+
const existingPlugin = await manager.getPlugin(name);
|
|
213
|
+
if (existingPlugin) {
|
|
214
|
+
spinner.fail(`Plugin ${name} is already installed (v${existingPlugin.version})`);
|
|
215
|
+
output.writeln();
|
|
216
|
+
output.writeln(output.dim('Use "claude-flow plugins upgrade -n ' + name + '" to update'));
|
|
217
|
+
return { success: false, exitCode: 1 };
|
|
218
|
+
}
|
|
219
|
+
let result;
|
|
220
|
+
let plugin;
|
|
221
|
+
if (isLocalPath) {
|
|
222
|
+
// Install from local path
|
|
223
|
+
spinner.setText(`Installing from ${name}...`);
|
|
224
|
+
result = await manager.installFromLocal(name);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
// First, try to find in registry for metadata
|
|
228
|
+
spinner.setText(`Discovering ${name} in registry...`);
|
|
229
|
+
const discovery = createPluginDiscoveryService();
|
|
230
|
+
const registryResult = await discovery.discoverRegistry(registryName);
|
|
231
|
+
if (registryResult.success && registryResult.registry) {
|
|
232
|
+
plugin = registryResult.registry.plugins.find(p => p.name === name || p.id === name);
|
|
233
|
+
}
|
|
234
|
+
if (plugin) {
|
|
235
|
+
spinner.setText(`Found ${plugin.displayName} v${plugin.version}`);
|
|
236
|
+
}
|
|
237
|
+
// Install from npm (since IPFS is demo mode)
|
|
238
|
+
spinner.setText(`Installing ${name} from npm...`);
|
|
239
|
+
result = await manager.installFromNpm(name, version !== 'latest' ? version : undefined);
|
|
240
|
+
}
|
|
241
|
+
if (!result.success) {
|
|
242
|
+
spinner.fail(`Installation failed: ${result.error}`);
|
|
243
|
+
return { success: false, exitCode: 1 };
|
|
244
|
+
}
|
|
245
|
+
const installed = result.plugin;
|
|
246
|
+
spinner.succeed(`Installed ${installed.name}@${installed.version}`);
|
|
247
|
+
output.writeln();
|
|
248
|
+
const boxContent = [
|
|
249
|
+
`Plugin: ${installed.name}`,
|
|
250
|
+
`Version: ${installed.version}`,
|
|
251
|
+
`Source: ${installed.source}`,
|
|
252
|
+
`Path: ${installed.path || 'N/A'}`,
|
|
253
|
+
``,
|
|
254
|
+
`Hooks registered: ${installed.hooks?.length || 0}`,
|
|
255
|
+
`Commands added: ${installed.commands?.length || 0}`,
|
|
256
|
+
];
|
|
257
|
+
if (plugin) {
|
|
258
|
+
boxContent.push(`Trust: ${plugin.trustLevel}`);
|
|
259
|
+
boxContent.push(`Permissions: ${plugin.permissions.join(', ') || 'none'}`);
|
|
260
|
+
}
|
|
261
|
+
output.printBox(boxContent.join('\n'), 'Installation Complete');
|
|
262
|
+
return { success: true, data: installed };
|
|
263
|
+
}
|
|
264
|
+
catch (error) {
|
|
265
|
+
spinner.fail('Installation failed');
|
|
266
|
+
output.printError(`Error: ${String(error)}`);
|
|
267
|
+
return { success: false, exitCode: 1 };
|
|
268
|
+
}
|
|
269
|
+
},
|
|
349
270
|
};
|
|
350
271
|
// Uninstall subcommand
|
|
351
|
-
|
|
272
|
+
const uninstallCommand = {
|
|
352
273
|
name: 'uninstall',
|
|
353
274
|
description: 'Uninstall a plugin',
|
|
354
275
|
options: [
|
|
@@ -358,56 +279,44 @@ var uninstallCommand = {
|
|
|
358
279
|
examples: [
|
|
359
280
|
{ command: 'claude-flow plugins uninstall -n community-analytics', description: 'Uninstall plugin' },
|
|
360
281
|
],
|
|
361
|
-
action:
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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*/];
|
|
282
|
+
action: async (ctx) => {
|
|
283
|
+
const name = ctx.flags.name;
|
|
284
|
+
if (!name) {
|
|
285
|
+
output.printError('Plugin name is required');
|
|
286
|
+
return { success: false, exitCode: 1 };
|
|
287
|
+
}
|
|
288
|
+
output.writeln();
|
|
289
|
+
const spinner = output.createSpinner({ text: `Uninstalling ${name}...`, spinner: 'dots' });
|
|
290
|
+
spinner.start();
|
|
291
|
+
try {
|
|
292
|
+
const manager = getPluginManager();
|
|
293
|
+
await manager.initialize();
|
|
294
|
+
// Check if installed
|
|
295
|
+
const plugin = await manager.getPlugin(name);
|
|
296
|
+
if (!plugin) {
|
|
297
|
+
spinner.fail(`Plugin ${name} is not installed`);
|
|
298
|
+
return { success: false, exitCode: 1 };
|
|
405
299
|
}
|
|
406
|
-
|
|
407
|
-
|
|
300
|
+
// Uninstall
|
|
301
|
+
const result = await manager.uninstall(name);
|
|
302
|
+
if (!result.success) {
|
|
303
|
+
spinner.fail(`Failed to uninstall: ${result.error}`);
|
|
304
|
+
return { success: false, exitCode: 1 };
|
|
305
|
+
}
|
|
306
|
+
spinner.succeed(`Uninstalled ${name}`);
|
|
307
|
+
output.writeln();
|
|
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
|
+
},
|
|
408
317
|
};
|
|
409
318
|
// Enable/Disable subcommand
|
|
410
|
-
|
|
319
|
+
const toggleCommand = {
|
|
411
320
|
name: 'toggle',
|
|
412
321
|
description: 'Enable or disable a plugin',
|
|
413
322
|
options: [
|
|
@@ -419,78 +328,59 @@ var toggleCommand = {
|
|
|
419
328
|
{ command: 'claude-flow plugins toggle -n analytics --enable', description: 'Enable plugin' },
|
|
420
329
|
{ command: 'claude-flow plugins toggle -n analytics --disable', description: 'Disable plugin' },
|
|
421
330
|
],
|
|
422
|
-
action:
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
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*/];
|
|
331
|
+
action: async (ctx) => {
|
|
332
|
+
const name = ctx.flags.name;
|
|
333
|
+
const enable = ctx.flags.enable;
|
|
334
|
+
const disable = ctx.flags.disable;
|
|
335
|
+
if (!name) {
|
|
336
|
+
output.printError('Plugin name is required');
|
|
337
|
+
return { success: false, exitCode: 1 };
|
|
338
|
+
}
|
|
339
|
+
try {
|
|
340
|
+
const manager = getPluginManager();
|
|
341
|
+
await manager.initialize();
|
|
342
|
+
// Check if installed
|
|
343
|
+
const plugin = await manager.getPlugin(name);
|
|
344
|
+
if (!plugin) {
|
|
345
|
+
output.printError(`Plugin ${name} is not installed`);
|
|
346
|
+
return { success: false, exitCode: 1 };
|
|
488
347
|
}
|
|
489
|
-
|
|
490
|
-
|
|
348
|
+
let result;
|
|
349
|
+
let action;
|
|
350
|
+
let newState;
|
|
351
|
+
if (enable) {
|
|
352
|
+
result = await manager.enable(name);
|
|
353
|
+
action = 'Enabled';
|
|
354
|
+
newState = true;
|
|
355
|
+
}
|
|
356
|
+
else if (disable) {
|
|
357
|
+
result = await manager.disable(name);
|
|
358
|
+
action = 'Disabled';
|
|
359
|
+
newState = false;
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
// Toggle
|
|
363
|
+
result = await manager.toggle(name);
|
|
364
|
+
newState = result.enabled ?? !plugin.enabled;
|
|
365
|
+
action = newState ? 'Enabled' : 'Disabled';
|
|
366
|
+
}
|
|
367
|
+
if (!result.success) {
|
|
368
|
+
output.printError(`Failed to toggle: ${result.error}`);
|
|
369
|
+
return { success: false, exitCode: 1 };
|
|
370
|
+
}
|
|
371
|
+
output.writeln();
|
|
372
|
+
output.writeln(output.success(`${action} ${name}`));
|
|
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
|
+
},
|
|
491
381
|
};
|
|
492
382
|
// Info subcommand - Now fetches from IPFS registry
|
|
493
|
-
|
|
383
|
+
const infoCommand = {
|
|
494
384
|
name: 'info',
|
|
495
385
|
description: 'Show detailed plugin information from IPFS registry',
|
|
496
386
|
options: [
|
|
@@ -500,223 +390,196 @@ var infoCommand = {
|
|
|
500
390
|
examples: [
|
|
501
391
|
{ command: 'claude-flow plugins info -n @claude-flow/neural', description: 'Show plugin info' },
|
|
502
392
|
],
|
|
503
|
-
action:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
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*/];
|
|
393
|
+
action: async (ctx) => {
|
|
394
|
+
const name = ctx.flags.name;
|
|
395
|
+
const registryName = ctx.flags.registry;
|
|
396
|
+
if (!name) {
|
|
397
|
+
output.printError('Plugin name is required');
|
|
398
|
+
return { success: false, exitCode: 1 };
|
|
399
|
+
}
|
|
400
|
+
const spinner = output.createSpinner({ text: 'Fetching plugin details...', spinner: 'dots' });
|
|
401
|
+
spinner.start();
|
|
402
|
+
try {
|
|
403
|
+
// Discover registry and find plugin
|
|
404
|
+
const discovery = createPluginDiscoveryService();
|
|
405
|
+
const result = await discovery.discoverRegistry(registryName);
|
|
406
|
+
if (!result.success || !result.registry) {
|
|
407
|
+
spinner.fail('Failed to discover registry');
|
|
408
|
+
return { success: false, exitCode: 1 };
|
|
646
409
|
}
|
|
647
|
-
|
|
648
|
-
|
|
410
|
+
const plugin = result.registry.plugins.find(p => p.name === name || p.id === name);
|
|
411
|
+
if (!plugin) {
|
|
412
|
+
spinner.fail(`Plugin not found: ${name}`);
|
|
413
|
+
return { success: false, exitCode: 1 };
|
|
414
|
+
}
|
|
415
|
+
spinner.succeed(`Found ${plugin.displayName}`);
|
|
416
|
+
output.writeln();
|
|
417
|
+
output.writeln(output.bold(`Plugin: ${plugin.displayName}`));
|
|
418
|
+
output.writeln(output.dim('─'.repeat(60)));
|
|
419
|
+
if (ctx.flags.format === 'json') {
|
|
420
|
+
output.printJson(plugin);
|
|
421
|
+
return { success: true, data: plugin };
|
|
422
|
+
}
|
|
423
|
+
// Basic info
|
|
424
|
+
output.writeln(output.bold('Basic Information'));
|
|
425
|
+
output.printTable({
|
|
426
|
+
columns: [
|
|
427
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
428
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
429
|
+
],
|
|
430
|
+
data: [
|
|
431
|
+
{ field: 'Name', value: plugin.name },
|
|
432
|
+
{ field: 'Display Name', value: plugin.displayName },
|
|
433
|
+
{ field: 'Version', value: plugin.version },
|
|
434
|
+
{ field: 'Type', value: plugin.type },
|
|
435
|
+
{ field: 'License', value: plugin.license },
|
|
436
|
+
{ field: 'Author', value: plugin.author.displayName || plugin.author.id },
|
|
437
|
+
{ field: 'Trust Level', value: plugin.trustLevel },
|
|
438
|
+
{ field: 'Verified', value: plugin.verified ? '✓ Yes' : '✗ No' },
|
|
439
|
+
],
|
|
440
|
+
});
|
|
441
|
+
output.writeln();
|
|
442
|
+
output.writeln(output.bold('Description'));
|
|
443
|
+
output.writeln(plugin.description);
|
|
444
|
+
// Storage info
|
|
445
|
+
output.writeln();
|
|
446
|
+
output.writeln(output.bold('Storage'));
|
|
447
|
+
output.printTable({
|
|
448
|
+
columns: [
|
|
449
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
450
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
451
|
+
],
|
|
452
|
+
data: [
|
|
453
|
+
{ field: 'CID', value: plugin.cid },
|
|
454
|
+
{ field: 'Size', value: `${(plugin.size / 1024).toFixed(1)} KB` },
|
|
455
|
+
{ field: 'Checksum', value: plugin.checksum },
|
|
456
|
+
],
|
|
457
|
+
});
|
|
458
|
+
// Stats
|
|
459
|
+
output.writeln();
|
|
460
|
+
output.writeln(output.bold('Statistics'));
|
|
461
|
+
output.printTable({
|
|
462
|
+
columns: [
|
|
463
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
464
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
465
|
+
],
|
|
466
|
+
data: [
|
|
467
|
+
{ field: 'Downloads', value: plugin.downloads.toLocaleString() },
|
|
468
|
+
{ field: 'Rating', value: `${plugin.rating.toFixed(1)}★ (${plugin.ratingCount} ratings)` },
|
|
469
|
+
{ field: 'Created', value: plugin.createdAt },
|
|
470
|
+
{ field: 'Updated', value: plugin.lastUpdated },
|
|
471
|
+
],
|
|
472
|
+
});
|
|
473
|
+
// Hooks and commands
|
|
474
|
+
if (plugin.hooks.length > 0) {
|
|
475
|
+
output.writeln();
|
|
476
|
+
output.writeln(output.bold('Hooks'));
|
|
477
|
+
output.printList(plugin.hooks.map(h => output.highlight(h)));
|
|
478
|
+
}
|
|
479
|
+
if (plugin.commands.length > 0) {
|
|
480
|
+
output.writeln();
|
|
481
|
+
output.writeln(output.bold('Commands'));
|
|
482
|
+
output.printList(plugin.commands.map(c => output.highlight(c)));
|
|
483
|
+
}
|
|
484
|
+
// Permissions
|
|
485
|
+
if (plugin.permissions.length > 0) {
|
|
486
|
+
output.writeln();
|
|
487
|
+
output.writeln(output.bold('Required Permissions'));
|
|
488
|
+
output.printList(plugin.permissions.map(p => {
|
|
489
|
+
const icon = ['privileged', 'credentials', 'execute'].includes(p) ? '⚠️ ' : '';
|
|
490
|
+
return `${icon}${p}`;
|
|
491
|
+
}));
|
|
492
|
+
}
|
|
493
|
+
// Dependencies
|
|
494
|
+
if (plugin.dependencies.length > 0) {
|
|
495
|
+
output.writeln();
|
|
496
|
+
output.writeln(output.bold('Dependencies'));
|
|
497
|
+
output.printList(plugin.dependencies.map(d => `${d.name}@${d.version}${d.optional ? ' (optional)' : ''}`));
|
|
498
|
+
}
|
|
499
|
+
// Security audit
|
|
500
|
+
if (plugin.securityAudit) {
|
|
501
|
+
output.writeln();
|
|
502
|
+
output.writeln(output.bold('Security Audit'));
|
|
503
|
+
output.printTable({
|
|
504
|
+
columns: [
|
|
505
|
+
{ key: 'field', header: 'Field', width: 15 },
|
|
506
|
+
{ key: 'value', header: 'Value', width: 45 },
|
|
507
|
+
],
|
|
508
|
+
data: [
|
|
509
|
+
{ field: 'Auditor', value: plugin.securityAudit.auditor },
|
|
510
|
+
{ field: 'Date', value: plugin.securityAudit.auditDate },
|
|
511
|
+
{ field: 'Passed', value: plugin.securityAudit.passed ? '✓ Yes' : '✗ No' },
|
|
512
|
+
{ field: 'Issues', value: String(plugin.securityAudit.issues.length) },
|
|
513
|
+
],
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
// Tags
|
|
517
|
+
output.writeln();
|
|
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
|
+
},
|
|
649
528
|
};
|
|
650
529
|
// Create subcommand
|
|
651
|
-
|
|
530
|
+
const createCommand = {
|
|
652
531
|
name: 'create',
|
|
653
532
|
description: 'Scaffold a new plugin project',
|
|
654
533
|
options: [
|
|
655
534
|
{ name: 'name', short: 'n', type: 'string', description: 'Plugin name', required: true },
|
|
656
|
-
{ name: 'template', short: 't', type: 'string', description: 'Template: basic, advanced, hooks',
|
|
657
|
-
{ name: 'path', short: 'p', type: 'string', description: 'Output path',
|
|
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: '.' },
|
|
658
537
|
],
|
|
659
538
|
examples: [
|
|
660
539
|
{ command: 'claude-flow plugins create -n my-plugin', description: 'Create basic plugin' },
|
|
661
540
|
{ command: 'claude-flow plugins create -n my-plugin -t hooks', description: 'Create hooks plugin' },
|
|
662
541
|
],
|
|
663
|
-
action:
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
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
|
-
}); }
|
|
542
|
+
action: async (ctx) => {
|
|
543
|
+
const name = ctx.flags.name;
|
|
544
|
+
const template = ctx.flags.template || 'basic';
|
|
545
|
+
if (!name) {
|
|
546
|
+
output.printError('Plugin name is required');
|
|
547
|
+
return { success: false, exitCode: 1 };
|
|
548
|
+
}
|
|
549
|
+
output.writeln();
|
|
550
|
+
output.writeln(output.bold('Creating Plugin'));
|
|
551
|
+
output.writeln(output.dim('─'.repeat(40)));
|
|
552
|
+
const spinner = output.createSpinner({ text: 'Scaffolding project...', spinner: 'dots' });
|
|
553
|
+
spinner.start();
|
|
554
|
+
const files = ['package.json', 'src/index.ts', 'src/hooks.ts', 'README.md', 'tsconfig.json'];
|
|
555
|
+
for (const file of files) {
|
|
556
|
+
spinner.setText(`Creating ${file}...`);
|
|
557
|
+
await new Promise(r => setTimeout(r, 150));
|
|
558
|
+
}
|
|
559
|
+
spinner.succeed('Plugin scaffolded');
|
|
560
|
+
output.writeln();
|
|
561
|
+
output.printBox([
|
|
562
|
+
`Plugin: ${name}`,
|
|
563
|
+
`Template: ${template}`,
|
|
564
|
+
`Location: ./${name}/`,
|
|
565
|
+
``,
|
|
566
|
+
`Files created:`,
|
|
567
|
+
` - package.json`,
|
|
568
|
+
` - src/index.ts`,
|
|
569
|
+
` - src/hooks.ts`,
|
|
570
|
+
` - README.md`,
|
|
571
|
+
` - tsconfig.json`,
|
|
572
|
+
``,
|
|
573
|
+
`Next steps:`,
|
|
574
|
+
` cd ${name}`,
|
|
575
|
+
` npm install`,
|
|
576
|
+
` npm run build`,
|
|
577
|
+
].join('\n'), 'Success');
|
|
578
|
+
return { success: true };
|
|
579
|
+
},
|
|
717
580
|
};
|
|
718
581
|
// Upgrade subcommand
|
|
719
|
-
|
|
582
|
+
const upgradeCommand = {
|
|
720
583
|
name: 'upgrade',
|
|
721
584
|
description: 'Upgrade an installed plugin to a newer version',
|
|
722
585
|
options: [
|
|
@@ -727,58 +590,45 @@ var upgradeCommand = {
|
|
|
727
590
|
{ command: 'claude-flow plugins upgrade -n @claude-flow/neural', description: 'Upgrade to latest' },
|
|
728
591
|
{ command: 'claude-flow plugins upgrade -n @claude-flow/neural -v 3.1.0', description: 'Upgrade to specific version' },
|
|
729
592
|
],
|
|
730
|
-
action:
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
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*/];
|
|
593
|
+
action: async (ctx) => {
|
|
594
|
+
const name = ctx.flags.name;
|
|
595
|
+
const version = ctx.flags.version;
|
|
596
|
+
if (!name) {
|
|
597
|
+
output.printError('Plugin name is required');
|
|
598
|
+
return { success: false, exitCode: 1 };
|
|
599
|
+
}
|
|
600
|
+
output.writeln();
|
|
601
|
+
const spinner = output.createSpinner({ text: `Upgrading ${name}...`, spinner: 'dots' });
|
|
602
|
+
spinner.start();
|
|
603
|
+
try {
|
|
604
|
+
const manager = getPluginManager();
|
|
605
|
+
await manager.initialize();
|
|
606
|
+
// Check if installed
|
|
607
|
+
const existing = await manager.getPlugin(name);
|
|
608
|
+
if (!existing) {
|
|
609
|
+
spinner.fail(`Plugin ${name} is not installed`);
|
|
610
|
+
return { success: false, exitCode: 1 };
|
|
776
611
|
}
|
|
777
|
-
|
|
778
|
-
|
|
612
|
+
const oldVersion = existing.version;
|
|
613
|
+
spinner.setText(`Upgrading ${name} from v${oldVersion}...`);
|
|
614
|
+
const result = await manager.upgrade(name, version);
|
|
615
|
+
if (!result.success) {
|
|
616
|
+
spinner.fail(`Upgrade failed: ${result.error}`);
|
|
617
|
+
return { success: false, exitCode: 1 };
|
|
618
|
+
}
|
|
619
|
+
const plugin = result.plugin;
|
|
620
|
+
spinner.succeed(`Upgraded ${name}: v${oldVersion} -> v${plugin.version}`);
|
|
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
|
+
},
|
|
779
629
|
};
|
|
780
630
|
// Search subcommand - Search IPFS registry
|
|
781
|
-
|
|
631
|
+
const searchCommand = {
|
|
782
632
|
name: 'search',
|
|
783
633
|
description: 'Search plugins in the IPFS registry',
|
|
784
634
|
options: [
|
|
@@ -786,102 +636,92 @@ var searchCommand = {
|
|
|
786
636
|
{ name: 'category', short: 'c', type: 'string', description: 'Filter by category' },
|
|
787
637
|
{ name: 'type', short: 't', type: 'string', description: 'Filter by plugin type' },
|
|
788
638
|
{ name: 'verified', short: 'v', type: 'boolean', description: 'Show only verified plugins' },
|
|
789
|
-
{ name: 'limit', short: 'l', type: 'number', description: 'Maximum results',
|
|
639
|
+
{ name: 'limit', short: 'l', type: 'number', description: 'Maximum results', default: 20 },
|
|
790
640
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
791
641
|
],
|
|
792
642
|
examples: [
|
|
793
643
|
{ command: 'claude-flow plugins search -q neural', description: 'Search for neural plugins' },
|
|
794
644
|
{ command: 'claude-flow plugins search -q security --verified', description: 'Search verified security plugins' },
|
|
795
645
|
],
|
|
796
|
-
action:
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
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*/];
|
|
646
|
+
action: async (ctx) => {
|
|
647
|
+
const query = ctx.flags.query;
|
|
648
|
+
const category = ctx.flags.category;
|
|
649
|
+
const type = ctx.flags.type;
|
|
650
|
+
const verified = ctx.flags.verified;
|
|
651
|
+
const limit = ctx.flags.limit || 20;
|
|
652
|
+
const registryName = ctx.flags.registry;
|
|
653
|
+
if (!query) {
|
|
654
|
+
output.printError('Search query is required');
|
|
655
|
+
return { success: false, exitCode: 1 };
|
|
656
|
+
}
|
|
657
|
+
const spinner = output.createSpinner({ text: 'Searching plugin registry...', spinner: 'dots' });
|
|
658
|
+
spinner.start();
|
|
659
|
+
try {
|
|
660
|
+
const discovery = createPluginDiscoveryService();
|
|
661
|
+
const result = await discovery.discoverRegistry(registryName);
|
|
662
|
+
if (!result.success || !result.registry) {
|
|
663
|
+
spinner.fail('Failed to discover registry');
|
|
664
|
+
return { success: false, exitCode: 1 };
|
|
879
665
|
}
|
|
880
|
-
|
|
881
|
-
|
|
666
|
+
const searchOptions = {
|
|
667
|
+
query,
|
|
668
|
+
category,
|
|
669
|
+
type: type,
|
|
670
|
+
verified,
|
|
671
|
+
limit,
|
|
672
|
+
sortBy: 'downloads',
|
|
673
|
+
sortOrder: 'desc',
|
|
674
|
+
};
|
|
675
|
+
const searchResult = searchPlugins(result.registry, searchOptions);
|
|
676
|
+
spinner.succeed(`Found ${searchResult.total} plugins matching "${query}"`);
|
|
677
|
+
output.writeln();
|
|
678
|
+
output.writeln(output.bold(`Search Results: "${query}"`));
|
|
679
|
+
output.writeln(output.dim('─'.repeat(70)));
|
|
680
|
+
if (searchResult.plugins.length === 0) {
|
|
681
|
+
output.writeln(output.dim('No plugins found matching your query'));
|
|
682
|
+
output.writeln();
|
|
683
|
+
output.writeln('Suggestions:');
|
|
684
|
+
const suggestions = getPluginSearchSuggestions(result.registry, query.slice(0, 3));
|
|
685
|
+
if (suggestions.length > 0) {
|
|
686
|
+
output.printList(suggestions.slice(0, 5));
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
output.writeln(output.dim(' Try a different search term'));
|
|
690
|
+
}
|
|
691
|
+
return { success: true, data: searchResult };
|
|
692
|
+
}
|
|
693
|
+
if (ctx.flags.format === 'json') {
|
|
694
|
+
output.printJson(searchResult);
|
|
695
|
+
return { success: true, data: searchResult };
|
|
696
|
+
}
|
|
697
|
+
output.printTable({
|
|
698
|
+
columns: [
|
|
699
|
+
{ key: 'name', header: 'Plugin', width: 38 },
|
|
700
|
+
{ key: 'description', header: 'Description', width: 40 },
|
|
701
|
+
{ key: 'downloads', header: 'Downloads', width: 10, align: 'right' },
|
|
702
|
+
],
|
|
703
|
+
data: searchResult.plugins.map(p => ({
|
|
704
|
+
name: p.verified ? `✓ ${p.name}` : p.name,
|
|
705
|
+
description: p.description.slice(0, 33) + (p.description.length > 33 ? '...' : ''),
|
|
706
|
+
downloads: p.downloads.toLocaleString(),
|
|
707
|
+
})),
|
|
708
|
+
});
|
|
709
|
+
output.writeln();
|
|
710
|
+
output.writeln(output.dim(`Showing ${searchResult.plugins.length} of ${searchResult.total} results`));
|
|
711
|
+
if (searchResult.hasMore) {
|
|
712
|
+
output.writeln(output.dim(`Use --limit to see more results`));
|
|
713
|
+
}
|
|
714
|
+
return { success: true, data: searchResult };
|
|
715
|
+
}
|
|
716
|
+
catch (error) {
|
|
717
|
+
spinner.fail('Search failed');
|
|
718
|
+
output.printError(`Error: ${String(error)}`);
|
|
719
|
+
return { success: false, exitCode: 1 };
|
|
720
|
+
}
|
|
721
|
+
},
|
|
882
722
|
};
|
|
883
723
|
// Rate subcommand - Rate plugins via Cloud Function
|
|
884
|
-
|
|
724
|
+
const rateCommand = {
|
|
885
725
|
name: 'rate',
|
|
886
726
|
description: 'Rate a plugin (1-5 stars)',
|
|
887
727
|
options: [
|
|
@@ -892,51 +732,40 @@ var rateCommand = {
|
|
|
892
732
|
{ command: 'claude-flow plugins rate -n @claude-flow/embeddings -r 5', description: 'Rate 5 stars' },
|
|
893
733
|
{ command: 'claude-flow plugins rate -n my-plugin -r 4', description: 'Rate 4 stars' },
|
|
894
734
|
],
|
|
895
|
-
action:
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
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
|
-
}); }
|
|
735
|
+
action: async (ctx) => {
|
|
736
|
+
const { rateItem } = await import('../services/registry-api.js');
|
|
737
|
+
const name = ctx.flags.name;
|
|
738
|
+
const rating = parseInt(ctx.flags.rating, 10);
|
|
739
|
+
if (!name) {
|
|
740
|
+
output.printError('Plugin name is required');
|
|
741
|
+
return { success: false, exitCode: 1 };
|
|
742
|
+
}
|
|
743
|
+
if (!rating || rating < 1 || rating > 5) {
|
|
744
|
+
output.printError('Rating must be 1-5');
|
|
745
|
+
return { success: false, exitCode: 1 };
|
|
746
|
+
}
|
|
747
|
+
const spinner = output.createSpinner({ text: 'Submitting rating...', spinner: 'dots' });
|
|
748
|
+
spinner.start();
|
|
749
|
+
try {
|
|
750
|
+
const result = await rateItem(name, rating, 'plugin');
|
|
751
|
+
spinner.succeed('Rating submitted');
|
|
752
|
+
output.writeln();
|
|
753
|
+
output.writeln(`Plugin: ${output.highlight(name)}`);
|
|
754
|
+
output.writeln(`Your rating: ${'★'.repeat(rating)}${'☆'.repeat(5 - rating)}`);
|
|
755
|
+
output.writeln(`New average: ${result.average.toFixed(1)}★ (${result.count} ratings)`);
|
|
756
|
+
output.writeln();
|
|
757
|
+
output.writeln(output.dim('Thank you for your feedback!'));
|
|
758
|
+
return { success: true, data: result };
|
|
759
|
+
}
|
|
760
|
+
catch (error) {
|
|
761
|
+
spinner.fail('Failed to submit rating');
|
|
762
|
+
output.printError(String(error));
|
|
763
|
+
return { success: false, exitCode: 1 };
|
|
764
|
+
}
|
|
765
|
+
},
|
|
937
766
|
};
|
|
938
767
|
// Main plugins command - Now with IPFS-based registry
|
|
939
|
-
export
|
|
768
|
+
export const pluginsCommand = {
|
|
940
769
|
name: 'plugins',
|
|
941
770
|
description: 'Plugin management with IPFS-based decentralized registry',
|
|
942
771
|
subcommands: [listCommand, searchCommand, installCommand, uninstallCommand, upgradeCommand, toggleCommand, infoCommand, createCommand, rateCommand],
|
|
@@ -946,48 +775,46 @@ export var pluginsCommand = {
|
|
|
946
775
|
{ command: 'claude-flow plugins install -n community-analytics', description: 'Install from IPFS' },
|
|
947
776
|
{ command: 'claude-flow plugins create -n my-plugin', description: 'Create new plugin' },
|
|
948
777
|
],
|
|
949
|
-
action:
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
output.
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
});
|
|
990
|
-
}); }
|
|
778
|
+
action: async () => {
|
|
779
|
+
output.writeln();
|
|
780
|
+
output.writeln(output.bold('RuFlo Plugin System'));
|
|
781
|
+
output.writeln(output.dim('Decentralized plugin marketplace via IPFS'));
|
|
782
|
+
output.writeln();
|
|
783
|
+
output.writeln('Subcommands:');
|
|
784
|
+
output.printList([
|
|
785
|
+
`${output.highlight('list')} - List plugins from IPFS registry`,
|
|
786
|
+
`${output.highlight('search')} - Search plugins by query`,
|
|
787
|
+
`${output.highlight('install')} - Install a plugin from npm or local path`,
|
|
788
|
+
`${output.highlight('uninstall')} - Remove an installed plugin`,
|
|
789
|
+
`${output.highlight('upgrade')} - Upgrade an installed plugin`,
|
|
790
|
+
`${output.highlight('toggle')} - Enable or disable a plugin`,
|
|
791
|
+
`${output.highlight('info')} - Show detailed plugin information`,
|
|
792
|
+
`${output.highlight('create')} - Scaffold a new plugin project`,
|
|
793
|
+
]);
|
|
794
|
+
output.writeln();
|
|
795
|
+
output.writeln(output.bold('IPFS-Based Features:'));
|
|
796
|
+
output.printList([
|
|
797
|
+
'Decentralized registry via IPNS for discoverability',
|
|
798
|
+
'Content-addressed storage for integrity verification',
|
|
799
|
+
'Ed25519 signatures for plugin verification',
|
|
800
|
+
'Trust levels: unverified, community, verified, official',
|
|
801
|
+
'Security audit tracking and vulnerability reporting',
|
|
802
|
+
]);
|
|
803
|
+
output.writeln();
|
|
804
|
+
output.writeln(output.bold('Official Plugins:'));
|
|
805
|
+
output.printList([
|
|
806
|
+
'@claude-flow/neural - Neural patterns and inference (WASM SIMD)',
|
|
807
|
+
'@claude-flow/security - Security scanning and CVE detection',
|
|
808
|
+
'@claude-flow/embeddings - Vector embeddings with hyperbolic support',
|
|
809
|
+
'@claude-flow/claims - Claims-based authorization',
|
|
810
|
+
'@claude-flow/performance - Performance profiling and benchmarks',
|
|
811
|
+
'@claude-flow/plugin-gastown-bridge - Gas Town orchestrator integration (WASM-accelerated)',
|
|
812
|
+
]);
|
|
813
|
+
output.writeln();
|
|
814
|
+
output.writeln(output.dim('Run "claude-flow plugins list --official" to see all official plugins'));
|
|
815
|
+
output.writeln(output.dim('Created with ❤️ by ruv.io'));
|
|
816
|
+
return { success: true };
|
|
817
|
+
},
|
|
991
818
|
};
|
|
992
819
|
export default pluginsCommand;
|
|
993
820
|
//# sourceMappingURL=plugins.js.map
|