@skaile/workspaces 5.12.0 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +2 -2
  3. package/dist/{asset-feeds-AM6PSSGM.js → asset-feeds-ALMTHLPV.js} +20 -20
  4. package/dist/{asset-feeds-AM6PSSGM.js.map → asset-feeds-ALMTHLPV.js.map} +1 -1
  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 +53 -10
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/asset-manager/src/installer.d.ts +0 -10
  12. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  13. package/dist/bridge/drivers/claude-sdk.js +15 -13
  14. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  15. package/dist/bridge/drivers/codex.js +72 -27
  16. package/dist/bridge/drivers/codex.js.map +1 -1
  17. package/dist/bridge/drivers/continue.js +11 -11
  18. package/dist/bridge/drivers/echo.js +1 -1
  19. package/dist/bridge/drivers/gemini.js +6 -6
  20. package/dist/bridge/drivers/goose.js +11 -11
  21. package/dist/bridge/drivers/omp.js +102 -27
  22. package/dist/bridge/drivers/omp.js.map +1 -1
  23. package/dist/bridge/drivers/opencode.js +11 -11
  24. package/dist/bridge/drivers/qwen.js +6 -6
  25. package/dist/bridge/index.js +13 -13
  26. package/dist/bridge/src/codex/config-toml.d.ts +8 -0
  27. package/dist/bridge/src/codex/config-toml.d.ts.map +1 -1
  28. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  29. package/dist/bridge/src/drivers/codex.d.ts +6 -0
  30. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  31. package/dist/bridge/src/drivers/omp-models-yml.d.ts +32 -0
  32. package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -1
  33. package/dist/bridge/src/drivers/omp.d.ts +20 -6
  34. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  35. package/dist/{chunk-QCEKGYHF.js → chunk-2BIESC6S.js} +3 -3
  36. package/dist/{chunk-QCEKGYHF.js.map → chunk-2BIESC6S.js.map} +1 -1
  37. package/dist/{chunk-NGJIVDDD.js → chunk-4DLQESIY.js} +3 -3
  38. package/dist/{chunk-NGJIVDDD.js.map → chunk-4DLQESIY.js.map} +1 -1
  39. package/dist/{chunk-7QWQTA5S.js → chunk-4L4R5LV3.js} +4 -4
  40. package/dist/{chunk-7QWQTA5S.js.map → chunk-4L4R5LV3.js.map} +1 -1
  41. package/dist/{chunk-GWD3QNVS.js → chunk-4NJ3QQHZ.js} +5 -5
  42. package/dist/{chunk-GWD3QNVS.js.map → chunk-4NJ3QQHZ.js.map} +1 -1
  43. package/dist/{chunk-6VLHITAM.js → chunk-57SF6W6E.js} +4 -3
  44. package/dist/chunk-57SF6W6E.js.map +1 -0
  45. package/dist/{chunk-NJV5SLEK.js → chunk-5FYOM4RF.js} +46 -46
  46. package/dist/chunk-5FYOM4RF.js.map +1 -0
  47. package/dist/{chunk-ICIYSJBQ.js → chunk-5SKVCMRC.js} +15 -7
  48. package/dist/chunk-5SKVCMRC.js.map +1 -0
  49. package/dist/{chunk-P23WJCH2.js → chunk-6GICC4RJ.js} +23 -18
  50. package/dist/chunk-6GICC4RJ.js.map +1 -0
  51. package/dist/{chunk-3HUV2LJF.js → chunk-6JKIOPT3.js} +4 -4
  52. package/dist/{chunk-3HUV2LJF.js.map → chunk-6JKIOPT3.js.map} +1 -1
  53. package/dist/{chunk-NDF24LYP.js → chunk-6NQDDCIL.js} +3 -3
  54. package/dist/{chunk-NDF24LYP.js.map → chunk-6NQDDCIL.js.map} +1 -1
  55. package/dist/{chunk-VRLKHL74.js → chunk-7SMP4GNW.js} +6 -6
  56. package/dist/{chunk-VRLKHL74.js.map → chunk-7SMP4GNW.js.map} +1 -1
  57. package/dist/{chunk-XMAJJPA4.js → chunk-AHCI4V5L.js} +3 -3
  58. package/dist/{chunk-XMAJJPA4.js.map → chunk-AHCI4V5L.js.map} +1 -1
  59. package/dist/{chunk-NJXR5OAM.js → chunk-B7CZYFB2.js} +4 -4
  60. package/dist/{chunk-NJXR5OAM.js.map → chunk-B7CZYFB2.js.map} +1 -1
  61. package/dist/{chunk-T5TSLSRO.js → chunk-BF422IDP.js} +8 -8
  62. package/dist/{chunk-T5TSLSRO.js.map → chunk-BF422IDP.js.map} +1 -1
  63. package/dist/{chunk-MF54ZHWT.js → chunk-BVJU2GKE.js} +2 -2
  64. package/dist/{chunk-MF54ZHWT.js.map → chunk-BVJU2GKE.js.map} +1 -1
  65. package/dist/{chunk-PMECEZK3.js → chunk-D54T2F54.js} +5 -4
  66. package/dist/chunk-D54T2F54.js.map +1 -0
  67. package/dist/{chunk-C3BMXXTN.js → chunk-DKGEV6SQ.js} +68 -24
  68. package/dist/chunk-DKGEV6SQ.js.map +1 -0
  69. package/dist/chunk-FB3NREF7.js +649 -0
  70. package/dist/chunk-FB3NREF7.js.map +1 -0
  71. package/dist/{chunk-3LVB3HGH.js → chunk-FHDK3BFD.js} +3 -3
  72. package/dist/{chunk-3LVB3HGH.js.map → chunk-FHDK3BFD.js.map} +1 -1
  73. package/dist/{chunk-2X3JBVGD.js → chunk-GMDSRSGI.js} +18 -9
  74. package/dist/chunk-GMDSRSGI.js.map +1 -0
  75. package/dist/{chunk-N5M2EISA.js → chunk-HBZD3MIW.js} +97 -54
  76. package/dist/chunk-HBZD3MIW.js.map +1 -0
  77. package/dist/{chunk-SMT3LNAG.js → chunk-HWGYJMME.js} +4 -4
  78. package/dist/{chunk-SMT3LNAG.js.map → chunk-HWGYJMME.js.map} +1 -1
  79. package/dist/{chunk-CPSIPIX7.js → chunk-IG5LZ3WU.js} +8 -6
  80. package/dist/chunk-IG5LZ3WU.js.map +1 -0
  81. package/dist/{chunk-CTP3XBMF.js → chunk-IY5E7Y5W.js} +57 -7
  82. package/dist/chunk-IY5E7Y5W.js.map +1 -0
  83. package/dist/{chunk-YQU2BPQD.js → chunk-J4DB5G36.js} +2 -2
  84. package/dist/{chunk-YQU2BPQD.js.map → chunk-J4DB5G36.js.map} +1 -1
  85. package/dist/{chunk-PNTXHTBC.js → chunk-J4OYIYFQ.js} +2 -2
  86. package/dist/{chunk-PNTXHTBC.js.map → chunk-J4OYIYFQ.js.map} +1 -1
  87. package/dist/{chunk-PNOGX36L.js → chunk-L3ZGYSWY.js} +85 -24
  88. package/dist/chunk-L3ZGYSWY.js.map +1 -0
  89. package/dist/{chunk-XTVSNWLL.js → chunk-M3P4BYRK.js} +34 -11
  90. package/dist/chunk-M3P4BYRK.js.map +1 -0
  91. package/dist/{chunk-X6LKA3TJ.js → chunk-NDUYFYJB.js} +5 -5
  92. package/dist/{chunk-X6LKA3TJ.js.map → chunk-NDUYFYJB.js.map} +1 -1
  93. package/dist/{chunk-7CR2OZPA.js → chunk-NVO6WECE.js} +9 -8
  94. package/dist/chunk-NVO6WECE.js.map +1 -0
  95. package/dist/chunk-PN44DOGP.js +345 -0
  96. package/dist/chunk-PN44DOGP.js.map +1 -0
  97. package/dist/{chunk-UTKENBB6.js → chunk-PXDWTJ3P.js} +4 -4
  98. package/dist/{chunk-UTKENBB6.js.map → chunk-PXDWTJ3P.js.map} +1 -1
  99. package/dist/{chunk-POQ6PGNE.js → chunk-PYTTF754.js} +22 -6
  100. package/dist/chunk-PYTTF754.js.map +1 -0
  101. package/dist/chunk-PZOO7L26.js +64 -0
  102. package/dist/chunk-PZOO7L26.js.map +1 -0
  103. package/dist/{chunk-SHQMPGOL.js → chunk-QO7CR3KB.js} +10 -5
  104. package/dist/chunk-QO7CR3KB.js.map +1 -0
  105. package/dist/{chunk-KVSDRB35.js → chunk-R6QHJEHE.js} +5 -5
  106. package/dist/{chunk-KVSDRB35.js.map → chunk-R6QHJEHE.js.map} +1 -1
  107. package/dist/chunk-U27JRO5L.js +13 -0
  108. package/dist/chunk-U27JRO5L.js.map +1 -0
  109. package/dist/{chunk-G3X4MLDB.js → chunk-USHB5KEY.js} +3 -3
  110. package/dist/{chunk-G3X4MLDB.js.map → chunk-USHB5KEY.js.map} +1 -1
  111. package/dist/{chunk-HYMERG57.js → chunk-V5JHD4I2.js} +3 -3
  112. package/dist/{chunk-HYMERG57.js.map → chunk-V5JHD4I2.js.map} +1 -1
  113. package/dist/{chunk-JQ3DXNQV.js → chunk-VLBIME5L.js} +6 -6
  114. package/dist/{chunk-JQ3DXNQV.js.map → chunk-VLBIME5L.js.map} +1 -1
  115. package/dist/{chunk-7XWUJC3A.js → chunk-XBYSURMK.js} +3 -3
  116. package/dist/{chunk-7XWUJC3A.js.map → chunk-XBYSURMK.js.map} +1 -1
  117. package/dist/{chunk-XZY6SBGU.js → chunk-XJYBCDY2.js} +3 -3
  118. package/dist/{chunk-XZY6SBGU.js.map → chunk-XJYBCDY2.js.map} +1 -1
  119. package/dist/{chunk-27L6BBAT.js → chunk-Y4Z7LGSH.js} +8 -8
  120. package/dist/{chunk-27L6BBAT.js.map → chunk-Y4Z7LGSH.js.map} +1 -1
  121. package/dist/{chunk-TVAR4JHA.js → chunk-Y7WKXPWS.js} +320 -51
  122. package/dist/chunk-Y7WKXPWS.js.map +1 -0
  123. package/dist/{chunk-2JFIFDDO.js → chunk-YTZFSKWL.js} +3 -3
  124. package/dist/{chunk-2JFIFDDO.js.map → chunk-YTZFSKWL.js.map} +1 -1
  125. package/dist/{chunk-WI4T3KIS.js → chunk-ZSMMX3JD.js} +130 -23
  126. package/dist/chunk-ZSMMX3JD.js.map +1 -0
  127. package/dist/{chunk-DCHQ6BAZ.js → chunk-ZU24LWBI.js} +3 -3
  128. package/dist/{chunk-DCHQ6BAZ.js.map → chunk-ZU24LWBI.js.map} +1 -1
  129. package/dist/cli/index.js +469 -227
  130. package/dist/cli/index.js.map +1 -1
  131. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  132. package/dist/cli/src/commands/catalog-cmd.d.ts.map +1 -1
  133. package/dist/cli/src/commands/catalog.d.ts +2 -0
  134. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  135. package/dist/cli/src/commands/diff.d.ts +1 -1
  136. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  137. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  138. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  139. package/dist/cli/src/commands/library-index.d.ts +10 -0
  140. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  141. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  142. package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
  143. package/dist/cli/src/commands/plugin/types.d.ts +2 -0
  144. package/dist/cli/src/commands/plugin/types.d.ts.map +1 -1
  145. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  146. package/dist/cli/src/commands/preset-apply.d.ts.map +1 -1
  147. package/dist/cli/src/commands/project.d.ts +8 -0
  148. package/dist/cli/src/commands/project.d.ts.map +1 -1
  149. package/dist/cli/src/commands/run.d.ts +9 -0
  150. package/dist/cli/src/commands/run.d.ts.map +1 -1
  151. package/dist/cli/src/commands/serve-preflight.d.ts +2 -1
  152. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  153. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  154. package/dist/cli/src/commands/source-manifest.d.ts +1 -0
  155. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  156. package/dist/cli/src/commands/source.d.ts +9 -1
  157. package/dist/cli/src/commands/source.d.ts.map +1 -1
  158. package/dist/cli/src/commands/store.d.ts.map +1 -1
  159. package/dist/cli/src/commands/update.d.ts.map +1 -1
  160. package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
  161. package/dist/cli/src/commands/validate.d.ts +3 -2
  162. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  163. package/dist/cli/src/driver-error.d.ts +7 -0
  164. package/dist/cli/src/driver-error.d.ts.map +1 -1
  165. package/dist/cli/src/helpers.d.ts +6 -0
  166. package/dist/cli/src/helpers.d.ts.map +1 -1
  167. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  168. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  169. package/dist/cli/src/plugin-store/reconcile.d.ts +24 -4
  170. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  171. package/dist/cli/src/skill-checks.d.ts +15 -4
  172. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  173. package/dist/cli/src/store-addable.d.ts +7 -8
  174. package/dist/cli/src/store-addable.d.ts.map +1 -1
  175. package/dist/connectors/config.js +6 -6
  176. package/dist/connectors/index.js +16 -16
  177. package/dist/connectors/src/config.d.ts.map +1 -1
  178. package/dist/{connectors-UNKUKEPG.js → connectors-GFKMKAXV.js} +19 -19
  179. package/dist/{connectors-UNKUKEPG.js.map → connectors-GFKMKAXV.js.map} +1 -1
  180. package/dist/core/driver-targets.js +1 -1
  181. package/dist/core/index.js +8 -8
  182. package/dist/core/manifest.js +2 -2
  183. package/dist/core/models.js +1 -1
  184. package/dist/core/publish-manifest.js +4 -2
  185. package/dist/core/ref.js +1 -1
  186. package/dist/core/runtime-assets.js +6 -6
  187. package/dist/core/src/agent-instances.d.ts +5 -0
  188. package/dist/core/src/agent-instances.d.ts.map +1 -1
  189. package/dist/core/src/driver-targets.d.ts.map +1 -1
  190. package/dist/core/src/index.d.ts +1 -1
  191. package/dist/core/src/index.d.ts.map +1 -1
  192. package/dist/core/src/manifest.d.ts +9 -3
  193. package/dist/core/src/manifest.d.ts.map +1 -1
  194. package/dist/core/src/models.d.ts +8 -0
  195. package/dist/core/src/models.d.ts.map +1 -1
  196. package/dist/core/src/publish-manifest.d.ts +38 -1
  197. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  198. package/dist/core/src/repo-manager.d.ts +8 -3
  199. package/dist/core/src/repo-manager.d.ts.map +1 -1
  200. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  201. package/dist/core/src/store.d.ts +4 -0
  202. package/dist/core/src/store.d.ts.map +1 -1
  203. package/dist/core/src/walker.d.ts +2 -0
  204. package/dist/core/src/walker.d.ts.map +1 -1
  205. package/dist/core/src/workspace-config.d.ts +24 -2
  206. package/dist/core/src/workspace-config.d.ts.map +1 -1
  207. package/dist/core/store.js +2 -2
  208. package/dist/core/workspace-config.js +5 -5
  209. package/dist/deploy/index.js +8 -8
  210. package/dist/discovery/index.js +5 -5
  211. package/dist/discovery/src/parse-manifest.d.ts.map +1 -1
  212. package/dist/discovery/src/source-config.d.ts +5 -3
  213. package/dist/discovery/src/source-config.d.ts.map +1 -1
  214. package/dist/{ensure-sources-POMEQSTM.js → ensure-sources-VUKHL65L.js} +18 -18
  215. package/dist/{ensure-sources-POMEQSTM.js.map → ensure-sources-VUKHL65L.js.map} +1 -1
  216. package/dist/factory-assets/README.md +1 -1
  217. package/dist/factory-assets/connectors/box.js +16 -16
  218. package/dist/factory-assets/connectors/deploy.js +16 -16
  219. package/dist/factory-assets/connectors/devserver.js +16 -16
  220. package/dist/factory-assets/connectors/flow/adapter.js +16 -16
  221. package/dist/factory-assets/connectors/flow/engine.js +9 -9
  222. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  223. package/dist/factory-assets/connectors/flow/run-flow.js +18 -18
  224. package/dist/factory-assets/connectors/flow.js +16 -16
  225. package/dist/factory-assets/connectors/git.js +16 -16
  226. package/dist/factory-assets/connectors/gmail.js +16 -16
  227. package/dist/factory-assets/connectors/googledrive.js +16 -16
  228. package/dist/factory-assets/connectors/local.js +16 -16
  229. package/dist/factory-assets/connectors/mattermost.js +16 -16
  230. package/dist/factory-assets/connectors/memory.js +16 -16
  231. package/dist/factory-assets/connectors/minio.js +16 -16
  232. package/dist/factory-assets/connectors/postgres.js +16 -16
  233. package/dist/factory-assets/connectors/s3.js +16 -16
  234. package/dist/factory-assets/connectors/sharepoint.js +16 -16
  235. package/dist/factory-assets/connectors/sqlite.js +16 -16
  236. package/dist/factory-assets/connectors/static-server.js +16 -16
  237. package/dist/factory-assets/connectors/tunnel.js +16 -16
  238. package/dist/factory-assets/connectors/webdav.js +16 -16
  239. package/dist/factory-assets/connectors/xstate-store.js +16 -16
  240. package/dist/factory-assets/connectors/xstate.js +16 -16
  241. package/dist/{flows-DVKMZKM4.js → flows-A4YALSZY.js} +13 -13
  242. package/dist/{flows-DVKMZKM4.js.map → flows-A4YALSZY.js.map} +1 -1
  243. package/dist/{helpers-Y4OT7VIS.js → helpers-53XZW7KF.js} +18 -18
  244. package/dist/{helpers-Y4OT7VIS.js.map → helpers-53XZW7KF.js.map} +1 -1
  245. package/dist/library/index.js +12 -12
  246. package/dist/library/install.js +5 -3
  247. package/dist/library/src/local/local-catalog-source.d.ts +6 -0
  248. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  249. package/dist/library/src/manifest-writer.d.ts +1 -1
  250. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  251. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  252. package/dist/library/src/user-library.d.ts +2 -0
  253. package/dist/library/src/user-library.d.ts.map +1 -1
  254. package/dist/{library-publish-DI4Q5UOG.js → library-publish-FFIPWIRM.js} +28 -25
  255. package/dist/library-publish-FFIPWIRM.js.map +1 -0
  256. package/dist/open-library-PZAT3TJA.js +40 -0
  257. package/dist/{open-library-N6ESO6IK.js.map → open-library-PZAT3TJA.js.map} +1 -1
  258. package/dist/open-registry-W46UXZ3I.js +32 -0
  259. package/dist/{open-registry-CBZ5MWTT.js.map → open-registry-W46UXZ3I.js.map} +1 -1
  260. package/dist/paths-KKY3NSBZ.js +22 -0
  261. package/dist/{paths-U6W6MQNQ.js.map → paths-KKY3NSBZ.js.map} +1 -1
  262. package/dist/{plugin-store-XMZSPVBF.js → plugin-store-CK7YWRIC.js} +62 -20
  263. package/dist/plugin-store-CK7YWRIC.js.map +1 -0
  264. package/dist/plugins/src/catalog-source.d.ts +6 -0
  265. package/dist/plugins/src/catalog-source.d.ts.map +1 -1
  266. package/dist/project-EZUH7PUJ.js +79 -0
  267. package/dist/{project-UP52HEHC.js.map → project-EZUH7PUJ.js.map} +1 -1
  268. package/dist/resolver/index.js +9 -9
  269. package/dist/runner/index.js +29 -29
  270. package/dist/runner/src/agent.d.ts.map +1 -1
  271. package/dist/runner/src/composition/index.d.ts +1 -1
  272. package/dist/runner/src/composition/index.d.ts.map +1 -1
  273. package/dist/runner/src/composition/prompt-sections.d.ts +18 -6
  274. package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -1
  275. package/dist/runner/src/serve.d.ts.map +1 -1
  276. package/dist/runner/src/session-builder.d.ts.map +1 -1
  277. package/dist/runner/src/session.d.ts +2 -0
  278. package/dist/runner/src/session.d.ts.map +1 -1
  279. package/dist/runner/src/ws-auth-warning.d.ts +17 -0
  280. package/dist/runner/src/ws-auth-warning.d.ts.map +1 -0
  281. package/dist/sdk/asset-manager.js +15 -15
  282. package/dist/sdk/bridge.js +13 -13
  283. package/dist/sdk/core.js +8 -8
  284. package/dist/sdk/flow.js +9 -9
  285. package/dist/sdk/index.js +29 -29
  286. package/dist/sdk/resolver.js +9 -9
  287. package/dist/sdk/runner.js +29 -29
  288. package/dist/serve-preflight-F7MYF747.js +64 -0
  289. package/dist/serve-preflight-F7MYF747.js.map +1 -0
  290. package/dist/{setup-5IRUH5OS.js → setup-L632QIHV.js} +23 -23
  291. package/dist/{setup-5IRUH5OS.js.map → setup-L632QIHV.js.map} +1 -1
  292. package/dist/skills-OY3Y5GKA.js +26 -0
  293. package/dist/{skills-HA36RFNM.js.map → skills-OY3Y5GKA.js.map} +1 -1
  294. package/dist/source-36FHMN5V.js +42 -0
  295. package/dist/{source-DX5SGWEI.js.map → source-36FHMN5V.js.map} +1 -1
  296. package/dist/{source-manifest-publish-NMRLXWVW.js → source-manifest-publish-NIXJSJ22.js} +25 -24
  297. package/dist/source-manifest-publish-NIXJSJ22.js.map +1 -0
  298. package/dist/tui/index.js +46 -36
  299. package/dist/tui/index.js.map +1 -1
  300. package/dist/tui/src/repl.d.ts.map +1 -1
  301. package/dist/types/manifests.js +1 -1
  302. package/dist/types/src/lifecycle.d.ts +2 -1
  303. package/dist/types/src/lifecycle.d.ts.map +1 -1
  304. package/dist/types/src/manifests/preset.d.ts +6 -1
  305. package/dist/types/src/manifests/preset.d.ts.map +1 -1
  306. package/dist/workspace-plugin/adapters/mcp.js +23 -23
  307. package/dist/workspace-plugin/adapters/omp.js +14 -14
  308. package/dist/workspace-plugin/index.js +1 -1
  309. package/package.json +1 -1
  310. package/dist/chunk-2X3JBVGD.js.map +0 -1
  311. package/dist/chunk-6VLHITAM.js.map +0 -1
  312. package/dist/chunk-7CR2OZPA.js.map +0 -1
  313. package/dist/chunk-C3BMXXTN.js.map +0 -1
  314. package/dist/chunk-CPSIPIX7.js.map +0 -1
  315. package/dist/chunk-CTP3XBMF.js.map +0 -1
  316. package/dist/chunk-ICIYSJBQ.js.map +0 -1
  317. package/dist/chunk-ID745F3R.js +0 -625
  318. package/dist/chunk-ID745F3R.js.map +0 -1
  319. package/dist/chunk-K4VOEYOR.js +0 -21
  320. package/dist/chunk-K4VOEYOR.js.map +0 -1
  321. package/dist/chunk-N5M2EISA.js.map +0 -1
  322. package/dist/chunk-NJV5SLEK.js.map +0 -1
  323. package/dist/chunk-NR7H7ZJP.js +0 -400
  324. package/dist/chunk-NR7H7ZJP.js.map +0 -1
  325. package/dist/chunk-P23WJCH2.js.map +0 -1
  326. package/dist/chunk-PMECEZK3.js.map +0 -1
  327. package/dist/chunk-PNOGX36L.js.map +0 -1
  328. package/dist/chunk-POQ6PGNE.js.map +0 -1
  329. package/dist/chunk-SHQMPGOL.js.map +0 -1
  330. package/dist/chunk-TVAR4JHA.js.map +0 -1
  331. package/dist/chunk-WI4T3KIS.js.map +0 -1
  332. package/dist/chunk-XTVSNWLL.js.map +0 -1
  333. package/dist/library-publish-DI4Q5UOG.js.map +0 -1
  334. package/dist/open-library-N6ESO6IK.js +0 -40
  335. package/dist/open-registry-CBZ5MWTT.js +0 -32
  336. package/dist/paths-U6W6MQNQ.js +0 -22
  337. package/dist/plugin-store-XMZSPVBF.js.map +0 -1
  338. package/dist/project-UP52HEHC.js +0 -79
  339. package/dist/serve-preflight-6P2JJEJ3.js +0 -47
  340. package/dist/serve-preflight-6P2JJEJ3.js.map +0 -1
  341. package/dist/skills-HA36RFNM.js +0 -26
  342. package/dist/source-DX5SGWEI.js +0 -41
  343. package/dist/source-manifest-publish-NMRLXWVW.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,25 +1,26 @@
