@skaile/workspaces 5.18.1 → 6.0.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 (746) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/README.md +8 -8
  3. package/dist/app-sdk/index.js +1 -1
  4. package/dist/{asset-feeds-MKB5JUML.js → asset-feeds-PXUWCXVI.js} +21 -21
  5. package/dist/{asset-feeds-MKB5JUML.js.map → asset-feeds-PXUWCXVI.js.map} +1 -1
  6. package/dist/asset-manager/catalog-deployer.js +10 -10
  7. package/dist/asset-manager/index.js +17 -17
  8. package/dist/asset-manager/installer.js +13 -13
  9. package/dist/asset-manager/renderers.js +12 -12
  10. package/dist/asset-manager/src/index.d.ts +113 -24
  11. package/dist/asset-manager/src/index.d.ts.map +1 -1
  12. package/dist/asset-manager/src/install-agent.d.ts +2 -2
  13. package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
  14. package/dist/asset-manager/src/install-instances.d.ts +8 -8
  15. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  16. package/dist/asset-manager/src/installer.d.ts +3 -3
  17. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  18. package/dist/asset-manager/src/mcp-config.d.ts +39 -13
  19. package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
  20. package/dist/asset-manager/src/renderers.d.ts +12 -12
  21. package/dist/asset-manager/src/renderers.d.ts.map +1 -1
  22. package/dist/bridge/codex-app-server.js +2 -2
  23. package/dist/bridge/harnesses/claude-sdk.d.ts +2 -0
  24. package/dist/bridge/{drivers → harnesses}/claude-sdk.js +75 -73
  25. package/dist/bridge/harnesses/claude-sdk.js.map +1 -0
  26. package/dist/bridge/{drivers/gemini.d.ts → harnesses/codex.d.ts} +1 -1
  27. package/dist/bridge/{drivers → harnesses}/codex.js +52 -52
  28. package/dist/bridge/harnesses/codex.js.map +1 -0
  29. package/dist/bridge/{drivers/claude-sdk.d.ts → harnesses/continue.d.ts} +1 -1
  30. package/dist/bridge/{drivers → harnesses}/continue.js +29 -29
  31. package/dist/bridge/harnesses/continue.js.map +1 -0
  32. package/dist/bridge/{drivers → harnesses}/echo.d.ts +1 -1
  33. package/dist/bridge/{drivers → harnesses}/echo.js +27 -27
  34. package/dist/bridge/harnesses/echo.js.map +1 -0
  35. package/dist/bridge/{drivers/continue.d.ts → harnesses/gemini.d.ts} +1 -1
  36. package/dist/bridge/harnesses/gemini.js +18 -0
  37. package/dist/bridge/{drivers → harnesses}/goose.d.ts +1 -1
  38. package/dist/bridge/{drivers → harnesses}/goose.js +29 -29
  39. package/dist/bridge/harnesses/goose.js.map +1 -0
  40. package/dist/bridge/{drivers → harnesses}/omp.d.ts +1 -1
  41. package/dist/bridge/{drivers → harnesses}/omp.js +43 -485
  42. package/dist/bridge/harnesses/omp.js.map +1 -0
  43. package/dist/bridge/{drivers → harnesses}/opencode.d.ts +1 -1
  44. package/dist/bridge/{drivers → harnesses}/opencode.js +30 -30
  45. package/dist/bridge/harnesses/opencode.js.map +1 -0
  46. package/dist/bridge/{drivers → harnesses}/qwen.d.ts +1 -1
  47. package/dist/bridge/{drivers → harnesses}/qwen.js +20 -20
  48. package/dist/bridge/harnesses/qwen.js.map +1 -0
  49. package/dist/bridge/index.js +24 -22
  50. package/dist/bridge/src/agent-exec.d.ts +2 -2
  51. package/dist/bridge/src/agent-transcript.d.ts +1 -1
  52. package/dist/bridge/src/agent-transcript.d.ts.map +1 -1
  53. package/dist/bridge/src/approval-card.d.ts +3 -3
  54. package/dist/bridge/src/capability-dispatch.d.ts +5 -5
  55. package/dist/bridge/src/cloud.d.ts +4 -4
  56. package/dist/bridge/src/codex/config-toml.d.ts +3 -3
  57. package/dist/bridge/src/codex/friendly-error.d.ts +1 -1
  58. package/dist/bridge/src/codex/friendly-error.d.ts.map +1 -1
  59. package/dist/bridge/src/codex/{managed-driver.d.ts → managed-harness.d.ts} +5 -5
  60. package/dist/bridge/src/codex/managed-harness.d.ts.map +1 -0
  61. package/dist/bridge/src/codex/native-approvals.d.ts +1 -1
  62. package/dist/bridge/src/codex/native-approvals.d.ts.map +1 -1
  63. package/dist/bridge/src/error-classifier.d.ts +7 -7
  64. package/dist/bridge/src/{driver-capabilities.d.ts → harness-capabilities.d.ts} +18 -18
  65. package/dist/bridge/src/harness-capabilities.d.ts.map +1 -0
  66. package/dist/bridge/src/harness-model-check.d.ts +25 -0
  67. package/dist/bridge/src/harness-model-check.d.ts.map +1 -0
  68. package/dist/bridge/src/{drivers → harnesses}/_subprocess-cli.d.ts +8 -8
  69. package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -0
  70. package/dist/bridge/src/{drivers → harnesses}/claude-context-usage.d.ts +5 -5
  71. package/dist/bridge/src/harnesses/claude-context-usage.d.ts.map +1 -0
  72. package/dist/bridge/src/{drivers → harnesses}/claude-sdk.d.ts +27 -27
  73. package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -0
  74. package/dist/bridge/src/{drivers → harnesses}/claude-self-turns.d.ts +5 -5
  75. package/dist/bridge/src/harnesses/claude-self-turns.d.ts.map +1 -0
  76. package/dist/bridge/src/{drivers → harnesses}/claude-tool-allowlist.d.ts +4 -4
  77. package/dist/bridge/src/harnesses/claude-tool-allowlist.d.ts.map +1 -0
  78. package/dist/bridge/src/{drivers → harnesses}/codex.d.ts +14 -14
  79. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -0
  80. package/dist/bridge/src/{drivers → harnesses}/continue.d.ts +12 -12
  81. package/dist/bridge/src/harnesses/continue.d.ts.map +1 -0
  82. package/dist/bridge/src/{drivers → harnesses}/echo.d.ts +16 -16
  83. package/dist/bridge/src/harnesses/echo.d.ts.map +1 -0
  84. package/dist/bridge/src/{drivers → harnesses}/flow-script.d.ts +9 -9
  85. package/dist/bridge/src/harnesses/flow-script.d.ts.map +1 -0
  86. package/dist/bridge/src/{drivers → harnesses}/gemini.d.ts +15 -15
  87. package/dist/bridge/src/harnesses/gemini.d.ts.map +1 -0
  88. package/dist/bridge/src/{drivers → harnesses}/goose.d.ts +10 -10
  89. package/dist/bridge/src/harnesses/goose.d.ts.map +1 -0
  90. package/dist/bridge/src/{drivers → harnesses}/omp-models-yml.d.ts +23 -12
  91. package/dist/bridge/src/harnesses/omp-models-yml.d.ts.map +1 -0
  92. package/dist/bridge/src/{drivers → harnesses}/omp.d.ts +23 -23
  93. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -0
  94. package/dist/bridge/src/{drivers → harnesses}/opencode.d.ts +11 -11
  95. package/dist/bridge/src/harnesses/opencode.d.ts.map +1 -0
  96. package/dist/bridge/src/{drivers → harnesses}/qwen.d.ts +12 -12
  97. package/dist/bridge/src/harnesses/qwen.d.ts.map +1 -0
  98. package/dist/bridge/src/{drivers → harnesses}/recovery-policy.d.ts +4 -4
  99. package/dist/bridge/src/harnesses/recovery-policy.d.ts.map +1 -0
  100. package/dist/bridge/src/{drivers → harnesses}/resume-probe.d.ts +3 -3
  101. package/dist/bridge/src/harnesses/resume-probe.d.ts.map +1 -0
  102. package/dist/bridge/src/{drivers → harnesses}/sanitize-assistant-text.d.ts +1 -1
  103. package/dist/bridge/src/harnesses/sanitize-assistant-text.d.ts.map +1 -0
  104. package/dist/bridge/src/{drivers → harnesses}/scrub-transcript.d.ts +1 -1
  105. package/dist/bridge/src/harnesses/scrub-transcript.d.ts.map +1 -0
  106. package/dist/bridge/src/index.d.ts +4 -4
  107. package/dist/bridge/src/index.d.ts.map +1 -1
  108. package/dist/bridge/src/logger.d.ts +4 -4
  109. package/dist/bridge/src/models.d.ts +1 -1
  110. package/dist/bridge/src/normalizer.d.ts +2 -2
  111. package/dist/bridge/src/provider-materialize/continue-config-yaml.d.ts +5 -5
  112. package/dist/bridge/src/provider-materialize/continue-config-yaml.d.ts.map +1 -1
  113. package/dist/bridge/src/provider-materialize/credential-env.d.ts +3 -3
  114. package/dist/bridge/src/provider-materialize/{env-drivers.d.ts → env-harnesses.d.ts} +19 -19
  115. package/dist/bridge/src/provider-materialize/env-harnesses.d.ts.map +1 -0
  116. package/dist/bridge/src/provider-materialize/goose-custom-providers.d.ts +5 -5
  117. package/dist/bridge/src/provider-materialize/goose-custom-providers.d.ts.map +1 -1
  118. package/dist/bridge/src/provider-materialize/opencode-config.d.ts +7 -7
  119. package/dist/bridge/src/provider-materialize/opencode-config.d.ts.map +1 -1
  120. package/dist/bridge/src/provider-materialize/session-config-home.d.ts +5 -5
  121. package/dist/bridge/src/provider-materialize/session-config-home.d.ts.map +1 -1
  122. package/dist/bridge/src/provider-registry-derive.d.ts +4 -4
  123. package/dist/bridge/src/provider-registry-derive.d.ts.map +1 -1
  124. package/dist/bridge/src/reconfigure-ledger.d.ts +8 -8
  125. package/dist/bridge/src/reconfigure-ledger.d.ts.map +1 -1
  126. package/dist/bridge/src/registry.d.ts +34 -41
  127. package/dist/bridge/src/registry.d.ts.map +1 -1
  128. package/dist/bridge/src/runner-private-env.d.ts +2 -2
  129. package/dist/bridge/src/runtime.d.ts +11 -11
  130. package/dist/bridge/src/runtime.d.ts.map +1 -1
  131. package/dist/bridge/src/types.d.ts +158 -158
  132. package/dist/bridge/src/types.d.ts.map +1 -1
  133. package/dist/{chunk-CKBCX3HQ.js → chunk-2UUKCROR.js} +4 -4
  134. package/dist/{chunk-CKBCX3HQ.js.map → chunk-2UUKCROR.js.map} +1 -1
  135. package/dist/{chunk-7ANRSTNR.js → chunk-3IXIEHUB.js} +36 -17
  136. package/dist/chunk-3IXIEHUB.js.map +1 -0
  137. package/dist/{chunk-YZ3N7IUU.js → chunk-3JKGY2YC.js} +91 -55
  138. package/dist/chunk-3JKGY2YC.js.map +1 -0
  139. package/dist/{chunk-X5YPJV4N.js → chunk-3MWQKQUB.js} +2 -2
  140. package/dist/{chunk-X5YPJV4N.js.map → chunk-3MWQKQUB.js.map} +1 -1
  141. package/dist/{chunk-EPBKISS5.js → chunk-3TG2NV2F.js} +2 -2
  142. package/dist/chunk-3TG2NV2F.js.map +1 -0
  143. package/dist/{chunk-L2AMXONH.js → chunk-3X7VTCPG.js} +2 -2
  144. package/dist/chunk-3X7VTCPG.js.map +1 -0
  145. package/dist/{chunk-3KMREAR2.js → chunk-4DWBSTYA.js} +24 -24
  146. package/dist/chunk-4DWBSTYA.js.map +1 -0
  147. package/dist/{chunk-YARXR3CN.js → chunk-4XWLB7JB.js} +52 -46
  148. package/dist/chunk-4XWLB7JB.js.map +1 -0
  149. package/dist/{chunk-5TBFN46Z.js → chunk-5KRMNUL4.js} +4 -4
  150. package/dist/chunk-5KRMNUL4.js.map +1 -0
  151. package/dist/{chunk-YIF2IJUA.js → chunk-6GWSDPBP.js} +3 -3
  152. package/dist/{chunk-YIF2IJUA.js.map → chunk-6GWSDPBP.js.map} +1 -1
  153. package/dist/{chunk-BBWSGVVE.js → chunk-7CV3HFWJ.js} +5 -5
  154. package/dist/chunk-7CV3HFWJ.js.map +1 -0
  155. package/dist/{chunk-YROR332M.js → chunk-7DN6JKP2.js} +2 -2
  156. package/dist/chunk-7DN6JKP2.js.map +1 -0
  157. package/dist/{chunk-IZCR27MU.js → chunk-7EKQDY2T.js} +3 -3
  158. package/dist/chunk-7EKQDY2T.js.map +1 -0
  159. package/dist/{chunk-VOBXINUZ.js → chunk-7TPYPVAH.js} +4 -4
  160. package/dist/{chunk-VOBXINUZ.js.map → chunk-7TPYPVAH.js.map} +1 -1
  161. package/dist/{chunk-U2FI547Z.js → chunk-7XSAW5OC.js} +3 -3
  162. package/dist/{chunk-U2FI547Z.js.map → chunk-7XSAW5OC.js.map} +1 -1
  163. package/dist/{chunk-ICSCSM5D.js → chunk-ADPM6AYF.js} +3 -3
  164. package/dist/{chunk-ICSCSM5D.js.map → chunk-ADPM6AYF.js.map} +1 -1
  165. package/dist/{chunk-LW7ZI6EQ.js → chunk-AF432MS3.js} +3 -3
  166. package/dist/chunk-AF432MS3.js.map +1 -0
  167. package/dist/{chunk-WJLYL6RY.js → chunk-ARWKK325.js} +5 -5
  168. package/dist/{chunk-WJLYL6RY.js.map → chunk-ARWKK325.js.map} +1 -1
  169. package/dist/{chunk-AJ7EGIFR.js → chunk-BIRW3HOG.js} +3 -3
  170. package/dist/chunk-BIRW3HOG.js.map +1 -0
  171. package/dist/{chunk-X3AUS4RW.js → chunk-DHYSUJ3H.js} +4 -4
  172. package/dist/{chunk-X3AUS4RW.js.map → chunk-DHYSUJ3H.js.map} +1 -1
  173. package/dist/{chunk-SRNCN4X2.js → chunk-DUMTLYSO.js} +10 -10
  174. package/dist/chunk-DUMTLYSO.js.map +1 -0
  175. package/dist/{chunk-GOK4QRJR.js → chunk-E3GPGTW3.js} +8 -8
  176. package/dist/chunk-E3GPGTW3.js.map +1 -0
  177. package/dist/{chunk-CKNIYIV2.js → chunk-E572OHGY.js} +5 -5
  178. package/dist/chunk-E572OHGY.js.map +1 -0
  179. package/dist/{chunk-KY4UXX7M.js → chunk-F2GOZMRA.js} +63 -64
  180. package/dist/chunk-F2GOZMRA.js.map +1 -0
  181. package/dist/{chunk-6E6PKKAD.js → chunk-G5SUWZEU.js} +18 -8
  182. package/dist/chunk-G5SUWZEU.js.map +1 -0
  183. package/dist/{chunk-7FHZB2QU.js → chunk-GEQSUC6U.js} +12 -12
  184. package/dist/chunk-GEQSUC6U.js.map +1 -0
  185. package/dist/{chunk-AIBAOXDU.js → chunk-GN4VVSAA.js} +18 -18
  186. package/dist/chunk-GN4VVSAA.js.map +1 -0
  187. package/dist/{chunk-XTO436PV.js → chunk-HK7HMEPT.js} +13 -13
  188. package/dist/chunk-HK7HMEPT.js.map +1 -0
  189. package/dist/{chunk-Y56YIT6J.js → chunk-JCPD4QRM.js} +4 -4
  190. package/dist/chunk-JCPD4QRM.js.map +1 -0
  191. package/dist/{chunk-GBYNC5V3.js → chunk-JDR6ILCW.js} +4 -4
  192. package/dist/chunk-JDR6ILCW.js.map +1 -0
  193. package/dist/{chunk-K4O6L3WH.js → chunk-KNY356I3.js} +3 -3
  194. package/dist/{chunk-K4O6L3WH.js.map → chunk-KNY356I3.js.map} +1 -1
  195. package/dist/{chunk-4ZTPYIBE.js → chunk-KW37WNXY.js} +12 -12
  196. package/dist/chunk-KW37WNXY.js.map +1 -0
  197. package/dist/{chunk-BO426QWN.js → chunk-KX2PT5Q4.js} +8 -8
  198. package/dist/chunk-KX2PT5Q4.js.map +1 -0
  199. package/dist/{chunk-T2TQAH2X.js → chunk-L4YKW5AY.js} +105 -38
  200. package/dist/chunk-L4YKW5AY.js.map +1 -0
  201. package/dist/{chunk-WJCQFNF6.js → chunk-LN6QB7XI.js} +3 -3
  202. package/dist/{chunk-WJCQFNF6.js.map → chunk-LN6QB7XI.js.map} +1 -1
  203. package/dist/{chunk-MJHSLODD.js → chunk-LSI2IVFT.js} +2 -2
  204. package/dist/chunk-LSI2IVFT.js.map +1 -0
  205. package/dist/{chunk-2ABUJYVI.js → chunk-MCUJTNY5.js} +3 -3
  206. package/dist/{chunk-2ABUJYVI.js.map → chunk-MCUJTNY5.js.map} +1 -1
  207. package/dist/{chunk-A2ULN3KX.js → chunk-MWXYN6NY.js} +2 -2
  208. package/dist/{chunk-A2ULN3KX.js.map → chunk-MWXYN6NY.js.map} +1 -1
  209. package/dist/{chunk-EAZECHPM.js → chunk-NBAGV6L2.js} +5 -5
  210. package/dist/chunk-NBAGV6L2.js.map +1 -0
  211. package/dist/{chunk-U7V5SIFW.js → chunk-NMI2TWMH.js} +46 -18
  212. package/dist/chunk-NMI2TWMH.js.map +1 -0
  213. package/dist/{chunk-VM3PH7BB.js → chunk-OAHVKSQJ.js} +604 -178
  214. package/dist/chunk-OAHVKSQJ.js.map +1 -0
  215. package/dist/{chunk-2NOLF7B2.js → chunk-OHNKYHRR.js} +53 -17
  216. package/dist/chunk-OHNKYHRR.js.map +1 -0
  217. package/dist/{chunk-KC6HGWXN.js → chunk-OTIB4D2K.js} +3 -3
  218. package/dist/{chunk-KC6HGWXN.js.map → chunk-OTIB4D2K.js.map} +1 -1
  219. package/dist/{chunk-WMF2C5U7.js → chunk-OULSJRXV.js} +17 -17
  220. package/dist/chunk-OULSJRXV.js.map +1 -0
  221. package/dist/{chunk-HPVMTX6M.js → chunk-QOM5Z62G.js} +47 -12
  222. package/dist/chunk-QOM5Z62G.js.map +1 -0
  223. package/dist/{chunk-ZBMC6IAE.js → chunk-SNEE6UGY.js} +33 -32
  224. package/dist/chunk-SNEE6UGY.js.map +1 -0
  225. package/dist/{chunk-RD6N2D7I.js → chunk-SRODW6M2.js} +4 -4
  226. package/dist/{chunk-RD6N2D7I.js.map → chunk-SRODW6M2.js.map} +1 -1
  227. package/dist/{chunk-D6UBEYQH.js → chunk-SZXGRHQQ.js} +6 -6
  228. package/dist/chunk-SZXGRHQQ.js.map +1 -0
  229. package/dist/{chunk-X6GUNN7X.js → chunk-T2BDID2J.js} +39 -39
  230. package/dist/chunk-T2BDID2J.js.map +1 -0
  231. package/dist/{chunk-RP3FZ2T6.js → chunk-TKHJXPSB.js} +110 -37
  232. package/dist/chunk-TKHJXPSB.js.map +1 -0
  233. package/dist/{chunk-CD7SVH6W.js → chunk-U56GGCC2.js} +4 -4
  234. package/dist/{chunk-CD7SVH6W.js.map → chunk-U56GGCC2.js.map} +1 -1
  235. package/dist/{chunk-VKPBUPH7.js → chunk-UL22SDGR.js} +36 -11
  236. package/dist/chunk-UL22SDGR.js.map +1 -0
  237. package/dist/{chunk-CKICWXMU.js → chunk-UQ33Y4DM.js} +139 -10
  238. package/dist/chunk-UQ33Y4DM.js.map +1 -0
  239. package/dist/{chunk-34C2EKWJ.js → chunk-UVVVR4XO.js} +38 -38
  240. package/dist/chunk-UVVVR4XO.js.map +1 -0
  241. package/dist/{chunk-KSBDLCZI.js → chunk-VBI7HGHB.js} +11 -11
  242. package/dist/{chunk-KSBDLCZI.js.map → chunk-VBI7HGHB.js.map} +1 -1
  243. package/dist/{chunk-PBSN4RTV.js → chunk-VJRTDKXS.js} +590 -450
  244. package/dist/chunk-VJRTDKXS.js.map +1 -0
  245. package/dist/{chunk-IG5LZ3WU.js → chunk-VTETQCR6.js} +10 -10
  246. package/dist/chunk-VTETQCR6.js.map +1 -0
  247. package/dist/{chunk-EFLKSMCO.js → chunk-VUJXZDCY.js} +5 -5
  248. package/dist/{chunk-EFLKSMCO.js.map → chunk-VUJXZDCY.js.map} +1 -1
  249. package/dist/{chunk-V3D4HQMS.js → chunk-VXEYX73S.js} +4 -4
  250. package/dist/{chunk-V3D4HQMS.js.map → chunk-VXEYX73S.js.map} +1 -1
  251. package/dist/{chunk-M3WPBTGJ.js → chunk-WD3L5QSU.js} +2 -2
  252. package/dist/{chunk-M3WPBTGJ.js.map → chunk-WD3L5QSU.js.map} +1 -1
  253. package/dist/chunk-WDAIWDLK.js +505 -0
  254. package/dist/chunk-WDAIWDLK.js.map +1 -0
  255. package/dist/{chunk-IW6F6R2W.js → chunk-WEH33JSG.js} +105 -35
  256. package/dist/chunk-WEH33JSG.js.map +1 -0
  257. package/dist/{chunk-OYIENLJI.js → chunk-WYHQUCHR.js} +15 -15
  258. package/dist/{chunk-OYIENLJI.js.map → chunk-WYHQUCHR.js.map} +1 -1
  259. package/dist/{chunk-R6O6YWU7.js → chunk-WYZXSJBK.js} +3 -3
  260. package/dist/{chunk-R6O6YWU7.js.map → chunk-WYZXSJBK.js.map} +1 -1
  261. package/dist/{chunk-B4X2N7JQ.js → chunk-XFIEVEU7.js} +14 -14
  262. package/dist/chunk-XFIEVEU7.js.map +1 -0
  263. package/dist/{chunk-Q6E6FM7P.js → chunk-XKNXPLKR.js} +6 -6
  264. package/dist/{chunk-Q6E6FM7P.js.map → chunk-XKNXPLKR.js.map} +1 -1
  265. package/dist/chunk-Y2TO2U7W.js +285 -0
  266. package/dist/chunk-Y2TO2U7W.js.map +1 -0
  267. package/dist/{chunk-JYWW32JI.js → chunk-YGRZNFRO.js} +18 -6
  268. package/dist/chunk-YGRZNFRO.js.map +1 -0
  269. package/dist/{chunk-5BEFNLOR.js → chunk-Z7ZEZZB6.js} +8 -8
  270. package/dist/chunk-Z7ZEZZB6.js.map +1 -0
  271. package/dist/{chunk-PHRNUTSG.js → chunk-ZFUZ5AKM.js} +4 -4
  272. package/dist/{chunk-PHRNUTSG.js.map → chunk-ZFUZ5AKM.js.map} +1 -1
  273. package/dist/claude-code-VJGYBXQR.js +10 -0
  274. package/dist/claude-code-VJGYBXQR.js.map +1 -0
  275. package/dist/cli/index.js +930 -685
  276. package/dist/cli/index.js.map +1 -1
  277. package/dist/cli/src/agent-checks.d.ts +5 -0
  278. package/dist/cli/src/agent-checks.d.ts.map +1 -1
  279. package/dist/cli/src/agent-pins.d.ts +18 -0
  280. package/dist/cli/src/agent-pins.d.ts.map +1 -0
  281. package/dist/cli/src/commands/catalog.d.ts +9 -3
  282. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  283. package/dist/cli/src/commands/complete-resolvers.d.ts.map +1 -1
  284. package/dist/cli/src/commands/config.d.ts +2 -2
  285. package/dist/cli/src/commands/config.d.ts.map +1 -1
  286. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  287. package/dist/cli/src/commands/flow.d.ts +8 -8
  288. package/dist/cli/src/commands/flow.d.ts.map +1 -1
  289. package/dist/cli/src/commands/integration.d.ts +1 -1
  290. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  291. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  292. package/dist/cli/src/commands/library-index.d.ts +17 -5
  293. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  294. package/dist/cli/src/commands/library-publish.d.ts +3 -0
  295. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  296. package/dist/cli/src/commands/migrate-assets.d.ts +2 -0
  297. package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
  298. package/dist/cli/src/commands/migrate-files.d.ts +14 -0
  299. package/dist/cli/src/commands/migrate-files.d.ts.map +1 -1
  300. package/dist/cli/src/commands/migrate-harness.d.ts +49 -0
  301. package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -0
  302. package/dist/cli/src/commands/migrate.d.ts +4 -2
  303. package/dist/cli/src/commands/migrate.d.ts.map +1 -1
  304. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  305. package/dist/cli/src/commands/plugin/claude-code.d.ts +6 -0
  306. package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
  307. package/dist/cli/src/commands/plugin/codex.d.ts +19 -4
  308. package/dist/cli/src/commands/plugin/codex.d.ts.map +1 -1
  309. package/dist/cli/src/commands/plugin/types.d.ts +1 -6
  310. package/dist/cli/src/commands/plugin/types.d.ts.map +1 -1
  311. package/dist/cli/src/commands/plugin-registry-cmd.d.ts +1 -1
  312. package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
  313. package/dist/cli/src/commands/preset-export.d.ts +1 -1
  314. package/dist/cli/src/commands/project.d.ts +7 -4
  315. package/dist/cli/src/commands/project.d.ts.map +1 -1
  316. package/dist/cli/src/commands/providers.d.ts +13 -0
  317. package/dist/cli/src/commands/providers.d.ts.map +1 -1
  318. package/dist/cli/src/commands/run.d.ts +2 -2
  319. package/dist/cli/src/commands/run.d.ts.map +1 -1
  320. package/dist/cli/src/commands/serve-preflight.d.ts +30 -7
  321. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  322. package/dist/cli/src/commands/serve.d.ts +1 -1
  323. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  324. package/dist/cli/src/commands/update.d.ts.map +1 -1
  325. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  326. package/dist/cli/src/flow-discovery.d.ts +69 -53
  327. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  328. package/dist/cli/src/harness-error.d.ts +47 -0
  329. package/dist/cli/src/harness-error.d.ts.map +1 -0
  330. package/dist/cli/src/helpers.d.ts +5 -5
  331. package/dist/cli/src/helpers.d.ts.map +1 -1
  332. package/dist/cli/src/plugin-store/index.d.ts +8 -4
  333. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  334. package/dist/cli/src/setup.d.ts +3 -3
  335. package/dist/cli/src/setup.d.ts.map +1 -1
  336. package/dist/cli/src/skill-checks.d.ts +32 -1
  337. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  338. package/dist/connectors/config.js +4 -4
  339. package/dist/connectors/index.js +29 -27
  340. package/dist/connectors/src/connector-prompt.d.ts +5 -5
  341. package/dist/connectors/src/connector-registry.d.ts +1 -1
  342. package/dist/connectors-CXZLXAFZ.js +48 -0
  343. package/dist/{connectors-YNQ3WJGM.js.map → connectors-CXZLXAFZ.js.map} +1 -1
  344. package/dist/connectors-shared/index.js +2 -2
  345. package/dist/core/discovery.js +1 -1
  346. package/dist/core/framework.js +1 -1
  347. package/dist/{bridge/drivers/codex.d.ts → core/harness-targets.d.ts} +1 -1
  348. package/dist/core/harness-targets.js +4 -0
  349. package/dist/core/harness-targets.js.map +1 -0
  350. package/dist/core/index.js +10 -10
  351. package/dist/core/provider-registry-credentials.js +2 -2
  352. package/dist/core/provider-registry.js +1 -1
  353. package/dist/core/publish-manifest.js +1 -1
  354. package/dist/core/runtime-assets.js +4 -4
  355. package/dist/core/src/asset-roots.d.ts +16 -2
  356. package/dist/core/src/asset-roots.d.ts.map +1 -1
  357. package/dist/core/src/bind.d.ts +33 -14
  358. package/dist/core/src/bind.d.ts.map +1 -1
  359. package/dist/core/src/discovery.d.ts +1 -1
  360. package/dist/core/src/framework.d.ts +21 -21
  361. package/dist/core/src/framework.d.ts.map +1 -1
  362. package/dist/core/src/{driver-sdk.d.ts → harness-sdk.d.ts} +9 -9
  363. package/dist/core/src/harness-sdk.d.ts.map +1 -0
  364. package/dist/core/src/harness-targets.d.ts +71 -0
  365. package/dist/core/src/harness-targets.d.ts.map +1 -0
  366. package/dist/core/src/index.d.ts +11 -11
  367. package/dist/core/src/index.d.ts.map +1 -1
  368. package/dist/core/src/lock.d.ts +8 -0
  369. package/dist/core/src/lock.d.ts.map +1 -1
  370. package/dist/core/src/provider-registry.d.ts +2 -2
  371. package/dist/core/src/publish-manifest.d.ts +45 -10
  372. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  373. package/dist/core/src/settings.d.ts +17 -16
  374. package/dist/core/src/settings.d.ts.map +1 -1
  375. package/dist/core/src/store.d.ts +12 -12
  376. package/dist/core/src/store.d.ts.map +1 -1
  377. package/dist/core/src/workspace-config.d.ts +49 -22
  378. package/dist/core/src/workspace-config.d.ts.map +1 -1
  379. package/dist/core/src/workspace-yaml-editor.d.ts +1 -1
  380. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  381. package/dist/core/store.js +2 -2
  382. package/dist/core/workspace-config.js +3 -3
  383. package/dist/deploy/index.js +11 -11
  384. package/dist/discovery/index.js +3 -3
  385. package/dist/discovery/src/discover-manifest.d.ts +1 -1
  386. package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
  387. package/dist/discovery/src/discover.d.ts.map +1 -1
  388. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  389. package/dist/{ensure-sources-UJWEZSR3.js → ensure-sources-UPTHZKGF.js} +20 -20
  390. package/dist/{ensure-sources-UJWEZSR3.js.map → ensure-sources-UPTHZKGF.js.map} +1 -1
  391. package/dist/factory-assets/connectors/box.js +29 -27
  392. package/dist/factory-assets/connectors/deploy.js +29 -27
  393. package/dist/factory-assets/connectors/devserver.js +29 -27
  394. package/dist/factory-assets/connectors/flow/CONNECTOR.md +5 -5
  395. package/dist/factory-assets/connectors/flow/adapter.d.ts +3 -3
  396. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  397. package/dist/factory-assets/connectors/flow/adapter.js +29 -27
  398. package/dist/factory-assets/connectors/flow/engine/loader.d.ts +1 -1
  399. package/dist/factory-assets/connectors/flow/engine/locate.d.ts +8 -5
  400. package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -1
  401. package/dist/factory-assets/connectors/flow/engine/types.d.ts +1 -1
  402. package/dist/factory-assets/connectors/flow/engine.js +11 -11
  403. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts +2 -2
  404. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
  405. package/dist/factory-assets/connectors/flow/orchestrator-turn.d.ts +4 -4
  406. package/dist/factory-assets/connectors/flow/orchestrator-turn.d.ts.map +1 -1
  407. package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts +1 -1
  408. package/dist/factory-assets/connectors/flow/prompt-fragments.js +1 -1
  409. package/dist/factory-assets/connectors/flow/run-flow.d.ts +12 -12
  410. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  411. package/dist/factory-assets/connectors/flow/run-flow.js +30 -28
  412. package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts +1 -1
  413. package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts.map +1 -1
  414. package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts +22 -22
  415. package/dist/factory-assets/connectors/flow/subprompt-runner.d.ts.map +1 -1
  416. package/dist/factory-assets/connectors/flow.js +29 -27
  417. package/dist/factory-assets/connectors/git.js +29 -27
  418. package/dist/factory-assets/connectors/gmail.js +29 -27
  419. package/dist/factory-assets/connectors/googledrive.js +29 -27
  420. package/dist/factory-assets/connectors/local.js +29 -27
  421. package/dist/factory-assets/connectors/mattermost.js +29 -27
  422. package/dist/factory-assets/connectors/memory.js +29 -27
  423. package/dist/factory-assets/connectors/minio.js +29 -27
  424. package/dist/factory-assets/connectors/postgres.js +29 -27
  425. package/dist/factory-assets/connectors/s3.js +29 -27
  426. package/dist/factory-assets/connectors/sharepoint.js +29 -27
  427. package/dist/factory-assets/connectors/sqlite.js +29 -27
  428. package/dist/factory-assets/connectors/static-server.js +29 -27
  429. package/dist/factory-assets/connectors/tunnel.js +29 -27
  430. package/dist/factory-assets/connectors/webdav.js +29 -27
  431. package/dist/factory-assets/connectors/xstate/adapter.d.ts +1 -1
  432. package/dist/factory-assets/connectors/xstate/adapter.d.ts.map +1 -1
  433. package/dist/factory-assets/connectors/xstate-store.js +29 -27
  434. package/dist/factory-assets/connectors/xstate.js +29 -27
  435. package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
  436. package/dist/flows-TJQIMGUX.js +26 -0
  437. package/dist/{flows-BHY73K3O.js.map → flows-TJQIMGUX.js.map} +1 -1
  438. package/dist/{helpers-3CG7ZVX4.js → helpers-DE53KG3E.js} +20 -20
  439. package/dist/{helpers-3CG7ZVX4.js.map → helpers-DE53KG3E.js.map} +1 -1
  440. package/dist/library/index.js +14 -14
  441. package/dist/library/install.js +2 -2
  442. package/dist/library/src/index.d.ts +1 -1
  443. package/dist/library/src/index.d.ts.map +1 -1
  444. package/dist/library/src/manifest-writer.d.ts +13 -0
  445. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  446. package/dist/{library-publish-NWWVYJUK.js → library-publish-KKQ2ULLX.js} +140 -63
  447. package/dist/library-publish-KKQ2ULLX.js.map +1 -0
  448. package/dist/model-endpoint/index.js +14 -14
  449. package/dist/model-endpoint/src/resolve.d.ts +1 -1
  450. package/dist/open-library-RJGJIW5H.js +42 -0
  451. package/dist/{open-library-7ZG2FFAX.js.map → open-library-RJGJIW5H.js.map} +1 -1
  452. package/dist/open-registry-3QS3J7KO.js +32 -0
  453. package/dist/{open-registry-RBELV5YH.js.map → open-registry-3QS3J7KO.js.map} +1 -1
  454. package/dist/paths-QAV4C3KX.js +22 -0
  455. package/dist/{paths-BFM6K2QO.js.map → paths-QAV4C3KX.js.map} +1 -1
  456. package/dist/plugin-registry/index.js +1 -1
  457. package/dist/plugin-registry/src/context.d.ts +3 -3
  458. package/dist/plugin-registry/src/context.d.ts.map +1 -1
  459. package/dist/plugin-registry/src/deploy-handle.d.ts +1 -1
  460. package/dist/plugin-registry/src/index.d.ts +2 -2
  461. package/dist/plugin-registry/src/index.d.ts.map +1 -1
  462. package/dist/plugin-registry/src/internal.d.ts.map +1 -1
  463. package/dist/plugin-registry/src/registry.d.ts +3 -3
  464. package/dist/plugin-registry/src/registry.d.ts.map +1 -1
  465. package/dist/plugin-registry/src/targets.d.ts +9 -9
  466. package/dist/plugin-registry/src/targets.d.ts.map +1 -1
  467. package/dist/plugin-store-MSH6GK6T.js +23 -0
  468. package/dist/{plugin-store-QOQDM24E.js.map → plugin-store-MSH6GK6T.js.map} +1 -1
  469. package/dist/plugins/src/asset-kind-provider.d.ts +1 -1
  470. package/dist/project-HZW2MZPA.js +84 -0
  471. package/dist/{project-YQM3I25D.js.map → project-HZW2MZPA.js.map} +1 -1
  472. package/dist/resolver/index.js +10 -10
  473. package/dist/runner/index.js +45 -44
  474. package/dist/runner/src/agent.d.ts +3 -3
  475. package/dist/runner/src/agent.d.ts.map +1 -1
  476. package/dist/runner/src/agents/in-process-host.d.ts +1 -1
  477. package/dist/runner/src/agents/instances.d.ts +1 -1
  478. package/dist/runner/src/agents/instances.d.ts.map +1 -1
  479. package/dist/runner/src/agents/run-controller.d.ts +7 -7
  480. package/dist/runner/src/agents/run-controller.d.ts.map +1 -1
  481. package/dist/runner/src/agents/standalone-surface.d.ts +2 -2
  482. package/dist/runner/src/agents/standalone-surface.d.ts.map +1 -1
  483. package/dist/runner/src/ai-provider-switch.d.ts +7 -7
  484. package/dist/runner/src/assistant-home.d.ts +1 -1
  485. package/dist/runner/src/capability-registry.d.ts +2 -2
  486. package/dist/runner/src/coalesced-restart.d.ts +2 -2
  487. package/dist/runner/src/compaction/context-window.d.ts +8 -8
  488. package/dist/runner/src/compaction/context-window.d.ts.map +1 -1
  489. package/dist/runner/src/compaction/orchestrator.d.ts +24 -24
  490. package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
  491. package/dist/runner/src/compaction-gate.d.ts +30 -30
  492. package/dist/runner/src/compaction-gate.d.ts.map +1 -1
  493. package/dist/runner/src/composition/compile.d.ts +11 -0
  494. package/dist/runner/src/composition/compile.d.ts.map +1 -1
  495. package/dist/runner/src/composition/dry-run.d.ts +2 -2
  496. package/dist/runner/src/composition/dry-run.d.ts.map +1 -1
  497. package/dist/runner/src/composition/index.d.ts +1 -1
  498. package/dist/runner/src/composition/index.d.ts.map +1 -1
  499. package/dist/runner/src/composition/resolve-instance.d.ts +2 -2
  500. package/dist/runner/src/composition/resolve.d.ts +1 -1
  501. package/dist/runner/src/config.d.ts +3 -3
  502. package/dist/runner/src/config.d.ts.map +1 -1
  503. package/dist/runner/src/context-usage/collector.d.ts +15 -15
  504. package/dist/runner/src/context-usage/collector.d.ts.map +1 -1
  505. package/dist/runner/src/context-usage/compose.d.ts +6 -6
  506. package/dist/runner/src/context-usage/compose.d.ts.map +1 -1
  507. package/dist/runner/src/context-usage/estimator.d.ts +1 -1
  508. package/dist/runner/src/context-usage/index.d.ts +1 -1
  509. package/dist/runner/src/context-usage/index.d.ts.map +1 -1
  510. package/dist/runner/src/context-usage/transcript-tracker.d.ts +2 -2
  511. package/dist/runner/src/context-usage/transcript-tracker.d.ts.map +1 -1
  512. package/dist/runner/src/credential-notice.d.ts +3 -3
  513. package/dist/runner/src/credential-notice.d.ts.map +1 -1
  514. package/dist/runner/src/credential-rotated.d.ts +1 -1
  515. package/dist/runner/src/final-text.d.ts +1 -1
  516. package/dist/runner/src/{driver-swap-gate.d.ts → harness-swap-gate.d.ts} +21 -21
  517. package/dist/runner/src/harness-swap-gate.d.ts.map +1 -0
  518. package/dist/runner/src/late-mcp-rebuild.d.ts +6 -6
  519. package/dist/runner/src/late-mcp-rebuild.d.ts.map +1 -1
  520. package/dist/runner/src/lifecycle-handler.d.ts +1 -1
  521. package/dist/runner/src/lifecycle-handler.d.ts.map +1 -1
  522. package/dist/runner/src/manifest.d.ts +1 -1
  523. package/dist/runner/src/mcp-runtime-handlers.d.ts +6 -6
  524. package/dist/runner/src/mcp-runtime-handlers.d.ts.map +1 -1
  525. package/dist/runner/src/model-endpoint-discovery.d.ts +1 -1
  526. package/dist/runner/src/pending-turns.d.ts +3 -3
  527. package/dist/runner/src/platform-blocks.d.ts +5 -5
  528. package/dist/runner/src/platform-blocks.d.ts.map +1 -1
  529. package/dist/runner/src/prompt-turn-queue.d.ts +1 -1
  530. package/dist/runner/src/provider-quota-forwarder.d.ts +1 -1
  531. package/dist/runner/src/provider-quota-forwarder.d.ts.map +1 -1
  532. package/dist/runner/src/reconfigure-handler.d.ts +14 -14
  533. package/dist/runner/src/reconfigure-handler.d.ts.map +1 -1
  534. package/dist/runner/src/resource-handler.d.ts +1 -1
  535. package/dist/runner/src/resources.d.ts +5 -5
  536. package/dist/runner/src/resources.d.ts.map +1 -1
  537. package/dist/runner/src/runner-capabilities.d.ts +7 -7
  538. package/dist/runner/src/runtime-session-emit.d.ts +5 -5
  539. package/dist/runner/src/runtime-session-emit.d.ts.map +1 -1
  540. package/dist/runner/src/s3-presign-client.d.ts +1 -1
  541. package/dist/runner/src/serve-credentials.d.ts +7 -7
  542. package/dist/runner/src/serve-credentials.d.ts.map +1 -1
  543. package/dist/runner/src/serve.d.ts +32 -32
  544. package/dist/runner/src/serve.d.ts.map +1 -1
  545. package/dist/runner/src/session-builder.d.ts +41 -41
  546. package/dist/runner/src/session-builder.d.ts.map +1 -1
  547. package/dist/runner/src/session-capability-wiring.d.ts +9 -9
  548. package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
  549. package/dist/runner/src/session-stimulus.d.ts +1 -1
  550. package/dist/runner/src/session.d.ts +5 -5
  551. package/dist/runner/src/session.d.ts.map +1 -1
  552. package/dist/runner/src/skill-staging.d.ts +16 -16
  553. package/dist/runner/src/skill-staging.d.ts.map +1 -1
  554. package/dist/runner/src/turn-end-contract.d.ts +55 -0
  555. package/dist/runner/src/turn-end-contract.d.ts.map +1 -0
  556. package/dist/runner/src/turn-scheduler.d.ts +27 -22
  557. package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
  558. package/dist/runner/src/turn-status-replay.d.ts +1 -1
  559. package/dist/runner/src/usage-limit-turn-hold.d.ts +1 -1
  560. package/dist/sdk/asset-manager.js +17 -17
  561. package/dist/sdk/bridge.js +24 -22
  562. package/dist/sdk/core.js +10 -10
  563. package/dist/sdk/flow.js +11 -11
  564. package/dist/sdk/index.js +49 -48
  565. package/dist/sdk/index.js.map +1 -1
  566. package/dist/sdk/resolver.js +10 -10
  567. package/dist/sdk/runner.js +45 -44
  568. package/dist/sdk/session.js +2 -2
  569. package/dist/sdk/src/agent-session.d.ts +1 -1
  570. package/dist/sdk/src/local-runtime.d.ts +1 -1
  571. package/dist/sdk/src/local-runtime.d.ts.map +1 -1
  572. package/dist/sdk/src/types.d.ts +1 -1
  573. package/dist/sdk/src/types.d.ts.map +1 -1
  574. package/dist/sdk/store.js +2 -2
  575. package/dist/sdk/transport/ws/server.js +11 -11
  576. package/dist/sdk/transport/ws.js +11 -11
  577. package/dist/sdk/transport.js +11 -11
  578. package/dist/sdk/types.js +1 -1
  579. package/dist/serve-preflight-L4POEHNQ.js +108 -0
  580. package/dist/serve-preflight-L4POEHNQ.js.map +1 -0
  581. package/dist/session/index.js +2 -2
  582. package/dist/session/src/dispatcher.d.ts +2 -2
  583. package/dist/sessions-2Q7SSYPT.js +5 -0
  584. package/dist/{sessions-DICDEONJ.js.map → sessions-2Q7SSYPT.js.map} +1 -1
  585. package/dist/{setup-AAHVAXRA.js → setup-AGYB4PKR.js} +50 -48
  586. package/dist/setup-AGYB4PKR.js.map +1 -0
  587. package/dist/skills-2LMQ2IAD.js +26 -0
  588. package/dist/{skills-RSZVUIYZ.js.map → skills-2LMQ2IAD.js.map} +1 -1
  589. package/dist/source-GBMYD3RO.js +85 -0
  590. package/dist/{source-KWMCMEMB.js.map → source-GBMYD3RO.js.map} +1 -1
  591. package/dist/{source-manifest-publish-EDYKM4YZ.js → source-manifest-publish-FK22TVQT.js} +57 -56
  592. package/dist/source-manifest-publish-FK22TVQT.js.map +1 -0
  593. package/dist/store/index.js +2 -2
  594. package/dist/store/src/store.d.ts +3 -3
  595. package/dist/store/src/store.d.ts.map +1 -1
  596. package/dist/transport/index.js +11 -11
  597. package/dist/transport/src/ws/server.d.ts +1 -1
  598. package/dist/transport/src/ws/server.d.ts.map +1 -1
  599. package/dist/transport/ws/server.js +11 -11
  600. package/dist/transport/ws.js +11 -11
  601. package/dist/tui/index.js +65 -64
  602. package/dist/tui/index.js.map +1 -1
  603. package/dist/tui/src/repl-session.d.ts +5 -5
  604. package/dist/tui/src/repl.d.ts +5 -5
  605. package/dist/tui/src/repl.d.ts.map +1 -1
  606. package/dist/types/index.js +1 -1
  607. package/dist/types/manifests.js +1 -1
  608. package/dist/types/src/agent-lifecycle.d.ts +1 -1
  609. package/dist/types/src/agent-lifecycle.d.ts.map +1 -1
  610. package/dist/types/src/ask-slots.d.ts +1 -1
  611. package/dist/types/src/capabilities.d.ts +1 -1
  612. package/dist/types/src/context-usage.d.ts +22 -22
  613. package/dist/types/src/context-usage.d.ts.map +1 -1
  614. package/dist/types/src/events.d.ts +49 -49
  615. package/dist/types/src/events.d.ts.map +1 -1
  616. package/dist/types/src/index.d.ts +2 -2
  617. package/dist/types/src/index.d.ts.map +1 -1
  618. package/dist/types/src/lifecycle.d.ts +6 -6
  619. package/dist/types/src/lifecycle.d.ts.map +1 -1
  620. package/dist/types/src/logging.d.ts +1 -1
  621. package/dist/types/src/manifests/agent.d.ts +3 -3
  622. package/dist/types/src/manifests/scaffold-body.d.ts +6 -3
  623. package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
  624. package/dist/types/src/protocol.d.ts +4 -4
  625. package/dist/types/src/runtime.d.ts +38 -38
  626. package/dist/types/src/runtime.d.ts.map +1 -1
  627. package/dist/types/src/version.d.ts +22 -11
  628. package/dist/types/src/version.d.ts.map +1 -1
  629. package/dist/validator-DRHMJ457.js +5 -0
  630. package/dist/{validator-FA2PFW6N.js.map → validator-DRHMJ457.js.map} +1 -1
  631. package/dist/workspace-plugin/adapters/mcp.js +36 -34
  632. package/dist/workspace-plugin/adapters/omp.js +26 -26
  633. package/dist/workspace-plugin/adapters/omp.js.map +1 -1
  634. package/dist/workspace-plugin/index.js +3 -3
  635. package/dist/workspace-plugin/src/plugin.d.ts +5 -5
  636. package/dist/workspace-plugin/src/plugin.d.ts.map +1 -1
  637. package/dist/workspace-plugin/src/tools/flows.d.ts +1 -1
  638. package/dist/workspace-plugin/src/tools/validator.d.ts +6 -6
  639. package/dist/workspace-plugin/src/tools/validator.d.ts.map +1 -1
  640. package/dist/workspace-plugin/src/types.d.ts +2 -2
  641. package/dist/workspace-plugin/src/types.d.ts.map +1 -1
  642. package/package.json +59 -59
  643. package/dist/bridge/drivers/claude-sdk.js.map +0 -1
  644. package/dist/bridge/drivers/codex.js.map +0 -1
  645. package/dist/bridge/drivers/continue.js.map +0 -1
  646. package/dist/bridge/drivers/echo.js.map +0 -1
  647. package/dist/bridge/drivers/gemini.js +0 -18
  648. package/dist/bridge/drivers/goose.js.map +0 -1
  649. package/dist/bridge/drivers/omp.js.map +0 -1
  650. package/dist/bridge/drivers/opencode.js.map +0 -1
  651. package/dist/bridge/drivers/qwen.js.map +0 -1
  652. package/dist/bridge/src/codex/managed-driver.d.ts.map +0 -1
  653. package/dist/bridge/src/driver-capabilities.d.ts.map +0 -1
  654. package/dist/bridge/src/driver-model-check.d.ts +0 -21
  655. package/dist/bridge/src/driver-model-check.d.ts.map +0 -1
  656. package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +0 -1
  657. package/dist/bridge/src/drivers/claude-context-usage.d.ts.map +0 -1
  658. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +0 -1
  659. package/dist/bridge/src/drivers/claude-self-turns.d.ts.map +0 -1
  660. package/dist/bridge/src/drivers/claude-tool-allowlist.d.ts.map +0 -1
  661. package/dist/bridge/src/drivers/codex.d.ts.map +0 -1
  662. package/dist/bridge/src/drivers/continue.d.ts.map +0 -1
  663. package/dist/bridge/src/drivers/echo.d.ts.map +0 -1
  664. package/dist/bridge/src/drivers/flow-script.d.ts.map +0 -1
  665. package/dist/bridge/src/drivers/gemini.d.ts.map +0 -1
  666. package/dist/bridge/src/drivers/goose.d.ts.map +0 -1
  667. package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +0 -1
  668. package/dist/bridge/src/drivers/omp.d.ts.map +0 -1
  669. package/dist/bridge/src/drivers/opencode.d.ts.map +0 -1
  670. package/dist/bridge/src/drivers/qwen.d.ts.map +0 -1
  671. package/dist/bridge/src/drivers/recovery-policy.d.ts.map +0 -1
  672. package/dist/bridge/src/drivers/resume-probe.d.ts.map +0 -1
  673. package/dist/bridge/src/drivers/sanitize-assistant-text.d.ts.map +0 -1
  674. package/dist/bridge/src/drivers/scrub-transcript.d.ts.map +0 -1
  675. package/dist/bridge/src/provider-materialize/env-drivers.d.ts.map +0 -1
  676. package/dist/chunk-2NOLF7B2.js.map +0 -1
  677. package/dist/chunk-34C2EKWJ.js.map +0 -1
  678. package/dist/chunk-3KMREAR2.js.map +0 -1
  679. package/dist/chunk-4ZTPYIBE.js.map +0 -1
  680. package/dist/chunk-5BEFNLOR.js.map +0 -1
  681. package/dist/chunk-5TBFN46Z.js.map +0 -1
  682. package/dist/chunk-6E6PKKAD.js.map +0 -1
  683. package/dist/chunk-7ANRSTNR.js.map +0 -1
  684. package/dist/chunk-7FHZB2QU.js.map +0 -1
  685. package/dist/chunk-AIBAOXDU.js.map +0 -1
  686. package/dist/chunk-AJ7EGIFR.js.map +0 -1
  687. package/dist/chunk-B4X2N7JQ.js.map +0 -1
  688. package/dist/chunk-BBWSGVVE.js.map +0 -1
  689. package/dist/chunk-BO426QWN.js.map +0 -1
  690. package/dist/chunk-CKICWXMU.js.map +0 -1
  691. package/dist/chunk-CKNIYIV2.js.map +0 -1
  692. package/dist/chunk-D6UBEYQH.js.map +0 -1
  693. package/dist/chunk-EAZECHPM.js.map +0 -1
  694. package/dist/chunk-EPBKISS5.js.map +0 -1
  695. package/dist/chunk-GBYNC5V3.js.map +0 -1
  696. package/dist/chunk-GOK4QRJR.js.map +0 -1
  697. package/dist/chunk-HPVMTX6M.js.map +0 -1
  698. package/dist/chunk-IG5LZ3WU.js.map +0 -1
  699. package/dist/chunk-IW6F6R2W.js.map +0 -1
  700. package/dist/chunk-IZCR27MU.js.map +0 -1
  701. package/dist/chunk-JYWW32JI.js.map +0 -1
  702. package/dist/chunk-KY4UXX7M.js.map +0 -1
  703. package/dist/chunk-L2AMXONH.js.map +0 -1
  704. package/dist/chunk-LW7ZI6EQ.js.map +0 -1
  705. package/dist/chunk-MJHSLODD.js.map +0 -1
  706. package/dist/chunk-PBSN4RTV.js.map +0 -1
  707. package/dist/chunk-RP3FZ2T6.js.map +0 -1
  708. package/dist/chunk-SRNCN4X2.js.map +0 -1
  709. package/dist/chunk-T2TQAH2X.js.map +0 -1
  710. package/dist/chunk-U7V5SIFW.js.map +0 -1
  711. package/dist/chunk-VKPBUPH7.js.map +0 -1
  712. package/dist/chunk-VM3PH7BB.js.map +0 -1
  713. package/dist/chunk-WMF2C5U7.js.map +0 -1
  714. package/dist/chunk-X6GUNN7X.js.map +0 -1
  715. package/dist/chunk-XTO436PV.js.map +0 -1
  716. package/dist/chunk-Y56YIT6J.js.map +0 -1
  717. package/dist/chunk-YARXR3CN.js.map +0 -1
  718. package/dist/chunk-YROR332M.js.map +0 -1
  719. package/dist/chunk-YZ3N7IUU.js.map +0 -1
  720. package/dist/chunk-ZBMC6IAE.js.map +0 -1
  721. package/dist/cli/src/driver-error.d.ts +0 -21
  722. package/dist/cli/src/driver-error.d.ts.map +0 -1
  723. package/dist/connectors-YNQ3WJGM.js +0 -46
  724. package/dist/core/driver-targets.d.ts +0 -2
  725. package/dist/core/driver-targets.js +0 -4
  726. package/dist/core/driver-targets.js.map +0 -1
  727. package/dist/core/src/driver-sdk.d.ts.map +0 -1
  728. package/dist/core/src/driver-targets.d.ts +0 -71
  729. package/dist/core/src/driver-targets.d.ts.map +0 -1
  730. package/dist/flows-BHY73K3O.js +0 -26
  731. package/dist/library-publish-NWWVYJUK.js.map +0 -1
  732. package/dist/open-library-7ZG2FFAX.js +0 -42
  733. package/dist/open-registry-RBELV5YH.js +0 -32
  734. package/dist/paths-BFM6K2QO.js +0 -22
  735. package/dist/plugin-store-QOQDM24E.js +0 -23
  736. package/dist/project-YQM3I25D.js +0 -83
  737. package/dist/runner/src/driver-swap-gate.d.ts.map +0 -1
  738. package/dist/serve-preflight-5QMY7DBC.js +0 -60
  739. package/dist/serve-preflight-5QMY7DBC.js.map +0 -1
  740. package/dist/sessions-DICDEONJ.js +0 -5
  741. package/dist/setup-AAHVAXRA.js.map +0 -1
  742. package/dist/skills-RSZVUIYZ.js +0 -26
  743. package/dist/source-KWMCMEMB.js +0 -84
  744. package/dist/source-manifest-publish-EDYKM4YZ.js.map +0 -1
  745. package/dist/validator-FA2PFW6N.js +0 -5
  746. /package/dist/bridge/{drivers → harnesses}/gemini.js.map +0 -0
