@axm.sh/cli 0.0.7 → 0.0.9

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 (401) hide show
  1. package/dist/src/agents/detection.d.ts +3 -16
  2. package/dist/src/agents/detection.d.ts.map +1 -1
  3. package/dist/src/agents/detection.js +4 -13
  4. package/dist/src/agents/detection.js.map +1 -1
  5. package/dist/src/agents/index.d.ts +1 -1
  6. package/dist/src/agents/index.d.ts.map +1 -1
  7. package/dist/src/agents/index.js +1 -1
  8. package/dist/src/agents/index.js.map +1 -1
  9. package/dist/src/cli-commands/init/handler.d.ts +1 -1
  10. package/dist/src/cli-commands/init/handler.d.ts.map +1 -1
  11. package/dist/src/cli-commands/init/handler.js +1 -1
  12. package/dist/src/cli-commands/init/handler.js.map +1 -1
  13. package/dist/src/cli-commands/skills/command.d.ts.map +1 -1
  14. package/dist/src/cli-commands/skills/command.js +6 -0
  15. package/dist/src/cli-commands/skills/command.js.map +1 -1
  16. package/dist/src/cli-commands/skills/constants.d.ts +9 -0
  17. package/dist/src/cli-commands/skills/constants.d.ts.map +1 -0
  18. package/dist/src/cli-commands/skills/constants.js +9 -0
  19. package/dist/src/cli-commands/skills/constants.js.map +1 -0
  20. package/dist/src/cli-commands/skills/copy-skill.d.ts +1 -1
  21. package/dist/src/cli-commands/skills/copy-skill.d.ts.map +1 -1
  22. package/dist/src/cli-commands/skills/copy-skill.js +11 -24
  23. package/dist/src/cli-commands/skills/copy-skill.js.map +1 -1
  24. package/dist/src/cli-commands/skills/disable/command.d.ts +15 -0
  25. package/dist/src/cli-commands/skills/disable/command.d.ts.map +1 -0
  26. package/dist/src/cli-commands/skills/disable/command.js +56 -0
  27. package/dist/src/cli-commands/skills/disable/command.js.map +1 -0
  28. package/dist/src/cli-commands/skills/disable/disable-skill.d.ts +25 -0
  29. package/dist/src/cli-commands/skills/disable/disable-skill.d.ts.map +1 -0
  30. package/dist/src/cli-commands/skills/disable/disable-skill.js +101 -0
  31. package/dist/src/cli-commands/skills/disable/disable-skill.js.map +1 -0
  32. package/dist/src/cli-commands/skills/disable/handler.d.ts +18 -0
  33. package/dist/src/cli-commands/skills/disable/handler.d.ts.map +1 -0
  34. package/dist/src/cli-commands/skills/disable/handler.js +72 -0
  35. package/dist/src/cli-commands/skills/disable/handler.js.map +1 -0
  36. package/dist/src/cli-commands/skills/enable/command.d.ts +15 -0
  37. package/dist/src/cli-commands/skills/enable/command.d.ts.map +1 -0
  38. package/dist/src/cli-commands/skills/enable/command.js +56 -0
  39. package/dist/src/cli-commands/skills/enable/command.js.map +1 -0
  40. package/dist/src/cli-commands/skills/enable/enable-skill.d.ts +26 -0
  41. package/dist/src/cli-commands/skills/enable/enable-skill.d.ts.map +1 -0
  42. package/dist/src/cli-commands/skills/enable/enable-skill.js +138 -0
  43. package/dist/src/cli-commands/skills/enable/enable-skill.js.map +1 -0
  44. package/dist/src/cli-commands/skills/enable/handler.d.ts +18 -0
  45. package/dist/src/cli-commands/skills/enable/handler.d.ts.map +1 -0
  46. package/dist/src/cli-commands/skills/enable/handler.js +72 -0
  47. package/dist/src/cli-commands/skills/enable/handler.js.map +1 -0
  48. package/dist/src/cli-commands/skills/fork/handler.d.ts +4 -13
  49. package/dist/src/cli-commands/skills/fork/handler.d.ts.map +1 -1
  50. package/dist/src/cli-commands/skills/fork/handler.js +37 -29
  51. package/dist/src/cli-commands/skills/fork/handler.js.map +1 -1
  52. package/dist/src/cli-commands/skills/fs-helpers.d.ts +12 -0
  53. package/dist/src/cli-commands/skills/fs-helpers.d.ts.map +1 -0
  54. package/dist/src/cli-commands/skills/fs-helpers.js +12 -0
  55. package/dist/src/cli-commands/skills/fs-helpers.js.map +1 -0
  56. package/dist/src/cli-commands/skills/install/discover-skills.d.ts +3 -18
  57. package/dist/src/cli-commands/skills/install/discover-skills.d.ts.map +1 -1
  58. package/dist/src/cli-commands/skills/install/discover-skills.js +7 -20
  59. package/dist/src/cli-commands/skills/install/discover-skills.js.map +1 -1
  60. package/dist/src/cli-commands/skills/install/handler.d.ts +1 -16
  61. package/dist/src/cli-commands/skills/install/handler.d.ts.map +1 -1
  62. package/dist/src/cli-commands/skills/install/handler.js +20 -27
  63. package/dist/src/cli-commands/skills/install/handler.js.map +1 -1
  64. package/dist/src/cli-commands/skills/install/install-skill.d.ts +1 -1
  65. package/dist/src/cli-commands/skills/install/install-skill.d.ts.map +1 -1
  66. package/dist/src/cli-commands/skills/install/install-skill.js +12 -18
  67. package/dist/src/cli-commands/skills/install/install-skill.js.map +1 -1
  68. package/dist/src/cli-commands/skills/install/select-skills.d.ts +4 -5
  69. package/dist/src/cli-commands/skills/install/select-skills.d.ts.map +1 -1
  70. package/dist/src/cli-commands/skills/install/select-skills.js +13 -13
  71. package/dist/src/cli-commands/skills/install/select-skills.js.map +1 -1
  72. package/dist/src/cli-commands/skills/install/skill-utils.d.ts +1 -6
  73. package/dist/src/cli-commands/skills/install/skill-utils.d.ts.map +1 -1
  74. package/dist/src/cli-commands/skills/install/skill-utils.js +8 -4
  75. package/dist/src/cli-commands/skills/install/skill-utils.js.map +1 -1
  76. package/dist/src/cli-commands/skills/list/handler.d.ts +1 -1
  77. package/dist/src/cli-commands/skills/list/handler.d.ts.map +1 -1
  78. package/dist/src/cli-commands/skills/list/handler.js +1 -1
  79. package/dist/src/cli-commands/skills/list/handler.js.map +1 -1
  80. package/dist/src/cli-commands/skills/naming.d.ts +17 -0
  81. package/dist/src/cli-commands/skills/naming.d.ts.map +1 -0
  82. package/dist/src/cli-commands/skills/naming.js +20 -0
  83. package/dist/src/cli-commands/skills/naming.js.map +1 -0
  84. package/dist/src/cli-commands/skills/operations.d.ts +25 -1
  85. package/dist/src/cli-commands/skills/operations.d.ts.map +1 -1
  86. package/dist/src/cli-commands/skills/publish/handler.d.ts +1 -10
  87. package/dist/src/cli-commands/skills/publish/handler.d.ts.map +1 -1
  88. package/dist/src/cli-commands/skills/publish/handler.js +31 -47
  89. package/dist/src/cli-commands/skills/publish/handler.js.map +1 -1
  90. package/dist/src/cli-commands/skills/publish-skill.d.ts +1 -1
  91. package/dist/src/cli-commands/skills/publish-skill.d.ts.map +1 -1
  92. package/dist/src/cli-commands/skills/publish-skill.js +37 -52
  93. package/dist/src/cli-commands/skills/publish-skill.js.map +1 -1
  94. package/dist/src/cli-commands/skills/rename/command.d.ts +16 -0
  95. package/dist/src/cli-commands/skills/rename/command.d.ts.map +1 -0
  96. package/dist/src/cli-commands/skills/rename/command.js +62 -0
  97. package/dist/src/cli-commands/skills/rename/command.js.map +1 -0
  98. package/dist/src/cli-commands/skills/rename/handler.d.ts +20 -0
  99. package/dist/src/cli-commands/skills/rename/handler.d.ts.map +1 -0
  100. package/dist/src/cli-commands/skills/rename/handler.js +77 -0
  101. package/dist/src/cli-commands/skills/rename/handler.js.map +1 -0
  102. package/dist/src/cli-commands/skills/rename/rename-skill.d.ts +25 -0
  103. package/dist/src/cli-commands/skills/rename/rename-skill.d.ts.map +1 -0
  104. package/dist/src/cli-commands/skills/rename/rename-skill.js +125 -0
  105. package/dist/src/cli-commands/skills/rename/rename-skill.js.map +1 -0
  106. package/dist/src/cli-commands/skills/uninstall/handler.d.ts +1 -1
  107. package/dist/src/cli-commands/skills/uninstall/handler.d.ts.map +1 -1
  108. package/dist/src/cli-commands/skills/uninstall/handler.js +12 -1
  109. package/dist/src/cli-commands/skills/uninstall/handler.js.map +1 -1
  110. package/dist/src/cli-commands/skills/uninstall/uninstall-skill.d.ts +1 -1
  111. package/dist/src/cli-commands/skills/uninstall/uninstall-skill.d.ts.map +1 -1
  112. package/dist/src/cli-commands/skills/uninstall/uninstall-skill.js +14 -23
  113. package/dist/src/cli-commands/skills/uninstall/uninstall-skill.js.map +1 -1
  114. package/dist/src/cli-commands/skills/update/build-plan.d.ts +7 -2
  115. package/dist/src/cli-commands/skills/update/build-plan.d.ts.map +1 -1
  116. package/dist/src/cli-commands/skills/update/build-plan.js +28 -20
  117. package/dist/src/cli-commands/skills/update/build-plan.js.map +1 -1
  118. package/dist/src/cli-commands/skills/update/handler.d.ts +11 -20
  119. package/dist/src/cli-commands/skills/update/handler.d.ts.map +1 -1
  120. package/dist/src/cli-commands/skills/update/handler.js +161 -90
  121. package/dist/src/cli-commands/skills/update/handler.js.map +1 -1
  122. package/dist/src/cli-commands/skills/utils.d.ts +2 -16
  123. package/dist/src/cli-commands/skills/utils.d.ts.map +1 -1
  124. package/dist/src/cli-commands/skills/utils.js +36 -20
  125. package/dist/src/cli-commands/skills/utils.js.map +1 -1
  126. package/dist/src/cli-error/cli-error.d.ts +21 -0
  127. package/dist/src/cli-error/cli-error.d.ts.map +1 -0
  128. package/dist/src/cli-error/cli-error.js +12 -0
  129. package/dist/src/cli-error/cli-error.js.map +1 -0
  130. package/dist/src/cli-error/index.d.ts +3 -0
  131. package/dist/src/cli-error/index.d.ts.map +1 -0
  132. package/dist/src/cli-error/index.js +3 -0
  133. package/dist/src/cli-error/index.js.map +1 -0
  134. package/dist/src/cli-error/render.d.ts +4 -0
  135. package/dist/src/cli-error/render.d.ts.map +1 -0
  136. package/dist/src/cli-error/render.js +25 -0
  137. package/dist/src/cli-error/render.js.map +1 -0
  138. package/dist/src/extensions/skills/index.d.ts +0 -5
  139. package/dist/src/extensions/skills/index.d.ts.map +1 -1
  140. package/dist/src/extensions/skills/index.js +1 -4
  141. package/dist/src/extensions/skills/index.js.map +1 -1
  142. package/dist/src/extensions/skills/state/index.d.ts +2 -2
  143. package/dist/src/extensions/skills/state/index.d.ts.map +1 -1
  144. package/dist/src/extensions/skills/state/index.js +1 -1
  145. package/dist/src/extensions/skills/state/index.js.map +1 -1
  146. package/dist/src/extensions/skills/state/pure-functions.d.ts +4 -29
  147. package/dist/src/extensions/skills/state/pure-functions.d.ts.map +1 -1
  148. package/dist/src/extensions/skills/state/pure-functions.js +4 -37
  149. package/dist/src/extensions/skills/state/pure-functions.js.map +1 -1
  150. package/dist/src/extensions/skills/state/types.d.ts +0 -1
  151. package/dist/src/extensions/skills/state/types.d.ts.map +1 -1
  152. package/dist/src/extensions/skills/state/types.js.map +1 -1
  153. package/dist/src/extensions/skills/types.d.ts +0 -40
  154. package/dist/src/extensions/skills/types.d.ts.map +1 -1
  155. package/dist/src/extensions/skills/types.js +0 -1
  156. package/dist/src/extensions/skills/types.js.map +1 -1
  157. package/dist/src/git/errors.d.ts +1 -2
  158. package/dist/src/git/errors.d.ts.map +1 -1
  159. package/dist/src/git/errors.js +0 -1
  160. package/dist/src/git/errors.js.map +1 -1
  161. package/dist/src/git/index.d.ts +0 -1
  162. package/dist/src/git/index.d.ts.map +1 -1
  163. package/dist/src/git/index.js +0 -1
  164. package/dist/src/git/index.js.map +1 -1
  165. package/dist/src/git/operations.d.ts +7 -7
  166. package/dist/src/git/operations.d.ts.map +1 -1
  167. package/dist/src/git/operations.js +22 -19
  168. package/dist/src/git/operations.js.map +1 -1
  169. package/dist/src/lockfile/index.d.ts +1 -2
  170. package/dist/src/lockfile/index.d.ts.map +1 -1
  171. package/dist/src/lockfile/index.js +2 -1
  172. package/dist/src/lockfile/index.js.map +1 -1
  173. package/dist/src/lockfile/lockfile.d.ts +77 -51
  174. package/dist/src/lockfile/lockfile.d.ts.map +1 -1
  175. package/dist/src/lockfile/lockfile.js +27 -51
  176. package/dist/src/lockfile/lockfile.js.map +1 -1
  177. package/dist/src/resolution/index.d.ts +0 -1
  178. package/dist/src/resolution/index.d.ts.map +1 -1
  179. package/dist/src/resolution/index.js +0 -2
  180. package/dist/src/resolution/index.js.map +1 -1
  181. package/dist/src/resolution/resolver.d.ts +2 -2
  182. package/dist/src/resolution/resolver.d.ts.map +1 -1
  183. package/dist/src/resolution/resolver.js +1 -1
  184. package/dist/src/resolution/resolver.js.map +1 -1
  185. package/dist/src/resolution/resolvers/ambiguous.js +1 -1
  186. package/dist/src/resolution/resolvers/ambiguous.js.map +1 -1
  187. package/dist/src/resolution/resolvers/axm-name.d.ts.map +1 -1
  188. package/dist/src/resolution/resolvers/axm-name.js +1 -1
  189. package/dist/src/resolution/resolvers/axm-name.js.map +1 -1
  190. package/dist/src/resolution/resolvers/bare-name.js +1 -1
  191. package/dist/src/resolution/resolvers/bare-name.js.map +1 -1
  192. package/dist/src/resolution/resolvers/explicit-source.d.ts.map +1 -1
  193. package/dist/src/resolution/resolvers/explicit-source.js +1 -1
  194. package/dist/src/resolution/resolvers/explicit-source.js.map +1 -1
  195. package/dist/src/resolution/resolvers/local-path.d.ts.map +1 -1
  196. package/dist/src/resolution/resolvers/local-path.js +1 -1
  197. package/dist/src/resolution/resolvers/local-path.js.map +1 -1
  198. package/dist/src/resolution/resolvers/url.d.ts.map +1 -1
  199. package/dist/src/resolution/resolvers/url.js +1 -1
  200. package/dist/src/resolution/resolvers/url.js.map +1 -1
  201. package/dist/src/runtime/error-handling.d.ts +10 -0
  202. package/dist/src/runtime/error-handling.d.ts.map +1 -0
  203. package/dist/src/runtime/error-handling.js +10 -0
  204. package/dist/src/runtime/error-handling.js.map +1 -0
  205. package/dist/src/runtime/index.d.ts +5 -4
  206. package/dist/src/runtime/index.d.ts.map +1 -1
  207. package/dist/src/runtime/index.js +11 -4
  208. package/dist/src/runtime/index.js.map +1 -1
  209. package/dist/src/settings/format-preserving-json.d.ts +1 -2
  210. package/dist/src/settings/format-preserving-json.d.ts.map +1 -1
  211. package/dist/src/settings/format-preserving-json.js +7 -7
  212. package/dist/src/settings/format-preserving-json.js.map +1 -1
  213. package/dist/src/settings/index.d.ts +5 -4
  214. package/dist/src/settings/index.d.ts.map +1 -1
  215. package/dist/src/settings/index.js +4 -2
  216. package/dist/src/settings/index.js.map +1 -1
  217. package/dist/src/settings/schema.d.ts +48 -8
  218. package/dist/src/settings/schema.d.ts.map +1 -1
  219. package/dist/src/settings/schema.js +26 -7
  220. package/dist/src/settings/schema.js.map +1 -1
  221. package/dist/src/settings/settings.d.ts +10 -52
  222. package/dist/src/settings/settings.d.ts.map +1 -1
  223. package/dist/src/settings/settings.js +22 -48
  224. package/dist/src/settings/settings.js.map +1 -1
  225. package/dist/src/settings/skill-entry.d.ts +44 -0
  226. package/dist/src/settings/skill-entry.d.ts.map +1 -0
  227. package/dist/src/settings/skill-entry.js +58 -0
  228. package/dist/src/settings/skill-entry.js.map +1 -0
  229. package/dist/src/sources/azurerepos/repo-exists.d.ts +2 -2
  230. package/dist/src/sources/azurerepos/repo-exists.d.ts.map +1 -1
  231. package/dist/src/sources/azurerepos/repo-exists.js +9 -7
  232. package/dist/src/sources/azurerepos/repo-exists.js.map +1 -1
  233. package/dist/src/sources/azurerepos/scp.d.ts +1 -2
  234. package/dist/src/sources/azurerepos/scp.d.ts.map +1 -1
  235. package/dist/src/sources/azurerepos/scp.js +6 -2
  236. package/dist/src/sources/azurerepos/scp.js.map +1 -1
  237. package/dist/src/sources/azurerepos/url.d.ts +1 -2
  238. package/dist/src/sources/azurerepos/url.d.ts.map +1 -1
  239. package/dist/src/sources/azurerepos/url.js +11 -3
  240. package/dist/src/sources/azurerepos/url.js.map +1 -1
  241. package/dist/src/sources/bitbucket/resolve-repo.d.ts +2 -2
  242. package/dist/src/sources/bitbucket/resolve-repo.d.ts.map +1 -1
  243. package/dist/src/sources/bitbucket/resolve-repo.js +5 -4
  244. package/dist/src/sources/bitbucket/resolve-repo.js.map +1 -1
  245. package/dist/src/sources/bitbucket/scp.d.ts +1 -2
  246. package/dist/src/sources/bitbucket/scp.d.ts.map +1 -1
  247. package/dist/src/sources/bitbucket/scp.js +6 -2
  248. package/dist/src/sources/bitbucket/scp.js.map +1 -1
  249. package/dist/src/sources/bitbucket/shorthand.d.ts +1 -1
  250. package/dist/src/sources/bitbucket/shorthand.d.ts.map +1 -1
  251. package/dist/src/sources/bitbucket/url.d.ts +1 -2
  252. package/dist/src/sources/bitbucket/url.d.ts.map +1 -1
  253. package/dist/src/sources/bitbucket/url.js +11 -3
  254. package/dist/src/sources/bitbucket/url.js.map +1 -1
  255. package/dist/src/sources/clone-url.d.ts +3 -4
  256. package/dist/src/sources/clone-url.d.ts.map +1 -1
  257. package/dist/src/sources/clone-url.js +6 -6
  258. package/dist/src/sources/clone-url.js.map +1 -1
  259. package/dist/src/sources/github/api.d.ts +3 -21
  260. package/dist/src/sources/github/api.d.ts.map +1 -1
  261. package/dist/src/sources/github/api.js +16 -28
  262. package/dist/src/sources/github/api.js.map +1 -1
  263. package/dist/src/sources/github/index.d.ts +1 -1
  264. package/dist/src/sources/github/index.d.ts.map +1 -1
  265. package/dist/src/sources/github/index.js +1 -1
  266. package/dist/src/sources/github/index.js.map +1 -1
  267. package/dist/src/sources/github/resolve-repo.d.ts +2 -2
  268. package/dist/src/sources/github/resolve-repo.d.ts.map +1 -1
  269. package/dist/src/sources/github/resolve-repo.js +5 -4
  270. package/dist/src/sources/github/resolve-repo.js.map +1 -1
  271. package/dist/src/sources/github/scp.d.ts +1 -2
  272. package/dist/src/sources/github/scp.d.ts.map +1 -1
  273. package/dist/src/sources/github/scp.js +6 -2
  274. package/dist/src/sources/github/scp.js.map +1 -1
  275. package/dist/src/sources/github/shorthand.d.ts +1 -1
  276. package/dist/src/sources/github/shorthand.d.ts.map +1 -1
  277. package/dist/src/sources/github/url.d.ts +1 -2
  278. package/dist/src/sources/github/url.d.ts.map +1 -1
  279. package/dist/src/sources/github/url.js +11 -3
  280. package/dist/src/sources/github/url.js.map +1 -1
  281. package/dist/src/sources/gitlab/resolve-repo.d.ts +2 -2
  282. package/dist/src/sources/gitlab/resolve-repo.d.ts.map +1 -1
  283. package/dist/src/sources/gitlab/resolve-repo.js +5 -4
  284. package/dist/src/sources/gitlab/resolve-repo.js.map +1 -1
  285. package/dist/src/sources/gitlab/scp.d.ts +1 -2
  286. package/dist/src/sources/gitlab/scp.d.ts.map +1 -1
  287. package/dist/src/sources/gitlab/scp.js +6 -2
  288. package/dist/src/sources/gitlab/scp.js.map +1 -1
  289. package/dist/src/sources/gitlab/shorthand.d.ts +1 -1
  290. package/dist/src/sources/gitlab/shorthand.d.ts.map +1 -1
  291. package/dist/src/sources/gitlab/url.d.ts +1 -2
  292. package/dist/src/sources/gitlab/url.d.ts.map +1 -1
  293. package/dist/src/sources/gitlab/url.js +11 -3
  294. package/dist/src/sources/gitlab/url.js.map +1 -1
  295. package/dist/src/sources/index.d.ts +0 -4
  296. package/dist/src/sources/index.d.ts.map +1 -1
  297. package/dist/src/sources/index.js +2 -3
  298. package/dist/src/sources/index.js.map +1 -1
  299. package/dist/src/sources/local/parser.d.ts +2 -2
  300. package/dist/src/sources/local/parser.d.ts.map +1 -1
  301. package/dist/src/sources/local/parser.js.map +1 -1
  302. package/dist/src/sources/parse-provider-shorthand.d.ts +2 -3
  303. package/dist/src/sources/parse-provider-shorthand.d.ts.map +1 -1
  304. package/dist/src/sources/parse-provider-shorthand.js +7 -3
  305. package/dist/src/sources/parse-provider-shorthand.js.map +1 -1
  306. package/dist/src/sources/provider.d.ts +5 -44
  307. package/dist/src/sources/provider.d.ts.map +1 -1
  308. package/dist/src/sources/provider.js +12 -26
  309. package/dist/src/sources/provider.js.map +1 -1
  310. package/dist/src/sources/providers/azurerepos.js +7 -7
  311. package/dist/src/sources/providers/azurerepos.js.map +1 -1
  312. package/dist/src/sources/providers/git-hosting.d.ts +3 -3
  313. package/dist/src/sources/providers/git-hosting.d.ts.map +1 -1
  314. package/dist/src/sources/providers/git-hosting.js +14 -33
  315. package/dist/src/sources/providers/git-hosting.js.map +1 -1
  316. package/dist/src/sources/providers/git.js +7 -7
  317. package/dist/src/sources/providers/git.js.map +1 -1
  318. package/dist/src/sources/providers/local.d.ts.map +1 -1
  319. package/dist/src/sources/providers/local.js +7 -18
  320. package/dist/src/sources/providers/local.js.map +1 -1
  321. package/dist/src/sources/providers/registry.d.ts +5 -5
  322. package/dist/src/sources/providers/registry.d.ts.map +1 -1
  323. package/dist/src/sources/providers/registry.js +136 -92
  324. package/dist/src/sources/providers/registry.js.map +1 -1
  325. package/dist/src/sources/registry-guard.d.ts +2 -3
  326. package/dist/src/sources/registry-guard.d.ts.map +1 -1
  327. package/dist/src/sources/registry-guard.js +8 -6
  328. package/dist/src/sources/registry-guard.js.map +1 -1
  329. package/dist/src/sources/resolve-source.d.ts +3 -3
  330. package/dist/src/sources/resolve-source.d.ts.map +1 -1
  331. package/dist/src/sources/resolve-source.js +83 -49
  332. package/dist/src/sources/resolve-source.js.map +1 -1
  333. package/dist/src/sources/service.d.ts +3 -4
  334. package/dist/src/sources/service.d.ts.map +1 -1
  335. package/dist/src/sources/service.js +8 -5
  336. package/dist/src/sources/service.js.map +1 -1
  337. package/dist/src/tui/confirm/service.d.ts +2 -2
  338. package/dist/src/tui/confirm/service.d.ts.map +1 -1
  339. package/dist/src/tui/confirm/service.js.map +1 -1
  340. package/dist/src/tui/errors.d.ts +0 -9
  341. package/dist/src/tui/errors.d.ts.map +1 -1
  342. package/dist/src/tui/errors.js +0 -2
  343. package/dist/src/tui/errors.js.map +1 -1
  344. package/dist/src/tui/index.d.ts +1 -1
  345. package/dist/src/tui/index.d.ts.map +1 -1
  346. package/dist/src/tui/index.js +1 -1
  347. package/dist/src/tui/index.js.map +1 -1
  348. package/dist/src/tui/multiselect/service.d.ts +3 -2
  349. package/dist/src/tui/multiselect/service.d.ts.map +1 -1
  350. package/dist/src/tui/multiselect/service.js +7 -5
  351. package/dist/src/tui/multiselect/service.js.map +1 -1
  352. package/dist/src/tui/password-input/service.d.ts +3 -2
  353. package/dist/src/tui/password-input/service.d.ts.map +1 -1
  354. package/dist/src/tui/password-input/service.js +7 -5
  355. package/dist/src/tui/password-input/service.js.map +1 -1
  356. package/dist/src/tui/select/service.d.ts +3 -2
  357. package/dist/src/tui/select/service.d.ts.map +1 -1
  358. package/dist/src/tui/select/service.js +5 -5
  359. package/dist/src/tui/select/service.js.map +1 -1
  360. package/dist/src/tui/spinner/index.d.ts +1 -1
  361. package/dist/src/tui/spinner/index.d.ts.map +1 -1
  362. package/dist/src/tui/spinner/service.d.ts +1 -5
  363. package/dist/src/tui/spinner/service.d.ts.map +1 -1
  364. package/dist/src/tui/spinner/service.js +25 -12
  365. package/dist/src/tui/spinner/service.js.map +1 -1
  366. package/dist/src/tui/spinner/test.d.ts +3 -0
  367. package/dist/src/tui/spinner/test.d.ts.map +1 -1
  368. package/dist/src/tui/spinner/test.js +9 -0
  369. package/dist/src/tui/spinner/test.js.map +1 -1
  370. package/dist/src/tui/spinner/types.d.ts +5 -0
  371. package/dist/src/tui/spinner/types.d.ts.map +1 -1
  372. package/dist/src/tui/text-input/service.d.ts +2 -2
  373. package/dist/src/tui/text-input/service.d.ts.map +1 -1
  374. package/dist/src/tui/text-input/service.js.map +1 -1
  375. package/dist/src/utils/create-symlink.d.ts +1 -14
  376. package/dist/src/utils/create-symlink.d.ts.map +1 -1
  377. package/dist/src/utils/create-symlink.js +17 -15
  378. package/dist/src/utils/create-symlink.js.map +1 -1
  379. package/dist/src/utils/index.d.ts +1 -2
  380. package/dist/src/utils/index.d.ts.map +1 -1
  381. package/dist/src/utils/index.js +1 -2
  382. package/dist/src/utils/index.js.map +1 -1
  383. package/dist/src/workspace/apply-plan.d.ts +5 -17
  384. package/dist/src/workspace/apply-plan.d.ts.map +1 -1
  385. package/dist/src/workspace/apply-plan.js +3 -12
  386. package/dist/src/workspace/apply-plan.js.map +1 -1
  387. package/dist/src/workspace/ensure-agents.d.ts +2 -15
  388. package/dist/src/workspace/ensure-agents.d.ts.map +1 -1
  389. package/dist/src/workspace/ensure-agents.js +7 -15
  390. package/dist/src/workspace/ensure-agents.js.map +1 -1
  391. package/dist/src/workspace/errors.d.ts +1 -1
  392. package/dist/src/workspace/errors.d.ts.map +1 -1
  393. package/dist/src/workspace/index.d.ts +1 -2
  394. package/dist/src/workspace/index.d.ts.map +1 -1
  395. package/dist/src/workspace/index.js +1 -2
  396. package/dist/src/workspace/index.js.map +1 -1
  397. package/dist/src/workspace/service.d.ts +30 -23
  398. package/dist/src/workspace/service.d.ts.map +1 -1
  399. package/dist/src/workspace/service.js +105 -38
  400. package/dist/src/workspace/service.js.map +1 -1
  401. package/package.json +1 -1
