axm.sh 0.1.6

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 (503) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -0
  3. package/dist/src/app.d.ts +7 -0
  4. package/dist/src/app.d.ts.map +1 -0
  5. package/dist/src/app.js +96 -0
  6. package/dist/src/app.js.map +1 -0
  7. package/dist/src/cli-flags.d.ts +3 -0
  8. package/dist/src/cli-flags.d.ts.map +1 -0
  9. package/dist/src/cli-flags.js +4 -0
  10. package/dist/src/cli-flags.js.map +1 -0
  11. package/dist/src/formatter.d.ts +22 -0
  12. package/dist/src/formatter.d.ts.map +1 -0
  13. package/dist/src/formatter.js +170 -0
  14. package/dist/src/formatter.js.map +1 -0
  15. package/dist/src/json-output.d.ts +41 -0
  16. package/dist/src/json-output.d.ts.map +1 -0
  17. package/dist/src/json-output.js +171 -0
  18. package/dist/src/json-output.js.map +1 -0
  19. package/dist/src/main.d.ts +3 -0
  20. package/dist/src/main.d.ts.map +1 -0
  21. package/dist/src/main.js +4 -0
  22. package/dist/src/main.js.map +1 -0
  23. package/dist/src/root/auth/_auth.d.ts +3 -0
  24. package/dist/src/root/auth/_auth.d.ts.map +1 -0
  25. package/dist/src/root/auth/_auth.js +11 -0
  26. package/dist/src/root/auth/_auth.js.map +1 -0
  27. package/dist/src/root/auth/login.d.ts +15 -0
  28. package/dist/src/root/auth/login.d.ts.map +1 -0
  29. package/dist/src/root/auth/login.js +55 -0
  30. package/dist/src/root/auth/login.js.map +1 -0
  31. package/dist/src/root/auth/logout.d.ts +7 -0
  32. package/dist/src/root/auth/logout.d.ts.map +1 -0
  33. package/dist/src/root/auth/logout.js +59 -0
  34. package/dist/src/root/auth/logout.js.map +1 -0
  35. package/dist/src/root/auth/token.d.ts +7 -0
  36. package/dist/src/root/auth/token.d.ts.map +1 -0
  37. package/dist/src/root/auth/token.js +45 -0
  38. package/dist/src/root/auth/token.js.map +1 -0
  39. package/dist/src/root/auth/whoami.d.ts +7 -0
  40. package/dist/src/root/auth/whoami.d.ts.map +1 -0
  41. package/dist/src/root/auth/whoami.js +73 -0
  42. package/dist/src/root/auth/whoami.js.map +1 -0
  43. package/dist/src/root/commands/_commands.d.ts +3 -0
  44. package/dist/src/root/commands/_commands.d.ts.map +1 -0
  45. package/dist/src/root/commands/_commands.js +45 -0
  46. package/dist/src/root/commands/_commands.js.map +1 -0
  47. package/dist/src/root/commands/disable.d.ts +17 -0
  48. package/dist/src/root/commands/disable.d.ts.map +1 -0
  49. package/dist/src/root/commands/disable.js +100 -0
  50. package/dist/src/root/commands/disable.js.map +1 -0
  51. package/dist/src/root/commands/enable.d.ts +17 -0
  52. package/dist/src/root/commands/enable.d.ts.map +1 -0
  53. package/dist/src/root/commands/enable.js +101 -0
  54. package/dist/src/root/commands/enable.js.map +1 -0
  55. package/dist/src/root/commands/install/command-actions.d.ts +61 -0
  56. package/dist/src/root/commands/install/command-actions.d.ts.map +1 -0
  57. package/dist/src/root/commands/install/command-actions.js +211 -0
  58. package/dist/src/root/commands/install/command-actions.js.map +1 -0
  59. package/dist/src/root/commands/install/command.d.ts +3 -0
  60. package/dist/src/root/commands/install/command.d.ts.map +1 -0
  61. package/dist/src/root/commands/install/command.js +32 -0
  62. package/dist/src/root/commands/install/command.js.map +1 -0
  63. package/dist/src/root/commands/install/handler.d.ts +11 -0
  64. package/dist/src/root/commands/install/handler.d.ts.map +1 -0
  65. package/dist/src/root/commands/install/handler.js +31 -0
  66. package/dist/src/root/commands/install/handler.js.map +1 -0
  67. package/dist/src/root/commands/install/intent.d.ts +19 -0
  68. package/dist/src/root/commands/install/intent.d.ts.map +1 -0
  69. package/dist/src/root/commands/install/intent.js +9 -0
  70. package/dist/src/root/commands/install/intent.js.map +1 -0
  71. package/dist/src/root/commands/job-step-result.d.ts +21 -0
  72. package/dist/src/root/commands/job-step-result.d.ts.map +1 -0
  73. package/dist/src/root/commands/job-step-result.js +17 -0
  74. package/dist/src/root/commands/job-step-result.js.map +1 -0
  75. package/dist/src/root/commands/list.d.ts +7 -0
  76. package/dist/src/root/commands/list.d.ts.map +1 -0
  77. package/dist/src/root/commands/list.js +63 -0
  78. package/dist/src/root/commands/list.js.map +1 -0
  79. package/dist/src/root/commands/new.d.ts +19 -0
  80. package/dist/src/root/commands/new.d.ts.map +1 -0
  81. package/dist/src/root/commands/new.js +111 -0
  82. package/dist/src/root/commands/new.js.map +1 -0
  83. package/dist/src/root/commands/preview-sections.d.ts +11 -0
  84. package/dist/src/root/commands/preview-sections.d.ts.map +1 -0
  85. package/dist/src/root/commands/preview-sections.js +25 -0
  86. package/dist/src/root/commands/preview-sections.js.map +1 -0
  87. package/dist/src/root/commands/publish.d.ts +20 -0
  88. package/dist/src/root/commands/publish.d.ts.map +1 -0
  89. package/dist/src/root/commands/publish.js +238 -0
  90. package/dist/src/root/commands/publish.js.map +1 -0
  91. package/dist/src/root/commands/uninstall/command-actions.d.ts +31 -0
  92. package/dist/src/root/commands/uninstall/command-actions.d.ts.map +1 -0
  93. package/dist/src/root/commands/uninstall/command-actions.js +85 -0
  94. package/dist/src/root/commands/uninstall/command-actions.js.map +1 -0
  95. package/dist/src/root/commands/uninstall/command.d.ts +3 -0
  96. package/dist/src/root/commands/uninstall/command.d.ts.map +1 -0
  97. package/dist/src/root/commands/uninstall/command.js +27 -0
  98. package/dist/src/root/commands/uninstall/command.js.map +1 -0
  99. package/dist/src/root/commands/uninstall/handler.d.ts +8 -0
  100. package/dist/src/root/commands/uninstall/handler.d.ts.map +1 -0
  101. package/dist/src/root/commands/uninstall/handler.js +10 -0
  102. package/dist/src/root/commands/uninstall/handler.js.map +1 -0
  103. package/dist/src/root/commands/uninstall/intent.d.ts +15 -0
  104. package/dist/src/root/commands/uninstall/intent.d.ts.map +1 -0
  105. package/dist/src/root/commands/uninstall/intent.js +9 -0
  106. package/dist/src/root/commands/uninstall/intent.js.map +1 -0
  107. package/dist/src/root/commands/update.d.ts +18 -0
  108. package/dist/src/root/commands/update.d.ts.map +1 -0
  109. package/dist/src/root/commands/update.js +145 -0
  110. package/dist/src/root/commands/update.js.map +1 -0
  111. package/dist/src/root/discover/command.d.ts +6 -0
  112. package/dist/src/root/discover/command.d.ts.map +1 -0
  113. package/dist/src/root/discover/command.js +22 -0
  114. package/dist/src/root/discover/command.js.map +1 -0
  115. package/dist/src/root/discover/handler.d.ts +52 -0
  116. package/dist/src/root/discover/handler.d.ts.map +1 -0
  117. package/dist/src/root/discover/handler.js +102 -0
  118. package/dist/src/root/discover/handler.js.map +1 -0
  119. package/dist/src/root/doctor/command.d.ts +3 -0
  120. package/dist/src/root/doctor/command.d.ts.map +1 -0
  121. package/dist/src/root/doctor/command.js +19 -0
  122. package/dist/src/root/doctor/command.js.map +1 -0
  123. package/dist/src/root/doctor/handler.d.ts +10 -0
  124. package/dist/src/root/doctor/handler.d.ts.map +1 -0
  125. package/dist/src/root/doctor/handler.js +27 -0
  126. package/dist/src/root/doctor/handler.js.map +1 -0
  127. package/dist/src/root/doctor/render.d.ts +8 -0
  128. package/dist/src/root/doctor/render.d.ts.map +1 -0
  129. package/dist/src/root/doctor/render.js +183 -0
  130. package/dist/src/root/doctor/render.js.map +1 -0
  131. package/dist/src/root/init.d.ts +10 -0
  132. package/dist/src/root/init.d.ts.map +1 -0
  133. package/dist/src/root/init.js +133 -0
  134. package/dist/src/root/init.js.map +1 -0
  135. package/dist/src/root/install/command.d.ts +3 -0
  136. package/dist/src/root/install/command.d.ts.map +1 -0
  137. package/dist/src/root/install/command.js +32 -0
  138. package/dist/src/root/install/command.js.map +1 -0
  139. package/dist/src/root/install/handler.d.ts +17 -0
  140. package/dist/src/root/install/handler.d.ts.map +1 -0
  141. package/dist/src/root/install/handler.js +62 -0
  142. package/dist/src/root/install/handler.js.map +1 -0
  143. package/dist/src/root/install/resolve-root-install-intent.d.ts +16 -0
  144. package/dist/src/root/install/resolve-root-install-intent.d.ts.map +1 -0
  145. package/dist/src/root/install/resolve-root-install-intent.js +75 -0
  146. package/dist/src/root/install/resolve-root-install-intent.js.map +1 -0
  147. package/dist/src/root/install/workspace-install-handler.d.ts +23 -0
  148. package/dist/src/root/install/workspace-install-handler.d.ts.map +1 -0
  149. package/dist/src/root/install/workspace-install-handler.js +52 -0
  150. package/dist/src/root/install/workspace-install-handler.js.map +1 -0
  151. package/dist/src/root/install/workspace-install.d.ts +38 -0
  152. package/dist/src/root/install/workspace-install.d.ts.map +1 -0
  153. package/dist/src/root/install/workspace-install.js +160 -0
  154. package/dist/src/root/install/workspace-install.js.map +1 -0
  155. package/dist/src/root/mcp-servers/_mcp-servers.d.ts +3 -0
  156. package/dist/src/root/mcp-servers/_mcp-servers.d.ts.map +1 -0
  157. package/dist/src/root/mcp-servers/_mcp-servers.js +14 -0
  158. package/dist/src/root/mcp-servers/_mcp-servers.js.map +1 -0
  159. package/dist/src/root/mcp-servers/install/command-actions.d.ts +48 -0
  160. package/dist/src/root/mcp-servers/install/command-actions.d.ts.map +1 -0
  161. package/dist/src/root/mcp-servers/install/command-actions.js +185 -0
  162. package/dist/src/root/mcp-servers/install/command-actions.js.map +1 -0
  163. package/dist/src/root/mcp-servers/install/command.d.ts +3 -0
  164. package/dist/src/root/mcp-servers/install/command.d.ts.map +1 -0
  165. package/dist/src/root/mcp-servers/install/command.js +32 -0
  166. package/dist/src/root/mcp-servers/install/command.js.map +1 -0
  167. package/dist/src/root/mcp-servers/install/handler.d.ts +13 -0
  168. package/dist/src/root/mcp-servers/install/handler.d.ts.map +1 -0
  169. package/dist/src/root/mcp-servers/install/handler.js +22 -0
  170. package/dist/src/root/mcp-servers/install/handler.js.map +1 -0
  171. package/dist/src/root/mcp-servers/install/intent.d.ts +18 -0
  172. package/dist/src/root/mcp-servers/install/intent.d.ts.map +1 -0
  173. package/dist/src/root/mcp-servers/install/intent.js +9 -0
  174. package/dist/src/root/mcp-servers/install/intent.js.map +1 -0
  175. package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts +31 -0
  176. package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts.map +1 -0
  177. package/dist/src/root/mcp-servers/uninstall/command-actions.js +68 -0
  178. package/dist/src/root/mcp-servers/uninstall/command-actions.js.map +1 -0
  179. package/dist/src/root/mcp-servers/uninstall/command.d.ts +3 -0
  180. package/dist/src/root/mcp-servers/uninstall/command.d.ts.map +1 -0
  181. package/dist/src/root/mcp-servers/uninstall/command.js +27 -0
  182. package/dist/src/root/mcp-servers/uninstall/command.js.map +1 -0
  183. package/dist/src/root/mcp-servers/uninstall/handler.d.ts +8 -0
  184. package/dist/src/root/mcp-servers/uninstall/handler.d.ts.map +1 -0
  185. package/dist/src/root/mcp-servers/uninstall/handler.js +10 -0
  186. package/dist/src/root/mcp-servers/uninstall/handler.js.map +1 -0
  187. package/dist/src/root/mcp-servers/uninstall/intent.d.ts +15 -0
  188. package/dist/src/root/mcp-servers/uninstall/intent.d.ts.map +1 -0
  189. package/dist/src/root/mcp-servers/uninstall/intent.js +9 -0
  190. package/dist/src/root/mcp-servers/uninstall/intent.js.map +1 -0
  191. package/dist/src/root/packs/_packs.d.ts +3 -0
  192. package/dist/src/root/packs/_packs.d.ts.map +1 -0
  193. package/dist/src/root/packs/_packs.js +35 -0
  194. package/dist/src/root/packs/_packs.js.map +1 -0
  195. package/dist/src/root/packs/add.d.ts +16 -0
  196. package/dist/src/root/packs/add.d.ts.map +1 -0
  197. package/dist/src/root/packs/add.js +198 -0
  198. package/dist/src/root/packs/add.js.map +1 -0
  199. package/dist/src/root/packs/install/command-actions.d.ts +56 -0
  200. package/dist/src/root/packs/install/command-actions.d.ts.map +1 -0
  201. package/dist/src/root/packs/install/command-actions.js +373 -0
  202. package/dist/src/root/packs/install/command-actions.js.map +1 -0
  203. package/dist/src/root/packs/install/command.d.ts +3 -0
  204. package/dist/src/root/packs/install/command.d.ts.map +1 -0
  205. package/dist/src/root/packs/install/command.js +36 -0
  206. package/dist/src/root/packs/install/command.js.map +1 -0
  207. package/dist/src/root/packs/install/handler.d.ts +13 -0
  208. package/dist/src/root/packs/install/handler.d.ts.map +1 -0
  209. package/dist/src/root/packs/install/handler.js +22 -0
  210. package/dist/src/root/packs/install/handler.js.map +1 -0
  211. package/dist/src/root/packs/install/intent.d.ts +15 -0
  212. package/dist/src/root/packs/install/intent.d.ts.map +1 -0
  213. package/dist/src/root/packs/install/intent.js +9 -0
  214. package/dist/src/root/packs/install/intent.js.map +1 -0
  215. package/dist/src/root/packs/install/plan.d.ts +63 -0
  216. package/dist/src/root/packs/install/plan.d.ts.map +1 -0
  217. package/dist/src/root/packs/install/plan.js +181 -0
  218. package/dist/src/root/packs/install/plan.js.map +1 -0
  219. package/dist/src/root/packs/new.d.ts +18 -0
  220. package/dist/src/root/packs/new.d.ts.map +1 -0
  221. package/dist/src/root/packs/new.js +103 -0
  222. package/dist/src/root/packs/new.js.map +1 -0
  223. package/dist/src/root/packs/publish.d.ts +30 -0
  224. package/dist/src/root/packs/publish.d.ts.map +1 -0
  225. package/dist/src/root/packs/publish.js +288 -0
  226. package/dist/src/root/packs/publish.js.map +1 -0
  227. package/dist/src/root/packs/remove.d.ts +16 -0
  228. package/dist/src/root/packs/remove.d.ts.map +1 -0
  229. package/dist/src/root/packs/remove.js +156 -0
  230. package/dist/src/root/packs/remove.js.map +1 -0
  231. package/dist/src/root/packs/uninstall/command-actions.d.ts +47 -0
  232. package/dist/src/root/packs/uninstall/command-actions.d.ts.map +1 -0
  233. package/dist/src/root/packs/uninstall/command-actions.js +175 -0
  234. package/dist/src/root/packs/uninstall/command-actions.js.map +1 -0
  235. package/dist/src/root/packs/uninstall/command.d.ts +3 -0
  236. package/dist/src/root/packs/uninstall/command.d.ts.map +1 -0
  237. package/dist/src/root/packs/uninstall/command.js +31 -0
  238. package/dist/src/root/packs/uninstall/command.js.map +1 -0
  239. package/dist/src/root/packs/uninstall/handler.d.ts +8 -0
  240. package/dist/src/root/packs/uninstall/handler.d.ts.map +1 -0
  241. package/dist/src/root/packs/uninstall/handler.js +10 -0
  242. package/dist/src/root/packs/uninstall/handler.js.map +1 -0
  243. package/dist/src/root/packs/uninstall/intent.d.ts +13 -0
  244. package/dist/src/root/packs/uninstall/intent.d.ts.map +1 -0
  245. package/dist/src/root/packs/uninstall/intent.js +10 -0
  246. package/dist/src/root/packs/uninstall/intent.js.map +1 -0
  247. package/dist/src/root/packs/uninstall/plan.d.ts +60 -0
  248. package/dist/src/root/packs/uninstall/plan.d.ts.map +1 -0
  249. package/dist/src/root/packs/uninstall/plan.js +166 -0
  250. package/dist/src/root/packs/uninstall/plan.js.map +1 -0
  251. package/dist/src/root/packs/unpack/command.d.ts +3 -0
  252. package/dist/src/root/packs/unpack/command.d.ts.map +1 -0
  253. package/dist/src/root/packs/unpack/command.js +31 -0
  254. package/dist/src/root/packs/unpack/command.js.map +1 -0
  255. package/dist/src/root/packs/unpack/handler.d.ts +16 -0
  256. package/dist/src/root/packs/unpack/handler.d.ts.map +1 -0
  257. package/dist/src/root/packs/unpack/handler.js +117 -0
  258. package/dist/src/root/packs/unpack/handler.js.map +1 -0
  259. package/dist/src/root/packs/unpack/plan.d.ts +72 -0
  260. package/dist/src/root/packs/unpack/plan.d.ts.map +1 -0
  261. package/dist/src/root/packs/unpack/plan.js +120 -0
  262. package/dist/src/root/packs/unpack/plan.js.map +1 -0
  263. package/dist/src/root/shared/registry-install-target.d.ts +35 -0
  264. package/dist/src/root/shared/registry-install-target.d.ts.map +1 -0
  265. package/dist/src/root/shared/registry-install-target.js +66 -0
  266. package/dist/src/root/shared/registry-install-target.js.map +1 -0
  267. package/dist/src/root/skills/_skills.d.ts +3 -0
  268. package/dist/src/root/skills/_skills.d.ts.map +1 -0
  269. package/dist/src/root/skills/_skills.js +38 -0
  270. package/dist/src/root/skills/_skills.js.map +1 -0
  271. package/dist/src/root/skills/disable.d.ts +15 -0
  272. package/dist/src/root/skills/disable.d.ts.map +1 -0
  273. package/dist/src/root/skills/disable.js +91 -0
  274. package/dist/src/root/skills/disable.js.map +1 -0
  275. package/dist/src/root/skills/enable.d.ts +16 -0
  276. package/dist/src/root/skills/enable.d.ts.map +1 -0
  277. package/dist/src/root/skills/enable.js +92 -0
  278. package/dist/src/root/skills/enable.js.map +1 -0
  279. package/dist/src/root/skills/fork.d.ts +22 -0
  280. package/dist/src/root/skills/fork.d.ts.map +1 -0
  281. package/dist/src/root/skills/fork.js +288 -0
  282. package/dist/src/root/skills/fork.js.map +1 -0
  283. package/dist/src/root/skills/install/command-actions.d.ts +76 -0
  284. package/dist/src/root/skills/install/command-actions.d.ts.map +1 -0
  285. package/dist/src/root/skills/install/command-actions.js +323 -0
  286. package/dist/src/root/skills/install/command-actions.js.map +1 -0
  287. package/dist/src/root/skills/install/command.d.ts +3 -0
  288. package/dist/src/root/skills/install/command.d.ts.map +1 -0
  289. package/dist/src/root/skills/install/command.js +46 -0
  290. package/dist/src/root/skills/install/command.js.map +1 -0
  291. package/dist/src/root/skills/install/handler.d.ts +15 -0
  292. package/dist/src/root/skills/install/handler.d.ts.map +1 -0
  293. package/dist/src/root/skills/install/handler.js +39 -0
  294. package/dist/src/root/skills/install/handler.js.map +1 -0
  295. package/dist/src/root/skills/install/intent.d.ts +21 -0
  296. package/dist/src/root/skills/install/intent.d.ts.map +1 -0
  297. package/dist/src/root/skills/install/intent.js +7 -0
  298. package/dist/src/root/skills/install/intent.js.map +1 -0
  299. package/dist/src/root/skills/install/plan.d.ts +43 -0
  300. package/dist/src/root/skills/install/plan.d.ts.map +1 -0
  301. package/dist/src/root/skills/install/plan.js +82 -0
  302. package/dist/src/root/skills/install/plan.js.map +1 -0
  303. package/dist/src/root/skills/install/resolve-skill-install-source.d.ts +17 -0
  304. package/dist/src/root/skills/install/resolve-skill-install-source.d.ts.map +1 -0
  305. package/dist/src/root/skills/install/resolve-skill-install-source.js +271 -0
  306. package/dist/src/root/skills/install/resolve-skill-install-source.js.map +1 -0
  307. package/dist/src/root/skills/install/select-skills.d.ts +37 -0
  308. package/dist/src/root/skills/install/select-skills.d.ts.map +1 -0
  309. package/dist/src/root/skills/install/select-skills.js +91 -0
  310. package/dist/src/root/skills/install/select-skills.js.map +1 -0
  311. package/dist/src/root/skills/list.d.ts +10 -0
  312. package/dist/src/root/skills/list.d.ts.map +1 -0
  313. package/dist/src/root/skills/list.js +68 -0
  314. package/dist/src/root/skills/list.js.map +1 -0
  315. package/dist/src/root/skills/new.d.ts +19 -0
  316. package/dist/src/root/skills/new.d.ts.map +1 -0
  317. package/dist/src/root/skills/new.js +113 -0
  318. package/dist/src/root/skills/new.js.map +1 -0
  319. package/dist/src/root/skills/publish.d.ts +20 -0
  320. package/dist/src/root/skills/publish.d.ts.map +1 -0
  321. package/dist/src/root/skills/publish.js +230 -0
  322. package/dist/src/root/skills/publish.js.map +1 -0
  323. package/dist/src/root/skills/rename.d.ts +16 -0
  324. package/dist/src/root/skills/rename.d.ts.map +1 -0
  325. package/dist/src/root/skills/rename.js +84 -0
  326. package/dist/src/root/skills/rename.js.map +1 -0
  327. package/dist/src/root/skills/uninstall/command-actions.d.ts +39 -0
  328. package/dist/src/root/skills/uninstall/command-actions.d.ts.map +1 -0
  329. package/dist/src/root/skills/uninstall/command-actions.js +85 -0
  330. package/dist/src/root/skills/uninstall/command-actions.js.map +1 -0
  331. package/dist/src/root/skills/uninstall/command.d.ts +3 -0
  332. package/dist/src/root/skills/uninstall/command.d.ts.map +1 -0
  333. package/dist/src/root/skills/uninstall/command.js +24 -0
  334. package/dist/src/root/skills/uninstall/command.js.map +1 -0
  335. package/dist/src/root/skills/uninstall/handler.d.ts +8 -0
  336. package/dist/src/root/skills/uninstall/handler.d.ts.map +1 -0
  337. package/dist/src/root/skills/uninstall/handler.js +10 -0
  338. package/dist/src/root/skills/uninstall/handler.js.map +1 -0
  339. package/dist/src/root/skills/uninstall/intent.d.ts +17 -0
  340. package/dist/src/root/skills/uninstall/intent.d.ts.map +1 -0
  341. package/dist/src/root/skills/uninstall/intent.js +7 -0
  342. package/dist/src/root/skills/uninstall/intent.js.map +1 -0
  343. package/dist/src/root/skills/uninstall/plan.d.ts +35 -0
  344. package/dist/src/root/skills/uninstall/plan.d.ts.map +1 -0
  345. package/dist/src/root/skills/uninstall/plan.js +66 -0
  346. package/dist/src/root/skills/uninstall/plan.js.map +1 -0
  347. package/dist/src/root/skills/update/command.d.ts +3 -0
  348. package/dist/src/root/skills/update/command.d.ts.map +1 -0
  349. package/dist/src/root/skills/update/command.js +31 -0
  350. package/dist/src/root/skills/update/command.js.map +1 -0
  351. package/dist/src/root/skills/update/constraint-resolution.d.ts +70 -0
  352. package/dist/src/root/skills/update/constraint-resolution.d.ts.map +1 -0
  353. package/dist/src/root/skills/update/constraint-resolution.js +94 -0
  354. package/dist/src/root/skills/update/constraint-resolution.js.map +1 -0
  355. package/dist/src/root/skills/update/handler.d.ts +18 -0
  356. package/dist/src/root/skills/update/handler.d.ts.map +1 -0
  357. package/dist/src/root/skills/update/handler.js +409 -0
  358. package/dist/src/root/skills/update/handler.js.map +1 -0
  359. package/dist/src/root/skills/update/plan.d.ts +35 -0
  360. package/dist/src/root/skills/update/plan.d.ts.map +1 -0
  361. package/dist/src/root/skills/update/plan.js +92 -0
  362. package/dist/src/root/skills/update/plan.js.map +1 -0
  363. package/dist/src/root/subagents/_subagents.d.ts +3 -0
  364. package/dist/src/root/subagents/_subagents.d.ts.map +1 -0
  365. package/dist/src/root/subagents/_subagents.js +31 -0
  366. package/dist/src/root/subagents/_subagents.js.map +1 -0
  367. package/dist/src/root/subagents/disable/command.d.ts +3 -0
  368. package/dist/src/root/subagents/disable/command.d.ts.map +1 -0
  369. package/dist/src/root/subagents/disable/command.js +24 -0
  370. package/dist/src/root/subagents/disable/command.js.map +1 -0
  371. package/dist/src/root/subagents/disable/handler.d.ts +14 -0
  372. package/dist/src/root/subagents/disable/handler.d.ts.map +1 -0
  373. package/dist/src/root/subagents/disable/handler.js +71 -0
  374. package/dist/src/root/subagents/disable/handler.js.map +1 -0
  375. package/dist/src/root/subagents/enable/command.d.ts +3 -0
  376. package/dist/src/root/subagents/enable/command.d.ts.map +1 -0
  377. package/dist/src/root/subagents/enable/command.js +24 -0
  378. package/dist/src/root/subagents/enable/command.js.map +1 -0
  379. package/dist/src/root/subagents/enable/handler.d.ts +14 -0
  380. package/dist/src/root/subagents/enable/handler.d.ts.map +1 -0
  381. package/dist/src/root/subagents/enable/handler.js +71 -0
  382. package/dist/src/root/subagents/enable/handler.js.map +1 -0
  383. package/dist/src/root/subagents/install/command-actions.d.ts +58 -0
  384. package/dist/src/root/subagents/install/command-actions.d.ts.map +1 -0
  385. package/dist/src/root/subagents/install/command-actions.js +258 -0
  386. package/dist/src/root/subagents/install/command-actions.js.map +1 -0
  387. package/dist/src/root/subagents/install/command.d.ts +3 -0
  388. package/dist/src/root/subagents/install/command.d.ts.map +1 -0
  389. package/dist/src/root/subagents/install/command.js +46 -0
  390. package/dist/src/root/subagents/install/command.js.map +1 -0
  391. package/dist/src/root/subagents/install/handler.d.ts +15 -0
  392. package/dist/src/root/subagents/install/handler.d.ts.map +1 -0
  393. package/dist/src/root/subagents/install/handler.js +39 -0
  394. package/dist/src/root/subagents/install/handler.js.map +1 -0
  395. package/dist/src/root/subagents/install/intent.d.ts +21 -0
  396. package/dist/src/root/subagents/install/intent.d.ts.map +1 -0
  397. package/dist/src/root/subagents/install/intent.js +7 -0
  398. package/dist/src/root/subagents/install/intent.js.map +1 -0
  399. package/dist/src/root/subagents/install/plan.d.ts +44 -0
  400. package/dist/src/root/subagents/install/plan.d.ts.map +1 -0
  401. package/dist/src/root/subagents/install/plan.js +74 -0
  402. package/dist/src/root/subagents/install/plan.js.map +1 -0
  403. package/dist/src/root/subagents/install/resolve-subagent-install-source.d.ts +17 -0
  404. package/dist/src/root/subagents/install/resolve-subagent-install-source.d.ts.map +1 -0
  405. package/dist/src/root/subagents/install/resolve-subagent-install-source.js +265 -0
  406. package/dist/src/root/subagents/install/resolve-subagent-install-source.js.map +1 -0
  407. package/dist/src/root/subagents/install/select-subagents.d.ts +43 -0
  408. package/dist/src/root/subagents/install/select-subagents.d.ts.map +1 -0
  409. package/dist/src/root/subagents/install/select-subagents.js +90 -0
  410. package/dist/src/root/subagents/install/select-subagents.js.map +1 -0
  411. package/dist/src/root/subagents/list/command.d.ts +3 -0
  412. package/dist/src/root/subagents/list/command.d.ts.map +1 -0
  413. package/dist/src/root/subagents/list/command.js +21 -0
  414. package/dist/src/root/subagents/list/command.js.map +1 -0
  415. package/dist/src/root/subagents/list/handler.d.ts +8 -0
  416. package/dist/src/root/subagents/list/handler.d.ts.map +1 -0
  417. package/dist/src/root/subagents/list/handler.js +56 -0
  418. package/dist/src/root/subagents/list/handler.js.map +1 -0
  419. package/dist/src/root/subagents/new/command.d.ts +3 -0
  420. package/dist/src/root/subagents/new/command.d.ts.map +1 -0
  421. package/dist/src/root/subagents/new/command.js +42 -0
  422. package/dist/src/root/subagents/new/command.js.map +1 -0
  423. package/dist/src/root/subagents/new/handler.d.ts +21 -0
  424. package/dist/src/root/subagents/new/handler.d.ts.map +1 -0
  425. package/dist/src/root/subagents/new/handler.js +199 -0
  426. package/dist/src/root/subagents/new/handler.js.map +1 -0
  427. package/dist/src/root/subagents/publish/command.d.ts +3 -0
  428. package/dist/src/root/subagents/publish/command.d.ts.map +1 -0
  429. package/dist/src/root/subagents/publish/command.js +28 -0
  430. package/dist/src/root/subagents/publish/command.js.map +1 -0
  431. package/dist/src/root/subagents/publish/handler.d.ts +18 -0
  432. package/dist/src/root/subagents/publish/handler.d.ts.map +1 -0
  433. package/dist/src/root/subagents/publish/handler.js +204 -0
  434. package/dist/src/root/subagents/publish/handler.js.map +1 -0
  435. package/dist/src/root/subagents/rename/command.d.ts +3 -0
  436. package/dist/src/root/subagents/rename/command.d.ts.map +1 -0
  437. package/dist/src/root/subagents/rename/command.js +25 -0
  438. package/dist/src/root/subagents/rename/command.js.map +1 -0
  439. package/dist/src/root/subagents/rename/handler.d.ts +15 -0
  440. package/dist/src/root/subagents/rename/handler.d.ts.map +1 -0
  441. package/dist/src/root/subagents/rename/handler.js +174 -0
  442. package/dist/src/root/subagents/rename/handler.js.map +1 -0
  443. package/dist/src/root/subagents/uninstall/command-actions.d.ts +39 -0
  444. package/dist/src/root/subagents/uninstall/command-actions.d.ts.map +1 -0
  445. package/dist/src/root/subagents/uninstall/command-actions.js +85 -0
  446. package/dist/src/root/subagents/uninstall/command-actions.js.map +1 -0
  447. package/dist/src/root/subagents/uninstall/command.d.ts +3 -0
  448. package/dist/src/root/subagents/uninstall/command.d.ts.map +1 -0
  449. package/dist/src/root/subagents/uninstall/command.js +27 -0
  450. package/dist/src/root/subagents/uninstall/command.js.map +1 -0
  451. package/dist/src/root/subagents/uninstall/handler.d.ts +8 -0
  452. package/dist/src/root/subagents/uninstall/handler.d.ts.map +1 -0
  453. package/dist/src/root/subagents/uninstall/handler.js +10 -0
  454. package/dist/src/root/subagents/uninstall/handler.js.map +1 -0
  455. package/dist/src/root/subagents/uninstall/intent.d.ts +17 -0
  456. package/dist/src/root/subagents/uninstall/intent.d.ts.map +1 -0
  457. package/dist/src/root/subagents/uninstall/intent.js +7 -0
  458. package/dist/src/root/subagents/uninstall/intent.js.map +1 -0
  459. package/dist/src/root/subagents/update/command.d.ts +3 -0
  460. package/dist/src/root/subagents/update/command.d.ts.map +1 -0
  461. package/dist/src/root/subagents/update/command.js +41 -0
  462. package/dist/src/root/subagents/update/command.js.map +1 -0
  463. package/dist/src/root/subagents/update/handler.d.ts +16 -0
  464. package/dist/src/root/subagents/update/handler.d.ts.map +1 -0
  465. package/dist/src/root/subagents/update/handler.js +188 -0
  466. package/dist/src/root/subagents/update/handler.js.map +1 -0
  467. package/dist/src/root/subagents/update/plan.d.ts +39 -0
  468. package/dist/src/root/subagents/update/plan.d.ts.map +1 -0
  469. package/dist/src/root/subagents/update/plan.js +81 -0
  470. package/dist/src/root/subagents/update/plan.js.map +1 -0
  471. package/dist/src/root/sync.d.ts +15 -0
  472. package/dist/src/root/sync.d.ts.map +1 -0
  473. package/dist/src/root/sync.js +82 -0
  474. package/dist/src/root/sync.js.map +1 -0
  475. package/dist/src/root/upgrade/handler.d.ts +21 -0
  476. package/dist/src/root/upgrade/handler.d.ts.map +1 -0
  477. package/dist/src/root/upgrade/handler.js +303 -0
  478. package/dist/src/root/upgrade/handler.js.map +1 -0
  479. package/dist/src/root/upgrade/upgrade.d.ts +3 -0
  480. package/dist/src/root/upgrade/upgrade.d.ts.map +1 -0
  481. package/dist/src/root/upgrade/upgrade.js +18 -0
  482. package/dist/src/root/upgrade/upgrade.js.map +1 -0
  483. package/dist/src/runtime.d.ts +39 -0
  484. package/dist/src/runtime.d.ts.map +1 -0
  485. package/dist/src/runtime.js +144 -0
  486. package/dist/src/runtime.js.map +1 -0
  487. package/dist/src/test-helpers.d.ts +101 -0
  488. package/dist/src/test-helpers.d.ts.map +1 -0
  489. package/dist/src/test-helpers.js +153 -0
  490. package/dist/src/test-helpers.js.map +1 -0
  491. package/dist/src/test-stubs.d.ts +128 -0
  492. package/dist/src/test-stubs.d.ts.map +1 -0
  493. package/dist/src/test-stubs.js +227 -0
  494. package/dist/src/test-stubs.js.map +1 -0
  495. package/dist/src/update-check-startup.d.ts +68 -0
  496. package/dist/src/update-check-startup.d.ts.map +1 -0
  497. package/dist/src/update-check-startup.js +127 -0
  498. package/dist/src/update-check-startup.js.map +1 -0
  499. package/dist/src/version.d.ts +2 -0
  500. package/dist/src/version.d.ts.map +1 -0
  501. package/dist/src/version.js +23 -0
  502. package/dist/src/version.js.map +1 -0
  503. package/package.json +96 -0
