@skaile/workspaces 5.12.0 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +2 -2
  3. package/dist/{asset-feeds-AM6PSSGM.js → asset-feeds-ALMTHLPV.js} +20 -20
  4. package/dist/{asset-feeds-AM6PSSGM.js.map → asset-feeds-ALMTHLPV.js.map} +1 -1
  5. package/dist/asset-manager/catalog-deployer.js +9 -9
  6. package/dist/asset-manager/index.js +15 -15
  7. package/dist/asset-manager/installer.js +11 -11
  8. package/dist/asset-manager/renderers.js +10 -10
  9. package/dist/asset-manager/src/index.d.ts +53 -10
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/asset-manager/src/installer.d.ts +0 -10
  12. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  13. package/dist/bridge/drivers/claude-sdk.js +15 -13
  14. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  15. package/dist/bridge/drivers/codex.js +72 -27
  16. package/dist/bridge/drivers/codex.js.map +1 -1
  17. package/dist/bridge/drivers/continue.js +11 -11
  18. package/dist/bridge/drivers/echo.js +1 -1
  19. package/dist/bridge/drivers/gemini.js +6 -6
  20. package/dist/bridge/drivers/goose.js +11 -11
  21. package/dist/bridge/drivers/omp.js +102 -27
  22. package/dist/bridge/drivers/omp.js.map +1 -1
  23. package/dist/bridge/drivers/opencode.js +11 -11
  24. package/dist/bridge/drivers/qwen.js +6 -6
  25. package/dist/bridge/index.js +13 -13
  26. package/dist/bridge/src/codex/config-toml.d.ts +8 -0
  27. package/dist/bridge/src/codex/config-toml.d.ts.map +1 -1
  28. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  29. package/dist/bridge/src/drivers/codex.d.ts +6 -0
  30. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  31. package/dist/bridge/src/drivers/omp-models-yml.d.ts +32 -0
  32. package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -1
  33. package/dist/bridge/src/drivers/omp.d.ts +20 -6
  34. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  35. package/dist/{chunk-QCEKGYHF.js → chunk-2BIESC6S.js} +3 -3
  36. package/dist/{chunk-QCEKGYHF.js.map → chunk-2BIESC6S.js.map} +1 -1
  37. package/dist/{chunk-NGJIVDDD.js → chunk-4DLQESIY.js} +3 -3
  38. package/dist/{chunk-NGJIVDDD.js.map → chunk-4DLQESIY.js.map} +1 -1
  39. package/dist/{chunk-7QWQTA5S.js → chunk-4L4R5LV3.js} +4 -4
  40. package/dist/{chunk-7QWQTA5S.js.map → chunk-4L4R5LV3.js.map} +1 -1
  41. package/dist/{chunk-GWD3QNVS.js → chunk-4NJ3QQHZ.js} +5 -5
  42. package/dist/{chunk-GWD3QNVS.js.map → chunk-4NJ3QQHZ.js.map} +1 -1
  43. package/dist/{chunk-6VLHITAM.js → chunk-57SF6W6E.js} +4 -3
  44. package/dist/chunk-57SF6W6E.js.map +1 -0
  45. package/dist/{chunk-NJV5SLEK.js → chunk-5FYOM4RF.js} +46 -46
  46. package/dist/chunk-5FYOM4RF.js.map +1 -0
  47. package/dist/{chunk-ICIYSJBQ.js → chunk-5SKVCMRC.js} +15 -7
  48. package/dist/chunk-5SKVCMRC.js.map +1 -0
  49. package/dist/{chunk-P23WJCH2.js → chunk-6GICC4RJ.js} +23 -18
  50. package/dist/chunk-6GICC4RJ.js.map +1 -0
  51. package/dist/{chunk-3HUV2LJF.js → chunk-6JKIOPT3.js} +4 -4
  52. package/dist/{chunk-3HUV2LJF.js.map → chunk-6JKIOPT3.js.map} +1 -1
  53. package/dist/{chunk-NDF24LYP.js → chunk-6NQDDCIL.js} +3 -3
  54. package/dist/{chunk-NDF24LYP.js.map → chunk-6NQDDCIL.js.map} +1 -1
  55. package/dist/{chunk-VRLKHL74.js → chunk-7SMP4GNW.js} +6 -6
  56. package/dist/{chunk-VRLKHL74.js.map → chunk-7SMP4GNW.js.map} +1 -1
  57. package/dist/{chunk-XMAJJPA4.js → chunk-AHCI4V5L.js} +3 -3
  58. package/dist/{chunk-XMAJJPA4.js.map → chunk-AHCI4V5L.js.map} +1 -1
  59. package/dist/{chunk-NJXR5OAM.js → chunk-B7CZYFB2.js} +4 -4
  60. package/dist/{chunk-NJXR5OAM.js.map → chunk-B7CZYFB2.js.map} +1 -1
  61. package/dist/{chunk-T5TSLSRO.js → chunk-BF422IDP.js} +8 -8
  62. package/dist/{chunk-T5TSLSRO.js.map → chunk-BF422IDP.js.map} +1 -1
  63. package/dist/{chunk-MF54ZHWT.js → chunk-BVJU2GKE.js} +2 -2
  64. package/dist/{chunk-MF54ZHWT.js.map → chunk-BVJU2GKE.js.map} +1 -1
  65. package/dist/{chunk-PMECEZK3.js → chunk-D54T2F54.js} +5 -4
  66. package/dist/chunk-D54T2F54.js.map +1 -0
  67. package/dist/{chunk-C3BMXXTN.js → chunk-DKGEV6SQ.js} +68 -24
  68. package/dist/chunk-DKGEV6SQ.js.map +1 -0
  69. package/dist/chunk-FB3NREF7.js +649 -0
  70. package/dist/chunk-FB3NREF7.js.map +1 -0
  71. package/dist/{chunk-3LVB3HGH.js → chunk-FHDK3BFD.js} +3 -3
  72. package/dist/{chunk-3LVB3HGH.js.map → chunk-FHDK3BFD.js.map} +1 -1
  73. package/dist/{chunk-2X3JBVGD.js → chunk-GMDSRSGI.js} +18 -9
  74. package/dist/chunk-GMDSRSGI.js.map +1 -0
  75. package/dist/{chunk-N5M2EISA.js → chunk-HBZD3MIW.js} +97 -54
  76. package/dist/chunk-HBZD3MIW.js.map +1 -0
  77. package/dist/{chunk-SMT3LNAG.js → chunk-HWGYJMME.js} +4 -4
  78. package/dist/{chunk-SMT3LNAG.js.map → chunk-HWGYJMME.js.map} +1 -1
  79. package/dist/{chunk-CPSIPIX7.js → chunk-IG5LZ3WU.js} +8 -6
  80. package/dist/chunk-IG5LZ3WU.js.map +1 -0
  81. package/dist/{chunk-CTP3XBMF.js → chunk-IY5E7Y5W.js} +57 -7
  82. package/dist/chunk-IY5E7Y5W.js.map +1 -0
  83. package/dist/{chunk-YQU2BPQD.js → chunk-J4DB5G36.js} +2 -2
  84. package/dist/{chunk-YQU2BPQD.js.map → chunk-J4DB5G36.js.map} +1 -1
  85. package/dist/{chunk-PNTXHTBC.js → chunk-J4OYIYFQ.js} +2 -2
  86. package/dist/{chunk-PNTXHTBC.js.map → chunk-J4OYIYFQ.js.map} +1 -1
  87. package/dist/{chunk-PNOGX36L.js → chunk-L3ZGYSWY.js} +85 -24
  88. package/dist/chunk-L3ZGYSWY.js.map +1 -0
  89. package/dist/{chunk-XTVSNWLL.js → chunk-M3P4BYRK.js} +34 -11
  90. package/dist/chunk-M3P4BYRK.js.map +1 -0
  91. package/dist/{chunk-X6LKA3TJ.js → chunk-NDUYFYJB.js} +5 -5
  92. package/dist/{chunk-X6LKA3TJ.js.map → chunk-NDUYFYJB.js.map} +1 -1
  93. package/dist/{chunk-7CR2OZPA.js → chunk-NVO6WECE.js} +9 -8
  94. package/dist/chunk-NVO6WECE.js.map +1 -0
  95. package/dist/chunk-PN44DOGP.js +345 -0
  96. package/dist/chunk-PN44DOGP.js.map +1 -0
  97. package/dist/{chunk-UTKENBB6.js → chunk-PXDWTJ3P.js} +4 -4
  98. package/dist/{chunk-UTKENBB6.js.map → chunk-PXDWTJ3P.js.map} +1 -1
  99. package/dist/{chunk-POQ6PGNE.js → chunk-PYTTF754.js} +22 -6
  100. package/dist/chunk-PYTTF754.js.map +1 -0
  101. package/dist/chunk-PZOO7L26.js +64 -0
  102. package/dist/chunk-PZOO7L26.js.map +1 -0
  103. package/dist/{chunk-SHQMPGOL.js → chunk-QO7CR3KB.js} +10 -5
  104. package/dist/chunk-QO7CR3KB.js.map +1 -0
  105. package/dist/{chunk-KVSDRB35.js → chunk-R6QHJEHE.js} +5 -5
  106. package/dist/{chunk-KVSDRB35.js.map → chunk-R6QHJEHE.js.map} +1 -1
  107. package/dist/chunk-U27JRO5L.js +13 -0
  108. package/dist/chunk-U27JRO5L.js.map +1 -0
  109. package/dist/{chunk-G3X4MLDB.js → chunk-USHB5KEY.js} +3 -3
  110. package/dist/{chunk-G3X4MLDB.js.map → chunk-USHB5KEY.js.map} +1 -1
  111. package/dist/{chunk-HYMERG57.js → chunk-V5JHD4I2.js} +3 -3
  112. package/dist/{chunk-HYMERG57.js.map → chunk-V5JHD4I2.js.map} +1 -1
  113. package/dist/{chunk-JQ3DXNQV.js → chunk-VLBIME5L.js} +6 -6
  114. package/dist/{chunk-JQ3DXNQV.js.map → chunk-VLBIME5L.js.map} +1 -1
  115. package/dist/{chunk-7XWUJC3A.js → chunk-XBYSURMK.js} +3 -3
  116. package/dist/{chunk-7XWUJC3A.js.map → chunk-XBYSURMK.js.map} +1 -1
  117. package/dist/{chunk-XZY6SBGU.js → chunk-XJYBCDY2.js} +3 -3
  118. package/dist/{chunk-XZY6SBGU.js.map → chunk-XJYBCDY2.js.map} +1 -1
  119. package/dist/{chunk-27L6BBAT.js → chunk-Y4Z7LGSH.js} +8 -8
  120. package/dist/{chunk-27L6BBAT.js.map → chunk-Y4Z7LGSH.js.map} +1 -1
  121. package/dist/{chunk-TVAR4JHA.js → chunk-Y7WKXPWS.js} +320 -51
  122. package/dist/chunk-Y7WKXPWS.js.map +1 -0
  123. package/dist/{chunk-2JFIFDDO.js → chunk-YTZFSKWL.js} +3 -3
  124. package/dist/{chunk-2JFIFDDO.js.map → chunk-YTZFSKWL.js.map} +1 -1
  125. package/dist/{chunk-WI4T3KIS.js → chunk-ZSMMX3JD.js} +130 -23
  126. package/dist/chunk-ZSMMX3JD.js.map +1 -0
  127. package/dist/{chunk-DCHQ6BAZ.js → chunk-ZU24LWBI.js} +3 -3
  128. package/dist/{chunk-DCHQ6BAZ.js.map → chunk-ZU24LWBI.js.map} +1 -1
  129. package/dist/cli/index.js +469 -227
  130. package/dist/cli/index.js.map +1 -1
  131. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  132. package/dist/cli/src/commands/catalog-cmd.d.ts.map +1 -1
  133. package/dist/cli/src/commands/catalog.d.ts +2 -0
  134. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  135. package/dist/cli/src/commands/diff.d.ts +1 -1
  136. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  137. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  138. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  139. package/dist/cli/src/commands/library-index.d.ts +10 -0
  140. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  141. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  142. package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
  143. package/dist/cli/src/commands/plugin/types.d.ts +2 -0
  144. package/dist/cli/src/commands/plugin/types.d.ts.map +1 -1
  145. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  146. package/dist/cli/src/commands/preset-apply.d.ts.map +1 -1
  147. package/dist/cli/src/commands/project.d.ts +8 -0
  148. package/dist/cli/src/commands/project.d.ts.map +1 -1
  149. package/dist/cli/src/commands/run.d.ts +9 -0
  150. package/dist/cli/src/commands/run.d.ts.map +1 -1
  151. package/dist/cli/src/commands/serve-preflight.d.ts +2 -1
  152. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  153. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  154. package/dist/cli/src/commands/source-manifest.d.ts +1 -0
  155. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  156. package/dist/cli/src/commands/source.d.ts +9 -1
  157. package/dist/cli/src/commands/source.d.ts.map +1 -1
  158. package/dist/cli/src/commands/store.d.ts.map +1 -1
  159. package/dist/cli/src/commands/update.d.ts.map +1 -1
  160. package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
  161. package/dist/cli/src/commands/validate.d.ts +3 -2
  162. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  163. package/dist/cli/src/driver-error.d.ts +7 -0
  164. package/dist/cli/src/driver-error.d.ts.map +1 -1
  165. package/dist/cli/src/helpers.d.ts +6 -0
  166. package/dist/cli/src/helpers.d.ts.map +1 -1
  167. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  168. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  169. package/dist/cli/src/plugin-store/reconcile.d.ts +24 -4
  170. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  171. package/dist/cli/src/skill-checks.d.ts +15 -4
  172. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  173. package/dist/cli/src/store-addable.d.ts +7 -8
  174. package/dist/cli/src/store-addable.d.ts.map +1 -1
  175. package/dist/connectors/config.js +6 -6
  176. package/dist/connectors/index.js +16 -16
  177. package/dist/connectors/src/config.d.ts.map +1 -1
  178. package/dist/{connectors-UNKUKEPG.js → connectors-GFKMKAXV.js} +19 -19
  179. package/dist/{connectors-UNKUKEPG.js.map → connectors-GFKMKAXV.js.map} +1 -1
  180. package/dist/core/driver-targets.js +1 -1
  181. package/dist/core/index.js +8 -8
  182. package/dist/core/manifest.js +2 -2
  183. package/dist/core/models.js +1 -1
  184. package/dist/core/publish-manifest.js +4 -2
  185. package/dist/core/ref.js +1 -1
  186. package/dist/core/runtime-assets.js +6 -6
  187. package/dist/core/src/agent-instances.d.ts +5 -0
  188. package/dist/core/src/agent-instances.d.ts.map +1 -1
  189. package/dist/core/src/driver-targets.d.ts.map +1 -1
  190. package/dist/core/src/index.d.ts +1 -1
  191. package/dist/core/src/index.d.ts.map +1 -1
  192. package/dist/core/src/manifest.d.ts +9 -3
  193. package/dist/core/src/manifest.d.ts.map +1 -1
  194. package/dist/core/src/models.d.ts +8 -0
  195. package/dist/core/src/models.d.ts.map +1 -1
  196. package/dist/core/src/publish-manifest.d.ts +38 -1
  197. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  198. package/dist/core/src/repo-manager.d.ts +8 -3
  199. package/dist/core/src/repo-manager.d.ts.map +1 -1
  200. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  201. package/dist/core/src/store.d.ts +4 -0
  202. package/dist/core/src/store.d.ts.map +1 -1
  203. package/dist/core/src/walker.d.ts +2 -0
  204. package/dist/core/src/walker.d.ts.map +1 -1
  205. package/dist/core/src/workspace-config.d.ts +24 -2
  206. package/dist/core/src/workspace-config.d.ts.map +1 -1
  207. package/dist/core/store.js +2 -2
  208. package/dist/core/workspace-config.js +5 -5
  209. package/dist/deploy/index.js +8 -8
  210. package/dist/discovery/index.js +5 -5
  211. package/dist/discovery/src/parse-manifest.d.ts.map +1 -1
  212. package/dist/discovery/src/source-config.d.ts +5 -3
  213. package/dist/discovery/src/source-config.d.ts.map +1 -1
  214. package/dist/{ensure-sources-POMEQSTM.js → ensure-sources-VUKHL65L.js} +18 -18
  215. package/dist/{ensure-sources-POMEQSTM.js.map → ensure-sources-VUKHL65L.js.map} +1 -1
  216. package/dist/factory-assets/README.md +1 -1
  217. package/dist/factory-assets/connectors/box.js +16 -16
  218. package/dist/factory-assets/connectors/deploy.js +16 -16
  219. package/dist/factory-assets/connectors/devserver.js +16 -16
  220. package/dist/factory-assets/connectors/flow/adapter.js +16 -16
  221. package/dist/factory-assets/connectors/flow/engine.js +9 -9
  222. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  223. package/dist/factory-assets/connectors/flow/run-flow.js +18 -18
  224. package/dist/factory-assets/connectors/flow.js +16 -16
  225. package/dist/factory-assets/connectors/git.js +16 -16
  226. package/dist/factory-assets/connectors/gmail.js +16 -16
  227. package/dist/factory-assets/connectors/googledrive.js +16 -16
  228. package/dist/factory-assets/connectors/local.js +16 -16
  229. package/dist/factory-assets/connectors/mattermost.js +16 -16
  230. package/dist/factory-assets/connectors/memory.js +16 -16
  231. package/dist/factory-assets/connectors/minio.js +16 -16
  232. package/dist/factory-assets/connectors/postgres.js +16 -16
  233. package/dist/factory-assets/connectors/s3.js +16 -16
  234. package/dist/factory-assets/connectors/sharepoint.js +16 -16
  235. package/dist/factory-assets/connectors/sqlite.js +16 -16
  236. package/dist/factory-assets/connectors/static-server.js +16 -16
  237. package/dist/factory-assets/connectors/tunnel.js +16 -16
  238. package/dist/factory-assets/connectors/webdav.js +16 -16
  239. package/dist/factory-assets/connectors/xstate-store.js +16 -16
  240. package/dist/factory-assets/connectors/xstate.js +16 -16
  241. package/dist/{flows-DVKMZKM4.js → flows-A4YALSZY.js} +13 -13
  242. package/dist/{flows-DVKMZKM4.js.map → flows-A4YALSZY.js.map} +1 -1
  243. package/dist/{helpers-Y4OT7VIS.js → helpers-53XZW7KF.js} +18 -18
  244. package/dist/{helpers-Y4OT7VIS.js.map → helpers-53XZW7KF.js.map} +1 -1
  245. package/dist/library/index.js +12 -12
  246. package/dist/library/install.js +5 -3
  247. package/dist/library/src/local/local-catalog-source.d.ts +6 -0
  248. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  249. package/dist/library/src/manifest-writer.d.ts +1 -1
  250. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  251. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  252. package/dist/library/src/user-library.d.ts +2 -0
  253. package/dist/library/src/user-library.d.ts.map +1 -1
  254. package/dist/{library-publish-DI4Q5UOG.js → library-publish-FFIPWIRM.js} +28 -25
  255. package/dist/library-publish-FFIPWIRM.js.map +1 -0
  256. package/dist/open-library-PZAT3TJA.js +40 -0
  257. package/dist/{open-library-N6ESO6IK.js.map → open-library-PZAT3TJA.js.map} +1 -1
  258. package/dist/open-registry-W46UXZ3I.js +32 -0
  259. package/dist/{open-registry-CBZ5MWTT.js.map → open-registry-W46UXZ3I.js.map} +1 -1
  260. package/dist/paths-KKY3NSBZ.js +22 -0
  261. package/dist/{paths-U6W6MQNQ.js.map → paths-KKY3NSBZ.js.map} +1 -1
  262. package/dist/{plugin-store-XMZSPVBF.js → plugin-store-CK7YWRIC.js} +62 -20
  263. package/dist/plugin-store-CK7YWRIC.js.map +1 -0
  264. package/dist/plugins/src/catalog-source.d.ts +6 -0
  265. package/dist/plugins/src/catalog-source.d.ts.map +1 -1
  266. package/dist/project-EZUH7PUJ.js +79 -0
  267. package/dist/{project-UP52HEHC.js.map → project-EZUH7PUJ.js.map} +1 -1
  268. package/dist/resolver/index.js +9 -9
  269. package/dist/runner/index.js +29 -29
  270. package/dist/runner/src/agent.d.ts.map +1 -1
  271. package/dist/runner/src/composition/index.d.ts +1 -1
  272. package/dist/runner/src/composition/index.d.ts.map +1 -1
  273. package/dist/runner/src/composition/prompt-sections.d.ts +18 -6
  274. package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -1
  275. package/dist/runner/src/serve.d.ts.map +1 -1
  276. package/dist/runner/src/session-builder.d.ts.map +1 -1
  277. package/dist/runner/src/session.d.ts +2 -0
  278. package/dist/runner/src/session.d.ts.map +1 -1
  279. package/dist/runner/src/ws-auth-warning.d.ts +17 -0
  280. package/dist/runner/src/ws-auth-warning.d.ts.map +1 -0
  281. package/dist/sdk/asset-manager.js +15 -15
  282. package/dist/sdk/bridge.js +13 -13
  283. package/dist/sdk/core.js +8 -8
  284. package/dist/sdk/flow.js +9 -9
  285. package/dist/sdk/index.js +29 -29
  286. package/dist/sdk/resolver.js +9 -9
  287. package/dist/sdk/runner.js +29 -29
  288. package/dist/serve-preflight-F7MYF747.js +64 -0
  289. package/dist/serve-preflight-F7MYF747.js.map +1 -0
  290. package/dist/{setup-5IRUH5OS.js → setup-L632QIHV.js} +23 -23
  291. package/dist/{setup-5IRUH5OS.js.map → setup-L632QIHV.js.map} +1 -1
  292. package/dist/skills-OY3Y5GKA.js +26 -0
  293. package/dist/{skills-HA36RFNM.js.map → skills-OY3Y5GKA.js.map} +1 -1
  294. package/dist/source-36FHMN5V.js +42 -0
  295. package/dist/{source-DX5SGWEI.js.map → source-36FHMN5V.js.map} +1 -1
  296. package/dist/{source-manifest-publish-NMRLXWVW.js → source-manifest-publish-NIXJSJ22.js} +25 -24
  297. package/dist/source-manifest-publish-NIXJSJ22.js.map +1 -0
  298. package/dist/tui/index.js +46 -36
  299. package/dist/tui/index.js.map +1 -1
  300. package/dist/tui/src/repl.d.ts.map +1 -1
  301. package/dist/types/manifests.js +1 -1
  302. package/dist/types/src/lifecycle.d.ts +2 -1
  303. package/dist/types/src/lifecycle.d.ts.map +1 -1
  304. package/dist/types/src/manifests/preset.d.ts +6 -1
  305. package/dist/types/src/manifests/preset.d.ts.map +1 -1
  306. package/dist/workspace-plugin/adapters/mcp.js +23 -23
  307. package/dist/workspace-plugin/adapters/omp.js +14 -14
  308. package/dist/workspace-plugin/index.js +1 -1
  309. package/package.json +1 -1
  310. package/dist/chunk-2X3JBVGD.js.map +0 -1
  311. package/dist/chunk-6VLHITAM.js.map +0 -1
  312. package/dist/chunk-7CR2OZPA.js.map +0 -1
  313. package/dist/chunk-C3BMXXTN.js.map +0 -1
  314. package/dist/chunk-CPSIPIX7.js.map +0 -1
  315. package/dist/chunk-CTP3XBMF.js.map +0 -1
  316. package/dist/chunk-ICIYSJBQ.js.map +0 -1
  317. package/dist/chunk-ID745F3R.js +0 -625
  318. package/dist/chunk-ID745F3R.js.map +0 -1
  319. package/dist/chunk-K4VOEYOR.js +0 -21
  320. package/dist/chunk-K4VOEYOR.js.map +0 -1
  321. package/dist/chunk-N5M2EISA.js.map +0 -1
  322. package/dist/chunk-NJV5SLEK.js.map +0 -1
  323. package/dist/chunk-NR7H7ZJP.js +0 -400
  324. package/dist/chunk-NR7H7ZJP.js.map +0 -1
  325. package/dist/chunk-P23WJCH2.js.map +0 -1
  326. package/dist/chunk-PMECEZK3.js.map +0 -1
  327. package/dist/chunk-PNOGX36L.js.map +0 -1
  328. package/dist/chunk-POQ6PGNE.js.map +0 -1
  329. package/dist/chunk-SHQMPGOL.js.map +0 -1
  330. package/dist/chunk-TVAR4JHA.js.map +0 -1
  331. package/dist/chunk-WI4T3KIS.js.map +0 -1
  332. package/dist/chunk-XTVSNWLL.js.map +0 -1
  333. package/dist/library-publish-DI4Q5UOG.js.map +0 -1
  334. package/dist/open-library-N6ESO6IK.js +0 -40
  335. package/dist/open-registry-CBZ5MWTT.js +0 -32
  336. package/dist/paths-U6W6MQNQ.js +0 -22
  337. package/dist/plugin-store-XMZSPVBF.js.map +0 -1
  338. package/dist/project-UP52HEHC.js +0 -79
  339. package/dist/serve-preflight-6P2JJEJ3.js +0 -47
  340. package/dist/serve-preflight-6P2JJEJ3.js.map +0 -1
  341. package/dist/skills-HA36RFNM.js +0 -26
  342. package/dist/source-DX5SGWEI.js +0 -41
  343. package/dist/source-manifest-publish-NMRLXWVW.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,101 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - Agents: the open findings of the 5.12.0 critique.
