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,63 @@
1
+ import { Command, Flag } from "effect/unstable/cli";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Schema from "effect/Schema";
4
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
5
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
6
+ import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
7
+ import { scopeFlag } from "../../cli-flags.js";
8
+ import { withRuntime, withWorkspace } from "../../runtime.js";
9
+ const CommandListItemSchema = Schema.Struct({
10
+ name: Schema.String,
11
+ lifecycle: Schema.String,
12
+ enabled: Schema.Boolean,
13
+ source: Schema.String,
14
+ });
15
+ const CommandListDocumentFields = {
16
+ items: Schema.Array(CommandListItemSchema),
17
+ count: Schema.Number,
18
+ };
19
+ const CommandListTable = {
20
+ columns: {
21
+ name: { header: "Name" },
22
+ lifecycle: { header: "Lifecycle" },
23
+ enabled: {
24
+ header: "Status",
25
+ render: (value) => (value ? "enabled" : "disabled"),
26
+ },
27
+ source: {
28
+ header: "Source",
29
+ render: (value) => (value.length > 0 ? value : "n/a"),
30
+ },
31
+ },
32
+ };
33
+ export const handleListCommands = Effect.fn("ListCommands.handle")(function* () {
34
+ const renderer = yield* CliRenderer;
35
+ const ws = yield* Workspace;
36
+ const commands = yield* ws.getClassifiedCommands();
37
+ const entries = Object.entries(commands);
38
+ const items = entries.map(([name, entry]) => ({
39
+ name,
40
+ source: typeof entry.source === "string" ? entry.source : "",
41
+ enabled: entry.enabled,
42
+ lifecycle: entry.lifecycle,
43
+ }));
44
+ if (yield* renderer.document("commands.list", { items, count: items.length }, CommandListDocumentFields)) {
45
+ return;
46
+ }
47
+ if (entries.length === 0) {
48
+ yield* renderer.info("No commands installed");
49
+ return;
50
+ }
51
+ yield* renderer.table(items, CommandListTable, "Installed commands");
52
+ });
53
+ const listConfig = {
54
+ scope: scopeFlag.pipe(Flag.withDescription("List commands from project (default) or user-level configuration")),
55
+ };
56
+ export const listCommand = Command.make("list", listConfig, ({ scope }) => handleListCommands().pipe(withWorkspace(scope), withRuntime("commands list"))).pipe(withArgvTracking(listConfig), Command.withAlias("ls"), Command.withDescription("List installed commands"), Command.withExamples([
57
+ { command: "axm commands list", description: "See what commands are installed" },
58
+ {
59
+ command: "axm commands list --scope user",
60
+ description: "Check user-level commands",
61
+ },
62
+ ]));
63
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/root/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,E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,CAAC,eAAe,CAAC,kEAAkE,CAAC,CACzF;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACxE,kBAAkB,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC,CAC9E,CAAC,IAAI,CACJ,gBAAgB,CAAC,UAAU,CAAC,EAC5B,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EACvB,OAAO,CAAC,eAAe,CAAC,yBAAyB,CAAC,EAClD,OAAO,CAAC,YAAY,CAAC;IACnB,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,iCAAiC,EAAE;IAChF;QACE,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,2BAA2B;KACzC;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Option from "effect/Option";
4
+ import * as Effect from "effect/Effect";
5
+ import { Command } from "effect/unstable/cli";
6
+ import { type ExtensionName } from "@agentxm/client-core/unstable/extensions";
7
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
8
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
9
+ export interface CommandsNewHandlerArgs {
10
+ readonly name: ExtensionName;
11
+ readonly description: string;
12
+ readonly profile: Option.Option<string>;
13
+ readonly yes: boolean;
14
+ readonly force: boolean;
15
+ readonly preview: boolean;
16
+ }
17
+ export declare const handleCommandsNew: (args: CommandsNewHandlerArgs) => 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>;
18
+ export declare const newCommand: Command.Command<"new", 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">;
19
+ //# sourceMappingURL=new.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../../src/root/commands/new.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,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAapE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxC,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,gYAmG5B,CAAC;AAmBH,eAAO,MAAM,UAAU,uSAsBtB,CAAC"}
@@ -0,0 +1,111 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import * as Option from "effect/Option";
4
+ import * as Effect from "effect/Effect";
5
+ import { Argument, Command, Flag } from "effect/unstable/cli";
6
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
7
+ import { decodeExtensionNameSync, normalizeHandle, REGISTRY_EXTENSIONS_DIR, } from "@agentxm/client-core/unstable/extensions";
8
+ import { newCommand as newCommandOp } from "@agentxm/client-core/unstable/commands";
9
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
10
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
11
+ import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
12
+ import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
13
+ import { DEFAULT_WORKSPACE_SCOPE } from "@agentxm/client-core/unstable/workspace";
14
+ import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
15
+ import { emitPlanResolutionResult } from "../../json-output.js";
16
+ import { withRuntime, withWorkspace } from "../../runtime.js";
17
+ import { toJobStepResult } from "./job-step-result.js";
18
+ const NAME_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
19
+ const MAX_NAME_LENGTH = 64;
20
+ const normalizeOwner = (s) => normalizeHandle(s.startsWith("@") ? s : `@${s}`);
21
+ export const handleCommandsNew = Effect.fn("CommandsNew.handle")(function* (args) {
22
+ const ws = yield* Workspace;
23
+ const renderer = yield* CliRenderer;
24
+ yield* renderer.info("axm commands new");
25
+ // 1. Resolve profile
26
+ const owner = Option.isSome(args.profile)
27
+ ? normalizeOwner(args.profile.value)
28
+ : yield* ws.getConfiguredProfile().pipe(Effect.flatMap((s) => s === "@community"
29
+ ? Effect.fail(makeAppError({
30
+ code: "NAMESPACE_REQUIRED",
31
+ what: "No profile configured for command creation",
32
+ howToFix: "Configure a profile in settings.json with `axm init`, or use --profile",
33
+ }))
34
+ : Effect.succeed(s)));
35
+ // 2. Validate name
36
+ if (args.name.length === 0 ||
37
+ args.name.length > MAX_NAME_LENGTH ||
38
+ !NAME_PATTERN.test(args.name)) {
39
+ return yield* makeAppError({
40
+ code: "COMMAND_NAME_INVALID",
41
+ what: `Invalid command name: "${args.name}"`,
42
+ details: [
43
+ "Command names must be lowercase, start with a letter or digit,",
44
+ "contain only letters, digits, and hyphens, and not exceed 64 characters.",
45
+ ],
46
+ howToFix: "Choose a name matching /^[a-z0-9][a-z0-9-]*$/ (max 64 chars)",
47
+ });
48
+ }
49
+ // 3. Check the managed extension directory doesn't already exist
50
+ const fs = yield* FileSystem.FileSystem;
51
+ const path = yield* Path.Path;
52
+ const targetDir = path.join(path.resolve("."), REGISTRY_EXTENSIONS_DIR, owner, "commands", args.name);
53
+ const dirExists = yield* fs.exists(targetDir).pipe(Effect.orElseSucceed(() => false));
54
+ if (dirExists) {
55
+ return yield* makeAppError({
56
+ code: "COMMAND_DIR_EXISTS",
57
+ what: `Managed command directory already exists: ${targetDir}`,
58
+ howToFix: "Choose a different name or remove the existing directory first",
59
+ });
60
+ }
61
+ // 4. Build operation
62
+ const op = {
63
+ name: "new-command",
64
+ args: { name: args.name, owner, description: args.description },
65
+ };
66
+ // 5. Build plan with inline run closure
67
+ const fqn = `${owner}/commands/${args.name}`;
68
+ const step = {
69
+ readiness: "ready",
70
+ label: fqn,
71
+ run: newCommandOp(op).pipe(Effect.map(toJobStepResult), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path)),
72
+ };
73
+ const plan = {
74
+ _tag: "Plan",
75
+ name: "New command",
76
+ description: Option.some(`Create ${fqn}`),
77
+ jobs: [{ concurrency: 1, steps: [step] }],
78
+ };
79
+ const resolution = yield* previewOrApplyPlan(plan, {
80
+ yes: args.yes,
81
+ force: args.force,
82
+ preview: args.preview,
83
+ });
84
+ yield* emitPlanResolutionResult("commands.new", resolution);
85
+ if (resolution._tag === "ExecutedPlan") {
86
+ yield* renderer.success(`Created command ${fqn}`);
87
+ }
88
+ });
89
+ const newConfig = {
90
+ name: Argument.string("name").pipe(Argument.withDescription("Name of the command")),
91
+ description: Flag.string("description").pipe(Flag.withDescription("Description for the command"), Flag.withDefault("")),
92
+ profile: Flag.string("profile").pipe(Flag.withDescription("Override the workspace profile (e.g., @acme)"), Flag.optional),
93
+ yes: yesFlag.pipe(Flag.withDescription("Create the command without confirmation")),
94
+ force: forceFlag.pipe(Flag.withDescription("Overwrite if a command directory already exists")),
95
+ preview: previewFlag.pipe(Flag.withDescription("Show what files would be created without creating them")),
96
+ };
97
+ export const newCommand = Command.make("new", newConfig, ({ name, description, profile, yes, force, preview }) => handleCommandsNew({
98
+ name: decodeExtensionNameSync(name),
99
+ description,
100
+ profile,
101
+ yes,
102
+ force,
103
+ preview,
104
+ }).pipe(withWorkspace(DEFAULT_WORKSPACE_SCOPE), withRuntime("commands new"))).pipe(withArgvTracking(newConfig), Command.withDescription("Create a new command"), Command.withExamples([
105
+ { command: "axm commands new my-command", description: "Scaffold a new command" },
106
+ {
107
+ command: "axm commands new my-command --profile @acme",
108
+ description: "Create under a specific owner",
109
+ },
110
+ ]));
111
+ //# sourceMappingURL=new.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new.js","sourceRoot":"","sources":["../../../../src/root/commands/new.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,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,uBAAuB,GAExB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCA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cAAc,CAAC,CAAC,CAC/E,CAAC,IAAI,CACJ,gBAAgB,CAAC,SAAS,CAAC,EAC3B,OAAO,CAAC,eAAe,CAAC,sBAAsB,CAAC,EAC/C,OAAO,CAAC,YAAY,CAAC;IACnB,EAAE,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,wBAAwB,EAAE;IACjF;QACE,OAAO,EAAE,6CAA6C;QACtD,WAAW,EAAE,+BAA+B;KAC7C;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { PlanSection } from "@agentxm/client-core/unstable/workspace";
2
+ interface PathEntry {
3
+ readonly path: string;
4
+ }
5
+ export declare const combinePlanSections: (...groups: ReadonlyArray<ReadonlyArray<PlanSection>>) => ReadonlyArray<PlanSection> | undefined;
6
+ export declare const makeItemSection: (title: string, items: ReadonlyArray<string>) => readonly PlanSection[];
7
+ export declare const makeAgentSection: (title: string, agents: ReadonlyArray<string>, emptyMessage?: string) => readonly PlanSection[];
8
+ export declare const makeGroupedSection: (title: string, groups: Readonly<Record<string, ReadonlyArray<string>>>) => readonly PlanSection[];
9
+ export declare const makeRenderedFilesSection: (title: string, filesByAgent: Readonly<Record<string, ReadonlyArray<PathEntry>>>) => readonly PlanSection[];
10
+ export {};
11
+ //# sourceMappingURL=preview-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-sections.d.ts","sourceRoot":"","sources":["../../../../src/root/commands/preview-sections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAE3E,UAAU,SAAS;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAKD,eAAO,MAAM,mBAAmB,GAC9B,GAAG,QAAQ,aAAa,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,KACnD,aAAa,CAAC,WAAW,CAAC,GAAG,SAG/B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,EAAE,OAAO,aAAa,CAAC,MAAM,CAAC,2BAChD,CAAC;AAE5B,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,QAAQ,aAAa,CAAC,MAAM,CAAC,EAC7B,eAAe,MAAM,2BAMmB,CAAC;AAE3C,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,EACb,QAAQ,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,2BAWxD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,OAAO,MAAM,EACb,cAAc,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,2BAU/D,CAAC"}
@@ -0,0 +1,25 @@
1
+ const makeSection = (title, items) => items.length === 0 ? [] : [{ title, items }];
2
+ export const combinePlanSections = (...groups) => {
3
+ const sections = groups.flatMap((group) => [...group]);
4
+ return sections.length === 0 ? undefined : sections;
5
+ };
6
+ export const makeItemSection = (title, items) => makeSection(title, items);
7
+ export const makeAgentSection = (title, agents, emptyMessage) => agents.length > 0
8
+ ? makeSection(title, agents)
9
+ : emptyMessage === undefined
10
+ ? []
11
+ : makeSection(title, [emptyMessage]);
12
+ export const makeGroupedSection = (title, groups) => {
13
+ const items = Object.entries(groups).flatMap(([group, entries]) => {
14
+ if (entries.length === 0) {
15
+ return [];
16
+ }
17
+ return [`${group}:\n${entries.map((entry) => ` - ${entry}`).join("\n")}`];
18
+ });
19
+ return makeSection(title, items);
20
+ };
21
+ export const makeRenderedFilesSection = (title, filesByAgent) => makeGroupedSection(title, Object.fromEntries(Object.entries(filesByAgent).map(([agentId, files]) => [
22
+ agentId,
23
+ files.map((file) => file.path),
24
+ ])));
25
+ //# sourceMappingURL=preview-sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-sections.js","sourceRoot":"","sources":["../../../../src/root/commands/preview-sections.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,GAAG,CAAC,KAAa,E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GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,KAAa,EACb,YAAgE,EAChE,EAAE,CACF,kBAAkB,CAChB,KAAK,EACL,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;IACrD,OAAO;IACP,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;CAC/B,CAAC,CACH,CACF,CAAC"}
@@ -0,0 +1,20 @@
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 { Command } from "effect/unstable/cli";
6
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
7
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
8
+ export interface CommandsPublishHandlerArgs {
9
+ readonly extensions: ReadonlyArray<string>;
10
+ readonly registry: Option.Option<string>;
11
+ readonly yes: boolean;
12
+ readonly force: boolean;
13
+ readonly preview: boolean;
14
+ }
15
+ /**
16
+ * Handles the `axm commands publish` command.
17
+ */
18
+ export declare const handleCommandsPublish: (args: CommandsPublishHandlerArgs) => Effect.Effect<void, 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 | import("@agentxm/client-core/unstable/auth").CredentialStore | import("@agentxm/client-core/unstable/auth").RegistryUrl>;
19
+ export declare const publishCommand: Command.Command<"publish", 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">;
20
+ //# sourceMappingURL=publish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/root/commands/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,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AASzE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAoBpE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AA0FD;;GAEG;AACH,eAAO,MAAM,qBAAqB,yfAOhC,CAAC;AAiNH,eAAO,MAAM,cAAc,2SAqB1B,CAAC"}
@@ -0,0 +1,238 @@
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 { Argument, Command, Flag } from "effect/unstable/cli";
6
+ import { withAuthGuard } from "@agentxm/client-core/unstable/auth";
7
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
8
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
9
+ import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
10
+ import { setCommandSemanticProperties, summarizeCommandOutcome, withArgvTracking, } from "@agentxm/client-core/unstable/cli-runtime";
11
+ import { DEFAULT_WORKSPACE_SCOPE } from "@agentxm/client-core/unstable/workspace";
12
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
13
+ import { publishCommand as publishCommandOp, COMMAND_MANIFEST_FILENAME, } from "@agentxm/client-core/unstable/commands";
14
+ import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
15
+ import { REGISTRY_EXTENSIONS_DIR, parseFqn } from "@agentxm/client-core/unstable/extensions";
16
+ import { expandGlobs, isGlobPattern } from "@agentxm/client-core/unstable/utils";
17
+ import { emitNoOpResult, emitPlanResolutionResult, planResolutionToSummary, } from "../../json-output.js";
18
+ import { withAuthRuntime, withWorkspace } from "../../runtime.js";
19
+ import { toJobStepResult } from "./job-step-result.js";
20
+ const COMMAND_MD_FILENAME = "COMMAND.md";
21
+ const resolveExtensionInputs = (extensions) => Effect.gen(function* () {
22
+ const ws = yield* Workspace;
23
+ const renderer = yield* CliRenderer;
24
+ const globPatterns = extensions.filter((e) => isGlobPattern(e));
25
+ const literalInputs = extensions.filter((e) => !isGlobPattern(e));
26
+ if (globPatterns.length === 0)
27
+ return literalInputs;
28
+ const installedCommands = yield* ws.getInstalledCommands();
29
+ const installedNames = Object.keys(installedCommands);
30
+ const globMatches = expandGlobs(globPatterns, installedNames);
31
+ if (globPatterns.length === extensions.length && globMatches.length === 0) {
32
+ yield* renderer.warn(`No commands matched pattern "${globPatterns.join(", ")}"`);
33
+ yield* renderer.success("Nothing to publish.");
34
+ return [];
35
+ }
36
+ const seen = new Set(globMatches);
37
+ return [
38
+ ...globMatches,
39
+ ...literalInputs.filter((lit) => {
40
+ if (seen.has(lit))
41
+ return false;
42
+ seen.add(lit);
43
+ return true;
44
+ }),
45
+ ];
46
+ });
47
+ const resolveTargetRegistry = (registry) => Effect.gen(function* () {
48
+ const ws = yield* Workspace;
49
+ const registrySources = yield* ws.getRegistrySourceHosts().pipe(Effect.mapError((e) => makeAppError({
50
+ code: "REGISTRY_SOURCES_FAILED",
51
+ what: `Failed to get registry sources: ${e._tag}`,
52
+ cause: e,
53
+ })));
54
+ const [defaultRegistry] = registrySources;
55
+ if (defaultRegistry === undefined) {
56
+ return yield* makeAppError({
57
+ code: "NO_REGISTRY_CONFIGURED",
58
+ what: "No registry sources configured",
59
+ howToFix: "Run the registry guard first.",
60
+ });
61
+ }
62
+ if (Option.isNone(registry)) {
63
+ return {
64
+ registryName: defaultRegistry.name,
65
+ registryUrl: defaultRegistry.location.href,
66
+ };
67
+ }
68
+ const namedRegistry = yield* ws.getConfiguredSourceByName(registry.value).pipe(Effect.mapError((e) => makeAppError({
69
+ code: "PUBLISH_COMMAND_REGISTRY_LOOKUP_FAILED",
70
+ what: `Failed to lookup registry source "${registry.value}"`,
71
+ cause: e,
72
+ })));
73
+ if (Option.isNone(namedRegistry) || namedRegistry.value.type !== "registry") {
74
+ return yield* makeAppError({
75
+ code: "PUBLISH_COMMAND_REGISTRY_NOT_FOUND",
76
+ what: `Registry source "${registry.value}" not found or not a registry source`,
77
+ });
78
+ }
79
+ return {
80
+ registryName: registry.value,
81
+ registryUrl: namedRegistry.value.location.href,
82
+ };
83
+ });
84
+ /**
85
+ * Handles the `axm commands publish` command.
86
+ */
87
+ export const handleCommandsPublish = Effect.fn("CommandsPublish.handle")(function* (args) {
88
+ const targetRegistry = yield* resolveTargetRegistry(args.registry);
89
+ yield* withAuthGuard(publishEffect(args, targetRegistry), {
90
+ registryUrl: targetRegistry.registryUrl,
91
+ });
92
+ });
93
+ const publishEffect = Effect.fn("CommandsPublish.publishEffect")(function* (args, targetRegistry) {
94
+ const ws = yield* Workspace;
95
+ const path = yield* Path.Path;
96
+ const fs = yield* FileSystem.FileSystem;
97
+ const renderer = yield* CliRenderer;
98
+ const base = ws.baseDir;
99
+ yield* renderer.info("axm commands publish");
100
+ // Step 1: Separate glob patterns from literal inputs, expand globs
101
+ const resolvedNames = yield* resolveExtensionInputs(args.extensions);
102
+ if (resolvedNames.length === 0) {
103
+ if (yield* emitNoOpResult("commands.publish", {
104
+ planName: "Publish command",
105
+ message: "Nothing to publish.",
106
+ })) {
107
+ return;
108
+ }
109
+ yield* renderer.info("Nothing to publish.");
110
+ return;
111
+ }
112
+ // Step 2: Resolve each name to FQN
113
+ const extensionNames = yield* Effect.forEach(resolvedNames, (name) => name.startsWith("@") && name.includes("/")
114
+ ? Effect.succeed(name)
115
+ : ws.getConfiguredProfile().pipe(Effect.map((owner) => `${owner}/commands/${name}`), Effect.mapError((e) => makeAppError({
116
+ code: "NAMESPACE_RESOLUTION_FAILED",
117
+ what: `Failed to resolve owner: ${e._tag}`,
118
+ howToFix: "Configure an owner in your settings with `axm init`.",
119
+ cause: e,
120
+ }))));
121
+ // Step 3: Validate each extension (both command.json and COMMAND.md must exist)
122
+ yield* renderer.withSpinner("Validating extensions...", () => Effect.gen(function* () {
123
+ const fqns = yield* Effect.forEach(extensionNames, (extName) => parseFqn(extName));
124
+ yield* Effect.forEach(fqns, (fqn, i) => {
125
+ const extName = extensionNames[i];
126
+ if (extName === undefined) {
127
+ return Effect.fail(makeAppError({
128
+ code: "EXTENSION_NOT_FOUND",
129
+ what: `Missing extension name for parsed FQN ${fqn.owner}/commands/${fqn.name}`,
130
+ }));
131
+ }
132
+ const extensionDir = path.join(base, REGISTRY_EXTENSIONS_DIR, fqn.owner, "commands", fqn.name);
133
+ return Effect.gen(function* () {
134
+ const extensionDirExists = yield* fs
135
+ .exists(extensionDir)
136
+ .pipe(Effect.orElseSucceed(() => false));
137
+ if (!extensionDirExists) {
138
+ return yield* makeAppError({
139
+ code: "EXTENSION_NOT_FOUND",
140
+ what: `Managed extension not found: ${extName}`,
141
+ details: [`Expected at: ${extensionDir}`],
142
+ howToFix: "Only managed extensions (in .axm/extensions/) can be published. Create with `axm commands new` first.",
143
+ });
144
+ }
145
+ const manifestPath = path.join(extensionDir, COMMAND_MANIFEST_FILENAME);
146
+ const manifestExists = yield* fs
147
+ .exists(manifestPath)
148
+ .pipe(Effect.orElseSucceed(() => false));
149
+ if (!manifestExists) {
150
+ return yield* makeAppError({
151
+ code: "MISSING_MANIFEST",
152
+ what: `Missing manifest: ${COMMAND_MANIFEST_FILENAME}`,
153
+ details: [`Expected at: ${manifestPath}`],
154
+ howToFix: `Ensure the extension has a valid ${COMMAND_MANIFEST_FILENAME} manifest.`,
155
+ });
156
+ }
157
+ const commandMdPath = path.join(extensionDir, "src", COMMAND_MD_FILENAME);
158
+ const commandMdExists = yield* fs
159
+ .exists(commandMdPath)
160
+ .pipe(Effect.orElseSucceed(() => false));
161
+ if (!commandMdExists) {
162
+ return yield* makeAppError({
163
+ code: "MISSING_COMMAND_MD",
164
+ what: `Missing ${COMMAND_MD_FILENAME}`,
165
+ details: [`Expected at: ${commandMdPath}`],
166
+ howToFix: `Ensure the extension has a ${COMMAND_MD_FILENAME} in its src/ directory.`,
167
+ });
168
+ }
169
+ });
170
+ });
171
+ }), { successMessage: `Validated ${extensionNames.length} extension(s)` });
172
+ // Step 4: Build multi-step plan with inline run closures
173
+ const steps = extensionNames.map((extName) => {
174
+ const op = {
175
+ name: "publish-command",
176
+ args: { name: extName, registryName: targetRegistry.registryName },
177
+ };
178
+ return {
179
+ readiness: "ready",
180
+ label: `Publish ${extName}`,
181
+ run: publishCommandOp(op).pipe(Effect.map(toJobStepResult), Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path)),
182
+ };
183
+ });
184
+ const description = extensionNames.length === 1
185
+ ? `Publish ${extensionNames[0]} to registry "${targetRegistry.registryName}"`
186
+ : `Publish ${extensionNames.length} commands to registry "${targetRegistry.registryName}"`;
187
+ const plan = {
188
+ _tag: "Plan",
189
+ name: "Publish command",
190
+ description: Option.some(description),
191
+ jobs: [{ steps, concurrency: 1 }],
192
+ };
193
+ const resolvedPlan = yield* previewOrApplyPlan(plan, {
194
+ yes: args.yes,
195
+ force: args.force,
196
+ preview: args.preview,
197
+ });
198
+ const failedStepDetails = resolvedPlan._tag === "ExecutedPlan"
199
+ ? resolvedPlan.jobs
200
+ .flatMap((job) => job.steps)
201
+ .flatMap((step) => step.result.result === "error"
202
+ ? [`${step.label}: ${step.result.error.what} (${step.result.error.code})`]
203
+ : [])
204
+ : [];
205
+ if (failedStepDetails.length > 0) {
206
+ return yield* makeAppError({
207
+ code: "PUBLISH_PLAN_FAILED",
208
+ what: `Failed to publish ${failedStepDetails.length} command${failedStepDetails.length === 1 ? "" : "s"}`,
209
+ details: failedStepDetails,
210
+ });
211
+ }
212
+ yield* setCommandSemanticProperties(summarizeCommandOutcome(planResolutionToSummary(resolvedPlan, {
213
+ subjectType: "command",
214
+ sourceKind: "registry",
215
+ })));
216
+ yield* emitPlanResolutionResult("commands.publish", resolvedPlan);
217
+ if (resolvedPlan._tag === "ExecutedPlan") {
218
+ yield* renderer.success("Done");
219
+ }
220
+ });
221
+ const publishConfig = {
222
+ extensions: Argument.string("extensions").pipe(Argument.withDescription("Extension names or glob patterns (@owner/commands/name, bare name, or glob)"), Argument.atLeast(1)),
223
+ registry: Flag.string("registry").pipe(Flag.withDescription("Target a specific named registry instead of the default"), Flag.optional),
224
+ yes: yesFlag.pipe(Flag.withDescription("Publish without confirmation")),
225
+ force: forceFlag.pipe(Flag.withDescription("Publish even if version already exists in the registry")),
226
+ preview: previewFlag.pipe(Flag.withDescription("Show what would be published without uploading")),
227
+ };
228
+ export const publishCommand = Command.make("publish", publishConfig, ({ extensions, registry, yes, force, preview }) => handleCommandsPublish({ extensions: [...extensions], registry, yes, force, preview }).pipe(withWorkspace(DEFAULT_WORKSPACE_SCOPE), withAuthRuntime("commands publish"))).pipe(withArgvTracking(publishConfig), Command.withDescription("Publish command extensions to a registry"), Command.withExamples([
229
+ {
230
+ command: "axm commands publish @acme/commands/my-cmd",
231
+ description: "Publish a command to the registry",
232
+ },
233
+ {
234
+ command: "axm commands publish my-cmd --registry local",
235
+ description: "Publish to a specific registry",
236
+ },
237
+ ]));
238
+ //# sourceMappingURL=publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/root/commands/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,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EACL,cAAc,IAAI,gBAAgB,EAClC,yBAAyB,GAC1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE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,eAAe,CAAC,0CAA0C,CAAC,EACnE,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,4CAA4C;QACrD,WAAW,EAAE,mCAAmC;KACjD;IACD;QACE,OAAO,EAAE,8CAA8C;QACvD,WAAW,EAAE,gCAAgC;KAC9C;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Command uninstall workflow actions service.
3
+ *
4
+ * Implements UninstallExtensionCommandWorkflowActions for commands.
5
+ * 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 { Workspace } from "@agentxm/client-core/unstable/workspace";
13
+ import { CommandManager } from "@agentxm/client-core/unstable/commands";
14
+ import type { UninstallExtensionCommandWorkflowActions } from "@agentxm/client-core/unstable/workflows";
15
+ import type { UninstallCommandCommandIntent } from "./intent.js";
16
+ export interface UninstallCommandHandlerArgs {
17
+ readonly commandName: string;
18
+ }
19
+ export interface ParsedCommandUninstallArgs {
20
+ readonly commandName: string;
21
+ }
22
+ declare const UninstallCommandCommandWorkflowActions_base: ServiceMap.ServiceClass<UninstallCommandCommandWorkflowActions, "axm.sh/UninstallCommandCommandWorkflowActions", UninstallExtensionCommandWorkflowActions<UninstallCommandHandlerArgs, ParsedCommandUninstallArgs, UninstallCommandCommandIntent>>;
23
+ export declare class UninstallCommandCommandWorkflowActions extends UninstallCommandCommandWorkflowActions_base {
24
+ }
25
+ /**
26
+ * Constructs the actions by resolving all services at layer-build time.
27
+ * Each action method closes over the captured services so `R = never`.
28
+ */
29
+ export declare const UninstallCommandCommandWorkflowActionsLive: Layer.Layer<UninstallCommandCommandWorkflowActions, never, Workspace | CommandManager>;
30
+ export {};
31
+ //# sourceMappingURL=command-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-actions.d.ts","sourceRoot":"","sources":["../../../../../src/root/commands/uninstall/command-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,cAAc,EAA4B,MAAM,wCAAwC,CAAC;AAOlG,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,yCAAyC,CAAC;AACxG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAWjE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAMD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;;AAMD,qBAAa,sCAAuC,SAAQ,2CAOR;CAAG;AAMvD;;;GAGG;AACH,eAAO,MAAM,0CAA0C,wFA6FtD,CAAC"}