@runlith/tagma 0.0.0-stage → 0.1.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 (342) hide show
  1. package/adapter/claudeHooks.d.ts +10 -0
  2. package/adapter/claudeHooks.js +4 -0
  3. package/adapter/declaration.d.ts +14 -0
  4. package/adapter/declaration.js +2 -0
  5. package/adapter/harness.d.ts +454 -0
  6. package/adapter/harness.js +2 -0
  7. package/adapter/hook.d.ts +43 -0
  8. package/adapter/hook.js +2 -0
  9. package/adapter/hostModules.d.ts +19 -0
  10. package/adapter/hostModules.js +2 -0
  11. package/adapter/loader.d.ts +10 -0
  12. package/adapter/loader.js +2 -0
  13. package/adapter/metadata.d.ts +179 -0
  14. package/adapter/metadata.js +4 -0
  15. package/adapter/payload.d.ts +19 -0
  16. package/adapter/payload.js +3 -0
  17. package/adapter/provider.d.ts +209 -0
  18. package/adapter/provider.js +2 -0
  19. package/adapter/settings.d.ts +182 -0
  20. package/adapter/settings.js +2 -0
  21. package/adapter/speech.d.ts +4 -0
  22. package/adapter/speech.js +2 -0
  23. package/host.d.ts +61223 -0
  24. package/package.json +129 -3
  25. package/plugin/Held-6krt6ncs.js +6 -0
  26. package/plugin/accountKey-tdjj67f5.js +2 -0
  27. package/plugin/adapter-qdnpxs6n.js +1 -0
  28. package/plugin/anthropic-a4pdzrv2.js +2 -0
  29. package/plugin/anthropic-messages-7gtja121.js +2 -0
  30. package/plugin/anthropic-z9xqmm3q.js +2 -0
  31. package/plugin/auth-0w6kk39v.js +2 -0
  32. package/plugin/authStatus-a1g3eb9p.js +2 -0
  33. package/plugin/bundling.d.ts +30 -0
  34. package/plugin/bundling.js +2 -0
  35. package/plugin/cacheLifetime-c5mpw676.js +2 -0
  36. package/plugin/callback-server-0wrzmjfx.js +16 -0
  37. package/plugin/capabilities-n3vfpy41.js +2 -0
  38. package/plugin/claudeHooks-edpg1e46.js +3 -0
  39. package/plugin/cli.js +21 -0
  40. package/plugin/cliStore-9rhjxtht.js +2 -0
  41. package/plugin/clientSession-tmmxm39z.js +2 -0
  42. package/plugin/codec-aa8mxqyr.js +1 -0
  43. package/plugin/connect-vrdsw05j.js +2 -0
  44. package/plugin/contract-qn0z7r9c.js +1 -0
  45. package/plugin/credential-5sgapkh0.js +2 -0
  46. package/plugin/deepseek-fvdrmjr9.js +2 -0
  47. package/plugin/deepseek-v388d1wv.js +2 -0
  48. package/plugin/definition-s3xx207f.js +2 -0
  49. package/plugin/description-8xhxryaq.js +2 -0
  50. package/plugin/deviceGrant-vgbscpr4.js +2 -0
  51. package/plugin/devin-hy98d305.js +2 -0
  52. package/plugin/duplex-kpmftvf7.js +2 -0
  53. package/plugin/endpoint-kvf97tz7.js +2 -0
  54. package/plugin/errors-5t42p4q1.js +2 -0
  55. package/plugin/events-e8vv9hda.js +2 -0
  56. package/plugin/events-s95ybm4g.js +2 -0
  57. package/plugin/executor-q8kp5q8h.js +2 -0
  58. package/plugin/failure-vr32debc.js +2 -0
  59. package/plugin/framing-nktw5sts.js +2 -0
  60. package/plugin/grant-67b10nhx.js +2 -0
  61. package/plugin/harness-nrh78w4d.js +2 -0
  62. package/plugin/headers-ss3dzznj.js +2 -0
  63. package/plugin/hook-hjrk83m8.js +2 -0
  64. package/plugin/icon-044pa3y8.js +6 -0
  65. package/plugin/icon-j22svmgp.js +4 -0
  66. package/plugin/icon-ny6qbjvc.js +4 -0
  67. package/plugin/icon-pz54e8n3.js +4 -0
  68. package/plugin/icon-qy92jx2b.js +4 -0
  69. package/plugin/ids-n269hc5k.js +2 -0
  70. package/plugin/images-q80x3bt1.js +2 -0
  71. package/plugin/index-cyd7v366.js +2 -0
  72. package/plugin/index-jpmjpmkn.js +2 -0
  73. package/plugin/lifecycle-qf4fh5m8.js +2 -0
  74. package/plugin/manual-2mdscj84.js +2 -0
  75. package/plugin/messages-1szh3p3k.js +2 -0
  76. package/plugin/metadata-zm1v3ptf.js +4 -0
  77. package/plugin/muse-r16jp51z.js +2 -0
  78. package/plugin/muse-tfe6sph7.js +2 -0
  79. package/plugin/museToolSchema-tbe0f3wa.js +2 -0
  80. package/plugin/notes-6amdhm6h.js +2 -0
  81. package/plugin/object-9pjtdam7.js +2 -0
  82. package/plugin/open-browser-vqb7ckt1.js +2 -0
  83. package/plugin/openai-0z6fy497.js +2 -0
  84. package/plugin/openai-37dne8v0.js +2 -0
  85. package/plugin/openai-compatible-chat-tq9w69h4.js +2 -0
  86. package/plugin/openai-images-x1sj79qh.js +2 -0
  87. package/plugin/openai-responses-dka6k753.js +2 -0
  88. package/plugin/opencodeGo-173fz5c5.js +3 -0
  89. package/plugin/opencodeGo-qgw3pfg6.js +2 -0
  90. package/plugin/options-pxwjpfdk.js +2 -0
  91. package/plugin/payload-2gr4q9g8.js +2 -0
  92. package/plugin/pkce-nrpept7w.js +2 -0
  93. package/plugin/plugin-1n46me5n.js +6 -0
  94. package/plugin/plugin-1vpp5mqk.js +4 -0
  95. package/plugin/plugin-1x94cj6e.js +3 -0
  96. package/plugin/plugin-1xze8f5y.js +3 -0
  97. package/plugin/plugin-285exjxd.js +3 -0
  98. package/plugin/plugin-3b8x73y6.js +3 -0
  99. package/plugin/plugin-3pfrkxg1.js +3 -0
  100. package/plugin/plugin-3whwpedj.js +3 -0
  101. package/plugin/plugin-521srf94.js +3 -0
  102. package/plugin/plugin-55fbx586.js +3 -0
  103. package/plugin/plugin-5zq084fb.js +3 -0
  104. package/plugin/plugin-60bdzk1r.js +4 -0
  105. package/plugin/plugin-6a56xsx3.js +3 -0
  106. package/plugin/plugin-6xpcmvm3.js +36 -0
  107. package/plugin/plugin-72xxqm1t.js +3 -0
  108. package/plugin/plugin-7y7ndrk9.js +3 -0
  109. package/plugin/plugin-80gqwmjy.js +3 -0
  110. package/plugin/plugin-8230g28p.js +3 -0
  111. package/plugin/plugin-8jf7f360.js +3 -0
  112. package/plugin/plugin-92redty0.js +3 -0
  113. package/plugin/plugin-9gha9fx3.js +3 -0
  114. package/plugin/plugin-a4ng6krf.js +3 -0
  115. package/plugin/plugin-ak62rhwz.js +3 -0
  116. package/plugin/plugin-ay29ch70.js +3 -0
  117. package/plugin/plugin-ba1sv0th.js +3 -0
  118. package/plugin/plugin-ca4vf4j5.js +3 -0
  119. package/plugin/plugin-cydz2zhy.js +3 -0
  120. package/plugin/plugin-d6hbav22.js +3 -0
  121. package/plugin/plugin-e2y95zm5.js +3 -0
  122. package/plugin/plugin-ff38dxy1.js +3 -0
  123. package/plugin/plugin-ff9hx5a4.js +3 -0
  124. package/plugin/plugin-fhc5q7r3.js +3 -0
  125. package/plugin/plugin-frrvs5yc.js +3 -0
  126. package/plugin/plugin-g65b14k1.js +3 -0
  127. package/plugin/plugin-gh857xdd.js +3 -0
  128. package/plugin/plugin-gkgs7vfv.js +3 -0
  129. package/plugin/plugin-h66k1zhn.js +14 -0
  130. package/plugin/plugin-je5cfnqn.js +3 -0
  131. package/plugin/plugin-jjm52353.js +3 -0
  132. package/plugin/plugin-jxvmq18y.js +3 -0
  133. package/plugin/plugin-kc4z9msd.js +3 -0
  134. package/plugin/plugin-kjtzm2q6.js +3 -0
  135. package/plugin/plugin-krbbb4ts.js +3 -0
  136. package/plugin/plugin-me00x60n.js +3 -0
  137. package/plugin/plugin-mqr325kz.js +3 -0
  138. package/plugin/plugin-njh1f7b2.js +5 -0
  139. package/plugin/plugin-nkb5bb2q.js +3 -0
  140. package/plugin/plugin-nqmb78ez.js +4 -0
  141. package/plugin/plugin-nzacjxf9.js +3 -0
  142. package/plugin/plugin-p59gy5xd.js +3 -0
  143. package/plugin/plugin-pfj9nc2e.js +3 -0
  144. package/plugin/plugin-pkxw1pfs.js +3 -0
  145. package/plugin/plugin-q1n5kwx0.js +3 -0
  146. package/plugin/plugin-q1sqj2tc.js +3 -0
  147. package/plugin/plugin-q7rk75bs.js +3 -0
  148. package/plugin/plugin-qpda63gv.js +3 -0
  149. package/plugin/plugin-rrgyjesv.js +3 -0
  150. package/plugin/plugin-sfdxgkds.js +3 -0
  151. package/plugin/plugin-v7k9fx92.js +3 -0
  152. package/plugin/plugin-vfjhxng8.js +3 -0
  153. package/plugin/plugin-vv72e4ah.js +3 -0
  154. package/plugin/plugin-w8f977my.js +3 -0
  155. package/plugin/plugin-xbnw80pk.js +3 -0
  156. package/plugin/plugin-yxgg03s0.js +5 -0
  157. package/plugin/plugin-z6hkd9rw.js +3 -0
  158. package/plugin/plugin-zew2m18x.js +3 -0
  159. package/plugin/plugin-zphe2a5v.js +9 -0
  160. package/plugin/plugin-zvyk8bnr.js +3 -0
  161. package/plugin/plugin-zw3ywa4b.js +3 -0
  162. package/plugin/plugin-zxe49p72.js +3 -0
  163. package/plugin/plugin-zz7yc97m.js +3 -0
  164. package/plugin/plugin.d.ts +175 -0
  165. package/plugin/plugin.js +2 -0
  166. package/plugin/points.generated.d.ts +341 -0
  167. package/plugin/points.generated.js +2 -0
  168. package/plugin/process.d.ts +4 -0
  169. package/plugin/process.js +85 -0
  170. package/plugin/protocol-hwnfh4h1.js +2 -0
  171. package/plugin/protocol.d.ts +115 -0
  172. package/plugin/protocol.js +2 -0
  173. package/plugin/provider-0b7xxyhn.js +2 -0
  174. package/plugin/quota-vrrmfag6.js +2 -0
  175. package/plugin/quotaRead-vj6e90xc.js +2 -0
  176. package/plugin/reasoning-5nanktp2.js +2 -0
  177. package/plugin/record-1m3vvy60.js +2 -0
  178. package/plugin/requests-2zyr1g8e.js +1 -0
  179. package/plugin/responseFold-w4526gvb.js +2 -0
  180. package/plugin/settings-vdypzert.js +2 -0
  181. package/plugin/shared-a2yyy8ry.js +2 -0
  182. package/plugin/speech-067caz1a.js +2 -0
  183. package/plugin/stepfun-3en5g41d.js +2 -0
  184. package/plugin/stepfun-bwsz4nrd.js +2 -0
  185. package/plugin/stream-bt8etfpc.js +2 -0
  186. package/plugin/svelteProgram-73v9yajk.js +2 -0
  187. package/plugin/synthesisDuplex-m2j6pmyv.js +2 -0
  188. package/plugin/template.d.ts +14 -0
  189. package/plugin/template.js +2 -0
  190. package/plugin/testing.d.ts +85 -0
  191. package/plugin/testing.js +4 -0
  192. package/plugin/tool-content-b9jtprr7.js +2 -0
  193. package/plugin/tool-stream-gdajdxn0.js +2 -0
  194. package/plugin/transport-7hfp9sn4.js +2 -0
  195. package/plugin/ui.generated.d.ts +1044 -0
  196. package/plugin/value.d.ts +8 -0
  197. package/plugin/value.js +2 -0
  198. package/plugin/vendor-pn6b5a8f.js +2 -0
  199. package/plugin/vendorCall-6n5chrn0.js +2 -0
  200. package/plugin/vendorCall-hv01nwsp.js +2 -0
  201. package/plugin/vendorPayload-awxqr7t8.js +2 -0
  202. package/plugin/vendorWeb-vnf344r1.js +2 -0
  203. package/plugin/verbatim-mqt9x4aa.js +2 -0
  204. package/plugin/xai-e8sbtk6a.js +2 -0
  205. package/plugin/xai-z1ysta23.js +2 -0
  206. package/rules/effect.d.ts +55 -0
  207. package/rules/effect.js +11 -0
  208. package/rules/rules.d.ts +342 -0
  209. package/rules/rules.js +50 -0
  210. package/types/node/assert/strict.d.ts +12 -0
  211. package/types/node/assert.d.ts +76 -0
  212. package/types/node/async_hooks.d.ts +113 -0
  213. package/types/node/buffer.buffer.d.ts +29 -0
  214. package/types/node/buffer.d.ts +162 -0
  215. package/types/node/child_process.d.ts +337 -0
  216. package/types/node/cluster.d.ts +118 -0
  217. package/types/node/compatibility/iterators.d.ts +11 -0
  218. package/types/node/console.d.ts +48 -0
  219. package/types/node/constants.d.ts +8 -0
  220. package/types/node/crypto.d.ts +847 -0
  221. package/types/node/dgram.d.ts +88 -0
  222. package/types/node/diagnostics_channel.d.ts +61 -0
  223. package/types/node/dns/promises.d.ts +94 -0
  224. package/types/node/dns.d.ts +276 -0
  225. package/types/node/domain.d.ts +17 -0
  226. package/types/node/events.d.ts +138 -0
  227. package/types/node/fs/promises.d.ts +253 -0
  228. package/types/node/fs.d.ts +1038 -0
  229. package/types/node/globals.d.ts +73 -0
  230. package/types/node/globals.typedarray.d.ts +22 -0
  231. package/types/node/http.d.ts +530 -0
  232. package/types/node/http2.d.ts +794 -0
  233. package/types/node/https.d.ts +66 -0
  234. package/types/node/index.d.ts +84 -0
  235. package/types/node/inspector/promises.d.ts +13 -0
  236. package/types/node/inspector.d.ts +61 -0
  237. package/types/node/inspector.generated.d.ts +1624 -0
  238. package/types/node/module.d.ts +187 -0
  239. package/types/node/net.d.ts +266 -0
  240. package/types/node/os.d.ts +236 -0
  241. package/types/node/path/posix.d.ts +8 -0
  242. package/types/node/path/win32.d.ts +8 -0
  243. package/types/node/path.d.ts +40 -0
  244. package/types/node/perf_hooks.d.ts +236 -0
  245. package/types/node/process.d.ts +436 -0
  246. package/types/node/punycode.d.ts +15 -0
  247. package/types/node/querystring.d.ts +22 -0
  248. package/types/node/quic.d.ts +203 -0
  249. package/types/node/readline/promises.d.ts +28 -0
  250. package/types/node/readline.d.ts +94 -0
  251. package/types/node/repl.d.ts +104 -0
  252. package/types/node/sea.d.ts +11 -0
  253. package/types/node/sqlite.d.ts +183 -0
  254. package/types/node/stream/consumers.d.ts +13 -0
  255. package/types/node/stream/iter.d.ts +240 -0
  256. package/types/node/stream/promises.d.ts +37 -0
  257. package/types/node/stream/web.d.ts +297 -0
  258. package/types/node/stream.d.ts +378 -0
  259. package/types/node/string_decoder.d.ts +10 -0
  260. package/types/node/test/reporters.d.ts +66 -0
  261. package/types/node/test.d.ts +462 -0
  262. package/types/node/timers/promises.d.ts +16 -0
  263. package/types/node/timers.d.ts +43 -0
  264. package/types/node/tls.d.ts +279 -0
  265. package/types/node/trace_events.d.ts +16 -0
  266. package/types/node/ts5.6/buffer.buffer.d.ts +26 -0
  267. package/types/node/ts5.6/compatibility/float16array.d.ts +43 -0
  268. package/types/node/ts5.6/globals.typedarray.d.ts +22 -0
  269. package/types/node/ts5.6/index.d.ts +84 -0
  270. package/types/node/ts5.7/compatibility/float16array.d.ts +50 -0
  271. package/types/node/ts5.7/index.d.ts +84 -0
  272. package/types/node/tty.d.ts +61 -0
  273. package/types/node/url.d.ts +165 -0
  274. package/types/node/util/types.d.ts +49 -0
  275. package/types/node/util.d.ts +320 -0
  276. package/types/node/v8.d.ts +178 -0
  277. package/types/node/vm.d.ts +130 -0
  278. package/types/node/wasi.d.ts +26 -0
  279. package/types/node/web-globals/abortcontroller.d.ts +47 -0
  280. package/types/node/web-globals/blob.d.ts +34 -0
  281. package/types/node/web-globals/console.d.ts +7 -0
  282. package/types/node/web-globals/crypto.d.ts +46 -0
  283. package/types/node/web-globals/domexception.d.ts +74 -0
  284. package/types/node/web-globals/encoding.d.ts +16 -0
  285. package/types/node/web-globals/events.d.ts +111 -0
  286. package/types/node/web-globals/fetch.d.ts +121 -0
  287. package/types/node/web-globals/importmeta.d.ts +11 -0
  288. package/types/node/web-globals/messaging.d.ts +32 -0
  289. package/types/node/web-globals/navigator.d.ts +28 -0
  290. package/types/node/web-globals/performance.d.ts +71 -0
  291. package/types/node/web-globals/storage.d.ts +26 -0
  292. package/types/node/web-globals/streams.d.ts +162 -0
  293. package/types/node/web-globals/timers.d.ts +22 -0
  294. package/types/node/web-globals/url.d.ts +27 -0
  295. package/types/node/worker_threads.d.ts +199 -0
  296. package/types/node/zlib/iter.d.ts +49 -0
  297. package/types/node/zlib.d.ts +360 -0
  298. package/types/undici/agent.d.ts +24 -0
  299. package/types/undici/api.d.ts +19 -0
  300. package/types/undici/balanced-pool.d.ts +16 -0
  301. package/types/undici/cache-interceptor.d.ts +98 -0
  302. package/types/undici/cache.d.ts +30 -0
  303. package/types/undici/client-stats.d.ts +9 -0
  304. package/types/undici/client.d.ts +61 -0
  305. package/types/undici/connector.d.ts +37 -0
  306. package/types/undici/content-type.d.ts +9 -0
  307. package/types/undici/cookies.d.ts +22 -0
  308. package/types/undici/diagnostics-channel.d.ts +72 -0
  309. package/types/undici/dispatcher.d.ts +207 -0
  310. package/types/undici/env-http-proxy-agent.d.ts +15 -0
  311. package/types/undici/errors.d.ts +117 -0
  312. package/types/undici/eventsource.d.ts +39 -0
  313. package/types/undici/fetch.d.ts +122 -0
  314. package/types/undici/formdata.d.ts +24 -0
  315. package/types/undici/global-dispatcher.d.ts +4 -0
  316. package/types/undici/global-origin.d.ts +3 -0
  317. package/types/undici/h2c-client.d.ts +35 -0
  318. package/types/undici/handlers.d.ts +7 -0
  319. package/types/undici/header.d.ts +10 -0
  320. package/types/undici/index.d.ts +85 -0
  321. package/types/undici/interceptors.d.ts +70 -0
  322. package/types/undici/mock-agent.d.ts +43 -0
  323. package/types/undici/mock-call-history.d.ts +57 -0
  324. package/types/undici/mock-client.d.ts +17 -0
  325. package/types/undici/mock-errors.d.ts +9 -0
  326. package/types/undici/mock-interceptor.d.ts +60 -0
  327. package/types/undici/mock-pool.d.ts +17 -0
  328. package/types/undici/patch.d.ts +21 -0
  329. package/types/undici/pool-stats.d.ts +11 -0
  330. package/types/undici/pool.d.ts +25 -0
  331. package/types/undici/proxy-agent.d.ts +22 -0
  332. package/types/undici/readable.d.ts +24 -0
  333. package/types/undici/retry-agent.d.ts +6 -0
  334. package/types/undici/retry-handler.d.ts +41 -0
  335. package/types/undici/round-robin-pool.d.ts +25 -0
  336. package/types/undici/snapshot-agent.d.ts +98 -0
  337. package/types/undici/socks5-proxy-agent.d.ts +17 -0
  338. package/types/undici/util.d.ts +4 -0
  339. package/types/undici/utility.d.ts +2 -0
  340. package/types/undici/webidl.d.ts +121 -0
  341. package/types/undici/websocket.d.ts +130 -0
  342. package/README.md +0 -3
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var th="<redacted>";var Ty=new RegExp("authorization|api[-_]?key|access[-_]?token|refresh[-_]?token|id[-_]?token|token|secret|credential|signature|x-amz-signature|account[-_]?id|session[-_]?id","i"),c=/^(key|sig)$/i,o=new RegExp("(?:authorization|api[-_]?key|access[-_]?token|refresh[-_]?token|id[-_]?token|token|secret|credential|signature|x-amz-signature|account[-_]?id|session[-_]?id|key)","i"),a=new RegExp(`((?:"(?:${o.source})"|\\b(?:${o.source}))\\s*:\\s*)"(?:[^"\\\\]|\\\\[\\s\\S])*(?:"(?![^"\\r\\n]*"[ \\t]*:)|\\\\?(?=$|[\\r\\n]))`,"gi"),_=new RegExp(`((?:${o.source})=)[^&\\s"]+`,"gi"),Iu=(e)=>Ty.test(e),od=(e)=>Iu(e)||c.test(e);function Vi(e,s=Iu){let n=new Set,r=(t)=>{if(t.length<4)return;n.add(t),n.add(encodeURIComponent(t))};for(let[t,E]of e){if(!s(t))continue;r(E);let i=/^Bearer\s+(.+)$/i.exec(E)?.[1];if(i)r(i)}return n}function Go(e,s=[]){let n=e.replace(a,'$1"<redacted>"').replace(_,"$1<redacted>");return Array.from(s).reduce((r,t)=>r.split(t).join("<redacted>"),n)}
3
+ export{th,Ty,Iu,od,Vi,Go};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{ut,sd,Au,qs}from"./plugin-frrvs5yc.js";import{F,r,n,w,t,S,z,o,ge,x,O,W,qh,P,Kr,Ke}from"./plugin-6xpcmvm3.js";var Yk=w("context-overflow"),kv=W(["dns","tls","reset","connect-timeout","unknown"]),_v=O([W(["invalid-request","no-route","auth","rate-limit","quota","content-policy","overloaded","refused","torn-stream","non-json-answer","socket-closed","clean-eof-no-finish","blank-error","invalid-output","stalled"]),kv]),u=new Set(["rate-limit","overloaded","torn-stream","socket-closed","clean-eof-no-finish","blank-error","dns","tls","reset","connect-timeout","unknown"]),Bm=(e)=>u.has(e),dy=o({tag:t,message:t,code:n(t)}),Tv=o({type:n(t),count:S}),Af={status:n(S),upstreamRequestId:n(t),attempt:n(S),bytesRead:n(S),elapsedMs:n(S),lastEvent:n(Tv)},Mf=5,Eu=2048;class Of extends Ke("LLM.HttpRequestDetails")({method:t,url:t,headers:ge(t,t)}){}class Pf extends Ke("LLM.HttpResponseDetails")({status:S,headers:ge(t,t)}){}var $f=o({retryAfterMs:n(S),limit:n(ge(t,t)),remaining:n(ge(t,t)),reset:n(ge(t,t))});class ms extends Ke("LLM.HttpContext")({request:Of,response:n(Pf),body:n(t),bodyTruncated:n(z),bodyUnreadable:n(t),requestId:n(t),rateLimit:n($f)}){}class rn extends Ke("LLM.Error.InvalidRequest")({_tag:P("InvalidRequest"),message:t,parameter:n(t),classification:n(Yk),providerMetadata:n(ut),http:n(ms),...Af}){get family(){return"invalid-request"}}class Rv extends Ke("LLM.Error.NoRoute")({_tag:P("NoRoute"),route:sd,provider:qs,model:Au}){get family(){return"no-route"}get message(){return`No LLM route for ${this.provider}/${this.model} using ${this.route}`}}class Iv extends Ke("LLM.Error.NotInstalled")({_tag:P("NotInstalled"),provider:qs}){get family(){return"no-route"}get message(){return`No installed adapter provides ${this.provider}; install it to call its models.`}}class Cv extends Ke("LLM.Error.AdapterFailed")({_tag:P("AdapterFailed"),provider:qs,detail:t}){get family(){return"refused"}get message(){return`The adapter providing ${this.provider} failed to load: ${this.detail}`}}class kr extends Ke("LLM.Error.Authentication")({_tag:P("Authentication"),message:t,kind:W(["missing","invalid","expired","insufficient-permissions","unknown"]),providerMetadata:n(ut),http:n(ms)}){get family(){return"auth"}}class Vl extends Ke("LLM.Error.RateLimit")({_tag:P("RateLimit"),message:t,retryAfterMs:n(S),rateLimit:n($f),providerMetadata:n(ut),http:n(ms)}){get family(){return"rate-limit"}}class Zl extends Ke("LLM.Error.QuotaExceeded")({_tag:P("QuotaExceeded"),message:t,resetsAt:n(S),providerMetadata:n(ut),http:n(ms)}){get family(){return"quota"}}class fy extends Ke("LLM.Error.ContentPolicy")({_tag:P("ContentPolicy"),message:t,providerMetadata:n(ut),http:n(ms)}){get family(){return"content-policy"}}class Bi extends Ke("LLM.Error.ProviderInternal")({_tag:P("ProviderInternal"),message:t,retryAfterMs:n(S),modelStarted:n(z),providerMetadata:n(ut),http:n(ms),...Af}){get family(){return"overloaded"}}class mc extends Ke("LLM.Error.Transport")({_tag:P("Transport"),message:t,kind:kv.pipe(qh(r("unknown"))),host:n(t),attempt:n(S),elapsedMs:n(S),cause:n(x(dy)),http:n(ms)}){get family(){return this.kind}}class hc extends Ke("LLM.Error.StreamStalled")({_tag:P("StreamStalled"),message:t,idleMs:S,url:n(t),...Af}){get family(){return"stalled"}}class Aa extends Ke("LLM.Error.InvalidProviderOutput")({_tag:P("InvalidProviderOutput"),message:t,family:_v.pipe(qh(r("invalid-output"))),route:n(t),excerpt:n(t),...Af,cause:n(x(dy)),providerMetadata:n(ut)}){}class vu extends Ke("LLM.Error.UnknownProvider")({_tag:P("UnknownProvider"),message:t,modelStarted:n(z),providerMetadata:n(ut),http:n(ms),...Af}){get family(){return"refused"}}var GT=O([rn,Rv,Iv,Cv,kr,Vl,Zl,fy,Bi,mc,hc,Aa,vu]).pipe(Kr("_tag")),l=(e)=>typeof e==="string"&&e.trim()!==""?e.trim():void 0,Av=(e)=>{if(e===void 0||!e.trimStart().startsWith("{"))return{};let a;try{a=JSON.parse(e)}catch(s){if(s instanceof SyntaxError)return{};throw s}if(typeof a!=="object"||a===null)return{};let i=a,d=typeof i.error==="object"&&i.error!==null?i.error:void 0;return{message:l(d?.message)??l(i.message)??l(i.error)??l(i.error_description),code:l(d?.code)??l(i.code)}},py=(e)=>{let a=e.http?.body??"";if(/content[-_\s]?policy|content_filter|safety/i.test(a))return new fy({message:e.message,http:e.http});if(e.status===401){let i=Av(e.http?.body),d=/expired/i.test(i.code??"");return new kr({message:e.message,kind:d?"expired":"invalid",http:e.http})}if(e.status===403)return new kr({message:e.message,kind:"insufficient-permissions",http:e.http});if(e.status===429){if(/insufficient[-_\s]?quota|quota[-_\s]?exceeded|usage[-_\s]?limit[-_\s]?reached/i.test(a))return new Zl({message:e.message,http:e.http});return new Vl({message:e.message,retryAfterMs:e.retryAfterMs,rateLimit:e.rateLimit,http:e.http})}if(e.status===400||e.status===404||e.status===409||e.status===413||e.status===422)return new rn({message:e.message,classification:e.classification,http:e.http});if(e.status>=500)return new Bi({message:e.message,status:e.status,retryAfterMs:e.retryAfterMs,http:e.http});return new vu({message:e.message,status:e.status,http:e.http})};class de extends F("LLM.Error"){cause=this.reason;get family(){return this.reason.family}get retryable(){return Bm(this.family)}get retryAfterMs(){return"retryAfterMs"in this.reason?this.reason.retryAfterMs:void 0}get modelStarted(){return"modelStarted"in this.reason?this.reason.modelStarted:void 0}get status(){if("status"in this.reason&&typeof this.reason.status==="number")return this.reason.status;return"http"in this.reason?this.reason.http?.response?.status:void 0}get detail(){let e="excerpt"in this.reason?this.reason.excerpt:void 0,a=("cause"in this.reason?this.reason.cause??[]:[]).map((s)=>`${s.tag}${s.code===void 0?"":` [${s.code}]`}: ${s.message}`);if(e!==void 0||a.length>0)return[e,...a].filter((s)=>s!==void 0&&s!=="").join(" \xB7 ");if(!("http"in this.reason)||this.reason.http===void 0)return;let i=this.reason.http,d=i.response?.status;return[d===void 0?void 0:`HTTP ${d}`,i.requestId,i.body].filter((s)=>s!==void 0&&s!=="").join(" \xB7 ")}get message(){return`${this.module}.${this.method}: ${this.reason.message}`}}var JT=o({family:_v,status:n(S),upstreamRequestId:n(t),attempt:n(S),elapsedMs:n(S),bytesRead:n(S),lastEvent:n(Tv),excerpt:n(t),idleMs:n(S),host:n(t),cause:n(x(dy)),kind:n(t),said:n(t)}),KT=(e)=>{let a=e.reason,i="http"in a?a.http:void 0,d=("upstreamRequestId"in a?a.upstreamRequestId:void 0)??i?.requestId,s="cause"in a?a.cause:void 0;return{family:e.family,status:e.status,upstreamRequestId:d,attempt:"attempt"in a?a.attempt:void 0,elapsedMs:"elapsedMs"in a?a.elapsedMs:void 0,bytesRead:"bytesRead"in a?a.bytesRead:void 0,lastEvent:"lastEvent"in a?a.lastEvent:void 0,excerpt:"excerpt"in a?a.excerpt:void 0,idleMs:"idleMs"in a?a.idleMs:void 0,host:"host"in a?a.host:void 0,cause:s===void 0||s.length===0?void 0:s,kind:"kind"in a?a.kind:void 0,said:Av(i?.body).message}};class Xk extends F("LLM.ToolFailure"){}
3
+ export{Yk,kv,_v,Bm,dy,Tv,Af,Mf,Eu,Of,Pf,$f,ms,rn,Rv,Iv,Cv,kr,Vl,Zl,fy,Bi,mc,hc,Aa,vu,GT,Av,py,de,JT,KT,Xk};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var gm="deepseek",Z_="deepseek-v4-pro",e={["deepseek-v4-pro"]:{label:"DeepSeek V4 Pro",capacity:{context:1e6,output:384000},capabilities:["text"],reasoning:["none","low","medium","high","xhigh","max"],defaultReasoning:"high"},"deepseek-v4-flash":{label:"DeepSeek V4 Flash",capacity:{context:1e6,output:384000},capabilities:["text"],reasoning:["none","low","medium","high","xhigh","max"],defaultReasoning:"high"}},ym={id:"deepseek",label:"DeepSeek",auth:"api-key",models:e,cacheLifetime:{promisedSeconds:null,prior:null},defaultTextModel:"deepseek-v4-pro"},G_={providers:[ym]};
3
+ export{gm,Z_,ym,G_};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{n,w,t,S,o,x,O}from"./plugin-6xpcmvm3.js";var i=o({id:t,label:t}),e={id:t,label:t,hint:n(t),required:n(w(!0)),secret:n(w(!0))},tv=O([o({...e,type:w("text"),placeholder:n(t)}),o({...e,type:w("number"),min:n(S),unit:n(t),placeholder:n(t)}),o({...e,type:w("flag")}),o({...e,type:w("choice"),options:x(i),default:n(t)}),o({...e,type:w("set"),options:x(i)})]),Yg=O([tv,o({...e,type:w("rows"),noun:t,fields:x(tv),discoverable:n(w(!0))})]);
3
+ export{tv,Yg};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{w,t,z,o,O,ec}from"./plugin-6xpcmvm3.js";var Pg=t.pipe(ec("LLM.AccountKey")),F_=O([o({kind:w("own")}),o({kind:w("cli"),place:t,shown:t,made:z})]);
3
+ export{Pg,F_};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{oe}from"./plugin-6xpcmvm3.js";class gu extends oe()("speech/DuplexTransport"){}
3
+ export{gu};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var J_=["text","vision","decision"],K_=["text","object","decision"],Dl='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/></svg>';function Q_(o,n){let e={};for(let r of o){let t=n[r.id];if(t!==void 0&&r.values.some((d)=>d.id===t))e[r.id]=t}return e}function Y_(o,n){let e={};for(let r of o){let t=n?.[r.id],d=t!==void 0&&r.values.some((l)=>l.id===t)?t:r.default;if(d!==null)e[r.id]=d}return e}var X_={strategy:"percent",trigger:0.9},eT=["design","implementation","fix","review","research","ui","tests","docs"],i={oauth:0,cli:0,"api-key":1};function tT(o){return o.flat().sort((n,e)=>i[n.auth]-i[e.auth])}function di(o,n){return Object.fromEntries(n.ids.map((e)=>{let r=o[e];if(!r)throw Error(`Model "${e}" is served but described nowhere.`);return[e,{...r,...n.overrides?.[e]}]}))}function ok(o){return o?.context}function nT(o){return o?.input}function rT(o,n){let e=ok(n);return e===void 0||e<=0?void 0:o/e}
3
+ export{J_,K_,Dl,Q_,Y_,X_,eT,tT,di,ok,nT,rT};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Sr,ut,Ry,sd,Oa,Pa,zf}from"./plugin-frrvs5yc.js";import{rd,Ut}from"./plugin-zz7yc97m.js";import{Os,Mm,dn}from"./plugin-gkgs7vfv.js";import{Ps}from"./plugin-zw3ywa4b.js";import{n,ce,t,S,z,o,ge,x,O,P,Kr,zp,Ke}from"./plugin-6xpcmvm3.js";class ln extends Ke("LLM.Usage")({inputTokens:n(S),outputTokens:n(S),nonCachedInputTokens:n(S),cacheReadInputTokens:n(S),cacheWriteInputTokens:n(S),reasoningTokens:n(S),totalTokens:n(S),providerMetadata:n(ut)}){get visibleOutputTokens(){return Math.max(0,(this.outputTokens??0)-(this.reasoningTokens??0))}static from(e){return e instanceof ln?e:new ln(e)}}function PT(e,r){if(!e)return r?ln.from(r):new ln({});if(!r)return ln.from(e);let p=(l,s)=>l===void 0&&s===void 0?void 0:(l??0)+(s??0);return new ln({inputTokens:p(e.inputTokens,r.inputTokens),outputTokens:p(e.outputTokens,r.outputTokens),nonCachedInputTokens:p(e.nonCachedInputTokens,r.nonCachedInputTokens),cacheReadInputTokens:p(e.cacheReadInputTokens,r.cacheReadInputTokens),cacheWriteInputTokens:p(e.cacheWriteInputTokens,r.cacheWriteInputTokens),reasoningTokens:p(e.reasoningTokens,r.reasoningTokens),totalTokens:p(e.totalTokens,r.totalTokens),providerMetadata:r.providerMetadata??e.providerMetadata})}class lc extends Ke("LLM.InputUsage")({inputTokens:S,nonCachedInputTokens:n(S),cacheReadInputTokens:n(S),cacheWriteInputTokens:n(S),providerMetadata:n(ut)}){static from(e){return e instanceof lc?e:new lc(e)}}var iv=o({type:P("step-start"),index:S,origin:n(Ut)}).annotate({identifier:"LLM.Event.StepStart"}),av=o({type:P("input-usage"),inputUsage:lc,messageId:n(t)}).annotate({identifier:"LLM.Event.InputUsage"}),cv=o({type:P("text-start"),id:Oa,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.TextStart"}),uv=o({type:P("text-delta"),id:Oa,text:t,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.TextDelta"}),lv=o({type:P("text-end"),id:Oa,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.TextEnd"}),dv=o({type:P("reasoning-start"),id:Oa,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ReasoningStart"}),fv=o({type:P("reasoning-delta"),id:Oa,text:t,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ReasoningDelta"}),pv=o({type:P("reasoning-end"),id:Oa,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ReasoningEnd"}),mv=o({type:P("tool-input-start"),id:Pa,name:t,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ToolInputStart"}),hv=o({type:P("tool-input-delta"),id:Pa,name:t,text:t}).annotate({identifier:"LLM.Event.ToolInputDelta"}),gv=o({type:P("tool-input-end"),id:Pa,name:t,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ToolInputEnd"}),yv=o({type:P("tool-call"),id:Pa,name:t,input:ce,unparsed:n(t),providerExecuted:n(z),providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ToolCall"}),xv=o({type:P("tool-result"),id:Pa,name:t,result:Os,output:n(Mm),providerExecuted:n(z),providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ToolResult"}),Sv=o({type:P("tool-error"),id:Pa,name:t,message:t,error:n(zp()),providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ToolError"}),bv=o({type:P("model-fallback"),from:Ut,to:Ut,trigger:Sr,providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.ModelFallback"}),Ev=o({type:P("step-finish"),index:S,reason:zf,usage:n(ln),quota:n(Ps),requestId:n(t),native:n(Sr),providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.StepFinish"}),vv=o({type:P("finish"),reason:zf,usage:n(ln),providerMetadata:n(ut)}).annotate({identifier:"LLM.Event.Finish"}),i=O([iv,av,cv,uv,lv,dv,fv,pv,mv,hv,gv,yv,xv,Sv,bv,Ev,vv]).pipe(Kr("type")),d=(e)=>Oa.make(e),u=(e)=>Pa.make(e),we=Object.assign(i,{stepStart:iv.make,inputUsage:(e)=>av.make({type:"input-usage",inputUsage:lc.from(e.inputUsage),messageId:e.messageId}),textStart:(e)=>cv.make({...e,id:d(e.id)}),textDelta:(e)=>uv.make({...e,id:d(e.id)}),textEnd:(e)=>lv.make({...e,id:d(e.id)}),reasoningStart:(e)=>dv.make({...e,id:d(e.id)}),reasoningDelta:(e)=>fv.make({...e,id:d(e.id)}),reasoningEnd:(e)=>pv.make({...e,id:d(e.id)}),toolInputStart:(e)=>mv.make({...e,id:u(e.id)}),toolInputDelta:(e)=>hv.make({...e,id:u(e.id)}),toolInputEnd:(e)=>gv.make({...e,id:u(e.id)}),toolCall:(e)=>yv.make({...e,id:u(e.id)}),toolResult:(e)=>xv.make({...e,id:u(e.id),output:e.output===void 0?void 0:Mm.from(e.output.structured,e.output.content)}),toolError:(e)=>Sv.make({...e,id:u(e.id)}),modelFallback:bv.make,stepFinish:(e)=>Ev.make({...e,usage:e.usage===void 0?void 0:ln.from(e.usage)}),finish:(e)=>vv.make({...e,usage:e.usage===void 0?void 0:ln.from(e.usage)}),is:{stepStart:i.guards["step-start"],inputUsage:i.guards["input-usage"],textStart:i.guards["text-start"],textDelta:i.guards["text-delta"],textEnd:i.guards["text-end"],reasoningStart:i.guards["reasoning-start"],reasoningDelta:i.guards["reasoning-delta"],reasoningEnd:i.guards["reasoning-end"],toolInputStart:i.guards["tool-input-start"],toolInputDelta:i.guards["tool-input-delta"],toolInputEnd:i.guards["tool-input-end"],toolCall:i.guards["tool-call"],toolResult:i.guards["tool-result"],toolError:i.guards["tool-error"],modelFallback:i.guards["model-fallback"],stepFinish:i.guards["step-finish"],finish:i.guards.finish}});class Am extends Ke("LLM.PreparedRequest")({id:t,route:sd,protocol:Ry,model:rd,body:ce,metadata:n(ge(t,ce))}){}var c=(e,r,p)=>{let l=[],s=0;for(let a of e)if(a.type==="text-delta"&&r==="text"||a.type==="reasoning-delta"&&r==="reasoning")l.push(a.text),s+=a.text.length;for(let a of p?.content??[]){if(a.type!=="text"&&a.type!=="reasoning"||a.type!==r||a.text.length!==s)continue;let g=0;for(let m of l){if(!a.text.startsWith(m,g))break;g+=m.length}if(g===s)return a.text;break}return l.join("")},T=(e)=>e.reduce((r,p)=>("usage"in p)&&p.usage!==void 0?p.usage:r,void 0);class dc extends Ke("LLM.Response")({message:dn,events:x(we),usage:n(ln),finishReason:zf}){get text(){return c(this.events,"text",this.message)}get reasoning(){return c(this.events,"reasoning",this.message)}get toolCalls(){return this.events.filter(we.is.toolCall)}}((s)=>(s.text=(a)=>c(a.events,"text",a instanceof dc?a.message:void 0),s.usage=(a)=>a.usage??T(a.events),s.toolCalls=(a)=>a.events.filter(we.is.toolCall),s.reasoning=(a)=>c(a.events,"reasoning",a instanceof dc?a.message:void 0)))(dc||={});
3
+ export{ln,PT,lc,iv,av,cv,uv,lv,dv,fv,pv,mv,hv,gv,yv,xv,Sv,bv,Ev,vv,we,Am,dc};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var am="xai",L_="grok-4.7",pw={["grok-4.7"]:{label:"Grok 4.7",short:"Grok",capacity:{context:500000},capabilities:["text","vision"],reasoning:["low","medium","high","xhigh"],defaultReasoning:"high"},"grok-4.6":{label:"Grok 4.6",short:"Grok",capacity:{context:500000},capabilities:["text","vision"],reasoning:["low","medium","high","xhigh"],defaultReasoning:"high"},"grok-4.5":{label:"Grok 4.5",short:"Grok",capacity:{context:500000},capabilities:["text","vision"],reasoning:["none","low","medium","high"],defaultReasoning:"high"},"grok-composer-2.5-fast":{label:"Composer 2.5",short:"Composer",capacity:{context:200000},capabilities:["text","vision"],reasoning:[],defaultReasoning:null},"grok-4.3":{label:"Grok 4.3",short:"Grok",capacity:{context:1e6,output:30000},capabilities:["text","vision"],reasoning:["none","low","medium","high"],defaultReasoning:"high"},"grok-4.20-0309-reasoning":{label:"Grok 4.20 Reasoning",short:"Grok R",capacity:{context:2000000,output:30000},capabilities:["text","vision"],reasoning:["none","low","medium","high"],defaultReasoning:"high"},"grok-4.20-0309-non-reasoning":{label:"Grok 4.20 Non-Reasoning",short:"Grok NR",capacity:{context:2000000,output:30000},capabilities:["text","vision"],reasoning:[],defaultReasoning:null}},cm={id:"xai",label:"xAI",auth:"api-key",models:pw,cacheLifetime:{promisedSeconds:null,prior:null},defaultTextModel:"grok-4.7"},D_={providers:[cm]};
3
+ export{am,L_,pw,cm,D_};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Ny,id,Bv}from"./plugin-h66k1zhn.js";import{Ao,Pt}from"./plugin-je5cfnqn.js";import{rn,kr,de}from"./plugin-7y7ndrk9.js";import{F,r,f,c,s,i,Bt,at,Md,Ri,si,po,Jr}from"./plugin-6xpcmvm3.js";class Ca extends F("MissingCredentialError"){constructor(e){super({message:`Missing auth credential: ${e}`,source:e});this.name="Error"}}var FT=(e)=>typeof e==="object"&&e!==null&&("apply"in e)&&typeof e.apply==="function",d=(e)=>{let t={load:e,orElse:(n)=>d(e.pipe(Bt(()=>n.load))),bearer:()=>h(t,(n)=>({authorization:`Bearer ${n}`})),header:(n)=>h(t,(a)=>({[n]:a})),pipe:(n)=>n(t)};return t},o=(e)=>{let t={apply:e,andThen:(n)=>o((a)=>e(a).pipe(s((u)=>n.apply({...a,headers:u})))),orElse:(n)=>o((a)=>e(a).pipe(Bt(()=>n.apply(a)))),pipe:(n)=>n(t)};return t},h=(e,t)=>o((n)=>e.load.pipe(i((a)=>po(n.headers,t(si(a)))))),g=(e,t)=>{let n=typeof e==="string"?Ri(e):e;if(si(n)==="")return c(new Ca(t));return r(n)},l=(e,t)=>{if(typeof e==="string"||Md(e))return d(g(e,t));return d(f(function*(){return yield*g(yield*e,t)}))},UT=(e,t="value")=>l(e,t),zT=(e,t="optional value")=>e===void 0?d(c(new Ca(t))):l(e,t),HT=(e)=>l(Bv(e),e),ly=(e)=>d(e),Fr=o((e)=>r(e.headers)),jT=(e)=>o((t)=>r(po(t.headers,e))),qT=(e)=>o((t)=>r(Jr(t.headers,e))),Cf=(e)=>o(e),A=(e)=>e instanceof Ca||e instanceof de&&e.reason instanceof kr&&e.reason.kind==="missing",BT=(e,t)=>o((n)=>e.apply(n).pipe(Bt((a)=>A(a)?t.apply(n):c(a)))),WT=Fr,p=(e)=>typeof e==="string"||Md(e)||Ny(e)?l(e,"value"):e;function Qk(e){return p(e).bearer()}var VT=Qk;function bu(e,t){if(t===void 0)return(n)=>p(n).header(e);return p(t).header(e)}function ZT(e,t){let n=(a)=>h(p(a),(u)=>({[e]:`Bearer ${u}`}));if(t===void 0)return n;return n(t)}var y=(e)=>{if(e instanceof Ca||e instanceof id)return new de({module:"Auth",method:"apply",reason:e instanceof Ca?new kr({message:e.message,kind:"missing"}):new rn({message:`Failed to resolve auth config: ${e.message}`})});return e},Co=(e)=>(t)=>e.apply(t).pipe(i((n)=>Pt(n,Ao(t.headers))),at(y));
3
+ export{Ca,FT,UT,zT,HT,ly,Fr,jT,qT,Cf,BT,WT,Qk,VT,bu,ZT,Co};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{$s}from"./plugin-3whwpedj.js";import{qs}from"./plugin-frrvs5yc.js";import{hc,de}from"./plugin-7y7ndrk9.js";import{N}from"./plugin-me00x60n.js";import{Yl,Oo,Xl,Ur,ed,Wi,Sc}from"./plugin-zz7yc97m.js";import{ql,xr,Et,iy}from"./plugin-1n46me5n.js";import{we}from"./plugin-a4ng6krf.js";import{Fr}from"./plugin-ay29ch70.js";import{Lr}from"./plugin-q1n5kwx0.js";import{jl}from"./plugin-pfj9nc2e.js";import{rv,wf,ov,sv,Cm}from"./plugin-1x94cj6e.js";import{Ne,na,F0,ze,Es,r,h,d,f,c,s,i,at,pt,$r,ha,Kn,Eo,cE,ar,xn,Qn,ug,Ot,un,Ui,oc,lg,dg,mg,Gd,dE}from"./plugin-6xpcmvm3.js";var b=(e,t)=>{let n=t.liveness;if(n===void 0)return e;let a=new de({module:"LLM",method:"stream",reason:new hc({message:`The model stream went silent: nothing arrived for ${Math.round(n/1000)} seconds.`,idleMs:n,url:String(t.model.id)})});return Ot(F0((y)=>d(()=>{let P=()=>Number(y.monotonicTimeNanosUnsafe())/1e6,o=Eo(!1),l,m=ar(e,(R)=>r(h(()=>(l=P()+n,o.openUnsafe(),R)).pipe(i((g)=>(o.closeUnsafe(),l=void 0,g))))),u=f(function*(){while(!0){if(yield*o.await,l===void 0)continue;let R=l-P();if(R<=0)return yield*c(a);yield*y.sleep(Ne(R))}});return lg(m,cE(u),{haltStrategy:"left"})})))};var J=(e,t)=>{let n=e.provider??("provider"in t?t.provider:void 0);if(!n)throw Error(`Route.model(${e.id}) requires a provider`);if(!W(e.endpoint))throw Error(`Route.model(${e.id}) requires an endpoint baseURL \u2014 configure it on the route first`);return Sc.make({...t,provider:n,route:e})},A=(e,t)=>{let n=G(e?.headers,t.headers);return{...e,...t,headers:n,limits:t.limits===void 0?e?.limits:Wi.make(t.limits),generation:ed(QE(e?.generation),QE(t.generation)),providerOptions:Yl(e?.providerOptions,t.providerOptions),http:Xl(e?.http,nk(t.http),n===void 0?void 0:new Oo({headers:n}))}},W=(e)=>typeof e.baseURL==="string"?e.baseURL:void 0,G=(...e)=>{let t=e.flatMap((n)=>n===void 0?[]:Object.entries(n).filter((a)=>a[1]!==void 0));if(t.length===0)return;return Object.fromEntries(t)},QE=(e)=>e===void 0?void 0:Ur.make(e),nk=(e)=>{if(e===void 0)return e;return Oo.make(e)},j=(e,t)=>Ot(i(ze,(n)=>ug(na(t,(a)=>iy(a,ov(e,n),e.secrets))))),z=(e,t)=>Ot(f(function*(){let n=yield*ze;return yield*$s({type:"stream-failed",transportAttempt:t.attempt,reason:e.reason._tag,family:e.family,retryable:e.retryable,message:e.reason.message,afterMs:n-t.startedAt,status:t.status,upstreamRequestId:t.upstreamRequestId}),Qn(e)})),K=$r(ql),S=(e,t=[])=>{if(e._tag==="Pointer"){let n=e.path.flatMap((a)=>typeof a==="string"||typeof a==="number"?[a]:[]);return S(e.issue,[...t,...n])}if(e._tag==="Filter"||e._tag==="Encoding")return S(e.issue,t);if(e._tag==="Composite")return S(e.issues[0],t);if(e._tag==="AnyOf"&&e.issues[0]!==void 0)return S(e.issues[0],t);return{path:t,reason:e._tag}},V=(e,t)=>{let n=e;if(typeof e==="string"){let o=K(e);if(o._tag!=="Success")return xr({kind:"malformed-json",eventType:null,keys:[],issue:{path:[],reason:"InvalidJson"}});n=o.success}let a=N(n)?n:void 0,y=typeof a?.type==="string"?a.type:null,P=S(t.issue);return xr({kind:"schema-invalid",eventType:y,keys:a===void 0?[]:Object.keys(a).sort(),issue:P})};function x(e){let t=e.protocol,n=ha(Kn(t.body.schema)),a=pt(t.stream.event),y=(o,l)=>(m)=>a(m).pipe(at((u)=>Et(void 0,{route:e.id,message:`Invalid ${o} stream event`,family:"invalid-output",excerpt:V(m,u),status:l.status,upstreamRequestId:l.upstreamRequestId,attempt:l.attempt,bytesRead:l.bytesRead,lastEvent:wf(l)}))),P=(o)=>{let l={id:o.id,provider:o.provider===void 0?void 0:qs.make(o.provider),protocol:t.id,endpoint:o.endpoint,auth:o.auth??Fr,transport:o.transport,quota:o.quota,quotaFrames:o.quotaFrames,rateLimits:t.rateLimits,inlineCacheHints:t.inlineCacheHints===!0,refusals:o.refusals,presentation:o.presentation,retry:o.retry,defaults:o.defaults??{},body:t.body,with:(m)=>{let{id:u,provider:R,auth:g,transport:q,endpoint:B,quota:k,quotaFrames:v,refusals:L,presentation:M,retry:E,...F}=m;return P({...o,id:u??o.id,provider:R??o.provider,auth:g??o.auth,endpoint:B?Lr.merge(o.endpoint,B):o.endpoint,transport:q??o.transport,quota:k??o.quota,quotaFrames:v??o.quotaFrames,refusals:L??o.refusals,presentation:M??o.presentation,retry:E??o.retry,defaults:A(l.defaults,F)})},model:(m)=>J(l,m),prepareTransport:(m,u,R)=>o.transport.prepare({body:m,request:u,endpoint:o.endpoint,auth:o.auth??Fr,encodeBody:R??n,headers:o.headers}),streamPrepared:(m,u,R,g)=>{let q=`${u.model.provider}/${u.model.route.id}`;return Ot(i(Es([ze,jl]),([B,k])=>{let v=rv(k,B),L=null,M=o.quotaFrames,E=o.quota===void 0&&M===void 0?void 0:{fromHeaders:o.quota??(()=>null),accept:(p)=>{L=p}},F=o.transport.frames(m,u,R,g,v,E),H=M===void 0||E===void 0?F:F.pipe(oc((p)=>ze.pipe(s((C)=>d(()=>{let D=M(p,new Date(C));if(D!==null)E.accept(D)}))))),O=M!==void 0,w=b(H,u).pipe(Ui(y(q,v)),t.stream.terminal&&!O?Gd(t.stream.terminal):(p)=>p).pipe(dE(()=>t.stream.initial(u),t.stream.step,t.stream.onHalt?{onHalt:t.stream.onHalt}:void 0),oc((p)=>d(()=>sv(v,p.type)))),I=(p)=>L===null?p:we.stepFinish({...p,quota:L}),T=(p)=>I(v.upstreamRequestId===void 0?p:{...p,requestId:v.upstreamRequestId});return(O?X(w,T):un(w,(p)=>we.is.stepFinish(p)?T(p):p)).pipe(dg((p)=>j(v,p)),mg("LLM.Error",(p)=>z(p,v)))}))}};return l};return P({...e,defaults:A(void 0,e.defaults??{})})}function rk(e){if("transport"in e)return x(e);let t=e.protocol;return x({id:e.id,provider:e.provider,protocol:t,endpoint:e.endpoint,auth:e.auth,headers:e.headers,quota:e.quota,quotaFrames:e.quotaFrames,refusals:e.refusals,presentation:e.presentation,retry:e.retry,transport:Cm({framing:e.framing}),defaults:e.defaults})}var X=(e,t)=>{let n=!1;return e.pipe(dE(()=>null,(a,y)=>d(()=>{if(!we.is.stepFinish(y))return[a,[y]];return n=!0,[y,[]]}),{onHalt:(a)=>a===null?[]:[t(a)]}),dg((a)=>n?xn:ug(a)))},To={make:rk};
3
+ export{QE,nk,rk,To};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{n,w,t,o,O,W,gt,kt,Zt,_t}from"./plugin-6xpcmvm3.js";var Tm=200,fk=160,Qg=t.check(kt(/^[a-z][a-z0-9-]*$/u),_t(64)),Rm=["tagma","lode"],fT="tagma",pk=W(["configured","serving","last-recorded"]),pT=W(["hook","vendor-record","transcript","session-store","terminal","protocol"]),mT=O([o({read:w("value"),value:t.check(_t(Tm)),claim:pk}),o({read:w("absent")}),o({read:w("unsupported")}),o({read:w("unreadable"),reason:t.check(_t(fk))})]),hT=o({value:t,label:t,description:n(t)}),gT=W(["choice"]),yT=o({id:gt(t.check(Zt(1))),tool:t.check(Zt(1)),subject:t.check(Zt(1))}),xT=["catalog","proxy"],mk=1e4,ST={chars:mk,basis:"unmeasured"},ev="tagma";function bT(r){let e=r[ev];if(e===null)throw Error(`The harness cannot express permission stance ${ev}.`);return e}function ET(r,e){if(e===void 0)return[];let a=e.rung===null?e.model:`${e.model} at ${e.rung}`;if(r===null)throw Error(`The harness declares no model surface and cannot launch on ${a}.`);return r.argv(e)}var vT={_tag:"char",char:"\x03"},wT=()=>null,kT=()=>null,_T=(r)=>(e,a)=>a.length===1?r(e,a[0]):null,TT=(r,e)=>{if(r.selected===null)return null;let a=r.options.findIndex((l)=>l.value===r.selected),s=r.options.findIndex((l)=>l.value===e);if(a<0||s<0)return null;let d=s>a?"down":"up";return[...Array.from({length:Math.abs(s-a)}).fill(d),"enter"]},RT=(r,e)=>r.options.some((a)=>a.value===e)?[...e].map((a)=>({_tag:"char",char:a})):null,IT=(r,e,a=r.findLastIndex((s)=>e(s)!==null))=>{if(a<0)return null;let s=[],d=[],l=a;for(;l>=0;l-=1){let i=e(r[l]);if(i===null)break;if(s.push({value:i.value,label:i.label}),i.selected)d.push(i.value)}return s.reverse(),{options:s,selected:d.length===1?d[0]:null,marked:d.length,above:l}},Im={asksFrom:"never"},yu={asksFrom:"review",timeout:"none"},CT={names:"kind",byName:{bash:{kind:"execute",approval:yu},read:{kind:"read",approval:Im},ls:{kind:"read",approval:Im},glob:{kind:"read",approval:Im},grep:{kind:"read",approval:Im},write:{kind:"write",approval:yu},edit:{kind:"write",approval:yu},delete:{kind:"write",approval:yu},rename:{kind:"write",approval:yu},webfetch:{kind:"network",approval:yu},websearch:{kind:"network",approval:yu}}};
3
+ export{Tm,fk,Qg,Rm,fT,pk,pT,mT,hT,gT,yT,xT,mk,ST,ev,bT,ET,vT,wT,kT,_T,TT,RT,IT,Im,yu,CT};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var CE={question:"left"},dR=["beforeTool","afterTool","beforeStep","beforeClose","threadStarted","threadEnded"],Tl={schedule:"schedule",build:"build",ended:"ended",asked:"asked",notification:"notification",hook:"hook"},Qd={server:"TAGMA_SERVER_URL",caller:"TAGMA_CALLER",data:"TAGMA_PLUGIN_DATA",revision:"TAGMA_PLUGIN_REVISION"},Yd="runlith/projects",kg="__",Ft={schedule:(e)=>`__schedule_${e}`,build:(e)=>`__build_${e}`,action:(e)=>`__action_${e}`,hook:(e)=>`__hook_${e}`,ended:"__ended",asked:"__asked",notification:"__notification"};
3
+ export{CE,dR,Tl,Qd,Yd,kg,Ft};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{hs,zs,Pv,xc}from"./plugin-nqmb78ez.js";import{Co}from"./plugin-ay29ch70.js";import{Ma}from"./plugin-e2y95zm5.js";import{js}from"./plugin-krbbb4ts.js";import{Io,If}from"./plugin-3pfrkxg1.js";import{Nm,Ul,Lm,Dm,Tf,ls,ji}from"./plugin-zw3ywa4b.js";import{q,wi,ze,r,c,s,at,_h,Va,Vc,v,ee,ht}from"./plugin-6xpcmvm3.js";var l=(e)=>("http"in e.reason)?e.reason.http?.body??"":"",FE=(e)=>{if(e.status===401)return new Ul;if(e.status===403)return/user:profile/i.test(l(e))?new Lm({scope:"user:profile"}):new Ul;if(e.status===429)return new Nm({retryAfterMs:e.retryAfterMs});if(e.status!==void 0&&e.status>=500)return new Dm({status:e.status});if(e.reason._tag==="Transport")return new Tf({message:e.message});if(e.reason._tag==="Authentication")return new Ul;return new ls({message:e.message})},Is=()=>c(new ji),f=ee("LLM.quotaGet")(function*(e){let t=e.method,o=yield*Co(e.auth)({method:t,url:e.url,body:e.body===void 0?"":JSON.stringify(e.body),headers:ht(e.headers??{})}).pipe(at(FE)),a=hs(t)(e.url).pipe(zs(o)),i=e.body===void 0?a:yield*Pv(a,e.body).pipe(at((n)=>new ls({message:n.message}))),p=yield*Io;return{body:yield*Vc((n)=>p.execute(i,n,void 0,{retry:!1}).pipe(at(FE),s((d)=>d.json.pipe(at(()=>new ls({message:"The quota endpoint answer was not JSON."})))))),observedAt:new Date(yield*ze)}}),Jw=q("@runlith/llm/QuotaDoor",{defaultValue:()=>{return}}),Kw=v(function*(e){let t=yield*Jw,o=t===void 0?Ma:xc(r(t));return yield*e.pipe(Va(If.pipe(wi(o))))}),u=(e)=>Kw(f(e).pipe(_h({duration:js,orElse:()=>c(new Tf({message:`The quota endpoint did not answer within ${js}ms.`}))}))),Al=(e)=>u({...e,method:"GET"}),W_=(e)=>u({...e,method:"POST"});
3
+ export{FE,Is,Jw,Kw,Al,W_};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{qn,Nf,Vm,Tu,Mo,Ru,Df,xc}from"./plugin-nqmb78ez.js";import{Ao,Pt,my}from"./plugin-je5cfnqn.js";import{q,bt,mn,r,d,pr,f,c,Ze,i,Dt,dt,tm}from"./plugin-6xpcmvm3.js";import{Agent as P,request as U}from"http";import{Agent as B,request as D}from"https";import{pipeline as k,Readable as x}from"stream";import{createBrotliDecompress as M,createGunzip as W,createInflate as z,createZstdDecompress as F}from"zlib";var e_=q("@runlith/llm/verbatim/RequestOptions",{defaultValue:()=>({})}),S=()=>{let e=process.env,p={...e,http_proxy:e.http_proxy||e.HTTP_PROXY||e.all_proxy||e.ALL_PROXY,https_proxy:e.https_proxy||e.HTTPS_PROXY||e.all_proxy||e.ALL_PROXY};for(let u of[p.http_proxy,p.https_proxy]){if(!u)continue;let{protocol:o}=new URL(u);if(o!=="http:"&&o!=="https:")throw Error(`Unsupported proxy protocol: ${o}`)}let a={keepAlive:!0,scheduling:"lifo",timeout:5000,proxyEnv:p};return{http:new P(a),https:new B(a)}},L=q("@runlith/llm/verbatim/Agents",{defaultValue:S}),t_=(e,p,a,u)=>{let o={};for(let[t,R]of Object.entries(my(e))){let l=t.toLowerCase();if(l==="host")o[t]=p;else if(l==="content-length"){if(a!==void 0)o[t]=String(a)}else o[t]=R}if(!("host"in e))o.Host=p;if(u&&a!==void 0&&!("content-length"in e)&&!("transfer-encoding"in e))o["content-length"]=String(a);return o},I=(e,p,a,u,o,t,R)=>pr((l,h)=>{let w=p.protocol==="https:",m=(n)=>l(c(new qn({reason:new Nf({request:e,cause:n})})));if(a.aborted||h.aborted){let n=a.reason??h.reason;if(o instanceof ReadableStream)o.cancel(n).catch(()=>{return});m(n);return}let y,H;try{y=(w?D:U)(p,{...u,method:e.method,headers:t_(t,p.host,R,o!==void 0),signal:a})}catch(n){if(o instanceof ReadableStream)o.cancel(n).catch(()=>{return});m(n);return}if(!("connection"in e.headers))y.removeHeader("connection");if(y.on("error",m),u.timeout!==void 0&&u.timeout>0)y.once("timeout",()=>y.destroy(Object.assign(Error("HTTP socket timed out"),{code:"ETIMEDOUT"})));let T=()=>y.destroy(Error("HTTP request interrupted"));if(h.addEventListener("abort",T,{once:!0}),y.once("close",()=>{h.removeEventListener("abort",T),H?.destroy()}),y.on("response",(n)=>{n.once("end",()=>{if(!y.writableFinished)H?.destroy()});let E=n.statusCode??0,C=e.method!=="HEAD"&&E!==204&&E!==205&&E!==304,b=[];if(C)for(let s of(n.headers["content-encoding"]??"").split(",").reverse())switch(s.trim().toLowerCase()){case"":case"identity":break;case"gzip":b.push(W());break;case"deflate":b.push(z());break;case"br":b.push(M());break;case"zstd":b.push(F());break;default:n.destroy();for(let g of b)g.destroy();m(Error(`Unsupported HTTP content encoding: ${s}`));return}let v=b.at(-1)??n,_=C?x.toWeb(v,{strategy:{highWaterMark:65536,size:(s)=>s.byteLength}}):null;if(C){let s=()=>v.destroy(Error("HTTP response interrupted"));a.addEventListener("abort",s,{once:!0}),v.once("close",()=>a.removeEventListener("abort",s))}if(b.length>0)k([n,...b],(s)=>{if(s)v.destroy(s)});if(!C)n.resume();let A=new Headers;for(let[s,g]of Object.entries(n.headers)){if(g===void 0)continue;for(let O of Array.isArray(g)?g:[g])A.append(s,O)}if(b.length>0)A.delete("content-encoding"),A.delete("content-length");try{let s=new Response(_,{status:E,statusText:n.statusMessage,headers:A});l(r(Tu(e,s)))}catch(s){n.destroy();for(let g of b)g.destroy();m(s)}}),o instanceof ReadableStream)H=x.fromWeb(o),H.once("error",(n)=>l(c(new qn({reason:new Vm({request:e,cause:n})})))),k(H,y,(n)=>{if(n)m(n)});else y.end(o)}),n_=Mo(Ru((e,p,a,u)=>f(function*(){let o=u.getRef(L),t=e.body,R,l=t._tag==="Empty"?0:t.contentLength,h=e.headers;switch(t._tag){case"Empty":l=0;break;case"Uint8Array":R=t.body;break;case"Stream":R=yield*tm(t.stream,{strategy:new ByteLengthQueuingStrategy({highWaterMark:65536})});break;case"Raw":case"FormData":{let w=yield*Ze({try:()=>new Response(t._tag==="FormData"?t.formData:t.body),catch:(y)=>new qn({reason:new Vm({request:e,cause:y})})}),m=w.headers.get("content-type")??(t._tag==="Raw"&&typeof t.body==="string"?"text/plain;charset=UTF-8":null);if(R=w.body??void 0,m&&!(t._tag==="Raw"&&h["content-type"]))h=Pt({...h,"content-type":m},Ao(h));if(t._tag==="Raw"){if(typeof t.body==="string")l=Buffer.byteLength(t.body);else if(t.body instanceof ArrayBuffer||ArrayBuffer.isView(t.body))l=t.body.byteLength;else if(t.body instanceof Blob)l=t.body.size;else if(t.body instanceof URLSearchParams)l=Buffer.byteLength(t.body.toString())}break}}return yield*I(e,p,a,{agent:p.protocol==="https:"?o.https:o.http,...u.getRef(e_)},R,h,l)})),Dt(Df,!1)),Ma=xc(i(L,(e)=>Mo(n_,Dt(L,e)))).pipe(mn(bt(L,dt(d(S),(e)=>d(()=>{e.http.destroy(),e.https.destroy()})))));
3
+ export{e_,t_,n_,Ma};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{F}from"./plugin-6xpcmvm3.js";class tf extends F("WebRefused"){get message(){return this.reason}}var z_=(e,o)=>{let r=e.webfetch===void 0?void 0:o(e.webfetch);if(e.websearch!==void 0)return{websearch:o(e.websearch),webfetch:r};if(r!==void 0)return{webfetch:r};throw Error("A vendor web declares at least one of websearch and webfetch.")};
3
+ export{tf,z_};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{t,S}from"./plugin-6xpcmvm3.js";var Hg={accessToken:t,refreshToken:t,expiresAt:S};
3
+ export{Hg};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Mu,Iy,Cy}from"./plugin-frrvs5yc.js";import{W}from"./plugin-6xpcmvm3.js";var s=["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],i=["auto","default","flex","priority"],a=new Set(Mu),u=new Set(["low","medium","high"]),p=new Set(s),l=new Set(i),lf=Iy,jE=Cy,qE=W(s),BE=W(i),c=(n)=>typeof n==="string"&&a.has(n),d=(n)=>typeof n==="string"&&u.has(n),df=(n)=>({openai:Object.fromEntries(Object.entries(n).filter(([,e])=>e!==void 0))}),o=(n)=>n.providerOptions?.openai,cc=(n)=>{let e=o(n)?.store;return typeof e==="boolean"?e:void 0},ff=(n)=>{let e=o(n)?.reasoningEffort;return c(e)?e:void 0},WE=(n)=>o(n)?.reasoningSummary==="auto"?"auto":void 0,VE=(n)=>{let e=o(n)?.include;if(!Array.isArray(e))return;let t=e.filter((r)=>p.has(r));return t.length>0?t:void 0},pf=(n)=>{let e=o(n)?.parallelToolCalls;return typeof e==="boolean"?e:void 0},ZE=(n)=>{let e=o(n)?.promptCacheKey;return typeof e==="string"?e:void 0},GE=(n)=>{let e=o(n)?.textVerbosity;return d(e)?e:void 0},pm=(n)=>{let e=o(n)?.serviceTier;return typeof e==="string"&&l.has(e)?e:void 0},JE=(n)=>{let e=o(n)?.instructions;return typeof e==="string"?e:void 0},KE=(n)=>{let e=o(n)?.thinking;if(typeof e!=="object"||e===null)return;let t=e.type;return t==="enabled"||t==="disabled"?{type:t}:void 0};var f=/^x-ratelimit-(limit|remaining|reset)-(.+)$/,mf=(n)=>{let e=f.exec(n),t=e?.[1],r=e?.[2];if(r===void 0||t!=="limit"&&t!=="remaining"&&t!=="reset")return;return{bucket:r,kind:t}};
3
+ export{lf,jE,qE,BE,df,cc,ff,WE,VE,pf,ZE,GE,pm,JE,KE,mf};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Cn,J,ce,t,ge,W,ec,iu}from"./plugin-6xpcmvm3.js";function g(e,n,r){if(n==="__proto__")Object.defineProperty(e,n,{value:r,enumerable:!0,writable:!0,configurable:!0});else e[n]=r}function nh(e){return d(e,[])??null}function d(e,n){switch(typeof e){case"string":case"boolean":return e;case"number":return Number.isFinite(e)?e:null;case"bigint":return e.toString();case"object":return e===null?null:y(e,n);default:return}}function y(e,n){if(n.includes(e))return;n.push(e);let r=e.toJSON,o=typeof r==="function"?d(r.call(e),n):Array.isArray(e)?m(e,n):b(e,n);return n.pop(),o}function m(e,n){let r=null;for(let o=0;o<e.length;o+=1){let i=e[o],s=d(i,n)??null;if(r===null&&s!==i)r=e.slice(0,o);if(r!==null)r.push(s)}return r??e}function b(e,n){let r=Object.getPrototypeOf(e),o=r===Object.prototype||r===null,i=e instanceof Error?{...e,message:e.message}:e,s=Object.keys(i),l=o?null:{};for(let u=0;u<s.length;u+=1){let c=s[u],f=i[c],a=d(f,n);if(l===null&&(a!==f||a===void 0)){l={};for(let p of s.slice(0,u))g(l,p,i[p])}if(l!==null&&a!==void 0)g(l,c,a)}return l??e}var Cu=ce.pipe(iu(ce,{encode:J((e)=>nh(e)),decode:Cn()})),Sr=ge(t,Cu),ut=ge(t,Sr).annotate({identifier:"LLM.ProviderMetadata"}),Ry=t,sd=t,Au=t.pipe(ec("LLM.ModelID")),qs=t.pipe(ec("LLM.ProviderID")),QT=t,Oa=t,Pa=t,Mu=["none","minimal","low","medium","high","xhigh","max"],Iy=W(Mu),Cy=W(["low","medium","high"]),Ay=W(["system","user","assistant","tool"]),zf=W(["stop","length","tool-calls","content-filter","error","unknown"]),Ou=ge(t,Cu);
3
+ export{nh,Cu,Sr,ut,Ry,sd,Au,qs,QT,Oa,Pa,Mu,Iy,Cy,Ay,zf,Ou};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Xg,ey}from"./plugin-z6hkd9rw.js";import{Yg}from"./plugin-8230g28p.js";import{Qg,Rm}from"./plugin-ca4vf4j5.js";import{Rt,C,ml,$r,hl,Dp,n,t,o,x,Kn}from"./plugin-6xpcmvm3.js";var b=(e,r)=>{let i=new Set;for(let s of e){if(s==="")throw Error(`${r} has an empty id.`);if(i.has(s))throw Error(`${r} "${s}" is declared twice.`);i.add(s)}},k=(e,r)=>{if(e.length===0)throw Error(`${r} declares no sample rate.`);for(let i of e)if(!Number.isInteger(i)||i<=0)throw Error(`${r} declares rate ${i}.`)},S=(e,r,i)=>{b(e.map((s)=>s.id),`${i} tuning knob`);for(let s of e){if(!(s.min<=s.initial&&s.initial<=s.max))throw Error(`${i} tuning knob "${s.id}" starts outside ${s.min}..${s.max}.`);for(let l of s.modes)if(!r.includes(l))throw Error(`${i} tuning knob "${s.id}" names undeclared turn mode ${l}.`)}},I=(e,r)=>{if(!Number.isInteger(e.languages.hints)||e.languages.hints<0)throw Error(`${r} declares ${e.languages.hints} language hints.`);if(e.translation!==void 0&&e.translation.targets.length===0)throw Error(`${r} translates into no language.`);if(e.kind==="file"){if(e.containers.length===0)throw Error(`${r} takes no file container.`);return}if(k(e.rates,r),e.kind==="batch"){S(e.tuning,["client"],r);return}if(e.turns.length===0)throw Error(`${r} supports no turn mode.`);if(b(e.turns,`${r} turn mode`),e.turns.includes("none")&&e.timestamps!=="word"&&!e.finalize)throw Error(`${r} offers turn mode none without word timestamps or finalize: the core could never close its utterances.`);S(e.tuning,e.turns,r)},F=$r(Xg),H=$r(ey),z=(e)=>{if(!Rt(e))throw Error("A speech list entry is not a speech provider.");let{id:r,label:i,egress:s,credential:l,availability:p,recognizer:c,synthesizer:f}=e;if(typeof r!=="string"||r==="")throw Error("Speech provider has an empty id.");if(typeof i!=="string")throw Error(`Speech provider "${r}" has no label.`);if(!Array.isArray(s)||!s.every((g)=>typeof g==="string"))throw Error(`Speech provider "${r}" declares egress that is not a list of hosts.`);if(!Rt(l)||l._tag!=="none"&&l._tag!=="required")throw Error(`Speech provider "${r}" declares no credential form.`);if(l._tag==="required"&&!Dp(l.schema))throw Error(`Speech provider "${r}" requires a credential without a schema.`);if(typeof p!=="function")throw Error(`Speech provider "${r}" declares no availability.`);let h=(g,a,u,d,m)=>{if(a===void 0)return;if(!Rt(a)||!Array.isArray(a.models))throw Error(`Speech provider "${r}" declares a ${g} without a list of models.`);for(let y of a.models){let w=u(y);if(C(w))throw Error(`Speech provider "${r}" declares a ${g} model that is malformed: ${w.failure.message}`)}for(let y of d){let w=a[y];if((w!==void 0||m.includes(y))&&typeof w!=="function")throw Error(`Speech provider "${r}" declares a ${g} whose ${y} is not a function.`)}};h("recognizer",c,F,["stream","batch","file","resume","discard"],[]),h("synthesizer",f,H,["open"],["open"])},j=(e)=>{let{recognizer:r,synthesizer:i}=e;if(r===void 0&&i===void 0)throw Error(`Speech provider "${e.id}" neither recognizes nor synthesizes.`);if(r!==void 0){if(r.models.length===0)throw Error(`Speech provider "${e.id}" recognizes with no model.`);b(r.models.map((s)=>s.id),`${e.id} recognition model`);for(let s of r.models){let l=`${e.id}/${s.id}`;if(I(s.recognition,l),s.recognition.kind==="stream"&&r.stream===void 0)throw Error(`${l} is a stream model but the recognizer does not stream.`);if(s.recognition.kind==="batch"&&r.batch===void 0)throw Error(`${l} is a batch model but the recognizer takes no clip.`);if(s.recognition.kind==="file"&&r.file===void 0)throw Error(`${l} is a file model but the recognizer takes no file.`)}if(r.resume===void 0!==(r.discard===void 0))throw Error(`Speech provider "${e.id}" resumes work it cannot discard, or discards work it cannot resume.`)}if(i!==void 0){if(i.models.length===0)throw Error(`Speech provider "${e.id}" synthesizes with no model.`);b(i.models.map((s)=>s.id),`${e.id} synthesis model`);for(let s of i.models){let l=`${e.id}/${s.id}`;if(k(s.synthesis.rates,l),s.synthesis.voices.length===0)throw Error(`${l} offers no voice.`);if(b(s.synthesis.voices.map((p)=>p.id),`${l} voice`),s.synthesis.needsLanguage&&s.synthesis.languages.length===0)throw Error(`${l} needs a language but names none.`)}}},q=(e)=>Rt(e)&&typeof e.id==="string"&&e.id!==""?e.id:void 0,D=(e,r,i,s)=>{try{z(e);let l=i.get(e.id);if(l!==void 0)return`Speech provider "${e.id}" is already declared by ${l}.`;let p=s.get(e.id);if(p!==void 0&&p!==r)return`"${e.id}" is already a provider of ${p}.`;j(e);return}catch(l){return l instanceof Error?l.message:String(l)}},Sf=(e,r=new Map)=>{let i=new Map,s=[],l=[];for(let c of e){if("failure"in c){l.push({owner:c.owner,reason:c.failure});continue}for(let f of c.providers){let h=D(f,c.owner,i,r);if(h!==void 0){l.push({owner:c.owner,provider:q(f),reason:h});continue}i.set(f.id,c.owner),s.push(f)}}let p=new Map(s.map((c)=>[c.id,c]));return{providers:s,owners:i,recognition:s.flatMap((c)=>(c.recognizer?.models??[]).map((f)=>({provider:c.id,model:f}))),synthesis:s.flatMap((c)=>(c.synthesizer?.models??[]).map((f)=>({provider:c.id,model:f}))),faults:l,provider:(c)=>p.get(c)}};var A=new Set(["max"]);function v(e){let r=Object.entries(e.models).filter(([,l])=>l.operatorOnly===!0&&l.capabilities.includes("text"));if(r.length>0){let l=e.spawnTextModel;if(!l)return`Provider "${e.id}" has operator-only text model "${r[0]?.[0]}" but no spawnTextModel.`;let p=e.models[l];if(!p?.capabilities.includes("text"))return`Provider "${e.id}" spawnTextModel "${l}" is absent or not a text model.`;if(p.operatorOnly)return`Provider "${e.id}" spawnTextModel "${l}" is operator-only.`}let i=e.lightTextModel;if(i!==void 0){let l=e.models[i.model];if(!l?.capabilities.includes("text")||l.operatorOnly)return`Provider "${e.id}" lightTextModel "${i.model}" is absent, not a text model or operator-only.`;if(i.rung===null?l.reasoning.length>0:!l.reasoning.includes(i.rung))return`Provider "${e.id}" lightTextModel "${i.model}" offers no rung ${i.rung??"none"}.`}let s=Object.entries(e.models).find(([,l])=>l.capabilities.includes("text")&&!l.capacity);if(s!==void 0)return`Text model capacity is required for ${e.id}/${s[0]}.`;if(e.defaultTextModel===""&&!Object.values(e.models).some((l)=>l.capabilities.includes("text")))return null;if(!e.models[e.defaultTextModel]?.capabilities.includes("text"))return`Provider "${e.id}" defaultTextModel "${e.defaultTextModel}" is absent or not a text model.`;return null}function E(e){let r=new Map;for(let a of e){if(r.has(a.id))throw Error(`Provider "${a.id}" is registered twice.`);let u=v(a);if(u!==null)throw Error(u);r.set(a.id,a)}let i=e.flatMap((a)=>Object.entries(a.models).map(([u,d])=>({id:u,key:`${a.id}:${u}`,label:d.label,short:d.short??d.label,provider:a.id,providerLabel:a.label,capacity:d.capacity,cacheLifetime:a.cacheLifetime,requestLimits:a.requestLimits,capabilities:d.capabilities,toolChoice:d.toolChoice,reasoningOptions:d.reasoning.map((m)=>({id:m,label:_(m),short:B(m)})),defaultReasoning:d.defaultReasoning,switches:d.switches??[],supportsAdaptiveThinking:d.supportsAdaptiveThinking??!1,operatorOnly:d.operatorOnly??!1,compactionTrigger:d.compactionTrigger}))),s=(a)=>{let u=r.get(a);if(!u)throw Error(`Unknown model provider "${a}" \u2014 this catalog registers: ${e.map((d)=>d.id).join(", ")}.`);return u},l=(a)=>i.filter((u)=>u.capabilities.includes(a)),p=(a,u)=>l(u).filter((d)=>d.provider===a),c=(a,u)=>{let d=r.get(a);if(d===void 0)return;let m=u??d.defaultTextModel,y=p(d.id,"text");return y.find((w)=>w.id===m)??y.find((w)=>d.models[w.id]?.aliases?.includes(m))},f=(a,u)=>{let d=c(a,u);if(!d?.capacity){let m=s(a);throw Error(`Text model capacity is not configured for ${a}/${u??m.defaultTextModel}.`)}return d},h=(a,u)=>{let d=f(a,u);return d.operatorOnly?f(a,s(a).spawnTextModel):d},g=(a,u,d)=>{let m=N(u,a);if(!m)return null;if(!A.has(m)||d&&!a.operatorOnly)return m;return a.reasoningOptions.filter((y)=>!A.has(y.id)).at(-1)?.id??null};return{providers:e,providerOptions:e.map((a)=>({id:a.id,label:a.label})),options:i,registered:(a)=>r.has(a),named:s,oauth:(a)=>s(a).auth==="oauth",providerLabel:(a)=>r.get(a)?.label??a,modelsOf:(a)=>i.filter((u)=>u.provider===a),modelsFor:p,modelsByCapability:l,defaultTextModelId:(a)=>s(a).defaultTextModel,findTextModel:c,resolveTextModel:f,spawnInherits:h,spawnReasoning:g,textModelCapacity:(a,u)=>{let d=f(a,u);if(!d.capacity)throw Error(`Text model capacity is not configured for ${d.key}.`);return d.capacity},namedSelection:(a,u)=>({provider:a,model:f(a,u).id}),supportsAdaptiveThinking:(a,u)=>f(a,u).supportsAdaptiveThinking,textModelIds:()=>{let a=[...new Set(l("text").map((u)=>u.id))];if(a.length===0)throw Error("Model catalog has no text models.");return a},reasoningLevelIds:()=>{let a=[...new Set(i.flatMap((u)=>u.reasoningOptions.map((d)=>d.id)))];if(a.length===0)throw Error("Model catalog has no reasoning levels.");return a}}}function N(e,r){if(!r||r.reasoningOptions.length===0)return"";if(e&&r.reasoningOptions.some((i)=>i.id===e))return e;if(r.defaultReasoning&&r.reasoningOptions.some((i)=>i.id===r.defaultReasoning))return r.defaultReasoning;return r.reasoningOptions.find((i)=>i.id==="high")?.id??r.reasoningOptions[0]?.id??""}function _(e){switch(e){case"none":return"None";case"minimal":return"Minimal";case"low":return"Low";case"medium":return"Medium";case"high":return"High";case"xhigh":return"XHigh";case"max":return"Max";default:return e}}function B(e){switch(e){case"none":return"None";case"minimal":return"Min";case"low":return"Low";case"medium":return"Med";case"high":return"High";case"xhigh":return"XH";case"max":return"Max";default:return e}}var G=(e,r,i)=>{let s=new Map(e);for(let{accountMode:l}of r){if(l===void 0)continue;let p=s.get(l.section);s.set(l.section,{title:p?.title??l.title,default:p?.default??l.default,modes:new Map([...p?.modes??[],[l.id,i]])})}return s},U=(e,r)=>{let i=r.accountMode,s=i===void 0?void 0:e.get(i.section);if(i===void 0||s===void 0)return null;let l=s.modes.get(i.id);if(l!==void 0)return`provider "${r.id}" declares mode "${i.id}" of section "${i.section}", already declared by ${l}`;if(s.title!==i.title||s.default!==i.default)return`provider "${r.id}" declares section "${i.section}" with another title or default mode than its other modes`;return null},R=(e)=>typeof e?.program!=="string"||!Array.isArray(e.args)||e.args.some((r)=>typeof r!=="string"),K=(e)=>typeof e.directory!=="string"||e.directory===""||R(e.login)||R(e.status)||typeof e.loggedIn!=="function"||e.renew!==void 0&&R(e.renew),P=(e)=>{if(e===void 0||e.credential==null||typeof e.key!=="function"||typeof e.label!=="function")return!0;if(!Array.isArray(e.signIns)||e.signIns.length===0)return!0;let r=new Set;for(let i of e.signIns){if(r.has(i.kind))return!0;switch(r.add(i.kind),i.kind){case"loopback":if(typeof i.run!=="function")return!0;break;case"device":if(i.vendor==null||typeof i.store!=="function")return!0;break;case"paste":if(typeof i.begin!=="function")return!0;break;case"key":if(typeof i.store!=="function")return!0;break;default:return!0}}return!1},X=ml(Qg),J=(e)=>{let{terminal:r,acp:i}=e;if(!X(e.id)||Rm.includes(e.id))return`harness provider "${e.id}" needs an id of up to 64 lowercase letters, digits and hyphens that starts with a letter and is none of ${Rm.join(", ")}`;if(r!==void 0&&(!M(r.binary)||!M(r.prefix)||typeof r.launch?.interactive!=="function"||typeof r.launch.resume!=="function"||typeof r.launch.root!=="function"))return`harness provider "${e.id}" declares a terminal surface without its binary, session prefix or launch`;if(i!==void 0&&(typeof i.argv!=="function"||typeof i.configure!=="function"))return`harness provider "${e.id}" declares an ACP surface without its argv or configure`;if(r!==void 0&&i!==void 0&&i.hosts===null&&i.argv(void 0)[0]!==r.binary)return`harness provider "${e.id}" launches its ACP agent with a program other than its terminal binary ${r.binary}`;if(r===void 0&&i!==void 0&&i.hosts!==null&&!M(i.program))return`harness provider "${e.id}" hosts its ACP agent without a terminal surface and names no program its runner drives`;return null};function V(e){if(typeof e.id!=="string"||e.id==="")return"a provider declares no id";if(e.catalog!==void 0&&typeof e.catalog.read!=="function")return`provider "${e.id}" declares a malformed catalog reader`;if(e.dynamicCatalog===!0&&e.catalog===void 0)return`provider "${e.id}" declares a dynamic catalog without its reader`;let{id:r,accountMode:i}=e;if(i!==void 0&&[i.section,i.title,i.default,i.id,i.label,i.hint].some((s)=>typeof s!=="string"||s===""))return`provider "${e.id}" declares a malformed account mode`;if(i!==void 0&&e.accounts===void 0)return`provider "${e.id}" declares an account mode without accounts`;if(e.kind==="wire"){if(typeof e.profile?.model!=="function")return`provider "${e.id}" declares no request profile`;if(typeof e.quota?.read!=="function")return`provider "${e.id}" declares no quota`;if(e.auth==="cli")return`wire provider "${e.id}" signs in through a CLI`;if(e.auth==="oauth"&&P(e.accounts))return`provider "${e.id}" declares no subscription accounts`;if(Object.keys(e.imageModels??{}).length>0&&typeof e.images?.generate!=="function")return`provider "${e.id}" declares image models without an image profile`;return null}if(e.kind==="harness"){if(e.imageModels!==void 0)return`harness provider "${e.id}" declares image models`;let s=J(e);if(s!==null)return s;if(typeof e.environment!=="function")return`provider "${e.id}" declares no account environment`;if(e.auth==="api-key")return P(e.accounts)?`provider "${e.id}" declares malformed key accounts`:null;if(e.accounts!==void 0&&K(e.accounts))return`provider "${e.id}" declares malformed accounts`;return e.auth==="cli"?null:`harness provider "${r}" declares no supported sign-in`}return`provider "${String(e.id)}" is neither a wire nor a harness provider`}var W=ml(x(Yg)),M=(e)=>typeof e==="string"&&e!=="",T=(e)=>(e.type==="choice"||e.type==="set")&&e.options.length===0||e.type==="rows"&&(e.fields.length===0||e.fields.some(T)),Y=(e)=>{if(e===void 0)return null;if(!M(e.title)||!M(e.instance)||!M(e.name))return"the adapter declares settings without a title, an instance name or a naming field";if(!W(e.fields))return"the adapter declares settings fields the Providers screen cannot draw";if(new Set(e.fields.map((r)=>r.id)).size!==e.fields.length||e.fields.some(T))return"the adapter declares settings fields with repeated ids, or choices without options";if(e.fields.some((r)=>r.type==="rows"&&r.fields.some((i)=>i.id==="_source"||i.id==="_key")))return"row fields use reserved form metadata names";if(!e.fields.some((r)=>r.id===e.name&&r.type==="text"))return"the adapter declares settings without a text field that names an instance";if(e.validate!==void 0&&typeof e.validate!=="function"||e.discover!==void 0&&typeof e.discover!=="function")return"the adapter declares settings whose validate or discover is not a function";return null},bf=(e,r,i=new Map,s=new Map)=>{if(typeof e!=="function")throw Error("models is not an adapter: make it with defineAdapter");let l=e,p=Y(l.settings);if(p!==null)throw Error(p);let c=l(r);if(!Array.isArray(c))throw Error("the adapter does not answer a list of providers");let f=c.map((a)=>a.catalog===void 0?a:{...a,dynamicCatalog:!0}),h=new Set,g=s;for(let a of f){let u=V(a)??v(a)??U(g,a);if(u!==null)throw Error(u);let d=i.get(a.id)??(h.has(a.id)?"this adapter":void 0);if(d!==void 0)throw Error(`provider "${a.id}" is already declared by adapter ${d}`);h.add(a.id),g=G(g,[a],"this adapter")}return E(f),{providers:f,settings:l.settings}};import{readFile as Q,realpath as Z}from"fs/promises";import{join as L}from"path";var fi="tagma-plugin.json";var ee=o({id:t,version:t,providers:n(o({entry:t}))}),te=hl(Kn(ee)),ne,re=(e)=>ne??=(async()=>{let r=[];for(let[i,s]of Object.entries(e))r.push([i,await s().then((l)=>({exports:l}),(l)=>({unloadable:l}))]);Bun.plugin({name:"adapter-host",setup(i){for(let[s,l]of r)i.module(s,()=>{if("unloadable"in l)throw l.unloadable;return{exports:{...l.exports},loader:"object"}})}})})(),oe=(e,r)=>{if(typeof e!=="object"||e===null)throw Error(`${r} exports no provider part as its default: write export default defineProviders({ models, speech })`);let{models:i,speech:s}=e;if(i!==void 0&&typeof i!=="function")throw Error(`${r}: models is not an adapter: make it with defineAdapter from @runlith/tagma/adapter/provider`);if(s!==void 0&&!Array.isArray(s))throw Error(`${r}: speech is not a list of speech providers`);if(i===void 0&&s===void 0)throw Error(`${r} declares neither models nor speech`);return e},Ef=async(e,r,i=process.execArgv)=>{if(!i.includes("--no-install"))throw Error("the server runs without --no-install, so an import outside the host modules would install a second copy instead of failing; start it with bun --no-install");let s=await Z(e),l=L(s,fi),{id:p,version:c,providers:f}=te(await Q(l,"utf8"));if(f===void 0)throw Error(`${l} declares no provider part`);let h=L(s,f.entry);await re(r);let g=await import(h);return{id:p,version:c,...oe(g.default,h)}};var vf=async()=>({"@runlith/adapter-anthropic/icon":()=>import("./icon-044pa3y8.js"),"@runlith/adapter-anthropic/models/anthropic":()=>import("./anthropic-a4pdzrv2.js"),"@runlith/adapter-anthropic/profiles/anthropic":()=>import("./anthropic-z9xqmm3q.js"),"@runlith/adapter-deepseek/models/deepseek":()=>import("./deepseek-fvdrmjr9.js"),"@runlith/adapter-deepseek/profiles/deepseek":()=>import("./deepseek-v388d1wv.js"),"@runlith/adapter-devin/icon":()=>import("./icon-qy92jx2b.js"),"@runlith/adapter-devin/models/devin":()=>import("./devin-hy98d305.js"),"@runlith/adapter-google/icon":()=>import("./icon-ny6qbjvc.js"),"@runlith/adapter-muse/icon":()=>import("./icon-j22svmgp.js"),"@runlith/adapter-muse/models/muse":()=>import("./muse-tfe6sph7.js"),"@runlith/adapter-muse/profiles/muse":()=>import("./muse-r16jp51z.js"),"@runlith/adapter-muse/profiles/museToolSchema":()=>import("./museToolSchema-tbe0f3wa.js"),"@runlith/adapter-openai/models/openai":()=>import("./openai-37dne8v0.js"),"@runlith/adapter-openai/profiles/openai":()=>import("./openai-0z6fy497.js"),"@runlith/adapter-opencode-go/models/opencodeGo":()=>import("./opencodeGo-qgw3pfg6.js"),"@runlith/adapter-opencode-go/profiles/opencodeGo":()=>import("./opencodeGo-173fz5c5.js"),"@runlith/adapter-stepfun/models/stepfun":()=>import("./stepfun-3en5g41d.js"),"@runlith/adapter-stepfun/profiles/stepfun":()=>import("./stepfun-bwsz4nrd.js"),"@runlith/adapter-xai/icon":()=>import("./icon-pz54e8n3.js"),"@runlith/adapter-xai/models/xai":()=>import("./xai-e8sbtk6a.js"),"@runlith/adapter-xai/profiles/xai":()=>import("./xai-z1ysta23.js"),"@runlith/held/Held":()=>import("./Held-6krt6ncs.js"),"@runlith/llm/models/authStatus":()=>import("./authStatus-a1g3eb9p.js"),"@runlith/llm/models/cacheLifetime":()=>import("./cacheLifetime-c5mpw676.js"),"@runlith/llm/models/description":()=>import("./description-8xhxryaq.js"),"@runlith/llm/models/grant":()=>import("./grant-67b10nhx.js"),"@runlith/llm/oauth/accountKey":()=>import("./accountKey-tdjj67f5.js"),"@runlith/llm/oauth/callback-server":()=>import("./callback-server-0wrzmjfx.js"),"@runlith/llm/oauth/cliStore":()=>import("./cliStore-9rhjxtht.js"),"@runlith/llm/oauth/flows/deviceGrant":()=>import("./deviceGrant-vgbscpr4.js"),"@runlith/llm/oauth/flows/manual":()=>import("./manual-2mdscj84.js"),"@runlith/llm/oauth/flows/open-browser":()=>import("./open-browser-vqb7ckt1.js"),"@runlith/llm/oauth/flows/vendorPayload":()=>import("./vendorPayload-awxqr7t8.js"),"@runlith/llm/oauth/pkce":()=>import("./pkce-nrpept7w.js"),"@runlith/llm/oauth/vendor":()=>import("./vendor-pn6b5a8f.js"),"@runlith/llm/oauth/vendorCall":()=>import("./vendorCall-hv01nwsp.js"),"@runlith/llm/profiles/clientSession":()=>import("./clientSession-tmmxm39z.js"),"@runlith/llm/profiles/contract":()=>import("./contract-qn0z7r9c.js"),"@runlith/llm/profiles/credential":()=>import("./credential-5sgapkh0.js"),"@runlith/llm/profiles/images":()=>import("./images-q80x3bt1.js"),"@runlith/llm/profiles/quotaRead":()=>import("./quotaRead-vj6e90xc.js"),"@runlith/llm/profiles/reasoning":()=>import("./reasoning-5nanktp2.js"),"@runlith/llm/profiles/vendorWeb":()=>import("./vendorWeb-vnf344r1.js"),"@runlith/llm/protocols/anthropic-messages":()=>import("./anthropic-messages-7gtja121.js"),"@runlith/llm/protocols/anthropic/stream":()=>import("./stream-bt8etfpc.js"),"@runlith/llm/protocols/openai-compatible-chat":()=>import("./openai-compatible-chat-tq9w69h4.js"),"@runlith/llm/protocols/openai-images":()=>import("./openai-images-x1sj79qh.js"),"@runlith/llm/protocols/openai-responses":()=>import("./openai-responses-dka6k753.js"),"@runlith/llm/protocols/shared":()=>import("./shared-a2yyy8ry.js"),"@runlith/llm/protocols/utils/lifecycle":()=>import("./lifecycle-qf4fh5m8.js"),"@runlith/llm/protocols/utils/tool-stream":()=>import("./tool-stream-gdajdxn0.js"),"@runlith/llm/route/auth":()=>import("./auth-0w6kk39v.js"),"@runlith/llm/route/definition":()=>import("./definition-s3xx207f.js"),"@runlith/llm/route/endpoint":()=>import("./endpoint-kvf97tz7.js"),"@runlith/llm/route/executor":()=>import("./executor-q8kp5q8h.js"),"@runlith/llm/route/framing":()=>import("./framing-nktw5sts.js"),"@runlith/llm/route/notes":()=>import("./notes-6amdhm6h.js"),"@runlith/llm/route/protocol":()=>import("./protocol-hwnfh4h1.js"),"@runlith/llm/route/transport/connect":()=>import("./connect-vrdsw05j.js"),"@runlith/llm/route/transport/verbatim":()=>import("./verbatim-mqt9x4aa.js"),"@runlith/llm/schema/errors":()=>import("./errors-5t42p4q1.js"),"@runlith/llm/schema/events":()=>import("./events-e8vv9hda.js"),"@runlith/llm/schema/ids":()=>import("./ids-n269hc5k.js"),"@runlith/llm/schema/messages":()=>import("./messages-1szh3p3k.js"),"@runlith/llm/schema/options":()=>import("./options-pxwjpfdk.js"),"@runlith/llm/schema/quota":()=>import("./quota-vrrmfag6.js"),"@runlith/llm/schema/responseFold":()=>import("./responseFold-w4526gvb.js"),"@runlith/llm/schema/tool-content":()=>import("./tool-content-b9jtprr7.js"),"@runlith/llm/utils/headers":()=>import("./headers-ss3dzznj.js"),"@runlith/llm/utils/record":()=>import("./record-1m3vvy60.js"),"@runlith/llm/vendorCall":()=>import("./vendorCall-6n5chrn0.js"),"@runlith/speech/protocol/adapter":()=>import("./adapter-qdnpxs6n.js"),"@runlith/speech/protocol/codec":()=>import("./codec-aa8mxqyr.js"),"@runlith/speech/protocol/duplex":()=>import("./duplex-kpmftvf7.js"),"@runlith/speech/protocol/synthesisDuplex":()=>import("./synthesisDuplex-m2j6pmyv.js"),"@runlith/speech/protocol/transport":()=>import("./transport-7hfp9sn4.js"),"@runlith/speech/wire/capabilities":()=>import("./capabilities-n3vfpy41.js"),"@runlith/speech/wire/events":()=>import("./events-s95ybm4g.js"),"@runlith/speech/wire/failure":()=>import("./failure-vr32debc.js"),"@runlith/speech/wire/requests":()=>import("./requests-2zyr1g8e.js"),"@runlith/tagma/adapter/claude-hooks":()=>import("./claudeHooks-edpg1e46.js"),"@runlith/tagma/adapter/harness":()=>import("./harness-nrh78w4d.js"),"@runlith/tagma/adapter/hook":()=>import("./hook-hjrk83m8.js"),"@runlith/tagma/adapter/metadata":()=>import("./metadata-zm1v3ptf.js"),"@runlith/tagma/adapter/payload":()=>import("./payload-2gr4q9g8.js"),"@runlith/tagma/adapter/provider":()=>import("./provider-0b7xxyhn.js"),"@runlith/tagma/adapter/settings":()=>import("./settings-vdypzert.js"),"@runlith/tagma/adapter/speech":()=>import("./speech-067caz1a.js"),"@runlith/utils/object":()=>import("./object-9pjtdam7.js"),effect:()=>import("./index-cyd7v366.js"),"effect/http":()=>import("./index-jpmjpmkn.js")});
3
+ export{Sf,bf,fi,Ef,vf};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{di}from"./plugin-9gha9fx3.js";var ef="muse",$g="https://api.meta.ai/v1",mw="muse-spark-1.3",hw={"muse-wonder-full-1.0":{label:"Wonder Full 1.0",short:"Wonder Full",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh","max"],defaultReasoning:"high"},"muse-wonder-full-1.0-contributor":{label:"Wonder Full 1.0 Contributor",short:"Wonder Full C",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh","max"],defaultReasoning:"high"},"muse-wonder-1.0":{label:"Wonder 1.0",short:"Wonder",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh","max"],defaultReasoning:"high"},"muse-wonder-1.0-contributor":{label:"Wonder 1.0 Contributor",short:"Wonder C",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh","max"],defaultReasoning:"high"},[mw]:{label:"Spark 1.3",short:"Spark",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh","max"],defaultReasoning:"high"},"muse-spark-1.3-contributor":{label:"Spark 1.3 Contributor",short:"Spark C",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh","max"],defaultReasoning:"high"},"muse-spark-1.2-contributor":{label:"Spark 1.2 Contributor",short:"Spark C",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh"],defaultReasoning:"high"},"muse-spark-1.2":{label:"Spark 1.2",short:"Spark",toolChoice:["auto"],capacity:{context:1007997,output:128000},capabilities:["text","vision"],reasoning:["minimal","low","medium","high","xhigh"],defaultReasoning:"high"}},um={id:ef,label:"Muse",auth:"api-key",keyScope:"identity",models:di(hw,{ids:["muse-spark-1.3","muse-spark-1.3-contributor","muse-wonder-1.0","muse-spark-1.2-contributor","muse-spark-1.2"]}),cacheLifetime:{promisedSeconds:null,prior:null},defaultTextModel:"muse-spark-1.3",lightTextModel:{model:"muse-spark-1.3-contributor",rung:"minimal"}},U_={providers:[um]};
3
+ export{ef,$g,mw,hw,um,U_};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{N}from"./plugin-me00x60n.js";import{nh,Cu,Sr,ut,Ay,Ou}from"./plugin-frrvs5yc.js";import{Xm,Oo,Ur,eh,rd,Ut,gs,_y}from"./plugin-zz7yc97m.js";import{Pm}from"./plugin-nkb5bb2q.js";import{n,w,ce,t,S,z,o,x,O,W,Kr,ct,uu,Ke,nw,So}from"./plugin-6xpcmvm3.js";var d=new WeakMap;function u(e){let i=d.get(e);if(i!==void 0)return i;let a=So(e);return d.set(e,a),a}var m=o({mode:W(["manual","automatic"]),transcriptLocation:t,keep:n(t)}),f=o({...m.fields,id:t,preservedCount:S,previousMessageId:n(t),previousRequestId:n(t),toolReferences:n(x(t))});var T=o({type:w("text"),text:t,cache:n(gs),metadata:n(Sr)}).annotate({identifier:"LLM.SystemPart"}),h=(e)=>({type:"text",text:e}),Ck=Object.assign(T,{from:h,content:(e)=>{if(e===void 0)return[];return typeof e==="string"?[h(e)]:Array.isArray(e)?[...e]:[e]}}),Ak=o({type:w("text"),text:t,deferredTools:n(x(t)),cache:n(gs),metadata:n(Sr),providerMetadata:n(ut)}).annotate({identifier:"LLM.Content.Text"}),Mk=o({type:w("media"),mediaType:t,data:O([t,uu]),filename:n(t),cache:n(gs),metadata:n(Sr)}).annotate({identifier:"LLM.Content.Media"}),R=O([o({type:w("json"),value:Cu}),o({type:w("text"),value:Cu}),o({type:w("error"),value:Cu}),o({type:w("content"),value:x(Pm)})]).annotate({identifier:"LLM.ToolResult"}).pipe(Kr("type")),Ok=o({outputId:t,format:W(["text","json"]),byteLength:S,lineCount:S,location:n(t),contentLocation:n(t)}).annotate({identifier:"LLM.ToolResultRetention"}),g=(e)=>N(e)&&(e.type==="json"||e.type==="text"||e.type==="error"||e.type==="content")&&("value"in e),Os=Object.assign(R,{from:(e,i="json")=>{let a=g(e)?e.type:i,r=g(e)?e.value:e;if(a==="content")return{type:a,value:Array.isArray(r)?r:[]};return{type:a,value:nh(r)}}}),Mm=Object.assign(o({structured:ce,content:x(Pm)}).annotate({identifier:"LLM.ToolOutput"}),{from:(e,i=[])=>({structured:e,content:i}),fromResultValue:(e)=>{switch(e.type){case"json":return{structured:e.value,content:[]};case"text":return{structured:{},content:[{type:"text",text:L(e.value)}]};case"content":return{structured:{},content:e.value};case"error":return}},toResultValue:(e)=>{if(e.content.length===0)return{type:"json",value:e.structured};if(e.content.length===1&&e.content[0]?.type==="text")return{type:"text",value:e.content[0].text};return{type:"content",value:e.content}}}),L=(e)=>{if(typeof e==="string")return e;try{return JSON.stringify(e)??String(e)}catch{return String(e)}},Om=Object.assign(o({type:w("tool-call"),id:t,name:t,input:ce,unparsed:n(t),providerExecuted:n(z),cache:n(gs),metadata:n(Sr),providerMetadata:n(ut)}).annotate({identifier:"LLM.Content.ToolCall"}),{from:(e)=>({type:"tool-call",...e})}),_f=Object.assign(o({type:w("tool-result"),id:t,name:t,result:Os,toolReferences:n(x(t)),providerExecuted:n(z),retained:n(Ok),durationMs:n(ct),cache:n(gs),metadata:n(Sr),providerMetadata:n(ut)}).annotate({identifier:"LLM.Content.ToolResult"}),{from:(e)=>({type:"tool-result",id:e.id,name:e.name,result:Os.from(e.result,e.resultType),toolReferences:e.toolReferences,providerExecuted:e.providerExecuted,retained:e.retained,durationMs:e.durationMs,cache:e.cache,metadata:e.metadata,providerMetadata:e.providerMetadata})}),Pk=o({type:w("reasoning"),text:t,encrypted:n(t),metadata:n(Sr),providerMetadata:n(ut)}).annotate({identifier:"LLM.Content.Reasoning"}),$k=o({type:w("model-fallback"),from:Ut,to:Ut,trigger:Sr,providerMetadata:n(ut)}).annotate({identifier:"LLM.Content.ModelFallback"}),Nk=O([Ak,Mk,Om,_f,Pk,$k]).pipe(Kr("type"));class dn extends Ke("LLM.Message")({id:n(t),requestId:n(t),role:Ay,content:x(Nk),origin:n(Ut),compaction:n(f),metadata:n(Sr),native:n(Sr)}){}((c)=>(c.text=(p)=>({type:"text",text:p}),c.content=(p)=>typeof p==="string"?[c.text(p)]:Array.isArray(p)?[...p]:[p],c.make=(p)=>{if(p instanceof dn)return p;return new dn({...p,content:c.content(p.content)})},c.user=(p)=>c.make({role:"user",content:p}),c.assistant=(p)=>c.make({role:"assistant",content:p}),c.system=(p)=>c.make({role:"system",content:p}),c.tool=(p)=>c.make({role:"tool",content:["type"in p?p:_f.from(p)]})))(dn||={});var Lk=o({name:t,namespace:n(o({name:t,description:t}))});class pi extends Ke("LLM.ToolDefinition")({name:t,description:t,inputSchema:Ou,cache:n(gs),metadata:n(Sr),native:n(Sr),vendorWire:n(Lk),deferred:n(w(!0))}){}((i)=>i.make=(a)=>a instanceof pi?a:new pi(a))(pi||={});var Dk=(e)=>{let i=nw(u(e),{onExcessProperty:"error"});if(Object.keys(i.definitions).length===0)return i.schema;return{...i.schema,$defs:i.definitions}},C=new WeakMap,$T=(e)=>{let i=C.get(e);if(i!==void 0)return i;let a=P(Dk(e));return C.set(e,a),a},P=(e)=>{if(e.type==="object")return e;let{not:i,...a}=e;if(b(i)&&a.anyOf===void 0)return{...a,type:"object"};let{anyOf:r,...s}=e,l=Array.isArray(r)?r.filter(M):[];if(l.length===1)return{...s,...l[0],type:"object"};if(Array.isArray(r)&&l.length>1&&l.length===r.length)return{...s,type:"object",anyOf:l};throw Error("A tool input schema is one object at the root; this codec produced "+(l.length>0?"a union containing non-object shapes":"no object shape")+". Declare the wire form on the tool as `inputSchema`, and keep the codec for decoding.")},M=(e)=>N(e)&&(e.type==="object"||("properties"in e)),b=(e)=>N(e)&&e.type==="null"&&Object.keys(e).length===1;class fc extends Ke("LLM.ToolChoice")({type:eh,name:n(t)}){}((r)=>{let e=(s)=>s==="auto"||s==="none"||s==="required";r.named=(s)=>new fc({type:"tool",name:s}),r.make=(s)=>{if(s instanceof fc)return s;if(s instanceof pi)return r.named(s.name);if(typeof s==="string")return e(s)?new fc({type:s}):r.named(s);return new fc(s)}})(fc||={});var Fk=O([o({type:w("text")}),o({type:w("json"),schema:Ou}),o({type:w("tool"),tool:pi})]).pipe(Kr("type"));class us extends Ke("LLM.Request")({id:n(t),model:rd,system:x(Ck),messages:x(dn),tools:x(pi),toolChoice:n(fc),generation:n(Ur),providerOptions:n(Xm),http:n(Oo),responseFormat:n(Fk),compaction:n(m),cache:n(_y),liveness:n(S),metadata:n(Sr)}){}((a)=>(a.input=(r)=>({id:r.id,model:r.model,system:r.system,messages:r.messages,tools:r.tools,toolChoice:r.toolChoice,generation:r.generation,providerOptions:r.providerOptions,http:r.http,responseFormat:r.responseFormat,compaction:r.compaction,cache:r.cache,liveness:r.liveness,metadata:r.metadata}),a.update=(r,s)=>{if(Object.keys(s).length===0)return r;return new us({...a.input(r),...s,model:s.model??r.model})}))(us||={});
3
+ export{Ck,Ak,Mk,Ok,Os,Mm,Om,_f,Pk,$k,Nk,dn,Lk,pi,Dk,$T,fc,Fk,us};