@skaile/workspaces 5.2.0 → 5.4.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 (274) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +9 -2
  3. package/dist/{asset-feeds-WDIB3E6H.js → asset-feeds-3MVRNS5U.js} +12 -12
  4. package/dist/{asset-feeds-WDIB3E6H.js.map → asset-feeds-3MVRNS5U.js.map} +1 -1
  5. package/dist/asset-manager/catalog-deployer.js +9 -9
  6. package/dist/asset-manager/index.js +13 -13
  7. package/dist/asset-manager/installer.js +9 -9
  8. package/dist/asset-manager/src/index.d.ts +22 -3
  9. package/dist/asset-manager/src/index.d.ts.map +1 -1
  10. package/dist/asset-manager/src/installer.d.ts +9 -1
  11. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  12. package/dist/bridge/drivers/claude-sdk.js +11 -11
  13. package/dist/bridge/drivers/codex.js +10 -10
  14. package/dist/bridge/drivers/continue.js +12 -12
  15. package/dist/bridge/drivers/echo.js +1 -1
  16. package/dist/bridge/drivers/gemini.js +5 -5
  17. package/dist/bridge/drivers/goose.js +12 -12
  18. package/dist/bridge/drivers/omp.js +2 -2
  19. package/dist/bridge/drivers/opencode.js +12 -12
  20. package/dist/bridge/drivers/qwen.js +5 -5
  21. package/dist/bridge/index.js +12 -12
  22. package/dist/{chunk-WMEPS6S4.js → chunk-2XXAVTTO.js} +3 -3
  23. package/dist/{chunk-WMEPS6S4.js.map → chunk-2XXAVTTO.js.map} +1 -1
  24. package/dist/{chunk-KGGT6MUM.js → chunk-37DN45RR.js} +19 -7
  25. package/dist/chunk-37DN45RR.js.map +1 -0
  26. package/dist/chunk-5NH3U6N5.js +15 -0
  27. package/dist/{chunk-BZXR6SW5.js.map → chunk-5NH3U6N5.js.map} +1 -1
  28. package/dist/{chunk-P2EM6FNQ.js → chunk-6IGFSUTE.js} +23 -36
  29. package/dist/chunk-6IGFSUTE.js.map +1 -0
  30. package/dist/{chunk-EOGNW74K.js → chunk-7KITVWXK.js} +25 -23
  31. package/dist/chunk-7KITVWXK.js.map +1 -0
  32. package/dist/{chunk-S6KNDUAU.js → chunk-A67BHJCH.js} +5 -5
  33. package/dist/{chunk-S6KNDUAU.js.map → chunk-A67BHJCH.js.map} +1 -1
  34. package/dist/{chunk-3E2TIPBZ.js → chunk-AE42DHSH.js} +2 -2
  35. package/dist/{chunk-3E2TIPBZ.js.map → chunk-AE42DHSH.js.map} +1 -1
  36. package/dist/{chunk-L257BENF.js → chunk-BATL2CWI.js} +128 -32
  37. package/dist/chunk-BATL2CWI.js.map +1 -0
  38. package/dist/{chunk-2MEMXBLC.js → chunk-BHUHGLNS.js} +5 -5
  39. package/dist/{chunk-2MEMXBLC.js.map → chunk-BHUHGLNS.js.map} +1 -1
  40. package/dist/{chunk-XIYXBHLN.js → chunk-DTV7HL5R.js} +2 -2
  41. package/dist/{chunk-XIYXBHLN.js.map → chunk-DTV7HL5R.js.map} +1 -1
  42. package/dist/{chunk-BJQUSAGB.js → chunk-GCYD4EGY.js} +4 -4
  43. package/dist/{chunk-BJQUSAGB.js.map → chunk-GCYD4EGY.js.map} +1 -1
  44. package/dist/{chunk-EB6OPURC.js → chunk-HTKZ4AOW.js} +3 -3
  45. package/dist/{chunk-EB6OPURC.js.map → chunk-HTKZ4AOW.js.map} +1 -1
  46. package/dist/{chunk-OFNXRI4L.js → chunk-IDUGP4V7.js} +3 -3
  47. package/dist/{chunk-OFNXRI4L.js.map → chunk-IDUGP4V7.js.map} +1 -1
  48. package/dist/{chunk-ANWHAGM7.js → chunk-JAJG4G5E.js} +3 -3
  49. package/dist/{chunk-ANWHAGM7.js.map → chunk-JAJG4G5E.js.map} +1 -1
  50. package/dist/{chunk-PU5VY7KF.js → chunk-JCATNLY3.js} +4 -4
  51. package/dist/{chunk-PU5VY7KF.js.map → chunk-JCATNLY3.js.map} +1 -1
  52. package/dist/{chunk-77GKEZ2R.js → chunk-JEA32KB6.js} +3 -3
  53. package/dist/{chunk-77GKEZ2R.js.map → chunk-JEA32KB6.js.map} +1 -1
  54. package/dist/{chunk-7Y43UXKA.js → chunk-JELTQ4H7.js} +3 -3
  55. package/dist/{chunk-7Y43UXKA.js.map → chunk-JELTQ4H7.js.map} +1 -1
  56. package/dist/{chunk-R3QW7CA5.js → chunk-JF26V3BC.js} +7 -7
  57. package/dist/chunk-JF26V3BC.js.map +1 -0
  58. package/dist/{chunk-XOTJVCJB.js → chunk-JKWU6ULI.js} +3 -3
  59. package/dist/{chunk-XOTJVCJB.js.map → chunk-JKWU6ULI.js.map} +1 -1
  60. package/dist/{chunk-ARUJBGAH.js → chunk-KXTO7HON.js} +3 -3
  61. package/dist/{chunk-ARUJBGAH.js.map → chunk-KXTO7HON.js.map} +1 -1
  62. package/dist/{chunk-2QZG5VJQ.js → chunk-LAI7X6I2.js} +3 -3
  63. package/dist/{chunk-2QZG5VJQ.js.map → chunk-LAI7X6I2.js.map} +1 -1
  64. package/dist/{chunk-YANDJSMN.js → chunk-LFMX2UEF.js} +3 -3
  65. package/dist/{chunk-YANDJSMN.js.map → chunk-LFMX2UEF.js.map} +1 -1
  66. package/dist/{chunk-BUNBKRJZ.js → chunk-LUBS5DXY.js} +3 -3
  67. package/dist/{chunk-BUNBKRJZ.js.map → chunk-LUBS5DXY.js.map} +1 -1
  68. package/dist/{chunk-TLKM4M47.js → chunk-MFHKHXDE.js} +6 -3
  69. package/dist/chunk-MFHKHXDE.js.map +1 -0
  70. package/dist/chunk-NESV47MF.js +20 -0
  71. package/dist/chunk-NESV47MF.js.map +1 -0
  72. package/dist/{chunk-6OWIEFZ2.js → chunk-OANSNVCP.js} +5 -5
  73. package/dist/{chunk-6OWIEFZ2.js.map → chunk-OANSNVCP.js.map} +1 -1
  74. package/dist/{chunk-MGHUSFYQ.js → chunk-ONWTPXVU.js} +8 -8
  75. package/dist/{chunk-MGHUSFYQ.js.map → chunk-ONWTPXVU.js.map} +1 -1
  76. package/dist/{chunk-DD3OZLRD.js → chunk-OXE5A6H6.js} +3 -3
  77. package/dist/{chunk-DD3OZLRD.js.map → chunk-OXE5A6H6.js.map} +1 -1
  78. package/dist/{chunk-BIMEKYOE.js → chunk-QEXEHXX5.js} +15 -18
  79. package/dist/chunk-QEXEHXX5.js.map +1 -0
  80. package/dist/{chunk-TVJBJLXR.js → chunk-QK756IRJ.js} +13 -13
  81. package/dist/{chunk-TVJBJLXR.js.map → chunk-QK756IRJ.js.map} +1 -1
  82. package/dist/{chunk-UDBN3LZU.js → chunk-RD6GE4HU.js} +4 -4
  83. package/dist/{chunk-UDBN3LZU.js.map → chunk-RD6GE4HU.js.map} +1 -1
  84. package/dist/{chunk-IOUIC2ZD.js → chunk-SQBPE66C.js} +8 -8
  85. package/dist/{chunk-IOUIC2ZD.js.map → chunk-SQBPE66C.js.map} +1 -1
  86. package/dist/{chunk-YRF5CYHR.js → chunk-SR4RFKHM.js} +36 -5
  87. package/dist/chunk-SR4RFKHM.js.map +1 -0
  88. package/dist/{chunk-BWOLP6KQ.js → chunk-U6ORGQHZ.js} +3 -3
  89. package/dist/{chunk-BWOLP6KQ.js.map → chunk-U6ORGQHZ.js.map} +1 -1
  90. package/dist/{chunk-RXPC4KBW.js → chunk-UAAAERXI.js} +3 -3
  91. package/dist/{chunk-RXPC4KBW.js.map → chunk-UAAAERXI.js.map} +1 -1
  92. package/dist/chunk-UKDFOOEG.js +22 -0
  93. package/dist/chunk-UKDFOOEG.js.map +1 -0
  94. package/dist/{chunk-6ZCVROWW.js → chunk-UNRZCQD4.js} +6 -6
  95. package/dist/{chunk-6ZCVROWW.js.map → chunk-UNRZCQD4.js.map} +1 -1
  96. package/dist/{chunk-ZSFTCMZL.js → chunk-VETH6MDG.js} +19 -19
  97. package/dist/{chunk-ZSFTCMZL.js.map → chunk-VETH6MDG.js.map} +1 -1
  98. package/dist/{chunk-4YE7OYTB.js → chunk-VKSA2CDJ.js} +5 -6
  99. package/dist/chunk-VKSA2CDJ.js.map +1 -0
  100. package/dist/{chunk-OABIGSUY.js → chunk-WX74MVNA.js} +2 -2
  101. package/dist/chunk-WX74MVNA.js.map +1 -0
  102. package/dist/{chunk-U6K3I3AX.js → chunk-XGIS325V.js} +3 -3
  103. package/dist/{chunk-U6K3I3AX.js.map → chunk-XGIS325V.js.map} +1 -1
  104. package/dist/{chunk-FJTC5YFO.js → chunk-XMQAV6T3.js} +3 -3
  105. package/dist/{chunk-FJTC5YFO.js.map → chunk-XMQAV6T3.js.map} +1 -1
  106. package/dist/{chunk-B4J4RGNY.js → chunk-Y5OCUOXF.js} +34 -19
  107. package/dist/chunk-Y5OCUOXF.js.map +1 -0
  108. package/dist/{chunk-LZ5RH6LD.js → chunk-Y7UBRRKG.js} +89 -128
  109. package/dist/chunk-Y7UBRRKG.js.map +1 -0
  110. package/dist/{chunk-PHKFFJ4I.js → chunk-ZIYYMR6Y.js} +3 -3
  111. package/dist/{chunk-PHKFFJ4I.js.map → chunk-ZIYYMR6Y.js.map} +1 -1
  112. package/dist/{chunk-JPR7EPIM.js → chunk-ZUZ5LLZ2.js} +4 -4
  113. package/dist/{chunk-JPR7EPIM.js.map → chunk-ZUZ5LLZ2.js.map} +1 -1
  114. package/dist/cli/index.js +796 -583
  115. package/dist/cli/index.js.map +1 -1
  116. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  117. package/dist/cli/src/commands/catalog-cmd.d.ts.map +1 -1
  118. package/dist/cli/src/commands/catalog.d.ts +33 -3
  119. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  120. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  121. package/dist/cli/src/commands/library-index.d.ts +57 -1
  122. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  123. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  124. package/dist/cli/src/commands/npx.d.ts.map +1 -1
  125. package/dist/cli/src/commands/outdated.d.ts +3 -1
  126. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  127. package/dist/cli/src/commands/project.d.ts.map +1 -1
  128. package/dist/cli/src/commands/skailify-lib.d.ts +3 -2
  129. package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -1
  130. package/dist/cli/src/commands/update.d.ts.map +1 -1
  131. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  132. package/dist/cli/src/setup.d.ts.map +1 -1
  133. package/dist/cli/src/skill-checks.d.ts +21 -0
  134. package/dist/cli/src/skill-checks.d.ts.map +1 -0
  135. package/dist/cli/src/spinner.d.ts +24 -0
  136. package/dist/cli/src/spinner.d.ts.map +1 -0
  137. package/dist/connectors/config.js +6 -6
  138. package/dist/connectors/index.js +15 -15
  139. package/dist/{connectors-GUN4MRWR.js → connectors-OB3OAZTK.js} +18 -18
  140. package/dist/{connectors-GUN4MRWR.js.map → connectors-OB3OAZTK.js.map} +1 -1
  141. package/dist/core/index.js +8 -8
  142. package/dist/core/manifest.js +2 -2
  143. package/dist/core/models.js +1 -1
  144. package/dist/core/publish-manifest.js +2 -2
  145. package/dist/core/ref.js +1 -1
  146. package/dist/core/runtime-assets.js +6 -6
  147. package/dist/core/src/asset-roots.d.ts +8 -0
  148. package/dist/core/src/asset-roots.d.ts.map +1 -1
  149. package/dist/core/src/cache-paths.d.ts +6 -0
  150. package/dist/core/src/cache-paths.d.ts.map +1 -1
  151. package/dist/core/src/index.d.ts +2 -2
  152. package/dist/core/src/index.d.ts.map +1 -1
  153. package/dist/core/src/lock.d.ts.map +1 -1
  154. package/dist/core/src/models.d.ts +7 -0
  155. package/dist/core/src/models.d.ts.map +1 -1
  156. package/dist/core/src/publish-manifest.d.ts +26 -2
  157. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  158. package/dist/core/src/repo-manager.d.ts.map +1 -1
  159. package/dist/core/src/walker.d.ts.map +1 -1
  160. package/dist/core/store.js +2 -2
  161. package/dist/core/workspace-config.js +5 -5
  162. package/dist/deploy/index.js +8 -8
  163. package/dist/discovery/index.js +4 -4
  164. package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
  165. package/dist/discovery/src/discover.d.ts.map +1 -1
  166. package/dist/discovery/src/hash.d.ts +45 -23
  167. package/dist/discovery/src/hash.d.ts.map +1 -1
  168. package/dist/discovery/src/index.d.ts +2 -0
  169. package/dist/discovery/src/index.d.ts.map +1 -1
  170. package/dist/discovery/src/parse-manifest.d.ts +27 -0
  171. package/dist/discovery/src/parse-manifest.d.ts.map +1 -0
  172. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  173. package/dist/{ensure-sources-VCPA762L.js → ensure-sources-Z3KKLEM6.js} +16 -16
  174. package/dist/{ensure-sources-VCPA762L.js.map → ensure-sources-Z3KKLEM6.js.map} +1 -1
  175. package/dist/factory-assets/README.md +2 -2
  176. package/dist/factory-assets/connectors/box.js +15 -15
  177. package/dist/factory-assets/connectors/deploy.js +15 -15
  178. package/dist/factory-assets/connectors/devserver.js +15 -15
  179. package/dist/factory-assets/connectors/flow/adapter.js +15 -15
  180. package/dist/factory-assets/connectors/flow/engine.js +9 -9
  181. package/dist/factory-assets/connectors/flow/run-flow.js +17 -17
  182. package/dist/factory-assets/connectors/flow.js +15 -15
  183. package/dist/factory-assets/connectors/git.js +15 -15
  184. package/dist/factory-assets/connectors/gmail.js +15 -15
  185. package/dist/factory-assets/connectors/googledrive.js +15 -15
  186. package/dist/factory-assets/connectors/local.js +15 -15
  187. package/dist/factory-assets/connectors/mattermost.js +15 -15
  188. package/dist/factory-assets/connectors/memory.js +15 -15
  189. package/dist/factory-assets/connectors/minio.js +15 -15
  190. package/dist/factory-assets/connectors/postgres.js +15 -15
  191. package/dist/factory-assets/connectors/s3.js +15 -15
  192. package/dist/factory-assets/connectors/sharepoint.js +15 -15
  193. package/dist/factory-assets/connectors/sqlite.js +15 -15
  194. package/dist/factory-assets/connectors/static-server.js +15 -15
  195. package/dist/factory-assets/connectors/tunnel.js +15 -15
  196. package/dist/factory-assets/connectors/webdav.js +15 -15
  197. package/dist/factory-assets/connectors/xstate-store.js +15 -15
  198. package/dist/factory-assets/connectors/xstate.js +15 -15
  199. package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +17 -15
  200. package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +20 -17
  201. package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +82 -71
  202. package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +17 -11
  203. package/dist/factory-assets/skills/skailify/SKILL.md +8 -4
  204. package/dist/{flows-BOB5YA5R.js → flows-DTADYIXH.js} +13 -13
  205. package/dist/{flows-BOB5YA5R.js.map → flows-DTADYIXH.js.map} +1 -1
  206. package/dist/{helpers-ZGK4R5MZ.js → helpers-F2RFRT5D.js} +16 -16
  207. package/dist/{helpers-ZGK4R5MZ.js.map → helpers-F2RFRT5D.js.map} +1 -1
  208. package/dist/library/index.js +11 -11
  209. package/dist/library/install.js +3 -2
  210. package/dist/library/src/config.d.ts +5 -4
  211. package/dist/library/src/config.d.ts.map +1 -1
  212. package/dist/library/src/index.d.ts +1 -1
  213. package/dist/library/src/index.d.ts.map +1 -1
  214. package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
  215. package/dist/library/src/local/install-library-asset.d.ts +3 -2
  216. package/dist/library/src/local/install-library-asset.d.ts.map +1 -1
  217. package/dist/library/src/local/library.d.ts.map +1 -1
  218. package/dist/library/src/manifest-writer.d.ts +6 -0
  219. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  220. package/dist/library/src/sync/git-driver.d.ts +8 -0
  221. package/dist/library/src/sync/git-driver.d.ts.map +1 -1
  222. package/dist/{library-publish-RIP6NBYA.js → library-publish-62RFU74A.js} +47 -26
  223. package/dist/library-publish-62RFU74A.js.map +1 -0
  224. package/dist/{open-library-4IJTBVTR.js → open-library-NVG3CZUO.js} +19 -19
  225. package/dist/{open-library-4IJTBVTR.js.map → open-library-NVG3CZUO.js.map} +1 -1
  226. package/dist/open-registry-IYH6W6CN.js +32 -0
  227. package/dist/{open-registry-G5DI4RPU.js.map → open-registry-IYH6W6CN.js.map} +1 -1
  228. package/dist/paths-STQO4FYF.js +22 -0
  229. package/dist/{paths-L5XLUC3D.js.map → paths-STQO4FYF.js.map} +1 -1
  230. package/dist/{plugin-store-QENDYZ63.js → plugin-store-2DTEIJTG.js} +10 -10
  231. package/dist/{plugin-store-QENDYZ63.js.map → plugin-store-2DTEIJTG.js.map} +1 -1
  232. package/dist/{project-4INCIIZI.js → project-44LM6SRV.js} +18 -17
  233. package/dist/{project-4INCIIZI.js.map → project-44LM6SRV.js.map} +1 -1
  234. package/dist/resolver/index.js +9 -9
  235. package/dist/runner/index.js +25 -25
  236. package/dist/sdk/asset-manager.js +13 -13
  237. package/dist/sdk/bridge.js +12 -12
  238. package/dist/sdk/core.js +8 -8
  239. package/dist/sdk/flow.js +9 -9
  240. package/dist/sdk/index.js +25 -25
  241. package/dist/sdk/resolver.js +9 -9
  242. package/dist/sdk/runner.js +25 -25
  243. package/dist/secrets/index.js +2 -2
  244. package/dist/{setup-RG4PJJUW.js → setup-4BV5ZWOZ.js} +24 -23
  245. package/dist/setup-4BV5ZWOZ.js.map +1 -0
  246. package/dist/skills-M7OU3WMP.js +26 -0
  247. package/dist/{skills-CL45F7AG.js.map → skills-M7OU3WMP.js.map} +1 -1
  248. package/dist/{source-LJOI5AXU.js → source-HTT6CXUP.js} +20 -20
  249. package/dist/{source-LJOI5AXU.js.map → source-HTT6CXUP.js.map} +1 -1
  250. package/dist/{source-manifest-publish-QEJML4VS.js → source-manifest-publish-CPXUX3CL.js} +22 -22
  251. package/dist/{source-manifest-publish-QEJML4VS.js.map → source-manifest-publish-CPXUX3CL.js.map} +1 -1
  252. package/dist/tui/index.js +25 -25
  253. package/dist/workspace-plugin/adapters/mcp.js +22 -22
  254. package/dist/workspace-plugin/adapters/omp.js +14 -14
  255. package/dist/workspace-plugin/index.js +1 -1
  256. package/package.json +1 -1
  257. package/dist/chunk-4YE7OYTB.js.map +0 -1
  258. package/dist/chunk-B4J4RGNY.js.map +0 -1
  259. package/dist/chunk-BIMEKYOE.js.map +0 -1
  260. package/dist/chunk-BZXR6SW5.js +0 -15
  261. package/dist/chunk-EOGNW74K.js.map +0 -1
  262. package/dist/chunk-KGGT6MUM.js.map +0 -1
  263. package/dist/chunk-L257BENF.js.map +0 -1
  264. package/dist/chunk-LZ5RH6LD.js.map +0 -1
  265. package/dist/chunk-OABIGSUY.js.map +0 -1
  266. package/dist/chunk-P2EM6FNQ.js.map +0 -1
  267. package/dist/chunk-R3QW7CA5.js.map +0 -1
  268. package/dist/chunk-TLKM4M47.js.map +0 -1
  269. package/dist/chunk-YRF5CYHR.js.map +0 -1
  270. package/dist/library-publish-RIP6NBYA.js.map +0 -1
  271. package/dist/open-registry-G5DI4RPU.js +0 -32
  272. package/dist/paths-L5XLUC3D.js +0 -22
  273. package/dist/setup-RG4PJJUW.js.map +0 -1
  274. package/dist/skills-CL45F7AG.js +0 -26
