agents-inc 0.161.1 → 0.163.0

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 (343) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/{chunk-DOQUAWL4.js → chunk-3CSK5CQN.js} +17 -16
  3. package/dist/chunk-3CSK5CQN.js.map +1 -0
  4. package/dist/{chunk-VFZF7LVY.js → chunk-3WVH2CTK.js} +3 -3
  5. package/dist/{chunk-SBL4AYSB.js → chunk-4VL3CEOS.js} +3 -3
  6. package/dist/{chunk-QM3ZNOWJ.js → chunk-6MV4JOCL.js} +2 -2
  7. package/dist/{chunk-ADSIYZGS.js → chunk-7ANJQLPJ.js} +2 -2
  8. package/dist/{chunk-3JDVBHWO.js → chunk-7REKOTKG.js} +2 -2
  9. package/dist/{chunk-MI7LKLD7.js → chunk-ABAZMMG4.js} +2 -2
  10. package/dist/{chunk-2P3MKX5Q.js → chunk-AOTCIUGX.js} +2 -2
  11. package/dist/{chunk-GUFRQJAE.js → chunk-ARYNOWKF.js} +8 -8
  12. package/dist/{chunk-3QBOVV6A.js → chunk-AVK2HEKB.js} +5 -5
  13. package/dist/{chunk-3QBOVV6A.js.map → chunk-AVK2HEKB.js.map} +1 -1
  14. package/dist/{chunk-Z56AUTER.js → chunk-B3Y3QMWI.js} +4 -4
  15. package/dist/{chunk-WDN4HAN7.js → chunk-DSL66I4N.js} +6 -6
  16. package/dist/{chunk-SXYFATQN.js → chunk-ECURHW3T.js} +12 -12
  17. package/dist/{chunk-TPRRWOHZ.js → chunk-FLW25ORT.js} +3 -3
  18. package/dist/{chunk-YC4CLTQE.js → chunk-IAVEMTN4.js} +35 -14
  19. package/dist/chunk-IAVEMTN4.js.map +1 -0
  20. package/dist/{chunk-F5JTW3HZ.js → chunk-JIERYE6B.js} +5 -5
  21. package/dist/{chunk-UE3MLDL2.js → chunk-K5ITEA3I.js} +4 -4
  22. package/dist/{chunk-Q4KCUR2T.js → chunk-LT5GXEB2.js} +6 -6
  23. package/dist/{chunk-C2K7Q7HO.js → chunk-NKGYKOB7.js} +3 -3
  24. package/dist/{chunk-X6KXPRKI.js → chunk-NQXO4LR3.js} +4 -4
  25. package/dist/{chunk-7ZFEZN4Y.js → chunk-NTF4UXGK.js} +71 -9
  26. package/dist/{chunk-7ZFEZN4Y.js.map → chunk-NTF4UXGK.js.map} +1 -1
  27. package/dist/{chunk-IAN7QDBR.js → chunk-O664ITBD.js} +108 -25
  28. package/dist/chunk-O664ITBD.js.map +1 -0
  29. package/dist/{chunk-77YZFVQD.js → chunk-PHCPUQVR.js} +2 -2
  30. package/dist/{chunk-U5O4BWKI.js → chunk-PM3374E7.js} +43 -41
  31. package/dist/chunk-PM3374E7.js.map +1 -0
  32. package/dist/{chunk-ESI3JYOQ.js → chunk-Q4IRRVXK.js} +3 -3
  33. package/dist/{chunk-EN5MEPAS.js → chunk-QGUP3QJF.js} +5 -5
  34. package/dist/{chunk-MSUTHS2V.js → chunk-QZX7SYKU.js} +2 -2
  35. package/dist/{chunk-ZPFM2VHZ.js → chunk-RGYDFBCT.js} +4 -4
  36. package/dist/{chunk-4NAWM4OQ.js → chunk-S63LXWMC.js} +2 -2
  37. package/dist/{chunk-QTLYSVYE.js → chunk-SMSB6YZW.js} +3 -3
  38. package/dist/{chunk-IV42Z63R.js → chunk-UITEKY2R.js} +19 -9
  39. package/dist/chunk-UITEKY2R.js.map +1 -0
  40. package/dist/{chunk-SWYV7QXX.js → chunk-URXIQE7I.js} +2 -2
  41. package/dist/{chunk-ZYXQUU2P.js → chunk-V5GLL2JB.js} +7 -7
  42. package/dist/{chunk-JEJJHRZA.js → chunk-X4SSJZLY.js} +77 -8
  43. package/dist/chunk-X4SSJZLY.js.map +1 -0
  44. package/dist/{chunk-QG4NRKZD.js → chunk-XATLUKXK.js} +5 -5
  45. package/dist/{chunk-RLSZWDTB.js → chunk-XHPWTL4I.js} +3 -3
  46. package/dist/{chunk-7WKNPDN2.js → chunk-XPDVAJDH.js} +112 -32
  47. package/dist/chunk-XPDVAJDH.js.map +1 -0
  48. package/dist/{chunk-FL2CJ5T5.js → chunk-YRS3QZP2.js} +3 -3
  49. package/dist/{chunk-FXL63LDL.js → chunk-ZVXGW2IC.js} +2 -2
  50. package/dist/commands/build/marketplace.js +7 -7
  51. package/dist/commands/build/plugins.js +7 -7
  52. package/dist/commands/compile.js +82 -30
  53. package/dist/commands/compile.js.map +1 -1
  54. package/dist/commands/doctor.js +10 -10
  55. package/dist/commands/doctor.js.map +1 -1
  56. package/dist/commands/edit.js +40 -38
  57. package/dist/commands/edit.js.map +1 -1
  58. package/dist/commands/eject.js +10 -10
  59. package/dist/commands/init.js +36 -36
  60. package/dist/commands/list.js +8 -8
  61. package/dist/commands/new/marketplace.js +7 -7
  62. package/dist/commands/search.js +15 -14
  63. package/dist/commands/search.js.map +1 -1
  64. package/dist/commands/share.js +22 -16
  65. package/dist/commands/share.js.map +1 -1
  66. package/dist/commands/uninstall.js +11 -11
  67. package/dist/commands/update.js +6 -6
  68. package/dist/components/common/removal-plan-confirm.js +2 -2
  69. package/dist/components/common/select-list.js +2 -2
  70. package/dist/components/wizard/category-grid.js +4 -4
  71. package/dist/components/wizard/checkbox-grid.js +4 -4
  72. package/dist/components/wizard/domain-selection.js +9 -9
  73. package/dist/components/wizard/run-wizard-session.js +26 -26
  74. package/dist/components/wizard/scroll-affordance.js +2 -2
  75. package/dist/components/wizard/skill-agent-summary.js +5 -5
  76. package/dist/components/wizard/source-grid.js +5 -5
  77. package/dist/components/wizard/stack-selection.js +7 -7
  78. package/dist/components/wizard/step-agents.js +8 -8
  79. package/dist/components/wizard/step-build.js +7 -7
  80. package/dist/components/wizard/step-confirm.js +9 -9
  81. package/dist/components/wizard/step-sources.js +8 -8
  82. package/dist/components/wizard/step-stack.js +8 -8
  83. package/dist/components/wizard/summary-panel.js +8 -8
  84. package/dist/components/wizard/toast.js +2 -2
  85. package/dist/components/wizard/wizard-layout.js +12 -12
  86. package/dist/components/wizard/wizard-tabs.js +2 -2
  87. package/dist/components/wizard/wizard.js +25 -25
  88. package/dist/hooks/init.js +36 -36
  89. package/dist/load-agent-defs-5J2MZLAA.js +13 -0
  90. package/dist/recompile-project-agents-FCJLHAE3.js +17 -0
  91. package/dist/{source-loader-7T754EZC.js → source-loader-GRBVNRAW.js} +4 -4
  92. package/dist/src/agents/_templates/agent.liquid +30 -122
  93. package/dist/src/agents/_templates/methodologies/operating-principles.liquid +27 -0
  94. package/dist/src/agents/developer/ai-developer/critical-reminders.md +9 -48
  95. package/dist/src/agents/developer/ai-developer/critical-requirements.md +29 -47
  96. package/dist/src/agents/developer/ai-developer/identity.md +31 -40
  97. package/dist/src/agents/developer/ai-developer/output.md +92 -245
  98. package/dist/src/agents/developer/ai-developer/playbook.md +116 -270
  99. package/dist/src/agents/developer/api-developer/critical-reminders.md +9 -40
  100. package/dist/src/agents/developer/api-developer/critical-requirements.md +19 -34
  101. package/dist/src/agents/developer/api-developer/identity.md +18 -33
  102. package/dist/src/agents/developer/api-developer/output.md +118 -255
  103. package/dist/src/agents/developer/api-developer/playbook.md +103 -284
  104. package/dist/src/agents/developer/cli-developer/critical-reminders.md +9 -45
  105. package/dist/src/agents/developer/cli-developer/critical-requirements.md +21 -39
  106. package/dist/src/agents/developer/cli-developer/identity.md +22 -36
  107. package/dist/src/agents/developer/cli-developer/output.md +72 -185
  108. package/dist/src/agents/developer/cli-developer/playbook.md +107 -307
  109. package/dist/src/agents/developer/web-developer/critical-reminders.md +9 -34
  110. package/dist/src/agents/developer/web-developer/critical-requirements.md +11 -30
  111. package/dist/src/agents/developer/web-developer/identity.md +15 -15
  112. package/dist/src/agents/developer/web-developer/output.md +67 -220
  113. package/dist/src/agents/developer/web-developer/playbook.md +93 -283
  114. package/dist/src/agents/meta/agent-summoner/critical-reminders.md +6 -39
  115. package/dist/src/agents/meta/agent-summoner/critical-requirements.md +6 -44
  116. package/dist/src/agents/meta/agent-summoner/identity.md +20 -23
  117. package/dist/src/agents/meta/agent-summoner/metadata.yaml +1 -1
  118. package/dist/src/agents/meta/agent-summoner/output.md +85 -261
  119. package/dist/src/agents/meta/agent-summoner/playbook.md +220 -1398
  120. package/dist/src/agents/meta/codex-keeper/critical-reminders.md +11 -32
  121. package/dist/src/agents/meta/codex-keeper/critical-requirements.md +32 -22
  122. package/dist/src/agents/meta/codex-keeper/identity.md +31 -32
  123. package/dist/src/agents/meta/codex-keeper/output.md +49 -335
  124. package/dist/src/agents/meta/codex-keeper/playbook.md +151 -1112
  125. package/dist/src/agents/meta/convention-keeper/critical-reminders.md +11 -26
  126. package/dist/src/agents/meta/convention-keeper/critical-requirements.md +36 -25
  127. package/dist/src/agents/meta/convention-keeper/identity.md +35 -21
  128. package/dist/src/agents/meta/convention-keeper/metadata.yaml +1 -1
  129. package/dist/src/agents/meta/convention-keeper/output.md +33 -123
  130. package/dist/src/agents/meta/convention-keeper/playbook.md +64 -144
  131. package/dist/src/agents/meta/skill-summoner/critical-reminders.md +8 -71
  132. package/dist/src/agents/meta/skill-summoner/critical-requirements.md +9 -73
  133. package/dist/src/agents/meta/skill-summoner/identity.md +18 -22
  134. package/dist/src/agents/meta/skill-summoner/metadata.yaml +1 -1
  135. package/dist/src/agents/meta/skill-summoner/output.md +164 -270
  136. package/dist/src/agents/meta/skill-summoner/playbook.md +150 -1398
  137. package/dist/src/agents/planning/pm/critical-requirements.md +23 -25
  138. package/dist/src/agents/planning/pm/identity.md +24 -23
  139. package/dist/src/agents/planning/pm/output.md +5 -9
  140. package/dist/src/agents/planning/pm/playbook.md +50 -140
  141. package/dist/src/agents/researcher/ai-researcher/critical-reminders.md +8 -53
  142. package/dist/src/agents/researcher/ai-researcher/critical-requirements.md +31 -26
  143. package/dist/src/agents/researcher/ai-researcher/identity.md +36 -77
  144. package/dist/src/agents/researcher/ai-researcher/output.md +44 -151
  145. package/dist/src/agents/researcher/ai-researcher/playbook.md +130 -394
  146. package/dist/src/agents/researcher/api-researcher/critical-reminders.md +6 -38
  147. package/dist/src/agents/researcher/api-researcher/critical-requirements.md +15 -17
  148. package/dist/src/agents/researcher/api-researcher/identity.md +29 -63
  149. package/dist/src/agents/researcher/api-researcher/output.md +61 -153
  150. package/dist/src/agents/researcher/api-researcher/playbook.md +63 -140
  151. package/dist/src/agents/researcher/cli-researcher/critical-reminders.md +8 -45
  152. package/dist/src/agents/researcher/cli-researcher/critical-requirements.md +29 -24
  153. package/dist/src/agents/researcher/cli-researcher/identity.md +36 -78
  154. package/dist/src/agents/researcher/cli-researcher/output.md +22 -128
  155. package/dist/src/agents/researcher/cli-researcher/playbook.md +108 -263
  156. package/dist/src/agents/researcher/web-researcher/critical-reminders.md +5 -34
  157. package/dist/src/agents/researcher/web-researcher/critical-requirements.md +11 -16
  158. package/dist/src/agents/researcher/web-researcher/identity.md +28 -60
  159. package/dist/src/agents/researcher/web-researcher/output.md +41 -134
  160. package/dist/src/agents/researcher/web-researcher/playbook.md +48 -162
  161. package/dist/src/agents/reviewer/reviewer/critical-reminders.md +9 -22
  162. package/dist/src/agents/reviewer/reviewer/critical-requirements.md +24 -19
  163. package/dist/src/agents/reviewer/reviewer/identity.md +23 -20
  164. package/dist/src/agents/reviewer/reviewer/metadata.yaml +7 -2
  165. package/dist/src/agents/reviewer/reviewer/output.md +8 -26
  166. package/dist/src/agents/reviewer/reviewer/playbook.md +50 -91
  167. package/dist/src/agents/tester/ai-tester/critical-reminders.md +7 -40
  168. package/dist/src/agents/tester/ai-tester/critical-requirements.md +39 -31
  169. package/dist/src/agents/tester/ai-tester/identity.md +25 -40
  170. package/dist/src/agents/tester/ai-tester/output.md +8 -144
  171. package/dist/src/agents/tester/ai-tester/playbook.md +28 -40
  172. package/dist/src/agents/tester/api-tester/critical-reminders.md +8 -35
  173. package/dist/src/agents/tester/api-tester/critical-requirements.md +36 -25
  174. package/dist/src/agents/tester/api-tester/identity.md +18 -29
  175. package/dist/src/agents/tester/api-tester/metadata.yaml +1 -1
  176. package/dist/src/agents/tester/api-tester/output.md +3 -86
  177. package/dist/src/agents/tester/api-tester/playbook.md +10 -2
  178. package/dist/src/agents/tester/cli-tester/critical-reminders.md +7 -30
  179. package/dist/src/agents/tester/cli-tester/critical-requirements.md +29 -21
  180. package/dist/src/agents/tester/cli-tester/identity.md +25 -33
  181. package/dist/src/agents/tester/cli-tester/output.md +13 -105
  182. package/dist/src/agents/tester/cli-tester/playbook.md +8 -5
  183. package/dist/src/agents/tester/web-tester/critical-reminders.md +7 -25
  184. package/dist/src/agents/tester/web-tester/critical-requirements.md +25 -16
  185. package/dist/src/agents/tester/web-tester/identity.md +24 -30
  186. package/dist/src/agents/tester/web-tester/output.md +11 -116
  187. package/dist/src/agents/tester/web-tester/playbook.md +58 -221
  188. package/dist/stores/wizard-store.js +4 -4
  189. package/package.json +2 -2
  190. package/src/agents/_templates/agent.liquid +30 -122
  191. package/src/agents/_templates/methodologies/operating-principles.liquid +27 -0
  192. package/src/agents/developer/ai-developer/critical-reminders.md +9 -48
  193. package/src/agents/developer/ai-developer/critical-requirements.md +29 -47
  194. package/src/agents/developer/ai-developer/identity.md +31 -40
  195. package/src/agents/developer/ai-developer/output.md +92 -245
  196. package/src/agents/developer/ai-developer/playbook.md +116 -270
  197. package/src/agents/developer/api-developer/critical-reminders.md +9 -40
  198. package/src/agents/developer/api-developer/critical-requirements.md +19 -34
  199. package/src/agents/developer/api-developer/identity.md +18 -33
  200. package/src/agents/developer/api-developer/output.md +118 -255
  201. package/src/agents/developer/api-developer/playbook.md +103 -284
  202. package/src/agents/developer/cli-developer/critical-reminders.md +9 -45
  203. package/src/agents/developer/cli-developer/critical-requirements.md +21 -39
  204. package/src/agents/developer/cli-developer/identity.md +22 -36
  205. package/src/agents/developer/cli-developer/output.md +72 -185
  206. package/src/agents/developer/cli-developer/playbook.md +107 -307
  207. package/src/agents/developer/web-developer/critical-reminders.md +9 -34
  208. package/src/agents/developer/web-developer/critical-requirements.md +11 -30
  209. package/src/agents/developer/web-developer/identity.md +15 -15
  210. package/src/agents/developer/web-developer/output.md +67 -220
  211. package/src/agents/developer/web-developer/playbook.md +93 -283
  212. package/src/agents/meta/agent-summoner/critical-reminders.md +6 -39
  213. package/src/agents/meta/agent-summoner/critical-requirements.md +6 -44
  214. package/src/agents/meta/agent-summoner/identity.md +20 -23
  215. package/src/agents/meta/agent-summoner/metadata.yaml +1 -1
  216. package/src/agents/meta/agent-summoner/output.md +85 -261
  217. package/src/agents/meta/agent-summoner/playbook.md +220 -1398
  218. package/src/agents/meta/codex-keeper/critical-reminders.md +11 -32
  219. package/src/agents/meta/codex-keeper/critical-requirements.md +32 -22
  220. package/src/agents/meta/codex-keeper/identity.md +31 -32
  221. package/src/agents/meta/codex-keeper/output.md +49 -335
  222. package/src/agents/meta/codex-keeper/playbook.md +151 -1112
  223. package/src/agents/meta/convention-keeper/critical-reminders.md +11 -26
  224. package/src/agents/meta/convention-keeper/critical-requirements.md +36 -25
  225. package/src/agents/meta/convention-keeper/identity.md +35 -21
  226. package/src/agents/meta/convention-keeper/metadata.yaml +1 -1
  227. package/src/agents/meta/convention-keeper/output.md +33 -123
  228. package/src/agents/meta/convention-keeper/playbook.md +64 -144
  229. package/src/agents/meta/skill-summoner/critical-reminders.md +8 -71
  230. package/src/agents/meta/skill-summoner/critical-requirements.md +9 -73
  231. package/src/agents/meta/skill-summoner/identity.md +18 -22
  232. package/src/agents/meta/skill-summoner/metadata.yaml +1 -1
  233. package/src/agents/meta/skill-summoner/output.md +164 -270
  234. package/src/agents/meta/skill-summoner/playbook.md +150 -1398
  235. package/src/agents/planning/pm/critical-requirements.md +23 -25
  236. package/src/agents/planning/pm/identity.md +24 -23
  237. package/src/agents/planning/pm/output.md +5 -9
  238. package/src/agents/planning/pm/playbook.md +50 -140
  239. package/src/agents/researcher/ai-researcher/critical-reminders.md +8 -53
  240. package/src/agents/researcher/ai-researcher/critical-requirements.md +31 -26
  241. package/src/agents/researcher/ai-researcher/identity.md +36 -77
  242. package/src/agents/researcher/ai-researcher/output.md +44 -151
  243. package/src/agents/researcher/ai-researcher/playbook.md +130 -394
  244. package/src/agents/researcher/api-researcher/critical-reminders.md +6 -38
  245. package/src/agents/researcher/api-researcher/critical-requirements.md +15 -17
  246. package/src/agents/researcher/api-researcher/identity.md +29 -63
  247. package/src/agents/researcher/api-researcher/output.md +61 -153
  248. package/src/agents/researcher/api-researcher/playbook.md +63 -140
  249. package/src/agents/researcher/cli-researcher/critical-reminders.md +8 -45
  250. package/src/agents/researcher/cli-researcher/critical-requirements.md +29 -24
  251. package/src/agents/researcher/cli-researcher/identity.md +36 -78
  252. package/src/agents/researcher/cli-researcher/output.md +22 -128
  253. package/src/agents/researcher/cli-researcher/playbook.md +108 -263
  254. package/src/agents/researcher/web-researcher/critical-reminders.md +5 -34
  255. package/src/agents/researcher/web-researcher/critical-requirements.md +11 -16
  256. package/src/agents/researcher/web-researcher/identity.md +28 -60
  257. package/src/agents/researcher/web-researcher/output.md +41 -134
  258. package/src/agents/researcher/web-researcher/playbook.md +48 -162
  259. package/src/agents/reviewer/reviewer/critical-reminders.md +9 -22
  260. package/src/agents/reviewer/reviewer/critical-requirements.md +24 -19
  261. package/src/agents/reviewer/reviewer/identity.md +23 -20
  262. package/src/agents/reviewer/reviewer/metadata.yaml +7 -2
  263. package/src/agents/reviewer/reviewer/output.md +8 -26
  264. package/src/agents/reviewer/reviewer/playbook.md +50 -91
  265. package/src/agents/tester/ai-tester/critical-reminders.md +7 -40
  266. package/src/agents/tester/ai-tester/critical-requirements.md +39 -31
  267. package/src/agents/tester/ai-tester/identity.md +25 -40
  268. package/src/agents/tester/ai-tester/output.md +8 -144
  269. package/src/agents/tester/ai-tester/playbook.md +28 -40
  270. package/src/agents/tester/api-tester/critical-reminders.md +8 -35
  271. package/src/agents/tester/api-tester/critical-requirements.md +36 -25
  272. package/src/agents/tester/api-tester/identity.md +18 -29
  273. package/src/agents/tester/api-tester/metadata.yaml +1 -1
  274. package/src/agents/tester/api-tester/output.md +3 -86
  275. package/src/agents/tester/api-tester/playbook.md +10 -2
  276. package/src/agents/tester/cli-tester/critical-reminders.md +7 -30
  277. package/src/agents/tester/cli-tester/critical-requirements.md +29 -21
  278. package/src/agents/tester/cli-tester/identity.md +25 -33
  279. package/src/agents/tester/cli-tester/output.md +13 -105
  280. package/src/agents/tester/cli-tester/playbook.md +8 -5
  281. package/src/agents/tester/web-tester/critical-reminders.md +7 -25
  282. package/src/agents/tester/web-tester/critical-requirements.md +25 -16
  283. package/src/agents/tester/web-tester/identity.md +24 -30
  284. package/src/agents/tester/web-tester/output.md +11 -116
  285. package/src/agents/tester/web-tester/playbook.md +58 -221
  286. package/src/schemas/agent-frontmatter.schema.json +14 -0
  287. package/src/schemas/agent.schema.json +14 -0
  288. package/dist/chunk-7WKNPDN2.js.map +0 -1
  289. package/dist/chunk-DOQUAWL4.js.map +0 -1
  290. package/dist/chunk-IAN7QDBR.js.map +0 -1
  291. package/dist/chunk-IV42Z63R.js.map +0 -1
  292. package/dist/chunk-JEJJHRZA.js.map +0 -1
  293. package/dist/chunk-U5O4BWKI.js.map +0 -1
  294. package/dist/chunk-YC4CLTQE.js.map +0 -1
  295. package/dist/load-agent-defs-TWDFYM5S.js +0 -13
  296. package/dist/recompile-project-agents-YIGIVMCQ.js +0 -17
  297. package/dist/src/agents/_templates/methodologies/anti-over-engineering.liquid +0 -135
  298. package/dist/src/agents/_templates/methodologies/context-management.liquid +0 -15
  299. package/dist/src/agents/_templates/methodologies/improvement-protocol.liquid +0 -150
  300. package/dist/src/agents/_templates/methodologies/investigation-requirements.liquid +0 -61
  301. package/dist/src/agents/_templates/methodologies/success-criteria.liquid +0 -121
  302. package/dist/src/agents/_templates/methodologies/write-verification.liquid +0 -43
  303. package/dist/src/agents/planning/pm/critical-reminders.md +0 -39
  304. package/src/agents/_templates/methodologies/anti-over-engineering.liquid +0 -135
  305. package/src/agents/_templates/methodologies/context-management.liquid +0 -15
  306. package/src/agents/_templates/methodologies/improvement-protocol.liquid +0 -150
  307. package/src/agents/_templates/methodologies/investigation-requirements.liquid +0 -61
  308. package/src/agents/_templates/methodologies/success-criteria.liquid +0 -121
  309. package/src/agents/_templates/methodologies/write-verification.liquid +0 -43
  310. package/src/agents/planning/pm/critical-reminders.md +0 -39
  311. /package/dist/{chunk-VFZF7LVY.js.map → chunk-3WVH2CTK.js.map} +0 -0
  312. /package/dist/{chunk-SBL4AYSB.js.map → chunk-4VL3CEOS.js.map} +0 -0
  313. /package/dist/{chunk-QM3ZNOWJ.js.map → chunk-6MV4JOCL.js.map} +0 -0
  314. /package/dist/{chunk-ADSIYZGS.js.map → chunk-7ANJQLPJ.js.map} +0 -0
  315. /package/dist/{chunk-3JDVBHWO.js.map → chunk-7REKOTKG.js.map} +0 -0
  316. /package/dist/{chunk-MI7LKLD7.js.map → chunk-ABAZMMG4.js.map} +0 -0
  317. /package/dist/{chunk-2P3MKX5Q.js.map → chunk-AOTCIUGX.js.map} +0 -0
  318. /package/dist/{chunk-GUFRQJAE.js.map → chunk-ARYNOWKF.js.map} +0 -0
  319. /package/dist/{chunk-Z56AUTER.js.map → chunk-B3Y3QMWI.js.map} +0 -0
  320. /package/dist/{chunk-WDN4HAN7.js.map → chunk-DSL66I4N.js.map} +0 -0
  321. /package/dist/{chunk-SXYFATQN.js.map → chunk-ECURHW3T.js.map} +0 -0
  322. /package/dist/{chunk-TPRRWOHZ.js.map → chunk-FLW25ORT.js.map} +0 -0
  323. /package/dist/{chunk-F5JTW3HZ.js.map → chunk-JIERYE6B.js.map} +0 -0
  324. /package/dist/{chunk-UE3MLDL2.js.map → chunk-K5ITEA3I.js.map} +0 -0
  325. /package/dist/{chunk-Q4KCUR2T.js.map → chunk-LT5GXEB2.js.map} +0 -0
  326. /package/dist/{chunk-C2K7Q7HO.js.map → chunk-NKGYKOB7.js.map} +0 -0
  327. /package/dist/{chunk-X6KXPRKI.js.map → chunk-NQXO4LR3.js.map} +0 -0
  328. /package/dist/{chunk-77YZFVQD.js.map → chunk-PHCPUQVR.js.map} +0 -0
  329. /package/dist/{chunk-ESI3JYOQ.js.map → chunk-Q4IRRVXK.js.map} +0 -0
  330. /package/dist/{chunk-EN5MEPAS.js.map → chunk-QGUP3QJF.js.map} +0 -0
  331. /package/dist/{chunk-MSUTHS2V.js.map → chunk-QZX7SYKU.js.map} +0 -0
  332. /package/dist/{chunk-ZPFM2VHZ.js.map → chunk-RGYDFBCT.js.map} +0 -0
  333. /package/dist/{chunk-4NAWM4OQ.js.map → chunk-S63LXWMC.js.map} +0 -0
  334. /package/dist/{chunk-QTLYSVYE.js.map → chunk-SMSB6YZW.js.map} +0 -0
  335. /package/dist/{chunk-SWYV7QXX.js.map → chunk-URXIQE7I.js.map} +0 -0
  336. /package/dist/{chunk-ZYXQUU2P.js.map → chunk-V5GLL2JB.js.map} +0 -0
  337. /package/dist/{chunk-QG4NRKZD.js.map → chunk-XATLUKXK.js.map} +0 -0
  338. /package/dist/{chunk-RLSZWDTB.js.map → chunk-XHPWTL4I.js.map} +0 -0
  339. /package/dist/{chunk-FL2CJ5T5.js.map → chunk-YRS3QZP2.js.map} +0 -0
  340. /package/dist/{chunk-FXL63LDL.js.map → chunk-ZVXGW2IC.js.map} +0 -0
  341. /package/dist/{load-agent-defs-TWDFYM5S.js.map → load-agent-defs-5J2MZLAA.js.map} +0 -0
  342. /package/dist/{recompile-project-agents-YIGIVMCQ.js.map → recompile-project-agents-FCJLHAE3.js.map} +0 -0
  343. /package/dist/{source-loader-7T754EZC.js.map → source-loader-GRBVNRAW.js.map} +0 -0
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  computeScopeDiff,
4
4
  useWizardStore
