superacli 1.1.22 → 1.1.26

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 (257) hide show
  1. package/.beads/.br_history/{issues.20260427_104638_898729442.jsonl → issues.20260427_114912_061702372.jsonl} +65 -65
  2. package/.beads/.br_history/{issues.20260427_104638_209211116.jsonl → issues.20260427_115013_063113906.jsonl} +66 -66
  3. package/.beads/.br_history/{issues.20260427_104637_752744777.jsonl → issues.20260427_115114_208497343.jsonl} +67 -67
  4. package/.beads/.br_history/{issues.20260427_104615_669652069.jsonl → issues.20260427_115215_176080241.jsonl} +68 -68
  5. package/.beads/.br_history/issues.20260427_115316_481573328.jsonl +261 -0
  6. package/.beads/.br_history/issues.20260427_115335_866978652.jsonl +261 -0
  7. package/.beads/.br_history/issues.20260427_115436_866087391.jsonl +261 -0
  8. package/.beads/.br_history/issues.20260427_115538_016094860.jsonl +261 -0
  9. package/.beads/.br_history/issues.20260427_115638_932947449.jsonl +261 -0
  10. package/.beads/.br_history/issues.20260427_115739_982932603.jsonl +261 -0
  11. package/.beads/.br_history/issues.20260427_115840_963681039.jsonl +261 -0
  12. package/.beads/.br_history/issues.20260427_115941_912431509.jsonl +261 -0
  13. package/.beads/.br_history/issues.20260427_120043_043356448.jsonl +261 -0
  14. package/.beads/.br_history/issues.20260427_120144_955596968.jsonl +261 -0
  15. package/.beads/.br_history/issues.20260427_120246_060733977.jsonl +261 -0
  16. package/.beads/.br_history/issues.20260427_120307_717985017.jsonl +261 -0
  17. package/.beads/.br_history/issues.20260427_120408_871846736.jsonl +261 -0
  18. package/.beads/.br_history/issues.20260427_121003_963750732.jsonl +261 -0
  19. package/.beads/.br_history/issues.20260427_121006_018509431.jsonl +261 -0
  20. package/.beads/.br_history/issues.20260427_121019_617062931.jsonl +261 -0
  21. package/.beads/.br_history/issues.20260427_121021_689536311.jsonl +261 -0
  22. package/.beads/.br_history/issues.20260428_172005_240631447.jsonl +261 -0
  23. package/.beads/.br_history/issues.20260430_073641_144807989.jsonl +262 -0
  24. package/.beads/.br_history/issues.20260430_073642_807075699.jsonl +263 -0
  25. package/.beads/.br_history/issues.20260430_073645_625754223.jsonl +264 -0
  26. package/.beads/.br_history/issues.20260430_090639_154646058.jsonl +265 -0
  27. package/.beads/.br_history/issues.20260430_090640_350560318.jsonl +266 -0
  28. package/.beads/.br_history/issues.20260430_090641_509319001.jsonl +267 -0
  29. package/.beads/.br_history/issues.20260430_095140_396749398.jsonl +268 -0
  30. package/.beads/.br_history/issues.20260501_230041_334056077.jsonl +269 -0
  31. package/.beads/.br_recovery/beads.db-wal.20260427_121006_010373120.rebuild-failed +0 -0
  32. package/.beads/.br_recovery/beads.db.20260427_121006_010373120.rebuild-failed +0 -0
  33. package/.beads/beads.db.corrupted +0 -0
  34. package/.beads/issues.jsonl +46 -37
  35. package/.supercli/adapters/test-cli-adapter.js +19 -0
  36. package/cli/adapters/mcp.js +89 -3
  37. package/cli/adapters/openapi.js +71 -2
  38. package/cli/config.js +69 -1
  39. package/cli/daemon.js +349 -0
  40. package/cli/plugins-manager.js +41 -1
  41. package/cli/server-command.js +174 -4
  42. package/cli/supercli.js +35 -15
  43. package/docs/changelog-2026-04.html +6 -0
  44. package/docs/index.html +95 -8
  45. package/docs/plugins.html +30 -0
  46. package/docs/server.md +80 -0
  47. package/graphify-out/GRAPH_REPORT.md +140 -128
  48. package/graphify-out/cache/036077d325d5aa25fc6ad7f01ca32721b02e3f981231f67fb22f59380063572b.json +1 -0
  49. package/graphify-out/cache/11938479cfbdb8e52bf5f0f3c132d56204245ebb19aefe89bb0394feb36dbd5e.json +1 -0
  50. package/graphify-out/cache/141362b25039dee7a4959ef475befea0a25671aae66f3d14917e711e597ffbf6.json +1 -0
  51. package/graphify-out/cache/362adb1b6b483f56d09feaf652f4122366e568aaede752f48383b76d61f5d9d6.json +1 -0
  52. package/graphify-out/cache/42bc8f64d69d2cd9ecf64e92e38f89f7ea479f69c947de5984919e2fd5a716ee.json +1 -0
  53. package/graphify-out/cache/4b5cffce31d9193b7d0a8f15e8a41c66f6733a6490ebaeff2c8ca19701c72c0e.json +1 -0
  54. package/graphify-out/cache/5262fb95a8855fc90efbfff767eb3aacca82c4da5799605a969554580a255404.json +1 -0
  55. package/graphify-out/cache/5ef4e31750d9e7bc4ff4a7b535f247d9ab5ab9627d72e20794779ec4be424c66.json +1 -0
  56. package/graphify-out/cache/68e2b11c95ede4f05b88d001040008cb3ac72d7bd27f351497c87e128fb3b221.json +1 -0
  57. package/graphify-out/cache/6d5023ecffa52382d31152c8c06e86e286789228a3d4f7fde72087f3eafa11bc.json +1 -0
  58. package/graphify-out/cache/6e5776e123142a78f50fa0bfd5ae2d289282051a9b392ae507de7aa9017f95d4.json +1 -0
  59. package/graphify-out/cache/75982dc60fa7353600ca48a3b33f5ba497eea9d5743daac6e61e9cf4f64774be.json +1 -0
  60. package/graphify-out/cache/7796066b51d3a99071debdfb5f40c854400b5bf3aa7c1e83dd6ae88eddca0370.json +1 -0
  61. package/graphify-out/cache/8308aa47b396b929d5b896051ca91422afdde4861108d6f18f5094901093df79.json +1 -0
  62. package/graphify-out/cache/8ccd3b557a1ea98005fba84433f160ccd4a951fbdb6a4c9b7d7ba894f905b06b.json +1 -0
  63. package/graphify-out/cache/90ab53b8f1f3306e7c3a1f92ec628717ea90f4e684db764f7d7aa8e884fe2cae.json +1 -0
  64. package/graphify-out/cache/9832101a7622924f58b9e7d7752b41518049447171f7955e4c50dfd386574e12.json +1 -0
  65. package/graphify-out/cache/9fa6604cc820f3857c55c753ca0024788e4cbb61c4e12ba7ce0e4a1ce4ee0655.json +1 -0
  66. package/graphify-out/cache/a1e24a07beede2876e688cdb6c14e2d24abb22064862a6420cac321efabd3efd.json +1 -0
  67. package/graphify-out/cache/a418312f2805259c33007a18b36b6ae3b6a4da376ccae6006a3b9999262495db.json +1 -0
  68. package/graphify-out/cache/a6d9c029bd31a99b67357291305e27b01c5ef388925f7f2a6e985fec4efa8024.json +1 -0
  69. package/graphify-out/cache/a6ed52b709dd79f98adf72c483e8dfb6098203d7327470b82feb5e11390a5cf4.json +1 -0
  70. package/graphify-out/cache/b045ae4443d972ee8f47b91a0d61c984a190195b38ae1d331430b4c51c43acfd.json +1 -0
  71. package/graphify-out/cache/b849fb88344c2f88f3d22e42b67516e071c7d1e65f77f4ca23f25af6edfca3b3.json +1 -0
  72. package/graphify-out/cache/bc514f4074f89d2f7e7834670602e50bba0f24b8cd8c9d21ff4d361d3fd4d558.json +1 -0
  73. package/graphify-out/cache/be3fc87936f9f24d2d4f4b22b9d2a16f33f538cef1a181663120e23ecf16b81a.json +1 -0
  74. package/graphify-out/cache/c5a4822edbe3a95a56f9f943eed1567e5a5c913d59b1fa3df4ad54ffd9b02697.json +1 -0
  75. package/graphify-out/cache/cf411f1ddde50ee97c1c501f59ed7985bcdc022134574816bcce37ac20848e64.json +1 -0
  76. package/graphify-out/cache/d88625b5813742ca941ce8155cb77afb02425632002f621aca34f217440a392d.json +1 -0
  77. package/graphify-out/cache/da97fdc8af2a3306c292921110f84648bba2b0e85d27473b460b0e8a862ff225.json +1 -0
  78. package/graphify-out/cache/e88de9f1ae117f26fd217c3717eff7e525a284cc942b5f4d26ef2c4d65db59bd.json +1 -0
  79. package/graphify-out/cache/ebf6bd96ef2d8d396389ac7199e6ba818ee2d0c5dfc131fab7cdece9fb710f11.json +1 -0
  80. package/graphify-out/cache/f2a302550a6fe0649d36b8ef0b04b77673bca9f115732af8ae89751944dc9cc6.json +1 -0
  81. package/graphify-out/cache/f9ee11f4395cb41b6f6900079cb7e94297c89b1b0b4798398d2f7a2e244c683b.json +1 -0
  82. package/graphify-out/cache/fb46bd3ef530273918fc8915842453f21b418d536653d3b705b75b417255c246.json +1 -0
  83. package/graphify-out/cache/fcfdab94fe91af1f21fcefdba5a96674b9a16bb768288f3573fe68765163c765.json +1 -0
  84. package/graphify-out/graph.json +2420 -1157
  85. package/package.json +1 -1
  86. package/plugins/bluebuild/install-guidance.json +11 -0
  87. package/plugins/bluebuild/meta.json +5 -0
  88. package/plugins/bluebuild/plugin.json +99 -0
  89. package/plugins/bluebuild/skills/quickstart/SKILL.md +47 -0
  90. package/plugins/cargo-public-api/install-guidance.json +11 -0
  91. package/plugins/cargo-public-api/meta.json +5 -0
  92. package/plugins/cargo-public-api/plugin.json +88 -0
  93. package/plugins/cargo-public-api/skills/quickstart/SKILL.md +51 -0
  94. package/plugins/context-mode/plugin.json +10 -0
  95. package/plugins/context-mode/scripts/post-install.js +1 -1
  96. package/plugins/csview/install-guidance.json +11 -0
  97. package/plugins/csview/meta.json +5 -0
  98. package/plugins/csview/plugin.json +67 -0
  99. package/plugins/csview/skills/quickstart/SKILL.md +51 -0
  100. package/plugins/cymbal/install-guidance.json +11 -0
  101. package/plugins/cymbal/meta.json +5 -0
  102. package/plugins/cymbal/plugin.json +121 -0
  103. package/plugins/cymbal/skills/quickstart/SKILL.md +54 -0
  104. package/plugins/difftastic/install-guidance.json +11 -0
  105. package/plugins/difftastic/meta.json +5 -0
  106. package/plugins/difftastic/plugin.json +87 -0
  107. package/plugins/difftastic/skills/quickstart/SKILL.md +53 -0
  108. package/plugins/dlm/install-guidance.json +11 -0
  109. package/plugins/dlm/meta.json +5 -0
  110. package/plugins/dlm/plugin.json +85 -0
  111. package/plugins/dlm/skills/quickstart/SKILL.md +49 -0
  112. package/plugins/dofigen/install-guidance.json +11 -0
  113. package/plugins/dofigen/meta.json +5 -0
  114. package/plugins/dofigen/plugin.json +84 -0
  115. package/plugins/dofigen/skills/quickstart/SKILL.md +50 -0
  116. package/plugins/example-server-resources/meta.json +11 -0
  117. package/plugins/example-server-resources/plugin.json +46 -0
  118. package/plugins/http-nu/install-guidance.json +11 -0
  119. package/plugins/http-nu/meta.json +5 -0
  120. package/plugins/http-nu/plugin.json +84 -0
  121. package/plugins/http-nu/skills/quickstart/SKILL.md +52 -0
  122. package/plugins/hwatch/install-guidance.json +11 -0
  123. package/plugins/hwatch/meta.json +5 -0
  124. package/plugins/hwatch/plugin.json +100 -0
  125. package/plugins/hwatch/skills/quickstart/SKILL.md +54 -0
  126. package/plugins/hyperfine/install-guidance.json +3 -3
  127. package/plugins/hyperfine/meta.json +2 -2
  128. package/plugins/hyperfine/plugin.json +39 -16
  129. package/plugins/hyperfine/skills/quickstart/SKILL.md +33 -61
  130. package/plugins/json5/install-guidance.json +12 -0
  131. package/plugins/json5/meta.json +5 -0
  132. package/plugins/json5/plugin.json +88 -0
  133. package/plugins/json5/skills/quickstart/SKILL.md +55 -0
  134. package/plugins/mdsf/install-guidance.json +11 -0
  135. package/plugins/mdsf/meta.json +5 -0
  136. package/plugins/mdsf/plugin.json +101 -0
  137. package/plugins/mdsf/skills/quickstart/SKILL.md +55 -0
  138. package/plugins/oha/install-guidance.json +11 -0
  139. package/plugins/oha/meta.json +5 -0
  140. package/plugins/oha/plugin.json +67 -0
  141. package/plugins/oha/skills/quickstart/SKILL.md +44 -0
  142. package/plugins/pv-migrate/install-guidance.json +11 -0
  143. package/plugins/pv-migrate/meta.json +5 -0
  144. package/plugins/pv-migrate/plugin.json +102 -0
  145. package/plugins/pv-migrate/skills/quickstart/SKILL.md +58 -0
  146. package/plugins/rash/install-guidance.json +11 -0
  147. package/plugins/rash/meta.json +5 -0
  148. package/plugins/rash/plugin.json +85 -0
  149. package/plugins/rash/skills/quickstart/SKILL.md +46 -0
  150. package/plugins/rsonpath/install-guidance.json +11 -0
  151. package/plugins/rsonpath/meta.json +5 -0
  152. package/plugins/rsonpath/plugin.json +87 -0
  153. package/plugins/rsonpath/skills/quickstart/SKILL.md +44 -0
  154. package/plugins/rsql/install-guidance.json +11 -0
  155. package/plugins/rsql/meta.json +5 -0
  156. package/plugins/rsql/plugin.json +84 -0
  157. package/plugins/rsql/skills/quickstart/SKILL.md +52 -0
  158. package/plugins/temporal/install-guidance.json +11 -0
  159. package/plugins/temporal/meta.json +5 -0
  160. package/plugins/temporal/plugin.json +95 -0
  161. package/plugins/temporal/skills/quickstart/SKILL.md +49 -0
  162. package/plugins/tkn/install-guidance.json +11 -0
  163. package/plugins/tkn/meta.json +5 -0
  164. package/plugins/tkn/plugin.json +98 -0
  165. package/plugins/tkn/skills/quickstart/SKILL.md +50 -0
  166. package/plugins/toml2json/install-guidance.json +11 -0
  167. package/plugins/toml2json/meta.json +5 -0
  168. package/plugins/toml2json/plugin.json +85 -0
  169. package/plugins/toml2json/skills/quickstart/SKILL.md +47 -0
  170. package/plugins/worktrunk/install-guidance.json +11 -0
  171. package/plugins/worktrunk/meta.json +5 -0
  172. package/plugins/worktrunk/plugin.json +116 -0
  173. package/plugins/worktrunk/skills/quickstart/SKILL.md +62 -0
  174. package/server/app.js +46 -13
  175. package/server/middleware/auth.js +70 -0
  176. package/server/routes/adapters.js +3 -11
  177. package/server/routes/clients.js +46 -0
  178. package/server/routes/docs.js +10 -0
  179. package/server/routes/jobs.js +3 -2
  180. package/server/routes/mcp.js +1 -0
  181. package/server/routes/plugins.js +109 -26
  182. package/server/routes/settings.js +93 -0
  183. package/server/routes/specs.js +8 -3
  184. package/server/services/adaptersService.js +1 -0
  185. package/server/services/pluginResourceService.js +262 -0
  186. package/server/services/pluginsService.js +24 -0
  187. package/server/uploads/superbackend-openapi.json +47 -0
  188. package/server/uploads/test-auth-openapi.json +74 -0
  189. package/server/uploads/test-auth-spec.json +36 -0
  190. package/server/views/adapters.ejs +1 -0
  191. package/server/views/api-keys.ejs +147 -0
  192. package/server/views/clients.ejs +82 -0
  193. package/server/views/docs.ejs +7 -0
  194. package/server/views/jobs.ejs +26 -2
  195. package/server/views/layout.ejs +35 -21
  196. package/server/views/mcp.ejs +278 -21
  197. package/server/views/partials/head.ejs +4 -0
  198. package/server/views/plugins.ejs +33 -32
  199. package/server/views/settings.ejs +99 -0
  200. package/server/views/specs.ejs +217 -22
  201. package/.beads/.br_history/issues.20260427_103259_082222986.jsonl +0 -261
  202. package/.beads/.br_history/issues.20260427_103400_358332602.jsonl +0 -261
  203. package/.beads/.br_history/issues.20260427_103419_681839669.jsonl +0 -261
  204. package/.beads/.br_history/issues.20260427_103522_226669683.jsonl +0 -261
  205. package/.beads/.br_history/issues.20260427_103623_568379011.jsonl +0 -261
  206. package/.beads/.br_history/issues.20260427_103724_772051154.jsonl +0 -261
  207. package/.beads/.br_history/issues.20260427_103825_935228905.jsonl +0 -261
  208. package/.beads/.br_history/issues.20260427_103927_159626780.jsonl +0 -261
  209. package/.beads/.br_history/issues.20260427_104028_436388960.jsonl +0 -261
  210. package/.beads/.br_history/issues.20260427_104129_670562810.jsonl +0 -261
  211. package/.beads/.br_history/issues.20260427_104230_885162615.jsonl +0 -261
  212. package/.beads/.br_history/issues.20260427_104332_071213892.jsonl +0 -261
  213. package/.beads/.br_history/issues.20260427_104349_051129644.jsonl +0 -261
  214. package/.beads/.br_history/issues.20260427_104450_358444507.jsonl +0 -261
  215. package/.beads/.br_history/issues.20260427_104555_654123963.jsonl +0 -261
  216. package/.beads/.br_history/issues.20260427_104559_805009051.jsonl +0 -261
  217. package/.beads/.br_history/issues.20260427_104600_255068030.jsonl +0 -261
  218. package/.beads/.br_history/issues.20260427_104600_717042012.jsonl +0 -261
  219. package/.beads/.br_history/issues.20260427_104601_215845416.jsonl +0 -261
  220. package/.beads/.br_history/issues.20260427_104601_899140331.jsonl +0 -261
  221. package/.beads/.br_history/issues.20260427_104606_172300551.jsonl +0 -261
  222. package/.beads/.br_history/issues.20260427_104606_658098709.jsonl +0 -261
  223. package/.beads/.br_history/issues.20260427_104607_085798670.jsonl +0 -261
  224. package/.beads/.br_history/issues.20260427_104607_627598880.jsonl +0 -261
  225. package/.beads/.br_history/issues.20260427_104608_071298223.jsonl +0 -261
  226. package/.beads/.br_history/issues.20260427_104615_198124329.jsonl +0 -261
  227. package/scripts/post-tweet-issues.js +0 -161
  228. /package/.beads/.br_history/{issues.20260427_103259_082222986.jsonl.meta.json → issues.20260427_114912_061702372.jsonl.meta.json} +0 -0
  229. /package/.beads/.br_history/{issues.20260427_103400_358332602.jsonl.meta.json → issues.20260427_115013_063113906.jsonl.meta.json} +0 -0
  230. /package/.beads/.br_history/{issues.20260427_103419_681839669.jsonl.meta.json → issues.20260427_115114_208497343.jsonl.meta.json} +0 -0
  231. /package/.beads/.br_history/{issues.20260427_103522_226669683.jsonl.meta.json → issues.20260427_115215_176080241.jsonl.meta.json} +0 -0
  232. /package/.beads/.br_history/{issues.20260427_103623_568379011.jsonl.meta.json → issues.20260427_115316_481573328.jsonl.meta.json} +0 -0
  233. /package/.beads/.br_history/{issues.20260427_103724_772051154.jsonl.meta.json → issues.20260427_115335_866978652.jsonl.meta.json} +0 -0
  234. /package/.beads/.br_history/{issues.20260427_103825_935228905.jsonl.meta.json → issues.20260427_115436_866087391.jsonl.meta.json} +0 -0
  235. /package/.beads/.br_history/{issues.20260427_103927_159626780.jsonl.meta.json → issues.20260427_115538_016094860.jsonl.meta.json} +0 -0
  236. /package/.beads/.br_history/{issues.20260427_104028_436388960.jsonl.meta.json → issues.20260427_115638_932947449.jsonl.meta.json} +0 -0
  237. /package/.beads/.br_history/{issues.20260427_104129_670562810.jsonl.meta.json → issues.20260427_115739_982932603.jsonl.meta.json} +0 -0
  238. /package/.beads/.br_history/{issues.20260427_104230_885162615.jsonl.meta.json → issues.20260427_115840_963681039.jsonl.meta.json} +0 -0
  239. /package/.beads/.br_history/{issues.20260427_104332_071213892.jsonl.meta.json → issues.20260427_115941_912431509.jsonl.meta.json} +0 -0
  240. /package/.beads/.br_history/{issues.20260427_104349_051129644.jsonl.meta.json → issues.20260427_120043_043356448.jsonl.meta.json} +0 -0
  241. /package/.beads/.br_history/{issues.20260427_104450_358444507.jsonl.meta.json → issues.20260427_120144_955596968.jsonl.meta.json} +0 -0
  242. /package/.beads/.br_history/{issues.20260427_104555_654123963.jsonl.meta.json → issues.20260427_120246_060733977.jsonl.meta.json} +0 -0
  243. /package/.beads/.br_history/{issues.20260427_104559_805009051.jsonl.meta.json → issues.20260427_120307_717985017.jsonl.meta.json} +0 -0
  244. /package/.beads/.br_history/{issues.20260427_104600_255068030.jsonl.meta.json → issues.20260427_120408_871846736.jsonl.meta.json} +0 -0
  245. /package/.beads/.br_history/{issues.20260427_104600_717042012.jsonl.meta.json → issues.20260427_121003_963750732.jsonl.meta.json} +0 -0
  246. /package/.beads/.br_history/{issues.20260427_104601_215845416.jsonl.meta.json → issues.20260427_121006_018509431.jsonl.meta.json} +0 -0
  247. /package/.beads/.br_history/{issues.20260427_104601_899140331.jsonl.meta.json → issues.20260427_121019_617062931.jsonl.meta.json} +0 -0
  248. /package/.beads/.br_history/{issues.20260427_104606_172300551.jsonl.meta.json → issues.20260427_121021_689536311.jsonl.meta.json} +0 -0
  249. /package/.beads/.br_history/{issues.20260427_104606_658098709.jsonl.meta.json → issues.20260428_172005_240631447.jsonl.meta.json} +0 -0
  250. /package/.beads/.br_history/{issues.20260427_104607_085798670.jsonl.meta.json → issues.20260430_073641_144807989.jsonl.meta.json} +0 -0
  251. /package/.beads/.br_history/{issues.20260427_104607_627598880.jsonl.meta.json → issues.20260430_073642_807075699.jsonl.meta.json} +0 -0
  252. /package/.beads/.br_history/{issues.20260427_104608_071298223.jsonl.meta.json → issues.20260430_073645_625754223.jsonl.meta.json} +0 -0
  253. /package/.beads/.br_history/{issues.20260427_104615_198124329.jsonl.meta.json → issues.20260430_090639_154646058.jsonl.meta.json} +0 -0
  254. /package/.beads/.br_history/{issues.20260427_104615_669652069.jsonl.meta.json → issues.20260430_090640_350560318.jsonl.meta.json} +0 -0
  255. /package/.beads/.br_history/{issues.20260427_104637_752744777.jsonl.meta.json → issues.20260430_090641_509319001.jsonl.meta.json} +0 -0
  256. /package/.beads/.br_history/{issues.20260427_104638_209211116.jsonl.meta.json → issues.20260430_095140_396749398.jsonl.meta.json} +0 -0
  257. /package/.beads/.br_history/{issues.20260427_104638_898729442.jsonl.meta.json → issues.20260501_230041_334056077.jsonl.meta.json} +0 -0