1
1
  #!/usr/bin/env node
2
- import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-KVSDRB35.js';
3
- import { makeSourceCommand, syncProjectSources, divergedSourceClones } from '../chunk-WI4T3KIS.js';
4
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportReplaced, reportRelocked, reportMoved, REF_HINT, reportInstalledSoftDeps } from '../chunk-P23WJCH2.js';
2
+ import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-R6QHJEHE.js';
3
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportReplaced, reportRelocked, reportMoved, editedConventionFiles, REF_HINT, reportInstalledSoftDeps } from '../chunk-6GICC4RJ.js';
5
4
  import { createSpinner } from '../chunk-NESV47MF.js';
6
- import { AI_RESOURCES } from '../chunk-SMT3LNAG.js';
7
- import { unresolvedManifestDependencies, warnIgnoredDomainFiles, warnLegacyBundleFiles, removedDomainOption, rejectRemovedDomainOption, resolveLibraryPublisherDetailed, warnLibraryNameFallback, indexLibrary, requireValidPublisherOrExit, exitOnManifestPublisherProblems, registerLibraryAsset, DOMAIN_REMOVED_HINT, checkAsset, agentComposeRefAdvisories, manifestPublisherProblems, manifestRequiresProblems, findAssetManifestFile, declaredVersion, checkAssetFile, duplicateAssetMessage, readAssetBody, checkAgentFiles, invalidSemverText } from '../chunk-ID745F3R.js';
8
- import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, assetEntryRef, manifestVersionMismatchMessage } from '../chunk-NR7H7ZJP.js';
9
- import { storeNotInstallableReason, STORE_UNADDABLE_KINDS } from '../chunk-K4VOEYOR.js';
10
- import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-JQ3DXNQV.js';
11
- import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, requireProjectConfig, deferredWarnings, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-POQ6PGNE.js';
12
- import { getKindRegistry, getKnownKinds } from '../chunk-GWD3QNVS.js';
5
+ import { makeSourceCommand, syncProjectSources, divergedSourceClones } from '../chunk-ZSMMX3JD.js';
6
+ import { AI_RESOURCES } from '../chunk-HWGYJMME.js';
7
+ import { checkAsset, agentComposeRefAdvisories, findAssetManifestFile, declaredVersion, checkAssetFile, duplicateAssetMessage, readAssetBody, checkAgentFiles, invalidSemverText } from '../chunk-PN44DOGP.js';
8
+ import { getStoreConfig, storeFetch, isStoreAuthenticated, getStoreToken } from '../chunk-PZOO7L26.js';
9
+ import { unresolvedManifestDependencies, warnIgnoredDomainFiles, warnLegacyBundleFiles, removedDomainOption, rejectRemovedDomainOption, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, resolveLibraryPublisherDetailed, getStoreIdentity, warnLibraryNameFallback, indexLibrary, requireValidPublisherOrExit, exitOnManifestPublisherProblems, registerLibraryAsset, DOMAIN_REMOVED_HINT, reportLibrarySymlinks, assetEntryRef, manifestPublisherProblems, manifestRequiresProblems, manifestVersionMismatchMessage, exitOnLibrarySymlinks } from '../chunk-FB3NREF7.js';
10
+ import { storeNotInstallableReason } from '../chunk-U27JRO5L.js';
11
+ import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-VLBIME5L.js';
12
+ import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, requireProjectConfig, deferredWarnings, logNoProject, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-PYTTF754.js';
13
+ import { getKindRegistry, getKnownKinds } from '../chunk-4NJ3QQHZ.js';
13
14
  import { LocalSecretsProvider } from '../chunk-ILFGVSTJ.js';
14
- import { runAgentChat, isCompositionError, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition, instanceForSession, resolveAgentInstance, describeComposition, MarkdownStreamer, createFinalTextFallback } from '../chunk-N5M2EISA.js';
15
- import { buildClaudePluginFiles } from '../chunk-YQU2BPQD.js';
16
- import '../chunk-X6LKA3TJ.js';
17
- import '../chunk-HYMERG57.js';
15
+ import { runAgentChat, isCompositionError, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition, instanceForSession, resolveAgentInstance, describeComposition, MarkdownStreamer, createFinalTextFallback, resolveBinding, UnknownCompositionKindError } from '../chunk-HBZD3MIW.js';
16
+ import { buildClaudePluginFiles } from '../chunk-J4DB5G36.js';
17
+ import '../chunk-NDUYFYJB.js';
18
+ import '../chunk-V5JHD4I2.js';
18
19
  import '../chunk-R6O6YWU7.js';
19
- import '../chunk-3HUV2LJF.js';
20
- import '../chunk-QCEKGYHF.js';
20
+ import '../chunk-6JKIOPT3.js';
21
+ import '../chunk-2BIESC6S.js';
21
22
  import '../chunk-4ZTPYIBE.js';
22
- import '../chunk-XZY6SBGU.js';
23
+ import '../chunk-XJYBCDY2.js';
23
24
  import '../chunk-X5YPJV4N.js';
24
25
  import '../chunk-O7SG5PC2.js';
25
26
  import '../chunk-7QBNJTTQ.js';
@@ -28,64 +29,64 @@ import '../chunk-OQ5MKDS3.js';
28
29
  import '../chunk-32NA4TVC.js';
29
30
  import '../chunk-W3UDISS2.js';
30
31
  import '../chunk-PHRNUTSG.js';
31
- import { runFlow, resumeFlow } from '../chunk-2X3JBVGD.js';
32
+ import { runFlow, resumeFlow } from '../chunk-GMDSRSGI.js';
32
33
  import '../chunk-4R6DROGN.js';
33
- import { parseSkillRequirements, validateRequirements, validateFlowVersions } from '../chunk-G3X4MLDB.js';
34
- import '../chunk-DCHQ6BAZ.js';
34
+ import { parseSkillRequirements, validateRequirements, validateFlowVersions } from '../chunk-USHB5KEY.js';
35
+ import '../chunk-ZU24LWBI.js';
35
36
  import '../chunk-ISHJITXJ.js';
36
- import '../chunk-27L6BBAT.js';
37
+ import '../chunk-Y4Z7LGSH.js';
37
38
  import '../chunk-X4BAYGMT.js';
38
- import '../chunk-ICIYSJBQ.js';
39
- import '../chunk-NDF24LYP.js';
40
- import '../chunk-2JFIFDDO.js';
39
+ import '../chunk-5SKVCMRC.js';
40
+ import '../chunk-6NQDDCIL.js';
41
+ import '../chunk-YTZFSKWL.js';
41
42
  import '../chunk-LOO5CB5M.js';
