@skaile/workspaces 6.8.0 → 6.9.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 (335) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/ai-sdk.js +5 -5
  3. package/dist/{asset-feeds-NU5UOO5F.js → asset-feeds-JWRIWLVX.js} +19 -19
  4. package/dist/{asset-feeds-NU5UOO5F.js.map → asset-feeds-JWRIWLVX.js.map} +1 -1
  5. package/dist/asset-manager/catalog-deployer.js +4 -4
  6. package/dist/asset-manager/history.js +19 -1
  7. package/dist/asset-manager/index.js +11 -11
  8. package/dist/asset-manager/installer.js +7 -7
  9. package/dist/asset-manager/renderers.js +6 -6
  10. package/dist/asset-manager/src/history.d.ts.map +1 -1
  11. package/dist/asset-manager/src/index.d.ts +65 -3
  12. package/dist/asset-manager/src/index.d.ts.map +1 -1
  13. package/dist/bridge/harnesses/claude-sdk.js +9 -9
  14. package/dist/bridge/harnesses/codex.js +29 -12
  15. package/dist/bridge/harnesses/codex.js.map +1 -1
  16. package/dist/bridge/harnesses/continue.js +8 -8
  17. package/dist/bridge/harnesses/echo.js +3 -3
  18. package/dist/bridge/harnesses/gemini.js +8 -8
  19. package/dist/bridge/harnesses/goose.js +8 -8
  20. package/dist/bridge/harnesses/omp.js +156 -24
  21. package/dist/bridge/harnesses/omp.js.map +1 -1
  22. package/dist/bridge/harnesses/opencode.js +8 -8
  23. package/dist/bridge/harnesses/qwen.js +8 -8
  24. package/dist/bridge/index.js +14 -14
  25. package/dist/bridge/src/codex/friendly-error.d.ts +7 -1
  26. package/dist/bridge/src/codex/friendly-error.d.ts.map +1 -1
  27. package/dist/bridge/src/codex/login-fallback.d.ts +5 -0
  28. package/dist/bridge/src/codex/login-fallback.d.ts.map +1 -1
  29. package/dist/bridge/src/harnesses/codex.d.ts +2 -0
  30. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  31. package/dist/bridge/src/harnesses/omp.d.ts +17 -0
  32. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  33. package/dist/{chunk-757G6TTZ.js → chunk-23Q5LT4U.js} +331 -59
  34. package/dist/chunk-23Q5LT4U.js.map +1 -0
  35. package/dist/{chunk-SBNUXJ6E.js → chunk-3AIEJSQR.js} +3 -3
  36. package/dist/{chunk-SBNUXJ6E.js.map → chunk-3AIEJSQR.js.map} +1 -1
  37. package/dist/{chunk-KHWGUXSF.js → chunk-3EPRTMXY.js} +5 -5
  38. package/dist/{chunk-KHWGUXSF.js.map → chunk-3EPRTMXY.js.map} +1 -1
  39. package/dist/{chunk-TMJBEGS4.js → chunk-4KPQ6ILH.js} +5 -34
  40. package/dist/chunk-4KPQ6ILH.js.map +1 -0
  41. package/dist/{chunk-G7NMF5WQ.js → chunk-4ROXSQEG.js} +3 -3
  42. package/dist/{chunk-G7NMF5WQ.js.map → chunk-4ROXSQEG.js.map} +1 -1
  43. package/dist/{chunk-I6XH46Q6.js → chunk-4WB4KSSQ.js} +3 -3
  44. package/dist/{chunk-I6XH46Q6.js.map → chunk-4WB4KSSQ.js.map} +1 -1
  45. package/dist/{chunk-NW7Y5SNK.js → chunk-5AQLCRR7.js} +4 -4
  46. package/dist/{chunk-NW7Y5SNK.js.map → chunk-5AQLCRR7.js.map} +1 -1
  47. package/dist/{chunk-WFK4MUBL.js → chunk-5J6JWGY4.js} +3 -3
  48. package/dist/{chunk-WFK4MUBL.js.map → chunk-5J6JWGY4.js.map} +1 -1
  49. package/dist/{chunk-O5Y7VMVQ.js → chunk-5KWQMCH7.js} +3 -3
  50. package/dist/{chunk-O5Y7VMVQ.js.map → chunk-5KWQMCH7.js.map} +1 -1
  51. package/dist/{chunk-YHNPWSSH.js → chunk-5NTB64PW.js} +45 -13
  52. package/dist/chunk-5NTB64PW.js.map +1 -0
  53. package/dist/{chunk-QGA2OBUJ.js → chunk-72BDCGBB.js} +3 -3
  54. package/dist/{chunk-QGA2OBUJ.js.map → chunk-72BDCGBB.js.map} +1 -1
  55. package/dist/{chunk-KTBKW2FI.js → chunk-7QYBKUAS.js} +4 -3
  56. package/dist/chunk-7QYBKUAS.js.map +1 -0
  57. package/dist/{chunk-E3KABQS3.js → chunk-AERQFD6T.js} +4 -4
  58. package/dist/{chunk-E3KABQS3.js.map → chunk-AERQFD6T.js.map} +1 -1
  59. package/dist/{chunk-XIIIGLSL.js → chunk-AVRTZAH2.js} +9 -9
  60. package/dist/{chunk-XIIIGLSL.js.map → chunk-AVRTZAH2.js.map} +1 -1
  61. package/dist/{chunk-2I5HNM7K.js → chunk-B2DGCYVC.js} +18 -18
  62. package/dist/chunk-B2DGCYVC.js.map +1 -0
  63. package/dist/{chunk-3QX2X77G.js → chunk-C7L5MFUL.js} +3 -3
  64. package/dist/{chunk-3QX2X77G.js.map → chunk-C7L5MFUL.js.map} +1 -1
  65. package/dist/{chunk-ORXV3UB6.js → chunk-CFTTXUM2.js} +3 -3
  66. package/dist/{chunk-ORXV3UB6.js.map → chunk-CFTTXUM2.js.map} +1 -1
  67. package/dist/{chunk-DRHJRTAS.js → chunk-DZRN3SNG.js} +5 -5
  68. package/dist/{chunk-DRHJRTAS.js.map → chunk-DZRN3SNG.js.map} +1 -1
  69. package/dist/{chunk-QCR5AE5E.js → chunk-E675QKFG.js} +5 -5
  70. package/dist/{chunk-QCR5AE5E.js.map → chunk-E675QKFG.js.map} +1 -1
  71. package/dist/{chunk-O7ADRMCR.js → chunk-FZO64PLQ.js} +45 -16
  72. package/dist/chunk-FZO64PLQ.js.map +1 -0
  73. package/dist/{chunk-Y6LC5PEZ.js → chunk-GYBDWW6K.js} +14 -5
  74. package/dist/chunk-GYBDWW6K.js.map +1 -0
  75. package/dist/{chunk-CMXDFTA2.js → chunk-GYPPVANR.js} +3 -3
  76. package/dist/{chunk-CMXDFTA2.js.map → chunk-GYPPVANR.js.map} +1 -1
  77. package/dist/{chunk-G44FFUMA.js → chunk-GZL6RN4Z.js} +92 -14
  78. package/dist/chunk-GZL6RN4Z.js.map +1 -0
  79. package/dist/{chunk-DFP476EU.js → chunk-JY2JXCL6.js} +89 -4
  80. package/dist/chunk-JY2JXCL6.js.map +1 -0
  81. package/dist/{chunk-ZBA4P5TD.js → chunk-LMADWO4Q.js} +9 -6
  82. package/dist/chunk-LMADWO4Q.js.map +1 -0
  83. package/dist/{chunk-3HSLJAMJ.js → chunk-LYVLDGML.js} +3 -3
  84. package/dist/{chunk-3HSLJAMJ.js.map → chunk-LYVLDGML.js.map} +1 -1
  85. package/dist/{chunk-YZD7DUEF.js → chunk-M4G2SVXI.js} +3 -3
  86. package/dist/{chunk-YZD7DUEF.js.map → chunk-M4G2SVXI.js.map} +1 -1
  87. package/dist/{chunk-SGI5MRKP.js → chunk-MDCI4RSG.js} +40 -5
  88. package/dist/chunk-MDCI4RSG.js.map +1 -0
  89. package/dist/{chunk-LJ6PLEDU.js → chunk-MPRWVZXF.js} +316 -51
  90. package/dist/chunk-MPRWVZXF.js.map +1 -0
  91. package/dist/{chunk-KO3VSZQP.js → chunk-NDBHEOIA.js} +6 -6
  92. package/dist/{chunk-KO3VSZQP.js.map → chunk-NDBHEOIA.js.map} +1 -1
  93. package/dist/{chunk-HKRME377.js → chunk-NJVHGS7X.js} +4 -4
  94. package/dist/{chunk-HKRME377.js.map → chunk-NJVHGS7X.js.map} +1 -1
  95. package/dist/{chunk-Q6FKWPRO.js → chunk-O3FYOS64.js} +93 -14
  96. package/dist/chunk-O3FYOS64.js.map +1 -0
  97. package/dist/{chunk-RDIGVPXX.js → chunk-PTJZCOBH.js} +2 -2
  98. package/dist/{chunk-RDIGVPXX.js.map → chunk-PTJZCOBH.js.map} +1 -1
  99. package/dist/{chunk-4CD2R4MJ.js → chunk-QBUJTVMY.js} +4 -4
  100. package/dist/{chunk-4CD2R4MJ.js.map → chunk-QBUJTVMY.js.map} +1 -1
  101. package/dist/{chunk-LL5GMUQG.js → chunk-SE6OL7Y5.js} +7 -7
  102. package/dist/{chunk-LL5GMUQG.js.map → chunk-SE6OL7Y5.js.map} +1 -1
  103. package/dist/{chunk-SILFO5RY.js → chunk-SQMDFM4N.js} +2 -2
  104. package/dist/{chunk-SILFO5RY.js.map → chunk-SQMDFM4N.js.map} +1 -1
  105. package/dist/{chunk-REAF7ZFA.js → chunk-T5EIWWEJ.js} +398 -36
  106. package/dist/chunk-T5EIWWEJ.js.map +1 -0
  107. package/dist/{chunk-QW5B3TEO.js → chunk-TMQFOJ6F.js} +3 -3
  108. package/dist/{chunk-QW5B3TEO.js.map → chunk-TMQFOJ6F.js.map} +1 -1
  109. package/dist/{chunk-BB5EJLKZ.js → chunk-TUOHA6BM.js} +2 -2
  110. package/dist/{chunk-BB5EJLKZ.js.map → chunk-TUOHA6BM.js.map} +1 -1
  111. package/dist/{chunk-HLAEYFUN.js → chunk-U3FI4DVT.js} +3 -3
  112. package/dist/{chunk-HLAEYFUN.js.map → chunk-U3FI4DVT.js.map} +1 -1
  113. package/dist/{chunk-237BMOZW.js → chunk-UWD7YBDR.js} +4 -4
  114. package/dist/{chunk-237BMOZW.js.map → chunk-UWD7YBDR.js.map} +1 -1
  115. package/dist/{chunk-6ZM5X2XW.js → chunk-V2CONXKD.js} +3 -3
  116. package/dist/{chunk-6ZM5X2XW.js.map → chunk-V2CONXKD.js.map} +1 -1
  117. package/dist/{chunk-3NJFPGEB.js → chunk-V3EJYOP2.js} +6 -6
  118. package/dist/{chunk-3NJFPGEB.js.map → chunk-V3EJYOP2.js.map} +1 -1
  119. package/dist/{chunk-K7ZGY2BY.js → chunk-WPLZGT5Z.js} +4095 -3888
  120. package/dist/chunk-WPLZGT5Z.js.map +1 -0
  121. package/dist/{chunk-VT6G5AJV.js → chunk-WS3BOCAT.js} +4 -3
  122. package/dist/chunk-WS3BOCAT.js.map +1 -0
  123. package/dist/{chunk-7YOHUX2M.js → chunk-X2B5GMJO.js} +18 -9
  124. package/dist/chunk-X2B5GMJO.js.map +1 -0
  125. package/dist/{chunk-YGP6XEPA.js → chunk-XPKUFOS3.js} +6 -6
  126. package/dist/{chunk-YGP6XEPA.js.map → chunk-XPKUFOS3.js.map} +1 -1
  127. package/dist/{chunk-XCGDRLMH.js → chunk-Y242OE4B.js} +3 -3
  128. package/dist/{chunk-XCGDRLMH.js.map → chunk-Y242OE4B.js.map} +1 -1
  129. package/dist/{chunk-K6HCOTOZ.js → chunk-Y2BQWZXT.js} +41 -35
  130. package/dist/chunk-Y2BQWZXT.js.map +1 -0
  131. package/dist/{chunk-5TLMHB2U.js → chunk-YGT3CGPD.js} +6 -3
  132. package/dist/chunk-YGT3CGPD.js.map +1 -0
  133. package/dist/{claude-code-AESK7XO4.js → claude-code-YRJIGXTL.js} +5 -5
  134. package/dist/{claude-code-AESK7XO4.js.map → claude-code-YRJIGXTL.js.map} +1 -1
  135. package/dist/cli/index.js +277 -143
  136. package/dist/cli/index.js.map +1 -1
  137. package/dist/cli/src/agent-pins.d.ts +8 -0
  138. package/dist/cli/src/agent-pins.d.ts.map +1 -1
  139. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  140. package/dist/cli/src/commands/catalog.d.ts +4 -4
  141. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  142. package/dist/cli/src/commands/connector.d.ts.map +1 -1
  143. package/dist/cli/src/commands/deploy.d.ts.map +1 -1
  144. package/dist/cli/src/commands/flow.d.ts.map +1 -1
  145. package/dist/cli/src/commands/harness.d.ts.map +1 -1
  146. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  147. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  148. package/dist/cli/src/commands/library-index.d.ts +42 -0
  149. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  150. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  151. package/dist/cli/src/commands/npx.d.ts.map +1 -1
  152. package/dist/cli/src/commands/patch.d.ts.map +1 -1
  153. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  154. package/dist/cli/src/commands/project.d.ts.map +1 -1
  155. package/dist/cli/src/commands/run.d.ts.map +1 -1
  156. package/dist/cli/src/commands/serve-preflight.d.ts +10 -0
  157. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  158. package/dist/cli/src/commands/serve.d.ts +5 -3
  159. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  160. package/dist/cli/src/commands/session.d.ts.map +1 -1
  161. package/dist/cli/src/commands/source.d.ts.map +1 -1
  162. package/dist/cli/src/commands/store.d.ts.map +1 -1
  163. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  164. package/dist/cli/src/config-checks.d.ts +13 -0
  165. package/dist/cli/src/config-checks.d.ts.map +1 -1
  166. package/dist/cli/src/group-help.d.ts +11 -0
  167. package/dist/cli/src/group-help.d.ts.map +1 -0
  168. package/dist/connectors/config.js +2 -2
  169. package/dist/connectors/index.js +17 -17
  170. package/dist/connectors/src/config.d.ts.map +1 -1
  171. package/dist/connectors/src/connector-manager.d.ts +66 -2
  172. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  173. package/dist/connectors/src/connector-prompt.d.ts.map +1 -1
  174. package/dist/connectors/src/connector-types.d.ts +6 -0
  175. package/dist/connectors/src/connector-types.d.ts.map +1 -1
  176. package/dist/connectors/src/fleet-utils.d.ts +33 -0
  177. package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
  178. package/dist/connectors/src/index.d.ts +2 -2
  179. package/dist/connectors/src/index.d.ts.map +1 -1
  180. package/dist/{connectors-5ZZRVAPD.js → connectors-JKT32HZT.js} +20 -20
  181. package/dist/{connectors-5ZZRVAPD.js.map → connectors-JKT32HZT.js.map} +1 -1
  182. package/dist/core/index.js +4 -4
  183. package/dist/core/logging.js +1 -1
  184. package/dist/core/runtime-assets.js +2 -2
  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/logging/config.d.ts.map +1 -1
  188. package/dist/core/src/repo-manager.d.ts +6 -0
  189. package/dist/core/src/repo-manager.d.ts.map +1 -1
  190. package/dist/core/src/run-state-ignore.d.ts +6 -4
  191. package/dist/core/src/run-state-ignore.d.ts.map +1 -1
  192. package/dist/core/src/walker.d.ts.map +1 -1
  193. package/dist/core/src/workspace-config.d.ts +6 -0
  194. package/dist/core/src/workspace-config.d.ts.map +1 -1
  195. package/dist/core/workspace-config.js +1 -1
  196. package/dist/deploy/index.js +4 -4
  197. package/dist/discovery/index.js +2 -2
  198. package/dist/{ensure-sources-VLJ7AUUK.js → ensure-sources-GUJODKY5.js} +23 -23
  199. package/dist/{ensure-sources-VLJ7AUUK.js.map → ensure-sources-GUJODKY5.js.map} +1 -1
  200. package/dist/factory-assets/connectors/box.js +17 -17
  201. package/dist/factory-assets/connectors/deploy.js +17 -17
  202. package/dist/factory-assets/connectors/devserver.js +17 -17
  203. package/dist/factory-assets/connectors/flow/adapter.js +17 -17
  204. package/dist/factory-assets/connectors/flow/engine.js +5 -5
  205. package/dist/factory-assets/connectors/flow/run-flow.js +18 -18
  206. package/dist/factory-assets/connectors/flow.js +17 -17
  207. package/dist/factory-assets/connectors/git.js +17 -17
  208. package/dist/factory-assets/connectors/gmail.js +17 -17
  209. package/dist/factory-assets/connectors/googledrive.js +17 -17
  210. package/dist/factory-assets/connectors/local.js +17 -17
  211. package/dist/factory-assets/connectors/mattermost.js +17 -17
  212. package/dist/factory-assets/connectors/memory.js +17 -17
  213. package/dist/factory-assets/connectors/minio.js +17 -17
  214. package/dist/factory-assets/connectors/postgres.js +17 -17
  215. package/dist/factory-assets/connectors/s3.js +17 -17
  216. package/dist/factory-assets/connectors/sharepoint.js +17 -17
  217. package/dist/factory-assets/connectors/sqlite.js +17 -17
  218. package/dist/factory-assets/connectors/static-server.js +17 -17
  219. package/dist/factory-assets/connectors/tunnel.js +17 -17
  220. package/dist/factory-assets/connectors/webdav.js +17 -17
  221. package/dist/factory-assets/connectors/xstate-store.js +17 -17
  222. package/dist/factory-assets/connectors/xstate.js +17 -17
  223. package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +4 -4
  224. package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +10 -10
  225. package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +15 -15
  226. package/dist/factory-assets/skills/manifest-compliance/SKILL.md +1 -1
  227. package/dist/{flows-I6ODIPZZ.js → flows-UCP6ZUYS.js} +7 -7
  228. package/dist/{flows-I6ODIPZZ.js.map → flows-UCP6ZUYS.js.map} +1 -1
  229. package/dist/{helpers-APXGTZ5A.js → helpers-SO53MRHF.js} +23 -23
  230. package/dist/{helpers-APXGTZ5A.js.map → helpers-SO53MRHF.js.map} +1 -1
  231. package/dist/library/index.js +7 -7
  232. package/dist/library/src/index.d.ts +1 -1
  233. package/dist/library/src/index.d.ts.map +1 -1
  234. package/dist/library/src/remote/index.d.ts +1 -1
  235. package/dist/library/src/remote/index.d.ts.map +1 -1
  236. package/dist/library/src/remote/remote-catalog-source.d.ts +33 -2
  237. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  238. package/dist/{library-publish-B5HL4OBE.js → library-publish-Z5E3YZCZ.js} +61 -47
  239. package/dist/library-publish-Z5E3YZCZ.js.map +1 -0
  240. package/dist/model-endpoint/index.js +7 -7
  241. package/dist/model-endpoint/src/index.d.ts +1 -1
  242. package/dist/model-endpoint/src/index.d.ts.map +1 -1
  243. package/dist/model-endpoint/src/openai-agent.d.ts +60 -0
  244. package/dist/model-endpoint/src/openai-agent.d.ts.map +1 -0
  245. package/dist/model-endpoint/src/resolve.d.ts +12 -3
  246. package/dist/model-endpoint/src/resolve.d.ts.map +1 -1
  247. package/dist/model-endpoint/src/server.d.ts.map +1 -1
  248. package/dist/model-endpoint/src/types.d.ts +33 -0
  249. package/dist/model-endpoint/src/types.d.ts.map +1 -1
  250. package/dist/model-endpoint/src/upstream-models.d.ts +20 -0
  251. package/dist/model-endpoint/src/upstream-models.d.ts.map +1 -0
  252. package/dist/{open-library-F56D46K7.js → open-library-A5OB72FD.js} +26 -26
  253. package/dist/{open-library-F56D46K7.js.map → open-library-A5OB72FD.js.map} +1 -1
  254. package/dist/{open-registry-RZW2AFD6.js → open-registry-BHBHQMBA.js} +11 -11
  255. package/dist/{open-registry-RZW2AFD6.js.map → open-registry-BHBHQMBA.js.map} +1 -1
  256. package/dist/{paths-RPK5PNZQ.js → paths-77PXOXZY.js} +7 -7
  257. package/dist/{paths-RPK5PNZQ.js.map → paths-77PXOXZY.js.map} +1 -1
  258. package/dist/{plugin-store-OJTERUEZ.js → plugin-store-XQP2CRYH.js} +7 -7
  259. package/dist/{plugin-store-OJTERUEZ.js.map → plugin-store-XQP2CRYH.js.map} +1 -1
  260. package/dist/{project-GLTP6VFV.js → project-KTEUN7KR.js} +39 -40
  261. package/dist/{project-GLTP6VFV.js.map → project-KTEUN7KR.js.map} +1 -1
  262. package/dist/resolver/index.js +4 -4
  263. package/dist/runner/index.js +28 -28
  264. package/dist/runner/src/agent-loop.d.ts +42 -0
  265. package/dist/runner/src/agent-loop.d.ts.map +1 -0
  266. package/dist/runner/src/agents/in-process-host.d.ts +9 -6
  267. package/dist/runner/src/agents/in-process-host.d.ts.map +1 -1
  268. package/dist/runner/src/model-endpoint-discovery.d.ts +3 -0
  269. package/dist/runner/src/model-endpoint-discovery.d.ts.map +1 -1
  270. package/dist/runner/src/resource-handler.d.ts +1 -1
  271. package/dist/runner/src/resource-handler.d.ts.map +1 -1
  272. package/dist/runner/src/resources.d.ts +1 -0
  273. package/dist/runner/src/resources.d.ts.map +1 -1
  274. package/dist/runner/src/serve.d.ts.map +1 -1
  275. package/dist/runner/src/session-builder.d.ts +6 -4
  276. package/dist/runner/src/session-builder.d.ts.map +1 -1
  277. package/dist/runner/src/session-resource-handlers.d.ts.map +1 -1
  278. package/dist/runner/src/turn-scheduler.d.ts +29 -2
  279. package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
  280. package/dist/sdk/asset-manager.js +11 -11
  281. package/dist/sdk/bridge.js +14 -14
  282. package/dist/sdk/core.js +4 -4
  283. package/dist/sdk/flow.js +5 -5
  284. package/dist/sdk/index.js +28 -28
  285. package/dist/sdk/resolver.js +4 -4
  286. package/dist/sdk/runner.js +28 -28
  287. package/dist/sdk/transport/ws/server.js +5 -5
  288. package/dist/sdk/transport/ws.js +5 -5
  289. package/dist/sdk/transport.js +5 -5
  290. package/dist/{serve-preflight-EHLBSNUE.js → serve-preflight-ODQGVUFL.js} +27 -26
  291. package/dist/{serve-preflight-EHLBSNUE.js.map → serve-preflight-ODQGVUFL.js.map} +1 -1
  292. package/dist/{setup-PMZLMFCD.js → setup-QJDI5YAW.js} +24 -24
  293. package/dist/{setup-PMZLMFCD.js.map → setup-QJDI5YAW.js.map} +1 -1
  294. package/dist/{skills-KHHW3RZ3.js → skills-DE2BDQ6G.js} +6 -6
  295. package/dist/{skills-KHHW3RZ3.js.map → skills-DE2BDQ6G.js.map} +1 -1
  296. package/dist/{source-QNSGAM3S.js → source-FKOUYMEM.js} +39 -39
  297. package/dist/{source-QNSGAM3S.js.map → source-FKOUYMEM.js.map} +1 -1
  298. package/dist/{source-manifest-publish-AI725AVE.js → source-manifest-publish-JA4TY4Z6.js} +41 -41
  299. package/dist/{source-manifest-publish-AI725AVE.js.map → source-manifest-publish-JA4TY4Z6.js.map} +1 -1
  300. package/dist/transport/index.js +5 -5
  301. package/dist/transport/ws/server.js +5 -5
  302. package/dist/transport/ws.js +5 -5
  303. package/dist/tui/index.js +29 -29
  304. package/dist/tui/index.js.map +1 -1
  305. package/dist/tui/src/repl.d.ts.map +1 -1
  306. package/dist/types/manifests.js +1 -1
  307. package/dist/types/src/manifests/scaffold-body.d.ts +1 -1
  308. package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
  309. package/dist/workspace-plugin/adapters/mcp.js +20 -20
  310. package/dist/workspace-plugin/adapters/omp.js +14 -14
  311. package/dist/workspace-plugin/index.js +2 -2
  312. package/dist/workspace-plugin/src/tools/connectors.d.ts.map +1 -1
  313. package/package.json +1 -1
  314. package/dist/chunk-2I5HNM7K.js.map +0 -1
  315. package/dist/chunk-5TLMHB2U.js.map +0 -1
  316. package/dist/chunk-757G6TTZ.js.map +0 -1
  317. package/dist/chunk-7YOHUX2M.js.map +0 -1
  318. package/dist/chunk-DFP476EU.js.map +0 -1
  319. package/dist/chunk-G44FFUMA.js.map +0 -1
  320. package/dist/chunk-K6HCOTOZ.js.map +0 -1
  321. package/dist/chunk-K7ZGY2BY.js.map +0 -1
  322. package/dist/chunk-KTBKW2FI.js.map +0 -1
  323. package/dist/chunk-LJ6PLEDU.js.map +0 -1
  324. package/dist/chunk-O7ADRMCR.js.map +0 -1
  325. package/dist/chunk-PMZMG3HC.js +0 -83
  326. package/dist/chunk-PMZMG3HC.js.map +0 -1
  327. package/dist/chunk-Q6FKWPRO.js.map +0 -1
  328. package/dist/chunk-REAF7ZFA.js.map +0 -1
  329. package/dist/chunk-SGI5MRKP.js.map +0 -1
  330. package/dist/chunk-TMJBEGS4.js.map +0 -1
  331. package/dist/chunk-VT6G5AJV.js.map +0 -1
  332. package/dist/chunk-Y6LC5PEZ.js.map +0 -1
  333. package/dist/chunk-YHNPWSSH.js.map +0 -1
  334. package/dist/chunk-ZBA4P5TD.js.map +0 -1
  335. package/dist/library-publish-B5HL4OBE.js.map +0 -1