@@ -9,28 +9,32 @@
9
9
  <button @click="showForm=!showForm" class="btn btn-primary">+ Add Spec</button>
10
10
  </div>
11
11
 
12
- <!-- Add form -->
12
+ <!-- Add/Edit form -->
13
13
  <div v-if="showForm" class="bento-card p-6 mb-6">
14
- <form @submit.prevent="create" class="flex flex-col md:flex-row gap-4 items-end">
15
- <div class="flex-1 w-full">
16
- <label class="block text-xs font-semibold text-[#787774] uppercase tracking-wider mb-2">Name</label>
17
- <input v-model="form.name" class="w-full px-4 py-3 bg-[#F7F6F3] border border-[#EAEAEA] rounded-md text-[#111111] focus:outline-none focus:border-[#111111] transition-colors" required placeholder="e.g. referential-api">
14
+ <form @submit.prevent="editing ? update() : create()">
15
+ <div class="flex flex-col md:flex-row gap-4 items-end mb-4">
16
+ <div class="flex-1 w-full">
17
+ <label class="block text-xs font-semibold text-[#787774] uppercase tracking-wider mb-2">Name</label>
18
+ <input v-model="form.name" class="w-full px-4 py-3 bg-[#F7F6F3] border border-[#EAEAEA] rounded-md text-[#111111] focus:outline-none focus:border-[#111111] transition-colors" required placeholder="e.g. referential-api">
19
+ </div>
20
+ <div class="flex-1 w-full">
21
+ <label class="block text-xs font-semibold text-[#787774] uppercase tracking-wider mb-2">URL</label>
22
+ <input v-model="form.url" class="w-full px-4 py-3 bg-[#F7F6F3] border border-[#EAEAEA] rounded-md text-[#111111] focus:outline-none focus:border-[#111111] transition-colors" required placeholder="https://api.example.com/openapi.json">
23
+ </div>
24
+ <div class="w-full md:w-32">
25
+ <label class="block text-xs font-semibold text-[#787774] uppercase tracking-wider mb-2">Auth</label>
26
+ <select v-model="form.auth" class="w-full px-4 py-3 bg-[#F7F6F3] border border-[#EAEAEA] rounded-md text-[#111111] focus:outline-none focus:border-[#111111] transition-colors">
27
+ <option value="none">none</option>
28
+ <option value="oauth">oauth</option>
29
+ <option value="apiKey">apiKey</option>
30
+ <option value="jwt">jwt</option>
31
+ </select>
32
+ </div>
18
33
  </div>