@@ -5,7 +5,7 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
  import * as Effect from "effect/Effect";
8
- import { GitError } from "./errors.js";
8
+ import { type CliError } from "../cli-error/index.js";
9
9
  /**
10
10
  * Clone a git repository to destination.
11
11
  * If ref provided, checkout that ref after clone.
@@ -17,7 +17,7 @@ import { GitError } from "./errors.js";
17
17
  *
18
18
  * @experimental This API is unstable and may change without notice.
19
19
  */
20
- export declare const cloneRepo: (url: string, destination: string, ref?: string) => Effect.Effect<void, GitError>;
20
+ export declare const cloneRepo: (url: string, destination: string, ref?: string) => Effect.Effect<void, CliError, never>;
21
21
  /**
22
22
  * Shallow clone a git repository (depth 1, single branch).
23
23
  * Significantly faster than a full clone for read-only use cases like skill discovery.
@@ -29,7 +29,7 @@ export declare const cloneRepo: (url: string, destination: string, ref?: string)
29
29
  *
30
30
  * @experimental This API is unstable and may change without notice.
31
31
  */
32
- export declare const shallowClone: (url: string, destination: string, ref?: string) => Effect.Effect<void, GitError>;
32
+ export declare const shallowClone: (url: string, destination: string, ref?: string) => Effect.Effect<string, CliError, never>;
33
33
  /**
34
34
  * Resolve a ref (tag, branch, SHA) to a full commit SHA.
35
35
  *
@@ -39,7 +39,7 @@ export declare const shallowClone: (url: string, destination: string, ref?: stri
39
39
  *
40
40
  * @experimental This API is unstable and may change without notice.
41
41
  */