@@ -1,20 +1,21 @@
1
- import { unregisteredLibraryNames, libraryDirMissing, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, lastLibraryName, filesEntryPaths } from './chunk-G44FFUMA.js';
2
- import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-O5Y7VMVQ.js';
1
+ import { StoreProbe, unregisteredLibraryNames, libraryDirMissing, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, lastLibraryName, filesEntryPaths } from './chunk-GZL6RN4Z.js';
2
+ import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-5KWQMCH7.js';
3
3
  import { parseFlowDefinition } from './chunk-JRN5QF4C.js';
4
- import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, entriesNeedingDeploy, resetMissingParentWarnings, assertNoLibrarySymlinks, composedDriftRefs, deployAll, removeAsset, sourceComposedFiles, cachedComposedFiles, createScaffold, composedAgentNamesOf, installAgent } from './chunk-KO3VSZQP.js';
5
- import { appendHistory, getRecentHistory, clearHistory } from './chunk-KTBKW2FI.js';
4
+ import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, entriesNeedingDeploy, resetMissingParentWarnings, assertNoLibrarySymlinks, composedDriftRefs, deployAll, removeAsset, sourceComposedFiles, cachedComposedFiles, createScaffold, composedAgentNamesOf, installAgent } from './chunk-NDBHEOIA.js';
5
+ import { appendHistory, getRecentHistory, clearHistory } from './chunk-7QYBKUAS.js';
6
6
  import { commitChanges } from './chunk-UQ6LFBPZ.js';
