@skaile/workspaces 6.3.0 → 6.5.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 (399) hide show
  1. package/CHANGELOG.md +72 -1
  2. package/README.md +4 -0
  3. package/dist/ai-sdk.js +74 -32
  4. package/dist/ai-sdk.js.map +1 -1
  5. package/dist/app-sdk/index.js +1 -1
  6. package/dist/{asset-feeds-3YO2352Y.js → asset-feeds-4I6Z4OI3.js} +21 -21
  7. package/dist/{asset-feeds-3YO2352Y.js.map → asset-feeds-4I6Z4OI3.js.map} +1 -1
  8. package/dist/asset-manager/catalog-deployer.js +7 -7
  9. package/dist/asset-manager/index.js +13 -13
  10. package/dist/asset-manager/installer.js +9 -9
  11. package/dist/asset-manager/renderers.js +8 -8
  12. package/dist/asset-manager/src/index.d.ts +156 -27
  13. package/dist/asset-manager/src/index.d.ts.map +1 -1
  14. package/dist/asset-manager/src/install-instances.d.ts +2 -0
  15. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  16. package/dist/asset-manager/src/installer.d.ts +6 -0
  17. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  18. package/dist/bridge/harnesses/claude-sdk.js +23 -18
  19. package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
  20. package/dist/bridge/harnesses/codex.js +36 -34
  21. package/dist/bridge/harnesses/codex.js.map +1 -1
  22. package/dist/bridge/harnesses/continue.js +11 -12
  23. package/dist/bridge/harnesses/continue.js.map +1 -1
  24. package/dist/bridge/harnesses/echo.js +4 -5
  25. package/dist/bridge/harnesses/echo.js.map +1 -1
  26. package/dist/bridge/harnesses/gemini.js +8 -9
  27. package/dist/bridge/harnesses/goose.js +11 -12
  28. package/dist/bridge/harnesses/goose.js.map +1 -1
  29. package/dist/bridge/harnesses/omp.js +16 -11
  30. package/dist/bridge/harnesses/omp.js.map +1 -1
  31. package/dist/bridge/harnesses/opencode.js +11 -12
  32. package/dist/bridge/harnesses/opencode.js.map +1 -1
  33. package/dist/bridge/harnesses/qwen.js +8 -9
  34. package/dist/bridge/harnesses/qwen.js.map +1 -1
  35. package/dist/bridge/index.js +19 -20
  36. package/dist/bridge/src/ai-sdk.d.ts +5 -2
  37. package/dist/bridge/src/ai-sdk.d.ts.map +1 -1
  38. package/dist/bridge/src/codex/login-fallback.d.ts +39 -0
  39. package/dist/bridge/src/codex/login-fallback.d.ts.map +1 -0
  40. package/dist/bridge/src/error-classifier.d.ts +6 -0
  41. package/dist/bridge/src/error-classifier.d.ts.map +1 -1
  42. package/dist/bridge/src/harness-model-check.d.ts +11 -7
  43. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  44. package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
  45. package/dist/bridge/src/harnesses/codex.d.ts +0 -6
  46. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  47. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  48. package/dist/bridge/src/index.d.ts +1 -0
  49. package/dist/bridge/src/index.d.ts.map +1 -1
  50. package/dist/{chunk-XEVFSDIF.js → chunk-22ZX33H6.js} +6 -6
  51. package/dist/{chunk-XEVFSDIF.js.map → chunk-22ZX33H6.js.map} +1 -1
  52. package/dist/{chunk-KPKGWXUJ.js → chunk-23SG4JRV.js} +4 -4
  53. package/dist/{chunk-KPKGWXUJ.js.map → chunk-23SG4JRV.js.map} +1 -1
  54. package/dist/{chunk-MYXFR27L.js → chunk-2HS357RA.js} +77 -37
  55. package/dist/chunk-2HS357RA.js.map +1 -0
  56. package/dist/{chunk-7TSNR5H5.js → chunk-2IAWVUW3.js} +4 -4
  57. package/dist/{chunk-7TSNR5H5.js.map → chunk-2IAWVUW3.js.map} +1 -1
  58. package/dist/{chunk-6GWSDPBP.js → chunk-2M3VLKT2.js} +3 -3
  59. package/dist/{chunk-6GWSDPBP.js.map → chunk-2M3VLKT2.js.map} +1 -1
  60. package/dist/{chunk-PNUM7GUY.js → chunk-3DA74PLW.js} +3 -3
  61. package/dist/{chunk-PNUM7GUY.js.map → chunk-3DA74PLW.js.map} +1 -1
  62. package/dist/{chunk-7RH6E332.js → chunk-3KSLUVKB.js} +7 -7
  63. package/dist/{chunk-7RH6E332.js.map → chunk-3KSLUVKB.js.map} +1 -1
  64. package/dist/{chunk-6OHZUUR7.js → chunk-5DE3DGVR.js} +11 -5
  65. package/dist/chunk-5DE3DGVR.js.map +1 -0
  66. package/dist/{chunk-32FYVSSW.js → chunk-6EKQENAP.js} +6 -6
  67. package/dist/{chunk-32FYVSSW.js.map → chunk-6EKQENAP.js.map} +1 -1
  68. package/dist/{chunk-QK7AG5AV.js → chunk-6Y3SC7O4.js} +4 -4
  69. package/dist/{chunk-QK7AG5AV.js.map → chunk-6Y3SC7O4.js.map} +1 -1
  70. package/dist/{chunk-ROVZCGTN.js → chunk-7EMS2GZO.js} +40 -37
  71. package/dist/chunk-7EMS2GZO.js.map +1 -0
  72. package/dist/{chunk-COUJOTAJ.js → chunk-7H4GTP7V.js} +3 -3
  73. package/dist/{chunk-COUJOTAJ.js.map → chunk-7H4GTP7V.js.map} +1 -1
  74. package/dist/{chunk-VUWRGMT6.js → chunk-AFTZNR2W.js} +3 -3
  75. package/dist/{chunk-VUWRGMT6.js.map → chunk-AFTZNR2W.js.map} +1 -1
  76. package/dist/{chunk-JMIKGAUA.js → chunk-AVFRFGM2.js} +16 -6
  77. package/dist/chunk-AVFRFGM2.js.map +1 -0
  78. package/dist/{chunk-7MV3NHPT.js → chunk-B436SG5P.js} +42 -25
  79. package/dist/chunk-B436SG5P.js.map +1 -0
  80. package/dist/{chunk-ZEH4WFEG.js → chunk-B4BLJUYN.js} +69 -26
  81. package/dist/chunk-B4BLJUYN.js.map +1 -0
  82. package/dist/{chunk-LEJQAX7G.js → chunk-DNXPXJ3X.js} +82 -50
  83. package/dist/chunk-DNXPXJ3X.js.map +1 -0
  84. package/dist/{chunk-HDVLBEEX.js → chunk-E6UWI3TP.js} +3 -3
  85. package/dist/{chunk-HDVLBEEX.js.map → chunk-E6UWI3TP.js.map} +1 -1
  86. package/dist/{chunk-2TFKXSB5.js → chunk-EN5REMWV.js} +4 -4
  87. package/dist/{chunk-2TFKXSB5.js.map → chunk-EN5REMWV.js.map} +1 -1
  88. package/dist/{chunk-QFFMFZIR.js → chunk-EO7KGX6P.js} +4 -4
  89. package/dist/{chunk-QFFMFZIR.js.map → chunk-EO7KGX6P.js.map} +1 -1
  90. package/dist/{chunk-KIPCBIFJ.js → chunk-ETF6Q3R3.js} +23 -80
  91. package/dist/chunk-ETF6Q3R3.js.map +1 -0
  92. package/dist/{chunk-6WH2WE4B.js → chunk-G4NCSYWR.js} +9 -8
  93. package/dist/chunk-G4NCSYWR.js.map +1 -0
  94. package/dist/{chunk-JCPD4QRM.js → chunk-G5SYFFMD.js} +2 -2
  95. package/dist/{chunk-JCPD4QRM.js.map → chunk-G5SYFFMD.js.map} +1 -1
  96. package/dist/{chunk-Q7CU5GQO.js → chunk-HPA3RP5E.js} +4 -4
  97. package/dist/{chunk-Q7CU5GQO.js.map → chunk-HPA3RP5E.js.map} +1 -1
  98. package/dist/{chunk-KGHYXXXV.js → chunk-IS3NIZBX.js} +588 -133
  99. package/dist/chunk-IS3NIZBX.js.map +1 -0
  100. package/dist/{chunk-XBQTXGY4.js → chunk-IWKKTCXY.js} +98 -17
  101. package/dist/chunk-IWKKTCXY.js.map +1 -0
  102. package/dist/{chunk-HH2H2ZV7.js → chunk-J5JWLKLB.js} +35 -20
  103. package/dist/chunk-J5JWLKLB.js.map +1 -0
  104. package/dist/chunk-J6YPKMMY.js +83 -0
  105. package/dist/chunk-J6YPKMMY.js.map +1 -0
  106. package/dist/{chunk-TGV2EWGL.js → chunk-K4DHYTUM.js} +4 -4
  107. package/dist/{chunk-TGV2EWGL.js.map → chunk-K4DHYTUM.js.map} +1 -1
  108. package/dist/{chunk-72NT2TJU.js → chunk-KA2GLAPS.js} +7 -8
  109. package/dist/chunk-KA2GLAPS.js.map +1 -0
  110. package/dist/{chunk-VUJXZDCY.js → chunk-KSH5CFQS.js} +3 -3
  111. package/dist/{chunk-VUJXZDCY.js.map → chunk-KSH5CFQS.js.map} +1 -1
  112. package/dist/{chunk-BIRW3HOG.js → chunk-KSUT5KAE.js} +3 -3
  113. package/dist/{chunk-BIRW3HOG.js.map → chunk-KSUT5KAE.js.map} +1 -1
  114. package/dist/{chunk-AMJ6KEV7.js → chunk-KUADKMNX.js} +4 -4
  115. package/dist/{chunk-AMJ6KEV7.js.map → chunk-KUADKMNX.js.map} +1 -1
  116. package/dist/{chunk-TSTRH4SM.js → chunk-KYNCY3F3.js} +3 -3
  117. package/dist/{chunk-TSTRH4SM.js.map → chunk-KYNCY3F3.js.map} +1 -1
  118. package/dist/{chunk-V5BPDB4J.js → chunk-LE6QS4PG.js} +3 -3
  119. package/dist/{chunk-V5BPDB4J.js.map → chunk-LE6QS4PG.js.map} +1 -1
  120. package/dist/{chunk-6UP2EDFN.js → chunk-NSIOBKDX.js} +313 -4
  121. package/dist/chunk-NSIOBKDX.js.map +1 -0
  122. package/dist/{chunk-MD3FUZS3.js → chunk-OBZ5WQ32.js} +3 -3
  123. package/dist/{chunk-MD3FUZS3.js.map → chunk-OBZ5WQ32.js.map} +1 -1
  124. package/dist/{chunk-ELSGFI3I.js → chunk-OLHHN3NO.js} +31 -7
  125. package/dist/chunk-OLHHN3NO.js.map +1 -0
  126. package/dist/{chunk-JGH7NB47.js → chunk-S7DVT2BV.js} +4 -4
  127. package/dist/{chunk-JGH7NB47.js.map → chunk-S7DVT2BV.js.map} +1 -1
  128. package/dist/{chunk-PHAMYCZH.js → chunk-SN663FCA.js} +5 -5
  129. package/dist/{chunk-PHAMYCZH.js.map → chunk-SN663FCA.js.map} +1 -1
  130. package/dist/{serve-preflight-H2AYMGJ6.js → chunk-SRTWKZP2.js} +30 -61
  131. package/dist/chunk-SRTWKZP2.js.map +1 -0
  132. package/dist/{chunk-H622YULS.js → chunk-SZTHSPRC.js} +3 -4
  133. package/dist/chunk-SZTHSPRC.js.map +1 -0
  134. package/dist/{chunk-LD6O6QKU.js → chunk-T7HGEMNB.js} +4 -4
  135. package/dist/{chunk-LD6O6QKU.js.map → chunk-T7HGEMNB.js.map} +1 -1
  136. package/dist/{chunk-4QRJBY2P.js → chunk-TDPQOR3C.js} +2 -2
  137. package/dist/{chunk-4QRJBY2P.js.map → chunk-TDPQOR3C.js.map} +1 -1
  138. package/dist/{chunk-Y3I4KGLX.js → chunk-TGUMN5G7.js} +310 -175
  139. package/dist/chunk-TGUMN5G7.js.map +1 -0
  140. package/dist/{chunk-TO5SSMRI.js → chunk-THX5EE3K.js} +67 -19
  141. package/dist/chunk-THX5EE3K.js.map +1 -0
  142. package/dist/{chunk-QTLUZUF2.js → chunk-TNQLDEM6.js} +86 -34
  143. package/dist/chunk-TNQLDEM6.js.map +1 -0
  144. package/dist/{chunk-EQNIBBB6.js → chunk-TROEC2Z2.js} +34 -20
  145. package/dist/chunk-TROEC2Z2.js.map +1 -0
  146. package/dist/{chunk-E5NQRHEB.js → chunk-U6KRTCNA.js} +4 -4
  147. package/dist/{chunk-E5NQRHEB.js.map → chunk-U6KRTCNA.js.map} +1 -1
  148. package/dist/{chunk-J5JRGBKK.js → chunk-UMLCKKIA.js} +64 -32
  149. package/dist/chunk-UMLCKKIA.js.map +1 -0
  150. package/dist/{chunk-DU26AVK2.js → chunk-USVUS4DJ.js} +8 -8
  151. package/dist/{chunk-DU26AVK2.js.map → chunk-USVUS4DJ.js.map} +1 -1
  152. package/dist/{chunk-HGOJEVHY.js → chunk-UZET67SO.js} +4 -4
  153. package/dist/{chunk-HGOJEVHY.js.map → chunk-UZET67SO.js.map} +1 -1
  154. package/dist/{chunk-IZQOO6MN.js → chunk-V5KG6CCV.js} +2 -2
  155. package/dist/{chunk-IZQOO6MN.js.map → chunk-V5KG6CCV.js.map} +1 -1
  156. package/dist/{chunk-76FLBODK.js → chunk-VT6G5AJV.js} +10 -7
  157. package/dist/chunk-VT6G5AJV.js.map +1 -0
  158. package/dist/{chunk-URCJIV7T.js → chunk-W5KCAWGN.js} +3 -3
  159. package/dist/{chunk-URCJIV7T.js.map → chunk-W5KCAWGN.js.map} +1 -1
  160. package/dist/{chunk-YW4ASEUP.js → chunk-WFLQMAR5.js} +5 -5
  161. package/dist/{chunk-YW4ASEUP.js.map → chunk-WFLQMAR5.js.map} +1 -1
  162. package/dist/{chunk-RFQONXET.js → chunk-X44XKBZX.js} +3 -3
  163. package/dist/{chunk-RFQONXET.js.map → chunk-X44XKBZX.js.map} +1 -1
  164. package/dist/{chunk-BPTWWKGF.js → chunk-YBEJCQE5.js} +3 -3
  165. package/dist/{chunk-BPTWWKGF.js.map → chunk-YBEJCQE5.js.map} +1 -1
  166. package/dist/{chunk-PL52CI4U.js → chunk-YRC2EFOU.js} +4 -4
  167. package/dist/{chunk-PL52CI4U.js.map → chunk-YRC2EFOU.js.map} +1 -1
  168. package/dist/{chunk-7QG2WRSN.js → chunk-Z2X7UZEZ.js} +25 -8
  169. package/dist/chunk-Z2X7UZEZ.js.map +1 -0
  170. package/dist/{chunk-U3SXCVR7.js → chunk-ZUU2PLA3.js} +4 -4
  171. package/dist/{chunk-U3SXCVR7.js.map → chunk-ZUU2PLA3.js.map} +1 -1
  172. package/dist/{claude-code-EUKDGOOO.js → claude-code-JY6CYEG7.js} +4 -4
  173. package/dist/{claude-code-EUKDGOOO.js.map → claude-code-JY6CYEG7.js.map} +1 -1
  174. package/dist/cli/index.js +322 -162
  175. package/dist/cli/index.js.map +1 -1
  176. package/dist/cli/src/commands/cache.d.ts.map +1 -1
  177. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  178. package/dist/cli/src/commands/config.d.ts.map +1 -1
  179. package/dist/cli/src/commands/connector.d.ts.map +1 -1
  180. package/dist/cli/src/commands/deploy.d.ts.map +1 -1
  181. package/dist/cli/src/commands/harness.d.ts +5 -4
  182. package/dist/cli/src/commands/harness.d.ts.map +1 -1
  183. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  184. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  185. package/dist/cli/src/commands/library-index.d.ts +6 -0
  186. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  187. package/dist/cli/src/commands/migrate-files.d.ts +3 -6
  188. package/dist/cli/src/commands/migrate-files.d.ts.map +1 -1
  189. package/dist/cli/src/commands/migrate-harness.d.ts +4 -3
  190. package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -1
  191. package/dist/cli/src/commands/migrate.d.ts +2 -2
  192. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  193. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  194. package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
  195. package/dist/cli/src/commands/project.d.ts +7 -1
  196. package/dist/cli/src/commands/project.d.ts.map +1 -1
  197. package/dist/cli/src/commands/run.d.ts.map +1 -1
  198. package/dist/cli/src/commands/serve-preflight.d.ts +21 -0
  199. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  200. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  201. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  202. package/dist/cli/src/commands/source.d.ts +8 -0
  203. package/dist/cli/src/commands/source.d.ts.map +1 -1
  204. package/dist/cli/src/commands/update.d.ts.map +1 -1
  205. package/dist/cli/src/commands/validate-instances.d.ts +6 -0
  206. package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
  207. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  208. package/dist/cli/src/commands/verify.d.ts.map +1 -1
  209. package/dist/cli/src/config-checks.d.ts +8 -0
  210. package/dist/cli/src/config-checks.d.ts.map +1 -1
  211. package/dist/cli/src/ensure-sources.d.ts.map +1 -1
  212. package/dist/cli/src/helpers.d.ts +13 -4
  213. package/dist/cli/src/helpers.d.ts.map +1 -1
  214. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  215. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  216. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  217. package/dist/cli/src/plugin-store/spec.d.ts +20 -14
  218. package/dist/cli/src/plugin-store/spec.d.ts.map +1 -1
  219. package/dist/cli/src/setup.d.ts.map +1 -1
  220. package/dist/cli/src/skill-checks.d.ts +2 -0
  221. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  222. package/dist/connectors/config.js +5 -5
  223. package/dist/connectors/index.js +23 -24
  224. package/dist/connectors/src/index.d.ts +2 -2
  225. package/dist/connectors/src/index.d.ts.map +1 -1
  226. package/dist/connectors/src/managed-gitconfig.d.ts +22 -0
  227. package/dist/connectors/src/managed-gitconfig.d.ts.map +1 -1
  228. package/dist/connectors/src/npm-installer.d.ts +11 -3
  229. package/dist/connectors/src/npm-installer.d.ts.map +1 -1
  230. package/dist/connectors-VLFOQNS6.js +49 -0
  231. package/dist/{connectors-XYPE2DCQ.js.map → connectors-VLFOQNS6.js.map} +1 -1
  232. package/dist/connectors-shared/index.js +2 -2
  233. package/dist/core/index.js +6 -6
  234. package/dist/core/manifest.js +2 -2
  235. package/dist/core/models.js +1 -1
  236. package/dist/core/publish-manifest.js +3 -3
  237. package/dist/core/ref.js +1 -1
  238. package/dist/core/runtime-assets.js +5 -5
  239. package/dist/core/src/agent-instances.d.ts +6 -0
  240. package/dist/core/src/agent-instances.d.ts.map +1 -1
  241. package/dist/core/src/config-key-diagnostics.d.ts +2 -1
  242. package/dist/core/src/config-key-diagnostics.d.ts.map +1 -1
  243. package/dist/core/src/index.d.ts +5 -5
  244. package/dist/core/src/index.d.ts.map +1 -1
  245. package/dist/core/src/lock.d.ts +20 -1
  246. package/dist/core/src/lock.d.ts.map +1 -1
  247. package/dist/core/src/manifest-yaml-editor.d.ts +4 -1
  248. package/dist/core/src/manifest-yaml-editor.d.ts.map +1 -1
  249. package/dist/core/src/manifest.d.ts +9 -3
  250. package/dist/core/src/manifest.d.ts.map +1 -1
  251. package/dist/core/src/models.d.ts +10 -0
  252. package/dist/core/src/models.d.ts.map +1 -1
  253. package/dist/core/src/repo-manager.d.ts +11 -0
  254. package/dist/core/src/repo-manager.d.ts.map +1 -1
  255. package/dist/core/src/runtime-assets.d.ts +12 -1
  256. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  257. package/dist/core/src/walker.d.ts +3 -0
  258. package/dist/core/src/walker.d.ts.map +1 -1
  259. package/dist/core/src/workspace-config.d.ts +19 -2
  260. package/dist/core/src/workspace-config.d.ts.map +1 -1
  261. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  262. package/dist/core/workspace-config.js +4 -4
  263. package/dist/deploy/index.js +6 -6
  264. package/dist/discovery/index.js +5 -5
  265. package/dist/{ensure-sources-IN3VKHUA.js → ensure-sources-6O54DUQB.js} +31 -31
  266. package/dist/ensure-sources-6O54DUQB.js.map +1 -0
  267. package/dist/factory-assets/connectors/box.js +23 -24
  268. package/dist/factory-assets/connectors/deploy.js +23 -24
  269. package/dist/factory-assets/connectors/devserver.js +23 -24
  270. package/dist/factory-assets/connectors/flow/adapter.js +23 -24
  271. package/dist/factory-assets/connectors/flow/engine.js +7 -7
  272. package/dist/factory-assets/connectors/flow/run-flow.js +25 -26
  273. package/dist/factory-assets/connectors/flow.js +23 -24
  274. package/dist/factory-assets/connectors/git.js +23 -24
  275. package/dist/factory-assets/connectors/gmail.js +23 -24
  276. package/dist/factory-assets/connectors/googledrive.js +23 -24
  277. package/dist/factory-assets/connectors/local.js +23 -24
  278. package/dist/factory-assets/connectors/mattermost.js +23 -24
  279. package/dist/factory-assets/connectors/memory.js +23 -24
  280. package/dist/factory-assets/connectors/minio.js +23 -24
  281. package/dist/factory-assets/connectors/postgres.js +23 -24
  282. package/dist/factory-assets/connectors/s3.js +23 -24
  283. package/dist/factory-assets/connectors/sharepoint.js +23 -24
  284. package/dist/factory-assets/connectors/sqlite.js +23 -24
  285. package/dist/factory-assets/connectors/static-server.js +23 -24
  286. package/dist/factory-assets/connectors/tunnel.js +23 -24
  287. package/dist/factory-assets/connectors/webdav.js +23 -24
  288. package/dist/factory-assets/connectors/xstate-store.js +23 -24
  289. package/dist/factory-assets/connectors/xstate.js +23 -24
  290. package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +2 -1
  291. package/dist/{flows-QAO63TDV.js → flows-CIUPK7SB.js} +11 -11
  292. package/dist/{flows-QAO63TDV.js.map → flows-CIUPK7SB.js.map} +1 -1
  293. package/dist/{helpers-HDVGCF3M.js → helpers-YHDQHQEQ.js} +28 -29
  294. package/dist/{helpers-HDVGCF3M.js.map → helpers-YHDQHQEQ.js.map} +1 -1
  295. package/dist/library/index.js +10 -10
  296. package/dist/library/install.js +4 -4
  297. package/dist/library/src/manifest-writer.d.ts +9 -0
  298. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  299. package/dist/library/src/remote/remote-catalog-source.d.ts +9 -0
  300. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  301. package/dist/library/src/remote/rest-catalog-source.d.ts +1 -0
  302. package/dist/library/src/remote/rest-catalog-source.d.ts.map +1 -1
  303. package/dist/{library-publish-62OWCNB5.js → library-publish-MUGUST43.js} +53 -53
  304. package/dist/{library-publish-62OWCNB5.js.map → library-publish-MUGUST43.js.map} +1 -1
  305. package/dist/model-endpoint/index.js +9 -10
  306. package/dist/open-library-BVQCB37E.js +57 -0
  307. package/dist/{open-library-TZ7OSDEJ.js.map → open-library-BVQCB37E.js.map} +1 -1
  308. package/dist/{open-registry-RLZKTJG3.js → open-registry-JCSIAKEC.js} +14 -14
  309. package/dist/{open-registry-RLZKTJG3.js.map → open-registry-JCSIAKEC.js.map} +1 -1
  310. package/dist/{paths-D6LBQETQ.js → paths-XLKCAFRZ.js} +9 -9
  311. package/dist/{paths-D6LBQETQ.js.map → paths-XLKCAFRZ.js.map} +1 -1
  312. package/dist/{plugin-store-A5J4TLCH.js → plugin-store-NGRUTCJI.js} +9 -9
  313. package/dist/{plugin-store-A5J4TLCH.js.map → plugin-store-NGRUTCJI.js.map} +1 -1
  314. package/dist/project-BGYMLAS6.js +88 -0
  315. package/dist/{project-4AVRES3M.js.map → project-BGYMLAS6.js.map} +1 -1
  316. package/dist/resolver/index.js +7 -7
  317. package/dist/runner/index.js +38 -39
  318. package/dist/runner/src/capability-roundtrip.d.ts +4 -1
  319. package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
  320. package/dist/runner/src/composition/resolve-instance.d.ts.map +1 -1
  321. package/dist/runner/src/composition/resolve.d.ts +6 -0
  322. package/dist/runner/src/composition/resolve.d.ts.map +1 -1
  323. package/dist/runner/src/credential-notice.d.ts +3 -2
  324. package/dist/runner/src/credential-notice.d.ts.map +1 -1
  325. package/dist/runner/src/resources.d.ts.map +1 -1
  326. package/dist/runner/src/serve.d.ts.map +1 -1
  327. package/dist/sdk/asset-manager.js +13 -13
  328. package/dist/sdk/bridge.js +19 -20
  329. package/dist/sdk/core.js +6 -6
  330. package/dist/sdk/flow.js +7 -7
  331. package/dist/sdk/index.js +38 -39
  332. package/dist/sdk/index.js.map +1 -1
  333. package/dist/sdk/resolver.js +7 -7
  334. package/dist/sdk/runner.js +38 -39
  335. package/dist/sdk/session.js +2 -2
  336. package/dist/sdk/transport/ws/server.js +7 -7
  337. package/dist/sdk/transport/ws.js +7 -7
  338. package/dist/sdk/transport.js +7 -7
  339. package/dist/sdk/types.js +1 -1
  340. package/dist/serve-preflight-GQY5DZX6.js +56 -0
  341. package/dist/serve-preflight-GQY5DZX6.js.map +1 -0
  342. package/dist/session/index.js +2 -2
  343. package/dist/{setup-NSPQD4V4.js → setup-2NWSKSCO.js} +34 -32
  344. package/dist/setup-2NWSKSCO.js.map +1 -0
  345. package/dist/{skills-B533SRVZ.js → skills-PXZOL2FZ.js} +12 -12
  346. package/dist/{skills-B533SRVZ.js.map → skills-PXZOL2FZ.js.map} +1 -1
  347. package/dist/source-XA3L4H6I.js +86 -0
  348. package/dist/{source-VTECABUO.js.map → source-XA3L4H6I.js.map} +1 -1
  349. package/dist/{source-manifest-publish-YORI42MN.js → source-manifest-publish-QEGMTS33.js} +50 -51
  350. package/dist/source-manifest-publish-QEGMTS33.js.map +1 -0
  351. package/dist/transport/index.js +7 -7
  352. package/dist/transport/ws/server.js +7 -7
  353. package/dist/transport/ws.js +7 -7
  354. package/dist/tui/index.js +38 -39
  355. package/dist/tui/index.js.map +1 -1
  356. package/dist/types/index.js +1 -1
  357. package/dist/types/manifests.js +1 -1
  358. package/dist/types/src/capabilities.d.ts +9 -1
  359. package/dist/types/src/capabilities.d.ts.map +1 -1
  360. package/dist/types/src/manifests/agent.d.ts +2 -2
  361. package/dist/types/src/manifests/agent.d.ts.map +1 -1
  362. package/dist/types/src/version.d.ts +8 -8
  363. package/dist/workspace-plugin/adapters/mcp.js +30 -31
  364. package/dist/workspace-plugin/adapters/omp.js +14 -14
  365. package/dist/workspace-plugin/index.js +1 -1
  366. package/package.json +1 -1
  367. package/dist/chunk-6OHZUUR7.js.map +0 -1
  368. package/dist/chunk-6UP2EDFN.js.map +0 -1
  369. package/dist/chunk-6WH2WE4B.js.map +0 -1
  370. package/dist/chunk-72NT2TJU.js.map +0 -1
  371. package/dist/chunk-76FLBODK.js.map +0 -1
  372. package/dist/chunk-7MV3NHPT.js.map +0 -1
  373. package/dist/chunk-7QG2WRSN.js.map +0 -1
  374. package/dist/chunk-ELSGFI3I.js.map +0 -1
  375. package/dist/chunk-EQNIBBB6.js.map +0 -1
  376. package/dist/chunk-H622YULS.js.map +0 -1
  377. package/dist/chunk-HH2H2ZV7.js.map +0 -1
  378. package/dist/chunk-J5JRGBKK.js.map +0 -1
  379. package/dist/chunk-JMIKGAUA.js.map +0 -1
  380. package/dist/chunk-KGHYXXXV.js.map +0 -1
  381. package/dist/chunk-KIPCBIFJ.js.map +0 -1
  382. package/dist/chunk-LEJQAX7G.js.map +0 -1
  383. package/dist/chunk-MYXFR27L.js.map +0 -1
  384. package/dist/chunk-QTLUZUF2.js.map +0 -1
  385. package/dist/chunk-ROVZCGTN.js.map +0 -1
  386. package/dist/chunk-S6KZHPR4.js +0 -315
  387. package/dist/chunk-S6KZHPR4.js.map +0 -1
  388. package/dist/chunk-TO5SSMRI.js.map +0 -1
  389. package/dist/chunk-XBQTXGY4.js.map +0 -1
  390. package/dist/chunk-Y3I4KGLX.js.map +0 -1
  391. package/dist/chunk-ZEH4WFEG.js.map +0 -1
  392. package/dist/connectors-XYPE2DCQ.js +0 -50
  393. package/dist/ensure-sources-IN3VKHUA.js.map +0 -1
  394. package/dist/open-library-TZ7OSDEJ.js +0 -58
  395. package/dist/project-4AVRES3M.js +0 -88
  396. package/dist/serve-preflight-H2AYMGJ6.js.map +0 -1
  397. package/dist/setup-NSPQD4V4.js.map +0 -1
  398. package/dist/source-VTECABUO.js +0 -87
  399. package/dist/source-manifest-publish-YORI42MN.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../types/src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CA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;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,gBAAgB,CAAC;IACvB,6CAA6C;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,KAAK,EAAE,OAAO,CAAC;IACf,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -480,11 +480,11 @@ export declare const AgentManifestSchema: z.ZodObject<{
480
480
  persona: z.ZodOptional<z.ZodArray<z.ZodString>>;
481
481
  rules: z.ZodOptional<z.ZodArray<z.ZodString>>;
482
482
  knowledge: z.ZodOptional<z.ZodArray<z.ZodString>>;
483
- requires: z.ZodOptional<z.ZodArray<z.ZodObject<{
483
+ requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
484
484
  name: z.ZodString;
485
485
  source: z.ZodOptional<z.ZodString>;
486
486
  version: z.ZodOptional<z.ZodString>;
487
- }, z.core.$loose>>>;
487
+ }, z.core.$loose>]>>>;
488
488
  }, z.core.$loose>;