19
- <div class="flex-1 w-full">
20
- <label class="block text-xs font-semibold text-[#787774] uppercase tracking-wider mb-2">URL</label>
21
- <input v-model="form.url" class="w-full px-4 py-3 bg-[#F7F6F3] border border-[#EAEAEA] rounded-md text-[#111111] focus:outline-none focus:border-[#111111] transition-colors" required placeholder="https://api.example.com/openapi.json">
34
+ <div class="flex gap-4 items-center mt-4">
35
+ <button type="submit" class="btn btn-primary">{{ editing ? 'Update' : 'Save' }}</button>
36
+ <button type="button" @click="cancelEdit" class="btn">Cancel</button>
22
37
  </div>
23
- <div class="w-full md:w-32">
24
- <label class="block text-xs font-semibold text-[#787774] uppercase tracking-wider mb-2">Auth</label>
25
- <select v-model="form.auth" class="w-full px-4 py-3 bg-[#F7F6F3] border border-[#EAEAEA] rounded-md text-[#111111] focus:outline-none focus:border-[#111111] transition-colors">
26
- <option value="none">none</option>
27
- <option value="oauth">oauth</option>
28
- <option value="apiKey">apiKey</option>
29
- <option value="jwt">jwt</option>
30
- </select>
31
- </div>
32
- <button type="submit" class="btn btn-primary">Save</button>
33
- <button type="button" @click="showForm=false" class="btn">Cancel</button>
34
38
  </form>