5
- } from "./chunk-UE3MLDL2.js";
5
+ } from "./chunk-K5ITEA3I.js";
6
6
  import {
7
7
  getSkillDisplayName
8
- } from "./chunk-3QBOVV6A.js";
8
+ } from "./chunk-AVK2HEKB.js";
9
9
  import {
10
10
  CLI_COLORS,
11
11
  EJECT_SOURCE,
12
12
  UI_SYMBOLS
13
- } from "./chunk-IV42Z63R.js";
13
+ } from "./chunk-UITEKY2R.js";
14
14
 
15
15
  // src/cli/components/wizard/skill-agent-summary.tsx
16
16
  import { Box, Text } from "ink";
@@ -106,4 +106,4 @@ var SkillAgentSummary = ({
106
106
  export {
107
107
  SkillAgentSummary
108
108
  };
109
- //# sourceMappingURL=chunk-Z56AUTER.js.map
109
+ //# sourceMappingURL=chunk-B3Y3QMWI.js.map
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getDomainDisplayName
4
- } from "./chunk-SBL4AYSB.js";
4
+ } from "./chunk-4VL3CEOS.js";
5
5
  import {
6
6
  CheckboxGrid
7
- } from "./chunk-VFZF7LVY.js";
7
+ } from "./chunk-3WVH2CTK.js";
8
8
  import {
9
9
  useWizardStore
10
- } from "./chunk-UE3MLDL2.js";
10
+ } from "./chunk-K5ITEA3I.js";
11
11
  import {
12
12
  matrix,
13
13
  typedEntries
14
- } from "./chunk-3QBOVV6A.js";
14
+ } from "./chunk-AVK2HEKB.js";
15
15
  import {
16
16
  DOMAIN_DESCRIPTIONS,
17
17
  orderDomains
18
- } from "./chunk-IV42Z63R.js";
18
+ } from "./chunk-UITEKY2R.js";
19
19
 
