axm.sh 0.5.0 → 0.5.2

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 (320) hide show
  1. package/README.md +7 -8
  2. package/dist/src/__generated__/help-topics.d.ts +1 -1
  3. package/dist/src/__generated__/help-topics.d.ts.map +1 -1
  4. package/dist/src/__generated__/help-topics.js +13 -4
  5. package/dist/src/__generated__/help-topics.js.map +1 -1
  6. package/dist/src/app.js +1 -1
  7. package/dist/src/app.js.map +1 -1
  8. package/dist/src/formatter.d.ts.map +1 -1
  9. package/dist/src/formatter.js +0 -5
  10. package/dist/src/formatter.js.map +1 -1
  11. package/dist/src/json-output.d.ts +6 -2
  12. package/dist/src/json-output.d.ts.map +1 -1
  13. package/dist/src/json-output.js +5 -5
  14. package/dist/src/json-output.js.map +1 -1
  15. package/dist/src/root/auth/login.d.ts.map +1 -1
  16. package/dist/src/root/auth/login.js +2 -6
  17. package/dist/src/root/auth/login.js.map +1 -1
  18. package/dist/src/root/auth/logout.d.ts.map +1 -1
  19. package/dist/src/root/auth/logout.js +2 -2
  20. package/dist/src/root/auth/logout.js.map +1 -1
  21. package/dist/src/root/auth/token.d.ts.map +1 -1
  22. package/dist/src/root/auth/token.js +3 -7
  23. package/dist/src/root/auth/token.js.map +1 -1
  24. package/dist/src/root/auth/whoami.d.ts.map +1 -1
  25. package/dist/src/root/auth/whoami.js +3 -7
  26. package/dist/src/root/auth/whoami.js.map +1 -1
  27. package/dist/src/root/commands/disable.d.ts +1 -2
  28. package/dist/src/root/commands/disable.d.ts.map +1 -1
  29. package/dist/src/root/commands/disable.js +19 -13
  30. package/dist/src/root/commands/disable.js.map +1 -1
  31. package/dist/src/root/commands/enable.d.ts +1 -2
  32. package/dist/src/root/commands/enable.d.ts.map +1 -1
  33. package/dist/src/root/commands/enable.js +19 -13
  34. package/dist/src/root/commands/enable.js.map +1 -1
  35. package/dist/src/root/commands/install/command-actions.d.ts +4 -4
  36. package/dist/src/root/commands/install/command-actions.d.ts.map +1 -1
  37. package/dist/src/root/commands/install/command-actions.js +109 -49
  38. package/dist/src/root/commands/install/command-actions.js.map +1 -1
  39. package/dist/src/root/commands/install/intent.d.ts +2 -2
  40. package/dist/src/root/commands/install/intent.d.ts.map +1 -1
  41. package/dist/src/root/commands/list.d.ts.map +1 -1
  42. package/dist/src/root/commands/list.js +8 -13
  43. package/dist/src/root/commands/list.js.map +1 -1
  44. package/dist/src/root/commands/new.d.ts +3 -1
  45. package/dist/src/root/commands/new.d.ts.map +1 -1
  46. package/dist/src/root/commands/new.js +36 -14
  47. package/dist/src/root/commands/new.js.map +1 -1
  48. package/dist/src/root/commands/publish.d.ts.map +1 -1
  49. package/dist/src/root/commands/publish.js +59 -38
  50. package/dist/src/root/commands/publish.js.map +1 -1
  51. package/dist/src/root/commands/uninstall/command-actions.d.ts +1 -1
  52. package/dist/src/root/commands/uninstall/command-actions.d.ts.map +1 -1
  53. package/dist/src/root/commands/uninstall/command-actions.js +17 -6
  54. package/dist/src/root/commands/uninstall/command-actions.js.map +1 -1
  55. package/dist/src/root/commands/update.d.ts.map +1 -1
  56. package/dist/src/root/commands/update.js +15 -7
  57. package/dist/src/root/commands/update.js.map +1 -1
  58. package/dist/src/root/discover/command.js +1 -1
  59. package/dist/src/root/discover/command.js.map +1 -1
  60. package/dist/src/root/discover/handler.d.ts +0 -3
  61. package/dist/src/root/discover/handler.d.ts.map +1 -1
  62. package/dist/src/root/discover/handler.js +2 -3
  63. package/dist/src/root/discover/handler.js.map +1 -1
  64. package/dist/src/root/help/command.d.ts.map +1 -1
  65. package/dist/src/root/help/command.js +54 -25
  66. package/dist/src/root/help/command.js.map +1 -1
  67. package/dist/src/root/install/resolve-root-install-intent.d.ts.map +1 -1
  68. package/dist/src/root/install/resolve-root-install-intent.js +27 -17
  69. package/dist/src/root/install/resolve-root-install-intent.js.map +1 -1
  70. package/dist/src/root/install/workspace-install.js +10 -10
  71. package/dist/src/root/install/workspace-install.js.map +1 -1
  72. package/dist/src/root/lint/handler.d.ts +2 -2
  73. package/dist/src/root/lint/handler.d.ts.map +1 -1
  74. package/dist/src/root/lint/handler.js +13 -13
  75. package/dist/src/root/lint/handler.js.map +1 -1
  76. package/dist/src/root/mcp-servers/_mcp-servers.d.ts.map +1 -1
  77. package/dist/src/root/mcp-servers/_mcp-servers.js +6 -1
  78. package/dist/src/root/mcp-servers/_mcp-servers.js.map +1 -1
  79. package/dist/src/root/mcp-servers/install/command-actions.d.ts +3 -3
  80. package/dist/src/root/mcp-servers/install/command-actions.d.ts.map +1 -1
  81. package/dist/src/root/mcp-servers/install/command-actions.js +73 -40
  82. package/dist/src/root/mcp-servers/install/command-actions.js.map +1 -1
  83. package/dist/src/root/mcp-servers/install/intent.d.ts +1 -1
  84. package/dist/src/root/mcp-servers/install/intent.d.ts.map +1 -1
  85. package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts +1 -1
  86. package/dist/src/root/mcp-servers/uninstall/command-actions.d.ts.map +1 -1
  87. package/dist/src/root/mcp-servers/uninstall/command-actions.js +7 -5
  88. package/dist/src/root/mcp-servers/uninstall/command-actions.js.map +1 -1
  89. package/dist/src/root/outdated/handler.d.ts.map +1 -1
  90. package/dist/src/root/outdated/handler.js +2 -2
  91. package/dist/src/root/outdated/handler.js.map +1 -1
  92. package/dist/src/root/packs/_packs.d.ts.map +1 -1
  93. package/dist/src/root/packs/_packs.js +10 -4
  94. package/dist/src/root/packs/_packs.js.map +1 -1
  95. package/dist/src/root/packs/add.d.ts.map +1 -1
  96. package/dist/src/root/packs/add.js +56 -38
  97. package/dist/src/root/packs/add.js.map +1 -1
  98. package/dist/src/root/packs/install/command-actions.d.ts +6 -6
  99. package/dist/src/root/packs/install/command-actions.d.ts.map +1 -1
  100. package/dist/src/root/packs/install/command-actions.js +96 -71
  101. package/dist/src/root/packs/install/command-actions.js.map +1 -1
  102. package/dist/src/root/packs/install/command.d.ts.map +1 -1
  103. package/dist/src/root/packs/install/command.js +4 -4
  104. package/dist/src/root/packs/install/command.js.map +1 -1
  105. package/dist/src/root/packs/install/handler.js +2 -2
  106. package/dist/src/root/packs/install/handler.js.map +1 -1
  107. package/dist/src/root/packs/install/intent.d.ts +4 -4
  108. package/dist/src/root/packs/install/intent.d.ts.map +1 -1
  109. package/dist/src/root/packs/install/plan.d.ts +7 -7
  110. package/dist/src/root/packs/install/plan.d.ts.map +1 -1
  111. package/dist/src/root/packs/install/plan.js +6 -6
  112. package/dist/src/root/packs/install/plan.js.map +1 -1
  113. package/dist/src/root/packs/new.d.ts.map +1 -1
  114. package/dist/src/root/packs/new.js +43 -20
  115. package/dist/src/root/packs/new.js.map +1 -1
  116. package/dist/src/root/packs/publish.d.ts +2 -2
  117. package/dist/src/root/packs/publish.d.ts.map +1 -1
  118. package/dist/src/root/packs/publish.js +68 -57
  119. package/dist/src/root/packs/publish.js.map +1 -1
  120. package/dist/src/root/packs/remove.d.ts.map +1 -1
  121. package/dist/src/root/packs/remove.js +47 -42
  122. package/dist/src/root/packs/remove.js.map +1 -1
  123. package/dist/src/root/packs/uninstall/command-actions.d.ts +3 -3
  124. package/dist/src/root/packs/uninstall/command-actions.d.ts.map +1 -1
  125. package/dist/src/root/packs/uninstall/command-actions.js +17 -12
  126. package/dist/src/root/packs/uninstall/command-actions.js.map +1 -1
  127. package/dist/src/root/packs/uninstall/command.js +5 -5
  128. package/dist/src/root/packs/uninstall/command.js.map +1 -1
  129. package/dist/src/root/packs/uninstall/plan.d.ts +4 -4
  130. package/dist/src/root/packs/uninstall/plan.d.ts.map +1 -1
  131. package/dist/src/root/packs/uninstall/plan.js +5 -5
  132. package/dist/src/root/packs/uninstall/plan.js.map +1 -1
  133. package/dist/src/root/packs/unpack/command.js +3 -3
  134. package/dist/src/root/packs/unpack/command.js.map +1 -1
  135. package/dist/src/root/packs/unpack/handler.d.ts.map +1 -1
  136. package/dist/src/root/packs/unpack/handler.js +14 -9
  137. package/dist/src/root/packs/unpack/handler.js.map +1 -1
  138. package/dist/src/root/packs/unpack/plan.d.ts +5 -5
  139. package/dist/src/root/packs/unpack/plan.d.ts.map +1 -1
  140. package/dist/src/root/packs/unpack/plan.js +4 -4
  141. package/dist/src/root/packs/unpack/plan.js.map +1 -1
  142. package/dist/src/root/prune/handler.d.ts.map +1 -1
  143. package/dist/src/root/prune/handler.js +3 -3
  144. package/dist/src/root/prune/handler.js.map +1 -1
  145. package/dist/src/root/setup.d.ts +1 -1
  146. package/dist/src/root/setup.d.ts.map +1 -1
  147. package/dist/src/root/setup.js +3 -3
  148. package/dist/src/root/setup.js.map +1 -1
  149. package/dist/src/root/shared/extension-version.d.ts +14 -11
  150. package/dist/src/root/shared/extension-version.d.ts.map +1 -1
  151. package/dist/src/root/shared/extension-version.js +45 -26
  152. package/dist/src/root/shared/extension-version.js.map +1 -1
  153. package/dist/src/root/shared/publish-preflight.d.ts.map +1 -1
  154. package/dist/src/root/shared/publish-preflight.js +10 -6
  155. package/dist/src/root/shared/publish-preflight.js.map +1 -1
  156. package/dist/src/root/shared/registry-install-target.d.ts +4 -4
  157. package/dist/src/root/shared/registry-install-target.d.ts.map +1 -1
  158. package/dist/src/root/shared/registry-install-target.js +6 -6
  159. package/dist/src/root/shared/registry-install-target.js.map +1 -1
  160. package/dist/src/root/shared/resolve-owner.d.ts +2 -2
  161. package/dist/src/root/shared/resolve-owner.d.ts.map +1 -1
  162. package/dist/src/root/shared/resolve-owner.js +10 -5
  163. package/dist/src/root/shared/resolve-owner.js.map +1 -1
  164. package/dist/src/root/shared/version-command.d.ts +3 -0
  165. package/dist/src/root/shared/version-command.d.ts.map +1 -1
  166. package/dist/src/root/shared/version-command.js +56 -24
  167. package/dist/src/root/shared/version-command.js.map +1 -1
  168. package/dist/src/root/skills/_skills.d.ts.map +1 -1
  169. package/dist/src/root/skills/_skills.js +0 -4
  170. package/dist/src/root/skills/_skills.js.map +1 -1
  171. package/dist/src/root/skills/disable.d.ts.map +1 -1
  172. package/dist/src/root/skills/disable.js +17 -10
  173. package/dist/src/root/skills/disable.js.map +1 -1
  174. package/dist/src/root/skills/enable.d.ts +1 -2
  175. package/dist/src/root/skills/enable.d.ts.map +1 -1
  176. package/dist/src/root/skills/enable.js +18 -12
  177. package/dist/src/root/skills/enable.js.map +1 -1
  178. package/dist/src/root/skills/install/command-actions.d.ts +4 -4
  179. package/dist/src/root/skills/install/command-actions.d.ts.map +1 -1
  180. package/dist/src/root/skills/install/command-actions.js +34 -42
  181. package/dist/src/root/skills/install/command-actions.js.map +1 -1
  182. package/dist/src/root/skills/install/handler.d.ts.map +1 -1
  183. package/dist/src/root/skills/install/handler.js +16 -6
  184. package/dist/src/root/skills/install/handler.js.map +1 -1
  185. package/dist/src/root/skills/install/intent.d.ts +2 -2
  186. package/dist/src/root/skills/install/intent.d.ts.map +1 -1
  187. package/dist/src/root/skills/install/plan.d.ts +3 -3
  188. package/dist/src/root/skills/install/plan.d.ts.map +1 -1
  189. package/dist/src/root/skills/install/plan.js +3 -4
  190. package/dist/src/root/skills/install/plan.js.map +1 -1
  191. package/dist/src/root/skills/install/resolve-skill-install-source.d.ts.map +1 -1
  192. package/dist/src/root/skills/install/resolve-skill-install-source.js +119 -125
  193. package/dist/src/root/skills/install/resolve-skill-install-source.js.map +1 -1
  194. package/dist/src/root/skills/install/select-skills.d.ts.map +1 -1
  195. package/dist/src/root/skills/install/select-skills.js +5 -4
  196. package/dist/src/root/skills/install/select-skills.js.map +1 -1
  197. package/dist/src/root/skills/list.d.ts.map +1 -1
  198. package/dist/src/root/skills/list.js +8 -12
  199. package/dist/src/root/skills/list.js.map +1 -1
  200. package/dist/src/root/skills/new.d.ts.map +1 -1
  201. package/dist/src/root/skills/new.js +32 -11
  202. package/dist/src/root/skills/new.js.map +1 -1
  203. package/dist/src/root/skills/prune/handler.d.ts.map +1 -1
  204. package/dist/src/root/skills/prune/handler.js +6 -6
  205. package/dist/src/root/skills/prune/handler.js.map +1 -1
  206. package/dist/src/root/skills/publish.d.ts.map +1 -1
  207. package/dist/src/root/skills/publish.js +46 -30
  208. package/dist/src/root/skills/publish.js.map +1 -1
  209. package/dist/src/root/skills/uninstall/command-actions.d.ts +1 -1
  210. package/dist/src/root/skills/uninstall/command-actions.d.ts.map +1 -1
  211. package/dist/src/root/skills/uninstall/command-actions.js +11 -4
  212. package/dist/src/root/skills/uninstall/command-actions.js.map +1 -1
  213. package/dist/src/root/skills/update/constraint-resolution.d.ts.map +1 -1
  214. package/dist/src/root/skills/update/constraint-resolution.js +6 -6
  215. package/dist/src/root/skills/update/constraint-resolution.js.map +1 -1
  216. package/dist/src/root/skills/update/handler.d.ts.map +1 -1
  217. package/dist/src/root/skills/update/handler.js +80 -144
  218. package/dist/src/root/skills/update/handler.js.map +1 -1
  219. package/dist/src/root/skills/update/plan.d.ts +1 -5
  220. package/dist/src/root/skills/update/plan.d.ts.map +1 -1
  221. package/dist/src/root/skills/update/plan.js +0 -11
  222. package/dist/src/root/skills/update/plan.js.map +1 -1
  223. package/dist/src/root/subagents/_subagents.d.ts.map +1 -1
  224. package/dist/src/root/subagents/_subagents.js +6 -2
  225. package/dist/src/root/subagents/_subagents.js.map +1 -1
  226. package/dist/src/root/subagents/disable/handler.d.ts.map +1 -1
  227. package/dist/src/root/subagents/disable/handler.js +17 -10
  228. package/dist/src/root/subagents/disable/handler.js.map +1 -1
  229. package/dist/src/root/subagents/enable/handler.d.ts.map +1 -1
  230. package/dist/src/root/subagents/enable/handler.js +17 -10
  231. package/dist/src/root/subagents/enable/handler.js.map +1 -1
  232. package/dist/src/root/subagents/install/command-actions.d.ts +4 -4
  233. package/dist/src/root/subagents/install/command-actions.d.ts.map +1 -1
  234. package/dist/src/root/subagents/install/command-actions.js +40 -45
  235. package/dist/src/root/subagents/install/command-actions.js.map +1 -1
  236. package/dist/src/root/subagents/install/handler.d.ts.map +1 -1
  237. package/dist/src/root/subagents/install/handler.js +16 -6
  238. package/dist/src/root/subagents/install/handler.js.map +1 -1
  239. package/dist/src/root/subagents/install/intent.d.ts +2 -2
  240. package/dist/src/root/subagents/install/intent.d.ts.map +1 -1
  241. package/dist/src/root/subagents/install/plan.d.ts +3 -3
  242. package/dist/src/root/subagents/install/plan.d.ts.map +1 -1
  243. package/dist/src/root/subagents/install/plan.js +3 -4
  244. package/dist/src/root/subagents/install/plan.js.map +1 -1
  245. package/dist/src/root/subagents/install/resolve-subagent-install-source.d.ts.map +1 -1
  246. package/dist/src/root/subagents/install/resolve-subagent-install-source.js +119 -121
  247. package/dist/src/root/subagents/install/resolve-subagent-install-source.js.map +1 -1
  248. package/dist/src/root/subagents/install/select-subagents.d.ts.map +1 -1
  249. package/dist/src/root/subagents/install/select-subagents.js +5 -4
  250. package/dist/src/root/subagents/install/select-subagents.js.map +1 -1
  251. package/dist/src/root/subagents/list/handler.d.ts.map +1 -1
  252. package/dist/src/root/subagents/list/handler.js +8 -13
  253. package/dist/src/root/subagents/list/handler.js.map +1 -1
  254. package/dist/src/root/subagents/new/command.d.ts.map +1 -1
  255. package/dist/src/root/subagents/new/command.js +1 -12
  256. package/dist/src/root/subagents/new/command.js.map +1 -1
  257. package/dist/src/root/subagents/new/handler.d.ts +0 -3
  258. package/dist/src/root/subagents/new/handler.d.ts.map +1 -1
  259. package/dist/src/root/subagents/new/handler.js +54 -56
  260. package/dist/src/root/subagents/new/handler.js.map +1 -1
  261. package/dist/src/root/subagents/publish/handler.js +53 -33
  262. package/dist/src/root/subagents/publish/handler.js.map +1 -1
  263. package/dist/src/root/subagents/uninstall/command-actions.d.ts +1 -1
  264. package/dist/src/root/subagents/uninstall/command-actions.d.ts.map +1 -1
  265. package/dist/src/root/subagents/uninstall/command-actions.js +11 -4
  266. package/dist/src/root/subagents/uninstall/command-actions.js.map +1 -1
  267. package/dist/src/root/subagents/update/handler.d.ts.map +1 -1
  268. package/dist/src/root/subagents/update/handler.js +22 -39
  269. package/dist/src/root/subagents/update/handler.js.map +1 -1
  270. package/dist/src/root/sync/handler.d.ts +5 -2
  271. package/dist/src/root/sync/handler.d.ts.map +1 -1
  272. package/dist/src/root/sync/handler.js +67 -12
  273. package/dist/src/root/sync/handler.js.map +1 -1
  274. package/dist/src/root/uninstall/resolve-root-uninstall-intent.d.ts.map +1 -1
  275. package/dist/src/root/uninstall/resolve-root-uninstall-intent.js +27 -17
  276. package/dist/src/root/uninstall/resolve-root-uninstall-intent.js.map +1 -1
  277. package/dist/src/root/update/resolve-root-update-intent.d.ts.map +1 -1
  278. package/dist/src/root/update/resolve-root-update-intent.js +27 -17
  279. package/dist/src/root/update/resolve-root-update-intent.js.map +1 -1
  280. package/dist/src/root/update/workspace-update.js +10 -10
  281. package/dist/src/root/update/workspace-update.js.map +1 -1
  282. package/dist/src/root/upgrade/handler.d.ts.map +1 -1
  283. package/dist/src/root/upgrade/handler.js +66 -33
  284. package/dist/src/root/upgrade/handler.js.map +1 -1
  285. package/dist/src/root/view/command.d.ts.map +1 -1
  286. package/dist/src/root/view/command.js +2 -1
  287. package/dist/src/root/view/command.js.map +1 -1
  288. package/dist/src/root/view/handler.d.ts +2 -0
  289. package/dist/src/root/view/handler.d.ts.map +1 -1
  290. package/dist/src/root/view/handler.js +99 -27
  291. package/dist/src/root/view/handler.js.map +1 -1
  292. package/dist/src/runtime.d.ts +1 -1
  293. package/dist/src/runtime.d.ts.map +1 -1
  294. package/dist/src/runtime.js +2 -2
  295. package/dist/src/runtime.js.map +1 -1
  296. package/dist/src/test-helpers.d.ts +2 -2
  297. package/dist/src/test-helpers.d.ts.map +1 -1
  298. package/dist/src/test-helpers.js +4 -4
  299. package/dist/src/test-helpers.js.map +1 -1
  300. package/dist/src/test-stubs.d.ts +8 -8
  301. package/dist/src/test-stubs.d.ts.map +1 -1
  302. package/dist/src/test-stubs.js +16 -17
  303. package/dist/src/test-stubs.js.map +1 -1
  304. package/package.json +12 -12
  305. package/dist/src/root/skills/fork.d.ts +0 -22
  306. package/dist/src/root/skills/fork.d.ts.map +0 -1
  307. package/dist/src/root/skills/fork.js +0 -284
  308. package/dist/src/root/skills/fork.js.map +0 -1
  309. package/dist/src/root/skills/rename.d.ts +0 -16
  310. package/dist/src/root/skills/rename.d.ts.map +0 -1
  311. package/dist/src/root/skills/rename.js +0 -84
  312. package/dist/src/root/skills/rename.js.map +0 -1
  313. package/dist/src/root/subagents/rename/command.d.ts +0 -3
  314. package/dist/src/root/subagents/rename/command.d.ts.map +0 -1
  315. package/dist/src/root/subagents/rename/command.js +0 -25
  316. package/dist/src/root/subagents/rename/command.js.map +0 -1
  317. package/dist/src/root/subagents/rename/handler.d.ts +0 -15
  318. package/dist/src/root/subagents/rename/handler.d.ts.map +0 -1
  319. package/dist/src/root/subagents/rename/handler.js +0 -175
  320. package/dist/src/root/subagents/rename/handler.js.map +0 -1
