@skaile/workspaces 6.2.0 → 6.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 (300) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/ai-sdk.d.ts +2 -0
  3. package/dist/ai-sdk.js +123 -0
  4. package/dist/ai-sdk.js.map +1 -0
  5. package/dist/app-sdk/index.js +1 -1
  6. package/dist/{asset-feeds-KPKCE64E.js → asset-feeds-UJSYGKCX.js} +20 -20
  7. package/dist/{asset-feeds-KPKCE64E.js.map → asset-feeds-UJSYGKCX.js.map} +1 -1
  8. package/dist/asset-manager/catalog-deployer.js +7 -7
  9. package/dist/asset-manager/index.js +12 -12
  10. package/dist/asset-manager/installer.js +8 -8
  11. package/dist/asset-manager/renderers.js +7 -7
  12. package/dist/asset-manager/src/index.d.ts +42 -15
  13. package/dist/asset-manager/src/index.d.ts.map +1 -1
  14. package/dist/asset-manager/src/install-instances.d.ts +2 -0
  15. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  16. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  17. package/dist/bridge/harnesses/claude-sdk.js +13 -12
  18. package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
  19. package/dist/bridge/harnesses/codex.js +12 -11
  20. package/dist/bridge/harnesses/codex.js.map +1 -1
  21. package/dist/bridge/harnesses/continue.js +11 -10
  22. package/dist/bridge/harnesses/continue.js.map +1 -1
  23. package/dist/bridge/harnesses/echo.js +6 -5
  24. package/dist/bridge/harnesses/echo.js.map +1 -1
  25. package/dist/bridge/harnesses/gemini.js +8 -7
  26. package/dist/bridge/harnesses/goose.js +11 -10
  27. package/dist/bridge/harnesses/goose.js.map +1 -1
  28. package/dist/bridge/harnesses/omp.js +8 -7
  29. package/dist/bridge/harnesses/omp.js.map +1 -1
  30. package/dist/bridge/harnesses/opencode.js +11 -10
  31. package/dist/bridge/harnesses/opencode.js.map +1 -1
  32. package/dist/bridge/harnesses/qwen.js +8 -7
  33. package/dist/bridge/harnesses/qwen.js.map +1 -1
  34. package/dist/bridge/index.js +18 -16
  35. package/dist/bridge/src/ai-sdk.d.ts +51 -0
  36. package/dist/bridge/src/ai-sdk.d.ts.map +1 -0
  37. package/dist/bridge/src/harness-model-check.d.ts +11 -7
  38. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  39. package/dist/bridge/src/index.d.ts +1 -0
  40. package/dist/bridge/src/index.d.ts.map +1 -1
  41. package/dist/bridge/src/provider-registry-load.d.ts +30 -0
  42. package/dist/bridge/src/provider-registry-load.d.ts.map +1 -0
  43. package/dist/{chunk-7DRFKAJZ.js → chunk-24D7IW5O.js} +8 -7
  44. package/dist/chunk-24D7IW5O.js.map +1 -0
  45. package/dist/{chunk-ITFCWMOY.js → chunk-2WOA3TKK.js} +12 -12
  46. package/dist/chunk-2WOA3TKK.js.map +1 -0
  47. package/dist/{chunk-QPWR3YMY.js → chunk-3ENE6ZOF.js} +4 -4
  48. package/dist/{chunk-QPWR3YMY.js.map → chunk-3ENE6ZOF.js.map} +1 -1
  49. package/dist/{chunk-ICSGNT5P.js → chunk-45KLCFQB.js} +8 -27
  50. package/dist/chunk-45KLCFQB.js.map +1 -0
  51. package/dist/{chunk-Q5RN4PWV.js → chunk-5NHBLKKU.js} +3 -3
  52. package/dist/{chunk-Q5RN4PWV.js.map → chunk-5NHBLKKU.js.map} +1 -1
  53. package/dist/{chunk-RQMIZONH.js → chunk-5T3DTK7A.js} +43 -24
  54. package/dist/chunk-5T3DTK7A.js.map +1 -0
  55. package/dist/{chunk-X37JUNEW.js → chunk-6UP2EDFN.js} +4 -313
  56. package/dist/chunk-6UP2EDFN.js.map +1 -0
  57. package/dist/{chunk-KJSC2ZD6.js → chunk-6WQGJF65.js} +18 -6
  58. package/dist/chunk-6WQGJF65.js.map +1 -0
  59. package/dist/{chunk-BOT64P3U.js → chunk-6X3GDPCB.js} +4 -3
  60. package/dist/chunk-6X3GDPCB.js.map +1 -0
  61. package/dist/{chunk-T2VBPVWZ.js → chunk-76WSWPOB.js} +15 -7
  62. package/dist/{chunk-T2VBPVWZ.js.map → chunk-76WSWPOB.js.map} +1 -1
  63. package/dist/{chunk-BRK5QZKI.js → chunk-ABVWUM2E.js} +27 -17
  64. package/dist/chunk-ABVWUM2E.js.map +1 -0
  65. package/dist/{chunk-MM4YO3EL.js → chunk-ACBL7X62.js} +3 -3
  66. package/dist/{chunk-MM4YO3EL.js.map → chunk-ACBL7X62.js.map} +1 -1
  67. package/dist/{chunk-VUJXZDCY.js → chunk-BOS7P2Y4.js} +3 -3
  68. package/dist/{chunk-VUJXZDCY.js.map → chunk-BOS7P2Y4.js.map} +1 -1
  69. package/dist/{chunk-PNUM7GUY.js → chunk-BUU2DLPC.js} +3 -3
  70. package/dist/{chunk-PNUM7GUY.js.map → chunk-BUU2DLPC.js.map} +1 -1
  71. package/dist/{chunk-BEYNH2LS.js → chunk-BX7PSWJA.js} +4 -4
  72. package/dist/{chunk-BEYNH2LS.js.map → chunk-BX7PSWJA.js.map} +1 -1
  73. package/dist/{chunk-URCJIV7T.js → chunk-C7TQARGC.js} +3 -3
  74. package/dist/{chunk-URCJIV7T.js.map → chunk-C7TQARGC.js.map} +1 -1
  75. package/dist/{chunk-E5NQRHEB.js → chunk-CK3CJSRY.js} +3 -3
  76. package/dist/{chunk-E5NQRHEB.js.map → chunk-CK3CJSRY.js.map} +1 -1
  77. package/dist/{chunk-GF5JXQIZ.js → chunk-DCJ4BION.js} +2 -2
  78. package/dist/{chunk-GF5JXQIZ.js.map → chunk-DCJ4BION.js.map} +1 -1
  79. package/dist/{chunk-5LQ62LNT.js → chunk-DF5WJC3Q.js} +4 -4
  80. package/dist/{chunk-5LQ62LNT.js.map → chunk-DF5WJC3Q.js.map} +1 -1
  81. package/dist/{chunk-QK7AG5AV.js → chunk-E237FGGX.js} +4 -4
  82. package/dist/{chunk-QK7AG5AV.js.map → chunk-E237FGGX.js.map} +1 -1
  83. package/dist/{chunk-K3R2UKG7.js → chunk-EXRQKOY6.js} +12 -12
  84. package/dist/{chunk-K3R2UKG7.js.map → chunk-EXRQKOY6.js.map} +1 -1
  85. package/dist/chunk-G63KOHFS.js +32 -0
  86. package/dist/chunk-G63KOHFS.js.map +1 -0
  87. package/dist/{chunk-6CYKTHNT.js → chunk-GBXQFJ4G.js} +8 -8
  88. package/dist/{chunk-6CYKTHNT.js.map → chunk-GBXQFJ4G.js.map} +1 -1
  89. package/dist/{chunk-6GWSDPBP.js → chunk-GTMANMBZ.js} +3 -3
  90. package/dist/{chunk-6GWSDPBP.js.map → chunk-GTMANMBZ.js.map} +1 -1
  91. package/dist/{chunk-JJJ2G4K2.js → chunk-HSF665NV.js} +5 -5
  92. package/dist/{chunk-JJJ2G4K2.js.map → chunk-HSF665NV.js.map} +1 -1
  93. package/dist/{chunk-I7LC5TDY.js → chunk-HTGTNN2B.js} +3 -3
  94. package/dist/{chunk-I7LC5TDY.js.map → chunk-HTGTNN2B.js.map} +1 -1
  95. package/dist/{chunk-PMWRM4EJ.js → chunk-HXZ3FQQN.js} +14 -14
  96. package/dist/{chunk-PMWRM4EJ.js.map → chunk-HXZ3FQQN.js.map} +1 -1
  97. package/dist/{chunk-2XM3ZH36.js → chunk-IYZAJ2J2.js} +16 -13
  98. package/dist/chunk-IYZAJ2J2.js.map +1 -0
  99. package/dist/{chunk-3HACK2Z7.js → chunk-IZV3HDVG.js} +5 -5
  100. package/dist/{chunk-3HACK2Z7.js.map → chunk-IZV3HDVG.js.map} +1 -1
  101. package/dist/{chunk-U673DB5U.js → chunk-JSWMRYLM.js} +4 -3
  102. package/dist/chunk-JSWMRYLM.js.map +1 -0
  103. package/dist/{chunk-TSTRH4SM.js → chunk-L45IHRDH.js} +3 -3
  104. package/dist/{chunk-TSTRH4SM.js.map → chunk-L45IHRDH.js.map} +1 -1
  105. package/dist/{chunk-27SXN33H.js → chunk-L4OYPFLB.js} +3 -3
  106. package/dist/{chunk-27SXN33H.js.map → chunk-L4OYPFLB.js.map} +1 -1
  107. package/dist/{chunk-QIHL3YPL.js → chunk-O7KAQQAI.js} +4 -4
  108. package/dist/{chunk-QIHL3YPL.js.map → chunk-O7KAQQAI.js.map} +1 -1
  109. package/dist/{chunk-Z3IRZBXB.js → chunk-P7EL7QRD.js} +14 -14
  110. package/dist/{chunk-Z3IRZBXB.js.map → chunk-P7EL7QRD.js.map} +1 -1
  111. package/dist/{chunk-QXKUFROW.js → chunk-PTBX55QF.js} +4 -4
  112. package/dist/{chunk-QXKUFROW.js.map → chunk-PTBX55QF.js.map} +1 -1
  113. package/dist/{chunk-5JPW27BI.js → chunk-Q4XWCVFA.js} +7 -7
  114. package/dist/{chunk-5JPW27BI.js.map → chunk-Q4XWCVFA.js.map} +1 -1
  115. package/dist/chunk-QJQQNBVT.js +315 -0
  116. package/dist/chunk-QJQQNBVT.js.map +1 -0
  117. package/dist/{chunk-M4OG2YN4.js → chunk-QSIFEHSN.js} +3 -3
  118. package/dist/{chunk-M4OG2YN4.js.map → chunk-QSIFEHSN.js.map} +1 -1
  119. package/dist/{chunk-7Y6S4XLL.js → chunk-RKI35EAN.js} +3 -3
  120. package/dist/{chunk-7Y6S4XLL.js.map → chunk-RKI35EAN.js.map} +1 -1
  121. package/dist/{chunk-OCQNUV4T.js → chunk-SISUT7VR.js} +7 -7
  122. package/dist/{chunk-OCQNUV4T.js.map → chunk-SISUT7VR.js.map} +1 -1
  123. package/dist/{chunk-7H6XRCPG.js → chunk-TDKZL5ZC.js} +3 -3
  124. package/dist/{chunk-7H6XRCPG.js.map → chunk-TDKZL5ZC.js.map} +1 -1
  125. package/dist/{chunk-LRBP3234.js → chunk-TF5CWJQZ.js} +5 -5
  126. package/dist/{chunk-LRBP3234.js.map → chunk-TF5CWJQZ.js.map} +1 -1
  127. package/dist/{chunk-PKBLJI23.js → chunk-TGB4E5Z6.js} +188 -52
  128. package/dist/chunk-TGB4E5Z6.js.map +1 -0
  129. package/dist/{chunk-KB56WBQ3.js → chunk-TPQKFX6X.js} +4 -4
  130. package/dist/{chunk-KB56WBQ3.js.map → chunk-TPQKFX6X.js.map} +1 -1
  131. package/dist/{chunk-TZERN27L.js → chunk-U3SXCVR7.js} +3 -3
  132. package/dist/{chunk-TZERN27L.js.map → chunk-U3SXCVR7.js.map} +1 -1
  133. package/dist/{chunk-KPKGWXUJ.js → chunk-U6S5CXKB.js} +3 -3
  134. package/dist/{chunk-KPKGWXUJ.js.map → chunk-U6S5CXKB.js.map} +1 -1
  135. package/dist/{chunk-JFLQICIU.js → chunk-UAOHR6AL.js} +4 -4
  136. package/dist/{chunk-JFLQICIU.js.map → chunk-UAOHR6AL.js.map} +1 -1
  137. package/dist/{chunk-KXJMQTOU.js → chunk-UBLZALKP.js} +3 -3
  138. package/dist/{chunk-KXJMQTOU.js.map → chunk-UBLZALKP.js.map} +1 -1
  139. package/dist/{chunk-BIRW3HOG.js → chunk-UUKCPPTQ.js} +3 -3
  140. package/dist/{chunk-BIRW3HOG.js.map → chunk-UUKCPPTQ.js.map} +1 -1
  141. package/dist/{chunk-BY5WIRCU.js → chunk-UVTN4O7N.js} +42 -17
  142. package/dist/chunk-UVTN4O7N.js.map +1 -0
  143. package/dist/{chunk-COAFAYBS.js → chunk-V4OXHEWY.js} +3 -3
  144. package/dist/{chunk-COAFAYBS.js.map → chunk-V4OXHEWY.js.map} +1 -1
  145. package/dist/{chunk-SJNZ4WPA.js → chunk-VSCLUPGZ.js} +31 -28
  146. package/dist/chunk-VSCLUPGZ.js.map +1 -0
  147. package/dist/{chunk-JMIKGAUA.js → chunk-VV2DJT4I.js} +15 -5
  148. package/dist/chunk-VV2DJT4I.js.map +1 -0
  149. package/dist/{chunk-JCPD4QRM.js → chunk-VZU67OKK.js} +2 -2
  150. package/dist/{chunk-JCPD4QRM.js.map → chunk-VZU67OKK.js.map} +1 -1
  151. package/dist/{chunk-MAZ3UXJK.js → chunk-WENTJ5KP.js} +4 -4
  152. package/dist/{chunk-MAZ3UXJK.js.map → chunk-WENTJ5KP.js.map} +1 -1
  153. package/dist/{chunk-ZWJCRHP3.js → chunk-YFGXYQW4.js} +3 -3
  154. package/dist/{chunk-ZWJCRHP3.js.map → chunk-YFGXYQW4.js.map} +1 -1
  155. package/dist/{chunk-S2H3RBK7.js → chunk-YJNE4V2M.js} +16 -9
  156. package/dist/chunk-YJNE4V2M.js.map +1 -0
  157. package/dist/{chunk-PJJSBZZP.js → chunk-ZWCGJYR7.js} +3 -3
  158. package/dist/{chunk-PJJSBZZP.js.map → chunk-ZWCGJYR7.js.map} +1 -1
  159. package/dist/{claude-code-BBMNVH2J.js → claude-code-UBT4ZME7.js} +4 -4
  160. package/dist/{claude-code-BBMNVH2J.js.map → claude-code-UBT4ZME7.js.map} +1 -1
  161. package/dist/cli/index.js +107 -91
  162. package/dist/cli/index.js.map +1 -1
  163. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  164. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  165. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  166. package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
  167. package/dist/cli/src/commands/providers.d.ts.map +1 -1
  168. package/dist/cli/src/helpers.d.ts +10 -2
  169. package/dist/cli/src/helpers.d.ts.map +1 -1
  170. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  171. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  172. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  173. package/dist/cli/src/plugin-store/spec.d.ts +19 -14
  174. package/dist/cli/src/plugin-store/spec.d.ts.map +1 -1
  175. package/dist/cli/src/setup.d.ts.map +1 -1
  176. package/dist/connectors/config.js +4 -4
  177. package/dist/connectors/index.js +22 -20
  178. package/dist/{connectors-47EM6C2P.js → connectors-4WH32NK2.js} +25 -23
  179. package/dist/{connectors-47EM6C2P.js.map → connectors-4WH32NK2.js.map} +1 -1
  180. package/dist/connectors-shared/index.js +2 -2
  181. package/dist/core/index.js +6 -6
  182. package/dist/core/manifest.js +1 -1
  183. package/dist/core/publish-manifest.js +2 -2
  184. package/dist/core/runtime-assets.js +4 -4
  185. package/dist/core/src/index.d.ts +1 -1
  186. package/dist/core/src/index.d.ts.map +1 -1
  187. package/dist/core/src/lock.d.ts.map +1 -1
  188. package/dist/core/src/manifest.d.ts +9 -3
  189. package/dist/core/src/manifest.d.ts.map +1 -1
  190. package/dist/core/src/workspace-config.d.ts +15 -0
  191. package/dist/core/src/workspace-config.d.ts.map +1 -1
  192. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  193. package/dist/core/workspace-config.js +3 -3
  194. package/dist/deploy/index.js +6 -6
  195. package/dist/discovery/index.js +3 -3
  196. package/dist/{ensure-sources-K5EFNC3L.js → ensure-sources-UC2RBYMP.js} +27 -25
  197. package/dist/ensure-sources-UC2RBYMP.js.map +1 -0
  198. package/dist/factory-assets/connectors/box.js +22 -20
  199. package/dist/factory-assets/connectors/deploy.js +22 -20
  200. package/dist/factory-assets/connectors/devserver.js +22 -20
  201. package/dist/factory-assets/connectors/flow/adapter.js +22 -20
  202. package/dist/factory-assets/connectors/flow/engine.js +7 -7
  203. package/dist/factory-assets/connectors/flow/run-flow.js +24 -22
  204. package/dist/factory-assets/connectors/flow.js +22 -20
  205. package/dist/factory-assets/connectors/git.js +22 -20
  206. package/dist/factory-assets/connectors/gmail.js +22 -20
  207. package/dist/factory-assets/connectors/googledrive.js +22 -20
  208. package/dist/factory-assets/connectors/local.js +22 -20
  209. package/dist/factory-assets/connectors/mattermost.js +22 -20
  210. package/dist/factory-assets/connectors/memory.js +22 -20
  211. package/dist/factory-assets/connectors/minio.js +22 -20
  212. package/dist/factory-assets/connectors/postgres.js +22 -20
  213. package/dist/factory-assets/connectors/s3.js +22 -20
  214. package/dist/factory-assets/connectors/sharepoint.js +22 -20
  215. package/dist/factory-assets/connectors/sqlite.js +22 -20
  216. package/dist/factory-assets/connectors/static-server.js +22 -20
  217. package/dist/factory-assets/connectors/tunnel.js +22 -20
  218. package/dist/factory-assets/connectors/webdav.js +22 -20
  219. package/dist/factory-assets/connectors/xstate-store.js +22 -20
  220. package/dist/factory-assets/connectors/xstate.js +22 -20
  221. package/dist/{flows-KLBNSKLO.js → flows-LYTKNGKE.js} +11 -11
  222. package/dist/{flows-KLBNSKLO.js.map → flows-LYTKNGKE.js.map} +1 -1
  223. package/dist/{helpers-LUSV2ICC.js → helpers-SSSKT5XK.js} +27 -25
  224. package/dist/{helpers-LUSV2ICC.js.map → helpers-SSSKT5XK.js.map} +1 -1
  225. package/dist/library/index.js +9 -9
  226. package/dist/library/install.js +3 -3
  227. package/dist/{library-publish-XMRCKRNR.js → library-publish-GQMNTAKK.js} +52 -50
  228. package/dist/library-publish-GQMNTAKK.js.map +1 -0
  229. package/dist/model-endpoint/index.js +10 -9
  230. package/dist/open-library-XGUCUJYE.js +58 -0
  231. package/dist/{open-library-XBR46DJL.js.map → open-library-XGUCUJYE.js.map} +1 -1
  232. package/dist/{open-registry-W562DCDL.js → open-registry-DIFEPDF6.js} +13 -13
  233. package/dist/{open-registry-W562DCDL.js.map → open-registry-DIFEPDF6.js.map} +1 -1
  234. package/dist/{paths-2AZXB3QL.js → paths-G4GFJLE2.js} +9 -9
  235. package/dist/{paths-2AZXB3QL.js.map → paths-G4GFJLE2.js.map} +1 -1
  236. package/dist/{plugin-store-36SIL4TV.js → plugin-store-BBLDFD3L.js} +9 -9
  237. package/dist/{plugin-store-36SIL4TV.js.map → plugin-store-BBLDFD3L.js.map} +1 -1
  238. package/dist/{project-D7GN7WLS.js → project-LB745WVZ.js} +48 -46
  239. package/dist/{project-D7GN7WLS.js.map → project-LB745WVZ.js.map} +1 -1
  240. package/dist/resolver/index.js +7 -7
  241. package/dist/runner/index.js +38 -36
  242. package/dist/runner/src/capability-roundtrip.d.ts +4 -1
  243. package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
  244. package/dist/sdk/asset-manager.js +12 -12
  245. package/dist/sdk/bridge.js +18 -16
  246. package/dist/sdk/core.js +6 -6
  247. package/dist/sdk/flow.js +7 -7
  248. package/dist/sdk/index.js +38 -36
  249. package/dist/sdk/index.js.map +1 -1
  250. package/dist/sdk/resolver.js +7 -7
  251. package/dist/sdk/runner.js +38 -36
  252. package/dist/sdk/session.js +2 -2
  253. package/dist/sdk/transport/ws/server.js +7 -7
  254. package/dist/sdk/transport/ws.js +7 -7
  255. package/dist/sdk/transport.js +7 -7
  256. package/dist/sdk/types.js +1 -1
  257. package/dist/{serve-preflight-CGA5G3AE.js → serve-preflight-NPWI4MV6.js} +28 -26
  258. package/dist/serve-preflight-NPWI4MV6.js.map +1 -0
  259. package/dist/session/index.js +2 -2
  260. package/dist/{setup-IBDNJAOU.js → setup-X6ZYH2MW.js} +33 -28
  261. package/dist/setup-X6ZYH2MW.js.map +1 -0
  262. package/dist/{skills-CTTO7SZK.js → skills-62PXDBPJ.js} +12 -12
  263. package/dist/{skills-CTTO7SZK.js.map → skills-62PXDBPJ.js.map} +1 -1
  264. package/dist/{source-2DJ5KNOI.js → source-LAYCTRHP.js} +48 -46
  265. package/dist/{source-2DJ5KNOI.js.map → source-LAYCTRHP.js.map} +1 -1
  266. package/dist/{source-manifest-publish-IYWUMUCY.js → source-manifest-publish-3S6PJ25W.js} +50 -48
  267. package/dist/source-manifest-publish-3S6PJ25W.js.map +1 -0
  268. package/dist/transport/index.js +7 -7
  269. package/dist/transport/ws/server.js +7 -7
  270. package/dist/transport/ws.js +7 -7
  271. package/dist/tui/index.js +38 -36
  272. package/dist/tui/index.js.map +1 -1
  273. package/dist/types/index.js +1 -1
  274. package/dist/types/src/capabilities.d.ts +9 -1
  275. package/dist/types/src/capabilities.d.ts.map +1 -1
  276. package/dist/workspace-plugin/adapters/mcp.js +29 -27
  277. package/dist/workspace-plugin/adapters/omp.js +14 -14
  278. package/dist/workspace-plugin/index.js +1 -1
  279. package/package.json +27 -1
  280. package/dist/chunk-2XM3ZH36.js.map +0 -1
  281. package/dist/chunk-7DRFKAJZ.js.map +0 -1
  282. package/dist/chunk-BOT64P3U.js.map +0 -1
  283. package/dist/chunk-BRK5QZKI.js.map +0 -1
  284. package/dist/chunk-BY5WIRCU.js.map +0 -1
  285. package/dist/chunk-ICSGNT5P.js.map +0 -1
  286. package/dist/chunk-ITFCWMOY.js.map +0 -1
  287. package/dist/chunk-JMIKGAUA.js.map +0 -1
  288. package/dist/chunk-KJSC2ZD6.js.map +0 -1
  289. package/dist/chunk-PKBLJI23.js.map +0 -1
  290. package/dist/chunk-RQMIZONH.js.map +0 -1
  291. package/dist/chunk-S2H3RBK7.js.map +0 -1
  292. package/dist/chunk-SJNZ4WPA.js.map +0 -1
  293. package/dist/chunk-U673DB5U.js.map +0 -1
  294. package/dist/chunk-X37JUNEW.js.map +0 -1
  295. package/dist/ensure-sources-K5EFNC3L.js.map +0 -1
  296. package/dist/library-publish-XMRCKRNR.js.map +0 -1
  297. package/dist/open-library-XBR46DJL.js +0 -56
  298. package/dist/serve-preflight-CGA5G3AE.js.map +0 -1
  299. package/dist/setup-IBDNJAOU.js.map +0 -1
  300. package/dist/source-manifest-publish-IYWUMUCY.js.map +0 -1