@@ -1,13 +1,13 @@
1
- import { getStoreManifestsDir } from './chunk-B4J4RGNY.js';
2
- import { readManifestSourceConfig, discoverAssetsInTree } from './chunk-LZ5RH6LD.js';
3
- import { deployAll, removeAsset, createScaffold } from './chunk-KGGT6MUM.js';
4
- import { resolveConfiguredDriverTarget, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, verifyLock, mergeLockFile, extractForPatch, generatePatch, savePatch, applyPatch } from './chunk-BIMEKYOE.js';
5
- import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-PU5VY7KF.js';
6
- import { deployedBase, deployedDir, isDeployed } from './chunk-U6K3I3AX.js';
7
- import { loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, resolveSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, coerceVersion, matchPin, resolveAll, buildProvenanceIndex, ensureRepo, sourceShortName, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, readLinks, storeManifestSlug } from './chunk-P2EM6FNQ.js';
8
- import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-TLKM4M47.js';
9
- import { scanDirectory, parseRequires } from './chunk-YANDJSMN.js';
10
- import { parseAssetRef, parseAssetRefLoose, slugifyAssetName, assetRefToStr } from './chunk-OABIGSUY.js';
1
+ import { getStoreManifestsDir } from './chunk-Y5OCUOXF.js';
2
+ import { readManifestSourceConfig, discoverAssetsInTree } from './chunk-Y7UBRRKG.js';
3
+ import { deployAll, removeAsset, canonicalEntryRef, createScaffold } from './chunk-37DN45RR.js';
4
+ import { resolveConfiguredDriverTarget, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, verifyLock, mergeLockFile, extractForPatch, generatePatch, savePatch, applyPatch } from './chunk-QEXEHXX5.js';
5
+ import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-JCATNLY3.js';
6
+ import { deployedBase, deployedDir, isDeployed } from './chunk-XGIS325V.js';
7
+ import { loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, resolveSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, coerceVersion, resolveAll, buildProvenanceIndex, ensureRepo, sourceShortName, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, readLinks, storeManifestSlug } from './chunk-6IGFSUTE.js';
8
+ import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-MFHKHXDE.js';
9
+ import { scanDirectory, parseRequires } from './chunk-LFMX2UEF.js';
10
+ import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName } from './chunk-WX74MVNA.js';
11
11
  import { appendHistory, getRecentHistory, clearHistory } from './chunk-KTBKW2FI.js';
