@skaile/workspaces 5.12.0 → 5.14.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 (407) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/README.md +2 -2
  3. package/dist/app-sdk/index.js +1 -1
  4. package/dist/{asset-feeds-AM6PSSGM.js → asset-feeds-PAOX3FUT.js} +20 -20
  5. package/dist/{asset-feeds-AM6PSSGM.js.map → asset-feeds-PAOX3FUT.js.map} +1 -1
  6. package/dist/asset-manager/catalog-deployer.js +9 -9
  7. package/dist/asset-manager/index.js +15 -15
  8. package/dist/asset-manager/installer.js +11 -11
  9. package/dist/asset-manager/renderers.js +10 -10
  10. package/dist/asset-manager/src/index.d.ts +53 -10
  11. package/dist/asset-manager/src/index.d.ts.map +1 -1
  12. package/dist/asset-manager/src/installer.d.ts +0 -10
  13. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  14. package/dist/bridge/drivers/claude-sdk.js +155 -18
  15. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  16. package/dist/bridge/drivers/codex.js +73 -27
  17. package/dist/bridge/drivers/codex.js.map +1 -1
  18. package/dist/bridge/drivers/continue.js +12 -11
  19. package/dist/bridge/drivers/continue.js.map +1 -1
  20. package/dist/bridge/drivers/echo.js +4 -3
  21. package/dist/bridge/drivers/echo.js.map +1 -1
  22. package/dist/bridge/drivers/gemini.js +7 -6
  23. package/dist/bridge/drivers/goose.js +12 -11
  24. package/dist/bridge/drivers/goose.js.map +1 -1
  25. package/dist/bridge/drivers/omp.js +105 -29
  26. package/dist/bridge/drivers/omp.js.map +1 -1
  27. package/dist/bridge/drivers/opencode.js +12 -11
  28. package/dist/bridge/drivers/opencode.js.map +1 -1
  29. package/dist/bridge/drivers/qwen.js +7 -6
  30. package/dist/bridge/drivers/qwen.js.map +1 -1
  31. package/dist/bridge/index.js +16 -15
  32. package/dist/bridge/src/codex/config-toml.d.ts +8 -0
  33. package/dist/bridge/src/codex/config-toml.d.ts.map +1 -1
  34. package/dist/bridge/src/drivers/claude-sdk.d.ts +2 -0
  35. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  36. package/dist/bridge/src/drivers/claude-self-turns.d.ts +72 -0
  37. package/dist/bridge/src/drivers/claude-self-turns.d.ts.map +1 -0
  38. package/dist/bridge/src/drivers/codex.d.ts +6 -0
  39. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  40. package/dist/bridge/src/drivers/omp-models-yml.d.ts +32 -0
  41. package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -1
  42. package/dist/bridge/src/drivers/omp.d.ts +20 -6
  43. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  44. package/dist/bridge/src/normalizer.d.ts.map +1 -1
  45. package/dist/bridge/src/types.d.ts +12 -0
  46. package/dist/bridge/src/types.d.ts.map +1 -1
  47. package/dist/{chunk-QCEKGYHF.js → chunk-2BIESC6S.js} +3 -3
  48. package/dist/{chunk-QCEKGYHF.js.map → chunk-2BIESC6S.js.map} +1 -1
  49. package/dist/{chunk-P23WJCH2.js → chunk-3NNL334S.js} +23 -18
  50. package/dist/chunk-3NNL334S.js.map +1 -0
  51. package/dist/{chunk-6VLHITAM.js → chunk-57SF6W6E.js} +4 -3
  52. package/dist/chunk-57SF6W6E.js.map +1 -0
  53. package/dist/{chunk-GWD3QNVS.js → chunk-5IMGZAKH.js} +5 -5
  54. package/dist/{chunk-GWD3QNVS.js.map → chunk-5IMGZAKH.js.map} +1 -1
  55. package/dist/{chunk-NDF24LYP.js → chunk-5NVDOEWX.js} +15 -7
  56. package/dist/chunk-5NVDOEWX.js.map +1 -0
  57. package/dist/{chunk-3HUV2LJF.js → chunk-6JKIOPT3.js} +4 -4
  58. package/dist/{chunk-3HUV2LJF.js.map → chunk-6JKIOPT3.js.map} +1 -1
  59. package/dist/{chunk-MF54ZHWT.js → chunk-6VIVUBNN.js} +4 -271
  60. package/dist/chunk-6VIVUBNN.js.map +1 -0
  61. package/dist/{chunk-2X3JBVGD.js → chunk-7LGNJJ76.js} +18 -9
  62. package/dist/chunk-7LGNJJ76.js.map +1 -0
  63. package/dist/chunk-BASMWKPM.js +649 -0
  64. package/dist/chunk-BASMWKPM.js.map +1 -0
  65. package/dist/{chunk-PNOGX36L.js → chunk-CAPKENNF.js} +92 -26
  66. package/dist/chunk-CAPKENNF.js.map +1 -0
  67. package/dist/{chunk-7QWQTA5S.js → chunk-CNZI37HV.js} +4 -4
  68. package/dist/{chunk-7QWQTA5S.js.map → chunk-CNZI37HV.js.map} +1 -1
  69. package/dist/{chunk-PMECEZK3.js → chunk-D54T2F54.js} +5 -4
  70. package/dist/chunk-D54T2F54.js.map +1 -0
  71. package/dist/{chunk-F4NJDSR7.js → chunk-D5WTOVLG.js} +7 -4
  72. package/dist/chunk-D5WTOVLG.js.map +1 -0
  73. package/dist/{chunk-XZY6SBGU.js → chunk-DHUJRIQQ.js} +3 -3
  74. package/dist/{chunk-XZY6SBGU.js.map → chunk-DHUJRIQQ.js.map} +1 -1
  75. package/dist/chunk-DWRYUWOK.js +273 -0
  76. package/dist/chunk-DWRYUWOK.js.map +1 -0
  77. package/dist/{chunk-NJV5SLEK.js → chunk-FD2IPIE2.js} +46 -46
  78. package/dist/chunk-FD2IPIE2.js.map +1 -0
  79. package/dist/{chunk-POQ6PGNE.js → chunk-GJGEDWRT.js} +22 -6
  80. package/dist/chunk-GJGEDWRT.js.map +1 -0
  81. package/dist/{chunk-CPSIPIX7.js → chunk-IG5LZ3WU.js} +8 -6
  82. package/dist/chunk-IG5LZ3WU.js.map +1 -0
  83. package/dist/{chunk-3LVB3HGH.js → chunk-IPN7N2AZ.js} +3 -3
  84. package/dist/{chunk-3LVB3HGH.js.map → chunk-IPN7N2AZ.js.map} +1 -1
  85. package/dist/{chunk-NGJIVDDD.js → chunk-IQVZIVSA.js} +3 -3
  86. package/dist/{chunk-NGJIVDDD.js.map → chunk-IQVZIVSA.js.map} +1 -1
  87. package/dist/{chunk-CTP3XBMF.js → chunk-IY5E7Y5W.js} +57 -7
  88. package/dist/chunk-IY5E7Y5W.js.map +1 -0
  89. package/dist/{chunk-PNTXHTBC.js → chunk-J4OYIYFQ.js} +2 -2
  90. package/dist/{chunk-PNTXHTBC.js.map → chunk-J4OYIYFQ.js.map} +1 -1
  91. package/dist/{chunk-XTVSNWLL.js → chunk-M3P4BYRK.js} +34 -11
  92. package/dist/chunk-M3P4BYRK.js.map +1 -0
  93. package/dist/{chunk-X6LKA3TJ.js → chunk-MCLT3BJG.js} +6 -6
  94. package/dist/{chunk-X6LKA3TJ.js.map → chunk-MCLT3BJG.js.map} +1 -1
  95. package/dist/{chunk-7CR2OZPA.js → chunk-NVO6WECE.js} +9 -8
  96. package/dist/chunk-NVO6WECE.js.map +1 -0
  97. package/dist/chunk-O3Q3MOAV.js +64 -0
  98. package/dist/chunk-O3Q3MOAV.js.map +1 -0
  99. package/dist/{chunk-C3BMXXTN.js → chunk-ODQGLELI.js} +68 -24
  100. package/dist/chunk-ODQGLELI.js.map +1 -0
  101. package/dist/chunk-OKQXY6FS.js +1336 -0
  102. package/dist/chunk-OKQXY6FS.js.map +1 -0
  103. package/dist/{chunk-T5TSLSRO.js → chunk-OX2W5YF3.js} +8 -8
  104. package/dist/{chunk-T5TSLSRO.js.map → chunk-OX2W5YF3.js.map} +1 -1
  105. package/dist/{chunk-N5M2EISA.js → chunk-PAUM35HD.js} +250 -71
  106. package/dist/chunk-PAUM35HD.js.map +1 -0
  107. package/dist/{chunk-YQU2BPQD.js → chunk-PGVSOHWE.js} +2 -2
  108. package/dist/{chunk-YQU2BPQD.js.map → chunk-PGVSOHWE.js.map} +1 -1
  109. package/dist/{chunk-WI4T3KIS.js → chunk-PUG7IWFF.js} +130 -23
  110. package/dist/chunk-PUG7IWFF.js.map +1 -0
  111. package/dist/{chunk-2H73V6XR.js → chunk-PW3TYWOI.js} +3 -3
  112. package/dist/{chunk-2H73V6XR.js.map → chunk-PW3TYWOI.js.map} +1 -1
  113. package/dist/{chunk-UTKENBB6.js → chunk-PXDWTJ3P.js} +4 -4
  114. package/dist/{chunk-UTKENBB6.js.map → chunk-PXDWTJ3P.js.map} +1 -1
  115. package/dist/{chunk-TVAR4JHA.js → chunk-QAYL3PYY.js} +320 -51
  116. package/dist/chunk-QAYL3PYY.js.map +1 -0
  117. package/dist/{chunk-7XWUJC3A.js → chunk-QELQDY5K.js} +3 -3
  118. package/dist/{chunk-7XWUJC3A.js.map → chunk-QELQDY5K.js.map} +1 -1
  119. package/dist/{chunk-VRLKHL74.js → chunk-S6FZUR5H.js} +7 -6
  120. package/dist/chunk-S6FZUR5H.js.map +1 -0
  121. package/dist/{chunk-SHQMPGOL.js → chunk-TYUJPQNX.js} +10 -5
  122. package/dist/chunk-TYUJPQNX.js.map +1 -0
  123. package/dist/chunk-U27JRO5L.js +13 -0
  124. package/dist/chunk-U27JRO5L.js.map +1 -0
  125. package/dist/{chunk-ICIYSJBQ.js → chunk-UK3LRPJ5.js} +15 -7
  126. package/dist/chunk-UK3LRPJ5.js.map +1 -0
  127. package/dist/{chunk-KVSDRB35.js → chunk-UQ4SQOR6.js} +5 -5
  128. package/dist/{chunk-KVSDRB35.js.map → chunk-UQ4SQOR6.js.map} +1 -1
  129. package/dist/{chunk-G3X4MLDB.js → chunk-USHB5KEY.js} +3 -3
  130. package/dist/{chunk-G3X4MLDB.js.map → chunk-USHB5KEY.js.map} +1 -1
  131. package/dist/{chunk-HYMERG57.js → chunk-V7AWO5FL.js} +3 -3
  132. package/dist/{chunk-HYMERG57.js.map → chunk-V7AWO5FL.js.map} +1 -1
  133. package/dist/chunk-VTG5Z3KD.js +345 -0
  134. package/dist/chunk-VTG5Z3KD.js.map +1 -0
  135. package/dist/{chunk-27L6BBAT.js → chunk-VTXXBYB3.js} +10 -10
  136. package/dist/{chunk-27L6BBAT.js.map → chunk-VTXXBYB3.js.map} +1 -1
  137. package/dist/{chunk-XMAJJPA4.js → chunk-WTEYDNTR.js} +3 -3
  138. package/dist/{chunk-XMAJJPA4.js.map → chunk-WTEYDNTR.js.map} +1 -1
  139. package/dist/{chunk-NJXR5OAM.js → chunk-YFIHFJEB.js} +4 -4
  140. package/dist/{chunk-NJXR5OAM.js.map → chunk-YFIHFJEB.js.map} +1 -1
  141. package/dist/{chunk-VMKMFS2Q.js → chunk-YIDZJHY6.js} +3 -3
  142. package/dist/{chunk-VMKMFS2Q.js.map → chunk-YIDZJHY6.js.map} +1 -1
  143. package/dist/{chunk-2JFIFDDO.js → chunk-YTZFSKWL.js} +3 -3
  144. package/dist/{chunk-2JFIFDDO.js.map → chunk-YTZFSKWL.js.map} +1 -1
  145. package/dist/{chunk-SMT3LNAG.js → chunk-ZBD6EITA.js} +4 -4
  146. package/dist/{chunk-SMT3LNAG.js.map → chunk-ZBD6EITA.js.map} +1 -1
  147. package/dist/{chunk-JQ3DXNQV.js → chunk-ZDTZGEJG.js} +6 -6
  148. package/dist/{chunk-JQ3DXNQV.js.map → chunk-ZDTZGEJG.js.map} +1 -1
  149. package/dist/{chunk-X4BAYGMT.js → chunk-ZIW34FGO.js} +3 -3
  150. package/dist/{chunk-X4BAYGMT.js.map → chunk-ZIW34FGO.js.map} +1 -1
  151. package/dist/{chunk-DCHQ6BAZ.js → chunk-ZU24LWBI.js} +3 -3
  152. package/dist/{chunk-DCHQ6BAZ.js.map → chunk-ZU24LWBI.js.map} +1 -1
  153. package/dist/cli/index.js +493 -232
  154. package/dist/cli/index.js.map +1 -1
  155. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  156. package/dist/cli/src/commands/catalog-cmd.d.ts.map +1 -1
  157. package/dist/cli/src/commands/catalog.d.ts +2 -0
  158. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  159. package/dist/cli/src/commands/diff.d.ts +1 -1
  160. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  161. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  162. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  163. package/dist/cli/src/commands/library-index.d.ts +10 -0
  164. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  165. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  166. package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
  167. package/dist/cli/src/commands/plugin/types.d.ts +2 -0
  168. package/dist/cli/src/commands/plugin/types.d.ts.map +1 -1
  169. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  170. package/dist/cli/src/commands/preset-apply.d.ts.map +1 -1
  171. package/dist/cli/src/commands/project.d.ts +8 -0
  172. package/dist/cli/src/commands/project.d.ts.map +1 -1
  173. package/dist/cli/src/commands/run.d.ts +9 -0
  174. package/dist/cli/src/commands/run.d.ts.map +1 -1
  175. package/dist/cli/src/commands/serve-preflight.d.ts +2 -1
  176. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  177. package/dist/cli/src/commands/serve.d.ts +7 -0
  178. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  179. package/dist/cli/src/commands/source-manifest.d.ts +1 -0
  180. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  181. package/dist/cli/src/commands/source.d.ts +9 -1
  182. package/dist/cli/src/commands/source.d.ts.map +1 -1
  183. package/dist/cli/src/commands/store.d.ts.map +1 -1
  184. package/dist/cli/src/commands/update.d.ts.map +1 -1
  185. package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
  186. package/dist/cli/src/commands/validate.d.ts +3 -2
  187. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  188. package/dist/cli/src/driver-error.d.ts +7 -0
  189. package/dist/cli/src/driver-error.d.ts.map +1 -1
  190. package/dist/cli/src/helpers.d.ts +6 -0
  191. package/dist/cli/src/helpers.d.ts.map +1 -1
  192. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  193. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  194. package/dist/cli/src/plugin-store/reconcile.d.ts +24 -4
  195. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  196. package/dist/cli/src/skill-checks.d.ts +15 -4
  197. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  198. package/dist/cli/src/store-addable.d.ts +7 -8
  199. package/dist/cli/src/store-addable.d.ts.map +1 -1
  200. package/dist/connectors/config.js +6 -6
  201. package/dist/connectors/index.js +20 -19
  202. package/dist/connectors/src/config.d.ts.map +1 -1
  203. package/dist/{connectors-UNKUKEPG.js → connectors-2TEGRRYC.js} +23 -22
  204. package/dist/{connectors-UNKUKEPG.js.map → connectors-2TEGRRYC.js.map} +1 -1
  205. package/dist/connectors-shared/index.js +2 -2
  206. package/dist/core/driver-targets.js +1 -1
  207. package/dist/core/index.js +8 -8
  208. package/dist/core/manifest.js +2 -2
  209. package/dist/core/models.js +1 -1
  210. package/dist/core/publish-manifest.js +4 -2
  211. package/dist/core/ref.js +1 -1
  212. package/dist/core/runtime-assets.js +6 -6
  213. package/dist/core/src/agent-instances.d.ts +5 -0
  214. package/dist/core/src/agent-instances.d.ts.map +1 -1
  215. package/dist/core/src/driver-targets.d.ts.map +1 -1
  216. package/dist/core/src/index.d.ts +2 -2
  217. package/dist/core/src/index.d.ts.map +1 -1
  218. package/dist/core/src/manifest.d.ts +9 -3
  219. package/dist/core/src/manifest.d.ts.map +1 -1
  220. package/dist/core/src/models.d.ts +8 -0
  221. package/dist/core/src/models.d.ts.map +1 -1
  222. package/dist/core/src/publish-manifest.d.ts +38 -1
  223. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  224. package/dist/core/src/repo-manager.d.ts +8 -3
  225. package/dist/core/src/repo-manager.d.ts.map +1 -1
  226. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  227. package/dist/core/src/store.d.ts +4 -0
  228. package/dist/core/src/store.d.ts.map +1 -1
  229. package/dist/core/src/walker.d.ts +2 -0
  230. package/dist/core/src/walker.d.ts.map +1 -1
  231. package/dist/core/src/workspace-config.d.ts +40 -2
  232. package/dist/core/src/workspace-config.d.ts.map +1 -1
  233. package/dist/core/store.js +2 -2
  234. package/dist/core/workspace-config.js +5 -5
  235. package/dist/deploy/index.js +8 -8
  236. package/dist/discovery/index.js +5 -5
  237. package/dist/discovery/src/parse-manifest.d.ts.map +1 -1
  238. package/dist/discovery/src/source-config.d.ts +5 -3
  239. package/dist/discovery/src/source-config.d.ts.map +1 -1
  240. package/dist/{ensure-sources-POMEQSTM.js → ensure-sources-EG7YKKZL.js} +18 -18
  241. package/dist/{ensure-sources-POMEQSTM.js.map → ensure-sources-EG7YKKZL.js.map} +1 -1
  242. package/dist/factory-assets/README.md +1 -1
  243. package/dist/factory-assets/connectors/box.js +20 -19
  244. package/dist/factory-assets/connectors/deploy.js +20 -19
  245. package/dist/factory-assets/connectors/devserver.js +20 -19
  246. package/dist/factory-assets/connectors/flow/adapter.js +20 -19
  247. package/dist/factory-assets/connectors/flow/engine.js +9 -9
  248. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  249. package/dist/factory-assets/connectors/flow/run-flow.js +22 -21
  250. package/dist/factory-assets/connectors/flow.js +20 -19
  251. package/dist/factory-assets/connectors/git.js +20 -19
  252. package/dist/factory-assets/connectors/gmail.js +20 -19
  253. package/dist/factory-assets/connectors/googledrive.js +20 -19
  254. package/dist/factory-assets/connectors/local.js +20 -19
  255. package/dist/factory-assets/connectors/mattermost.js +20 -19
  256. package/dist/factory-assets/connectors/memory.js +20 -19
  257. package/dist/factory-assets/connectors/minio.js +20 -19
  258. package/dist/factory-assets/connectors/postgres.js +20 -19
  259. package/dist/factory-assets/connectors/s3.js +20 -19
  260. package/dist/factory-assets/connectors/sharepoint.js +20 -19
  261. package/dist/factory-assets/connectors/sqlite.js +20 -19
  262. package/dist/factory-assets/connectors/static-server.js +20 -19
  263. package/dist/factory-assets/connectors/tunnel.js +20 -19
  264. package/dist/factory-assets/connectors/webdav.js +20 -19
  265. package/dist/factory-assets/connectors/xstate-store.js +20 -19
  266. package/dist/factory-assets/connectors/xstate.js +20 -19
  267. package/dist/{flows-DVKMZKM4.js → flows-5TW3XFMH.js} +13 -13
  268. package/dist/{flows-DVKMZKM4.js.map → flows-5TW3XFMH.js.map} +1 -1
  269. package/dist/{helpers-Y4OT7VIS.js → helpers-BQGXEKRP.js} +18 -18
  270. package/dist/{helpers-Y4OT7VIS.js.map → helpers-BQGXEKRP.js.map} +1 -1
  271. package/dist/library/index.js +12 -12
  272. package/dist/library/install.js +5 -3
  273. package/dist/library/src/local/local-catalog-source.d.ts +6 -0
  274. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  275. package/dist/library/src/manifest-writer.d.ts +1 -1
  276. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  277. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  278. package/dist/library/src/user-library.d.ts +2 -0
  279. package/dist/library/src/user-library.d.ts.map +1 -1
  280. package/dist/{library-publish-DI4Q5UOG.js → library-publish-EUP524PE.js} +28 -25
  281. package/dist/library-publish-EUP524PE.js.map +1 -0
  282. package/dist/model-endpoint/index.d.ts +2 -0
  283. package/dist/model-endpoint/index.js +9 -0
  284. package/dist/model-endpoint/index.js.map +1 -0
  285. package/dist/model-endpoint/src/index.d.ts +4 -0
  286. package/dist/model-endpoint/src/index.d.ts.map +1 -0
  287. package/dist/model-endpoint/src/openai-chat.d.ts +105 -0
  288. package/dist/model-endpoint/src/openai-chat.d.ts.map +1 -0
  289. package/dist/model-endpoint/src/openai-responses.d.ts +106 -0
  290. package/dist/model-endpoint/src/openai-responses.d.ts.map +1 -0
  291. package/dist/model-endpoint/src/openai-shared.d.ts +77 -0
  292. package/dist/model-endpoint/src/openai-shared.d.ts.map +1 -0
  293. package/dist/model-endpoint/src/resolve.d.ts +36 -0
  294. package/dist/model-endpoint/src/resolve.d.ts.map +1 -0
  295. package/dist/model-endpoint/src/server.d.ts +16 -0
  296. package/dist/model-endpoint/src/server.d.ts.map +1 -0
  297. package/dist/model-endpoint/src/types.d.ts +78 -0
  298. package/dist/model-endpoint/src/types.d.ts.map +1 -0
  299. package/dist/open-library-QNMIMZYS.js +40 -0
  300. package/dist/{open-library-N6ESO6IK.js.map → open-library-QNMIMZYS.js.map} +1 -1
  301. package/dist/open-registry-BOUCBDLF.js +32 -0
  302. package/dist/{open-registry-CBZ5MWTT.js.map → open-registry-BOUCBDLF.js.map} +1 -1
  303. package/dist/paths-B6SX6J6T.js +22 -0
  304. package/dist/{paths-U6W6MQNQ.js.map → paths-B6SX6J6T.js.map} +1 -1
  305. package/dist/{plugin-store-XMZSPVBF.js → plugin-store-MLFP3WJ7.js} +62 -20
  306. package/dist/plugin-store-MLFP3WJ7.js.map +1 -0
  307. package/dist/plugins/src/catalog-source.d.ts +6 -0
  308. package/dist/plugins/src/catalog-source.d.ts.map +1 -1
  309. package/dist/project-GXCIEJGM.js +82 -0
  310. package/dist/{project-UP52HEHC.js.map → project-GXCIEJGM.js.map} +1 -1
  311. package/dist/resolver/index.js +9 -9
  312. package/dist/runner/index.js +35 -32
  313. package/dist/runner/src/agent.d.ts.map +1 -1
  314. package/dist/runner/src/composition/index.d.ts +1 -1
  315. package/dist/runner/src/composition/index.d.ts.map +1 -1
  316. package/dist/runner/src/composition/prompt-sections.d.ts +18 -6
  317. package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -1
  318. package/dist/runner/src/model-endpoint-discovery.d.ts +64 -0
  319. package/dist/runner/src/model-endpoint-discovery.d.ts.map +1 -0
  320. package/dist/runner/src/serve.d.ts +6 -0
  321. package/dist/runner/src/serve.d.ts.map +1 -1
  322. package/dist/runner/src/session-builder.d.ts +8 -0
  323. package/dist/runner/src/session-builder.d.ts.map +1 -1
  324. package/dist/runner/src/session.d.ts +2 -0
  325. package/dist/runner/src/session.d.ts.map +1 -1
  326. package/dist/runner/src/ws-auth-warning.d.ts +17 -0
  327. package/dist/runner/src/ws-auth-warning.d.ts.map +1 -0
  328. package/dist/sdk/asset-manager.js +15 -15
  329. package/dist/sdk/bridge.js +16 -15
  330. package/dist/sdk/core.js +8 -8
  331. package/dist/sdk/flow.js +9 -9
  332. package/dist/sdk/index.js +35 -32
  333. package/dist/sdk/index.js.map +1 -1
  334. package/dist/sdk/resolver.js +9 -9
  335. package/dist/sdk/runner.js +35 -32
  336. package/dist/sdk/session.js +2 -2
  337. package/dist/sdk/types.js +1 -1
  338. package/dist/serve-preflight-GNBW3O4U.js +64 -0
  339. package/dist/serve-preflight-GNBW3O4U.js.map +1 -0
  340. package/dist/session/index.js +2 -2
  341. package/dist/{setup-5IRUH5OS.js → setup-HJEYEXLS.js} +26 -25
  342. package/dist/setup-HJEYEXLS.js.map +1 -0
  343. package/dist/skills-4WMYGJDL.js +26 -0
  344. package/dist/{skills-HA36RFNM.js.map → skills-4WMYGJDL.js.map} +1 -1
  345. package/dist/source-5VL6PHER.js +42 -0
  346. package/dist/{source-DX5SGWEI.js.map → source-5VL6PHER.js.map} +1 -1
  347. package/dist/{source-manifest-publish-NMRLXWVW.js → source-manifest-publish-Q66H7EJI.js} +25 -24
  348. package/dist/source-manifest-publish-Q66H7EJI.js.map +1 -0
  349. package/dist/tui/index.js +52 -39
  350. package/dist/tui/index.js.map +1 -1
  351. package/dist/tui/src/repl.d.ts.map +1 -1
  352. package/dist/types/index.js +1 -1
  353. package/dist/types/manifests.js +1 -1
  354. package/dist/types/src/delivery.d.ts.map +1 -1
  355. package/dist/types/src/events.d.ts +55 -1
  356. package/dist/types/src/events.d.ts.map +1 -1
  357. package/dist/types/src/index.d.ts +1 -1
  358. package/dist/types/src/index.d.ts.map +1 -1
  359. package/dist/types/src/lifecycle.d.ts +2 -1
  360. package/dist/types/src/lifecycle.d.ts.map +1 -1
  361. package/dist/types/src/manifests/preset.d.ts +6 -1
  362. package/dist/types/src/manifests/preset.d.ts.map +1 -1
  363. package/dist/types/src/version.d.ts +11 -1
  364. package/dist/types/src/version.d.ts.map +1 -1
  365. package/dist/workspace-plugin/adapters/mcp.js +27 -26
  366. package/dist/workspace-plugin/adapters/omp.js +14 -14
  367. package/dist/workspace-plugin/index.js +1 -1
  368. package/package.json +12 -1
  369. package/dist/chunk-2X3JBVGD.js.map +0 -1
  370. package/dist/chunk-6VLHITAM.js.map +0 -1
  371. package/dist/chunk-7CR2OZPA.js.map +0 -1
  372. package/dist/chunk-C3BMXXTN.js.map +0 -1
  373. package/dist/chunk-CPSIPIX7.js.map +0 -1
  374. package/dist/chunk-CTP3XBMF.js.map +0 -1
  375. package/dist/chunk-F4NJDSR7.js.map +0 -1
  376. package/dist/chunk-ICIYSJBQ.js.map +0 -1
  377. package/dist/chunk-ID745F3R.js +0 -625
  378. package/dist/chunk-ID745F3R.js.map +0 -1
  379. package/dist/chunk-K4VOEYOR.js +0 -21
  380. package/dist/chunk-K4VOEYOR.js.map +0 -1
  381. package/dist/chunk-MF54ZHWT.js.map +0 -1
  382. package/dist/chunk-N5M2EISA.js.map +0 -1
  383. package/dist/chunk-NDF24LYP.js.map +0 -1
  384. package/dist/chunk-NJV5SLEK.js.map +0 -1
  385. package/dist/chunk-NR7H7ZJP.js +0 -400
  386. package/dist/chunk-NR7H7ZJP.js.map +0 -1
  387. package/dist/chunk-P23WJCH2.js.map +0 -1
  388. package/dist/chunk-PMECEZK3.js.map +0 -1
  389. package/dist/chunk-PNOGX36L.js.map +0 -1
  390. package/dist/chunk-POQ6PGNE.js.map +0 -1
  391. package/dist/chunk-SHQMPGOL.js.map +0 -1
  392. package/dist/chunk-TVAR4JHA.js.map +0 -1
  393. package/dist/chunk-VRLKHL74.js.map +0 -1
  394. package/dist/chunk-WI4T3KIS.js.map +0 -1
  395. package/dist/chunk-XTVSNWLL.js.map +0 -1
  396. package/dist/library-publish-DI4Q5UOG.js.map +0 -1
  397. package/dist/open-library-N6ESO6IK.js +0 -40
  398. package/dist/open-registry-CBZ5MWTT.js +0 -32
  399. package/dist/paths-U6W6MQNQ.js +0 -22
  400. package/dist/plugin-store-XMZSPVBF.js.map +0 -1
  401. package/dist/project-UP52HEHC.js +0 -79
  402. package/dist/serve-preflight-6P2JJEJ3.js +0 -47
  403. package/dist/serve-preflight-6P2JJEJ3.js.map +0 -1
  404. package/dist/setup-5IRUH5OS.js.map +0 -1
  405. package/dist/skills-HA36RFNM.js +0 -26
  406. package/dist/source-DX5SGWEI.js +0 -41
  407. package/dist/source-manifest-publish-NMRLXWVW.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,26 +1,28 @@
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 { storeNotInstallableReason } from '../chunk-U27JRO5L.js';
3
+ import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-UQ4SQOR6.js';
4
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportReplaced, reportRelocked, reportMoved, editedConventionFiles, REF_HINT, reportInstalledSoftDeps } from '../chunk-3NNL334S.js';
5
5
  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';