35
39
  </div>
36
40
 
@@ -39,18 +43,45 @@
39
43
  <thead>
40
44
  <tr class="border-b border-[#EAEAEA] bg-[#F7F6F3]">
41
45
  <th class="px-6 py-3 text-left text-xs font-semibold text-[#787774] uppercase tracking-wider">Name</th>
46
+ <th class="px-6 py-3 text-left text-xs font-semibold text-[#787774] uppercase tracking-wider">Plugin</th>
42
47
  <th class="px-6 py-3 text-left text-xs font-semibold text-[#787774] uppercase tracking-wider">URL</th>
43
48
  <th class="px-6 py-3 text-left text-xs font-semibold text-[#787774] uppercase tracking-wider">Auth</th>
44
49
  <th class="px-6 py-3 text-left text-xs font-semibold text-[#787774] uppercase tracking-wider">Actions</th>
45
50
  </tr>
46
51
  </thead>
47
52
  <tbody>
48
- <tr v-if="specs.length===0"><td colspan="4" class="px-6 py-12 text-center text-[#787774]">No specs registered.</td></tr>
53
+ <tr v-if="specs.length===0"><td colspan="5" class="px-6 py-12 text-center text-[#787774]">No specs registered.</td></tr>
49
54
  <tr v-for="s in specs" :key="s._id" class="border-b border-[#EAEAEA] hover:bg-[#F7F6F3] transition-colors">