42
- export declare const resolveRef: (repoPath: string, ref: string) => Effect.Effect<string, GitError>;
42
+ export declare const resolveRef: (repoPath: string, ref: string) => Effect.Effect<string, CliError, never>;
43
43
  /**
44
44
  * Get the current HEAD commit SHA.
45
45
  * Used after clone to record in lockfile.
@@ -49,7 +49,7 @@ export declare const resolveRef: (repoPath: string, ref: string) => Effect.Effec
49
49
  *
50
50
  * @experimental This API is unstable and may change without notice.
51
51
  */
52
- export declare const getCurrentCommit: (repoPath: string) => Effect.Effect<string, GitError>;
52
+ export declare const getCurrentCommit: (repoPath: string) => Effect.Effect<string, CliError, never>;
53
53
  /**
54
54
  * Get the git tree SHA for a path within a repository.
55
55
  *
@@ -62,7 +62,7 @@ export declare const getCurrentCommit: (repoPath: string) => Effect.Effect<strin
62
62
  *
63
63
  * @experimental This API is unstable and may change without notice.
64
64
  */
65
- export declare const getTreeSha: (repoPath: string, subPath?: string) => Effect.Effect<string, GitError>;
65
+ export declare const getTreeSha: (repoPath: string, subPath?: string) => Effect.Effect<string, CliError, never>;
66
66
  /**
67
67
  * Check if a directory is within a git repository.
68
68
  *
@@ -71,5 +71,5 @@ export declare const getTreeSha: (repoPath: string, subPath?: string) => Effect.
71
71
  *
72
72
  * @experimental This API is unstable and may change without notice.
73
73
  */