@@ -1,284 +0,0 @@
1
- import * as FileSystem from "effect/FileSystem";
2
- import * as Path from "effect/Path";
3
- import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
4
- import { resolveSourcePattern, SourceHostProviders, } from "@agentxm/client-core/unstable/source-resolution";
5
- import * as Array from "effect/Array";
6
- import * as Effect from "effect/Effect";
7
- import * as Layer from "effect/Layer";
8
- import * as Option from "effect/Option";
9
- import { Argument, Command, Flag } from "effect/unstable/cli";
10
- import { withAuthGuard } from "@agentxm/client-core/unstable/auth";
11
- import { makeAppError } from "@agentxm/client-core/unstable/app-error";
12
- import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
13
- import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
14
- import { setCommandSemanticProperties, summarizeCommandOutcome, withArgvTracking, } from "@agentxm/client-core/unstable/cli-runtime";
15
- import { DEFAULT_WORKSPACE_SCOPE } from "@agentxm/client-core/unstable/workspace";
16
- import { withAuthRuntime, withWorkspace } from "../../runtime.js";
17
- import { WorkspaceMutations } from "@agentxm/client-core/unstable/workspace";
18
- import { copySkill } from "@agentxm/client-core/unstable/skills";
19
- import { installSkill } from "@agentxm/client-core/unstable/skills";
20
- import { publishSkill } from "@agentxm/client-core/unstable/skills";
21
- import { expandGlobs } from "@agentxm/client-core/unstable/utils";
22
- import { createRegistryClient } from "@agentxm/client-core/unstable/registry";
23
- import { decodeExactSemverVersionSync } from "@agentxm/client-core/unstable/version-constraints";
24
- import { previewOrApplyPlan } from "@agentxm/client-core/unstable/plan";
25
- import { emitPlanResolutionResult, planResolutionToSummary } from "../../json-output.js";
26
- import { resolveOwnerForNewContent } from "../shared/resolve-owner.js";
27
- const filterBySkillGlobs = (discoveredSkills, skillPatterns) => Effect.gen(function* () {
28
- if (skillPatterns.length === 0)
29
- return discoveredSkills;
30
- const allNames = Array.map(discoveredSkills, (r) => r.skill.name);
31
- const matched = expandGlobs(skillPatterns, allNames);
32
- if (matched.length === 0) {
33
- return yield* makeAppError({
34
- code: "NO_SKILLS_MATCHED",
35
- what: "No skills matched the given patterns",
36
- details: [`Patterns: ${skillPatterns.join(", ")}`, `Available: ${allNames.join(", ")}`],
37
- howToFix: "Check skill names with `axm skills install --list <source>`.",
38
- });
39
- }
40
- return Array.filter(discoveredSkills, (s) => matched.includes(s.skill.name));
41
- });
42
- const isAppError = (error) => typeof error === "object" &&
43
- error !== null &&
44
- "_tag" in error &&
45
- error._tag === "AppError" &&
46
- "what" in error &&
47
- "code" in error;
48
- const summarizeError = (error) => {
49
- if (isAppError(error)) {
50
- return `${error.what} (${error.code})`;
51
- }
52
- if (error instanceof Error) {
53
- return error.message;
54
- }
55
- return String(error);
56
- };
57
- const isRemoteReadNotImplemented = (error) => isAppError(error) &&
58
- (error.code === "REGISTRY_REMOTE_NOT_SUPPORTED" ||
59
- (error.code.startsWith("REGISTRY_REMOTE_") && error.code.endsWith("_NOT_IMPLEMENTED")));
60
- const discoverHowToFix = (source, error) => {
61
- if (source.type === "registry") {
62
- if (isRemoteReadNotImplemented(error)) {
63
- return "Remote registry discovery is not yet supported for HTTP(S) sources. Use a file:// registry source, or fork from a local/git source.";
64
- }
65
- return "Verify the configured registry is reachable and contains the requested owner/skill.";
66
- }
67
- if (source.type === "local") {
68
- return "Verify the source path contains directories with SKILL.md files.";
69
- }
70
- return "Verify the source is reachable and contains valid skill directories.";
71
- };
72
- const noSkillsFoundHowToFix = (sourceInput) => sourceInput.includes("@") ||
73
- sourceInput.startsWith("http://") ||
74
- sourceInput.startsWith("https://")
75
- ? "Verify the owner and skill name, or use --list with skills install to inspect available skills."
76
- : "Verify the source path contains directories with SKILL.md files.";
77
- const FALLBACK_PUBLISHED_VERSION = decodeExactSemverVersionSync("0.1.0");
78
- /**
79
- * Handles the `axm skills fork` command.
80
- */
81
- export const handleFork = Effect.fn("Fork.handle")(function* (args) {
82
- const ws = yield* WorkspaceMutations;
83
- const renderer = yield* CliRenderer;
84
- const fs = yield* FileSystem.FileSystem;
85
- const path = yield* Path.Path;
86
- const sources = yield* SourceHostProviders;
87
- const agentRepo = yield* CodingAgentRepository;
88
- const runLayer = Layer.mergeAll(Layer.succeed(WorkspaceMutations, ws), Layer.succeed(CliRenderer, renderer), Layer.succeed(FileSystem.FileSystem, fs), Layer.succeed(Path.Path, path), Layer.succeed(SourceHostProviders, sources), Layer.succeed(CodingAgentRepository, agentRepo));
89
- const provideRun = (effect) => Effect.provide(effect, runLayer);
90
- yield* renderer.info("axm skills fork");
91
- // Step 1: Resolve owner (configured -> logged-in user -> error)
92
- const owner = yield* resolveOwnerForNewContent("skill fork");
93
- // Step 2: Parse source and discover skills
94
- const filtered = yield* renderer.withSpinner("Resolving skills...", () => Effect.gen(function* () {
95
- const resolvedSources = yield* resolveSourcePattern(args.source).pipe(Effect.catchTag("AppError", (error) => error.code === "SOURCE_PARSE_FAILED"
96
- ? (() => {
97
- const reason = summarizeError(error);
98
- return Effect.fail(makeAppError({
99
- code: "INVALID_SOURCE",
100
- what: "Invalid source",
101
- details: [`Provided: ${args.source}`, `Reason: ${reason}`],
102
- howToFix: "Valid formats: installed skill name, local path, github:owner/repo, or glob pattern",
103
- cause: error,
104
- }));
105
- })()
106
- : Effect.fail(error)));
107
- const allRefs = yield* Effect.forEach(resolvedSources, (source) => sources.find(source, {
108
- names: [],
109
- type: "skill",
110
- owner: Option.none(),
111
- versionConstraint: Option.none(),
112
- }), { concurrency: "unbounded" }).pipe(Effect.map(Array.flatten), Effect.mapError((error) => {
113
- const reason = summarizeError(error);
114
- const firstResolved = resolvedSources[0];
115
- const sourceLabel = firstResolved ? sources.origin(firstResolved) : args.source;
116
- const howToFix = firstResolved
117
- ? discoverHowToFix(firstResolved, error)
118
- : noSkillsFoundHowToFix(args.source);
119
- return makeAppError({
120
- code: "DISCOVER_FAILED",
121
- what: "Failed to discover skills from source",
122
- details: [`Source: ${sourceLabel}`, `Reason: ${reason}`],
123
- howToFix,
124
- cause: error,
125
- });
126
- }));
127
- const discoveredSkills = Array.filter(allRefs, (ref) => ref.type === "skill");
128
- if (discoveredSkills.length === 0) {
129
- return yield* makeAppError({
130
- code: "NO_SKILLS_FOUND",
131
- what: "No skills found in source",
132
- details: [`Source: ${args.source}`],
133
- howToFix: noSkillsFoundHowToFix(args.source),
134
- });
135
- }
136
- // Step 3: Filter by --skill globs (if provided)
137
- return yield* filterBySkillGlobs(discoveredSkills, args.skills);
138
- }), {
139
- successMessage: (matches) => `Found ${matches.length} skill(s)`,
140
- failureMessage: "Failed",
141
- });
142
- // Step 4: Determine first registry source name for publishing
143
- const registrySources = yield* ws.getRegistrySourceHosts().pipe(Effect.mapError((e) => makeAppError({
144
- code: "REGISTRY_SOURCES_FAILED",
145
- what: `Failed to get registry sources: ${e._tag}`,
146
- cause: e,
147
- })));
148
- if (registrySources.length === 0) {
149
- return yield* makeAppError({
150
- code: "NO_REGISTRY_CONFIGURED",
151
- what: "No registry sources configured",
152
- howToFix: "Run the registry guard first.",
153
- });
154
- }
155
- const [registrySource] = registrySources;
156
- if (registrySource === undefined) {
157
- return yield* makeAppError({
158
- code: "NO_REGISTRY_CONFIGURED",
159
- what: "No registry sources configured",
160
- howToFix: "Run the registry guard first.",
161
- });
162
- }
163
- const registryName = registrySource.name;
164
- // Step 5: Build plan — fork + publish + install per skill (3 sequential ops)
165
- // Steps use inline run closures so the install step can query the registry
166
- // at execution time for the integrity hash computed during publish.
167
- const registryLocationStr = registrySource.location.protocol === "file:"
168
- ? registrySource.location.pathname
169
- : registrySource.location.href;
170
- const steps = Array.flatMap(filtered, (ref) => {
171
- const targetName = `${owner}/skills/${ref.skill.name}`;
172
- const extensionRef = ref;
173
- // Run closures are Effect<JobStepResult, AppError, never>: services are
174
- // provided via the provideRun helper before plan execution.
175
- const copyStep = {
176
- readiness: "ready",
177
- label: `Fork ${ref.skill.name}`,
178
- run: provideRun(copySkill({
179
- name: "copy-skill",
180
- args: { ref: extensionRef, targetName },
181
- })),
182
- };
183
- const publishStep = {
184
- readiness: "ready",
185
- label: `Publish ${targetName}`,
186
- run: provideRun(publishSkill({
187
- name: "publish-skill",
188
- args: { name: targetName, registryName },
189
- })),
190
- };
191
- // Install step queries the registry at execution time to obtain the
192
- // integrity hash that publish computed, rather than using a stale value.
193
- const installStep = {
194
- readiness: "ready",
195
- label: `Install ${ref.skill.name}`,
196
- run: provideRun(Effect.gen(function* () {
197
- const client = yield* createRegistryClient(registryLocationStr);
198
- const response = yield* client.getExtensionsByScope({
199
- owner,
200
- names: [ref.skill.name],
201
- types: ["skill"],
202
- limit: Option.some(1),
203
- offset: 0,
204
- });
205
- const published = response.extensions[0];
206
- const registryRef = {
207
- type: "skill",
208
- refType: "registry",
209
- skill: {
210
- name: ref.skill.name,
211
- description: ref.skill.description,
212
- metadata: ref.skill.metadata,
213
- },
214
- source: {
215
- type: "registry",
216
- location: registrySource.location,
217
- owner: Option.none(),
218
- },
219
- owner,
220
- name: ref.skill.name,
221
- version: published?.version ?? FALLBACK_PUBLISHED_VERSION,
222
- integrity: Option.fromUndefinedOr(published?.integrity),
223
- compatiblePackages: [],
224
- };
225
- return yield* installSkill({
226
- name: "install-skill",
227
- args: {
228
- ref: registryRef,
229
- force: true,
230
- versionConstraint: Option.none(),
231
- skipSettings: Option.none(),
232
- strictUnknownAgents: Option.none(),
233
- existingInstalledAt: Option.none(),
234
- sourceName: Option.some(registryName),
235
- },
236
- });
237
- })),
238
- };
239
- return [copyStep, publishStep, installStep];
240
- });
241
- const plan = {
242
- _tag: "Plan",
243
- name: "Fork skill(s)",
244
- description: Option.some(`Fork and publish ${filtered.length} skill(s)`),
245
- jobs: [{ steps, concurrency: 1 }],
246
- };
247
- const resolution = yield* withAuthGuard(previewOrApplyPlan(plan, {
248
- yes: args.yes,
249
- force: args.force,
250
- preview: args.preview,
251
- }), { registryUrl: registrySource.location.href });
252
- yield* setCommandSemanticProperties(summarizeCommandOutcome(planResolutionToSummary(resolution, {
253
- subjectType: "skill",
254
- sourceKind: "registry",
255
- })));
256
- yield* emitPlanResolutionResult("skills.fork", resolution);
257
- yield* renderer.success("Done");
258
- });
259
- const forkConfig = {
260
- source: Argument.string("source").pipe(Argument.withDescription("Installed skill name, glob pattern, or source string (local path, github:owner/repo, etc.)")),
261
- skill: Flag.string("skill").pipe(Flag.withDescription("Fork only specific skill(s) matching the name or glob"), Flag.atLeast(0)),
262
- yes: yesFlag.pipe(Flag.withDescription("Fork without confirmation")),
263
- force: forceFlag.pipe(Flag.withDescription("Overwrite if a forked copy already exists")),
264
- preview: previewFlag.pipe(Flag.withDescription("Show what would be forked without making changes")),
265
- };
266
- export const forkCommand = Command.make("fork", forkConfig, ({ source, skill, yes, force, preview }) => handleFork({ source, skills: [...skill], yes, force, preview }).pipe(withWorkspace(DEFAULT_WORKSPACE_SCOPE), withAuthRuntime("skills fork"))).pipe(withArgvTracking(forkConfig), Command.withDescription("Fork a skill for customization"), Command.withExamples([
267
- {
268
- command: "axm skills fork my-skill",
269
- description: "Customize an installed skill by forking it",
270
- },
271
- {
272
- command: 'axm skills fork "effect-*"',
273
- description: "Fork all Effect-related skills at once",
274
- },
275
- {
276
- command: "axm skills fork github:owner/repo",
277
- description: "Fork from a GitHub source",
278
- },
279
- {
280
- command: 'axm skills fork ./local/path --skill "effect-*"',
281
- description: "Fork specific skills from a local directory",
282
- },
283
- ]));
284
- //# sourceMappingURL=fork.js.map
@@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O,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC;IACpE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,2CAA2C,CAAC,CAAC;IACxF,OAAO,EAAE,WAAW,CAAC,IAAI,CACvB,IAAI,CAAC,eAAe,CAAC,kDAAkD,CAAC,CACzE;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CACrC,MAAM,EACN,UAAU,EACV,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CACzC,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CAClE,aAAa,CAAC,uBAAuB,CAAC,EACtC,eAAe,CAAC,aAAa,CAAC,CAC/B,CACJ,CAAC,IAAI,CACJ,gBAAgB,CAAC,UAAU,CAAC,EAC5B,OAAO,CAAC,eAAe,CAAC,gCAAgC,CAAC,EACzD,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,0BAA0B;QACnC,WAAW,EAAE,4CAA4C;KAC1D;IACD;QACE,OAAO,EAAE,4BAA4B;QACrC,WAAW,EAAE,wCAAwC;KACtD;IACD;QACE,OAAO,EAAE,mCAAmC;QAC5C,WAAW,EAAE,2BAA2B;KACzC;IACD;QACE,OAAO,EAAE,iDAAiD;QAC1D,WAAW,EAAE,6CAA6C;KAC3D;CACF,CAAC,CACH,CAAC"}
@@ -1,16 +0,0 @@
1
- import * as FileSystem from "effect/FileSystem";
2
- import * as Path from "effect/Path";
3
- import { Command } from "effect/unstable/cli";
4
- import * as Effect from "effect/Effect";
5
- import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
6
- import { WorkspaceMutations } from "@agentxm/client-core/unstable/workspace";
7
- export interface RenameHandlerArgs {
8
- readonly oldName: string;
9
- readonly newName: string;
10
- readonly yes: boolean;
11
- readonly force: boolean;
12
- readonly preview: boolean;
13
- }
14
- export declare const handleRename: (args: RenameHandlerArgs) => Effect.Effect<undefined, import("@agentxm/client-core/unstable/app-error").AppError | import("packages/core/dist/src/unstable/cli-prompt/prompt-cancelled.js").PromptCancelled, CliRenderer | WorkspaceMutations | FileSystem.FileSystem | Path.Path | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | import("@agentxm/client-core/unstable/cli-flags").Verbosity>;
15
- export declare const renameCommand: Command.Command<"rename", Record<string, unknown>, {}, never, "effect/unstable/cli/GlobalFlag/axm-non-interactive" | "effect/unstable/cli/GlobalFlag/axm-json" | "effect/unstable/cli/GlobalFlag/axm-quiet" | "effect/unstable/cli/GlobalFlag/axm-verbose" | "effect/unstable/cli/GlobalFlag/axm-debug">;
16
- //# sourceMappingURL=rename.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rename.d.ts","sourceRoot":"","sources":["../../../../src/root/skills/rename.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAW7E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,yYAwEvB,CAAC;AAiBH,eAAO,MAAM,aAAa,0SAkBzB,CAAC"}
@@ -1,84 +0,0 @@
1
- import * as FileSystem from "effect/FileSystem";
2
- import * as Path from "effect/Path";
3
- import * as Option from "effect/Option";
4
- import { Argument, Command, Flag } from "effect/unstable/cli";
5
- import * as Effect from "effect/Effect";
6
- import { makeAppError } from "@agentxm/client-core/unstable/app-error";
7
- import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
8
- import { WorkspaceMutations } from "@agentxm/client-core/unstable/workspace";
9
- import { renameSkill } from "@agentxm/client-core/unstable/skills";
10
- import { forceFlag, previewFlag, yesFlag } from "@agentxm/client-core/unstable/cli-flags";
11
- import { withArgvTracking } from "@agentxm/client-core/unstable/cli-runtime";
12
- import { previewOrApplyPlan } from "@agentxm/client-core/unstable/plan";
13
- import { emitPlanResolutionResult } from "../../json-output.js";
14
- import { withRuntime, withWorkspace } from "../../runtime.js";
15
- import { scopeFlag } from "../../cli-flags.js";
16
- export const handleRename = Effect.fn("Rename.handle")(function* (args) {
17
- const ws = yield* WorkspaceMutations;
18
- const renderer = yield* CliRenderer;
19
- const fs = yield* FileSystem.FileSystem;
20
- const path = yield* Path.Path;
21
- yield* renderer.info("axm skills rename");
22
- // Load configured skills
23
- const configuredSkills = yield* ws.records.getConfiguredSkills();
24
- const entry = configuredSkills[args.oldName];
25
- // Validate: old name exists
26
- if (entry === undefined) {
27
- return yield* makeAppError({
28
- code: "SKILL_NOT_FOUND",
29
- what: `Skill '${args.oldName}' not found`,
30
- howToFix: "Run `axm skills list` to see available skills",
31
- });
32
- }
33
- // Validate: new name doesn't conflict
34
- if (configuredSkills[args.newName] !== undefined) {
35
- return yield* makeAppError({
36
- code: "SKILL_NAME_CONFLICT",
37
- what: `Skill '${args.newName}' already exists`,
38
- howToFix: "Choose a different name or uninstall the existing skill first",
39
- });
40
- }
41
- // Build operation
42
- const op = {
43
- name: "rename-skill",
44
- args: { oldName: args.oldName, newName: args.newName },
45
- };
46
- // Build plan with inline run closure
47
- const toJobStepResult = (result) => result.result === "error" && result.error != null
48
- ? { result: "error", message: result.message, error: result.error }
49
- : { result: "success", message: result.message };
50
- const step = {
51
- readiness: "ready",
52
- label: `${args.oldName} -> ${args.newName}`,
53
- run: renameSkill(op).pipe(Effect.map(toJobStepResult), Effect.provideService(WorkspaceMutations, ws), Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path)),
54
- };
55
- const plan = {
56
- _tag: "Plan",
57
- name: "Rename skill",
58
- description: Option.some(`Rename ${args.oldName} to ${args.newName}`),
59
- jobs: [{ concurrency: 1, steps: [step] }],
60
- };
61
- const resolution = yield* previewOrApplyPlan(plan, {
62
- yes: args.yes,
63
- force: args.force,
64
- preview: args.preview,
65
- });
66
- yield* emitPlanResolutionResult("skills.rename", resolution);
67
- yield* renderer.success("Done");
68
- });
69
- const renameConfig = {
70
- oldName: Argument.string("old-name").pipe(Argument.withDescription("Current name of the skill")),
71
- newName: Argument.string("new-name").pipe(Argument.withDescription("New name for the skill")),
72
- scope: scopeFlag.pipe(Flag.withDescription("Rename in project (default) or user-level configuration")),
73
- yes: yesFlag.pipe(Flag.withDescription("Rename without confirmation")),
74
- force: forceFlag.pipe(Flag.withDescription("Rename even if the new name conflicts with an existing skill")),
75
- preview: previewFlag.pipe(Flag.withDescription("Show what would be renamed without making changes")),
76
- };
77
- export const renameCommand = Command.make("rename", renameConfig, ({ oldName, newName, scope, yes, force, preview }) => handleRename({ oldName, newName, yes, force, preview }).pipe(withWorkspace(scope), withRuntime("skills rename"))).pipe(withArgvTracking(renameConfig), Command.withDescription("Rename a skill"), Command.withExamples([
78
- { command: "axm skills rename old-name new-name", description: "Give a skill a better name" },
79
- {
80
- command: "axm skills rename old-name new-name --preview",
81
- description: "Check what would change first",
82
- },
83
- ]));
84
- //# sourceMappingURL=rename.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rename.js","sourceRoot":"","sources":["../../../../src/root/skills/rename.ts"],"names":[],"mappings":"A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,QAAQ,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC;IAC7F,KAAK,EAAE,SAAS,CAAC,IAAI,CACnB,IAAI,CAAC,eAAe,CAAC,yDAAyD,CAAC,CAChF;IACD,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,6BAA6B,CAAC,CAAC;IACtE,KAAK,EAAE,SAAS,CAAC,IAAI,CACnB,IAAI,CAAC,eAAe,CAAC,8DAA8D,CAAC,CACrF;IACD,OAAO,EAAE,WAAW,CAAC,IAAI,CACvB,IAAI,CAAC,eAAe,CAAC,mDAAmD,CAAC,CAC1E;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CACvC,QAAQ,EACR,YAAY,EACZ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CACnD,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CAC1D,aAAa,CAAC,KAAK,CAAC,EACpB,WAAW,CAAC,eAAe,CAAC,CAC7B,CACJ,CAAC,IAAI,CACJ,gBAAgB,CAAC,YAAY,CAAC,EAC9B,OAAO,CAAC,eAAe,CAAC,gBAAgB,CAAC,EACzC,OAAO,CAAC,YAAY,CAAC;IACnB,EAAE,OAAO,EAAE,qCAAqC,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAC7F;QACE,OAAO,EAAE,+CAA+C;QACxD,WAAW,EAAE,+BAA+B;KAC7C;CACF,CAAC,CACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from "effect/unstable/cli";
2
- export declare const renameCommand: Command.Command<"rename", 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
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/rename/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAQ,MAAM,qBAAqB,CAAC;AAwB9D,eAAO,MAAM,aAAa,0SAqBzB,CAAC"}
@@ -1,25 +0,0 @@
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 { withRuntime, withWorkspace } from "../../../runtime.js";
5
- import { scopeFlag } from "../../../cli-flags.js";
6
- import { handleRenameSubagent } from "./handler.js";
7
- const renameConfig = {
8
- oldName: Argument.string("old-name").pipe(Argument.withDescription("Current name of the subagent")),
9
- newName: Argument.string("new-name").pipe(Argument.withDescription("New name for the subagent")),
10
- scope: scopeFlag.pipe(Flag.withDescription("Rename in project (default) or user-level configuration")),
11
- yes: yesFlag.pipe(Flag.withDescription("Rename without confirmation")),
12
- force: forceFlag.pipe(Flag.withDescription("Rename even if the new name conflicts with an existing subagent")),
13
- preview: previewFlag.pipe(Flag.withDescription("Show what would be renamed without making changes")),
14
- };
15
- export const renameCommand = Command.make("rename", renameConfig, ({ oldName, newName, scope, yes, force, preview }) => handleRenameSubagent({ oldName, newName, yes, force, preview }).pipe(withWorkspace(scope), withRuntime("subagents rename"))).pipe(withArgvTracking(renameConfig), Command.withDescription("Rename a locally-authored subagent"), Command.withExamples([
16
- {
17
- command: "axm subagents rename old-name new-name",
18
- description: "Give a subagent a better name",
19
- },
20
- {
21
- command: "axm subagents rename old-name new-name --preview",
22
- description: "Check what would change first",
23
- },
24
- ]));
25
- //# sourceMappingURL=command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../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OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CAClE,aAAa,CAAC,KAAK,CAAC,EACpB,WAAW,CAAC,kBAAkB,CAAC,CAChC,CACJ,CAAC,IAAI,CACJ,gBAAgB,CAAC,YAAY,CAAC,EAC9B,OAAO,CAAC,eAAe,CAAC,oCAAoC,CAAC,EAC7D,OAAO,CAAC,YAAY,CAAC;IACnB;QACE,OAAO,EAAE,wCAAwC;QACjD,WAAW,EAAE,+BAA+B;KAC7C;IACD;QACE,OAAO,EAAE,kDAAkD;QAC3D,WAAW,EAAE,+BAA+B;KAC7C;CACF,CAAC,CACH,CAAC"}
@@ -1,15 +0,0 @@
1
- import * as FileSystem from "effect/FileSystem";
2
- import * as Path from "effect/Path";
3
- import * as Effect from "effect/Effect";
4
- import { CliRenderer } from "@agentxm/client-core/unstable/cli-renderer";
5
- import { WorkspaceMutations } from "@agentxm/client-core/unstable/workspace";
6
- import { CodingAgentRepository } from "@agentxm/client-core/unstable/agents";
7
- export interface RenameSubagentHandlerArgs {
8
- readonly oldName: string;
9
- readonly newName: string;
10
- readonly yes: boolean;
11
- readonly force: boolean;
12
- readonly preview: boolean;
13
- }
14
- export declare const handleRenameSubagent: (args: RenameSubagentHandlerArgs) => Effect.Effect<undefined, import("@agentxm/client-core/unstable/app-error").AppError | import("packages/core/dist/src/unstable/cli-prompt/prompt-cancelled.js").PromptCancelled, CliRenderer | WorkspaceMutations | FileSystem.FileSystem | Path.Path | "effect/unstable/cli/GlobalFlag/axm-non-interactive" | import("packages/core/dist/src/unstable/cli-flags/verbosity.js").Verbosity | CodingAgentRepository>;
15
- //# sourceMappingURL=handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../../src/root/subagents/rename/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAGpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAe7E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAgBD,eAAO,MAAM,oBAAoB,wbA0M/B,CAAC"}