8
+
9
+ - A rendered agent file is part of the drift model. `install`, `add` and `update` record the sha256 of every file an agent renders (`.claude/agents/<name>.md`, the codex and omp files) in the lock entry's new `rendered:` list. `check`, `doctor` and `outdated` exit 1 for a hand-edited agent file (`<file> was edited`), and `install`, `install --locked` and `update` restore it and print `Restored <file>`, as for a skill file (p549, p576).
10
+ - `install` keeps a source at the commit the lock records: it no longer pulls a pinned clone to the branch tip. Only `update` moves a lock entry (p632).
11
+ - `check` names every instance bound to an agent whose pinned `SOUL.md` / `knowledge/` was edited after `rebuild`, and `doctor` prints the same lines and exits 1 (p635). `RULES.md`, `DUTIES.md` and local rulesets are `inline-live`: they are read at every run start, so the docs no longer say an edit is a conflict (p414).
12
+ - `validate` fails a `composes` item of a kind with no default binding (`preset`) that sets no `binding:` (p415), resolves `composes` refs against the enclosing library when it gets one asset directory (p633), and warns on an unknown key under the primary `agent:` block, as it does under `agents.<id>` (p634).
13
+ - `skaile run` prints the typed `result` a finished `agent.run` role returned, and no `output=` for a failed run (p636).
14
+ - omp: the system prompt goes to a per-spawn file under `.skaile/cache/omp-system/` that the process deletes, so a nested `agent.run` child never reads its parent's prompt (p630); the agent's soul reaches the live prompt once whether or not a memory block seeds from `SOUL.md` (p631); omp's home is a private directory that links the agent's files, so omp's databases never land in the pinned agent directory, and a missing credential names `/login` instead of a path in the cache (p637).
15
+
16
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - Library authoring: the open findings of the 5.12.0 critique.
17
+
18
+ - A library holds plain files: `validate`, `library index`, `library publish` and `asset import` (and `asset migrate --mode copy`) refuse a symlink with one line, `<path> is a symlink to <target>`, and exit 1. This covers an alias of an asset directory (`s1alias -> s1`), a link to `.` and a link to a file inside an asset. `validate` no longer passes a library that `index` and the publish plan refuse (p520, p224).
19
+ - Editor leftovers (`*.swp`, `*.swo`, `*~`) join the names no asset ships: `asset import`, the deploy and the content hash leave them out (p224).
20
+ - The asset-scan cycle warning is printed once per directory and run, names the library and says `remove the symlink` (p524).
21
+ - Versions follow strict semver (no leading zero, no empty identifier, numbers up to 15 digits): `01.0.0`, `1.0.0-alpha..1` and `99999999999999999999.0.0` are refused by `validate`, `index` and the publish plan (p521).
22
+ - A SKILL.md with a UTF-8 BOM or CRLF line endings parses like any other; a file that still fails says `BOM` or `CRLF` in the message (p522).
23
+ - `library pull` and `library sync` print `! <n> asset(s) on disk are not in the manifest; run skaile library index <name>` after bringing assets the manifest does not list (p523).
24
+ - `library create --help` offers the scaffoldable kinds only (p567).
25
+ - An untouched scaffold body (`Skill prompt goes here.`) is an error in `validate` (exit 1), so a passing `validate` means the asset can be published; the publish plan keeps refusing it, and `library index` keeps indexing but warns `publish refuses it until you write the <kind> prompt` (p675).
26
+
27
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - Consume commands: the open findings of the 5.12.0 critique.
28
+
29
+ - `source add` of a source with no publisher (a `file://` URL, a local path, GitLab, a manifest without `publisher:`) exits 1 with `publisher must be declared in skaile.manifest.yaml … or recorded with skaile source add --publisher` and records nothing, instead of printing `Indexed` and `registered` for a source every later command skips. New option `source add --publisher <name>` records the publisher on the `sources:` entry (`SourceEntry.publisher`, also in preset `sources:`); `publisher:` in the source manifest still wins (p540, p613).
30
+ - A local path given to `source add` is resolved to an absolute, real path before it is stored: `../remotes/srcA.git` and its absolute path are one source, cloned under `cache/sources/`. The local-catalog errors name `skaile library init <name> --path <dir>` (p618).
31
+ - `add` refuses to deploy over a folder (or agent file) no lock entry owns, such as a hand-made skill of the same name: exit 1, the folder is named, `--force` replaces it. A folder the deploy would rewrite with the same content (the one `asset import` copied the skill from: same bytes, or same body with frontmatter the asset only extends) is adopted without a word (p542).
32
+ - `update` re-locks and reports only the source assets whose files changed. A source asset without a declared version keeps its `0.0.0-sha.<commit>` lock key while its files hash the same, so `update` and `outdated` list the same assets (p543).
33
+ - `update` skips the catalog refresh when every locked asset comes from a library, and prints a failed refresh as `! Catalog refresh failed` (not `✗`) when it goes on with exit 0 (p544).
34
+ - A source clone that cannot be refreshed is reported once as `! source clone <name> not refreshed: <cause>; using the cached commit`, without the `[repo-manager]` tag, the double period or the second path (p545).
35
+ - `library link` to a remote that already has branches but not the library's branch exits 1 with `pass --branch <name>` instead of pushing a second, unrelated history (p546).
36
+ - `add` names a ref held by two libraries once (the `! … exists in 2 libraries` warning), not a second time as `is held at different versions` (p547).
37
+ - `source sync <name>` with a name two sources share exits 1 and lists both, as `show` and `remove` do (p548).
38
+ - `update <ref>` of a locked asset that another asset requires answers `<ref> is required by <ref2>; run skaile update <declared ref>` (exit 1), not `No declared asset matches` (p550).
39
+ - Docs: `diff` with a publisher-less ref that names one locked asset still diffs it (p541).
40
+
41
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - Flows by id, local sources, flow dependencies and the docs site: the open findings of the 5.12.0 critique (docs-flows).
42
+
43
+ - A flow asset is named by its `id:`, not by the slug of `name:` (`name:` stays a display label): a flow with `id: flow-a` and `name: Something Else Entirely` is `flow:@acme/flow-a`, `add` finds it and deploys `.skaile/flows/flow-a/flow-a.flow.yaml`, which the flow engine loads. `validate`, `library index` and `publish --dry-run` fail a flow whose file stem differs from its `id:` (`flow id "x" does not match the file name "y.flow.yaml"`) (p670).
44
+ - `source add <local path>` exits 1 with one line, before anything is cloned, when the path is a registered library (`library list` already shows it) or not a git repository (p671).
45
+ - The skills a flow's nodes name in `run.assets` (and the sub-flows they call) are the flow's dependencies: `info` lists them, `add flow:…` deploys them, `check` and `install --locked` report one that is missing (p676).
46
+ - A flow run whose driver cannot start (SDK missing, no model, `omp` exits at once) ends the session as `failed` with the cause in `error`; `status` prints `Error:`. It used to stay `paused` although no node ran (p677).
47
+ - The docs site resolves every relative link (`../commands/library`, `./03-run-a-flow`, links to repo files become GitHub links), and CI builds the site and fails on a dead internal link: `docs/site/scripts/check-links.mjs` (`bun run check:links`) (p672).
48
+ - Docs: driver targets are `claude-code`, `omp` and `codex` only (p673); `skaile migrate assets` is the CLI for the publication half of the v2→v3 migration (p674); `WORKSPACE_IDEAS` is marked ideas-only (p678); tutorial 03 shows the real `Driver:` line, the failed-run output and the flow dependencies; the stale wording of the v6 docs list is fixed.
49
+
50
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - Harnesses and drivers: the open findings of the 5.12.0 critique.
51
+
52
+ - `--driver omp` with an unusable provider entry (credential variable unset) starts omp on the user's own agent directory when no entry is usable or the selected model's entry was left out, so omp's own login and default model apply and the notice `omp falls back to its own login` is true (p362).
53
+ - `check`, `doctor` and `install --locked` treat an omp agent as deployed only when the flat `.omp/agents/<name>.md` exists; a deleted file is `locked but its deployed copy is missing` (p590).
54
+ - `integration install` adds `.codex/config.toml`, `.omp/extensions/skaile.ts` and `.skaile/plugin-state.json` to the project `.gitignore`, as `init` does; the docs say they are per machine (p591).
55
+ - `add --global` for omp deploys to `~/.omp/agent/skills`, `~/.omp/agent/agents/<name>.md`, `~/.omp/agent/prompts` and `~/.omp/agent/contracts`, where omp reads user assets (p592).
56
+ - `run --driver codex --model <provider>/<model>` for a provider codex cannot address exits 1 naming the provider, before any request (p593).
57
+ - A Claude login that expired ends the turn with the SDK's own text and `run claude /login` instead of `The model reported an error but sent no details` (p594).
58
+ - `skaile run "<prompt>"` with stdout piped writes the bare answer and one newline, with no `agent ▶` prefix and no blank lines; a failed turn writes nothing to stdout (p595).
59
+ - Docs: `repl` lists every registered driver and the banner counts the deployed skills (p596).
60
+ - `integration uninstall` names the file the entry came from (`.mcp.json`) and deletes an empty `.claude/settings.json` and `.skaile/plugin-state.json` (p597).
61
+ - A failed turn is printed once: one `✗` line with the provider's message, `check your API key or login` for a credential error, and a pointer to `skaile logs`; the `[error]` records stay in the log database (p598).
62
+ - The `serve` preflight says the optional SDK must be installed next to the `skaile` install, not in the project (p656).
63
+ - `validate` reports a `connectors:` entry whose `driver` no catalog entry provides, with the text `serve` logs (p657).
64
+ - The codex driver accepts the codex CLI's ChatGPT login (`$CODEX_HOME/auth.json`, default `~/.codex/auth.json`) as well as an API key: the file is linked into the session's private `CODEX_HOME`, an exported `OPENAI_API_KEY` / `CODEX_API_KEY` still wins, and with neither the start fails with `codex driver needs OPENAI_API_KEY, or the codex CLI's ChatGPT login …` (p348b).
65
+
66
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - Protocol, serve and plugins: the open findings of the 5.12.0 critique.
67
+
68
+ - `skaile serve` on a busy port exits 1 right after the one-line message instead of staying alive (p468).
69
+ - A `local` connector honours `mountPath:` (on the connector or under `params:`, `${project}` allowed): reads and writes go to that directory, not to a copy under `.mounts/<id>` (p650).
70
+ - A second `plugin install` works: the store install is frozen to its lock file only when the plugin list did not change. A failed install also puts the store's `package.json` back (p651).
71
+ - `plugin install` falls back to `npm` when `bun` is not on `PATH`, and names the missing tools when neither is found (p652).
72
+ - The replayed `session_init_ack` carries the same `capabilitySignature` as the handshake ack of the same runner: the `runner.*` capabilities are registered before the handshake ack is built, not after (p653).
73
+ - The no-token warning of a loopback bind (`--host 127.0.0.1`) says local processes can drive the agent and no longer advises `--host` (p654).
74
+ - A project without `agent.definition` (a fresh `skaile init`) no longer logs `no agent definition found` as a warning; a set but unresolvable `agent.definition` still warns (p655).
75
+
76
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - State and upgrade: the open findings of the 5.12.0 critique.
77
+
78
+ - `skaile validate <path>` creates nothing: a missing path, or the gone directory of a registered library, stays missing and exits 1. `assertManifestEditable` no longer creates the library directory (p560).
79
+ - The 5.12.0 MIGRATION entry says a project that added an agent with 5.11.0 sees one rewrite of `.claude/agents/<name>.md` (p561).
80
+ - An equal-version tie between libraries goes to the default library on `update` and `add`, then to the library the lock names; the docs and the MIGRATION entry now say so (p562).
81
+ - `install`, `install --locked` and `update` keep `.env`, `.venv/`, `__pycache__/` and `*.pyc` in a deployed asset folder and print nothing about them; they remove only the files they print (p563).
82
+ - A declared asset with a requirement nothing holds reads `requires <dep> but no library or source holds it — register the library …` in `check`, `doctor`, `outdated`, `why`, `diff` and `install --locked`, not `run skaile install` (p564).
83
+ - `add` and `install` say `Store unreachable` for a requirement the store could not be asked about, not `not found` (p565).
84
+ - `diff <ref>` prints the diff of `<ref>` first and lists a problem of an asset it requires after it (p575).
85
+ - `outdated` says `locked and not deployed` and advises `skaile install --locked` for a required asset whose folder is gone; `check` and `doctor` advise it too (p577).
86
+ - From a subdirectory of a project, `No skaile.yaml found` is followed by the nearest parent that holds one and `--project-dir` (p578).
87
+
88
+ - [#1064](https://github.com/skaile-ai/workspaces/pull/1064) [`c0c483e`](https://github.com/skaile-ai/workspaces/commit/c0c483e068aeb5f5f1979565a251b5a29e0d72c9) Thanks [@mortegro](https://github.com/mortegro)! - Store: the open findings of the 5.12.0 critique.
89
+
90
+ - `install --locked` restores a store asset whose upstream repo is `github.com/skaile-ai/ai-assets` (the URL the bundled factory source shares): it is fetched and SHA-verified file by file instead of being checked against the bundled factory tree, which does not hold its path. A second machine (lock + yaml only) restores it, and `check`, `doctor`, `outdated` and `install --locked` agree (p380).
91
+ - Every store kind is installable: `store search`, `store show` and the `manage` feed list `mcp-server`, `agent` and `contract` rows with an `Install:` line, and `add` takes them and `install --locked` restores them; the `Not installable` branch is gone (p610).
92
+ - A store row's requirements are canonical `kind:@publisher/name[#pin]` refs; a kind-less `@publisher/name` gets the kind `skill`, and a path-style entry the indexer left behind (`../../../ai-asset-management/agents/skaile/agent.yaml`) is dropped. `add` of such an agent no longer fails with `Asset not found` (p611, p615).
93
+ - `store show <ref>` with a ref that is not a ref prints `Invalid asset ref "<ref>": ...` instead of blaming the network; `store show`/`store search --kind <unknown>` exit 1 and list the valid kinds (p612).
94
+ - A store row flagged `demo` or `internal` is hidden from `search`/`store search` by default; `--all` lists it (p616).
95
+ - A 404 or 405 from a REST-framed catalog host says `framing is rest; set catalog.framing trpc`; `catalog test` probes the route the store verbs use for the configured framing and names the mismatch instead of printing `reachable` (p617).
96
+ - With `cache_ttl: 0`, `search --store` answers from the cached catalog like `store search`; plain `search` keeps the store leg off with a one-line notice (p619).
97
+ - `source manifest init <bare name>` that is neither a registered source nor a store slug exits 1 with `not a git URL or an owner/repo shorthand`, as `source add` does, and clones nothing (p614).
98
+
3
99
  ## 5.12.0
4
100
 
5
101
  ### Minor Changes
package/README.md CHANGED
@@ -82,8 +82,8 @@ first `run` or `repl`:
82
82
 
83
83
  | Driver | Install |
84
84
  |---|---|
85
- | `claude-sdk` (default) | `npm i -D @anthropic-ai/claude-agent-sdk` (with Bun: `bun add @anthropic-ai/claude-agent-sdk`) |
86
- | `codex` | `npm i -D @openai/codex-sdk` (with Bun: `bun add @openai/codex-sdk`) |
85
+ | `claude-sdk` (default) | `npm i @anthropic-ai/claude-agent-sdk` (with Bun: `bun add @anthropic-ai/claude-agent-sdk`) |
86
+ | `codex` | `npm i @openai/codex-sdk` (with Bun: `bun add @openai/codex-sdk`) |
87
87
  | `omp` | none; needs the `omp` binary on your `PATH` and a configured model |
88
88
 
89
89
  Without the SDK, `skaile run` exits 1 with `Claude Agent SDK not installed` (or `Codex SDK not installed`).
@@ -1,28 +1,28 @@
1
- import { storeNotInstallableReason } from './chunk-K4VOEYOR.js';
2
- import { getKnownKinds } from './chunk-GWD3QNVS.js';
3
- import './chunk-7XWUJC3A.js';
1
+ import { storeNotInstallableReason } from './chunk-U27JRO5L.js';
2
+ import { getKnownKinds } from './chunk-4NJ3QQHZ.js';
3
+ import './chunk-XBYSURMK.js';
4
4
  import './chunk-X3RMRJNR.js';
5
5
  import './chunk-7RGTAEG6.js';
6
6
  import './chunk-NUELZWCF.js';
7
- import './chunk-C3BMXXTN.js';
8
- import './chunk-7CR2OZPA.js';
9
- import './chunk-UTKENBB6.js';
7
+ import './chunk-DKGEV6SQ.js';
8
+ import './chunk-NVO6WECE.js';
9
+ import './chunk-PXDWTJ3P.js';
10
10
  import './chunk-H5U7LNTJ.js';
11
11
  import './chunk-3TXEJN4W.js';
12
- import './chunk-6VLHITAM.js';
13
- import './chunk-T5TSLSRO.js';
12
+ import './chunk-57SF6W6E.js';
13
+ import './chunk-BF422IDP.js';
14
14
  import './chunk-4GY63JU6.js';
15
- import { factoryAssetRoots } from './chunk-SHQMPGOL.js';
16
- import './chunk-PMECEZK3.js';
15
+ import { factoryAssetRoots } from './chunk-QO7CR3KB.js';
16
+ import './chunk-D54T2F54.js';
17
17
  import './chunk-5BEFNLOR.js';
18
18
  import './chunk-A2ULN3KX.js';
19
- import { scanRepo } from './chunk-PNOGX36L.js';
19
+ import { scanRepo } from './chunk-L3ZGYSWY.js';
20
20
  import './chunk-L5VSIPQD.js';
21
- import './chunk-CPSIPIX7.js';
22
- import './chunk-CTP3XBMF.js';
21
+ import './chunk-IG5LZ3WU.js';
22
+ import './chunk-IY5E7Y5W.js';
23
23
  import './chunk-RVRB27AN.js';
24
- import { parseRequires } from './chunk-XTVSNWLL.js';
25
- import './chunk-PNTXHTBC.js';
24
+ import { parseRequires } from './chunk-M3P4BYRK.js';
25
+ import './chunk-J4OYIYFQ.js';
26
26
  import './chunk-ICSCSM5D.js';
27
27
  import './chunk-DKXNKFKP.js';
28
28
  import './chunk-MJHSLODD.js';
@@ -52,8 +52,8 @@ function libraryEntryOf(asset) {
52
52
  async function libraryAssets() {
53
53
  const notes = [];
54
54
  try {
55
- const { openLibraryManager } = await import('./open-library-N6ESO6IK.js');
56
- const { getKindRegistry } = await import('./open-registry-CBZ5MWTT.js');
55
+ const { openLibraryManager } = await import('./open-library-PZAT3TJA.js');
56
+ const { getKindRegistry } = await import('./open-registry-W46UXZ3I.js');
57
57
  const { scanAuthoringLibraries } = await import('./library/index.js');
58
58
  const { library: index, close } = await openLibraryManager();
59
59
  try {
@@ -86,7 +86,7 @@ async function libraryAssets() {
86
86
  async function storeAssets(projectDir) {
87
87
  const notes = [];
88
88
  try {
89
- const { resolveCatalogSource } = await import('./open-library-N6ESO6IK.js');
89
+ const { resolveCatalogSource } = await import('./open-library-PZAT3TJA.js');
90
90
  const { source, close } = await resolveCatalogSource({ projectDir });
91
91
  try {
92
92
  const assets = (await source.listAssets()).filter(
@@ -167,5 +167,5 @@ async function gatherAssetFeeds(am, projectDir) {
167
167
  }
168
168
 
169
169
  export { gatherAssetFeeds };
170
- //# sourceMappingURL=asset-feeds-AM6PSSGM.js.map
171
- //# sourceMappingURL=asset-feeds-AM6PSSGM.js.map
170
+ //# sourceMappingURL=asset-feeds-ALMTHLPV.js.map
171
+ //# sourceMappingURL=asset-feeds-ALMTHLPV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAS,eAAe,KAAA,EAAsC;AAC5D,EAAA,MAAM,EAAE,UAAS,GAAI,KAAA;AACrB,EAAA,MAAM,MAAA,GAAU,SAAS,QAAA,EAAkD,QAAA;AAC3E,EAAA,MAAM,WAAA,GAAc,SAAS,QAAA,IAAY,MAAA;AACzC,EAAA,MAAM,cACJ,OAAO,WAAA,KAAgB,QAAA,GACnB,WAAA,GACA,MAAM,OAAA,CAAQ,WAAW,CAAA,GACvB,WAAA,CAAY,OAAO,CAAC,CAAA,KAAmB,OAAO,CAAA,KAAM,QAAQ,CAAA,GAC5D,MAAA;AACR,EAAA,MAAM,OAAO,QAAA,CAAS,YAAA;AACtB,EAAA,OAAO;AAAA,IACL,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,aAAa,OAAO,QAAA,CAAS,WAAA,KAAgB,QAAA,GAAW,SAAS,WAAA,GAAc,EAAA;AAAA,IAC/E,QAAQ,KAAA,CAAM,YAAA;AAAA,IACd,WAAW,KAAA,CAAM,SAAA;AAAA,IACjB,GAAI,MAAM,MAAA,GAAS,EAAE,QAAQ,KAAA,CAAM,MAAA,KAAW,EAAC;AAAA,IAC/C,SAAS,KAAA,CAAM,OAAA;AAAA,IACf,QAAA,EAAU,gBAAgB,MAAA,GAAY,KAAK,aAAA,CAAc,EAAE,QAAA,EAAU,WAAA,EAAa,CAAA;AAAA,IAClF,cACE,KAAA,CAAM,IAAA,KAAS,YAAY,KAAA,CAAM,OAAA,CAAQ,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C,WAAW,EAAE,MAAA,EAAQ,OAAM,CAAE,CAAA;AACnD;AASA,eAAsB,gBAAA,CACpB,IACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,aAAA,EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,EAAc;AACpC,EAAA,MAAM,GAAA,GAAM,MAAM,YAAA,CAAa,EAAE,CAAA;AACjC,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA;AAAA,MACH,GAAG,IAAA,CAAK,OAAA;AAAA,MACR,GAAG,GAAA,CAAI,SAAA,EAAW,OAAA,CAAQ,OAAO,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,KAAA,EAAO,CAAC,GAAG,IAAA,CAAK,KAAA,EAAO,GAAG,KAAA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-AM6PSSGM.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Four feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex`, read through\n * `scanAuthoringLibraries` (`@skaile/workspaces/library`): the same scan\n * `library index` / `search --local` use, so publishers and refs match them\n * (per-asset `publisher_overrides` honoured), `dev_paths` assets are left out,\n * and a library that fails to scan becomes one note while the rest stay listed.\n * - **Factory assets** — the bundled first-party `factory-assets` tree\n * (`factoryAssetRoots()`), scanned from disk. Always present; no network.\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogEntry,\n factoryAssetRoots,\n parseRequires,\n scanRepo,\n} from \"@skaile/workspaces/core\";\nimport { getKnownKinds } from \"./open-registry.ts\";\nimport { storeNotInstallableReason } from \"./store-addable.ts\";\nimport type { DiscoveredAsset } from \"@skaile/workspaces/discovery\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\" | \"factory\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"factory\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n /**\n * Second-level grouping label for the manage tree. Defaults (when unset) to the\n * entry's `publisher`; the source feed sets it to the source's short repo name\n * so the Sources band groups by source — \"which repo did this come from\" — not\n * by the asset-intrinsic publisher.\n */\n group?: string;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n notes: FeedNote[];\n}\n\n/**\n * Map one discovered library asset to the `CatalogEntry` the manage rows read.\n * `publisher` is the bare per-asset publisher (what `search --local` prints),\n * `source` the manifest path. `repo` is left unset: it only feeds the Sources-tree\n * org grouping. `requires` / `dependencies` come from the manifest the way the\n * scanner fills them — string `requires:` refs parsed to `{kind, name}`, a bundle's\n * string `dependencies:` list verbatim.\n */\nfunction libraryEntryOf(asset: DiscoveredAsset): CatalogEntry {\n const { manifest } = asset;\n const nested = (manifest.metadata as Record<string, unknown> | undefined)?.requires;\n const rawRequires = manifest.requires ?? nested;\n const requireRefs =\n typeof rawRequires === \"string\"\n ? rawRequires\n : Array.isArray(rawRequires)\n ? rawRequires.filter((r): r is string => typeof r === \"string\")\n : undefined;\n const deps = manifest.dependencies;\n return {\n name: asset.name,\n kind: asset.kind as AssetKind,\n description: typeof manifest.description === \"string\" ? manifest.description : \"\",\n source: asset.manifestPath,\n publisher: asset.publisher,\n ...(asset.plugin ? { plugin: asset.plugin } : {}),\n version: asset.version,\n requires: requireRefs === undefined ? [] : parseRequires({ requires: requireRefs }),\n dependencies:\n asset.kind === \"bundle\" && Array.isArray(deps)\n ? deps.filter((d): d is string => typeof d === \"string\" && d.length > 0)\n : [],\n };\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/cache/sources/` cache) through\n * `scanAuthoringLibraries`, grouped under the bare library name\n * (`group: <name>`) so the manage TUI shows a clean `<name>` band — no\n * `library:` prefix (mirrors the source feed). Plugin grouping (`entry.plugin`)\n * comes from `DiscoveredAsset.plugin`. A library whose scan fails becomes one\n * `FeedNote`; the outer `catch` covers only opening the index.\n */\nasync function libraryAssets(): Promise<{\n entries: OriginEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n // Lazy: the library subpath pulls in SQLite, which the other feeds never need.\n const { openLibraryManager } = await import(\"./open-library.ts\");\n const { getKindRegistry } = await import(\"./open-registry.ts\");\n const { scanAuthoringLibraries } = await import(\"@skaile/workspaces/library\");\n const { library: index, close } = await openLibraryManager();\n try {\n const entries: OriginEntry[] = [];\n for (const scan of await scanAuthoringLibraries(index, getKindRegistry())) {\n if (scan.error !== undefined) {\n notes.push({ feed: \"libraries\", message: `${scan.library.name}: ${scan.error}` });\n continue;\n }\n for (const asset of scan.assets) {\n entries.push({\n origin: \"library\",\n entry: libraryEntryOf(asset),\n group: scan.library.name,\n });\n }\n }\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n // The store lists only what `skaile add` can install (see store-addable.ts).\n const assets = (await source.listAssets()).filter(\n (a) => storeNotInstallableReason(a) === undefined,\n );\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n plugin: a.plugin,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], notes };\n }\n}\n\n/** The slice of `AssetManager` the source feed needs (kept narrow for tests). */\ninterface AssetManagerLike {\n search: () => Promise<CatalogEntry[]>;\n searchRepoRoots: () => { repoName: string; root: string }[];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Plugin grouping\n * (`entry.plugin`) is stamped by the scanner, so entries pass through as-is.\n */\nasync function sourceAssets(am: AssetManagerLike): Promise<OriginEntry[]> {\n // The bundled factory tree is injected into the repositories map as an implicit\n // source, so `am.search()` returns it too. It has its own `factory` origin band,\n // so drop it here — otherwise the same first-party skills list twice under Sources.\n const factoryPrefixes = factoryAssetRoots().map((r) => (r.endsWith(path.sep) ? r : r + path.sep));\n const isFactoryPath = (p: string) =>\n factoryPrefixes.some((fp) => p === fp.slice(0, -1) || p.startsWith(fp));\n\n const all = (await am.search()).filter((e) => !isFactoryPath(e.source));\n const entries: OriginEntry[] = [];\n // Group each source's entries under the source node (its short repo name), not\n // the publisher: under Sources the navigational question is \"which repo did\n // this come from\". Each entry's `source` (absolute manifest path) lives under\n // exactly one declared root, so group by prefix. The cache slug is\n // URL-keyed `github.com/<org>/<repo>` — take the trailing segment.\n for (const { repoName, root } of am.searchRepoRoots()) {\n if (isFactoryPath(root)) continue;\n const prefix = root.endsWith(path.sep) ? root : root + path.sep;\n const owned = all.filter((e) => e.source === root || e.source.startsWith(prefix));\n if (owned.length === 0) continue;\n const sourceName = repoName.split(\"/\").pop() || repoName;\n for (const entry of owned) entries.push({ origin: \"source\", entry, group: sourceName });\n }\n return entries;\n}\n\n/**\n * Factory-asset feed: scan the bundled first-party `factory-assets` tree(s)\n * resolved by `factoryAssetRoots()` (the `SKAILE_FACTORY_ASSETS_DIR` override\n * layer ahead of the bundled tree). Local disk only, no network — the entries are\n * the built-in skills / connectors / bundles that ship with `@skaile/workspaces`.\n * `factoryAssetRoots()` already dedupes, so the env override pointing at the\n * bundled dir collapses to one root.\n */\nasync function factoryAssets(): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n entries.push(...(await scanRepo(root, \"skaile-factory\", { knownKinds: getKnownKinds() })));\n }\n return { entries, notes };\n } catch (err) {\n notes.push({\n feed: \"factory\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk. The factory\n * scan is local disk only, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: AssetManagerLike,\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = await factoryAssets();\n const src = await sourceAssets(am);\n return {\n entries: [\n ...src,\n ...libs.entries,\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAS,eAAe,KAAA,EAAsC;AAC5D,EAAA,MAAM,EAAE,UAAS,GAAI,KAAA;AACrB,EAAA,MAAM,MAAA,GAAU,SAAS,QAAA,EAAkD,QAAA;AAC3E,EAAA,MAAM,WAAA,GAAc,SAAS,QAAA,IAAY,MAAA;AACzC,EAAA,MAAM,cACJ,OAAO,WAAA,KAAgB,QAAA,GACnB,WAAA,GACA,MAAM,OAAA,CAAQ,WAAW,CAAA,GACvB,WAAA,CAAY,OAAO,CAAC,CAAA,KAAmB,OAAO,CAAA,KAAM,QAAQ,CAAA,GAC5D,MAAA;AACR,EAAA,MAAM,OAAO,QAAA,CAAS,YAAA;AACtB,EAAA,OAAO;AAAA,IACL,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,aAAa,OAAO,QAAA,CAAS,WAAA,KAAgB,QAAA,GAAW,SAAS,WAAA,GAAc,EAAA;AAAA,IAC/E,QAAQ,KAAA,CAAM,YAAA;AAAA,IACd,WAAW,KAAA,CAAM,SAAA;AAAA,IACjB,GAAI,MAAM,MAAA,GAAS,EAAE,QAAQ,KAAA,CAAM,MAAA,KAAW,EAAC;AAAA,IAC/C,SAAS,KAAA,CAAM,OAAA;AAAA,IACf,QAAA,EAAU,gBA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AE,OAAA,EAAS,EAAC,EAAG,KAAA,EAAM;AAAA,EAC9B;AACF;AAGA,SAAS,GAAA,CAAI,QAAqB,OAAA,EAAwC;AACxE,EAAA,OAAO,QAAQ,GAAA,CAAI,CAAC,WAAW,EAAE,MAAA,EAAQ,OAAM,CAAE,CAAA;AACnD;AASA,eAAsB,gBAAA,CACpB,IACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,aAAA,EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,EAAc;AACpC,EAAA,MAAM,GAAA,GAAM,MAAM,YAAA,CAAa,EAAE,CAAA;AACjC,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA;AAAA,MACH,GAAG,IAAA,CAAK,OAAA;AAAA,MACR,GAAG,GAAA,CAAI,SAAA,EAAW,OAAA,CAAQ,OAAO,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,KAAA,EAAO,CAAC,GAAG,IAAA,CAAK,KAAA,EAAO,GAAG,KAAA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-ALMTHLPV.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Four feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex`, read through\n * `scanAuthoringLibraries` (`@skaile/workspaces/library`): the same scan\n * `library index` / `search --local` use, so publishers and refs match them\n * (per-asset `publisher_overrides` honoured), `dev_paths` assets are left out,\n * and a library that fails to scan becomes one note while the rest stay listed.\n * - **Factory assets** — the bundled first-party `factory-assets` tree\n * (`factoryAssetRoots()`), scanned from disk. Always present; no network.\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogEntry,\n factoryAssetRoots,\n parseRequires,\n scanRepo,\n} from \"@skaile/workspaces/core\";\nimport { getKnownKinds } from \"./open-registry.ts\";\nimport { storeNotInstallableReason } from \"./store-addable.ts\";\nimport type { DiscoveredAsset } from \"@skaile/workspaces/discovery\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\" | \"factory\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"factory\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n /**\n * Second-level grouping label for the manage tree. Defaults (when unset) to the\n * entry's `publisher`; the source feed sets it to the source's short repo name\n * so the Sources band groups by source — \"which repo did this come from\" — not\n * by the asset-intrinsic publisher.\n */\n group?: string;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n notes: FeedNote[];\n}\n\n/**\n * Map one discovered library asset to the `CatalogEntry` the manage rows read.\n * `publisher` is the bare per-asset publisher (what `search --local` prints),\n * `source` the manifest path. `repo` is left unset: it only feeds the Sources-tree\n * org grouping. `requires` / `dependencies` come from the manifest the way the\n * scanner fills them — string `requires:` refs parsed to `{kind, name}`, a bundle's\n * string `dependencies:` list verbatim.\n */\nfunction libraryEntryOf(asset: DiscoveredAsset): CatalogEntry {\n const { manifest } = asset;\n const nested = (manifest.metadata as Record<string, unknown> | undefined)?.requires;\n const rawRequires = manifest.requires ?? nested;\n const requireRefs =\n typeof rawRequires === \"string\"\n ? rawRequires\n : Array.isArray(rawRequires)\n ? rawRequires.filter((r): r is string => typeof r === \"string\")\n : undefined;\n const deps = manifest.dependencies;\n return {\n name: asset.name,\n kind: asset.kind as AssetKind,\n description: typeof manifest.description === \"string\" ? manifest.description : \"\",\n source: asset.manifestPath,\n publisher: asset.publisher,\n ...(asset.plugin ? { plugin: asset.plugin } : {}),\n version: asset.version,\n requires: requireRefs === undefined ? [] : parseRequires({ requires: requireRefs }),\n dependencies:\n asset.kind === \"bundle\" && Array.isArray(deps)\n ? deps.filter((d): d is string => typeof d === \"string\" && d.length > 0)\n : [],\n };\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/cache/sources/` cache) through\n * `scanAuthoringLibraries`, grouped under the bare library name\n * (`group: <name>`) so the manage TUI shows a clean `<name>` band — no\n * `library:` prefix (mirrors the source feed). Plugin grouping (`entry.plugin`)\n * comes from `DiscoveredAsset.plugin`. A library whose scan fails becomes one\n * `FeedNote`; the outer `catch` covers only opening the index.\n */\nasync function libraryAssets(): Promise<{\n entries: OriginEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n // Lazy: the library subpath pulls in SQLite, which the other feeds never need.\n const { openLibraryManager } = await import(\"./open-library.ts\");\n const { getKindRegistry } = await import(\"./open-registry.ts\");\n const { scanAuthoringLibraries } = await import(\"@skaile/workspaces/library\");\n const { library: index, close } = await openLibraryManager();\n try {\n const entries: OriginEntry[] = [];\n for (const scan of await scanAuthoringLibraries(index, getKindRegistry())) {\n if (scan.error !== undefined) {\n notes.push({ feed: \"libraries\", message: `${scan.library.name}: ${scan.error}` });\n continue;\n }\n for (const asset of scan.assets) {\n entries.push({\n origin: \"library\",\n entry: libraryEntryOf(asset),\n group: scan.library.name,\n });\n }\n }\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n // The store lists only what `skaile add` can install (see store-addable.ts).\n const assets = (await source.listAssets()).filter(\n (a) => storeNotInstallableReason(a) === undefined,\n );\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n plugin: a.plugin,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], notes };\n }\n}\n\n/** The slice of `AssetManager` the source feed needs (kept narrow for tests). */\ninterface AssetManagerLike {\n search: () => Promise<CatalogEntry[]>;\n searchRepoRoots: () => { repoName: string; root: string }[];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Plugin grouping\n * (`entry.plugin`) is stamped by the scanner, so entries pass through as-is.\n */\nasync function sourceAssets(am: AssetManagerLike): Promise<OriginEntry[]> {\n // The bundled factory tree is injected into the repositories map as an implicit\n // source, so `am.search()` returns it too. It has its own `factory` origin band,\n // so drop it here — otherwise the same first-party skills list twice under Sources.\n const factoryPrefixes = factoryAssetRoots().map((r) => (r.endsWith(path.sep) ? r : r + path.sep));\n const isFactoryPath = (p: string) =>\n factoryPrefixes.some((fp) => p === fp.slice(0, -1) || p.startsWith(fp));\n\n const all = (await am.search()).filter((e) => !isFactoryPath(e.source));\n const entries: OriginEntry[] = [];\n // Group each source's entries under the source node (its short repo name), not\n // the publisher: under Sources the navigational question is \"which repo did\n // this come from\". Each entry's `source` (absolute manifest path) lives under\n // exactly one declared root, so group by prefix. The cache slug is\n // URL-keyed `github.com/<org>/<repo>` — take the trailing segment.\n for (const { repoName, root } of am.searchRepoRoots()) {\n if (isFactoryPath(root)) continue;\n const prefix = root.endsWith(path.sep) ? root : root + path.sep;\n const owned = all.filter((e) => e.source === root || e.source.startsWith(prefix));\n if (owned.length === 0) continue;\n const sourceName = repoName.split(\"/\").pop() || repoName;\n for (const entry of owned) entries.push({ origin: \"source\", entry, group: sourceName });\n }\n return entries;\n}\n\n/**\n * Factory-asset feed: scan the bundled first-party `factory-assets` tree(s)\n * resolved by `factoryAssetRoots()` (the `SKAILE_FACTORY_ASSETS_DIR` override\n * layer ahead of the bundled tree). Local disk only, no network — the entries are\n * the built-in skills / connectors / bundles that ship with `@skaile/workspaces`.\n * `factoryAssetRoots()` already dedupes, so the env override pointing at the\n * bundled dir collapses to one root.\n */\nasync function factoryAssets(): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n entries.push(...(await scanRepo(root, \"skaile-factory\", { knownKinds: getKnownKinds() })));\n }\n return { entries, notes };\n } catch (err) {\n notes.push({\n feed: \"factory\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk. The factory\n * scan is local disk only, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: AssetManagerLike,\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = await factoryAssets();\n const src = await sourceAssets(am);\n return {\n entries: [\n ...src,\n ...libs.entries,\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n"]}
@@ -1,17 +1,17 @@
1
- export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-DCHQ6BAZ.js';
2
- import '../chunk-T5TSLSRO.js';
1
+ export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-ZU24LWBI.js';
2
+ import '../chunk-BF422IDP.js';
3
3
  import '../chunk-4GY63JU6.js';
4
- import '../chunk-SHQMPGOL.js';
5
- import '../chunk-PMECEZK3.js';
4
+ import '../chunk-QO7CR3KB.js';
5
+ import '../chunk-D54T2F54.js';
6
6
  import '../chunk-5BEFNLOR.js';
7
7
  import '../chunk-A2ULN3KX.js';
8
- import '../chunk-PNOGX36L.js';
8
+ import '../chunk-L3ZGYSWY.js';
9
9
  import '../chunk-L5VSIPQD.js';
10
- import '../chunk-CPSIPIX7.js';
11
- import '../chunk-CTP3XBMF.js';
10
+ import '../chunk-IG5LZ3WU.js';
11
+ import '../chunk-IY5E7Y5W.js';
12
12
  import '../chunk-RVRB27AN.js';
13
- import '../chunk-XTVSNWLL.js';
14
- import '../chunk-PNTXHTBC.js';
13
+ import '../chunk-M3P4BYRK.js';
14
+ import '../chunk-J4OYIYFQ.js';
15
15
  import '../chunk-ICSCSM5D.js';
16
16
  import '../chunk-DKXNKFKP.js';
17
17
  import '../chunk-MJHSLODD.js';
@@ -1,28 +1,28 @@
1
- export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, installAgentInstances, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName } from '../chunk-TVAR4JHA.js';
2
- import '../chunk-C3BMXXTN.js';
3
- import '../chunk-7CR2OZPA.js';
4
- import '../chunk-UTKENBB6.js';
1
+ export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, installAgentInstances, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName } from '../chunk-Y7WKXPWS.js';
2
+ import '../chunk-DKGEV6SQ.js';
3
+ import '../chunk-NVO6WECE.js';
4
+ import '../chunk-PXDWTJ3P.js';
5
5
  import '../chunk-H5U7LNTJ.js';
6
6
  import '../chunk-3TXEJN4W.js';
7
- export { SCAFFOLD_KINDS, createScaffold, deployAll, installAgent, installTargetOf, removeAsset } from '../chunk-NJV5SLEK.js';
7
+ export { SCAFFOLD_KINDS, createScaffold, deployAll, installAgent, installTargetOf, removeAsset } from '../chunk-5FYOM4RF.js';
8
8
  export { BUILT_IN_FRAGMENTS, loadPromptExtensions, resolveFragments } from '../chunk-NOA6EJXE.js';
9
9
  export { appendHistory, clearHistory, getRecentHistory, loadHistory } from '../chunk-KTBKW2FI.js';
10
10
  import '../chunk-UQ6LFBPZ.js';
11
- export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, driverTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-7QWQTA5S.js';
12
- import '../chunk-6VLHITAM.js';
13
- import '../chunk-T5TSLSRO.js';
11
+ export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, driverTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-4L4R5LV3.js';
12
+ import '../chunk-57SF6W6E.js';
13
+ import '../chunk-BF422IDP.js';
14
14
  import '../chunk-4GY63JU6.js';
15
- import '../chunk-SHQMPGOL.js';
16
- import '../chunk-PMECEZK3.js';
15
+ import '../chunk-QO7CR3KB.js';
16
+ import '../chunk-D54T2F54.js';
17
17
  import '../chunk-5BEFNLOR.js';
18
18
  import '../chunk-A2ULN3KX.js';
19
- import '../chunk-PNOGX36L.js';
19
+ import '../chunk-L3ZGYSWY.js';
20
20
  import '../chunk-L5VSIPQD.js';
21
- import '../chunk-CPSIPIX7.js';
22
- import '../chunk-CTP3XBMF.js';
21
+ import '../chunk-IG5LZ3WU.js';
22
+ import '../chunk-IY5E7Y5W.js';
23
23
  import '../chunk-RVRB27AN.js';
24
- import '../chunk-XTVSNWLL.js';
25
- import '../chunk-PNTXHTBC.js';
24
+ import '../chunk-M3P4BYRK.js';
25
+ import '../chunk-J4OYIYFQ.js';
26
26
  import '../chunk-ICSCSM5D.js';
27
27
  import '../chunk-DKXNKFKP.js';
28
28
  import '../chunk-MJHSLODD.js';
@@ -1,20 +1,20 @@
1
- export { SCAFFOLD_KINDS, canonicalEntryRef, createScaffold, deployAll, deployAsset, deployedAssetDrift, diffDeployedAgent, installTargetOf, removeAsset, removeExcludedLeftovers } from '../chunk-NJV5SLEK.js';
1
+ export { SCAFFOLD_KINDS, canonicalEntryRef, createScaffold, deployAll, deployAsset, deployedAssetDrift, diffDeployedAgent, installTargetOf, removeAsset } from '../chunk-5FYOM4RF.js';
2
2
  import '../chunk-NOA6EJXE.js';
3
- import '../chunk-7QWQTA5S.js';
4
- import '../chunk-6VLHITAM.js';
5
- import '../chunk-T5TSLSRO.js';
3
+ import '../chunk-4L4R5LV3.js';
4
+ import '../chunk-57SF6W6E.js';
5
+ import '../chunk-BF422IDP.js';
6
6
  import '../chunk-4GY63JU6.js';
7
- import '../chunk-SHQMPGOL.js';
8
- import '../chunk-PMECEZK3.js';
7
+ import '../chunk-QO7CR3KB.js';
8
+ import '../chunk-D54T2F54.js';
9
9
  import '../chunk-5BEFNLOR.js';
10
10
  import '../chunk-A2ULN3KX.js';
11
- import '../chunk-PNOGX36L.js';
11
+ import '../chunk-L3ZGYSWY.js';
12
12
  import '../chunk-L5VSIPQD.js';
13
- import '../chunk-CPSIPIX7.js';
14
- import '../chunk-CTP3XBMF.js';
13
+ import '../chunk-IG5LZ3WU.js';
14
+ import '../chunk-IY5E7Y5W.js';
15
15
  import '../chunk-RVRB27AN.js';
16
- import '../chunk-XTVSNWLL.js';
17
- import '../chunk-PNTXHTBC.js';
16
+ import '../chunk-M3P4BYRK.js';
17
+ import '../chunk-J4OYIYFQ.js';
18
18
  import '../chunk-ICSCSM5D.js';
19
19
  import '../chunk-DKXNKFKP.js';
20
20
  import '../chunk-MJHSLODD.js';
@@ -1,18 +1,18 @@
1
- export { AGENT_RENDERERS, CODEX_IDENTITY_DIR, claudeCodeRenderer, codexRenderer, driverTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-7QWQTA5S.js';
2
- import '../chunk-6VLHITAM.js';
3
- import '../chunk-T5TSLSRO.js';
1
+ export { AGENT_RENDERERS, CODEX_IDENTITY_DIR, claudeCodeRenderer, codexRenderer, driverTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-4L4R5LV3.js';
2
+ import '../chunk-57SF6W6E.js';
3
+ import '../chunk-BF422IDP.js';
4
4
  import '../chunk-4GY63JU6.js';
5
- import '../chunk-SHQMPGOL.js';
6
- import '../chunk-PMECEZK3.js';
5
+ import '../chunk-QO7CR3KB.js';
6
+ import '../chunk-D54T2F54.js';
7
7
  import '../chunk-5BEFNLOR.js';
8
8
  import '../chunk-A2ULN3KX.js';
9
- import '../chunk-PNOGX36L.js';
9
+ import '../chunk-L3ZGYSWY.js';
10
10
  import '../chunk-L5VSIPQD.js';
11
- import '../chunk-CPSIPIX7.js';
12
- import '../chunk-CTP3XBMF.js';
11
+ import '../chunk-IG5LZ3WU.js';
12
+ import '../chunk-IY5E7Y5W.js';
13
13
  import '../chunk-RVRB27AN.js';
14
- import '../chunk-XTVSNWLL.js';
15
- import '../chunk-PNTXHTBC.js';
14
+ import '../chunk-M3P4BYRK.js';
15
+ import '../chunk-J4OYIYFQ.js';
16
16
  import '../chunk-ICSCSM5D.js';
17
17
  import '../chunk-DKXNKFKP.js';
18
18
  import '../chunk-MJHSLODD.js';
@@ -863,6 +863,28 @@ export declare class AssetManager {
863
863
  * clashing with an incoming asset is refused when its folder is on disk.
864
864
  */
865
865
  private assertNoFolderCollision;
866
+ /**
867
+ * Refuse to deploy over a folder (or agent file) the project did not put there: it is on disk,
868
+ * but no lock entry of the same kind and name owns it, so it is the user's own work and the
869
+ * deploy would replace it and `remove` would delete it. Throws one line naming the folder.
870
+ *
871
+ * A folder the deploy would rewrite with the same content is adopted silently (the way back
872
+ * from `asset import`: the project's own copy is what the library now holds): every file in
873
+ * it is shipped by the asset with the same bytes, or the same body and an asset frontmatter
874
+ * that only adds to the folder's (import normalizes it). Nothing is lost then.
875
+ *
876
+ * @param incoming - Assets about to be deployed, with the entry whose bytes would be written
877
+ * when there is one.
878
+ * @param owned - Assets the lock holds; one of the same kind and name, from any publisher,
879
+ * owns the folder (a publisher clash is {@link assertNoFolderCollision}'s refusal).
880
+ */
881
+ private assertNoUnownedFolder;
882
+ /**
883
+ * Whether deploying `entry` over the folder already in `target` loses nothing: the folder
884
+ * holds no file the asset does not ship, and each of its files equals the asset's, or is a
885
+ * markdown file with the same body whose frontmatter the asset's only extends.
886
+ */
887
+ private deployWouldOnlyRewriteSame;
866
888
  /**
867
889
  * Open the local index and snapshot its libraries + asset definitions.
868
890
  * Best-effort: no index file (never indexed), or any open/guard failure,
@@ -990,6 +1012,15 @@ export declare class AssetManager {
990
1012
  * expanded presets, and the library leg (entries + originating library per entry).
991
1013
  */
992
1014
  private resolveLibraryFirst;
1015
+ /**
1016
+ * A source asset without a declared version is keyed `0.0.0-sha.<repo commit>`, so every
1017
+ * commit of its repo would re-key (and re-lock, and report as updated) every asset of
1018
+ * that repo, changed or not. Keep the locked key and version of an asset whose files hash
1019
+ * to what the lock holds: `update` then re-locks only what changed, as `outdated` lists.
1020
+ * The commit stays the clone's, so the lock's `sources:` row still names the bytes' commit.
1021
+ * A ref the user pinned (`#<version>`) keeps the version it names.
1022
+ */
1023
+ private keepUnchangedSourceVersions;
993
1024
  /** The catalog fetcher to use: an injected one, else built from `stores`. */
994
1025
  private storeFetcherFor;
995
1026
  /**
@@ -1170,9 +1201,11 @@ export declare class AssetManager {
1170
1201
  onLibraryOrigin?: (deployedRef: string, library: string) => void;
1171
1202
  /** Called per already-locked asset this add moved to another library than its lock entry named. */
1172
1203
  onLibraryMoved?: (move: LibraryMove) => void;
1173
- /** `update <name>`: an equal-version tie between libraries keeps the locked library (see {@link install}'s `moveLibraries`). */
1204
+ /** `update <name>`: an equal-version tie between libraries goes to the default library, then the locked one (see {@link install}'s `moveLibraries`). */
1174
1205
  preferLockedLibrary?: boolean;
1175
1206
  onPresets?: (presets: PresetExpansion[]) => void;
1207
+ /** Deploy over a folder no lock entry owns (a hand-made skill of the same name) instead of refusing. */
1208
+ force?: boolean;
1176
1209
  /** Called per symlink an asset's copy deploy leaves out (`ref`, path under the asset dir). */
1177
1210
  onSkippedSymlink?: (ref: string, path: string) => void;
1178
1211
  /** Called per `.env` file in an asset's directory that a copy deploy leaves out. */
@@ -1745,14 +1778,14 @@ export declare class AssetManager {
1745
1778
  */
1746
1779
  private libraryOriginGaps;
1747
1780
  /**
1748
- * Remove the files a deploy never writes (`.env`, `.venv/`, `.pytest_cache/`, ...) from the
1749
- * deployed folders of re-locked assets, as {@link RestoredAsset} rows. The lock covers what
1750
- * the exclusion list leaves; the extras an older release copied are the owner's to drop, and
1751
- * this is the one point where they are: the lock was just rewritten.
1752
- *
1753
- * @param refs - Lock keys the install re-locked (hash or commit changed).
1781
+ * Record, on every agent entry of `lock` that has none, the files the agent's harness
1782
+ * rendering occupies and their sha256. Call it after the deploy, so the bytes hashed are the
1783
+ * ones `install` just wrote; {@link lockedCopyDrift} compares later edits with them.
1784
+ * Entries that carry a record (kept from an earlier lock) are left as they are.
1754
1785
  */
1755
- private removeExcludedLeftovers;
1786
+ private withRenderedAgents;
1787
+ /** The files of one agent's rendering for the active harness, project-relative, with sha256. */
1788
+ private renderedAgentFiles;
1756
1789
  /**
1757
1790
  * The {@link RestoredAsset} rows for the drifted copies (see {@link lockedCopyDrift}) a
1758
1791
  * deploy just wrote again: those whose ref is among the `deployed` canonical refs.
@@ -1770,8 +1803,10 @@ export declare class AssetManager {
1770
1803
  * - A source asset is compared with the per-file hashes the lock records (modified files only:
1771
1804
  * the lock lists what the source covers, not what the deploy copies).
1772
1805
  *
1773
- * An agent (rendered, not copied), a `--link` deploy, an asset with a configured patch, and a
1774
- * copy that is missing are not compared: other gaps cover them. Project mode only.
1806
+ * A `--link` deploy, an asset with a configured patch, and a copy that is missing are not
1807
+ * compared: other gaps cover them. An agent (rendered, not copied) is compared with the
1808
+ * hashes of its rendered files the lock records (`LockEntry.rendered`); its `modified` paths
1809
+ * are project-relative. Project mode only.
1775
1810
  */
1776
1811
  private lockedCopyDrift;
1777
1812
  /**
@@ -1794,6 +1829,14 @@ export declare class AssetManager {
1794
1829
  private declaredGaps;
1795
1830
  /** Whether the lock's `presets` slice records `want` (kind, name and, when both carry one, publisher). */
1796
1831
  private presetRecorded;
1832
+ /**
1833
+ * The first requirement, direct or transitive, of the declared `ref` that no local source or
1834
+ * library holds and that nothing in the project already provides — the case `install` ends
1835
+ * with `Missing: … nothing was installed`. `undefined` when every requirement is held, when a
1836
+ * store is declared (it may hold the requirement and a check never goes to the network), or
1837
+ * when `ref` itself resolves to nothing.
1838
+ */
1839
+ private unmetRequirementOf;
1797
1840
  /**
1798
1841
  * Whether `skaile install` can resolve a declared ref: a source or library holds it, or the
1799
1842
  * project declares a store that may. The global catalog is not asked: a check never goes