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,46 @@
1
+ import { Argument, Command, Flag } from "effect/unstable/cli";
2
+ import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
3
+ import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
4
+ import { scopeFlag } from "../../../cli-flags.js";
5
+ import { handleInstall } from "./handler.js";
6
+ import { withRuntime, withWorkspace } from "../../../runtime.js";
7
+ const installConfig = {
8
+ source: Argument.string("source").pipe(Argument.withDescription("Registry reference (@owner/subagents/name), GitHub shorthand (owner/repo), local path, or URL"), Argument.optional),
9
+ scope: scopeFlag.pipe(Flag.withDescription("Install to project (default) or user-level configuration")),
10
+ subagent: Flag.string("subagent").pipe(Flag.withDescription("Cherry-pick specific subagent(s) from a multi-subagent source"), Flag.atLeast(0)),
11
+ all: Flag.boolean("all").pipe(Flag.withDescription("Install every subagent found in the source without prompting")),
12
+ yes: yesFlag.pipe(Flag.withDescription("Skip confirmation after reviewing the install plan")),
13
+ force: forceFlag.pipe(Flag.withDescription("Reinstall even if the subagent already exists")),
14
+ preview: previewFlag.pipe(Flag.withDescription("Show what would be installed without making changes")),
15
+ };
16
+ export const installCommand = Command.make("install", installConfig, ({ source, scope, subagent, all, yes, force, preview }) => handleInstall({ source, subagents: subagent, all }, { yes, force, preview }).pipe(withWorkspace(scope), withRuntime("subagents install"))).pipe(withArgvTracking(installConfig), Command.withDescription("Install configured subagents, or install subagents from a registry, GitHub, or local path"), Command.withExamples([
17
+ {
18
+ command: "axm subagents install",
19
+ description: "Install all configured subagents",
20
+ },
21
+ {
22
+ command: "axm subagents install @acme/subagents/researcher",
23
+ description: "Add a researcher subagent to your agents",
24
+ },
25
+ {
26
+ command: "axm subagents install @acme/subagents/researcher@^1.0.0",
27
+ description: "Pin to a specific version range",
28
+ },
29
+ {
30
+ command: "axm subagents install owner/repo",
31
+ description: "Install from a GitHub repository",
32
+ },
33
+ {
34
+ command: "axm subagents install ./path/to/subagents",
35
+ description: "Install from a local directory during development",
36
+ },
37
+ {
38
+ command: "axm subagents install owner/repo --all --yes",
39
+ description: "CI: install all subagents without prompts",
40
+ },
41
+ {
42
+ command: "axm subagents install @acme/subagents/researcher --preview",
43
+ description: "See what would be installed before committing",
44
+ },
45
+ ]));
46
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../src/root/subagents/install/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,q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AQ,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CACxD,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CAC/E,aAAa,CAAC,KAAK,CAAC,EACpB,WAAW,CAAC,mBAAmB,CAAC,CACjC,CACJ,CAAC,IAAI,CACJ,gBAAgB,CAAC,aAAa,CAAC,EAC/B,OAAO,CAAC,eAAe,CACrB,2FAA2F,CAC5F,EACD,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,uBAAuB;QAChC,WAAW,EAAE,kCAAkC;KAChD;IACD;QACE,OAAO,EAAE,kDAAkD;QAC3D,WAAW,EAAE,0CAA0C;KACxD;IACD;QACE,OAAO,EAAE,yDAAyD;QAClE,WAAW,EAAE,iCAAiC;KAC/C;IACD;QACE,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EAAE,kCAAkC;KAChD;IACD;QACE,OAAO,EAAE,2CAA2C;QACpD,WAAW,EAAE,mDAAmD;KACjE;IACD;QACE,OAAO,EAAE,8CAA8C;QACvD,WAAW,EAAE,2CAA2C;KACzD;IACD;QACE,OAAO,EAAE,4DAA4D;QACrE,WAAW,EAAE,+CAA+C;KAC7D;CACF,CAAC,CACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { InstallSubagentCommandWorkflowActions } from "./command-actions.js";
4
+ export interface InstallSubagentHandlerArgs {
5
+ readonly source: Option.Option<string>;
6
+ readonly subagents: readonly string[];
7
+ readonly all: boolean;
8
+ }
9
+ export interface InstallSubagentFlags {
10
+ readonly yes: boolean;
11
+ readonly force: boolean;
12
+ readonly preview: boolean;
13
+ }
14
+ export declare const handleInstall: (args: InstallSubagentHandlerArgs, flags: InstallSubagentFlags) => Effect.Effect<void, import("@agentxm/client-core/unstable/app-error").AppError | import("packages/core/src/unstable/cli-prompt/prompt-cancelled.ts").PromptCancelled, import("packages/core/src/unstable/cli-renderer/cli-renderer.ts").CliRenderer | import("packages/core/src/unstable/cli-flags/verbosity.ts").Verbosity | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | (import("effect/Scope").Scope | import("effect/FileSystem").FileSystem | import("effect/Path").Path | import("packages/core/src/unstable/workspace/service-interface.ts").Workspace | import("packages/core/src/unstable/source-resolution/service.ts").SourceHostProviders | import("../../commands/install/command-actions.ts").InstallCommandCommandWorkflowActions | import("../../mcp-servers/install/command-actions.ts").InstallMcpServerCommandWorkflowActions | import("../../packs/install/command-actions.ts").InstallPackCommandWorkflowActions | import("../../skills/install/command-actions.ts").InstallSkillCommandWorkflowActions | InstallSubagentCommandWorkflowActions)>;
15
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/install/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,qCAAqC,EAAE,MAAM,sBAAsB,CAAC;AAE7E,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAuBD,eAAO,MAAM,aAAa,GAAI,MAAM,0BAA0B,EAAE,OAAO,oBAAoB,shCAoBvF,CAAC"}
@@ -0,0 +1,39 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
4
+ import { runInstallCommandWorkflow } from "@agentxm/client-core/unstable/workflows";
5
+ import { emitPlanResolutionResult } from "../../../json-output.js";
6
+ import { handleWorkspaceInstall } from "../../install/workspace-install-handler.js";
7
+ import { InstallSubagentCommandWorkflowActions } from "./command-actions.js";
8
+ const validateWorkspaceInstallArgs = (args) => Effect.gen(function* () {
9
+ if (args.all) {
10
+ return yield* makeAppError({
11
+ code: "SUBAGENTS_INSTALL_ALL_REQUIRES_SOURCE",
12
+ what: "The --all flag requires a source for subagents install",
13
+ howToFix: "Run `axm subagents install <source> --all` or omit --all to install all configured subagents.",
14
+ });
15
+ }
16
+ if (args.subagents.length > 0) {
17
+ return yield* makeAppError({
18
+ code: "SUBAGENTS_INSTALL_SELECTOR_REQUIRES_SOURCE",
19
+ what: "The --subagent flag requires a source for subagents install",
20
+ howToFix: "Run `axm subagents install <source> --subagent <name>` or omit --subagent to install all configured subagents.",
21
+ });
22
+ }
23
+ });
24
+ export const handleInstall = (args, flags) => Effect.gen(function* () {
25
+ if (Option.isNone(args.source)) {
26
+ yield* validateWorkspaceInstallArgs(args);
27
+ return yield* handleWorkspaceInstall({
28
+ command: "subagents.install",
29
+ type: Option.some("subagent"),
30
+ planName: "Install subagent(s)",
31
+ planDescription: Option.some("Install configured subagents"),
32
+ flags,
33
+ });
34
+ }
35
+ const actions = yield* InstallSubagentCommandWorkflowActions;
36
+ const resolution = yield* runInstallCommandWorkflow({ source: args.source.value, subagents: args.subagents, all: args.all }, actions, flags);
37
+ yield* emitPlanResolutionResult("subagents.install", resolution);
38
+ });
39
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../../src/root/subagents/install/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CA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AE,qBAAqB;YAC/B,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC;YAC5D,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,qCAAqC,CAAC;IAC7D,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,yBAAyB,CACjD,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,EACvE,OAAO,EACP,KAAK,CACN,CAAC;IACF,KAAK,CAAC,CAAC,wBAAwB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;AACnE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Intent type for the subagent install command workflow.
3
+ *
4
+ * @experimental This API is unstable and may change without notice.
5
+ */
6
+ import type * as Option from "effect/Option";
7
+ import type { SubagentExtensionRef } from "@agentxm/client-core/unstable/subagents";
8
+ import type { VersionConstraint } from "@agentxm/client-core/unstable/version-constraints";
9
+ /**
10
+ * Describes the resolved intent to install one or more subagents.
11
+ *
12
+ * Produced by `finalizeIntent` after source resolution,
13
+ * discovery, and selection. Consumed by `buildPlan`.
14
+ */
15
+ export type InstallSubagentCommandIntent = {
16
+ readonly subagentsToInstall: ReadonlyArray<{
17
+ readonly ref: SubagentExtensionRef;
18
+ readonly versionConstraint: Option.Option<VersionConstraint>;
19
+ }>;
20
+ };
21
+ //# sourceMappingURL=intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/install/intent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,kBAAkB,EAAE,aAAa,CAAC;QACzC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAC;QACnC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;KAC9D,CAAC,CAAC;CACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Intent type for the subagent install command workflow.
3
+ *
4
+ * @experimental This API is unstable and may change without notice.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=intent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent.js","sourceRoot":"","sources":["../../../../../src/root/subagents/install/intent.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Subagents-specific plan builder.
3
+ *
4
+ * Builds install operations from selected subagent refs and diffs them against
5
+ * current lockfile state to produce a Plan with inline run closures.
6
+ *
7
+ * @experimental This API is unstable and may change without notice.
8
+ */
9
+ import * as FileSystem from "effect/FileSystem";
10
+ import * as Path from "effect/Path";
11
+ import * as Effect from "effect/Effect";
12
+ import * as Option from "effect/Option";
13
+ import type { PlannedJobStep } from "@agentxm/client-core/unstable/workspace";
14
+ import type { VersionConstraint } from "@agentxm/client-core/unstable/version-constraints";
15
+ import type { SubagentExtensionRef } from "@agentxm/client-core/unstable/subagents";
16
+ import type { Source } from "@agentxm/client-core/unstable/sources";
17
+ import { SourceHostProviders } from "@agentxm/client-core/unstable/source-resolution";
18
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
19
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
20
+ import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
21
+ import { SubagentManager } from "@agentxm/client-core/unstable/subagents";
22
+ /**
23
+ * Args for building a subagent install plan.
24
+ */
25
+ export interface BuildSubagentInstallPlanArgs {
26
+ readonly selectedSubagents: ReadonlyArray<SubagentExtensionRef>;
27
+ readonly source: Source;
28
+ readonly force: boolean;
29
+ readonly versionConstraint: Option.Option<VersionConstraint>;
30
+ }
31
+ /**
32
+ * Build a plan by computing install operations and comparing against lockfile state.
33
+ * Captures all service dependencies into step run closures.
34
+ */
35
+ export declare const buildSubagentInstallPlan: ({ selectedSubagents, source, force, versionConstraint, }: BuildSubagentInstallPlanArgs) => Effect.Effect<{
36
+ _tag: "Plan";
37
+ name: string;
38
+ description: Option.Option<string>;
39
+ jobs: {
40
+ concurrency: 1;
41
+ steps: PlannedJobStep[];
42
+ }[];
43
+ }, import("packages/core/src/unstable/app-error/app-error.ts").AppError, CliRenderer | FileSystem.FileSystem | Path.Path | Workspace | CodingAgentRepository | SourceHostProviders | SubagentManager>;
44
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/install/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAQ,cAAc,EAAiB,MAAM,yCAAyC,CAAC;AACnG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAChE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;CAC9D;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,0DAKtC,4BAA4B;;;;;;;;qMA4E3B,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Subagents-specific plan builder.
3
+ *
4
+ * Builds install operations from selected subagent refs and diffs them against
5
+ * current lockfile state to produce a Plan with inline run closures.
6
+ *
7
+ * @experimental This API is unstable and may change without notice.
8
+ */
9
+ import * as FileSystem from "effect/FileSystem";
10
+ import * as Path from "effect/Path";
11
+ import * as Effect from "effect/Effect";
12
+ import * as Option from "effect/Option";
13
+ import { SourceHostProviders } from "@agentxm/client-core/unstable/source-resolution";
14
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
15
+ import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
16
+ import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
17
+ import { SubagentManager } from "@agentxm/client-core/unstable/subagents";
18
+ /**
19
+ * Build a plan by computing install operations and comparing against lockfile state.
20
+ * Captures all service dependencies into step run closures.
21
+ */
22
+ export const buildSubagentInstallPlan = ({ selectedSubagents, source, force, versionConstraint, }) => Effect.gen(function* () {
23
+ const workspace = yield* Workspace;
24
+ const sources = yield* SourceHostProviders;
25
+ const fs = yield* FileSystem.FileSystem;
26
+ const path = yield* Path.Path;
27
+ const renderer = yield* CliRenderer;
28
+ const agentRepo = yield* CodingAgentRepository;
29
+ const subagentMgr = yield* SubagentManager;
30
+ const lockedSubagents = yield* workspace.getLockedSubagents().pipe(Effect.catch((error) => {
31
+ if (error.code === "LOCKFILE_PARSE_FAILED" ||
32
+ error.code === "LOCKFILE_RESOLVED_VERSION_INVALID") {
33
+ return Effect.succeed({});
34
+ }
35
+ return Effect.fail(error);
36
+ }));
37
+ const steps = selectedSubagents.map((ref) => {
38
+ const installed = Object.hasOwn(lockedSubagents, ref.subagent.name);
39
+ if (installed && !force) {
40
+ return {
41
+ readiness: "ready",
42
+ label: ref.subagent.name,
43
+ run: Effect.succeed({
44
+ result: "success",
45
+ message: `${ref.subagent.name} already installed`,
46
+ }),
47
+ };
48
+ }
49
+ const runEffect = subagentMgr.materializeInstall({ ref }).pipe(Effect.flatMap(() => subagentMgr.upsertLockfileEntry({ ref })), Effect.flatMap(() => subagentMgr.upsertSettingsEntry({
50
+ ref,
51
+ versionConstraint: ref.refType === "registry" ? versionConstraint : Option.none(),
52
+ })), Effect.map(() => ({
53
+ result: "success",
54
+ message: "Applied install operation",
55
+ })), Effect.provideService(Workspace, workspace), Effect.provideService(SourceHostProviders, sources), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path), Effect.provideService(CliRenderer, renderer), Effect.provideService(CodingAgentRepository, agentRepo));
56
+ return {
57
+ readiness: "ready",
58
+ label: ref.subagent.name,
59
+ run: runEffect,
60
+ };
61
+ });
62
+ return {
63
+ _tag: "Plan",
64
+ name: "Install subagent(s)",
65
+ description: Option.some(`Install subagents from ${sources.origin(source)}`),
66
+ jobs: [
67
+ {
68
+ concurrency: 1,
69
+ steps,
70
+ },
71
+ ],
72
+ };
73
+ });
74
+ //# sourceMappingURL=plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../../src/root/subagents/install/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAA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Ac,CAAC,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,EAChD,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EACtC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,CAAC,EAC5C,MAAM,CAAC,cAAc,CAAC,qBAAqB,EAAE,SAAS,CAAC,CACxD,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI;YACxB,GAAG,EAAE,SAAS;SACU,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,0BAA0B,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5E,IAAI,EAAE;YACJ;gBACE,WAAW,EAAE,CAAU;gBACvB,KAAK;aACN;SACF;KACa,CAAC;AACnB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { type AppError } from "@agentxm/client-core/unstable/app-error";
4
+ import type { InputParseResult } from "@agentxm/client-core/unstable/sources";
5
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
6
+ export type RegistryLookupProbe = {
7
+ readonly location: string;
8
+ readonly outcome: "matched" | "not-found" | "error";
9
+ readonly reason: Option.Option<string>;
10
+ };
11
+ type ResolveSubagentInstallSourceOptions = {
12
+ readonly onRegistryProbe: (probe: RegistryLookupProbe) => void;
13
+ };
14
+ export declare const resolveSubagentUrl: (url: URL, input: string) => Effect.Effect<import("@agentxm/client-core/unstable/sources").Source, AppError, Workspace>;
15
+ export declare const resolveSubagentInstallSource: (parseResult: InputParseResult, options?: ResolveSubagentInstallSourceOptions) => Effect.Effect<import("@agentxm/client-core/unstable/sources").Source, AppError, import("effect/FileSystem").FileSystem | import("effect/Path").Path | Workspace>;
16
+ export {};
17
+ //# sourceMappingURL=resolve-subagent-install-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-subagent-install-source.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/install/resolve-subagent-install-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAOtF,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,uCAAuC,CAAC;AAM/C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,QAAQ,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAChE,CAAC;AAqTF,eAAO,MAAM,kBAAkB,GAAI,KAAK,GAAG,EAAE,OAAO,MAAM,+FAA8B,CAAC;AAEzF,eAAO,MAAM,4BAA4B,GACvC,aAAa,gBAAgB,EAC7B,UAAU,mCAAmC,qKAwC3C,CAAC"}
@@ -0,0 +1,265 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Option from "effect/Option";
3
+ import { makeAppError } from "@agentxm/client-core/unstable/app-error";
4
+ import { decodeExtensionNameSync, } from "@agentxm/client-core/unstable/extensions";
5
+ import { createRegistryClient } from "@agentxm/client-core/unstable/registry";
6
+ import { resolveShorthandInputSource, resolveSlashInputSource, routeUrlInput, } from "@agentxm/client-core/unstable/source-resolution";
7
+ import { Workspace } from "@agentxm/client-core/unstable/workspace";
8
+ const isAppError = (error) => typeof error === "object" &&
9
+ error !== null &&
10
+ "_tag" in error &&
11
+ error._tag === "AppError" &&
12
+ "what" in error &&
13
+ "code" in error;
14
+ const summarizeLookupError = (error) => {
15
+ if (isAppError(error)) {
16
+ return `${error.what} (${error.code})`;
17
+ }
18
+ if (error instanceof Error) {
19
+ return error.message;
20
+ }
21
+ return String(error);
22
+ };
23
+ const toLookupIssue = (location, error) => ({
24
+ location: location.href,
25
+ message: summarizeLookupError(error),
26
+ code: isAppError(error) ? Option.some(error.code) : Option.none(),
27
+ });
28
+ const hasRemoteNotSupportedIssue = (issues) => issues.some((issue) => Option.isSome(issue.code) &&
29
+ (issue.code.value === "REGISTRY_REMOTE_NOT_SUPPORTED" ||
30
+ (issue.code.value.startsWith("REGISTRY_REMOTE_") &&
31
+ issue.code.value.endsWith("_NOT_IMPLEMENTED"))));
32
+ const registryLookupHowToFix = ({ issues, fallback, }) => hasRemoteNotSupportedIssue(issues)
33
+ ? "Remote registry discovery is not yet supported for HTTP(S) sources. Use a file:// registry source, or install from github:owner/repo."
34
+ : fallback;
35
+ const checkRegistryMatch = ({ client, owner, subagentName, }) => Option.match(subagentName, {
36
+ onNone: () => client.ownerExists(owner),
37
+ onSome: (name) => client.extensionExists({ owner, type: "subagent", name }),
38
+ });
39
+ const resolveRegistrySource = (owner, input, options) => Effect.gen(function* () {
40
+ const ws = yield* Workspace;
41
+ const registrySources = yield* ws.getRegistrySourceHosts().pipe(Effect.mapError((e) => makeAppError({
42
+ code: "REGISTRY_CONFIG_READ_FAILED",
43
+ what: `Failed to read configured registry sources for owner "${owner}"`,
44
+ details: [input],
45
+ howToFix: "Check that your workspace settings file is valid and accessible",
46
+ cause: e,
47
+ })));
48
+ if (registrySources.length === 0) {
49
+ return yield* makeAppError({
50
+ code: "REGISTRY_NO_SOURCE_CONFIGURED",
51
+ what: `No registry source is configured for owner "${owner}"`,
52
+ details: [`Provided: ${input}`],
53
+ howToFix: `Add a registry source for owner "${owner}" using "axm sources add"`,
54
+ });
55
+ }
56
+ const checked = [];
57
+ const issues = [];
58
+ // Sequential for...of + yield* with early return: first-match semantics.
59
+ for (const regConfig of registrySources) {
60
+ checked.push(regConfig.location.href);
61
+ const client = yield* createRegistryClient(regConfig.location.href);
62
+ const matchResult = yield* checkRegistryMatch({
63
+ client,
64
+ owner,
65
+ subagentName: options.subagentName,
66
+ }).pipe(Effect.result);
67
+ if (matchResult._tag === "Failure") {
68
+ if (Option.isSome(options.resolutionOptions)) {
69
+ options.resolutionOptions.value.onRegistryProbe({
70
+ location: regConfig.location.href,
71
+ outcome: "error",
72
+ reason: Option.some(summarizeLookupError(matchResult.failure)),
73
+ });
74
+ }
75
+ issues.push(toLookupIssue(regConfig.location, matchResult.failure));
76
+ continue;
77
+ }
78
+ if (matchResult.success.exists) {
79
+ if (Option.isSome(options.resolutionOptions)) {
80
+ options.resolutionOptions.value.onRegistryProbe({
81
+ location: regConfig.location.href,
82
+ outcome: "matched",
83
+ reason: Option.none(),
84
+ });
85
+ }
86
+ return {
87
+ type: "registry",
88
+ location: regConfig.location,
89
+ owner: Option.some(owner),
90
+ };
91
+ }
92
+ if (Option.isSome(options.resolutionOptions)) {
93
+ options.resolutionOptions.value.onRegistryProbe({
94
+ location: regConfig.location.href,
95
+ outcome: "not-found",
96
+ reason: Option.none(),
97
+ });
98
+ }
99
+ }
100
+ if (Option.isSome(options.subagentName)) {
101
+ const subagentName = options.subagentName.value;
102
+ return yield* makeAppError({
103
+ code: "REGISTRY_SUBAGENT_NOT_FOUND",
104
+ what: `Subagent "${owner}/${subagentName}" was not found in configured registries`,
105
+ details: [
106
+ `Provided: ${input}`,
107
+ `Checked registries: ${checked.join(", ")}`,
108
+ ...issues.map((issue) => `Lookup failed at ${issue.location}: ${issue.message}`),
109
+ ],
110
+ howToFix: registryLookupHowToFix({
111
+ issues,
112
+ fallback: "Verify the owner/subagent name, or install with an explicit source like github:owner/repo",
113
+ }),
114
+ });
115
+ }
116
+ return yield* makeAppError({
117
+ code: "REGISTRY_NAMESPACE_NOT_FOUND",
118
+ what: `None of the configured registry sources contain owner "${owner}"`,
119
+ details: [
120
+ `Provided: ${input}`,
121
+ `Checked registries: ${checked.join(", ")}`,
122
+ ...issues.map((issue) => `Lookup failed at ${issue.location}: ${issue.message}`),
123
+ ],
124
+ howToFix: registryLookupHowToFix({
125
+ issues,
126
+ fallback: `Verify the owner name is correct, or add a registry that hosts "${owner}"`,
127
+ }),
128
+ });
129
+ });
130
+ const resolveSubagentRegistrySourceByName = (name, input, resolutionOptions) => Effect.gen(function* () {
131
+ const extensionName = yield* Effect.try({
132
+ try: () => decodeExtensionNameSync(name),
133
+ catch: () => makeAppError({
134
+ code: "INVALID_SOURCE",
135
+ what: `Invalid subagent name: "${name}"`,
136
+ details: [`Provided: ${input}`],
137
+ howToFix: "Use lowercase letters, numbers, and hyphens only, with a maximum length of 64 characters.",
138
+ }),
139
+ });
140
+ const ws = yield* Workspace;
141
+ const maybeProfile = yield* ws.getDefaultProfile();
142
+ if (Option.isNone(maybeProfile)) {
143
+ return yield* makeAppError({
144
+ code: "REGISTRY_SUBAGENT_NOT_FOUND",
145
+ what: `Subagent "${extensionName}" could not be looked up (no default owner)`,
146
+ details: [`Provided: ${input}`, `No default owner configured and not logged in`],
147
+ howToFix: "Configure an owner in settings.json, log in with `axm auth login`, or install with an explicit source like github:owner/repo or @owner/subagents/name",
148
+ });
149
+ }
150
+ const owner = maybeProfile.value;
151
+ const registryHosts = yield* ws.getRegistrySourceHosts();
152
+ if (registryHosts.length === 0) {
153
+ return yield* makeAppError({
154
+ code: "REGISTRY_SUBAGENT_NOT_FOUND",
155
+ what: `Subagent "${owner}/${extensionName}" could not be looked up (no registry sources)`,
156
+ details: [
157
+ `Provided: ${input}`,
158
+ `Default owner: ${owner}`,
159
+ `No registry sources configured`,
160
+ ],
161
+ howToFix: "Configure a registry source in settings.json, or install with an explicit source like github:owner/repo",
162
+ });
163
+ }
164
+ const checked = [];
165
+ const issues = [];
166
+ for (const reg of registryHosts) {
167
+ checked.push(reg.location.href);
168
+ const client = yield* createRegistryClient(reg.location.href);
169
+ const existsResult = yield* client
170
+ .extensionExists({ owner, type: "subagent", name: extensionName })
171
+ .pipe(Effect.result);
172
+ if (existsResult._tag === "Failure") {
173
+ if (Option.isSome(resolutionOptions)) {
174
+ resolutionOptions.value.onRegistryProbe({
175
+ location: reg.location.href,
176
+ outcome: "error",
177
+ reason: Option.some(summarizeLookupError(existsResult.failure)),
178
+ });
179
+ }
180
+ issues.push(toLookupIssue(reg.location, existsResult.failure));
181
+ continue;
182
+ }
183
+ if (existsResult.success.exists) {
184
+ if (Option.isSome(resolutionOptions)) {
185
+ resolutionOptions.value.onRegistryProbe({
186
+ location: reg.location.href,
187
+ outcome: "matched",
188
+ reason: Option.none(),
189
+ });
190
+ }
191
+ return {
192
+ type: "registry",
193
+ location: reg.location,
194
+ owner: Option.some(owner),
195
+ };
196
+ }
197
+ if (Option.isSome(resolutionOptions)) {
198
+ resolutionOptions.value.onRegistryProbe({
199
+ location: reg.location.href,
200
+ outcome: "not-found",
201
+ reason: Option.none(),
202
+ });
203
+ }
204
+ }
205
+ return yield* makeAppError({
206
+ code: "REGISTRY_SUBAGENT_NOT_FOUND",
207
+ what: `Subagent "${owner}/${extensionName}" was not found in configured registries`,
208
+ details: [
209
+ `Provided: ${input}`,
210
+ `Default owner: ${owner}`,
211
+ `Checked registries: ${checked.join(", ")}`,
212
+ ...issues.map((issue) => `Lookup failed at ${issue.location}: ${issue.message}`),
213
+ ],
214
+ howToFix: registryLookupHowToFix({
215
+ issues,
216
+ fallback: "Verify the subagent name, or install with an explicit source like github:owner/repo or @owner/subagents/name",
217
+ }),
218
+ });
219
+ });
220
+ const resolveSubagentRegistrySource = (pattern, input, resolutionOptions) => Effect.gen(function* () {
221
+ if (Option.isSome(pattern.type) && pattern.type.value !== "subagents") {
222
+ return yield* makeAppError({
223
+ code: "SUBAGENT_INSTALL_WRONG_TYPE",
224
+ what: `Cannot install "${pattern.type.value}" extensions with "subagents install"`,
225
+ details: [pattern.owner],
226
+ howToFix: `Use the "${pattern.type.value}" command instead, or remove the type qualifier to install as a subagent`,
227
+ });
228
+ }
229
+ return yield* resolveRegistrySource(pattern.owner, input, {
230
+ subagentName: pattern.name,
231
+ resolutionOptions,
232
+ });
233
+ });
234
+ export const resolveSubagentUrl = (url, input) => routeUrlInput(url, input);
235
+ export const resolveSubagentInstallSource = (parseResult, options) => Effect.gen(function* () {
236
+ const resolutionOptions = Option.fromUndefinedOr(options);
237
+ const pattern = parseResult.pattern;
238
+ switch (pattern.pattern) {
239
+ case "registry-pattern-input":
240
+ return yield* resolveSubagentRegistrySource(pattern, parseResult.originalInput, resolutionOptions);
241
+ case "shorthand-input":
242
+ return yield* resolveShorthandInputSource({
243
+ pattern,
244
+ originalInput: parseResult.originalInput,
245
+ });
246
+ case "slash-pattern":
247
+ return yield* resolveSlashInputSource(pattern, parseResult.originalInput);
248
+ case "name-input":
249
+ return yield* resolveSubagentRegistrySourceByName(pattern.name, parseResult.originalInput, resolutionOptions);
250
+ case "url-input":
251
+ return yield* resolveSubagentUrl(pattern.url, parseResult.originalInput);
252
+ case "file-path-pattern":
253
+ return { type: "local", path: pattern.path };
254
+ // Unsupported:
255
+ case "git-scp-address":
256
+ case "glob-input":
257
+ return yield* makeAppError({
258
+ code: "SUBAGENT_INSTALL_UNSUPPORTED_INPUT",
259
+ what: `Input pattern "${pattern.pattern}" is not supported for subagent installation`,
260
+ details: [parseResult.originalInput],
261
+ howToFix: "Use a registry reference (e.g., @owner/subagents/name), a URL, or a shorthand (owner/repo) instead",
262
+ });
263
+ }
264
+ });
265
+ //# sourceMappingURL=resolve-subagent-install-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-subagent-install-source.js","sourceRoot":"","sources":["../../../../../src/root/subagents/install/resolve-subagent-install-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAA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