@skaile/workspaces 5.7.0 → 5.8.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 (399) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/dist/app-sdk/index.js +1 -1
  3. package/dist/{asset-feeds-K36CR52Q.js → asset-feeds-EYRZR4K5.js} +54 -30
  4. package/dist/asset-feeds-EYRZR4K5.js.map +1 -0
  5. package/dist/asset-manager/catalog-deployer.js +9 -9
  6. package/dist/asset-manager/index.js +15 -15
  7. package/dist/asset-manager/installer.js +11 -11
  8. package/dist/asset-manager/renderers.js +10 -10
  9. package/dist/asset-manager/src/index.d.ts +268 -24
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/asset-manager/src/install-agent.d.ts +11 -0
  12. package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
  13. package/dist/asset-manager/src/installer.d.ts +2 -2
  14. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  15. package/dist/bridge/drivers/claude-sdk.js +147 -211
  16. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  17. package/dist/bridge/drivers/codex.js +90 -66
  18. package/dist/bridge/drivers/codex.js.map +1 -1
  19. package/dist/bridge/drivers/continue.js +14 -15
  20. package/dist/bridge/drivers/continue.js.map +1 -1
  21. package/dist/bridge/drivers/echo.js +4 -4
  22. package/dist/bridge/drivers/gemini.js +8 -8
  23. package/dist/bridge/drivers/goose.js +14 -15
  24. package/dist/bridge/drivers/goose.js.map +1 -1
  25. package/dist/bridge/drivers/omp.js +68 -104
  26. package/dist/bridge/drivers/omp.js.map +1 -1
  27. package/dist/bridge/drivers/opencode.js +14 -15
  28. package/dist/bridge/drivers/opencode.js.map +1 -1
  29. package/dist/bridge/drivers/qwen.js +8 -8
  30. package/dist/bridge/index.js +16 -17
  31. package/dist/bridge/src/codex/managed-driver.d.ts +13 -10
  32. package/dist/bridge/src/codex/managed-driver.d.ts.map +1 -1
  33. package/dist/bridge/src/drivers/_subprocess-cli.d.ts +12 -2
  34. package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +1 -1
  35. package/dist/bridge/src/drivers/claude-sdk.d.ts +37 -62
  36. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  37. package/dist/bridge/src/drivers/codex.d.ts +26 -10
  38. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  39. package/dist/bridge/src/drivers/continue.d.ts +2 -2
  40. package/dist/bridge/src/drivers/continue.d.ts.map +1 -1
  41. package/dist/bridge/src/drivers/gemini.d.ts +2 -2
  42. package/dist/bridge/src/drivers/gemini.d.ts.map +1 -1
  43. package/dist/bridge/src/drivers/goose.d.ts +2 -2
  44. package/dist/bridge/src/drivers/goose.d.ts.map +1 -1
  45. package/dist/bridge/src/drivers/omp.d.ts +24 -35
  46. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  47. package/dist/bridge/src/drivers/opencode.d.ts +2 -2
  48. package/dist/bridge/src/drivers/opencode.d.ts.map +1 -1
  49. package/dist/bridge/src/drivers/recovery-policy.d.ts +79 -0
  50. package/dist/bridge/src/drivers/recovery-policy.d.ts.map +1 -0
  51. package/dist/bridge/src/index.d.ts +1 -0
  52. package/dist/bridge/src/index.d.ts.map +1 -1
  53. package/dist/bridge/src/reconfigure-ledger.d.ts +117 -0
  54. package/dist/bridge/src/reconfigure-ledger.d.ts.map +1 -0
  55. package/dist/bridge/src/types.d.ts +57 -6
  56. package/dist/bridge/src/types.d.ts.map +1 -1
  57. package/dist/{chunk-WIEC3ZE4.js → chunk-2FRUUDZY.js} +5 -5
  58. package/dist/{chunk-WIEC3ZE4.js.map → chunk-2FRUUDZY.js.map} +1 -1
  59. package/dist/{chunk-O4Z7MAW7.js → chunk-2LWYNQK7.js} +3 -3
  60. package/dist/{chunk-O4Z7MAW7.js.map → chunk-2LWYNQK7.js.map} +1 -1
  61. package/dist/{chunk-OOLT6HGP.js → chunk-36AFURKZ.js} +7 -7
  62. package/dist/{chunk-OOLT6HGP.js.map → chunk-36AFURKZ.js.map} +1 -1
  63. package/dist/{chunk-DFFD4BFG.js → chunk-4MQS7CAF.js} +174 -86
  64. package/dist/chunk-4MQS7CAF.js.map +1 -0
  65. package/dist/{chunk-RNPHRRLG.js → chunk-4PTSR4UU.js} +3 -3
  66. package/dist/{chunk-RNPHRRLG.js.map → chunk-4PTSR4UU.js.map} +1 -1
  67. package/dist/{chunk-34C42MJX.js → chunk-6GRX5L6A.js} +5 -5
  68. package/dist/{chunk-34C42MJX.js.map → chunk-6GRX5L6A.js.map} +1 -1
  69. package/dist/{chunk-NFGRW3L7.js → chunk-7RGTAEG6.js} +3 -3
  70. package/dist/{chunk-NFGRW3L7.js.map → chunk-7RGTAEG6.js.map} +1 -1
  71. package/dist/{chunk-BTK7ECLH.js → chunk-AWQYXZVG.js} +15 -6
  72. package/dist/chunk-AWQYXZVG.js.map +1 -0
  73. package/dist/{chunk-XBSQ4KMC.js → chunk-B4X2N7JQ.js} +205 -3
  74. package/dist/chunk-B4X2N7JQ.js.map +1 -0
  75. package/dist/{chunk-FRHE7FFB.js → chunk-B6GIW55K.js} +5 -3
  76. package/dist/chunk-B6GIW55K.js.map +1 -0
  77. package/dist/{chunk-JLSCA5T5.js → chunk-BJNUNQAW.js} +3 -3
  78. package/dist/{chunk-JLSCA5T5.js.map → chunk-BJNUNQAW.js.map} +1 -1
  79. package/dist/{chunk-RVIZQ5XD.js → chunk-BTE2V4IW.js} +3 -3
  80. package/dist/{chunk-RVIZQ5XD.js.map → chunk-BTE2V4IW.js.map} +1 -1
  81. package/dist/{chunk-EB4XN3KE.js → chunk-CGT45WN7.js} +3 -3
  82. package/dist/{chunk-EB4XN3KE.js.map → chunk-CGT45WN7.js.map} +1 -1
  83. package/dist/{chunk-47ZD34KB.js → chunk-CIFS5K6T.js} +3 -3
  84. package/dist/{chunk-47ZD34KB.js.map → chunk-CIFS5K6T.js.map} +1 -1
  85. package/dist/{chunk-FAP63KV7.js → chunk-CKQEIY43.js} +4 -4
  86. package/dist/{chunk-FAP63KV7.js.map → chunk-CKQEIY43.js.map} +1 -1
  87. package/dist/{chunk-AVCUPPG6.js → chunk-EF7NPDDU.js} +4 -4
  88. package/dist/{chunk-AVCUPPG6.js.map → chunk-EF7NPDDU.js.map} +1 -1
  89. package/dist/chunk-EPBKISS5.js +84 -0
  90. package/dist/chunk-EPBKISS5.js.map +1 -0
  91. package/dist/{chunk-THEJJBOU.js → chunk-F2EKONM7.js} +3 -3
  92. package/dist/{chunk-THEJJBOU.js.map → chunk-F2EKONM7.js.map} +1 -1
  93. package/dist/{chunk-DMLDYFDS.js → chunk-F3RDEH5U.js} +7 -4
  94. package/dist/chunk-F3RDEH5U.js.map +1 -0
  95. package/dist/{chunk-SZWRPEF7.js → chunk-FTJJO3EM.js} +39 -29
  96. package/dist/chunk-FTJJO3EM.js.map +1 -0
  97. package/dist/{chunk-PSA6ONFB.js → chunk-FVJK4QWM.js} +4 -4
  98. package/dist/{chunk-PSA6ONFB.js.map → chunk-FVJK4QWM.js.map} +1 -1
  99. package/dist/{chunk-LBQ4BBX4.js → chunk-FZNG4V4J.js} +16 -30
  100. package/dist/chunk-FZNG4V4J.js.map +1 -0
  101. package/dist/{chunk-SWO25LTO.js → chunk-GB7WDMH2.js} +4 -4
  102. package/dist/{chunk-SWO25LTO.js.map → chunk-GB7WDMH2.js.map} +1 -1
  103. package/dist/{chunk-NARITJS2.js → chunk-GCICGXDD.js} +3 -3
  104. package/dist/{chunk-NARITJS2.js.map → chunk-GCICGXDD.js.map} +1 -1
  105. package/dist/{chunk-TTPSDC2G.js → chunk-GTILM2CI.js} +34 -13
  106. package/dist/chunk-GTILM2CI.js.map +1 -0
  107. package/dist/{chunk-EU3Q5AQ4.js → chunk-GXXFLBUQ.js} +23 -32
  108. package/dist/chunk-GXXFLBUQ.js.map +1 -0
  109. package/dist/{chunk-D5HOETOB.js → chunk-H7QUDDKH.js} +981 -126
  110. package/dist/chunk-H7QUDDKH.js.map +1 -0
  111. package/dist/{chunk-GIC3G5YG.js → chunk-HG34RNTK.js} +7 -13
  112. package/dist/chunk-HG34RNTK.js.map +1 -0
  113. package/dist/{chunk-LXY4BUA3.js → chunk-HYDRDNKN.js} +9 -5
  114. package/dist/chunk-HYDRDNKN.js.map +1 -0
  115. package/dist/{chunk-N6FBTXQ5.js → chunk-I6NLLJHZ.js} +2 -2
  116. package/dist/{chunk-N6FBTXQ5.js.map → chunk-I6NLLJHZ.js.map} +1 -1
  117. package/dist/{chunk-NWQB7UTY.js → chunk-IONAUNWB.js} +3 -3
  118. package/dist/{chunk-NWQB7UTY.js.map → chunk-IONAUNWB.js.map} +1 -1
  119. package/dist/{chunk-CT6NQSA4.js → chunk-ISHJITXJ.js} +3 -3
  120. package/dist/{chunk-CT6NQSA4.js.map → chunk-ISHJITXJ.js.map} +1 -1
  121. package/dist/chunk-IZCR27MU.js +60 -0
  122. package/dist/chunk-IZCR27MU.js.map +1 -0
  123. package/dist/{chunk-LCU5U5IW.js → chunk-JAKOMFC6.js} +67 -19
  124. package/dist/chunk-JAKOMFC6.js.map +1 -0
  125. package/dist/{chunk-VOOI7B2L.js → chunk-LEMHVDET.js} +86 -66
  126. package/dist/chunk-LEMHVDET.js.map +1 -0
  127. package/dist/{chunk-37FTLYFP.js → chunk-LNFKL23K.js} +3 -3
  128. package/dist/{chunk-37FTLYFP.js.map → chunk-LNFKL23K.js.map} +1 -1
  129. package/dist/{chunk-6UFFKMVC.js → chunk-LSXHED6I.js} +6 -6
  130. package/dist/{chunk-6UFFKMVC.js.map → chunk-LSXHED6I.js.map} +1 -1
  131. package/dist/{chunk-XUUYAS3Z.js → chunk-M3WPBTGJ.js} +3 -3
  132. package/dist/{chunk-XUUYAS3Z.js.map → chunk-M3WPBTGJ.js.map} +1 -1
  133. package/dist/{chunk-QZLWJETK.js → chunk-MGGFBZWA.js} +3 -3
  134. package/dist/{chunk-QZLWJETK.js.map → chunk-MGGFBZWA.js.map} +1 -1
  135. package/dist/{chunk-53MSCGR2.js → chunk-NPLPCRW5.js} +5 -5
  136. package/dist/{chunk-53MSCGR2.js.map → chunk-NPLPCRW5.js.map} +1 -1
  137. package/dist/{chunk-QCI6D7E4.js → chunk-NUELZWCF.js} +266 -170
  138. package/dist/chunk-NUELZWCF.js.map +1 -0
  139. package/dist/{chunk-BWZF2ZIF.js → chunk-OFBIWVCR.js} +3 -3
  140. package/dist/{chunk-BWZF2ZIF.js.map → chunk-OFBIWVCR.js.map} +1 -1
  141. package/dist/{chunk-IZLQ4GDO.js → chunk-P23M65LB.js} +43 -21
  142. package/dist/chunk-P23M65LB.js.map +1 -0
  143. package/dist/{chunk-G67BOI2J.js → chunk-PMECEZK3.js} +15 -9
  144. package/dist/chunk-PMECEZK3.js.map +1 -0
  145. package/dist/{chunk-GWXFSLBK.js → chunk-PTSGWKHR.js} +4 -4
  146. package/dist/{chunk-GWXFSLBK.js.map → chunk-PTSGWKHR.js.map} +1 -1
  147. package/dist/{chunk-OKGUDNDT.js → chunk-Q6E6FM7P.js} +35 -33
  148. package/dist/chunk-Q6E6FM7P.js.map +1 -0
  149. package/dist/{chunk-CWM3MYGX.js → chunk-QOP6KDFR.js} +8 -9
  150. package/dist/chunk-QOP6KDFR.js.map +1 -0
  151. package/dist/{chunk-O7VPNKYN.js → chunk-QVNRCDTV.js} +23 -7
  152. package/dist/chunk-QVNRCDTV.js.map +1 -0
  153. package/dist/{chunk-UX3K4RKE.js → chunk-S53LOR7B.js} +3 -3
  154. package/dist/{chunk-UX3K4RKE.js.map → chunk-S53LOR7B.js.map} +1 -1
  155. package/dist/{chunk-KNWCFEWU.js → chunk-SH5D7U7N.js} +20 -7
  156. package/dist/{chunk-KNWCFEWU.js.map → chunk-SH5D7U7N.js.map} +1 -1
  157. package/dist/{chunk-KM7XWC4Y.js → chunk-UAROCOXF.js} +3 -3
  158. package/dist/{chunk-KM7XWC4Y.js.map → chunk-UAROCOXF.js.map} +1 -1
  159. package/dist/{chunk-JMKB7IB4.js → chunk-UMVKJM4Q.js} +4 -4
  160. package/dist/chunk-UMVKJM4Q.js.map +1 -0
  161. package/dist/{chunk-HCYS7GFP.js → chunk-V2DXZYBB.js} +3 -3
  162. package/dist/{chunk-HCYS7GFP.js.map → chunk-V2DXZYBB.js.map} +1 -1
  163. package/dist/{chunk-IUUYRXT6.js → chunk-W5DWWE4Y.js} +4 -4
  164. package/dist/{chunk-IUUYRXT6.js.map → chunk-W5DWWE4Y.js.map} +1 -1
  165. package/dist/{chunk-FK6HPLQA.js → chunk-WTQ3TATB.js} +3 -3
  166. package/dist/{chunk-FK6HPLQA.js.map → chunk-WTQ3TATB.js.map} +1 -1
  167. package/dist/{chunk-7FJQT3GT.js → chunk-Y4N2NUZD.js} +4 -4
  168. package/dist/{chunk-7FJQT3GT.js.map → chunk-Y4N2NUZD.js.map} +1 -1
  169. package/dist/{chunk-6VRJH4MR.js → chunk-Y7QA2OLD.js} +6 -6
  170. package/dist/{chunk-6VRJH4MR.js.map → chunk-Y7QA2OLD.js.map} +1 -1
  171. package/dist/{chunk-74EEFB52.js → chunk-YSHVQGUS.js} +115 -27
  172. package/dist/chunk-YSHVQGUS.js.map +1 -0
  173. package/dist/{chunk-6C654TFI.js → chunk-ZAOGFXDO.js} +36 -8
  174. package/dist/chunk-ZAOGFXDO.js.map +1 -0
  175. package/dist/{chunk-MKLBK7HI.js → chunk-ZKSJMZKD.js} +17 -13
  176. package/dist/chunk-ZKSJMZKD.js.map +1 -0
  177. package/dist/cli/index.js +373 -188
  178. package/dist/cli/index.js.map +1 -1
  179. package/dist/cli/src/asset-feeds.d.ts +5 -2
  180. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  181. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  182. package/dist/cli/src/commands/catalog.d.ts +15 -2
  183. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  184. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  185. package/dist/cli/src/commands/library-index.d.ts +8 -0
  186. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  187. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  188. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  189. package/dist/cli/src/commands/outdated.d.ts +7 -2
  190. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  191. package/dist/cli/src/commands/project.d.ts +2 -0
  192. package/dist/cli/src/commands/project.d.ts.map +1 -1
  193. package/dist/cli/src/commands/publish-core.d.ts +10 -1
  194. package/dist/cli/src/commands/publish-core.d.ts.map +1 -1
  195. package/dist/cli/src/commands/session.d.ts.map +1 -1
  196. package/dist/cli/src/commands/source.d.ts +14 -0
  197. package/dist/cli/src/commands/source.d.ts.map +1 -1
  198. package/dist/cli/src/commands/tree.d.ts.map +1 -1
  199. package/dist/cli/src/commands/update.d.ts.map +1 -1
  200. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  201. package/dist/cli/src/flow-discovery.d.ts +8 -5
  202. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  203. package/dist/cli/src/open-library.d.ts +0 -11
  204. package/dist/cli/src/open-library.d.ts.map +1 -1
  205. package/dist/cli/src/skill-checks.d.ts +11 -2
  206. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  207. package/dist/connectors/config.js +5 -5
  208. package/dist/connectors/index.js +25 -26
  209. package/dist/connectors/src/access-policy.d.ts +33 -0
  210. package/dist/connectors/src/access-policy.d.ts.map +1 -0
  211. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  212. package/dist/connectors/src/index.d.ts +2 -0
  213. package/dist/connectors/src/index.d.ts.map +1 -1
  214. package/dist/connectors-O6Y6VESP.js +44 -0
  215. package/dist/{connectors-SSOTIDHT.js.map → connectors-O6Y6VESP.js.map} +1 -1
  216. package/dist/connectors-shared/index.js +2 -2
  217. package/dist/core/index.js +8 -8
  218. package/dist/core/logging.js +1 -1
  219. package/dist/core/manifest.js +2 -2
  220. package/dist/core/models.js +1 -1
  221. package/dist/core/publish-manifest.js +2 -2
  222. package/dist/core/ref.js +1 -1
  223. package/dist/core/runtime-assets.js +5 -5
  224. package/dist/core/src/index.d.ts +3 -3
  225. package/dist/core/src/index.d.ts.map +1 -1
  226. package/dist/core/src/logging/config.d.ts +9 -1
  227. package/dist/core/src/logging/config.d.ts.map +1 -1
  228. package/dist/core/src/manifest.d.ts +11 -1
  229. package/dist/core/src/manifest.d.ts.map +1 -1
  230. package/dist/core/src/models.d.ts +14 -6
  231. package/dist/core/src/models.d.ts.map +1 -1
  232. package/dist/core/src/repo-manager.d.ts +41 -6
  233. package/dist/core/src/repo-manager.d.ts.map +1 -1
  234. package/dist/core/src/store.d.ts +16 -2
  235. package/dist/core/src/store.d.ts.map +1 -1
  236. package/dist/core/src/workspace-config.d.ts +10 -1
  237. package/dist/core/src/workspace-config.d.ts.map +1 -1
  238. package/dist/core/store.js +1 -1
  239. package/dist/core/workspace-config.js +4 -4
  240. package/dist/deploy/index.js +8 -8
  241. package/dist/discovery/index.js +5 -5
  242. package/dist/{ensure-sources-277VI7R3.js → ensure-sources-SKLNM4UZ.js} +18 -18
  243. package/dist/{ensure-sources-277VI7R3.js.map → ensure-sources-SKLNM4UZ.js.map} +1 -1
  244. package/dist/factory-assets/connectors/box.js +25 -26
  245. package/dist/factory-assets/connectors/deploy.js +25 -26
  246. package/dist/factory-assets/connectors/devserver.js +25 -26
  247. package/dist/factory-assets/connectors/flow/adapter.d.ts +6 -0
  248. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  249. package/dist/factory-assets/connectors/flow/adapter.js +25 -26
  250. package/dist/factory-assets/connectors/flow/contract/expression.d.ts +3 -0
  251. package/dist/factory-assets/connectors/flow/contract/expression.d.ts.map +1 -1
  252. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts +1 -1
  253. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts.map +1 -1
  254. package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
  255. package/dist/factory-assets/connectors/flow/contract.js +4 -4
  256. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts +4 -3
  257. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts.map +1 -1
  258. package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts +6 -1
  259. package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts.map +1 -1
  260. package/dist/factory-assets/connectors/flow/engine.js +12 -12
  261. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
  262. package/dist/factory-assets/connectors/flow/prompt-fragments.js +3 -3
  263. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  264. package/dist/factory-assets/connectors/flow/run-flow.js +27 -28
  265. package/dist/factory-assets/connectors/flow.js +25 -26
  266. package/dist/factory-assets/connectors/git/config.d.ts.map +1 -1
  267. package/dist/factory-assets/connectors/git.js +25 -26
  268. package/dist/factory-assets/connectors/gmail.js +25 -26
  269. package/dist/factory-assets/connectors/googledrive.js +25 -26
  270. package/dist/factory-assets/connectors/local.js +25 -26
  271. package/dist/factory-assets/connectors/mattermost.js +25 -26
  272. package/dist/factory-assets/connectors/memory.js +25 -26
  273. package/dist/factory-assets/connectors/minio.js +25 -26
  274. package/dist/factory-assets/connectors/postgres.js +25 -26
  275. package/dist/factory-assets/connectors/s3.js +25 -26
  276. package/dist/factory-assets/connectors/sharepoint.js +25 -26
  277. package/dist/factory-assets/connectors/sqlite.js +25 -26
  278. package/dist/factory-assets/connectors/static-server.js +25 -26
  279. package/dist/factory-assets/connectors/tunnel.js +25 -26
  280. package/dist/factory-assets/connectors/webdav.js +25 -26
  281. package/dist/factory-assets/connectors/xstate-store.js +25 -26
  282. package/dist/factory-assets/connectors/xstate.js +25 -26
  283. package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +10 -7
  284. package/dist/{flows-J2UEU2QM.js → flows-CBYRSAGS.js} +13 -13
  285. package/dist/{flows-J2UEU2QM.js.map → flows-CBYRSAGS.js.map} +1 -1
  286. package/dist/{helpers-KC5O7CML.js → helpers-MWZDRBLD.js} +18 -18
  287. package/dist/{helpers-KC5O7CML.js.map → helpers-MWZDRBLD.js.map} +1 -1
  288. package/dist/library/index.js +12 -12
  289. package/dist/library/install.js +3 -3
  290. package/dist/library/src/index.d.ts +3 -1
  291. package/dist/library/src/index.d.ts.map +1 -1
  292. package/dist/library/src/local/scan-authoring-libraries.d.ts +43 -0
  293. package/dist/library/src/local/scan-authoring-libraries.d.ts.map +1 -0
  294. package/dist/library/src/manifest-writer.d.ts +26 -3
  295. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  296. package/dist/library/src/sync/git-driver.d.ts.map +1 -1
  297. package/dist/{library-publish-FGXF5TJO.js → library-publish-PICMDSB2.js} +73 -37
  298. package/dist/library-publish-PICMDSB2.js.map +1 -0
  299. package/dist/open-library-OG457THY.js +40 -0
  300. package/dist/{open-library-P3D337NH.js.map → open-library-OG457THY.js.map} +1 -1
  301. package/dist/open-registry-ZUZJ7MS7.js +32 -0
  302. package/dist/{open-registry-Z3P2X2AB.js.map → open-registry-ZUZJ7MS7.js.map} +1 -1
  303. package/dist/paths-FQ64OLJG.js +22 -0
  304. package/dist/{paths-JKEKXM52.js.map → paths-FQ64OLJG.js.map} +1 -1
  305. package/dist/{plugin-store-WI4MZJLP.js → plugin-store-MPAMD5OT.js} +10 -10
  306. package/dist/{plugin-store-WI4MZJLP.js.map → plugin-store-MPAMD5OT.js.map} +1 -1
  307. package/dist/project-2GFT5LEZ.js +41 -0
  308. package/dist/{project-WFUDVYNN.js.map → project-2GFT5LEZ.js.map} +1 -1
  309. package/dist/resolver/index.js +9 -9
  310. package/dist/runner/index.js +40 -41
  311. package/dist/runner/src/logging-bootstrap.d.ts +6 -0
  312. package/dist/runner/src/logging-bootstrap.d.ts.map +1 -1
  313. package/dist/runner/src/reconfigure-handler.d.ts +38 -17
  314. package/dist/runner/src/reconfigure-handler.d.ts.map +1 -1
  315. package/dist/runner/src/serve.d.ts.map +1 -1
  316. package/dist/runner/src/session-capability-wiring.d.ts +0 -2
  317. package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
  318. package/dist/sdk/asset-manager.js +15 -15
  319. package/dist/sdk/bridge.js +16 -17
  320. package/dist/sdk/core.js +8 -8
  321. package/dist/sdk/flow.js +12 -12
  322. package/dist/sdk/index.js +68 -45
  323. package/dist/sdk/index.js.map +1 -1
  324. package/dist/sdk/resolver.js +9 -9
  325. package/dist/sdk/runner.js +40 -41
  326. package/dist/sdk/session.js +2 -2
  327. package/dist/sdk/src/agent-session.d.ts +8 -0
  328. package/dist/sdk/src/agent-session.d.ts.map +1 -1
  329. package/dist/sdk/store.js +2 -1
  330. package/dist/sdk/types.js +1 -1
  331. package/dist/session/index.js +2 -2
  332. package/dist/{setup-RAMLTORM.js → setup-WHMCSIF2.js} +26 -27
  333. package/dist/setup-WHMCSIF2.js.map +1 -0
  334. package/dist/skills-TVO26Y4V.js +26 -0
  335. package/dist/{skills-EOHZ2DZ4.js.map → skills-TVO26Y4V.js.map} +1 -1
  336. package/dist/source-LKOFTOEK.js +41 -0
  337. package/dist/{source-FYVSFYEI.js.map → source-LKOFTOEK.js.map} +1 -1
  338. package/dist/{source-manifest-publish-4FPIPPLV.js → source-manifest-publish-L5J3QXER.js} +27 -27
  339. package/dist/{source-manifest-publish-4FPIPPLV.js.map → source-manifest-publish-L5J3QXER.js.map} +1 -1
  340. package/dist/store/index.js +2 -1
  341. package/dist/store/src/store.d.ts +8 -5
  342. package/dist/store/src/store.d.ts.map +1 -1
  343. package/dist/tui/index.js +40 -41
  344. package/dist/tui/index.js.map +1 -1
  345. package/dist/types/index.js +1 -1
  346. package/dist/types/manifests.js +1 -1
  347. package/dist/types/src/ask-slots.d.ts +68 -0
  348. package/dist/types/src/ask-slots.d.ts.map +1 -0
  349. package/dist/types/src/delivery.d.ts.map +1 -1
  350. package/dist/types/src/events.d.ts +29 -1
  351. package/dist/types/src/events.d.ts.map +1 -1
  352. package/dist/types/src/index.d.ts +1 -1
  353. package/dist/types/src/index.d.ts.map +1 -1
  354. package/dist/types/src/manifests/index.d.ts +1 -1
  355. package/dist/types/src/manifests/index.d.ts.map +1 -1
  356. package/dist/types/src/manifests/preset.d.ts +4 -0
  357. package/dist/types/src/manifests/preset.d.ts.map +1 -1
  358. package/dist/types/src/version.d.ts +12 -1
  359. package/dist/types/src/version.d.ts.map +1 -1
  360. package/dist/workspace-plugin/adapters/mcp.js +32 -33
  361. package/dist/workspace-plugin/adapters/omp.js +14 -14
  362. package/dist/workspace-plugin/index.js +2 -2
  363. package/package.json +1 -1
  364. package/dist/asset-feeds-K36CR52Q.js.map +0 -1
  365. package/dist/chunk-6C654TFI.js.map +0 -1
  366. package/dist/chunk-74EEFB52.js.map +0 -1
  367. package/dist/chunk-BTK7ECLH.js.map +0 -1
  368. package/dist/chunk-CWM3MYGX.js.map +0 -1
  369. package/dist/chunk-D5HOETOB.js.map +0 -1
  370. package/dist/chunk-DFFD4BFG.js.map +0 -1
  371. package/dist/chunk-DMLDYFDS.js.map +0 -1
  372. package/dist/chunk-EINLFFP6.js +0 -59
  373. package/dist/chunk-EINLFFP6.js.map +0 -1
  374. package/dist/chunk-EU3Q5AQ4.js.map +0 -1
  375. package/dist/chunk-FRHE7FFB.js.map +0 -1
  376. package/dist/chunk-G67BOI2J.js.map +0 -1
  377. package/dist/chunk-GIC3G5YG.js.map +0 -1
  378. package/dist/chunk-IZLQ4GDO.js.map +0 -1
  379. package/dist/chunk-JMKB7IB4.js.map +0 -1
  380. package/dist/chunk-LBQ4BBX4.js.map +0 -1
  381. package/dist/chunk-LCU5U5IW.js.map +0 -1
  382. package/dist/chunk-LXY4BUA3.js.map +0 -1
  383. package/dist/chunk-MKLBK7HI.js.map +0 -1
  384. package/dist/chunk-O7VPNKYN.js.map +0 -1
  385. package/dist/chunk-OKGUDNDT.js.map +0 -1
  386. package/dist/chunk-QCI6D7E4.js.map +0 -1
  387. package/dist/chunk-SZWRPEF7.js.map +0 -1
  388. package/dist/chunk-TTPSDC2G.js.map +0 -1
  389. package/dist/chunk-VOOI7B2L.js.map +0 -1
  390. package/dist/chunk-XBSQ4KMC.js.map +0 -1
  391. package/dist/connectors-SSOTIDHT.js +0 -45
  392. package/dist/library-publish-FGXF5TJO.js.map +0 -1
  393. package/dist/open-library-P3D337NH.js +0 -40
  394. package/dist/open-registry-Z3P2X2AB.js +0 -32
  395. package/dist/paths-JKEKXM52.js +0 -22
  396. package/dist/project-WFUDVYNN.js +0 -41
  397. package/dist/setup-RAMLTORM.js.map +0 -1
  398. package/dist/skills-EOHZ2DZ4.js +0 -26
  399. package/dist/source-FYVSFYEI.js +0 -41