6
+ import { makeSourceCommand, syncProjectSources, divergedSourceClones } from '../chunk-PUG7IWFF.js';
7
+ import { AI_RESOURCES } from '../chunk-ZBD6EITA.js';
8
+ import { checkAsset, agentComposeRefAdvisories, findAssetManifestFile, declaredVersion, checkAssetFile, duplicateAssetMessage, readAssetBody, checkAgentFiles, invalidSemverText } from '../chunk-VTG5Z3KD.js';
9
+ import { getStoreConfig, storeFetch, isStoreAuthenticated, getStoreToken } from '../chunk-O3Q3MOAV.js';
10
+ 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-BASMWKPM.js';
11
+ import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-ZDTZGEJG.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-GJGEDWRT.js';
13
+ import { getKindRegistry, getKnownKinds } from '../chunk-5IMGZAKH.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-PAUM35HD.js';
16
+ import { buildClaudePluginFiles } from '../chunk-PGVSOHWE.js';
17
+ import '../chunk-MCLT3BJG.js';
18
+ import '../chunk-DHUJRIQQ.js';
19
+ import '../chunk-V7AWO5FL.js';
18
20
  import '../chunk-R6O6YWU7.js';
19
- import '../chunk-3HUV2LJF.js';
20
- import '../chunk-QCEKGYHF.js';
21
+ import '../chunk-6JKIOPT3.js';
22
+ import '../chunk-2BIESC6S.js';
21
23
  import '../chunk-4ZTPYIBE.js';