42
43
  import '../chunk-2H73V6XR.js';
43
- import '../chunk-NJXR5OAM.js';
44
+ import '../chunk-B7CZYFB2.js';
44
45
  import '../chunk-B4X2N7JQ.js';
45
46
  import '../chunk-YROR332M.js';
46
- import { listDrivers, getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-MF54ZHWT.js';
47
+ import { listDrivers, getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-BVJU2GKE.js';
47
48
  import '../chunk-6E6PKKAD.js';
48
49
  import '../chunk-IFGTRL2I.js';
49
- import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-7XWUJC3A.js';
50
+ import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-XBYSURMK.js';
50
51
  import '../chunk-LNFKL23K.js';
51
52
  import '../chunk-X3RMRJNR.js';
52
53
  import '../chunk-M3WPBTGJ.js';
53
54
  import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-7RGTAEG6.js';
54
55
  import '../chunk-NUELZWCF.js';
55
56
  import '../chunk-F4NJDSR7.js';
56
- import { AssetManager, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-TVAR4JHA.js';
57
- import { libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, isGitRepo, ensureGitRepo, conflictingAssetRoot, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, missingRootAssets, getStoreManifestsDir, assertValidLibraryName, syncManifestWithDisk, getDefaultValue, isSecretPlaceholder } from '../chunk-C3BMXXTN.js';
58
- import { parseManifestFile, SEMVER_RE } from '../chunk-7CR2OZPA.js';
59
- import '../chunk-UTKENBB6.js';
57
+ import { AssetManager, parseRefTolerant, MissingManifestError, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-Y7WKXPWS.js';
58
+ import { libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, isGitRepo, ensureGitRepo, conflictingAssetRoot, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, missingRootAssets, getStoreManifestsDir, assertValidLibraryName, syncManifestWithDisk, getDefaultValue, isSecretPlaceholder } from '../chunk-DKGEV6SQ.js';
59
+ import { parseManifestFile, SEMVER_RE } from '../chunk-NVO6WECE.js';
60
+ import '../chunk-PXDWTJ3P.js';
60
61
  import '../chunk-H5U7LNTJ.js';
61
62
  import '../chunk-3TXEJN4W.js';
62
- import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-NJV5SLEK.js';
63
+ import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-5FYOM4RF.js';
63
64
  import '../chunk-NOA6EJXE.js';
64
65
  import '../chunk-KTBKW2FI.js';
65
66
  import '../chunk-UQ6LFBPZ.js';
66
- import '../chunk-7QWQTA5S.js';
67
- import { effectiveComposes, validatePreset, composeSlotDiagnostics, agentDeprecationDiagnostics, validateAgent, SLOT_ID_PATTERN } from '../chunk-6VLHITAM.js';
68
- import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, readLock, aiResourceRoots, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-T5TSLSRO.js';
67
+ import '../chunk-4L4R5LV3.js';
68
+ import { effectiveComposes, validatePreset, composeSlotDiagnostics, agentDeprecationDiagnostics, validateAgent, SLOT_ID_PATTERN } from '../chunk-57SF6W6E.js';
69
+ import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, readLock, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, aiResourceRoots, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-BF422IDP.js';
69
70
  import '../chunk-4GY63JU6.js';
70
- import { factoryAssetRoots } from '../chunk-SHQMPGOL.js';
71
- import { deployedDir } from '../chunk-PMECEZK3.js';
71
+ import { resolveRuntimeAssets, factoryAssetRoots } from '../chunk-QO7CR3KB.js';
72
+ import { deployedDir } from '../chunk-D54T2F54.js';
72
73
  import { DEFAULT_DRIVER_ID, DRIVER_DEFAULTS } from '../chunk-5BEFNLOR.js';
73
74
  import { findKindDirs } from '../chunk-A2ULN3KX.js';
74
- import { SourceEntryError, resolveSkWorkspaceConfig, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, decodeSkaileYaml, matchPin, coerceVersion, loadSkWorkspaceConfig, normalizeAgentInstances, agentInstanceDiagnostics, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-PNOGX36L.js';
75
+ import { SourceEntryError, resolveSkWorkspaceConfig, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, decodeSkaileYaml, matchPin, coerceVersion, loadSkWorkspaceConfig, normalizeAgentInstances, agentBlockKeyDiagnostics, agentInstanceDiagnostics, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-L3ZGYSWY.js';
75
76
  import { globalCacheRoot, globalSkaileDir, userConfigPath } from '../chunk-L5VSIPQD.js';
76
- import { SUPPORTED_DRIVER_TARGETS, driverTargetForDriver } from '../chunk-CPSIPIX7.js';
77
- import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-CTP3XBMF.js';
77
+ import { SUPPORTED_DRIVER_TARGETS, driverTargetForDriver } from '../chunk-IG5LZ3WU.js';
78
+ import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-IY5E7Y5W.js';
78
79
  import { pluginTitle } from '../chunk-RVRB27AN.js';
79
- import { dedupeRequirements, parseFrontmatter, scanDirectory, parseRequires } from '../chunk-XTVSNWLL.js';
80
- import { parseAssetRef, isValidPublisher, PUBLISHER_HINT, isValidAssetName, ASSET_NAME_HINT, depToStr, slugifyAssetName, parseAssetRefLoose, assetRefToStr } from '../chunk-PNTXHTBC.js';
80
+ import { dedupeRequirements, parseFrontmatter, scanDirectory, parseRequires } from '../chunk-M3P4BYRK.js';
81
+ import { parseAssetRef, isValidPublisher, PUBLISHER_HINT, isValidAssetName, ASSET_NAME_HINT, depToStr, slugifyAssetName, parseAssetRefLoose, assetRefToStr } from '../chunk-J4OYIYFQ.js';
81
82
  import { portableSpawn, portableSpawnSync } from '../chunk-ICSCSM5D.js';
82
83
  import { openSqlite } from '../chunk-DKXNKFKP.js';
83
84
  import { parseModelRef, resolveEntryBaseUrl } from '../chunk-MJHSLODD.js';
84
85
  import '../chunk-C3CAXQMA.js';
85
86
  import { registerLogStore, LogStore, StdoutSink } from '../chunk-BOFL7GIF.js';
86
87
  import '../chunk-NSBPE2FW.js';
87
- import * as fs8 from 'fs';
88
- import fs8__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
88
+ import * as fs9 from 'fs';
89
+ import fs9__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
89
90
  import * as path22 from 'path';
90
91
  import path22__default, { resolve, join } from 'path';
91
92
  import { fileURLToPath } from 'url';
@@ -147,7 +148,7 @@ function selectStoreRows(matches, query, all) {
147
148
  );
148
149
  if (all) return { shown: ranked, hidden: 0, cut: 0 };
149
150
  const keep = ranked.filter(
150
- (a) => storeNotInstallableReason(a) === void 0 && !STORE_TEST_NAME_RE.test(a.name)
151
+ (a) => storeNotInstallableReason(a) === void 0 && !a.demo && !STORE_TEST_NAME_RE.test(a.name)
151
152
  );
152
153
  return {
153
154
  shown: keep.slice(0, STORE_ROW_LIMIT),
@@ -164,7 +165,7 @@ function storeSelectionNotes(sel, indent) {
164
165
  }
165
166
  if (sel.hidden > 0) {
166
167
  notes.push(
167
- `${indent}${S.dim(`${sel.hidden} store entr${sel.hidden === 1 ? "y" : "ies"} hidden: kinds \`add\` cannot install yet (${[...STORE_UNADDABLE_KINDS].join(", ")}), names that are not valid refs, test/demo entries; --all lists them`)}`
168
+ `${indent}${S.dim(`${sel.hidden} store entr${sel.hidden === 1 ? "y" : "ies"} hidden: names that are not valid refs, demo/internal entries; --all lists them`)}`
168
169
  );
169
170
  }
170
171
  return notes;
@@ -225,7 +226,7 @@ async function runSearch(kind, query, opts) {
225
226
  }
226
227
  }
227
228
  async function searchIndex(query, kind) {
228
- const { openLibrary: openLibrary2 } = await import('../open-library-N6ESO6IK.js');
229
+ const { openLibrary: openLibrary2 } = await import('../open-library-PZAT3TJA.js');
229
230
  const library = await openLibrary2();
230
231
  try {
231
232
  const { libraryDirMissing: libraryDirMissing2 } = await import('../library/index.js');
@@ -376,7 +377,7 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
376
377
  const factory = await searchFactory(projectDir, query, kind);
377
378
  let entries = unionEntries(await searchIndex(query, kind), factory);
378
379
  if (entries.length === 0 && !query && !kind && !airGapped) {
379
- const { autoSyncForSearch } = await import('../source-DX5SGWEI.js');
380
+ const { autoSyncForSearch } = await import('../source-36FHMN5V.js');
380
381
  if (await autoSyncForSearch(projectDir)) {
381
382
  entries = unionEntries(await searchIndex(query, kind), factory);
382
383
  }
@@ -486,17 +487,11 @@ function formatStoreRows(assets, indent, width = terminalWidth()) {
486
487
  });
487
488
  }
488
489
  async function searchStore(query, kind, opts, airGapped) {
489
- if (airGapped) {
490
- if (opts.store) {
491
- logErr(
492
- "air-gapped (catalog.cache_ttl: 0) \u2014 store search is disabled. Set catalog.cache_ttl > 0 to query the store."
493
- );
494
- process.exit(1);
495
- }
490
+ if (airGapped && !opts.store) {
496
491
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
497
492
  return;
498
493
  }
499
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-N6ESO6IK.js');
494
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PZAT3TJA.js');
500
495
  try {
501
496
  const remote = await openCatalogSource2({ projectDir: path22__default.resolve(opts.projectDir) });
502
497
  const assets = await remote.listAssets(kind ? { kind } : {});
@@ -524,9 +519,10 @@ async function searchStore(query, kind, opts, airGapped) {
524
519
  }
525
520
  }
526
521
  async function describeStoreFailure(err2, projectDir) {
527
- const { resolveConfig, describeCatalogError } = await import('../library/index.js');
528
- const url = resolveConfig({ projectDir }).catalog.url;
529
- return `${describeCatalogError(err2, url)}. Check the catalog with \`skaile catalog test\`.`;
522
+ const { resolveConfig, describeCatalogError, CatalogHttpError } = await import('../library/index.js');
523
+ const { catalog } = resolveConfig({ projectDir });
524
+ const framingHint = catalog.framing === "rest" && err2 instanceof CatalogHttpError && (err2.status === 404 || err2.status === 405) ? ` catalog.framing is rest; if this host serves tRPC, set it with \`skaile config set catalog.framing trpc\`.` : "";
525
+ return `${describeCatalogError(err2, catalog.url)}.${framingHint} Check the catalog with \`skaile catalog test\`.`;
530
526
  }
531
527
  function makeSearchCommand() {
532
528
  return new Command("search").description("Search across all repos").argument("[kind]", "Filter by asset kind (a single non-kind argument is the query)").argument("[query]", "Search query").option("--project-dir <path>", "Project directory", process.cwd()).option("--store", "Search only the store").option("--local", "Search only local repos").option(
@@ -623,7 +619,10 @@ function makeAddCommand() {
623
619
  ).option(
624
620
  "--with-soft-deps",
625
621
  "also add the asset's report-only soft (body-link) deps, without prompting"
626
- ).option("--no-soft-deps", "skip the soft-dep prompt entirely (don't add, don't report)").action(async (ref, opts) => {
622
+ ).option("--no-soft-deps", "skip the soft-dep prompt entirely (don't add, don't report)").option(
623
+ "--force",
624
+ "overwrite a deployed folder that no lock entry owns (a hand-made skill of the same name)"
625
+ ).action(async (ref, opts) => {
627
626
  if (opts.withSoftDeps && opts.softDeps === false) {
628
627
  logErr("--with-soft-deps and --no-soft-deps are mutually exclusive.");
629
628
  process.exit(1);
@@ -631,13 +630,17 @@ function makeAddCommand() {
631
630
  const harnesses = parseHarnessFilter(opts.harness);
632
631
  if (!opts.global && harnesses === void 0) requireProjectConfig(opts.projectDir);
633
632
  const warnings = deferredWarnings();
633
+ const collisionKeys = [];
634
634
  const am2 = new AssetManager({
635
635
  registry: getKindRegistry(),
636
636
  projectDir: path22__default.resolve(opts.projectDir),
637
637
  global: opts.global || harnesses !== void 0,
638
638
  harnesses,
639
639
  driverTarget: opts.target,
640
- onLibraryCollision: warnings.push
640
+ onLibraryCollision: (msg) => {
641
+ collisionKeys.push(msg.split(" exists in ")[0]);
642
+ warnings.push(msg);
643
+ }
641
644
  });
642
645
  const spinner = createSpinner();
643
646
  spinner.start(`Adding ${ref}`);
@@ -648,6 +651,7 @@ function makeAddCommand() {
648
651
  const skippedEnv = /* @__PURE__ */ new Set();
649
652
  const added = await am2.add(ref, {
650
653
  link: opts.link,
654
+ force: opts.force,
651
655
  onLibraryOrigin: (deployedRef, library) => libraryOf.set(deployedRef, library),
652
656
  onLibraryMoved: (m) => warnings.push(`${m.ref} moved from ${m.from} to ${m.to}`),
653
657
  onPresets: (expanded) => {
@@ -711,7 +715,11 @@ function makeAddCommand() {
711
715
  }
712
716
  }
713
717
  const addOrigins = await competingOriginsOf(am2, ref);
714
- if (addOrigins) {
718
+ const asked = parseRefTolerant(ref);
719
+ const alreadyWarned = collisionKeys.some(
720
+ (key) => key.startsWith(`${asked?.kind}:`) && key.endsWith(`/${asked?.name}`)
721
+ );
722
+ if (addOrigins && !alreadyWarned) {
715
723
  const [first, ...rest] = addOrigins;
716
724
  logInfo(
717
725
  S.dim(
@@ -807,8 +815,7 @@ function makeListCommand() {
807
815
  try {
808
816
  declared = await am2.listDeclared(kind);
809
817
  } catch (err2) {
810
- if (err2 instanceof MissingManifestError)
811
- logErr(`No ${S.cmd("skaile.yaml")} found. Run ${S.cmd("skaile init")} to create one.`);
818
+ if (err2 instanceof MissingManifestError) logNoProject(opts.projectDir);
812
819
  else logErr(err2 instanceof Error ? err2.message : String(err2));
813
820
  process.exit(1);
814
821
  }
@@ -921,7 +928,7 @@ async function resolveInfoEntry(am2, ref, opts) {
921
928
  return { entry: match ?? deployed };
922
929
  }
923
930
  const lookup = opts.storeLookup ?? (async (filter) => {
924
- const { resolveCatalogSource } = await import('../open-library-N6ESO6IK.js');
931
+ const { resolveCatalogSource } = await import('../open-library-PZAT3TJA.js');
925
932
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
926
933
  try {
927
934
  return await source.listAssets(filter);
@@ -937,7 +944,7 @@ async function resolveInfoEntry(am2, ref, opts) {
937
944
  );
938
945
  return { entry: hit ? catalogAssetToEntry(hit) : null };
939
946
  } catch (err2) {
940
- const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-N6ESO6IK.js');
947
+ const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PZAT3TJA.js');
941
948
  const storeNote = err2 instanceof Error ? err2.message : String(err2);
942
949
  const disabled = err2 instanceof LocalCatalogDisabledError2 || /catalog\.url/i.test(storeNote);
943
950
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -1020,11 +1027,13 @@ function makeDoctorCommand() {
1020
1027
  projectDir: path22__default.resolve(opts.projectDir)
1021
1028
  });
1022
1029
  const { gaps } = await am2.projectState();
1023
- if (gaps.length === 0) {
1030
+ const edited = await editedConventionFiles(path22__default.resolve(opts.projectDir));
1031
+ if (gaps.length === 0 && edited.length === 0) {
1024
1032
  logOk("No missing dependencies.");
1025
1033
  return;
1026
1034
  }
1027
1035
  process.exitCode = 1;
1036
+ for (const e of edited) logErr(e);
1028
1037
  for (const g of gaps) if (g.type !== "requires") logErr(g.message);
1029
1038
  const missing = gaps.filter((g) => g.type === "requires" && g.asset !== void 0);
1030
1039
  if (missing.length === 0) return;
@@ -1054,16 +1063,16 @@ function claudeSkillRoots() {
1054
1063
  }
1055
1064
  function resolveImportSource(nameOrPath) {
1056
1065
  const asPath = path22.resolve(nameOrPath);
1057
- if (fs8.existsSync(asPath)) {
1058
- const dir = fs8.statSync(asPath).isDirectory() ? asPath : path22.dirname(asPath);
1066
+ if (fs9.existsSync(asPath)) {
1067
+ const dir = fs9.statSync(asPath).isDirectory() ? asPath : path22.dirname(asPath);
1059
1068
  const skillFile = path22.join(dir, "SKILL.md");
1060
- if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "path" };
1069
+ if (fs9.existsSync(skillFile)) return { dir, skillFile, via: "path" };
1061
1070
  }
1062
1071
  if (!nameOrPath.includes(path22.sep) && !nameOrPath.startsWith(".")) {
1063
1072
  for (const root of claudeSkillRoots()) {
1064
1073
  const dir = path22.join(root, nameOrPath);
1065
1074
  const skillFile = path22.join(dir, "SKILL.md");
1066
- if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
1075
+ if (fs9.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
1067
1076
  }
1068
1077
  }
1069
1078
  return null;
@@ -1196,7 +1205,13 @@ function makeAssetCommand() {
1196
1205
  process.exit(1);
1197
1206
  }
1198
1207
  exitOnManifestPublisherProblems(target.path, target.name);
1199
- const rawSkill = fs8.readFileSync(src.skillFile, "utf8");
1208
+ if (reportLibrarySymlinks(src.dir, { rootIsAsset: true }) > 0) {
1209
+ logErr(
1210
+ `Not imported: ${src.dir} holds symlinks (listed above). Replace each with a copy of what it points at, or remove it, and run the import again.`
1211
+ );
1212
+ process.exit(1);
1213
+ }
1214
+ const rawSkill = fs9.readFileSync(src.skillFile, "utf8");
1200
1215
  const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
1201
1216
  fallbackName: path22.basename(src.dir),
1202
1217
  version: opts.version,
@@ -1208,7 +1223,7 @@ function makeAssetCommand() {
1208
1223
  );
1209
1224
  }
1210
1225
  const destDir = path22.join(target.path, norm.name);
1211
- if (fs8.existsSync(destDir)) {
1226
+ if (fs9.existsSync(destDir)) {
1212
1227
  logErr(`Destination already exists: ${destDir}`);
1213
1228
  process.exit(1);
1214
1229
  }
@@ -1238,8 +1253,8 @@ function makeAssetCommand() {
1238
1253
  for (const f of checked.advisories) {
1239
1254
  logWarn(`${norm.name}/SKILL.md [${f.tag}] \u2014 ${f.text}`);
1240
1255
  }
1241
- fs8.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
1242
- fs8.writeFileSync(path22.join(destDir, "SKILL.md"), norm.content, "utf8");
1256
+ fs9.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
1257
+ fs9.writeFileSync(path22.join(destDir, "SKILL.md"), norm.content, "utf8");
1243
1258
  for (const note of norm.notes) logInfo(` \u2022 ${note}`);
1244
1259
  const fm = parseFrontmatter(norm.content).data;
1245
1260
  for (const f of checkAgentSkillConformance(fm, { dirName: norm.name })) {
@@ -1279,7 +1294,7 @@ function makeAssetCommand() {
1279
1294
  logErr(`Invalid --mode "${opts.mode}". Expected: copy | move | link.`);
1280
1295
  process.exit(1);
1281
1296
  }
1282
- if (!fs8.existsSync(srcPath)) {
1297
+ if (!fs9.existsSync(srcPath)) {
1283
1298
  logErr(`Source path does not exist: ${srcPath}`);
1284
1299
  process.exit(1);
1285
1300
  }
@@ -1307,21 +1322,27 @@ function makeAssetCommand() {
1307
1322
  }
1308
1323
  const basename3 = path22.basename(srcPath);
1309
1324
  const destDir = target.path;
1310
- fs8.mkdirSync(destDir, { recursive: true });
1325
+ fs9.mkdirSync(destDir, { recursive: true });
1311
1326
  const destPath = path22.join(destDir, basename3);
1312
- if (fs8.existsSync(destPath)) {
1327
+ if (fs9.existsSync(destPath)) {
1313
1328
  logErr(`Destination already exists: ${destPath}`);
1314
1329
  process.exit(1);
1315
1330
  }
1331
+ if (opts.mode === "copy" && reportLibrarySymlinks(srcPath, { rootIsAsset: true }) > 0) {
1332
+ logErr(
1333
+ `Not migrated: ${srcPath} holds symlinks (listed above). Replace each with a copy of what it points at, or remove it, and run the migrate again.`
1334
+ );
1335
+ process.exit(1);
1336
+ }
1316
1337
  switch (opts.mode) {
1317
1338
  case "copy":
1318
- fs8.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
1339
+ fs9.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
1319
1340
  break;
1320
1341
  case "move":
1321
- fs8.renameSync(srcPath, destPath);
1342
+ fs9.renameSync(srcPath, destPath);
1322
1343
  break;
1323
1344
  case "link":
1324
- fs8.symlinkSync(path22.resolve(srcPath), destPath);
1345
+ fs9.symlinkSync(path22.resolve(srcPath), destPath);
1325
1346
  break;
1326
1347
  }
1327
1348
  if (target.backend === "git" && opts.commit) {
@@ -1337,7 +1358,7 @@ function makeAssetCommand() {
1337
1358
  }
1338
1359
  logOk(`Migrated ${basename3} \u2192 ${target.name} (${opts.mode})`);
1339
1360
  const publisher = loadSkPublishManifest(target.path)?.publisher ?? "<publisher>";
1340
- const migratedKind = fs8.existsSync(path22.join(destPath, "SKILL.md")) ? "skill" : "<kind>";
1361
+ const migratedKind = fs9.existsSync(path22.join(destPath, "SKILL.md")) ? "skill" : "<kind>";
1341
1362
  logInfo(
1342
1363
  `Not addable yet: run ${S.cmd(`skaile library index ${target.name}`)}, then ${S.cmd(`skaile add ${migratedKind}:@${publisher.replace(/^@/, "")}/${basename3}`)}`
1343
1364
  );
@@ -1568,7 +1589,11 @@ function makeCatalogCommand() {
1568
1589
  );
1569
1590
  return;
1570
1591
  }
1571
- await runRemoteCatalogProbe(baseUrl, trpcGetUrl(baseUrl, "catalog.listKinds", void 0));
1592
+ await runRemoteCatalogProbe(
1593
+ baseUrl,
1594
+ cfg.catalog.framing,
1595
+ trpcGetUrl(baseUrl, "catalog.listKinds", void 0)
1596
+ );
1572
1597
  });
1573
1598
  catalog.command("info").description("Print the resolved catalog configuration (url, framing, cacheTtlMs)").option("--project-dir <path>", "Project directory (for project-level config overlay)").action(async (opts) => {
1574
1599
  const { resolveConfig } = await import('../library/index.js');
@@ -1581,14 +1606,16 @@ function makeCatalogCommand() {
1581
1606
  return catalog;
1582
1607
  }
1583
1608
  async function runLocalCatalogTest(projectDir) {
1584
- const { resolveCatalogSource } = await import('../open-library-N6ESO6IK.js');
1609
+ const { resolveCatalogSource } = await import('../open-library-PZAT3TJA.js');
1585
1610
  let resolved;
1586
1611
  try {
1587
1612
  resolved = await resolveCatalogSource({ projectDir });
1588
1613
  const sources = await resolved.source.listSources();
1589
1614
  logOk("Catalog mode: local");
1590
1615
  if (sources.length === 0) {
1591
- logInfo("No local sources registered. Run `skaile source add <path>` first.");
1616
+ logInfo(
1617
+ "No local sources registered. Run `skaile library init <name> --path <dir>` first (a git repo: `skaile source add <git-url>`)."
1618
+ );
1592
1619
  } else {
1593
1620
  for (const s of sources) {
1594
1621
  console.log(` ${S.dim("\u2022")} ${s.type} ${S.heading(s.url)}`);
@@ -1609,7 +1636,8 @@ function isTrpcEnvelope(text) {
1609
1636
  return false;
1610
1637
  }
1611
1638
  }
1612
- async function runRemoteCatalogProbe(baseUrl, probeUrl) {
1639
+ async function runRemoteCatalogProbe(baseUrl, framing, trpcProbeUrl) {
1640
+ const probeUrl = framing === "rest" ? `${baseUrl.replace(/\/+$/, "")}/api/catalog/list` : trpcProbeUrl;
1613
1641
  const controller = new AbortController();
1614
1642
  const timeout = setTimeout(() => controller.abort(), 5e3);
1615
1643
  try {
@@ -1620,10 +1648,24 @@ async function runRemoteCatalogProbe(baseUrl, probeUrl) {
1620
1648
  });
1621
1649
  const ms = Date.now() - started;
1622
1650
  if (!res.ok) {
1651
+ if (framing === "rest" && (res.status === 404 || res.status === 405)) {
1652
+ const trpc = await fetch(trpcProbeUrl, {
1653
+ signal: controller.signal,
1654
+ headers: { accept: "application/json" }
1655
+ }).catch(() => null);
1656
+ if (trpc?.ok && isTrpcEnvelope((await trpc.text()).trim())) {
1657
+ logErr(
1658
+ `${baseUrl} serves the tRPC catalog, but catalog.framing is rest (${probeUrl} answered ${res.status}).`
1659
+ );
1660
+ logInfo(`Set it with: skaile config set catalog.framing trpc`);
1661
+ process.exitCode = 1;
1662
+ return;
1663
+ }
1664
+ }
1623
1665
  logErr(`${probeUrl} responded ${res.status} ${res.statusText} (${ms}ms)`);
1624
1666
  if (res.status === 404) {
1625
1667
  logInfo(
1626
- `Got 404 from catalog.listKinds. Check the URL prefix in ${userConfigPath()} \u2014 Skaile mirrors must expose \`/trpc/catalog.*\` at the configured baseUrl.`
1668
+ framing === "rest" ? `Got 404 from /api/catalog/list (catalog.framing is rest). Check the URL prefix in ${userConfigPath()}.` : `Got 404 from catalog.listKinds. Check the URL prefix in ${userConfigPath()} \u2014 Skaile mirrors must expose \`/trpc/catalog.*\` at the configured baseUrl.`
1627
1669
  );
1628
1670
  } else {
1629
1671
  logInfo(
@@ -1634,17 +1676,27 @@ async function runRemoteCatalogProbe(baseUrl, probeUrl) {
1634
1676
  return;
1635
1677
  }
1636
1678
  const text = (await res.text()).trim();
1637
- if (!isTrpcEnvelope(text)) {
1638
- logWarn(
1639
- `Catalog reachable at ${baseUrl} (${ms}ms) but the response is not a valid tRPC envelope.`
1640
- );
1641
- logInfo(
1642
- "The host responded 200 but the body is not Skaile's catalog router shape. Check that `catalog.listKinds` is mounted at the configured baseUrl."
1643
- );
1644
- process.exitCode = 1;
1645
- return;
1679
+ if (framing === "trpc") {
1680
+ if (!isTrpcEnvelope(text)) {
1681
+ logWarn(
1682
+ `Catalog reachable at ${baseUrl} (${ms}ms) but the response is not a valid tRPC envelope.`
1683
+ );
1684
+ logInfo(
1685
+ "The host responded 200 but the body is not Skaile's catalog router shape. Check that `catalog.listKinds` is mounted at the configured baseUrl."
1686
+ );
1687
+ process.exitCode = 1;
1688
+ return;
1689
+ }
1690
+ } else {
1691
+ try {
1692
+ JSON.parse(text);
1693
+ } catch {
1694
+ logWarn(`Catalog reachable at ${baseUrl} (${ms}ms) but /api/catalog/list is not JSON.`);
1695
+ process.exitCode = 1;
1696
+ return;
1697
+ }
1646
1698
  }
1647
- logOk(`Catalog reachable at ${S.heading(baseUrl)} (${ms}ms)`);
1699
+ logOk(`Catalog reachable at ${S.heading(baseUrl)} (${ms}ms, framing ${framing})`);
1648
1700
  } catch (err2) {
1649
1701
  if (err2 instanceof Error && err2.name === "AbortError") {
1650
1702
  logErr(`Timeout reaching ${probeUrl} after 5s`);
@@ -1724,7 +1776,7 @@ async function scanLibraryFlowEntries() {
1724
1776
  const { LocalIndex, resolveIndexPath, scanAuthoringLibraries } = await import('../library/index.js');
1725
1777
  const indexPath = resolveIndexPath();
1726
1778
  if (!existsSync(indexPath)) return entries;
1727
- const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-CBZ5MWTT.js');
1779
+ const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-W46UXZ3I.js');
1728
1780
  const index = new LocalIndex({ indexPath });
1729
1781
  try {
1730
1782
  for (const { assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
@@ -1774,11 +1826,11 @@ function findSkills() {
1774
1826
  return deduped;
1775
1827
  }
1776
1828
  function walkSkills(dir, out) {
1777
- for (const entry of fs8__default.readdirSync(dir, { withFileTypes: true })) {
1829
+ for (const entry of fs9__default.readdirSync(dir, { withFileTypes: true })) {
1778
1830
  const full = path22__default.join(dir, entry.name);
1779
1831
  if (entry.isDirectory()) {
1780
1832
  const skillMd = path22__default.join(full, "SKILL.md");
1781
- if (fs8__default.existsSync(skillMd)) {
1833
+ if (fs9__default.existsSync(skillMd)) {
1782
1834
  out.push({ name: entry.name, path: full, skillPath: skillMd });
1783
1835
  } else {
1784
1836
  walkSkills(full, out);
@@ -1800,9 +1852,9 @@ function resolveFlowIds() {
1800
1852
  }
1801
1853
  function resolveSessionIds(projectDir) {
1802
1854
  const sessionsDir = path22__default.join(projectDir, ".skaile", "sessions");
1803
- if (!fs8__default.existsSync(sessionsDir)) return [];
1855
+ if (!fs9__default.existsSync(sessionsDir)) return [];
1804
1856
  try {
1805
- return fs8__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1857
+ return fs9__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1806
1858
  } catch {
1807
1859
  return [];
1808
1860
  }
@@ -1868,10 +1920,10 @@ async function setCatalogKey(key, raw) {
1868
1920
  process.exit(1);
1869
1921
  }
1870
1922
  const filePath = userConfigPath();
1871
- const fs13 = await import('fs');
1923
+ const fs14 = await import('fs');
1872
1924
  let existing = {};
1873
- if (fs13.existsSync(filePath)) {
1874
- const parsed = parseYaml5(fs13.readFileSync(filePath, "utf-8"));
1925
+ if (fs14.existsSync(filePath)) {
1926
+ const parsed = parseYaml5(fs14.readFileSync(filePath, "utf-8"));
1875
1927
  if (parsed && typeof parsed === "object") existing = parsed;
1876
1928
  }
1877
1929
  const catalog = {
@@ -2728,7 +2780,7 @@ async function ensureTargetsRegistered(projectDir) {
2728
2780
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2729
2781
  const config = resolveSkWorkspaceConfig2(projectDir);
2730
2782
  if (config.plugins && config.plugins.length > 0) {
2731
- const { ensurePluginsLoaded } = await import('../plugin-store-XMZSPVBF.js');
2783
+ const { ensurePluginsLoaded } = await import('../plugin-store-CK7YWRIC.js');
2732
2784
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
2733
2785
  for (const f of result.failed) logWarn(f.error);
2734
2786
  }
@@ -2872,9 +2924,9 @@ function makeDiffCommand() {
2872
2924
  }
2873
2925
  const gaps = await am2.gapsOf(ref);
2874
2926
  const requirementGaps = await am2.requirementGapsOf(ref);
2875
- const blocking = [...gaps.filter((g) => !DIFF_SHOWS[g.type]), ...requirementGaps];
2927
+ const blocking = gaps.filter((g) => !DIFF_SHOWS[g.type]);
2876
2928
  if (blocking.length > 0) {
2877
- for (const g of blocking) logErr(g.message);
2929
+ for (const g of [...blocking, ...requirementGaps]) logErr(g.message);
2878
2930
  process.exitCode = 1;
2879
2931
  return;
2880
2932
  }
@@ -2895,18 +2947,19 @@ function makeDiffCommand() {
2895
2947
  }
2896
2948
  break;
2897
2949
  case "no-files":
2898
- if (problems.length === 0)
2950
+ if (problems.length === 0 && requirementGaps.length === 0)
2899
2951
  logInfo(`${ref}: preset has no files of its own; run skaile diff on its items`);
2900
2952
  break;
2901
2953
  case "identical":
2902
- if (problems.length === 0) logInfo("No differences.");
2954
+ if (problems.length === 0 && requirementGaps.length === 0) logInfo("No differences.");
2903
2955
  break;
2904
2956
  case "differs":
2905
2957
  console.log(result.diff);
2906
2958
  break;
2907
2959
  }
2908
- for (const g of problems) logErr(g.message);
2909
- if (result.status === "not-found" || problems.length > 0) process.exitCode = 1;
2960
+ for (const g of [...problems, ...requirementGaps]) logErr(g.message);
2961
+ if (result.status === "not-found" || problems.length > 0 || requirementGaps.length > 0)
2962
+ process.exitCode = 1;
2910
2963
  });
2911
2964
  }
2912
2965
  function makeFlowCommand() {
@@ -3086,24 +3139,30 @@ async function uninstall(projectDir) {
3086
3139
  const settingsPath = path22__default.join(projectDir, ".claude", "settings.json");
3087
3140
  const mcpPath = mcpFilePath(projectDir);
3088
3141
  const dir = pluginDir(projectDir);
3089
- let changed = false;
3142
+ const rel = (p6) => path22__default.relative(projectDir, p6);
3143
+ const files = [];
3090
3144
  const settings = await readJsonStrict(settingsPath);
3091
3145
  if (settings && Array.isArray(settings.plugins)) {
3092
3146
  const next = settings.plugins.filter((p6) => p6 !== dir);
3093
3147
  if (next.length !== settings.plugins.length) {
3094
- changed = true;
3148
+ files.push(rel(settingsPath));
3095
3149
  const updated = { ...settings, plugins: next };
3096
3150
  if (next.length === 0) delete updated.plugins;
3097
- await writeJson(settingsPath, updated);
3151
+ if (Object.keys(updated).length === 0) await fs5.unlink(settingsPath);
3152
+ else await writeJson(settingsPath, updated);
3098
3153
  }
3099
3154
  }
3100
3155
  if (existsSync(dir)) {
3101
3156
  await fs5.rm(dir, { recursive: true, force: true });
3102
- changed = true;
3157
+ files.push(rel(dir));
3103
3158
  }
3104
- if (await removeSkaileMcpEntry(mcpPath)) changed = true;
3105
- if (await removeSkaileMcpEntry(legacyMcpFilePath(projectDir))) changed = true;
3106
- return { changed };
3159
+ if (await removeSkaileMcpEntry(mcpPath)) files.push(rel(mcpPath));
3160
+ const legacyPath = legacyMcpFilePath(projectDir);
3161
+ if (await removeSkaileMcpEntry(legacyPath)) files.push(rel(legacyPath));
3162
+ for (const emptyDir of [path22__default.dirname(dir), path22__default.join(projectDir, ".claude")]) {
3163
+ await fs5.rmdir(emptyDir).catch(() => void 0);
3164
+ }
3165
+ return { changed: files.length > 0, files };
3107
3166
  }
3108
3167
  async function detectInstall(projectDir) {
3109
3168
  const dir = pluginDir(projectDir);
@@ -3398,13 +3457,18 @@ async function runInstall(opts) {
3398
3457
  if (targets.includes("codex")) {
3399
3458
  exitCode |= await runHarnessStep("codex install", () => installCodex(projectDir));
3400
3459
  }
3401
- if (exitCode === 0) logOk("Plugin installed.");
3460
+ if (exitCode === 0) {
3461
+ await ignorePerMachineFiles(projectDir, targets);
3462
+ logOk("Plugin installed.");
3463
+ }
3402
3464
  return exitCode;
3403
3465
  }
3404
3466
  async function uninstallClaudeCode(projectDir) {
3405
3467
  const r = await uninstall(projectDir);
3406
- if (r.changed) logOk(`Removed skaile entries from ${S.cmd(".claude/")}`);
3407
- else logInfo(`claude-code: not installed`);
3468
+ if (r.changed) {
3469
+ const from = (r.files ?? []).map((f) => S.cmd(f)).join(", ");
3470
+ logOk(`Removed skaile entries from ${from || S.cmd(".claude/")}`);
3471
+ } else logInfo(`claude-code: not installed`);
3408
3472
  }
3409
3473
  async function uninstallOmp(projectDir) {
3410
3474
  const r = await uninstall3(projectDir);
@@ -3432,9 +3496,46 @@ async function runUninstall(opts) {
3432
3496
  if (targets.includes("codex")) {
3433
3497
  exitCode |= await runHarnessStep("codex uninstall", () => uninstallCodex(projectDir));
3434
3498
  }
3435
- if (exitCode === 0) logOk("Plugin uninstalled.");
3499
+ if (exitCode === 0) {
3500
+ await removeEmptyPluginState(projectDir);
3501
+ logOk("Plugin uninstalled.");
3502
+ }
3436
3503
  return exitCode;
3437
3504
  }
3505
+ async function removeEmptyPluginState(projectDir) {
3506
+ const stateFile = path22__default.join(projectDir, ".skaile", "plugin-state.json");
3507
+ try {
3508
+ const parsed = JSON.parse(await fs5.readFile(stateFile, "utf-8"));
3509
+ if (typeof parsed !== "object" || parsed === null || Object.keys(parsed).length > 0) return;
3510
+ await fs5.unlink(stateFile);
3511
+ await fs5.rmdir(path22__default.dirname(stateFile)).catch(() => void 0);
3512
+ } catch {
3513
+ }
3514
+ }
3515
+ var PER_MACHINE_FILES = {
3516
+ "claude-code": [".skaile/plugin-state.json"],
3517
+ omp: [".omp/extensions/skaile.ts", ".skaile/plugin-state.json"],
3518
+ codex: [".codex/config.toml", ".skaile/plugin-state.json"]
3519
+ };
3520
+ async function ignorePerMachineFiles(projectDir, targets) {
3521
+ const gitignore = path22__default.join(projectDir, ".gitignore");
3522
+ let existing = null;
3523
+ try {
3524
+ existing = await fs5.readFile(gitignore, "utf-8");
3525
+ } catch {
3526
+ if (!existsSync(path22__default.join(projectDir, ".git"))) return;
3527
+ }
3528
+ const have = new Set((existing ?? "").split("\n").map((l) => l.trim()));
3529
+ const wanted = [...new Set(targets.flatMap((t) => PER_MACHINE_FILES[t]))];
3530
+ const missing = wanted.filter((f) => !have.has(f));
3531
+ if (missing.length === 0) return;
3532
+ const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
3533
+ await fs5.writeFile(gitignore, `${existing ?? ""}${prefix}${missing.join("\n")}
3534
+ `);
3535
+ logInfo(
3536
+ `Added ${missing.map((f) => S.cmd(f)).join(", ")} to ${S.cmd(".gitignore")} (per machine)`
3537
+ );
3538
+ }
3438
3539
  function checkToggleSupported(targets, requestedAll, action3) {
3439
3540
  if (requestedAll) return null;
3440
3541
  const unsupported = targets.filter((t) => !TOGGLE_SUPPORTED.includes(t));
@@ -3665,13 +3766,14 @@ function unfinishedGitState(dir) {
3665
3766
  for (const [entry, state2] of Object.entries(UNFINISHED_GIT_ENTRIES)) {
3666
3767
  const p6 = spawnSync("git", ["rev-parse", "--git-path", entry], { cwd: dir, encoding: "utf-8" });
3667
3768
  if (p6.status !== 0) return "the git directory could not be read";
3668
- if (fs8.existsSync(path22.resolve(dir, p6.stdout.trim()))) return state2;
3769
+ if (fs9.existsSync(path22.resolve(dir, p6.stdout.trim()))) return state2;
3669
3770
  }
3670
3771
  return null;
3671
3772
  }
3672
3773
  async function reindexLibrary(lib, library, name) {
3673
3774
  assertManifestEditableOrExit(lib.path);
3674
3775
  exitOnManifestPublisherProblems(lib.path, name);
3776
+ exitOnLibrarySymlinks(lib.path, `skaile library index ${name}`);
3675
3777
  const badRequires = manifestRequiresProblems(lib.path);
3676
3778
  const resolved = resolveLibraryPublisherDetailed(lib, {}, getStoreIdentity());
3677
3779
  warnLibraryNameFallback(name, resolved);
@@ -3680,7 +3782,17 @@ async function reindexLibrary(lib, library, name) {
3680
3782
  lib.path,
3681
3783
  resolved.publisher,
3682
3784
  registry,
3683
- { check: (e) => checkAssetFile(e.source, e.kind, registry, lib.path) }
3785
+ {
3786
+ check: (e) => checkAssetFile(
3787
+ e.source,
3788
+ e.kind,
3789
+ registry,
3790
+ lib.path,
3791
+ (f) => logWarn(
3792
+ `${path22.relative(lib.path, e.source)} [${f.tag}] \u2014 body is still the scaffold placeholder; publish refuses it until you write the ${f.tag} prompt`
3793
+ )
3794
+ )
3795
+ }
3684
3796
  );
3685
3797
  const manifest = loadSkPublishManifest(lib.path);
3686
3798
  for (const a of unknownKind) {
@@ -3768,8 +3880,16 @@ async function indexPulledLibrary(lib, library, name) {
3768
3880
  const res = await indexLibrary(lib, library);
3769
3881
  for (const e of res.errors) logWarn(e);
3770
3882
  logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
3883
+ warnUnlistedAssets(await countUnlistedAssets(lib.path), name);
3771
3884
  warnIgnoredDomainFiles(lib.path);
3772
3885
  }
3886
+ function warnUnlistedAssets(unlisted, name) {
3887
+ if (unlisted > 0) {
3888
+ logWarn(
3889
+ `${unlisted} asset(s) on disk are not in the manifest; run \`skaile library index ${name}\`.`
3890
+ );
3891
+ }
3892
+ }
3773
3893
  function assertManifestEditableOrExit(libraryPath) {
3774
3894
  try {
3775
3895
  assertManifestEditable(libraryPath);
@@ -3787,13 +3907,13 @@ function canonicalDir(dir) {
3787
3907
  const abs = path22.resolve(dir);
3788
3908
  const missing = [];
3789
3909
  let existing = abs;
3790
- while (!fs8.existsSync(existing)) {
3910
+ while (!fs9.existsSync(existing)) {
3791
3911
  const parent = path22.dirname(existing);
3792
3912
  if (parent === existing) return abs;
3793
3913
  missing.unshift(path22.basename(existing));
3794
3914
  existing = parent;
3795
3915
  }
3796
- return path22.join(fs8.realpathSync(existing), ...missing);
3916
+ return path22.join(fs9.realpathSync(existing), ...missing);
3797
3917
  }
3798
3918
  function refuseGlobalInstallFolder(name, dir) {
3799
3919
  const reserved = globalInstallDir();
@@ -3839,7 +3959,7 @@ async function refuseNestedLibraryPath(manager, dir, exceptId) {
3839
3959
  function assertCreateDirInsideLibrary(libRoot, destDir, given) {
3840
3960
  const exists = (p6) => {
3841
3961
  try {
3842
- fs8.lstatSync(p6);
3962
+ fs9.lstatSync(p6);
3843
3963
  return true;
3844
3964
  } catch {
3845
3965
  return false;
@@ -3849,12 +3969,12 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
3849
3969
  while (!exists(probe)) probe = path22.dirname(probe);
3850
3970
  let realProbe;
3851
3971
  try {
3852
- realProbe = fs8.realpathSync(probe);
3972
+ realProbe = fs9.realpathSync(probe);
3853
3973
  } catch {
3854
3974
  logErr(`--dir "${given}" passes through a broken symlink (${probe}).`);
3855
3975
  process.exit(1);
3856
3976
  }
3857
- if (!fs8.statSync(realProbe).isDirectory()) {
3977
+ if (!fs9.statSync(realProbe).isDirectory()) {
3858
3978
  logErr(`--dir "${given}": ${probe} is not a directory.`);
3859
3979
  process.exit(1);
3860
3980
  }
@@ -3869,7 +3989,7 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
3869
3989
  }
3870
3990
  }
3871
3991
  function adoptWritesManifest(libPath) {
3872
- if (!fs8.existsSync(path22.join(libPath, SKAILE_MANIFEST_FILENAME))) return true;
3992
+ if (!fs9.existsSync(path22.join(libPath, SKAILE_MANIFEST_FILENAME))) return true;
3873
3993
  const manifest = loadSkPublishManifest(libPath);
3874
3994
  if (!manifest || manifest.source || (manifest.assets ?? []).length > 0) return false;
3875
3995
  return manifestPublisherProblems(libPath).length === 0;
@@ -3927,13 +4047,22 @@ function pruneEmptyLibraryParents(libPath) {
3927
4047
  for (; ; ) {
3928
4048
  const rel = path22.relative(root, canonicalDir(dir));
3929
4049
  if (rel === "" || rel.startsWith("..") || path22.isAbsolute(rel)) return;
3930
- if (!fs8.existsSync(dir) || fs8.readdirSync(dir).length > 0) return;
3931
- fs8.rmdirSync(dir);
4050
+ if (!fs9.existsSync(dir) || fs9.readdirSync(dir).length > 0) return;
4051
+ fs9.rmdirSync(dir);
3932
4052
  dir = path22.dirname(dir);
3933
4053
  }
3934
4054
  }
4055
+ function remoteBranches(url) {
4056
+ const r = spawnSync("git", ["ls-remote", "--heads", url], {
4057
+ encoding: "utf-8",
4058
+ timeout: 2e4,
4059
+ env: { ...process.env, GIT_TERMINAL_PROMPT: "0" }
4060
+ });
4061
+ if (r.status !== 0) return [];
4062
+ return r.stdout.split("\n").map((line) => line.split(" ")[1]?.replace(/^refs\/heads\//, "")).filter((b) => !!b);
4063
+ }
3935
4064
  async function warnIfNotGithubRemote(name, url) {
3936
- const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-DI4Q5UOG.js');
4065
+ const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-FFIPWIRM.js');
3937
4066
  if (!isGithubRemote(url)) logWarn(notGithubRemoteMessage(name, url));
3938
4067
  }
3939
4068
  function scaffoldLibraryFiles(dir, name) {
@@ -3966,8 +4095,8 @@ by the same ref.
3966
4095
  const written = [];
3967
4096
  for (const [file, content] of files) {
3968
4097
  const target = path22.join(dir, file);
3969
- if (fs8.existsSync(target)) continue;
3970
- fs8.writeFileSync(target, content, "utf8");
4098
+ if (fs9.existsSync(target)) continue;
4099
+ fs9.writeFileSync(target, content, "utf8");
3971
4100
  written.push(file);
3972
4101
  }
3973
4102
  return written;
@@ -4057,7 +4186,7 @@ function makeLibraryCommand() {
4057
4186
  const ownership = flagged[0] ?? gone?.ownership ?? "owner";
4058
4187
  const libPath = opts.path ? path22.resolve(opts.path) : path22.join(resolveLibraryDir(), name);
4059
4188
  refuseGlobalInstallFolder(name, libPath);
4060
- if (fs8.existsSync(libPath) && !fs8.statSync(libPath).isDirectory()) {
4189
+ if (fs9.existsSync(libPath) && !fs9.statSync(libPath).isDirectory()) {
4061
4190
  logErr(`${libPath} exists and is not a directory.`);
4062
4191
  process.exit(1);
4063
4192
  }
@@ -4096,9 +4225,9 @@ function makeLibraryCommand() {
4096
4225
  backend = "git";
4097
4226
  backendConfig = { url: adopted.url, branch: adopted.branch, authHint: "ssh" };
4098
4227
  } else {
4099
- fs8.mkdirSync(libPath, { recursive: true });
4228
+ fs9.mkdirSync(libPath, { recursive: true });
4100
4229
  }
4101
- const blank = fs8.readdirSync(libPath).every((entry) => entry === ".git");
4230
+ const blank = fs9.readdirSync(libPath).every((entry) => entry === ".git");
4102
4231
  const isDefault = !hasDefault && ownership !== "reader";
4103
4232
  await manager.addLibrary({
4104
4233
  name,
@@ -4143,11 +4272,7 @@ function makeLibraryCommand() {
4143
4272
  const res = await indexLibrary(lib, library);
4144
4273
  for (const e of res.errors) logWarn(e);
4145
4274
  logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
4146
- if (unlisted > 0) {
4147
- logWarn(
4148
- `${unlisted} asset(s) on disk are not in the manifest; run \`skaile library index ${name}\`.`
4149
- );
4150
- }
4275
+ warnUnlistedAssets(unlisted, name);
4151
4276
  warnIgnoredDomainFiles(libPath);
4152
4277
  }
4153
4278
  } catch (err2) {
@@ -4175,6 +4300,15 @@ function makeLibraryCommand() {
4175
4300
  encoding: "utf-8"
4176
4301
  }) : void 0;
4177
4302
  const branch = opts.branch ?? (head?.status === 0 && head.stdout.trim() || "main");
4303
+ if (opts.branch === void 0) {
4304
+ const theirs = remoteBranches(url);
4305
+ if (theirs.length > 0 && !theirs.includes(branch)) {
4306
+ logErr(
4307
+ `The remote already has ${theirs.length === 1 ? "branch" : "branches"} ${theirs.join(", ")}; pass --branch ${theirs[0]} to track ${theirs.length === 1 ? "it" : "one"}.`
4308
+ );
4309
+ process.exit(1);
4310
+ }
4311
+ }
4178
4312
  ensureGitRepo(lib.path, url, branch);
4179
4313
  trackOriginBranch(lib.path, branch, { fetch: true });
4180
4314
  await manager.updateLibrary(name, {
@@ -4296,11 +4430,11 @@ function makeLibraryCommand() {
4296
4430
  }
4297
4431
  const newPath = path22.join(path22.dirname(lib.path), newName);
4298
4432
  refuseGlobalInstallFolder(newName, newPath);
4299
- if (fs8.existsSync(newPath)) {
4433
+ if (fs9.existsSync(newPath)) {
4300
4434
  logErr(`Target directory already exists: ${newPath}`);
4301
4435
  process.exit(1);
4302
4436
  }
4303
- fs8.renameSync(lib.path, newPath);
4437
+ fs9.renameSync(lib.path, newPath);
4304
4438
  await manager.updateLibrary(lib.id, { name: newName, path: newPath });
4305
4439
  logOk(`Renamed ${lib.name} \u2192 ${newName}`);
4306
4440
  }
@@ -4381,7 +4515,7 @@ function makeLibraryCommand() {
4381
4515
  patch.isDefault = false;
4382
4516
  } else if (field === "path") {
4383
4517
  const dir = path22.resolve(value);
4384
- if (!fs8.existsSync(dir) || !fs8.statSync(dir).isDirectory()) {
4518
+ if (!fs9.existsSync(dir) || !fs9.statSync(dir).isDirectory()) {
4385
4519
  logErr(`Directory does not exist: ${dir}. \`library set path=\` does not move files.`);
4386
4520
  process.exit(1);
4387
4521
  }
@@ -4592,16 +4726,16 @@ function makeLibraryCommand() {
4592
4726
  "With --create-repo: create the repo private (the store only accepts public repos)"
4593
4727
  ).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(
4594
4728
  async (lib, opts) => {
4595
- const { runLibraryPublish } = await import('../library-publish-DI4Q5UOG.js');
4729
+ const { runLibraryPublish } = await import('../library-publish-FFIPWIRM.js');
4596
4730
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
4597
4731
  }
4598
4732
  );
4599
4733
  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) => {
4600
- const { runLibraryRegister } = await import('../library-publish-DI4Q5UOG.js');
4734
+ const { runLibraryRegister } = await import('../library-publish-FFIPWIRM.js');
4601
4735
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
4602
4736
  });
4603
4737
  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) => {
4604
- const { runLibraryYank } = await import('../library-publish-DI4Q5UOG.js');
4738
+ const { runLibraryYank } = await import('../library-publish-FFIPWIRM.js');
4605
4739
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
4606
4740
  });
4607
4741
  return cmd;
@@ -5261,7 +5395,7 @@ function scheduleSoftDepPreview() {
5261
5395
  }
5262
5396
  async function loadAssets() {
5263
5397
  softDepPreviewCache.clear();
5264
- const { gatherAssetFeeds } = await import('../asset-feeds-AM6PSSGM.js');
5398
+ const { gatherAssetFeeds } = await import('../asset-feeds-ALMTHLPV.js');
5265
5399
  const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
5266
5400
  if (notes.length > 0) {
5267
5401
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -5465,7 +5599,7 @@ function reconcileCollapsedSets(rows) {
5465
5599
  async function loadSourcesAndLibraries() {
5466
5600
  try {
5467
5601
  const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
5468
- import('../open-library-N6ESO6IK.js'),
5602
+ import('../open-library-PZAT3TJA.js'),
5469
5603
  import('../core/index.js')
5470
5604
  ]);
5471
5605
  const { manager, library, close } = await openLibraryManager2();
@@ -6706,7 +6840,7 @@ function loadAsset(projectDir, id, ref) {
6706
6840
  const manifestPath = path22__default.join(dir, AGENT_MANIFEST_FILE);
6707
6841
  let text;
6708
6842
  try {
6709
- text = fs8__default.readFileSync(manifestPath, "utf-8");
6843
+ text = fs9__default.readFileSync(manifestPath, "utf-8");
6710
6844
  } catch {
6711
6845
  return {
6712
6846
  diagnostic: err(
@@ -6811,6 +6945,7 @@ function checkAgentInstances(projectDir, parsed) {
6811
6945
  const diagnostics = [];
6812
6946
  const instances = normalizeAgentInstances(parsed.agents, diagnostics);
6813
6947
  const agent = isRecord(parsed.agent) ? parsed.agent : void 0;
6948
+ diagnostics.push(...agentBlockKeyDiagnostics(parsed.agent));
6814
6949
  if (agent?.subagents !== void 0) {
6815
6950
  diagnostics.push(
6816
6951
  err(
@@ -6885,7 +7020,7 @@ function findManifestCandidates(rootPath) {
6885
7020
  function walk(dir) {
6886
7021
  let entries;
6887
7022
  try {
6888
- entries = fs8__default.readdirSync(dir, { withFileTypes: true });
7023
+ entries = fs9__default.readdirSync(dir, { withFileTypes: true });
6889
7024
  } catch {
6890
7025
  return;
6891
7026
  }
@@ -6907,7 +7042,7 @@ function findManifestCandidates(rootPath) {
6907
7042
  return candidates;
6908
7043
  }
6909
7044
  function parseManifestCandidate(c, absRoot) {
6910
- const content = fs8__default.readFileSync(c.filePath, "utf-8");
7045
+ const content = fs9__default.readFileSync(c.filePath, "utf-8");
6911
7046
  const res = parseManifestFile(c.filePath, content);
6912
7047
  if (!res.ok) {
6913
7048
  logErr(`${path22__default.relative(absRoot, c.filePath)} [${c.kind}] \u2014 parse error: ${res.reason}`);
@@ -6927,21 +7062,36 @@ function checkComposeKinds(parsed, registry) {
6927
7062
  const diagnostics = [];
6928
7063
  composes.forEach((item, i) => {
6929
7064
  if (item === null || typeof item !== "object") return;
6930
- const kind = item.kind;
7065
+ const fields = item;
7066
+ const kind = fields.kind;
6931
7067
  if (typeof kind !== "string") return;
6932
- if (PSEUDO_COMPOSE_KINDS.has(kind) || registry.getProvider(kind)) return;
6933
- diagnostics.push({
6934
- code: "unknown_asset_kind",
6935
- severity: "error",
6936
- message: `composes item kind "${kind}" is not a registered asset kind (registered: ${registry.getAllKinds().join(", ")})`,
6937
- path: `composes[${i}].kind`
6938
- });
7068
+ if (!PSEUDO_COMPOSE_KINDS.has(kind) && !registry.getProvider(kind)) {
7069
+ diagnostics.push({
7070
+ code: "unknown_asset_kind",
7071
+ severity: "error",
7072
+ message: `composes item kind "${kind}" is not a registered asset kind (registered: ${registry.getAllKinds().join(", ")})`,
7073
+ path: `composes[${i}].kind`
7074
+ });
7075
+ return;
7076
+ }
7077
+ if (fields.binding !== void 0 || typeof fields.ref !== "string") return;
7078
+ try {
7079
+ resolveBinding({ kind, ref: fields.ref });
7080
+ } catch (err2) {
7081
+ if (!(err2 instanceof UnknownCompositionKindError)) throw err2;
7082
+ diagnostics.push({
7083
+ code: "unknown_asset_kind",
7084
+ severity: "error",
7085
+ message: `composes item "${fields.ref}" of kind "${kind}" has no default binding; set \`binding:\` (the session build fails without it)`,
7086
+ path: `composes[${i}].binding`
7087
+ });
7088
+ }
6939
7089
  });
6940
7090
  return diagnostics;
6941
7091
  }
6942
7092
  function libraryRootOf(absRoot) {
6943
7093
  for (let dir = absRoot; ; dir = path22__default.dirname(dir)) {
6944
- if (fs8__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
7094
+ if (fs9__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
6945
7095
  if (path22__default.dirname(dir) === dir) return absRoot;
6946
7096
  }
6947
7097
  }
@@ -6956,7 +7106,8 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
6956
7106
  body,
6957
7107
  dirName,
6958
7108
  registry,
6959
- fs8__default.readFileSync(c.filePath, "utf-8")
7109
+ fs9__default.readFileSync(c.filePath, "utf-8"),
7110
+ path22__default.basename(c.filePath)
6960
7111
  );
6961
7112
  for (const f of checked.errors) {
6962
7113
  logErr(`${relPath} [${f.tag}] \u2014 ${f.text}`);
@@ -6964,7 +7115,7 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
6964
7115
  }
6965
7116
  for (const f of checked.advisories) {
6966
7117
  const line = `${relPath} [${f.tag}] \u2014 ${f.text}`;
6967
- if (f.conformance && strictConformance) {
7118
+ if (f.conformance && strictConformance || f.scaffoldBody) {
6968
7119
  logErr(line);
6969
7120
  errors++;
6970
7121
  } else {
@@ -7000,15 +7151,33 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
7000
7151
  }
7001
7152
  return { errors, warnings };
7002
7153
  }
7154
+ function scanIdentities(root) {
7155
+ const identities = /* @__PURE__ */ new Set();
7156
+ for (const c of findManifestCandidates(root)) {
7157
+ let parsed;
7158
+ try {
7159
+ const res = parseManifestFile(c.filePath, fs9__default.readFileSync(c.filePath, "utf-8"));
7160
+ if (!res.ok) continue;
7161
+ parsed = res.data;
7162
+ } catch {
7163
+ continue;
7164
+ }
7165
+ if (parsed === null || typeof parsed !== "object") continue;
7166
+ const identity = parsed[c.kind === "flow" ? "id" : "name"];
7167
+ if (typeof identity === "string" && identity.length > 0)
7168
+ identities.add(`${c.kind}:${identity}`);
7169
+ }
7170
+ return identities;
7171
+ }
7003
7172
  function validateManifests(rootPath, strictConformance) {
7004
7173
  const absRoot = path22__default.resolve(rootPath);
7005
- if (!fs8__default.existsSync(absRoot)) {
7174
+ if (!fs9__default.existsSync(absRoot)) {
7006
7175
  logErr(`Path does not exist: ${absRoot}`);
7007
7176
  return { total: 0, errors: 1, warnings: 0 };
7008
7177
  }
7009
7178
  const registry = getKindRegistry();
7010
7179
  const candidates = findManifestCandidates(absRoot);
7011
- let errors = 0;
7180
+ let errors = reportLibrarySymlinks(absRoot);
7012
7181
  let warnings = 0;
7013
7182
  const seenIdentity = /* @__PURE__ */ new Map();
7014
7183
  const agentsToResolve = [];
@@ -7050,8 +7219,10 @@ function validateManifests(rootPath, strictConformance) {
7050
7219
  }
7051
7220
  }
7052
7221
  }
7053
- const libraryPublisher = loadSkPublishManifest(libraryRootOf(absRoot))?.publisher;
7054
- const hasAsset = (kind, name) => seenIdentity.has(`${kind}:${name}`);
7222
+ const libraryRoot = libraryRootOf(absRoot);
7223
+ const libraryPublisher = loadSkPublishManifest(libraryRoot)?.publisher;
7224
+ const siblingIdentities = libraryRoot === absRoot ? /* @__PURE__ */ new Set() : scanIdentities(libraryRoot);
7225
+ const hasAsset = (kind, name) => seenIdentity.has(`${kind}:${name}`) || siblingIdentities.has(`${kind}:${name}`);
7055
7226
  for (const agent of agentsToResolve) {
7056
7227
  for (const f of agentComposeRefAdvisories(agent.parsed, hasAsset, libraryPublisher)) {
7057
7228
  logWarn(`${agent.relPath} [${f.tag}] \u2014 ${f.text}`);
@@ -7065,7 +7236,7 @@ function findWorkspaceManifests(rootPath) {
7065
7236
  function walk(dir) {
7066
7237
  let entries;
7067
7238
  try {
7068
- entries = fs8__default.readdirSync(dir, { withFileTypes: true });
7239
+ entries = fs9__default.readdirSync(dir, { withFileTypes: true });
7069
7240
  } catch {
7070
7241
  return;
7071
7242
  }
@@ -7132,7 +7303,7 @@ function validateWorkspaceAssets(parsed, relPath) {
7132
7303
  }
7133
7304
  return errors;
7134
7305
  }
7135
- function validateWorkspaceManifests(rootPath) {
7306
+ async function validateWorkspaceManifests(rootPath) {
7136
7307
  const absRoot = path22__default.resolve(rootPath);
7137
7308
  const files = findWorkspaceManifests(absRoot);
7138
7309
  let errors = 0;
@@ -7140,7 +7311,7 @@ function validateWorkspaceManifests(rootPath) {
7140
7311
  const relPath = path22__default.relative(absRoot, file);
7141
7312
  let parsed;
7142
7313
  try {
7143
- parsed = parse(fs8__default.readFileSync(file, "utf-8")) ?? {};
7314
+ parsed = parse(fs9__default.readFileSync(file, "utf-8")) ?? {};
7144
7315
  } catch (e) {
7145
7316
  logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
7146
7317
  errors++;
@@ -7157,11 +7328,22 @@ function validateWorkspaceManifests(rootPath) {
7157
7328
  logWarn(line);
7158
7329
  }
7159
7330
  }
7160
- for (const d of decodeSkaileYaml(fs8__default.readFileSync(file, "utf-8")).diagnostics) {
7331
+ const decoded = decodeSkaileYaml(fs9__default.readFileSync(file, "utf-8"));
7332
+ for (const d of decoded.diagnostics) {
7161
7333
  if (d.code !== "connector_missing_driver") continue;
7162
7334
  logErr(`${relPath} [connectors] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`);
7163
7335
  errors++;
7164
7336
  }
7337
+ if ((decoded.config?.connectors ?? []).length > 0) {
7338
+ const assets = await resolveRuntimeAssets(path22__default.dirname(file));
7339
+ if (!assets.warnings.some((w) => w.code === "repo_unavailable")) {
7340
+ for (const w of assets.warnings) {
7341
+ if (w.code !== "missing_driver" || !w.name) continue;
7342
+ logErr(`${relPath} [connectors] \u2014 ${w.code}: ${w.message}`);
7343
+ errors++;
7344
+ }
7345
+ }
7346
+ }
7165
7347
  }
7166
7348
  return { total: files.length, errors };
7167
7349
  }
@@ -7209,7 +7391,7 @@ function validatePublishManifestVersions(rootPath) {
7209
7391
  if (!a.root || a.source || !a.version) continue;
7210
7392
  const file = findAssetManifestFile(path22__default.join(absRoot, a.root), a.kind, a.name);
7211
7393
  if (!file) continue;
7212
- const res = parseManifestFile(file, fs8__default.readFileSync(file, "utf-8"));
7394
+ const res = parseManifestFile(file, fs9__default.readFileSync(file, "utf-8"));
7213
7395
  if (!res.ok) continue;
7214
7396
  const fileVersion = declaredVersion(res.data);
7215
7397
  if (fileVersion === void 0 || fileVersion === a.version) continue;
@@ -7236,7 +7418,7 @@ function validatePublishManifestPublishers(rootPath) {
7236
7418
  if (!a.root || a.source || !resolved) continue;
7237
7419
  const file = findAssetManifestFile(path22__default.join(absRoot, a.root), a.kind, a.name);
7238
7420
  if (!file) continue;
7239
- const res = parseManifestFile(file, fs8__default.readFileSync(file, "utf-8"));
7421
+ const res = parseManifestFile(file, fs9__default.readFileSync(file, "utf-8"));
7240
7422
  if (!res.ok) continue;
7241
7423
  const meta = res.data.metadata;
7242
7424
  const declared = meta !== null && typeof meta === "object" ? meta.publisher : null;
@@ -7268,7 +7450,7 @@ function readAssetVersion(c) {
7268
7450
  const kind = c.kind;
7269
7451
  const fileName = path22__default.basename(c.filePath);
7270
7452
  const dirName = path22__default.basename(path22__default.dirname(c.filePath));
7271
- const content = fs8__default.readFileSync(c.filePath, "utf-8");
7453
+ const content = fs9__default.readFileSync(c.filePath, "utf-8");
7272
7454
  if (c.filePath.endsWith(".md")) {
7273
7455
  const res = parseManifestFile(c.filePath, content);
7274
7456
  const data = res.ok ? res.data : {};
@@ -7301,7 +7483,7 @@ function readAssetVersion(c) {
7301
7483
  };
7302
7484
  }
7303
7485
  function collectAssetVersions(root) {
7304
- if (!fs8__default.existsSync(root)) return [];
7486
+ if (!fs9__default.existsSync(root)) return [];
7305
7487
  const assets = [];
7306
7488
  for (const c of findManifestCandidates(root)) {
7307
7489
  if (!VERSIONED_KINDS[c.kind]) continue;
@@ -7318,7 +7500,7 @@ function findChangelogUnit(assetRelPath, root) {
7318
7500
  let dir = path22__default.posix.dirname(toPosix(assetRelPath));
7319
7501
  for (; ; ) {
7320
7502
  const candidate = dir === "." ? "CHANGELOG.md" : `${dir}/CHANGELOG.md`;
7321
- if (fs8__default.existsSync(path22__default.join(root, candidate))) return candidate;
7503
+ if (fs9__default.existsSync(path22__default.join(root, candidate))) return candidate;
7322
7504
  if (dir === ".") return null;
7323
7505
  dir = path22__default.posix.dirname(dir);
7324
7506
  }
@@ -7422,14 +7604,14 @@ function checkFlowVersionPins(assets, root) {
7422
7604
  function resolveCheckRoot(pathArg) {
7423
7605
  if (pathArg) {
7424
7606
  const abs = path22__default.resolve(pathArg);
7425
- if (!fs8__default.existsSync(abs)) {
7607
+ if (!fs9__default.existsSync(abs)) {
7426
7608
  logErr(`Path does not exist: ${abs}`);
7427
7609
  return null;
7428
7610
  }
7429
7611
  return abs;
7430
7612
  }
7431
7613
  for (let dir = process.cwd(); ; dir = path22__default.dirname(dir)) {
7432
- if (fs8__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
7614
+ if (fs9__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
7433
7615
  if (path22__default.dirname(dir) === dir) return AI_RESOURCES;
7434
7616
  }
7435
7617
  }
@@ -7544,7 +7726,7 @@ function makeValidateCommand() {
7544
7726
  absPath,
7545
7727
  opts.strictConformance ?? false
7546
7728
  );
7547
- const ws = validateWorkspaceManifests(absPath);
7729
+ const ws = await validateWorkspaceManifests(absPath);
7548
7730
  const rootErrors = validatePublishManifestRoots(absPath);
7549
7731
  const slugErrors = validatePublishManifestPublisherSlugs(absPath);
7550
7732
  const parseErrors = validatePublishManifestParses(absPath);
@@ -9237,7 +9419,7 @@ function action2(fn) {
9237
9419
  };
9238
9420
  }
9239
9421
  async function reconcileAndReport(projectDir, plugins, opts = {}) {
9240
- const { reconcilePlugins } = await import('../plugin-store-XMZSPVBF.js');
9422
+ const { reconcilePlugins } = await import('../plugin-store-CK7YWRIC.js');
9241
9423
  if (plugins.length === 0) {
9242
9424
  logInfo("No plugins declared \u2014 nothing to reconcile.");
9243
9425
  return;
@@ -9252,7 +9434,7 @@ async function reconcileAndReport(projectDir, plugins, opts = {}) {
9252
9434
  }
9253
9435
  }
9254
9436
  async function verifyPluginLoads(projectDir, spec) {
9255
- const { loadPlugins } = await import('../plugin-store-XMZSPVBF.js');
9437
+ const { loadPlugins } = await import('../plugin-store-CK7YWRIC.js');
9256
9438
  const { createPluginRegistry } = await import('../plugin-registry/index.js');
9257
9439
  const registry = createPluginRegistry();
9258
9440
  const result = await loadPlugins(projectDir, [spec], registry);
@@ -9266,10 +9448,11 @@ async function verifyPluginLoads(projectDir, spec) {
9266
9448
  async function runInstall2(spec, opts) {
9267
9449
  const projectDir = path22__default.resolve(opts.projectDir);
9268
9450
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
9269
- const { specName } = await import('../plugin-store-XMZSPVBF.js');
9451
+ const { specName, rollbackPluginStore } = await import('../plugin-store-CK7YWRIC.js');
9270
9452
  const yamlPath = path22__default.join(projectDir, "skaile.yaml");
9271
9453
  const original = existsSync(yamlPath) ? readFileSync(yamlPath, "utf8") : void 0;
9272
9454
  const editor = WorkspaceYamlEditor2.load(yamlPath);
9455
+ const previousPlugins = [...editor.getPlugins()];
9273
9456
  const replaced = editor.addPlugin(spec, specName);
9274
9457
  editor.save();
9275
9458
  if (replaced) logOk(`Updated ${S.cmd(specName(spec))} \u2192 ${S.cmd(spec)} in skaile.yaml`);
@@ -9285,13 +9468,14 @@ async function runInstall2(spec, opts) {
9285
9468
  rmSync(yamlPath, { force: true });
9286
9469
  logInfo("skaile.yaml removed; the plugin was not recorded.");
9287
9470
  }
9471
+ await rollbackPluginStore(projectDir, previousPlugins);
9288
9472
  throw err2;
9289
9473
  }
9290
9474
  }
9291
9475
  async function runRemove(name, opts) {
9292
9476
  const projectDir = path22__default.resolve(opts.projectDir);
9293
9477
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
9294
- const { specName } = await import('../plugin-store-XMZSPVBF.js');
9478
+ const { specName } = await import('../plugin-store-CK7YWRIC.js');
9295
9479
  const yamlPath = path22__default.join(projectDir, "skaile.yaml");
9296
9480
  const editor = WorkspaceYamlEditor2.load(yamlPath);
9297
9481
  const removed = editor.removePlugin(name, specName);
@@ -9319,7 +9503,7 @@ async function runList(opts) {
9319
9503
  const registry = createPluginRegistry();
9320
9504
  if (declared.length > 0) {
9321
9505
  try {
9322
- const { loadPlugins } = await import('../plugin-store-XMZSPVBF.js');
9506
+ const { loadPlugins } = await import('../plugin-store-CK7YWRIC.js');
9323
9507
  const result = await loadPlugins(projectDir, declared, registry);
9324
9508
  for (const f of result.failed) logWarn(f.error);
9325
9509
  } catch (err2) {
@@ -9393,9 +9577,11 @@ function presetItemsToWorkspace(preset, values) {
9393
9577
  dependencies.push(ref);
9394
9578
  }
9395
9579
  }
9396
- const sources = (preset.sources ?? []).map(
9397
- (s) => s.pin ? { url: s.url, pin: s.pin } : { url: s.url }
9398
- );
9580
+ const sources = (preset.sources ?? []).map((s) => ({
9581
+ url: s.url,
9582
+ ...s.pin ? { pin: s.pin } : {},
9583
+ ...s.publisher ? { publisher: s.publisher } : {}
9584
+ }));
9399
9585
  return { dependencies, connectors, mcpServers, sources, envVarsToSet: [...envVarsToSet] };
9400
9586
  }
9401
9587
  function resolveItemConfig(item, preset, values, envVarsToSet) {
@@ -10150,13 +10336,23 @@ function friendlyDriverError(err2) {
10150
10336
  return `${base}
10151
10337
  Try a different harness with \`--driver claude-sdk\`.`;
10152
10338
  }
10339
+ function driverErrorNotes(err2) {
10340
+ const e = err2;
10341
+ const notes = [];
10342
+ const category = e?.category ?? e?.detail?.category;
10343
+ const hint = e?.hint ?? e?.detail?.hint;
10344
+ if (hint && category !== "config") notes.push(hint);
10345
+ else if (category === "auth") notes.push("Check your API key or login.");
10346
+ notes.push("Full records: .skaile/logs.db (skaile session logs <session-id>).");
10347
+ return notes;
10348
+ }
10153
10349
 
10154
10350
  // cli/src/commands/run.ts
10155
10351
  function resolveSingleShotAgentDir(projectDir, agentDefinition) {
10156
10352
  if (!agentDefinition) return resolveAgentDir(projectDir);
10157
10353
  const asPath = agentDefinition.endsWith("agent.yaml") ? path22__default.dirname(path22__default.resolve(projectDir, agentDefinition)) : agentDefinition;
10158
10354
  const dir = resolveAgentDefinitionDir(projectDir, asPath);
10159
- if (!dir || !fs8__default.existsSync(path22__default.join(dir, "agent.yaml"))) {
10355
+ if (!dir || !fs9__default.existsSync(path22__default.join(dir, "agent.yaml"))) {
10160
10356
  throw new Error(
10161
10357
  `--agent-definition "${agentDefinition}" does not resolve to an agent directory with agent.yaml${dir ? ` (looked in ${dir})` : ""}`
10162
10358
  );
@@ -10211,11 +10407,11 @@ async function findSkillFile(projectDir, skill) {
10211
10407
  const name = skill.trim().replace(/^skill:/, "").replace(/^@[^/]+\//, "").replace(/#.*$/, "");
10212
10408
  for (const target of SUPPORTED_DRIVER_TARGETS) {
10213
10409
  const file = path22__default.join(deployedDir("skill", name, target, false, projectDir), "SKILL.md");
10214
- if (fs8__default.existsSync(file)) return file;
10410
+ if (fs9__default.existsSync(file)) return file;
10215
10411
  }
10216
10412
  const am2 = new AssetManager({ registry: getKindRegistry(), projectDir });
10217
10413
  const entry = await am2.info(`skill:${name}`);
10218
- return entry?.source && fs8__default.existsSync(entry.source) ? entry.source : void 0;
10414
+ return entry?.source && fs9__default.existsSync(entry.source) ? entry.source : void 0;
10219
10415
  }
10220
10416
  async function printSkillDryRun(projectDir, skill) {
10221
10417
  const file = await findSkillFile(projectDir, skill);
@@ -10225,7 +10421,7 @@ async function printSkillDryRun(projectDir, skill) {
10225
10421
  );
10226
10422
  return false;
10227
10423
  }
10228
- const content = fs8__default.readFileSync(file, "utf-8");
10424
+ const content = fs9__default.readFileSync(file, "utf-8");
10229
10425
  const { data } = parseFrontmatter(content);
10230
10426
  const meta = data.metadata ?? {};
10231
10427
  console.log(` ${S.label("Skill:")} ${S.heading(String(data.name ?? skill))}`);
@@ -10296,7 +10492,11 @@ function logAgentRunEvent(event) {
10296
10492
  return;
10297
10493
  }
10298
10494
  const verdict = e.error ? `${e.runStatus ?? "failed"}: ${e.error.code} ${e.error.message}` : e.runStatus ?? "finished";
10299
- console.error(` ${S.dim("subagent")} ${who} ${verdict} output=${JSON.stringify(e.output)}`);
10495
+ console.error(` ${S.dim("subagent")} ${who} ${verdict}${subagentOutputSuffix(e)}`);
10496
+ }
10497
+ function subagentOutputSuffix(e) {
10498
+ const value = e.result !== void 0 ? e.result : e.output;
10499
+ return value === void 0 ? "" : ` output=${JSON.stringify(value)}`;
10300
10500
  }
10301
10501
  function editDistance2(a, b) {
10302
10502
  let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
@@ -10414,6 +10614,7 @@ function makeRunCommand() {
10414
10614
  logErr(friendly);
10415
10615
  } else {
10416
10616
  logErr(err2 instanceof Error ? err2.message : String(err2));
10617
+ for (const note of driverErrorNotes(err2)) console.error(` ${S.dim(note)}`);
10417
10618
  }
10418
10619
  process.exit(1);
10419
10620
  }
@@ -10496,6 +10697,7 @@ function makeStatusCommand() {
10496
10697
  console.log(` ${S.label("Run ID:")} ${session.runId.slice(0, 8)}`);
10497
10698
  if (session.label) console.log(` ${S.label("Label:")} ${session.label}`);
10498
10699
  console.log(` ${S.label("Status:")} ${statusColor(session.status ?? "unknown")}`);
10700
+ if (session.error) console.log(` ${S.label("Error:")} ${session.error}`);
10499
10701
  console.log(
10500
10702
  ` ${S.label("Driver:")} ${session.driver}${session.model ? S.dim(` / ${session.model}`) : ""}`
10501
10703
  );
@@ -10546,13 +10748,13 @@ function makeReplCommand() {
10546
10748
  p4.cancel("Cancelled.");
10547
10749
  process.exit(0);
10548
10750
  }
10549
- const tmpDir = fs8__default.mkdtempSync(path22__default.join(os2.tmpdir(), "skaile-repl-"));
10751
+ const tmpDir = fs9__default.mkdtempSync(path22__default.join(os2.tmpdir(), "skaile-repl-"));
10550
10752
  projectDir = tmpDir;
10551
10753
  agentCwd = userCwd;
10552
10754
  logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
10553
10755
  if (!driverOverride) {
10554
10756
  const claudeDir = path22__default.join(os2.homedir(), ".claude");
10555
- if (fs8__default.existsSync(claudeDir)) {
10757
+ if (fs9__default.existsSync(claudeDir)) {
10556
10758
  driverOverride = "claude-sdk";
10557
10759
  logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} harness`);
10558
10760
  } else {
@@ -10612,10 +10814,10 @@ function makeServeCommand() {
10612
10814
  await ensurePluginsLoadedForServe(opts.projectDir);
10613
10815
  }
10614
10816
  const providers = parseProviderIds(opts.providers);
10615
- const { checkDriverSdk } = await import('../serve-preflight-6P2JJEJ3.js');
10817
+ const { checkDriverSdk } = await import('../serve-preflight-F7MYF747.js');
10616
10818
  const driverProblem = managedCodex ? null : await checkDriverSdk(opts.projectDir, opts.driver);
10617
10819
  if (driverProblem) {
10618
- const { logErr: logErr2 } = await import('../helpers-Y4OT7VIS.js');
10820
+ const { logErr: logErr2 } = await import('../helpers-53XZW7KF.js');
10619
10821
  logErr2(driverProblem);
10620
10822
  process.exitCode = 1;
10621
10823
  return;
@@ -10640,20 +10842,20 @@ function makeServeCommand() {
10640
10842
  });
10641
10843
  } catch (err2) {
10642
10844
  if (err2?.code !== "EADDRINUSE") throw err2;
10643
- const { logErr: logErr2 } = await import('../helpers-Y4OT7VIS.js');
10845
+ const { logErr: logErr2 } = await import('../helpers-53XZW7KF.js');
10644
10846
  logErr2(err2.message);
10645
- process.exitCode = 1;
10847
+ process.exit(1);
10646
10848
  }
10647
10849
  }
10648
10850
  );
10649
10851
  }
10650
10852
  async function ensurePluginsLoadedForServe(projectDir) {
10651
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-Y4OT7VIS.js');
10853
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-53XZW7KF.js');
10652
10854
  try {
10653
10855
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
10654
10856
  const config = resolveSkWorkspaceConfig2(projectDir);
10655
10857
  if (!config.plugins || config.plugins.length === 0) return;
10656
- const { ensurePluginsLoaded } = await import('../plugin-store-XMZSPVBF.js');
10858
+ const { ensurePluginsLoaded } = await import('../plugin-store-CK7YWRIC.js');
10657
10859
  const { pluginRegistry } = await import('../plugin-registry/index.js');
10658
10860
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
10659
10861
  if (result.loaded.length > 0) {
@@ -10667,14 +10869,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
10667
10869
  }
10668
10870
  }
10669
10871
  async function runCompileTest(opts) {
10670
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-Y4OT7VIS.js');
10872
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-53XZW7KF.js');
10671
10873
  const { tmpdir } = await import('os');
10672
10874
  const { dirname: dirname3, join: join7, resolve: resolve5 } = await import('path');
10673
10875
  const { fileURLToPath: fileURLToPath2 } = await import('url');
10674
- const { unlinkSync, existsSync: existsSync20 } = await import('fs');
10876
+ const { unlinkSync, existsSync: existsSync21 } = await import('fs');
10675
10877
  const { spawn } = await import('child_process');
10676
10878
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
10677
- const { MONOREPO_ROOT } = await import('../paths-U6W6MQNQ.js');
10879
+ const { MONOREPO_ROOT } = await import('../paths-KKY3NSBZ.js');
10678
10880
  if (MONOREPO_ROOT === null) {
10679
10881
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
10680
10882
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
@@ -10736,7 +10938,7 @@ async function runCompileTest(opts) {
10736
10938
  } catch {
10737
10939
  }
10738
10940
  try {
10739
- if (existsSync20(outfile)) unlinkSync(outfile);
10941
+ if (existsSync21(outfile)) unlinkSync(outfile);
10740
10942
  } catch {
10741
10943
  }
10742
10944
  }
@@ -11476,12 +11678,12 @@ function showOverview(am2) {
11476
11678
  }
11477
11679
  async function showAsset(am2, kind, name) {
11478
11680
  const entry = await am2.info(`${kind}:${name}`);
11479
- if (entry?.source && fs8__default.existsSync(entry.source)) {
11681
+ if (entry?.source && fs9__default.existsSync(entry.source)) {
11480
11682
  console.log();
11481
11683
  console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
11482
11684
  console.log(` ${S.rule(40)}`);
11483
11685
  console.log();
11484
- console.log(fs8__default.readFileSync(entry.source, "utf-8"));
11686
+ console.log(fs9__default.readFileSync(entry.source, "utf-8"));
11485
11687
  return;
11486
11688
  }
11487
11689
  logErr(`Asset not found: ${kind}:${name}`);
@@ -11588,8 +11790,15 @@ function makeStoreCommand() {
11588
11790
  "--all",
11589
11791
  `List every match (default: ${STORE_ROW_LIMIT} rows, only what \`skaile add\` can install)`
11590
11792
  ).option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
11591
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-N6ESO6IK.js');
11793
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PZAT3TJA.js');
11794
+ const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-W46UXZ3I.js');
11592
11795
  const projectDir = path22__default.resolve(opts.projectDir);
11796
+ if (opts.kind && !getKnownKinds2().has(opts.kind)) {
11797
+ logErr(
11798
+ `Unknown kind "${opts.kind}". Valid kinds: ${[...getKnownKinds2()].sort().join(", ")}`
11799
+ );
11800
+ process.exit(1);
11801
+ }
11593
11802
  const curated = searchCuratedManifests(query).filter(
11594
11803
  (h) => !opts.kind || h.kind === opts.kind
11595
11804
  );
@@ -11640,8 +11849,14 @@ function makeStoreCommand() {
11640
11849
  }
11641
11850
  });
11642
11851
  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) => {
11643
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-N6ESO6IK.js');
11644
- const { supportsInstallManifest } = await import('../project-UP52HEHC.js');
11852
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PZAT3TJA.js');
11853
+ const { supportsInstallManifest } = await import('../project-EZUH7PUJ.js');
11854
+ try {
11855
+ parseAssetRef(ref);
11856
+ } catch (e) {
11857
+ logErr(`Invalid asset ref "${ref}": ${e instanceof Error ? e.message : String(e)}`);
11858
+ process.exit(1);
11859
+ }
11645
11860
  try {
11646
11861
  const remote = await openCatalogSource2({ projectDir: path22__default.resolve(opts.projectDir) });
11647
11862
  const asset = await remote.resolve(ref);
@@ -11818,7 +12033,9 @@ function makeUpdateCommand() {
11818
12033
  if (!opts.catalogOnly) requireProjectConfig(projectDir);
11819
12034
  const am2 = new AssetManager({ registry: getKindRegistry(), projectDir });
11820
12035
  const target = name !== void 0 && !opts.catalogOnly ? await resolveUpdateTarget(am2, name) : void 0;
11821
- if (opts.catalog !== false) {
12036
+ if (opts.catalog !== false && !opts.catalogOnly && onlyLibraryAssets(projectDir)) {
12037
+ logInfo("Catalog refresh skipped (every locked asset comes from a library)");
12038
+ } else if (opts.catalog !== false) {
11822
12039
  const catalogSpinner = createSpinner();
11823
12040
  catalogSpinner.start("Refreshing catalog cache");
11824
12041
  try {
@@ -11833,11 +12050,13 @@ function makeUpdateCommand() {
11833
12050
  catalogSpinner.stop("Catalog refresh skipped (catalog.url: local)");
11834
12051
  } else {
11835
12052
  catalogSpinner.stop("Catalog refresh failed");
11836
- logErr(`Catalog refresh failed: ${err2 instanceof Error ? err2.message : String(err2)}`);
12053
+ const why = err2 instanceof Error ? err2.message : String(err2);
11837
12054
  if (opts.catalogOnly) {
12055
+ logErr(`Catalog refresh failed: ${why}`);
11838
12056
  logInfo("Run `skaile catalog test` to debug.");
11839
12057
  process.exit(1);
11840
12058
  }
12059
+ logWarn(`Catalog refresh failed: ${why}`);
11841
12060
  logInfo("Continuing with asset re-deploy. Run `skaile catalog test` to debug.");
11842
12061
  }
11843
12062
  }
@@ -11939,10 +12158,29 @@ async function resolveUpdateTarget(am2, name) {
11939
12158
  for (const h of hits) console.error(` ${h.ref}`);
11940
12159
  process.exit(1);
11941
12160
  }
12161
+ const chain = await am2.why(name);
12162
+ if (chain.length > 2 && chain[chain.length - 1] === "direct (skaile.yaml)") {
12163
+ const plain = (ref) => ref.replace(/#.*$/, "");
12164
+ const root = chain[chain.length - 2];
12165
+ logErr(
12166
+ `${plain(chain[0])} is required by ${plain(chain[1])}; run \`skaile update ${plain(root)}\`.`
12167
+ );
12168
+ process.exit(1);
12169
+ }
11942
12170
  logErr(`No declared asset matches "${name}".`);
11943
12171
  if (declared.length > 0) logInfo(`Declared: ${declared.map((d) => d.ref).join(", ")}`);
11944
12172
  process.exit(1);
11945
12173
  }
12174
+ function onlyLibraryAssets(projectDir) {
12175
+ let lock;
12176
+ try {
12177
+ lock = readLock(path22__default.join(projectDir, "skaile.lock.yaml"));
12178
+ } catch {
12179
+ return false;
12180
+ }
12181
+ const entries = Object.values(lock?.assets ?? {});
12182
+ return entries.length > 0 && entries.every((e) => e.library !== void 0);
12183
+ }
11946
12184
  function readText2(file) {
11947
12185
  try {
11948
12186
  return readFileSync(file, "utf8");
@@ -12303,29 +12541,29 @@ async function runInit(projectDir, opts) {
12303
12541
  const resolved = path22__default.resolve(projectDir ?? ".");
12304
12542
  const projectName = path22__default.basename(resolved);
12305
12543
  const created = [];
12306
- const { existsSync: existsSync20 } = await import('fs');
12307
- if (!existsSync20(resolved)) {
12544
+ const { existsSync: existsSync21 } = await import('fs');
12545
+ if (!existsSync21(resolved)) {
12308
12546
  mkdirSync5(resolved, { recursive: true });
12309
12547
  created.push(".");
12310
12548
  }
12311
12549
  const skaileDir = path22__default.join(resolved, ".skaile");
12312
- if (!existsSync20(skaileDir)) {
12550
+ if (!existsSync21(skaileDir)) {
12313
12551
  mkdirSync5(path22__default.join(skaileDir, "sessions"), { recursive: true });
12314
12552
  created.push(".skaile/");
12315
12553
  }
12316
12554
  const settingsPath = path22__default.join(skaileDir, "settings.json");
12317
- if (!existsSync20(settingsPath)) {
12555
+ if (!existsSync21(settingsPath)) {
12318
12556
  writeFileSync7(settingsPath, "{}\n");
12319
12557
  created.push(".skaile/settings.json");
12320
12558
  }
12321
12559
  const wsConfigPath = path22__default.join(resolved, "skaile.yaml");
12322
- if (!existsSync20(wsConfigPath)) {
12560
+ if (!existsSync21(wsConfigPath)) {
12323
12561
  writeFileSync7(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
12324
12562
  created.push("skaile.yaml");
12325
12563
  }
12326
12564
  for (const dir of new Set(Object.values(DRIVER_TARGETS[harness].local))) {
12327
12565
  const full = path22__default.join(resolved, dir);
12328
- if (!existsSync20(full)) {
12566
+ if (!existsSync21(full)) {
12329
12567
  mkdirSync5(full, { recursive: true });
12330
12568
  created.push(`${dir}/`);
12331
12569
  }
@@ -12355,7 +12593,7 @@ function buildInitWorkspaceConfig(projectName, harness) {
12355
12593
  }
12356
12594
  async function initGitScaffold(resolved, created) {
12357
12595
  const { execSync: execSync2 } = await import('child_process');
12358
- const { existsSync: existsSync20, readFileSync: readFileSync12, writeFileSync: writeFileSync7 } = await import('fs');
12596
+ const { existsSync: existsSync21, readFileSync: readFileSync12, writeFileSync: writeFileSync7 } = await import('fs');
12359
12597
  const gitignorePath = path22__default.join(resolved, ".gitignore");
12360
12598
  const entries = [
12361
12599
  "node_modules/",
@@ -12377,11 +12615,15 @@ async function initGitScaffold(resolved, created) {
12377
12615
  ".codex/skaile-session-instructions.md",
12378
12616
  ".omp/system.md",
12379
12617
  ".omp/sessions/",
12618
+ // `skaile integration install` writes the absolute project path into these.
12619
+ ".codex/config.toml",
12620
+ ".omp/extensions/skaile.ts",
12621
+ ".skaile/plugin-state.json",
12380
12622
  "*.log",
12381
12623
  ".env",
12382
12624
  ".env.local"
12383
12625
  ];
12384
- const existing = existsSync20(gitignorePath) ? readFileSync12(gitignorePath, "utf-8") : "";
12626
+ const existing = existsSync21(gitignorePath) ? readFileSync12(gitignorePath, "utf-8") : "";
12385
12627
  const have = new Set(existing.split("\n").map((l) => l.trim()));
12386
12628
  const append = entries.filter((e) => !have.has(e));
12387
12629
  if (append.length > 0) {
@@ -12390,7 +12632,7 @@ async function initGitScaffold(resolved, created) {
12390
12632
  `);
12391
12633
  if (!existing) created.push(".gitignore");
12392
12634
  }
12393
- if (!existsSync20(path22__default.join(resolved, ".git"))) {
12635
+ if (!existsSync21(path22__default.join(resolved, ".git"))) {
12394
12636
  try {
12395
12637
  execSync2("git init", { cwd: resolved, stdio: "pipe" });
12396
12638
  created.push(".git/");
@@ -12402,10 +12644,10 @@ async function initGitScaffold(resolved, created) {
12402
12644
  }
12403
12645
  async function bootstrapUserConfig() {
12404
12646
  try {
12405
- const fs13 = await import('fs');
12647
+ const fs14 = await import('fs');
12406
12648
  const { userConfigPath: userConfigPath2, saveConfig, getConfigDefaults } = await import('../library/index.js');
12407
12649
  const userCfgPath = userConfigPath2();
12408
- if (!fs13.existsSync(userCfgPath)) {
12650
+ if (!fs14.existsSync(userCfgPath)) {
12409
12651
  const defaults = getConfigDefaults();
12410
12652
  saveConfig(userCfgPath, {
12411
12653
  catalog: { url: defaults.catalog.url, cache_ttl: defaults.catalog.cache_ttl }
@@ -12420,7 +12662,7 @@ async function bootstrapUserConfig() {
12420
12662
  }
12421
12663
  async function hydrateInitSources(resolved, created) {
12422
12664
  try {
12423
- const { ensureSourcesCloned } = await import('../ensure-sources-POMEQSTM.js');
12665
+ const { ensureSourcesCloned } = await import('../ensure-sources-VUKHL65L.js');
12424
12666
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
12425
12667
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
12426
12668
  if (hydrate.failed.length > 0) {
@@ -12460,7 +12702,7 @@ function printInitSummary(resolved, projectDir, created) {
12460
12702
  console.log();
12461
12703
  }
12462
12704
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
12463
- const { cmdSetup } = await import('../setup-5IRUH5OS.js');
12705
+ const { cmdSetup } = await import('../setup-L632QIHV.js');
12464
12706
  await cmdSetup([], { projectDir: process.cwd() });
12465
12707
  });
12466
12708
  program.addCommand(makeInstallCommand());