@@ -1,18 +1,18 @@
1
- import { unregisteredLibraryNames, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, storeManifestFile, missingLibraryDirMessage } from './chunk-VKPBUPH7.js';
2
- import { SEMVER_RE, invalidSemverMessage, flowFileNameError, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-HPVMTX6M.js';
1
+ import { unregisteredLibraryNames, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, filesEntryPaths } from './chunk-UL22SDGR.js';
2
+ import { SEMVER_RE, invalidSemverMessage, flowFileNameError, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-QOM5Z62G.js';
3
3
  import { parseFlowDefinition } from './chunk-X3RMRJNR.js';
4
- import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, assertNoLibrarySymlinks, deployAll, removeAsset, createScaffold, installAgent } from './chunk-YZ3N7IUU.js';
4
+ import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, assertNoLibrarySymlinks, deployAll, removeAsset, createScaffold, installAgent } from './chunk-3JKGY2YC.js';
5
5
  import { appendHistory, getRecentHistory, clearHistory } from './chunk-KTBKW2FI.js';
6
6
  import { commitChanges } from './chunk-UQ6LFBPZ.js';
7
- import { driverTargetSupportsAgents, CODEX_IDENTITY_DIR } from './chunk-SRNCN4X2.js';
8
- import { isScaffoldBody, isScaffoldDescription } from './chunk-CKNIYIV2.js';
9
- import { resolveConfiguredDriverTarget, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, computeHash, buildLockFile, writeLock, readLock, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-T2TQAH2X.js';
10
- import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-KC6HGWXN.js';
11
- import { deployedBase, isDeployed, deployedPaths, deployedDir } from './chunk-5TBFN46Z.js';
12
- import { resolveSkWorkspaceConfig, effectiveAgentInstances, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, resolveAll, agentSourceCacheDir, ensureRepo, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAgentDefinitionDir, resolveAsset, MAX_PRESET_DEPTH, PresetDepthError, DEFAULT_AGENT_INSTANCE_ID } from './chunk-2NOLF7B2.js';
7
+ import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR } from './chunk-DUMTLYSO.js';
8
+ import { isScaffoldBody, isScaffoldDescription } from './chunk-E572OHGY.js';
9
+ import { resolveConfiguredHarnessName, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, computeHash, buildLockFile, readLock, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-L4YKW5AY.js';
10
+ import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-OTIB4D2K.js';
11
+ import { deployedBase, isDeployed, deployedPaths, deployedDir } from './chunk-5KRMNUL4.js';
12
+ import { resolveSkWorkspaceConfig, effectiveAgentInstances, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, resolveAll, agentSourceCacheDir, ensureRepo, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAgentDefinitionDir, resolveAsset, MAX_PRESET_DEPTH, PresetDepthError, DEFAULT_AGENT_INSTANCE_ID } from './chunk-OHNKYHRR.js';
13
13
  import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-L5VSIPQD.js';
14
- import { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS } from './chunk-IG5LZ3WU.js';
15
- import { listAssetFiles, loadSkPublishManifest, isNonAssetDir, isNonAssetFile } from './chunk-CKICWXMU.js';
14
+ import { HARNESS_TARGETS, SUPPORTED_HARNESSES } from './chunk-VTETQCR6.js';
15
+ import { loadSkPublishManifest, listAssetFiles, isNonAssetDir, isNonAssetFile } from './chunk-UQ33Y4DM.js';
16
16
  import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-GOCWM7FN.js';
17
17
  import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-WDXZA7QW.js';
18
18
  import { spawnSync } from 'child_process';
@@ -40,8 +40,8 @@ function writeLedger(projectDir, ledger) {
40
40
  writeFileSync(p, `${JSON.stringify(ledger, null, 2)}
41
41
  `, "utf-8");
42
42
  }
43
- function renderedInstanceFiles(projectDir, driverTarget) {
44
- const recorded = readLedger(projectDir).targets[driverTarget];
43
+ function renderedInstanceFiles(projectDir, harness) {
44
+ const recorded = readLedger(projectDir).targets[harness];
45
45
  if (!recorded) return [];
46
46
  let instances;
47
47
  try {
@@ -51,11 +51,11 @@ function renderedInstanceFiles(projectDir, driverTarget) {
51
51
  }
52
52
  return Object.entries(instances).filter(([id]) => recorded[id]?.length).map(([id, instance]) => ({ id, ref: instance.ref, files: recorded[id] }));
53
53
  }
54
- function instanceRenderedAgentNames(projectDir, driverTarget) {
54
+ function instanceRenderedAgentNames(projectDir, harness) {
55
55
  const names = /* @__PURE__ */ new Set();
56
- if (!driverTargetSupportsAgents(driverTarget)) return names;
57
- const agentDir = resolve(deployedBase("agent", driverTarget, false, projectDir));
58
- for (const files of Object.values(readLedger(projectDir).targets[driverTarget] ?? {})) {
56
+ if (!harnessTargetSupportsAgents(harness)) return names;
57
+ const agentDir = resolve(deployedBase("agent", harness, false, projectDir));
58
+ for (const files of Object.values(readLedger(projectDir).targets[harness] ?? {})) {
59
59
  for (const rel of files) {
60
60
  const abs = resolve(projectDir, rel);
61
61
  if (!abs.startsWith(agentDir + sep)) continue;
@@ -80,8 +80,8 @@ function bindInstance(projectDir, id, instance) {
80
80
  }
81
81
  return { srcDir, errors };
82
82
  }
83
- function unboundAgentInstances(projectDir, driverTarget) {
84
- if (!driverTargetSupportsAgents(driverTarget)) return [];
83
+ function unboundAgentInstances(projectDir, harness) {
84
+ if (!harnessTargetSupportsAgents(harness)) return [];
85
85
  let instances;
86
86
  try {
87
87
  instances = effectiveAgentInstances(resolveSkWorkspaceConfig(projectDir));
@@ -96,16 +96,16 @@ function unboundAgentInstances(projectDir, driverTarget) {
96
96
  return out;
97
97
  }
98
98
  function removeAgentInstanceRenderings(opts) {
99
- const { projectDir, driverTarget, ids } = opts;
100
- if (!driverTargetSupportsAgents(driverTarget) || ids.length === 0) return [];
99
+ const { projectDir, harness, ids } = opts;
100
+ if (!harnessTargetSupportsAgents(harness) || ids.length === 0) return [];
101
101
  const ledger = readLedger(projectDir);
102
- const previous = ledger.targets[driverTarget];
102
+ const previous = ledger.targets[harness];
103
103
  if (!previous) return [];
104
104
  const gone = new Set(ids);
105
105
  const claimed = new Set(
106
106
  Object.entries(previous).filter(([id]) => !gone.has(id)).flatMap(([, files]) => files)
107
107
  );
108
- const agentDeployDir = deployedBase("agent", driverTarget, false, projectDir);
108
+ const agentDeployDir = deployedBase("agent", harness, false, projectDir);
109
109
  const removable = [resolve(agentDeployDir), resolve(dirname(agentDeployDir), CODEX_IDENTITY_DIR)];
110
110
  const root = resolve(projectDir);
111
111
  const removed = [];
@@ -120,28 +120,28 @@ function removeAgentInstanceRenderings(opts) {
120
120
  }
121
121
  const owned = Object.fromEntries(Object.entries(previous).filter(([id]) => !gone.has(id)));
122
122
  const nextTargets = { ...ledger.targets };
123
- if (Object.keys(owned).length > 0) nextTargets[driverTarget] = owned;
124
- else delete nextTargets[driverTarget];
123
+ if (Object.keys(owned).length > 0) nextTargets[harness] = owned;
124
+ else delete nextTargets[harness];
125
125
  if (JSON.stringify(nextTargets) !== JSON.stringify(ledger.targets)) {
126
126
  writeLedger(projectDir, { version: 1, targets: nextTargets });
127
127
  }
128
128
  return removed;
129
129
  }
130
130
  function installAgentInstances(opts) {
131
- const { projectDir, driverTarget, log } = opts;
131
+ const { projectDir, harness, log } = opts;
132
132
  const result = {
133
133
  instances: [],
134
134
  removed: [],
135
135
  warnings: [],
136
136
  errors: []
137
137
  };
138
- if (!driverTargetSupportsAgents(driverTarget)) return result;
138
+ if (!harnessTargetSupportsAgents(harness)) return result;
139
139
  const wsConfig = opts.wsConfig ?? resolveSkWorkspaceConfig(projectDir);
140
140
  const instances = effectiveAgentInstances(wsConfig);
141
- const agentDeployDir = deployedBase("agent", driverTarget, false, projectDir);
142
- const skillsRelDir = DRIVER_TARGETS[driverTarget]?.local.skill ?? "";
141
+ const agentDeployDir = deployedBase("agent", harness, false, projectDir);
142
+ const skillsRelDir = HARNESS_TARGETS[harness]?.local.skill ?? "";
143
143
  const ledger = readLedger(projectDir);
144
- const previous = ledger.targets[driverTarget] ?? {};
144
+ const previous = ledger.targets[harness] ?? {};
145
145
  const owned = {};
146
146
  for (const [id, instance] of Object.entries(instances)) {
147
147
  const { srcDir, errors } = bindInstance(projectDir, id, instance);
@@ -154,7 +154,7 @@ function installAgentInstances(opts) {
154
154
  srcDir,
155
155
  agentDeployDir,
156
156
  projectDir,
157
- driverTarget,
157
+ harness,
158
158
  skillsRelDir,
159
159
  id,
160
160
  /* includeSubAgents */
@@ -180,8 +180,8 @@ function installAgentInstances(opts) {
180
180
  result.removed.push(rel);
181
181
  }
182
182
  const nextTargets = { ...ledger.targets };
183
- if (Object.keys(owned).length > 0) nextTargets[driverTarget] = owned;
184
- else delete nextTargets[driverTarget];
183
+ if (Object.keys(owned).length > 0) nextTargets[harness] = owned;
184
+ else delete nextTargets[harness];
185
185
  if (JSON.stringify(nextTargets) !== JSON.stringify(ledger.targets)) {
186
186
  writeLedger(projectDir, { version: 1, targets: nextTargets });
187
187
  }
@@ -208,17 +208,17 @@ var UNSUPPORTED_SECRET_PREFIXES = [
208
208
  var TEMPLATE_PLACEHOLDER = /<[^<>\s/]+>/;
209
209
  var PAYLOAD_FETCH_TIMEOUT_MS = 6e4;
210
210
  var WORKSPACE_MARKER = /\$\{workspace\}/g;
211
- function substituteWorkspace(value, projectDir) {
212
- return value.replace(WORKSPACE_MARKER, projectDir);
211
+ function substituteWorkspace(value, absoluteRoot) {
212
+ return value.replace(WORKSPACE_MARKER, absoluteRoot ?? ".");
213
213
  }
214
214
  function renderSecretRef(value) {
215
215
  return value.startsWith("env:") ? `\${${value.slice(4)}}` : value;
216
216
  }
217
- function renderValueMap(map, projectDir) {
217
+ function renderValueMap(map, substitute) {
218
218
  if (!map) return void 0;
219
219
  const out = {};
220
220
  for (const [k, v] of Object.entries(map)) {
221
- out[k] = renderSecretRef(projectDir ? substituteWorkspace(v, projectDir) : v);
221
+ out[k] = renderSecretRef(substitute ? substitute(v) : v);
222
222
  }
223
223
  return Object.keys(out).length > 0 ? out : void 0;
224
224
  }
@@ -226,6 +226,12 @@ function findUnsupportedSecretRef(decl) {
226
226
  const values = [...Object.values(decl.env ?? {}), ...Object.values(decl.headers ?? {})];
227
227
  return values.find((v) => UNSUPPORTED_SECRET_PREFIXES.some((p) => v.startsWith(p)));
228
228
  }
229
+ function literalSecretField(decl) {
230
+ return (decl.fields ?? []).filter((f) => f.sensitive === true || f.type === "password").map((f) => f.key).find((key) => {
231
+ const value = decl.env?.[key];
232
+ return value !== void 0 && value !== "" && !value.startsWith("env:");
233
+ });
234
+ }
229
235
  function skipReason(decl) {
230
236
  if (RESERVED_MCP_SERVER_IDS.has(decl.id)) return "reserved id";
231
237
  if (decl.launcher === "recipe" || decl.launcher == null && decl.recipe != null) {
@@ -243,6 +249,10 @@ function skipReason(decl) {
243
249
  }
244
250
  const badRef = findUnsupportedSecretRef(decl);
245
251
  if (badRef) return `unsupported secret reference '${badRef}'`;
252
+ const literal = literalSecretField(decl);
253
+ if (literal) {
254
+ return `${literal} holds a literal secret, and .mcp.json is committed - set ${literal}: env:${literal} in the mcp_servers entry of skaile.yaml and export ${literal}, then run skaile install`;
255
+ }
246
256
  return void 0;
247
257
  }
248
258
  function payloadDir(projectDir, id) {
@@ -357,7 +367,7 @@ async function removePayloadDir(projectDir, id) {
357
367
  }
358
368
  await fs.rm(dir, { recursive: true, force: true });
359
369
  }
360
- function buildEntry(decl, projectDir) {
370
+ function buildEntry(decl, absoluteRoot) {
361
371
  const transport = decl.transport ?? "stdio";
362
372
  if (transport !== "stdio") {
363
373
  const entry2 = { type: transport, url: decl.url };
@@ -365,12 +375,13 @@ function buildEntry(decl, projectDir) {
365
375
  if (headers) entry2.headers = headers;
366
376
  return entry2;
367
377
  }
378
+ const workspace = (value) => substituteWorkspace(value, absoluteRoot);
368
379
  const entry = {
369
- command: substituteWorkspace(decl.command, projectDir)
380
+ command: workspace(decl.command)
370
381
  };
371
- const args = decl.args?.map((a) => substituteWorkspace(a, projectDir));
382
+ const args = decl.args?.map(workspace);
372
383
  if (args && args.length > 0) entry.args = args;
373
- const env = renderValueMap(decl.env, projectDir);
384
+ const env = renderValueMap(decl.env, workspace);
374
385
  if (env) entry.env = env;
375
386
  return entry;
376
387
  }
@@ -419,18 +430,32 @@ async function writeNotedSkips(projectDir, target, before, skipped) {
419
430
  else delete targets[target];
420
431
  await writeJson(notedSkipsPath(projectDir), { version: 1, targets });
421
432
  }
422
- async function readManagedIds(projectDir, target) {
433
+ async function readManaged(projectDir, target) {
423
434
  const state = await readJsonStrict(managedStatePath(projectDir));
424
435
  const ids = state?.targets?.[target];
425
- return Array.isArray(ids) ? ids : [];
436
+ const rendered = state?.rendered?.[target];
437
+ return {
438
+ ids: Array.isArray(ids) ? ids : [],
439
+ rendered: rendered && typeof rendered === "object" ? rendered : {}
440
+ };
426
441
  }
427
- async function writeManagedIds(projectDir, target, ids) {
442
+ async function writeManaged(projectDir, target, record) {
428
443
  const p = managedStatePath(projectDir);
429
444
  const state = await readJsonStrict(p) ?? { targets: {} };
430
445
  const targets = { ...state.targets ?? {} };
431
- if (ids.length > 0) targets[target] = ids;
432
- else delete targets[target];
433
- await writeJson(p, { version: 1, targets });
446
+ const rendered = { ...state.rendered ?? {} };
447
+ if (record.ids.length > 0) {
448
+ targets[target] = record.ids;
449
+ rendered[target] = record.rendered;
450
+ } else {
451
+ delete targets[target];
452
+ delete rendered[target];
453
+ }
454
+ await writeJson(p, {
455
+ version: 1,
456
+ targets,
457
+ ...Object.keys(rendered).length > 0 ? { rendered } : {}
458
+ });
434
459
  }
435
460
  async function removeEmptyLedger(projectDir) {
436
461
  const p = managedStatePath(projectDir);
@@ -469,12 +494,16 @@ function canonicalJson(value) {
469
494
  (_key, v) => v && typeof v === "object" && !Array.isArray(v) ? Object.fromEntries(Object.entries(v).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0)) : v
470
495
  );
471
496
  }
472
- async function mcpServerDrift(projectDir, driverTarget, opts = {}) {
473
- const relConfig = TARGET_MCP_CONFIG[driverTarget];
497
+ function entryHash(entry) {
498
+ return createHash("sha256").update(canonicalJson(entry)).digest("hex");
499
+ }
500
+ async function mcpServerDrift(projectDir, harnessTarget, opts = {}) {
501
+ const relConfig = TARGET_MCP_CONFIG[harnessTarget];
474
502
  if (!relConfig) return [];
475
503
  const declarations = opts.declarations ?? await loadMcpServerDeclarations(projectDir);
476
- const skippedNow = await readNotedSkips(projectDir, driverTarget);
477
- const managed = new Set(await readManagedIds(projectDir, driverTarget));
504
+ const skippedNow = await readNotedSkips(projectDir, harnessTarget);
505
+ const ledger = await readManaged(projectDir, harnessTarget);
506
+ const managed = new Set(ledger.ids);
478
507
  let servers = {};
479
508
  try {
480
509
  const file = await readJsonStrict(path.join(projectDir, relConfig));
@@ -486,7 +515,7 @@ async function mcpServerDrift(projectDir, driverTarget, opts = {}) {
486
515
  const out = [];
487
516
  for (const decl of declarations) {
488
517
  if (skippedNow[decl.id] !== void 0 || skipReason(decl)) continue;
489
- const drift = { id: decl.id, missing: [], modified: [], extra: [] };
518
+ const drift = { id: decl.id, missing: [], modified: [], extra: [], stale: [] };
490
519
  const dest = decl.payload ? rawPayloadDest(decl.payload) : void 0;
491
520
  const dir = payloadDir(projectDir, decl.id);
492
521
  if (decl.payload && dest !== void 0 && isPlainName(dest) && dir) {
@@ -510,18 +539,22 @@ async function mcpServerDrift(projectDir, driverTarget, opts = {}) {
510
539
  const owned = managed.has(decl.id);
511
540
  const lockedHere = opts.locked?.has(decl.id) || opts.locked?.has(decl.id.split("/").pop() ?? "");
512
541
  if (owned || lockedHere) {
513
- const expected = JSON.parse(JSON.stringify(buildEntry(decl, projectDir)));
542
+ const expected = JSON.parse(JSON.stringify(buildEntry(decl)));
514
543
  const actual = Object.hasOwn(servers, decl.id) ? servers[decl.id] : void 0;
515
544
  const label = `${relConfig} entry "${decl.id}"`;
516
545
  if (actual === void 0) {
517
546
  drift.missing.push(label);
518
547
  drift.entry = { expected, actual };
519
548
  } else if (owned && canonicalJson(actual) !== canonicalJson(expected)) {
520
- drift.modified.push(label);
549
+ const recorded = ledger.rendered[decl.id];
550
+ const untouched = recorded !== void 0 ? entryHash(actual) === recorded : entryHash(actual) === entryHash(buildEntry(decl, projectDir));
551
+ (untouched ? drift.stale : drift.modified).push(label);
521
552
  drift.entry = { expected, actual };
522
553
  }
523
554
  }
524
- if (drift.missing.length + drift.modified.length + drift.extra.length > 0) out.push(drift);
555
+ if (drift.missing.length + drift.modified.length + drift.extra.length + drift.stale.length > 0) {
556
+ out.push(drift);
557
+ }
525
558
  }
526
559
  return out;
527
560
  }
@@ -547,7 +580,7 @@ function mcpDriftDiff(drift) {
547
580
  for (const f of drift.extra)
548
581
  out.push(`--- ${f} (deployed)`, "+++ /dev/null (not part of the asset)");
549
582
  if (drift.entry) {
550
- const file = drift.missing.concat(drift.modified).find((f) => f.includes(" entry ")) ?? "MCP config entry";
583
+ const file = drift.missing.concat(drift.modified, drift.stale).find((f) => f.includes(" entry ")) ?? "MCP config entry";
551
584
  out.push(`--- ${file} (deployed)`, `+++ ${file} (declared)`);
552
585
  out.push(...jsonLineDiff(drift.entry.actual, drift.entry.expected));
553
586
  }
@@ -559,17 +592,39 @@ function unsetRequiredFields(decl) {
559
592
  return (decl.fields ?? []).filter((f) => f.required === true && f.default === void 0).filter((f) => !(decl.env && Object.hasOwn(decl.env, f.key))).map((f) => f.key);
560
593
  }
561
594
  function requiredFieldsAdvice(id, keys) {
562
- return `needs ${keys.join(", ")} (required): set it with an mcp_servers entry (id: ${id}, env: \u2026) in skaile.yaml`;
595
+ const setting = keys.map((k) => `${k}: env:${k}`).join(", ");
596
+ return `needs ${keys.join(", ")} (required): set it with an mcp_servers entry (id: ${id}, env: ${setting}) in skaile.yaml and export the variable, then run skaile install`;
597
+ }
598
+ function mcpConfigFileOf(harnessTarget) {
599
+ return TARGET_MCP_CONFIG[harnessTarget];
563
600
  }
564
- async function renderMcpServerConfig(projectDir, driverTarget, opts) {
601
+ async function mcpRenderedFootprint(projectDir, harnessTarget, name) {
602
+ const relConfig = TARGET_MCP_CONFIG[harnessTarget];
603
+ if (!relConfig) return void 0;
604
+ const ledger = await readManaged(projectDir, harnessTarget);
605
+ if (!ledger.ids.includes(name)) return void 0;
606
+ const dir = payloadDir(projectDir, name);
607
+ let hasPayload = false;
608
+ if (dir) {
609
+ try {
610
+ hasPayload = (await fs.stat(dir)).isDirectory();
611
+ } catch {
612
+ }
613
+ }
614
+ return {
615
+ file: relConfig,
616
+ ...dir && hasPayload ? { payloadDir: `${path.relative(projectDir, dir).split(path.sep).join("/")}/` } : {}
617
+ };
618
+ }
619
+ async function renderMcpServerConfig(projectDir, harnessTarget, opts) {
565
620
  const warn = opts?.warn ?? ((m) => console.warn(`skaile: ${m}`));
566
- const relConfig = TARGET_MCP_CONFIG[driverTarget];
621
+ const relConfig = TARGET_MCP_CONFIG[harnessTarget];
567
622
  if (!relConfig) return { written: false, servers: [], removed: [], skipped: [] };
568
623
  const configPath = path.join(projectDir, relConfig);
569
624
  const declarations = await loadMcpServerDeclarations(projectDir);
570
625
  const skipped = [];
571
626
  const renderable = /* @__PURE__ */ new Map();
572
- const noted = await readNotedSkips(projectDir, driverTarget);
627
+ const noted = await readNotedSkips(projectDir, harnessTarget);
573
628
  for (const decl of declarations) {
574
629
  const reason = skipReason(decl) ?? await ensurePayload(projectDir, decl, opts?.fetchPayload ?? defaultFetchPayload);
575
630
  if (reason) {
@@ -579,10 +634,11 @@ async function renderMcpServerConfig(projectDir, driverTarget, opts) {
579
634
  }
580
635
  continue;
581
636
  }
582
- renderable.set(decl.id, buildEntry(decl, projectDir));
637
+ renderable.set(decl.id, buildEntry(decl));
583
638
  }
584
- await writeNotedSkips(projectDir, driverTarget, noted, skipped);
585
- const managedIds = await readManagedIds(projectDir, driverTarget);
639
+ await writeNotedSkips(projectDir, harnessTarget, noted, skipped);
640
+ const ledger = await readManaged(projectDir, harnessTarget);
641
+ const managedIds = ledger.ids;
586
642
  const existingFile = await readJsonStrict(configPath);
587
643
  if (renderable.size === 0 && managedIds.length === 0 && !existingFile) {
588
644
  return { path: configPath, written: false, servers: [], removed: [], skipped };
@@ -602,8 +658,9 @@ async function renderMcpServerConfig(projectDir, driverTarget, opts) {
602
658
  const unset = unsetRequiredFields(decl);
603
659
  if (unset.length > 0) warn(`MCP server "${decl.id}" ${requiredFieldsAdvice(decl.id, unset)}`);
604
660
  }
605
- const ledgerStale = JSON.stringify(owned) !== JSON.stringify(managedIds);
606
- if (ledgerStale) await writeManagedIds(projectDir, driverTarget, owned);
661
+ const rendered = Object.fromEntries(owned.map((id) => [id, entryHash(next[id])]));
662
+ const ledgerStale = JSON.stringify(owned) !== JSON.stringify(managedIds) || canonicalJson(rendered) !== canonicalJson(ledger.rendered);
663
+ if (ledgerStale) await writeManaged(projectDir, harnessTarget, { ids: owned, rendered });
607
664
  if (Object.keys(next).length === 0 && !existingFile) {
608
665
  return { path: configPath, written: false, servers: owned, removed, skipped };
609
666
  }
@@ -797,7 +854,10 @@ function isUnlistedLibraryAsset(entry, libPath) {
797
854
  if (listed.length === 0 && !manifestFileHasAssetsArray(libPath)) return false;
798
855
  const file = resolve(entry.source);
799
856
  return !listed.some((a) => {
800
- if (!a.root || a.source) return false;
857
+ if (a.source) return false;
858
+ const filesOnly = filesEntryPaths(libPath, a);
859
+ if (filesOnly) return filesOnly.some((f) => resolve(libPath, f) === file);
860
+ if (!a.root) return false;
801
861
  const root = resolve(libPath, a.root);
802
862
  return file === root || file.startsWith(root + sep);
803
863
  });
@@ -807,7 +867,7 @@ function withLibraryFiles(entry, libPath, cache, registry) {
807
867
  if (!byManifest) {
808
868
  byManifest = /* @__PURE__ */ new Map();
809
869
  const sourceConfig = readManifestSourceConfig(libPath, "library");
810
- if (sourceConfig && isManifestMode(sourceConfig)) {
870
+ if (sourceConfig && isManifestMode(sourceConfig) || existsSync(join(libPath, ".git"))) {
811
871
  for (const a of discoverAssetsInTree(libPath, { sourceConfig, registry }).assets) {
812
872
  const { assetRoot, files: files2 } = a.fileFilter;
813
873
  byManifest.set(
@@ -903,27 +963,32 @@ function libraryEntryDepRefs(e) {
903
963
  }
904
964
  return [...refs];
905
965
  }
906
- function assertFlowsLoad(entries) {
966
+ function flowLoadError(e) {
967
+ let file = e.source;
968
+ if (!file) return void 0;
969
+ let authored;
970
+ try {
971
+ if (lstatSync(file).isDirectory()) {
972
+ const inside = [`${e.name}.flow.yaml`, `${e.name}.flow.yml`, `${e.name}.flow.json`].map((n) => join(file, n)).find((p) => existsSync(p));
973
+ if (!inside) return void 0;
974
+ file = inside;
975
+ }
976
+ const raw = readFileSync(file, "utf8");
977
+ authored = /\.json$/i.test(file) ? JSON.parse(raw) : parse(raw);
978
+ } catch {
979
+ return void 0;
980
+ }
981
+ const parsed = parseFlowDefinition(authored);
982
+ if (parsed.ok) return void 0;
983
+ return parsed.errors.slice(0, 3).map((issue) => `${issue.path || "<root>"}: ${issue.message}`).join("; ");
984
+ }
985
+ function assertFlowsLoad(entries, done) {
907
986
  for (const e of entries) {
908
987
  if (e.kind !== "flow" || !e.source) continue;
909
- let file = e.source;
910
- let authored;
911
- try {
912
- if (lstatSync(file).isDirectory()) {
913
- const inside = [`${e.name}.flow.yaml`, `${e.name}.flow.yml`, `${e.name}.flow.json`].map((n) => join(file, n)).find((p) => existsSync(p));
914
- if (!inside) continue;
915
- file = inside;
916
- }
917
- const raw = readFileSync(file, "utf8");
918
- authored = /\.json$/i.test(file) ? JSON.parse(raw) : parse(raw);
919
- } catch {
920
- continue;
921
- }
922
- const parsed = parseFlowDefinition(authored);
923
- if (parsed.ok) continue;
924
- const details = parsed.errors.slice(0, 3).map((issue) => `${issue.path || "<root>"}: ${issue.message}`).join("; ");
988
+ const details = flowLoadError(e);
989
+ if (details === void 0) continue;
925
990
  throw new Error(
926
- `${canonicalEntryRef(e).split("#")[0]} is not a flow the flow engine can load (${details}) \u2014 nothing was added; fix the flow in its library or source`
991
+ `${canonicalEntryRef(e).split("#")[0]} is not a flow the flow engine can load (${details}) \u2014 nothing was ${done}; fix the flow in its library or source`
927
992
  );
928
993
  }
929
994
  }
@@ -1228,7 +1293,7 @@ function decodeEntryHarnesses(value) {
1228
1293
  for (const [key, list] of Object.entries(value)) {
1229
1294
  if (!Array.isArray(list)) continue;
1230
1295
  const valid = list.filter(
1231
- (h) => SUPPORTED_DRIVER_TARGETS.includes(h)
1296
+ (h) => SUPPORTED_HARNESSES.includes(h)
1232
1297
  );
1233
1298
  if (valid.length > 0) out[key] = [...new Set(valid)];
1234
1299
  }
@@ -1237,8 +1302,8 @@ function decodeEntryHarnesses(value) {
1237
1302
  var AssetManager = class {
1238
1303
  /** Resolved absolute path to the workspace root. */
1239
1304
  projectDir;
1240
- /** Agent framework driver target used for all deploy operations. */
1241
- driverTarget;
1305
+ /** Harness all deploy operations target (a `HarnessName`). */
1306
+ harness;
1242
1307
  /** Whether this instance operates in global-install mode. */
1243
1308
  global;
1244
1309
  /** Asset-kind registry shared with the host (one instance per process). */
@@ -1279,7 +1344,7 @@ var AssetManager = class {
1279
1344
  this.projectDir = resolve(opts.projectDir);
1280
1345
  this.global = opts.global ?? false;
1281
1346
  this.registry = opts.registry;
1282
- this.driverTarget = opts.driverTarget ?? (this.global ? void 0 : resolveConfiguredDriverTarget(this.projectDir)) ?? "claude-code";
1347
+ this.harness = opts.harness ?? (this.global ? void 0 : resolveConfiguredHarnessName(this.projectDir)) ?? "claude-code";
1283
1348
  this.harnessesOverride = opts.harnesses ?? opts.backends;
1284
1349
  this.injectedStoreFetcher = opts.storeFetcher;
1285
1350
  this.injectedAssetFetcher = opts.assetFetcher;
@@ -1304,7 +1369,7 @@ var AssetManager = class {
1304
1369
  /**
1305
1370
  * Root for this manager's **state** — config SSOT, lock, cache, history.
1306
1371
  * `~/.skaile` in global mode (the cross-harness SSOT), else the project dir.
1307
- * Deploy dirs are unaffected; they come from `DRIVER_TARGETS[target]`.
1372
+ * Deploy dirs are unaffected; they come from `HARNESS_TARGETS[target]`.
1308
1373
  */
1309
1374
  get stateRoot() {
1310
1375
  return this.global ? globalSkaileDir() : this.projectDir;
@@ -1314,11 +1379,11 @@ var AssetManager = class {
1314
1379
  * filter), else the explicit `global_harnesses:` of `~/.skaile/skaile.yaml`, else every harness
1315
1380
  * whose root dir exists under `~` plus the harness the project is configured for (a project on
1316
1381
  * a harness whose dir does not exist yet still gets its user-scope assets). In project mode
1317
- * this is exactly `[driverTarget]`, so the shared fan-out loop degenerates to the
1382
+ * this is exactly `[harness]`, so the shared fan-out loop degenerates to the
1318
1383
  * single-target path.
1319
1384
  */
1320
1385
  targetHarnesses() {
1321
- if (!this.global) return [this.driverTarget];
1386
+ if (!this.global) return [this.harness];
1322
1387
  if (this.harnessesOverride && this.harnessesOverride.length > 0) return this.harnessesOverride;
1323
1388
  return this.defaultGlobalHarnesses();
1324
1389
  }
@@ -1326,7 +1391,7 @@ var AssetManager = class {
1326
1391
  defaultGlobalHarnesses() {
1327
1392
  const resolved = resolveGlobalHarnesses();
1328
1393
  if (resolveGlobalSkWorkspaceConfig().global_harnesses?.length) return resolved;
1329
- const configured = resolveConfiguredDriverTarget(this.projectDir);
1394
+ const configured = resolveConfiguredHarnessName(this.projectDir);
1330
1395
  return configured && !resolved.includes(configured) ? [...resolved, configured] : resolved;
1331
1396
  }
1332
1397
  /**
@@ -1455,7 +1520,7 @@ var AssetManager = class {
1455
1520
  return this.legacyCopiesRemoved.splice(0);
1456
1521
  }
1457
1522
  /**
1458
- * The harnesses `add` / `install` deploy into: `[driverTarget]` for a project, the global
1523
+ * The harnesses `add` / `install` deploy into: `[harness]` for a project, the global
1459
1524
  * harness set (see {@link AssetManager.targetHarnesses}) for a global manager.
1460
1525
  */
1461
1526
  deployTargets() {
@@ -1489,12 +1554,12 @@ var AssetManager = class {
1489
1554
  get patchDir() {
1490
1555
  return join(this.projectDir, ".skaile", "patches");
1491
1556
  }
1492
- /** Deploy options for one harness. In global mode, `driverTarget` is the
1493
- * fan-out target (not the constructor's `driverTarget`, which is project-only). */
1557
+ /** Deploy options for one harness. In global mode, `harness` is the
1558
+ * fan-out target (not the constructor's `harness`, which is project-only). */
1494
1559
  deployOptsFor(target, link, onSecretFile) {
1495
1560
  return {
1496
1561
  registry: this.registry,
1497
- driverTarget: target,
1562
+ harness: target,
1498
1563
  global: this.global,
1499
1564
  cwd: this.projectDir,
1500
1565
  link: link === true,
@@ -1523,7 +1588,7 @@ var AssetManager = class {
1523
1588
  if (locked.size === 0) return [];
1524
1589
  let rows;
1525
1590
  try {
1526
- rows = await mcpServerDrift(this.projectDir, this.driverTarget, { locked });
1591
+ rows = await mcpServerDrift(this.projectDir, this.harness, { locked });
1527
1592
  } catch {
1528
1593
  return [];
1529
1594
  }
@@ -1543,7 +1608,47 @@ var AssetManager = class {
1543
1608
  return out;
1544
1609
  }
1545
1610
  /**
1546
- * Render the project's declared MCP servers into the driver target's own
1611
+ * What the render wrote for the `mcp-server` asset `name` into the coding agent's MCP
1612
+ * config: the config file and, for a server with a payload, the payload directory
1613
+ * (project-relative). `written` is false when the render left the server out (see
1614
+ * {@link AssetManager.mcpNotices}). `undefined` when the harness has no MCP config skaile
1615
+ * writes (`codex`, `omp`) or for a global manager: the asset is composed at run time only.
1616
+ */
1617
+ async mcpRenderFootprint(name) {
1618
+ if (this.global) return void 0;
1619
+ const file = mcpConfigFileOf(this.harness);
1620
+ if (!file) return void 0;
1621
+ const footprint = await mcpRenderedFootprint(this.projectDir, this.harness, unscopedName(name));
1622
+ return footprint ? { ...footprint, written: true } : { file, written: false };
1623
+ }
1624
+ /**
1625
+ * The declared MCP servers whose `.mcp.json` entry skaile wrote and nothing edited, but that
1626
+ * `skaile.yaml` (or a newer asset) now renders differently: the config waits for
1627
+ * `skaile install`. Covers a locked `mcp-server` and an `mcp_servers:` entry alike; the
1628
+ * server is named by its lock identity when it has one, else `mcp-server:<id>`. Empty for a
1629
+ * global manager.
1630
+ */
1631
+ async mcpPendingRender() {
1632
+ if (this.global) return [];
1633
+ const file = mcpConfigFileOf(this.harness);
1634
+ if (!file) return [];
1635
+ let rows;
1636
+ try {
1637
+ rows = await mcpServerDrift(this.projectDir, this.harness, {
1638
+ locked: this.lockedMcpNames()
1639
+ });
1640
+ } catch {
1641
+ return [];
1642
+ }
1643
+ const keys = Object.keys(this.tryReadLock()?.assets ?? {}).map(parseCanonicalLockKey);
1644
+ return rows.filter((r) => r.stale.length > 0).map((r) => {
1645
+ const name = unscopedName(r.id);
1646
+ const publisher = keys.find((k) => k.kind === "mcp-server" && k.name === name)?.publisher;
1647
+ return { ref: publisher ? `mcp-server:@${publisher}/${name}` : `mcp-server:${name}`, file };
1648
+ });
1649
+ }
1650
+ /**
1651
+ * Render the project's declared MCP servers into the harness target's own
1547
1652
  * native MCP config (`<project>/.mcp.json` for `claude-code`), so the coding
1548
1653
  * agent sees the same servers skaile's agent loop wires up.
1549
1654
  *
@@ -1556,14 +1661,14 @@ var AssetManager = class {
1556
1661
  * removed) because they had drifted from the declaration: `install` names them, as it does
1557
1662
  * a restored skill file.
1558
1663
  */
1559
- async renderDriverMcpConfig() {
1664
+ async renderHarnessMcpConfig() {
1560
1665
  if (this.global) return [];
1561
1666
  const before = await this.mcpDriftRows();
1562
1667
  try {
1563
- await renderMcpServerConfig(this.projectDir, this.driverTarget);
1668
+ await renderMcpServerConfig(this.projectDir, this.harness);
1564
1669
  } catch (err) {
1565
1670
  console.warn(
1566
- `skaile: could not render MCP config for ${this.driverTarget}: ${err instanceof Error ? err.message : String(err)}`
1671
+ `skaile: could not render MCP config for ${this.harness}: ${err instanceof Error ? err.message : String(err)}`
1567
1672
  );
1568
1673
  return [];
1569
1674
  }
@@ -1572,8 +1677,14 @@ var AssetManager = class {
1572
1677
  const restored = [];
1573
1678
  for (const { ref, key, drift } of before) {
1574
1679
  const left = after.find((a) => a.ref === ref)?.drift;
1575
- const stillWrong = /* @__PURE__ */ new Set([...left?.missing ?? [], ...left?.modified ?? []]);
1576
- const rewritten = [...drift.missing, ...drift.modified].filter((f) => !stillWrong.has(f));
1680
+ const stillWrong = /* @__PURE__ */ new Set([
1681
+ ...left?.missing ?? [],
1682
+ ...left?.modified ?? [],
1683
+ ...left?.stale ?? []
1684
+ ]);
1685
+ const rewritten = [...drift.missing, ...drift.modified, ...drift.stale].filter(
1686
+ (f) => !stillWrong.has(f)
1687
+ );
1577
1688
  const removed = drift.extra.filter((f) => !left?.extra.includes(f));
1578
1689
  if (rewritten.length > 0 || removed.length > 0)
1579
1690
  restored.push({ ref: key, restored: rewritten, removed });
@@ -1581,7 +1692,7 @@ var AssetManager = class {
1581
1692
  return restored;
1582
1693
  }
1583
1694
  /**
1584
- * Render every agent instance of `skaile.yaml` into the driver target's native
1695
+ * Render every agent instance of `skaile.yaml` into the harness target's native
1585
1696
  * agent files (`.claude/agents/<id>.md`, …) and prune the renderings of
1586
1697
  * instances that left the config. Runs after the skills deploy, so composed
1587
1698
  * skills resolve. Project scope only. An instance whose `ref` resolves to no agent is
@@ -1592,10 +1703,10 @@ var AssetManager = class {
1592
1703
  try {
1593
1704
  const result = installAgentInstances({
1594
1705
  projectDir: this.projectDir,
1595
- driverTarget: this.driverTarget
1706
+ harness: this.harness
1596
1707
  });
1597
1708
  const details = [];
1598
- for (const u of unboundAgentInstances(this.projectDir, this.driverTarget)) {
1709
+ for (const u of unboundAgentInstances(this.projectDir, this.harness)) {
1599
1710
  if (!u.ref.startsWith("agent:")) continue;
1600
1711
  const at = result.errors.findIndex((e) => e.startsWith(`agent instance "${u.id}":`));
1601
1712
  if (at < 0) continue;
@@ -1612,7 +1723,7 @@ var AssetManager = class {
1612
1723
  };
1613
1724
  } catch (err) {
1614
1725
  console.warn(
1615
- `skaile: could not render agent instances for ${this.driverTarget}: ${err instanceof Error ? err.message : String(err)}`
1726
+ `skaile: could not render agent instances for ${this.harness}: ${err instanceof Error ? err.message : String(err)}`
1616
1727
  );
1617
1728
  return {};
1618
1729
  }
@@ -2116,12 +2227,18 @@ var AssetManager = class {
2116
2227
  const id = refIdentity(d);
2117
2228
  if (id !== null) held.add(id);
2118
2229
  }
2230
+ const declaredSources = new Set(this.loadConfig().sources.map((s) => sourceCacheKey(s.url)));
2231
+ const orphanReaders = new Set(
2232
+ ((await this.loadLibraryIndex())?.libraries ?? []).filter(
2233
+ (l) => l.ownership === "reader" && "url" in l.backendConfig && !declaredSources.has(sourceCacheKey(l.backendConfig.url))
2234
+ ).map((l) => l.name)
2235
+ );
2119
2236
  for (const [ref, w] of wanted) {
2120
2237
  const origin = lockEntries.map(([key, e]) => ({ id: parseCanonicalLockKey(key), library: e.library })).find(
2121
2238
  ({ id, library }) => library && !library.installed && id.kind === w.kind && id.name === w.name && id.publisher === w.publisher
2122
2239
  )?.library?.name;
2123
2240
  const pool = [...scan.byKey.values()].flat().filter(
2124
- (c) => c.entry.kind === w.kind && c.entry.name === w.name && c.entry.publisher !== w.publisher && (origin ? c.library === origin : !held.has(`${c.entry.publisher}/${c.entry.kind}:${c.entry.name}`))
2241
+ (c) => c.entry.kind === w.kind && c.entry.name === w.name && c.entry.publisher !== w.publisher && !orphanReaders.has(c.library) && (origin ? c.library === origin : !held.has(`${c.entry.publisher}/${c.entry.kind}:${c.entry.name}`))
2125
2242
  );
2126
2243
  const publishers = new Set(pool.map((c) => c.entry.publisher));
2127
2244
  const best = publishers.size === 1 ? pool.sort(libraryPreference(scan.isDefaultLib))[0] : void 0;
@@ -2365,7 +2482,7 @@ var AssetManager = class {
2365
2482
  const slot = `${component}/${a.name}`;
2366
2483
  const prior = seen.get(slot);
2367
2484
  if (prior && differs(prior, a)) {
2368
- const dir2 = deployedDir(component, a.name, this.driverTarget, this.global, this.projectDir);
2485
+ const dir2 = deployedDir(component, a.name, this.harness, this.global, this.projectDir);
2369
2486
  throw new Error(
2370
2487
  `${refOf(prior)} and ${refOf(a)} both deploy to ${shown(dir2)} \u2014 keep only one of them`
2371
2488
  );
@@ -2437,7 +2554,7 @@ var AssetManager = class {
2437
2554
  }
2438
2555
  const drift = deployedAssetDrift(entry, {
2439
2556
  registry: this.registry,
2440
- driverTarget: target,
2557
+ harness: target,
2441
2558
  global: this.global,
2442
2559
  cwd: this.projectDir
2443
2560
  });
@@ -2620,7 +2737,7 @@ var AssetManager = class {
2620
2737
  const lookup = this.lockedLibrary(e.library, snap, { kind, publisher, name });
2621
2738
  if (lookup.state === "ok") continue;
2622
2739
  const component = this.installTarget(kind);
2623
- const deployed = component !== void 0 && isDeployed(component, name, this.driverTarget, this.global, this.projectDir);
2740
+ const deployed = component !== void 0 && isDeployed(component, name, this.harness, this.global, this.projectDir);
2624
2741
  const problem = lockedLibraryProblem(lookup, e.library, `${kind}:@${publisher}/${name}`);
2625
2742
  const kept = deployed ? "the deployed copy and its lock entry are kept" : "its lock entry is kept; no deployed copy exists";
2626
2743
  lines.push(`${ref} (${problem}; ${kept})`);
@@ -2673,10 +2790,11 @@ var AssetManager = class {
2673
2790
  if (!sameVersion) {
2674
2791
  const component = this.installTarget(kind);
2675
2792
  const newer = gt(coerceVersion(current), coerceVersion(origin.version));
2676
- const intact = newer && (component === void 0 || isDeployed(component, name, this.driverTarget, this.global, this.projectDir));
2793
+ const comparable = !isPseudoVersion(current) && !isPseudoVersion(origin.version);
2794
+ const intact = (newer || comparable) && (component === void 0 || isDeployed(component, name, this.harness, this.global, this.projectDir));
2677
2795
  if (!intact) {
2678
2796
  missing.push(
2679
- `${ref} (library "${lookup.name}" is at ${current}, locked ${origin.version}${newer ? "; `skaile update` moves the lock to it" : ""})`
2797
+ `${ref} (library "${lookup.name}" is at ${current}, locked ${origin.version}${newer || comparable ? "; `skaile update` moves the lock to it" : ""})`
2680
2798
  );
2681
2799
  }
2682
2800
  continue;
@@ -2707,13 +2825,13 @@ var AssetManager = class {
2707
2825
  if (id.kind !== want.kind || id.name !== want.name) return false;
2708
2826
  if (want.publisher && id.publisher !== want.publisher) return false;
2709
2827
  const component = this.installTarget(id.kind);
2710
- return component !== void 0 && isDeployed(component, id.name, this.driverTarget, this.global, this.projectDir);
2828
+ return component !== void 0 && isDeployed(component, id.name, this.harness, this.global, this.projectDir);
2711
2829
  });
2712
2830
  }
2713
2831
  /** Whether the deployed copy of a library asset is on disk; a kind with no install target has none to check. */
2714
2832
  lockedCopyDeployed(kind, name) {
2715
2833
  const component = this.installTarget(kind);
2716
- return component === void 0 || isDeployed(component, name, this.driverTarget, this.global, this.projectDir);
2834
+ return component === void 0 || isDeployed(component, name, this.harness, this.global, this.projectDir);
2717
2835
  }
2718
2836
  /**
2719
2837
  * The library-origin lock entries `install` keeps when the library holds a newer version:
@@ -2799,6 +2917,30 @@ var AssetManager = class {
2799
2917
  const found = this.lockedLibrary(origin, snap);
2800
2918
  return found.state === "ok" ? found.path : null;
2801
2919
  }
2920
+ /**
2921
+ * Rename the library every library-origin lock entry names: `library rename <interim> <old>`
2922
+ * puts a library back under its old name, and an entry locked in between would keep the
2923
+ * interim name, so a later "register library again" advice would name a library nobody knows
2924
+ * any more (p893). Nothing is written when no entry names `from`.
2925
+ *
2926
+ * @returns the number of lock entries renamed.
2927
+ */
2928
+ renameLockedLibrary(from, to) {
2929
+ const lock = this.tryReadLock();
2930
+ if (!lock) return 0;
2931
+ let renamed = 0;
2932
+ const assets = {};
2933
+ for (const [key, entry] of Object.entries(lock.assets)) {
2934
+ if (entry.library && !entry.library.installed && entry.library.name === from) {
2935
+ assets[key] = { ...entry, library: { ...entry.library, name: to } };
2936
+ renamed++;
2937
+ } else {
2938
+ assets[key] = entry;
2939
+ }
2940
+ }
2941
+ if (renamed > 0) writeLock(this.lockPath, { ...lock, assets });
2942
+ return renamed;
2943
+ }
2802
2944
  /**
2803
2945
  * The `kind:@publisher/name` identities the lock holds for one `kind` and `name`, whatever
2804
2946
  * their publisher. `diff` uses it to accept a ref without a publisher only when it names
@@ -2932,7 +3074,7 @@ var AssetManager = class {
2932
3074
  const lockedVersion = locked?.entry.library?.version;
2933
3075
  if (!locked || !lockedVersion || !e.version) return void 0;
2934
3076
  if (isPseudoVersion(lockedVersion) || isPseudoVersion(e.version)) return void 0;
2935
- if (!gt(coerceVersion(e.version), coerceVersion(lockedVersion))) return void 0;
3077
+ if (coerceVersion(e.version) === coerceVersion(lockedVersion)) return void 0;
2936
3078
  for (const r of asked) if (refIdentity(r) === id && r.includes("#")) return void 0;
2937
3079
  return locked;
2938
3080
  };
@@ -2969,7 +3111,7 @@ var AssetManager = class {
2969
3111
  keptVersions[keep.key] = keep.entry;
2970
3112
  if (!this.lockedCopyDeployed(e.kind, e.name)) {
2971
3113
  versionBlocked.push(
2972
- `${keep.key} (library "${origin ?? keep.entry.library?.name}" is at ${e.version}, locked ${keep.entry.library?.version}; the deployed copy is gone and cannot be restored from the newer files \u2014 \`skaile update\` moves the lock to it)`
3114
+ `${keep.key} (library "${origin ?? keep.entry.library?.name}" is at ${e.version}, locked ${keep.entry.library?.version}; the deployed copy is gone and cannot be restored from the ${gt(coerceVersion(e.version ?? ""), coerceVersion(keep.entry.library?.version ?? "")) ? "newer" : "older"} files \u2014 \`skaile update\` moves the lock to it)`
2973
3115
  );
2974
3116
  }
2975
3117
  } else {
@@ -3031,6 +3173,12 @@ var AssetManager = class {
3031
3173
  resolved.push(c);
3032
3174
  }
3033
3175
  for (const o of r.overridesApplied) overridesApplied.add(o);
3176
+ if (opts.readStoreRequires) {
3177
+ const repositories = this.loadConfig().repositories;
3178
+ for (const c of r.resolved) {
3179
+ next.push(...await this.readStoreCandidateRequires(c, repositories));
3180
+ }
3181
+ }
3034
3182
  presets.push(...r.presets);
3035
3183
  const hit2 = await this.resolveLibraryEntries(
3036
3184
  r.missing.filter((m) => !libraryTried.has(m)),
@@ -3103,8 +3251,8 @@ var AssetManager = class {
3103
3251
  * project store should be synthesized — `local` sentinel, already-declared,
3104
3252
  * or no URL. Honours an explicit `catalogUrl` injection (`""` and `"local"` disable it).
3105
3253
  */
3106
- async globalStoreFallback(projectStores) {
3107
- let url = this.catalogUrlOverride;
3254
+ async globalStoreFallback(projectStores, honourOverride = true) {
3255
+ let url = honourOverride ? this.catalogUrlOverride : void 0;
3108
3256
  if (url === void 0) {
3109
3257
  try {
3110
3258
  const { resolveConfig: resolveConfig2 } = await import('./library/index.js');
@@ -3194,6 +3342,43 @@ var AssetManager = class {
3194
3342
  }
3195
3343
  return staged;
3196
3344
  }
3345
+ /**
3346
+ * The requirements a store candidate's own manifest declares (`metadata.requires`, a manifest
3347
+ * `dependencies:`) that its catalog row did not list, read from the staged bytes. The catalog
3348
+ * row is the store's own summary and may hold only same-kind ones; the deployed copy is what
3349
+ * `check` reads, so a requirement only the manifest names would be missing right after `add`
3350
+ * (p1221). Each one is added to the candidate's `deps` and `storeRequires` (the lock records
3351
+ * them) and returned so the caller resolves, deploys and locks it like any other dependency.
3352
+ * A candidate whose bytes come from a source clone, or that has none, adds nothing.
3353
+ */
3354
+ async readStoreCandidateRequires(c, repositories) {
3355
+ if (c.kind === "preset") return [];
3356
+ const staged = (await this.stageStoreAssets([c], repositories)).get(this.candidateKey(c));
3357
+ if (!staged) return [];
3358
+ let own;
3359
+ try {
3360
+ const scanned = await scanDirectory(dirname(staged), c.publisher, {
3361
+ knownKinds: this.knownKinds
3362
+ });
3363
+ own = scanned.find((e) => e.kind === c.kind && e.name === c.name);
3364
+ } catch {
3365
+ return [];
3366
+ }
3367
+ if (!own) return [];
3368
+ const known = new Set((c.deps ?? []).map((d) => refIdentity(qualifyDepRef(d, c.publisher))));
3369
+ const added = [];
3370
+ for (const ref of libraryEntryDepRefs(own)) {
3371
+ const id = refIdentity(ref);
3372
+ if (id === null || known.has(id)) continue;
3373
+ known.add(id);
3374
+ added.push(ref);
3375
+ }
3376
+ if (added.length > 0) {
3377
+ c.deps = [...c.deps ?? [], ...added];
3378
+ c.storeRequires = [...c.storeRequires ?? [], ...added];
3379
+ }
3380
+ return added;
3381
+ }
3197
3382
  /** Repo-relative path of a candidate's primary manifest (un-stripped). */
3198
3383
  primaryManifestRel(c) {
3199
3384
  const paths = (c.files ?? []).map((f) => f.path);
@@ -3298,6 +3483,19 @@ var AssetManager = class {
3298
3483
  npmFailed: []
3299
3484
  };
3300
3485
  }
3486
+ const orphans = await this.orphanedSourceGaps(
3487
+ await this.declaredLockKeys(lockForLibraries, dependencies)
3488
+ );
3489
+ if (orphans.size > 0) {
3490
+ return {
3491
+ deployed: [],
3492
+ removed: [],
3493
+ missing: [...orphans.values()].map((g) => g.message),
3494
+ lockWritten: false,
3495
+ npmInstalled: [],
3496
+ npmFailed: []
3497
+ };
3498
+ }
3301
3499
  }
3302
3500
  const cloneError = this.ensureSourceClones(
3303
3501
  repositories,
@@ -3328,7 +3526,8 @@ var AssetManager = class {
3328
3526
  // `install` restores what the lock recorded: a changed default library or a second
3329
3527
  // library holding the same ref does not move a locked asset. `update` re-resolves.
3330
3528
  ...opts?.moveLibraries ? { preferLocked: await this.lockedPreference() } : { lockedLibraries: await this.lockedLibraryNames() },
3331
- ...keepLocked ? { keepLocked } : {}
3529
+ ...keepLocked ? { keepLocked } : {},
3530
+ readStoreRequires: true
3332
3531
  });
3333
3532
  this.assertNoFolderCollision([...resolved, ...lib.entries.map((e) => this.entryIdentity(e))]);
3334
3533
  if (!opts?.force && !(existsSync(this.lockPath) && this.tryReadLock() === null)) {
@@ -3396,7 +3595,14 @@ var AssetManager = class {
3396
3595
  };
3397
3596
  await this.keepRequiredByKept(prevLock, kept, Object.keys(freshLock.assets));
3398
3597
  const entries = [...await this.buildCatalogEntries(resolved, repositories), ...lib.entries];
3598
+ assertFlowsLoad(entries, "installed");
3399
3599
  assertNoLibrarySymlinks(entries, this.registry, repositories, opts?.link === true);
3600
+ if (!opts?.force) {
3601
+ await this.assertNoHandEditsPruned(
3602
+ resolved,
3603
+ /* @__PURE__ */ new Set([...Object.keys(libraryLock), ...Object.keys(kept.assets)])
3604
+ );
3605
+ }
3400
3606
  const { removed, replaced } = this.reconcileRemovedAssets(
3401
3607
  resolved,
3402
3608
  /* @__PURE__ */ new Set([...Object.keys(libraryLock), ...Object.keys(kept.assets)])
@@ -3417,7 +3623,7 @@ var AssetManager = class {
3417
3623
  )
3418
3624
  ];
3419
3625
  this.sweepLegacyOmpCopies(entries);
3420
- const mcpRestored = await this.renderDriverMcpConfig();
3626
+ const mcpRestored = await this.renderHarnessMcpConfig();
3421
3627
  const agentRender = await this.renderAgentInstances();
3422
3628
  const restored = [...this.restoredCopies(copyDrift, deployed, missingCopies), ...mcpRestored];
3423
3629
  const rewritten = this.rewrittenAgentFiles(unrecordedAgents);
@@ -3535,7 +3741,7 @@ var AssetManager = class {
3535
3741
  const locked = this.lockedRequirementsOf(id);
3536
3742
  const withLocked = (scanned) => [.../* @__PURE__ */ new Set([...scanned, ...locked])];
3537
3743
  const keptAgent = kind === "agent" && !this.global ? join(agentSourceCacheDir(this.projectDir), name) : null;
3538
- const dir = keptAgent && existsSync(keptAgent) ? keptAgent : deployedDir(component, name, this.driverTarget, this.global, this.projectDir);
3744
+ const dir = keptAgent && existsSync(keptAgent) ? keptAgent : deployedDir(component, name, this.harness, this.global, this.projectDir);
3539
3745
  if (!existsSync(dir)) return withLocked([]);
3540
3746
  try {
3541
3747
  const scanned = await scanDirectory(dir, publisher ?? "", { knownKinds: this.knownKinds });
@@ -3620,6 +3826,46 @@ var AssetManager = class {
3620
3826
  const entries = this.tryReadLock()?.assets ?? {};
3621
3827
  return Object.fromEntries(Object.entries(entries).filter(([, e]) => e.library?.installed));
3622
3828
  }
3829
+ /**
3830
+ * Refuse to prune a stale lock entry (in the old lock, not in the new resolved set, with no
3831
+ * other version taking its place) whose deployed folder holds hand edits: the files that differ
3832
+ * from the lock are named, nothing is removed, and `--force` prunes anyway (OQ6).
3833
+ */
3834
+ async assertNoHandEditsPruned(resolved, keep) {
3835
+ const oldLock = this.tryReadLock();
3836
+ if (!oldLock) return;
3837
+ const resolvedRefs = [
3838
+ ...resolved.map((c) => `${c.kind}:@${c.publisher}/${c.name}#${c.version}`),
3839
+ ...keep
3840
+ ];
3841
+ const stale = /* @__PURE__ */ new Set();
3842
+ for (const key of Object.keys(oldLock.assets)) {
3843
+ if (resolvedRefs.includes(key)) continue;
3844
+ const { kind, name, publisher } = parseCanonicalLockKey(key);
3845
+ if (!kind || !name || kind === "preset") continue;
3846
+ const replaced = resolvedRefs.some((r) => {
3847
+ const o = parseCanonicalLockKey(r);
3848
+ return o.kind === kind && o.name === name && o.publisher === publisher;
3849
+ });
3850
+ if (!replaced) stale.add(key);
3851
+ }
3852
+ if (stale.size === 0) return;
3853
+ const lines = [];
3854
+ for (const d of await this.lockedCopyDrift()) {
3855
+ if (!stale.has(d.key)) continue;
3856
+ const files = [
3857
+ ...d.modified.map((f) => `${f} was edited`),
3858
+ ...d.extra.map((f) => `${f} is not part of the asset`)
3859
+ ];
3860
+ lines.push(`${d.ref} (${files.join("; ")})`);
3861
+ }
3862
+ if (lines.length === 0) return;
3863
+ throw new Error(
3864
+ `Not pruned: skaile.yaml no longer declares ${lines.length === 1 ? "an asset" : "assets"} whose deployed copy holds your edits:
3865
+ ${lines.join("\n ")}
3866
+ Nothing was changed. Declare it again to keep it, or run \`skaile install --force\` to prune it with its edits.`
3867
+ );
3868
+ }
3623
3869
  /**
3624
3870
  * Remove stale assets — those recorded in the old lock but absent from the
3625
3871
  * newly resolved set (`resolved` source candidates plus `keep`, the canonical
@@ -3843,7 +4089,15 @@ var AssetManager = class {
3843
4089
  }
3844
4090
  throw new Error("No lock file found. Run `skaile install` first.");
3845
4091
  }
4092
+ assertLockHashes(lock);
3846
4093
  this.assertNoFolderCollision(Object.keys(lock.assets).map(parseCanonicalLockKey));
4094
+ const orphaned = [...(await this.orphanedSourceGaps()).values()];
4095
+ if (orphaned.length > 0) {
4096
+ throw new Error(
4097
+ `Lock file verification failed:
4098
+ ${orphaned.map((g) => g.message).join("\n ")}`
4099
+ );
4100
+ }
3847
4101
  const declBySlug = new Map(Object.entries(repositories));
3848
4102
  const factoryUrl = normalizeRepoUrl(FACTORY_SOURCE_URL);
3849
4103
  const factoryDecl = Object.values(repositories).find((d) => d.factory);
@@ -3913,6 +4167,7 @@ var AssetManager = class {
3913
4167
  ${reason}`);
3914
4168
  }
3915
4169
  const library = await this.restoreLibraryLockEntries(lock);
4170
+ assertFlowsLoad([...resolved, ...library.entries], "installed");
3916
4171
  assertNoLibrarySymlinks([...resolved, ...library.entries], this.registry, repositories);
3917
4172
  const copyDrift = await this.lockedCopyDrift();
3918
4173
  const missingCopies = await this.incompleteDeploys();
@@ -3930,7 +4185,7 @@ var AssetManager = class {
3930
4185
  )
3931
4186
  ];
3932
4187
  this.sweepLegacyOmpCopies([...resolved, ...library.entries]);
3933
- const mcpRestored = await this.renderDriverMcpConfig();
4188
+ const mcpRestored = await this.renderHarnessMcpConfig();
3934
4189
  const agentRender = await this.renderAgentInstances();
3935
4190
  const restored = [...this.restoredCopies(copyDrift, deployed, missingCopies), ...mcpRestored];
3936
4191
  const rewritten = this.rewrittenAgentFiles(unrecordedAgents);
@@ -4079,6 +4334,7 @@ var AssetManager = class {
4079
4334
  stores,
4080
4335
  declaredRefs: dependencies,
4081
4336
  warnCollisions: true,
4337
+ readStoreRequires: true,
4082
4338
  ...opts?.preferLockedLibrary ? { preferLocked: await this.lockedPreference() } : {}
4083
4339
  });
4084
4340
  } finally {
@@ -4101,6 +4357,19 @@ var AssetManager = class {
4101
4357
  );
4102
4358
  }
4103
4359
  }
4360
+ for (const l of snap?.libraries ?? []) {
4361
+ const libPath = this.libraryPath({ name: l.name }, snap);
4362
+ const manifest = libPath ? loadSkPublishManifest(libPath) : null;
4363
+ if (!libPath || !manifest) continue;
4364
+ const gone = missingRootAssets(libPath, manifest).find(
4365
+ (a) => a.kind === parsed.kind && a.name === parsed.name && (!parsed.publisher || bare(a.publisher ?? manifest.publisher) === bare(parsed.publisher))
4366
+ );
4367
+ if (gone) {
4368
+ throw new Error(
4369
+ `library "${l.name}" lists ${parsed.kind}:${parsed.name} but its directory ${gone.root}/ is missing: run \`skaile library index ${l.name}\` to drop the entry, or restore the directory.`
4370
+ );
4371
+ }
4372
+ }
4104
4373
  const unreachable = [...this.storeFailures.values()];
4105
4374
  if (unreachable.length > 0) {
4106
4375
  throw new Error(
@@ -4169,8 +4438,20 @@ var AssetManager = class {
4169
4438
  );
4170
4439
  }
4171
4440
  const entries = [...await this.buildCatalogEntries(resolved, repositories), ...lib.entries];
4172
- assertFlowsLoad(entries);
4441
+ assertFlowsLoad(entries, "added");
4173
4442
  assertNoLibrarySymlinks(entries, this.registry, repositories, opts?.link === true);
4443
+ if (parsed.kind === "mcp-server" && !this.global) {
4444
+ const decls = await loadMcpServerDeclarations(this.projectDir, { alsoDeclared: [ref] });
4445
+ const mine = decls.find(
4446
+ (d) => d.id === parsed.name || unscopedName(d.id) === unscopedName(parsed.name)
4447
+ );
4448
+ const literal = mine ? literalSecretField(mine) : void 0;
4449
+ if (mine && literal) {
4450
+ throw new Error(
4451
+ `${ref.split("#")[0]}: ${literal} is set to a literal value, and .mcp.json is committed - write ${literal}: env:${literal} in the mcp_servers entry of skaile.yaml and export ${literal}. Nothing was added`
4452
+ );
4453
+ }
4454
+ }
4174
4455
  const deployed = [
4175
4456
  ...new Set(
4176
4457
  this.targetHarnesses().flatMap(
@@ -4199,7 +4480,7 @@ var AssetManager = class {
4199
4480
  opts?.onPlaceholderDescription?.(placeholder);
4200
4481
  }
4201
4482
  this.addDependencyToConfig(ref);
4202
- await this.renderDriverMcpConfig();
4483
+ await this.renderHarnessMcpConfig();
4203
4484
  await this.renderAgentInstances();
4204
4485
  if (resolved.length > 0 || lib.entries.length > 0) {
4205
4486
  const libraryLock = await this.libraryLockEntries(lib);
@@ -4466,7 +4747,7 @@ var AssetManager = class {
4466
4747
  * Removes only `ref` itself; use {@link removeWithDependencies} to also drop the
4467
4748
  * dependencies it leaves orphaned.
4468
4749
  *
4469
- * Deliberately does NOT re-render the driver target's MCP config: the render
4750
+ * Deliberately does NOT re-render the harness target's MCP config: the render
4470
4751
  * step is async (the declaration resolver is), and making this synchronous
4471
4752
  * method async would break every external caller. {@link removeWithDependencies}
4472
4753
  * (what `skaile remove` runs) does re-render it; a caller of this method gets the
@@ -4542,7 +4823,7 @@ var AssetManager = class {
4542
4823
  };
4543
4824
  const pruned = changed && requiredRefs.length > 0 ? await this.pruneOrphans(requiredRefs) : [];
4544
4825
  if (changed && (target.kind === "mcp-server" || pruned.some((r) => r.startsWith("mcp-server:")))) {
4545
- await this.renderDriverMcpConfig();
4826
+ await this.renderHarnessMcpConfig();
4546
4827
  }
4547
4828
  return { changed, pruned, ...keptNote };
4548
4829
  }
@@ -4899,7 +5180,7 @@ var AssetManager = class {
4899
5180
  const seen = /* @__PURE__ */ new Set();
4900
5181
  for (const k of kinds) {
4901
5182
  try {
4902
- const base = deployedBase(k, this.driverTarget, this.global, this.projectDir);
5183
+ const base = deployedBase(k, this.harness, this.global, this.projectDir);
4903
5184
  if (!existsSync(base)) continue;
4904
5185
  for (const item of readdirSync(base, { withFileTypes: true })) {
4905
5186
  let name;
@@ -4941,7 +5222,7 @@ var AssetManager = class {
4941
5222
  * @returns One {@link LegacyDeployedAsset} per stale copy, sorted by kind then name.
4942
5223
  */
4943
5224
  listLegacyClaudeDeployed() {
4944
- if (this.global || this.driverTarget === "claude-code") return [];
5225
+ if (this.global || this.harness === "claude-code") return [];
4945
5226
  const tracked = /* @__PURE__ */ new Map();
4946
5227
  const track = (kind, name) => {
4947
5228
  const component = kind ? this.installTarget(kind) : void 0;
@@ -4969,7 +5250,7 @@ var AssetManager = class {
4969
5250
  const out = [];
4970
5251
  for (const { kind, name, component: k } of tracked.values()) {
4971
5252
  const legacy = deployedDir(k, name, "claude-code", false, this.projectDir);
4972
- if (legacy === deployedDir(k, name, this.driverTarget, false, this.projectDir)) continue;
5253
+ if (legacy === deployedDir(k, name, this.harness, false, this.projectDir)) continue;
4973
5254
  const found = deployedPaths(k, name, "claude-code", false, this.projectDir).find((p) => {
4974
5255
  try {
4975
5256
  lstatSync(p);
@@ -5046,10 +5327,10 @@ var AssetManager = class {
5046
5327
  const wired = await wiredMcpNames();
5047
5328
  const isWired = wired.has(parsed.name) || wired.has(unscopedName(parsed.name));
5048
5329
  const skippedReason = Object.entries(
5049
- await readSkippedMcpServers(this.projectDir, this.driverTarget)
5330
+ await readSkippedMcpServers(this.projectDir, this.harness)
5050
5331
  ).find(([id]) => id === parsed.name || unscopedName(id) === parsed.name)?.[1];
5051
5332
  const drifted = (await this.mcpDriftRows()).some(
5052
- (r) => unscopedName(r.drift.id) === unscopedName(parsed.name)
5333
+ (r) => unscopedName(r.drift.id) === unscopedName(parsed.name) && r.drift.missing.length + r.drift.modified.length + r.drift.extra.length > 0
5053
5334
  );
5054
5335
  if (isWired && skippedReason !== void 0) {
5055
5336
  state = "skipped";
@@ -5065,7 +5346,7 @@ var AssetManager = class {
5065
5346
  const onDisk = isDeployed(
5066
5347
  component,
5067
5348
  parsed.name,
5068
- this.driverTarget,
5349
+ this.harness,
5069
5350
  this.global,
5070
5351
  this.projectDir
5071
5352
  );
@@ -5076,6 +5357,22 @@ var AssetManager = class {
5076
5357
  }
5077
5358
  return out;
5078
5359
  }
5360
+ /**
5361
+ * One note per locked library asset whose library went back to an older version than the lock
5362
+ * (`library is at 0.1.0, locked 0.3.0`). Not drift: `install` keeps the lock and only `update`
5363
+ * moves it, so `check` and `doctor` print the note as a `!` line and still exit 0 (p1257).
5364
+ * Empty for a global manager or when the libraries cannot be read.
5365
+ */
5366
+ async libraryOlderNotices() {
5367
+ if (this.global) return [];
5368
+ try {
5369
+ return (await this.outdated()).filter((e) => e.library !== void 0 && e.libraryOlder !== void 0).map(
5370
+ (e) => `${e.kind}:${e.publisher ? `@${e.publisher.replace(/^@/, "")}/` : ""}${e.name}: library is at ${e.libraryOlder}, locked ${e.currentVersion} (library ${e.library}); \`skaile update\` moves the lock to it`
5371
+ );
5372
+ } catch {
5373
+ return [];
5374
+ }
5375
+ }
5079
5376
  /**
5080
5377
  * Notes about the project's `mcp-server`s that are not drift and fail nothing: a declared
5081
5378
  * server skaile does not write to the coding agent's MCP config (`reason` from the last
@@ -5087,7 +5384,7 @@ var AssetManager = class {
5087
5384
  async mcpNotices() {
5088
5385
  if (this.global) return [];
5089
5386
  const out = [];
5090
- const skipped = await readSkippedMcpServers(this.projectDir, this.driverTarget);
5387
+ const skipped = await readSkippedMcpServers(this.projectDir, this.harness);
5091
5388
  for (const [id, reason] of Object.entries(skipped)) {
5092
5389
  out.push({ id, kind: "skipped", reason, text: `MCP server "${id}" is skipped: ${reason}` });
5093
5390
  }
@@ -5132,22 +5429,24 @@ var AssetManager = class {
5132
5429
  const component = kind ? this.installTarget(kind) : void 0;
5133
5430
  if (!publisher || !kind || !name || !component || component === "agent") continue;
5134
5431
  if (patches[`${kind}:${name}`]) continue;
5135
- const dest = join(
5136
- deployedBase(component, this.driverTarget, this.global, this.projectDir),
5137
- name
5138
- );
5432
+ const dest = join(deployedBase(component, this.harness, this.global, this.projectDir), name);
5139
5433
  if (!existsSync(dest) || lstatSync(dest).isSymbolicLink()) continue;
5140
5434
  const missing = lockedAssetFiles(kind, entry.files).map((f) => f.rel).filter((rel) => !existsSync(join(dest, rel)));
5141
5435
  if (missing.length > 0) out.push({ ref: `${kind}:@${publisher}/${name}`, missing });
5142
5436
  }
5143
5437
  const locked = Object.entries(lock.assets).filter(([, e]) => e.library !== void 0 && !e.library.installed).map(([key]) => key);
5144
5438
  if (locked.length === 0) return out;
5145
- const lib = await this.resolveLibraryEntries(locked, { quiet: true });
5439
+ const lockedLibraries = await this.lockedLibraryNames();
5440
+ const lib = await this.resolveLibraryEntries(locked, { quiet: true, lockedLibraries });
5146
5441
  for (const entry of lib.entries) {
5442
+ const lockedIn = lockedLibraries.get(
5443
+ `${entry.kind}:${(entry.publisher ?? "").replace(/^@/, "")}/${entry.name}`
5444
+ );
5445
+ if (lockedIn && lib.libraryOf.get(entry) !== lockedIn) continue;
5147
5446
  const component = this.installTarget(entry.kind);
5148
5447
  if (!entry.files || !component || component === "agent") continue;
5149
5448
  const dest = join(
5150
- deployedBase(component, this.driverTarget, this.global, this.projectDir),
5449
+ deployedBase(component, this.harness, this.global, this.projectDir),
5151
5450
  entry.name
5152
5451
  );
5153
5452
  if (!existsSync(dest)) continue;
@@ -5225,7 +5524,7 @@ var AssetManager = class {
5225
5524
  const repoStatuses = this.buildRepoStatuses(repositories);
5226
5525
  const lockByKindName = indexLockByKindName(lock);
5227
5526
  const entries = [];
5228
- const instanceFiles = this.global ? /* @__PURE__ */ new Set() : instanceRenderedAgentNames(this.projectDir, this.driverTarget);
5527
+ const instanceFiles = this.global ? /* @__PURE__ */ new Set() : instanceRenderedAgentNames(this.projectDir, this.harness);
5229
5528
  for (const d of deployed) {
5230
5529
  const lockEntry = lockByKindName.get(`${d.kind}:${d.name}`);
5231
5530
  if (!lockEntry && d.kind === "agent" && instanceFiles.has(d.name)) continue;
@@ -5548,6 +5847,18 @@ var AssetManager = class {
5548
5847
  });
5549
5848
  continue;
5550
5849
  }
5850
+ if (diskVersion && diskVersion !== origin.version && !isPseudoVersion(diskVersion) && !isPseudoVersion(origin.version)) {
5851
+ result.push({
5852
+ kind,
5853
+ name,
5854
+ publisher,
5855
+ currentVersion: origin.version,
5856
+ behind: 0,
5857
+ library: lookup.name,
5858
+ libraryOlder: diskVersion
5859
+ });
5860
+ continue;
5861
+ }
5551
5862
  if (origin.sha256) {
5552
5863
  const onDisk = libraryDiskHashes(libPath, diskHashes, this.registry).get(
5553
5864
  `${kind}:${name}`
@@ -5568,8 +5879,56 @@ var AssetManager = class {
5568
5879
  await this.addLibraryMoves(libraryAssets, result);
5569
5880
  }
5570
5881
  await this.addRekeyRows(lock, result);
5882
+ await this.addPinnedRows(lock, result);
5571
5883
  return this.addLockGapRows(result);
5572
5884
  }
5885
+ /**
5886
+ * List a locked asset whose `skaile.yaml` ref carries a `#version` pin while a source, a
5887
+ * library or a store holds a newer one: `locked 0.7.0 -> 0.9.0 (pinned)`. The pin is the
5888
+ * user's choice, so the row only informs (`pinned`): `update` leaves it, `outdated` does not
5889
+ * fail on it (OQ13, p1291). An asset already listed keeps its own row.
5890
+ */
5891
+ async addPinnedRows(lock, rows) {
5892
+ const { dependencies, stores } = this.loadConfig();
5893
+ for (const dep of dependencies) {
5894
+ let parsed;
5895
+ try {
5896
+ parsed = parseAssetRef(dep);
5897
+ } catch {
5898
+ continue;
5899
+ }
5900
+ if (!parsed.pin || !parsed.publisher) continue;
5901
+ const publisher = parsed.publisher.replace(/^@/, "");
5902
+ const lockedKey = Object.keys(lock.assets).find((k) => {
5903
+ const id = parseCanonicalLockKey(k);
5904
+ return id.kind === parsed.kind && id.name === parsed.name && id.publisher === publisher;
5905
+ });
5906
+ const locked = lockedKey ? parseCanonicalLockKey(lockedKey).version : void 0;
5907
+ if (!locked || isPseudoVersion(locked)) continue;
5908
+ if (rows.some(
5909
+ (r) => r.kind === parsed.kind && r.name === parsed.name && r.publisher.replace(/^@/, "") === publisher
5910
+ )) {
5911
+ continue;
5912
+ }
5913
+ let latest;
5914
+ try {
5915
+ latest = (await this.availableVersions(parsed, stores))[0];
5916
+ } catch {
5917
+ continue;
5918
+ }
5919
+ if (!latest || isPseudoVersion(latest)) continue;
5920
+ if (!gt(coerceVersion(latest), coerceVersion(locked))) continue;
5921
+ rows.push({
5922
+ kind: parsed.kind,
5923
+ name: parsed.name,
5924
+ publisher,
5925
+ currentVersion: locked,
5926
+ behind: 0,
5927
+ latestVersion: latest,
5928
+ pinned: true
5929
+ });
5930
+ }
5931
+ }
5573
5932
  /**
5574
5933
  * List a source asset locked under a `0.0.0-sha.<commit>` key whose file now declares a
5575
5934
  * version: the next `install` or `update` re-keys it (`replaced 0.0.0-sha.7de3555 → 0.2.0`),
@@ -5783,7 +6142,13 @@ var AssetManager = class {
5783
6142
  const row = (await this.mcpDriftRows()).find(
5784
6143
  (r) => unscopedName(r.drift.id) === unscopedName(parsed.name)
5785
6144
  );
5786
- return row ? { status: "differs", diff: mcpDriftDiff(row.drift) } : { status: "identical" };
6145
+ if (!row) return { status: "identical" };
6146
+ const fileSetDiffers = row.drift.extra.length > 0 || row.drift.missing.some((f) => !f.includes(" entry "));
6147
+ return {
6148
+ status: "differs",
6149
+ diff: mcpDriftDiff(row.drift),
6150
+ ...fileSetDiffers ? { fileSetDiffers: true } : {}
6151
+ };
5787
6152
  }
5788
6153
  }
5789
6154
  const entry = await this.lockedLibraryEntry(parsed) ?? this.lockedSourceEntry(parsed) ?? await this.info(ref);
@@ -5799,7 +6164,7 @@ var AssetManager = class {
5799
6164
  if (parsed.kind === "preset" && this.presetRecorded(parsed)) return { status: "no-files" };
5800
6165
  if (!component) return { status: "not-deployed" };
5801
6166
  if (component === "agent") {
5802
- const opts = this.deployOptsFor(this.driverTarget);
6167
+ const opts = this.deployOptsFor(this.harness);
5803
6168
  const parts = [diffDeployedAgent(entry, opts)];
5804
6169
  for (const inst of this.instancesBoundTo(parsed)) {
5805
6170
  parts.push(diffDeployedAgent(entry, opts, inst));
@@ -5809,7 +6174,7 @@ var AssetManager = class {
5809
6174
  return diff === "" ? { status: "identical" } : { status: "differs", diff };
5810
6175
  }
5811
6176
  const deployedPath = join(
5812
- deployedBase(component, this.driverTarget, this.global, this.projectDir),
6177
+ deployedBase(component, this.harness, this.global, this.projectDir),
5813
6178
  parsed.name
5814
6179
  );
5815
6180
  if (!existsSync(deployedPath)) return { status: "not-deployed" };
@@ -6032,7 +6397,7 @@ var AssetManager = class {
6032
6397
  const dep = memberIdentity(depToStr(req));
6033
6398
  if (!dep) continue;
6034
6399
  const depComponent = this.installTarget(dep.kind);
6035
- if (depComponent && !isDeployed(depComponent, dep.name, this.driverTarget, this.global, this.projectDir)) {
6400
+ if (depComponent && !isDeployed(depComponent, dep.name, this.harness, this.global, this.projectDir)) {
6036
6401
  const inRepos = await resolveAsset({ kind: dep.kind, name: dep.name }, repositories, this.reposDir, {
6037
6402
  knownKinds: this.knownKinds
6038
6403
  }) !== null;
@@ -6193,6 +6558,15 @@ var AssetManager = class {
6193
6558
  gaps.push(gap);
6194
6559
  named.add(gapIdentity(gap.ref));
6195
6560
  }
6561
+ for (const f of this.listDeployed("flow")) {
6562
+ const details = flowLoadError(f);
6563
+ if (details === void 0) continue;
6564
+ const ref = lockIdentity("flow", f.name);
6565
+ if (named.has(gapIdentity(ref))) continue;
6566
+ const reason = `is not a flow the flow engine can load (${details}) \u2014 fix the flow (in its library or source when it came from one), then run skaile install`;
6567
+ gaps.push({ type: "flow", ref, reason, message: `${ref} ${reason}` });
6568
+ named.add(gapIdentity(ref));
6569
+ }
6196
6570
  for (const d of await this.lockedCopyDrift()) {
6197
6571
  if (named.has(gapIdentity(d.ref))) continue;
6198
6572
  const parts = [
@@ -6213,10 +6587,16 @@ var AssetManager = class {
6213
6587
  ...drift.modified.map((f) => `${f} was edited`),
6214
6588
  ...drift.extra.map((f) => `${f} is not part of the asset`)
6215
6589
  ];
6590
+ if (parts.length === 0) continue;
6216
6591
  const reason = `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 run \`skaile install --locked\` to restore it`;
6217
6592
  gaps.push({ type: "modified", ref, reason, message: `${ref} ${reason}` });
6218
6593
  named.add(gapIdentity(ref));
6219
6594
  }
6595
+ const pending = await this.mcpPendingRender();
6596
+ if (pending.length > 0) {
6597
+ const reason = `${pending[0].file} is out of date for skaile.yaml - run skaile install`;
6598
+ gaps.push({ type: "render", ref: pending[0].ref, reason, message: reason });
6599
+ }
6220
6600
  gaps.push(...await this.declaredGaps(requirements, named));
6221
6601
  for (const d of await this.incompleteDeploys()) {
6222
6602
  const reason = `is deployed without ${d.missing.join(", ")} \u2014 run \`skaile install --locked\` to restore it`;
@@ -6232,7 +6612,7 @@ var AssetManager = class {
6232
6612
  manualFix: true
6233
6613
  });
6234
6614
  }
6235
- for (const u of unboundAgentInstances(this.projectDir, this.driverTarget)) {
6615
+ for (const u of unboundAgentInstances(this.projectDir, this.harness)) {
6236
6616
  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`;
6237
6617
  gaps.push({
6238
6618
  type: "agent",
@@ -6267,12 +6647,12 @@ var AssetManager = class {
6267
6647
  const drop = "or drop the binding from skaile.yaml";
6268
6648
  const parsedRef = parseRefTolerant(ref);
6269
6649
  const publisher = parsedRef?.publisher;
6270
- const lockedAgent = Object.keys(this.tryReadLock()?.assets ?? {}).some((key) => {
6650
+ const lockedAgentKey = Object.keys(this.tryReadLock()?.assets ?? {}).find((key) => {
6271
6651
  const k = parseCanonicalLockKey(key);
6272
6652
  return k.kind === "agent" && k.name === parsedRef?.name && (!publisher || !k.publisher || k.publisher === publisher);
6273
6653
  });
6274
- if (lockedAgent) {
6275
- const libraryFix = (await this.unresolvedFixes([ref])).get(ref);
6654
+ if (lockedAgentKey !== void 0) {
6655
+ const libraryFix = await this.lockedAgentLibraryHolds(lockedAgentKey) ? void 0 : (await this.unresolvedFixes([ref])).get(ref);
6276
6656
  if (libraryFix) {
6277
6657
  const register = libraryFix.replace(
6278
6658
  /, or drop the dependency with `skaile remove [^`]*`$/,
@@ -6313,6 +6693,26 @@ var AssetManager = class {
6313
6693
  advice: `register the library that holds it with \`skaile library init <name> --path <dir>\`, ${drop}`
6314
6694
  };
6315
6695
  }
6696
+ /**
6697
+ * Whether the library a locked agent names is here and holds the agent, or the agent comes
6698
+ * from a source or store: `install --locked` restores it, so its missing cache is no fault of
6699
+ * the library.
6700
+ */
6701
+ async lockedAgentLibraryHolds(lockKey) {
6702
+ const entry = this.tryReadLock()?.assets[lockKey];
6703
+ if (!entry) return false;
6704
+ if (!entry.library || entry.library.installed) return true;
6705
+ const { publisher, kind, name } = parseCanonicalLockKey(lockKey);
6706
+ if (!publisher || !kind || !name) return false;
6707
+ const lookup = this.lockedLibrary(entry.library, await this.loadLibraryIndex(), {
6708
+ kind,
6709
+ publisher,
6710
+ name
6711
+ });
6712
+ if (lookup.state !== "ok") return false;
6713
+ const scanned = await scanDirectory(lookup.path, publisher, { knownKinds: this.knownKinds });
6714
+ return scanned.some((x) => x.kind === kind && x.name === name);
6715
+ }
6316
6716
  /** @deprecated Use `(await projectState()).gaps`; removed in the next major. */
6317
6717
  async lockGaps() {
6318
6718
  return (await this.projectState()).gaps;
@@ -6421,7 +6821,7 @@ var AssetManager = class {
6421
6821
  { kind, publisher, name },
6422
6822
  found.version
6423
6823
  );
6424
- if (!diskVersion || isPseudoVersion(diskVersion) || !gt(coerceVersion(diskVersion), coerceVersion(origin.version))) {
6824
+ if (!diskVersion || isPseudoVersion(diskVersion) || !gt(coerceVersion(diskVersion), coerceVersion(origin.version)) && (isPseudoVersion(origin.version) || diskVersion === origin.version)) {
6425
6825
  const reason2 = `is locked, but library "${lookup.name}" content changed since lock \u2014 or the lock predates the one shared asset hash; run \`skaile install\` to re-lock it`;
6426
6826
  gaps.push({ type: "content", ref, reason: reason2, message: `${ref} ${reason2}` });
6427
6827
  }
@@ -6451,6 +6851,40 @@ var AssetManager = class {
6451
6851
  }
6452
6852
  return gaps;
6453
6853
  }
6854
+ /**
6855
+ * The locked source assets whose source is no longer in `skaile.yaml` `sources:` (`source
6856
+ * remove`, a hand edit), keyed by lock key. ONE sentence for it: `check`, `doctor`, `outdated`,
6857
+ * `install`, `install --locked` and `update` all say it (p1062), and none re-clones the source.
6858
+ * A source of a store-resolved lock entry is not told apart from one, so no GitHub source is
6859
+ * called missing while a `stores:` entry exists.
6860
+ *
6861
+ * @param inScope - Only these lock keys count (`install` prunes an undeclared entry as usual).
6862
+ */
6863
+ async orphanedSourceGaps(inScope) {
6864
+ const out = /* @__PURE__ */ new Map();
6865
+ let config;
6866
+ try {
6867
+ config = this.loadConfig();
6868
+ } catch {
6869
+ return out;
6870
+ }
6871
+ const storeBacked = config.stores.length > 0 || (await this.globalStoreFallback(config.stores, false)).length > 0;
6872
+ const registered = new Set(config.sources.map((s) => sourceCacheKey(s.url)));
6873
+ for (const [key, entry] of Object.entries(this.tryReadLock()?.assets ?? {})) {
6874
+ const url = entry.source?.url;
6875
+ if (!url || entry.library || !GIT_URL.test(url)) continue;
6876
+ if (inScope && !inScope.has(key)) continue;
6877
+ if (normalizeRepoUrl(url) === normalizeRepoUrl(FACTORY_SOURCE_URL)) continue;
6878
+ const { publisher, kind, name } = parseCanonicalLockKey(key);
6879
+ if (!publisher || !kind || !name) continue;
6880
+ if (registered.has(sourceCacheKey(url))) continue;
6881
+ if (storeBacked && GITHUB_REPO_URL.test(url)) continue;
6882
+ const ref = `${kind}:@${publisher}/${name}`;
6883
+ const reason = `is locked, but its source ${url} is not in skaile.yaml sources: any more \u2014 register it again with \`skaile source add ${url}\`, or drop the dependency with \`skaile remove ${ref}\``;
6884
+ out.set(key, { type: "source", ref, reason, message: `${ref} ${reason}`, manualFix: true });
6885
+ }
6886
+ return out;
6887
+ }
6454
6888
  /**
6455
6889
  * Locked source assets whose source cannot supply them any more: the source is no longer in
6456
6890
  * `skaile.yaml` `sources:` (`source remove`, a hand edit), or it is there but now publishes
@@ -6462,14 +6896,7 @@ var AssetManager = class {
6462
6896
  * @param index - What the registered sources publish today.
6463
6897
  */
6464
6898
  async sourceOriginGaps(named, index) {
6465
- let config;
6466
- try {
6467
- config = this.loadConfig();
6468
- } catch {
6469
- return [];
6470
- }
6471
- const storeBacked = config.stores.length > 0 || (await this.globalStoreFallback(config.stores)).length > 0;
6472
- const registered = new Set(config.sources.map((s) => sourceCacheKey(s.url)));
6899
+ const orphans = await this.orphanedSourceGaps();
6473
6900
  const published = [...index.values()].flat();
6474
6901
  const gaps = [];
6475
6902
  for (const [key, entry] of Object.entries(this.tryReadLock()?.assets ?? {})) {
@@ -6479,10 +6906,9 @@ var AssetManager = class {
6479
6906
  const { publisher, kind, name } = parseCanonicalLockKey(key);
6480
6907
  if (!publisher || !kind || !name || named.has(`${kind}:${name}`)) continue;
6481
6908
  const ref = `${kind}:@${publisher}/${name}`;
6482
- if (!registered.has(sourceCacheKey(url))) {
6483
- if (storeBacked && GITHUB_REPO_URL.test(url)) continue;
6484
- const reason = `is locked, but its source ${url} is not in skaile.yaml sources: any more \u2014 register it again with \`skaile source add ${url}\`, or drop the dependency with \`skaile remove ${ref}\``;
6485
- gaps.push({ type: "source", ref, reason, message: `${ref} ${reason}`, manualFix: true });
6909
+ const orphan = orphans.get(key);
6910
+ if (orphan) {
6911
+ gaps.push(orphan);
6486
6912
  continue;
6487
6913
  }
6488
6914
  const here = published.filter(
@@ -6550,7 +6976,7 @@ var AssetManager = class {
6550
6976
  ownFiles.set(key, new Set(this.renderedAgentFiles(name).map((f) => f.path)));
6551
6977
  }
6552
6978
  const instanceFiles = /* @__PURE__ */ new Map();
6553
- for (const instance of renderedInstanceFiles(this.projectDir, this.driverTarget)) {
6979
+ for (const instance of renderedInstanceFiles(this.projectDir, this.harness)) {
6554
6980
  const want = parseRefTolerant(instance.ref);
6555
6981
  if (!want || want.kind !== "agent") continue;
6556
6982
  const wantPublisher = want.publisher?.replace(/^@/, "");
@@ -6605,12 +7031,12 @@ var AssetManager = class {
6605
7031
  /** The files of one agent's rendering for the active harness, project-relative, with sha256. */
6606
7032
  renderedAgentFiles(name) {
6607
7033
  const out = [];
6608
- for (const path2 of deployedPaths("agent", name, this.driverTarget, false, this.projectDir)) {
7034
+ for (const path2 of deployedPaths("agent", name, this.harness, false, this.projectDir)) {
6609
7035
  this.hashTree(path2, out);
6610
7036
  }
6611
7037
  this.hashTree(
6612
7038
  join(
6613
- dirname(deployedBase("agent", this.driverTarget, false, this.projectDir)),
7039
+ dirname(deployedBase("agent", this.harness, false, this.projectDir)),
6614
7040
  CODEX_IDENTITY_DIR,
6615
7041
  `${name}.md`
6616
7042
  ),
@@ -6677,7 +7103,7 @@ var AssetManager = class {
6677
7103
  if (!kind || !name || !component) continue;
6678
7104
  const dir = relative(
6679
7105
  this.projectDir,
6680
- deployedDir(component, name, this.driverTarget, this.global, this.projectDir)
7106
+ deployedDir(component, name, this.harness, this.global, this.projectDir)
6681
7107
  ).split(sep).join("/");
6682
7108
  out.push({
6683
7109
  ref: d.key,
@@ -6694,7 +7120,7 @@ var AssetManager = class {
6694
7120
  if (!kind || !name || !component) continue;
6695
7121
  const dir = relative(
6696
7122
  this.projectDir,
6697
- deployedDir(component, name, this.driverTarget, this.global, this.projectDir)
7123
+ deployedDir(component, name, this.harness, this.global, this.projectDir)
6698
7124
  ).split(sep).join("/");
6699
7125
  const files = inc.missing.map((f) => `${dir}/${f}`);
6700
7126
  const row = out.find((r) => r.ref.split("#")[0] === bare);
@@ -6728,7 +7154,7 @@ var AssetManager = class {
6728
7154
  const out = [];
6729
7155
  const deployOpts = {
6730
7156
  registry: this.registry,
6731
- driverTarget: this.driverTarget,
7157
+ harness: this.harness,
6732
7158
  global: this.global,
6733
7159
  cwd: this.projectDir
6734
7160
  };
@@ -6752,7 +7178,7 @@ var AssetManager = class {
6752
7178
  const component = kind ? this.installTarget(kind) : void 0;
6753
7179
  if (!kind || !name || !component || component === "agent") continue;
6754
7180
  if (patches[`${kind}:${name}`]) continue;
6755
- const dest = deployedDir(component, name, this.driverTarget, this.global, this.projectDir);
7181
+ const dest = deployedDir(component, name, this.harness, this.global, this.projectDir);
6756
7182
  try {
6757
7183
  const deployed = lstatSync(dest);
6758
7184
  if (deployed.isSymbolicLink() || !deployed.isDirectory()) continue;
@@ -6796,7 +7222,7 @@ var AssetManager = class {
6796
7222
  }
6797
7223
  if (modified.length > 0) {
6798
7224
  const instanceOf = /* @__PURE__ */ new Map();
6799
- for (const inst of renderedInstanceFiles(this.projectDir, this.driverTarget)) {
7225
+ for (const inst of renderedInstanceFiles(this.projectDir, this.harness)) {
6800
7226
  for (const f of inst.files) if (modified.includes(f)) instanceOf.set(f, inst.id);
6801
7227
  }
6802
7228
  out.push({
@@ -6826,7 +7252,7 @@ var AssetManager = class {
6826
7252
  const { publisher, kind, name } = parseCanonicalLockKey(key);
6827
7253
  const component = kind ? this.installTarget(kind) : void 0;
6828
7254
  if (!kind || !name || !component || named.has(`${kind}:${name}`)) continue;
6829
- if (isDeployed(component, name, this.driverTarget, this.global, this.projectDir)) {
7255
+ if (isDeployed(component, name, this.harness, this.global, this.projectDir)) {
6830
7256
  const renderedGone = component === "agent" && !this.global && (entry.rendered ?? []).some((f) => !existsSync(join(this.projectDir, f.path)));
6831
7257
  if (!renderedGone) continue;
6832
7258
  }
@@ -6834,7 +7260,7 @@ var AssetManager = class {
6834
7260
  const dangling = deployedPaths(
6835
7261
  component,
6836
7262
  name,
6837
- this.driverTarget,
7263
+ this.harness,
6838
7264
  this.global,
6839
7265
  this.projectDir
6840
7266
  ).find((p) => isSymlink(p) && !existsSync(p));
@@ -7152,7 +7578,7 @@ var AssetManager = class {
7152
7578
  for (const dest of deployedPaths(
7153
7579
  component,
7154
7580
  name,
7155
- this.driverTarget,
7581
+ this.harness,
7156
7582
  this.global,
7157
7583
  this.projectDir
7158
7584
  )) {
@@ -7373,8 +7799,8 @@ var AssetManager = class {
7373
7799
  }
7374
7800
  if (ids.length === 0) return false;
7375
7801
  writeFileSync(configPath, stringify(raw, { lineWidth: 120 }));
7376
- for (const driverTarget of this.targetHarnesses()) {
7377
- removeAgentInstanceRenderings({ projectDir: this.projectDir, driverTarget, ids });
7802
+ for (const harness of this.targetHarnesses()) {
7803
+ removeAgentInstanceRenderings({ projectDir: this.projectDir, harness, ids });
7378
7804
  }
7379
7805
  return true;
7380
7806
  }
@@ -7396,5 +7822,5 @@ var AssetManager = class {
7396
7822
  };
7397
7823
 
7398
7824
  export { AssetManager, FACTORY_SOURCE_URL, LibraryEntryError, MissingManifestError, installAgentInstances, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName };
7399
- //# sourceMappingURL=chunk-VM3PH7BB.js.map
7400
- //# sourceMappingURL=chunk-VM3PH7BB.js.map
7825
+ //# sourceMappingURL=chunk-OAHVKSQJ.js.map
7826
+ //# sourceMappingURL=chunk-OAHVKSQJ.js.map