7
- import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-4CD2R4MJ.js';
8
- import { isScaffoldBody, isScaffoldDescription } from './chunk-VT6G5AJV.js';
9
- import { resolveConfiguredHarnessName, computeHash, FACTORY_SOURCE_URL, isFactoryMemorySource, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, LockParseError, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, ensureRunStateIgnored, LOCK_SCHEMA_VERSION } from './chunk-TMJBEGS4.js';
10
- import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-G7NMF5WQ.js';
7
+ import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-QBUJTVMY.js';
8
+ import { isScaffoldBody, isScaffoldDescription } from './chunk-WS3BOCAT.js';
9
+ import { resolveConfiguredHarnessName, computeHash, FACTORY_SOURCE_URL, isFactoryMemorySource, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, LockParseError, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-4KPQ6ILH.js';
10
+ import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-4ROXSQEG.js';
11
11
  import { deployedBase, deployedPaths, deployedDir, isDeployed } from './chunk-5KRMNUL4.js';
12
- import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveSourcePublisher, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, cloneOriginMismatch, DEFAULT_AGENT_INSTANCE_ID, MAX_PRESET_DEPTH, PresetDepthError } from './chunk-O7ADRMCR.js';
12
+ import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, isSourceCloned, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveSourcePublisher, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, cloneOriginMismatch, DEFAULT_AGENT_INSTANCE_ID, MAX_PRESET_DEPTH, PresetDepthError } from './chunk-FZO64PLQ.js';
13
13
  import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-L5VSIPQD.js';