20
20
  // src/cli/components/wizard/domain-selection.tsx
21
21
  import { useMemo } from "react";
@@ -56,4 +56,4 @@ var DomainSelection = () => {
56
56
  export {
57
57
  DomainSelection
58
58
  };
59
- //# sourceMappingURL=chunk-WDN4HAN7.js.map
59
+ //# sourceMappingURL=chunk-DSL66I4N.js.map
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  StepConfirm
4
- } from "./chunk-2P3MKX5Q.js";
4
+ } from "./chunk-AOTCIUGX.js";
5
5
  import {
6
6
  StepSources
7
- } from "./chunk-RLSZWDTB.js";
7
+ } from "./chunk-XHPWTL4I.js";
8
8
  import {
9
9
  StepStack
10
- } from "./chunk-SWYV7QXX.js";
10
+ } from "./chunk-URXIQE7I.js";
11
11
  import {
12
12
  WizardLayout
13
- } from "./chunk-GUFRQJAE.js";
13
+ } from "./chunk-ARYNOWKF.js";
14
14
  import {
15
15
  DomainSelection
16
- } from "./chunk-WDN4HAN7.js";
16
+ } from "./chunk-DSL66I4N.js";
17
17
  import {
18
18
  StepAgents
19
- } from "./chunk-ZYXQUU2P.js";
19
+ } from "./chunk-V5GLL2JB.js";
20
20
  import {
21
21
  StepBuild
22
- } from "./chunk-ESI3JYOQ.js";
22
+ } from "./chunk-Q4IRRVXK.js";
23
23
  import {
24
24
  HOTKEY_ACCEPT_DEFAULTS,
25
25
  HOTKEY_INFO,
@@ -29,20 +29,20 @@ import {
29
29
  } from "./chunk-WTJ3AY33.js";
30
30
  import {
31
31
  useWizardStore
32
- } from "./chunk-UE3MLDL2.js";
32
+ } from "./chunk-K5ITEA3I.js";
33
33
  import {
34
34
  validateSelection
35
- } from "./chunk-7WKNPDN2.js";
35
+ } from "./chunk-XPDVAJDH.js";
36
36
  import {
37
37
  findStack,
38
38
  getSkillById,
39
39
  matrix
40
- } from "./chunk-3QBOVV6A.js";
40
+ } from "./chunk-AVK2HEKB.js";
41
41
  import {
42
42
  CLI_COLORS,
43
43
  EJECT_SOURCE,
44
44
  FALLBACK_DOMAIN
45
- } from "./chunk-IV42Z63R.js";
45
+ } from "./chunk-UITEKY2R.js";
46
46
 
