agents-inc 0.152.1 → 0.154.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 (442) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +31 -35
  3. package/dist/{chunk-FVDKAVOL.js → chunk-2IMYK4WN.js} +18 -51
  4. package/dist/chunk-2IMYK4WN.js.map +1 -0
  5. package/dist/{chunk-PMM2MYMA.js → chunk-4VCWL2IG.js} +649 -357
  6. package/dist/chunk-4VCWL2IG.js.map +1 -0
  7. package/dist/{chunk-PZIZNMHK.js → chunk-5MFJ24VM.js} +237 -150
  8. package/dist/chunk-5MFJ24VM.js.map +1 -0
  9. package/dist/{chunk-KXYVJGJP.js → chunk-6CNRMCFM.js} +3 -2
  10. package/dist/{chunk-KXYVJGJP.js.map → chunk-6CNRMCFM.js.map} +1 -1
  11. package/dist/chunk-7VZV4O6B.js +40 -0
  12. package/dist/chunk-7VZV4O6B.js.map +1 -0
  13. package/dist/{chunk-SX5H6TSC.js → chunk-AKQ5QISO.js} +11 -8
  14. package/dist/chunk-AKQ5QISO.js.map +1 -0
  15. package/dist/{chunk-BNSRA6HL.js → chunk-AURY6RT6.js} +39 -176
  16. package/dist/chunk-AURY6RT6.js.map +1 -0
  17. package/dist/{chunk-LZ52XEPR.js → chunk-B66SC72V.js} +7 -6
  18. package/dist/chunk-B66SC72V.js.map +1 -0
  19. package/dist/{chunk-LASI35KT.js → chunk-BZ4CZBOM.js} +14 -28
  20. package/dist/chunk-BZ4CZBOM.js.map +1 -0
  21. package/dist/chunk-CBF4ZYV3.js +18540 -0
  22. package/dist/chunk-CBF4ZYV3.js.map +1 -0
  23. package/dist/{chunk-5GUOIJSG.js → chunk-CHNA5RVS.js} +3 -15
  24. package/dist/chunk-CHNA5RVS.js.map +1 -0
  25. package/dist/{chunk-LDP5ASDM.js → chunk-DRKSYJZ2.js} +2 -19
  26. package/dist/chunk-DRKSYJZ2.js.map +1 -0
  27. package/dist/chunk-FMYHWKGG.js +325 -0
  28. package/dist/chunk-FMYHWKGG.js.map +1 -0
  29. package/dist/{chunk-SKQWRUPX.js → chunk-GUDGCFSF.js} +59 -33
  30. package/dist/chunk-GUDGCFSF.js.map +1 -0
  31. package/dist/{chunk-WKTHWQKM.js → chunk-IPJOMAWC.js} +5070 -6305
  32. package/dist/chunk-IPJOMAWC.js.map +1 -0
  33. package/dist/chunk-IXEDSKMH.js +48 -0
  34. package/dist/chunk-IXEDSKMH.js.map +1 -0
  35. package/dist/{chunk-TUPYW2IQ.js → chunk-JC7DBPRD.js} +9 -12
  36. package/dist/chunk-JC7DBPRD.js.map +1 -0
  37. package/dist/{chunk-ZL7PFNHN.js → chunk-K3O3YQYG.js} +2 -2
  38. package/dist/{chunk-QRDTLVXG.js → chunk-LA3JPESW.js} +9 -22
  39. package/dist/chunk-LA3JPESW.js.map +1 -0
  40. package/dist/{chunk-MWG4VU64.js → chunk-MJFIO5SX.js} +50 -74
  41. package/dist/chunk-MJFIO5SX.js.map +1 -0
  42. package/dist/{chunk-L7SZXUBJ.js → chunk-NFH6SA62.js} +7 -6
  43. package/dist/{chunk-L7SZXUBJ.js.map → chunk-NFH6SA62.js.map} +1 -1
  44. package/dist/{chunk-GRVKW3CC.js → chunk-NKCY2ULI.js} +3 -2
  45. package/dist/{chunk-GRVKW3CC.js.map → chunk-NKCY2ULI.js.map} +1 -1
  46. package/dist/{chunk-TJJPWUMA.js → chunk-NSJ2S7R5.js} +3 -2
  47. package/dist/{chunk-TJJPWUMA.js.map → chunk-NSJ2S7R5.js.map} +1 -1
  48. package/dist/{chunk-Q2KG7UV3.js → chunk-OJJLYHM3.js} +2 -1
  49. package/dist/{chunk-Q2KG7UV3.js.map → chunk-OJJLYHM3.js.map} +1 -1
  50. package/dist/{chunk-MJ2KHG24.js → chunk-ONWEOS77.js} +6 -6
  51. package/dist/{chunk-MJ2KHG24.js.map → chunk-ONWEOS77.js.map} +1 -1
  52. package/dist/{chunk-NR3OZGL4.js → chunk-OZXAJNLA.js} +2 -1
  53. package/dist/{chunk-NR3OZGL4.js.map → chunk-OZXAJNLA.js.map} +1 -1
  54. package/dist/{chunk-QZZJFYUQ.js → chunk-PRJD5MMQ.js} +3 -3
  55. package/dist/chunk-PRJD5MMQ.js.map +1 -0
  56. package/dist/{chunk-MM7CTTAV.js → chunk-Q5FLW4JG.js} +2 -2
  57. package/dist/{chunk-MM7CTTAV.js.map → chunk-Q5FLW4JG.js.map} +1 -1
  58. package/dist/{chunk-5UWKOOIS.js → chunk-QQTYMW7N.js} +131 -209
  59. package/dist/chunk-QQTYMW7N.js.map +1 -0
  60. package/dist/{chunk-MVR3SYMN.js → chunk-QUDQTO3O.js} +4 -3
  61. package/dist/{chunk-MVR3SYMN.js.map → chunk-QUDQTO3O.js.map} +1 -1
  62. package/dist/{chunk-76ADG7LQ.js → chunk-R54KIGN2.js} +8 -22
  63. package/dist/chunk-R54KIGN2.js.map +1 -0
  64. package/dist/{chunk-XHUODHZ4.js → chunk-R7JV22QK.js} +22 -49
  65. package/dist/chunk-R7JV22QK.js.map +1 -0
  66. package/dist/{chunk-E5X6RJ4E.js → chunk-TUQF577Z.js} +56 -53
  67. package/dist/chunk-TUQF577Z.js.map +1 -0
  68. package/dist/{chunk-IHUY4M22.js → chunk-UW44KSYL.js} +4 -4
  69. package/dist/{chunk-DTSG5XZB.js → chunk-V3ENMW7G.js} +3 -3
  70. package/dist/chunk-VZRO7RYT.js +3694 -0
  71. package/dist/chunk-VZRO7RYT.js.map +1 -0
  72. package/dist/{chunk-MQ7FLIYS.js → chunk-WRRP47PY.js} +3 -2
  73. package/dist/{chunk-MQ7FLIYS.js.map → chunk-WRRP47PY.js.map} +1 -1
  74. package/dist/{chunk-RNJWAKMO.js → chunk-XGMOXMS4.js} +9 -8
  75. package/dist/chunk-XGMOXMS4.js.map +1 -0
  76. package/dist/{chunk-STMHDOZD.js → chunk-XMEIVWAS.js} +12 -9
  77. package/dist/chunk-XMEIVWAS.js.map +1 -0
  78. package/dist/{chunk-IUQBOCSU.js → chunk-ZBPEFQ4G.js} +2 -1
  79. package/dist/{chunk-IUQBOCSU.js.map → chunk-ZBPEFQ4G.js.map} +1 -1
  80. package/dist/chunk-ZU6DAR4S.js +223 -0
  81. package/dist/chunk-ZU6DAR4S.js.map +1 -0
  82. package/dist/commands/build/marketplace.js +115 -35
  83. package/dist/commands/build/marketplace.js.map +1 -1
  84. package/dist/commands/build/plugins.js +9 -10
  85. package/dist/commands/build/plugins.js.map +1 -1
  86. package/dist/commands/compile.js +135 -70
  87. package/dist/commands/compile.js.map +1 -1
  88. package/dist/commands/doctor.js +793 -64
  89. package/dist/commands/doctor.js.map +1 -1
  90. package/dist/commands/edit.js +231 -236
  91. package/dist/commands/edit.js.map +1 -1
  92. package/dist/commands/eject.js +24 -39
  93. package/dist/commands/eject.js.map +1 -1
  94. package/dist/commands/init.js +41 -46
  95. package/dist/commands/list.js +10 -12
  96. package/dist/commands/list.js.map +1 -1
  97. package/dist/commands/search.js +35 -88
  98. package/dist/commands/search.js.map +1 -1
  99. package/dist/commands/uninstall.js +212 -167
  100. package/dist/commands/uninstall.js.map +1 -1
  101. package/dist/commands/update.js +82 -332
  102. package/dist/commands/update.js.map +1 -1
  103. package/dist/components/common/confirm.js +1 -1
  104. package/dist/components/common/prompt-confirm.js +1 -1
  105. package/dist/components/common/select-list.js +2 -2
  106. package/dist/components/common/spinner.js +1 -1
  107. package/dist/components/wizard/category-grid.js +5 -6
  108. package/dist/components/wizard/checkbox-grid.js +5 -6
  109. package/dist/components/wizard/domain-selection.js +12 -13
  110. package/dist/components/wizard/run-wizard-session.js +30 -36
  111. package/dist/components/wizard/scroll-affordance.js +2 -2
  112. package/dist/components/wizard/skill-agent-summary.js +7 -7
  113. package/dist/components/wizard/source-grid.js +6 -11
  114. package/dist/components/wizard/stack-selection.js +9 -9
  115. package/dist/components/wizard/step-agents.js +12 -12
  116. package/dist/components/wizard/step-build.js +10 -11
  117. package/dist/components/wizard/step-confirm.js +11 -11
  118. package/dist/components/wizard/step-sources.js +11 -17
  119. package/dist/components/wizard/step-stack.js +10 -10
  120. package/dist/components/wizard/summary-panel.js +10 -10
  121. package/dist/components/wizard/toast.js +2 -2
  122. package/dist/components/wizard/wizard-layout.js +15 -16
  123. package/dist/components/wizard/wizard-tabs.js +6 -12
  124. package/dist/components/wizard/wizard.js +29 -35
  125. package/dist/config-exports.js +1 -1
  126. package/dist/copy-local-skills-WVHJFRPK.js +14 -0
  127. package/dist/hooks/init.js +49 -48
  128. package/dist/hooks/init.js.map +1 -1
  129. package/dist/index.js +3 -1
  130. package/dist/index.js.map +1 -1
  131. package/dist/load-agent-defs-5OT54J5M.js +15 -0
  132. package/dist/{loader-5JP4S7CJ.js → loader-JIZDTR4G.js} +7 -5
  133. package/dist/recompile-project-agents-VREEPBDV.js +20 -0
  134. package/dist/{source-loader-MZYCPL2S.js → source-loader-OE6EJFPU.js} +6 -6
  135. package/dist/src/agents/developer/ai-developer/identity.md +4 -4
  136. package/dist/src/agents/developer/ai-developer/playbook.md +1 -1
  137. package/dist/src/agents/developer/api-developer/identity.md +4 -4
  138. package/dist/src/agents/developer/api-developer/metadata.yaml +1 -1
  139. package/dist/src/agents/developer/cli-developer/identity.md +4 -4
  140. package/dist/src/agents/developer/web-developer/identity.md +2 -2
  141. package/dist/src/agents/developer/web-developer/metadata.yaml +1 -1
  142. package/dist/src/agents/meta/agent-summoner/identity.md +4 -5
  143. package/dist/src/agents/meta/agent-summoner/output.md +2 -2
  144. package/dist/src/agents/meta/agent-summoner/playbook.md +15 -16
  145. package/dist/src/agents/meta/codex-keeper/identity.md +4 -4
  146. package/dist/src/agents/meta/codex-keeper/playbook.md +1 -1
  147. package/dist/src/agents/meta/convention-keeper/identity.md +1 -1
  148. package/dist/src/agents/meta/skill-summoner/critical-reminders.md +0 -34
  149. package/dist/src/agents/meta/skill-summoner/critical-requirements.md +27 -3
  150. package/dist/src/agents/meta/skill-summoner/identity.md +2 -2
  151. package/{src/agents/planning/web-pm → dist/src/agents/planning/pm}/critical-reminders.md +10 -7
  152. package/dist/src/agents/planning/{web-pm → pm}/critical-requirements.md +8 -4
  153. package/dist/src/agents/planning/pm/identity.md +47 -0
  154. package/dist/src/agents/planning/pm/metadata.yaml +12 -0
  155. package/dist/src/agents/planning/{web-pm → pm}/output.md +7 -90
  156. package/dist/src/agents/planning/pm/playbook.md +185 -0
  157. package/dist/src/agents/researcher/ai-researcher/critical-reminders.md +58 -0
  158. package/dist/src/agents/researcher/ai-researcher/critical-requirements.md +40 -0
  159. package/dist/src/agents/researcher/ai-researcher/identity.md +86 -0
  160. package/dist/src/agents/researcher/ai-researcher/metadata.yaml +10 -0
  161. package/dist/src/agents/researcher/ai-researcher/output.md +363 -0
  162. package/dist/src/agents/researcher/ai-researcher/playbook.md +545 -0
  163. package/dist/src/agents/researcher/api-researcher/critical-reminders.md +16 -0
  164. package/dist/src/agents/researcher/api-researcher/identity.md +7 -7
  165. package/dist/src/agents/researcher/cli-researcher/critical-reminders.md +50 -0
  166. package/dist/src/agents/researcher/cli-researcher/critical-requirements.md +36 -0
  167. package/dist/src/agents/researcher/cli-researcher/identity.md +87 -0
  168. package/dist/src/agents/researcher/cli-researcher/metadata.yaml +10 -0
  169. package/dist/src/agents/researcher/cli-researcher/output.md +343 -0
  170. package/dist/src/agents/researcher/cli-researcher/playbook.md +370 -0
  171. package/dist/src/agents/researcher/web-researcher/identity.md +5 -6
  172. package/dist/src/agents/reviewer/reviewer/critical-reminders.md +29 -0
  173. package/dist/src/agents/reviewer/reviewer/critical-requirements.md +31 -0
  174. package/dist/src/agents/reviewer/reviewer/identity.md +41 -0
  175. package/dist/src/agents/reviewer/reviewer/metadata.yaml +12 -0
  176. package/dist/src/agents/reviewer/reviewer/output.md +202 -0
  177. package/dist/src/agents/reviewer/reviewer/playbook.md +141 -0
  178. package/dist/src/agents/tester/ai-tester/critical-reminders.md +48 -0
  179. package/dist/src/agents/tester/ai-tester/critical-requirements.md +49 -0
  180. package/dist/src/agents/tester/ai-tester/identity.md +62 -0
  181. package/dist/src/agents/tester/ai-tester/metadata.yaml +12 -0
  182. package/dist/src/agents/tester/ai-tester/output.md +375 -0
  183. package/dist/src/agents/tester/ai-tester/playbook.md +789 -0
  184. package/dist/src/agents/tester/api-tester/identity.md +3 -3
  185. package/dist/src/agents/tester/cli-tester/critical-reminders.md +3 -3
  186. package/dist/src/agents/tester/cli-tester/critical-requirements.md +2 -2
  187. package/dist/src/agents/tester/cli-tester/identity.md +3 -3
  188. package/dist/src/agents/tester/cli-tester/output.md +4 -4
  189. package/dist/src/agents/tester/cli-tester/playbook.md +3 -3
  190. package/dist/src/agents/tester/web-tester/identity.md +3 -3
  191. package/dist/stores/wizard-store.js +8 -6
  192. package/package.json +13 -2
  193. package/src/agents/developer/ai-developer/identity.md +4 -4
  194. package/src/agents/developer/ai-developer/playbook.md +1 -1
  195. package/src/agents/developer/api-developer/identity.md +4 -4
  196. package/src/agents/developer/api-developer/metadata.yaml +1 -1
  197. package/src/agents/developer/cli-developer/identity.md +4 -4
  198. package/src/agents/developer/web-developer/identity.md +2 -2
  199. package/src/agents/developer/web-developer/metadata.yaml +1 -1
  200. package/src/agents/meta/agent-summoner/identity.md +4 -5
  201. package/src/agents/meta/agent-summoner/output.md +2 -2
  202. package/src/agents/meta/agent-summoner/playbook.md +15 -16
  203. package/src/agents/meta/codex-keeper/identity.md +4 -4
  204. package/src/agents/meta/codex-keeper/playbook.md +1 -1
  205. package/src/agents/meta/convention-keeper/identity.md +1 -1
  206. package/src/agents/meta/skill-summoner/critical-reminders.md +0 -34
  207. package/src/agents/meta/skill-summoner/critical-requirements.md +27 -3
  208. package/src/agents/meta/skill-summoner/identity.md +2 -2
  209. package/{dist/src/agents/planning/web-pm → src/agents/planning/pm}/critical-reminders.md +10 -7
  210. package/src/agents/planning/{web-pm → pm}/critical-requirements.md +8 -4
  211. package/src/agents/planning/pm/identity.md +47 -0
  212. package/src/agents/planning/pm/metadata.yaml +12 -0
  213. package/src/agents/planning/{web-pm → pm}/output.md +7 -90
  214. package/src/agents/planning/pm/playbook.md +185 -0
  215. package/src/agents/researcher/ai-researcher/critical-reminders.md +58 -0
  216. package/src/agents/researcher/ai-researcher/critical-requirements.md +40 -0
  217. package/src/agents/researcher/ai-researcher/identity.md +86 -0
  218. package/src/agents/researcher/ai-researcher/metadata.yaml +10 -0
  219. package/src/agents/researcher/ai-researcher/output.md +363 -0
  220. package/src/agents/researcher/ai-researcher/playbook.md +545 -0
  221. package/src/agents/researcher/api-researcher/critical-reminders.md +16 -0
  222. package/src/agents/researcher/api-researcher/identity.md +7 -7
  223. package/src/agents/researcher/cli-researcher/critical-reminders.md +50 -0
  224. package/src/agents/researcher/cli-researcher/critical-requirements.md +36 -0
  225. package/src/agents/researcher/cli-researcher/identity.md +87 -0
  226. package/src/agents/researcher/cli-researcher/metadata.yaml +10 -0
  227. package/src/agents/researcher/cli-researcher/output.md +343 -0
  228. package/src/agents/researcher/cli-researcher/playbook.md +370 -0
  229. package/src/agents/researcher/web-researcher/identity.md +5 -6
  230. package/src/agents/reviewer/reviewer/critical-reminders.md +29 -0
  231. package/src/agents/reviewer/reviewer/critical-requirements.md +31 -0
  232. package/src/agents/reviewer/reviewer/identity.md +41 -0
  233. package/src/agents/reviewer/reviewer/metadata.yaml +12 -0
  234. package/src/agents/reviewer/reviewer/output.md +202 -0
  235. package/src/agents/reviewer/reviewer/playbook.md +141 -0
  236. package/src/agents/tester/ai-tester/critical-reminders.md +48 -0
  237. package/src/agents/tester/ai-tester/critical-requirements.md +49 -0
  238. package/src/agents/tester/ai-tester/identity.md +62 -0
  239. package/src/agents/tester/ai-tester/metadata.yaml +12 -0
  240. package/src/agents/tester/ai-tester/output.md +375 -0
  241. package/src/agents/tester/ai-tester/playbook.md +789 -0
  242. package/src/agents/tester/api-tester/identity.md +3 -3
  243. package/src/agents/tester/cli-tester/critical-reminders.md +3 -3
  244. package/src/agents/tester/cli-tester/critical-requirements.md +2 -2
  245. package/src/agents/tester/cli-tester/identity.md +3 -3
  246. package/src/agents/tester/cli-tester/output.md +4 -4
  247. package/src/agents/tester/cli-tester/playbook.md +3 -3
  248. package/src/agents/tester/web-tester/identity.md +3 -3
  249. package/src/schemas/metadata.schema.json +31 -2
  250. package/src/schemas/plugin.schema.json +3 -0
  251. package/src/schemas/project-config.schema.json +61 -15
  252. package/src/schemas/project-source-config.schema.json +0 -47
  253. package/dist/chunk-5GUOIJSG.js.map +0 -1
  254. package/dist/chunk-5UWKOOIS.js.map +0 -1
  255. package/dist/chunk-76ADG7LQ.js.map +0 -1
  256. package/dist/chunk-BNSRA6HL.js.map +0 -1
  257. package/dist/chunk-E5X6RJ4E.js.map +0 -1
  258. package/dist/chunk-EEPELKOM.js +0 -5938
  259. package/dist/chunk-EEPELKOM.js.map +0 -1
  260. package/dist/chunk-F7T5AFFN.js +0 -20
  261. package/dist/chunk-F7T5AFFN.js.map +0 -1
  262. package/dist/chunk-FVDKAVOL.js.map +0 -1
  263. package/dist/chunk-KFB5CRXZ.js +0 -377
  264. package/dist/chunk-KFB5CRXZ.js.map +0 -1
  265. package/dist/chunk-KR65TPKC.js +0 -664
  266. package/dist/chunk-KR65TPKC.js.map +0 -1
  267. package/dist/chunk-LASI35KT.js.map +0 -1
  268. package/dist/chunk-LDP5ASDM.js.map +0 -1
  269. package/dist/chunk-LZ52XEPR.js.map +0 -1
  270. package/dist/chunk-M7HO7NBK.js +0 -88
  271. package/dist/chunk-M7HO7NBK.js.map +0 -1
  272. package/dist/chunk-MWG4VU64.js.map +0 -1
  273. package/dist/chunk-ODNDXQH2.js +0 -77
  274. package/dist/chunk-ODNDXQH2.js.map +0 -1
  275. package/dist/chunk-P44SXVH3.js +0 -80
  276. package/dist/chunk-P44SXVH3.js.map +0 -1
  277. package/dist/chunk-PMM2MYMA.js.map +0 -1
  278. package/dist/chunk-PZIZNMHK.js.map +0 -1
  279. package/dist/chunk-Q45ZU6HD.js +0 -37
  280. package/dist/chunk-Q45ZU6HD.js.map +0 -1
  281. package/dist/chunk-QRDTLVXG.js.map +0 -1
  282. package/dist/chunk-QZZJFYUQ.js.map +0 -1
  283. package/dist/chunk-R5NOI2LP.js +0 -170
  284. package/dist/chunk-R5NOI2LP.js.map +0 -1
  285. package/dist/chunk-RNJWAKMO.js.map +0 -1
  286. package/dist/chunk-SBHBBZKF.js +0 -284
  287. package/dist/chunk-SBHBBZKF.js.map +0 -1
  288. package/dist/chunk-SKQWRUPX.js.map +0 -1
  289. package/dist/chunk-STMHDOZD.js.map +0 -1
  290. package/dist/chunk-SX5H6TSC.js.map +0 -1
  291. package/dist/chunk-TUPYW2IQ.js.map +0 -1
  292. package/dist/chunk-UBEDZ4FD.js +0 -4198
  293. package/dist/chunk-UBEDZ4FD.js.map +0 -1
  294. package/dist/chunk-VY6MNOXL.js +0 -20
  295. package/dist/chunk-VY6MNOXL.js.map +0 -1
  296. package/dist/chunk-WBCPLH66.js +0 -42
  297. package/dist/chunk-WBCPLH66.js.map +0 -1
  298. package/dist/chunk-WKTHWQKM.js.map +0 -1
  299. package/dist/chunk-XHUODHZ4.js.map +0 -1
  300. package/dist/chunk-ZPPHXXAP.js +0 -252
  301. package/dist/chunk-ZPPHXXAP.js.map +0 -1
  302. package/dist/commands/import/skill.js +0 -344
  303. package/dist/commands/import/skill.js.map +0 -1
  304. package/dist/commands/new/agent.js +0 -300
  305. package/dist/commands/new/agent.js.map +0 -1
  306. package/dist/commands/new/marketplace.js +0 -310
  307. package/dist/commands/new/marketplace.js.map +0 -1
  308. package/dist/commands/new/skill.js +0 -26
  309. package/dist/commands/validate.js +0 -575
  310. package/dist/commands/validate.js.map +0 -1
  311. package/dist/components/wizard/search-modal.js +0 -13
  312. package/dist/components/wizard/selection-card.js +0 -9
  313. package/dist/components/wizard/step-settings.js +0 -18
  314. package/dist/copy-local-skills-6EMVN7RB.js +0 -14
  315. package/dist/load-agent-defs-BWOUVEAR.js +0 -15
  316. package/dist/load-agent-defs-BWOUVEAR.js.map +0 -1
  317. package/dist/loader-5JP4S7CJ.js.map +0 -1
  318. package/dist/recompile-project-agents-6DL45TDI.js +0 -19
  319. package/dist/recompile-project-agents-6DL45TDI.js.map +0 -1
  320. package/dist/source-loader-MZYCPL2S.js.map +0 -1
  321. package/dist/src/agents/developer/web-architecture/critical-reminders.md +0 -48
  322. package/dist/src/agents/developer/web-architecture/critical-requirements.md +0 -65
  323. package/dist/src/agents/developer/web-architecture/identity.md +0 -64
  324. package/dist/src/agents/developer/web-architecture/metadata.yaml +0 -12
  325. package/dist/src/agents/developer/web-architecture/output.md +0 -449
  326. package/dist/src/agents/developer/web-architecture/playbook.md +0 -481
  327. package/dist/src/agents/pattern/pattern-scout/critical-reminders.md +0 -71
  328. package/dist/src/agents/pattern/pattern-scout/critical-requirements.md +0 -31
  329. package/dist/src/agents/pattern/pattern-scout/identity.md +0 -25
  330. package/dist/src/agents/pattern/pattern-scout/metadata.yaml +0 -10
  331. package/dist/src/agents/pattern/pattern-scout/output.md +0 -290
  332. package/dist/src/agents/pattern/pattern-scout/playbook.md +0 -1806
  333. package/dist/src/agents/pattern/web-pattern-critique/critical-reminders.md +0 -30
  334. package/dist/src/agents/pattern/web-pattern-critique/critical-requirements.md +0 -28
  335. package/dist/src/agents/pattern/web-pattern-critique/identity.md +0 -41
  336. package/dist/src/agents/pattern/web-pattern-critique/metadata.yaml +0 -12
  337. package/dist/src/agents/pattern/web-pattern-critique/output.md +0 -314
  338. package/dist/src/agents/pattern/web-pattern-critique/playbook.md +0 -572
  339. package/dist/src/agents/planning/api-pm/critical-reminders.md +0 -48
  340. package/dist/src/agents/planning/api-pm/critical-requirements.md +0 -41
  341. package/dist/src/agents/planning/api-pm/identity.md +0 -39
  342. package/dist/src/agents/planning/api-pm/metadata.yaml +0 -12
  343. package/dist/src/agents/planning/api-pm/output.md +0 -475
  344. package/dist/src/agents/planning/api-pm/playbook.md +0 -129
  345. package/dist/src/agents/planning/web-pm/identity.md +0 -26
  346. package/dist/src/agents/planning/web-pm/metadata.yaml +0 -12
  347. package/dist/src/agents/planning/web-pm/playbook.md +0 -318
  348. package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +0 -40
  349. package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +0 -37
  350. package/dist/src/agents/reviewer/ai-reviewer/identity.md +0 -51
  351. package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +0 -10
  352. package/dist/src/agents/reviewer/ai-reviewer/output.md +0 -395
  353. package/dist/src/agents/reviewer/ai-reviewer/playbook.md +0 -90
  354. package/dist/src/agents/reviewer/api-reviewer/critical-reminders.md +0 -31
  355. package/dist/src/agents/reviewer/api-reviewer/critical-requirements.md +0 -27
  356. package/dist/src/agents/reviewer/api-reviewer/identity.md +0 -51
  357. package/dist/src/agents/reviewer/api-reviewer/metadata.yaml +0 -12
  358. package/dist/src/agents/reviewer/api-reviewer/output.md +0 -343
  359. package/dist/src/agents/reviewer/api-reviewer/playbook.md +0 -288
  360. package/dist/src/agents/reviewer/cli-reviewer/critical-reminders.md +0 -33
  361. package/dist/src/agents/reviewer/cli-reviewer/critical-requirements.md +0 -30
  362. package/dist/src/agents/reviewer/cli-reviewer/identity.md +0 -44
  363. package/dist/src/agents/reviewer/cli-reviewer/metadata.yaml +0 -12
  364. package/dist/src/agents/reviewer/cli-reviewer/output.md +0 -414
  365. package/dist/src/agents/reviewer/cli-reviewer/playbook.md +0 -218
  366. package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +0 -38
  367. package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +0 -38
  368. package/dist/src/agents/reviewer/infra-reviewer/identity.md +0 -53
  369. package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +0 -10
  370. package/dist/src/agents/reviewer/infra-reviewer/output.md +0 -364
  371. package/dist/src/agents/reviewer/infra-reviewer/playbook.md +0 -161
  372. package/dist/src/agents/reviewer/web-reviewer/critical-reminders.md +0 -31
  373. package/dist/src/agents/reviewer/web-reviewer/critical-requirements.md +0 -26
  374. package/dist/src/agents/reviewer/web-reviewer/identity.md +0 -40
  375. package/dist/src/agents/reviewer/web-reviewer/metadata.yaml +0 -12
  376. package/dist/src/agents/reviewer/web-reviewer/output.md +0 -333
  377. package/dist/src/agents/reviewer/web-reviewer/playbook.md +0 -156
  378. package/src/agents/developer/web-architecture/critical-reminders.md +0 -48
  379. package/src/agents/developer/web-architecture/critical-requirements.md +0 -65
  380. package/src/agents/developer/web-architecture/identity.md +0 -64
  381. package/src/agents/developer/web-architecture/metadata.yaml +0 -12
  382. package/src/agents/developer/web-architecture/output.md +0 -449
  383. package/src/agents/developer/web-architecture/playbook.md +0 -481
  384. package/src/agents/pattern/pattern-scout/critical-reminders.md +0 -71
  385. package/src/agents/pattern/pattern-scout/critical-requirements.md +0 -31
  386. package/src/agents/pattern/pattern-scout/identity.md +0 -25
  387. package/src/agents/pattern/pattern-scout/metadata.yaml +0 -10
  388. package/src/agents/pattern/pattern-scout/output.md +0 -290
  389. package/src/agents/pattern/pattern-scout/playbook.md +0 -1806
  390. package/src/agents/pattern/web-pattern-critique/critical-reminders.md +0 -30
  391. package/src/agents/pattern/web-pattern-critique/critical-requirements.md +0 -28
  392. package/src/agents/pattern/web-pattern-critique/identity.md +0 -41
  393. package/src/agents/pattern/web-pattern-critique/metadata.yaml +0 -12
  394. package/src/agents/pattern/web-pattern-critique/output.md +0 -314
  395. package/src/agents/pattern/web-pattern-critique/playbook.md +0 -572
  396. package/src/agents/planning/api-pm/critical-reminders.md +0 -48
  397. package/src/agents/planning/api-pm/critical-requirements.md +0 -41
  398. package/src/agents/planning/api-pm/identity.md +0 -39
  399. package/src/agents/planning/api-pm/metadata.yaml +0 -12
  400. package/src/agents/planning/api-pm/output.md +0 -475
  401. package/src/agents/planning/api-pm/playbook.md +0 -129
  402. package/src/agents/planning/web-pm/identity.md +0 -26
  403. package/src/agents/planning/web-pm/metadata.yaml +0 -12
  404. package/src/agents/planning/web-pm/playbook.md +0 -318
  405. package/src/agents/reviewer/ai-reviewer/critical-reminders.md +0 -40
  406. package/src/agents/reviewer/ai-reviewer/critical-requirements.md +0 -37
  407. package/src/agents/reviewer/ai-reviewer/identity.md +0 -51
  408. package/src/agents/reviewer/ai-reviewer/metadata.yaml +0 -10
  409. package/src/agents/reviewer/ai-reviewer/output.md +0 -395
  410. package/src/agents/reviewer/ai-reviewer/playbook.md +0 -90
  411. package/src/agents/reviewer/api-reviewer/critical-reminders.md +0 -31
  412. package/src/agents/reviewer/api-reviewer/critical-requirements.md +0 -27
  413. package/src/agents/reviewer/api-reviewer/identity.md +0 -51
  414. package/src/agents/reviewer/api-reviewer/metadata.yaml +0 -12
  415. package/src/agents/reviewer/api-reviewer/output.md +0 -343
  416. package/src/agents/reviewer/api-reviewer/playbook.md +0 -288
  417. package/src/agents/reviewer/cli-reviewer/critical-reminders.md +0 -33
  418. package/src/agents/reviewer/cli-reviewer/critical-requirements.md +0 -30
  419. package/src/agents/reviewer/cli-reviewer/identity.md +0 -44
  420. package/src/agents/reviewer/cli-reviewer/metadata.yaml +0 -12
  421. package/src/agents/reviewer/cli-reviewer/output.md +0 -414
  422. package/src/agents/reviewer/cli-reviewer/playbook.md +0 -218
  423. package/src/agents/reviewer/infra-reviewer/critical-reminders.md +0 -38
  424. package/src/agents/reviewer/infra-reviewer/critical-requirements.md +0 -38
  425. package/src/agents/reviewer/infra-reviewer/identity.md +0 -53
  426. package/src/agents/reviewer/infra-reviewer/metadata.yaml +0 -10
  427. package/src/agents/reviewer/infra-reviewer/output.md +0 -364
  428. package/src/agents/reviewer/infra-reviewer/playbook.md +0 -161
  429. package/src/agents/reviewer/web-reviewer/critical-reminders.md +0 -31
  430. package/src/agents/reviewer/web-reviewer/critical-requirements.md +0 -26
  431. package/src/agents/reviewer/web-reviewer/identity.md +0 -40
  432. package/src/agents/reviewer/web-reviewer/metadata.yaml +0 -12
  433. package/src/agents/reviewer/web-reviewer/output.md +0 -333
  434. package/src/agents/reviewer/web-reviewer/playbook.md +0 -156
  435. /package/dist/{chunk-ZL7PFNHN.js.map → chunk-K3O3YQYG.js.map} +0 -0
  436. /package/dist/{chunk-IHUY4M22.js.map → chunk-UW44KSYL.js.map} +0 -0
  437. /package/dist/{chunk-DTSG5XZB.js.map → chunk-V3ENMW7G.js.map} +0 -0
  438. /package/dist/{commands/new/skill.js.map → copy-local-skills-WVHJFRPK.js.map} +0 -0
  439. /package/dist/{components/wizard/search-modal.js.map → load-agent-defs-5OT54J5M.js.map} +0 -0
  440. /package/dist/{components/wizard/selection-card.js.map → loader-JIZDTR4G.js.map} +0 -0
  441. /package/dist/{components/wizard/step-settings.js.map → recompile-project-agents-VREEPBDV.js.map} +0 -0
  442. /package/dist/{copy-local-skills-6EMVN7RB.js.map → source-loader-OE6EJFPU.js.map} +0 -0
