@skaile/workspaces 6.14.0 → 6.16.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 (447) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/agent-file-refresh-76NNFB4W.js +89 -0
  3. package/dist/agent-file-refresh-76NNFB4W.js.map +1 -0
  4. package/dist/ai-sdk.js +8 -7
  5. package/dist/ai-sdk.js.map +1 -1
  6. package/dist/app-sdk/index.js +1 -1
  7. package/dist/{asset-feeds-DOG5FK7T.js → asset-feeds-ON7FYHHF.js} +25 -23
  8. package/dist/asset-feeds-ON7FYHHF.js.map +1 -0
  9. package/dist/asset-manager/catalog-deployer.js +8 -7
  10. package/dist/asset-manager/history.js +7 -6
  11. package/dist/asset-manager/index.js +17 -15
  12. package/dist/asset-manager/installer.js +16 -9
  13. package/dist/asset-manager/renderers.js +8 -8
  14. package/dist/asset-manager/src/add-remove/add.d.ts +134 -0
  15. package/dist/asset-manager/src/add-remove/add.d.ts.map +1 -0
  16. package/dist/asset-manager/src/add-remove/remove.d.ts +329 -0
  17. package/dist/asset-manager/src/add-remove/remove.d.ts.map +1 -0
  18. package/dist/asset-manager/src/agent-render.d.ts +116 -0
  19. package/dist/asset-manager/src/agent-render.d.ts.map +1 -0
  20. package/dist/asset-manager/src/composed-blocks.d.ts +40 -0
  21. package/dist/asset-manager/src/composed-blocks.d.ts.map +1 -0
  22. package/dist/asset-manager/src/config/core.d.ts +297 -0
  23. package/dist/asset-manager/src/config/core.d.ts.map +1 -0
  24. package/dist/asset-manager/src/config/edit.d.ts +161 -0
  25. package/dist/asset-manager/src/config/edit.d.ts.map +1 -0
  26. package/dist/asset-manager/src/index.d.ts +31 -2961
  27. package/dist/asset-manager/src/index.d.ts.map +1 -1
  28. package/dist/asset-manager/src/install/clone-commit-fetcher.d.ts +11 -0
  29. package/dist/asset-manager/src/install/clone-commit-fetcher.d.ts.map +1 -0
  30. package/dist/asset-manager/src/install/install.d.ts +151 -0
  31. package/dist/asset-manager/src/install/install.d.ts.map +1 -0
  32. package/dist/asset-manager/src/install/restore.d.ts +76 -0
  33. package/dist/asset-manager/src/install/restore.d.ts.map +1 -0
  34. package/dist/asset-manager/src/install-agent.d.ts +52 -4
  35. package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
  36. package/dist/asset-manager/src/install-instances.d.ts +70 -2
  37. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  38. package/dist/asset-manager/src/installer.d.ts +54 -4
  39. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  40. package/dist/asset-manager/src/lock/copies.d.ts +156 -0
  41. package/dist/asset-manager/src/lock/copies.d.ts.map +1 -0
  42. package/dist/asset-manager/src/lock/library.d.ts +261 -0
  43. package/dist/asset-manager/src/lock/library.d.ts.map +1 -0
  44. package/dist/asset-manager/src/mcp-render.d.ts +86 -0
  45. package/dist/asset-manager/src/mcp-render.d.ts.map +1 -0
  46. package/dist/asset-manager/src/omp-sweep.d.ts +25 -0
  47. package/dist/asset-manager/src/omp-sweep.d.ts.map +1 -0
  48. package/dist/asset-manager/src/read/diff.d.ts +109 -0
  49. package/dist/asset-manager/src/read/diff.d.ts.map +1 -0
  50. package/dist/asset-manager/src/read/doctor.d.ts +116 -0
  51. package/dist/asset-manager/src/read/doctor.d.ts.map +1 -0
  52. package/dist/asset-manager/src/read/gaps.d.ts +120 -0
  53. package/dist/asset-manager/src/read/gaps.d.ts.map +1 -0
  54. package/dist/asset-manager/src/read/graph.d.ts +69 -0
  55. package/dist/asset-manager/src/read/graph.d.ts.map +1 -0
  56. package/dist/asset-manager/src/read/outdated.d.ts +152 -0
  57. package/dist/asset-manager/src/read/outdated.d.ts.map +1 -0
  58. package/dist/asset-manager/src/read/state.d.ts +265 -0
  59. package/dist/asset-manager/src/read/state.d.ts.map +1 -0
  60. package/dist/asset-manager/src/renderers.d.ts +11 -1
  61. package/dist/asset-manager/src/renderers.d.ts.map +1 -1
  62. package/dist/asset-manager/src/resolve/guards.d.ts +167 -0
  63. package/dist/asset-manager/src/resolve/guards.d.ts.map +1 -0
  64. package/dist/asset-manager/src/resolve/scan.d.ts +222 -0
  65. package/dist/asset-manager/src/resolve/scan.d.ts.map +1 -0
  66. package/dist/asset-manager/src/resolve/stores.d.ts +176 -0
  67. package/dist/asset-manager/src/resolve/stores.d.ts.map +1 -0
  68. package/dist/asset-manager/src/shared/files.d.ts +42 -0
  69. package/dist/asset-manager/src/shared/files.d.ts.map +1 -0
  70. package/dist/asset-manager/src/shared/library-hooks.d.ts +16 -0
  71. package/dist/asset-manager/src/shared/library-hooks.d.ts.map +1 -0
  72. package/dist/asset-manager/src/shared/library.d.ts +96 -0
  73. package/dist/asset-manager/src/shared/library.d.ts.map +1 -0
  74. package/dist/asset-manager/src/shared/refs.d.ts +101 -0
  75. package/dist/asset-manager/src/shared/refs.d.ts.map +1 -0
  76. package/dist/asset-manager/src/shared/types.d.ts +399 -0
  77. package/dist/asset-manager/src/shared/types.d.ts.map +1 -0
  78. package/dist/bridge/harnesses/claude-sdk.js +13 -19
  79. package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
  80. package/dist/bridge/harnesses/codex.js +10 -10
  81. package/dist/bridge/harnesses/continue.js +12 -16
  82. package/dist/bridge/harnesses/continue.js.map +1 -1
  83. package/dist/bridge/harnesses/echo.js +5 -10
  84. package/dist/bridge/harnesses/echo.js.map +1 -1
  85. package/dist/bridge/harnesses/gemini.js +5 -5
  86. package/dist/bridge/harnesses/goose.js +13 -17
  87. package/dist/bridge/harnesses/goose.js.map +1 -1
  88. package/dist/bridge/harnesses/omp.js +7 -13
  89. package/dist/bridge/harnesses/omp.js.map +1 -1
  90. package/dist/bridge/harnesses/opencode.js +13 -17
  91. package/dist/bridge/harnesses/opencode.js.map +1 -1
  92. package/dist/bridge/harnesses/qwen.js +6 -11
  93. package/dist/bridge/harnesses/qwen.js.map +1 -1
  94. package/dist/bridge/index.js +18 -18
  95. package/dist/bridge/src/codex/managed-harness.d.ts.map +1 -1
  96. package/dist/bridge/src/driver-contract.d.ts +72 -0
  97. package/dist/bridge/src/driver-contract.d.ts.map +1 -0
  98. package/dist/bridge/src/harness-model-check.d.ts +1 -1
  99. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  100. package/dist/bridge/src/harnesses/_subprocess-cli.d.ts +8 -0
  101. package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -1
  102. package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
  103. package/dist/bridge/src/harnesses/codex.d.ts +2 -0
  104. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  105. package/dist/bridge/src/harnesses/continue.d.ts.map +1 -1
  106. package/dist/bridge/src/harnesses/echo.d.ts.map +1 -1
  107. package/dist/bridge/src/harnesses/gemini.d.ts.map +1 -1
  108. package/dist/bridge/src/harnesses/goose.d.ts.map +1 -1
  109. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  110. package/dist/bridge/src/harnesses/opencode.d.ts.map +1 -1
  111. package/dist/bridge/src/harnesses/qwen.d.ts.map +1 -1
  112. package/dist/bridge/src/index.d.ts +2 -0
  113. package/dist/bridge/src/index.d.ts.map +1 -1
  114. package/dist/bridge/src/preflight.d.ts +114 -0
  115. package/dist/bridge/src/preflight.d.ts.map +1 -0
  116. package/dist/bridge/src/registry.d.ts +12 -0
  117. package/dist/bridge/src/registry.d.ts.map +1 -1
  118. package/dist/{chunk-7UBCUKJO.js → chunk-2JUCWMIS.js} +8808 -8337
  119. package/dist/chunk-2JUCWMIS.js.map +1 -0
  120. package/dist/{chunk-VS6XC5JE.js → chunk-2MTRRK37.js} +3 -3
  121. package/dist/{chunk-VS6XC5JE.js.map → chunk-2MTRRK37.js.map} +1 -1
  122. package/dist/chunk-2PJYJPDE.js +3 -0
  123. package/dist/chunk-2PJYJPDE.js.map +1 -0
  124. package/dist/{chunk-ZQL6HGTW.js → chunk-2SSG5B24.js} +4 -4
  125. package/dist/{chunk-ZQL6HGTW.js.map → chunk-2SSG5B24.js.map} +1 -1
  126. package/dist/{chunk-WDG5IVEA.js → chunk-2ZDZJ7XQ.js} +3 -3
  127. package/dist/{chunk-WDG5IVEA.js.map → chunk-2ZDZJ7XQ.js.map} +1 -1
  128. package/dist/{chunk-V2VDTQ7A.js → chunk-3A7JUOY2.js} +3 -3
  129. package/dist/{chunk-V2VDTQ7A.js.map → chunk-3A7JUOY2.js.map} +1 -1
  130. package/dist/chunk-3LAJJURV.js +26 -0
  131. package/dist/chunk-3LAJJURV.js.map +1 -0
  132. package/dist/{chunk-X66KSHZF.js → chunk-3UYKT62L.js} +5 -5
  133. package/dist/{chunk-X66KSHZF.js.map → chunk-3UYKT62L.js.map} +1 -1
  134. package/dist/{chunk-J3FJTH3V.js → chunk-4X5WXQV7.js} +4 -4
  135. package/dist/{chunk-J3FJTH3V.js.map → chunk-4X5WXQV7.js.map} +1 -1
  136. package/dist/chunk-4ZNKEDYH.js +887 -0
  137. package/dist/chunk-4ZNKEDYH.js.map +1 -0
  138. package/dist/{chunk-DYH3VSPU.js → chunk-65SOXO7I.js} +20 -14
  139. package/dist/chunk-65SOXO7I.js.map +1 -0
  140. package/dist/{chunk-MVUXBWNW.js → chunk-6HTN2UIJ.js} +3 -3
  141. package/dist/{chunk-MVUXBWNW.js.map → chunk-6HTN2UIJ.js.map} +1 -1
  142. package/dist/{chunk-4SSTREBO.js → chunk-6KV34G6A.js} +8 -8
  143. package/dist/{chunk-4SSTREBO.js.map → chunk-6KV34G6A.js.map} +1 -1
  144. package/dist/{chunk-YNQRVTXH.js → chunk-6M44OQKH.js} +40 -44
  145. package/dist/chunk-6M44OQKH.js.map +1 -0
  146. package/dist/{chunk-B6W5DCH5.js → chunk-72DYHOO2.js} +24 -25
  147. package/dist/chunk-72DYHOO2.js.map +1 -0
  148. package/dist/{chunk-RRAXV5LE.js → chunk-7IW5E6LB.js} +43 -48
  149. package/dist/chunk-7IW5E6LB.js.map +1 -0
  150. package/dist/{chunk-BNLXZXZN.js → chunk-BRAOB37W.js} +97 -47
  151. package/dist/chunk-BRAOB37W.js.map +1 -0
  152. package/dist/{chunk-ZLDAPZIX.js → chunk-BTMSHGN3.js} +4 -4
  153. package/dist/{chunk-ZLDAPZIX.js.map → chunk-BTMSHGN3.js.map} +1 -1
  154. package/dist/{chunk-7K73MCI6.js → chunk-CU5WY6HN.js} +3 -3
  155. package/dist/{chunk-7K73MCI6.js.map → chunk-CU5WY6HN.js.map} +1 -1
  156. package/dist/{chunk-G2ZWIYZR.js → chunk-DFFJKGCW.js} +3 -3
  157. package/dist/{chunk-G2ZWIYZR.js.map → chunk-DFFJKGCW.js.map} +1 -1
  158. package/dist/{chunk-CG63XGVV.js → chunk-EGKCKWWE.js} +3 -3
  159. package/dist/{chunk-CG63XGVV.js.map → chunk-EGKCKWWE.js.map} +1 -1
  160. package/dist/{chunk-CJO3XKO7.js → chunk-ETGC2MEM.js} +4 -4
  161. package/dist/{chunk-CJO3XKO7.js.map → chunk-ETGC2MEM.js.map} +1 -1
  162. package/dist/{chunk-CFRHYD4C.js → chunk-FPG36VC4.js} +8 -13
  163. package/dist/chunk-FPG36VC4.js.map +1 -0
  164. package/dist/{chunk-SBAUZ7XH.js → chunk-H3PY5DFL.js} +4 -4
  165. package/dist/{chunk-SBAUZ7XH.js.map → chunk-H3PY5DFL.js.map} +1 -1
  166. package/dist/{chunk-7HRZACI4.js → chunk-HW4BDJPC.js} +17 -6
  167. package/dist/chunk-HW4BDJPC.js.map +1 -0
  168. package/dist/{chunk-GJT2Q5XD.js → chunk-HXST2IYJ.js} +3 -3
  169. package/dist/{chunk-GJT2Q5XD.js.map → chunk-HXST2IYJ.js.map} +1 -1
  170. package/dist/{chunk-7VBD5XUM.js → chunk-IG4YQ7ER.js} +32 -90
  171. package/dist/chunk-IG4YQ7ER.js.map +1 -0
  172. package/dist/{chunk-DWPQBMCY.js → chunk-JPV4WE5L.js} +2 -2
  173. package/dist/{chunk-DWPQBMCY.js.map → chunk-JPV4WE5L.js.map} +1 -1
  174. package/dist/{chunk-OC3AIMZH.js → chunk-KDRA6FYE.js} +120 -211
  175. package/dist/chunk-KDRA6FYE.js.map +1 -0
  176. package/dist/{chunk-KOI7QFDH.js → chunk-M7XIYHWB.js} +3 -3
  177. package/dist/{chunk-KOI7QFDH.js.map → chunk-M7XIYHWB.js.map} +1 -1
  178. package/dist/{chunk-7LJUK5JK.js → chunk-MG6QD7GE.js} +201 -43
  179. package/dist/chunk-MG6QD7GE.js.map +1 -0
  180. package/dist/{chunk-XHLRMUMO.js → chunk-NAQXDTF3.js} +3 -3
  181. package/dist/{chunk-XHLRMUMO.js.map → chunk-NAQXDTF3.js.map} +1 -1
  182. package/dist/{chunk-YJAKSCCN.js → chunk-NJ6UCY2B.js} +3 -3
  183. package/dist/{chunk-YJAKSCCN.js.map → chunk-NJ6UCY2B.js.map} +1 -1
  184. package/dist/{chunk-OKPITFE3.js → chunk-NNJQQYHY.js} +2 -2
  185. package/dist/{chunk-OKPITFE3.js.map → chunk-NNJQQYHY.js.map} +1 -1
  186. package/dist/{chunk-QNHW26AT.js → chunk-OD4N5O7V.js} +4 -4
  187. package/dist/{chunk-QNHW26AT.js.map → chunk-OD4N5O7V.js.map} +1 -1
  188. package/dist/{chunk-F7WMHDTV.js → chunk-P6FJDT35.js} +27 -7
  189. package/dist/chunk-P6FJDT35.js.map +1 -0
  190. package/dist/{chunk-IOXFT5D7.js → chunk-PD42JZWI.js} +3 -3
  191. package/dist/{chunk-IOXFT5D7.js.map → chunk-PD42JZWI.js.map} +1 -1
  192. package/dist/{chunk-MS2IXLTC.js → chunk-PMXTBWFD.js} +27 -7
  193. package/dist/chunk-PMXTBWFD.js.map +1 -0
  194. package/dist/{chunk-NAAFRZTA.js → chunk-PPSSDUN6.js} +3 -3
  195. package/dist/{chunk-NAAFRZTA.js.map → chunk-PPSSDUN6.js.map} +1 -1
  196. package/dist/{chunk-LMUNQYJQ.js → chunk-PRB67LCK.js} +127 -18
  197. package/dist/chunk-PRB67LCK.js.map +1 -0
  198. package/dist/{chunk-RLV3FF4I.js → chunk-QUIK7L3Z.js} +11 -11
  199. package/dist/{chunk-RLV3FF4I.js.map → chunk-QUIK7L3Z.js.map} +1 -1
  200. package/dist/{chunk-DRUAQ7IY.js → chunk-QUPZKTF3.js} +9 -8
  201. package/dist/chunk-QUPZKTF3.js.map +1 -0
  202. package/dist/{chunk-7FXOOUOC.js → chunk-RPRMD7XV.js} +27 -11
  203. package/dist/chunk-RPRMD7XV.js.map +1 -0
  204. package/dist/{chunk-3BRBTQ6M.js → chunk-S3UOZBGE.js} +20 -3
  205. package/dist/chunk-S3UOZBGE.js.map +1 -0
  206. package/dist/{chunk-LQWOU7S2.js → chunk-SFBLZOV5.js} +3 -3
  207. package/dist/{chunk-LQWOU7S2.js.map → chunk-SFBLZOV5.js.map} +1 -1
  208. package/dist/{chunk-EB2LKPI6.js → chunk-SMFZ5YGN.js} +4 -4
  209. package/dist/{chunk-EB2LKPI6.js.map → chunk-SMFZ5YGN.js.map} +1 -1
  210. package/dist/{chunk-243Z3BNB.js → chunk-SX54OQQT.js} +4 -4
  211. package/dist/{chunk-243Z3BNB.js.map → chunk-SX54OQQT.js.map} +1 -1
  212. package/dist/{chunk-2PVYDAFN.js → chunk-T65N4CIZ.js} +3 -3
  213. package/dist/{chunk-2PVYDAFN.js.map → chunk-T65N4CIZ.js.map} +1 -1
  214. package/dist/{chunk-QBLS7X3Z.js → chunk-TVRL3IPZ.js} +3 -3
  215. package/dist/{chunk-QBLS7X3Z.js.map → chunk-TVRL3IPZ.js.map} +1 -1
  216. package/dist/{chunk-2URJ7W5X.js → chunk-TW5AP6IF.js} +5 -5
  217. package/dist/{chunk-2URJ7W5X.js.map → chunk-TW5AP6IF.js.map} +1 -1
  218. package/dist/{chunk-F6LDWA2N.js → chunk-TYK752MU.js} +3 -3
  219. package/dist/{chunk-F6LDWA2N.js.map → chunk-TYK752MU.js.map} +1 -1
  220. package/dist/{chunk-HPQ2WDYC.js → chunk-U2WPJHRA.js} +5 -5
  221. package/dist/{chunk-HPQ2WDYC.js.map → chunk-U2WPJHRA.js.map} +1 -1
  222. package/dist/{chunk-MEU2HHGV.js → chunk-U7P22GEB.js} +386 -46
  223. package/dist/chunk-U7P22GEB.js.map +1 -0
  224. package/dist/{chunk-6ISJMEDX.js → chunk-VFEZUSB6.js} +4 -4
  225. package/dist/{chunk-6ISJMEDX.js.map → chunk-VFEZUSB6.js.map} +1 -1
  226. package/dist/{chunk-5FO4U3OL.js → chunk-WW22FS74.js} +75 -67
  227. package/dist/chunk-WW22FS74.js.map +1 -0
  228. package/dist/{chunk-WCUT3EQR.js → chunk-Z23I2JA6.js} +7 -7
  229. package/dist/{chunk-WCUT3EQR.js.map → chunk-Z23I2JA6.js.map} +1 -1
  230. package/dist/{chunk-VKGNMXGZ.js → chunk-Z7HLX4V2.js} +4 -4
  231. package/dist/{chunk-VKGNMXGZ.js.map → chunk-Z7HLX4V2.js.map} +1 -1
  232. package/dist/{chunk-LZCX2TCZ.js → chunk-ZII54C3E.js} +355 -1075
  233. package/dist/chunk-ZII54C3E.js.map +1 -0
  234. package/dist/{chunk-CVUMZTNO.js → chunk-ZQPBYLCS.js} +4 -4
  235. package/dist/{chunk-CVUMZTNO.js.map → chunk-ZQPBYLCS.js.map} +1 -1
  236. package/dist/{claude-code-LFAOJ3UQ.js → claude-code-VL6UM7BZ.js} +4 -4
  237. package/dist/{claude-code-LFAOJ3UQ.js.map → claude-code-VL6UM7BZ.js.map} +1 -1
  238. package/dist/cli/index.js +494 -301
  239. package/dist/cli/index.js.map +1 -1
  240. package/dist/cli/src/agent-file-refresh.d.ts +25 -0
  241. package/dist/cli/src/agent-file-refresh.d.ts.map +1 -0
  242. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  243. package/dist/cli/src/commands/catalog.d.ts +9 -2
  244. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  245. package/dist/cli/src/commands/config.d.ts.map +1 -1
  246. package/dist/cli/src/commands/harness.d.ts +1 -1
  247. package/dist/cli/src/commands/harness.d.ts.map +1 -1
  248. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  249. package/dist/cli/src/commands/library-index.d.ts +5 -7
  250. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  251. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  252. package/dist/cli/src/commands/preset-export.d.ts.map +1 -1
  253. package/dist/cli/src/commands/project.d.ts.map +1 -1
  254. package/dist/cli/src/commands/run.d.ts.map +1 -1
  255. package/dist/cli/src/commands/serve-preflight.d.ts +27 -48
  256. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  257. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  258. package/dist/cli/src/commands/source.d.ts +6 -9
  259. package/dist/cli/src/commands/source.d.ts.map +1 -1
  260. package/dist/cli/src/commands/validate.d.ts +6 -0
  261. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  262. package/dist/cli/src/config-checks.d.ts.map +1 -1
  263. package/dist/cli/src/harness-error.d.ts +11 -9
  264. package/dist/cli/src/harness-error.d.ts.map +1 -1
  265. package/dist/cli/src/skill-checks.d.ts +48 -74
  266. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  267. package/dist/connectors/config.js +5 -5
  268. package/dist/connectors/index.js +22 -22
  269. package/dist/{connectors-KPF4UUDS.js → connectors-7EPJRVLJ.js} +25 -25
  270. package/dist/{connectors-KPF4UUDS.js.map → connectors-7EPJRVLJ.js.map} +1 -1
  271. package/dist/connectors-shared/index.js +2 -2
  272. package/dist/core/index.js +7 -6
  273. package/dist/core/manifest.js +2 -2
  274. package/dist/core/models.js +1 -1
  275. package/dist/core/publish-manifest.js +3 -3
  276. package/dist/core/ref.js +1 -1
  277. package/dist/core/runtime-assets.js +5 -5
  278. package/dist/core/src/agent-prompt-sections.d.ts +96 -4
  279. package/dist/core/src/agent-prompt-sections.d.ts.map +1 -1
  280. package/dist/core/src/check-asset.d.ts +115 -0
  281. package/dist/core/src/check-asset.d.ts.map +1 -0
  282. package/dist/core/src/harness-model.d.ts +20 -0
  283. package/dist/core/src/harness-model.d.ts.map +1 -0
  284. package/dist/core/src/index.d.ts +10 -6
  285. package/dist/core/src/index.d.ts.map +1 -1
  286. package/dist/core/src/lock.d.ts +12 -10
  287. package/dist/core/src/lock.d.ts.map +1 -1
  288. package/dist/core/src/models.d.ts +42 -11
  289. package/dist/core/src/models.d.ts.map +1 -1
  290. package/dist/core/src/publish-manifest.d.ts +17 -0
  291. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  292. package/dist/core/src/repo-identity.d.ts +41 -0
  293. package/dist/core/src/repo-identity.d.ts.map +1 -0
  294. package/dist/core/src/repo-manager.d.ts +3 -9
  295. package/dist/core/src/repo-manager.d.ts.map +1 -1
  296. package/dist/core/src/walker.d.ts.map +1 -1
  297. package/dist/core/src/workspace-config.d.ts.map +1 -1
  298. package/dist/core/workspace-config.js +4 -4
  299. package/dist/deploy/index.js +7 -6
  300. package/dist/deploy/index.js.map +1 -1
  301. package/dist/discovery/index.js +5 -5
  302. package/dist/discovery/src/source-config.d.ts.map +1 -1
  303. package/dist/{ensure-sources-FOMEGCQ5.js → ensure-sources-CI3JQJST.js} +32 -30
  304. package/dist/ensure-sources-CI3JQJST.js.map +1 -0
  305. package/dist/factory-assets/connectors/box.js +22 -22
  306. package/dist/factory-assets/connectors/deploy.js +22 -22
  307. package/dist/factory-assets/connectors/devserver.js +22 -22
  308. package/dist/factory-assets/connectors/flow/adapter.js +22 -22
  309. package/dist/factory-assets/connectors/flow/engine.js +8 -7
  310. package/dist/factory-assets/connectors/flow/run-flow.js +24 -24
  311. package/dist/factory-assets/connectors/flow.js +22 -22
  312. package/dist/factory-assets/connectors/git.js +22 -22
  313. package/dist/factory-assets/connectors/gmail.js +22 -22
  314. package/dist/factory-assets/connectors/googledrive.js +22 -22
  315. package/dist/factory-assets/connectors/local.js +22 -22
  316. package/dist/factory-assets/connectors/mattermost.js +22 -22
  317. package/dist/factory-assets/connectors/memory.js +22 -22
  318. package/dist/factory-assets/connectors/minio.js +22 -22
  319. package/dist/factory-assets/connectors/postgres.js +22 -22
  320. package/dist/factory-assets/connectors/s3.js +22 -22
  321. package/dist/factory-assets/connectors/sharepoint.js +22 -22
  322. package/dist/factory-assets/connectors/sqlite.js +22 -22
  323. package/dist/factory-assets/connectors/static-server.js +22 -22
  324. package/dist/factory-assets/connectors/tunnel.js +22 -22
  325. package/dist/factory-assets/connectors/webdav.js +22 -22
  326. package/dist/factory-assets/connectors/xstate-store.js +22 -22
  327. package/dist/factory-assets/connectors/xstate.js +22 -22
  328. package/dist/{flows-J64L5MGJ.js → flows-6XQAYQS4.js} +12 -11
  329. package/dist/{flows-J64L5MGJ.js.map → flows-6XQAYQS4.js.map} +1 -1
  330. package/dist/{helpers-ZJ67FO3Z.js → helpers-26MR5QPO.js} +32 -30
  331. package/dist/{helpers-ZJ67FO3Z.js.map → helpers-26MR5QPO.js.map} +1 -1
  332. package/dist/library/index.js +10 -10
  333. package/dist/library/install.js +4 -4
  334. package/dist/library/src/index.d.ts +1 -1
  335. package/dist/library/src/index.d.ts.map +1 -1
  336. package/dist/library/src/local/db.d.ts.map +1 -1
  337. package/dist/library/src/local/library-manager.d.ts.map +1 -1
  338. package/dist/library/src/local/library.d.ts.map +1 -1
  339. package/dist/library/src/local/schema.d.ts +19 -0
  340. package/dist/library/src/local/schema.d.ts.map +1 -1
  341. package/dist/library/src/user-library.d.ts +18 -0
  342. package/dist/library/src/user-library.d.ts.map +1 -1
  343. package/dist/{library-publish-RGVXGTY4.js → library-publish-F3AKF66O.js} +74 -68
  344. package/dist/library-publish-F3AKF66O.js.map +1 -0
  345. package/dist/model-endpoint/index.js +10 -9
  346. package/dist/{open-library-I5JHL37T.js → open-library-FVV6GG4I.js} +35 -33
  347. package/dist/{open-library-I5JHL37T.js.map → open-library-FVV6GG4I.js.map} +1 -1
  348. package/dist/{open-registry-4HNCWOCN.js → open-registry-VX2BVMS5.js} +16 -16
  349. package/dist/{open-registry-4HNCWOCN.js.map → open-registry-VX2BVMS5.js.map} +1 -1
  350. package/dist/{paths-PXBWY532.js → paths-PIWSSUUG.js} +10 -9
  351. package/dist/{paths-PXBWY532.js.map → paths-PIWSSUUG.js.map} +1 -1
  352. package/dist/{plugin-store-ZC3EGZ3D.js → plugin-store-MVTW6G7J.js} +10 -9
  353. package/dist/{plugin-store-ZC3EGZ3D.js.map → plugin-store-MVTW6G7J.js.map} +1 -1
  354. package/dist/{project-K5JWPIJ6.js → project-GFQP4TW6.js} +50 -48
  355. package/dist/{project-K5JWPIJ6.js.map → project-GFQP4TW6.js.map} +1 -1
  356. package/dist/resolver/index.js +8 -7
  357. package/dist/runner/composition-content.d.ts +2 -0
  358. package/dist/runner/composition-content.js +29 -0
  359. package/dist/runner/composition-content.js.map +1 -0
  360. package/dist/runner/index.js +40 -39
  361. package/dist/runner/src/compaction/prompt.d.ts.map +1 -1
  362. package/dist/runner/src/composition/content-entry.d.ts +15 -0
  363. package/dist/runner/src/composition/content-entry.d.ts.map +1 -0
  364. package/dist/runner/src/composition/content-source.d.ts +7 -0
  365. package/dist/runner/src/composition/content-source.d.ts.map +1 -1
  366. package/dist/runner/src/composition/dry-run.d.ts +5 -1
  367. package/dist/runner/src/composition/dry-run.d.ts.map +1 -1
  368. package/dist/runner/src/composition/index.d.ts +1 -1
  369. package/dist/runner/src/composition/index.d.ts.map +1 -1
  370. package/dist/runner/src/composition/prompt-sections.d.ts +47 -20
  371. package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -1
  372. package/dist/runner/src/context-usage/compose.d.ts.map +1 -1
  373. package/dist/runner/src/session-builder.d.ts +3 -8
  374. package/dist/runner/src/session-builder.d.ts.map +1 -1
  375. package/dist/runner/src/work-practices.d.ts +9 -0
  376. package/dist/runner/src/work-practices.d.ts.map +1 -0
  377. package/dist/sdk/asset-manager.js +17 -15
  378. package/dist/sdk/bridge.js +18 -18
  379. package/dist/sdk/core.js +7 -6
  380. package/dist/sdk/flow.js +8 -7
  381. package/dist/sdk/index.js +40 -39
  382. package/dist/sdk/index.js.map +1 -1
  383. package/dist/sdk/resolver.js +8 -7
  384. package/dist/sdk/runner.js +40 -39
  385. package/dist/sdk/session.js +2 -2
  386. package/dist/sdk/transport/ws/server.js +8 -7
  387. package/dist/sdk/transport/ws.js +8 -7
  388. package/dist/sdk/transport.js +8 -7
  389. package/dist/sdk/types.js +1 -1
  390. package/dist/serve-preflight-XJS5OZML.js +138 -0
  391. package/dist/serve-preflight-XJS5OZML.js.map +1 -0
  392. package/dist/session/index.js +2 -2
  393. package/dist/{setup-RXTNGML5.js → setup-BFEBJLYF.js} +33 -31
  394. package/dist/setup-BFEBJLYF.js.map +1 -0
  395. package/dist/{skills-5D4KDVPJ.js → skills-OCG7B5CL.js} +13 -12
  396. package/dist/{skills-5D4KDVPJ.js.map → skills-OCG7B5CL.js.map} +1 -1
  397. package/dist/source-P6JPZYWP.js +93 -0
  398. package/dist/{source-2LP5W3ST.js.map → source-P6JPZYWP.js.map} +1 -1
  399. package/dist/{source-manifest-publish-EZNCTSQF.js → source-manifest-publish-XBFHEURV.js} +54 -52
  400. package/dist/source-manifest-publish-XBFHEURV.js.map +1 -0
  401. package/dist/transport/index.js +8 -7
  402. package/dist/transport/ws/server.js +8 -7
  403. package/dist/transport/ws.js +8 -7
  404. package/dist/tui/index.js +40 -39
  405. package/dist/tui/index.js.map +1 -1
  406. package/dist/types/index.js +1 -1
  407. package/dist/types/src/context-usage.d.ts +1 -1
  408. package/dist/types/src/events.d.ts +3 -2
  409. package/dist/types/src/events.d.ts.map +1 -1
  410. package/dist/types/src/runtime.d.ts +6 -0
  411. package/dist/types/src/runtime.d.ts.map +1 -1
  412. package/dist/workspace-plugin/adapters/mcp.js +29 -29
  413. package/dist/workspace-plugin/adapters/omp.js +14 -14
  414. package/dist/workspace-plugin/index.js +1 -1
  415. package/package.json +7 -1
  416. package/dist/asset-feeds-DOG5FK7T.js.map +0 -1
  417. package/dist/chunk-3BRBTQ6M.js.map +0 -1
  418. package/dist/chunk-5FO4U3OL.js.map +0 -1
  419. package/dist/chunk-7FXOOUOC.js.map +0 -1
  420. package/dist/chunk-7HRZACI4.js.map +0 -1
  421. package/dist/chunk-7LJUK5JK.js.map +0 -1
  422. package/dist/chunk-7UBCUKJO.js.map +0 -1
  423. package/dist/chunk-7VBD5XUM.js.map +0 -1
  424. package/dist/chunk-A7TM4PZZ.js +0 -110
  425. package/dist/chunk-A7TM4PZZ.js.map +0 -1
  426. package/dist/chunk-B6W5DCH5.js.map +0 -1
  427. package/dist/chunk-BNLXZXZN.js.map +0 -1
  428. package/dist/chunk-CFRHYD4C.js.map +0 -1
  429. package/dist/chunk-DRUAQ7IY.js.map +0 -1
  430. package/dist/chunk-DYH3VSPU.js.map +0 -1
  431. package/dist/chunk-F7WMHDTV.js.map +0 -1
  432. package/dist/chunk-LMUNQYJQ.js.map +0 -1
  433. package/dist/chunk-LZCX2TCZ.js.map +0 -1
  434. package/dist/chunk-MEU2HHGV.js.map +0 -1
  435. package/dist/chunk-MS2IXLTC.js.map +0 -1
  436. package/dist/chunk-OC3AIMZH.js.map +0 -1
  437. package/dist/chunk-RRAXV5LE.js.map +0 -1
  438. package/dist/chunk-YNQRVTXH.js.map +0 -1
  439. package/dist/cli/src/commands/harness-preflight.d.ts +0 -40
  440. package/dist/cli/src/commands/harness-preflight.d.ts.map +0 -1
  441. package/dist/ensure-sources-FOMEGCQ5.js.map +0 -1
  442. package/dist/library-publish-RGVXGTY4.js.map +0 -1
  443. package/dist/serve-preflight-L6VVCDM5.js +0 -61
  444. package/dist/serve-preflight-L6VVCDM5.js.map +0 -1
  445. package/dist/setup-RXTNGML5.js.map +0 -1
  446. package/dist/source-2LP5W3ST.js +0 -91
  447. package/dist/source-manifest-publish-EZNCTSQF.js.map +0 -1
