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,409 @@
1
+ import * as FileSystem from "effect/FileSystem";
2
+ import * as Path from "effect/Path";
3
+ import { resolveSource, SourceHostProviders, } from "@agentxm/client-core/unstable/source-resolution";
4
+ import * as Array from "effect/Array";
5
+ import * as Effect from "effect/Effect";
6
+ import * as Option from "effect/Option";
7
+ import * as Schema from "effect/Schema";
8
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
9
+ import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
10
+ import { expandGlobs } from "@agentxm/client-core/unstable/utils";
11
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
12
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
13
+ import { REGISTRY_EXTENSIONS_DIR, decodeExtensionNameSync, parseRegistrySourcePatternParts, } from "@agentxm/client-core/unstable/extensions";
14
+ import { EXTENSION_PACK_MANIFEST_FILENAME, ExtensionPackManifestSchema, } from "@agentxm/client-core/unstable/packs";
15
+ import { createRegistryClient } from "@agentxm/client-core/unstable/registry";
16
+ import { buildUpdatePlan } from "./plan.js";
17
+ import { installSkill } from "@agentxm/client-core/unstable/skills";
18
+ import { uninstallSkill } from "@agentxm/client-core/unstable/skills";
19
+ import { previewOrApplyPlan } from "@agentxm/client-core/unstable/workspace";
20
+ import { detectHoldbackWarnings, resolveConstrainedVersion, } from "./constraint-resolution.js";
21
+ import { emitNoOpResult, emitPlanResolutionResult } from "../../../json-output.js";
22
+ const toRegistrySkillPattern = (source) => {
23
+ const parsed = parseRegistrySourcePatternParts(source);
24
+ if (parsed === undefined)
25
+ return Option.none();
26
+ if (parsed.type !== undefined && parsed.type !== "skills") {
27
+ return Option.none();
28
+ }
29
+ return Option.some(parsed);
30
+ };
31
+ export const handleUpdate = Effect.fn("Update.handle")(function* (args) {
32
+ const ws = yield* Workspace;
33
+ const sources = yield* SourceHostProviders;
34
+ const renderer = yield* CliRenderer;
35
+ yield* renderer.info(`axm skills update (${ws.scope})`);
36
+ // Step 1: Load configured skills and filter to enabled
37
+ const allSkills = yield* ws.getConfiguredSkills();
38
+ const lockedSkills = yield* ws.getLockedSkills();
39
+ const skillEntries = yield* Effect.forEach(Object.entries(allSkills), ([name, entry]) => Effect.gen(function* () {
40
+ if (!entry.enabled) {
41
+ yield* renderer.info(`Skipping ${name} (disabled)`);
42
+ return Option.none();
43
+ }
44
+ return Option.some([name, entry.source]);
45
+ })).pipe(Effect.map(Array.getSomes));
46
+ if (skillEntries.length === 0) {
47
+ if (yield* emitNoOpResult("skills.update", {
48
+ planName: "Update skill(s)",
49
+ planDescription: "Update installed skills",
50
+ message: "No skills installed. Nothing to update.",
51
+ })) {
52
+ return;
53
+ }
54
+ yield* renderer.info("No skills installed. Nothing to update.");
55
+ return;
56
+ }
57
+ // Step 2: Filter by source argument if provided
58
+ const sourceValue = Option.getOrUndefined(args.source);
59
+ const sourceFilteredEntries = sourceValue !== undefined
60
+ ? yield* Effect.gen(function* () {
61
+ const sourceArg = yield* resolveSource(sourceValue).pipe(Effect.mapError((error) => makeAppError({
62
+ code: "INVALID_SOURCE",
63
+ what: `Invalid source: ${error.message}`,
64
+ details: [`Provided: ${sourceValue}`],
65
+ cause: error,
66
+ })));
67
+ // Compare sources by identity using canonical origin string
68
+ const sourceArgOrigin = sources.origin(sourceArg);
69
+ return yield* Effect.forEach(skillEntries, ([name, sourceStr]) => resolveSource(sourceStr).pipe(Effect.map((resolved) => sources.origin(resolved) === sourceArgOrigin
70
+ ? Option.some([name, sourceStr])
71
+ : Option.none()), Effect.catch(() => Effect.succeed(Option.none()))), { concurrency: "unbounded" }).pipe(Effect.map(Array.getSomes));
72
+ })
73
+ : skillEntries;
74
+ // Step 3: Filter by --skill glob patterns
75
+ const filteredEntries = (() => {
76
+ if (args.skills.length === 0)
77
+ return sourceFilteredEntries;
78
+ const allNames = sourceFilteredEntries.map(([name]) => name);
79
+ const matchedNames = expandGlobs(args.skills, allNames);
80
+ const matchedSet = new Set(matchedNames);
81
+ return sourceFilteredEntries.filter(([name]) => matchedSet.has(name));
82
+ })();
83
+ if (args.skills.length > 0) {
84
+ if (filteredEntries.length === 0) {
85
+ if (yield* emitNoOpResult("skills.update", {
86
+ planName: "Update skill(s)",
87
+ planDescription: "Update installed skills",
88
+ message: "No installed skills match the --skill filter. Nothing to update.",
89
+ })) {
90
+ return;
91
+ }
92
+ yield* renderer.warn("No installed skills match the --skill filter. Nothing to update.");
93
+ return;
94
+ }
95
+ }
96
+ // Step 4: Collect pack constraints from installed pack manifests
97
+ const packConstraintMap = yield* collectPackConstraints();
98
+ const findSkillRefs = (source, options) => sources
99
+ .find(source, {
100
+ names: options.skillNames,
101
+ type: "skill",
102
+ owner: options.owner,
103
+ versionConstraint: options.versionConstraint,
104
+ })
105
+ .pipe(Effect.map((refs) => Array.filter(refs, (ref) => ref.type === "skill")));
106
+ const resolveRegistrySkillWithConstraints = ({ source, owner, lookupName, userConstraint, packConstraints, }) => Effect.gen(function* () {
107
+ const location = source.location.protocol === "file:" ? source.location.pathname : source.location.href;
108
+ const client = yield* createRegistryClient(location);
109
+ const indexOption = yield* client.getExtensionIndex({
110
+ owner,
111
+ type: "skill",
112
+ name: lookupName,
113
+ });
114
+ if (Option.isNone(indexOption)) {
115
+ return Option.none();
116
+ }
117
+ const skillFqn = `${owner}/skills/${lookupName}`;
118
+ const constraints = { userConstraint, packConstraints };
119
+ const versions = indexOption.value.versions.map((entry) => entry.version);
120
+ const [latestVersion] = versions;
121
+ if (latestVersion === undefined) {
122
+ return yield* makeAppError({
123
+ code: "UPDATE_SOURCE_EMPTY",
124
+ what: `Registry skill "${skillFqn}" has no published versions`,
125
+ details: [`Source: ${sources.origin(source)}`],
126
+ howToFix: "Publish a version before running `axm skills update`.",
127
+ });
128
+ }
129
+ const resolvedVersion = resolveConstrainedVersion(versions, constraints, skillFqn);
130
+ if (Option.isNone(resolvedVersion)) {
131
+ const constraintLabel = Option.match(userConstraint, {
132
+ onNone: () => "the configured constraints",
133
+ onSome: (constraint) => `"${constraint}"`,
134
+ });
135
+ return yield* makeAppError({
136
+ code: "UPDATE_CONSTRAINT_UNSATISFIABLE",
137
+ what: `No published version of "${skillFqn}" satisfies ${constraintLabel}`,
138
+ details: [`Source: ${sources.origin(source)}`],
139
+ howToFix: "Relax the version constraint or update the dependent pack constraints.",
140
+ });
141
+ }
142
+ const exactRefs = yield* findSkillRefs(source, {
143
+ skillNames: [lookupName],
144
+ owner: Option.some(owner),
145
+ versionConstraint: Option.some(resolvedVersion.value.resolvedVersion),
146
+ });
147
+ const exactRef = exactRefs.find((ref) => ref.refType === "registry" &&
148
+ ref.skill.name === lookupName &&
149
+ ref.version === resolvedVersion.value.resolvedVersion);
150
+ if (exactRef === undefined) {
151
+ return yield* makeAppError({
152
+ code: "UPDATE_RESOLUTION_FAILED",
153
+ what: `Resolved version "${resolvedVersion.value.resolvedVersion}" for "${skillFqn}" could not be rediscovered`,
154
+ details: [`Source: ${sources.origin(source)}`],
155
+ howToFix: "Verify the registry index and package metadata are consistent.",
156
+ });
157
+ }
158
+ return Option.some({
159
+ ref: exactRef,
160
+ versionConstraint: userConstraint,
161
+ warnings: [
162
+ ...resolvedVersion.value.warnings,
163
+ ...detectHoldbackWarnings(latestVersion, resolvedVersion.value.resolvedVersion, constraints, skillFqn),
164
+ ],
165
+ });
166
+ });
167
+ const decodeConfiguredSkillName = (name, sourceStr) => Effect.try({
168
+ try: () => decodeExtensionNameSync(name),
169
+ catch: () => makeAppError({
170
+ code: "INVALID_SOURCE",
171
+ what: `Configured skill name "${name}" is invalid`,
172
+ details: [`Source: ${sourceStr}`],
173
+ howToFix: "Use lowercase letters, numbers, and hyphens only, with a maximum length of 64 characters.",
174
+ }),
175
+ });
176
+ const results = yield* renderer.withSpinner("Resolving sources...", () => Effect.forEach(filteredEntries, ([name, sourceStr]) => Effect.gen(function* () {
177
+ const source = yield* resolveSource(sourceStr);
178
+ const registryPattern = toRegistrySkillPattern(sourceStr);
179
+ if (source.type === "registry" && Option.isSome(registryPattern)) {
180
+ const lookupName = registryPattern.value.name ?? (yield* decodeConfiguredSkillName(name, sourceStr));
181
+ const registryResolved = yield* resolveRegistrySkillWithConstraints({
182
+ source,
183
+ owner: registryPattern.value.owner,
184
+ lookupName,
185
+ userConstraint: registryPattern.value.versionConstraint === undefined
186
+ ? Option.none()
187
+ : Option.some(registryPattern.value.versionConstraint),
188
+ packConstraints: packConstraintMap.get(`${registryPattern.value.owner}/skills/${lookupName}`) ??
189
+ [],
190
+ });
191
+ if (Option.isSome(registryResolved)) {
192
+ return Option.some({
193
+ type: "match",
194
+ ref: registryResolved.value.ref,
195
+ versionConstraint: registryResolved.value.versionConstraint,
196
+ warnings: registryResolved.value.warnings,
197
+ });
198
+ }
199
+ }
200
+ const requestedOwner = Option.match(registryPattern, {
201
+ onNone: () => Option.none(),
202
+ onSome: (pattern) => Option.some(pattern.owner),
203
+ });
204
+ // First try with name filter (fast path)
205
+ const namedRefs = yield* findSkillRefs(source, {
206
+ skillNames: [name],
207
+ owner: requestedOwner,
208
+ versionConstraint: Option.none(),
209
+ });
210
+ const skillRef = namedRefs.find((r) => r.skill.name === name);
211
+ if (skillRef) {
212
+ return Option.some({
213
+ type: "match",
214
+ ref: skillRef,
215
+ versionConstraint: Option.none(),
216
+ warnings: [],
217
+ });
218
+ }
219
+ // Skill not found by name — re-resolve without name filter for rename detection
220
+ const allSkillRefs = yield* findSkillRefs(source, {
221
+ skillNames: [],
222
+ owner: requestedOwner,
223
+ versionConstraint: Option.none(),
224
+ });
225
+ if (allSkillRefs.length === 1) {
226
+ // Single-skill source: treat as rename
227
+ const [newRef] = allSkillRefs;
228
+ if (newRef === undefined) {
229
+ return Option.none();
230
+ }
231
+ if (source.type === "registry" &&
232
+ newRef.refType === "registry" &&
233
+ Option.isSome(registryPattern)) {
234
+ const renameResolved = yield* resolveRegistrySkillWithConstraints({
235
+ source,
236
+ owner: registryPattern.value.owner,
237
+ lookupName: newRef.skill.name,
238
+ userConstraint: registryPattern.value.versionConstraint === undefined
239
+ ? Option.none()
240
+ : Option.some(registryPattern.value.versionConstraint),
241
+ packConstraints: packConstraintMap.get(`${registryPattern.value.owner}/skills/${newRef.skill.name}`) ?? [],
242
+ });
243
+ if (Option.isSome(renameResolved)) {
244
+ return Option.some({
245
+ type: "rename",
246
+ oldName: name,
247
+ newRef: renameResolved.value.ref,
248
+ versionConstraint: renameResolved.value.versionConstraint,
249
+ warnings: renameResolved.value.warnings,
250
+ });
251
+ }
252
+ }
253
+ return Option.some({
254
+ type: "rename",
255
+ oldName: name,
256
+ newRef,
257
+ versionConstraint: Option.none(),
258
+ warnings: [],
259
+ });
260
+ }
261
+ else if (allSkillRefs.length > 1) {
262
+ // Multi-skill source: ambiguous rename
263
+ const availableNames = allSkillRefs.map((r) => r.skill.name).join(", ");
264
+ yield* renderer.warn(`Skill "${name}" not found in source. Available skills: ${availableNames}. Use \`axm skills rename ${name} <new-name>\` to update.`);
265
+ return Option.none();
266
+ }
267
+ else {
268
+ yield* renderer.warn(`Skill "${name}" not found in source ${sources.origin(source)}`);
269
+ return Option.none();
270
+ }
271
+ }).pipe(Effect.catch((error) => {
272
+ return renderer
273
+ .warn(`Failed to resolve "${name}": ${String(error)}`)
274
+ .pipe(Effect.map(() => Option.none()));
275
+ })), { concurrency: "unbounded" }), { successMessage: "Sources resolved" });
276
+ // Step 6: Collect successful resolutions
277
+ const resolved = Array.getSomes(results);
278
+ if (resolved.length === 0) {
279
+ return yield* makeAppError({
280
+ code: "UPDATE_FAILED",
281
+ what: "All source re-resolutions failed. Nothing to update.",
282
+ howToFix: "Verify the original source paths are still accessible.",
283
+ });
284
+ }
285
+ // Step 7: Emit resolution warnings
286
+ yield* Effect.forEach(Array.flatMap(resolved, (item) => item.warnings), (warning) => renderer.warn(warning), { discard: true });
287
+ // Step 8: Build operations
288
+ const ops = Array.flatMap(resolved, (item) => {
289
+ if (item.type === "match") {
290
+ const existingLock = lockedSkills[item.ref.skill.name];
291
+ const existingInstalledAt = Option.fromUndefinedOr(existingLock?.installedAt);
292
+ return [
293
+ {
294
+ name: "install-skill",
295
+ args: {
296
+ ref: item.ref,
297
+ force: args.force,
298
+ versionConstraint: item.versionConstraint,
299
+ skipSettings: Option.none(),
300
+ strictUnknownAgents: Option.none(),
301
+ existingInstalledAt,
302
+ sourceName: Option.none(),
303
+ },
304
+ },
305
+ ];
306
+ }
307
+ // Rename: install new name + uninstall old name — preserve original installedAt
308
+ const existingLock = lockedSkills[item.oldName];
309
+ const existingInstalledAt = Option.fromUndefinedOr(existingLock?.installedAt);
310
+ return [
311
+ {
312
+ name: "install-skill",
313
+ args: {
314
+ ref: item.newRef,
315
+ force: args.force,
316
+ versionConstraint: item.versionConstraint,
317
+ skipSettings: Option.none(),
318
+ strictUnknownAgents: Option.none(),
319
+ existingInstalledAt,
320
+ sourceName: Option.none(),
321
+ },
322
+ },
323
+ {
324
+ name: "uninstall-skill",
325
+ args: {
326
+ skillName: item.oldName,
327
+ agents: [],
328
+ },
329
+ },
330
+ ];
331
+ });
332
+ // Step 9: Capture services for run closures
333
+ const fs = yield* FileSystem.FileSystem;
334
+ const path = yield* Path.Path;
335
+ const agentRepo = yield* CodingAgentRepository;
336
+ const toJobStepResult = (result) => result.result === "error" && result.error != null
337
+ ? { result: "error", message: result.message, error: result.error }
338
+ : { result: "success", message: result.message };
339
+ const makeRunClosure = (op) => {
340
+ if (op.name === "install-skill") {
341
+ return installSkill(op).pipe(Effect.map(toJobStepResult), Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path), Effect.provideService(CliRenderer, renderer), Effect.provideService(SourceHostProviders, sources), Effect.provideService(CodingAgentRepository, agentRepo));
342
+ }
343
+ return uninstallSkill(op).pipe(Effect.map(toJobStepResult), Effect.provideService(Workspace, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path));
344
+ };
345
+ // Step 10: Build plan
346
+ const lockfile = { lockfileVersion: 1, skills: lockedSkills };
347
+ const plan = buildUpdatePlan(ops, lockfile, "Update skill(s)", Option.some("Update installed skills"), makeRunClosure);
348
+ // Step 11: Resolve plan
349
+ const resolution = yield* previewOrApplyPlan(plan, {
350
+ yes: args.yes,
351
+ force: args.force,
352
+ preview: args.preview,
353
+ });
354
+ yield* emitPlanResolutionResult("skills.update", resolution);
355
+ yield* renderer.success("Done");
356
+ });
357
+ /**
358
+ * Read installed pack manifests and collect per-skill constraints.
359
+ *
360
+ * Returns a map from skill FQN (e.g., "@acme/skills/code-review") to an array of
361
+ * pack constraints. Silently skips packs whose manifest can't be read.
362
+ */
363
+ const collectPackConstraints = () => Effect.gen(function* () {
364
+ const fs = yield* FileSystem.FileSystem;
365
+ const path = yield* Path.Path;
366
+ const ws = yield* Workspace;
367
+ const base = ws.baseDir;
368
+ // Read lockfile to find installed packs
369
+ const lockedPacks = yield* ws.getLockedExtensionPacks();
370
+ const constraintMap = new Map();
371
+ // Read each pack's manifest from disk (sequential to avoid data race on constraintMap)
372
+ yield* Effect.forEach(Object.entries(lockedPacks), ([packName, packEntry]) => Effect.gen(function* () {
373
+ const packDir = path.join(base, REGISTRY_EXTENSIONS_DIR, packEntry.owner, "packs", packName);
374
+ const manifestPath = path.join(packDir, EXTENSION_PACK_MANIFEST_FILENAME);
375
+ const exists = yield* fs
376
+ .exists(manifestPath)
377
+ .pipe(Effect.catch(() => Effect.succeed(false)));
378
+ if (!exists)
379
+ return;
380
+ const content = yield* fs
381
+ .readFileString(manifestPath)
382
+ .pipe(Effect.catch(() => Effect.succeed("")));
383
+ if (content === "")
384
+ return;
385
+ const json = yield* Effect.try({
386
+ try: () => JSON.parse(content),
387
+ catch: () => ({ _tag: "parse-failed" }),
388
+ }).pipe(Effect.map((value) => value), Effect.option);
389
+ if (Option.isNone(json))
390
+ return;
391
+ const manifest = yield* Schema.decodeUnknownEffect(ExtensionPackManifestSchema)(json.value).pipe(Effect.option);
392
+ if (Option.isNone(manifest))
393
+ return;
394
+ // Collect skill constraints from manifest
395
+ const skills = manifest.value.skills;
396
+ if (skills === null || skills === undefined || typeof skills !== "object") {
397
+ return;
398
+ }
399
+ for (const [fqn, constraint] of Object.entries(skills)) {
400
+ if (typeof constraint !== "string" || constraint === "*" || constraint === "")
401
+ continue;
402
+ const existing = constraintMap.get(fqn) ?? [];
403
+ existing.push({ packName, constraint });
404
+ constraintMap.set(fqn, existing);
405
+ }
406
+ }));
407
+ return constraintMap;
408
+ });
409
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../../src/root/skills/update/handler.ts"],"names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,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;YAAE,OAAO;QAEpC,0CAA0C;QAC1C,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;QACrC,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC1E,OAAO;QACT,CAAC;QACD,KAAK,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACvD,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,EAAE;gBAAE,SAAS;YACxF,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;YACxC,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,CAAC,CACH,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Update-specific plan builder.
3
+ *
4
+ * Compares re-resolved source metadata against lockfile entries to determine
5
+ * which skills need updating. Git sources compare tree hashes, registry sources
6
+ * compare versions, and local sources always update.
7
+ *
8
+ * @experimental This API is unstable and may change without notice.
9
+ */
10
+ import * as Effect from "effect/Effect";
11
+ import * as Option from "effect/Option";
12
+ import type { AppError } from "@agentxm/client-core/unstable/app-error";
13
+ import type { Lockfile } from "@agentxm/client-core/unstable/lockfile";
14
+ import type { JobStepResult, Plan } from "@agentxm/client-core/unstable/workspace";
15
+ import type { InstallSkillOperation } from "@agentxm/client-core/unstable/skills";
16
+ import type { UninstallSkillOperation } from "@agentxm/client-core/unstable/skills";
17
+ export type UpdateOperation = InstallSkillOperation | UninstallSkillOperation;
18
+ /**
19
+ * A function that creates a run closure for an operation.
20
+ * The closure must have all services already provided (R = never).
21
+ */
22
+ export type MakeRunClosure = (op: UpdateOperation) => Effect.Effect<JobStepResult, AppError, never>;
23
+ /**
24
+ * Build an update plan by comparing operations against lockfile entries.
25
+ *
26
+ * Accepts both install operations (compared against lockfile) and uninstall
27
+ * operations (rename cleanup — always marked as success).
28
+ *
29
+ * Takes a `makeRunClosure` function that produces service-provided run closures
30
+ * for each operation.
31
+ *
32
+ * Pure function (no Effect needed) — service provision happens in the caller.
33
+ */
34
+ export declare const buildUpdatePlan: (ops: ReadonlyArray<UpdateOperation>, lockfile: Lockfile, name: string, description: Option.Option<string>, makeRunClosure: MakeRunClosure) => Plan;
35
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../../src/root/skills/update/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,wCAAwC,CAAC;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAkB,MAAM,yCAAyC,CAAC;AACnG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAMpF,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,uBAAuB,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,EAAE,EAAE,eAAe,KAAK,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAwCpG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAC1B,KAAK,aAAa,CAAC,eAAe,CAAC,EACnC,UAAU,QAAQ,EAClB,MAAM,MAAM,EACZ,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAClC,gBAAgB,cAAc,KAC7B,IAsCD,CAAC"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Update-specific plan builder.
3
+ *
4
+ * Compares re-resolved source metadata against lockfile entries to determine
5
+ * which skills need updating. Git sources compare tree hashes, registry sources
6
+ * compare versions, and local sources always update.
7
+ *
8
+ * @experimental This API is unstable and may change without notice.
9
+ */
10
+ import * as Effect from "effect/Effect";
11
+ import * as Option from "effect/Option";
12
+ // -----------------------------------------------------------------------------
13
+ // Version comparison
14
+ // -----------------------------------------------------------------------------
15
+ /**
16
+ * Determine whether a skill needs updating by comparing the operation's
17
+ * resolved metadata against the lockfile entry.
18
+ *
19
+ * Returns `true` when the skill has changed and should be updated.
20
+ */
21
+ const hasChanged = (op, entry) => {
22
+ const { ref } = op.args;
23
+ if (ref.refType === "git-hosted") {
24
+ const lockHash = Option.fromUndefinedOr(entry.gitTreeHash);
25
+ const opHash = ref.gitTreeSha;
26
+ // If either hash is missing, treat as needing update
27
+ if (Option.isNone(lockHash) || Option.isNone(opHash))
28
+ return true;
29
+ return lockHash.value !== opHash.value;
30
+ }
31
+ if (ref.refType === "registry") {
32
+ if (entry.type !== "registry")
33
+ return true;
34
+ const lockVersion = entry.resolvedVersion;
35
+ const opVersion = ref.version;
36
+ return opVersion !== lockVersion;
37
+ }
38
+ // Local sources: always update (no version tracking)
39
+ return true;
40
+ };
41
+ // -----------------------------------------------------------------------------
42
+ // Plan builder
43
+ // -----------------------------------------------------------------------------
44
+ /**
45
+ * Build an update plan by comparing operations against lockfile entries.
46
+ *
47
+ * Accepts both install operations (compared against lockfile) and uninstall
48
+ * operations (rename cleanup — always marked as success).
49
+ *
50
+ * Takes a `makeRunClosure` function that produces service-provided run closures
51
+ * for each operation.
52
+ *
53
+ * Pure function (no Effect needed) — service provision happens in the caller.
54
+ */
55
+ export const buildUpdatePlan = (ops, lockfile, name, description, makeRunClosure) => ({
56
+ _tag: "Plan",
57
+ name,
58
+ description,
59
+ jobs: [
60
+ {
61
+ concurrency: "unbounded",
62
+ steps: ops.map((op) => {
63
+ if (op.name === "uninstall-skill") {
64
+ return {
65
+ readiness: "ready",
66
+ label: `${op.args.skillName} (renamed)`,
67
+ run: makeRunClosure(op),
68
+ };
69
+ }
70
+ // install-skill
71
+ const entry = lockfile.skills[op.args.ref.skill.name];
72
+ const needsUpdate = !entry || op.args.force || hasChanged(op, entry);
73
+ if (!needsUpdate) {
74
+ return {
75
+ readiness: "ready",
76
+ label: op.args.ref.skill.name,
77
+ run: Effect.succeed({
78
+ result: "success",
79
+ message: "already up to date",
80
+ }),
81
+ };
82
+ }
83
+ return {
84
+ readiness: "ready",
85
+ label: op.args.ref.skill.name,
86
+ run: makeRunClosure(op),
87
+ };
88
+ }),
89
+ },
90
+ ],
91
+ });
92
+ //# sourceMappingURL=plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../../src/root/skills/update/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAmBxC,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,EAAyB,EAAE,KAAqB,EAAW,EAAE;IAC/E,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC;IAExB,IAAI,GAAG,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC;QAE9B,qDAAq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,WAAW,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,UAAU,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;gBAErE,IAAI,CAAC,WAAW,EAAE,CAAC;oBACjB,OAAO;wBACL,SAAS,EAAE,OAAO;wBAClB,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI;wBAC7B,GAAG,EAAE,MAAM,CAAC,OAAO,CAAgB;4BACjC,MAAM,EAAE,SAAS;4BACjB,OAAO,EAAE,oBAAoB;yBAC9B,CAAC;qBACH,CAAC;gBACJ,CAAC;gBAED,OAAO;oBACL,SAAS,EAAE,OAAO;oBAClB,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI;oBAC7B,GAAG,EAAE,cAAc,CAAC,EAAE,CAAC;iBACxB,CAAC;YACJ,CAAC,CAAC;SACH;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "effect/unstable/cli";
2
+ export declare const subagentsCommand: Command.Command<"subagents", {}, {}, 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">;
3
+ //# sourceMappingURL=_subagents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_subagents.d.ts","sourceRoot":"","sources":["../../../../src/root/subagents/_subagents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAY9C,eAAO,MAAM,gBAAgB,wRAuB5B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { Command } from "effect/unstable/cli";
2
+ import { installCommand } from "./install/command.js";
3
+ import { uninstallCommand } from "./uninstall/command.js";
4
+ import { listCommand } from "./list/command.js";
5
+ import { updateCommand } from "./update/command.js";
6
+ import { newCommand } from "./new/command.js";
7
+ import { publishCommand } from "./publish/command.js";
8
+ import { enableCommand } from "./enable/command.js";
9
+ import { disableCommand } from "./disable/command.js";
10
+ import { renameCommand } from "./rename/command.js";
11
+ export const subagentsCommand = Command.make("subagents").pipe(Command.withDescription("Install, update, and manage subagents"), Command.withExamples([
12
+ {
13
+ command: "axm subagents install @acme/subagents/researcher",
14
+ description: "Add a subagent from the registry",
15
+ },
16
+ {
17
+ command: "axm subagents list",
18
+ description: "See what subagents are installed",
19
+ },
20
+ ]), Command.withSubcommands([
21
+ installCommand,
22
+ uninstallCommand,
23
+ listCommand,
24
+ updateCommand,
25
+ newCommand,
26
+ publishCommand,
27
+ enableCommand,
28
+ disableCommand,
29
+ renameCommand,
30
+ ]));
31
+ //# sourceMappingURL=_subagents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_subagents.js","sourceRoot":"","sources":["../../../../src/root/subagents/_subagents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAC5D,OAAO,CAAC,eAAe,CAAC,uCAAuC,CAAC,EAChE,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,kDAAkD;QAC3D,WAAW,EAAE,kCAAkC;KAChD;IACD;QACE,OAAO,EAAE,oBAAoB;QAC7B,WAAW,EAAE,kCAAkC;KAChD;CACF,CAAC,EACF,OAAO,CAAC,eAAe,CAAC;IACtB,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,UAAU;IACV,cAAc;IACd,aAAa;IACb,cAAc;IACd,aAAa;CACd,CAAC,CACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "effect/unstable/cli";
2
+ export declare const disableCommand: Command.Command<"disable", 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">;
3
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/disable/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAiB9D,eAAO,MAAM,cAAc,2SAqB1B,CAAC"}