@skaile/workspaces 5.18.0 → 5.19.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 (332) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/{asset-feeds-WAKBHGEV.js → asset-feeds-QGLI3AXI.js} +16 -16
  3. package/dist/{asset-feeds-WAKBHGEV.js.map → asset-feeds-QGLI3AXI.js.map} +1 -1
  4. package/dist/asset-manager/catalog-deployer.js +5 -5
  5. package/dist/asset-manager/index.js +12 -12
  6. package/dist/asset-manager/installer.js +8 -8
  7. package/dist/asset-manager/renderers.js +7 -7
  8. package/dist/asset-manager/src/index.d.ts +91 -2
  9. package/dist/asset-manager/src/index.d.ts.map +1 -1
  10. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  11. package/dist/asset-manager/src/mcp-config.d.ts +29 -3
  12. package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
  13. package/dist/bridge/drivers/claude-sdk.js +22 -20
  14. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  15. package/dist/bridge/drivers/codex.js +11 -11
  16. package/dist/bridge/drivers/continue.js +10 -10
  17. package/dist/bridge/drivers/echo.js +27 -8
  18. package/dist/bridge/drivers/echo.js.map +1 -1
  19. package/dist/bridge/drivers/gemini.js +8 -8
  20. package/dist/bridge/drivers/goose.js +10 -10
  21. package/dist/bridge/drivers/omp.js +18 -460
  22. package/dist/bridge/drivers/omp.js.map +1 -1
  23. package/dist/bridge/drivers/opencode.js +10 -10
  24. package/dist/bridge/drivers/qwen.js +8 -8
  25. package/dist/bridge/index.js +15 -13
  26. package/dist/bridge/src/driver-model-check.d.ts +8 -4
  27. package/dist/bridge/src/driver-model-check.d.ts.map +1 -1
  28. package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +1 -1
  29. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  30. package/dist/bridge/src/drivers/echo.d.ts +3 -0
  31. package/dist/bridge/src/drivers/echo.d.ts.map +1 -1
  32. package/dist/bridge/src/drivers/omp-models-yml.d.ts +11 -0
  33. package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -1
  34. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  35. package/dist/{chunk-E5YNGE3I.js → chunk-25ZVWL2R.js} +4 -4
  36. package/dist/{chunk-E5YNGE3I.js.map → chunk-25ZVWL2R.js.map} +1 -1
  37. package/dist/{chunk-GRKU3S5V.js → chunk-2GXSSZAM.js} +3 -3
  38. package/dist/{chunk-GRKU3S5V.js.map → chunk-2GXSSZAM.js.map} +1 -1
  39. package/dist/{chunk-RO2BPKXK.js → chunk-2LSDMJI2.js} +3 -3
  40. package/dist/{chunk-RO2BPKXK.js.map → chunk-2LSDMJI2.js.map} +1 -1
  41. package/dist/{chunk-CKBCX3HQ.js → chunk-2PBSAH3Z.js} +4 -4
  42. package/dist/{chunk-CKBCX3HQ.js.map → chunk-2PBSAH3Z.js.map} +1 -1
  43. package/dist/{chunk-CKNIYIV2.js → chunk-335ENCCS.js} +5 -5
  44. package/dist/chunk-335ENCCS.js.map +1 -0
  45. package/dist/{chunk-V4RV2NJF.js → chunk-7NT4F6SR.js} +151 -27
  46. package/dist/chunk-7NT4F6SR.js.map +1 -0
  47. package/dist/{chunk-L6IFN6ER.js → chunk-7SCS64BG.js} +13 -7
  48. package/dist/chunk-7SCS64BG.js.map +1 -0
  49. package/dist/{chunk-U2FI547Z.js → chunk-7XSAW5OC.js} +3 -3
  50. package/dist/{chunk-U2FI547Z.js.map → chunk-7XSAW5OC.js.map} +1 -1
  51. package/dist/{chunk-ZNN7ONJX.js → chunk-A6SMCEEE.js} +2 -2
  52. package/dist/{chunk-ZNN7ONJX.js.map → chunk-A6SMCEEE.js.map} +1 -1
  53. package/dist/{chunk-SRNCN4X2.js → chunk-C7WBGSBV.js} +4 -4
  54. package/dist/{chunk-SRNCN4X2.js.map → chunk-C7WBGSBV.js.map} +1 -1
  55. package/dist/chunk-COJIL7G4.js +505 -0
  56. package/dist/chunk-COJIL7G4.js.map +1 -0
  57. package/dist/{chunk-X54YR4AW.js → chunk-CQJH4G2K.js} +2 -2
  58. package/dist/{chunk-X54YR4AW.js.map → chunk-CQJH4G2K.js.map} +1 -1
  59. package/dist/{chunk-WJLYL6RY.js → chunk-F6AA42GW.js} +5 -5
  60. package/dist/{chunk-WJLYL6RY.js.map → chunk-F6AA42GW.js.map} +1 -1
  61. package/dist/{chunk-EZVZDCHZ.js → chunk-FPHNJE4M.js} +102 -32
  62. package/dist/chunk-FPHNJE4M.js.map +1 -0
  63. package/dist/{chunk-EELKR2WP.js → chunk-HT35SQZD.js} +15 -14
  64. package/dist/chunk-HT35SQZD.js.map +1 -0
  65. package/dist/chunk-HU5HVKY7.js +285 -0
  66. package/dist/chunk-HU5HVKY7.js.map +1 -0
  67. package/dist/{chunk-HPVMTX6M.js → chunk-I37INEWE.js} +47 -12
  68. package/dist/chunk-I37INEWE.js.map +1 -0
  69. package/dist/{chunk-WJCQFNF6.js → chunk-I7TWVK6N.js} +3 -3
  70. package/dist/{chunk-WJCQFNF6.js.map → chunk-I7TWVK6N.js.map} +1 -1
  71. package/dist/{chunk-D6UBEYQH.js → chunk-IF6IA3PZ.js} +6 -6
  72. package/dist/chunk-IF6IA3PZ.js.map +1 -0
  73. package/dist/{chunk-DJD36HC5.js → chunk-IP2IPMEH.js} +7 -7
  74. package/dist/{chunk-DJD36HC5.js.map → chunk-IP2IPMEH.js.map} +1 -1
  75. package/dist/{chunk-ODDATIII.js → chunk-J24CY3PF.js} +8 -8
  76. package/dist/chunk-J24CY3PF.js.map +1 -0
  77. package/dist/{chunk-YZ3N7IUU.js → chunk-JTOWA6RS.js} +60 -19
  78. package/dist/{chunk-YZ3N7IUU.js.map → chunk-JTOWA6RS.js.map} +1 -1
  79. package/dist/{chunk-L5XUEC2W.js → chunk-MKRWN7XP.js} +4 -4
  80. package/dist/{chunk-L5XUEC2W.js.map → chunk-MKRWN7XP.js.map} +1 -1
  81. package/dist/{chunk-TDQ2ERCM.js → chunk-MRHVPQNO.js} +519 -86
  82. package/dist/chunk-MRHVPQNO.js.map +1 -0
  83. package/dist/{chunk-A2ULN3KX.js → chunk-MWXYN6NY.js} +2 -2
  84. package/dist/{chunk-A2ULN3KX.js.map → chunk-MWXYN6NY.js.map} +1 -1
  85. package/dist/{chunk-T2TQAH2X.js → chunk-N46LQR46.js} +74 -18
  86. package/dist/chunk-N46LQR46.js.map +1 -0
  87. package/dist/{chunk-CD7SVH6W.js → chunk-PYJS5K7V.js} +3 -3
  88. package/dist/{chunk-CD7SVH6W.js.map → chunk-PYJS5K7V.js.map} +1 -1
  89. package/dist/{chunk-K5LVU2MN.js → chunk-QG6GHTRM.js} +4 -4
  90. package/dist/{chunk-K5LVU2MN.js.map → chunk-QG6GHTRM.js.map} +1 -1
  91. package/dist/{chunk-RD6N2D7I.js → chunk-R4I3VBSS.js} +2 -2
  92. package/dist/{chunk-RD6N2D7I.js.map → chunk-R4I3VBSS.js.map} +1 -1
  93. package/dist/{chunk-JY7GVNYU.js → chunk-RO6VOM6Z.js} +15 -15
  94. package/dist/{chunk-JY7GVNYU.js.map → chunk-RO6VOM6Z.js.map} +1 -1
  95. package/dist/{chunk-B4X2N7JQ.js → chunk-RPZVHXQ3.js} +12 -12
  96. package/dist/chunk-RPZVHXQ3.js.map +1 -0
  97. package/dist/{chunk-KC6HGWXN.js → chunk-TIIXG3PN.js} +3 -3
  98. package/dist/{chunk-KC6HGWXN.js.map → chunk-TIIXG3PN.js.map} +1 -1
  99. package/dist/{chunk-CKICWXMU.js → chunk-UQ33Y4DM.js} +139 -10
  100. package/dist/chunk-UQ33Y4DM.js.map +1 -0
  101. package/dist/{chunk-2NOLF7B2.js → chunk-V257LUBM.js} +16 -7
  102. package/dist/chunk-V257LUBM.js.map +1 -0
  103. package/dist/{chunk-N5P2WBUL.js → chunk-VIM3PWZM.js} +3 -3
  104. package/dist/{chunk-N5P2WBUL.js.map → chunk-VIM3PWZM.js.map} +1 -1
  105. package/dist/{chunk-3KMREAR2.js → chunk-VJ7NU7GD.js} +22 -22
  106. package/dist/{chunk-3KMREAR2.js.map → chunk-VJ7NU7GD.js.map} +1 -1
  107. package/dist/{chunk-6HK6RUFM.js → chunk-VSZWNUZC.js} +3 -3
  108. package/dist/{chunk-6HK6RUFM.js.map → chunk-VSZWNUZC.js.map} +1 -1
  109. package/dist/{chunk-MQIRRN76.js → chunk-W4Q6CKJ5.js} +6 -6
  110. package/dist/chunk-W4Q6CKJ5.js.map +1 -0
  111. package/dist/{chunk-FHIMIXT3.js → chunk-WG6V4ISA.js} +34 -15
  112. package/dist/chunk-WG6V4ISA.js.map +1 -0
  113. package/dist/{chunk-DA2MCPFN.js → chunk-WOIRYY5L.js} +110 -37
  114. package/dist/chunk-WOIRYY5L.js.map +1 -0
  115. package/dist/{chunk-JJ7LDI3S.js → chunk-WST6UITC.js} +6 -6
  116. package/dist/{chunk-JJ7LDI3S.js.map → chunk-WST6UITC.js.map} +1 -1
  117. package/dist/{chunk-FV2MSBVA.js → chunk-X4ZZTHU3.js} +4 -4
  118. package/dist/{chunk-FV2MSBVA.js.map → chunk-X4ZZTHU3.js.map} +1 -1
  119. package/dist/{chunk-PZ6NF5DE.js → chunk-XJVBUDDJ.js} +5 -5
  120. package/dist/{chunk-PZ6NF5DE.js.map → chunk-XJVBUDDJ.js.map} +1 -1
  121. package/dist/{chunk-VKPBUPH7.js → chunk-XM6T2AZ2.js} +36 -11
  122. package/dist/chunk-XM6T2AZ2.js.map +1 -0
  123. package/dist/{chunk-YU6AURJY.js → chunk-XWOPZW26.js} +3 -3
  124. package/dist/{chunk-YU6AURJY.js.map → chunk-XWOPZW26.js.map} +1 -1
  125. package/dist/{chunk-LW7ZI6EQ.js → chunk-Y5MBW5EU.js} +3 -3
  126. package/dist/chunk-Y5MBW5EU.js.map +1 -0
  127. package/dist/{chunk-24AXETE3.js → chunk-ZQSOJH6I.js} +36 -18
  128. package/dist/chunk-ZQSOJH6I.js.map +1 -0
  129. package/dist/{chunk-JYWW32JI.js → chunk-ZX4KRWRB.js} +17 -5
  130. package/dist/chunk-ZX4KRWRB.js.map +1 -0
  131. package/dist/claude-code-2PU7TITZ.js +10 -0
  132. package/dist/claude-code-2PU7TITZ.js.map +1 -0
  133. package/dist/cli/index.js +574 -492
  134. package/dist/cli/index.js.map +1 -1
  135. package/dist/cli/src/agent-checks.d.ts +5 -0
  136. package/dist/cli/src/agent-checks.d.ts.map +1 -1
  137. package/dist/cli/src/agent-pins.d.ts +18 -0
  138. package/dist/cli/src/agent-pins.d.ts.map +1 -0
  139. package/dist/cli/src/commands/catalog.d.ts +6 -0
  140. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  141. package/dist/cli/src/commands/config.d.ts.map +1 -1
  142. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  143. package/dist/cli/src/commands/flow.d.ts +8 -8
  144. package/dist/cli/src/commands/flow.d.ts.map +1 -1
  145. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  146. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  147. package/dist/cli/src/commands/library-index.d.ts +17 -5
  148. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  149. package/dist/cli/src/commands/library-publish.d.ts +3 -0
  150. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  151. package/dist/cli/src/commands/migrate-assets.d.ts +2 -0
  152. package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
  153. package/dist/cli/src/commands/migrate.d.ts.map +1 -1
  154. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  155. package/dist/cli/src/commands/plugin/claude-code.d.ts +6 -0
  156. package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
  157. package/dist/cli/src/commands/plugin/codex.d.ts +19 -4
  158. package/dist/cli/src/commands/plugin/codex.d.ts.map +1 -1
  159. package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
  160. package/dist/cli/src/commands/project.d.ts +6 -3
  161. package/dist/cli/src/commands/project.d.ts.map +1 -1
  162. package/dist/cli/src/commands/providers.d.ts +13 -0
  163. package/dist/cli/src/commands/providers.d.ts.map +1 -1
  164. package/dist/cli/src/commands/run.d.ts.map +1 -1
  165. package/dist/cli/src/commands/serve-preflight.d.ts +23 -0
  166. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  167. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  168. package/dist/cli/src/commands/update.d.ts.map +1 -1
  169. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  170. package/dist/cli/src/driver-error.d.ts +7 -0
  171. package/dist/cli/src/driver-error.d.ts.map +1 -1
  172. package/dist/cli/src/flow-discovery.d.ts +69 -53
  173. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  174. package/dist/cli/src/plugin-store/index.d.ts +6 -2
  175. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  176. package/dist/cli/src/skill-checks.d.ts +32 -1
  177. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  178. package/dist/connectors/config.js +3 -3
  179. package/dist/connectors/index.js +18 -16
  180. package/dist/{connectors-QL4GBMH3.js → connectors-RBGZ3M7G.js} +21 -19
  181. package/dist/{connectors-QL4GBMH3.js.map → connectors-RBGZ3M7G.js.map} +1 -1
  182. package/dist/core/discovery.js +1 -1
  183. package/dist/core/index.js +5 -5
  184. package/dist/core/publish-manifest.js +1 -1
  185. package/dist/core/runtime-assets.js +3 -3
  186. package/dist/core/src/asset-roots.d.ts +14 -0
  187. package/dist/core/src/asset-roots.d.ts.map +1 -1
  188. package/dist/core/src/bind.d.ts +33 -14
  189. package/dist/core/src/bind.d.ts.map +1 -1
  190. package/dist/core/src/discovery.d.ts +1 -1
  191. package/dist/core/src/index.d.ts +4 -4
  192. package/dist/core/src/index.d.ts.map +1 -1
  193. package/dist/core/src/lock.d.ts +8 -0
  194. package/dist/core/src/lock.d.ts.map +1 -1
  195. package/dist/core/src/publish-manifest.d.ts +45 -10
  196. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  197. package/dist/core/src/workspace-config.d.ts +18 -1
  198. package/dist/core/src/workspace-config.d.ts.map +1 -1
  199. package/dist/core/workspace-config.js +2 -2
  200. package/dist/deploy/index.js +5 -5
  201. package/dist/discovery/index.js +3 -3
  202. package/dist/discovery/src/discover-manifest.d.ts +1 -1
  203. package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
  204. package/dist/discovery/src/discover.d.ts.map +1 -1
  205. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  206. package/dist/{ensure-sources-CEFODJCE.js → ensure-sources-GKVLE6L5.js} +15 -15
  207. package/dist/{ensure-sources-CEFODJCE.js.map → ensure-sources-GKVLE6L5.js.map} +1 -1
  208. package/dist/factory-assets/connectors/box.js +18 -16
  209. package/dist/factory-assets/connectors/deploy.js +18 -16
  210. package/dist/factory-assets/connectors/devserver.js +18 -16
  211. package/dist/factory-assets/connectors/flow/adapter.js +18 -16
  212. package/dist/factory-assets/connectors/flow/engine/loader.d.ts +1 -1
  213. package/dist/factory-assets/connectors/flow/engine/locate.d.ts +8 -5
  214. package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -1
  215. package/dist/factory-assets/connectors/flow/engine.js +6 -6
  216. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  217. package/dist/factory-assets/connectors/flow/run-flow.js +19 -17
  218. package/dist/factory-assets/connectors/flow.js +18 -16
  219. package/dist/factory-assets/connectors/git.js +18 -16
  220. package/dist/factory-assets/connectors/gmail.js +18 -16
  221. package/dist/factory-assets/connectors/googledrive.js +18 -16
  222. package/dist/factory-assets/connectors/local.js +18 -16
  223. package/dist/factory-assets/connectors/mattermost.js +18 -16
  224. package/dist/factory-assets/connectors/memory.js +18 -16
  225. package/dist/factory-assets/connectors/minio.js +18 -16
  226. package/dist/factory-assets/connectors/postgres.js +18 -16
  227. package/dist/factory-assets/connectors/s3.js +18 -16
  228. package/dist/factory-assets/connectors/sharepoint.js +18 -16
  229. package/dist/factory-assets/connectors/sqlite.js +18 -16
  230. package/dist/factory-assets/connectors/static-server.js +18 -16
  231. package/dist/factory-assets/connectors/tunnel.js +18 -16
  232. package/dist/factory-assets/connectors/webdav.js +18 -16
  233. package/dist/factory-assets/connectors/xstate/adapter.d.ts +1 -1
  234. package/dist/factory-assets/connectors/xstate/adapter.d.ts.map +1 -1
  235. package/dist/factory-assets/connectors/xstate-store.js +18 -16
  236. package/dist/factory-assets/connectors/xstate.js +18 -16
  237. package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
  238. package/dist/{flows-BHY73K3O.js → flows-W2FB7WIM.js} +8 -8
  239. package/dist/{flows-BHY73K3O.js.map → flows-W2FB7WIM.js.map} +1 -1
  240. package/dist/{helpers-R22QNPFN.js → helpers-34QNVIGB.js} +15 -15
  241. package/dist/{helpers-R22QNPFN.js.map → helpers-34QNVIGB.js.map} +1 -1
  242. package/dist/library/index.js +9 -9
  243. package/dist/library/install.js +2 -2
  244. package/dist/library/src/index.d.ts +1 -1
  245. package/dist/library/src/index.d.ts.map +1 -1
  246. package/dist/library/src/manifest-writer.d.ts +13 -0
  247. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  248. package/dist/{library-publish-VBE3X2TH.js → library-publish-RUQTKTJU.js} +125 -48
  249. package/dist/library-publish-RUQTKTJU.js.map +1 -0
  250. package/dist/model-endpoint/index.js +8 -8
  251. package/dist/{open-library-JP5TC5UX.js → open-library-PVTIUQUF.js} +18 -18
  252. package/dist/{open-library-JP5TC5UX.js.map → open-library-PVTIUQUF.js.map} +1 -1
  253. package/dist/{open-registry-RBELV5YH.js → open-registry-SOIS3TA2.js} +13 -13
  254. package/dist/{open-registry-RBELV5YH.js.map → open-registry-SOIS3TA2.js.map} +1 -1
  255. package/dist/{paths-BFM6K2QO.js → paths-JLNX7Y4X.js} +8 -8
  256. package/dist/{paths-BFM6K2QO.js.map → paths-JLNX7Y4X.js.map} +1 -1
  257. package/dist/{plugin-store-QOQDM24E.js → plugin-store-G2GWAHSD.js} +8 -8
  258. package/dist/{plugin-store-QOQDM24E.js.map → plugin-store-G2GWAHSD.js.map} +1 -1
  259. package/dist/{project-6ETXGQWD.js → project-EX47PUBN.js} +38 -37
  260. package/dist/{project-6ETXGQWD.js.map → project-EX47PUBN.js.map} +1 -1
  261. package/dist/resolver/index.js +5 -5
  262. package/dist/runner/index.js +30 -29
  263. package/dist/runner/src/agents/instances.d.ts.map +1 -1
  264. package/dist/runner/src/composition/compile.d.ts +11 -0
  265. package/dist/runner/src/composition/compile.d.ts.map +1 -1
  266. package/dist/runner/src/composition/index.d.ts +1 -1
  267. package/dist/runner/src/composition/index.d.ts.map +1 -1
  268. package/dist/runner/src/serve.d.ts.map +1 -1
  269. package/dist/runner/src/turn-end-contract.d.ts +55 -0
  270. package/dist/runner/src/turn-end-contract.d.ts.map +1 -0
  271. package/dist/runner/src/turn-scheduler.d.ts +5 -0
  272. package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
  273. package/dist/sdk/asset-manager.js +12 -12
  274. package/dist/sdk/bridge.js +15 -13
  275. package/dist/sdk/core.js +5 -5
  276. package/dist/sdk/flow.js +6 -6
  277. package/dist/sdk/index.js +30 -29
  278. package/dist/sdk/index.js.map +1 -1
  279. package/dist/sdk/resolver.js +5 -5
  280. package/dist/sdk/runner.js +30 -29
  281. package/dist/sdk/transport/ws/server.js +6 -6
  282. package/dist/sdk/transport/ws.js +6 -6
  283. package/dist/sdk/transport.js +6 -6
  284. package/dist/serve-preflight-QXRKGOI5.js +108 -0
  285. package/dist/serve-preflight-QXRKGOI5.js.map +1 -0
  286. package/dist/{setup-JQDTYPSD.js → setup-AFZQNGKA.js} +25 -23
  287. package/dist/setup-AFZQNGKA.js.map +1 -0
  288. package/dist/{skills-RSZVUIYZ.js → skills-YYYC6D5X.js} +8 -8
  289. package/dist/{skills-RSZVUIYZ.js.map → skills-YYYC6D5X.js.map} +1 -1
  290. package/dist/{source-FPLHY3DP.js → source-DGPCT5IC.js} +40 -39
  291. package/dist/{source-FPLHY3DP.js.map → source-DGPCT5IC.js.map} +1 -1
  292. package/dist/{source-manifest-publish-LY4H63VA.js → source-manifest-publish-AGJ63JF2.js} +42 -41
  293. package/dist/source-manifest-publish-AGJ63JF2.js.map +1 -0
  294. package/dist/transport/index.js +6 -6
  295. package/dist/transport/src/ws/server.d.ts +1 -1
  296. package/dist/transport/src/ws/server.d.ts.map +1 -1
  297. package/dist/transport/ws/server.js +6 -6
  298. package/dist/transport/ws.js +6 -6
  299. package/dist/tui/index.js +30 -29
  300. package/dist/tui/index.js.map +1 -1
  301. package/dist/types/manifests.js +1 -1
  302. package/dist/types/src/manifests/scaffold-body.d.ts +6 -3
  303. package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
  304. package/dist/workspace-plugin/adapters/mcp.js +22 -20
  305. package/dist/workspace-plugin/adapters/omp.js +14 -14
  306. package/dist/workspace-plugin/index.js +1 -1
  307. package/package.json +1 -1
  308. package/dist/chunk-24AXETE3.js.map +0 -1
  309. package/dist/chunk-2NOLF7B2.js.map +0 -1
  310. package/dist/chunk-B4X2N7JQ.js.map +0 -1
  311. package/dist/chunk-CKICWXMU.js.map +0 -1
  312. package/dist/chunk-CKNIYIV2.js.map +0 -1
  313. package/dist/chunk-D6UBEYQH.js.map +0 -1
  314. package/dist/chunk-DA2MCPFN.js.map +0 -1
  315. package/dist/chunk-EELKR2WP.js.map +0 -1
  316. package/dist/chunk-EZVZDCHZ.js.map +0 -1
  317. package/dist/chunk-FHIMIXT3.js.map +0 -1
  318. package/dist/chunk-HPVMTX6M.js.map +0 -1
  319. package/dist/chunk-JYWW32JI.js.map +0 -1
  320. package/dist/chunk-L6IFN6ER.js.map +0 -1
  321. package/dist/chunk-LW7ZI6EQ.js.map +0 -1
  322. package/dist/chunk-MQIRRN76.js.map +0 -1
  323. package/dist/chunk-ODDATIII.js.map +0 -1
  324. package/dist/chunk-T2TQAH2X.js.map +0 -1
  325. package/dist/chunk-TDQ2ERCM.js.map +0 -1
  326. package/dist/chunk-V4RV2NJF.js.map +0 -1
  327. package/dist/chunk-VKPBUPH7.js.map +0 -1
  328. package/dist/library-publish-VBE3X2TH.js.map +0 -1
  329. package/dist/serve-preflight-BTGTZUDN.js +0 -60
  330. package/dist/serve-preflight-BTGTZUDN.js.map +0 -1
  331. package/dist/setup-JQDTYPSD.js.map +0 -1
  332. package/dist/source-manifest-publish-LY4H63VA.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,86 +1,88 @@
