superacli 1.0.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.beads/.br_history/issues.20260308_200823_636718328.jsonl +20 -0
- package/.beads/.br_history/issues.20260308_200823_636718328.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_200827_033159453.jsonl +21 -0
- package/.beads/.br_history/issues.20260308_200827_033159453.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_200829_595900053.jsonl +22 -0
- package/.beads/.br_history/issues.20260308_200829_595900053.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_200834_079930100.jsonl +23 -0
- package/.beads/.br_history/issues.20260308_200834_079930100.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_200858_370924996.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_200858_370924996.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201031_019730855.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201031_019730855.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201031_578974884.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201031_578974884.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201054_780345548.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201054_780345548.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201054_896980019.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201054_896980019.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201128_599819688.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201128_599819688.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201128_710221699.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201128_710221699.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201204_745649213.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201204_745649213.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201338_908436144.jsonl +24 -0
- package/.beads/.br_history/issues.20260308_201338_908436144.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201344_734860714.jsonl +25 -0
- package/.beads/.br_history/issues.20260308_201344_734860714.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_201630_819282295.jsonl +25 -0
- package/.beads/.br_history/issues.20260308_201630_819282295.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_203538_054279699.jsonl +25 -0
- package/.beads/.br_history/issues.20260308_203538_054279699.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_203547_597113070.jsonl +26 -0
- package/.beads/.br_history/issues.20260308_203547_597113070.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_203547_775139216.jsonl +27 -0
- package/.beads/.br_history/issues.20260308_203547_775139216.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_203547_950724773.jsonl +28 -0
- package/.beads/.br_history/issues.20260308_203547_950724773.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_203548_107684523.jsonl +29 -0
- package/.beads/.br_history/issues.20260308_203548_107684523.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_203548_310389993.jsonl +30 -0
- package/.beads/.br_history/issues.20260308_203548_310389993.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_203825_953337320.jsonl +31 -0
- package/.beads/.br_history/issues.20260308_203825_953337320.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_204056_071377736.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_204056_071377736.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205141_517616844.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205141_517616844.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205141_648994024.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205141_648994024.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205141_867598036.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205141_867598036.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205142_094157355.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205142_094157355.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205142_327315677.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205142_327315677.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205142_545563822.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205142_545563822.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205213_061989333.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205213_061989333.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205213_181103364.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205213_181103364.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205213_408872234.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205213_408872234.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205213_616681652.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205213_616681652.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205213_821507069.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205213_821507069.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205214_026661112.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205214_026661112.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205454_955250554.jsonl +32 -0
- package/.beads/.br_history/issues.20260308_205454_955250554.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205556_337800392.jsonl +33 -0
- package/.beads/.br_history/issues.20260308_205556_337800392.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_205824_274686694.jsonl +33 -0
- package/.beads/.br_history/issues.20260308_205824_274686694.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_210240_583768328.jsonl +34 -0
- package/.beads/.br_history/issues.20260308_210240_583768328.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212223_641541494.jsonl +34 -0
- package/.beads/.br_history/issues.20260308_212223_641541494.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212227_735550996.jsonl +35 -0
- package/.beads/.br_history/issues.20260308_212227_735550996.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212232_547298548.jsonl +36 -0
- package/.beads/.br_history/issues.20260308_212232_547298548.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212528_843628125.jsonl +37 -0
- package/.beads/.br_history/issues.20260308_212528_843628125.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212529_094530502.jsonl +38 -0
- package/.beads/.br_history/issues.20260308_212529_094530502.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212529_331000853.jsonl +39 -0
- package/.beads/.br_history/issues.20260308_212529_331000853.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212529_587925652.jsonl +40 -0
- package/.beads/.br_history/issues.20260308_212529_587925652.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212804_927764103.jsonl +41 -0
- package/.beads/.br_history/issues.20260308_212804_927764103.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212805_153673453.jsonl +42 -0
- package/.beads/.br_history/issues.20260308_212805_153673453.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212805_415982363.jsonl +43 -0
- package/.beads/.br_history/issues.20260308_212805_415982363.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212805_657497741.jsonl +44 -0
- package/.beads/.br_history/issues.20260308_212805_657497741.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212805_952838724.jsonl +45 -0
- package/.beads/.br_history/issues.20260308_212805_952838724.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212806_325433779.jsonl +46 -0
- package/.beads/.br_history/issues.20260308_212806_325433779.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212806_584685598.jsonl +47 -0
- package/.beads/.br_history/issues.20260308_212806_584685598.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212806_827817208.jsonl +48 -0
- package/.beads/.br_history/issues.20260308_212806_827817208.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212807_111320451.jsonl +49 -0
- package/.beads/.br_history/issues.20260308_212807_111320451.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212807_409545536.jsonl +50 -0
- package/.beads/.br_history/issues.20260308_212807_409545536.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212807_625063294.jsonl +51 -0
- package/.beads/.br_history/issues.20260308_212807_625063294.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212807_843906551.jsonl +52 -0
- package/.beads/.br_history/issues.20260308_212807_843906551.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212808_100304073.jsonl +53 -0
- package/.beads/.br_history/issues.20260308_212808_100304073.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212808_324723976.jsonl +54 -0
- package/.beads/.br_history/issues.20260308_212808_324723976.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212808_557513104.jsonl +55 -0
- package/.beads/.br_history/issues.20260308_212808_557513104.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_212808_788048322.jsonl +56 -0
- package/.beads/.br_history/issues.20260308_212808_788048322.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_213702_613249728.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_213702_613249728.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_213715_115792063.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_213715_115792063.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_213715_462220666.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_213715_462220666.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_213727_191258923.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_213727_191258923.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_213727_684383652.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_213727_684383652.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_213735_751882991.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_213735_751882991.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_222052_279844960.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_222052_279844960.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_222056_873282114.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_222056_873282114.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_222103_402410761.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_222103_402410761.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235202_180577215.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235202_180577215.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235202_387414163.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235202_387414163.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235202_564422794.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235202_564422794.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235202_742600597.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235202_742600597.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235208_133360069.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235208_133360069.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235505_473406307.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235505_473406307.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235505_662360489.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235505_662360489.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235505_843935624.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235505_843935624.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260308_235506_044530221.jsonl +57 -0
- package/.beads/.br_history/issues.20260308_235506_044530221.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_002618_115728731.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_002618_115728731.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_003748_878174586.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_003748_878174586.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_004057_868755623.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_004057_868755623.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_004058_512842163.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_004058_512842163.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_004058_994445226.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_004058_994445226.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_004059_475988596.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_004059_475988596.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_161902_566857851.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_161902_566857851.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_170512_277017739.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_170512_277017739.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_170512_477876921.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_170512_477876921.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_170512_664382701.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_170512_664382701.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_170512_859400333.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_170512_859400333.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_212326_082771164.jsonl +57 -0
- package/.beads/.br_history/issues.20260309_212326_082771164.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_212326_245619716.jsonl +58 -0
- package/.beads/.br_history/issues.20260309_212326_245619716.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_212326_403198317.jsonl +59 -0
- package/.beads/.br_history/issues.20260309_212326_403198317.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_212332_539197678.jsonl +60 -0
- package/.beads/.br_history/issues.20260309_212332_539197678.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_212332_731373599.jsonl +60 -0
- package/.beads/.br_history/issues.20260309_212332_731373599.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_212332_928710953.jsonl +60 -0
- package/.beads/.br_history/issues.20260309_212332_928710953.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_213021_341505240.jsonl +60 -0
- package/.beads/.br_history/issues.20260309_213021_341505240.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_213022_023136934.jsonl +60 -0
- package/.beads/.br_history/issues.20260309_213022_023136934.jsonl.meta.json +1 -0
- package/.beads/.br_history/issues.20260309_213022_400050719.jsonl +60 -0
- package/.beads/.br_history/issues.20260309_213022_400050719.jsonl.meta.json +1 -0
- package/.beads/config.yaml +4 -0
- package/.beads/issues.jsonl +60 -0
- package/.beads/metadata.json +4 -0
- package/README.md +226 -43
- package/__tests__/adapter-schema.test.js +119 -0
- package/__tests__/ask.test.js +327 -0
- package/__tests__/aws-plugin.test.js +84 -0
- package/__tests__/az-plugin.test.js +84 -0
- package/__tests__/builtin-adapter.test.js +29 -0
- package/__tests__/cline-plugin.test.js +109 -0
- package/__tests__/cline-skill.test.js +49 -0
- package/__tests__/config.test.js +297 -0
- package/__tests__/docker-plugin.test.js +95 -0
- package/__tests__/executor.test.js +303 -0
- package/__tests__/eza-plugin.test.js +81 -0
- package/__tests__/gcloud-plugin.test.js +86 -0
- package/__tests__/gh-plugin.test.js +86 -0
- package/__tests__/helm-plugin.test.js +81 -0
- package/__tests__/help-json.test.js +19 -0
- package/__tests__/http-adapter.test.js +118 -0
- package/__tests__/just-plugin.test.js +82 -0
- package/__tests__/kubectl-plugin.test.js +83 -0
- package/__tests__/linear-plugin.test.js +81 -0
- package/__tests__/mcp-adapter.test.js +187 -0
- package/__tests__/mcp-local.test.js +105 -0
- package/__tests__/namespace-passthrough.test.js +69 -0
- package/__tests__/nextest-plugin.test.js +82 -0
- package/__tests__/npm-plugin.test.js +81 -0
- package/__tests__/nullclaw-plugin.test.js +157 -0
- package/__tests__/openapi-adapter.test.js +199 -0
- package/__tests__/plan-runtime.test.js +43 -0
- package/__tests__/planner.test.js +47 -0
- package/__tests__/plugin-agency-agents.test.js +62 -0
- package/__tests__/plugin-nullclaw.test.js +78 -0
- package/__tests__/plugin-visual-explainer.test.js +62 -0
- package/__tests__/plugins-command.test.js +220 -0
- package/__tests__/plugins-manager.test.js +353 -0
- package/__tests__/plugins-registry.test.js +114 -0
- package/__tests__/plugins-store.test.js +115 -0
- package/__tests__/pnpm-plugin.test.js +81 -0
- package/__tests__/poetry-plugin.test.js +83 -0
- package/__tests__/process-adapter.test.js +143 -0
- package/__tests__/pulumi-plugin.test.js +81 -0
- package/__tests__/railway-plugin.test.js +84 -0
- package/__tests__/server-app.test.js +67 -0
- package/__tests__/server-config-service.test.js +79 -0
- package/__tests__/server-routes-ask.test.js +89 -0
- package/__tests__/server-routes-commands.test.js +55 -0
- package/__tests__/server-routes-config.test.js +87 -0
- package/__tests__/server-routes-jobs.test.js +53 -0
- package/__tests__/server-routes-misc.test.js +112 -0
- package/__tests__/server-storage-adapter.test.js +40 -0
- package/__tests__/server-storage-file.test.js +73 -0
- package/__tests__/server-storage-mongo.test.js +74 -0
- package/__tests__/shell-adapter.test.js +90 -0
- package/__tests__/skills-catalog.test.js +98 -0
- package/__tests__/skills.test.js +442 -0
- package/__tests__/stripe-plugin.test.js +81 -0
- package/__tests__/supabase-plugin.test.js +86 -0
- package/__tests__/terraform-plugin.test.js +83 -0
- package/__tests__/uv-plugin.test.js +81 -0
- package/__tests__/vercel-plugin.test.js +81 -0
- package/__tests__/watchexec-plugin.test.js +80 -0
- package/cli/adapter-schema.js +108 -0
- package/cli/adapters/builtin.js +43 -0
- package/cli/adapters/process.js +262 -0
- package/cli/adapters/shell.js +82 -0
- package/cli/config.js +12 -9
- package/cli/executor.js +6 -1
- package/cli/help-json.js +3 -1
- package/cli/namespace-passthrough.js +38 -0
- package/cli/plugin-install-guidance.js +320 -0
- package/cli/plugins-command.js +138 -0
- package/cli/plugins-manager.js +552 -0
- package/cli/plugins-registry.js +80 -0
- package/cli/plugins-store.js +56 -0
- package/cli/skills-catalog.js +237 -0
- package/cli/skills.js +180 -6
- package/cli/supercli.js +150 -58
- package/docs/docs.html +224 -0
- package/docs/feature-gaps.md +16 -0
- package/docs/index.html +164 -0
- package/docs/plugin-examples.md +397 -0
- package/docs/plugin-harness-guide.md +452 -0
- package/docs/plugins.md +44 -0
- package/docs/skills/cline-non-interactive/SKILL.md +59 -0
- package/docs/skills-catalog.md +81 -0
- package/docs/supported-harnesses.md +277 -0
- package/docs/visual-overview.md +21 -0
- package/jest.config.js +25 -0
- package/package.json +9 -3
- package/plugins/agency-agents/plugin.json +15 -0
- package/plugins/agency-agents/scripts/post-install.js +122 -0
- package/plugins/aws/README.md +46 -0
- package/plugins/aws/plugin.json +42 -0
- package/plugins/az/README.md +46 -0
- package/plugins/az/plugin.json +42 -0
- package/plugins/beads/plugin.json +202 -0
- package/plugins/clickup/plugin.json +38 -0
- package/plugins/clickup/scripts/post-install.js +107 -0
- package/plugins/clickup/scripts/post-uninstall.js +30 -0
- package/plugins/cline/README.md +48 -0
- package/plugins/cline/plugin.json +92 -0
- package/plugins/commiat/plugin.json +36 -0
- package/plugins/docker/MANIFEST.md +39 -0
- package/plugins/docker/README.md +35 -0
- package/plugins/docker/examples/build-image.sh +7 -0
- package/plugins/docker/examples/inspect-container.sh +6 -0
- package/plugins/docker/examples/list-containers.sh +4 -0
- package/plugins/docker/examples/multi-step-workflow.sh +10 -0
- package/plugins/docker/examples/run-container.sh +7 -0
- package/plugins/docker/plugin.json +266 -0
- package/plugins/eza/README.md +40 -0
- package/plugins/eza/plugin.json +42 -0
- package/plugins/gcloud/README.md +46 -0
- package/plugins/gcloud/plugin.json +42 -0
- package/plugins/gh/README.md +46 -0
- package/plugins/gh/plugin.json +43 -0
- package/plugins/gwc/plugin.json +35 -0
- package/plugins/helm/README.md +42 -0
- package/plugins/helm/plugin.json +42 -0
- package/plugins/just/README.md +42 -0
- package/plugins/just/plugin.json +42 -0
- package/plugins/kubectl/README.md +46 -0
- package/plugins/kubectl/plugin.json +42 -0
- package/plugins/linear/README.md +60 -0
- package/plugins/linear/plugin.json +42 -0
- package/plugins/nextest/README.md +42 -0
- package/plugins/nextest/plugin.json +42 -0
- package/plugins/npm/README.md +46 -0
- package/plugins/npm/plugin.json +42 -0
- package/plugins/nullclaw/README.md +45 -0
- package/plugins/nullclaw/plugin.json +64 -0
- package/plugins/nullclaw/scripts/post-install.js +189 -0
- package/plugins/nullclaw/scripts/post-uninstall.js +25 -0
- package/plugins/openfang/plugin.json +37 -0
- package/plugins/openfang/scripts/post-install.js +163 -0
- package/plugins/openfang/scripts/post-uninstall.js +30 -0
- package/plugins/plugins.json +295 -0
- package/plugins/pnpm/README.md +46 -0
- package/plugins/pnpm/plugin.json +42 -0
- package/plugins/poetry/README.md +46 -0
- package/plugins/poetry/plugin.json +42 -0
- package/plugins/pulumi/README.md +46 -0
- package/plugins/pulumi/plugin.json +42 -0
- package/plugins/railway/README.md +58 -0
- package/plugins/railway/plugin.json +43 -0
- package/plugins/stripe/README.md +49 -0
- package/plugins/stripe/plugin.json +52 -0
- package/plugins/supabase/README.md +55 -0
- package/plugins/supabase/plugin.json +42 -0
- package/plugins/superpowers/plugin.json +22 -0
- package/plugins/superpowers/scripts/post-install.js +124 -0
- package/plugins/superpowers/scripts/post-uninstall.js +30 -0
- package/plugins/terraform/README.md +46 -0
- package/plugins/terraform/plugin.json +42 -0
- package/plugins/uv/README.md +46 -0
- package/plugins/uv/plugin.json +42 -0
- package/plugins/vercel/README.md +47 -0
- package/plugins/vercel/plugin.json +42 -0
- package/plugins/visual-explainer/plugin.json +15 -0
- package/plugins/visual-explainer/scripts/post-install.js +111 -0
- package/plugins/watchexec/README.md +40 -0
- package/plugins/watchexec/plugin.json +42 -0
- package/tests/test-aws-smoke.sh +56 -0
- package/tests/test-az-smoke.sh +56 -0
- package/tests/test-cli.js +116 -2
- package/tests/test-cline-smoke.sh +37 -0
- package/tests/test-eza-smoke.sh +33 -0
- package/tests/test-gcloud-smoke.sh +56 -0
- package/tests/test-gh-smoke.sh +56 -0
- package/tests/test-helm-smoke.sh +33 -0
- package/tests/test-just-smoke.sh +40 -0
- package/tests/test-kubectl-smoke.sh +37 -0
- package/tests/test-linear-smoke.sh +97 -0
- package/tests/test-nextest-smoke.sh +33 -0
- package/tests/test-npm-smoke.sh +32 -0
- package/tests/test-nullclaw-smoke.sh +51 -0
- package/tests/test-plugins-registry.js +212 -0
- package/tests/test-pnpm-smoke.sh +33 -0
- package/tests/test-poetry-smoke.sh +33 -0
- package/tests/test-pulumi-smoke.sh +33 -0
- package/tests/test-railway-smoke.sh +95 -0
- package/tests/test-stripe-smoke.sh +55 -0
- package/tests/test-supabase-smoke.sh +95 -0
- package/tests/test-terraform-smoke.sh +33 -0
- package/tests/test-uv-smoke.sh +33 -0
- package/tests/test-vercel-smoke.sh +55 -0
- package/tests/test-watchexec-smoke.sh +33 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
const fs = require("fs")
|
|
2
|
+
const os = require("os")
|
|
3
|
+
const path = require("path")
|
|
4
|
+
const { execSync } = require("child_process")
|
|
5
|
+
|
|
6
|
+
const CLI = path.join(__dirname, "..", "cli", "supercli.js")
|
|
7
|
+
|
|
8
|
+
function runNoServer(args, options = {}) {
|
|
9
|
+
try {
|
|
10
|
+
const env = { ...process.env }
|
|
11
|
+
delete env.SUPERCLI_SERVER
|
|
12
|
+
const out = execSync(`node ${CLI} ${args}`, {
|
|
13
|
+
encoding: "utf-8",
|
|
14
|
+
timeout: 15000,
|
|
15
|
+
env: { ...env, ...(options.env || {}) }
|
|
16
|
+
})
|
|
17
|
+
return { ok: true, output: out.trim(), code: 0 }
|
|
18
|
+
} catch (err) {
|
|
19
|
+
return {
|
|
20
|
+
ok: false,
|
|
21
|
+
output: (err.stdout || "").trim(),
|
|
22
|
+
stderr: (err.stderr || "").trim(),
|
|
23
|
+
code: err.status
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function writeFakeCurlBinary(dir) {
|
|
29
|
+
const bin = path.join(dir, "curl")
|
|
30
|
+
fs.writeFileSync(bin, [
|
|
31
|
+
"#!/usr/bin/env node",
|
|
32
|
+
"const args = process.argv.slice(2);",
|
|
33
|
+
"const url = args[args.length - 1] || '';",
|
|
34
|
+
"if (args.includes('--version')) { console.log('curl 8.0.0-test'); process.exit(0); }",
|
|
35
|
+
"if (url.includes('/git/trees/main?recursive=1')) {",
|
|
36
|
+
" console.log(JSON.stringify({ tree: [",
|
|
37
|
+
" { type: 'blob', path: 'README.md' },",
|
|
38
|
+
" { type: 'blob', path: 'AGENTS.md' },",
|
|
39
|
+
" { type: 'blob', path: 'CLAUDE.md' },",
|
|
40
|
+
" { type: 'blob', path: 'CONTRIBUTING.md' },",
|
|
41
|
+
" { type: 'blob', path: 'docs/en/README.md' },",
|
|
42
|
+
" { type: 'blob', path: 'docs/en/installation.md' },",
|
|
43
|
+
" { type: 'blob', path: 'docs/en/configuration.md' },",
|
|
44
|
+
" { type: 'blob', path: 'docs/en/commands.md' },",
|
|
45
|
+
" { type: 'blob', path: 'docs/en/usage.md' },",
|
|
46
|
+
" { type: 'blob', path: 'docs/en/architecture.md' },",
|
|
47
|
+
" { type: 'blob', path: 'docs/en/security.md' },",
|
|
48
|
+
" { type: 'blob', path: 'docs/en/gateway-api.md' },",
|
|
49
|
+
" { type: 'blob', path: 'docs/en/development.md' }",
|
|
50
|
+
" ] }));",
|
|
51
|
+
" process.exit(0);",
|
|
52
|
+
"}",
|
|
53
|
+
"if (url.includes('raw.githubusercontent.com/nullclaw/nullclaw/main/')) {",
|
|
54
|
+
" const docPath = url.split('/main/')[1] || 'README.md';",
|
|
55
|
+
" console.log(`# ${docPath}\\n\\nTest markdown for ${docPath}.`);",
|
|
56
|
+
" process.exit(0);",
|
|
57
|
+
"}",
|
|
58
|
+
"console.error(`unsupported url: ${url}`);",
|
|
59
|
+
"process.exit(22);"
|
|
60
|
+
].join("\n"), "utf-8")
|
|
61
|
+
fs.chmodSync(bin, 0o755)
|
|
62
|
+
return bin
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function writeFakeNullclawBinary(dir) {
|
|
66
|
+
const bin = path.join(dir, "nullclaw")
|
|
67
|
+
fs.writeFileSync(bin, [
|
|
68
|
+
"#!/usr/bin/env node",
|
|
69
|
+
"const args = process.argv.slice(2);",
|
|
70
|
+
"if (args[0] === '--version' || args[0] === 'version') { console.log('nullclaw v2026.3.8-test'); process.exit(0); }",
|
|
71
|
+
"if (args[0] === 'status') { console.log('NullClaw status: healthy'); process.exit(0); }",
|
|
72
|
+
"console.log(JSON.stringify({ ok: true, args }));"
|
|
73
|
+
].join("\n"), "utf-8")
|
|
74
|
+
fs.chmodSync(bin, 0o755)
|
|
75
|
+
return bin
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
describe("nullclaw hybrid plugin", () => {
|
|
79
|
+
const fakeDir = fs.mkdtempSync(path.join(os.tmpdir(), "dcli-nullclaw-"))
|
|
80
|
+
const tempHome = fs.mkdtempSync(path.join(os.tmpdir(), "dcli-home-nullclaw-"))
|
|
81
|
+
writeFakeCurlBinary(fakeDir)
|
|
82
|
+
writeFakeNullclawBinary(fakeDir)
|
|
83
|
+
const env = { ...process.env, PATH: `${fakeDir}:${process.env.PATH || ""}`, SUPERCLI_HOME: tempHome }
|
|
84
|
+
let removed = false
|
|
85
|
+
|
|
86
|
+
beforeAll(() => {
|
|
87
|
+
const install = runNoServer("plugins install ./plugins/nullclaw --on-conflict replace --json", { env })
|
|
88
|
+
expect(install.ok).toBe(true)
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
afterAll(() => {
|
|
92
|
+
if (!removed) runNoServer("plugins remove nullclaw --json", { env })
|
|
93
|
+
fs.rmSync(fakeDir, { recursive: true, force: true })
|
|
94
|
+
fs.rmSync(tempHome, { recursive: true, force: true })
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
test("indexes nullclaw skills provider", () => {
|
|
98
|
+
const provider = runNoServer("skills providers show --name nullclaw --json", { env })
|
|
99
|
+
expect(provider.ok).toBe(true)
|
|
100
|
+
const providerData = JSON.parse(provider.output)
|
|
101
|
+
expect(providerData.provider.name).toBe("nullclaw")
|
|
102
|
+
|
|
103
|
+
const list = runNoServer("skills list --catalog --provider nullclaw --json", { env })
|
|
104
|
+
expect(list.ok).toBe(true)
|
|
105
|
+
const listData = JSON.parse(list.output)
|
|
106
|
+
expect(listData.skills.some(skill => skill.id === "nullclaw:root.agents")).toBe(true)
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
test("routes wrapped version command", () => {
|
|
110
|
+
const r = runNoServer("nullclaw cli version --json", { env })
|
|
111
|
+
expect(r.ok).toBe(true)
|
|
112
|
+
const data = JSON.parse(r.output)
|
|
113
|
+
expect(data.command).toBe("nullclaw.cli.version")
|
|
114
|
+
expect(data.data.raw).toBe("nullclaw v2026.3.8-test")
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
test("routes wrapped system status command", () => {
|
|
118
|
+
const r = runNoServer("nullclaw system status --json", { env })
|
|
119
|
+
expect(r.ok).toBe(true)
|
|
120
|
+
const data = JSON.parse(r.output)
|
|
121
|
+
expect(data.command).toBe("nullclaw.system.status")
|
|
122
|
+
expect(data.data.raw).toBe("NullClaw status: healthy")
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
test("supports nullclaw namespace passthrough", () => {
|
|
126
|
+
const r = runNoServer("nullclaw models list --json", { env })
|
|
127
|
+
expect(r.ok).toBe(true)
|
|
128
|
+
const data = JSON.parse(r.output)
|
|
129
|
+
expect(data.command).toBe("nullclaw.passthrough")
|
|
130
|
+
expect(data.data.args[0]).toBe("models")
|
|
131
|
+
expect(data.data.args[1]).toBe("list")
|
|
132
|
+
expect(data.data.args).toContain("--json")
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
test("doctor reports curl and nullclaw dependencies as healthy", () => {
|
|
136
|
+
const r = runNoServer("plugins doctor nullclaw --json", { env })
|
|
137
|
+
expect(r.ok).toBe(true)
|
|
138
|
+
const data = JSON.parse(r.output)
|
|
139
|
+
expect(data.ok).toBe(true)
|
|
140
|
+
expect(data.checks.some(c => c.type === "binary" && c.binary === "curl" && c.ok === true)).toBe(true)
|
|
141
|
+
expect(data.checks.some(c => c.type === "binary" && c.binary === "nullclaw" && c.ok === true)).toBe(true)
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
test("removal cleans up the skills provider", () => {
|
|
145
|
+
const remove = runNoServer("plugins remove nullclaw --json", { env })
|
|
146
|
+
expect(remove.ok).toBe(true)
|
|
147
|
+
removed = true
|
|
148
|
+
|
|
149
|
+
const provider = runNoServer("skills providers show --name nullclaw --json", { env })
|
|
150
|
+
expect(provider.ok).toBe(false)
|
|
151
|
+
|
|
152
|
+
const list = runNoServer("skills list --catalog --provider nullclaw --json", { env })
|
|
153
|
+
expect(list.ok).toBe(true)
|
|
154
|
+
const listData = JSON.parse(list.output)
|
|
155
|
+
expect(listData.skills).toEqual([])
|
|
156
|
+
})
|
|
157
|
+
})
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
describe("openapi adapter", () => {
|
|
2
|
+
const mockSpec = {
|
|
3
|
+
servers: [{ url: "https://api.test/v1" }],
|
|
4
|
+
paths: {
|
|
5
|
+
"/users/{id}": {
|
|
6
|
+
get: {
|
|
7
|
+
operationId: "getUser",
|
|
8
|
+
parameters: [
|
|
9
|
+
{ name: "id", in: "path" },
|
|
10
|
+
{ name: "q", in: "query" }
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"/users": {
|
|
15
|
+
post: {
|
|
16
|
+
operationId: "createUser"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let execute;
|
|
23
|
+
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
jest.clearAllMocks()
|
|
26
|
+
jest.resetModules()
|
|
27
|
+
global.fetch = jest.fn()
|
|
28
|
+
execute = require("../cli/adapters/openapi").execute
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
test("throws if spec or operationId missing", async () => {
|
|
32
|
+
await expect(execute({ adapterConfig: {} }, {}, {})).rejects.toThrow(/requires 'spec' and 'operationId'/)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test("successfully executes GET operation with path and query params", async () => {
|
|
36
|
+
global.fetch
|
|
37
|
+
.mockResolvedValueOnce({
|
|
38
|
+
ok: true,
|
|
39
|
+
json: () => Promise.resolve(mockSpec)
|
|
40
|
+
})
|
|
41
|
+
.mockResolvedValueOnce({
|
|
42
|
+
ok: true,
|
|
43
|
+
headers: { get: () => "application/json" },
|
|
44
|
+
json: () => Promise.resolve({ user: "alice" })
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const context = {
|
|
48
|
+
config: {
|
|
49
|
+
specs: [{ name: "my-spec", url: "http://specs/my.json" }]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const result = await execute({
|
|
54
|
+
adapterConfig: { spec: "my-spec", operationId: "getUser" }
|
|
55
|
+
}, { id: "123", q: "query-val" }, context)
|
|
56
|
+
|
|
57
|
+
expect(global.fetch).toHaveBeenCalledWith("http://specs/my.json")
|
|
58
|
+
expect(global.fetch).toHaveBeenCalledWith(
|
|
59
|
+
"https://api.test/v1/users/123?q=query-val",
|
|
60
|
+
expect.objectContaining({ method: "GET" })
|
|
61
|
+
)
|
|
62
|
+
expect(result).toEqual({ user: "alice" })
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
test("successfully executes POST operation with body", async () => {
|
|
66
|
+
global.fetch
|
|
67
|
+
.mockResolvedValueOnce({
|
|
68
|
+
ok: true,
|
|
69
|
+
json: () => Promise.resolve(mockSpec)
|
|
70
|
+
})
|
|
71
|
+
.mockResolvedValueOnce({
|
|
72
|
+
ok: true,
|
|
73
|
+
headers: { get: () => "text/plain" },
|
|
74
|
+
text: () => Promise.resolve("done")
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const context = {
|
|
78
|
+
config: {
|
|
79
|
+
specs: [{ name: "my-spec", url: "u" }]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const result = await execute({
|
|
84
|
+
adapterConfig: { spec: "my-spec", operationId: "createUser" }
|
|
85
|
+
}, { name: "bob" }, context)
|
|
86
|
+
|
|
87
|
+
expect(global.fetch).toHaveBeenCalledWith(
|
|
88
|
+
"https://api.test/v1/users",
|
|
89
|
+
expect.objectContaining({
|
|
90
|
+
method: "POST",
|
|
91
|
+
body: JSON.stringify({ name: "bob" })
|
|
92
|
+
})
|
|
93
|
+
)
|
|
94
|
+
expect(result).toEqual({ raw: "done" })
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
test("resolves spec from remote server if not in local config", async () => {
|
|
98
|
+
global.fetch
|
|
99
|
+
.mockResolvedValueOnce({
|
|
100
|
+
ok: true,
|
|
101
|
+
json: () => Promise.resolve([{ name: "remote-spec", url: "http://remote/spec.json" }])
|
|
102
|
+
})
|
|
103
|
+
.mockResolvedValueOnce({
|
|
104
|
+
ok: true,
|
|
105
|
+
json: () => Promise.resolve(mockSpec)
|
|
106
|
+
})
|
|
107
|
+
.mockResolvedValueOnce({
|
|
108
|
+
ok: true,
|
|
109
|
+
headers: { get: () => "json" },
|
|
110
|
+
json: () => Promise.resolve({ ok: true })
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
const context = { server: "http://api.test", config: { specs: [] } }
|
|
114
|
+
|
|
115
|
+
await execute({
|
|
116
|
+
adapterConfig: { spec: "remote-spec", operationId: "getUser" }
|
|
117
|
+
}, { id: "1" }, context)
|
|
118
|
+
|
|
119
|
+
expect(global.fetch).toHaveBeenCalledWith("http://api.test/api/specs?format=json")
|
|
120
|
+
expect(global.fetch).toHaveBeenCalledWith("http://remote/spec.json")
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
test("throws if spec not found and no server", async () => {
|
|
124
|
+
const context = { config: { specs: [] } }
|
|
125
|
+
await expect(execute({
|
|
126
|
+
adapterConfig: { spec: "missing", operationId: "op" }
|
|
127
|
+
}, {}, context)).rejects.toThrow(/not found in local config/)
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
test("throws if remote spec list fetch fails", async () => {
|
|
131
|
+
global.fetch.mockResolvedValue({ ok: false, status: 500 })
|
|
132
|
+
const context = { server: "http://api.test", config: { specs: [] } }
|
|
133
|
+
await expect(execute({
|
|
134
|
+
adapterConfig: { spec: "any", operationId: "op" }
|
|
135
|
+
}, {}, context)).rejects.toThrow(/Failed to fetch specs list: 500/)
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
test("throws if remote spec not found in list", async () => {
|
|
139
|
+
global.fetch.mockResolvedValue({
|
|
140
|
+
ok: true,
|
|
141
|
+
json: () => Promise.resolve([])
|
|
142
|
+
})
|
|
143
|
+
const context = { server: "http://api.test", config: { specs: [] } }
|
|
144
|
+
await expect(execute({
|
|
145
|
+
adapterConfig: { spec: "missing", operationId: "op" }
|
|
146
|
+
}, {}, context)).rejects.toThrow(/OpenAPI spec 'missing' not found/)
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
test("throws if actual spec fetch fails", async () => {
|
|
150
|
+
global.fetch
|
|
151
|
+
.mockResolvedValueOnce({ ok: true, json: () => Promise.resolve([{ name: "s", url: "u" }]) })
|
|
152
|
+
.mockResolvedValueOnce({ ok: false, status: 404 })
|
|
153
|
+
const context = { server: "http://api.test", config: { specs: [] } }
|
|
154
|
+
await expect(execute({
|
|
155
|
+
adapterConfig: { spec: "s", operationId: "op" }
|
|
156
|
+
}, {}, context)).rejects.toThrow(/Failed to fetch OpenAPI spec from u: 404/)
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
test("throws if operationId not found in spec", async () => {
|
|
160
|
+
global.fetch.mockResolvedValue({ ok: true, json: () => Promise.resolve(mockSpec) })
|
|
161
|
+
const context = { config: { specs: [{ name: "s", url: "u" }] } }
|
|
162
|
+
await expect(execute({
|
|
163
|
+
adapterConfig: { spec: "s", operationId: "missingOp" }
|
|
164
|
+
}, {}, context)).rejects.toThrow(/Operation 'missingOp' not found in spec/)
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
test("handles API call failure (500)", async () => {
|
|
168
|
+
global.fetch
|
|
169
|
+
.mockResolvedValueOnce({ ok: true, json: () => Promise.resolve(mockSpec) })
|
|
170
|
+
.mockResolvedValueOnce({
|
|
171
|
+
ok: false,
|
|
172
|
+
status: 500,
|
|
173
|
+
statusText: "Err",
|
|
174
|
+
text: () => Promise.resolve("body"),
|
|
175
|
+
headers: { get: () => "text/plain" }
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
const context = { config: { specs: [{ name: "s", url: "u" }] } }
|
|
179
|
+
await expect(execute({
|
|
180
|
+
adapterConfig: { spec: "s", operationId: "getUser" }
|
|
181
|
+
}, { id: "1" }, context)).rejects.toMatchObject({ code: 105 })
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
test("uses spec cache", async () => {
|
|
185
|
+
global.fetch
|
|
186
|
+
.mockResolvedValueOnce({ ok: true, json: () => Promise.resolve(mockSpec) })
|
|
187
|
+
.mockResolvedValue({ ok: true, headers: { get: () => "json" }, json: () => Promise.resolve({}) })
|
|
188
|
+
|
|
189
|
+
const context = { config: { specs: [{ name: "cached", url: "u" }] } }
|
|
190
|
+
|
|
191
|
+
// First call: spec fetch + API call
|
|
192
|
+
await execute({ adapterConfig: { spec: "cached", operationId: "getUser" } }, { id: "1" }, context)
|
|
193
|
+
// Second call: only API call (spec is cached)
|
|
194
|
+
await execute({ adapterConfig: { spec: "cached", operationId: "getUser" } }, { id: "2" }, context)
|
|
195
|
+
|
|
196
|
+
expect(global.fetch).toHaveBeenCalledWith("u")
|
|
197
|
+
expect(global.fetch).toHaveBeenCalledTimes(3) // 1 spec fetch + 2 API calls
|
|
198
|
+
})
|
|
199
|
+
})
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const { buildLocalPlan, annotateServerPlan, outputHumanPlan } = require("../cli/plan-runtime")
|
|
2
|
+
|
|
3
|
+
describe("plan-runtime", () => {
|
|
4
|
+
test("buildLocalPlan annotates local execution", () => {
|
|
5
|
+
const cmd = {
|
|
6
|
+
namespace: "ai",
|
|
7
|
+
resource: "text",
|
|
8
|
+
action: "summarize",
|
|
9
|
+
adapter: "mcp",
|
|
10
|
+
adapterConfig: { tool: "summarize" }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const plan = buildLocalPlan(cmd, { text: "hello" })
|
|
14
|
+
|
|
15
|
+
expect(plan.execution_mode).toBe("local")
|
|
16
|
+
expect(plan.persisted).toBe(false)
|
|
17
|
+
expect(plan.command).toBe("ai.text.summarize")
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
test("annotateServerPlan annotates persisted server plan", () => {
|
|
21
|
+
const plan = annotateServerPlan({ plan_id: "plan_1", command: "x.y.z", steps: [] })
|
|
22
|
+
|
|
23
|
+
expect(plan.execution_mode).toBe("server")
|
|
24
|
+
expect(plan.persisted).toBe(true)
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
test("outputHumanPlan prints execution hint", () => {
|
|
28
|
+
const spy = jest.spyOn(console, "log").mockImplementation(() => {})
|
|
29
|
+
outputHumanPlan({
|
|
30
|
+
plan_id: "plan_1",
|
|
31
|
+
command: "x.y.z",
|
|
32
|
+
risk_level: "safe",
|
|
33
|
+
side_effects: false,
|
|
34
|
+
persisted: false,
|
|
35
|
+
steps: [{ type: "resolve_command", description: "resolve" }]
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
const joined = spy.mock.calls.map(args => args.join(" ")).join("\n")
|
|
39
|
+
expect(joined).toContain("Execution Plan")
|
|
40
|
+
expect(joined).toContain("preview only")
|
|
41
|
+
spy.mockRestore()
|
|
42
|
+
})
|
|
43
|
+
})
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const { createPlan } = require("../cli/planner")
|
|
2
|
+
|
|
3
|
+
describe("planner", () => {
|
|
4
|
+
test("creates default http plan with expected steps", () => {
|
|
5
|
+
const cmd = {
|
|
6
|
+
namespace: "api",
|
|
7
|
+
resource: "users",
|
|
8
|
+
action: "list",
|
|
9
|
+
adapter: "http",
|
|
10
|
+
adapterConfig: { method: "GET", url: "https://example.com/users" }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const plan = createPlan(cmd, { limit: 10 })
|
|
14
|
+
|
|
15
|
+
expect(plan.command).toBe("api.users.list")
|
|
16
|
+
expect(plan.args).toEqual({ limit: 10 })
|
|
17
|
+
expect(plan.steps).toHaveLength(4)
|
|
18
|
+
expect(plan.steps[2]).toMatchObject({
|
|
19
|
+
type: "adapter_request",
|
|
20
|
+
adapter: "http",
|
|
21
|
+
method: "GET",
|
|
22
|
+
url: "https://example.com/users"
|
|
23
|
+
})
|
|
24
|
+
expect(plan.side_effects).toBe(false)
|
|
25
|
+
expect(plan.risk_level).toBe("safe")
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
test("marks mutation command as medium risk by default", () => {
|
|
29
|
+
const cmd = {
|
|
30
|
+
namespace: "api",
|
|
31
|
+
resource: "users",
|
|
32
|
+
action: "create",
|
|
33
|
+
adapter: "openapi",
|
|
34
|
+
mutation: true,
|
|
35
|
+
adapterConfig: { operationId: "createUser" }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const plan = createPlan(cmd, {})
|
|
39
|
+
|
|
40
|
+
expect(plan.side_effects).toBe(true)
|
|
41
|
+
expect(plan.risk_level).toBe("medium")
|
|
42
|
+
expect(plan.steps[2]).toMatchObject({
|
|
43
|
+
adapter: "openapi",
|
|
44
|
+
operationId: "createUser"
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
})
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const { spawnSync } = require("child_process")
|
|
2
|
+
const { addProvider, syncCatalog } = require("../cli/skills-catalog")
|
|
3
|
+
const {
|
|
4
|
+
run,
|
|
5
|
+
buildRemoteEntriesFromTree
|
|
6
|
+
} = require("../plugins/agency-agents/scripts/post-install")
|
|
7
|
+
|
|
8
|
+
jest.mock("child_process")
|
|
9
|
+
jest.mock("../cli/skills-catalog")
|
|
10
|
+
|
|
11
|
+
describe("plugin-agency-agents", () => {
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
jest.clearAllMocks()
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
test("buildRemoteEntriesFromTree filters only agent markdown files", () => {
|
|
17
|
+
const entries = buildRemoteEntriesFromTree({
|
|
18
|
+
tree: [
|
|
19
|
+
{ type: "blob", path: "engineering/engineering-frontend-developer.md" },
|
|
20
|
+
{ type: "blob", path: "strategy/QUICKSTART.md" },
|
|
21
|
+
{ type: "blob", path: "design/README.md" },
|
|
22
|
+
{ type: "blob", path: "marketing/marketing-growth-hacker.md" }
|
|
23
|
+
]
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
expect(entries).toHaveLength(2)
|
|
27
|
+
expect(entries[0].id).toBe("engineering.engineering-frontend-developer")
|
|
28
|
+
expect(entries[1].id).toBe("marketing.marketing-growth-hacker")
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
test("run stores provider and syncs catalog", () => {
|
|
32
|
+
spawnSync.mockReturnValue({
|
|
33
|
+
status: 0,
|
|
34
|
+
stdout: JSON.stringify({
|
|
35
|
+
tree: [
|
|
36
|
+
{ type: "blob", path: "engineering/engineering-frontend-developer.md" },
|
|
37
|
+
{ type: "blob", path: "testing/testing-api-tester.md" }
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
syncCatalog.mockReturnValue({ skills: [1, 2, 3] })
|
|
42
|
+
|
|
43
|
+
const result = run()
|
|
44
|
+
|
|
45
|
+
expect(addProvider).toHaveBeenCalledWith(expect.objectContaining({
|
|
46
|
+
name: "agency-agents",
|
|
47
|
+
type: "remote_static",
|
|
48
|
+
entries: expect.any(Array)
|
|
49
|
+
}))
|
|
50
|
+
expect(syncCatalog).toHaveBeenCalled()
|
|
51
|
+
expect(result).toEqual({
|
|
52
|
+
provider: "agency-agents",
|
|
53
|
+
entries: 2,
|
|
54
|
+
synced_skills: 3
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
test("run throws on curl failure", () => {
|
|
59
|
+
spawnSync.mockReturnValue({ status: 22, stderr: "404" })
|
|
60
|
+
expect(() => run()).toThrow(/Failed to fetch agency-agents metadata/)
|
|
61
|
+
})
|
|
62
|
+
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const { spawnSync } = require("child_process")
|
|
2
|
+
const { addProvider, removeProvider, syncCatalog } = require("../cli/skills-catalog")
|
|
3
|
+
const {
|
|
4
|
+
CATALOG_FILES,
|
|
5
|
+
run,
|
|
6
|
+
buildRemoteEntriesFromTree
|
|
7
|
+
} = require("../plugins/nullclaw/scripts/post-install")
|
|
8
|
+
const { run: runUninstall } = require("../plugins/nullclaw/scripts/post-uninstall")
|
|
9
|
+
|
|
10
|
+
jest.mock("child_process")
|
|
11
|
+
jest.mock("../cli/skills-catalog")
|
|
12
|
+
|
|
13
|
+
describe("plugin-nullclaw", () => {
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
jest.clearAllMocks()
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
test("buildRemoteEntriesFromTree keeps only curated nullclaw docs", () => {
|
|
19
|
+
const entries = buildRemoteEntriesFromTree({
|
|
20
|
+
tree: [
|
|
21
|
+
{ type: "blob", path: "README.md" },
|
|
22
|
+
{ type: "blob", path: "AGENTS.md" },
|
|
23
|
+
{ type: "blob", path: "docs/en/commands.md" },
|
|
24
|
+
{ type: "blob", path: "docs/zh/commands.md" },
|
|
25
|
+
{ type: "blob", path: "spec/webchannel_v1.json" }
|
|
26
|
+
]
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
expect(entries.map(entry => entry.id)).toEqual([
|
|
30
|
+
"root.readme",
|
|
31
|
+
"root.agents",
|
|
32
|
+
"docs.en.commands"
|
|
33
|
+
])
|
|
34
|
+
expect(entries.every(entry => entry.source_url.includes("raw.githubusercontent.com/nullclaw/nullclaw/main/"))).toBe(true)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
test("run stores provider and syncs catalog", () => {
|
|
38
|
+
spawnSync.mockReturnValue({
|
|
39
|
+
status: 0,
|
|
40
|
+
stdout: JSON.stringify({
|
|
41
|
+
tree: CATALOG_FILES.map(file => ({ type: "blob", path: file.path }))
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
syncCatalog.mockReturnValue({ skills: [1, 2, 3, 4] })
|
|
45
|
+
|
|
46
|
+
const result = run()
|
|
47
|
+
|
|
48
|
+
expect(addProvider).toHaveBeenCalledWith(expect.objectContaining({
|
|
49
|
+
name: "nullclaw",
|
|
50
|
+
type: "remote_static",
|
|
51
|
+
entries: expect.arrayContaining([
|
|
52
|
+
expect.objectContaining({ id: "root.agents" }),
|
|
53
|
+
expect.objectContaining({ id: "docs.en.architecture" })
|
|
54
|
+
])
|
|
55
|
+
}))
|
|
56
|
+
expect(syncCatalog).toHaveBeenCalled()
|
|
57
|
+
expect(result).toEqual({
|
|
58
|
+
provider: "nullclaw",
|
|
59
|
+
entries: CATALOG_FILES.length,
|
|
60
|
+
synced_skills: 4
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
test("run throws on curl failure", () => {
|
|
65
|
+
spawnSync.mockReturnValue({ status: 22, stderr: "404" })
|
|
66
|
+
expect(() => run()).toThrow(/Failed to fetch nullclaw metadata/)
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
test("post-uninstall removes provider and syncs catalog", () => {
|
|
70
|
+
removeProvider.mockReturnValue(true)
|
|
71
|
+
syncCatalog.mockReturnValue({ skills: [1] })
|
|
72
|
+
const result = runUninstall()
|
|
73
|
+
expect(removeProvider).toHaveBeenCalledWith("nullclaw")
|
|
74
|
+
expect(addProvider).not.toHaveBeenCalled()
|
|
75
|
+
expect(syncCatalog).toHaveBeenCalled()
|
|
76
|
+
expect(result).toEqual({ provider: "nullclaw", removed: true, synced_skills: 1 })
|
|
77
|
+
})
|
|
78
|
+
})
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const { spawnSync } = require("child_process")
|
|
2
|
+
const { addProvider, syncCatalog } = require("../cli/skills-catalog")
|
|
3
|
+
const {
|
|
4
|
+
run,
|
|
5
|
+
buildRemoteEntriesFromTree
|
|
6
|
+
} = require("../plugins/visual-explainer/scripts/post-install")
|
|
7
|
+
|
|
8
|
+
jest.mock("child_process")
|
|
9
|
+
jest.mock("../cli/skills-catalog")
|
|
10
|
+
|
|
11
|
+
describe("plugin-visual-explainer", () => {
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
jest.clearAllMocks()
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
test("buildRemoteEntriesFromTree filters only normalized markdown skills", () => {
|
|
17
|
+
const entries = buildRemoteEntriesFromTree({
|
|
18
|
+
tree: [
|
|
19
|
+
{ type: "blob", path: "plugins/visual-explainer-normalized/SKILL.md" },
|
|
20
|
+
{ type: "blob", path: "plugins/visual-explainer-normalized/commands/diff-review.md" },
|
|
21
|
+
{ type: "blob", path: "plugins/visual-explainer/commands/diff-review.md" },
|
|
22
|
+
{ type: "blob", path: "plugins/visual-explainer-normalized/templates/architecture.html" }
|
|
23
|
+
]
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
expect(entries).toHaveLength(2)
|
|
27
|
+
expect(entries[0].id).toBe("visual-explainer.commands.diff-review")
|
|
28
|
+
expect(entries[1].id).toBe("visual-explainer.skill")
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
test("run stores provider and syncs catalog", () => {
|
|
32
|
+
spawnSync.mockReturnValue({
|
|
33
|
+
status: 0,
|
|
34
|
+
stdout: JSON.stringify({
|
|
35
|
+
tree: [
|
|
36
|
+
{ type: "blob", path: "plugins/visual-explainer-normalized/SKILL.md" },
|
|
37
|
+
{ type: "blob", path: "plugins/visual-explainer-normalized/commands/generate-web-diagram.md" }
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
syncCatalog.mockReturnValue({ skills: [1, 2, 3] })
|
|
42
|
+
|
|
43
|
+
const result = run()
|
|
44
|
+
|
|
45
|
+
expect(addProvider).toHaveBeenCalledWith(expect.objectContaining({
|
|
46
|
+
name: "visual-explainer",
|
|
47
|
+
type: "remote_static",
|
|
48
|
+
entries: expect.any(Array)
|
|
49
|
+
}))
|
|
50
|
+
expect(syncCatalog).toHaveBeenCalled()
|
|
51
|
+
expect(result).toEqual({
|
|
52
|
+
provider: "visual-explainer",
|
|
53
|
+
entries: 2,
|
|
54
|
+
synced_skills: 3
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
test("run throws on curl failure", () => {
|
|
59
|
+
spawnSync.mockReturnValue({ status: 22, stderr: "404" })
|
|
60
|
+
expect(() => run()).toThrow(/Failed to fetch visual-explainer metadata/)
|
|
61
|
+
})
|
|
62
|
+
})
|