14
14
  import { HARNESS_TARGETS, SUPPORTED_HARNESSES } from './chunk-VTETQCR6.js';
15
15
  import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, isNonAssetDir, isNonAssetFile } from './chunk-QC5BYUED.js';
16
16
  import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-GNUA7XT2.js';
17
17
  import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-V5KG6CCV.js';
18
+ import { ensureRunStateIgnored } from './chunk-MDCI4RSG.js';
18
19
  import { spawnSync } from 'child_process';
19
20
  import { existsSync, rmSync, readFileSync, writeFileSync, readdirSync, lstatSync, statSync, realpathSync, unlinkSync, mkdirSync } from 'fs';
20
21
  import { homedir } from 'os';
@@ -1330,6 +1331,7 @@ function unregisteredLibraryFix(origin, ref) {
1330
1331
  function declaredNoHolderReason(ref) {
1331
1332
  return `is declared but no library or source holds it \u2014 register the library that holds it with \`skaile library init <name> --path <dir>\`, or drop it with \`skaile remove ${ref.split("#")[0]}\``;
1332
1333
  }
1334
+ var RUN_SOURCE_SYNC = "run `skaile source sync` to clone it again";
1333
1335
  var REGISTER_HOLDER = "register the library that holds it with `skaile library init <name> --path <dir>`";
1334
1336
  function requirementNoHolderFix(asset) {
1335
1337
  return `${REGISTER_HOLDER}, or drop ${asset} with \`skaile remove ${asset}\``;
@@ -1463,6 +1465,19 @@ function sameBytes(a, b) {
1463
1465
  return false;
1464
1466
  }
1465
1467
  }
1468
+ function matchesRecordedHashes(path2, recorded) {
1469
+ try {
1470
+ const st = lstatSync(path2);
1471
+ if (st.isSymbolicLink()) return false;
1472
+ if (st.isDirectory()) {
1473
+ return readdirSync(path2).every((n) => matchesRecordedHashes(join(path2, n), recorded));
1474
+ }
1475
+ const want = recorded.get(resolve(path2));
1476
+ return want !== void 0 && computeHash(path2) === want;
1477
+ } catch {
1478
+ return false;
1479
+ }
1480
+ }
1466
1481
  var ENTRY_HARNESSES_KEY = "global_asset_harnesses";
1467
1482
  function sameList(a, b) {
1468
1483
  return a.length === b.length && a.every((v, i) => v === b[i]);
@@ -1507,6 +1522,8 @@ var AssetManager = class {
1507
1522
  verboseCollisions;
1508
1523
  /** Store URLs whose failed version lookup was already reported (one warning per URL). */
1509
1524
  warnedStoreVersionLookups = /* @__PURE__ */ new Set();
1525
+ /** Whether each store answers: one command asks a dead store once ({@link StoreProbe}). */
1526
+ storeProbe = new StoreProbe();
1510
1527
  /** Stores a lookup could not reach (store URL -> one line why); `add` reports them instead of "not found". */
1511
1528
  storeFailures = /* @__PURE__ */ new Map();
1512
1529
  /** The agent `add` is about to bind to an instance: its deploy writes no file named after the asset. */
@@ -2182,18 +2199,16 @@ var AssetManager = class {
2182
2199
  }
2183
2200
  return { repositories, sources, stores, dependencies, overrides, patches, config };
2184
2201
  }
2185
- /** Build provenance-index clones from the resolved source declarations. */
2186
- buildClones(repositories) {
2202
+ /** Build provenance-index clones from the resolved source declarations; a clone folder with no git checkout goes to `onSourceError`. */
2203
+ buildClones(repositories, onSourceError = this.reportSourceError) {
2187
2204
  const clones = [];
2188
2205
  for (const [slug, decl] of Object.entries(repositories)) {
2189
2206
  const localPath = this.resolveRepoDir(decl, slug);
2190
2207
  if (!localPath || !existsSync(localPath)) continue;
2191
- if (decl.url && !decl.factory && !existsSync(join(localPath, ".git"))) {
2192
- this.reportSourceError(
2208
+ if (decl.url && !decl.factory && !isSourceCloned(localPath)) {
2209
+ onSourceError(
2193
2210
  { localPath, sourceUrl: decl.url, commit: "" },
2194
- new Error(
2195
- `${decl.url}: its clone ${localPath} is not a git repository, so git pull fails - run \`skaile source sync\` to clone it again`
2196
- )
2211
+ new Error(`${decl.url}: its clone is not a git checkout - ${RUN_SOURCE_SYNC}`)
2197
2212
  );
2198
2213
  continue;
2199
2214
  }
@@ -2913,8 +2928,9 @@ var AssetManager = class {
2913
2928
  if (!hit || links[hit[0]]) continue;
2914
2929
  const dir = this.resolveRepoDir(hit[1], hit[0]);
2915
2930
  if (!dir || isCommitOnRemote(dir, c.commit)) continue;
2931
+ const branch = hit[1].branch ?? "main";
2916
2932
  throw new Error(
2917
- `${c.sourceUrl} clone has unpublished commit ${c.commit.slice(0, 7)} - push it, or reset the clone (git -C ${dir} reset --hard origin/${hit[1].branch ?? "main"}) - nothing was locked`
2933
+ `${c.sourceUrl} clone has unpublished commit ${c.commit.slice(0, 7)} - push it, or reset the clone (git -C ${dir} checkout -B ${branch} origin/${branch}) - nothing was locked`
2918
2934
  );
2919
2935
  }
2920
2936
  }
@@ -3674,6 +3690,31 @@ var AssetManager = class {
3674
3690
  const holder = asset && origin.sha256 ? this.libraryHoldingLockedBytes(origin.sha256, asset, snap) : void 0;
3675
3691
  return holder ? { state: "ok", path: holder.path, name: holder.name, matched: "content" } : byName;
3676
3692
  }
3693
+ /**
3694
+ * Why `install --locked` cannot restore a locked library asset from its library: the library
3695
+ * holds another version than the lock (`library "x" is at 0.1.1, locked 0.1.0`) or the locked
3696
+ * version with other bytes (`library "x" content changed since lock`). Only `update` moves
3697
+ * the lock to it. `undefined` when the library is not here, no longer holds the asset, or
3698
+ * still holds the locked files (the other gaps say what is wrong then).
3699
+ */
3700
+ async libraryAheadOfLock(origin, asset) {
3701
+ const snap = await this.loadLibraryIndex();
3702
+ const lookup = this.lockedLibrary(origin, snap, asset);
3703
+ if (lookup.state !== "ok" || !origin.version) return void 0;
3704
+ const found = (await scanDirectory(lookup.path, asset.publisher, { knownKinds: this.knownKinds })).find((x) => x.kind === asset.kind && x.name === asset.name);
3705
+ if (!found) return void 0;
3706
+ const current = libraryAssetVersion(snap, lookup.name, asset, found.version) || "0.0.0";
3707
+ const sameVersion = current === origin.version || isPseudoVersion(current) && isPseudoVersion(origin.version);
3708
+ if (!sameVersion) {
3709
+ const comparable = !isPseudoVersion(current) && !isPseudoVersion(origin.version);
3710
+ return comparable ? `library "${lookup.name}" is at ${current}, locked ${origin.version}` : void 0;
3711
+ }
3712
+ if (!origin.sha256) return void 0;
3713
+ const onDisk = libraryDiskHashes(lookup.path, /* @__PURE__ */ new Map(), this.registry).get(
3714
+ `${asset.kind}:${asset.name}`
3715
+ );
3716
+ return onDisk !== void 0 && onDisk !== origin.sha256 ? `library "${lookup.name}" content changed since lock` : void 0;
3717
+ }
3677
3718
  /** The registered library whose files for `asset` hash to `sha256` (the locked bytes), if any. */
3678
3719
  libraryHoldingLockedBytes(sha256, asset, snap) {
3679
3720
  if (!snap) return void 0;
@@ -3830,6 +3871,33 @@ var AssetManager = class {
3830
3871
  }
3831
3872
  return out;
3832
3873
  }
3874
+ /**
3875
+ * The locked assets whose entry says `origin: store`, by identity -> the store URL. A store
3876
+ * origin is a pin: no source that holds the same ref takes the asset until `skaile remove`
3877
+ * and `skaile add` move it (`update`, `install`, `add`). A declared ref whose `#pin` the
3878
+ * locked version does not satisfy is the user asking for another version: it is not pinned.
3879
+ *
3880
+ * @param declared - The `dependencies:` refs of `skaile.yaml`.
3881
+ * @param asked - Refs being resolved now.
3882
+ */
3883
+ storePinnedIdentities(declared, asked) {
3884
+ const out = /* @__PURE__ */ new Map();
3885
+ const pins = /* @__PURE__ */ new Map();
3886
+ for (const ref of [...declared, ...asked]) {
3887
+ const id = refIdentity(ref);
3888
+ if (id !== null && ref.includes("#")) pins.set(id, ref.slice(ref.indexOf("#") + 1).trim());
3889
+ }
3890
+ for (const [key, e] of Object.entries(this.tryReadLock()?.assets ?? {})) {
3891
+ if (e.origin !== "store" || e.library) continue;
3892
+ const { publisher, kind, name, version } = parseCanonicalLockKey(key);
3893
+ if (!publisher || !kind || !name) continue;
3894
+ const id = `${publisher}/${kind}:${name}`;
3895
+ const pin = pins.get(id);
3896
+ if (pin && version && !matchPin(pin, version)) continue;
3897
+ out.set(id, e.store);
3898
+ }
3899
+ return out;
3900
+ }
3833
3901
  /**
3834
3902
  * Say which registered library holds a ref the lock keeps on its source or the store: the
3835
3903
  * candidate that lost, with the way to switch (p1490). Printed once per `add`.
@@ -3934,6 +4002,7 @@ var AssetManager = class {
3934
4002
  const keptVersions = {};
3935
4003
  const versionBlocked = [];
3936
4004
  const contentHeld = [];
4005
+ const libraryPresets = [];
3937
4006
  const lib = { entries: [], resolved: /* @__PURE__ */ new Set(), libraryOf: /* @__PURE__ */ new Map() };
3938
4007
  const missing = /* @__PURE__ */ new Set();
3939
4008
  const seen = /* @__PURE__ */ new Set();
@@ -3985,6 +4054,7 @@ var AssetManager = class {
3985
4054
  skipped: e.skippedItems ?? 0,
3986
4055
  ...origin ? { library: origin } : {}
3987
4056
  });
4057
+ if (origin) libraryPresets.push({ entry: e, library: origin });
3988
4058
  } else if (keep) {
3989
4059
  keptVersions[keep.key] = keep.entry;
3990
4060
  const sameVersion = coerceVersion(e.version ?? "") === coerceVersion(keep.entry.library?.version ?? "");
@@ -4059,7 +4129,22 @@ var AssetManager = class {
4059
4129
  const next = absorb(hit);
4060
4130
  const rest = fresh.filter((ref) => !hit.resolved.has(ref));
4061
4131
  if (rest.length > 0) {
4062
- const r = await this.resolveWithStores(rest, opts);
4132
+ const pinnedToStore = this.storePinnedIdentities(opts.declaredRefs ?? [], fresh);
4133
+ let index = opts.provenanceIndex;
4134
+ if (pinnedToStore.size > 0) {
4135
+ index = new Map(index);
4136
+ for (const [id, store] of pinnedToStore) {
4137
+ const losers = index.get(id) ?? [];
4138
+ index.delete(id);
4139
+ if (losers.length === 0 || !(opts.warnCollisions || opts.noteStorePinned)) continue;
4140
+ const plain = id.replace(/^([^/]+)\/([^:]+):(.*)$/, "$2:@$1/$3");
4141
+ this.emitLibraryCollision(
4142
+ `${plain} is locked from the store${store ? ` ${store}` : ""}, which wins; source ${[...new Set(losers.map((c) => c.sourceUrl))].join(", ")} also holds it and is not used. To switch, run \`skaile remove ${plain}\`, then \`skaile add ${plain}\`.`,
4143
+ [plain]
4144
+ );
4145
+ }
4146
+ }
4147
+ const r = await this.resolveWithStores(rest, { ...opts, provenanceIndex: index });
4063
4148
  for (const c of r.resolved) {
4064
4149
  const id = `${c.publisher}/${c.kind}:${c.name}`;
4065
4150
  if (covered.has(id)) continue;
@@ -4102,6 +4187,7 @@ var AssetManager = class {
4102
4187
  requiredBy,
4103
4188
  keptVersions,
4104
4189
  versionBlocked,
4190
+ libraryPresets,
4105
4191
  contentHeld
4106
4192
  };
4107
4193
  }
@@ -4441,7 +4527,8 @@ var AssetManager = class {
4441
4527
  ...opts?.moveLibraries ? { preferLocked: await this.lockedPreference() } : { lockedLibraries: await this.lockedLibraryNames() },
4442
4528
  ...keepLocked ? { keepLocked } : {},
4443
4529
  lockedOrigin: this.lockedOriginVersions(),
4444
- readStoreRequires: true
4530
+ readStoreRequires: true,
4531
+ noteStorePinned: opts?.moveLibraries === true
4445
4532
  });
4446
4533
  this.assertNoFolderCollision([...resolved, ...lib.entries.map((e) => this.entryIdentity(e))]);
4447
4534
  if (!opts?.force && !(existsSync(this.lockPath) && this.tryReadLock() === null)) {
@@ -4659,7 +4746,7 @@ Fix the asset, then run \`skaile library index ${origin}\` and install again.`
4659
4746
  ...mcpRestored,
4660
4747
  ...restoredRenderings
4661
4748
  ];
4662
- const lockWanted = resolved.length > 0 || lib.entries.length > 0 || existsSync(this.lockPath);
4749
+ const lockWanted = resolved.length > 0 || lib.entries.length > 0 || presets.length > 0 || existsSync(this.lockPath);
4663
4750
  let lockWritten = false;
4664
4751
  let relocked = [];
4665
4752
  let moved = [];
@@ -4703,6 +4790,18 @@ Fix the asset, then run \`skaile library index ${origin}\` and install again.`
4703
4790
  ...agentRender
4704
4791
  };
4705
4792
  }
4793
+ /**
4794
+ * Why `install` asks no store, or `undefined` when it does: `--no-catalog`, or `catalog.url:
4795
+ * local` with no `stores:` entry in `skaile.yaml`. A locked store asset is then kept as it is,
4796
+ * as for an air-gapped client.
4797
+ */
4798
+ async whyNoStoreAsked() {
4799
+ if (this.catalogUrlOverride === "") return "--no-catalog: the store was not asked";
4800
+ if (this.injectedStoreFetcher) return void 0;
4801
+ const { stores } = this.loadConfig();
4802
+ if (stores.length > 0 || (await this.globalStoreFallback(stores)).length > 0) return void 0;
4803
+ return "catalog.url is local: the store was not asked";
4804
+ }
4706
4805
  /**
4707
4806
  * The kept refs whose locked copy came from a store that `install` did not (or could not)
4708
4807
  * ask, and whose deployed copy is still there: nothing says the copy is wrong, so it stays
@@ -4713,7 +4812,8 @@ Fix the asset, then run \`skaile library index ${origin}\` and install again.`
4713
4812
  * them is that source's, not the store's.
4714
4813
  */
4715
4814
  async storeNotCheckedRefs(kept, declaredSourceUrls) {
4716
- const skipped = this.catalogUrlOverride === "";
4815
+ const notAsked = await this.whyNoStoreAsked();
4816
+ const skipped = notAsked !== void 0;
4717
4817
  if (!skipped && this.storeFailures.size === 0) return [];
4718
4818
  const declared = new Set(declaredSourceUrls.map(normalizeRepoUrl));
4719
4819
  const out = [];
@@ -4725,7 +4825,7 @@ Fix the asset, then run \`skaile library index ${origin}\` and install again.`
4725
4825
  });
4726
4826
  if (!fromStore || !await this.keptCopyDeployed(kept, ref)) continue;
4727
4827
  if (skipped && this.storeFailures.size === 0) {
4728
- out.push({ ref, reason: "skipped", detail: "--no-catalog: the store was not asked" });
4828
+ out.push({ ref, reason: "skipped", detail: notAsked });
4729
4829
  continue;
4730
4830
  }
4731
4831
  const urls = [...this.storeFailures.keys()];
@@ -5184,7 +5284,11 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5184
5284
  cacheTtlMs = resolveConfig({ projectDir: this.projectDir }).catalog.cache_ttl * 1e3;
5185
5285
  } catch {
5186
5286
  }
5187
- return new RemoteCatalogSource({ baseUrl: storeUrl, cacheTtlMs });
5287
+ return new RemoteCatalogSource({
5288
+ baseUrl: storeUrl,
5289
+ cacheTtlMs,
5290
+ httpClient: this.storeProbe.httpClient(storeUrl)
5291
+ });
5188
5292
  }
