@skaile/workspaces 5.9.0 → 5.11.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 (316) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/README.md +12 -0
  3. package/dist/{asset-feeds-XMKKUUK6.js → asset-feeds-CXGQIDFR.js} +19 -19
  4. package/dist/{asset-feeds-XMKKUUK6.js.map → asset-feeds-CXGQIDFR.js.map} +1 -1
  5. package/dist/asset-manager/catalog-deployer.js +8 -8
  6. package/dist/asset-manager/index.js +14 -14
  7. package/dist/asset-manager/installer.js +10 -10
  8. package/dist/asset-manager/renderers.js +9 -9
  9. package/dist/asset-manager/src/index.d.ts +400 -35
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/asset-manager/src/install-agent.d.ts +3 -1
  12. package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
  13. package/dist/asset-manager/src/install-instances.d.ts +31 -1
  14. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  15. package/dist/asset-manager/src/installer.d.ts +43 -3
  16. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  17. package/dist/asset-manager/src/renderers.d.ts +4 -5
  18. package/dist/asset-manager/src/renderers.d.ts.map +1 -1
  19. package/dist/bridge/drivers/claude-sdk.js +11 -11
  20. package/dist/bridge/drivers/codex.js +11 -11
  21. package/dist/bridge/drivers/continue.js +10 -10
  22. package/dist/bridge/drivers/echo.js +2 -2
  23. package/dist/bridge/drivers/gemini.js +7 -7
  24. package/dist/bridge/drivers/goose.js +10 -10
  25. package/dist/bridge/drivers/omp.js +19 -3
  26. package/dist/bridge/drivers/omp.js.map +1 -1
  27. package/dist/bridge/drivers/opencode.js +10 -10
  28. package/dist/bridge/drivers/qwen.js +7 -7
  29. package/dist/bridge/index.js +12 -12
  30. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  31. package/dist/{chunk-4MQS7CAF.js → chunk-2F5AWQX5.js} +437 -175
  32. package/dist/chunk-2F5AWQX5.js.map +1 -0
  33. package/dist/{chunk-UM7RIAHO.js → chunk-3SM2DL2T.js} +8 -8
  34. package/dist/{chunk-UM7RIAHO.js.map → chunk-3SM2DL2T.js.map} +1 -1
  35. package/dist/{chunk-5NNNV76P.js → chunk-47U4GZ4M.js} +2 -2
  36. package/dist/{chunk-5NNNV76P.js.map → chunk-47U4GZ4M.js.map} +1 -1
  37. package/dist/{chunk-TTRYE6AC.js → chunk-4A4OD24G.js} +9 -9
  38. package/dist/{chunk-TTRYE6AC.js.map → chunk-4A4OD24G.js.map} +1 -1
  39. package/dist/{chunk-ZTBAYUDY.js → chunk-6O2X3GPW.js} +2 -2
  40. package/dist/{chunk-ZTBAYUDY.js.map → chunk-6O2X3GPW.js.map} +1 -1
  41. package/dist/{chunk-JAKOMFC6.js → chunk-ALEYHUC5.js} +114 -46
  42. package/dist/chunk-ALEYHUC5.js.map +1 -0
  43. package/dist/{chunk-QVNRCDTV.js → chunk-BNMZVPYA.js} +7 -7
  44. package/dist/chunk-BNMZVPYA.js.map +1 -0
  45. package/dist/{chunk-2FRUUDZY.js → chunk-CAHB6MHA.js} +5 -5
  46. package/dist/{chunk-2FRUUDZY.js.map → chunk-CAHB6MHA.js.map} +1 -1
  47. package/dist/{chunk-GKMZ6THE.js → chunk-CJERAGFY.js} +44 -33
  48. package/dist/chunk-CJERAGFY.js.map +1 -0
  49. package/dist/{chunk-CKQEIY43.js → chunk-COH6FQAG.js} +4 -4
  50. package/dist/{chunk-CKQEIY43.js.map → chunk-COH6FQAG.js.map} +1 -1
  51. package/dist/{chunk-UO7WPLDY.js → chunk-CPWLNZGJ.js} +3 -3
  52. package/dist/{chunk-UO7WPLDY.js.map → chunk-CPWLNZGJ.js.map} +1 -1
  53. package/dist/{chunk-MGGFBZWA.js → chunk-D3B36CYC.js} +4 -3
  54. package/dist/chunk-D3B36CYC.js.map +1 -0
  55. package/dist/{chunk-UMVKJM4Q.js → chunk-DALV4HHP.js} +18 -3
  56. package/dist/chunk-DALV4HHP.js.map +1 -0
  57. package/dist/{chunk-IMKSM5NL.js → chunk-DZMNFCWB.js} +1447 -199
  58. package/dist/chunk-DZMNFCWB.js.map +1 -0
  59. package/dist/{chunk-GB7WDMH2.js → chunk-EDYHEMJA.js} +4 -4
  60. package/dist/{chunk-GB7WDMH2.js.map → chunk-EDYHEMJA.js.map} +1 -1
  61. package/dist/{chunk-YSHVQGUS.js → chunk-FH7W6TJ4.js} +164 -41
  62. package/dist/chunk-FH7W6TJ4.js.map +1 -0
  63. package/dist/{chunk-W5DWWE4Y.js → chunk-G4FFOV3N.js} +4 -4
  64. package/dist/{chunk-W5DWWE4Y.js.map → chunk-G4FFOV3N.js.map} +1 -1
  65. package/dist/{chunk-2LWYNQK7.js → chunk-GCHPUTA3.js} +3 -3
  66. package/dist/{chunk-2LWYNQK7.js.map → chunk-GCHPUTA3.js.map} +1 -1
  67. package/dist/{chunk-JZ5EHBPI.js → chunk-GV4DZ6MT.js} +20 -4
  68. package/dist/chunk-GV4DZ6MT.js.map +1 -0
  69. package/dist/{chunk-S53LOR7B.js → chunk-HCEVNYSH.js} +3 -3
  70. package/dist/{chunk-S53LOR7B.js.map → chunk-HCEVNYSH.js.map} +1 -1
  71. package/dist/{chunk-EF7NPDDU.js → chunk-HZXUXHIV.js} +31 -17
  72. package/dist/chunk-HZXUXHIV.js.map +1 -0
  73. package/dist/{chunk-IR33D6EP.js → chunk-IER3KIPH.js} +5 -5
  74. package/dist/{chunk-IR33D6EP.js.map → chunk-IER3KIPH.js.map} +1 -1
  75. package/dist/{chunk-Y7QA2OLD.js → chunk-J4RBUFGM.js} +22 -20
  76. package/dist/chunk-J4RBUFGM.js.map +1 -0
  77. package/dist/{chunk-J7U3PIOE.js → chunk-M3B6EIJD.js} +4 -4
  78. package/dist/{chunk-J7U3PIOE.js.map → chunk-M3B6EIJD.js.map} +1 -1
  79. package/dist/{chunk-DNZYOKOJ.js → chunk-MZG34MBZ.js} +3 -3
  80. package/dist/{chunk-DNZYOKOJ.js.map → chunk-MZG34MBZ.js.map} +1 -1
  81. package/dist/{chunk-V2DXZYBB.js → chunk-NWDSLXOX.js} +3 -3
  82. package/dist/{chunk-V2DXZYBB.js.map → chunk-NWDSLXOX.js.map} +1 -1
  83. package/dist/{chunk-36AFURKZ.js → chunk-PBBPZYVG.js} +61 -12
  84. package/dist/chunk-PBBPZYVG.js.map +1 -0
  85. package/dist/{chunk-P67WJVP4.js → chunk-PQFHMQHQ.js} +10 -9
  86. package/dist/chunk-PQFHMQHQ.js.map +1 -0
  87. package/dist/{chunk-UAROCOXF.js → chunk-QVFAS5IO.js} +3 -3
  88. package/dist/{chunk-UAROCOXF.js.map → chunk-QVFAS5IO.js.map} +1 -1
  89. package/dist/{chunk-K3CVFRVS.js → chunk-QZNJOHN6.js} +3 -3
  90. package/dist/{chunk-K3CVFRVS.js.map → chunk-QZNJOHN6.js.map} +1 -1
  91. package/dist/{chunk-FVJK4QWM.js → chunk-R7NHYEJF.js} +4 -4
  92. package/dist/{chunk-FVJK4QWM.js.map → chunk-R7NHYEJF.js.map} +1 -1
  93. package/dist/{chunk-GXLQLPE5.js → chunk-RYYLMBA2.js} +5 -5
  94. package/dist/{chunk-GXLQLPE5.js.map → chunk-RYYLMBA2.js.map} +1 -1
  95. package/dist/{chunk-Y4N2NUZD.js → chunk-S3O3GKB7.js} +4 -4
  96. package/dist/{chunk-Y4N2NUZD.js.map → chunk-S3O3GKB7.js.map} +1 -1
  97. package/dist/{chunk-GTILM2CI.js → chunk-SBSA3IQA.js} +43 -12
  98. package/dist/chunk-SBSA3IQA.js.map +1 -0
  99. package/dist/{chunk-4PTSR4UU.js → chunk-T42WRQ4O.js} +3 -3
  100. package/dist/{chunk-4PTSR4UU.js.map → chunk-T42WRQ4O.js.map} +1 -1
  101. package/dist/{chunk-MR5HBOUF.js → chunk-T7CTHHG7.js} +3 -3
  102. package/dist/{chunk-MR5HBOUF.js.map → chunk-T7CTHHG7.js.map} +1 -1
  103. package/dist/{chunk-FZNG4V4J.js → chunk-TCHRMVTO.js} +4 -4
  104. package/dist/{chunk-FZNG4V4J.js.map → chunk-TCHRMVTO.js.map} +1 -1
  105. package/dist/{chunk-LAMCXQGA.js → chunk-VLTQGE2E.js} +75 -25
  106. package/dist/chunk-VLTQGE2E.js.map +1 -0
  107. package/dist/{chunk-7AI3Q5AQ.js → chunk-WSBKB4CJ.js} +71 -24
  108. package/dist/chunk-WSBKB4CJ.js.map +1 -0
  109. package/dist/{chunk-CGT45WN7.js → chunk-X77SUM4P.js} +3 -3
  110. package/dist/{chunk-CGT45WN7.js.map → chunk-X77SUM4P.js.map} +1 -1
  111. package/dist/{chunk-SCOT677Q.js → chunk-XDKH7XSA.js} +5 -5
  112. package/dist/{chunk-SCOT677Q.js.map → chunk-XDKH7XSA.js.map} +1 -1
  113. package/dist/{chunk-QVEKLSEH.js → chunk-XUSALIEI.js} +6 -6
  114. package/dist/{chunk-QVEKLSEH.js.map → chunk-XUSALIEI.js.map} +1 -1
  115. package/dist/{chunk-FYXZRVID.js → chunk-Y3HTGHJC.js} +3 -3
  116. package/dist/{chunk-FYXZRVID.js.map → chunk-Y3HTGHJC.js.map} +1 -1
  117. package/dist/chunk-YOH2L76X.js +505 -0
  118. package/dist/chunk-YOH2L76X.js.map +1 -0
  119. package/dist/{chunk-B6GIW55K.js → chunk-ZCAJZ4B2.js} +7 -4
  120. package/dist/chunk-ZCAJZ4B2.js.map +1 -0
  121. package/dist/{chunk-BTE2V4IW.js → chunk-ZPWTOUTK.js} +76 -7
  122. package/dist/{chunk-BTE2V4IW.js.map → chunk-ZPWTOUTK.js.map} +1 -1
  123. package/dist/cli/index.js +1034 -794
  124. package/dist/cli/index.js.map +1 -1
  125. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  126. package/dist/cli/src/commands/catalog.d.ts +8 -5
  127. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  128. package/dist/cli/src/commands/diff.d.ts +4 -2
  129. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  130. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  131. package/dist/cli/src/commands/library-index.d.ts +34 -2
  132. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  133. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  134. package/dist/cli/src/commands/manage.d.ts +12 -5
  135. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  136. package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
  137. package/dist/cli/src/commands/outdated.d.ts +7 -5
  138. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  139. package/dist/cli/src/commands/project.d.ts +13 -8
  140. package/dist/cli/src/commands/project.d.ts.map +1 -1
  141. package/dist/cli/src/commands/run.d.ts.map +1 -1
  142. package/dist/cli/src/commands/source.d.ts +30 -1
  143. package/dist/cli/src/commands/source.d.ts.map +1 -1
  144. package/dist/cli/src/commands/update.d.ts.map +1 -1
  145. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  146. package/dist/cli/src/commands/why.d.ts +1 -0
  147. package/dist/cli/src/commands/why.d.ts.map +1 -1
  148. package/dist/cli/src/helpers.d.ts +12 -0
  149. package/dist/cli/src/helpers.d.ts.map +1 -1
  150. package/dist/cli/src/skill-checks.d.ts +57 -4
  151. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  152. package/dist/connectors/config.js +5 -5
  153. package/dist/connectors/index.js +16 -16
  154. package/dist/{connectors-C7UQ73BK.js → connectors-4QWAKPHB.js} +19 -19
  155. package/dist/{connectors-C7UQ73BK.js.map → connectors-4QWAKPHB.js.map} +1 -1
  156. package/dist/core/index.js +7 -7
  157. package/dist/core/logging.js +1 -1
  158. package/dist/core/manifest.js +2 -2
  159. package/dist/core/models.js +1 -1
  160. package/dist/core/publish-manifest.js +2 -2
  161. package/dist/core/ref.js +1 -1
  162. package/dist/core/runtime-assets.js +5 -5
  163. package/dist/core/src/index.d.ts +2 -1
  164. package/dist/core/src/index.d.ts.map +1 -1
  165. package/dist/core/src/lock.d.ts +6 -2
  166. package/dist/core/src/lock.d.ts.map +1 -1
  167. package/dist/core/src/logging/sinks/sqlite-runtime.d.ts.map +1 -1
  168. package/dist/core/src/manifest.d.ts.map +1 -1
  169. package/dist/core/src/models.d.ts +22 -6
  170. package/dist/core/src/models.d.ts.map +1 -1
  171. package/dist/core/src/publish-manifest.d.ts +29 -3
  172. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  173. package/dist/core/src/repo-manager.d.ts.map +1 -1
  174. package/dist/core/src/requirements.d.ts +26 -0
  175. package/dist/core/src/requirements.d.ts.map +1 -0
  176. package/dist/core/src/walker.d.ts.map +1 -1
  177. package/dist/core/src/workspace-config.d.ts +22 -1
  178. package/dist/core/src/workspace-config.d.ts.map +1 -1
  179. package/dist/core/src/workspace-yaml-editor.d.ts +4 -1
  180. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  181. package/dist/core/workspace-config.js +4 -4
  182. package/dist/deploy/index.js +7 -7
  183. package/dist/discovery/index.js +5 -5
  184. package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
  185. package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
  186. package/dist/discovery/src/discover.d.ts.map +1 -1
  187. package/dist/discovery/src/source-config.d.ts.map +1 -1
  188. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  189. package/dist/{ensure-sources-SRC2DVR5.js → ensure-sources-2RONZKCU.js} +17 -17
  190. package/dist/{ensure-sources-SRC2DVR5.js.map → ensure-sources-2RONZKCU.js.map} +1 -1
  191. package/dist/factory-assets/connectors/box.js +16 -16
  192. package/dist/factory-assets/connectors/deploy.js +16 -16
  193. package/dist/factory-assets/connectors/devserver.js +16 -16
  194. package/dist/factory-assets/connectors/flow/adapter.js +16 -16
  195. package/dist/factory-assets/connectors/flow/contract/normalize.d.ts.map +1 -1
  196. package/dist/factory-assets/connectors/flow/contract.js +1 -1
  197. package/dist/factory-assets/connectors/flow/engine.js +9 -9
  198. package/dist/factory-assets/connectors/flow/run-flow.js +18 -18
  199. package/dist/factory-assets/connectors/flow.js +16 -16
  200. package/dist/factory-assets/connectors/git.js +16 -16
  201. package/dist/factory-assets/connectors/gmail.js +16 -16
  202. package/dist/factory-assets/connectors/googledrive.js +16 -16
  203. package/dist/factory-assets/connectors/local.js +16 -16
  204. package/dist/factory-assets/connectors/mattermost.js +16 -16
  205. package/dist/factory-assets/connectors/memory.js +16 -16
  206. package/dist/factory-assets/connectors/minio.js +16 -16
  207. package/dist/factory-assets/connectors/postgres.js +16 -16
  208. package/dist/factory-assets/connectors/s3.js +16 -16
  209. package/dist/factory-assets/connectors/sharepoint.js +16 -16
  210. package/dist/factory-assets/connectors/sqlite.js +16 -16
  211. package/dist/factory-assets/connectors/static-server.js +16 -16
  212. package/dist/factory-assets/connectors/tunnel.js +16 -16
  213. package/dist/factory-assets/connectors/webdav.js +16 -16
  214. package/dist/factory-assets/connectors/xstate-store.js +16 -16
  215. package/dist/factory-assets/connectors/xstate.js +16 -16
  216. package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +9 -3
  217. package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +4 -2
  218. package/dist/{flows-CBYRSAGS.js → flows-EQF2CH4U.js} +12 -12
  219. package/dist/{flows-CBYRSAGS.js.map → flows-EQF2CH4U.js.map} +1 -1
  220. package/dist/{helpers-XAEKCZKT.js → helpers-CFK6YP6R.js} +17 -17
  221. package/dist/{helpers-XAEKCZKT.js.map → helpers-CFK6YP6R.js.map} +1 -1
  222. package/dist/library/index.js +11 -11
  223. package/dist/library/install.js +3 -3
  224. package/dist/library/src/index.d.ts +2 -1
  225. package/dist/library/src/index.d.ts.map +1 -1
  226. package/dist/library/src/local/library-dir.d.ts +68 -0
  227. package/dist/library/src/local/library-dir.d.ts.map +1 -0
  228. package/dist/library/src/local/library-manager.d.ts +10 -1
  229. package/dist/library/src/local/library-manager.d.ts.map +1 -1
  230. package/dist/library/src/local/library.d.ts +2 -2
  231. package/dist/library/src/local/library.d.ts.map +1 -1
  232. package/dist/library/src/local/local-catalog-source.d.ts +9 -0
  233. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  234. package/dist/library/src/manifest-writer.d.ts +55 -4
  235. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  236. package/dist/library/src/remote/cache.d.ts +18 -1
  237. package/dist/library/src/remote/cache.d.ts.map +1 -1
  238. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  239. package/dist/library/src/remote/rest-catalog-source.d.ts.map +1 -1
  240. package/dist/library/src/sync/git-driver.d.ts +7 -6
  241. package/dist/library/src/sync/git-driver.d.ts.map +1 -1
  242. package/dist/{library-publish-VJSWMOLH.js → library-publish-53UTB3MB.js} +151 -42
  243. package/dist/library-publish-53UTB3MB.js.map +1 -0
  244. package/dist/open-library-BOSPJVID.js +40 -0
  245. package/dist/{open-library-DB2PNL2X.js.map → open-library-BOSPJVID.js.map} +1 -1
  246. package/dist/open-registry-4FI7HKET.js +32 -0
  247. package/dist/{open-registry-ZUZJ7MS7.js.map → open-registry-4FI7HKET.js.map} +1 -1
  248. package/dist/paths-SUS4S4YT.js +22 -0
  249. package/dist/{paths-FQ64OLJG.js.map → paths-SUS4S4YT.js.map} +1 -1
  250. package/dist/{plugin-store-MPAMD5OT.js → plugin-store-AGQDMING.js} +9 -9
  251. package/dist/{plugin-store-MPAMD5OT.js.map → plugin-store-AGQDMING.js.map} +1 -1
  252. package/dist/project-I55A4O2T.js +41 -0
  253. package/dist/{project-I6NX3NFB.js.map → project-I55A4O2T.js.map} +1 -1
  254. package/dist/resolver/index.js +8 -8
  255. package/dist/runner/index.js +30 -30
  256. package/dist/runner/src/agent.d.ts.map +1 -1
  257. package/dist/runner/src/serve.d.ts.map +1 -1
  258. package/dist/runner/src/usage-limit-turn-hold.d.ts +51 -0
  259. package/dist/runner/src/usage-limit-turn-hold.d.ts.map +1 -0
  260. package/dist/sdk/asset-manager.js +14 -14
  261. package/dist/sdk/bridge.js +12 -12
  262. package/dist/sdk/core.js +7 -7
  263. package/dist/sdk/flow.js +9 -9
  264. package/dist/sdk/index.js +30 -30
  265. package/dist/sdk/resolver.js +8 -8
  266. package/dist/sdk/runner.js +30 -30
  267. package/dist/{setup-B7JUHYJW.js → setup-7DQJKHUI.js} +22 -22
  268. package/dist/{setup-B7JUHYJW.js.map → setup-7DQJKHUI.js.map} +1 -1
  269. package/dist/{skills-TVO26Y4V.js → skills-NUEN5NDX.js} +13 -13
  270. package/dist/{skills-TVO26Y4V.js.map → skills-NUEN5NDX.js.map} +1 -1
  271. package/dist/source-G2LV5LVD.js +41 -0
  272. package/dist/{source-PJBMDCKX.js.map → source-G2LV5LVD.js.map} +1 -1
  273. package/dist/{source-manifest-publish-LLJWXGID.js → source-manifest-publish-6RM7SWLZ.js} +24 -24
  274. package/dist/{source-manifest-publish-LLJWXGID.js.map → source-manifest-publish-6RM7SWLZ.js.map} +1 -1
  275. package/dist/tui/index.js +61 -41
  276. package/dist/tui/index.js.map +1 -1
  277. package/dist/tui/src/repl.d.ts.map +1 -1
  278. package/dist/types/manifests.js +1 -1
  279. package/dist/types/src/manifests/agent.d.ts +2 -0
  280. package/dist/types/src/manifests/agent.d.ts.map +1 -1
  281. package/dist/types/src/manifests/contract.d.ts +2 -0
  282. package/dist/types/src/manifests/contract.d.ts.map +1 -1
  283. package/dist/types/src/manifests/index.d.ts +3 -3
  284. package/dist/types/src/manifests/index.d.ts.map +1 -1
  285. package/dist/types/src/manifests/preset.d.ts +1 -1
  286. package/dist/types/src/manifests/prompt.d.ts +2 -0
  287. package/dist/types/src/manifests/prompt.d.ts.map +1 -1
  288. package/dist/workspace-plugin/adapters/mcp.js +23 -23
  289. package/dist/workspace-plugin/adapters/omp.js +14 -14
  290. package/dist/workspace-plugin/index.js +2 -2
  291. package/package.json +1 -1
  292. package/dist/chunk-36AFURKZ.js.map +0 -1
  293. package/dist/chunk-4MQS7CAF.js.map +0 -1
  294. package/dist/chunk-7AI3Q5AQ.js.map +0 -1
  295. package/dist/chunk-B6GIW55K.js.map +0 -1
  296. package/dist/chunk-EF7NPDDU.js.map +0 -1
  297. package/dist/chunk-GKMZ6THE.js.map +0 -1
  298. package/dist/chunk-GTILM2CI.js.map +0 -1
  299. package/dist/chunk-IMKSM5NL.js.map +0 -1
  300. package/dist/chunk-JAKOMFC6.js.map +0 -1
  301. package/dist/chunk-JZ5EHBPI.js.map +0 -1
  302. package/dist/chunk-LAMCXQGA.js.map +0 -1
  303. package/dist/chunk-MGGFBZWA.js.map +0 -1
  304. package/dist/chunk-P67WJVP4.js.map +0 -1
  305. package/dist/chunk-QVNRCDTV.js.map +0 -1
  306. package/dist/chunk-UMVKJM4Q.js.map +0 -1
  307. package/dist/chunk-Y7QA2OLD.js.map +0 -1
  308. package/dist/chunk-YSHVQGUS.js.map +0 -1
  309. package/dist/chunk-ZAOGFXDO.js +0 -112
  310. package/dist/chunk-ZAOGFXDO.js.map +0 -1
  311. package/dist/library-publish-VJSWMOLH.js.map +0 -1
  312. package/dist/open-library-DB2PNL2X.js +0 -40
  313. package/dist/open-registry-ZUZJ7MS7.js +0 -32
  314. package/dist/paths-FQ64OLJG.js +0 -22
  315. package/dist/project-I6NX3NFB.js +0 -41
  316. package/dist/source-PJBMDCKX.js +0 -41