package/dist/cli/index.js CHANGED
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-53MSCGR2.js';
3
- import { makeSourceCommand, syncProjectSources } from '../chunk-IZLQ4GDO.js';
4
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, REF_HINT, reportInstalledSoftDeps } from '../chunk-EU3Q5AQ4.js';
2
+ import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-NPLPCRW5.js';
3
+ import { makeSourceCommand, syncProjectSources } from '../chunk-P23M65LB.js';
4
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportRelocked, REF_HINT, reportInstalledSoftDeps } from '../chunk-GXXFLBUQ.js';
5
5
  import { createSpinner } from '../chunk-NESV47MF.js';
6
- import { AI_RESOURCES } from '../chunk-7FJQT3GT.js';
7
- import { findAssetManifestFile, declaredVersion, checkAssetManifest } from '../chunk-6C654TFI.js';
8
- import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, assetEntryRef, refFor } from '../chunk-LXY4BUA3.js';
9
- import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-GIC3G5YG.js';
10
- import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, deferredWarnings, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-THEJJBOU.js';
11
- import { getKindRegistry, getKnownKinds } from '../chunk-WIEC3ZE4.js';
6
+ import { AI_RESOURCES } from '../chunk-Y4N2NUZD.js';
7
+ import { findAssetManifestFile, declaredVersion, readAssetBody, checkAssetManifest } from '../chunk-ZAOGFXDO.js';
8
+ import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, assetEntryRef, manifestVersionMismatchMessage, refFor } from '../chunk-HYDRDNKN.js';
9
+ import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-HG34RNTK.js';
10
+ import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, deferredWarnings, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-F2EKONM7.js';
11
+ import { getKindRegistry, getKnownKinds } from '../chunk-2FRUUDZY.js';
12
12
  import { LocalSecretsProvider } from '../chunk-ILFGVSTJ.js';
