@skaile/workspaces 6.9.0 → 6.10.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 (345) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/ai-sdk.js +8 -8
  3. package/dist/{asset-feeds-JWRIWLVX.js → asset-feeds-UG3PG423.js} +22 -22
  4. package/dist/{asset-feeds-JWRIWLVX.js.map → asset-feeds-UG3PG423.js.map} +1 -1
  5. package/dist/asset-manager/catalog-deployer.js +8 -8
  6. package/dist/asset-manager/history.js +8 -8
  7. package/dist/asset-manager/index.js +14 -14
  8. package/dist/asset-manager/installer.js +9 -9
  9. package/dist/asset-manager/renderers.js +8 -8
  10. package/dist/asset-manager/src/harness-switch-state.d.ts +30 -0
  11. package/dist/asset-manager/src/harness-switch-state.d.ts.map +1 -0
  12. package/dist/asset-manager/src/index.d.ts +49 -12
  13. package/dist/asset-manager/src/index.d.ts.map +1 -1
  14. package/dist/asset-manager/src/mcp-config.d.ts +6 -0
  15. package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
  16. package/dist/bridge/codex-app-server.js +1 -2
  17. package/dist/bridge/harnesses/claude-sdk.js +11 -11
  18. package/dist/bridge/harnesses/codex.js +15 -1926
  19. package/dist/bridge/harnesses/codex.js.map +1 -1
  20. package/dist/bridge/harnesses/continue.js +11 -11
  21. package/dist/bridge/harnesses/echo.js +3 -3
  22. package/dist/bridge/harnesses/gemini.js +6 -6
  23. package/dist/bridge/harnesses/goose.js +11 -11
  24. package/dist/bridge/harnesses/omp.js +61 -9
  25. package/dist/bridge/harnesses/omp.js.map +1 -1
  26. package/dist/bridge/harnesses/opencode.js +11 -11
  27. package/dist/bridge/harnesses/qwen.js +6 -6
  28. package/dist/bridge/index.js +17 -16
  29. package/dist/bridge/src/harness-model-check.d.ts +5 -4
  30. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  31. package/dist/bridge/src/harnesses/codex.d.ts +13 -0
  32. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  33. package/dist/bridge/src/harnesses/omp.d.ts +22 -0
  34. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  35. package/dist/bridge/src/index.d.ts +1 -0
  36. package/dist/bridge/src/index.d.ts.map +1 -1
  37. package/dist/{chunk-XPKUFOS3.js → chunk-2D6HZAO5.js} +8 -8
  38. package/dist/{chunk-XPKUFOS3.js.map → chunk-2D6HZAO5.js.map} +1 -1
  39. package/dist/chunk-2MUUPRIG.js +688 -0
  40. package/dist/chunk-2MUUPRIG.js.map +1 -0
  41. package/dist/{chunk-TMQFOJ6F.js → chunk-2PVYDAFN.js} +3 -3
  42. package/dist/{chunk-TMQFOJ6F.js.map → chunk-2PVYDAFN.js.map} +1 -1
  43. package/dist/{chunk-YGT3CGPD.js → chunk-2U67XYZM.js} +3 -3
  44. package/dist/{chunk-YGT3CGPD.js.map → chunk-2U67XYZM.js.map} +1 -1
  45. package/dist/{chunk-5NTB64PW.js → chunk-375HN3FD.js} +18 -14
  46. package/dist/chunk-375HN3FD.js.map +1 -0
  47. package/dist/{chunk-23Q5LT4U.js → chunk-4I4SBOCS.js} +345 -88
  48. package/dist/chunk-4I4SBOCS.js.map +1 -0
  49. package/dist/{chunk-WPLZGT5Z.js → chunk-4Z4RULWQ.js} +59 -31
  50. package/dist/chunk-4Z4RULWQ.js.map +1 -0
  51. package/dist/{chunk-72BDCGBB.js → chunk-5JBMYZNA.js} +3 -3
  52. package/dist/{chunk-72BDCGBB.js.map → chunk-5JBMYZNA.js.map} +1 -1
  53. package/dist/{chunk-3EPRTMXY.js → chunk-5KQFR4D7.js} +6 -6
  54. package/dist/{chunk-3EPRTMXY.js.map → chunk-5KQFR4D7.js.map} +1 -1
  55. package/dist/{chunk-KNY356I3.js → chunk-5KSGZP3E.js} +11 -4
  56. package/dist/chunk-5KSGZP3E.js.map +1 -0
  57. package/dist/{chunk-DZRN3SNG.js → chunk-5P7LTPBR.js} +5 -5
  58. package/dist/{chunk-DZRN3SNG.js.map → chunk-5P7LTPBR.js.map} +1 -1
  59. package/dist/{chunk-PTJZCOBH.js → chunk-6O7VDKX3.js} +2 -2
  60. package/dist/{chunk-PTJZCOBH.js.map → chunk-6O7VDKX3.js.map} +1 -1
  61. package/dist/{chunk-B2DGCYVC.js → chunk-7DUOKE73.js} +27 -33
  62. package/dist/chunk-7DUOKE73.js.map +1 -0
  63. package/dist/{chunk-V5KG6CCV.js → chunk-7HRZACI4.js} +7 -2
  64. package/dist/chunk-7HRZACI4.js.map +1 -0
  65. package/dist/{chunk-U3FI4DVT.js → chunk-7K73MCI6.js} +7 -5
  66. package/dist/chunk-7K73MCI6.js.map +1 -0
  67. package/dist/{chunk-SE6OL7Y5.js → chunk-BCID52M5.js} +6 -6
  68. package/dist/{chunk-SE6OL7Y5.js.map → chunk-BCID52M5.js.map} +1 -1
  69. package/dist/{chunk-FZO64PLQ.js → chunk-BNLXZXZN.js} +81 -8
  70. package/dist/chunk-BNLXZXZN.js.map +1 -0
  71. package/dist/{chunk-O3FYOS64.js → chunk-C5UKYTTD.js} +13 -23
  72. package/dist/chunk-C5UKYTTD.js.map +1 -0
  73. package/dist/{chunk-LYVLDGML.js → chunk-CG63XGVV.js} +3 -3
  74. package/dist/{chunk-LYVLDGML.js.map → chunk-CG63XGVV.js.map} +1 -1
  75. package/dist/{chunk-4ROXSQEG.js → chunk-CJO3XKO7.js} +4 -4
  76. package/dist/{chunk-4ROXSQEG.js.map → chunk-CJO3XKO7.js.map} +1 -1
  77. package/dist/{chunk-OSABUEWA.js → chunk-CVUMZTNO.js} +4 -4
  78. package/dist/{chunk-OSABUEWA.js.map → chunk-CVUMZTNO.js.map} +1 -1
  79. package/dist/{chunk-E675QKFG.js → chunk-DOMRBOJZ.js} +5 -5
  80. package/dist/{chunk-E675QKFG.js.map → chunk-DOMRBOJZ.js.map} +1 -1
  81. package/dist/{chunk-GTAHU4N4.js → chunk-EB2LKPI6.js} +4 -4
  82. package/dist/{chunk-GTAHU4N4.js.map → chunk-EB2LKPI6.js.map} +1 -1
  83. package/dist/{chunk-GZL6RN4Z.js → chunk-FXBKBOI5.js} +169 -49
  84. package/dist/chunk-FXBKBOI5.js.map +1 -0
  85. package/dist/{chunk-AERQFD6T.js → chunk-GA4GUDTL.js} +4 -4
  86. package/dist/{chunk-AERQFD6T.js.map → chunk-GA4GUDTL.js.map} +1 -1
  87. package/dist/{chunk-NJVHGS7X.js → chunk-HE3TZYNG.js} +4 -4
  88. package/dist/{chunk-NJVHGS7X.js.map → chunk-HE3TZYNG.js.map} +1 -1
  89. package/dist/chunk-HLFLET7S.js +2443 -0
  90. package/dist/chunk-HLFLET7S.js.map +1 -0
  91. package/dist/{chunk-Y2BQWZXT.js → chunk-HQUF6O4B.js} +27 -56
  92. package/dist/chunk-HQUF6O4B.js.map +1 -0
  93. package/dist/{chunk-T5EIWWEJ.js → chunk-IMO4EHND.js} +5 -5
  94. package/dist/{chunk-T5EIWWEJ.js.map → chunk-IMO4EHND.js.map} +1 -1
  95. package/dist/{chunk-TUOHA6BM.js → chunk-IOXFT5D7.js} +3 -3
  96. package/dist/{chunk-TUOHA6BM.js.map → chunk-IOXFT5D7.js.map} +1 -1
  97. package/dist/{chunk-5AQLCRR7.js → chunk-JDZUQFN7.js} +4 -4
  98. package/dist/{chunk-5AQLCRR7.js.map → chunk-JDZUQFN7.js.map} +1 -1
  99. package/dist/{chunk-SQMDFM4N.js → chunk-KE5HDORU.js} +2 -2
  100. package/dist/{chunk-SQMDFM4N.js.map → chunk-KE5HDORU.js.map} +1 -1
  101. package/dist/{chunk-PTJTOPE5.js → chunk-KOI7QFDH.js} +3 -3
  102. package/dist/{chunk-PTJTOPE5.js.map → chunk-KOI7QFDH.js.map} +1 -1
  103. package/dist/{chunk-NDBHEOIA.js → chunk-KRL53RZB.js} +8 -8
  104. package/dist/{chunk-NDBHEOIA.js.map → chunk-KRL53RZB.js.map} +1 -1
  105. package/dist/{chunk-7QYBKUAS.js → chunk-LKBRBVVS.js} +3 -3
  106. package/dist/{chunk-7QYBKUAS.js.map → chunk-LKBRBVVS.js.map} +1 -1
  107. package/dist/{chunk-USSP43U3.js → chunk-LQWOU7S2.js} +3 -3
  108. package/dist/{chunk-USSP43U3.js.map → chunk-LQWOU7S2.js.map} +1 -1
  109. package/dist/{chunk-4KPQ6ILH.js → chunk-MEU2HHGV.js} +18 -9
  110. package/dist/chunk-MEU2HHGV.js.map +1 -0
  111. package/dist/{chunk-QC5BYUED.js → chunk-MS2IXLTC.js} +4 -4
  112. package/dist/{chunk-QC5BYUED.js.map → chunk-MS2IXLTC.js.map} +1 -1
  113. package/dist/{chunk-X2B5GMJO.js → chunk-NCJSYU6A.js} +16 -14
  114. package/dist/chunk-NCJSYU6A.js.map +1 -0
  115. package/dist/{chunk-CFTTXUM2.js → chunk-NFFBYG2W.js} +3 -3
  116. package/dist/{chunk-CFTTXUM2.js.map → chunk-NFFBYG2W.js.map} +1 -1
  117. package/dist/{chunk-AVRTZAH2.js → chunk-NTFP2XF4.js} +10 -10
  118. package/dist/chunk-NTFP2XF4.js.map +1 -0
  119. package/dist/{chunk-V2CONXKD.js → chunk-PSPFWTJI.js} +4 -4
  120. package/dist/{chunk-V2CONXKD.js.map → chunk-PSPFWTJI.js.map} +1 -1
  121. package/dist/{chunk-C7L5MFUL.js → chunk-PTXQMTCG.js} +3 -3
  122. package/dist/{chunk-C7L5MFUL.js.map → chunk-PTXQMTCG.js.map} +1 -1
  123. package/dist/{chunk-Y242OE4B.js → chunk-QBJQ426X.js} +3 -3
  124. package/dist/{chunk-Y242OE4B.js.map → chunk-QBJQ426X.js.map} +1 -1
  125. package/dist/{chunk-QBUJTVMY.js → chunk-R3ZNAPBV.js} +3 -3
  126. package/dist/{chunk-QBUJTVMY.js.map → chunk-R3ZNAPBV.js.map} +1 -1
  127. package/dist/{chunk-4WB4KSSQ.js → chunk-RTFH2QR2.js} +3 -3
  128. package/dist/{chunk-4WB4KSSQ.js.map → chunk-RTFH2QR2.js.map} +1 -1
  129. package/dist/{chunk-5KWQMCH7.js → chunk-RZ5R6GDJ.js} +5 -5
  130. package/dist/{chunk-5KWQMCH7.js.map → chunk-RZ5R6GDJ.js.map} +1 -1
  131. package/dist/{chunk-MDCI4RSG.js → chunk-RZL4TOK3.js} +20 -6
  132. package/dist/chunk-RZL4TOK3.js.map +1 -0
  133. package/dist/{chunk-LMADWO4Q.js → chunk-SBAUZ7XH.js} +4 -4
  134. package/dist/{chunk-LMADWO4Q.js.map → chunk-SBAUZ7XH.js.map} +1 -1
  135. package/dist/{chunk-MPRWVZXF.js → chunk-SKG6G4HO.js} +108 -44
  136. package/dist/chunk-SKG6G4HO.js.map +1 -0
  137. package/dist/{chunk-HQAPUPBE.js → chunk-V2VDTQ7A.js} +3 -3
  138. package/dist/{chunk-HQAPUPBE.js.map → chunk-V2VDTQ7A.js.map} +1 -1
  139. package/dist/{chunk-GNUA7XT2.js → chunk-VS6XC5JE.js} +3 -3
  140. package/dist/{chunk-GNUA7XT2.js.map → chunk-VS6XC5JE.js.map} +1 -1
  141. package/dist/{chunk-5J6JWGY4.js → chunk-WDG5IVEA.js} +3 -3
  142. package/dist/{chunk-5J6JWGY4.js.map → chunk-WDG5IVEA.js.map} +1 -1
  143. package/dist/{chunk-M4G2SVXI.js → chunk-XWCV2A2F.js} +4 -4
  144. package/dist/{chunk-M4G2SVXI.js.map → chunk-XWCV2A2F.js.map} +1 -1
  145. package/dist/{chunk-UWD7YBDR.js → chunk-ZLDAPZIX.js} +4 -4
  146. package/dist/{chunk-UWD7YBDR.js.map → chunk-ZLDAPZIX.js.map} +1 -1
  147. package/dist/{claude-code-YRJIGXTL.js → claude-code-CMFGCDMX.js} +5 -5
  148. package/dist/{claude-code-YRJIGXTL.js.map → claude-code-CMFGCDMX.js.map} +1 -1
  149. package/dist/cli/index.js +322 -196
  150. package/dist/cli/index.js.map +1 -1
  151. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  152. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  153. package/dist/cli/src/commands/config.d.ts.map +1 -1
  154. package/dist/cli/src/commands/connector.d.ts.map +1 -1
  155. package/dist/cli/src/commands/harness-preflight.d.ts +3 -1
  156. package/dist/cli/src/commands/harness-preflight.d.ts.map +1 -1
  157. package/dist/cli/src/commands/harness.d.ts.map +1 -1
  158. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  159. package/dist/cli/src/commands/library-index.d.ts +3 -3
  160. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  161. package/dist/cli/src/commands/migrate-files.d.ts +8 -0
  162. package/dist/cli/src/commands/migrate-files.d.ts.map +1 -1
  163. package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -1
  164. package/dist/cli/src/commands/migrate-providers.d.ts.map +1 -1
  165. package/dist/cli/src/commands/migrate.d.ts.map +1 -1
  166. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  167. package/dist/cli/src/commands/project.d.ts.map +1 -1
  168. package/dist/cli/src/commands/run.d.ts.map +1 -1
  169. package/dist/cli/src/commands/serve-preflight.d.ts +7 -5
  170. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  171. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  172. package/dist/cli/src/commands/source.d.ts.map +1 -1
  173. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  174. package/dist/cli/src/config-checks.d.ts +50 -12
  175. package/dist/cli/src/config-checks.d.ts.map +1 -1
  176. package/dist/cli/src/ensure-sources.d.ts.map +1 -1
  177. package/dist/cli/src/harness-error.d.ts +7 -0
  178. package/dist/cli/src/harness-error.d.ts.map +1 -1
  179. package/dist/cli/src/helpers.d.ts.map +1 -1
  180. package/dist/connectors/config.js +5 -5
  181. package/dist/connectors/index.js +20 -19
  182. package/dist/connectors/src/index.d.ts +1 -1
  183. package/dist/connectors/src/index.d.ts.map +1 -1
  184. package/dist/connectors/src/managed-gitconfig.d.ts +12 -0
  185. package/dist/connectors/src/managed-gitconfig.d.ts.map +1 -1
  186. package/dist/{connectors-JKT32HZT.js → connectors-P5M2D4MH.js} +23 -22
  187. package/dist/{connectors-JKT32HZT.js.map → connectors-P5M2D4MH.js.map} +1 -1
  188. package/dist/core/index.js +7 -7
  189. package/dist/core/logging.js +1 -1
  190. package/dist/core/manifest.js +2 -2
  191. package/dist/core/models.js +1 -1
  192. package/dist/core/publish-manifest.js +3 -3
  193. package/dist/core/ref.js +1 -1
  194. package/dist/core/runtime-assets.js +5 -5
  195. package/dist/core/src/index.d.ts +2 -2
  196. package/dist/core/src/index.d.ts.map +1 -1
  197. package/dist/core/src/lock.d.ts +7 -1
  198. package/dist/core/src/lock.d.ts.map +1 -1
  199. package/dist/core/src/models.d.ts.map +1 -1
  200. package/dist/core/src/repo-manager.d.ts +28 -0
  201. package/dist/core/src/repo-manager.d.ts.map +1 -1
  202. package/dist/core/src/run-state-ignore.d.ts +5 -3
  203. package/dist/core/src/run-state-ignore.d.ts.map +1 -1
  204. package/dist/core/src/workspace-config.d.ts.map +1 -1
  205. package/dist/core/workspace-config.js +4 -4
  206. package/dist/deploy/index.js +7 -7
  207. package/dist/discovery/index.js +4 -4
  208. package/dist/{ensure-sources-GUJODKY5.js → ensure-sources-MOGLBEUF.js} +31 -29
  209. package/dist/ensure-sources-MOGLBEUF.js.map +1 -0
  210. package/dist/factory-assets/connectors/box.js +20 -19
  211. package/dist/factory-assets/connectors/deploy.js +20 -19
  212. package/dist/factory-assets/connectors/devserver.js +20 -19
  213. package/dist/factory-assets/connectors/flow/adapter.js +20 -19
  214. package/dist/factory-assets/connectors/flow/engine.js +8 -8
  215. package/dist/factory-assets/connectors/flow/run-flow.js +22 -21
  216. package/dist/factory-assets/connectors/flow.js +20 -19
  217. package/dist/factory-assets/connectors/git/exec.d.ts +7 -0
  218. package/dist/factory-assets/connectors/git/exec.d.ts.map +1 -1
  219. package/dist/factory-assets/connectors/git/repo.d.ts.map +1 -1
  220. package/dist/factory-assets/connectors/git.js +20 -19
  221. package/dist/factory-assets/connectors/gmail/adapter.d.ts.map +1 -1
  222. package/dist/factory-assets/connectors/gmail.js +20 -19
  223. package/dist/factory-assets/connectors/googledrive.js +20 -19
  224. package/dist/factory-assets/connectors/local.js +20 -19
  225. package/dist/factory-assets/connectors/mattermost.js +20 -19
  226. package/dist/factory-assets/connectors/memory.js +20 -19
  227. package/dist/factory-assets/connectors/minio/adapter.d.ts.map +1 -1
  228. package/dist/factory-assets/connectors/minio.js +20 -19
  229. package/dist/factory-assets/connectors/postgres/adapter.d.ts.map +1 -1
  230. package/dist/factory-assets/connectors/postgres.js +20 -19
  231. package/dist/factory-assets/connectors/s3/driver.d.ts.map +1 -1
  232. package/dist/factory-assets/connectors/s3.js +20 -19
  233. package/dist/factory-assets/connectors/sharepoint.js +20 -19
  234. package/dist/factory-assets/connectors/sqlite/adapter.d.ts.map +1 -1
  235. package/dist/factory-assets/connectors/sqlite.js +20 -19
  236. package/dist/factory-assets/connectors/static-server.js +20 -19
  237. package/dist/factory-assets/connectors/tunnel.js +20 -19
  238. package/dist/factory-assets/connectors/webdav.js +20 -19
  239. package/dist/factory-assets/connectors/xstate-store.js +20 -19
  240. package/dist/factory-assets/connectors/xstate.js +20 -19
  241. package/dist/{flows-UCP6ZUYS.js → flows-J64L5MGJ.js} +12 -12
  242. package/dist/{flows-UCP6ZUYS.js.map → flows-J64L5MGJ.js.map} +1 -1
  243. package/dist/{helpers-SO53MRHF.js → helpers-JL5AEGDT.js} +28 -26
  244. package/dist/{helpers-SO53MRHF.js.map → helpers-JL5AEGDT.js.map} +1 -1
  245. package/dist/library/index.js +10 -10
  246. package/dist/library/install.js +4 -4
  247. package/dist/library/src/index.d.ts +2 -2
  248. package/dist/library/src/index.d.ts.map +1 -1
  249. package/dist/library/src/library.d.ts +6 -2
  250. package/dist/library/src/library.d.ts.map +1 -1
  251. package/dist/library/src/local/db.d.ts.map +1 -1
  252. package/dist/library/src/local/library.d.ts +10 -3
  253. package/dist/library/src/local/library.d.ts.map +1 -1
  254. package/dist/library/src/local/local-catalog-source.d.ts +0 -9
  255. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  256. package/dist/library/src/local/schema.d.ts +27 -20
  257. package/dist/library/src/local/schema.d.ts.map +1 -1
  258. package/dist/library/src/manifest-writer.d.ts +13 -0
  259. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  260. package/dist/library/src/remote/index.d.ts +1 -1
  261. package/dist/library/src/remote/index.d.ts.map +1 -1
  262. package/dist/library/src/remote/remote-catalog-source.d.ts +6 -0
  263. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  264. package/dist/library/src/sync/git-driver.d.ts.map +1 -1
  265. package/dist/{library-publish-Z5E3YZCZ.js → library-publish-DZNNZNMB.js} +49 -50
  266. package/dist/library-publish-DZNNZNMB.js.map +1 -0
  267. package/dist/model-endpoint/index.js +10 -10
  268. package/dist/open-library-OJREQ22B.js +61 -0
  269. package/dist/{open-library-A5OB72FD.js.map → open-library-OJREQ22B.js.map} +1 -1
  270. package/dist/{open-registry-BHBHQMBA.js → open-registry-OEU6QUK2.js} +14 -14
  271. package/dist/{open-registry-BHBHQMBA.js.map → open-registry-OEU6QUK2.js.map} +1 -1
  272. package/dist/paths-PXBWY532.js +22 -0
  273. package/dist/{paths-77PXOXZY.js.map → paths-PXBWY532.js.map} +1 -1
  274. package/dist/{plugin-store-XQP2CRYH.js → plugin-store-ZC3EGZ3D.js} +10 -10
  275. package/dist/{plugin-store-XQP2CRYH.js.map → plugin-store-ZC3EGZ3D.js.map} +1 -1
  276. package/dist/{project-KTEUN7KR.js → project-52UABBD5.js} +45 -46
  277. package/dist/{project-KTEUN7KR.js.map → project-52UABBD5.js.map} +1 -1
  278. package/dist/resolver/index.js +8 -8
  279. package/dist/runner/index.js +35 -35
  280. package/dist/runner/src/agent-loop.d.ts.map +1 -1
  281. package/dist/runner/src/serve.d.ts.map +1 -1
  282. package/dist/runner/src/turn-end-contract.d.ts.map +1 -1
  283. package/dist/runner/src/turn-scheduler.d.ts +8 -0
  284. package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
  285. package/dist/sdk/asset-manager.js +14 -14
  286. package/dist/sdk/bridge.js +17 -16
  287. package/dist/sdk/core.js +7 -7
  288. package/dist/sdk/flow.js +8 -8
  289. package/dist/sdk/index.js +35 -35
  290. package/dist/sdk/resolver.js +8 -8
  291. package/dist/sdk/runner.js +35 -35
  292. package/dist/sdk/transport/ws/server.js +8 -8
  293. package/dist/sdk/transport/ws.js +8 -8
  294. package/dist/sdk/transport.js +8 -8
  295. package/dist/{serve-preflight-ODQGVUFL.js → serve-preflight-HOQ7CGYR.js} +30 -30
  296. package/dist/{serve-preflight-ODQGVUFL.js.map → serve-preflight-HOQ7CGYR.js.map} +1 -1
  297. package/dist/{setup-QJDI5YAW.js → setup-JIDZ372C.js} +29 -27
  298. package/dist/setup-JIDZ372C.js.map +1 -0
  299. package/dist/{skills-DE2BDQ6G.js → skills-5D4KDVPJ.js} +13 -13
  300. package/dist/{skills-DE2BDQ6G.js.map → skills-5D4KDVPJ.js.map} +1 -1
  301. package/dist/{source-FKOUYMEM.js → source-P6ZFSSZZ.js} +47 -46
  302. package/dist/{source-FKOUYMEM.js.map → source-P6ZFSSZZ.js.map} +1 -1
  303. package/dist/{source-manifest-publish-JA4TY4Z6.js → source-manifest-publish-Y36FHVDS.js} +49 -48
  304. package/dist/source-manifest-publish-Y36FHVDS.js.map +1 -0
  305. package/dist/transport/index.js +8 -8
  306. package/dist/transport/src/ws/server.d.ts.map +1 -1
  307. package/dist/transport/ws/server.js +8 -8
  308. package/dist/transport/ws.js +8 -8
  309. package/dist/tui/index.js +35 -35
  310. package/dist/workspace-plugin/adapters/mcp.js +27 -26
  311. package/dist/workspace-plugin/adapters/omp.js +14 -14
  312. package/dist/workspace-plugin/index.js +2 -2
  313. package/package.json +1 -1
  314. package/dist/chunk-23Q5LT4U.js.map +0 -1
  315. package/dist/chunk-4KPQ6ILH.js.map +0 -1
  316. package/dist/chunk-5NTB64PW.js.map +0 -1
  317. package/dist/chunk-AVRTZAH2.js.map +0 -1
  318. package/dist/chunk-B2DGCYVC.js.map +0 -1
  319. package/dist/chunk-FZO64PLQ.js.map +0 -1
  320. package/dist/chunk-GYBDWW6K.js +0 -160
  321. package/dist/chunk-GYBDWW6K.js.map +0 -1
  322. package/dist/chunk-GYPPVANR.js +0 -357
  323. package/dist/chunk-GYPPVANR.js.map +0 -1
  324. package/dist/chunk-GZL6RN4Z.js.map +0 -1
  325. package/dist/chunk-JY2JXCL6.js +0 -334
  326. package/dist/chunk-JY2JXCL6.js.map +0 -1
  327. package/dist/chunk-KNY356I3.js.map +0 -1
  328. package/dist/chunk-LOO5CB5M.js +0 -12
  329. package/dist/chunk-LOO5CB5M.js.map +0 -1
  330. package/dist/chunk-MDCI4RSG.js.map +0 -1
  331. package/dist/chunk-MPRWVZXF.js.map +0 -1
  332. package/dist/chunk-O3FYOS64.js.map +0 -1
  333. package/dist/chunk-U3FI4DVT.js.map +0 -1
  334. package/dist/chunk-V3EJYOP2.js +0 -299
  335. package/dist/chunk-V3EJYOP2.js.map +0 -1
  336. package/dist/chunk-V5KG6CCV.js.map +0 -1
  337. package/dist/chunk-WPLZGT5Z.js.map +0 -1
  338. package/dist/chunk-X2B5GMJO.js.map +0 -1
  339. package/dist/chunk-Y2BQWZXT.js.map +0 -1
  340. package/dist/ensure-sources-GUJODKY5.js.map +0 -1
  341. package/dist/library-publish-Z5E3YZCZ.js.map +0 -1
  342. package/dist/open-library-A5OB72FD.js +0 -59
  343. package/dist/paths-77PXOXZY.js +0 -22
  344. package/dist/setup-QJDI5YAW.js.map +0 -1
  345. package/dist/source-manifest-publish-JA4TY4Z6.js.map +0 -1