5189
5293
  /**
5190
5294
  * Remember why a store could not be asked (store URL → one line without a JS error class
@@ -5229,7 +5333,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5229
5333
  deps
5230
5334
  };
5231
5335
  } catch (err) {
5232
- if (err instanceof CatalogHttpError && err.status === 404) return null;
5336
+ if (err instanceof CatalogHttpError && err.status === 404 && !err.notCatalog) return null;
5233
5337
  this.noteStoreFailure(storeUrl, err);
5234
5338
  throw err;
5235
5339
  }
@@ -5333,7 +5437,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5333
5437
  }
5334
5438
  assertLockHashes(lock);
5335
5439
  this.assertNoFolderCollision(Object.keys(lock.assets).map(parseCanonicalLockKey));
5336
- const orphaned = [...(await this.orphanedSourceGaps(void 0, true)).values()];
5440
+ const orphaned = [...(await this.orphanedSourceGaps(void 0, false)).values()];
5337
5441
  if (orphaned.length > 0) {
5338
5442
  throw new Error(
5339
5443
  `Lock file verification failed:
@@ -5810,7 +5914,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5810
5914
  } finally {
5811
5915
  this.flushLibraryCollisions();
5812
5916
  }
5813
- const { resolved, missing, overridesApplied, lib, presets } = resolution;
5917
+ const { resolved, missing, overridesApplied, lib, presets, libraryPresets } = resolution;
5814
5918
  if (resolved.length === 0 && lib.entries.length === 0 && presets.length === 0) {
5815
5919
  const snap = await this.loadLibraryIndex();
5816
5920
  const bare = (p) => (p ?? "").replace(/^@/, "");
@@ -5864,7 +5968,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5864
5968
  l.name,
5865
5969
  libPath,
5866
5970
  l.ownership,
5867
- `Run \`skaile library index ${l.name}\` to rename the entry, or restore the name.`,
5971
+ renamed.fileFix ? `${renamed.fileFix}, then run \`skaile library index ${l.name}\`.` : `Run \`skaile library index ${l.name}\` to rename the entry, or restore the name.`,
5868
5972
  `"${l.name}" is a read-only clone: ask the owner to rename the entry in skaile.manifest.yaml or restore the name and push`
5869
5973
  )
5870
5974
  );
@@ -5922,10 +6026,13 @@ ${problems.map((line) => ` ${line}`).join("\n")}
5922
6026
  `Preset ${ref} has items that do not resolve: ${missing.join(", ")} \u2014 nothing was added`
5923
6027
  );
5924
6028
  }
5925
- if (lib.entries.length > 0) {
6029
+ const checkedEntries = [
6030
+ ...lib.entries.map((e) => ({ e, origin: lib.libraryOf.get(e) })),
6031
+ ...libraryPresets.map((p) => ({ e: p.entry, origin: p.library }))
6032
+ ];
6033
+ if (checkedEntries.length > 0) {
5926
6034
  const snap = await this.loadLibraryIndex();
5927
- for (const e of lib.entries) {
5928
- const origin = lib.libraryOf.get(e);
6035
+ for (const { e, origin } of checkedEntries) {
5929
6036
  const libPath = origin ? this.libraryPath({ name: origin }, snap) : null;
5930
6037
  if (origin && libPath && isUnlistedLibraryAsset(e, libPath)) {
5931
6038
  throw new Error(
@@ -6098,7 +6205,9 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
6098
6205
  for (const placeholder of scaffoldDescriptionRefs(lib.entries, deployed)) {
6099
6206
  opts?.onPlaceholderDescription?.(placeholder);
6100
6207
  }
6101
- this.addDependencyToConfig(ref, opts?.only === true);
6208
+ if (!(opts?.preferLockedLibrary && this.boundOnlyByInstance(parsed))) {
6209
+ this.addDependencyToConfig(ref, opts?.only === true);
6210
+ }
6102
6211
  this.widenDependencyRows(entries, parsed);
6103
6212
  if (!opts?.preferLockedLibrary) {
6104
6213
  const bound = this.bindAgentInstance(entries, parsed);
@@ -6107,7 +6216,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
6107
6216
  }
6108
6217
  await this.renderHarnessMcpConfig();
6109
6218
  await this.renderAgentInstances({ prune: true });
6110
- if (resolved.length > 0 || lib.entries.length > 0) {
6219
+ if (resolved.length > 0 || lib.entries.length > 0 || presets.length > 0) {
6111
6220
  await this.warnUncommittedLibraryAssets(lib);
6112
6221
  const libraryLock = await this.libraryLockEntries(lib);
6113
6222
  const fresh = {
@@ -6902,6 +7011,18 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
6902
7011
  }
6903
7012
  return result;
6904
7013
  }
7014
+ /**
7015
+ * Absolute path → sha256 of every native agent file the lock records under `rendered:`. A
7016
+ * `harness set` rewrites the lock for the new harness, so a caller that cleans up afterwards
7017
+ * reads this first and hands it to {@link AssetManager.listStaleHarnessCopies}.
7018
+ */
7019
+ lockedRenderedHashes() {
7020
+ const out = /* @__PURE__ */ new Map();
7021
+ for (const entry of Object.values(this.tryReadLock()?.assets ?? {})) {
7022
+ for (const f of entry.rendered ?? []) out.set(resolve(this.projectDir, f.path), f.sha256);
7023
+ }
7024
+ return out;
7025
+ }
6905
7026
  /**
6906
7027
  * Tracked assets (`skaile.lock.yaml` or declared in `skaile.yaml`) whose copy
6907
7028
  * still sits in the project dirs of another harness (`.claude/…`, `.omp/…`,
@@ -6912,10 +7033,17 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
6912
7033
  * Read-only: nothing is deleted. Empty for global mode and for kinds whose
6913
7034
  * dir is shared with the active target (flows).
6914
7035
  *
7036
+ * @param opts.renderedBefore - {@link AssetManager.lockedRenderedHashes} of the lock as it was
7037
+ * before the move to this harness. An agent copy counts as skaile's only when it matches a
7038
+ * hash the lock (now or then) recorded for its path.
6915
7039
  * @returns One {@link StaleHarnessCopy} per stale copy, sorted by harness, kind, then name.
6916
7040
  */