@@ -1,19 +1,19 @@
1
- import { unregisteredLibraryNames, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, lastLibraryName, filesEntryPaths } from './chunk-6CYKTHNT.js';
2
- import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-MAZ3UXJK.js';
1
+ import { unregisteredLibraryNames, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, lastLibraryName, filesEntryPaths } from './chunk-GBXQFJ4G.js';
2
+ import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-WENTJ5KP.js';
3
3
  import { parseFlowDefinition } from './chunk-JRN5QF4C.js';
4
- import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, assertNoLibrarySymlinks, deployAll, removeAsset, composedDriftRefs, sourceComposedFiles, cachedComposedFiles, createScaffold, installAgent } from './chunk-S2H3RBK7.js';
4
+ import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, assertNoLibrarySymlinks, deployAll, removeAsset, composedDriftRefs, sourceComposedFiles, cachedComposedFiles, createScaffold, installAgent } from './chunk-YJNE4V2M.js';
5
5
  import { appendHistory, getRecentHistory, clearHistory } from './chunk-KTBKW2FI.js';
6
6
  import { commitChanges } from './chunk-UQ6LFBPZ.js';
7
- import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-COAFAYBS.js';
7
+ import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-V4OXHEWY.js';
8
8
  import { isScaffoldBody, isScaffoldDescription } from './chunk-76FLBODK.js';