@@ -1,23 +1,23 @@
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';
1
+ import { processStoreProbe, unregisteredLibraryNames, libraryDirMissing, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, lastLibraryName, filesEntryPaths } from './chunk-FXBKBOI5.js';
2
+ import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-RZ5R6GDJ.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-NDBHEOIA.js';
5
- import { appendHistory, getRecentHistory, clearHistory } from './chunk-7QYBKUAS.js';
4
+ import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, entriesNeedingDeploy, resetMissingParentWarnings, assertNoLibrarySymlinks, composedDriftRefs, deployAll, removeAsset, sourceComposedFiles, cachedComposedFiles, createScaffold, composedAgentNamesOf, installAgent } from './chunk-KRL53RZB.js';
5
+ import { appendHistory, getRecentHistory, clearHistory } from './chunk-LKBRBVVS.js';
6
6
  import { commitChanges } from './chunk-UQ6LFBPZ.js';
7
- import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-QBUJTVMY.js';
7
+ import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-R3ZNAPBV.js';
8
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';
9
+ import { resolveConfiguredHarnessName, computeHash, FACTORY_SOURCE_URL, isFactoryMemorySource, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, cloneBackedSources, readLock, LockParseError, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-MEU2HHGV.js';
10
+ import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-CJO3XKO7.js';
11
11
  import { deployedBase, deployedPaths, deployedDir, isDeployed } from './chunk-5KRMNUL4.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';
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, unpublishedCommitAdvice, resolveAsset, cloneOriginMismatch, cloneIsOnPin, missingPinMessage, DEFAULT_AGENT_INSTANCE_ID, MAX_PRESET_DEPTH, PresetDepthError } from './chunk-BNLXZXZN.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-QC5BYUED.js';
16
- import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-GNUA7XT2.js';
17
- import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-V5KG6CCV.js';
18
- import { ensureRunStateIgnored } from './chunk-MDCI4RSG.js';
15
+ import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, compositeSha256, isNonAssetDir, isNonAssetFile } from './chunk-MS2IXLTC.js';
16
+ import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-VS6XC5JE.js';
17
+ import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-7HRZACI4.js';
18
+ import { ensureRunStateIgnored } from './chunk-RZL4TOK3.js';
19
19
  import { spawnSync } from 'child_process';