47
47
  // src/cli/components/wizard/wizard.tsx
48
48
  import { useCallback as useCallback2, useEffect } from "react";
@@ -313,4 +313,4 @@ export {
313
313
  resolveSelectedSkillIds,
314
314
  Wizard
315
315
  };
316
- //# sourceMappingURL=chunk-SXYFATQN.js.map
316
+ //# sourceMappingURL=chunk-ECURHW3T.js.map
@@ -6,14 +6,14 @@ import {
6
6
  verbose,
7
7
  warn,
8
8
  writeFile
9
- } from "./chunk-7WKNPDN2.js";
9
+ } from "./chunk-XPDVAJDH.js";
10
10
  import {
11
11
  DEFAULT_PUBLIC_SOURCE_NAME,
12
12
  DEFAULT_VERSION,
13
13
  PLUGIN_MANIFEST_DIR,
14
14
  PLUGIN_MANIFEST_FILE,
15
15
  PUBLIC_CATALOGUE_PACKAGE
16
- } from "./chunk-IV42Z63R.js";
16
+ } from "./chunk-UITEKY2R.js";
17
17
 
18
18
  // src/cli/lib/marketplace-generator.ts
19
19
  import path from "path";
@@ -127,4 +127,4 @@ export {
127
127
  writeMarketplace,
128
128
  getMarketplaceStats
129
129
  };
130
- //# sourceMappingURL=chunk-TPRRWOHZ.js.map
130
+ //# sourceMappingURL=chunk-FLW25ORT.js.map
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadAgentDefs
4
- } from "./chunk-QTLYSVYE.js";
4
+ } from "./chunk-SMSB6YZW.js";
5
5
  import {
6
6
  pruneStaleCompiledAgents,
7
7
  recompileAgents
8
- } from "./chunk-IAN7QDBR.js";
8
+ } from "./chunk-O664ITBD.js";
9
9
  import {
10
10
  buildAgentScopeMap,
11
11
  buildMarketplacePluginRef,
@@ -17,20 +17,23 @@ import {
17
17
  isHomeDirectory,
18
18
  loadProjectConfigFromDir,
19
19
  loadSkillsFromDir,
20
+ loadSkillsMatrixFromSource,
20
21
  remove,
21
22
  removeDirIfEmpty,
22
23
  resolveInstallPaths,
23
24
  toClaudePluginScope,
24
25
  verbose
25
- } from "./chunk-7WKNPDN2.js";
26
+ } from "./chunk-XPDVAJDH.js";
26
27
  import {
28
+ initializeMatrix,
29
+ matrix,
27
30
  typedEntries,
28
31
  typedKeys
29
- } from "./chunk-3QBOVV6A.js";
32
+ } from "./chunk-AVK2HEKB.js";
30
33
  import {
31
34
  LOCAL_SKILLS_PATH,
32
35
  globalInstallRoot
33
- } from "./chunk-IV42Z63R.js";
36
+ } from "./chunk-UITEKY2R.js";
34
37
 
35
38
  // src/cli/lib/operations/project/remove-compiled-agents.ts
36
39
  import path from "path";
@@ -208,16 +211,33 @@ async function uninstallPluginSkills(skillIds, oldSkills, marketplace, projectDi
208
211
  return { uninstalled, failed };
209
212
  }
210
213
 
214
+ // src/cli/lib/loading/catalogue-seat.ts
215
+ async function withCatalogueSeatedFor(projectDir, body) {
216
+ const callersCatalogue = matrix;
217
+ const { matrix: seated } = await loadSkillsMatrixFromSource({
218
+ projectDir,
219
+ skipExtraSources: true,
220
+ matrixOnly: true
221
+ });
222
+ try {
223
+ return await body(seated);
224
+ } finally {
225
+ initializeMatrix(callersCatalogue);
226
+ }
227
+ }
228
+
211
229
  // src/cli/lib/operations/project/recompile-project-agents.ts
