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.
Files changed (389) hide show
  1. package/.beads/.br_history/issues.20260308_200823_636718328.jsonl +20 -0
  2. package/.beads/.br_history/issues.20260308_200823_636718328.jsonl.meta.json +1 -0
  3. package/.beads/.br_history/issues.20260308_200827_033159453.jsonl +21 -0
  4. package/.beads/.br_history/issues.20260308_200827_033159453.jsonl.meta.json +1 -0
  5. package/.beads/.br_history/issues.20260308_200829_595900053.jsonl +22 -0
  6. package/.beads/.br_history/issues.20260308_200829_595900053.jsonl.meta.json +1 -0
  7. package/.beads/.br_history/issues.20260308_200834_079930100.jsonl +23 -0
  8. package/.beads/.br_history/issues.20260308_200834_079930100.jsonl.meta.json +1 -0
  9. package/.beads/.br_history/issues.20260308_200858_370924996.jsonl +24 -0
  10. package/.beads/.br_history/issues.20260308_200858_370924996.jsonl.meta.json +1 -0
  11. package/.beads/.br_history/issues.20260308_201031_019730855.jsonl +24 -0
  12. package/.beads/.br_history/issues.20260308_201031_019730855.jsonl.meta.json +1 -0
  13. package/.beads/.br_history/issues.20260308_201031_578974884.jsonl +24 -0
  14. package/.beads/.br_history/issues.20260308_201031_578974884.jsonl.meta.json +1 -0
  15. package/.beads/.br_history/issues.20260308_201054_780345548.jsonl +24 -0
  16. package/.beads/.br_history/issues.20260308_201054_780345548.jsonl.meta.json +1 -0
  17. package/.beads/.br_history/issues.20260308_201054_896980019.jsonl +24 -0
  18. package/.beads/.br_history/issues.20260308_201054_896980019.jsonl.meta.json +1 -0
  19. package/.beads/.br_history/issues.20260308_201128_599819688.jsonl +24 -0
  20. package/.beads/.br_history/issues.20260308_201128_599819688.jsonl.meta.json +1 -0
  21. package/.beads/.br_history/issues.20260308_201128_710221699.jsonl +24 -0
  22. package/.beads/.br_history/issues.20260308_201128_710221699.jsonl.meta.json +1 -0
  23. package/.beads/.br_history/issues.20260308_201204_745649213.jsonl +24 -0
  24. package/.beads/.br_history/issues.20260308_201204_745649213.jsonl.meta.json +1 -0
  25. package/.beads/.br_history/issues.20260308_201338_908436144.jsonl +24 -0
  26. package/.beads/.br_history/issues.20260308_201338_908436144.jsonl.meta.json +1 -0
  27. package/.beads/.br_history/issues.20260308_201344_734860714.jsonl +25 -0
  28. package/.beads/.br_history/issues.20260308_201344_734860714.jsonl.meta.json +1 -0
  29. package/.beads/.br_history/issues.20260308_201630_819282295.jsonl +25 -0
  30. package/.beads/.br_history/issues.20260308_201630_819282295.jsonl.meta.json +1 -0
  31. package/.beads/.br_history/issues.20260308_203538_054279699.jsonl +25 -0
  32. package/.beads/.br_history/issues.20260308_203538_054279699.jsonl.meta.json +1 -0
  33. package/.beads/.br_history/issues.20260308_203547_597113070.jsonl +26 -0
  34. package/.beads/.br_history/issues.20260308_203547_597113070.jsonl.meta.json +1 -0
  35. package/.beads/.br_history/issues.20260308_203547_775139216.jsonl +27 -0
  36. package/.beads/.br_history/issues.20260308_203547_775139216.jsonl.meta.json +1 -0
  37. package/.beads/.br_history/issues.20260308_203547_950724773.jsonl +28 -0
  38. package/.beads/.br_history/issues.20260308_203547_950724773.jsonl.meta.json +1 -0
  39. package/.beads/.br_history/issues.20260308_203548_107684523.jsonl +29 -0
  40. package/.beads/.br_history/issues.20260308_203548_107684523.jsonl.meta.json +1 -0
  41. package/.beads/.br_history/issues.20260308_203548_310389993.jsonl +30 -0
  42. package/.beads/.br_history/issues.20260308_203548_310389993.jsonl.meta.json +1 -0
  43. package/.beads/.br_history/issues.20260308_203825_953337320.jsonl +31 -0
  44. package/.beads/.br_history/issues.20260308_203825_953337320.jsonl.meta.json +1 -0
  45. package/.beads/.br_history/issues.20260308_204056_071377736.jsonl +32 -0
  46. package/.beads/.br_history/issues.20260308_204056_071377736.jsonl.meta.json +1 -0
  47. package/.beads/.br_history/issues.20260308_205141_517616844.jsonl +32 -0
  48. package/.beads/.br_history/issues.20260308_205141_517616844.jsonl.meta.json +1 -0
  49. package/.beads/.br_history/issues.20260308_205141_648994024.jsonl +32 -0
  50. package/.beads/.br_history/issues.20260308_205141_648994024.jsonl.meta.json +1 -0
  51. package/.beads/.br_history/issues.20260308_205141_867598036.jsonl +32 -0
  52. package/.beads/.br_history/issues.20260308_205141_867598036.jsonl.meta.json +1 -0
  53. package/.beads/.br_history/issues.20260308_205142_094157355.jsonl +32 -0
  54. package/.beads/.br_history/issues.20260308_205142_094157355.jsonl.meta.json +1 -0
  55. package/.beads/.br_history/issues.20260308_205142_327315677.jsonl +32 -0
  56. package/.beads/.br_history/issues.20260308_205142_327315677.jsonl.meta.json +1 -0
  57. package/.beads/.br_history/issues.20260308_205142_545563822.jsonl +32 -0
  58. package/.beads/.br_history/issues.20260308_205142_545563822.jsonl.meta.json +1 -0
  59. package/.beads/.br_history/issues.20260308_205213_061989333.jsonl +32 -0
  60. package/.beads/.br_history/issues.20260308_205213_061989333.jsonl.meta.json +1 -0
  61. package/.beads/.br_history/issues.20260308_205213_181103364.jsonl +32 -0
  62. package/.beads/.br_history/issues.20260308_205213_181103364.jsonl.meta.json +1 -0
  63. package/.beads/.br_history/issues.20260308_205213_408872234.jsonl +32 -0
  64. package/.beads/.br_history/issues.20260308_205213_408872234.jsonl.meta.json +1 -0
  65. package/.beads/.br_history/issues.20260308_205213_616681652.jsonl +32 -0
  66. package/.beads/.br_history/issues.20260308_205213_616681652.jsonl.meta.json +1 -0
  67. package/.beads/.br_history/issues.20260308_205213_821507069.jsonl +32 -0
  68. package/.beads/.br_history/issues.20260308_205213_821507069.jsonl.meta.json +1 -0
  69. package/.beads/.br_history/issues.20260308_205214_026661112.jsonl +32 -0
  70. package/.beads/.br_history/issues.20260308_205214_026661112.jsonl.meta.json +1 -0
  71. package/.beads/.br_history/issues.20260308_205454_955250554.jsonl +32 -0
  72. package/.beads/.br_history/issues.20260308_205454_955250554.jsonl.meta.json +1 -0
  73. package/.beads/.br_history/issues.20260308_205556_337800392.jsonl +33 -0
  74. package/.beads/.br_history/issues.20260308_205556_337800392.jsonl.meta.json +1 -0
  75. package/.beads/.br_history/issues.20260308_205824_274686694.jsonl +33 -0
  76. package/.beads/.br_history/issues.20260308_205824_274686694.jsonl.meta.json +1 -0
  77. package/.beads/.br_history/issues.20260308_210240_583768328.jsonl +34 -0
  78. package/.beads/.br_history/issues.20260308_210240_583768328.jsonl.meta.json +1 -0
  79. package/.beads/.br_history/issues.20260308_212223_641541494.jsonl +34 -0
  80. package/.beads/.br_history/issues.20260308_212223_641541494.jsonl.meta.json +1 -0
  81. package/.beads/.br_history/issues.20260308_212227_735550996.jsonl +35 -0
  82. package/.beads/.br_history/issues.20260308_212227_735550996.jsonl.meta.json +1 -0
  83. package/.beads/.br_history/issues.20260308_212232_547298548.jsonl +36 -0
  84. package/.beads/.br_history/issues.20260308_212232_547298548.jsonl.meta.json +1 -0
  85. package/.beads/.br_history/issues.20260308_212528_843628125.jsonl +37 -0
  86. package/.beads/.br_history/issues.20260308_212528_843628125.jsonl.meta.json +1 -0
  87. package/.beads/.br_history/issues.20260308_212529_094530502.jsonl +38 -0
  88. package/.beads/.br_history/issues.20260308_212529_094530502.jsonl.meta.json +1 -0
  89. package/.beads/.br_history/issues.20260308_212529_331000853.jsonl +39 -0
  90. package/.beads/.br_history/issues.20260308_212529_331000853.jsonl.meta.json +1 -0
  91. package/.beads/.br_history/issues.20260308_212529_587925652.jsonl +40 -0
  92. package/.beads/.br_history/issues.20260308_212529_587925652.jsonl.meta.json +1 -0
  93. package/.beads/.br_history/issues.20260308_212804_927764103.jsonl +41 -0
  94. package/.beads/.br_history/issues.20260308_212804_927764103.jsonl.meta.json +1 -0
  95. package/.beads/.br_history/issues.20260308_212805_153673453.jsonl +42 -0
  96. package/.beads/.br_history/issues.20260308_212805_153673453.jsonl.meta.json +1 -0
  97. package/.beads/.br_history/issues.20260308_212805_415982363.jsonl +43 -0
  98. package/.beads/.br_history/issues.20260308_212805_415982363.jsonl.meta.json +1 -0
  99. package/.beads/.br_history/issues.20260308_212805_657497741.jsonl +44 -0
  100. package/.beads/.br_history/issues.20260308_212805_657497741.jsonl.meta.json +1 -0
  101. package/.beads/.br_history/issues.20260308_212805_952838724.jsonl +45 -0
  102. package/.beads/.br_history/issues.20260308_212805_952838724.jsonl.meta.json +1 -0
  103. package/.beads/.br_history/issues.20260308_212806_325433779.jsonl +46 -0
  104. package/.beads/.br_history/issues.20260308_212806_325433779.jsonl.meta.json +1 -0
  105. package/.beads/.br_history/issues.20260308_212806_584685598.jsonl +47 -0
  106. package/.beads/.br_history/issues.20260308_212806_584685598.jsonl.meta.json +1 -0
  107. package/.beads/.br_history/issues.20260308_212806_827817208.jsonl +48 -0
  108. package/.beads/.br_history/issues.20260308_212806_827817208.jsonl.meta.json +1 -0
  109. package/.beads/.br_history/issues.20260308_212807_111320451.jsonl +49 -0
  110. package/.beads/.br_history/issues.20260308_212807_111320451.jsonl.meta.json +1 -0
  111. package/.beads/.br_history/issues.20260308_212807_409545536.jsonl +50 -0
  112. package/.beads/.br_history/issues.20260308_212807_409545536.jsonl.meta.json +1 -0
  113. package/.beads/.br_history/issues.20260308_212807_625063294.jsonl +51 -0
  114. package/.beads/.br_history/issues.20260308_212807_625063294.jsonl.meta.json +1 -0
  115. package/.beads/.br_history/issues.20260308_212807_843906551.jsonl +52 -0
  116. package/.beads/.br_history/issues.20260308_212807_843906551.jsonl.meta.json +1 -0
  117. package/.beads/.br_history/issues.20260308_212808_100304073.jsonl +53 -0
  118. package/.beads/.br_history/issues.20260308_212808_100304073.jsonl.meta.json +1 -0
  119. package/.beads/.br_history/issues.20260308_212808_324723976.jsonl +54 -0
  120. package/.beads/.br_history/issues.20260308_212808_324723976.jsonl.meta.json +1 -0
  121. package/.beads/.br_history/issues.20260308_212808_557513104.jsonl +55 -0
  122. package/.beads/.br_history/issues.20260308_212808_557513104.jsonl.meta.json +1 -0
  123. package/.beads/.br_history/issues.20260308_212808_788048322.jsonl +56 -0
  124. package/.beads/.br_history/issues.20260308_212808_788048322.jsonl.meta.json +1 -0
  125. package/.beads/.br_history/issues.20260308_213702_613249728.jsonl +57 -0
  126. package/.beads/.br_history/issues.20260308_213702_613249728.jsonl.meta.json +1 -0
  127. package/.beads/.br_history/issues.20260308_213715_115792063.jsonl +57 -0
  128. package/.beads/.br_history/issues.20260308_213715_115792063.jsonl.meta.json +1 -0
  129. package/.beads/.br_history/issues.20260308_213715_462220666.jsonl +57 -0
  130. package/.beads/.br_history/issues.20260308_213715_462220666.jsonl.meta.json +1 -0
  131. package/.beads/.br_history/issues.20260308_213727_191258923.jsonl +57 -0
  132. package/.beads/.br_history/issues.20260308_213727_191258923.jsonl.meta.json +1 -0
  133. package/.beads/.br_history/issues.20260308_213727_684383652.jsonl +57 -0
  134. package/.beads/.br_history/issues.20260308_213727_684383652.jsonl.meta.json +1 -0
  135. package/.beads/.br_history/issues.20260308_213735_751882991.jsonl +57 -0
  136. package/.beads/.br_history/issues.20260308_213735_751882991.jsonl.meta.json +1 -0
  137. package/.beads/.br_history/issues.20260308_222052_279844960.jsonl +57 -0
  138. package/.beads/.br_history/issues.20260308_222052_279844960.jsonl.meta.json +1 -0
  139. package/.beads/.br_history/issues.20260308_222056_873282114.jsonl +57 -0
  140. package/.beads/.br_history/issues.20260308_222056_873282114.jsonl.meta.json +1 -0
  141. package/.beads/.br_history/issues.20260308_222103_402410761.jsonl +57 -0
  142. package/.beads/.br_history/issues.20260308_222103_402410761.jsonl.meta.json +1 -0
  143. package/.beads/.br_history/issues.20260308_235202_180577215.jsonl +57 -0
  144. package/.beads/.br_history/issues.20260308_235202_180577215.jsonl.meta.json +1 -0
  145. package/.beads/.br_history/issues.20260308_235202_387414163.jsonl +57 -0
  146. package/.beads/.br_history/issues.20260308_235202_387414163.jsonl.meta.json +1 -0
  147. package/.beads/.br_history/issues.20260308_235202_564422794.jsonl +57 -0
  148. package/.beads/.br_history/issues.20260308_235202_564422794.jsonl.meta.json +1 -0
  149. package/.beads/.br_history/issues.20260308_235202_742600597.jsonl +57 -0
  150. package/.beads/.br_history/issues.20260308_235202_742600597.jsonl.meta.json +1 -0
  151. package/.beads/.br_history/issues.20260308_235208_133360069.jsonl +57 -0
  152. package/.beads/.br_history/issues.20260308_235208_133360069.jsonl.meta.json +1 -0
  153. package/.beads/.br_history/issues.20260308_235505_473406307.jsonl +57 -0
  154. package/.beads/.br_history/issues.20260308_235505_473406307.jsonl.meta.json +1 -0
  155. package/.beads/.br_history/issues.20260308_235505_662360489.jsonl +57 -0
  156. package/.beads/.br_history/issues.20260308_235505_662360489.jsonl.meta.json +1 -0
  157. package/.beads/.br_history/issues.20260308_235505_843935624.jsonl +57 -0
  158. package/.beads/.br_history/issues.20260308_235505_843935624.jsonl.meta.json +1 -0
  159. package/.beads/.br_history/issues.20260308_235506_044530221.jsonl +57 -0
  160. package/.beads/.br_history/issues.20260308_235506_044530221.jsonl.meta.json +1 -0
  161. package/.beads/.br_history/issues.20260309_002618_115728731.jsonl +57 -0
  162. package/.beads/.br_history/issues.20260309_002618_115728731.jsonl.meta.json +1 -0
  163. package/.beads/.br_history/issues.20260309_003748_878174586.jsonl +57 -0
  164. package/.beads/.br_history/issues.20260309_003748_878174586.jsonl.meta.json +1 -0
  165. package/.beads/.br_history/issues.20260309_004057_868755623.jsonl +57 -0
  166. package/.beads/.br_history/issues.20260309_004057_868755623.jsonl.meta.json +1 -0
  167. package/.beads/.br_history/issues.20260309_004058_512842163.jsonl +57 -0
  168. package/.beads/.br_history/issues.20260309_004058_512842163.jsonl.meta.json +1 -0
  169. package/.beads/.br_history/issues.20260309_004058_994445226.jsonl +57 -0
  170. package/.beads/.br_history/issues.20260309_004058_994445226.jsonl.meta.json +1 -0
  171. package/.beads/.br_history/issues.20260309_004059_475988596.jsonl +57 -0
  172. package/.beads/.br_history/issues.20260309_004059_475988596.jsonl.meta.json +1 -0
  173. package/.beads/.br_history/issues.20260309_161902_566857851.jsonl +57 -0
  174. package/.beads/.br_history/issues.20260309_161902_566857851.jsonl.meta.json +1 -0
  175. package/.beads/.br_history/issues.20260309_170512_277017739.jsonl +57 -0
  176. package/.beads/.br_history/issues.20260309_170512_277017739.jsonl.meta.json +1 -0
  177. package/.beads/.br_history/issues.20260309_170512_477876921.jsonl +57 -0
  178. package/.beads/.br_history/issues.20260309_170512_477876921.jsonl.meta.json +1 -0
  179. package/.beads/.br_history/issues.20260309_170512_664382701.jsonl +57 -0
  180. package/.beads/.br_history/issues.20260309_170512_664382701.jsonl.meta.json +1 -0
  181. package/.beads/.br_history/issues.20260309_170512_859400333.jsonl +57 -0
  182. package/.beads/.br_history/issues.20260309_170512_859400333.jsonl.meta.json +1 -0
  183. package/.beads/.br_history/issues.20260309_212326_082771164.jsonl +57 -0
  184. package/.beads/.br_history/issues.20260309_212326_082771164.jsonl.meta.json +1 -0
  185. package/.beads/.br_history/issues.20260309_212326_245619716.jsonl +58 -0
  186. package/.beads/.br_history/issues.20260309_212326_245619716.jsonl.meta.json +1 -0
  187. package/.beads/.br_history/issues.20260309_212326_403198317.jsonl +59 -0
  188. package/.beads/.br_history/issues.20260309_212326_403198317.jsonl.meta.json +1 -0
  189. package/.beads/.br_history/issues.20260309_212332_539197678.jsonl +60 -0
  190. package/.beads/.br_history/issues.20260309_212332_539197678.jsonl.meta.json +1 -0
  191. package/.beads/.br_history/issues.20260309_212332_731373599.jsonl +60 -0
  192. package/.beads/.br_history/issues.20260309_212332_731373599.jsonl.meta.json +1 -0
  193. package/.beads/.br_history/issues.20260309_212332_928710953.jsonl +60 -0
  194. package/.beads/.br_history/issues.20260309_212332_928710953.jsonl.meta.json +1 -0
  195. package/.beads/.br_history/issues.20260309_213021_341505240.jsonl +60 -0
  196. package/.beads/.br_history/issues.20260309_213021_341505240.jsonl.meta.json +1 -0
  197. package/.beads/.br_history/issues.20260309_213022_023136934.jsonl +60 -0
  198. package/.beads/.br_history/issues.20260309_213022_023136934.jsonl.meta.json +1 -0
  199. package/.beads/.br_history/issues.20260309_213022_400050719.jsonl +60 -0
  200. package/.beads/.br_history/issues.20260309_213022_400050719.jsonl.meta.json +1 -0
  201. package/.beads/config.yaml +4 -0
  202. package/.beads/issues.jsonl +60 -0
  203. package/.beads/metadata.json +4 -0
  204. package/README.md +226 -43
  205. package/__tests__/adapter-schema.test.js +119 -0
  206. package/__tests__/ask.test.js +327 -0
  207. package/__tests__/aws-plugin.test.js +84 -0
  208. package/__tests__/az-plugin.test.js +84 -0
  209. package/__tests__/builtin-adapter.test.js +29 -0
  210. package/__tests__/cline-plugin.test.js +109 -0
  211. package/__tests__/cline-skill.test.js +49 -0
  212. package/__tests__/config.test.js +297 -0
  213. package/__tests__/docker-plugin.test.js +95 -0
  214. package/__tests__/executor.test.js +303 -0
  215. package/__tests__/eza-plugin.test.js +81 -0
  216. package/__tests__/gcloud-plugin.test.js +86 -0
  217. package/__tests__/gh-plugin.test.js +86 -0
  218. package/__tests__/helm-plugin.test.js +81 -0
  219. package/__tests__/help-json.test.js +19 -0
  220. package/__tests__/http-adapter.test.js +118 -0
  221. package/__tests__/just-plugin.test.js +82 -0
  222. package/__tests__/kubectl-plugin.test.js +83 -0
  223. package/__tests__/linear-plugin.test.js +81 -0
  224. package/__tests__/mcp-adapter.test.js +187 -0
  225. package/__tests__/mcp-local.test.js +105 -0
  226. package/__tests__/namespace-passthrough.test.js +69 -0
  227. package/__tests__/nextest-plugin.test.js +82 -0
  228. package/__tests__/npm-plugin.test.js +81 -0
  229. package/__tests__/nullclaw-plugin.test.js +157 -0
  230. package/__tests__/openapi-adapter.test.js +199 -0
  231. package/__tests__/plan-runtime.test.js +43 -0
  232. package/__tests__/planner.test.js +47 -0
  233. package/__tests__/plugin-agency-agents.test.js +62 -0
  234. package/__tests__/plugin-nullclaw.test.js +78 -0
  235. package/__tests__/plugin-visual-explainer.test.js +62 -0
  236. package/__tests__/plugins-command.test.js +220 -0
  237. package/__tests__/plugins-manager.test.js +353 -0
  238. package/__tests__/plugins-registry.test.js +114 -0
  239. package/__tests__/plugins-store.test.js +115 -0
  240. package/__tests__/pnpm-plugin.test.js +81 -0
  241. package/__tests__/poetry-plugin.test.js +83 -0
  242. package/__tests__/process-adapter.test.js +143 -0
  243. package/__tests__/pulumi-plugin.test.js +81 -0
  244. package/__tests__/railway-plugin.test.js +84 -0
  245. package/__tests__/server-app.test.js +67 -0
  246. package/__tests__/server-config-service.test.js +79 -0
  247. package/__tests__/server-routes-ask.test.js +89 -0
  248. package/__tests__/server-routes-commands.test.js +55 -0
  249. package/__tests__/server-routes-config.test.js +87 -0
  250. package/__tests__/server-routes-jobs.test.js +53 -0
  251. package/__tests__/server-routes-misc.test.js +112 -0
  252. package/__tests__/server-storage-adapter.test.js +40 -0
  253. package/__tests__/server-storage-file.test.js +73 -0
  254. package/__tests__/server-storage-mongo.test.js +74 -0
  255. package/__tests__/shell-adapter.test.js +90 -0
  256. package/__tests__/skills-catalog.test.js +98 -0
  257. package/__tests__/skills.test.js +442 -0
  258. package/__tests__/stripe-plugin.test.js +81 -0
  259. package/__tests__/supabase-plugin.test.js +86 -0
  260. package/__tests__/terraform-plugin.test.js +83 -0
  261. package/__tests__/uv-plugin.test.js +81 -0
  262. package/__tests__/vercel-plugin.test.js +81 -0
  263. package/__tests__/watchexec-plugin.test.js +80 -0
  264. package/cli/adapter-schema.js +108 -0
  265. package/cli/adapters/builtin.js +43 -0
  266. package/cli/adapters/process.js +262 -0
  267. package/cli/adapters/shell.js +82 -0
  268. package/cli/config.js +12 -9
  269. package/cli/executor.js +6 -1
  270. package/cli/help-json.js +3 -1
  271. package/cli/namespace-passthrough.js +38 -0
  272. package/cli/plugin-install-guidance.js +320 -0
  273. package/cli/plugins-command.js +138 -0
  274. package/cli/plugins-manager.js +552 -0
  275. package/cli/plugins-registry.js +80 -0
  276. package/cli/plugins-store.js +56 -0
  277. package/cli/skills-catalog.js +237 -0
  278. package/cli/skills.js +180 -6
  279. package/cli/supercli.js +150 -58
  280. package/docs/docs.html +224 -0
  281. package/docs/feature-gaps.md +16 -0
  282. package/docs/index.html +164 -0
  283. package/docs/plugin-examples.md +397 -0
  284. package/docs/plugin-harness-guide.md +452 -0
  285. package/docs/plugins.md +44 -0
  286. package/docs/skills/cline-non-interactive/SKILL.md +59 -0
  287. package/docs/skills-catalog.md +81 -0
  288. package/docs/supported-harnesses.md +277 -0
  289. package/docs/visual-overview.md +21 -0
  290. package/jest.config.js +25 -0
  291. package/package.json +9 -3
  292. package/plugins/agency-agents/plugin.json +15 -0
  293. package/plugins/agency-agents/scripts/post-install.js +122 -0
  294. package/plugins/aws/README.md +46 -0
  295. package/plugins/aws/plugin.json +42 -0
  296. package/plugins/az/README.md +46 -0
  297. package/plugins/az/plugin.json +42 -0
  298. package/plugins/beads/plugin.json +202 -0
  299. package/plugins/clickup/plugin.json +38 -0
  300. package/plugins/clickup/scripts/post-install.js +107 -0
  301. package/plugins/clickup/scripts/post-uninstall.js +30 -0
  302. package/plugins/cline/README.md +48 -0
  303. package/plugins/cline/plugin.json +92 -0
  304. package/plugins/commiat/plugin.json +36 -0
  305. package/plugins/docker/MANIFEST.md +39 -0
  306. package/plugins/docker/README.md +35 -0
  307. package/plugins/docker/examples/build-image.sh +7 -0
  308. package/plugins/docker/examples/inspect-container.sh +6 -0
  309. package/plugins/docker/examples/list-containers.sh +4 -0
  310. package/plugins/docker/examples/multi-step-workflow.sh +10 -0
  311. package/plugins/docker/examples/run-container.sh +7 -0
  312. package/plugins/docker/plugin.json +266 -0
  313. package/plugins/eza/README.md +40 -0
  314. package/plugins/eza/plugin.json +42 -0
  315. package/plugins/gcloud/README.md +46 -0
  316. package/plugins/gcloud/plugin.json +42 -0
  317. package/plugins/gh/README.md +46 -0
  318. package/plugins/gh/plugin.json +43 -0
  319. package/plugins/gwc/plugin.json +35 -0
  320. package/plugins/helm/README.md +42 -0
  321. package/plugins/helm/plugin.json +42 -0
  322. package/plugins/just/README.md +42 -0
  323. package/plugins/just/plugin.json +42 -0
  324. package/plugins/kubectl/README.md +46 -0
  325. package/plugins/kubectl/plugin.json +42 -0
  326. package/plugins/linear/README.md +60 -0
  327. package/plugins/linear/plugin.json +42 -0
  328. package/plugins/nextest/README.md +42 -0
  329. package/plugins/nextest/plugin.json +42 -0
  330. package/plugins/npm/README.md +46 -0
  331. package/plugins/npm/plugin.json +42 -0
  332. package/plugins/nullclaw/README.md +45 -0
  333. package/plugins/nullclaw/plugin.json +64 -0
  334. package/plugins/nullclaw/scripts/post-install.js +189 -0
  335. package/plugins/nullclaw/scripts/post-uninstall.js +25 -0
  336. package/plugins/openfang/plugin.json +37 -0
  337. package/plugins/openfang/scripts/post-install.js +163 -0
  338. package/plugins/openfang/scripts/post-uninstall.js +30 -0
  339. package/plugins/plugins.json +295 -0
  340. package/plugins/pnpm/README.md +46 -0
  341. package/plugins/pnpm/plugin.json +42 -0
  342. package/plugins/poetry/README.md +46 -0
  343. package/plugins/poetry/plugin.json +42 -0
  344. package/plugins/pulumi/README.md +46 -0
  345. package/plugins/pulumi/plugin.json +42 -0
  346. package/plugins/railway/README.md +58 -0
  347. package/plugins/railway/plugin.json +43 -0
  348. package/plugins/stripe/README.md +49 -0
  349. package/plugins/stripe/plugin.json +52 -0
  350. package/plugins/supabase/README.md +55 -0
  351. package/plugins/supabase/plugin.json +42 -0
  352. package/plugins/superpowers/plugin.json +22 -0
  353. package/plugins/superpowers/scripts/post-install.js +124 -0
  354. package/plugins/superpowers/scripts/post-uninstall.js +30 -0
  355. package/plugins/terraform/README.md +46 -0
  356. package/plugins/terraform/plugin.json +42 -0
  357. package/plugins/uv/README.md +46 -0
  358. package/plugins/uv/plugin.json +42 -0
  359. package/plugins/vercel/README.md +47 -0
  360. package/plugins/vercel/plugin.json +42 -0
  361. package/plugins/visual-explainer/plugin.json +15 -0
  362. package/plugins/visual-explainer/scripts/post-install.js +111 -0
  363. package/plugins/watchexec/README.md +40 -0
  364. package/plugins/watchexec/plugin.json +42 -0
  365. package/tests/test-aws-smoke.sh +56 -0
  366. package/tests/test-az-smoke.sh +56 -0
  367. package/tests/test-cli.js +116 -2
  368. package/tests/test-cline-smoke.sh +37 -0
  369. package/tests/test-eza-smoke.sh +33 -0
  370. package/tests/test-gcloud-smoke.sh +56 -0
  371. package/tests/test-gh-smoke.sh +56 -0
  372. package/tests/test-helm-smoke.sh +33 -0
  373. package/tests/test-just-smoke.sh +40 -0
  374. package/tests/test-kubectl-smoke.sh +37 -0
  375. package/tests/test-linear-smoke.sh +97 -0
  376. package/tests/test-nextest-smoke.sh +33 -0
  377. package/tests/test-npm-smoke.sh +32 -0
  378. package/tests/test-nullclaw-smoke.sh +51 -0
  379. package/tests/test-plugins-registry.js +212 -0
  380. package/tests/test-pnpm-smoke.sh +33 -0
  381. package/tests/test-poetry-smoke.sh +33 -0
  382. package/tests/test-pulumi-smoke.sh +33 -0
  383. package/tests/test-railway-smoke.sh +95 -0
  384. package/tests/test-stripe-smoke.sh +55 -0
  385. package/tests/test-supabase-smoke.sh +95 -0
  386. package/tests/test-terraform-smoke.sh +33 -0
  387. package/tests/test-uv-smoke.sh +33 -0
  388. package/tests/test-vercel-smoke.sh +55 -0
  389. package/tests/test-watchexec-smoke.sh +33 -0