6917
- listStaleHarnessCopies() {
7041
+ listStaleHarnessCopies(opts = {}) {
6918
7042
  if (this.global) return [];
7043
+ const recordedHashes = new Map([
7044
+ ...this.lockedRenderedHashes(),
7045
+ ...opts.renderedBefore ?? []
7046
+ ]);
6919
7047
  const tracked = /* @__PURE__ */ new Map();
6920
7048
  const track = (kind, name, locked = false) => {
6921
7049
  const component = kind ? this.installTarget(kind) : void 0;
@@ -6967,7 +7095,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
6967
7095
  continue;
6968
7096
  }
6969
7097
  const twin = join(activeBase, relative(otherBase, p));
6970
- const skaileWrote = k === "agent" ? locked : !relative(otherBase, p).startsWith("..") && sameBytes(p, twin);
7098
+ const skaileWrote = k === "agent" ? locked && matchesRecordedHashes(p, recordedHashes) : !relative(otherBase, p).startsWith("..") && sameBytes(p, twin);
6971
7099
  out.push({ harness: other, kind, name, path: p, skaileWrote });
6972
7100
  }
6973
7101
  }
@@ -7003,7 +7131,8 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7003
7131
  * set is walked, so a lock entry with no matching `dependencies:` ref never shows.
7004
7132
  *
7005
7133
  * @param kind - Filter by asset kind. Omit to return all kinds.
7006
- * @returns One {@link DeclaredAsset} per declared dep (after the optional kind filter).
7134
+ * @returns One {@link DeclaredAsset} per declared dep (after the optional kind filter), plus
7135
+ * one per locked agent that only an agent instance of `skaile.yaml` binds.
7007
7136
  * @throws {MissingManifestError} when the project has no `skaile.yaml`.
7008
7137
  * @throws {Error} with a `migrate-skaile-manifest` hint on legacy `repositories:` / `ai_resources:` keys.
7009
7138
  */
@@ -7011,7 +7140,8 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7011
7140
  if (!existsSync(join(this.projectDir, SKAILE_YAML_DEFAULT))) {
7012
7141
  throw new MissingManifestError(this.projectDir);
7013
7142
  }
7014
- const dependencies = resolveSkWorkspaceConfig(this.projectDir).dependencies ?? [];
7143
+ const declaredLines = resolveSkWorkspaceConfig(this.projectDir).dependencies ?? [];
7144
+ const dependencies = [...declaredLines, ...this.lockedAgentBindings(declaredLines)];
7015
7145
  const lock = this.tryReadLock();
7016
7146
  const lockKeys = lock ? Object.keys(lock.assets).map(parseCanonicalLockKey) : [];
7017
7147
  const presetGaps = await this.declaredPresetGaps(dependencies, lock);