74
- export declare const isGitRepository: (dirPath: string) => Effect.Effect<boolean, never>;
74
+ export declare const isGitRepository: (dirPath: string) => Effect.Effect<boolean, never, never>;
75
75
  //# sourceMappingURL=operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/git/operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAgDvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,GACpB,KAAK,MAAM,EACX,aAAa,MAAM,EACnB,MAAM,MAAM,KACX,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAe3B,CAAC;AAEL;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GACvB,KAAK,MAAM,EACX,aAAa,MAAM,EACnB,MAAM,MAAM,KACX,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAU3B,CAAC;AAEL;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,KAAK,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CASrF,CAAC;AAEL;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAQ9E,CAAC;AAEL;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,gBAAa,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CA2BvF,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAO3E,CAAC"}
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/git/operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,uBAAuB,CAAC;AA2DpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,EAAE,aAAa,MAAM,EAAE,MAAM,MAAM,yCAe7B,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,aAAa,MAAM,EAAE,MAAM,MAAM,2CAU7B,CAAC;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,KAAK,MAAM,2CASZ,CAAC;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,2CAQC,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,gBAAa,2CA2Bd,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,yCAQ5C,CAAC"}
@@ -8,7 +8,7 @@ import * as Array from "effect/Array";
8
8
  import * as Effect from "effect/Effect";