12
12
  import { commitChanges } from './chunk-UQ6LFBPZ.js';
13
13
  import { spawnSync } from 'child_process';
@@ -597,6 +597,13 @@ var AssetManager = class {
597
597
  source,
598
598
  publisher: slug,
599
599
  version: c.version,
600
+ // `publisher` above is the clone key; the printed ref carries the real publisher.
601
+ canonicalRef: assetRefToStr({
602
+ kind: c.kind,
603
+ name: c.name,
604
+ publisher: c.publisher,
605
+ pin: c.version || void 0
606
+ }),
600
607
  requires: [],
601
608
  // Manifest-declared deps are authoritative for the candidate's deps.
602
609
  dependencies: c.deps ?? [],
@@ -630,15 +637,20 @@ var AssetManager = class {
630
637
  if (missing.length === 0) return { entries: [], resolved, libraryOf };
631
638
  const roots = [];
632
639
  for (const l of (await this.loadLibraryIndex())?.libraries ?? []) {
633
- if (existsSync(l.path)) roots.push({ name: l.name, dir: l.path });
640
+ if (l.name === GLOBAL_INSTALL_DIR_NAME) continue;
641
+ if (existsSync(l.path)) roots.push({ name: l.name, dir: l.path, isDefault: l.isDefault });
634
642
  }
635
643
  const registered = new Set(roots.map((r) => r.name));
636
644
  try {
637
645
  const librariesRoot = resolveLibraryDir();
638
646
  if (existsSync(librariesRoot)) {
639
647
  for (const dirent of readdirSync(librariesRoot, { withFileTypes: true })) {
640
- if (dirent.isDirectory() && !registered.has(dirent.name)) {
641
- roots.push({ name: dirent.name, dir: join(librariesRoot, dirent.name) });
648
+ if (dirent.isDirectory() && dirent.name !== GLOBAL_INSTALL_DIR_NAME && !registered.has(dirent.name)) {
649
+ roots.push({
650
+ name: dirent.name,
651
+ dir: join(librariesRoot, dirent.name),
652
+ isDefault: false
653
+ });
642
654
  }
643
655
  }
644
656
  }
@@ -646,14 +658,14 @@ var AssetManager = class {
646
658
  }
647
659
  if (roots.length === 0) return { entries: [], resolved, libraryOf };
648
660
  const byKey = /* @__PURE__ */ new Map();
661
+ const isDefaultLib = new Map(roots.map((r) => [r.name, r.isDefault]));
649
662
  for (const { name, dir } of roots) {
650
663
  const publisher = readDeclaredPublisher(dir) ?? slugifyAssetName(name);
651
664
  for (const entry of await scanDirectory(dir, publisher)) {
652
665
  const key = `${entry.kind}:@${entry.publisher}/${entry.name}`;
653
- const prev = byKey.get(key);
654
- if (!prev || gt(coerceVersion(entry.version ?? ""), coerceVersion(prev.entry.version ?? ""))) {
655
- byKey.set(key, { entry, library: name });
656
- }
666
+ const list = byKey.get(key);
667
+ if (list) list.push({ entry, library: name });
668
+ else byKey.set(key, [{ entry, library: name }]);
657
669
  }
658
670
  }
659
671
  if (byKey.size === 0) return { entries: [], resolved, libraryOf };
@@ -666,15 +678,43 @@ var AssetManager = class {
666
678
  continue;
667
679
  }
668
680
  if (!parsed.publisher) continue;
669
- const hit = byKey.get(`${parsed.kind}:@${parsed.publisher}/${parsed.name}`);
670
- if (!hit) continue;
671
- if (parsed.pin && !matchPin(parsed.pin, hit.entry.version ?? "")) continue;
681
+ const key = `${parsed.kind}:@${parsed.publisher}/${parsed.name}`;
682
+ const candidates = (byKey.get(key) ?? []).filter(
683
+ (c) => !parsed.pin || matchPin(parsed.pin, c.entry.version ?? "")
684
+ );
685
+ if (candidates.length === 0) continue;
686
+ candidates.sort((a, b) => {
687
+ const va = coerceVersion(a.entry.version ?? "");
688
+ const vb = coerceVersion(b.entry.version ?? "");
689
+ if (gt(va, vb)) return -1;
690
+ if (gt(vb, va)) return 1;
691
+ const da = isDefaultLib.get(a.library) ? 0 : 1;
692
+ const db = isDefaultLib.get(b.library) ? 0 : 1;
693
+ return da - db || a.library.localeCompare(b.library);
694
+ });
695
+ const hit = candidates[0];
696
+ this.warnLibraryCollision(key, candidates, hit);
672
697
  entries.push(hit.entry);
673
698
  libraryOf.set(hit.entry, hit.library);
674
699
  resolved.add(ref);
675
700
  }
676
701
  return { entries, resolved, libraryOf };
677
702
  }
703
+ /** Collision messages already printed by this instance (one warning per ref + library set). */
704
+ warnedLibraryCollisions = /* @__PURE__ */ new Set();
705
+ /**
706
+ * Warn once when `key` is held by more than one library: names every library
707
+ * with its version and the one chosen, so a silent pick can't surprise.
708
+ */
709
+ warnLibraryCollision(key, candidates, chosen) {
710
+ const libraries = new Set(candidates.map((c) => c.library));
711
+ if (libraries.size < 2) return;
712
+ const held = candidates.map((c) => `${c.library} (${c.entry.version || "unversioned"})`);
713
+ const msg = `skaile: ${key} exists in ${libraries.size} libraries: ${held.join(", ")} \u2014 using ${chosen.library} (${chosen.entry.version || "unversioned"}). Highest version wins; an equal version goes to the default library, then by name. Pin a version (${key}#<version>) to choose another.`;
714
+ if (this.warnedLibraryCollisions.has(msg)) return;
715
+ this.warnedLibraryCollisions.add(msg);
716
+ console.warn(msg);
717
+ }
678
718
  /**
679
719
  * Open the local index and snapshot its libraries + asset definitions.
680
720
  * Best-effort: no index file (never indexed), or any open/guard failure,
@@ -746,7 +786,9 @@ var AssetManager = class {
746
786
  }
747
787
  const libPath = this.libraryPath(origin.name, snap);
748
788
  if (!libPath) {
749
- missing.push(`${ref} (library "${origin.name}" not found)`);
789
+ missing.push(
790
+ `${ref} (library "${origin.name}" is not registered \u2014 renamed or removed? re-lock with \`skaile install\`)`
791
+ );
750
792
  continue;
751
793
  }
752
794
  const found = (await scanDirectory(libPath, publisher)).find(
@@ -767,7 +809,9 @@ var AssetManager = class {
767
809
  if (origin.sha256) {
768
810
  const onDisk = libraryDiskHashes(libPath, diskHashes).get(`${kind}:${name}`);
769
811
  if (onDisk !== void 0 && onDisk !== origin.sha256) {
770
- missing.push(`${ref} (library "${origin.name}" content changed since lock)`);
812
+ missing.push(
813
+ `${ref} (library "${origin.name}" content changed since lock \u2014 or the lock predates the one shared asset hash; re-lock with \`skaile install\`)`
814
+ );
771
815
  continue;
772
816
  }
773
817
  }
@@ -780,6 +824,7 @@ var AssetManager = class {
780
824
  * when it exists, else `<libraries dir>/<name>`; `null` when neither is a directory.
781
825
  */
782
826
  libraryPath(name, snap) {
827
+ if (name === GLOBAL_INSTALL_DIR_NAME) return null;
783
828
  const registered = snap?.libraries.find((l) => l.name === name)?.path;
784
829
  if (registered && existsSync(registered)) return registered;
785
830
  try {
@@ -1235,6 +1280,8 @@ var AssetManager = class {
1235
1280
  // Keep the publisher label slash-free (repo name), not the full cache key.
1236
1281
  publisher: sourceShortName(entry.source.url),
1237
1282
  version: entry.source.commit,
1283
+ // The lock key is the canonical ref; `publisher` above is only a clone label.
1284
+ canonicalRef: ref,
1238
1285
  requires: [],
1239
1286
  dependencies: []
1240
1287
  });
@@ -1267,6 +1314,8 @@ var AssetManager = class {
1267
1314
  * @param opts.link - When `true`, symlink local-path assets instead of copying them
1268
1315
  * (the author dev-loop). Machine-local / not for committing; a no-op for
1269
1316
  * store/factory sources. Defaults to copy.
1317
+ * @param opts.onLibraryOrigin - Called once per deployed library-origin asset with its
1318
+ * canonical ref and the name of the library it was resolved from.
1270
1319
  * @returns Array of asset refs that were deployed in this call.
1271
1320
  * @throws When the asset cannot be found in any configured repository.
1272
1321
  */
@@ -1296,6 +1345,13 @@ var AssetManager = class {
1296
1345
  )
1297
1346
  )
1298
1347
  ];
1348
+ if (opts?.onLibraryOrigin) {
1349
+ for (const e of lib.entries) {
1350
+ const origin = lib.libraryOf.get(e);
1351
+ const deployedRef = canonicalEntryRef(e);
1352
+ if (origin && deployed.includes(deployedRef)) opts.onLibraryOrigin(deployedRef, origin);
1353
+ }
1354
+ }
1299
1355
  this.addDependencyToConfig(ref);
1300
1356
  await this.renderDriverMcpConfig();
1301
1357
  if (resolved.length > 0 || lib.entries.length > 0) {
@@ -1974,10 +2030,11 @@ var AssetManager = class {
1974
2030
  const lock = this.tryReadLock();
1975
2031
  if (!lock) return [];
1976
2032
  const result = [];
2033
+ const reported = /* @__PURE__ */ new Set();
1977
2034
  for (const src of lock.sources) {
1978
2035
  const slug = sourceCacheKey(src.url);
1979
2036
  const decl = repositories[slug];
1980
- if (!decl || decl.path) continue;
2037
+ if (!decl) continue;
1981
2038
  const status = checkRepoStatus(decl, slug, this.reposDir);
1982
2039
  if (status.behind <= 0) continue;
1983
2040
  for (const [ref, entry] of Object.entries(lock.assets)) {
@@ -1991,15 +2048,31 @@ var AssetManager = class {
1991
2048
  currentVersion: version ?? "",
1992
2049
  behind: status.behind
1993
2050
  });
2051
+ reported.add(ref);
1994
2052
  }
1995
2053
  }
1996
- const libraryAssets = Object.entries(lock.assets).filter(([, e]) => e.library);
2054
+ const libraryAssets = Object.entries(lock.assets).filter(
2055
+ ([, e]) => e.library && !e.library.installed
2056
+ );
1997
2057
  if (libraryAssets.length > 0) {
1998
2058
  const snap = await this.loadLibraryIndex();
1999
2059
  for (const [ref, entry] of libraryAssets) {
2000
2060
  const origin = entry.library;
2001
2061
  const { publisher, kind, name } = parseCanonicalLockKey(ref);
2002
2062
  if (!publisher || !kind || !name) continue;
2063
+ if (!this.libraryPath(origin.name, snap)) {
2064
+ result.push({
2065
+ kind,
2066
+ name,
2067
+ publisher,
2068
+ currentVersion: origin.version,
2069
+ behind: 0,
2070
+ library: origin.name,
2071
+ problem: `library "${origin.name}" is not registered (renamed or removed?)`
2072
+ });
2073
+ reported.add(ref);
2074
+ continue;
2075
+ }
2003
2076
  const def = newestLibraryDef(snap, origin.name, { kind, publisher, name });
2004
2077
  if (!def || !gt(coerceVersion(def.version), coerceVersion(origin.version))) continue;
2005
2078
  result.push({
@@ -2011,14 +2084,35 @@ var AssetManager = class {
2011
2084
  latestVersion: def.version,
2012
2085
  library: origin.name
2013
2086
  });
2087
+ reported.add(ref);
2088
+ }
2089
+ }
2090
+ for (const [ref, entry] of Object.entries(lock.assets)) {
2091
+ if (reported.has(ref) || entry.library?.installed) continue;
2092
+ const { publisher, kind, name, version } = parseCanonicalLockKey(ref);
2093
+ if (!kind || !name || NON_DEPLOYABLE_KINDS.has(kind)) continue;
2094
+ if (isDeployed(kind, name, this.driverTarget, this.global, this.projectDir)) {
2095
+ continue;
2014
2096
  }
2097
+ result.push({
2098
+ kind,
2099
+ name,
2100
+ publisher: publisher ?? "",
2101
+ currentVersion: entry.library?.version ?? version ?? "",
2102
+ behind: 0,
2103
+ ...entry.library ? { library: entry.library.name } : {},
2104
+ problem: "deployed copy missing"
2105
+ });
2015
2106
  }
2016
2107
  return result;
2017
2108
  }
2018
2109
  /**
2019
- * Produce a unified diff between the deployed asset and its catalog source.
2110
+ * Produce a unified diff from the deployed asset to its catalog source: `-` lines
2111
+ * are in the deployed copy only (local edits `update` would overwrite), `+` lines
2112
+ * are in the source only (what `update` would add).
2020
2113
  *
2021
- * Useful for detecting manual edits to deployed files or verifying that a patch
2114
+ * Useful for detecting manual edits to deployed files or seeing what an upstream
2115
+ * change would bring in; also for verifying that a patch
2022
2116
  * was applied correctly.
2023
2117
  *
2024
2118
  * @param ref - Asset ref in `kind:name` form.
@@ -2035,7 +2129,7 @@ var AssetManager = class {
2035
2129
  parsed.name
2036
2130
  );
2037
2131
  if (!existsSync(deployedPath)) return { status: "not-deployed" };
2038
- const r = spawnSync("diff", ["-ruN", entry.source, deployedPath], { encoding: "utf8" });
2132
+ const r = spawnSync("diff", ["-ruN", deployedPath, entry.source], { encoding: "utf8" });
2039
2133
  if (r.status === 1) return { status: "differs", diff: r.stdout };
2040
2134
  if (r.status === 0) return { status: "identical" };
2041
2135
  throw new Error(`diff failed for ${ref}: ${r.stderr || r.error?.message || "unknown error"}`);
@@ -2166,15 +2260,17 @@ var AssetManager = class {
2166
2260
  const full = await this.info(`${entry.kind}:${entry.name}`);
2167
2261
  if (!full) continue;
2168
2262
  for (const req of full.requires) {
2263
+ const dep = memberIdentity(`${req.kind}:${req.name}`);
2264
+ if (!dep) continue;
2169
2265
  if (!isDeployed(
2170
- req.kind,
2171
- req.name,
2266
+ dep.kind,
2267
+ dep.name,
2172
2268
  this.driverTarget,
2173
2269
  this.global,
2174
2270
  this.projectDir
2175
2271
  )) {
2176
2272
  const inRepos = await resolveAsset(
2177
- { kind: req.kind, name: req.name },
2273
+ { kind: dep.kind, name: dep.name },
2178
2274
  repositories,
2179
2275
  this.reposDir
2180
2276
  ) !== null;
@@ -2378,5 +2474,5 @@ var AssetManager = class {
2378
2474
  };
2379
2475
 
2380
2476
  export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, NON_DEPLOYABLE_KINDS, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName };
2381
- //# sourceMappingURL=chunk-L257BENF.js.map
2382
- //# sourceMappingURL=chunk-L257BENF.js.map
2477
+ //# sourceMappingURL=chunk-BATL2CWI.js.map
2478
+ //# sourceMappingURL=chunk-BATL2CWI.js.map