50
- <td class="px-6 py-4"><code class="mono-text text-sm text-[#1F6C9F]">{{ s.name }}</code></td>
55
+ <td class="px-6 py-4">
56
+ <code class="mono-text text-sm text-[#1F6C9F]">{{ s.displayName || s.name }}</code>
57
+ <div v-if="getUsedCommands(s).length > 0" class="mt-1 text-xs text-[#787774]">
58
+ used by: {{ getUsedCommands(s).map(c => `${c.namespace}.${c.resource}.${c.action}`).join(', ') }}
59
+ </div>
60
+ <div v-if="s.clientId" class="mt-1 text-xs text-[#787774]">
61
+ synced by: {{ s.clientId.substring(0, 8) }}...
62
+ </div>
63
+ </td>
64
+ <td class="px-6 py-4">
65
+ <span v-if="s.origin" class="px-2 py-1 rounded-full text-xs font-semibold" :class="{
66
+ 'bg-blue-100 text-blue-700': s.origin === 'cli',
67
+ 'bg-green-100 text-green-700': s.origin === 'server',
68
+ 'bg-gray-100 text-gray-700': s.origin === 'manual'
69
+ }">{{ s.origin }}</span>
70
+ <span v-else class="text-xs text-[#787774]">manual</span>
71
+ </td>
51
72
  <td class="px-6 py-4 max-w-xs truncate text-[#2F3437]">{{ s.url }}</td>