20
- import { existsSync, rmSync, readFileSync, writeFileSync, readdirSync, lstatSync, statSync, realpathSync, unlinkSync, mkdirSync } from 'fs';
20
+ import { existsSync, rmSync, readFileSync, mkdirSync, writeFileSync, readdirSync, lstatSync, statSync, realpathSync, unlinkSync } from 'fs';
21
21
  import { homedir } from 'os';
22
22
  import path, { resolve, dirname, sep, join, relative, isAbsolute, posix } from 'path';
23
23
  import { gt } from 'semver';
@@ -70,9 +70,10 @@ function instancesBoundToAgent(projectDir, name, publisher) {
70
70
  } catch {
71
71
  return [];
72
72
  }
73
+ const want = publisher?.replace(/^@/, "");
73
74
  return Object.entries(instances).filter(([, instance]) => {
74
75
  const bound = agentOfRef(instance.ref);
75
- return bound !== void 0 && bound.name === name && (true);
76
+ return bound !== void 0 && bound.name === name && (!want || !bound.publisher || bound.publisher === want);
76
77
  }).map(([id]) => id);
77
78
  }
78
79
  function boundAgentNames(projectDir) {
@@ -273,6 +274,54 @@ function installAgentInstances(opts) {
273
274
  }
274
275
  return result;
275
276
  }