9
9
  import * as Option from "effect/Option";
10
10
  import simpleGit, {} from "simple-git";
11
- import { GitError } from "./errors.js";
11
+ import { makeCliError } from "../cli-error/index.js";
12
12
  // -----------------------------------------------------------------------------
13
13
  // Internal Helpers
14
14
  // -----------------------------------------------------------------------------
@@ -25,22 +25,25 @@ const createGit = (baseDir) => {
25
25
  };
26
26
  return simpleGit(options);
27
27
  };
28
+ const operationToCode = {
29
+ clone: "GIT_CLONE_FAILED",
30
+ checkout: "GIT_CHECKOUT_FAILED",
31
+ "resolve-ref": "GIT_RESOLVE_REF_FAILED",
32
+ "get-commit": "GIT_GET_COMMIT_FAILED",
33
+ "get-tree-sha": "GIT_GET_TREE_SHA_FAILED",
34
+ "is-git-repo": "GIT_IS_GIT_REPO_FAILED",
35
+ };
28
36
  /**
29
- * Maps unknown errors to GitError with appropriate context.
37
+ * Maps unknown errors to CliError with appropriate context.
30
38
  */
31
39
  const mapGitError = (operation, context) => (error) => {
32
40
  const baseMessage = context ?? `Git ${operation} failed`;
33
- if (error instanceof Error) {
34
- return new GitError({
35
- operation,
36
- message: `${baseMessage}: ${error.message}`,
37
- cause: Option.some(error),
38
- });
39
- }
40
- return new GitError({
41
- operation,
42
- message: `${baseMessage}: ${String(error)}`,
43
- cause: Option.some(error),
41
+ const details = error instanceof Error ? [error.message] : [String(error)];
42
+ return makeCliError({
43
+ code: operationToCode[operation],
44
+ what: baseMessage,
45
+ details,
46
+ cause: error,
44
47
  });
45
48
  };
46
49
  // -----------------------------------------------------------------------------
@@ -70,7 +73,7 @@ export const cloneRepo = (url, destination, ref) => Effect.gen(function* () {
70
73
  catch: mapGitError("checkout", `Failed to checkout ref '${ref}'`),
71
74
  });
72
75
  }
73
- });
76
+ }).pipe(Effect.withSpan("Git.cloneRepo"));
74
77
  /**
75
78
  * Shallow clone a git repository (depth 1, single branch).
76
79
  * Significantly faster than a full clone for read-only use cases like skill discovery.
@@ -90,7 +93,7 @@ export const shallowClone = (url, destination, ref) => Effect.tryPromise({
90
93
  ...(ref ? ["--branch", ref] : []),
91
94
  ]),
92
95
  catch: mapGitError("clone", `Failed to shallow clone ${url}`),
93
- });
96
+ }).pipe(Effect.withSpan("Git.shallowClone"));
94
97
  /**
95
98
  * Resolve a ref (tag, branch, SHA) to a full commit SHA.
96
99
  *
@@ -108,7 +111,7 @@ export const resolveRef = (repoPath, ref) => Effect.tryPromise({
108
111
  return sha.trim();
109
112
  },
110
113
  catch: mapGitError("resolve-ref", `Failed to resolve ref '${ref}'`),
111
- });
114
+ }).pipe(Effect.withSpan("Git.resolveRef"));
112
115
  /**
113
116
  * Get the current HEAD commit SHA.
114
117
  * Used after clone to record in lockfile.
@@ -125,7 +128,7 @@ export const getCurrentCommit = (repoPath) => Effect.tryPromise({
125
128
  return sha.trim();
126
129
  },
127
130
  catch: mapGitError("get-commit", "Failed to get current commit"),
128
- });
131
+ }).pipe(Effect.withSpan("Git.getCurrentCommit"));
129
132
  /**
130
133
  * Get the git tree SHA for a path within a repository.
131
134
  *
@@ -159,7 +162,7 @@ export const getTreeSha = (repoPath, subPath = ".") => Effect.tryPromise({
159
162
  return sha;
160
163
  },
161
164
  catch: mapGitError("get-tree-sha", `Failed to get tree SHA for '${subPath}'`),
162
- });
165
+ }).pipe(Effect.withSpan("Git.getTreeSha"));
163
166
  /**
164
167
  * Check if a directory is within a git repository.
165
168
  *
@@ -171,5 +174,5 @@ export const getTreeSha = (repoPath, subPath = ".") => Effect.tryPromise({
171
174
  export const isGitRepository = (dirPath) => Effect.tryPromise({
172
175
  try: () => createGit(dirPath).revparse(["--git-dir"]),
173
176
  catch: mapGitError("is-git-repo", `Failed to check git repository at '${dirPath}'`),
174
- }).pipe(Effect.as(true), Effect.catchAll(() => Effect.succeed(false)));
177
+ }).pipe(Effect.as(true), Effect.catchAll(() => Effect.succeed(false)), Effect.withSpan("Git.isGitRepository"));
175
178
  //# sourceMappingURL=operations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/git/operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,C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sCAAsC,OAAO,GAAG,CAAC;CACpF,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EACf,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAC5C,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACvC,CAAC"}
@@ -9,7 +9,6 @@
9
9
  */