@@ -7256,14 +7386,34 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7256
7386
  const lockByKindName = indexLockByKindName(lock);
7257
7387
  const entries = [];
7258
7388
  const instanceFiles = this.global ? /* @__PURE__ */ new Set() : instanceRenderedAgentNames(this.projectDir, this.harness);
7389
+ const syncOf = (lockEntry) => {
7390
+ if (lockEntry?.library) return "local";
7391
+ const slug = lockEntry ? sourceCacheKey(lockEntry.url) : "";
7392
+ return slug ? computeSyncStatus(repoStatuses.get(slug)) : "unknown";
7393
+ };
7259
7394
  for (const d of deployed) {
7260
7395
  const lockEntry = lockByKindName.get(`${d.kind}:${d.name}`);
7261
7396
  if (!lockEntry && d.kind === "agent" && instanceFiles.has(d.name)) continue;
7262
- const publisher = lockEntry?.publisher || "unknown";
7263
- const version = lockEntry?.version ?? "";
7264
- const slug = lockEntry && !lockEntry.library ? sourceCacheKey(lockEntry.url) : "";
7265
- const syncStatus = lockEntry?.library ? "local" : slug ? computeSyncStatus(repoStatuses.get(slug)) : "unknown";
7266
- entries.push({ kind: d.kind, name: d.name, publisher, version, syncStatus });
7397
+ entries.push({
7398
+ kind: d.kind,
7399
+ name: d.name,
7400
+ publisher: lockEntry?.publisher || "unknown",
7401
+ version: lockEntry?.version ?? "",
7402
+ syncStatus: syncOf(lockEntry)
7403
+ });
7404
+ }
7405
+ const seen = new Set(entries.map((e) => `${e.kind}:${e.name}`));
7406
+ for (const [key, lockEntry] of lockByKindName) {
7407
+ if (seen.has(key) || !key.startsWith("agent:")) continue;
7408
+ const name = key.slice("agent:".length);
7409
+ if (!isAssetDeployed("agent", name, this.harness, this.global, this.projectDir)) continue;
7410
+ entries.push({
7411
+ kind: "agent",
7412
+ name,
7413
+ publisher: lockEntry.publisher,
7414
+ version: lockEntry.version,
7415
+ syncStatus: syncOf(lockEntry)
7416
+ });
7267
7417
  }
7268
7418
  return {
7269
7419
  byPublisher: groupAndSortByPublisher(entries),
@@ -7500,12 +7650,16 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7500
7650
  * @returns Array of {@link OutdatedEntry} objects.
7501
7651
  */
7502
7652
  async outdated() {
7503
- const { repositories } = this.loadConfig();
7653
+ const { repositories, sources: declaredSources } = this.loadConfig();
7504
7654
  const lock = this.tryReadLock();
7505
- if (!lock) return this.addLockGapRows([]);
7506
7655
  const result = [];
7507
7656
  const commitCounts = /* @__PURE__ */ new Map();
7508
- for (const src of lock.sources) {
7657
+ const lockedUrls = new Set((lock?.sources ?? []).map((s) => s.url));
7658
+ const checked = [
7659
+ ...lock?.sources ?? [],
7660
+ ...declaredSources.filter((s) => !lockedUrls.has(s.url)).map((s) => ({ url: s.url, commit: "" }))
7661
+ ];
7662
+ for (const src of checked) {
7509
7663
  const slug = sourceCacheKey(src.url);
7510
7664
  const decl = repositories[slug];
7511
7665
  if (!decl) continue;
@@ -7537,7 +7691,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7537
7691
  });
7538
7692
  }
7539
7693
  const clone = decl.path ?? join(this.reposDir, slug);
7540
- for (const [ref, entry] of Object.entries(lock.assets)) {
7694
+ for (const [ref, entry] of Object.entries(lock?.assets ?? {})) {
7541
7695
  if (entry.source?.url !== src.url) continue;
7542
7696
  const { publisher, kind, name, version } = parseCanonicalLockKey(ref);
7543
7697
  if (!kind || !name) continue;
@@ -7564,6 +7718,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7564
7718
  });
7565
7719
  }
7566
7720
  }
7721
+ if (!lock) return this.addLockGapRows([]);
7567
7722
  const libraryAssets = Object.entries(lock.assets).filter(
7568
7723
  ([, e]) => e.library && !e.library.installed
7569
7724
  );
@@ -7971,6 +8126,53 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7971
8126
  }
7972
8127
  return null;
7973
8128
  }
8129
+ /** Whether the lock holds `want` as a store asset (`origin: store`, no library). */
8130
+ isStorePinnedRef(want) {
8131
+ const wantPublisher = want.publisher?.replace(/^@/, "");
8132
+ return Object.entries(this.tryReadLock()?.assets ?? {}).some(([key, e]) => {
8133
+ if (e.origin !== "store" || e.library) return false;
8134
+ const id = parseCanonicalLockKey(key);
8135
+ return id.kind === want.kind && id.name === want.name && (!wantPublisher || id.publisher === wantPublisher);
8136
+ });
8137
+ }
8138
+ /**
8139
+ * {@link AssetManager.diff} for a locked source or store asset whose bytes are not on disk:
8140
+ * the deployed copy against the per-file hashes the lock records. No text to show without the
8141
+ * locked bytes, so an edited file is named and the way to fetch them is. `null` when the lock
8142
+ * has no such entry or the kind is rendered (an agent), not copied.
8143
+ */
8144
+ async diffAgainstLock(want) {
8145
+ if (this.global) return null;
8146
+ const lock = this.tryReadLock();
8147
+ const wantPublisher = want.publisher?.replace(/^@/, "");
8148
+ for (const [key, e] of Object.entries(lock?.assets ?? {})) {
8149
+ const { kind, name, publisher } = parseCanonicalLockKey(key);
8150
+ if (!e.source || e.library || kind !== want.kind || name !== want.name) continue;
8151
+ if (wantPublisher && publisher !== wantPublisher) continue;
8152
+ const component = kind ? this.installTarget(kind) : void 0;
8153
+ if (!component || component === "agent") return null;
8154
+ if (!isAssetDeployed(component, name, this.harness, this.global, this.projectDir)) {
8155
+ return { status: "not-deployed" };
8156
+ }
8157
+ const ref = publisher ? `${kind}:@${publisher}/${name}` : `${kind}:${name}`;
8158
+ const drift = (await this.lockedCopyDrift()).find((d) => d.ref === ref);
8159
+ if (!drift || drift.modified.length === 0 && drift.extra.length === 0) {
8160
+ return { status: "identical" };
8161
+ }
8162
+ const lines = [
8163
+ ...drift.modified.map((f) => `~ ${f}: differs from the locked bytes`),
8164
+ ...drift.extra.map((f) => `+ ${f}: not part of the asset`)
8165
+ ];
8166
+ return {
8167
+ status: "differs",
8168
+ diff: `${lines.join("\n")}
8169
+ (the locked bytes are not in .skaile/cache: run \`skaile install --locked\` to fetch them, then diff shows the lines)
8170
+ `,
8171
+ ...drift.extra.length > 0 ? { fileSetDiffers: true } : {}
8172
+ };
8173
+ }
8174
+ return null;
8175
+ }
7974
8176
  /**
7975
8177
  * Produce a unified diff from the deployed asset to its catalog source: `-` lines
7976
8178
  * are in the deployed copy only (local edits `update` would overwrite), `+` lines
@@ -8008,8 +8210,9 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8008
8210
  }
8009
8211
  }
8010
8212
  const libraryEntry = await this.lockedLibraryEntry(parsed);
8011
- const entry = libraryEntry ?? this.lockedSourceEntry(parsed) ?? await this.info(ref);
8012
- if (!entry || !existsSync(entry.source)) return { status: "not-found" };
8213
+ const entry = libraryEntry ?? this.lockedSourceEntry(parsed) ?? (this.isStorePinnedRef(parsed) ? null : await this.info(ref));
8214
+ if (!entry) return await this.diffAgainstLock(parsed) ?? { status: "not-found" };
8215
+ if (!existsSync(entry.source)) return { status: "not-found" };
8013
8216
  const toLabel = libraryEntry ? "library" : "source";
8014
8217
  const wantPublisher = parsed.publisher?.replace(/^@/, "");
8015
8218
  if (wantPublisher) {
@@ -8418,15 +8621,18 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8418
8621
  named.add(gapIdentity(gap.ref));
8419
8622
  }
8420
8623
  const skipped = [];
8624
+ const onSkipped = (clone, err) => {
8625
+ skipped.push({
8626
+ url: clone.sourceUrl,
8627
+ why: err instanceof Error ? err.message : String(err)
8628
+ });
8629
+ };
8421
8630
  const sourceIndex = await buildProvenanceIndex(
8422
- this.buildClones(this.loadConfig().repositories),
8631
+ this.buildClones(this.loadConfig().repositories, onSkipped),
8423
8632
  {
8424
8633
  projectDir: this.projectDir,
8425
8634
  knownKinds: this.knownKinds,
8426
- onSourceError: (clone, err) => skipped.push({
8427
- url: clone.sourceUrl,
8428
- why: err instanceof Error ? err.message : String(err)
8429
- })
8635
+ onSourceError: onSkipped
8430
8636
  }
8431
8637
  );
8432
8638
  for (const gap of await this.sourceOriginGaps(named, sourceIndex)) {
@@ -8491,7 +8697,8 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8491
8697
  gaps.push({ type: "incomplete", ref: d.ref, reason, message: `${d.ref} ${reason}` });
8492
8698
  }
8493
8699
  for (const s of skipped) {
8494
- const reason = `is skipped: ${s.why.replace(`${s.url}: `, "")} \u2014 fix it or run \`skaile source remove\``;
8700
+ const why = s.why.replace(`${s.url}: `, "");
8701
+ const reason = why.includes(RUN_SOURCE_SYNC) ? `is skipped: ${why}` : `is skipped: ${why} \u2014 fix it or run \`skaile source remove\``;
8495
8702
  gaps.push({
8496
8703
  type: "source",
8497
8704
  ref: s.url,
@@ -8525,8 +8732,30 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8525
8732
  manualFix: true
8526
8733
  });
8527
8734
  }
8735
+ const seenGaps = /* @__PURE__ */ new Set();
8736
+ const unique = gaps.filter((g) => {
8737
+ const id = `${g.type}\0${g.message}`;
8738
+ if (seenGaps.has(id)) return false;
8739
+ seenGaps.add(id);
8740
+ return true;
8741
+ });
8742
+ const changedAgents = /* @__PURE__ */ new Map();
8743
+ for (const g of unique) {
8744
+ if (g.ref.startsWith("agent:") && g.reason.includes("content changed since lock")) {
8745
+ changedAgents.set(g.ref, g.reason);
8746
+ }
8747
+ }
8748
+ const coveredByAgent = /* @__PURE__ */ new Set();
8749
+ for (const [key, entry] of Object.entries(lock?.assets ?? {})) {
8750
+ const id = parseCanonicalLockKey(key);
8751
+ const agentRef = id.publisher ? `agent:@${id.publisher}/${id.name}` : `agent:${id.name}`;
8752
+ if (id.kind !== "agent" || !changedAgents.has(agentRef)) continue;
8753
+ for (const dep of entry.requires ?? []) {
8754
+ coveredByAgent.add(`${dep}\0${changedAgents.get(agentRef)}`);
8755
+ }
8756
+ }
8528
8757
  return {
8529
- gaps,
8758
+ gaps: unique.filter((g) => !coveredByAgent.has(`${g.ref}\0${g.reason}`)),
8530
8759
  requirements: requirements.filter(
8531
8760
  (i) => i.unresolved || !libraryHeld(`${i.depKind}:${i.depName}`)
8532
8761
  )
@@ -8607,6 +8836,18 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8607
8836
  advice: `run \`skaile update\` (it moves the lock to the library's copy), ${drop}`
8608
8837
  };