13
- import { runAgentChat, isCompositionError, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition, instanceForSession, resolveAgentInstance, describeComposition, MarkdownStreamer } from '../chunk-VOOI7B2L.js';
14
- import { buildClaudePluginFiles } from '../chunk-N6FBTXQ5.js';
15
- import '../chunk-6UFFKMVC.js';
16
- import '../chunk-KM7XWC4Y.js';
13
+ import { runAgentChat, isCompositionError, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition, instanceForSession, resolveAgentInstance, describeComposition, MarkdownStreamer } from '../chunk-LEMHVDET.js';
14
+ import { buildClaudePluginFiles } from '../chunk-I6NLLJHZ.js';
15
+ import '../chunk-LSXHED6I.js';
16
+ import '../chunk-UAROCOXF.js';
17
17
  import '../chunk-R6O6YWU7.js';
18
- import '../chunk-IUUYRXT6.js';
19
- import '../chunk-RNPHRRLG.js';
18
+ import '../chunk-W5DWWE4Y.js';
19
+ import '../chunk-4PTSR4UU.js';
20
20
  import '../chunk-4ZTPYIBE.js';
21
- import '../chunk-NWQB7UTY.js';
21
+ import '../chunk-IONAUNWB.js';
22
22
  import '../chunk-X5YPJV4N.js';
23
23
  import '../chunk-O7SG5PC2.js';
24
24
  import '../chunk-7QBNJTTQ.js';
@@ -26,60 +26,59 @@ import '../chunk-OBYKJB4U.js';
26
26
  import '../chunk-5LKOAX7I.js';
27
27
  import '../chunk-32NA4TVC.js';
28
28
  import '../chunk-W3UDISS2.js';
29
- import '../chunk-HCYS7GFP.js';
30
- import { runFlow, resumeFlow } from '../chunk-MKLBK7HI.js';
29
+ import '../chunk-V2DXZYBB.js';
30
+ import { runFlow, resumeFlow } from '../chunk-ZKSJMZKD.js';
31
31
  import '../chunk-4R6DROGN.js';
32
- import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-EB4XN3KE.js';
33
- import '../chunk-O4Z7MAW7.js';
34
- import '../chunk-CT6NQSA4.js';
35
- import '../chunk-SZWRPEF7.js';
36
- import '../chunk-FK6HPLQA.js';
37
- import '../chunk-PSA6ONFB.js';
38
- import '../chunk-34C42MJX.js';
39
- import '../chunk-UX3K4RKE.js';
40
- import '../chunk-EINLFFP6.js';
32
+ import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-CGT45WN7.js';
33
+ import '../chunk-2LWYNQK7.js';
34
+ import '../chunk-ISHJITXJ.js';
35
+ import '../chunk-FTJJO3EM.js';
36
+ import '../chunk-WTQ3TATB.js';
37
+ import '../chunk-FVJK4QWM.js';
38
+ import '../chunk-6GRX5L6A.js';
39
+ import '../chunk-S53LOR7B.js';
41
40
  import '../chunk-LOO5CB5M.js';