@@ -1,16 +1,16 @@
1
- import { readManifestSourceConfig, discoverAssetsInTree, barePublisher, createDefaultKindRegistry, sharesItsFolder, SEMVER_RE, parseManifestFile } from './chunk-Y7QA2OLD.js';
2
- import { installFromManifest, assertSafeManifestPath } from './chunk-CKQEIY43.js';
3
- import { PresetManifestSchema } from './chunk-B6GIW55K.js';
4
- import { defaultLibraryDir, resolveLibraryDir, GLOBAL_INSTALL_DIR_NAME, readLock, buildLibraryLockEntries, writeLock, mergeLockFile, buildLockFile, ManifestYamlEditor } from './chunk-36AFURKZ.js';
5
- import { getGlobalCacheDir, storeManifestSlug, resolveSourcePublisher } from './chunk-JAKOMFC6.js';
1
+ import { readManifestSourceConfig, discoverAssetsInTree, barePublisher, createDefaultKindRegistry, sharesItsFolder, SEMVER_RE, parseManifestFile } from './chunk-J4RBUFGM.js';
2
+ import { installFromManifest, assertSafeManifestPath } from './chunk-COH6FQAG.js';
3
+ import { PresetManifestSchema } from './chunk-ZCAJZ4B2.js';
4
+ import { defaultLibraryDir, resolveLibraryDir, GLOBAL_INSTALL_DIR_NAME, readLock, buildLibraryLockEntries, writeLock, mergeLockFile, buildLockFile, ManifestYamlEditor } from './chunk-PBBPZYVG.js';
5
+ import { getGlobalCacheDir, storeManifestSlug, resolveSourcePublisher } from './chunk-ALEYHUC5.js';
6
6
  import { userConfigPath, globalSkaileDir, mergeLegacyEntriesInto, migrateLegacyDir, globalCacheRoot } from './chunk-L5VSIPQD.js';