22
- import '../chunk-XZY6SBGU.js';
23
24
  import '../chunk-X5YPJV4N.js';
25
+ import '../chunk-OKQXY6FS.js';
24
26
  import '../chunk-O7SG5PC2.js';
25
27
  import '../chunk-7QBNJTTQ.js';
26
28
  import '../chunk-O2SYFJWP.js';
@@ -28,64 +30,66 @@ import '../chunk-OQ5MKDS3.js';
28
30
  import '../chunk-32NA4TVC.js';
29
31
  import '../chunk-W3UDISS2.js';
30
32
  import '../chunk-PHRNUTSG.js';
31
- import { runFlow, resumeFlow } from '../chunk-2X3JBVGD.js';
33
+ import '../chunk-IQVZIVSA.js';
34
+ import { runFlow, resumeFlow } from '../chunk-7LGNJJ76.js';
32
35
  import '../chunk-4R6DROGN.js';
33
- import { parseSkillRequirements, validateRequirements, validateFlowVersions } from '../chunk-G3X4MLDB.js';
34
- import '../chunk-DCHQ6BAZ.js';
36
+ import { parseSkillRequirements, validateRequirements, validateFlowVersions } from '../chunk-USHB5KEY.js';
37
+ import '../chunk-ZU24LWBI.js';
35
38
  import '../chunk-ISHJITXJ.js';
36
- import '../chunk-27L6BBAT.js';
37
- import '../chunk-X4BAYGMT.js';
38
- import '../chunk-ICIYSJBQ.js';
39
- import '../chunk-NDF24LYP.js';
40
- import '../chunk-2JFIFDDO.js';
39
+ import '../chunk-VTXXBYB3.js';
40
+ import '../chunk-ZIW34FGO.js';
41
+ import '../chunk-UK3LRPJ5.js';
42
+ import '../chunk-5NVDOEWX.js';
43
+ import '../chunk-YTZFSKWL.js';
41
44
  import '../chunk-LOO5CB5M.js';
42
- import '../chunk-2H73V6XR.js';
43
- import '../chunk-NJXR5OAM.js';
45
+ import '../chunk-PW3TYWOI.js';
46
+ import '../chunk-YFIHFJEB.js';
44
47
  import '../chunk-B4X2N7JQ.js';
45
48
  import '../chunk-YROR332M.js';