1
1
  #!/usr/bin/env node
2
+ import { makeValidateCommand, scanIdentities, isRecord } from '../chunk-ZQSOJH6I.js';
2
3
  import { storeNotInstallableReason } from '../chunk-PUK7TQT4.js';
3
- import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-FHIMIXT3.js';
4
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportRewritten, reportReplaced, reportRelocked, reportMoved, reportStoreNotChecked, globalProblems, editedConventionFiles, supportsInstallManifest, REF_HINT, reportInstalledSoftDeps } from '../chunk-EZVZDCHZ.js';
4
+ import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError, removeProviderEntry } from '../chunk-WG6V4ISA.js';
5
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, pinComposedAgents, reportRewritten, reportReplaced, reportRelocked, reportMoved, reportStoreNotChecked, globalProblems, editedConventionFiles, supportsInstallManifest, REF_HINT, reportInstalledSoftDeps } from '../chunk-FPHNJE4M.js';
5
6
  import { createSpinner } from '../chunk-NESV47MF.js';
6
- import { makeSourceCommand, syncProjectSources, divergedSourceClones } from '../chunk-JY7GVNYU.js';
7
- import { loadDeclaredPlugins } from '../chunk-JYWW32JI.js';
8
- import { makeValidateCommand, scanIdentities, isRecord } from '../chunk-24AXETE3.js';
9
- import { getStoreConfig, storeFetch, isStoreAuthenticated, getStoreToken } from '../chunk-E5YNGE3I.js';
10
- import { deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, exitOnLibrarySymlinks, resolveLibraryPublisherDetailed, getStoreIdentity, warnLibraryNameFallback, indexLibrary, warnIgnoredDomainFiles, removedDomainOption, rejectRemovedDomainOption, requireValidPublisherOrExit, exitOnManifestPublisherProblems, registerLibraryAsset, DOMAIN_REMOVED_HINT, reportLibrarySymlinks, checkAsset, manifestPublisherProblems, exitOnManifestRootProblems, manifestRequiresProblems, composeRefContext, registeredAssetKeys, checkAssetFile, assetEntryRef, duplicateAssetMessage, unresolvedManifestDependencies, warnLegacyBundleFiles, checkComposeKinds } from '../chunk-DA2MCPFN.js';
11
- import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-FV2MSBVA.js';
12
- import { AI_RESOURCES } from '../chunk-CKBCX3HQ.js';
13
- import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, parseHarnessFilter, requireProjectConfig, deferredWarnings, warnPlaceholderBodies, warnFilesOnlyDelegates, reportLegacyOmpCopies, logNoProject, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-K5LVU2MN.js';
14
- import { getKindRegistry, getKnownKinds } from '../chunk-WJLYL6RY.js';
7
+ import { getStoreConfig, storeFetch, isStoreAuthenticated, getStoreToken } from '../chunk-25ZVWL2R.js';
8
+ import { makeSourceCommand, syncProjectSources, divergedSourceClones } from '../chunk-RO6VOM6Z.js';
9
+ import { deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, exitOnLibrarySymlinks, resolveLibraryPublisherDetailed, getStoreIdentity, warnLibraryNameFallback, indexLibrary, warnIgnoredDomainFiles, removedDomainOption, rejectRemovedDomainOption, requireValidPublisherOrExit, exitOnManifestPublisherProblems, findAssetManifestFile, checkAssetFile, registerLibraryAsset, DOMAIN_REMOVED_HINT, reportLibrarySymlinks, checkAsset, manifestPublisherProblems, exitOnManifestRootProblems, manifestRequiresProblems, composeRefContext, registeredAssetKeys, assetEntryRef, duplicateAssetMessage, unresolvedManifestDependencies, findEntryManifestFile, unheldRequiresOfFile, warnLegacyBundleFiles, checkComposeKinds } from '../chunk-WOIRYY5L.js';
10
+ import { openCatalogSource, LocalCatalogDisabledError, openLibraryManager, openLibrary } from '../chunk-X4ZZTHU3.js';
11
+ import { AI_RESOURCES } from '../chunk-2PBSAH3Z.js';
12
+ import { loadDeclaredPlugins } from '../chunk-ZX4KRWRB.js';
13
+ import { status, enable, disable, install, uninstall } from '../chunk-HU5HVKY7.js';
14
+ import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, parseHarnessFilter, requireProjectConfig, deferredWarnings, warnPlaceholderBodies, warnFilesOnlyDelegates, reportLegacyOmpCopies, logNoProject, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-QG6GHTRM.js';
15
+ import { getKindRegistry, getKnownKinds } from '../chunk-F6AA42GW.js';
15
16
  import { LocalSecretsProvider } from '../chunk-ILFGVSTJ.js';
16
- import { resolveInstanceAgentDir, instanceSessionOverrides, runAgentChat, isCompositionError, resolveSessionId, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition, manifestModelForDriver, instanceForSession, resolveAgentInstance, describeComposition, MarkdownStreamer, createFinalTextFallback } from '../chunk-V4RV2NJF.js';
17
- import { buildClaudePluginFiles } from '../chunk-ZNN7ONJX.js';
18
- import '../chunk-JJ7LDI3S.js';
19
- import '../chunk-RO2BPKXK.js';
20
- import '../chunk-RD6N2D7I.js';
17
+ import { resolveInstanceAgentDir, instanceSessionOverrides, runAgentChat, isCompositionError, resolveSessionId, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, hashAgentFiles, createCompositionContentSource, compileComposition, manifestModelForDriver, instanceForSession, resolveAgentInstance, describeComposition, MarkdownStreamer, createFinalTextFallback } from '../chunk-7NT4F6SR.js';
18
+ import '../chunk-A6SMCEEE.js';
19
+ import '../chunk-WST6UITC.js';
20
+ import '../chunk-2LSDMJI2.js';
21
+ import '../chunk-R4I3VBSS.js';
21
22
  import '../chunk-R6O6YWU7.js';
22
- import '../chunk-CD7SVH6W.js';
23
+ import '../chunk-PYJS5K7V.js';
23
24
  import '../chunk-6Z5KTFJT.js';
24
25
  import '../chunk-4ZTPYIBE.js';
25
26
  import '../chunk-X5YPJV4N.js';
26
- import '../chunk-PZ6NF5DE.js';
27
+ import '../chunk-XJVBUDDJ.js';
27
28
  import '../chunk-O7SG5PC2.js';
28
29
  import '../chunk-7QBNJTTQ.js';
29
30
  import '../chunk-O2SYFJWP.js';
30
- import '../chunk-LW7ZI6EQ.js';
31
+ import '../chunk-Y5MBW5EU.js';
31
32
  import '../chunk-32NA4TVC.js';
32
33
  import '../chunk-W3UDISS2.js';
33
34
  import '../chunk-PHRNUTSG.js';
34
- import '../chunk-GRKU3S5V.js';
35
- import { runFlow, resumeFlow } from '../chunk-ODDATIII.js';
35
+ import { runFlow, resumeFlow } from '../chunk-J24CY3PF.js';
36
36
  import '../chunk-4R6DROGN.js';
37
37
  import { parseSkillRequirements, validateRequirements } from '../chunk-FKU57Q5Q.js';
38
38
  import '../chunk-H6UVIKQ2.js';
39
- import '../chunk-EELKR2WP.js';
39
+ import '../chunk-HT35SQZD.js';
40
40
  import '../chunk-YIF2IJUA.js';
41
- import '../chunk-WJCQFNF6.js';
42
- import { checkModelProvider, checkDriverModel } from '../chunk-L6IFN6ER.js';
43
- import '../chunk-3KMREAR2.js';
44
- import '../chunk-6HK6RUFM.js';
41
+ import '../chunk-I7TWVK6N.js';
42
+ import { checkModelProvider, checkDriverModel } from '../chunk-7SCS64BG.js';
43
+ import '../chunk-COJIL7G4.js';
44
+ import '../chunk-VJ7NU7GD.js';
45
+ import '../chunk-VSZWNUZC.js';
45
46
  import '../chunk-LOO5CB5M.js';
46
47
  import '../chunk-AJ7EGIFR.js';
47
- import '../chunk-L5XUEC2W.js';
48
- import '../chunk-B4X2N7JQ.js';
48
+ import '../chunk-MKRWN7XP.js';
49
+ import '../chunk-2GXSSZAM.js';
50
+ import '../chunk-RPZVHXQ3.js';
49
51
  import '../chunk-YROR332M.js';