212
230
  async function recompileRegisteredProjectAgents(projectDir) {
213
- const { allSkills } = await discoverInstalledSkills(projectDir);
214
- const { sourcePath } = await loadAgentDefs();
215
- return compileAgents({
216
- projectDir,
217
- sourcePath,
218
- skills: allSkills,
219
- scopeFilter: "project",
220
- outputDir: resolveInstallPaths(projectDir, "project").agentsDir
231
+ return withCatalogueSeatedFor(projectDir, async () => {
232
+ const { allSkills } = await discoverInstalledSkills(projectDir);
233
+ const { sourcePath } = await loadAgentDefs();
234
+ return compileAgents({
235
+ projectDir,
236
+ sourcePath,
237
+ skills: allSkills,
238
+ scopeFilter: "project",
239
+ outputDir: resolveInstallPaths(projectDir, "project").agentsDir
240
+ });
221
241
  });
222
242
  }
223
243
  async function recompilePropagatedProjectAgents(projectDirs) {
@@ -247,9 +267,10 @@ export {
247
267
  discoverInstalledSkills,
248
268
  copyLocalSkills,
249
269
  uninstallPluginSkills,
270
+ withCatalogueSeatedFor,
250
271
  removeCompiledAgents,
251
272
  compileAgents,
252
273
  recompileRegisteredProjectAgents,
253
274
  recompilePropagatedProjectAgents
254
275
  };
255
- //# sourceMappingURL=chunk-YC4CLTQE.js.map
276
+ //# sourceMappingURL=chunk-IAVEMTN4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli/lib/operations/project/remove-compiled-agents.ts","../src/cli/lib/operations/project/compile-agents.ts","../src/cli/lib/operations/skills/discover-skills.ts","../src/cli/lib/operations/skills/copy-local-skills.ts","../src/cli/lib/operations/skills/uninstall-plugin-skills.ts","../src/cli/lib/loading/catalogue-seat.ts","../src/cli/lib/operations/project/recompile-project-agents.ts"],"sourcesContent":["import path from \"path\";\nimport { pruneStaleCompiledAgents } from \"../../agents/list-compiled-agents.js\";\nimport { getErrorMessage } from \"../../../utils/errors.js\";\nimport { remove, removeDirIfEmpty } from \"../../../utils/fs.js\";\nimport type { AgentName } from \"../../../types/index.js\";\n\nconst AGENT_FILE_EXTENSION = \".md\";\n\nexport type RemoveCompiledAgentsOptions = {\n /** The scope's `.claude/agents/` directory holding the compiled files. */\n agentsDir: string;\n agents: readonly AgentName[];\n};\n\nexport type PruneCompiledAgentsOptions = {\n agentsDir: string;\n /**\n * The COMPLETE set of agents that belong in `agentsDir` — every other\n * CLI-compiled agent there is stale. Only an authoritative pass can say this.\n */\n keep: ReadonlySet<AgentName>;\n};\n\nexport type RemoveCompiledAgentsResult = {\n /** Agents whose compiled file this call disposed of; an absent file counts. */\n removed: AgentName[];\n /** Agents whose file survived an error, for the caller to report. */\n failed: Array<{ name: AgentName; error: string }>;\n};\n\ntype RemovalOutcome = { name: AgentName; ok: true } | { name: AgentName; ok: false; error: string };\n\n/**\n * Deletes the named agents' compiled `.md` files from `agentsDir`, then takes the\n * directory itself when nothing at all is left in it — the shape `deleteLocalSkill`\n * models for skills.\n *\n * A scope's `.claude/agents/` is an artefact of what it holds, so the removal that\n * empties it owns the tidy and no caller has to remember. An agent with no file on\n * disk is nothing to do rather than an error.\n */\nexport async function removeCompiledAgents(\n options: RemoveCompiledAgentsOptions,\n): Promise<RemoveCompiledAgentsResult> {\n const outcomes = await Promise.all(\n options.agents.map((name) => removeCompiledAgentFile(options.agentsDir, name)),\n );\n await tidyEmptiedAgentsDir(options.agentsDir);\n\n return {\n removed: outcomes.flatMap((outcome) => (outcome.ok ? [outcome.name] : [])),\n failed: outcomes.flatMap((outcome) =>\n outcome.ok ? [] : [{ name: outcome.name, error: outcome.error }],\n ),\n };\n}\n\n/**\n * Deletes every CLI-compiled agent in `agentsDir` outside `keep`, then takes the\n * directory on the same terms as `removeCompiledAgents`.\n *\n * Hand-authored agents are preserved by `pruneStaleCompiledAgents`'s `isAgentName`\n * predicate, so a directory this leaves empty is one nothing at all remains in.\n */\nexport async function pruneCompiledAgents(options: PruneCompiledAgentsOptions): Promise<void> {\n await pruneStaleCompiledAgents(options.agentsDir, options.keep);\n await tidyEmptiedAgentsDir(options.agentsDir);\n}\n\nasync function removeCompiledAgentFile(\n agentsDir: string,\n name: AgentName,\n): Promise<RemovalOutcome> {\n try {\n await remove(path.join(agentsDir, `${name}${AGENT_FILE_EXTENSION}`));\n return { name, ok: true };\n } catch (error) {\n return { name, ok: false, error: getErrorMessage(error) };\n }\n}\n\n/**\n * Emptiness is FILESYSTEM emptiness, never roster emptiness: a hand-authored agent\n * or any user-owned file keeps the directory alive whatever a config says. The\n * agents directory only — `.claude/` above it is uninstall's decision, not a\n * removal path's.\n */\nasync function tidyEmptiedAgentsDir(agentsDir: string): Promise<void> {\n await removeDirIfEmpty(agentsDir);\n}\n","import { pruneCompiledAgents } from \"./remove-compiled-agents.js\";\nimport { recompileAgents } from \"../../agents/index.js\";\nimport { loadProjectConfigFromDir } from \"../../configuration/index.js\";\nimport { buildAgentScopeMap } from \"../../installation/index.js\";\nimport type { AgentName, SkillDefinitionMap, SkillScope } from \"../../../types/index.js\";\n\nexport type CompileAgentsOptions = {\n projectDir: string;\n sourcePath: string;\n pluginDir?: string;\n skills?: SkillDefinitionMap;\n agentScopeMap?: Map<AgentName, SkillScope>;\n agents?: AgentName[];\n /** When set, loads config and filters agents to only those matching this scope. */\n scopeFilter?: SkillScope;\n outputDir?: string;\n};\n\nexport type CompilationResult = {\n compiled: AgentName[];\n /**\n * The subset of `compiled` whose file this pass actually wrote. A pass whose\n * `rewritten` is empty changed nothing on disk, which is exactly what the\n * recompile summary reports and what the count it replaced could not say.\n */\n rewritten: AgentName[];\n failed: AgentName[];\n warnings: string[];\n};\n\n/**\n * Compiles agent markdown files from templates + skill content.\n *\n * Thin wrapper around recompileAgents() that standardizes options.\n * The caller invokes this once (edit, update) or twice with scopeFilter (compile).\n */\nexport async function compileAgents(options: CompileAgentsOptions): Promise<CompilationResult> {\n let resolvedAgents = options.agents;\n let resolvedAgentScopeMap = options.agentScopeMap;\n\n if (options.scopeFilter) {\n const loadedConfig = await loadProjectConfigFromDir(options.projectDir);\n\n // Auto-build agentScopeMap from config if not provided\n if (!resolvedAgentScopeMap && loadedConfig?.config) {\n resolvedAgentScopeMap = buildAgentScopeMap(loadedConfig.config);\n }\n\n const filteredAgents = loadedConfig?.config.agents\n .filter((a) => !a.excluded && a.scope === options.scopeFilter)\n .map((a) => a.name);\n\n if (resolvedAgents && filteredAgents) {\n const filterSet = new Set(filteredAgents);\n resolvedAgents = resolvedAgents.filter((a) => filterSet.has(a));\n } else if (filteredAgents) {\n resolvedAgents = filteredAgents;\n }\n }\n\n const recompileResult = await recompileAgents({\n pluginDir: options.pluginDir ?? options.projectDir,\n sourcePath: options.sourcePath,\n ...(resolvedAgents !== undefined && { agents: resolvedAgents }),\n ...(options.skills !== undefined && { skills: options.skills }),\n projectDir: options.projectDir,\n ...(options.outputDir !== undefined && { outputDir: options.outputDir }),\n ...(resolvedAgentScopeMap !== undefined && { agentScopeMap: resolvedAgentScopeMap }),\n });\n\n await pruneStaleAgentsForPass(options, recompileResult);\n\n return {\n compiled: recompileResult.compiled,\n rewritten: recompileResult.rewritten,\n failed: recompileResult.failed,\n warnings: recompileResult.warnings,\n };\n}\n\n/**\n * Compiled-agent writes are additive, so a deselected or stale agent's `.md`\n * lingers after recompile. An authoritative, scope-UNfiltered pass owns its\n * entire `outputDir` (its resolved roster is the full set for that directory),\n * so it prunes built-in agents no longer compiled there. A scope-FILTERED pass\n * (the hasBoth two-pass compile, or the registered-project recompile)\n * sees only one scope's agents and must never delete another scope's files, so\n * it skips pruning. Removing the stale files and tidying the directory they\n * emptied is one operation's job, not this pass's.\n */\nasync function pruneStaleAgentsForPass(\n options: CompileAgentsOptions,\n recompileResult: CompilationResult,\n): Promise<void> {\n if (options.scopeFilter || !options.outputDir) return;\n\n const compiledForDir = new Set<AgentName>([\n ...recompileResult.compiled,\n ...recompileResult.failed,\n ]);\n await pruneCompiledAgents({ agentsDir: options.outputDir, keep: compiledForDir });\n}\n","import path from \"path\";\nimport { discoverAllPluginSkills } from \"../../plugins/index.js\";\nimport { isHomeDirectory } from \"../../installation/is-home-directory.js\";\n// loadSkillsFromDir lives in loading/ (a leaf) so both this module and\n// plugins/plugin-discovery can share it without an operations↔plugins cycle.\nimport { loadSkillsFromDir, type LoadedSkills } from \"../../loading/index.js\";\nimport { verbose } from \"../../../utils/logger.js\";\nimport { globalInstallRoot, LOCAL_SKILLS_PATH } from \"../../../consts.js\";\nimport { typedEntries, typedKeys } from \"../../../utils/typed-object.js\";\nimport type { UnusableSkillMetadata } from \"../../loading/index.js\";\nimport type { SkillDefinition, SkillDefinitionMap, SkillId } from \"../../../types/index.js\";\n\nexport type DiscoveredSkills = {\n allSkills: SkillDefinitionMap;\n totalSkillCount: number;\n pluginSkillCount: number;\n localSkillCount: number;\n globalPluginSkillCount: number;\n globalLocalSkillCount: number;\n /**\n * Installed skills whose metadata.yaml exists but describes no skill, from either\n * scope. Nothing was loaded for them; `compile` refuses the run over any entry\n * here rather than compile agents around a skill its metadata does not describe.\n */\n unusableMetadata: UnusableSkillMetadata[];\n};\n\n/** The result of a local-skill scan that was not performed. */\nconst NO_LOCAL_SKILLS: LoadedSkills = { skills: {}, unusableMetadata: [] };\n\n/**\n * Discovers local (non-plugin) skills from `<rootDir>/.claude/skills/`. Used for\n * both the project root and the global install root.\n */\nexport async function discoverLocalProjectSkills(rootDir: string): Promise<LoadedSkills> {\n const localSkillsDir = path.join(rootDir, LOCAL_SKILLS_PATH);\n return loadSkillsFromDir(localSkillsDir, {\n pathPrefix: LOCAL_SKILLS_PATH,\n requireMetadata: true,\n });\n}\n\n/** Merges skill maps — later sources take precedence over earlier ones. */\nexport function mergeSkills(...skillSources: SkillDefinitionMap[]): SkillDefinitionMap {\n const merged: SkillDefinitionMap = {};\n\n for (const source of skillSources) {\n for (const [id, skill] of typedEntries<SkillId, SkillDefinition | undefined>(source)) {\n if (skill) {\n merged[id] = skill;\n }\n }\n }\n\n return merged;\n}\n\n/**\n * Discovers all installed skills for a project directory using 4-way merge:\n * 1. Global plugins (from ~/.claude/plugins/)\n * 2. Global local (from ~/.claude/skills/)\n * 3. Project plugins (from <projectDir>/.claude/plugins/)\n * 4. Project local (from <projectDir>/.claude/skills/)\n *\n * Pure function — no user-facing logging. Callers add their own log messages.\n * Uses verbose() for diagnostic output only.\n */\nexport async function discoverInstalledSkills(projectDir: string): Promise<DiscoveredSkills> {\n const isGlobalProject = isHomeDirectory(projectDir);\n\n // 1. Global plugins\n const globalPluginSkills = isGlobalProject\n ? {}\n : await discoverAllPluginSkills(globalInstallRoot());\n const globalPluginSkillCount = typedKeys<SkillId>(globalPluginSkills).length;\n if (globalPluginSkillCount > 0) {\n verbose(` Found ${globalPluginSkillCount} skills from global plugins`);\n }\n\n // 2. Global local skills\n const globalLocal = isGlobalProject\n ? NO_LOCAL_SKILLS\n : await discoverLocalProjectSkills(globalInstallRoot());\n const globalLocalSkillCount = typedKeys<SkillId>(globalLocal.skills).length;\n if (globalLocalSkillCount > 0) {\n verbose(` Found ${globalLocalSkillCount} global local skills from ~/.claude/skills/`);\n }\n\n // 3. Project plugins\n const pluginSkills = await discoverAllPluginSkills(projectDir);\n const pluginSkillCount = typedKeys<SkillId>(pluginSkills).length;\n verbose(` Found ${pluginSkillCount} skills from installed plugins`);\n\n // 4. Project local skills\n const local = await discoverLocalProjectSkills(projectDir);\n const localSkillCount = typedKeys<SkillId>(local.skills).length;\n verbose(` Found ${localSkillCount} local skills from .claude/skills/`);\n\n // Merge: global first, project second — project wins on conflict\n const allSkills = mergeSkills(globalPluginSkills, globalLocal.skills, pluginSkills, local.skills);\n const totalSkillCount = typedKeys<SkillId>(allSkills).length;\n\n return {\n allSkills,\n totalSkillCount,\n pluginSkillCount: globalPluginSkillCount + pluginSkillCount,\n localSkillCount: globalLocalSkillCount + localSkillCount,\n globalPluginSkillCount,\n globalLocalSkillCount,\n unusableMetadata: [...globalLocal.unusableMetadata, ...local.unusableMetadata],\n };\n}\n","import { resolveInstallPaths } from \"../../installation/index.js\";\nimport { copySkillsToLocalFlattened, type CopiedSkill } from \"../../skills/index.js\";\nimport { ensureDir } from \"../../../utils/fs.js\";\nimport type { SkillConfig } from \"../../../types/config.js\";\nimport type { SourceLoadResult } from \"../../loading/source-loader.js\";\n\nexport type SkillCopyResult = {\n projectCopied: CopiedSkill[];\n globalCopied: CopiedSkill[];\n totalCopied: number;\n};\n\n/** Copies one scope's local skills into its skills directory. */\nasync function copyScopedLocalSkills(\n scopeSkills: SkillConfig[],\n skillsDir: string,\n sourceResult: SourceLoadResult,\n): Promise<CopiedSkill[]> {\n if (scopeSkills.length === 0) return [];\n\n await ensureDir(skillsDir);\n\n return copySkillsToLocalFlattened(\n scopeSkills.map((s) => s.id),\n skillsDir,\n sourceResult,\n );\n}\n\n/**\n * Copies local-source skills to their scope-appropriate directories.\n *\n * Splits skills by scope (project vs global), resolves install paths,\n * ensures directories exist, and copies from source.\n */\nexport async function copyLocalSkills(\n skills: SkillConfig[],\n projectDir: string,\n sourceResult: SourceLoadResult,\n): Promise<SkillCopyResult> {\n const projectLocalSkills = skills.filter((s) => s.scope !== \"global\");\n const globalLocalSkills = skills.filter((s) => s.scope === \"global\");\n\n const projectPaths = resolveInstallPaths(projectDir, \"project\");\n const globalPaths = resolveInstallPaths(projectDir, \"global\");\n\n const projectCopied = await copyScopedLocalSkills(\n projectLocalSkills,\n projectPaths.skillsDir,\n sourceResult,\n );\n const globalCopied = await copyScopedLocalSkills(\n globalLocalSkills,\n globalPaths.skillsDir,\n sourceResult,\n );\n\n return {\n projectCopied,\n globalCopied,\n totalCopied: projectCopied.length + globalCopied.length,\n };\n}\n","import { claudePluginUninstall } from \"../../../utils/exec.js\";\nimport { buildMarketplacePluginRef, toClaudePluginScope } from \"../../plugins/index.js\";\nimport { getErrorMessage } from \"../../../utils/errors.js\";\nimport type { SkillId } from \"../../../types/index.js\";\nimport type { SkillConfig } from \"../../../types/config.js\";\n\nexport type PluginUninstallResult = {\n uninstalled: SkillId[];\n failed: Array<{ id: SkillId; error: string }>;\n};\n\n/**\n * Uninstalls skill plugins via the Claude CLI, using scope from old config.\n *\n * Each plugin reference is qualified as `{skillId}@{marketplace}` to match\n * the form used at install time — bare skill IDs will not match the registry.\n */\nexport async function uninstallPluginSkills(\n skillIds: SkillId[],\n oldSkills: SkillConfig[],\n marketplace: string,\n projectDir: string,\n): Promise<PluginUninstallResult> {\n const uninstalled: SkillId[] = [];\n const failed: PluginUninstallResult[\"failed\"] = [];\n\n for (const skillId of skillIds) {\n const oldSkill = oldSkills.find((s) => s.id === skillId);\n const pluginScope = toClaudePluginScope(oldSkill?.scope);\n const pluginRef = buildMarketplacePluginRef(skillId, marketplace);\n try {\n await claudePluginUninstall(pluginRef, pluginScope, projectDir);\n uninstalled.push(skillId);\n } catch (error) {\n failed.push({ id: skillId, error: getErrorMessage(error) });\n }\n }\n\n return { uninstalled, failed };\n}\n","import type { MergedSkillsMatrix } from \"../../types\";\nimport { initializeMatrix, matrix } from \"../matrix/matrix-provider.js\";\nimport { loadSkillsMatrixFromSource } from \"./source-loader.js\";\n\n/**\n * Runs `body` with the skills catalogue seated for `projectDir`, hands it the catalogue\n * that was seated, and puts the caller's own seat back afterwards.\n *\n * A registered project's own local skills, and the skills of the marketplace ITS config\n * names, are in that project's catalogue and in nobody else's. Two things a fan-out does to\n * such a project read a catalogue, and both used to read the TRIGGERING command's:\n *\n * - The RENDER of a compiled agent, which reaches the catalogue through the module-level\n * singleton (`matrix` in `matrix-provider.ts`) that `statedUsageFor` and `liveCategoryOf`\n * in `stacks/stacks-loader.ts` read directly, so no argument reaches it. Rendered against\n * somebody else's seat, each of the project's own skills loses the `usageGuidance` it\n * states and falls back to the per-category placeholder.\n * - The DERIVATION of that project's `config-types.ts` unions, which looks each configured\n * skill's category up in the catalogue (`deriveCategories` / `deriveDomains`). Against\n * somebody else's, a skill only this project's catalogue carries resolves to nothing and\n * its category and domain leave the project's `Category` and `Domain` unions.\n *\n * Both have the same ending: the project's own next `compile` writes the value back from its\n * own catalogue, so the two commands undo each other for as long as they are both run.\n *\n * The catalogue is PASSED to the body as well as seated, so a derivation that can take one as\n * an argument does — a body reading the singleton it just asked to be seated cannot say which\n * seat it got, which is the distinction the whole helper exists to keep. `compile.ts`'s\n * `seatMatrixForPass` returns its catalogue for the same reason.\n *\n * The seat is restored rather than left standing because this is a side trip: the caller has\n * its own pass to finish — `init` and `edit` compile their own agents after the gate returns —\n * and would otherwise render them against the last registered project's catalogue.\n *\n * The load sits outside the `try` deliberately. It seats nothing when it throws, so there is\n * no seat to restore, and a project whose catalogue cannot be loaded is left to the caller's\n * own failure handling rather than silently processed against somebody else's — which is the\n * whole defect this exists to stop. Both callers count such a project as one they could not\n * reach and carry on with the rest.\n */\nexport async function withCatalogueSeatedFor<T>(\n projectDir: string,\n body: (catalogue: MergedSkillsMatrix) => Promise<T>,\n): Promise<T> {\n const callersCatalogue = matrix;\n const { matrix: seated } = await loadSkillsMatrixFromSource({\n projectDir,\n skipExtraSources: true,\n matrixOnly: true,\n });\n try {\n return await body(seated);\n } finally {\n initializeMatrix(callersCatalogue);\n }\n}\n","import { compileAgents, type CompilationResult } from \"./compile-agents.js\";\nimport { loadAgentDefs } from \"./load-agent-defs.js\";\nimport { discoverInstalledSkills } from \"../skills/index.js\";\nimport { resolveInstallPaths } from \"../../installation/index.js\";\nimport { withCatalogueSeatedFor } from \"../../loading/catalogue-seat.js\";\nimport { getErrorMessage } from \"../../../utils/errors.js\";\n\n/**\n * Recompiles the PROJECT-scoped agents of a registered project after a global\n * config change was propagated into that project's `config.ts`.\n *\n * Propagation (`propagateGlobalChangesToProjects`) rewrites a registered\n * project's `config.ts` / `config-types.ts` but never touches its compiled\n * `.claude/agents/*.md`, so the compiled agents keep emitting whatever skill\n * reference form the OLD global data dictated. Run this per propagated project,\n * after propagation, to bring the compiled artifacts back in step.\n *\n * Scope: project only. The global agents were already recompiled by the\n * triggering operation's own pass; repeating a global pass per project would\n * rewrite `~/.claude/agents` once per registered project for no gain.\n *\n * Both inputs a compiled agent's bytes depend on are resolved from THIS\n * project's directory, and neither is inherited from the command that triggered\n * the fan-out: `skills` is passed explicitly, because without it\n * `recompileAgents` falls back to `discoverAllPluginSkills`, which sees plugin\n * skills only and would silently strip every global-local and project-local\n * skill; and the catalogue is seated by {@link withCatalogueSeatedFor}, because\n * the render reads it from a module-level singleton no argument reaches.\n *\n * Agent partials always come from the CLI itself (`getLocalAgentDefinitions`\n * returns `sourcePath: PROJECT_ROOT`), so no per-project marketplace source\n * resolution is needed.\n */\nexport async function recompileRegisteredProjectAgents(\n projectDir: string,\n): Promise<CompilationResult> {\n return withCatalogueSeatedFor(projectDir, async () => {\n const { allSkills } = await discoverInstalledSkills(projectDir);\n const { sourcePath } = await loadAgentDefs();\n\n return compileAgents({\n projectDir,\n sourcePath,\n skills: allSkills,\n scopeFilter: \"project\",\n outputDir: resolveInstallPaths(projectDir, \"project\").agentsDir,\n });\n });\n}\n\nexport type PropagatedRecompileSummary = {\n /** Projects where at least one compiled agent's content actually moved. */\n rewrittenCount: number;\n /**\n * Projects the fan-out reached whose agents all came back byte-identical. They\n * were visited and left alone, which is a different fact from being recompiled\n * and the one the old single count could not tell apart.\n */\n unchangedCount: number;\n failedCount: number;\n /** Per-project warnings in processing order — the caller surfaces them via warn(). */\n warnings: string[];\n};\n\n/**\n * Runs {@link recompileRegisteredProjectAgents} over every propagated project,\n * isolating per-project failures: one project's unreadable config or broken\n * template must not abort the loop or leave the remaining projects stale.\n * Projects are processed sequentially so the collected warnings keep a\n * deterministic per-project order.\n */\nexport async function recompilePropagatedProjectAgents(\n projectDirs: string[],\n): Promise<PropagatedRecompileSummary> {\n let rewrittenCount = 0;\n let unchangedCount = 0;\n let failedCount = 0;\n const warnings: string[] = [];\n\n for (const dir of projectDirs) {\n try {\n const result = await recompileRegisteredProjectAgents(dir);\n if (result.failed.length > 0) {\n failedCount++;\n warnings.push(...result.warnings);\n continue;\n }\n if (result.rewritten.length > 0) rewrittenCount++;\n else unchangedCount++;\n } catch (error) {\n failedCount++;\n warnings.push(`Could not recompile agents in ${dir}: ${getErrorMessage(error)}`);\n }\n }\n\n return { rewrittenCount, unchangedCount, failedCount, warnings };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,UAAU;AAMjB,IAAM,uBAAuB;AAmC7B,eAAsB,qBACpB,SACqC;AACrC,QAAM,WAAW,MAAM,QAAQ;AAAA,IAC7B,QAAQ,OAAO,IAAI,CAAC,SAAS,wBAAwB,QAAQ,WAAW,IAAI,CAAC;AAAA,EAC/E;AACA,QAAM,qBAAqB,QAAQ,SAAS;AAE5C,SAAO;AAAA,IACL,SAAS,SAAS,QAAQ,CAAC,YAAa,QAAQ,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAE;AAAA,IACzE,QAAQ,SAAS;AAAA,MAAQ,CAAC,YACxB,QAAQ,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,QAAQ,MAAM,OAAO,QAAQ,MAAM,CAAC;AAAA,IACjE;AAAA,EACF;AACF;AASA,eAAsB,oBAAoB,SAAoD;AAC5F,QAAM,yBAAyB,QAAQ,WAAW,QAAQ,IAAI;AAC9D,QAAM,qBAAqB,QAAQ,SAAS;AAC9C;AAEA,eAAe,wBACb,WACA,MACyB;AACzB,MAAI;AACF,UAAM,OAAO,KAAK,KAAK,WAAW,GAAG,IAAI,GAAG,oBAAoB,EAAE,CAAC;AACnE,WAAO,EAAE,MAAM,IAAI,KAAK;AAAA,EAC1B,SAAS,OAAO;AACd,WAAO,EAAE,MAAM,IAAI,OAAO,OAAO,gBAAgB,KAAK,EAAE;AAAA,EAC1D;AACF;AAQA,eAAe,qBAAqB,WAAkC;AACpE,QAAM,iBAAiB,SAAS;AAClC;;;ACrDA,eAAsB,cAAc,SAA2D;AAC7F,M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KAAK,iCAAiC,GAAG,KAAK,gBAAgB,KAAK,CAAC,EAAE;AAAA,IACjF;AAAA,EACF;AAEA,SAAO,EAAE,gBAAgB,gBAAgB,aAAa,SAAS;AACjE;","names":["path","path"]}
@@ -4,12 +4,12 @@ import {
4
4
  pluginInstallFailureError,
5
5
  unbackedPluginInstallError,
6
6
  unbackedPluginSkillIds
7
- } from "./chunk-C2K7Q7HO.js";
7
+ } from "./chunk-NKGYKOB7.js";
8
8
  import {
9
9
  clearTerminalScreen,
10
10
  formatTerminalTooSmallMessage,
11
11
  isTerminalLargeEnough
12
- } from "./chunk-77YZFVQD.js";
12
+ } from "./chunk-PHCPUQVR.js";
13
13
  import {
14
14
  STATUS_MESSAGES,
15
15
  claudePluginMarketplaceAdd,
@@ -33,13 +33,13 @@ import {
33
33
  skillMetadataUnusableDetail,
34
34
  verbose,
35
35
  warn
36
- } from "./chunk-7WKNPDN2.js";
36
+ } from "./chunk-XPDVAJDH.js";
37
37
  import {
38
38
  CLI_COLORS,
39
39
  DEFAULT_BRANDING,
40
40
  MIN_TERMINAL_SIZE,
41
41
  isActiveAt
42
- } from "./chunk-IV42Z63R.js";
42
+ } from "./chunk-UITEKY2R.js";
43
43
 