@@ -1,64 +1,70 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ SelectList
4
+ } from "./chunk-XGMOXMS4.js";
2
5
  import {
3
6
  promptValue
4
- } from "./chunk-Q2KG7UV3.js";
7
+ } from "./chunk-OJJLYHM3.js";
8
+ import {
9
+ Spinner
10
+ } from "./chunk-ZBPEFQ4G.js";
5
11
  import {
6
12
  runWizardSession
7
- } from "./chunk-MVR3SYMN.js";
13
+ } from "./chunk-QUDQTO3O.js";
8
14
  import {
9
15
  useTerminalDimensions
10
- } from "./chunk-MWG4VU64.js";
11
- import {
12
- SelectList
13
- } from "./chunk-RNJWAKMO.js";
14
- import {
15
- Spinner
16
- } from "./chunk-IUQBOCSU.js";
17
- import {
18
- STATUS_MESSAGES,
19
- SUCCESS_MESSAGES
20
- } from "./chunk-ODNDXQH2.js";
16
+ } from "./chunk-MJFIO5SX.js";
21
17
  import {
22
18
  compileAgentsAllScopes,
23
19
  loadSource,
24
20
  writeProjectConfig
25
- } from "./chunk-STMHDOZD.js";
21
+ } from "./chunk-XMEIVWAS.js";
26
22
  import {
27
- discoverInstalledSkills,
28
- installPluginSkills,
29
- pluginInstallFailureError
30
- } from "./chunk-SBHBBZKF.js";
23
+ discoverInstalledSkills
24
+ } from "./chunk-ZU6DAR4S.js";
31
25
  import {
32
26
  copyLocalSkills
33
- } from "./chunk-IHUY4M22.js";
27
+ } from "./chunk-UW44KSYL.js";
34
28
  import {
35
29
  loadAgentDefs
36
- } from "./chunk-QZZJFYUQ.js";
30
+ } from "./chunk-PRJD5MMQ.js";
37
31
  import {
38
32
  render
39
33
  } from "./chunk-JFLVEFFP.js";