9
- import { resolveConfiguredHarnessName, FACTORY_SOURCE_URL, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, computeHash, buildLockFile, readLock, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-BRK5QZKI.js';
10
- import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-QPWR3YMY.js';
9
+ import { resolveConfiguredHarnessName, FACTORY_SOURCE_URL, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, computeHash, buildLockFile, readLock, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-ABVWUM2E.js';
10
+ import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-3ENE6ZOF.js';
11
11
  import { deployedBase, isDeployed, deployedPaths, deployedDir } from './chunk-5KRMNUL4.js';
12
- import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, MAX_PRESET_DEPTH, PresetDepthError, DEFAULT_AGENT_INSTANCE_ID } from './chunk-KJSC2ZD6.js';
12
+ import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, MAX_PRESET_DEPTH, PresetDepthError, DEFAULT_AGENT_INSTANCE_ID } from './chunk-6WQGJF65.js';
13
13
  import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-L5VSIPQD.js';
14
14
  import { HARNESS_TARGETS, SUPPORTED_HARNESSES } from './chunk-VTETQCR6.js';
15
- import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, isNonAssetDir, isNonAssetFile } from './chunk-KPKGWXUJ.js';
16
- import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-JMIKGAUA.js';
15
+ import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, isNonAssetDir, isNonAssetFile } from './chunk-U6S5CXKB.js';
16
+ import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-VV2DJT4I.js';
17
17
  import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-IZQOO6MN.js';