42
- import '../chunk-NARITJS2.js';
43
- import '../chunk-GWXFSLBK.js';
44
- import '../chunk-XBSQ4KMC.js';
41
+ import '../chunk-GCICGXDD.js';
42
+ import '../chunk-PTSGWKHR.js';
43
+ import '../chunk-B4X2N7JQ.js';
45
44
  import '../chunk-YROR332M.js';
46
- import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-BTK7ECLH.js';
45
+ import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-AWQYXZVG.js';
47
46
  import '../chunk-6E6PKKAD.js';
48
47
  import '../chunk-IFGTRL2I.js';
49
- import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-LBQ4BBX4.js';
50
- import '../chunk-37FTLYFP.js';
51
- import '../chunk-QZLWJETK.js';
52
- import '../chunk-XUUYAS3Z.js';
53
- import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-NFGRW3L7.js';
54
- import '../chunk-QCI6D7E4.js';
55
- import '../chunk-DMLDYFDS.js';
56
- import { AssetManager, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-D5HOETOB.js';
57
- import { cloneOrInitGitRepo, trackOriginBranch, ensureGitRepo, setManifestPublisher, LIBRARY_OWNERSHIPS, syncManifestWithDisk, isGitRepo, assertManifestEditable, installLibraryAsset, missingRootAssets, assertValidLibraryName, stampManifestPublisher, upsertManifestAsset, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-DFFD4BFG.js';
58
- import { parseManifestFile, requiresSyntaxErrors, SEMVER_RE } from '../chunk-6VRJH4MR.js';
59
- import '../chunk-FAP63KV7.js';
48
+ import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-FZNG4V4J.js';
49
+ import '../chunk-LNFKL23K.js';
50
+ import '../chunk-MGGFBZWA.js';
51
+ import '../chunk-M3WPBTGJ.js';
52
+ import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-7RGTAEG6.js';
53
+ import '../chunk-NUELZWCF.js';
54
+ import '../chunk-F3RDEH5U.js';
55
+ import { AssetManager, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-H7QUDDKH.js';
56
+ import { cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, ensureGitRepo, conflictingAssetRoot, setManifestPublisher, LIBRARY_OWNERSHIPS, isGitRepo, assertManifestEditable, installLibraryAsset, missingRootAssets, assertValidLibraryName, upsertManifestAsset, syncManifestWithDisk, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-4MQS7CAF.js';
57
+ import { parseManifestFile, requiresSyntaxErrors, SEMVER_RE } from '../chunk-Y7QA2OLD.js';
58
+ import '../chunk-CKQEIY43.js';
60
59
  import '../chunk-R7FOF242.js';
61
60
  import '../chunk-3TXEJN4W.js';
62
- import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-74EEFB52.js';
61
+ import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-YSHVQGUS.js';
63
62
  import '../chunk-CGYEHQOX.js';
64
63
  import '../chunk-KTBKW2FI.js';
65
64
  import '../chunk-UQ6LFBPZ.js';
66
- import '../chunk-AVCUPPG6.js';
67
- import { effectiveComposes, validatePreset, composeSlotDiagnostics, agentDeprecationDiagnostics, validateAgent, SLOT_ID_PATTERN } from '../chunk-FRHE7FFB.js';
68
- import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, readLock, aiResourceRoots, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-OOLT6HGP.js';
65
+ import '../chunk-EF7NPDDU.js';
66
+ import { effectiveComposes, validatePreset, composeSlotDiagnostics, agentDeprecationDiagnostics, validateAgent, SLOT_ID_PATTERN } from '../chunk-B6GIW55K.js';
67
+ import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, readLock, aiResourceRoots, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-36AFURKZ.js';
69
68
  import '../chunk-4GY63JU6.js';
70
- import { factoryAssetRoots } from '../chunk-SWO25LTO.js';
71
- import '../chunk-G67BOI2J.js';
69
+ import { factoryAssetRoots } from '../chunk-GB7WDMH2.js';
70
+ import '../chunk-PMECEZK3.js';
72
71
  import { DEFAULT_DRIVER_ID, DRIVER_DEFAULTS } from '../chunk-5BEFNLOR.js';
73
72
  import { findKindDirs } from '../chunk-A2ULN3KX.js';
74
- import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, resolveSkWorkspaceConfig, matchPin, coerceVersion, loadSkWorkspaceConfig, normalizeAgentInstances, agentInstanceDiagnostics, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-LCU5U5IW.js';
73
+ import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, resolveSkWorkspaceConfig, matchPin, coerceVersion, loadSkWorkspaceConfig, normalizeAgentInstances, agentInstanceDiagnostics, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-JAKOMFC6.js';
75
74
  import { globalCacheRoot, globalSkaileDir, userConfigPath } from '../chunk-L5VSIPQD.js';
76
75
  import { SUPPORTED_DRIVER_TARGETS, driverTargetForDriver } from '../chunk-CPSIPIX7.js';
77
- import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, encodeSkaileManifest } from '../chunk-RVIZQ5XD.js';
76
+ import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, encodeSkaileManifest } from '../chunk-BTE2V4IW.js';
78
77
  import { pluginTitle } from '../chunk-RVRB27AN.js';
79
- import { parseFrontmatter, scanDirectory } from '../chunk-TTPSDC2G.js';
80
- import { parseAssetRef, isValidPublisher, PUBLISHER_HINT, isValidAssetName, ASSET_NAME_HINT, slugifyAssetName, parseAssetRefLoose, assetRefToStr } from '../chunk-O7VPNKYN.js';
78
+ import { parseFrontmatter, scanDirectory } from '../chunk-GTILM2CI.js';
79
+ import { parseAssetRef, isValidPublisher, PUBLISHER_HINT, isValidAssetName, ASSET_NAME_HINT, slugifyAssetName, parseAssetRefLoose, assetRefToStr } from '../chunk-QVNRCDTV.js';
81
80
  import { portableSpawn, portableSpawnSync } from '../chunk-ICSCSM5D.js';
82
- import { openSqlite } from '../chunk-JMKB7IB4.js';
81
+ import { openSqlite } from '../chunk-UMVKJM4Q.js';
83
82
  import { parseModelRef, resolveEntryBaseUrl } from '../chunk-MJHSLODD.js';
84
83
  import '../chunk-C3CAXQMA.js';
85
84
  import '../chunk-BOFL7GIF.js';
@@ -185,7 +184,7 @@ async function runSearch(kind, query, opts) {
185
184
  }
186
185
  }
187
186
  async function searchIndex(query, kind) {
188
- const { openLibrary: openLibrary2 } = await import('../open-library-P3D337NH.js');
187
+ const { openLibrary: openLibrary2 } = await import('../open-library-OG457THY.js');
189
188
  const library = await openLibrary2();
190
189
  try {
191
190
  const defs = await library.listAssetDefs(kind ? { kind } : {});
@@ -238,12 +237,44 @@ function unionEntries(indexed, factory) {
238
237
  const seen = new Set(indexed.map(entryDedupKey));
239
238
  return [...indexed, ...factory.filter((e) => !seen.has(entryDedupKey(e)))];
240
239
  }
240
+ async function expandLibraryCopies(entries, projectDir) {
241
+ if (entries.length === 0) return entries;
242
+ let holders;
243
+ try {
244
+ holders = await new AssetManager({ registry: getKindRegistry(), projectDir }).libraryHolders();
245
+ } catch {
246
+ return entries;
247
+ }
248
+ if (holders.size === 0) return entries;
249
+ const out = [];
250
+ const expanded = /* @__PURE__ */ new Set();
251
+ for (const e of entries) {
252
+ const key = e.publisher ? `${e.kind}:@${e.publisher}/${e.name}` : void 0;
253
+ const group = key ? holders.get(key) : void 0;
254
+ if (!key || !group) {
255
+ out.push(e);
256
+ continue;
257
+ }
258
+ if (expanded.has(key)) continue;
259
+ expanded.add(key);
260
+ for (const h of group) {
261
+ out.push({
262
+ ...e,
263
+ version: h.version,
264
+ description: h.description || e.description,
265
+ library: h.library,
266
+ usedByAdd: h.picked
267
+ });
268
+ }
269
+ }
270
+ return out;
271
+ }
241
272
  async function searchLocal(query, kind, opts, showStore, airGapped) {
242
273
  const projectDir = path23__default.resolve(opts.projectDir);
243
274
  const factory = await searchFactory(projectDir, query, kind);
244
275
  let entries = unionEntries(await searchIndex(query, kind), factory);
245
276
  if (entries.length === 0 && !query && !kind && !airGapped) {
246
- const { autoSyncForSearch } = await import('../source-FYVSFYEI.js');
277
+ const { autoSyncForSearch } = await import('../source-LKOFTOEK.js');
247
278
  if (await autoSyncForSearch(projectDir)) {
248
279
  entries = unionEntries(await searchIndex(query, kind), factory);
249
280
  }
@@ -260,7 +291,7 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
260
291
  console.log(`
261
292
  ${S.heading("Local:")}`);
262
293
  }
263
- printLocalEntries(entries);
294
+ printLocalEntries(await expandLibraryCopies(entries, projectDir));
264
295
  }
265
296
  var MIN_LOCAL_DESCRIPTION_WIDTH = 10;
266
297
  function layoutLocalTable(rows, width, style = {}) {
@@ -324,7 +355,7 @@ function printLocalEntries(entries, width = terminalWidth()) {
324
355
  ref: localEntryRef(e),
325
356
  description: e.description,
326
357
  version: e.version ? `v${e.version}` : "",
327
- library: e.library
358
+ library: e.usedByAdd ? `${e.library} (used by add)` : e.library
328
359
  })),
329
360
  width,
330
361
  { ref: S.cmd, version: S.dim, library: S.dim }
@@ -361,7 +392,7 @@ async function searchStore(query, kind, opts, airGapped) {
361
392
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
362
393
  return;
363
394
  }
364
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-P3D337NH.js');
395
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-OG457THY.js');
365
396
  try {
366
397
  const remote = await openCatalogSource2({ projectDir: path23__default.resolve(opts.projectDir) });
367
398
  const assets = await remote.listAssets(kind ? { kind } : {});
@@ -435,6 +466,12 @@ async function promptSoftDepAdds(am2, ref, io) {
435
466
  if (yes === true) await addEdge(edge.toRef);
436
467
  }
437
468
  }
469
+ function presetAddNote(ref, presets) {
470
+ const own = presets.find((p6) => p6.ref.split("#")[0] === ref.split("#")[0]);
471
+ if (!own) return void 0;
472
+ const origin = own.library ? `library ${own.library}` : "a source or store";
473
+ return `Recorded in skaile.yaml (preset from ${origin}). ${own.assets} assets, ${own.skipped} instance items skipped (apply with skaile preset apply).`;
474
+ }
438
475
  async function reportPresetMembership(am2, ref, onHint) {
439
476
  for (const preset of await am2.presetsContaining(ref)) {
440
477
  onHint(
@@ -491,9 +528,13 @@ function makeAddCommand() {
491
528
  spinner.start(`Adding ${ref}`);
492
529
  try {
493
530
  const libraryOf = /* @__PURE__ */ new Map();
531
+ let presets = [];
494
532
  const added = await am2.add(ref, {
495
533
  link: opts.link,
496
- onLibraryOrigin: (deployedRef, library) => libraryOf.set(deployedRef, library)
534
+ onLibraryOrigin: (deployedRef, library) => libraryOf.set(deployedRef, library),
535
+ onPresets: (expanded) => {
536
+ presets = expanded;
537
+ }
497
538
  });
498
539
  spinner.stop("Done");
499
540
  warnings.flush();
@@ -510,7 +551,9 @@ function makeAddCommand() {
510
551
  });
511
552
  if (added.length === 0) {
512
553
  const kind = parseAssetRef(ref).kind;
513
- if (!installTargetOf(getKindRegistry(), kind))
554
+ const presetNote = presetAddNote(ref, presets);
555
+ if (presetNote) logInfo(presetNote);
556
+ else if (!installTargetOf(getKindRegistry(), kind))
514
557
  logInfo(
515
558
  `Recorded in skaile.yaml (store bytes are fetched + verified into .skaile/cache/store). ${kind} assets are not deployed into the driver target \u2014 they are composed when skaile runs the agent.`
516
559
  );
@@ -531,7 +574,7 @@ function makeAddCommand() {
531
574
  });
532
575
  }
533
576
  function makeRemoveCommand() {
534
- return new Command("remove").description("Remove from skaile.yaml + undeploy").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Remove from ~/.skaile/skaile.yaml + undeploy from every global harness").option(
577
+ return new Command("remove").description("Remove from skaile.yaml + undeploy").argument("<ref>", "Asset reference (kind:@publisher/name, or kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Remove from ~/.skaile/skaile.yaml + undeploy from every global harness").option(
535
578
  "--harness <ids>",
536
579
  "Comma-separated global harnesses to undeploy from (default: all resolved); implies --global"
537
580
  ).option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).option("--no-soft-deps", "skip the orphaned-soft-dep prompt (don't remove, don't report)").action(async (ref, opts) => {
@@ -543,13 +586,23 @@ function makeRemoveCommand() {
543
586
  harnesses,
544
587
  driverTarget: opts.target
545
588
  });
546
- const ok = am2.remove(ref);
547
- if (!ok) {
589
+ let result;
590
+ try {
591
+ result = await am2.removeWithDependencies(ref);
592
+ } catch (err2) {
593
+ logErr(err2 instanceof Error ? err2.message : String(err2));
594
+ process.exitCode = 1;
595
+ return;
596
+ }
597
+ if (!result.changed) {
548
598
  logErr(`Not deployed or declared: ${ref}`);
549
599
  process.exitCode = 1;
550
600
  return;
551
601
  }
552
602
  logOk(`Removed ${ref}`);
603
+ for (const dep of result.pruned) {
604
+ logOk(`Removed ${dep} (no longer required by anything declared in skaile.yaml)`);
605
+ }
553
606
  await promptSoftDepRemovals(am2, ref, {
554
607
  isTTY: !!process.stdin.isTTY,
555
608
  noSoftDeps: opts.softDeps === false,
@@ -703,7 +756,7 @@ async function resolveInfoEntry(am2, ref, opts) {
703
756
  return { entry: match ?? deployed };
704
757
  }
705
758
  const lookup = opts.storeLookup ?? (async (filter) => {
706
- const { resolveCatalogSource } = await import('../open-library-P3D337NH.js');
759
+ const { resolveCatalogSource } = await import('../open-library-OG457THY.js');
707
760
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
708
761
  try {
709
762
  return await source.listAssets(filter);
@@ -719,7 +772,7 @@ async function resolveInfoEntry(am2, ref, opts) {
719
772
  );
720
773
  return { entry: hit ? catalogAssetToEntry(hit) : null };
721
774
  } catch (err2) {
722
- const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-P3D337NH.js');
775
+ const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-OG457THY.js');
723
776
  const storeNote = err2 instanceof Error ? err2.message : String(err2);
724
777
  const disabled = err2 instanceof LocalCatalogDisabledError2 || /catalog\.url/i.test(storeNote);
725
778
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -754,8 +807,10 @@ function makeInfoCommand() {
754
807
  console.log(` source: ${S.dim(entry.source)}`);
755
808
  if (entry.requires.length) {
756
809
  console.log(` requires:`);
757
- for (const d of entry.requires)
758
- console.log(` ${S.dim("\xB7")} ${kindColor(d.kind)}:${d.name}`);
810
+ for (const d of entry.requires) {
811
+ const scope = d.publisher ? `@${d.publisher}/` : "";
812
+ console.log(` ${S.dim("\xB7")} ${kindColor(d.kind)}:${scope}${d.name}`);
813
+ }
759
814
  }
760
815
  if (entry.dependencies.length) {
761
816
  console.log(` dependencies:`);
@@ -795,7 +850,7 @@ function makeDoctorCommand() {
795
850
  const missing = issues.filter((i) => !i.unresolved);
796
851
  for (const i of unresolved) {
797
852
  logErr(
798
- `${i.assetKind}:${i.assetName}: locked, but no source or library provides it \u2014 run skaile install`
853
+ `${i.assetKind}:${i.assetName}: locked, but no source or library provides it \u2014 ${i.fix ?? "run skaile install"}`
799
854
  );
800
855
  }
801
856
  if (missing.length === 0) return;
@@ -923,8 +978,8 @@ function rejectRemovedDomainOption(opts) {
923
978
  logErr(DOMAIN_REMOVED_HINT);
924
979
  process.exit(1);
925
980
  }
926
- function countDomainFiles(root) {
927
- let count = 0;
981
+ function findFiles(root, match) {
982
+ const found = [];
928
983
  const walk = (dir) => {
929
984
  let entries;
930
985
  try {
@@ -937,13 +992,16 @@ function countDomainFiles(root) {
937
992
  if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
938
993
  walk(path23.join(dir, entry.name));
939
994
  }
940
- } else if (entry.name === "DOMAIN.md") {
941
- count++;
995
+ } else if (match(entry.name)) {
996
+ found.push(path23.join(dir, entry.name));
942
997
  }
943
998
  }
944
999
  };
945
1000
  walk(root);
946
- return count;
1001
+ return found;
1002
+ }
1003
+ function countDomainFiles(root) {
1004
+ return findFiles(root, (name) => name === "DOMAIN.md").length;
947
1005
  }
948
1006
  function warnIgnoredDomainFiles(root) {
949
1007
  const count = countDomainFiles(root);
@@ -954,6 +1012,17 @@ function warnIgnoredDomainFiles(root) {
954
1012
  }
955
1013
  return count;
956
1014
  }
1015
+ function warnLegacyBundleFiles(root) {
1016
+ const files = findFiles(root, (name) => name.endsWith(".bundle.yaml"));
1017
+ if (files.length > 0) {
1018
+ const shown = files.slice(0, 5).map((f) => path23.relative(root, f) || f);
1019
+ const more = files.length > shown.length ? `, +${files.length - shown.length} more` : "";
1020
+ logWarn(
1021
+ `${files.length} *.bundle.yaml file(s) are not scanned (the bundle kind became preset): ${shown.join(", ")}${more}. Run \`skaile migrate assets ${root} --write\` to rename them to *.preset.yaml. See ${LIBRARY_UPGRADE_DOCS}`
1022
+ );
1023
+ }
1024
+ return files.length;
1025
+ }
957
1026
  var DEFAULT_IMPORT_VERSION = "0.1.0";
958
1027
  var DEFAULT_IMPORT_STAGE = "alpha";
959
1028
  function claudeSkillRoots() {
@@ -1070,6 +1139,13 @@ function makeAssetCommand() {
1070
1139
  ).option("--commit", "Auto-commit in git-backed libraries", false).action(
1071
1140
  async (nameOrPath, opts) => {
1072
1141
  rejectRemovedDomainOption(opts);
1142
+ if (opts.publisher !== void 0) {
1143
+ const bare = opts.publisher.trim().replace(/^@/, "");
1144
+ if (!isValidPublisher(bare)) {
1145
+ logErr(`Invalid publisher "${opts.publisher}": ${PUBLISHER_HINT}.`);
1146
+ process.exit(1);
1147
+ }
1148
+ }
1073
1149
  const src = resolveImportSource(nameOrPath);
1074
1150
  if (!src) {
1075
1151
  logErr(
@@ -1115,6 +1191,13 @@ function makeAssetCommand() {
1115
1191
  logErr(`Destination already exists: ${destDir}`);
1116
1192
  process.exit(1);
1117
1193
  }
1194
+ const taken = conflictingAssetRoot(target.path, "skill", norm.name, norm.name);
1195
+ if (taken) {
1196
+ logErr(
1197
+ `skill:${norm.name} already exists at "${taken}" \u2014 importing it again would re-point the manifest entry. Rename the skill first.`
1198
+ );
1199
+ process.exit(1);
1200
+ }
1118
1201
  fs9.cpSync(src.dir, destDir, { recursive: true });
1119
1202
  fs9.writeFileSync(path23.join(destDir, "SKILL.md"), norm.content, "utf8");
1120
1203
  for (const note of norm.notes) logInfo(` \u2022 ${note}`);
@@ -1182,10 +1265,10 @@ function makeAssetCommand() {
1182
1265
  );
1183
1266
  process.exit(1);
1184
1267
  }
1185
- const basename2 = path23.basename(srcPath);
1268
+ const basename3 = path23.basename(srcPath);
1186
1269
  const destDir = target.path;
1187
1270
  fs9.mkdirSync(destDir, { recursive: true });
1188
- const destPath = path23.join(destDir, basename2);
1271
+ const destPath = path23.join(destDir, basename3);
1189
1272
  if (fs9.existsSync(destPath)) {
1190
1273
  logErr(`Destination already exists: ${destPath}`);
1191
1274
  process.exit(1);
@@ -1204,7 +1287,7 @@ function makeAssetCommand() {
1204
1287
  if (target.backend === "git" && opts.commit) {
1205
1288
  const { spawnSync: spawnSync2 } = await import('child_process');
1206
1289
  spawnSync2("git", ["add", "--", destPath], { cwd: target.path, stdio: "inherit" });
1207
- const r = spawnSync2("git", ["commit", "-m", `skaile: migrate ${basename2}`], {
1290
+ const r = spawnSync2("git", ["commit", "-m", `skaile: migrate ${basename3}`], {
1208
1291
  cwd: target.path,
1209
1292
  stdio: "inherit"
1210
1293
  });
@@ -1212,7 +1295,7 @@ function makeAssetCommand() {
1212
1295
  logWarn("Nothing committed (working tree clean or commit aborted).");
1213
1296
  }
1214
1297
  }
1215
- logOk(`Migrated ${basename2} \u2192 ${target.name} (${opts.mode})`);
1298
+ logOk(`Migrated ${basename3} \u2192 ${target.name} (${opts.mode})`);
1216
1299
  if (opts.mode === "move") {
1217
1300
  logInfo("Source moved into the library \u2014 future edits modify the library copy.");
1218
1301
  } else if (opts.mode === "copy") {
@@ -1453,7 +1536,7 @@ function makeCatalogCommand() {
1453
1536
  return catalog;
1454
1537
  }
1455
1538
  async function runLocalCatalogTest(projectDir) {
1456
- const { resolveCatalogSource } = await import('../open-library-P3D337NH.js');
1539
+ const { resolveCatalogSource } = await import('../open-library-OG457THY.js');
1457
1540
  let resolved;
1458
1541
  try {
1459
1542
  resolved = await resolveCatalogSource({ projectDir });
@@ -1593,29 +1676,20 @@ function libraryFlowEntries() {
1593
1676
  async function scanLibraryFlowEntries() {
1594
1677
  const entries = [];
1595
1678
  try {
1596
- const { LocalCatalogSource, LocalIndex, resolveIndexPath } = await import('../library/index.js');
1679
+ const { LocalIndex, resolveIndexPath, scanAuthoringLibraries } = await import('../library/index.js');
1597
1680
  const indexPath = resolveIndexPath();
1598
1681
  if (!existsSync(indexPath)) return entries;
1599
- const [{ authoringLibraries }, { getKindRegistry: getKindRegistry2 }] = await Promise.all([
1600
- import('../open-library-P3D337NH.js'),
1601
- import('../open-registry-Z3P2X2AB.js')
1602
- ]);
1682
+ const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-ZUZJ7MS7.js');
1603
1683
  const index = new LocalIndex({ indexPath });
1604
1684
  try {
1605
- const registry = getKindRegistry2();
1606
- for (const lib of authoringLibraries(await index.listSources())) {
1607
- if (!existsSync(lib.path)) continue;
1608
- try {
1609
- const { assets } = new LocalCatalogSource(index, lib.id, lib.path, registry).scan();
1610
- for (const asset of assets) {
1611
- if (asset.kind !== "flow") continue;
1612
- try {
1613
- const flow = loadFlow(asset.manifestPath);
1614
- if (flow.id) entries.push({ flow, path: asset.manifestPath });
1615
- } catch {
1616
- }
1685
+ for (const { assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
1686
+ for (const asset of assets) {
1687
+ if (asset.kind !== "flow") continue;
1688
+ try {
1689
+ const flow = loadFlow(asset.manifestPath);
1690
+ if (flow.id) entries.push({ flow, path: asset.manifestPath });
1691
+ } catch {
1617
1692
  }
1618
- } catch {
1619
1693
  }
1620
1694
  }
1621
1695
  } finally {
@@ -2558,7 +2632,7 @@ async function ensureTargetsRegistered(projectDir) {
2558
2632
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2559
2633
  const config = resolveSkWorkspaceConfig2(projectDir);
2560
2634
  if (config.plugins && config.plugins.length > 0) {
2561
- const { ensurePluginsLoaded } = await import('../plugin-store-WI4MZJLP.js');
2635
+ const { ensurePluginsLoaded } = await import('../plugin-store-MPAMD5OT.js');
2562
2636
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
2563
2637
  for (const f of result.failed) logWarn(f.error);
2564
2638
  }
@@ -3394,7 +3468,6 @@ function exitOnSyncError(err2) {
3394
3468
  }
3395
3469
  var UNFINISHED_GIT_ENTRIES = {
3396
3470
  MERGE_HEAD: "a merge in progress",
3397
- REBASE_HEAD: "a rebase in progress",
3398
3471
  "rebase-merge": "a rebase in progress",
3399
3472
  "rebase-apply": "a rebase in progress",
3400
3473
  CHERRY_PICK_HEAD: "a cherry-pick in progress",
@@ -3411,6 +3484,80 @@ function unfinishedGitState(dir) {
3411
3484
  }
3412
3485
  return null;
3413
3486
  }
3487
+ async function reindexLibrary(lib, library, name) {
3488
+ assertManifestEditableOrExit(lib.path);
3489
+ const badRequires = manifestRequiresProblems(lib.path);
3490
+ const resolved = resolveLibraryPublisherDetailed(lib, {}, getStoreIdentity());
3491
+ warnLibraryNameFallback(name, resolved);
3492
+ const { removed, unknownKind, skipped } = await syncManifestWithDisk(
3493
+ lib.path,
3494
+ resolved.publisher,
3495
+ getKindRegistry()
3496
+ );
3497
+ const manifest = loadSkPublishManifest(lib.path);
3498
+ for (const a of unknownKind) {
3499
+ logWarn(
3500
+ `Removed manifest entry ${a.kind}:${a.name}: the kind "${a.kind}" is not registered (removed or renamed in a newer release).`
3501
+ );
3502
+ }
3503
+ for (const a of removed) {
3504
+ const ref = manifest ? assetEntryRef(a, manifest) : `${a.kind}:${a.name}`;
3505
+ logInfo(`Removed manifest entry ${ref} (root ${a.root} is gone)`);
3506
+ }
3507
+ for (const s of skipped.filter((x) => x.reason === "invalid-version")) {
3508
+ logWarn(
3509
+ `${s.kind}:${s.name} skipped: ${s.detail}. Set a valid \`metadata.version\` (e.g. 0.1.0) and re-run \`skaile library index ${name}\`.`
3510
+ );
3511
+ }
3512
+ const duplicates = skipped.filter((x) => x.reason === "duplicate");
3513
+ for (const s of duplicates) {
3514
+ logErr(
3515
+ `${s.kind}:${s.name} found in ${path23.dirname(s.file)} but ${s.detail}. Rename or delete one of the two directories, then re-run \`skaile library index ${name}\`.`
3516
+ );
3517
+ }
3518
+ const duplicateFiles = new Set(duplicates.map((s) => path23.resolve(lib.path, s.file)));
3519
+ const skippedKeys = new Set(
3520
+ skipped.filter((s) => s.reason !== "duplicate").map((s) => `${s.kind}:${s.name}`)
3521
+ );
3522
+ const res = await indexLibrary(lib, library, {
3523
+ exclude: (a) => skippedKeys.has(`${a.kind}:${a.name}`) || duplicateFiles.has(path23.resolve(a.manifestPath))
3524
+ });
3525
+ const unparsable = res.errors.filter((e) => e.includes("ManifestSchemaError:"));
3526
+ for (const e of res.errors) (unparsable.includes(e) ? logErr : logWarn)(e);
3527
+ const syncUnparsable = skipped.filter(
3528
+ (s) => s.reason === "unparsable" && !unparsable.some((e) => e.includes(s.file))
3529
+ );
3530
+ for (const s of syncUnparsable) {
3531
+ logErr(`${s.kind}:${s.name} skipped: manifest file ${s.file} could not be parsed.`);
3532
+ }
3533
+ for (const p6 of badRequires) logErr(`${p6.asset}: ${p6.message}`);
3534
+ logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
3535
+ warnIgnoredDomainFiles(lib.path);
3536
+ warnLegacyBundleFiles(lib.path);
3537
+ const skippedUnparsable = unparsable.length + syncUnparsable.length;
3538
+ if (skippedUnparsable > 0) {
3539
+ logErr(`${skippedUnparsable} asset(s) skipped: manifest could not be parsed.`);
3540
+ process.exitCode = 1;
3541
+ }
3542
+ if (badRequires.length > 0) {
3543
+ logErr(
3544
+ `${badRequires.length} invalid requires entr${badRequires.length === 1 ? "y" : "ies"} ignored: use the \`kind:@<publisher>/name[#version]\` form.`
3545
+ );
3546
+ process.exitCode = 1;
3547
+ }
3548
+ if (duplicates.length > 0) {
3549
+ logErr(
3550
+ `${duplicates.length} asset(s) skipped: kind + name already registered in another directory.`
3551
+ );
3552
+ process.exitCode = 1;
3553
+ }
3554
+ }
3555
+ async function indexPulledLibrary(lib, library, name) {
3556
+ const res = await indexLibrary(lib, library);
3557
+ for (const e of res.errors) logWarn(e);
3558
+ logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
3559
+ warnIgnoredDomainFiles(lib.path);
3560
+ }
3414
3561
  function assertManifestEditableOrExit(libraryPath) {
3415
3562
  try {
3416
3563
  assertManifestEditable(libraryPath);
@@ -3426,13 +3573,21 @@ async function assertLibraryPathFree(manager, dir, exceptId) {
3426
3573
  }
3427
3574
  function canonicalDir(dir) {
3428
3575
  const abs = path23.resolve(dir);
3429
- return fs9.existsSync(abs) ? fs9.realpathSync(abs) : abs;
3576
+ const missing = [];
3577
+ let existing = abs;
3578
+ while (!fs9.existsSync(existing)) {
3579
+ const parent = path23.dirname(existing);
3580
+ if (parent === existing) return abs;
3581
+ missing.unshift(path23.basename(existing));
3582
+ existing = parent;
3583
+ }
3584
+ return path23.join(fs9.realpathSync(existing), ...missing);
3430
3585
  }
3431
3586
  function refuseGlobalInstallFolder(name, dir) {
3432
3587
  const reserved = globalInstallDir();
3433
- const rel = path23.relative(canonicalDir(reserved), canonicalDir(dir));
3588
+ const rel = path23.relative(canonicalDir(reserved).toLowerCase(), canonicalDir(dir).toLowerCase());
3434
3589
  const inside = rel === "" || !rel.startsWith("..") && !path23.isAbsolute(rel);
3435
- if (name === GLOBAL_INSTALL_DIR_NAME || inside) {
3590
+ if (name?.toLowerCase() === GLOBAL_INSTALL_DIR_NAME || inside) {
3436
3591
  logErr(
3437
3592
  `"${GLOBAL_INSTALL_DIR_NAME}" is reserved: ${reserved} holds assets from \`skaile install\`, not a library you author.`
3438
3593
  );
@@ -3478,7 +3633,7 @@ function pruneEmptyLibraryParents(libPath) {
3478
3633
  }
3479
3634
  }
3480
3635
  async function warnIfNotGithubRemote(name, url) {
3481
- const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-FGXF5TJO.js');
3636
+ const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-PICMDSB2.js');
3482
3637
  if (!isGithubRemote(url)) logWarn(notGithubRemoteMessage(name, url));
3483
3638
  }
3484
3639
  function scaffoldLibraryFiles(dir, name) {
@@ -3656,6 +3811,9 @@ function makeLibraryCommand() {
3656
3811
  );
3657
3812
  }
3658
3813
  warnLibraryNameFallback(name, resolved);
3814
+ if (resolved.source !== "manifest") {
3815
+ stampManifestPublisher(lib.path, resolved.publisher);
3816
+ }
3659
3817
  const res = await indexLibrary(lib, library);
3660
3818
  for (const e of res.errors) logWarn(e);
3661
3819
  logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
@@ -3735,6 +3893,18 @@ function makeLibraryCommand() {
3735
3893
  logErr(`--dir "${opts.dir}" must stay inside the library (${libRoot}).`);
3736
3894
  process.exit(1);
3737
3895
  }
3896
+ const taken = conflictingAssetRoot(
3897
+ libRoot,
3898
+ effectiveKind,
3899
+ name,
3900
+ path23.relative(libRoot, path23.join(destDir, name))
3901
+ );
3902
+ if (taken) {
3903
+ logErr(
3904
+ `${effectiveKind}:${name} already exists at "${taken}" \u2014 creating it again under "${path23.relative(libRoot, destDir) || "."}" would re-point the manifest entry. Pick another name.`
3905
+ );
3906
+ process.exit(1);
3907
+ }
3738
3908
  const res = am2.create(name, effectiveKind, destDir, { description: opts.description });
3739
3909
  if (!res.ok) {
3740
3910
  logErr(res.path);
@@ -3933,7 +4103,7 @@ function makeLibraryCommand() {
3933
4103
  }
3934
4104
  });
3935
4105
  cmd.command("sync <name>").description("Pull then push (as backend permits)").action(async (name) => {
3936
- const { manager, close } = await openLibraryManager();
4106
+ const { manager, library, close } = await openLibraryManager();
3937
4107
  try {
3938
4108
  const lib = await manager.requireLibrary(name);
3939
4109
  requireGitBackend(lib, "sync");
@@ -3946,6 +4116,7 @@ function makeLibraryCommand() {
3946
4116
  logInfo(`Pushed: ${push.pushed}`);
3947
4117
  }
3948
4118
  await manager.updateLibrary(name, { lastSyncAt: /* @__PURE__ */ new Date() });
4119
+ if (pull.applied > 0) await indexPulledLibrary(lib, library, name);
3949
4120
  logOk(`Synced ${name}.`);
3950
4121
  } catch (err2) {
3951
4122
  exitOnSyncError(err2);
@@ -3957,57 +4128,13 @@ function makeLibraryCommand() {
3957
4128
  const { manager, library, close } = await openLibraryManager();
3958
4129
  try {
3959
4130
  const lib = await manager.requireLibrary(name);
3960
- assertManifestEditableOrExit(lib.path);
3961
- const badRequires = manifestRequiresProblems(lib.path);
3962
- const resolved = resolveLibraryPublisherDetailed(lib, {}, getStoreIdentity());
3963
- warnLibraryNameFallback(name, resolved);
3964
- const { removed, skipped } = await syncManifestWithDisk(
3965
- lib.path,
3966
- resolved.publisher,
3967
- getKindRegistry()
3968
- );
3969
- const manifest = loadSkPublishManifest(lib.path);
3970
- for (const a of removed) {
3971
- const ref = manifest ? assetEntryRef(a, manifest) : `${a.kind}:${a.name}`;
3972
- logInfo(`Removed manifest entry ${ref} (root ${a.root} is gone)`);
3973
- }
3974
- for (const s of skipped.filter((x) => x.reason === "invalid-version")) {
3975
- logWarn(
3976
- `${s.kind}:${s.name} skipped: ${s.detail}. Set a valid \`metadata.version\` (e.g. 0.1.0) and re-run \`skaile library index ${name}\`.`
3977
- );
3978
- }
3979
- const skippedKeys = new Set(skipped.map((s) => `${s.kind}:${s.name}`));
3980
- const res = await indexLibrary(lib, library, {
3981
- exclude: (a) => skippedKeys.has(`${a.kind}:${a.name}`)
3982
- });
3983
- const unparsable = res.errors.filter((e) => e.includes("ManifestSchemaError:"));
3984
- for (const e of res.errors) (unparsable.includes(e) ? logErr : logWarn)(e);
3985
- const syncUnparsable = skipped.filter(
3986
- (s) => s.reason === "unparsable" && !unparsable.some((e) => e.includes(s.file))
3987
- );
3988
- for (const s of syncUnparsable) {
3989
- logErr(`${s.kind}:${s.name} skipped: manifest file ${s.file} could not be parsed.`);
3990
- }
3991
- for (const p6 of badRequires) logErr(`${p6.asset}: ${p6.message}`);
3992
- logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
3993
- warnIgnoredDomainFiles(lib.path);
3994
- const skippedUnparsable = unparsable.length + syncUnparsable.length;
3995
- if (skippedUnparsable > 0) {
3996
- logErr(`${skippedUnparsable} asset(s) skipped: manifest could not be parsed.`);
3997
- process.exitCode = 1;
3998
- }
3999
- if (badRequires.length > 0) {
4000
- logErr(
4001
- `${badRequires.length} invalid requires entr${badRequires.length === 1 ? "y" : "ies"} ignored: use the \`kind:@<publisher>/name[#version]\` form.`
4002
- );
4003
- process.exitCode = 1;
4004
- }
4131
+ await reindexLibrary(lib, library, name);
4005
4132
  } finally {
4006
4133
  close();
4007
4134
  }
4008
4135
  });
4009
4136
  cmd.command("pull <name>").description("Pull from remote").action(async (name) => {
4010
- const { manager, close } = await openLibraryManager();
4137
+ const { manager, library, close } = await openLibraryManager();
4011
4138
  try {
4012
4139
  const lib = await manager.requireLibrary(name);
4013
4140
  requireGitBackend(lib, "pull");
@@ -4016,6 +4143,7 @@ function makeLibraryCommand() {
4016
4143
  exitOnSyncError(new Error(res.conflicts[0].reason));
4017
4144
  } else {
4018
4145
  logOk(`Pulled ${res.applied} change(s).`);
4146
+ if (res.applied > 0) await indexPulledLibrary(lib, library, name);
4019
4147
  }
4020
4148
  } catch (err2) {
4021
4149
  exitOnSyncError(err2);
@@ -4120,16 +4248,16 @@ function makeLibraryCommand() {
4120
4248
  "With --create-repo: create the repo private (the store only accepts public repos)"
4121
4249
  ).option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
4122
4250
  async (lib, opts) => {
4123
- const { runLibraryPublish } = await import('../library-publish-FGXF5TJO.js');
4251
+ const { runLibraryPublish } = await import('../library-publish-PICMDSB2.js');
4124
4252
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
4125
4253
  }
4126
4254
  );
4127
4255
  cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
4128
- const { runLibraryRegister } = await import('../library-publish-FGXF5TJO.js');
4256
+ const { runLibraryRegister } = await import('../library-publish-PICMDSB2.js');
4129
4257
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
4130
4258
  });
4131
4259
  cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
4132
- const { runLibraryYank } = await import('../library-publish-FGXF5TJO.js');
4260
+ const { runLibraryYank } = await import('../library-publish-PICMDSB2.js');
4133
4261
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
4134
4262
  });
4135
4263
  return cmd;
@@ -4789,7 +4917,7 @@ function scheduleSoftDepPreview() {
4789
4917
  }
4790
4918
  async function loadAssets() {
4791
4919
  softDepPreviewCache.clear();
4792
- const { gatherAssetFeeds } = await import('../asset-feeds-K36CR52Q.js');
4920
+ const { gatherAssetFeeds } = await import('../asset-feeds-EYRZR4K5.js');
4793
4921
  const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
4794
4922
  if (notes.length > 0) {
4795
4923
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -4976,7 +5104,7 @@ function reconcileCollapsedSets(rows) {
4976
5104
  async function loadSourcesAndLibraries() {
4977
5105
  try {
4978
5106
  const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
4979
- import('../open-library-P3D337NH.js'),
5107
+ import('../open-library-OG457THY.js'),
4980
5108
  import('../core/index.js')
4981
5109
  ]);
4982
5110
  const { manager, library, close } = await openLibraryManager2();
@@ -5349,12 +5477,21 @@ async function applyChanges() {
5349
5477
  render();
5350
5478
  let added = 0;
5351
5479
  let removed = 0;
5480
+ let pruned = 0;
5352
5481
  const appliedAdds = [];
5353
5482
  const appliedRemoves = [];
5354
5483
  for (const ref of state.pendingRemoves) {
5355
- if (am.remove(ref)) {
5356
- removed++;
5357
- appliedRemoves.push(ref);
5484
+ try {
5485
+ const result = await am.removeWithDependencies(ref);
5486
+ if (result.changed) {
5487
+ removed++;
5488
+ pruned += result.pruned.length;
5489
+ appliedRemoves.push(ref);
5490
+ }
5491
+ } catch (err2) {
5492
+ state.message = pc5.red(
5493
+ `Failed to remove ${ref}: ${err2 instanceof Error ? err2.message : err2}`
5494
+ );
5358
5495
  }
5359
5496
  }
5360
5497
  for (const ref of state.pendingAdds) {
@@ -5372,6 +5509,7 @@ async function applyChanges() {
5372
5509
  const parts = [];
5373
5510
  if (added > 0) parts.push(pc5.green(`+${added} added`));
5374
5511
  if (removed > 0) parts.push(pc5.red(`-${removed} removed`));
5512
+ if (pruned > 0) parts.push(pc5.red(`-${pruned} no longer required`));
5375
5513
  const softDeps = appliedAdds.length > 0 ? await am.reportSoftDeps(appliedAdds) : [];
5376
5514
  if (softDeps.length > 0) {
5377
5515
  parts.push(pc5.dim(`${softDeps.length} soft dep${softDeps.length === 1 ? "" : "s"} referenced`));
@@ -5411,7 +5549,10 @@ async function showInfo() {
5411
5549
  console.log(` installed: ${row.installed ? pc5.green("yes") : pc5.red("no")}`);
5412
5550
  if (e.requires.length) {
5413
5551
  console.log(` requires:`);
5414
- for (const d of e.requires) console.log(` ${kindColor(d.kind)}:${d.name}`);
5552
+ for (const d of e.requires) {
5553
+ const scope = d.publisher ? `@${d.publisher}/` : "";
5554
+ console.log(` ${kindColor(d.kind)}:${scope}${d.name}`);
5555
+ }
5415
5556
  }
5416
5557
  if (e.dependencies.length) {
5417
5558
  console.log(` dependencies:`);
@@ -6422,7 +6563,7 @@ function parseManifestCandidate(c, absRoot) {
6422
6563
  return {
6423
6564
  kind: "value",
6424
6565
  parsed: res.data,
6425
- body: c.filePath.endsWith(".md") ? parseFrontmatter(content).body : void 0
6566
+ body: readAssetBody(c.filePath, content)
6426
6567
  };
6427
6568
  }
6428
6569
  var PSEUDO_COMPOSE_KINDS = /* @__PURE__ */ new Set(["soul"]);
@@ -6513,6 +6654,7 @@ function validateManifests(rootPath, strictConformance) {
6513
6654
  const candidates = findManifestCandidates(absRoot);
6514
6655
  let errors = 0;
6515
6656
  let warnings = 0;
6657
+ const seenIdentity = /* @__PURE__ */ new Map();
6516
6658
  for (const c of candidates) {
6517
6659
  const parseResult = parseManifestCandidate(c, absRoot);
6518
6660
  if (parseResult.kind === "error") {
@@ -6529,6 +6671,21 @@ function validateManifests(rootPath, strictConformance) {
6529
6671
  );
6530
6672
  errors += delta.errors;
6531
6673
  warnings += delta.warnings;
6674
+ const obj = parseResult.parsed;
6675
+ const identity = obj && typeof obj === "object" ? obj[c.kind === "flow" ? "id" : "name"] : null;
6676
+ if (typeof identity === "string" && identity.length > 0) {
6677
+ const dir = path23__default.dirname(c.filePath);
6678
+ const key = `${c.kind}:${identity}`;
6679
+ const first = seenIdentity.get(key);
6680
+ if (first === void 0) {
6681
+ seenIdentity.set(key, dir);
6682
+ } else if (first !== dir) {
6683
+ logErr(
6684
+ `${path23__default.relative(absRoot, c.filePath)} [${c.kind}] \u2014 ${key} is also defined in ${path23__default.relative(absRoot, first) || "."}; two directories cannot share a kind and name (\`skaile library index\` keeps only the first).`
6685
+ );
6686
+ errors++;
6687
+ }
6688
+ }
6532
6689
  }
6533
6690
  return { total: candidates.length, errors, warnings };
6534
6691
  }
@@ -6667,7 +6824,12 @@ function validatePublishManifestVersions(rootPath) {
6667
6824
  const fileVersion = declaredVersion(res.data);
6668
6825
  if (fileVersion === void 0 || fileVersion === a.version) continue;
6669
6826
  logWarn(
6670
- `${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${assetEntryRef(a, manifest)}: manifest version ${a.version} differs from ${toPosix(path23__default.relative(absRoot, file))} (${fileVersion}). The file is the source of truth: bump the version there, then run \`skaile library index <library>\`.`
6827
+ manifestVersionMismatchMessage(
6828
+ assetEntryRef(a, manifest),
6829
+ a.version,
6830
+ toPosix(path23__default.relative(absRoot, file)),
6831
+ fileVersion
6832
+ )
6671
6833
  );
6672
6834
  warnings++;
6673
6835
  }
@@ -6958,6 +7120,7 @@ function makeValidateCommand() {
6958
7120
  const totalErrors = errors + ws.errors + rootErrors + requiresErrors;
6959
7121
  console.log();
6960
7122
  warnIgnoredDomainFiles(absPath);
7123
+ warnLegacyBundleFiles(absPath);
6961
7124
  logInfo(`Scanned ${total} asset manifest(s) and ${ws.total} skaile.yaml file(s)`);
6962
7125
  const totalWarnings = warnings + versionWarnings + publisherWarnings;
6963
7126
  if (totalWarnings > 0) logWarn(`${totalWarnings} warning(s)`);
@@ -8500,6 +8663,7 @@ function resolveSkillName(clonePath, requested) {
8500
8663
  return requested;
8501
8664
  }
8502
8665
  function outdatedRef(e) {
8666
+ if (!e.kind) return e.name;
8503
8667
  const publisher = e.publisher?.replace(/^@/, "");
8504
8668
  return publisher ? `${e.kind}:@${publisher}/${e.name}` : `${e.kind}:${e.name}`;
8505
8669
  }
@@ -8545,9 +8709,9 @@ function makeOutdatedCommand() {
8545
8709
  }
8546
8710
  console.log();
8547
8711
  if (filtered.some((e) => e.problem === void 0)) {
8548
- logWarn(`Run ${S.cmd("skaile update")} to re-deploy.`);
8712
+ logWarn(`Run ${S.cmd("skaile update")} to re-lock and re-deploy.`);
8549
8713
  }
8550
- if (filtered.some((e) => e.problem !== void 0)) {
8714
+ if (filtered.some((e) => e.problem !== void 0 && !e.manualFix)) {
8551
8715
  logWarn(`Run ${S.cmd("skaile install")} to restore or re-lock the broken assets.`);
8552
8716
  }
8553
8717
  });
@@ -8620,7 +8784,7 @@ function action2(fn) {
8620
8784
  };
8621
8785
  }
8622
8786
  async function reconcileAndReport(projectDir, plugins) {
8623
- const { reconcilePlugins } = await import('../plugin-store-WI4MZJLP.js');
8787
+ const { reconcilePlugins } = await import('../plugin-store-MPAMD5OT.js');
8624
8788
  if (plugins.length === 0) {
8625
8789
  logInfo("No plugins declared \u2014 nothing to reconcile.");
8626
8790
  return;
@@ -8636,7 +8800,7 @@ async function reconcileAndReport(projectDir, plugins) {
8636
8800
  async function runInstall2(spec, opts) {
8637
8801
  const projectDir = path23__default.resolve(opts.projectDir);
8638
8802
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
8639
- const { specName } = await import('../plugin-store-WI4MZJLP.js');
8803
+ const { specName } = await import('../plugin-store-MPAMD5OT.js');
8640
8804
  const yamlPath = path23__default.join(projectDir, "skaile.yaml");
8641
8805
  const editor = WorkspaceYamlEditor2.load(yamlPath);
8642
8806
  const replaced = editor.addPlugin(spec, specName);
@@ -8648,7 +8812,7 @@ async function runInstall2(spec, opts) {
8648
8812
  async function runRemove(name, opts) {
8649
8813
  const projectDir = path23__default.resolve(opts.projectDir);
8650
8814
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
8651
- const { specName } = await import('../plugin-store-WI4MZJLP.js');
8815
+ const { specName } = await import('../plugin-store-MPAMD5OT.js');
8652
8816
  const yamlPath = path23__default.join(projectDir, "skaile.yaml");
8653
8817
  const editor = WorkspaceYamlEditor2.load(yamlPath);
8654
8818
  const removed = editor.removePlugin(name, specName);
@@ -8676,7 +8840,7 @@ async function runList(opts) {
8676
8840
  const registry = createPluginRegistry();
8677
8841
  if (declared.length > 0) {
8678
8842
  try {
8679
- const { loadPlugins } = await import('../plugin-store-WI4MZJLP.js');
8843
+ const { loadPlugins } = await import('../plugin-store-MPAMD5OT.js');
8680
8844
  const result = await loadPlugins(projectDir, declared, registry);
8681
8845
  for (const f of result.failed) logWarn(f.error);
8682
8846
  } catch (err2) {
@@ -9893,12 +10057,12 @@ function makeServeCommand() {
9893
10057
  );
9894
10058
  }
9895
10059
  async function ensurePluginsLoadedForServe(projectDir) {
9896
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-KC5O7CML.js');
10060
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-MWZDRBLD.js');
9897
10061
  try {
9898
10062
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
9899
10063
  const config = resolveSkWorkspaceConfig2(projectDir);
9900
10064
  if (!config.plugins || config.plugins.length === 0) return;
9901
- const { ensurePluginsLoaded } = await import('../plugin-store-WI4MZJLP.js');
10065
+ const { ensurePluginsLoaded } = await import('../plugin-store-MPAMD5OT.js');
9902
10066
  const { pluginRegistry } = await import('../plugin-registry/index.js');
9903
10067
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
9904
10068
  if (result.loaded.length > 0) {
@@ -9912,14 +10076,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
9912
10076
  }
9913
10077
  }
9914
10078
  async function runCompileTest(opts) {
9915
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-KC5O7CML.js');
10079
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-MWZDRBLD.js');
9916
10080
  const { tmpdir } = await import('os');
9917
10081
  const { dirname: dirname3, join: join7, resolve: resolve5 } = await import('path');
9918
10082
  const { fileURLToPath: fileURLToPath2 } = await import('url');
9919
10083
  const { unlinkSync, existsSync: existsSync18 } = await import('fs');
9920
10084
  const { spawn } = await import('child_process');
9921
10085
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
9922
- const { MONOREPO_ROOT } = await import('../paths-JKEKXM52.js');
10086
+ const { MONOREPO_ROOT } = await import('../paths-FQ64OLJG.js');
9923
10087
  if (MONOREPO_ROOT === null) {
9924
10088
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
9925
10089
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
@@ -10655,11 +10819,19 @@ function makeSessionCommand() {
10655
10819
  });
10656
10820
  cmd.command("switch <run-id>").description("Switch the current session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
10657
10821
  const projectDir = path23__default.resolve(opts.projectDir);
10822
+ if (!await loadSessionById(projectDir, runId)) {
10823
+ logErr(`Session not found: ${runId}`);
10824
+ process.exit(1);
10825
+ }
10658
10826
  await setCurrentSession(projectDir, runId);
10659
10827
  logOk(`Switched to session: ${S.dim(runId.slice(0, 8))}`);
10660
10828
  });
10661
10829
  cmd.command("delete <run-id>").description("Delete a session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
10662
10830
  const projectDir = path23__default.resolve(opts.projectDir);
10831
+ if (!await loadSessionById(projectDir, runId)) {
10832
+ logErr(`Session not found: ${runId}`);
10833
+ process.exit(1);
10834
+ }
10663
10835
  await deleteSession(projectDir, runId);
10664
10836
  logOk(`Deleted session: ${S.dim(runId.slice(0, 8))}`);
10665
10837
  });
@@ -10796,7 +10968,7 @@ function makeStoreCommand() {
10796
10968
  process.exit(2);
10797
10969
  });
10798
10970
  store.command("search <query>").description("Search the AI Asset Store catalog by name, description, or publisher").option("--kind <kind>", "Filter by asset kind (skill, agent, prompt, flow, \u2026)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
10799
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-P3D337NH.js');
10971
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-OG457THY.js');
10800
10972
  try {
10801
10973
  const remote = await openCatalogSource2({ projectDir: path23__default.resolve(opts.projectDir) });
10802
10974
  const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
@@ -10824,8 +10996,8 @@ function makeStoreCommand() {
10824
10996
  }
10825
10997
  });
10826
10998
  store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
10827
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-P3D337NH.js');
10828
- const { supportsInstallManifest } = await import('../project-WFUDVYNN.js');
10999
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-OG457THY.js');
11000
+ const { supportsInstallManifest } = await import('../project-2GFT5LEZ.js');
10829
11001
  try {
10830
11002
  const remote = await openCatalogSource2({ projectDir: path23__default.resolve(opts.projectDir) });
10831
11003
  const asset = await remote.resolve(ref);
@@ -10938,14 +11110,15 @@ function makeStoreCommand() {
10938
11110
  });
10939
11111
  return store;
10940
11112
  }
10941
- function printTree(node, prefix = "", isLast = true) {
10942
- const connector = prefix === "" ? "" : isLast ? "\u2514\u2500 " : "\u251C\u2500 ";
10943
- const line = prefix + connector + colorRef(node.ref);
10944
- console.log(` ${line}`);
10945
- const childPrefix = prefix + (prefix === "" ? "" : isLast ? " " : "\u2502 ");
10946
- for (let i = 0; i < node.children.length; i++) {
10947
- printTree(node.children[i], childPrefix, i === node.children.length - 1);
10948
- }
11113
+ function printChildren(nodes, prefix) {
11114
+ nodes.forEach((node, i) => {
11115
+ const isLast = i === nodes.length - 1;
11116
+ console.log(` ${prefix}${isLast ? "\u2514\u2500 " : "\u251C\u2500 "}${colorRef(node.ref)}`);
11117
+ printChildren(node.children, prefix + (isLast ? " " : "\u2502 "));
11118
+ });
11119
+ }
11120
+ function treeRefs(nodes) {
11121
+ return [...new Set(nodes.flatMap((n) => [n.ref, ...treeRefs(n.children)]))];
10949
11122
  }
10950
11123
  function makeTreeCommand() {
10951
11124
  return new Command("tree").description("Show full dependency tree").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
@@ -10953,14 +11126,15 @@ function makeTreeCommand() {
10953
11126
  registry: getKindRegistry(),
10954
11127
  projectDir: path23__default.resolve(opts.projectDir)
10955
11128
  });
10956
- const root = am2.tree();
11129
+ const root = await am2.tree();
10957
11130
  if (root.children.length === 0) {
10958
11131
  logInfo("No dependencies in lock file. Run `skaile install` first.");
10959
11132
  return;
10960
11133
  }
10961
11134
  console.log();
10962
- printTree(root);
10963
- const softDeps = await am2.softDepsOf(root.children.map((c) => c.ref));
11135
+ console.log(` ${colorRef(root.ref)}`);
11136
+ printChildren(root.children, "");
11137
+ const softDeps = await am2.softDepsOf(treeRefs(root.children));
10964
11138
  if (softDeps.length > 0) {
10965
11139
  console.log(` ${S.label("Soft dependencies (inferred)")}:`);
10966
11140
  for (const e of softDeps)
@@ -11003,6 +11177,7 @@ function makeUpdateCommand() {
11003
11177
  syncSpinner.stop(
11004
11178
  total === 0 ? "No sources to sync." : `Synced ${S.heading(`${synced}/${total}`)} source(s)` + (failed ? ` (${failed} failed)` : "")
11005
11179
  );
11180
+ if (failed > 0) process.exitCode = 1;
11006
11181
  }
11007
11182
  const warnings = deferredWarnings();
11008
11183
  const am2 = new AssetManager({
@@ -11025,7 +11200,17 @@ function makeUpdateCommand() {
11025
11200
  warnings.flush();
11026
11201
  if (result.deployed.length > 0) {
11027
11202
  for (const d of result.deployed) logOk(`Updated ${d}`);
11028
- } else {
11203
+ }
11204
+ for (const r of result.removed) logWarn(`Removed: ${r}`);
11205
+ reportRelocked(result.relocked);
11206
+ const changed = result.deployed.length > 0 || result.removed.length > 0 || !!result.relocked?.length;
11207
+ if (result.lockWritten && changed) {
11208
+ logInfo(`Lock file written: ${S.dim("skaile.lock.yaml")}`);
11209
+ }
11210
+ if (result.missing.length > 0) {
11211
+ for (const m of result.missing) logErr(`Missing: ${m}${result.missingHints?.[m] ?? ""}`);
11212
+ process.exitCode = 1;
11213
+ } else if (!changed) {
11029
11214
  logInfo("Nothing to update.");
11030
11215
  }
11031
11216
  }
@@ -11141,7 +11326,7 @@ function makeWhyCommand() {
11141
11326
  registry: getKindRegistry(),
11142
11327
  projectDir: path23__default.resolve(opts.projectDir)
11143
11328
  });
11144
- const chain = am2.why(ref);
11329
+ const chain = await am2.why(ref);
11145
11330
  if (chain.length === 0) {
11146
11331
  let declared;
11147
11332
  try {
@@ -11426,7 +11611,7 @@ async function bootstrapUserConfig() {
11426
11611
  }
11427
11612
  async function hydrateInitSources(resolved, created) {
11428
11613
  try {
11429
- const { ensureSourcesCloned } = await import('../ensure-sources-277VI7R3.js');
11614
+ const { ensureSourcesCloned } = await import('../ensure-sources-SKLNM4UZ.js');
11430
11615
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
11431
11616
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
11432
11617
  if (hydrate.failed.length > 0) {
@@ -11466,7 +11651,7 @@ function printInitSummary(resolved, projectDir, created) {
11466
11651
  console.log();
11467
11652
  }
11468
11653
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
11469
- const { cmdSetup } = await import('../setup-RAMLTORM.js');
11654
+ const { cmdSetup } = await import('../setup-WHMCSIF2.js');
11470
11655
  await cmdSetup([], { projectDir: process.cwd() });
11471
11656
  });
11472
11657
  program.addCommand(makeInstallCommand());