@skaile/workspaces 6.9.0 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/ai-sdk.js +8 -8
  3. package/dist/{asset-feeds-JWRIWLVX.js → asset-feeds-UG3PG423.js} +22 -22
  4. package/dist/{asset-feeds-JWRIWLVX.js.map → asset-feeds-UG3PG423.js.map} +1 -1
  5. package/dist/asset-manager/catalog-deployer.js +8 -8
  6. package/dist/asset-manager/history.js +8 -8
  7. package/dist/asset-manager/index.js +14 -14
  8. package/dist/asset-manager/installer.js +9 -9
  9. package/dist/asset-manager/renderers.js +8 -8
  10. package/dist/asset-manager/src/harness-switch-state.d.ts +30 -0
  11. package/dist/asset-manager/src/harness-switch-state.d.ts.map +1 -0
  12. package/dist/asset-manager/src/index.d.ts +49 -12
  13. package/dist/asset-manager/src/index.d.ts.map +1 -1
  14. package/dist/asset-manager/src/mcp-config.d.ts +6 -0
  15. package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
  16. package/dist/bridge/codex-app-server.js +1 -2
  17. package/dist/bridge/harnesses/claude-sdk.js +11 -11
  18. package/dist/bridge/harnesses/codex.js +15 -1926
  19. package/dist/bridge/harnesses/codex.js.map +1 -1
  20. package/dist/bridge/harnesses/continue.js +11 -11
  21. package/dist/bridge/harnesses/echo.js +3 -3
  22. package/dist/bridge/harnesses/gemini.js +6 -6
  23. package/dist/bridge/harnesses/goose.js +11 -11
  24. package/dist/bridge/harnesses/omp.js +61 -9
  25. package/dist/bridge/harnesses/omp.js.map +1 -1
  26. package/dist/bridge/harnesses/opencode.js +11 -11
  27. package/dist/bridge/harnesses/qwen.js +6 -6
  28. package/dist/bridge/index.js +17 -16
  29. package/dist/bridge/src/harness-model-check.d.ts +5 -4
  30. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  31. package/dist/bridge/src/harnesses/codex.d.ts +13 -0
  32. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  33. package/dist/bridge/src/harnesses/omp.d.ts +22 -0
  34. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  35. package/dist/bridge/src/index.d.ts +1 -0
  36. package/dist/bridge/src/index.d.ts.map +1 -1
  37. package/dist/{chunk-XPKUFOS3.js → chunk-2D6HZAO5.js} +8 -8
  38. package/dist/{chunk-XPKUFOS3.js.map → chunk-2D6HZAO5.js.map} +1 -1
  39. package/dist/chunk-2MUUPRIG.js +688 -0
  40. package/dist/chunk-2MUUPRIG.js.map +1 -0
  41. package/dist/{chunk-TMQFOJ6F.js → chunk-2PVYDAFN.js} +3 -3
  42. package/dist/{chunk-TMQFOJ6F.js.map → chunk-2PVYDAFN.js.map} +1 -1
  43. package/dist/{chunk-YGT3CGPD.js → chunk-2U67XYZM.js} +3 -3
  44. package/dist/{chunk-YGT3CGPD.js.map → chunk-2U67XYZM.js.map} +1 -1
  45. package/dist/{chunk-5NTB64PW.js → chunk-375HN3FD.js} +18 -14
  46. package/dist/chunk-375HN3FD.js.map +1 -0
  47. package/dist/{chunk-23Q5LT4U.js → chunk-4I4SBOCS.js} +345 -88
  48. package/dist/chunk-4I4SBOCS.js.map +1 -0
  49. package/dist/{chunk-WPLZGT5Z.js → chunk-4Z4RULWQ.js} +59 -31
  50. package/dist/chunk-4Z4RULWQ.js.map +1 -0
  51. package/dist/{chunk-72BDCGBB.js → chunk-5JBMYZNA.js} +3 -3
  52. package/dist/{chunk-72BDCGBB.js.map → chunk-5JBMYZNA.js.map} +1 -1
  53. package/dist/{chunk-3EPRTMXY.js → chunk-5KQFR4D7.js} +6 -6
  54. package/dist/{chunk-3EPRTMXY.js.map → chunk-5KQFR4D7.js.map} +1 -1
  55. package/dist/{chunk-KNY356I3.js → chunk-5KSGZP3E.js} +11 -4
  56. package/dist/chunk-5KSGZP3E.js.map +1 -0
  57. package/dist/{chunk-DZRN3SNG.js → chunk-5P7LTPBR.js} +5 -5
  58. package/dist/{chunk-DZRN3SNG.js.map → chunk-5P7LTPBR.js.map} +1 -1
  59. package/dist/{chunk-PTJZCOBH.js → chunk-6O7VDKX3.js} +2 -2
  60. package/dist/{chunk-PTJZCOBH.js.map → chunk-6O7VDKX3.js.map} +1 -1
  61. package/dist/{chunk-B2DGCYVC.js → chunk-7DUOKE73.js} +27 -33
  62. package/dist/chunk-7DUOKE73.js.map +1 -0
  63. package/dist/{chunk-V5KG6CCV.js → chunk-7HRZACI4.js} +7 -2
  64. package/dist/chunk-7HRZACI4.js.map +1 -0
  65. package/dist/{chunk-U3FI4DVT.js → chunk-7K73MCI6.js} +7 -5
  66. package/dist/chunk-7K73MCI6.js.map +1 -0
  67. package/dist/{chunk-SE6OL7Y5.js → chunk-BCID52M5.js} +6 -6
  68. package/dist/{chunk-SE6OL7Y5.js.map → chunk-BCID52M5.js.map} +1 -1
  69. package/dist/{chunk-FZO64PLQ.js → chunk-BNLXZXZN.js} +81 -8
  70. package/dist/chunk-BNLXZXZN.js.map +1 -0
  71. package/dist/{chunk-O3FYOS64.js → chunk-C5UKYTTD.js} +13 -23
  72. package/dist/chunk-C5UKYTTD.js.map +1 -0
  73. package/dist/{chunk-LYVLDGML.js → chunk-CG63XGVV.js} +3 -3
  74. package/dist/{chunk-LYVLDGML.js.map → chunk-CG63XGVV.js.map} +1 -1
  75. package/dist/{chunk-4ROXSQEG.js → chunk-CJO3XKO7.js} +4 -4
  76. package/dist/{chunk-4ROXSQEG.js.map → chunk-CJO3XKO7.js.map} +1 -1
  77. package/dist/{chunk-OSABUEWA.js → chunk-CVUMZTNO.js} +4 -4
  78. package/dist/{chunk-OSABUEWA.js.map → chunk-CVUMZTNO.js.map} +1 -1
  79. package/dist/{chunk-E675QKFG.js → chunk-DOMRBOJZ.js} +5 -5
  80. package/dist/{chunk-E675QKFG.js.map → chunk-DOMRBOJZ.js.map} +1 -1
  81. package/dist/{chunk-GTAHU4N4.js → chunk-EB2LKPI6.js} +4 -4
  82. package/dist/{chunk-GTAHU4N4.js.map → chunk-EB2LKPI6.js.map} +1 -1
  83. package/dist/{chunk-GZL6RN4Z.js → chunk-FXBKBOI5.js} +169 -49
  84. package/dist/chunk-FXBKBOI5.js.map +1 -0
  85. package/dist/{chunk-AERQFD6T.js → chunk-GA4GUDTL.js} +4 -4
  86. package/dist/{chunk-AERQFD6T.js.map → chunk-GA4GUDTL.js.map} +1 -1
  87. package/dist/{chunk-NJVHGS7X.js → chunk-HE3TZYNG.js} +4 -4
  88. package/dist/{chunk-NJVHGS7X.js.map → chunk-HE3TZYNG.js.map} +1 -1
  89. package/dist/chunk-HLFLET7S.js +2443 -0
  90. package/dist/chunk-HLFLET7S.js.map +1 -0
  91. package/dist/{chunk-Y2BQWZXT.js → chunk-HQUF6O4B.js} +27 -56
  92. package/dist/chunk-HQUF6O4B.js.map +1 -0
  93. package/dist/{chunk-T5EIWWEJ.js → chunk-IMO4EHND.js} +5 -5
  94. package/dist/{chunk-T5EIWWEJ.js.map → chunk-IMO4EHND.js.map} +1 -1
  95. package/dist/{chunk-TUOHA6BM.js → chunk-IOXFT5D7.js} +3 -3
  96. package/dist/{chunk-TUOHA6BM.js.map → chunk-IOXFT5D7.js.map} +1 -1
  97. package/dist/{chunk-5AQLCRR7.js → chunk-JDZUQFN7.js} +4 -4
  98. package/dist/{chunk-5AQLCRR7.js.map → chunk-JDZUQFN7.js.map} +1 -1
  99. package/dist/{chunk-SQMDFM4N.js → chunk-KE5HDORU.js} +2 -2
  100. package/dist/{chunk-SQMDFM4N.js.map → chunk-KE5HDORU.js.map} +1 -1
  101. package/dist/{chunk-PTJTOPE5.js → chunk-KOI7QFDH.js} +3 -3
  102. package/dist/{chunk-PTJTOPE5.js.map → chunk-KOI7QFDH.js.map} +1 -1
  103. package/dist/{chunk-NDBHEOIA.js → chunk-KRL53RZB.js} +8 -8
  104. package/dist/{chunk-NDBHEOIA.js.map → chunk-KRL53RZB.js.map} +1 -1
  105. package/dist/{chunk-7QYBKUAS.js → chunk-LKBRBVVS.js} +3 -3
  106. package/dist/{chunk-7QYBKUAS.js.map → chunk-LKBRBVVS.js.map} +1 -1
  107. package/dist/{chunk-USSP43U3.js → chunk-LQWOU7S2.js} +3 -3
  108. package/dist/{chunk-USSP43U3.js.map → chunk-LQWOU7S2.js.map} +1 -1
  109. package/dist/{chunk-4KPQ6ILH.js → chunk-MEU2HHGV.js} +18 -9
  110. package/dist/chunk-MEU2HHGV.js.map +1 -0
  111. package/dist/{chunk-QC5BYUED.js → chunk-MS2IXLTC.js} +4 -4
  112. package/dist/{chunk-QC5BYUED.js.map → chunk-MS2IXLTC.js.map} +1 -1
  113. package/dist/{chunk-X2B5GMJO.js → chunk-NCJSYU6A.js} +16 -14
  114. package/dist/chunk-NCJSYU6A.js.map +1 -0
  115. package/dist/{chunk-CFTTXUM2.js → chunk-NFFBYG2W.js} +3 -3
  116. package/dist/{chunk-CFTTXUM2.js.map → chunk-NFFBYG2W.js.map} +1 -1
  117. package/dist/{chunk-AVRTZAH2.js → chunk-NTFP2XF4.js} +10 -10
  118. package/dist/chunk-NTFP2XF4.js.map +1 -0
  119. package/dist/{chunk-V2CONXKD.js → chunk-PSPFWTJI.js} +4 -4
  120. package/dist/{chunk-V2CONXKD.js.map → chunk-PSPFWTJI.js.map} +1 -1
  121. package/dist/{chunk-C7L5MFUL.js → chunk-PTXQMTCG.js} +3 -3
  122. package/dist/{chunk-C7L5MFUL.js.map → chunk-PTXQMTCG.js.map} +1 -1
  123. package/dist/{chunk-Y242OE4B.js → chunk-QBJQ426X.js} +3 -3
  124. package/dist/{chunk-Y242OE4B.js.map → chunk-QBJQ426X.js.map} +1 -1
  125. package/dist/{chunk-QBUJTVMY.js → chunk-R3ZNAPBV.js} +3 -3
  126. package/dist/{chunk-QBUJTVMY.js.map → chunk-R3ZNAPBV.js.map} +1 -1
  127. package/dist/{chunk-4WB4KSSQ.js → chunk-RTFH2QR2.js} +3 -3
  128. package/dist/{chunk-4WB4KSSQ.js.map → chunk-RTFH2QR2.js.map} +1 -1
  129. package/dist/{chunk-5KWQMCH7.js → chunk-RZ5R6GDJ.js} +5 -5
  130. package/dist/{chunk-5KWQMCH7.js.map → chunk-RZ5R6GDJ.js.map} +1 -1
  131. package/dist/{chunk-MDCI4RSG.js → chunk-RZL4TOK3.js} +20 -6
  132. package/dist/chunk-RZL4TOK3.js.map +1 -0
  133. package/dist/{chunk-LMADWO4Q.js → chunk-SBAUZ7XH.js} +4 -4
  134. package/dist/{chunk-LMADWO4Q.js.map → chunk-SBAUZ7XH.js.map} +1 -1
  135. package/dist/{chunk-MPRWVZXF.js → chunk-SKG6G4HO.js} +108 -44
  136. package/dist/chunk-SKG6G4HO.js.map +1 -0
  137. package/dist/{chunk-HQAPUPBE.js → chunk-V2VDTQ7A.js} +3 -3
  138. package/dist/{chunk-HQAPUPBE.js.map → chunk-V2VDTQ7A.js.map} +1 -1
  139. package/dist/{chunk-GNUA7XT2.js → chunk-VS6XC5JE.js} +3 -3
  140. package/dist/{chunk-GNUA7XT2.js.map → chunk-VS6XC5JE.js.map} +1 -1
  141. package/dist/{chunk-5J6JWGY4.js → chunk-WDG5IVEA.js} +3 -3
  142. package/dist/{chunk-5J6JWGY4.js.map → chunk-WDG5IVEA.js.map} +1 -1
  143. package/dist/{chunk-M4G2SVXI.js → chunk-XWCV2A2F.js} +4 -4
  144. package/dist/{chunk-M4G2SVXI.js.map → chunk-XWCV2A2F.js.map} +1 -1
  145. package/dist/{chunk-UWD7YBDR.js → chunk-ZLDAPZIX.js} +4 -4
  146. package/dist/{chunk-UWD7YBDR.js.map → chunk-ZLDAPZIX.js.map} +1 -1
  147. package/dist/{claude-code-YRJIGXTL.js → claude-code-CMFGCDMX.js} +5 -5
  148. package/dist/{claude-code-YRJIGXTL.js.map → claude-code-CMFGCDMX.js.map} +1 -1
  149. package/dist/cli/index.js +322 -196
  150. package/dist/cli/index.js.map +1 -1
  151. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  152. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  153. package/dist/cli/src/commands/config.d.ts.map +1 -1
  154. package/dist/cli/src/commands/connector.d.ts.map +1 -1
  155. package/dist/cli/src/commands/harness-preflight.d.ts +3 -1
  156. package/dist/cli/src/commands/harness-preflight.d.ts.map +1 -1
  157. package/dist/cli/src/commands/harness.d.ts.map +1 -1
  158. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  159. package/dist/cli/src/commands/library-index.d.ts +3 -3
  160. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  161. package/dist/cli/src/commands/migrate-files.d.ts +8 -0
  162. package/dist/cli/src/commands/migrate-files.d.ts.map +1 -1
  163. package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -1
  164. package/dist/cli/src/commands/migrate-providers.d.ts.map +1 -1
  165. package/dist/cli/src/commands/migrate.d.ts.map +1 -1
  166. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  167. package/dist/cli/src/commands/project.d.ts.map +1 -1
  168. package/dist/cli/src/commands/run.d.ts.map +1 -1
  169. package/dist/cli/src/commands/serve-preflight.d.ts +7 -5
  170. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  171. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  172. package/dist/cli/src/commands/source.d.ts.map +1 -1
  173. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  174. package/dist/cli/src/config-checks.d.ts +50 -12
  175. package/dist/cli/src/config-checks.d.ts.map +1 -1
  176. package/dist/cli/src/ensure-sources.d.ts.map +1 -1
  177. package/dist/cli/src/harness-error.d.ts +7 -0
  178. package/dist/cli/src/harness-error.d.ts.map +1 -1
  179. package/dist/cli/src/helpers.d.ts.map +1 -1
  180. package/dist/connectors/config.js +5 -5
  181. package/dist/connectors/index.js +20 -19
  182. package/dist/connectors/src/index.d.ts +1 -1
  183. package/dist/connectors/src/index.d.ts.map +1 -1
  184. package/dist/connectors/src/managed-gitconfig.d.ts +12 -0
  185. package/dist/connectors/src/managed-gitconfig.d.ts.map +1 -1
  186. package/dist/{connectors-JKT32HZT.js → connectors-P5M2D4MH.js} +23 -22
  187. package/dist/{connectors-JKT32HZT.js.map → connectors-P5M2D4MH.js.map} +1 -1
  188. package/dist/core/index.js +7 -7
  189. package/dist/core/logging.js +1 -1
  190. package/dist/core/manifest.js +2 -2
  191. package/dist/core/models.js +1 -1
  192. package/dist/core/publish-manifest.js +3 -3
  193. package/dist/core/ref.js +1 -1
  194. package/dist/core/runtime-assets.js +5 -5
  195. package/dist/core/src/index.d.ts +2 -2
  196. package/dist/core/src/index.d.ts.map +1 -1
  197. package/dist/core/src/lock.d.ts +7 -1
  198. package/dist/core/src/lock.d.ts.map +1 -1
  199. package/dist/core/src/models.d.ts.map +1 -1
  200. package/dist/core/src/repo-manager.d.ts +28 -0
  201. package/dist/core/src/repo-manager.d.ts.map +1 -1
  202. package/dist/core/src/run-state-ignore.d.ts +5 -3
  203. package/dist/core/src/run-state-ignore.d.ts.map +1 -1
  204. package/dist/core/src/workspace-config.d.ts.map +1 -1
  205. package/dist/core/workspace-config.js +4 -4
  206. package/dist/deploy/index.js +7 -7
  207. package/dist/discovery/index.js +4 -4
  208. package/dist/{ensure-sources-GUJODKY5.js → ensure-sources-MOGLBEUF.js} +31 -29
  209. package/dist/ensure-sources-MOGLBEUF.js.map +1 -0
  210. package/dist/factory-assets/connectors/box.js +20 -19
  211. package/dist/factory-assets/connectors/deploy.js +20 -19
  212. package/dist/factory-assets/connectors/devserver.js +20 -19
  213. package/dist/factory-assets/connectors/flow/adapter.js +20 -19
  214. package/dist/factory-assets/connectors/flow/engine.js +8 -8
  215. package/dist/factory-assets/connectors/flow/run-flow.js +22 -21
  216. package/dist/factory-assets/connectors/flow.js +20 -19
  217. package/dist/factory-assets/connectors/git/exec.d.ts +7 -0
  218. package/dist/factory-assets/connectors/git/exec.d.ts.map +1 -1
  219. package/dist/factory-assets/connectors/git/repo.d.ts.map +1 -1
  220. package/dist/factory-assets/connectors/git.js +20 -19
  221. package/dist/factory-assets/connectors/gmail/adapter.d.ts.map +1 -1
  222. package/dist/factory-assets/connectors/gmail.js +20 -19
  223. package/dist/factory-assets/connectors/googledrive.js +20 -19
  224. package/dist/factory-assets/connectors/local.js +20 -19
  225. package/dist/factory-assets/connectors/mattermost.js +20 -19
  226. package/dist/factory-assets/connectors/memory.js +20 -19
  227. package/dist/factory-assets/connectors/minio/adapter.d.ts.map +1 -1
  228. package/dist/factory-assets/connectors/minio.js +20 -19
  229. package/dist/factory-assets/connectors/postgres/adapter.d.ts.map +1 -1
  230. package/dist/factory-assets/connectors/postgres.js +20 -19
  231. package/dist/factory-assets/connectors/s3/driver.d.ts.map +1 -1
  232. package/dist/factory-assets/connectors/s3.js +20 -19
  233. package/dist/factory-assets/connectors/sharepoint.js +20 -19
  234. package/dist/factory-assets/connectors/sqlite/adapter.d.ts.map +1 -1
  235. package/dist/factory-assets/connectors/sqlite.js +20 -19
  236. package/dist/factory-assets/connectors/static-server.js +20 -19
  237. package/dist/factory-assets/connectors/tunnel.js +20 -19
  238. package/dist/factory-assets/connectors/webdav.js +20 -19
  239. package/dist/factory-assets/connectors/xstate-store.js +20 -19
  240. package/dist/factory-assets/connectors/xstate.js +20 -19
  241. package/dist/{flows-UCP6ZUYS.js → flows-J64L5MGJ.js} +12 -12
  242. package/dist/{flows-UCP6ZUYS.js.map → flows-J64L5MGJ.js.map} +1 -1
  243. package/dist/{helpers-SO53MRHF.js → helpers-JL5AEGDT.js} +28 -26
  244. package/dist/{helpers-SO53MRHF.js.map → helpers-JL5AEGDT.js.map} +1 -1
  245. package/dist/library/index.js +10 -10
  246. package/dist/library/install.js +4 -4
  247. package/dist/library/src/index.d.ts +2 -2
  248. package/dist/library/src/index.d.ts.map +1 -1
  249. package/dist/library/src/library.d.ts +6 -2
  250. package/dist/library/src/library.d.ts.map +1 -1
  251. package/dist/library/src/local/db.d.ts.map +1 -1
  252. package/dist/library/src/local/library.d.ts +10 -3
  253. package/dist/library/src/local/library.d.ts.map +1 -1
  254. package/dist/library/src/local/local-catalog-source.d.ts +0 -9
  255. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  256. package/dist/library/src/local/schema.d.ts +27 -20
  257. package/dist/library/src/local/schema.d.ts.map +1 -1
  258. package/dist/library/src/manifest-writer.d.ts +13 -0
  259. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  260. package/dist/library/src/remote/index.d.ts +1 -1
  261. package/dist/library/src/remote/index.d.ts.map +1 -1
  262. package/dist/library/src/remote/remote-catalog-source.d.ts +6 -0
  263. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  264. package/dist/library/src/sync/git-driver.d.ts.map +1 -1
  265. package/dist/{library-publish-Z5E3YZCZ.js → library-publish-DZNNZNMB.js} +49 -50
  266. package/dist/library-publish-DZNNZNMB.js.map +1 -0
  267. package/dist/model-endpoint/index.js +10 -10
  268. package/dist/open-library-OJREQ22B.js +61 -0
  269. package/dist/{open-library-A5OB72FD.js.map → open-library-OJREQ22B.js.map} +1 -1
  270. package/dist/{open-registry-BHBHQMBA.js → open-registry-OEU6QUK2.js} +14 -14
  271. package/dist/{open-registry-BHBHQMBA.js.map → open-registry-OEU6QUK2.js.map} +1 -1
  272. package/dist/paths-PXBWY532.js +22 -0
  273. package/dist/{paths-77PXOXZY.js.map → paths-PXBWY532.js.map} +1 -1
  274. package/dist/{plugin-store-XQP2CRYH.js → plugin-store-ZC3EGZ3D.js} +10 -10
  275. package/dist/{plugin-store-XQP2CRYH.js.map → plugin-store-ZC3EGZ3D.js.map} +1 -1
  276. package/dist/{project-KTEUN7KR.js → project-52UABBD5.js} +45 -46
  277. package/dist/{project-KTEUN7KR.js.map → project-52UABBD5.js.map} +1 -1
  278. package/dist/resolver/index.js +8 -8
  279. package/dist/runner/index.js +35 -35
  280. package/dist/runner/src/agent-loop.d.ts.map +1 -1
  281. package/dist/runner/src/serve.d.ts.map +1 -1
  282. package/dist/runner/src/turn-end-contract.d.ts.map +1 -1
  283. package/dist/runner/src/turn-scheduler.d.ts +8 -0
  284. package/dist/runner/src/turn-scheduler.d.ts.map +1 -1
  285. package/dist/sdk/asset-manager.js +14 -14
  286. package/dist/sdk/bridge.js +17 -16
  287. package/dist/sdk/core.js +7 -7
  288. package/dist/sdk/flow.js +8 -8
  289. package/dist/sdk/index.js +35 -35
  290. package/dist/sdk/resolver.js +8 -8
  291. package/dist/sdk/runner.js +35 -35
  292. package/dist/sdk/transport/ws/server.js +8 -8
  293. package/dist/sdk/transport/ws.js +8 -8
  294. package/dist/sdk/transport.js +8 -8
  295. package/dist/{serve-preflight-ODQGVUFL.js → serve-preflight-HOQ7CGYR.js} +30 -30
  296. package/dist/{serve-preflight-ODQGVUFL.js.map → serve-preflight-HOQ7CGYR.js.map} +1 -1
  297. package/dist/{setup-QJDI5YAW.js → setup-JIDZ372C.js} +29 -27
  298. package/dist/setup-JIDZ372C.js.map +1 -0
  299. package/dist/{skills-DE2BDQ6G.js → skills-5D4KDVPJ.js} +13 -13
  300. package/dist/{skills-DE2BDQ6G.js.map → skills-5D4KDVPJ.js.map} +1 -1
  301. package/dist/{source-FKOUYMEM.js → source-P6ZFSSZZ.js} +47 -46
  302. package/dist/{source-FKOUYMEM.js.map → source-P6ZFSSZZ.js.map} +1 -1
  303. package/dist/{source-manifest-publish-JA4TY4Z6.js → source-manifest-publish-Y36FHVDS.js} +49 -48
  304. package/dist/source-manifest-publish-Y36FHVDS.js.map +1 -0
  305. package/dist/transport/index.js +8 -8
  306. package/dist/transport/src/ws/server.d.ts.map +1 -1
  307. package/dist/transport/ws/server.js +8 -8
  308. package/dist/transport/ws.js +8 -8
  309. package/dist/tui/index.js +35 -35
  310. package/dist/workspace-plugin/adapters/mcp.js +27 -26
  311. package/dist/workspace-plugin/adapters/omp.js +14 -14
  312. package/dist/workspace-plugin/index.js +2 -2
  313. package/package.json +1 -1
  314. package/dist/chunk-23Q5LT4U.js.map +0 -1
  315. package/dist/chunk-4KPQ6ILH.js.map +0 -1
  316. package/dist/chunk-5NTB64PW.js.map +0 -1
  317. package/dist/chunk-AVRTZAH2.js.map +0 -1
  318. package/dist/chunk-B2DGCYVC.js.map +0 -1
  319. package/dist/chunk-FZO64PLQ.js.map +0 -1
  320. package/dist/chunk-GYBDWW6K.js +0 -160
  321. package/dist/chunk-GYBDWW6K.js.map +0 -1
  322. package/dist/chunk-GYPPVANR.js +0 -357
  323. package/dist/chunk-GYPPVANR.js.map +0 -1
  324. package/dist/chunk-GZL6RN4Z.js.map +0 -1
  325. package/dist/chunk-JY2JXCL6.js +0 -334
  326. package/dist/chunk-JY2JXCL6.js.map +0 -1
  327. package/dist/chunk-KNY356I3.js.map +0 -1
  328. package/dist/chunk-LOO5CB5M.js +0 -12
  329. package/dist/chunk-LOO5CB5M.js.map +0 -1
  330. package/dist/chunk-MDCI4RSG.js.map +0 -1
  331. package/dist/chunk-MPRWVZXF.js.map +0 -1
  332. package/dist/chunk-O3FYOS64.js.map +0 -1
  333. package/dist/chunk-U3FI4DVT.js.map +0 -1
  334. package/dist/chunk-V3EJYOP2.js +0 -299
  335. package/dist/chunk-V3EJYOP2.js.map +0 -1
  336. package/dist/chunk-V5KG6CCV.js.map +0 -1
  337. package/dist/chunk-WPLZGT5Z.js.map +0 -1
  338. package/dist/chunk-X2B5GMJO.js.map +0 -1
  339. package/dist/chunk-Y2BQWZXT.js.map +0 -1
  340. package/dist/ensure-sources-GUJODKY5.js.map +0 -1
  341. package/dist/library-publish-Z5E3YZCZ.js.map +0 -1
  342. package/dist/open-library-A5OB72FD.js +0 -59
  343. package/dist/paths-77PXOXZY.js +0 -22
  344. package/dist/setup-QJDI5YAW.js.map +0 -1
  345. package/dist/source-manifest-publish-JA4TY4Z6.js.map +0 -1