50
- import '../chunk-YU6AURJY.js';
51
- import { listDrivers, getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-X54YR4AW.js';
52
+ import '../chunk-XWOPZW26.js';
53
+ import { listDrivers, getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-CQJH4G2K.js';
52
54
  import '../chunk-6E6PKKAD.js';
53
55
  import '../chunk-IFGTRL2I.js';
54
- import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-D6UBEYQH.js';
56
+ import { loadFlow, flowLookupRoots, findFlowFileInRoots, loadAllFlowEntries } from '../chunk-IF6IA3PZ.js';
55
57
  import '../chunk-M3WPBTGJ.js';
56
58
  import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind } from '../chunk-7RGTAEG6.js';
57
59
  import '../chunk-Y56YIT6J.js';
58
- import { LibraryEntryError, AssetManager, parseRefTolerant, MissingManifestError, normalizeRepoUrl, FACTORY_SOURCE_URL, parseCanonicalLockKey } from '../chunk-TDQ2ERCM.js';
59
- import { CatalogHttpError, libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, isGitRepo, ensureGitRepo, conflictingAssetRoot, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, getStoreManifestsDir, assertValidLibraryName, unparsableAssetFiles, syncManifestWithDisk, storeManifestFile, getDefaultValue, isSecretPlaceholder } from '../chunk-VKPBUPH7.js';
60
- import { flowFileNameError, SEMVER_RE } from '../chunk-HPVMTX6M.js';
61
- import '../chunk-U2FI547Z.js';
60
+ import { LibraryEntryError, AssetManager, parseRefTolerant, MissingManifestError, parseCanonicalLockKey, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-MRHVPQNO.js';
61
+ import { CatalogHttpError, libraryDirMissing, missingLibraryDirMessage, cloneOrInitGitRepo, trackOriginBranch, stampManifestPublisher, isGitRepo, ensureGitRepo, conflictingAssetRoot, scanUnlistedAssets, setManifestPublisher, LIBRARY_OWNERSHIPS, assertManifestEditable, installLibraryAsset, getStoreManifestsDir, assertValidLibraryName, unparsableAssetFiles, syncManifestWithDisk, renamedLibraryName, storeManifestFile, getDefaultValue, isSecretPlaceholder } from '../chunk-XM6T2AZ2.js';
62
+ import { flowFileNameError, SEMVER_RE } from '../chunk-I37INEWE.js';
63
+ import '../chunk-7XSAW5OC.js';
62
64
  import '../chunk-BFMYYNDT.js';
63
65
  import '../chunk-3TXEJN4W.js';
64
66
  import '../chunk-ISHJITXJ.js';
65
67
  import '../chunk-LNFKL23K.js';
66
68
  import '../chunk-X3RMRJNR.js';
67
69
  import '../chunk-NUELZWCF.js';
68
- import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-YZ3N7IUU.js';
70
+ import { installTargetOf, SCAFFOLD_KINDS } from '../chunk-JTOWA6RS.js';
69
71
  import '../chunk-NOA6EJXE.js';
70
72
  import '../chunk-KTBKW2FI.js';
71
73
  import '../chunk-UQ6LFBPZ.js';
72
- import '../chunk-SRNCN4X2.js';
73
- import { effectiveComposes, validatePreset, validateAgent, composeSlotDiagnostics, agentDeprecationDiagnostics, SLOT_ID_PATTERN } from '../chunk-CKNIYIV2.js';
74
- import { loadSettings, globalSettingsPath, resolveSettings, projectSettingsPath, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, readLock, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, aiResourceRoots, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-T2TQAH2X.js';
74
+ import '../chunk-C7WBGSBV.js';
75
+ import { effectiveComposes, validatePreset, validateAgent, composeSlotDiagnostics, agentDeprecationDiagnostics, SLOT_ID_PATTERN } from '../chunk-335ENCCS.js';
76
+ import { loadSettings, globalSettingsPath, resolveSettings, projectSettingsPath, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, resolveSettingsWithSources, readLock, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-N46LQR46.js';
75
77
  import '../chunk-4GY63JU6.js';
76
- import { factoryAssetRoots } from '../chunk-KC6HGWXN.js';
78
+ import { factoryAssetRoots } from '../chunk-TIIXG3PN.js';
77
79
  import { deployedDir } from '../chunk-5TBFN46Z.js';
78
80
  import { DEFAULT_DRIVER_ID, DRIVER_DEFAULTS } from '../chunk-5BEFNLOR.js';
79
- import { findKindDirs } from '../chunk-A2ULN3KX.js';
80
- import { SourceEntryError, resolveSkWorkspaceConfig, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, effectiveAgentInstances, matchPin, coerceVersion, loadSkWorkspaceConfig, isWorkspaceConfigFilename } from '../chunk-2NOLF7B2.js';
81
+ import { findKindDirs } from '../chunk-MWXYN6NY.js';
82
+ import { SourceEntryError, LegacyKeyError, resolveSkWorkspaceConfig, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, resolveAgentDefinitionDir, effectiveAgentInstances, matchPin, coerceVersion, loadSkWorkspaceConfig, isWorkspaceConfigFilename } from '../chunk-V257LUBM.js';
81
83
  import { globalCacheRoot, globalSkaileDir, userConfigPath } from '../chunk-L5VSIPQD.js';
82
84
  import { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS, driverTargetForDriver } from '../chunk-IG5LZ3WU.js';
83
- import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, LIBRARY_GITIGNORE, librarySymlinkMessage, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-CKICWXMU.js';
85
+ import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, decodeSkaileManifest, LIBRARY_GITIGNORE, librarySymlinkMessage, isNonAssetPath, isNonAssetDir, encodeSkaileManifest } from '../chunk-UQ33Y4DM.js';
84
86
  import { pluginTitle } from '../chunk-RVRB27AN.js';
85
87
  import { dedupeRequirements, parseFrontmatter, scanDirectory, parseRequires } from '../chunk-GOCWM7FN.js';
86
88
  import { parseAssetRef, isValidPublisher, PUBLISHER_HINT, isValidAssetName, ASSET_NAME_HINT, depToStr, assetRefToStr, slugifyAssetName, parseAssetRefLoose } from '../chunk-WDXZA7QW.js';
@@ -90,8 +92,8 @@ import { parseModelRef, resolveEntryBaseUrl } from '../chunk-MJHSLODD.js';
90
92
  import '../chunk-C3CAXQMA.js';
91
93
  import { registerLogStore, LogStore, StdoutSink } from '../chunk-BOFL7GIF.js';
92
94
  import '../chunk-NSBPE2FW.js';
93
- import * as fs9 from 'fs';
94
- import fs9__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
95
+ import * as fs8 from 'fs';
96
+ import fs8__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
95
97
  import * as path18 from 'path';
96
98
  import path18__default, { resolve, join } from 'path';
97
99
  import { fileURLToPath } from 'url';
@@ -231,7 +233,7 @@ async function runSearch(kind, query, opts) {
231
233
  }
232
234
  }
233
235
  async function searchIndex(query, kind) {
234
- const { openLibrary: openLibrary2 } = await import('../open-library-JP5TC5UX.js');
236
+ const { openLibrary: openLibrary2 } = await import('../open-library-PVTIUQUF.js');
235
237
  const library = await openLibrary2();
236
238
  try {
237
239
  const { libraryDirMissing: libraryDirMissing2 } = await import('../library/index.js');
@@ -383,14 +385,14 @@ async function expandCompetingOrigins(entries, projectDir) {
383
385
  }
384
386
  async function searchLocal(query, kind, opts, showStore, airGapped) {
385
387
  const projectDir = path18__default.resolve(opts.projectDir);
386
- const { restoreSourceReaders } = await import('../source-FPLHY3DP.js');
388
+ const { restoreSourceReaders } = await import('../source-DGPCT5IC.js');
387
389
  for (const name of await restoreSourceReaders(projectDir)) {
388
390
  logInfo(`Re-registered source "${name}" (its library entry was removed elsewhere).`);
389
391
  }
390
392
  const factory = await searchFactory(projectDir, query, kind);
391
393
  let entries = unionEntries(await searchIndex(query, kind), factory);
392
394
  if (entries.length === 0 && !query && !kind && !airGapped) {
393
- const { autoSyncForSearch } = await import('../source-FPLHY3DP.js');
395
+ const { autoSyncForSearch } = await import('../source-DGPCT5IC.js');
394
396
  if (await autoSyncForSearch(projectDir)) {
395
397
  entries = unionEntries(await searchIndex(query, kind), factory);
396
398
  }
@@ -504,7 +506,7 @@ async function searchStore(query, kind, opts, airGapped) {
504
506
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
505
507
  return;
506
508
  }
507
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-JP5TC5UX.js');
509
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PVTIUQUF.js');
508
510
  try {
509
511
  const remote = await openCatalogSource2({ projectDir: path18__default.resolve(opts.projectDir) });
510
512
  const assets = await remote.listAssets(kind ? { kind } : {});
@@ -673,6 +675,7 @@ function makeAddCommand() {
673
675
  });
674
676
  spinner.stop("Done");
675
677
  warnings.flush();
678
+ if (!am2.global) await pinComposedAgents(am2.projectDir);
676
679
  await promptSoftDepAdds(am2, ref, {
677
680
  isTTY: !!process.stdin.isTTY,
678
681
  link: opts.link,
@@ -685,10 +688,23 @@ function makeAddCommand() {
685
688
  onHint: (line) => logInfo(S.dim(line))
686
689
  });
687
690
  if (added.length === 0) {
688
- const kind = parseAssetRef(ref).kind;
691
+ const parsedRef = parseAssetRef(ref);
692
+ const kind = parsedRef.kind;
689
693
  const presetNote = presetAddNote(ref, presets);
694
+ const mcpFootprint = kind === "mcp-server" ? await am2.mcpRenderFootprint(parsedRef.name) : void 0;
690
695
  if (presetNote) logInfo(presetNote);
691
- else if (!installTargetOf(getKindRegistry(), kind))
696
+ else if (mcpFootprint?.written)
697
+ logInfo(
698
+ `Wrote ${S.cmd(`${mcpFootprint.file} entry "${parsedRef.name}"`)}${mcpFootprint.payloadDir ? ` and ${S.cmd(mcpFootprint.payloadDir)}` : ""}`
699
+ );
700
+ else if (mcpFootprint) {
701
+ const why = (await am2.mcpNotices()).find(
702
+ (n) => n.kind === "skipped" && n.id === parsedRef.name
703
+ );
704
+ logInfo(
705
+ `Recorded in skaile.yaml; ${mcpFootprint.file} has no entry for "${parsedRef.name}"${why?.reason ? ` (${why.reason})` : ""}.`
706
+ );
707
+ } else if (!installTargetOf(getKindRegistry(), kind))
692
708
  logInfo(
693
709
  `Recorded in skaile.yaml (store bytes are fetched + verified into .skaile/cache/store). ${kind} assets are not deployed into the driver target \u2014 they are composed when skaile runs the agent.`
694
710
  );
@@ -949,12 +965,21 @@ function readTextOrEmpty(file) {
949
965
  return "";
950
966
  }
951
967
  }
952
- function lockedVersionOf(projectDir, kind, name) {
968
+ function infoShowsLocked(locked, latest) {
969
+ return locked !== void 0 && !locked.startsWith("0.0.0-sha") && latest !== void 0 && latest !== locked;
970
+ }
971
+ function infoVersionLine(locked, latest) {
972
+ if (infoShowsLocked(locked, latest)) return `locked ${locked} (latest ${latest})`;
973
+ return latest || void 0;
974
+ }
975
+ function lockedVersionOf(projectDir, kind, name, publisher) {
953
976
  try {
954
977
  const lock = readLock(path18__default.join(projectDir, "skaile.lock.yaml"));
955
978
  for (const key of Object.keys(lock?.assets ?? {})) {
956
979
  const id = parseCanonicalLockKey(key);
957
- if (id.kind === kind && id.name === name && id.version) return id.version;
980
+ if (id.kind !== kind || id.name !== name || !id.version) continue;
981
+ if (publisher && id.publisher && id.publisher !== publisher.replace(/^@/, "")) continue;
982
+ return id.version;
958
983
  }
959
984
  } catch {
960
985
  }
@@ -989,7 +1014,7 @@ async function resolveInfoEntry(am2, ref, opts) {
989
1014
  return { entry: match ?? deployed };
990
1015
  }
991
1016
  const lookup = opts.storeLookup ?? (async (filter) => {
992
- const { resolveCatalogSource } = await import('../open-library-JP5TC5UX.js');
1017
+ const { resolveCatalogSource } = await import('../open-library-PVTIUQUF.js');
993
1018
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
994
1019
  try {
995
1020
  return await source.listAssets(filter);
@@ -1005,7 +1030,7 @@ async function resolveInfoEntry(am2, ref, opts) {
1005
1030
  );
1006
1031
  return { entry: hit ? catalogAssetToEntry(hit) : null };
1007
1032
  } catch (err) {
1008
- const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-JP5TC5UX.js');
1033
+ const { LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PVTIUQUF.js');
1009
1034
  const storeNote = err instanceof Error ? err.message : String(err);
1010
1035
  const disabled = err instanceof LocalCatalogDisabledError2 || /catalog\.url/i.test(storeNote);
1011
1036
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -1041,10 +1066,19 @@ function makeInfoCommand() {
1041
1066
  console.log(` ${S.heading(entry.name)}`);
1042
1067
  console.log(` ${S.rule(40)}`);
1043
1068
  console.log(` kind: ${kindColor(entry.kind)}`);
1044
- if (entry.version) console.log(` version: ${entry.version}`);
1069
+ const infoLocked = lockedVersionOf(
1070
+ projectDir,
1071
+ entry.kind,
1072
+ entry.name,
1073
+ parseRefTolerant(ref)?.publisher
1074
+ );
1075
+ const showLocked = infoShowsLocked(infoLocked, entry.version);
1076
+ const infoVersionText = infoVersionLine(infoLocked, entry.version);
1077
+ if (infoVersionText) console.log(` version: ${infoVersionText}`);
1045
1078
  if (entry.description) console.log(` description: ${entry.description}`);
1046
1079
  if (entry.publisher) console.log(` repository: ${S.dim(entry.publisher)}`);
1047
- console.log(` source: ${S.dim(entry.source)}`);
1080
+ const infoSource = showLocked && entry.source.endsWith(`#${entry.version}`) ? `${entry.source.slice(0, -`#${entry.version}`.length)}#${infoLocked}` : entry.source;
1081
+ console.log(` source: ${S.dim(infoSource)}`);
1048
1082
  if (entry.kind === "mcp-server") {
1049
1083
  const skipped = (await am2.mcpNotices()).find(
1050
1084
  (n) => n.kind === "skipped" && (n.id === entry.name || n.id.endsWith(`/${entry.name}`))
@@ -1118,13 +1152,17 @@ function makeDoctorCommand() {
1118
1152
  });
1119
1153
  const { gaps } = await am2.projectState();
1120
1154
  const edited = await editedConventionFiles(path18__default.resolve(opts.projectDir));
1121
- const notices = await am2.mcpNotices();
1155
+ const notices = [
1156
+ ...(await am2.mcpNotices()).map((n) => n.text),
1157
+ // A library that went back past the lock is no drift either (p1257).
1158
+ ...await am2.libraryOlderNotices()
1159
+ ];
1122
1160
  if (gaps.length === 0 && edited.length === 0) {
1123
1161
  logOk("No missing dependencies.");
1124
- for (const n of notices) logWarn(n.text);
1162
+ for (const n of notices) logWarn(n);
1125
1163
  return;
1126
1164
  }
1127
- for (const n of notices) logWarn(n.text);
1165
+ for (const n of notices) logWarn(n);
1128
1166
  process.exitCode = 1;
1129
1167
  for (const e of edited) logErr(e);
1130
1168
  for (const g of gaps) if (g.type !== "requires") logErr(g.message);
@@ -1156,16 +1194,16 @@ function claudeSkillRoots() {
1156
1194
  }
1157
1195
  function resolveImportSource(nameOrPath) {
1158
1196
  const asPath = path18.resolve(nameOrPath);
1159
- if (fs9.existsSync(asPath)) {
1160
- const dir = fs9.statSync(asPath).isDirectory() ? asPath : path18.dirname(asPath);
1197
+ if (fs8.existsSync(asPath)) {
1198
+ const dir = fs8.statSync(asPath).isDirectory() ? asPath : path18.dirname(asPath);
1161
1199
  const skillFile = path18.join(dir, "SKILL.md");
1162
- if (fs9.existsSync(skillFile)) return { dir, skillFile, via: "path" };
1200
+ if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "path" };
1163
1201
  }
1164
1202
  if (!nameOrPath.includes(path18.sep) && !nameOrPath.startsWith(".")) {
1165
1203
  for (const root of claudeSkillRoots()) {
1166
1204
  const dir = path18.join(root, nameOrPath);
1167
1205
  const skillFile = path18.join(dir, "SKILL.md");
1168
- if (fs9.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
1206
+ if (fs8.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
1169
1207
  }
1170
1208
  }
1171
1209
  return null;
@@ -1304,7 +1342,7 @@ function makeAssetCommand() {
1304
1342
  );
1305
1343
  process.exit(1);
1306
1344
  }
1307
- const rawSkill = fs9.readFileSync(src.skillFile, "utf8");
1345
+ const rawSkill = fs8.readFileSync(src.skillFile, "utf8");
1308
1346
  const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
1309
1347
  fallbackName: path18.basename(src.dir),
1310
1348
  version: opts.version,
@@ -1316,7 +1354,7 @@ function makeAssetCommand() {
1316
1354
  );
1317
1355
  }
1318
1356
  const destDir = path18.join(target.path, norm.name);
1319
- if (fs9.existsSync(destDir)) {
1357
+ if (fs8.existsSync(destDir)) {
1320
1358
  logErr(`Destination already exists: ${destDir}`);
1321
1359
  process.exit(1);
1322
1360
  }
@@ -1346,8 +1384,8 @@ function makeAssetCommand() {
1346
1384
  for (const f of checked.advisories) {
1347
1385
  logWarn(`${norm.name}/SKILL.md [${f.tag}] \u2014 ${f.text}`);
1348
1386
  }
1349
- fs9.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
1350
- fs9.writeFileSync(path18.join(destDir, "SKILL.md"), norm.content, "utf8");
1387
+ fs8.cpSync(src.dir, destDir, { recursive: true, filter: copyFilter(src.dir) });
1388
+ fs8.writeFileSync(path18.join(destDir, "SKILL.md"), norm.content, "utf8");
1351
1389
  for (const note of norm.notes) logInfo(` \u2022 ${note}`);
1352
1390
  const fm = parseFrontmatter(norm.content).data;
1353
1391
  for (const f of checkAgentSkillConformance(fm, { dirName: norm.name })) {
@@ -1387,7 +1425,7 @@ function makeAssetCommand() {
1387
1425
  logErr(`Invalid --mode "${opts.mode}". Expected: copy | move.`);
1388
1426
  process.exit(1);
1389
1427
  }
1390
- if (!fs9.existsSync(srcPath)) {
1428
+ if (!fs8.existsSync(srcPath)) {
1391
1429
  logErr(`Source path does not exist: ${srcPath}`);
1392
1430
  process.exit(1);
1393
1431
  }
@@ -1415,9 +1453,9 @@ function makeAssetCommand() {
1415
1453
  }
1416
1454
  const basename3 = path18.basename(srcPath);
1417
1455
  const destDir = target.path;
1418
- fs9.mkdirSync(destDir, { recursive: true });
1456
+ fs8.mkdirSync(destDir, { recursive: true });
1419
1457
  const destPath = path18.join(destDir, basename3);
1420
- if (fs9.existsSync(destPath)) {
1458
+ if (fs8.existsSync(destPath)) {
1421
1459
  logErr(`Destination already exists: ${destPath}`);
1422
1460
  process.exit(1);
1423
1461
  }
@@ -1429,10 +1467,10 @@ function makeAssetCommand() {
1429
1467
  }
1430
1468
  switch (opts.mode) {
1431
1469
  case "copy":
1432
- fs9.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
1470
+ fs8.cpSync(srcPath, destPath, { recursive: true, filter: copyFilter(srcPath) });
1433
1471
  break;
1434
1472
  case "move":
1435
- fs9.renameSync(srcPath, destPath);
1473
+ fs8.renameSync(srcPath, destPath);
1436
1474
  break;
1437
1475
  }
1438
1476
  if (target.backend === "git" && opts.commit) {
@@ -1448,7 +1486,7 @@ function makeAssetCommand() {
1448
1486
  }
1449
1487
  logOk(`Migrated ${basename3} \u2192 ${target.name} (${opts.mode})`);
1450
1488
  const publisher = loadSkPublishManifest(target.path)?.publisher ?? "<publisher>";
1451
- const migratedKind = fs9.existsSync(path18.join(destPath, "SKILL.md")) ? "skill" : "<kind>";
1489
+ const migratedKind = fs8.existsSync(path18.join(destPath, "SKILL.md")) ? "skill" : "<kind>";
1452
1490
  logInfo(
1453
1491
  `Not addable yet: run ${S.cmd(`skaile library index ${target.name}`)}, then ${S.cmd(`skaile add ${migratedKind}:@${publisher.replace(/^@/, "")}/${basename3}`)}`
1454
1492
  );
@@ -1703,7 +1741,7 @@ function makeCatalogCommand() {
1703
1741
  return catalog;
1704
1742
  }
1705
1743
  async function runLocalCatalogTest(projectDir) {
1706
- const { resolveCatalogSource } = await import('../open-library-JP5TC5UX.js');
1744
+ const { resolveCatalogSource } = await import('../open-library-PVTIUQUF.js');
1707
1745
  let resolved;
1708
1746
  try {
1709
1747
  resolved = await resolveCatalogSource({ projectDir });
@@ -1850,17 +1888,23 @@ complete -F _${bin}_completion ${bin}`,
1850
1888
  end
1851
1889
  complete -c ${bin} -f -a '(__${bin}_complete)'`
1852
1890
  };
1853
- function discoverFlows(projectDir) {
1891
+ function flowsOfRoots(roots) {
1854
1892
  const byId = /* @__PURE__ */ new Map();
1855
- for (const root of aiResourceRoots(projectDir)) {
1893
+ for (const root of roots) {
1856
1894
  for (const { flow } of loadAllFlowEntries(root)) {
1857
1895
  if (!byId.has(flow.id)) byId.set(flow.id, flow);
1858
1896
  }
1859
1897
  }
1860
1898
  return [...byId.values()];
1861
1899
  }
1862
- function findFlowFile(flowId, priorityRoots = [], projectDir) {
1863
- return findFlowFileInRoots(flowId, [...priorityRoots, ...aiResourceRoots(projectDir)]);
1900
+ function discoverProjectFlows(projectDir) {
1901
+ return flowsOfRoots(flowLookupRoots(projectDir));
1902
+ }
1903
+ function findProjectFlowFile(flowId, projectDir) {
1904
+ return findFlowFileInRoots(flowId, flowLookupRoots(projectDir));
1905
+ }
1906
+ function discoverFlows(projectDir) {
1907
+ return flowsOfRoots(aiResourceRoots(projectDir));
1864
1908
  }
1865
1909
  var libraryFlowEntriesCache;
1866
1910
  function libraryFlowEntries() {
@@ -1873,15 +1917,23 @@ async function scanLibraryFlowEntries() {
1873
1917
  const { LocalIndex, resolveIndexPath, scanAuthoringLibraries } = await import('../library/index.js');
1874
1918
  const indexPath = resolveIndexPath();
1875
1919
  if (!existsSync(indexPath)) return entries;
1876
- const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-RBELV5YH.js');
1920
+ const { getKindRegistry: getKindRegistry2 } = await import('../open-registry-SOIS3TA2.js');
1877
1921
  const index = new LocalIndex({ indexPath });
1878
1922
  try {
1879
- for (const { assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
1923
+ for (const { library, assets } of await scanAuthoringLibraries(index, getKindRegistry2())) {
1880
1924
  for (const asset of assets) {
1881
1925
  if (asset.kind !== "flow") continue;
1926
+ if (flowFileNameError(asset.manifest, path18__default.basename(asset.manifestPath))) continue;
1882
1927
  try {
1883
1928
  const flow = loadFlow(asset.manifestPath);
1884
- if (flow.id) entries.push({ flow, path: asset.manifestPath });
1929
+ if (flow.id) {
1930
+ entries.push({
1931
+ flow,
1932
+ path: asset.manifestPath,
1933
+ ref: `flow:@${asset.publisher}/${asset.name}`,
1934
+ library: library.name
1935
+ });
1936
+ }
1885
1937
  } catch {
1886
1938
  }
1887
1939
  }
@@ -1901,10 +1953,25 @@ async function discoverFlowsWithLibraries(projectDir) {
1901
1953
  }
1902
1954
  return [...byId.values()];
1903
1955
  }
1904
- async function findFlowFileWithLibraries(flowId, priorityRoots = [], projectDir) {
1905
- const inRoots = findFlowFile(flowId, priorityRoots, projectDir);
1906
- if (inRoots) return inRoots;
1907
- return (await libraryFlowEntries()).find((e) => e.flow.id === flowId)?.path;
1956
+ async function discoverOtherFlows(projectDir) {
1957
+ const inProject = new Set(discoverProjectFlows(projectDir).map((f) => f.id));
1958
+ const libraryById = /* @__PURE__ */ new Map();
1959
+ for (const entry of await libraryFlowEntries()) {
1960
+ if (!libraryById.has(entry.flow.id)) libraryById.set(entry.flow.id, entry);
1961
+ }
1962
+ const others = [];
1963
+ for (const flow of await discoverFlowsWithLibraries(projectDir)) {
1964
+ if (inProject.has(flow.id)) continue;
1965
+ const lib = libraryById.get(flow.id);
1966
+ others.push({
1967
+ flow,
1968
+ ...lib ? { addRef: lib.ref, library: lib.library } : {}
1969
+ });
1970
+ }
1971
+ return others;
1972
+ }
1973
+ async function findLibraryFlow(flowId) {
1974
+ return (await libraryFlowEntries()).find((e) => e.flow.id === flowId);
1908
1975
  }
1909
1976
  function findSkills() {
1910
1977
  const found = [];
@@ -1923,11 +1990,11 @@ function findSkills() {
1923
1990
  return deduped;
1924
1991
  }
1925
1992
  function walkSkills(dir, out) {
1926
- for (const entry of fs9__default.readdirSync(dir, { withFileTypes: true })) {
1993
+ for (const entry of fs8__default.readdirSync(dir, { withFileTypes: true })) {
1927
1994
  const full = path18__default.join(dir, entry.name);
1928
1995
  if (entry.isDirectory()) {
1929
1996
  const skillMd = path18__default.join(full, "SKILL.md");
1930
- if (fs9__default.existsSync(skillMd)) {
1997
+ if (fs8__default.existsSync(skillMd)) {
1931
1998
  out.push({ name: entry.name, path: full, skillPath: skillMd });
1932
1999
  } else {
1933
2000
  walkSkills(full, out);
@@ -1942,16 +2009,16 @@ function resolveSkillNames() {
1942
2009
  }
1943
2010
  function resolveFlowIds() {
1944
2011
  try {
1945
- return discoverFlows().map((f) => f.id);
2012
+ return discoverProjectFlows().map((f) => f.id);
1946
2013
  } catch {
1947
2014
  return [];
1948
2015
  }
1949
2016
  }
1950
2017
  function resolveSessionIds(projectDir) {
1951
2018
  const sessionsDir = path18__default.join(projectDir, ".skaile", "sessions");
1952
- if (!fs9__default.existsSync(sessionsDir)) return [];
2019
+ if (!fs8__default.existsSync(sessionsDir)) return [];
1953
2020
  try {
1954
- return fs9__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
2021
+ return fs8__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1955
2022
  } catch {
1956
2023
  return [];
1957
2024
  }
@@ -2003,6 +2070,38 @@ function resolveDynamic(words, cword) {
2003
2070
  if (cmd === "config" && ["get", "set"].includes(sub) && isLast(3)) return CONFIG_KEYS;
2004
2071
  return null;
2005
2072
  }
2073
+
2074
+ // cli/src/driver-error.ts
2075
+ function unknownDriverMessage(driver) {
2076
+ const known = listDrivers().map((d) => d.id);
2077
+ if (known.includes(driver)) return void 0;
2078
+ return `Unknown agent driver: "${driver}". Available: ${known.join(", ")}`;
2079
+ }
2080
+ function friendlyDriverError(err) {
2081
+ const e = err;
2082
+ if (!e) return null;
2083
+ const isSpawnEnoent = e.code === "ENOENT" && (e.syscall?.startsWith("spawn") === true || /^spawn .*ENOENT/.test(e.message ?? ""));
2084
+ const isConfig = e.category === "config" || e.detail?.category === "config";
2085
+ if (!isSpawnEnoent && !isConfig) return null;
2086
+ const hint = e.hint ?? e.detail?.hint;
2087
+ const base = hint ?? "The configured agent binary is not installed or not on your PATH.";
2088
+ return `${base}
2089
+ Try a different harness with \`--driver claude-sdk\`.`;
2090
+ }
2091
+ function driverErrorNotes(err) {
2092
+ const e = err;
2093
+ const notes = [];
2094
+ const category = e?.category ?? e?.detail?.category;
2095
+ const hint = e?.hint ?? e?.detail?.hint;
2096
+ if (hint && category !== "config") notes.push(hint);
2097
+ else if (category === "auth") notes.push("Check your API key or login.");
2098
+ if (e?.logSessionId) {
2099
+ notes.push(`Full records: .skaile/logs.db (skaile session logs ${e.logSessionId}).`);
2100
+ }
2101
+ return notes;
2102
+ }
2103
+
2104
+ // cli/src/commands/config.ts
2006
2105
  var PERSONAL_KEYS = /* @__PURE__ */ new Set(["driver", "model"]);
2007
2106
  var CATALOG_KEYS = /* @__PURE__ */ new Set(["catalog.url", "catalog.cache_ttl", "catalog.framing"]);
2008
2107
  async function setCatalogKey(key, raw) {
@@ -2017,10 +2116,10 @@ async function setCatalogKey(key, raw) {
2017
2116
  process.exit(1);
2018
2117
  }
2019
2118
  const filePath = userConfigPath();
2020
- const fs12 = await import('fs');
2119
+ const fs11 = await import('fs');
2021
2120
  let existing = {};
2022
- if (fs12.existsSync(filePath)) {
2023
- const parsed = parseYaml3(fs12.readFileSync(filePath, "utf-8"));
2121
+ if (fs11.existsSync(filePath)) {
2122
+ const parsed = parseYaml3(fs11.readFileSync(filePath, "utf-8"));
2024
2123
  if (parsed && typeof parsed === "object") existing = parsed;
2025
2124
  }
2026
2125
  const catalog = {
@@ -2031,6 +2130,31 @@ async function setCatalogKey(key, raw) {
2031
2130
  logOk(`Set ${pc5.bold(key)} = ${String(checked.data[field])}`);
2032
2131
  console.log(S.dim(` \u2192 ${filePath}`));
2033
2132
  }
2133
+ async function unsetCatalogKey(key) {
2134
+ const { saveConfig } = await import('../library/index.js');
2135
+ const { parse: parseYaml3 } = await import('yaml');
2136
+ const field = key.slice("catalog.".length);
2137
+ const filePath = userConfigPath();
2138
+ const fs11 = await import('fs');
2139
+ let existing = {};
2140
+ if (fs11.existsSync(filePath)) {
2141
+ const parsed = parseYaml3(fs11.readFileSync(filePath, "utf-8"));
2142
+ if (parsed && typeof parsed === "object") existing = parsed;
2143
+ }
2144
+ const catalog = existing.catalog ?? {};
2145
+ if (!(field in catalog)) {
2146
+ logInfo(`${key} is not set in ${filePath}`);
2147
+ return;
2148
+ }
2149
+ const { [field]: _removed, ...restCatalog } = catalog;
2150
+ const { catalog: _catalog, ...rest } = existing;
2151
+ saveConfig(
2152
+ filePath,
2153
+ Object.keys(restCatalog).length > 0 ? { ...rest, catalog: restCatalog } : rest
2154
+ );
2155
+ logOk(`Unset ${pc5.bold(key)} (the default applies again)`);
2156
+ console.log(S.dim(` \u2192 ${filePath}`));
2157
+ }
2034
2158
  var API_KEY_PREFIX = "apiKey.";
2035
2159
  function collectWorkspaceDefaults(projectDir) {
2036
2160
  const wsDefaults = {};
@@ -2162,6 +2286,26 @@ function setApiKeySugar(provider, value, projectDir) {
2162
2286
  );
2163
2287
  console.log(` ${S.dim("Verify with:")} ${S.cmd(`skaile providers test ${provider}`)}`);
2164
2288
  }
2289
+ function unsetApiKeySugar(provider, projectDir) {
2290
+ try {
2291
+ const removed = removeProviderEntry(provider, { projectDir });
2292
+ if (!removed) {
2293
+ logInfo(`apiKey.${provider} is not set: the user registry has no provider '${provider}'`);
2294
+ return;
2295
+ }
2296
+ logOk(
2297
+ `Unset ${pc5.bold(`apiKey.${provider}`)}: removed ${pc5.bold(provider)} from the user registry`
2298
+ );
2299
+ console.log(S.dim(` \u2192 ${removed.path}`));
2300
+ if (removed.stillDefinedElsewhere) {
2301
+ logInfo(`'${provider}' is still defined in another layer: run skaile providers list`);
2302
+ }
2303
+ } catch (error) {
2304
+ if (!(error instanceof ProviderRegistryWriteError)) throw error;
2305
+ logErr(error.message);
2306
+ process.exit(1);
2307
+ }
2308
+ }
2165
2309
  function makeConfigCommand() {
2166
2310
  const cmd = new Command("config").description("Manage personal config (.skaile/settings.json)");
2167
2311
  cmd.command("show").description("Show effective config with sources").option("--project-dir <path>", "Project directory").action((opts) => showConfig(opts));
@@ -2178,7 +2322,7 @@ function makeConfigCommand() {
2178
2322
  console.log(value ?? S.dim("(not set)"));
2179
2323
  });
2180
2324
  cmd.command("set <key> <value>").description(
2181
- "Set a personal config value (driver, model, apiKey.<provider>) or a catalog setting (catalog.url, catalog.cache_ttl, catalog.framing)"
2325
+ "Set a personal config value (driver, model, apiKey.<provider>) or a catalog setting (catalog.url, catalog.cache_ttl, catalog.framing). `config unset <key>` removes every one of them again"
2182
2326
  ).option("--project-dir <path>", "Project directory").option("--global", "Write to ~/.skaile/settings.json instead of project-local").action(async (key, value, opts) => {
2183
2327
  const projectDir = opts.projectDir ? path18__default.resolve(opts.projectDir) : process.cwd();
2184
2328
  if (CATALOG_KEYS.has(key)) {
@@ -2208,9 +2352,9 @@ function makeConfigCommand() {
2208
2352
  }
2209
2353
  if (key === "driver") {
2210
2354
  await loadDeclaredPlugins(projectDir);
2211
- const known = listDrivers().map((d) => d.id);
2212
- if (!known.includes(value)) {
2213
- logErr(`Unknown agent driver: "${value}". Available: ${known.join(", ")}`);
2355
+ const unknown = unknownDriverMessage(value);
2356
+ if (unknown) {
2357
+ logErr(unknown);
2214
2358
  process.exit(1);
2215
2359
  }
2216
2360
  }
@@ -2243,12 +2387,22 @@ function makeConfigCommand() {
2243
2387
  }
2244
2388
  }
2245
2389
  });
2246
- cmd.command("unset <key>").description("Remove a personal config value (driver, model) from the settings file").option("--project-dir <path>", "Project directory").option("--global", "Remove from ~/.skaile/settings.json instead of project-local").action(async (key, opts) => {
2390
+ cmd.command("unset <key>").description(
2391
+ "Remove a value that `config set` wrote: driver, model, apiKey.<provider> (removes the provider entry) or catalog.url, catalog.cache_ttl, catalog.framing (the default applies again)"
2392
+ ).option("--project-dir <path>", "Project directory").option("--global", "Remove from ~/.skaile/settings.json instead of project-local").action(async (key, opts) => {
2247
2393
  const projectDir = opts.projectDir ? path18__default.resolve(opts.projectDir) : process.cwd();
2394
+ if (CATALOG_KEYS.has(key)) {
2395
+ await unsetCatalogKey(key);
2396
+ return;
2397
+ }
2398
+ if (key.startsWith(API_KEY_PREFIX) && key.length > API_KEY_PREFIX.length) {
2399
+ unsetApiKeySugar(key.slice(API_KEY_PREFIX.length), projectDir);
2400
+ return;
2401
+ }
2248
2402
  if (!PERSONAL_KEYS.has(key)) {
2249
2403
  logErr(
2250
- `'${key}' is not a personal setting that can be unset.
2251
- Personal keys: ${[...PERSONAL_KEYS].join(", ")}`
2404
+ `'${key}' is not a setting that can be unset.
2405
+ Keys: ${[...PERSONAL_KEYS].join(", ")}, ${API_KEY_PREFIX}<provider>, ${[...CATALOG_KEYS].join(", ")}`
2252
2406
  );
2253
2407
  process.exit(1);
2254
2408
  }
@@ -2904,7 +3058,7 @@ async function ensureTargetsRegistered(projectDir) {
2904
3058
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2905
3059
  const config = resolveSkWorkspaceConfig2(projectDir);
2906
3060
  if (config.plugins && config.plugins.length > 0) {
2907
- const { ensurePluginsLoaded } = await import('../plugin-store-QOQDM24E.js');
3061
+ const { ensurePluginsLoaded } = await import('../plugin-store-G2GWAHSD.js');
2908
3062
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
2909
3063
  for (const f of result.failed) logWarn(f.error);
2910
3064
  }
@@ -3056,7 +3210,7 @@ function makeDiffCommand() {
3056
3210
  }
3057
3211
  const result = await am2.diff(ref);
3058
3212
  const problems = gaps.filter(
3059
- (g) => !(result.status === "differs" && (g.type === "content" || g.type === "modified"))
3213
+ (g) => !(result.status === "differs" && !result.fileSetDiffers && (g.type === "content" || g.type === "modified"))
3060
3214
  );
3061
3215
  switch (result.status) {
3062
3216
  case "not-found":
@@ -3088,26 +3242,52 @@ function makeDiffCommand() {
3088
3242
  }
3089
3243
  function makeFlowCommand() {
3090
3244
  const cmd = new Command("flow").description("Manage flows");
3091
- cmd.command("list").description("List available flows").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
3092
- const flows = await discoverFlowsWithLibraries(path18__default.resolve(opts.projectDir));
3093
- if (flows.length === 0) {
3245
+ cmd.command("list").description("List the flows of this project").option("--project-dir <path>", "Project directory", process.cwd()).option("--all", "Also list the flows of registered libraries and cached sources").action(async (opts) => {
3246
+ const projectDir = path18__default.resolve(opts.projectDir);
3247
+ const flows = discoverProjectFlows(projectDir);
3248
+ const others = opts.all ? await discoverOtherFlows(projectDir) : [];
3249
+ if (flows.length === 0 && others.length === 0) {
3094
3250
  logInfo("No flows found.");
3251
+ console.log(
3252
+ ` ${S.dim(
3253
+ opts.all ? "No registered library or source holds a flow either." : "Add one with skaile add flow:@<publisher>/<name>; skaile flow list --all also shows the flows of your libraries."
3254
+ )}`
3255
+ );
3095
3256
  return;
3096
3257
  }
3258
+ const row = (id, name, description) => {
3259
+ console.log(` ${S.cmd(id.padEnd(24))} ${name}`);
3260
+ if (description) console.log(` ${"".padEnd(24)} ${S.dim(description)}`);
3261
+ };
3097
3262
  console.log();
3098
- console.log(S.heading(" Available Flows"));
3099
- console.log(` ${S.rule(50)}`);
3100
- for (const f of flows) {
3101
- console.log(` ${S.cmd(f.id.padEnd(24))} ${f.name}`);
3102
- if (f.description) console.log(` ${"".padEnd(24)} ${S.dim(f.description)}`);
3263
+ if (flows.length > 0 || !opts.all) {
3264
+ console.log(S.heading(" Available Flows"));
3265
+ console.log(` ${S.rule(50)}`);
3266
+ for (const f of flows) row(f.id, f.name, f.description);
3267
+ if (flows.length === 0) console.log(` ${S.dim("No flow in this project.")}`);
3268
+ console.log();
3269
+ }
3270
+ if (others.length > 0) {
3271
+ console.log(S.heading(" Not in this project"));
3272
+ console.log(` ${S.rule(50)}`);
3273
+ for (const o of others) {
3274
+ row(o.flow.id, o.flow.name, o.flow.description);
3275
+ const how = o.addRef ? `skaile add ${o.addRef} (library ${o.library})` : "in a cached source or the global root; add it from its source";
3276
+ console.log(` ${"".padEnd(24)} ${S.dim(how)}`);
3277
+ }
3278
+ console.log();
3103
3279
  }
3104
- console.log();
3105
3280
  });
3106
- cmd.command("show <id>").description("Show flow details and node graph").option("--project-dir <path>", "Project directory", process.cwd()).action(async (id, opts) => {
3107
- const flows = await discoverFlowsWithLibraries(path18__default.resolve(opts.projectDir));
3108
- const flow = flows.find((f) => f.id === id);
3281
+ cmd.command("show <id>").description("Show flow details and node graph").option("--project-dir <path>", "Project directory", process.cwd()).option("--all", "Also look in registered libraries and cached sources").action(async (id, opts) => {
3282
+ const projectDir = path18__default.resolve(opts.projectDir);
3283
+ const flow = discoverProjectFlows(projectDir).find((f) => f.id === id) ?? (opts.all ? (await discoverOtherFlows(projectDir)).find((o) => o.flow.id === id)?.flow : void 0);
3109
3284
  if (!flow) {
3110
3285
  logErr(`Flow not found: ${id}`);
3286
+ if (!opts.all) {
3287
+ console.log(
3288
+ ` ${S.dim("Not in this project. skaile flow show <id> --all also looks in your libraries.")}`
3289
+ );
3290
+ }
3111
3291
  process.exit(1);
3112
3292
  }
3113
3293
  console.log();
@@ -3169,236 +3349,6 @@ function makeHistoryCommand() {
3169
3349
  return cmd;
3170
3350
  }
3171
3351
  var SKAILE_MCP_NAME = "skaile-workspace";
3172
- var MCP_SERVER_ENTRY = {
3173
- command: "skaile",
3174
- args: ["mcp-server"],
3175
- env: {}
3176
- };
3177
- function mcpFilePath(projectDir) {
3178
- return path18__default.join(projectDir, ".mcp.json");
3179
- }
3180
- function legacyMcpFilePath(projectDir) {
3181
- return path18__default.join(projectDir, ".claude", "mcp.json");
3182
- }
3183
- async function removeSkaileMcpEntry(mcpPath) {
3184
- const mcp = await readJsonStrict(mcpPath);
3185
- if (!mcp?.mcpServers || !(SKAILE_MCP_NAME in mcp.mcpServers)) return false;
3186
- const { [SKAILE_MCP_NAME]: _removed, ...rest } = mcp.mcpServers;
3187
- const updated = { ...mcp, mcpServers: rest };
3188
- if (Object.keys(rest).length === 0) delete updated.mcpServers;
3189
- if (Object.keys(updated).length === 0) await fs5.unlink(mcpPath);
3190
- else await writeJson(mcpPath, updated);
3191
- return true;
3192
- }
3193
- function pluginDir(projectDir) {
3194
- return path18__default.join(projectDir, ".claude", "plugins", "skaile");
3195
- }
3196
- async function readJsonStrict(p6) {
3197
- let raw;
3198
- try {
3199
- raw = await fs5.readFile(p6, "utf-8");
3200
- } catch {
3201
- return null;
3202
- }
3203
- try {
3204
- return JSON.parse(raw);
3205
- } catch (e) {
3206
- throw new Error(
3207
- `cannot parse ${p6}: ${e instanceof Error ? e.message : String(e)}; please fix or remove`
3208
- );
3209
- }
3210
- }
3211
- async function writeJson(p6, value) {
3212
- await fs5.mkdir(path18__default.dirname(p6), { recursive: true });
3213
- await fs5.writeFile(p6, `${JSON.stringify(value, null, 2)}
3214
- `);
3215
- }
3216
- var SKIPPED_IN_SKILL = /* @__PURE__ */ new Set(["__pycache__", "node_modules", ".DS_Store"]);
3217
- async function copyInstalledSkills(projectDir, skillsDir) {
3218
- for (const entry of await fs5.readdir(skillsDir).catch(() => [])) {
3219
- if (entry !== ".gitkeep")
3220
- await fs5.rm(path18__default.join(skillsDir, entry), { recursive: true, force: true });
3221
- }
3222
- for (const root of [
3223
- path18__default.join(projectDir, ".claude", "skills"),
3224
- path18__default.join(projectDir, ".skaile", "skills")
3225
- ]) {
3226
- for (const name of await fs5.readdir(root).catch(() => [])) {
3227
- const from = path18__default.join(root, name);
3228
- if (!existsSync(path18__default.join(from, "SKILL.md"))) continue;
3229
- const to = path18__default.join(skillsDir, name);
3230
- await fs5.rm(to, { recursive: true, force: true });
3231
- await fs5.cp(from, to, {
3232
- recursive: true,
3233
- dereference: true,
3234
- filter: (src) => !SKIPPED_IN_SKILL.has(path18__default.basename(src))
3235
- });
3236
- }
3237
- }
3238
- }
3239
- async function install(projectDir, opts) {
3240
- return opts?.full ? installFullPlugin(projectDir) : installMcp(projectDir);
3241
- }
3242
- async function installMcp(projectDir) {
3243
- const mcpPath = mcpFilePath(projectDir);
3244
- const existing = await readJsonStrict(mcpPath) ?? {};
3245
- const mcpServers = { ...existing.mcpServers ?? {} };
3246
- const previous = mcpServers[SKAILE_MCP_NAME];
3247
- const matches = previous && JSON.stringify(previous) === JSON.stringify(MCP_SERVER_ENTRY);
3248
- let warning;
3249
- if (previous && !matches) {
3250
- warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path18__default.relative(projectDir, mcpPath)}`;
3251
- }
3252
- mcpServers[SKAILE_MCP_NAME] = MCP_SERVER_ENTRY;
3253
- await writeJson(mcpPath, { ...existing, mcpServers });
3254
- const migrated = await removeSkaileMcpEntry(legacyMcpFilePath(projectDir));
3255
- return { changed: !matches || migrated, method: "mcp", warning };
3256
- }
3257
- async function dropSymlink(p6) {
3258
- const stat = await fs5.lstat(p6).catch(() => void 0);
3259
- if (stat?.isSymbolicLink()) await fs5.unlink(p6);
3260
- }
3261
- async function installFullPlugin(projectDir) {
3262
- const dir = pluginDir(projectDir);
3263
- await dropSymlink(dir);
3264
- await dropSymlink(path18__default.join(dir, "skills"));
3265
- for (const [rel, content] of Object.entries(buildClaudePluginFiles())) {
3266
- const dest = path18__default.join(dir, rel);
3267
- await fs5.mkdir(path18__default.dirname(dest), { recursive: true });
3268
- await fs5.writeFile(dest, content);
3269
- }
3270
- await copyInstalledSkills(projectDir, path18__default.join(dir, "skills"));
3271
- const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
3272
- const settings = await readJsonStrict(settingsPath) ?? {};
3273
- const plugins = settings.plugins ?? [];
3274
- if (!plugins.includes(dir)) plugins.push(dir);
3275
- await writeJson(settingsPath, { ...settings, plugins });
3276
- return { changed: true, method: "plugin" };
3277
- }
3278
- async function uninstall(projectDir) {
3279
- const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
3280
- const mcpPath = mcpFilePath(projectDir);
3281
- const dir = pluginDir(projectDir);
3282
- const rel = (p6) => path18__default.relative(projectDir, p6);
3283
- const files = [];
3284
- const settings = await readJsonStrict(settingsPath);
3285
- if (settings && Array.isArray(settings.plugins)) {
3286
- const next = settings.plugins.filter((p6) => p6 !== dir);
3287
- if (next.length !== settings.plugins.length) {
3288
- files.push(rel(settingsPath));
3289
- const updated = { ...settings, plugins: next };
3290
- if (next.length === 0) delete updated.plugins;
3291
- if (Object.keys(updated).length === 0) await fs5.unlink(settingsPath);
3292
- else await writeJson(settingsPath, updated);
3293
- }
3294
- }
3295
- if (existsSync(dir)) {
3296
- await fs5.rm(dir, { recursive: true, force: true });
3297
- files.push(rel(dir));
3298
- }
3299
- if (await removeSkaileMcpEntry(mcpPath)) files.push(rel(mcpPath));
3300
- const legacyPath = legacyMcpFilePath(projectDir);
3301
- if (await removeSkaileMcpEntry(legacyPath)) files.push(rel(legacyPath));
3302
- for (const emptyDir of [path18__default.dirname(dir), path18__default.join(projectDir, ".claude")]) {
3303
- await fs5.rmdir(emptyDir).catch(() => void 0);
3304
- }
3305
- return { changed: files.length > 0, files };
3306
- }
3307
- async function detectInstall(projectDir) {
3308
- const dir = pluginDir(projectDir);
3309
- const settings = await readJsonStrict(
3310
- path18__default.join(projectDir, ".claude", "settings.json")
3311
- );
3312
- if (existsSync(path18__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
3313
- return { method: "plugin", pluginPath: dir };
3314
- }
3315
- const mcp = await readJsonStrict(mcpFilePath(projectDir));
3316
- if (mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers) {
3317
- return { method: "mcp" };
3318
- }
3319
- return null;
3320
- }
3321
- async function enable(projectDir) {
3322
- const detected = await detectInstall(projectDir);
3323
- if (!detected) throw new Error("plugin not installed for claude-code");
3324
- const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
3325
- const settings = await readJsonStrict(settingsPath) ?? {};
3326
- if (detected.method === "plugin") {
3327
- const disabled2 = settings.disabledPlugins ?? [];
3328
- const next2 = disabled2.filter((p6) => p6 !== detected.pluginPath);
3329
- if (next2.length === disabled2.length) return { changed: false };
3330
- const updated2 = { ...settings, disabledPlugins: next2 };
3331
- if (next2.length === 0) delete updated2.disabledPlugins;
3332
- await writeJson(settingsPath, updated2);
3333
- return { changed: true };
3334
- }
3335
- const disabled = settings.disabledMcpjsonServers ?? [];
3336
- const next = disabled.filter((n) => n !== SKAILE_MCP_NAME);
3337
- if (next.length === disabled.length) return { changed: false };
3338
- const updated = { ...settings, disabledMcpjsonServers: next };
3339
- if (next.length === 0) delete updated.disabledMcpjsonServers;
3340
- await writeJson(settingsPath, updated);
3341
- return { changed: true };
3342
- }
3343
- async function disable(projectDir) {
3344
- const detected = await detectInstall(projectDir);
3345
- if (!detected) throw new Error("plugin not installed for claude-code");
3346
- const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
3347
- const settings = await readJsonStrict(settingsPath) ?? {};
3348
- if (detected.method === "plugin") {
3349
- const list2 = settings.disabledPlugins ?? [];
3350
- if (list2.includes(detected.pluginPath)) return { changed: false };
3351
- await writeJson(settingsPath, {
3352
- ...settings,
3353
- disabledPlugins: [...list2, detected.pluginPath]
3354
- });
3355
- return { changed: true };
3356
- }
3357
- const list = settings.disabledMcpjsonServers ?? [];
3358
- if (list.includes(SKAILE_MCP_NAME)) return { changed: false };
3359
- await writeJson(settingsPath, {
3360
- ...settings,
3361
- disabledMcpjsonServers: [...list, SKAILE_MCP_NAME]
3362
- });
3363
- return { changed: true };
3364
- }
3365
- async function status(projectDir) {
3366
- const settingsPath = path18__default.join(projectDir, ".claude", "settings.json");
3367
- const mcpPath = mcpFilePath(projectDir);
3368
- const dir = pluginDir(projectDir);
3369
- const settings = await readJsonStrict(settingsPath);
3370
- const mcp = await readJsonStrict(mcpPath);
3371
- const pluginInstalled = !!(existsSync(path18__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
3372
- const mcpInstalled = !!(mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers);
3373
- if (!pluginInstalled && !mcpInstalled) {
3374
- return {
3375
- harness: "claude-code",
3376
- installed: "no",
3377
- enabled: "n/a",
3378
- method: "\u2014",
3379
- location: "\u2014"
3380
- };
3381
- }
3382
- if (pluginInstalled) {
3383
- const disabled2 = settings?.disabledPlugins?.includes(dir) ?? false;
3384
- return {
3385
- harness: "claude-code",
3386
- installed: "yes",
3387
- enabled: disabled2 ? "no" : "yes",
3388
- method: "plugin",
3389
- location: path18__default.relative(projectDir, dir)
3390
- };
3391
- }
3392
- const disabled = settings?.disabledMcpjsonServers?.includes(SKAILE_MCP_NAME) ?? false;
3393
- return {
3394
- harness: "claude-code",
3395
- installed: "yes",
3396
- enabled: disabled ? "no" : "yes",
3397
- method: "mcp",
3398
- location: path18__default.relative(projectDir, mcpPath)
3399
- };
3400
- }
3401
- var SKAILE_MCP_NAME2 = "skaile-workspace";
3402
3352
  function buildEntry(projectDir) {
3403
3353
  return {
3404
3354
  command: "skaile",
@@ -3438,14 +3388,14 @@ async function install2(projectDir) {
3438
3388
  const cfg = await readConfig(p6) ?? {};
3439
3389
  const next = buildEntry(projectDir);
3440
3390
  const servers = { ...cfg.mcp_servers ?? {} };
3441
- const previous = servers[SKAILE_MCP_NAME2];
3391
+ const previous = servers[SKAILE_MCP_NAME];
3442
3392
  const matches = previous && JSON.stringify(previous) === JSON.stringify(next);
3443
3393
  let warning;
3444
3394
  if (previous && !matches) {
3445
- warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path18__default.relative(projectDir, p6)}`;
3395
+ warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path18__default.relative(projectDir, p6)}`;
3446
3396
  }
3447
3397
  if (matches) return { changed: false, method: "toml" };
3448
- servers[SKAILE_MCP_NAME2] = next;
3398
+ servers[SKAILE_MCP_NAME] = next;
3449
3399
  await writeConfig(p6, { ...cfg, mcp_servers: servers });
3450
3400
  return { changed: true, method: "toml", warning };
3451
3401
  }
@@ -3474,7 +3424,9 @@ async function trustLevel(projects, projectDir) {
3474
3424
  return { root, level: entry?.trust_level, known: entry !== void 0 };
3475
3425
  }
3476
3426
  async function trustEntry(projectDir) {
3477
- const root = await fs5.realpath(projectDir).catch(() => projectDir);
3427
+ return trustEntryFor(await fs5.realpath(projectDir).catch(() => projectDir));
3428
+ }
3429
+ function trustEntryFor(root) {
3478
3430
  return `[projects.${JSON.stringify(root)}]
3479
3431
  trust_level = "trusted"`;
3480
3432
  }
@@ -3492,7 +3444,12 @@ async function trustProject(projectDir) {
3492
3444
  }
3493
3445
  await fs5.mkdir(path18__default.dirname(p6), { recursive: true });
3494
3446
  await fs5.writeFile(p6, next);
3495
- await writeTrustMark(projectDir, true);
3447
+ await writeTrustMark(projectDir, [
3448
+ .../* @__PURE__ */ new Set([
3449
+ ...(await markedRoots(projectDir)).roots,
3450
+ (await trustLevel(projects, projectDir)).root
3451
+ ])
3452
+ ]);
3496
3453
  return "added";
3497
3454
  }
3498
3455
  var TRUST_MARK = "codexTrustAdded";
@@ -3509,51 +3466,80 @@ async function readState(projectDir) {
3509
3466
  }
3510
3467
  return {};
3511
3468
  }
3512
- async function writeTrustMark(projectDir, on) {
3469
+ async function markedRoots(projectDir) {
3470
+ const mark = (await readState(projectDir))[TRUST_MARK];
3471
+ if (mark === true) {
3472
+ return { roots: [await fs5.realpath(projectDir).catch(() => projectDir)], legacy: true };
3473
+ }
3474
+ const list = typeof mark === "string" ? [mark] : Array.isArray(mark) ? mark : [];
3475
+ return { roots: list.filter((r) => typeof r === "string"), legacy: false };
3476
+ }
3477
+ async function writeTrustMark(projectDir, roots) {
3513
3478
  const state2 = await readState(projectDir);
3514
- if (on) state2[TRUST_MARK] = true;
3479
+ if (roots.length > 0) state2[TRUST_MARK] = roots;
3515
3480
  else delete state2[TRUST_MARK];
3516
3481
  await fs5.mkdir(path18__default.dirname(stateFilePath(projectDir)), { recursive: true });
3517
3482
  await fs5.writeFile(stateFilePath(projectDir), JSON.stringify(state2, null, 2));
3518
3483
  }
3519
3484
  async function untrustProject(projectDir) {
3520
- if ((await readState(projectDir))[TRUST_MARK] !== true) return "none";
3485
+ const result = { removed: [], kept: [] };
3486
+ const { roots, legacy } = await markedRoots(projectDir);
3487
+ if (roots.length === 0) return result;
3521
3488
  const { path: p6, raw, projects } = await readUserConfig();
3522
- const kept = async () => {
3523
- await writeTrustMark(projectDir, false);
3524
- return "kept";
3525
- };
3526
- const { root } = await trustLevel(projects, projectDir);
3527
- const parsed = projects[root];
3528
- if (!parsed || Object.keys(parsed).length !== 1 || parsed.trust_level !== "trusted") {
3529
- return kept();
3530
- }
3531
- const entry = `${await trustEntry(projectDir)}
3489
+ const current = await fs5.realpath(projectDir).catch(() => projectDir);
3490
+ let text = raw;
3491
+ for (const root of roots) {
3492
+ const parsed = projects[root];
3493
+ if (!parsed) {
3494
+ if (legacy) result.kept.push({ root, reason: "absent" });
3495
+ continue;
3496
+ }
3497
+ if (root !== current && await fs5.stat(root).then(() => true).catch(() => false)) {
3498
+ result.kept.push({ root, reason: "in-use" });
3499
+ continue;
3500
+ }
3501
+ if (Object.keys(parsed).length !== 1 || parsed.trust_level !== "trusted") {
3502
+ result.kept.push({ root, reason: "edited" });
3503
+ continue;
3504
+ }
3505
+ const entry = `${trustEntryFor(root)}
3532
3506
  `;
3533
- const at = raw.indexOf(entry);
3534
- if (at === -1) return kept();
3535
- const before = raw.slice(0, at).replace(/\n+$/, "");
3536
- const after = raw.slice(at + entry.length).replace(/^\n+/, "");
3537
- const next = [before, after].filter((s) => s !== "").join("\n\n");
3538
- try {
3539
- const left = parse$1(next).projects ?? {};
3540
- if (root in left) return kept();
3541
- } catch {
3542
- return kept();
3507
+ const at = text.indexOf(entry);
3508
+ if (at === -1) {
3509
+ result.kept.push({ root, reason: "edited" });
3510
+ continue;
3511
+ }
3512
+ const before = text.slice(0, at).replace(/\n+$/, "");
3513
+ const after = text.slice(at + entry.length).replace(/^\n+/, "");
3514
+ const next = [before, after].filter((s) => s !== "").join("\n\n");
3515
+ try {
3516
+ const left = parse$1(next).projects ?? {};
3517
+ if (root in left) {
3518
+ result.kept.push({ root, reason: "edited" });
3519
+ continue;
3520
+ }
3521
+ } catch {
3522
+ result.kept.push({ root, reason: "edited" });
3523
+ continue;
3524
+ }
3525
+ text = next;
3526
+ result.removed.push(root);
3543
3527
  }
3544
- if (next === "") await fs5.unlink(p6);
3545
- else await fs5.writeFile(p6, `${next}
3528
+ if (result.removed.length > 0) {
3529
+ if (text === "") await fs5.unlink(p6);
3530
+ else await fs5.writeFile(p6, `${text}
3546
3531
  `);
3547
- await writeTrustMark(projectDir, false);
3548
- return "removed";
3532
+ }
3533
+ await writeTrustMark(projectDir, []);
3534
+ return result;
3549
3535
  }
3550
3536
  async function uninstall2(projectDir) {
3551
3537
  const p6 = configPath(projectDir);
3552
3538
  const cfg = await readConfig(p6);
3553
- if (!cfg?.mcp_servers || !(SKAILE_MCP_NAME2 in cfg.mcp_servers)) {
3539
+ if (!cfg?.mcp_servers || !(SKAILE_MCP_NAME in cfg.mcp_servers)) {
3554
3540
  return { changed: false };
3555
3541
  }
3556
- const { [SKAILE_MCP_NAME2]: _removed, ...rest } = cfg.mcp_servers;
3542
+ const { [SKAILE_MCP_NAME]: _removed, ...rest } = cfg.mcp_servers;
3557
3543
  const updated = { ...cfg, mcp_servers: rest };
3558
3544
  if (Object.keys(rest).length === 0) delete updated.mcp_servers;
3559
3545
  if (Object.keys(updated).length === 0) {
@@ -3574,7 +3560,7 @@ async function isTrusted(projectDir) {
3574
3560
  async function status2(projectDir) {
3575
3561
  const p6 = configPath(projectDir);
3576
3562
  const cfg = await readConfig(p6);
3577
- const installed = !!(cfg?.mcp_servers && SKAILE_MCP_NAME2 in cfg.mcp_servers);
3563
+ const installed = !!(cfg?.mcp_servers && SKAILE_MCP_NAME in cfg.mcp_servers);
3578
3564
  if (!installed) {
3579
3565
  return {
3580
3566
  harness: "codex",
@@ -3751,12 +3737,27 @@ async function uninstallCodex(projectDir) {
3751
3737
  else logInfo(`codex: not installed`);
3752
3738
  const trust = await untrustProject(projectDir);
3753
3739
  const userFile = userConfigPath2().replace(homedir(), "~");
3754
- if (trust === "removed") logOk(`Removed the trust entry skaile added from ${S.cmd(userFile)}`);
3755
- else if (trust === "kept") {
3756
- logInfo(
3757
- `codex: left the project's entry in ${userFile} (it no longer matches what skaile wrote)`
3740
+ const current = await fs5.realpath(projectDir).catch(() => projectDir);
3741
+ for (const root of trust.removed) {
3742
+ logOk(
3743
+ root === current ? `Removed the trust entry skaile added from ${S.cmd(userFile)}` : `Removed the trust entry skaile added for ${S.cmd(root)} (the project was moved from there) from ${S.cmd(userFile)}`
3758
3744
  );
3759
3745
  }
3746
+ for (const { root, reason } of trust.kept) {
3747
+ if (reason === "edited") {
3748
+ logInfo(
3749
+ `codex: left the trust entry for ${root} in ${userFile} (you edited it since install). Remove it there if you do not need it.`
3750
+ );
3751
+ } else if (reason === "in-use") {
3752
+ logInfo(
3753
+ `codex: the trust entry for ${root} stays in ${userFile}: that directory still exists. Remove it there when you no longer use it.`
3754
+ );
3755
+ } else {
3756
+ logInfo(
3757
+ `codex: ${userFile} has no trust entry for ${root}. If the project was moved, the entry for its old path stays; remove it from ${userFile}.`
3758
+ );
3759
+ }
3760
+ }
3760
3761
  }
3761
3762
  async function runUninstall(opts) {
3762
3763
  const projectDir = path18__default.resolve(opts.projectDir);
@@ -4071,7 +4072,7 @@ function unfinishedGitState(dir) {
4071
4072
  for (const [entry, state2] of Object.entries(UNFINISHED_GIT_ENTRIES)) {
4072
4073
  const p6 = spawnSync("git", ["rev-parse", "--git-path", entry], { cwd: dir, encoding: "utf-8" });
4073
4074
  if (p6.status !== 0) return "the git directory could not be read";
4074
- if (fs9.existsSync(path18.resolve(dir, p6.stdout.trim()))) return state2;
4075
+ if (fs8.existsSync(path18.resolve(dir, p6.stdout.trim()))) return state2;
4075
4076
  }
4076
4077
  return null;
4077
4078
  }
@@ -4143,7 +4144,7 @@ async function reindexLibrary(lib, library, name) {
4143
4144
  const res = await indexLibrary(lib, library, {
4144
4145
  exclude: (a) => skippedKeys.has(`${a.kind}:${a.name}`) || duplicateFiles.has(path18.resolve(a.manifestPath))
4145
4146
  });
4146
- const unparsable = res.errors.filter((e) => e.includes("ManifestSchemaError:"));
4147
+ const unparsable = res.unparsable;
4147
4148
  for (const e of res.errors) (unparsable.includes(e) ? logErr : logWarn)(e);
4148
4149
  const syncUnparsable = skipped.filter(
4149
4150
  (s) => s.reason === "unparsable" && !unparsable.some((e) => e.includes(s.file))
@@ -4153,6 +4154,15 @@ async function reindexLibrary(lib, library, name) {
4153
4154
  }
4154
4155
  for (const p6 of badRequires) logErr(`${p6.asset}: ${p6.message}`);
4155
4156
  for (const w of await unresolvedManifestDependencies(lib.path)) logWarn(w);
4157
+ const listed = loadSkPublishManifest(lib.path);
4158
+ for (const a of listed?.assets ?? []) {
4159
+ if (a.source) continue;
4160
+ const file = findEntryManifestFile(lib.path, a);
4161
+ if (!file) continue;
4162
+ for (const f of unheldRequiresOfFile(file, a.kind, composeRefs)) {
4163
+ logWarn(`${path18.relative(lib.path, file)} [${f.tag}] \u2014 ${f.text}`);
4164
+ }
4165
+ }
4156
4166
  const skippedUnparsable = unparsable.length + syncUnparsable.length;
4157
4167
  const failing = skippedUnparsable + invalidVersion.length + badRequires.length + failed.length + duplicates.length;
4158
4168
  (failing > 0 ? logWarn : logOk)(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
@@ -4218,10 +4228,10 @@ var DEPLOYED_COPY_DIRS = [
4218
4228
  async function refuseUnusableLibraryDir(dir, force = false) {
4219
4229
  const deployed = DEPLOYED_COPY_DIRS.filter((d) => {
4220
4230
  const full = path18.join(dir, d);
4221
- return fs9.existsSync(full) && fs9.statSync(full).isDirectory() && fs9.readdirSync(full).length > 0;
4231
+ return fs8.existsSync(full) && fs8.statSync(full).isDirectory() && fs8.readdirSync(full).length > 0;
4222
4232
  });
4223
4233
  if (deployed.length > 0 && !force) {
4224
- const where = fs9.existsSync(path18.join(dir, "skaile.yaml")) ? "skaile.yaml with deployed copies" : "deployed copies";
4234
+ const where = fs8.existsSync(path18.join(dir, "skaile.yaml")) ? "skaile.yaml with deployed copies" : "deployed copies";
4225
4235
  logErr(
4226
4236
  `${dir} is a project folder (${where} in ${deployed.map((d) => `${d}/`).join(", ")}): a library holds asset sources, not the copies \`skaile add\` deployed. Pick another --path for the library, or pass --force when the sources live in those folders.`
4227
4237
  );
@@ -4246,13 +4256,13 @@ function canonicalDir(dir) {
4246
4256
  const abs = path18.resolve(dir);
4247
4257
  const missing = [];
4248
4258
  let existing = abs;
4249
- while (!fs9.existsSync(existing)) {
4259
+ while (!fs8.existsSync(existing)) {
4250
4260
  const parent = path18.dirname(existing);
4251
4261
  if (parent === existing) return abs;
4252
4262
  missing.unshift(path18.basename(existing));
4253
4263
  existing = parent;
4254
4264
  }
4255
- return path18.join(fs9.realpathSync(existing), ...missing);
4265
+ return path18.join(fs8.realpathSync(existing), ...missing);
4256
4266
  }
4257
4267
  function refuseGlobalInstallFolder(name, dir) {
4258
4268
  const reserved = globalInstallDir();
@@ -4298,7 +4308,7 @@ async function refuseNestedLibraryPath(manager, dir, exceptId) {
4298
4308
  function assertCreateDirInsideLibrary(libRoot, destDir, given) {
4299
4309
  const exists = (p6) => {
4300
4310
  try {
4301
- fs9.lstatSync(p6);
4311
+ fs8.lstatSync(p6);
4302
4312
  return true;
4303
4313
  } catch {
4304
4314
  return false;
@@ -4308,12 +4318,12 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
4308
4318
  while (!exists(probe)) probe = path18.dirname(probe);
4309
4319
  let realProbe;
4310
4320
  try {
4311
- realProbe = fs9.realpathSync(probe);
4321
+ realProbe = fs8.realpathSync(probe);
4312
4322
  } catch {
4313
4323
  logErr(`--dir "${given}" passes through a broken symlink (${probe}).`);
4314
4324
  process.exit(1);
4315
4325
  }
4316
- if (!fs9.statSync(realProbe).isDirectory()) {
4326
+ if (!fs8.statSync(realProbe).isDirectory()) {
4317
4327
  logErr(`--dir "${given}": ${probe} is not a directory.`);
4318
4328
  process.exit(1);
4319
4329
  }
@@ -4332,11 +4342,11 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
4332
4342
  if (part === "" || part === ".") continue;
4333
4343
  walked = path18.join(walked, part);
4334
4344
  if (!exists(walked)) break;
4335
- if (fs9.lstatSync(walked).isSymbolicLink()) {
4345
+ if (fs8.lstatSync(walked).isSymbolicLink()) {
4336
4346
  logErr(
4337
4347
  librarySymlinkMessage({
4338
4348
  path: relParts.slice(0, i + 1).join("/"),
4339
- target: fs9.readlinkSync(walked)
4349
+ target: fs8.readlinkSync(walked)
4340
4350
  })
4341
4351
  );
4342
4352
  process.exit(1);
@@ -4344,7 +4354,7 @@ function assertCreateDirInsideLibrary(libRoot, destDir, given) {
4344
4354
  }
4345
4355
  }
4346
4356
  function adoptWritesManifest(libPath) {
4347
- if (!fs9.existsSync(path18.join(libPath, SKAILE_MANIFEST_FILENAME))) return true;
4357
+ if (!fs8.existsSync(path18.join(libPath, SKAILE_MANIFEST_FILENAME))) return true;
4348
4358
  const manifest = loadSkPublishManifest(libPath);
4349
4359
  if (!manifest || manifest.source || (manifest.assets ?? []).length > 0) return false;
4350
4360
  return manifestPublisherProblems(libPath).length === 0;
@@ -4402,8 +4412,8 @@ function pruneEmptyLibraryParents(libPath) {
4402
4412
  for (; ; ) {
4403
4413
  const rel = path18.relative(root, canonicalDir(dir));
4404
4414
  if (rel === "" || rel.startsWith("..") || path18.isAbsolute(rel)) return;
4405
- if (!fs9.existsSync(dir) || fs9.readdirSync(dir).length > 0) return;
4406
- fs9.rmdirSync(dir);
4415
+ if (!fs8.existsSync(dir) || fs8.readdirSync(dir).length > 0) return;
4416
+ fs8.rmdirSync(dir);
4407
4417
  dir = path18.dirname(dir);
4408
4418
  }
4409
4419
  }
@@ -4417,7 +4427,7 @@ function remoteBranches(url) {
4417
4427
  return r.stdout.split("\n").map((line) => line.split(" ")[1]?.replace(/^refs\/heads\//, "")).filter((b) => !!b);
4418
4428
  }
4419
4429
  async function warnIfNotGithubRemote(name, url) {
4420
- const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-VBE3X2TH.js');
4430
+ const { isGithubRemote, notGithubRemoteMessage } = await import('../library-publish-RUQTKTJU.js');
4421
4431
  if (!isGithubRemote(url)) logWarn(notGithubRemoteMessage(name, url));
4422
4432
  }
4423
4433
  function scaffoldLibraryFiles(dir, name) {
@@ -4450,8 +4460,8 @@ by the same ref.
4450
4460
  const written = [];
4451
4461
  for (const [file, content] of files) {
4452
4462
  const target = path18.join(dir, file);
4453
- if (fs9.existsSync(target)) continue;
4454
- fs9.writeFileSync(target, content, "utf8");
4463
+ if (fs8.existsSync(target)) continue;
4464
+ fs8.writeFileSync(target, content, "utf8");
4455
4465
  written.push(file);
4456
4466
  }
4457
4467
  return written;
@@ -4544,7 +4554,7 @@ function makeLibraryCommand() {
4544
4554
  const ownership = flagged[0] ?? gone?.ownership ?? "owner";
4545
4555
  const libPath = opts.path ? path18.resolve(opts.path) : path18.join(resolveLibraryDir(), name);
4546
4556
  refuseGlobalInstallFolder(name, libPath);
4547
- if (fs9.existsSync(libPath) && !fs9.statSync(libPath).isDirectory()) {
4557
+ if (fs8.existsSync(libPath) && !fs8.statSync(libPath).isDirectory()) {
4548
4558
  logErr(`${libPath} exists and is not a directory.`);
4549
4559
  process.exit(1);
4550
4560
  }
@@ -4565,7 +4575,7 @@ function makeLibraryCommand() {
4565
4575
  if (existing) await manager.removeLibrary(name);
4566
4576
  await assertLibraryPathFree(manager, libPath);
4567
4577
  await refuseNestedLibraryPath(manager, libPath);
4568
- if (fs9.existsSync(libPath)) {
4578
+ if (fs8.existsSync(libPath)) {
4569
4579
  exitOnLibrarySymlinks(libPath, `skaile library init ${name} --path ${libPath}`);
4570
4580
  await refuseUnusableLibraryDir(libPath, opts.force);
4571
4581
  }
@@ -4588,9 +4598,9 @@ function makeLibraryCommand() {
4588
4598
  backend = "git";
4589
4599
  backendConfig = { url: adopted.url, branch: adopted.branch, authHint: "ssh" };
4590
4600
  } else {
4591
- fs9.mkdirSync(libPath, { recursive: true });
4601
+ fs8.mkdirSync(libPath, { recursive: true });
4592
4602
  }
4593
- const blank = fs9.readdirSync(libPath).every((entry) => entry === ".git");
4603
+ const blank = fs8.readdirSync(libPath).every((entry) => entry === ".git");
4594
4604
  const isDefault = !hasDefault && ownership !== "reader";
4595
4605
  await manager.addLibrary({
4596
4606
  name,
@@ -4754,6 +4764,16 @@ function makeLibraryCommand() {
4754
4764
  );
4755
4765
  process.exit(1);
4756
4766
  }
4767
+ const wanted = path18.relative(libRoot, path18.join(destDir, name));
4768
+ const onDisk = (await scanUnlistedAssets(libRoot, target.name, getKindRegistry())).find(
4769
+ (u) => u.entry.kind === effectiveKind && u.entry.name === name && u.root !== wanted
4770
+ );
4771
+ if (onDisk) {
4772
+ logErr(
4773
+ `${effectiveKind}:${name} already exists at "${onDisk.root}" (not in the manifest yet) \u2014 creating it again under "${path18.relative(libRoot, destDir) || "."}" would be a duplicate. Run \`skaile library index ${target.name}\` first or pick another name.`
4774
+ );
4775
+ process.exit(1);
4776
+ }
4757
4777
  const res = am2.create(name, effectiveKind, destDir, { description: opts.description });
4758
4778
  if (!res.ok) {
4759
4779
  logErr(res.path);
@@ -4765,6 +4785,8 @@ function makeLibraryCommand() {
4765
4785
  `Description is a TODO placeholder \u2014 edit it (what the ${effectiveKind} does and when to use it) or \`skaile validate\` will fail.`
4766
4786
  );
4767
4787
  }
4788
+ const scaffoldFile = findAssetManifestFile(res.path, effectiveKind, name);
4789
+ const scaffoldProblems = scaffoldFile ? checkAssetFile(scaffoldFile, effectiveKind, getKindRegistry()) : [];
4768
4790
  const { ref } = await registerLibraryAsset(target, library, {
4769
4791
  kind: effectiveKind,
4770
4792
  name,
@@ -4772,7 +4794,13 @@ function makeLibraryCommand() {
4772
4794
  version: "0.1.0",
4773
4795
  publisher: opts.publisher
4774
4796
  });
4775
- logOk(`Indexed \u2014 add it with \`skaile add ${ref}\``);
4797
+ if (scaffoldProblems.length > 0) {
4798
+ logInfo(
4799
+ `Created ${ref}, not ready to add yet: ${scaffoldProblems[0]?.text}. Fix the file, then run \`skaile library index ${target.name}\` and \`skaile validate ${target.path}\`.`
4800
+ );
4801
+ } else {
4802
+ logOk(`Indexed \u2014 add it with \`skaile add ${ref}\``);
4803
+ }
4776
4804
  } finally {
4777
4805
  close();
4778
4806
  }
@@ -4810,12 +4838,19 @@ function makeLibraryCommand() {
4810
4838
  }
4811
4839
  const newPath = path18.join(path18.dirname(lib.path), newName);
4812
4840
  refuseGlobalInstallFolder(newName, newPath);
4813
- if (fs9.existsSync(newPath)) {
4841
+ if (fs8.existsSync(newPath)) {
4814
4842
  logErr(`Target directory already exists: ${newPath}`);
4815
4843
  process.exit(1);
4816
4844
  }
4817
- fs9.renameSync(lib.path, newPath);
4845
+ const renamedBack = renamedLibraryName(newName) === lib.name;
4846
+ fs8.renameSync(lib.path, newPath);
4818
4847
  await manager.updateLibrary(lib.id, { name: newName, path: newPath });
4848
+ if (renamedBack) {
4849
+ new AssetManager({
4850
+ registry: getKindRegistry(),
4851
+ projectDir: process.cwd()
4852
+ }).renameLockedLibrary(lib.name, newName);
4853
+ }
4819
4854
  logOk(`Renamed ${lib.name} \u2192 ${newName}`);
4820
4855
  }
4821
4856
  cmd.command("rename <old> <new>").description("Rename a library (also moves the directory)").action(async (oldName, newName) => {
@@ -4895,7 +4930,7 @@ function makeLibraryCommand() {
4895
4930
  patch.isDefault = false;
4896
4931
  } else if (field === "path") {
4897
4932
  const dir = path18.resolve(value);
4898
- if (!fs9.existsSync(dir) || !fs9.statSync(dir).isDirectory()) {
4933
+ if (!fs8.existsSync(dir) || !fs8.statSync(dir).isDirectory()) {
4899
4934
  logErr(`Directory does not exist: ${dir}. \`library set path=\` does not move files.`);
4900
4935
  process.exit(1);
4901
4936
  }
@@ -5114,16 +5149,16 @@ function makeLibraryCommand() {
5114
5149
  "With --create-repo: create the repo private (the store only accepts public repos)"
5115
5150
  ).option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
5116
5151
  async (lib, opts) => {
5117
- const { runLibraryPublish } = await import('../library-publish-VBE3X2TH.js');
5152
+ const { runLibraryPublish } = await import('../library-publish-RUQTKTJU.js');
5118
5153
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
5119
5154
  }
5120
5155
  );
5121
5156
  cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
5122
- const { runLibraryRegister } = await import('../library-publish-VBE3X2TH.js');
5157
+ const { runLibraryRegister } = await import('../library-publish-RUQTKTJU.js');
5123
5158
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
5124
5159
  });
5125
5160
  cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
5126
- const { runLibraryYank } = await import('../library-publish-VBE3X2TH.js');
5161
+ const { runLibraryYank } = await import('../library-publish-RUQTKTJU.js');
5127
5162
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
5128
5163
  });
5129
5164
  return cmd;
@@ -5783,7 +5818,7 @@ function scheduleSoftDepPreview() {
5783
5818
  }
5784
5819
  async function loadAssets() {
5785
5820
  softDepPreviewCache.clear();
5786
- const { gatherAssetFeeds } = await import('../asset-feeds-WAKBHGEV.js');
5821
+ const { gatherAssetFeeds } = await import('../asset-feeds-QGLI3AXI.js');
5787
5822
  const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
5788
5823
  if (notes.length > 0) {
5789
5824
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -5987,7 +6022,7 @@ function reconcileCollapsedSets(rows) {
5987
6022
  async function loadSourcesAndLibraries() {
5988
6023
  try {
5989
6024
  const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
5990
- import('../open-library-JP5TC5UX.js'),
6025
+ import('../open-library-PVTIUQUF.js'),
5991
6026
  import('../core/index.js')
5992
6027
  ]);
5993
6028
  const { manager, library, close } = await openLibraryManager2();
@@ -7890,13 +7925,22 @@ function repoPublisher(root) {
7890
7925
  }
7891
7926
  return DEFAULT_PUBLISHER;
7892
7927
  }
7893
- function planBundles(root, skaileYamls, publisher, notes, manual) {
7928
+ function planBundles(root, skaileYamls, publisher, notes, manual, conflicts) {
7894
7929
  const changes = [];
7895
7930
  const presets = [];
7896
7931
  const handled = /* @__PURE__ */ new Set();
7932
+ const claimed = /* @__PURE__ */ new Map();
7897
7933
  const rel = (p6) => posix2(path18__default.relative(root, p6));
7898
7934
  const convert = (name, bundleFile, dir) => {
7899
7935
  const target = path18__default.join(dir === root ? path18__default.join(dir, name) : dir, `${name}.preset.yaml`);
7936
+ const origin = bundleFile ? rel(bundleFile) : `${rel(path18__default.join(dir, "skills")) || "skills"}/`;
7937
+ const earlier = claimed.get(target);
7938
+ if (earlier !== void 0) {
7939
+ conflicts.push(
7940
+ `${earlier} and ${origin} both become ${rel(target)}: rename one bundle first. Nothing was changed.`
7941
+ );
7942
+ return;
7943
+ }
7900
7944
  if (existsSync(target)) {
7901
7945
  manual.push(`${rel(target)} already exists; bundle ${name} not converted`);
7902
7946
  return;
@@ -7932,6 +7976,7 @@ function planBundles(root, skaileYamls, publisher, notes, manual) {
7932
7976
  );
7933
7977
  return;
7934
7978
  }
7979
+ claimed.set(target, origin);
7935
7980
  const after = presetText(name, description, refs, version);
7936
7981
  if (before !== void 0 && bundleFile) {
7937
7982
  changes.push({ type: "move", from: bundleFile, to: target, before, after });
@@ -8061,6 +8106,7 @@ function planAssetMigration(options) {
8061
8106
  const knownKinds = new Set(options.registry.getAllKinds());
8062
8107
  const notes = [];
8063
8108
  const manual = [];
8109
+ const conflicts = [];
8064
8110
  const unknownTypes = [];
8065
8111
  const { moves, changes: moveChanges } = planMarkdownMoves(root, knownKinds, manual, unknownTypes);
8066
8112
  for (const move of moves) {
@@ -8081,7 +8127,7 @@ function planAssetMigration(options) {
8081
8127
  }
8082
8128
  }
8083
8129
  const publisher = repoPublisher(root);
8084
- const bundleChanges = planBundles(root, skaileYamls, publisher, notes, manual);
8130
+ const bundleChanges = planBundles(root, skaileYamls, publisher, notes, manual, conflicts);
8085
8131
  const skaileChanges = skaileYamls.flatMap(
8086
8132
  ({ file, source }) => planSkaileYaml(root, file, source, notes, manual)
8087
8133
  );
@@ -8089,6 +8135,7 @@ function planAssetMigration(options) {
8089
8135
  changes: [...moveChanges, ...agentChanges, ...bundleChanges, ...skaileChanges],
8090
8136
  notes,
8091
8137
  manual,
8138
+ conflicts,
8092
8139
  unknownTypes
8093
8140
  };
8094
8141
  }
@@ -8475,7 +8522,8 @@ Rewrites (run on a repo root):
8475
8522
  agent persona:/rules: refs to the old path become composes items
8476
8523
  *.bundle.yaml <name>.preset.yaml beside it, or <name>/<name>.preset.yaml
8477
8524
  for a bundle at the repo root (items: kind:@publisher/name);
8478
- kind: bundle entries of skaile.yaml#assets become kind: preset
8525
+ kind: bundle entries of skaile.yaml#assets become kind: preset;
8526
+ two bundles with one name are refused (exit 1, nothing written)
8479
8527
  skaile.yaml dependencies bundle:@... -> preset:@...
8480
8528
  skaile.yaml publisher/version/assets
8481
8529
  -> skaile.manifest.yaml (publisher without "@"); keys removed,
@@ -8553,6 +8601,11 @@ async function runMigrateAssets(root, opts) {
8553
8601
  root: path18__default.resolve(root ?? base),
8554
8602
  registry: getKindRegistry()
8555
8603
  });
8604
+ if (plan.conflicts.length > 0) {
8605
+ for (const conflict of plan.conflicts) logErr(conflict);
8606
+ process.exitCode = 1;
8607
+ return;
8608
+ }
8556
8609
  for (const note of plan.notes) console.log(` ${note}`);
8557
8610
  for (const note of plan.manual) logWarn(note);
8558
8611
  for (const { file, type } of plan.unknownTypes) {
@@ -8702,6 +8755,12 @@ function outdatedStatus(e) {
8702
8755
  if (e.contentChanged) {
8703
8756
  return `${e.currentVersion} content changed since lock ${S.dim(`(library ${e.library})`)}${moves}`;
8704
8757
  }
8758
+ if (e.pinned && e.latestVersion !== void 0) {
8759
+ return `locked ${e.currentVersion} (latest ${e.latestVersion}, pinned in skaile.yaml)`;
8760
+ }
8761
+ if (e.library !== void 0 && e.libraryOlder !== void 0) {
8762
+ return `library is at ${e.libraryOlder}, locked ${e.currentVersion} ${S.dim(`(library ${e.library})`)}${moves}`;
8763
+ }
8705
8764
  if (e.library !== void 0 && e.latestVersion !== void 0) {
8706
8765
  return `${e.currentVersion} \u2192 ${e.latestVersion} ${S.dim(`(library ${e.library})`)}${moves}`;
8707
8766
  }
@@ -8743,7 +8802,7 @@ function makeOutdatedCommand() {
8743
8802
  );
8744
8803
  }
8745
8804
  console.log();
8746
- if (filtered.some((e) => e.problem === void 0)) {
8805
+ if (filtered.some((e) => e.problem === void 0 && !e.pinned)) {
8747
8806
  logWarn(`Run ${S.cmd("skaile update")} to re-lock and re-deploy.`);
8748
8807
  }
8749
8808
  if (filtered.some((e) => e.problem !== void 0 && !e.manualFix)) {
@@ -8825,7 +8884,7 @@ function action2(fn) {
8825
8884
  };
8826
8885
  }
8827
8886
  async function reconcileAndReport(projectDir, plugins, opts = {}) {
8828
- const { reconcilePlugins } = await import('../plugin-store-QOQDM24E.js');
8887
+ const { reconcilePlugins } = await import('../plugin-store-G2GWAHSD.js');
8829
8888
  if (plugins.length === 0) {
8830
8889
  logInfo("No plugins declared \u2014 nothing to reconcile.");
8831
8890
  return;
@@ -8840,7 +8899,7 @@ async function reconcileAndReport(projectDir, plugins, opts = {}) {
8840
8899
  }
8841
8900
  }
8842
8901
  async function verifyPluginLoads(projectDir, spec) {
8843
- const { loadPlugins } = await import('../plugin-store-QOQDM24E.js');
8902
+ const { loadPlugins } = await import('../plugin-store-G2GWAHSD.js');
8844
8903
  const { createPluginRegistry } = await import('../plugin-registry/index.js');
8845
8904
  const registry = createPluginRegistry();
8846
8905
  const result = await loadPlugins(projectDir, [spec], registry);
@@ -8854,7 +8913,7 @@ async function verifyPluginLoads(projectDir, spec) {
8854
8913
  async function runInstall2(spec, opts) {
8855
8914
  const projectDir = path18__default.resolve(opts.projectDir);
8856
8915
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
8857
- const { specName, rollbackPluginStore } = await import('../plugin-store-QOQDM24E.js');
8916
+ const { specName, rollbackPluginStore } = await import('../plugin-store-G2GWAHSD.js');
8858
8917
  const yamlPath = path18__default.join(projectDir, "skaile.yaml");
8859
8918
  if (!existsSync(yamlPath)) {
8860
8919
  throw new Error(`no skaile.yaml in ${projectDir}; run \`skaile init\` first`);
@@ -8883,7 +8942,7 @@ async function runInstall2(spec, opts) {
8883
8942
  async function runRemove(name, opts) {
8884
8943
  const projectDir = path18__default.resolve(opts.projectDir);
8885
8944
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
8886
- const { specName } = await import('../plugin-store-QOQDM24E.js');
8945
+ const { specName } = await import('../plugin-store-G2GWAHSD.js');
8887
8946
  const yamlPath = path18__default.join(projectDir, "skaile.yaml");
8888
8947
  if (!existsSync(yamlPath)) {
8889
8948
  logInfo(`No plugin matching ${S.cmd(name)}: there is no skaile.yaml in ${projectDir}.`);
@@ -8915,7 +8974,7 @@ async function runList(opts) {
8915
8974
  const registry = createPluginRegistry();
8916
8975
  if (declared.length > 0) {
8917
8976
  try {
8918
- const { loadPlugins } = await import('../plugin-store-QOQDM24E.js');
8977
+ const { loadPlugins } = await import('../plugin-store-G2GWAHSD.js');
8919
8978
  const result = await loadPlugins(projectDir, declared, registry);
8920
8979
  for (const f of result.failed) logWarn(f.error);
8921
8980
  } catch (err) {
@@ -9529,6 +9588,7 @@ async function runPresetInstall(projectDir) {
9529
9588
  logInfo("Installing new dependencies\u2026");
9530
9589
  const result = await am2.install({});
9531
9590
  for (const d of result.deployed) logOk(d);
9591
+ await pinComposedAgents(projectDir);
9532
9592
  for (const m of result.missing) logErr(`Missing: ${m}${result.missingHints?.[m] ?? ""}`);
9533
9593
  if (reportStoreNotChecked(result.storeNotChecked)) process.exitCode = 1;
9534
9594
  await reportInstalledSoftDeps(am2);
@@ -9764,38 +9824,11 @@ function makeRebuildCommand() {
9764
9824
  logInfo(`Written: ${result.manifestPath}`);
9765
9825
  });
9766
9826
  }
9767
-
9768
- // cli/src/driver-error.ts
9769
- function friendlyDriverError(err) {
9770
- const e = err;
9771
- if (!e) return null;
9772
- const isSpawnEnoent = e.code === "ENOENT" && (e.syscall?.startsWith("spawn") === true || /^spawn .*ENOENT/.test(e.message ?? ""));
9773
- const isConfig = e.category === "config" || e.detail?.category === "config";
9774
- if (!isSpawnEnoent && !isConfig) return null;
9775
- const hint = e.hint ?? e.detail?.hint;
9776
- const base = hint ?? "The configured agent binary is not installed or not on your PATH.";
9777
- return `${base}
9778
- Try a different harness with \`--driver claude-sdk\`.`;
9779
- }
9780
- function driverErrorNotes(err) {
9781
- const e = err;
9782
- const notes = [];
9783
- const category = e?.category ?? e?.detail?.category;
9784
- const hint = e?.hint ?? e?.detail?.hint;
9785
- if (hint && category !== "config") notes.push(hint);
9786
- else if (category === "auth") notes.push("Check your API key or login.");
9787
- if (e?.logSessionId) {
9788
- notes.push(`Full records: .skaile/logs.db (skaile session logs ${e.logSessionId}).`);
9789
- }
9790
- return notes;
9791
- }
9792
-
9793
- // cli/src/commands/run.ts
9794
9827
  function resolveSingleShotAgentDir(projectDir, agentDefinition) {
9795
9828
  if (!agentDefinition) return resolveAgentDir(projectDir);
9796
9829
  const asPath = agentDefinition.endsWith("agent.yaml") ? path18__default.dirname(path18__default.resolve(projectDir, agentDefinition)) : agentDefinition;
9797
9830
  const dir = resolveAgentDefinitionDir(projectDir, asPath);
9798
- if (!dir || !fs9__default.existsSync(path18__default.join(dir, "agent.yaml"))) {
9831
+ if (!dir || !fs8__default.existsSync(path18__default.join(dir, "agent.yaml"))) {
9799
9832
  throw new Error(
9800
9833
  `--agent-definition "${agentDefinition}" does not resolve to an agent directory with agent.yaml${dir ? ` (looked in ${dir})` : ""}`
9801
9834
  );
@@ -9855,11 +9888,11 @@ async function findSkillFile(projectDir, skill) {
9855
9888
  const name = skill.trim().replace(/^skill:/, "").replace(/^@[^/]+\//, "").replace(/#.*$/, "");
9856
9889
  for (const target of SUPPORTED_DRIVER_TARGETS) {
9857
9890
  const file = path18__default.join(deployedDir("skill", name, target, false, projectDir), "SKILL.md");
9858
- if (fs9__default.existsSync(file)) return file;
9891
+ if (fs8__default.existsSync(file)) return file;
9859
9892
  }
9860
9893
  const am2 = new AssetManager({ registry: getKindRegistry(), projectDir });
9861
9894
  const entry = await am2.info(`skill:${name}`);
9862
- return entry?.source && fs9__default.existsSync(entry.source) ? entry.source : void 0;
9895
+ return entry?.source && fs8__default.existsSync(entry.source) ? entry.source : void 0;
9863
9896
  }
9864
9897
  async function printSkillDryRun(projectDir, skill) {
9865
9898
  const file = await findSkillFile(projectDir, skill);
@@ -9869,7 +9902,7 @@ async function printSkillDryRun(projectDir, skill) {
9869
9902
  );
9870
9903
  return false;
9871
9904
  }
9872
- const content = fs9__default.readFileSync(file, "utf-8");
9905
+ const content = fs8__default.readFileSync(file, "utf-8");
9873
9906
  const { data } = parseFrontmatter(content);
9874
9907
  const meta = data.metadata ?? {};
9875
9908
  console.log(` ${S.label("Skill:")} ${S.heading(String(data.name ?? skill))}`);
@@ -9991,9 +10024,11 @@ function makeRunCommand() {
9991
10024
  }
9992
10025
  let flowId = positional[0];
9993
10026
  if (!flowId) {
9994
- const flows = await discoverFlowsWithLibraries(projectDir);
10027
+ const flows = discoverProjectFlows(projectDir);
9995
10028
  if (flows.length === 0) {
9996
- logErr("No flows available.");
10029
+ logErr(
10030
+ "No flows available in this project. Add one with `skaile add flow:@<publisher>/<name>`."
10031
+ );
9997
10032
  process.exit(1);
9998
10033
  }
9999
10034
  const selected = await p4.select({
@@ -10016,6 +10051,11 @@ function makeRunCommand() {
10016
10051
  });
10017
10052
  const driver = config.driver ?? DEFAULT_DRIVER_ID;
10018
10053
  const model = config.model;
10054
+ const unknownDriver = unknownDriverMessage(driver);
10055
+ if (unknownDriver) {
10056
+ logErr(unknownDriver);
10057
+ process.exit(1);
10058
+ }
10019
10059
  const providerRefusal = checkModelProvider(driver, {
10020
10060
  registry: loadRegistryView({ projectDir }).merged,
10021
10061
  model
@@ -10024,11 +10064,7 @@ function makeRunCommand() {
10024
10064
  logErr(providerRefusal);
10025
10065
  process.exit(1);
10026
10066
  }
10027
- const flowPath = await findFlowFileWithLibraries(
10028
- flowId,
10029
- projectAiAssetsRoots(projectDir),
10030
- projectDir
10031
- );
10067
+ const flowPath = findProjectFlowFile(flowId, projectDir);
10032
10068
  if (flowPath && agentDefinition) {
10033
10069
  logErr(
10034
10070
  `--agent-definition cannot be combined with flow "${flowId}": a flow runs on the project's session agent. Drop --agent-definition, or run a single-shot prompt instead.`
@@ -10046,7 +10082,13 @@ function makeRunCommand() {
10046
10082
  const promptOnlyOption = agentDefinition !== void 0 || instanceId2 !== void 0 || opts.skill !== void 0;
10047
10083
  if (!textPrompt.trim() || positional.length === 1 && !/\s/.test(flowId) && !promptOnlyOption) {
10048
10084
  logErr(`Flow not found: ${flowId}`);
10049
- const available = (await discoverFlowsWithLibraries(projectDir)).map((f) => f.id);
10085
+ const inLibrary = await findLibraryFlow(flowId);
10086
+ if (inLibrary) {
10087
+ console.log(
10088
+ ` The library "${inLibrary.library}" has it, but this project does not: run ${S.cmd(`skaile add ${inLibrary.ref}`)} first.`
10089
+ );
10090
+ }
10091
+ const available = discoverProjectFlows(projectDir).map((f) => f.id);
10050
10092
  const near = available.filter((id) => isNearFlowId(flowId, id));
10051
10093
  const listed = near.length > 0 ? near : available;
10052
10094
  if (listed.length > 0) {
@@ -10247,13 +10289,13 @@ function makeReplCommand() {
10247
10289
  p4.cancel("Cancelled.");
10248
10290
  process.exit(0);
10249
10291
  }
10250
- const tmpDir = fs9__default.mkdtempSync(path18__default.join(os2.tmpdir(), "skaile-repl-"));
10292
+ const tmpDir = fs8__default.mkdtempSync(path18__default.join(os2.tmpdir(), "skaile-repl-"));
10251
10293
  projectDir = tmpDir;
10252
10294
  agentCwd = userCwd;
10253
10295
  logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
10254
10296
  if (!driverOverride) {
10255
10297
  const claudeDir = path18__default.join(os2.homedir(), ".claude");
10256
- if (fs9__default.existsSync(claudeDir)) {
10298
+ if (fs8__default.existsSync(claudeDir)) {
10257
10299
  driverOverride = "claude-sdk";
10258
10300
  logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} harness`);
10259
10301
  } else {
@@ -10392,7 +10434,18 @@ function makeServeCommand() {
10392
10434
  process.exitCode = 1;
10393
10435
  return;
10394
10436
  }
10395
- const managedCodex = opts.managedCodexConfig ? loadManagedCodexHostConfig(opts.managedCodexConfig, opts.projectDir) : void 0;
10437
+ let managedCodex;
10438
+ if (opts.managedCodexConfig) {
10439
+ try {
10440
+ managedCodex = loadManagedCodexHostConfig(opts.managedCodexConfig, opts.projectDir);
10441
+ } catch {
10442
+ logErr(
10443
+ `--managed-codex-config: '${opts.managedCodexConfig}' is missing or invalid. Give the absolute path of a private host configuration file (readable by its owner only, outside the project).`
10444
+ );
10445
+ process.exitCode = 1;
10446
+ return;
10447
+ }
10448
+ }
10396
10449
  if (managedCodex) {
10397
10450
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
10398
10451
  if (resolveSkWorkspaceConfig2(opts.projectDir).plugins?.length)
@@ -10402,7 +10455,7 @@ function makeServeCommand() {
10402
10455
  }
10403
10456
  const providers = parseProviderIds(opts.providers);
10404
10457
  const modelEndpoint = parseModelEndpointFlag(opts.modelEndpoint);
10405
- const { checkDriverSdk, checkModelEndpointPeer } = await import('../serve-preflight-BTGTZUDN.js');
10458
+ const { checkDriverSdk, checkModelEndpointPeer, checkServeModel } = await import('../serve-preflight-QXRKGOI5.js');
10406
10459
  const driverProblem = managedCodex ? null : await checkDriverSdk(opts.projectDir, opts.driver);
10407
10460
  if (driverProblem) {
10408
10461
  logErr(driverProblem);
@@ -10415,6 +10468,16 @@ function makeServeCommand() {
10415
10468
  process.exitCode = 1;
10416
10469
  return;
10417
10470
  }
10471
+ const modelProblem = managedCodex ? null : await checkServeModel(opts.projectDir, {
10472
+ driver: opts.driver,
10473
+ model: opts.model,
10474
+ providers
10475
+ });
10476
+ if (modelProblem) {
10477
+ logErr(modelProblem);
10478
+ process.exitCode = 1;
10479
+ return;
10480
+ }
10418
10481
  try {
10419
10482
  await startAgentServer({
10420
10483
  port,
@@ -10453,12 +10516,12 @@ function makeServeCommand() {
10453
10516
  );
10454
10517
  }
10455
10518
  async function ensurePluginsLoadedForServe(projectDir) {
10456
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-R22QNPFN.js');
10519
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-34QNVIGB.js');
10457
10520
  try {
10458
10521
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
10459
10522
  const config = resolveSkWorkspaceConfig2(projectDir);
10460
10523
  if (!config.plugins || config.plugins.length === 0) return;
10461
- const { ensurePluginsLoaded } = await import('../plugin-store-QOQDM24E.js');
10524
+ const { ensurePluginsLoaded } = await import('../plugin-store-G2GWAHSD.js');
10462
10525
  const { pluginRegistry } = await import('../plugin-registry/index.js');
10463
10526
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
10464
10527
  if (result.loaded.length > 0) {
@@ -10472,14 +10535,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
10472
10535
  }
10473
10536
  }
10474
10537
  async function runCompileTest(opts) {
10475
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-R22QNPFN.js');
10538
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-34QNVIGB.js');
10476
10539
  const { tmpdir } = await import('os');
10477
10540
  const { dirname: dirname3, join: join6, resolve: resolve4 } = await import('path');
10478
10541
  const { fileURLToPath: fileURLToPath2 } = await import('url');
10479
- const { unlinkSync, existsSync: existsSync22 } = await import('fs');
10542
+ const { unlinkSync, existsSync: existsSync21 } = await import('fs');
10480
10543
  const { spawn } = await import('child_process');
10481
10544
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
10482
- const { MONOREPO_ROOT } = await import('../paths-BFM6K2QO.js');
10545
+ const { MONOREPO_ROOT } = await import('../paths-JLNX7Y4X.js');
10483
10546
  if (MONOREPO_ROOT === null) {
10484
10547
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
10485
10548
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
@@ -10541,7 +10604,7 @@ async function runCompileTest(opts) {
10541
10604
  } catch {
10542
10605
  }
10543
10606
  try {
10544
- if (existsSync22(outfile)) unlinkSync(outfile);
10607
+ if (existsSync21(outfile)) unlinkSync(outfile);
10545
10608
  } catch {
10546
10609
  }
10547
10610
  }
@@ -11292,12 +11355,12 @@ async function showAsset(am2, kind, name) {
11292
11355
  logErr(err instanceof Error ? err.message : String(err));
11293
11356
  process.exit(1);
11294
11357
  }
11295
- if (entry?.source && fs9__default.existsSync(entry.source)) {
11358
+ if (entry?.source && fs8__default.existsSync(entry.source)) {
11296
11359
  console.log();
11297
11360
  console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
11298
11361
  console.log(` ${S.rule(40)}`);
11299
11362
  console.log();
11300
- console.log(fs9__default.readFileSync(entry.source, "utf-8"));
11363
+ console.log(fs8__default.readFileSync(entry.source, "utf-8"));
11301
11364
  return;
11302
11365
  }
11303
11366
  logErr(`Asset not found: ${kind}:${name}`);
@@ -11418,8 +11481,8 @@ function makeStoreCommand() {
11418
11481
  "--all",
11419
11482
  `List every match (default: ${STORE_ROW_LIMIT} rows, only what \`skaile add\` can install)`
11420
11483
  ).option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
11421
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-JP5TC5UX.js');
11422
- const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-RBELV5YH.js');
11484
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PVTIUQUF.js');
11485
+ const { getKnownKinds: getKnownKinds2 } = await import('../open-registry-SOIS3TA2.js');
11423
11486
  const projectDir = path18__default.resolve(opts.projectDir);
11424
11487
  if (opts.kind && !getKnownKinds2().has(opts.kind)) {
11425
11488
  logErr(
@@ -11477,8 +11540,8 @@ function makeStoreCommand() {
11477
11540
  }
11478
11541
  });
11479
11542
  store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
11480
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-JP5TC5UX.js');
11481
- const { supportsInstallManifest: supportsInstallManifest2 } = await import('../project-6ETXGQWD.js');
11543
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError: LocalCatalogDisabledError2 } = await import('../open-library-PVTIUQUF.js');
11544
+ const { supportsInstallManifest: supportsInstallManifest2 } = await import('../project-EX47PUBN.js');
11482
11545
  try {
11483
11546
  parseAssetRef(ref);
11484
11547
  } catch (e) {
@@ -11740,6 +11803,7 @@ function makeUpdateCommand() {
11740
11803
  reportReplaced(result.replaced);
11741
11804
  reportRelocked(result.relocked);
11742
11805
  reportMoved(result.moved);
11806
+ await pinComposedAgents(projectDir);
11743
11807
  const changed = result.deployed.length > 0 || result.removed.length > 0 || !!result.replaced?.length || !!result.moved?.length || !!result.relocked?.length;
11744
11808
  if (result.lockWritten) {
11745
11809
  logInfo(`Lock file written: ${S.dim("skaile.lock.yaml")}`);
@@ -11871,6 +11935,7 @@ async function updateOne(am2, projectDir, target) {
11871
11935
  return;
11872
11936
  }
11873
11937
  spinner.stop(process.exitCode === 1 ? "Failed" : "Done");
11938
+ await pinComposedAgents(projectDir);
11874
11939
  for (const d of deployed) logOk(`Updated ${d}`);
11875
11940
  if (deployed.length > 0) return;
11876
11941
  if (readText2(lockPath) !== before) logInfo(`Re-locked ${target.ref}`);
@@ -12264,29 +12329,29 @@ async function runInit(projectDir, opts) {
12264
12329
  const resolved = path18__default.resolve(projectDir ?? ".");
12265
12330
  const projectName = path18__default.basename(resolved);
12266
12331
  const created = [];
12267
- const { existsSync: existsSync22 } = await import('fs');
12268
- if (!existsSync22(resolved)) {
12332
+ const { existsSync: existsSync21 } = await import('fs');
12333
+ if (!existsSync21(resolved)) {
12269
12334
  mkdirSync5(resolved, { recursive: true });
12270
12335
  created.push(".");
12271
12336
  }
12272
12337
  const skaileDir = path18__default.join(resolved, ".skaile");
12273
- if (!existsSync22(skaileDir)) {
12338
+ if (!existsSync21(skaileDir)) {
12274
12339
  mkdirSync5(path18__default.join(skaileDir, "sessions"), { recursive: true });
12275
12340
  created.push(".skaile/");
12276
12341
  }
12277
12342
  const settingsPath = path18__default.join(skaileDir, "settings.json");
12278
- if (!existsSync22(settingsPath)) {
12343
+ if (!existsSync21(settingsPath)) {
12279
12344
  writeFileSync7(settingsPath, "{}\n");
12280
12345
  created.push(".skaile/settings.json");
12281
12346
  }
12282
12347
  const wsConfigPath = path18__default.join(resolved, "skaile.yaml");
12283
- if (!existsSync22(wsConfigPath)) {
12348
+ if (!existsSync21(wsConfigPath)) {
12284
12349
  writeFileSync7(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
12285
12350
  created.push("skaile.yaml");
12286
12351
  }
12287
12352
  for (const dir of new Set(Object.values(DRIVER_TARGETS2[harness].local))) {
12288
12353
  const full = path18__default.join(resolved, dir);
12289
- if (!existsSync22(full)) {
12354
+ if (!existsSync21(full)) {
12290
12355
  mkdirSync5(full, { recursive: true });
12291
12356
  created.push(`${dir}/`);
12292
12357
  }
@@ -12316,7 +12381,7 @@ function buildInitWorkspaceConfig(projectName, harness) {
12316
12381
  }
12317
12382
  async function initGitScaffold(resolved, created) {
12318
12383
  const { execSync: execSync2 } = await import('child_process');
12319
- const { existsSync: existsSync22, readFileSync: readFileSync13, writeFileSync: writeFileSync7 } = await import('fs');
12384
+ const { existsSync: existsSync21, readFileSync: readFileSync13, writeFileSync: writeFileSync7 } = await import('fs');
12320
12385
  const gitignorePath = path18__default.join(resolved, ".gitignore");
12321
12386
  const entries = [
12322
12387
  "node_modules/",
@@ -12345,11 +12410,14 @@ async function initGitScaffold(resolved, created) {
12345
12410
  // extension: it is committed, so it is not listed here.
12346
12411
  ".codex/config.toml",
12347
12412
  ".skaile/plugin-state.json",
12413
+ // `.mcp.json` and `.skaile/assets/` are committed on purpose, so they are not listed: the
12414
+ // entries use `.` for the project root and secrets are only `${NAME}` references, so the
12415
+ // files read the same in every clone (p1294).
12348
12416
  "*.log",
12349
12417
  ".env",
12350
12418
  ".env.local"
12351
12419
  ];
12352
- const existing = existsSync22(gitignorePath) ? readFileSync13(gitignorePath, "utf-8") : "";
12420
+ const existing = existsSync21(gitignorePath) ? readFileSync13(gitignorePath, "utf-8") : "";
12353
12421
  const have = new Set(existing.split("\n").map((l) => l.trim()));
12354
12422
  const append = entries.filter((e) => !have.has(e));
12355
12423
  if (append.length > 0) {
@@ -12358,7 +12426,7 @@ async function initGitScaffold(resolved, created) {
12358
12426
  `);
12359
12427
  if (!existing) created.push(".gitignore");
12360
12428
  }
12361
- if (!existsSync22(path18__default.join(resolved, ".git"))) {
12429
+ if (!existsSync21(path18__default.join(resolved, ".git"))) {
12362
12430
  try {
12363
12431
  execSync2("git init", { cwd: resolved, stdio: "pipe" });
12364
12432
  created.push(".git/");
@@ -12370,10 +12438,10 @@ async function initGitScaffold(resolved, created) {
12370
12438
  }
12371
12439
  async function bootstrapUserConfig() {
12372
12440
  try {
12373
- const fs12 = await import('fs');
12441
+ const fs11 = await import('fs');
12374
12442
  const { userConfigPath: userConfigPath3, saveConfig, getConfigDefaults } = await import('../library/index.js');
12375
12443
  const userCfgPath = userConfigPath3();
12376
- if (!fs12.existsSync(userCfgPath)) {
12444
+ if (!fs11.existsSync(userCfgPath)) {
12377
12445
  const defaults = getConfigDefaults();
12378
12446
  saveConfig(userCfgPath, {
12379
12447
  catalog: { url: defaults.catalog.url, cache_ttl: defaults.catalog.cache_ttl }
@@ -12388,7 +12456,7 @@ async function bootstrapUserConfig() {
12388
12456
  }
12389
12457
  async function hydrateInitSources(resolved, created) {
12390
12458
  try {
12391
- const { ensureSourcesCloned } = await import('../ensure-sources-CEFODJCE.js');
12459
+ const { ensureSourcesCloned } = await import('../ensure-sources-GKVLE6L5.js');
12392
12460
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
12393
12461
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
12394
12462
  if (hydrate.failed.length > 0) {
@@ -12428,7 +12496,7 @@ function printInitSummary(resolved, projectDir, created) {
12428
12496
  console.log();
12429
12497
  }
12430
12498
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
12431
- const { cmdSetup } = await import('../setup-JQDTYPSD.js');
12499
+ const { cmdSetup } = await import('../setup-AFZQNGKA.js');
12432
12500
  await cmdSetup([], { projectDir: process.cwd() });
12433
12501
  });
12434
12502
  program.addCommand(makeInstallCommand());
@@ -12502,6 +12570,20 @@ program.command("path").description("Show resolved paths (honours SKAILE_HOME an
12502
12570
  console.log();
12503
12571
  });
12504
12572
  program.addCommand(makeCompleteCommand(program));
12573
+ program.hook("postAction", async (_thisCommand, actionCommand) => {
12574
+ if (actionCommand.parent !== program) return;
12575
+ if (!["add", "remove", "install", "update"].includes(actionCommand.name())) return;
12576
+ const opts = actionCommand.opts();
12577
+ if (opts.global || opts.dryRun) return;
12578
+ const projectDir = path18__default.resolve(opts.projectDir ?? process.cwd());
12579
+ const { refreshPluginSkills } = await import('../claude-code-2PU7TITZ.js');
12580
+ try {
12581
+ if (await refreshPluginSkills(projectDir)) {
12582
+ logInfo(`Updated ${S.cmd(".claude/plugins/skaile/skills")} (the --full plugin copy)`);
12583
+ }
12584
+ } catch {
12585
+ }
12586
+ });
12505
12587
  process.stdout.on("error", (err) => {
12506
12588
  if (err.code === "EPIPE") process.exit(0);
12507
12589
  throw err;
@@ -12521,7 +12603,7 @@ try {
12521
12603
  process.exit(1);
12522
12604
  }
12523
12605
  const { LibrarySyncError } = await import('../library/index.js');
12524
- if (!(err instanceof LibrarySyncError || err instanceof LibraryEntryError || err instanceof SourceEntryError))
12606
+ if (!(err instanceof LibrarySyncError || err instanceof LibraryEntryError || err instanceof SourceEntryError || err instanceof LegacyKeyError))
12525
12607
  throw err;
12526
12608
  logErr(err.message);
12527
12609
  process.exit(1);