40
34
  import {
41
35
  orderDomains
42
- } from "./chunk-5UWKOOIS.js";
36
+ } from "./chunk-QQTYMW7N.js";
43
37
  import {
44
38
  BaseCommand,
45
39
  EXIT_CODES
46
- } from "./chunk-KR65TPKC.js";
40
+ } from "./chunk-FMYHWKGG.js";
47
41
  import {
48
42
  clearTerminalScreen
49
- } from "./chunk-ZL7PFNHN.js";
43
+ } from "./chunk-K3O3YQYG.js";
50
44
  import {
45
+ DEFAULT_SELECTION_OPTIONS,
46
+ INSTALL_MODE_DESCRIPTIONS,
51
47
  INSTALL_MODE_LABELS,
48
+ STATUS_MESSAGES,
49
+ SUCCESS_MESSAGES,
50
+ activeAgentNames,
52
51
  buildAgentScopeMap,
53
52
  deriveInstallMode,
54
53
  detectGlobalInstallation,
55
54
  detectInstallation,
55
+ detectProjectInstallation,
56
56
  getInstallationInfo,
57
+ globalScopedAgentsHint,
57
58
  isHomeDirectory,
59
+ isScopePairCompatible,
58
60
  loadProjectConfig,
59
61
  loadProjectConfigFromDir,
60
- resolveInstallPaths
61
- } from "./chunk-EEPELKOM.js";
62
+ resolveInstallPaths,
63
+ seedPayloadSchema,
64
+ sharedConfigExistingInstall,
65
+ sharedConfigGlobalInstall,
66
+ validateSelection
67
+ } from "./chunk-CBF4ZYV3.js";
62
68
  import {
63
69
  AGENT_NAMES,
64
70
  fileExists,
@@ -66,10 +72,10 @@ import {
66
72
  readFileSafe,
67
73
  settingsFileSchema,
68
74
  warn
69
- } from "./chunk-PMM2MYMA.js";
75
+ } from "./chunk-4VCWL2IG.js";
70
76
  import {
71
77
  getCategoryDomain
72
- } from "./chunk-WKTHWQKM.js";
78
+ } from "./chunk-IPJOMAWC.js";
73
79
  import {
74
80
  ASCII_LOGO,
75
81
  CLAUDE_DIR,
@@ -82,50 +88,14 @@ import {
82
88
  EJECT_SOURCE,
83
89
  MAX_CONFIG_FILE_SIZE,
84
90
  STANDARD_FILES
85
- } from "./chunk-76ADG7LQ.js";
91
+ } from "./chunk-R54KIGN2.js";
86
92
 