10
10
  export type { Lockfile, SkillLockEntry, SkillsLockMap } from "./schema.js";
11
11
  export { AzureReposLockEntrySchema, BitbucketLockEntrySchema, DateFromString, GitHubLockEntrySchema, GitLabLockEntrySchema, GitLockEntrySchema, LocalLockEntrySchema, LockfileSchema, RegistryLockEntrySchema, SkillLockEntrySchema, SkillsLockMapSchema, } from "./schema.js";
12
- export type { LockfileError } from "./lockfile.js";
13
- export { LOCKFILE_NAME, LockfileNotFoundError, LockfileParseError, LockfileWriteError, } from "./lockfile.js";
12
+ export { LOCKFILE_NAME } from "./lockfile.js";
14
13
  export { readLockfile, writeLockfile } from "./lockfile.js";
15
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAGrB,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
@@ -8,6 +8,7 @@
8
8
  * @packageDocumentation
9
9
  */
10
10
  export { AzureReposLockEntrySchema, BitbucketLockEntrySchema, DateFromString, GitHubLockEntrySchema, GitLabLockEntrySchema, GitLockEntrySchema, LocalLockEntrySchema, LockfileSchema, RegistryLockEntrySchema, SkillLockEntrySchema, SkillsLockMapSchema, } from "./schema.js";
11
- export { LOCKFILE_NAME, LockfileNotFoundError, LockfileParseError, LockfileWriteError, } from "./lockfile.js";
11
+ // Lockfile I/O
12
+ export { LOCKFILE_NAME } from "./lockfile.js";
12
13
  export { readLockfile, writeLockfile } from "./lockfile.js";
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAIrB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,eAAe;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
@@ -10,6 +10,7 @@
10
10
  import * as FileSystem from "@effect/platform/FileSystem";
11
11
  import * as Path from "@effect/platform/Path";
12
12
  import * as Effect from "effect/Effect";
13
+ import { type CliError } from "../cli-error/index.js";
13
14
  import { type Lockfile } from "./schema.js";
14
15
  /**
15
16
  * Filename for the lockfile.
@@ -17,65 +18,91 @@ import { type Lockfile } from "./schema.js";
17
18
  * @experimental This API is unstable and may change without notice.
18
19
  */
19
20
  export declare const LOCKFILE_NAME = "axm-lock.yaml";
20
- declare const LockfileNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
21
- readonly _tag: "LockfileNotFoundError";
22
- } & Readonly<A>;
23
- /**
24
- * Error when lockfile does not exist.
25
- *
26
- * @experimental This API is unstable and may change without notice.
27
- */
28
- export declare class LockfileNotFoundError extends LockfileNotFoundError_base<{
29
- readonly path: string;
30
- readonly message: string;
31
- }> {
32
- }
33
- declare const LockfileParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
34
- readonly _tag: "LockfileParseError";
35
- } & Readonly<A>;
36
- /**
37
- * Error parsing the lockfile YAML content.
38
- *
39
- * @experimental This API is unstable and may change without notice.
40
- */
41
- export declare class LockfileParseError extends LockfileParseError_base<{
42
- readonly message: string;
43
- readonly cause?: unknown;
44
- readonly retryable: boolean;
45
- }> {
46
- }
47
- declare const LockfileWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
48
- readonly _tag: "LockfileWriteError";
49
- } & Readonly<A>;
50
- /**
51
- * Error writing the lockfile to disk.
52
- *
53
- * @experimental This API is unstable and may change without notice.
54
- */
55
- export declare class LockfileWriteError extends LockfileWriteError_base<{
56
- readonly message: string;
57
- readonly cause?: unknown;
58
- readonly retryable: boolean;
59
- }> {
60
- }
61
- /**
62
- * Union of all lockfile-related errors.
63
- *
64
- * @experimental This API is unstable and may change without notice.
65
- */
66
- export type LockfileError = LockfileNotFoundError | LockfileParseError | LockfileWriteError;
67
21
  /**
68
22
  * Reads and parses the lockfile from `.axm/axm-lock.yaml`.
69
23
  *
70
24
  * Returns an empty lockfile if the file does not exist.
71
- * Returns a LockfileParseError if the file exists but is invalid.
25
+ * Returns a CliError if the file exists but is invalid.
72
26
  *
73
27
  * @param axmDir - Path to the `.axm` directory
74
28
  * @returns Effect yielding the parsed Lockfile
75
29
  *
76
30
  * @experimental This API is unstable and may change without notice.
77
31
  */