277
+ function harnessSwitchStateFile(projectDir) {
278
+ return join(projectDir, ".skaile", "harness-switch-hashes.json");
279
+ }
280
+ function harnessSwitchKeptKey(projectDir, path2) {
281
+ return relative(resolve(projectDir), resolve(path2)).split(sep).join("/");
282
+ }
283
+ function stringMap(value) {
284
+ const out = /* @__PURE__ */ new Map();
285
+ if (value && typeof value === "object" && !Array.isArray(value)) {
286
+ for (const [k, v] of Object.entries(value)) if (typeof v === "string") out.set(k, v);
287
+ }
288
+ return out;
289
+ }
290
+ function readHarnessSwitchState(projectDir) {
291
+ const state = { hashes: /* @__PURE__ */ new Map(), kept: /* @__PURE__ */ new Set() };
292
+ try {
293
+ const parsed = JSON.parse(readFileSync(harnessSwitchStateFile(projectDir), "utf-8"));
294
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return state;
295
+ const record = parsed;
296
+ if (Array.isArray(record.kept) || record.hashes && typeof record.hashes === "object") {
297
+ state.hashes = stringMap(record.hashes);
298
+ for (const k of Array.isArray(record.kept) ? record.kept : []) {
299
+ if (typeof k === "string") state.kept.add(k);
300
+ }
301
+ } else {
302
+ state.hashes = stringMap(record);
303
+ }
304
+ } catch {
305
+ }
306
+ return state;
307
+ }
308
+ function writeHarnessSwitchState(projectDir, state) {
309
+ const file = harnessSwitchStateFile(projectDir);
310
+ try {
311
+ if (state.hashes.size === 0 && state.kept.size === 0) {
312
+ rmSync(file, { force: true });
313
+ return;
314
+ }
315
+ mkdirSync(dirname(file), { recursive: true });
316
+ const body = {
317
+ hashes: Object.fromEntries(state.hashes),
318
+ kept: [...state.kept].sort()
319
+ };
320
+ writeFileSync(file, `${JSON.stringify(body, null, 2)}
321
+ `);
322
+ } catch {
323
+ }
324
+ }
276
325
  var TARGET_MCP_CONFIG = {
277
326
  "claude-code": ".mcp.json"
278
327
  };
@@ -553,16 +602,19 @@ async function removeEmptyLedger(projectDir) {
553
602
  } catch {
554
603
  }
555
604
  }