7
- import { encodeSkaileManifest, loadSkPublishManifest, SKAILE_MANIFEST_FILENAME } from './chunk-BTE2V4IW.js';
8
- import { scanDirectory } from './chunk-GTILM2CI.js';
9
- import { parseAssetRef, assetRefToStr } from './chunk-QVNRCDTV.js';
7
+ import { encodeSkaileManifest, loadSkPublishManifest, SKAILE_MANIFEST_FILENAME } from './chunk-ZPWTOUTK.js';
8
+ import { scanDirectory } from './chunk-SBSA3IQA.js';
9
+ import { parseAssetRef, assetRefToStr } from './chunk-BNMZVPYA.js';
10
10
  import { __export } from './chunk-NSBPE2FW.js';
11
- import * as fs10 from 'fs';
11
+ import * as fs11 from 'fs';
12
12
  import { existsSync, mkdirSync, symlinkSync, copyFileSync, cpSync } from 'fs';
13
- import * as path15 from 'path';
13
+ import * as path16 from 'path';
14
14
  import { resolve, relative, sep, join, dirname } from 'path';
15
15
  import { stringify, parse, parseDocument } from 'yaml';
16
16
  import * as z3 from 'zod';
@@ -103,10 +103,10 @@ var SkaileConfigSchema = z3.object({
103
103
  library: LibraryConfigSchema.optional()
104
104
  });
105
105
  function defaultIndexPath() {
106
- return path15.join(globalSkaileDir(), "index.db");
106
+ return path16.join(globalSkaileDir(), "index.db");
107
107
  }
108
108
  function resolveIndexPath() {
109
- if (process.env.SKAILE_INDEX_PATH) return path15.resolve(process.env.SKAILE_INDEX_PATH);
109
+ if (process.env.SKAILE_INDEX_PATH) return path16.resolve(process.env.SKAILE_INDEX_PATH);
110
110
  return defaultIndexPath();
111
111
  }