@@ -0,0 +1,288 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Option from "effect/Option";
5
+ import * as Schema from "effect/Schema";
6
+ import { Argument, Command, Flag } from "effect/unstable/cli";
7
+ import { withAuthGuard } from "@agentxm/client-core/unstable/auth";
8
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
9
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
10
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
11
+ import { formatFqn, parseFqn, parseFqnOrThrow, toExtensionTypePlural, REGISTRY_EXTENSIONS_DIR, decodeExtensionNameSync, } from "@agentxm/client-core/unstable/extensions";
12
+ import { EXTENSION_PACK_MANIFEST_FILENAME, ExtensionPackManifestSchema, } from "@agentxm/client-core/unstable/packs";
13
+ import { publishSkill } from "@agentxm/client-core/unstable/skills";
14
+ import { publishExtensionPack, computeExtensionPackPaths, } from "@agentxm/client-core/unstable/packs";
15
+ import { publishCommand as publishCommandOp, } from "@agentxm/client-core/unstable/commands";
16
+ import { publishMcpServer, } from "@agentxm/client-core/unstable/mcp-servers";
17
+ import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
18
+ import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
19
+ import { setCommandSemanticProperties, summarizeCommandOutcome, withArgvTracking, } from "@agentxm/client-core/unstable/cli-runtime";
20
+ import { DEFAULT_WORKSPACE_SCOPE } from "@agentxm/client-core/unstable/workspace";
21
+ import { emitPlanResolutionResult, planResolutionToSummary } from "../../json-output.js";
22
+ import { withAuthRuntime, withWorkspace } from "../../runtime.js";
23
+ const resolveTargetRegistry = (registry) => Effect.gen(function* () {
24
+ const ws = yield* Workspace;
25
+ const registrySources = yield* ws.getRegistrySourceHosts().pipe(Effect.mapError((e) => makeAppError({
26
+ code: "REGISTRY_SOURCES_FAILED",
27
+ what: `Failed to get registry sources: ${e._tag}`,
28
+ cause: e,
29
+ })));
30
+ const [defaultRegistry] = registrySources;
31
+ if (defaultRegistry === undefined) {
32
+ return yield* makeAppError({
33
+ code: "NO_REGISTRY_CONFIGURED",
34
+ what: "No registry sources configured",
35
+ howToFix: "Run the registry guard first.",
36
+ });
37
+ }
38
+ if (Option.isNone(registry)) {
39
+ return {
40
+ registryName: defaultRegistry.name,
41
+ registryUrl: defaultRegistry.location.href,
42
+ };
43
+ }
44
+ const namedRegistry = yield* ws.getConfiguredSourceByName(registry.value).pipe(Effect.mapError((e) => makeAppError({
45
+ code: "PUBLISH_PACK_REGISTRY_LOOKUP_FAILED",
46
+ what: `Failed to lookup registry source "${registry.value}"`,
47
+ cause: e,
48
+ })));
49
+ if (Option.isNone(namedRegistry) || namedRegistry.value.type !== "registry") {
50
+ return yield* makeAppError({
51
+ code: "PUBLISH_PACK_REGISTRY_NOT_FOUND",
52
+ what: `Registry source "${registry.value}" not found or not a registry source`,
53
+ });
54
+ }
55
+ return {
56
+ registryName: registry.value,
57
+ registryUrl: namedRegistry.value.location.href,
58
+ };
59
+ });
60
+ /**
61
+ * Handles the `axm packs publish` command.
62
+ */
63
+ export const handlePublishPack = Effect.fn("PublishPack.handle")(function* (args) {
64
+ const targetRegistry = yield* resolveTargetRegistry(args.registry);
65
+ yield* withAuthGuard(publishPackEffect(args, targetRegistry), {
66
+ registryUrl: targetRegistry.registryUrl,
67
+ });
68
+ });
69
+ const publishPackEffect = Effect.fn("PublishPack.publishEffect")(function* (args, targetRegistry) {
70
+ const ws = yield* Workspace;
71
+ const path = yield* Path.Path;
72
+ const fs = yield* FileSystem.FileSystem;
73
+ const renderer = yield* CliRenderer;
74
+ const base = ws.baseDir;
75
+ yield* renderer.info("axm packs publish");
76
+ // Capture services for run closures
77
+ const provideServices = (effect) => effect.pipe(Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path));
78
+ const toJobStepResult = (result) => result.result === "error" && result.error !== undefined
79
+ ? { result: "error", message: result.message, error: result.error }
80
+ : { result: "success", message: result.message };
81
+ // Step 1: Resolve pack name
82
+ const hasProfile = args.pack.startsWith("@") && args.pack.includes("/");
83
+ const packName = yield* hasProfile
84
+ ? Effect.succeed(args.pack)
85
+ : ws.getConfiguredProfile().pipe(Effect.map((owner) => formatFqn({ owner, type: "pack", name: decodeExtensionNameSync(args.pack) })), Effect.mapError((e) => makeAppError({
86
+ code: "NAMESPACE_RESOLUTION_FAILED",
87
+ what: `Failed to resolve owner: ${e._tag}`,
88
+ howToFix: "Configure an owner in your settings with `axm init`.",
89
+ cause: e,
90
+ })));
91
+ // Parse owner and pack name from the full name
92
+ const fqn = yield* parseFqn(packName);
93
+ // Step 2: Validate managed pack exists
94
+ const manifestPath = yield* renderer.withSpinner("Validating extension pack...", () => Effect.gen(function* () {
95
+ const packDir = computeExtensionPackPaths(path.join, base, fqn.owner, fqn.name).canonicalPath;
96
+ const packDirExists = yield* fs.exists(packDir).pipe(Effect.orElseSucceed(() => false));
97
+ if (!packDirExists) {
98
+ return yield* makeAppError({
99
+ code: "EXTENSION_NOT_FOUND",
100
+ what: `Managed extension pack not found: ${packName}`,
101
+ details: [`Expected at: ${packDir}`],
102
+ howToFix: "Only managed extension packs (in .axm/extensions/) can be published. Use `axm packs new` first.",
103
+ });
104
+ }
105
+ // Validate manifest exists
106
+ const manifestPath = path.join(packDir, EXTENSION_PACK_MANIFEST_FILENAME);
107
+ const manifestExists = yield* fs
108
+ .exists(manifestPath)
109
+ .pipe(Effect.orElseSucceed(() => false));
110
+ if (!manifestExists) {
111
+ return yield* makeAppError({
112
+ code: "MISSING_MANIFEST",
113
+ what: `Missing manifest: ${EXTENSION_PACK_MANIFEST_FILENAME}`,
114
+ details: [`Expected at: ${manifestPath}`],
115
+ howToFix: `Ensure the pack has a valid ${EXTENSION_PACK_MANIFEST_FILENAME} manifest.`,
116
+ });
117
+ }
118
+ return manifestPath;
119
+ }), { successMessage: `Validated ${packName}` });
120
+ // Step 3: Discover local dependencies (when --include-dependencies)
121
+ const dependencySteps = [];
122
+ if (args.includeDependencies) {
123
+ const manifestContent = yield* fs.readFileString(manifestPath).pipe(Effect.mapError((e) => makeAppError({
124
+ code: "PACK_MANIFEST_READ_FAILED",
125
+ what: `Failed to read extension pack manifest: ${manifestPath}`,
126
+ cause: e,
127
+ })));
128
+ const json = yield* Effect.try({
129
+ try: () => {
130
+ const parsed = JSON.parse(manifestContent);
131
+ return parsed;
132
+ },
133
+ catch: (e) => makeAppError({
134
+ code: "PACK_MANIFEST_PARSE_FAILED",
135
+ what: `Invalid JSON in extension pack manifest: ${manifestPath}`,
136
+ cause: e,
137
+ }),
138
+ });
139
+ const manifest = yield* Schema.decodeUnknownEffect(ExtensionPackManifestSchema)(json).pipe(Effect.mapError((e) => makeAppError({
140
+ code: "PACK_MANIFEST_INVALID",
141
+ what: `Invalid extension pack manifest: ${manifestPath}`,
142
+ cause: e,
143
+ })));
144
+ // Collect all dependency FQNs from skills, commands, mcp-servers
145
+ const allDeps = [
146
+ ...Object.keys(manifest.skills ?? {}),
147
+ ...Object.keys(manifest.commands ?? {}),
148
+ ...Object.keys(manifest["mcp-servers"] ?? {}),
149
+ ];
150
+ // Check which dependencies exist locally
151
+ yield* Effect.forEach(allDeps, (depFqn) => Effect.gen(function* () {
152
+ const parsed = parseFqnOrThrow(depFqn);
153
+ const depDir = path.join(base, REGISTRY_EXTENSIONS_DIR, parsed.owner, toExtensionTypePlural(parsed.type), parsed.name);
154
+ const exists = yield* fs.exists(depDir).pipe(Effect.orElseSucceed(() => false));
155
+ if (exists) {
156
+ const step = yield* makeDependencyStep(parsed, depFqn, targetRegistry.registryName, provideServices, toJobStepResult);
157
+ dependencySteps.push(step);
158
+ }
159
+ else {
160
+ yield* renderer.warn(`Skipping non-local dependency: ${depFqn}`);
161
+ }
162
+ }), { concurrency: "unbounded" });
163
+ }
164
+ // Step 4: Build plan with inline run closures
165
+ const packOp = {
166
+ name: "publish-pack",
167
+ args: {
168
+ name: packName,
169
+ registryName: targetRegistry.registryName,
170
+ },
171
+ };
172
+ const packStep = {
173
+ readiness: "ready",
174
+ label: `Publish ${packName}`,
175
+ run: provideServices(publishExtensionPack(packOp)).pipe(Effect.map(toJobStepResult)),
176
+ };
177
+ const jobs = dependencySteps.length > 0
178
+ ? [
179
+ { steps: dependencySteps, concurrency: "unbounded" },
180
+ { steps: [packStep], concurrency: 1 },
181
+ ]
182
+ : [{ steps: [packStep], concurrency: 1 }];
183
+ const plan = {
184
+ _tag: "Plan",
185
+ name: "Publish extension pack",
186
+ description: Option.some(`Publish ${packName} to registry "${targetRegistry.registryName}"`),
187
+ jobs,
188
+ };
189
+ const resolvedPlan = yield* previewOrApplyPlan(plan, {
190
+ yes: args.yes,
191
+ force: args.force,
192
+ preview: args.preview,
193
+ });
194
+ if (resolvedPlan._tag === "ExecutedPlan") {
195
+ const failedStepDetails = resolvedPlan.jobs
196
+ .flatMap((job) => job.steps)
197
+ .flatMap((step) => step.result.result === "error"
198
+ ? [`${step.label}: ${step.result.error.what} (${step.result.error.code})`]
199
+ : []);
200
+ if (failedStepDetails.length > 0) {
201
+ return yield* makeAppError({
202
+ code: "PUBLISH_PLAN_FAILED",
203
+ what: `Failed to publish ${failedStepDetails.length} extension pack item${failedStepDetails.length === 1 ? "" : "s"}`,
204
+ details: failedStepDetails,
205
+ });
206
+ }
207
+ }
208
+ yield* setCommandSemanticProperties(summarizeCommandOutcome(planResolutionToSummary(resolvedPlan, {
209
+ subjectType: "pack",
210
+ sourceKind: "registry",
211
+ })));
212
+ yield* emitPlanResolutionResult("packs.publish", resolvedPlan);
213
+ yield* renderer.success("Done");
214
+ });
215
+ /** Create a per-type publish dependency step from a parsed FQN. */
216
+ const makeDependencyStep = (parsed, depFqn, registryName, provideServices, toJobStepResult) => {
217
+ const label = `Publish dependency ${depFqn}`;
218
+ switch (parsed.type) {
219
+ case "skill": {
220
+ const op = {
221
+ name: "publish-skill",
222
+ args: { name: depFqn, registryName },
223
+ };
224
+ return Effect.succeed({
225
+ readiness: "ready",
226
+ label,
227
+ run: provideServices(publishSkill(op)).pipe(Effect.map(toJobStepResult)),
228
+ });
229
+ }
230
+ case "command": {
231
+ const op = {
232
+ name: "publish-command",
233
+ args: { name: depFqn, registryName },
234
+ };
235
+ return Effect.succeed({
236
+ readiness: "ready",
237
+ label,
238
+ run: provideServices(publishCommandOp(op)).pipe(Effect.map(toJobStepResult)),
239
+ });
240
+ }
241
+ case "mcp-server": {
242
+ const op = {
243
+ name: "publish-mcp-server",
244
+ args: { name: depFqn, registryName },
245
+ };
246
+ return Effect.succeed({
247
+ readiness: "ready",
248
+ label,
249
+ run: provideServices(publishMcpServer(op)).pipe(Effect.map(toJobStepResult)),
250
+ });
251
+ }
252
+ case "pack":
253
+ return Effect.fail(makeAppError({
254
+ code: "PACK_DEPENDENCY_UNSUPPORTED",
255
+ what: `Extension pack dependencies of extension packs are not supported for publishing: ${depFqn}`,
256
+ }));
257
+ case "subagent":
258
+ case "file":
259
+ case "rule":
260
+ return Effect.fail(makeAppError({
261
+ code: "PACK_DEPENDENCY_UNSUPPORTED",
262
+ what: `Publishing ${parsed.type} from pack dependencies is not supported: ${depFqn}`,
263
+ }));
264
+ }
265
+ };
266
+ const publishConfig = {
267
+ pack: Argument.string("pack").pipe(Argument.withDescription("Extension pack name (@owner/name or bare name)")),
268
+ registry: Flag.string("registry").pipe(Flag.withDescription("Target a specific named registry instead of the default"), Flag.optional),
269
+ includeDependencies: Flag.boolean("include-dependencies").pipe(Flag.withAlias("d"), Flag.withDescription("Also publish local extensions referenced by the extension pack")),
270
+ yes: yesFlag.pipe(Flag.withDescription("Publish without confirmation")),
271
+ force: forceFlag.pipe(Flag.withDescription("Publish even if this version already exists in the registry")),
272
+ preview: previewFlag.pipe(Flag.withDescription("Show what would be published without uploading")),
273
+ };
274
+ export const publishCommand = Command.make("publish", publishConfig, ({ pack, registry, includeDependencies, yes, force, preview }) => handlePublishPack({ pack, registry, includeDependencies, yes, force, preview }).pipe(withWorkspace(DEFAULT_WORKSPACE_SCOPE), withAuthRuntime("packs publish"))).pipe(withArgvTracking(publishConfig), Command.withDescription("Publish an extension pack to a registry"), Command.withExamples([
275
+ {
276
+ command: "axm packs publish @acme/frontend-tools",
277
+ description: "Share your extension pack on the registry",
278
+ },
279
+ {
280
+ command: "axm packs publish frontend-tools --registry local",
281
+ description: "Publish to a specific registry",
282
+ },
283
+ {
284
+ command: "axm packs publish @acme/frontend-tools --include-dependencies",
285
+ description: "Also publish the extension pack's local dependency extensions",
286
+ },
287
+ ]));
288
+ //# sourceMappingURL=publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/root/packs/publish.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAiB,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOpE,OAAO,EACL,SAAS,EACT,QAAQ,EACR,eAAe,EACf,qBAAqB,EAErB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,YAAY,EAA8B,MAAM,sCAAsC,CAAC;AAChG,OAAO,EACL,oBAAoB,EAEpB,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,cAAc,IAAI,gBAAgB,GAEnC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gBAAgB,GAEjB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,2CAA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CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,gDAAgD,CAAC,CAAC;CACzF,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CACxC,SAAS,EACT,aAAa,EACb,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAC/D,iBAAiB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CAClF,aAAa,CAAC,uBAAuB,CAAC,EACtC,eAAe,CAAC,eAAe,CAAC,CACjC,CACJ,CAAC,IAAI,CACJ,gBAAgB,CAAC,aAAa,CAAC,EAC/B,OAAO,CAAC,eAAe,CAAC,yCAAyC,CAAC,EAClE,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,wCAAwC;QACjD,WAAW,EAAE,2CAA2C;KACzD;IACD;QACE,OAAO,EAAE,mDAAmD;QAC5D,WAAW,EAAE,gCAAgC;KAC9C;IACD;QACE,OAAO,EAAE,+DAA+D;QACxE,WAAW,EAAE,+DAA+D;KAC7E;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Effect from "effect/Effect";
4
+ import { Command } from "effect/unstable/cli";
5
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
6
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
7
+ export interface PacksRemoveHandlerArgs {
8
+ readonly pack: string;
9
+ readonly extension: string;
10
+ readonly yes: boolean;
11
+ readonly force: boolean;
12
+ readonly preview: boolean;
13
+ }
14
+ export declare const handlePacksRemove: (args: PacksRemoveHandlerArgs) => Effect.Effect<undefined, import("@agentxm/client-core/unstable/app-error").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, CliRenderer | import("@agentxm/client-core/unstable/cli-flags").Verbosity | FileSystem.FileSystem | Path.Path | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | Workspace>;
15
+ export declare const removeCommand: Command.Command<"remove", Record<string, unknown>, {}, never, "effect/unstable/cli/GlobalFlag/axm-non-interactive" | "effect/unstable/cli/GlobalFlag/axm-json" | "effect/unstable/cli/GlobalFlag/axm-quiet" | "effect/unstable/cli/GlobalFlag/axm-verbose" | "effect/unstable/cli/GlobalFlag/axm-debug">;
16
+ //# sourceMappingURL=remove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../../src/root/packs/remove.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAc9D,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AASpE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,iBAAiB,gYA8J5B,CAAC;AAgBH,eAAO,MAAM,aAAa,0SAqBzB,CAAC"}
@@ -0,0 +1,156 @@
1
+ import * as crypto from "node:crypto";
2
+ import * as FileSystem from "effect/FileSystem";
3
+ import * as Path from "effect/Path";
4
+ import * as Effect from "effect/Effect";
5
+ import * as Option from "effect/Option";
6
+ import * as Schema from "effect/Schema";
7
+ import { Argument, Command, Flag } from "effect/unstable/cli";
8
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
9
+ import { normalizeHandle, parseRegistrySourcePatternParts, } from "@agentxm/client-core/unstable/extensions";
10
+ import { removeFromExtensionPack } from "@agentxm/client-core/unstable/packs";
11
+ import { EXTENSION_PACK_MANIFEST_FILENAME, ExtensionPackManifestSchema, } from "@agentxm/client-core/unstable/packs";
12
+ import { computeExtensionPackPaths } from "@agentxm/client-core/unstable/packs";
13
+ import { expandGlobs, isGlobPattern } from "@agentxm/client-core/unstable/utils";
14
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
15
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
16
+ import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
17
+ import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
18
+ import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
19
+ import { DEFAULT_WORKSPACE_SCOPE } from "@agentxm/client-core/unstable/workspace";
20
+ import { emitPlanResolutionResult } from "../../json-output.js";
21
+ import { withRuntime, withWorkspace } from "../../runtime.js";
22
+ const hashContent = (content) => crypto.createHash("sha256").update(content).digest("hex");
23
+ export const handlePacksRemove = Effect.fn("PacksRemove.handle")(function* (args) {
24
+ const ws = yield* Workspace;
25
+ const fs = yield* FileSystem.FileSystem;
26
+ const path = yield* Path.Path;
27
+ const renderer = yield* CliRenderer;
28
+ yield* renderer.info("axm packs remove");
29
+ // Step 1: Find the pack
30
+ const configuredPacks = yield* ws.getConfiguredPacks();
31
+ const packEntry = configuredPacks[args.pack];
32
+ if (packEntry === undefined) {
33
+ return yield* makeAppError({
34
+ code: "PACK_NOT_FOUND",
35
+ what: `Extension pack '${args.pack}' not found`,
36
+ howToFix: "Check available extension packs or create one with `axm packs new`",
37
+ });
38
+ }
39
+ // Resolve pack owner
40
+ const packSource = typeof packEntry === "string" ? packEntry : packEntry.source;
41
+ const packOwnerFromSource = packSource.startsWith("@")
42
+ ? parseRegistrySourcePatternParts(packSource)?.owner
43
+ : undefined;
44
+ const packOwner = packOwnerFromSource !== undefined
45
+ ? normalizeHandle(packOwnerFromSource)
46
+ : yield* ws.getConfiguredProfile();
47
+ const base = ws.baseDir;
48
+ // Step 2: Read pack manifest and compute hash for stale-check
49
+ const packDir = computeExtensionPackPaths(path.join, base, packOwner, args.pack);
50
+ const manifestPath = path.join(packDir.canonicalPath, EXTENSION_PACK_MANIFEST_FILENAME);
51
+ const manifestContent = yield* fs.readFileString(manifestPath).pipe(Effect.mapError((e) => makeAppError({
52
+ code: "PACK_NOT_FOUND",
53
+ what: `Extension pack manifest not found at ${manifestPath}`,
54
+ howToFix: "Ensure the extension pack exists on disk",
55
+ cause: e,
56
+ })));
57
+ const manifestHash = hashContent(manifestContent);
58
+ const json = yield* Effect.try({
59
+ try: () => {
60
+ const parsed = JSON.parse(manifestContent);
61
+ return parsed;
62
+ },
63
+ catch: (e) => makeAppError({
64
+ code: "PACK_MANIFEST_PARSE_FAILED",
65
+ what: `Failed to parse extension pack manifest: ${manifestPath}`,
66
+ cause: e,
67
+ }),
68
+ });
69
+ const manifest = yield* Schema.decodeUnknownEffect(ExtensionPackManifestSchema)(json).pipe(Effect.mapError((e) => makeAppError({
70
+ code: "PACK_MANIFEST_INVALID",
71
+ what: `Invalid extension pack manifest: ${manifestPath}`,
72
+ cause: e,
73
+ })));
74
+ // Step 3: Collect all extension names from the manifest (across all sections)
75
+ const allEntries = [];
76
+ for (const section of ["skills", "commands", "mcp-servers"]) {
77
+ const entries = manifest[section] ?? {};
78
+ for (const name of Object.keys(entries)) {
79
+ allEntries.push({ section, name });
80
+ }
81
+ }
82
+ const allNames = allEntries.map((e) => e.name);
83
+ // Step 4: Match extensions by name or glob
84
+ const isGlob = isGlobPattern(args.extension);
85
+ const matchedNames = isGlob
86
+ ? expandGlobs([args.extension], allNames)
87
+ : allNames.includes(args.extension)
88
+ ? [args.extension]
89
+ : [];
90
+ if (matchedNames.length === 0) {
91
+ if (isGlob) {
92
+ return yield* makeAppError({
93
+ code: "NO_EXTENSIONS_MATCHED",
94
+ what: `No extensions in extension pack match '${args.extension}'`,
95
+ details: allNames.length > 0 ? [`Available: ${allNames.join(", ")}`] : [],
96
+ howToFix: "Check extension pack contents",
97
+ });
98
+ }
99
+ return yield* makeAppError({
100
+ code: "EXTENSION_NOT_IN_PACK",
101
+ what: `Extension '${args.extension}' is not in the extension pack`,
102
+ details: allNames.length > 0 ? [`Available: ${allNames.join(", ")}`] : [],
103
+ howToFix: "Check the extension pack manifest for available extensions",
104
+ });
105
+ }
106
+ // Step 5: Build operation with precomputed delta and manifest hash
107
+ const op = {
108
+ name: "remove-from-pack",
109
+ args: {
110
+ packName: args.pack,
111
+ packOwner,
112
+ removals: matchedNames,
113
+ manifestHash,
114
+ },
115
+ };
116
+ // Build Plan directly with inline run closure
117
+ const provideServices = (effect) => effect.pipe(Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path));
118
+ const step = {
119
+ readiness: "ready",
120
+ label: args.pack,
121
+ run: provideServices(removeFromExtensionPack(op)).pipe(Effect.map((result) => result.result === "error"
122
+ ? { result: "error", message: result.message, error: result.error }
123
+ : { result: "success", message: result.message })),
124
+ };
125
+ const plan = {
126
+ _tag: "Plan",
127
+ name: "Remove from extension pack",
128
+ description: Option.some(`Remove ${matchedNames.length} extension(s) from ${args.pack}`),
129
+ jobs: [{ concurrency: 1, steps: [step] }],
130
+ };
131
+ const resolution = yield* previewOrApplyPlan(plan, {
132
+ yes: args.yes,
133
+ force: args.force,
134
+ preview: args.preview,
135
+ });
136
+ yield* emitPlanResolutionResult("packs.remove", resolution);
137
+ yield* renderer.success("Done");
138
+ });
139
+ const removeConfig = {
140
+ pack: Argument.string("pack").pipe(Argument.withDescription("Name of the pack")),
141
+ extension: Argument.string("extension").pipe(Argument.withDescription("Extension name or glob pattern")),
142
+ yes: yesFlag.pipe(Flag.withDescription("Remove without confirmation")),
143
+ force: forceFlag.pipe(Flag.withDescription("Remove even if it would leave the extension pack empty")),
144
+ preview: previewFlag.pipe(Flag.withDescription("Show what would change in the manifest without modifying it")),
145
+ };
146
+ export const removeCommand = Command.make("remove", removeConfig, ({ pack, extension, yes, force, preview }) => handlePacksRemove({ pack, extension, yes, force, preview }).pipe(withWorkspace(DEFAULT_WORKSPACE_SCOPE), withRuntime("packs remove"))).pipe(withArgvTracking(removeConfig), Command.withDescription("Remove an extension from an extension pack manifest"), Command.withExamples([
147
+ {
148
+ command: "axm packs remove frontend-tools @acme/skills/code-review",
149
+ description: "Remove an extension from an extension pack",
150
+ },
151
+ {
152
+ command: 'axm packs remove my-pack "@acme/effect-*"',
153
+ description: "Remove by pattern",
154
+ },
155
+ ]));
156
+ //# sourceMappingURL=remove.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/root/packs/remove.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACL,eAAe,EACf,+BAA+B,GAChC,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EACL,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,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nB;QACE,OAAO,EAAE,0DAA0D;QACnE,WAAW,EAAE,4CAA4C;KAC1D;IACD;QACE,OAAO,EAAE,2CAA2C;QACpD,WAAW,EAAE,mBAAmB;KACjC;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Pack uninstall command workflow actions.
3
+ *
4
+ * Implements `UninstallExtensionCommandWorkflowActions` for the pack uninstall
5
+ * command. The live layer captures all required services at construction time
6
+ * so action methods satisfy the `R = never` contract.
7
+ *
8
+ * @experimental This API is unstable and may change without notice.
9
+ */
10
+ import * as ServiceMap from "effect/ServiceMap";
11
+ import * as Layer from "effect/Layer";
12
+ import { SkillManager } from "@agentxm/client-core/unstable/skills";
13
+ import { ExtensionPackManager } from "@agentxm/client-core/unstable/packs";
14
+ import { CommandManager } from "@agentxm/client-core/unstable/commands";
15
+ import { McpServerManager } from "@agentxm/client-core/unstable/mcp-servers";
16
+ import { SubagentManager } from "@agentxm/client-core/unstable/subagents";
17
+ import type { PackExtensionTarget } from "@agentxm/client-core/unstable/workspace";
18
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
19
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
20
+ import type { UninstallExtensionCommandWorkflowActions } from "@agentxm/client-core/unstable/workflows";
21
+ /** Raw handler args from the CLI parser. */
22
+ export interface UninstallPackHandlerArgs {
23
+ readonly name: string;
24
+ }
25
+ /** Parsed and validated pack uninstall args. */
26
+ export interface ParsedPackUninstallArgs {
27
+ readonly packNames: ReadonlyArray<string>;
28
+ readonly isGlob: boolean;
29
+ readonly earlyExit: boolean;
30
+ }
31
+ /**
32
+ * Intent for the pack uninstall command.
33
+ * Supports multiple packs for glob expansion.
34
+ */
35
+ export interface UninstallPackCommandIntent {
36
+ readonly packsToUninstall: ReadonlyArray<PackExtensionTarget>;
37
+ }
38
+ declare const UninstallPackCommandWorkflowActions_base: ServiceMap.ServiceClass<UninstallPackCommandWorkflowActions, "axm.sh/UninstallPackCommandWorkflowActions", UninstallExtensionCommandWorkflowActions<UninstallPackHandlerArgs, ParsedPackUninstallArgs, UninstallPackCommandIntent>>;
39
+ export declare class UninstallPackCommandWorkflowActions extends UninstallPackCommandWorkflowActions_base {
40
+ }
41
+ /**
42
+ * Constructs the actions by resolving all services at layer-build time.
43
+ * Each action method closes over the captured services so `R = never`.
44
+ */
45
+ export declare const UninstallPackCommandWorkflowActionsLive: Layer.Layer<UninstallPackCommandWorkflowActions, never, CliRenderer | Workspace | CommandManager | McpServerManager | ExtensionPackManager | SubagentManager | SkillManager>;
46
+ export {};
47
+ //# sourceMappingURL=command-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-actions.d.ts","sourceRoot":"","sources":["../../../../../src/root/packs/uninstall/command-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,YAAY,EAA0B,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EACL,oBAAoB,EAIrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,cAAc,EAA4B,MAAM,wCAAwC,CAAC;AAClG,OAAO,EACL,gBAAgB,EAEjB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,eAAe,EAEhB,MAAM,yCAAyC,CAAC;AAMjD,OAAO,KAAK,EAAE,mBAAmB,EAAmB,MAAM,yCAAyC,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAEzE,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,yCAAyC,CAAC;AAOxG,4CAA4C;AAC5C,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,gDAAgD;AAChD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CAC/D;;AAMD,qBAAa,mCAAoC,SAAQ,wCAOR;CAAG;AAMpD;;;GAGG;AACH,eAAO,MAAM,uCAAuC,8KA6KnD,CAAC"}