18
18
  import { spawnSync } from 'child_process';
19
19
  import { existsSync, rmSync, readFileSync, writeFileSync, readdirSync, lstatSync, statSync, unlinkSync, mkdirSync } from 'fs';
@@ -128,10 +128,18 @@ function removeAgentInstanceRenderings(opts) {
128
128
  }
129
129
  return removed;
130
130
  }
131
+ function readInstanceFile(abs) {
132
+ try {
133
+ return statSync(abs).isDirectory() ? "\0dir" : readFileSync(abs, "utf-8");
134
+ } catch {
135
+ return void 0;
136
+ }
137
+ }
131
138
  function installAgentInstances(opts) {
132
139
  const { projectDir, harness, log } = opts;
133
140
  const result = {
134
141
  instances: [],
142
+ changed: [],
135
143
  removed: [],
136
144
  warnings: [],
137
145
  errors: []
@@ -151,6 +159,9 @@ function installAgentInstances(opts) {
151
159
  if (previous[id]) owned[id] = previous[id];
152
160
  continue;
153
161
  }
162
+ const before = /* @__PURE__ */ new Map();
163
+ for (const rel of previous[id] ?? [])
164
+ before.set(rel, readInstanceFile(resolve(projectDir, rel)));
154
165
  const rendered = installAgent(
155
166
  srcDir,
156
167
  agentDeployDir,
@@ -169,6 +180,13 @@ function installAgentInstances(opts) {
169
180
  const files = [...new Set(rendered.created)];
170
181
  owned[id] = files;
171
182
  result.instances.push({ id, files });
183
+ const sameFiles = files.length === before.size && files.every((rel) => before.has(rel));
184
+ if (!sameFiles || files.some((rel) => {
185
+ const old = before.get(rel);
186
+ return old === void 0 || readInstanceFile(resolve(projectDir, rel)) !== old;
187
+ })) {
188
+ result.changed.push(id);
189
+ }
172
190
  }
173
191
  const claimed = new Set(Object.values(owned).flat());
174
192
  const root = resolve(projectDir);
@@ -1920,6 +1938,7 @@ var AssetManager = class {
1920
1938
  for (const w of [...result.warnings, ...result.errors]) console.warn(`skaile: ${w}`);
1921
1939
  return {
1922
1940
  agentInstances: result.instances,
1941
+ agentInstancesChanged: result.changed,
1923
1942
  agentFilesRemoved: result.removed,
1924
1943
  ...result.errors.length > 0 ? { agentInstanceErrors: result.errors } : {},
1925
1944
  ...details.length > 0 ? { agentInstanceDetails: details } : {}
@@ -2952,6 +2971,30 @@ var AssetManager = class {
2952
2971
  })
2953
2972
  );
2954
2973
  }
2974
+ /**
2975
+ * Whether every declared ref is locked and no declared pin differs from the locked version:
2976
+ * `skaile.yaml` asks for nothing the lock does not hold. A declared preset counts when the
2977
+ * lock records it.
2978
+ */
2979
+ declaredMatchesLock(lock, declared) {
2980
+ const keys = Object.keys(lock.assets).map((key) => parseCanonicalLockKey(key));
2981
+ for (const d of declared) {
2982
+ const want = parseRefTolerant(d.split(" ")[0] ?? d);
2983
+ if (!want) return false;
2984
+ if (want.kind === "preset") {
2985
+ if (!this.presetRecorded(want)) return false;
2986
+ continue;
2987
+ }
2988
+ const held = keys.filter(
2989
+ (id) => id.kind === want.kind && id.name === want.name && (!want.publisher || !id.publisher || id.publisher === want.publisher)
2990
+ );
2991
+ if (held.length === 0) return false;
2992
+ if (want.pin && !held.some((id) => !id.version || matchPin(want.pin, id.version))) {
2993
+ return false;
2994
+ }
2995
+ }
2996
+ return true;
2997
+ }
2955
2998
  /**
2956
2999
  * Lock keys that `skaile.yaml` still wants: the entries a declared ref names, plus every
2957
3000
  * entry such an asset requires, transitively. All keys when a `preset:` is declared.
@@ -2985,7 +3028,12 @@ var AssetManager = class {
2985
3028
  * assets on this machine (not registered, or registered with its directory gone). Plain
2986
3029
  * `install` stops on a non-empty list, the same lines `install --locked` prints: it must
2987
3030
  * not re-resolve a locked asset from another origin. The ONE function that decides "the
2988
- * locked library is not here", so a lock-recorded URL fallback extends it in one place.
3031
+ * locked library is not here", so a store-restore fallback extends it in one place.
3032
+ *
3033
+ * An entry `install --locked` already restored from a store (its library is not registered
3034
+ * here and the store cache holds the locked version, see {@link restoredFromStoreCache}) is no
3035
+ * line: it is returned in `restored`, and plain `install` then restores the lock as
3036
+ * `install --locked` does instead of re-resolving it from another origin (OQ8, p1655).
2989
3037
  *
2990
3038
  * Only entries `skaile.yaml` still declares, or that a declared asset requires
2991
3039
  * (transitively, read from the deployed copy), count. A stale entry nothing declares is
@@ -3000,21 +3048,26 @@ var AssetManager = class {
3000
3048
  const locked = Object.entries(lock.assets).filter(
3001
3049
  ([key, e]) => e.library !== void 0 && !e.library.installed && inScope.has(key)
3002
3050
  );
3003
- if (locked.length === 0) return [];
3004
- const snap = await this.loadLibraryIndex();
3005
3051
  const lines = [];
3052
+ const restored = [];
3053
+ if (locked.length === 0) return { lines, restored };
3054
+ const snap = await this.loadLibraryIndex();
3006
3055
  for (const [ref, e] of locked) {
3007
3056
  const { publisher, kind, name } = parseCanonicalLockKey(ref);
3008
3057
  if (!publisher || !kind || !name) continue;
3009
3058
  const lookup = this.lockedLibrary(e.library, snap, { kind, publisher, name });
3010
3059
  if (lookup.state === "ok") continue;
3060
+ if (await this.restoredFromStoreCache(ref, e, snap)) {
3061
+ restored.push(ref);
3062
+ continue;
3063
+ }
3011
3064
  const component = this.installTarget(kind);
3012
3065
  const deployed = component !== void 0 && isDeployed(component, name, this.harness, this.global, this.projectDir);
3013
3066
  const problem = lockedLibraryProblem(lookup, e.library, `${kind}:@${publisher}/${name}`);
3014
3067
  const kept = deployed ? "the deployed copy and its lock entry are kept" : "its lock entry is kept; no deployed copy exists";
3015
3068
  lines.push(`${ref} (${problem}; ${kept})`);
3016
3069
  }
3017
- return lines;
3070
+ return { lines, restored };
3018
3071
  }
3019
3072
  /**
3020
3073
  * Re-resolve every library-origin lock entry from its named library, for
@@ -3023,17 +3076,21 @@ var AssetManager = class {
3023
3076
  * version; anything else is reported in `missing` with the reason.
3024
3077
  *
3025
3078
  * @param opts.storeFallback - `install --locked` only: an entry whose library is not registered
3026
- * here is restored from a store that serves the locked sha256 (OQ15, p1490). Reads such as
3027
- * the drift check never ask a store.
3079
+ * here is restored from a store that serves the locked sha256 (OQ8, OQ15, p1490, p1655). The
3080
+ * lock records the library's remote and hash but no commit and no file list, so the library
3081
+ * remote itself cannot be fetched at a locked commit; the store pointer names the upstream
3082
+ * repository and commit that hold exactly the hashed bytes. Reads such as the drift check
3083
+ * never ask a store.
3028
3084
  */
3029
3085
  async restoreLibraryLockEntries(lock, opts) {
3030
3086
  const entries = [];
3031
3087
  const missing = [];
3032
3088
  const viaStore = [];
3089
+ const storeOrigins = {};
3033
3090
  const locked = Object.entries(lock.assets).filter(
3034
3091
  ([, e]) => e.library !== void 0 && !e.library.installed
3035
3092
  );
3036
- if (locked.length === 0) return { entries, missing, viaStore };
3093
+ if (locked.length === 0) return { entries, missing, viaStore, storeOrigins };
3037
3094
  const snap = await this.loadLibraryIndex();
3038
3095
  const diskHashes = /* @__PURE__ */ new Map();
3039
3096
  const fileSets = /* @__PURE__ */ new Map();
@@ -3048,8 +3105,9 @@ var AssetManager = class {
3048
3105
  if (lookup.state !== "ok") {
3049
3106
  const fallback = lookup.state === "unregistered" && opts?.storeFallback ? await this.storeEntryForLockedLibraryAsset(publisher, kind, name, origin) : null;
3050
3107
  if (fallback) {
3051
- entries.push(fallback);
3108
+ entries.push(fallback.entry);
3052
3109
  viaStore.push(ref);
3110
+ storeOrigins[ref] = fallback.from;
3053
3111
  continue;
3054
3112
  }
3055
3113
  missing.push(
@@ -3094,17 +3152,21 @@ var AssetManager = class {
3094
3152
  found.version = sameVersion ? origin.version : current;
3095
3153
  entries.push(withLibraryFiles(found, libPath, fileSets, this.registry));
3096
3154
  }
3097
- return { entries, missing, viaStore };
3155
+ return { entries, missing, viaStore, storeOrigins };
3098
3156
  }
3099
3157
  /**
3100
- * Whether a library-origin lock entry was restored from its lock url: its library is not
3158
+ * Whether a library-origin lock entry was restored from a store: its library is not
3101
3159
  * registered here, and the project's store cache holds the locked version (`install --locked`
3102
- * fetched and SHA-verified it there against the sha256 the lock recorded). Such an entry is
3103
- * as restorable as a source- or store-origin one: `check` and `doctor` read its requirements
3104
- * from the deployed copy and do not ask for the library (OQ8, p1655). An unregistered library
3105
- * that never restored anything here stays a gap.
3160
+ * fetched it there and SHA-verified every file against the sha256 the lock recorded). Such an
3161
+ * entry is as restorable as a source- or store-origin one: `check`, `doctor` and plain
3162
+ * `install` read its requirements from the deployed copy and do not ask for the library (OQ8,
3163
+ * p1655). An unregistered library that never restored anything here stays a gap.
3164
+ *
3165
+ * This only checks that the cache directory of the locked version is not empty: the bytes were
3166
+ * verified when they were fetched, and a later edit of the deployed copy is the `modified`
3167
+ * drift check's job, not this one's.
3106
3168
  */
3107
- async restoredFromLockUrl(key, entry, snap) {
3169
+ async restoredFromStoreCache(key, entry, snap) {
3108
3170
  const origin = entry.library;
3109
3171
  if (!origin || origin.installed || !origin.sha256 || !origin.version) return false;
3110
3172
  if (isPseudoVersion(origin.version)) return false;
@@ -3124,7 +3186,8 @@ var AssetManager = class {
3124
3186
  * store (project `stores:` or the global catalog) that serves `kind:@publisher/name#version`
3125
3187
  * under the very sha256 the lock recorded holds the same bytes. The entry is fetched and
3126
3188
  * verified like any store asset; the lock stays as it is. `null` when the lock has no hash,
3127
- * no store answers, or the hash differs (OQ15, p1490).
3189
+ * no store answers, or the hash differs (OQ15, p1490). `from` names the store and the
3190
+ * upstream repository and commit its pointer gives, for the notice.
3128
3191
  */
3129
3192
  async storeEntryForLockedLibraryAsset(publisher, kind, name, origin) {
3130
3193
  if (!origin.sha256 || !origin.version || isPseudoVersion(origin.version)) return null;
@@ -3155,7 +3218,12 @@ var AssetManager = class {
3155
3218
  ],
3156
3219
  repositories
3157
3220
  );
3158
- if (entry) return entry;
3221
+ if (entry) {
3222
+ return {
3223
+ entry,
3224
+ from: `${store.url} (${sourceShortName(m.sourceUrl)}@${m.commit.slice(0, 7)})`
3225
+ };
3226
+ }
3159
3227
  } catch (err) {
3160
3228
  this.noteStoreFailure(store.url, err);
3161
3229
  }
@@ -3942,18 +4010,25 @@ var AssetManager = class {
3942
4010
  return this.installLocked(repositories, patches, dependencies);
3943
4011
  }
3944
4012
  const lockForLibraries = this.tryReadLock();
4013
+ const restoredFromStore = /* @__PURE__ */ new Set();
3945
4014
  if (lockForLibraries) {
3946
4015
  const unavailable = await this.unavailableLockedLibraries(lockForLibraries, dependencies);
3947
- if (unavailable.length > 0) {
4016
+ for (const key of unavailable.restored) restoredFromStore.add(key);
4017
+ if (unavailable.lines.length > 0) {
3948
4018
  return {
3949
4019
  deployed: [],
3950
4020
  removed: [],
3951
- missing: unavailable,
4021
+ missing: unavailable.lines,
3952
4022
  lockWritten: false,
3953
4023
  npmInstalled: [],
3954
4024
  npmFailed: []
3955
4025
  };
3956
4026
  }
4027
+ if (unavailable.restored.length > 0 && this.declaredMatchesLock(lockForLibraries, dependencies) && [...await this.declaredLockKeys(lockForLibraries, dependencies)].every(
4028
+ (key) => restoredFromStore.has(key)
4029
+ )) {
4030
+ return this.installLocked(repositories, patches, dependencies);
4031
+ }
3957
4032
  const orphans = await this.orphanedSourceGaps(
3958
4033
  await this.declaredLockKeys(lockForLibraries, dependencies),
3959
4034
  true
@@ -4070,6 +4145,27 @@ var AssetManager = class {
4070
4145
  const entries = [...await this.buildCatalogEntries(resolved, repositories), ...lib.entries];
4071
4146
  assertFlowsLoad(entries, "installed");
4072
4147
  assertNoLibrarySymlinks(entries, this.registry, repositories, opts?.link === true);
4148
+ if (libraryAssetCheck && lib.entries.length > 0) {
4149
+ const lockedIds = new Set([...lockedKeys].map((k) => k.split("#")[0]));
4150
+ const snap = await this.loadLibraryIndex();
4151
+ for (const e of lib.entries) {
4152
+ if (lockedIds.has(canonicalEntryRef(e).split("#")[0])) continue;
4153
+ const origin = lib.libraryOf.get(e);
4154
+ const libPath = origin ? this.libraryPath({ name: origin }, snap) : null;
4155
+ if (!origin || !libPath || !e.source) continue;
4156
+ const lines = libraryAssetCheck(
4157
+ { kind: e.kind, name: e.name, source: e.source },
4158
+ libPath
4159
+ ).filter((l) => /placeholder/i.test(l));
4160
+ if (lines.length > 0) {
4161
+ throw new Error(
4162
+ `${canonicalEntryRef(e)} in library "${origin}" fails the checks of \`skaile validate\` - nothing was installed:
4163
+ ${lines.map((l) => ` ${l}`).join("\n")}
4164
+ Fix the asset, then run \`skaile library index ${origin}\` and install again.`
4165
+ );
4166
+ }
4167
+ }
4168
+ }
4073
4169
  const forceCommand = opts?.moveLibraries === true ? "skaile update --force" : "skaile install --force";
4074
4170
  if (!opts?.force) {
4075
4171
  await this.assertNoHandEditsPruned(
@@ -4147,8 +4243,15 @@ var AssetManager = class {
4147
4243
  }
4148
4244
  this.recordInstallHistory(deployed, removed);
4149
4245
  const { npmInstalled, npmFailed } = await this.installRuntimeAssetDeps();
4150
- const reportedMissing = stillMissing.filter((m) => !storeNotChecked.some((n) => n.ref === m));
4246
+ const restoredRefs = stillMissing.filter((m) => {
4247
+ const keys = kept.keysByRef.get(m) ?? [];
4248
+ return keys.length > 0 && keys.every((k) => restoredFromStore.has(k));
4249
+ });
4250
+ const reportedMissing = stillMissing.filter(
4251
+ (m) => !storeNotChecked.some((n) => n.ref === m) && !restoredRefs.includes(m)
4252
+ );
4151
4253
  for (const n of storeNotChecked) delete missingHints[n.ref];
4254
+ for (const m of restoredRefs) delete missingHints[m];
4152
4255
  await this.adviseMissing(reportedMissing, missingHints);
4153
4256
  const placeholderBodies = scaffoldBodyRefs(lib.entries, deployed);
4154
4257
  const placeholderDescriptions = scaffoldDescriptionRefs(lib.entries, deployed);
@@ -4564,7 +4667,11 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
4564
4667
  ).split(sep).join("/");
4565
4668
  files = files.map((f) => `${dir}/${f}`);
4566
4669
  }
4567
- if (files.length > 0) lines.push(`${d.ref} (${files.join(", ")} was edited)`);
4670
+ if (files.length > 0) {
4671
+ lines.push(
4672
+ d.unrecorded ? `${d.ref} (${files.join(", ")} differs from the library's content now; the lock keeps no per-file record, so it may be a library change, not your edit)` : `${d.ref} (${files.join(", ")} was edited)`
4673
+ );
4674
+ }
4568
4675
  }
4569
4676
  if (lines.length === 0) return;
4570
4677
  throw new Error(
@@ -4939,7 +5046,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
4939
5046
  const p = parseRefTolerant(g.ref);
4940
5047
  return !(p && alreadyMissing.has(`${p.kind}:${p.name}`));
4941
5048
  }).map((g) => g.message);
4942
- const libraryNotices = this.lockUrlRestoreNotices(lock, library.viaStore);
5049
+ const libraryNotices = this.storeRestoreNotices(lock, library.viaStore, library.storeOrigins);
4943
5050
  const placeholderBodies = scaffoldBodyRefs(library.entries, deployed);
4944
5051
  const placeholderDescriptions = scaffoldDescriptionRefs(library.entries, deployed);
4945
5052
  return {
@@ -4958,22 +5065,31 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
4958
5065
  }
4959
5066
  /**
4960
5067
  * One notice line per locked library that is not registered here and whose assets
4961
- * `install --locked` restored from the lock url: names the library, how many assets came from
4962
- * the url, and how to register the library to move the lock later (OQ8, p1655).
5068
+ * `install --locked` restored from a store: names the library, how many assets came from
5069
+ * which store (and the upstream repository and commit its pointer names), and how to register
5070
+ * the library to move the lock later (OQ8, p1655). Every file was SHA-verified against the
5071
+ * hash the lock recorded.
4963
5072
  */
4964
- lockUrlRestoreNotices(lock, viaStore) {
5073
+ storeRestoreNotices(lock, viaStore, storeOrigins) {
4965
5074
  const byLibrary = /* @__PURE__ */ new Map();
4966
5075
  for (const key of viaStore) {
4967
5076
  const origin = lock.assets[key]?.library;
4968
5077
  if (!origin) continue;
4969
5078
  const name = unregisteredLibraryName(origin);
4970
- const row = byLibrary.get(name) ?? { ...origin.url ? { url: origin.url } : {}, refs: [] };
5079
+ const row = byLibrary.get(name) ?? {
5080
+ ...origin.url ? { url: origin.url } : {},
5081
+ refs: [],
5082
+ from: /* @__PURE__ */ new Set()
5083
+ };
4971
5084
  row.refs.push(key);
5085
+ const from = storeOrigins[key];
5086
+ if (from) row.from.add(from);
4972
5087
  byLibrary.set(name, row);
4973
5088
  }
4974
- return [...byLibrary].map(([name, { url, refs }]) => {
5089
+ return [...byLibrary].map(([name, { url, refs, from }]) => {
4975
5090
  const register = url ? `skaile library init ${name} --git ${url}` : `skaile library init ${name} --path <dir>`;
4976
- return `Library "${name}" is not registered here: restored ${refs.length} asset${refs.length === 1 ? "" : "s"} from the lock url${url ? ` ${url}` : ""}. Register it with \`${register}\` to move the lock later.`;
5091
+ const where = from.size > 0 ? ` from the store ${[...from].join(", ")}` : " from a store";
5092
+ return `Library "${name}" is not registered here: restored ${refs.length} asset${refs.length === 1 ? "" : "s"}${where}, every file checked against the lock. Register it with \`${register}\` to move the lock later.`;
4977
5093
  });
4978
5094
  }
4979
5095
  /**
@@ -7500,7 +7616,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7500
7616
  break;
7501
7617
  }
7502
7618
  librarySnap ??= { snap: await this.loadLibraryIndex() };
7503
- if (await this.restoredFromLockUrl(key, e, librarySnap.snap)) {
7619
+ if (await this.restoredFromStoreCache(key, e, librarySnap.snap)) {
7504
7620
  restorable = true;
7505
7621
  break;
7506
7622
  }
@@ -7702,11 +7818,15 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7702
7818
  named.add(gapIdentity(ref));
7703
7819
  }
7704
7820
  for (const d of await this.lockedCopyDrift()) {
7705
- if (named.has(gapIdentity(d.ref))) continue;
7821
+ if (named.has(gapIdentity(d.ref))) {
7822
+ const at = d.libraryChanged ? gaps.findIndex((g) => g.type === "content" && gapIdentity(g.ref) === gapIdentity(d.ref)) : -1;
7823
+ if (at < 0) continue;
7824
+ gaps.splice(at, 1);
7825
+ }
7706
7826
  const parts = [
7707
7827
  ...d.modified.map((f) => {
7708
7828
  const instance = d.instanceOf?.get(f);
7709
- return instance ? `${f}, the file of agent instance "${instance}", was edited` : `${f} was edited`;
7829
+ return instance ? `${f}, the file of agent instance "${instance}", was edited` : d.unrecorded ? `${f} differs from the library's content now (the lock keeps no per-file record: it may be a library change, not your edit)` : `${f} was edited`;
7710
7830
  }),
7711
7831
  ...d.extra.map((f) => `${f} is not part of the asset`)
7712
7832
  ];
@@ -7995,7 +8115,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7995
8115
  continue;
7996
8116
  }
7997
8117
  if (lookup.state === "unregistered") {
7998
- if (await this.restoredFromLockUrl(key, entry, snap)) continue;
8118
+ if (await this.restoredFromStoreCache(key, entry, snap)) continue;
7999
8119
  const reason2 = `is locked, but library "${unregisteredLibraryName(origin)}" is not registered (renamed or removed?) \u2014 ${unregisteredLibraryFix(origin, ref)}`;
8000
8120
  gaps.push({ type: "library", ref, reason: reason2, message: `${ref} ${reason2}`, manualFix: true });
8001
8121
  continue;
@@ -8439,7 +8559,15 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8439
8559
  })?.modified ?? [];
8440
8560
  }
8441
8561
  if (modified.length > 0) {
8442
- out.push({ ref, key, modified, extra: [], library: true, libraryChanged: true });
8562
+ out.push({
8563
+ ref,
8564
+ key,
8565
+ modified,
8566
+ extra: [],
8567
+ library: true,
8568
+ libraryChanged: true,
8569
+ ...entry.copied && entry.copied.length > 0 ? {} : { unrecorded: true }
8570
+ });
8443
8571
  }
8444
8572
  }
8445
8573
  return out;
@@ -8487,15 +8615,10 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8487
8615
  const ref = `${e.kind}:@${(e.publisher ?? "").replace(/^@/, "")}/${e.name}`;
8488
8616
  out.push({ ref, key: keyOf.get(ref) ?? ref, ...drift, library: true });
8489
8617
  }
8490
- out.push(
8491
- ...await this.changedLibraryCopyEdits(
8492
- lock,
8493
- new Set(
8494
- entries.map((e) => `${e.kind}:@${(e.publisher ?? "").replace(/^@/, "")}/${e.name}`)
8495
- ),
8496
- patches
8497
- )
8618
+ const restoredRefs = new Set(
8619
+ entries.map((e) => `${e.kind}:@${(e.publisher ?? "").replace(/^@/, "")}/${e.name}`)
8498
8620
  );
8621
+ out.push(...await this.changedLibraryCopyEdits(lock, restoredRefs, patches));
8499
8622
  for (const [key, entry] of Object.entries(lock.assets)) {
8500
8623
  if (!entry.source || entry.files.length === 0) continue;
8501
8624
  const { kind, name } = parseCanonicalLockKey(key);
@@ -8529,6 +8652,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8529
8652
  if (modified.length > 0 || extra.length > 0)
8530
8653
  out.push({ ref: refOf(key), key, modified, extra, library: false });
8531
8654
  }
8655
+ let snapForAgents;
8532
8656
  for (const [key, entry] of Object.entries(lock.assets)) {
8533
8657
  const recorded = [...entry.rendered ?? [], ...entry.composed ?? []];
8534
8658
  if (recorded.length === 0 || entry.library?.installed) continue;
@@ -8550,12 +8674,24 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8550
8674
  for (const inst of renderedInstanceFiles(this.projectDir, this.harness)) {
8551
8675
  for (const f of inst.files) if (modified.includes(f)) instanceOf.set(f, inst.id);
8552
8676
  }
8677
+ let libraryChanged = false;
8678
+ const origin = entry.library;
8679
+ const id = parseCanonicalLockKey(key);
8680
+ if (origin && id.publisher && !restoredRefs.has(refOf(key))) {
8681
+ snapForAgents ??= await this.loadLibraryIndex();
8682
+ libraryChanged = this.lockedLibrary(origin, snapForAgents, {
8683
+ kind,
8684
+ publisher: id.publisher,
8685
+ name
8686
+ }).state === "ok";
8687
+ }
8553
8688
  out.push({
8554
8689
  ref: refOf(key),
8555
8690
  key,
8556
8691
  modified,
8557
8692
  extra: [],
8558
8693
  library: false,
8694
+ ...libraryChanged ? { libraryChanged: true } : {},
8559
8695
  rendered: true,
8560
8696
  lockedSha: new Map(recorded.map((f) => [f.path, f.sha256])),
8561
8697
  instanceOf
@@ -9167,5 +9303,5 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9167
9303
  };
9168
9304
 
9169
9305
  export { AssetManager, LibraryEntryError, MissingManifestError, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName };
9170
- //# sourceMappingURL=chunk-PKBLJI23.js.map
9171
- //# sourceMappingURL=chunk-PKBLJI23.js.map
9306
+ //# sourceMappingURL=chunk-TGB4E5Z6.js.map
9307
+ //# sourceMappingURL=chunk-TGB4E5Z6.js.map