87
93
  // src/cli/commands/init.tsx
88
94
  import os from "os";
95
+ import "react";
89
96
  import { Flags } from "@oclif/core";
90
97
  import { Box as Box2, Text as Text2, useApp } from "ink";
91
98
 
92
- // src/cli/lib/seed/seed-schema.ts
93
- import { z } from "zod";
94
- var SEED_VERSION = 3;
95
- var seedModelSchema = z.enum(["opus", "fable", "sonnet", "haiku"]);
96
- var seedEffortSchema = z.enum(["low", "medium", "high", "xhigh", "max"]);
97
- var seedLoadStateSchema = z.enum(["lazy", "preloaded"]);
98
- var seedSkillSchema = z.object({
99
- install: z.enum(["plugin", "eject"]),
100
- scope: z.enum(["project", "global"]),
101
- /** Sub-agent id -> load state; presence is assignment. */
102
- assignments: z.record(z.string(), seedLoadStateSchema)
103
- });
104
- var seedAgentSchema = z.object({
105
- /** Explicitly switched on (bare) or off. Absent means "whatever the assignments imply". */
106
- on: z.boolean().optional(),
107
- model: seedModelSchema.optional(),
108
- effort: seedEffortSchema.optional(),
109
- /**
110
- * Which `.claude/agents` directory this sub-agent's front-matter is written to. Absent means
111
- * `project` — the CLI's own default, so a resting choice never has to travel.
112
- */
113
- scope: z.enum(["project", "global"]).optional()
114
- });
115
- var seedPayloadSchema = z.object({
116
- v: z.literal(SEED_VERSION),
117
- /**
118
- * Diagnostics only. A mismatch with this CLI's matrix must never fail a decode — it explains
119
- * why some ids were skipped, it does not decide whether to try.
120
- */
121
- matrixVersion: z.string(),
122
- stackId: z.string().nullable(),
123
- /** Sparse — presence is selection. `remembered` never leaves the browser. */
124
- skills: z.record(z.string(), seedSkillSchema),
125
- /** Sparse — an agent with nothing to say has no entry. */
126
- agents: z.record(z.string(), seedAgentSchema)
127
- });
128
-
129
99
  // src/cli/lib/seed/fetch-seed.ts