@@ -0,0 +1,688 @@
1
+ import { loadDeclaredPlugins } from './chunk-2PVYDAFN.js';
2
+ import { listHarnesses } from './chunk-KE5HDORU.js';
3
+ import { softDepName } from './chunk-4I4SBOCS.js';
4
+ import { readLock, LockParseError } from './chunk-MEU2HHGV.js';
5
+ import { resolveRuntimeAssets } from './chunk-CJO3XKO7.js';
6
+ import { resolveAgentDefinitionDir, AgentRefResolutionError, normalizeAgentInstances, agentBlockKeyDiagnostics, agentInstanceDiagnostics, localConnectorMountDir, symlinkEscapeOfProject, isInsideProject, loadSkWorkspaceConfig, SKAILE_YAML_DEFAULT, resolveSkWorkspaceConfig } from './chunk-BNLXZXZN.js';
7
+ import { SUPPORTED_HARNESSES } from './chunk-VTETQCR6.js';
8
+ import fs, { existsSync, readdirSync, readFileSync } from 'fs';
9
+ import { homedir } from 'os';
10
+ import path3 from 'path';
11
+ import pc from 'picocolors';
12
+ import { parse } from 'yaml';
13
+ import { Option } from 'commander';
14
+
15
+ // cli/src/type-guards.ts
16
+ function isRecord(value) {
17
+ return value !== null && typeof value === "object" && !Array.isArray(value);
18
+ }
19
+
20
+ // cli/src/commands/validate-instances.ts
21
+ var AGENT_MANIFEST_FILE = "agent.yaml";
22
+ var TRIGGER_REQUIRED_FIELDS = {
23
+ schedule: ["cron", "prompt"],
24
+ webhook: ["prompt"],
25
+ channel: ["when"],
26
+ event: ["event"]
27
+ };
28
+ var err = (code, message, at) => ({
29
+ code,
30
+ severity: "error",
31
+ message,
32
+ path: at
33
+ });
34
+ function readAssetFacts(manifest) {
35
+ const facts = {
36
+ lifecycle: manifest.lifecycle,
37
+ hasIo: manifest.io !== void 0 && manifest.io !== null,
38
+ connectorSlots: [],
39
+ otherSlots: [],
40
+ triggerIds: []
41
+ };
42
+ for (const item of Array.isArray(manifest.composes) ? manifest.composes : []) {
43
+ if (!isRecord(item) || typeof item.id !== "string") continue;
44
+ (item.kind === "connector" ? facts.connectorSlots : facts.otherSlots).push(item.id);
45
+ }
46
+ for (const t of Array.isArray(manifest.triggers) ? manifest.triggers : []) {
47
+ if (isRecord(t) && typeof t.id === "string") facts.triggerIds.push(t.id);
48
+ }
49
+ return facts;
50
+ }
51
+ function agentDefinitionProblem(projectDir, definition) {
52
+ let dir;
53
+ try {
54
+ dir = resolveAgentDefinitionDir(projectDir, definition);
55
+ } catch (e) {
56
+ if (!(e instanceof AgentRefResolutionError)) throw e;
57
+ return e.message;
58
+ }
59
+ if (dir === void 0) {
60
+ return `agent.definition "${definition}": no ai-assets/ directory above the project`;
61
+ }
62
+ if (path3.basename(dir) === AGENT_MANIFEST_FILE) dir = path3.dirname(dir);
63
+ if (!fs.existsSync(path3.join(dir, AGENT_MANIFEST_FILE))) {
64
+ return `agent.definition "${definition}": no ${AGENT_MANIFEST_FILE} in ${dir}`;
65
+ }
66
+ return null;
67
+ }
68
+ function loadAsset(projectDir, id, ref) {
69
+ const at = `agents.${id}.ref`;
70
+ let dir;
71
+ try {
72
+ dir = resolveAgentDefinitionDir(projectDir, ref);
73
+ } catch (e) {
74
+ if (!(e instanceof AgentRefResolutionError)) throw e;
75
+ return { diagnostic: err("agent_ref_unresolved", `agents.${id}: ${e.message}`, at) };
76
+ }
77
+ if (dir === void 0) {
78
+ return {
79
+ diagnostic: err(
80
+ "agent_ref_unresolved",
81
+ `agents.${id}: ref "${ref}" cannot be resolved \u2014 no ai-assets/ directory above the project`,
82
+ at
83
+ )
84
+ };
85
+ }
86
+ const manifestPath = path3.join(dir, AGENT_MANIFEST_FILE);
87
+ let text;
88
+ try {
89
+ text = fs.readFileSync(manifestPath, "utf-8");
90
+ } catch {
91
+ return {
92
+ diagnostic: err(
93
+ "agent_ref_unresolved",
94
+ `agents.${id}: ref "${ref}" resolves to ${dir}, which has no ${AGENT_MANIFEST_FILE}`,
95
+ at
96
+ )
97
+ };
98
+ }
99
+ let manifest;
100
+ try {
101
+ manifest = parse(text);
102
+ } catch (e) {
103
+ return {
104
+ diagnostic: err(
105
+ "agent_manifest_invalid",
106
+ `agents.${id}: ${manifestPath} is not valid YAML: ${e instanceof Error ? e.message : String(e)}`,
107
+ at
108
+ )
109
+ };
110
+ }
111
+ if (!isRecord(manifest)) {
112
+ return {
113
+ diagnostic: err(
114
+ "agent_manifest_invalid",
115
+ `agents.${id}: ${manifestPath} is not a mapping`,
116
+ at
117
+ )
118
+ };
119
+ }
120
+ return { facts: readAssetFacts(manifest) };
121
+ }
122
+ function instanceRefProblem(projectDir, id, ref) {
123
+ const loaded = loadAsset(projectDir, id, ref);
124
+ return "diagnostic" in loaded && loaded.diagnostic.code === "agent_ref_unresolved" ? loaded.diagnostic.message : null;
125
+ }
126
+ function checkTriggers(id, triggers, assetTriggerIds) {
127
+ const out = [];
128
+ const seen = /* @__PURE__ */ new Set();
129
+ triggers.forEach((trigger, i) => {
130
+ const at = `agents.${id}.triggers[${i}]`;
131
+ if (seen.has(trigger.id)) {
132
+ out.push(
133
+ err(
134
+ "agent_trigger_duplicate",
135
+ `agents.${id}: trigger id "${trigger.id}" is declared twice`,
136
+ `${at}.id`
137
+ )
138
+ );
139
+ return;
140
+ }
141
+ seen.add(trigger.id);
142
+ if (!assetTriggerIds || assetTriggerIds.includes(trigger.id)) return;
143
+ if (!trigger.kind) {
144
+ out.push(
145
+ err(
146
+ "agent_trigger_unknown",
147
+ `agents.${id}: trigger "${trigger.id}" is not declared by the agent asset (${assetTriggerIds.length > 0 ? `has: ${assetTriggerIds.join(", ")}` : "it declares no triggers"}) \u2014 add \`kind\` and the trigger's fields to declare a new one`,
148
+ `${at}.id`
149
+ )
150
+ );
151
+ return;
152
+ }
153
+ const missing = TRIGGER_REQUIRED_FIELDS[trigger.kind].filter(
154
+ (field) => trigger[field] === void 0
155
+ );
156
+ if (missing.length > 0) {
157
+ out.push(
158
+ err(
159
+ "agent_trigger_incomplete",
160
+ `agents.${id}: trigger "${trigger.id}" (kind ${trigger.kind}) is not in the asset, so it must declare ${missing.join(", ")}`,
161
+ at
162
+ )
163
+ );
164
+ }
165
+ });
166
+ return out;
167
+ }
168
+ function checkConnectors(id, instance, facts, connectorIds) {
169
+ const out = [];
170
+ for (const [slot, connectorId] of Object.entries(instance.connectors ?? {})) {
171
+ const at = `agents.${id}.connectors.${slot}`;
172
+ if (!facts.connectorSlots.includes(slot)) {
173
+ const hint = facts.otherSlots.includes(slot) ? `"${slot}" is a slot of a non-connector item` : facts.connectorSlots.length > 0 ? `the asset's connector slots are: ${facts.connectorSlots.join(", ")}` : "the asset declares no connector slots";
174
+ out.push(
175
+ err(
176
+ "agent_connector_slot_unknown",
177
+ `agents.${id}: connectors.${slot} is not a connector slot id of the agent asset (${hint})`,
178
+ at
179
+ )
180
+ );
181
+ }
182
+ if (!connectorIds.includes(connectorId)) {
183
+ out.push(
184
+ err(
185
+ "agent_connector_unknown",
186
+ `agents.${id}: connectors.${slot} points at "${connectorId}", which is not in skaile.yaml connectors[]${connectorIds.length > 0 ? ` (has: ${connectorIds.join(", ")})` : ""}`,
187
+ at
188
+ )
189
+ );
190
+ }
191
+ }
192
+ return out;
193
+ }
194
+ function checkAgentInstances(projectDir, parsed) {
195
+ const diagnostics = [];
196
+ const instances = normalizeAgentInstances(parsed.agents, diagnostics);
197
+ const agent = isRecord(parsed.agent) ? parsed.agent : void 0;
198
+ diagnostics.push(...agentBlockKeyDiagnostics(parsed.agent));
199
+ if (agent?.subagents !== void 0) {
200
+ diagnostics.push(
201
+ err(
202
+ "agent_subagents_removed",
203
+ "`agent.subagents` was removed \u2014 declare each subagent as an agent asset and bind it under `agents:` with `lifecycle: role`",
204
+ "agent.subagents"
205
+ )
206
+ );
207
+ }
208
+ if (agent?.instances !== void 0) {
209
+ diagnostics.push(
210
+ err(
211
+ "misplaced_agent_instances",
212
+ "`agent.instances` is not a skaile.yaml key \u2014 declare instances under root `agents:`",
213
+ "agent.instances"
214
+ )
215
+ );
216
+ }
217
+ diagnostics.push(
218
+ ...agentInstanceDiagnostics({
219
+ agent: {
220
+ definition: typeof agent?.definition === "string" ? agent.definition : void 0,
221
+ instances
222
+ }
223
+ })
224
+ );
225
+ if (typeof agent?.definition === "string" && agent.definition !== "") {
226
+ const problem = agentDefinitionProblem(projectDir, agent.definition);
227
+ if (problem) diagnostics.push(err("agent_ref_unresolved", problem, "agent.definition"));
228
+ }
229
+ if (!instances) return diagnostics;
230
+ const connectorIds = (Array.isArray(parsed.connectors) ? parsed.connectors : []).flatMap(
231
+ (c) => isRecord(c) && typeof c.id === "string" ? [c.id] : []
232
+ );
233
+ for (const [id, instance] of Object.entries(instances)) {
234
+ const loaded = loadAsset(projectDir, id, instance.ref);
235
+ if ("diagnostic" in loaded) {
236
+ diagnostics.push(loaded.diagnostic, ...checkTriggers(id, instance.triggers ?? [], void 0));
237
+ continue;
238
+ }
239
+ const { facts } = loaded;
240
+ const lifecycle = instance.lifecycle ?? facts.lifecycle ?? "standing";
241
+ if (lifecycle === "role" && !facts.hasIo) {
242
+ diagnostics.push(
243
+ err(
244
+ "agent_role_missing_io",
245
+ `agents.${id}: lifecycle "role" needs the agent asset to declare \`io\` ({ input, output } JSON Schemas)`,
246
+ `agents.${id}.lifecycle`
247
+ )
248
+ );
249
+ }
250
+ diagnostics.push(...checkConnectors(id, instance, facts, connectorIds));
251
+ diagnostics.push(...checkTriggers(id, instance.triggers ?? [], facts.triggerIds));
252
+ }
253
+ return diagnostics;
254
+ }
255
+ function unknownHarnessMessage(harness) {
256
+ const known = listHarnesses().map((d) => d.id);
257
+ if (known.includes(harness)) return void 0;
258
+ return `Unknown agent harness: "${harness}". Available: ${known.join(", ")}. ${DEPLOY_COMMANDS} take: ${SUPPORTED_HARNESSES.join(", ")}.`;
259
+ }
260
+ var DEPLOY_COMMANDS = "harness set, init --harness and add --harness";
261
+ function unknownHarnessTargetMessage(harness, extra = []) {
262
+ const targets = [...SUPPORTED_HARNESSES, ...extra];
263
+ const registered = listHarnesses().map((d) => d.id);
264
+ return `Unknown agent harness: "${harness}". Available: ${targets.join(", ")}. run, repl and config set harness take: ${registered.join(", ")}.`;
265
+ }
266
+ function canonicalHarnessId(harness) {
267
+ return harness === "claude-code" ? "claude-sdk" : harness;
268
+ }
269
+ var warnedDriverFlag = false;
270
+ function warnDriverFlagDeprecated() {
271
+ if (warnedDriverFlag) return;
272
+ warnedDriverFlag = true;
273
+ console.error("--driver is deprecated; use --harness");
274
+ }
275
+ function driverAliasOption() {
276
+ return new Option("--driver <name>", "Deprecated alias of --harness").hideHelp();
277
+ }
278
+ function foldDriverFlag(opts, fallback) {
279
+ const { driver, ...rest } = opts;
280
+ if (driver !== void 0) warnDriverFlagDeprecated();
281
+ return { ...rest, harness: rest.harness ?? driver ?? fallback };
282
+ }
283
+ function friendlyHarnessError(err2) {
284
+ const e = err2;
285
+ if (!e) return null;
286
+ const isSpawnEnoent = e.code === "ENOENT" && (e.syscall?.startsWith("spawn") === true || /^spawn .*ENOENT/.test(e.message ?? ""));
287
+ const isConfig = e.category === "config" || e.detail?.category === "config";
288
+ if (!isSpawnEnoent && !isConfig) return null;
289
+ const hint = e.hint ?? e.detail?.hint;
290
+ const base = hint ?? "The configured agent binary is not installed or not on your PATH.";
291
+ return `${base}
292
+ Try a different harness with \`--harness claude-sdk\`.`;
293
+ }
294
+ function harnessErrorNotes(err2) {
295
+ const e = err2;
296
+ const notes = [];
297
+ const category = e?.category ?? e?.detail?.category;
298
+ const hint = e?.hint ?? e?.detail?.hint;
299
+ if (hint && category !== "config") notes.push(hint);
300
+ else if (category === "auth") notes.push("Check your API key or login.");
301
+ if (e?.logSessionId) {
302
+ notes.push(`Full records: .skaile/logs.db (skaile session logs ${e.logSessionId}).`);
303
+ }
304
+ return notes;
305
+ }
306
+
307
+ // cli/src/config-checks.ts
308
+ function unknownKeyWarnings(diagnostics, label) {
309
+ return diagnostics.filter((d) => d.code === "unknown_config_key" || d.code === "unknown_profile_key").map((d) => `${label}: ${d.message}`);
310
+ }
311
+ var CONNECTOR_ERROR_CODES = [
312
+ "connector_missing_driver",
313
+ "connector_missing_id",
314
+ "connector_duplicate_id",
315
+ "connector_invalid_access"
316
+ ];
317
+ function connectorErrorLines(diagnostics, label) {
318
+ return diagnostics.filter((d) => CONNECTOR_ERROR_CODES.includes(d.code)).map((d) => `${label} [connectors] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`);
319
+ }
320
+ function connectorMountPathChecks(projectDir, label, connectors) {
321
+ const errors = [];
322
+ const warnings = [];
323
+ for (const c of connectors) {
324
+ if (typeof c.id !== "string" || c.id === "") continue;
325
+ if (c.driver !== "local" || c.mount) continue;
326
+ const dir = localConnectorMountDir(c, projectDir);
327
+ if (!dir) continue;
328
+ const escapesTo = symlinkEscapeOfProject(dir, projectDir);
329
+ if (!fs.existsSync(dir)) {
330
+ errors.push(
331
+ `${label} [connectors] \u2014 connector_mount_path_missing: connectors.${c.id}.mountPath: ${dir} does not exist; create the directory or fix the path`
332
+ );
333
+ } else if (escapesTo !== null) {
334
+ errors.push(
335
+ `${label} [connectors] \u2014 connector_mount_path_symlink: connectors.${c.id}.mountPath: ${dir} is a symlink to ${escapesTo}, outside the project ${projectDir}; point mountPath at the real directory`
336
+ );
337
+ } else if (!isInsideProject(dir, projectDir)) {
338
+ warnings.push(
339
+ `${label} [connectors] \u2014 connectors.${c.id}.mountPath: ${dir} is outside the project ${projectDir}; the agent reads${c.access === "read-write" ? " and writes" : ""} there`
340
+ );
341
+ }
342
+ }
343
+ return { errors, warnings };
344
+ }
345
+ async function unknownConnectorDriverErrors(projectDir, label, connectors) {
346
+ if (connectors.length === 0) return [];
347
+ await loadDeclaredPlugins(projectDir);
348
+ const { listConnectors } = await import('./connectors/index.js');
349
+ const assets = await resolveRuntimeAssets(projectDir, {
350
+ isDriverRegistered: (driver) => listConnectors().includes(driver)
351
+ });
352
+ if (assets.warnings.some((w) => w.code === "repo_unavailable")) return [];
353
+ return assets.warnings.filter((w) => w.code === "missing_driver" && w.name).map((w) => `${label} [connectors] \u2014 ${w.code}: ${w.message}`);
354
+ }
355
+ var AGENT_CONFIG_KEY_CODES = ["deprecated_harness_key", "retired_agent_key"];
356
+ function agentConfigKeyWarnings(diagnostics, label) {
357
+ return diagnostics.filter((d) => AGENT_CONFIG_KEY_CODES.includes(d.code)).map((d) => `${label} [agent-config] \u2014 ${d.code}: ${d.message}`);
358
+ }
359
+ function harnessKeyConflictErrors(diagnostics, label) {
360
+ return diagnostics.filter((d) => d.code === "harness_key_conflict").map((d) => `${label} [agent-config] \u2014 ${d.code}: ${d.message}`);
361
+ }
362
+ async function unknownHarnessErrors(projectDir, config, label) {
363
+ const profiles = Object.entries(config.agent_config ?? {}).filter(
364
+ (e) => typeof e[1]?.harness === "string"
365
+ );
366
+ if (profiles.every(([, p]) => unknownHarnessMessage(p.harness) === void 0)) return [];
367
+ await loadDeclaredPlugins(projectDir);
368
+ const errors = [];
369
+ for (const [name, p] of profiles) {
370
+ const refusal = unknownHarnessMessage(p.harness);
371
+ if (refusal) errors.push(`${label}: agent-config.${name}.harness: ${refusal}`);
372
+ }
373
+ return errors;
374
+ }
375
+ async function reportUnknownHarnesses(projectDir) {
376
+ let file;
377
+ try {
378
+ file = loadSkWorkspaceConfig(projectDir);
379
+ } catch {
380
+ return 0;
381
+ }
382
+ const config = file?.config;
383
+ if (!config) return 0;
384
+ const errors = [
385
+ ...harnessKeyConflictErrors(file?.diagnostics ?? [], "skaile.yaml"),
386
+ ...await unknownHarnessErrors(projectDir, config, "skaile.yaml")
387
+ ];
388
+ for (const line of errors) logErr(line);
389
+ return errors.length;
390
+ }
391
+ function agentInstanceDiagnostics2(projectDir) {
392
+ let parsed;
393
+ try {
394
+ parsed = parse(fs.readFileSync(path3.join(projectDir, SKAILE_YAML_DEFAULT), "utf-8"));
395
+ } catch {
396
+ return [];
397
+ }
398
+ if (typeof parsed !== "object" || parsed === null) return [];
399
+ return checkAgentInstances(projectDir, parsed);
400
+ }
401
+ function agentInstanceLine(d) {
402
+ return `${SKAILE_YAML_DEFAULT} [agents] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`;
403
+ }
404
+ function agentInstanceErrorLines(projectDir) {
405
+ return agentInstanceDiagnostics2(projectDir).filter((d) => d.severity === "error" && d.code !== "agent_ref_unresolved").map(agentInstanceLine);
406
+ }
407
+ function agentInstanceWarningLines(projectDir) {
408
+ return agentInstanceDiagnostics2(projectDir).filter(
409
+ (d) => d.severity === "warning" && (d.code === "unknown_agent_instance_key" || d.code === "unknown_agent_key")
410
+ ).map(agentInstanceLine);
411
+ }
412
+ var warnedProjects = /* @__PURE__ */ new Set();
413
+ function warnProjectConfig(projectDir, opts = {}) {
414
+ const key = path3.resolve(projectDir);
415
+ if (warnedProjects.has(key)) return;
416
+ let file = opts.file;
417
+ if (file === void 0) {
418
+ try {
419
+ file = loadSkWorkspaceConfig(projectDir);
420
+ } catch {
421
+ return;
422
+ }
423
+ }
424
+ if (!file) return;
425
+ warnedProjects.add(key);
426
+ const warn = opts.stderr ? logWarnErr : logWarn;
427
+ for (const line of unknownKeyWarnings(file.diagnostics ?? [], "skaile.yaml")) warn(line);
428
+ for (const line of agentConfigKeyWarnings(file.diagnostics ?? [], "skaile.yaml")) warn(line);
429
+ for (const line of agentInstanceWarningLines(projectDir)) warn(line);
430
+ }
431
+ async function reportProjectConfig(projectDir, opts) {
432
+ let file;
433
+ try {
434
+ file = loadSkWorkspaceConfig(projectDir);
435
+ } catch {
436
+ return 0;
437
+ }
438
+ if (!file) return 0;
439
+ warnProjectConfig(projectDir, { file });
440
+ const errors = [
441
+ ...harnessKeyConflictErrors(file.diagnostics ?? [], "skaile.yaml"),
442
+ ...opts.harness ? await unknownHarnessErrors(projectDir, file.config, "skaile.yaml") : [],
443
+ ...opts.instances ? agentInstanceErrorLines(projectDir) : []
444
+ ];
445
+ for (const line of errors) logErr(line);
446
+ return errors.length;
447
+ }
448
+
449
+ // cli/src/helpers.ts
450
+ var S = {
451
+ brand: (s) => pc.cyan(pc.bold(s)),
452
+ cmd: (s) => pc.cyan(s),
453
+ heading: (s) => pc.bold(s),
454
+ bold: (s) => pc.bold(s),
455
+ dim: (s) => pc.dim(s),
456
+ ok: (s) => pc.green(s),
457
+ warn: (s) => pc.yellow(s),
458
+ err: (s) => pc.red(s),
459
+ label: (s) => pc.dim(s),
460
+ rule: (w = 40) => pc.dim("\u2500".repeat(w))
461
+ };
462
+ var KIND_COLORS = {
463
+ skill: pc.blue,
464
+ agent: pc.magenta,
465
+ prompt: pc.yellow,
466
+ flow: pc.green,
467
+ preset: pc.cyan,
468
+ contract: pc.red,
469
+ connector: pc.green,
470
+ knowledge: pc.cyan,
471
+ persona: pc.cyan,
472
+ ruleset: pc.cyan,
473
+ "mcp-server": pc.magenta
474
+ };
475
+ function fitWidth(s, width) {
476
+ if (width <= 0) return "";
477
+ if (s.length > width) return width === 1 ? "\u2026" : `${s.slice(0, width - 1)}\u2026`;
478
+ return s.padEnd(width);
479
+ }
480
+ function kindColor(kind) {
481
+ const colorFn = KIND_COLORS[kind] ?? pc.dim;
482
+ return colorFn(kind);
483
+ }
484
+ var KIND_COL_WIDTH = 10;
485
+ var TARGET_DEFAULT_HINT = "default: the project's configured harness, else claude-code";
486
+ function kindColorPad(kind, width = KIND_COL_WIDTH) {
487
+ const colorFn = KIND_COLORS[kind] ?? pc.dim;
488
+ return colorFn(fitWidth(kind, width));
489
+ }
490
+ function colorRef(ref) {
491
+ const colonIdx = ref.indexOf(":");
492
+ if (colonIdx === -1) return ref;
493
+ const kind = ref.slice(0, colonIdx);
494
+ const rest = ref.slice(colonIdx);
495
+ return `${kindColor(kind)}${rest}`;
496
+ }
497
+ function logOk(msg) {
498
+ console.log(` ${pc.green("\u2713")} ${msg}`);
499
+ }
500
+ function logErr(msg) {
501
+ console.error(` ${pc.red("\u2717")} ${msg}`);
502
+ }
503
+ function logWarn(msg) {
504
+ console.log(` ${pc.yellow("!")} ${msg}`);
505
+ }
506
+ function logWarnErr(msg) {
507
+ console.error(` ${pc.yellow("!")} ${msg}`);
508
+ }
509
+ function warnPlaceholderBodies(bodies, descriptions) {
510
+ const refs = [.../* @__PURE__ */ new Set([...bodies ?? [], ...descriptions ?? []])];
511
+ for (const ref of refs) {
512
+ const parts = [
513
+ ...descriptions?.includes(ref) ? ["description"] : [],
514
+ ...bodies?.includes(ref) ? ["body"] : []
515
+ ];
516
+ const both = parts.length > 1;
517
+ logWarn(
518
+ `${ref} ${parts.join(" and ")} ${both ? "are" : "is"} still the scaffold placeholder; write ${both ? "them" : "it"} (\`skaile validate\` fails ${both ? "them" : "it"})`
519
+ );
520
+ }
521
+ }
522
+ function logInfo(msg) {
523
+ console.log(` ${pc.dim("\xB7")} ${msg}`);
524
+ }
525
+ var activeCommandPath;
526
+ function setActiveCommand(cmd) {
527
+ const names = [];
528
+ for (let c = cmd; c && c.parent; c = c.parent) {
529
+ names.unshift(c.name());
530
+ }
531
+ activeCommandPath = names.length > 0 ? names.join(" ") : void 0;
532
+ }
533
+ function nearestParentProject(dir) {
534
+ for (let up = path3.dirname(dir); up !== dir; dir = up, up = path3.dirname(dir)) {
535
+ if (existsSync(path3.join(up, SKAILE_YAML_DEFAULT))) return up;
536
+ }
537
+ return void 0;
538
+ }
539
+ function logNoProject(projectDir) {
540
+ const dir = path3.resolve(projectDir);
541
+ logErr(`No ${S.cmd("skaile.yaml")} found. Run ${S.cmd("skaile init")} to create one.`);
542
+ const parent = nearestParentProject(dir);
543
+ if (parent) {
544
+ const command = activeCommandPath ?? process.argv.slice(2).find((a) => !a.startsWith("-")) ?? "<command>";
545
+ logErr(
546
+ `${S.cmd(parent)} holds a ${S.cmd("skaile.yaml")}: run from there or put the option after the command name: ${S.cmd(`skaile ${command} --project-dir ${parent}`)}.`
547
+ );
548
+ }
549
+ }
550
+ function requireProjectConfig(projectDir, opts = {}) {
551
+ const dir = path3.resolve(projectDir);
552
+ if (!existsSync(path3.join(dir, SKAILE_YAML_DEFAULT))) {
553
+ if (opts.allowMissing) return;
554
+ logNoProject(dir);
555
+ process.exit(1);
556
+ }
557
+ try {
558
+ resolveSkWorkspaceConfig(dir);
559
+ } catch (err2) {
560
+ logErr(err2 instanceof Error ? err2.message : String(err2));
561
+ process.exit(1);
562
+ }
563
+ try {
564
+ readLock(path3.join(dir, "skaile.lock.yaml"));
565
+ } catch (err2) {
566
+ if (err2 instanceof LockParseError) {
567
+ logErr(err2.message);
568
+ process.exit(1);
569
+ }
570
+ }
571
+ warnProjectConfig(dir);
572
+ }
573
+ function deferredWarnings() {
574
+ const held = [];
575
+ let live = false;
576
+ return {
577
+ push: (msg) => {
578
+ if (live) logWarn(msg);
579
+ else held.push(msg);
580
+ },
581
+ flush: () => {
582
+ for (const msg of held.splice(0)) logWarn(msg);
583
+ live = true;
584
+ }
585
+ };
586
+ }
587
+ var STALE_COPY_LIST_MAX = 5;
588
+ function warnStaleHarnessCopies(am) {
589
+ let stale;
590
+ try {
591
+ stale = am.listStaleHarnessCopies();
592
+ } catch {
593
+ return;
594
+ }
595
+ for (const harness of SUPPORTED_HARNESSES) {
596
+ const rel = stale.filter((s) => s.harness === harness).map((s) => path3.relative(am.projectDir, s.path));
597
+ if (rel.length === 0) continue;
598
+ const dir = `${rel[0]?.split(path3.sep)[0] ?? harness}/`;
599
+ const shown = rel.slice(0, STALE_COPY_LIST_MAX).join(", ");
600
+ const more = rel.length > STALE_COPY_LIST_MAX ? `, +${rel.length - STALE_COPY_LIST_MAX} more` : "";
601
+ logWarn(
602
+ `Stale ${S.cmd(dir)} copies no longer managed (deploying to ${am.harness}): ${shown}${more}. Delete them with ${S.cmd(`skaile harness set ${am.harness} --clean`)}, or pass ${S.cmd(`--target ${harness}`)} to keep using ${dir}.`
603
+ );
604
+ }
605
+ }
606
+ function bareSoftDepName(ref) {
607
+ return softDepName(ref);
608
+ }
609
+ function formatSoftDepHint(edge) {
610
+ const suffix = edge.toRef ? ` \u2014 run \`skaile add ${edge.toRef}\` to include it.` : "";
611
+ return `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${suffix}`;
612
+ }
613
+ function formatSoftDepSection(targets) {
614
+ if (targets.length === 0) return [];
615
+ const out = [` ${S.label("Soft dependencies (inferred)")}:`];
616
+ for (const t of targets) out.push(` ${S.dim("\xB7")} ${t} ${S.dim("(soft)")}`);
617
+ return out;
618
+ }
619
+ function formatSoftDepAddPreview(name, targets) {
620
+ if (targets.length === 0) return "";
621
+ return S.dim(`${name} references ${targets.join(", ")} (soft dep, not auto-added)`);
622
+ }
623
+ function formatSoftDepRemovePreview(name, targets) {
624
+ if (targets.length === 0) return "";
625
+ return S.dim(`removing ${name} would orphan ${targets.join(", ")} (soft dep)`);
626
+ }
627
+ function formatRelativeTime(date) {
628
+ const diff = Date.now() - date.getTime();
629
+ const seconds = Math.floor(diff / 1e3);
630
+ if (seconds < 60) return "just now";
631
+ const minutes = Math.floor(seconds / 60);
632
+ if (minutes < 60) return `${minutes}m ago`;
633
+ const hours = Math.floor(minutes / 60);
634
+ if (hours < 24) return `${hours}h ago`;
635
+ const days = Math.floor(hours / 24);
636
+ return `${days}d ago`;
637
+ }
638
+ function reportLegacyOmpCopies(removed, kept = []) {
639
+ for (const p of removed) {
640
+ logInfo(
641
+ S.dim(`removed the old omp copy ${p.replace(homedir(), "~")} (omp reads ~/.omp/agent)`)
642
+ );
643
+ }
644
+ for (const p of kept) {
645
+ logWarn(
646
+ `${p.replace(homedir(), "~")} is an old omp location and skaile did not write this copy, so it was kept: delete it if you do not need it`
647
+ );
648
+ }
649
+ }
650
+ function parseHarnessFilter(raw) {
651
+ if (!raw) return void 0;
652
+ const ids = raw.split(",").map((s) => s.trim()).filter(Boolean);
653
+ const out = [];
654
+ for (const id of ids) {
655
+ if (!SUPPORTED_HARNESSES.includes(id)) {
656
+ logErr(unknownHarnessTargetMessage(id));
657
+ process.exit(1);
658
+ }
659
+ out.push(id);
660
+ }
661
+ return out.length > 0 ? out : void 0;
662
+ }
663
+ var SUB_AGENT_MARKER = "You are a sub-agent:";
664
+ function warnFilesOnlyDelegates(projectDir, target) {
665
+ if (target !== "codex") return;
666
+ const dir = path3.join(projectDir, ".codex", "skaile-agents");
667
+ let names;
668
+ try {
669
+ names = readdirSync(dir).filter((f) => f.endsWith(".md"));
670
+ } catch {
671
+ return;
672
+ }
673
+ const delegates = names.filter((f) => {
674
+ try {
675
+ return readFileSync(path3.join(dir, f), "utf8").includes(SUB_AGENT_MARKER);
676
+ } catch {
677
+ return false;
678
+ }
679
+ }).map((f) => f.replace(/\.md$/, "")).sort();
680
+ if (delegates.length === 0) return;
681
+ logWarn(
682
+ `codex: delegate agents are files only (${delegates.join(", ")}): Codex does not load .codex/agents as sub-agents, so the orchestrator cannot call them`
683
+ );
684
+ }
685
+
686
+ export { KIND_COL_WIDTH, S, TARGET_DEFAULT_HINT, agentDefinitionProblem, agentInstanceErrorLines, bareSoftDepName, canonicalHarnessId, checkAgentInstances, colorRef, connectorErrorLines, connectorMountPathChecks, deferredWarnings, driverAliasOption, fitWidth, foldDriverFlag, formatRelativeTime, formatSoftDepAddPreview, formatSoftDepHint, formatSoftDepRemovePreview, formatSoftDepSection, friendlyHarnessError, harnessErrorNotes, instanceRefProblem, isRecord, kindColor, kindColorPad, logErr, logInfo, logNoProject, logOk, logWarn, logWarnErr, parseHarnessFilter, reportLegacyOmpCopies, reportProjectConfig, reportUnknownHarnesses, requireProjectConfig, setActiveCommand, unknownConnectorDriverErrors, unknownHarnessErrors, unknownHarnessMessage, unknownHarnessTargetMessage, unknownKeyWarnings, warnFilesOnlyDelegates, warnPlaceholderBodies, warnProjectConfig, warnStaleHarnessCopies };
687
+ //# sourceMappingURL=chunk-2MUUPRIG.js.map
688
+ //# sourceMappingURL=chunk-2MUUPRIG.js.map