@@ -0,0 +1,222 @@
1
+ import { type CatalogEntry, type LockEntry, type OverrideEntry, type ProvenanceCandidate, type SkWorkspaceConfig, type SourceClone, type SourceDeclaration, type SourceEntry, type StoreEntry } from "@skaile/workspaces/core";
2
+ import { type AssetDefinition, type Library } from "@skaile/workspaces/library";
3
+ import { AmConfigEdit } from "../config/edit.js";
4
+ import { type DeployableEntry } from "../installer.js";
5
+ import type { LibraryIndexSnapshot, LibraryResolution, PreferLocked } from "../shared/types.js";
6
+ /** One row of {@link AssetManager.libraryHolders}: a library holding a ref at one version. */
7
+ export interface LibraryHolder {
8
+ library: string;
9
+ version: string;
10
+ description: string;
11
+ /** `true` for the holder `add <ref>` deploys. */
12
+ picked: boolean;
13
+ }
14
+ /**
15
+ * One origin that holds a ref, see {@link AssetManager.refOrigins}: the bundled factory
16
+ * source, a project source clone, or a registered library.
17
+ */
18
+ export interface RefOrigin {
19
+ kind: "factory" | "source" | "library";
20
+ /** `factory`, the source's short name, or the library name. */
21
+ label: string;
22
+ version: string;
23
+ description: string;
24
+ }
25
+ /**
26
+ * A library asset that `add`, `install` and the status commands cannot use as it is (a version
27
+ * that is not semver, a flow file the engine does not load). The CLI prints its message as one
28
+ * `✗` line, never a stack trace (p874, p1082).
29
+ */
30
+ export declare class LibraryEntryError extends Error {
31
+ }
32
+ /** LoadConfig, library scan, origins, library index scope. One layer of the `AssetManager` class chain (see `asset-manager/CLAUDE.md`). */
33
+ export declare abstract class AmResolveScan extends AmConfigEdit {
34
+ protected abstract warnLibraryCollision(key: string, candidates: Array<{
35
+ entry: CatalogEntry;
36
+ library: string;
37
+ }>, chosen: {
38
+ entry: CatalogEntry;
39
+ library: string;
40
+ }, differing?: string[]): void;
41
+ protected abstract ensureSourceClonesQuiet(repositories: Record<string, SourceDeclaration>, sources: SourceEntry[]): void;
42
+ protected loadConfig(): {
43
+ repositories: Record<string, SourceDeclaration>;
44
+ sources: SourceEntry[];
45
+ stores: StoreEntry[];
46
+ dependencies: string[];
47
+ overrides: OverrideEntry[];
48
+ patches: Record<string, string>;
49
+ config: SkWorkspaceConfig;
50
+ };
51
+ /** Build provenance-index clones from the resolved source declarations; a clone folder with no git checkout goes to `onSourceError`. */
52
+ protected buildClones(repositories: Record<string, SourceDeclaration>, onSourceError?: (clone: SourceClone, err: unknown) => void): SourceClone[];
53
+ /**
54
+ * Bridge a resolved {@link ProvenanceCandidate} to a {@link CatalogEntry} for
55
+ * the deploy pipeline. `source` is the absolute path to the asset's primary
56
+ * manifest (or its directory) inside the clone; `publisher` is set to the
57
+ * clone slug so `deployAll`'s repositories lookup resolves local-vs-remote.
58
+ */
59
+ protected candidateToCatalogEntry(c: ProvenanceCandidate, repositories: Record<string, SourceDeclaration>): DeployableEntry | null;
60
+ /**
61
+ * The {@link ProvenanceCandidate} a source- or store-origin lock entry stands for: what a
62
+ * deploy needs to restore the asset from the commit the lock names (`files[]` is the asset's
63
+ * whole file set). `null` for a library-origin entry or a key that is not a canonical ref.
64
+ * The source URL is the declared source's own spelling (the bundled factory tree and a
65
+ * `sources:` entry match their declaration by it).
66
+ */
67
+ protected lockedCandidate(key: string, entry: LockEntry, repositories: Record<string, SourceDeclaration>): ProvenanceCandidate | null;
68
+ /**
69
+ * Resolve refs the source/store pass could not against the user's registered
70
+ * **libraries** (local authoring places). Each library dir is scanned on disk
71
+ * under its declared publisher (its root `skaile.manifest.yaml`, falling back
72
+ * to the kebab-cased library name); a matching asset becomes a deployable
73
+ * {@link CatalogEntry} whose `source` points at the on-disk manifest. This is
74
+ * the consume side of `library create` — a freshly authored asset is
75
+ * deployable with `skaile add <kind>:@<publisher>/<name>` without publishing.
76
+ *
77
+ * Local read (no network) and mirrors how `findSkills` discovers library
78
+ * content. The returned `libraryOf` map names the library each entry came from
79
+ * so callers can lock it as library-origin (see {@link libraryLockEntries}).
80
+ *
81
+ * @param opts.quiet - Skip the cross-library collision warning (a lookup that only
82
+ * builds an error hint must not warn).
83
+ * @param opts.library - Resolve only from this library (the one a lock entry names), not
84
+ * from every registered one. Never warns: no choice is made between libraries.
85
+ * @param opts.lockedLibraries - `kind:publisher/name` → the library its lock entry names
86
+ * ({@link AssetManager.lockedLibraryNames}). A ref listed here resolves from that library
87
+ * when it holds a match, whatever the default library is.
88
+ * @returns the matched deploy entries, the set of `missing` refs covered, and
89
+ * each entry's originating library name.
90
+ */
91
+ protected resolveLibraryEntries(missing: string[], opts?: {
92
+ quiet?: boolean;
93
+ library?: string;
94
+ lockedLibraries?: ReadonlyMap<string, string | null>;
95
+ /** `update`: a tie between equal versions goes to the default library, then to the locked library or the one holding the locked bytes. */
96
+ preferLocked?: PreferLocked;
97
+ }): Promise<LibraryResolution>;
98
+ /**
99
+ * Scan every candidate library (the set {@link resolveLibraryEntries} resolves from)
100
+ * into `kind:@publisher/name` → every holder, across all libraries and versions.
101
+ *
102
+ * @param minRoots - Return `null` without scanning when fewer candidate libraries
103
+ * exist (a cross-library question needs at least two).
104
+ * @returns `null` when there is no candidate library or none holds an asset.
105
+ */
106
+ protected scanLibraries(minRoots?: number): Promise<{
107
+ byKey: Map<string, Array<{
108
+ entry: DeployableEntry;
109
+ library: string;
110
+ }>>;
111
+ isDefaultLib: Map<string, boolean>;
112
+ libraryDir: Map<string, string>;
113
+ } | null>;
114
+ /**
115
+ * Every ref that more than one registered library holds, with one row per holder
116
+ * (all libraries, all versions) in the order `add` prefers them: the first row is
117
+ * the one `add <ref>` deploys. `search` reads this to group the index rows of a ref
118
+ * (one per library) and mark the copy `add` deploys; the versions come from the files
119
+ * themselves, which the index follows only after the next `skaile library index`.
120
+ *
121
+ * @returns `kind:@publisher/name` → holders; refs held by one library are absent.
122
+ */
123
+ libraryHolders(): Promise<Map<string, LibraryHolder[]>>;
124
+ /**
125
+ * Every asset a registered library holds, read from the library directories themselves
126
+ * (not the local index, which lags behind them until the next `skaile library index`).
127
+ * One row per holder, all versions.
128
+ *
129
+ * @returns `[]` when no library holds an asset. Never warns.
130
+ */
131
+ libraryAssets(): Promise<Array<{
132
+ entry: CatalogEntry;
133
+ library: string;
134
+ }>>;
135
+ /**
136
+ * The version `add` deploys for each asset of a source clone registered as a `reader`
137
+ * library, when its file declares none: the repo commit pseudo-version (p855). `search`
138
+ * reads this where no project is in scope, so it lists what `add` locks, not the index
139
+ * default.
140
+ *
141
+ * @returns `<library>\0<kind>:@<publisher>/<name>` -> version; only assets that declare none.
142
+ */
143
+ sourceAssetVersions(): Promise<Map<string, string>>;
144
+ /**
145
+ * Every origin that holds `ref` (`kind:@publisher/name`) with the version it holds, in
146
+ * the order `add <ref>` prefers them, so the first row is the one `add` deploys: the
147
+ * project's source clones and the bundled factory source (highest version first), then
148
+ * the registered libraries. `add`, `info` and `search` all read this, so the three name
149
+ * one origin for one ref. Stores are not asked (no network).
150
+ *
151
+ * @returns one row per origin and version; `[]` for a ref without a publisher or one
152
+ * nothing holds. Never warns.
153
+ */
154
+ refOrigins(ref: string): Promise<RefOrigin[]>;
155
+ /**
156
+ * Every ref (`kind:@publisher/name`) that several origins hold at different versions,
157
+ * with its origins in {@link refOrigins} order. A ref the origins hold at one version
158
+ * has nothing to choose between and is left out.
159
+ */
160
+ competingOrigins(): Promise<Map<string, RefOrigin[]>>;
161
+ /**
162
+ * The origins of {@link refOrigins} for every ref, keyed by `kind:@publisher/name`: the
163
+ * version in each row is the one `add` locks (a source asset whose file declares none is
164
+ * `0.0.0-sha.<commit>`), which `search` lists too (p855).
165
+ */
166
+ allOrigins(): Promise<Map<string, RefOrigin[]>>;
167
+ /**
168
+ * The origins of {@link refOrigins} for every ref, or for the one `only` names
169
+ * (`kind:@publisher/name`), keyed by `kind:@publisher/name`.
170
+ */
171
+ protected collectOrigins(only?: string): Promise<Map<string, RefOrigin[]>>;
172
+ /**
173
+ * Open the local index and snapshot its libraries + asset definitions, scoped to this
174
+ * project's `sources:` ({@link scopeLibraryIndex}).
175
+ * Best-effort: no index file (never indexed), or any open/guard failure,
176
+ * yields `null` — a lock/outdated read must never create `index.db` or throw.
177
+ */
178
+ protected loadLibraryIndex(): Promise<LibraryIndexSnapshot | null>;
179
+ /**
180
+ * The `sources:` this project declares by repository identity ({@link repoIdentity}), or `undefined` outside a project (no
181
+ * `skaile.yaml` in `projectDir` or a parent) or when the file does not parse. Outside a
182
+ * project nothing declares sources, so the machine-wide search reads every clone.
183
+ */
184
+ protected declaredSourceEntries(): Map<string, SourceEntry> | undefined;
185
+ /**
186
+ * The repository identity ({@link repoIdentity} key) a source-clone reader row stands for, or
187
+ * `undefined` for any other library. A row is a source clone when its registry scope is
188
+ * `project`, or (a row an older CLI wrote has no scope) when its folder lies in a clone cache.
189
+ */
190
+ protected sourceCloneKey(l: Library): string | undefined;
191
+ /**
192
+ * Ids of the registered libraries that are the clone of a source this project does not
193
+ * declare. `source add` registers the clone as a machine-wide reader library so `search`
194
+ * and the indexer can read it, but a `sources:` clone belongs to the projects that declare
195
+ * it (OQ4, p321): another project neither resolves it, nor ties with it by name, nor has
196
+ * `update` re-pin its locked assets to it. A reader library the user registered by hand
197
+ * (`library init --reader --git`) lives outside the sources cache and is never hidden.
198
+ */
199
+ undeclaredSourceClones(libraries: readonly Library[]): Set<string>;
200
+ /**
201
+ * The registered libraries as `library list` shows them in this project. A source clone is
202
+ * cache: its row is read from the clone, so it is dropped when the clone is gone and
203
+ * when this project does not declare the source. `sources` holds the ids of the clone rows
204
+ * that stay, so the list can mark them `(source)`.
205
+ */
206
+ scopeLibraryList(libraries: readonly Library[]): {
207
+ libraries: Library[];
208
+ sources: Set<string>;
209
+ };
210
+ /**
211
+ * The index as this project sees it: the source clones of other projects are dropped
212
+ * ({@link undeclaredSourceClones}) and the assets of a declared source carry the publisher
213
+ * this project's `sources:` entry names. The clone and its index rows are shared by every
214
+ * project that declares the source, so a project that declares another `--publisher` is
215
+ * re-labelled here, at read time, and never changes what the others see (p1822).
216
+ */
217
+ scopeLibraryIndex(libraries: Library[], defs: AssetDefinition[]): {
218
+ libraries: Library[];
219
+ defs: AssetDefinition[];
220
+ };
221
+ }
222
+ //# sourceMappingURL=scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../../../asset-manager/src/resolve/scan.ts"],"names":[],"mappings":"AAEA,OAAO,EAwBL,KAA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KG;cACa,gBAAgB,IAAI,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAgBxE;;;;OAIG;IACH,SAAS,CAAC,qBAAqB,IAAI,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,SAAS;IASvE;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAcxD;;;;;;;OAOG;IACH,sBAAsB,CAAC,SAAS,EAAE,SAAS,OAAO,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAWlE;;;;;OAKG;IACH,gBAAgB,CAAC,SAAS,EAAE,SAAS,OAAO,EAAE,GAAG;QAC/C,SAAS,EAAE,OAAO,EAAE,CAAC;QACrB,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;KACtB;IAeD;;;;;;OAMG;IACH,iBAAiB,CACf,SAAS,EAAE,OAAO,EAAE,EACpB,IAAI,EAAE,eAAe,EAAE,GACtB;QAAE,SAAS,EAAE,OAAO,EAAE,CAAC;QAAC,IAAI,EAAE,eAAe,EAAE,CAAA;KAAE;CAqCrD"}
@@ -0,0 +1,176 @@
1
+ import { type buildProvenanceIndex, type OverrideEntry, type ProvenanceCandidate, type ProvenanceIndex, type ResolveResult, type SourceDeclaration, type StoreEntry, type StoreFetcher } from "@skaile/workspaces/core";
2
+ import type { AssetFetcher } from "@skaile/workspaces/library";
3
+ import { type DeployableEntry } from "../installer.js";
4
+ import type { KeptLibraryEntry, LibraryFirstResolution, PreferLocked } from "../shared/types.js";
5
+ import { AmResolveGuards } from "./guards.js";
6
+ /** ResolveWithStores, resolveLibraryFirst, stageStoreAssets. One layer of the `AssetManager` class chain (see `asset-manager/CLAUDE.md`). */
7
+ export declare abstract class AmResolveStores extends AmResolveGuards {
8
+ protected abstract lockedCopyDeployed(kind: string, name: string): boolean;
9
+ protected abstract buildStoreFetcher(stores: StoreEntry[]): StoreFetcher | undefined;
10
+ /**
11
+ * The lock entries that came from a source or the store (a `source:`, no `library:`), by
12
+ * identity `<publisher>/<kind>:<name>` -> locked version. The lock's origin
13
+ * wins: a library registered later that holds the same ref does not take such an asset
14
+ * (`update`, `install`, `add`; OQ15, p1490).
15
+ */
16
+ protected lockedOriginVersions(): Map<string, string>;
17
+ /**
18
+ * The locked assets whose entry says `origin: store`, by identity -> the store URL. A store
19
+ * origin is a pin: no source that holds the same ref takes the asset until `skaile remove`
20
+ * and `skaile add` move it (`update`, `install`, `add`). A declared ref whose `#pin` the
21
+ * locked version does not satisfy is the user asking for another version: it is not pinned.
22
+ *
23
+ * @param declared - The `dependencies:` refs of `skaile.yaml`.
24
+ * @param asked - Refs being resolved now.
25
+ */
26
+ protected storePinnedIdentities(declared: readonly string[], asked: readonly string[]): Map<string, string | undefined>;
27
+ /**
28
+ * Say which registered library holds a ref the lock keeps on its source or the store: the
29
+ * candidate that lost, with the way to switch (p1490). Printed once per `add`.
30
+ */
31
+ protected noteLosingLibraries(refs: readonly string[]): Promise<void>;
32
+ /** A candidate's stable identity key (`<publisher>/<kind>:<name>@<version>`). */
33
+ protected candidateKey(c: ProvenanceCandidate): string;
34
+ /**
35
+ * Resolve `deps`, falling back to the global `catalog.url` store when the
36
+ * project declares no store and the first pass leaves something missing.
37
+ *
38
+ * The first pass uses the project stores only, so locally-resolvable refs
39
+ * never trigger a network probe. The fallback retry is best-effort: any error
40
+ * (offline, store down) keeps the first pass's result rather than regressing.
41
+ */
42
+ protected resolveWithStores(deps: string[], opts: {
43
+ provenanceIndex: Awaited<ReturnType<typeof buildProvenanceIndex>>;
44
+ overrides: OverrideEntry[];
45
+ stores: StoreEntry[];
46
+ declaredRefs?: readonly string[];
47
+ }): Promise<ResolveResult>;
48
+ /**
49
+ * Resolve `deps` library-first, then walk the dependencies of every library
50
+ * asset it picks.
51
+ *
52
+ * A publisher-qualified ref that no project source declares is looked up in the
53
+ * registered **libraries** before any store is asked, so a locally authored
54
+ * asset resolves (and deploys) with the store unreachable and without a
55
+ * version-discovery round trip. Only refs the libraries did not satisfy go to
56
+ * {@link resolveWithStores}; its misses get one more library try (a ref a source
57
+ * knows only under another version). A `#version` pin still selects through
58
+ * `matchPin` inside {@link resolveLibraryEntries}.
59
+ *
60
+ * Library assets declare `dependencies` / `requires`. Those are fed back through
61
+ * the same resolution with a `seen` identity set (mirrors `resolveAll`), so deps
62
+ * deploy, get lock entries, and a dependency cycle terminates.
63
+ *
64
+ * @returns source/store candidates, still-unresolved refs, applied overrides,
65
+ * expanded presets, and the library leg (entries + originating library per entry).
66
+ */
67
+ protected resolveLibraryFirst(deps: string[], opts: {
68
+ provenanceIndex: ProvenanceIndex;
69
+ overrides: OverrideEntry[];
70
+ stores: StoreEntry[];
71
+ /** Refs `skaile.yaml` declares; a dependency of a resolved asset with the same identity resolves at the declared ref/pin. */
72
+ declaredRefs?: readonly string[];
73
+ /** Print the "exists in N libraries" warning for a ref several libraries hold (`add` only; every other command is silent about a choice the lock or a pin already made). */
74
+ warnCollisions?: boolean;
75
+ /** Keep a locked asset on the library its lock entry names ({@link AssetManager.lockedLibraryNames}); `install` passes it, `update` and `add` do not. */
76
+ lockedLibraries?: ReadonlyMap<string, string | null>;
77
+ /** `update` and `update <name>`: a locked asset may move to another library (the highest version wins) but an equal-version tie goes to the default library, then to the library its lock entry names (renames followed), then to one holding the locked bytes. */
78
+ preferLocked?: PreferLocked;
79
+ /** Source/store-origin lock entries by identity (`<publisher>/<kind>:<name>`) -> locked version: such an asset stays on its origin, a library holding the same ref does not take it (OQ15, p1490). */
80
+ lockedOrigin?: ReadonlyMap<string, string>;
81
+ /** `install`: lock entries of library assets by identity (`<publisher>/<kind>:<name>`). A library holding another version of one keeps the locked version. */
82
+ keepLocked?: ReadonlyMap<string, KeptLibraryEntry>;
83
+ /** `add` and `install`: read the `requires` of each store candidate's own manifest (the staged bytes) too, so a requirement the catalog row does not list (a cross-kind one) is resolved, deployed and locked (p1221). */
84
+ readStoreRequires?: boolean;
85
+ /** `update`: name the source that holds a ref the lock keeps on its store (`add` always does). */
86
+ noteStorePinned?: boolean;
87
+ }): Promise<LibraryFirstResolution>;
88
+ /**
89
+ * A source asset without a declared version is keyed `0.0.0-sha.<repo commit>`, so every
90
+ * commit of its repo would re-key (and re-lock, and report as updated) every asset of
91
+ * that repo, changed or not. Keep the locked key and version of an asset whose files hash
92
+ * to what the lock holds: `update` then re-locks only what changed, as `outdated` lists.
93
+ * The commit stays the clone's, so the lock's `sources:` row still names the bytes' commit.
94
+ * A ref the user pinned (`#<version>`) keeps the version it names.
95
+ */
96
+ protected keepUnchangedSourceVersions(resolved: ProvenanceCandidate[], requested: readonly string[]): void;
97
+ /**
98
+ * The catalog fetcher to use: an injected one, else built from `stores`. `catalogUrl: ""`
99
+ * (`update --no-catalog`) asks no store at all, project `stores:` included.
100
+ */
101
+ protected storeFetcherFor(stores: StoreEntry[]): StoreFetcher | undefined;
102
+ /**
103
+ * The global `catalog.url` as a single-store fallback, or `[]` when no
104
+ * project store should be synthesized — `local` sentinel, already-declared,
105
+ * or no URL. Honours an explicit `catalogUrl` injection (`""` and `"local"` disable it).
106
+ */
107
+ protected globalStoreFallback(projectStores: StoreEntry[], honourOverride?: boolean): Promise<StoreEntry[]>;
108
+ /**
109
+ * Build deployable catalog entries from resolved candidates. Store-resolved
110
+ * candidates (no local clone bytes) are fetched + SHA-verified into the
111
+ * project store-cache first, then their entry points at the staged bytes so
112
+ * the existing copy-deploy path works. Source-backed candidates keep the
113
+ * clone-relative entry.
114
+ */
115
+ protected buildCatalogEntries(resolved: ProvenanceCandidate[], repositories: Record<string, SourceDeclaration>): Promise<DeployableEntry[]>;
116
+ /**
117
+ * The tail of a `hash mismatch for <file>: expected <lock>, got <fetched>` failure of a locked
118
+ * restore when the deployed copy already holds the fetched bytes: the lock records another
119
+ * hash for the file, and `install` (not `install --locked`) writes the right one. Empty for
120
+ * any other failure, and when the copy is missing or differs from the fetched bytes.
121
+ */
122
+ protected wrongLockHashHint(candidates: readonly ProvenanceCandidate[], reason: string): string;
123
+ /**
124
+ * Fetch + SHA-verify the bytes of every store-resolved candidate that needs
125
+ * bytes on disk into `.skaile/cache/store/`, reusing the same verified-fetch
126
+ * path the pointer-only `library.install` uses (`installFromManifest` flat
127
+ * mode). Every kind with bytes, composition-only kinds included.
128
+ *
129
+ * @returns Map of candidate key → staged primary-manifest path.
130
+ */
131
+ protected stageStoreAssets(resolved: ProvenanceCandidate[], repositories: Record<string, SourceDeclaration>): Promise<Map<string, string>>;
132
+ /**
133
+ * The requirements a store candidate's own manifest declares (`metadata.requires`, a manifest
134
+ * `dependencies:`) that its catalog row did not list, read from the staged bytes. The catalog
135
+ * row is the store's own summary and may hold only same-kind ones; the deployed copy is what
136
+ * `check` reads, so a requirement only the manifest names would be missing right after `add`
137
+ * (p1221). Each one is added to the candidate's `deps` and `storeRequires` (the lock records
138
+ * them) and returned so the caller resolves, deploys and locks it like any other dependency.
139
+ * A candidate whose bytes come from a source clone, or that has none, adds nothing.
140
+ */
141
+ protected readStoreCandidateRequires(c: ProvenanceCandidate, repositories: Record<string, SourceDeclaration>): Promise<string[]>;
142
+ /** Repo-relative path of a candidate's primary manifest (un-stripped). */
143
+ protected primaryManifestRel(c: ProvenanceCandidate): string | undefined;
144
+ /**
145
+ * The primary-manifest path relative to a staged asset dir. Takes the kind's
146
+ * manifest (e.g. `SKILL.md`), then strips the same common-dir prefix
147
+ * `installFromManifest` flat mode removed on write.
148
+ */
149
+ protected stagedManifestRel(c: ProvenanceCandidate): string;
150
+ /**
151
+ * `true` when a candidate's primary manifest is present on a local source
152
+ * clone — its `sourceUrl` matches a registered source AND the manifest file
153
+ * exists on disk at the expected path. A URL match alone is not enough: a
154
+ * store can pin a different commit (or a subtree not bundled) of a repo that
155
+ * is also a registered source, in which case the bytes must be fetched from
156
+ * the store rather than read from the clone. (Only the primary manifest is
157
+ * probed — a partially-cloned source is deployed as-is, matching the existing
158
+ * clone-deploy path.)
159
+ */
160
+ protected candidateHasLocalBytes(c: ProvenanceCandidate, repositories: Record<string, SourceDeclaration>): boolean;
161
+ /**
162
+ * `true` when `c` names a commit and the git clone at `dir` is checked out at another one.
163
+ * A local path without git, the bundled factory tree (all-zero commit) and a candidate
164
+ * without a commit never differ.
165
+ */
166
+ protected cloneIsOnOtherCommit(dir: string, c: ProvenanceCandidate): boolean;
167
+ /**
168
+ * The fetcher that stages `c`: the injected one, else (for a source-origin asset, which has no
169
+ * catalog to ask) one that reads the commit's files from the source clone's git objects.
170
+ * `undefined` leaves the default GitHub fetch for a store asset.
171
+ */
172
+ protected stageFetcherFor(c: ProvenanceCandidate, repositories: Record<string, SourceDeclaration>): AssetFetcher | undefined;
173
+ /** Build a copy-deploy catalog entry pointing at staged store bytes. */
174
+ protected stagedCandidateToEntry(c: ProvenanceCandidate, stagedManifestPath: string): DeployableEntry;
175
+ }
176
+ //# sourceMappingURL=stores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.d.ts","sourceRoot":"","sources":["../../../../asset-manager/src/resolve/stores.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EAWzB,KAAK,aAAa,EAElB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAU1E,OAAO,KAAK,EAEV,gBAAgB,EAChB,sBAAsB,EAEtB,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAoB9C,6IAA6I;AAC7I,8BAAsB,eAAgB,SAAQ,eAAe;IAE3D,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAC1E,SAAS,C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,mBAAmB,EACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAC9C,OAAO,CAAC,MAAM,EAAE,CAAC;IA6BpB,0EAA0E;IAC1E,SAAS,CAAC,kBAAkB,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS;IAOxE;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM;IAO3D;;;;;;;;;OASG;IACH,SAAS,CAAC,sBAAsB,CAC9B,CAAC,EAAE,mBAAmB,EACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAC9C,OAAO;IAmBV;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,mBAAmB,GAAG,OAAO;IAM5E;;;;OAIG;IACH,SAAS,CAAC,eAAe,CACvB,CAAC,EAAE,mBAAmB,EACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAC9C,YAAY,GAAG,SAAS;IAa3B,wEAAwE;IACxE,SAAS,CAAC,sBAAsB,CAC9B,CAAC,EAAE,mBAAmB,EACtB,kBAAkB,EAAE,MAAM,GACzB,eAAe;CA6BnB"}
@@ -0,0 +1,42 @@
1
+ import { type AiComponent } from "@skaile/workspaces/core";
2
+ /** Primary manifest filename for each asset kind (the deploy entry point). */
3
+ export declare const MD_BY_KIND: Record<string, string>;
4
+ /**
5
+ * Pick a candidate's primary manifest file from its `files[]`. Fixed-name kinds
6
+ * (skill/agent/contract/…) match their `MD_BY_KIND` basename; `prompt` and
7
+ * `flow` use their `<name>.prompt.md` / `<name>.flow.{yaml,json}` suffixes
8
+ * (these have no fixed basename, so an exact-name match alone would miss them).
9
+ */
10
+ export declare function matchManifestPath(kind: string, paths: readonly string[]): string | undefined;
11
+ /**
12
+ * An asset's `paths` relative to its primary manifest's directory, `manifestRel`
13
+ * (both in one coordinate space), dropping anything outside it. This is the file
14
+ * set a deploy copies: exactly what the lock records for the asset, so a deployed
15
+ * tree never differs from its lock (a `.gitignore` or a `resources/` dir the kind's
16
+ * convention filter would not pick is still the asset's).
17
+ */
18
+ export declare function filesUnderManifestDir(paths: readonly string[], manifestRel: string): string[];
19
+ /**
20
+ * The files a source- or store-origin lock entry lists, relative to the deployed asset directory
21
+ * (the primary manifest's directory): the file set a restore writes and `check` compares. Files
22
+ * the lock lists outside the manifest's directory are not part of the deployed copy.
23
+ */
24
+ export declare function lockedAssetFiles(kind: string, files: ReadonlyArray<{
25
+ path: string;
26
+ sha256: string;
27
+ }>): Array<{
28
+ rel: string;
29
+ path: string;
30
+ sha256: string;
31
+ }>;
32
+ /** A GitHub repository URL: the origin of a store asset (no `sources:` entry declares it). */
33
+ export declare const GITHUB_REPO_URL: RegExp;
34
+ /** Whether something sits at `p`, a dangling symlink included (`existsSync` follows the link and says no). */
35
+ export declare function pathEntryExists(p: string): boolean;
36
+ /** Whether `p` is a symlink, dangling or not. */
37
+ export declare function isSymlink(p: string): boolean;
38
+ /** The 5.12.0 omp deploy paths of `name` (`~/.omp/<dir>/<name>`) that exist on disk. */
39
+ export declare function legacyOmpPaths(component: AiComponent, name: string): string[];
40
+ /** True when two files, or two directory trees, hold the same bytes. A symlink never matches. */
41
+ export declare function sameBytes(a: string, b: string): boolean;
42
+ //# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../asset-manager/src/shared/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE1E,8EAA8E;AAC9E,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAO7C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAY5F;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAK7F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GACrD,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAYtD;AAED,8FAA8F;AAC9F,eAAO,MAAM,eAAe,QAAqB,CAAC;AAElD,8GAA8G;AAC9G,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAOlD;AAED,iDAAiD;AACjD,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAM5C;AAED,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAM7E;AAED,iGAAiG;AACjG,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAgBvD"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The checks one library asset must pass before `add` deploys it, as the lines `skaile validate`
3
+ * prints for it (`<file> [<tag>] - <text>`). The asset manager does not know the per-kind checks
4
+ * (they live with `validate`), so the host registers them once at startup; none registered means
5
+ * `add` runs no such check (library use without the CLI). An asset the check refuses is never
6
+ * deployed, as one the manifest does not list is not (p1550).
7
+ */
8
+ export type LibraryAssetCheck = (asset: {
9
+ kind: string;
10
+ name: string;
11
+ source: string;
12
+ }, libraryPath: string) => string[];
13
+ export declare let libraryAssetCheck: LibraryAssetCheck | undefined;
14
+ /** Register (or with `undefined`, remove) the {@link LibraryAssetCheck} `add` runs per library asset. */
15
+ export declare function setLibraryAssetCheck(check: LibraryAssetCheck | undefined): void;
16
+ //# sourceMappingURL=library-hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library-hooks.d.ts","sourceRoot":"","sources":["../../../../asset-manager/src/shared/library-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACrD,WAAW,EAAE,MAAM,KAChB,MAAM,EAAE,CAAC;AAEd,eAAO,IAAI,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;AAE5D,yGAAyG;AACzG,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,GAAG,IAAI,CAE/E"}
@@ -0,0 +1,96 @@
1
+ import { type CatalogEntry, type LockEntry, type LockFile } from "@skaile/workspaces/core";
2
+ import { type AssetDefinition } from "@skaile/workspaces/library";
3
+ import type { IAssetKindRegistry } from "@skaile/workspaces/plugins";
4
+ import type { DeployableEntry } from "../installer.js";
5
+ import type { LibraryIndexSnapshot, LibraryMove, LockedLibrary } from "./types.js";
6
+ /**
7
+ * `kind:name` → sha256 of every asset in the library at `libPath`, hashed from
8
+ * the files on disk by the same discovery pass `skaile library index` runs. The
9
+ * publisher only affects refs, never the hash, so a manifest-less library gets a
10
+ * placeholder. Memoised per root in `cache` for one lock/restore pass.
11
+ */
12
+ export declare function libraryDiskHashes(libPath: string, cache: Map<string, Map<string, string>>, registry: IAssetKindRegistry): Map<string, string>;
13
+ /**
14
+ * Give a scanned library entry the file set its content hash covers, so a deploy
15
+ * copies exactly those bytes (every file under the manifest entry's `root:`, or
16
+ * its explicit `files:`) instead of the kind's convention filter, which drops a
17
+ * skill's `build.py` / `template.html` / `example.data/`. Same discovery pass as
18
+ * {@link libraryDiskHashes} and `skaile library publish`, so the deployed tree
19
+ * never differs from what the lock hashed. A library without `assets:` in its
20
+ * `skaile.manifest.yaml` (glob mode), or an entry discovery rejected, keeps the
21
+ * kind's default filter — the entry is returned untouched.
22
+ *
23
+ * @param cache - Per library root: manifest path → asset files relative to the
24
+ * manifest's directory. Memoised for one resolution pass.
25
+ */
26
+ export declare function withLibraryFiles<E extends DeployableEntry>(entry: E, libPath: string, cache: Map<string, Map<string, string[]>>, registry: IAssetKindRegistry): E;
27
+ /**
28
+ * The highest-versioned indexed definition of `kind:@publisher/name` held by the
29
+ * library named `libraryName`, or `undefined` when the library is unknown to the
30
+ * index or has not indexed the asset. Stored publishers may carry the `@` scope
31
+ * sigil, so both sides are compared bare.
32
+ */
33
+ export declare function newestLibraryDef(snap: LibraryIndexSnapshot | null, libraryName: string, id: {
34
+ kind: string;
35
+ publisher: string;
36
+ name: string;
37
+ }): AssetDefinition | undefined;
38
+ /** Prefix of the pseudo-version of an asset that declares no version (`0.0.0-sha.<commit>`). */
39
+ export declare const PSEUDO_VERSION_PREFIX = "0.0.0-sha.";
40
+ export declare function isPseudoVersion(version: string): boolean;
41
+ /**
42
+ * THE version of an asset held by the library named `libraryName`: the one its file declares;
43
+ * for an asset without one in a source clone (a `reader` library with a remote url) the repo
44
+ * commit pseudo-version `0.0.0-sha.<commit>`, as the source pass keys it and `search` lists it
45
+ * (p967); otherwise the indexed one. `add`, the lock, `install --locked`, `check` and
46
+ * `outdated` all ask here, so a version-less asset has one version everywhere.
47
+ */
48
+ export declare function libraryAssetVersion(snap: LibraryIndexSnapshot | null | undefined, libraryName: string, id: {
49
+ kind: string;
50
+ publisher: string;
51
+ name: string;
52
+ }, declared: string | undefined): string | undefined;
53
+ /**
54
+ * Sort order of library candidates for one ref: highest version first; an equal version
55
+ * goes to the default library, then to the candidates `rank` puts first (lower is better),
56
+ * then by library name — so the pick never depends on scan order.
57
+ */
58
+ export declare function libraryPreference(isDefaultLib: Map<string, boolean>, rank?: (c: {
59
+ entry: CatalogEntry;
60
+ library: string;
61
+ }) => number): (a: {
62
+ entry: CatalogEntry;
63
+ library: string;
64
+ }, b: {
65
+ entry: CatalogEntry;
66
+ library: string;
67
+ }) => number;
68
+ /**
69
+ * The library-origin entries of `next` whose library differs from the one `prev` locked for the
70
+ * same kind/publisher/name (any version). New assets and `asset install` entries never move.
71
+ */
72
+ export declare function libraryMoves(prev: LockFile | null, next: Record<string, LockEntry>): LibraryMove[];
73
+ /**
74
+ * The name to tell the user for a locked library that is not registered: the last name the
75
+ * library had, as the lock keeps the one it had when the asset was locked (p893).
76
+ */
77
+ export declare function unregisteredLibraryName(origin: {
78
+ name: string;
79
+ }): string;
80
+ /**
81
+ * What to do about a locked library asset whose library is not registered (renamed or removed).
82
+ * A lock entry that records the library's remote names it too, and registers the library by it:
83
+ * no registered library has that remote either, or the lookup would have matched it.
84
+ */
85
+ export declare function unregisteredLibraryFix(origin: {
86
+ name: string;
87
+ url?: string;
88
+ }, ref: string): string;
89
+ /** Why a locked library cannot supply its assets, with the fix, for a lookup that is not `ok`. */
90
+ export declare function lockedLibraryProblem(lookup: Exclude<LockedLibrary, {
91
+ state: "ok";
92
+ }>, origin: {
93
+ name: string;
94
+ url?: string;
95
+ }, ref: string): string;
96
+ //# sourceMappingURL=library.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../asset-manager/src/shared/library.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,QAAQ,EACd,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,aAAa,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