130
100
  var SEED_API_URL = process.env.AGENTS_INC_API_URL ?? "https://api.agentsinc.sh";
131
101
  var SEED_USER_AGENT = "agents-inc-cli";
@@ -190,19 +160,30 @@ function readAgentMap(agents) {
190
160
  }
191
161
  return { known, switchedOff, unknown };
192
162
  }
163
+ function seedAgentScope(entry) {
164
+ return entry?.scope ?? DEFAULT_SELECTION_OPTIONS.scope;
165
+ }
193
166
  function agentScopeConfig(name, entry) {
194
167
  return {
195
168
  name,
196
- scope: entry?.scope ?? "project",
169
+ scope: seedAgentScope(entry),
197
170
  ...entry?.model !== void 0 && { model: entry.model },
198
171
  ...entry?.effort !== void 0 && { effort: entry.effort }
199
172
  };
200
173
  }
174
+ function unwritableAssignmentsError(assignments) {
175
+ return [
176
+ "This configuration cannot be installed: a project-scoped skill never reaches a sub-agent that rests at global scope, so these assignments have nowhere to be written:",
177
+ ...assignments.map(({ skillId, agent }) => ` ${skillId} -> ${agent}`),
178
+ "Re-share it with each sub-agent above pinned to the project, or each skill above at global scope."
179
+ ].join("\n");
180
+ }
201
181
  function seedToWizardResult(payload, matrix) {
202
182
  const domainSelections = {};
203
183
  const assignedStack = {};
204
184
  const skills = [];
205
185
  const skippedSkillIds = [];
186
+ const unwritable = [];
206
187
  const agentNames = /* @__PURE__ */ new Set();
207
188
  const agentMap = readAgentMap(payload.agents);
208
189
  const skippedAgentNames = new Set(agentMap.unknown);
@@ -229,10 +210,15 @@ function seedToWizardResult(payload, matrix) {
229
210
  continue;
230
211
  }
231
212
  const agent = agentName;
213
+ if (!isScopePairCompatible(entry.scope, seedAgentScope(agentMap.known.get(agent)))) {
214
+ unwritable.push({ skillId: id, agent });
215
+ continue;
216
+ }
232
217
  agentNames.add(agent);
233
218
  addToAgentStack(assignedStack, agent, category, toSkillAssignment(id, load));
234
219
  }