8609
8838
  }
8839
+ const lockedOrigin = lock?.assets[lockedAgentKey]?.library;
8840
+ const ahead = lockedOrigin && !lockedOrigin.installed && locked.publisher && locked.kind && locked.name ? await this.libraryAheadOfLock(lockedOrigin, {
8841
+ kind: locked.kind,
8842
+ publisher: locked.publisher,
8843
+ name: locked.name
8844
+ }) : void 0;
8845
+ if (ahead) {
8846
+ return {
8847
+ lead: `its agent is locked, but ${ahead}`,
8848
+ advice: `run \`skaile update\` (it moves the lock to the library's copy), ${drop}`
8849
+ };
8850
+ }
8610
8851
  const libraryFix = await this.lockedAgentLibraryHolds(lockedAgentKey) ? void 0 : (await this.unresolvedFixes([ref])).get(ref);
8611
8852
  if (libraryFix) {
8612
8853
  const register = libraryFix.replace(
@@ -8829,9 +9070,11 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8829
9070
  }
8830
9071
  const stores = [...config.stores, ...await this.globalStoreFallback(config.stores, false)];
8831
9072
  const registered = new Set(config.sources.map((s) => sourceCacheKey(s.url)));
9073
+ const storeNotAsked = online && await this.whyNoStoreAsked() !== void 0;
8832
9074
  for (const [key, entry] of Object.entries(this.tryReadLock()?.assets ?? {})) {
8833
9075
  const url = entry.source?.url;
8834
9076
  if (!url || entry.library || !GIT_URL.test(url)) continue;
9077
+ if (entry.origin === "store" && storeNotAsked) continue;
8835
9078
  if (entry.origin === "store" && !online) continue;
8836
9079
  if (inScope && !inScope.has(key)) continue;
8837
9080
  if (isBundledFactoryEntry(entry)) continue;
@@ -9467,11 +9710,21 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9467
9710
  this.projectDir
9468
9711
  ).find((p) => isSymlink(p) && !existsSync(p));
9469
9712
  const composeDrift = component === "agent" && !dangling && lock ? await this.lockedComposeDrift(lock, kind, name) : void 0;
9470
- const reason = composeDrift ? `(composes ${composeDrift}: the library's copy changed since the lock; \`skaile update\` moves the lock to it)` : dangling ? `is locked but its deployed copy is a symlink to nothing (${relative(this.projectDir, dangling)}) \u2014 run \`skaile install --locked\`` : "is locked but its deployed copy is missing \u2014 run `skaile install --locked`";
9713
+ const ahead = entry.library && publisher && !composeDrift ? await this.libraryAheadOfLock(entry.library, { kind, publisher, name }) : void 0;
9714
+ const reason = composeDrift ? `(composes ${composeDrift}: the library's copy changed since the lock; \`skaile update\` moves the lock to it)` : ahead ? `is locked but its deployed copy is missing, and ${ahead} \u2014 run \`skaile update\` (it moves the lock to the library's copy)` : dangling ? `is locked but its deployed copy is a symlink to nothing (${relative(this.projectDir, dangling)}) \u2014 run \`skaile install --locked\`` : "is locked but its deployed copy is missing \u2014 run `skaile install --locked`";
9471
9715
  gaps.push({ type: "drift", ref, reason, message: `${ref} ${reason}` });
9472
9716
  }
9473
9717
  return gaps;
9474
9718
  }
9719
+ /**
9720
+ * {@link declaredNoHolderReason} plus, when the name exists under another kind, the same
9721
+ * `It is a skill: skill:@pub/name.` tail `add` and `update` end their not-found line with.
9722
+ */
9723
+ async declaredNoHolderLine(ref) {
9724
+ const base = declaredNoHolderReason(ref);
9725
+ const hint = await this.otherKindHint(ref.split("#")[0]);
9726
+ return hint ? `${base}. ${hint}` : base;
9727
+ }
9475
9728
  /**
9476
9729
  * The `skaile.yaml` side of {@link AssetManager.projectState}: declared refs that do not
9477
9730
  * parse, never resolved into the lock, are not materialized, or contradict a `#pin`.
@@ -9527,7 +9780,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9527
9780
  } else {
9528
9781
  gap = {
9529
9782
  type: "declared",
9530
- reason: declaredNoHolderReason(d.ref),
9783
+ reason: await this.declaredNoHolderLine(d.ref),
9531
9784
  manualFix: true
9532
9785
  };
9533
9786
  }
@@ -9537,7 +9790,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9537
9790
  if (this.presetRecorded(want) || await this.info(d.ref) !== null) continue;
9538
9791
  gap = await this.declaredRefResolvable(d.ref) ? { type: "declared", reason: "is declared but not locked \u2014 run `skaile install`" } : {
9539
9792
  type: "declared",
9540
- reason: declaredNoHolderReason(d.ref),
9793
+ reason: await this.declaredNoHolderLine(d.ref),
9541
9794
  manualFix: true
9542
9795
  };
9543
9796
  gaps.push({ ...gap, ref: d.ref, message: `${d.ref} ${gap.reason}` });
@@ -9935,6 +10188,25 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9935
10188
  writeFileSync(configPath, stringify(raw, { lineWidth: 120 }));
9936
10189
  return true;
9937
10190
  }
10191
+ /**
10192
+ * Whether `target` is an agent that an agent instance of `skaile.yaml` binds and no
10193
+ * `dependencies:` line names. Project mode only.
10194
+ */
10195
+ boundOnlyByInstance(target) {
10196
+ if (this.global || target.kind !== "agent") return false;
10197
+ const bare = (p) => p?.replace(/^@/, "");
10198
+ const names = (ref) => {
10199
+ const p = typeof ref === "string" ? parseAssetRefLoose(ref) : void 0;
10200
+ return !!p && p.kind === "agent" && p.name === target.name && (!target.publisher || !p.publisher || bare(p.publisher) === bare(target.publisher));
10201
+ };
10202
+ let lines = [];
10203
+ try {
10204
+ lines = resolveSkWorkspaceConfig(this.projectDir).dependencies ?? [];
10205
+ } catch {
10206
+ return false;
10207
+ }
10208
+ return !lines.some(names) && this.declaredAgentInstanceRefs().some(names);
10209
+ }
9938
10210
  /**
9939
10211
  * The locked agents an agent instance binds (`agents.<id>.ref`, `agent.definition`) that
9940
10212
  * `declared` does not name, as version-less `agent:@publisher/name`. An agent no lock entry
@@ -10091,5 +10363,5 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
10091
10363
  };
10092
10364
 
10093
10365
  export { AssetManager, LibraryEntryError, MissingManifestError, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName };
10094
- //# sourceMappingURL=chunk-757G6TTZ.js.map
10095
- //# sourceMappingURL=chunk-757G6TTZ.js.map
10366
+ //# sourceMappingURL=chunk-23Q5LT4U.js.map
10367
+ //# sourceMappingURL=chunk-23Q5LT4U.js.map