52
- <td class="px-6 py-4"><span class="badge">{{ s.auth }}</span></td>
53
73
  <td class="px-6 py-4">
74
+ <span class="badge">{{ s.auth }}</span>
75
+ <span v-if="s.status" class="ml-2 text-xs" :class="{'text-green-600': s.status === 'alive', 'text-red-600': s.status === 'error', 'text-orange-600': s.status === 'cors'}">
76
+ {{ s.status === 'alive' ? '✓' : s.status === 'cors' ? '⚠ CORS' : '✗' }} {{ s.lastCheck }}
77
+ <button v-if="s.checkedUrl" @click="copyUrl(s.checkedUrl)" class="ml-2 text-[#787774] hover:text-[#111111]" title="Copy checked URL">📋</button>
78
+ </span>
79
+ </td>
80
+ <td class="px-6 py-4">
81
+ <button @click="check(s)" :disabled="s.checking" class="btn text-xs border-green-200 text-green-600 hover:bg-green-50 hover:border-green-300 mr-2" :class="{'opacity-50': s.checking}">
82
+ {{ s.checking ? 'Checking...' : 'Check' }}
83
+ </button>
84
+ <button @click="edit(s)" class="btn text-xs border-blue-200 text-blue-600 hover:bg-blue-50 hover:border-blue-300 mr-2">Edit</button>
54
85
  <button @click="remove(s._id)" class="btn text-xs border-red-200 text-red-600 hover:bg-red-50 hover:border-red-300">Delete</button>