235
220
  }
221
+ if (unwritable.length > 0) throw new Error(unwritableAssignmentsError(unwritable));
236
222
  for (const [name, entry] of agentMap.known) {
237
223
  if (entry.on === true) agentNames.add(name);
238
224
  }
@@ -247,12 +233,17 @@ function seedToWizardResult(payload, matrix) {
247
233
  domainSelections,
248
234
  selectedDomains: orderDomains(Object.keys(domainSelections)),
249
235
  // Nothing was dropped from a *saved config* — the skipped ids came off the wire and are
250
- // reported to the user directly, so there is no existing entry to preserve.
236
+ // reported to the user directly, so there is no config removal to explain.
251
237
  unresolvableSkillIds: [],
252
238
  cancelled: false,
253
- // A shared configuration was already validated by the app that built it; this path has no
254
- // interactive step in which a validation warning could be acted on.
255
- validation: { valid: true, errors: [], warnings: [] }
239
+ // Revalidated here rather than taken on trust from the app that built the payload. That app
240
+ // validated against ITS catalog; this one skips ids it does not know and carries its own
241
+ // relationship rules, so a configuration that was consistent where it was authored can
242
+ // arrive with a requirement genuinely unmet. Running the same validator the wizard runs
243
+ // makes that this catalog's verdict on what it can install — reported through the spine
244
+ // `init` already has, beside the skips that explain it — rather than a fault in what was
245
+ // shared.
246
+ validation: validateSelection(skills.map((skill) => skill.id))
256
247
  },
257
248
  skippedSkillIds,
258
249
  skippedAgentNames: [...skippedAgentNames]
@@ -260,6 +251,8 @@ function seedToWizardResult(payload, matrix) {
260
251
  }
261
252
 
262
253
  // src/cli/lib/permission-checker.tsx
254
+ import "react";
255
+ import "zod";
263
256
  import { Text, Box } from "ink";
264
257
  import path from "path";
265
258
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -392,6 +385,9 @@ async function runDashboardFlow(projectDir, config, origin, log) {
392
385
  }
393
386
  return true;
394
387
  }