78
- export declare const readLockfile: (axmDir: string) => Effect.Effect<Lockfile, LockfileError, FileSystem.FileSystem | Path.Path>;
32
+ export declare const readLockfile: (axmDir: string) => Effect.Effect<{
33
+ readonly skills: {
34
+ readonly [x: string]: {
35
+ readonly ref?: string | undefined;
36
+ readonly type: "github";
37
+ readonly path?: string | undefined;
38
+ readonly agents: readonly string[];
39
+ readonly owner: string;
40
+ readonly repo: string;
41
+ readonly installedAt: Date;
42
+ readonly updatedAt: Date;
43
+ readonly gitTreeHash?: string | undefined;
44
+ } | {
45
+ readonly ref?: string | undefined;
46
+ readonly type: "gitlab";
47
+ readonly path?: string | undefined;
48
+ readonly agents: readonly string[];
49
+ readonly owner: string;
50
+ readonly repo: string;
51
+ readonly installedAt: Date;
52
+ readonly updatedAt: Date;
53
+ readonly gitTreeHash?: string | undefined;
54
+ } | {
55
+ readonly ref?: string | undefined;
56
+ readonly type: "bitbucket";
57
+ readonly path?: string | undefined;
58
+ readonly agents: readonly string[];
59
+ readonly owner: string;
60
+ readonly repo: string;
61
+ readonly installedAt: Date;
62
+ readonly updatedAt: Date;
63
+ readonly gitTreeHash?: string | undefined;
64
+ } | {
65
+ readonly ref?: string | undefined;
66
+ readonly type: "azurerepos";
67
+ readonly path?: string | undefined;
68
+ readonly agents: readonly string[];
69
+ readonly repo: string;
70
+ readonly organization: string;
71
+ readonly project: string;
72
+ readonly installedAt: Date;
73
+ readonly updatedAt: Date;
74
+ readonly gitTreeHash?: string | undefined;
75
+ } | {
76
+ readonly ref?: string | undefined;
77
+ readonly type: "git";
78
+ readonly path?: string | undefined;
79
+ readonly url: string;
80
+ readonly agents: readonly string[];
81
+ readonly installedAt: Date;
82
+ readonly updatedAt: Date;
83
+ readonly gitTreeHash?: string | undefined;
84
+ } | {
85
+ readonly type: "local";
86
+ readonly path: string;
87
+ readonly agents: readonly string[];
88
+ readonly installedAt: Date;
89
+ readonly updatedAt: Date;
90
+ readonly gitTreeHash?: string | undefined;
91
+ } | {
92
+ readonly type: "registry";
93
+ readonly name: string;
94
+ readonly scope: string;
95
+ readonly agents: readonly string[];
96
+ readonly checksum: string;
97
+ readonly installedAt: Date;
98
+ readonly updatedAt: Date;
99
+ readonly gitTreeHash?: string | undefined;
100
+ readonly resolvedVersion: string;
101
+ readonly sourceName: string;
102
+ };
103
+ };
104
+ readonly lockfileVersion: number;
105
+ }, CliError, FileSystem.FileSystem | Path.Path>;
79
106
  /**
80
107
  * Writes the lockfile to `.axm/axm-lock.yaml` in YAML format.
81
108
  *
@@ -88,6 +115,5 @@ export declare const readLockfile: (axmDir: string) => Effect.Effect<Lockfile, L
88
115
  *
89
116
  * @experimental This API is unstable and may change without notice.
90
117
  */
91
- export declare const writeLockfile: (axmDir: string, lockfile: Lockfile) => Effect.Effect<void, LockfileError, FileSystem.FileSystem | Path.Path>;
92
- export {};
118
+ export declare const writeLockfile: (axmDir: string, lockfile: Lockfile) => Effect.Effect<void, CliError, FileSystem.FileSystem | Path.Path>;
93
119
  //# sourceMappingURL=lockfile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lockfile.d.ts","sourceRoot":"","sources":["../../../src/lockfile/lockfile.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAM5D;;;;GAIG;AACH,eAAO,MAAM,aAAa,kBAAkB,CAAC;;;;AAQ7C;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,2BAA0C;IACnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;;;;AAEL;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,wBAAuC;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B,CAAC;CAAG;;;;AAEL;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,wBAAuC;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAA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5D,CAAC"}
@@ -9,10 +9,10 @@
9
9
  */
10
10
  import * as FileSystem from "@effect/platform/FileSystem";
11
11
  import * as Path from "@effect/platform/Path";
12
- import * as Data from "effect/Data";
13
12
  import * as Effect from "effect/Effect";
14
13
  import * as Schema from "effect/Schema";
15
14
  import YAML from "yaml";
15
+ import { makeCliError } from "../cli-error/index.js";
16
16
  import { LockfileSchema } from "./schema.js";
17
17
  // -----------------------------------------------------------------------------
18
18
  // Constants
@@ -25,30 +25,6 @@ import { LockfileSchema } from "./schema.js";
25
25
  export const LOCKFILE_NAME = "axm-lock.yaml";
26
26
  const LOCKFILE_VERSION = 1;
27
27
  // -----------------------------------------------------------------------------
28
- // Error Types
29
- // -----------------------------------------------------------------------------
30
- /**
31
- * Error when lockfile does not exist.
32
- *
33
- * @experimental This API is unstable and may change without notice.
34
- */
35
- export class LockfileNotFoundError extends Data.TaggedError("LockfileNotFoundError") {
36
- }
37
- /**
38
- * Error parsing the lockfile YAML content.
39
- *
40
- * @experimental This API is unstable and may change without notice.
41
- */
42
- export class LockfileParseError extends Data.TaggedError("LockfileParseError") {
43
- }
44
- /**
45
- * Error writing the lockfile to disk.
46
- *
47
- * @experimental This API is unstable and may change without notice.
48
- */
49
- export class LockfileWriteError extends Data.TaggedError("LockfileWriteError") {
50
- }
51
- // -----------------------------------------------------------------------------
52
28
  // Internal Helpers
53
29
  // -----------------------------------------------------------------------------
54
30
  /**
@@ -60,12 +36,12 @@ const createEmptyLockfile = () => ({
60
36
  });
61
37
  /**
62
38
  * Validates parsed YAML data against the lockfile schema.
63
- * Returns a typed LockfileParseError on validation failure.
39
+ * Returns a CliError on validation failure.
64
40
  */