55
86
  </td>
56
87
  </tr>
@@ -66,11 +97,161 @@
66
97
  data() {
67
98
  return {
68
99
  specs: initialSpecs,
100
+ commands: [],
69
101
  showForm: false,
102
+ editing: false,
103
+ editId: null,
70
104
  form: { name: '', url: '', auth: 'none' }
71
105
  }
72
106
  },
107
+ async mounted() {
108
+ await this.fetchCommands()
109
+ setInterval(() => {
110
+ this.fetchCommands()
111
+ }, 30000)
112
+ },
73
113
  methods: {
114
+ async fetchCommands() {
115
+ try {
116
+ const res = await fetch('/api/commands?format=json')
117
+ const data = await res.json()
118
+ this.commands = data.commands || data || []
119
+ } catch (err) {
120
+ console.error('Failed to fetch commands:', err)
121
+ }
122
+ },
123
+ getUsedCommands(spec) {
124
+ return this.commands.filter(cmd => {
125
+ const adapterConfig = cmd.adapterConfig || {}
126
+ return adapterConfig.spec === spec.name
127
+ })
128
+ },
129
+ copyUrl(url) {
130
+ navigator.clipboard.writeText(url).catch(err => {
131
+ console.error('Failed to copy URL:', err)
132
+ })
133
+ },
134
+ async check(spec) {
135
+ spec.checking = true
136
+ spec.checkedUrl = null
137
+ try {
138
+ const timeout = 10000
139
+ const controller = new AbortController()
140
+ const timeoutId = setTimeout(() => controller.abort(), timeout)
141
+
142
+ // Fetch the spec to find health endpoint
143
+ const specRes = await fetch(spec.url, { signal: controller.signal })
144
+ clearTimeout(timeoutId)
145
+
146
+ if (specRes.ok) {
147
+ const specData = await specRes.json()
148
+ // Find health endpoint in paths
149
+ let healthPath = null
150
+ const healthKeywords = ['health', 'ping', 'status']
151
+
152
+ for (const [path, methods] of Object.entries(specData.paths || {})) {
153
+ for (const keyword of healthKeywords) {
154
+ if (path.toLowerCase().includes(keyword)) {
155
+ healthPath = path
156
+ break
157
+ }
158
+ }
159
+ if (healthPath) break
160
+ }
161
+
162
+ if (healthPath) {
163
+ // Try to call the health endpoint
164
+ // Use server URL from spec if available, otherwise derive from spec URL
165
+ let baseUrl
166
+ if (specData.servers && specData.servers.length > 0) {
167
+ baseUrl = specData.servers[0].url.replace(/\/$/, '') // Remove trailing slash
168
+ } else {
169
+ baseUrl = spec.url.replace(/\/[^/]*$/, '') // Remove filename
170
+ }
171
+ const healthUrl = baseUrl + healthPath
172
+ spec.checkedUrl = healthUrl
173
+ try {
174
+ const healthRes = await fetch(healthUrl, { signal: controller.signal })
175
+
176
+ if (healthRes.ok) {
177
+ spec.status = 'alive'
178
+ spec.lastCheck = new Date().toLocaleTimeString()
179
+ } else if (healthRes.status === 404) {
180
+ // 404 on health endpoint, try root URL as fallback
181
+ spec.checkedUrl = baseUrl
182
+ try {
183
+ const rootRes = await fetch(baseUrl, { signal: controller.signal })
184
+ if (rootRes.ok) {
185
+ spec.status = 'alive'
186
+ spec.lastCheck = new Date().toLocaleTimeString()
187
+ } else {
188
+ spec.status = 'error'
189
+ spec.lastCheck = new Date().toLocaleTimeString()
190
+ }
191
+ } catch (rootErr) {
192
+ if (rootErr instanceof TypeError) {
193
+ spec.status = 'cors'
194
+ spec.lastCheck = new Date().toLocaleTimeString()
195
+ } else {
196
+ spec.status = 'error'
197
+ spec.lastCheck = new Date().toLocaleTimeString()
198
+ }
199
+ }
200
+ } else {
201
+ spec.status = 'error'
202
+ spec.lastCheck = new Date().toLocaleTimeString()
203
+ }
204
+ } catch (healthErr) {
205
+ // Detect CORS error (TypeError without proper response)
206
+ if (healthErr instanceof TypeError) {
207
+ spec.status = 'cors'
208
+ spec.lastCheck = new Date().toLocaleTimeString()
209
+ } else {
210
+ spec.status = 'error'
211
+ spec.lastCheck = new Date().toLocaleTimeString()
212
+ }
213
+ }
214
+ } else {
215
+ // No health endpoint found, just check if spec is accessible
216
+ spec.checkedUrl = spec.url
217
+ spec.status = 'alive'
218
+ spec.lastCheck = new Date().toLocaleTimeString()
219
+ }
220
+ } else {
221
+ spec.checkedUrl = spec.url
222
+ spec.status = 'error'
223
+ spec.lastCheck = new Date().toLocaleTimeString()
224
+ }
225
+ } catch (err) {
226
+ spec.checkedUrl = spec.url
227
+ // Detect CORS error on spec fetch
228
+ if (err instanceof TypeError) {
229
+ spec.status = 'cors'
230
+ spec.lastCheck = new Date().toLocaleTimeString()
231
+ } else {
232
+ spec.status = 'error'
233
+ spec.lastCheck = new Date().toLocaleTimeString()
234
+ }
235
+ } finally {
236
+ spec.checking = false
237
+ }
238
+ },
239
+ edit(spec) {
240
+ this.editing = true
241
+ this.editId = spec._id
242
+ this.form = {
243
+ name: spec.name,
244
+ url: spec.url,
245
+ auth: spec.auth
246
+ }
247
+ this.showForm = true
248
+ },
249
+ cancelEdit() {
250
+ this.editing = false
251
+ this.editId = null
252
+ this.form = { name: '', url: '', auth: 'none' }
253
+ this.showForm = false
254
+ },
74
255
  async create() {
75
256
  const r = await fetch('/api/specs', {
76
257
  method: 'POST',
@@ -81,11 +262,25 @@
81
262
  this.specs.push(doc)
82
263
  this.form = { name: '', url: '', auth: 'none' }
83
264
  this.showForm = false
265
+ await this.fetchCommands()
266
+ },
267
+ async update() {
268
+ const r = await fetch('/api/specs/' + this.editId, {
269
+ method: 'PUT',
270
+ headers: { 'Content-Type': 'application/json' },
271
+ body: JSON.stringify(this.form)
272
+ })
273
+ const doc = await r.json()
274
+ const idx = this.specs.findIndex(s => s._id === this.editId)
275
+ if (idx !== -1) this.specs[idx] = { ...this.specs[idx], ...this.form, updatedAt: new Date() }
276
+ this.cancelEdit()
277
+ await this.fetchCommands()
84
278
  },
85
279
  async remove(id) {
86
280
  if (!confirm('Delete this spec?')) return
87
281
  await fetch('/api/specs/' + id, { method: 'DELETE' })
88
282
  this.specs = this.specs.filter(s => s._id !== id)
283
+ await this.fetchCommands()
89
284
  }
90
285
  }
91
286
  }).mount('#specs-app')