44
44
  // src/cli/lib/exit-codes.ts
45
45
  var EXIT_CODES = {
@@ -477,4 +477,4 @@ export {
477
477
  EXIT_CODES,
478
478
  BaseCommand
479
479
  };
480
- //# sourceMappingURL=chunk-F5JTW3HZ.js.map
480
+ //# sourceMappingURL=chunk-JIERYE6B.js.map
@@ -9,7 +9,7 @@ import {
9
9
  getUnmetRequiredBy,
10
10
  isLocalOnlySkill,
11
11
  warn
12
- } from "./chunk-7WKNPDN2.js";
12
+ } from "./chunk-XPDVAJDH.js";
13
13
  import {
14
14
  getCategoryDomain,
15
15
  getSkillById,
@@ -18,7 +18,7 @@ import {
18
18
  typedFromEntries,
19
19
  typedKeys,
20
20
  typedValues
21
- } from "./chunk-3QBOVV6A.js";
21
+ } from "./chunk-AVK2HEKB.js";
22
22
  import {
23
23
  CLI_INVOKE_COMMAND,
24
24
  DEFAULT_PUBLIC_SOURCE_NAME,
@@ -31,7 +31,7 @@ import {
31
31
  isGlobalTombstone,
32
32
  isProjectOwned,
33
33
  orderDomains
34
- } from "./chunk-IV42Z63R.js";
34
+ } from "./chunk-UITEKY2R.js";
35
35
 