@@ -0,0 +1,262 @@
1
+ const { spawn, spawnSync } = require("child_process")
2
+
3
+ function toCliFlags(flags) {
4
+ const args = []
5
+ for (const [k, v] of Object.entries(flags)) {
6
+ if (["human", "json", "compact"].includes(k) || k.startsWith("__")) continue
7
+ if (v === false || v === undefined || v === null) continue
8
+ if (Array.isArray(v)) {
9
+ for (const item of v) {
10
+ args.push(`--${k}`, String(item))
11
+ }
12
+ continue
13
+ }
14
+ if (v === true) args.push(`--${k}`)
15
+ else if (typeof v === "object") args.push(`--${k}`, JSON.stringify(v))
16
+ else args.push(`--${k}`, String(v))
17
+ }
18
+ return args
19
+ }
20
+
21
+ function preflightBinary(binary) {
22
+ const r = spawnSync("which", [binary], { encoding: "utf-8", timeout: 3000 })
23
+ if (r.error) {
24
+ return { ok: false, reason: r.error.message }
25
+ }
26
+ return { ok: r.status === 0, reason: (r.stderr || "").trim() }
27
+ }
28
+
29
+ function buildSafetyViolation(details) {
30
+ return Object.assign(new Error(`Operation rejected: Cannot run interactive command in a non-TTY environment. Use non-interactive flags instead.${details ? ` ${details}` : ""}`), {
31
+ code: 91,
32
+ type: "safety_violation",
33
+ recoverable: false
34
+ })
35
+ }
36
+
37
+ function detectInteractiveFlags(args, interactiveFlags) {
38
+ const configured = new Set((interactiveFlags || []).map(f => String(f)))
39
+ if (configured.size === 0) return []
40
+
41
+ const hits = new Set()
42
+ for (const token of args) {
43
+ const value = String(token)
44
+ if (configured.has(value)) {
45
+ hits.add(value)
46
+ continue
47
+ }
48
+
49
+ if (value.startsWith("--") && value.includes("=")) {
50
+ const key = value.slice(0, value.indexOf("="))
51
+ if (configured.has(key)) hits.add(key)
52
+ continue
53
+ }
54
+
55
+ if (value.startsWith("-") && !value.startsWith("--") && value.length > 2) {
56
+ for (const ch of value.slice(1)) {
57
+ const shortFlag = `-${ch}`
58
+ if (configured.has(shortFlag)) hits.add(shortFlag)
59
+ }
60
+ }
61
+ }
62
+
63
+ return [...hits]
64
+ }
65
+
66
+ function validateNonTtySafety(cfg, args) {
67
+ const isTty = !!process.stdout.isTTY
68
+ if (isTty) return
69
+
70
+ if (cfg.requiresInteractive === true) {
71
+ throw buildSafetyViolation("Command requires an interactive TTY session.")
72
+ }
73
+
74
+ const hits = detectInteractiveFlags(args, cfg.interactiveFlags)
75
+ if (hits.length > 0) {
76
+ throw buildSafetyViolation(`Blocked interactive flags: ${hits.join(", ")}.`)
77
+ }
78
+ }
79
+
80
+ function parseJsonLine(text) {
81
+ try {
82
+ return JSON.parse(text)
83
+ } catch {
84
+ return { raw: text }
85
+ }
86
+ }
87
+
88
+ function flushStreamBuffer(buffer, onLine) {
89
+ let pending = buffer
90
+ let newlineIndex = pending.indexOf("\n")
91
+ while (newlineIndex >= 0) {
92
+ const line = pending.slice(0, newlineIndex).trim()
93
+ pending = pending.slice(newlineIndex + 1)
94
+ if (line) onLine(line)
95
+ newlineIndex = pending.indexOf("\n")
96
+ }
97
+ return pending
98
+ }
99
+
100
+ async function execute(cmd, flags, context = {}) {
101
+ const cfg = cmd.adapterConfig || {}
102
+ const binary = cfg.command
103
+ if (!binary) throw new Error("Process adapter requires adapterConfig.command")
104
+
105
+ const baseArgs = Array.isArray(cfg.baseArgs) ? cfg.baseArgs.slice() : []
106
+ const nonTtyBaseArgs = Array.isArray(cfg.nonTtyBaseArgs) ? cfg.nonTtyBaseArgs.slice() : []
107
+ const passthroughMode = cfg.passthrough === true
108
+ const positionalNames = Array.isArray(cfg.positionalArgs) ? cfg.positionalArgs : []
109
+ const parsedAsJson = cfg.parseJson !== false
110
+ const includeJsonFlag = cfg.jsonFlag || null
111
+ const timeoutMs = Number(cfg.timeout_ms) > 0 ? Number(cfg.timeout_ms) : 15000
112
+ const flagsBeforePositionals = cfg.flagsBeforePositionals === true || binary === "docker"
113
+ const passthroughInteractive = passthroughMode && flags.__passthroughInteractive === true
114
+ const cwd = typeof cfg.cwd === "string" ? cfg.cwd : undefined
115
+ const env = (cfg.env && typeof cfg.env === "object") ? { ...process.env, ...cfg.env } : process.env
116
+ const streamMode = cfg.stream || null
117
+ const onStreamEvent = typeof context.onStreamEvent === "function" ? context.onStreamEvent : null
118
+
119
+ const check = preflightBinary(binary)
120
+ if (!check.ok) {
121
+ const help = cfg.missingDependencyHelp || `Run: dcli plugins doctor`
122
+ throw Object.assign(new Error(`Missing dependency '${binary}'. ${help}`), {
123
+ code: 85,
124
+ type: "invalid_argument",
125
+ recoverable: false
126
+ })
127
+ }
128
+
129
+ const remainingFlags = { ...flags }
130
+ const args = [...baseArgs]
131
+ if (!process.stdout.isTTY && nonTtyBaseArgs.length > 0) {
132
+ args.push(...nonTtyBaseArgs)
133
+ }
134
+
135
+ if (passthroughMode) {
136
+ const passthroughArgs = Array.isArray(flags.__rawArgs) ? flags.__rawArgs : []
137
+ args.push(...passthroughArgs)
138
+ } else {
139
+ const positionalValues = []
140
+ for (const name of positionalNames) {
141
+ if (remainingFlags[name] !== undefined) {
142
+ positionalValues.push(String(remainingFlags[name]))
143
+ delete remainingFlags[name]
144
+ }
145
+ }
146
+
147
+ const flagArgs = []
148
+ if (includeJsonFlag) flagArgs.push(includeJsonFlag)
149
+ flagArgs.push(...toCliFlags(remainingFlags))
150
+
151
+ if (flagsBeforePositionals) args.push(...flagArgs, ...positionalValues)
152
+ else args.push(...positionalValues, ...flagArgs)
153
+ }
154
+
155
+ validateNonTtySafety(cfg, args)
156
+
157
+ return new Promise((resolve, reject) => {
158
+ const child = spawn(binary, args, { stdio: passthroughInteractive ? "inherit" : ["ignore", "pipe", "pipe"], cwd, env })
159
+ let out = ""
160
+ let err = ""
161
+ let streamBuffer = ""
162
+ let streamEventCount = 0
163
+ let lastStreamEvent = null
164
+ let settled = false
165
+
166
+ const timer = setTimeout(() => {
167
+ if (settled) return
168
+ settled = true
169
+ child.kill("SIGTERM")
170
+ reject(Object.assign(new Error(`Process command timed out after ${timeoutMs}ms`), {
171
+ code: 105,
172
+ type: "integration_error",
173
+ recoverable: true
174
+ }))
175
+ }, timeoutMs)
176
+
177
+ if (!passthroughInteractive) {
178
+ child.stdout.setEncoding("utf-8")
179
+ child.stderr.setEncoding("utf-8")
180
+ child.stdout.on("data", chunk => {
181
+ out += chunk
182
+ if (streamMode !== "jsonl") return
183
+ streamBuffer = flushStreamBuffer(streamBuffer + chunk, line => {
184
+ const event = parseJsonLine(line)
185
+ streamEventCount += 1
186
+ lastStreamEvent = event
187
+ if (onStreamEvent) onStreamEvent(event)
188
+ })
189
+ })
190
+ child.stderr.on("data", chunk => { err += chunk })
191
+ }
192
+
193
+ child.on("error", e => {
194
+ if (settled) return
195
+ settled = true
196
+ clearTimeout(timer)
197
+ if (e && e.code === "ENOENT") {
198
+ const help = cfg.missingDependencyHelp || `Run: dcli plugins doctor`
199
+ reject(Object.assign(new Error(`Missing dependency '${binary}'. ${help}`), {
200
+ code: 85,
201
+ type: "invalid_argument",
202
+ recoverable: false
203
+ }))
204
+ return
205
+ }
206
+ reject(Object.assign(new Error(`Failed to start process adapter: ${e.message}`), {
207
+ code: 105,
208
+ type: "integration_error",
209
+ recoverable: true
210
+ }))
211
+ })
212
+
213
+ child.on("close", code => {
214
+ if (settled) return
215
+ settled = true
216
+ clearTimeout(timer)
217
+ if (code !== 0) {
218
+ reject(Object.assign(new Error(`Process adapter failed (${binary} ${args.join(" ")}): ${err.trim()}`), {
219
+ code: 105,
220
+ type: "integration_error",
221
+ recoverable: true
222
+ }))
223
+ return
224
+ }
225
+
226
+ if (passthroughInteractive) {
227
+ resolve({ ok: true, passthrough: true })
228
+ return
229
+ }
230
+
231
+ if (streamMode === "jsonl") {
232
+ const trailing = streamBuffer.trim()
233
+ if (trailing) {
234
+ const event = parseJsonLine(trailing)
235
+ streamEventCount += 1
236
+ lastStreamEvent = event
237
+ if (onStreamEvent) onStreamEvent(event)
238
+ }
239
+ resolve({
240
+ streamed: true,
241
+ stream: streamMode,
242
+ event_count: streamEventCount,
243
+ last_event: lastStreamEvent
244
+ })
245
+ return
246
+ }
247
+
248
+ const text = out.trim()
249
+ if (!parsedAsJson) {
250
+ resolve({ raw: text })
251
+ return
252
+ }
253
+ try {
254
+ resolve(text ? JSON.parse(text) : {})
255
+ } catch {
256
+ resolve({ raw: text })
257
+ }
258
+ })
259
+ })
260
+ }
261
+
262
+ module.exports = { execute }
@@ -0,0 +1,82 @@
1
+ const { spawn } = require("child_process")
2
+
3
+ function interpolateScript(script, flags) {
4
+ let out = script
5
+ for (const [k, v] of Object.entries(flags)) {
6
+ if (["human", "json", "compact"].includes(k)) continue
7
+ const value = String(v).replace(/"/g, '\\"')
8
+ out = out.replaceAll(`{{${k}}}`, value)
9
+ }
10
+ return out
11
+ }
12
+
13
+ async function execute(cmd, flags) {
14
+ const cfg = cmd.adapterConfig || {}
15
+ const shellBin = cfg.shell || "bash"
16
+ const script = interpolateScript(cfg.script, flags)
17
+ const timeoutMs = Number(cfg.timeout_ms) > 0 ? Number(cfg.timeout_ms) : 15000
18
+ const parseJson = cfg.parseJson !== false
19
+
20
+ return new Promise((resolve, reject) => {
21
+ const child = spawn(shellBin, ["-lc", script], {
22
+ stdio: ["ignore", "pipe", "pipe"]
23
+ })
24
+
25
+ let stdout = ""
26
+ let stderr = ""
27
+ let settled = false
28
+
29
+ const timer = setTimeout(() => {
30
+ if (settled) return
31
+ settled = true
32
+ child.kill("SIGTERM")
33
+ reject(Object.assign(new Error(`Shell command timed out after ${timeoutMs}ms`), {
34
+ code: 105,
35
+ type: "integration_error",
36
+ recoverable: true
37
+ }))
38
+ }, timeoutMs)
39
+
40
+ child.stdout.setEncoding("utf-8")
41
+ child.stderr.setEncoding("utf-8")
42
+ child.stdout.on("data", chunk => { stdout += chunk })
43
+ child.stderr.on("data", chunk => { stderr += chunk })
44
+
45
+ child.on("error", err => {
46
+ if (settled) return
47
+ settled = true
48
+ clearTimeout(timer)
49
+ reject(Object.assign(new Error(`Failed to start shell adapter: ${err.message}`), {
50
+ code: 105,
51
+ type: "integration_error",
52
+ recoverable: true
53
+ }))
54
+ })
55
+
56
+ child.on("close", code => {
57
+ if (settled) return
58
+ settled = true
59
+ clearTimeout(timer)
60
+ if (code !== 0) {
61
+ reject(Object.assign(new Error(`Shell adapter failed (${shellBin} -lc ...): ${stderr.trim()}`), {
62
+ code: 105,
63
+ type: "integration_error",
64
+ recoverable: true
65
+ }))
66
+ return
67
+ }
68
+ const text = stdout.trim()
69
+ if (!parseJson) {
70
+ resolve({ raw: text })
71
+ return
72
+ }
73
+ try {
74
+ resolve(text ? JSON.parse(text) : {})
75
+ } catch {
76
+ resolve({ raw: text })
77
+ }
78
+ })
79
+ })
80
+ }
81
+
82
+ module.exports = { execute }
package/cli/config.js CHANGED
@@ -1,6 +1,7 @@
1
1
  const fs = require("fs")
2
2
  const path = require("path")
3
3
  const os = require("os")
4
+ const { getInstalledPluginCommands, listInstalledPlugins } = require("./plugins-store")
4
5
 
5
6
  const CACHE_DIR = path.join(os.homedir(), ".supercli")
6
7
  const CACHE_FILE = path.join(CACHE_DIR, "config.json")
@@ -33,12 +34,6 @@ function writeCache(config) {
33
34
  return data
34
35
  }
35
36
 
36
- function ttlValid(cache) {
37
- if (!cache || !cache.fetchedAt) return false
38
- const ttl = (cache.ttl || 3600) * 1000
39
- return (Date.now() - cache.fetchedAt) < ttl
40
- }
41
-
42
37
  async function fetchRemoteConfig(server) {
43
38
  if (!server) throw new Error("SUPERCLI_SERVER is not configured")
44
39
  const url = `${server}/api/config`
@@ -59,8 +54,13 @@ function emptyConfig() {
59
54
 
60
55
  async function loadConfig() {
61
56
  const cache = readCache()
62
- if (cache) return cache
63
- return emptyConfig()
57
+ const base = cache || emptyConfig()
58
+ const pluginCommands = getInstalledPluginCommands()
59
+ const merged = {
60
+ ...base,
61
+ commands: [...(base.commands || []), ...pluginCommands]
62
+ }
63
+ return merged
64
64
  }
65
65
 
66
66
  async function syncConfig(server) {
@@ -95,7 +95,9 @@ async function setMcpServer(name, url) {
95
95
  const next = { name, url }
96
96
  if (idx >= 0) servers[idx] = next
97
97
  else servers.push(next)
98
- cfg.mcp_servers = servers.sort((a, b) => a.name.localeCompare(b.name))
98
+ cfg.mcp_servers = servers
99
+ .filter(s => s && typeof s.name === "string")
100
+ .sort((a, b) => a.name.localeCompare(b.name))
99
101
  return writeCache(cfg)
100
102
  }
101
103
 
@@ -124,6 +126,7 @@ async function showConfig() {
124
126
  ttl: cache.ttl,
125
127
  fetchedAt: new Date(cache.fetchedAt).toISOString(),
126
128
  commands: cache.commands ? cache.commands.length : 0,
129
+ plugins: listInstalledPlugins().length,
127
130
  mcp_servers: cache.mcp_servers ? cache.mcp_servers.length : 0,
128
131
  specs: cache.specs ? cache.specs.length : 0,
129
132
  cacheFile: CACHE_FILE
package/cli/executor.js CHANGED
@@ -1,10 +1,14 @@
1
1
  const path = require("path")
2
+ const { validateAdapterConfig } = require("./adapter-schema")
2
3
 
3
4
  // Adapter registry — lazy-loaded
4
5
  const ADAPTERS = {
5
6
  openapi: () => require("./adapters/openapi"),
6
7
  mcp: () => require("./adapters/mcp"),
7
- http: () => require("./adapters/http")
8
+ http: () => require("./adapters/http"),
9
+ process: () => require("./adapters/process"),
10
+ builtin: () => require("./adapters/builtin"),
11
+ shell: () => require("./adapters/shell")
8
12
  }
9
13
 
10
14
  async function execute(cmd, flags, context) {
@@ -15,6 +19,7 @@ async function execute(cmd, flags, context) {
15
19
  }
16
20
 
17
21
  const adapterName = cmd.adapter
22
+ validateAdapterConfig(cmd)
18
23
 
19
24
  if (!ADAPTERS[adapterName]) {
20
25
  try {
package/cli/help-json.js CHANGED
@@ -2,6 +2,7 @@ function buildCapabilities(config, hasServer) {
2
2
  const commands = {
3
3
  help: { description: "List namespaces and commands" },
4
4
  config: { subcommands: ["show"] },
5
+ plugins: { subcommands: ["list", "explore", "install", "remove", "show", "doctor"], description: "Manage local and remote command plugins" },
5
6
  mcp: { subcommands: ["list", "add", "remove"], description: "Manage local MCP server registry" },
6
7
  commands: { description: "List all commands" },
7
8
  inspect: { description: "Inspect command details", usage: "supercli inspect <ns> <res> <act>" },
@@ -9,7 +10,7 @@ function buildCapabilities(config, hasServer) {
9
10
  execute: { description: "Execute a stored plan", usage: "supercli execute <plan_id>" },
10
11
  skills: {
11
12
  description: "Skill discovery and SKILL.md generation",
12
- subcommands: ["list", "get", "teach"]
13
+ subcommands: ["list", "get", "teach", "sync", "search", "providers"]
13
14
  }
14
15
  }
15
16
  if (hasServer) commands.sync = { description: "Sync local config from SUPERCLI_SERVER" }
@@ -34,6 +35,7 @@ function buildCapabilities(config, hasServer) {
34
35
  },
35
36
  exit_codes: {
36
37
  "0": "success",
38
+ "91": "safety_violation",
37
39
  "82": "validation_error",
38
40
  "85": "invalid_argument",
39
41
  "92": "resource_not_found",
@@ -0,0 +1,38 @@
1
+ function findNamespacePassthrough(config, positional, rawArgs) {
2
+ const namespace = positional[0]
3
+ if (!namespace || !config || !Array.isArray(config.commands)) return null
4
+
5
+ const passthroughCommand = config.commands.find(c => (
6
+ c.namespace === namespace &&
7
+ c.adapterConfig &&
8
+ c.adapterConfig.passthrough === true
9
+ ))
10
+ if (!passthroughCommand) return null
11
+
12
+ const namespaceIndex = rawArgs.indexOf(namespace)
13
+ const passthroughArgs = namespaceIndex >= 0 ? rawArgs.slice(namespaceIndex + 1) : []
14
+
15
+ const maybeResource = passthroughArgs[0]
16
+ const maybeAction = passthroughArgs[1]
17
+ const hasExactCommand = (
18
+ typeof maybeResource === "string" &&
19
+ typeof maybeAction === "string" &&
20
+ !maybeResource.startsWith("-") &&
21
+ !maybeAction.startsWith("-") &&
22
+ config.commands.some(c => (
23
+ c.namespace === namespace &&
24
+ c.resource === maybeResource &&
25
+ c.action === maybeAction
26
+ ))
27
+ )
28
+
29
+ if (hasExactCommand) return null
30
+
31
+ return {
32
+ namespace,
33
+ command: passthroughCommand,
34
+ passthroughArgs
35
+ }
36
+ }
37
+
38
+ module.exports = { findNamespacePassthrough }