@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,2 @@
1
+ // @bun
2
+ import{Dl}from"./plugin-9gha9fx3.js";var u="devin",s="claude-opus-5",i="speed",a=(e)=>[{id:i,label:"Fast",description:"Priority inference, at a higher cost tier",values:[{id:"standard",label:"Standard"},{id:e,label:"Fast"}],default:null,icon:Dl}],n={[s]:{label:"Opus 5",short:"Opus",servedAs:"claude-opus-5",vision:!0,context:1e6,output:128000,rungs:["low","medium","high","xhigh","max"],speed:"fast"},"claude-fable-5-1":{label:"Fable 5.1",short:"Fable",servedAs:"claude-fable-5-1",vision:!0,context:1e6,output:128000,rungs:["low","medium","high","xhigh","max"],operatorOnly:!0},"claude-sonnet-5":{label:"Sonnet 5",short:"Sonnet",servedAs:"claude-sonnet-5",vision:!0,context:1e6,output:128000,rungs:["low","medium","high","xhigh","max"]},"claude-opus-4-8":{label:"Opus 4.8",short:"Opus",servedAs:"claude-opus-4-8",vision:!0,context:1e6,output:128000,rungs:["low","medium","high","xhigh","max"],speed:"fast"},"claude-opus-4-7":{label:"Opus 4.7",short:"Opus",servedAs:"claude-opus-4-7",vision:!0,context:1e6,output:128000,rungs:["low","medium","high","xhigh","max"]},"claude-fable-5":{label:"Fable 5",short:"Fable",servedAs:"claude-5-fable",vision:!0,context:1e6,output:128000,rungs:["low","medium","high","xhigh","max"],operatorOnly:!0},"gpt-6-astra":{label:"GPT-6 Astra",short:"Astra",servedAs:"gpt-6-astra",vision:!0,context:1e6,output:128000,rungs:["low","medium","high","xhigh","max"],speed:"priority"},"gpt-5.6-sol":{label:"GPT-5.6 Sol",short:"Sol 5.6",servedAs:"gpt-5-6-sol",vision:!0,context:1e6,output:128000,rungs:["none","low","medium","high","xhigh","max"],speed:"priority"},"gpt-5.6-terra":{label:"GPT-5.6 Terra",short:"Terra",servedAs:"gpt-5-6-terra",vision:!0,context:1e6,output:128000,rungs:["none","low","medium","high","xhigh","max"],speed:"priority"},"gpt-5.6-luna":{label:"GPT-5.6 Luna",short:"Luna 5.6",servedAs:"gpt-5-6-luna",vision:!0,context:1e6,output:128000,rungs:["none","low","medium","high","xhigh","max"],speed:"priority"},"gpt-5.5":{label:"GPT-5.5",short:"5.5",servedAs:"gpt-5-5",vision:!0,context:272000,output:128000,rungs:["none","low","medium","high","xhigh"],speed:"priority"},"gpt-5.3-codex":{label:"GPT-5.3 Codex",short:"Codex",servedAs:"gpt-5-3-codex",vision:!0,context:400000,output:128000,rungs:["low","medium","high","xhigh"],speed:"priority"},"grok-4.6":{label:"Grok 4.6",short:"Grok",servedAs:"grok-4-6",vision:!0,context:500000,output:1e5,rungs:["low","medium","high","xhigh"]},"grok-4.5":{label:"Grok 4.5",short:"Grok",servedAs:"grok-4-5",vision:!0,context:500000,output:1e5,rungs:["low","medium","high"]},"kimi-k3":{label:"K3",servedAs:"kimi-k3",vision:!0,context:1048576,output:131072,rungs:["low","high","max"]},"kimi-k2.7":{label:"Kimi K2.7",short:"K2.7",servedAs:"kimi-k2-7",vision:!0,context:262144,output:16000,rungs:[]},"kimi-k2.6":{label:"Kimi K2.6",short:"K2.6",servedAs:"kimi-k2-6",vision:!0,context:262144,output:8192,rungs:[]},"glm-5.3":{label:"GLM-5.3",short:"GLM",servedAs:"glm-5-3",context:1048576,output:128000,rungs:["low","high","max"]},"glm-5.3-flash":{label:"GLM-5.3 Flash",short:"GLM Flash",servedAs:"glm-5-3-flash",context:1e6,output:128000,rungs:["low","high","max"]},"deepseek-v4.1-flash":{label:"DeepSeek V4.1 Flash",short:"DS Flash",servedAs:"deepseek-v4-1-flash",vision:!0,context:1048576,output:384000,rungs:["high","max"]},"deepseek-v4-pro":{label:"DeepSeek V4 Pro",servedAs:"deepseek-v4-pro",context:1048576,output:384000,rungs:["high","max"]},"gemini-4-argon":{label:"Gemini 4 Argon",short:"Argon",servedAs:"gemini-4-argon",vision:!0,context:1048576,output:1e6,rungs:["low","medium","high"]},"gemini-3.8-flash":{label:"Gemini 3.8 Flash",short:"Flash",servedAs:"gemini-3-8-flash",vision:!0,context:1048576,output:65535,rungs:["low","medium","high"]},"gemini-3.1-pro":{label:"Gemini 3.1 Pro",short:"Pro",servedAs:"gemini-3-1-pro",vision:!0,context:1048576,output:65535,rungs:["low","high"]},"swe-2":{label:"SWE-2",short:"SWE-2",servedAs:"swe-2",context:262000,output:128000,rungs:["medium","high","max"]},"swe-1.6":{label:"SWE-1.6",short:"SWE",servedAs:"swe-1-6",context:200000,output:128000,rungs:[]},inkling:{label:"Inkling",short:"Inkling",servedAs:"inkling",context:1048576,output:131072,rungs:["none","low","medium","high","xhigh","max"]},"nemotron-3-ultra":{label:"Nemotron 3 Ultra",short:"Nemotron",servedAs:"nemotron-3-ultra",context:1e6,output:32768,rungs:["none","medium","high"]}};function d(e){if(e.length===0)return null;return e.includes("high")?"high":e.at(-1)??null}function h(e){return{label:e.label,short:e.short||void 0,servedAs:e.servedAs,capacity:{context:e.context,output:e.output},capabilities:e.vision?["text","vision"]:["text"],reasoning:e.rungs,defaultReasoning:d(e.rungs),switches:e.speed?a(e.speed):void 0,operatorOnly:e.operatorOnly||void 0}}var p=Object.fromEntries(Object.entries(n).map(([e,o])=>[e,h(o)]));function g({model:e,rung:o,switches:r}){let t=n[e];if(!t)throw Error(`"${e}" is not a Devin model \u2014 it serves: ${Object.keys(n).join(", ")}.`);if(t.rungs.length===0){if(o)throw Error(`Devin's "${e}" takes no reasoning rung, and "${o}" was named.`);return t.servedAs}if(!o)throw Error(`Devin spells "${e}" with its rung inside the id; name one of: ${t.rungs.join(", ")}.`);if(!t.rungs.includes(o))throw Error(`Devin's "${e}" has no "${o}" rung \u2014 it offers: ${t.rungs.join(", ")}.`);let l=t.speed&&r?.[i]===t.speed?t.speed:void 0;return[t.servedAs,o,l].filter(Boolean).join("-")}var c={id:u,label:"Devin",auth:"cli",models:p,cacheLifetime:{promisedSeconds:null,prior:null},defaultTextModel:s,spawnTextModel:s,spell:g},_={providers:[c]};export{s as DEFAULT_DEVIN_MODEL,u as DEVIN_PROVIDER,p as DEVIN_SPECS,c as devinDescription,_ as devinVendor,g as spellDevinSelection};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{om,P_}from"./plugin-kjtzm2q6.js";import"./plugin-v7k9fx92.js";import"./plugin-92redty0.js";import"./plugin-h66k1zhn.js";export{om as DuplexLimits,P_ as duplex};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Hk,jk,$m,Lr}from"./plugin-q1n5kwx0.js";import"./plugin-1n46me5n.js";import"./plugin-7y7ndrk9.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Lr as Endpoint,jk as merge,Hk as path,$m as render};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{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}from"./plugin-7y7ndrk9.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Cv as AdapterFailedReason,kr as AuthenticationReason,fy as ContentPolicyReason,ms as HttpContext,$f as HttpRateLimitDetails,Of as HttpRequestDetails,Pf as HttpResponseDetails,Aa as InvalidProviderOutputReason,rn as InvalidRequestReason,de as LLMError,GT as LLMErrorReason,Rv as NoRouteReason,Iv as NotInstalledReason,Yk as ProviderFailureClassification,Bi as ProviderInternalReason,Zl as QuotaExceededReason,Vl as RateLimitReason,hc as StreamStalledReason,Xk as ToolFailure,kv as TransportFailureKind,mc as TransportReason,vu as UnknownProviderReason,Mf as WIRE_CAUSE_DEPTH,Eu as WIRE_EXCERPT_LIMIT,Af as WireAttemptFields,dy as WireCause,_v as WireFailureFamily,JT as WireFailureRecord,Tv as WireLastEvent,Bm as familyRetries,Av as providerSaid,py as statusReason,KT as wireFailureRecord};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ln,PT,lc,iv,av,cv,uv,lv,dv,fv,pv,mv,hv,gv,yv,xv,Sv,bv,Ev,vv,we,Am,dc}from"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-zw3ywa4b.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{vv as Finish,lc as InputUsage,av as InputUsageMeasured,we as LLMEvent,dc as LLMResponse,bv as ModelFallback,Am as PreparedRequest,fv as ReasoningDelta,pv as ReasoningEnd,dv as ReasoningStart,Ev as StepFinish,iv as StepStart,uv as TextDelta,lv as TextEnd,cv as TextStart,yv as ToolCall,Sv as ToolError,hv as ToolInputDelta,gv as ToolInputEnd,mv as ToolInputStart,xv as ToolResult,ln as Usage,PT as sumUsage};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var r={_tag:"Finalized"},t={_tag:"Finished"},a={partial:(e,n)=>({_tag:"Partial",turn:e,text:n}),final:(e,n)=>({_tag:"Final",turn:e,units:n}),turnEnd:(e)=>({_tag:"TurnEnd",turn:e}),turnFailed:(e,n)=>({_tag:"TurnFailed",turn:e,message:n}),speechStart:(e,n)=>({_tag:"SpeechStart",turn:e,at:n}),speechEnd:(e,n)=>({_tag:"SpeechEnd",turn:e,at:n}),committed:(e,n)=>({_tag:"Committed",turn:e,commit:n}),finalized:r,finished:t};export{a as SpeechEvent};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Io,xu,_a,Rf,zl,Vk,Fm,Um,If,LT,zm}from"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Io as HttpExecutor,xu as MAX_RETRIES,Vk as RetryHint,zm as doorExecutorLayer,If as httpExecutorLayer,_a as normalizedHeaders,Fm as retryPause,Um as retryPolicy,zl as secretValues,Rf as upstreamRequestId,LT as wireExecutorLayer};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ur,Xd}from"./plugin-v7k9fx92.js";import"./plugin-h66k1zhn.js";export{Xd as Overflow,ur as SpeechFailure};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ms,OT}from"./plugin-60bdzk1r.js";import"./plugin-1n46me5n.js";import"./plugin-7y7ndrk9.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{OT as json,Ms as sse};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Hg}from"./plugin-ff9hx5a4.js";import"./plugin-h66k1zhn.js";export{Hg as ROTATING_GRANT};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{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}from"./plugin-ca4vf4j5.js";import"./plugin-h66k1zhn.js";export{ev as ADOPTED_HARNESS_PERMISSION_STANCE,yu as ASKS_IN_REVIEW,Im as ASKS_NEVER,fk as HARNESS_DETAIL_MAX,Tm as HARNESS_ID_MAX,mk as HOOK_CONTEXT_CHARS,fT as HOST_COMMAND,vT as INTERRUPT_KEY,CT as LEGACY_TOOLS,xT as MCP_TOOL_SHAPES,Rm as RESERVED_HARNESS_NAMES,ST as UNMEASURED_HOOK_CONTEXT,bT as adoptedPermissionArgv,ET as chosenModelArgv,yT as harnessCallSchema,pk as harnessClaimSchema,mT as harnessModelReportSchema,Qg as harnessNameSchema,pT as harnessProvenanceSchema,gT as harnessQuestionKindSchema,hT as harnessQuestionOptionSchema,TT as navigateChoice,_T as oneValue,IT as screenChoices,RT as typeChoice,kT as unmeasuredKeys,wT as unmeasuredScreen};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ao,Pt,my}from"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{my as declaredHeaders,Ao as headerNames,Pt as namedHeaders};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Rg,AE,Ig,Cg,Ag}from"./plugin-5zq084fb.js";export{Ig as approvePermission,Rg as commandGroup,Cg as eventOutput,AE as specificOutput,Ag as toolOutput};
@@ -0,0 +1,6 @@
1
+ // @bun
2
+ var h=`<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z" fill="currentColor" fill-rule="nonzero"/>
4
+ </svg>`,l=`<svg width="24" height="24" viewBox="0 0 16 16" fill="none" shape-rendering="crispEdges" xmlns="http://www.w3.org/2000/svg">
5
+ <path fill-rule="evenodd" d="M2 3h12v7H2zM0 5h2v2H0zM14 5h2v2h-2zM3 10h1v3H3zM5 10h1v3H5zM10 10h1v3h-1zM12 10h1v3h-1zM5 5h1v2H5zM10 5h1v2h-1z" fill="currentColor"/>
6
+ </svg>`;export{l as claudeCodeIcon,h as icon};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ var c=`<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z" fill="currentColor"/>
4
+ </svg>`;export{c as icon};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ var n=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M12 2C12.6 7.2 16.8 11.4 22 12C16.8 12.6 12.6 16.8 12 22C11.4 16.8 7.2 12.6 2 12C7.2 11.4 11.4 7.2 12 2Z" fill="currentColor"/>
4
+ </svg>`;export{n as icon};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ var L=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M12.4579 15.6036L26.1529 35H20.0656L6.37059 15.6036H12.4579ZM12.4524 26.3764L15.4974 30.6909L12.4551 35H6.36377L12.4524 26.3764ZM33.6365 7.15727V35H28.647V14.2236L33.6365 7.15727ZM33.6365 5L20.0656 24.2205L17.0206 19.9073L27.5451 5H33.6365Z" fill="currentColor"/>
4
+ </svg>`;export{L as icon};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ var C=`<svg width="24" height="24" viewBox="43 43 340 340" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M70 159.333V91.3471C70 88.3592 71.594 85.5983 74.1816 84.1044L133.043 50.1205C135.631 48.6265 138.819 48.6265 141.407 50.1205L200.269 84.1044C202.856 85.5983 204.45 88.3592 204.45 91.3471V126.068C204.708 137.606 210.806 148.734 221.531 154.926C232.256 161.117 244.942 160.834 255.063 155.289L285.132 137.929C287.719 136.435 290.907 136.435 293.495 137.929L352.357 171.913C354.944 173.406 356.538 176.167 356.538 179.155V247.123C356.538 250.111 354.944 252.872 352.357 254.366L293.495 288.35C290.907 289.844 287.719 289.844 285.132 288.35L255.306 271.13C245.146 265.456 232.344 265.117 221.534 271.358C210.809 277.55 204.711 288.678 204.453 300.215V334.926C204.453 337.914 202.859 340.675 200.271 342.169L141.41 376.153C138.822 377.647 135.634 377.647 133.046 376.153L74.1845 342.169C71.5969 340.675 70.0028 337.914 70.0028 334.926V266.959C70.0029 263.971 71.5969 261.21 74.1845 259.716L133.046 225.732C135.634 224.238 138.822 224.238 141.41 225.732L171.547 243.132C181.656 248.638 194.306 248.906 205.005 242.729C215.815 236.488 221.922 225.231 222.088 213.595C221.83 202.057 215.732 189.737 205.008 183.545C194.283 177.353 181.597 177.636 171.476 183.181L141.269 200.72C138.67 202.229 135.461 202.228 132.864 200.716L74.1576 166.562C71.5835 165.065 70 162.311 70 159.333Z" fill="currentColor"/>
4
+ </svg>`;export{C as icon};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cu,Sr,ut,Ry,sd,Au,qs,QT,Oa,Pa,Mu,Iy,Cy,Ay,zf,Ou}from"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Oa as ContentBlockID,zf as FinishReason,Sr as JsonRecord,Ou as JsonSchema,Ay as MessageRole,Au as ModelID,Ry as ProtocolID,qs as ProviderID,ut as ProviderMetadata,Iy as ReasoningEffort,Mu as ReasoningEfforts,QT as ResponseID,sd as RouteID,Cy as TextVerbosity,Pa as ToolCallID,Cu as carriedByJson};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{gw,Lg}from"./plugin-285exjxd.js";import"./plugin-7y7ndrk9.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Lg as checkedImageRequest,gw as imageRequestFault};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Oy,zv,Hv,jv,Py,qv,$y,Wv,Vv,Zv,i_,Gv,Jv,Kv,Qv,Ly,Yv,a_,Xv,e0,t0,n0,r0,o0,s0,i0,a0,c0,u0,l0,d0,Dy,Fy,f0,p0,m0,h0,c_,g0,y0,x0,S0,b0,Bs,Uy,E0,v0,w0,k0,rh,zy,_0,T0,R0,u_,I0}from"./plugin-h66k1zhn.js";import{Pu,g,gi,A0,Jo,bc,l_,Hy,Sn,On,St,M0,d_,sh,f_,O0,cd,Zs,Ir,no,Ye,Pn,zt,ah,Jf,Kf,dr,Qo,Zy,Gy,Wu,Jy,Do,Fo,gh,L0,Hc,qa,cx,ux,lx,pp,U0,nl,mp,p_,z0,Gn,$x,j0,_p,Ch,Ah,iS,bS,TS,pa,$p,zh,ci,Ya,m_,G0,HS,K0,qS,Q0,h_,rE,Zp,tg,ng,rg,sg,ag,ow,sw,oE,g_,sE,iw,aw,dw,y_,x_,fw,S_,b_}from"./plugin-6xpcmvm3.js";export{zv as Arbitrary,dr as Array,$x as BigDecimal,j0 as BigInt,Hv as Boolean,jv as Brand,_p as ByteSize,Py as Cache,Do as Cause,oE as Channel,qv as ChannelSchema,Ch as Chunk,ux as Clock,cd as Combiner,Wv as Config,$y as ConfigProvider,Vv as Console,Pn as Context,U0 as Cron,Zv as Crypto,Wu as Data,Ah as DateTime,gh as Deferred,i_ as Differ,Qo as Duration,Gn as Effect,O0 as Effectable,St as Equal,Ir as Equivalence,S_ as ErrorReporter,cx as ExecutionPlan,Fo as Exit,Zp as Fiber,Gv as FiberHandle,Jv as FiberMap,Kv as FiberSet,y_ as FileSystem,Zy as Filter,d_ as Formatter,Hy as Function,Qv as Graph,a_ as HKT,On as Hash,iS as HashMap,Yv as HashRing,bS as HashSet,sh as Inspectable,Jf as Iterable,K0 as JsonPatch,m_ as JsonPointer,G0 as JsonSchema,tg as Latch,qa as Layer,Xv as LayerMap,e0 as LayerRef,fw as LogLevel,t0 as Logger,n0 as ManagedRuntime,r0 as Match,z0 as Metric,rE as MutableHashMap,o0 as MutableHashSet,rg as MutableList,ng as MutableRef,s0 as Newtype,i0 as NonEmptyIterable,lx as Number,Q0 as Optic,Ye as Option,no as Order,a0 as Ordering,c0 as PartitionedSemaphore,x_ as Path,Pu as Pipeable,g_ as PlatformError,u0 as Pool,Sn as Predicate,Ly as PrimaryKey,sg as PubSub,nl as Pull,ag as Queue,Oy as Random,iw as RcMap,aw as RcRef,Kf as Record,M0 as Redactable,TS as Redacted,Zs as Reducer,b_ as Ref,L0 as References,HS as RegExp,p_ as Request,d0 as RequestResolver,f0 as Resource,zt as Result,p0 as Runtime,mp as Schedule,Gy as Scheduler,h_ as Schema,ci as SchemaAST,$p as SchemaGetter,pa as SchemaIssue,Ya as SchemaParser,m0 as SchemaRepresentation,zh as SchemaTransformation,Hc as Scope,h0 as ScopedCache,Fy as ScopedRef,ow as Semaphore,sE as Sink,c_ as StandardSchema,g0 as Stdio,dw as Stream,pp as String,qS as Struct,y0 as SubscriptionRef,x0 as Symbol,Dy as SynchronizedRef,sw as Take,S0 as Terminal,Jy as Tracer,b0 as Trie,ah as Tuple,Uy as TxChunk,E0 as TxDeferred,v0 as TxHashMap,w0 as TxHashSet,k0 as TxPriorityQueue,zy as TxPubSub,rh as TxQueue,_0 as TxReentrantLock,Bs as TxRef,T0 as TxSemaphore,R0 as TxSubscriptionRef,u_ as Types,l0 as UndefinedOr,I0 as Unify,f_ as Utils,A0 as absurd,gi as cast,bc as flow,l_ as hole,g as identity,Jo as pipe};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wm,gc,Gl,hy,Zm,_u,yc,Lf,Jm,Km,Nv,gy,yy,hi,xy,Qm,Ff,Ym,Sy,by,Kl,Ey,vy,wy,ky,Lv,Dv}from"./plugin-nqmb78ez.js";import{q0,B0,W0}from"./plugin-6xpcmvm3.js";export{q0 as Cookies,Wm as Etag,Nv as FetchHttpClient,gy as FindMyWay,B0 as Headers,gc as HttpBody,Km as HttpClient,Gl as HttpClientError,_u as HttpClientRequest,Lf as HttpClientResponse,vy as HttpEffect,yc as HttpIncomingMessage,hy as HttpMethod,Ey as HttpMiddleware,Qm as HttpPlatform,ky as HttpRouter,wy as HttpServer,Ym as HttpServerError,Kl as HttpServerRequest,Ff as HttpServerRespondable,hi as HttpServerResponse,Lv as HttpStaticServer,Dv as HttpStatus,Jm as HttpTraceContext,xy as Mime,by as Multipart,Sy as MultipartParser,yy as Template,Zm as Url,W0 as UrlParams};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cs,nn,Vo,Ol,cs,yr,Pl,As}from"./plugin-1xze8f5y.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-zw3ywa4b.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{As as finish,Cs as initial,cs as reasoningDelta,yr as reasoningEnd,Ol as reasoningStart,nn as stepStart,Vo as textDelta,Pl as textEnd};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ function i(a){let t=a.trim();if(!t)throw Error("Authorization input is empty");if(t.includes("://")||t.startsWith("localhost")||t.startsWith("127.0.0.1")){let r;try{r=new URL(t.includes("://")?t:`http://${t}`)}catch{throw Error("Pasted redirect URL is not a valid URL")}let e=r.searchParams.get("code");if(!e)throw Error("Pasted redirect URL has no code parameter");return{code:e,state:r.searchParams.get("state")??void 0}}return{code:t}}export{i as parseManualRedirect};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ck,Ak,Mk,Ok,Os,Mm,Om,_f,Pk,$k,Nk,dn,Lk,pi,Dk,$T,fc,Fk,us}from"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Nk as ContentPart,us as LLMRequest,Mk as MediaPart,dn as Message,$k as ModelFallbackPart,Pk as ReasoningPart,Fk as ResponseFormat,Ck as SystemPart,Ak as TextPart,Om as ToolCallPart,fc as ToolChoice,pi as ToolDefinition,Mm as ToolOutput,_f as ToolResultPart,Ok as ToolResultRetention,Os as ToolResultValue,Lk as VendorWire,Dk as toJsonSchema,$T as toolInputSchema};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import"./plugin-h66k1zhn.js";import{Tm}from"./plugin-ca4vf4j5.js";import{F,$r,t,_t}from"./plugin-6xpcmvm3.js";import{isAbsolute as y,join as p}from"path";class s extends F("MetadataInvalid"){}var k=()=>({model:null,effort:null,title:null}),b=t.check(_t(Tm)),T=(e,n=null)=>e===void 0||e===null||e.trim()===""?null:{value:e,claim:"last-recorded",turnId:n},h=(e)=>{try{return JSON.parse(e)}catch{throw new s({reason:"malformed"})}},A=(e)=>{let n=$r(e);return(r)=>{let a=n(r);if(a._tag==="Failure")throw new s({reason:"malformed"});return a.success}},V=(e,n,r)=>{let a=new Map(e.storage.entries.map((i)=>[i.name,i.value])),l=a.get(n),o=a.get("HOME"),d=l??(o===void 0?void 0:p(o,r));return d!==void 0&&y(d)?d:null};function R(e,n,r,a,l="transcript",o=!1){if(e===null||n===void 0)return{kind:"unreadable",reason:"source-location-unavailable",source:l,fields:a};return o?{kind:"file",root:e,path:n,fold:r,computed:o,source:l,fields:a}:{kind:"file",root:e,path:n,fold:r,source:l,fields:a}}var H=()=>({said:[],requests:new Map,compacted:null}),u=(e)=>{let n=e===void 0?Number.NaN:Date.parse(e);return Number.isNaN(n)?null:n};function c(e){if(typeof e==="string")return[e];if(!Array.isArray(e))return[];return e.flatMap((n)=>{if(typeof n!=="object"||n===null)return[];let r=n;return(r.type==="text"||r.type==="input_text")&&typeof r.text==="string"?[r.text]:[]})}function N(e,n){let r=c(e);if(r.join(`
3
+ `).trim()==="")return null;let a=r.filter((l)=>{let o=l.trim();return o!==""&&!o.startsWith("<")&&!o.startsWith("# AGENTS.md")});return{texts:r,typed:a,at:u(n)}}var g=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)?e:null,_=(e)=>typeof e==="string"?e:null,m=(e)=>Array.isArray(e)?e.flatMap((n)=>{let r=g(n);return r===null?[]:[r]}):[],j=(e)=>typeof e==="string"?e:m(e).flatMap((n)=>n.type==="text"&&typeof n.text==="string"?[n.text]:[]).join(`
4
+ `),W=(e)=>({_tag:"Completed",message:e.trim()===""?null:e}),C=(e)=>typeof e==="string"?u(e):null;export{s as MetadataInvalid,W as answered,m as blocksOf,k as emptyValues,g as fieldsOf,R as fileSource,C as isoStamp,h as jsonValue,A as metadataDecode,b as metadataText,T as recordedValue,u as stampMillis,V as storageHome,j as textBlocks,_ as textOf,N as transcriptSaid,H as unsaid,c as userTexts};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./plugin-h66k1zhn.js";import"./plugin-nqmb78ez.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-zz7yc97m.js";import"./plugin-je5cfnqn.js";import"./plugin-7y7ndrk9.js";import"./plugin-ay29ch70.js";import"./plugin-3whwpedj.js";import"./plugin-72xxqm1t.js";import"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import"./plugin-zw3ywa4b.js";import"./plugin-a4ng6krf.js";import"./plugin-q1n5kwx0.js";import"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import"./plugin-3pfrkxg1.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import"./plugin-ba1sv0th.js";import"./plugin-sfdxgkds.js";import"./plugin-fhc5q7r3.js";import{Rs,as}from"./plugin-q7rk75bs.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-9gha9fx3.js";import{ef,$g,um}from"./plugin-gh857xdd.js";import{Hn}from"./plugin-zvyk8bnr.js";import{Ng}from"./plugin-mqr325kz.js";import{Is}from"./plugin-d6hbav22.js";import{Yn}from"./plugin-jjm52353.js";import"./plugin-kc4z9msd.js";import{r}from"./plugin-6xpcmvm3.js";var t=32000,i=(o)=>`muse-build/${o.client.name}`;function s(o){let e=o.rung==="none"?void 0:Yn(o.rung);return Rs({store:!1,reasoningEffort:e,reasoningSummary:e!==void 0&&o.reasoningOutput?"auto":void 0,promptCacheKey:o.cacheGroup,parallelToolCalls:o.parallelToolCalls})}var n={fromHeaders:()=>null,read:Is},u=(o)=>({output:{budget:t,sent:!0},model:(e)=>r(as.with({provider:ef,quota:n.fromHeaders,endpoint:{baseURL:$g},limits:{output:t},auth:Hn(e.credentials,e.ownerId,ef,e.account).bearer(),headers:{"user-agent":i(o)}}).model({id:e.model,compatibility:{toolSchema:Ng}})),options:s}),g=(o)=>({...um,profile:u(o),quota:n});export{t as MUSE_OUTPUT_RESERVATION,g as museConsoleRegistration,s as museOptions,i as museUserAgent};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ef,$g,mw,hw,um,U_}from"./plugin-gh857xdd.js";import"./plugin-9gha9fx3.js";export{mw as DEFAULT_MUSE_MODEL,$g as MUSE_API_BASE_URL,ef as MUSE_PROVIDER,hw as MUSE_SPECS,um as museConsoleDescription,U_ as museVendor};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ng}from"./plugin-mqr325kz.js";import"./plugin-kc4z9msd.js";import"./plugin-me00x60n.js";export{Ng as museToolSchema};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$s,oy}from"./plugin-3whwpedj.js";import"./plugin-h66k1zhn.js";export{$s as noted,oy as sent};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ function f(n,e){let r={};for(let t of Object.keys(n)){let o=n[t];if(e(o,t))r[t]=o}return r}function s(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function d(n){return typeof n==="string"?n:void 0}function c(n){return typeof n==="string"&&n.trim().length>0?n.trim():void 0}function p(n){return typeof n==="number"&&Number.isFinite(n)?n:void 0}function y(n){let e=typeof n==="number"?n:typeof n==="string"?Number(n):Number.NaN;return Number.isSafeInteger(e)&&e>=0?e:void 0}function b(n){let e=typeof n==="number"?n:typeof n==="string"?Number(n):Number.NaN;return Number.isSafeInteger(e)&&e>0?e:void 0}function m(n){return typeof n==="boolean"?n:void 0}var i=(n)=>n===void 0||typeof n==="function"||typeof n==="symbol";function u(n){if(n===null||typeof n!=="object")return JSON.stringify(n);if(Array.isArray(n))return`[${Array.from(n,(e)=>i(e)?"null":u(e)).join(",")}]`;return`{${Object.entries(n).filter(([,e])=>!i(e)).sort(([e],[r])=>e<r?-1:e>r?1:0).map(([e,r])=>`${JSON.stringify(e)}:${u(r)}`).join(",")}}`}export{m as booleanValue,u as canonicalJson,p as finiteNumber,s as isRecord,y as nonNegativeInteger,f as pick,b as positiveInteger,d as stringValue,c as textValue};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ function e(n){let o=process.platform,r=o==="darwin"?"open":o==="win32"?"cmd":"xdg-open",t=o==="win32"?["/c","start","",n]:[n];try{Bun.spawn([r,...t],{stdout:"ignore",stderr:"ignore"})}catch(s){console.warn("[oauth] failed to launch system browser:",s)}}export{e as openBrowserDefault};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./plugin-h66k1zhn.js";import"./plugin-nqmb78ez.js";import{N}from"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-zz7yc97m.js";import{Pt}from"./plugin-je5cfnqn.js";import{rn,Zl,de}from"./plugin-7y7ndrk9.js";import{Cf,Co}from"./plugin-ay29ch70.js";import"./plugin-3whwpedj.js";import"./plugin-72xxqm1t.js";import{Ia}from"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import{pc,Ps,ls}from"./plugin-zw3ywa4b.js";import"./plugin-a4ng6krf.js";import"./plugin-q1n5kwx0.js";import"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import{Io}from"./plugin-3pfrkxg1.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import"./plugin-ba1sv0th.js";import"./plugin-sfdxgkds.js";import"./plugin-fhc5q7r3.js";import{Rs,Fg,as}from"./plugin-q7rk75bs.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-ff9hx5a4.js";import"./plugin-9gha9fx3.js";import{rf,ac,lm,of,zg}from"./plugin-q1sqj2tc.js";import{pu}from"./plugin-jxvmq18y.js";import{tf}from"./plugin-ff38dxy1.js";import{Dg}from"./plugin-zxe49p72.js";import{Lg}from"./plugin-285exjxd.js";import{Hn,mm,hf}from"./plugin-zvyk8bnr.js";import{Is,Al}from"./plugin-d6hbav22.js";import{Yn}from"./plugin-jjm52353.js";import"./plugin-kc4z9msd.js";import{rl,wh,aa,Es,ei,r,d,y,f,c,s,i,kn,at,Wc,Vc,ee,po,pt,ew,WS,n,ce,t,S,o,ge,x,gt,ye,Kn}from"./plugin-6xpcmvm3.js";import{arch as oe,platform as ie,release as se}from"os";var ae=`${ie()} ${se()}; ${oe()}`;function T(e){return`${e.client.name}/${e.client.version} (${ae})`}function U(e,a){return{originator:e.client.name,"User-Agent":T(e),"session-id":a}}var ue=new TextEncoder,W=new TextDecoder,H=(e,a)=>a<e.length&&((e[a]??0)&192)===128,le=(e,a)=>{let u=Math.min(a,e.length);while(u>0&&H(e,u))u-=1;return u},pe=(e,a)=>{let u=Math.max(a,0);while(u<e.length&&H(e,u))u+=1;return u},Q=(e)=>Math.ceil(e/4),me=(e,a)=>{let u=a*4,l=Math.floor(u/2),p=e.subarray(0,le(e,l)),m=e.subarray(pe(e,e.length-(u-l)));return`${W.decode(p)}\u2026${Q(e.length-u)} tokens truncated\u2026${W.decode(m)}`},v=(e)=>e.content.flatMap((a)=>a.type==="text"&&a.deferredTools===void 0?[a.text]:[]),D=(e)=>e.role==="user"&&v(e).length>0,F=(e)=>{let a=e.findLastIndex(D);if(a<0)return[];let u=e.findLastIndex((p,m)=>m<a&&D(p)),l=1000;return e.slice(u<0?a:u,a+1).flatMap((p)=>{if(p.role==="user"){let h=v(p);return h.length===0?[]:[{type:"message",role:"user",content:h.map((w)=>({type:"input_text",text:w}))}]}if(p.role!=="assistant")return[];let m=v(p).flatMap((h)=>{if(l===0)return[];let w=ue.encode(h),g=Q(w.length);if(g<=l)return l-=g,[{type:"output_text",text:h}];let b=me(w,l);return l=0,[{type:"output_text",text:b}]});return m.length===0?[]:[{type:"message",role:"assistant",content:m}]})};var he=new Set(["search_query","image_query","finance","weather","sports","time","response_length"]),we=["search_query","image_query"],be=["open","click","find","screenshot"],_e=o({output:t}),xe=pt(Kn(_e)),Ie=(e)=>!N(e)||Object.keys(e).some((a)=>!he.has(a)),G=(e,a,u)=>N(e)?a.flatMap((l)=>{let p=e[l];return Array.isArray(p)?p.flatMap((m)=>N(m)&&typeof m[u]==="string"?[m[u]]:[]):[]}):[],Ae=(e)=>URL.canParse(e)&&/^https?:$/.test(new URL(e).protocol),ke=(e)=>({queries:G(e,we,"q"),pages:[...new Set(G(e,be,"ref_id").filter(Ae))]}),Se=(e)=>Array.isArray(e)?"array":e===null?"null":Number.isInteger(e)?"integer":typeof e,P=(e,a,u)=>{if(!N(e))return;let l=e.type,p=Se(a);if(typeof l==="string"&&l!==p&&!(l==="number"&&p==="integer"))return`${u} must be ${l}, not ${p}`;if(Array.isArray(e.enum)&&!e.enum.includes(a))return`${u} must be one of ${e.enum.join(", ")}`;if(Array.isArray(a)){for(let[g,b]of a.entries()){let _=P(e.items,b,`${u}[${g}]`);if(_!==void 0)return _}return}if(!N(a))return;let h=(Array.isArray(e.required)?e.required:[]).find((g)=>typeof g==="string"&&!(g in a));if(h!==void 0)return`${u}.${h} is required`;let w=N(e.properties)?e.properties:{};for(let[g,b]of Object.entries(a)){let _=P(w[g],b,`${u}.${g}`);if(_!==void 0)return _}return},Te=(e)=>ge(t,ce).check(ye((a)=>P(e.parameters,a,"input")??!0)),ve=(e)=>e.text.pipe(s(xe),at((a)=>new tf({reason:`The search answer could not be read: ${a.message}`})),s(({output:a})=>a.trim()===""?c(new tf({reason:"The search answered with no output."})):r(a))),Pe=ee("codexWeb.search")(function*(e,a,u,l){let p=yield*Io,m=F(l.messages),h=JSON.stringify({id:yield*a.session,model:a.model,input:m.length===0?void 0:m,commands:u,settings:e.settings,max_output_tokens:e.maxOutputTokens}),w=f(function*(){let b=yield*Co(a.auth)({method:"POST",url:a.url,body:h,headers:Pt({"Content-Type":"application/json",Accept:"application/json"})});return yield*Vc((_)=>s(p.execute(Ia({url:a.url,body:h,headers:b}),_),ve))}),g=rl(1).pipe(aa(({input:b})=>r(b._tag==="LLM.Error"&&b.status===401&&a.recover!==void 0)),wh(()=>a.recover??y));return yield*Wc(w,g)}),B=(e)=>{let a={vendor:{name:e.name,namespace:e.namespace},description:e.description,inputSchema:e.parameters},u=Te(e);return(l)=>({tools:{websearch:{wire:a,input:u,reads:Ie,targets:ke,run:(m,h)=>Pe(e,l,m,h)}}})};var I={client:"codex-cli 0.162.0",models:["gpt-6.1-sol","gpt-6-astra","gpt-6-sol","gpt-6-luna","gpt-reserve","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","codex-auto-review"],path:"/alpha/search",namespace:{name:"web",description:"Tools in the web namespace."},name:"run",description:'Tool for accessing the internet.\n\n\n---\n\n## Examples of different commands available in this tool\n\nExamples of different commands available in this tool:\n* `search_query`: {"search_query": [{"q": "What is the capital of France?"}, {"q": "What is the capital of belgium?"}]}. Searches the internet for a given query (and optionally with a domain or recency filter)\n* `image_query`: {"image_query":[{"q": "waterfalls"}]}.\n* `open`: {"open": [{"ref_id": "turn0search0"}, {"ref_id": "https://www.openai.com", "lineno": 120}]}\n* `click`: {"click": [{"ref_id": "turn0fetch3", "id": 17}]}\n* `find`: {"find": [{"ref_id": "turn0fetch3", "pattern": "Annie Case"}]}\n* `screenshot`: {"screenshot": [{"ref_id": "turn1view0", "pageno": 0}, {"ref_id": "turn1view0", "pageno": 3}]}\n* `finance`: {"finance":[{"ticker":"AMD","type":"equity","market":"USA"}]}, {"finance":[{"ticker":"BTC","type":"crypto","market":""}]}\n* `weather`: {"weather":[{"location":"San Francisco, CA"}]}\n* `sports`: {"sports":[{"fn":"standings","league":"nfl"}, {"fn":"schedule","league":"nba","team":"GSW","date_from":"2025-02-24"}]}\n* `time`: {"time":[{"utc_offset":"+03:00"}]}\n\n---\n\n## Usage hints\nTo use this tool efficiently:\n* Use multiple commands and queries in one call to get more results faster; e.g. {"search_query": [{"q": "bitcoin news"}], "finance":[{"ticker":"BTC","type":"crypto","market":""}], "find": [{"ref_id": "turn0search0", "pattern": "Annie Case"}, {"ref_id": "turn0search1", "pattern": "John Smith"}]}\n* Use "response_length" to control the number of results returned by this tool, omit it if you intend to pass "short" in\n* Only write required parameters; do not write empty lists or nulls where they could be omitted.\n* `search_query` must have length at most 4 in each call. If it has length > 3, response_length must be medium or long\n* If you find yourself in a situation where you accidentally call the `web.run` tool, it\'s best just to send an empty query: {"search_query": [{"q": ""}]}.\n\n---\n\n## Decision boundary\n\nIf the user makes an explicit request to search the internet, find latest information, look up, etc (or to not do so), you must obey their request.\nWhen you make an assumption, always consider whether it is temporally stable; i.e. whether there\'s even a small (>10%) chance it has changed. If it is unstable, you must verify with browsing the internet for verification.\n\n<situations_where_you_must_browse_the_internet>\nBelow is a list of scenarios where browsing the internet MUST be used. PAY CLOSE ATTENTION: you MUST browse the internet in these cases. If you\'re unsure or on the fence, you MUST bias towards browsing the internet.\n- The information could have changed recently: for example news; prices; laws; schedules; product specs; sports scores; economic indicators; political/public/company figures (e.g. the question relates to \'the president of country A\' or \'the CEO of company B\', which might change over time); rules; regulations; standards; software libraries that could be updated; exchange rates; recommendations (i.e., recommendations about various topics or things might be informed by what currently exists / is popular / is safe / is unsafe / is in the zeitgeist / etc.); and many many many more categories -- again, if you\'re on the fence, you MUST browse the internet!\n - For news queries, prioritize more recent events, ensuring you compare publish dates and the date that the event happened.\n- The user is seeking recommendations that could lead them to spend substantial time or money -- researching products, restaurants, travel plans, etc.\n- The user wants (or would benefit from) direct quotes, links, or precise source attribution.\n- A specific page, paper, dataset, PDF, or site is referenced and you haven\'t been given its contents.\n- You\'re unsure about a fact, the topic is niche or emerging, or you suspect there\'s at least a 10% chance you will incorrectly recall it\n- High-stakes accuracy matters (medical, legal, financial guidance). For these you generally should search by default because this information is highly temporally unstable\n- The user explicitly says to search, browse, verify, or look it up.\n</situations_where_you_must_browse_the_internet>\n\n---\n\n## Citations\n\nResults from `web.run` include internal reference IDs such as `turn2search5`. Use\nthose reference IDs only in calls to `web.run`; do not expose them in the final\nresponse.\n\nCite sources in the final response using Markdown links:\n\n- Cite a single source as `[descriptive source title](https://example.com/page)`.\n- Cite multiple sources with separate Markdown links, for example\n `[first source](https://example.com/one), [second source](https://example.com/two)`.\n- Link directly to the page that supports the claim. Do not link to search result\n pages or use bare URLs.\n\nFormatting of citations:\n\n- Place each citation as near as possible to the claim it supports, normally at\n the end of the sentence or paragraph and after punctuation.\n- Do not place citations inside code fences.\n- Do not put citations on a line by themselves or collect all citations at the\n end of the response.\n\nIf you browse the internet, cite statements supported by web sources. Each cited\nsource must directly support the associated claim. Prefer primary and\nauthoritative sources, and use sources from different domains when the response\nbenefits from multiple perspectives.\n\n---\n\n## Special cases\nIf these conflict with any other instructions, these should take precedence.\n\n<special_cases>\n- When the user asks for information about how to use OpenAI products, (ChatGPT, the OpenAI API, etc.), you should check the code in local env and only browse as fallback, when you browse restrict your sources to official OpenAI websites using the domains filter, unless otherwise requested.\n- When using search to answer technical questions, you must only rely on primary sources (research papers, official documentation, etc.)\n- Clearly indicate when you are making an inference from sources.\n</special_cases>\n\n---\n\n## Word limits\nResponses may not excessively quote or draw on a specific source. There are several limits here:\n- **Limit on verbatim quotes:**\n - You may not quote more than 25 words verbatim from any single non-lyrical source, unless the source is reddit.\n - For song lyrics, verbatim quotes must be limited to at most 10 words.\n - Long quotes from reddit are allowed, as long as you indicate that those are direct quotes via a markdown blockquote starting with ">", copy verbatim, and link the source.\n- **Word limits:**\n - Each webpage source in the sources has a word limit label formatted like "[wordlim N]", in which N is the maximum number of words in the whole response that are attributed to that source. If omitted, the word limit is 200 words.\n - Non-contiguous words derived from a given source must be counted to the word limit.\n - The summarization limit N is a maximum for each source.\n - When using multiple sources, their summarization limits add together. However, each article used must be relevant to the response.\n- **Copyright compliance:**\n - You must avoid providing full articles, long verbatim passages, or extensive direct quotes due to copyright concerns.\n - If the user asked for a verbatim quote, the response should provide a short compliant excerpt and then answer with paraphrases and summaries.\n - Again, this limit does not apply to reddit content, as long as it\'s appropriately indicated that those are direct quotes and you link to the source.\n',parameters:{type:"object",properties:{click:{type:"array",description:"Open links from previously opened pages.",items:{type:"object",properties:{id:{type:"integer",description:"Numbered link id to open."},ref_id:{type:"string",description:"Reference id containing the numbered link."}},required:["id","ref_id"]}},finance:{type:"array",description:"Look up prices for the given stock symbols.",items:{type:"object",properties:{market:{type:"string",description:'ISO 3166-1 alpha-3 country code, "OTC", or "" for cryptocurrency.'},ticker:{type:"string",description:"Ticker symbol to look up."},type:{type:"string",description:"Asset type to look up.",enum:["equity","fund","crypto","index"]}},required:["ticker","type"]}},find:{type:"array",description:"Find text patterns in pages.",items:{type:"object",properties:{pattern:{type:"string",description:"Text pattern to find."},ref_id:{type:"string",description:"Reference id or URL to search within."}},required:["pattern","ref_id"]}},image_query:{type:"array",description:"Query the image search engine for a given list of queries.",items:{type:"object",properties:{domains:{type:"array",description:"Whether to filter by a specific list of domains.",items:{type:"string"}},q:{type:"string",description:"Search query."},recency:{type:"integer",description:"Whether to filter by recency, as a number of recent days."}},required:["q"]}},open:{type:"array",description:"Open pages by reference id or URL.",items:{type:"object",properties:{lineno:{type:"integer",description:"Line number to position the page at."},ref_id:{type:"string",description:"Reference id or URL to open."}},required:["ref_id"]}},response_length:{type:"string",description:"Set the length of the response to be returned.",enum:["short","medium","long"]},screenshot:{type:"array",description:"Take screenshots of PDF pages.",items:{type:"object",properties:{pageno:{type:"integer",description:"Zero-indexed PDF page number."},ref_id:{type:"string",description:"Reference id or URL to screenshot."}},required:["pageno","ref_id"]}},search_query:{type:"array",description:"Query the internet search engine for a given list of queries.",items:{type:"object",properties:{domains:{type:"array",description:"Whether to filter by a specific list of domains.",items:{type:"string"}},q:{type:"string",description:"Search query."},recency:{type:"integer",description:"Whether to filter by recency, as a number of recent days."}},required:["q"]}},sports:{type:"array",description:"Look up sports schedules and standings.",items:{type:"object",properties:{date_from:{type:"string",description:"Start date in YYYY-MM-DD format."},date_to:{type:"string",description:"End date in YYYY-MM-DD format."},fn:{type:"string",description:"Sports function to call.",enum:["schedule","standings"]},league:{type:"string",description:"League to look up.",enum:["nba","wnba","nfl","nhl","mlb","epl","ncaamb","ncaawb","ipl"]},locale:{type:"string",description:"Locale for the lookup."},num_games:{type:"integer",description:"Number of games to return."},opponent:{type:"string",description:"Opponent to use with `team` when narrowing the lookup."},team:{type:"string",description:"Team to look up, using the common 3 or 4 letter alias used in broadcasts."},tool:{type:"string",description:"Tool name for sports requests.",enum:["sports"]}},required:["fn","league"]}},time:{type:"array",description:"Get time for the given UTC offsets.",items:{type:"object",properties:{utc_offset:{type:"string",description:'UTC offset formatted like "+03:00".'}},required:["utc_offset"]}},weather:{type:"array",description:"Look up weather forecasts.",items:{type:"object",properties:{duration:{type:"integer",description:"Number of days to return. Defaults to 7."},location:{type:"string",description:'Location in "Country, Area, City" format.'},start:{type:"string",description:"Start date in YYYY-MM-DD format. Defaults to today."}},required:["location"]}}}},settings:{allowed_callers:["direct"],external_web_access:!0},maxOutputTokens:1e4};var Ee=o({error:o({resets_at:n(S)})}),qe=ew(Kn(Ee)),Re=(e)=>{let a=e.http?.body,u=a===void 0?void 0:qe(a);if(u!==void 0&&u._tag==="Some"&&u.value.error.resets_at!==void 0)return u.value.error.resets_at;let l=Number(e.http?.response?.headers["x-codex-primary-reset-at"]);return Number.isFinite(l)&&l>0?l:void 0},Me=(e)=>{if(e.reason._tag!=="QuotaExceeded"||e.reason.resetsAt!==void 0)return e;let a=Re(e.reason);return a===void 0?e:new de({...e,reason:new Zl({...e.reason,resetsAt:a})})},V=(e)=>ee("codexImages.generate")(function*(a,u,l){yield*Lg(a,l);let p=yield*Dg({baseURL:u.baseURL,auth:u.auth,recover:u.recover,fields:e.fields},l);return{images:p.images,requestId:p.requestId,headers:p.headers}},(a)=>at(a,Me));var K={client:"codex-cli 0.162.0",model:"gpt-image-2",fields:{quality:"auto",size:"auto"}};var q="https://chatgpt.com/backend-api/codex",R=32000,Ce="https://chatgpt.com/backend-api/wham/usage",z=o({used_percent:S,limit_window_seconds:n(S),reset_at:n(S)}),J=o({primary_window:n(gt(z)),secondary_window:n(gt(z))}),Oe=o({plan_type:t,rate_limit:J,additional_rate_limits:n(gt(x(o({limit_name:t,rate_limit:n(gt(J))})))),rate_limit_reset_credits:n(gt(o({available_count:S})))}),M=(e,a)=>{let u=e[a];return u===void 0||u.trim()===""?void 0:u.trim()},E=(e,a)=>{let u=M(e,a);if(u===void 0)return null;let l=Number(u);return Number.isFinite(l)?l:null},X=(e)=>e.toLowerCase().replace(/[^a-z0-9]/g,"").includes("codexspark"),Le=10080,Ue=40320,We=(e,a)=>{if(e==="bucket")return"bucket";if(a===void 0)return e==="primary"?"session":"weekly";if(a>=Ue)return"monthly";return a>=Le?"weekly":"session"},Z=(e,a,u)=>a.windowMinutes===0?null:new pc({kind:We(e,a.windowMinutes),label:u,usedPercent:a.usedPercent,windowMinutes:a.windowMinutes,resetsAt:a.resetsAt}),A=(e,a,u,l)=>{let p=E(e,`${a}-used-percent`);if(p===null)return null;return Z(u,{usedPercent:p,windowMinutes:E(e,`${a}-window-minutes`)??void 0,resetsAt:E(e,`${a}-reset-at`)??void 0},l)},C=(e,a)=>{let u=[],l=A(e,"x-codex-primary","primary"),p=A(e,"x-codex-secondary","secondary");if(l!==null)u.push(l);if(p!==null)u.push(p);for(let m of Object.keys(e)){let h=/^x-(.+)-primary-used-percent$/.exec(m);if(h===null||h[1]==="codex")continue;let w=h[1],g=w.trim().toLowerCase().replaceAll("-","_"),b=`x-${w}-primary`,_=M(e,`x-${w}-limit-name`)??g;if(X(_))continue;let L=A(e,b,"bucket",_);if(L!==null)u.push(L)}if(u.length===0)return null;return new Ps({observedAt:a,source:"reply",windows:u})},Ne=(e,a,u)=>Z(a,{usedPercent:Math.min(100,Math.max(0,e.used_percent)),windowMinutes:e.limit_window_seconds===void 0?void 0:e.limit_window_seconds/60,resetsAt:e.reset_at},u),$e=(e,a)=>pt(Oe)(e).pipe(at((u)=>new ls({message:`The OpenAI usage answer did not match its schema: ${u.message}`})),s((u)=>{let l=[],p=(m,h,w)=>{let g=m===void 0||m===null?null:Ne(m,h,w);if(g!==null)l.push(g)};p(u.rate_limit.primary_window,"primary"),p(u.rate_limit.secondary_window,"secondary");for(let m of u.additional_rate_limits??[]){if(X(m.limit_name))continue;p(m.rate_limit?.primary_window,"bucket",m.limit_name)}return l.length===0?c(new ls({message:"The OpenAI usage answer carried no quota windows."})):r(new Ps({observedAt:a,source:"usage",windows:l,plan:u.plan_type,resetCredits:u.rate_limit_reset_credits?.available_count}))})),De=(e)=>({fromHeaders:C,read:(a,u,l)=>Al({url:Ce,auth:Xe({credentials:a,ownerId:u,account:l},e),headers:{Accept:"application/json"}}).pipe(s((p)=>$e(p.body,p.observedAt)))}),te={fromHeaders:C,read:Is};function ne(e){let a=Yn(e.rung);return Rs({store:!1,reasoningEffort:a,reasoningSummary:a!==void 0&&e.reasoningOutput?"auto":void 0,promptCacheKey:e.cacheGroup,parallelToolCalls:e.parallelToolCalls,serviceTier:e.switches.serviceTier==="priority"?"priority":void 0})}var He={output:{budget:R,sent:!0},model:(e)=>r(ze(e)),options:ne},k=({credentials:e,ownerId:a,account:u})=>{let l=e.recoverAccessToken;return{recover:l===void 0?void 0:hf("OpenAI credential recovery",()=>l.call(e,a,ac,u)).pipe(kn)}},Qe=B(I),Fe=(e,a)=>{if(!I.models.includes(e.model))return;return d(()=>{let u={...e,cacheGroup:e.cacheGroup||void 0};return Qe({url:`${q}${I.path}`,auth:O(u,a),recover:k(u).recover,session:ei(()=>pu(u.cacheGroup)),model:u.model})})},Ge="images",je=(e,a)=>{if(M(e,"x-codex-active-limit")===void 0)return null;let u=A(e,"x-codex-primary","bucket",Ge);return u===null?null:new Ps({observedAt:a,source:"reply",windows:[u]})},Ye=V(K),Be=(e)=>({generate:(a,u)=>{let l=of.imageModels?.[u.model];if(l===void 0)return c(Ve(u.model));return Ye(l,{baseURL:q,auth:O(a,e),recover:k(a).recover},u)},quota:je}),Ve=(e)=>new de({module:"Images",method:"generate",reason:new rn({message:`${e} is not an image model ChatGPT serves.`})}),Ke=(e)=>({web:(a)=>Fe(a,e),retry:k,output:{budget:R,sent:!1},model:(a)=>r(et(a,e)),options:ne});function ze(e){return as.with({provider:rf,quota:te.fromHeaders,limits:{output:R},auth:Hn(e.credentials,e.ownerId,rf,e.account).bearer()}).model({id:e.model})}var Je=WS(zg);async function re(e){return(await Je(await e.credentials.credential(e.ownerId,ac,e.account))).accountId}function O(e,a){return mm(e.credentials,e.ownerId,ac,e.account).bearer().andThen(Cf((u)=>Es({accountId:hf("ChatGPT account id",()=>re(e)),sessionId:ei(()=>pu(e.cacheGroup))}).pipe(i(({accountId:l,sessionId:p})=>po(u.headers,{...U(a,p),...l?{"ChatGPT-Account-Id":l}:{}})))))}function Xe(e,a){return mm(e.credentials,e.ownerId,ac,e.account).bearer().andThen(Cf((u)=>hf("ChatGPT account id",()=>re(e)).pipe(i((l)=>po(u.headers,{"User-Agent":T(a),...l?{"ChatGPT-Account-Id":l}:{}})))))}function Ze(e){return Cf((a)=>{let u=a.request?Fg(a.request):void 0,l=`model=${e}${u?`;tier=${u}`:""}`;return r(po(a.headers,{"x-codex-routing-hint":l}))})}function et(e,a){return as.with({provider:ac,quota:C,endpoint:{baseURL:q},auth:O(e,a).andThen(Ze(e.model)),retry:k(e)}).model({id:e.model})}var tt={...lm,profile:He,quota:te},nt=(e)=>({...of,profile:Ke(e),quota:De(e),images:Be(e)}),Qt=(e)=>[nt(e),tt];export{q as OPENAI_CHATGPT_BASE_URL,R as OPENAI_OUTPUT_RESERVATION,O as chatgptIdentity,tt as openaiConsoleRegistration,De as openaiQuota,Qt as openaiRegistrations,nt as openaiSubscriptionRegistration};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{rf,ac,Aw,mu,OE,lm,Mw,of,Ug,Ow,zg,j_}from"./plugin-q1sqj2tc.js";import"./plugin-ff9hx5a4.js";import"./plugin-9gha9fx3.js";import"./plugin-h66k1zhn.js";export{Aw as CODEX_PROVIDER,Ug as DEFAULT_CODEX_MODEL,mu as DEFAULT_OPENAI_MODEL,OE as DEFAULT_OPENAI_OAUTH_MODEL,Mw as OPENAI_IMAGE_MODEL,ac as OPENAI_OAUTH_PROVIDER,rf as OPENAI_PROVIDER,zg as OpenAISubscriptionCredential,Ow as codexDescription,lm as openaiConsoleDescription,of as openaiSubscriptionDescription,j_ as openaiVendor};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ea,tk,va}from"./plugin-yxgg03s0.js";import"./plugin-fhc5q7r3.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-ba1sv0th.js";import"./plugin-kc4z9msd.js";import"./plugin-1x94cj6e.js";import"./plugin-60bdzk1r.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-q1n5kwx0.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Ea as options,tk as protocol,va as route};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{yw,xw,Sw,Dg}from"./plugin-zxe49p72.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{xw as EDITS,yw as GENERATIONS,Dg as generateImages,Sw as imagesBody};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{nf,Ew,vw,Rs,Fg,ww,kw,_w,Tw,Rw,ME,Iw,as,Cw,H_}from"./plugin-q7rk75bs.js";import"./plugin-fhc5q7r3.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-ba1sv0th.js";import"./plugin-kc4z9msd.js";import"./plugin-sfdxgkds.js";import"./plugin-1x94cj6e.js";import"./plugin-60bdzk1r.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-q1n5kwx0.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{nf as ADAPTER,Ew as DEFAULT_BASE_URL,Rw as OpenAIResponsesEvent,ww as OpenAIResponsesInputItem,Tw as OpenAIResponsesStreamItem,kw as OpenAIResponsesTool,_w as OpenAIResponsesUsage,vw as PATH,Iw as httpTransport,Rs as options,ME as protocol,as as route,Fg as serviceTier,H_ as webSocketRoute,Cw as webSocketTransport};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import"./plugin-h66k1zhn.js";import"./plugin-nqmb78ez.js";import{N}from"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-zz7yc97m.js";import"./plugin-je5cfnqn.js";import{rn,de}from"./plugin-7y7ndrk9.js";import{Fr,bu}from"./plugin-ay29ch70.js";import"./plugin-3whwpedj.js";import"./plugin-72xxqm1t.js";import{Dr,jn,ds,Ta,Ls,mi,Ds,cy,fs,Ra,ps,Us,Xr,lr}from"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import{pc,Ps,ls}from"./plugin-zw3ywa4b.js";import{ln,we}from"./plugin-a4ng6krf.js";import{Lr}from"./plugin-q1n5kwx0.js";import{Zo,Ns}from"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import{qi}from"./plugin-3pfrkxg1.js";import{Ms}from"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import{To}from"./plugin-ba1sv0th.js";import{Il,Cl}from"./plugin-njh1f7b2.js";import{Cs,nn,Vo,cs,yr,Pl,As}from"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-fhc5q7r3.js";import{Ea,va}from"./plugin-yxgg03s0.js";import"./plugin-sfdxgkds.js";import{Rs,as}from"./plugin-q7rk75bs.js";import{sf,dm}from"./plugin-p59gy5xd.js";import{pu}from"./plugin-jxvmq18y.js";import{Hn}from"./plugin-zvyk8bnr.js";import{Al}from"./plugin-d6hbav22.js";import{Yn,Ml}from"./plugin-jjm52353.js";import{Ro}from"./plugin-kc4z9msd.js";import{ei,r,c,s,i,at,ee,ml,pt,n,ce,t,S,z,o,x,O,W}from"./plugin-6xpcmvm3.js";var Q=["type","properties","items","prefixItems","enum","const","$ref","additionalProperties","patternProperties","required","not","if","then","else"],C=(e)=>N(e)&&(Array.isArray(e.anyOf)||Array.isArray(e.oneOf)||Array.isArray(e.allOf)),K=(e)=>N(e)&&(C(e)||Q.some((a)=>(a in e))),k=(e)=>{if(!N(e))return Array.isArray(e)?e.map(k):e;let a=Object.fromEntries(Object.entries(e).map(([d,u])=>[d,d==="enum"&&Array.isArray(u)?u.map(String):k(u)]));if(Array.isArray(a.enum)&&(a.type==="integer"||a.type==="number"))a.type="string";let l=a.properties;if(a.type==="object"&&N(l)&&Array.isArray(a.required))a.required=a.required.filter((d)=>typeof d==="string"&&(d in l));if(a.type==="array"&&!C(a)){if(a.items=a.items??{},N(a.items)&&!K(a.items))a.items={...a.items,type:"string"}}if(typeof a.type==="string"&&a.type!=="object"&&!C(a))delete a.properties,delete a.required;return a},Y=(e)=>e.type==="object"&&(!N(e.properties)||Object.keys(e.properties).length===0)&&!e.additionalProperties&&!C(e),R=(e)=>{if(!Array.isArray(e.allOf))return e;let{allOf:a,...l}=e,d=[...a.filter(N).map(R),l],u=Object.assign({},...d.map((m)=>N(m.properties)?m.properties:{})),p=[...new Set(d.flatMap((m)=>Array.isArray(m.required)?m.required:[]))];return{...Object.assign({},...d),properties:Object.keys(u).length===0?void 0:u,required:p.length===0?void 0:p}},T=(e)=>{if(!N(e))return;let a=R(e);if(Y(a))return;let l=Array.isArray(a.anyOf)?a.anyOf:Array.isArray(a.oneOf)?a.oneOf:void 0;return Object.fromEntries([["description",a.description],["required",a.required],["format",a.format],["type",Array.isArray(a.type)?a.type.filter((d)=>d!=="null")[0]:a.type],["nullable",Array.isArray(a.type)&&a.type.includes("null")?!0:void 0],["enum",a.const!==void 0?[a.const]:a.enum],["properties",N(a.properties)?Object.fromEntries(Object.entries(a.properties).map(([d,u])=>[d,T(u)])):void 0],["items",Array.isArray(a.items)?a.items.map(T):a.items===void 0?void 0:T(a.items)],["anyOf",l?.map(T)],["minLength",a.minLength]].filter((d)=>d[1]!==void 0))},P=(e)=>T(k(e));var L="gemini",v=new Set(cy),te="https://generativelanguage.googleapis.com/v1beta",ne=o({text:t,thought:n(z),thoughtSignature:n(t)}),b=o({inlineData:o({mimeType:t,data:t})}),oe=o({functionCall:o({id:n(t),name:t,args:ce}),thoughtSignature:n(t)}),ie=o({functionResponse:o({id:n(t),name:t,response:ce,parts:jn(b)})}),re=O([ne,b,oe,ie]),I=o({role:W(["user","model"]),parts:x(re)}),se=o({parts:x(o({text:t}))}),ae=o({name:t,description:t,parameters:n(Dr)}),le=o({functionDeclarations:x(ae)}),ue=o({functionCallingConfig:o({mode:W(["AUTO","NONE","ANY"]),allowedFunctionNames:jn(t)})}),w=W(["minimal","low","medium","high"]),pe=ml(w),me=o({thinkingLevel:n(w),thinkingBudget:n(S),includeThoughts:n(z)}),ge=o({maxOutputTokens:n(S),temperature:n(S),topP:n(S),topK:n(S),stopSequences:jn(t),thinkingConfig:n(me)}),fe={contents:x(I),systemInstruction:n(se),tools:jn(le),toolConfig:n(ue),generationConfig:n(ge)},he=o(fe),ye=o({cachedContentTokenCount:n(S),thoughtsTokenCount:n(S),promptTokenCount:n(S),toolUsePromptTokenCount:n(S),candidatesTokenCount:n(S),totalTokenCount:n(S)}),Se=o({content:n(I),finishReason:n(t)}),Te=o({code:n(S),message:n(t),status:n(t)}),Ce=o({candidates:jn(Se),promptFeedback:n(o({blockReason:n(t)})),usageMetadata:n(ye),error:n(Te)}),ke=(e,a)=>({name:e.name,description:e.description,parameters:P(a)}),Ae=(e)=>Us("Gemini",e,{auto:()=>({functionCallingConfig:{mode:"AUTO"}}),none:()=>({functionCallingConfig:{mode:"NONE"}}),required:()=>({functionCallingConfig:{mode:"ANY"}}),tool:(a)=>({functionCallingConfig:{mode:"ANY",allowedFunctionNames:[a]}})}),Ee=ee("Gemini.lowerUserPart")(function*(e){if(e.type==="text")return{text:e.text};let a=yield*fs("Gemini",e,v);return{inlineData:{mimeType:a.mime,data:a.base64}}}),y=(e)=>({google:e}),A=(e)=>{let a=e?.google;return N(a)&&typeof a.thoughtSignature==="string"?a.thoughtSignature:void 0},Ge=(e)=>({functionCall:{id:e.id,name:e.name,args:e.input},thoughtSignature:A(e.providerMetadata)}),Re=ee("Gemini.lowerMessages")(function*(e){let a=[];for(let l of e.messages){if(l.role==="system"){let u=yield*Ds("Gemini",l),p=a.at(-1);if(p?.role==="user"&&!p.parts.some((m)=>("functionResponse"in m)))a[a.length-1]={role:"user",parts:[...p.parts,{text:u.text}]};else a.push({role:"user",parts:[{text:u.text}]});continue}if(l.role==="user"){let u=[];for(let p of l.content){if(!Xr(p,["text","media"]))return yield*lr("Gemini","user",["text","media"]);u.push(yield*Ee(p))}a.push({role:"user",parts:u});continue}if(l.role==="assistant"){let u=[];for(let p of l.content){if(!Xr(p,["text","reasoning","tool-call"]))return yield*lr("Gemini","assistant",["text","reasoning","tool-call"]);if(p.type==="text"){u.push({text:p.text,thoughtSignature:A(p.providerMetadata)});continue}if(p.type==="reasoning"){u.push({text:p.text,thought:!0,thoughtSignature:A(p.providerMetadata)});continue}if(p.type==="tool-call")u.push(Ge(p))}a.push({role:"model",parts:u});continue}let d=[];for(let u of l.content){if(!Xr(u,["tool-result"]))return yield*lr("Gemini","tool",["tool-result"]);if(u.result.type!=="content"){d.push({functionResponse:{id:u.id,name:u.name,response:{name:u.name,content:ps(u)}}});continue}let p=u.result.value,m=p.filter((h)=>h.type==="text").map((h)=>h.text),f=[];for(let h of p){if(h.type==="text")continue;let g=yield*Ra("Gemini",h,v);f.push({inlineData:{mimeType:g.mime,data:g.base64}})}d.push({functionResponse:{id:u.id,name:u.name,response:{name:u.name,content:m.join(`
3
+ `)},parts:f.length===0?void 0:f}})}a.push({role:"user",parts:d})}return a}),Oe=(e)=>e.providerOptions?.gemini,Pe=(e)=>{let a=Oe(e)?.thinkingConfig;if(!N(a))return;let l={thinkingLevel:pe(a.thinkingLevel)?a.thinkingLevel:void 0,thinkingBudget:typeof a.thinkingBudget==="number"?a.thinkingBudget:void 0,includeThoughts:typeof a.includeThoughts==="boolean"?a.includeThoughts:void 0};return Object.values(l).some((d)=>d!==void 0)?l:void 0},M=(e)=>e.thinkingConfig===void 0?void 0:{gemini:{thinkingConfig:e.thinkingConfig}},Le=ee("Gemini.fromRequest")(function*(e){let a=e.tools.length>0&&e.toolChoice?.type!=="none",l=e.generation,d=e.model.compatibility?.toolSchema,u={maxOutputTokens:l?.maxTokens,temperature:l?.temperature,topP:l?.topP,topK:l?.topK,stopSequences:l?.stop,thinkingConfig:Pe(e)};return{contents:yield*Re(e),systemInstruction:e.system.length===0?void 0:{parts:[{text:mi(e.system)}]},tools:a?[{functionDeclarations:e.tools.map((p)=>ke(p,Ro.modelCompatibility(p.inputSchema,d)))}]:void 0,toolConfig:a&&e.toolChoice?yield*Ae(e.toolChoice):void 0,generationConfig:Object.values(u).some((p)=>p!==void 0)?u:void 0}}),ve=(e)=>{if(!e)return;let a=e.cachedContentTokenCount,l=e.promptTokenCount!==void 0?e.promptTokenCount+(e.toolUsePromptTokenCount??0):void 0,d=Ta(l,a),u=e.candidatesTokenCount!==void 0?e.candidatesTokenCount+(e.thoughtsTokenCount??0):void 0;return new ln({inputTokens:l,outputTokens:u,nonCachedInputTokens:d,cacheReadInputTokens:a,reasoningTokens:e.thoughtsTokenCount,totalTokens:ds(l,u,e.totalTokenCount),providerMetadata:{google:e}})},be=new Set(["SAFETY","RECITATION","LANGUAGE","BLOCKLIST","PROHIBITED_CONTENT","SPII","IMAGE_SAFETY","IMAGE_PROHIBITED_CONTENT","IMAGE_RECITATION","ESCALATION","PUP_LIMITED_DISABLED"]),xe=new Set(["MALFORMED_FUNCTION_CALL","UNEXPECTED_TOOL_CALL","TOO_MANY_TOOL_CALLS","MISSING_THOUGHT_SIGNATURE","MALFORMED_RESPONSE"]),Ie=(e)=>{if(e.blockReason!==void 0)return"content-filter";let a=e.finishReason;if(a==="STOP")return e.hasToolCalls?"tool-calls":"stop";if(a==="MAX_TOKENS"||a==="CONTINUATION")return"length";if(a!==void 0&&be.has(a))return"content-filter";if(a!==void 0&&xe.has(a))return"error";return"unknown"},Ne=(e)=>{if(e.finishReason===void 0&&e.blockReason===void 0)return[];let a=[],l=e.reasoningSignature?yr(e.lifecycle,a,"reasoning-0",y({thoughtSignature:e.reasoningSignature})):e.lifecycle;if(e.textSignature!==void 0)l=Pl(l.text.has("text-0")?l:Vo(l,a,"text-0",""),a,"text-0",y({thoughtSignature:e.textSignature}));return As(l,a,{reason:Ie(e),usage:e.usage}),a},Me=new Set(["UNAVAILABLE","RESOURCE_EXHAUSTED","INTERNAL","DEADLINE_EXCEEDED"]),Ue=(e,a,l)=>{let d=l.message??"";return Ls({module:"Gemini",refusal:{code:l.status??(l.code===void 0?void 0:String(l.code)),message:d},evidence:{eventType:void 0,keys:Object.keys(a),payloadKeys:Object.keys(l)},retryable:l.status!==void 0&&Me.has(l.status)||l.code!==void 0&&l.code>=500,contextOverflow:qi(d),modelStarted:e.lifecycle.stepStarted})},De=(e,a)=>{if(a.error!==void 0)return c(Ue(e,a,a.error));let l={...e,usage:a.usageMetadata?ve(a.usageMetadata)??e.usage:e.usage,blockReason:a.promptFeedback?.blockReason??e.blockReason},d=a.candidates?.[0];if(!d?.content)return r([{...l,finishReason:d?.finishReason??l.finishReason},[]]);let u=[],{hasToolCalls:p,lifecycle:m,reasoningSignature:f,textSignature:h}=l;for(let g of d.content.parts){if("text"in g&&g.thoughtSignature)if(g.thought)f=g.thoughtSignature;else h=g.thoughtSignature;if("text"in g&&g.text.length>0){if(g.thought){m=cs(m,u,"reasoning-0",g.text,g.thoughtSignature?y({thoughtSignature:g.thoughtSignature}):void 0);continue}m=yr(m,u,"reasoning-0",f?y({thoughtSignature:f}):void 0),m=Vo(m,u,"text-0",g.text);continue}if("functionCall"in g){let B=g.functionCall.args,H=g.functionCall.id??`tool_${crypto.randomUUID()}`;m=yr(m,u,"reasoning-0",f?y({thoughtSignature:f}):void 0),m=nn(m,u),u.push(we.toolCall({id:H,name:g.functionCall.name,input:B,providerMetadata:g.thoughtSignature?y({thoughtSignature:g.thoughtSignature}):void 0})),p=!0}}return r([{...l,hasToolCalls:p,lifecycle:m,reasoningSignature:f,textSignature:h,finishReason:d.finishReason??l.finishReason},u])},_e=Zo({id:L,body:{schema:he,from:Le},stream:{event:Ns(Ce),initial:()=>({hasToolCalls:!1,lifecycle:Cs()}),step:De,onHalt:Ne}}),U=To.make({id:L,protocol:_e,endpoint:Lr.path(({request:e})=>`/models/${e.model.id}:streamGenerateContent?alt=sse`,{baseURL:te}),auth:Fr,framing:Ms});var D="https://opencode.ai/inference/go/v1",_=(e)=>`${e.client.name}/${e.client.version}`,F=32000,je=300,j={"glm-5.3-flash":"chat","glm-5.3":"chat","glm-5.2":"chat","glm-5.1":"chat","kimi-k3":"chat","kimi-k2.7-code":"chat","kimi-k2.6":"chat","longcat-2.0":"chat","deepseek-v4.1-flash":"chat","deepseek-v4-pro":"chat","mimo-v2.5":"chat","mimo-v2.5-pro":"chat",hy3:"chat","hy4-preview":"chat","gemini-4-argon-contributor":"gemini","gpt-5.6-luna":"responses","grok-4.6":"responses","muse-spark-1.3-contributor":"responses","muse-spark-1.2-contributor":"responses","minimax-m3":"messages","minimax-m2.7":"messages","qwen3.8-max":"messages","qwen3.8-flash":"messages","qwen3.7-plus":"messages","qwen3.7-max":"messages","qwen3.6-plus":"messages","union-alpha":"messages"},qe=new Set(["minimal","low","medium","high"]),Be=(e)=>e!==void 0&&qe.has(e),He=new Set(["deepseek-v4.1-flash","deepseek-v4-pro"]),We=(e)=>new de({module:"OpenCodeGo",method:"model",reason:new rn({message:`"${e}" is not an OpenCode Go model this build serves: no wire is declared for it.`})}),E=o({status:t,percent:S,resetsAt:t}),Qe=o({usage:o({rolling:E,weekly:E,monthly:E})}),G=(e,a,l)=>{let d=Date.parse(e.resetsAt);return new pc({kind:a,usedPercent:Math.min(100,Math.max(0,e.percent)),windowMinutes:l,resetsAt:Number.isNaN(d)?void 0:d/1000})},Ke=(e,a)=>pt(Qe)(e).pipe(at((l)=>new ls({message:`The OpenCode Go usage answer did not match its schema: ${l.message}`})),i((l)=>new Ps({observedAt:a,source:"usage",windows:[G(l.usage.rolling,"bucket",je),G(l.usage.weekly,"weekly"),G(l.usage.monthly,"monthly")]}))),q=()=>null,Ye=(e)=>({fromHeaders:q,read:(a,l,d)=>Al({url:`${D}/usage`,auth:Hn(a,l,sf,d).bearer(),headers:{Accept:"application/json","User-Agent":_(e)}}).pipe(s((u)=>Ke(u.body,u.observedAt)))}),$e=(e)=>{let a=Yn(e.rung);switch(j[e.model]){case"responses":return Rs({store:!1,reasoningEffort:a,parallelToolCalls:e.parallelToolCalls});case"gemini":return M({thinkingConfig:{thinkingLevel:Be(a)?a:void 0,includeThoughts:!0}});case"messages":{let l=Ml(a,e.outputTokens);return Il({thinking:l===void 0?void 0:{type:"enabled",budgetTokens:l},disableParallelToolUse:e.parallelToolCalls===void 0?void 0:!e.parallelToolCalls})}case void 0:return;default:return Ea({reasoningEffort:a,parallelToolCalls:e.parallelToolCalls})}},Ve=(e,a,l,d)=>{let u=Hn(e.credentials,e.ownerId,sf,e.account),p={provider:sf,quota:q,endpoint:{baseURL:D},limits:{output:F},headers:{"User-Agent":_(a),"x-opencode-session":d}};if(l==="messages")return Cl.with({...p,auth:u.pipe(bu("x-api-key"))}).model({id:e.model});if(l==="gemini")return U.with({...p,auth:u.pipe(bu("x-goog-api-key"))}).model({id:e.model});return(l==="responses"?as:va).with({...p,auth:u.bearer()}).model({id:e.model,compatibility:He.has(e.model)?{reasoningEcho:"required"}:void 0})},Xe=(e)=>({output:{budget:F,sent:!0},model:ee("opencodeGo.model")(function*(a){let l=j[a.model];if(l===void 0)return yield*We(a.model);let d=yield*ei(()=>pu(a.cacheGroup));return Ve(a,e,l,d)}),options:$e}),Je=(e)=>({...dm,profile:Xe(e),quota:Ye(e)}),Gt=(e)=>[Je(e)];export{D as OPENCODE_GO_BASE_URL,F as OPENCODE_GO_OUTPUT_RESERVATION,Ye as opencodeGoQuota,Je as opencodeGoRegistration,Gt as opencodeGoRegistrations,Ke as opencodeGoUsage,_ as opencodeGoUserAgent};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{sf,q_,dm,B_}from"./plugin-p59gy5xd.js";export{q_ as DEFAULT_OPENCODE_GO_MODEL,sf as OPENCODE_GO_PROVIDER,dm as opencodeGoDescription,B_ as opencodeGoVendor};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ql,Xm,Yl,Oo,Uf,Xl,Ur,ed,Wi,td,eh,r_,o_,nd,Sc,rd,Ut,gs,s_,_y}from"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{gs as CacheHint,_y as CachePolicy,s_ as CachePolicyObject,Ur as GenerationOptions,Oo as HttpOptions,Sc as Model,nd as ModelCompatibility,td as ModelDefaults,Ut as ModelIdentity,Wi as ModelLimits,o_ as ModelReasoningEcho,rd as ModelSchema,Xm as ProviderOptions,eh as ToolChoiceMode,r_ as ToolSchemaDialect,ed as mergeGenerationOptions,Xl as mergeHttpOptions,Ql as mergeJsonRecords,Yl as mergeProviderOptions,Uf as orderedHeaders};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{E_,yt,ic,v_,w_,k_,__,T_,R_,I_,C_,Mg,A_,M_,O_,Og}from"./plugin-1vpp5mqk.js";export{T_ as answerField,yt as field,M_ as modelField,O_ as namedCall,ic as nested,C_ as patchFiles,Mg as questionTool,A_ as rootOfArgv,v_ as sessionIdOf,E_ as tail,Og as toolCall,w_ as unasked,R_ as unfiled,I_ as unprinted,__ as unreported,k_ as unturned};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./plugin-h66k1zhn.js";import{F,it,i,v}from"./plugin-6xpcmvm3.js";var a=/=+$/g;function n(r){let e="";for(let t of r)e+=String.fromCharCode(t);return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(a,"")}function o(r){let e=new Uint8Array(r);return crypto.getRandomValues(e),e}class c extends F("PkceFailed"){}function s(){return n(o(64))}function f(r){let e=new TextEncoder().encode(r);return it({try:()=>crypto.subtle.digest("SHA-256",e),catch:(t)=>new c({cause:t})}).pipe(i((t)=>n(new Uint8Array(t))))}var u=v(function*(){let r=s(),e=yield*f(r);return{verifier:r,challenge:e}});function p(r,e=24){return r+n(o(e))}export{c as PkceFailed,f as generateCodeChallenge,s as generateCodeVerifier,u as generatePkce,p as generateState};
@@ -0,0 +1,6 @@
1
+ // @bun
2
+ import{Jl,zs,ku,Gm}from"./plugin-nqmb78ez.js";import{Go}from"./plugin-72xxqm1t.js";import{Mf,Eu,rn,Bi,hc,Aa,vu,de}from"./plugin-7y7ndrk9.js";import{Ao,Pt}from"./plugin-je5cfnqn.js";import{ue,Ze,at,v,ee,ml,$r,hl,ha,n,ce,t,ge,x,gt,Kn,ui}from"./plugin-6xpcmvm3.js";import{Buffer as y}from"buffer";var ql=Kn(ce),Zk=hl(ql),xr=ha(ql),h=ml(ui),Dr=ge(t,ce),jn=(e)=>n(x(e)),Ie=(e)=>n(gt(e)),ds=(e,r,o)=>{if(o!==void 0)return o;if(e===void 0&&r===void 0)return;return(e??0)+(r??0)},Ta=(e,r)=>{if(e===void 0)return;if(r===void 0)return e;return Math.max(0,e-r)},Hm=(...e)=>{if(e.every((r)=>r===void 0))return;return e.reduce((r,o)=>r+(o??0),0)},c=(e)=>e.length<=Eu?e:`${e.slice(0,Eu)}\u2026`,b=(e)=>{try{return JSON.stringify(e)??String(e)}catch{return String(e)}},R=(e)=>{let r="_tag"in e?e._tag:void 0;if(typeof r==="string"&&r.length>0)return r;return e.name.length>0?e.name:"unknown"},p=(e)=>{let r=e;for(let o=0;o<Mf;o+=1){let a="reason"in r?r.reason:void 0;if(!(a instanceof Error)||a.message!==r.message)return r;r=a}return r},Su=(e,r=[])=>{let o=[],a=e;for(let s=0;s<Mf;s+=1){if(a===void 0||a===null)break;if(!(a instanceof Error)){o.push({tag:"unknown",message:c(Go(b(a),r))});break}let d=p(a),i="code"in d&&typeof d.code==="string"&&d.code.length>0?d.code:void 0;o.push({tag:c(Go(R(d),r)),message:c(Go(d.message,r)),code:i===void 0?void 0:c(Go(i,r))}),a=d.cause}return o},sy=(e)=>{let r=e;for(let o=0;o<Mf;o+=1){if(!(r instanceof Error))return;let a=p(r),s="code"in a?a.code:void 0;if(typeof s==="string"&&s.length>0)return s;r=a.cause}return},S=(e)=>[e.status===void 0?void 0:`HTTP ${e.status}`,e.upstreamRequestId,e.bytesRead===void 0?void 0:`${e.bytesRead} bytes`,e.lastEvent===void 0?void 0:`${e.lastEvent.count} events${e.lastEvent.type===void 0?"":`, last ${e.lastEvent.type}`}`,e.elapsedMs===void 0?void 0:`${e.elapsedMs} ms`].filter((r)=>r!==void 0&&r!==""),g=(e)=>{let r=S(e);return r.length===0?e.message:`${e.message} (${[e.family,...r].join(" \xB7 ")})`},Et=(e,r)=>{let o=(s)=>Go(s,r.secrets??[]),a=Su(e,r.secrets??[]);return new de({module:r.module??"ProviderShared",method:r.method??"stream",reason:new Aa({message:g(r),family:r.family,route:r.route,excerpt:r.excerpt===void 0?void 0:c(o(r.excerpt)),status:r.status,upstreamRequestId:r.upstreamRequestId,attempt:r.attempt,bytesRead:r.bytesRead,elapsedMs:r.elapsedMs,lastEvent:r.lastEvent,cause:a.length===0?void 0:a})})},m=(e,r)=>({...e,status:e.status??r.status,upstreamRequestId:e.upstreamRequestId??r.upstreamRequestId,attempt:e.attempt??r.attempt,bytesRead:e.bytesRead??r.bytesRead,elapsedMs:e.elapsedMs??r.elapsedMs,lastEvent:e.lastEvent??r.lastEvent}),iy=(e,r,o=[])=>{let a=e.reason,s=(l)=>c(Go(l,o)),i=(()=>{switch(a._tag){case"InvalidProviderOutput":{let l={...m(a,r),message:s(a.message),excerpt:a.excerpt===void 0?void 0:s(a.excerpt),cause:a.cause?.map((u)=>({tag:s(u.tag),message:s(u.message),code:u.code===void 0?void 0:s(u.code)}))};return new Aa(a.attempt===void 0?{...l,message:g({...l,family:a.family})}:l)}case"ProviderInternal":return new Bi({...m(a,r),message:s(a.message)});case"UnknownProvider":return new vu({...m(a,r),message:s(a.message)});case"InvalidRequest":return new rn({...m(a,r),message:s(a.message)});case"StreamStalled":return new hc(m(a,r));default:return a}})();return i===a?e:new de({module:e.module,method:e.method,reason:i})},T=(e)=>{if(e.message&&e.code)return`${e.code}: ${e.message}`;return e.message||e.code||""},Ls=(e)=>{let r=Go(T(e.refusal).trim());if(r==="")return Et(void 0,{module:e.module,message:e.unrecognized?"The provider ended the stream with an unrecognized error payload; its cause could not be read":"The provider ended the stream with an error naming neither a code nor a message",family:e.unrecognized?"invalid-output":"blank-error",excerpt:xr({kind:e.unrecognized?"unrecognized-error":"blank-error",eventType:e.evidence.eventType??null,keys:[...e.evidence.keys].sort(),payloadKeys:e.evidence.payloadKeys?.length?[...e.evidence.payloadKeys].sort():void 0})});return new de({module:e.module,method:"stream",reason:e.contextOverflow?new rn({message:r,classification:"context-overflow"}):e.retryable?new Bi({message:r,modelStarted:e.modelStarted}):new vu({message:r,modelStarted:e.modelStarted})})},DT=(e,r,o)=>Ze({try:()=>Zk(r),catch:(a)=>Et(a,{route:e,message:o,family:"invalid-output",excerpt:r})}),mi=(e)=>e.map((r)=>r.text).join(`
3
+ `),E=(e)=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"),Gk=(e)=>`<system-update>
4
+ ${E(mi(e))}
5
+ </system-update>`,jm=ee("ProviderShared.systemUpdateText")(function*(e,r){let o=[];for(let a of r.content){if(!Xr(a,["text"]))return yield*lr(e,"system",["text"]);o.push(a)}return o}),Ds=ee("ProviderShared.wrappedSystemUpdate")(function*(e,r){let o=yield*jm(e,r);return{type:"text",text:Gk(o),cache:o.at(-1)?.cache}}),w=$r(ql),ay=(e)=>{let r=w(e||"{}");return ue(r)?{input:r.success}:{input:{},unparsed:e}},Fs=["image/png","image/jpeg","image/gif","image/webp"],Jk=["video/mp4","video/webm","video/quicktime"],Kk=["audio/wav","audio/mp3","audio/aiff","audio/aac","audio/ogg","audio/flac"],cy=[...Fs,...Jk,...Kk],wv=29360128,qm=20971520,fs=ee("ProviderShared.validateMedia")(function*(e,r,o){let a=r.mediaType.toLowerCase();if(!o.has(a))return yield*xt(`${e} does not support media type ${r.mediaType}`);let s;if(typeof r.data!=="string"){if(r.data.byteLength>qm)return yield*xt(`${e} media exceeds the ${qm} byte decoded limit`);s=y.from(r.data).toString("base64")}else if(r.data.startsWith("data:")){let i=r.data.indexOf(","),l=i<0?"":r.data.slice(5,i),u=l.indexOf(";");if(i<0||u<=0||l.slice(u)!==";base64")return yield*xt(`${e} media data URL must contain valid base64`);let f=l.slice(0,u);if(f.toLowerCase()!==a)return yield*xt(`${e} media type ${r.mediaType} does not match data URL type ${f}`);s=r.data.slice(i+1)}else s=r.data;if(y.byteLength(s,"utf8")>wv)return yield*xt(`${e} media exceeds the ${wv} byte encoded limit`);if(!s||s.length%4!==0)return yield*xt(`${e} media must contain valid base64`);let d=y.from(s,"base64");if(d.byteLength>qm)return yield*xt(`${e} media exceeds the ${qm} byte decoded limit`);if(d.toString("base64")!==s)return yield*xt(`${e} media must contain canonical base64`);return{mime:a,base64:s,dataUrl:`data:${a};base64,${s}`,bytes:d}}),Ra=(e,r,o)=>fs(e,{type:"media",mediaType:r.mime,data:r.uri,filename:r.name},o),uy=(e)=>e.replace(/\/+$/,""),ps=(e)=>{if(e.result.type==="text")return String(e.result.value);if(e.result.type==="error"){let r=e.result.value,o=typeof r==="object"&&r!==null&&!Array.isArray(r)&&Object.getPrototypeOf(r);return(Array.isArray(r)||o===Object.prototype||o===null)&&h(r)?xr(r):String(r)}return xr(e.result.value)},Bl=(e,r)=>{let o=e.replaceAll(r.outside,"_"),a=r.maxLength??Number.POSITIVE_INFINITY;if(o===e&&e.length>0&&e.length<=a)return e;let s=`_${A(e)}`;return o.slice(0,a-s.length)+s},A=(e)=>{let r=2166136261;for(let o=0;o<e.length;o++)r^=e.charCodeAt(o),r=Math.imul(r,16777619);return(r>>>0).toString(16).padStart(8,"0")},xt=(e)=>new de({module:"ProviderShared",method:"request",reason:new rn({message:e})}),Us=v(function*(e,r,o){if(r.type==="auto")return o.auto();if(r.type==="none")return o.none();if(r.type==="required")return o.required();if(!r.name)return yield*xt(`${e} tool choice requires a tool name`);return o.tool(r.name)}),I=(e)=>{if(e.length<=1)return e[0]??"";if(e.length===2)return`${e[0]} and ${e[1]}`;return`${e.slice(0,-1).join(", ")}, and ${e.at(-1)}`},Xr=(e,r)=>r.includes(e.type),lr=(e,r,o)=>xt(`${e} ${r} messages only support ${I(o)} content for now`),Wl=(e)=>(r)=>e(r).pipe(at((o)=>xt(o.message))),Ia=(e)=>{let r=Pt(e.headers??{});return Jl(e.url).pipe(zs(r),Gm(e.body,"application/json"),ku((o)=>Pt(o,Ao(r))))};
6
+ export{ql,Zk,xr,Dr,jn,Ie,ds,Ta,Hm,Su,sy,Et,iy,Ls,DT,mi,Gk,jm,Ds,ay,Fs,Jk,Kk,cy,wv,qm,fs,Ra,uy,ps,Bl,xt,Us,Xr,lr,Wl,Ia};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ var E_=(n)=>n===void 0?[]:[n];function yt(n,e){let t=n[e];return typeof t==="string"&&t.trim().length>0?t.trim():null}function ic(n,e){let t=n[e];return t!==null&&typeof t==="object"&&!Array.isArray(t)?t:{}}var v_=(n)=>yt(n,"session_id")??yt(n,"sessionId"),w_=()=>null,k_=()=>null,__=()=>null,T_=(n,e)=>e===null?null:yt(n,e),R_=()=>[],I_=()=>null,u=[{mark:"*** Add File:",effect:"write"},{mark:"*** Update File:",effect:"write"},{mark:"*** Delete File:",effect:"delete"}],i="*** Move to:";function C_(n){let e=[];for(let t of n.split(`
3
+ `)){let l=u.find((s)=>t.startsWith(s.mark));if(l!==void 0){let s=t.slice(l.mark.length).trim();if(s.length>0)e.push({effect:l.effect,path:s});continue}if(!t.startsWith(i))continue;let o=t.slice(i.length).trim(),r=e[e.length-1];if(o.length===0)continue;if(r?.effect==="write")e[e.length-1]={effect:"move",path:o,from:r.path};else e.push({effect:"write",path:o})}return e}var Mg=(n)=>["askuserquestion","ask_user_question","request_user_input"].includes(n?.toLowerCase()??""),A_=(n,e=!1)=>(t)=>{let l=e?[n,"--session-id"]:[n];for(let o=1;o<t.length;o+=1){let r=t[o];if(r!==void 0&&l.includes(r))return t[o+1]??null}return null},M_=(n,e=[])=>{if(!("model"in n))return null;let t=yt(n,"model");if(t===null)return{read:"absent"};return{read:"value",value:t,claim:e.includes(t)?"configured":"serving"}},O_=(n)=>{let e=yt(n,"tool_name")??yt(n,"toolName");if(e===null)return null;let t=ic(n,"tool_input"),l=yt(t,"command")??yt(t,"cmd")??yt(t,"file_path")??yt(t,"notebook_path")??yt(t,"path")??yt(t,"url")??yt(t,"query")??yt(t,"pattern")??yt(n,"tool_input")??JSON.stringify(n.tool_input??{});return{id:yt(n,"tool_use_id")??yt(n,"toolUseId"),tool:e,subject:l}},Og=(n,e)=>{let t=e[(yt(n,"tool_name")??yt(n,"toolName")??"").toLowerCase()];if(t===void 0)return null;let l=ic(n,"tool_input"),o=t==="bash"?yt(l,"command"):yt(l,"file_path");return o===null?null:{id:yt(n,"tool_use_id")??yt(n,"toolUseId"),tool:t,subject:o}};
4
+ export{E_,yt,ic,v_,w_,k_,__,T_,R_,I_,C_,Mg,A_,M_,O_,Og};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{N}from"./plugin-me00x60n.js";import{Ql}from"./plugin-zz7yc97m.js";import{Pt}from"./plugin-je5cfnqn.js";import{xr,Et,xt,Ia}from"./plugin-1n46me5n.js";import{Co}from"./plugin-ay29ch70.js";import{$m}from"./plugin-q1n5kwx0.js";import{_a,Rf,zl}from"./plugin-3pfrkxg1.js";import{Ms}from"./plugin-60bdzk1r.js";import{ze,d,i,v,Qn,Ot,oc,mg}from"./plugin-6xpcmvm3.js";var rv=(e,t)=>({attempt:e,startedAt:t,status:void 0,upstreamRequestId:void 0,bytesRead:0,events:0,lastEventType:void 0,secrets:[]}),wf=(e)=>({type:e.lastEventType,count:e.events}),ov=(e,t)=>({status:e.status,upstreamRequestId:e.upstreamRequestId,attempt:e.attempt,bytesRead:e.bytesRead,elapsedMs:t-e.startedAt,lastEvent:wf(e)}),sv=(e,t)=>{e.events+=1,e.lastEventType=t};var u=(e,t)=>{if(!t)return e;let o=new URL(e);return Object.entries(t).forEach(([s,r])=>o.searchParams.set(s,r)),o.toString()},ty=(e)=>u($m(e.endpoint,{request:e.request,body:e.body}).toString(),e.request.http?.query),c=new Set(["content","contents","diagnostics","frequencyPenalty","frequency_penalty","generationConfig","inferenceConfig","input","maxTokens","max_tokens","messages","model","presencePenalty","presence_penalty","responseFormat","response_format","seed","stop","stopSequences","stop_sequences","stream","streamOptions","stream_options","system","systemInstruction","system_instruction","temperature","thinking","thread","toolChoice","toolConfig","tool_choice","tool_config","tools","topK","topP","top_k","top_p"]),f=(e)=>Object.keys(e).filter((t)=>c.has(t)),l=v(function*(e,t,o){if(t.http?.body===void 0)return{jsonBody:e,bodyText:o(e)};let s=f(t.http.body);if(s.length>0)return yield*xt(`http.body cannot overlay protocol-owned field(s): ${s.join(", ")}`);if(N(e)){let r=Ql(e,t.http.body)??{};return{jsonBody:r,bodyText:xr(r)}}return yield*xt("http.body can only overlay JSON object request bodies")}),ny=v(function*(e){let t=ty(e),o=yield*l(e.body,e.request,e.encodeBody),s=yield*Co(e.auth)({request:e.request,method:"POST",url:t,body:o.bodyText,headers:Pt({...e.headers?.({request:e.request}),...e.request.http?.headers})});return{url:t,jsonBody:o.jsonBody,bodyText:o.bodyText,headers:Pt(s,e.request.http?.headerOrder)}}),ry=(e,t,o,s,r,m)=>Ot(o.http.execute(e.request,s,m,{retry:t.model.route.retry?.open===void 0,rateLimits:t.model.route.rateLimits}).pipe(i((n)=>{let p=`${t.model.provider}/${t.model.route.id}`;return r.secrets=zl(e.request),r.status=n.status,r.upstreamRequestId=Rf(_a(n.headers)),e.framing.frame(n.stream.pipe(oc((a)=>d(()=>{r.bytesRead+=a.byteLength})),mg("HttpClientError",(a)=>Ot(i(ze,(y)=>Qn(Et(a,{route:p,message:`Failed to read the ${p} stream`,family:"torn-stream",status:r.status,upstreamRequestId:r.upstreamRequestId,attempt:r.attempt,bytesRead:r.bytesRead,elapsedMs:y-r.startedAt,lastEvent:wf(r),secrets:zl(e.request)})))))))}))),Cm=(e)=>({id:"http-json",with:(t)=>Cm({...e,...t}),prepare:(t)=>ny({...t}).pipe(i((o)=>({request:Ia({url:o.url,body:o.bodyText,headers:o.headers}),framing:e.framing}))),frames:ry}),kf={id:"http-json/sse",with:()=>Cm({framing:Ms})};
3
+ export{rv,wf,ov,sv,ty,ny,ry,Cm,kf};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{we}from"./plugin-a4ng6krf.js";var Cs=()=>({stepStarted:!1,text:new Set,reasoning:new Set}),nn=(e,r)=>{if(e.stepStarted)return e;return r.push(we.stepStart({index:0})),{...e,stepStarted:!0}},Vo=(e,r,t,a)=>{let n=nn(e,r);if(n.text.has(t))return r.push(we.textDelta({id:t,text:a})),n;return r.push(we.textStart({id:t}),we.textDelta({id:t,text:a})),{...n,text:new Set([...n.text,t])}},Ol=(e,r,t,a)=>{if(e.reasoning.has(t))return e;let n=nn(e,r);return r.push(we.reasoningStart({id:t,providerMetadata:a})),{...n,reasoning:new Set([...n.reasoning,t])}},cs=(e,r,t,a,n)=>{let o=Ol(e,r,t,n);return r.push(we.reasoningDelta({id:t,text:a})),o},yr=(e,r,t,a)=>{if(!e.reasoning.has(t))return e;let n=nn(e,r);r.push(we.reasoningEnd({id:t,providerMetadata:a}));let o=new Set(n.reasoning);return o.delete(t),{...n,reasoning:o}},Pl=(e,r,t,a)=>{if(!e.text.has(t))return e;let n=nn(e,r);r.push(we.textEnd({id:t,providerMetadata:a}));let o=new Set(n.text);return o.delete(t),{...n,text:o}},s=(e,r)=>{for(let t of e.reasoning)r.push(we.reasoningEnd({id:t}));for(let t of e.text)r.push(we.textEnd({id:t}));return{...e,text:new Set,reasoning:new Set}},As=(e,r,t)=>{let a=s(nn(e,r),r);return r.push(we.stepFinish({index:0,reason:t.reason,usage:t.usage,native:t.native,providerMetadata:t.providerMetadata}),we.finish({reason:t.reason,usage:t.usage,providerMetadata:t.providerMetadata})),{...a,stepStarted:!1}};
3
+ export{Cs,nn,Vo,Ol,cs,yr,Pl,As};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{rn,de}from"./plugin-7y7ndrk9.js";import{y,c}from"./plugin-6xpcmvm3.js";var n=(e)=>new de({module:"Images",method:"generate",reason:new rn({message:e})}),gw=(e,t)=>{if(t.prompt.trim()==="")return"The picture needs a prompt.";if(t.images.length>e.inputs)return e.inputs===0?`${e.label} draws from a prompt alone and takes no input images.`:`${e.label} takes at most ${e.inputs} input images, not ${t.images.length}.`;let r=t.images.find((a)=>!e.inputTypes.includes(a.mediaType));if(r!==void 0)return`${e.label} takes ${e.inputTypes.join(", ")} images, not ${r.mediaType}.`;if(t.transparent&&!e.transparent)return`${e.label} draws no transparent background.`;return null},Lg=(e,t)=>{let r=gw(e,t);return r===null?y:c(n(r))};
3
+ export{gw,Lg};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{CE}from"./plugin-cydz2zhy.js";var YT=(e)=>e,XT=(e)=>e,eR=(e)=>e,tR=(e)=>e,nR=(e,n={})=>({entry:e.replace(/^\.\//u,""),...n}),rR=(e)=>e,oR=(e)=>e,sR=(e)=>e,iR=(e)=>e,aR=(e)=>e,cR=(e)=>e,uR=()=>CE,lR=(e)=>e;class vg extends Error{reason;constructor(e){super(e);this.reason=e;this.name="Refusal"}}class wg extends Error{operation;code;reason;unblock;constructor(e,n,o,t){super(`${e} refused ${n}: ${o}`);this.operation=e;this.code=n;this.reason=o;this.unblock=t;this.name="TagmaRefused"}}
3
+ export{YT,XT,eR,tR,nR,rR,oR,sR,iR,aR,cR,uR,lR,vg,wg};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Uv}from"./plugin-h66k1zhn.js";import{wu,Hs,$v,Df,xc}from"./plugin-nqmb78ez.js";import{th,Ty,Iu,od,Vi,Go}from"./plugin-72xxqm1t.js";import{Bm,Of,Pf,$f,ms,mc,py,de}from"./plugin-7y7ndrk9.js";import{Su,sy}from"./plugin-1n46me5n.js";import{Ma}from"./plugin-e2y95zm5.js";import{$s,oy}from"./plugin-3whwpedj.js";import{Hl}from"./plugin-pfj9nc2e.js";import{js}from"./plugin-krbbb4ts.js";import{oe,q,Ne,me,up,et,bt,mn,ze,r,d,y,f,c,s,tt,i,Bt,es,qc,en,Dt,v,ee,ht,IS,Yc}from"./plugin-6xpcmvm3.js";var k=[/prompt is too long/i,/request_too_large/i,/input is too long for requested model/i,/exceeds the context window/i,/exceeds (?:the )?(?:model'?s )?maximum context length(?: of [\d,]+ tokens?|\s*\([\d,]+\))/i,/input token count.*exceeds the maximum/i,/tokens in request more than max tokens allowed/i,/maximum prompt length is \d+/i,/reduce the length of the messages/i,/maximum context length is \d+ tokens/i,/exceeds (?:the )?maximum allowed input length of [\d,]+ tokens?/i,/input \(\d+ tokens\) is longer than the model'?s context length \(\d+ tokens\)/i,/exceeds the limit of \d+/i,/exceeds the available context size/i,/greater than the context length/i,/context window exceeds limit/i,/exceeded model token limit/i,/context[_ ]length[_ ]exceeded/i,/request entity too large/i,/request payload too large/i,/context length is only \d+ tokens/i,/input length.*exceeds.*context length/i,/prompt too long; exceeded (?:max )?context length/i,/too large for model with \d+ maximum context length/i,/prompt has [\d,]+ tokens?, but the configured context size is [\d,]+ tokens?/i,/model_context_window_exceeded/i,/too many tokens/i,/token limit exceeded/i],w=[/^(throttling error|service unavailable):/i,/rate limit/i,/too many requests/i],qi=(e)=>!w.some((t)=>t.test(e))&&(k.some((t)=>t.test(e))||/^4(00|13)\s*(status code)?\s*\(no body\)/i.test(e));class Io extends oe()("@runlith/llm/HttpExecutor"){}var E=16384,xu=4,O=200,H=0.1,M=(e,t)=>Object.fromEntries(Object.entries(IS(e,[...t,Ty])).map(([n,o])=>[n,String(o)])),L=(e)=>{if(!URL.canParse(e))return th;let t=new URL(e);return t.searchParams.forEach((n,o)=>{if(od(o))t.searchParams.set(o,th)}),t.toString()},_a=(e)=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),Rf=(e)=>e["x-request-id"]??e["request-id"]??e["x-amzn-requestid"]??e["x-amz-request-id"]??e["x-goog-request-id"]??e["cf-ray"],N=(e,t)=>{let n=Number(e["retry-after-ms"]);if(Number.isFinite(n))return Math.max(0,n);let o=e["retry-after"];if(!o)return;let l=Number(o);if(Number.isFinite(l))return Math.max(0,l*1000);let a=Date.parse(o);if(!Number.isNaN(a))return Math.max(0,a-t);return},S=(e,t,n)=>{let o={limit:{},remaining:{},reset:{}};if(n!==void 0)for(let[p,R]of Object.entries(e)){let m=n(p);if(m!==void 0&&m.bucket.length>0)o[m.kind][m.bucket]=R}let{limit:l,remaining:a,reset:u}=o;if(t===void 0&&Object.keys(l).length===0&&Object.keys(a).length===0&&Object.keys(u).length===0)return;return $f.make({retryAfterMs:t,limit:Object.keys(l).length===0?void 0:l,remaining:Object.keys(a).length===0?void 0:a,reset:Object.keys(u).length===0?void 0:u})},T=(e,t)=>new Of({method:e.method,url:L(e.url),headers:M(e.headers,t)}),_=(e,t)=>new Pf({status:e.status,headers:M(e.headers,t)}),zl=(e)=>{let t=URL.canParse(e.url)?[...new URL(e.url).searchParams]:[];return new Set([...Vi(Object.entries(e.headers),Iu),...Vi(t,od)])},D=(e,t)=>{if(e._tag==="Unreadable")return{bodyUnreadable:e.reason};let n=e.text,o=Go(n,zl(t));if(o.length<=E)return{body:o};return{body:o.slice(0,E),bodyTruncated:!0}},P=(e,t)=>{if(t.body&&t.body.length<=500)return`Provider request failed with HTTP ${e}: ${t.body}`;return`Provider request failed with HTTP ${e}`},I=(e)=>new ms({request:T(e.request,e.redactedNames),response:_(e.response,e.redactedNames),...e.body,requestId:e.requestId,rateLimit:e.rateLimit}),U=(e,t,n)=>v(function*(o){if(o.status>=200&&o.status<300)return o;let l=yield*o.text.pipe(i((x)=>({_tag:"Read",text:x})),es("HttpClientError",(x)=>r({_tag:"Unreadable",reason:x.message}))),a=_a(o.headers),u=N(a,yield*ze),p=S(a,u,n),R=D(l,e),m=I({request:e,response:o,redactedNames:t,body:R,requestId:Rf(a),rateLimit:p});return yield*new de({module:"RequestExecutor",method:"execute",reason:py({status:o.status,message:P(o.status,R),retryAfterMs:u,rateLimit:p,http:m,classification:qi(m.body??"")?"context-overflow":void 0})})}),F={ENOTFOUND:"dns",EAI_AGAIN:"dns",EAI_NODATA:"dns",EAI_NONAME:"dns",ECONNRESET:"reset",ECONNABORTED:"reset",EPIPE:"reset",ETIMEDOUT:"connect-timeout",ECONNREFUSED:"connect-timeout",EHOSTUNREACH:"connect-timeout",ENETUNREACH:"connect-timeout"},j=(e)=>e.includes("CERT")||e.startsWith("ERR_TLS")||e.startsWith("ERR_SSL"),b=(e)=>{let t=sy(e);if(t===void 0)return"unknown";if(j(t))return"tls";return F[t]??"unknown"},K=(e)=>URL.canParse(e)?new URL(e).host:th,Q=(e)=>(t)=>{let n=(a)=>new de({module:"RequestExecutor",method:"execute",reason:new mc({message:a.message,kind:a.kind,host:a.request?K(a.request.url):void 0,attempt:e.attempt,elapsedMs:e.elapsedMs,cause:Su(a.cause,a.request?zl(a.request):[]),http:a.request?new ms({request:T(a.request,e.redactedNames)}):void 0})});if(up(t))return n({message:t.message,kind:"connect-timeout",cause:t});if(!wu(t)){let a=b(t);return n({message:`The request never left: ${a}`,kind:a,cause:t})}let o="request"in t?t.request:void 0,l=b(t);return n({message:t.reason.description??`The request never left: ${l}`,kind:l,cause:t,request:o})},C={retry:!1},V=(e)=>{let t=Math.min(O*2**e.attempt,js);return Uv(t*(1-H),t*(1+H)).pipe(i((n)=>Ne(Math.round(n))))},Vk=q("@runlith/llm/RetryHint",{defaultValue:()=>!1}),B=250,Fm=(e)=>s(Vk,(t)=>en(t?Ne(Math.min(me(e),B)):e)),Um=(e,t)=>{if(t.remaining<=0||!Bm(e))return r(C);if(t.retryAfterMs!==void 0)return r(t.retryAfterMs>js?C:{retry:!0,after:Ne(t.retryAfterMs)});return i(V(t),(n)=>({retry:!0,after:n}))},A=(e,t=xu,n=0)=>es(e(n),"LLM.Error",(o)=>Um(o.family,{attempt:n,remaining:t,retryAfterMs:o.retryAfterMs}).pipe(s((l)=>{if(!l.retry)return c(o);return $s({type:"retry-scheduled",transportAttempt:n,delayMs:me(l.after)}).pipe(s(()=>Fm(l.after)),s(()=>A(e,t-1,n+1)))}))),z=(e,t,n)=>s(ze,(o)=>{let l=Rf(_a(n.headers));return $s({type:"http-responded",request:e,status:n.status,afterMs:o-t,upstreamRequestId:l||void 0})}),W=(e,t,n)=>s(ze,(o)=>{let l="http"in n.reason?n.reason.http:void 0,a=l?.response?.status,u=l?.requestId;return $s({type:"http-failed",request:e,reason:n.reason._tag,family:n.family,retryable:n.retryable,message:n.reason.message,afterMs:o-t,status:a,upstreamRequestId:u,retryAfterMs:n.retryAfterMs})}),If=bt(Io,f(function*(){let e=$v(yield*Hs),t=ee("HttpExecutor.attempt")(function*(n,o,l,a,u){let p=yield*Yc,R=yield*ze,m=yield*Hl,x=yield*$s({type:"http-started",transportAttempt:o,body:u,method:n.method,url:L(n.url),cachePrefix:m||void 0});return yield*e.execute(n).pipe(Dt(Df,!1),Bt((g)=>s(ze,(h)=>c(Q({redactedNames:p,attempt:o,elapsedMs:h-R})(g)))),tt((g)=>z(x,R,g)),s(U(n,p,a)),tt((g)=>l===void 0?y:ze.pipe(s((h)=>d(()=>l.accept(l.fromHeaders(ht(_a(g.headers)),new Date(h))))))),qc((g)=>W(x,R,g)))});return Io.of({execute:(n,o,l,a)=>s(oy(n),(u)=>A((p)=>t(n,p,l,a?.rateLimits,u),a?.retry===!1?0:xu)).pipe(Dt(et,o))})})),LT=If.pipe(mn(Ma)),zm=(e)=>If.pipe(mn(xc(r(e))));
3
+ export{qi,Io,xu,_a,Rf,zl,Vk,Fm,Um,If,LT,zm};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{q,ze,Es,r,y,i}from"./plugin-6xpcmvm3.js";var p=q("@runlith/activity/ActivityCause",{defaultValue:()=>null});var c=(t)=>({name:t});var A={record:()=>{},settled:y},a=q("@runlith/activity/ActivityLog",{defaultValue:()=>A});var u=q("@runlith/activity/CurrentActivity",{defaultValue:()=>null});function f(t,e){return i(Es([a,u,ze]),([o,n,d])=>{if(n===null||e!==void 0&&e.run!==n.run){if(e!==void 0)o.record({_tag:"Noted",activity:e,at:d,note:t});return null}return n.notes+=1,o.record({_tag:"Noted",activity:n.id,at:d,note:t}),n.notes})}var D=c("fault");function g(t){return i(Es([a,u,ze]),([e,o,n])=>o===null?null:m(e,o,n,t))}function m(t,e,o,n){return e.bodies+=1,t.record({_tag:"Bodied",activity:e.id,n:e.bodies,at:o,thread:e.thread,body:n}),e.bodies}var $s=(t)=>f(t),oy=(t)=>t.body._tag==="Uint8Array"?g({kind:"request",encoded:t.body.body,contentType:t.body.contentType,series:!0}):r(null);
3
+ export{$s,oy};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Om,_f,dn}from"./plugin-gkgs7vfv.js";import{we,dc}from"./plugin-a4ng6krf.js";var i=new TextEncoder,u=(e,t,n,o)=>dn.make({role:"assistant",content:[...t],origin:e,id:n,requestId:o}),a=(e,t)=>t===void 0?{type:"text",text:e}:{type:"text",text:e,providerMetadata:t},s=(e,t)=>t===void 0?{type:"reasoning",text:e}:{type:"reasoning",text:e,providerMetadata:t},l=(e)=>{let t=[...e.content];for(let n of Object.values(e.textParts))t[n.contentIndex]=a(n.chunks.join(""),n.providerMetadata);for(let n of Object.values(e.reasoningParts))t[n.contentIndex]=s(n.chunks.join(""),n.providerMetadata);return t},Em=(e)=>{let t={events:[],content:[],get message(){let n=u(t.origin,l(t),t.messageId,t.requestId);return t.native===void 0?n:new dn({...n,native:t.native})},origin:e,textParts:{},reasoningParts:{},toolInputs:{},arguments:{}};return t},c=(e)=>e,p=(e,t)=>{let n=c(e);if(n.events.push(t),t.type==="step-finish")n.requestId=t.requestId,n.native=t.native;if(we.is.finish(t))n.usage=t.usage??n.usage,n.finishReason=t.reason;else if("usage"in t&&t.usage!==void 0)n.usage=t.usage;return n},r=(e,t)=>(e.content.push(t),e),g=(e,t,n)=>{if(e.textParts[t])return e;let o=e.content.length;return r(e,a("",n)),e.textParts[t]={contentIndex:o,chunks:[],providerMetadata:n},e},y=(e,t)=>{let n=g(e,t.id,t.providerMetadata).textParts[t.id];if(!n)return e;return n.chunks.push(t.text),n.providerMetadata=t.providerMetadata??n.providerMetadata,e},M=(e,t)=>{let n=e.textParts[t.id];if(!n)return e;let o=t.providerMetadata??n.providerMetadata;return e.content[n.contentIndex]=a(n.chunks.join(""),o),delete e.textParts[t.id],e},d=(e,t,n)=>{if(e.reasoningParts[t])return e;let o=e.content.length;return r(e,s("",n)),e.reasoningParts[t]={contentIndex:o,chunks:[],providerMetadata:n},e},f=(e,t)=>{let n=d(e,t.id,t.providerMetadata).reasoningParts[t.id];if(!n)return e;return n.chunks.push(t.text),n.providerMetadata=t.providerMetadata??n.providerMetadata,e},m=(e,t)=>{let n=e.reasoningParts[t.id];if(!n)return e;let o=t.providerMetadata??n.providerMetadata;return e.content[n.contentIndex]=s(n.chunks.join(""),o),delete e.reasoningParts[t.id],e},R=(e,t)=>(e.toolInputs[t.id]={name:t.name,chunks:[],providerMetadata:t.providerMetadata},e),I=(e,t)=>{let n=e.toolInputs[t.id]??{name:t.name,chunks:[]};return n.chunks.push(t.text),e.toolInputs[t.id]=n,e},x=(e,t)=>{let n=e.toolInputs[t.id]??{name:t.name,chunks:[]};return n.name=t.name,n.providerMetadata=t.providerMetadata??n.providerMetadata,n.chunks=[n.chunks.join("")],e.toolInputs[t.id]=n,e},b=(e)=>Om.from({id:e.id,name:e.name,input:e.input,unparsed:e.unparsed,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),P=(e)=>_f.from({id:e.id,name:e.name,result:e.result,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),h=(e,t)=>{let n=e.toolInputs[t.id]?.chunks.join("")??"";return e.arguments[t.id]=n.length>0?n:JSON.stringify(t.input??{}),delete e.toolInputs[t.id],r(e,b(t))},k=(e,t)=>{e.origin=t.to,e.content.splice(0);for(let n of Object.keys(e.textParts))delete e.textParts[n];for(let n of Object.keys(e.reasoningParts))delete e.reasoningParts[n];for(let n of Object.keys(e.toolInputs))delete e.toolInputs[n];for(let n of Object.keys(e.arguments))delete e.arguments[n];return r(e,{type:"model-fallback",from:t.from,to:t.to,trigger:t.trigger,providerMetadata:t.providerMetadata})},S=(e,t)=>{if(e.messageId===void 0&&t.messageId!==void 0)e.messageId=t.messageId;return e},vm=(e,t)=>{let n=p(e,t);switch(t.type){case"step-start":if(t.origin!==void 0)n.origin=t.origin;return n;case"input-usage":return S(n,t);case"text-delta":return y(n,t);case"text-end":return M(n,t);case"reasoning-start":return d(n,t.id,t.providerMetadata);case"reasoning-delta":return f(n,t);case"reasoning-end":return m(n,t);case"tool-input-start":return R(n,t);case"tool-input-delta":return I(n,t);case"tool-input-end":return x(n,t);case"tool-call":return h(n,t);case"tool-result":return r(n,P(t));case"model-fallback":return k(n,t);default:return n}},wm=(e)=>e.finishReason===void 0?void 0:new dc({message:e.message,events:[...e.events],usage:e.usage,finishReason:e.finishReason}),sT=(e)=>i.encode(JSON.stringify({message:e.message,finishReason:e.finishReason,usage:e.usage})),iT=(e)=>wm(e.reduce(vm,Em()));
3
+ export{Em,vm,wm,sT,iT};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var sm="stepfun",$_="step-3.7-flash",e=["auto"],t=["low","medium","high"],o=[],i={["step-3.7-flash"]:{label:"Step 3.7 Flash",short:"Step 3.7",toolChoice:e,capacity:{context:262144},capabilities:["text","vision"],reasoning:t,defaultReasoning:"high"},"step-5-preview":{label:"Step 5 Preview",short:"Step 5",toolChoice:e,capacity:{context:1024000,output:64000},capabilities:["text","vision"],reasoning:t,defaultReasoning:"high"},"step-3.5-flash-2603":{label:"Step 3.5 Flash 2603",short:"Step 2603",toolChoice:e,capacity:{context:262144},capabilities:["text"],reasoning:t,defaultReasoning:"high"},"step-3.5-flash":{label:"Step 3.5 Flash",short:"Step 3.5",toolChoice:e,capacity:{context:262144},capabilities:["text"],reasoning:o,defaultReasoning:null}},im={id:"stepfun",label:"StepFun",auth:"api-key",keyScope:"identity",models:i,cacheLifetime:{promisedSeconds:null,prior:null},defaultTextModel:"step-3.7-flash"},N_={providers:[im]};
3
+ export{sm,$_,im,N_};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var Rg=(e,o)=>({hooks:[{type:"command",command:e,...o===void 0?{}:{timeout:o}}]}),AE=(e,o)=>JSON.stringify({hookSpecificOutput:{hookEventName:e,additionalContext:o}}),Ig=({allowed:e,words:o})=>JSON.stringify({decision:e?"approve":"deny",reason:o}),Cg=(e)=>(o)=>AE(e,o),Ag=(e,o)=>(n,t)=>AE(t==="before"?e:o,n);
3
+ export{Rg,AE,Ig,Cg,Ag};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Et}from"./plugin-1n46me5n.js";import{r,c,i,Xp,uw,hg,fE,Sg}from"./plugin-6xpcmvm3.js";var u=10485760,A=()=>({line:[],lineChars:0,data:[],dataChars:0,swallowLeadingLf:!1}),E=(n,e)=>{let m=[],{line:t,lineChars:o,data:l,dataChars:h,swallowLeadingLf:d}=n,f=0;if(d&&e.length>0)f=e.charCodeAt(0)===10?1:0,d=!1;for(let a=f;a<e.length;a++){let S=e.charCodeAt(a);if(S!==10&&S!==13)continue;if(a>f){let s=e.slice(f,a);t.push(s),o+=s.length}let g=t.length===0?"":t.length===1?t[0]:t.join("");if(t=[],o=0,g.length===0){if(l.length>0)m.push(l.join(`
3
+ `)),l=[],h=0}else{let s=g.indexOf(":"),y=s>=0;if(g.slice(0,y?s:g.length)==="data"){let C=y?g.charCodeAt(s+1)===32?s+2:s+1:g.length,L=g.slice(C);l.push(L),h+=L.length+1}}let p=S===13&&a+1<e.length&&e.charCodeAt(a+1)===10;if(p)a++;d=S===13&&!p&&a+1===e.length,f=a+1}if(f<e.length){let a=e.slice(f);t.push(a),o+=a.length}return[{line:t,lineChars:o,data:l,dataChars:h,swallowLeadingLf:d},m]},x=(n)=>n.pipe(fE(),hg(A,(e,m)=>{let t=e,o=[];for(let l of m){let[h,d]=E(t,l);if(t=h,d.length>0)o.push(...d)}return t.lineChars+t.dataChars>u?c(Et(void 0,{route:"sse",message:`Pending SSE event exceeded the maximum size of ${u}`,family:"invalid-output"})):r([t,o])}),uw((e)=>e.length>0&&e!=="[DONE]")),Ms={id:"sse",frame:x},OT={id:"json",frame:(n)=>Xp(n.pipe(fE(),Sg(()=>[],(e,m)=>(e.push(m),e)),i((e)=>e.join(""))))};
4
+ export{Ms,OT};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var Tg=["actions","agents","beforeBuild","commands","composer","hooks","launchers","notify","on","panes","pins","results","schedule","shortcuts","surfaces","themes","threads","tools","views"];
3
+ export{Tg};