489
489
  export type AgentManifest = z.infer<typeof AgentManifestSchema>;
490
490
  export declare function validateAgent(data: unknown): ManifestValidationResult<AgentManifest>;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../types/src/manifests/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,wBAAwB,EAAoB,MAAM,cAAc,CAAC;AAI/E,kGAAkG;AAClG,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAMhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,iDAAkD,CAAC;AACvF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,+CAAgD,CAAC;AACtF,MAAM,MAAM,oBAAoB,GAAG,C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AAEhE,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAEpF"}
@@ -91,7 +91,7 @@ export type ProtocolVersion = {
91
91
  * dropped the patch from its recreate state. Transient, broadcast to every
92
92
  * client. A host maps it to its restart-required signal for that session. A
93
93
  * 4.16 runner never sends it, so a host feature-detects on
94
- * `major === 4 && minor >= 17` before it relies on the event to learn a late
94
+ * `major > 4 || (major === 4 && minor >= 17)` before it relies on the event to learn a late
95
95
  * refusal.
96
96
  *
97
97
  * Changed in 4.16.0:
@@ -107,7 +107,7 @@ export type ProtocolVersion = {
107
107
  * `agent.result`, `approval.decide`), `memory.*` and `trigger.*` capabilities;
108
108
  * `agent.list` and `agent.run` are served in the runner when the host
109
109
  * advertises no `host.agent_run`. A 4.15 runner emits none of this; feature-detect
110
- * on `major === 4 && minor >= 16`.
110
+ * on `major > 4 || (major === 4 && minor >= 16)`.
111
111
  *
112
112
  * Changed in 4.15.0:
113
113
  * New `resource_request` operation `write_range` for filesystem mounts and the
@@ -129,7 +129,7 @@ export type ProtocolVersion = {
129
129
  * event. Other senders' queued prompts stay queued, and a prompt without a
130
130
  * `senderId` is never dropped. A `cancel` without one keeps 4.13 behaviour. A
131
131
  * 4.13 runner ignores both fields and runs every queued prompt after a
132
- * cancel, so a host must feature-detect on `major === 4 && minor >= 14` before
132
+ * cancel, so a host must feature-detect on `major > 4 || (major === 4 && minor >= 14)` before
133
133
  * it marks prompts as not sent from anything but the event itself.
134
134
  *
135
135
  * Changed in 4.13.0:
@@ -139,7 +139,7 @@ export type ProtocolVersion = {
139
139
  * where we left off") that a manual compaction runs, so a pre-hibernate
140
140
  * compaction never starts agent work. The input is a strict object, so a 4.12
141
141
  * runner refuses the field: a host must feature-detect on
142
- * `major === 4 && minor >= 13` before sending it.
142
+ * `major > 4 || (major === 4 && minor >= 13)` before sending it.
143
143
  *
144
144
  * Changed in 4.12.0:
145
145
  * A filesystem-mount `read` takes optional `ReadOptions.offset` / `length` for
@@ -148,7 +148,7 @@ export type ProtocolVersion = {
148
148
  * (`offset`, `length`, total `size`, optional `modifiedAt`). A bad offset or length fails with
149
149
  * `code: "invalid_range"`. A 4.11 runner ignores both fields and sends the
150
150
  * whole file in one frame, so a host must feature-detect on
151
- * `major === 4 && minor >= 12` before asking for a range, and must treat an
151
+ * `major > 4 || (major === 4 && minor >= 12)` before asking for a range, and must treat an
152
152
  * answer without `range` as the whole file.
153
153
  *
154
154
  * Changed in 4.11.0:
@@ -197,7 +197,7 @@ export type ProtocolVersion = {
197
197
  * subagent made the call. Such a call runs alongside the main reply, so a host
198
198
  * that treats a tool call as a break in the reply's text should skip tagged
199
199
  * ones. A 4.4 runner never sets it and cannot be told apart from a turn with no
200
- * subagent; feature-detect on `major === 4 && minor >= 5`.
200
+ * subagent; feature-detect on `major > 4 || (major === 4 && minor >= 5)`.
201
201
  *
202
202
  * Changed in 4.4.0:
203
203
  * `SystemPromptSection.label` gains `"home"`, the `agent.home` block that the
@@ -219,14 +219,14 @@ export type ProtocolVersion = {
219
219
  * report `partial` instead of failing). `resource_response` gains an optional
220
220
  * `code` (`ConnectorResponseFailureCode`). A 4.1 runner answers either op with
221
221
  * an `error` starting `Unsupported operation` and no `code`; a host must
222
- * feature-detect on `major === 4 && minor >= 2` or accept that error form.
222
+ * feature-detect on `major > 4 || (major === 4 && minor >= 2)` or accept that error form.
223
223
  *
224
224
  * Changed in 4.1.0:
225
225
  * Additive `provider_quota_observed` event: one upstream quota-window reading
226
226
  * (window, status, optional utilization and reset) per change, attributed to
227
227
  * the pinned `AIProviderConfig`. A host with no handler broadcasts it
228
228
  * harmlessly. A 4.1 host against a 4.0 runner sees none and must not read
229
- * that as "no quota used" (feature-detect on `major === 4 && minor >= 1`).
229
+ * that as "no quota used" (feature-detect on `major > 4 || (major === 4 && minor >= 1)`).
230
230
  *
231
231
  * Changed in 4.0.0 (breaking):
232
232
  * The AI provider registry is the only provider surface on the wire.
@@ -1,53 +1,52 @@
1
- export { buildWorkspaceMcpServer, buildWorkspaceMcpStdioServer, buildWorkspaceToolDefs, runMcpServerStdio } from '../../chunk-7RH6E332.js';
2
- import '../../chunk-MD3FUZS3.js';
3
- import '../../chunk-BPTWWKGF.js';
1
+ export { buildWorkspaceMcpServer, buildWorkspaceMcpStdioServer, buildWorkspaceToolDefs, runMcpServerStdio } from '../../chunk-3KSLUVKB.js';
2
+ import '../../chunk-OBZ5WQ32.js';
3
+ import '../../chunk-YBEJCQE5.js';
4
4
  import '../../chunk-WYZXSJBK.js';
5
- import '../../chunk-QK7AG5AV.js';
6
- import '../../chunk-TSTRH4SM.js';
5
+ import '../../chunk-6Y3SC7O4.js';
6
+ import '../../chunk-KYNCY3F3.js';
7
7
  import '../../chunk-KW37WNXY.js';
8
8
  import '../../chunk-3MWQKQUB.js';
9
- import '../../chunk-URCJIV7T.js';
10
- import '../../chunk-PNUM7GUY.js';
11
- import '../../chunk-ZEH4WFEG.js';
12
- import '../../chunk-6GWSDPBP.js';
13
- import '../../chunk-7TSNR5H5.js';
14
- import '../../chunk-7MV3NHPT.js';
15
- import '../../chunk-JGH7NB47.js';
16
- import '../../chunk-2TFKXSB5.js';
17
- import '../../chunk-ELSGFI3I.js';
9
+ import '../../chunk-W5KCAWGN.js';
10
+ import '../../chunk-3DA74PLW.js';
11
+ import '../../chunk-B4BLJUYN.js';
12
+ import '../../chunk-2M3VLKT2.js';
13
+ import '../../chunk-2IAWVUW3.js';
14
+ import '../../chunk-B436SG5P.js';
15
+ import '../../chunk-S7DVT2BV.js';
16
+ import '../../chunk-EN5REMWV.js';
17
+ import '../../chunk-OLHHN3NO.js';
18
18
  import '../../chunk-LOO5CB5M.js';
19
- import '../../chunk-BIRW3HOG.js';
20
- import '../../chunk-U3SXCVR7.js';
21
- import '../../chunk-H622YULS.js';
22
- import '../../chunk-6OHZUUR7.js';
19
+ import '../../chunk-KSUT5KAE.js';
20
+ import '../../chunk-ZUU2PLA3.js';
21
+ import '../../chunk-5DE3DGVR.js';
23
22
  import '../../chunk-7DN6JKP2.js';
24
- import '../../chunk-HDVLBEEX.js';
25
- import '../../chunk-S6KZHPR4.js';
23
+ import '../../chunk-E6UWI3TP.js';
24
+ import '../../chunk-EO7KGX6P.js';
25
+ import '../../chunk-SZTHSPRC.js';
26
+ import '../../chunk-NSIOBKDX.js';
26
27
  import '../../chunk-G5SUWZEU.js';
27
- import '../../chunk-QFFMFZIR.js';
28
- import '../../chunk-6UP2EDFN.js';
29
28
  import '../../chunk-IFGTRL2I.js';
30
- import '../../chunk-RFQONXET.js';
29
+ import '../../chunk-X44XKBZX.js';
31
30
  import '../../chunk-WD3L5QSU.js';
32
31
  import '../../chunk-7RGTAEG6.js';
33
- import '../../chunk-JCPD4QRM.js';
32
+ import '../../chunk-G5SYFFMD.js';
34
33
  import '../../chunk-LNFKL23K.js';
35
34
  import '../../chunk-JRN5QF4C.js';
36
35
  import '../../chunk-NUELZWCF.js';
37
- import '../../chunk-76FLBODK.js';
38
- import '../../chunk-J5JRGBKK.js';
36
+ import '../../chunk-VT6G5AJV.js';
37
+ import '../../chunk-UMLCKKIA.js';
39
38
  import '../../chunk-4GY63JU6.js';
40
- import '../../chunk-6WH2WE4B.js';
39
+ import '../../chunk-G4NCSYWR.js';
41
40
  import '../../chunk-5KRMNUL4.js';
42
41
  import '../../chunk-C5HFK34M.js';
43
42
  import '../../chunk-MWXYN6NY.js';
44
- import '../../chunk-XBQTXGY4.js';
43
+ import '../../chunk-IWKKTCXY.js';
45
44
  import '../../chunk-L5VSIPQD.js';
46
45
  import '../../chunk-VTETQCR6.js';
47
- import '../../chunk-KPKGWXUJ.js';
48
- import '../../chunk-JMIKGAUA.js';
46
+ import '../../chunk-23SG4JRV.js';
47
+ import '../../chunk-AVFRFGM2.js';
49
48
  import '../../chunk-RVRB27AN.js';
50
- import '../../chunk-IZQOO6MN.js';
49
+ import '../../chunk-V5KG6CCV.js';
51
50
  import '../../chunk-VSX2G7LA.js';
52
51
  import '../../chunk-RXGPFAMN.js';
53
52
  import '../../chunk-DKXNKFKP.js';
@@ -126,7 +126,7 @@ function buildOmpToolSet(plugin) {
126
126
  description: "List all mounts declared in skaile.yaml with their mount status.",
127
127
  parameters: {},
128
128
  handler: async () => {
129
- const { mountList } = await import('../../connectors-XYPE2DCQ.js');
129
+ const { mountList } = await import('../../connectors-VLFOQNS6.js');
130
130
  return (await mountList(plugin.connectorManager)).content[0].text;
131
131
  }
132
132
  },
@@ -135,7 +135,7 @@ function buildOmpToolSet(plugin) {
135
135
  description: "Sync a mount (pull latest from remote).",
136
136
  parameters: { mount_id: { type: "string" } },
137
137
  handler: async ({ mount_id }) => {
138
- const { mountSync } = await import('../../connectors-XYPE2DCQ.js');
138
+ const { mountSync } = await import('../../connectors-VLFOQNS6.js');
139
139
  return (await mountSync(plugin.connectorManager, mount_id)).content[0].text;
140
140
  }
141
141
  },
@@ -144,7 +144,7 @@ function buildOmpToolSet(plugin) {
144
144
  description: "List all available flow definitions from ai-assets.",
145
145
  parameters: {},
146
146
  handler: async () => {
147
- const { flowList } = await import('../../flows-QAO63TDV.js');
147
+ const { flowList } = await import('../../flows-CIUPK7SB.js');
148
148
  return (await flowList(plugin.projectDir)).content[0].text;
149
149
  }
150
150
  },
@@ -153,7 +153,7 @@ function buildOmpToolSet(plugin) {
153
153
  description: "List past flow run sessions for this workspace.",
154
154
  parameters: {},
155
155
  handler: async () => {
156
- const { flowListSessions } = await import('../../flows-QAO63TDV.js');
156
+ const { flowListSessions } = await import('../../flows-CIUPK7SB.js');
157
157
  return (await flowListSessions(plugin.projectDir)).content[0].text;
158
158
  }
159
159
  },
@@ -162,7 +162,7 @@ function buildOmpToolSet(plugin) {
162
162
  description: "List all skills in the ai-assets catalog.",
163
163
  parameters: {},
164
164
  handler: async () => {
165
- const { skillList } = await import('../../skills-B533SRVZ.js');
165
+ const { skillList } = await import('../../skills-PXZOL2FZ.js');
166
166
  return (await skillList(plugin.projectDir)).content[0].text;
167
167
  }
168
168
  },
@@ -171,7 +171,7 @@ function buildOmpToolSet(plugin) {
171
171
  description: "Search skills by name, description, or keywords.",
172
172
  parameters: { query: { type: "string" } },
173
173
  handler: async ({ query }) => {
174
- const { skillSearch } = await import('../../skills-B533SRVZ.js');
174
+ const { skillSearch } = await import('../../skills-PXZOL2FZ.js');
175
175
  return (await skillSearch(plugin.projectDir, query)).content[0].text;
176
176
  }
177
177
  },
@@ -180,7 +180,7 @@ function buildOmpToolSet(plugin) {
180
180
  description: "Show the full SKILL.md content for a skill.",
181
181
  parameters: { skill_id: { type: "string" } },
182
182
  handler: async ({ skill_id }) => {
183
- const { skillShow } = await import('../../skills-B533SRVZ.js');
183
+ const { skillShow } = await import('../../skills-PXZOL2FZ.js');
184
184
  return (await skillShow(plugin.projectDir, skill_id)).content[0].text;
185
185
  }
186
186
  },
@@ -189,7 +189,7 @@ function buildOmpToolSet(plugin) {
189
189
  description: "List connectors declared in skaile.yaml as {connected, failed, notice?}. A host-managed mount in `connected` carries `health` {status: ok|stale|failed, errorClass, checkedAt}; if it is not ok, tell the user and do not write to it. `failed` holds connectors that did not connect this session, with the failure reason \u2014 their mount paths are dead directories, not synced workspaces.",
190
190
  parameters: {},
191
191
  handler: async () => {
192
- const { connectorList } = await import('../../connectors-XYPE2DCQ.js');
192
+ const { connectorList } = await import('../../connectors-VLFOQNS6.js');
193
193
  return (await connectorList(plugin.connectorManager)).content[0].text;
194
194
  }
195
195
  },
@@ -198,7 +198,7 @@ function buildOmpToolSet(plugin) {
198
198
  description: "Read content from a connector by path.",
199
199
  parameters: { connector_id: { type: "string" }, path: { type: "string" } },
200
200
  handler: async ({ connector_id, path }) => {
201
- const { connectorRead } = await import('../../connectors-XYPE2DCQ.js');
201
+ const { connectorRead } = await import('../../connectors-VLFOQNS6.js');
202
202
  return (await connectorRead(plugin.connectorManager, connector_id, path)).content[0].text;
203
203
  }
204
204
  },
@@ -215,7 +215,7 @@ function buildOmpToolSet(plugin) {
215
215
  operation,
216
216
  args
217
217
  }) => {
218
- const { connectorExec } = await import('../../connectors-XYPE2DCQ.js');
218
+ const { connectorExec } = await import('../../connectors-VLFOQNS6.js');
219
219
  return (await connectorExec(plugin.connectorManager, connector_id, operation, args ?? {})).content[0].text;
220
220
  }
221
221
  },
@@ -271,7 +271,7 @@ async function handleSlashCommand(plugin, group, args) {
271
271
  }
272
272
  }
273
273
  async function handleFlowCommand(plugin, sub, rest) {
274
- const { flowList, flowShow, flowListSessions, flowGetSession } = await import('../../flows-QAO63TDV.js');
274
+ const { flowList, flowShow, flowListSessions, flowGetSession } = await import('../../flows-CIUPK7SB.js');
275
275
  if (!sub || sub === "list") return (await flowList(plugin.projectDir)).content[0].text;
276
276
  if (sub === "show" && rest[0])
277
277
  return (await flowShow(plugin.projectDir, rest[0])).content[0].text;
@@ -281,7 +281,7 @@ async function handleFlowCommand(plugin, sub, rest) {
281
281
  return "Usage: /flow list | show <id> | sessions | session <runId>";
282
282
  }
283
283
  async function handleConnectorCommand(plugin, sub, rest) {
284
- const { connectorList, connectorRead, connectorExec, connectorDescribe } = await import('../../connectors-XYPE2DCQ.js');
284
+ const { connectorList, connectorRead, connectorExec, connectorDescribe } = await import('../../connectors-VLFOQNS6.js');
285
285
  if (!sub || sub === "list") return (await connectorList(plugin.connectorManager)).content[0].text;
286
286
  if (sub === "read" && rest[0] && rest[1])
287
287
  return (await connectorRead(plugin.connectorManager, rest[0], rest[1])).content[0].text;
@@ -300,7 +300,7 @@ async function handleConnectorCommand(plugin, sub, rest) {
300
300
  return "Usage: /connector list | read <id> <path> | exec <id> <op> [json-args] | describe <id>";
301
301
  }
302
302
  async function handleSkillCommand(plugin, sub, rest) {
303
- const { skillList, skillShow, skillSearch } = await import('../../skills-B533SRVZ.js');
303
+ const { skillList, skillShow, skillSearch } = await import('../../skills-PXZOL2FZ.js');
304
304
  if (sub === "run" && rest[0])
305
305
  return (await skillShow(plugin.projectDir, rest[0])).content[0].text;
306
306
  if (!sub || sub === "list") return (await skillList(plugin.projectDir)).content[0].text;
@@ -311,7 +311,7 @@ async function handleSkillCommand(plugin, sub, rest) {
311
311
  return "Usage: /skill list | show <id> | search <query> | run <id>";
312
312
  }
313
313
  async function handleMountsCommand(plugin, sub, rest) {
314
- const { mountList, mountSync, mountStatus } = await import('../../connectors-XYPE2DCQ.js');
314
+ const { mountList, mountSync, mountStatus } = await import('../../connectors-VLFOQNS6.js');
315
315
  if (!sub || sub === "list") return (await mountList(plugin.connectorManager)).content[0].text;
316
316
  if (sub === "sync" && rest[0])
317
317
  return (await mountSync(plugin.connectorManager, rest[0])).content[0].text;
@@ -1,4 +1,4 @@
1
- export { PluginStore, WorkspacePlugin, buildClaudePluginFiles, resolveProjectDir } from '../chunk-4QRJBY2P.js';
1
+ export { PluginStore, WorkspacePlugin, buildClaudePluginFiles, resolveProjectDir } from '../chunk-TDPQOR3C.js';
2
2
  export { err, ok, okJson } from '../chunk-3MWQKQUB.js';
3
3
  import '../chunk-C5HFK34M.js';
4
4
  import '../chunk-DKXNKFKP.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skaile/workspaces",
3
- "version": "6.3.0",
3
+ "version": "6.5.0",
4
4
  "description": "Skaile workspaces runtime — types, core, bridge, runner, store, connectors, and supporting layers as one publishable package",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.9",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../bridge/src/error-classifier.ts","../bridge/src/reconfigure-model-ref.ts","../bridge/src/reconfigure-ledger.ts","../bridge/src/runner-private-env.ts"],"names":[],"mappings":";;;AAkDO,IAAM,SAAA,GAAN,cAAwB,KAAA,CAAM;AAAA,EAC1B,MAAA;AAAA,EACT,YAAY,MAAA,EAAoB;AAC9B,IAAA,KAAA,CAAM,OAAO,OAAO,CAAA;AACpB,IAAA,IAAA,CAAK,IAAA,GAAO,WAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AACF;AAaO,IAAM,uBAAA,GAAN,cAAsC,KAAA,CAAM;AAA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AAA,GAA2C,CAAC,mBAAmB","file":"chunk-6OHZUUR7.js","sourcesContent":["/**\n * Error classification for the Claude Agent SDK harness.\n *\n * Wraps the Anthropic API error patterns surfaced through the bundled\n * `claude-cli.js`. The CLI flattens upstream HTTP errors into terse strings\n * like:\n *\n * `Claude Code returned an error result: Failed to authenticate. API Error:\n * 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\n * \"Invalid authentication credentials\"}}`\n *\n * Word-for-word that reads as an auth failure, but in practice it also\n * fires when a Claude Max OAuth subscription has exhausted its current\n * quota window — Anthropic returns a non-200 that the CLI relabels as\n * \"Failed to authenticate\" without preserving the original error type.\n *\n * The classifier here:\n * 1. Parses an embedded JSON body when the upstream included one\n * (e.g. `{\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",...}}`)\n * so we believe the structured `error.type` over the surrounding\n * free-text wrapper.\n * 2. Honours the SDK's `terminal_reason` when it explicitly indicates\n * a blocking-limit / rapid-refill / model-error condition — those\n * are authoritative even if the textual error reads as auth.\n * 3. Falls back to keyword heuristics on the message text.\n * 4. For OAuth-style credentials (Claude Code subscriptions), adds a\n * hint that bounces user attention to quota rather than credentials,\n * because that's overwhelmingly the cause when a CredentialsFile\n * provider that worked yesterday now returns \"Invalid authentication\n * credentials\" without anyone touching the file.\n */\n\nimport type { AgentError } from \"./types.js\";\n\n/**\n * Error thrown by harnesses when the upstream provider rejects the credential\n * with an authentication-shaped failure (HTTP 401 / `authentication_error`\n * structured body). Carries the structured {@link AgentError} produced by\n * {@link classifyClaudeSdkError} so the runner can mediate without\n * re-classifying string text.\n *\n * The runner's 401-mediation handler `instanceof`-discriminates on this\n * subclass so the auth-vs-rate_limit fork stays in one place.\n *\n * Spec: `_devlog/specs/2026-05-07-unified-credential-mediation.md`\n * § \"Runner-side handling on 401\".\n *\n * @category Errors\n * @since 3.3.0\n */\nexport class AuthError extends Error {\n readonly detail: AgentError;\n constructor(detail: AgentError) {\n super(detail.message);\n this.name = \"AuthError\";\n this.detail = detail;\n }\n}\n\n/**\n * Error thrown when an auth-shaped failure persists *after* a successful\n * credential self-heal — the refresh worked, yet the immediate retry still\n * returned 401. That combination rules out the credential and points at the\n * account itself: a hidden-tier rate limit, a billing block, or anti-abuse\n * throttling on OAuth tokens used at scale (Anthropic mislabels all three as\n * `authentication_error`). It deliberately does **not** extend {@link AuthError}\n * so the harness's auth self-heal does not fire again on it.\n *\n * @category Errors\n */\nexport class AccountUnavailableError extends Error {\n readonly detail: AgentError;\n constructor(detail: AgentError) {\n super(detail.message);\n this.name = \"AccountUnavailableError\";\n this.detail = detail;\n }\n}\n\n/**\n * Re-label an auth-shaped {@link AgentError} as an `account` failure. Called\n * when a 401 recurs after a successful credential refresh: the credential is\n * fine, so the user needs an account-state hint, not \"check your API key\".\n * Pure function.\n */\nexport function reclassifyAuthAsAccountUnavailable(detail: AgentError): AgentError {\n return {\n ...detail,\n category: \"account\",\n statusCode: detail.statusCode ?? 401,\n retryable: false,\n hint: \"The credential was refreshed successfully but Anthropic still rejected the request. This is an account-state issue, not an invalid credential — usually a rate limit at a hidden tier, a billing block, or anti-abuse throttling. Wait a few minutes and retry; if it persists, check the account's billing and usage limits at https://console.anthropic.com/.\",\n };\n}\n\n/**\n * `terminal_reason` values from the Claude Agent SDK that imply the failure\n * is a rate / quota / blocking condition rather than a credential problem.\n */\nconst RATE_LIMIT_TERMINAL_REASONS = new Set<string>([\"blocking_limit\", \"rapid_refill_breaker\"]);\n\n/**\n * `terminal_reason` values that indicate a generic, retryable model failure.\n * `prompt_too_long` is handled separately (not retryable, different hint).\n */\nconst MODEL_TERMINAL_REASONS = new Set<string>([\"model_error\", \"image_error\"]);\n\n/**\n * Input shape for {@link classifyClaudeSdkError} when decoding an `SDKResultError`.\n *\n * All fields are optional; `classifyClaudeSdkError` also accepts a plain `string`\n * (a thrown exception message) for the common non-SDK code paths.\n *\n * @docLink packages/bridge/api-reference#error-classifier\n */\nexport interface ClaudeSdkResultErrorInput {\n /** `errors` array from `SDKResultError`. Empty when not provided. */\n errors?: string[];\n /**\n * `terminal_reason` from `SDKResultError`. Authoritative when set to a\n * blocking/rapid-refill value, regardless of message text.\n */\n terminalReason?: string;\n /** `subtype` from `SDKResultError` — `error_max_turns` etc. */\n subtype?: string;\n /**\n * `true` when the configured Anthropic credential is a Claude Code\n * subscription (`CredentialsFile` provider) rather than a raw API key.\n * Changes the hint copy because `Invalid authentication credentials`\n * on an OAuth subscription almost always means quota.\n */\n oauthCredential?: boolean;\n}\n\n/**\n * The `apiError` tag the Claude Agent SDK (0.3.289) puts on the assistant\n * message it renders for a long-context entitlement 429.\n */\nexport const LONG_CONTEXT_CREDITS_API_ERROR = \"long_context_credits_required\";\n\n/**\n * Upstream and SDK-rendered wordings of the long-context entitlement 429:\n * \"Extra usage is required for long context\", \"Usage credits are required for\n * long context requests\", and the CLI's \"Usage credits required for 1M context\".\n */\nconst LONG_CONTEXT_ENTITLEMENT_PATTERN =\n /\\b(?:extra usage is|usage credits(?: are)?) required for (?:long|1m) context\\b/i;\n\n/**\n * Whether any of `texts` is the 429 Anthropic returns when the account may not\n * use a long (1M) context window: the seat is not out of quota, it cannot serve\n * a context over 200k. Matches only that wording, never a usage-limit 429.\n *\n * @docLink packages/bridge/api-reference#error-classifier\n */\nexport function isLongContextEntitlementRejection(\n texts: ReadonlyArray<string | null | undefined>,\n): boolean {\n return texts.some(\n (text) => typeof text === \"string\" && LONG_CONTEXT_ENTITLEMENT_PATTERN.test(text),\n );\n}\n\n/**\n * Classify a Claude SDK result-error or thrown error into a structured\n * {@link AgentError}. Pure function — safe to call from any layer.\n *\n * @param input - Either a free-text error message (from a thrown exception)\n * or a partially-decoded `SDKResultError` shape with `errors[]`,\n * `terminal_reason`, and `subtype`.\n * @returns A category, retryable flag, and human-readable hint.\n * @docLink packages/bridge/api-reference#error-classifier\n */\nexport function classifyClaudeSdkError(input: string | ClaudeSdkResultErrorInput): AgentError {\n const opts: ClaudeSdkResultErrorInput = typeof input === \"string\" ? { errors: [input] } : input;\n\n const message = (opts.errors ?? []).join(\"; \") || \"Unknown agent error\";\n\n // ── 1. Honour authoritative `terminal_reason` ──────────────────────────\n const byTerminalReason = classifyByTerminalReason(message, opts);\n if (byTerminalReason) {\n return byTerminalReason;\n }\n\n // ── 2. Inspect embedded JSON body for a structured error.type ──────────\n const structured = tryParseEmbeddedAnthropicError(message);\n if (structured) {\n const byStructured = classifyByStructuredError(message, structured, opts);\n if (byStructured) {\n return byStructured;\n }\n }\n\n // ── 3. Heuristic keyword classification on the wrapper text ────────────\n const lower = message.toLowerCase();\n\n const byKeyword = classifyByKeyword(message, lower, opts);\n if (byKeyword) {\n return byKeyword;\n }\n\n // ── 4. SDK result subtypes ─────────────────────────────────────────────\n const bySubtype = classifyBySubtype(message, opts);\n if (bySubtype) {\n return bySubtype;\n }\n\n return {\n message,\n category: \"unknown\",\n retryable: true,\n };\n}\n\n/**\n * Phase 1: classify on the SDK's authoritative `terminal_reason`. Returns\n * `null` when the reason is unset or not one of the recognised values.\n */\nfunction classifyByTerminalReason(\n message: string,\n opts: ClaudeSdkResultErrorInput,\n): AgentError | null {\n if (opts.terminalReason && RATE_LIMIT_TERMINAL_REASONS.has(opts.terminalReason)) {\n return {\n message,\n category: \"rate_limit\",\n retryable: true,\n hint: oauthQuotaHint(opts.oauthCredential),\n };\n }\n if (opts.terminalReason === \"prompt_too_long\") {\n return {\n message,\n category: \"model\",\n retryable: false,\n hint: \"The conversation is too long for the configured model. Start a new session or compact the existing one.\",\n };\n }\n if (opts.terminalReason && MODEL_TERMINAL_REASONS.has(opts.terminalReason)) {\n return {\n message,\n category: \"model\",\n retryable: true,\n hint: \"The model rejected this turn. Try again or switch models.\",\n };\n }\n return null;\n}\n\n/**\n * Phase 2: classify on the structured `error.type` parsed from an embedded\n * Anthropic JSON body. Returns `null` for an unrecognised `errorType`.\n */\nfunction classifyByStructuredError(\n message: string,\n structured: { errorType: string; statusCode?: number },\n opts: ClaudeSdkResultErrorInput,\n): AgentError | null {\n if (structured.errorType === \"rate_limit_error\") {\n return {\n message,\n category: \"rate_limit\",\n statusCode: structured.statusCode ?? 429,\n retryable: true,\n hint: oauthQuotaHint(opts.oauthCredential),\n };\n }\n if (structured.errorType === \"overloaded_error\") {\n return {\n message,\n category: \"rate_limit\",\n statusCode: structured.statusCode ?? 529,\n retryable: true,\n hint: \"Anthropic is overloaded. Try again in a moment.\",\n };\n }\n if (structured.errorType === \"authentication_error\") {\n // Anthropic genuinely says it's an auth failure. But for OAuth\n // credentials with the `oauth-2025-04-20` beta flow, this still\n // overwhelmingly correlates with quota. Surface both possibilities\n // in the hint so the user does not first re-upload a perfectly\n // good credentials file.\n return {\n message,\n category: \"auth\",\n statusCode: structured.statusCode ?? 401,\n retryable: false,\n hint: opts.oauthCredential\n ? \"Anthropic rejected the OAuth credential. With Claude Code subscriptions this is usually a quota or rate-limit issue rather than an invalid token — wait a few minutes before re-uploading the credentials file. If it persists, re-export `~/.claude/.credentials.json` from a working Claude Code install.\"\n : \"Anthropic rejected the API key. Check it in Settings -> AI Providers.\",\n };\n }\n if (structured.errorType === \"permission_error\") {\n return {\n message,\n category: \"auth\",\n statusCode: structured.statusCode ?? 403,\n retryable: false,\n hint: \"The configured credential does not have access to the requested model.\",\n };\n }\n if (structured.errorType === \"invalid_request_error\") {\n return {\n message,\n category: \"validation\",\n statusCode: structured.statusCode ?? 400,\n retryable: false,\n hint: \"Anthropic rejected the request shape. This is likely a bug — please report it.\",\n };\n }\n return null;\n}\n\n/**\n * Phase 3: heuristic keyword classification on the lowercased wrapper text.\n * `lower` is the pre-lowercased `message`. Returns `null` when no bucket hits.\n */\nfunction classifyByKeyword(\n message: string,\n lower: string,\n opts: ClaudeSdkResultErrorInput,\n): AgentError | null {\n if (\n lower.includes(\"rate limit\") ||\n lower.includes(\"rate_limit\") ||\n lower.includes(\"too many requests\") ||\n lower.includes(\"429\") ||\n lower.includes(\"quota\") ||\n lower.includes(\"blocking_limit\") ||\n lower.includes(\"rapid_refill\")\n ) {\n return {\n message,\n category: \"rate_limit\",\n retryable: true,\n hint: oauthQuotaHint(opts.oauthCredential),\n };\n }\n\n if (\n lower.includes(\"credit balance\") ||\n lower.includes(\"insufficient credit\") ||\n lower.includes(\"out of credits\")\n ) {\n return {\n message,\n category: \"rate_limit\",\n retryable: false,\n hint: \"The configured Anthropic account is out of credits. Top up at https://console.anthropic.com/ or switch providers.\",\n };\n }\n\n if (lower.includes(\"oauth authentication is currently not supported\")) {\n return {\n message,\n category: \"auth\",\n statusCode: 401,\n retryable: false,\n hint: \"The Claude Code CLI did not send the OAuth beta header. The bundled CLI in this image is too old — rebuild the agent image.\",\n };\n }\n\n // The Claude Code CLI emits this terse, JSON-less string when it finds no\n // usable credential — most commonly because the OAuth access token in\n // `~/.claude/.credentials.json` expired and the file carries no refresh token\n // (the platform provisions access-token-only files by design). It MUST be\n // classified as `auth` so the harness promotes it to `AuthError` and the\n // `onAuthError` self-heal re-mints the credential. Without this branch the\n // message falls through to `unknown`, the self-heal never fires, and every\n // subsequent turn dead-ends on \"please /login\". The check sits ahead of the\n // generic auth keywords because the string contains none of them.\n if (lower.includes(\"not logged in\") || lower.includes(\"please run /login\")) {\n return {\n message,\n category: \"auth\",\n statusCode: 401,\n retryable: false,\n hint: opts.oauthCredential\n ? \"The Claude Code OAuth credential expired and could not be auto-refreshed in-container. The runner will re-mint it — retry the prompt. If it persists, re-export `~/.claude/.credentials.json` from a working Claude Code install.\"\n : \"No Anthropic credential is configured for this provider. Add one in Settings -> AI Providers.\",\n };\n }\n\n if (\n lower.includes(\"api key\") ||\n lower.includes(\"authentication\") ||\n lower.includes(\"invalid authentication\") ||\n lower.includes(\"unauthorized\") ||\n lower.includes(\"401\") ||\n lower.includes(\"403\")\n ) {\n return {\n message,\n category: \"auth\",\n retryable: false,\n hint: opts.oauthCredential\n ? \"Anthropic rejected the OAuth credential. With Claude Code subscriptions this is usually a quota or rate-limit issue rather than an invalid token — wait a few minutes before re-uploading the credentials file.\"\n : \"Check the API key configured for this AI provider in Settings.\",\n };\n }\n\n if (\n lower.includes(\"model\") &&\n (lower.includes(\"not found\") ||\n lower.includes(\"not available\") ||\n lower.includes(\"does not exist\"))\n ) {\n return {\n message,\n category: \"model\",\n retryable: false,\n hint: \"The selected model is not available for this credential. Change the model in the AI provider config.\",\n };\n }\n\n if (\n lower.includes(\"context length\") ||\n lower.includes(\"token limit\") ||\n lower.includes(\"max_tokens\") ||\n lower.includes(\"prompt is too long\") ||\n lower.includes(\"prompt_too_long\")\n ) {\n return {\n message,\n category: \"model\",\n retryable: false,\n hint: \"The conversation is too long for the model. Start a new session or compact this one.\",\n };\n }\n\n if (\n lower.includes(\"timeout\") ||\n lower.includes(\"econnrefused\") ||\n lower.includes(\"enotfound\") ||\n lower.includes(\"fetch failed\") ||\n lower.includes(\"network\")\n ) {\n return {\n message,\n category: \"network\",\n retryable: true,\n hint: \"Network error reaching Anthropic. The runner will retry — try again if it persists.\",\n };\n }\n\n return null;\n}\n\n/**\n * Phase 4: classify on the SDK result `subtype` (`error_max_turns` etc).\n * Returns `null` when the subtype is unset or unrecognised.\n */\nfunction classifyBySubtype(message: string, opts: ClaudeSdkResultErrorInput): AgentError | null {\n if (opts.subtype === \"error_max_turns\") {\n return {\n message,\n category: \"unknown\",\n retryable: true,\n hint: \"The agent stopped after reaching `max_turns`. Resume the session or raise `max_turns` in the agent config.\",\n };\n }\n if (opts.subtype === \"error_max_budget_usd\") {\n return {\n message,\n category: \"rate_limit\",\n retryable: false,\n hint: \"The agent stopped because it hit the configured per-turn budget. Raise the budget or split the work.\",\n };\n }\n return null;\n}\n\n/**\n * The shared keyword buckets matched by {@link classifyGenericErrorMessage}.\n * Harnesses layer a provider-specific `hint` on top of the returned category.\n */\nexport type GenericErrorCategory = \"auth\" | \"rate_limit\" | \"model\" | \"network\";\n\n/**\n * Classify a free-text harness error against the keyword buckets common to the\n * subprocess/SDK harnesses (omp, codex). Returns the matched `category` +\n * `retryable` flag, or `null` when no shared bucket matches so the caller can\n * fall through to its own provider-specific buckets (e.g. codex sandbox) and\n * `unknown` default. The harness supplies the user-facing `hint` — only the\n * bucketing logic is shared, not the copy.\n */\nexport function classifyGenericErrorMessage(\n msg: string,\n): { category: GenericErrorCategory; retryable: boolean } | null {\n const lower = msg.toLowerCase();\n if (\n lower.includes(\"api key\") ||\n lower.includes(\"unauthorized\") ||\n lower.includes(\"authentication\") ||\n lower.includes(\"401\")\n ) {\n return { category: \"auth\", retryable: false };\n }\n if (\n lower.includes(\"rate limit\") ||\n lower.includes(\"429\") ||\n lower.includes(\"too many requests\") ||\n lower.includes(\"quota\")\n ) {\n return { category: \"rate_limit\", retryable: true };\n }\n if (\n lower.includes(\"model\") &&\n (lower.includes(\"not found\") ||\n lower.includes(\"not available\") ||\n lower.includes(\"does not exist\"))\n ) {\n return { category: \"model\", retryable: false };\n }\n if (\n lower.includes(\"context length\") ||\n lower.includes(\"too long\") ||\n lower.includes(\"token limit\") ||\n lower.includes(\"max_tokens\")\n ) {\n return { category: \"model\", retryable: false };\n }\n if (\n lower.includes(\"timeout\") ||\n lower.includes(\"econnrefused\") ||\n lower.includes(\"enotfound\") ||\n lower.includes(\"network\") ||\n lower.includes(\"fetch failed\") ||\n lower.includes(\"fetch\") ||\n lower.includes(\"connection\")\n ) {\n return { category: \"network\", retryable: true };\n }\n return null;\n}\n\n/**\n * Returns the rate-limit hint copy, branched on whether the active\n * credential is a Claude Code OAuth subscription.\n */\nfunction oauthQuotaHint(oauthCredential?: boolean): string {\n if (oauthCredential) {\n return \"Quota exhausted on this Claude Code subscription. Wait for the rate-limit window to reset (typically a few minutes for short windows, longer for daily/weekly limits) before retrying. The credential itself is fine.\";\n }\n return \"The Anthropic account hit a rate limit. Wait a moment and try again.\";\n}\n\n/**\n * Try to extract a structured Anthropic error body from a free-text wrapper.\n * The bundled `claude-cli.js` typically formats failures as\n * `... API Error: <status> {\"type\":\"error\",\"error\":{\"type\":\"<errorType>\",...}}`\n * with optional trailing garbage after the JSON.\n *\n * Strategy: find the first `{`, then forward-scan tracking brace depth (with\n * string-literal awareness so braces inside quoted values do not throw the\n * count). The substring from `braceStart` to the matching `}` is the JSON\n * candidate; one `JSON.parse` does the rest. O(n) in the input length.\n *\n * Returns `null` when nothing parseable is found.\n */\nfunction tryParseEmbeddedAnthropicError(\n text: string,\n): { errorType: string; statusCode?: number } | null {\n const braceStart = text.indexOf(\"{\");\n if (braceStart < 0) {\n return null;\n }\n\n const braceEnd = findMatchingCloseBrace(text, braceStart);\n if (braceEnd < 0) {\n return null;\n }\n\n let parsed: { type?: string; error?: { type?: string; message?: string } };\n try {\n parsed = JSON.parse(text.slice(braceStart, braceEnd));\n } catch {\n return null;\n }\n const errorType = parsed?.error?.type;\n if (typeof errorType !== \"string\") {\n return null;\n }\n const statusMatch = text.match(/API Error:\\s*(\\d{3})/i);\n const statusCode = statusMatch ? Number(statusMatch[1]) : undefined;\n return { errorType, statusCode };\n}\n\n/**\n * Forward-scan `text` from `braceStart` (a `{`) with brace counting, returning\n * the index just past the matching close brace, or `-1` if unbalanced.\n * String-literal awareness: skip braces between unescaped double quotes.\n */\nfunction findMatchingCloseBrace(text: string, braceStart: number): number {\n let depth = 0;\n let inString = false;\n let escaped = false;\n for (let i = braceStart; i < text.length; i++) {\n const ch = text.charCodeAt(i);\n if (inString) {\n if (escaped) {\n escaped = false;\n } else if (ch === 92 /* \\ */) {\n escaped = true;\n } else if (ch === 34 /* \" */) {\n inString = false;\n }\n continue;\n }\n if (ch === 34 /* \" */) {\n inString = true;\n } else if (ch === 123 /* { */) {\n depth++;\n } else if (ch === 125 /* } */) {\n depth--;\n if (depth === 0) {\n return i + 1;\n }\n }\n }\n return -1;\n}\n","// The registry selector a live model change (`reconfigure({ model })`) leaves a\n// session on. Shared by the runner's `runner.reconfigure` handler and every\n// harness whose `reconfigure()` rewrites `modelRef`, so both pick the same entry.\nimport {\n type AIProviderLlmEntry,\n type AIProviderRegistry,\n isEntryEnabled,\n type MergedAIProviderRegistry,\n parseModelRef,\n registryEntries,\n} from \"@skaile/workspaces/core/provider-registry\";\n\n/** What a model-only reconfigure does to the session's registry selector. */\nexport type ReconfigureModelScope =\n | {\n ok: true;\n /** The selector to run from now on; `undefined` leaves `modelRef` unset. */\n modelRef: string | undefined;\n }\n | {\n ok: false;\n code: \"model_not_on_provider\";\n /** The entry the session runs on, or the one the patch named. */\n providerId: string;\n message: string;\n };\n\nexport interface ReconfigureModelScopeInput {\n /** The model the patch names: bare, `<providerId>/<modelId>` or `@role`. */\n model: string;\n /** The session's current selector (`AgentConfig.modelRef`). */\n modelRef: string | undefined;\n registry: AIProviderRegistry | MergedAIProviderRegistry | undefined;\n roles?: Record<string, string>;\n}\n\nfunction selectable(\n registry: AIProviderRegistry | MergedAIProviderRegistry,\n): Array<[string, AIProviderLlmEntry]> {\n return registryEntries(registry).filter(\n (pair): pair is [string, AIProviderLlmEntry] =>\n (pair[1].kind === \"llm\" || pair[1].kind === \"embed\") && isEntryEnabled(pair[1]),\n );\n}\n\n/**\n * Whether an entry serves a model id. An entry that declares no model at all\n * (no `model_map`, no `capabilities`) passes any id through, as the wake does.\n * Otherwise the id must be a declared logical id or a `model_map` target: the\n * platform sends the provider-side id the wake translated to.\n */\nfunction entryServes(entry: AIProviderLlmEntry, modelId: string): boolean {\n const map = entry.model_map ?? {};\n const caps = entry.capabilities ?? {};\n if (Object.keys(map).length === 0 && Object.keys(caps).length === 0) return true;\n return modelId in map || modelId in caps || Object.values(map).includes(modelId);\n}\n\n/** The entry a selector runs on, resolved the way the harnesses resolve it. */\nfunction currentProviderId(\n modelRef: string | undefined,\n registry: AIProviderRegistry | MergedAIProviderRegistry,\n entries: Array<[string, AIProviderLlmEntry]>,\n roles: Record<string, string> | undefined,\n): string | undefined {\n const named = modelRef?.trim();\n if (!named) return entries[0]?.[0];\n // A selector that is exactly an entry id names the endpoint and no model.\n if (entries.some(([id]) => id === named)) return named;\n return parseModelRef(named, registry, roles)?.providerId;\n}\n\n/**\n * Decide the selector a live model change leaves the session on.\n *\n * A bare model id keeps the provider the session already runs on\n * (`<currentProvider>/<model>`): re-resolving it by id alone could move the\n * session to another entry that lists the same id, which changes billing and\n * data residency without a sign. Only a patch that names a provider\n * (`<providerId>/<model>` or `@role`) moves it. When the target entry declares\n * its models and this one is not among them, the patch is refused so the host\n * applies it at the next wake instead.\n *\n * A registry with at most one usable entry has nowhere to move to and keeps the\n * old behaviour: the selector becomes the patch's model when one was set.\n */\nexport function scopeReconfigureModel(input: ReconfigureModelScopeInput): ReconfigureModelScope {\n const { model, modelRef, registry, roles } = input;\n const legacy: ReconfigureModelScope = {\n ok: true,\n modelRef: modelRef === undefined ? undefined : model,\n };\n if (!registry) return legacy;\n const entries = selectable(registry);\n if (entries.length <= 1) return legacy;\n\n const selector = model.trim();\n if (selector.startsWith(\"@\")) return { ok: true, modelRef: selector };\n\n const slash = selector.indexOf(\"/\");\n if (slash > 0) {\n const head = selector.slice(0, slash);\n const tail = selector.slice(slash + 1);\n const named = entries.find(([id]) => id === head);\n if (named && tail !== \"\") {\n if (entryServes(named[1], tail)) return { ok: true, modelRef: selector };\n return refuse(head, tail);\n }\n }\n\n const providerId = currentProviderId(modelRef, registry, entries, roles);\n const current = entries.find(([id]) => id === providerId);\n if (!current) return legacy;\n if (!entryServes(current[1], selector)) return refuse(current[0], selector);\n return { ok: true, modelRef: `${current[0]}/${selector}` };\n}\n\nfunction refuse(providerId: string, modelId: string): ReconfigureModelScope {\n return {\n ok: false,\n code: \"model_not_on_provider\",\n providerId,\n message: `AI provider entry \"${providerId}\" does not list model \"${modelId}\"; the change applies when the session next starts.`,\n };\n}\n","// One owner for a live reconfigure (`AgentHarness.reconfigure()`): the desired\n// config, the snapshot the running process was last given, drift between them,\n// serial ordering of patches, the provider-entry scope rule, rollback on a\n// refusal and the typed outcome. A harness supplies one `applyLive` hook that\n// pushes a delta into its process; everything else lives here.\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { scopeReconfigureModel } from \"./reconfigure-model-ref.js\";\nimport type {\n AgentConfig,\n ReconfigureApplied,\n ReconfigureOutcome,\n ReconfigurePatch,\n ReconfigureRollback,\n} from \"./types.js\";\n\n/** The config fields a live reconfigure reads and writes (the harness's own config object). */\nexport type ReconfigureConfig = Pick<\n AgentConfig,\n \"model\" | \"modelRef\" | \"thinking\" | \"effort\" | \"registry\" | \"roles\"\n>;\n\n/** What the running process holds: the settings it spawned with or was last switched to. */\nexport interface ReconfigureSnapshot {\n model?: string;\n modelRef?: string;\n thinking?: AgentConfig[\"thinking\"];\n effort?: AgentConfig[\"effort\"];\n}\n\n/**\n * What an {@link ReconfigureLedgerOptions.applyLive} hook answers:\n *\n * - `\"applied\"`: the process now runs the delta.\n * - `\"respawn\"`: the process cannot take it live; the harness replaces it before\n * the next turn and the new process reads the desired config.\n * - `{ rejected }`: the process refuses it; the ledger rolls the config back to\n * the snapshot.\n */\nexport type ReconfigureApplyResult = \"applied\" | \"respawn\" | { rejected: string };\n\n/**\n * What an {@link ReconfigureLedgerOptions.applyLive} hook is told about a push.\n * `late` is true when the whole delta was answered `ok` earlier (it landed\n * mid-turn): a refusal then reaches the host only through\n * {@link ReconfigureLedgerOptions.onLateRejection}, so the hook must not also\n * report it on another channel (an `error` event).\n */\nexport interface ReconfigurePushContext {\n late: boolean;\n}\n\nconst FIELDS = [\"model\", \"modelRef\", \"thinking\", \"effort\"] as const;\n\nexport interface ReconfigureLedgerOptions<S extends ReconfigureSnapshot> {\n /**\n * The desired config. A getter, because a harness may replace its config object;\n * the ledger writes accepted patches into whatever it returns.\n */\n config: () => ReconfigureConfig;\n /**\n * Push a delta (the fields whose desired value differs from the snapshot) into\n * the running process. Called with the process up and idle, or at a turn\n * boundary through {@link ReconfigureLedger.flushBeforeTurn}. The hook receives\n * the live snapshot and may refine it (a harness that keeps extra fields on `S`\n * updates them here); on `\"applied\"` the ledger copies the delta into it.\n * A hook that throws counts as a rejection. Its `context.late` says whether a\n * refusal is reported elsewhere (see {@link ReconfigurePushContext}). Absent: the process reads the\n * desired config at its next spawn and there is nothing to push.\n */\n applyLive?: (\n delta: ReconfigureApplied,\n snapshot: S,\n context: ReconfigurePushContext,\n ) => ReconfigureApplyResult | Promise<ReconfigureApplyResult>;\n /** Whether the process is up and can take a push. Default: true. */\n isLive?: () => boolean;\n /** Whether no turn is in flight. Default: true. */\n isIdle?: () => boolean;\n /**\n * Called synchronously once a patch is written to the desired config, before\n * any live push. For harnesses that must refresh a derived cache on a change.\n */\n onDesired?: (applied: ReconfigureApplied) => void;\n /**\n * A refusal that arrives after the patch was already answered `ok` (it landed\n * mid-turn and flushed at the turn boundary). The config is already rolled back\n * when this runs, and an idle-time refusal never calls it (the capability call\n * answers that one). A harness emits the harness event `reconfigure-rollback`.\n */\n onLateRejection?: (rollback: ReconfigureRollback) => void;\n log?: Pick<Logger, \"warn\" | \"info\">;\n}\n\n/**\n * Serialised live reconfigure for one harness.\n *\n * `ok: true` means effective from the next turn: the next turn runs on the new\n * settings by live switch, query recycle or respawn. A patch that lands while a\n * turn is in flight (or before the process is ready) stays desired, is answered\n * `ok`, and is pushed by {@link flushBeforeTurn}.\n *\n * @category Bridge\n */\nexport class ReconfigureLedger<S extends ReconfigureSnapshot = ReconfigureSnapshot> {\n private snapshot: S | null = null;\n private respawn = false;\n private tail: Promise<unknown> | null = null;\n\n constructor(private readonly options: ReconfigureLedgerOptions<S>) {}\n\n /**\n * Record what a freshly spawned process runs. Call at every spawn: the\n * desired config is what that spawn read, so drift is computed against this.\n * `null` forgets the process (nothing left to push to).\n */\n setSnapshot(snapshot: S | null): void {\n this.snapshot = snapshot;\n this.respawn = false;\n }\n\n /**\n * The process cannot take the desired config live and the harness must replace\n * it before the next turn. Cleared by the next {@link setSnapshot}.\n */\n get needsRespawn(): boolean {\n return this.respawn;\n }\n\n /**\n * Apply a patch: scope the model to the session's provider entry, write it to\n * the desired config, and push it when the process is up and idle. Patches run\n * one at a time in arrival order.\n */\n reconfigure(patch: ReconfigurePatch): Promise<ReconfigureOutcome> {\n return this.enqueue(() => this.runPatch(patch));\n }\n\n /**\n * Push any drift to the process at a turn boundary. Await it before the turn\n * is sent, so the turn runs on the desired settings. Never rejects.\n */\n flushBeforeTurn(): Promise<void> {\n return this.enqueue(async () => {\n const snapshot = this.snapshot;\n if (!snapshot || this.respawn || !(this.options.isLive?.() ?? true)) return;\n await this.flush(snapshot, new Set());\n });\n }\n\n private enqueue<T>(job: () => Promise<T>): Promise<T> {\n // With nothing in flight the job's synchronous prefix (scope + write) runs now.\n const run = this.tail ? this.tail.then(job) : job();\n const settled = run.then(\n () => undefined,\n () => undefined,\n );\n this.tail = settled;\n void settled.then(() => {\n if (this.tail === settled) this.tail = null;\n });\n return run;\n }\n\n private async runPatch(patch: ReconfigurePatch): Promise<ReconfigureOutcome> {\n const config = this.options.config();\n const applied: ReconfigureApplied = {};\n if (patch.model !== undefined) {\n // In registry mode the spawned model derives from `modelRef`, so it moves\n // too: scoped to the current entry unless the patch names another one.\n const scope = scopeReconfigureModel({\n model: patch.model,\n modelRef: config.modelRef,\n registry: config.registry,\n roles: config.roles,\n });\n if (!scope.ok) {\n this.options.log?.warn(\"model change refused; keeping the current model\", {\n model: patch.model,\n providerId: scope.providerId,\n });\n return {\n ok: false,\n code: scope.code,\n message: scope.message,\n providerId: scope.providerId,\n };\n }\n config.model = applied.model = patch.model;\n if (scope.modelRef !== undefined) config.modelRef = applied.modelRef = scope.modelRef;\n }\n if (patch.thinking !== undefined) config.thinking = applied.thinking = patch.thinking;\n if (patch.effort !== undefined) config.effort = applied.effort = patch.effort;\n this.options.onDesired?.(applied);\n\n const snapshot = this.snapshot;\n // No process: the next spawn reads the desired config.\n if (!snapshot || this.respawn) return { ok: true, applied };\n const live = this.options.isLive?.() ?? true;\n const idle = this.options.isIdle?.() ?? true;\n // Mid-turn or before ready: stays desired, flushed at the turn boundary.\n if (!live || !idle) return { ok: true, applied };\n\n const own = new Set(Object.keys(applied) as Array<keyof ReconfigureApplied>);\n const rejected = await this.flush(snapshot, own);\n return rejected === null\n ? { ok: true, applied }\n : { ok: false, code: \"rejected\", message: rejected };\n }\n\n /**\n * Push the drift to the process. Returns the refusal message, or `null` when\n * the process took it (or will, by respawn). On a refusal the config rolls back\n * to the snapshot; fields outside `own` were answered `ok` earlier, so they are\n * reported through `onLateRejection`.\n */\n private async flush(\n snapshot: S,\n own: ReadonlySet<keyof ReconfigureApplied>,\n ): Promise<string | null> {\n const hook = this.options.applyLive;\n if (!hook) return null;\n const config = this.options.config();\n const delta: ReconfigureApplied = {};\n for (const key of FIELDS) {\n const value = config[key];\n if (value !== undefined && value !== snapshot[key]) Object.assign(delta, { [key]: value });\n }\n if (Object.keys(delta).length === 0) return null;\n\n // Nothing in the delta was answered to a caller of this push: it is all late.\n const context: ReconfigurePushContext = { late: own.size === 0 };\n let result: ReconfigureApplyResult;\n try {\n result = await hook(delta, snapshot, context);\n } catch (err) {\n result = { rejected: err instanceof Error ? err.message : String(err) };\n }\n // The process was replaced meanwhile; the new one read the desired config.\n if (this.snapshot !== snapshot) return null;\n\n if (result === \"applied\") {\n Object.assign(snapshot, delta);\n return null;\n }\n if (result === \"respawn\") {\n this.respawn = true;\n return null;\n }\n\n const requested: ReconfigureApplied = {};\n const restored: ReconfigureApplied = {};\n for (const key of Object.keys(delta) as (keyof ReconfigureApplied)[]) {\n // The hook may have applied part of the delta and refined the snapshot.\n Object.assign(config, { [key]: snapshot[key] });\n if (!own.has(key)) {\n Object.assign(requested, { [key]: delta[key] });\n Object.assign(restored, { [key]: snapshot[key] });\n }\n }\n this.options.log?.warn(\"live reconfigure refused; config rolled back\", {\n reason: result.rejected,\n fields: Object.keys(delta),\n });\n if (Object.keys(requested).length > 0) {\n this.options.onLateRejection?.({ message: result.rejected, requested, restored });\n }\n return result.rejected;\n }\n}\n","/**\n * Environment variables that belong to the runner process and must never reach\n * an agent child (the CLI, its tools, MCP servers, hooks).\n *\n * `SKAILE_WS_AUTH_TOKEN` authenticates the host on the runner's own WebSocket.\n * An agent that can read it can connect to the runner as the host and send host\n * commands (prompts, connector mutations such as flow-gate approvals). The\n * runner removes it from `process.env` at startup; every harness strips it again\n * from the env it hands its child, so a value that slips back in through\n * `AgentConfig.env` or an embedder that skipped the startup scrub still stops\n * at the harness.\n */\nexport const RUNNER_PRIVATE_ENV_KEYS: readonly string[] = [\n \"SKAILE_WS_AUTH_TOKEN\",\n \"SKAILE_WS_AUTH_TOKEN_FILE\",\n];\n\n/**\n * Remove every {@link RUNNER_PRIVATE_ENV_KEYS} entry from `env`, in place, and\n * return it. Call it on the final child env, after every merge.\n */\nexport function stripRunnerPrivateEnv<T extends Record<string, string | undefined>>(env: T): T {\n for (const key of RUNNER_PRIVATE_ENV_KEYS) delete env[key];\n return env;\n}\n\n/**\n * Variables the runner sets for the agent's shell on purpose, which every harness passes to its\n * child next to its own allowlist (p1738). `GIT_CONFIG_GLOBAL` points `git` at the runner's managed\n * gitconfig (`<project>/.skaile/managed-gitconfig`); a harness that dropped it left the agent\n * with no path to the managed credentials.\n */\nexport const RUNNER_AGENT_ENV_KEYS: readonly string[] = [\"GIT_CONFIG_GLOBAL\"];\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../bridge/src/provider-catalog.ts"],"names":[],"mappings":";;;AAsFA,IAAM,wBAAA,GAAmD,EAAE,mBAAA,EAAqB,YAAA,EAAa;AAE7F,IAAM,SAAA,GAAkC,EAAE,IAAA,EAAM,WAAA,EAAa,UAAU,cAAA,EAAe;AAEtF,IAAM,kBAAA,GAAqB,YAAA;AAYpB,IAAM,mBAAA,GAAwD;AAAA,EACnE,SAAA,EAAW;AAAA,IACT,EAAA,EAAI,WAAA;AAAA,IACJ,IAAA,EAAM,KAAA;AAAA,IACN,KAAA,EAAO,WAAA;AAAA,IACP,OAAA,EAAS,oBAAA;AAAA,IACT,QAAA,EAAU,2BAAA;AAAA,IACV,YAAA,EAAc,oBAAA;AAAA,IACd,OAAA,EAAS,wBAAA;AAAA,IACT,UAAA,EAAY,EAAE,IAAA,EAAM,gBAAA,EAAkB,KAAK,mBAAA,EAA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E,EAAA,EAAI,IAAA,EAAM,MAAA,EAAQ,IAAA,EAAM,KAAK,MAAA,EAAQ,QAAA,CAAS,MAAA,EAAQ,MAAA,EAAQ,oBAAA,EAAqB;AAAA,IAC9F;AACA,IAAA,MAAM,MAAA,GACJ,QAAA,CAAS,MAAA,KAAW,GAAA,IAAO,QAAA,CAAS,WAAW,GAAA,GAC3C,6CAAA,GACA,CAAA,uBAAA,EAA0B,QAAA,CAAS,MAAM,CAAA,CAAA;AAC/C,IAAA,OAAO,EAAE,IAAI,KAAA,EAAO,MAAA,EAAQ,MAAM,GAAA,EAAK,MAAA,EAAQ,QAAA,CAAS,MAAA,EAAQ,MAAA,EAAO;AAAA,EACzE,SAAS,GAAA,EAAK;AACZ,IAAA,MAAM,UAAU,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,OAAO,GAAG,CAAA;AAC/D,IAAA,MAAM,MAAA,GACJ,GAAA,YAAe,KAAA,IAAS,GAAA,CAAI,IAAA,KAAS,eACjC,CAAA,wBAAA,EAA2B,OAAA,CAAQ,SAAA,IAAa,GAAI,CAAA,EAAA,CAAA,GACpD,OAAA;AACN,IAAA,OAAO,EAAE,EAAA,EAAI,KAAA,EAAO,MAAA,EAAQ,IAAA,EAAM,KAAK,MAAA,EAAO;AAAA,EAChD,CAAA,SAAE;AACA,IAAA,YAAA,CAAa,OAAO,CAAA;AAAA,EACtB;AACF","file":"chunk-6UP2EDFN.js","sourcesContent":["/**\n * The AI provider catalog — the preset layer of the provider registry (§1.5,\n * layer 5).\n *\n * A preset is the three-or-four literals an endpoint needs beyond a credential:\n * its wire `surface`, its `base_url` (or the transport that derives one), the\n * header the credential rides in, and the path a read-only probe can GET. With\n * them, `skaile providers add --preset groq` needs nothing but an env var name.\n *\n * This replaced `provider-endpoints.ts` `PROVIDER_ENDPOINTS`: every endpoint\n * that table knew is present here, with the surface/transport/credential facts\n * it could not express.\n *\n * The record types come from `@skaile/workspaces/core/provider-registry` — the\n * schema has exactly one home.\n *\n * @see PROVIDER-CONFIG-PLAN.md §1.2, §1.3, §2.5\n */\n\nimport {\n AI_PROVIDER_BASE_URL_TEMPLATES,\n type AIProviderCredentialKind,\n type AIProviderDiscovery,\n type AIProviderEntry,\n type AIProviderKind,\n type AIProviderLlmEntry,\n type AIProviderRegistry,\n type AIProviderRegistryLayer,\n type AIProviderRegistryPatch,\n type AIProviderSurface,\n type AIProviderTransport,\n type AIProviderVoiceParams,\n resolveEntryBaseUrl,\n} from \"@skaile/workspaces/core/provider-registry\";\n\n/**\n * Where the credential goes on the wire. `{credential}` is replaced with the\n * resolved secret. Needed because `credential.kind` alone is ambiguous:\n * `api_key_header` is `x-api-key` for Anthropic, `x-goog-api-key` for Gemini,\n * `api-key` for Azure OpenAI and `Authorization: Token …` for Deepgram.\n */\nexport interface AIProviderAuthHeader {\n name: string;\n template: string;\n}\n\n/** A catalog preset — the fields an entry inherits by naming it. */\nexport interface AIProviderPreset {\n /** Preset id; also the default entry id `skaile providers add` writes. */\n id: string;\n kind: AIProviderKind;\n label: string;\n /** `llm`/`embed` only. */\n surface?: AIProviderSurface;\n /** `llm`/`embed` only; omitted means `direct`. */\n transport?: AIProviderTransport;\n /** Literal endpoint. Absent when the transport derives one from `params`. */\n base_url?: string;\n /**\n * Env var the vendor's own SDK reads as a base-URL override, when one\n * exists. Consulted by the callers that still address an endpoint by preset\n * id — model discovery, key validation, and `skaile migrate providers` — so\n * a shell already pointed at a gateway keeps pointing there.\n */\n base_url_env?: string;\n /** Static non-secret headers, e.g. Anthropic's `anthropic-version`. */\n headers?: Record<string, string>;\n /** Credential shape plus the conventional env var holding the secret. */\n credential: { kind: AIProviderCredentialKind; env?: string };\n /** Header the credential rides in; defaults per surface when omitted. */\n auth_header?: AIProviderAuthHeader;\n /** Default routing/voice parameters. */\n params?: Record<string, string>;\n /** `params` keys the operator must supply — the preset cannot know them. */\n required_params?: string[];\n /**\n * Read-only path a health probe GETs, relative to `base_url`: the models\n * list for LLM surfaces, an equivalent authenticated read for voice.\n * Absent when the endpoint has none (Bedrock's runtime host).\n */\n probe_path?: string;\n discovery?: AIProviderDiscovery;\n /** Anything the operator has to know that the fields do not say. */\n notes?: string;\n}\n\nconst ANTHROPIC_VERSION_HEADER: Record<string, string> = { \"anthropic-version\": \"2023-06-01\" };\n\nconst X_API_KEY: AIProviderAuthHeader = { name: \"x-api-key\", template: \"{credential}\" };\n\nconst OPENAI_MODELS_PATH = \"/v1/models\";\n\n/**\n * Every preset the runtime ships.\n *\n * Insertion order is display order in `skaile providers list`: first-party\n * clouds, then OpenAI-compatible vendors, then the transports that need\n * routing parameters, then local runtimes and gateways, then voice.\n *\n * Sources: `platform/_devlog/reports/2026-09-20-inference-provider-market-survey.md`\n * (36 endpoints, base URLs and auth headers verified there).\n */\nexport const AI_PROVIDER_PRESETS: Record<string, AIProviderPreset> = {\n anthropic: {\n id: \"anthropic\",\n kind: \"llm\",\n label: \"Anthropic\",\n surface: \"anthropic-messages\",\n base_url: \"https://api.anthropic.com\",\n base_url_env: \"ANTHROPIC_BASE_URL\",\n headers: ANTHROPIC_VERSION_HEADER,\n credential: { kind: \"api_key_header\", env: \"ANTHROPIC_API_KEY\" },\n auth_header: X_API_KEY,\n probe_path: \"/v1/models\",\n discovery: { type: \"anthropic-models-list\" },\n },\n openai: {\n id: \"openai\",\n kind: \"llm\",\n label: \"OpenAI\",\n surface: \"openai-responses\",\n base_url: \"https://api.openai.com/v1\",\n base_url_env: \"OPENAI_BASE_URL\",\n credential: { kind: \"bearer\", env: \"OPENAI_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n notes:\n \"Responses is OpenAI's current API; set surface openai-completions for chat-only clients.\",\n },\n google: {\n id: \"google\",\n kind: \"llm\",\n label: \"Google Gemini API\",\n surface: \"google-generative-ai\",\n base_url: \"https://generativelanguage.googleapis.com/v1beta\",\n credential: { kind: \"api_key_header\", env: \"GEMINI_API_KEY\" },\n auth_header: { name: \"x-goog-api-key\", template: \"{credential}\" },\n probe_path: \"/v1beta/models\",\n discovery: { type: \"google-models-list\" },\n },\n groq: {\n id: \"groq\",\n kind: \"llm\",\n label: \"Groq\",\n surface: \"openai-completions\",\n base_url: \"https://api.groq.com/openai/v1\",\n credential: { kind: \"bearer\", env: \"GROQ_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n deepseek: {\n id: \"deepseek\",\n kind: \"llm\",\n label: \"DeepSeek\",\n surface: \"openai-completions\",\n base_url: \"https://api.deepseek.com\",\n credential: { kind: \"bearer\", env: \"DEEPSEEK_API_KEY\" },\n probe_path: \"/models\",\n discovery: { type: \"openai-models-list\" },\n notes:\n \"Anthropic-shaped clients use https://api.deepseek.com/anthropic with surface anthropic-messages.\",\n },\n openrouter: {\n id: \"openrouter\",\n kind: \"llm\",\n label: \"OpenRouter\",\n surface: \"openai-completions\",\n base_url: \"https://openrouter.ai/api/v1\",\n credential: { kind: \"bearer\", env: \"OPENROUTER_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n mistral: {\n id: \"mistral\",\n kind: \"llm\",\n label: \"Mistral\",\n surface: \"openai-completions\",\n base_url: \"https://api.mistral.ai/v1\",\n credential: { kind: \"bearer\", env: \"MISTRAL_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n xai: {\n id: \"xai\",\n kind: \"llm\",\n label: \"xAI (Grok)\",\n surface: \"openai-completions\",\n base_url: \"https://api.x.ai/v1\",\n credential: { kind: \"bearer\", env: \"XAI_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n together: {\n id: \"together\",\n kind: \"llm\",\n label: \"Together AI\",\n surface: \"openai-completions\",\n base_url: \"https://api.together.ai/v1\",\n credential: { kind: \"bearer\", env: \"TOGETHER_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n fireworks: {\n id: \"fireworks\",\n kind: \"llm\",\n label: \"Fireworks AI\",\n surface: \"openai-completions\",\n base_url: \"https://api.fireworks.ai/inference/v1\",\n credential: { kind: \"bearer\", env: \"FIREWORKS_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n bedrock: {\n id: \"bedrock\",\n kind: \"llm\",\n label: \"AWS Bedrock\",\n surface: \"bedrock-converse-stream\",\n transport: \"bedrock\",\n credential: { kind: \"sigv4\" },\n required_params: [\"region\"],\n notes: \"Credentials come from the AWS default chain; the runtime host serves no models list.\",\n },\n vertex: {\n id: \"vertex\",\n kind: \"llm\",\n label: \"Google Vertex AI\",\n surface: \"google-vertex\",\n transport: \"vertex\",\n credential: { kind: \"google_adc\" },\n params: { publisher: \"google\" },\n required_params: [\"project\", \"location\"],\n probe_path: \"/models\",\n },\n \"azure-openai\": {\n id: \"azure-openai\",\n kind: \"llm\",\n label: \"Azure OpenAI\",\n surface: \"azure-openai-responses\",\n transport: \"azure-openai\",\n credential: { kind: \"api_key_header\", env: \"AZURE_OPENAI_API_KEY\" },\n auth_header: { name: \"api-key\", template: \"{credential}\" },\n required_params: [\"resource\", \"deployment\", \"api_version\"],\n probe_path: \"/models\",\n notes:\n \"api_version is mirrored into query_params['api-version']; switch credential.kind to azure_entra for Entra tokens.\",\n },\n foundry: {\n id: \"foundry\",\n kind: \"llm\",\n label: \"Claude on Microsoft Foundry\",\n surface: \"anthropic-messages\",\n transport: \"foundry\",\n headers: ANTHROPIC_VERSION_HEADER,\n credential: { kind: \"api_key_header\", env: \"ANTHROPIC_FOUNDRY_API_KEY\" },\n auth_header: X_API_KEY,\n required_params: [\"resource\"],\n probe_path: \"/v1/models\",\n },\n ollama: {\n id: \"ollama\",\n kind: \"llm\",\n label: \"Ollama (local)\",\n surface: \"openai-completions\",\n base_url: \"http://localhost:11434/v1\",\n credential: { kind: \"none\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n lmstudio: {\n id: \"lmstudio\",\n kind: \"llm\",\n label: \"LM Studio (local)\",\n surface: \"openai-completions\",\n base_url: \"http://localhost:1234/v1\",\n credential: { kind: \"none\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n },\n vllm: {\n id: \"vllm\",\n kind: \"llm\",\n label: \"vLLM (self-hosted)\",\n surface: \"openai-completions\",\n base_url: \"http://localhost:8000/v1\",\n credential: { kind: \"none\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n notes: \"A server started with --api-key expects credential.kind bearer and an env: ref.\",\n },\n litellm: {\n id: \"litellm\",\n kind: \"llm\",\n label: \"LiteLLM proxy\",\n surface: \"openai-completions\",\n base_url: \"http://localhost:4000\",\n credential: { kind: \"bearer\", env: \"LITELLM_API_KEY\" },\n probe_path: OPENAI_MODELS_PATH,\n discovery: { type: \"openai-models-list\" },\n notes: \"The credential is the proxy's virtual key; upstream keys stay in the proxy config.\",\n },\n deepgram: {\n id: \"deepgram\",\n kind: \"stt\",\n label: \"Deepgram\",\n base_url: \"https://api.deepgram.com\",\n credential: { kind: \"api_key_header\", env: \"DEEPGRAM_API_KEY\" },\n auth_header: { name: \"Authorization\", template: \"Token {credential}\" },\n params: { model: \"nova-3\", language: \"en\" },\n probe_path: \"/v1/projects\",\n },\n elevenlabs: {\n id: \"elevenlabs\",\n kind: \"tts\",\n label: \"ElevenLabs\",\n base_url: \"https://api.elevenlabs.io\",\n credential: { kind: \"api_key_header\", env: \"ELEVENLABS_API_KEY\" },\n auth_header: { name: \"xi-api-key\", template: \"{credential}\" },\n params: { voice_id: \"21m00Tcm4TlvDq8ikWAM\", output_format: \"mp3_44100_128\" },\n probe_path: \"/v1/models\",\n },\n};\n\n/** Presets in catalog order. */\nexport function listProviderPresets(): AIProviderPreset[] {\n return Object.values(AI_PROVIDER_PRESETS);\n}\n\n/** Look up a preset by id. */\nexport function getProviderPreset(id: string): AIProviderPreset | undefined {\n return AI_PROVIDER_PRESETS[id];\n}\n\n/**\n * The endpoint `skaile providers list` shows for a preset: the literal when\n * there is one, otherwise the transport's `base_url` template (§1.3) with its\n * `{param}` placeholders left in — they are exactly what the operator must\n * supply.\n */\nexport function presetBaseUrl(preset: AIProviderPreset): string | undefined {\n if (preset.base_url) return preset.base_url;\n if (!preset.transport || preset.transport === \"direct\") return undefined;\n return AI_PROVIDER_BASE_URL_TEMPLATES[preset.transport];\n}\n\n/**\n * The endpoint a request to this preset should actually go to: an explicit\n * override first, then the vendor's own `*_BASE_URL` variable\n * ({@link AIProviderPreset.base_url_env}), then the preset literal.\n *\n * Behind a gateway the credential in play is the *gateway's*, not the\n * vendor's, so discovery and key validation have to follow dispatch — firing\n * either at the vendor's public API 401s and yields an empty catalog, which a\n * caller that reads \"empty\" as \"unknown\" then degrades into \"accept anything\".\n *\n * Pure: reads only the `env` record it is handed.\n */\nexport function resolvePresetBaseUrl(\n preset: AIProviderPreset,\n options: { baseUrl?: string; env?: Record<string, string | undefined> } = {},\n): string | undefined {\n const explicit = options.baseUrl?.trim();\n if (explicit) return explicit;\n const fromEnv = preset.base_url_env ? options.env?.[preset.base_url_env]?.trim() : undefined;\n return fromEnv || preset.base_url;\n}\n\n/** Overrides {@link expandPreset} accepts from `skaile providers add`. */\nexport interface ExpandPresetOptions {\n /** `env:NAME` / `cmd:…` / `platform:…` / `keyring:…`. Never a literal. */\n credentialRef?: string;\n baseUrl?: string;\n surface?: AIProviderSurface;\n label?: string;\n /** Transport routing parameters, or voice parameters for `stt`/`tts`. */\n params?: Record<string, string>;\n}\n\n/**\n * Materialize a preset into a registry entry.\n *\n * The credential is always a reference: the preset's conventional `env:` var\n * unless the caller names another ref. No code path here can write a secret.\n * For `transport: azure-openai` the `api_version` parameter is mirrored into\n * `query_params['api-version']`, which is where the wire expects it (§1.3).\n */\nexport function expandPreset(\n preset: AIProviderPreset,\n options: ExpandPresetOptions = {},\n): AIProviderEntry {\n const ref =\n options.credentialRef ?? (preset.credential.env ? `env:${preset.credential.env}` : undefined);\n const credential = ref ? { kind: preset.credential.kind, ref } : { kind: preset.credential.kind };\n const base_url = options.baseUrl ?? preset.base_url;\n const params = { ...preset.params, ...options.params };\n\n if (preset.kind === \"stt\" || preset.kind === \"tts\") {\n return {\n kind: preset.kind,\n label: options.label ?? preset.label,\n preset: preset.id,\n ...(base_url ? { base_url } : {}),\n ...(preset.headers ? { headers: { ...preset.headers } } : {}),\n credential,\n ...(Object.keys(params).length > 0 ? { params: params as AIProviderVoiceParams } : {}),\n };\n }\n\n const transport = preset.transport ?? \"direct\";\n const entry: AIProviderLlmEntry = {\n kind: preset.kind === \"embed\" ? \"embed\" : \"llm\",\n label: options.label ?? preset.label,\n preset: preset.id,\n ...((options.surface ?? preset.surface) ? { surface: options.surface ?? preset.surface } : {}),\n ...(base_url ? { base_url } : {}),\n ...(preset.headers ? { headers: { ...preset.headers } } : {}),\n credential,\n ...(preset.discovery ? { discovery: { ...preset.discovery } } : {}),\n } as AIProviderLlmEntry;\n\n if (transport !== \"direct\") {\n Object.assign(entry, { transport, params });\n if (transport === \"azure-openai\" && params.api_version) {\n entry.query_params = { \"api-version\": params.api_version };\n }\n }\n return entry;\n}\n\n/**\n * Build the catalog merge layer for a set of configured entries (§1.5).\n *\n * Only the presets actually referenced by a `preset:` key are expanded, keyed\n * by the *entry* id — so `groq: {kind: llm, preset: groq}` deep-merges onto a\n * full Groq definition while an unreferenced preset stays out of the registry.\n *\n * Takes the **pre-gate** merge (`LoadedProviderRegistry.patches`), not the\n * gated registry: an entry that leaves `kind` or its transport `params` to the\n * preset is exactly the one the gate drops before this layer exists, and a\n * dropped entry names no preset to expand.\n */\nexport function catalogLayer(providers: AIProviderRegistryPatch): AIProviderRegistryLayer {\n const expanded: AIProviderRegistry = {};\n for (const [id, entry] of Object.entries(providers)) {\n if (!entry.preset) continue;\n const preset = AI_PROVIDER_PRESETS[entry.preset];\n if (!preset) continue;\n expanded[id] = expandPreset(preset);\n }\n return { layer: \"catalog\", providers: expanded };\n}\n\n/**\n * Join a base URL and a path without duplicating a shared leading segment:\n * `(\"https://gw/v1\", \"/v1/models\")` → `https://gw/v1/models`. Both spellings\n * are common in the wild, and a preset's path must work against a gateway base\n * the operator typed either way.\n */\nfunction joinBaseAndPath(base: string, path: string): string {\n const trimmed = base.replace(/\\/+$/, \"\");\n const segments = path.split(\"/\").filter(Boolean);\n const lead = segments[0];\n if (lead && trimmed.toLowerCase().endsWith(`/${lead.toLowerCase()}`)) {\n return `${trimmed}/${segments.slice(1).join(\"/\")}`;\n }\n return `${trimmed}${path}`;\n}\n\n/**\n * The read-only URL a health probe or model discovery can GET for an entry —\n * the models list on LLM surfaces, the equivalent authenticated read on voice\n * ones. `undefined` when the entry has no endpoint yet (missing transport\n * parameters) or the surface serves no such path (Bedrock runtime).\n *\n * This is the catalog method that supersedes `resolveProviderModelsUrl`.\n */\nexport function resolveProbeUrl(entry: AIProviderEntry): string | undefined {\n const base = resolveEntryBaseUrl(entry);\n if (!base) return undefined;\n const preset = entry.preset ? AI_PROVIDER_PRESETS[entry.preset] : undefined;\n const path = (entry as AIProviderLlmEntry).discovery?.path ?? preset?.probe_path;\n if (!path) return undefined;\n const url = joinBaseAndPath(base, path);\n const query = (entry as AIProviderLlmEntry).query_params;\n if (!query || Object.keys(query).length === 0) return url;\n const search = new URLSearchParams(query).toString();\n return `${url}${url.includes(\"?\") ? \"&\" : \"?\"}${search}`;\n}\n\n/**\n * The header(s) that present a credential on the wire for an entry.\n *\n * `credential.kind` alone does not determine the header — `api_key_header` is\n * `x-api-key` at Anthropic, `x-goog-api-key` at Google and `api-key` at Azure —\n * so the preset's `auth_header` wins, then a per-surface default.\n * Returns `{}` when the credential is signed elsewhere (`sigv4`, `google_adc`)\n * or absent.\n */\nexport function buildCredentialHeaders(\n entry: AIProviderEntry,\n secret: string | undefined,\n): Record<string, string> {\n const kind = entry.credential?.kind ?? \"none\";\n if (!secret || kind === \"none\" || kind === \"sigv4\" || kind === \"google_adc\") return {};\n\n const preset = entry.preset ? AI_PROVIDER_PRESETS[entry.preset] : undefined;\n if (preset?.auth_header) {\n return {\n [preset.auth_header.name]: preset.auth_header.template.replace(\"{credential}\", secret),\n };\n }\n if (kind === \"api_key_header\") {\n const surface = (entry as AIProviderLlmEntry).surface;\n if (surface === \"google-generative-ai\") return { \"x-goog-api-key\": secret };\n if (surface === \"azure-openai-responses\") return { \"api-key\": secret };\n return { \"x-api-key\": secret };\n }\n return { Authorization: `Bearer ${secret}` };\n}\n\n/** Outcome of {@link probeProviderEntry}. Never carries the credential. */\nexport interface AIProviderProbeResult {\n /** The endpoint answered 2xx. */\n ok: boolean;\n /** `false` when no request was made — nothing was verified either way. */\n probed: boolean;\n url?: string;\n status?: number;\n /** Human-readable outcome. Secret-free. */\n detail: string;\n}\n\n/** Options for {@link probeProviderEntry}. */\nexport interface ProbeProviderOptions {\n /** Resolved credential value, if the entry has one. Never logged. */\n secret?: string;\n /** Request deadline; default 8000 ms, matching `validateApiKey`. */\n timeoutMs?: number;\n}\n\n/**\n * Send one minimal, read-only request to an entry's endpoint and report what\n * came back.\n *\n * Returns `probed: false` — rather than a false negative — when the entry has\n * no probe path (Bedrock's runtime host) or no resolvable endpoint yet: a\n * SigV4- or ADC-signed request is the transport SDK's job, not this function's.\n */\nexport async function probeProviderEntry(\n entry: AIProviderEntry,\n options: ProbeProviderOptions = {},\n): Promise<AIProviderProbeResult> {\n const url = resolveProbeUrl(entry);\n if (!url) {\n const base = resolveEntryBaseUrl(entry);\n return {\n ok: false,\n probed: false,\n detail: base\n ? `no read-only probe endpoint is defined for this entry (${base})`\n : \"no base_url could be resolved — set base_url or the transport's params\",\n };\n }\n\n const headers: Record<string, string> = {\n ...entry.headers,\n ...buildCredentialHeaders(entry, options.secret),\n };\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), options.timeoutMs ?? 8000);\n try {\n const response = await fetch(url, { method: \"GET\", headers, signal: controller.signal });\n if (response.ok) {\n return { ok: true, probed: true, url, status: response.status, detail: \"endpoint reachable\" };\n }\n const detail =\n response.status === 401 || response.status === 403\n ? \"credential rejected (authentication failed)\"\n : `endpoint returned HTTP ${response.status}`;\n return { ok: false, probed: true, url, status: response.status, detail };\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n const detail =\n err instanceof Error && err.name === \"AbortError\"\n ? `request timed out after ${options.timeoutMs ?? 8000}ms`\n : message;\n return { ok: false, probed: true, url, detail };\n } finally {\n clearTimeout(timeout);\n }\n}\n"]}