36
36
  // src/cli/stores/wizard-store.ts
37
37
  import { create } from "zustand";
@@ -1159,4 +1159,4 @@ export {
1159
1159
  showWarningsAsToast,
1160
1160
  hydrateWizardStore
1161
1161
  };
1162
- //# sourceMappingURL=chunk-UE3MLDL2.js.map
1162
+ //# sourceMappingURL=chunk-K5ITEA3I.js.map
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ScrollAffordance
4
- } from "./chunk-QM3ZNOWJ.js";
4
+ } from "./chunk-6MV4JOCL.js";
5
5
  import {
6
6
  getStackName
7
- } from "./chunk-SBL4AYSB.js";
7
+ } from "./chunk-4VL3CEOS.js";
8
8
  import {
9
9
  useMeasuredHeight
10
10
  } from "./chunk-TSIU7DME.js";
11
11
  import {
12
12
  SkillAgentSummary
13
- } from "./chunk-Z56AUTER.js";
13
+ } from "./chunk-B3Y3QMWI.js";
14
14
  import {
15
15
  useWizardStore
16
- } from "./chunk-UE3MLDL2.js";
16
+ } from "./chunk-K5ITEA3I.js";
17
17
  import {
18
18
  ALL_SKILLS_EJECTED_LABEL,
19
19
  CLI_COLORS,
20
20
  DEFAULT_PUBLIC_SOURCE_NAME,
21
21
  EJECT_SOURCE,
22
22
  formatSourceDisplayName
23
- } from "./chunk-IV42Z63R.js";
23
+ } from "./chunk-UITEKY2R.js";
24
24
 
