@claudiolabs/claudin 1.1.35 → 1.1.36
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.
- package/dist/chunks/App-1.1.36-4ypa2ky6.mjs +1 -0
- package/dist/chunks/ApproveApiKey-1.1.36-r5r4cwsv.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-1.1.36-v3mtkjve.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-1.1.36-m4wb4rn1.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.36-7v5ebgve.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-1.1.36-xpxzdymv.mjs +1 -0
- package/dist/chunks/DiffDialog-1.1.36-f49re5tc.mjs +6 -0
- package/dist/chunks/Doctor-1.1.36-2dspbc9p.mjs +1 -0
- package/dist/chunks/ExplorerDialog-1.1.36-9ajm3kh8.mjs +6 -0
- package/dist/chunks/ITermBackend-1.1.36-js7zf4na.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-1.1.36-4qp5v3qb.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-1.1.36-vesfpg6k.mjs +1 -0
- package/dist/chunks/MigrationDialog-1.1.36-bg3y18da.mjs +1 -0
- package/dist/chunks/Onboarding-1.1.36-n2rz26c0.mjs +1 -0
- package/dist/chunks/ProviderManager-1.1.36-tr7atyyg.mjs +1 -0
- package/dist/chunks/REPL-1.1.36-k3q58fha.mjs +1 -0
- package/dist/chunks/ResumeConversation-1.1.36-qa0m768f.mjs +1 -0
- package/dist/chunks/TeleportProgress-1.1.36-sg79pgf7.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.36-2q0d269f.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-1.1.36-rngjq7f6.mjs +1 -0
- package/dist/chunks/TmuxBackend-1.1.36-mrzttk9n.mjs +9 -0
- package/dist/chunks/ToolSearchTool-1.1.36-ycekhs3r.mjs +1 -0
- package/dist/chunks/TrustDialog-1.1.36-awrjghme.mjs +1 -0
- package/dist/chunks/activeProvider-1.1.36-r7zqb99r.mjs +1 -0
- package/dist/chunks/add-dir-1.1.36-mrfh3vg4.mjs +1 -0
- package/dist/chunks/agentTypes-1.1.36-50aq6x28.mjs +1 -0
- package/dist/chunks/agents-1.1.36-p154bdnq.mjs +110 -0
- package/dist/chunks/agents-1.1.36-qvdrqv2q.mjs +3 -0
- package/dist/chunks/api-1.1.36-fw1zvw5c.mjs +1 -0
- package/dist/chunks/asciicast-1.1.36-pabx88c3.mjs +1 -0
- package/dist/chunks/auth-1.1.36-nxs2defd.mjs +1 -0
- package/dist/chunks/auth-1.1.36-vxpyyv86.mjs +1 -0
- package/dist/chunks/autoMode-1.1.36-ew03cpb1.mjs +52 -0
- package/dist/chunks/autoModeSetup-1.1.36-m3aspqak.mjs +44 -0
- package/dist/chunks/autoUpdater-1.1.36-dvg6tvq8.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-1.1.36-q1ejq881.mjs +1 -0
- package/dist/chunks/branch-1.1.36-ev37nqdg.mjs +4 -0
- package/dist/chunks/bridge-1.1.36-1yp5eghy.mjs +2 -0
- package/dist/chunks/bridgeConfig-1.1.36-yxs52053.mjs +1 -0
- package/dist/chunks/bridgeEnabled-1.1.36-ghh2yqhm.mjs +1 -0
- package/dist/chunks/bridgeMain-1.1.36-6v5c06t6.mjs +64 -0
- package/dist/chunks/bridgePointer-1.1.36-2rgfyyde.mjs +1 -0
- package/dist/chunks/btw-1.1.36-065ma89f.mjs +1 -0
- package/dist/chunks/buddy-1.1.36-a1z9gs49.mjs +3 -0
- package/dist/chunks/cache-probe-1.1.36-bvheegzj.mjs +21 -0
- package/dist/chunks/cacheStats-1.1.36-0bq3fz34.mjs +4 -0
- package/dist/chunks/caches-1.1.36-8swj463y.mjs +1 -0
- package/dist/chunks/cd-1.1.36-wwqk3h8r.mjs +3 -0
- package/dist/chunks/claudeDesktop-1.1.36-325wbhtb.mjs +1 -0
- package/dist/chunks/claudemd-1.1.36-2vv85v0v.mjs +1 -0
- package/dist/chunks/clear-1.1.36-xnqf2tm7.mjs +1 -0
- package/dist/chunks/clearTerminal-1.1.36-g72pkm2k.mjs +1 -0
- package/dist/chunks/cli-1.1.36-02vb8r9t.mjs +2 -0
- package/dist/chunks/cli-1.1.36-0ar5v8he.mjs +2 -0
- package/dist/chunks/cli-1.1.36-0d7qj290.mjs +2 -0
- package/dist/chunks/cli-1.1.36-0qdd3hmz.mjs +2 -0
- package/dist/chunks/cli-1.1.36-0qtyffhw.mjs +2 -0
- package/dist/chunks/cli-1.1.36-0v8c69pm.mjs +2 -0
- package/dist/chunks/cli-1.1.36-0zzq8bfp.mjs +2 -0
- package/dist/chunks/cli-1.1.36-12bsh7j9.mjs +2 -0
- package/dist/chunks/cli-1.1.36-1dhxpexj.mjs +2 -0
- package/dist/chunks/cli-1.1.36-1dr6aakq.mjs +2 -0
- package/dist/chunks/cli-1.1.36-1fmfztzp.mjs +2 -0
- package/dist/chunks/cli-1.1.36-1yk5zdh0.mjs +2 -0
- package/dist/chunks/cli-1.1.36-1z1m015s.mjs +2 -0
- package/dist/chunks/cli-1.1.36-2720p0e9.mjs +2 -0
- package/dist/chunks/cli-1.1.36-2awc366j.mjs +2 -0
- package/dist/chunks/cli-1.1.36-2mqhd52j.mjs +2 -0
- package/dist/chunks/cli-1.1.36-2sbmjg5a.mjs +2 -0
- package/dist/chunks/cli-1.1.36-33pcdm87.mjs +2 -0
- package/dist/chunks/cli-1.1.36-34sqd3h3.mjs +15 -0
- package/dist/chunks/cli-1.1.36-3fe93rwy.mjs +2 -0
- package/dist/chunks/cli-1.1.36-3gx0bht8.mjs +4 -0
- package/dist/chunks/cli-1.1.36-3kd43x1y.mjs +2 -0
- package/dist/chunks/cli-1.1.36-3mmakdzj.mjs +2 -0
- package/dist/chunks/cli-1.1.36-3xkn8kcw.mjs +2 -0
- package/dist/chunks/cli-1.1.36-3z14wtaa.mjs +2 -0
- package/dist/chunks/cli-1.1.36-40x4f5k7.mjs +34 -0
- package/dist/chunks/cli-1.1.36-422dmh6w.mjs +2 -0
- package/dist/chunks/cli-1.1.36-43fkjqy9.mjs +2 -0
- package/dist/chunks/cli-1.1.36-451x9avw.mjs +2 -0
- package/dist/chunks/cli-1.1.36-4ajy0ys9.mjs +2 -0
- package/dist/chunks/cli-1.1.36-4g1wf6an.mjs +2 -0
- package/dist/chunks/cli-1.1.36-4jwgcerx.mjs +2 -0
- package/dist/chunks/cli-1.1.36-4pfza5vq.mjs +2 -0
- package/dist/chunks/cli-1.1.36-4ssz80b2.mjs +60 -0
- package/dist/chunks/cli-1.1.36-5de80y14.mjs +26 -0
- package/dist/chunks/cli-1.1.36-5few49rp.mjs +7 -0
- package/dist/chunks/cli-1.1.36-5kmv74s2.mjs +2 -0
- package/dist/chunks/cli-1.1.36-5nkhhy5f.mjs +7 -0
- package/dist/chunks/cli-1.1.36-5nkv3yj2.mjs +2 -0
- package/dist/chunks/cli-1.1.36-5zzwcyt7.mjs +2 -0
- package/dist/chunks/cli-1.1.36-659qh6fs.mjs +15 -0
- package/dist/chunks/cli-1.1.36-65fkb20j.mjs +12 -0
- package/dist/chunks/cli-1.1.36-69zmc79s.mjs +2 -0
- package/dist/chunks/cli-1.1.36-6g1w2zbr.mjs +4 -0
- package/dist/chunks/cli-1.1.36-6jv1ss2p.mjs +2 -0
- package/dist/chunks/cli-1.1.36-6q7sfj4e.mjs +4 -0
- package/dist/chunks/cli-1.1.36-6yqvdwyp.mjs +2 -0
- package/dist/chunks/cli-1.1.36-703pmf6z.mjs +135 -0
- package/dist/chunks/cli-1.1.36-72hptg9d.mjs +2 -0
- package/dist/chunks/cli-1.1.36-72p8zdsg.mjs +2 -0
- package/dist/chunks/cli-1.1.36-72sph7cp.mjs +3 -0
- package/dist/chunks/cli-1.1.36-775g6c3z.mjs +2 -0
- package/dist/chunks/cli-1.1.36-789jh18m.mjs +2 -0
- package/dist/chunks/cli-1.1.36-79jcadbx.mjs +2 -0
- package/dist/chunks/cli-1.1.36-7byzkddk.mjs +3 -0
- package/dist/chunks/cli-1.1.36-7tprmtpr.mjs +2 -0
- package/dist/chunks/cli-1.1.36-7v42aqn9.mjs +2 -0
- package/dist/chunks/cli-1.1.36-7xx3rm4x.mjs +2 -0
- package/dist/chunks/cli-1.1.36-7ywn6pq1.mjs +2 -0
- package/dist/chunks/cli-1.1.36-7z5n90ex.mjs +3 -0
- package/dist/chunks/cli-1.1.36-80gqbr44.mjs +2 -0
- package/dist/chunks/cli-1.1.36-814rb1qn.mjs +2 -0
- package/dist/chunks/cli-1.1.36-89dhnv3q.mjs +2 -0
- package/dist/chunks/cli-1.1.36-8k2z8yvv.mjs +4 -0
- package/dist/chunks/cli-1.1.36-8mc299mk.mjs +6 -0
- package/dist/chunks/cli-1.1.36-8s4n3bf2.mjs +2 -0
- package/dist/chunks/cli-1.1.36-8vncd2t8.mjs +2 -0
- package/dist/chunks/cli-1.1.36-90xk1ctt.mjs +4 -0
- package/dist/chunks/cli-1.1.36-97zq0wp5.mjs +2 -0
- package/dist/chunks/cli-1.1.36-9k371kgm.mjs +15 -0
- package/dist/chunks/cli-1.1.36-9xnre98h.mjs +2 -0
- package/dist/chunks/cli-1.1.36-a4gh459t.mjs +2 -0
- package/dist/chunks/cli-1.1.36-adsb7266.mjs +2 -0
- package/dist/chunks/cli-1.1.36-ahr5fnjy.mjs +2 -0
- package/dist/chunks/cli-1.1.36-apycha28.mjs +2 -0
- package/dist/chunks/cli-1.1.36-as3jtdj6.mjs +4 -0
- package/dist/chunks/cli-1.1.36-aypab30m.mjs +2 -0
- package/dist/chunks/cli-1.1.36-b0rge62y.mjs +133 -0
- package/dist/chunks/cli-1.1.36-b54n0msa.mjs +2 -0
- package/dist/chunks/cli-1.1.36-b77v7k9g.mjs +3 -0
- package/dist/chunks/cli-1.1.36-bsfazmtt.mjs +2 -0
- package/dist/chunks/cli-1.1.36-bxrew2k8.mjs +2 -0
- package/dist/chunks/cli-1.1.36-bywrsksg.mjs +2 -0
- package/dist/chunks/cli-1.1.36-c3rd4cfc.mjs +10 -0
- package/dist/chunks/cli-1.1.36-c4k9g1dk.mjs +2 -0
- package/dist/chunks/cli-1.1.36-c4pkjm54.mjs +2 -0
- package/dist/chunks/cli-1.1.36-cm2kys6t.mjs +2 -0
- package/dist/chunks/cli-1.1.36-cya5x9g3.mjs +2 -0
- package/dist/chunks/cli-1.1.36-d4bd8qw2.mjs +4 -0
- package/dist/chunks/cli-1.1.36-dpn3xp4e.mjs +2 -0
- package/dist/chunks/cli-1.1.36-dt9kgcr3.mjs +2 -0
- package/dist/chunks/cli-1.1.36-e5xkjjtj.mjs +21 -0
- package/dist/chunks/cli-1.1.36-ef3vjg8b.mjs +9 -0
- package/dist/chunks/cli-1.1.36-f6yxszv5.mjs +2 -0
- package/dist/chunks/cli-1.1.36-fd7xaf6g.mjs +2 -0
- package/dist/chunks/cli-1.1.36-fhnpvzaf.mjs +6 -0
- package/dist/chunks/cli-1.1.36-fj9nx7k4.mjs +10 -0
- package/dist/chunks/cli-1.1.36-fw6d7jyv.mjs +2 -0
- package/dist/chunks/cli-1.1.36-fxpd9jmz.mjs +2 -0
- package/dist/chunks/cli-1.1.36-gfn4xejp.mjs +17 -0
- package/dist/chunks/cli-1.1.36-gfx5kkq4.mjs +2 -0
- package/dist/chunks/cli-1.1.36-ggr2pkp7.mjs +2 -0
- package/dist/chunks/cli-1.1.36-gpks9z9m.mjs +2 -0
- package/dist/chunks/cli-1.1.36-h74yjk66.mjs +2 -0
- package/dist/chunks/cli-1.1.36-haxnmraq.mjs +24 -0
- package/dist/chunks/cli-1.1.36-hqmz0657.mjs +3 -0
- package/dist/chunks/cli-1.1.36-hvnr6rta.mjs +2 -0
- package/dist/chunks/cli-1.1.36-jnftcw4c.mjs +2 -0
- package/dist/chunks/cli-1.1.36-jpcwwd65.mjs +5 -0
- package/dist/chunks/cli-1.1.36-jqn2tez7.mjs +2 -0
- package/dist/chunks/cli-1.1.36-jx3e7dft.mjs +9 -0
- package/dist/chunks/cli-1.1.36-k14jc4fv.mjs +2 -0
- package/dist/chunks/cli-1.1.36-kzxdhaaz.mjs +2 -0
- package/dist/chunks/cli-1.1.36-m11p0exg.mjs +2 -0
- package/dist/chunks/cli-1.1.36-m981mqsb.mjs +39 -0
- package/dist/chunks/cli-1.1.36-mam7e8zn.mjs +11 -0
- package/dist/chunks/cli-1.1.36-mmre9943.mjs +2 -0
- package/dist/chunks/cli-1.1.36-n44emd29.mjs +2 -0
- package/dist/chunks/cli-1.1.36-n5etyd9m.mjs +2 -0
- package/dist/chunks/cli-1.1.36-n9knhbs6.mjs +6 -0
- package/dist/chunks/cli-1.1.36-nnzqwcsc.mjs +2 -0
- package/dist/chunks/cli-1.1.36-nqy7mzrt.mjs +45 -0
- package/dist/chunks/cli-1.1.36-nw3mandv.mjs +50 -0
- package/dist/chunks/cli-1.1.36-p0w1dm9g.mjs +2 -0
- package/dist/chunks/cli-1.1.36-p375v620.mjs +6 -0
- package/dist/chunks/cli-1.1.36-p7w1197h.mjs +2 -0
- package/dist/chunks/cli-1.1.36-psd41gmc.mjs +2 -0
- package/dist/chunks/cli-1.1.36-pwszcwqb.mjs +2 -0
- package/dist/chunks/cli-1.1.36-pxy9g55g.mjs +20 -0
- package/dist/chunks/cli-1.1.36-q2e0arg8.mjs +2 -0
- package/dist/chunks/cli-1.1.36-q4a30pjq.mjs +2 -0
- package/dist/chunks/cli-1.1.36-q9xgs0j5.mjs +3 -0
- package/dist/chunks/cli-1.1.36-qdefh0tg.mjs +2 -0
- package/dist/chunks/cli-1.1.36-qm9492fw.mjs +2 -0
- package/dist/chunks/cli-1.1.36-qn4td7gm.mjs +4 -0
- package/dist/chunks/cli-1.1.36-qxdw7xas.mjs +3 -0
- package/dist/chunks/cli-1.1.36-qyd8fnkc.mjs +2 -0
- package/dist/chunks/cli-1.1.36-r241fh82.mjs +5 -0
- package/dist/chunks/cli-1.1.36-r2svaxxt.mjs +25 -0
- package/dist/chunks/cli-1.1.36-rh00pabh.mjs +2 -0
- package/dist/chunks/cli-1.1.36-rkcfjk5n.mjs +8 -0
- package/dist/chunks/cli-1.1.36-rp1ck3rr.mjs +2 -0
- package/dist/chunks/cli-1.1.36-rqhp2xt1.mjs +24 -0
- package/dist/chunks/cli-1.1.36-rv222he2.mjs +2 -0
- package/dist/chunks/cli-1.1.36-rwa4g74g.mjs +3 -0
- package/dist/chunks/cli-1.1.36-rwqe4psg.mjs +2 -0
- package/dist/chunks/cli-1.1.36-s8jcsdgb.mjs +16 -0
- package/dist/chunks/cli-1.1.36-s9ar9y3g.mjs +42 -0
- package/dist/chunks/cli-1.1.36-sd51t79y.mjs +2 -0
- package/dist/chunks/cli-1.1.36-ss62b517.mjs +63 -0
- package/dist/chunks/cli-1.1.36-t0ncrwb0.mjs +2 -0
- package/dist/chunks/cli-1.1.36-t6sjxpcb.mjs +251 -0
- package/dist/chunks/cli-1.1.36-tda1q99k.mjs +2 -0
- package/dist/chunks/cli-1.1.36-tvr7rnm0.mjs +2 -0
- package/dist/chunks/cli-1.1.36-v0s0vqmm.mjs +5551 -0
- package/dist/chunks/cli-1.1.36-v5nxnkwj.mjs +2 -0
- package/dist/chunks/cli-1.1.36-vdy55pxe.mjs +2 -0
- package/dist/chunks/cli-1.1.36-vz7m93en.mjs +2 -0
- package/dist/chunks/cli-1.1.36-w1nf9wd0.mjs +10 -0
- package/dist/chunks/cli-1.1.36-w23zxn8g.mjs +2 -0
- package/dist/chunks/cli-1.1.36-wdrt641n.mjs +25 -0
- package/dist/chunks/cli-1.1.36-wdvzyaky.mjs +2 -0
- package/dist/chunks/cli-1.1.36-wfgjsqkk.mjs +2 -0
- package/dist/chunks/cli-1.1.36-wwwj09sw.mjs +2 -0
- package/dist/chunks/cli-1.1.36-x0qqxv1t.mjs +2 -0
- package/dist/chunks/cli-1.1.36-x11fzb6n.mjs +2 -0
- package/dist/chunks/cli-1.1.36-x1761kx6.mjs +2 -0
- package/dist/chunks/cli-1.1.36-xf45p3qr.mjs +2 -0
- package/dist/chunks/cli-1.1.36-xj95r55n.mjs +2 -0
- package/dist/chunks/cli-1.1.36-xs4p38vb.mjs +6 -0
- package/dist/chunks/cli-1.1.36-xvwc8bka.mjs +2 -0
- package/dist/chunks/cli-1.1.36-ya2s1rfy.mjs +18 -0
- package/dist/chunks/cli-1.1.36-yew13j62.mjs +2 -0
- package/dist/chunks/cli-1.1.36-ykz9vwbf.mjs +2 -0
- package/dist/chunks/cli-1.1.36-yrgfywq5.mjs +24 -0
- package/dist/chunks/cli-1.1.36-z5djkbwy.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zax3mr51.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zbn66hn9.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zd032ger.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zeahx79z.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zey2drb2.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zv6ffhhy.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zw8q3z61.mjs +2 -0
- package/dist/chunks/cli-1.1.36-zzpdy0k8.mjs +2 -0
- package/dist/chunks/client-1.1.36-ydq31jce.mjs +1 -0
- package/dist/chunks/color-1.1.36-9fjvayey.mjs +1 -0
- package/dist/chunks/compact-1.1.36-p42ft3yq.mjs +2 -0
- package/dist/chunks/config-1.1.36-42ab04bq.mjs +1 -0
- package/dist/chunks/config-1.1.36-x636yezt.mjs +1 -0
- package/dist/chunks/constants-1.1.36-ba1bvty5.mjs +1 -0
- package/dist/chunks/context-1.1.36-zjvkgfrr.mjs +1 -0
- package/dist/chunks/context-noninteractive-1.1.36-f5rax1ah.mjs +1 -0
- package/dist/chunks/conversation-1.1.36-jd5867c5.mjs +1 -0
- package/dist/chunks/copilotHeaders-1.1.36-dg9s10xt.mjs +1 -0
- package/dist/chunks/copy-1.1.36-95ds743c.mjs +9 -0
- package/dist/chunks/cost-1.1.36-vhm8f7tp.mjs +1 -0
- package/dist/chunks/createSession-1.1.36-haxa0dvw.mjs +1 -0
- package/dist/chunks/debug-1.1.36-fvyvxmx1.mjs +1 -0
- package/dist/chunks/defaultActionDeps-1.1.36-24ag19wj.mjs +1458 -0
- package/dist/chunks/desktop-1.1.36-n6x2epmn.mjs +2 -0
- package/dist/chunks/detectRepository-1.1.36-ktxtd4ej.mjs +1 -0
- package/dist/chunks/detection-1.1.36-s8z7d4bm.mjs +1 -0
- package/dist/chunks/diff-1.1.36-0mrzd4kw.mjs +1 -0
- package/dist/chunks/doctor-1.1.36-tta8yrqq.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-1.1.36-1j38851d.mjs +1 -0
- package/dist/chunks/earlyInput-1.1.36-rv44jymf.mjs +1 -0
- package/dist/chunks/effort-1.1.36-yd22tc48.mjs +13 -0
- package/dist/chunks/engine-1.1.36-cf09xwf2.mjs +1 -0
- package/dist/chunks/envUtils-1.1.36-e9dd4q6g.mjs +1 -0
- package/dist/chunks/errors-1.1.36-86veg19m.mjs +1 -0
- package/dist/chunks/exampleCommands-1.1.36-nmf2s84f.mjs +1 -0
- package/dist/chunks/execFileNoThrow-1.1.36-naz9kbtt.mjs +1 -0
- package/dist/chunks/exit-1.1.36-53t418pg.mjs +1 -0
- package/dist/chunks/explorer-1.1.36-pgghex3j.mjs +1 -0
- package/dist/chunks/export-1.1.36-1ynxg1wb.mjs +2 -0
- package/dist/chunks/fast-1.1.36-f64h2t2k.mjs +1 -0
- package/dist/chunks/feedback-1.1.36-vgb10qbs.mjs +16 -0
- package/dist/chunks/git-1.1.36-f934674g.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-1.1.36-f2yec5gh.mjs +1 -0
- package/dist/chunks/goal-1.1.36-yyy0jkwz.mjs +4 -0
- package/dist/chunks/headless-1.1.36-47ts4j1h.mjs +2 -0
- package/dist/chunks/heapdump-1.1.36-hhwpz3jf.mjs +6 -0
- package/dist/chunks/help-1.1.36-zr7z9tga.mjs +1 -0
- package/dist/chunks/hooks-1.1.36-and1agcb.mjs +79 -0
- package/dist/chunks/hooks-1.1.36-qgd5x79v.mjs +1 -0
- package/dist/chunks/ide-1.1.36-afc5wn8q.mjs +3 -0
- package/dist/chunks/image-processor-napi-1.1.36-ycj021z0.mjs +1 -0
- package/dist/chunks/import-1.1.36-jrjb5s4n.mjs +261 -0
- package/dist/chunks/inboundAttachments-1.1.36-h1yrtqms.mjs +1 -0
- package/dist/chunks/index-1.1.36-048ng2px.mjs +1 -0
- package/dist/chunks/index-1.1.36-1mbx6axa.mjs +1 -0
- package/dist/chunks/index-1.1.36-1rzdb7w0.mjs +1 -0
- package/dist/chunks/index-1.1.36-312tvs2v.mjs +2 -0
- package/dist/chunks/index-1.1.36-46vz4hm5.mjs +5 -0
- package/dist/chunks/index-1.1.36-4dth0mx8.mjs +1 -0
- package/dist/chunks/index-1.1.36-5bc8t250.mjs +9 -0
- package/dist/chunks/index-1.1.36-6mpk59p2.mjs +1 -0
- package/dist/chunks/index-1.1.36-83wpkv8f.mjs +30 -0
- package/dist/chunks/index-1.1.36-8s1fe47p.mjs +9 -0
- package/dist/chunks/index-1.1.36-95xjkxf6.mjs +1 -0
- package/dist/chunks/index-1.1.36-c90kzpg9.mjs +1 -0
- package/dist/chunks/index-1.1.36-ectpcy01.mjs +1 -0
- package/dist/chunks/index-1.1.36-f33wa99v.mjs +1 -0
- package/dist/chunks/index-1.1.36-fgj4arq3.mjs +23 -0
- package/dist/chunks/index-1.1.36-fr144w7s.mjs +1 -0
- package/dist/chunks/index-1.1.36-keejgmvt.mjs +1 -0
- package/dist/chunks/index-1.1.36-knytd0n4.mjs +1 -0
- package/dist/chunks/index-1.1.36-m21fh89b.mjs +1 -0
- package/dist/chunks/index-1.1.36-n3tpswv4.mjs +1 -0
- package/dist/chunks/index-1.1.36-q6468dg7.mjs +1 -0
- package/dist/chunks/index-1.1.36-svzjvq7t.mjs +1 -0
- package/dist/chunks/index-1.1.36-vpaaz84z.mjs +2 -0
- package/dist/chunks/init-1.1.36-16rj95sf.mjs +2 -0
- package/dist/chunks/initReplBridge-1.1.36-xganfz86.mjs +1 -0
- package/dist/chunks/ink-1.1.36-ayvk483m.mjs +1 -0
- package/dist/chunks/insights-1.1.36-0kqbkgbz.mjs +870 -0
- package/dist/chunks/install-1.1.36-3v0b55mh.mjs +1 -0
- package/dist/chunks/install-github-app-1.1.36-6ybyxdq5.mjs +149 -0
- package/dist/chunks/install-slack-app-1.1.36-040ssrxp.mjs +1 -0
- package/dist/chunks/interactiveHelpers-1.1.36-2fm0smr3.mjs +1 -0
- package/dist/chunks/latestVersionCache-1.1.36-9fa4kpt8.mjs +1 -0
- package/dist/chunks/loadAgentsDir-1.1.36-t9mhqgv5.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.1.36-vf3yqk6b.mjs +1 -0
- package/dist/chunks/log-1.1.36-zazc6e80.mjs +1 -0
- package/dist/chunks/main-1.1.36-r3b0ysm4.mjs +1 -0
- package/dist/chunks/managedEnv-1.1.36-nksy6dte.mjs +1 -0
- package/dist/chunks/mcp-1.1.36-7fbqeb90.mjs +17 -0
- package/dist/chunks/mcp-1.1.36-d2df02nr.mjs +4 -0
- package/dist/chunks/mcp-1.1.36-dj3ctzg2.mjs +1 -0
- package/dist/chunks/mcpb-1.1.36-7hcc3bm8.mjs +1 -0
- package/dist/chunks/memory-1.1.36-4h4pw21v.mjs +128 -0
- package/dist/chunks/model-1.1.36-3vvdafvs.mjs +1 -0
- package/dist/chunks/model-1.1.36-pvrxzcbd.mjs +2 -0
- package/dist/chunks/node-1.1.36-xhks7s8w.mjs +15 -0
- package/dist/chunks/node-1.1.36-z1nceabc.mjs +1 -0
- package/dist/chunks/oauth-1.1.36-w0jf6x39.mjs +1 -0
- package/dist/chunks/openaiShim-1.1.36-m75hvh8e.mjs +14 -0
- package/dist/chunks/output-style-1.1.36-c0mgemjb.mjs +1 -0
- package/dist/chunks/package-F6O7J2XI-1.1.36-kfm7v15k.mjs +1 -0
- package/dist/chunks/permissions-1.1.36-20jz1yq3.mjs +3 -0
- package/dist/chunks/permissions-1.1.36-mtf6m3pf.mjs +1 -0
- package/dist/chunks/plan-1.1.36-r2k6ysce.mjs +1 -0
- package/dist/chunks/plist-1.1.36-8vg2xrj2.mjs +1 -0
- package/dist/chunks/plugin-1.1.36-xa4j4bj2.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-1.1.36-7bczq621.mjs +1 -0
- package/dist/chunks/plugins-1.1.36-ck8ycs01.mjs +9 -0
- package/dist/chunks/preActionHook-1.1.36-yt9dm2yh.mjs +2 -0
- package/dist/chunks/print-1.1.36-gcmgxxx7.mjs +57 -0
- package/dist/chunks/process-1.1.36-4kdmcjeq.mjs +1 -0
- package/dist/chunks/processBashCommand-1.1.36-5tbfja2m.mjs +1 -0
- package/dist/chunks/processSlashCommand-1.1.36-db99hjpc.mjs +9 -0
- package/dist/chunks/prompt-1.1.36-7qyxemw6.mjs +1 -0
- package/dist/chunks/prompt-1.1.36-tx374tzn.mjs +1 -0
- package/dist/chunks/prompts-1.1.36-gj1pggdg.mjs +1 -0
- package/dist/chunks/provider-1.1.36-d73knpnr.mjs +2 -0
- package/dist/chunks/providerProfiles-1.1.36-v0p0gdag.mjs +1 -0
- package/dist/chunks/providerValidation-1.1.36-bzznd00d.mjs +6 -0
- package/dist/chunks/registerSubcommands-1.1.36-8s9pb6g7.mjs +26 -0
- package/dist/chunks/registry-1.1.36-4bt4ac4z.mjs +1 -0
- package/dist/chunks/release-notes-1.1.36-zbexvzjp.mjs +5 -0
- package/dist/chunks/reload-plugins-1.1.36-n8nwygb8.mjs +2 -0
- package/dist/chunks/remote-env-1.1.36-fr8j8hcc.mjs +1 -0
- package/dist/chunks/rename-1.1.36-x06agpgx.mjs +1 -0
- package/dist/chunks/replLauncher-1.1.36-2hp08v6r.mjs +1 -0
- package/dist/chunks/resume-1.1.36-1srfb0q2.mjs +2 -0
- package/dist/chunks/rewind-1.1.36-zkycjr7d.mjs +1 -0
- package/dist/chunks/rootOptions-1.1.36-4m9s4acv.mjs +1 -0
- package/dist/chunks/runWorkflowHeadless-1.1.36-jbtcynyc.mjs +10 -0
- package/dist/chunks/sandbox-adapter-1.1.36-xrvrh2qp.mjs +1 -0
- package/dist/chunks/sandbox-toggle-1.1.36-2yw8m1jq.mjs +1 -0
- package/dist/chunks/session-1.1.36-dxen3cg6.mjs +2 -0
- package/dist/chunks/sessionStorage-1.1.36-dbt045aw.mjs +1 -0
- package/dist/chunks/settings-1.1.36-jb6t4nt2.mjs +1 -0
- package/dist/chunks/setup-1.1.36-7ady6j9j.mjs +12 -0
- package/dist/chunks/sinks-1.1.36-j124tdmn.mjs +1 -0
- package/dist/chunks/skills-1.1.36-wad885e2.mjs +1 -0
- package/dist/chunks/startupProfiler-1.1.36-0xnygcy5.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-1.1.36-6mvjw2sk.mjs +1 -0
- package/dist/chunks/state-1.1.36-mwqgyp6n.mjs +1 -0
- package/dist/chunks/stats-1.1.36-yzk5t8nc.mjs +1 -0
- package/dist/chunks/status-1.1.36-8b177p6e.mjs +1 -0
- package/dist/chunks/stickers-1.1.36-kdxt4s8f.mjs +1 -0
- package/dist/chunks/subprocessEnv-1.1.36-g1a43154.mjs +1 -0
- package/dist/chunks/tasks-1.1.36-cnmsc211.mjs +1 -0
- package/dist/chunks/teamHelpers-1.1.36-1pwk4n3y.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-1.1.36-2stc51nw.mjs +1 -0
- package/dist/chunks/teleport-1.1.36-tdvpgdhd.mjs +1 -0
- package/dist/chunks/terminalSetup-1.1.36-agbzd4wd.mjs +1 -0
- package/dist/chunks/theme-1.1.36-2w481ds6.mjs +1 -0
- package/dist/chunks/toolPool-1.1.36-hdw9b8ht.mjs +1 -0
- package/dist/chunks/toolSearch-1.1.36-ccs29nek.mjs +1 -0
- package/dist/chunks/tools-1.1.36-zqsjpqnk.mjs +1 -0
- package/dist/chunks/turndown.cjs-1.1.36-pwcp7479.mjs +69 -0
- package/dist/chunks/types-1.1.36-bwfasf0g.mjs +1 -0
- package/dist/chunks/update-1.1.36-hzk0xj2g.mjs +72 -0
- package/dist/chunks/upload-1.1.36-mb3a5t01.mjs +7 -0
- package/dist/chunks/upstreamproxy-1.1.36-x1y5p82n.mjs +14 -0
- package/dist/chunks/usage-1.1.36-qzytaj6z.mjs +1 -0
- package/dist/chunks/util-1.1.36-kb0yef79.mjs +1 -0
- package/dist/chunks/utils-1.1.36-fm3eywyj.mjs +1 -0
- package/dist/chunks/vim-1.1.36-x7adhmdd.mjs +1 -0
- package/dist/chunks/watchLoop-1.1.36-4s334wzz.mjs +13 -0
- package/dist/chunks/wiki-1.1.36-dn9csm8a.mjs +132 -0
- package/dist/chunks/workflows-1.1.36-v5b9khnt.mjs +1 -0
- package/dist/chunks/worktree-1.1.36-cesdwabt.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-1.1.36-m20cdekt.mjs +1 -0
- package/dist/chunks/wrapper-1.1.36-1m0td68t.mjs +7 -0
- package/dist/cli.mjs +2 -2
- package/package.json +9 -9
- package/dist/chunks/App-1.1.35-r3nj6jfs.mjs +0 -1
- package/dist/chunks/ApproveApiKey-1.1.35-8nvhxyw9.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-1.1.35-1ywwnh39.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-1.1.35-bvk75rww.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.35-1ct3fw8c.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1.1.35-nt22bzb6.mjs +0 -1
- package/dist/chunks/DiffDialog-1.1.35-98xrgmtc.mjs +0 -6
- package/dist/chunks/Doctor-1.1.35-k34y3jy9.mjs +0 -1
- package/dist/chunks/ExplorerDialog-1.1.35-nan1wyke.mjs +0 -6
- package/dist/chunks/ITermBackend-1.1.35-kt3ng0j6.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-1.1.35-k7wnc3v8.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-1.1.35-3dp4jb6e.mjs +0 -1
- package/dist/chunks/MigrationDialog-1.1.35-6pa67bzn.mjs +0 -1
- package/dist/chunks/Onboarding-1.1.35-4sje6bjv.mjs +0 -1
- package/dist/chunks/ProviderManager-1.1.35-99y8t1j9.mjs +0 -1
- package/dist/chunks/REPL-1.1.35-0vqh1ns0.mjs +0 -1
- package/dist/chunks/ResumeConversation-1.1.35-104fszyr.mjs +0 -1
- package/dist/chunks/TeleportProgress-1.1.35-xcz2dypc.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.35-nfckw5cx.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-1.1.35-6528ybrk.mjs +0 -1
- package/dist/chunks/TmuxBackend-1.1.35-rqncjk99.mjs +0 -9
- package/dist/chunks/ToolSearchTool-1.1.35-0t2d7g7n.mjs +0 -1
- package/dist/chunks/TrustDialog-1.1.35-j9d3asbg.mjs +0 -1
- package/dist/chunks/activeProvider-1.1.35-fkjy6sz1.mjs +0 -1
- package/dist/chunks/add-dir-1.1.35-4gh89hh4.mjs +0 -1
- package/dist/chunks/agentTypes-1.1.35-nx5q66t5.mjs +0 -1
- package/dist/chunks/agents-1.1.35-0kyfdt7w.mjs +0 -3
- package/dist/chunks/agents-1.1.35-1vzstv4y.mjs +0 -110
- package/dist/chunks/api-1.1.35-ab0j2x7t.mjs +0 -1
- package/dist/chunks/asciicast-1.1.35-xgjp2wrs.mjs +0 -1
- package/dist/chunks/auth-1.1.35-2fpa9v9f.mjs +0 -1
- package/dist/chunks/auth-1.1.35-deksnwe8.mjs +0 -1
- package/dist/chunks/autoMode-1.1.35-8d2qr79q.mjs +0 -52
- package/dist/chunks/autoModeSetup-1.1.35-hg5dxv1t.mjs +0 -44
- package/dist/chunks/autoUpdater-1.1.35-5pzsrenf.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-1.1.35-2kythx4m.mjs +0 -1
- package/dist/chunks/branch-1.1.35-tmksh596.mjs +0 -4
- package/dist/chunks/bridge-1.1.35-0za41yjp.mjs +0 -2
- package/dist/chunks/bridgeConfig-1.1.35-qtvayvc3.mjs +0 -1
- package/dist/chunks/bridgeEnabled-1.1.35-3mhemdrx.mjs +0 -1
- package/dist/chunks/bridgeMain-1.1.35-7awverkv.mjs +0 -88
- package/dist/chunks/bridgePointer-1.1.35-5gpfg6h4.mjs +0 -1
- package/dist/chunks/btw-1.1.35-6hy8wabr.mjs +0 -1
- package/dist/chunks/buddy-1.1.35-8z3tb1ne.mjs +0 -3
- package/dist/chunks/cache-probe-1.1.35-adn6dpak.mjs +0 -21
- package/dist/chunks/cacheStats-1.1.35-z3268gay.mjs +0 -4
- package/dist/chunks/caches-1.1.35-1qqfgvsm.mjs +0 -1
- package/dist/chunks/cd-1.1.35-vqy7n0x0.mjs +0 -3
- package/dist/chunks/claudeDesktop-1.1.35-enw3hpss.mjs +0 -1
- package/dist/chunks/claudemd-1.1.35-wsav3shz.mjs +0 -1
- package/dist/chunks/clear-1.1.35-21ry6n0m.mjs +0 -1
- package/dist/chunks/clearTerminal-1.1.35-sg808cbp.mjs +0 -1
- package/dist/chunks/cli-1.1.35-02qx9a8j.mjs +0 -2
- package/dist/chunks/cli-1.1.35-0axe3ev5.mjs +0 -2
- package/dist/chunks/cli-1.1.35-0feday40.mjs +0 -20
- package/dist/chunks/cli-1.1.35-0p69hr1j.mjs +0 -2
- package/dist/chunks/cli-1.1.35-0qrw70p1.mjs +0 -2
- package/dist/chunks/cli-1.1.35-0tc3wmtp.mjs +0 -5
- package/dist/chunks/cli-1.1.35-0vpxr2rk.mjs +0 -2
- package/dist/chunks/cli-1.1.35-0zkzg6at.mjs +0 -2
- package/dist/chunks/cli-1.1.35-1618y169.mjs +0 -2
- package/dist/chunks/cli-1.1.35-18wszrez.mjs +0 -15
- package/dist/chunks/cli-1.1.35-1bzyzrvt.mjs +0 -2
- package/dist/chunks/cli-1.1.35-1ceb2tjb.mjs +0 -2
- package/dist/chunks/cli-1.1.35-1gae8a5m.mjs +0 -2
- package/dist/chunks/cli-1.1.35-1x2wb524.mjs +0 -2
- package/dist/chunks/cli-1.1.35-21w0bna1.mjs +0 -2
- package/dist/chunks/cli-1.1.35-22q1jqqq.mjs +0 -2
- package/dist/chunks/cli-1.1.35-2gxxpyvc.mjs +0 -2
- package/dist/chunks/cli-1.1.35-2sm1x5n8.mjs +0 -2
- package/dist/chunks/cli-1.1.35-2x0m7ewe.mjs +0 -9
- package/dist/chunks/cli-1.1.35-34h7nfzz.mjs +0 -11
- package/dist/chunks/cli-1.1.35-389ej7r1.mjs +0 -2
- package/dist/chunks/cli-1.1.35-38s8y5cf.mjs +0 -2
- package/dist/chunks/cli-1.1.35-3keqk8xr.mjs +0 -2
- package/dist/chunks/cli-1.1.35-3zrjqd93.mjs +0 -2
- package/dist/chunks/cli-1.1.35-41srzc8c.mjs +0 -2
- package/dist/chunks/cli-1.1.35-46bm9f8q.mjs +0 -2
- package/dist/chunks/cli-1.1.35-4d0cm3mc.mjs +0 -2
- package/dist/chunks/cli-1.1.35-4d9merys.mjs +0 -2
- package/dist/chunks/cli-1.1.35-4g77zek0.mjs +0 -24
- package/dist/chunks/cli-1.1.35-4kft2wxe.mjs +0 -2
- package/dist/chunks/cli-1.1.35-4njf7z42.mjs +0 -2
- package/dist/chunks/cli-1.1.35-4typvdqe.mjs +0 -2
- package/dist/chunks/cli-1.1.35-589b1qht.mjs +0 -2
- package/dist/chunks/cli-1.1.35-5b39mwe0.mjs +0 -2
- package/dist/chunks/cli-1.1.35-5j12hjjm.mjs +0 -2
- package/dist/chunks/cli-1.1.35-5v115fee.mjs +0 -2
- package/dist/chunks/cli-1.1.35-61gmwbbt.mjs +0 -2
- package/dist/chunks/cli-1.1.35-688xsqg8.mjs +0 -2
- package/dist/chunks/cli-1.1.35-6c4v5dpe.mjs +0 -15
- package/dist/chunks/cli-1.1.35-6nhv8vhv.mjs +0 -2
- package/dist/chunks/cli-1.1.35-6p10e278.mjs +0 -2
- package/dist/chunks/cli-1.1.35-7g4yw92j.mjs +0 -2
- package/dist/chunks/cli-1.1.35-7hfdc6xn.mjs +0 -2
- package/dist/chunks/cli-1.1.35-7mxbj45y.mjs +0 -2
- package/dist/chunks/cli-1.1.35-7mz6cnfb.mjs +0 -6
- package/dist/chunks/cli-1.1.35-7nsr0a6p.mjs +0 -2
- package/dist/chunks/cli-1.1.35-7p1685r1.mjs +0 -2
- package/dist/chunks/cli-1.1.35-7tt5b2wx.mjs +0 -2
- package/dist/chunks/cli-1.1.35-7y74em05.mjs +0 -2
- package/dist/chunks/cli-1.1.35-82ak1wpt.mjs +0 -7
- package/dist/chunks/cli-1.1.35-854kyr9a.mjs +0 -3
- package/dist/chunks/cli-1.1.35-85zb0hfp.mjs +0 -2
- package/dist/chunks/cli-1.1.35-873xb9w7.mjs +0 -2
- package/dist/chunks/cli-1.1.35-8b1qqrev.mjs +0 -135
- package/dist/chunks/cli-1.1.35-8d9f31xx.mjs +0 -2
- package/dist/chunks/cli-1.1.35-8qdvqjz3.mjs +0 -2
- package/dist/chunks/cli-1.1.35-8ttx7y70.mjs +0 -2
- package/dist/chunks/cli-1.1.35-959df5vk.mjs +0 -2
- package/dist/chunks/cli-1.1.35-9817kkw4.mjs +0 -3
- package/dist/chunks/cli-1.1.35-9dkpx812.mjs +0 -2
- package/dist/chunks/cli-1.1.35-9tnc0a3x.mjs +0 -2
- package/dist/chunks/cli-1.1.35-9z4kwrpr.mjs +0 -6
- package/dist/chunks/cli-1.1.35-a7ygtwdr.mjs +0 -5
- package/dist/chunks/cli-1.1.35-a8677mcz.mjs +0 -2
- package/dist/chunks/cli-1.1.35-a9y8qxsj.mjs +0 -6
- package/dist/chunks/cli-1.1.35-an20pj6q.mjs +0 -2
- package/dist/chunks/cli-1.1.35-arj7fm1n.mjs +0 -2
- package/dist/chunks/cli-1.1.35-b0n88pf7.mjs +0 -2
- package/dist/chunks/cli-1.1.35-bbq4frhw.mjs +0 -2
- package/dist/chunks/cli-1.1.35-bhmad6rp.mjs +0 -3
- package/dist/chunks/cli-1.1.35-bka68014.mjs +0 -2
- package/dist/chunks/cli-1.1.35-bq7wadxz.mjs +0 -2
- package/dist/chunks/cli-1.1.35-c05841mj.mjs +0 -2
- package/dist/chunks/cli-1.1.35-c3vqfrj0.mjs +0 -45
- package/dist/chunks/cli-1.1.35-c4thx500.mjs +0 -26
- package/dist/chunks/cli-1.1.35-cj42e7aq.mjs +0 -24
- package/dist/chunks/cli-1.1.35-cjdzbmst.mjs +0 -2
- package/dist/chunks/cli-1.1.35-cjsf2kh3.mjs +0 -2
- package/dist/chunks/cli-1.1.35-cm0anghq.mjs +0 -2
- package/dist/chunks/cli-1.1.35-cp6wwahj.mjs +0 -4
- package/dist/chunks/cli-1.1.35-d6kd2zv5.mjs +0 -2
- package/dist/chunks/cli-1.1.35-d7n85zf2.mjs +0 -2
- package/dist/chunks/cli-1.1.35-da72zgbs.mjs +0 -50
- package/dist/chunks/cli-1.1.35-dfcj4fkz.mjs +0 -2
- package/dist/chunks/cli-1.1.35-dk4f6kgr.mjs +0 -2
- package/dist/chunks/cli-1.1.35-dnacc640.mjs +0 -252
- package/dist/chunks/cli-1.1.35-dw3fv0g8.mjs +0 -60
- package/dist/chunks/cli-1.1.35-dwaz1jv4.mjs +0 -2
- package/dist/chunks/cli-1.1.35-e08b8j98.mjs +0 -18
- package/dist/chunks/cli-1.1.35-eqcgyqke.mjs +0 -39
- package/dist/chunks/cli-1.1.35-ewtk80cp.mjs +0 -3
- package/dist/chunks/cli-1.1.35-f6sa351s.mjs +0 -5
- package/dist/chunks/cli-1.1.35-f8jgxvev.mjs +0 -2
- package/dist/chunks/cli-1.1.35-fgkpe9g9.mjs +0 -2
- package/dist/chunks/cli-1.1.35-fjtf9x1v.mjs +0 -2
- package/dist/chunks/cli-1.1.35-fr8gap0y.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ftvtbdm6.mjs +0 -4
- package/dist/chunks/cli-1.1.35-fwyc7v71.mjs +0 -7
- package/dist/chunks/cli-1.1.35-fz50q22a.mjs +0 -2
- package/dist/chunks/cli-1.1.35-g2vg6fw2.mjs +0 -2
- package/dist/chunks/cli-1.1.35-g7086zkj.mjs +0 -2
- package/dist/chunks/cli-1.1.35-g74y15na.mjs +0 -2
- package/dist/chunks/cli-1.1.35-gcjyc9x3.mjs +0 -2
- package/dist/chunks/cli-1.1.35-gr966v4t.mjs +0 -2
- package/dist/chunks/cli-1.1.35-h06ng57d.mjs +0 -2
- package/dist/chunks/cli-1.1.35-h262sgvd.mjs +0 -4
- package/dist/chunks/cli-1.1.35-h71ph12s.mjs +0 -2
- package/dist/chunks/cli-1.1.35-h7qpm4z8.mjs +0 -3
- package/dist/chunks/cli-1.1.35-hm1wpf1w.mjs +0 -2
- package/dist/chunks/cli-1.1.35-htvjtg4f.mjs +0 -2
- package/dist/chunks/cli-1.1.35-hwphkmp4.mjs +0 -2
- package/dist/chunks/cli-1.1.35-hy9jtbmb.mjs +0 -5570
- package/dist/chunks/cli-1.1.35-hyqzaskn.mjs +0 -2
- package/dist/chunks/cli-1.1.35-j1ypjsz5.mjs +0 -2
- package/dist/chunks/cli-1.1.35-j7xxkgf1.mjs +0 -133
- package/dist/chunks/cli-1.1.35-jajp8grw.mjs +0 -2
- package/dist/chunks/cli-1.1.35-jdqn8gkp.mjs +0 -2
- package/dist/chunks/cli-1.1.35-jfzp91gv.mjs +0 -2
- package/dist/chunks/cli-1.1.35-jn52m495.mjs +0 -2
- package/dist/chunks/cli-1.1.35-jq1wvnwe.mjs +0 -17
- package/dist/chunks/cli-1.1.35-jrexyjt9.mjs +0 -2
- package/dist/chunks/cli-1.1.35-jvhs6ypf.mjs +0 -10
- package/dist/chunks/cli-1.1.35-jx42cnmn.mjs +0 -15
- package/dist/chunks/cli-1.1.35-k6jh38a3.mjs +0 -2
- package/dist/chunks/cli-1.1.35-kbrngf5h.mjs +0 -2
- package/dist/chunks/cli-1.1.35-kcgcs2dj.mjs +0 -2
- package/dist/chunks/cli-1.1.35-kdw3m4z1.mjs +0 -25
- package/dist/chunks/cli-1.1.35-kh8s6rf2.mjs +0 -4
- package/dist/chunks/cli-1.1.35-kkhrpw6q.mjs +0 -2
- package/dist/chunks/cli-1.1.35-kp2hgrdb.mjs +0 -24
- package/dist/chunks/cli-1.1.35-ktb8z2s9.mjs +0 -3
- package/dist/chunks/cli-1.1.35-kvw88dmk.mjs +0 -2
- package/dist/chunks/cli-1.1.35-kz5tydkv.mjs +0 -2
- package/dist/chunks/cli-1.1.35-m20xytkt.mjs +0 -2
- package/dist/chunks/cli-1.1.35-m6efjk78.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ma6czbht.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ms3xdp4c.mjs +0 -42
- package/dist/chunks/cli-1.1.35-ms5g0jwj.mjs +0 -2
- package/dist/chunks/cli-1.1.35-nahyfraf.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ne21zedp.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ngg53c9c.mjs +0 -2
- package/dist/chunks/cli-1.1.35-pa3rjff6.mjs +0 -2
- package/dist/chunks/cli-1.1.35-pgcrgrc3.mjs +0 -2
- package/dist/chunks/cli-1.1.35-pms9wnd8.mjs +0 -2
- package/dist/chunks/cli-1.1.35-pr69kkhz.mjs +0 -2
- package/dist/chunks/cli-1.1.35-prf6sjs7.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ps66nanc.mjs +0 -2
- package/dist/chunks/cli-1.1.35-pycaqt81.mjs +0 -2
- package/dist/chunks/cli-1.1.35-q1axe4bk.mjs +0 -2
- package/dist/chunks/cli-1.1.35-qb0eb8th.mjs +0 -2
- package/dist/chunks/cli-1.1.35-qbahm5cg.mjs +0 -2
- package/dist/chunks/cli-1.1.35-qgjs5ex0.mjs +0 -7
- package/dist/chunks/cli-1.1.35-qnfq8bw4.mjs +0 -4
- package/dist/chunks/cli-1.1.35-qvdpj1qb.mjs +0 -2
- package/dist/chunks/cli-1.1.35-qxj39xzd.mjs +0 -8
- package/dist/chunks/cli-1.1.35-qygaywxg.mjs +0 -34
- package/dist/chunks/cli-1.1.35-r4rm2297.mjs +0 -4
- package/dist/chunks/cli-1.1.35-r80cjbt8.mjs +0 -2
- package/dist/chunks/cli-1.1.35-rmfsk9nw.mjs +0 -2
- package/dist/chunks/cli-1.1.35-s05wj44h.mjs +0 -3
- package/dist/chunks/cli-1.1.35-s066wwsj.mjs +0 -3
- package/dist/chunks/cli-1.1.35-s367nd6g.mjs +0 -2
- package/dist/chunks/cli-1.1.35-s3d0nchc.mjs +0 -2
- package/dist/chunks/cli-1.1.35-s6n3pb03.mjs +0 -2
- package/dist/chunks/cli-1.1.35-s85hd24a.mjs +0 -16
- package/dist/chunks/cli-1.1.35-sg0tga4d.mjs +0 -2
- package/dist/chunks/cli-1.1.35-swxcv3xf.mjs +0 -6
- package/dist/chunks/cli-1.1.35-szkn08rr.mjs +0 -2
- package/dist/chunks/cli-1.1.35-t2vx6b45.mjs +0 -17
- package/dist/chunks/cli-1.1.35-t5kexs8c.mjs +0 -6
- package/dist/chunks/cli-1.1.35-t8c5b3qj.mjs +0 -4
- package/dist/chunks/cli-1.1.35-ta15z2yx.mjs +0 -10
- package/dist/chunks/cli-1.1.35-tsrq3cxy.mjs +0 -2
- package/dist/chunks/cli-1.1.35-tsx8c30n.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ve889dy8.mjs +0 -3
- package/dist/chunks/cli-1.1.35-w1mzdb9s.mjs +0 -2
- package/dist/chunks/cli-1.1.35-w6kgq9n5.mjs +0 -2
- package/dist/chunks/cli-1.1.35-w73x0912.mjs +0 -2
- package/dist/chunks/cli-1.1.35-w9wzew2x.mjs +0 -4
- package/dist/chunks/cli-1.1.35-wmcp8vyj.mjs +0 -2
- package/dist/chunks/cli-1.1.35-wpa5rfnt.mjs +0 -12
- package/dist/chunks/cli-1.1.35-wtjyzsga.mjs +0 -2
- package/dist/chunks/cli-1.1.35-ww28b5vj.mjs +0 -2
- package/dist/chunks/cli-1.1.35-x5ft52g3.mjs +0 -2
- package/dist/chunks/cli-1.1.35-xbhjhs1c.mjs +0 -3
- package/dist/chunks/cli-1.1.35-xdzsf38z.mjs +0 -2
- package/dist/chunks/cli-1.1.35-xs5mj8ee.mjs +0 -21
- package/dist/chunks/cli-1.1.35-y6bdqv7z.mjs +0 -2
- package/dist/chunks/cli-1.1.35-y6xhcehv.mjs +0 -25
- package/dist/chunks/cli-1.1.35-yns1ngnz.mjs +0 -2
- package/dist/chunks/cli-1.1.35-yta9zrj6.mjs +0 -2
- package/dist/chunks/cli-1.1.35-zbz78cha.mjs +0 -9
- package/dist/chunks/cli-1.1.35-zf7zq3kb.mjs +0 -63
- package/dist/chunks/client-1.1.35-2j9sd0sg.mjs +0 -1
- package/dist/chunks/color-1.1.35-nf9dqw3m.mjs +0 -1
- package/dist/chunks/compact-1.1.35-h8mqxxs0.mjs +0 -2
- package/dist/chunks/config-1.1.35-7t0vfbst.mjs +0 -1
- package/dist/chunks/config-1.1.35-cfhvn2fq.mjs +0 -1
- package/dist/chunks/constants-1.1.35-kst22e3x.mjs +0 -1
- package/dist/chunks/context-1.1.35-2nc26t9y.mjs +0 -1
- package/dist/chunks/context-noninteractive-1.1.35-0ym77q3t.mjs +0 -1
- package/dist/chunks/conversation-1.1.35-0q4g6qt8.mjs +0 -1
- package/dist/chunks/copilotHeaders-1.1.35-7a5mc98p.mjs +0 -1
- package/dist/chunks/copy-1.1.35-n37rvhzj.mjs +0 -9
- package/dist/chunks/cost-1.1.35-hjmwjk6s.mjs +0 -1
- package/dist/chunks/createSession-1.1.35-v7c15fc8.mjs +0 -1
- package/dist/chunks/debug-1.1.35-2hf8mhst.mjs +0 -1
- package/dist/chunks/defaultActionDeps-1.1.35-15jcbncs.mjs +0 -1480
- package/dist/chunks/desktop-1.1.35-6w6gjpff.mjs +0 -2
- package/dist/chunks/detectRepository-1.1.35-eztj0q3f.mjs +0 -1
- package/dist/chunks/detection-1.1.35-rfkb2dxe.mjs +0 -1
- package/dist/chunks/diff-1.1.35-xb27tkcx.mjs +0 -1
- package/dist/chunks/doctor-1.1.35-ddg564v7.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-1.1.35-1gfkz0p1.mjs +0 -1
- package/dist/chunks/earlyInput-1.1.35-5wsb4bkz.mjs +0 -1
- package/dist/chunks/effort-1.1.35-r53ttmc3.mjs +0 -13
- package/dist/chunks/engine-1.1.35-xthhbk9w.mjs +0 -1
- package/dist/chunks/envLessBridgeConfig-1.1.35-t6narn79.mjs +0 -1
- package/dist/chunks/envUtils-1.1.35-t6yq14ba.mjs +0 -1
- package/dist/chunks/errors-1.1.35-6m0kryy5.mjs +0 -1
- package/dist/chunks/exampleCommands-1.1.35-c7dhfj0z.mjs +0 -1
- package/dist/chunks/execFileNoThrow-1.1.35-39xh2ycx.mjs +0 -1
- package/dist/chunks/exit-1.1.35-zc8g5mnv.mjs +0 -1
- package/dist/chunks/explorer-1.1.35-784hbx9r.mjs +0 -1
- package/dist/chunks/export-1.1.35-5q6zdykx.mjs +0 -2
- package/dist/chunks/fast-1.1.35-fpsnnadp.mjs +0 -1
- package/dist/chunks/feedback-1.1.35-mdm8easg.mjs +0 -16
- package/dist/chunks/git-1.1.35-j2med41y.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-1.1.35-4xzf0z5w.mjs +0 -1
- package/dist/chunks/goal-1.1.35-yp44rshy.mjs +0 -4
- package/dist/chunks/headless-1.1.35-rxvrbe58.mjs +0 -2
- package/dist/chunks/heapdump-1.1.35-xkthm0kj.mjs +0 -6
- package/dist/chunks/help-1.1.35-6ppc7eee.mjs +0 -1
- package/dist/chunks/hooks-1.1.35-0e80c1wz.mjs +0 -79
- package/dist/chunks/hooks-1.1.35-f791gbgk.mjs +0 -1
- package/dist/chunks/ide-1.1.35-pz8m36fj.mjs +0 -3
- package/dist/chunks/image-processor-napi-1.1.35-56y5k454.mjs +0 -1
- package/dist/chunks/import-1.1.35-fcn1y643.mjs +0 -261
- package/dist/chunks/inboundAttachments-1.1.35-n6b7ppqk.mjs +0 -1
- package/dist/chunks/index-1.1.35-434cwyrk.mjs +0 -1
- package/dist/chunks/index-1.1.35-4ngbsgjz.mjs +0 -1
- package/dist/chunks/index-1.1.35-7nsjazx1.mjs +0 -1
- package/dist/chunks/index-1.1.35-8rnbf6ea.mjs +0 -1
- package/dist/chunks/index-1.1.35-e5amgccf.mjs +0 -1
- package/dist/chunks/index-1.1.35-eejex06g.mjs +0 -5
- package/dist/chunks/index-1.1.35-epm25vr2.mjs +0 -9
- package/dist/chunks/index-1.1.35-jxpschvm.mjs +0 -1
- package/dist/chunks/index-1.1.35-mdgw0byv.mjs +0 -9
- package/dist/chunks/index-1.1.35-n36e4pzf.mjs +0 -1
- package/dist/chunks/index-1.1.35-nnrmrgn5.mjs +0 -30
- package/dist/chunks/index-1.1.35-p1fttaxb.mjs +0 -1
- package/dist/chunks/index-1.1.35-p3ttta20.mjs +0 -1
- package/dist/chunks/index-1.1.35-pjz1v5fa.mjs +0 -1
- package/dist/chunks/index-1.1.35-pqswr512.mjs +0 -23
- package/dist/chunks/index-1.1.35-q464ks4t.mjs +0 -1
- package/dist/chunks/index-1.1.35-r5cefbke.mjs +0 -2
- package/dist/chunks/index-1.1.35-rf0z1h76.mjs +0 -1
- package/dist/chunks/index-1.1.35-wg3dwx0w.mjs +0 -2
- package/dist/chunks/index-1.1.35-xcm76j0n.mjs +0 -1
- package/dist/chunks/index-1.1.35-y7q90201.mjs +0 -1
- package/dist/chunks/index-1.1.35-y9scvznb.mjs +0 -1
- package/dist/chunks/index-1.1.35-yy5qsdz8.mjs +0 -1
- package/dist/chunks/init-1.1.35-hawgzj6s.mjs +0 -2
- package/dist/chunks/initReplBridge-1.1.35-aee08exn.mjs +0 -1
- package/dist/chunks/ink-1.1.35-9vhjhx60.mjs +0 -1
- package/dist/chunks/insights-1.1.35-2782qak6.mjs +0 -870
- package/dist/chunks/install-1.1.35-nptjkfk3.mjs +0 -1
- package/dist/chunks/install-github-app-1.1.35-v4ahg5m0.mjs +0 -149
- package/dist/chunks/install-slack-app-1.1.35-rc6ch1k0.mjs +0 -1
- package/dist/chunks/interactiveHelpers-1.1.35-1755rb8a.mjs +0 -1
- package/dist/chunks/keybindings-1.1.35-9qz4bvrq.mjs +0 -2
- package/dist/chunks/latestVersionCache-1.1.35-ff7kd1x3.mjs +0 -1
- package/dist/chunks/loadAgentsDir-1.1.35-nwtm30nv.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.1.35-jxqkv874.mjs +0 -1
- package/dist/chunks/log-1.1.35-h5x69tbw.mjs +0 -1
- package/dist/chunks/main-1.1.35-1e6064ax.mjs +0 -1
- package/dist/chunks/managedEnv-1.1.35-s6143dpv.mjs +0 -1
- package/dist/chunks/mcp-1.1.35-0tswravz.mjs +0 -1
- package/dist/chunks/mcp-1.1.35-bdv2pgpj.mjs +0 -17
- package/dist/chunks/mcp-1.1.35-khngfse0.mjs +0 -4
- package/dist/chunks/mcpb-1.1.35-p4jn8q66.mjs +0 -1
- package/dist/chunks/memory-1.1.35-zvk9c80b.mjs +0 -128
- package/dist/chunks/model-1.1.35-j8hp9tcm.mjs +0 -1
- package/dist/chunks/model-1.1.35-mb41ksj1.mjs +0 -2
- package/dist/chunks/node-1.1.35-312s6waw.mjs +0 -1
- package/dist/chunks/node-1.1.35-zzk2fc7x.mjs +0 -15
- package/dist/chunks/oauth-1.1.35-2pwvpgey.mjs +0 -1
- package/dist/chunks/openaiShim-1.1.35-6gbm01ym.mjs +0 -14
- package/dist/chunks/output-style-1.1.35-gbk18883.mjs +0 -1
- package/dist/chunks/package-F6O7J2XI-1.1.35-0z3efknf.mjs +0 -1
- package/dist/chunks/permissions-1.1.35-c11nnhp0.mjs +0 -3
- package/dist/chunks/permissions-1.1.35-vqtbrznv.mjs +0 -1
- package/dist/chunks/plan-1.1.35-5nz3m4kh.mjs +0 -1
- package/dist/chunks/plist-1.1.35-4bd0g91w.mjs +0 -1
- package/dist/chunks/plugin-1.1.35-0tg6jzxg.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-1.1.35-z1parxqs.mjs +0 -1
- package/dist/chunks/plugins-1.1.35-z14pz0dr.mjs +0 -9
- package/dist/chunks/preActionHook-1.1.35-9dyzn96j.mjs +0 -2
- package/dist/chunks/print-1.1.35-89rm2txf.mjs +0 -57
- package/dist/chunks/process-1.1.35-7x8d7kyn.mjs +0 -1
- package/dist/chunks/processBashCommand-1.1.35-hj8xz358.mjs +0 -1
- package/dist/chunks/processSlashCommand-1.1.35-egejjqfw.mjs +0 -9
- package/dist/chunks/prompt-1.1.35-aaz8q4j6.mjs +0 -1
- package/dist/chunks/prompt-1.1.35-f3fackax.mjs +0 -1
- package/dist/chunks/prompts-1.1.35-58wwfjfd.mjs +0 -1
- package/dist/chunks/provider-1.1.35-xwj158q8.mjs +0 -2
- package/dist/chunks/providerProfiles-1.1.35-6wzwgty6.mjs +0 -1
- package/dist/chunks/providerValidation-1.1.35-z9h8ampz.mjs +0 -6
- package/dist/chunks/registerSubcommands-1.1.35-7ewvmysm.mjs +0 -26
- package/dist/chunks/registry-1.1.35-y4zandg8.mjs +0 -1
- package/dist/chunks/release-notes-1.1.35-s31rkdxh.mjs +0 -5
- package/dist/chunks/reload-plugins-1.1.35-18xd3nwy.mjs +0 -2
- package/dist/chunks/remote-env-1.1.35-0v4tk5np.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-1.1.35-ev420056.mjs +0 -1
- package/dist/chunks/rename-1.1.35-m8chhebj.mjs +0 -1
- package/dist/chunks/replLauncher-1.1.35-483j4br6.mjs +0 -1
- package/dist/chunks/resume-1.1.35-vaxxp18n.mjs +0 -2
- package/dist/chunks/rewind-1.1.35-scs8763b.mjs +0 -1
- package/dist/chunks/rootOptions-1.1.35-9j5y8k9x.mjs +0 -1
- package/dist/chunks/runWorkflowHeadless-1.1.35-zjy5t791.mjs +0 -10
- package/dist/chunks/sandbox-adapter-1.1.35-qrmypwca.mjs +0 -1
- package/dist/chunks/sandbox-toggle-1.1.35-c2k8p98n.mjs +0 -1
- package/dist/chunks/session-1.1.35-78ew080a.mjs +0 -2
- package/dist/chunks/sessionStorage-1.1.35-0tyr8wn3.mjs +0 -1
- package/dist/chunks/settings-1.1.35-808m5j14.mjs +0 -1
- package/dist/chunks/setup-1.1.35-ebpewe9s.mjs +0 -12
- package/dist/chunks/sinks-1.1.35-nj35kk9h.mjs +0 -1
- package/dist/chunks/skills-1.1.35-zczajd48.mjs +0 -1
- package/dist/chunks/startupProfiler-1.1.35-wa5psc2j.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-1.1.35-0wac30ap.mjs +0 -1
- package/dist/chunks/state-1.1.35-gcp827qz.mjs +0 -1
- package/dist/chunks/stats-1.1.35-f1kndsge.mjs +0 -1
- package/dist/chunks/status-1.1.35-gwtdrkx2.mjs +0 -1
- package/dist/chunks/stickers-1.1.35-fa69zd3v.mjs +0 -1
- package/dist/chunks/subprocessEnv-1.1.35-8wsc86ft.mjs +0 -1
- package/dist/chunks/tasks-1.1.35-0wd1t6v2.mjs +0 -1
- package/dist/chunks/teamHelpers-1.1.35-13qqfhxa.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-1.1.35-wdbfsm1h.mjs +0 -1
- package/dist/chunks/teleport-1.1.35-tmhzqx90.mjs +0 -1
- package/dist/chunks/terminalSetup-1.1.35-6xq5nt25.mjs +0 -1
- package/dist/chunks/theme-1.1.35-4b6gd2dx.mjs +0 -1
- package/dist/chunks/thinkback-1.1.35-x88djqdz.mjs +0 -1
- package/dist/chunks/thinkback-play-1.1.35-g6n14rjh.mjs +0 -1
- package/dist/chunks/toolPool-1.1.35-0qd67zrc.mjs +0 -1
- package/dist/chunks/toolSearch-1.1.35-54dpcvf8.mjs +0 -1
- package/dist/chunks/tools-1.1.35-3hjsc7mm.mjs +0 -1
- package/dist/chunks/trustedDevice-1.1.35-szkdvqcz.mjs +0 -1
- package/dist/chunks/turndown.cjs-1.1.35-4azkv4s5.mjs +0 -69
- package/dist/chunks/types-1.1.35-ncfe8wzg.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-1.1.35-d271ddpn.mjs +0 -4
- package/dist/chunks/update-1.1.35-5zabq625.mjs +0 -72
- package/dist/chunks/upload-1.1.35-gey82edy.mjs +0 -7
- package/dist/chunks/upstreamproxy-1.1.35-bbztgd01.mjs +0 -14
- package/dist/chunks/usage-1.1.35-sx2ahz77.mjs +0 -1
- package/dist/chunks/util-1.1.35-aph6a5hy.mjs +0 -1
- package/dist/chunks/utils-1.1.35-avpezj08.mjs +0 -1
- package/dist/chunks/vim-1.1.35-e0jh10q6.mjs +0 -1
- package/dist/chunks/watchLoop-1.1.35-baxd01b0.mjs +0 -13
- package/dist/chunks/wiki-1.1.35-cns1572n.mjs +0 -132
- package/dist/chunks/workflows-1.1.35-0r21887z.mjs +0 -1
- package/dist/chunks/worktree-1.1.35-0mj24by3.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-1.1.35-6ej7pdyw.mjs +0 -1
- package/dist/chunks/wrapper-1.1.35-fpcy8t3v.mjs +0 -7
- /package/dist/chunks/{cli-1.1.35-hnqagxgk.mjs → cli-1.1.36-6kq395h8.mjs} +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import{Tra as W5,Vra as I$,Xra as x,Yra as LZ}from"./cli-1.1.35-c05841mj.mjs";function M(X,Z,$,J,z){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof Z==="function"?X!==Z||!z:!Z.has(X))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?z.call(X,$):z?z.value=$:Z.set(X,$),$}function Q(X,Z,$,J){if($==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof Z==="function"?X!==Z||!J:!Z.has(X))throw TypeError("Cannot read private member from an object whose class did not declare it");return $==="m"?J:$==="a"?J.call(X):J?J.value:Z.get(X)}var JZ=()=>{};function CZ(X){return typeof X==="object"&&X!==null&&(("name"in X)&&X.name==="AbortError"||("message"in X)&&String(X.message).includes("FetchRequestCanceledException"))}var dZ=(X)=>{if(X instanceof Error)return X;if(typeof X==="object"&&X!==null){try{let Z=Object.prototype.toString.call(X);if(Z==="[object Error]"||Z==="[object DOMException]"){let $=Error(X.message,X.cause?{cause:X.cause}:{});if(X.stack)$.stack=X.stack;if(X.cause&&!$.cause)$.cause=X.cause;if(X.name)$.name=X.name;return $}}catch{}try{return Error(JSON.stringify(X))}catch{}}return Error(X)};var lZ=()=>{};var L,v,o,DZ,E0,Z$,j0,S0,F0,D0,w0,R0,P0,I0;var m=x(()=>{lZ();L=(()=>{class X extends Error{}return X})();v=class v extends L{constructor(X,Z,$,J,z){super(`${v.makeMessage(X,Z,$)}`);this.status=X,this.headers=J,this.requestID=J?.get("request-id"),this.workspaceID=J?.get("anthropic-workspace-id"),this.error=Z,this.type=z??null}static makeMessage(X,Z,$){let J=Z?.message?typeof Z.message==="string"?Z.message:JSON.stringify(Z.message):Z?JSON.stringify(Z):$;if(X&&J)return`${X} ${J}`;if(X)return`${X} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate(X,Z,$,J){if(!X||!J)return new DZ({message:$,cause:dZ(Z)});let z=Z,Y=z?.error?.type;if(X===400)return new j0(X,z,$,J,Y);if(X===401)return new S0(X,z,$,J,Y);if(X===403)return new F0(X,z,$,J,Y);if(X===404)return new D0(X,z,$,J,Y);if(X===409)return new w0(X,z,$,J,Y);if(X===422)return new R0(X,z,$,J,Y);if(X===429)return new P0(X,z,$,J,Y);if(X>=500)return new I0(X,z,$,J,Y);return new v(X,z,$,J,Y)}};o=class o extends v{constructor({message:X}={}){super(void 0,void 0,X||"Request was aborted.",void 0)}};DZ=class DZ extends v{constructor({message:X,cause:Z}){super(void 0,void 0,X||"Connection error.",void 0);if(Z)this.cause=Z}};E0=class E0 extends DZ{constructor({message:X}={}){super({message:X??"Request timed out."})}};Z$=class Z$ extends L{constructor(X,{cause:Z}={}){super(X??"Retryable error.");if(Z!==void 0)this.cause=Z}};j0=class j0 extends v{};S0=class S0 extends v{};F0=class F0 extends v{};D0=class D0 extends v{};w0=class w0 extends v{};R0=class R0 extends v{};P0=class P0 extends v{};I0=class I0 extends v{}});var sZ;var $$=x(()=>{sZ=(()=>{class X extends Error{constructor(Z){let $=typeof Z==="string"?Z:Z.map((J)=>{if(J.type==="text")return J.text;return`[${J.type}]`}).join(" ");super($);this.name="ToolError",this.content=Z}}return X})()});function t4(X,Z){if(!(X>=r4))throw new L(`${Z} must be at least ${r4}ms (got ${X}); to run without memory sync, pass \`memorySyncIntervalMs: null\` to the worker instead`)}var rJ=15000,r4=5000;var o4=x(()=>{m()});function yX(){let X,Z;return{promise:new Promise((J,z)=>{X=J,Z=z}),resolve:X,reject:Z}}var s4=()=>{};function f0(X){if(typeof X!=="object")return{};return X??{}}function bX(X){if(!X)return!0;for(let Z in X)return!1;return!0}function Z6(X,Z){return Object.prototype.hasOwnProperty.call(X,Z)}function hX(X){return X!=null&&typeof X==="object"&&!Array.isArray(X)}function fZ(X){}var C7,e4=(X)=>{return C7.test(X)},s=(X)=>(s=Array.isArray,s(X)),kX,X$=(X,Z)=>{if(typeof Z!=="number"||!Number.isInteger(Z))throw new L(`${X} must be an integer`);if(Z<0)throw new L(`${X} must be a positive integer`);return Z},J$=(X)=>{try{return JSON.parse(X)}catch(Z){return}};var e=x(()=>{m();C7=/^[a-z][a-z0-9+.-]*:/i,kX=s});var MZ=(X,Z)=>new Promise(($)=>{if(Z?.aborted)return $();let J=()=>{clearTimeout(z),$()},z=setTimeout(()=>{Z?.removeEventListener("abort",J),$()},X);Z?.addEventListener("abort",J,{once:!0})});var eZ=()=>{};var WZ="0.126.0";var y0=()=>{};function M7(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}function B7(){if(typeof navigator>"u"||!navigator)return null;let X=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:Z,pattern:$}of X){let J=$.exec(navigator.userAgent);if(J){let z=J[1]||0,Y=J[2]||0,K=J[3]||0;return{browser:Z,version:`${z}.${Y}.${K}`}}}return null}var z6=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},x7=()=>{let X=M7();if(X==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":WZ,"X-Stainless-OS":X6(Deno.build.os),"X-Stainless-Arch":$6(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":WZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process?.version??"unknown"};if(X==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":WZ,"X-Stainless-OS":X6(globalThis.process.platform??"unknown"),"X-Stainless-Arch":$6(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let Z=B7();if(Z)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":WZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${Z.browser}`,"X-Stainless-Runtime-Version":Z.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":WZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},$6=(X)=>{if(X==="x32")return"x32";if(X==="x86_64"||X==="x64")return"x64";if(X==="arm")return"arm";if(X==="aarch64"||X==="arm64")return"arm64";if(X)return`other:${X}`;return"unknown"},X6=(X)=>{if(X=X.toLowerCase(),X.includes("ios"))return"iOS";if(X==="android")return"Android";if(X==="darwin")return"MacOS";if(X==="win32")return"Windows";if(X==="freebsd")return"FreeBSD";if(X==="openbsd")return"OpenBSD";if(X==="linux")return"Linux";if(X)return`Other:${X}`;return"Unknown"},J6,k0=()=>{return J6??(J6=x7())};var z$=x(()=>{y0()});function H7(X,Z){return()=>X.removeEventListener("abort",Z)}function Q6(X,Z,$){Y$.set(X,H7(Z,$))}function K6(X,Z){if(Y$.has(Z))Y6?.register(X,Z,Z)}function HZ(X){let Z=Y$.get(X);if(Z)Y$.delete(X),Y6?.unregister(X),Z()}var Y$,Y6;var Q$=x(()=>{Y$=new WeakMap,Y6=typeof globalThis.FinalizationRegistry==="function"?new globalThis.FinalizationRegistry((X)=>HZ(X)):null});function V6(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function gX(...X){let Z=globalThis.ReadableStream;if(typeof Z>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new Z(...X)}function K$(X){let Z=Symbol.asyncIterator in X?X[Symbol.asyncIterator]():X[Symbol.iterator]();return gX({start(){},async pull($){let{done:J,value:z}=await Z.next();if(J)$.close();else $.enqueue(z)},async cancel(){await Z.return?.()}})}function b0(X){if(X[Symbol.asyncIterator])return X;let Z=X.getReader();return{async next(){try{let $=await Z.read();if($?.done)Z.releaseLock();return $}catch($){throw Z.releaseLock(),$}},async return(){let $=Z.cancel();return Z.releaseLock(),await $,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function N6(X){if(X===null||typeof X!=="object")return;if(X[Symbol.asyncIterator]){await X[Symbol.asyncIterator]().return?.();return}let Z=X.getReader(),$=Z.cancel();Z.releaseLock(),await $}var Z0=()=>{};var W6=({headers:X,body:Z})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(Z)}};var U6=()=>{};var vX="RFC3986",_X=(X)=>String(X),mX,q6="RFC1738";var uX=x(()=>{mX={RFC1738:(X)=>String(X).replace(/%20/g,"+"),RFC3986:_X}});function O6(X){if(!X||typeof X!=="object")return!1;return!!(X.constructor&&X.constructor.isBuffer&&X.constructor.isBuffer(X))}function dX(X,Z){if(s(X)){let $=[];for(let J=0;J<X.length;J+=1)$.push(Z(X[J]));return $}return Z(X)}var V$=(X,Z)=>(V$=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),V$(X,Z)),TZ,cX=1024,G6=(X,Z,$,J,z)=>{if(X.length===0)return X;let Y=X;if(typeof X==="symbol")Y=Symbol.prototype.toString.call(X);else if(typeof X!=="string")Y=String(X);if($==="iso-8859-1")return escape(Y).replace(/%u[0-9a-f]{4}/gi,function(N){return"%26%23"+parseInt(N.slice(2),16)+"%3B"});let K="";for(let N=0;N<Y.length;N+=cX){let W=Y.length>=cX?Y.slice(N,N+cX):Y,q=[];for(let H=0;H<W.length;++H){let G=W.charCodeAt(H);if(G===45||G===46||G===95||G===126||G>=48&&G<=57||G>=65&&G<=90||G>=97&&G<=122||z===q6&&(G===40||G===41)){q[q.length]=W.charAt(H);continue}if(G<128){q[q.length]=TZ[G];continue}if(G<2048){q[q.length]=TZ[192|G>>6]+TZ[128|G&63];continue}if(G<55296||G>=57344){q[q.length]=TZ[224|G>>12]+TZ[128|G>>6&63]+TZ[128|G&63];continue}H+=1,G=65536+((G&1023)<<10|W.charCodeAt(H)&1023),q[q.length]=TZ[240|G>>18]+TZ[128|G>>12&63]+TZ[128|G>>6&63]+TZ[128|G&63]}K+=q.join("")}return K};var C6=x(()=>{uX();e();TZ=(()=>{let X=[];for(let Z=0;Z<256;++Z)X.push("%"+((Z<16?"0":"")+Z.toString(16)).toUpperCase());return X})()});function A7(X){return typeof X==="string"||typeof X==="number"||typeof X==="boolean"||typeof X==="symbol"||typeof X==="bigint"}function H6(X,Z,$,J,z,Y,K,N,W,q,H,G,C,O,T,P,F,D){let A=X,k=D,j=0,I=!1;while((k=k.get(lX))!==void 0&&!I){let d=k.get(X);if(j+=1,typeof d<"u")if(d===j)throw RangeError("Cyclic object value");else I=!0;if(typeof k.get(lX)>"u")j=0}if(typeof q==="function")A=q(Z,A);else if(A instanceof Date)A=C?.(A);else if($==="comma"&&s(A))A=dX(A,function(d){if(d instanceof Date)return C?.(d);return d});if(A===null){if(Y)return W&&!P?W(Z,n.encoder,F,"key",O):Z;A=""}if(A7(A)||O6(A)){if(W){let d=P?Z:W(Z,n.encoder,F,"key",O);return[T?.(d)+"="+T?.(W(A,n.encoder,F,"value",O))]}return[T?.(Z)+"="+T?.(String(A))]}let r=[];if(typeof A>"u")return r;let b;if($==="comma"&&s(A)){if(P&&W)A=dX(A,W);b=[{value:A.length>0?A.join(",")||null:void 0}]}else if(s(q))b=q;else{let d=Object.keys(A);b=H?d.sort(H):d}let l=N?String(Z).replace(/\./g,"%2E"):String(Z),_=J&&s(A)&&A.length===1?l+"[]":l;if(z&&s(A)&&A.length===0)return _+"[]";for(let d=0;d<b.length;++d){let NZ=b[d],cZ=typeof NZ==="object"&&typeof NZ.value<"u"?NZ.value:A[NZ];if(K&&cZ===null)continue;let fX=G&&N?NZ.replace(/\./g,"%2E"):NZ,G7=s(A)?typeof $==="function"?$(_,fX):_:_+(G?"."+fX:"["+fX+"]");D.set(X,j);let a4=new WeakMap;a4.set(lX,D),B6(r,H6(cZ,G7,$,J,z,Y,K,N,$==="comma"&&P&&s(A)?null:W,q,H,G,C,O,T,P,F,a4))}return r}function E7(X=n){if(typeof X.allowEmptyArrays<"u"&&typeof X.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof X.encodeDotInKeys<"u"&&typeof X.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(X.encoder!==null&&typeof X.encoder<"u"&&typeof X.encoder!=="function")throw TypeError("Encoder has to be a function.");let Z=X.charset||n.charset;if(typeof X.charset<"u"&&X.charset!=="utf-8"&&X.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let $=vX;if(typeof X.format<"u"){if(!V$(mX,X.format))throw TypeError("Unknown format option provided.");$=X.format}let J=mX[$],z=n.filter;if(typeof X.filter==="function"||s(X.filter))z=X.filter;let Y;if(X.arrayFormat&&X.arrayFormat in x6)Y=X.arrayFormat;else if("indices"in X)Y=X.indices?"indices":"repeat";else Y=n.arrayFormat;if("commaRoundTrip"in X&&typeof X.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");let K=typeof X.allowDots>"u"?!!X.encodeDotInKeys===!0?!0:n.allowDots:!!X.allowDots;return{addQueryPrefix:typeof X.addQueryPrefix==="boolean"?X.addQueryPrefix:n.addQueryPrefix,allowDots:K,allowEmptyArrays:typeof X.allowEmptyArrays==="boolean"?!!X.allowEmptyArrays:n.allowEmptyArrays,arrayFormat:Y,charset:Z,charsetSentinel:typeof X.charsetSentinel==="boolean"?X.charsetSentinel:n.charsetSentinel,commaRoundTrip:!!X.commaRoundTrip,delimiter:typeof X.delimiter>"u"?n.delimiter:X.delimiter,encode:typeof X.encode==="boolean"?X.encode:n.encode,encodeDotInKeys:typeof X.encodeDotInKeys==="boolean"?X.encodeDotInKeys:n.encodeDotInKeys,encoder:typeof X.encoder==="function"?X.encoder:n.encoder,encodeValuesOnly:typeof X.encodeValuesOnly==="boolean"?X.encodeValuesOnly:n.encodeValuesOnly,filter:z,format:$,formatter:J,serializeDate:typeof X.serializeDate==="function"?X.serializeDate:n.serializeDate,skipNulls:typeof X.skipNulls==="boolean"?X.skipNulls:n.skipNulls,sort:typeof X.sort==="function"?X.sort:null,strictNullHandling:typeof X.strictNullHandling==="boolean"?X.strictNullHandling:n.strictNullHandling}}function T6(X,Z={}){let $=X,J=E7(Z),z,Y;if(typeof J.filter==="function")Y=J.filter,$=Y("",$);else if(s(J.filter))Y=J.filter,z=Y;let K=[];if(typeof $!=="object"||$===null)return"";let N=x6[J.arrayFormat],W=N==="comma"&&J.commaRoundTrip;if(!z)z=Object.keys($);if(J.sort)z.sort(J.sort);let q=new WeakMap;for(let C=0;C<z.length;++C){let O=z[C];if(J.skipNulls&&$[O]===null)continue;B6(K,H6($[O],O,N,W,J.allowEmptyArrays,J.strictNullHandling,J.skipNulls,J.encodeDotInKeys,J.encode?J.encoder:null,J.filter,J.sort,J.allowDots,J.serializeDate,J.format,J.formatter,J.encodeValuesOnly,J.charset,q))}let H=K.join(J.delimiter),G=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")G+="utf8=%26%2310003%3B&";else G+="utf8=%E2%9C%93&";return H.length>0?G+H:""}var x6,B6=function(X,Z){Array.prototype.push.apply(X,s(Z)?Z:[Z])},M6,n,lX;var L6=x(()=>{C6();uX();e();x6={brackets(X){return String(X)+"[]"},comma:"comma",indices(X,Z){return String(X)+"["+Z+"]"},repeat(X){return String(X)}},n={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:G6,encodeValuesOnly:!1,format:vX,formatter:_X,indices:!1,serializeDate(X){return(M6??(M6=Function.prototype.call.bind(Date.prototype.toISOString)))(X)},skipNulls:!1,strictNullHandling:!1};lX={}});function A6(X){return T6(X,{arrayFormat:"brackets"})}var pX=x(()=>{L6()});function W$(X){if(!X)return;let Z;try{Z=new URL(X)}catch(J){throw new g(`Invalid token endpoint base URL "${X}": ${J}`)}if(Z.protocol==="https:")return;let $=Z.hostname.toLowerCase().replace(/^\[|\]$/g,"");if(Z.protocol==="http:"&&($==="localhost"||$==="127.0.0.1"||$==="::1"))return;throw new g(`Refusing to send credential over non-https token endpoint "${X}"`)}async function U$(X,Z){let $=await F7(X),J;try{J=JSON.parse($)}catch{throw new g(`Token endpoint returned non-JSON response (status ${X.status})`,X.status,ZZ($),Z)}if(!J.access_token)throw new g(`Token endpoint response missing access_token: ${JSON.stringify(ZZ(J))}`,X.status,ZZ(J),Z);if(J.token_type&&J.token_type.toLowerCase()!=="bearer")throw new g(`Token endpoint response: unsupported token_type "${J.token_type}" (want Bearer)`,X.status,ZZ(J),Z);return J}function ZZ(X){if(X==null)return X;if(typeof X==="string"){let Z;try{Z=JSON.parse(X)}catch{if(X.length<=iX)return X;return X.slice(0,iX)+`... <${X.length-iX} more chars>`}return JSON.stringify(ZZ(Z))}if(typeof X==="object"&&!Array.isArray(X)){let Z={};for(let[$,J]of Object.entries(X))if(S7.has($))Z[$]=J;return Z}return null}async function q$(X,Z=($)=>console.warn(`anthropic-sdk: ${$}`)){if(typeof process>"u"||process.platform==="win32")return;let{fs:$}=await import("./node-1.1.35-312s6waw.mjs"),J=X,z;try{J=await $.promises.realpath(X),z=await $.promises.stat(J)}catch{return}let Y=z.mode&511;if(Y&18)throw new g(`Credentials file at ${J} is group/world-writable (mode 0o${Y.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(Y&36)throw new g(`Credentials file at ${J} is group/world-readable (mode 0o${Y.toString(8)}); run \`chmod 600 ${J}\` before retrying.`);if(typeof process.getuid==="function"&&z.uid!==process.getuid())Z(`credentials file at ${J} is owned by uid ${z.uid} (current process uid ${process.getuid()}); verify this is intentional.`)}async function G$(X,Z){let{fs:$,path:J}=await import("./node-1.1.35-312s6waw.mjs"),z=J.dirname(X);await $.promises.mkdir(z,{recursive:!0,mode:448});let Y=`${X}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let K=await $.promises.open(Y,"w",384);try{await K.writeFile(JSON.stringify(Z,null,2)),await K.sync()}finally{await K.close()}await $.promises.rename(Y,X)}catch(K){throw await $.promises.unlink(Y).catch(()=>{}),K}try{let K=await $.promises.open(z,"r");try{await K.sync()}finally{await K.close()}}catch{}}async function F7(X){if(!X.body)return"";let Z=X.body.getReader(),$=[],J=0;for(;;){let{done:Y,value:K}=await Z.read();if(Y)break;if(J+K.length>E6){let N=E6-J;if(N>0)$.push(K.subarray(0,N));await Z.cancel();break}$.push(K),J+=K.length}let z;if($.length===1)z=$[0];else{z=new Uint8Array($.reduce((K,N)=>K+N.length,0));let Y=0;for(let K of $)z.set(K,Y),Y+=K.length}return new TextDecoder("utf-8").decode(z)}var j6="urn:ietf:params:oauth:grant-type:jwt-bearer",S6="refresh_token",N$="/v1/oauth/token",pZ="oauth-2025-04-20",F6="oidc-federation-2026-04-01",D6=120,$0=30,w6=5,E6=1048576,iX=2000,S7,g;var X0=x(()=>{m();S7=new Set(["error","error_description","error_uri"]);g=class g extends L{constructor(X,Z=null,$=null,J=null){super(X);this.statusCode=Z,this.body=$,this.requestId=J}}});function xZ(){return Math.floor(Date.now()/1000)}var h0=()=>{};class nX{constructor(X,Z){this.cached=null,this.pendingRefresh=null,this.nextForce=!1,this.lastAdvisoryError=0,this.provider=X,this.onAdvisoryRefreshError=Z}async getToken(){let X=this.nextForce;this.nextForce=!1;let Z=this.cached;if(X||Z==null)return(await this.refresh(X)).token;if(Z.expiresAt==null)return Z.token;let $=Z.expiresAt-xZ();if($>D6)return Z.token;if($>$0)return this.backgroundRefresh(),Z.token;return(await this.refresh()).token}invalidate(){this.cached=null,this.nextForce=!0}refresh(X=!1){if(this.pendingRefresh&&!X)return this.pendingRefresh;return this.doRefresh(X)}backgroundRefresh(){if(this.pendingRefresh)return;if(xZ()-this.lastAdvisoryError<w6)return;this.doRefresh().catch((X)=>{this.lastAdvisoryError=xZ(),this.onAdvisoryRefreshError?.(X)})}doRefresh(X=!1){return this.pendingRefresh=this.provider(X?{forceRefresh:!0}:void 0).then((Z)=>{return this.cached=Z,this.pendingRefresh=null,Z},(Z)=>{throw this.pendingRefresh=null,Z}),this.pendingRefresh}}var R6=x(()=>{X0();h0()});var y=(X)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[X]?.trim()||void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(X)?.trim()||void 0;return};var J0=()=>{};function f6(X){let Z=0;for(let z of X)Z+=z.length;let $=new Uint8Array(Z),J=0;for(let z of X)$.set(z,J),J+=z.length;return $}function g0(X){let Z;return(P6??(Z=new globalThis.TextEncoder,P6=Z.encode.bind(Z)))(X)}function v0(X){let Z;return(I6??(Z=new globalThis.TextDecoder,I6=Z.decode.bind(Z)))(X)}var P6,I6;var O$=()=>{};var y6=(X)=>{if(typeof globalThis.Buffer<"u"){let Z=globalThis.Buffer.from(X,"base64");return new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength)}if(typeof atob<"u"){let Z=atob(X),$=new Uint8Array(Z.length);for(let J=0;J<Z.length;J++)$[J]=Z.charCodeAt(J);return $}throw new L("Cannot decode base64 string; Expected `Buffer` or `atob` to be defined")};var aX=x(()=>{m()});function _0(){}function C$(X,Z,$){if(!Z||M$[X]>M$[$])return _0;else return Z[X].bind(Z)}function tX(X,Z){let $=k6.get(X);if($&&$[0]===Z)return $[1];let J={error:C$("error",X,Z),warn:C$("warn",X,Z),info:C$("info",X,Z),debug:C$("debug",X,Z)};return k6.set(X,[Z,J]),J}function h(X){let Z=X.logger,$=X.logLevel??"off";if(!Z)return D7;return tX(Z,$)}function h6(){let X=y("ANTHROPIC_LOG");if(!rX||X!==b6)b6=X,rX=tX(console,x$(X,"process.env['ANTHROPIC_LOG']",tX(console,m0))??m0);return rX}var m0="warn",M$,x$=(X,Z,$)=>{if(!X)return;if(Z6(M$,X))return X;$.warn(`${Z} was set to ${JSON.stringify(X)}, expected one of ${JSON.stringify(Object.keys(M$))}`);return},D7,k6,b6,rX,AZ=(X)=>{if(X.options)X.options={...X.options},delete X.options.headers;if(X.headers)X.headers=Object.fromEntries((X.headers instanceof Headers?[...X.headers]:Object.entries(X.headers)).map(([Z,$])=>[Z,Z.toLowerCase()==="authorization"||Z.toLowerCase()==="api-key"||Z.toLowerCase()==="x-api-key"||Z.toLowerCase()==="cookie"||Z.toLowerCase()==="set-cookie"?"***":$]));if("retryOfRequestLogID"in X){if(X.retryOfRequestLogID)X.retryOf=X.retryOfRequestLogID;delete X.retryOfRequestLogID}return X};var wZ=x(()=>{e();J0();M$={off:0,error:200,warn:300,info:400,debug:500};D7={error:_0,warn:_0,info:_0,debug:_0},k6=new WeakMap});var B$=function(){let{crypto:X}=globalThis;if(X?.randomUUID)return B$=X.randomUUID.bind(X),X.randomUUID();let Z=new Uint8Array(1),$=X?()=>X.getRandomValues(Z)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^$()&15>>+J/4).toString(16))};var oX=()=>{};var g6=x(()=>{e();aX();J0();wZ();oX();eZ();pX()});function v6(X){if(!X)throw Error("profile name is empty");if(X==="."||X==="..")throw Error(`profile name "${X}" is not allowed`);if(X.includes("/")||X.includes("\\"))throw Error(`profile name "${X}" must not contain path separators`);if(!w7.test(X))throw Error(`profile name "${X}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var H$="1.0",w7,_6=async(X)=>{var Z,$;let J=await sX();if(J===null)return null;let z=X??await u6();if(z===null)return null;v6(z);let{fs:Y,path:K}=await import("./node-1.1.35-312s6waw.mjs"),N=K.join(J,"configs",`${z}.json`),W;try{W=await Y.promises.readFile(N,"utf-8")}catch(G){if(G?.code!=="ENOENT")throw Error(`failed to read config file ${N}: ${G}`);W=null}if(W===null){let G=y("ANTHROPIC_ORGANIZATION_ID"),C=y("ANTHROPIC_IDENTITY_TOKEN_FILE"),O=y("ANTHROPIC_FEDERATION_RULE_ID");if(O&&G)return{fromFile:!1,config:{organization_id:G,workspace_id:y("ANTHROPIC_WORKSPACE_ID"),base_url:y("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:O,service_account_id:y("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:C?{source:"file",path:C}:void 0,scope:y("ANTHROPIC_SCOPE")}}};return null}let q;try{q=JSON.parse(W)}catch(G){throw Error(`failed to parse config file ${N}: ${G}`)}if(!q.authentication)throw Error(`config file ${N} is missing "authentication"`);let H=q.authentication.type;if(H!=="oidc_federation"&&H!=="user_oauth")throw Error(`authentication.type "${H}" is not a known authentication type`);if(q.organization_id??(q.organization_id=y("ANTHROPIC_ORGANIZATION_ID")),q.workspace_id??(q.workspace_id=y("ANTHROPIC_WORKSPACE_ID")),q.base_url??(q.base_url=y("ANTHROPIC_BASE_URL")),(Z=q.authentication).scope??(Z.scope=y("ANTHROPIC_SCOPE")),q.authentication.type==="oidc_federation"){if(!q.authentication.identity_token){let G=y("ANTHROPIC_IDENTITY_TOKEN_FILE");if(G)q.authentication.identity_token={source:"file",path:G}}if(!q.authentication.federation_rule_id)q.authentication.federation_rule_id=y("ANTHROPIC_FEDERATION_RULE_ID")??"";($=q.authentication).service_account_id??($.service_account_id=y("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:q,fromFile:!0}},m6=async(X,Z)=>{if(X?.authentication.credentials_path)return X.authentication.credentials_path;let $=await sX();if(!$)return null;let J=Z??await u6();if(!J)return null;v6(J);let{path:z}=await import("./node-1.1.35-312s6waw.mjs");return z.join($,"credentials",`${J}.json`)},sX=async()=>{if(!R7())return null;let{path:X}=await import("./node-1.1.35-312s6waw.mjs"),Z=y("ANTHROPIC_CONFIG_DIR");if(Z)return Z;if(k0()["X-Stainless-OS"]==="Windows"){let Y=y("APPDATA");if(Y)return X.join(Y,"Anthropic");let K=y("USERPROFILE");if(K)return X.join(K,"AppData","Roaming","Anthropic");return null}let J=y("XDG_CONFIG_HOME");if(J)return X.join(J,"anthropic");let z=y("HOME");if(z)return X.join(z,".config","anthropic");return null},R7=()=>{let X=k0()["X-Stainless-Runtime"];return X==="node"||X==="deno"},u6=async()=>{let X=await sX();if(!X)return null;let Z=y("ANTHROPIC_PROFILE");if(Z)return Z;let{fs:$,path:J}=await import("./node-1.1.35-312s6waw.mjs"),z=J.join(X,"active_config");try{return(await $.promises.readFile(z,"utf-8")).trim()||"default"}catch(Y){if(Y?.code!=="ENOENT")throw Error(`failed to read ${z}: ${Y}`);return"default"}};var eX=x(()=>{z$();g6();w7=/^[A-Za-z0-9_.-]+$/});function Z1(X){if(!X)throw new L("Identity token file path is empty");return async()=>{let{fs:Z}=await import("./node-1.1.35-312s6waw.mjs"),$;try{$=await Z.promises.readFile(X,"utf-8")}catch(z){throw new L(`Failed to read identity token file at ${X}: ${z}`)}let J=$.trim();if(!J)throw new L(`Identity token file at ${X} is empty`);return J}}function c6(X){if(!X)throw new L("Identity token value is empty");return()=>X}var d6=x(()=>{m()});function l6(X){return async()=>{W$(X.baseURL);let Z=await X.identityTokenProvider();if(Z.length>16384)throw new g(`Identity token is ${Math.ceil(Z.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let $={grant_type:j6,assertion:Z,federation_rule_id:X.federationRuleId,organization_id:X.organizationId};if(X.serviceAccountId)$.service_account_id=X.serviceAccountId;if(X.workspaceId)$.workspace_id=X.workspaceId;let J=`${X.baseURL}${N$}`,z;try{z=await X.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${pZ},${F6}`,"User-Agent":X.userAgent||`anthropic-sdk-typescript/${WZ} oidcFederationProvider`},body:JSON.stringify($)})}catch(W){throw new g(`Failed to reach token endpoint ${J}: ${W}`)}let Y=z.headers.get("Request-Id");if(!z.ok){let W=await z.text().catch(()=>""),q=ZZ(W),H="";if(z.status===401)H=` Ensure your federation rule matches your identity token. ${X.workspaceId?"":"If your federation rule is scoped to multiple workspaces, set the ANTHROPIC_WORKSPACE_ID environment variable, the 'workspace_id' config key, or the `workspaceId` option. "}View your authentication events in the Workload identity page of Claude Console for more details.`;throw new g(`Token exchange failed with status ${z.status}${Y?` (request-id ${Y})`:""}: ${q}${H}`,z.status,q,Y)}let K=await U$(z,Y),N=Number(K.expires_in);if(!Number.isFinite(N))throw new g(`Token endpoint response missing required fields: ${JSON.stringify(ZZ(K))}`,z.status,ZZ(K),Y);return{token:K.access_token,expiresAt:xZ()+N}}}var p6=x(()=>{X0();h0();y0()});function i6(X){return async(Z)=>{let{fs:$}=await import("./node-1.1.35-312s6waw.mjs");await q$(X.credentialsPath,X.onSafetyWarning);let J;try{J=await $.promises.readFile(X.credentialsPath,"utf-8")}catch(F){throw new g(`Credentials file not found at ${X.credentialsPath}: ${F}`)}let z;try{z=JSON.parse(J)}catch(F){throw new g(`Credentials file at ${X.credentialsPath} is not valid JSON: ${F}`)}let Y=z.access_token;if(!Y)throw new g(`Credentials file at ${X.credentialsPath} must include 'access_token'`);let K=z.expires_at;if(!Z?.forceRefresh&&(K==null||xZ()<K-$0))return{token:Y,expiresAt:K??null};let N=z.refresh_token;if(!X.clientId||!N)throw new g(`Access token at ${X.credentialsPath} has expired and no refresh is available (client_id ${X.clientId?"set":"empty"}, refresh_token ${N?"set":"empty"})`);W$(X.baseURL);let W={grant_type:S6,refresh_token:N,client_id:X.clientId},q=`${X.baseURL}${N$}`,H;try{H=await X.fetch(q,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":pZ,"User-Agent":X.userAgent||`anthropic-sdk-typescript/${WZ} userOAuthProvider`},body:JSON.stringify(W)})}catch(F){throw new g(`User OAuth refresh failed to reach token endpoint: ${F}`)}let G=H.headers.get("Request-Id");if(!H.ok){let F=await H.text().catch(()=>"");throw new g(`User OAuth refresh failed (HTTP ${H.status}): ${ZZ(F)}`,H.status,ZZ(F),G)}let C=await U$(H,G),O=Number(C.expires_in);if(!Number.isFinite(O))throw new g(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify(ZZ(C))}`,H.status,ZZ(C),G);let T=xZ()+O,P=C.refresh_token||N;return await G$(X.credentialsPath,{...z,version:H$,type:"oauth_token",access_token:C.access_token,expires_at:T,refresh_token:P}),{token:C.access_token,expiresAt:T}}}var n6=x(()=>{eX();X0();h0();y0()});function $1(X,Z){let $=X.authentication.credentials_path??null,J=(X.base_url||Z.baseURL).replace(/\/+$/,""),z=P7(X,$,J,Z),Y={};if(X.workspace_id&&X.authentication.type==="user_oauth")Y["anthropic-workspace-id"]=X.workspace_id;return{provider:z,extraHeaders:Y,baseURL:X.base_url||void 0}}async function a6(X,Z){let $=await _6(Z);if(!$)return null;let{config:J,fromFile:z}=$,Y=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await m6(J,Z)??void 0}};return $1(Y,X)}function P7(X,Z,$,J){switch(X.authentication.type){case"oidc_federation":{let z=X.authentication,Y=I7(z);if(!Y)throw new g("oidc_federation config requires an identity token (set authentication.identity_token, ANTHROPIC_IDENTITY_TOKEN_FILE, or ANTHROPIC_IDENTITY_TOKEN)");if(!z.federation_rule_id)throw new g("oidc_federation config requires 'federation_rule_id'. Set it in authentication.federation_rule_id in your profile, or via ANTHROPIC_FEDERATION_RULE_ID (profile takes precedence).");if(!X.organization_id)throw new g("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let K=l6({identityTokenProvider:Y,federationRuleId:z.federation_rule_id,organizationId:X.organization_id,serviceAccountId:z.service_account_id,workspaceId:X.workspace_id,baseURL:$,fetch:J.fetch,userAgent:J.userAgent});if(Z)return f7(K,Z,J.onCacheWriteError,J.onSafetyWarning);return K}case"user_oauth":{if(!Z)throw new g("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return i6({credentialsPath:Z,clientId:X.authentication.client_id,baseURL:$,fetch:J.fetch,userAgent:J.userAgent,onSafetyWarning:J.onSafetyWarning})}default:{let z=X.authentication.type;throw new g(`authentication.type "${z}" is not a known authentication type`)}}}function I7(X){if(X.identity_token){let J=X.identity_token.source;if(J!=="file")throw new g(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!X.identity_token.path)throw new g('identity_token.source "file" requires a non-empty path');return Z1(X.identity_token.path)}let Z=y("ANTHROPIC_IDENTITY_TOKEN_FILE");if(Z)return Z1(Z);let $=y("ANTHROPIC_IDENTITY_TOKEN");if($)return c6($);return null}function f7(X,Z,$,J){return async(z)=>{let{fs:Y}=await import("./node-1.1.35-312s6waw.mjs");await q$(Z,J);let K;try{let W=await Y.promises.readFile(Z,"utf-8");K=JSON.parse(W);let q=K?.access_token;if(q&&!z?.forceRefresh){let H=K?.expires_at;if(H==null||xZ()<H-$0)return{token:q,expiresAt:H??null}}}catch(W){if(W?.code!=="ENOENT"&&!(W instanceof SyntaxError))$?.(W)}let N=await X(z);try{await G$(Z,{...K??{},version:H$,type:"oauth_token",access_token:N.token,expires_at:N.expiresAt})}catch(W){$?.(W)}return N}}var r6=x(()=>{J0();eX();X0();h0();d6();p6();n6()});function y7(X,Z){for(let z=Z??0;z<X.length;z++){if(X[z]===10)return{preceding:z,index:z+1,carriage:!1};if(X[z]===13)return{preceding:z,index:z+1,carriage:!0}}return null}function t6(X){for(let J=0;J<X.length-1;J++){if(X[J]===10&&X[J+1]===10)return J+2;if(X[J]===13&&X[J+1]===13)return J+2;if(X[J]===13&&X[J+1]===10&&J+3<X.length&&X[J+2]===13&&X[J+3]===10)return J+4}return-1}var zZ,YZ,u0;var X1=x(()=>{JZ();O$();u0=(()=>{class X{constructor(){zZ.set(this,void 0),YZ.set(this,void 0),M(this,zZ,new Uint8Array,"f"),M(this,YZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?g0(Z):Z;M(this,zZ,f6([Q(this,zZ,"f"),$]),"f");let J=[],z;while((z=y7(Q(this,zZ,"f"),Q(this,YZ,"f")))!=null){if(z.carriage&&Q(this,YZ,"f")==null){M(this,YZ,z.index,"f");continue}if(Q(this,YZ,"f")!=null&&(z.index!==Q(this,YZ,"f")+1||z.carriage)){J.push(v0(Q(this,zZ,"f").subarray(0,Q(this,YZ,"f")-1))),M(this,zZ,Q(this,zZ,"f").subarray(Q(this,YZ,"f")),"f"),M(this,YZ,null,"f");continue}let Y=Q(this,YZ,"f")!==null?z.preceding-1:z.preceding,K=v0(Q(this,zZ,"f").subarray(0,Y));J.push(K),M(this,zZ,Q(this,zZ,"f").subarray(z.index),"f"),M(this,YZ,null,"f")}return J}flush(){if(!Q(this,zZ,"f").length)return[];return this.decode(`
|
|
2
|
-
`)}}return zZ=new WeakMap,YZ=new WeakMap,X.NEWLINE_CHARS=new Set([`
|
|
3
|
-
`,"\r"]),X.NEWLINE_REGEXP=/\r\n|[\n\r]/g,X})()});async function*o6(X,Z){if(!X.body){if(Z.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new L("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new L("Attempted to iterate over a response with no body")}let $=new s6,J=new u0,z=b0(X.body);for await(let Y of k7(z))for(let K of J.decode(Y)){let N=$.decode(K);if(N)yield N}for(let Y of J.flush()){let K=$.decode(Y);if(K)yield K}}async function*k7(X){let Z=new Uint8Array;for await(let $ of X){if($==null)continue;let J=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?g0($):$,z=new Uint8Array(Z.length+J.length);z.set(Z),z.set(J,Z.length),Z=z;let Y;while((Y=t6(Z))!==-1)yield Z.subarray(0,Y),Z=Z.subarray(Y)}if(Z.length>0)yield Z}class s6{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(X){if(X.endsWith("\r"))X=X.substring(0,X.length-1);if(!X){if(!this.event&&!this.data.length)return null;let z={event:this.event,data:this.data.join(`
|
|
4
|
-
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],z}if(this.chunks.push(X),X.startsWith(":"))return null;let[Z,$,J]=b7(X,":");if(J.startsWith(" "))J=J.substring(1);if(Z==="event")this.event=J;else if(Z==="data")this.data.push(J);return null}}function b7(X,Z){let $=X.indexOf(Z);if($!==-1)return[X.substring(0,$),Z,X.substring($+Z.length)];return[X,"",""]}var c0,EZ;var T$=x(()=>{JZ();m();Z0();X1();Z0();lZ();e();O$();wZ();m();Q$();EZ=(()=>{class X{constructor(Z,$,J){this.iterator=Z,c0.set(this,void 0),this.controller=$,M(this,c0,J,"f")}static rawEvents(Z,$=new AbortController){return o6(Z,$)}static fromSSEResponse(Z,$,J){let z=!1,Y=J?h(J):console;async function*K(){if(z)throw new L("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");z=!0;let N=!1;try{for await(let W of o6(Z,$)){if(W.event==="completion")try{yield JSON.parse(W.data)}catch(q){throw Y.error("Could not parse message into JSON:",W.data),Y.error("From chunk:",W.raw),q}if(W.event==="message_start"||W.event==="message_delta"||W.event==="message_stop"||W.event==="content_block_start"||W.event==="content_block_delta"||W.event==="content_block_stop"||W.event==="message"||W.event==="user.message"||W.event==="user.interrupt"||W.event==="user.tool_confirmation"||W.event==="user.custom_tool_result"||W.event==="user.tool_result"||W.event==="agent.message"||W.event==="agent.thinking"||W.event==="agent.tool_use"||W.event==="agent.tool_result"||W.event==="agent.mcp_tool_use"||W.event==="agent.mcp_tool_result"||W.event==="agent.custom_tool_use"||W.event==="agent.thread_context_compacted"||W.event==="session.status_running"||W.event==="session.status_idle"||W.event==="session.status_rescheduled"||W.event==="session.status_terminated"||W.event==="session.error"||W.event==="session.deleted"||W.event==="session.updated"||W.event==="span.model_request_start"||W.event==="span.model_request_end"||W.event==="span.outcome_evaluation_start"||W.event==="span.outcome_evaluation_ongoing"||W.event==="span.outcome_evaluation_end"||W.event==="user.define_outcome"||W.event==="agent.thread_message_received"||W.event==="agent.thread_message_sent"||W.event==="agent.session_thread_message_received"||W.event==="agent.session_thread_message_sent"||W.event==="session.thread_created"||W.event==="session.thread_status_created"||W.event==="session.thread_status_running"||W.event==="session.thread_status_idle"||W.event==="session.thread_status_rescheduled"||W.event==="session.thread_status_terminated"||W.event==="event_start"||W.event==="event_delta"||W.event==="system.message")try{yield JSON.parse(W.data)}catch(q){throw Y.error("Could not parse message into JSON:",W.data),Y.error("From chunk:",W.raw),q}if(W.event==="ping")continue;if(W.event==="error"){let q=J$(W.data)??W.data,H=q?.error?.type;throw new v(void 0,q,void 0,Z.headers,H)}}N=!0}catch(W){if(CZ(W))return;throw W}finally{if(!N)$.abort();HZ($)}}return new X(K,$,J)}static fromReadableStream(Z,$,J){let z=!1;async function*Y(){let N=new u0,W=b0(Z);for await(let q of W)for(let H of N.decode(q))yield H;for(let q of N.flush())yield q}async function*K(){if(z)throw new L("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");z=!0;let N=!1;try{for await(let W of Y()){if(N)continue;if(W)yield JSON.parse(W)}N=!0}catch(W){if(CZ(W))return;throw W}finally{if(!N)$.abort();HZ($)}}return new X(K,$,J)}[(c0=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],J=this.iterator(),z=(Y)=>{return{next:()=>{if(Y.length===0){let K=J.next();Z.push(K),$.push(K)}return Y.shift()}}};return[new X(()=>z(Z),this.controller,Q(this,c0,"f")),new X(()=>z($),this.controller,Q(this,c0,"f"))]}toReadableStream(){let Z=this,$;return gX({async start(){$=Z[Symbol.asyncIterator]()},async pull(J){try{let{value:z,done:Y}=await $.next();if(Y)return J.close();let K=g0(JSON.stringify(z)+`
|
|
5
|
-
`);J.enqueue(K)}catch(z){J.error(z)}},async cancel(){await $.return?.()}})}}return X})()});async function L$(X,Z){let{response:$,requestLogID:J,retryOfRequestLogID:z,startTime:Y}=Z,K=await(async()=>{if(Z.options.stream)return h(X).debug("response",$.status,$.url,$.headers,$.body),EZ.fromSSEResponse($,Z.controller,X);if($.status===204)return null;if(Z.options.__binaryResponse)return $;let W=$.headers.get("content-type")?.split(";")[0]?.trim();if(W?.includes("application/json")||W?.endsWith("+json")){if($.headers.get("content-length")==="0")return;let C=await $.json();return d0(C,$)}return await $.text()})().finally(()=>{if(!Z.options.stream&&!Z.options.__binaryResponse)HZ(Z.controller)});return h(X).debug(`[${J}] response parsed`,AZ({retryOfRequestLogID:z,url:$.url,status:$.status,body:K,durationMs:Date.now()-Y})),K}function d0(X,Z){if(!X||typeof X!=="object"||Array.isArray(X))return X;return Object.defineProperties(X,{_request_id:{value:Z.headers.get("request-id"),enumerable:!1},_workspace_id:{value:Z.headers.get("anthropic-workspace-id"),enumerable:!1}})}var A$=x(()=>{T$();wZ();Q$()});function J1(X){return typeof X==="object"&&X!==null&&Z9.has(X)}function $9(X){let Z=new Set;while(typeof X==="object"&&X!==null&&!Z.has(X)){if(Z.add(X),J1(X)||CZ(X)||X instanceof DZ||X instanceof Z$)return!0;X=X.cause}return!1}function z1(X,Z,$,J){return async(z,Y={})=>{if(Z.length===0)return X.call(void 0,z,Y);let K=Y.headers instanceof Headers?Y.headers:new Headers(Y.headers),N=await g7(X,Z,$,J)({...Y,headers:K,url:typeof z==="string"?z:z instanceof URL?z.href:z.url});if(N.bodyUsed||N.body?.locked)throw new L("middleware consumed the response body; use response.clone() to inspect it, or return new Response(body, response) to consume and replace it");return N}}function h7(X,Z){let $=new WeakMap;return{options:X,logger:Z?h(Z):h6(),parse(J){if(X?.stream&&J.ok)return e6(J,X,Z);let z=$.get(J);if(!z)z=e6(J,X,Z),$.set(J,z);return z}}}async function e6(X,Z,$){if(X.bodyUsed||X.body?.locked)throw new L("cannot ctx.parse() a response whose body was already consumed; call ctx.parse() instead of reading the body, or read via response.clone()");if(Z?.stream&&X.ok)return EZ.fromSSEResponse(X.clone(),new AbortController,$);if(X.status===204)return null;if(Z?.__binaryResponse)return X;let z=X.headers.get("content-type")?.split(";")[0]?.trim();if(z?.includes("application/json")||z?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;return d0(await X.clone().json(),X)}return await X.clone().text()}function g7(X,Z,$,J){let z=async({url:K,...N})=>{try{return await X.call(void 0,K,N)}catch(W){let q=dZ(W);throw Z9.add(q),q}},Y=h7($,J);for(let K=Z.length-1;K>=0;K--){let N=Z[K],W=z;z=async(q)=>N(q,W,Y)}return z}var Z9;var X9=x(()=>{lZ();A$();wZ();m();T$();Z9=new WeakSet});var l0,E$;var Y1=x(()=>{JZ();A$();E$=(()=>{class X extends Promise{constructor(Z,$,J=L$){super((z)=>{z(null)});this.responsePromise=$,this.parseResponse=J,l0.set(this,void 0),M(this,l0,Z,"f")}_thenUnwrap(Z){return new X(Q(this,l0,"f"),this.responsePromise,async($,J)=>d0(Z(await this.parseResponse($,J),J),J.response))}asResponse(){return this.responsePromise.then((Z)=>Z.response)}async withResponse(){let[Z,$]=await Promise.all([this.parse(),this.asResponse()]);return{data:Z,response:$,request_id:$.headers.get("request-id"),workspace_id:$.headers.get("anthropic-workspace-id")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((Z)=>this.parseResponse(Q(this,l0,"f"),Z));return this.parsedPromise}then(Z,$){return this.parse().then(Z,$)}catch(Z){return this.parse().catch(Z)}finally(Z){return this.parse().finally(Z)}}return l0=new WeakMap,X})()});var j$,Q1,J9,a,E,K1;var R=x(()=>{JZ();m();A$();Y1();e();Q1=(()=>{class X{constructor(Z,$,J,z){j$.set(this,void 0),M(this,j$,Z,"f"),this.options=z,this.response=$,this.body=J}hasNextPage(){if(!this.getPaginatedItems().length)return!1;return this.nextPageRequestOptions()!=null}async getNextPage(){let Z=this.nextPageRequestOptions();if(!Z)throw new L("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Q(this,j$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(j$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}}return X})(),J9=(()=>{class X extends E${constructor(Z,$,J){super(Z,$,async(z,Y)=>new J(z,Y.response,await L$(z,Y),Y.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}}return X})();a=class a extends Q1{constructor(X,Z,$,J){super(X,Z,$,J);this.data=$.data||[],this.has_more=$.has_more||!1,this.first_id=$.first_id||null,this.last_id=$.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){if(this.has_more===!1)return!1;return super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let Z=this.first_id;if(!Z)return null;return{...this.options,query:{...f0(this.options.query),before_id:Z}}}let X=this.last_id;if(!X)return null;return{...this.options,query:{...f0(this.options.query),after_id:X}}}};E=class E extends Q1{constructor(X,Z,$,J){super(X,Z,$,J);this.data=$.data||[],this.next_page=$.next_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let X=this.next_page;if(!X)return null;return{...this.options,query:{...f0(this.options.query),page:X}}}};K1=class K1 extends Q1{constructor(X,Z,$,J){super(X,Z,$,J);this.data=$.data||[],this.next_page=$.next_page||null,this.prev_page=$.prev_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let X=this.next_page;if(!X)return null;return{...this.options,query:{...f0(this.options.query),page:X}}}}});function iZ(X,Z,$){return N1(),new File(X,Z??"unknown_file",$)}function p0(X,Z){let $=typeof X==="object"&&X!==null&&(("name"in X)&&X.name&&String(X.name)||("url"in X)&&X.url&&String(X.url)||("filename"in X)&&X.filename&&String(X.filename)||("path"in X)&&X.path&&String(X.path))||"";return Z?$.split(/[\\/]/).pop()||void 0:$}function _7(X){let Z=typeof X==="function"?X:X.fetch,$=z9.get(Z);if($)return $;let J=(async()=>{try{let z="Response"in Z?Z.Response:(await Z("data:,")).constructor,Y=new FormData;if(Y.toString()===await new z(Y).text())return!1;return!0}catch{return!0}})();return z9.set(Z,J),J}var N1=()=>{if(typeof File>"u"){let{process:X}=globalThis,Z=typeof X?.versions?.node==="string"&&parseInt(X.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(Z?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}},W1=(X)=>X!=null&&typeof X==="object"&&typeof X[Symbol.asyncIterator]==="function",UZ=async(X,Z,$=!0)=>{return{...X,body:await m7(X.body,Z,$)}},z9,m7=async(X,Z,$=!0)=>{if(!await _7(Z))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let J=new FormData;return await Promise.all(Object.entries(X||{}).map(([z,Y])=>V1(J,z,Y,$))),J},V1=async(X,Z,$,J)=>{if($===void 0)return;if($==null)throw TypeError(`Received null for "${Z}"; to pass null in FormData, you must use the string 'null'`);if(typeof $==="string"||typeof $==="number"||typeof $==="boolean")X.append(Z,String($));else if($ instanceof Response){let z={},Y=$.headers.get("Content-Type");if(Y)z={type:Y};X.append(Z,iZ([await $.blob()],p0($,J),z))}else if(W1($))X.append(Z,iZ([await new Response(K$($)).blob()],p0($,J)));else if($ instanceof Blob)X.append(Z,iZ([$],p0($,J)||void 0,{type:$.type}));else if(Array.isArray($))await Promise.all($.map((z)=>V1(X,Z+"[]",z,J)));else if(typeof $.then==="function")throw TypeError(`Received a Promise for "${Z}"; await it first, e.g. \`await toFile(...)\``);else if($ instanceof ArrayBuffer||ArrayBuffer.isView($))throw TypeError(`Received ${$.constructor.name} for "${Z}"; to upload raw bytes, wrap them with \`await toFile(bytes, 'filename')\``);else if(typeof $==="object")await Promise.all(Object.entries($).map(([z,Y])=>V1(X,`${Z}[${z}]`,Y,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${$} instead`)};var RZ=x(()=>{Z0();z9=new WeakMap});async function q1(X,Z,$){if(N1(),X=await X,Z||(Z=p0(X,!0)),u7(X)){if(X instanceof File&&Z==null&&$==null)return X;return iZ([await X.arrayBuffer()],Z??X.name,{type:X.type,lastModified:X.lastModified,...$})}if(c7(X)){let z=await X.blob();return Z||(Z=new URL(X.url).pathname.split(/[\\/]/).pop()),iZ(await U1(z),Z,$)}let J=await U1(X);if(!$?.type){let z=J.find((Y)=>typeof Y==="object"&&("type"in Y)&&Y.type);if(typeof z==="string")$={...$,type:z}}return iZ(J,Z,$)}async function U1(X){let Z=[];if(typeof X==="string"||ArrayBuffer.isView(X)||X instanceof ArrayBuffer)Z.push(X);else if(Y9(X))Z.push(X instanceof Blob?X:await X.arrayBuffer());else if(W1(X))for await(let $ of X)Z.push(...await U1($));else{let $=X?.constructor?.name;throw Error(`Unexpected data type: ${typeof X}${$?`; constructor: ${$}`:""}${d7(X)}`)}return Z}function d7(X){if(typeof X!=="object"||X===null)return"";return`; props: [${Object.getOwnPropertyNames(X).map(($)=>`"${$}"`).join(", ")}]`}var Y9=(X)=>X!=null&&typeof X==="object"&&typeof X.size==="number"&&typeof X.type==="string"&&typeof X.text==="function"&&typeof X.slice==="function"&&typeof X.arrayBuffer==="function",u7=(X)=>X!=null&&typeof X==="object"&&typeof X.name==="string"&&typeof X.lastModified==="number"&&Y9(X),c7=(X)=>X!=null&&typeof X==="object"&&typeof X.url==="string"&&typeof X.blob==="function";var Q9=x(()=>{RZ();RZ()});var K9=x(()=>{Q9()});var V9=()=>{};class B{constructor(X){this._client=X}}var S=()=>{};function*p7(X){if(!X)return;if(N9 in X){let{values:J,nulls:z}=X;yield*J.entries();for(let Y of z)yield[Y,null];return}let Z=!1,$;if(X instanceof Headers)$=X.entries();else if(kX(X))$=X;else Z=!0,$=Object.entries(X??{});for(let J of $){let z=J[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let Y=kX(J[1])?J[1]:[J[1]],K=!1;for(let N of Y){if(N===void 0)continue;if(Z&&!K)K=!0,yield[z,S$];yield[z,N]}}}var N9,S$,i7,n7=(X,Z)=>{let $=X?X.split(",").map((J)=>J.trim()).filter(Boolean):[];for(let J of Z.split(",").map((z)=>z.trim()))if(J&&!$.includes(J))$.push(J);return $.join(", ")},V=(X)=>{let Z=new Headers,$=new Set;for(let J of X){let z=new Set;for(let[Y,K]of p7(J)){let N=Y.toLowerCase();if(i7.has(N)){if(K===S$)continue;if(K===null)Z.delete(Y),$.add(N);else Z.set(Y,n7(Z.get(Y),K)),$.delete(N);continue}if(K===S$||!z.has(N)){if(Z.delete(Y),z.add(N),K===S$)continue}if(K===null)Z.delete(Y),$.add(N);else Z.append(Y,K),$.delete(N)}}return{[N9]:!0,values:Z,nulls:$}};var w=x(()=>{e();N9=Symbol.for("brand.privateNullableHeaders");S$=Symbol("clear"),i7=new Set(["x-stainless-helper"])});function U9(X){return X.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var W9,a7=(X=U9)=>function($,...J){if($.length===1)return $[0];let z=!1,Y=[],K=$.reduce((H,G,C)=>{if(/[?#]/.test(G))z=!0;let O=J[C],T=(z?encodeURIComponent:X)(""+O);if(C!==J.length&&(O==null||typeof O==="object"&&O.toString===Object.getPrototypeOf(Object.getPrototypeOf(O.hasOwnProperty??W9)??W9)?.toString))T=O+"",Y.push({start:H.length+G.length,length:T.length,error:`Value of type ${Object.prototype.toString.call(O).slice(8,-1)} is not a valid path parameter`});return H+G+(C===J.length?"":T)},""),N=K.split(/[?#]/,1)[0],W=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,q;while((q=W.exec(N))!==null)Y.push({start:q.index,length:q[0].length,error:`Value "${q[0]}" can't be safely passed as a path parameter`});if(Y.sort((H,G)=>H.start-G.start),Y.length>0){let H=0,G=Y.reduce((C,O)=>{let T=" ".repeat(O.start-H),P="^".repeat(O.length);return H=O.start+O.length,C+T+P},"");throw new L(`Path parameters result in path with invalid segments:
|
|
6
|
-
${Y.map((C)=>C.error).join(`
|
|
7
|
-
`)}
|
|
8
|
-
${K}
|
|
9
|
-
${G}`)}return K},U;var f=x(()=>{m();W9=Object.freeze(Object.create(null)),U=a7(U9)});var i0;var G1=x(()=>{S();R();w();f();i0=class i0 extends B{retrieve(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/deployment_runs/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/deployment_runs?beta=true",E,{query:z,...Z,headers:V([{"anthropic-beta":[...$??[],"managed-agents-2026-04-01"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}}});var n0;var O1=x(()=>{S();R();w();f();n0=class n0 extends B{create(X,Z){let{betas:$,workspace_id:J,...z}=X;return this._client.post("/v1/deployments?beta=true",{body:z,...Z,headers:V([{"anthropic-beta":[...$??[],"managed-agents-2026-04-01"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}retrieve(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/deployments/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}update(X,Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post(U`/v1/deployments/${X}?beta=true`,{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/deployments?beta=true",E,{query:z,...Z,headers:V([{"anthropic-beta":[...$??[],"managed-agents-2026-04-01"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}archive(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/deployments/${X}/archive?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}pause(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/deployments/${X}/pause?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}run(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/deployments/${X}/run?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}unpause(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/deployments/${X}/unpause?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}}});var a0;var C1=x(()=>{S();R();w();f();a0=class a0 extends B{create(X,Z){let{betas:$,workspace_id:J,...z}=X;return this._client.post("/v1/dreams?beta=true",{body:z,...Z,headers:V([{"anthropic-beta":[...$??[],"dreaming-2026-04-21"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}retrieve(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/dreams/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/dreams?beta=true",E,{query:z,...Z,headers:V([{"anthropic-beta":[...$??[],"dreaming-2026-04-21"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}archive(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/dreams/${X}/archive?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}cancel(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/dreams/${X}/cancel?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}}});function t0(X){return{["x-stainless-helper"]:X}}function F$(X){return typeof X==="object"&&X!==null&&r0 in X}function M1(X,Z){let $=new Set;if(X){for(let J of X)if(F$(J))$.add(J[r0])}if(Z)for(let J of Z){if(F$(J))$.add(J[r0]);let z=J.content;if(Array.isArray(z)){for(let Y of z)if(F$(Y))$.add(Y[r0])}}return Array.from($)}function R$(X,Z){let $=M1(X,Z);if($.length===0)return{};return{["x-stainless-helper"]:$.join(", ")}}function P$(X){if(F$(X))return{["x-stainless-helper"]:X[r0]};return{}}var D$="x-stainless-helper",w$="x-stainless-helper-method",r0;var jZ=x(()=>{r0=Symbol("anthropic.sdk.stainlessHelper")});var o0;var x1=x(()=>{S();R();w();jZ();RZ();f();o0=class o0 extends B{list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/files?beta=true",E,{query:z,...Z,headers:V([{...$?.toString()!=null?{"anthropic-beta":$?.toString()}:void 0,...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}delete(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.delete(U`/v1/files/${X}?beta=true`,{...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}download(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/files/${X}/content?beta=true`,{...$,headers:V([{Accept:"application/binary",...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers]),__binaryResponse:!0})}retrieveMetadata(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/files/${X}?beta=true`,{...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}upload(X,Z){let{betas:$,workspace_id:J,...z}=X;return this._client.post("/v1/files?beta=true",UZ({body:z,...Z,headers:V([{...$?.toString()!=null?{"anthropic-beta":$?.toString()}:void 0,...J!=null?{"anthropic-workspace-id":J}:void 0},P$(z.file),Z?.headers])},this._client))}}});var s0;var B1=x(()=>{S();R();w();f();s0=class s0 extends B{retrieve(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/models/${X}?beta=true`,{...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/models?beta=true",a,{query:z,...Z,headers:V([{...$?.toString()!=null?{"anthropic-beta":$?.toString()}:void 0,...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}}});var e0;var H1=x(()=>{S();R();w();f();e0=class e0 extends B{create(X,Z){let{betas:$,workspace_id:J,...z}=X;return this._client.post("/v1/user_profiles?beta=true",{body:z,...Z,headers:V([{"anthropic-beta":[...$??[],"user-profiles-2026-08-18"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}retrieve(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/user_profiles/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}update(X,Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post(U`/v1/user_profiles/${X}?beta=true`,{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/user_profiles?beta=true",E,{query:z,...Z,headers:V([{"anthropic-beta":[...$??[],"user-profiles-2026-08-18"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}createEnrollmentURL(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/user_profiles/${X}/enrollment_url?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}}});var C9=I$((G9)=>{Object.defineProperty(G9,"__esModule",{value:!0});G9.timingSafeEqual=void 0;function q9(X,Z=""){if(!X)throw Error(Z)}function $5(X,Z){if(X.byteLength!==Z.byteLength)return!1;if(!(X instanceof DataView))X=new DataView(ArrayBuffer.isView(X)?X.buffer:X);if(!(Z instanceof DataView))Z=new DataView(ArrayBuffer.isView(Z)?Z.buffer:Z);q9(X instanceof DataView),q9(Z instanceof DataView);let $=X.byteLength,J=0,z=-1;while(++z<$)J|=X.getUint8(z)^Z.getUint8(z);return J===0}G9.timingSafeEqual=$5});var B9=I$((QZ)=>{var X5=QZ&&QZ.__extends||function(){var X=function(Z,$){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,z){J.__proto__=z}||function(J,z){for(var Y in z)if(z.hasOwnProperty(Y))J[Y]=z[Y]},X(Z,$)};return function(Z,$){X(Z,$);function J(){this.constructor=Z}Z.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(QZ,"__esModule",{value:!0});var p=256,T1=function(){function X(Z){if(Z===void 0)Z="=";this._paddingCharacter=Z}return X.prototype.encodedLength=function(Z){if(!this._paddingCharacter)return(Z*8+5)/6|0;return(Z+2)/3*4|0},X.prototype.encode=function(Z){var $="",J=0;for(;J<Z.length-2;J+=3){var z=Z[J]<<16|Z[J+1]<<8|Z[J+2];$+=this._encodeByte(z>>>18&63),$+=this._encodeByte(z>>>12&63),$+=this._encodeByte(z>>>6&63),$+=this._encodeByte(z>>>0&63)}var Y=Z.length-J;if(Y>0){var z=Z[J]<<16|(Y===2?Z[J+1]<<8:0);if($+=this._encodeByte(z>>>18&63),$+=this._encodeByte(z>>>12&63),Y===2)$+=this._encodeByte(z>>>6&63);else $+=this._paddingCharacter||"";$+=this._paddingCharacter||""}return $},X.prototype.maxDecodedLength=function(Z){if(!this._paddingCharacter)return(Z*6+7)/8|0;return Z/4*3|0},X.prototype.decodedLength=function(Z){return this.maxDecodedLength(Z.length-this._getPaddingLength(Z))},X.prototype.decode=function(Z){if(Z.length===0)return new Uint8Array(0);var $=this._getPaddingLength(Z),J=Z.length-$,z=new Uint8Array(this.maxDecodedLength(J)),Y=0,K=0,N=0,W=0,q=0,H=0,G=0;for(;K<J-4;K+=4)W=this._decodeChar(Z.charCodeAt(K+0)),q=this._decodeChar(Z.charCodeAt(K+1)),H=this._decodeChar(Z.charCodeAt(K+2)),G=this._decodeChar(Z.charCodeAt(K+3)),z[Y++]=W<<2|q>>>4,z[Y++]=q<<4|H>>>2,z[Y++]=H<<6|G,N|=W&p,N|=q&p,N|=H&p,N|=G&p;if(K<J-1)W=this._decodeChar(Z.charCodeAt(K)),q=this._decodeChar(Z.charCodeAt(K+1)),z[Y++]=W<<2|q>>>4,N|=W&p,N|=q&p;if(K<J-2)H=this._decodeChar(Z.charCodeAt(K+2)),z[Y++]=q<<4|H>>>2,N|=H&p;if(K<J-3)G=this._decodeChar(Z.charCodeAt(K+3)),z[Y++]=H<<6|G,N|=G&p;if(N!==0)throw Error("Base64Coder: incorrect characters for decoding");return z},X.prototype._encodeByte=function(Z){var $=Z;return $+=65,$+=25-Z>>>8&6,$+=51-Z>>>8&-75,$+=61-Z>>>8&-15,$+=62-Z>>>8&3,String.fromCharCode($)},X.prototype._decodeChar=function(Z){var $=p;return $+=(42-Z&Z-44)>>>8&-p+Z-43+62,$+=(46-Z&Z-48)>>>8&-p+Z-47+63,$+=(47-Z&Z-58)>>>8&-p+Z-48+52,$+=(64-Z&Z-91)>>>8&-p+Z-65+0,$+=(96-Z&Z-123)>>>8&-p+Z-97+26,$},X.prototype._getPaddingLength=function(Z){var $=0;if(this._paddingCharacter){for(var J=Z.length-1;J>=0;J--){if(Z[J]!==this._paddingCharacter)break;$++}if(Z.length<4||$>2)throw Error("Base64Coder: incorrect padding")}return $},X}();QZ.Coder=T1;var Z8=new T1;function J5(X){return Z8.encode(X)}QZ.encode=J5;function z5(X){return Z8.decode(X)}QZ.decode=z5;var M9=function(X){X5(Z,X);function Z(){return X!==null&&X.apply(this,arguments)||this}return Z.prototype._encodeByte=function($){var J=$;return J+=65,J+=25-$>>>8&6,J+=51-$>>>8&-75,J+=61-$>>>8&-13,J+=62-$>>>8&49,String.fromCharCode(J)},Z.prototype._decodeChar=function($){var J=p;return J+=(44-$&$-46)>>>8&-p+$-45+62,J+=(94-$&$-96)>>>8&-p+$-95+63,J+=(47-$&$-58)>>>8&-p+$-48+52,J+=(64-$&$-91)>>>8&-p+$-65+0,J+=(96-$&$-123)>>>8&-p+$-97+26,J},Z}(T1);QZ.URLSafeCoder=M9;var x9=new M9;function Y5(X){return x9.encode(X)}QZ.encodeURLSafe=Y5;function Q5(X){return x9.decode(X)}QZ.decodeURLSafe=Q5;QZ.encodedLength=function(X){return Z8.encodedLength(X)};QZ.maxDecodedLength=function(X){return Z8.maxDecodedLength(X)};QZ.decodedLength=function(X){return Z8.decodedLength(X)}});var T9=I$((H9,f$)=>{(function(X,Z){var $={};Z($);var J=$.default;for(var z in $)J[z]=$[z];if(typeof f$==="object"&&typeof f$.exports==="object")f$.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else X.sha256=J})(H9,function(X){X.__esModule=!0,X.digestLength=32,X.blockSize=64;var Z=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function $(G,C,O,T,P){var F,D,A,k,j,I,r,b,l,_,d,NZ,cZ;while(P>=64){F=C[0],D=C[1],A=C[2],k=C[3],j=C[4],I=C[5],r=C[6],b=C[7];for(_=0;_<16;_++)d=T+_*4,G[_]=(O[d]&255)<<24|(O[d+1]&255)<<16|(O[d+2]&255)<<8|O[d+3]&255;for(_=16;_<64;_++)l=G[_-2],NZ=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,l=G[_-15],cZ=(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3,G[_]=(NZ+G[_-7]|0)+(cZ+G[_-16]|0);for(_=0;_<64;_++)NZ=(((j>>>6|j<<26)^(j>>>11|j<<21)^(j>>>25|j<<7))+(j&I^~j&r)|0)+(b+(Z[_]+G[_]|0)|0)|0,cZ=((F>>>2|F<<30)^(F>>>13|F<<19)^(F>>>22|F<<10))+(F&D^F&A^D&A)|0,b=r,r=I,I=j,j=k+NZ|0,k=A,A=D,D=F,F=NZ+cZ|0;C[0]+=F,C[1]+=D,C[2]+=A,C[3]+=k,C[4]+=j,C[5]+=I,C[6]+=r,C[7]+=b,T+=64,P-=64}return T}var J=function(){function G(){this.digestLength=X.digestLength,this.blockSize=X.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return G.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},G.prototype.clean=function(){for(var C=0;C<this.buffer.length;C++)this.buffer[C]=0;for(var C=0;C<this.temp.length;C++)this.temp[C]=0;this.reset()},G.prototype.update=function(C,O){if(O===void 0)O=C.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var T=0;if(this.bytesHashed+=O,this.bufferLength>0){while(this.bufferLength<64&&O>0)this.buffer[this.bufferLength++]=C[T++],O--;if(this.bufferLength===64)$(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(O>=64)T=$(this.temp,this.state,C,T,O),O%=64;while(O>0)this.buffer[this.bufferLength++]=C[T++],O--;return this},G.prototype.finish=function(C){if(!this.finished){var O=this.bytesHashed,T=this.bufferLength,P=O/536870912|0,F=O<<3,D=O%64<56?64:128;this.buffer[T]=128;for(var A=T+1;A<D-8;A++)this.buffer[A]=0;this.buffer[D-8]=P>>>24&255,this.buffer[D-7]=P>>>16&255,this.buffer[D-6]=P>>>8&255,this.buffer[D-5]=P>>>0&255,this.buffer[D-4]=F>>>24&255,this.buffer[D-3]=F>>>16&255,this.buffer[D-2]=F>>>8&255,this.buffer[D-1]=F>>>0&255,$(this.temp,this.state,this.buffer,0,D),this.finished=!0}for(var A=0;A<8;A++)C[A*4+0]=this.state[A]>>>24&255,C[A*4+1]=this.state[A]>>>16&255,C[A*4+2]=this.state[A]>>>8&255,C[A*4+3]=this.state[A]>>>0&255;return this},G.prototype.digest=function(){var C=new Uint8Array(this.digestLength);return this.finish(C),C},G.prototype._saveState=function(C){for(var O=0;O<this.state.length;O++)C[O]=this.state[O]},G.prototype._restoreState=function(C,O){for(var T=0;T<this.state.length;T++)this.state[T]=C[T];this.bytesHashed=O,this.finished=!1,this.bufferLength=0},G}();X.Hash=J;var z=function(){function G(C){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var O=new Uint8Array(this.blockSize);if(C.length>this.blockSize)new J().update(C).finish(O).clean();else for(var T=0;T<C.length;T++)O[T]=C[T];for(var T=0;T<O.length;T++)O[T]^=54;this.inner.update(O);for(var T=0;T<O.length;T++)O[T]^=106;this.outer.update(O),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var T=0;T<O.length;T++)O[T]=0}return G.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},G.prototype.clean=function(){for(var C=0;C<this.istate.length;C++)this.ostate[C]=this.istate[C]=0;this.inner.clean(),this.outer.clean()},G.prototype.update=function(C){return this.inner.update(C),this},G.prototype.finish=function(C){if(this.outer.finished)this.outer.finish(C);else this.inner.finish(C),this.outer.update(C,this.digestLength).finish(C);return this},G.prototype.digest=function(){var C=new Uint8Array(this.digestLength);return this.finish(C),C},G}();X.HMAC=z;function Y(G){var C=new J().update(G),O=C.digest();return C.clean(),O}X.hash=Y,X.default=Y;function K(G,C){var O=new z(G).update(C),T=O.digest();return O.clean(),T}X.hmac=K;function N(G,C,O,T){var P=T[0];if(P===0)throw Error("hkdf: cannot expand more");if(C.reset(),P>1)C.update(G);if(O)C.update(O);C.update(T),C.finish(G),T[0]++}var W=new Uint8Array(X.digestLength);function q(G,C,O,T){if(C===void 0)C=W;if(T===void 0)T=32;var P=new Uint8Array([1]),F=K(C,G),D=new z(F),A=new Uint8Array(D.digestLength),k=A.length,j=new Uint8Array(T);for(var I=0;I<T;I++){if(k===A.length)N(A,D,O,P),k=0;j[I]=A[k++]}return D.clean(),A.fill(0),P.fill(0),j}X.hkdf=q;function H(G,C,O,T){var P=new z(G),F=P.digestLength,D=new Uint8Array(4),A=new Uint8Array(F),k=new Uint8Array(F),j=new Uint8Array(T);for(var I=0;I*F<T;I++){var r=I+1;D[0]=r>>>24&255,D[1]=r>>>16&255,D[2]=r>>>8&255,D[3]=r>>>0&255,P.reset(),P.update(C),P.update(D),P.finish(k);for(var b=0;b<F;b++)A[b]=k[b];for(var b=2;b<=O;b++){P.reset(),P.update(k).finish(k);for(var l=0;l<F;l++)A[l]^=k[l]}for(var b=0;b<F&&I*F+b<T;b++)j[I*F+b]=A[b]}for(var I=0;I<F;I++)A[I]=k[I]=0;for(var I=0;I<4;I++)D[I]=0;return P.clean(),j}X.pbkdf2=H})});var S9=I$((E9)=>{Object.defineProperty(E9,"__esModule",{value:!0});E9.Webhook=E9.WebhookVerificationError=void 0;var K5=C9(),L9=B9(),V5=T9(),A9=300;class L1 extends Error{constructor(X){super(X);Object.setPrototypeOf(this,L1.prototype),this.name="ExtendableError",this.stack=Error(X).stack}}class yZ extends L1{constructor(X){super(X);Object.setPrototypeOf(this,yZ.prototype),this.name="WebhookVerificationError"}}E9.WebhookVerificationError=yZ;class $8{constructor(X,Z){if(!X)throw Error("Secret can't be empty.");if((Z===null||Z===void 0?void 0:Z.format)==="raw")if(X instanceof Uint8Array)this.key=X;else this.key=Uint8Array.from(X,($)=>$.charCodeAt(0));else{if(typeof X!=="string")throw Error("Expected secret to be of type string");if(X.startsWith($8.prefix))X=X.substring($8.prefix.length);this.key=L9.decode(X)}}verify(X,Z){let $={};for(let G of Object.keys(Z))$[G.toLowerCase()]=Z[G];let J=$["webhook-id"],z=$["webhook-signature"],Y=$["webhook-timestamp"];if(!z||!J||!Y)throw new yZ("Missing required headers");let K=this.verifyTimestamp(Y),W=this.sign(J,K,X).split(",")[1],q=z.split(" "),H=new globalThis.TextEncoder;for(let G of q){let[C,O]=G.split(",");if(C!=="v1")continue;if((0,K5.timingSafeEqual)(H.encode(O),H.encode(W)))return JSON.parse(X.toString())}throw new yZ("No matching signature found")}sign(X,Z,$){if(typeof $==="string");else if($.constructor.name==="Buffer")$=$.toString();else throw Error("Expected payload to be of type string or Buffer.");let J=new TextEncoder,z=Math.floor(Z.getTime()/1000),Y=J.encode(`${X}.${z}.${$}`);return`v1,${L9.encode(V5.hmac(this.key,Y))}`}verifyTimestamp(X){let Z=Math.floor(Date.now()/1000),$=parseInt(X,10);if(isNaN($))throw new yZ("Invalid Signature Headers");if(Z-$>A9)throw new yZ("Message timestamp too old");if($>Z+A9)throw new yZ("Message timestamp too new");return new Date($*1000)}}E9.Webhook=$8;$8.prefix="whsec_"});var F9,X8;var A1=x(()=>{S();F9=W5(S9(),1);X8=class X8 extends B{parseUnverified(X){return JSON.parse(X)}unwrap(X,Z){let $=Z?.headers;if($==null)throw Error("Webhook headers are required in order to verify the signature");let J=Z.key===void 0?this._client.webhookKey:Z.key;if(!J)throw Error("Webhook key must not be null or empty in order to unwrap");return new F9.Webhook(J).verify(X,$),JSON.parse(X)}}});var J8;var E1=x(()=>{S();R();w();f();J8=class J8 extends B{list(X,Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList(U`/v1/agents/${X}/versions?beta=true`,E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}}});var y$;var j1=x(()=>{S();E1();E1();R();w();f();y$=(()=>{class X extends B{constructor(){super(...arguments);this.versions=new J8(this._client)}create(Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/agents?beta=true",{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z,workspace_id:Y,...K}=$??{};return this._client.get(U`/v1/agents/${Z}?beta=true`,{query:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}update(Z,$,J){let{betas:z,workspace_id:Y,...K}=$;return this._client.post(U`/v1/agents/${Z}?beta=true`,{body:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}list(Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList("/v1/agents?beta=true",E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}archive(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.post(U`/v1/agents/${Z}/archive?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}}return X.Versions=J8,X})()});function kZ(X,Z){if(!X)return()=>{};if(X.aborted)return Z.abort(),()=>{};let $=()=>Z.abort();return X.addEventListener("abort",$),()=>X.removeEventListener("abort",$)}var k$=()=>{};function bZ(X,Z){return X instanceof v&&X.status===Z}function O5(X){return X instanceof v&&typeof X.status==="number"&&X.status>=400&&X.status<500}function nZ(X){return O5(X)&&!bZ(X,408)&&!bZ(X,409)&&!bZ(X,429)}function b$(X,Z,$){return Math.min(Z*2**X,$)}function D9(X,Z){return X+Math.random()*(Z-X)}function h$(X){return X*(1-Math.random()*0.25)}var g$=x(()=>{m()});function v$(X,{authToken:Z,helper:$}){if(!Z)throw new L(`copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify(Z)}`);let J=X,z=J._options.defaultHeaders,Y=J._authState?.extraHeaders,K=Y?Object.fromEntries(Object.entries(Y).filter(([W])=>{let q=W.toLowerCase();return q!=="authorization"&&q!=="x-api-key"})):void 0,N=V([K,z,{[D$]:$}]);return X.withOptions({apiKey:null,authToken:Z,baseURL:X.baseURL,credentials:void 0,defaultHeaders:N})}var S1=x(()=>{m();w();jZ()});function H5(X){return b$(X,M5,x5)}function L5(){let Z=globalThis.process?.env?.HOSTNAME;return Z?`${Z}-${B$()}`:B$()}var z0,_$,qZ,m$,u$,c$,z8,Y8,Y0,Q0,d$,K0,Q8,C5=999,M5=1000,x5=60000,B5=300000,K8,T5;var F1=x(()=>{JZ();m();wZ();eZ();oX();k$();w();g$();S1();K8=(()=>{class X{constructor(Z){z0.set(this,void 0),_$.set(this,!1),qZ.set(this,void 0),m$.set(this,void 0),u$.set(this,void 0),c$.set(this,void 0),z8.set(this,void 0),Y8.set(this,void 0),Y0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??L5(),M(this,z0,v$(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),M(this,u$,Z.autoStop??!0,"f"),M(this,c$,Z.drain??!1,"f"),M(this,z8,Z.blockMs===void 0?C5:Z.blockMs,"f"),M(this,Y8,Z.reclaimOlderThanMs??null,"f"),M(this,Y0,Z.requestOptions,"f"),M(this,qZ,new AbortController,"f"),M(this,m$,kZ(Z.signal,Q(this,qZ,"f")),"f")}get signal(){return Q(this,qZ,"f").signal}abort(){Q(this,qZ,"f").abort()}async*[(z0=new WeakMap,_$=new WeakMap,qZ=new WeakMap,m$=new WeakMap,u$=new WeakMap,c$=new WeakMap,z8=new WeakMap,Y8=new WeakMap,Y0=new WeakMap,Symbol.asyncIterator)](){if(Q(this,_$,"f"))throw new L("Cannot iterate over a consumed WorkPoller");M(this,_$,!0,"f");let Z=h(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});let $=new T5(Z,this.environmentId);try{let J=0;while(!Q(this,qZ,"f").signal.aborted){let z;try{z=await Q(this,z0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...Q(this,z8,"f")!==null?{block_ms:Q(this,z8,"f")}:{},...Q(this,Y8,"f")!==null?{reclaim_older_than_ms:Q(this,Y8,"f")}:{}},{headers:V([Q(this,Y0,"f")?.headers]),signal:Q(this,qZ,"f").signal})}catch(Y){if(Q(this,qZ,"f").signal.aborted)return;if(nZ(Y))throw Z.error("poll failed permanently, stopping poller",{error:String(Y)}),Y;let K=h$(H5(J));Z.warn("poll failed, backing off",{error:String(Y),backoff_ms:K}),J++,await MZ(K,Q(this,qZ,"f").signal);continue}if(J=0,z==null){if(Q(this,c$,"f"))return;$.onEmptyPoll(),await MZ(D9(1000,3000),Q(this,qZ,"f").signal);continue}$.onClaim(),Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:z.id,work_type:z.data.type});try{await Q(this,z0,"f").beta.environments.work.ack(z.id,{environment_id:z.environment_id},{headers:V([Q(this,Y0,"f")?.headers]),signal:Q(this,qZ,"f").signal})}catch(Y){Z.error("ack failed",{work_id:z.id,error:String(Y)});continue}try{yield z}finally{if(Q(this,u$,"f"))try{await Q(this,z0,"f").beta.environments.work.stop(z.id,{environment_id:z.environment_id},{headers:V([Q(this,Y0,"f")?.headers])})}catch(Y){if(!bZ(Y,409))Z.warn("stop failed",{work_id:z.id,error:String(Y)})}}}}finally{Q(this,m$,"f").call(this)}}}return X})();T5=(()=>{class X{constructor(Z,$){Q0.set(this,void 0),d$.set(this,void 0),K0.set(this,void 0),Q8.set(this,0),M(this,Q0,Z,"f"),M(this,d$,$,"f")}onEmptyPoll(){let Z=Date.now(),$={component:"work-poller",environment_id:Q(this,d$,"f")};if(Q(this,K0,"f")===void 0)M(this,K0,M(this,Q8,Z,"f"),"f"),Q(this,Q0,"f").info("idle; polling for work",$);else if(Z-Q(this,Q8,"f")>=B5)M(this,Q8,Z,"f"),Q(this,Q0,"f").info(`still polling; idle for ${Math.round((Z-Q(this,K0,"f"))/1000)}s`,$);else Q(this,Q0,"f").debug("poll returned no work",$)}onClaim(){M(this,K0,void 0,"f")}}return Q0=new WeakMap,d$=new WeakMap,K0=new WeakMap,Q8=new WeakMap,X})()});var V0,hZ,N0,w9;var R9=x(()=>{JZ();w9=(()=>{class X{constructor(){V0.set(this,[]),hZ.set(this,[]),N0.set(this,!1)}push(Z){if(Q(this,N0,"f"))return!1;let $=Q(this,hZ,"f").shift();if($)$({done:!1,value:Z});else Q(this,V0,"f").push(Z);return!0}close(){if(Q(this,N0,"f"))return;M(this,N0,!0,"f");while(Q(this,hZ,"f").length>0)Q(this,hZ,"f").shift()({done:!0,value:void 0})}next(Z){if(Q(this,V0,"f").length>0)return Promise.resolve({done:!1,value:Q(this,V0,"f").shift()});if(Q(this,N0,"f")||Z?.aborted)return Promise.resolve({done:!0,value:void 0});return new Promise(($)=>{let J=(Y)=>{Z?.removeEventListener("abort",z),$(Y)},z=()=>{let Y=Q(this,hZ,"f").indexOf(J);if(Y>=0)Q(this,hZ,"f").splice(Y,1);$({done:!0,value:void 0})};Q(this,hZ,"f").push(J),Z?.addEventListener("abort",z,{once:!0})})}tryShift(){return Q(this,V0,"f").shift()}}return V0=new WeakMap,hZ=new WeakMap,N0=new WeakMap,X})()});function D1(X){return"name"in X?X.name:("mcp_server_name"in X)?X.mcp_server_name:X.type}function A5(X){return X instanceof sZ?X.content:`Error: ${X instanceof Error?X.message:String(X)}`}async function P9(X,Z,$){try{let J=X.parse?X.parse(Z):Z;return{content:await X.run(J,$),isError:!1}}catch(J){return{content:A5(J),isError:!0}}}var I9=x(()=>{$$()});function m9(X){return X.type==="session.status_idle"&&X.stop_reason?.type==="end_turn"}function I5(X,Z,$){if(X.type==="agent.custom_tool_use")return{type:"user.custom_tool_result",custom_tool_use_id:X.id,is_error:Z,content:$};return{type:"user.tool_result",tool_use_id:X.id,is_error:Z,content:$}}function f5(X){if(typeof X==="string")return[{type:"text",text:X||"(no output)"}];let Z=X.map(($)=>{if($.type==="text")return{type:"text",text:$.text||"(no output)"};if($.type==="image"||$.type==="document")return $;if($.type==="search_result")return{type:"search_result",source:$.source,title:$.title,content:$.content.map((J)=>({type:"text",text:J.text})),citations:{enabled:$.citations?.enabled??!1}};return{type:"text",text:JSON.stringify($)}});return Z.length>0?Z:[{type:"text",text:"(no output)"}]}var V8,l$,W0,aZ,BZ,u,p$,t,i$,N8,t$,i,q0,KZ,G0,gZ,U0,PZ,o$,W8,GZ,n$,v9,f9,y9,k9,w1,b9,a$,r$,R1,h9,_9,g9=500,E5=1e4,j5=120000,S5=30000,F5=1000,D5=30000,w5=300000,R5=60000,P5,U8;var P1=x(()=>{JZ();m();wZ();eZ();g$();k$();R9();w();jZ();I9();P5=(()=>{class X{constructor(Z,$){V8.set(this,void 0),l$.set(this,void 0),W0.set(this,new Set),aZ.set(this,!1),BZ.set(this,void 0),M(this,V8,Z,"f"),M(this,l$,$,"f")}noteEvent(Z){if(Z.type==="user.tool_confirmation")return;if(m9(Z))this.arm();else this.disarm()}block(Z){if(Q(this,W0,"f").add(Z),Q(this,BZ,"f")!==void 0)M(this,aZ,!0,"f"),clearTimeout(Q(this,BZ,"f")),M(this,BZ,void 0,"f")}unblock(Z){if(Q(this,W0,"f").delete(Z),Q(this,W0,"f").size===0&&Q(this,aZ,"f"))this.arm()}arm(){if(Q(this,V8,"f")<=0)return;if(Q(this,W0,"f").size>0){M(this,aZ,!0,"f");return}if(M(this,aZ,!1,"f"),Q(this,BZ,"f")!==void 0)clearTimeout(Q(this,BZ,"f"));M(this,BZ,setTimeout(Q(this,l$,"f"),Q(this,V8,"f")),"f")}disarm(){if(M(this,aZ,!1,"f"),Q(this,BZ,"f")!==void 0)clearTimeout(Q(this,BZ,"f")),M(this,BZ,void 0,"f")}}return V8=new WeakMap,l$=new WeakMap,W0=new WeakMap,aZ=new WeakMap,BZ=new WeakMap,X})(),U8=(()=>{class X{constructor(Z,$){u.add(this),p$.set(this,!1),t.set(this,void 0),i$.set(this,void 0),N8.set(this,void 0),t$.set(this,void 0),i.set(this,void 0),q0.set(this,new Set),KZ.set(this,new Set),G0.set(this,new Map),gZ.set(this,new Map),U0.set(this,new w9),PZ.set(this,0),o$.set(this,w5),W8.set(this,null),GZ.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??R5,M(this,i,h($.client),"f"),M(this,t$,new Map($.tools.map((J)=>[D1(J),J])),"f"),M(this,t,new AbortController,"f"),M(this,i$,kZ($.signal,Q(this,t,"f")),"f"),M(this,N8,$.requestOptions,"f"),M(this,GZ,new P5(this.maxIdleMs,()=>{Q(this,i,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),Q(this,t,"f").abort()}),"f")}get signal(){return Q(this,t,"f").signal}abort(){Q(this,t,"f").abort()}_setSendRetryWindow(Z){M(this,o$,Z,"f")}async*[(p$=new WeakMap,t=new WeakMap,i$=new WeakMap,N8=new WeakMap,t$=new WeakMap,i=new WeakMap,q0=new WeakMap,KZ=new WeakMap,G0=new WeakMap,gZ=new WeakMap,U0=new WeakMap,PZ=new WeakMap,o$=new WeakMap,W8=new WeakMap,GZ=new WeakMap,u=new WeakSet,Symbol.asyncIterator)](){if(Q(this,p$,"f"))throw new L("Cannot iterate over a consumed SessionToolRunner");M(this,p$,!0,"f"),Q(this,i,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=Q(this,u,"m",v9).call(this).catch(($)=>{if(!Q(this,t,"f").signal.aborted)Q(this,i,"f").error("stream loop failed",{error:String($)});Q(this,t,"f").abort()});try{while(!0){let J=await Q(this,U0,"f").next(Q(this,t,"f").signal);if(J.done)break;yield J.value}await Z;let $;while(($=Q(this,U0,"f").tryShift())!==void 0)yield $}finally{Q(this,t,"f").abort(),Q(this,GZ,"f").disarm(),await Z;try{await Q(this,u,"m",_9).call(this)}catch($){Q(this,i,"f").warn("drain failed",{error:String($)})}Q(this,U0,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(J){Q(this,i,"f").warn("tool.close failed",{tool:D1($),error:String(J)})}Q(this,i$,"f").call(this)}}}return X})();n$=function(){return{...Q(this,N8,"f"),headers:V([t0("session-tool-runner"),Q(this,N8,"f")?.headers]),signal:Q(this,t,"f").signal}},v9=async function(){let Z=Q(this,t,"f"),$=g9;while(!Z.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},Q(this,u,"m",n$).call(this));await Q(this,u,"m",f9).call(this);for await(let z of J)if($=g9,await Q(this,u,"m",k9).call(this,z))return}catch(J){if(Z.signal.throwIfAborted(),nZ(J))throw Q(this,i,"f").error("permanent stream failure, shutting down",{error:String(J)}),Z.abort(),J;Q(this,i,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:$})}Z.signal.throwIfAborted(),await MZ($,Z.signal),$=Math.min($*2,E5)}},f9=async function(){let Z=Q(this,t,"f"),$=[],J=!1;try{for await(let K of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},Q(this,u,"m",n$).call(this)))Q(this,u,"m",y9).call(this,K,$),J=m9(K)}catch(K){Z.signal.throwIfAborted(),Q(this,i,"f").warn("reconcile list failed",{error:String(K)});for(let N of $)Q(this,q0,"f").delete(N.id);return}let z=$.filter((K)=>!Q(this,KZ,"f").has(K.id));Q(this,GZ,"f").disarm();for(let K of z)await Q(this,u,"m",w1).call(this,K);for(let K of[...Q(this,gZ,"f").values()]){let N=Q(this,G0,"f").get(K.id);if(N!==void 0)await Q(this,u,"m",a$).call(this,K,N)}let Y=z.filter((K)=>!Q(this,KZ,"f").has(K.id)&&!Q(this,gZ,"f").has(K.id));if(J&&Y.length===0)Q(this,GZ,"f").arm();else Q(this,GZ,"f").disarm()},y9=function(Z,$){if(Z.type==="agent.tool_use"||Z.type==="agent.custom_tool_use"){if(Q(this,q0,"f").add(Z.id),!Q(this,KZ,"f").has(Z.id))$.push(Z)}else if(Z.type==="user.tool_result")Q(this,KZ,"f").add(Z.tool_use_id);else if(Z.type==="user.custom_tool_result")Q(this,KZ,"f").add(Z.custom_tool_use_id);else if(Z.type==="user.tool_confirmation"){if(!Q(this,KZ,"f").has(Z.tool_use_id))Q(this,G0,"f").set(Z.tool_use_id,Z.result)}},k9=async function(Z){switch(Q(this,GZ,"f").noteEvent(Z),Z.type){case"agent.tool_use":case"agent.custom_tool_use":if(!Q(this,q0,"f").has(Z.id))Q(this,q0,"f").add(Z.id),await Q(this,u,"m",w1).call(this,Z);return!1;case"user.tool_confirmation":return await Q(this,u,"m",b9).call(this,Z),!1;case"user.tool_result":return Q(this,KZ,"f").add(Z.tool_use_id),!1;case"user.custom_tool_result":return Q(this,KZ,"f").add(Z.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return Q(this,i,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),Q(this,t,"f").abort(),!0;default:return!1}},w1=async function(Z){let $=Z.evaluated_permission,J=$==="deny"?"deny":Q(this,G0,"f").get(Z.id);if(J===void 0){if($===void 0||$==="allow")await Q(this,u,"m",R1).call(this,Z,void 0);else if(!Q(this,gZ,"f").has(Z.id))Q(this,i,"f").info("tool call awaiting confirmation; holding",{component:"session-tool-runner",session_id:this.sessionId,tool:Z.name,tool_use_id:Z.id}),Q(this,gZ,"f").set(Z.id,Z),Q(this,GZ,"f").block(Z.id);return}await Q(this,u,"m",a$).call(this,Z,J)},b9=async function(Z){Q(this,G0,"f").set(Z.tool_use_id,Z.result);let $=Q(this,gZ,"f").get(Z.tool_use_id);if($===void 0)return;await Q(this,u,"m",a$).call(this,$,Z.result)},a$=async function(Z,$){let J=Q(this,gZ,"f").delete(Z.id);if($==="allow"){if(Q(this,i,"f").info("tool call confirmed",{component:"session-tool-runner",session_id:this.sessionId,tool:Z.name,tool_use_id:Z.id}),!J)Q(this,GZ,"f").block(Z.id);try{await Q(this,u,"m",R1).call(this,Z,"allow")}finally{Q(this,GZ,"f").unblock(Z.id)}return}if(J)Q(this,GZ,"f").unblock(Z.id);Q(this,KZ,"f").add(Z.id),Q(this,i,"f").info("tool call denied; not executing",{component:"session-tool-runner",session_id:this.sessionId,tool:Z.name,tool_use_id:Z.id}),Q(this,u,"m",r$).call(this,{event:Z,toolUseId:Z.id,name:Z.name,isError:!1,posted:!1,confirmation:"deny"})},r$=function(Z){Q(this,U0,"f").push(Z)},R1=async function(Z,$){var J,z;if(Q(this,KZ,"f").has(Z.id))return;Q(this,i,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:Z.name,tool_use_id:Z.id}),M(this,PZ,(J=Q(this,PZ,"f"),J++,J),"f");try{let Y=Q(this,t$,"f").get(Z.name);if(!Y){Q(this,i,"f").info("tool not owned by this runner; leaving the tool_use_id pending for its owner",{component:"session-tool-runner",session_id:this.sessionId,tool:Z.name,tool_use_id:Z.id}),Q(this,u,"m",r$).call(this,{event:Z,toolUseId:Z.id,name:Z.name,isError:!1,posted:!1,confirmation:$});return}let K,N,W=new AbortController,q=kZ(Q(this,t,"f").signal,W),H=setTimeout(()=>W.abort(),j5);try{let O=await P9(Y,Z.input,{toolUse:Z,toolUseBlock:Z,signal:W.signal});K=O.content,N=O.isError}finally{clearTimeout(H),q()}let G=I5(Z,N,f5(K)),C=await Q(this,u,"m",h9).call(this,G,Z.id);Q(this,u,"m",r$).call(this,{event:Z,result:G,toolUseId:Z.id,name:Z.name,isError:N,posted:C,confirmation:$})}finally{if(M(this,PZ,(z=Q(this,PZ,"f"),z--,z),"f"),Q(this,PZ,"f")===0)Q(this,W8,"f")?.call(this)}},h9=async function(Z,$){let J=Q(this,t,"f"),z=Date.now(),Y,K=0;while(!0){K++,J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[Z]},Q(this,u,"m",n$).call(this)),Q(this,KZ,"f").add($),!0}catch(N){if(Y=N,nZ(N))break;let W=Q(this,o$,"f")-(Date.now()-z);if(W<=0)break;let q=Math.min(h$(b$(K-1,F5,D5)),W);Q(this,i,"f").warn("tool result send failed; retrying",{tool_use_id:$,attempt:K,backoff_ms:q,error:String(N)}),await MZ(q,J.signal)}}return Q(this,i,"f").error("failed to send tool result",{tool_use_id:$,attempts:K,error:String(Y)}),!1},_9=async function(){if(Q(this,PZ,"f")===0)return;if(await Promise.race([new Promise((Z)=>M(this,W8,Z,"f")),MZ(S5)]),M(this,W8,null,"f"),Q(this,PZ,"f")>0)Q(this,i,"f").warn("drain timeout exceeded")}});function b5(X){return X.resources.some((Z)=>Z.type==="memory_store")}function h5(X){if(!X)return null;let Z;try{let J=X.replace(/-/g,"+").replace(/_/g,"/"),z=J.padEnd(Math.ceil(J.length/4)*4,"=");Z=JSON.parse(v0(y6(z)))}catch{return null}if(Z===null||typeof Z!=="object"||Array.isArray(Z))return null;let $=Z.sessions_token;return typeof $==="string"&&$!==""?$:null}async function c9(X,Z){let $;try{return await Promise.race([X.then(()=>!1,()=>!1),new Promise((J)=>{$=setTimeout(()=>J(!0),Z)})])}finally{if($!==void 0)clearTimeout($)}}async function g5(X,Z,$,J){try{await X.beta.environments.work.stop(Z.id,{environment_id:Z.environment_id,force:!0},{...J,headers:V([J?.headers])})}catch(z){if(!bZ(z,409))$.error("force-stop on exit failed",{work_id:Z.id,error:String(z)})}}function _5(X){let Z=X instanceof v?X.error:void 0;for(let $ of["error","details","current_state"]){if(!hX(Z))return{};Z=Z[$]}return hX(Z)?Z:{}}async function m5(X,Z,$,J,z,Y){let K=u9,N=y5,W=Date.now(),q=k5,H=async()=>{let G=new AbortController,C=kZ($.signal,G),O=setTimeout(()=>G.abort(),K);try{let T=await X.beta.environments.work.heartbeat(Z.id,{environment_id:Z.environment_id,expected_last_heartbeat:q},{...z,headers:V([z?.headers]),signal:G.signal});if(W=Date.now(),q=T.last_heartbeat,T.ttl_seconds>0)N=T.ttl_seconds*1000,K=Math.max(1000,Math.min(N/2,u9)),Y?.(N);if(T.state==="stopping"||T.state==="stopped")J.info("heartbeat signals shutdown",{work_id:Z.id,state:T.state}),$.finish("control_plane_stop");if(!T.lease_extended)J.warn("lease not extended, shutting down",{work_id:Z.id}),$.finish("control_plane_stop")}catch(T){if($.signal.throwIfAborted(),bZ(T,412)){let P=_5(T);J.error("lease lost: heartbeat precondition failed",{work_id:Z.id,server_state:P.state,server_ttl_seconds:P.ttl_seconds,server_last_heartbeat:P.last_heartbeat}),$.finish("lease_lost");return}if(nZ(T))throw J.error("permanent heartbeat failure",{work_id:Z.id,error:String(T)}),$.finish("heartbeat_rejected"),T;if(Date.now()-W>N){J.error("lease assumed lost: no successful heartbeat in ttl",{work_id:Z.id,ttl_ms:N,error:String(T)}),$.finish("assumed_lost");return}J.warn("transient heartbeat failure",{work_id:Z.id,error:String(T)})}finally{clearTimeout(O),C()}};await H();while(!$.signal.aborted)await MZ(K,$.signal),$.signal.throwIfAborted(),await H()}var s$,q8,I1,G8,O0,u9=30000,y5=90000,k5="NO_HEARTBEAT",f1,v5;var d9=x(()=>{JZ();m();wZ();aX();O$();J0();eZ();g$();k$();e();w();P1();F1();S1();o4();f1=(()=>{class X{constructor(Z){if(s$.add(this),q8.set(this,void 0),Z.unrestrictedPaths!==void 0)throw new L("The `unrestrictedPaths` option you passed to EnvironmentWorker (or client.beta.environments.work.worker()) is no longer supported. The worker's file tools (read, write, edit, glob, grep) are now always confined to `workdir` plus the session's memory folders. Remove `unrestrictedPaths` from your options; to let the file tools reach any other directory, add it to `AgentToolContext.allowedRoots` from a `tools` factory.");if(this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.tools=Z.tools,this.workdir=Z.workdir??process.cwd(),this.maxFileBytes=Z.maxFileBytes,this.maxIdleMs=Z.maxIdleMs,Z.memorySyncIntervalMs!=null)t4(Z.memorySyncIntervalMs,"memorySyncIntervalMs");this.memorySyncIntervalMs=Z.memorySyncIntervalMs,this.memorySyncDeletions=Z.memorySyncDeletions??"enabled",this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,M(this,q8,Z.signal,"f")}async run(Z){let{environmentId:$,environmentKey:J}=this;if($===void 0||J===void 0)throw new L("EnvironmentWorker.run: environmentId and environmentKey are required to poll for work");let z=Z??Q(this,q8,"f"),Y=new K8({client:this.client,environmentId:$,environmentKey:J,...this.workerId!==void 0?{workerId:this.workerId}:{},...z?{signal:z}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},autoStop:!1});for await(let K of Y)try{await Q(this,s$,"m",I1).call(this,K,J,Y.signal)}catch(N){if(Y.signal?.aborted)throw N;h(this.client).error("work item failed",{work_id:K.id,error:String(N)})}}async handleItem(Z){let $=Z?.workId??y("ANTHROPIC_WORK_ID"),J=Z?.environmentId??y("ANTHROPIC_ENVIRONMENT_ID"),z=Z?.sessionId??y("ANTHROPIC_SESSION_ID"),Y=(Z?.environmentKey??this.environmentKey??y("ANTHROPIC_ENVIRONMENT_KEY"))||void 0,K=Z?.workSecret||y("ANTHROPIC_WORK_SECRET")||null;if(!$)throw new L("handleItem: workId is required — pass it or set ANTHROPIC_WORK_ID");if(!J)throw new L("handleItem: environmentId is required — pass it or set ANTHROPIC_ENVIRONMENT_ID");if(!z)throw new L("handleItem: sessionId is required — pass it or set ANTHROPIC_SESSION_ID");if(!Y&&!K)throw new L("handleItem: environmentKey is required when there is no work secret — pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY");let N={id:$,environment_id:J,secret:K,data:{type:"session",id:z}};await Q(this,s$,"m",I1).call(this,N,Y,Z?.signal??Q(this,q8,"f"))}}return q8=new WeakMap,s$=new WeakSet,I1=async function($,J,z){let Y=h(this.client),K=h5($.secret),N=K??J;if(N===void 0)throw new L("handleItem: the work item carried a secret payload but no sessions token could be extracted, and there is no environment key to fall back to; the poller must issue a secret whose payload carries `sessions_token`, or provide the environment key (pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY)");if($.secret&&K===null)Y.warn("work item carried a secret payload but no sessions token could be extracted; falling back to the environment key",{work_id:$.id});let W=v$(this.client,{authToken:N,helper:"environments-worker"}),q=$.data.id,H=new AbortController,G=kZ(z,H),C=new v5(H),O=await import("./node-1.1.35-zzk2fc7x.mjs"),T,P,F=m5(W,$,C,Y,this.requestOptions,(j)=>{T=j,P?._setSendRetryWindow(j)}).catch((j)=>{if(!H.signal.aborted)Y.error("heartbeat loop failed",{work_id:$.id,error:String(j)});H.abort()}),D=async()=>{},A,k=!1;try{if($.data.type!=="session"){Y.debug("skipping non-session work item",{work_id:$.id,type:$.data.type});return}let j=await W.beta.sessions.retrieve(q);if(K===null&&this.memorySyncIntervalMs!==null&&b5(j))throw new O.SessionMemoryError(`cannot mount the session's memories: the work item carried no sessions token (work_id=${$.id}, session_id=${q}); the memory endpoints reject the environment key, so the poller must issue a per-item \`secret\` carrying \`sessions_token\`, or set \`memorySyncIntervalMs: null\` to run without memory`);let I={workdir:this.workdir,client:W,session:j,...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}};try{D=await O.setupSkills(I)}catch(b){Y.warn("skill setup failed",{session_id:q,work_id:$.id,error:String(b)})}if(K!==null&&this.memorySyncIntervalMs!==null)A=new O.SessionMemoryStores(W,{workdir:this.workdir,...this.memorySyncIntervalMs!==void 0?{syncIntervalMs:this.memorySyncIntervalMs}:{},syncDeletions:this.memorySyncDeletions}),await A.download(j),I.allowedRoots=A.roots,I.readOnlyRoots=A.readOnlyRoots;else Y.debug("memory stores disabled for this item",{work_id:$.id});let r=typeof this.tools==="function"?this.tools(I):this.tools??O.betaAgentToolset20260401(I);if(P=new U8(q,{client:W,tools:r,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:H.signal}),T!==void 0)P._setSendRetryWindow(T);for await(let b of P)if(A)await A.syncIfDue();k=!H.signal.aborted}finally{try{await D().catch((j)=>{Y.warn("skill cleanup failed",{session_id:q,work_id:$.id,error:String(j)})})}finally{if(A){let j=O.MEMORY_FLUSH_TIMEOUT_MS;if(k){if(await c9(A.finish(),j))Y.warn(`final memory sync cut off after ${j}ms; the flush that follows still uploads changed files`,{session_id:q,work_id:$.id})}let I=new AbortController;if(await c9(A.flushWrites(I.signal),j))I.abort(),Y.warn(`memory flush cut off after ${j}ms; changed files it had not uploaded yet are not saved`,{session_id:q,work_id:$.id});await A.dispose().catch((b)=>{Y.warn("memory store cleanup failed",{session_id:q,work_id:$.id,error:String(b)})})}}if(C.finish("runner_done"),G(),await F,C.lost)Y.info("lease lost; released without stopping it",{session_id:q,work_id:$.id});else await g5(W,$,Y,this.requestOptions)}},X})();v5=(()=>{class X{constructor(Z){G8.set(this,void 0),O0.set(this,void 0),M(this,G8,Z,"f")}get signal(){return Q(this,G8,"f").signal}finish(Z){M(this,O0,Q(this,O0,"f")??Z,"f"),Q(this,G8,"f").abort()}get lost(){return Q(this,O0,"f")==="lease_lost"||Q(this,O0,"f")==="assumed_lost"}}return G8=new WeakMap,O0=new WeakMap,X})()});var e$;var y1=x(()=>{S();R();w();f();F1();d9();e$=(()=>{class X extends B{retrieve(Z,$,J){let{environment_id:z,betas:Y,workspace_id:K}=$;return this._client.get(U`/v1/environments/${z}/work/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString(),...K!=null?{"anthropic-workspace-id":K}:void 0},J?.headers])})}update(Z,$,J){let{environment_id:z,betas:Y,workspace_id:K,...N}=$;return this._client.post(U`/v1/environments/${z}/work/${Z}?beta=true`,{body:N,...J,headers:V([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString(),...K!=null?{"anthropic-workspace-id":K}:void 0},J?.headers])})}list(Z,$={},J){let{betas:z,...Y}=$??{};return this._client.getAPIList(U`/v1/environments/${Z}/work?beta=true`,E,{query:Y,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},J?.headers])})}ack(Z,$,J){let{environment_id:z,betas:Y}=$;return this._client.post(U`/v1/environments/${z}/work/${Z}/ack?beta=true`,{...J,headers:V([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString()},J?.headers])})}heartbeat(Z,$,J){let{environment_id:z,desired_ttl_seconds:Y,expected_last_heartbeat:K,betas:N}=$;return this._client.post(U`/v1/environments/${z}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:Y,expected_last_heartbeat:K},...J,headers:V([{"anthropic-beta":[...N??[],"managed-agents-2026-04-01"].toString()},J?.headers])})}poll(Z,$={},J){let{betas:z,"Anthropic-Worker-ID":Y,...K}=$??{};return this._client.get(U`/v1/environments/${Z}/work/poll?beta=true`,{query:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"Anthropic-Worker-ID":Y}:void 0},J?.headers])})}stats(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.get(U`/v1/environments/${Z}/work/stats?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}stop(Z,$,J){let{environment_id:z,betas:Y,workspace_id:K,...N}=$;return this._client.post(U`/v1/environments/${z}/work/${Z}/stop?beta=true`,{body:N,...J,headers:V([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString(),...K!=null?{"anthropic-workspace-id":K}:void 0},J?.headers])})}poller(Z){return new K8({...Z,client:this._client})}worker(Z){return new f1({...Z,client:this._client})}}return X.WorkPoller=K8,X.EnvironmentWorker=f1,X})()});var ZX;var k1=x(()=>{S();y1();y1();R();w();f();ZX=(()=>{class X extends B{constructor(){super(...arguments);this.work=new e$(this._client)}create(Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/environments?beta=true",{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.get(U`/v1/environments/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}update(Z,$,J){let{betas:z,workspace_id:Y,...K}=$;return this._client.post(U`/v1/environments/${Z}?beta=true`,{body:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}list(Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList("/v1/environments?beta=true",E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.delete(U`/v1/environments/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}archive(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.post(U`/v1/environments/${Z}/archive?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}}return X.Work=e$,X})()});var O8;var b1=x(()=>{S();R();w();f();O8=class O8 extends B{create(X,Z,$){let{view:J,betas:z,workspace_id:Y,...K}=Z;return this._client.post(U`/v1/memory_stores/${X}/memories?beta=true`,{query:{view:J},body:K,...$,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}retrieve(X,Z,$){let{memory_store_id:J,betas:z,workspace_id:Y,...K}=Z;return this._client.get(U`/v1/memory_stores/${J}/memories/${X}?beta=true`,{query:K,...$,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}update(X,Z,$){let{memory_store_id:J,view:z,betas:Y,workspace_id:K,...N}=Z;return this._client.post(U`/v1/memory_stores/${J}/memories/${X}?beta=true`,{query:{view:z},body:N,...$,headers:V([{"anthropic-beta":[...Y??[],"agent-memory-2026-07-22"].toString(),...K!=null?{"anthropic-workspace-id":K}:void 0},$?.headers])})}list(X,Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList(U`/v1/memory_stores/${X}/memories?beta=true`,E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(X,Z,$){let{memory_store_id:J,expected_content_sha256:z,betas:Y,workspace_id:K}=Z;return this._client.delete(U`/v1/memory_stores/${J}/memories/${X}?beta=true`,{query:{expected_content_sha256:z},...$,headers:V([{"anthropic-beta":[...Y??[],"agent-memory-2026-07-22"].toString(),...K!=null?{"anthropic-workspace-id":K}:void 0},$?.headers])})}}});var C8;var h1=x(()=>{S();R();w();f();C8=class C8 extends B{retrieve(X,Z,$){let{memory_store_id:J,betas:z,workspace_id:Y,...K}=Z;return this._client.get(U`/v1/memory_stores/${J}/memory_versions/${X}?beta=true`,{query:K,...$,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}list(X,Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList(U`/v1/memory_stores/${X}/memory_versions?beta=true`,E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}redact(X,Z,$){let{memory_store_id:J,betas:z,workspace_id:Y}=Z;return this._client.post(U`/v1/memory_stores/${J}/memory_versions/${X}/redact?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}}});var $X;var g1=x(()=>{S();b1();b1();h1();h1();R();w();f();$X=(()=>{class X extends B{constructor(){super(...arguments);this.memories=new O8(this._client),this.memoryVersions=new C8(this._client)}create(Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/memory_stores?beta=true",{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.get(U`/v1/memory_stores/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}update(Z,$,J){let{betas:z,workspace_id:Y,...K}=$;return this._client.post(U`/v1/memory_stores/${Z}?beta=true`,{body:K,...J,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}list(Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList("/v1/memory_stores?beta=true",E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.delete(U`/v1/memory_stores/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}archive(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.post(U`/v1/memory_stores/${Z}/archive?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}}return X.Memories=O8,X.MemoryVersions=C8,X})()});var C0=x(()=>{m()});var XX;var v1=x(()=>{m();Z0();X1();XX=(()=>{class X{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new u0;for await(let $ of this.iterator)for(let J of Z.decode($))yield JSON.parse(J);for(let $ of Z.flush())yield JSON.parse($)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new L("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new L("Attempted to iterate over a response with no body")}return new X(b0(Z.body),$)}}return X})()});var M8;var _1=x(()=>{S();R();w();v1();C0();f();M8=class M8 extends B{create(X,Z){let{betas:$,user_profile_id:J,workspace_id:z,...Y}=X;return this._client.post("/v1/messages/batches?beta=true",{body:Y,...Z,headers:V([{"anthropic-beta":[...$??[],"message-batches-2024-09-24"].toString(),...J!=null?{"anthropic-user-profile-id":J}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},Z?.headers])})}retrieve(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/messages/batches/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/messages/batches?beta=true",a,{query:z,...Z,headers:V([{"anthropic-beta":[...$??[],"message-batches-2024-09-24"].toString(),...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}delete(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.delete(U`/v1/messages/batches/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}cancel(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.post(U`/v1/messages/batches/${X}/cancel?beta=true`,{...$,headers:V([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}async results(X,Z={},$){let J=await this.retrieve(X,Z,$);if(!J.results_url)throw new L(`No batch \`results_url\`; Has it finished processing? ${J.processing_status} - ${J.id}`);let{betas:z,workspace_id:Y}=Z??{};return this._client.get(J.results_url,{...$,headers:V([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary",...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((K,N)=>XX.fromResponse(N.response,N.controller))}}});var JX;var m1=x(()=>{JX={"claude-opus-4@20250514":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function l9(X){return X?.output_format??X?.output_config?.format}function u1(X,Z,$){let J=l9(Z);if(!Z||!("parse"in(J??{})))return{...X,content:X.content.map((z)=>{if(z.type==="text"){let Y=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(Y,"parsed",{get(){return $.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return z}),parsed_output:null};return c1(X,Z,$)}function c1(X,Z,$){let J=null,z=X.content.map((Y)=>{if(Y.type==="text"){let K=n5(Z,Y.text);if(J===null)J=K;let N=Object.defineProperty({...Y},"parsed_output",{value:K,enumerable:!1});return Object.defineProperty(N,"parsed",{get(){return $.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),K},enumerable:!1})}return Y});return{...X,content:z,parsed_output:J}}function n5(X,Z){let $=l9(X);if($?.type!=="json_schema")return null;try{if("parse"in $)return $.parse(Z);return JSON.parse(Z)}catch(J){throw new L(`Failed to parse structured output: ${J}`)}}var d1=x(()=>{m()});var l1=x(()=>{T$()});var a5=(X)=>{let Z=0,$=[];while(Z<X.length){let J=X[Z];if(J==="\\"){Z++;continue}if(J==="{"){$.push({type:"brace",value:"{"}),Z++;continue}if(J==="}"){$.push({type:"brace",value:"}"}),Z++;continue}if(J==="["){$.push({type:"paren",value:"["}),Z++;continue}if(J==="]"){$.push({type:"paren",value:"]"}),Z++;continue}if(J===":"){$.push({type:"separator",value:":"}),Z++;continue}if(J===","){$.push({type:"delimiter",value:","}),Z++;continue}if(J==='"'){let N="",W=!1;J=X[++Z];while(J!=='"'){if(Z===X.length){W=!0;break}if(J==="\\"){if(Z++,Z===X.length){W=!0;break}N+=J+X[Z],J=X[++Z]}else N+=J,J=X[++Z]}if(J=X[++Z],!W)$.push({type:"string",value:N});continue}if(J&&/\s/.test(J)){Z++;continue}let Y=/[0-9]/;if(J&&Y.test(J)||J==="-"||J==="."){let N="";if(J==="-")N+=J,J=X[++Z];while(J&&(Y.test(J)||J==="."||J==="e"||J==="E"||(J==="-"||J==="+")&&(N[N.length-1]==="e"||N[N.length-1]==="E")))N+=J,J=X[++Z];$.push({type:"number",value:N});continue}let K=/[a-z]/i;if(J&&K.test(J)){let N="";while(J&&K.test(J)){if(Z===X.length)break;N+=J,J=X[++Z]}if(N=="true"||N=="false"||N==="null")$.push({type:"name",value:N});else{Z++;continue}continue}Z++}return $},M0=(X)=>{if(X.length===0)return X;let Z=X[X.length-1];switch(Z.type){case"separator":return X=X.slice(0,X.length-1),M0(X);break;case"number":let $=Z.value[Z.value.length-1];if($==="."||$==="-"||$==="+"||$==="e"||$==="E")return X=X.slice(0,X.length-1),M0(X);case"string":let J=X[X.length-2];if(J?.type==="delimiter")return X=X.slice(0,X.length-1),M0(X);else if(J?.type==="brace"&&J.value==="{")return X=X.slice(0,X.length-1),M0(X);break;case"delimiter":return X=X.slice(0,X.length-1),M0(X);break}return X},r5=(X)=>{let Z=[];if(X.map(($)=>{if($.type==="brace")if($.value==="{")Z.push("}");else Z.splice(Z.lastIndexOf("}"),1);if($.type==="paren")if($.value==="[")Z.push("]");else Z.splice(Z.lastIndexOf("]"),1)}),Z.length>0)Z.reverse().map(($)=>{if($==="}")X.push({type:"brace",value:"}"});else if($==="]")X.push({type:"paren",value:"]"})});return X},t5=(X)=>{let Z="";return X.map(($)=>{switch($.type){case"string":Z+='"'+$.value+'"';break;default:Z+=$.value;break}}),Z},p9=(X)=>JSON.parse(t5(r5(M0(a5(X)))));var i9=()=>{};function zX(X,Z){let $={};for(let Y of Object.keys(X))if(Y!=="input")$[Y]=X[Y];Object.defineProperty($,vZ,{value:Z,enumerable:!1,writable:!0});let J,z=!1;return Object.defineProperty($,"input",{enumerable:!0,configurable:!0,get(){if(!z)J=Z?p9(Z):{},z=!0;return J}}),$}var vZ="__json_buf";var p1=x(()=>{i9()});function o1(X){return X.type==="tool_use"||X.type==="server_tool_use"||X.type==="mcp_tool_use"}var $Z,_Z,x0,x8,YX,B8,H8,QX,T8,SZ,L8,KX,VX,rZ,NX,WX,UX,A8,i1,n9,E8,n1,a1,r1,a9,t1,r9;var t9=x(()=>{JZ();jZ();C0();lZ();e();l1();d1();p1();r9=(()=>{class X{constructor(Z,$){$Z.add(this),this.messages=[],this.receivedMessages=[],_Z.set(this,void 0),x0.set(this,null),this.controller=new AbortController,x8.set(this,void 0),YX.set(this,()=>{}),B8.set(this,()=>{}),H8.set(this,void 0),QX.set(this,()=>{}),T8.set(this,()=>{}),SZ.set(this,{}),L8.set(this,!1),KX.set(this,!1),VX.set(this,!1),rZ.set(this,!1),NX.set(this,void 0),WX.set(this,void 0),UX.set(this,void 0),A8.set(this,void 0),E8.set(this,(J)=>{if(M(this,KX,!0,"f"),CZ(J))J=new o;if(J instanceof o)return M(this,VX,!0,"f"),this._emit("abort",J);if(J instanceof L)return this._emit("error",J);if(J instanceof Error){let z=new L(J.message);return z.cause=J,this._emit("error",z)}return this._emit("error",new L(String(J)))}),M(this,x8,new Promise((J,z)=>{M(this,YX,J,"f"),M(this,B8,z,"f")}),"f"),M(this,H8,new Promise((J,z)=>{M(this,QX,J,"f"),M(this,T8,z,"f")}),"f"),Q(this,x8,"f").catch(()=>{}),Q(this,H8,"f").catch(()=>{}),M(this,x0,Z,"f"),M(this,A8,$?.logger??console,"f")}get response(){return Q(this,NX,"f")}get request_id(){return Q(this,WX,"f")}get workspace_id(){return Q(this,UX,"f")}async withResponse(){M(this,rZ,!0,"f");let Z=await Q(this,x8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id"),workspace_id:Z.headers.get("anthropic-workspace-id")}}static fromReadableStream(Z){let $=new X(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,J,{logger:z}={}){let Y=new X($,{logger:z});for(let K of $.messages)Y._addMessageParam(K);return M(Y,x0,{...$,stream:!0},"f"),Y._run(()=>Y._createMessage(Z,{...$,stream:!0},{...J,headers:{...J?.headers,[w$]:"stream"}})),Y}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Q(this,E8,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,J){let z=J?.signal,Y;if(z){if(z.aborted)this.controller.abort();Y=this.controller.abort.bind(this.controller),z.addEventListener("abort",Y)}try{Q(this,$Z,"m",n1).call(this);let{response:K,data:N}=await Z.create({...$,stream:!0},{...J,signal:this.controller.signal}).withResponse();this._connected(K);for await(let W of N)Q(this,$Z,"m",a1).call(this,W);if(N.controller.signal?.aborted)throw new o;Q(this,$Z,"m",r1).call(this)}finally{if(z&&Y)z.removeEventListener("abort",Y)}}_connected(Z){if(this.ended)return;M(this,NX,Z,"f"),M(this,WX,Z?.headers.get("request-id"),"f"),M(this,UX,Z?.headers.get("anthropic-workspace-id"),"f"),Q(this,YX,"f").call(this,Z),this._emit("connect")}get ended(){return Q(this,L8,"f")}get errored(){return Q(this,KX,"f")}get aborted(){return Q(this,VX,"f")}abort(){this.controller.abort()}on(Z,$){return(Q(this,SZ,"f")[Z]||(Q(this,SZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let J=Q(this,SZ,"f")[Z];if(!J)return this;let z=J.findIndex((Y)=>Y.listener===$);if(z>=0)J.splice(z,1);return this}once(Z,$){return(Q(this,SZ,"f")[Z]||(Q(this,SZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,J)=>{if(M(this,rZ,!0,"f"),Z!=="error")this.once("error",J);this.once(Z,$)})}async done(){M(this,rZ,!0,"f"),await Q(this,H8,"f")}get currentMessage(){return Q(this,_Z,"f")}async finalMessage(){return await this.done(),Q(this,$Z,"m",i1).call(this)}async finalText(){return await this.done(),Q(this,$Z,"m",n9).call(this)}_emit(Z,...$){if(Q(this,L8,"f"))return;if(Z==="end")M(this,L8,!0,"f"),Q(this,QX,"f").call(this);let J=Q(this,SZ,"f")[Z];if(J)Q(this,SZ,"f")[Z]=J.filter((z)=>!z.once),J.forEach(({listener:z})=>z(...$));if(Z==="abort"){let z=$[0];if(!Q(this,rZ,"f")&&!J?.length)Promise.reject(z);Q(this,B8,"f").call(this,z),Q(this,T8,"f").call(this,z),this._emit("end");return}if(Z==="error"){let z=$[0];if(!Q(this,rZ,"f")&&!J?.length)Promise.reject(z);Q(this,B8,"f").call(this,z),Q(this,T8,"f").call(this,z),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Q(this,$Z,"m",i1).call(this))}async _fromReadableStream(Z,$){let J=$?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Q(this,$Z,"m",n1).call(this),this._connected(null);let Y=EZ.fromReadableStream(Z,this.controller);for await(let K of Y)Q(this,$Z,"m",a1).call(this,K);if(Y.controller.signal?.aborted)throw new o;Q(this,$Z,"m",r1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}[(_Z=new WeakMap,x0=new WeakMap,x8=new WeakMap,YX=new WeakMap,B8=new WeakMap,H8=new WeakMap,QX=new WeakMap,T8=new WeakMap,SZ=new WeakMap,L8=new WeakMap,KX=new WeakMap,VX=new WeakMap,rZ=new WeakMap,NX=new WeakMap,WX=new WeakMap,UX=new WeakMap,A8=new WeakMap,E8=new WeakMap,$Z=new WeakSet,i1=function(){if(this.receivedMessages.length===0)throw new L("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},n9=function(){if(this.receivedMessages.length===0)throw new L("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((J)=>J.type==="text").map((J)=>J.text);if($.length===0)throw new L("stream ended without producing a content block with type=text");return $.join(" ")},n1=function(){if(this.ended)return;M(this,_Z,void 0,"f")},a1=function($){if(this.ended)return;let J=Q(this,$Z,"m",a9).call(this,$);switch(this._emit("streamEvent",$,J),$.type){case"content_block_delta":{let z=J.content.at(-1);switch($.delta.type){case"text_delta":{if(z.type==="text")this._emit("text",$.delta.text,z.text||"");break}case"citations_delta":{if(z.type==="text")this._emit("citation",$.delta.citation,z.citations??[]);break}case"input_json_delta":{if(o1(z)&&Q(this,SZ,"f").inputJson?.length){let Y;try{Y=z.input}catch(K){Q(this,E8,"f").call(this,Q(this,$Z,"m",t1).call(this,z,K));break}this._emit("inputJson",$.delta.partial_json,Y)}break}case"thinking_delta":{if(z.type==="thinking")this._emit("thinking",$.delta.thinking,z.thinking);break}case"signature_delta":{if(z.type==="thinking")this._emit("signature",z.signature);break}case"compaction_delta":{if(z.type==="compaction"&&z.content)this._emit("compaction",z.content);break}default:fZ($.delta)}break}case"message_stop":{this._addMessageParam(J),this._addMessage(u1(J,Q(this,x0,"f"),{logger:Q(this,A8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",J.content.at(-1));break}case"message_start":{M(this,_Z,J,"f");break}case"content_block_start":case"message_delta":break}},r1=function(){if(this.ended)throw new L("stream has ended, this shouldn't happen");let $=Q(this,_Z,"f");if(!$)throw new L("request ended without sending any chunks");return M(this,_Z,void 0,"f"),u1($,Q(this,x0,"f"),{logger:Q(this,A8,"f")})},a9=function($){let J=Q(this,_Z,"f");if($.type==="message_start"){if(J)throw new L(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!J)throw new L(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return J;case"message_delta":if(J.stop_reason=$.delta.stop_reason,J.stop_sequence=$.delta.stop_sequence,J.stop_details=$.delta.stop_details,J.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)J.container=$.delta.container;if($.context_management!=null)J.context_management=$.context_management;if($.input_transformations!=null)J.input_transformations=$.input_transformations;if($.usage.input_tokens!=null)J.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)J.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)J.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)J.usage.server_tool_use=$.usage.server_tool_use;if($.usage.iterations!=null)J.usage.iterations=$.usage.iterations;if($.usage.fallback_credit!=null)J.usage.fallback_credit=$.usage.fallback_credit;if($.usage.output_tokens_details!=null)J.usage.output_tokens_details=$.usage.output_tokens_details;return J;case"content_block_start":if(J.content.push($.content_block),$.content_block.type==="fallback")J.model=$.content_block.to.model;return J;case"content_block_delta":{let z=J.content.at($.index);switch($.delta.type){case"text_delta":{if(z?.type==="text")J.content[$.index]={...z,text:(z.text||"")+$.delta.text};break}case"citations_delta":{if(z?.type==="text")J.content[$.index]={...z,citations:[...z.citations??[],$.delta.citation]};break}case"input_json_delta":{if(z&&o1(z)){let Y=(z[vZ]||"")+$.delta.partial_json;J.content[$.index]=zX(z,Y)}break}case"thinking_delta":{if(z?.type==="thinking")J.content[$.index]={...z,thinking:z.thinking+$.delta.thinking};break}case"signature_delta":{if(z?.type==="thinking")J.content[$.index]={...z,signature:$.delta.signature};break}case"compaction_delta":{if(z?.type==="compaction")J.content[$.index]={...z,content:(z.content||"")+$.delta.content,encrypted_content:$.delta.encrypted_content};break}default:fZ($.delta)}return J}case"content_block_stop":{let z=J.content.at($.index);if(z&&o1(z)&&vZ in z){let Y;try{Y=z.input}catch(K){Y={},Q(this,E8,"f").call(this,Q(this,$Z,"m",t1).call(this,z,K))}Object.defineProperty(z,"input",{value:Y,enumerable:!0,configurable:!0,writable:!0})}return J}}},t1=function($,J){let z=$[vZ];return new L(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${J}. JSON: ${z}`)},Symbol.asyncIterator)](){let Z=[],$=[],J=!1;return this.on("streamEvent",(z)=>{let Y=$.shift();if(Y)Y.resolve(z);else Z.push(z)}),this.on("end",()=>{J=!0;for(let z of $)z.resolve(void 0);$.length=0}),this.on("abort",(z)=>{J=!0;for(let Y of $)Y.reject(z);$.length=0}),this.on("error",(z)=>{J=!0;for(let Y of $)Y.reject(z);$.length=0}),{next:async()=>{if(!Z.length){if(J)return{value:void 0,done:!0};return new Promise((Y,K)=>$.push({resolve:Y,reject:K})).then((Y)=>Y?{value:Y,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new EZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}return X})()});var o9=1e5,s9=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
|
|
10
|
-
1. Task Overview
|
|
11
|
-
The user's core request and success criteria
|
|
12
|
-
Any clarifications or constraints they specified
|
|
13
|
-
2. Current State
|
|
14
|
-
What has been completed so far
|
|
15
|
-
Files created, modified, or analyzed (with paths if relevant)
|
|
16
|
-
Key outputs or artifacts produced
|
|
17
|
-
3. Important Discoveries
|
|
18
|
-
Technical constraints or requirements uncovered
|
|
19
|
-
Decisions made and their rationale
|
|
20
|
-
Errors encountered and how they were resolved
|
|
21
|
-
What approaches were tried that didn't work (and why)
|
|
22
|
-
4. Next Steps
|
|
23
|
-
Specific actions needed to complete the task
|
|
24
|
-
Any blockers or open questions to resolve
|
|
25
|
-
Priority order if multiple steps remain
|
|
26
|
-
5. Context to Preserve
|
|
27
|
-
User preferences or style requirements
|
|
28
|
-
Domain-specific details that aren't obvious
|
|
29
|
-
Any promises made to the user
|
|
30
|
-
Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
|
|
31
|
-
Wrap your summary in <summary></summary> tags.`;var e9=()=>{};async function o5(X,Z=X.messages.at(-1),$){if(!Z||Z.role!=="assistant"||!Z.content||typeof Z.content==="string")return null;let J=Z.content.filter((K)=>K.type==="tool_use");if(J.length===0)return null;let z=e5(X);return{role:"user",content:await Promise.all(J.map(async(K)=>{let N=X.tools.find((W)=>("name"in W?W.name:("mcp_server_name"in W)?W.mcp_server_name:W.type)===K.name);if(!N||!("run"in N)||!z.has(K.name))return s5(K);try{let W=K.input;if("parse"in N&&N.parse)W=N.parse(W);let q=await N.run(W,{toolUse:K,toolUseBlock:K,signal:$?.signal});return{type:"tool_result",tool_use_id:K.id,content:q}}catch(W){return{type:"tool_result",tool_use_id:K.id,content:W instanceof sZ?W.content:`Error: ${W instanceof Error?W.message:String(W)}`,is_error:!0}}}))}}function s5(X){return{type:"tool_result",tool_use_id:X.id,content:`Error: Tool '${X.name}' not found`,is_error:!0}}function e5(X){let Z=new Set;for(let $ of X.tools)if("run"in $)Z.add($.name);for(let $ of X.messages){if($.role!=="system"||typeof $.content==="string")continue;for(let J of $.content)ZJ(J,Z)}return Z}function ZJ(X,Z){switch(X.type){case"tool_removal":case"tool_addition":$J(X,Z);break}}function $J(X,Z){let $=XJ(X.tool);if($===void 0)return;if(X.type==="tool_removal")Z.delete($);else Z.add($)}function XJ(X){switch(X.type){case"tool_reference":return X.name;default:return}}function JJ(X){if(X===null)return"stop";switch(X){case"tool_use":return"run_tools";case"pause_turn":case"compaction":return"resume";case"end_turn":case"stop_sequence":case"max_tokens":case"model_context_window_exceeded":case"refusal":return"stop";default:return fZ(X),"stop"}}var j8,B0,tZ,c,XZ,VZ,IZ,mZ,S8,Z7,s1,e1;var $7=x(()=>{JZ();$$();m();w();s4();e();e9();jZ();e1=(()=>{class X{constructor(Z,$,J){j8.add(this),this.client=Z,B0.set(this,!1),tZ.set(this,!1),c.set(this,void 0),XZ.set(this,void 0),VZ.set(this,void 0),IZ.set(this,void 0),mZ.set(this,void 0),S8.set(this,0),M(this,c,{params:{...$,messages:structuredClone($.messages)}},"f");let z=M1($.tools,$.messages);if(M(this,XZ,{...J,headers:V([t0("BetaToolRunner"),z.length?{[D$]:z.join(", ")}:void 0,J?.headers])},"f"),M(this,mZ,yX(),"f"),$.compactionControl?.enabled)console.warn('Anthropic: The `compactionControl` parameter is deprecated and will be removed in a future version. Use server-side compaction instead by passing `edits: [{ type: "compact_20260112" }]` in the params passed to `toolRunner()`. See https://platform.claude.com/docs/en/build-with-claude/compaction')}async*[(B0=new WeakMap,tZ=new WeakMap,c=new WeakMap,XZ=new WeakMap,VZ=new WeakMap,IZ=new WeakMap,mZ=new WeakMap,S8=new WeakMap,j8=new WeakSet,Z7=async function(){let $=Q(this,c,"f").params.compactionControl;if(!$||!$.enabled)return!1;let J=0;if(Q(this,VZ,"f")!==void 0)try{let q=await Q(this,VZ,"f");J=q.usage.input_tokens+(q.usage.cache_creation_input_tokens??0)+(q.usage.cache_read_input_tokens??0)+q.usage.output_tokens}catch{return!1}let z=$.contextTokenThreshold??o9;if(J<z)return!1;let Y=$.model??Q(this,c,"f").params.model,K=$.summaryPrompt??s9,N=Q(this,c,"f").params.messages;if(N[N.length-1].role==="assistant"){let q=N[N.length-1];if(Array.isArray(q.content)){let H=q.content.filter((G)=>G.type!=="tool_use");if(H.length===0)N.pop();else q.content=H}}let W=await this.client.beta.messages.create({model:Y,messages:[...N,{role:"user",content:[{type:"text",text:K}]}],max_tokens:Q(this,c,"f").params.max_tokens},{signal:Q(this,XZ,"f").signal,headers:V([Q(this,XZ,"f").headers,t0("compaction")])});if(W.content[0]?.type!=="text")throw new L("Expected text response for compaction");return Q(this,c,"f").params.messages=[{role:"user",content:W.content}],!0},Symbol.asyncIterator)](){var Z;if(Q(this,B0,"f"))throw new L("Cannot iterate over a consumed stream");M(this,B0,!0,"f"),M(this,tZ,!0,"f"),M(this,IZ,void 0,"f");try{while(!0){let $;try{if(Q(this,c,"f").params.max_iterations&&Q(this,S8,"f")>=Q(this,c,"f").params.max_iterations)break;M(this,tZ,!1,"f"),M(this,IZ,void 0,"f"),M(this,S8,(Z=Q(this,S8,"f"),Z++,Z),"f"),M(this,VZ,void 0,"f");let{max_iterations:J,compactionControl:z,...Y}=Q(this,c,"f").params;if(Y.stream)$=this.client.beta.messages.stream({...Y},Q(this,XZ,"f")),M(this,VZ,$.finalMessage(),"f"),Q(this,VZ,"f").catch(()=>{}),yield $;else M(this,VZ,this.client.beta.messages.create({...Y,stream:!1},Q(this,XZ,"f")),"f"),yield Q(this,VZ,"f");if(!await Q(this,j8,"m",Z7).call(this)){if(!Q(this,tZ,"f")){let W=await Q(this,VZ,"f"),q=JJ(W.stop_reason);Q(this,c,"f").params.messages.push({role:W.role,content:W.content});let{container:H}=Q(this,c,"f").params;if(W.container){if(H==null)Q(this,c,"f").params.container=W.container.id;else if(typeof H==="object"&&H.id==null)Q(this,c,"f").params.container={...H,id:W.container.id}}if(q==="stop")break;if(q==="resume")continue}let N=await Q(this,j8,"m",s1).call(this,Q(this,c,"f").params.messages.at(-1));if(N)Q(this,c,"f").params.messages.push(N);else if(!Q(this,tZ,"f"))break}}finally{if($)$.abort()}}if(!Q(this,VZ,"f"))throw new L("ToolRunner concluded without a message from the server");Q(this,mZ,"f").resolve(await Q(this,VZ,"f"))}catch($){throw M(this,B0,!1,"f"),Q(this,mZ,"f").promise.catch(()=>{}),Q(this,mZ,"f").reject($),M(this,mZ,yX(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")Q(this,c,"f").params=Z(Q(this,c,"f").params);else Q(this,c,"f").params=Z;M(this,tZ,!0,"f"),M(this,IZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")M(this,XZ,Z(Q(this,XZ,"f")),"f");else M(this,XZ,{...Q(this,XZ,"f"),...Z},"f")}async generateToolResponse(Z=Q(this,XZ,"f").signal){let $=await Q(this,VZ,"f")??this.params.messages.at(-1);if(!$)return null;return Q(this,j8,"m",s1).call(this,$,Z)}done(){return Q(this,mZ,"f").promise}async runUntilDone(){if(!Q(this,B0,"f"))for await(let Z of this);return this.done()}get params(){return Q(this,c,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}}return s1=async function($,J=Q(this,XZ,"f").signal){if(Q(this,IZ,"f")!==void 0)return Q(this,IZ,"f");return M(this,IZ,o5(Q(this,c,"f").params,$,{...Q(this,XZ,"f"),signal:J}),"f"),Q(this,IZ,"f")},X})()});function J7(X){if(!X.output_format)return X;if(X.output_config?.format)throw new L("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:Z,...$}=X;return{...$,output_config:{...X.output_config,format:Z}}}var X7,zJ,qX;var Z4=x(()=>{C0();_1();S();m1();w();jZ();d1();t9();$7();$$();_1();X7={},zJ=["claude-mythos-preview","claude-opus-4-6"],qX=(()=>{class X extends B{constructor(){super(...arguments);this.batches=new M8(this._client)}create(Z,$){let J=J7(Z),{betas:z,user_profile_id:Y,workspace_id:K,...N}=J;if(N.model in X7)console.warn(`The model '${N.model}' is deprecated and will reach end-of-life on ${X7[N.model]}
|
|
32
|
-
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(zJ.includes(N.model)&&N.thinking&&N.thinking.type==="enabled")console.warn(`Using Claude with ${N.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let W=$?.timeout??this._client._options.timeout;if(!N.stream&&W==null){let H=JX[N.model]??void 0;W=this._client.calculateNonstreamingTimeout(N.max_tokens,H)}let q=R$(N.tools,N.messages);return this._client.post("/v1/messages?beta=true",{body:N,timeout:W??600000,...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0,...Y!=null?{"anthropic-user-profile-id":Y}:void 0,...K!=null?{"anthropic-workspace-id":K}:void 0},q,$?.headers]),stream:J.stream??!1})}parse(Z,$){return $={...$,headers:V([{"anthropic-beta":[...Z.betas??[],"structured-outputs-2025-12-15"].toString()},$?.headers])},this.create(Z,$).then((J)=>c1(J,Z,{logger:this._client.logger??console}))}stream(Z,$){return r9.createMessage(this,Z,$)}countTokens(Z,$){let J=J7(Z),{betas:z,user_profile_id:Y,workspace_id:K,...N}=J;return this._client.post("/v1/messages/count_tokens?beta=true",{body:N,...$,headers:V([{"anthropic-beta":[...z??[],"token-counting-2024-11-01"].toString(),...Y!=null?{"anthropic-user-profile-id":Y}:void 0,...K!=null?{"anthropic-workspace-id":K}:void 0},$?.headers])})}toolRunner(Z,$){return new e1(this._client,Z,$)}}return X.Batches=M8,X.BetaToolRunner=e1,X.ToolError=sZ,X})()});var F8;var $4=x(()=>{S();R();f();F8=class F8 extends B{retrieve(X,Z){return this._client.get(U`/v1/organizations/api_keys/${X}?beta=true`,Z)}update(X,Z,$){return this._client.post(U`/v1/organizations/api_keys/${X}?beta=true`,{body:Z,...$})}list(X={},Z){return this._client.getAPIList("/v1/organizations/api_keys?beta=true",a,{query:X,...Z})}}});var D8;var X4=x(()=>{S();D8=class D8 extends B{retrieve(X){return this._client.get("/v1/organizations/compliance_settings?beta=true",X)}update(X,Z){return this._client.post("/v1/organizations/compliance_settings?beta=true",{body:X,...Z})}}});var w8;var J4=x(()=>{S();R();f();w8=class w8 extends B{create(X,Z){return this._client.post("/v1/organizations/external_keys?beta=true",{body:X,...Z})}retrieve(X,Z){return this._client.get(U`/v1/organizations/external_keys/${X}?beta=true`,Z)}update(X,Z,$){return this._client.post(U`/v1/organizations/external_keys/${X}?beta=true`,{body:Z,...$})}list(X={},Z){return this._client.getAPIList("/v1/organizations/external_keys?beta=true",E,{query:X,...Z})}delete(X,Z){return this._client.delete(U`/v1/organizations/external_keys/${X}?beta=true`,Z)}validate(X,Z){return this._client.post(U`/v1/organizations/external_keys/${X}/validate?beta=true`,Z)}}});var R8;var z4=x(()=>{S();R();f();R8=class R8 extends B{create(X,Z){return this._client.post("/v1/organizations/invites?beta=true",{body:X,...Z})}retrieve(X,Z){return this._client.get(U`/v1/organizations/invites/${X}?beta=true`,Z)}list(X={},Z){return this._client.getAPIList("/v1/organizations/invites?beta=true",a,{query:X,...Z})}delete(X,Z){return this._client.delete(U`/v1/organizations/invites/${X}?beta=true`,Z)}}});var P8;var Y4=x(()=>{S();R();P8=class P8 extends B{list(X={},Z){return this._client.getAPIList("/v1/organizations/rate_limits?beta=true",E,{query:X,...Z})}}});var I8;var Q4=x(()=>{S();R();f();I8=class I8 extends B{retrieve(X,Z){return this._client.get(U`/v1/organizations/users/${X}?beta=true`,Z)}update(X,Z,$){return this._client.post(U`/v1/organizations/users/${X}?beta=true`,{body:Z,...$})}list(X={},Z){return this._client.getAPIList("/v1/organizations/users?beta=true",a,{query:X,...Z})}remove(X,Z){return this._client.delete(U`/v1/organizations/users/${X}?beta=true`,Z)}}});var f8;var K4=x(()=>{S();R();w();f();f8=class f8 extends B{create(X,Z){let{betas:$,...J}=X;return this._client.post("/v1/organizations/federation_issuers?beta=true",{body:J,...Z,headers:V([{...$?.toString()!=null?{"anthropic-beta":$?.toString()}:void 0},Z?.headers])})}retrieve(X,Z={},$){let{betas:J}=Z??{};return this._client.get(U`/v1/organizations/federation_issuers/${X}?beta=true`,{...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}update(X,Z,$){let{betas:J,...z}=Z;return this._client.post(U`/v1/organizations/federation_issuers/${X}?beta=true`,{body:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}list(X={},Z){let{betas:$,...J}=X??{};return this._client.getAPIList("/v1/organizations/federation_issuers?beta=true",E,{query:J,...Z,headers:V([{...$?.toString()!=null?{"anthropic-beta":$?.toString()}:void 0},Z?.headers])})}archive(X,Z={},$){let{betas:J}=Z??{};return this._client.post(U`/v1/organizations/federation_issuers/${X}/archive?beta=true`,{...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}}});var y8;var V4=x(()=>{S();R();w();f();y8=class y8 extends B{list(X,Z={},$){let{betas:J,...z}=Z??{};return this._client.getAPIList(U`/v1/organizations/federation_rules/${X}/workspaces?beta=true`,E,{query:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}add(X,Z,$){let{betas:J,...z}=Z;return this._client.post(U`/v1/organizations/federation_rules/${X}/workspaces?beta=true`,{body:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}remove(X,Z,$){let{federation_rule_id:J,betas:z}=Z;return this._client.delete(U`/v1/organizations/federation_rules/${J}/workspaces/${X}?beta=true`,{...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},$?.headers])})}}});var GX;var N4=x(()=>{S();V4();V4();R();w();f();GX=(()=>{class X extends B{constructor(){super(...arguments);this.workspaces=new y8(this._client)}create(Z,$){let{betas:J,...z}=Z;return this._client.post("/v1/organizations/federation_rules?beta=true",{body:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z}=$??{};return this._client.get(U`/v1/organizations/federation_rules/${Z}?beta=true`,{...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},J?.headers])})}update(Z,$,J){let{betas:z,...Y}=$;return this._client.post(U`/v1/organizations/federation_rules/${Z}?beta=true`,{body:Y,...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},J?.headers])})}list(Z={},$){let{betas:J,...z}=Z??{};return this._client.getAPIList("/v1/organizations/federation_rules?beta=true",E,{query:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}archive(Z,$={},J){let{betas:z}=$??{};return this._client.post(U`/v1/organizations/federation_rules/${Z}/archive?beta=true`,{...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},J?.headers])})}}return X.Workspaces=y8,X})()});var OX;var W4=x(()=>{S();K4();K4();N4();N4();OX=(()=>{class X extends B{constructor(){super(...arguments);this.issuers=new f8(this._client),this.rules=new GX(this._client)}}return X.Issuers=f8,X.Rules=GX,X})()});var k8;var U4=x(()=>{S();R();w();f();k8=class k8 extends B{list(X,Z={},$){let{betas:J,...z}=Z??{};return this._client.getAPIList(U`/v1/organizations/service_accounts/${X}/workspaces?beta=true`,E,{query:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}add(X,Z,$){let{betas:J,...z}=Z;return this._client.post(U`/v1/organizations/service_accounts/${X}/workspaces?beta=true`,{body:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}remove(X,Z,$){let{service_account_id:J,betas:z}=Z;return this._client.delete(U`/v1/organizations/service_accounts/${J}/workspaces/${X}?beta=true`,{...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},$?.headers])})}}});var CX;var q4=x(()=>{S();U4();U4();R();w();f();CX=(()=>{class X extends B{constructor(){super(...arguments);this.workspaces=new k8(this._client)}create(Z,$){let{betas:J,...z}=Z;return this._client.post("/v1/organizations/service_accounts?beta=true",{body:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z}=$??{};return this._client.get(U`/v1/organizations/service_accounts/${Z}?beta=true`,{...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},J?.headers])})}update(Z,$,J){let{betas:z,...Y}=$;return this._client.post(U`/v1/organizations/service_accounts/${Z}?beta=true`,{body:Y,...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},J?.headers])})}list(Z={},$){let{betas:J,...z}=Z??{};return this._client.getAPIList("/v1/organizations/service_accounts?beta=true",E,{query:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}archive(Z,$={},J){let{betas:z}=$??{};return this._client.post(U`/v1/organizations/service_accounts/${Z}/archive?beta=true`,{...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},J?.headers])})}}return X.Workspaces=k8,X})()});var b8;var G4=x(()=>{S();R();f();b8=class b8 extends B{retrieve(X,Z,$){let{workspace_id:J}=Z;return this._client.get(U`/v1/organizations/workspaces/${J}/members/${X}?beta=true`,$)}update(X,Z,$){let{workspace_id:J,...z}=Z;return this._client.post(U`/v1/organizations/workspaces/${J}/members/${X}?beta=true`,{body:z,...$})}list(X,Z={},$){return this._client.getAPIList(U`/v1/organizations/workspaces/${X}/members?beta=true`,a,{query:Z,...$})}add(X,Z,$){return this._client.post(U`/v1/organizations/workspaces/${X}/members?beta=true`,{body:Z,...$})}remove(X,Z,$){let{workspace_id:J}=Z;return this._client.delete(U`/v1/organizations/workspaces/${J}/members/${X}?beta=true`,$)}}});var h8;var O4=x(()=>{S();R();f();h8=class h8 extends B{list(X,Z={},$){return this._client.getAPIList(U`/v1/organizations/workspaces/${X}/rate_limits?beta=true`,E,{query:Z,...$})}}});var g8;var C4=x(()=>{S();R();w();f();g8=class g8 extends B{retrieve(X,Z,$){let{workspace_id:J,betas:z}=Z;return this._client.get(U`/v1/organizations/workspaces/${J}/service_accounts/${X}?beta=true`,{...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},$?.headers])})}update(X,Z,$){let{workspace_id:J,betas:z,...Y}=Z;return this._client.post(U`/v1/organizations/workspaces/${J}/service_accounts/${X}?beta=true`,{body:Y,...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},$?.headers])})}list(X,Z={},$){let{betas:J,...z}=Z??{};return this._client.getAPIList(U`/v1/organizations/workspaces/${X}/service_accounts?beta=true`,E,{query:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}add(X,Z,$){let{betas:J,...z}=Z;return this._client.post(U`/v1/organizations/workspaces/${X}/service_accounts?beta=true`,{body:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}remove(X,Z,$){let{workspace_id:J,betas:z}=Z;return this._client.delete(U`/v1/organizations/workspaces/${J}/service_accounts/${X}?beta=true`,{...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},$?.headers])})}}});var MX;var M4=x(()=>{S();G4();G4();O4();O4();C4();C4();R();w();f();MX=(()=>{class X extends B{constructor(){super(...arguments);this.rateLimits=new h8(this._client),this.members=new b8(this._client),this.serviceAccounts=new g8(this._client)}create(Z,$){let{betas:J,...z}=Z;return this._client.post("/v1/organizations/workspaces?beta=true",{body:z,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},$?.headers])})}retrieve(Z,$){return this._client.get(U`/v1/organizations/workspaces/${Z}?beta=true`,$)}update(Z,$,J){return this._client.post(U`/v1/organizations/workspaces/${Z}?beta=true`,{body:$,...J})}list(Z={},$){return this._client.getAPIList("/v1/organizations/workspaces?beta=true",a,{query:Z,...$})}archive(Z,$){return this._client.post(U`/v1/organizations/workspaces/${Z}/archive?beta=true`,$)}}return X.RateLimits=h8,X.Members=b8,X.ServiceAccounts=g8,X})()});var xX;var x4=x(()=>{S();$4();$4();X4();X4();J4();J4();z4();z4();Y4();Y4();Q4();Q4();W4();W4();q4();q4();M4();M4();xX=(()=>{class X extends B{constructor(){super(...arguments);this.apiKeys=new F8(this._client),this.externalKeys=new w8(this._client),this.federation=new OX(this._client),this.invites=new R8(this._client),this.serviceAccounts=new CX(this._client),this.users=new I8(this._client),this.workspaces=new MX(this._client),this.rateLimits=new P8(this._client),this.complianceSettings=new D8(this._client)}retrieve(Z){return this._client.get("/v1/organizations/me?beta=true",Z)}}return X.APIKeys=F8,X.ExternalKeys=w8,X.Federation=OX,X.Invites=R8,X.ServiceAccounts=CX,X.Users=I8,X.Workspaces=MX,X.RateLimits=P8,X.ComplianceSettings=D8,X})()});var BX;var B4=x(()=>{S();R();w();f();P1();BX=(()=>{class X extends B{list(Z,$={},J){let{betas:z,workspace_id:Y,...K}=$??{};return this._client.getAPIList(U`/v1/sessions/${Z}/events?beta=true`,E,{query:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}send(Z,$,J){let{betas:z,workspace_id:Y,...K}=$;return this._client.post(U`/v1/sessions/${Z}/events?beta=true`,{body:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}stream(Z,$={},J){let{betas:z,workspace_id:Y,...K}=$??{};return this._client.get(U`/v1/sessions/${Z}/events/stream?beta=true`,{query:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers]),stream:!0})}toolRunner(Z,$){return new U8(Z,{...$,client:this._client})}}return X.SessionToolRunner=U8,X})()});var v8;var H4=x(()=>{S();R();w();f();v8=class v8 extends B{retrieve(X,Z,$){let{session_id:J,betas:z,workspace_id:Y}=Z;return this._client.get(U`/v1/sessions/${J}/resources/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}update(X,Z,$){let{session_id:J,betas:z,workspace_id:Y,...K}=Z;return this._client.post(U`/v1/sessions/${J}/resources/${X}?beta=true`,{body:K,...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}list(X,Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList(U`/v1/sessions/${X}/resources?beta=true`,E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(X,Z,$){let{session_id:J,betas:z,workspace_id:Y}=Z;return this._client.delete(U`/v1/sessions/${J}/resources/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}add(X,Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post(U`/v1/sessions/${X}/resources?beta=true`,{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}}});var _8;var T4=x(()=>{S();R();w();f();_8=class _8 extends B{list(X,Z,$){let{session_id:J,betas:z,workspace_id:Y,...K}=Z;return this._client.getAPIList(U`/v1/sessions/${J}/threads/${X}/events?beta=true`,E,{query:K,...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}stream(X,Z,$){let{session_id:J,betas:z,workspace_id:Y,...K}=Z;return this._client.get(U`/v1/sessions/${J}/threads/${X}/stream?beta=true`,{query:K,...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers]),stream:!0})}}});var HX;var L4=x(()=>{S();T4();T4();R();w();f();HX=(()=>{class X extends B{constructor(){super(...arguments);this.events=new _8(this._client)}retrieve(Z,$,J){let{session_id:z,betas:Y,workspace_id:K}=$;return this._client.get(U`/v1/sessions/${z}/threads/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString(),...K!=null?{"anthropic-workspace-id":K}:void 0},J?.headers])})}list(Z,$={},J){let{betas:z,workspace_id:Y,...K}=$??{};return this._client.getAPIList(U`/v1/sessions/${Z}/threads?beta=true`,E,{query:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}archive(Z,$,J){let{session_id:z,betas:Y,workspace_id:K}=$;return this._client.post(U`/v1/sessions/${z}/threads/${Z}/archive?beta=true`,{...J,headers:V([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString(),...K!=null?{"anthropic-workspace-id":K}:void 0},J?.headers])})}}return X.Events=_8,X})()});var TX;var A4=x(()=>{S();B4();B4();H4();H4();L4();L4();R();w();f();TX=(()=>{class X extends B{constructor(){super(...arguments);this.events=new BX(this._client),this.resources=new v8(this._client),this.threads=new HX(this._client)}create(Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/sessions?beta=true",{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.get(U`/v1/sessions/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}update(Z,$,J){let{betas:z,workspace_id:Y,...K}=$;return this._client.post(U`/v1/sessions/${Z}?beta=true`,{body:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}list(Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList("/v1/sessions?beta=true",K1,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.delete(U`/v1/sessions/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}archive(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.post(U`/v1/sessions/${Z}/archive?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}}return X.Events=BX,X.Resources=v8,X.Threads=HX,X})()});var m8;var E4=x(()=>{S();R();w();RZ();f();m8=class m8 extends B{create(X,Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post(U`/v1/skills/${X}/versions?beta=true`,UZ({body:Y,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])},this._client,!1))}retrieve(X,Z,$){let{skill_id:J,betas:z,workspace_id:Y}=Z;return this._client.get(U`/v1/skills/${J}/versions/${X}?beta=true`,{...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0,...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}list(X,Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList(U`/v1/skills/${X}/versions?beta=true`,E,{query:Y,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(X,Z,$){let{skill_id:J,betas:z,workspace_id:Y}=Z;return this._client.delete(U`/v1/skills/${J}/versions/${X}?beta=true`,{...$,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0,...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}download(X,Z,$){let{skill_id:J,betas:z,workspace_id:Y}=Z;return this._client.get(U`/v1/skills/${J}/versions/${X}/content?beta=true`,{...$,headers:V([{Accept:"application/binary",...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0,...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers]),__binaryResponse:!0})}}});var LX;var j4=x(()=>{S();E4();E4();R();w();RZ();f();LX=(()=>{class X extends B{constructor(){super(...arguments);this.versions=new m8(this._client)}create(Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/skills?beta=true",UZ({body:Y,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])},this._client,!1))}retrieve(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.get(U`/v1/skills/${Z}?beta=true`,{...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0,...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}list(Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList("/v1/skills?beta=true",E,{query:Y,...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.delete(U`/v1/skills/${Z}?beta=true`,{...J,headers:V([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0,...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}}return X.Versions=m8,X})()});var u8;var S4=x(()=>{S();R();w();f();u8=class u8 extends B{create(X,Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post(U`/v1/tunnels/${X}/certificates?beta=true`,{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(X,Z,$){let{tunnel_id:J,betas:z,workspace_id:Y}=Z;return this._client.get(U`/v1/tunnels/${J}/certificates/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}list(X,Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList(U`/v1/tunnels/${X}/certificates?beta=true`,E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}archive(X,Z,$){let{tunnel_id:J,betas:z,workspace_id:Y}=Z;return this._client.post(U`/v1/tunnels/${J}/certificates/${X}/archive?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}}});var AX;var F4=x(()=>{S();S4();S4();R();w();f();AX=(()=>{class X extends B{constructor(){super(...arguments);this.certificates=new u8(this._client)}create(Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/tunnels?beta=true",{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.get(U`/v1/tunnels/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}list(Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList("/v1/tunnels?beta=true",E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}archive(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.post(U`/v1/tunnels/${Z}/archive?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}revealToken(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.post(U`/v1/tunnels/${Z}/reveal_token?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}rotateToken(Z,$,J){let{betas:z,workspace_id:Y,...K}=$;return this._client.post(U`/v1/tunnels/${Z}/rotate_token?beta=true`,{body:K,...J,headers:V([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}}return X.Certificates=u8,X})()});var c8;var D4=x(()=>{S();R();w();f();c8=class c8 extends B{create(X,Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post(U`/v1/vaults/${X}/credentials?beta=true`,{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(X,Z,$){let{vault_id:J,betas:z,workspace_id:Y}=Z;return this._client.get(U`/v1/vaults/${J}/credentials/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}update(X,Z,$){let{vault_id:J,betas:z,workspace_id:Y,...K}=Z;return this._client.post(U`/v1/vaults/${J}/credentials/${X}?beta=true`,{body:K,...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}list(X,Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList(U`/v1/vaults/${X}/credentials?beta=true`,E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(X,Z,$){let{vault_id:J,betas:z,workspace_id:Y}=Z;return this._client.delete(U`/v1/vaults/${J}/credentials/${X}?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}archive(X,Z,$){let{vault_id:J,betas:z,workspace_id:Y}=Z;return this._client.post(U`/v1/vaults/${J}/credentials/${X}/archive?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}mcpOAuthValidate(X,Z,$){let{vault_id:J,betas:z,workspace_id:Y}=Z;return this._client.post(U`/v1/vaults/${J}/credentials/${X}/mcp_oauth_validate?beta=true`,{...$,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},$?.headers])})}}});var EX;var w4=x(()=>{S();D4();D4();R();w();f();EX=(()=>{class X extends B{constructor(){super(...arguments);this.credentials=new c8(this._client)}create(Z,$){let{betas:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/vaults?beta=true",{body:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}retrieve(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.get(U`/v1/vaults/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}update(Z,$,J){let{betas:z,workspace_id:Y,...K}=$;return this._client.post(U`/v1/vaults/${Z}?beta=true`,{body:K,...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}list(Z={},$){let{betas:J,workspace_id:z,...Y}=Z??{};return this._client.getAPIList("/v1/vaults?beta=true",E,{query:Y,...$,headers:V([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}delete(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.delete(U`/v1/vaults/${Z}?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}archive(Z,$={},J){let{betas:z,workspace_id:Y}=$??{};return this._client.post(U`/v1/vaults/${Z}/archive?beta=true`,{...J,headers:V([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString(),...Y!=null?{"anthropic-workspace-id":Y}:void 0},J?.headers])})}}return X.Credentials=c8,X})()});var d8;var R4=x(()=>{S();G1();G1();O1();O1();C1();C1();x1();x1();B1();B1();H1();H1();A1();A1();j1();j1();k1();k1();g1();g1();Z4();Z4();x4();x4();A4();A4();j4();j4();F4();F4();w4();w4();d8=(()=>{class X extends B{constructor(){super(...arguments);this.models=new s0(this._client),this.messages=new qX(this._client),this.agents=new y$(this._client),this.environments=new ZX(this._client),this.sessions=new TX(this._client),this.deployments=new n0(this._client),this.deploymentRuns=new i0(this._client),this.vaults=new EX(this._client),this.memoryStores=new $X(this._client),this.files=new o0(this._client),this.skills=new LX(this._client),this.webhooks=new X8(this._client),this.userProfiles=new e0(this._client),this.dreams=new a0(this._client),this.tunnels=new AX(this._client),this.organization=new xX(this._client)}}return X.Models=s0,X.Messages=qX,X.Agents=y$,X.Environments=ZX,X.Sessions=TX,X.Deployments=n0,X.DeploymentRuns=i0,X.Vaults=EX,X.MemoryStores=$X,X.Files=o0,X.Skills=LX,X.Webhooks=X8,X.UserProfiles=e0,X.Dreams=a0,X.Tunnels=AX,X.Organization=xX,X})()});var H0;var P4=x(()=>{S();w();H0=class H0 extends B{create(X,Z){let{betas:$,workspace_id:J,...z}=X;return this._client.post("/v1/complete",{body:z,timeout:this._client._options.timeout??600000,...Z,headers:V([{...$?.toString()!=null?{"anthropic-beta":$?.toString()}:void 0,...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers]),stream:X.stream??!1})}}});var T0;var I4=x(()=>{S();R();w();jZ();RZ();f();T0=class T0 extends B{list(X={},Z){let{workspace_id:$,...J}=X??{};return this._client.getAPIList("/v1/files",E,{query:J,...Z,headers:V([{...$!=null?{"anthropic-workspace-id":$}:void 0},Z?.headers])})}delete(X,Z={},$){let{workspace_id:J}=Z??{};return this._client.delete(U`/v1/files/${X}`,{...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])})}download(X,Z={},$){let{workspace_id:J}=Z??{};return this._client.get(U`/v1/files/${X}/content`,{...$,headers:V([{Accept:"application/binary",...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers]),__binaryResponse:!0})}retrieveMetadata(X,Z={},$){let{workspace_id:J}=Z??{};return this._client.get(U`/v1/files/${X}`,{...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])})}upload(X,Z){let{workspace_id:$,...J}=X;return this._client.post("/v1/files",UZ({body:J,...Z,headers:V([{...$!=null?{"anthropic-workspace-id":$}:void 0},P$(J.file),Z?.headers])},this._client))}}});function z7(X){return X?.output_config?.format}function f4(X,Z,$){let J=z7(Z);if(!Z||!("parse"in(J??{})))return{...X,content:X.content.map((z)=>{if(z.type==="text")return Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return z}),parsed_output:null};return y4(X,Z,$)}function y4(X,Z,$){let J=null,z=X.content.map((Y)=>{if(Y.type==="text"){let K=kJ(Z,Y.text);if(J===null)J=K;return Object.defineProperty({...Y},"parsed_output",{value:K,enumerable:!1})}return Y});return{...X,content:z,parsed_output:J}}function kJ(X,Z){let $=z7(X);if($?.type!=="json_schema")return null;try{if("parse"in $)return $.parse(Z);return JSON.parse(Z)}catch(J){throw new L(`Failed to parse structured output: ${J}`)}}var k4=x(()=>{m()});function m4(X){return X.type==="tool_use"||X.type==="server_tool_use"}var OZ,uZ,L0,l8,jX,p8,i8,SX,n8,FZ,a8,FX,DX,oZ,wX,RX,PX,r8,b4,Y7,h4,g4,v4,_4,Q7,K7;var V7=x(()=>{JZ();jZ();lZ();e();C0();l1();k4();p1();K7=(()=>{class X{constructor(Z,$){OZ.add(this),this.messages=[],this.receivedMessages=[],uZ.set(this,void 0),L0.set(this,null),this.controller=new AbortController,l8.set(this,void 0),jX.set(this,()=>{}),p8.set(this,()=>{}),i8.set(this,void 0),SX.set(this,()=>{}),n8.set(this,()=>{}),FZ.set(this,{}),a8.set(this,!1),FX.set(this,!1),DX.set(this,!1),oZ.set(this,!1),wX.set(this,void 0),RX.set(this,void 0),PX.set(this,void 0),r8.set(this,void 0),h4.set(this,(J)=>{if(M(this,FX,!0,"f"),CZ(J))J=new o;if(J instanceof o)return M(this,DX,!0,"f"),this._emit("abort",J);if(J instanceof L)return this._emit("error",J);if(J instanceof Error){let z=new L(J.message);return z.cause=J,this._emit("error",z)}return this._emit("error",new L(String(J)))}),M(this,l8,new Promise((J,z)=>{M(this,jX,J,"f"),M(this,p8,z,"f")}),"f"),M(this,i8,new Promise((J,z)=>{M(this,SX,J,"f"),M(this,n8,z,"f")}),"f"),Q(this,l8,"f").catch(()=>{}),Q(this,i8,"f").catch(()=>{}),M(this,L0,Z,"f"),M(this,r8,$?.logger??console,"f")}get response(){return Q(this,wX,"f")}get request_id(){return Q(this,RX,"f")}get workspace_id(){return Q(this,PX,"f")}async withResponse(){M(this,oZ,!0,"f");let Z=await Q(this,l8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id"),workspace_id:Z.headers.get("anthropic-workspace-id")}}static fromReadableStream(Z){let $=new X(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,J,{logger:z}={}){let Y=new X($,{logger:z});for(let K of $.messages)Y._addMessageParam(K);return M(Y,L0,{...$,stream:!0},"f"),Y._run(()=>Y._createMessage(Z,{...$,stream:!0},{...J,headers:{...J?.headers,[w$]:"stream"}})),Y}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Q(this,h4,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,J){let z=J?.signal,Y;if(z){if(z.aborted)this.controller.abort();Y=this.controller.abort.bind(this.controller),z.addEventListener("abort",Y)}try{Q(this,OZ,"m",g4).call(this);let{response:K,data:N}=await Z.create({...$,stream:!0},{...J,signal:this.controller.signal}).withResponse();this._connected(K);for await(let W of N)Q(this,OZ,"m",v4).call(this,W);if(N.controller.signal?.aborted)throw new o;Q(this,OZ,"m",_4).call(this)}finally{if(z&&Y)z.removeEventListener("abort",Y)}}_connected(Z){if(this.ended)return;M(this,wX,Z,"f"),M(this,RX,Z?.headers.get("request-id"),"f"),M(this,PX,Z?.headers.get("anthropic-workspace-id"),"f"),Q(this,jX,"f").call(this,Z),this._emit("connect")}get ended(){return Q(this,a8,"f")}get errored(){return Q(this,FX,"f")}get aborted(){return Q(this,DX,"f")}abort(){this.controller.abort()}on(Z,$){return(Q(this,FZ,"f")[Z]||(Q(this,FZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let J=Q(this,FZ,"f")[Z];if(!J)return this;let z=J.findIndex((Y)=>Y.listener===$);if(z>=0)J.splice(z,1);return this}once(Z,$){return(Q(this,FZ,"f")[Z]||(Q(this,FZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,J)=>{if(M(this,oZ,!0,"f"),Z!=="error")this.once("error",J);this.once(Z,$)})}async done(){M(this,oZ,!0,"f"),await Q(this,i8,"f")}get currentMessage(){return Q(this,uZ,"f")}async finalMessage(){return await this.done(),Q(this,OZ,"m",b4).call(this)}async finalText(){return await this.done(),Q(this,OZ,"m",Y7).call(this)}_emit(Z,...$){if(Q(this,a8,"f"))return;if(Z==="end")M(this,a8,!0,"f"),Q(this,SX,"f").call(this);let J=Q(this,FZ,"f")[Z];if(J)Q(this,FZ,"f")[Z]=J.filter((z)=>!z.once),J.forEach(({listener:z})=>z(...$));if(Z==="abort"){let z=$[0];if(!Q(this,oZ,"f")&&!J?.length)Promise.reject(z);Q(this,p8,"f").call(this,z),Q(this,n8,"f").call(this,z),this._emit("end");return}if(Z==="error"){let z=$[0];if(!Q(this,oZ,"f")&&!J?.length)Promise.reject(z);Q(this,p8,"f").call(this,z),Q(this,n8,"f").call(this,z),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Q(this,OZ,"m",b4).call(this))}async _fromReadableStream(Z,$){let J=$?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Q(this,OZ,"m",g4).call(this),this._connected(null);let Y=EZ.fromReadableStream(Z,this.controller);for await(let K of Y)Q(this,OZ,"m",v4).call(this,K);if(Y.controller.signal?.aborted)throw new o;Q(this,OZ,"m",_4).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}[(uZ=new WeakMap,L0=new WeakMap,l8=new WeakMap,jX=new WeakMap,p8=new WeakMap,i8=new WeakMap,SX=new WeakMap,n8=new WeakMap,FZ=new WeakMap,a8=new WeakMap,FX=new WeakMap,DX=new WeakMap,oZ=new WeakMap,wX=new WeakMap,RX=new WeakMap,PX=new WeakMap,r8=new WeakMap,h4=new WeakMap,OZ=new WeakSet,b4=function(){if(this.receivedMessages.length===0)throw new L("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},Y7=function(){if(this.receivedMessages.length===0)throw new L("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((J)=>J.type==="text").map((J)=>J.text);if($.length===0)throw new L("stream ended without producing a content block with type=text");return $.join(" ")},g4=function(){if(this.ended)return;M(this,uZ,void 0,"f")},v4=function($){if(this.ended)return;let J=Q(this,OZ,"m",Q7).call(this,$);switch(this._emit("streamEvent",$,J),$.type){case"content_block_delta":{let z=J.content.at(-1);switch($.delta.type){case"text_delta":{if(z.type==="text")this._emit("text",$.delta.text,z.text||"");break}case"citations_delta":{if(z.type==="text")this._emit("citation",$.delta.citation,z.citations??[]);break}case"input_json_delta":{if(m4(z)&&Q(this,FZ,"f").inputJson?.length)this._emit("inputJson",$.delta.partial_json,z.input);break}case"thinking_delta":{if(z.type==="thinking")this._emit("thinking",$.delta.thinking,z.thinking);break}case"signature_delta":{if(z.type==="thinking")this._emit("signature",z.signature);break}default:fZ($.delta)}break}case"message_stop":{this._addMessageParam(J),this._addMessage(f4(J,Q(this,L0,"f"),{logger:Q(this,r8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",J.content.at(-1));break}case"message_start":{M(this,uZ,J,"f");break}case"content_block_start":case"message_delta":break}},_4=function(){if(this.ended)throw new L("stream has ended, this shouldn't happen");let $=Q(this,uZ,"f");if(!$)throw new L("request ended without sending any chunks");return M(this,uZ,void 0,"f"),f4($,Q(this,L0,"f"),{logger:Q(this,r8,"f")})},Q7=function($){let J=Q(this,uZ,"f");if($.type==="message_start"){if(J)throw new L(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!J)throw new L(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return J;case"message_delta":if(J.stop_reason=$.delta.stop_reason,J.stop_sequence=$.delta.stop_sequence,J.stop_details=$.delta.stop_details,J.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)J.container=$.delta.container;if($.usage.input_tokens!=null)J.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)J.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)J.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)J.usage.server_tool_use=$.usage.server_tool_use;if($.usage.output_tokens_details!=null)J.usage.output_tokens_details=$.usage.output_tokens_details;return J;case"content_block_start":return J.content.push({...$.content_block}),J;case"content_block_delta":{let z=J.content.at($.index);switch($.delta.type){case"text_delta":{if(z?.type==="text")J.content[$.index]={...z,text:(z.text||"")+$.delta.text};break}case"citations_delta":{if(z?.type==="text")J.content[$.index]={...z,citations:[...z.citations??[],$.delta.citation]};break}case"input_json_delta":{if(z&&m4(z)){let Y=(z[vZ]||"")+$.delta.partial_json;J.content[$.index]=zX(z,Y)}break}case"thinking_delta":{if(z?.type==="thinking")J.content[$.index]={...z,thinking:z.thinking+$.delta.thinking};break}case"signature_delta":{if(z?.type==="thinking")J.content[$.index]={...z,signature:$.delta.signature};break}default:fZ($.delta)}return J}case"content_block_stop":{let z=J.content.at($.index);if(z&&m4(z)&&vZ in z)Object.defineProperty(z,"input",{value:z.input,enumerable:!0,configurable:!0,writable:!0});return J}}},Symbol.asyncIterator)](){let Z=[],$=[],J=!1;return this.on("streamEvent",(z)=>{let Y=$.shift();if(Y)Y.resolve(z);else Z.push(z)}),this.on("end",()=>{J=!0;for(let z of $)z.resolve(void 0);$.length=0}),this.on("abort",(z)=>{J=!0;for(let Y of $)Y.reject(z);$.length=0}),this.on("error",(z)=>{J=!0;for(let Y of $)Y.reject(z);$.length=0}),{next:async()=>{if(!Z.length){if(J)return{value:void 0,done:!0};return new Promise((Y,K)=>$.push({resolve:Y,reject:K})).then((Y)=>Y?{value:Y,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new EZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}return X})()});var t8;var u4=x(()=>{S();R();w();v1();C0();f();t8=class t8 extends B{create(X,Z){let{user_profile_id:$,workspace_id:J,...z}=X;return this._client.post("/v1/messages/batches",{body:z,...Z,headers:V([{...$!=null?{"anthropic-user-profile-id":$}:void 0,...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}retrieve(X,Z={},$){let{workspace_id:J}=Z??{};return this._client.get(U`/v1/messages/batches/${X}`,{...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])})}list(X={},Z){let{workspace_id:$,...J}=X??{};return this._client.getAPIList("/v1/messages/batches",a,{query:J,...Z,headers:V([{...$!=null?{"anthropic-workspace-id":$}:void 0},Z?.headers])})}delete(X,Z={},$){let{workspace_id:J}=Z??{};return this._client.delete(U`/v1/messages/batches/${X}`,{...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])})}cancel(X,Z={},$){let{workspace_id:J}=Z??{};return this._client.post(U`/v1/messages/batches/${X}/cancel`,{...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])})}async results(X,Z={},$){let J=await this.retrieve(X,Z,$);if(!J.results_url)throw new L(`No batch \`results_url\`; Has it finished processing? ${J.processing_status} - ${J.id}`);let{workspace_id:z}=Z??{};return this._client.get(J.results_url,{...$,headers:V([{Accept:"application/binary",...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((Y,K)=>XX.fromResponse(K.response,K.controller))}}});var o8,N7,hJ;var c4=x(()=>{S();w();jZ();V7();k4();u4();u4();m1();o8=(()=>{class X extends B{constructor(){super(...arguments);this.batches=new t8(this._client)}create(Z,$){let{user_profile_id:J,workspace_id:z,...Y}=Z;if(Y.model in N7)console.warn(`The model '${Y.model}' is deprecated and will reach end-of-life on ${N7[Y.model]}
|
|
33
|
-
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(hJ.includes(Y.model)&&Y.thinking&&Y.thinking.type==="enabled")console.warn(`Using Claude with ${Y.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let K=$?.timeout??this._client._options.timeout;if(!Y.stream&&K==null){let W=JX[Y.model]??void 0;K=this._client.calculateNonstreamingTimeout(Y.max_tokens,W)}let N=R$(Y.tools,Y.messages);return this._client.post("/v1/messages",{body:Y,timeout:K??600000,...$,headers:V([{...J!=null?{"anthropic-user-profile-id":J}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},N,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((J)=>y4(J,Z,{logger:this._client.logger??console}))}stream(Z,$){return K7.createMessage(this,Z,$,{logger:this._client.logger??console})}countTokens(Z,$){let{user_profile_id:J,workspace_id:z,...Y}=Z;return this._client.post("/v1/messages/count_tokens",{body:Y,...$,headers:V([{...J!=null?{"anthropic-user-profile-id":J}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}}return X.Batches=t8,X})(),N7={},hJ=["claude-mythos-preview","claude-opus-4-6"]});var A0;var d4=x(()=>{S();R();w();f();A0=class A0 extends B{retrieve(X,Z={},$){let{betas:J,workspace_id:z}=Z??{};return this._client.get(U`/v1/models/${X}`,{...$,headers:V([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X={},Z){let{betas:$,workspace_id:J,...z}=X??{};return this._client.getAPIList("/v1/models",a,{query:z,...Z,headers:V([{...$?.toString()!=null?{"anthropic-beta":$?.toString()}:void 0,...J!=null?{"anthropic-workspace-id":J}:void 0},Z?.headers])})}}});var s8;var l4=x(()=>{S();R();w();RZ();f();s8=class s8 extends B{create(X,Z,$){let{workspace_id:J,...z}=Z;return this._client.post(U`/v1/skills/${X}/versions`,UZ({body:z,...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])},this._client,!1))}retrieve(X,Z,$){let{skill_id:J,workspace_id:z}=Z;return this._client.get(U`/v1/skills/${J}/versions/${X}`,{...$,headers:V([{...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}list(X,Z={},$){let{workspace_id:J,...z}=Z??{};return this._client.getAPIList(U`/v1/skills/${X}/versions`,E,{query:z,...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])})}delete(X,Z,$){let{skill_id:J,workspace_id:z}=Z;return this._client.delete(U`/v1/skills/${J}/versions/${X}`,{...$,headers:V([{...z!=null?{"anthropic-workspace-id":z}:void 0},$?.headers])})}}});var e8;var p4=x(()=>{S();l4();l4();R();w();RZ();f();e8=(()=>{class X extends B{constructor(){super(...arguments);this.versions=new s8(this._client)}create(Z,$){let{workspace_id:J,...z}=Z;return this._client.post("/v1/skills",UZ({body:z,...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])},this._client,!1))}retrieve(Z,$={},J){let{workspace_id:z}=$??{};return this._client.get(U`/v1/skills/${Z}`,{...J,headers:V([{...z!=null?{"anthropic-workspace-id":z}:void 0},J?.headers])})}list(Z={},$){let{workspace_id:J,...z}=Z??{};return this._client.getAPIList("/v1/skills",E,{query:z,...$,headers:V([{...J!=null?{"anthropic-workspace-id":J}:void 0},$?.headers])})}delete(Z,$={},J){let{workspace_id:z}=$??{};return this._client.delete(U`/v1/skills/${Z}`,{...J,headers:V([{...z!=null?{"anthropic-workspace-id":z}:void 0},J?.headers])})}}return X.Versions=s8,X})()});var W7=x(()=>{R4();P4();I4();c4();d4();p4();V9()});var i4,n4,IX,U7,_J="\\n\\nHuman:",mJ="\\n\\nAssistant:",uJ,cJ;var q7=x(()=>{JZ();e();eZ();lZ();z$();Q$();Z0();U6();pX();y0();m();X0();R6();r6();X9();R();K9();W7();Y1();P4();I4();d4();R4();c4();p4();z$();w();J0();wZ();e();uJ=(()=>{class X{get credentials(){return this._authState.provider}constructor({baseURL:Z=y("ANTHROPIC_BASE_URL"),apiKey:$,authToken:J,webhookKey:z=y("ANTHROPIC_WEBHOOK_SIGNING_KEY")??null,...Y}={}){if(i4.add(this),this._requestAuthFlags=new WeakMap,IX.set(this,void 0),$===void 0)$=Y.profile!=null?null:y("ANTHROPIC_API_KEY")??null;if(J===void 0)J=Y.profile!=null?null:y("ANTHROPIC_AUTH_TOKEN")??null;if(Y.profile!=null&&(Y.credentials!=null||Y.config!=null))throw TypeError("Pass at most one of `profile`, `credentials`, or `config`.");let K={apiKey:$,authToken:J,webhookKey:z,...Y,baseURL:Z||"https://api.anthropic.com"};if(!K.dangerouslyAllowBrowser&&z6())throw new L(`It looks like you're running in a browser-like environment.
|
|
34
|
-
|
|
35
|
-
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
36
|
-
If you understand the risks and have appropriate mitigations in place,
|
|
37
|
-
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
38
|
-
|
|
39
|
-
new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
40
|
-
`);this.baseURL=K.baseURL,this._baseURLIsExplicit=Y.__baseURLIsExplicit??!!Z,this.timeout=K.timeout??n4.DEFAULT_TIMEOUT,this.logger=K.logger??console,this.logLevel=m0,this.logLevel=x$(K.logLevel,"ClientOptions.logLevel",h(this))??x$(y("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",h(this))??m0,this.fetchOptions=K.fetchOptions,this.maxRetries=X$("maxRetries",K.maxRetries??2),this.fetch=K.fetch??V6(),M(this,IX,W6,"f"),this.middleware=[...K.middleware??[]];let N=y("ANTHROPIC_CUSTOM_HEADERS");if(N){let q={};for(let H of N.split(`
|
|
41
|
-
`)){let G=H.indexOf(":");if(G>=0)q[H.substring(0,G).trim()]=H.substring(G+1).trim()}K.defaultHeaders={...q,...K.defaultHeaders}}let W=Y.__auth;if(delete K.__auth,delete K.__baseURLIsExplicit,this._options=K,this.apiKey=typeof $==="string"?$:null,this.authToken=J,this.webhookKey=z,W){if(this._authState=W,!this._baseURLIsExplicit&&W.baseURL)this.baseURL=W.baseURL}else if(this._authState={provider:null,tokenCache:null,resolution:null,error:null,extraHeaders:{}},this.apiKey==null&&this.authToken==null){let q=K.credentials??null;if(q)this._authState.provider=q,this._authState.tokenCache=this._makeTokenCache(q);else if(K.config!=null){let H=$1(K.config,this._credentialResolverOptions());this._authState.provider=H.provider,this._authState.tokenCache=this._makeTokenCache(H.provider),this._authState.extraHeaders=H.extraHeaders,this._applyCredentialBaseURL(H.baseURL)}else if(K.profile!=null)this._authState.resolution=this._resolveDefaultCredentials(K.profile);else if(this._shouldResolveDefaultCredentials())this._authState.resolution=this._resolveDefaultCredentials()}}_shouldResolveDefaultCredentials(){return!0}_applyCredentialBaseURL(Z){if(!Z)return;let $=Z.replace(/\/+$/,"");if(this._authState.baseURL=$,!this._baseURLIsExplicit)this.baseURL=$}_credentialResolverOptions(){return{baseURL:this.baseURL,fetch:this._credentialsFetch(),userAgent:this.getUserAgent(),onCacheWriteError:(Z)=>{h(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{h(this).warn(Z)}}}_credentialsFetch(){return z1(this.fetch,this.middleware,void 0,this)}_makeTokenCache(Z){return new nX(Z,($)=>{h(this).debug("advisory token refresh failed; serving cached token",$)})}withOptions(Z){let $="credentials"in Z||"config"in Z||"profile"in Z,J="apiKey"in Z||"authToken"in Z||$,z={...this._options,...this._baseURLIsExplicit?{baseURL:this.baseURL}:{},maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,middleware:this.middleware,apiKey:this.apiKey,authToken:this.authToken,webhookKey:this.webhookKey,credentials:this.credentials,...$?{credentials:void 0,config:void 0,profile:void 0}:{},...Z,__auth:J?void 0:this._authState,__baseURLIsExplicit:"baseURL"in Z?!0:this._baseURLIsExplicit};return new this.constructor(z)}async _resolveDefaultCredentials(Z){try{let $=await a6(this._credentialResolverOptions(),Z);if($)this._authState.provider=$.provider,this._authState.tokenCache=this._makeTokenCache($.provider),this._authState.extraHeaders=$.extraHeaders,this._applyCredentialBaseURL($.baseURL);else if(Z!=null)throw new L(`Profile "${Z}" could not be resolved (no <config_dir>/configs/${Z}.json found).`)}catch($){this._authState.error=$}finally{this._authState.resolution=null}}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:Z,nulls:$}){if(Z.get("x-api-key")||Z.get("authorization"))return;if(this._authState.error)throw this._authState.error;if(this._authState.tokenCache||this._authState.resolution)return;if(this.apiKey&&Z.get("x-api-key"))return;if($.has("x-api-key"))return;if(this.authToken&&Z.get("authorization"))return;if($.has("authorization"))return;throw Error('Could not resolve authentication method. Expected one of apiKey, authToken, credentials, config, or profile to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}_authFlags(Z){let $=this._requestAuthFlags.get(Z);if(!$)$={usedTokenCache:!1,didRefreshFor401:!1},this._requestAuthFlags.set(Z,$);return $}async authHeaders(Z){if(this._authState.resolution)await this._authState.resolution;if(this._authState.error)return;if(this._authState.tokenCache&&this.apiKey==null){let $=await this._authState.tokenCache.getToken();return this._authFlags(Z).usedTokenCache=!0,V([{Authorization:`Bearer ${$}`}])}return V([await this.apiKeyAuth(Z),await this.bearerAuth(Z)])}async apiKeyAuth(Z){if(this.apiKey==null)return;return V([{"X-Api-Key":this.apiKey}])}async bearerAuth(Z){if(this.authToken==null)return;return V([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(Z){return A6(Z)}getUserAgent(){return`Anthropic/JS ${WZ}`}makeStatusError(Z,$,J,z){return v.generate(Z,$,J,z)}buildURL(Z,$,J){let z=!Q(this,i4,"m",U7).call(this)&&J||this.baseURL,Y=e4(Z)?new URL(Z):new URL(z+(z.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),K=this.defaultQuery(),N=Object.fromEntries(Y.searchParams);if(!bX(K)||!bX(N))$={...N,...K,...$};if(typeof $==="object"&&$&&!Array.isArray($))Y.search=this.stringifyQuery($);return Y.toString()}_calculateNonstreamingTimeout(Z){if(3600*Z/128000>600)throw new L("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600000}async prepareOptions(Z){}async prepareRequest(Z,{url:$,options:J}){if(this._authState.tokenCache&&this.apiKey==null){let z=Z.headers instanceof Headers?Z.headers:new Headers(Z.headers);for(let[K,N]of Object.entries(this._authState.extraHeaders))if(!z.has(K))z.set(K,N);if(!z.get("anthropic-beta")?.split(",").map((K)=>K.trim())?.includes(pZ))z.append("anthropic-beta",pZ);Z.headers=z}}backendMiddleware(){return[]}get(Z,$){return this.methodRequest("get",Z,$)}post(Z,$){return this.methodRequest("post",Z,$)}patch(Z,$){return this.methodRequest("patch",Z,$)}put(Z,$){return this.methodRequest("put",Z,$)}delete(Z,$){return this.methodRequest("delete",Z,$)}methodRequest(Z,$,J){return this.request(Promise.resolve(J).then((z)=>{return{method:Z,path:$,...z}}))}request(Z,$=null){return new E$(this,this.makeRequest(Z,$,void 0))}async makeRequest(Z,$,J){let z=await Z,Y=X$("maxRetries",z.maxRetries??this.maxRetries);if($==null)$=Y,this._requestAuthFlags.delete(z);await this.prepareOptions(z);let{req:K,url:N,timeout:W}=await this.buildRequest(z,{retryCount:Y-$}),q="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),H=J===void 0?"":`, retryOf: ${J}`,G=Date.now();if(z.signal?.aborted)throw new o;let C=new AbortController,O=await this.fetchWithTimeout(N,K,W,C,z,{requestLogID:q,retryOfRequestLogID:J}).catch(dZ),T=Date.now();if(O instanceof globalThis.Error){HZ(C);let D=`retrying, ${$} attempts remaining`;if(z.signal?.aborted)throw new o;let A=CZ(O)||/timed? ?out/i.test(String(O)+("cause"in O?String(O.cause):"")),k=this.middleware.length>0||!!z.middleware?.length||this.backendMiddleware().length>0;if(k&&!A&&!$9(O))throw h(this).info(`[${q}] middleware error (not retryable)`),h(this).debug(`[${q}] middleware error (not retryable)`,AZ({retryOfRequestLogID:J,url:N,durationMs:T-G,message:O.message})),O;if($)return h(this).info(`[${q}] connection ${A?"timed out":"failed"} - ${D}`),h(this).debug(`[${q}] connection ${A?"timed out":"failed"} (${D})`,AZ({retryOfRequestLogID:J,url:N,durationMs:T-G,message:O.message})),this.retryRequest(z,$,J??q);if(h(this).info(`[${q}] connection ${A?"timed out":"failed"} - error; no more retries left`),h(this).debug(`[${q}] connection ${A?"timed out":"failed"} (error; no more retries left)`,AZ({retryOfRequestLogID:J,url:N,durationMs:T-G,message:O.message})),A)throw new E0;if(k&&!J1(O))throw O;throw new DZ({cause:O})}let P=[...O.headers.entries()].filter(([D])=>D==="request-id"||D==="anthropic-workspace-id").map(([D,A])=>", "+D+": "+JSON.stringify(A)).join(""),F=`[${q}${H}${P}] ${K.method} ${N} ${O.ok?"succeeded":"failed"} with status ${O.status} in ${T-G}ms`;if(!O.ok){let D=await this.shouldRetry(O,z);if($&&D){let b=`retrying, ${$} attempts remaining`;return await N6(O.body),HZ(C),h(this).info(`${F} - ${b}`),h(this).debug(`[${q}] response error (${b})`,AZ({retryOfRequestLogID:J,url:O.url,status:O.status,headers:O.headers,durationMs:T-G})),this.retryRequest(z,$,J??q,O.headers)}let A=D?"error; no more retries left":"error; not retryable";h(this).info(`${F} - ${A}`);let k=await O.text().catch((b)=>dZ(b).message),j=J$(k),I=j?void 0:k;throw h(this).debug(`[${q}] response error (${A})`,AZ({retryOfRequestLogID:J,url:O.url,status:O.status,headers:O.headers,message:I,durationMs:Date.now()-G})),HZ(C),this.makeStatusError(O.status,j,I,O.headers)}return h(this).info(F),h(this).debug(`[${q}] response start`,AZ({retryOfRequestLogID:J,url:O.url,status:O.status,headers:O.headers,durationMs:T-G})),K6(O.body??O,C),{response:O,options:z,controller:C,requestLogID:q,retryOfRequestLogID:J,startTime:G}}getAPIList(Z,$,J){return this.requestAPIList($,J&&"then"in J?J.then((z)=>({method:"get",path:Z,...z})):{method:"get",path:Z,...J})}requestAPIList(Z,$){let J=this.makeRequest($,null,void 0);return new J9(this,J,Z)}async fetchWithTimeout(Z,$,J,z,Y,K){let{signal:N,method:W,...q}=$||{},H=this._makeAbort(z);if(N)N.addEventListener("abort",H,{once:!0}),Q6(z,N,H);let G=globalThis.ReadableStream&&q.body instanceof globalThis.ReadableStream||typeof q.body==="object"&&q.body!==null&&Symbol.asyncIterator in q.body,C={signal:z.signal,...G?{duplex:"half"}:{},method:"GET",...q};if(W)C.method=W.toUpperCase();let O=this.fetch,T=async(k,j)=>{let I=setTimeout(H,J);try{return await O.call(void 0,k,j)}finally{clearTimeout(I)}},P=Y===void 0?T:async(k,j={})=>{let I=typeof k==="string"?k:k instanceof URL?k.href:k.url;if(j.headers=j.headers instanceof Headers?j.headers:new Headers(j.headers),await this.prepareRequest(j,{url:I,options:Y}),K)h(this).debug(`[${K.requestLogID}] sending request`,AZ({retryOfRequestLogID:K.retryOfRequestLogID,method:j.method,url:I,options:Y,headers:j.headers}));return T(k,j)},F=Y?.middleware,D=this.backendMiddleware(),A=F?.length||D.length?[...this.middleware,...F??[],...D]:this.middleware;return await z1(P,A,Y,this)(Z,C)}async shouldRetry(Z,$){let J=this._authFlags($);if(Z.status===401&&this._authState.tokenCache&&J.usedTokenCache&&!J.didRefreshFor401)return J.didRefreshFor401=!0,this._authState.tokenCache.invalidate(),!0;let z=Z.headers.get("x-should-retry");if(z==="true")return!0;if(z==="false")return!1;if(Z.status===408)return!0;if(Z.status===409)return!0;if(Z.status===429)return!0;if(Z.status>=500)return!0;return!1}async retryRequest(Z,$,J,z){let Y,K=z?.get("retry-after-ms");if(K){let W=parseFloat(K);if(!Number.isNaN(W))Y=W}let N=z?.get("retry-after");if(N&&!Y){let W=parseFloat(N);if(!Number.isNaN(W))Y=W*1000;else Y=Date.parse(N)-Date.now()}if(Y===void 0||!(Y>0&&Y<=2147483647)){let W=Z.maxRetries??this.maxRetries;Y=this.calculateDefaultRetryTimeoutMillis($,W)}return await MZ(Y,Z.signal??void 0),this.makeRequest(Z,$-1,J)}calculateDefaultRetryTimeoutMillis(Z,$){let Y=$-Z,K=Math.min(0.5*Math.pow(2,Y),8),N=1-Math.random()*0.25;return K*N*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new L("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 600000}async buildRequest(Z,{retryCount:$=0}={}){let J={...Z},{method:z,path:Y,query:K,defaultBaseURL:N}=J;if(this._authState.resolution)await this._authState.resolution;if(!this._baseURLIsExplicit&&this._authState.baseURL&&this.baseURL!==this._authState.baseURL)this.baseURL=this._authState.baseURL;let W=this.buildURL(Y,K,N);if("timeout"in J)X$("timeout",J.timeout);J.timeout=J.timeout??this.timeout;let{bodyHeaders:q,body:H}=this.buildBody({options:J}),G=await this.buildHeaders({options:Z,method:z,bodyHeaders:q,retryCount:$});return{req:{method:z,headers:G,...J.signal&&{signal:J.signal},...globalThis.ReadableStream&&H instanceof globalThis.ReadableStream&&{duplex:"half"},...H&&{body:H},...this.fetchOptions??{},...J.fetchOptions??{}},url:W,timeout:J.timeout}}async buildHeaders({options:Z,method:$,bodyHeaders:J,retryCount:z}){let Y=V([{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(z),...Z.timeout?{"X-Stainless-Timeout":String(Math.trunc(Z.timeout/1000))}:{},...k0(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(Z),this._options.defaultHeaders,J,Z.headers]);return this.validateHeaders(Y),Y.values}_makeAbort(Z){return()=>Z.abort()}buildBody({options:{body:Z,headers:$}}){if(!Z)return{bodyHeaders:void 0,body:void 0};let J=V([$]);if(ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer||Z instanceof DataView||typeof Z==="string"&&J.values.has("content-type")||globalThis.Blob&&Z instanceof globalThis.Blob||Z instanceof FormData||Z instanceof URLSearchParams||globalThis.ReadableStream&&Z instanceof globalThis.ReadableStream)return{bodyHeaders:void 0,body:Z};else if(typeof Z==="object"&&((Symbol.asyncIterator in Z)||(Symbol.iterator in Z)&&("next"in Z)&&typeof Z.next==="function"))return{bodyHeaders:void 0,body:K$(Z)};else if(typeof Z==="object"&&J.values.get("content-type")==="application/x-www-form-urlencoded")return{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(Z)};else return Q(this,IX,"f").call(this,{body:Z,headers:J})}}return n4=X,IX=new WeakMap,i4=new WeakSet,U7=function(){return this.baseURL!=="https://api.anthropic.com"},X.Anthropic=n4,X.HUMAN_PROMPT=_J,X.AI_PROMPT=mJ,X.DEFAULT_TIMEOUT=600000,X.AnthropicError=L,X.APIError=v,X.APIConnectionError=DZ,X.APIConnectionTimeoutError=E0,X.APIUserAbortError=o,X.NotFoundError=D0,X.ConflictError=w0,X.RateLimitError=P0,X.BadRequestError=j0,X.AuthenticationError=S0,X.InternalServerError=I0,X.PermissionDeniedError=F0,X.UnprocessableEntityError=R0,X.toFile=q1,X})(),cJ=(()=>{class X extends uJ{constructor(){super(...arguments);this.completions=new H0(this),this.messages=new o8(this),this.models=new A0(this),this.files=new T0(this),this.skills=new e8(this),this.beta=new d8(this)}}return X.Completions=H0,X.Messages=o8,X.Models=A0,X.Files=T0,X.Skills=e8,X.Beta=d8,X})()});var dJ=x(()=>{q7();m()});
|
|
42
|
-
export{M as ira,Q as jra,JZ as kra,L as lra,v as mra,o as nra,DZ as ora,E0 as pra,S0 as qra,D0 as rra,m as sra,g0 as tra,v0 as ura,O$ as vra,h as wra,wZ as xra,bZ as yra,g$ as zra,sZ as Ara,$$ as Bra,rJ as Cra,r4 as Dra,t4 as Era,o4 as Fra,yX as Gra,s4 as Hra,C0 as Ira,cJ as Jra,dJ as Kra};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Wx as f,Xx as v,iF as P,uF as g}from"./cli-1.1.35-hy9jtbmb.mjs";import{EX as m,QY as B,SY as J,WY as L,xZ as p}from"./cli-1.1.35-dw3fv0g8.mjs";import{$2 as G,a3 as H,b3 as y}from"./cli-1.1.35-b0n88pf7.mjs";import{Wba as Z,dga as I}from"./cli-1.1.35-dnacc640.mjs";import{Tra as C,Xra as T}from"./cli-1.1.35-c05841mj.mjs";function i(q){let b=E.c(18),{onDone:U,isStandaloneDialog:k,externalIncludes:F}=q,K;if(b[1]!==U)K=(Y)=>{if(Y==="no")Z(S);else Z(h);U()},b[1]=U,b[2]=K;else K=b[2];let w=K,M;if(b[3]!==w)M=()=>{w("no")},b[3]=w,b[4]=M;else M=b[4];let V=M,W=!k,X=!k,N;if(b[5]===Symbol.for("react.memo_cache_sentinel"))N=G(J,{children:"This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories."}),b[5]=N;else N=b[5];let z;if(b[6]!==F)z=F&&F.length>0&&H(B,{flexDirection:"column",children:[G(J,{dimColor:!0,children:"External imports:"}),F.map(D)]}),b[6]=F,b[7]=z;else z=b[7];let O;if(b[8]===Symbol.for("react.memo_cache_sentinel"))O=H(J,{dimColor:!0,children:["Important: Only use Claudin with files you trust. Accessing untrusted files may pose security risks"," ",G(L,{url:"https://code.claude.com/docs/en/security"})," "]}),b[8]=O;else O=b[8];let Q;if(b[9]===Symbol.for("react.memo_cache_sentinel"))Q=[{label:"Yes, allow external imports",value:"yes"},{label:"No, disable external imports",value:"no"}],b[9]=Q;else Q=b[9];let A;if(b[10]!==w)A=G(P,{options:Q,onChange:(Y)=>w(Y)}),b[10]=w,b[11]=A;else A=b[11];let R;if(b[12]!==V||b[13]!==A||b[14]!==W||b[15]!==X||b[16]!==z)R=H(f,{title:"Allow external CLAUDE.md file imports?",color:"warning",onCancel:V,hideBorder:W,hideInputGuide:X,children:[N,z,O,A]}),b[12]=V,b[13]=A,b[14]=W,b[15]=X,b[16]=z,b[17]=R;else R=b[17];return R}function D(q,b){return H(J,{dimColor:!0,children:[" ",q.path]},b)}function h(q){return{...q,hasClaudeMdExternalIncludesApproved:!0,hasClaudeMdExternalIncludesWarningShown:!0}}function S(q){return{...q,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!0}}var E;var j=T(()=>{p();I();g();v();y();E=C(m(),1)});
|
|
2
|
-
export{i as Vg,j as Wg};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ko as Q,oo as f}from"./cli-1.1.35-hy9jtbmb.mjs";import{Eha as M,zha as B}from"./cli-1.1.35-dnacc640.mjs";import{Fka as b,Ika as A,ika as W,jka as Z,nka as X,rka as $,vka as Y}from"./cli-1.1.35-a7ygtwdr.mjs";import{Xra as U}from"./cli-1.1.35-c05841mj.mjs";import{randomBytes as G}from"crypto";import{readFile as L,rename as N,unlink as j,writeFile as S}from"fs/promises";import{join as T}from"path";function R(){return T(Q(),_)}function E(q){let v=Z(q);if(typeof v!=="object"||v===null||!("plugins"in v)||typeof v.plugins!=="object"||v.plugins===null)return{};let x=v.plugins,C={};for(let[J,H]of Object.entries(x))if(H&&typeof H==="object"&&"flaggedAt"in H&&typeof H.flaggedAt==="string"){let V={flaggedAt:H.flaggedAt};if("seenAt"in H&&typeof H.seenAt==="string")V.seenAt=H.seenAt;C[J]=V}return C}async function K(){try{let q=await L(R(),{encoding:"utf-8"});return E(q)}catch{return{}}}async function O(q){let v=R(),x=`${v}.${G(8).toString("hex")}.tmp`;try{await $().mkdir(Q());let C=W({plugins:q},null,2);await S(x,C,{encoding:"utf-8",mode:384}),await N(x,v),z=q}catch(C){B(C);try{await j(x)}catch{}}}async function u(){let q=await K(),v=Date.now(),x=!1;for(let[C,J]of Object.entries(q))if(J.seenAt&&v-new Date(J.seenAt).getTime()>=w)delete q[C],x=!0;if(z=q,x)await O(q)}function p(){return z??{}}async function c(q){if(z===null)z=await K();let v={...z,[q]:{flaggedAt:new Date().toISOString()}};await O(v),b(`Flagged plugin: ${q}`)}async function g(q){if(z===null)z=await K();let v=new Date().toISOString(),x=!1,C={...z};for(let J of q){let H=C[J];if(H&&!H.seenAt)C[J]={...H,seenAt:v},x=!0}if(x)await O(C)}async function d(q){if(z===null)z=await K();if(!(q in z))return;let{[q]:v,...x}=z;z=x,await O(x)}var _="flagged-plugins.json",w=172800000,z=null;var k=U(()=>{A();Y();M();X();f()});
|
|
2
|
-
export{u as kd,p as ld,c as md,g as nd,d as od,k as pd};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Xra as r}from"./cli-1.1.35-c05841mj.mjs";var i,a=(s,e)=>function(){try{return e||(0,s[i(s)[0]])((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},n;var p=r(()=>{i=Object.getOwnPropertyNames,n=a({"package.json"(s,e){e.exports={name:"@mendable/firecrawl-js",version:"4.40.0",description:"JavaScript SDK for the Firecrawl API: web scraping, crawling, web search, and scientific literature search over a research paper index of PubMed, bioRxiv, medRxiv and arXiv abstracts",main:"dist/index.js",types:"dist/index.d.ts",exports:{"./package.json":"./package.json",".":{import:"./dist/index.js",default:"./dist/index.cjs"}},type:"module",scripts:{build:"tsup","build-and-publish":"pnpm run build && pnpm publish --access public","publish-beta":"pnpm run build && pnpm publish --access public --tag beta",test:"NODE_OPTIONS=--experimental-vm-modules jest --verbose src/__tests__/e2e/v2/*.test.ts --detectOpenHandles","test:unit":"NODE_OPTIONS=--experimental-vm-modules jest --verbose src/__tests__/unit/v2/*.test.ts"},repository:{type:"git",url:"git+https://github.com/firecrawl/firecrawl.git"},author:"Mendable.ai",license:"MIT",dependencies:{axios:"1.18.0",firecrawl:"4.30.1","typescript-event-target":"^1.1.1",zod:"^3.23.8","zod-to-json-schema":"^3.23.0"},bugs:{url:"https://github.com/firecrawl/firecrawl/issues"},homepage:"https://github.com/firecrawl/firecrawl#readme",devDependencies:{"@jest/globals":"^30.2.0","@types/dotenv":"^8.2.0","@types/jest":"^30.0.0","@types/mocha":"^10.0.6","@types/node":"^20.12.12","@types/uuid":"^9.0.8",dotenv:"^16.4.5",jest:"^30.2.0","ts-jest":"^29.4.5",tsup:"^8.5.0",typescript:"^5.4.5",uuid:"^14.0.0"},keywords:["firecrawl","mendable","crawler","web","scraper","api","sdk","web-search","literature-search","research","scientific-papers","academic-search","biomedical","life-sciences","pubmed","biorxiv","medrxiv","arxiv","preprints","citations","bioinformatics"],engines:{node:">=22.0.0"}}}})});
|
|
2
|
-
export{n as vi,p as wi};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Xra as o}from"./cli-1.1.35-c05841mj.mjs";var t=3,n=1,i=32,_="generativelanguage.googleapis.com",s,c="api.kimi.com",p="opencode.ai",r,a,E,S;var e=o(()=>{s=new Set(["api.moonshot.ai","api.moonshot.cn"]),r=new Set(["api.z.ai","open.bigmodel.cn","bigmodel.cn","api.zhipuai.cn","opencode.ai"]),a=new Set(["api.deepseek.com"]),E={"User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.99.3","Editor-Plugin-Version":"copilot-chat/0.26.7","Copilot-Integration-Id":"vscode-chat"},S=["api_key","key","token","access_token","refresh_token","signature","sig","secret","password","authorization"]});
|
|
2
|
-
export{t as w8,n as x8,i as y8,_ as z8,s as A8,c as B8,p as C8,r as D8,a as E8,E as F8,S as G8,e as H8};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ae as V,ce as B}from"./cli-1.1.35-6c4v5dpe.mjs";import{FO as U,Gs as Q,HO as w,Hs as q,dk as L,mS as F}from"./cli-1.1.35-hy9jtbmb.mjs";import{n$ as K,s$ as k}from"./cli-1.1.35-dnacc640.mjs";import{Fka as I,Ika as $}from"./cli-1.1.35-a7ygtwdr.mjs";import{dla as G,kla as _}from"./cli-1.1.35-w9wzew2x.mjs";import{Xra as Z}from"./cli-1.1.35-c05841mj.mjs";async function C(W,X){let E=V(W);if(!E)return null;try{let A=await U({systemPrompt:Q(['Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.']),userPrompt:E,outputFormat:{type:"json_schema",schema:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}},signal:X,options:{querySource:"rename_generate_name",agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),Y=L(A.message.content),z=K(Y);if(z&&typeof z==="object"&&"name"in z&&typeof z.name==="string")return z.name;return null}catch(A){return I(`generateSessionName failed: ${G(A)}`,{level:"error"}),null}}var D=Z(()=>{w();$();_();k();F();B();q()});
|
|
2
|
-
export{C as _d,D as $d};
|