556
- function mergeServers(existing, renderable, managedIds, warn, configLabel) {
605
+ function mergeServers(existing, renderable, managedIds, warn, configLabel, keep = /* @__PURE__ */ new Set()) {
557
606
  const next = { ...existing };
558
607
  const managed = new Set(managedIds);
559
608
  const owned = [];
560
609
  const removed = [];
561
610
  for (const id of managed) {
562
- if (!renderable.has(id) && Object.hasOwn(next, id)) {
563
- delete next[id];
564
- removed.push(id);
611
+ if (renderable.has(id) || !Object.hasOwn(next, id)) continue;
612
+ if (keep.has(id)) {
613
+ owned.push(id);
614
+ continue;
565
615
  }
616
+ delete next[id];
617
+ removed.push(id);
566
618
  }
567
619
  for (const [id, entry] of renderable) {
568
620
  if (Object.hasOwn(next, id) && !managed.has(id)) {
@@ -776,7 +828,8 @@ async function renderMcpServerConfig(projectDir, harnessTarget, opts) {
776
828
  renderable,
777
829
  managedIds,
778
830
  warn,
779
- relConfig
831
+ relConfig,
832
+ opts?.keep
780
833
  );
781
834
  for (const id of removed) await removePayloadDir(projectDir, id);
782
835
  for (const decl of declarations) {
@@ -784,7 +837,12 @@ async function renderMcpServerConfig(projectDir, harnessTarget, opts) {
784
837
  const unset = unsetRequiredFields(decl);
785
838
  if (unset.length > 0) warn(`MCP server "${decl.id}" ${requiredFieldsAdvice(decl.id, unset)}`);
786
839
  }
787
- const rendered = Object.fromEntries(owned.map((id) => [id, entryHash(next[id])]));
840
+ const rendered = Object.fromEntries(
841
+ owned.map((id) => [
842
+ id,
843
+ renderable.has(id) ? entryHash(next[id]) : ledger.rendered[id] ?? entryHash(next[id])
844
+ ])
845
+ );
788
846
  const ledgerStale = JSON.stringify(owned) !== JSON.stringify(managedIds) || canonicalJson(rendered) !== canonicalJson(ledger.rendered);
789
847
  if (ledgerStale) await writeManaged(projectDir, harnessTarget, { ids: owned, rendered });
790
848
  if (Object.keys(next).length === 0 && !existingFile) {
@@ -884,8 +942,20 @@ function lockedAssetFiles(kind, files) {
884
942
  const manifestDir = posix.dirname(manifestRel);
885
943
  return files.flatMap((f) => {
886
944
  const rel = posix.relative(manifestDir, f.path);
887
- return rel === "" || rel.startsWith("..") ? [] : [{ rel, sha256: f.sha256 }];
945
+ return rel === "" || rel.startsWith("..") ? [] : [{ rel, path: f.path, sha256: f.sha256 }];
946
+ });
947
+ }
948
+ function lockRecordsOtherHash(entry, kind, deployed) {
949
+ if (deployed.size === 0) return [];
950
+ const byPath = new Map(lockedAssetFiles(kind, entry.files).map((f) => [f.path, f.rel]));
951
+ const replaced = entry.files.map((f) => {
952
+ const rel = byPath.get(f.path);
953
+ return {
954
+ path: f.path,
955
+ sha256: (rel === void 0 ? void 0 : deployed.get(rel)) ?? f.sha256
956
+ };
888
957
  });
958
+ return compositeSha256(replaced) === entry.sha256 ? [...deployed.keys()] : [];
889
959
  }
890
960
  var GITHUB_REPO_URL = /github\.com[/:]/i;
891
961
  function isBundledFactoryEntry(entry) {
@@ -1394,6 +1464,22 @@ var MissingManifestError = class extends Error {
1394
1464
  }
1395
1465
  projectDir;
1396
1466
  };
1467
+ function swapNameInPath(rel, name, id) {
1468
+ return rel.split("/").map(
1469
+ (seg) => seg === name ? id : seg.startsWith(`${name}.`) ? id + seg.slice(name.length) : seg
1470
+ ).join("/");
1471
+ }
1472
+ function sameRenderUnderName(assetFile, instanceFile, id, name) {
1473
+ try {
1474
+ const word = new RegExp(
1475
+ `(?<![\\w-])${id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![\\w-])`,
1476
+ "g"
1477
+ );
1478
+ return readFileSync(instanceFile, "utf8").replace(word, name) === readFileSync(assetFile, "utf8");
1479
+ } catch {
1480
+ return false;
1481
+ }
1482
+ }
1397
1483
  function unlistedAssetMessage(ref, library, libPath, ownership) {
1398
1484
  const head = `${ref} is in library "${library}" but not listed in its skaile.manifest.yaml, so only part of its files would be deployed.`;
1399
1485
  return isReadOnlyLibrary(libPath, ownership) ? `${head} "${library}" is a read-only source clone: add it to skaile.manifest.yaml in the source repo and push, then run \`skaile source sync\`.` : `${head} Run \`skaile library index ${library}\`, then add it again.`;
@@ -1522,8 +1608,8 @@ var AssetManager = class {
1522
1608
  verboseCollisions;
1523
1609
  /** Store URLs whose failed version lookup was already reported (one warning per URL). */
1524
1610
  warnedStoreVersionLookups = /* @__PURE__ */ new Set();
1525
- /** Whether each store answers: one command asks a dead store once ({@link StoreProbe}). */
1526
- storeProbe = new StoreProbe();
1611
+ /** Whether each store answers: one process asks a dead store once (`processStoreProbe`). */
1612
+ storeProbe = processStoreProbe;
1527
1613
  /** Stores a lookup could not reach (store URL -> one line why); `add` reports them instead of "not found". */
1528
1614
  storeFailures = /* @__PURE__ */ new Map();
1529
1615
  /** The agent `add` is about to bind to an instance: its deploy writes no file named after the asset. */
@@ -2046,7 +2132,15 @@ var AssetManager = class {
2046
2132
  if (this.global) return [];
2047
2133
  const before = await this.mcpDriftRows();
2048
2134
  try {
2049
- await renderMcpServerConfig(this.projectDir, this.harness);
2135
+ const declared = new Set((await loadMcpServerDeclarations(this.projectDir)).map((d) => d.id));
2136
+ const lock = this.tryReadLock();
2137
+ const wanted = new Set(
2138
+ lock ? [...await this.declaredLockKeys(lock, this.loadConfig().dependencies)].map(parseCanonicalLockKey).filter((id) => id.kind === "mcp-server" && id.name).map((id) => id.name) : []
2139
+ );
2140
+ const keep = new Set(
2141
+ [...this.lockedMcpNames()].filter((name) => !declared.has(name) && wanted.has(name))
2142
+ );
2143
+ await renderMcpServerConfig(this.projectDir, this.harness, { keep });
2050
2144
  } catch (err) {
2051
2145
  console.warn(
2052
2146
  `skaile: could not render MCP config for ${this.harness}: ${err instanceof Error ? err.message : String(err)}`
@@ -2073,61 +2167,142 @@ var AssetManager = class {
2073
2167
  return restored;
2074
2168
  }
2075
2169
  /**
2076
- * Remove the files named after an agent asset that an earlier CLI rendered and this one does
2077
- * not: the agent is bound by an instance (its rendering is the instance's file), or
2078
- * it only runs as a `binding: run` role. Only a file the lock lists for the agent, whose bytes
2079
- * still equal what the lock recorded, and that no instance of the ledger claims is removed;
2080
- * an edited one stays (it is the user's now) and is named. The old lock entry is rewritten
2081
- * by the same install, so the lock never keeps a path that is gone.
2082
- *
2083
- * @returns The project-relative paths removed.
2170
+ * Whether a project-relative path is a file an agent instance renders (the ledger's files). An
2171
+ * instance claims files and folders (omp renders a folder): a file under a claimed folder is
2172
+ * claimed too.
2084
2173
  */
2085
- pruneAssetNamedAgentFiles() {
2174
+ instanceClaims() {
2175
+ const claimedPaths = renderedInstanceFiles(this.projectDir, this.harness).flatMap(
2176
+ (i) => i.files
2177
+ );
2178
+ return (rel) => claimedPaths.some((c) => rel === c || rel.startsWith(`${c}/`));
2179
+ }
2180
+ /**
2181
+ * Whether the path `rel` that the lock lists under `rendered:` for the agent `name` is a file
2182
+ * named after the asset that an instance's file (or the `binding: run` role) stands for now.
2183
+ * Such a path is no part of the rendering the lock expects any more: a lock of 5.13.0 and older
2184
+ * still lists it, `install` drops it at the next lock write, and until then it is neither a
2185
+ * missing nor an edited copy. Always `false` in global mode.
2186
+ */
2187
+ supersededRendering() {
2188
+ if (this.global || !harnessTargetSupportsAgents(this.harness)) return () => false;
2189
+ const bound = boundAgentNames(this.projectDir);
2190
+ const runRoles = runRoleAgentNames(this.projectDir);
2191
+ const claimed = this.instanceClaims();
2192
+ const standsFor = /* @__PURE__ */ new Map();
2193
+ const relOf = (abs) => relative(this.projectDir, abs).split(sep).join("/");
2194
+ return (name, rel) => {
2195
+ if (claimed(rel)) return false;
2196
+ let stands = standsFor.get(name);
2197
+ if (stands === void 0) {
2198
+ stands = runRoles.has(name) || bound.has(name) && isAgentInstanceRendered(this.projectDir, this.harness, name);
2199
+ standsFor.set(name, stands);
2200
+ }
2201
+ if (!stands) return false;
2202
+ const own = [
2203
+ ...deployedPaths("agent", name, this.harness, false, this.projectDir),
2204
+ join(
2205
+ dirname(deployedBase("agent", this.harness, false, this.projectDir)),
2206
+ CODEX_IDENTITY_DIR,
2207
+ `${name}.md`
2208
+ )
2209
+ ].map(relOf);
2210
+ return own.some((o) => rel === o || rel.startsWith(`${o}/`));
2211
+ };
2212
+ }
2213
+ /**
2214
+ * The files named after an agent asset that an earlier CLI rendered and this one does not: the
2215
+ * agent is bound by an instance (its rendering is the instance's file), or it only runs as a
2216
+ * `binding: run` role. A file counts when no instance of the ledger claims it and either the
2217
+ * lock lists it for the agent (`edited` when its bytes differ from the recorded ones), or the
2218
+ * lock records no rendering for the agent at all (5.11.0 and older) and the file is the
2219
+ * instance's render under the asset's name. A file of the second kind that differs from that
2220
+ * render may be the user's own and is not listed. Project mode only.
2221
+ */
2222
+ leftoverAgentFiles() {
2086
2223
  const lock = this.tryReadLock();
2087
2224
  if (this.global || !lock || !harnessTargetSupportsAgents(this.harness)) return [];
2088
2225
  const bound = boundAgentNames(this.projectDir);
2089
2226
  const runRoles = runRoleAgentNames(this.projectDir);
2090
- const claimedPaths = renderedInstanceFiles(this.projectDir, this.harness).flatMap(
2091
- (i) => i.files
2092
- );
2093
- const claimed = (rel) => claimedPaths.some((c) => rel === c || rel.startsWith(`${c}/`));
2094
- const agentDir = resolve(deployedBase("agent", this.harness, false, this.projectDir));
2095
- const removed = [];
2227
+ const claimed = this.instanceClaims();
2228
+ const found = [];
2096
2229
  for (const [key, entry] of Object.entries(lock.assets)) {
2097
- const { kind, name } = parseCanonicalLockKey(key);
2098
- if (!kind || !name || this.installTarget(kind) !== "agent" || !entry.rendered?.length) {
2099
- continue;
2100
- }
2230
+ const { kind, name, publisher } = parseCanonicalLockKey(key);
2231
+ if (!kind || !name || this.installTarget(kind) !== "agent") continue;
2101
2232
  if (!bound.has(name) && !runRoles.has(name)) continue;
2102
2233
  if (!runRoles.has(name) && !isAgentInstanceRendered(this.projectDir, this.harness, name)) {
2103
2234
  continue;
2104
2235
  }
2105
- const named = new Set(this.renderedAgentFiles(name).map((f) => f.path));
2106
- for (const f of entry.rendered) {
2107
- if (!named.has(f.path) || claimed(f.path)) continue;
2108
- const abs = join(this.projectDir, f.path);
2109
- if (!existsSync(abs)) continue;
2110
- let intact = false;
2111
- try {
2112
- intact = computeHash(abs) === f.sha256;
2113
- } catch {
2114
- }
2115
- if (!intact) {
2116
- console.warn(
2117
- `skaile: ${f.path} is no longer written for ${name} (an instance renders it); it was edited, so it stays`
2118
- );
2119
- continue;
2120
- }
2121
- rmSync(abs, { force: true });
2122
- removed.push(f.path);
2123
- for (let dir = dirname(abs); dir.startsWith(agentDir + sep); dir = dirname(dir)) {
2124
- if (readdirSync(dir).length > 0) break;
2125
- rmSync(dir, { recursive: true, force: true });
2236
+ const named = this.renderedAgentFiles(name).map((f) => f.path);
2237
+ const ids = instancesBoundToAgent(this.projectDir, name, publisher);
2238
+ if (entry.rendered?.length) {
2239
+ for (const f of entry.rendered) {
2240
+ if (!named.includes(f.path) || claimed(f.path)) continue;
2241
+ const abs = join(this.projectDir, f.path);
2242
+ if (!existsSync(abs)) continue;
2243
+ let intact = false;
2244
+ try {
2245
+ intact = computeHash(abs) === f.sha256;
2246
+ } catch {
2247
+ }
2248
+ found.push({ agent: name, path: f.path, ids, edited: !intact });
2126
2249
  }
2250
+ continue;
2251
+ }
2252
+ for (const rel of named) {
2253
+ if (claimed(rel)) continue;
2254
+ const same = ids.some(
2255
+ (id) => sameRenderUnderName(
2256
+ join(this.projectDir, rel),
2257
+ join(this.projectDir, swapNameInPath(rel, name, id)),
2258
+ id,
2259
+ name
2260
+ )
2261
+ );
2262
+ if (same) found.push({ agent: name, path: rel, ids, edited: false });
2263
+ }
2264
+ }
2265
+ return found;
2266
+ }
2267
+ /**
2268
+ * Remove the leftover files {@link leftoverAgentFiles} lists. A file edited since the lock
2269
+ * stays (it is the user's now) and is named. The old lock entry is rewritten by the same
2270
+ * install, so the lock never keeps a path that is gone; `install --locked` leaves the lock,
2271
+ * which `check` does not read for a file that is gone.
2272
+ *
2273
+ * @returns The project-relative paths removed.
2274
+ */
2275
+ pruneAssetNamedAgentFiles() {
2276
+ const agentDir = resolve(deployedBase("agent", this.harness, false, this.projectDir));
2277
+ const removed = [];
2278
+ for (const f of this.leftoverAgentFiles()) {
2279
+ if (f.edited) {
2280
+ console.warn(
2281
+ `skaile: ${f.path} is no longer written for ${f.agent} (an instance renders it); it was edited, so it stays`
2282
+ );
2283
+ continue;
2284
+ }
2285
+ const abs = join(this.projectDir, f.path);
2286
+ rmSync(abs, { force: true });
2287
+ removed.push(f.path);
2288
+ for (let dir = dirname(abs); dir.startsWith(agentDir + sep); dir = dirname(dir)) {
2289
+ if (readdirSync(dir).length > 0) break;
2290
+ rmSync(dir, { recursive: true, force: true });
2127
2291
  }
2128
2292
  }
2129
2293
  return removed;
2130
2294
  }
2295
+ /**
2296
+ * The `check`, `doctor` and `outdated` lines for the files {@link leftoverAgentFiles} lists: an
2297
+ * untouched one is removed by the next `install` (and by `install --locked`), an edited one
2298
+ * stays. Empty in global mode and when nothing is left over.
2299
+ */
2300
+ leftoverAgentFileNotices() {
2301
+ return this.leftoverAgentFiles().map((f) => {
2302
+ const by = f.ids.length > 0 ? ` (${f.ids.join(", ")} renders it)` : "";
2303
+ return f.edited ? `${f.path} is no longer written for agent ${f.agent}${by}; it was edited, so it stays: delete it by hand` : `${f.path} is left over from an older skaile${by}: skaile install removes it`;
2304
+ });
2305
+ }
2131
2306
  /**
2132
2307
  * Render every agent instance of `skaile.yaml` into the harness target's native
2133
2308
  * agent files (`.claude/agents/<id>.md`, …) and prune the renderings of
@@ -2137,7 +2312,7 @@ var AssetManager = class {
2137
2312
  *
2138
2313
  * @param opts.prune - Also remove the files named after the agent assets that an earlier CLI
2139
2314
  * rendered and an instance renders now ({@link pruneAssetNamedAgentFiles}). Set by the
2140
- * commands that rewrite the lock; `install --locked` leaves the lock, so it leaves them.
2315
+ * commands that deploy or re-lock; the lock is left as it is by `install --locked`.
2141
2316
  */
2142
2317
  async renderAgentInstances(opts) {
2143
2318
  if (this.global) return {};
@@ -2310,7 +2485,8 @@ var AssetManager = class {
2310
2485
  sourceUrl: declared?.url ?? url,
2311
2486
  commit: entry.source.commit,
2312
2487
  files: entry.files,
2313
- sha256: entry.sha256
2488
+ sha256: entry.sha256,
2489
+ ...entry.origin === "store" && entry.store ? { storeUrl: entry.store } : {}
2314
2490
  };
2315
2491
  }
2316
2492
  /**
@@ -2499,8 +2675,9 @@ var AssetManager = class {
2499
2675
  /**
2500
2676
  * Every ref that more than one registered library holds, with one row per holder
2501
2677
  * (all libraries, all versions) in the order `add` prefers them: the first row is
2502
- * the one `add <ref>` deploys. The local index keeps a single row per ref and
2503
- * version, so `search` reads this to show equal-version copies in both libraries.
2678
+ * the one `add <ref>` deploys. `search` reads this to group the index rows of a ref
2679
+ * (one per library) and mark the copy `add` deploys; the versions come from the files
2680
+ * themselves, which the index follows only after the next `skaile library index`.
2504
2681
  *
2505
2682
  * @returns `kind:@publisher/name` → holders; refs held by one library are absent.
2506
2683
  */
@@ -2525,8 +2702,8 @@ var AssetManager = class {
2525
2702
  }
2526
2703
  /**
2527
2704
  * Every asset a registered library holds, read from the library directories themselves
2528
- * (not the local index, which keeps one row per ref and version and loses a ref when
2529
- * another library re-publishes it). One row per holder, all versions.
2705
+ * (not the local index, which lags behind them until the next `skaile library index`).
2706
+ * One row per holder, all versions.
2530
2707
  *
2531
2708
  * @returns `[]` when no library holds an asset. Never warns.
2532
2709
  */
@@ -2920,6 +3097,7 @@ var AssetManager = class {
2920
3097
  const links = readLinks(this.projectDir);
2921
3098
  const checked = /* @__PURE__ */ new Set();
2922
3099
  for (const c of resolved) {
3100
+ if (c.storeUrl) continue;
2923
3101
  if (!c.commit || /^0+$/.test(c.commit) || checked.has(`${c.sourceUrl}@${c.commit}`)) continue;
2924
3102
  checked.add(`${c.sourceUrl}@${c.commit}`);
2925
3103
  const hit = Object.entries(repositories).find(
@@ -3681,10 +3859,15 @@ var AssetManager = class {
3681
3859
  if (byName.state === "ok") return byName;
3682
3860
  if (origin.url) {
3683
3861
  const wanted = normalizeRepoUrl(origin.url);
3684
- const byUrl = snap?.libraries.find((l) => {
3862
+ const sameRemote = (snap?.libraries ?? []).filter((l) => {
3685
3863
  const url = libraryRemoteUrl(l);
3686
3864
  return l.name !== name && url !== void 0 && normalizeRepoUrl(url) === wanted && existsSync(l.path);
3687
3865
  });
3866
+ const byUrl = (asset && origin.sha256 ? sameRemote.find(
3867
+ (l) => libraryDiskHashes(l.path, /* @__PURE__ */ new Map(), this.registry).get(
3868
+ `${asset.kind}:${asset.name}`
3869
+ ) === origin.sha256
3870
+ ) : void 0) ?? sameRemote[0];
3688
3871
  if (byUrl) return { state: "ok", path: byUrl.path, name: byUrl.name };
3689
3872
  }
3690
3873
  const holder = asset && origin.sha256 ? this.libraryHoldingLockedBytes(origin.sha256, asset, snap) : void 0;
@@ -4264,6 +4447,32 @@ var AssetManager = class {
4264
4447
  }
4265
4448
  return entries;
4266
4449
  }
4450
+ /**
4451
+ * The tail of a `hash mismatch for <file>: expected <lock>, got <fetched>` failure of a locked
4452
+ * restore when the deployed copy already holds the fetched bytes: the lock records another
4453
+ * hash for the file, and `install` (not `install --locked`) writes the right one. Empty for
4454
+ * any other failure, and when the copy is missing or differs from the fetched bytes.
4455
+ */
4456
+ wrongLockHashHint(candidates, reason) {
4457
+ const m = /hash mismatch for (.+): expected [0-9a-f]{64}, got ([0-9a-f]{64})/.exec(reason);
4458
+ if (!m) return "";
4459
+ const [, file, got] = m;
4460
+ for (const c of candidates) {
4461
+ const component = this.installTarget(c.kind);
4462
+ if (!component || component === "agent" || !c.files) continue;
4463
+ const locked = lockedAssetFiles(c.kind, c.files).find((f) => f.path === file);
4464
+ if (!locked) continue;
4465
+ try {
4466
+ const dest = deployedDir(component, c.name, this.harness, this.global, this.projectDir);
4467
+ if (computeHash(join(dest, locked.rel)) !== got) return "";
4468
+ } catch {
4469
+ return "";
4470
+ }
4471
+ return `
4472
+ the lock records another hash for ${file} (the deployed copy holds the bytes the store returns): run \`skaile install\` to re-lock it`;
4473
+ }
4474
+ return "";
4475
+ }
4267
4476
  /**
4268
4477
  * Fetch + SHA-verify the bytes of every store-resolved candidate that needs
4269
4478
  * bytes on disk into `.skaile/cache/store/`, reusing the same verified-fetch
@@ -4396,6 +4605,7 @@ var AssetManager = class {
4396
4605
  */
4397
4606
  candidateHasLocalBytes(c, repositories) {
4398
4607
  if (!c.sourceUrl) return false;
4608
+ if (c.storeUrl) return false;
4399
4609
  const rel = this.primaryManifestRel(c);
4400
4610
  for (const [slug, decl] of Object.entries(repositories)) {
4401
4611
  if (decl.url === void 0 || decl.url !== c.sourceUrl) continue;
@@ -4913,7 +5123,7 @@ Fix the asset, then run \`skaile library index ${origin}\` and install again.`
4913
5123
  ensureSourceClones(repositories, sources, lock) {
4914
5124
  const pinBySlug = pinsBySlug(sources);
4915
5125
  const lockedCommit = /* @__PURE__ */ new Map();
4916
- for (const s of lock?.sources ?? []) {
5126
+ for (const s of lock ? cloneBackedSources(lock) : []) {
4917
5127
  if (!/^0*$/.test(s.commit)) lockedCommit.set(sourceCacheKey(s.url), s.commit);
4918
5128
  }
4919
5129
  for (const [name, decl] of Object.entries(repositories)) {
@@ -5448,7 +5658,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5448
5658
  const factoryDecl = Object.values(repositories).find((d) => d.factory);
5449
5659
  const factoryDir = factoryDecl?.path ?? null;
5450
5660
  const unavailable = [];
5451
- for (const src of lock.sources) {
5661
+ for (const src of cloneBackedSources(lock)) {
5452
5662
  if (factoryDir !== null && isFactoryMemorySource(src)) continue;
5453
5663
  const slug = sourceCacheKey(src.url);
5454
5664
  const declared = declBySlug.get(slug);
@@ -5507,8 +5717,10 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5507
5717
  resolved = await this.buildCatalogEntries(candidates, repositories);
5508
5718
  } catch (err) {
5509
5719
  const reason = err instanceof Error ? err.message : String(err);
5510
- throw new Error(`Lock file verification failed:
5511
- ${reason}`);
5720
+ throw new Error(
5721
+ `Lock file verification failed:
5722
+ ${reason}${this.wrongLockHashHint(candidates, reason)}`
5723
+ );
5512
5724
  }
5513
5725
  const library = await this.restoreLibraryLockEntries(lock, { storeFallback: true });
5514
5726
  assertFlowsLoad([...resolved, ...library.entries], "installed");
@@ -5591,7 +5803,7 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5591
5803
  ];
5592
5804
  this.sweepLegacyOmpCopies([...resolved, ...library.entries]);
5593
5805
  const mcpRestored = await this.renderHarnessMcpConfig();
5594
- const agentRender = await this.renderAgentInstances();
5806
+ const agentRender = await this.renderAgentInstances({ prune: true });
5595
5807
  const { rewritten, restored: restoredRenderings } = this.changedRenderings(unrecordedRenderings);
5596
5808
  const restored = [
5597
5809
  ...this.restoredCopies(copyDrift, deployed, missingCopies),
@@ -5825,7 +6037,8 @@ Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace
5825
6037
  const plain = err.message.endsWith(advice) ? err.message.slice(0, -advice.length) : err.message;
5826
6038
  if (plain.startsWith("publisher required")) {
5827
6039
  const matches = await this.resolvableMatches(ref, repositories, sources);
5828
- const hint = matches.length === 0 ? ` Find the publisher with \`skaile store search ${ref.trim().replace(/^[^:@/#\s]+:/, "").replace(/#.*$/, "")}\`.` : matches.length === 1 ? ` Did you mean ${matches[0]}?` : ` Did you mean one of: ${matches.join(", ")}?`;
6040
+ const query = ref.trim().replace(/^[^:@/#\s]+:/, "").replace(/#.*$/, "");
6041
+ const hint = matches.length === 0 ? query === "" ? "" : ` Find the publisher with \`skaile store search ${query}\`.` : matches.length === 1 ? ` Did you mean ${matches[0]}?` : ` Did you mean one of: ${matches.join(", ")}?`;
5829
6042
  throw new Error(`${plain}${hint}`);
5830
6043
  }
5831
6044
  const pinned = /^(.*\/[^@#/]+)@([^@#/]+)$/.exec(ref.trim());
@@ -7040,6 +7253,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7040
7253
  */
7041
7254
  listStaleHarnessCopies(opts = {}) {
7042
7255
  if (this.global) return [];
7256
+ const keptCopies = readHarnessSwitchState(this.projectDir).kept;
7043
7257
  const recordedHashes = new Map([
7044
7258
  ...this.lockedRenderedHashes(),
7045
7259
  ...opts.renderedBefore ?? []
@@ -7096,6 +7310,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7096
7310
  }
7097
7311
  const twin = join(activeBase, relative(otherBase, p));
7098
7312
  const skaileWrote = k === "agent" ? locked && matchesRecordedHashes(p, recordedHashes) : !relative(otherBase, p).startsWith("..") && sameBytes(p, twin);
7313
+ if (keptCopies.has(harnessSwitchKeptKey(this.projectDir, p))) continue;
7099
7314
  out.push({ harness: other, kind, name, path: p, skaileWrote });
7100
7315
  }
7101
7316
  }
@@ -7709,12 +7924,17 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
7709
7924
  if (touching !== null) behind = touching;
7710
7925
  }
7711
7926
  if (behind <= 0) continue;
7927
+ const advice = (status.ahead ?? 0) > 0 ? unpublishedCommitAdvice(clone, status.remoteRef) : "";
7712
7928
  result.push({
7713
7929
  kind,
7714
7930
  name,
7715
7931
  publisher: publisher ?? sourceShortName(src.url),
7716
7932
  currentVersion: version ?? "",
7717
- behind
7933
+ behind,
7934
+ ...advice ? {
7935
+ problem: `${behind} commit(s) behind${advice.replace(/^ - /, ", but the ")}`,
7936
+ manualFix: true
7937
+ } : {}
7718
7938
  });
7719
7939
  }
7720
7940
  }
@@ -8666,11 +8886,12 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8666
8886
  const parts = [
8667
8887
  ...d.modified.map((f) => {
8668
8888
  const instance = d.instanceOf?.get(f);
8669
- 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`;
8889
+ return instance ? `${f}, the file of agent instance "${instance}", was edited` : d.lockWrong?.includes(f) ? `the lock records another hash for ${f}` : 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`;
8670
8890
  }),
8671
8891
  ...d.extra.map((f) => `${f} is not part of the asset`)
8672
8892
  ];
8673
- const reason = d.libraryChanged ? `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 the library holds other content now: copy your edit away, then run \`skaile update --force\` to replace it` : `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 run \`skaile install --locked\` to restore it`;
8893
+ const onlyLockWrong = d.extra.length === 0 && d.modified.every((f) => d.lockWrong?.includes(f));
8894
+ const reason = onlyLockWrong ? `is locked, but ${parts.join("; ")} (the deployed copy is not edited) \u2014 run \`skaile install\` to re-lock it` : d.libraryChanged ? `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 the library holds other content now: copy your edit away, then run \`skaile update --force\` to replace it` : `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 run \`skaile install --locked\` to restore it`;
8674
8895
  gaps.push({ type: "modified", ref: d.ref, reason, message: `${d.ref} ${reason}` });
8675
8896
  named.add(gapIdentity(d.ref));
8676
8897
  }
@@ -8722,6 +8943,22 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
8722
8943
  unreadableSource: true
8723
8944
  });
8724
8945
  }
8946
+ for (const entry of this.loadConfig().sources) {
8947
+ if (!entry.pin) continue;
8948
+ const dest = join(getGlobalCacheDir(), sourceCacheKey(entry.url));
8949
+ if (existsSync(dest) && cloneIsOnPin(dest, entry.pin)) continue;
8950
+ const missing = missingPinMessage(entry.url, entry.pin);
8951
+ if (!missing) continue;
8952
+ const reason = `is skipped: ${missing} - fix the pin in skaile.yaml`;
8953
+ gaps.push({
8954
+ type: "source",
8955
+ ref: entry.url,
8956
+ reason,
8957
+ message: `source ${sourceShortName(entry.url)} ${reason}`,
8958
+ manualFix: true,
8959
+ unreadableSource: true
8960
+ });
8961
+ }
8725
8962
  for (const u of unboundAgentInstances(this.projectDir, this.harness)) {
8726
8963
  const reason = u.ref.startsWith("agent:") ? await this.unboundAgentReason(u.id, u.ref) : `is bound by agent instance "${u.id}" but resolves to no agent.yaml \u2014 fix the path, or drop the binding from skaile.yaml`;
8727
8964
  gaps.push({
@@ -9618,15 +9855,21 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9618
9855
  }
9619
9856
  const modified = [];
9620
9857
  const locked = lockedAssetFiles(kind, entry.files);
9858
+ const deployedHashes = /* @__PURE__ */ new Map();
9621
9859
  for (const f of locked) {
9622
9860
  const deployedFile = join(dest, f.rel);
9623
9861
  if (!existsSync(deployedFile)) continue;
9624
9862
  try {
9625
- if (computeHash(deployedFile) !== f.sha256) modified.push(f.rel);
9863
+ const actual = computeHash(deployedFile);
9864
+ if (actual !== f.sha256) {
9865
+ modified.push(f.rel);
9866
+ deployedHashes.set(f.rel, actual);
9867
+ }
9626
9868
  } catch {
9627
9869
  modified.push(f.rel);
9628
9870
  }
9629
9871
  }
9872
+ const lockWrong = deployedHashes.size === modified.length ? lockRecordsOtherHash(entry, kind, deployedHashes) : [];
9630
9873
  const covered = new Set(locked.map((f) => f.rel));
9631
9874
  let extra = [];
9632
9875
  try {
@@ -9634,14 +9877,25 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9634
9877
  } catch {
9635
9878
  }
9636
9879
  if (modified.length > 0 || extra.length > 0)
9637
- out.push({ ref: refOf(key), key, modified, extra, library: false });
9880
+ out.push({
9881
+ ref: refOf(key),
9882
+ key,
9883
+ modified,
9884
+ extra,
9885
+ library: false,
9886
+ ...lockWrong.length > 0 ? { lockWrong } : {}
9887
+ });
9638
9888
  }
9639
9889
  let snapForAgents;
9890
+ const superseded = this.supersededRendering();
9640
9891
  for (const [key, entry] of Object.entries(lock.assets)) {
9641
- const recorded = [...entry.rendered ?? [], ...entry.composed ?? []];
9642
- if (recorded.length === 0 || entry.library?.installed) continue;
9643
9892
  const { kind, name } = parseCanonicalLockKey(key);
9644
9893
  if (!kind || !name || this.installTarget(kind) !== "agent") continue;
9894
+ const recorded = [
9895
+ ...(entry.rendered ?? []).filter((f) => !superseded(name, f.path)),
9896
+ ...entry.composed ?? []
9897
+ ];
9898
+ if (recorded.length === 0 || entry.library?.installed) continue;
9645
9899
  if (patches[`${kind}:${name}`]) continue;
9646
9900
  const modified = [];
9647
9901
  for (const f of recorded) {
@@ -9692,13 +9946,16 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
9692
9946
  */
9693
9947
  async undeployedLockGaps(lock, named) {
9694
9948
  const gaps = [];
9949
+ const superseded = this.supersededRendering();
9695
9950
  for (const [key, entry] of Object.entries(lock?.assets ?? {})) {
9696
9951
  if (entry.library?.installed) continue;
9697
9952
  const { publisher, kind, name } = parseCanonicalLockKey(key);
9698
9953
  const component = kind ? this.installTarget(kind) : void 0;
9699
9954
  if (!kind || !name || !component || named.has(`${kind}:${name}`)) continue;
9700
9955
  if (isAssetDeployed(component, name, this.harness, this.global, this.projectDir)) {
9701
- const renderedGone = component === "agent" && !this.global && (entry.rendered ?? []).some((f) => !existsSync(join(this.projectDir, f.path)));
9956
+ const renderedGone = component === "agent" && !this.global && (entry.rendered ?? []).some(
9957
+ (f) => !superseded(name, f.path) && !existsSync(join(this.projectDir, f.path))
9958
+ );
9702
9959
  if (!renderedGone) continue;
9703
9960
  }
9704
9961
  const ref = publisher ? `${kind}:@${publisher}/${name}` : `${kind}:${name}`;
@@ -10362,6 +10619,6 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
10362
10619
  }
10363
10620
  };
10364
10621
 
10365
- export { AssetManager, LibraryEntryError, MissingManifestError, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName };
10366
- //# sourceMappingURL=chunk-23Q5LT4U.js.map
10367
- //# sourceMappingURL=chunk-23Q5LT4U.js.map
10622
+ export { AssetManager, LibraryEntryError, MissingManifestError, harnessSwitchKeptKey, harnessSwitchStateFile, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, readHarnessSwitchState, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName, writeHarnessSwitchState };
10623
+ //# sourceMappingURL=chunk-4I4SBOCS.js.map
10624
+ //# sourceMappingURL=chunk-4I4SBOCS.js.map