65
- const decodeLockfile = (data) => Schema.decodeUnknown(LockfileSchema)(data).pipe(Effect.mapError((e) => new LockfileParseError({
66
- message: "Invalid lockfile format",
41
+ const decodeLockfile = (data) => Schema.decodeUnknown(LockfileSchema)(data).pipe(Effect.mapError((e) => makeCliError({
42
+ code: "LOCKFILE_PARSE_FAILED",
43
+ what: "Invalid lockfile format",
67
44
  cause: e,
68
- retryable: false,
69
45
  })));
70
46
  // -----------------------------------------------------------------------------
71
47
  // Public Functions
@@ -74,7 +50,7 @@ const decodeLockfile = (data) => Schema.decodeUnknown(LockfileSchema)(data).pipe
74
50
  * Reads and parses the lockfile from `.axm/axm-lock.yaml`.
75
51
  *
76
52
  * Returns an empty lockfile if the file does not exist.
77
- * Returns a LockfileParseError if the file exists but is invalid.
53
+ * Returns a CliError if the file exists but is invalid.
78
54
  *
79
55
  * @param axmDir - Path to the `.axm` directory
80
56
  * @returns Effect yielding the parsed Lockfile
@@ -86,27 +62,27 @@ export const readLockfile = (axmDir) => Effect.gen(function* () {
86
62
  const path = yield* Path.Path;
87
63
  const lockfilePath = path.join(axmDir, LOCKFILE_NAME);
88
64
  // Check if file exists
89
- const exists = yield* fs.exists(lockfilePath).pipe(Effect.mapError((error) => new LockfileParseError({
90
- message: `Failed to check if lockfile exists at ${lockfilePath}`,
65
+ const exists = yield* fs.exists(lockfilePath).pipe(Effect.mapError((error) => makeCliError({
66
+ code: "LOCKFILE_PARSE_FAILED",
67
+ what: `Failed to check if lockfile exists at ${lockfilePath}`,
91
68
  cause: error,
92
- retryable: false,
93
69
  })));
94
70
  if (!exists) {
95
71
  return createEmptyLockfile();
96
72
  }
97
73
  // Read and parse the file
98
- const content = yield* fs.readFileString(lockfilePath).pipe(Effect.mapError((error) => new LockfileParseError({
99
- message: `Failed to read lockfile at ${lockfilePath}`,
74
+ const content = yield* fs.readFileString(lockfilePath).pipe(Effect.mapError((error) => makeCliError({
75
+ code: "LOCKFILE_PARSE_FAILED",
76
+ what: `Failed to read lockfile at ${lockfilePath}`,
100
77
  cause: error,
101
- retryable: false,
102
78
  })));
103
79
  // Parse YAML
104
80
  const parsed = yield* Effect.try({
105
81
  try: () => YAML.parse(content),
106
- catch: (error) => new LockfileParseError({
107
- message: `Failed to parse lockfile YAML at ${lockfilePath}`,
82
+ catch: (error) => makeCliError({
83
+ code: "LOCKFILE_PARSE_FAILED",
84
+ what: `Failed to parse lockfile YAML at ${lockfilePath}`,
108
85
  cause: error,
109
- retryable: false,
110
86
  }),
111
87
  });
112
88
  return yield* decodeLockfile(parsed);
@@ -128,34 +104,34 @@ export const writeLockfile = (axmDir, lockfile) => Effect.gen(function* () {
128
104
  const path = yield* Path.Path;
129
105
  const lockfilePath = path.join(axmDir, LOCKFILE_NAME);
130
106
  // Ensure directory exists
131
- yield* fs.makeDirectory(axmDir, { recursive: true }).pipe(Effect.mapError((error) => new LockfileWriteError({
132
- message: `Failed to create directory ${axmDir}`,
107
+ yield* fs.makeDirectory(axmDir, { recursive: true }).pipe(Effect.mapError((error) => makeCliError({
108
+ code: "LOCKFILE_WRITE_FAILED",
109
+ what: `Failed to create directory ${axmDir}`,
133
110
  cause: error,
134
- retryable: false,
135
111
  })));
136
112
  // Encode Dates to ISO strings for YAML serialization
137
113
  const encoded = yield* Effect.try({
138
114
  try: () => Schema.encodeSync(LockfileSchema)(lockfile),
139
- catch: (error) => new LockfileWriteError({
140
- message: "Failed to encode lockfile",
115
+ catch: (error) => makeCliError({
116
+ code: "LOCKFILE_WRITE_FAILED",
117
+ what: "Failed to encode lockfile",
141
118
  cause: error,
142
- retryable: false,
143
119
  }),
144
120
  });
145
121
  // Convert to YAML
146
122
  const yamlContent = yield* Effect.try({
147
123
  try: () => YAML.stringify(encoded),
148
- catch: (error) => new LockfileWriteError({
149
- message: "Failed to serialize lockfile to YAML",
124
+ catch: (error) => makeCliError({
125
+ code: "LOCKFILE_WRITE_FAILED",
126
+ what: "Failed to serialize lockfile to YAML",
150
127
  cause: error,
151
- retryable: false,
152
128
  }),
153
129
  });
154
130
  // Write file
155
- yield* fs.writeFileString(lockfilePath, yamlContent).pipe(Effect.mapError((error) => new LockfileWriteError({
156
- message: `Failed to write lockfile at ${lockfilePath}`,
131
+ yield* fs.writeFileString(lockfilePath, yamlContent).pipe(Effect.mapError((error) => makeCliError({
132
+ code: "LOCKFILE_WRITE_FAILED",
133
+ what: `Failed to write lockfile at ${lockfilePath}`,
157
134
  cause: error,
158
- retryable: false,
159
135
  })));
160
136
  });
161
137
  //# sourceMappingURL=lockfile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lockfile.js","sourceRoot":"","sources":["../../../src/lockfile/lockfile.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAiB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE5D,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAE7C,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,gFAAgF;AAChF,cAAc;AACd,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,OAAO,qBAAsB,SAAQ,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAGjF;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAI3E;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAI3E;CAAG;AASL,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,mBAAmB,GAAG,GAAa,EAAE,CAAC,CAAC;IAC3C,eAAe,EAAE,gBAAgB;IACjC,MAAM,EAAE,EAAE;CACX,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,IAAa,EAA+C,EAAE,CACp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QACX,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,+BAA+B,YAAY,EAAE;QACnD,KAAK,EAAE,KAAK;KACb,CAAC,CACH,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -7,7 +7,6 @@
7
7
  * @experimental This API is unstable and may change without notice.
8
8
  * @packageDocumentation
9
9
  */
10
- export { ResolutionError, type ResolutionErrorCode } from "./errors.js";
11
10
  export { defaultResolutionOptions, resolveExtension } from "./resolver.js";
12
11
  export type { ExtensionMetadata, ExtensionRef, ExtensionType, ResolutionOptions } from "./types.js";
13
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,eAAe,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE3E,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE3E,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
@@ -7,8 +7,6 @@
7
7
  * @experimental This API is unstable and may change without notice.
8
8
  * @packageDocumentation
9
9
  */
10
- // Re-export errors
11
- export { ResolutionError } from "./errors.js";
12
10
  // Re-export resolver
13
11
  export { defaultResolutionOptions, resolveExtension } from "./resolver.js";
14
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAA4B,MAAM,aAAa,CAAC;AACxE,qBAAqB;AACrB,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,qBAAqB;AACrB,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
  import * as Effect from "effect/Effect";
8
- import type { ResolutionError } from "./errors.js";
8
+ import type { CliError } from "../cli-error/index.js";
9
9
  import type { ExtensionRef, ResolutionOptions } from "./types.js";
10
10
  /**
11
11
  * Default resolution options with all fields set to None.
@@ -31,5 +31,5 @@ export declare const defaultResolutionOptions: ResolutionOptions;
31
31
  *
32
32
  * @experimental This API is unstable and may change without notice.
33
33
  */
34
- export declare const resolveExtension: (input: string, options?: ResolutionOptions) => Effect.Effect<ExtensionRef[], ResolutionError, any>;
34
+ export declare const resolveExtension: (input: string, options?: ResolutionOptions) => Effect.Effect<ExtensionRef[], CliError, any>;
35
35
  //# sourceMappingURL=resolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/resolution/resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAUnD,OAAO,KAAK,EAAE,YAAY,EAAiB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAQtC,CAAC;AAiDF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,UAAS,iBAA4C,wDAkCtD,CAAC"}
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/resolution/resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUtD,OAAO,KAAK,EAAE,YAAY,EAAiB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAQtC,CAAC;AAiDF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,UAAS,iBAA4C,iDAkCtD,CAAC"}
@@ -100,6 +100,6 @@ export const resolveExtension = (input, options = defaultResolutionOptions) => {
100
100
  const results = yield* tryResolvers(resolvers);
101
101
  const filteredBySource = filterBySource(results, Option.getOrUndefined(options.sources));
102
102
  return filterByType(filteredBySource, Option.getOrUndefined(options.types));
103
- });
103
+ }).pipe(Effect.withSpan("Resolution.resolveExtension"));
104
104
  };
105
105
  //# sourceMappingURL=resolver.js.map