@claudiolabs/claudin 1.1.20 → 1.1.22
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/AgentTool-1.1.22-4ba6sbn1.mjs +1 -0
- package/dist/chunks/App-1.1.22-2m11r40p.mjs +1 -0
- package/dist/chunks/ApproveApiKey-1.1.22-zp1y1218.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-1.1.22-s95rx0gk.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-1.1.22-5qa3134t.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-1.1.22-m5fc6nej.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.22-bnv9d1h5.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-1.1.22-g92az35d.mjs +1 -0
- package/dist/chunks/DiffDialog-1.1.22-9ccdds3r.mjs +6 -0
- package/dist/chunks/Doctor-1.1.22-1gc86nqw.mjs +1 -0
- package/dist/chunks/ExplorerDialog-1.1.22-z6sndn27.mjs +6 -0
- package/dist/chunks/ITermBackend-1.1.22-gb09bshz.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-1.1.22-52wjx92m.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-1.1.22-q6j91dba.mjs +1 -0
- package/dist/chunks/MigrationDialog-1.1.22-z6x86qa5.mjs +1 -0
- package/dist/chunks/Onboarding-1.1.22-05vxshwk.mjs +1 -0
- package/dist/chunks/ProviderManager-1.1.22-zh99bzde.mjs +1 -0
- package/dist/chunks/REPL-1.1.22-2c229abh.mjs +1 -0
- package/dist/chunks/ResumeConversation-1.1.22-jp1q8573.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-1.1.22-s20kx6cz.mjs +1 -0
- package/dist/chunks/TeleportProgress-1.1.22-036phq5k.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.22-2fpx0v36.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-1.1.22-q9xh6c1x.mjs +1 -0
- package/dist/chunks/TmuxBackend-1.1.22-shtyh6x1.mjs +9 -0
- package/dist/chunks/ToolSearchTool-1.1.22-hwnb32mw.mjs +1 -0
- package/dist/chunks/TrustDialog-1.1.22-tx9d7tzw.mjs +1 -0
- package/dist/chunks/activeProvider-1.1.22-qd5cmwvf.mjs +1 -0
- package/dist/chunks/add-dir-1.1.22-be3sb4ed.mjs +1 -0
- package/dist/chunks/agentTypes-1.1.22-rm5akk7n.mjs +1 -0
- package/dist/chunks/agents-1.1.22-ad8hknzy.mjs +3 -0
- package/dist/chunks/agents-1.1.22-c8hb8sst.mjs +110 -0
- package/dist/chunks/api-1.1.22-b74pv1bc.mjs +1 -0
- package/dist/chunks/asciicast-1.1.22-qz35a5k4.mjs +1 -0
- package/dist/chunks/assistant-1.1.22-mqc1g16y.mjs +1 -0
- package/dist/chunks/auth-1.1.22-hwjcqvy4.mjs +1 -0
- package/dist/chunks/auth-1.1.22-pwa369jw.mjs +1 -0
- package/dist/chunks/autoMode-1.1.22-3by2zax3.mjs +52 -0
- package/dist/chunks/autoModeSetup-1.1.22-e4mn7cas.mjs +44 -0
- package/dist/chunks/autoUpdater-1.1.22-ng881g40.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-1.1.22-hxy5jpcq.mjs +1 -0
- package/dist/chunks/branch-1.1.22-akcs4dk5.mjs +4 -0
- package/dist/chunks/bridge-1.1.22-rttgyvkn.mjs +2 -0
- package/dist/chunks/bridgeConfig-1.1.22-gtqyk17c.mjs +1 -0
- package/dist/chunks/bridgeEnabled-1.1.22-tfhha37q.mjs +1 -0
- package/dist/chunks/bridgeMain-1.1.22-mt52dzzq.mjs +88 -0
- package/dist/chunks/bridgePointer-1.1.22-bqaet342.mjs +1 -0
- package/dist/chunks/btw-1.1.22-y44fbm0x.mjs +1 -0
- package/dist/chunks/buddy-1.1.22-1jzcjwyr.mjs +3 -0
- package/dist/chunks/cache-probe-1.1.22-wmckr2fj.mjs +21 -0
- package/dist/chunks/cacheStats-1.1.22-rzg950xm.mjs +4 -0
- package/dist/chunks/caches-1.1.22-kabyzmmd.mjs +1 -0
- package/dist/chunks/claudeDesktop-1.1.22-7mafzt35.mjs +1 -0
- package/dist/chunks/claudemd-1.1.22-genp8cn4.mjs +1 -0
- package/dist/chunks/clear-1.1.22-ta3shrbf.mjs +1 -0
- package/dist/chunks/clearTerminal-1.1.22-hvkervt4.mjs +1 -0
- package/dist/chunks/cli-1.1.22-00s47593.mjs +4 -0
- package/dist/chunks/cli-1.1.22-01xfy12n.mjs +18 -0
- package/dist/chunks/cli-1.1.22-01yb5we4.mjs +2 -0
- package/dist/chunks/cli-1.1.22-0553cn3c.mjs +3 -0
- package/dist/chunks/cli-1.1.22-073y3gd5.mjs +2 -0
- package/dist/chunks/cli-1.1.22-07prh801.mjs +2 -0
- package/dist/chunks/cli-1.1.22-09eb3077.mjs +2 -0
- package/dist/chunks/cli-1.1.22-0h7jejsr.mjs +3 -0
- package/dist/chunks/cli-1.1.22-0n0cxg2p.mjs +4 -0
- package/dist/chunks/cli-1.1.22-0x96ahhc.mjs +4 -0
- package/dist/chunks/cli-1.1.22-1099x9x2.mjs +2 -0
- package/dist/chunks/cli-1.1.22-12vfd6j1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-1npmfnxb.mjs +50 -0
- package/dist/chunks/cli-1.1.22-1tqdha8j.mjs +2 -0
- package/dist/chunks/cli-1.1.22-1vrzwj7y.mjs +2 -0
- package/dist/chunks/cli-1.1.22-22735g9w.mjs +2 -0
- package/dist/chunks/cli-1.1.22-261r450y.mjs +60 -0
- package/dist/chunks/cli-1.1.22-265a4qpa.mjs +2 -0
- package/dist/chunks/cli-1.1.22-2bdf1etb.mjs +4 -0
- package/dist/chunks/cli-1.1.22-2getjsf5.mjs +6 -0
- package/dist/chunks/cli-1.1.22-2mahjtgk.mjs +2 -0
- package/dist/chunks/cli-1.1.22-2nwmyakz.mjs +2 -0
- package/dist/chunks/cli-1.1.22-2rqykpy1.mjs +18 -0
- package/dist/chunks/cli-1.1.22-2t3fhfjv.mjs +133 -0
- package/dist/chunks/cli-1.1.22-2tctx2yg.mjs +2 -0
- package/dist/chunks/cli-1.1.22-2wh33kpx.mjs +2 -0
- package/dist/chunks/cli-1.1.22-2y82t3pd.mjs +2 -0
- package/dist/chunks/cli-1.1.22-2yxd7hfb.mjs +2 -0
- package/dist/chunks/cli-1.1.22-2zhxvvkx.mjs +2 -0
- package/dist/chunks/cli-1.1.22-33jc9czg.mjs +2 -0
- package/dist/chunks/cli-1.1.22-35fe0h6z.mjs +2 -0
- package/dist/chunks/cli-1.1.22-3ehpcpz4.mjs +2 -0
- package/dist/chunks/cli-1.1.22-3h20fb9d.mjs +2 -0
- package/dist/chunks/cli-1.1.22-3jyydg5h.mjs +206 -0
- package/dist/chunks/cli-1.1.22-3nmtk1bh.mjs +2 -0
- package/dist/chunks/cli-1.1.22-3r3tadt1.mjs +4 -0
- package/dist/chunks/cli-1.1.22-3thczx3s.mjs +133 -0
- package/dist/chunks/cli-1.1.22-3xjx3y13.mjs +2 -0
- package/dist/chunks/cli-1.1.22-41aseceq.mjs +3 -0
- package/dist/chunks/cli-1.1.22-4227vtcf.mjs +24 -0
- package/dist/chunks/cli-1.1.22-48gjx3j7.mjs +2 -0
- package/dist/chunks/cli-1.1.22-4g11fbx3.mjs +2 -0
- package/dist/chunks/cli-1.1.22-4ph3xqne.mjs +2 -0
- package/dist/chunks/cli-1.1.22-4pmfh5v2.mjs +2 -0
- package/dist/chunks/cli-1.1.22-5afprdre.mjs +2 -0
- package/dist/chunks/cli-1.1.22-5dcmb4h9.mjs +2 -0
- package/dist/chunks/cli-1.1.22-5mzq5mc4.mjs +24 -0
- package/dist/chunks/cli-1.1.22-5vkvwgh1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-619cwdw8.mjs +2 -0
- package/dist/chunks/cli-1.1.22-6bxa25n5.mjs +2 -0
- package/dist/chunks/cli-1.1.22-6gd42s2a.mjs +2 -0
- package/dist/chunks/cli-1.1.22-6k5nt5wc.mjs +2 -0
- package/dist/chunks/cli-1.1.22-6khex7bz.mjs +34 -0
- package/dist/chunks/cli-1.1.22-6vtb75g8.mjs +2 -0
- package/dist/chunks/cli-1.1.22-73mzmb6a.mjs +3 -0
- package/dist/chunks/cli-1.1.22-796yez98.mjs +2 -0
- package/dist/chunks/cli-1.1.22-7dha9j2p.mjs +3 -0
- package/dist/chunks/cli-1.1.22-7rm6jw0h.mjs +17 -0
- package/dist/chunks/cli-1.1.22-7rv96st9.mjs +4 -0
- package/dist/chunks/cli-1.1.22-7xwf9v6n.mjs +2 -0
- package/dist/chunks/cli-1.1.22-7zv5k6p0.mjs +2 -0
- package/dist/chunks/cli-1.1.22-87m0b80d.mjs +8 -0
- package/dist/chunks/cli-1.1.22-8cxdckv7.mjs +39 -0
- package/dist/chunks/cli-1.1.22-8fwvxw5t.mjs +2 -0
- package/dist/chunks/cli-1.1.22-8zvpve6x.mjs +2 -0
- package/dist/chunks/cli-1.1.22-9283mpm5.mjs +4 -0
- package/dist/chunks/cli-1.1.22-9affzgn1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-9b6k45hn.mjs +3 -0
- package/dist/chunks/cli-1.1.22-9dr01ge1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-9jjvp1h1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-9t3wxp9c.mjs +2 -0
- package/dist/chunks/cli-1.1.22-9xhwr18a.mjs +2 -0
- package/dist/chunks/cli-1.1.22-a4bc88qq.mjs +2 -0
- package/dist/chunks/cli-1.1.22-an1qn05v.mjs +3 -0
- package/dist/chunks/cli-1.1.22-as4a7add.mjs +5 -0
- package/dist/chunks/cli-1.1.22-b3bpnsqk.mjs +2 -0
- package/dist/chunks/cli-1.1.22-b7axxc6j.mjs +2 -0
- package/dist/chunks/cli-1.1.22-b81ce6x4.mjs +15 -0
- package/dist/chunks/cli-1.1.22-bfc0nw13.mjs +3 -0
- package/dist/chunks/cli-1.1.22-bj4bsta6.mjs +2 -0
- package/dist/chunks/cli-1.1.22-bnse4r9s.mjs +2 -0
- package/dist/chunks/cli-1.1.22-bv3a0vaa.mjs +2 -0
- package/dist/chunks/cli-1.1.22-bxfemtrx.mjs +2 -0
- package/dist/chunks/cli-1.1.22-byxwkfrj.mjs +3 -0
- package/dist/chunks/cli-1.1.22-c07z4d74.mjs +2 -0
- package/dist/chunks/cli-1.1.22-c1h1wfjn.mjs +2 -0
- package/dist/chunks/cli-1.1.22-ca6d1erw.mjs +6 -0
- package/dist/chunks/cli-1.1.22-ccp7e8qv.mjs +2 -0
- package/dist/chunks/cli-1.1.22-ckvf3pt3.mjs +2 -0
- package/dist/chunks/cli-1.1.22-ctbmc0bv.mjs +2 -0
- package/dist/chunks/cli-1.1.22-cvfsmaqt.mjs +2 -0
- package/dist/chunks/cli-1.1.22-d1w2ky89.mjs +6 -0
- package/dist/chunks/cli-1.1.22-d7cmcmfd.mjs +2 -0
- package/dist/chunks/cli-1.1.22-d990gcrg.mjs +2 -0
- package/dist/chunks/cli-1.1.22-d9y8qqg3.mjs +2 -0
- package/dist/chunks/cli-1.1.22-ddq8axpw.mjs +12 -0
- package/dist/chunks/cli-1.1.22-df129qms.mjs +5 -0
- package/dist/chunks/cli-1.1.22-df9q1a85.mjs +2 -0
- package/dist/chunks/cli-1.1.22-djkeg65n.mjs +2 -0
- package/dist/chunks/cli-1.1.22-dpqknw7z.mjs +2 -0
- package/dist/chunks/cli-1.1.22-e25bz2ew.mjs +9 -0
- package/dist/chunks/cli-1.1.22-e5sxpgah.mjs +2 -0
- package/dist/chunks/cli-1.1.22-e5wx36qr.mjs +2 -0
- package/dist/chunks/cli-1.1.22-eagkxr30.mjs +9 -0
- package/dist/chunks/cli-1.1.22-eddrkydn.mjs +2 -0
- package/dist/chunks/cli-1.1.22-emmr10wb.mjs +21 -0
- package/dist/chunks/cli-1.1.22-eqtbpc0r.mjs +2 -0
- package/dist/chunks/cli-1.1.22-erbhk4p7.mjs +4 -0
- package/dist/chunks/cli-1.1.22-f0wja05z.mjs +2 -0
- package/dist/chunks/cli-1.1.22-f9ntxarz.mjs +2 -0
- package/dist/chunks/cli-1.1.22-fetzhxhh.mjs +2 -0
- package/dist/chunks/cli-1.1.22-fwhfqwwn.mjs +2 -0
- package/dist/chunks/cli-1.1.22-gkryz2d0.mjs +2 -0
- package/dist/chunks/cli-1.1.22-gpt102mm.mjs +2 -0
- package/dist/chunks/cli-1.1.22-grjw9tnm.mjs +2 -0
- package/dist/chunks/cli-1.1.22-gwhdvfge.mjs +24 -0
- package/dist/chunks/cli-1.1.22-gyhxg2db.mjs +2 -0
- package/dist/chunks/cli-1.1.22-h3m1whqm.mjs +6 -0
- package/dist/chunks/cli-1.1.22-hgwxyksg.mjs +2 -0
- package/dist/chunks/cli-1.1.22-hhmq1rbn.mjs +2 -0
- package/dist/chunks/cli-1.1.22-hjxaqntc.mjs +45 -0
- package/dist/chunks/cli-1.1.22-hqbf8xt0.mjs +3 -0
- package/dist/chunks/cli-1.1.22-hv3m9qnv.mjs +2 -0
- package/dist/chunks/cli-1.1.22-j6xg80k8.mjs +2 -0
- package/dist/chunks/cli-1.1.22-j7qc1g0f.mjs +2 -0
- package/dist/chunks/cli-1.1.22-jdz4rqbp.mjs +2 -0
- package/dist/chunks/cli-1.1.22-jech3kdr.mjs +2 -0
- package/dist/chunks/cli-1.1.22-jrhx2z2p.mjs +2 -0
- package/dist/chunks/cli-1.1.22-jvrjpdd1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-jz426kr2.mjs +66 -0
- package/dist/chunks/cli-1.1.22-jzvqt2pv.mjs +2 -0
- package/dist/chunks/cli-1.1.22-k3xv38bj.mjs +2 -0
- package/dist/chunks/cli-1.1.22-kphdet4j.mjs +58 -0
- package/dist/chunks/cli-1.1.22-m41t95z0.mjs +2 -0
- package/dist/chunks/cli-1.1.22-mdapyzp3.mjs +6 -0
- package/dist/chunks/cli-1.1.22-mdttpxs6.mjs +24 -0
- package/dist/chunks/cli-1.1.22-mw0jpevk.mjs +2 -0
- package/dist/chunks/cli-1.1.22-mxqz88pc.mjs +2 -0
- package/dist/chunks/cli-1.1.22-n0px7a23.mjs +3 -0
- package/dist/chunks/cli-1.1.22-n2jecp35.mjs +2 -0
- package/dist/chunks/cli-1.1.22-nstgtysk.mjs +2 -0
- package/dist/chunks/cli-1.1.22-nsydz2bd.mjs +2 -0
- package/dist/chunks/cli-1.1.22-nxv6yayj.mjs +2 -0
- package/dist/chunks/cli-1.1.22-pgrcj1gs.mjs +12 -0
- package/dist/chunks/cli-1.1.22-q622p3vr.mjs +16 -0
- package/dist/chunks/cli-1.1.22-q76mjgec.mjs +2 -0
- package/dist/chunks/cli-1.1.22-qmk7mm5m.mjs +2 -0
- package/dist/chunks/cli-1.1.22-qq7q7v3n.mjs +2 -0
- package/dist/chunks/cli-1.1.22-qzc4h0w2.mjs +2 -0
- package/dist/chunks/cli-1.1.22-r0v2mak7.mjs +2 -0
- package/dist/chunks/cli-1.1.22-r7dnq81v.mjs +2 -0
- package/dist/chunks/cli-1.1.22-r9n3fz01.mjs +2 -0
- package/dist/chunks/cli-1.1.22-rd5zdpvh.mjs +2 -0
- package/dist/chunks/cli-1.1.22-rma08k7m.mjs +3 -0
- package/dist/chunks/cli-1.1.22-rsp3340r.mjs +2 -0
- package/dist/chunks/cli-1.1.22-rtn7nhkb.mjs +1 -0
- package/dist/chunks/cli-1.1.22-s2n02sky.mjs +2 -0
- package/dist/chunks/cli-1.1.22-s5qhs3ds.mjs +2 -0
- package/dist/chunks/cli-1.1.22-s6e60cqc.mjs +2 -0
- package/dist/chunks/cli-1.1.22-sema6yh6.mjs +2 -0
- package/dist/chunks/cli-1.1.22-skpsy2jm.mjs +17 -0
- package/dist/chunks/cli-1.1.22-ss970cxc.mjs +2 -0
- package/dist/chunks/cli-1.1.22-swvmx131.mjs +2 -0
- package/dist/chunks/cli-1.1.22-sy41x518.mjs +2 -0
- package/dist/chunks/cli-1.1.22-tag23y0b.mjs +25 -0
- package/dist/chunks/cli-1.1.22-tkg7zwpn.mjs +20 -0
- package/dist/chunks/cli-1.1.22-tt24grn6.mjs +2 -0
- package/dist/chunks/cli-1.1.22-v260dy3k.mjs +2 -0
- package/dist/chunks/cli-1.1.22-v2q2pts1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-v8pzx6jk.mjs +2 -0
- package/dist/chunks/cli-1.1.22-vdsszncw.mjs +2 -0
- package/dist/chunks/cli-1.1.22-vesjdg08.mjs +2 -0
- package/dist/chunks/cli-1.1.22-vnmyjmjg.mjs +2 -0
- package/dist/chunks/cli-1.1.22-vp1eed3p.mjs +7 -0
- package/dist/chunks/cli-1.1.22-vwdxbs23.mjs +2 -0
- package/dist/chunks/cli-1.1.22-vwv40zm1.mjs +2 -0
- package/dist/chunks/cli-1.1.22-waqb850v.mjs +15 -0
- package/dist/chunks/cli-1.1.22-wbpdne8j.mjs +2 -0
- package/dist/chunks/cli-1.1.22-xm1rhe1d.mjs +2 -0
- package/dist/chunks/cli-1.1.22-xmb0wn88.mjs +42 -0
- package/dist/chunks/cli-1.1.22-xmy1w9q2.mjs +2 -0
- package/dist/chunks/cli-1.1.22-xpvyrpxz.mjs +7 -0
- package/dist/chunks/cli-1.1.22-xxwfawkh.mjs +2 -0
- package/dist/chunks/cli-1.1.22-xygngqfs.mjs +2 -0
- package/dist/chunks/cli-1.1.22-xzrnmekb.mjs +3 -0
- package/dist/chunks/cli-1.1.22-y0t8rezv.mjs +2 -0
- package/dist/chunks/cli-1.1.22-y3te45vg.mjs +2 -0
- package/dist/chunks/cli-1.1.22-y4rj8ced.mjs +2 -0
- package/dist/chunks/cli-1.1.22-ya408d88.mjs +4 -0
- package/dist/chunks/cli-1.1.22-yegp0d0j.mjs +6 -0
- package/dist/chunks/cli-1.1.22-yhgxca73.mjs +2 -0
- package/dist/chunks/cli-1.1.22-yjv63n10.mjs +2 -0
- package/dist/chunks/cli-1.1.22-yqbnqsen.mjs +3 -0
- package/dist/chunks/cli-1.1.22-yr5y8074.mjs +4 -0
- package/dist/chunks/cli-1.1.22-yy4d5xbz.mjs +2 -0
- package/dist/chunks/cli-1.1.22-yzk40k6c.mjs +2 -0
- package/dist/chunks/cli-1.1.22-z5g00tpb.mjs +25 -0
- package/dist/chunks/cli-1.1.22-zcrvxkff.mjs +15 -0
- package/dist/chunks/cli-1.1.22-zfg31zpg.mjs +2 -0
- package/dist/chunks/cli-1.1.22-zmt5pksy.mjs +5426 -0
- package/dist/chunks/cli-1.1.22-znq4fk8a.mjs +2 -0
- package/dist/chunks/cli-1.1.22-zsc0cmye.mjs +2 -0
- package/dist/chunks/client-1.1.22-wq8vw6a1.mjs +1 -0
- package/dist/chunks/color-1.1.22-qk5z13ac.mjs +1 -0
- package/dist/chunks/compact-1.1.22-rb84pjhg.mjs +3 -0
- package/dist/chunks/config-1.1.22-0p9ep18d.mjs +1 -0
- package/dist/chunks/config-1.1.22-5mngav76.mjs +1 -0
- package/dist/chunks/constants-1.1.22-kjrh13hv.mjs +1 -0
- package/dist/chunks/context-1.1.22-dw2er614.mjs +1 -0
- package/dist/chunks/context-noninteractive-1.1.22-znhpxryw.mjs +1 -0
- package/dist/chunks/conversation-1.1.22-awv74gk2.mjs +1 -0
- package/dist/chunks/copilotHeaders-1.1.22-m6ccr26v.mjs +1 -0
- package/dist/chunks/copy-1.1.22-7b5mhaaj.mjs +9 -0
- package/dist/chunks/cost-1.1.22-dt2gz43e.mjs +1 -0
- package/dist/chunks/createSSHSession-1.1.22-a42r8ywe.mjs +1 -0
- package/dist/chunks/createSession-1.1.22-ddd5ddkv.mjs +1 -0
- package/dist/chunks/debug-1.1.22-qraa5by9.mjs +1 -0
- package/dist/chunks/defaultActionDeps-1.1.22-ctnqgj01.mjs +1534 -0
- package/dist/chunks/desktop-1.1.22-wg1hxyyk.mjs +1 -0
- package/dist/chunks/detectRepository-1.1.22-pn2g27hr.mjs +1 -0
- package/dist/chunks/detection-1.1.22-s8r50ft4.mjs +1 -0
- package/dist/chunks/diff-1.1.22-6sdsv83f.mjs +1 -0
- package/dist/chunks/doctor-1.1.22-cj56pasy.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-1.1.22-ezjhg329.mjs +1 -0
- package/dist/chunks/earlyInput-1.1.22-k4tqtjbb.mjs +1 -0
- package/dist/chunks/effort-1.1.22-eztddah9.mjs +13 -0
- package/dist/chunks/engine-1.1.22-6wrga0yh.mjs +1 -0
- package/dist/chunks/envLessBridgeConfig-1.1.22-9jm3xgge.mjs +1 -0
- package/dist/chunks/envUtils-1.1.22-7qb9fr3c.mjs +1 -0
- package/dist/chunks/environmentSelection-1.1.22-4xy91rp5.mjs +1 -0
- package/dist/chunks/environments-1.1.22-ke6dvmrb.mjs +1 -0
- package/dist/chunks/errors-1.1.22-rgsmtg01.mjs +1 -0
- package/dist/chunks/exampleCommands-1.1.22-xv4kj009.mjs +1 -0
- package/dist/chunks/execFileNoThrow-1.1.22-m7ndjwpq.mjs +1 -0
- package/dist/chunks/exit-1.1.22-m0bm4f9d.mjs +1 -0
- package/dist/chunks/explorer-1.1.22-jsrgxmw0.mjs +1 -0
- package/dist/chunks/export-1.1.22-s0m4af77.mjs +2 -0
- package/dist/chunks/extra-usage-1.1.22-9sdr6tyh.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-1.1.22-9k857j7m.mjs +1 -0
- package/dist/chunks/fast-1.1.22-3w3eg6gc.mjs +1 -0
- package/dist/chunks/feedback-1.1.22-7jr2gbzj.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-1.1.22-08zb6ajr.mjs +1 -0
- package/dist/chunks/git-1.1.22-m66s3f9x.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-1.1.22-2r1deqm3.mjs +1 -0
- package/dist/chunks/goal-1.1.22-60jn1knb.mjs +4 -0
- package/dist/chunks/growthbook-1.1.22-jnddje2q.mjs +1 -0
- package/dist/chunks/headless-1.1.22-jc8xk2dj.mjs +2 -0
- package/dist/chunks/heapdump-1.1.22-h87tv4ay.mjs +6 -0
- package/dist/chunks/help-1.1.22-hkgcwycs.mjs +1 -0
- package/dist/chunks/hookChains-1.1.22-hjjsdtfz.mjs +3 -0
- package/dist/chunks/hooks-1.1.22-d51y91pz.mjs +79 -0
- package/dist/chunks/hooks-1.1.22-knpyhzjq.mjs +1 -0
- package/dist/chunks/ide-1.1.22-0tqwa732.mjs +3 -0
- package/dist/chunks/image-processor-napi-1.1.22-6qd4v6hf.mjs +1 -0
- package/dist/chunks/inboundAttachments-1.1.22-gvb5zry4.mjs +1 -0
- package/dist/chunks/index-1.1.22-19x2126b.mjs +30 -0
- package/dist/chunks/index-1.1.22-28fcrc19.mjs +9 -0
- package/dist/chunks/index-1.1.22-2ea02rg7.mjs +1 -0
- package/dist/chunks/index-1.1.22-2rc4s1ea.mjs +1 -0
- package/dist/chunks/index-1.1.22-33ka1vh2.mjs +1 -0
- package/dist/chunks/index-1.1.22-3sbe52mk.mjs +1 -0
- package/dist/chunks/index-1.1.22-3ze6s7jh.mjs +1 -0
- package/dist/chunks/index-1.1.22-45fydkr4.mjs +1 -0
- package/dist/chunks/index-1.1.22-4jyb49wh.mjs +5 -0
- package/dist/chunks/index-1.1.22-53bbsdht.mjs +23 -0
- package/dist/chunks/index-1.1.22-6dbeceeq.mjs +1 -0
- package/dist/chunks/index-1.1.22-8dntbh7a.mjs +1 -0
- package/dist/chunks/index-1.1.22-8kjk15ba.mjs +1 -0
- package/dist/chunks/index-1.1.22-an0gp01d.mjs +1 -0
- package/dist/chunks/index-1.1.22-cnbxnqdc.mjs +1 -0
- package/dist/chunks/index-1.1.22-fpsntg6z.mjs +1 -0
- package/dist/chunks/index-1.1.22-fv3cwfqb.mjs +1 -0
- package/dist/chunks/index-1.1.22-hjp106ay.mjs +1 -0
- package/dist/chunks/index-1.1.22-njczpq0j.mjs +9 -0
- package/dist/chunks/index-1.1.22-zeprwv8d.mjs +2 -0
- package/dist/chunks/index-1.1.22-zmmyfbe7.mjs +1 -0
- package/dist/chunks/index-1.1.22-zssja3p2.mjs +2 -0
- package/dist/chunks/index-1.1.22-zw38mh26.mjs +1 -0
- package/dist/chunks/init-1.1.22-xnq27h0g.mjs +1 -0
- package/dist/chunks/initReplBridge-1.1.22-y1d60qz3.mjs +1 -0
- package/dist/chunks/ink-1.1.22-k48q879m.mjs +1 -0
- package/dist/chunks/insights-1.1.22-a1cvbm3p.mjs +870 -0
- package/dist/chunks/install-1.1.22-jbzmqsdp.mjs +1 -0
- package/dist/chunks/install-github-app-1.1.22-8a3hpgxj.mjs +149 -0
- package/dist/chunks/install-slack-app-1.1.22-rt6z32mx.mjs +1 -0
- package/dist/chunks/instrumentation-1.1.22-z450bn0g.mjs +1 -0
- package/dist/chunks/interactiveHelpers-1.1.22-6ks3mty3.mjs +1 -0
- package/dist/chunks/keybindings-1.1.22-g9y42jd0.mjs +2 -0
- package/dist/chunks/knowledge-1.1.22-9pnvwgtc.mjs +2 -0
- package/dist/chunks/latestVersionCache-1.1.22-qt6jab06.mjs +1 -0
- package/dist/chunks/loadAgentsDir-1.1.22-sq4k9pva.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.1.22-vshz13qp.mjs +1 -0
- package/dist/chunks/log-1.1.22-e7ksty3v.mjs +1 -0
- package/dist/chunks/main-1.1.22-6td1g6n1.mjs +1 -0
- package/dist/chunks/managedEnv-1.1.22-htj06t2x.mjs +1 -0
- package/dist/chunks/mcp-1.1.22-18h7drd2.mjs +17 -0
- package/dist/chunks/mcp-1.1.22-ezfae103.mjs +1 -0
- package/dist/chunks/mcp-1.1.22-s120rv95.mjs +4 -0
- package/dist/chunks/mcpb-1.1.22-vm6h475e.mjs +1 -0
- package/dist/chunks/memory-1.1.22-e0tx5g0m.mjs +72 -0
- package/dist/chunks/model-1.1.22-jpnba4j9.mjs +2 -0
- package/dist/chunks/model-1.1.22-ptaehfsq.mjs +1 -0
- package/dist/chunks/node-1.1.22-n2j0h224.mjs +14 -0
- package/dist/chunks/oauth-1.1.22-xryjmqvy.mjs +1 -0
- package/dist/chunks/openaiShim-1.1.22-5g2mvrb0.mjs +14 -0
- package/dist/chunks/output-style-1.1.22-15avrxe6.mjs +1 -0
- package/dist/chunks/package-ZOVFJE7Z-1.1.22-74v22202.mjs +1 -0
- package/dist/chunks/parseConnectUrl-1.1.22-th9g7k2v.mjs +1 -0
- package/dist/chunks/parser-1.1.22-f76s0696.mjs +1 -0
- package/dist/chunks/passes-1.1.22-5067sbnv.mjs +1 -0
- package/dist/chunks/permissions-1.1.22-jq3s11rr.mjs +3 -0
- package/dist/chunks/permissions-1.1.22-yjbnyvja.mjs +1 -0
- package/dist/chunks/plan-1.1.22-a0v77tas.mjs +1 -0
- package/dist/chunks/plist-1.1.22-stjt7ne7.mjs +1 -0
- package/dist/chunks/plugin-1.1.22-ccc18w6d.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-1.1.22-6w6xqk0q.mjs +1 -0
- package/dist/chunks/plugins-1.1.22-14tg96p5.mjs +9 -0
- package/dist/chunks/preActionHook-1.1.22-w8y973hr.mjs +2 -0
- package/dist/chunks/print-1.1.22-fj5my0gp.mjs +57 -0
- package/dist/chunks/process-1.1.22-5ehjyzp9.mjs +1 -0
- package/dist/chunks/processBashCommand-1.1.22-rfx8p83z.mjs +1 -0
- package/dist/chunks/processSlashCommand-1.1.22-zz4rg3b9.mjs +9 -0
- package/dist/chunks/prompt-1.1.22-1k2zk0wc.mjs +1 -0
- package/dist/chunks/prompt-1.1.22-dnwycjh5.mjs +1 -0
- package/dist/chunks/prompts-1.1.22-4p4a5se6.mjs +1 -0
- package/dist/chunks/protocolHandler-1.1.22-cs8w65fv.mjs +13 -0
- package/dist/chunks/provider-1.1.22-bn5s7tah.mjs +2 -0
- package/dist/chunks/providerProfiles-1.1.22-pymtgbvs.mjs +1 -0
- package/dist/chunks/providerValidation-1.1.22-c7c5hbxa.mjs +6 -0
- package/dist/chunks/rate-limit-options-1.1.22-w2qffppm.mjs +1 -0
- package/dist/chunks/registerSubcommands-1.1.22-ab4qb34w.mjs +26 -0
- package/dist/chunks/registry-1.1.22-nsm8d8eb.mjs +1 -0
- package/dist/chunks/release-notes-1.1.22-8x23myzn.mjs +5 -0
- package/dist/chunks/reload-plugins-1.1.22-ak7jhwx7.mjs +2 -0
- package/dist/chunks/remote-env-1.1.22-x7trmcqx.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-1.1.22-hbz0g8ya.mjs +1 -0
- package/dist/chunks/remoteSession-1.1.22-f6jb57v7.mjs +1 -0
- package/dist/chunks/rename-1.1.22-xe35q0k0.mjs +1 -0
- package/dist/chunks/replBridgeHandle-1.1.22-fhwjkdxg.mjs +1 -0
- package/dist/chunks/replLauncher-1.1.22-vv0a8mm6.mjs +1 -0
- package/dist/chunks/resume-1.1.22-2sa8hbck.mjs +2 -0
- package/dist/chunks/rewind-1.1.22-9p74phfv.mjs +1 -0
- package/dist/chunks/rootOptions-1.1.22-d6srkssk.mjs +1 -0
- package/dist/chunks/runWorkflowHeadless-1.1.22-g8m5b1gg.mjs +10 -0
- package/dist/chunks/sandbox-adapter-1.1.22-xfg2fsw2.mjs +1 -0
- package/dist/chunks/sandbox-toggle-1.1.22-dtc44mq5.mjs +1 -0
- package/dist/chunks/session-1.1.22-3tjyetra.mjs +2 -0
- package/dist/chunks/sessionDiscovery-1.1.22-33mn13e8.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-1.1.22-d3bejz9v.mjs +1 -0
- package/dist/chunks/sessionStorage-1.1.22-j74sh7m1.mjs +1 -0
- package/dist/chunks/settings-1.1.22-nkarfvpa.mjs +1 -0
- package/dist/chunks/setup-1.1.22-qcehqed4.mjs +12 -0
- package/dist/chunks/sinks-1.1.22-cq9rny33.mjs +1 -0
- package/dist/chunks/skills-1.1.22-ekjpttza.mjs +1 -0
- package/dist/chunks/startupProfiler-1.1.22-9fngk9y1.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-1.1.22-d1k95rad.mjs +1 -0
- package/dist/chunks/state-1.1.22-jwyx08g8.mjs +1 -0
- package/dist/chunks/stats-1.1.22-gbms572d.mjs +6 -0
- package/dist/chunks/status-1.1.22-k6tz1204.mjs +1 -0
- package/dist/chunks/stickers-1.1.22-0p5wcv91.mjs +1 -0
- package/dist/chunks/subprocessEnv-1.1.22-8nw03e6a.mjs +1 -0
- package/dist/chunks/tasks-1.1.22-j3tvhmzv.mjs +1 -0
- package/dist/chunks/teamHelpers-1.1.22-9h9wz2vt.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-1.1.22-az279j20.mjs +1 -0
- package/dist/chunks/teleport-1.1.22-x65tzb7k.mjs +1 -0
- package/dist/chunks/terminalSetup-1.1.22-mgtn4k1h.mjs +1 -0
- package/dist/chunks/theme-1.1.22-ytcpmqf6.mjs +1 -0
- package/dist/chunks/thinkback-1.1.22-r3tqf574.mjs +1 -0
- package/dist/chunks/thinkback-play-1.1.22-gy5pmk8r.mjs +1 -0
- package/dist/chunks/toolPool-1.1.22-enzkj5fj.mjs +1 -0
- package/dist/chunks/toolSearch-1.1.22-nks2rxm6.mjs +1 -0
- package/dist/chunks/tools-1.1.22-vngj7bpe.mjs +1 -0
- package/dist/chunks/trustedDevice-1.1.22-521tzk05.mjs +1 -0
- package/dist/chunks/turndown.cjs-1.1.22-thexftmp.mjs +69 -0
- package/dist/chunks/types-1.1.22-jp8m10f1.mjs +1 -0
- package/dist/chunks/ultrareviewCommand-1.1.22-tjrn8agz.mjs +4 -0
- package/dist/chunks/update-1.1.22-n10ztshv.mjs +72 -0
- package/dist/chunks/upgrade-1.1.22-e0pjbtcd.mjs +1 -0
- package/dist/chunks/upload-1.1.22-e00jdttg.mjs +7 -0
- package/dist/chunks/upstreamproxy-1.1.22-1qmxkbg7.mjs +14 -0
- package/dist/chunks/url-handler-napi-1.1.22-jj7mv0bn.mjs +1 -0
- package/dist/chunks/usage-1.1.22-s54ykz8x.mjs +1 -0
- package/dist/chunks/util-1.1.22-wntx1394.mjs +1 -0
- package/dist/chunks/utils-1.1.22-wmew7b5j.mjs +1 -0
- package/dist/chunks/vim-1.1.22-qddsv4he.mjs +1 -0
- package/dist/chunks/watchLoop-1.1.22-1z60qm0a.mjs +13 -0
- package/dist/chunks/watcher-1.1.22-100q2zbm.mjs +1 -0
- package/dist/chunks/wiki-1.1.22-akk70ycq.mjs +132 -0
- package/dist/chunks/workflows-1.1.22-ed33rwny.mjs +1 -0
- package/dist/chunks/worktree-1.1.22-f3b1rr0f.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-1.1.22-taeyewr8.mjs +1 -0
- package/dist/chunks/wrapper-1.1.22-hayqq9zr.mjs +7 -0
- package/dist/cli.mjs +2 -2
- package/package.json +9 -9
- package/dist/chunks/AgentTool-1.1.20-gy68hszg.mjs +0 -1
- package/dist/chunks/App-1.1.20-10ggpxf4.mjs +0 -1
- package/dist/chunks/ApproveApiKey-1.1.20-6y0zcy4y.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-1.1.20-yebtqpwm.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-1.1.20-4t2txe84.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-1.1.20-6w697wvx.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.20-c3kyqfq3.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1.1.20-87nay89d.mjs +0 -1
- package/dist/chunks/DiffDialog-1.1.20-wcg0gh1k.mjs +0 -6
- package/dist/chunks/Doctor-1.1.20-gq08p6c4.mjs +0 -1
- package/dist/chunks/ExplorerDialog-1.1.20-njwmt292.mjs +0 -6
- package/dist/chunks/ITermBackend-1.1.20-86szt9a8.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-1.1.20-yw03wzhm.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-1.1.20-b8bpx0av.mjs +0 -1
- package/dist/chunks/MigrationDialog-1.1.20-xc1ete3w.mjs +0 -1
- package/dist/chunks/Onboarding-1.1.20-ytp8f67t.mjs +0 -1
- package/dist/chunks/ProviderManager-1.1.20-qvj570ty.mjs +0 -1
- package/dist/chunks/REPL-1.1.20-1wqc3hyp.mjs +0 -1
- package/dist/chunks/ResumeConversation-1.1.20-78gpsm6z.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-1.1.20-qzvapr16.mjs +0 -1
- package/dist/chunks/TeleportProgress-1.1.20-tjphzty6.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.20-d63k8snr.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-1.1.20-k1pa6f9a.mjs +0 -1
- package/dist/chunks/TmuxBackend-1.1.20-8mc5wrxb.mjs +0 -9
- package/dist/chunks/ToolSearchTool-1.1.20-xkwtgqwd.mjs +0 -1
- package/dist/chunks/TrustDialog-1.1.20-7p5t0a25.mjs +0 -1
- package/dist/chunks/activeProvider-1.1.20-n88f7vxe.mjs +0 -1
- package/dist/chunks/add-dir-1.1.20-mkjy6mne.mjs +0 -1
- package/dist/chunks/agentTypes-1.1.20-mf4dz2fp.mjs +0 -1
- package/dist/chunks/agents-1.1.20-eb13erze.mjs +0 -110
- package/dist/chunks/agents-1.1.20-ps3c6vj2.mjs +0 -3
- package/dist/chunks/api-1.1.20-11grpy2c.mjs +0 -1
- package/dist/chunks/asciicast-1.1.20-bqm28655.mjs +0 -1
- package/dist/chunks/assistant-1.1.20-xny4y49f.mjs +0 -1
- package/dist/chunks/auth-1.1.20-kyscffqe.mjs +0 -1
- package/dist/chunks/auth-1.1.20-ygabh4dg.mjs +0 -1
- package/dist/chunks/autoMode-1.1.20-6ehbhthd.mjs +0 -52
- package/dist/chunks/autoModeSetup-1.1.20-skjmdzhq.mjs +0 -44
- package/dist/chunks/autoUpdater-1.1.20-n7vch4bv.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-1.1.20-a3snmx4e.mjs +0 -1
- package/dist/chunks/branch-1.1.20-849br2fw.mjs +0 -4
- package/dist/chunks/bridge-1.1.20-ec0z61jb.mjs +0 -2
- package/dist/chunks/bridgeConfig-1.1.20-wks1jhmc.mjs +0 -1
- package/dist/chunks/bridgeEnabled-1.1.20-1nza3j0t.mjs +0 -1
- package/dist/chunks/bridgeMain-1.1.20-6dks41qc.mjs +0 -88
- package/dist/chunks/bridgePointer-1.1.20-tecp8fmk.mjs +0 -1
- package/dist/chunks/btw-1.1.20-mdw6bncw.mjs +0 -1
- package/dist/chunks/buddy-1.1.20-cmmgv2nf.mjs +0 -3
- package/dist/chunks/cache-probe-1.1.20-62xx6y5w.mjs +0 -21
- package/dist/chunks/cacheStats-1.1.20-j7kbrtbn.mjs +0 -4
- package/dist/chunks/caches-1.1.20-ykvsw24v.mjs +0 -1
- package/dist/chunks/claudeDesktop-1.1.20-dhcfye38.mjs +0 -1
- package/dist/chunks/claudemd-1.1.20-0km3pc8d.mjs +0 -1
- package/dist/chunks/clear-1.1.20-rkzhan9n.mjs +0 -1
- package/dist/chunks/clearTerminal-1.1.20-h9nb94gb.mjs +0 -1
- package/dist/chunks/cli-1.1.20-003ssrqs.mjs +0 -2
- package/dist/chunks/cli-1.1.20-08kdg42c.mjs +0 -2
- package/dist/chunks/cli-1.1.20-0a8jwwrh.mjs +0 -2
- package/dist/chunks/cli-1.1.20-0cxx0azc.mjs +0 -2
- package/dist/chunks/cli-1.1.20-0hr449k2.mjs +0 -6
- package/dist/chunks/cli-1.1.20-0yjr70td.mjs +0 -2
- package/dist/chunks/cli-1.1.20-11yx2x29.mjs +0 -2
- package/dist/chunks/cli-1.1.20-14z9f90d.mjs +0 -4
- package/dist/chunks/cli-1.1.20-16js342k.mjs +0 -3
- package/dist/chunks/cli-1.1.20-1804zgnt.mjs +0 -2
- package/dist/chunks/cli-1.1.20-1axwpgex.mjs +0 -3
- package/dist/chunks/cli-1.1.20-1jzypzba.mjs +0 -2
- package/dist/chunks/cli-1.1.20-2189wy4p.mjs +0 -2
- package/dist/chunks/cli-1.1.20-25hfpkfc.mjs +0 -34
- package/dist/chunks/cli-1.1.20-28njwehy.mjs +0 -2
- package/dist/chunks/cli-1.1.20-2c8v6etd.mjs +0 -2
- package/dist/chunks/cli-1.1.20-2c9529sa.mjs +0 -4
- package/dist/chunks/cli-1.1.20-2epx2qhj.mjs +0 -4
- package/dist/chunks/cli-1.1.20-2kmxyr07.mjs +0 -2
- package/dist/chunks/cli-1.1.20-2tzzh4zx.mjs +0 -3
- package/dist/chunks/cli-1.1.20-2xfbht26.mjs +0 -2
- package/dist/chunks/cli-1.1.20-3awkxvmy.mjs +0 -2
- package/dist/chunks/cli-1.1.20-3d1z8rpz.mjs +0 -58
- package/dist/chunks/cli-1.1.20-3xgnb054.mjs +0 -2
- package/dist/chunks/cli-1.1.20-3xt27qam.mjs +0 -2
- package/dist/chunks/cli-1.1.20-3ya9b3gp.mjs +0 -2
- package/dist/chunks/cli-1.1.20-41jpan4m.mjs +0 -2
- package/dist/chunks/cli-1.1.20-44e5kpwx.mjs +0 -8
- package/dist/chunks/cli-1.1.20-456jkny0.mjs +0 -2
- package/dist/chunks/cli-1.1.20-45ymf6ss.mjs +0 -2
- package/dist/chunks/cli-1.1.20-4dnyt1jx.mjs +0 -2
- package/dist/chunks/cli-1.1.20-4fckza8j.mjs +0 -133
- package/dist/chunks/cli-1.1.20-4ns5w1w9.mjs +0 -2
- package/dist/chunks/cli-1.1.20-4rera9rk.mjs +0 -2
- package/dist/chunks/cli-1.1.20-4rzj958h.mjs +0 -2
- package/dist/chunks/cli-1.1.20-4t5sspt7.mjs +0 -2
- package/dist/chunks/cli-1.1.20-4wm04f49.mjs +0 -2
- package/dist/chunks/cli-1.1.20-50162v14.mjs +0 -2
- package/dist/chunks/cli-1.1.20-62a99cp9.mjs +0 -2
- package/dist/chunks/cli-1.1.20-6ev0yp0d.mjs +0 -6
- package/dist/chunks/cli-1.1.20-6jbvby2b.mjs +0 -20
- package/dist/chunks/cli-1.1.20-6xmv43xj.mjs +0 -3
- package/dist/chunks/cli-1.1.20-6yk3v95f.mjs +0 -39
- package/dist/chunks/cli-1.1.20-70wc36rc.mjs +0 -2
- package/dist/chunks/cli-1.1.20-751bmsqk.mjs +0 -2
- package/dist/chunks/cli-1.1.20-7732c5qg.mjs +0 -2
- package/dist/chunks/cli-1.1.20-7c1w166r.mjs +0 -2
- package/dist/chunks/cli-1.1.20-7rxmh5n8.mjs +0 -3
- package/dist/chunks/cli-1.1.20-7v6hhn2t.mjs +0 -2
- package/dist/chunks/cli-1.1.20-80v7e5s8.mjs +0 -2
- package/dist/chunks/cli-1.1.20-83btfm1z.mjs +0 -2
- package/dist/chunks/cli-1.1.20-83vhyp8j.mjs +0 -2
- package/dist/chunks/cli-1.1.20-8kjhy0wv.mjs +0 -2
- package/dist/chunks/cli-1.1.20-8s1w9hdq.mjs +0 -2
- package/dist/chunks/cli-1.1.20-93dztzcq.mjs +0 -2
- package/dist/chunks/cli-1.1.20-9c4avkb0.mjs +0 -2
- package/dist/chunks/cli-1.1.20-9g552760.mjs +0 -2
- package/dist/chunks/cli-1.1.20-9h5643kr.mjs +0 -2
- package/dist/chunks/cli-1.1.20-9nj6n1xg.mjs +0 -2
- package/dist/chunks/cli-1.1.20-9p9rns5w.mjs +0 -2
- package/dist/chunks/cli-1.1.20-9sv4xcek.mjs +0 -2
- package/dist/chunks/cli-1.1.20-a9fgbqdg.mjs +0 -2
- package/dist/chunks/cli-1.1.20-admbe52d.mjs +0 -2
- package/dist/chunks/cli-1.1.20-ahqsg433.mjs +0 -2
- package/dist/chunks/cli-1.1.20-atv9jh9v.mjs +0 -2
- package/dist/chunks/cli-1.1.20-azb7xdf4.mjs +0 -2
- package/dist/chunks/cli-1.1.20-b09qhwrn.mjs +0 -2
- package/dist/chunks/cli-1.1.20-b0ehcdrw.mjs +0 -18
- package/dist/chunks/cli-1.1.20-bbb9fqyn.mjs +0 -2
- package/dist/chunks/cli-1.1.20-bgbsr3de.mjs +0 -3
- package/dist/chunks/cli-1.1.20-bk95x5hv.mjs +0 -25
- package/dist/chunks/cli-1.1.20-bs9520ht.mjs +0 -2
- package/dist/chunks/cli-1.1.20-c2g9cejz.mjs +0 -2
- package/dist/chunks/cli-1.1.20-cbehaby4.mjs +0 -2
- package/dist/chunks/cli-1.1.20-cfbterne.mjs +0 -2
- package/dist/chunks/cli-1.1.20-cgqjf8mh.mjs +0 -6
- package/dist/chunks/cli-1.1.20-chzjjxkj.mjs +0 -2
- package/dist/chunks/cli-1.1.20-ckdgd8ze.mjs +0 -45
- package/dist/chunks/cli-1.1.20-csmgax19.mjs +0 -21
- package/dist/chunks/cli-1.1.20-d3ep1y0e.mjs +0 -3
- package/dist/chunks/cli-1.1.20-d5yrsevx.mjs +0 -2
- package/dist/chunks/cli-1.1.20-d6ghx4vg.mjs +0 -15
- package/dist/chunks/cli-1.1.20-d7jg0nb4.mjs +0 -24
- package/dist/chunks/cli-1.1.20-dhn7hn4q.mjs +0 -12
- package/dist/chunks/cli-1.1.20-dhqn7976.mjs +0 -2
- package/dist/chunks/cli-1.1.20-dws48g78.mjs +0 -2
- package/dist/chunks/cli-1.1.20-e49ygqc9.mjs +0 -2
- package/dist/chunks/cli-1.1.20-edmcts0d.mjs +0 -15
- package/dist/chunks/cli-1.1.20-ef6rjnnr.mjs +0 -2
- package/dist/chunks/cli-1.1.20-emfhskxb.mjs +0 -7
- package/dist/chunks/cli-1.1.20-emjnkdmv.mjs +0 -1
- package/dist/chunks/cli-1.1.20-eza9aynd.mjs +0 -2
- package/dist/chunks/cli-1.1.20-ezsprsc5.mjs +0 -2
- package/dist/chunks/cli-1.1.20-f55khzsq.mjs +0 -25
- package/dist/chunks/cli-1.1.20-far01hg1.mjs +0 -42
- package/dist/chunks/cli-1.1.20-ffffyhx3.mjs +0 -3
- package/dist/chunks/cli-1.1.20-fwfjvfmd.mjs +0 -12
- package/dist/chunks/cli-1.1.20-g0w1ksxt.mjs +0 -2
- package/dist/chunks/cli-1.1.20-g41hgcbn.mjs +0 -2
- package/dist/chunks/cli-1.1.20-g68fwrp1.mjs +0 -2
- package/dist/chunks/cli-1.1.20-gd4g9gr0.mjs +0 -3
- package/dist/chunks/cli-1.1.20-geey2q0s.mjs +0 -2
- package/dist/chunks/cli-1.1.20-ghdeh455.mjs +0 -2
- package/dist/chunks/cli-1.1.20-gkc4ptt0.mjs +0 -6
- package/dist/chunks/cli-1.1.20-gmw9jarz.mjs +0 -2
- package/dist/chunks/cli-1.1.20-gtk0ea9e.mjs +0 -2
- package/dist/chunks/cli-1.1.20-h5qtp5v0.mjs +0 -4
- package/dist/chunks/cli-1.1.20-hnvxzngf.mjs +0 -24
- package/dist/chunks/cli-1.1.20-hrw31bb0.mjs +0 -206
- package/dist/chunks/cli-1.1.20-hw1raza2.mjs +0 -2
- package/dist/chunks/cli-1.1.20-j1r8r4kb.mjs +0 -2
- package/dist/chunks/cli-1.1.20-j4a7q58c.mjs +0 -2
- package/dist/chunks/cli-1.1.20-jerx0cvb.mjs +0 -9
- package/dist/chunks/cli-1.1.20-jm6p2cdx.mjs +0 -2
- package/dist/chunks/cli-1.1.20-jsasy45b.mjs +0 -2
- package/dist/chunks/cli-1.1.20-jwgjrhwv.mjs +0 -17
- package/dist/chunks/cli-1.1.20-jy9v0t3f.mjs +0 -5
- package/dist/chunks/cli-1.1.20-k31p3ab5.mjs +0 -2
- package/dist/chunks/cli-1.1.20-ka6crh5z.mjs +0 -2
- package/dist/chunks/cli-1.1.20-kbw4j273.mjs +0 -3
- package/dist/chunks/cli-1.1.20-kdcqs5pc.mjs +0 -2
- package/dist/chunks/cli-1.1.20-keawhead.mjs +0 -5
- package/dist/chunks/cli-1.1.20-kmjn4pys.mjs +0 -2
- package/dist/chunks/cli-1.1.20-kqncmabm.mjs +0 -4
- package/dist/chunks/cli-1.1.20-m1j9gb5j.mjs +0 -2
- package/dist/chunks/cli-1.1.20-m1rmtfx0.mjs +0 -2
- package/dist/chunks/cli-1.1.20-m90d7k90.mjs +0 -133
- package/dist/chunks/cli-1.1.20-m9x20s8d.mjs +0 -2
- package/dist/chunks/cli-1.1.20-mg71dz16.mjs +0 -2
- package/dist/chunks/cli-1.1.20-mmvz3csm.mjs +0 -2
- package/dist/chunks/cli-1.1.20-mtdrx7xp.mjs +0 -2
- package/dist/chunks/cli-1.1.20-n0e2f4pd.mjs +0 -2
- package/dist/chunks/cli-1.1.20-n23sb1sw.mjs +0 -2
- package/dist/chunks/cli-1.1.20-n9ja4mee.mjs +0 -66
- package/dist/chunks/cli-1.1.20-nbpvejz7.mjs +0 -2
- package/dist/chunks/cli-1.1.20-nk2jvm1z.mjs +0 -2
- package/dist/chunks/cli-1.1.20-nkrcdd4b.mjs +0 -2
- package/dist/chunks/cli-1.1.20-nmnzdvrw.mjs +0 -2
- package/dist/chunks/cli-1.1.20-nqwt6n3q.mjs +0 -2
- package/dist/chunks/cli-1.1.20-p0jj07wv.mjs +0 -2
- package/dist/chunks/cli-1.1.20-pfqkbt31.mjs +0 -2
- package/dist/chunks/cli-1.1.20-pg7cfgsa.mjs +0 -2
- package/dist/chunks/cli-1.1.20-psbfz74f.mjs +0 -2
- package/dist/chunks/cli-1.1.20-py0s55wt.mjs +0 -2
- package/dist/chunks/cli-1.1.20-q4bfnf9w.mjs +0 -2
- package/dist/chunks/cli-1.1.20-qbmhpfn5.mjs +0 -15
- package/dist/chunks/cli-1.1.20-qkdde9ck.mjs +0 -2
- package/dist/chunks/cli-1.1.20-r4xfymtx.mjs +0 -60
- package/dist/chunks/cli-1.1.20-r55gwcq5.mjs +0 -2
- package/dist/chunks/cli-1.1.20-r7y2pq10.mjs +0 -2
- package/dist/chunks/cli-1.1.20-rdjbzkh4.mjs +0 -2
- package/dist/chunks/cli-1.1.20-rmvq7swt.mjs +0 -2
- package/dist/chunks/cli-1.1.20-rsrj8q6n.mjs +0 -3
- package/dist/chunks/cli-1.1.20-rvch3wwj.mjs +0 -2
- package/dist/chunks/cli-1.1.20-rvn2axad.mjs +0 -16
- package/dist/chunks/cli-1.1.20-ry7grtff.mjs +0 -2
- package/dist/chunks/cli-1.1.20-ryb6r2jj.mjs +0 -2
- package/dist/chunks/cli-1.1.20-se0125ky.mjs +0 -2
- package/dist/chunks/cli-1.1.20-snwfck2n.mjs +0 -2
- package/dist/chunks/cli-1.1.20-swewj6d5.mjs +0 -2
- package/dist/chunks/cli-1.1.20-sx7811qs.mjs +0 -5419
- package/dist/chunks/cli-1.1.20-sykpdv9k.mjs +0 -4
- package/dist/chunks/cli-1.1.20-t4zen7fz.mjs +0 -2
- package/dist/chunks/cli-1.1.20-t9y64aq1.mjs +0 -2
- package/dist/chunks/cli-1.1.20-tbtnrzgn.mjs +0 -6
- package/dist/chunks/cli-1.1.20-tgpt56rj.mjs +0 -2
- package/dist/chunks/cli-1.1.20-thtv1xqb.mjs +0 -2
- package/dist/chunks/cli-1.1.20-twysxm6j.mjs +0 -2
- package/dist/chunks/cli-1.1.20-txm7z2xq.mjs +0 -2
- package/dist/chunks/cli-1.1.20-ty0gqe2q.mjs +0 -2
- package/dist/chunks/cli-1.1.20-v6kdm8qp.mjs +0 -2
- package/dist/chunks/cli-1.1.20-vf1ea98p.mjs +0 -2
- package/dist/chunks/cli-1.1.20-vxrv3y7w.mjs +0 -9
- package/dist/chunks/cli-1.1.20-w24tmpq4.mjs +0 -7
- package/dist/chunks/cli-1.1.20-w6gv2drs.mjs +0 -2
- package/dist/chunks/cli-1.1.20-wadq5w8t.mjs +0 -2
- package/dist/chunks/cli-1.1.20-we3ekctq.mjs +0 -2
- package/dist/chunks/cli-1.1.20-wn9t9syd.mjs +0 -2
- package/dist/chunks/cli-1.1.20-wr994817.mjs +0 -18
- package/dist/chunks/cli-1.1.20-wrat5rtg.mjs +0 -2
- package/dist/chunks/cli-1.1.20-wszdp4dg.mjs +0 -3
- package/dist/chunks/cli-1.1.20-wt0ygwrd.mjs +0 -6
- package/dist/chunks/cli-1.1.20-wtxwvcad.mjs +0 -4
- package/dist/chunks/cli-1.1.20-wx90y3jb.mjs +0 -24
- package/dist/chunks/cli-1.1.20-wxxphhy4.mjs +0 -2
- package/dist/chunks/cli-1.1.20-wz4h58mp.mjs +0 -2
- package/dist/chunks/cli-1.1.20-x2y5vr9b.mjs +0 -3
- package/dist/chunks/cli-1.1.20-x3cdhjtp.mjs +0 -24
- package/dist/chunks/cli-1.1.20-x3sn0d4f.mjs +0 -2
- package/dist/chunks/cli-1.1.20-x4ezs1pz.mjs +0 -2
- package/dist/chunks/cli-1.1.20-xk4edb6r.mjs +0 -3
- package/dist/chunks/cli-1.1.20-xkatp3rd.mjs +0 -2
- package/dist/chunks/cli-1.1.20-xmkwnf9c.mjs +0 -2
- package/dist/chunks/cli-1.1.20-xvytevdy.mjs +0 -4
- package/dist/chunks/cli-1.1.20-y4b0v8se.mjs +0 -50
- package/dist/chunks/cli-1.1.20-y9jwxk0y.mjs +0 -17
- package/dist/chunks/cli-1.1.20-yh2kxsxg.mjs +0 -4
- package/dist/chunks/cli-1.1.20-yq2kjrr2.mjs +0 -2
- package/dist/chunks/cli-1.1.20-z4ndf118.mjs +0 -2
- package/dist/chunks/cli-1.1.20-zgg887a7.mjs +0 -4
- package/dist/chunks/cli-1.1.20-zhn44mv6.mjs +0 -2
- package/dist/chunks/cli-1.1.20-zvce3e9x.mjs +0 -2
- package/dist/chunks/client-1.1.20-yzk4md3m.mjs +0 -1
- package/dist/chunks/color-1.1.20-nvfrt651.mjs +0 -1
- package/dist/chunks/compact-1.1.20-t1p5wzzx.mjs +0 -3
- package/dist/chunks/config-1.1.20-f5vnf3mj.mjs +0 -1
- package/dist/chunks/config-1.1.20-fyrs9k0m.mjs +0 -1
- package/dist/chunks/constants-1.1.20-2p88w4e8.mjs +0 -1
- package/dist/chunks/context-1.1.20-q5c07f98.mjs +0 -1
- package/dist/chunks/context-noninteractive-1.1.20-m97bd3hc.mjs +0 -1
- package/dist/chunks/conversation-1.1.20-2tdp5wat.mjs +0 -1
- package/dist/chunks/copilotHeaders-1.1.20-6bf1fkfp.mjs +0 -1
- package/dist/chunks/copy-1.1.20-jx18zafs.mjs +0 -9
- package/dist/chunks/cost-1.1.20-cvh7ag89.mjs +0 -1
- package/dist/chunks/createSSHSession-1.1.20-yrms9nqw.mjs +0 -1
- package/dist/chunks/createSession-1.1.20-c72cffnc.mjs +0 -1
- package/dist/chunks/debug-1.1.20-2fqdvvvc.mjs +0 -1
- package/dist/chunks/defaultActionDeps-1.1.20-hwtzy20f.mjs +0 -1534
- package/dist/chunks/desktop-1.1.20-mgz7c45r.mjs +0 -1
- package/dist/chunks/detectRepository-1.1.20-d5fezv23.mjs +0 -1
- package/dist/chunks/detection-1.1.20-b17bg403.mjs +0 -1
- package/dist/chunks/diff-1.1.20-rgydsj6p.mjs +0 -1
- package/dist/chunks/doctor-1.1.20-jk5ar7pz.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-1.1.20-0q5qfybh.mjs +0 -1
- package/dist/chunks/earlyInput-1.1.20-w47zy9sy.mjs +0 -1
- package/dist/chunks/effort-1.1.20-hy8t94kh.mjs +0 -13
- package/dist/chunks/engine-1.1.20-4etdjq40.mjs +0 -1
- package/dist/chunks/envLessBridgeConfig-1.1.20-1c7pmf1x.mjs +0 -1
- package/dist/chunks/envUtils-1.1.20-8687estk.mjs +0 -1
- package/dist/chunks/environmentSelection-1.1.20-vtn95gpz.mjs +0 -1
- package/dist/chunks/environments-1.1.20-n27s3sfh.mjs +0 -1
- package/dist/chunks/errors-1.1.20-a30dbhvw.mjs +0 -1
- package/dist/chunks/exampleCommands-1.1.20-97zbp5r8.mjs +0 -1
- package/dist/chunks/execFileNoThrow-1.1.20-zvnsd219.mjs +0 -1
- package/dist/chunks/exit-1.1.20-g7dar7aa.mjs +0 -1
- package/dist/chunks/explorer-1.1.20-m606rm48.mjs +0 -1
- package/dist/chunks/export-1.1.20-mgwvg841.mjs +0 -2
- package/dist/chunks/extra-usage-1.1.20-baf3f8zp.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-1.1.20-60c2b66b.mjs +0 -1
- package/dist/chunks/fast-1.1.20-0cv5rvjb.mjs +0 -1
- package/dist/chunks/feedback-1.1.20-cn6v1mdj.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-1.1.20-26b3hvex.mjs +0 -1
- package/dist/chunks/git-1.1.20-16amvfft.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-1.1.20-g1tq2ecq.mjs +0 -1
- package/dist/chunks/goal-1.1.20-k5akp14a.mjs +0 -4
- package/dist/chunks/growthbook-1.1.20-yrs6qd7c.mjs +0 -1
- package/dist/chunks/headless-1.1.20-ab6xrkks.mjs +0 -2
- package/dist/chunks/heapdump-1.1.20-7ty4e4da.mjs +0 -6
- package/dist/chunks/help-1.1.20-drmq3b45.mjs +0 -1
- package/dist/chunks/hookChains-1.1.20-9xe50nmq.mjs +0 -3
- package/dist/chunks/hooks-1.1.20-ea0rjbyd.mjs +0 -1
- package/dist/chunks/hooks-1.1.20-h3ac1ems.mjs +0 -79
- package/dist/chunks/ide-1.1.20-e5k4xqrh.mjs +0 -3
- package/dist/chunks/image-processor-napi-1.1.20-yxmq33b1.mjs +0 -1
- package/dist/chunks/inboundAttachments-1.1.20-2e8y4p87.mjs +0 -1
- package/dist/chunks/index-1.1.20-2gxqgc08.mjs +0 -1
- package/dist/chunks/index-1.1.20-3vkfmzw3.mjs +0 -30
- package/dist/chunks/index-1.1.20-7esm5m4s.mjs +0 -23
- package/dist/chunks/index-1.1.20-bszeeg1q.mjs +0 -1
- package/dist/chunks/index-1.1.20-cv1fhrne.mjs +0 -1
- package/dist/chunks/index-1.1.20-e27z5gwd.mjs +0 -1
- package/dist/chunks/index-1.1.20-hzw72qk9.mjs +0 -1
- package/dist/chunks/index-1.1.20-mmt768hj.mjs +0 -5
- package/dist/chunks/index-1.1.20-ms7qs4m6.mjs +0 -1
- package/dist/chunks/index-1.1.20-nkjdz68f.mjs +0 -1
- package/dist/chunks/index-1.1.20-ptjvr4qj.mjs +0 -1
- package/dist/chunks/index-1.1.20-qa9tjj42.mjs +0 -2
- package/dist/chunks/index-1.1.20-r3h0dypg.mjs +0 -1
- package/dist/chunks/index-1.1.20-rcx2fneb.mjs +0 -1
- package/dist/chunks/index-1.1.20-rdm3n4y9.mjs +0 -2
- package/dist/chunks/index-1.1.20-rm6ekqj7.mjs +0 -9
- package/dist/chunks/index-1.1.20-s7fb4knz.mjs +0 -1
- package/dist/chunks/index-1.1.20-s7x9dsyr.mjs +0 -1
- package/dist/chunks/index-1.1.20-t9j801bt.mjs +0 -9
- package/dist/chunks/index-1.1.20-vvmarmb0.mjs +0 -1
- package/dist/chunks/index-1.1.20-w3efr5jj.mjs +0 -1
- package/dist/chunks/index-1.1.20-y78x64xh.mjs +0 -1
- package/dist/chunks/index-1.1.20-z42w2g06.mjs +0 -1
- package/dist/chunks/init-1.1.20-1md8nn1q.mjs +0 -1
- package/dist/chunks/initReplBridge-1.1.20-5zfa29sw.mjs +0 -1
- package/dist/chunks/ink-1.1.20-4rp0112s.mjs +0 -1
- package/dist/chunks/insights-1.1.20-fs1yxv8w.mjs +0 -870
- package/dist/chunks/install-1.1.20-g8hq9z8r.mjs +0 -1
- package/dist/chunks/install-github-app-1.1.20-t1etxwvv.mjs +0 -149
- package/dist/chunks/install-slack-app-1.1.20-x4r2g8jm.mjs +0 -1
- package/dist/chunks/instrumentation-1.1.20-8axp9w08.mjs +0 -1
- package/dist/chunks/interactiveHelpers-1.1.20-w1c5qa1c.mjs +0 -1
- package/dist/chunks/keybindings-1.1.20-t46j6vqd.mjs +0 -2
- package/dist/chunks/knowledge-1.1.20-fay2dby4.mjs +0 -2
- package/dist/chunks/latestVersionCache-1.1.20-18wdnnqq.mjs +0 -1
- package/dist/chunks/loadAgentsDir-1.1.20-ja86yn75.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.1.20-rpwz8enf.mjs +0 -1
- package/dist/chunks/log-1.1.20-jab23qgp.mjs +0 -1
- package/dist/chunks/main-1.1.20-1tszrrj3.mjs +0 -1
- package/dist/chunks/managedEnv-1.1.20-jhwtkzzq.mjs +0 -1
- package/dist/chunks/mcp-1.1.20-b3j31d37.mjs +0 -17
- package/dist/chunks/mcp-1.1.20-ggtdpb22.mjs +0 -4
- package/dist/chunks/mcp-1.1.20-r35rcax5.mjs +0 -1
- package/dist/chunks/mcpb-1.1.20-nmxsjrst.mjs +0 -1
- package/dist/chunks/memory-1.1.20-2fbhrnrk.mjs +0 -72
- package/dist/chunks/model-1.1.20-2nstg3gs.mjs +0 -2
- package/dist/chunks/model-1.1.20-ag4na6w9.mjs +0 -1
- package/dist/chunks/node-1.1.20-7meq917d.mjs +0 -14
- package/dist/chunks/oauth-1.1.20-xkcs3s0v.mjs +0 -1
- package/dist/chunks/openaiShim-1.1.20-1jxfjf9e.mjs +0 -14
- package/dist/chunks/output-style-1.1.20-m38djt42.mjs +0 -1
- package/dist/chunks/package-ZOVFJE7Z-1.1.20-83n7wkxr.mjs +0 -1
- package/dist/chunks/parseConnectUrl-1.1.20-372zdrpd.mjs +0 -1
- package/dist/chunks/parser-1.1.20-gxyz7x28.mjs +0 -1
- package/dist/chunks/passes-1.1.20-ytgbf2dw.mjs +0 -1
- package/dist/chunks/permissions-1.1.20-s9ae41qy.mjs +0 -3
- package/dist/chunks/permissions-1.1.20-y9c9w35s.mjs +0 -1
- package/dist/chunks/plan-1.1.20-wbg3rbe5.mjs +0 -1
- package/dist/chunks/plist-1.1.20-ammve61n.mjs +0 -1
- package/dist/chunks/plugin-1.1.20-kprz45ck.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-1.1.20-0s19k556.mjs +0 -1
- package/dist/chunks/plugins-1.1.20-zcnf29dz.mjs +0 -9
- package/dist/chunks/preActionHook-1.1.20-q1vqezxz.mjs +0 -2
- package/dist/chunks/print-1.1.20-jtj5dvm1.mjs +0 -57
- package/dist/chunks/process-1.1.20-gvna1rw4.mjs +0 -1
- package/dist/chunks/processBashCommand-1.1.20-4gf4hf9q.mjs +0 -1
- package/dist/chunks/processSlashCommand-1.1.20-x7cpvyb1.mjs +0 -9
- package/dist/chunks/prompt-1.1.20-44tt0aay.mjs +0 -1
- package/dist/chunks/prompt-1.1.20-kd8b5z70.mjs +0 -1
- package/dist/chunks/prompts-1.1.20-p30n6333.mjs +0 -1
- package/dist/chunks/protocolHandler-1.1.20-k4c3bckj.mjs +0 -13
- package/dist/chunks/provider-1.1.20-x6r7w9y0.mjs +0 -2
- package/dist/chunks/providerProfiles-1.1.20-qr1eh5g1.mjs +0 -1
- package/dist/chunks/providerValidation-1.1.20-whqrd8y7.mjs +0 -6
- package/dist/chunks/rate-limit-options-1.1.20-hjftrz50.mjs +0 -1
- package/dist/chunks/registerSubcommands-1.1.20-rspt0fgv.mjs +0 -26
- package/dist/chunks/registry-1.1.20-0mggqvzs.mjs +0 -1
- package/dist/chunks/release-notes-1.1.20-vb0mr5sj.mjs +0 -5
- package/dist/chunks/reload-plugins-1.1.20-vh7daesv.mjs +0 -2
- package/dist/chunks/remote-env-1.1.20-sarjwtd8.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-1.1.20-wn384wtw.mjs +0 -1
- package/dist/chunks/remoteSession-1.1.20-v6xk4jcm.mjs +0 -1
- package/dist/chunks/rename-1.1.20-f8mjn6dk.mjs +0 -1
- package/dist/chunks/replBridgeHandle-1.1.20-rgnef71a.mjs +0 -1
- package/dist/chunks/replLauncher-1.1.20-gtmq90n0.mjs +0 -1
- package/dist/chunks/resume-1.1.20-6azc4a6d.mjs +0 -2
- package/dist/chunks/rewind-1.1.20-y79g5sa8.mjs +0 -1
- package/dist/chunks/rootOptions-1.1.20-j01mdex3.mjs +0 -1
- package/dist/chunks/runWorkflowHeadless-1.1.20-rjt6cc5k.mjs +0 -10
- package/dist/chunks/sandbox-adapter-1.1.20-2fy5bxtc.mjs +0 -1
- package/dist/chunks/sandbox-toggle-1.1.20-3fhx4jz1.mjs +0 -1
- package/dist/chunks/session-1.1.20-56bsxwcm.mjs +0 -2
- package/dist/chunks/sessionDiscovery-1.1.20-5awvar7p.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-1.1.20-p0m1trtr.mjs +0 -1
- package/dist/chunks/sessionStorage-1.1.20-kzwv0rca.mjs +0 -1
- package/dist/chunks/settings-1.1.20-qq5nh010.mjs +0 -1
- package/dist/chunks/setup-1.1.20-rxx0xk5h.mjs +0 -12
- package/dist/chunks/sinks-1.1.20-r3j94336.mjs +0 -1
- package/dist/chunks/skills-1.1.20-rj3k67vs.mjs +0 -1
- package/dist/chunks/startupProfiler-1.1.20-28r68j3h.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-1.1.20-na2gc2z0.mjs +0 -1
- package/dist/chunks/state-1.1.20-87k38gkf.mjs +0 -1
- package/dist/chunks/stats-1.1.20-4f0k42ck.mjs +0 -6
- package/dist/chunks/status-1.1.20-4q8drpbw.mjs +0 -1
- package/dist/chunks/stickers-1.1.20-6zrpy168.mjs +0 -1
- package/dist/chunks/subprocessEnv-1.1.20-ay4xqbmj.mjs +0 -1
- package/dist/chunks/tasks-1.1.20-94bxr0pm.mjs +0 -1
- package/dist/chunks/teamHelpers-1.1.20-2wx4ycs3.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-1.1.20-84jswprz.mjs +0 -1
- package/dist/chunks/teleport-1.1.20-szer4192.mjs +0 -1
- package/dist/chunks/terminalSetup-1.1.20-6c6rr077.mjs +0 -1
- package/dist/chunks/theme-1.1.20-h0j5bxzv.mjs +0 -1
- package/dist/chunks/thinkback-1.1.20-xx7byjz0.mjs +0 -1
- package/dist/chunks/thinkback-play-1.1.20-y7e52jdn.mjs +0 -1
- package/dist/chunks/toolPool-1.1.20-3z7k5za6.mjs +0 -1
- package/dist/chunks/toolSearch-1.1.20-60qd9jdb.mjs +0 -1
- package/dist/chunks/tools-1.1.20-x11zs4y1.mjs +0 -1
- package/dist/chunks/trustedDevice-1.1.20-2xcp041p.mjs +0 -1
- package/dist/chunks/turndown.cjs-1.1.20-cvck081c.mjs +0 -69
- package/dist/chunks/types-1.1.20-143w1akg.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-1.1.20-0ahamh6w.mjs +0 -4
- package/dist/chunks/update-1.1.20-yy0y40m9.mjs +0 -72
- package/dist/chunks/upgrade-1.1.20-wk6398hc.mjs +0 -1
- package/dist/chunks/upload-1.1.20-x7890nxj.mjs +0 -7
- package/dist/chunks/upstreamproxy-1.1.20-9fag2s50.mjs +0 -14
- package/dist/chunks/url-handler-napi-1.1.20-98f7t8ex.mjs +0 -1
- package/dist/chunks/usage-1.1.20-x3t5jqtp.mjs +0 -1
- package/dist/chunks/util-1.1.20-6yg0jab0.mjs +0 -1
- package/dist/chunks/utils-1.1.20-eextgt51.mjs +0 -1
- package/dist/chunks/vim-1.1.20-45mkg766.mjs +0 -1
- package/dist/chunks/watchLoop-1.1.20-m6zydt8m.mjs +0 -13
- package/dist/chunks/watcher-1.1.20-qtj8t09d.mjs +0 -1
- package/dist/chunks/wiki-1.1.20-3mvcvdfe.mjs +0 -132
- package/dist/chunks/workflows-1.1.20-19kpvc6v.mjs +0 -1
- package/dist/chunks/worktree-1.1.20-mj9bm0pg.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-1.1.20-gyvs55qh.mjs +0 -1
- package/dist/chunks/wrapper-1.1.20-8rckzejb.mjs +0 -7
- /package/dist/chunks/{cli-1.1.20-cypawma9.mjs → cli-1.1.22-08c4ym21.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.20-sfrzvte7.mjs → cli-1.1.22-as944wt5.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.20-nr5scd4y.mjs → cli-1.1.22-ccg6dy3s.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.20-c0p4wjw7.mjs → cli-1.1.22-kqk323ja.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.20-c4ktmkk3.mjs → cli-1.1.22-nv9q4jrr.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.20-0sgvc4nn.mjs → cli-1.1.22-w09pyst3.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.20-e4h3mrxr.mjs → cli-1.1.22-ws6y62na.mjs} +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import{pta as u7,rta as u$,tta as C,uta as YZ}from"./cli-1.1.20-0sgvc4nn.mjs";function G(Z,$,X,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 $==="function"?Z!==$||!z:!$.has(Z))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?z.call(Z,X):z?z.value=X:$.set(Z,X),X}function Y(Z,$,X,J){if(X==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof $==="function"?Z!==$||!J:!$.has(Z))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?J:X==="a"?J.call(Z):J?J.value:$.get(Z)}var zZ=()=>{};function OZ(Z){return typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name==="AbortError"||("message"in Z)&&String(Z.message).includes("FetchRequestCanceledException"))}var tZ=(Z)=>{if(Z instanceof Error)return Z;if(typeof Z==="object"&&Z!==null){try{if(Object.prototype.toString.call(Z)==="[object Error]"){let $=Error(Z.message,Z.cause?{cause:Z.cause}:{});if(Z.stack)$.stack=Z.stack;if(Z.cause&&!$.cause)$.cause=Z.cause;if(Z.name)$.name=Z.name;return $}}catch{}try{return Error(JSON.stringify(Z))}catch{}}return Error(Z)};var hZ=()=>{};var H,_,s,RZ,l0,w$,i0,n0,a0,r0,o0,t0,s0,e0;var m=C(()=>{hZ();H=class H extends Error{};_=class _ extends H{constructor(Z,$,X,J,z){super(`${_.makeMessage(Z,$,X)}`);this.status=Z,this.headers=J,this.requestID=J?.get("request-id"),this.workspaceID=J?.get("anthropic-workspace-id"),this.error=$,this.type=z??null}static makeMessage(Z,$,X){let J=$?.message?typeof $.message==="string"?$.message:JSON.stringify($.message):$?JSON.stringify($):X;if(Z&&J)return`${Z} ${J}`;if(Z)return`${Z} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate(Z,$,X,J){if(!Z||!J)return new RZ({message:X,cause:tZ($)});let z=$,K=z?.error?.type;if(Z===400)return new i0(Z,z,X,J,K);if(Z===401)return new n0(Z,z,X,J,K);if(Z===403)return new a0(Z,z,X,J,K);if(Z===404)return new r0(Z,z,X,J,K);if(Z===409)return new o0(Z,z,X,J,K);if(Z===422)return new t0(Z,z,X,J,K);if(Z===429)return new s0(Z,z,X,J,K);if(Z>=500)return new e0(Z,z,X,J,K);return new _(Z,z,X,J,K)}};s=class s extends _{constructor({message:Z}={}){super(void 0,void 0,Z||"Request was aborted.",void 0)}};RZ=class RZ extends _{constructor({message:Z,cause:$}){super(void 0,void 0,Z||"Connection error.",void 0);if($)this.cause=$}};l0=class l0 extends RZ{constructor({message:Z}={}){super({message:Z??"Request timed out."})}};w$=class w$ extends H{constructor(Z,{cause:$}={}){super(Z??"Retryable error.");if($!==void 0)this.cause=$}};i0=class i0 extends _{};n0=class n0 extends _{};a0=class a0 extends _{};r0=class r0 extends _{};o0=class o0 extends _{};t0=class t0 extends _{};s0=class s0 extends _{};e0=class e0 extends _{}});var gZ;var Z8=C(()=>{gZ=class gZ extends Error{constructor(Z){let $=typeof Z==="string"?Z:Z.map((X)=>{if(X.type==="text")return X.text;return`[${X.type}]`}).join(" ");super($);this.name="ToolError",this.content=Z}}});function S4(Z,$){if(!(Z>=L4))throw new H(`${$} must be at least ${L4}ms (got ${Z}); to run without memory sync, pass \`memorySyncIntervalMs: null\` to the worker instead`)}var $J=15000,L4=5000;var E4=C(()=>{m()});function EX(){let Z,$;return{promise:new Promise((J,z)=>{Z=J,$=z}),resolve:Z,reject:$}}var F4=()=>{};var U0=function(){let{crypto:Z}=globalThis;if(Z?.randomUUID)return U0=Z.randomUUID.bind(Z),Z.randomUUID();let $=new Uint8Array(1),X=Z?()=>Z.getRandomValues($)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^X()&15>>+J/4).toString(16))};var G$=()=>{};function $8(Z){if(typeof Z!=="object")return{};return Z??{}}function RX(Z){if(!Z)return!0;for(let $ in Z)return!1;return!0}function I4(Z,$){return Object.prototype.hasOwnProperty.call(Z,$)}function IX(Z){return Z!=null&&typeof Z==="object"&&!Array.isArray(Z)}var i9,R4=(Z)=>{return i9.test(Z)},e=(Z)=>(e=Array.isArray,e(Z)),FX,P4=(Z,$)=>{if(typeof $!=="number"||!Number.isInteger($))throw new H(`${Z} must be an integer`);if($<0)throw new H(`${Z} must be a positive integer`);return $},X8=(Z)=>{try{return JSON.parse(Z)}catch($){return}};var wZ=C(()=>{m();i9=/^[a-z][a-z0-9+.-]*:/i,FX=e});var BZ=(Z,$)=>new Promise((X)=>{if($?.aborted)return X();let J=()=>{clearTimeout(z),X()},z=setTimeout(()=>{$?.removeEventListener("abort",J),X()},Z);$?.addEventListener("abort",J,{once:!0})});var O0=()=>{};var GZ="0.120.0";var J8=()=>{};function n9(){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 r9(){if(typeof navigator>"u"||!navigator)return null;let Z=[{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:$,pattern:X}of Z){let J=X.exec(navigator.userAgent);if(J){let z=J[1]||0,K=J[2]||0,V=J[3]||0;return{browser:$,version:`${z}.${K}.${V}`}}}return null}var b4=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},a9=()=>{let Z=n9();if(Z==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":GZ,"X-Stainless-OS":k4(Deno.build.os),"X-Stainless-Arch":y4(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":GZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(Z==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":GZ,"X-Stainless-OS":k4(globalThis.process.platform??"unknown"),"X-Stainless-Arch":y4(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let $=r9();if($)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":GZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${$.browser}`,"X-Stainless-Runtime-Version":$.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":GZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},y4=(Z)=>{if(Z==="x32")return"x32";if(Z==="x86_64"||Z==="x64")return"x64";if(Z==="arm")return"arm";if(Z==="aarch64"||Z==="arm64")return"arm64";if(Z)return`other:${Z}`;return"unknown"},k4=(Z)=>{if(Z=Z.toLowerCase(),Z.includes("ios"))return"iOS";if(Z==="android")return"Android";if(Z==="darwin")return"MacOS";if(Z==="win32")return"Windows";if(Z==="freebsd")return"FreeBSD";if(Z==="openbsd")return"OpenBSD";if(Z==="linux")return"Linux";if(Z)return`Other:${Z}`;return"Unknown"},f4,z8=()=>{return f4??(f4=a9())};var q$=C(()=>{J8()});function o9(Z,$){return()=>Z.removeEventListener("abort",$)}function g4(Z,$,X){C$.set(Z,o9($,X))}function v4(Z,$){if(C$.has($))h4?.register(Z,$,$)}function jZ(Z){let $=C$.get(Z);if($)C$.delete(Z),h4?.unregister(Z),$()}var C$,h4;var M$=C(()=>{C$=new WeakMap,h4=typeof globalThis.FinalizationRegistry==="function"?new globalThis.FinalizationRegistry((Z)=>jZ(Z)):null});function _4(){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 PX(...Z){let $=globalThis.ReadableStream;if(typeof $>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new $(...Z)}function H$(Z){let $=Symbol.asyncIterator in Z?Z[Symbol.asyncIterator]():Z[Symbol.iterator]();return PX({start(){},async pull(X){let{done:J,value:z}=await $.next();if(J)X.close();else X.enqueue(z)},async cancel(){await $.return?.()}})}function Y8(Z){if(Z[Symbol.asyncIterator])return Z;let $=Z.getReader();return{async next(){try{let X=await $.read();if(X?.done)$.releaseLock();return X}catch(X){throw $.releaseLock(),X}},async return(){let X=$.cancel();return $.releaseLock(),await X,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function m4(Z){if(Z===null||typeof Z!=="object")return;if(Z[Symbol.asyncIterator]){await Z[Symbol.asyncIterator]().return?.();return}let $=Z.getReader(),X=$.cancel();$.releaseLock(),await X}var w0=()=>{};var u4=({headers:Z,body:$})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify($)}};var yX=()=>{};var kX="RFC3986",fX=(Z)=>String(Z),bX,c4="RFC1738";var hX=C(()=>{bX={RFC1738:(Z)=>String(Z).replace(/%20/g,"+"),RFC3986:fX}});function p4(Z){if(!Z||typeof Z!=="object")return!1;return!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function vX(Z,$){if(e(Z)){let X=[];for(let J=0;J<Z.length;J+=1)X.push($(Z[J]));return X}return $(Z)}var B$=(Z,$)=>(B$=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),B$(Z,$)),LZ,gX=1024,d4=(Z,$,X,J,z)=>{if(Z.length===0)return Z;let K=Z;if(typeof Z==="symbol")K=Symbol.prototype.toString.call(Z);else if(typeof Z!=="string")K=String(Z);if(X==="iso-8859-1")return escape(K).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});let V="";for(let Q=0;Q<K.length;Q+=gX){let U=K.length>=gX?K.slice(Q,Q+gX):K,q=[];for(let x=0;x<U.length;++x){let w=U.charCodeAt(x);if(w===45||w===46||w===95||w===126||w>=48&&w<=57||w>=65&&w<=90||w>=97&&w<=122||z===c4&&(w===40||w===41)){q[q.length]=U.charAt(x);continue}if(w<128){q[q.length]=LZ[w];continue}if(w<2048){q[q.length]=LZ[192|w>>6]+LZ[128|w&63];continue}if(w<55296||w>=57344){q[q.length]=LZ[224|w>>12]+LZ[128|w>>6&63]+LZ[128|w&63];continue}x+=1,w=65536+((w&1023)<<10|U.charCodeAt(x)&1023),q[q.length]=LZ[240|w>>18]+LZ[128|w>>12&63]+LZ[128|w>>6&63]+LZ[128|w&63]}V+=q.join("")}return V};var l4=C(()=>{hX();wZ();LZ=(()=>{let Z=[];for(let $=0;$<256;++$)Z.push("%"+(($<16?"0":"")+$.toString(16)).toUpperCase());return Z})()});function e9(Z){return typeof Z==="string"||typeof Z==="number"||typeof Z==="boolean"||typeof Z==="symbol"||typeof Z==="bigint"}function r4(Z,$,X,J,z,K,V,Q,U,q,x,w,N,M,B,E,D,j){let T=Z,L=j,F=0,f=!1;while((L=L.get(_X))!==void 0&&!f){let l=L.get(Z);if(F+=1,typeof l<"u")if(l===F)throw RangeError("Cyclic object value");else f=!0;if(typeof L.get(_X)>"u")F=0}if(typeof q==="function")T=q($,T);else if(T instanceof Date)T=N?.(T);else if(X==="comma"&&e(T))T=vX(T,function(l){if(l instanceof Date)return N?.(l);return l});if(T===null){if(K)return U&&!E?U($,o.encoder,D,"key",M):$;T=""}if(e9(T)||p4(T)){if(U){let l=E?$:U($,o.encoder,D,"key",M);return[B?.(l)+"="+B?.(U(T,o.encoder,D,"value",M))]}return[B?.($)+"="+B?.(String(T))]}let g=[];if(typeof T>"u")return g;let v;if(X==="comma"&&e(T)){if(E&&U)T=vX(T,U);v=[{value:T.length>0?T.join(",")||null:void 0}]}else if(e(q))v=q;else{let l=Object.keys(T);v=x?l.sort(x):l}let n=Q?String($).replace(/\./g,"%2E"):String($),u=J&&e(T)&&T.length===1?n+"[]":n;if(z&&e(T)&&T.length===0)return u+"[]";for(let l=0;l<v.length;++l){let UZ=v[l],oZ=typeof UZ==="object"&&typeof UZ.value<"u"?UZ.value:T[UZ];if(V&&oZ===null)continue;let SX=w&&Q?UZ.replace(/\./g,"%2E"):UZ,p9=e(T)?typeof X==="function"?X(u,SX):u:u+(w?"."+SX:"["+SX+"]");j.set(Z,F);let j4=new WeakMap;j4.set(_X,j),a4(g,r4(oZ,p9,X,J,z,K,V,Q,X==="comma"&&E&&e(T)?null:U,q,x,w,N,M,B,E,D,j4))}return g}function Z7(Z=o){if(typeof Z.allowEmptyArrays<"u"&&typeof Z.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof Z.encodeDotInKeys<"u"&&typeof Z.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(Z.encoder!==null&&typeof Z.encoder<"u"&&typeof Z.encoder!=="function")throw TypeError("Encoder has to be a function.");let $=Z.charset||o.charset;if(typeof Z.charset<"u"&&Z.charset!=="utf-8"&&Z.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let X=kX;if(typeof Z.format<"u"){if(!B$(bX,Z.format))throw TypeError("Unknown format option provided.");X=Z.format}let J=bX[X],z=o.filter;if(typeof Z.filter==="function"||e(Z.filter))z=Z.filter;let K;if(Z.arrayFormat&&Z.arrayFormat in n4)K=Z.arrayFormat;else if("indices"in Z)K=Z.indices?"indices":"repeat";else K=o.arrayFormat;if("commaRoundTrip"in Z&&typeof Z.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");let V=typeof Z.allowDots>"u"?!!Z.encodeDotInKeys===!0?!0:o.allowDots:!!Z.allowDots;return{addQueryPrefix:typeof Z.addQueryPrefix==="boolean"?Z.addQueryPrefix:o.addQueryPrefix,allowDots:V,allowEmptyArrays:typeof Z.allowEmptyArrays==="boolean"?!!Z.allowEmptyArrays:o.allowEmptyArrays,arrayFormat:K,charset:$,charsetSentinel:typeof Z.charsetSentinel==="boolean"?Z.charsetSentinel:o.charsetSentinel,commaRoundTrip:!!Z.commaRoundTrip,delimiter:typeof Z.delimiter>"u"?o.delimiter:Z.delimiter,encode:typeof Z.encode==="boolean"?Z.encode:o.encode,encodeDotInKeys:typeof Z.encodeDotInKeys==="boolean"?Z.encodeDotInKeys:o.encodeDotInKeys,encoder:typeof Z.encoder==="function"?Z.encoder:o.encoder,encodeValuesOnly:typeof Z.encodeValuesOnly==="boolean"?Z.encodeValuesOnly:o.encodeValuesOnly,filter:z,format:X,formatter:J,serializeDate:typeof Z.serializeDate==="function"?Z.serializeDate:o.serializeDate,skipNulls:typeof Z.skipNulls==="boolean"?Z.skipNulls:o.skipNulls,sort:typeof Z.sort==="function"?Z.sort:null,strictNullHandling:typeof Z.strictNullHandling==="boolean"?Z.strictNullHandling:o.strictNullHandling}}function o4(Z,$={}){let X=Z,J=Z7($),z,K;if(typeof J.filter==="function")K=J.filter,X=K("",X);else if(e(J.filter))K=J.filter,z=K;let V=[];if(typeof X!=="object"||X===null)return"";let Q=n4[J.arrayFormat],U=Q==="comma"&&J.commaRoundTrip;if(!z)z=Object.keys(X);if(J.sort)z.sort(J.sort);let q=new WeakMap;for(let N=0;N<z.length;++N){let M=z[N];if(J.skipNulls&&X[M]===null)continue;a4(V,r4(X[M],M,Q,U,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 x=V.join(J.delimiter),w=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")w+="utf8=%26%2310003%3B&";else w+="utf8=%E2%9C%93&";return x.length>0?w+x:""}var n4,a4=function(Z,$){Array.prototype.push.apply(Z,e($)?$:[$])},i4,o,_X;var t4=C(()=>{l4();hX();wZ();n4={brackets(Z){return String(Z)+"[]"},comma:"comma",indices(Z,$){return String(Z)+"["+$+"]"},repeat(Z){return String(Z)}},o={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:d4,encodeValuesOnly:!1,format:kX,formatter:fX,indices:!1,serializeDate(Z){return(i4??(i4=Function.prototype.call.bind(Date.prototype.toISOString)))(Z)},skipNulls:!1,strictNullHandling:!1};_X={}});function s4(Z){return o4(Z,{arrayFormat:"brackets"})}var mX=C(()=>{t4()});function T$(Z){if(!Z)return;let $;try{$=new URL(Z)}catch(J){throw new h(`Invalid token endpoint base URL "${Z}": ${J}`)}if($.protocol==="https:")return;let X=$.hostname.toLowerCase().replace(/^\[|\]$/g,"");if($.protocol==="http:"&&(X==="localhost"||X==="127.0.0.1"||X==="::1"))return;throw new h(`Refusing to send credential over non-https token endpoint "${Z}"`)}async function A$(Z,$){let X=await J7(Z),J;try{J=JSON.parse(X)}catch{throw new h(`Token endpoint returned non-JSON response (status ${Z.status})`,Z.status,$Z(X),$)}if(!J.access_token)throw new h(`Token endpoint response missing access_token: ${JSON.stringify($Z(J))}`,Z.status,$Z(J),$);if(J.token_type&&J.token_type.toLowerCase()!=="bearer")throw new h(`Token endpoint response: unsupported token_type "${J.token_type}" (want Bearer)`,Z.status,$Z(J),$);return J}function $Z(Z){if(Z==null)return Z;if(typeof Z==="string"){let $;try{$=JSON.parse(Z)}catch{if(Z.length<=uX)return Z;return Z.slice(0,uX)+`... <${Z.length-uX} more chars>`}return JSON.stringify($Z($))}if(typeof Z==="object"&&!Array.isArray(Z)){let $={};for(let[X,J]of Object.entries(Z))if(X7.has(X))$[X]=J;return $}return null}async function D$(Z,$=(X)=>console.warn(`anthropic-sdk: ${X}`)){if(typeof process>"u"||process.platform==="win32")return;let X=await import("node:fs"),J=Z,z;try{J=await X.promises.realpath(Z),z=await X.promises.stat(J)}catch{return}let K=z.mode&511;if(K&18)throw new h(`Credentials file at ${J} is group/world-writable (mode 0o${K.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(K&36)throw new h(`Credentials file at ${J} is group/world-readable (mode 0o${K.toString(8)}); run \`chmod 600 ${J}\` before retrying.`);if(typeof process.getuid==="function"&&z.uid!==process.getuid())$(`credentials file at ${J} is owned by uid ${z.uid} (current process uid ${process.getuid()}); verify this is intentional.`)}async function j$(Z,$){let X=await import("node:fs"),z=(await import("node:path")).dirname(Z);await X.promises.mkdir(z,{recursive:!0,mode:448});let K=`${Z}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let V=await X.promises.open(K,"w",384);try{await V.writeFile(JSON.stringify($,null,2)),await V.sync()}finally{await V.close()}await X.promises.rename(K,Z)}catch(V){throw await X.promises.unlink(K).catch(()=>{}),V}try{let V=await X.promises.open(z,"r");try{await V.sync()}finally{await V.close()}}catch{}}async function J7(Z){if(!Z.body)return"";let $=Z.body.getReader(),X=[],J=0;for(;;){let{done:K,value:V}=await $.read();if(K)break;if(J+V.length>e4){let Q=e4-J;if(Q>0)X.push(V.subarray(0,Q));await $.cancel();break}X.push(V),J+=V.length}let z;if(X.length===1)z=X[0];else{z=new Uint8Array(X.reduce((V,Q)=>V+Q.length,0));let K=0;for(let V of X)z.set(V,K),K+=V.length}return new TextDecoder("utf-8").decode(z)}var Z6="urn:ietf:params:oauth:grant-type:jwt-bearer",$6="refresh_token",x$="/v1/oauth/token",sZ="oauth-2025-04-20",X6="oidc-federation-2026-04-01",J6=120,G0=30,z6=5,e4=1048576,uX=2000,X7,h;var q0=C(()=>{m();X7=new Set(["error","error_description","error_uri"]);h=class h extends H{constructor(Z,$=null,X=null,J=null){super(Z);this.statusCode=$,this.body=X,this.requestId=J}}});function xZ(){return Math.floor(Date.now()/1000)}var K8=()=>{};class cX{constructor(Z,$){this.cached=null,this.pendingRefresh=null,this.nextForce=!1,this.lastAdvisoryError=0,this.provider=Z,this.onAdvisoryRefreshError=$}async getToken(){let Z=this.nextForce;this.nextForce=!1;let $=this.cached;if(Z||$==null)return(await this.refresh(Z)).token;if($.expiresAt==null)return $.token;let X=$.expiresAt-xZ();if(X>J6)return $.token;if(X>G0)return this.backgroundRefresh(),$.token;return(await this.refresh()).token}invalidate(){this.cached=null,this.nextForce=!0}refresh(Z=!1){if(this.pendingRefresh&&!Z)return this.pendingRefresh;return this.doRefresh(Z)}backgroundRefresh(){if(this.pendingRefresh)return;if(xZ()-this.lastAdvisoryError<z6)return;this.doRefresh().catch((Z)=>{this.lastAdvisoryError=xZ(),this.onAdvisoryRefreshError?.(Z)})}doRefresh(Z=!1){return this.pendingRefresh=this.provider(Z?{forceRefresh:!0}:void 0).then(($)=>{return this.cached=$,this.pendingRefresh=null,$},($)=>{throw this.pendingRefresh=null,$}),this.pendingRefresh}}var Y6=C(()=>{q0();K8()});var R=(Z)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[Z]?.trim()||void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(Z)?.trim()||void 0;return};var C0=()=>{};function V6(Z){let $=0;for(let z of Z)$+=z.length;let X=new Uint8Array($),J=0;for(let z of Z)X.set(z,J),J+=z.length;return X}function M0(Z){let $;return(K6??($=new globalThis.TextEncoder,K6=$.encode.bind($)))(Z)}function Q8(Z){let $;return(Q6??($=new globalThis.TextDecoder,Q6=$.decode.bind($)))(Z)}var K6,Q6;var V8=()=>{};var W6=(Z)=>{if(typeof globalThis.Buffer<"u"){let $=globalThis.Buffer.from(Z,"base64");return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}if(typeof atob<"u"){let $=atob(Z),X=new Uint8Array($.length);for(let J=0;J<$.length;J++)X[J]=$.charCodeAt(J);return X}throw new H("Cannot decode base64 string; Expected `Buffer` or `atob` to be defined")};var dX=C(()=>{m();V8()});function W8(){}function L$(Z,$,X){if(!$||S$[Z]>S$[X])return W8;else return $[Z].bind($)}function lX(Z,$){let X=N6.get(Z);if(X&&X[0]===$)return X[1];let J={error:L$("error",Z,$),warn:L$("warn",Z,$),info:L$("info",Z,$),debug:L$("debug",Z,$)};return N6.set(Z,[$,J]),J}function y(Z){let $=Z.logger,X=Z.logLevel??"off";if(!$)return z7;return lX($,X)}function O6(){let Z=R("ANTHROPIC_LOG");if(!pX||Z!==U6)U6=Z,pX=lX(console,E$(Z,"process.env['ANTHROPIC_LOG']",lX(console,N8))??N8);return pX}var N8="warn",S$,E$=(Z,$,X)=>{if(!Z)return;if(I4(S$,Z))return Z;X.warn(`${$} was set to ${JSON.stringify(Z)}, expected one of ${JSON.stringify(Object.keys(S$))}`);return},z7,N6,U6,pX,SZ=(Z)=>{if(Z.options)Z.options={...Z.options},delete Z.options.headers;if(Z.headers)Z.headers=Object.fromEntries((Z.headers instanceof Headers?[...Z.headers]:Object.entries(Z.headers)).map(([$,X])=>[$,$.toLowerCase()==="authorization"||$.toLowerCase()==="api-key"||$.toLowerCase()==="x-api-key"||$.toLowerCase()==="cookie"||$.toLowerCase()==="set-cookie"?"***":X]));if("retryOfRequestLogID"in Z){if(Z.retryOfRequestLogID)Z.retryOf=Z.retryOfRequestLogID;delete Z.retryOfRequestLogID}return Z};var IZ=C(()=>{wZ();C0();S$={off:0,error:200,warn:300,info:400,debug:500};z7={error:W8,warn:W8,info:W8,debug:W8},N6=new WeakMap});var w6=C(()=>{wZ();dX();C0();IZ();G$();O0();mX()});function G6(Z){if(!Z)throw Error("profile name is empty");if(Z==="."||Z==="..")throw Error(`profile name "${Z}" is not allowed`);if(Z.includes("/")||Z.includes("\\"))throw Error(`profile name "${Z}" must not contain path separators`);if(!Y7.test(Z))throw Error(`profile name "${Z}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var F$="1.0",Y7,q6=async(Z)=>{var $,X;let J=await iX();if(J===null)return null;let z=Z??await M6();if(z===null)return null;G6(z);let K=await import("node:fs"),Q=(await import("node:path")).join(J,"configs",`${z}.json`),U;try{U=await K.promises.readFile(Q,"utf-8")}catch(w){if(w?.code!=="ENOENT")throw Error(`failed to read config file ${Q}: ${w}`);U=null}if(U===null){let w=R("ANTHROPIC_ORGANIZATION_ID"),N=R("ANTHROPIC_IDENTITY_TOKEN_FILE"),M=R("ANTHROPIC_FEDERATION_RULE_ID");if(M&&w)return{fromFile:!1,config:{organization_id:w,workspace_id:R("ANTHROPIC_WORKSPACE_ID"),base_url:R("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:M,service_account_id:R("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:N?{source:"file",path:N}:void 0,scope:R("ANTHROPIC_SCOPE")}}};return null}let q;try{q=JSON.parse(U)}catch(w){throw Error(`failed to parse config file ${Q}: ${w}`)}if(!q.authentication)throw Error(`config file ${Q} is missing "authentication"`);let x=q.authentication.type;if(x!=="oidc_federation"&&x!=="user_oauth")throw Error(`authentication.type "${x}" is not a known authentication type`);if(q.organization_id??(q.organization_id=R("ANTHROPIC_ORGANIZATION_ID")),q.workspace_id??(q.workspace_id=R("ANTHROPIC_WORKSPACE_ID")),q.base_url??(q.base_url=R("ANTHROPIC_BASE_URL")),($=q.authentication).scope??($.scope=R("ANTHROPIC_SCOPE")),q.authentication.type==="oidc_federation"){if(!q.authentication.identity_token){let w=R("ANTHROPIC_IDENTITY_TOKEN_FILE");if(w)q.authentication.identity_token={source:"file",path:w}}if(!q.authentication.federation_rule_id)q.authentication.federation_rule_id=R("ANTHROPIC_FEDERATION_RULE_ID")??"";(X=q.authentication).service_account_id??(X.service_account_id=R("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:q,fromFile:!0}},C6=async(Z,$)=>{if(Z?.authentication.credentials_path)return Z.authentication.credentials_path;let X=await iX();if(!X)return null;let J=$??await M6();if(!J)return null;return G6(J),(await import("node:path")).join(X,"credentials",`${J}.json`)},iX=async()=>{if(!K7())return null;let Z=await import("node:path"),$=R("ANTHROPIC_CONFIG_DIR");if($)return $;if(z8()["X-Stainless-OS"]==="Windows"){let K=R("APPDATA");if(K)return Z.join(K,"Anthropic");let V=R("USERPROFILE");if(V)return Z.join(V,"AppData","Roaming","Anthropic");return null}let J=R("XDG_CONFIG_HOME");if(J)return Z.join(J,"anthropic");let z=R("HOME");if(z)return Z.join(z,".config","anthropic");return null},K7=()=>{let Z=z8()["X-Stainless-Runtime"];return Z==="node"||Z==="deno"},M6=async()=>{let Z=await iX();if(!Z)return null;let $=R("ANTHROPIC_PROFILE");if($)return $;let X=await import("node:fs"),z=(await import("node:path")).join(Z,"active_config");try{return(await X.promises.readFile(z,"utf-8")).trim()||"default"}catch(K){if(K?.code!=="ENOENT")throw Error(`failed to read ${z}: ${K}`);return"default"}};var nX=C(()=>{q$();w6();Y7=/^[A-Za-z0-9_.-]+$/});function aX(Z){if(!Z)throw new H("Identity token file path is empty");return async()=>{let $=await import("node:fs"),X;try{X=await $.promises.readFile(Z,"utf-8")}catch(z){throw new H(`Failed to read identity token file at ${Z}: ${z}`)}let J=X.trim();if(!J)throw new H(`Identity token file at ${Z} is empty`);return J}}function H6(Z){if(!Z)throw new H("Identity token value is empty");return()=>Z}var B6=C(()=>{m()});function x6(Z){return async()=>{T$(Z.baseURL);let $=await Z.identityTokenProvider();if($.length>16384)throw new h(`Identity token is ${Math.ceil($.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let X={grant_type:Z6,assertion:$,federation_rule_id:Z.federationRuleId,organization_id:Z.organizationId};if(Z.serviceAccountId)X.service_account_id=Z.serviceAccountId;if(Z.workspaceId)X.workspace_id=Z.workspaceId;let J=`${Z.baseURL}${x$}`,z;try{z=await Z.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${sZ},${X6}`,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${GZ} oidcFederationProvider`},body:JSON.stringify(X)})}catch(U){throw new h(`Failed to reach token endpoint ${J}: ${U}`)}let K=z.headers.get("Request-Id");if(!z.ok){let U=await z.text().catch(()=>""),q=$Z(U),x="";if(z.status===401)x=` Ensure your federation rule matches your identity token. ${Z.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 h(`Token exchange failed with status ${z.status}${K?` (request-id ${K})`:""}: ${q}${x}`,z.status,q,K)}let V=await A$(z,K),Q=Number(V.expires_in);if(!Number.isFinite(Q))throw new h(`Token endpoint response missing required fields: ${JSON.stringify($Z(V))}`,z.status,$Z(V),K);return{token:V.access_token,expiresAt:xZ()+Q}}}var T6=C(()=>{q0();K8();J8()});function A6(Z){return async($)=>{let X=await import("node:fs");await D$(Z.credentialsPath,Z.onSafetyWarning);let J;try{J=await X.promises.readFile(Z.credentialsPath,"utf-8")}catch(D){throw new h(`Credentials file not found at ${Z.credentialsPath}: ${D}`)}let z;try{z=JSON.parse(J)}catch(D){throw new h(`Credentials file at ${Z.credentialsPath} is not valid JSON: ${D}`)}let K=z.access_token;if(!K)throw new h(`Credentials file at ${Z.credentialsPath} must include 'access_token'`);let V=z.expires_at;if(!$?.forceRefresh&&(V==null||xZ()<V-G0))return{token:K,expiresAt:V??null};let Q=z.refresh_token;if(!Z.clientId||!Q)throw new h(`Access token at ${Z.credentialsPath} has expired and no refresh is available (client_id ${Z.clientId?"set":"empty"}, refresh_token ${Q?"set":"empty"})`);T$(Z.baseURL);let U={grant_type:$6,refresh_token:Q,client_id:Z.clientId},q=`${Z.baseURL}${x$}`,x;try{x=await Z.fetch(q,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":sZ,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${GZ} userOAuthProvider`},body:JSON.stringify(U)})}catch(D){throw new h(`User OAuth refresh failed to reach token endpoint: ${D}`)}let w=x.headers.get("Request-Id");if(!x.ok){let D=await x.text().catch(()=>"");throw new h(`User OAuth refresh failed (HTTP ${x.status}): ${$Z(D)}`,x.status,$Z(D),w)}let N=await A$(x,w),M=Number(N.expires_in);if(!Number.isFinite(M))throw new h(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify($Z(N))}`,x.status,$Z(N),w);let B=xZ()+M,E=N.refresh_token||Q;return await j$(Z.credentialsPath,{...z,version:F$,type:"oauth_token",access_token:N.access_token,expires_at:B,refresh_token:E}),{token:N.access_token,expiresAt:B}}}var D6=C(()=>{nX();q0();K8();J8()});function rX(Z,$){let X=Z.authentication.credentials_path??null,J=(Z.base_url||$.baseURL).replace(/\/+$/,""),z=Q7(Z,X,J,$),K={};if(Z.workspace_id&&Z.authentication.type==="user_oauth")K["anthropic-workspace-id"]=Z.workspace_id;return{provider:z,extraHeaders:K,baseURL:Z.base_url||void 0}}async function j6(Z,$){let X=await q6($);if(!X)return null;let{config:J,fromFile:z}=X,K=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await C6(J,$)??void 0}};return rX(K,Z)}function Q7(Z,$,X,J){switch(Z.authentication.type){case"oidc_federation":{let z=Z.authentication,K=V7(z);if(!K)throw new h("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 h("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(!Z.organization_id)throw new h("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let V=x6({identityTokenProvider:K,federationRuleId:z.federation_rule_id,organizationId:Z.organization_id,serviceAccountId:z.service_account_id,workspaceId:Z.workspace_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent});if($)return W7(V,$,J.onCacheWriteError,J.onSafetyWarning);return V}case"user_oauth":{if(!$)throw new h("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return A6({credentialsPath:$,clientId:Z.authentication.client_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent,onSafetyWarning:J.onSafetyWarning})}default:{let z=Z.authentication.type;throw new h(`authentication.type "${z}" is not a known authentication type`)}}}function V7(Z){if(Z.identity_token){let J=Z.identity_token.source;if(J!=="file")throw new h(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!Z.identity_token.path)throw new h('identity_token.source "file" requires a non-empty path');return aX(Z.identity_token.path)}let $=R("ANTHROPIC_IDENTITY_TOKEN_FILE");if($)return aX($);let X=R("ANTHROPIC_IDENTITY_TOKEN");if(X)return H6(X);return null}function W7(Z,$,X,J){return async(z)=>{let K=await import("node:fs");await D$($,J);let V;try{let U=await K.promises.readFile($,"utf-8");V=JSON.parse(U);let q=V?.access_token;if(q&&!z?.forceRefresh){let x=V?.expires_at;if(x==null||xZ()<x-G0)return{token:q,expiresAt:x??null}}}catch(U){if(U?.code!=="ENOENT"&&!(U instanceof SyntaxError))X?.(U)}let Q=await Z(z);try{await j$($,{...V??{},version:F$,type:"oauth_token",access_token:Q.token,expires_at:Q.expiresAt})}catch(U){X?.(U)}return Q}}var L6=C(()=>{C0();nX();q0();K8();B6();T6();D6()});class vZ{constructor(){KZ.set(this,void 0),QZ.set(this,void 0),G(this,KZ,new Uint8Array,"f"),G(this,QZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?M0(Z):Z;G(this,KZ,V6([Y(this,KZ,"f"),$]),"f");let X=[],J;while((J=N7(Y(this,KZ,"f"),Y(this,QZ,"f")))!=null){if(J.carriage&&Y(this,QZ,"f")==null){G(this,QZ,J.index,"f");continue}if(Y(this,QZ,"f")!=null&&(J.index!==Y(this,QZ,"f")+1||J.carriage)){X.push(Q8(Y(this,KZ,"f").subarray(0,Y(this,QZ,"f")-1))),G(this,KZ,Y(this,KZ,"f").subarray(Y(this,QZ,"f")),"f"),G(this,QZ,null,"f");continue}let z=Y(this,QZ,"f")!==null?J.preceding-1:J.preceding,K=Q8(Y(this,KZ,"f").subarray(0,z));X.push(K),G(this,KZ,Y(this,KZ,"f").subarray(J.index),"f"),G(this,QZ,null,"f")}return X}flush(){if(!Y(this,KZ,"f").length)return[];return this.decode(`
|
|
2
|
-
`)}}function N7(Z,$){for(let z=$??0;z<Z.length;z++){if(Z[z]===10)return{preceding:z,index:z+1,carriage:!1};if(Z[z]===13)return{preceding:z,index:z+1,carriage:!0}}return null}function S6(Z){for(let J=0;J<Z.length-1;J++){if(Z[J]===10&&Z[J+1]===10)return J+2;if(Z[J]===13&&Z[J+1]===13)return J+2;if(Z[J]===13&&Z[J+1]===10&&J+3<Z.length&&Z[J+2]===13&&Z[J+3]===10)return J+4}return-1}var KZ,QZ;var oX=C(()=>{zZ();V8();KZ=new WeakMap,QZ=new WeakMap;vZ.NEWLINE_CHARS=new Set([`
|
|
3
|
-
`,"\r"]);vZ.NEWLINE_REGEXP=/\r\n|[\n\r]/g});async function*E6(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new H("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 H("Attempted to iterate over a response with no body")}let X=new F6,J=new vZ,z=Y8(Z.body);for await(let K of U7(z))for(let V of J.decode(K)){let Q=X.decode(V);if(Q)yield Q}for(let K of J.flush()){let V=X.decode(K);if(V)yield V}}async function*U7(Z){let $=new Uint8Array;for await(let X of Z){if(X==null)continue;let J=X instanceof ArrayBuffer?new Uint8Array(X):typeof X==="string"?M0(X):X,z=new Uint8Array($.length+J.length);z.set($),z.set(J,$.length),$=z;let K;while((K=S6($))!==-1)yield $.slice(0,K),$=$.slice(K)}if($.length>0)yield $}class F6{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(Z){if(Z.endsWith("\r"))Z=Z.substring(0,Z.length-1);if(!Z){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(Z),Z.startsWith(":"))return null;let[$,X,J]=O7(Z,":");if(J.startsWith(" "))J=J.substring(1);if($==="event")this.event=J;else if($==="data")this.data.push(J);return null}}function O7(Z,$){let X=Z.indexOf($);if(X!==-1)return[Z.substring(0,X),$,Z.substring(X+$.length)];return[Z,"",""]}var U8,ZZ;var O8=C(()=>{zZ();m();w0();oX();w0();hZ();wZ();V8();IZ();m();M$();ZZ=class ZZ{constructor(Z,$,X){this.iterator=Z,U8.set(this,void 0),this.controller=$,G(this,U8,X,"f")}static rawEvents(Z,$=new AbortController){return E6(Z,$)}static fromSSEResponse(Z,$,X){let J=!1,z=X?y(X):console;async function*K(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let Q of E6(Z,$)){if(Q.event==="completion")try{yield JSON.parse(Q.data)}catch(U){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),U}if(Q.event==="message_start"||Q.event==="message_delta"||Q.event==="message_stop"||Q.event==="content_block_start"||Q.event==="content_block_delta"||Q.event==="content_block_stop"||Q.event==="message"||Q.event==="user.message"||Q.event==="user.interrupt"||Q.event==="user.tool_confirmation"||Q.event==="user.custom_tool_result"||Q.event==="user.tool_result"||Q.event==="agent.message"||Q.event==="agent.thinking"||Q.event==="agent.tool_use"||Q.event==="agent.tool_result"||Q.event==="agent.mcp_tool_use"||Q.event==="agent.mcp_tool_result"||Q.event==="agent.custom_tool_use"||Q.event==="agent.thread_context_compacted"||Q.event==="session.status_running"||Q.event==="session.status_idle"||Q.event==="session.status_rescheduled"||Q.event==="session.status_terminated"||Q.event==="session.error"||Q.event==="session.deleted"||Q.event==="session.updated"||Q.event==="span.model_request_start"||Q.event==="span.model_request_end"||Q.event==="span.outcome_evaluation_start"||Q.event==="span.outcome_evaluation_ongoing"||Q.event==="span.outcome_evaluation_end"||Q.event==="user.define_outcome"||Q.event==="agent.thread_message_received"||Q.event==="agent.thread_message_sent"||Q.event==="agent.session_thread_message_received"||Q.event==="agent.session_thread_message_sent"||Q.event==="session.thread_created"||Q.event==="session.thread_status_created"||Q.event==="session.thread_status_running"||Q.event==="session.thread_status_idle"||Q.event==="session.thread_status_rescheduled"||Q.event==="session.thread_status_terminated"||Q.event==="event_start"||Q.event==="event_delta"||Q.event==="system.message")try{yield JSON.parse(Q.data)}catch(U){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),U}if(Q.event==="ping")continue;if(Q.event==="error"){let U=X8(Q.data)??Q.data,q=U?.error?.type;throw new _(void 0,U,void 0,Z.headers,q)}}V=!0}catch(Q){if(OZ(Q))return;throw Q}finally{if(!V)$.abort();jZ($)}}return new ZZ(K,$,X)}static fromReadableStream(Z,$,X){let J=!1;async function*z(){let V=new vZ,Q=Y8(Z);for await(let U of Q)for(let q of V.decode(U))yield q;for(let U of V.flush())yield U}async function*K(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let Q of z()){if(V)continue;if(Q)yield JSON.parse(Q)}V=!0}catch(Q){if(OZ(Q))return;throw Q}finally{if(!V)$.abort();jZ($)}}return new ZZ(K,$,X)}[(U8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],X=this.iterator(),J=(z)=>{return{next:()=>{if(z.length===0){let K=X.next();Z.push(K),$.push(K)}return z.shift()}}};return[new ZZ(()=>J(Z),this.controller,Y(this,U8,"f")),new ZZ(()=>J($),this.controller,Y(this,U8,"f"))]}toReadableStream(){let Z=this,$;return PX({async start(){$=Z[Symbol.asyncIterator]()},async pull(X){try{let{value:J,done:z}=await $.next();if(z)return X.close();let K=M0(JSON.stringify(J)+`
|
|
5
|
-
`);X.enqueue(K)}catch(J){X.error(J)}},async cancel(){await $.return?.()}})}}});async function R$(Z,$){let{response:X,requestLogID:J,retryOfRequestLogID:z,startTime:K}=$,V=await(async()=>{if($.options.stream)return y(Z).debug("response",X.status,X.url,X.headers,X.body),ZZ.fromSSEResponse(X,$.controller);if(X.status===204)return null;if($.options.__binaryResponse)return X;let U=X.headers.get("content-type")?.split(";")[0]?.trim();if(U?.includes("application/json")||U?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;let N=await X.json();return w8(N,X)}return await X.text()})().finally(()=>{if(!$.options.stream&&!$.options.__binaryResponse)jZ($.controller)});return y(Z).debug(`[${J}] response parsed`,SZ({retryOfRequestLogID:z,url:X.url,status:X.status,body:V,durationMs:Date.now()-K})),V}function w8(Z,$){if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;return Object.defineProperties(Z,{_request_id:{value:$.headers.get("request-id"),enumerable:!1},_workspace_id:{value:$.headers.get("anthropic-workspace-id"),enumerable:!1}})}var I$=C(()=>{O8();IZ();M$()});function tX(Z){return typeof Z==="object"&&Z!==null&&I6.has(Z)}function P6(Z){let $=new Set;while(typeof Z==="object"&&Z!==null&&!$.has(Z)){if($.add(Z),tX(Z)||OZ(Z)||Z instanceof RZ||Z instanceof w$)return!0;Z=Z.cause}return!1}function sX(Z,$,X,J){return async(z,K={})=>{if($.length===0)return Z.call(void 0,z,K);let V=K.headers instanceof Headers?K.headers:new Headers(K.headers),Q=await G7(Z,$,X,J)({...K,headers:V,url:typeof z==="string"?z:z instanceof URL?z.href:z.url});if(Q.bodyUsed||Q.body?.locked)throw new H("middleware consumed the response body; use response.clone() to inspect it, or return new Response(body, response) to consume and replace it");return Q}}function w7(Z,$){let X=new WeakMap;return{options:Z,logger:$?y($):O6(),parse(J){if(Z?.stream&&J.ok)return R6(J,Z);let z=X.get(J);if(!z)z=R6(J,Z),X.set(J,z);return z}}}async function R6(Z,$){if(Z.bodyUsed||Z.body?.locked)throw new H("cannot ctx.parse() a response whose body was already consumed; call ctx.parse() instead of reading the body, or read via response.clone()");if($?.stream&&Z.ok)return ZZ.fromSSEResponse(Z.clone(),new AbortController);if(Z.status===204)return null;if($?.__binaryResponse)return Z;let J=Z.headers.get("content-type")?.split(";")[0]?.trim();if(J?.includes("application/json")||J?.endsWith("+json")){if(Z.headers.get("content-length")==="0")return;return w8(await Z.clone().json(),Z)}return await Z.clone().text()}function G7(Z,$,X,J){let z=async({url:V,...Q})=>{try{return await Z.call(void 0,V,Q)}catch(U){let q=tZ(U);throw I6.add(q),q}},K=w7(X,J);for(let V=$.length-1;V>=0;V--){let Q=$[V],U=z;z=async(q)=>Q(q,U,K)}return z}var I6;var y6=C(()=>{hZ();I$();IZ();m();O8();I6=new WeakSet});var G8,eZ;var P$=C(()=>{zZ();I$();eZ=class eZ extends Promise{constructor(Z,$,X=R$){super((J)=>{J(null)});this.responsePromise=$,this.parseResponse=X,G8.set(this,void 0),G(this,G8,Z,"f")}_thenUnwrap(Z){return new eZ(Y(this,G8,"f"),this.responsePromise,async($,X)=>w8(Z(await this.parseResponse($,X),X),X.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(Y(this,G8,"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)}};G8=new WeakMap});var y$,k$,f$,TZ,S,eX;var k=C(()=>{zZ();m();I$();P$();wZ();k$=class k${constructor(Z,$,X,J){y$.set(this,void 0),G(this,y$,Z,"f"),this.options=J,this.response=$,this.body=X}hasNextPage(){if(!this.getPaginatedItems().length)return!1;return this.nextPageRequestOptions()!=null}async getNextPage(){let Z=this.nextPageRequestOptions();if(!Z)throw new H("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Y(this,y$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(y$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}};f$=class f$ extends eZ{constructor(Z,$,X){super(Z,$,async(J,z)=>new X(J,z.response,await R$(J,z),z.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}};TZ=class TZ extends k${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.has_more=X.has_more||!1,this.first_id=X.first_id||null,this.last_id=X.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 $=this.first_id;if(!$)return null;return{...this.options,query:{...$8(this.options.query),before_id:$}}}let Z=this.last_id;if(!Z)return null;return{...this.options,query:{...$8(this.options.query),after_id:Z}}}};S=class S extends k${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.next_page=X.next_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let Z=this.next_page;if(!Z)return null;return{...this.options,query:{...$8(this.options.query),page:Z}}}};eX=class eX extends k${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.next_page=X.next_page||null,this.prev_page=X.prev_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let Z=this.next_page;if(!Z)return null;return{...this.options,query:{...$8(this.options.query),page:Z}}}}});function Z0(Z,$,X){return $1(),new File(Z,$??"unknown_file",X)}function q8(Z,$){let X=typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name&&String(Z.name)||("url"in Z)&&Z.url&&String(Z.url)||("filename"in Z)&&Z.filename&&String(Z.filename)||("path"in Z)&&Z.path&&String(Z.path))||"";return $?X.split(/[\\/]/).pop()||void 0:X}function C7(Z){let $=typeof Z==="function"?Z:Z.fetch,X=k6.get($);if(X)return X;let J=(async()=>{try{let z="Response"in $?$.Response:(await $("data:,")).constructor,K=new FormData;if(K.toString()===await new z(K).text())return!1;return!0}catch{return!0}})();return k6.set($,J),J}var $1=()=>{if(typeof File>"u"){let{process:Z}=globalThis,$=typeof Z?.versions?.node==="string"&&parseInt(Z.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+($?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}},X1=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z[Symbol.asyncIterator]==="function",qZ=async(Z,$,X=!0)=>{return{...Z,body:await M7(Z.body,$,X)}},k6,M7=async(Z,$,X=!0)=>{if(!await C7($))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(Z||{}).map(([z,K])=>Z1(J,z,K,X))),J},H7=(Z)=>Z instanceof Blob&&("name"in Z),Z1=async(Z,$,X,J)=>{if(X===void 0)return;if(X==null)throw TypeError(`Received null for "${$}"; to pass null in FormData, you must use the string 'null'`);if(typeof X==="string"||typeof X==="number"||typeof X==="boolean")Z.append($,String(X));else if(X instanceof Response){let z={},K=X.headers.get("Content-Type");if(K)z={type:K};Z.append($,Z0([await X.blob()],q8(X,J),z))}else if(X1(X))Z.append($,Z0([await new Response(H$(X)).blob()],q8(X,J)));else if(H7(X))Z.append($,Z0([X],q8(X,J),{type:X.type}));else if(Array.isArray(X))await Promise.all(X.map((z)=>Z1(Z,$+"[]",z,J)));else if(typeof X==="object")await Promise.all(Object.entries(X).map(([z,K])=>Z1(Z,`${$}[${z}]`,K,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${X} instead`)};var PZ=C(()=>{w0();k6=new WeakMap});async function b$(Z,$,X){if($1(),Z=await Z,$||($=q8(Z,!0)),B7(Z)){if(Z instanceof File&&$==null&&X==null)return Z;return Z0([await Z.arrayBuffer()],$??Z.name,{type:Z.type,lastModified:Z.lastModified,...X})}if(x7(Z)){let z=await Z.blob();return $||($=new URL(Z.url).pathname.split(/[\\/]/).pop()),Z0(await J1(z),$,X)}let J=await J1(Z);if(!X?.type){let z=J.find((K)=>typeof K==="object"&&("type"in K)&&K.type);if(typeof z==="string")X={...X,type:z}}return Z0(J,$,X)}async function J1(Z){let $=[];if(typeof Z==="string"||ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer)$.push(Z);else if(f6(Z))$.push(Z instanceof Blob?Z:await Z.arrayBuffer());else if(X1(Z))for await(let X of Z)$.push(...await J1(X));else{let X=Z?.constructor?.name;throw Error(`Unexpected data type: ${typeof Z}${X?`; constructor: ${X}`:""}${T7(Z)}`)}return $}function T7(Z){if(typeof Z!=="object"||Z===null)return"";return`; props: [${Object.getOwnPropertyNames(Z).map((X)=>`"${X}"`).join(", ")}]`}var f6=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.size==="number"&&typeof Z.type==="string"&&typeof Z.text==="function"&&typeof Z.slice==="function"&&typeof Z.arrayBuffer==="function",B7=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.name==="string"&&typeof Z.lastModified==="number"&&f6(Z),x7=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.url==="string"&&typeof Z.blob==="function";var b6=C(()=>{PZ();PZ()});var z1=C(()=>{b6()});var h6=()=>{};class A{constructor(Z){this._client=Z}}var P=()=>{};function*D7(Z){if(!Z)return;if(g6 in Z){let{values:J,nulls:z}=Z;yield*J.entries();for(let K of z)yield[K,null];return}let $=!1,X;if(Z instanceof Headers)X=Z.entries();else if(FX(Z))X=Z;else $=!0,X=Object.entries(Z??{});for(let J of X){let z=J[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let K=FX(J[1])?J[1]:[J[1]],V=!1;for(let Q of K){if(Q===void 0)continue;if($&&!V)V=!0,yield[z,h$];yield[z,Q]}}}var g6,h$,j7,v6=(Z,$)=>{let X=Z?Z.split(",").map((J)=>J.trim()).filter(Boolean):[];for(let J of $.split(",").map((z)=>z.trim()))if(J&&!X.includes(J))X.push(J);return X.join(", ")},W=(Z)=>{let $=new Headers,X=new Set;for(let J of Z){let z=new Set;for(let[K,V]of D7(J)){let Q=K.toLowerCase();if(j7.has(Q)){if(V===h$)continue;if(V===null)$.delete(K),X.add(Q);else $.set(K,v6($.get(K),V)),X.delete(Q);continue}if(V===h$||!z.has(Q)){if($.delete(K),z.add(Q),V===h$)continue}if(V===null)$.delete(K),X.add(Q);else $.append(K,V),X.delete(Q)}}return{[g6]:!0,values:$,nulls:X}};var I=C(()=>{wZ();g6=Symbol.for("brand.privateNullableHeaders");h$=Symbol("clear"),j7=new Set(["x-stainless-helper"])});function m6(Z){return Z.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var _6,L7=(Z=m6)=>function(X,...J){if(X.length===1)return X[0];let z=!1,K=[],V=X.reduce((x,w,N)=>{if(/[?#]/.test(w))z=!0;let M=J[N],B=(z?encodeURIComponent:Z)(""+M);if(N!==J.length&&(M==null||typeof M==="object"&&M.toString===Object.getPrototypeOf(Object.getPrototypeOf(M.hasOwnProperty??_6)??_6)?.toString))B=M+"",K.push({start:x.length+w.length,length:B.length,error:`Value of type ${Object.prototype.toString.call(M).slice(8,-1)} is not a valid path parameter`});return x+w+(N===J.length?"":B)},""),Q=V.split(/[?#]/,1)[0],U=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,q;while((q=U.exec(Q))!==null)K.push({start:q.index,length:q[0].length,error:`Value "${q[0]}" can't be safely passed as a path parameter`});if(K.sort((x,w)=>x.start-w.start),K.length>0){let x=0,w=K.reduce((N,M)=>{let B=" ".repeat(M.start-x),E="^".repeat(M.length);return x=M.start+M.length,N+B+E},"");throw new H(`Path parameters result in path with invalid segments:
|
|
6
|
-
${K.map((N)=>N.error).join(`
|
|
7
|
-
`)}
|
|
8
|
-
${V}
|
|
9
|
-
${w}`)}return V},O;var b=C(()=>{m();_6=Object.freeze(Object.create(null)),O=L7(m6)});var C8;var Y1=C(()=>{P();k();I();b();C8=class C8 extends A{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/deployment_runs/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/deployment_runs?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}}});var M8;var K1=C(()=>{P();k();I();b();M8=class M8 extends A{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/deployments?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/deployments/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/deployments/${Z}?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/deployments?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/deployments/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}pause(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/deployments/${Z}/pause?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}run(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/deployments/${Z}/run?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}unpause(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/deployments/${Z}/unpause?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var H8;var Q1=C(()=>{P();k();I();b();H8=class H8 extends A{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/dreams?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"dreaming-2026-04-21"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/dreams/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/dreams?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"dreaming-2026-04-21"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/dreams/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/dreams/${Z}/cancel?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}}});function T8(Z){return{["x-stainless-helper"]:Z}}function g$(Z){return typeof Z==="object"&&Z!==null&&B8 in Z}function V1(Z,$){let X=new Set;if(Z){for(let J of Z)if(g$(J))X.add(J[B8])}if($)for(let J of $){if(g$(J))X.add(J[B8]);let z=J.content;if(Array.isArray(z)){for(let K of z)if(g$(K))X.add(K[B8])}}return Array.from(X)}function _$(Z,$){let X=V1(Z,$);if(X.length===0)return{};return{["x-stainless-helper"]:X.join(", ")}}function m$(Z){if(g$(Z))return{["x-stainless-helper"]:Z[B8]};return{}}var x8="x-stainless-helper",v$="x-stainless-helper-method",B8;var AZ=C(()=>{B8=Symbol("anthropic.sdk.stainlessHelper")});var A8;var W1=C(()=>{P();k();I();AZ();PZ();b();A8=class A8 extends A{list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/files?beta=true",TZ,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(O`/v1/files/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}download(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/files/${Z}/content?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/files/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}upload(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/files?beta=true",qZ({body:J,...$,headers:W([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},m$(J.file),$?.headers])},this._client))}}});var D8;var N1=C(()=>{P();k();I();b();D8=class D8 extends A{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/models/${Z}?beta=true`,{...X,headers:W([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models?beta=true",TZ,{query:J,...$,headers:W([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var j8;var U1=C(()=>{P();k();I();b();j8=class j8 extends A{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/user_profiles?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"user-profiles-2026-08-18"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/user_profiles/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/user_profiles/${Z}?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/user_profiles?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"user-profiles-2026-08-18"].toString()},$?.headers])})}createEnrollmentURL(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/user_profiles/${Z}/enrollment_url?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}}});var p6=u$((c6)=>{Object.defineProperty(c6,"__esModule",{value:!0});c6.timingSafeEqual=void 0;function u6(Z,$=""){if(!Z)throw Error($)}function y7(Z,$){if(Z.byteLength!==$.byteLength)return!1;if(!(Z instanceof DataView))Z=new DataView(ArrayBuffer.isView(Z)?Z.buffer:Z);if(!($ instanceof DataView))$=new DataView(ArrayBuffer.isView($)?$.buffer:$);u6(Z instanceof DataView),u6($ instanceof DataView);let X=Z.byteLength,J=0,z=-1;while(++z<X)J|=Z.getUint8(z)^$.getUint8(z);return J===0}c6.timingSafeEqual=y7});var n6=u$((VZ)=>{var k7=VZ&&VZ.__extends||function(){var Z=function($,X){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,z){J.__proto__=z}||function(J,z){for(var K in z)if(z.hasOwnProperty(K))J[K]=z[K]},Z($,X)};return function($,X){Z($,X);function J(){this.constructor=$}$.prototype=X===null?Object.create(X):(J.prototype=X.prototype,new J)}}();Object.defineProperty(VZ,"__esModule",{value:!0});var a=256,O1=function(){function Z($){if($===void 0)$="=";this._paddingCharacter=$}return Z.prototype.encodedLength=function($){if(!this._paddingCharacter)return($*8+5)/6|0;return($+2)/3*4|0},Z.prototype.encode=function($){var X="",J=0;for(;J<$.length-2;J+=3){var z=$[J]<<16|$[J+1]<<8|$[J+2];X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),X+=this._encodeByte(z>>>6&63),X+=this._encodeByte(z>>>0&63)}var K=$.length-J;if(K>0){var z=$[J]<<16|(K===2?$[J+1]<<8:0);if(X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),K===2)X+=this._encodeByte(z>>>6&63);else X+=this._paddingCharacter||"";X+=this._paddingCharacter||""}return X},Z.prototype.maxDecodedLength=function($){if(!this._paddingCharacter)return($*6+7)/8|0;return $/4*3|0},Z.prototype.decodedLength=function($){return this.maxDecodedLength($.length-this._getPaddingLength($))},Z.prototype.decode=function($){if($.length===0)return new Uint8Array(0);var X=this._getPaddingLength($),J=$.length-X,z=new Uint8Array(this.maxDecodedLength(J)),K=0,V=0,Q=0,U=0,q=0,x=0,w=0;for(;V<J-4;V+=4)U=this._decodeChar($.charCodeAt(V+0)),q=this._decodeChar($.charCodeAt(V+1)),x=this._decodeChar($.charCodeAt(V+2)),w=this._decodeChar($.charCodeAt(V+3)),z[K++]=U<<2|q>>>4,z[K++]=q<<4|x>>>2,z[K++]=x<<6|w,Q|=U&a,Q|=q&a,Q|=x&a,Q|=w&a;if(V<J-1)U=this._decodeChar($.charCodeAt(V)),q=this._decodeChar($.charCodeAt(V+1)),z[K++]=U<<2|q>>>4,Q|=U&a,Q|=q&a;if(V<J-2)x=this._decodeChar($.charCodeAt(V+2)),z[K++]=q<<4|x>>>2,Q|=x&a;if(V<J-3)w=this._decodeChar($.charCodeAt(V+3)),z[K++]=x<<6|w,Q|=w&a;if(Q!==0)throw Error("Base64Coder: incorrect characters for decoding");return z},Z.prototype._encodeByte=function($){var X=$;return X+=65,X+=25-$>>>8&6,X+=51-$>>>8&-75,X+=61-$>>>8&-15,X+=62-$>>>8&3,String.fromCharCode(X)},Z.prototype._decodeChar=function($){var X=a;return X+=(42-$&$-44)>>>8&-a+$-43+62,X+=(46-$&$-48)>>>8&-a+$-47+63,X+=(47-$&$-58)>>>8&-a+$-48+52,X+=(64-$&$-91)>>>8&-a+$-65+0,X+=(96-$&$-123)>>>8&-a+$-97+26,X},Z.prototype._getPaddingLength=function($){var X=0;if(this._paddingCharacter){for(var J=$.length-1;J>=0;J--){if($[J]!==this._paddingCharacter)break;X++}if($.length<4||X>2)throw Error("Base64Coder: incorrect padding")}return X},Z}();VZ.Coder=O1;var L8=new O1;function f7(Z){return L8.encode(Z)}VZ.encode=f7;function b7(Z){return L8.decode(Z)}VZ.decode=b7;var l6=function(Z){k7($,Z);function $(){return Z!==null&&Z.apply(this,arguments)||this}return $.prototype._encodeByte=function(X){var J=X;return J+=65,J+=25-X>>>8&6,J+=51-X>>>8&-75,J+=61-X>>>8&-13,J+=62-X>>>8&49,String.fromCharCode(J)},$.prototype._decodeChar=function(X){var J=a;return J+=(44-X&X-46)>>>8&-a+X-45+62,J+=(94-X&X-96)>>>8&-a+X-95+63,J+=(47-X&X-58)>>>8&-a+X-48+52,J+=(64-X&X-91)>>>8&-a+X-65+0,J+=(96-X&X-123)>>>8&-a+X-97+26,J},$}(O1);VZ.URLSafeCoder=l6;var i6=new l6;function h7(Z){return i6.encode(Z)}VZ.encodeURLSafe=h7;function g7(Z){return i6.decode(Z)}VZ.decodeURLSafe=g7;VZ.encodedLength=function(Z){return L8.encodedLength(Z)};VZ.maxDecodedLength=function(Z){return L8.maxDecodedLength(Z)};VZ.decodedLength=function(Z){return L8.decodedLength(Z)}});var r6=u$((a6,c$)=>{(function(Z,$){var X={};$(X);var J=X.default;for(var z in X)J[z]=X[z];if(typeof c$==="object"&&typeof c$.exports==="object")c$.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else Z.sha256=J})(a6,function(Z){Z.__esModule=!0,Z.digestLength=32,Z.blockSize=64;var $=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 X(w,N,M,B,E){var D,j,T,L,F,f,g,v,n,u,l,UZ,oZ;while(E>=64){D=N[0],j=N[1],T=N[2],L=N[3],F=N[4],f=N[5],g=N[6],v=N[7];for(u=0;u<16;u++)l=B+u*4,w[u]=(M[l]&255)<<24|(M[l+1]&255)<<16|(M[l+2]&255)<<8|M[l+3]&255;for(u=16;u<64;u++)n=w[u-2],UZ=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,n=w[u-15],oZ=(n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,w[u]=(UZ+w[u-7]|0)+(oZ+w[u-16]|0);for(u=0;u<64;u++)UZ=(((F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7))+(F&f^~F&g)|0)+(v+($[u]+w[u]|0)|0)|0,oZ=((D>>>2|D<<30)^(D>>>13|D<<19)^(D>>>22|D<<10))+(D&j^D&T^j&T)|0,v=g,g=f,f=F,F=L+UZ|0,L=T,T=j,j=D,D=UZ+oZ|0;N[0]+=D,N[1]+=j,N[2]+=T,N[3]+=L,N[4]+=F,N[5]+=f,N[6]+=g,N[7]+=v,B+=64,E-=64}return B}var J=function(){function w(){this.digestLength=Z.digestLength,this.blockSize=Z.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 w.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},w.prototype.clean=function(){for(var N=0;N<this.buffer.length;N++)this.buffer[N]=0;for(var N=0;N<this.temp.length;N++)this.temp[N]=0;this.reset()},w.prototype.update=function(N,M){if(M===void 0)M=N.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var B=0;if(this.bytesHashed+=M,this.bufferLength>0){while(this.bufferLength<64&&M>0)this.buffer[this.bufferLength++]=N[B++],M--;if(this.bufferLength===64)X(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(M>=64)B=X(this.temp,this.state,N,B,M),M%=64;while(M>0)this.buffer[this.bufferLength++]=N[B++],M--;return this},w.prototype.finish=function(N){if(!this.finished){var M=this.bytesHashed,B=this.bufferLength,E=M/536870912|0,D=M<<3,j=M%64<56?64:128;this.buffer[B]=128;for(var T=B+1;T<j-8;T++)this.buffer[T]=0;this.buffer[j-8]=E>>>24&255,this.buffer[j-7]=E>>>16&255,this.buffer[j-6]=E>>>8&255,this.buffer[j-5]=E>>>0&255,this.buffer[j-4]=D>>>24&255,this.buffer[j-3]=D>>>16&255,this.buffer[j-2]=D>>>8&255,this.buffer[j-1]=D>>>0&255,X(this.temp,this.state,this.buffer,0,j),this.finished=!0}for(var T=0;T<8;T++)N[T*4+0]=this.state[T]>>>24&255,N[T*4+1]=this.state[T]>>>16&255,N[T*4+2]=this.state[T]>>>8&255,N[T*4+3]=this.state[T]>>>0&255;return this},w.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},w.prototype._saveState=function(N){for(var M=0;M<this.state.length;M++)N[M]=this.state[M]},w.prototype._restoreState=function(N,M){for(var B=0;B<this.state.length;B++)this.state[B]=N[B];this.bytesHashed=M,this.finished=!1,this.bufferLength=0},w}();Z.Hash=J;var z=function(){function w(N){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var M=new Uint8Array(this.blockSize);if(N.length>this.blockSize)new J().update(N).finish(M).clean();else for(var B=0;B<N.length;B++)M[B]=N[B];for(var B=0;B<M.length;B++)M[B]^=54;this.inner.update(M);for(var B=0;B<M.length;B++)M[B]^=106;this.outer.update(M),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var B=0;B<M.length;B++)M[B]=0}return w.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},w.prototype.clean=function(){for(var N=0;N<this.istate.length;N++)this.ostate[N]=this.istate[N]=0;this.inner.clean(),this.outer.clean()},w.prototype.update=function(N){return this.inner.update(N),this},w.prototype.finish=function(N){if(this.outer.finished)this.outer.finish(N);else this.inner.finish(N),this.outer.update(N,this.digestLength).finish(N);return this},w.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},w}();Z.HMAC=z;function K(w){var N=new J().update(w),M=N.digest();return N.clean(),M}Z.hash=K,Z.default=K;function V(w,N){var M=new z(w).update(N),B=M.digest();return M.clean(),B}Z.hmac=V;function Q(w,N,M,B){var E=B[0];if(E===0)throw Error("hkdf: cannot expand more");if(N.reset(),E>1)N.update(w);if(M)N.update(M);N.update(B),N.finish(w),B[0]++}var U=new Uint8Array(Z.digestLength);function q(w,N,M,B){if(N===void 0)N=U;if(B===void 0)B=32;var E=new Uint8Array([1]),D=V(N,w),j=new z(D),T=new Uint8Array(j.digestLength),L=T.length,F=new Uint8Array(B);for(var f=0;f<B;f++){if(L===T.length)Q(T,j,M,E),L=0;F[f]=T[L++]}return j.clean(),T.fill(0),E.fill(0),F}Z.hkdf=q;function x(w,N,M,B){var E=new z(w),D=E.digestLength,j=new Uint8Array(4),T=new Uint8Array(D),L=new Uint8Array(D),F=new Uint8Array(B);for(var f=0;f*D<B;f++){var g=f+1;j[0]=g>>>24&255,j[1]=g>>>16&255,j[2]=g>>>8&255,j[3]=g>>>0&255,E.reset(),E.update(N),E.update(j),E.finish(L);for(var v=0;v<D;v++)T[v]=L[v];for(var v=2;v<=M;v++){E.reset(),E.update(L).finish(L);for(var n=0;n<D;n++)T[n]^=L[n]}for(var v=0;v<D&&f*D+v<B;v++)F[f*D+v]=T[v]}for(var f=0;f<D;f++)T[f]=L[f]=0;for(var f=0;f<4;f++)j[f]=0;return E.clean(),F}Z.pbkdf2=x})});var Z9=u$((s6)=>{Object.defineProperty(s6,"__esModule",{value:!0});s6.Webhook=s6.WebhookVerificationError=void 0;var v7=p6(),o6=n6(),_7=r6(),t6=300;class w1 extends Error{constructor(Z){super(Z);Object.setPrototypeOf(this,w1.prototype),this.name="ExtendableError",this.stack=Error(Z).stack}}class _Z extends w1{constructor(Z){super(Z);Object.setPrototypeOf(this,_Z.prototype),this.name="WebhookVerificationError"}}s6.WebhookVerificationError=_Z;class S8{constructor(Z,$){if(!Z)throw Error("Secret can't be empty.");if(($===null||$===void 0?void 0:$.format)==="raw")if(Z instanceof Uint8Array)this.key=Z;else this.key=Uint8Array.from(Z,(X)=>X.charCodeAt(0));else{if(typeof Z!=="string")throw Error("Expected secret to be of type string");if(Z.startsWith(S8.prefix))Z=Z.substring(S8.prefix.length);this.key=o6.decode(Z)}}verify(Z,$){let X={};for(let w of Object.keys($))X[w.toLowerCase()]=$[w];let J=X["webhook-id"],z=X["webhook-signature"],K=X["webhook-timestamp"];if(!z||!J||!K)throw new _Z("Missing required headers");let V=this.verifyTimestamp(K),U=this.sign(J,V,Z).split(",")[1],q=z.split(" "),x=new globalThis.TextEncoder;for(let w of q){let[N,M]=w.split(",");if(N!=="v1")continue;if((0,v7.timingSafeEqual)(x.encode(M),x.encode(U)))return JSON.parse(Z.toString())}throw new _Z("No matching signature found")}sign(Z,$,X){if(typeof X==="string");else if(X.constructor.name==="Buffer")X=X.toString();else throw Error("Expected payload to be of type string or Buffer.");let J=new TextEncoder,z=Math.floor($.getTime()/1000),K=J.encode(`${Z}.${z}.${X}`);return`v1,${o6.encode(_7.hmac(this.key,K))}`}verifyTimestamp(Z){let $=Math.floor(Date.now()/1000),X=parseInt(Z,10);if(isNaN(X))throw new _Z("Invalid Signature Headers");if($-X>t6)throw new _Z("Message timestamp too old");if(X>$+t6)throw new _Z("Message timestamp too new");return new Date(X*1000)}}s6.Webhook=S8;S8.prefix="whsec_"});var $9,E8;var G1=C(()=>{P();$9=u7(Z9(),1);E8=class E8 extends A{unwrap(Z,{headers:$,key:X}){if($!==void 0){let J=X===void 0?this._client.webhookKey:X;if(J===null)throw Error("Webhook key must not be null in order to unwrap");new $9.Webhook(J).verify(Z,$)}return JSON.parse(Z)}}});var F8;var q1=C(()=>{P();k();I();b();F8=class F8 extends A{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/agents/${Z}/versions?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var H0;var C1=C(()=>{P();q1();q1();k();I();b();H0=class H0 extends A{constructor(){super(...arguments);this.versions=new F8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/agents?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(O`/v1/agents/${Z}?beta=true`,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/agents/${Z}?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/agents?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/agents/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};H0.Versions=F8});function mZ(Z,$){if(!Z)return()=>{};if(Z.aborted)return $.abort(),()=>{};let X=()=>$.abort();return Z.addEventListener("abort",X),()=>Z.removeEventListener("abort",X)}var d$=()=>{};function yZ(Z,$){return Z instanceof _&&Z.status===$}function X9(Z){return Z instanceof _&&typeof Z.status==="number"&&Z.status>=400&&Z.status<500}function uZ(Z){return X9(Z)&&!yZ(Z,408)&&!yZ(Z,409)&&!yZ(Z,429)}function p$(Z,$,X){return Math.min($*2**Z,X)}function M1(Z,$){return Z+Math.random()*($-Z)}function l$(Z){return Z*(1-Math.random()*0.25)}var R8=C(()=>{m()});function i$(Z,{authToken:$,helper:X}){if(!$)throw new H(`copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify($)}`);let J=Z,z=J._options.defaultHeaders,K=J._authState?.extraHeaders,V=K?Object.fromEntries(Object.entries(K).filter(([U])=>{let q=U.toLowerCase();return q!=="authorization"&&q!=="x-api-key"})):void 0,Q=W([V,z,{[x8]:X}]);return Z.withOptions({apiKey:null,authToken:$,baseURL:Z.baseURL,credentials:void 0,defaultHeaders:Q})}var H1=C(()=>{m();I();AZ()});function r7(Z){return p$(Z,i7,n7)}class J9{constructor(Z,$){T0.set(this,void 0),t$.set(this,void 0),A0.set(this,void 0),y8.set(this,0),G(this,T0,Z,"f"),G(this,t$,$,"f")}onEmptyPoll(){let Z=Date.now(),$={component:"work-poller",environment_id:Y(this,t$,"f")};if(Y(this,A0,"f")===void 0)G(this,A0,G(this,y8,Z,"f"),"f"),Y(this,T0,"f").info("idle; polling for work",$);else if(Z-Y(this,y8,"f")>=a7)G(this,y8,Z,"f"),Y(this,T0,"f").info(`still polling; idle for ${Math.round((Z-Y(this,A0,"f"))/1000)}s`,$);else Y(this,T0,"f").debug("poll returned no work",$)}onClaim(){G(this,A0,void 0,"f")}}function o7(){let $=globalThis.process?.env?.HOSTNAME;return $?`${$}-${U0()}`:U0()}var B0,n$,CZ,a$,r$,o$,I8,P8,x0,T0,t$,A0,y8,l7=999,i7=1000,n7=60000,a7=300000,$0;var s$=C(()=>{zZ();m();IZ();O0();G$();d$();I();R8();H1();R8();$0=class $0{constructor(Z){B0.set(this,void 0),n$.set(this,!1),CZ.set(this,void 0),a$.set(this,void 0),r$.set(this,void 0),o$.set(this,void 0),I8.set(this,void 0),P8.set(this,void 0),x0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??o7(),G(this,B0,i$(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),G(this,r$,Z.autoStop??!0,"f"),G(this,o$,Z.drain??!1,"f"),G(this,I8,Z.blockMs===void 0?l7:Z.blockMs,"f"),G(this,P8,Z.reclaimOlderThanMs??null,"f"),G(this,x0,Z.requestOptions,"f"),G(this,CZ,new AbortController,"f"),G(this,a$,mZ(Z.signal,Y(this,CZ,"f")),"f")}get signal(){return Y(this,CZ,"f").signal}abort(){Y(this,CZ,"f").abort()}async*[(B0=new WeakMap,n$=new WeakMap,CZ=new WeakMap,a$=new WeakMap,r$=new WeakMap,o$=new WeakMap,I8=new WeakMap,P8=new WeakMap,x0=new WeakMap,Symbol.asyncIterator)](){if(Y(this,n$,"f"))throw new H("Cannot iterate over a consumed WorkPoller");G(this,n$,!0,"f");let Z=y(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});let $=new J9(Z,this.environmentId);try{let X=0;while(!Y(this,CZ,"f").signal.aborted){let J;try{J=await Y(this,B0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...Y(this,I8,"f")!==null?{block_ms:Y(this,I8,"f")}:{},...Y(this,P8,"f")!==null?{reclaim_older_than_ms:Y(this,P8,"f")}:{}},{headers:W([Y(this,x0,"f")?.headers]),signal:Y(this,CZ,"f").signal})}catch(z){if(Y(this,CZ,"f").signal.aborted)return;if(uZ(z))throw Z.error("poll failed permanently, stopping poller",{error:String(z)}),z;let K=l$(r7(X));Z.warn("poll failed, backing off",{error:String(z),backoff_ms:K}),X++,await BZ(K,Y(this,CZ,"f").signal);continue}if(X=0,J==null){if(Y(this,o$,"f"))return;$.onEmptyPoll(),await BZ(M1(1000,3000),Y(this,CZ,"f").signal);continue}$.onClaim(),Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:J.id,work_type:J.data.type});try{await Y(this,B0,"f").beta.environments.work.ack(J.id,{environment_id:J.environment_id},{headers:W([Y(this,x0,"f")?.headers]),signal:Y(this,CZ,"f").signal})}catch(z){Z.error("ack failed",{work_id:J.id,error:String(z)});continue}try{yield J}finally{if(Y(this,r$,"f"))try{await Y(this,B0,"f").beta.environments.work.stop(J.id,{environment_id:J.environment_id},{headers:W([Y(this,x0,"f")?.headers])})}catch(z){if(!yZ(z,409))Z.warn("stop failed",{work_id:J.id,error:String(z)})}}}}finally{Y(this,a$,"f").call(this)}}};T0=new WeakMap,t$=new WeakMap,A0=new WeakMap,y8=new WeakMap});class B1{constructor(){D0.set(this,[]),cZ.set(this,[]),j0.set(this,!1)}push(Z){if(Y(this,j0,"f"))return!1;let $=Y(this,cZ,"f").shift();if($)$({done:!1,value:Z});else Y(this,D0,"f").push(Z);return!0}close(){if(Y(this,j0,"f"))return;G(this,j0,!0,"f");while(Y(this,cZ,"f").length>0)Y(this,cZ,"f").shift()({done:!0,value:void 0})}next(Z){if(Y(this,D0,"f").length>0)return Promise.resolve({done:!1,value:Y(this,D0,"f").shift()});if(Y(this,j0,"f")||Z?.aborted)return Promise.resolve({done:!0,value:void 0});return new Promise(($)=>{let X=(z)=>{Z?.removeEventListener("abort",J),$(z)},J=()=>{let z=Y(this,cZ,"f").indexOf(X);if(z>=0)Y(this,cZ,"f").splice(z,1);$({done:!0,value:void 0})};Y(this,cZ,"f").push(X),Z?.addEventListener("abort",J,{once:!0})})}tryShift(){return Y(this,D0,"f").shift()}}var D0,cZ,j0;var z9=C(()=>{zZ();D0=new WeakMap,cZ=new WeakMap,j0=new WeakMap});function x1(Z){return"name"in Z?Z.name:("mcp_server_name"in Z)?Z.mcp_server_name:Z.type}function t7(Z){return Z instanceof gZ?Z.content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}async function Y9(Z,$,X){try{let J=Z.parse?Z.parse($):$;return{content:await Z.run(J,X),isError:!1}}catch(J){return{content:t7(J),isError:!0}}}var K9=C(()=>{Z8()});function q9(Z){return Z.type==="session.status_idle"&&Z.stop_reason?.type==="end_turn"}class C9{constructor(Z,$){k8.set(this,void 0),zX.set(this,void 0),L0.set(this,new Set),X0.set(this,!1),DZ.set(this,void 0),G(this,k8,Z,"f"),G(this,zX,$,"f")}noteEvent(Z){if(Z.type==="user.tool_confirmation")return;if(q9(Z))this.arm();else this.disarm()}block(Z){if(Y(this,L0,"f").add(Z),Y(this,DZ,"f")!==void 0)G(this,X0,!0,"f"),clearTimeout(Y(this,DZ,"f")),G(this,DZ,void 0,"f")}unblock(Z){if(Y(this,L0,"f").delete(Z),Y(this,L0,"f").size===0&&Y(this,X0,"f"))this.arm()}arm(){if(Y(this,k8,"f")<=0)return;if(Y(this,L0,"f").size>0){G(this,X0,!0,"f");return}if(G(this,X0,!1,"f"),Y(this,DZ,"f")!==void 0)clearTimeout(Y(this,DZ,"f"));G(this,DZ,setTimeout(Y(this,zX,"f"),Y(this,k8,"f")),"f")}disarm(){if(G(this,X0,!1,"f"),Y(this,DZ,"f")!==void 0)clearTimeout(Y(this,DZ,"f")),G(this,DZ,void 0,"f")}}function Y5(Z,$,X){if(Z.type==="agent.custom_tool_use")return{type:"user.custom_tool_result",custom_tool_use_id:Z.id,is_error:$,content:X};return{type:"user.tool_result",tool_use_id:Z.id,is_error:$,content:X}}function K5(Z){if(typeof Z==="string")return[{type:"text",text:Z||"(no output)"}];let $=Z.map((X)=>{if(X.type==="text")return{type:"text",text:X.text||"(no output)"};if(X.type==="image"||X.type==="document")return X;if(X.type==="search_result")return{type:"search_result",source:X.source,title:X.title,content:X.content.map((J)=>({type:"text",text:J.text})),citations:{enabled:X.citations?.enabled??!1}};return{type:"text",text:JSON.stringify(X)}});return $.length>0?$:[{type:"text",text:"(no output)"}]}var k8,zX,L0,X0,DZ,c,e$,t,ZX,f8,YX,r,E0,WZ,F0,dZ,S0,kZ,KX,b8,MZ,$X,w9,Q9,V9,W9,T1,N9,XX,JX,A1,U9,G9,O9=500,s7=1e4,e7=120000,Z5=30000,$5=1000,X5=30000,J5=300000,z5=60000,J0;var QX=C(()=>{zZ();m();IZ();O0();R8();d$();z9();I();AZ();K9();k8=new WeakMap,zX=new WeakMap,L0=new WeakMap,X0=new WeakMap,DZ=new WeakMap;J0=class J0{constructor(Z,$){c.add(this),e$.set(this,!1),t.set(this,void 0),ZX.set(this,void 0),f8.set(this,void 0),YX.set(this,void 0),r.set(this,void 0),E0.set(this,new Set),WZ.set(this,new Set),F0.set(this,new Map),dZ.set(this,new Map),S0.set(this,new B1),kZ.set(this,0),KX.set(this,J5),b8.set(this,null),MZ.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??z5,G(this,r,y($.client),"f"),G(this,YX,new Map($.tools.map((X)=>[x1(X),X])),"f"),G(this,t,new AbortController,"f"),G(this,ZX,mZ($.signal,Y(this,t,"f")),"f"),G(this,f8,$.requestOptions,"f"),G(this,MZ,new C9(this.maxIdleMs,()=>{Y(this,r,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),Y(this,t,"f").abort()}),"f")}get signal(){return Y(this,t,"f").signal}abort(){Y(this,t,"f").abort()}_setSendRetryWindow(Z){G(this,KX,Z,"f")}async*[(e$=new WeakMap,t=new WeakMap,ZX=new WeakMap,f8=new WeakMap,YX=new WeakMap,r=new WeakMap,E0=new WeakMap,WZ=new WeakMap,F0=new WeakMap,dZ=new WeakMap,S0=new WeakMap,kZ=new WeakMap,KX=new WeakMap,b8=new WeakMap,MZ=new WeakMap,c=new WeakSet,Symbol.asyncIterator)](){if(Y(this,e$,"f"))throw new H("Cannot iterate over a consumed SessionToolRunner");G(this,e$,!0,"f"),Y(this,r,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=Y(this,c,"m",w9).call(this).catch(($)=>{if(!Y(this,t,"f").signal.aborted)Y(this,r,"f").error("stream loop failed",{error:String($)});Y(this,t,"f").abort()});try{while(!0){let X=await Y(this,S0,"f").next(Y(this,t,"f").signal);if(X.done)break;yield X.value}await Z;let $;while(($=Y(this,S0,"f").tryShift())!==void 0)yield $}finally{Y(this,t,"f").abort(),Y(this,MZ,"f").disarm(),await Z;try{await Y(this,c,"m",G9).call(this)}catch($){Y(this,r,"f").warn("drain failed",{error:String($)})}Y(this,S0,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(X){Y(this,r,"f").warn("tool.close failed",{tool:x1($),error:String(X)})}Y(this,ZX,"f").call(this)}}};$X=function(){return{...Y(this,f8,"f"),headers:W([T8("session-tool-runner"),Y(this,f8,"f")?.headers]),signal:Y(this,t,"f").signal}},w9=async function(){let $=Y(this,t,"f"),X=O9;while(!$.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},Y(this,c,"m",$X).call(this));await Y(this,c,"m",Q9).call(this);for await(let z of J)if(X=O9,await Y(this,c,"m",W9).call(this,z))return}catch(J){if($.signal.throwIfAborted(),uZ(J))throw Y(this,r,"f").error("permanent stream failure, shutting down",{error:String(J)}),$.abort(),J;Y(this,r,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:X})}$.signal.throwIfAborted(),await BZ(X,$.signal),X=Math.min(X*2,s7)}},Q9=async function(){let $=Y(this,t,"f"),X=[],J=!1;try{for await(let V of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},Y(this,c,"m",$X).call(this)))Y(this,c,"m",V9).call(this,V,X),J=q9(V)}catch(V){$.signal.throwIfAborted(),Y(this,r,"f").warn("reconcile list failed",{error:String(V)});for(let Q of X)Y(this,E0,"f").delete(Q.id);return}let z=X.filter((V)=>!Y(this,WZ,"f").has(V.id));Y(this,MZ,"f").disarm();for(let V of z)await Y(this,c,"m",T1).call(this,V);for(let V of[...Y(this,dZ,"f").values()]){let Q=Y(this,F0,"f").get(V.id);if(Q!==void 0)await Y(this,c,"m",XX).call(this,V,Q)}let K=z.filter((V)=>!Y(this,WZ,"f").has(V.id)&&!Y(this,dZ,"f").has(V.id));if(J&&K.length===0)Y(this,MZ,"f").arm();else Y(this,MZ,"f").disarm()},V9=function($,X){if($.type==="agent.tool_use"||$.type==="agent.custom_tool_use"){if(Y(this,E0,"f").add($.id),!Y(this,WZ,"f").has($.id))X.push($)}else if($.type==="user.tool_result")Y(this,WZ,"f").add($.tool_use_id);else if($.type==="user.custom_tool_result")Y(this,WZ,"f").add($.custom_tool_use_id);else if($.type==="user.tool_confirmation"){if(!Y(this,WZ,"f").has($.tool_use_id))Y(this,F0,"f").set($.tool_use_id,$.result)}},W9=async function($){switch(Y(this,MZ,"f").noteEvent($),$.type){case"agent.tool_use":case"agent.custom_tool_use":if(!Y(this,E0,"f").has($.id))Y(this,E0,"f").add($.id),await Y(this,c,"m",T1).call(this,$);return!1;case"user.tool_confirmation":return await Y(this,c,"m",N9).call(this,$),!1;case"user.tool_result":return Y(this,WZ,"f").add($.tool_use_id),!1;case"user.custom_tool_result":return Y(this,WZ,"f").add($.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return Y(this,r,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),Y(this,t,"f").abort(),!0;default:return!1}},T1=async function($){let X=$.evaluated_permission,J=X==="deny"?"deny":Y(this,F0,"f").get($.id);if(J===void 0){if(X===void 0||X==="allow")await Y(this,c,"m",A1).call(this,$,void 0);else if(!Y(this,dZ,"f").has($.id))Y(this,r,"f").info("tool call awaiting confirmation; holding",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,dZ,"f").set($.id,$),Y(this,MZ,"f").block($.id);return}await Y(this,c,"m",XX).call(this,$,J)},N9=async function($){Y(this,F0,"f").set($.tool_use_id,$.result);let X=Y(this,dZ,"f").get($.tool_use_id);if(X===void 0)return;await Y(this,c,"m",XX).call(this,X,$.result)},XX=async function($,X){let J=Y(this,dZ,"f").delete($.id);if(X==="allow"){if(Y(this,r,"f").info("tool call confirmed",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),!J)Y(this,MZ,"f").block($.id);try{await Y(this,c,"m",A1).call(this,$,"allow")}finally{Y(this,MZ,"f").unblock($.id)}return}if(J)Y(this,MZ,"f").unblock($.id);Y(this,WZ,"f").add($.id),Y(this,r,"f").info("tool call denied; not executing",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,c,"m",JX).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:"deny"})},JX=function($){Y(this,S0,"f").push($)},A1=async function($,X){var J,z;if(Y(this,WZ,"f").has($.id))return;Y(this,r,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),G(this,kZ,(J=Y(this,kZ,"f"),J++,J),"f");try{let K=Y(this,YX,"f").get($.name);if(!K){Y(this,r,"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:$.name,tool_use_id:$.id}),Y(this,c,"m",JX).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:X});return}let V,Q,U=new AbortController,q=mZ(Y(this,t,"f").signal,U),x=setTimeout(()=>U.abort(),e7);try{let M=await Y9(K,$.input,{toolUse:$,toolUseBlock:$,signal:U.signal});V=M.content,Q=M.isError}finally{clearTimeout(x),q()}let w=Y5($,Q,K5(V)),N=await Y(this,c,"m",U9).call(this,w,$.id);Y(this,c,"m",JX).call(this,{event:$,result:w,toolUseId:$.id,name:$.name,isError:Q,posted:N,confirmation:X})}finally{if(G(this,kZ,(z=Y(this,kZ,"f"),z--,z),"f"),Y(this,kZ,"f")===0)Y(this,b8,"f")?.call(this)}},U9=async function($,X){let J=Y(this,t,"f"),z=Date.now(),K,V=0;while(!0){V++,J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[$]},Y(this,c,"m",$X).call(this)),Y(this,WZ,"f").add(X),!0}catch(Q){if(K=Q,uZ(Q))break;let U=Y(this,KX,"f")-(Date.now()-z);if(U<=0)break;let q=Math.min(l$(p$(V-1,$5,X5)),U);Y(this,r,"f").warn("tool result send failed; retrying",{tool_use_id:X,attempt:V,backoff_ms:q,error:String(Q)}),await BZ(q,J.signal)}}return Y(this,r,"f").error("failed to send tool result",{tool_use_id:X,attempts:V,error:String(K)}),!1},G9=async function(){if(Y(this,kZ,"f")===0)return;if(await Promise.race([new Promise(($)=>G(this,b8,$,"f")),BZ(Z5)]),G(this,b8,null,"f"),Y(this,kZ,"f")>0)Y(this,r,"f").warn("drain timeout exceeded")}});function W5(Z){return Z.resources.some(($)=>$.type==="memory_store")}function N5(Z){if(!Z)return null;let $;try{let J=Z.replace(/-/g,"+").replace(/_/g,"/"),z=J.padEnd(Math.ceil(J.length/4)*4,"=");$=JSON.parse(Q8(W6(z)))}catch{return null}if($===null||typeof $!=="object"||Array.isArray($))return null;let X=$.sessions_token;return typeof X==="string"&&X!==""?X:null}class v8{constructor(Z){if(VX.add(this),h8.set(this,void 0),Z.unrestrictedPaths!==void 0)throw new H("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)S4(Z.memorySyncIntervalMs,"memorySyncIntervalMs");this.memorySyncIntervalMs=Z.memorySyncIntervalMs,this.memorySyncDeletions=Z.memorySyncDeletions??"enabled",this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,G(this,h8,Z.signal,"f")}async run(Z){let{environmentId:$,environmentKey:X}=this;if($===void 0||X===void 0)throw new H("EnvironmentWorker.run: environmentId and environmentKey are required to poll for work");let J=Z??Y(this,h8,"f"),z=new $0({client:this.client,environmentId:$,environmentKey:X,...this.workerId!==void 0?{workerId:this.workerId}:{},...J?{signal:J}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},autoStop:!1});for await(let K of z)try{await Y(this,VX,"m",D1).call(this,K,X,z.signal)}catch(V){if(z.signal?.aborted)throw V;y(this.client).error("work item failed",{work_id:K.id,error:String(V)})}}async handleItem(Z){let $=Z?.workId??R("ANTHROPIC_WORK_ID"),X=Z?.environmentId??R("ANTHROPIC_ENVIRONMENT_ID"),J=Z?.sessionId??R("ANTHROPIC_SESSION_ID"),z=Z?.environmentKey??this.environmentKey??R("ANTHROPIC_ENVIRONMENT_KEY"),K=Z?.workSecret||R("ANTHROPIC_WORK_SECRET")||null;if(!$)throw new H("handleItem: workId is required — pass it or set ANTHROPIC_WORK_ID");if(!X)throw new H("handleItem: environmentId is required — pass it or set ANTHROPIC_ENVIRONMENT_ID");if(!J)throw new H("handleItem: sessionId is required — pass it or set ANTHROPIC_SESSION_ID");if(!z)throw new H("handleItem: environmentKey is required — pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY");let V={id:$,environment_id:X,secret:K,data:{type:"session",id:J}};await Y(this,VX,"m",D1).call(this,V,z,Z?.signal??Y(this,h8,"f"))}}async function H9(Z,$){let X;try{return await Promise.race([Z.then(()=>!1,()=>!1),new Promise((J)=>{X=setTimeout(()=>J(!0),$)})])}finally{if(X!==void 0)clearTimeout(X)}}async function U5(Z,$,X,J){try{await Z.beta.environments.work.stop($.id,{environment_id:$.environment_id,force:!0},{...J,headers:W([J?.headers])})}catch(z){if(!yZ(z,409))X.error("force-stop on exit failed",{work_id:$.id,error:String(z)})}}class B9{constructor(Z){g8.set(this,void 0),R0.set(this,void 0),G(this,g8,Z,"f")}get signal(){return Y(this,g8,"f").signal}finish(Z){G(this,R0,Y(this,R0,"f")??Z,"f"),Y(this,g8,"f").abort()}get lost(){return Y(this,R0,"f")==="lease_lost"||Y(this,R0,"f")==="assumed_lost"}}function O5(Z){let $=Z instanceof _?Z.error:void 0;for(let X of["error","details","current_state"]){if(!IX($))return{};$=$[X]}return IX($)?$:{}}async function w5(Z,$,X,J,z,K){let V=M9,Q=Q5,U=Date.now(),q=V5,x=async()=>{let w=new AbortController,N=mZ(X.signal,w),M=setTimeout(()=>w.abort(),V);try{let B=await Z.beta.environments.work.heartbeat($.id,{environment_id:$.environment_id,expected_last_heartbeat:q},{...z,headers:W([z?.headers]),signal:w.signal});if(U=Date.now(),q=B.last_heartbeat,B.ttl_seconds>0)Q=B.ttl_seconds*1000,V=Math.max(1000,Math.min(Q/2,M9)),K?.(Q);if(B.state==="stopping"||B.state==="stopped")J.info("heartbeat signals shutdown",{work_id:$.id,state:B.state}),X.finish("control_plane_stop");if(!B.lease_extended)J.warn("lease not extended, shutting down",{work_id:$.id}),X.finish("control_plane_stop")}catch(B){if(X.signal.throwIfAborted(),yZ(B,412)){let E=O5(B);J.error("lease lost: heartbeat precondition failed",{work_id:$.id,server_state:E.state,server_ttl_seconds:E.ttl_seconds,server_last_heartbeat:E.last_heartbeat}),X.finish("lease_lost");return}if(uZ(B))throw J.error("permanent heartbeat failure",{work_id:$.id,error:String(B)}),X.finish("heartbeat_rejected"),B;if(Date.now()-U>Q){J.error("lease assumed lost: no successful heartbeat in ttl",{work_id:$.id,ttl_ms:Q,error:String(B)}),X.finish("assumed_lost");return}J.warn("transient heartbeat failure",{work_id:$.id,error:String(B)})}finally{clearTimeout(M),N()}};await x();while(!X.signal.aborted)await BZ(V,X.signal),X.signal.throwIfAborted(),await x()}var VX,h8,D1,g8,R0,M9=30000,Q5=90000,V5="NO_HEARTBEAT";var j1=C(()=>{zZ();m();IZ();dX();V8();C0();O0();R8();d$();wZ();I();QX();s$();H1();E4();h8=new WeakMap,VX=new WeakSet,D1=async function($,X,J){let z=y(this.client),K=N5($.secret);if($.secret&&K===null)z.warn("work item carried a secret payload but no sessions token could be extracted; falling back to the environment key",{work_id:$.id});let V=K??X,Q=i$(this.client,{authToken:V,helper:"environments-worker"}),U=$.data.id,q=new AbortController,x=mZ(J,q),w=new B9(q),N=await import("./node-1.1.20-7meq917d.mjs"),M,B,E=w5(Q,$,w,z,this.requestOptions,(L)=>{M=L,B?._setSendRetryWindow(L)}).catch((L)=>{if(!q.signal.aborted)z.error("heartbeat loop failed",{work_id:$.id,error:String(L)});q.abort()}),D=async()=>{},j,T=!1;try{if($.data.type!=="session"){z.debug("skipping non-session work item",{work_id:$.id,type:$.data.type});return}let L=await Q.beta.sessions.retrieve(U);if(K===null&&this.memorySyncIntervalMs!==null&&W5(L))throw new N.SessionMemoryError(`cannot mount the session's memories: the work item carried no sessions token (work_id=${$.id}, session_id=${U}); 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 F={workdir:this.workdir,client:Q,session:L,...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}};try{D=await N.setupSkills(F)}catch(g){z.warn("skill setup failed",{session_id:U,work_id:$.id,error:String(g)})}if(K!==null&&this.memorySyncIntervalMs!==null)j=new N.SessionMemoryStores(Q,{workdir:this.workdir,...this.memorySyncIntervalMs!==void 0?{syncIntervalMs:this.memorySyncIntervalMs}:{},syncDeletions:this.memorySyncDeletions}),await j.download(L),F.allowedRoots=j.roots,F.readOnlyRoots=j.readOnlyRoots;else z.debug("memory stores disabled for this item",{work_id:$.id});let f=typeof this.tools==="function"?this.tools(F):this.tools??N.betaAgentToolset20260401(F);if(B=new J0(U,{client:Q,tools:f,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:q.signal}),M!==void 0)B._setSendRetryWindow(M);for await(let g of B)if(j)await j.syncIfDue();T=!q.signal.aborted}finally{try{await D().catch((L)=>{z.warn("skill cleanup failed",{session_id:U,work_id:$.id,error:String(L)})})}finally{if(j){let L=N.MEMORY_FLUSH_TIMEOUT_MS;if(T){if(await H9(j.finish(),L))z.warn(`final memory sync cut off after ${L}ms; the flush that follows still uploads changed files`,{session_id:U,work_id:$.id})}let F=new AbortController;if(await H9(j.flushWrites(F.signal),L))F.abort(),z.warn(`memory flush cut off after ${L}ms; changed files it had not uploaded yet are not saved`,{session_id:U,work_id:$.id});await j.dispose().catch((g)=>{z.warn("memory store cleanup failed",{session_id:U,work_id:$.id,error:String(g)})})}}if(w.finish("runner_done"),x(),await E,w.lost)z.info("lease lost; released without stopping it",{session_id:U,work_id:$.id});else await U5(Q,$,z,this.requestOptions)}};g8=new WeakMap,R0=new WeakMap});var z0;var L1=C(()=>{P();k();I();b();s$();j1();s$();j1();z0=class z0 extends A{retrieve(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.get(O`/v1/environments/${J}/work/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{environment_id:J,betas:z,...K}=$;return this._client.post(O`/v1/environments/${J}/work/${Z}?beta=true`,{body:K,...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/environments/${Z}/work?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}ack(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.post(O`/v1/environments/${J}/work/${Z}/ack?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}heartbeat(Z,$,X){let{environment_id:J,desired_ttl_seconds:z,expected_last_heartbeat:K,betas:V}=$;return this._client.post(O`/v1/environments/${J}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:z,expected_last_heartbeat:K},...X,headers:W([{"anthropic-beta":[...V??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poll(Z,$={},X){let{betas:J,"Anthropic-Worker-ID":z,...K}=$??{};return this._client.get(O`/v1/environments/${Z}/work/poll?beta=true`,{query:K,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"Anthropic-Worker-ID":z}:void 0},X?.headers])})}stats(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/environments/${Z}/work/stats?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stop(Z,$,X){let{environment_id:J,betas:z,...K}=$;return this._client.post(O`/v1/environments/${J}/work/${Z}/stop?beta=true`,{body:K,...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poller(Z){return new $0({...Z,client:this._client})}worker(Z){return new v8({...Z,client:this._client})}};z0.WorkPoller=$0;z0.EnvironmentWorker=v8});var I0;var S1=C(()=>{P();L1();L1();k();I();b();I0=class I0 extends A{constructor(){super(...arguments);this.work=new z0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/environments?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/environments/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/environments/${Z}?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/environments?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(O`/v1/environments/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/environments/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};I0.Work=z0});var _8;var E1=C(()=>{P();k();I();b();_8=class _8 extends A{create(Z,$,X){let{view:J,betas:z,...K}=$;return this._client.post(O`/v1/memory_stores/${Z}/memories?beta=true`,{query:{view:J},body:K,...X,headers:W([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{memory_store_id:J,betas:z,...K}=$;return this._client.get(O`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:K,...X,headers:W([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{memory_store_id:J,view:z,betas:K,...V}=$;return this._client.post(O`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{view:z},body:V,...X,headers:W([{"anthropic-beta":[...K??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/memory_stores/${Z}/memories?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}delete(Z,$,X){let{memory_store_id:J,expected_content_sha256:z,betas:K}=$;return this._client.delete(O`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{expected_content_sha256:z},...X,headers:W([{"anthropic-beta":[...K??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var m8;var F1=C(()=>{P();k();I();b();m8=class m8 extends A{retrieve(Z,$,X){let{memory_store_id:J,betas:z,...K}=$;return this._client.get(O`/v1/memory_stores/${J}/memory_versions/${Z}?beta=true`,{query:K,...X,headers:W([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/memory_stores/${Z}/memory_versions?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}redact(Z,$,X){let{memory_store_id:J,betas:z}=$;return this._client.post(O`/v1/memory_stores/${J}/memory_versions/${Z}/redact?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var Y0;var R1=C(()=>{P();E1();E1();F1();F1();k();I();b();Y0=class Y0 extends A{constructor(){super(...arguments);this.memories=new _8(this._client),this.memoryVersions=new m8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/memory_stores?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/memory_stores/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/memory_stores/${Z}?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/memory_stores?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(O`/v1/memory_stores/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/memory_stores/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}};Y0.Memories=_8;Y0.MemoryVersions=m8});var P0=C(()=>{m()});var y0;var I1=C(()=>{m();w0();oX();y0=class y0{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new vZ;for await(let $ of this.iterator)for(let X of Z.decode($))yield JSON.parse(X);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 H("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 H("Attempted to iterate over a response with no body")}return new y0(Y8(Z.body),$)}}});var u8;var P1=C(()=>{P();k();I();I1();P0();b();u8=class u8 extends A{create(Z,$){let{betas:X,user_profile_id:J,...z}=Z;return this._client.post("/v1/messages/batches?beta=true",{body:z,...$,headers:W([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString(),...J!=null?{"anthropic-user-profile-id":J}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/messages/batches/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/messages/batches?beta=true",TZ,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(O`/v1/messages/batches/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/messages/batches/${Z}/cancel?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}async results(Z,$={},X){let J=await this.retrieve(Z);if(!J.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${J.processing_status} - ${J.id}`);let{betas:z}=$??{};return this._client.get(J.results_url,{...X,headers:W([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},X?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((K,V)=>y0.fromResponse(V.response,V.controller))}}});var WX;var y1=C(()=>{WX={"claude-opus-4@20250514":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function x9(Z){return Z?.output_format??Z?.output_config?.format}function k1(Z,$,X){let J=x9($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text"){let K=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(K,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return z}),parsed_output:null};return f1(Z,$,X)}function f1(Z,$,X){let J=null,z=Z.content.map((K)=>{if(K.type==="text"){let V=x5($,K.text);if(J===null)J=V;let Q=Object.defineProperty({...K},"parsed_output",{value:V,enumerable:!1});return Object.defineProperty(Q,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),V},enumerable:!1})}return K});return{...Z,content:z,parsed_output:J}}function x5(Z,$){let X=x9(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var b1=C(()=>{m()});var h1=C(()=>{O8()});var T5=(Z)=>{let $=0,X=[];while($<Z.length){let J=Z[$];if(J==="\\"){$++;continue}if(J==="{"){X.push({type:"brace",value:"{"}),$++;continue}if(J==="}"){X.push({type:"brace",value:"}"}),$++;continue}if(J==="["){X.push({type:"paren",value:"["}),$++;continue}if(J==="]"){X.push({type:"paren",value:"]"}),$++;continue}if(J===":"){X.push({type:"separator",value:":"}),$++;continue}if(J===","){X.push({type:"delimiter",value:","}),$++;continue}if(J==='"'){let Q="",U=!1;J=Z[++$];while(J!=='"'){if($===Z.length){U=!0;break}if(J==="\\"){if($++,$===Z.length){U=!0;break}Q+=J+Z[$],J=Z[++$]}else Q+=J,J=Z[++$]}if(J=Z[++$],!U)X.push({type:"string",value:Q});continue}if(J&&/\s/.test(J)){$++;continue}let K=/[0-9]/;if(J&&K.test(J)||J==="-"||J==="."){let Q="";if(J==="-")Q+=J,J=Z[++$];while(J&&(K.test(J)||J==="."||J==="e"||J==="E"||(J==="-"||J==="+")&&(Q[Q.length-1]==="e"||Q[Q.length-1]==="E")))Q+=J,J=Z[++$];X.push({type:"number",value:Q});continue}let V=/[a-z]/i;if(J&&V.test(J)){let Q="";while(J&&V.test(J)){if($===Z.length)break;Q+=J,J=Z[++$]}if(Q=="true"||Q=="false"||Q==="null")X.push({type:"name",value:Q});else{$++;continue}continue}$++}return X},k0=(Z)=>{if(Z.length===0)return Z;let $=Z[Z.length-1];switch($.type){case"separator":return Z=Z.slice(0,Z.length-1),k0(Z);break;case"number":let X=$.value[$.value.length-1];if(X==="."||X==="-"||X==="+"||X==="e"||X==="E")return Z=Z.slice(0,Z.length-1),k0(Z);case"string":let J=Z[Z.length-2];if(J?.type==="delimiter")return Z=Z.slice(0,Z.length-1),k0(Z);else if(J?.type==="brace"&&J.value==="{")return Z=Z.slice(0,Z.length-1),k0(Z);break;case"delimiter":return Z=Z.slice(0,Z.length-1),k0(Z);break}return Z},A5=(Z)=>{let $=[];if(Z.map((X)=>{if(X.type==="brace")if(X.value==="{")$.push("}");else $.splice($.lastIndexOf("}"),1);if(X.type==="paren")if(X.value==="[")$.push("]");else $.splice($.lastIndexOf("]"),1)}),$.length>0)$.reverse().map((X)=>{if(X==="}")Z.push({type:"brace",value:"}"});else if(X==="]")Z.push({type:"paren",value:"]"})});return Z},D5=(Z)=>{let $="";return Z.map((X)=>{switch(X.type){case"string":$+='"'+X.value+'"';break;default:$+=X.value;break}}),$},T9=(Z)=>JSON.parse(D5(A5(k0(T5(Z)))));var A9=()=>{};function NX(Z,$){let X={};for(let K of Object.keys(Z))if(K!=="input")X[K]=Z[K];Object.defineProperty(X,pZ,{value:$,enumerable:!1,writable:!0});let J,z=!1;return Object.defineProperty(X,"input",{enumerable:!0,configurable:!0,get(){if(!z)J=$?T9($):{},z=!0;return J}}),X}var pZ="__json_buf";var g1=C(()=>{A9()});function d1(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"||Z.type==="mcp_tool_use"}function L9(Z){}var XZ,lZ,f0,c8,UX,d8,p8,OX,l8,EZ,i8,wX,GX,K0,qX,CX,MX,n8,v1,D9,a8,_1,m1,u1,j9,c1,r8;var S9=C(()=>{zZ();AZ();P0();hZ();h1();b1();g1();r8=class r8{constructor(Z,$){XZ.add(this),this.messages=[],this.receivedMessages=[],lZ.set(this,void 0),f0.set(this,null),this.controller=new AbortController,c8.set(this,void 0),UX.set(this,()=>{}),d8.set(this,()=>{}),p8.set(this,void 0),OX.set(this,()=>{}),l8.set(this,()=>{}),EZ.set(this,{}),i8.set(this,!1),wX.set(this,!1),GX.set(this,!1),K0.set(this,!1),qX.set(this,void 0),CX.set(this,void 0),MX.set(this,void 0),n8.set(this,void 0),a8.set(this,(X)=>{if(G(this,wX,!0,"f"),OZ(X))X=new s;if(X instanceof s)return G(this,GX,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),G(this,c8,new Promise((X,J)=>{G(this,UX,X,"f"),G(this,d8,J,"f")}),"f"),G(this,p8,new Promise((X,J)=>{G(this,OX,X,"f"),G(this,l8,J,"f")}),"f"),Y(this,c8,"f").catch(()=>{}),Y(this,p8,"f").catch(()=>{}),G(this,f0,Z,"f"),G(this,n8,$?.logger??console,"f")}get response(){return Y(this,qX,"f")}get request_id(){return Y(this,CX,"f")}get workspace_id(){return Y(this,MX,"f")}async withResponse(){G(this,K0,!0,"f");let Z=await Y(this,c8,"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 r8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new r8($,{logger:J});for(let K of $.messages)z._addMessageParam(K);return G(z,f0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[v$]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Y(this,a8,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Y(this,XZ,"m",_1).call(this);let{response:K,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(K);for await(let Q of V)Y(this,XZ,"m",m1).call(this,Q);if(V.controller.signal?.aborted)throw new s;Y(this,XZ,"m",u1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;G(this,qX,Z,"f"),G(this,CX,Z?.headers.get("request-id"),"f"),G(this,MX,Z?.headers.get("anthropic-workspace-id"),"f"),Y(this,UX,"f").call(this,Z),this._emit("connect")}get ended(){return Y(this,i8,"f")}get errored(){return Y(this,wX,"f")}get aborted(){return Y(this,GX,"f")}abort(){this.controller.abort()}on(Z,$){return(Y(this,EZ,"f")[Z]||(Y(this,EZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=Y(this,EZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(Y(this,EZ,"f")[Z]||(Y(this,EZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(G(this,K0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){G(this,K0,!0,"f"),await Y(this,p8,"f")}get currentMessage(){return Y(this,lZ,"f")}async finalMessage(){return await this.done(),Y(this,XZ,"m",v1).call(this)}async finalText(){return await this.done(),Y(this,XZ,"m",D9).call(this)}_emit(Z,...$){if(Y(this,i8,"f"))return;if(Z==="end")G(this,i8,!0,"f"),Y(this,OX,"f").call(this);let X=Y(this,EZ,"f")[Z];if(X)Y(this,EZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!Y(this,K0,"f")&&!X?.length)Promise.reject(J);Y(this,d8,"f").call(this,J),Y(this,l8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!Y(this,K0,"f")&&!X?.length)Promise.reject(J);Y(this,d8,"f").call(this,J),Y(this,l8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Y(this,XZ,"m",v1).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{Y(this,XZ,"m",_1).call(this),this._connected(null);let z=ZZ.fromReadableStream(Z,this.controller);for await(let K of z)Y(this,XZ,"m",m1).call(this,K);if(z.controller.signal?.aborted)throw new s;Y(this,XZ,"m",u1).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(lZ=new WeakMap,f0=new WeakMap,c8=new WeakMap,UX=new WeakMap,d8=new WeakMap,p8=new WeakMap,OX=new WeakMap,l8=new WeakMap,EZ=new WeakMap,i8=new WeakMap,wX=new WeakMap,GX=new WeakMap,K0=new WeakMap,qX=new WeakMap,CX=new WeakMap,MX=new WeakMap,n8=new WeakMap,a8=new WeakMap,XZ=new WeakSet,v1=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},D9=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},_1=function(){if(this.ended)return;G(this,lZ,void 0,"f")},m1=function($){if(this.ended)return;let X=Y(this,XZ,"m",j9).call(this,$);switch(this._emit("streamEvent",$,X),$.type){case"content_block_delta":{let J=X.content.at(-1);switch($.delta.type){case"text_delta":{if(J.type==="text")this._emit("text",$.delta.text,J.text||"");break}case"citations_delta":{if(J.type==="text")this._emit("citation",$.delta.citation,J.citations??[]);break}case"input_json_delta":{if(d1(J)&&Y(this,EZ,"f").inputJson?.length){let z;try{z=J.input}catch(K){Y(this,a8,"f").call(this,Y(this,XZ,"m",c1).call(this,J,K));break}this._emit("inputJson",$.delta.partial_json,z)}break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}case"compaction_delta":{if(J.type==="compaction"&&J.content)this._emit("compaction",J.content);break}default:L9($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(k1(X,Y(this,f0,"f"),{logger:Y(this,n8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{G(this,lZ,X,"f");break}case"content_block_start":case"message_delta":break}},u1=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=Y(this,lZ,"f");if(!$)throw new H("request ended without sending any chunks");return G(this,lZ,void 0,"f"),k1($,Y(this,f0,"f"),{logger:Y(this,n8,"f")})},j9=function($){let X=Y(this,lZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.stop_details=$.delta.stop_details,X.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)X.container=$.delta.container;if($.context_management!=null)X.context_management=$.context_management;if($.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.iterations!=null)X.usage.iterations=$.usage.iterations;if($.usage.fallback_credit!=null)X.usage.fallback_credit=$.usage.fallback_credit;if($.usage.output_tokens_details!=null)X.usage.output_tokens_details=$.usage.output_tokens_details;return X;case"content_block_start":if(X.content.push($.content_block),$.content_block.type==="fallback")X.model=$.content_block.to.model;return X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&d1(J)){let z=(J[pZ]||"")+$.delta.partial_json;X.content[$.index]=NX(J,z)}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}case"compaction_delta":{if(J?.type==="compaction")X.content[$.index]={...J,content:(J.content||"")+$.delta.content,encrypted_content:$.delta.encrypted_content};break}default:L9($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&d1(J)&&pZ in J){let z;try{z=J.input}catch(K){z={},Y(this,a8,"f").call(this,Y(this,XZ,"m",c1).call(this,J,K))}Object.defineProperty(J,"input",{value:z,enumerable:!0,configurable:!0,writable:!0})}return X}}},c1=function($,X){let J=$[pZ];return new H(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${X}. JSON: ${J}`)},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,K)=>$.push({resolve:z,reject:K})).then((z)=>z?{value:z,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 ZZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var E9=1e5,F9=`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 R9=()=>{};async function j5(Z,$=Z.messages.at(-1),X){if(!$||$.role!=="assistant"||!$.content||typeof $.content==="string")return null;let J=$.content.filter((V)=>V.type==="tool_use");if(J.length===0)return null;let z=S5(Z);return{role:"user",content:await Promise.all(J.map(async(V)=>{let Q=Z.tools.find((U)=>("name"in U?U.name:("mcp_server_name"in U)?U.mcp_server_name:U.type)===V.name);if(!Q||!("run"in Q)||!z.has(V.name))return L5(V);try{let U=V.input;if("parse"in Q&&Q.parse)U=Q.parse(U);let q=await Q.run(U,{toolUse:V,toolUseBlock:V,signal:X?.signal});return{type:"tool_result",tool_use_id:V.id,content:q}}catch(U){return{type:"tool_result",tool_use_id:V.id,content:U instanceof gZ?U.content:`Error: ${U instanceof Error?U.message:String(U)}`,is_error:!0}}}))}}function L5(Z){return{type:"tool_result",tool_use_id:Z.id,content:`Error: Tool '${Z.name}' not found`,is_error:!0}}function S5(Z){let $=new Set;for(let X of Z.tools)if("run"in X)$.add(X.name);for(let X of Z.messages){if(X.role!=="system"||typeof X.content==="string")continue;for(let J of X.content)E5(J,$)}return $}function E5(Z,$){switch(Z.type){case"tool_removal":case"tool_addition":F5(Z,$);break}}function F5(Z,$){let X=R5(Z.tool);if(X===void 0)return;if(Z.type==="tool_removal")$.delete(X);else $.add(X)}function R5(Z){switch(Z.type){case"tool_reference":return Z.name;default:return}}var o8,b0,Q0,d,JZ,NZ,fZ,iZ,t8,I9,p1,s8;var l1=C(()=>{zZ();Z8();m();I();F4();R9();AZ();s8=class s8{constructor(Z,$,X){o8.add(this),this.client=Z,b0.set(this,!1),Q0.set(this,!1),d.set(this,void 0),JZ.set(this,void 0),NZ.set(this,void 0),fZ.set(this,void 0),iZ.set(this,void 0),t8.set(this,0),G(this,d,{params:{...$,messages:structuredClone($.messages)}},"f");let J=V1($.tools,$.messages);if(G(this,JZ,{...X,headers:W([T8("BetaToolRunner"),J.length?{[x8]:J.join(", ")}:void 0,X?.headers])},"f"),G(this,iZ,EX(),"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,Q0=new WeakMap,d=new WeakMap,JZ=new WeakMap,NZ=new WeakMap,fZ=new WeakMap,iZ=new WeakMap,t8=new WeakMap,o8=new WeakSet,I9=async function(){let $=Y(this,d,"f").params.compactionControl;if(!$||!$.enabled)return!1;let X=0;if(Y(this,NZ,"f")!==void 0)try{let U=await Y(this,NZ,"f");X=U.usage.input_tokens+(U.usage.cache_creation_input_tokens??0)+(U.usage.cache_read_input_tokens??0)+U.usage.output_tokens}catch{return!1}let J=$.contextTokenThreshold??E9;if(X<J)return!1;let z=$.model??Y(this,d,"f").params.model,K=$.summaryPrompt??F9,V=Y(this,d,"f").params.messages;if(V[V.length-1].role==="assistant"){let U=V[V.length-1];if(Array.isArray(U.content)){let q=U.content.filter((x)=>x.type!=="tool_use");if(q.length===0)V.pop();else U.content=q}}let Q=await this.client.beta.messages.create({model:z,messages:[...V,{role:"user",content:[{type:"text",text:K}]}],max_tokens:Y(this,d,"f").params.max_tokens},{signal:Y(this,JZ,"f").signal,headers:W([Y(this,JZ,"f").headers,T8("compaction")])});if(Q.content[0]?.type!=="text")throw new H("Expected text response for compaction");return Y(this,d,"f").params.messages=[{role:"user",content:Q.content}],!0},Symbol.asyncIterator)](){var Z;if(Y(this,b0,"f"))throw new H("Cannot iterate over a consumed stream");G(this,b0,!0,"f"),G(this,Q0,!0,"f"),G(this,fZ,void 0,"f");try{while(!0){let $;try{if(Y(this,d,"f").params.max_iterations&&Y(this,t8,"f")>=Y(this,d,"f").params.max_iterations)break;G(this,Q0,!1,"f"),G(this,fZ,void 0,"f"),G(this,t8,(Z=Y(this,t8,"f"),Z++,Z),"f"),G(this,NZ,void 0,"f");let{max_iterations:X,compactionControl:J,...z}=Y(this,d,"f").params;if(z.stream)$=this.client.beta.messages.stream({...z},Y(this,JZ,"f")),G(this,NZ,$.finalMessage(),"f"),Y(this,NZ,"f").catch(()=>{}),yield $;else G(this,NZ,this.client.beta.messages.create({...z,stream:!1},Y(this,JZ,"f")),"f"),yield Y(this,NZ,"f");if(!await Y(this,o8,"m",I9).call(this)){if(!Y(this,Q0,"f")){let Q=await Y(this,NZ,"f");Y(this,d,"f").params.messages.push({role:Q.role,content:Q.content});let{container:U}=Y(this,d,"f").params;if(Q.container){if(U==null)Y(this,d,"f").params.container=Q.container.id;else if(typeof U==="object"&&U.id==null)Y(this,d,"f").params.container={...U,id:Q.container.id}}if(Q.stop_reason==="refusal")break}let V=await Y(this,o8,"m",p1).call(this,Y(this,d,"f").params.messages.at(-1));if(V)Y(this,d,"f").params.messages.push(V);else if(!Y(this,Q0,"f"))break}}finally{if($)$.abort()}}if(!Y(this,NZ,"f"))throw new H("ToolRunner concluded without a message from the server");Y(this,iZ,"f").resolve(await Y(this,NZ,"f"))}catch($){throw G(this,b0,!1,"f"),Y(this,iZ,"f").promise.catch(()=>{}),Y(this,iZ,"f").reject($),G(this,iZ,EX(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")Y(this,d,"f").params=Z(Y(this,d,"f").params);else Y(this,d,"f").params=Z;G(this,Q0,!0,"f"),G(this,fZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")G(this,JZ,Z(Y(this,JZ,"f")),"f");else G(this,JZ,{...Y(this,JZ,"f"),...Z},"f")}async generateToolResponse(Z=Y(this,JZ,"f").signal){let $=await Y(this,NZ,"f")??this.params.messages.at(-1);if(!$)return null;return Y(this,o8,"m",p1).call(this,$,Z)}done(){return Y(this,iZ,"f").promise}async runUntilDone(){if(!Y(this,b0,"f"))for await(let Z of this);return this.done()}get params(){return Y(this,d,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}};p1=async function($,X=Y(this,JZ,"f").signal){if(Y(this,fZ,"f")!==void 0)return Y(this,fZ,"f");return G(this,fZ,j5(Y(this,d,"f").params,$,{...Y(this,JZ,"f"),signal:X}),"f"),Y(this,fZ,"f")}});function y9(Z){if(!Z.output_format)return Z;if(Z.output_config?.format)throw new H("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:$,...X}=Z;return{...X,output_config:{...Z.output_config,format:$}}}var P9,I5,nZ;var i1=C(()=>{P0();P1();P();y1();I();AZ();b1();S9();l1();Z8();P1();l1();Z8();P9={},I5=["claude-mythos-preview","claude-opus-4-6"];nZ=class nZ extends A{constructor(){super(...arguments);this.batches=new u8(this._client)}create(Z,$){let X=y9(Z),{betas:J,user_profile_id:z,...K}=X;if(K.model in P9)console.warn(`The model '${K.model}' is deprecated and will reach end-of-life on ${P9[K.model]}
|
|
32
|
-
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(I5.includes(K.model)&&K.thinking&&K.thinking.type==="enabled")console.warn(`Using Claude with ${K.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 V=$?.timeout??this._client._options.timeout;if(!K.stream&&V==null){let U=WX[K.model]??void 0;V=this._client.calculateNonstreamingTimeout(K.max_tokens,U)}let Q=_$(K.tools,K.messages);return this._client.post("/v1/messages?beta=true",{body:K,timeout:V??600000,...$,headers:W([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-user-profile-id":z}:void 0},Q,$?.headers]),stream:X.stream??!1})}parse(Z,$){return $={...$,headers:W([{"anthropic-beta":[...Z.betas??[],"structured-outputs-2025-12-15"].toString()},$?.headers])},this.create(Z,$).then((X)=>f1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return r8.createMessage(this,Z,$)}countTokens(Z,$){let X=y9(Z),{betas:J,user_profile_id:z,...K}=X;return this._client.post("/v1/messages/count_tokens?beta=true",{body:K,...$,headers:W([{"anthropic-beta":[...J??[],"token-counting-2024-11-01"].toString(),...z!=null?{"anthropic-user-profile-id":z}:void 0},$?.headers])})}toolRunner(Z,$){return new s8(this._client,Z,$)}};nZ.Batches=u8;nZ.BetaToolRunner=s8;nZ.ToolError=gZ});var h0;var n1=C(()=>{P();k();I();b();QX();QX();h0=class h0 extends A{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/sessions/${Z}/events?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}send(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/sessions/${Z}/events?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(O`/v1/sessions/${Z}/events/stream?beta=true`,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}toolRunner(Z,$){return new J0(Z,{...$,client:this._client})}};h0.SessionToolRunner=J0});var e8;var a1=C(()=>{P();k();I();b();e8=class e8 extends A{retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(O`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{session_id:J,betas:z,...K}=$;return this._client.post(O`/v1/sessions/${J}/resources/${Z}?beta=true`,{body:K,...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/sessions/${Z}/resources?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{session_id:J,betas:z}=$;return this._client.delete(O`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/sessions/${Z}/resources?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var Z$;var r1=C(()=>{P();k();I();b();Z$=class Z$ extends A{list(Z,$,X){let{session_id:J,betas:z,...K}=$;return this._client.getAPIList(O`/v1/sessions/${J}/threads/${Z}/events?beta=true`,S,{query:K,...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$,X){let{session_id:J,betas:z,...K}=$;return this._client.get(O`/v1/sessions/${J}/threads/${Z}/stream?beta=true`,{query:K,...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}}});var g0;var o1=C(()=>{P();r1();r1();k();I();b();g0=class g0 extends A{constructor(){super(...arguments);this.events=new Z$(this._client)}retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(O`/v1/sessions/${J}/threads/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/sessions/${Z}/threads?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{session_id:J,betas:z}=$;return this._client.post(O`/v1/sessions/${J}/threads/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};g0.Events=Z$});var aZ;var t1=C(()=>{P();n1();n1();a1();a1();o1();o1();k();I();b();aZ=class aZ extends A{constructor(){super(...arguments);this.events=new h0(this._client),this.resources=new e8(this._client),this.threads=new g0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/sessions?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/sessions/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/sessions/${Z}?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/sessions?beta=true",eX,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(O`/v1/sessions/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/sessions/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};aZ.Events=h0;aZ.Resources=e8;aZ.Threads=g0});var $$;var s1=C(()=>{P();k();I();PZ();b();$$=class $$ extends A{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/skills/${Z}/versions?beta=true`,qZ({body:z,...X,headers:W([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])},this._client,!1))}retrieve(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(O`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/skills/${Z}/versions?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}delete(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.delete(O`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}download(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(O`/v1/skills/${J}/versions/${Z}/content?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}}});var v0;var e1=C(()=>{P();s1();s1();k();I();PZ();b();v0=class v0 extends A{constructor(){super(...arguments);this.versions=new $$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/skills?beta=true",qZ({body:J,...$,headers:W([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])},this._client,!1))}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/skills/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/skills?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(O`/v1/skills/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}};v0.Versions=$$});var X$;var Z4=C(()=>{P();k();I();b();X$=class X$ extends A{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/tunnels/${Z}/certificates?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{tunnel_id:J,betas:z}=$;return this._client.get(O`/v1/tunnels/${J}/certificates/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/tunnels/${Z}/certificates?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}archive(Z,$,X){let{tunnel_id:J,betas:z}=$;return this._client.post(O`/v1/tunnels/${J}/certificates/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}}});var _0;var $4=C(()=>{P();Z4();Z4();k();I();b();_0=class _0 extends A{constructor(){super(...arguments);this.certificates=new X$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/tunnels?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"mcp-tunnels-2026-06-22"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/tunnels/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/tunnels?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"mcp-tunnels-2026-06-22"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/tunnels/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}revealToken(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/tunnels/${Z}/reveal_token?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}rotateToken(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/tunnels/${Z}/rotate_token?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}};_0.Certificates=X$});var J$;var X4=C(()=>{P();k();I();b();J$=class J$ extends A{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/vaults/${Z}/credentials?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.get(O`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{vault_id:J,betas:z,...K}=$;return this._client.post(O`/v1/vaults/${J}/credentials/${Z}?beta=true`,{body:K,...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(O`/v1/vaults/${Z}/credentials?beta=true`,S,{query:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.delete(O`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(O`/v1/vaults/${J}/credentials/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}mcpOAuthValidate(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(O`/v1/vaults/${J}/credentials/${Z}/mcp_oauth_validate?beta=true`,{...X,headers:W([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var m0;var J4=C(()=>{P();X4();X4();k();I();b();m0=class m0 extends A{constructor(){super(...arguments);this.credentials=new J$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/vaults?beta=true",{body:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/vaults/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(O`/v1/vaults/${Z}?beta=true`,{body:z,...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/vaults?beta=true",S,{query:J,...$,headers:W([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(O`/v1/vaults/${Z}?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(O`/v1/vaults/${Z}/archive?beta=true`,{...X,headers:W([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};m0.Credentials=J$});var i;var z4=C(()=>{P();Y1();Y1();K1();K1();Q1();Q1();W1();W1();N1();N1();U1();U1();G1();G1();C1();C1();S1();S1();R1();R1();i1();i1();t1();t1();e1();e1();$4();$4();J4();J4();i=class i extends A{constructor(){super(...arguments);this.models=new D8(this._client),this.messages=new nZ(this._client),this.agents=new H0(this._client),this.environments=new I0(this._client),this.sessions=new aZ(this._client),this.deployments=new M8(this._client),this.deploymentRuns=new C8(this._client),this.vaults=new m0(this._client),this.memoryStores=new Y0(this._client),this.files=new A8(this._client),this.skills=new v0(this._client),this.webhooks=new E8(this._client),this.userProfiles=new j8(this._client),this.dreams=new H8(this._client),this.tunnels=new _0(this._client)}};i.Models=D8;i.Messages=nZ;i.Agents=H0;i.Environments=I0;i.Sessions=aZ;i.Deployments=M8;i.DeploymentRuns=C8;i.Vaults=m0;i.MemoryStores=Y0;i.Files=A8;i.Skills=v0;i.Webhooks=E8;i.UserProfiles=j8;i.Dreams=H8;i.Tunnels=_0});var u0;var Y4=C(()=>{P();I();u0=class u0 extends A{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/complete",{body:J,timeout:this._client._options.timeout??600000,...$,headers:W([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers]),stream:Z.stream??!1})}}});var c0;var K4=C(()=>{P();k();I();AZ();PZ();b();c0=class c0 extends A{list(Z={},$){return this._client.getAPIList("/v1/files",S,{query:Z,...$})}delete(Z,$){return this._client.delete(O`/v1/files/${Z}`,$)}download(Z,$){return this._client.get(O`/v1/files/${Z}/content`,{...$,headers:W([{Accept:"application/binary"},$?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$){return this._client.get(O`/v1/files/${Z}`,$)}upload(Z,$){return this._client.post("/v1/files",qZ({body:Z,...$,headers:W([m$(Z.file),$?.headers])},this._client))}}});function k9(Z){return Z?.output_config?.format}function Q4(Z,$,X){let J=k9($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text")return Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return z}),parsed_output:null};return V4(Z,$,X)}function V4(Z,$,X){let J=null,z=Z.content.map((K)=>{if(K.type==="text"){let V=d5($,K.text);if(J===null)J=V;return Object.defineProperty({...K},"parsed_output",{value:V,enumerable:!1})}return K});return{...Z,content:z,parsed_output:J}}function d5(Z,$){let X=k9(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var W4=C(()=>{m()});function q4(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"}function h9(Z){}var HZ,rZ,d0,z$,HX,Y$,K$,BX,Q$,FZ,V$,xX,TX,V0,AX,DX,jX,W$,N4,f9,U4,O4,w4,G4,b9,N$;var g9=C(()=>{zZ();AZ();hZ();P0();h1();W4();g1();N$=class N${constructor(Z,$){HZ.add(this),this.messages=[],this.receivedMessages=[],rZ.set(this,void 0),d0.set(this,null),this.controller=new AbortController,z$.set(this,void 0),HX.set(this,()=>{}),Y$.set(this,()=>{}),K$.set(this,void 0),BX.set(this,()=>{}),Q$.set(this,()=>{}),FZ.set(this,{}),V$.set(this,!1),xX.set(this,!1),TX.set(this,!1),V0.set(this,!1),AX.set(this,void 0),DX.set(this,void 0),jX.set(this,void 0),W$.set(this,void 0),U4.set(this,(X)=>{if(G(this,xX,!0,"f"),OZ(X))X=new s;if(X instanceof s)return G(this,TX,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),G(this,z$,new Promise((X,J)=>{G(this,HX,X,"f"),G(this,Y$,J,"f")}),"f"),G(this,K$,new Promise((X,J)=>{G(this,BX,X,"f"),G(this,Q$,J,"f")}),"f"),Y(this,z$,"f").catch(()=>{}),Y(this,K$,"f").catch(()=>{}),G(this,d0,Z,"f"),G(this,W$,$?.logger??console,"f")}get response(){return Y(this,AX,"f")}get request_id(){return Y(this,DX,"f")}get workspace_id(){return Y(this,jX,"f")}async withResponse(){G(this,V0,!0,"f");let Z=await Y(this,z$,"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 N$(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new N$($,{logger:J});for(let K of $.messages)z._addMessageParam(K);return G(z,d0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[v$]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Y(this,U4,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Y(this,HZ,"m",O4).call(this);let{response:K,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(K);for await(let Q of V)Y(this,HZ,"m",w4).call(this,Q);if(V.controller.signal?.aborted)throw new s;Y(this,HZ,"m",G4).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;G(this,AX,Z,"f"),G(this,DX,Z?.headers.get("request-id"),"f"),G(this,jX,Z?.headers.get("anthropic-workspace-id"),"f"),Y(this,HX,"f").call(this,Z),this._emit("connect")}get ended(){return Y(this,V$,"f")}get errored(){return Y(this,xX,"f")}get aborted(){return Y(this,TX,"f")}abort(){this.controller.abort()}on(Z,$){return(Y(this,FZ,"f")[Z]||(Y(this,FZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=Y(this,FZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(Y(this,FZ,"f")[Z]||(Y(this,FZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(G(this,V0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){G(this,V0,!0,"f"),await Y(this,K$,"f")}get currentMessage(){return Y(this,rZ,"f")}async finalMessage(){return await this.done(),Y(this,HZ,"m",N4).call(this)}async finalText(){return await this.done(),Y(this,HZ,"m",f9).call(this)}_emit(Z,...$){if(Y(this,V$,"f"))return;if(Z==="end")G(this,V$,!0,"f"),Y(this,BX,"f").call(this);let X=Y(this,FZ,"f")[Z];if(X)Y(this,FZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!Y(this,V0,"f")&&!X?.length)Promise.reject(J);Y(this,Y$,"f").call(this,J),Y(this,Q$,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!Y(this,V0,"f")&&!X?.length)Promise.reject(J);Y(this,Y$,"f").call(this,J),Y(this,Q$,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Y(this,HZ,"m",N4).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{Y(this,HZ,"m",O4).call(this),this._connected(null);let z=ZZ.fromReadableStream(Z,this.controller);for await(let K of z)Y(this,HZ,"m",w4).call(this,K);if(z.controller.signal?.aborted)throw new s;Y(this,HZ,"m",G4).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(rZ=new WeakMap,d0=new WeakMap,z$=new WeakMap,HX=new WeakMap,Y$=new WeakMap,K$=new WeakMap,BX=new WeakMap,Q$=new WeakMap,FZ=new WeakMap,V$=new WeakMap,xX=new WeakMap,TX=new WeakMap,V0=new WeakMap,AX=new WeakMap,DX=new WeakMap,jX=new WeakMap,W$=new WeakMap,U4=new WeakMap,HZ=new WeakSet,N4=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},f9=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},O4=function(){if(this.ended)return;G(this,rZ,void 0,"f")},w4=function($){if(this.ended)return;let X=Y(this,HZ,"m",b9).call(this,$);switch(this._emit("streamEvent",$,X),$.type){case"content_block_delta":{let J=X.content.at(-1);switch($.delta.type){case"text_delta":{if(J.type==="text")this._emit("text",$.delta.text,J.text||"");break}case"citations_delta":{if(J.type==="text")this._emit("citation",$.delta.citation,J.citations??[]);break}case"input_json_delta":{if(q4(J)&&Y(this,FZ,"f").inputJson?.length)this._emit("inputJson",$.delta.partial_json,J.input);break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}default:h9($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(Q4(X,Y(this,d0,"f"),{logger:Y(this,W$,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{G(this,rZ,X,"f");break}case"content_block_start":case"message_delta":break}},G4=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=Y(this,rZ,"f");if(!$)throw new H("request ended without sending any chunks");return G(this,rZ,void 0,"f"),Q4($,Y(this,d0,"f"),{logger:Y(this,W$,"f")})},b9=function($){let X=Y(this,rZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.stop_details=$.delta.stop_details,X.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)X.container=$.delta.container;if($.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.output_tokens_details!=null)X.usage.output_tokens_details=$.usage.output_tokens_details;return X;case"content_block_start":return X.content.push({...$.content_block}),X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&q4(J)){let z=(J[pZ]||"")+$.delta.partial_json;X.content[$.index]=NX(J,z)}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}default:h9($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&q4(J)&&pZ in J)Object.defineProperty(J,"input",{value:J.input,enumerable:!0,configurable:!0,writable:!0});return X}}},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,K)=>$.push({resolve:z,reject:K})).then((z)=>z?{value:z,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 ZZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var U$;var C4=C(()=>{P();k();I();I1();P0();b();U$=class U$ extends A{create(Z,$){let{user_profile_id:X,...J}=Z;return this._client.post("/v1/messages/batches",{body:J,...$,headers:W([{...X!=null?{"anthropic-user-profile-id":X}:void 0},$?.headers])})}retrieve(Z,$){return this._client.get(O`/v1/messages/batches/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/messages/batches",TZ,{query:Z,...$})}delete(Z,$){return this._client.delete(O`/v1/messages/batches/${Z}`,$)}cancel(Z,$){return this._client.post(O`/v1/messages/batches/${Z}/cancel`,$)}async results(Z,$){let X=await this.retrieve(Z);if(!X.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${X.processing_status} - ${X.id}`);return this._client.get(X.results_url,{...$,headers:W([{Accept:"application/binary"},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((J,z)=>y0.fromResponse(z.response,z.controller))}}});var W0,v9,l5;var M4=C(()=>{P();I();AZ();g9();W4();C4();C4();y1();W0=class W0 extends A{constructor(){super(...arguments);this.batches=new U$(this._client)}create(Z,$){let{user_profile_id:X,...J}=Z;if(J.model in v9)console.warn(`The model '${J.model}' is deprecated and will reach end-of-life on ${v9[J.model]}
|
|
33
|
-
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(l5.includes(J.model)&&J.thinking&&J.thinking.type==="enabled")console.warn(`Using Claude with ${J.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 z=$?.timeout??this._client._options.timeout;if(!J.stream&&z==null){let V=WX[J.model]??void 0;z=this._client.calculateNonstreamingTimeout(J.max_tokens,V)}let K=_$(J.tools,J.messages);return this._client.post("/v1/messages",{body:J,timeout:z??600000,...$,headers:W([{...X!=null?{"anthropic-user-profile-id":X}:void 0},K,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((X)=>V4(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return N$.createMessage(this,Z,$,{logger:this._client.logger??console})}countTokens(Z,$){let{user_profile_id:X,...J}=Z;return this._client.post("/v1/messages/count_tokens",{body:J,...$,headers:W([{...X!=null?{"anthropic-user-profile-id":X}:void 0},$?.headers])})}};v9={},l5=["claude-mythos-preview","claude-opus-4-6"];W0.Batches=U$});var p0;var H4=C(()=>{P();k();I();b();p0=class p0 extends A{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(O`/v1/models/${Z}`,{...X,headers:W([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models",TZ,{query:J,...$,headers:W([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var O$;var B4=C(()=>{P();k();PZ();b();O$=class O$ extends A{create(Z,$,X){return this._client.post(O`/v1/skills/${Z}/versions`,qZ({body:$,...X},this._client,!1))}retrieve(Z,$,X){let{skill_id:J}=$;return this._client.get(O`/v1/skills/${J}/versions/${Z}`,X)}list(Z,$={},X){return this._client.getAPIList(O`/v1/skills/${Z}/versions`,S,{query:$,...X})}delete(Z,$,X){let{skill_id:J}=$;return this._client.delete(O`/v1/skills/${J}/versions/${Z}`,X)}}});var N0;var x4=C(()=>{P();B4();B4();k();PZ();b();N0=class N0 extends A{constructor(){super(...arguments);this.versions=new O$(this._client)}create(Z,$){return this._client.post("/v1/skills",qZ({body:Z,...$},this._client,!1))}retrieve(Z,$){return this._client.get(O`/v1/skills/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/skills",S,{query:Z,...$})}delete(Z,$){return this._client.delete(O`/v1/skills/${Z}`,$)}};N0.Versions=O$});var _9=C(()=>{z4();Y4();K4();M4();H4();x4();h6()});class p{get credentials(){return this._authState.provider}constructor({baseURL:Z=R("ANTHROPIC_BASE_URL"),apiKey:$,authToken:X,webhookKey:J=R("ANTHROPIC_WEBHOOK_SIGNING_KEY")??null,...z}={}){if(T4.add(this),this._requestAuthFlags=new WeakMap,LX.set(this,void 0),$===void 0)$=z.profile!=null?null:R("ANTHROPIC_API_KEY")??null;if(X===void 0)X=z.profile!=null?null:R("ANTHROPIC_AUTH_TOKEN")??null;if(z.profile!=null&&(z.credentials!=null||z.config!=null))throw TypeError("Pass at most one of `profile`, `credentials`, or `config`.");let K={apiKey:$,authToken:X,webhookKey:J,...z,baseURL:Z||"https://api.anthropic.com"};if(!K.dangerouslyAllowBrowser&&b4())throw new H(`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=z.__baseURLIsExplicit??!!Z,this.timeout=K.timeout??A4.DEFAULT_TIMEOUT,this.logger=K.logger??console,this.logLevel=N8,this.logLevel=E$(K.logLevel,"ClientOptions.logLevel",y(this))??E$(R("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",y(this))??N8,this.fetchOptions=K.fetchOptions,this.maxRetries=K.maxRetries??2,this.fetch=K.fetch??_4(),G(this,LX,u4,"f"),this.middleware=[...K.middleware??[]];let V=R("ANTHROPIC_CUSTOM_HEADERS");if(V){let U={};for(let q of V.split(`
|
|
41
|
-
`)){let x=q.indexOf(":");if(x>=0)U[q.substring(0,x).trim()]=q.substring(x+1).trim()}K.defaultHeaders={...U,...K.defaultHeaders}}let Q=z.__auth;if(delete K.__auth,delete K.__baseURLIsExplicit,this._options=K,this.apiKey=typeof $==="string"?$:null,this.authToken=X,this.webhookKey=J,Q){if(this._authState=Q,!this._baseURLIsExplicit&&Q.baseURL)this.baseURL=Q.baseURL}else if(this._authState={provider:null,tokenCache:null,resolution:null,error:null,extraHeaders:{}},this.apiKey==null&&this.authToken==null){let U=K.credentials??null;if(U)this._authState.provider=U,this._authState.tokenCache=this._makeTokenCache(U);else if(K.config!=null){let q=rX(K.config,this._credentialResolverOptions());this._authState.provider=q.provider,this._authState.tokenCache=this._makeTokenCache(q.provider),this._authState.extraHeaders=q.extraHeaders,this._applyCredentialBaseURL(q.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)=>{y(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{y(this).warn(Z)}}}_credentialsFetch(){return sX(this.fetch,this.middleware,void 0,this)}_makeTokenCache(Z){return new cX(Z,($)=>{y(this).debug("advisory token refresh failed; serving cached token",$)})}withOptions(Z){let $="credentials"in Z||"config"in Z||"profile"in Z,X="apiKey"in Z||"authToken"in Z||$,J={...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:X?void 0:this._authState,__baseURLIsExplicit:"baseURL"in Z?!0:this._baseURLIsExplicit};return new this.constructor(J)}async _resolveDefaultCredentials(Z){try{let $=await j6(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 H(`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,W([{Authorization:`Bearer ${$}`}])}return W([await this.apiKeyAuth(Z),await this.bearerAuth(Z)])}async apiKeyAuth(Z){if(this.apiKey==null)return;return W([{"X-Api-Key":this.apiKey}])}async bearerAuth(Z){if(this.authToken==null)return;return W([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(Z){return s4(Z)}getUserAgent(){return`Anthropic/JS ${GZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${U0()}`}makeStatusError(Z,$,X,J){return _.generate(Z,$,X,J)}buildURL(Z,$,X){let J=!Y(this,T4,"m",m9).call(this)&&X||this.baseURL,z=R4(Z)?new URL(Z):new URL(J+(J.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),K=this.defaultQuery(),V=Object.fromEntries(z.searchParams);if(!RX(K)||!RX(V))$={...V,...K,...$};if(typeof $==="object"&&$&&!Array.isArray($))z.search=this.stringifyQuery($);return z.toString()}_calculateNonstreamingTimeout(Z){if(3600*Z/128000>600)throw new H("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:X}){if(this._authState.tokenCache&&this.apiKey==null){let J=Z.headers instanceof Headers?Z.headers:new Headers(Z.headers);for(let[K,V]of Object.entries(this._authState.extraHeaders))if(!J.has(K))J.set(K,V);if(!J.get("anthropic-beta")?.split(",").map((K)=>K.trim())?.includes(sZ))J.append("anthropic-beta",sZ);Z.headers=J}}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,$,X){return this.request(Promise.resolve(X).then((J)=>{return{method:Z,path:$,...J}}))}request(Z,$=null){return new eZ(this,this.makeRequest(Z,$,void 0))}async makeRequest(Z,$,X){let J=await Z,z=J.maxRetries??this.maxRetries;if($==null)$=z,this._requestAuthFlags.delete(J);await this.prepareOptions(J);let{req:K,url:V,timeout:Q}=await this.buildRequest(J,{retryCount:z-$}),U="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),q=X===void 0?"":`, retryOf: ${X}`,x=Date.now();if(J.signal?.aborted)throw new s;let w=new AbortController,N=await this.fetchWithTimeout(V,K,Q,w,J,{requestLogID:U,retryOfRequestLogID:X}).catch(tZ),M=Date.now();if(N instanceof globalThis.Error){jZ(w);let D=`retrying, ${$} attempts remaining`;if(J.signal?.aborted)throw new s;let j=OZ(N)||/timed? ?out/i.test(String(N)+("cause"in N?String(N.cause):"")),T=this.middleware.length>0||!!J.middleware?.length||this.backendMiddleware().length>0;if(T&&!j&&!P6(N))throw y(this).info(`[${U}] middleware error (not retryable)`),y(this).debug(`[${U}] middleware error (not retryable)`,SZ({retryOfRequestLogID:X,url:V,durationMs:M-x,message:N.message})),N;if($)return y(this).info(`[${U}] connection ${j?"timed out":"failed"} - ${D}`),y(this).debug(`[${U}] connection ${j?"timed out":"failed"} (${D})`,SZ({retryOfRequestLogID:X,url:V,durationMs:M-x,message:N.message})),this.retryRequest(J,$,X??U);if(y(this).info(`[${U}] connection ${j?"timed out":"failed"} - error; no more retries left`),y(this).debug(`[${U}] connection ${j?"timed out":"failed"} (error; no more retries left)`,SZ({retryOfRequestLogID:X,url:V,durationMs:M-x,message:N.message})),j)throw new l0;if(T&&!tX(N))throw N;throw new RZ({cause:N})}let B=[...N.headers.entries()].filter(([D])=>D==="request-id"||D==="anthropic-workspace-id").map(([D,j])=>", "+D+": "+JSON.stringify(j)).join(""),E=`[${U}${q}${B}] ${K.method} ${V} ${N.ok?"succeeded":"failed"} with status ${N.status} in ${M-x}ms`;if(!N.ok){let D=await this.shouldRetry(N,J);if($&&D){let g=`retrying, ${$} attempts remaining`;return await m4(N.body),jZ(w),y(this).info(`${E} - ${g}`),y(this).debug(`[${U}] response error (${g})`,SZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:M-x})),this.retryRequest(J,$,X??U,N.headers)}let j=D?"error; no more retries left":"error; not retryable";y(this).info(`${E} - ${j}`);let T=await N.text().catch((g)=>tZ(g).message),L=X8(T),F=L?void 0:T;throw y(this).debug(`[${U}] response error (${j})`,SZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,message:F,durationMs:Date.now()-x})),jZ(w),this.makeStatusError(N.status,L,F,N.headers)}return y(this).info(E),y(this).debug(`[${U}] response start`,SZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:M-x})),v4(N.body??N,w),{response:N,options:J,controller:w,requestLogID:U,retryOfRequestLogID:X,startTime:x}}getAPIList(Z,$,X){return this.requestAPIList($,X&&"then"in X?X.then((J)=>({method:"get",path:Z,...J})):{method:"get",path:Z,...X})}requestAPIList(Z,$){let X=this.makeRequest($,null,void 0);return new f$(this,X,Z)}async fetchWithTimeout(Z,$,X,J,z,K){let{signal:V,method:Q,...U}=$||{},q=this._makeAbort(J);if(V)V.addEventListener("abort",q,{once:!0}),g4(J,V,q);let x=globalThis.ReadableStream&&U.body instanceof globalThis.ReadableStream||typeof U.body==="object"&&U.body!==null&&Symbol.asyncIterator in U.body,w={signal:J.signal,...x?{duplex:"half"}:{},method:"GET",...U};if(Q)w.method=Q.toUpperCase();let N=this.fetch,M=async(T,L)=>{let F=setTimeout(q,X);try{return await N.call(void 0,T,L)}finally{clearTimeout(F)}},B=z===void 0?M:async(T,L={})=>{let F=typeof T==="string"?T:T instanceof URL?T.href:T.url;if(L.headers=L.headers instanceof Headers?L.headers:new Headers(L.headers),await this.prepareRequest(L,{url:F,options:z}),K)y(this).debug(`[${K.requestLogID}] sending request`,SZ({retryOfRequestLogID:K.retryOfRequestLogID,method:L.method,url:F,options:z,headers:L.headers}));return M(T,L)},E=z?.middleware,D=this.backendMiddleware(),j=E?.length||D.length?[...this.middleware,...E??[],...D]:this.middleware;return await sX(B,j,z,this)(Z,w)}async shouldRetry(Z,$){let X=this._authFlags($);if(Z.status===401&&this._authState.tokenCache&&X.usedTokenCache&&!X.didRefreshFor401)return X.didRefreshFor401=!0,this._authState.tokenCache.invalidate(),!0;let J=Z.headers.get("x-should-retry");if(J==="true")return!0;if(J==="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,$,X,J){let z,K=J?.get("retry-after-ms");if(K){let Q=parseFloat(K);if(!Number.isNaN(Q))z=Q}let V=J?.get("retry-after");if(V&&!z){let Q=parseFloat(V);if(!Number.isNaN(Q))z=Q*1000;else z=Date.parse(V)-Date.now()}if(z===void 0){let Q=Z.maxRetries??this.maxRetries;z=this.calculateDefaultRetryTimeoutMillis($,Q)}return await BZ(z),this.makeRequest(Z,$-1,X)}calculateDefaultRetryTimeoutMillis(Z,$){let z=$-Z,K=Math.min(0.5*Math.pow(2,z),8),V=1-Math.random()*0.25;return K*V*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new H("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 X={...Z},{method:J,path:z,query:K,defaultBaseURL:V}=X;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 Q=this.buildURL(z,K,V);if("timeout"in X)P4("timeout",X.timeout);X.timeout=X.timeout??this.timeout;let{bodyHeaders:U,body:q}=this.buildBody({options:X}),x=await this.buildHeaders({options:Z,method:J,bodyHeaders:U,retryCount:$});return{req:{method:J,headers:x,...X.signal&&{signal:X.signal},...globalThis.ReadableStream&&q instanceof globalThis.ReadableStream&&{duplex:"half"},...q&&{body:q},...this.fetchOptions??{},...X.fetchOptions??{}},url:Q,timeout:X.timeout}}async buildHeaders({options:Z,method:$,bodyHeaders:X,retryCount:J}){let z={};if(this.idempotencyHeader&&$!=="get"){if(!Z.idempotencyKey)Z.idempotencyKey=this.defaultIdempotencyKey();z[this.idempotencyHeader]=Z.idempotencyKey}let K=W([z,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(J),...Z.timeout?{"X-Stainless-Timeout":String(Math.trunc(Z.timeout/1000))}:{},...z8(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(Z),this._options.defaultHeaders,X,Z.headers]);return this.validateHeaders(K),K.values}_makeAbort(Z){return()=>Z.abort()}buildBody({options:{body:Z,headers:$}}){if(!Z)return{bodyHeaders:void 0,body:void 0};let X=W([$]);if(ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer||Z instanceof DataView||typeof Z==="string"&&X.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:H$(Z)};else if(typeof Z==="object"&&X.values.get("content-type")==="application/x-www-form-urlencoded")return{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(Z)};else return Y(this,LX,"f").call(this,{body:Z,headers:X})}}var T4,A4,LX,m9,u9="\\n\\nHuman:",c9="\\n\\nAssistant:",bZ;var D4=C(()=>{zZ();G$();wZ();O0();hZ();q$();M$();w0();yX();mX();J8();m();q0();Y6();L6();y6();k();z1();_9();P$();Y4();K4();H4();z4();M4();x4();q$();I();C0();IZ();wZ();A4=p,LX=new WeakMap,T4=new WeakSet,m9=function(){return this.baseURL!=="https://api.anthropic.com"};p.Anthropic=A4;p.HUMAN_PROMPT=u9;p.AI_PROMPT=c9;p.DEFAULT_TIMEOUT=600000;p.AnthropicError=H;p.APIError=_;p.APIConnectionError=RZ;p.APIConnectionTimeoutError=l0;p.APIUserAbortError=s;p.NotFoundError=r0;p.ConflictError=o0;p.RateLimitError=s0;p.BadRequestError=i0;p.AuthenticationError=n0;p.InternalServerError=e0;p.PermissionDeniedError=a0;p.UnprocessableEntityError=t0;p.toFile=b$;bZ=class bZ extends p{constructor(){super(...arguments);this.completions=new u0(this),this.messages=new W0(this),this.models=new p0(this),this.files=new c0(this),this.skills=new N0(this),this.beta=new i(this)}};bZ.Completions=u0;bZ.Messages=W0;bZ.Models=p0;bZ.Files=c0;bZ.Skills=N0;bZ.Beta=i});var d9=C(()=>{m();O8();hZ();I();AZ();wZ();yX()});var r5=C(()=>{D4();z1();P$();d9();D4();k();m()});
|
|
42
|
-
export{G as Zra,Y as _ra,zZ as $ra,H as asa,_ as bsa,s as csa,RZ as dsa,l0 as esa,n0 as fsa,r0 as gsa,m as hsa,M0 as isa,Q8 as jsa,V8 as ksa,y as lsa,IZ as msa,w6 as nsa,yZ as osa,R8 as psa,gZ as qsa,Z8 as rsa,$J as ssa,L4 as tsa,S4 as usa,E4 as vsa,EX as wsa,F4 as xsa,P0 as ysa,bZ as zsa,r5 as Asa};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{ita as x,kta as y,ota as C}from"./cli-1.1.20-y9jwxk0y.mjs";import{rta as k}from"./cli-1.1.20-0sgvc4nn.mjs";var MF=k((n)=>{var K=x(),b=C(),w=y(),f=(F)=>F[K.SMITHY_CONTEXT_KEY]||(F[K.SMITHY_CONTEXT_KEY]={}),h=(F,J)=>{if(!J||J.length===0)return F;let G=[];for(let L of J)for(let Q of F)if(Q.schemeId.split("#")[1]===L)G.push(Q);for(let L of F)if(!G.find(({schemeId:Q})=>Q===L.schemeId))G.push(L);return G};function v(F){let J=new Map;for(let G of F)J.set(G.schemeId,G);return J}var j=(F,J)=>(G,L)=>async(Q)=>{let V=F.httpAuthSchemeProvider(await J.httpAuthSchemeParametersProvider(F,L,Q.input)),W=F.authSchemePreference?await F.authSchemePreference():[],Z=h(V,W),Y=v(F.httpAuthSchemes),U=w.getSmithyContext(L),$=[];for(let X of Z){let B=Y.get(X.schemeId);if(!B){$.push(`HttpAuthScheme \`${X.schemeId}\` was not enabled for this service.`);continue}let D=B.identityProvider(await J.identityProviderConfigProvider(F));if(!D){$.push(`HttpAuthScheme \`${X.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:N={},signingProperties:R={}}=X.propertiesExtractor?.(F,L)||{};X.identityProperties=Object.assign(X.identityProperties||{},N),X.signingProperties=Object.assign(X.signingProperties||{},R),U.selectedHttpAuthScheme={httpAuthOption:X,identity:await D(X.identityProperties),signer:B.signer};break}if(!U.selectedHttpAuthScheme)throw Error($.join(`
|
|
2
|
-
`));return G(Q)},H={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},P=(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G})=>({applyToStack:(L)=>{L.addRelativeTo(j(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G}),H)}}),M={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},l=(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G})=>({applyToStack:(L)=>{L.addRelativeTo(j(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G}),M)}}),m=(F)=>(J)=>{throw J},u=(F,J)=>{},O=(F)=>(J,G)=>async(L)=>{if(!b.HttpRequest.isInstance(L.request))return J(L);let V=w.getSmithyContext(G).selectedHttpAuthScheme;if(!V)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:W={}},identity:Z,signer:Y}=V,U=await J({...L,request:await Y.sign(L.request,Z,W)}).catch((Y.errorHandler||m)(W));return(Y.successHandler||u)(U.response,W),U},I={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},c=(F)=>({applyToStack:(J)=>{J.addRelativeTo(O(),I)}}),a=(F)=>{if(typeof F==="function")return F;let J=Promise.resolve(F);return()=>J},d=async(F,J,G,L=(V)=>V,...Q)=>{let V=new F(G);return V=L(V)??V,await J.send(V,...Q)};function g(F,J,G,L,Q){return async function*(W,Z,...Y){let U=Z,$=W.startingToken??U[G],X=!0,B;while(X){if(U[G]=$,Q)U[Q]=U[Q]??W.pageSize;if(W.client instanceof F)B=await d(J,W.client,Z,W.withCommand,...Y);else throw Error(`Invalid client, expected instance of ${F.name}`);yield B;let D=$;$=p(B,L),X=!!($&&(!W.stopOnSameToken||$!==D))}return}}var p=(F,J)=>{let G=F,L=J.split(".");for(let Q of L){if(!G||typeof G!=="object")return;G=G[Q]}return G};function s(F,J,G){if(!F.__smithy_context)F.__smithy_context={features:{}};else if(!F.__smithy_context.features)F.__smithy_context.features={};F.__smithy_context.features[J]=G}class E{authSchemes=new Map;constructor(F){for(let J in F){let G=F[J];if(G!==void 0)this.authSchemes.set(J,G)}}getIdentityProvider(F){return this.authSchemes.get(F)}}class _{async sign(F,J,G){if(!G)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!G.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!G.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!J.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let L=b.HttpRequest.clone(F);if(G.in===K.HttpApiKeyAuthLocation.QUERY)L.query[G.name]=J.apiKey;else if(G.in===K.HttpApiKeyAuthLocation.HEADER)L.headers[G.name]=G.scheme?`${G.scheme} ${J.apiKey}`:J.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+G.in+"`");return L}}class z{async sign(F,J,G){let L=b.HttpRequest.clone(F);if(!J.token)throw Error("request could not be signed with `token` since the `token` is not defined");return L.headers.Authorization=`Bearer ${J.token}`,L}}class A{async sign(F,J,G){return F}}var q=(F)=>function(G){return S(G)&&G.expiration.getTime()-Date.now()<F},T=300000,r=q(T),S=(F)=>F.expiration!==void 0,o=(F,J,G)=>{if(F===void 0)return;let L=typeof F!=="function"?async()=>Promise.resolve(F):F,Q,V,W,Z=!1,Y=async(U)=>{if(!V)V=L(U);try{Q=await V,W=!0,Z=!1}finally{V=void 0}return Q};if(J===void 0)return async(U)=>{if(!W||U?.forceRefresh)Q=await Y(U);return Q};return async(U)=>{if(!W||U?.forceRefresh)Q=await Y(U);if(Z)return Q;if(!G(Q))return Z=!0,Q;if(J(Q))return await Y(U),Q;return Q}};n.requestBuilder=b.requestBuilder;n.DefaultIdentityProviderConfig=E;n.EXPIRATION_MS=T;n.HttpApiKeyAuthSigner=_;n.HttpBearerAuthSigner=z;n.NoAuthSigner=A;n.createIsIdentityExpiredFunction=q;n.createPaginator=g;n.doesIdentityRequireRefresh=S;n.getHttpAuthSchemeEndpointRuleSetPlugin=P;n.getHttpAuthSchemePlugin=l;n.getHttpSigningPlugin=c;n.getSmithyContext=f;n.httpAuthSchemeEndpointRuleSetMiddlewareOptions=H;n.httpAuthSchemeMiddleware=j;n.httpAuthSchemeMiddlewareOptions=M;n.httpSigningMiddleware=O;n.httpSigningMiddlewareOptions=I;n.isIdentityExpired=r;n.memoizeIdentityProvider=o;n.normalizeProvider=a;n.setFeature=s});
|
|
3
|
-
export{MF as g_};
|