25
25
  // src/cli/components/wizard/summary-panel.tsx
26
26
  import { Box, Text } from "ink";
@@ -121,4 +121,4 @@ var SummaryPanel = () => {
121
121
  export {
122
122
  SummaryPanel
123
123
  };
124
- //# sourceMappingURL=chunk-Q4KCUR2T.js.map
124
+ //# sourceMappingURL=chunk-LT5GXEB2.js.map
@@ -5,11 +5,11 @@ import {
5
5
  getErrorMessage,
6
6
  isLocalOnlySkill,
7
7
  toClaudePluginScope
8
- } from "./chunk-7WKNPDN2.js";
8
+ } from "./chunk-XPDVAJDH.js";
9
9
  import {
10
10
  CLI_INVOKE_COMMAND,
11
11
  EJECT_SOURCE
12
- } from "./chunk-IV42Z63R.js";
12
+ } from "./chunk-UITEKY2R.js";
13
13
 
14
14
  // src/cli/lib/operations/skills/install-plugin-skills.ts
15
15
  function pluginInstallFailureError(failedCount) {
@@ -44,4 +44,4 @@ export {
44
44
  unbackedPluginInstallError,
45
45
  installPluginSkills
46
46
  };
47
- //# sourceMappingURL=chunk-C2K7Q7HO.js.map
47
+ //# sourceMappingURL=chunk-NKGYKOB7.js.map
@@ -9,13 +9,13 @@ import {
9
9
  } from "./chunk-WTJ3AY33.js";
10
10
  import {
11
11
  useSectionScroll
12
- } from "./chunk-MI7LKLD7.js";
12
+ } from "./chunk-ABAZMMG4.js";
13
13
  import {
14
14
  getSkillById
15
- } from "./chunk-3QBOVV6A.js";
15
+ } from "./chunk-AVK2HEKB.js";
16
16
  import {
17
17
  CLI_COLORS
18
- } from "./chunk-IV42Z63R.js";
18
+ } from "./chunk-UITEKY2R.js";
19
19
 
20
20
  // src/cli/components/wizard/category-grid.tsx
21
21
  import { useCallback as useCallback2, useEffect as useEffect2 } from "react";
@@ -260,4 +260,4 @@ var CategoryGrid = ({
260
260
  export {
261
261
  CategoryGrid
262
262
  };
263
- //# sourceMappingURL=chunk-X6KXPRKI.js.map
263
+ //# sourceMappingURL=chunk-NQXO4LR3.js.map
@@ -3,7 +3,7 @@ import {
3
3
  SEED_API_URL,
4
4
  SEED_USER_AGENT,
5
5
  readCarriedSkills
6
- } from "./chunk-JEJJHRZA.js";
6
+ } from "./chunk-X4SSJZLY.js";
7
7
  import {
8
8
  ERROR_MESSAGES,
9
9
  directoryExists,
@@ -11,20 +11,22 @@ import {
11
11
  isScopePairCompatible,
12
12
  loadProjectConfig,
13
13
  readForkedFromMetadata,
14
- resolveInstallPaths
15
- } from "./chunk-7WKNPDN2.js";
14
+ resolveInstallPaths,
15
+ truncateText
16
+ } from "./chunk-XPDVAJDH.js";
16
17
  import {
17
18
  typedEntries,
18
19
  typedValues
19
- } from "./chunk-3QBOVV6A.js";
20
+ } from "./chunk-AVK2HEKB.js";
20
21
  import {
22
+ CLI_INVOKE_COMMAND,
21
23
  DEFAULT_PUBLIC_SOURCE_NAME,
22
24
  EJECT_SOURCE,
23
25
  MATRIX_VERSION,
24
26
  SEED_VERSION,
25
27
  installableSeedPayloadSchema,
26
28
  seedModelSchema
27
- } from "./chunk-IV42Z63R.js";
29
+ } from "./chunk-UITEKY2R.js";
28
30
 
29
31
  // src/cli/lib/seed/installation-payload.ts
30
32
  import path from "path";
@@ -203,8 +205,20 @@ function mapOrRefuse({ config, content }) {
203
205
  }
204
206
 
205
207
  // src/cli/lib/seed/publish-seed.ts
208
+ import { STATUS_CODES } from "http";
206
209
  import { z } from "zod";
207
210
  var mintedSchema = z.object({ id: z.string().min(1) });
211
+ var refusalSchema = z.object({ error: z.object({ message: z.string() }) });
212
+ var refusedIssuesSchema = z.array(
213
+ z.object({
214
+ path: z.array(z.union([z.string(), z.number()])),
215
+ message: z.string().min(1)
216
+ })
217
+ ).min(1);
218
+ var EXPLANATION_BUDGET = 300;
219
+ var QUOTABLE_TYPE = "text/plain";
220
+ var CONTRACT_MISMATCH = 409;
221
+ var OUT_OF_DATE_AGAINST_STORE = `This CLI is out of date against the configuration store: it writes a version of the sharing contract the store does not serve, and that version travels inside the CLI rather than with the configuration. Re-run this command through '${CLI_INVOKE_COMMAND}@latest'.`;
208
222
  async function publishSeedConfig(payload) {
209
223
  const url = `${SEED_API_URL}/configs`;
210
224
  let response;
@@ -223,9 +237,7 @@ async function publishSeedConfig(payload) {
223
237
  } catch {
224
238
  return { ok: false, error: `Could not reach ${SEED_API_URL} \u2014 check your connection.` };
225
239
  }
226
- if (!response.ok) {
227
- return { ok: false, error: `Sharing this configuration failed (HTTP ${response.status}).` };
228
- }
240
+ if (!response.ok) return { ok: false, error: await refusalMessage(response) };
229
241
  let body;
230
242
  try {
231
243
  body = await response.json();
@@ -238,10 +250,60 @@ async function publishSeedConfig(payload) {
238
250
  }
239
251
  return { ok: true, id: minted.data.id };
240
252
  }
253
+ async function refusalMessage(response) {
254
+ const refused = `Sharing this configuration failed (HTTP ${response.status}).`;
255
+ if (response.status === CONTRACT_MISMATCH) return `${refused} ${OUT_OF_DATE_AGAINST_STORE}`;
256
+ const explanation = explanationOf(response, await refusalBody(response));
257
+ return explanation === void 0 ? refused : `${refused} The store said: ${explanation}`;
258
+ }
259
+ async function refusalBody(response) {
260
+ try {
261
+ return await response.text();
262
+ } catch {
263
+ return void 0;
264
+ }
265
+ }
266
+ function jsonOf(text) {
267
+ try {
268
+ return JSON.parse(text);
269
+ } catch {
270
+ return void 0;
271
+ }
272
+ }
273
+ function explanationOf(response, body) {
274
+ if (body === void 0) return void 0;
275
+ const said = schemaIssuesIn(body) ?? quotableProseIn(response, body);
276
+ return said === void 0 ? void 0 : truncateText(said, EXPLANATION_BUDGET);
277
+ }
278
+ function schemaIssuesIn(body) {
279
+ const refusal = refusalSchema.safeParse(jsonOf(body));
280
+ if (!refusal.success) return void 0;
281
+ const issues = refusedIssuesSchema.safeParse(jsonOf(refusal.data.error.message));
282
+ if (!issues.success) return void 0;
283
+ return issues.data.map(sentenceOf).join("; ");
284
+ }
285
+ function quotableProseIn(response, body) {
286
+ if (!arrivedAsText(response)) return void 0;
287
+ const said = body.trim();
288
+ if (said === "") return void 0;
289
+ if (restatesItsOwnStatus(said, response.status)) return void 0;
290
+ return said;
291
+ }
292
+ function arrivedAsText(response) {
293
+ return (response.headers.get("content-type") ?? "").startsWith(QUOTABLE_TYPE);
294
+ }
295
+ function restatesItsOwnStatus(said, status) {
296
+ const reason = STATUS_CODES[status];
297
+ return reason !== void 0 && said.toLowerCase() === reason.toLowerCase();
298
+ }
299
+ function sentenceOf(issue) {
300
+ const path2 = issue.path.join(".");
301
+ return path2 === "" ? issue.message : `${path2}: ${issue.message}`;
302
+ }
241
303
 
242
304
  export {
243
305
  seedPayloadForInstallation,
244
306
  skillsAuthoredHere,
245
307
  publishSeedConfig
246
308
  };
247
- //# sourceMappingURL=chunk-7ZFEZN4Y.js.map
309
+ //# sourceMappingURL=chunk-NTF4UXGK.js.map