388
+ function writesGlobalContent(result) {
389
+ return result.skills.some((skill) => skill.scope === "global") || result.agentConfigs.some((agent) => agent.scope === "global");
390
+ }
395
391
  var Init = class _Init extends BaseCommand {
396
392
  static summary = `Initialize ${DEFAULT_BRANDING.NAME} in this project`;
397
393
  static description = "Interactive wizard to set up skills and agents. Supports Plugin Mode (native install) and Eject Mode (copy to .claude/).";
@@ -403,17 +399,13 @@ var Init = class _Init extends BaseCommand {
403
399
  {
404
400
  description: "Initialize from a custom marketplace",
405
401
  command: "<%= config.bin %> <%= command.id %> --source github:org/marketplace"
406
- },
407
- {
408
- description: "Force refresh skills from remote",
409
- command: "<%= config.bin %> <%= command.id %> --refresh"
410
402
  }
411
403
  ];
412
404
  static flags = {
413
- ...BaseCommand.baseFlags,
414
- refresh: Flags.boolean({
415
- description: "Force refresh from remote source",
416
- default: false
405
+ source: Flags.string({
406
+ char: "s",
407
+ description: "Skills source path or URL",
408
+ required: false
417
409
  }),
418
410
  from: Flags.string({
419
411
  description: "Install a configuration shared from agentsinc.sh by its id, without the wizard",
@@ -428,9 +420,11 @@ var Init = class _Init extends BaseCommand {
428
420
  async run() {
429
421
  const { flags } = await this.parse(_Init);
430
422
  const projectDir = process.cwd();
423
+ await this.ensureConfigReadable(projectDir);
431
424
  if (!flags.from && await this.showDashboardIfInitialized(projectDir)) return;
432
- const selection = flags.from ? await this.selectionFromSharedConfig(flags.from, flags) : await this.selectionFromWizard(flags, projectDir);
425
+ const selection = flags.from ? await this.selectionFromSharedConfig(flags.from, flags, projectDir) : await this.selectionFromWizard(flags, projectDir);
433
426
  if (!selection) this.exit(EXIT_CODES.CANCELLED);
427
+ this.reportValidationErrors(selection.result.validation);
434
428
  if (selection.result.skills.length === 0 && selection.result.selectedAgents.length === 0) {
435
429
  this.error(selection.emptyMessage, { exit: EXIT_CODES.ERROR });
436
430
  }
@@ -444,15 +438,7 @@ var Init = class _Init extends BaseCommand {
444
438
  /** The interactive producer: load the source, run the wizard, return what was chosen. */
445
439
  async selectionFromWizard(flags, projectDir) {
446
440
  const isGlobalRoot = isHomeDirectory(projectDir);
447
- const { unmount, clear: clearSpinner } = render(
448
- /* @__PURE__ */ jsx2(Spinner, { label: STATUS_MESSAGES.LOADING_SKILLS })
449
- );
450
- const [{ sourceResult, startupMessages }, globalConfig] = await Promise.all([
451
- this.loadSourceOrFail(flags),
452
- this.loadGlobalConfigIfExists()
453
- ]);
454
- clearSpinner();
455
- unmount();
441
+ const { sourceResult, startupMessages, globalConfig } = await this.loadWizardInputsUnderSpinner(flags);
456
442
  const result = await this.runWizard(
457
443
  sourceResult,
458
444
  startupMessages,
@@ -469,21 +455,50 @@ var Init = class _Init extends BaseCommand {
469
455
  emptyMessage: "No skills selected"
470
456
  };
471
457
  }
458
+ /**
459
+ * Everything the wizard needs, loaded behind a spinner that comes down whichever way the
460
+ * await ends.
461
+ *
462
+ * The cleanup is a `finally` because a source that cannot be loaded refuses the run from
463
+ * inside this await, and oclif would otherwise paint its error under an Ink tree still
464
+ * repainting over it. Never a `catch`: the throw reaches oclif untouched, or both the
465
+ * error rendering and the exit code change with it.
466
+ */
467
+ async loadWizardInputsUnderSpinner(flags) {
468
+ const { unmount, clear: clearSpinner } = render(
469
+ /* @__PURE__ */ jsx2(Spinner, { label: STATUS_MESSAGES.LOADING_SKILLS })
470
+ );
471
+ try {
472
+ const [source, globalConfig] = await Promise.all([
473
+ this.loadSourceOrFail(flags),
474
+ this.loadGlobalConfigIfExists()
475
+ ]);
476
+ return { ...source, globalConfig };
477
+ } finally {
478
+ clearSpinner();
479
+ unmount();
480
+ }
481
+ }
472
482
  /**
473
483
  * The `--from <id>` producer: fetch and map, no wizard. Nothing here may assume a TTY — running
474
484
  * headless is most of why the flag exists.
485
+ *
486
+ * It is also greenfield-only, which is what the two refusals are: a shared configuration is
487
+ * installed whole, so anything it would have to install over has to be uninstalled first.
475
488
  */
476
- async selectionFromSharedConfig(id, flags) {
489
+ async selectionFromSharedConfig(id, flags, projectDir) {
490
+ await this.refuseInstalledProject(projectDir);
477
491
  this.log(`Fetching configuration ${id}...`);
478
492
  const fetched = await fetchSeedConfig(id);
479
493
  if (!fetched.ok) {
480
494
  this.error(fetched.error, { exit: EXIT_CODES.ERROR });
481
495
  }
482
496
  const { sourceResult } = await this.loadSourceOrFail(flags);
483
- const { result, skippedSkillIds, skippedAgentNames } = seedToWizardResult(
497
+ const { result, skippedSkillIds, skippedAgentNames } = this.decodeSeedOrFail(
484
498
  fetched.payload,
485
499
  sourceResult.matrix
486
500
  );
501
+ await this.refuseBlockingGlobalInstall(result);
487
502
  if (skippedSkillIds.length > 0) {
488
503
  this.warn(
489
504
  `Skipped ${skippedSkillIds.length} skill(s) this catalog does not know: ${skippedSkillIds.join(", ")}`
@@ -507,6 +522,47 @@ var Init = class _Init extends BaseCommand {
507
522
  emptyMessage: `Configuration '${id}' contains no skills this catalog can install.`
508
523
  };
509
524
  }
525
+ /**
526
+ * Refuses to install a shared configuration into a directory that already has one.
527
+ *
528
+ * Project-scoped detection rather than `detectInstallation`, whose global fallback would refuse
529
+ * every clean project on a machine with a global install — including for a payload that never
530
+ * goes near it. Whether a global install is in the way is a question about the PAYLOAD, and
531
+ * {@link refuseBlockingGlobalInstall} is where it is asked.
532
+ *
533
+ * This runs before the fetch: there is nothing to learn from the network about a directory that
534
+ * is already spoken for.
535
+ */
536
+ async refuseInstalledProject(projectDir) {
537
+ const installation = await detectProjectInstallation(projectDir);
538
+ if (!installation) return;
539
+ this.error(sharedConfigExistingInstall(installation.configPath), { exit: EXIT_CODES.ERROR });
540
+ }
541
+ /**
542
+ * The other half of the same rule. A payload carrying global-scoped skills or sub-agents writes
543
+ * into the user's own ~/.claude, so an installation there is in its way even when this project
544
+ * is spotless. A payload with nothing global cannot reach that far and is never refused for it.
545
+ */
546
+ async refuseBlockingGlobalInstall(result) {
547
+ if (!writesGlobalContent(result)) return;
548
+ const globalInstallation = await detectGlobalInstallation();
549
+ if (!globalInstallation) return;
550
+ this.error(sharedConfigGlobalInstall(globalInstallation.configPath), {
551
+ exit: EXIT_CODES.ERROR
552
+ });
553
+ }
554
+ /**
555
+ * The decode refuses a payload the config model has nowhere to write (see `seedToWizardResult`).
556
+ * That is a failure of this command, reported with this command's exit code rather than left to
557
+ * surface as an unhandled throw.
558
+ */
559
+ decodeSeedOrFail(payload, matrix) {
560
+ try {
561
+ return seedToWizardResult(payload, matrix);
562
+ } catch (error) {
563
+ this.handleError(error);
564
+ }
565
+ }
510
566
  async showDashboardIfInitialized(projectDir) {
511
567
  return runDashboardFlow(projectDir, this.config, "init", (msg) => this.log(msg));
512
568
  }
@@ -519,9 +575,10 @@ var Init = class _Init extends BaseCommand {
519
575
  async loadSourceOrFail(flags) {
520
576
  try {
521
577
  const loaded = await loadSource({
522
- sourceFlag: flags.source,
578
+ // The one load that may CHOOSE a source rather than read the stored one.
579
+ caller: "init",
580
+ ...flags.source !== void 0 && { sourceFlag: flags.source },
523
581
  projectDir: process.cwd(),
524
- forceRefresh: flags.refresh,
525
582
  captureStartupMessages: true
526
583
  });
527
584
  return { sourceResult: loaded.sourceResult, startupMessages: loaded.startupMessages };
@@ -532,20 +589,23 @@ var Init = class _Init extends BaseCommand {
532
589
  }
533
590
  }
534
591
  async runWizard(sourceResult, startupMessages, projectDir, globalConfig, isGlobalRoot) {
592
+ const selectedAgents = globalConfig?.agents && activeAgentNames(globalConfig.agents);
593
+ const globalSkills = globalConfig?.skills;
535
594
  return runWizardSession({
536
595
  hydrate: {
537
- initialAgents: globalConfig?.selectedAgents,
538
- installedSkillIds: globalConfig?.skills?.map((s) => s.id),
539
- installedSkillConfigs: globalConfig?.skills,
540
- installedAgentConfigs: globalConfig?.agents,
596
+ ...selectedAgents !== void 0 && { initialAgents: selectedAgents },
597
+ ...globalSkills !== void 0 && {
598
+ installedSkillIds: globalSkills.map((s) => s.id),
599
+ installedSkillConfigs: globalSkills
600
+ },
601
+ ...globalConfig?.agents !== void 0 && { installedAgentConfigs: globalConfig.agents },
541
602
  isEditingFromGlobalScope: isGlobalRoot
542
603
  },
543
604
  props: {
544
605
  version: this.config.version,
545
606
  logo: ASCII_LOGO,
546
- initialAgents: globalConfig?.selectedAgents,
547
- installedSkillIds: globalConfig?.skills?.map((s) => s.id),
548
- projectDir,
607
+ initialAgents: selectedAgents,
608
+ installedSkillIds: globalConfig?.skills.map((s) => s.id),
549
609
  startupMessages
550
610
  },
551
611
  onCancel: () => this.log("Setup cancelled"),
@@ -566,7 +626,7 @@ var Init = class _Init extends BaseCommand {
566
626
  ) : null;
567
627
  const copyResult = installMode === "eject" || installMode === "mixed" ? await this.copyEjectSkillsStep(ejectedSkills, projectDir, sourceResult, installMode) : null;
568
628
  if (resolvedMarketplace !== null) {
569
- await this.installPluginsStep(pluginSkills, resolvedMarketplace, projectDir);
629
+ await this.installPluginSkillsReported(pluginSkills, resolvedMarketplace, projectDir);
570
630
  }
571
631
  const pluginModeSucceeded = resolvedMarketplace !== null;
572
632
  try {
@@ -583,25 +643,34 @@ var Init = class _Init extends BaseCommand {
583
643
  pluginModeSucceeded,
584
644
  copyResult
585
645
  );
586
- const permissionWarning = await checkPermissions(projectDir);
587
- if (permissionWarning) {
588
- if (interactive) {
589
- const { waitUntilExit } = render(permissionWarning);
590
- await waitUntilExit();
591
- } else {
592
- const { unmount } = render(permissionWarning);
593
- unmount();
594
- }
595
- }
646
+ await this.showPermissionNotice(projectDir, interactive);
596
647
  } catch (error) {
597
648
  this.handleError(error);
598
649
  }
599
650
  }
651
+ /**
652
+ * The permission notice, where there is one to show. It is an Ink app with no exit of its own,
653
+ * so `waitUntilExit()` only ever resolves because a person is there to end it — which is fine
654
+ * after the wizard and a hang everywhere else. Without a terminal to hold, one frame is
655
+ * rendered and let go: the notice is information, not a prompt, so there is nothing to answer
656
+ * and nothing to wait for.
657
+ */
658
+ async showPermissionNotice(projectDir, interactive) {
659
+ const permissionWarning = await checkPermissions(projectDir);
660
+ if (!permissionWarning) return;
661
+ if (!interactive) {
662
+ const { unmount } = render(permissionWarning);
663
+ unmount();
664
+ return;
665
+ }
666
+ const { waitUntilExit } = render(permissionWarning);
667
+ await waitUntilExit();
668
+ }
600
669
  logInstallPlan(installMode, ejectedSkills, pluginSkills) {
601
670
  this.log("\n");
602
671
  this.log(`Selected ${ejectedSkills.length + pluginSkills.length} skills`);
603
672
  this.log(
604
- `Install mode: ${installMode === "plugin" ? `${INSTALL_MODE_LABELS.plugin} (native install)` : installMode === "mixed" ? `${INSTALL_MODE_LABELS.mixed} (${ejectedSkills.length} eject, ${pluginSkills.length} plugin)` : `${INSTALL_MODE_LABELS.eject} (copy to .claude/skills/)`}`
673
+ `Install mode: ${installMode === "mixed" ? `${INSTALL_MODE_LABELS.mixed} (${ejectedSkills.length} eject, ${pluginSkills.length} plugin)` : INSTALL_MODE_DESCRIPTIONS[installMode]}`
605
674
  );
606
675
  }
607
676
  async copyEjectSkillsStep(localSkills, projectDir, sourceResult, installMode) {
@@ -623,36 +692,20 @@ var Init = class _Init extends BaseCommand {
623
692
  }
624
693
  return copyResult;
625
694
  }
626
- async installPluginsStep(pluginSkills, marketplace, projectDir) {
627
- this.log("Installing skill plugins...");
628
- const pluginResult = await installPluginSkills(pluginSkills, marketplace, projectDir);
629
- for (const item of pluginResult.installed) {
630
- this.log(` Installed ${item.ref}`);
631
- }
632
- for (const item of pluginResult.failed) {
633
- this.warn(`Failed to install plugin ${item.id}: ${item.error}`);
634
- }
635
- if (pluginResult.failed.length > 0) {
636
- this.error(pluginInstallFailureError(pluginResult.failed.length), {
637
- exit: EXIT_CODES.ERROR
638
- });
639
- }
640
- this.log(`Installed ${pluginResult.installed.length} skill plugins
641
- `);
642
- }
643
695
  async writeConfigAndCompile(result, sourceResult, flags) {
644
696
  this.log("Generating configuration...");
645
697
  const configResult = await writeProjectConfig({
646
698
  wizardResult: result,
647
699
  sourceResult,
648
700
  projectDir: process.cwd(),
649
- sourceFlag: flags.source
701
+ ...flags.source !== void 0 && { sourceFlag: flags.source }
650
702
  });
651
703
  if (configResult.wasMerged) {
652
704
  this.log(`Merged with existing config at ${configResult.existingConfigPath}`);
653
705
  }
654
706
  this.log(`Configuration saved (${configResult.config.agents.length} agents)
655
707
  `);
708
+ this.reportUnassignedSkills(configResult.config);
656
709
  this.log(STATUS_MESSAGES.COMPILING_AGENTS);
657
710
  const cwd = process.cwd();
658
711
  const agentDefs = await loadAgentDefs();
@@ -669,20 +722,6 @@ var Init = class _Init extends BaseCommand {
669
722
  this.reportPropagatedRecompile(configResult.propagation);
670
723
  return { configResult, compileResult, agentScopeMap };
671
724
  }
672
- /**
673
- * Renders the recompile the gated write already performed on every OTHER
674
- * registered project this run's global change was propagated into.
675
- */
676
- reportPropagatedRecompile(propagation) {
677
- if (propagation.propagated.updated.length === 0) return;
678
- const { recompiledCount, failedCount, warnings } = propagation.recompile;
679
- for (const warning of warnings) {
680
- this.warn(warning);
681
- }
682
- const failureSuffix = failedCount > 0 ? ` (${failedCount} failed)` : "";
683
- this.log(`Recompiled agents in ${recompiledCount} registered projects${failureSuffix}
684
- `);
685
- }
686
725
  reportSuccess(configResult, compileResult, agentScopeMap, installMode, pluginModeSucceeded, copyResult) {
687
726
  this.log(`${SUCCESS_MESSAGES.INIT_SUCCESS}
688
727
  `);
@@ -691,12 +730,36 @@ var Init = class _Init extends BaseCommand {
691
730
  this.reportSkillsCopied(copyResult);
692
731
  }
693
732
  this.reportAgentsCompiled(compileResult.compiled, agentScopeMap);
733
+ this.reportConfiguration(configResult.configPath, agentScopeMap);
734
+ }
735
+ /**
736
+ * Names the config that actually holds this install's assignments, and where a
737
+ * recompile of them has to be run from.
738
+ *
739
+ * Split by the same `agentScopeMap` the two reporters above split on, because the
740
+ * same scope decides both. A project config's `stack` is filtered down to
741
+ * project-scoped agents on the way out, so a wholly GLOBAL install leaves it
742
+ * carrying no assignment at all — naming it sends the user to a file with nothing
743
+ * in it — and `compile` in this cwd runs the PROJECT pass, which recompiles no
744
+ * global agent. At the home root both scopes resolve to one file and one pass, so
745
+ * there is nothing to split and the project wording stands.
746
+ */
747
+ reportConfiguration(projectConfigPath, agentScopeMap) {
748
+ const cwd = process.cwd();
749
+ const paths = {
750
+ global: resolveInstallPaths(cwd, "global").configPath,
751
+ project: projectConfigPath
752
+ };
753
+ const split = splitAgentScopes(cwd, agentScopeMap);
694
754
  this.log("Configuration:");
695
- this.log(` ${configResult.configPath}`);
755
+ for (const configPath of configsHoldingAssignments(split, paths)) {
756
+ this.log(` ${configPath}`);
757
+ }
696
758
  this.log("");
697
759
  this.log("To customize agent-skill assignments:");
698
- this.log(` 1. Edit ${CLAUDE_SRC_DIR}/${STANDARD_FILES.CONFIG_TS}`);
699
- this.log(` 2. Run '${CLI_INVOKE_COMMAND} compile' to regenerate agents`);
760
+ for (const [index, step] of customizationSteps(split, paths.global).entries()) {
761
+ this.log(` ${index + 1}. ${step}`);
762
+ }
700
763
  this.log("");
701
764
  }
702
765
  /**
@@ -757,14 +820,38 @@ var Init = class _Init extends BaseCommand {
757
820
  }
758
821
  }
759
822
  };
823
+ function splitAgentScopes(cwd, agentScopeMap) {
824
+ if (isHomeDirectory(cwd)) return { globalAgentCount: 0, isGlobalOnly: false };
825
+ const scopes = [...agentScopeMap.values()];
826
+ const globalAgentCount = scopes.filter((scope) => scope === "global").length;
827
+ return {
828
+ globalAgentCount,
829
+ isGlobalOnly: globalAgentCount > 0 && globalAgentCount === scopes.length
830
+ };
831
+ }
832
+ function configsHoldingAssignments(split, paths) {
833
+ if (split.isGlobalOnly) return [paths.global];
834
+ if (split.globalAgentCount > 0) return [paths.global, paths.project];
835
+ return [paths.project];
836
+ }
837
+ function customizationSteps(split, globalConfigPath) {
838
+ if (split.isGlobalOnly) {
839
+ return [`Edit ${globalConfigPath}`, globalScopedAgentsHint(split.globalAgentCount)];
840
+ }
841
+ return [
842
+ `Edit ${CLAUDE_SRC_DIR}/${STANDARD_FILES.CONFIG_TS}`,
843
+ `Run '${CLI_INVOKE_COMMAND} compile' to regenerate agents`,
844
+ ...split.globalAgentCount > 0 ? [globalScopedAgentsHint(split.globalAgentCount)] : []
845
+ ];
846
+ }
760
847
  async function getDashboardData(projectDir) {
761
848
  const [info, loaded] = await Promise.all([getInstallationInfo(), loadProjectConfig(projectDir)]);
762
- const activeSkills = loaded?.config?.skills?.filter((s) => !s.excluded);
849
+ const activeSkills = loaded?.config.skills.filter((s) => !s.excluded);
763
850
  const skillCount = info?.skillCount ?? 0;
764
851
  const agentCount = info?.agentCount ?? 0;
765
852
  const mode = info?.mode ?? (activeSkills ? deriveInstallMode(activeSkills) : "eject");
766
- const source = loaded?.config?.source;
767
- return { skillCount, agentCount, mode, source };
853
+ const source = loaded?.config.source;
854
+ return { skillCount, agentCount, mode, ...source !== void 0 && { source } };
768
855
  }
769
856
 
770
857
  export {
@@ -774,4 +861,4 @@ export {
774
861
  Init,
775
862
  getDashboardData
776
863
  };
777
- //# sourceMappingURL=chunk-PZIZNMHK.js.map
864
+ //# sourceMappingURL=chunk-5MFJ24VM.js.map