46
- import { listDrivers, getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-MF54ZHWT.js';
49
+ import '../chunk-DWRYUWOK.js';
50
+ import { listDrivers, getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-6VIVUBNN.js';
47
51
  import '../chunk-6E6PKKAD.js';
48
52
  import '../chunk-IFGTRL2I.js';
49
- import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-7XWUJC3A.js';
53
+ import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-QELQDY5K.js';
50
54
  import '../chunk-LNFKL23K.js';
51
55
  import '../chunk-X3RMRJNR.js';
52
56
  import '../chunk-M3WPBTGJ.js';
53
57
  import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-7RGTAEG6.js';
54
58
  import '../chunk-NUELZWCF.js';
55
- 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';
59
+ import '../chunk-D5WTOVLG.js';
60
+ import { AssetManager, parseRefTolerant, MissingManifestError, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-QAYL3PYY.js';
61
+ import { libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, isGitRepo, ensureGitRepo, conflictingAssetRoot, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, missingRootAssets, getStoreManifestsDir, assertValidLibraryName, syncManifestWithDisk, getDefaultValue, isSecretPlaceholder } from '../chunk-ODQGLELI.js';
62
+ import { parseManifestFile, SEMVER_RE } from '../chunk-NVO6WECE.js';
63
+ import '../chunk-PXDWTJ3P.js';
60
64
  import '../chunk-H5U7LNTJ.js';
61
65
  import '../chunk-3TXEJN4W.js';
62
- import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-NJV5SLEK.js';
66
+ import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-FD2IPIE2.js';
63
67
  import '../chunk-NOA6EJXE.js';
64
68
  import '../chunk-KTBKW2FI.js';
65
69
  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';
70
+ import '../chunk-CNZI37HV.js';
71
+ import { effectiveComposes, validatePreset, composeSlotDiagnostics, agentDeprecationDiagnostics, validateAgent, SLOT_ID_PATTERN } from '../chunk-57SF6W6E.js';
72
+ import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, readLock, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, aiResourceRoots, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-OX2W5YF3.js';
69
73
  import '../chunk-4GY63JU6.js';
70
- import { factoryAssetRoots } from '../chunk-SHQMPGOL.js';
71
- import { deployedDir } from '../chunk-PMECEZK3.js';
74
+ import { resolveRuntimeAssets, factoryAssetRoots } from '../chunk-TYUJPQNX.js';
75
+ import { deployedDir } from '../chunk-D54T2F54.js';
72
76
  import { DEFAULT_DRIVER_ID, DRIVER_DEFAULTS } from '../chunk-5BEFNLOR.js';
73
77
  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';
78
+ import { SourceEntryError, resolveSkWorkspaceConfig, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, decodeSkaileYaml, matchPin, coerceVersion, loadSkWorkspaceConfig, normalizeAgentInstances, agentBlockKeyDiagnostics, agentInstanceDiagnostics, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-CAPKENNF.js';
75
79
  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';
80
+ import { SUPPORTED_DRIVER_TARGETS, driverTargetForDriver } from '../chunk-IG5LZ3WU.js';
81
+ import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-IY5E7Y5W.js';
78
82
  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';
83
+ import { dedupeRequirements, parseFrontmatter, scanDirectory, parseRequires } from '../chunk-M3P4BYRK.js';
84
+ import { parseAssetRef, isValidPublisher, PUBLISHER_HINT, isValidAssetName, ASSET_NAME_HINT, depToStr, slugifyAssetName, parseAssetRefLoose, assetRefToStr } from '../chunk-J4OYIYFQ.js';
81
85
  import { portableSpawn, portableSpawnSync } from '../chunk-ICSCSM5D.js';
82
86
  import { openSqlite } from '../chunk-DKXNKFKP.js';
83
87
  import { parseModelRef, resolveEntryBaseUrl } from '../chunk-MJHSLODD.js';
84
88
  import '../chunk-C3CAXQMA.js';
85
89
  import { registerLogStore, LogStore, StdoutSink } from '../chunk-BOFL7GIF.js';
86
90
  import '../chunk-NSBPE2FW.js';
87
- import * as fs8 from 'fs';
88
- import fs8__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
91
+ import * as fs9 from 'fs';
92
+ import fs9__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
89
93
  import * as path22 from 'path';
90
94
  import path22__default, { resolve, join } from 'path';
91
95
  import { fileURLToPath } from 'url';
@@ -147,7 +151,7 @@ function selectStoreRows(matches, query, all) {
147
151
  );
148
152
  if (all) return { shown: ranked, hidden: 0, cut: 0 };
149
153
  const keep = ranked.filter(
150
- (a) => storeNotInstallableReason(a) === void 0 && !STORE_TEST_NAME_RE.test(a.name)
154
+ (a) => storeNotInstallableReason(a) === void 0 && !a.demo && !STORE_TEST_NAME_RE.test(a.name)
151
155
  );
152
156
  return {
153
157
  shown: keep.slice(0, STORE_ROW_LIMIT),
@@ -164,7 +168,7 @@ function storeSelectionNotes(sel, indent) {
164
168
  }
165
169
  if (sel.hidden > 0) {
166
170
  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`)}`
171
+ `${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
172
  );
169
173
  }
170
174
  return notes;
@@ -225,7 +229,7 @@ async function runSearch(kind, query, opts) {
225
229
  }
226
230
  }
227
231
  async function searchIndex(query, kind) {
228
- const { openLibrary: openLibrary2 } = await import('../open-library-N6ESO6IK.js');
232
+ const { openLibrary: openLibrary2 } = await import('../open-library-QNMIMZYS.js');
229
233
  const library = await openLibrary2();
230
234
  try {
231
235
  const { libraryDirMissing: libraryDirMissing2 } = await import('../library/index.js');
@@ -376,7 +380,7 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
376
380
  const factory = await searchFactory(projectDir, query, kind);
377
381
  let entries = unionEntries(await searchIndex(query, kind), factory);
378
382
  if (entries.length === 0 && !query && !kind && !airGapped) {
379
- const { autoSyncForSearch } = await import('../source-DX5SGWEI.js');
383
+ const { autoSyncForSearch } = await import('../source-5VL6PHER.js');
380
384
  if (await autoSyncForSearch(projectDir)) {
381
385
  entries = unionEntries(await searchIndex(query, kind), factory);
382
386
  }
@@ -486,17 +490,11 @@ function formatStoreRows(assets, indent, width = terminalWidth()) {
486
490
  });
487
491
  }
488
492
  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
- }
493
+ if (airGapped && !opts.store) {
496
494
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
497
495
  return;
498
496
  }
499
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-N6ESO6IK.js');
497
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-QNMIMZYS.js');
500
498
  try {
501
499
  const remote = await openCatalogSource2({ projectDir: path22__default.resolve(opts.projectDir) });
502
500
  const assets = await remote.listAssets(kind ? { kind } : {});
@@ -524,9 +522,10 @@ async function searchStore(query, kind, opts, airGapped) {
524
522
  }
525
523
  }
526
524
  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\`.`;
525
+ const { resolveConfig, describeCatalogError, CatalogHttpError } = await import('../library/index.js');
526
+ const { catalog } = resolveConfig({ projectDir });
527
+ 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\`.` : "";
528
+ return `${describeCatalogError(err2, catalog.url)}.${framingHint} Check the catalog with \`skaile catalog test\`.`;
530
529
  }
531
530
  function makeSearchCommand() {
532
531
  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 +622,10 @@ function makeAddCommand() {
623
622
  ).option(
624
623
  "--with-soft-deps",
625
624
  "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) => {
625
+ ).option("--no-soft-deps", "skip the soft-dep prompt entirely (don't add, don't report)").option(
626
+ "--force",
627
+ "overwrite a deployed folder that no lock entry owns (a hand-made skill of the same name)"
628
+ ).action(async (ref, opts) => {
627
629
  if (opts.withSoftDeps && opts.softDeps === false) {
628
630
  logErr("--with-soft-deps and --no-soft-deps are mutually exclusive.");
629
631
  process.exit(1);
@@ -631,13 +633,17 @@ function makeAddCommand() {
631
633
  const harnesses = parseHarnessFilter(opts.harness);
632
634
  if (!opts.global && harnesses === void 0) requireProjectConfig(opts.projectDir);
633
635
  const warnings = deferredWarnings();
636
+ const collisionKeys = [];
634
637
  const am2 = new AssetManager({
635
638
  registry: getKindRegistry(),
636
639
  projectDir: path22__default.resolve(opts.projectDir),
637
640
  global: opts.global || harnesses !== void 0,
638
641
  harnesses,
639
642
  driverTarget: opts.target,
640
- onLibraryCollision: warnings.push
643
+ onLibraryCollision: (msg) => {
644
+ collisionKeys.push(msg.split(" exists in ")[0]);
645
+ warnings.push(msg);
646
+ }
641
647
  });
642
648
  const spinner = createSpinner();
643
649
  spinner.start(`Adding ${ref}`);
@@ -648,6 +654,7 @@ function makeAddCommand() {
648
654
  const skippedEnv = /* @__PURE__ */ new Set();
649
655
  const added = await am2.add(ref, {
650
656
  link: opts.link,
657
+ force: opts.force,
651
658
  onLibraryOrigin: (deployedRef, library) => libraryOf.set(deployedRef, library),
652
659
  onLibraryMoved: (m) => warnings.push(`${m.ref} moved from ${m.from} to ${m.to}`),
653
660
  onPresets: (expanded) => {
@@ -711,7 +718,11 @@ function makeAddCommand() {
711
718
  }
712
719
  }
713
720
  const addOrigins = await competingOriginsOf(am2, ref);
714
- if (addOrigins) {
721
+ const asked = parseRefTolerant(ref);
722
+ const alreadyWarned = collisionKeys.some(
723
+ (key) => key.startsWith(`${asked?.kind}:`) && key.endsWith(`/${asked?.name}`)
724
+ );
725
+ if (addOrigins && !alreadyWarned) {
715
726
  const [first, ...rest] = addOrigins;
716
727
  logInfo(
717
728
  S.dim(
@@ -807,8 +818,7 @@ function makeListCommand() {
807
818
  try {
808
819
  declared = await am2.listDeclared(kind);
809
820
  } catch (err2) {
810
- if (err2 instanceof MissingManifestError)
811
- logErr(`No ${S.cmd("skaile.yaml")} found. Run ${S.cmd("skaile init")} to create one.`);
821
+ if (err2 instanceof MissingManifestError) logNoProject(opts.projectDir);
812
822
  else logErr(err2 instanceof Error ? err2.message : String(err2));
813
823
  process.exit(1);
814
824
  }
@@ -921,7 +931,7 @@ async function resolveInfoEntry(am2, ref, opts) {
921
931
  return { entry: match ?? deployed };
922
932
  }
923
933
  const lookup = opts.storeLookup ?? (async (filter) => {
924
- const { resolveCatalogSource } = await import('../open-library-N6ESO6IK.js');
934
+ const { resolveCatalogSource } = await import('../open-library-QNMIMZYS.js');
925
935
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
926
936
  try {
927
937
  return await source.listAssets(filter);
@@ -937,7 +947,7 @@ async function resolveInfoEntry(am2, ref, opts) {
937
947
  );
938
948
  return { entry: hit ? catalogAssetToEntry(hit) : null };
939
949
  } catch (err2) {
940
- const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-N6ESO6IK.js');
950
+ const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-QNMIMZYS.js');
941
951
  const storeNote = err2 instanceof Error ? err2.message : String(err2);
942
952
  const disabled = err2 instanceof LocalCatalogDisabledError2 || /catalog\.url/i.test(storeNote);
943
953
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -1020,11 +1030,13 @@ function makeDoctorCommand() {
1020
1030
  projectDir: path22__default.resolve(opts.projectDir)
1021
1031
  });
1022
1032
  const { gaps } = await am2.projectState();
1023
- if (gaps.length === 0) {
1033
+ const edited = await editedConventionFiles(path22__default.resolve(opts.projectDir));
1034
+ if (gaps.length === 0 && edited.length === 0) {
1024
1035
  logOk("No missing dependencies.");
1025
1036
  return;
1026
1037
  }
1027
1038
  process.exitCode = 1;
1039
+ for (const e of edited) logErr(e);
1028
1040
  for (const g of gaps) if (g.type !== "requires") logErr(g.message);
1029
1041
  const missing = gaps.filter((g) => g.type === "requires" && g.asset !== void 0);
1030
1042
  if (missing.length === 0) return;
@@ -1054,16 +1066,16 @@ function claudeSkillRoots() {
1054
1066
  }
1055
1067
  function resolveImportSource(nameOrPath) {
1056
1068
  const asPath = path22.resolve(nameOrPath);
1057
- if (fs8.existsSync(asPath)) {
1058
- const dir = fs8.statSync(asPath).isDirectory() ? asPath : path22.dirname(asPath);
1069
+ if (fs9.existsSync(asPath)) {
1070
+ const dir = fs9.statSync(asPath).isDirectory() ? asPath : path22.dirname(asPath);
1059
1071
  const skillFile = path22.join(dir, "SKILL.md");
1060
- if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "path" };
1072
+ if (fs9.existsSync(skillFile)) return { dir, skillFile, via: "path" };
1061
1073
  }
1062
1074
  if (!nameOrPath.includes(path22.sep) && !nameOrPath.startsWith(".")) {
1063
1075
  for (const root of claudeSkillRoots()) {
1064
1076
  const dir = path22.join(root, nameOrPath);
1065
1077
  const skillFile = path22.join(dir, "SKILL.md");
1066
- if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
1078
+ if (fs9.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
1067
1079
  }
1068
1080
  }
1069
1081
  return null;
@@ -1196,7 +1208,13 @@ function makeAssetCommand() {
1196
1208
  process.exit(1);
1197
1209
  }
1198
1210
  exitOnManifestPublisherProblems(target.path, target.name);
1199
- const rawSkill = fs8.readFileSync(src.skillFile, "utf8");
1211
+ if (reportLibrarySymlinks(src.dir, { rootIsAsset: true }) > 0) {
1212
+ logErr(
1213
+ `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.`
1214
+ );
1215
+ process.exit(1);
1216
+ }
1217
+ const rawSkill = fs9.readFileSync(src.skillFile, "utf8");
1200
1218
  const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
1201
1219
  fallbackName: path22.basename(src.dir),
1202
1220
  version: opts.version,
@@ -1208,7 +1226,7 @@ function makeAssetCommand() {
1208
1226
  );
1209
1227
  }
1210
1228
  const destDir = path22.join(target.path, norm.name);
1211
- if (fs8.existsSync(destDir)) {
1229
+ if (fs9.existsSync(destDir)) {
1212
1230
  logErr(`Destination already exists: ${destDir}`);
1213
1231
  process.exit(1);
1214
1232
  }
@@ -1238,8 +1256,8 @@ function makeAssetCommand() {
1238
1256
  for (const f of checked.advisories) {
1239
1257
  logWarn(`${norm.name}/SKILL.md [${f.tag}] \u2014 ${f.text}`);
1240
1258
  }
1241
- fs8.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
1242
- fs8.writeFileSync(path22.join(destDir, "SKILL.md"), norm.content, "utf8");
1259
+ fs9.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
1260
+ fs9.writeFileSync(path22.join(destDir, "SKILL.md"), norm.content, "utf8");
1243
1261
  for (const note of norm.notes) logInfo(` \u2022 ${note}`);
1244
1262
  const fm = parseFrontmatter(norm.content).data;
1245
1263
  for (const f of checkAgentSkillConformance(fm, { dirName: norm.name })) {
@@ -1279,7 +1297,7 @@ function makeAssetCommand() {
1279
1297
  logErr(`Invalid --mode "${opts.mode}". Expected: copy | move | link.`);
1280
1298
  process.exit(1);
1281
1299
  }
1282
- if (!fs8.existsSync(srcPath)) {
1300
+ if (!fs9.existsSync(srcPath)) {
1283
1301
  logErr(`Source path does not exist: ${srcPath}`);
1284
1302
  process.exit(1);
1285
1303
  }
@@ -1307,21 +1325,27 @@ function makeAssetCommand() {
1307
1325
  }
1308
1326
  const basename3 = path22.basename(srcPath);
1309
1327
  const destDir = target.path;
1310
- fs8.mkdirSync(destDir, { recursive: true });
1328
+ fs9.mkdirSync(destDir, { recursive: true });
1311
1329
  const destPath = path22.join(destDir, basename3);
1312
- if (fs8.existsSync(destPath)) {
1330
+ if (fs9.existsSync(destPath)) {
1313
1331
  logErr(`Destination already exists: ${destPath}`);
1314
1332
  process.exit(1);
1315
1333
  }
1334
+ if (opts.mode === "copy" && reportLibrarySymlinks(srcPath, { rootIsAsset: true }) > 0) {
1335
+ logErr(
1336
+ `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.`
1337
+ );
1338
+ process.exit(1);
1339
+ }
1316
1340
  switch (opts.mode) {
1317
1341
  case "copy":
1318
- fs8.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
1342
+ fs9.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
1319
1343
  break;
1320
1344
  case "move":
1321
- fs8.renameSync(srcPath, destPath);
1345
+ fs9.renameSync(srcPath, destPath);
1322
1346
  break;
1323
1347
  case "link":
1324
- fs8.symlinkSync(path22.resolve(srcPath), destPath);
1348
+ fs9.symlinkSync(path22.resolve(srcPath), destPath);
1325
1349
  break;
1326
1350
  }
1327
1351
  if (target.backend === "git" && opts.commit) {
@@ -1337,7 +1361,7 @@ function makeAssetCommand() {
1337
1361
  }
1338
1362
  logOk(`Migrated ${basename3} \u2192 ${target.name} (${opts.mode})`);
1339
1363
  const publisher = loadSkPublishManifest(target.path)?.publisher ?? "<publisher>";
1340
- const migratedKind = fs8.existsSync(path22.join(destPath, "SKILL.md")) ? "skill" : "<kind>";
1364
+ const migratedKind = fs9.existsSync(path22.join(destPath, "SKILL.md")) ? "skill" : "<kind>";
1341
1365
  logInfo(
1342
1366
  `Not addable yet: run ${S.cmd(`skaile library index ${target.name}`)}, then ${S.cmd(`skaile add ${migratedKind}:@${publisher.replace(/^@/, "")}/${basename3}`)}`
1343
1367
  );
@@ -1568,7 +1592,11 @@ function makeCatalogCommand() {
1568
1592
  );
1569
1593
  return;
1570
1594
  }
1571
- await runRemoteCatalogProbe(baseUrl, trpcGetUrl(baseUrl, "catalog.listKinds", void 0));
1595
+ await runRemoteCatalogProbe(
1596
+ baseUrl,
1597
+ cfg.catalog.framing,
1598
+ trpcGetUrl(baseUrl, "catalog.listKinds", void 0)
1599
+ );
1572
1600
  });
1573
1601
  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
1602
  const { resolveConfig } = await import('../library/index.js');
@@ -1581,14 +1609,16 @@ function makeCatalogCommand() {
1581
1609
  return catalog;
1582
1610
  }
1583
1611
  async function runLocalCatalogTest(projectDir) {
1584
- const { resolveCatalogSource } = await import('../open-library-N6ESO6IK.js');
1612
+ const { resolveCatalogSource } = await import('../open-library-QNMIMZYS.js');
1585
1613
  let resolved;
1586
1614
  try {
1587
1615
  resolved = await resolveCatalogSource({ projectDir });
1588
1616
  const sources = await resolved.source.listSources();
1589
1617
  logOk("Catalog mode: local");
1590
1618
  if (sources.length === 0) {
1591
- logInfo("No local sources registered. Run `skaile source add <path>` first.");
1619
+ logInfo(
1620
+ "No local sources registered. Run `skaile library init <name> --path <dir>` first (a git repo: `skaile source add <git-url>`)."
1621
+ );
1592
1622
  } else {
1593
1623
  for (const s of sources) {
1594
1624
  console.log(` ${S.dim("\u2022")} ${s.type} ${S.heading(s.url)}`);
@@ -1609,7 +1639,8 @@ function isTrpcEnvelope(text) {
1609
1639
  return false;
1610
1640
  }
1611
1641
  }
1612
- async function runRemoteCatalogProbe(baseUrl, probeUrl) {
1642
+ async function runRemoteCatalogProbe(baseUrl, framing, trpcProbeUrl) {
1643
+ const probeUrl = framing === "rest" ? `${baseUrl.replace(/\/+$/, "")}/api/catalog/list` : trpcProbeUrl;
1613
1644
  const controller = new AbortController();
1614
1645
  const timeout = setTimeout(() => controller.abort(), 5e3);
1615
1646
  try {
@@ -1620,10 +1651,24 @@ async function runRemoteCatalogProbe(baseUrl, probeUrl) {
1620
1651
  });
1621
1652
  const ms = Date.now() - started;
1622
1653
  if (!res.ok) {
1654
+ if (framing === "rest" && (res.status === 404 || res.status === 405)) {
1655
+ const trpc = await fetch(trpcProbeUrl, {
1656
+ signal: controller.signal,
1657
+ headers: { accept: "application/json" }
1658
+ }).catch(() => null);
1659
+ if (trpc?.ok && isTrpcEnvelope((await trpc.text()).trim())) {
1660
+ logErr(
1661
+ `${baseUrl} serves the tRPC catalog, but catalog.framing is rest (${probeUrl} answered ${res.status}).`
1662
+ );
1663
+ logInfo(`Set it with: skaile config set catalog.framing trpc`);
1664
+ process.exitCode = 1;
1665
+ return;
1666
+ }
1667
+ }
1623
1668
  logErr(`${probeUrl} responded ${res.status} ${res.statusText} (${ms}ms)`);
1624
1669
  if (res.status === 404) {
1625
1670
  logInfo(
1626
- `Got 404 from catalog.listKinds. Check the URL prefix in ${userConfigPath()} \u2014 Skaile mirrors must expose \`/trpc/catalog.*\` at the configured baseUrl.`
1671
+ 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
1672
  );
1628
1673
  } else {
1629
1674
  logInfo(
@@ -1634,17 +1679,27 @@ async function runRemoteCatalogProbe(baseUrl, probeUrl) {
1634
1679
  return;
1635
1680
  }
1636
1681
  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;
1682
+ if (framing === "trpc") {
1683
+ if (!isTrpcEnvelope(text)) {
1684
+ logWarn(
1685
+ `Catalog reachable at ${baseUrl} (${ms}ms) but the response is not a valid tRPC envelope.`
1686
+ );
1687
+ logInfo(
1688
+ "The host responded 200 but the body is not Skaile's catalog router shape. Check that `catalog.listKinds` is mounted at the configured baseUrl."
1689
+ );
1690
+ process.exitCode = 1;
1691
+ return;
1692
+ }
1693
+ } else {
1694
+ try {
1695
+ JSON.parse(text);
1696
+ } catch {
1697
+ logWarn(`Catalog reachable at ${baseUrl} (${ms}ms) but /api/catalog/list is not JSON.`);
1698
+ process.exitCode = 1;
1699
+ return;
1700
+ }
1646
1701
  }
1647
- logOk(`Catalog reachable at ${S.heading(baseUrl)} (${ms}ms)`);
1702
+ logOk(`Catalog reachable at ${S.heading(baseUrl)} (${ms}ms, framing ${framing})`);
1648
1703
  } catch (err2) {
1649
1704
  if (err2 instanceof Error && err2.name === "AbortError") {
1650
1705
  logErr(`Timeout reaching ${probeUrl} after 5s`);
@@ -1724,7 +1779,7 @@ async function scanLibraryFlowEntries() {
1724
1779
  const { LocalIndex, resolveIndexPath, scanAuthoringLibraries } = await import('../library/index.js');
1725
1780
  const indexPath = resolveIndexPath();
1726
1781
  if (!existsSync(indexPath)) return entries;
1727
- const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-CBZ5MWTT.js');
1782
+ const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-BOUCBDLF.js');
1728
1783
  const index = new LocalIndex({ indexPath });
1729
1784
  try {
1730
1785
  for (const { assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
@@ -1774,11 +1829,11 @@ function findSkills() {
1774
1829
  return deduped;
1775
1830
  }
1776
1831
  function walkSkills(dir, out) {
1777
- for (const entry of fs8__default.readdirSync(dir, { withFileTypes: true })) {
1832
+ for (const entry of fs9__default.readdirSync(dir, { withFileTypes: true })) {
1778
1833
  const full = path22__default.join(dir, entry.name);
1779
1834
  if (entry.isDirectory()) {
1780
1835
  const skillMd = path22__default.join(full, "SKILL.md");
1781
- if (fs8__default.existsSync(skillMd)) {
1836
+ if (fs9__default.existsSync(skillMd)) {
1782
1837
  out.push({ name: entry.name, path: full, skillPath: skillMd });
1783
1838
  } else {
1784
1839
  walkSkills(full, out);
@@ -1800,9 +1855,9 @@ function resolveFlowIds() {
1800
1855
  }
1801
1856
  function resolveSessionIds(projectDir) {
1802
1857
  const sessionsDir = path22__default.join(projectDir, ".skaile", "sessions");
1803
- if (!fs8__default.existsSync(sessionsDir)) return [];
1858
+ if (!fs9__default.existsSync(sessionsDir)) return [];
1804
1859
  try {
1805
- return fs8__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1860
+ return fs9__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1806
1861
  } catch {
1807
1862
  return [];
1808
1863
  }
@@ -1868,10 +1923,10 @@ async function setCatalogKey(key, raw) {
1868
1923
  process.exit(1);
1869
1924
  }
1870
1925
  const filePath = userConfigPath();
1871
- const fs13 = await import('fs');
1926
+ const fs14 = await import('fs');
1872
1927
  let existing = {};
1873
- if (fs13.existsSync(filePath)) {
1874
- const parsed = parseYaml5(fs13.readFileSync(filePath, "utf-8"));
1928
+ if (fs14.existsSync(filePath)) {
1929
+ const parsed = parseYaml5(fs14.readFileSync(filePath, "utf-8"));
1875
1930
  if (parsed && typeof parsed === "object") existing = parsed;
1876
1931
  }
1877
1932
  const catalog = {
@@ -2728,7 +2783,7 @@ async function ensureTargetsRegistered(projectDir) {
2728
2783
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2729
2784
  const config = resolveSkWorkspaceConfig2(projectDir);
2730
2785
  if (config.plugins && config.plugins.length > 0) {
2731
- const { ensurePluginsLoaded } = await import('../plugin-store-XMZSPVBF.js');
2786
+ const { ensurePluginsLoaded } = await import('../plugin-store-MLFP3WJ7.js');
2732
2787
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
2733
2788
  for (const f of result.failed) logWarn(f.error);
2734
2789
  }
@@ -2872,9 +2927,9 @@ function makeDiffCommand() {
2872
2927
  }
2873
2928
  const gaps = await am2.gapsOf(ref);
2874
2929
  const requirementGaps = await am2.requirementGapsOf(ref);
2875
- const blocking = [...gaps.filter((g) => !DIFF_SHOWS[g.type]), ...requirementGaps];
2930
+ const blocking = gaps.filter((g) => !DIFF_SHOWS[g.type]);
2876
2931
  if (blocking.length > 0) {
2877
- for (const g of blocking) logErr(g.message);
2932
+ for (const g of [...blocking, ...requirementGaps]) logErr(g.message);
2878
2933
  process.exitCode = 1;
2879
2934
  return;
2880
2935
  }
@@ -2895,18 +2950,19 @@ function makeDiffCommand() {
2895
2950
  }
2896
2951
  break;
2897
2952
  case "no-files":
2898
- if (problems.length === 0)
2953
+ if (problems.length === 0 && requirementGaps.length === 0)
2899
2954
  logInfo(`${ref}: preset has no files of its own; run skaile diff on its items`);
2900
2955
  break;
2901
2956
  case "identical":
2902
- if (problems.length === 0) logInfo("No differences.");
2957
+ if (problems.length === 0 && requirementGaps.length === 0) logInfo("No differences.");
2903
2958
  break;
2904
2959
  case "differs":
2905
2960
  console.log(result.diff);
2906
2961
  break;
2907
2962
  }
2908
- for (const g of problems) logErr(g.message);
2909
- if (result.status === "not-found" || problems.length > 0) process.exitCode = 1;
2963
+ for (const g of [...problems, ...requirementGaps]) logErr(g.message);
2964
+ if (result.status === "not-found" || problems.length > 0 || requirementGaps.length > 0)
2965
+ process.exitCode = 1;
2910
2966
  });
2911
2967
  }
2912
2968
  function makeFlowCommand() {
@@ -3086,24 +3142,30 @@ async function uninstall(projectDir) {
3086
3142
  const settingsPath = path22__default.join(projectDir, ".claude", "settings.json");
3087
3143
  const mcpPath = mcpFilePath(projectDir);
3088
3144
  const dir = pluginDir(projectDir);
3089
- let changed = false;
3145
+ const rel = (p6) => path22__default.relative(projectDir, p6);
3146
+ const files = [];
3090
3147
  const settings = await readJsonStrict(settingsPath);
3091
3148
  if (settings && Array.isArray(settings.plugins)) {
3092
3149
  const next = settings.plugins.filter((p6) => p6 !== dir);
3093
3150
  if (next.length !== settings.plugins.length) {
3094
- changed = true;
3151
+ files.push(rel(settingsPath));
3095
3152
  const updated = { ...settings, plugins: next };
3096
3153
  if (next.length === 0) delete updated.plugins;
3097
- await writeJson(settingsPath, updated);
3154
+ if (Object.keys(updated).length === 0) await fs5.unlink(settingsPath);
3155
+ else await writeJson(settingsPath, updated);
3098
3156
  }
3099
3157
  }
3100
3158
  if (existsSync(dir)) {
3101
3159
  await fs5.rm(dir, { recursive: true, force: true });
3102
- changed = true;
3160
+ files.push(rel(dir));
3103
3161
  }
3104
- if (await removeSkaileMcpEntry(mcpPath)) changed = true;
3105
- if (await removeSkaileMcpEntry(legacyMcpFilePath(projectDir))) changed = true;
3106
- return { changed };
3162
+ if (await removeSkaileMcpEntry(mcpPath)) files.push(rel(mcpPath));
3163
+ const legacyPath = legacyMcpFilePath(projectDir);
3164
+ if (await removeSkaileMcpEntry(legacyPath)) files.push(rel(legacyPath));
3165
+ for (const emptyDir of [path22__default.dirname(dir), path22__default.join(projectDir, ".claude")]) {
3166
+ await fs5.rmdir(emptyDir).catch(() => void 0);
3167
+ }
3168
+ return { changed: files.length > 0, files };
3107
3169
  }
3108
3170
  async function detectInstall(projectDir) {
3109
3171
  const dir = pluginDir(projectDir);
@@ -3398,13 +3460,18 @@ async function runInstall(opts) {
3398
3460
  if (targets.includes("codex")) {
3399
3461
  exitCode |= await runHarnessStep("codex install", () => installCodex(projectDir));
3400
3462
  }
3401
- if (exitCode === 0) logOk("Plugin installed.");
3463
+ if (exitCode === 0) {
3464
+ await ignorePerMachineFiles(projectDir, targets);
3465
+ logOk("Plugin installed.");
3466
+ }
3402
3467
  return exitCode;
3403
3468
  }
3404
3469
  async function uninstallClaudeCode(projectDir) {
3405
3470
  const r = await uninstall(projectDir);
3406
- if (r.changed) logOk(`Removed skaile entries from ${S.cmd(".claude/")}`);
3407
- else logInfo(`claude-code: not installed`);
3471
+ if (r.changed) {
3472
+ const from = (r.files ?? []).map((f) => S.cmd(f)).join(", ");
3473
+ logOk(`Removed skaile entries from ${from || S.cmd(".claude/")}`);
3474
+ } else logInfo(`claude-code: not installed`);
3408
3475
  }
3409
3476
  async function uninstallOmp(projectDir) {
3410
3477
  const r = await uninstall3(projectDir);
@@ -3432,9 +3499,46 @@ async function runUninstall(opts) {
3432
3499
  if (targets.includes("codex")) {
3433
3500
  exitCode |= await runHarnessStep("codex uninstall", () => uninstallCodex(projectDir));
3434
3501
  }
3435
- if (exitCode === 0) logOk("Plugin uninstalled.");
3502
+ if (exitCode === 0) {
3503
+ await removeEmptyPluginState(projectDir);
3504
+ logOk("Plugin uninstalled.");
3505
+ }
3436
3506
  return exitCode;
3437
3507
  }
3508
+ async function removeEmptyPluginState(projectDir) {
3509
+ const stateFile = path22__default.join(projectDir, ".skaile", "plugin-state.json");
3510
+ try {
3511
+ const parsed = JSON.parse(await fs5.readFile(stateFile, "utf-8"));
3512
+ if (typeof parsed !== "object" || parsed === null || Object.keys(parsed).length > 0) return;
3513
+ await fs5.unlink(stateFile);
3514
+ await fs5.rmdir(path22__default.dirname(stateFile)).catch(() => void 0);
3515
+ } catch {
3516
+ }
3517
+ }
3518
+ var PER_MACHINE_FILES = {
3519
+ "claude-code": [".skaile/plugin-state.json"],
3520
+ omp: [".omp/extensions/skaile.ts", ".skaile/plugin-state.json"],
3521
+ codex: [".codex/config.toml", ".skaile/plugin-state.json"]
3522
+ };
3523
+ async function ignorePerMachineFiles(projectDir, targets) {
3524
+ const gitignore = path22__default.join(projectDir, ".gitignore");
3525
+ let existing = null;
3526
+ try {
3527
+ existing = await fs5.readFile(gitignore, "utf-8");
3528
+ } catch {
3529
+ if (!existsSync(path22__default.join(projectDir, ".git"))) return;
3530
+ }
3531
+ const have = new Set((existing ?? "").split("\n").map((l) => l.trim()));
3532
+ const wanted = [...new Set(targets.flatMap((t) => PER_MACHINE_FILES[t]))];
3533
+ const missing = wanted.filter((f) => !have.has(f));
3534
+ if (missing.length === 0) return;
3535
+ const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
3536
+ await fs5.writeFile(gitignore, `${existing ?? ""}${prefix}${missing.join("\n")}
3537
+ `);
3538
+ logInfo(
3539
+ `Added ${missing.map((f) => S.cmd(f)).join(", ")} to ${S.cmd(".gitignore")} (per machine)`
3540
+ );
3541
+ }
3438
3542
  function checkToggleSupported(targets, requestedAll, action3) {
3439
3543
  if (requestedAll) return null;
3440
3544
  const unsupported = targets.filter((t) => !TOGGLE_SUPPORTED.includes(t));
@@ -3665,13 +3769,14 @@ function unfinishedGitState(dir) {
3665
3769
  for (const [entry, state2] of Object.entries(UNFINISHED_GIT_ENTRIES)) {
3666
3770
  const p6 = spawnSync("git", ["rev-parse", "--git-path", entry], { cwd: dir, encoding: "utf-8" });
3667
3771
  if (p6.status !== 0) return "the git directory could not be read";
3668
- if (fs8.existsSync(path22.resolve(dir, p6.stdout.trim()))) return state2;
3772
+ if (fs9.existsSync(path22.resolve(dir, p6.stdout.trim()))) return state2;
3669
3773
  }
3670
3774
  return null;
3671
3775
  }
3672
3776
  async function reindexLibrary(lib, library, name) {
3673
3777
  assertManifestEditableOrExit(lib.path);
3674
3778
  exitOnManifestPublisherProblems(lib.path, name);
3779
+ exitOnLibrarySymlinks(lib.path, `skaile library index ${name}`);
3675
3780
  const badRequires = manifestRequiresProblems(lib.path);
3676
3781
  const resolved = resolveLibraryPublisherDetailed(lib, {}, getStoreIdentity());
3677
3782
  warnLibraryNameFallback(name, resolved);
@@ -3680,7 +3785,17 @@ async function reindexLibrary(lib, library, name) {
3680
3785
  lib.path,
3681
3786
  resolved.publisher,
3682
3787
  registry,
3683
- { check: (e) => checkAssetFile(e.source, e.kind, registry, lib.path) }
3788
+ {
3789
+ check: (e) => checkAssetFile(
3790
+ e.source,
3791
+ e.kind,
3792
+ registry,
3793
+ lib.path,
3794
+ (f) => logWarn(
3795
+ `${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`
3796
+ )
3797
+ )
3798
+ }
3684
3799
  );
3685
3800
  const manifest = loadSkPublishManifest(lib.path);
3686
3801
  for (const a of unknownKind) {
@@ -3768,8 +3883,16 @@ async function indexPulledLibrary(lib, library, name) {
3768
3883
  const res = await indexLibrary(lib, library);
3769
3884
  for (const e of res.errors) logWarn(e);
3770
3885
  logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
3886
+ warnUnlistedAssets(await countUnlistedAssets(lib.path), name);
3771
3887
  warnIgnoredDomainFiles(lib.path);
3772
3888
  }
3889
+ function warnUnlistedAssets(unlisted, name) {
3890
+ if (unlisted > 0) {
3891
+ logWarn(
3892
+ `${unlisted} asset(s) on disk are not in the manifest; run \`skaile library index ${name}\`.`
3893
+ );
3894
+ }
3895
+ }
3773
3896
  function assertManifestEditableOrExit(libraryPath) {
3774
3897
  try {
3775
3898
  assertManifestEditable(libraryPath);
@@ -3787,13 +3910,13 @@ function canonicalDir(dir) {
3787
3910
  const abs = path22.resolve(dir);
3788
3911
  const missing = [];
3789
3912
  let existing = abs;
3790
- while (!fs8.existsSync(existing)) {
3913
+ while (!fs9.existsSync(existing)) {
3791
3914
  const parent = path22.dirname(existing);
3792
3915
  if (parent === existing) return abs;
3793
3916
  missing.unshift(path22.basename(existing));
3794
3917
  existing = parent;
3795
3918
  }
3796
- return path22.join(fs8.realpathSync(existing), ...missing);
3919
+ return path22.join(fs9.realpathSync(existing), ...missing);
3797
3920
  }
3798
3921
  function refuseGlobalInstallFolder(name, dir) {
3799
3922
  const reserved = globalInstallDir();
@@ -3839,7 +3962,7 @@ async function refuseNestedLibraryPath(manager, dir, exceptId) {
3839
3962
  function assertCreateDirInsideLibrary(libRoot, destDir, given) {
3840
3963
  const exists = (p6) => {
3841
3964
  try {
3842
- fs8.lstatSync(p6);
3965
+ fs9.lstatSync(p6);
3843
3966
  return true;
3844
3967
  } catch {
3845
3968
  return false;
@@ -3849,12 +3972,12 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
3849
3972
  while (!exists(probe)) probe = path22.dirname(probe);
3850
3973
  let realProbe;
3851
3974
  try {
3852
- realProbe = fs8.realpathSync(probe);
3975
+ realProbe = fs9.realpathSync(probe);
3853
3976
  } catch {
3854
3977
  logErr(`--dir "${given}" passes through a broken symlink (${probe}).`);
3855
3978
  process.exit(1);
3856
3979
  }
3857
- if (!fs8.statSync(realProbe).isDirectory()) {
3980
+ if (!fs9.statSync(realProbe).isDirectory()) {
3858
3981
  logErr(`--dir "${given}": ${probe} is not a directory.`);
3859
3982
  process.exit(1);
3860
3983
  }
@@ -3869,7 +3992,7 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
3869
3992
  }
3870
3993
  }
3871
3994
  function adoptWritesManifest(libPath) {
3872
- if (!fs8.existsSync(path22.join(libPath, SKAILE_MANIFEST_FILENAME))) return true;
3995
+ if (!fs9.existsSync(path22.join(libPath, SKAILE_MANIFEST_FILENAME))) return true;
3873
3996
  const manifest = loadSkPublishManifest(libPath);
3874
3997
  if (!manifest || manifest.source || (manifest.assets ?? []).length > 0) return false;
3875
3998
  return manifestPublisherProblems(libPath).length === 0;
@@ -3927,13 +4050,22 @@ function pruneEmptyLibraryParents(libPath) {
3927
4050
  for (; ; ) {
3928
4051
  const rel = path22.relative(root, canonicalDir(dir));
3929
4052
  if (rel === "" || rel.startsWith("..") || path22.isAbsolute(rel)) return;
3930
- if (!fs8.existsSync(dir) || fs8.readdirSync(dir).length > 0) return;
3931
- fs8.rmdirSync(dir);
4053
+ if (!fs9.existsSync(dir) || fs9.readdirSync(dir).length > 0) return;
4054
+ fs9.rmdirSync(dir);
3932
4055
  dir = path22.dirname(dir);
3933
4056
  }
3934
4057
  }
4058
+ function remoteBranches(url) {
4059
+ const r = spawnSync("git", ["ls-remote", "--heads", url], {
4060
+ encoding: "utf-8",
4061
+ timeout: 2e4,
4062
+ env: { ...process.env, GIT_TERMINAL_PROMPT: "0" }
4063
+ });
4064
+ if (r.status !== 0) return [];
4065
+ return r.stdout.split("\n").map((line) => line.split(" ")[1]?.replace(/^refs\/heads\//, "")).filter((b) => !!b);
4066
+ }
3935
4067
  async function warnIfNotGithubRemote(name, url) {
3936
- const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-DI4Q5UOG.js');
4068
+ const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-EUP524PE.js');
3937
4069
  if (!isGithubRemote(url)) logWarn(notGithubRemoteMessage(name, url));
3938
4070
  }
3939
4071
  function scaffoldLibraryFiles(dir, name) {
@@ -3966,8 +4098,8 @@ by the same ref.
3966
4098
  const written = [];
3967
4099
  for (const [file, content] of files) {
3968
4100
  const target = path22.join(dir, file);
3969
- if (fs8.existsSync(target)) continue;
3970
- fs8.writeFileSync(target, content, "utf8");
4101
+ if (fs9.existsSync(target)) continue;
4102
+ fs9.writeFileSync(target, content, "utf8");
3971
4103
  written.push(file);
3972
4104
  }
3973
4105
  return written;
@@ -4057,7 +4189,7 @@ function makeLibraryCommand() {
4057
4189
  const ownership = flagged[0] ?? gone?.ownership ?? "owner";
4058
4190
  const libPath = opts.path ? path22.resolve(opts.path) : path22.join(resolveLibraryDir(), name);
4059
4191
  refuseGlobalInstallFolder(name, libPath);
4060
- if (fs8.existsSync(libPath) && !fs8.statSync(libPath).isDirectory()) {
4192
+ if (fs9.existsSync(libPath) && !fs9.statSync(libPath).isDirectory()) {
4061
4193
  logErr(`${libPath} exists and is not a directory.`);
4062
4194
  process.exit(1);
4063
4195
  }
@@ -4096,9 +4228,9 @@ function makeLibraryCommand() {
4096
4228
  backend = "git";
4097
4229
  backendConfig = { url: adopted.url, branch: adopted.branch, authHint: "ssh" };
4098
4230
  } else {
4099
- fs8.mkdirSync(libPath, { recursive: true });
4231
+ fs9.mkdirSync(libPath, { recursive: true });
4100
4232
  }
4101
- const blank = fs8.readdirSync(libPath).every((entry) => entry === ".git");
4233
+ const blank = fs9.readdirSync(libPath).every((entry) => entry === ".git");
4102
4234
  const isDefault = !hasDefault && ownership !== "reader";
4103
4235
  await manager.addLibrary({
4104
4236
  name,
@@ -4143,11 +4275,7 @@ function makeLibraryCommand() {
4143
4275
  const res = await indexLibrary(lib, library);
4144
4276
  for (const e of res.errors) logWarn(e);
4145
4277
  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
- }
4278
+ warnUnlistedAssets(unlisted, name);
4151
4279
  warnIgnoredDomainFiles(libPath);
4152
4280
  }
4153
4281
  } catch (err2) {
@@ -4175,6 +4303,15 @@ function makeLibraryCommand() {
4175
4303
  encoding: "utf-8"
4176
4304
  }) : void 0;
4177
4305
  const branch = opts.branch ?? (head?.status === 0 && head.stdout.trim() || "main");
4306
+ if (opts.branch === void 0) {
4307
+ const theirs = remoteBranches(url);
4308
+ if (theirs.length > 0 && !theirs.includes(branch)) {
4309
+ logErr(
4310
+ `The remote already has ${theirs.length === 1 ? "branch" : "branches"} ${theirs.join(", ")}; pass --branch ${theirs[0]} to track ${theirs.length === 1 ? "it" : "one"}.`
4311
+ );
4312
+ process.exit(1);
4313
+ }
4314
+ }
4178
4315
  ensureGitRepo(lib.path, url, branch);
4179
4316
  trackOriginBranch(lib.path, branch, { fetch: true });
4180
4317
  await manager.updateLibrary(name, {
@@ -4296,11 +4433,11 @@ function makeLibraryCommand() {
4296
4433
  }
4297
4434
  const newPath = path22.join(path22.dirname(lib.path), newName);
4298
4435
  refuseGlobalInstallFolder(newName, newPath);
4299
- if (fs8.existsSync(newPath)) {
4436
+ if (fs9.existsSync(newPath)) {
4300
4437
  logErr(`Target directory already exists: ${newPath}`);
4301
4438
  process.exit(1);
4302
4439
  }
4303
- fs8.renameSync(lib.path, newPath);
4440
+ fs9.renameSync(lib.path, newPath);
4304
4441
  await manager.updateLibrary(lib.id, { name: newName, path: newPath });
4305
4442
  logOk(`Renamed ${lib.name} \u2192 ${newName}`);
4306
4443
  }
@@ -4381,7 +4518,7 @@ function makeLibraryCommand() {
4381
4518
  patch.isDefault = false;
4382
4519
  } else if (field === "path") {
4383
4520
  const dir = path22.resolve(value);
4384
- if (!fs8.existsSync(dir) || !fs8.statSync(dir).isDirectory()) {
4521
+ if (!fs9.existsSync(dir) || !fs9.statSync(dir).isDirectory()) {
4385
4522
  logErr(`Directory does not exist: ${dir}. \`library set path=\` does not move files.`);
4386
4523
  process.exit(1);
4387
4524
  }
@@ -4592,16 +4729,16 @@ function makeLibraryCommand() {
4592
4729
  "With --create-repo: create the repo private (the store only accepts public repos)"
4593
4730
  ).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
4731
  async (lib, opts) => {
4595
- const { runLibraryPublish } = await import('../library-publish-DI4Q5UOG.js');
4732
+ const { runLibraryPublish } = await import('../library-publish-EUP524PE.js');
4596
4733
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
4597
4734
  }
4598
4735
  );
4599
4736
  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');
4737
+ const { runLibraryRegister } = await import('../library-publish-EUP524PE.js');
4601
4738
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
4602
4739
  });
4603
4740
  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');
4741
+ const { runLibraryYank } = await import('../library-publish-EUP524PE.js');
4605
4742
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
4606
4743
  });
4607
4744
  return cmd;
@@ -5261,7 +5398,7 @@ function scheduleSoftDepPreview() {
5261
5398
  }
5262
5399
  async function loadAssets() {
5263
5400
  softDepPreviewCache.clear();
5264
- const { gatherAssetFeeds } = await import('../asset-feeds-AM6PSSGM.js');
5401
+ const { gatherAssetFeeds } = await import('../asset-feeds-PAOX3FUT.js');
5265
5402
  const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
5266
5403
  if (notes.length > 0) {
5267
5404
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -5465,7 +5602,7 @@ function reconcileCollapsedSets(rows) {
5465
5602
  async function loadSourcesAndLibraries() {
5466
5603
  try {
5467
5604
  const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
5468
- import('../open-library-N6ESO6IK.js'),
5605
+ import('../open-library-QNMIMZYS.js'),
5469
5606
  import('../core/index.js')
5470
5607
  ]);
5471
5608
  const { manager, library, close } = await openLibraryManager2();
@@ -6706,7 +6843,7 @@ function loadAsset(projectDir, id, ref) {
6706
6843
  const manifestPath = path22__default.join(dir, AGENT_MANIFEST_FILE);
6707
6844
  let text;
6708
6845
  try {
6709
- text = fs8__default.readFileSync(manifestPath, "utf-8");
6846
+ text = fs9__default.readFileSync(manifestPath, "utf-8");
6710
6847
  } catch {
6711
6848
  return {
6712
6849
  diagnostic: err(
@@ -6811,6 +6948,7 @@ function checkAgentInstances(projectDir, parsed) {
6811
6948
  const diagnostics = [];
6812
6949
  const instances = normalizeAgentInstances(parsed.agents, diagnostics);
6813
6950
  const agent = isRecord(parsed.agent) ? parsed.agent : void 0;
6951
+ diagnostics.push(...agentBlockKeyDiagnostics(parsed.agent));
6814
6952
  if (agent?.subagents !== void 0) {
6815
6953
  diagnostics.push(
6816
6954
  err(
@@ -6885,7 +7023,7 @@ function findManifestCandidates(rootPath) {
6885
7023
  function walk(dir) {
6886
7024
  let entries;
6887
7025
  try {
6888
- entries = fs8__default.readdirSync(dir, { withFileTypes: true });
7026
+ entries = fs9__default.readdirSync(dir, { withFileTypes: true });
6889
7027
  } catch {
6890
7028
  return;
6891
7029
  }
@@ -6907,7 +7045,7 @@ function findManifestCandidates(rootPath) {
6907
7045
  return candidates;
6908
7046
  }
6909
7047
  function parseManifestCandidate(c, absRoot) {
6910
- const content = fs8__default.readFileSync(c.filePath, "utf-8");
7048
+ const content = fs9__default.readFileSync(c.filePath, "utf-8");
6911
7049
  const res = parseManifestFile(c.filePath, content);
6912
7050
  if (!res.ok) {
6913
7051
  logErr(`${path22__default.relative(absRoot, c.filePath)} [${c.kind}] \u2014 parse error: ${res.reason}`);
@@ -6927,21 +7065,36 @@ function checkComposeKinds(parsed, registry) {
6927
7065
  const diagnostics = [];
6928
7066
  composes.forEach((item, i) => {
6929
7067
  if (item === null || typeof item !== "object") return;
6930
- const kind = item.kind;
7068
+ const fields = item;
7069
+ const kind = fields.kind;
6931
7070
  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
- });
7071
+ if (!PSEUDO_COMPOSE_KINDS.has(kind) && !registry.getProvider(kind)) {
7072
+ diagnostics.push({
7073
+ code: "unknown_asset_kind",
7074
+ severity: "error",
7075
+ message: `composes item kind "${kind}" is not a registered asset kind (registered: ${registry.getAllKinds().join(", ")})`,
7076
+ path: `composes[${i}].kind`
7077
+ });
7078
+ return;
7079
+ }
7080
+ if (fields.binding !== void 0 || typeof fields.ref !== "string") return;
7081
+ try {
7082
+ resolveBinding({ kind, ref: fields.ref });
7083
+ } catch (err2) {
7084
+ if (!(err2 instanceof UnknownCompositionKindError)) throw err2;
7085
+ diagnostics.push({
7086
+ code: "unknown_asset_kind",
7087
+ severity: "error",
7088
+ message: `composes item "${fields.ref}" of kind "${kind}" has no default binding; set \`binding:\` (the session build fails without it)`,
7089
+ path: `composes[${i}].binding`
7090
+ });
7091
+ }
6939
7092
  });
6940
7093
  return diagnostics;
6941
7094
  }
6942
7095
  function libraryRootOf(absRoot) {
6943
7096
  for (let dir = absRoot; ; dir = path22__default.dirname(dir)) {
6944
- if (fs8__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
7097
+ if (fs9__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
6945
7098
  if (path22__default.dirname(dir) === dir) return absRoot;
6946
7099
  }
6947
7100
  }
@@ -6956,7 +7109,8 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
6956
7109
  body,
6957
7110
  dirName,
6958
7111
  registry,
6959
- fs8__default.readFileSync(c.filePath, "utf-8")
7112
+ fs9__default.readFileSync(c.filePath, "utf-8"),
7113
+ path22__default.basename(c.filePath)
6960
7114
  );
6961
7115
  for (const f of checked.errors) {
6962
7116
  logErr(`${relPath} [${f.tag}] \u2014 ${f.text}`);
@@ -6964,7 +7118,7 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
6964
7118
  }
6965
7119
  for (const f of checked.advisories) {
6966
7120
  const line = `${relPath} [${f.tag}] \u2014 ${f.text}`;
6967
- if (f.conformance && strictConformance) {
7121
+ if (f.conformance && strictConformance || f.scaffoldBody) {
6968
7122
  logErr(line);
6969
7123
  errors++;
6970
7124
  } else {
@@ -7000,15 +7154,33 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
7000
7154
  }
7001
7155
  return { errors, warnings };
7002
7156
  }
7157
+ function scanIdentities(root) {
7158
+ const identities = /* @__PURE__ */ new Set();
7159
+ for (const c of findManifestCandidates(root)) {
7160
+ let parsed;
7161
+ try {
7162
+ const res = parseManifestFile(c.filePath, fs9__default.readFileSync(c.filePath, "utf-8"));
7163
+ if (!res.ok) continue;
7164
+ parsed = res.data;
7165
+ } catch {
7166
+ continue;
7167
+ }
7168
+ if (parsed === null || typeof parsed !== "object") continue;
7169
+ const identity = parsed[c.kind === "flow" ? "id" : "name"];
7170
+ if (typeof identity === "string" && identity.length > 0)
7171
+ identities.add(`${c.kind}:${identity}`);
7172
+ }
7173
+ return identities;
7174
+ }
7003
7175
  function validateManifests(rootPath, strictConformance) {
7004
7176
  const absRoot = path22__default.resolve(rootPath);
7005
- if (!fs8__default.existsSync(absRoot)) {
7177
+ if (!fs9__default.existsSync(absRoot)) {
7006
7178
  logErr(`Path does not exist: ${absRoot}`);
7007
7179
  return { total: 0, errors: 1, warnings: 0 };
7008
7180
  }
7009
7181
  const registry = getKindRegistry();
7010
7182
  const candidates = findManifestCandidates(absRoot);
7011
- let errors = 0;
7183
+ let errors = reportLibrarySymlinks(absRoot);
7012
7184
  let warnings = 0;
7013
7185
  const seenIdentity = /* @__PURE__ */ new Map();
7014
7186
  const agentsToResolve = [];
@@ -7050,8 +7222,10 @@ function validateManifests(rootPath, strictConformance) {
7050
7222
  }
7051
7223
  }
7052
7224
  }
7053
- const libraryPublisher = loadSkPublishManifest(libraryRootOf(absRoot))?.publisher;
7054
- const hasAsset = (kind, name) => seenIdentity.has(`${kind}:${name}`);
7225
+ const libraryRoot = libraryRootOf(absRoot);
7226
+ const libraryPublisher = loadSkPublishManifest(libraryRoot)?.publisher;
7227
+ const siblingIdentities = libraryRoot === absRoot ? /* @__PURE__ */ new Set() : scanIdentities(libraryRoot);
7228
+ const hasAsset = (kind, name) => seenIdentity.has(`${kind}:${name}`) || siblingIdentities.has(`${kind}:${name}`);
7055
7229
  for (const agent of agentsToResolve) {
7056
7230
  for (const f of agentComposeRefAdvisories(agent.parsed, hasAsset, libraryPublisher)) {
7057
7231
  logWarn(`${agent.relPath} [${f.tag}] \u2014 ${f.text}`);
@@ -7065,7 +7239,7 @@ function findWorkspaceManifests(rootPath) {
7065
7239
  function walk(dir) {
7066
7240
  let entries;
7067
7241
  try {
7068
- entries = fs8__default.readdirSync(dir, { withFileTypes: true });
7242
+ entries = fs9__default.readdirSync(dir, { withFileTypes: true });
7069
7243
  } catch {
7070
7244
  return;
7071
7245
  }
@@ -7132,7 +7306,7 @@ function validateWorkspaceAssets(parsed, relPath) {
7132
7306
  }
7133
7307
  return errors;
7134
7308
  }
7135
- function validateWorkspaceManifests(rootPath) {
7309
+ async function validateWorkspaceManifests(rootPath) {
7136
7310
  const absRoot = path22__default.resolve(rootPath);
7137
7311
  const files = findWorkspaceManifests(absRoot);
7138
7312
  let errors = 0;
@@ -7140,7 +7314,7 @@ function validateWorkspaceManifests(rootPath) {
7140
7314
  const relPath = path22__default.relative(absRoot, file);
7141
7315
  let parsed;
7142
7316
  try {
7143
- parsed = parse(fs8__default.readFileSync(file, "utf-8")) ?? {};
7317
+ parsed = parse(fs9__default.readFileSync(file, "utf-8")) ?? {};
7144
7318
  } catch (e) {
7145
7319
  logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
7146
7320
  errors++;
@@ -7157,11 +7331,22 @@ function validateWorkspaceManifests(rootPath) {
7157
7331
  logWarn(line);
7158
7332
  }
7159
7333
  }
7160
- for (const d of decodeSkaileYaml(fs8__default.readFileSync(file, "utf-8")).diagnostics) {
7334
+ const decoded = decodeSkaileYaml(fs9__default.readFileSync(file, "utf-8"));
7335
+ for (const d of decoded.diagnostics) {
7161
7336
  if (d.code !== "connector_missing_driver") continue;
7162
7337
  logErr(`${relPath} [connectors] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`);
7163
7338
  errors++;
7164
7339
  }
7340
+ if ((decoded.config?.connectors ?? []).length > 0) {
7341
+ const assets = await resolveRuntimeAssets(path22__default.dirname(file));
7342
+ if (!assets.warnings.some((w) => w.code === "repo_unavailable")) {
7343
+ for (const w of assets.warnings) {
7344
+ if (w.code !== "missing_driver" || !w.name) continue;
7345
+ logErr(`${relPath} [connectors] \u2014 ${w.code}: ${w.message}`);
7346
+ errors++;
7347
+ }
7348
+ }
7349
+ }
7165
7350
  }
7166
7351
  return { total: files.length, errors };
7167
7352
  }
@@ -7209,7 +7394,7 @@ function validatePublishManifestVersions(rootPath) {
7209
7394
  if (!a.root || a.source || !a.version) continue;
7210
7395
  const file = findAssetManifestFile(path22__default.join(absRoot, a.root), a.kind, a.name);
7211
7396
  if (!file) continue;
7212
- const res = parseManifestFile(file, fs8__default.readFileSync(file, "utf-8"));
7397
+ const res = parseManifestFile(file, fs9__default.readFileSync(file, "utf-8"));
7213
7398
  if (!res.ok) continue;
7214
7399
  const fileVersion = declaredVersion(res.data);
7215
7400
  if (fileVersion === void 0 || fileVersion === a.version) continue;
@@ -7236,7 +7421,7 @@ function validatePublishManifestPublishers(rootPath) {
7236
7421
  if (!a.root || a.source || !resolved) continue;
7237
7422
  const file = findAssetManifestFile(path22__default.join(absRoot, a.root), a.kind, a.name);
7238
7423
  if (!file) continue;
7239
- const res = parseManifestFile(file, fs8__default.readFileSync(file, "utf-8"));
7424
+ const res = parseManifestFile(file, fs9__default.readFileSync(file, "utf-8"));
7240
7425
  if (!res.ok) continue;
7241
7426
  const meta = res.data.metadata;
7242
7427
  const declared = meta !== null && typeof meta === "object" ? meta.publisher : null;
@@ -7268,7 +7453,7 @@ function readAssetVersion(c) {
7268
7453
  const kind = c.kind;
7269
7454
  const fileName = path22__default.basename(c.filePath);
7270
7455
  const dirName = path22__default.basename(path22__default.dirname(c.filePath));
7271
- const content = fs8__default.readFileSync(c.filePath, "utf-8");
7456
+ const content = fs9__default.readFileSync(c.filePath, "utf-8");
7272
7457
  if (c.filePath.endsWith(".md")) {
7273
7458
  const res = parseManifestFile(c.filePath, content);
7274
7459
  const data = res.ok ? res.data : {};
@@ -7301,7 +7486,7 @@ function readAssetVersion(c) {
7301
7486
  };
7302
7487
  }
7303
7488
  function collectAssetVersions(root) {
7304
- if (!fs8__default.existsSync(root)) return [];
7489
+ if (!fs9__default.existsSync(root)) return [];
7305
7490
  const assets = [];
7306
7491
  for (const c of findManifestCandidates(root)) {
7307
7492
  if (!VERSIONED_KINDS[c.kind]) continue;
@@ -7318,7 +7503,7 @@ function findChangelogUnit(assetRelPath, root) {
7318
7503
  let dir = path22__default.posix.dirname(toPosix(assetRelPath));
7319
7504
  for (; ; ) {
7320
7505
  const candidate = dir === "." ? "CHANGELOG.md" : `${dir}/CHANGELOG.md`;
7321
- if (fs8__default.existsSync(path22__default.join(root, candidate))) return candidate;
7506
+ if (fs9__default.existsSync(path22__default.join(root, candidate))) return candidate;
7322
7507
  if (dir === ".") return null;
7323
7508
  dir = path22__default.posix.dirname(dir);
7324
7509
  }
@@ -7422,14 +7607,14 @@ function checkFlowVersionPins(assets, root) {
7422
7607
  function resolveCheckRoot(pathArg) {
7423
7608
  if (pathArg) {
7424
7609
  const abs = path22__default.resolve(pathArg);
7425
- if (!fs8__default.existsSync(abs)) {
7610
+ if (!fs9__default.existsSync(abs)) {
7426
7611
  logErr(`Path does not exist: ${abs}`);
7427
7612
  return null;
7428
7613
  }
7429
7614
  return abs;
7430
7615
  }
7431
7616
  for (let dir = process.cwd(); ; dir = path22__default.dirname(dir)) {
7432
- if (fs8__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
7617
+ if (fs9__default.existsSync(path22__default.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
7433
7618
  if (path22__default.dirname(dir) === dir) return AI_RESOURCES;
7434
7619
  }
7435
7620
  }
@@ -7544,7 +7729,7 @@ function makeValidateCommand() {
7544
7729
  absPath,
7545
7730
  opts.strictConformance ?? false
7546
7731
  );
7547
- const ws = validateWorkspaceManifests(absPath);
7732
+ const ws = await validateWorkspaceManifests(absPath);
7548
7733
  const rootErrors = validatePublishManifestRoots(absPath);
7549
7734
  const slugErrors = validatePublishManifestPublisherSlugs(absPath);
7550
7735
  const parseErrors = validatePublishManifestParses(absPath);
@@ -9237,7 +9422,7 @@ function action2(fn) {
9237
9422
  };
9238
9423
  }
9239
9424
  async function reconcileAndReport(projectDir, plugins, opts = {}) {
9240
- const { reconcilePlugins } = await import('../plugin-store-XMZSPVBF.js');
9425
+ const { reconcilePlugins } = await import('../plugin-store-MLFP3WJ7.js');
9241
9426
  if (plugins.length === 0) {
9242
9427
  logInfo("No plugins declared \u2014 nothing to reconcile.");
9243
9428
  return;
@@ -9252,7 +9437,7 @@ async function reconcileAndReport(projectDir, plugins, opts = {}) {
9252
9437
  }
9253
9438
  }
9254
9439
  async function verifyPluginLoads(projectDir, spec) {
9255
- const { loadPlugins } = await import('../plugin-store-XMZSPVBF.js');
9440
+ const { loadPlugins } = await import('../plugin-store-MLFP3WJ7.js');
9256
9441
  const { createPluginRegistry } = await import('../plugin-registry/index.js');
9257
9442
  const registry = createPluginRegistry();
9258
9443
  const result = await loadPlugins(projectDir, [spec], registry);
@@ -9266,10 +9451,11 @@ async function verifyPluginLoads(projectDir, spec) {
9266
9451
  async function runInstall2(spec, opts) {
9267
9452
  const projectDir = path22__default.resolve(opts.projectDir);
9268
9453
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
9269
- const { specName } = await import('../plugin-store-XMZSPVBF.js');
9454
+ const { specName, rollbackPluginStore } = await import('../plugin-store-MLFP3WJ7.js');
9270
9455
  const yamlPath = path22__default.join(projectDir, "skaile.yaml");
9271
9456
  const original = existsSync(yamlPath) ? readFileSync(yamlPath, "utf8") : void 0;
9272
9457
  const editor = WorkspaceYamlEditor2.load(yamlPath);
9458
+ const previousPlugins = [...editor.getPlugins()];
9273
9459
  const replaced = editor.addPlugin(spec, specName);
9274
9460
  editor.save();
9275
9461
  if (replaced) logOk(`Updated ${S.cmd(specName(spec))} \u2192 ${S.cmd(spec)} in skaile.yaml`);
@@ -9285,13 +9471,14 @@ async function runInstall2(spec, opts) {
9285
9471
  rmSync(yamlPath, { force: true });
9286
9472
  logInfo("skaile.yaml removed; the plugin was not recorded.");
9287
9473
  }
9474
+ await rollbackPluginStore(projectDir, previousPlugins);
9288
9475
  throw err2;
9289
9476
  }
9290
9477
  }
9291
9478
  async function runRemove(name, opts) {
9292
9479
  const projectDir = path22__default.resolve(opts.projectDir);
9293
9480
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
9294
- const { specName } = await import('../plugin-store-XMZSPVBF.js');
9481
+ const { specName } = await import('../plugin-store-MLFP3WJ7.js');
9295
9482
  const yamlPath = path22__default.join(projectDir, "skaile.yaml");
9296
9483
  const editor = WorkspaceYamlEditor2.load(yamlPath);
9297
9484
  const removed = editor.removePlugin(name, specName);
@@ -9319,7 +9506,7 @@ async function runList(opts) {
9319
9506
  const registry = createPluginRegistry();
9320
9507
  if (declared.length > 0) {
9321
9508
  try {
9322
- const { loadPlugins } = await import('../plugin-store-XMZSPVBF.js');
9509
+ const { loadPlugins } = await import('../plugin-store-MLFP3WJ7.js');
9323
9510
  const result = await loadPlugins(projectDir, declared, registry);
9324
9511
  for (const f of result.failed) logWarn(f.error);
9325
9512
  } catch (err2) {
@@ -9393,9 +9580,11 @@ function presetItemsToWorkspace(preset, values) {
9393
9580
  dependencies.push(ref);
9394
9581
  }
9395
9582
  }
9396
- const sources = (preset.sources ?? []).map(
9397
- (s) => s.pin ? { url: s.url, pin: s.pin } : { url: s.url }
9398
- );
9583
+ const sources = (preset.sources ?? []).map((s) => ({
9584
+ url: s.url,
9585
+ ...s.pin ? { pin: s.pin } : {},
9586
+ ...s.publisher ? { publisher: s.publisher } : {}
9587
+ }));
9399
9588
  return { dependencies, connectors, mcpServers, sources, envVarsToSet: [...envVarsToSet] };
9400
9589
  }
9401
9590
  function resolveItemConfig(item, preset, values, envVarsToSet) {
@@ -10150,13 +10339,23 @@ function friendlyDriverError(err2) {
10150
10339
  return `${base}
10151
10340
  Try a different harness with \`--driver claude-sdk\`.`;
10152
10341
  }
10342
+ function driverErrorNotes(err2) {
10343
+ const e = err2;
10344
+ const notes = [];
10345
+ const category = e?.category ?? e?.detail?.category;
10346
+ const hint = e?.hint ?? e?.detail?.hint;
10347
+ if (hint && category !== "config") notes.push(hint);
10348
+ else if (category === "auth") notes.push("Check your API key or login.");
10349
+ notes.push("Full records: .skaile/logs.db (skaile session logs <session-id>).");
10350
+ return notes;
10351
+ }
10153
10352
 
10154
10353
  // cli/src/commands/run.ts
10155
10354
  function resolveSingleShotAgentDir(projectDir, agentDefinition) {
10156
10355
  if (!agentDefinition) return resolveAgentDir(projectDir);
10157
10356
  const asPath = agentDefinition.endsWith("agent.yaml") ? path22__default.dirname(path22__default.resolve(projectDir, agentDefinition)) : agentDefinition;
10158
10357
  const dir = resolveAgentDefinitionDir(projectDir, asPath);
10159
- if (!dir || !fs8__default.existsSync(path22__default.join(dir, "agent.yaml"))) {
10358
+ if (!dir || !fs9__default.existsSync(path22__default.join(dir, "agent.yaml"))) {
10160
10359
  throw new Error(
10161
10360
  `--agent-definition "${agentDefinition}" does not resolve to an agent directory with agent.yaml${dir ? ` (looked in ${dir})` : ""}`
10162
10361
  );
@@ -10211,11 +10410,11 @@ async function findSkillFile(projectDir, skill) {
10211
10410
  const name = skill.trim().replace(/^skill:/, "").replace(/^@[^/]+\//, "").replace(/#.*$/, "");
10212
10411
  for (const target of SUPPORTED_DRIVER_TARGETS) {
10213
10412
  const file = path22__default.join(deployedDir("skill", name, target, false, projectDir), "SKILL.md");
10214
- if (fs8__default.existsSync(file)) return file;
10413
+ if (fs9__default.existsSync(file)) return file;
10215
10414
  }
10216
10415
  const am2 = new AssetManager({ registry: getKindRegistry(), projectDir });
10217
10416
  const entry = await am2.info(`skill:${name}`);
10218
- return entry?.source && fs8__default.existsSync(entry.source) ? entry.source : void 0;
10417
+ return entry?.source && fs9__default.existsSync(entry.source) ? entry.source : void 0;
10219
10418
  }
10220
10419
  async function printSkillDryRun(projectDir, skill) {
10221
10420
  const file = await findSkillFile(projectDir, skill);
@@ -10225,7 +10424,7 @@ async function printSkillDryRun(projectDir, skill) {
10225
10424
  );
10226
10425
  return false;
10227
10426
  }
10228
- const content = fs8__default.readFileSync(file, "utf-8");
10427
+ const content = fs9__default.readFileSync(file, "utf-8");
10229
10428
  const { data } = parseFrontmatter(content);
10230
10429
  const meta = data.metadata ?? {};
10231
10430
  console.log(` ${S.label("Skill:")} ${S.heading(String(data.name ?? skill))}`);
@@ -10296,7 +10495,11 @@ function logAgentRunEvent(event) {
10296
10495
  return;
10297
10496
  }
10298
10497
  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)}`);
10498
+ console.error(` ${S.dim("subagent")} ${who} ${verdict}${subagentOutputSuffix(e)}`);
10499
+ }
10500
+ function subagentOutputSuffix(e) {
10501
+ const value = e.result !== void 0 ? e.result : e.output;
10502
+ return value === void 0 ? "" : ` output=${JSON.stringify(value)}`;
10300
10503
  }
10301
10504
  function editDistance2(a, b) {
10302
10505
  let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
@@ -10414,6 +10617,7 @@ function makeRunCommand() {
10414
10617
  logErr(friendly);
10415
10618
  } else {
10416
10619
  logErr(err2 instanceof Error ? err2.message : String(err2));
10620
+ for (const note of driverErrorNotes(err2)) console.error(` ${S.dim(note)}`);
10417
10621
  }
10418
10622
  process.exit(1);
10419
10623
  }
@@ -10496,6 +10700,7 @@ function makeStatusCommand() {
10496
10700
  console.log(` ${S.label("Run ID:")} ${session.runId.slice(0, 8)}`);
10497
10701
  if (session.label) console.log(` ${S.label("Label:")} ${session.label}`);
10498
10702
  console.log(` ${S.label("Status:")} ${statusColor(session.status ?? "unknown")}`);
10703
+ if (session.error) console.log(` ${S.label("Error:")} ${session.error}`);
10499
10704
  console.log(
10500
10705
  ` ${S.label("Driver:")} ${session.driver}${session.model ? S.dim(` / ${session.model}`) : ""}`
10501
10706
  );
@@ -10546,13 +10751,13 @@ function makeReplCommand() {
10546
10751
  p4.cancel("Cancelled.");
10547
10752
  process.exit(0);
10548
10753
  }
10549
- const tmpDir = fs8__default.mkdtempSync(path22__default.join(os2.tmpdir(), "skaile-repl-"));
10754
+ const tmpDir = fs9__default.mkdtempSync(path22__default.join(os2.tmpdir(), "skaile-repl-"));
10550
10755
  projectDir = tmpDir;
10551
10756
  agentCwd = userCwd;
10552
10757
  logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
10553
10758
  if (!driverOverride) {
10554
10759
  const claudeDir = path22__default.join(os2.homedir(), ".claude");
10555
- if (fs8__default.existsSync(claudeDir)) {
10760
+ if (fs9__default.existsSync(claudeDir)) {
10556
10761
  driverOverride = "claude-sdk";
10557
10762
  logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} harness`);
10558
10763
  } else {
@@ -10580,6 +10785,15 @@ function makeReplCommand() {
10580
10785
  function parseProviderIds(raw) {
10581
10786
  return (raw ?? "").split(",").map((id) => id.trim()).filter((id) => id.length > 0);
10582
10787
  }
10788
+ function parseModelEndpointFlag(raw) {
10789
+ if (raw === void 0) return void 0;
10790
+ if (raw === true) return { enabled: true };
10791
+ const port = Number(raw);
10792
+ if (raw === false || !/^\d+$/.test(raw) || port > 65535) {
10793
+ throw new Error(`--model-endpoint: invalid port '${String(raw)}'`);
10794
+ }
10795
+ return { enabled: true, port };
10796
+ }
10583
10797
  function makeServeCommand() {
10584
10798
  return new Command("serve").description("Start a WebSocket agent server (for platform integration)").option("--port <port>", "WebSocket server port", "8080").option(
10585
10799
  "--host <address>",
@@ -10590,6 +10804,9 @@ function makeServeCommand() {
10590
10804
  ).option("--driver <name>", "Override driver").option("--model <name>", "Override model").option("--provider <name>", "Override provider").option("--session-id <id>", "Session ID for conversation continuity").option("--resume-session-id <id>", "OMP session ID to resume (restores native OMP context)").option(
10591
10805
  "--providers <ids>",
10592
10806
  "Restrict the AI provider registry to these entry ids (comma-separated)"
10807
+ ).option(
10808
+ "--model-endpoint [port]",
10809
+ "Serve an OpenAI-compatible model endpoint on loopback for apps next to the session (optional port; default from skaile.yaml model_endpoint.port, else ephemeral)"
10593
10810
  ).option("--compile-test", "Build a compiled binary and run it (simulates Docker environment)").option(
10594
10811
  "--with-codex",
10595
10812
  "Include the Codex harness in the compiled binary (used with --compile-test)"
@@ -10612,10 +10829,11 @@ function makeServeCommand() {
10612
10829
  await ensurePluginsLoadedForServe(opts.projectDir);
10613
10830
  }
10614
10831
  const providers = parseProviderIds(opts.providers);
10615
- const { checkDriverSdk } = await import('../serve-preflight-6P2JJEJ3.js');
10832
+ const modelEndpoint = parseModelEndpointFlag(opts.modelEndpoint);
10833
+ const { checkDriverSdk } = await import('../serve-preflight-GNBW3O4U.js');
10616
10834
  const driverProblem = managedCodex ? null : await checkDriverSdk(opts.projectDir, opts.driver);
10617
10835
  if (driverProblem) {
10618
- const { logErr: logErr2 } = await import('../helpers-Y4OT7VIS.js');
10836
+ const { logErr: logErr2 } = await import('../helpers-BQGXEKRP.js');
10619
10837
  logErr2(driverProblem);
10620
10838
  process.exitCode = 1;
10621
10839
  return;
@@ -10636,24 +10854,25 @@ function makeServeCommand() {
10636
10854
  provider: opts.provider,
10637
10855
  sessionId: opts.sessionId,
10638
10856
  resumeSessionId: opts.resumeSessionId,
10639
- ...providers.length > 0 ? { providers } : {}
10857
+ ...providers.length > 0 ? { providers } : {},
10858
+ ...modelEndpoint ? { modelEndpoint } : {}
10640
10859
  });
10641
10860
  } catch (err2) {
10642
10861
  if (err2?.code !== "EADDRINUSE") throw err2;
10643
- const { logErr: logErr2 } = await import('../helpers-Y4OT7VIS.js');
10862
+ const { logErr: logErr2 } = await import('../helpers-BQGXEKRP.js');
10644
10863
  logErr2(err2.message);
10645
- process.exitCode = 1;
10864
+ process.exit(1);
10646
10865
  }
10647
10866
  }
10648
10867
  );
10649
10868
  }
10650
10869
  async function ensurePluginsLoadedForServe(projectDir) {
10651
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-Y4OT7VIS.js');
10870
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-BQGXEKRP.js');
10652
10871
  try {
10653
10872
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
10654
10873
  const config = resolveSkWorkspaceConfig2(projectDir);
10655
10874
  if (!config.plugins || config.plugins.length === 0) return;
10656
- const { ensurePluginsLoaded } = await import('../plugin-store-XMZSPVBF.js');
10875
+ const { ensurePluginsLoaded } = await import('../plugin-store-MLFP3WJ7.js');
10657
10876
  const { pluginRegistry } = await import('../plugin-registry/index.js');
10658
10877
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
10659
10878
  if (result.loaded.length > 0) {
@@ -10667,14 +10886,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
10667
10886
  }
10668
10887
  }
10669
10888
  async function runCompileTest(opts) {
10670
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-Y4OT7VIS.js');
10889
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-BQGXEKRP.js');
10671
10890
  const { tmpdir } = await import('os');
10672
10891
  const { dirname: dirname3, join: join7, resolve: resolve5 } = await import('path');
10673
10892
  const { fileURLToPath: fileURLToPath2 } = await import('url');
10674
- const { unlinkSync, existsSync: existsSync20 } = await import('fs');
10893
+ const { unlinkSync, existsSync: existsSync21 } = await import('fs');
10675
10894
  const { spawn } = await import('child_process');
10676
10895
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
10677
- const { MONOREPO_ROOT } = await import('../paths-U6W6MQNQ.js');
10896
+ const { MONOREPO_ROOT } = await import('../paths-B6SX6J6T.js');
10678
10897
  if (MONOREPO_ROOT === null) {
10679
10898
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
10680
10899
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
@@ -10736,7 +10955,7 @@ async function runCompileTest(opts) {
10736
10955
  } catch {
10737
10956
  }
10738
10957
  try {
10739
- if (existsSync20(outfile)) unlinkSync(outfile);
10958
+ if (existsSync21(outfile)) unlinkSync(outfile);
10740
10959
  } catch {
10741
10960
  }
10742
10961
  }
@@ -11476,12 +11695,12 @@ function showOverview(am2) {
11476
11695
  }
11477
11696
  async function showAsset(am2, kind, name) {
11478
11697
  const entry = await am2.info(`${kind}:${name}`);
11479
- if (entry?.source && fs8__default.existsSync(entry.source)) {
11698
+ if (entry?.source && fs9__default.existsSync(entry.source)) {
11480
11699
  console.log();
11481
11700
  console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
11482
11701
  console.log(` ${S.rule(40)}`);
11483
11702
  console.log();
11484
- console.log(fs8__default.readFileSync(entry.source, "utf-8"));
11703
+ console.log(fs9__default.readFileSync(entry.source, "utf-8"));
11485
11704
  return;
11486
11705
  }
11487
11706
  logErr(`Asset not found: ${kind}:${name}`);
@@ -11588,8 +11807,15 @@ function makeStoreCommand() {
11588
11807
  "--all",
11589
11808
  `List every match (default: ${STORE_ROW_LIMIT} rows, only what \`skaile add\` can install)`
11590
11809
  ).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');
11810
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-QNMIMZYS.js');
11811
+ const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-BOUCBDLF.js');
11592
11812
  const projectDir = path22__default.resolve(opts.projectDir);
11813
+ if (opts.kind && !getKnownKinds2().has(opts.kind)) {
11814
+ logErr(
11815
+ `Unknown kind "${opts.kind}". Valid kinds: ${[...getKnownKinds2()].sort().join(", ")}`
11816
+ );
11817
+ process.exit(1);
11818
+ }
11593
11819
  const curated = searchCuratedManifests(query).filter(
11594
11820
  (h) => !opts.kind || h.kind === opts.kind
11595
11821
  );
@@ -11640,8 +11866,14 @@ function makeStoreCommand() {
11640
11866
  }
11641
11867
  });
11642
11868
  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');
11869
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-QNMIMZYS.js');
11870
+ const { supportsInstallManifest } = await import('../project-GXCIEJGM.js');
11871
+ try {
11872
+ parseAssetRef(ref);
11873
+ } catch (e) {
11874
+ logErr(`Invalid asset ref "${ref}": ${e instanceof Error ? e.message : String(e)}`);
11875
+ process.exit(1);
11876
+ }
11645
11877
  try {
11646
11878
  const remote = await openCatalogSource2({ projectDir: path22__default.resolve(opts.projectDir) });
11647
11879
  const asset = await remote.resolve(ref);
@@ -11818,7 +12050,9 @@ function makeUpdateCommand() {
11818
12050
  if (!opts.catalogOnly) requireProjectConfig(projectDir);
11819
12051
  const am2 = new AssetManager({ registry: getKindRegistry(), projectDir });
11820
12052
  const target = name !== void 0 && !opts.catalogOnly ? await resolveUpdateTarget(am2, name) : void 0;
11821
- if (opts.catalog !== false) {
12053
+ if (opts.catalog !== false && !opts.catalogOnly && onlyLibraryAssets(projectDir)) {
12054
+ logInfo("Catalog refresh skipped (every locked asset comes from a library)");
12055
+ } else if (opts.catalog !== false) {
11822
12056
  const catalogSpinner = createSpinner();
11823
12057
  catalogSpinner.start("Refreshing catalog cache");
11824
12058
  try {
@@ -11833,11 +12067,13 @@ function makeUpdateCommand() {
11833
12067
  catalogSpinner.stop("Catalog refresh skipped (catalog.url: local)");
11834
12068
  } else {
11835
12069
  catalogSpinner.stop("Catalog refresh failed");
11836
- logErr(`Catalog refresh failed: ${err2 instanceof Error ? err2.message : String(err2)}`);
12070
+ const why = err2 instanceof Error ? err2.message : String(err2);
11837
12071
  if (opts.catalogOnly) {
12072
+ logErr(`Catalog refresh failed: ${why}`);
11838
12073
  logInfo("Run `skaile catalog test` to debug.");
11839
12074
  process.exit(1);
11840
12075
  }
12076
+ logWarn(`Catalog refresh failed: ${why}`);
11841
12077
  logInfo("Continuing with asset re-deploy. Run `skaile catalog test` to debug.");
11842
12078
  }
11843
12079
  }
@@ -11939,10 +12175,29 @@ async function resolveUpdateTarget(am2, name) {
11939
12175
  for (const h of hits) console.error(` ${h.ref}`);
11940
12176
  process.exit(1);
11941
12177
  }
12178
+ const chain = await am2.why(name);
12179
+ if (chain.length > 2 && chain[chain.length - 1] === "direct (skaile.yaml)") {
12180
+ const plain = (ref) => ref.replace(/#.*$/, "");
12181
+ const root = chain[chain.length - 2];
12182
+ logErr(
12183
+ `${plain(chain[0])} is required by ${plain(chain[1])}; run \`skaile update ${plain(root)}\`.`
12184
+ );
12185
+ process.exit(1);
12186
+ }
11942
12187
  logErr(`No declared asset matches "${name}".`);
11943
12188
  if (declared.length > 0) logInfo(`Declared: ${declared.map((d) => d.ref).join(", ")}`);
11944
12189
  process.exit(1);
11945
12190
  }
12191
+ function onlyLibraryAssets(projectDir) {
12192
+ let lock;
12193
+ try {
12194
+ lock = readLock(path22__default.join(projectDir, "skaile.lock.yaml"));
12195
+ } catch {
12196
+ return false;
12197
+ }
12198
+ const entries = Object.values(lock?.assets ?? {});
12199
+ return entries.length > 0 && entries.every((e) => e.library !== void 0);
12200
+ }
11946
12201
  function readText2(file) {
11947
12202
  try {
11948
12203
  return readFileSync(file, "utf8");
@@ -12303,29 +12558,29 @@ async function runInit(projectDir, opts) {
12303
12558
  const resolved = path22__default.resolve(projectDir ?? ".");
12304
12559
  const projectName = path22__default.basename(resolved);
12305
12560
  const created = [];
12306
- const { existsSync: existsSync20 } = await import('fs');
12307
- if (!existsSync20(resolved)) {
12561
+ const { existsSync: existsSync21 } = await import('fs');
12562
+ if (!existsSync21(resolved)) {
12308
12563
  mkdirSync5(resolved, { recursive: true });
12309
12564
  created.push(".");
12310
12565
  }
12311
12566
  const skaileDir = path22__default.join(resolved, ".skaile");
12312
- if (!existsSync20(skaileDir)) {
12567
+ if (!existsSync21(skaileDir)) {
12313
12568
  mkdirSync5(path22__default.join(skaileDir, "sessions"), { recursive: true });
12314
12569
  created.push(".skaile/");
12315
12570
  }
12316
12571
  const settingsPath = path22__default.join(skaileDir, "settings.json");
12317
- if (!existsSync20(settingsPath)) {
12572
+ if (!existsSync21(settingsPath)) {
12318
12573
  writeFileSync7(settingsPath, "{}\n");
12319
12574
  created.push(".skaile/settings.json");
12320
12575
  }
12321
12576
  const wsConfigPath = path22__default.join(resolved, "skaile.yaml");
12322
- if (!existsSync20(wsConfigPath)) {
12577
+ if (!existsSync21(wsConfigPath)) {
12323
12578
  writeFileSync7(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
12324
12579
  created.push("skaile.yaml");
12325
12580
  }
12326
12581
  for (const dir of new Set(Object.values(DRIVER_TARGETS[harness].local))) {
12327
12582
  const full = path22__default.join(resolved, dir);
12328
- if (!existsSync20(full)) {
12583
+ if (!existsSync21(full)) {
12329
12584
  mkdirSync5(full, { recursive: true });
12330
12585
  created.push(`${dir}/`);
12331
12586
  }
@@ -12355,7 +12610,7 @@ function buildInitWorkspaceConfig(projectName, harness) {
12355
12610
  }
12356
12611
  async function initGitScaffold(resolved, created) {
12357
12612
  const { execSync: execSync2 } = await import('child_process');
12358
- const { existsSync: existsSync20, readFileSync: readFileSync12, writeFileSync: writeFileSync7 } = await import('fs');
12613
+ const { existsSync: existsSync21, readFileSync: readFileSync12, writeFileSync: writeFileSync7 } = await import('fs');
12359
12614
  const gitignorePath = path22__default.join(resolved, ".gitignore");
12360
12615
  const entries = [
12361
12616
  "node_modules/",
@@ -12367,21 +12622,27 @@ async function initGitScaffold(resolved, created) {
12367
12622
  // skaile-created artifacts that must never be committed: the per-session log
12368
12623
  // DB (SQLite incl. -shm/-wal, ends in .db — not caught by *.log), personal
12369
12624
  // settings (holds API keys), the workspace AI provider registry (endpoints
12370
- // and credential references are per-machine), and the install history.
12625
+ // and credential references are per-machine), the install history, and the
12626
+ // per-run model-endpoint discovery file (holds a bearer token).
12371
12627
  ".skaile/logs.db*",
12372
12628
  ".skaile/settings.json",
12373
12629
  ".skaile/providers.yml",
12374
12630
  ".skaile/history.yaml",
12631
+ ".skaile/model-endpoint.json",
12375
12632
  // Per-machine files a run writes into the project: the system prompt handed to the harness
12376
12633
  // (it carries the host path) and omp's session logs.
12377
12634
  ".codex/skaile-session-instructions.md",
12378
12635
  ".omp/system.md",
12379
12636
  ".omp/sessions/",
12637
+ // `skaile integration install` writes the absolute project path into these.
12638
+ ".codex/config.toml",
12639
+ ".omp/extensions/skaile.ts",
12640
+ ".skaile/plugin-state.json",
12380
12641
  "*.log",
12381
12642
  ".env",
12382
12643
  ".env.local"
12383
12644
  ];
12384
- const existing = existsSync20(gitignorePath) ? readFileSync12(gitignorePath, "utf-8") : "";
12645
+ const existing = existsSync21(gitignorePath) ? readFileSync12(gitignorePath, "utf-8") : "";
12385
12646
  const have = new Set(existing.split("\n").map((l) => l.trim()));
12386
12647
  const append = entries.filter((e) => !have.has(e));
12387
12648
  if (append.length > 0) {
@@ -12390,7 +12651,7 @@ async function initGitScaffold(resolved, created) {
12390
12651
  `);
12391
12652
  if (!existing) created.push(".gitignore");
12392
12653
  }
12393
- if (!existsSync20(path22__default.join(resolved, ".git"))) {
12654
+ if (!existsSync21(path22__default.join(resolved, ".git"))) {
12394
12655
  try {
12395
12656
  execSync2("git init", { cwd: resolved, stdio: "pipe" });
12396
12657
  created.push(".git/");
@@ -12402,10 +12663,10 @@ async function initGitScaffold(resolved, created) {
12402
12663
  }
12403
12664
  async function bootstrapUserConfig() {
12404
12665
  try {
12405
- const fs13 = await import('fs');
12666
+ const fs14 = await import('fs');
12406
12667
  const { userConfigPath: userConfigPath2, saveConfig, getConfigDefaults } = await import('../library/index.js');
12407
12668
  const userCfgPath = userConfigPath2();
12408
- if (!fs13.existsSync(userCfgPath)) {
12669
+ if (!fs14.existsSync(userCfgPath)) {
12409
12670
  const defaults = getConfigDefaults();
12410
12671
  saveConfig(userCfgPath, {
12411
12672
  catalog: { url: defaults.catalog.url, cache_ttl: defaults.catalog.cache_ttl }
@@ -12420,7 +12681,7 @@ async function bootstrapUserConfig() {
12420
12681
  }
12421
12682
  async function hydrateInitSources(resolved, created) {
12422
12683
  try {
12423
- const { ensureSourcesCloned } = await import('../ensure-sources-POMEQSTM.js');
12684
+ const { ensureSourcesCloned } = await import('../ensure-sources-EG7YKKZL.js');
12424
12685
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
12425
12686
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
12426
12687
  if (hydrate.failed.length > 0) {
@@ -12460,7 +12721,7 @@ function printInitSummary(resolved, projectDir, created) {
12460
12721
  console.log();
12461
12722
  }
12462
12723
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
12463
- const { cmdSetup } = await import('../setup-5IRUH5OS.js');
12724
+ const { cmdSetup } = await import('../setup-HJEYEXLS.js');
12464
12725
  await cmdSetup([], { projectDir: process.cwd() });
12465
12726
  });
12466
12727
  program.addCommand(makeInstallCommand());