112
112
  function getConfigDefaults() {
@@ -117,12 +117,12 @@ function getConfigDefaults() {
117
117
  }
118
118
  var CONFIG_FILENAME = "config.yaml";
119
119
  function projectConfigPath(projectDir) {
120
- return path15.join(projectDir, ".skaile", CONFIG_FILENAME);
120
+ return path16.join(projectDir, ".skaile", CONFIG_FILENAME);
121
121
  }
122
122
  function loadConfigFile(filePath) {
123
- if (!fs10.existsSync(filePath)) return null;
123
+ if (!fs11.existsSync(filePath)) return null;
124
124
  try {
125
- const content = fs10.readFileSync(filePath, "utf-8");
125
+ const content = fs11.readFileSync(filePath, "utf-8");
126
126
  const raw = parse(content);
127
127
  if (!raw || typeof raw !== "object") return null;
128
128
  return SkaileConfigSchema.partial().parse(raw);
@@ -170,11 +170,11 @@ function resolveConfig(opts) {
170
170
  return resolved;
171
171
  }
172
172
  function saveConfig(filePath, config) {
173
- const dir = path15.dirname(filePath);
174
- if (!fs10.existsSync(dir)) {
175
- fs10.mkdirSync(dir, { recursive: true });
173
+ const dir = path16.dirname(filePath);
174
+ if (!fs11.existsSync(dir)) {
175
+ fs11.mkdirSync(dir, { recursive: true });
176
176
  }
177
- fs10.writeFileSync(filePath, stringify(config, { indent: 2 }), "utf-8");
177
+ fs11.writeFileSync(filePath, stringify(config, { indent: 2 }), "utf-8");
178
178
  }
179
179
  var KnowledgeManifestSchema = z3.looseObject({
180
180
  name: z3.string().optional(),
@@ -200,11 +200,11 @@ function validateKnowledge(data) {
200
200
 
201
201
  // library/src/knowledge/knowledge-kind-provider.ts
202
202
  function collectDirRecursive(baseDir, relativeDir) {
203
- const full = path15.join(baseDir, relativeDir);
204
- if (!fs10.existsSync(full) || !fs10.statSync(full).isDirectory()) return [];
203
+ const full = path16.join(baseDir, relativeDir);
204
+ if (!fs11.existsSync(full) || !fs11.statSync(full).isDirectory()) return [];
205
205
  const results = [];
206
- for (const entry of fs10.readdirSync(full, { withFileTypes: true })) {
207
- const rel = path15.posix.join(relativeDir, entry.name);
206
+ for (const entry of fs11.readdirSync(full, { withFileTypes: true })) {
207
+ const rel = path16.posix.join(relativeDir, entry.name);
208
208
  if (entry.isDirectory()) {
209
209
  results.push(...collectDirRecursive(baseDir, rel));
210
210
  } else if (entry.isFile()) {
@@ -231,8 +231,8 @@ var knowledgeKindProvider = {
231
231
  return validateKnowledge(data);
232
232
  },
233
233
  defaultFileFilter(manifestPath) {
234
- const dir = path15.dirname(manifestPath);
235
- const manifestName = path15.basename(manifestPath);
234
+ const dir = path16.dirname(manifestPath);
235
+ const manifestName = path16.basename(manifestPath);
236
236
  const files = [manifestName];
237
237
  files.push(...collectDirRecursive(dir, "documents"));
238
238
  files.sort();
@@ -311,30 +311,30 @@ var assignments = sqliteTable("assignments", {
311
311
  assignedAt: text("assigned_at").notNull()
312
312
  });
313
313
  function isClone(dir) {
314
- return fs10.existsSync(path15.join(dir, ".git"));
314
+ return fs11.existsSync(path16.join(dir, ".git"));
315
315
  }
316
316
  function getSidecarRoot() {
317
317
  const home = globalSkaileDir();
318
- const sidecars = path15.join(home, "sidecars");
319
- const legacy = path15.join(home, "sources");
318
+ const sidecars = path16.join(home, "sidecars");
319
+ const legacy = path16.join(home, "sources");
320
320
  mergeLegacyEntriesInto(getGlobalCacheDir(), legacy, isClone);
321
321
  mergeLegacyEntriesInto(sidecars, legacy, (p) => !isClone(p));
322
322
  return sidecars;
323
323
  }
324
324
  function resolveSidecarPaths(slug) {
325
325
  const rootDir = getSidecarRoot();
326
- const sidecarDir = path15.join(rootDir, slug);
326
+ const sidecarDir = path16.join(rootDir, slug);
327
327
  return {
328
328
  rootDir,
329
329
  sidecarDir,
330
- manifestFile: path15.join(sidecarDir, "skaile.manifest.yaml"),
331
- readmeFile: path15.join(sidecarDir, "README.md"),
332
- lockFile: path15.join(sidecarDir, "skaile.manifest.lock.json")
330
+ manifestFile: path16.join(sidecarDir, "skaile.manifest.yaml"),
331
+ readmeFile: path16.join(sidecarDir, "README.md"),
332
+ lockFile: path16.join(sidecarDir, "skaile.manifest.lock.json")
333
333
  };
334
334
  }
335
335
  function deriveSlug(sourceConfig, sourcePath, existingSlugs) {
336
336
  const fromConfig = sourceConfig && typeof sourceConfig.name === "string" ? sourceConfig.name : void 0;
337
- const base = fromConfig && fromConfig.length > 0 ? slugify(fromConfig) : slugify(path15.basename(sourcePath || "")) || "unnamed-source";
337
+ const base = fromConfig && fromConfig.length > 0 ? slugify(fromConfig) : slugify(path16.basename(sourcePath || "")) || "unnamed-source";
338
338
  const taken = new Set(existingSlugs);
339
339
  if (!taken.has(base)) return base;
340
340
  for (let i = 2; i < 1e3; i++) {
@@ -345,9 +345,9 @@ function deriveSlug(sourceConfig, sourcePath, existingSlugs) {
345
345
  }
346
346
  function listSidecarSlugsOnDisk() {
347
347
  const root = getSidecarRoot();
348
- if (!fs10.existsSync(root)) return [];
348
+ if (!fs11.existsSync(root)) return [];
349
349
  const out = [];
350
- for (const entry of fs10.readdirSync(root, { withFileTypes: true })) {
350
+ for (const entry of fs11.readdirSync(root, { withFileTypes: true })) {
351
351
  if (!entry.isDirectory()) continue;
352
352
  if (entry.name.startsWith(".")) continue;
353
353
  out.push(entry.name);
@@ -360,28 +360,28 @@ function slugify(input) {
360
360
 
361
361
  // library/src/local/store-paths.ts
362
362
  function getStoreRoot() {
363
- return path15.join(globalSkaileDir(), "store");
363
+ return path16.join(globalSkaileDir(), "store");
364
364
  }
365
365
  function getStoreManifestsDir() {
366
- return path15.join(getStoreRoot(), "manifests");
366
+ return path16.join(getStoreRoot(), "manifests");
367
367
  }
368
368
  function curatedManifestOverlay(sourceUrl) {
369
- const file = path15.join(getStoreManifestsDir(), `${storeManifestSlug(sourceUrl)}.yaml`);
370
- return fs10.existsSync(file) ? file : void 0;
369
+ const file = path16.join(getStoreManifestsDir(), `${storeManifestSlug(sourceUrl)}.yaml`);
370
+ return fs11.existsSync(file) ? file : void 0;
371
371
  }
372
372
  function migratedMarkerPath() {
373
- return path15.join(getStoreRoot(), ".migrated");
373
+ return path16.join(getStoreRoot(), ".migrated");
374
374
  }
375
375
  function collectSidecarMigrationCandidates(sidecarRoot) {
376
376
  const candidates = [];
377
- if (fs10.existsSync(sidecarRoot)) {
378
- for (const entry of fs10.readdirSync(sidecarRoot, { withFileTypes: true })) {
377
+ if (fs11.existsSync(sidecarRoot)) {
378
+ for (const entry of fs11.readdirSync(sidecarRoot, { withFileTypes: true })) {
379
379
  if (!entry.isDirectory()) continue;
380
380
  if (entry.name.startsWith(".")) continue;
381
- const sidecarDir = path15.join(sidecarRoot, entry.name);
382
- const current = path15.join(sidecarDir, "skaile.manifest.yaml");
383
- const legacy = path15.join(sidecarDir, ".skaile-source.yaml");
384
- const src = fs10.existsSync(current) ? current : fs10.existsSync(legacy) ? legacy : void 0;
381
+ const sidecarDir = path16.join(sidecarRoot, entry.name);
382
+ const current = path16.join(sidecarDir, "skaile.manifest.yaml");
383
+ const legacy = path16.join(sidecarDir, ".skaile-source.yaml");
384
+ const src = fs11.existsSync(current) ? current : fs11.existsSync(legacy) ? legacy : void 0;
385
385
  if (src) candidates.push({ src, slug: entry.name });
386
386
  }
387
387
  }
@@ -390,10 +390,10 @@ function collectSidecarMigrationCandidates(sidecarRoot) {
390
390
  function moveSidecarManifests(candidates, manifestsDir) {
391
391
  let migrated = 0;
392
392
  for (const { src, slug } of candidates) {
393
- const dest = path15.join(manifestsDir, `${slug}.yaml`);
394
- if (fs10.existsSync(dest)) continue;
393
+ const dest = path16.join(manifestsDir, `${slug}.yaml`);
394
+ if (fs11.existsSync(dest)) continue;
395
395
  try {
396
- fs10.renameSync(src, dest);
396
+ fs11.renameSync(src, dest);
397
397
  migrated++;
398
398
  } catch (err) {
399
399
  process.stderr.write(
@@ -405,11 +405,11 @@ function moveSidecarManifests(candidates, manifestsDir) {
405
405
  return migrated;
406
406
  }
407
407
  function initStoreGitRepo(storeRoot) {
408
- if (fs10.existsSync(path15.join(storeRoot, ".git"))) return;
408
+ if (fs11.existsSync(path16.join(storeRoot, ".git"))) return;
409
409
  try {
410
410
  spawnSync("git", ["init", "--quiet"], { cwd: storeRoot, stdio: "ignore" });
411
- fs10.writeFileSync(
412
- path15.join(storeRoot, ".gitignore"),
411
+ fs11.writeFileSync(
412
+ path16.join(storeRoot, ".gitignore"),
413
413
  "# Remote-store cache \u2014 local to this machine.\nremote-cache/\n",
414
414
  "utf8"
415
415
  );
@@ -419,14 +419,14 @@ function initStoreGitRepo(storeRoot) {
419
419
  function migrateSidecarsToStoreIfNeeded() {
420
420
  const storeRoot = getStoreRoot();
421
421
  const marker = migratedMarkerPath();
422
- if (fs10.existsSync(marker)) return { migrated: 0, storeRoot };
422
+ if (fs11.existsSync(marker)) return { migrated: 0, storeRoot };
423
423
  const sidecarRoot = getSidecarRoot();
424
424
  const manifestsDir = getStoreManifestsDir();
425
425
  const candidates = collectSidecarMigrationCandidates(sidecarRoot);
426
- fs10.mkdirSync(manifestsDir, { recursive: true });
426
+ fs11.mkdirSync(manifestsDir, { recursive: true });
427
427
  const migrated = moveSidecarManifests(candidates, manifestsDir);
428
428
  initStoreGitRepo(storeRoot);
429
- fs10.writeFileSync(marker, (/* @__PURE__ */ new Date()).toISOString(), "utf8");
429
+ fs11.writeFileSync(marker, (/* @__PURE__ */ new Date()).toISOString(), "utf8");
430
430
  return { migrated, storeRoot };
431
431
  }
432
432
 
@@ -507,7 +507,7 @@ async function librariesPresent(client) {
507
507
  return rs.rows.length > 0;
508
508
  }
509
509
  function slugify2(p) {
510
- const base = path15.basename(p) || "lib";
510
+ const base = path16.basename(p) || "lib";
511
511
  return base.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-|-$/g, "") || "lib";
512
512
  }
513
513
  async function runLibrariesMigration(client) {
@@ -671,23 +671,23 @@ async function purgeOrphanedAssetDefinitions(client) {
671
671
  await client.execute(`PRAGMA user_version = ${ORPHAN_PURGE_VERSION}`);
672
672
  }
673
673
  function assertNoLegacyLibDb(newDbPath) {
674
- if (fs10.existsSync(newDbPath)) return;
675
- const parent = path15.dirname(newDbPath);
674
+ if (fs11.existsSync(newDbPath)) return;
675
+ const parent = path16.dirname(newDbPath);
676
676
  const skaileHome = globalSkaileDir();
677
- const defaultIndexPath2 = path15.join(skaileHome, "index.db");
677
+ const defaultIndexPath2 = path16.join(skaileHome, "index.db");
678
678
  const candidates = [];
679
- if (path15.basename(newDbPath) === "index.db") {
680
- candidates.push(path15.join(parent, "lib.db"));
679
+ if (path16.basename(newDbPath) === "index.db") {
680
+ candidates.push(path16.join(parent, "lib.db"));
681
681
  }
682
682
  if (newDbPath === defaultIndexPath2) {
683
- candidates.push(path15.join(skaileHome, "libraries", "lib.db"));
684
- candidates.push(path15.join(skaileHome, "library", "lib.db"));
683
+ candidates.push(path16.join(skaileHome, "libraries", "lib.db"));
684
+ candidates.push(path16.join(skaileHome, "library", "lib.db"));
685
685
  }
686
- if (path15.basename(parent) === "libraries") {
687
- candidates.push(path15.join(path15.dirname(parent), "library", "lib.db"));
686
+ if (path16.basename(parent) === "libraries") {
687
+ candidates.push(path16.join(path16.dirname(parent), "library", "lib.db"));
688
688
  }
689
689
  for (const legacy of candidates) {
690
- if (!fs10.existsSync(legacy)) continue;
690
+ if (!fs11.existsSync(legacy)) continue;
691
691
  throw new Error(
692
692
  `Found legacy index database at ${legacy}. The lib.db \u2192 index.db relocation ran for one release and has been removed. Move the file manually to ${newDbPath} (and any -wal / -shm siblings), then retry.`
693
693
  );
@@ -846,26 +846,26 @@ var LocalIndex = class {
846
846
  let dbPath;
847
847
  if (typeof optionsOrDir === "string") {
848
848
  dir = optionsOrDir;
849
- dbPath = path15.join(dir, "index.db");
849
+ dbPath = path16.join(dir, "index.db");
850
850
  } else if (optionsOrDir?.indexPath) {
851
851
  dbPath = optionsOrDir.indexPath;
852
852
  dir = optionsOrDir.libraryDir ?? resolveLibraryDir();
853
853
  this._kindRegistry = optionsOrDir.kindRegistry;
854
854
  } else if (optionsOrDir?.libraryDir) {
855
855
  dir = optionsOrDir.libraryDir;
856
- dbPath = path15.join(dir, "index.db");
856
+ dbPath = path16.join(dir, "index.db");
857
857
  this._kindRegistry = optionsOrDir.kindRegistry;
858
858
  } else {
859
859
  dir = resolveLibraryDir();
860
860
  dbPath = resolveIndexPath();
861
861
  this._kindRegistry = optionsOrDir?.kindRegistry;
862
862
  }
863
- if (!fs10.existsSync(dir)) {
864
- fs10.mkdirSync(dir, { recursive: true });
863
+ if (!fs11.existsSync(dir)) {
864
+ fs11.mkdirSync(dir, { recursive: true });
865
865
  }
866
- const dbParent = path15.dirname(dbPath);
867
- if (!fs10.existsSync(dbParent)) {
868
- fs10.mkdirSync(dbParent, { recursive: true });
866
+ const dbParent = path16.dirname(dbPath);
867
+ if (!fs11.existsSync(dbParent)) {
868
+ fs11.mkdirSync(dbParent, { recursive: true });
869
869
  }
870
870
  this.libraryDir = dir;
871
871
  this.dbPath = dbPath;
@@ -990,7 +990,7 @@ var LocalIndex = class {
990
990
  * Delete this library's cached asset defs whose ref is not in `keepRefs`.
991
991
  * Makes a sync authoritative: a def re-keyed under a new publisher (e.g.
992
992
  * `@skills/x` → `@acme/x`) leaves no stale duplicate behind. Returns the
993
- * number of rows removed.
993
+ * ids of the rows removed.
994
994
  *
995
995
  * Not on the IAssetIndex interface — used by catalog sources.
996
996
  */
@@ -1004,7 +1004,7 @@ var LocalIndex = class {
1004
1004
  and(eq(assetDefinitions.libraryId, libraryId), eq(assetDefinitions.id, id))
1005
1005
  ).run();
1006
1006
  }
1007
- return stale.length;
1007
+ return stale;
1008
1008
  }
1009
1009
  async getAssetDef(ref) {
1010
1010
  const db = await this.ensureDb();
@@ -1085,7 +1085,7 @@ var LocalIndex = class {
1085
1085
  * @returns The created Instance plus its on-disk install path.
1086
1086
  */
1087
1087
  async install(manifest, opts) {
1088
- const libraryRoot = opts?.libraryRoot ?? path15.join(this.libraryDir, GLOBAL_INSTALL_DIR_NAME);
1088
+ const libraryRoot = opts?.libraryRoot ?? path16.join(this.libraryDir, GLOBAL_INSTALL_DIR_NAME);
1089
1089
  const { installPath } = await installFromManifest({
1090
1090
  manifest,
1091
1091
  libraryRoot,
@@ -1206,6 +1206,113 @@ var LocalIndex = class {
1206
1206
  return (await db.select().from(assignments).where(eq(assignments.instanceId, instanceId)).all()).map(rowToAssignment);
1207
1207
  }
1208
1208
  };
1209
+ var UNREGISTERED_FILE = ".unregistered-libraries";
1210
+ function libraryDirMissing(lib) {
1211
+ try {
1212
+ return !fs11.statSync(lib.path).isDirectory();
1213
+ } catch {
1214
+ return true;
1215
+ }
1216
+ }
1217
+ function missingLibraryDirMessage(lib) {
1218
+ return `library "${lib.name}" is registered but its directory ${lib.path} is missing - run skaile library init ${lib.name} --path <dir> or skaile library remove ${lib.name}`;
1219
+ }
1220
+ function realDir(dir) {
1221
+ try {
1222
+ return fs11.realpathSync(dir);
1223
+ } catch {
1224
+ return path16.resolve(dir);
1225
+ }
1226
+ }
1227
+ function unregisteredLibraryNames() {
1228
+ try {
1229
+ return new Set(
1230
+ fs11.readFileSync(path16.join(resolveLibraryDir(), UNREGISTERED_FILE), "utf8").split("\n").map((l) => l.trim()).filter(Boolean)
1231
+ );
1232
+ } catch {
1233
+ return /* @__PURE__ */ new Set();
1234
+ }
1235
+ }
1236
+ function markLibraryUnregistered(lib) {
1237
+ if (realDir(path16.dirname(lib.path)) !== realDir(resolveLibraryDir())) return;
1238
+ const known = unregisteredLibraryNames();
1239
+ const add = [.../* @__PURE__ */ new Set([lib.name, path16.basename(lib.path)])].filter((n) => !known.has(n));
1240
+ if (add.length === 0) return;
1241
+ fs11.mkdirSync(resolveLibraryDir(), { recursive: true });
1242
+ fs11.appendFileSync(
1243
+ path16.join(resolveLibraryDir(), UNREGISTERED_FILE),
1244
+ `${add.join("\n")}
1245
+ `,
1246
+ "utf8"
1247
+ );
1248
+ }
1249
+ function clearLibraryUnregistered(lib) {
1250
+ const known = unregisteredLibraryNames();
1251
+ if (known.size === 0) return;
1252
+ const drop = /* @__PURE__ */ new Set([lib.name]);
1253
+ if (realDir(path16.dirname(lib.path)) === realDir(resolveLibraryDir())) {
1254
+ drop.add(path16.basename(lib.path));
1255
+ }
1256
+ const keep = [...known].filter((n) => !drop.has(n));
1257
+ if (keep.length === known.size) return;
1258
+ const file = path16.join(resolveLibraryDir(), UNREGISTERED_FILE);
1259
+ if (keep.length === 0) fs11.rmSync(file, { force: true });
1260
+ else fs11.writeFileSync(file, `${keep.join("\n")}
1261
+ `, "utf8");
1262
+ }
1263
+ var RENAMED_FILE = ".renamed-libraries";
1264
+ function readRenames() {
1265
+ const out = /* @__PURE__ */ new Map();
1266
+ try {
1267
+ for (const line of fs11.readFileSync(path16.join(resolveLibraryDir(), RENAMED_FILE), "utf8").split("\n")) {
1268
+ const [from, to] = line.split(" ").map((s) => s.trim());
1269
+ if (from && to && from !== to) out.set(from, to);
1270
+ }
1271
+ } catch {
1272
+ }
1273
+ return out;
1274
+ }
1275
+ function writeRenames(renames) {
1276
+ const file = path16.join(resolveLibraryDir(), RENAMED_FILE);
1277
+ if (renames.size === 0) {
1278
+ fs11.rmSync(file, { force: true });
1279
+ return;
1280
+ }
1281
+ fs11.mkdirSync(resolveLibraryDir(), { recursive: true });
1282
+ fs11.writeFileSync(
1283
+ file,
1284
+ `${[...renames].map(([from, to]) => `${from} ${to}`).join("\n")}
1285
+ `,
1286
+ "utf8"
1287
+ );
1288
+ }
1289
+ function recordLibraryRename(from, to) {
1290
+ if (from === to) return;
1291
+ const renames = readRenames();
1292
+ for (const [k, v] of renames) if (v === from) renames.set(k, to);
1293
+ renames.delete(to);
1294
+ renames.set(from, to);
1295
+ for (const [k, v] of renames) if (k === v) renames.delete(k);
1296
+ writeRenames(renames);
1297
+ }
1298
+ function renamedLibraryName(name) {
1299
+ return readRenames().get(name);
1300
+ }
1301
+ function clearLibraryRenamed(name) {
1302
+ const renames = readRenames();
1303
+ if (renames.delete(name)) writeRenames(renames);
1304
+ }
1305
+ function dropLibraryRenamesTo(name) {
1306
+ const renames = readRenames();
1307
+ let changed = false;
1308
+ for (const [from, to] of renames) {
1309
+ if (to === name) {
1310
+ renames.delete(from);
1311
+ changed = true;
1312
+ }
1313
+ }
1314
+ if (changed) writeRenames(renames);
1315
+ }
1209
1316
 
1210
1317
  // library/src/user-library.ts
1211
1318
  var LIBRARY_BACKENDS = ["local", "git"];
@@ -1242,7 +1349,7 @@ function git(cwd, args) {
1242
1349
  return spawnSync("git", args, { cwd, encoding: "utf-8" });
1243
1350
  }
1244
1351
  function isGitRepo(libPath) {
1245
- return existsSync(path15.join(libPath, ".git"));
1352
+ return existsSync(path16.join(libPath, ".git"));
1246
1353
  }
1247
1354
  function spawnGit(cwd, args, action) {
1248
1355
  const r = git(cwd, args);
@@ -1312,6 +1419,31 @@ function headCommit(cwd) {
1312
1419
  const r = git(cwd, ["rev-parse", "--verify", "--quiet", "HEAD"]);
1313
1420
  return r.status === 0 ? r.stdout.trim() : void 0;
1314
1421
  }
1422
+ function rebaseInProgress(cwd) {
1423
+ for (const entry of ["rebase-merge", "rebase-apply"]) {
1424
+ const p = git(cwd, ["rev-parse", "--git-path", entry]);
1425
+ if (p.status === 0 && existsSync(path16.resolve(cwd, p.stdout.trim()))) return true;
1426
+ }
1427
+ return false;
1428
+ }
1429
+ var REBASE_IN_PROGRESS = "rebase in progress; finish it with git rebase --continue";
1430
+ var MERGE_IN_PROGRESS = "merge in progress; resolve the conflicts, then git commit";
1431
+ function mergeInProgress(cwd) {
1432
+ const head = git(cwd, ["rev-parse", "--git-path", "MERGE_HEAD"]);
1433
+ if (head.status === 0 && existsSync(path16.resolve(cwd, head.stdout.trim()))) return true;
1434
+ const unmerged = git(cwd, ["ls-files", "--unmerged"]);
1435
+ return unmerged.status === 0 && unmerged.stdout.trim() !== "";
1436
+ }
1437
+ function assertLibraryDir(lib) {
1438
+ if (libraryDirMissing(lib)) {
1439
+ throw new LibrarySyncError(missingLibraryDirMessage(lib), "library_dir_missing");
1440
+ }
1441
+ }
1442
+ function assertNoRebase(lib) {
1443
+ assertLibraryDir(lib);
1444
+ if (rebaseInProgress(lib.path)) throw new LibrarySyncError(REBASE_IN_PROGRESS, "remote_error");
1445
+ if (mergeInProgress(lib.path)) throw new LibrarySyncError(MERGE_IN_PROGRESS, "remote_error");
1446
+ }
1315
1447
  function ok(r, action) {
1316
1448
  if (r.status !== 0) {
1317
1449
  throw new LibrarySyncError(
@@ -1328,6 +1460,13 @@ var GitSyncDriver = class {
1328
1460
  backend = "git";
1329
1461
  async status(lib) {
1330
1462
  const cfg = gitCfg(lib);
1463
+ if (libraryDirMissing(lib)) {
1464
+ return {
1465
+ reachable: false,
1466
+ localChanges: { added: [], modified: [], deleted: [] },
1467
+ notes: [missingLibraryDirMessage(lib)]
1468
+ };
1469
+ }
1331
1470
  const porcelain = git(lib.path, ["status", "--porcelain"]);
1332
1471
  if (porcelain.status !== 0) {
1333
1472
  return {
@@ -1369,6 +1508,7 @@ var GitSyncDriver = class {
1369
1508
  };
1370
1509
  }
1371
1510
  async pull(lib, opts) {
1511
+ assertNoRebase(lib);
1372
1512
  const cfg = gitCfg(lib);
1373
1513
  const args = ["pull", "--ff-only", "origin", cfg.branch];
1374
1514
  if (opts?.rebase) args.splice(1, 1, "--rebase");
@@ -1398,6 +1538,14 @@ var GitSyncDriver = class {
1398
1538
  ]
1399
1539
  };
1400
1540
  }
1541
+ if (/would be overwritten by (merge|checkout)|unstaged changes|uncommitted changes|commit your changes or stash/i.test(
1542
+ r.stderr
1543
+ )) {
1544
+ throw new LibrarySyncError(
1545
+ `uncommitted changes in ${lib.name}; commit or stash them first`,
1546
+ "remote_error"
1547
+ );
1548
+ }
1401
1549
  throw new LibrarySyncError(`git pull failed: ${r.stderr.trim()}`, "remote_error");
1402
1550
  }
1403
1551
  const upstream = `refs/remotes/origin/${cfg.branch}`;
@@ -1411,11 +1559,27 @@ var GitSyncDriver = class {
1411
1559
  `library "${lib.name}" has ownership=${lib.ownership}; use \`propose\` instead`
1412
1560
  );
1413
1561
  }
1562
+ assertNoRebase(lib);
1414
1563
  const cfg = gitCfg(lib);
1415
1564
  const args = ["push", "origin", cfg.branch];
1416
1565
  if (opts?.force) args.push("--force-with-lease");
1566
+ const countRef = "refs/skaile/push-base";
1567
+ const trackingRef = `refs/remotes/origin/${cfg.branch}`;
1568
+ git(lib.path, ["update-ref", "-d", countRef]);
1569
+ const fetched = spawnSync(
1570
+ "git",
1571
+ ["fetch", "--quiet", "origin", `+refs/heads/${cfg.branch}:${countRef}`],
1572
+ {
1573
+ cwd: lib.path,
1574
+ encoding: "utf-8",
1575
+ env: { ...process.env, GIT_TERMINAL_PROMPT: "0" }
1576
+ }
1577
+ );
1578
+ const remoteHasNoBranch = /couldn't find remote ref/i.test(fetched.stderr ?? "");
1579
+ const baseRef = fetched.status === 0 || remoteHasNoBranch ? countRef : trackingRef;
1417
1580
  const local = `refs/heads/${cfg.branch}`;
1418
- const pushed = countCommits(lib.path, `refs/remotes/origin/${cfg.branch}..${local}`) ?? countCommits(lib.path, local) ?? 0;
1581
+ const pushed = countCommits(lib.path, `${baseRef}..${local}`) ?? countCommits(lib.path, local) ?? 0;
1582
+ git(lib.path, ["update-ref", "-d", countRef]);
1419
1583
  const pushRes = git(lib.path, args);
1420
1584
  if (pushRes.status !== 0 && /non-fast-forward|fetch first|updates were rejected/i.test(pushRes.stderr)) {
1421
1585
  throw new LibrarySyncError(
@@ -1433,6 +1597,7 @@ var GitSyncDriver = class {
1433
1597
  `propose requires ownership=contributor; got ${lib.ownership}`
1434
1598
  );
1435
1599
  }
1600
+ assertLibraryDir(lib);
1436
1601
  const cfg = gitCfg(lib);
1437
1602
  const branch = opts.branch ?? `skaile/${(/* @__PURE__ */ new Date()).toISOString().replace(/[-:.TZ]/g, "").slice(0, 14)}`;
1438
1603
  const remotes = ok(git(lib.path, ["remote"]), "remote-list").split("\n");
@@ -1528,7 +1693,13 @@ function rowToLibrary2(row) {
1528
1693
  };
1529
1694
  }
1530
1695
  var LIBRARY_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
1696
+ var MAX_LIBRARY_NAME_LENGTH = 64;
1531
1697
  function assertValidLibraryName(name) {
1698
+ if (name.length > MAX_LIBRARY_NAME_LENGTH) {
1699
+ throw new Error(
1700
+ `Invalid library name (${name.length} characters): at most ${MAX_LIBRARY_NAME_LENGTH} characters.`
1701
+ );
1702
+ }
1532
1703
  if (!LIBRARY_NAME_PATTERN.test(name)) {
1533
1704
  throw new Error(
1534
1705
  `Invalid library name "${name}": use letters, digits, "_" or "-", starting with a letter or digit.`
@@ -1573,6 +1744,8 @@ var LibraryManager = class {
1573
1744
  createdAt: now,
1574
1745
  updatedAt: now
1575
1746
  }).run();
1747
+ clearLibraryUnregistered({ name: input.name, path: input.path });
1748
+ clearLibraryRenamed(input.name);
1576
1749
  return this.requireLibrary(id);
1577
1750
  }
1578
1751
  async listLibraries() {
@@ -1593,6 +1766,19 @@ var LibraryManager = class {
1593
1766
  if (!lib) throw new UserLibraryNotFoundError(nameOrId);
1594
1767
  return lib;
1595
1768
  }
1769
+ /**
1770
+ * {@link requireLibrary}, then refuse a library whose registered directory is gone: one line
1771
+ * that names the path and the two ways out. For every verb that reads or writes the files.
1772
+ *
1773
+ * @throws LibrarySyncError (`library_dir_missing`) when the directory does not exist.
1774
+ */
1775
+ async requireLibraryDir(nameOrId) {
1776
+ const lib = await this.requireLibrary(nameOrId);
1777
+ if (libraryDirMissing(lib)) {
1778
+ throw new LibrarySyncError(missingLibraryDirMessage(lib), "library_dir_missing");
1779
+ }
1780
+ return lib;
1781
+ }
1596
1782
  async updateLibrary(nameOrId, patch) {
1597
1783
  const lib = await this.requireLibrary(nameOrId);
1598
1784
  if (patch.name !== void 0 && patch.name !== lib.name) assertValidLibraryName(patch.name);
@@ -1610,6 +1796,9 @@ var LibraryManager = class {
1610
1796
  if (patch.isDefault !== void 0) updates.isDefault = patch.isDefault;
1611
1797
  if (patch.lastSyncAt !== void 0) updates.lastSyncAt = patch.lastSyncAt.toISOString();
1612
1798
  await db.update(libraries).set(updates).where(eq(libraries.id, lib.id)).run();
1799
+ if (patch.name !== void 0 && patch.name !== lib.name) {
1800
+ recordLibraryRename(lib.name, patch.name);
1801
+ }
1613
1802
  return this.requireLibrary(lib.id);
1614
1803
  }
1615
1804
  /**
@@ -1635,9 +1824,11 @@ var LibraryManager = class {
1635
1824
  async removeLibrary(nameOrId, opts = {}) {
1636
1825
  const lib = await this.requireLibrary(nameOrId);
1637
1826
  await this.lib.removeSource(lib.id);
1638
- if (opts.purge && fs10.existsSync(lib.path)) {
1639
- fs10.rmSync(lib.path, { recursive: true, force: true });
1827
+ if (opts.purge && fs11.existsSync(lib.path)) {
1828
+ fs11.rmSync(lib.path, { recursive: true, force: true });
1640
1829
  }
1830
+ dropLibraryRenamesTo(lib.name);
1831
+ if (!opts.purge) markLibraryUnregistered(lib);
1641
1832
  }
1642
1833
  /**
1643
1834
  * Idempotently ensure a `personal` library exists at `<librariesDir>/personal`.
@@ -1652,8 +1843,8 @@ var LibraryManager = class {
1652
1843
  (l) => l.isDefault && (l.ownership === "owner" || l.ownership === "contributor")
1653
1844
  );
1654
1845
  if (writableDefault) return { library: writableDefault, created: false };
1655
- const personalPath = path15.join(librariesDir, "personal");
1656
- fs10.mkdirSync(personalPath, { recursive: true });
1846
+ const personalPath = path16.join(librariesDir, "personal");
1847
+ fs11.mkdirSync(personalPath, { recursive: true });
1657
1848
  const lib = await this.addLibrary({
1658
1849
  name: "personal",
1659
1850
  path: personalPath,
@@ -1684,7 +1875,7 @@ function describeSyncError(err) {
1684
1875
  return parts.join(": ");
1685
1876
  }
1686
1877
  function scanLibraryRoot(rootPath, registry, scanOpts) {
1687
- const fallbackPublisher = resolveSourcePublisher(rootPath) ?? (path15.basename(rootPath) || "unknown");
1878
+ const fallbackPublisher = resolveSourcePublisher(rootPath) ?? (path16.basename(rootPath) || "unknown");
1688
1879
  const opts = {
1689
1880
  registry,
1690
1881
  sidecarManifestFile: scanOpts?.sidecarManifestFile,
@@ -1783,7 +1974,9 @@ var LocalCatalogSource = class {
1783
1974
  async sync(syncOpts) {
1784
1975
  const result = this.scan(syncOpts);
1785
1976
  const exclude = syncOpts?.exclude;
1786
- const assets = exclude ? result.assets.filter((a) => !exclude(a)) : result.assets;
1977
+ const only = syncOpts?.only;
1978
+ const kept = exclude ? result.assets.filter((a) => !exclude(a)) : result.assets;
1979
+ const assets = only ? kept.filter((a) => only.has(a.ref)) : kept;
1787
1980
  let assetsUpdated = 0;
1788
1981
  const errors = [];
1789
1982
  const softDepsByRef = /* @__PURE__ */ new Map();
@@ -1835,8 +2028,11 @@ var LocalCatalogSource = class {
1835
2028
  );
1836
2029
  }
1837
2030
  const keepRefs = assets.map((a) => a.ref);
1838
- if (result.assets.length > 0) await this.library.pruneAssetDefs(this.sourceId, keepRefs);
1839
- return { assetsFound: assets.length, assetsUpdated, errors, advisories };
2031
+ let pruned = [];
2032
+ if (!syncOpts?.only && result.assets.length > 0) {
2033
+ pruned = await this.library.pruneAssetDefs(this.sourceId, keepRefs);
2034
+ }
2035
+ return { assetsFound: assets.length, assetsUpdated, errors, advisories, pruned };
1840
2036
  }
1841
2037
  };
1842
2038
  function defToCatalogAsset(def) {
@@ -1913,7 +2109,7 @@ function installLibraryAsset(opts) {
1913
2109
  }
1914
2110
  function authoringLibraries(libs) {
1915
2111
  const newRoot = getGlobalCacheDir();
1916
- const legacyRoot = path15.join(globalSkaileDir(), "sources");
2112
+ const legacyRoot = path16.join(globalSkaileDir(), "sources");
1917
2113
  return libs.filter((l) => !l.path.startsWith(newRoot) && !l.path.startsWith(legacyRoot));
1918
2114
  }
1919
2115
  async function scanAuthoringLibraries(index, registry) {
@@ -1975,21 +2171,21 @@ var SidecarGit = class {
1975
2171
  * @docLink packages/library/concepts#sidecar-git
1976
2172
  */
1977
2173
  async ensureInitialized() {
1978
- if (!fs10.existsSync(this.rootDir)) {
1979
- fs10.mkdirSync(this.rootDir, { recursive: true });
2174
+ if (!fs11.existsSync(this.rootDir)) {
2175
+ fs11.mkdirSync(this.rootDir, { recursive: true });
1980
2176
  }
1981
- const gitDir = path15.join(this.rootDir, ".git");
1982
- const freshRepo = !fs10.existsSync(gitDir);
2177
+ const gitDir = path16.join(this.rootDir, ".git");
2178
+ const freshRepo = !fs11.existsSync(gitDir);
1983
2179
  if (freshRepo) {
1984
2180
  const init = this.spawn(["init", "-b", "main"]);
1985
2181
  if (init.exitCode !== 0) {
1986
2182
  throw new Error(`git init failed: ${init.stderr || init.stdout}`);
1987
2183
  }
1988
2184
  }
1989
- const attrsPath = path15.join(this.rootDir, ".gitattributes");
1990
- if (!fs10.existsSync(attrsPath)) fs10.writeFileSync(attrsPath, GITATTRIBUTES, "utf-8");
1991
- const readmePath = path15.join(this.rootDir, "README.md");
1992
- if (!fs10.existsSync(readmePath)) fs10.writeFileSync(readmePath, ROOT_README, "utf-8");
2185
+ const attrsPath = path16.join(this.rootDir, ".gitattributes");
2186
+ if (!fs11.existsSync(attrsPath)) fs11.writeFileSync(attrsPath, GITATTRIBUTES, "utf-8");
2187
+ const readmePath = path16.join(this.rootDir, "README.md");
2188
+ if (!fs11.existsSync(readmePath)) fs11.writeFileSync(readmePath, ROOT_README, "utf-8");
1993
2189
  if (!this.hasGlobalGitConfig("user.name")) {
1994
2190
  this.spawn(["config", "user.name", FALLBACK_USER_NAME]);
1995
2191
  }
@@ -2014,8 +2210,8 @@ var SidecarGit = class {
2014
2210
  */
2015
2211
  async commit(slug, message, opts) {
2016
2212
  if (opts?.skip) return;
2017
- const slugDir = path15.join(this.rootDir, slug);
2018
- if (fs10.existsSync(slugDir)) {
2213
+ const slugDir = path16.join(this.rootDir, slug);
2214
+ if (fs11.existsSync(slugDir)) {
2019
2215
  this.spawn(["add", "--", slug]);
2020
2216
  } else {
2021
2217
  this.spawn(["add", "-A"]);
@@ -2075,11 +2271,11 @@ ${result.stderr}`;
2075
2271
  };
2076
2272
  function migrateWorkspaceConfig(dir, opts) {
2077
2273
  const filename = opts?.filename ?? "skaile.yaml";
2078
- const filePath = path15.join(dir, filename);
2079
- if (!fs10.existsSync(filePath)) {
2274
+ const filePath = path16.join(dir, filename);
2275
+ if (!fs11.existsSync(filePath)) {
2080
2276
  return { migrated: false, version: 1, warnings: ["No skaile.yaml found"] };
2081
2277
  }
2082
- const content = fs10.readFileSync(filePath, "utf-8");
2278
+ const content = fs11.readFileSync(filePath, "utf-8");
2083
2279
  const raw = parse(content);
2084
2280
  if (!raw || typeof raw !== "object") {
2085
2281
  return { migrated: false, version: 1, warnings: ["Invalid YAML content"] };
@@ -2111,7 +2307,7 @@ function migrateWorkspaceConfig(dir, opts) {
2111
2307
  } else {
2112
2308
  doc.set("version", 2);
2113
2309
  }
2114
- fs10.writeFileSync(filePath, doc.toString(), "utf-8");
2310
+ fs11.writeFileSync(filePath, doc.toString(), "utf-8");
2115
2311
  }
2116
2312
  return {
2117
2313
  migrated: !opts?.dryRun,
@@ -2300,8 +2496,8 @@ function resolveTemplate(template, context) {
2300
2496
  });
2301
2497
  return { value: result, hasSecret: false };
2302
2498
  }
2303
- function setNestedValue(obj, path17, value) {
2304
- const parts = path17.split(".");
2499
+ function setNestedValue(obj, path18, value) {
2500
+ const parts = path18.split(".");
2305
2501
  let current = obj;
2306
2502
  for (let i = 0; i < parts.length - 1; i++) {
2307
2503
  const key = parts[i];
@@ -2906,8 +3102,8 @@ function deepEqual(a, b) {
2906
3102
  function defaultCatalogCacheDir() {
2907
3103
  const home = globalSkaileDir();
2908
3104
  return migrateLegacyDir(
2909
- path15.join(globalCacheRoot(), "catalog"),
2910
- path15.join(home, "catalog-cache")
3105
+ path16.join(globalCacheRoot(), "catalog"),
3106
+ path16.join(home, "catalog-cache")
2911
3107
  );
2912
3108
  }
2913
3109
  var INDEX_FILE = "index.json";
@@ -2916,11 +3112,13 @@ var CatalogCache = class {
2916
3112
  dir;
2917
3113
  ttlMs;
2918
3114
  nowFn;
3115
+ scopePrefix;
2919
3116
  index = null;
2920
3117
  constructor(opts) {
2921
3118
  this.dir = opts.dir ?? defaultCatalogCacheDir();
2922
3119
  this.ttlMs = opts.ttlMs;
2923
3120
  this.nowFn = opts.now ?? Date.now;
3121
+ this.scopePrefix = opts.scope === void 0 ? "" : `${scopeHash(opts.scope)}|`;
2924
3122
  this.ensureDir();
2925
3123
  }
2926
3124
  // ── public: resolve cache ───────────────────────────────────────────────
@@ -2931,8 +3129,7 @@ var CatalogCache = class {
2931
3129
  * regardless of `fetchedAt`.
2932
3130
  */
2933
3131
  getResolve(ref) {
2934
- const idx = this.loadIndex();
2935
- const entry = idx.resolve[ref];
3132
+ const entry = this.lookupResolve(ref);
2936
3133
  if (!entry) return null;
2937
3134
  if (this.ttlMs === 0) return entry;
2938
3135
  if (this.nowFn() - entry.fetchedAt > this.ttlMs) return null;
@@ -2942,21 +3139,40 @@ var CatalogCache = class {
2942
3139
  * Return a stale resolve-cache entry regardless of TTL — for stale-while-revalidate.
2943
3140
  */
2944
3141
  getResolveStale(ref) {
2945
- const idx = this.loadIndex();
2946
- return idx.resolve[ref] ?? null;
3142
+ return this.lookupResolve(ref);
2947
3143
  }
2948
- /** Persist a resolve-cache entry (use `null` to negatively cache misses). */
3144
+ /**
3145
+ * Persist a resolve-cache entry (use `null` to negatively cache misses). A found asset
3146
+ * is stored under its canonical ref and shared by every catalog; a miss is only true
3147
+ * of this catalog, so it is stored under the catalog scope.
3148
+ */
2949
3149
  setResolve(ref, value) {
2950
3150
  const idx = this.loadIndex();
2951
- idx.resolve[ref] = { fetchedAt: this.nowFn(), value };
3151
+ const entry = { fetchedAt: this.nowFn(), value };
3152
+ if (value === null) {
3153
+ idx.resolve[this.scopePrefix + ref] = entry;
3154
+ } else {
3155
+ idx.resolve[ref] = entry;
3156
+ if (this.scopePrefix) delete idx.resolve[this.scopePrefix + ref];
3157
+ }
2952
3158
  this.writeIndex(idx);
2953
3159
  }
3160
+ /**
3161
+ * A shared hit, else this catalog's own miss. An unscoped entry holding `null` was
3162
+ * written before misses were scoped and may belong to another catalog: ignore it.
3163
+ */
3164
+ lookupResolve(ref) {
3165
+ const idx = this.loadIndex();
3166
+ const shared = idx.resolve[ref];
3167
+ if (shared && shared.value !== null) return shared;
3168
+ return idx.resolve[this.scopePrefix + ref] ?? null;
3169
+ }
2954
3170
  // ── public: list cache ──────────────────────────────────────────────────
2955
3171
  /**
2956
3172
  * Return a fresh list-cache entry for `filter`, or `null` if absent / stale.
2957
3173
  */
2958
3174
  getList(filter) {
2959
- const key = filterKey(filter);
3175
+ const key = this.scopePrefix + filterKey(filter);
2960
3176
  const idx = this.loadIndex();
2961
3177
  const entry = idx.list[key];
2962
3178
  if (!entry) return null;
@@ -2966,13 +3182,13 @@ var CatalogCache = class {
2966
3182
  }
2967
3183
  /** Return a stale list-cache entry regardless of TTL — for stale-while-revalidate. */
2968
3184
  getListStale(filter) {
2969
- const key = filterKey(filter);
3185
+ const key = this.scopePrefix + filterKey(filter);
2970
3186
  const idx = this.loadIndex();
2971
3187
  return idx.list[key] ?? null;
2972
3188
  }
2973
3189
  /** Persist a list-cache entry. */
2974
3190
  setList(filter, items) {
2975
- const key = filterKey(filter);
3191
+ const key = this.scopePrefix + filterKey(filter);
2976
3192
  const idx = this.loadIndex();
2977
3193
  idx.list[key] = { fetchedAt: this.nowFn(), items };
2978
3194
  this.writeIndex(idx);
@@ -2980,22 +3196,22 @@ var CatalogCache = class {
2980
3196
  // ── public: tarball cache ───────────────────────────────────────────────
2981
3197
  /** Absolute path where a tarball with `sha256` would be cached. */
2982
3198
  tarballPath(sha256) {
2983
- return path15.join(this.dir, TARBALL_DIR, `${sha256}.tgz`);
3199
+ return path16.join(this.dir, TARBALL_DIR, `${sha256}.tgz`);
2984
3200
  }
2985
3201
  /** Read a cached tarball from disk if present, otherwise `null`. */
2986
3202
  readTarball(sha256) {
2987
3203
  const p = this.tarballPath(sha256);
2988
- if (!fs10.existsSync(p)) return null;
2989
- return fs10.readFileSync(p);
3204
+ if (!fs11.existsSync(p)) return null;
3205
+ return fs11.readFileSync(p);
2990
3206
  }
2991
3207
  /** Persist a tarball blob to disk (atomic write). */
2992
3208
  writeTarball(sha256, bytes) {
2993
- const dir = path15.join(this.dir, TARBALL_DIR);
2994
- if (!fs10.existsSync(dir)) fs10.mkdirSync(dir, { recursive: true });
3209
+ const dir = path16.join(this.dir, TARBALL_DIR);
3210
+ if (!fs11.existsSync(dir)) fs11.mkdirSync(dir, { recursive: true });
2995
3211
  const finalPath = this.tarballPath(sha256);
2996
3212
  const tmpPath = `${finalPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
2997
- fs10.writeFileSync(tmpPath, bytes);
2998
- fs10.renameSync(tmpPath, finalPath);
3213
+ fs11.writeFileSync(tmpPath, bytes);
3214
+ fs11.renameSync(tmpPath, finalPath);
2999
3215
  }
3000
3216
  // ── public: invalidation ────────────────────────────────────────────────
3001
3217
  /**
@@ -3014,9 +3230,9 @@ var CatalogCache = class {
3014
3230
  */
3015
3231
  invalidateEverything() {
3016
3232
  this.invalidateAll();
3017
- const tarballDir = path15.join(this.dir, TARBALL_DIR);
3018
- if (fs10.existsSync(tarballDir)) {
3019
- fs10.rmSync(tarballDir, { recursive: true, force: true });
3233
+ const tarballDir = path16.join(this.dir, TARBALL_DIR);
3234
+ if (fs11.existsSync(tarballDir)) {
3235
+ fs11.rmSync(tarballDir, { recursive: true, force: true });
3020
3236
  }
3021
3237
  }
3022
3238
  /** Return whether `ttlMs` is zero (air-gapped mode). */
@@ -3025,22 +3241,22 @@ var CatalogCache = class {
3025
3241
  }
3026
3242
  // ── private ─────────────────────────────────────────────────────────────
3027
3243
  ensureDir() {
3028
- if (!fs10.existsSync(this.dir)) fs10.mkdirSync(this.dir, { recursive: true });
3029
- const tarballDir = path15.join(this.dir, TARBALL_DIR);
3030
- if (!fs10.existsSync(tarballDir)) fs10.mkdirSync(tarballDir, { recursive: true });
3244
+ if (!fs11.existsSync(this.dir)) fs11.mkdirSync(this.dir, { recursive: true });
3245
+ const tarballDir = path16.join(this.dir, TARBALL_DIR);
3246
+ if (!fs11.existsSync(tarballDir)) fs11.mkdirSync(tarballDir, { recursive: true });
3031
3247
  }
3032
3248
  indexPath() {
3033
- return path15.join(this.dir, INDEX_FILE);
3249
+ return path16.join(this.dir, INDEX_FILE);
3034
3250
  }
3035
3251
  loadIndex() {
3036
3252
  if (this.index) return this.index;
3037
3253
  const p = this.indexPath();
3038
- if (!fs10.existsSync(p)) {
3254
+ if (!fs11.existsSync(p)) {
3039
3255
  this.index = { version: 1, resolve: {}, list: {} };
3040
3256
  return this.index;
3041
3257
  }
3042
3258
  try {
3043
- const raw = JSON.parse(fs10.readFileSync(p, "utf-8"));
3259
+ const raw = JSON.parse(fs11.readFileSync(p, "utf-8"));
3044
3260
  if (raw && typeof raw === "object" && raw.version === 1) {
3045
3261
  this.index = {
3046
3262
  version: 1,
@@ -3058,8 +3274,8 @@ var CatalogCache = class {
3058
3274
  this.index = idx;
3059
3275
  const p = this.indexPath();
3060
3276
  const tmp = `${p}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
3061
- fs10.writeFileSync(tmp, JSON.stringify(idx, null, 2), "utf-8");
3062
- fs10.renameSync(tmp, p);
3277
+ fs11.writeFileSync(tmp, JSON.stringify(idx, null, 2), "utf-8");
3278
+ fs11.renameSync(tmp, p);
3063
3279
  }
3064
3280
  };
3065
3281
  function filterKey(filter) {
@@ -3072,6 +3288,9 @@ function filterKey(filter) {
3072
3288
  }
3073
3289
  return Object.keys(norm).length === 0 ? "__all__" : JSON.stringify(norm);
3074
3290
  }
3291
+ function scopeHash(scope) {
3292
+ return crypto.createHash("sha256").update(scope.replace(/\/+$/, "")).digest("hex").slice(0, 16);
3293
+ }
3075
3294
  function sha256Hex(bytes) {
3076
3295
  const h = crypto.createHash("sha256");
3077
3296
  h.update(bytes);
@@ -3124,6 +3343,7 @@ var RemoteCatalogSource = class {
3124
3343
  this.cache = opts.cache ?? new CatalogCache({
3125
3344
  dir: opts.cacheDir,
3126
3345
  ttlMs: this.cacheTtlMs,
3346
+ scope: this.baseUrl,
3127
3347
  now: opts.now
3128
3348
  });
3129
3349
  }
@@ -3564,6 +3784,7 @@ var RestCatalogSource = class {
3564
3784
  this.cache = opts.cache ?? new CatalogCache({
3565
3785
  dir: opts.cacheDir,
3566
3786
  ttlMs: this.cacheTtlMs,
3787
+ scope: this.baseUrl,
3567
3788
  now: opts.now
3568
3789
  });
3569
3790
  }
@@ -3894,7 +4115,7 @@ var defaultFetch2 = async (url, init) => {
3894
4115
  });
3895
4116
  };
3896
4117
  function discoveredToAssetEntry(asset, repoPublisher, inheritPublisher) {
3897
- const root = path15.posix.dirname(asset.relativePath.replace(/\\/g, "/"));
4118
+ const root = path16.posix.dirname(asset.relativePath.replace(/\\/g, "/"));
3898
4119
  const entry = {
3899
4120
  kind: asset.kind,
3900
4121
  name: asset.name,
@@ -3911,22 +4132,22 @@ function discoveredToAssetEntry(asset, repoPublisher, inheritPublisher) {
3911
4132
  }
3912
4133
  function writeCuratedManifest(input) {
3913
4134
  const manifestPath = input.manifestFile;
3914
- if (fs10.existsSync(manifestPath) && !input.force) {
4135
+ if (fs11.existsSync(manifestPath) && !input.force) {
3915
4136
  return { wrote: false, manifestPath, assetCount: 0 };
3916
4137
  }
3917
4138
  const publisher = input.publisher.startsWith("@") ? input.publisher.slice(1) : input.publisher;
3918
4139
  const inheritPublisher = input.inheritPublisher ?? false;
3919
4140
  const assets = input.assets.map((a) => discoveredToAssetEntry(a, publisher, inheritPublisher)).sort((a, b) => `${a.kind}:${a.name}`.localeCompare(`${b.kind}:${b.name}`));
3920
4141
  const manifest = { publisher, assets };
3921
- fs10.mkdirSync(path15.dirname(manifestPath), { recursive: true });
3922
- fs10.writeFileSync(manifestPath, encodeSkaileManifest(manifest), "utf-8");
4142
+ fs11.mkdirSync(path16.dirname(manifestPath), { recursive: true });
4143
+ fs11.writeFileSync(manifestPath, encodeSkaileManifest(manifest), "utf-8");
3923
4144
  return { wrote: true, manifestPath, assetCount: assets.length };
3924
4145
  }
3925
4146
  function openManifest(libraryPath) {
3926
- const dir = path15.resolve(libraryPath);
3927
- const file = path15.join(dir, SKAILE_MANIFEST_FILENAME);
3928
- if (!fs10.existsSync(file)) {
3929
- fs10.mkdirSync(dir, { recursive: true });
4147
+ const dir = path16.resolve(libraryPath);
4148
+ const file = path16.join(dir, SKAILE_MANIFEST_FILENAME);
4149
+ if (!fs11.existsSync(file)) {
4150
+ fs11.mkdirSync(dir, { recursive: true });
3930
4151
  return { editor: ManifestYamlEditor.create(file), created: true };
3931
4152
  }
3932
4153
  const editor = ManifestYamlEditor.load(file);
@@ -3938,16 +4159,16 @@ function assertManifestEditable(libraryPath) {
3938
4159
  openManifest(libraryPath);
3939
4160
  }
3940
4161
  function conflictingAssetRoot(libraryPath, kind, name, root) {
3941
- const existing = loadSkPublishManifest(path15.resolve(libraryPath))?.assets?.find(
4162
+ const existing = loadSkPublishManifest(path16.resolve(libraryPath))?.assets?.find(
3942
4163
  (a) => a.kind === kind && a.name === name
3943
4164
  );
3944
4165
  return existingRootConflict(libraryPath, existing, root);
3945
4166
  }
3946
4167
  function existingRootConflict(libraryPath, existing, root) {
3947
4168
  if (!existing?.root || existing.source) return void 0;
3948
- const existingAbs = path15.resolve(libraryPath, existing.root);
3949
- if (existingAbs === path15.resolve(libraryPath, root)) return void 0;
3950
- const stat = fs10.statSync(existingAbs, { throwIfNoEntry: false });
4169
+ const existingAbs = path16.resolve(libraryPath, existing.root);
4170
+ if (existingAbs === path16.resolve(libraryPath, root)) return void 0;
4171
+ const stat = fs11.statSync(existingAbs, { throwIfNoEntry: false });
3951
4172
  return stat?.isDirectory() ? existing.root : void 0;
3952
4173
  }
3953
4174
  function upsertManifestAsset(libraryPath, input) {
@@ -3981,8 +4202,8 @@ function upsertManifestAsset(libraryPath, input) {
3981
4202
  function missingRootAssets(libraryPath, manifest) {
3982
4203
  return (manifest.assets ?? []).filter((a) => {
3983
4204
  if (a.source || manifest.source || !a.root) return false;
3984
- const dir = path15.resolve(libraryPath, a.root);
3985
- return !(fs10.existsSync(dir) && fs10.statSync(dir).isDirectory());
4205
+ const dir = path16.resolve(libraryPath, a.root);
4206
+ return !(fs11.existsSync(dir) && fs11.statSync(dir).isDirectory());
3986
4207
  });
3987
4208
  }
3988
4209
  function pruneMissingRootAssets(libraryPath) {
@@ -4021,18 +4242,19 @@ function setManifestPublisher(libraryPath, publisher) {
4021
4242
  editor.save();
4022
4243
  return true;
4023
4244
  }
4024
- async function syncManifestWithDisk(libraryPath, defaultPublisher, registry) {
4245
+ async function syncManifestWithDisk(libraryPath, defaultPublisher, registry, opts = {}) {
4025
4246
  stampManifestPublisher(libraryPath, defaultPublisher);
4026
4247
  const knownKinds = new Set(registry.getAllKinds());
4027
4248
  const unknownKind = pruneUnknownKindAssets(libraryPath, knownKinds);
4028
4249
  const removed = pruneMissingRootAssets(libraryPath);
4029
4250
  const skipped = [];
4251
+ const failed = [];
4030
4252
  const publisher = loadSkPublishManifest(libraryPath)?.publisher ?? defaultPublisher;
4031
4253
  const scanned = await scanDirectory(libraryPath, publisher, {
4032
4254
  knownKinds,
4033
4255
  keepDuplicates: true
4034
4256
  });
4035
- const rootOf = (e) => path15.relative(libraryPath, path15.dirname(e.source)) || e.name;
4257
+ const rootOf = (e) => path16.relative(libraryPath, path16.dirname(e.source)) || e.name;
4036
4258
  const copiesOf = /* @__PURE__ */ new Map();
4037
4259
  for (const e of scanned) {
4038
4260
  const key = `${e.kind}:${e.name}`;
@@ -4045,6 +4267,9 @@ async function syncManifestWithDisk(libraryPath, defaultPublisher, registry) {
4045
4267
  );
4046
4268
  if (copies.length > 1 && !claimed) unclaimed.add(key);
4047
4269
  }
4270
+ const listedAtStart = new Set(
4271
+ (loadSkPublishManifest(libraryPath)?.assets ?? []).map((a) => `${a.kind}:${a.name}`)
4272
+ );
4048
4273
  for (const e of scanned) {
4049
4274
  if (!isParsable(e.source)) {
4050
4275
  skipped.push({
@@ -4052,7 +4277,7 @@ async function syncManifestWithDisk(libraryPath, defaultPublisher, registry) {
4052
4277
  name: e.name,
4053
4278
  reason: "unparsable",
4054
4279
  detail: "manifest file could not be parsed",
4055
- file: path15.relative(libraryPath, e.source)
4280
+ file: path16.relative(libraryPath, e.source)
4056
4281
  });
4057
4282
  continue;
4058
4283
  }
@@ -4062,7 +4287,7 @@ async function syncManifestWithDisk(libraryPath, defaultPublisher, registry) {
4062
4287
  name: e.name,
4063
4288
  reason: "invalid-version",
4064
4289
  detail: `version "${e.version}" is not valid semver`,
4065
- file: path15.relative(libraryPath, e.source)
4290
+ file: path16.relative(libraryPath, e.source)
4066
4291
  });
4067
4292
  continue;
4068
4293
  }
@@ -4077,10 +4302,23 @@ async function syncManifestWithDisk(libraryPath, defaultPublisher, registry) {
4077
4302
  name: e.name,
4078
4303
  reason: "duplicate",
4079
4304
  detail: conflict,
4080
- file: path15.relative(libraryPath, e.source)
4305
+ file: path16.relative(libraryPath, e.source)
4081
4306
  });
4082
4307
  continue;
4083
4308
  }
4309
+ const findings = opts.check?.(e) ?? [];
4310
+ const known = listedAtStart.has(`${e.kind}:${e.name}`);
4311
+ const inManifest = known || !(findings.length > 0 && !e.version);
4312
+ if (findings.length > 0) {
4313
+ failed.push({
4314
+ kind: e.kind,
4315
+ name: e.name,
4316
+ file: path16.relative(libraryPath, e.source),
4317
+ findings,
4318
+ inManifest
4319
+ });
4320
+ }
4321
+ if (!inManifest) continue;
4084
4322
  upsertManifestAsset(libraryPath, {
4085
4323
  kind: e.kind,
4086
4324
  name: e.name,
@@ -4088,11 +4326,35 @@ async function syncManifestWithDisk(libraryPath, defaultPublisher, registry) {
4088
4326
  version: e.version
4089
4327
  });
4090
4328
  }
4091
- return { removed, unknownKind, skipped };
4329
+ return { removed, unknownKind, skipped, failed };
4330
+ }
4331
+ async function scanUnlistedAssets(libraryPath, publisher, registry) {
4332
+ const manifest = loadSkPublishManifest(libraryPath);
4333
+ if (!manifest || manifest.source) return [];
4334
+ const entries = manifest.assets ?? [];
4335
+ const roots = entries.flatMap(
4336
+ (a) => a.root && !a.source ? [path16.resolve(libraryPath, a.root)] : []
4337
+ );
4338
+ const scanned = await scanDirectory(libraryPath, manifest.publisher ?? publisher, {
4339
+ knownKinds: new Set(registry.getAllKinds()),
4340
+ keepDuplicates: true
4341
+ });
4342
+ const out = [];
4343
+ for (const e of scanned) {
4344
+ const file = path16.resolve(e.source);
4345
+ if (roots.some((r) => file === r || file.startsWith(r + path16.sep))) continue;
4346
+ const registered = entries.find((a) => a.kind === e.kind && a.name === e.name && a.root);
4347
+ out.push({
4348
+ entry: e,
4349
+ root: path16.relative(libraryPath, path16.dirname(e.source)) || e.name,
4350
+ ...registered?.root ? { registeredAt: registered.root } : {}
4351
+ });
4352
+ }
4353
+ return out;
4092
4354
  }
4093
4355
  function isParsable(file) {
4094
4356
  try {
4095
- return parseManifestFile(file, fs10.readFileSync(file, "utf-8")).ok;
4357
+ return parseManifestFile(file, fs11.readFileSync(file, "utf-8")).ok;
4096
4358
  } catch {
4097
4359
  return false;
4098
4360
  }
@@ -4149,33 +4411,33 @@ function parseWorkspaceV2(raw) {
4149
4411
  return WorkspaceConfigV2Schema.parse(raw);
4150
4412
  }
4151
4413
  function loadWorkspaceV2(dir, filename = "skaile.yaml") {
4152
- const filePath = path15.join(dir, filename);
4153
- if (!fs10.existsSync(filePath)) return null;
4154
- const content = fs10.readFileSync(filePath, "utf-8");
4414
+ const filePath = path16.join(dir, filename);
4415
+ if (!fs11.existsSync(filePath)) return null;
4416
+ const content = fs11.readFileSync(filePath, "utf-8");
4155
4417
  const raw = parse(content);
4156
4418
  if (!raw || typeof raw !== "object") return null;
4157
4419
  return parseWorkspaceV2(raw);
4158
4420
  }
4159
4421
  function saveWorkspaceV2(dir, v2, filename = "skaile.yaml") {
4160
- const filePath = path15.join(dir, filename);
4422
+ const filePath = path16.join(dir, filename);
4161
4423
  let existing = {};
4162
- if (fs10.existsSync(filePath)) {
4163
- const content = fs10.readFileSync(filePath, "utf-8");
4424
+ if (fs11.existsSync(filePath)) {
4425
+ const content = fs11.readFileSync(filePath, "utf-8");
4164
4426
  existing = parse(content) ?? {};
4165
4427
  }
4166
4428
  existing.version = 2;
4167
4429
  if (v2.library !== void 0) existing.library = v2.library;
4168
4430
  if (v2.presets_applied !== void 0) existing.presets_applied = v2.presets_applied;
4169
- if (!fs10.existsSync(dir)) {
4170
- fs10.mkdirSync(dir, { recursive: true });
4431
+ if (!fs11.existsSync(dir)) {
4432
+ fs11.mkdirSync(dir, { recursive: true });
4171
4433
  }
4172
- fs10.writeFileSync(filePath, stringify(existing, { indent: 2 }), "utf-8");
4434
+ fs11.writeFileSync(filePath, stringify(existing, { indent: 2 }), "utf-8");
4173
4435
  }
4174
4436
  var LOCK_FILENAME = "skaile.lock.yaml";
4175
4437
  function loadLockFile(dir) {
4176
- const filePath = path15.join(dir, LOCK_FILENAME);
4177
- if (!fs10.existsSync(filePath)) return null;
4178
- const content = fs10.readFileSync(filePath, "utf-8");
4438
+ const filePath = path16.join(dir, LOCK_FILENAME);
4439
+ if (!fs11.existsSync(filePath)) return null;
4440
+ const content = fs11.readFileSync(filePath, "utf-8");
4179
4441
  const raw = parse(content);
4180
4442
  if (raw !== null && !("assignments" in raw) && "subscriptions" in raw) {
4181
4443
  const legacySubs = raw.subscriptions;
@@ -4191,11 +4453,11 @@ function loadLockFile(dir) {
4191
4453
  return LockFileSchema.parse(raw);
4192
4454
  }
4193
4455
  function saveLockFile(dir, lock) {
4194
- const filePath = path15.join(dir, LOCK_FILENAME);
4195
- if (!fs10.existsSync(dir)) {
4196
- fs10.mkdirSync(dir, { recursive: true });
4456
+ const filePath = path16.join(dir, LOCK_FILENAME);
4457
+ if (!fs11.existsSync(dir)) {
4458
+ fs11.mkdirSync(dir, { recursive: true });
4197
4459
  }
4198
- fs10.writeFileSync(
4460
+ fs11.writeFileSync(
4199
4461
  filePath,
4200
4462
  `# Auto-generated by skaile. Do not edit manually.
4201
4463
  ${stringify(lock, { indent: 2 })}`,
@@ -4212,14 +4474,14 @@ function createEmptyLockFile() {
4212
4474
  };
4213
4475
  }
4214
4476
  function detectWorkspaceVersion(dir, filename = "skaile.yaml") {
4215
- const filePath = path15.join(dir, filename);
4216
- if (!fs10.existsSync(filePath)) return null;
4217
- const content = fs10.readFileSync(filePath, "utf-8");
4477
+ const filePath = path16.join(dir, filename);
4478
+ if (!fs11.existsSync(filePath)) return null;
4479
+ const content = fs11.readFileSync(filePath, "utf-8");
4218
4480
  const raw = parse(content);
4219
4481
  if (!raw || typeof raw !== "object") return null;
4220
4482
  return raw.version === 2 ? 2 : 1;
4221
4483
  }
4222
4484
 
4223
- export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, assertManifestEditable, assertValidLibraryName, classifyRef, cloneOrInitGitRepo, conflictingAssetRoot, createEmptyLockFile, curatedManifestOverlay, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, ensureGitRepo, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, installLibraryAsset, interpolate, isGitRepo, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, missingRootAssets, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, pruneMissingRootAssets, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, scanAuthoringLibraries, scanLibraryRoot, setManifestPublisher, setOriginUrl, sha256Hex, stampManifestPublisher, storeSecrets, syncManifestWithDisk, trackOriginBranch, trpcGetUrl, upsertManifestAsset, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeCuratedManifest };
4224
- //# sourceMappingURL=chunk-4MQS7CAF.js.map
4225
- //# sourceMappingURL=chunk-4MQS7CAF.js.map
4485
+ export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, assertManifestEditable, assertValidLibraryName, classifyRef, cloneOrInitGitRepo, conflictingAssetRoot, createEmptyLockFile, curatedManifestOverlay, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, ensureGitRepo, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, installLibraryAsset, interpolate, isGitRepo, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, libraryDirMissing, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, markLibraryUnregistered, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, missingLibraryDirMessage, missingRootAssets, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, pruneMissingRootAssets, queryInstancePickerChoices, recordLibraryRename, renamedLibraryName, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, scanAuthoringLibraries, scanLibraryRoot, scanUnlistedAssets, setManifestPublisher, setOriginUrl, sha256Hex, stampManifestPublisher, storeSecrets, syncManifestWithDisk, trackOriginBranch, trpcGetUrl, unregisteredLibraryNames, upsertManifestAsset, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeCuratedManifest };
4486
+ //# sourceMappingURL=chunk-2F5AWQX5.js.map
4487
+ //# sourceMappingURL=chunk-2F5AWQX5.js.map