@claudiolabs/claudin 0.6.13 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AgentTool-0.7.0-9peg6t20.mjs +1 -0
- package/dist/chunks/App-0.7.0-q5hygb50.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.7.0-pdj2vakp.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.7.0-190csm4h.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.7.0-khhh5rz9.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.7.0-4n7jcjsf.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.7.0-vf636a5p.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.7.0-z9h5bckg.mjs +1 -0
- package/dist/chunks/DiffDialog-0.7.0-3kqmdg48.mjs +7 -0
- package/dist/chunks/Doctor-0.7.0-gep401wn.mjs +1 -0
- package/dist/chunks/ExplorerDialog-0.7.0-2t408ngs.mjs +6 -0
- package/dist/chunks/Grove-0.7.0-3knq53k5.mjs +1 -0
- package/dist/chunks/ITermBackend-0.7.0-by807q13.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.7.0-maxj2b37.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.7.0-2atqejbc.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.7.0-wqtqgs70.mjs +1 -0
- package/dist/chunks/Onboarding-0.7.0-xe2s643k.mjs +1 -0
- package/dist/chunks/ProviderManager-0.7.0-4tbbvacv.mjs +1 -0
- package/dist/chunks/REPL-0.7.0-tvn2epfh.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.7.0-6ycqmhh2.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.7.0-xwjwtj2z.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.7.0-mwbsjw08.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.7.0-szdbz9rf.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.7.0-sg1whfhh.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.7.0-jdkh4z1a.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.7.0-f557bcbq.mjs +1 -0
- package/dist/chunks/TrustDialog-0.7.0-gfmvgcwc.mjs +1 -0
- package/dist/chunks/activeProvider-0.7.0-vvs597t9.mjs +1 -0
- package/dist/chunks/add-dir-0.7.0-tqy1qj7k.mjs +1 -0
- package/dist/chunks/agents-0.7.0-7mz67ymz.mjs +110 -0
- package/dist/chunks/agents-0.7.0-rzfq4nj1.mjs +3 -0
- package/dist/chunks/api-0.7.0-3ddtm43n.mjs +1 -0
- package/dist/chunks/asciicast-0.7.0-4hfhh3bz.mjs +1 -0
- package/dist/chunks/assistant-0.7.0-hq9qp39j.mjs +1 -0
- package/dist/chunks/auth-0.7.0-j0ecrgmw.mjs +1 -0
- package/dist/chunks/auth-0.7.0-q33dw9jq.mjs +1 -0
- package/dist/chunks/autoMode-0.7.0-jt8mnf1a.mjs +48 -0
- package/dist/chunks/autoUpdater-0.7.0-pk6cxrr5.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-0.7.0-n50bjkpa.mjs +1 -0
- package/dist/chunks/branch-0.7.0-2nvgp1ch.mjs +4 -0
- package/dist/chunks/bridge-0.7.0-n76zrpx7.mjs +2 -0
- package/dist/chunks/bridgeConfig-0.7.0-wavdtzat.mjs +1 -0
- package/dist/chunks/bridgeEnabled-0.7.0-eqjw3fax.mjs +1 -0
- package/dist/chunks/bridgeMain-0.7.0-7n73zfpq.mjs +88 -0
- package/dist/chunks/bridgePointer-0.7.0-49x6tn3y.mjs +1 -0
- package/dist/chunks/btw-0.7.0-d2cavbgh.mjs +1 -0
- package/dist/chunks/buddy-0.7.0-3r0qt58d.mjs +3 -0
- package/dist/chunks/cacache-0.7.0-tsq5tf6t.mjs +1 -0
- package/dist/chunks/cache-probe-0.7.0-521yf1je.mjs +21 -0
- package/dist/chunks/cacheStats-0.7.0-xrpkvgry.mjs +4 -0
- package/dist/chunks/caches-0.7.0-khrzrs38.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.7.0-9vm9zdzp.mjs +1 -0
- package/dist/chunks/claudemd-0.7.0-06x6wykt.mjs +1 -0
- package/dist/chunks/clear-0.7.0-0hkt8avg.mjs +1 -0
- package/dist/chunks/clearTerminal-0.7.0-np2er6we.mjs +1 -0
- package/dist/chunks/cli-0.7.0-0bzz8t89.mjs +2 -0
- package/dist/chunks/cli-0.7.0-0cp32djm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-0hzevdxp.mjs +8 -0
- package/dist/chunks/cli-0.7.0-0r9dgw51.mjs +3 -0
- package/dist/chunks/cli-0.7.0-0vdrrv1g.mjs +2 -0
- package/dist/chunks/cli-0.7.0-154gmfg4.mjs +2 -0
- package/dist/chunks/cli-0.7.0-15wmymmf.mjs +2 -0
- package/dist/chunks/cli-0.7.0-19swb9c9.mjs +2 -0
- package/dist/chunks/cli-0.7.0-1b6xe3b3.mjs +3 -0
- package/dist/chunks/cli-0.7.0-1evcxwvq.mjs +9 -0
- package/dist/chunks/cli-0.7.0-1tb38zvv.mjs +2 -0
- package/dist/chunks/cli-0.7.0-1vvj7vh2.mjs +4 -0
- package/dist/chunks/cli-0.7.0-21zw08ne.mjs +4 -0
- package/dist/chunks/cli-0.7.0-24z25c8v.mjs +2 -0
- package/dist/chunks/cli-0.7.0-252v8s5n.mjs +20 -0
- package/dist/chunks/cli-0.7.0-29zphpz9.mjs +2 -0
- package/dist/chunks/cli-0.7.0-2cdwx892.mjs +3 -0
- package/dist/chunks/cli-0.7.0-2etvr47t.mjs +24 -0
- package/dist/chunks/cli-0.7.0-2nytysyy.mjs +2 -0
- package/dist/chunks/cli-0.7.0-383nrwhr.mjs +18 -0
- package/dist/chunks/cli-0.7.0-3fnqxks0.mjs +5 -0
- package/dist/chunks/cli-0.7.0-3knzsvn6.mjs +2 -0
- package/dist/chunks/cli-0.7.0-3n9nagt9.mjs +2 -0
- package/dist/chunks/cli-0.7.0-3stm3k7p.mjs +12 -0
- package/dist/chunks/cli-0.7.0-3xtc467b.mjs +2 -0
- package/dist/chunks/cli-0.7.0-48ycf0c3.mjs +2 -0
- package/dist/chunks/cli-0.7.0-48yfvx4w.mjs +2 -0
- package/dist/chunks/cli-0.7.0-49k0drxj.mjs +2 -0
- package/dist/chunks/cli-0.7.0-4d58csqr.mjs +2 -0
- package/dist/chunks/cli-0.7.0-4s9f320h.mjs +2 -0
- package/dist/chunks/cli-0.7.0-4t41vxc0.mjs +2 -0
- package/dist/chunks/cli-0.7.0-4z8583dp.mjs +2 -0
- package/dist/chunks/cli-0.7.0-4z9nwzzv.mjs +2 -0
- package/dist/chunks/cli-0.7.0-4zvtjdd8.mjs +2 -0
- package/dist/chunks/cli-0.7.0-5df67dbk.mjs +2 -0
- package/dist/chunks/cli-0.7.0-5fx679he.mjs +2 -0
- package/dist/chunks/cli-0.7.0-5ktz31fq.mjs +67 -0
- package/dist/chunks/cli-0.7.0-5yvefnpr.mjs +3 -0
- package/dist/chunks/cli-0.7.0-68mgyfr7.mjs +2 -0
- package/dist/chunks/cli-0.7.0-6v89j1h0.mjs +2 -0
- package/dist/chunks/cli-0.7.0-747esby6.mjs +2 -0
- package/dist/chunks/cli-0.7.0-7c24mbsm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-7g132rdj.mjs +5420 -0
- package/dist/chunks/cli-0.7.0-83nm3wtf.mjs +2 -0
- package/dist/chunks/cli-0.7.0-89798mg3.mjs +2 -0
- package/dist/chunks/cli-0.7.0-8begebnr.mjs +3 -0
- package/dist/chunks/cli-0.7.0-8p56ked8.mjs +2 -0
- package/dist/chunks/cli-0.7.0-8qwe028y.mjs +2 -0
- package/dist/chunks/cli-0.7.0-9jzkqcfv.mjs +16 -0
- package/dist/chunks/cli-0.7.0-9mk6sjcz.mjs +4 -0
- package/dist/chunks/cli-0.7.0-9p8vefz6.mjs +18 -0
- package/dist/chunks/cli-0.7.0-a088q8ep.mjs +2 -0
- package/dist/chunks/cli-0.7.0-a0dt04a7.mjs +2 -0
- package/dist/chunks/cli-0.7.0-a7rry8ha.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ad4z1hfv.mjs +50 -0
- package/dist/chunks/cli-0.7.0-aewz8nz4.mjs +2 -0
- package/dist/chunks/cli-0.7.0-apkk9390.mjs +3 -0
- package/dist/chunks/cli-0.7.0-asw5nd1q.mjs +2 -0
- package/dist/chunks/cli-0.7.0-avczxk44.mjs +2 -0
- package/dist/chunks/cli-0.7.0-avw5kb07.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ba1xb8x3.mjs +4 -0
- package/dist/chunks/cli-0.7.0-bacjkqga.mjs +2 -0
- package/dist/chunks/cli-0.7.0-bn0k1nzk.mjs +2 -0
- package/dist/chunks/cli-0.7.0-cb16hgkh.mjs +2 -0
- package/dist/chunks/cli-0.7.0-cjxpqpns.mjs +3 -0
- package/dist/chunks/cli-0.7.0-ct2kfpct.mjs +2 -0
- package/dist/chunks/cli-0.7.0-cwxeffcg.mjs +2 -0
- package/dist/chunks/cli-0.7.0-d56bajvn.mjs +2 -0
- package/dist/chunks/cli-0.7.0-d5bt2ahd.mjs +2 -0
- package/dist/chunks/cli-0.7.0-d6h4eqtj.mjs +2 -0
- package/dist/chunks/cli-0.7.0-d8vr3j93.mjs +2 -0
- package/dist/chunks/cli-0.7.0-dem9bmt6.mjs +2 -0
- package/dist/chunks/cli-0.7.0-dpaewdhn.mjs +2 -0
- package/dist/chunks/cli-0.7.0-dszmq0g3.mjs +2 -0
- package/dist/chunks/cli-0.7.0-dtxyc2mt.mjs +2 -0
- package/dist/chunks/cli-0.7.0-dxnyr5rv.mjs +2 -0
- package/dist/chunks/cli-0.7.0-dyhamqem.mjs +2 -0
- package/dist/chunks/cli-0.7.0-e1esnrzt.mjs +42 -0
- package/dist/chunks/cli-0.7.0-e1mycvjk.mjs +2 -0
- package/dist/chunks/cli-0.7.0-e39zcyhp.mjs +4 -0
- package/dist/chunks/cli-0.7.0-e6mves6r.mjs +2 -0
- package/dist/chunks/cli-0.7.0-eayr3nfv.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ecwta6mh.mjs +2 -0
- package/dist/chunks/cli-0.7.0-eddwmcdn.mjs +2 -0
- package/dist/chunks/cli-0.7.0-es6y6s82.mjs +12 -0
- package/dist/chunks/cli-0.7.0-ewbn59cm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ewcemx0m.mjs +2 -0
- package/dist/chunks/cli-0.7.0-f62gcsfa.mjs +2 -0
- package/dist/chunks/cli-0.7.0-f7mqc27p.mjs +6 -0
- package/dist/chunks/cli-0.7.0-ffy8few4.mjs +3 -0
- package/dist/chunks/cli-0.7.0-ft5gef81.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ftjagwyg.mjs +2 -0
- package/dist/chunks/cli-0.7.0-fxv77y2t.mjs +12 -0
- package/dist/chunks/cli-0.7.0-g2ekvm09.mjs +6 -0
- package/dist/chunks/cli-0.7.0-g46gs4dx.mjs +2 -0
- package/dist/chunks/cli-0.7.0-g5qxznar.mjs +2 -0
- package/dist/chunks/cli-0.7.0-gafgf0er.mjs +2 -0
- package/dist/chunks/cli-0.7.0-gkssrwr6.mjs +34 -0
- package/dist/chunks/cli-0.7.0-h6kfhzzd.mjs +193 -0
- package/dist/chunks/cli-0.7.0-hmjg8yfx.mjs +2 -0
- package/dist/chunks/cli-0.7.0-hrtdae85.mjs +6 -0
- package/dist/chunks/cli-0.7.0-hxf1ckjt.mjs +12 -0
- package/dist/chunks/cli-0.7.0-hxph4t80.mjs +2 -0
- package/dist/chunks/cli-0.7.0-j4jzhywr.mjs +3 -0
- package/dist/chunks/cli-0.7.0-je29e78f.mjs +2 -0
- package/dist/chunks/cli-0.7.0-jmsrj8j2.mjs +4 -0
- package/dist/chunks/cli-0.7.0-jvkyhn8x.mjs +2 -0
- package/dist/chunks/cli-0.7.0-k3qqc7gx.mjs +2 -0
- package/dist/chunks/cli-0.7.0-k7w5n7pe.mjs +2 -0
- package/dist/chunks/cli-0.7.0-kkpf8bhn.mjs +2 -0
- package/dist/chunks/cli-0.7.0-kngw06pw.mjs +4 -0
- package/dist/chunks/cli-0.7.0-kp7f47zq.mjs +2 -0
- package/dist/chunks/cli-0.7.0-kpfe5dkw.mjs +2 -0
- package/dist/chunks/cli-0.7.0-kr6jdp53.mjs +133 -0
- package/dist/chunks/cli-0.7.0-kw0wp8vs.mjs +2 -0
- package/dist/chunks/cli-0.7.0-kw554ntj.mjs +3 -0
- package/dist/chunks/cli-0.7.0-m07xma4d.mjs +2 -0
- package/dist/chunks/cli-0.7.0-m6ysmj08.mjs +39 -0
- package/dist/chunks/cli-0.7.0-mea2neea.mjs +133 -0
- package/dist/chunks/cli-0.7.0-mn3gdwp2.mjs +17 -0
- package/dist/chunks/cli-0.7.0-mnbdk339.mjs +3 -0
- package/dist/chunks/cli-0.7.0-n0s94kev.mjs +2 -0
- package/dist/chunks/cli-0.7.0-n0twknfk.mjs +2 -0
- package/dist/chunks/cli-0.7.0-na9s209m.mjs +2 -0
- package/dist/chunks/cli-0.7.0-p96azep2.mjs +7 -0
- package/dist/chunks/cli-0.7.0-p9c7eask.mjs +2 -0
- package/dist/chunks/cli-0.7.0-p9q4x3f1.mjs +59 -0
- package/dist/chunks/cli-0.7.0-pbs0cx53.mjs +2 -0
- package/dist/chunks/cli-0.7.0-petmjdha.mjs +2 -0
- package/dist/chunks/cli-0.7.0-pf2fr5cc.mjs +4 -0
- package/dist/chunks/cli-0.7.0-pfcabga3.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ppqzq0zp.mjs +2 -0
- package/dist/chunks/cli-0.7.0-q5sbn5b2.mjs +4 -0
- package/dist/chunks/cli-0.7.0-q70ex7jy.mjs +2 -0
- package/dist/chunks/cli-0.7.0-qeg8v19s.mjs +2 -0
- package/dist/chunks/cli-0.7.0-qftredzy.mjs +2 -0
- package/dist/chunks/cli-0.7.0-qmckaxpm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-r8g195r8.mjs +15 -0
- package/dist/chunks/cli-0.7.0-rmprwgax.mjs +2 -0
- package/dist/chunks/cli-0.7.0-rnahtcw9.mjs +5 -0
- package/dist/chunks/cli-0.7.0-rxhbb3ca.mjs +2 -0
- package/dist/chunks/cli-0.7.0-s0b5jjrj.mjs +2 -0
- package/dist/chunks/cli-0.7.0-s14kw5d6.mjs +2 -0
- package/dist/chunks/cli-0.7.0-s4at7t0q.mjs +2 -0
- package/dist/chunks/cli-0.7.0-s8rt9fpg.mjs +2 -0
- package/dist/chunks/cli-0.7.0-s9hgep30.mjs +3 -0
- package/dist/chunks/cli-0.7.0-sbwhas5a.mjs +18 -0
- package/dist/chunks/cli-0.7.0-tcxmyk2w.mjs +2 -0
- package/dist/chunks/cli-0.7.0-tjpp46xm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-tvwks6zm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-twxrndmz.mjs +4 -0
- package/dist/chunks/cli-0.7.0-v6ceqq5f.mjs +2 -0
- package/dist/chunks/cli-0.7.0-v7hc34ad.mjs +2 -0
- package/dist/chunks/cli-0.7.0-v92q5ffm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-vf7bbn80.mjs +5 -0
- package/dist/chunks/cli-0.7.0-vfzbn5qv.mjs +2 -0
- package/dist/chunks/cli-0.7.0-vp89ypch.mjs +24 -0
- package/dist/chunks/cli-0.7.0-vvb9pc7x.mjs +3 -0
- package/dist/chunks/cli-0.7.0-vzpjsnyh.mjs +2 -0
- package/dist/chunks/cli-0.7.0-vzvrhx5c.mjs +2 -0
- package/dist/chunks/cli-0.7.0-w0nw2kkk.mjs +17 -0
- package/dist/chunks/cli-0.7.0-wb82h4c2.mjs +2 -0
- package/dist/chunks/cli-0.7.0-wf8v2b4s.mjs +15 -0
- package/dist/chunks/cli-0.7.0-wgy69726.mjs +2 -0
- package/dist/chunks/cli-0.7.0-wm0enq59.mjs +2 -0
- package/dist/chunks/cli-0.7.0-wntkecma.mjs +2 -0
- package/dist/chunks/cli-0.7.0-wspeyepj.mjs +2 -0
- package/dist/chunks/cli-0.7.0-wvpty7mm.mjs +2 -0
- package/dist/chunks/cli-0.7.0-wxynfqax.mjs +2 -0
- package/dist/chunks/cli-0.7.0-wzjrm1a0.mjs +2 -0
- package/dist/chunks/cli-0.7.0-x1xdxk52.mjs +2 -0
- package/dist/chunks/cli-0.7.0-x2vc8nds.mjs +2 -0
- package/dist/chunks/cli-0.7.0-xb864qfd.mjs +2 -0
- package/dist/chunks/cli-0.7.0-xfxprc47.mjs +2 -0
- package/dist/chunks/cli-0.7.0-xpzg1xfc.mjs +2 -0
- package/dist/chunks/cli-0.7.0-xvjaw51n.mjs +15 -0
- package/dist/chunks/cli-0.7.0-y003ay15.mjs +2 -0
- package/dist/chunks/cli-0.7.0-y6nkrrpn.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ybdk9aq6.mjs +21 -0
- package/dist/chunks/cli-0.7.0-ybwa4x6g.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ycew6bek.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ye6sm33j.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ytqbgtvc.mjs +2 -0
- package/dist/chunks/cli-0.7.0-yts7snkm.mjs +45 -0
- package/dist/chunks/cli-0.7.0-yw6r7fw4.mjs +58 -0
- package/dist/chunks/cli-0.7.0-z15a5zq0.mjs +2 -0
- package/dist/chunks/cli-0.7.0-z7sydqy8.mjs +2 -0
- package/dist/chunks/cli-0.7.0-z93va7tf.mjs +2 -0
- package/dist/chunks/cli-0.7.0-zd1q68sv.mjs +2 -0
- package/dist/chunks/cli-0.7.0-zdbaf370.mjs +10 -0
- package/dist/chunks/cli-0.7.0-zf3jaceq.mjs +2 -0
- package/dist/chunks/cli-0.7.0-zh93d2ez.mjs +2 -0
- package/dist/chunks/cli-0.7.0-zjfpqpke.mjs +1 -0
- package/dist/chunks/cli-0.7.0-zmfejrs2.mjs +25 -0
- package/dist/chunks/cli-0.7.0-zn444tdk.mjs +2 -0
- package/dist/chunks/cli-0.7.0-zqv149an.mjs +6 -0
- package/dist/chunks/cli-0.7.0-zscdr61q.mjs +2 -0
- package/dist/chunks/cli-0.7.0-ztc21898.mjs +2 -0
- package/dist/chunks/client-0.7.0-mxq1x2gd.mjs +1 -0
- package/dist/chunks/color-0.7.0-q8kx1h5f.mjs +1 -0
- package/dist/chunks/compact-0.7.0-wej8t29a.mjs +3 -0
- package/dist/chunks/config-0.7.0-1vqyzdss.mjs +1 -0
- package/dist/chunks/config-0.7.0-29b2exhr.mjs +1 -0
- package/dist/chunks/constants-0.7.0-cwe25jjg.mjs +1 -0
- package/dist/chunks/context-0.7.0-wzkh0ek3.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.7.0-3knrv7yy.mjs +1 -0
- package/dist/chunks/conversation-0.7.0-5gwkat1n.mjs +1 -0
- package/dist/chunks/copilotHeaders-0.7.0-k7qbvwa0.mjs +1 -0
- package/dist/chunks/copy-0.7.0-g9547w2e.mjs +9 -0
- package/dist/chunks/cost-0.7.0-g07zzraf.mjs +1 -0
- package/dist/chunks/createSSHSession-0.7.0-x69ccesr.mjs +1 -0
- package/dist/chunks/createSession-0.7.0-eythrhrd.mjs +1 -0
- package/dist/chunks/debug-0.7.0-grf8etmz.mjs +1 -0
- package/dist/chunks/defaultActionDeps-0.7.0-3msvjhye.mjs +1367 -0
- package/dist/chunks/desktop-0.7.0-qv2bt4fq.mjs +1 -0
- package/dist/chunks/detectRepository-0.7.0-8kzz057x.mjs +1 -0
- package/dist/chunks/detection-0.7.0-d8z59p8p.mjs +1 -0
- package/dist/chunks/diff-0.7.0-wx4fgtnt.mjs +1 -0
- package/dist/chunks/doctor-0.7.0-dzm456q1.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-0.7.0-jysj36mx.mjs +1 -0
- package/dist/chunks/earlyInput-0.7.0-31tzwhjp.mjs +1 -0
- package/dist/chunks/effort-0.7.0-w94qsmp1.mjs +10 -0
- package/dist/chunks/envLessBridgeConfig-0.7.0-2vzfvw7j.mjs +1 -0
- package/dist/chunks/envUtils-0.7.0-wak5qkkv.mjs +1 -0
- package/dist/chunks/environmentSelection-0.7.0-xe6h6x4v.mjs +1 -0
- package/dist/chunks/environments-0.7.0-cdxqsbrp.mjs +1 -0
- package/dist/chunks/errors-0.7.0-hrt3tamp.mjs +1 -0
- package/dist/chunks/exampleCommands-0.7.0-v49vtt40.mjs +1 -0
- package/dist/chunks/exit-0.7.0-xpc13d1z.mjs +1 -0
- package/dist/chunks/explorer-0.7.0-yy3jawy1.mjs +1 -0
- package/dist/chunks/export-0.7.0-689scwyv.mjs +2 -0
- package/dist/chunks/extra-usage-0.7.0-675a7x8f.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.7.0-2h542mq6.mjs +1 -0
- package/dist/chunks/fast-0.7.0-dwxy8xan.mjs +1 -0
- package/dist/chunks/feedback-0.7.0-kms98grz.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.7.0-5gy0hbjg.mjs +1 -0
- package/dist/chunks/git-0.7.0-bsn50mym.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.7.0-f9n1jk8g.mjs +1 -0
- package/dist/chunks/goal-0.7.0-ben8pbys.mjs +4 -0
- package/dist/chunks/grove-0.7.0-5vca5g43.mjs +1 -0
- package/dist/chunks/growthbook-0.7.0-ged09pjv.mjs +1 -0
- package/dist/chunks/headless-0.7.0-6gxn4ya0.mjs +2 -0
- package/dist/chunks/heapdump-0.7.0-jbnb1enq.mjs +6 -0
- package/dist/chunks/help-0.7.0-s11djcbq.mjs +1 -0
- package/dist/chunks/hookChains-0.7.0-q104805z.mjs +3 -0
- package/dist/chunks/hooks-0.7.0-3tzcnyt1.mjs +1 -0
- package/dist/chunks/hooks-0.7.0-m0qzy27a.mjs +79 -0
- package/dist/chunks/ide-0.7.0-rqh7pczf.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.7.0-t874vmrb.mjs +1 -0
- package/dist/chunks/inboundAttachments-0.7.0-9h4k1v8p.mjs +1 -0
- package/dist/chunks/index-0.7.0-0pb4fykd.mjs +1 -0
- package/dist/chunks/index-0.7.0-339ebzg3.mjs +1 -0
- package/dist/chunks/index-0.7.0-3qc9y7vs.mjs +1 -0
- package/dist/chunks/index-0.7.0-8xaka5b5.mjs +1 -0
- package/dist/chunks/index-0.7.0-aghbrz36.mjs +1 -0
- package/dist/chunks/index-0.7.0-asx0vcnp.mjs +1 -0
- package/dist/chunks/index-0.7.0-at8f760s.mjs +2 -0
- package/dist/chunks/index-0.7.0-aw15r8m5.mjs +1 -0
- package/dist/chunks/index-0.7.0-b95077ct.mjs +1 -0
- package/dist/chunks/index-0.7.0-etmdkstm.mjs +1 -0
- package/dist/chunks/index-0.7.0-fhnz63fp.mjs +1 -0
- package/dist/chunks/index-0.7.0-fx8935ev.mjs +5 -0
- package/dist/chunks/index-0.7.0-hwyk7tea.mjs +30 -0
- package/dist/chunks/index-0.7.0-nb6m1jch.mjs +1 -0
- package/dist/chunks/index-0.7.0-p4n8wp5y.mjs +9 -0
- package/dist/chunks/index-0.7.0-rbb0bwpy.mjs +1 -0
- package/dist/chunks/index-0.7.0-rq05kg71.mjs +17 -0
- package/dist/chunks/index-0.7.0-vk7vxjae.mjs +1 -0
- package/dist/chunks/index-0.7.0-wjsr1d6k.mjs +2 -0
- package/dist/chunks/index-0.7.0-x03pfhyx.mjs +9 -0
- package/dist/chunks/index-0.7.0-y22a1z29.mjs +1 -0
- package/dist/chunks/index-0.7.0-yx3335f1.mjs +1 -0
- package/dist/chunks/index-0.7.0-zsw19y1x.mjs +1 -0
- package/dist/chunks/init-0.7.0-f0taef1q.mjs +1 -0
- package/dist/chunks/initReplBridge-0.7.0-wcvxy8w8.mjs +1 -0
- package/dist/chunks/ink-0.7.0-xpha78d8.mjs +1 -0
- package/dist/chunks/insights-0.7.0-x0rwvydg.mjs +870 -0
- package/dist/chunks/install-0.7.0-ncp2pec7.mjs +1 -0
- package/dist/chunks/install-github-app-0.7.0-trt9558z.mjs +149 -0
- package/dist/chunks/install-slack-app-0.7.0-kjz97cdh.mjs +1 -0
- package/dist/chunks/instrumentation-0.7.0-bey09njh.mjs +1 -0
- package/dist/chunks/interactiveHelpers-0.7.0-1qs1kree.mjs +1 -0
- package/dist/chunks/keybindings-0.7.0-ekf19qhh.mjs +2 -0
- package/dist/chunks/knowledge-0.7.0-adck5x26.mjs +2 -0
- package/dist/chunks/latestVersionCache-0.7.0-ark5pmnp.mjs +1 -0
- package/dist/chunks/loadAgentsDir-0.7.0-5ae7wa3t.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.7.0-vhwhvb6f.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.7.0-xb4qdrg0.mjs +1 -0
- package/dist/chunks/log-0.7.0-6mtk9ch7.mjs +1 -0
- package/dist/chunks/main-0.7.0-v0y4hrdm.mjs +1 -0
- package/dist/chunks/managedEnv-0.7.0-n64hpsst.mjs +1 -0
- package/dist/chunks/mcp-0.7.0-2j3bkwz5.mjs +1 -0
- package/dist/chunks/mcp-0.7.0-rqwvyycg.mjs +4 -0
- package/dist/chunks/mcp-0.7.0-t0pqt6hy.mjs +17 -0
- package/dist/chunks/mcpb-0.7.0-wmg0861b.mjs +1 -0
- package/dist/chunks/memory-0.7.0-gfe3p8h2.mjs +3 -0
- package/dist/chunks/model-0.7.0-anb8mgtp.mjs +2 -0
- package/dist/chunks/model-0.7.0-jxz0n7g1.mjs +1 -0
- package/dist/chunks/node-0.7.0-4sagcnk2.mjs +12 -0
- package/dist/chunks/oauth-0.7.0-n3tj8amn.mjs +1 -0
- package/dist/chunks/openaiShim-0.7.0-9bq5572t.mjs +14 -0
- package/dist/chunks/output-style-0.7.0-wmxwqrx6.mjs +1 -0
- package/dist/chunks/package-GCDC7LJR-0.7.0-fke68t3z.mjs +1 -0
- package/dist/chunks/parseConnectUrl-0.7.0-p5aq0xy4.mjs +1 -0
- package/dist/chunks/parser-0.7.0-a4qhvrn9.mjs +1 -0
- package/dist/chunks/passes-0.7.0-4wxjh63r.mjs +1 -0
- package/dist/chunks/permissions-0.7.0-cth9pb19.mjs +3 -0
- package/dist/chunks/permissions-0.7.0-nxre3gew.mjs +1 -0
- package/dist/chunks/plan-0.7.0-0t3hxxwf.mjs +1 -0
- package/dist/chunks/plist-0.7.0-ptbkp7b8.mjs +1 -0
- package/dist/chunks/plugin-0.7.0-4zewdh7s.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.7.0-3zvpdbjz.mjs +1 -0
- package/dist/chunks/plugins-0.7.0-dyrrfzzb.mjs +9 -0
- package/dist/chunks/preActionHook-0.7.0-agzbsqyv.mjs +2 -0
- package/dist/chunks/print-0.7.0-m81z10rw.mjs +57 -0
- package/dist/chunks/privacy-settings-0.7.0-qvrhcvbv.mjs +1 -0
- package/dist/chunks/process-0.7.0-4rnq2g80.mjs +1 -0
- package/dist/chunks/processBashCommand-0.7.0-htmch7xm.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.7.0-gj7mbd0a.mjs +9 -0
- package/dist/chunks/prompt-0.7.0-2d4qsrq9.mjs +1 -0
- package/dist/chunks/prompt-0.7.0-rkefqrwh.mjs +1 -0
- package/dist/chunks/prompts-0.7.0-ty3k4n75.mjs +1 -0
- package/dist/chunks/protocolHandler-0.7.0-aqsa4ph2.mjs +13 -0
- package/dist/chunks/provider-0.7.0-yw5h323y.mjs +2 -0
- package/dist/chunks/providerProfiles-0.7.0-vdm0m870.mjs +1 -0
- package/dist/chunks/providerValidation-0.7.0-rtzpgzra.mjs +6 -0
- package/dist/chunks/rate-limit-options-0.7.0-dqtjdpft.mjs +1 -0
- package/dist/chunks/registerSubcommands-0.7.0-r5wmbkz9.mjs +34 -0
- package/dist/chunks/registry-0.7.0-jjaxz6ve.mjs +1 -0
- package/dist/chunks/release-notes-0.7.0-h6me5mww.mjs +5 -0
- package/dist/chunks/reload-plugins-0.7.0-vtr0cnwe.mjs +2 -0
- package/dist/chunks/remote-env-0.7.0-h013vass.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.7.0-fmh34c6f.mjs +1 -0
- package/dist/chunks/remoteSession-0.7.0-40yqbh78.mjs +1 -0
- package/dist/chunks/rename-0.7.0-wqs6kjb7.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.7.0-d192ahyh.mjs +1 -0
- package/dist/chunks/replLauncher-0.7.0-gtmcyxgm.mjs +1 -0
- package/dist/chunks/resume-0.7.0-6cy3j2e8.mjs +2 -0
- package/dist/chunks/rewind-0.7.0-kepxqnvs.mjs +1 -0
- package/dist/chunks/rootOptions-0.7.0-00ekm71j.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.7.0-env8r2gg.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.7.0-wk296sbw.mjs +1 -0
- package/dist/chunks/session-0.7.0-qbmq7k37.mjs +2 -0
- package/dist/chunks/sessionDiscovery-0.7.0-xf03hmpk.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-0.7.0-gw8qw3zp.mjs +1 -0
- package/dist/chunks/sessionStorage-0.7.0-vcyz3dw7.mjs +1 -0
- package/dist/chunks/settings-0.7.0-3k9dr8ys.mjs +1 -0
- package/dist/chunks/setup-0.7.0-9ync2tk7.mjs +5 -0
- package/dist/chunks/sinks-0.7.0-g1bwkwh0.mjs +1 -0
- package/dist/chunks/skills-0.7.0-hjdx42cr.mjs +1 -0
- package/dist/chunks/startupProfiler-0.7.0-b32wtvbf.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-0.7.0-m55han8a.mjs +1 -0
- package/dist/chunks/state-0.7.0-g9nbt1zn.mjs +1 -0
- package/dist/chunks/stats-0.7.0-429ntw0k.mjs +6 -0
- package/dist/chunks/status-0.7.0-h19n5a31.mjs +1 -0
- package/dist/chunks/stickers-0.7.0-q34hs61c.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.7.0-gz4xjdce.mjs +1 -0
- package/dist/chunks/tasks-0.7.0-e2rrgr6x.mjs +1 -0
- package/dist/chunks/teamHelpers-0.7.0-jss9q0ak.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.7.0-c7ekrdae.mjs +1 -0
- package/dist/chunks/teleport-0.7.0-n0h6pqs8.mjs +1 -0
- package/dist/chunks/terminalSetup-0.7.0-ycw8nd2k.mjs +1 -0
- package/dist/chunks/theme-0.7.0-2dzcdk7a.mjs +1 -0
- package/dist/chunks/thinkback-0.7.0-9xhfd6ab.mjs +1 -0
- package/dist/chunks/thinkback-play-0.7.0-yqj7b8tt.mjs +1 -0
- package/dist/chunks/toolPool-0.7.0-xes3fby4.mjs +1 -0
- package/dist/chunks/toolSearch-0.7.0-wkaae53k.mjs +1 -0
- package/dist/chunks/tools-0.7.0-7qjq03x9.mjs +1 -0
- package/dist/chunks/trustedDevice-0.7.0-0jcs8sag.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.7.0-evvr9k3e.mjs +69 -0
- package/dist/chunks/types-0.7.0-7t30qdm7.mjs +1 -0
- package/dist/chunks/ultrareviewCommand-0.7.0-mt2gyqrs.mjs +4 -0
- package/dist/chunks/update-0.7.0-d79xsjyx.mjs +86 -0
- package/dist/chunks/upgrade-0.7.0-29j99fm4.mjs +1 -0
- package/dist/chunks/upload-0.7.0-c88xwfr6.mjs +7 -0
- package/dist/chunks/upstreamproxy-0.7.0-qha2t9zm.mjs +14 -0
- package/dist/chunks/url-handler-napi-0.7.0-d2khwe8w.mjs +1 -0
- package/dist/chunks/usage-0.7.0-fz211dwp.mjs +1 -0
- package/dist/chunks/util-0.7.0-kre9h9qa.mjs +1 -0
- package/dist/chunks/utils-0.7.0-vw4eq452.mjs +1 -0
- package/dist/chunks/vim-0.7.0-2tzpxf7d.mjs +1 -0
- package/dist/chunks/watcher-0.7.0-dbb0csvt.mjs +1 -0
- package/dist/chunks/wiki-0.7.0-etkhyz2p.mjs +132 -0
- package/dist/chunks/worktree-0.7.0-ntn0xdnq.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.7.0-h5ak3bk5.mjs +1 -0
- package/dist/chunks/wrapper-0.7.0-zvn0r75t.mjs +7 -0
- package/dist/claudin-vscode.vsix +0 -0
- package/dist/cli.mjs +2 -2
- package/package.json +14 -14
- package/dist/chunks/AgentTool-0.6.13-372t6jvm.mjs +0 -1
- package/dist/chunks/App-0.6.13-qvfyfba9.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.6.13-6nmfyyev.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-0.6.13-b6yfhres.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.6.13-dyqtw95c.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.6.13-5pgva0rj.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.13-waw1tn55.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.6.13-hjwa1fbn.mjs +0 -1
- package/dist/chunks/DiffDialog-0.6.13-dk52swdy.mjs +0 -7
- package/dist/chunks/Doctor-0.6.13-1a58bmer.mjs +0 -1
- package/dist/chunks/ExplorerDialog-0.6.13-2jsr1kdp.mjs +0 -6
- package/dist/chunks/Grove-0.6.13-ndwmcy2m.mjs +0 -1
- package/dist/chunks/ITermBackend-0.6.13-nf00ba9t.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.6.13-5tjcywmj.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.6.13-hfvttszy.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.6.13-8kny4cnv.mjs +0 -1
- package/dist/chunks/Onboarding-0.6.13-kq8ksp1e.mjs +0 -1
- package/dist/chunks/ProviderManager-0.6.13-qk3hqkes.mjs +0 -1
- package/dist/chunks/REPL-0.6.13-61en5qve.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.6.13-3fqxexjm.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-0.6.13-62cd6tth.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.6.13-15xb363h.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.6.13-dsedgexe.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.6.13-9j8hn55r.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.6.13-8vwnn7q5.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.6.13-zh1xxj19.mjs +0 -1
- package/dist/chunks/TrustDialog-0.6.13-bxhrfq4g.mjs +0 -1
- package/dist/chunks/activeProvider-0.6.13-czzs1epn.mjs +0 -1
- package/dist/chunks/add-dir-0.6.13-j5n5k274.mjs +0 -1
- package/dist/chunks/agents-0.6.13-0m0b4n5a.mjs +0 -3
- package/dist/chunks/agents-0.6.13-v7mba2z1.mjs +0 -110
- package/dist/chunks/api-0.6.13-1s3mg09p.mjs +0 -1
- package/dist/chunks/asciicast-0.6.13-3mbwg05w.mjs +0 -1
- package/dist/chunks/assistant-0.6.13-bg17bbaf.mjs +0 -1
- package/dist/chunks/auth-0.6.13-586trvnj.mjs +0 -1
- package/dist/chunks/auth-0.6.13-jkzs3jr4.mjs +0 -1
- package/dist/chunks/autoMode-0.6.13-9sxgpw8z.mjs +0 -48
- package/dist/chunks/autoUpdater-0.6.13-0rtsfmyq.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.6.13-dfn3gpk2.mjs +0 -1
- package/dist/chunks/branch-0.6.13-nncg27cq.mjs +0 -4
- package/dist/chunks/bridge-0.6.13-p1vtbdeq.mjs +0 -2
- package/dist/chunks/bridgeConfig-0.6.13-99p1h4gg.mjs +0 -1
- package/dist/chunks/bridgeEnabled-0.6.13-jxfgwjry.mjs +0 -1
- package/dist/chunks/bridgeMain-0.6.13-fthkw7s3.mjs +0 -88
- package/dist/chunks/bridgePointer-0.6.13-zs37h6xx.mjs +0 -1
- package/dist/chunks/btw-0.6.13-hhztcxbv.mjs +0 -1
- package/dist/chunks/buddy-0.6.13-0j9feqm5.mjs +0 -3
- package/dist/chunks/cacache-0.6.13-kqpn2432.mjs +0 -1
- package/dist/chunks/cache-probe-0.6.13-d98620ds.mjs +0 -21
- package/dist/chunks/cacheStats-0.6.13-yktwg0rm.mjs +0 -4
- package/dist/chunks/caches-0.6.13-5s0az6ex.mjs +0 -1
- package/dist/chunks/claudeDesktop-0.6.13-ecqnvr2j.mjs +0 -1
- package/dist/chunks/claudemd-0.6.13-yae0af2s.mjs +0 -1
- package/dist/chunks/clear-0.6.13-nqy8a9yn.mjs +0 -1
- package/dist/chunks/clearTerminal-0.6.13-72xf6n5m.mjs +0 -1
- package/dist/chunks/cli-0.6.13-004msxtb.mjs +0 -2
- package/dist/chunks/cli-0.6.13-03nk0m3d.mjs +0 -24
- package/dist/chunks/cli-0.6.13-05yxsqtw.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0602v59h.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0fqa9efa.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0k53jyws.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0q2ceerc.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0xg54q0q.mjs +0 -3
- package/dist/chunks/cli-0.6.13-15925v1q.mjs +0 -2
- package/dist/chunks/cli-0.6.13-17fmkp6v.mjs +0 -3
- package/dist/chunks/cli-0.6.13-1ax2v1qb.mjs +0 -24
- package/dist/chunks/cli-0.6.13-1hj4de9z.mjs +0 -18
- package/dist/chunks/cli-0.6.13-1jhzkjnr.mjs +0 -2
- package/dist/chunks/cli-0.6.13-1pb6yp4f.mjs +0 -2
- package/dist/chunks/cli-0.6.13-27ey3345.mjs +0 -17
- package/dist/chunks/cli-0.6.13-2999v1f0.mjs +0 -5
- package/dist/chunks/cli-0.6.13-2d7gmnka.mjs +0 -2
- package/dist/chunks/cli-0.6.13-2k50jqzf.mjs +0 -2
- package/dist/chunks/cli-0.6.13-2s33ahe4.mjs +0 -5420
- package/dist/chunks/cli-0.6.13-31zhsxsz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-35rszksn.mjs +0 -2
- package/dist/chunks/cli-0.6.13-3812a7q8.mjs +0 -34
- package/dist/chunks/cli-0.6.13-3c8w16xp.mjs +0 -3
- package/dist/chunks/cli-0.6.13-3w1r3c0v.mjs +0 -2
- package/dist/chunks/cli-0.6.13-45x35nyh.mjs +0 -2
- package/dist/chunks/cli-0.6.13-46hqxeb7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-4hknb5dd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-50wr9g3w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-56b3061c.mjs +0 -18
- package/dist/chunks/cli-0.6.13-56j5q7d2.mjs +0 -42
- package/dist/chunks/cli-0.6.13-5gh7ptbm.mjs +0 -4
- package/dist/chunks/cli-0.6.13-5qvssn7h.mjs +0 -2
- package/dist/chunks/cli-0.6.13-5t9gd5mv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-643zsnv9.mjs +0 -2
- package/dist/chunks/cli-0.6.13-667dsr1w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-77hs0qtg.mjs +0 -2
- package/dist/chunks/cli-0.6.13-79mne5jt.mjs +0 -2
- package/dist/chunks/cli-0.6.13-7c9n56f7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-7ga8d4j1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-7pva2mmr.mjs +0 -3
- package/dist/chunks/cli-0.6.13-7vd0kdw5.mjs +0 -2
- package/dist/chunks/cli-0.6.13-82datd4w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-86pqnjyd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-881js45c.mjs +0 -2
- package/dist/chunks/cli-0.6.13-8t0ttrk7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-8ws8a2xy.mjs +0 -3
- package/dist/chunks/cli-0.6.13-949racwr.mjs +0 -7
- package/dist/chunks/cli-0.6.13-94nwan0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-97cs7c2r.mjs +0 -2
- package/dist/chunks/cli-0.6.13-9h9fp7zs.mjs +0 -2
- package/dist/chunks/cli-0.6.13-9wktvaax.mjs +0 -50
- package/dist/chunks/cli-0.6.13-ac8nyfp1.mjs +0 -58
- package/dist/chunks/cli-0.6.13-aekttw5a.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ajc8203j.mjs +0 -2
- package/dist/chunks/cli-0.6.13-axsf5w7q.mjs +0 -2
- package/dist/chunks/cli-0.6.13-aztg2ca1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-b3zncvcq.mjs +0 -16
- package/dist/chunks/cli-0.6.13-b55baxv4.mjs +0 -2
- package/dist/chunks/cli-0.6.13-bthkgbv5.mjs +0 -2
- package/dist/chunks/cli-0.6.13-c3452432.mjs +0 -5
- package/dist/chunks/cli-0.6.13-cc118njq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-cc2eb8bm.mjs +0 -2
- package/dist/chunks/cli-0.6.13-cwm0q4km.mjs +0 -2
- package/dist/chunks/cli-0.6.13-cxnnt8b1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-d2rfg5mp.mjs +0 -2
- package/dist/chunks/cli-0.6.13-da6fhpes.mjs +0 -133
- package/dist/chunks/cli-0.6.13-dada1afp.mjs +0 -6
- package/dist/chunks/cli-0.6.13-dayy1aa4.mjs +0 -2
- package/dist/chunks/cli-0.6.13-dh1skxhh.mjs +0 -2
- package/dist/chunks/cli-0.6.13-dvfmqzm9.mjs +0 -2
- package/dist/chunks/cli-0.6.13-e1t2dda2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ea52zrzt.mjs +0 -2
- package/dist/chunks/cli-0.6.13-eaev9cr7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-erzcm5hv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-esv4y00y.mjs +0 -2
- package/dist/chunks/cli-0.6.13-etytm730.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ew05qjsa.mjs +0 -4
- package/dist/chunks/cli-0.6.13-f58v0vk7.mjs +0 -6
- package/dist/chunks/cli-0.6.13-f67v536f.mjs +0 -59
- package/dist/chunks/cli-0.6.13-f6qwz2h0.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fkaxh655.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fspszw8w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fw6m0fbm.mjs +0 -10
- package/dist/chunks/cli-0.6.13-fxj1zytn.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fy3vgkpz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fzzdrhms.mjs +0 -4
- package/dist/chunks/cli-0.6.13-g65dfg11.mjs +0 -6
- package/dist/chunks/cli-0.6.13-gkfcc3c2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-gpb93cvz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-grrshx1z.mjs +0 -2
- package/dist/chunks/cli-0.6.13-gsfs6kre.mjs +0 -2
- package/dist/chunks/cli-0.6.13-gyq9mepg.mjs +0 -2
- package/dist/chunks/cli-0.6.13-h3ymv3nd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-h5dej6se.mjs +0 -3
- package/dist/chunks/cli-0.6.13-hd0sd535.mjs +0 -193
- package/dist/chunks/cli-0.6.13-hp0r1ftj.mjs +0 -12
- package/dist/chunks/cli-0.6.13-hx71w6e6.mjs +0 -3
- package/dist/chunks/cli-0.6.13-hxfvksxq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-j6mr3jmk.mjs +0 -4
- package/dist/chunks/cli-0.6.13-jhhmjq66.mjs +0 -133
- package/dist/chunks/cli-0.6.13-jjx7jq0w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-jmzvtd06.mjs +0 -2
- package/dist/chunks/cli-0.6.13-jrdsk8wb.mjs +0 -3
- package/dist/chunks/cli-0.6.13-k0kyv254.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kd5h1s1s.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kdm4832x.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kekrwb08.mjs +0 -45
- package/dist/chunks/cli-0.6.13-kmg491hy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kqq5n5q3.mjs +0 -12
- package/dist/chunks/cli-0.6.13-kxjmrbfd.mjs +0 -3
- package/dist/chunks/cli-0.6.13-m4pb5k9v.mjs +0 -2
- package/dist/chunks/cli-0.6.13-me17wefv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-mreqrsw2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-mt7jkjdp.mjs +0 -39
- package/dist/chunks/cli-0.6.13-mxr0y1kd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-n4qwe0a1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-n67mrj2g.mjs +0 -15
- package/dist/chunks/cli-0.6.13-n9fz7y3a.mjs +0 -4
- package/dist/chunks/cli-0.6.13-nqd696hv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-nvcr131g.mjs +0 -4
- package/dist/chunks/cli-0.6.13-p02kfjzd.mjs +0 -8
- package/dist/chunks/cli-0.6.13-p2k33k0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-p5xafpx4.mjs +0 -3
- package/dist/chunks/cli-0.6.13-pa4yv2ra.mjs +0 -2
- package/dist/chunks/cli-0.6.13-pbk4h5n3.mjs +0 -3
- package/dist/chunks/cli-0.6.13-pezf5r7h.mjs +0 -2
- package/dist/chunks/cli-0.6.13-pmwrb4jf.mjs +0 -2
- package/dist/chunks/cli-0.6.13-prh9py3z.mjs +0 -2
- package/dist/chunks/cli-0.6.13-pyh5s43x.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q161snt1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q2ssb82w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q4spcjyn.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q8qzja14.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qbn7xx3z.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qemvn3t7.mjs +0 -4
- package/dist/chunks/cli-0.6.13-qfh8s56n.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qj9zpvjy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qtea9rcg.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qyd73z97.mjs +0 -2
- package/dist/chunks/cli-0.6.13-r043ksv1.mjs +0 -1
- package/dist/chunks/cli-0.6.13-r1exgbp8.mjs +0 -4
- package/dist/chunks/cli-0.6.13-r2w3m6g9.mjs +0 -2
- package/dist/chunks/cli-0.6.13-r4z5mchw.mjs +0 -2
- package/dist/chunks/cli-0.6.13-r7gkf1df.mjs +0 -2
- package/dist/chunks/cli-0.6.13-rkm2drsy.mjs +0 -6
- package/dist/chunks/cli-0.6.13-s2vxndky.mjs +0 -2
- package/dist/chunks/cli-0.6.13-s3r638fw.mjs +0 -2
- package/dist/chunks/cli-0.6.13-s9rv2pr3.mjs +0 -4
- package/dist/chunks/cli-0.6.13-sa8gmxxv.mjs +0 -3
- package/dist/chunks/cli-0.6.13-t5bkdhfz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tbg0cceg.mjs +0 -15
- package/dist/chunks/cli-0.6.13-tecj2x0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tfaydn5r.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tj2kvtza.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tss2yk53.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tvy6tmhe.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tyd40vcz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tzsj5e1c.mjs +0 -17
- package/dist/chunks/cli-0.6.13-v05nfcar.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v160yjcc.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v2vt3snq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v7kg9gbp.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v824ppa4.mjs +0 -3
- package/dist/chunks/cli-0.6.13-v83qp6b0.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v8ksdm64.mjs +0 -2
- package/dist/chunks/cli-0.6.13-vkbwqnxx.mjs +0 -2
- package/dist/chunks/cli-0.6.13-vv2qqj0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-vxq8z40t.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w039mymy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w0qrn825.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w1jqswyq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w91d8mwx.mjs +0 -2
- package/dist/chunks/cli-0.6.13-waf5mvv3.mjs +0 -5
- package/dist/chunks/cli-0.6.13-wer1zp9j.mjs +0 -20
- package/dist/chunks/cli-0.6.13-wtc8585b.mjs +0 -2
- package/dist/chunks/cli-0.6.13-x28t8s6n.mjs +0 -2
- package/dist/chunks/cli-0.6.13-xc81kqm2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-xdedyafk.mjs +0 -12
- package/dist/chunks/cli-0.6.13-xf37gba3.mjs +0 -21
- package/dist/chunks/cli-0.6.13-xkw3qe38.mjs +0 -2
- package/dist/chunks/cli-0.6.13-xpjrhgmy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y1j0jnkt.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y20earfr.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y4v6kta5.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y6xnb20z.mjs +0 -28
- package/dist/chunks/cli-0.6.13-y8bhbkcr.mjs +0 -2
- package/dist/chunks/cli-0.6.13-yamxpaqw.mjs +0 -67
- package/dist/chunks/cli-0.6.13-ykg1yrfj.mjs +0 -2
- package/dist/chunks/cli-0.6.13-yrjy4at4.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ytn0a18c.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ywdbvmgd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-z8s5yfv6.mjs +0 -9
- package/dist/chunks/cli-0.6.13-zcy8dsbx.mjs +0 -25
- package/dist/chunks/cli-0.6.13-zd9jp62z.mjs +0 -15
- package/dist/chunks/cli-0.6.13-ze0ah657.mjs +0 -4
- package/dist/chunks/cli-0.6.13-zktd03aq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-zw3t7bxg.mjs +0 -2
- package/dist/chunks/client-0.6.13-apag8p3w.mjs +0 -1
- package/dist/chunks/color-0.6.13-m7e3xes9.mjs +0 -1
- package/dist/chunks/compact-0.6.13-064k380y.mjs +0 -3
- package/dist/chunks/config-0.6.13-2gskfa7r.mjs +0 -1
- package/dist/chunks/config-0.6.13-m7tbch3j.mjs +0 -1
- package/dist/chunks/constants-0.6.13-bq183whd.mjs +0 -1
- package/dist/chunks/context-0.6.13-4jm66js8.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.6.13-2c2pa7c4.mjs +0 -1
- package/dist/chunks/conversation-0.6.13-gb8qd0a6.mjs +0 -1
- package/dist/chunks/copilotHeaders-0.6.13-sdz00vtr.mjs +0 -1
- package/dist/chunks/copy-0.6.13-11ksdws3.mjs +0 -9
- package/dist/chunks/cost-0.6.13-ht9hjse5.mjs +0 -1
- package/dist/chunks/createSSHSession-0.6.13-9nj8wxrq.mjs +0 -1
- package/dist/chunks/createSession-0.6.13-zx0ak0ar.mjs +0 -1
- package/dist/chunks/debug-0.6.13-1b2b2vfp.mjs +0 -1
- package/dist/chunks/defaultActionDeps-0.6.13-4ypccnwe.mjs +0 -1367
- package/dist/chunks/desktop-0.6.13-5jae65dg.mjs +0 -1
- package/dist/chunks/detectRepository-0.6.13-e3va8684.mjs +0 -1
- package/dist/chunks/detection-0.6.13-5kdd4ryt.mjs +0 -1
- package/dist/chunks/diff-0.6.13-3qr723e3.mjs +0 -1
- package/dist/chunks/doctor-0.6.13-ykby6vex.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-0.6.13-m5tnyxr2.mjs +0 -1
- package/dist/chunks/earlyInput-0.6.13-e90ax06h.mjs +0 -1
- package/dist/chunks/effort-0.6.13-tqkv5tt7.mjs +0 -10
- package/dist/chunks/envLessBridgeConfig-0.6.13-m8pp5emf.mjs +0 -1
- package/dist/chunks/envUtils-0.6.13-6q29pewb.mjs +0 -1
- package/dist/chunks/environmentSelection-0.6.13-ajfa3pm0.mjs +0 -1
- package/dist/chunks/environments-0.6.13-gpjjpygt.mjs +0 -1
- package/dist/chunks/errors-0.6.13-amqhpv1w.mjs +0 -1
- package/dist/chunks/exampleCommands-0.6.13-yscjfr02.mjs +0 -1
- package/dist/chunks/exit-0.6.13-aex1mh9r.mjs +0 -1
- package/dist/chunks/explorer-0.6.13-g670396m.mjs +0 -1
- package/dist/chunks/export-0.6.13-zytxcpn5.mjs +0 -2
- package/dist/chunks/extra-usage-0.6.13-js9s3mpg.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.6.13-1y21hfpz.mjs +0 -1
- package/dist/chunks/fast-0.6.13-eqx76m6v.mjs +0 -1
- package/dist/chunks/feedback-0.6.13-b2yh5zgv.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-0.6.13-29x54d6r.mjs +0 -1
- package/dist/chunks/git-0.6.13-r45r70q4.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.6.13-3saqxp80.mjs +0 -1
- package/dist/chunks/goal-0.6.13-jm5f9y8r.mjs +0 -4
- package/dist/chunks/grove-0.6.13-9vr9ry8t.mjs +0 -1
- package/dist/chunks/growthbook-0.6.13-r6367yym.mjs +0 -1
- package/dist/chunks/headless-0.6.13-gfageb5h.mjs +0 -2
- package/dist/chunks/heapdump-0.6.13-m8g832m5.mjs +0 -6
- package/dist/chunks/help-0.6.13-781b4zzf.mjs +0 -1
- package/dist/chunks/hookChains-0.6.13-ztaa33k2.mjs +0 -3
- package/dist/chunks/hooks-0.6.13-2vp3h6tg.mjs +0 -1
- package/dist/chunks/hooks-0.6.13-ma0g96bd.mjs +0 -79
- package/dist/chunks/ide-0.6.13-ev74eqfz.mjs +0 -3
- package/dist/chunks/image-processor-napi-0.6.13-1yfk6729.mjs +0 -1
- package/dist/chunks/inboundAttachments-0.6.13-15y4n0ap.mjs +0 -1
- package/dist/chunks/index-0.6.13-22g8yp33.mjs +0 -1
- package/dist/chunks/index-0.6.13-3d9rd6ba.mjs +0 -1
- package/dist/chunks/index-0.6.13-3yrze12y.mjs +0 -2
- package/dist/chunks/index-0.6.13-4mx71hjt.mjs +0 -2
- package/dist/chunks/index-0.6.13-68g8rnf9.mjs +0 -1
- package/dist/chunks/index-0.6.13-6t8yz88d.mjs +0 -1
- package/dist/chunks/index-0.6.13-af1dgcmj.mjs +0 -1
- package/dist/chunks/index-0.6.13-afmvxwx2.mjs +0 -1
- package/dist/chunks/index-0.6.13-by0wfak3.mjs +0 -9
- package/dist/chunks/index-0.6.13-cx9jy8c2.mjs +0 -1
- package/dist/chunks/index-0.6.13-fd4kgsd2.mjs +0 -1
- package/dist/chunks/index-0.6.13-jte6phkv.mjs +0 -1
- package/dist/chunks/index-0.6.13-m632g3gy.mjs +0 -1
- package/dist/chunks/index-0.6.13-mwpm4arf.mjs +0 -5
- package/dist/chunks/index-0.6.13-nwvcwdkk.mjs +0 -30
- package/dist/chunks/index-0.6.13-nwy6gtkk.mjs +0 -1
- package/dist/chunks/index-0.6.13-ptnyngf8.mjs +0 -1
- package/dist/chunks/index-0.6.13-q3shbg14.mjs +0 -1
- package/dist/chunks/index-0.6.13-qbgadtxv.mjs +0 -1
- package/dist/chunks/index-0.6.13-sv4q66cp.mjs +0 -1
- package/dist/chunks/index-0.6.13-waxz0ekk.mjs +0 -1
- package/dist/chunks/index-0.6.13-why7ggz3.mjs +0 -9
- package/dist/chunks/index-0.6.13-y16k48ab.mjs +0 -1
- package/dist/chunks/init-0.6.13-4hnytb22.mjs +0 -1
- package/dist/chunks/initReplBridge-0.6.13-7zgngybp.mjs +0 -1
- package/dist/chunks/ink-0.6.13-tzqbb17q.mjs +0 -1
- package/dist/chunks/insights-0.6.13-jydg844c.mjs +0 -870
- package/dist/chunks/install-0.6.13-n2sd9y79.mjs +0 -1
- package/dist/chunks/install-github-app-0.6.13-e0f07703.mjs +0 -149
- package/dist/chunks/install-slack-app-0.6.13-bf4yjq6t.mjs +0 -1
- package/dist/chunks/instrumentation-0.6.13-adfxdg5f.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.6.13-xp328y9v.mjs +0 -1
- package/dist/chunks/keybindings-0.6.13-ktc3mjr7.mjs +0 -2
- package/dist/chunks/knowledge-0.6.13-187esqxd.mjs +0 -2
- package/dist/chunks/latestVersionCache-0.6.13-m4bhcjqa.mjs +0 -1
- package/dist/chunks/loadAgentsDir-0.6.13-6zpt11ke.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.6.13-828skfe0.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.6.13-aft854e2.mjs +0 -1
- package/dist/chunks/log-0.6.13-k8w72xt1.mjs +0 -1
- package/dist/chunks/main-0.6.13-g9fjc6sv.mjs +0 -1
- package/dist/chunks/managedEnv-0.6.13-gqrx16t7.mjs +0 -1
- package/dist/chunks/mcp-0.6.13-dyg98wmq.mjs +0 -1
- package/dist/chunks/mcp-0.6.13-mzkm1215.mjs +0 -4
- package/dist/chunks/mcp-0.6.13-zkt6y77x.mjs +0 -17
- package/dist/chunks/mcpb-0.6.13-dre8w2ra.mjs +0 -1
- package/dist/chunks/memory-0.6.13-atsckryz.mjs +0 -3
- package/dist/chunks/model-0.6.13-0atttv57.mjs +0 -1
- package/dist/chunks/model-0.6.13-2jvx0cgc.mjs +0 -2
- package/dist/chunks/node-0.6.13-x2bbeer9.mjs +0 -12
- package/dist/chunks/oauth-0.6.13-57mmwqmy.mjs +0 -1
- package/dist/chunks/openaiShim-0.6.13-yb751f6g.mjs +0 -14
- package/dist/chunks/output-style-0.6.13-m28me769.mjs +0 -1
- package/dist/chunks/package-FMOR3ELU-0.6.13-dfhez176.mjs +0 -1
- package/dist/chunks/parseConnectUrl-0.6.13-6ckj0vmf.mjs +0 -1
- package/dist/chunks/parser-0.6.13-cmp0vgjm.mjs +0 -1
- package/dist/chunks/passes-0.6.13-q60h610m.mjs +0 -1
- package/dist/chunks/permissions-0.6.13-9cf5bca2.mjs +0 -3
- package/dist/chunks/permissions-0.6.13-nqms1fh9.mjs +0 -1
- package/dist/chunks/plan-0.6.13-jnph14bx.mjs +0 -1
- package/dist/chunks/plist-0.6.13-fwm9pvp5.mjs +0 -1
- package/dist/chunks/plugin-0.6.13-4hpbymfw.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.6.13-yftpxhh1.mjs +0 -1
- package/dist/chunks/plugins-0.6.13-jkptkxsv.mjs +0 -9
- package/dist/chunks/preActionHook-0.6.13-jxg6wxk8.mjs +0 -2
- package/dist/chunks/print-0.6.13-7cpe5d4z.mjs +0 -57
- package/dist/chunks/privacy-settings-0.6.13-5a5rxfdv.mjs +0 -1
- package/dist/chunks/process-0.6.13-38dsvzca.mjs +0 -1
- package/dist/chunks/processBashCommand-0.6.13-2hx0q8zw.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.6.13-5r7afr4g.mjs +0 -9
- package/dist/chunks/prompt-0.6.13-pafq1qab.mjs +0 -1
- package/dist/chunks/prompt-0.6.13-y81g0m1b.mjs +0 -1
- package/dist/chunks/prompts-0.6.13-702ak30b.mjs +0 -1
- package/dist/chunks/protocolHandler-0.6.13-t8f8haqj.mjs +0 -13
- package/dist/chunks/provider-0.6.13-2sx115qq.mjs +0 -2
- package/dist/chunks/providerProfiles-0.6.13-f8x8hr6k.mjs +0 -1
- package/dist/chunks/providerValidation-0.6.13-tf07v3tj.mjs +0 -6
- package/dist/chunks/rate-limit-options-0.6.13-aensbess.mjs +0 -1
- package/dist/chunks/registerSubcommands-0.6.13-656h79d4.mjs +0 -34
- package/dist/chunks/registry-0.6.13-pstf339a.mjs +0 -1
- package/dist/chunks/release-notes-0.6.13-hrppyszt.mjs +0 -5
- package/dist/chunks/reload-plugins-0.6.13-je6wrn33.mjs +0 -2
- package/dist/chunks/remote-env-0.6.13-z246d03z.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.6.13-ynnqhw07.mjs +0 -1
- package/dist/chunks/remoteSession-0.6.13-mv8v6s9c.mjs +0 -1
- package/dist/chunks/rename-0.6.13-xpt0c85z.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.6.13-rrpbzf13.mjs +0 -1
- package/dist/chunks/replLauncher-0.6.13-waeszqvx.mjs +0 -1
- package/dist/chunks/resume-0.6.13-sr7y57a2.mjs +0 -2
- package/dist/chunks/rewind-0.6.13-8czd98jc.mjs +0 -1
- package/dist/chunks/rootOptions-0.6.13-9h4cq5pq.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.6.13-hs1rvj4e.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.6.13-8j9r0wf9.mjs +0 -1
- package/dist/chunks/session-0.6.13-83jr96cj.mjs +0 -2
- package/dist/chunks/sessionDiscovery-0.6.13-wvzp1v01.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-0.6.13-4fkbba35.mjs +0 -1
- package/dist/chunks/sessionStorage-0.6.13-rswa4zsd.mjs +0 -1
- package/dist/chunks/settings-0.6.13-6t3fk1ch.mjs +0 -1
- package/dist/chunks/setup-0.6.13-q8jrvatq.mjs +0 -5
- package/dist/chunks/sinks-0.6.13-zatt5gaw.mjs +0 -1
- package/dist/chunks/skills-0.6.13-3c0whjxb.mjs +0 -1
- package/dist/chunks/startupProfiler-0.6.13-cphqp37f.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-0.6.13-hstp7str.mjs +0 -1
- package/dist/chunks/state-0.6.13-257cjw4h.mjs +0 -1
- package/dist/chunks/stats-0.6.13-cg0xacnc.mjs +0 -6
- package/dist/chunks/status-0.6.13-cefspgtr.mjs +0 -1
- package/dist/chunks/stickers-0.6.13-6e4t4ej1.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.6.13-am2fa4tp.mjs +0 -1
- package/dist/chunks/tasks-0.6.13-2v9gfhwe.mjs +0 -1
- package/dist/chunks/teamHelpers-0.6.13-nesaxh5h.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.6.13-s8fahdkf.mjs +0 -1
- package/dist/chunks/teleport-0.6.13-15chrxd3.mjs +0 -1
- package/dist/chunks/terminalSetup-0.6.13-45tchntj.mjs +0 -1
- package/dist/chunks/theme-0.6.13-xzb35tqq.mjs +0 -1
- package/dist/chunks/thinkback-0.6.13-t9v5q33p.mjs +0 -1
- package/dist/chunks/thinkback-play-0.6.13-3zft02zv.mjs +0 -1
- package/dist/chunks/toolPool-0.6.13-v9s7e0g9.mjs +0 -1
- package/dist/chunks/toolSearch-0.6.13-yx9rjn17.mjs +0 -1
- package/dist/chunks/tools-0.6.13-heefxcxe.mjs +0 -1
- package/dist/chunks/trustedDevice-0.6.13-x08npyhs.mjs +0 -1
- package/dist/chunks/turndown.cjs-0.6.13-tqfk5xkj.mjs +0 -69
- package/dist/chunks/types-0.6.13-26eegce9.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-0.6.13-pg8b86h2.mjs +0 -4
- package/dist/chunks/update-0.6.13-tj94pp6r.mjs +0 -86
- package/dist/chunks/upgrade-0.6.13-3qy3gqyq.mjs +0 -1
- package/dist/chunks/upload-0.6.13-jgydpvy4.mjs +0 -7
- package/dist/chunks/upstreamproxy-0.6.13-3jmepw2f.mjs +0 -14
- package/dist/chunks/url-handler-napi-0.6.13-cqr9xp6y.mjs +0 -1
- package/dist/chunks/usage-0.6.13-whrgny68.mjs +0 -1
- package/dist/chunks/util-0.6.13-dcwcf9pm.mjs +0 -1
- package/dist/chunks/utils-0.6.13-jybbphy0.mjs +0 -1
- package/dist/chunks/vim-0.6.13-rt1g3nw1.mjs +0 -1
- package/dist/chunks/watcher-0.6.13-jr5jxn5j.mjs +0 -1
- package/dist/chunks/wiki-0.6.13-pt6cr77j.mjs +0 -132
- package/dist/chunks/worktree-0.6.13-efnvp677.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.6.13-zdfe46d8.mjs +0 -1
- package/dist/chunks/wrapper-0.6.13-w672jy5j.mjs +0 -7
- /package/dist/chunks/{cli-0.6.13-s9yqkgwe.mjs → cli-0.7.0-59h7jbfm.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-e3h2z83b.mjs → cli-0.7.0-5vszg5ys.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-tsz6mx5f.mjs → cli-0.7.0-76wj8x34.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-rmzzvjt2.mjs → cli-0.7.0-brqbb2d5.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-p839x5sj.mjs → cli-0.7.0-jt2afswt.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-h2yxttam.mjs → cli-0.7.0-m9eza7ry.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-1dwgndg5.mjs → cli-0.7.0-z555y4ap.mjs} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{Vpa as o9,Xpa as B$,Zpa as M,_pa as YZ}from"./cli-0.7.0-8p56ked8.mjs";function O(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 K(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 WZ(Z){return typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name==="AbortError"||("message"in Z)&&String(Z.message).includes("FetchRequestCanceledException"))}var dZ=(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 PZ=()=>{};var F,m,t,LZ,y0,a8,f0,b0,h0,_0,g0,v0,m0,c0;var v=M(()=>{PZ();F=class F extends Error{};m=class m extends F{constructor(Z,$,X,J,z){super(`${m.makeMessage(Z,$,X)}`);this.status=Z,this.headers=J,this.requestID=J?.get("request-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 LZ({message:X,cause:dZ($)});let z=$,Y=z?.error?.type;if(Z===400)return new f0(Z,z,X,J,Y);if(Z===401)return new b0(Z,z,X,J,Y);if(Z===403)return new h0(Z,z,X,J,Y);if(Z===404)return new _0(Z,z,X,J,Y);if(Z===409)return new g0(Z,z,X,J,Y);if(Z===422)return new v0(Z,z,X,J,Y);if(Z===429)return new m0(Z,z,X,J,Y);if(Z>=500)return new c0(Z,z,X,J,Y);return new m(Z,z,X,J,Y)}};t=class t extends m{constructor({message:Z}={}){super(void 0,void 0,Z||"Request was aborted.",void 0)}};LZ=class LZ extends m{constructor({message:Z,cause:$}){super(void 0,void 0,Z||"Connection error.",void 0);if($)this.cause=$}};y0=class y0 extends LZ{constructor({message:Z}={}){super({message:Z??"Request timed out."})}};a8=class a8 extends F{constructor(Z,{cause:$}={}){super(Z??"Retryable error.");if($!==void 0)this.cause=$}};f0=class f0 extends m{};b0=class b0 extends m{};h0=class h0 extends m{};_0=class _0 extends m{};g0=class g0 extends m{};v0=class v0 extends m{};m0=class m0 extends m{};c0=class c0 extends m{}});var RZ;var u0=M(()=>{RZ=class RZ 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 t$(){let Z,$;return{promise:new Promise((J,z)=>{Z=J,$=z}),resolve:Z,reject:$}}var u1=()=>{};var z0=function(){let{crypto:Z}=globalThis;if(Z?.randomUUID)return z0=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 o8=()=>{};function d0(Z){if(typeof Z!=="object")return{};return Z??{}}function e$(Z){if(!Z)return!0;for(let $ in Z)return!1;return!0}function p1(Z,$){return Object.prototype.hasOwnProperty.call(Z,$)}var X9,d1=(Z)=>{return X9.test(Z)},s=(Z)=>(s=Array.isArray,s(Z)),s$,l1=(Z,$)=>{if(typeof $!=="number"||!Number.isInteger($))throw new F(`${Z} must be an integer`);if($<0)throw new F(`${Z} must be a positive integer`);return $},p0=(Z)=>{try{return JSON.parse(Z)}catch($){return}};var qZ=M(()=>{v();X9=/^[a-z][a-z0-9+.-]*:/i,s$=s});var MZ=(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 Y0=()=>{};var UZ="0.110.0";var l0=()=>{};function J9(){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 Y9(){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,Y=J[2]||0,V=J[3]||0;return{browser:$,version:`${z}.${Y}.${V}`}}}return null}var o1=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},z9=()=>{let Z=J9();if(Z==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":UZ,"X-Stainless-OS":n1(Deno.build.os),"X-Stainless-Arch":i1(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":UZ,"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":UZ,"X-Stainless-OS":n1(globalThis.process.platform??"unknown"),"X-Stainless-Arch":i1(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let $=Y9();if($)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":UZ,"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":UZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},i1=(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"},n1=(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"},a1,i0=()=>{return a1??(a1=z9())};var r8=M(()=>{l0()});function r1(){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 ZX(...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 t8(Z){let $=Symbol.asyncIterator in Z?Z[Symbol.asyncIterator]():Z[Symbol.iterator]();return ZX({start(){},async pull(X){let{done:J,value:z}=await $.next();if(J)X.close();else X.enqueue(z)},async cancel(){await $.return?.()}})}function n0(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 t1(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 K0=()=>{};var s1=({headers:Z,body:$})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify($)}};var $X=()=>{};var XX="RFC3986",JX=(Z)=>String(Z),zX,e1="RFC1738";var YX=M(()=>{zX={RFC1738:(Z)=>String(Z).replace(/%20/g,"+"),RFC3986:JX}});function $4(Z){if(!Z||typeof Z!=="object")return!1;return!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function QX(Z,$){if(s(Z)){let X=[];for(let J=0;J<Z.length;J+=1)X.push($(Z[J]));return X}return $(Z)}var s8=(Z,$)=>(s8=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),s8(Z,$)),HZ,KX=1024,Z4=(Z,$,X,J,z)=>{if(Z.length===0)return Z;let Y=Z;if(typeof Z==="symbol")Y=Symbol.prototype.toString.call(Z);else if(typeof Z!=="string")Y=String(Z);if(X==="iso-8859-1")return escape(Y).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<Y.length;Q+=KX){let W=Y.length>=KX?Y.slice(Q,Q+KX):Y,q=[];for(let H=0;H<W.length;++H){let U=W.charCodeAt(H);if(U===45||U===46||U===95||U===126||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||z===e1&&(U===40||U===41)){q[q.length]=W.charAt(H);continue}if(U<128){q[q.length]=HZ[U];continue}if(U<2048){q[q.length]=HZ[192|U>>6]+HZ[128|U&63];continue}if(U<55296||U>=57344){q[q.length]=HZ[224|U>>12]+HZ[128|U>>6&63]+HZ[128|U&63];continue}H+=1,U=65536+((U&1023)<<10|W.charCodeAt(H)&1023),q[q.length]=HZ[240|U>>18]+HZ[128|U>>12&63]+HZ[128|U>>6&63]+HZ[128|U&63]}V+=q.join("")}return V};var X4=M(()=>{YX();qZ();HZ=(()=>{let Z=[];for(let $=0;$<256;++$)Z.push("%"+(($<16?"0":"")+$.toString(16)).toUpperCase());return Z})()});function V9(Z){return typeof Z==="string"||typeof Z==="number"||typeof Z==="boolean"||typeof Z==="symbol"||typeof Z==="bigint"}function K4(Z,$,X,J,z,Y,V,Q,W,q,H,U,N,C,T,L,A,D){let B=Z,P=D,I=0,f=!1;while((P=P.get(VX))!==void 0&&!f){let u=P.get(Z);if(I+=1,typeof u<"u")if(u===I)throw RangeError("Cyclic object value");else f=!0;if(typeof P.get(VX)>"u")I=0}if(typeof q==="function")B=q($,B);else if(B instanceof Date)B=N?.(B);else if(X==="comma"&&s(B))B=QX(B,function(u){if(u instanceof Date)return N?.(u);return u});if(B===null){if(Y)return W&&!L?W($,i.encoder,A,"key",C):$;B=""}if(V9(B)||$4(B)){if(W){let u=L?$:W($,i.encoder,A,"key",C);return[T?.(u)+"="+T?.(W(B,i.encoder,A,"value",C))]}return[T?.($)+"="+T?.(String(B))]}let l=[];if(typeof B>"u")return l;let _;if(X==="comma"&&s(B)){if(L&&W)B=QX(B,W);_=[{value:B.length>0?B.join(",")||null:void 0}]}else if(s(q))_=q;else{let u=Object.keys(B);_=H?u.sort(H):u}let d=Q?String($).replace(/\./g,"%2E"):String($),g=J&&s(B)&&B.length===1?d+"[]":d;if(z&&s(B)&&B.length===0)return g+"[]";for(let u=0;u<_.length;++u){let NZ=_[u],uZ=typeof NZ==="object"&&typeof NZ.value<"u"?NZ.value:B[NZ];if(V&&uZ===null)continue;let r$=U&&Q?NZ.replace(/\./g,"%2E"):NZ,Z9=s(B)?typeof X==="function"?X(g,r$):g:g+(U?"."+r$:"["+r$+"]");D.set(Z,I);let c1=new WeakMap;c1.set(VX,D),Y4(l,K4(uZ,Z9,X,J,z,Y,V,Q,X==="comma"&&L&&s(B)?null:W,q,H,U,N,C,T,L,A,c1))}return l}function G9(Z=i){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||i.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=XX;if(typeof Z.format<"u"){if(!s8(zX,Z.format))throw TypeError("Unknown format option provided.");X=Z.format}let J=zX[X],z=i.filter;if(typeof Z.filter==="function"||s(Z.filter))z=Z.filter;let Y;if(Z.arrayFormat&&Z.arrayFormat in z4)Y=Z.arrayFormat;else if("indices"in Z)Y=Z.indices?"indices":"repeat";else Y=i.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:i.allowDots:!!Z.allowDots;return{addQueryPrefix:typeof Z.addQueryPrefix==="boolean"?Z.addQueryPrefix:i.addQueryPrefix,allowDots:V,allowEmptyArrays:typeof Z.allowEmptyArrays==="boolean"?!!Z.allowEmptyArrays:i.allowEmptyArrays,arrayFormat:Y,charset:$,charsetSentinel:typeof Z.charsetSentinel==="boolean"?Z.charsetSentinel:i.charsetSentinel,commaRoundTrip:!!Z.commaRoundTrip,delimiter:typeof Z.delimiter>"u"?i.delimiter:Z.delimiter,encode:typeof Z.encode==="boolean"?Z.encode:i.encode,encodeDotInKeys:typeof Z.encodeDotInKeys==="boolean"?Z.encodeDotInKeys:i.encodeDotInKeys,encoder:typeof Z.encoder==="function"?Z.encoder:i.encoder,encodeValuesOnly:typeof Z.encodeValuesOnly==="boolean"?Z.encodeValuesOnly:i.encodeValuesOnly,filter:z,format:X,formatter:J,serializeDate:typeof Z.serializeDate==="function"?Z.serializeDate:i.serializeDate,skipNulls:typeof Z.skipNulls==="boolean"?Z.skipNulls:i.skipNulls,sort:typeof Z.sort==="function"?Z.sort:null,strictNullHandling:typeof Z.strictNullHandling==="boolean"?Z.strictNullHandling:i.strictNullHandling}}function Q4(Z,$={}){let X=Z,J=G9($),z,Y;if(typeof J.filter==="function")Y=J.filter,X=Y("",X);else if(s(J.filter))Y=J.filter,z=Y;let V=[];if(typeof X!=="object"||X===null)return"";let Q=z4[J.arrayFormat],W=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 C=z[N];if(J.skipNulls&&X[C]===null)continue;Y4(V,K4(X[C],C,Q,W,J.allowEmptyArrays,J.strictNullHandling,J.skipNulls,J.encodeDotInKeys,J.encode?J.encoder:null,J.filter,J.sort,J.allowDots,J.serializeDate,J.format,J.formatter,J.encodeValuesOnly,J.charset,q))}let H=V.join(J.delimiter),U=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")U+="utf8=%26%2310003%3B&";else U+="utf8=%E2%9C%93&";return H.length>0?U+H:""}var z4,Y4=function(Z,$){Array.prototype.push.apply(Z,s($)?$:[$])},J4,i,VX;var V4=M(()=>{X4();YX();qZ();z4={brackets(Z){return String(Z)+"[]"},comma:"comma",indices(Z,$){return String(Z)+"["+$+"]"},repeat(Z){return String(Z)}},i={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Z4,encodeValuesOnly:!1,format:XX,formatter:JX,indices:!1,serializeDate(Z){return(J4??(J4=Function.prototype.call.bind(Date.prototype.toISOString)))(Z)},skipNulls:!1,strictNullHandling:!1};VX={}});function G4(Z){return Q4(Z,{arrayFormat:"brackets"})}var GX=M(()=>{V4()});function Z$(Z){if(!Z)return;let $;try{$=new URL(Z)}catch(J){throw new y(`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 y(`Refusing to send credential over non-https token endpoint "${Z}"`)}async function $$(Z,$){let X=await U9(Z),J;try{J=JSON.parse(X)}catch{throw new y(`Token endpoint returned non-JSON response (status ${Z.status})`,Z.status,$Z(X),$)}if(!J.access_token)throw new y(`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 y(`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<=NX)return Z;return Z.slice(0,NX)+`... <${Z.length-NX} more chars>`}return JSON.stringify($Z($))}if(typeof Z==="object"&&!Array.isArray(Z)){let $={};for(let[X,J]of Object.entries(Z))if(W9.has(X))$[X]=J;return $}return null}async function X$(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 Y=z.mode&511;if(Y&18)throw new y(`Credentials file at ${J} is group/world-writable (mode 0o${Y.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(Y&36)throw new y(`Credentials file at ${J} is group/world-readable (mode 0o${Y.toString(8)}); run \`chmod 600 ${J}\` before retrying.`);if(typeof process.getuid==="function"&&z.uid!==process.getuid())$(`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 Y=`${Z}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let V=await X.promises.open(Y,"w",384);try{await V.writeFile(JSON.stringify($,null,2)),await V.sync()}finally{await V.close()}await X.promises.rename(Y,Z)}catch(V){throw await X.promises.unlink(Y).catch(()=>{}),V}try{let V=await X.promises.open(z,"r");try{await V.sync()}finally{await V.close()}}catch{}}async function U9(Z){if(!Z.body)return"";let $=Z.body.getReader(),X=[],J=0;for(;;){let{done:Y,value:V}=await $.read();if(Y)break;if(J+V.length>N4){let Q=N4-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 Y=0;for(let V of X)z.set(V,Y),Y+=V.length}return new TextDecoder("utf-8").decode(z)}var W4="urn:ietf:params:oauth:grant-type:jwt-bearer",U4="refresh_token",e8="/v1/oauth/token",pZ="oauth-2025-04-20",w4="oidc-federation-2026-04-01",O4=120,Q0=30,q4=5,N4=1048576,NX=2000,W9,y;var V0=M(()=>{v();W9=new Set(["error","error_description","error_uri"]);y=class y extends F{constructor(Z,$=null,X=null,J=null){super(Z);this.statusCode=$,this.body=X,this.requestId=J}}});function CZ(){return Math.floor(Date.now()/1000)}var a0=()=>{};class WX{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-CZ();if(X>O4)return $.token;if(X>Q0)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(CZ()-this.lastAdvisoryError<q4)return;this.doRefresh().catch((Z)=>{this.lastAdvisoryError=CZ(),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 M4=M(()=>{V0();a0()});var j=(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 G0=()=>{};function H4(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 N0(Z){let $;return(C4??($=new globalThis.TextEncoder,C4=$.encode.bind($)))(Z)}function UX(Z){let $;return(F4??($=new globalThis.TextDecoder,F4=$.decode.bind($)))(Z)}var C4,F4;var z$=()=>{};var B4=M(()=>{v();z$()});function o0(){}function Y$(Z,$,X){if(!$||K$[Z]>K$[X])return o0;else return $[Z].bind($)}function OX(Z,$){let X=T4.get(Z);if(X&&X[0]===$)return X[1];let J={error:Y$("error",Z,$),warn:Y$("warn",Z,$),info:Y$("info",Z,$),debug:Y$("debug",Z,$)};return T4.set(Z,[$,J]),J}function R(Z){let $=Z.logger,X=Z.logLevel??"off";if(!$)return w9;return OX($,X)}function A4(){let Z=j("ANTHROPIC_LOG");if(!wX||Z!==x4)x4=Z,wX=OX(console,Q$(Z,"process.env['ANTHROPIC_LOG']",OX(console,r0))??r0);return wX}var r0="warn",K$,Q$=(Z,$,X)=>{if(!Z)return;if(p1(K$,Z))return Z;X.warn(`${$} was set to ${JSON.stringify(Z)}, expected one of ${JSON.stringify(Object.keys(K$))}`);return},w9,T4,x4,wX,BZ=(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 jZ=M(()=>{qZ();G0();K$={off:0,error:200,warn:300,info:400,debug:500};w9={error:o0,warn:o0,info:o0,debug:o0},T4=new WeakMap});var D4=M(()=>{qZ();B4();G0();jZ();o8();Y0();GX()});function L4(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(!O9.test(Z))throw Error(`profile name "${Z}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var V$="1.0",O9,j4=async(Z)=>{var $,X;let J=await qX();if(J===null)return null;let z=Z??await E4();if(z===null)return null;L4(z);let Y=await import("node:fs"),Q=(await import("node:path")).join(J,"configs",`${z}.json`),W;try{W=await Y.promises.readFile(Q,"utf-8")}catch(U){if(U?.code!=="ENOENT")throw Error(`failed to read config file ${Q}: ${U}`);W=null}if(W===null){let U=j("ANTHROPIC_ORGANIZATION_ID"),N=j("ANTHROPIC_IDENTITY_TOKEN_FILE"),C=j("ANTHROPIC_FEDERATION_RULE_ID");if(C&&U)return{fromFile:!1,config:{organization_id:U,workspace_id:j("ANTHROPIC_WORKSPACE_ID"),base_url:j("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:C,service_account_id:j("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:N?{source:"file",path:N}:void 0,scope:j("ANTHROPIC_SCOPE")}}};return null}let q;try{q=JSON.parse(W)}catch(U){throw Error(`failed to parse config file ${Q}: ${U}`)}if(!q.authentication)throw Error(`config file ${Q} is missing "authentication"`);let H=q.authentication.type;if(H!=="oidc_federation"&&H!=="user_oauth")throw Error(`authentication.type "${H}" is not a known authentication type`);if(q.organization_id??(q.organization_id=j("ANTHROPIC_ORGANIZATION_ID")),q.workspace_id??(q.workspace_id=j("ANTHROPIC_WORKSPACE_ID")),q.base_url??(q.base_url=j("ANTHROPIC_BASE_URL")),($=q.authentication).scope??($.scope=j("ANTHROPIC_SCOPE")),q.authentication.type==="oidc_federation"){if(!q.authentication.identity_token){let U=j("ANTHROPIC_IDENTITY_TOKEN_FILE");if(U)q.authentication.identity_token={source:"file",path:U}}if(!q.authentication.federation_rule_id)q.authentication.federation_rule_id=j("ANTHROPIC_FEDERATION_RULE_ID")??"";(X=q.authentication).service_account_id??(X.service_account_id=j("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:q,fromFile:!0}},S4=async(Z,$)=>{if(Z?.authentication.credentials_path)return Z.authentication.credentials_path;let X=await qX();if(!X)return null;let J=$??await E4();if(!J)return null;return L4(J),(await import("node:path")).join(X,"credentials",`${J}.json`)},qX=async()=>{if(!q9())return null;let Z=await import("node:path"),$=j("ANTHROPIC_CONFIG_DIR");if($)return $;if(i0()["X-Stainless-OS"]==="Windows"){let Y=j("APPDATA");if(Y)return Z.join(Y,"Anthropic");let V=j("USERPROFILE");if(V)return Z.join(V,"AppData","Roaming","Anthropic");return null}let J=j("XDG_CONFIG_HOME");if(J)return Z.join(J,"anthropic");let z=j("HOME");if(z)return Z.join(z,".config","anthropic");return null},q9=()=>{let Z=i0()["X-Stainless-Runtime"];return Z==="node"||Z==="deno"},E4=async()=>{let Z=await qX();if(!Z)return null;let $=j("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(Y){if(Y?.code!=="ENOENT")throw Error(`failed to read ${z}: ${Y}`);return"default"}};var MX=M(()=>{r8();D4();O9=/^[A-Za-z0-9_.-]+$/});function CX(Z){if(!Z)throw new F("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 F(`Failed to read identity token file at ${Z}: ${z}`)}let J=X.trim();if(!J)throw new F(`Identity token file at ${Z} is empty`);return J}}function P4(Z){if(!Z)throw new F("Identity token value is empty");return()=>Z}var R4=M(()=>{v()});function I4(Z){return async()=>{Z$(Z.baseURL);let $=await Z.identityTokenProvider();if($.length>16384)throw new y(`Identity token is ${Math.ceil($.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let X={grant_type:W4,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}${e8}`,z;try{z=await Z.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${pZ},${w4}`,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${UZ} oidcFederationProvider`},body:JSON.stringify(X)})}catch(W){throw new y(`Failed to reach token endpoint ${J}: ${W}`)}let Y=z.headers.get("Request-Id");if(!z.ok){let W=await z.text().catch(()=>""),q=$Z(W),H="";if(z.status===401)H=` 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 y(`Token exchange failed with status ${z.status}${Y?` (request-id ${Y})`:""}: ${q}${H}`,z.status,q,Y)}let V=await $$(z,Y),Q=Number(V.expires_in);if(!Number.isFinite(Q))throw new y(`Token endpoint response missing required fields: ${JSON.stringify($Z(V))}`,z.status,$Z(V),Y);return{token:V.access_token,expiresAt:CZ()+Q}}}var k4=M(()=>{V0();a0();l0()});function y4(Z){return async($)=>{let X=await import("node:fs");await X$(Z.credentialsPath,Z.onSafetyWarning);let J;try{J=await X.promises.readFile(Z.credentialsPath,"utf-8")}catch(A){throw new y(`Credentials file not found at ${Z.credentialsPath}: ${A}`)}let z;try{z=JSON.parse(J)}catch(A){throw new y(`Credentials file at ${Z.credentialsPath} is not valid JSON: ${A}`)}let Y=z.access_token;if(!Y)throw new y(`Credentials file at ${Z.credentialsPath} must include 'access_token'`);let V=z.expires_at;if(!$?.forceRefresh&&(V==null||CZ()<V-Q0))return{token:Y,expiresAt:V??null};let Q=z.refresh_token;if(!Z.clientId||!Q)throw new y(`Access token at ${Z.credentialsPath} has expired and no refresh is available (client_id ${Z.clientId?"set":"empty"}, refresh_token ${Q?"set":"empty"})`);Z$(Z.baseURL);let W={grant_type:U4,refresh_token:Q,client_id:Z.clientId},q=`${Z.baseURL}${e8}`,H;try{H=await Z.fetch(q,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":pZ,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${UZ} userOAuthProvider`},body:JSON.stringify(W)})}catch(A){throw new y(`User OAuth refresh failed to reach token endpoint: ${A}`)}let U=H.headers.get("Request-Id");if(!H.ok){let A=await H.text().catch(()=>"");throw new y(`User OAuth refresh failed (HTTP ${H.status}): ${$Z(A)}`,H.status,$Z(A),U)}let N=await $$(H,U),C=Number(N.expires_in);if(!Number.isFinite(C))throw new y(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify($Z(N))}`,H.status,$Z(N),U);let T=CZ()+C,L=N.refresh_token||Q;return await J$(Z.credentialsPath,{...z,version:V$,type:"oauth_token",access_token:N.access_token,expires_at:T,refresh_token:L}),{token:N.access_token,expiresAt:T}}}var f4=M(()=>{MX();V0();a0();l0()});function FX(Z,$){let X=Z.authentication.credentials_path??null,J=(Z.base_url||$.baseURL).replace(/\/+$/,""),z=M9(Z,X,J,$),Y={};if(Z.workspace_id&&Z.authentication.type==="user_oauth")Y["anthropic-workspace-id"]=Z.workspace_id;return{provider:z,extraHeaders:Y,baseURL:Z.base_url||void 0}}async function b4(Z,$){let X=await j4($);if(!X)return null;let{config:J,fromFile:z}=X,Y=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await S4(J,$)??void 0}};return FX(Y,Z)}function M9(Z,$,X,J){switch(Z.authentication.type){case"oidc_federation":{let z=Z.authentication,Y=C9(z);if(!Y)throw new y("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 y("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 y("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let V=I4({identityTokenProvider:Y,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 F9(V,$,J.onCacheWriteError,J.onSafetyWarning);return V}case"user_oauth":{if(!$)throw new y("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return y4({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 y(`authentication.type "${z}" is not a known authentication type`)}}}function C9(Z){if(Z.identity_token){let J=Z.identity_token.source;if(J!=="file")throw new y(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!Z.identity_token.path)throw new y('identity_token.source "file" requires a non-empty path');return CX(Z.identity_token.path)}let $=j("ANTHROPIC_IDENTITY_TOKEN_FILE");if($)return CX($);let X=j("ANTHROPIC_IDENTITY_TOKEN");if(X)return P4(X);return null}function F9(Z,$,X,J){return async(z)=>{let Y=await import("node:fs");await X$($,J);let V;try{let W=await Y.promises.readFile($,"utf-8");V=JSON.parse(W);let q=V?.access_token;if(q&&!z?.forceRefresh){let H=V?.expires_at;if(H==null||CZ()<H-Q0)return{token:q,expiresAt:H??null}}}catch(W){if(W?.code!=="ENOENT"&&!(W instanceof SyntaxError))X?.(W)}let Q=await Z(z);try{await J$($,{...V??{},version:V$,type:"oauth_token",access_token:Q.token,expires_at:Q.expiresAt})}catch(W){X?.(W)}return Q}}var h4=M(()=>{G0();MX();V0();a0();R4();k4();f4()});class IZ{constructor(){KZ.set(this,void 0),QZ.set(this,void 0),O(this,KZ,new Uint8Array,"f"),O(this,QZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?N0(Z):Z;O(this,KZ,H4([K(this,KZ,"f"),$]),"f");let X=[],J;while((J=H9(K(this,KZ,"f"),K(this,QZ,"f")))!=null){if(J.carriage&&K(this,QZ,"f")==null){O(this,QZ,J.index,"f");continue}if(K(this,QZ,"f")!=null&&(J.index!==K(this,QZ,"f")+1||J.carriage)){X.push(UX(K(this,KZ,"f").subarray(0,K(this,QZ,"f")-1))),O(this,KZ,K(this,KZ,"f").subarray(K(this,QZ,"f")),"f"),O(this,QZ,null,"f");continue}let z=K(this,QZ,"f")!==null?J.preceding-1:J.preceding,Y=UX(K(this,KZ,"f").subarray(0,z));X.push(Y),O(this,KZ,K(this,KZ,"f").subarray(J.index),"f"),O(this,QZ,null,"f")}return X}flush(){if(!K(this,KZ,"f").length)return[];return this.decode(`
|
|
2
|
+
`)}}function H9(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 _4(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 HX=M(()=>{zZ();z$();KZ=new WeakMap,QZ=new WeakMap;IZ.NEWLINE_CHARS=new Set([`
|
|
3
|
+
`,"\r"]);IZ.NEWLINE_REGEXP=/\r\n|[\n\r]/g});async function*g4(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new F("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 F("Attempted to iterate over a response with no body")}let X=new v4,J=new IZ,z=n0(Z.body);for await(let Y of B9(z))for(let V of J.decode(Y)){let Q=X.decode(V);if(Q)yield Q}for(let Y of J.flush()){let V=X.decode(Y);if(V)yield V}}async function*B9(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"?N0(X):X,z=new Uint8Array($.length+J.length);z.set($),z.set(J,$.length),$=z;let Y;while((Y=_4($))!==-1)yield $.slice(0,Y),$=$.slice(Y)}if($.length>0)yield $}class v4{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]=T9(Z,":");if(J.startsWith(" "))J=J.substring(1);if($==="event")this.event=J;else if($==="data")this.data.push(J);return null}}function T9(Z,$){let X=Z.indexOf($);if(X!==-1)return[Z.substring(0,X),$,Z.substring(X+$.length)];return[Z,"",""]}var t0,e;var s0=M(()=>{zZ();v();K0();HX();K0();PZ();qZ();z$();jZ();v();e=class e{constructor(Z,$,X){this.iterator=Z,t0.set(this,void 0),this.controller=$,O(this,t0,X,"f")}static rawEvents(Z,$=new AbortController){return g4(Z,$)}static fromSSEResponse(Z,$,X){let J=!1,z=X?R(X):console;async function*Y(){if(J)throw new F("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let Q of g4(Z,$)){if(Q.event==="completion")try{yield JSON.parse(Q.data)}catch(W){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),W}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(W){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),W}if(Q.event==="ping")continue;if(Q.event==="error"){let W=p0(Q.data)??Q.data,q=W?.error?.type;throw new m(void 0,W,void 0,Z.headers,q)}}V=!0}catch(Q){if(WZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new e(Y,$,X)}static fromReadableStream(Z,$,X){let J=!1;async function*z(){let V=new IZ,Q=n0(Z);for await(let W of Q)for(let q of V.decode(W))yield q;for(let W of V.flush())yield W}async function*Y(){if(J)throw new F("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(WZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new e(Y,$,X)}[(t0=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],X=this.iterator(),J=(z)=>{return{next:()=>{if(z.length===0){let Y=X.next();Z.push(Y),$.push(Y)}return z.shift()}}};return[new e(()=>J(Z),this.controller,K(this,t0,"f")),new e(()=>J($),this.controller,K(this,t0,"f"))]}toReadableStream(){let Z=this,$;return ZX({async start(){$=Z[Symbol.asyncIterator]()},async pull(X){try{let{value:J,done:z}=await $.next();if(z)return X.close();let Y=N0(JSON.stringify(J)+`
|
|
5
|
+
`);X.enqueue(Y)}catch(J){X.error(J)}},async cancel(){await $.return?.()}})}}});async function G$(Z,$){let{response:X,requestLogID:J,retryOfRequestLogID:z,startTime:Y}=$,V=await(async()=>{if($.options.stream)return R(Z).debug("response",X.status,X.url,X.headers,X.body),e.fromSSEResponse(X,$.controller);if(X.status===204)return null;if($.options.__binaryResponse)return X;let W=X.headers.get("content-type")?.split(";")[0]?.trim();if(W?.includes("application/json")||W?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;let N=await X.json();return e0(N,X)}return await X.text()})();return R(Z).debug(`[${J}] response parsed`,BZ({retryOfRequestLogID:z,url:X.url,status:X.status,body:V,durationMs:Date.now()-Y})),V}function e0(Z,$){if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;return Object.defineProperty(Z,"_request_id",{value:$.headers.get("request-id"),enumerable:!1})}var N$=M(()=>{s0();jZ()});function BX(Z){return typeof Z==="object"&&Z!==null&&c4.has(Z)}function u4(Z){let $=new Set;while(typeof Z==="object"&&Z!==null&&!$.has(Z)){if($.add(Z),BX(Z)||WZ(Z)||Z instanceof LZ||Z instanceof a8)return!0;Z=Z.cause}return!1}function TX(Z,$,X,J){return async(z,Y={})=>{if($.length===0)return Z.call(void 0,z,Y);let V=Y.headers instanceof Headers?Y.headers:new Headers(Y.headers),Q=await A9(Z,$,X,J)({...Y,headers:V,url:typeof z==="string"?z:z instanceof URL?z.href:z.url});if(Q.bodyUsed||Q.body?.locked)throw new F("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 x9(Z,$){let X=new WeakMap;return{options:Z,logger:$?R($):A4(),parse(J){if(Z?.stream&&J.ok)return m4(J,Z);let z=X.get(J);if(!z)z=m4(J,Z),X.set(J,z);return z}}}async function m4(Z,$){if(Z.bodyUsed||Z.body?.locked)throw new F("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 e.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 e0(await Z.clone().json(),Z)}return await Z.clone().text()}function A9(Z,$,X,J){let z=async({url:V,...Q})=>{try{return await Z.call(void 0,V,Q)}catch(W){let q=dZ(W);throw c4.add(q),q}},Y=x9(X,J);for(let V=$.length-1;V>=0;V--){let Q=$[V],W=z;z=async(q)=>Q(q,W,Y)}return z}var c4;var d4=M(()=>{PZ();N$();jZ();v();s0();c4=new WeakSet});var Z8,lZ;var W$=M(()=>{zZ();N$();lZ=class lZ extends Promise{constructor(Z,$,X=G$){super((J)=>{J(null)});this.responsePromise=$,this.parseResponse=X,Z8.set(this,void 0),O(this,Z8,Z,"f")}_thenUnwrap(Z){return new lZ(K(this,Z8,"f"),this.responsePromise,async($,X)=>e0(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")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((Z)=>this.parseResponse(K(this,Z8,"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)}};Z8=new WeakMap});var U$,w$,O$,FZ,S,xX;var b=M(()=>{zZ();v();N$();W$();qZ();w$=class w${constructor(Z,$,X,J){U$.set(this,void 0),O(this,U$,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 F("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await K(this,U$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(U$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}};O$=class O$ extends lZ{constructor(Z,$,X){super(Z,$,async(J,z)=>new X(J,z.response,await G$(J,z),z.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}};FZ=class FZ extends w${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:{...d0(this.options.query),before_id:$}}}let Z=this.last_id;if(!Z)return null;return{...this.options,query:{...d0(this.options.query),after_id:Z}}}};S=class S extends w${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:{...d0(this.options.query),page:Z}}}};xX=class xX extends w${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:{...d0(this.options.query),page:Z}}}}});function iZ(Z,$,X){return DX(),new File(Z,$??"unknown_file",X)}function $8(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 L9(Z){let $=typeof Z==="function"?Z:Z.fetch,X=p4.get($);if(X)return X;let J=(async()=>{try{let z="Response"in $?$.Response:(await $("data:,")).constructor,Y=new FormData;if(Y.toString()===await new z(Y).text())return!1;return!0}catch{return!0}})();return p4.set($,J),J}var DX=()=>{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`.":""))}},LX=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z[Symbol.asyncIterator]==="function",W0=async(Z,$,X=!0)=>{return{...Z,body:await j9(Z.body,$,X)}},p4,j9=async(Z,$,X=!0)=>{if(!await L9($))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,Y])=>AX(J,z,Y,X))),J},S9=(Z)=>Z instanceof Blob&&("name"in Z),AX=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={},Y=X.headers.get("Content-Type");if(Y)z={type:Y};Z.append($,iZ([await X.blob()],$8(X,J),z))}else if(LX(X))Z.append($,iZ([await new Response(t8(X)).blob()],$8(X,J)));else if(S9(X))Z.append($,iZ([X],$8(X,J),{type:X.type}));else if(Array.isArray(X))await Promise.all(X.map((z)=>AX(Z,$+"[]",z,J)));else if(typeof X==="object")await Promise.all(Object.entries(X).map(([z,Y])=>AX(Z,`${$}[${z}]`,Y,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${X} instead`)};var U0=M(()=>{K0();p4=new WeakMap});async function q$(Z,$,X){if(DX(),Z=await Z,$||($=$8(Z,!0)),E9(Z)){if(Z instanceof File&&$==null&&X==null)return Z;return iZ([await Z.arrayBuffer()],$??Z.name,{type:Z.type,lastModified:Z.lastModified,...X})}if(P9(Z)){let z=await Z.blob();return $||($=new URL(Z.url).pathname.split(/[\\/]/).pop()),iZ(await jX(z),$,X)}let J=await jX(Z);if(!X?.type){let z=J.find((Y)=>typeof Y==="object"&&("type"in Y)&&Y.type);if(typeof z==="string")X={...X,type:z}}return iZ(J,$,X)}async function jX(Z){let $=[];if(typeof Z==="string"||ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer)$.push(Z);else if(l4(Z))$.push(Z instanceof Blob?Z:await Z.arrayBuffer());else if(LX(Z))for await(let X of Z)$.push(...await jX(X));else{let X=Z?.constructor?.name;throw Error(`Unexpected data type: ${typeof Z}${X?`; constructor: ${X}`:""}${R9(Z)}`)}return $}function R9(Z){if(typeof Z!=="object"||Z===null)return"";return`; props: [${Object.getOwnPropertyNames(Z).map((X)=>`"${X}"`).join(", ")}]`}var l4=(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",E9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.name==="string"&&typeof Z.lastModified==="number"&&l4(Z),P9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.url==="string"&&typeof Z.blob==="function";var i4=M(()=>{U0();U0()});var SX=M(()=>{i4()});var n4=()=>{};class x{constructor(Z){this._client=Z}}var k=()=>{};function*k9(Z){if(!Z)return;if(a4 in Z){let{values:J,nulls:z}=Z;yield*J.entries();for(let Y of z)yield[Y,null];return}let $=!1,X;if(Z instanceof Headers)X=Z.entries();else if(s$(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 Y=s$(J[1])?J[1]:[J[1]],V=!1;for(let Q of Y){if(Q===void 0)continue;if($&&!V)V=!0,yield[z,M$];yield[z,Q]}}}var a4,M$,y9,o4=(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(", ")},G=(Z)=>{let $=new Headers,X=new Set;for(let J of Z){let z=new Set;for(let[Y,V]of k9(J)){let Q=Y.toLowerCase();if(y9.has(Q)){if(V===M$)continue;if(V===null)$.delete(Y),X.add(Q);else $.set(Y,o4($.get(Y),V)),X.delete(Q);continue}if(V===M$||!z.has(Q)){if($.delete(Y),z.add(Q),V===M$)continue}if(V===null)$.delete(Y),X.add(Q);else $.append(Y,V),X.delete(Q)}}return{[a4]:!0,values:$,nulls:X}};var E=M(()=>{qZ();a4=Symbol.for("brand.privateNullableHeaders");M$=Symbol("clear"),y9=new Set(["x-stainless-helper"])});function t4(Z){return Z.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var r4,f9=(Z=t4)=>function(X,...J){if(X.length===1)return X[0];let z=!1,Y=[],V=X.reduce((H,U,N)=>{if(/[?#]/.test(U))z=!0;let C=J[N],T=(z?encodeURIComponent:Z)(""+C);if(N!==J.length&&(C==null||typeof C==="object"&&C.toString===Object.getPrototypeOf(Object.getPrototypeOf(C.hasOwnProperty??r4)??r4)?.toString))T=C+"",Y.push({start:H.length+U.length,length:T.length,error:`Value of type ${Object.prototype.toString.call(C).slice(8,-1)} is not a valid path parameter`});return H+U+(N===J.length?"":T)},""),Q=V.split(/[?#]/,1)[0],W=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,q;while((q=W.exec(Q))!==null)Y.push({start:q.index,length:q[0].length,error:`Value "${q[0]}" can't be safely passed as a path parameter`});if(Y.sort((H,U)=>H.start-U.start),Y.length>0){let H=0,U=Y.reduce((N,C)=>{let T=" ".repeat(C.start-H),L="^".repeat(C.length);return H=C.start+C.length,N+T+L},"");throw new F(`Path parameters result in path with invalid segments:
|
|
6
|
+
${Y.map((N)=>N.error).join(`
|
|
7
|
+
`)}
|
|
8
|
+
${V}
|
|
9
|
+
${U}`)}return V},w;var h=M(()=>{v();r4=Object.freeze(Object.create(null)),w=f9(t4)});var X8;var EX=M(()=>{k();b();E();h();X8=class X8 extends x{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/deployment_runs/${Z}?beta=true`,{...X,headers:G([{"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:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}}});var J8;var PX=M(()=>{k();b();E();h();J8=class J8 extends x{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/deployments?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/deployments/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/deployments/${Z}?beta=true`,{body:z,...X,headers:G([{"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:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/deployments/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}pause(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/deployments/${Z}/pause?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}run(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/deployments/${Z}/run?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}unpause(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/deployments/${Z}/unpause?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});function K8(Z){return{["x-stainless-helper"]:Z}}function C$(Z){return typeof Z==="object"&&Z!==null&&z8 in Z}function RX(Z,$){let X=new Set;if(Z){for(let J of Z)if(C$(J))X.add(J[z8])}if($)for(let J of $){if(C$(J))X.add(J[z8]);let z=J.content;if(Array.isArray(z)){for(let Y of z)if(C$(Y))X.add(Y[z8])}}return Array.from(X)}function H$(Z,$){let X=RX(Z,$);if(X.length===0)return{};return{["x-stainless-helper"]:X.join(", ")}}function s4(Z){if(C$(Z))return{["x-stainless-helper"]:Z[z8]};return{}}var Y8="x-stainless-helper",F$="x-stainless-helper-method",z8;var TZ=M(()=>{z8=Symbol("anthropic.sdk.stainlessHelper")});var Q8;var IX=M(()=>{k();b();E();TZ();U0();h();Q8=class Q8 extends x{list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/files?beta=true",FZ,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(w`/v1/files/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}download(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/files/${Z}/content?beta=true`,{...X,headers:G([{"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(w`/v1/files/${Z}?beta=true`,{...X,headers:G([{"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",W0({body:J,...$,headers:G([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},s4(J.file),$?.headers])},this._client))}}});var V8;var kX=M(()=>{k();b();E();h();V8=class V8 extends x{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/models/${Z}?beta=true`,{...X,headers:G([{...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",FZ,{query:J,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var G8;var yX=M(()=>{k();b();E();h();G8=class G8 extends x{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/user_profiles?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"user-profiles-2026-03-24"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/user_profiles/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/user_profiles/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/user_profiles?beta=true",S,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"user-profiles-2026-03-24"].toString()},$?.headers])})}createEnrollmentURL(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/user_profiles/${Z}/enrollment_url?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}}});var X6=B$((Z6)=>{Object.defineProperty(Z6,"__esModule",{value:!0});Z6.timingSafeEqual=void 0;function e4(Z,$=""){if(!Z)throw Error($)}function m9(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:$);e4(Z instanceof DataView),e4($ instanceof DataView);let X=Z.byteLength,J=0,z=-1;while(++z<X)J|=Z.getUint8(z)^$.getUint8(z);return J===0}Z6.timingSafeEqual=m9});var Y6=B$((VZ)=>{var c9=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 Y in z)if(z.hasOwnProperty(Y))J[Y]=z[Y]},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 p=256,fX=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 Y=$.length-J;if(Y>0){var z=$[J]<<16|(Y===2?$[J+1]<<8:0);if(X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),Y===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)),Y=0,V=0,Q=0,W=0,q=0,H=0,U=0;for(;V<J-4;V+=4)W=this._decodeChar($.charCodeAt(V+0)),q=this._decodeChar($.charCodeAt(V+1)),H=this._decodeChar($.charCodeAt(V+2)),U=this._decodeChar($.charCodeAt(V+3)),z[Y++]=W<<2|q>>>4,z[Y++]=q<<4|H>>>2,z[Y++]=H<<6|U,Q|=W&p,Q|=q&p,Q|=H&p,Q|=U&p;if(V<J-1)W=this._decodeChar($.charCodeAt(V)),q=this._decodeChar($.charCodeAt(V+1)),z[Y++]=W<<2|q>>>4,Q|=W&p,Q|=q&p;if(V<J-2)H=this._decodeChar($.charCodeAt(V+2)),z[Y++]=q<<4|H>>>2,Q|=H&p;if(V<J-3)U=this._decodeChar($.charCodeAt(V+3)),z[Y++]=H<<6|U,Q|=U&p;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=p;return X+=(42-$&$-44)>>>8&-p+$-43+62,X+=(46-$&$-48)>>>8&-p+$-47+63,X+=(47-$&$-58)>>>8&-p+$-48+52,X+=(64-$&$-91)>>>8&-p+$-65+0,X+=(96-$&$-123)>>>8&-p+$-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=fX;var N8=new fX;function u9(Z){return N8.encode(Z)}VZ.encode=u9;function d9(Z){return N8.decode(Z)}VZ.decode=d9;var J6=function(Z){c9($,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=p;return J+=(44-X&X-46)>>>8&-p+X-45+62,J+=(94-X&X-96)>>>8&-p+X-95+63,J+=(47-X&X-58)>>>8&-p+X-48+52,J+=(64-X&X-91)>>>8&-p+X-65+0,J+=(96-X&X-123)>>>8&-p+X-97+26,J},$}(fX);VZ.URLSafeCoder=J6;var z6=new J6;function p9(Z){return z6.encode(Z)}VZ.encodeURLSafe=p9;function l9(Z){return z6.decode(Z)}VZ.decodeURLSafe=l9;VZ.encodedLength=function(Z){return N8.encodedLength(Z)};VZ.maxDecodedLength=function(Z){return N8.maxDecodedLength(Z)};VZ.decodedLength=function(Z){return N8.decodedLength(Z)}});var Q6=B$((K6,T$)=>{(function(Z,$){var X={};$(X);var J=X.default;for(var z in X)J[z]=X[z];if(typeof T$==="object"&&typeof T$.exports==="object")T$.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else Z.sha256=J})(K6,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(U,N,C,T,L){var A,D,B,P,I,f,l,_,d,g,u,NZ,uZ;while(L>=64){A=N[0],D=N[1],B=N[2],P=N[3],I=N[4],f=N[5],l=N[6],_=N[7];for(g=0;g<16;g++)u=T+g*4,U[g]=(C[u]&255)<<24|(C[u+1]&255)<<16|(C[u+2]&255)<<8|C[u+3]&255;for(g=16;g<64;g++)d=U[g-2],NZ=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=U[g-15],uZ=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,U[g]=(NZ+U[g-7]|0)+(uZ+U[g-16]|0);for(g=0;g<64;g++)NZ=(((I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7))+(I&f^~I&l)|0)+(_+($[g]+U[g]|0)|0)|0,uZ=((A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10))+(A&D^A&B^D&B)|0,_=l,l=f,f=I,I=P+NZ|0,P=B,B=D,D=A,A=NZ+uZ|0;N[0]+=A,N[1]+=D,N[2]+=B,N[3]+=P,N[4]+=I,N[5]+=f,N[6]+=l,N[7]+=_,T+=64,L-=64}return T}var J=function(){function U(){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 U.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},U.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()},U.prototype.update=function(N,C){if(C===void 0)C=N.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var T=0;if(this.bytesHashed+=C,this.bufferLength>0){while(this.bufferLength<64&&C>0)this.buffer[this.bufferLength++]=N[T++],C--;if(this.bufferLength===64)X(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(C>=64)T=X(this.temp,this.state,N,T,C),C%=64;while(C>0)this.buffer[this.bufferLength++]=N[T++],C--;return this},U.prototype.finish=function(N){if(!this.finished){var C=this.bytesHashed,T=this.bufferLength,L=C/536870912|0,A=C<<3,D=C%64<56?64:128;this.buffer[T]=128;for(var B=T+1;B<D-8;B++)this.buffer[B]=0;this.buffer[D-8]=L>>>24&255,this.buffer[D-7]=L>>>16&255,this.buffer[D-6]=L>>>8&255,this.buffer[D-5]=L>>>0&255,this.buffer[D-4]=A>>>24&255,this.buffer[D-3]=A>>>16&255,this.buffer[D-2]=A>>>8&255,this.buffer[D-1]=A>>>0&255,X(this.temp,this.state,this.buffer,0,D),this.finished=!0}for(var B=0;B<8;B++)N[B*4+0]=this.state[B]>>>24&255,N[B*4+1]=this.state[B]>>>16&255,N[B*4+2]=this.state[B]>>>8&255,N[B*4+3]=this.state[B]>>>0&255;return this},U.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},U.prototype._saveState=function(N){for(var C=0;C<this.state.length;C++)N[C]=this.state[C]},U.prototype._restoreState=function(N,C){for(var T=0;T<this.state.length;T++)this.state[T]=N[T];this.bytesHashed=C,this.finished=!1,this.bufferLength=0},U}();Z.Hash=J;var z=function(){function U(N){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var C=new Uint8Array(this.blockSize);if(N.length>this.blockSize)new J().update(N).finish(C).clean();else for(var T=0;T<N.length;T++)C[T]=N[T];for(var T=0;T<C.length;T++)C[T]^=54;this.inner.update(C);for(var T=0;T<C.length;T++)C[T]^=106;this.outer.update(C),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var T=0;T<C.length;T++)C[T]=0}return U.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},U.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()},U.prototype.update=function(N){return this.inner.update(N),this},U.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},U.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},U}();Z.HMAC=z;function Y(U){var N=new J().update(U),C=N.digest();return N.clean(),C}Z.hash=Y,Z.default=Y;function V(U,N){var C=new z(U).update(N),T=C.digest();return C.clean(),T}Z.hmac=V;function Q(U,N,C,T){var L=T[0];if(L===0)throw Error("hkdf: cannot expand more");if(N.reset(),L>1)N.update(U);if(C)N.update(C);N.update(T),N.finish(U),T[0]++}var W=new Uint8Array(Z.digestLength);function q(U,N,C,T){if(N===void 0)N=W;if(T===void 0)T=32;var L=new Uint8Array([1]),A=V(N,U),D=new z(A),B=new Uint8Array(D.digestLength),P=B.length,I=new Uint8Array(T);for(var f=0;f<T;f++){if(P===B.length)Q(B,D,C,L),P=0;I[f]=B[P++]}return D.clean(),B.fill(0),L.fill(0),I}Z.hkdf=q;function H(U,N,C,T){var L=new z(U),A=L.digestLength,D=new Uint8Array(4),B=new Uint8Array(A),P=new Uint8Array(A),I=new Uint8Array(T);for(var f=0;f*A<T;f++){var l=f+1;D[0]=l>>>24&255,D[1]=l>>>16&255,D[2]=l>>>8&255,D[3]=l>>>0&255,L.reset(),L.update(N),L.update(D),L.finish(P);for(var _=0;_<A;_++)B[_]=P[_];for(var _=2;_<=C;_++){L.reset(),L.update(P).finish(P);for(var d=0;d<A;d++)B[d]^=P[d]}for(var _=0;_<A&&f*A+_<T;_++)I[f*A+_]=B[_]}for(var f=0;f<A;f++)B[f]=P[f]=0;for(var f=0;f<4;f++)D[f]=0;return L.clean(),I}Z.pbkdf2=H})});var U6=B$((N6)=>{Object.defineProperty(N6,"__esModule",{value:!0});N6.Webhook=N6.WebhookVerificationError=void 0;var i9=X6(),V6=Y6(),n9=Q6(),G6=300;class bX extends Error{constructor(Z){super(Z);Object.setPrototypeOf(this,bX.prototype),this.name="ExtendableError",this.stack=Error(Z).stack}}class kZ extends bX{constructor(Z){super(Z);Object.setPrototypeOf(this,kZ.prototype),this.name="WebhookVerificationError"}}N6.WebhookVerificationError=kZ;class W8{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(W8.prefix))Z=Z.substring(W8.prefix.length);this.key=V6.decode(Z)}}verify(Z,$){let X={};for(let U of Object.keys($))X[U.toLowerCase()]=$[U];let J=X["webhook-id"],z=X["webhook-signature"],Y=X["webhook-timestamp"];if(!z||!J||!Y)throw new kZ("Missing required headers");let V=this.verifyTimestamp(Y),W=this.sign(J,V,Z).split(",")[1],q=z.split(" "),H=new globalThis.TextEncoder;for(let U of q){let[N,C]=U.split(",");if(N!=="v1")continue;if((0,i9.timingSafeEqual)(H.encode(C),H.encode(W)))return JSON.parse(Z.toString())}throw new kZ("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),Y=J.encode(`${Z}.${z}.${X}`);return`v1,${V6.encode(n9.hmac(this.key,Y))}`}verifyTimestamp(Z){let $=Math.floor(Date.now()/1000),X=parseInt(Z,10);if(isNaN(X))throw new kZ("Invalid Signature Headers");if($-X>G6)throw new kZ("Message timestamp too old");if(X>$+G6)throw new kZ("Message timestamp too new");return new Date(X*1000)}}N6.Webhook=W8;W8.prefix="whsec_"});var w6,U8;var hX=M(()=>{k();w6=o9(U6(),1);U8=class U8 extends x{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 w6.Webhook(J).verify(Z,$)}return JSON.parse(Z)}}});var w8;var _X=M(()=>{k();b();E();h();w8=class w8 extends x{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/agents/${Z}/versions?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var w0;var gX=M(()=>{k();_X();_X();b();E();h();w0=class w0 extends x{constructor(){super(...arguments);this.versions=new w8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/agents?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(w`/v1/agents/${Z}?beta=true`,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/agents/${Z}?beta=true`,{body:z,...X,headers:G([{"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:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/agents/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};w0.Versions=w8});function nZ(Z,$){if(!Z)return()=>{};if(Z.aborted)return $.abort(),()=>{};let X=()=>$.abort();return Z.addEventListener("abort",X),()=>Z.removeEventListener("abort",X)}var x$=()=>{};function yZ(Z,$){return Z instanceof m&&Z.status===$}function O6(Z){return Z instanceof m&&typeof Z.status==="number"&&Z.status>=400&&Z.status<500}function fZ(Z){return O6(Z)&&!yZ(Z,408)&&!yZ(Z,409)&&!yZ(Z,429)}function q6(Z,$,X){return Math.min($*2**Z,X)}function vX(Z,$){return Z+Math.random()*($-Z)}function M6(Z){return Z*(1-Math.random()*0.25)}var O8=M(()=>{v()});function A$(Z,{authToken:$,helper:X}){if(!$)throw new F(`copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify($)}`);let J=Z,z=J._options.defaultHeaders,Y=J._authState?.extraHeaders,V=Y?Object.fromEntries(Object.entries(Y).filter(([W])=>{let q=W.toLowerCase();return q!=="authorization"&&q!=="x-api-key"})):void 0,Q=G([V,z,{[Y8]:X}]);return Z.withOptions({apiKey:null,authToken:$,baseURL:Z.baseURL,credentials:void 0,defaultHeaders:Q})}var mX=M(()=>{v();E();TZ()});function X5(Z){return q6(Z,Z5,$5)}function J5(){let $=globalThis.process?.env?.HOSTNAME;return $?`${$}-${z0()}`:z0()}var O0,D$,wZ,L$,j$,S$,q8,M8,q0,e9=999,Z5=1000,$5=60000,aZ;var E$=M(()=>{zZ();v();jZ();Y0();o8();x$();E();O8();mX();O8();aZ=class aZ{constructor(Z){O0.set(this,void 0),D$.set(this,!1),wZ.set(this,void 0),L$.set(this,void 0),j$.set(this,void 0),S$.set(this,void 0),q8.set(this,void 0),M8.set(this,void 0),q0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??J5(),O(this,O0,A$(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),O(this,j$,Z.autoStop??!0,"f"),O(this,S$,Z.drain??!1,"f"),O(this,q8,Z.blockMs===void 0?e9:Z.blockMs,"f"),O(this,M8,Z.reclaimOlderThanMs??null,"f"),O(this,q0,Z.requestOptions,"f"),O(this,wZ,new AbortController,"f"),O(this,L$,nZ(Z.signal,K(this,wZ,"f")),"f")}get signal(){return K(this,wZ,"f").signal}abort(){K(this,wZ,"f").abort()}async*[(O0=new WeakMap,D$=new WeakMap,wZ=new WeakMap,L$=new WeakMap,j$=new WeakMap,S$=new WeakMap,q8=new WeakMap,M8=new WeakMap,q0=new WeakMap,Symbol.asyncIterator)](){if(K(this,D$,"f"))throw new F("Cannot iterate over a consumed WorkPoller");O(this,D$,!0,"f");let Z=R(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});try{let $=0;while(!K(this,wZ,"f").signal.aborted){let X;try{X=await K(this,O0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...K(this,q8,"f")!==null?{block_ms:K(this,q8,"f")}:{},...K(this,M8,"f")!==null?{reclaim_older_than_ms:K(this,M8,"f")}:{}},{headers:G([K(this,q0,"f")?.headers]),signal:K(this,wZ,"f").signal})}catch(J){if(K(this,wZ,"f").signal.aborted)return;if(fZ(J))throw Z.error("poll failed permanently, stopping poller",{error:String(J)}),J;let z=M6(X5($));Z.warn("poll failed, backing off",{error:String(J),backoff_ms:z}),$++,await MZ(z,K(this,wZ,"f").signal);continue}if($=0,X==null){if(K(this,S$,"f"))return;await MZ(vX(1000,3000),K(this,wZ,"f").signal);continue}Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:X.id,work_type:X.data.type});try{await K(this,O0,"f").beta.environments.work.ack(X.id,{environment_id:X.environment_id},{headers:G([K(this,q0,"f")?.headers]),signal:K(this,wZ,"f").signal})}catch(J){Z.error("ack failed",{work_id:X.id,error:String(J)});continue}try{yield X}finally{if(K(this,j$,"f"))try{await K(this,O0,"f").beta.environments.work.stop(X.id,{environment_id:X.environment_id},{headers:G([K(this,q0,"f")?.headers])})}catch(J){if(!yZ(J,409))Z.warn("stop failed",{work_id:X.id,error:String(J)})}}}}finally{K(this,L$,"f").call(this)}}}});class cX{constructor(){M0.set(this,[]),bZ.set(this,[]),C0.set(this,!1)}push(Z){if(K(this,C0,"f"))return!1;let $=K(this,bZ,"f").shift();if($)$({done:!1,value:Z});else K(this,M0,"f").push(Z);return!0}close(){if(K(this,C0,"f"))return;O(this,C0,!0,"f");while(K(this,bZ,"f").length>0)K(this,bZ,"f").shift()({done:!0,value:void 0})}next(Z){if(K(this,M0,"f").length>0)return Promise.resolve({done:!1,value:K(this,M0,"f").shift()});if(K(this,C0,"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=K(this,bZ,"f").indexOf(X);if(z>=0)K(this,bZ,"f").splice(z,1);$({done:!0,value:void 0})};K(this,bZ,"f").push(X),Z?.addEventListener("abort",J,{once:!0})})}tryShift(){return K(this,M0,"f").shift()}}var M0,bZ,C0;var C6=M(()=>{zZ();M0=new WeakMap,bZ=new WeakMap,C0=new WeakMap});function uX(Z){return"name"in Z?Z.name:Z.mcp_server_name}function z5(Z){return Z instanceof RZ?Z.content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}async function F6(Z,$,X){try{let J=Z.parse?Z.parse($):$;return{content:await Z.run(J,X),isError:!1}}catch(J){return{content:z5(J),isError:!0}}}var H6=M(()=>{u0()});function j6(Z){return Z.type==="session.status_idle"&&Z.stop_reason?.type==="end_turn"}function G5(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 N5(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 n,P$,r,R$,F8,k$,ZZ,F0,xZ,oZ,SZ,H8,H0,I$,S6,B6,T6,x6,dX,C8,pX,A6,E6,D6=500,Y5=1e4,K5=120000,Q5=30000,L6=3,V5=60000,rZ;var y$=M(()=>{zZ();v();jZ();Y0();O8();x$();C6();E();TZ();H6();rZ=class rZ{constructor(Z,$){n.add(this),P$.set(this,!1),r.set(this,void 0),R$.set(this,void 0),F8.set(this,void 0),k$.set(this,void 0),ZZ.set(this,void 0),F0.set(this,new Set),xZ.set(this,new Set),oZ.set(this,new cX),SZ.set(this,0),H8.set(this,null),H0.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??V5,O(this,ZZ,R($.client),"f"),O(this,k$,new Map($.tools.map((X)=>[uX(X),X])),"f"),O(this,r,new AbortController,"f"),O(this,R$,nZ($.signal,K(this,r,"f")),"f"),O(this,F8,$.requestOptions,"f")}get signal(){return K(this,r,"f").signal}abort(){K(this,r,"f").abort()}async*[(P$=new WeakMap,r=new WeakMap,R$=new WeakMap,F8=new WeakMap,k$=new WeakMap,ZZ=new WeakMap,F0=new WeakMap,xZ=new WeakMap,oZ=new WeakMap,SZ=new WeakMap,H8=new WeakMap,H0=new WeakMap,n=new WeakSet,Symbol.asyncIterator)](){if(K(this,P$,"f"))throw new F("Cannot iterate over a consumed SessionToolRunner");O(this,P$,!0,"f"),K(this,ZZ,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=K(this,n,"m",S6).call(this).catch(($)=>{if(!K(this,r,"f").signal.aborted)K(this,ZZ,"f").error("stream loop failed",{error:String($)});K(this,r,"f").abort()});try{while(!0){let X=await K(this,oZ,"f").next(K(this,r,"f").signal);if(X.done)break;yield X.value}await Z;let $;while(($=K(this,oZ,"f").tryShift())!==void 0)yield $}finally{K(this,r,"f").abort(),K(this,n,"m",C8).call(this),await Z;try{await K(this,n,"m",E6).call(this)}catch($){K(this,ZZ,"f").warn("drain failed",{error:String($)})}K(this,oZ,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(X){K(this,ZZ,"f").warn("tool.close failed",{tool:uX($),error:String(X)})}K(this,R$,"f").call(this)}}};I$=function(){return{...K(this,F8,"f"),headers:G([K8("session-tool-runner"),K(this,F8,"f")?.headers]),signal:K(this,r,"f").signal}},S6=async function(){let $=K(this,r,"f"),X=D6;while(!$.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},K(this,n,"m",I$).call(this));await K(this,n,"m",B6).call(this);for await(let z of J)if(X=D6,await K(this,n,"m",x6).call(this,z))return}catch(J){if($.signal.throwIfAborted(),fZ(J))throw K(this,ZZ,"f").error("permanent stream failure, shutting down",{error:String(J)}),$.abort(),J;K(this,ZZ,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:X})}$.signal.throwIfAborted(),await MZ(X,$.signal),X=Math.min(X*2,Y5)}},B6=async function(){let $=K(this,r,"f"),X=[],J=!1;try{for await(let Y of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},K(this,n,"m",I$).call(this)))K(this,n,"m",T6).call(this,Y,X),J=j6(Y)}catch(Y){$.signal.throwIfAborted(),K(this,ZZ,"f").warn("reconcile list failed",{error:String(Y)});for(let V of X)K(this,F0,"f").delete(V.id);return}let z=X.filter((Y)=>!K(this,xZ,"f").has(Y.id));if(J&&z.length===0)K(this,n,"m",dX).call(this);else K(this,n,"m",C8).call(this);for(let Y of z)await K(this,n,"m",pX).call(this,Y)},T6=function($,X){if($.type==="agent.tool_use"||$.type==="agent.custom_tool_use"){if(K(this,F0,"f").add($.id),!K(this,xZ,"f").has($.id))X.push($)}else if($.type==="user.tool_result")K(this,xZ,"f").add($.tool_use_id);else if($.type==="user.custom_tool_result")K(this,xZ,"f").add($.custom_tool_use_id)},x6=async function($){if(j6($))K(this,n,"m",dX).call(this);else K(this,n,"m",C8).call(this);switch($.type){case"agent.tool_use":case"agent.custom_tool_use":if(!K(this,F0,"f").has($.id))K(this,F0,"f").add($.id),await K(this,n,"m",pX).call(this,$);return!1;case"user.tool_result":return K(this,xZ,"f").add($.tool_use_id),!1;case"user.custom_tool_result":return K(this,xZ,"f").add($.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return K(this,ZZ,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),K(this,r,"f").abort(),!0;default:return!1}},dX=function(){if(K(this,n,"m",C8).call(this),this.maxIdleMs<=0)return;O(this,H0,setTimeout(()=>{K(this,ZZ,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),K(this,r,"f").abort()},this.maxIdleMs),"f")},C8=function(){if(K(this,H0,"f")!==void 0)clearTimeout(K(this,H0,"f")),O(this,H0,void 0,"f")},pX=async function($){var X,J;if(K(this,xZ,"f").has($.id))return;K(this,ZZ,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),O(this,SZ,(X=K(this,SZ,"f"),X++,X),"f");try{let z=K(this,k$,"f").get($.name);if(!z){K(this,ZZ,"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}),K(this,oZ,"f").push({event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1});return}let Y,V,Q=new AbortController,W=nZ(K(this,r,"f").signal,Q),q=setTimeout(()=>Q.abort(),K5);try{let N=await F6(z,$.input,{toolUse:$,toolUseBlock:$,signal:Q.signal});Y=N.content,V=N.isError}finally{clearTimeout(q),W()}let H=G5($,V,N5(Y)),U=await K(this,n,"m",A6).call(this,H,$.id);K(this,oZ,"f").push({event:$,result:H,toolUseId:$.id,name:$.name,isError:V,posted:U})}finally{if(O(this,SZ,(J=K(this,SZ,"f"),J--,J),"f"),K(this,SZ,"f")===0)K(this,H8,"f")?.call(this)}},A6=async function($,X){let J=K(this,r,"f"),z;for(let Y=0;Y<L6;Y++){J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[$]},K(this,n,"m",I$).call(this)),K(this,xZ,"f").add(X),!0}catch(V){if(z=V,fZ(V))break;if(Y<L6-1)await MZ((Y+1)*1000,J.signal)}}return K(this,ZZ,"f").error("failed to send tool result",{tool_use_id:X,error:String(z)}),!1},E6=async function(){if(K(this,SZ,"f")===0)return;if(await Promise.race([new Promise(($)=>O(this,H8,$,"f")),MZ(Q5)]),O(this,H8,null,"f"),K(this,SZ,"f")>0)K(this,ZZ,"f").warn("drain timeout exceeded")}});class T8{constructor(Z){f$.add(this),B8.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.tools=Z.tools,this.workdir=Z.workdir??process.cwd(),this.unrestrictedPaths=Z.unrestrictedPaths,this.maxFileBytes=Z.maxFileBytes,this.maxIdleMs=Z.maxIdleMs,this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,O(this,B8,Z.signal,"f")}async run(Z){let{environmentId:$,environmentKey:X}=this;if($===void 0||X===void 0)throw new F("EnvironmentWorker.run: environmentId and environmentKey are required to poll for work");let J=Z??K(this,B8,"f"),z=new aZ({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 Y of z)await K(this,f$,"m",lX).call(this,Y,X,z.signal)}async handleItem(Z){let $=Z?.workId??j("ANTHROPIC_WORK_ID"),X=Z?.environmentId??j("ANTHROPIC_ENVIRONMENT_ID"),J=Z?.sessionId??j("ANTHROPIC_SESSION_ID"),z=Z?.environmentKey??this.environmentKey??j("ANTHROPIC_ENVIRONMENT_KEY");if(!$)throw new F("handleItem: workId is required — pass it or set ANTHROPIC_WORK_ID");if(!X)throw new F("handleItem: environmentId is required — pass it or set ANTHROPIC_ENVIRONMENT_ID");if(!J)throw new F("handleItem: sessionId is required — pass it or set ANTHROPIC_SESSION_ID");if(!z)throw new F("handleItem: environmentKey is required — pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY");let Y={id:$,environment_id:X,data:{type:"session",id:J}};await K(this,f$,"m",lX).call(this,Y,z,Z?.signal??K(this,B8,"f"))}}async function U5(Z,$,X,J){try{await Z.beta.environments.work.stop($.id,{environment_id:$.environment_id,force:!0},{...J,headers:G([J?.headers])})}catch(z){if(!yZ(z,409))X.error("force-stop on exit failed",{work_id:$.id,error:String(z)})}}async function w5(Z,$,X,J,z){let Y=P6,V=W5,Q=async()=>{try{let W=await Z.beta.environments.work.heartbeat($.id,{environment_id:$.environment_id,expected_last_heartbeat:V},{...z,headers:G([z?.headers]),signal:X.signal});if(V=W.last_heartbeat,W.ttl_seconds>0)Y=Math.max(1000,Math.min(W.ttl_seconds*1000/2,P6));if(W.state==="stopping"||W.state==="stopped")J.info("heartbeat signals shutdown",{work_id:$.id,state:W.state}),X.abort();if(!W.lease_extended)J.warn("lease not extended, shutting down",{work_id:$.id}),X.abort()}catch(W){if(X.signal.throwIfAborted(),fZ(W))throw J.error("permanent heartbeat failure",{work_id:$.id,error:String(W)}),X.abort(),W;J.warn("transient heartbeat failure",{work_id:$.id,error:String(W)})}};await Q();while(!X.signal.aborted)await MZ(Y,X.signal),X.signal.throwIfAborted(),await Q()}var f$,B8,lX,P6=30000,W5="NO_HEARTBEAT";var iX=M(()=>{zZ();v();jZ();G0();Y0();O8();x$();E();y$();E$();mX();B8=new WeakMap,f$=new WeakSet,lX=async function($,X,J){let z=R(this.client),Y=A$(this.client,{authToken:X,helper:"environments-worker"}),V=$.data.id,Q={workdir:this.workdir,client:this.client,sessionId:V,...this.unrestrictedPaths!==void 0?{unrestrictedPaths:this.unrestrictedPaths}:{},...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}},W=await import("./node-0.7.0-4sagcnk2.mjs"),q=async()=>{};try{q=await W.setupSkills(Q)}catch(T){z.warn("skill setup failed",{session_id:V,work_id:$.id,error:String(T)})}let H=typeof this.tools==="function"?this.tools(Q):this.tools??W.betaAgentToolset20260401(Q),U=new AbortController,N=nZ(J,U),C=w5(Y,$,U,z,this.requestOptions).catch((T)=>{if(!U.signal.aborted)z.error("heartbeat loop failed",{work_id:$.id,error:String(T)});U.abort()});try{let T=new rZ(V,{client:Y,tools:H,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:U.signal});for await(let L of T);}finally{U.abort(),N(),await C,await q().catch((T)=>{z.warn("skill cleanup failed",{session_id:V,work_id:$.id,error:String(T)})}),await U5(Y,$,z,this.requestOptions)}}});var tZ;var nX=M(()=>{k();b();E();h();E$();iX();E$();iX();tZ=class tZ extends x{retrieve(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.get(w`/v1/environments/${J}/work/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{environment_id:J,betas:z,...Y}=$;return this._client.post(w`/v1/environments/${J}/work/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/environments/${Z}/work?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}ack(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.post(w`/v1/environments/${J}/work/${Z}/ack?beta=true`,{...X,headers:G([{"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:Y,betas:V}=$;return this._client.post(w`/v1/environments/${J}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:z,expected_last_heartbeat:Y},...X,headers:G([{"anthropic-beta":[...V??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poll(Z,$={},X){let{betas:J,"Anthropic-Worker-ID":z,...Y}=$??{};return this._client.get(w`/v1/environments/${Z}/work/poll?beta=true`,{query:Y,...X,headers:G([{"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(w`/v1/environments/${Z}/work/stats?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stop(Z,$,X){let{environment_id:J,betas:z,...Y}=$;return this._client.post(w`/v1/environments/${J}/work/${Z}/stop?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poller(Z){return new aZ({...Z,client:this._client})}worker(Z){return new T8({...Z,client:this._client})}};tZ.WorkPoller=aZ;tZ.EnvironmentWorker=T8});var B0;var aX=M(()=>{k();nX();nX();b();E();h();B0=class B0 extends x{constructor(){super(...arguments);this.work=new tZ(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/environments?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/environments/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/environments/${Z}?beta=true`,{body:z,...X,headers:G([{"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:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(w`/v1/environments/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/environments/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};B0.Work=tZ});var x8;var oX=M(()=>{k();b();E();h();x8=class x8 extends x{create(Z,$,X){let{view:J,betas:z,...Y}=$;return this._client.post(w`/v1/memory_stores/${Z}/memories?beta=true`,{query:{view:J},body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(w`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{memory_store_id:J,view:z,betas:Y,...V}=$;return this._client.post(w`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{view:z},body:V,...X,headers:G([{"anthropic-beta":[...Y??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/memory_stores/${Z}/memories?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}delete(Z,$,X){let{memory_store_id:J,expected_content_sha256:z,betas:Y}=$;return this._client.delete(w`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{expected_content_sha256:z},...X,headers:G([{"anthropic-beta":[...Y??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var A8;var rX=M(()=>{k();b();E();h();A8=class A8 extends x{retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(w`/v1/memory_stores/${J}/memory_versions/${Z}?beta=true`,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/memory_stores/${Z}/memory_versions?beta=true`,S,{query:z,...X,headers:G([{"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(w`/v1/memory_stores/${J}/memory_versions/${Z}/redact?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var sZ;var tX=M(()=>{k();oX();oX();rX();rX();b();E();h();sZ=class sZ extends x{constructor(){super(...arguments);this.memories=new x8(this._client),this.memoryVersions=new A8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/memory_stores?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/memory_stores/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/memory_stores/${Z}?beta=true`,{body:z,...X,headers:G([{"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:G([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(w`/v1/memory_stores/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/memory_stores/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}};sZ.Memories=x8;sZ.MemoryVersions=A8});var T0=M(()=>{v()});var x0;var sX=M(()=>{v();K0();HX();x0=class x0{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new IZ;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 F("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 F("Attempted to iterate over a response with no body")}return new x0(n0(Z.body),$)}}});var D8;var eX=M(()=>{k();b();E();sX();T0();h();D8=class D8 extends x{create(Z,$){let{betas:X,user_profile_id:J,...z}=Z;return this._client.post("/v1/messages/batches?beta=true",{body:z,...$,headers:G([{"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(w`/v1/messages/batches/${Z}?beta=true`,{...X,headers:G([{"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",FZ,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(w`/v1/messages/batches/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/messages/batches/${Z}/cancel?beta=true`,{...X,headers:G([{"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 F(`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:G([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},X?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((Y,V)=>x0.fromResponse(V.response,V.controller))}}});var b$;var Z1=M(()=>{b$={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function R6(Z){return Z?.output_format??Z?.output_config?.format}function $1(Z,$,X){let J=R6($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text"){let Y=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(Y,"parsed",{get(){return 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 X1(Z,$,X)}function X1(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=B5($,Y.text);if(J===null)J=V;let Q=Object.defineProperty({...Y},"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 Y});return{...Z,content:z,parsed_output:J}}function B5(Z,$){let X=R6(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new F(`Failed to parse structured output: ${J}`)}}var J1=M(()=>{v()});var z1=M(()=>{s0()});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="",W=!1;J=Z[++$];while(J!=='"'){if($===Z.length){W=!0;break}if(J==="\\"){if($++,$===Z.length){W=!0;break}Q+=J+Z[$],J=Z[++$]}else Q+=J,J=Z[++$]}if(J=Z[++$],!W)X.push({type:"string",value:Q});continue}if(J&&/\s/.test(J)){$++;continue}let Y=/[0-9]/;if(J&&Y.test(J)||J==="-"||J==="."){let Q="";if(J==="-")Q+=J,J=Z[++$];while(J&&(Y.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},A0=(Z)=>{if(Z.length===0)return Z;let $=Z[Z.length-1];switch($.type){case"separator":return Z=Z.slice(0,Z.length-1),A0(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),A0(Z);case"string":let J=Z[Z.length-2];if(J?.type==="delimiter")return Z=Z.slice(0,Z.length-1),A0(Z);else if(J?.type==="brace"&&J.value==="{")return Z=Z.slice(0,Z.length-1),A0(Z);break;case"delimiter":return Z=Z.slice(0,Z.length-1),A0(Z);break}return Z},x5=(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},A5=(Z)=>{let $="";return Z.map((X)=>{switch(X.type){case"string":$+='"'+X.value+'"';break;default:$+=X.value;break}}),$},I6=(Z)=>JSON.parse(A5(x5(A0(T5(Z)))));var k6=()=>{};function h$(Z,$){let X={};for(let Y of Object.keys(Z))if(Y!=="input")X[Y]=Z[Y];Object.defineProperty(X,hZ,{value:$,enumerable:!1,writable:!0});let J,z=!1;return Object.defineProperty(X,"input",{enumerable:!0,configurable:!0,get(){if(!z)J=$?I6($):{},z=!0;return J}}),X}var hZ="__json_buf";var Y1=M(()=>{k6()});function W1(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"||Z.type==="mcp_tool_use"}function b6(Z){}var XZ,_Z,D0,L8,_$,j8,S8,g$,E8,AZ,P8,v$,m$,eZ,c$,u$,R8,K1,y6,I8,Q1,V1,G1,f6,N1,k8;var h6=M(()=>{zZ();TZ();T0();PZ();z1();J1();Y1();k8=class k8{constructor(Z,$){XZ.add(this),this.messages=[],this.receivedMessages=[],_Z.set(this,void 0),D0.set(this,null),this.controller=new AbortController,L8.set(this,void 0),_$.set(this,()=>{}),j8.set(this,()=>{}),S8.set(this,void 0),g$.set(this,()=>{}),E8.set(this,()=>{}),AZ.set(this,{}),P8.set(this,!1),v$.set(this,!1),m$.set(this,!1),eZ.set(this,!1),c$.set(this,void 0),u$.set(this,void 0),R8.set(this,void 0),I8.set(this,(X)=>{if(O(this,v$,!0,"f"),WZ(X))X=new t;if(X instanceof t)return O(this,m$,!0,"f"),this._emit("abort",X);if(X instanceof F)return this._emit("error",X);if(X instanceof Error){let J=new F(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new F(String(X)))}),O(this,L8,new Promise((X,J)=>{O(this,_$,X,"f"),O(this,j8,J,"f")}),"f"),O(this,S8,new Promise((X,J)=>{O(this,g$,X,"f"),O(this,E8,J,"f")}),"f"),K(this,L8,"f").catch(()=>{}),K(this,S8,"f").catch(()=>{}),O(this,D0,Z,"f"),O(this,R8,$?.logger??console,"f")}get response(){return K(this,c$,"f")}get request_id(){return K(this,u$,"f")}async withResponse(){O(this,eZ,!0,"f");let Z=await K(this,L8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id")}}static fromReadableStream(Z){let $=new k8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new k8($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return O(z,D0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[F$]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,I8,"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{K(this,XZ,"m",Q1).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,XZ,"m",V1).call(this,Q);if(V.controller.signal?.aborted)throw new t;K(this,XZ,"m",G1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;O(this,c$,Z,"f"),O(this,u$,Z?.headers.get("request-id"),"f"),K(this,_$,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,P8,"f")}get errored(){return K(this,v$,"f")}get aborted(){return K(this,m$,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,AZ,"f")[Z]||(K(this,AZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(this,AZ,"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(K(this,AZ,"f")[Z]||(K(this,AZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(O(this,eZ,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){O(this,eZ,!0,"f"),await K(this,S8,"f")}get currentMessage(){return K(this,_Z,"f")}async finalMessage(){return await this.done(),K(this,XZ,"m",K1).call(this)}async finalText(){return await this.done(),K(this,XZ,"m",y6).call(this)}_emit(Z,...$){if(K(this,P8,"f"))return;if(Z==="end")O(this,P8,!0,"f"),K(this,g$,"f").call(this);let X=K(this,AZ,"f")[Z];if(X)K(this,AZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,eZ,"f")&&!X?.length)Promise.reject(J);K(this,j8,"f").call(this,J),K(this,E8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,eZ,"f")&&!X?.length)Promise.reject(J);K(this,j8,"f").call(this,J),K(this,E8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,XZ,"m",K1).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{K(this,XZ,"m",Q1).call(this),this._connected(null);let z=e.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,XZ,"m",V1).call(this,Y);if(z.controller.signal?.aborted)throw new t;K(this,XZ,"m",G1).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(_Z=new WeakMap,D0=new WeakMap,L8=new WeakMap,_$=new WeakMap,j8=new WeakMap,S8=new WeakMap,g$=new WeakMap,E8=new WeakMap,AZ=new WeakMap,P8=new WeakMap,v$=new WeakMap,m$=new WeakMap,eZ=new WeakMap,c$=new WeakMap,u$=new WeakMap,R8=new WeakMap,I8=new WeakMap,XZ=new WeakSet,K1=function(){if(this.receivedMessages.length===0)throw new F("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},y6=function(){if(this.receivedMessages.length===0)throw new F("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 F("stream ended without producing a content block with type=text");return $.join(" ")},Q1=function(){if(this.ended)return;O(this,_Z,void 0,"f")},V1=function($){if(this.ended)return;let X=K(this,XZ,"m",f6).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(W1(J)&&K(this,AZ,"f").inputJson?.length){let z;try{z=J.input}catch(Y){K(this,I8,"f").call(this,K(this,XZ,"m",N1).call(this,J,Y));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:b6($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage($1(X,K(this,D0,"f"),{logger:K(this,R8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{O(this,_Z,X,"f");break}case"content_block_start":case"message_delta":break}},G1=function(){if(this.ended)throw new F("stream has ended, this shouldn't happen");let $=K(this,_Z,"f");if(!$)throw new F("request ended without sending any chunks");return O(this,_Z,void 0,"f"),$1($,K(this,D0,"f"),{logger:K(this,R8,"f")})},f6=function($){let X=K(this,_Z,"f");if($.type==="message_start"){if(X)throw new F(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new F(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.container=$.delta.container,X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,$.delta.stop_details!=null)X.stop_details=$.delta.stop_details;if(X.usage.output_tokens=$.usage.output_tokens,X.context_management=$.context_management,$.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;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&&W1(J)){let z=(J[hZ]||"")+$.delta.partial_json;X.content[$.index]=h$(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:b6($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&W1(J)&&hZ in J){let z;try{z=J.input}catch(Y){z={},K(this,I8,"f").call(this,K(this,XZ,"m",N1).call(this,J,Y))}Object.defineProperty(J,"input",{value:z,enumerable:!0,configurable:!0,writable:!0})}return X}}},N1=function($,X){let J=$[hZ];return new F(`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,Y)=>$.push({resolve:z,reject:Y})).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 e(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var _6=1e5,g6=`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 v6=()=>{};async function D5(Z,$=Z.messages.at(-1),X){if(!$||$.role!=="assistant"||!$.content||typeof $.content==="string")return null;let J=$.content.filter((Y)=>Y.type==="tool_use");if(J.length===0)return null;return{role:"user",content:await Promise.all(J.map(async(Y)=>{let V=Z.tools.find((Q)=>("name"in Q?Q.name:Q.mcp_server_name)===Y.name);if(!V||!("run"in V))return{type:"tool_result",tool_use_id:Y.id,content:`Error: Tool '${Y.name}' not found`,is_error:!0};try{let Q=Y.input;if("parse"in V&&V.parse)Q=V.parse(Q);let W=await V.run(Q,{toolUse:Y,toolUseBlock:Y,signal:X?.signal});return{type:"tool_result",tool_use_id:Y.id,content:W}}catch(Q){return{type:"tool_result",tool_use_id:Y.id,content:Q instanceof RZ?Q.content:`Error: ${Q instanceof Error?Q.message:String(Q)}`,is_error:!0}}}))}}var y8,L0,Z0,a,JZ,GZ,EZ,gZ,f8,m6,U1,b8;var w1=M(()=>{zZ();u0();v();E();u1();v6();TZ();b8=class b8{constructor(Z,$,X){y8.add(this),this.client=Z,L0.set(this,!1),Z0.set(this,!1),a.set(this,void 0),JZ.set(this,void 0),GZ.set(this,void 0),EZ.set(this,void 0),gZ.set(this,void 0),f8.set(this,0),O(this,a,{params:{...$,messages:structuredClone($.messages)}},"f");let J=RX($.tools,$.messages);if(O(this,JZ,{...X,headers:G([K8("BetaToolRunner"),J.length?{[Y8]:J.join(", ")}:void 0,X?.headers])},"f"),O(this,gZ,t$(),"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*[(L0=new WeakMap,Z0=new WeakMap,a=new WeakMap,JZ=new WeakMap,GZ=new WeakMap,EZ=new WeakMap,gZ=new WeakMap,f8=new WeakMap,y8=new WeakSet,m6=async function(){let $=K(this,a,"f").params.compactionControl;if(!$||!$.enabled)return!1;let X=0;if(K(this,GZ,"f")!==void 0)try{let W=await K(this,GZ,"f");X=W.usage.input_tokens+(W.usage.cache_creation_input_tokens??0)+(W.usage.cache_read_input_tokens??0)+W.usage.output_tokens}catch{return!1}let J=$.contextTokenThreshold??_6;if(X<J)return!1;let z=$.model??K(this,a,"f").params.model,Y=$.summaryPrompt??g6,V=K(this,a,"f").params.messages;if(V[V.length-1].role==="assistant"){let W=V[V.length-1];if(Array.isArray(W.content)){let q=W.content.filter((H)=>H.type!=="tool_use");if(q.length===0)V.pop();else W.content=q}}let Q=await this.client.beta.messages.create({model:z,messages:[...V,{role:"user",content:[{type:"text",text:Y}]}],max_tokens:K(this,a,"f").params.max_tokens},{signal:K(this,JZ,"f").signal,headers:G([K(this,JZ,"f").headers,K8("compaction")])});if(Q.content[0]?.type!=="text")throw new F("Expected text response for compaction");return K(this,a,"f").params.messages=[{role:"user",content:Q.content}],!0},Symbol.asyncIterator)](){var Z;if(K(this,L0,"f"))throw new F("Cannot iterate over a consumed stream");O(this,L0,!0,"f"),O(this,Z0,!0,"f"),O(this,EZ,void 0,"f");try{while(!0){let $;try{if(K(this,a,"f").params.max_iterations&&K(this,f8,"f")>=K(this,a,"f").params.max_iterations)break;O(this,Z0,!1,"f"),O(this,EZ,void 0,"f"),O(this,f8,(Z=K(this,f8,"f"),Z++,Z),"f"),O(this,GZ,void 0,"f");let{max_iterations:X,compactionControl:J,...z}=K(this,a,"f").params;if(z.stream)$=this.client.beta.messages.stream({...z},K(this,JZ,"f")),O(this,GZ,$.finalMessage(),"f"),K(this,GZ,"f").catch(()=>{}),yield $;else O(this,GZ,this.client.beta.messages.create({...z,stream:!1},K(this,JZ,"f")),"f"),yield K(this,GZ,"f");if(!await K(this,y8,"m",m6).call(this)){if(!K(this,Z0,"f")){let Q=await K(this,GZ,"f");if(K(this,a,"f").params.messages.push({role:Q.role,content:Q.content}),Q.stop_reason==="refusal")break}let V=await K(this,y8,"m",U1).call(this,K(this,a,"f").params.messages.at(-1));if(V)K(this,a,"f").params.messages.push(V);else if(!K(this,Z0,"f"))break}}finally{if($)$.abort()}}if(!K(this,GZ,"f"))throw new F("ToolRunner concluded without a message from the server");K(this,gZ,"f").resolve(await K(this,GZ,"f"))}catch($){throw O(this,L0,!1,"f"),K(this,gZ,"f").promise.catch(()=>{}),K(this,gZ,"f").reject($),O(this,gZ,t$(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")K(this,a,"f").params=Z(K(this,a,"f").params);else K(this,a,"f").params=Z;O(this,Z0,!0,"f"),O(this,EZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")O(this,JZ,Z(K(this,JZ,"f")),"f");else O(this,JZ,{...K(this,JZ,"f"),...Z},"f")}async generateToolResponse(Z=K(this,JZ,"f").signal){let $=await K(this,GZ,"f")??this.params.messages.at(-1);if(!$)return null;return K(this,y8,"m",U1).call(this,$,Z)}done(){return K(this,gZ,"f").promise}async runUntilDone(){if(!K(this,L0,"f"))for await(let Z of this);return this.done()}get params(){return K(this,a,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}};U1=async function($,X=K(this,JZ,"f").signal){if(K(this,EZ,"f")!==void 0)return K(this,EZ,"f");return O(this,EZ,D5(K(this,a,"f").params,$,{...K(this,JZ,"f"),signal:X}),"f"),K(this,EZ,"f")}});function u6(Z){if(!Z.output_format)return Z;if(Z.output_config?.format)throw new F("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 c6,L5,vZ;var O1=M(()=>{T0();eX();k();Z1();E();TZ();J1();h6();w1();u0();eX();w1();u0();c6={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026","claude-opus-4-1":"August 5th, 2026","claude-opus-4-1-20250805":"August 5th, 2026","claude-mythos-preview":"June 30th, 2026"},L5=["claude-mythos-preview","claude-opus-4-6"];vZ=class vZ extends x{constructor(){super(...arguments);this.batches=new D8(this._client)}create(Z,$){let X=u6(Z),{betas:J,user_profile_id:z,...Y}=X;if(Y.model in c6)console.warn(`The model '${Y.model}' is deprecated and will reach end-of-life on ${c6[Y.model]}
|
|
32
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(L5.includes(Y.model)&&Y.thinking&&Y.thinking.type==="enabled")console.warn(`Using Claude with ${Y.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let V=this._client._options.timeout;if(!Y.stream&&V==null){let W=b$[Y.model]??void 0;V=this._client.calculateNonstreamingTimeout(Y.max_tokens,W)}let Q=H$(Y.tools,Y.messages);return this._client.post("/v1/messages?beta=true",{body:Y,timeout:V??600000,...$,headers:G([{...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:G([{"anthropic-beta":[...Z.betas??[],"structured-outputs-2025-12-15"].toString()},$?.headers])},this.create(Z,$).then((X)=>X1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return k8.createMessage(this,Z,$)}countTokens(Z,$){let X=u6(Z),{betas:J,user_profile_id:z,...Y}=X;return this._client.post("/v1/messages/count_tokens?beta=true",{body:Y,...$,headers:G([{"anthropic-beta":[...J??[],"token-counting-2024-11-01"].toString(),...z!=null?{"anthropic-user-profile-id":z}:void 0},$?.headers])})}toolRunner(Z,$){return new b8(this._client,Z,$)}};vZ.Batches=D8;vZ.BetaToolRunner=b8;vZ.ToolError=RZ});var j0;var q1=M(()=>{k();b();E();h();y$();y$();j0=class j0 extends x{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/sessions/${Z}/events?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}send(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/sessions/${Z}/events?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(w`/v1/sessions/${Z}/events/stream?beta=true`,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}toolRunner(Z,$){return new rZ(Z,{...$,client:this._client})}};j0.SessionToolRunner=rZ});var h8;var M1=M(()=>{k();b();E();h();h8=class h8 extends x{retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(w`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{session_id:J,betas:z,...Y}=$;return this._client.post(w`/v1/sessions/${J}/resources/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/sessions/${Z}/resources?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{session_id:J,betas:z}=$;return this._client.delete(w`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/sessions/${Z}/resources?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var _8;var C1=M(()=>{k();b();E();h();_8=class _8 extends x{list(Z,$,X){let{session_id:J,betas:z,...Y}=$;return this._client.getAPIList(w`/v1/sessions/${J}/threads/${Z}/events?beta=true`,S,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(w`/v1/sessions/${J}/threads/${Z}/stream?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}}});var S0;var F1=M(()=>{k();C1();C1();b();E();h();S0=class S0 extends x{constructor(){super(...arguments);this.events=new _8(this._client)}retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(w`/v1/sessions/${J}/threads/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/sessions/${Z}/threads?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{session_id:J,betas:z}=$;return this._client.post(w`/v1/sessions/${J}/threads/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};S0.Events=_8});var mZ;var H1=M(()=>{k();q1();q1();M1();M1();F1();F1();b();E();h();mZ=class mZ extends x{constructor(){super(...arguments);this.events=new j0(this._client),this.resources=new h8(this._client),this.threads=new S0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/sessions?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/sessions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/sessions/${Z}?beta=true`,{body:z,...X,headers:G([{"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",xX,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(w`/v1/sessions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/sessions/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};mZ.Events=j0;mZ.Resources=h8;mZ.Threads=S0});var g8;var B1=M(()=>{k();b();E();U0();h();g8=class g8 extends x{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/skills/${Z}/versions?beta=true`,W0({body:z,...X,headers:G([{"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(w`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/skills/${Z}/versions?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}delete(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.delete(w`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}download(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(w`/v1/skills/${J}/versions/${Z}/content?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}}});var E0;var T1=M(()=>{k();B1();B1();b();E();U0();h();E0=class E0 extends x{constructor(){super(...arguments);this.versions=new g8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/skills?beta=true",W0({body:J,...$,headers:G([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])},this._client,!1))}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/skills/${Z}?beta=true`,{...X,headers:G([{"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:G([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(w`/v1/skills/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}};E0.Versions=g8});var v8;var x1=M(()=>{k();b();E();h();v8=class v8 extends x{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/vaults/${Z}/credentials?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.get(w`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{vault_id:J,betas:z,...Y}=$;return this._client.post(w`/v1/vaults/${J}/credentials/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(w`/v1/vaults/${Z}/credentials?beta=true`,S,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.delete(w`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(w`/v1/vaults/${J}/credentials/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}mcpOAuthValidate(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(w`/v1/vaults/${J}/credentials/${Z}/mcp_oauth_validate?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var P0;var A1=M(()=>{k();x1();x1();b();E();h();P0=class P0 extends x{constructor(){super(...arguments);this.credentials=new v8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/vaults?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/vaults/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(w`/v1/vaults/${Z}?beta=true`,{body:z,...X,headers:G([{"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:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(w`/v1/vaults/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(w`/v1/vaults/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};P0.Credentials=v8});var o;var D1=M(()=>{k();EX();EX();PX();PX();IX();IX();kX();kX();yX();yX();hX();hX();gX();gX();aX();aX();tX();tX();O1();O1();H1();H1();T1();T1();A1();A1();o=class o extends x{constructor(){super(...arguments);this.models=new V8(this._client),this.messages=new vZ(this._client),this.agents=new w0(this._client),this.environments=new B0(this._client),this.sessions=new mZ(this._client),this.deployments=new J8(this._client),this.deploymentRuns=new X8(this._client),this.vaults=new P0(this._client),this.memoryStores=new sZ(this._client),this.files=new Q8(this._client),this.skills=new E0(this._client),this.webhooks=new U8(this._client),this.userProfiles=new G8(this._client)}};o.Models=V8;o.Messages=vZ;o.Agents=w0;o.Environments=B0;o.Sessions=mZ;o.Deployments=J8;o.DeploymentRuns=X8;o.Vaults=P0;o.MemoryStores=sZ;o.Files=Q8;o.Skills=E0;o.Webhooks=U8;o.UserProfiles=G8});var R0;var L1=M(()=>{k();E();R0=class R0 extends x{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/complete",{body:J,timeout:this._client._options.timeout??600000,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers]),stream:Z.stream??!1})}}});function d6(Z){return Z?.output_config?.format}function j1(Z,$,X){let J=d6($);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 S1(Z,$,X)}function S1(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=h5($,Y.text);if(J===null)J=V;return Object.defineProperty({...Y},"parsed_output",{value:V,enumerable:!1})}return Y});return{...Z,content:z,parsed_output:J}}function h5(Z,$){let X=d6(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new F(`Failed to parse structured output: ${J}`)}}var E1=M(()=>{v()});function f1(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"}function i6(Z){}var OZ,cZ,I0,m8,d$,c8,u8,p$,d8,DZ,p8,l$,i$,$0,n$,a$,l8,P1,p6,R1,I1,k1,y1,l6,i8;var n6=M(()=>{zZ();TZ();PZ();T0();z1();E1();Y1();i8=class i8{constructor(Z,$){OZ.add(this),this.messages=[],this.receivedMessages=[],cZ.set(this,void 0),I0.set(this,null),this.controller=new AbortController,m8.set(this,void 0),d$.set(this,()=>{}),c8.set(this,()=>{}),u8.set(this,void 0),p$.set(this,()=>{}),d8.set(this,()=>{}),DZ.set(this,{}),p8.set(this,!1),l$.set(this,!1),i$.set(this,!1),$0.set(this,!1),n$.set(this,void 0),a$.set(this,void 0),l8.set(this,void 0),R1.set(this,(X)=>{if(O(this,l$,!0,"f"),WZ(X))X=new t;if(X instanceof t)return O(this,i$,!0,"f"),this._emit("abort",X);if(X instanceof F)return this._emit("error",X);if(X instanceof Error){let J=new F(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new F(String(X)))}),O(this,m8,new Promise((X,J)=>{O(this,d$,X,"f"),O(this,c8,J,"f")}),"f"),O(this,u8,new Promise((X,J)=>{O(this,p$,X,"f"),O(this,d8,J,"f")}),"f"),K(this,m8,"f").catch(()=>{}),K(this,u8,"f").catch(()=>{}),O(this,I0,Z,"f"),O(this,l8,$?.logger??console,"f")}get response(){return K(this,n$,"f")}get request_id(){return K(this,a$,"f")}async withResponse(){O(this,$0,!0,"f");let Z=await K(this,m8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id")}}static fromReadableStream(Z){let $=new i8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new i8($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return O(z,I0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[F$]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,R1,"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{K(this,OZ,"m",I1).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,OZ,"m",k1).call(this,Q);if(V.controller.signal?.aborted)throw new t;K(this,OZ,"m",y1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;O(this,n$,Z,"f"),O(this,a$,Z?.headers.get("request-id"),"f"),K(this,d$,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,p8,"f")}get errored(){return K(this,l$,"f")}get aborted(){return K(this,i$,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,DZ,"f")[Z]||(K(this,DZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(this,DZ,"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(K(this,DZ,"f")[Z]||(K(this,DZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(O(this,$0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){O(this,$0,!0,"f"),await K(this,u8,"f")}get currentMessage(){return K(this,cZ,"f")}async finalMessage(){return await this.done(),K(this,OZ,"m",P1).call(this)}async finalText(){return await this.done(),K(this,OZ,"m",p6).call(this)}_emit(Z,...$){if(K(this,p8,"f"))return;if(Z==="end")O(this,p8,!0,"f"),K(this,p$,"f").call(this);let X=K(this,DZ,"f")[Z];if(X)K(this,DZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,$0,"f")&&!X?.length)Promise.reject(J);K(this,c8,"f").call(this,J),K(this,d8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,$0,"f")&&!X?.length)Promise.reject(J);K(this,c8,"f").call(this,J),K(this,d8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,OZ,"m",P1).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{K(this,OZ,"m",I1).call(this),this._connected(null);let z=e.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,OZ,"m",k1).call(this,Y);if(z.controller.signal?.aborted)throw new t;K(this,OZ,"m",y1).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(cZ=new WeakMap,I0=new WeakMap,m8=new WeakMap,d$=new WeakMap,c8=new WeakMap,u8=new WeakMap,p$=new WeakMap,d8=new WeakMap,DZ=new WeakMap,p8=new WeakMap,l$=new WeakMap,i$=new WeakMap,$0=new WeakMap,n$=new WeakMap,a$=new WeakMap,l8=new WeakMap,R1=new WeakMap,OZ=new WeakSet,P1=function(){if(this.receivedMessages.length===0)throw new F("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},p6=function(){if(this.receivedMessages.length===0)throw new F("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 F("stream ended without producing a content block with type=text");return $.join(" ")},I1=function(){if(this.ended)return;O(this,cZ,void 0,"f")},k1=function($){if(this.ended)return;let X=K(this,OZ,"m",l6).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(f1(J)&&K(this,DZ,"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:i6($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(j1(X,K(this,I0,"f"),{logger:K(this,l8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{O(this,cZ,X,"f");break}case"content_block_start":case"message_delta":break}},y1=function(){if(this.ended)throw new F("stream has ended, this shouldn't happen");let $=K(this,cZ,"f");if(!$)throw new F("request ended without sending any chunks");return O(this,cZ,void 0,"f"),j1($,K(this,I0,"f"),{logger:K(this,l8,"f")})},l6=function($){let X=K(this,cZ,"f");if($.type==="message_start"){if(X)throw new F(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new F(`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,$.delta.stop_details!=null)X.stop_details=$.delta.stop_details;if(X.usage.output_tokens=$.usage.output_tokens,$.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;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&&f1(J)){let z=(J[hZ]||"")+$.delta.partial_json;X.content[$.index]=h$(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:i6($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&f1(J)&&hZ 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,Y)=>$.push({resolve:z,reject:Y})).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 e(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var n8;var b1=M(()=>{k();b();E();sX();T0();h();n8=class n8 extends x{create(Z,$){let{user_profile_id:X,...J}=Z;return this._client.post("/v1/messages/batches",{body:J,...$,headers:G([{...X!=null?{"anthropic-user-profile-id":X}:void 0},$?.headers])})}retrieve(Z,$){return this._client.get(w`/v1/messages/batches/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/messages/batches",FZ,{query:Z,...$})}delete(Z,$){return this._client.delete(w`/v1/messages/batches/${Z}`,$)}cancel(Z,$){return this._client.post(w`/v1/messages/batches/${Z}/cancel`,$)}async results(Z,$){let X=await this.retrieve(Z);if(!X.results_url)throw new F(`No batch \`results_url\`; Has it finished processing? ${X.processing_status} - ${X.id}`);return this._client.get(X.results_url,{...$,headers:G([{Accept:"application/binary"},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((J,z)=>x0.fromResponse(z.response,z.controller))}}});var X0,a6,g5;var h1=M(()=>{k();E();TZ();n6();E1();b1();b1();Z1();X0=class X0 extends x{constructor(){super(...arguments);this.batches=new n8(this._client)}create(Z,$){let{user_profile_id:X,...J}=Z;if(J.model in a6)console.warn(`The model '${J.model}' is deprecated and will reach end-of-life on ${a6[J.model]}
|
|
33
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(g5.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=this._client._options.timeout;if(!J.stream&&z==null){let V=b$[J.model]??void 0;z=this._client.calculateNonstreamingTimeout(J.max_tokens,V)}let Y=H$(J.tools,J.messages);return this._client.post("/v1/messages",{body:J,timeout:z??600000,...$,headers:G([{...X!=null?{"anthropic-user-profile-id":X}:void 0},Y,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((X)=>S1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return i8.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:G([{...X!=null?{"anthropic-user-profile-id":X}:void 0},$?.headers])})}};a6={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026","claude-opus-4-1":"August 5th, 2026","claude-opus-4-1-20250805":"August 5th, 2026","claude-mythos-preview":"June 30th, 2026"},g5=["claude-mythos-preview","claude-opus-4-6"];X0.Batches=n8});var k0;var _1=M(()=>{k();b();E();h();k0=class k0 extends x{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(w`/v1/models/${Z}`,{...X,headers:G([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models",FZ,{query:J,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var o6=M(()=>{D1();L1();h1();_1();n4()});class c{get credentials(){return this._authState.provider}constructor({baseURL:Z=j("ANTHROPIC_BASE_URL"),apiKey:$,authToken:X,webhookKey:J=j("ANTHROPIC_WEBHOOK_SIGNING_KEY")??null,...z}={}){if(g1.add(this),this._requestAuthFlags=new WeakMap,o$.set(this,void 0),$===void 0)$=z.profile!=null?null:j("ANTHROPIC_API_KEY")??null;if(X===void 0)X=z.profile!=null?null:j("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 Y={apiKey:$,authToken:X,webhookKey:J,...z,baseURL:Z||"https://api.anthropic.com"};if(!Y.dangerouslyAllowBrowser&&o1())throw new F(`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=Y.baseURL,this._baseURLIsExplicit=z.__baseURLIsExplicit??!!Z,this.timeout=Y.timeout??v1.DEFAULT_TIMEOUT,this.logger=Y.logger??console,this.logLevel=r0,this.logLevel=Q$(Y.logLevel,"ClientOptions.logLevel",R(this))??Q$(j("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",R(this))??r0,this.fetchOptions=Y.fetchOptions,this.maxRetries=Y.maxRetries??2,this.fetch=Y.fetch??r1(),O(this,o$,s1,"f"),this.middleware=[...Y.middleware??[]];let V=j("ANTHROPIC_CUSTOM_HEADERS");if(V){let W={};for(let q of V.split(`
|
|
41
|
+
`)){let H=q.indexOf(":");if(H>=0)W[q.substring(0,H).trim()]=q.substring(H+1).trim()}Y.defaultHeaders={...W,...Y.defaultHeaders}}let Q=z.__auth;if(delete Y.__auth,delete Y.__baseURLIsExplicit,this._options=Y,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 W=Y.credentials??null;if(W)this._authState.provider=W,this._authState.tokenCache=this._makeTokenCache(W);else if(Y.config!=null){let q=FX(Y.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(Y.profile!=null)this._authState.resolution=this._resolveDefaultCredentials(Y.profile);else this._authState.resolution=this._resolveDefaultCredentials()}}_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)=>{R(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{R(this).warn(Z)}}}_credentialsFetch(){return TX(this.fetch,this.middleware,void 0,this)}_makeTokenCache(Z){return new WX(Z,($)=>{R(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 b4(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 F(`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,G([{Authorization:`Bearer ${$}`}])}return G([await this.apiKeyAuth(Z),await this.bearerAuth(Z)])}async apiKeyAuth(Z){if(this.apiKey==null)return;return G([{"X-Api-Key":this.apiKey}])}async bearerAuth(Z){if(this.authToken==null)return;return G([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(Z){return G4(Z)}getUserAgent(){return`${this.constructor.name}/JS ${UZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${z0()}`}makeStatusError(Z,$,X,J){return m.generate(Z,$,X,J)}buildURL(Z,$,X){let J=!K(this,g1,"m",r6).call(this)&&X||this.baseURL,z=d1(Z)?new URL(Z):new URL(J+(J.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),Y=this.defaultQuery(),V=Object.fromEntries(z.searchParams);if(!e$(Y)||!e$(V))$={...V,...Y,...$};if(typeof $==="object"&&$&&!Array.isArray($))z.search=this.stringifyQuery($);return z.toString()}_calculateNonstreamingTimeout(Z){if(3600*Z/128000>600)throw new F("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[Y,V]of Object.entries(this._authState.extraHeaders))if(!J.has(Y))J.set(Y,V);if(!J.get("anthropic-beta")?.split(",").map((Y)=>Y.trim())?.includes(pZ))J.append("anthropic-beta",pZ);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 lZ(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:Y,url:V,timeout:Q}=await this.buildRequest(J,{retryCount:z-$}),W="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),q=X===void 0?"":`, retryOf: ${X}`,H=Date.now();if(J.signal?.aborted)throw new t;let U=new AbortController,N=await this.fetchWithTimeout(V,Y,Q,U,J,{requestLogID:W,retryOfRequestLogID:X}).catch(dZ),C=Date.now();if(N instanceof globalThis.Error){let A=`retrying, ${$} attempts remaining`;if(J.signal?.aborted)throw new t;let D=WZ(N)||/timed? ?out/i.test(String(N)+("cause"in N?String(N.cause):"")),B=this.middleware.length>0||!!J.middleware?.length||this.backendMiddleware().length>0;if(B&&!D&&!u4(N))throw R(this).info(`[${W}] middleware error (not retryable)`),R(this).debug(`[${W}] middleware error (not retryable)`,BZ({retryOfRequestLogID:X,url:V,durationMs:C-H,message:N.message})),N;if($)return R(this).info(`[${W}] connection ${D?"timed out":"failed"} - ${A}`),R(this).debug(`[${W}] connection ${D?"timed out":"failed"} (${A})`,BZ({retryOfRequestLogID:X,url:V,durationMs:C-H,message:N.message})),this.retryRequest(J,$,X??W);if(R(this).info(`[${W}] connection ${D?"timed out":"failed"} - error; no more retries left`),R(this).debug(`[${W}] connection ${D?"timed out":"failed"} (error; no more retries left)`,BZ({retryOfRequestLogID:X,url:V,durationMs:C-H,message:N.message})),D)throw new y0;if(B&&!BX(N))throw N;throw new LZ({cause:N})}let T=[...N.headers.entries()].filter(([A])=>A==="request-id").map(([A,D])=>", "+A+": "+JSON.stringify(D)).join(""),L=`[${W}${q}${T}] ${Y.method} ${V} ${N.ok?"succeeded":"failed"} with status ${N.status} in ${C-H}ms`;if(!N.ok){let A=await this.shouldRetry(N,J);if($&&A){let l=`retrying, ${$} attempts remaining`;return await t1(N.body),R(this).info(`${L} - ${l}`),R(this).debug(`[${W}] response error (${l})`,BZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:C-H})),this.retryRequest(J,$,X??W,N.headers)}let D=A?"error; no more retries left":"error; not retryable";R(this).info(`${L} - ${D}`);let B=await N.text().catch((l)=>dZ(l).message),P=p0(B),I=P?void 0:B;throw R(this).debug(`[${W}] response error (${D})`,BZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,message:I,durationMs:Date.now()-H})),this.makeStatusError(N.status,P,I,N.headers)}return R(this).info(L),R(this).debug(`[${W}] response start`,BZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:C-H})),{response:N,options:J,controller:U,requestLogID:W,retryOfRequestLogID:X,startTime:H}}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 O$(this,X,Z)}async fetchWithTimeout(Z,$,X,J,z,Y){let{signal:V,method:Q,...W}=$||{},q=this._makeAbort(J);if(V)V.addEventListener("abort",q,{once:!0});let H=globalThis.ReadableStream&&W.body instanceof globalThis.ReadableStream||typeof W.body==="object"&&W.body!==null&&Symbol.asyncIterator in W.body,U={signal:J.signal,...H?{duplex:"half"}:{},method:"GET",...W};if(Q)U.method=Q.toUpperCase();let N=this.fetch,C=async(B,P)=>{let I=setTimeout(q,X);try{return await N.call(void 0,B,P)}finally{clearTimeout(I)}},T=z===void 0?C:async(B,P={})=>{let I=typeof B==="string"?B:B instanceof URL?B.href:B.url;if(P.headers=P.headers instanceof Headers?P.headers:new Headers(P.headers),await this.prepareRequest(P,{url:I,options:z}),Y)R(this).debug(`[${Y.requestLogID}] sending request`,BZ({retryOfRequestLogID:Y.retryOfRequestLogID,method:P.method,url:I,options:z,headers:P.headers}));return C(B,P)},L=z?.middleware,A=this.backendMiddleware(),D=L?.length||A.length?[...this.middleware,...L??[],...A]:this.middleware;return await TX(T,D,z,this)(Z,U)}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,Y=J?.get("retry-after-ms");if(Y){let Q=parseFloat(Y);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 MZ(z),this.makeRequest(Z,$-1,X)}calculateDefaultRetryTimeoutMillis(Z,$){let z=$-Z,Y=Math.min(0.5*Math.pow(2,z),8),V=1-Math.random()*0.25;return Y*V*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new F("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:Y,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,Y,V);if("timeout"in X)l1("timeout",X.timeout);X.timeout=X.timeout??this.timeout;let{bodyHeaders:W,body:q}=this.buildBody({options:X}),H=await this.buildHeaders({options:Z,method:J,bodyHeaders:W,retryCount:$});return{req:{method:J,headers:H,...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 Y=G([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))}:{},...i0(),...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(Y),Y.values}_makeAbort(Z){return()=>Z.abort()}buildBody({options:{body:Z,headers:$}}){if(!Z)return{bodyHeaders:void 0,body:void 0};let X=G([$]);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:t8(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 K(this,o$,"f").call(this,{body:Z,headers:X})}}var g1,v1,o$,r6,t6="\\n\\nHuman:",s6="\\n\\nAssistant:",J0;var m1=M(()=>{zZ();o8();qZ();Y0();PZ();r8();K0();$X();GX();l0();v();V0();M4();h4();d4();b();SX();o6();W$();L1();_1();D1();h1();r8();E();G0();jZ();qZ();v1=c,o$=new WeakMap,g1=new WeakSet,r6=function(){return this.baseURL!=="https://api.anthropic.com"};c.Anthropic=v1;c.HUMAN_PROMPT=t6;c.AI_PROMPT=s6;c.DEFAULT_TIMEOUT=600000;c.AnthropicError=F;c.APIError=m;c.APIConnectionError=LZ;c.APIConnectionTimeoutError=y0;c.APIUserAbortError=t;c.NotFoundError=_0;c.ConflictError=g0;c.RateLimitError=m0;c.BadRequestError=f0;c.AuthenticationError=b0;c.InternalServerError=c0;c.PermissionDeniedError=h0;c.UnprocessableEntityError=v0;c.toFile=q$;J0=class J0 extends c{constructor(){super(...arguments);this.completions=new R0(this),this.messages=new X0(this),this.models=new k0(this),this.beta=new o(this)}};J0.Completions=R0;J0.Messages=X0;J0.Models=k0;J0.Beta=o});var e6=M(()=>{v();s0();PZ();E();TZ();qZ();$X()});var c5=M(()=>{m1();SX();W$();e6();m1();b();v()});
|
|
42
|
+
export{O as Poa,K as Qoa,zZ as Roa,F as Soa,m as Toa,t as Uoa,LZ as Voa,y0 as Woa,b0 as Xoa,_0 as Yoa,v as Zoa,R as _oa,jZ as $oa,D4 as apa,RZ as bpa,u0 as cpa,t$ as dpa,u1 as epa,T0 as fpa,J0 as gpa,c5 as hpa};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{HL as Q,IL as $}from"./cli-0.7.0-7g132rdj.mjs";import{$ia as P,_ia as V,aka as W,bka as E}from"./cli-0.7.0-x2vc8nds.mjs";import{Zpa as L}from"./cli-0.7.0-8p56ked8.mjs";function Z(x,q,D,G){var H=-1,J=x==null?0:x.length;while(++H<J){var K=x[H];q(G,K,D(K),x)}return G}var M;var N=L(()=>{M=Z});function B(x,q,D,G){return Q(x,function(H,J,K){q(G,H,D(H),K)}),G}var S;var U=L(()=>{$();S=B});function I(x,q){return function(D,G){var H=V(D)?M:S,J=q?q():{};return H(D,x,W(G,2),J)}}var X;var Y=L(()=>{N();U();E();P();X=I});var R,v;var C=L(()=>{Y();R=X(function(x,q,D){x[D?0:1].push(q)},function(){return[[],[]]}),v=R});
|
|
2
|
+
export{v as Zc,C as _c};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{$r as D,LD as k,MD as HJ,Zo as G,ap as a,as as hJ,nn as R,on as BJ}from"./cli-0.7.0-7g132rdj.mjs";import{E6 as bJ,e6 as ZJ,p6 as $J}from"./cli-0.7.0-9jzkqcfv.mjs";import{Gba as jJ,K9 as C,L9 as GJ,M9 as h,N9 as FJ,O9 as u,P9 as kJ,rba as WJ}from"./cli-0.7.0-h6kfhzzd.mjs";import{Hfa as gJ,vfa as x}from"./cli-0.7.0-m07xma4d.mjs";import{_fa as q,aga as s,bga as Y,cga as r}from"./cli-0.7.0-5ktz31fq.mjs";import{Fga as M,Kga as yJ}from"./cli-0.7.0-v6ceqq5f.mjs";import{iha as o,jha as CJ,sha as n,tha as EJ,yha as l,zha as TJ}from"./cli-0.7.0-hrtdae85.mjs";import{$ia as wJ,Qja as c,Rja as OJ,Uja as H,Una as QJ,Vja as F,Wja as I,Xja as YJ,Yia as g,Yja as P,Zia as zJ,Zja as XJ,_ia as A,kja as f,lja as PJ,ooa as mJ}from"./cli-0.7.0-x2vc8nds.mjs";import{xoa as K,yoa as DJ}from"./cli-0.7.0-wspeyepj.mjs";import{Zpa as B}from"./cli-0.7.0-8p56ked8.mjs";function UJ(J,Q){return Q.length<2?J:P(J,R(Q,0,-1))}var z;var L=B(()=>{XJ();BJ();z=UJ});function xJ(J,Q){Q=H(Q,J);var W=-1,$=Q.length;if(!$)return!0;while(++W<$){var Z=I(Q[W]);if(Z==="__proto__"&&!KJ.call(J,"__proto__"))return!1;if((Z==="constructor"||Z==="prototype")&&W<$-1)return!1}var X=z(J,Q);return X==null||delete X[I(k(Q))]}var IJ,KJ,N;var O=B(()=>{F();HJ();L();YJ();IJ=Object.prototype,KJ=IJ.hasOwnProperty;N=xJ});function MJ(J){return C(J)?void 0:J}var E;var T=B(()=>{GJ();E=MJ});function RJ(J){return A(J)||f(J)||!!(S&&J&&J[S])}var S,d;var _=B(()=>{DJ();PJ();wJ();S=K?K.isConcatSpreadable:void 0;d=RJ});function v(J,Q,W,$,Z){var X=-1,V=J.length;W||(W=d),Z||(Z=[]);while(++X<V){var U=J[X];if(Q>0&&W(U))if(Q>1)v(U,Q-1,W,$,Z);else g(Z,U);else if(!$)Z[Z.length]=U}return Z}var m;var j=B(()=>{zJ();_();m=v});function LJ(J){var Q=J==null?0:J.length;return Q?m(J,1):[]}var y;var b=B(()=>{j();y=LJ});function NJ(J){return u(h(J,void 0,y),J+"")}var i;var p=B(()=>{b();FJ();kJ();i=NJ});var SJ=1,AJ=2,fJ=4,dJ,NQ;var _J=B(()=>{OJ();TJ();O();F();CJ();T();p();EJ();dJ=i(function(J,Q){var W={};if(J==null)return W;var $=!1;if(Q=c(Q,function(X){return X=H(X,J),$||($=X.length>1),X}),o(J,n(J),W),$)W=l(W,SJ|AJ|fJ,E);var Z=Q.length;while(Z--)N(W,Q[Z]);return W}),NQ=dJ});function t(){let J=x("tengu_harbor_ledger",[]),Q=vJ().safeParse(J);return Q.success?Q.data:[]}function e(){return x("tengu_harbor",!1)}var vJ;var JJ=B(()=>{s();r();a();gJ();vJ=Y(()=>q.array(q.object({marketplace:q.string(),plugin:q.string()})))});function uQ(J,Q,W){let $=Object.entries(W??{}).filter(([Z])=>iJ.test(Z)).map(([Z,X])=>` ${Z}="${D(X)}"`).join("");return`<${M} source="${D(J)}"${$}>
|
|
2
|
+
${Q}
|
|
3
|
+
</${M}>`}function pJ(J,Q){if((J==="team"||J==="enterprise")&&Q)return{entries:Q,source:"org"};return{entries:t(),source:"ledger"}}function cJ(J,Q){let W=J.split(":");return Q.find(($)=>$.kind==="server"?J===$.name:W[0]==="plugin"&&W[1]===$.name)}function iQ(J,Q,W){if(!Q?.experimental?.["claude/channel"])return{action:"skip",kind:"capability",reason:"server did not declare claude/channel capability"};if(!e())return{action:"skip",kind:"disabled",reason:"channels feature is not currently available"};if(!ZJ()?.accessToken)return{action:"skip",kind:"auth",reason:"channels requires claude.ai authentication (run /login)"};let $=$J(),Z=$==="team"||$==="enterprise",X=Z?WJ("policySettings"):void 0;if(Z&&X?.channelsEnabled!==!0)return{action:"skip",kind:"policy",reason:"channels not enabled by org policy (set channelsEnabled: true in managed settings)"};let V=cJ(J,QJ());if(!V)return{action:"skip",kind:"session",reason:`server ${J} not in --channels list for this session`};if(V.kind==="plugin"){let U=W?G(W).marketplace:void 0;if(U!==V.marketplace)return{action:"skip",kind:"marketplace",reason:`you asked for plugin:${V.name}@${V.marketplace} but the installed ${V.name} plugin is from ${U??"an unknown source"}`};if(!V.dev){let{entries:qJ,source:VJ}=pJ($,X?.allowedChannelPlugins);if(!qJ.some((w)=>w.plugin===V.name&&w.marketplace===V.marketplace))return{action:"skip",kind:"allowlist",reason:VJ==="org"?`plugin ${V.name}@${V.marketplace} is not on your org's approved channels list (set allowedChannelPlugins in managed settings)`:`plugin ${V.name}@${V.marketplace} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`}}}else if(!V.dev)return{action:"skip",kind:"allowlist",reason:`server ${V.name} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`};return{action:"register"}}var bQ,uJ="notifications/claude/channel/permission",hQ,iJ;var oJ=B(()=>{s();mJ();yJ();bJ();r();a();jJ();hJ();JJ();bQ=Y(()=>q.object({method:q.literal("notifications/claude/channel"),params:q.object({content:q.string(),meta:q.record(q.string(),q.string()).optional()})})),hQ=Y(()=>q.object({method:q.literal(uJ),params:q.object({request_id:q.string(),behavior:q.enum(["allow","deny"])})})),iJ=/^[a-zA-Z_][a-zA-Z0-9_]*$/});
|
|
4
|
+
export{NQ as Jf,_J as Kf,JJ as Lf,bQ as Mf,uQ as Nf,cJ as Of,iQ as Pf,oJ as Qf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Zpa as J}from"./cli-0.7.0-8p56ked8.mjs";import v from"node:path";function Z(q){if(q.endsWith(v.sep)||q.endsWith("/"))return K;let j=v.basename(q).toLowerCase();if(j.startsWith("readme"))return B[".md"];if(j.startsWith(".env"))return Q;let z=U[j];if(z)return z;let H=v.extname(j);return B[H]??P}var K="",Y="",P="",Q="",U,B;var V=J(()=>{U={"package.json":"",dockerfile:"",".dockerignore":"",".gitignore":"",".gitattributes":"",license:"","bun.lock":""},B={".ts":"",".tsx":"",".js":"",".jsx":"",".mjs":"",".cjs":"",".json":"",".md":"",".markdown":"",".toml":"",".yaml":"",".yml":"",".py":"",".rs":"",".go":"",".sh":"",".bash":"",".zsh":"",".css":"",".scss":"",".html":"",".htm":"",".png":"",".jpg":"",".jpeg":"",".gif":"",".svg":"",".webp":"",".lock":""}});
|
|
2
|
+
export{K as uh,Y as vh,Z as wh,V as xh};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Cb as Y}from"./cli-0.7.0-76wj8x34.mjs";import{ZU as N,_U as C}from"./cli-0.7.0-ytqbgtvc.mjs";import{hea as A,jea as w}from"./cli-0.7.0-h6kfhzzd.mjs";import{Vga as B,Yga as k}from"./cli-0.7.0-0cp32djm.mjs";import{$ha as j,Cha as L,Gha as E,Yha as W}from"./cli-0.7.0-hrtdae85.mjs";import{qia as G,xia as K}from"./cli-0.7.0-ba1xb8x3.mjs";k();C();import{randomUUID as O}from"crypto";j();w();K();E();function T(f){return f!==null&&typeof f==="object"&&"type"in f&&typeof f.type==="string"}function P(f){return f!==null&&typeof f==="object"&&"type"in f&&f.type==="control_response"&&"response"in f}function S(f){return f!==null&&typeof f==="object"&&"type"in f&&f.type==="control_request"&&"request_id"in f&&"request"in f}function v(f){if((f.type==="user"||f.type==="assistant")&&f.isVirtual)return!1;return f.type==="user"||f.type==="assistant"||f.type==="system"&&f.subtype==="local_command"}function q(f){if(f.type!=="user"||f.isMeta||f.toolUseResult||f.isCompactSummary)return;if(f.origin&&f.origin.kind!=="human")return;let X=f.message.content,Q;if(typeof X==="string")Q=X;else for(let Z of X)if(Z.type==="text"){Q=Z.text;break}if(!Q)return;return A(Q)||void 0}function p(f,X,Q,$,Z,z){try{let H=Y(L(f));if(P(H)){W("[bridge:repl] Ingress message type=control_response"),Z?.(H);return}if(S(H)){W(`[bridge:repl] Inbound control_request subtype=${H.request.subtype}`),z?.(H);return}if(!T(H))return;let J="uuid"in H&&typeof H.uuid==="string"?H.uuid:void 0;if(J&&X.has(J)){W(`[bridge:repl] Ignoring echo: type=${H.type} uuid=${J}`);return}if(J&&Q.has(J)){W(`[bridge:repl] Ignoring re-delivered inbound: type=${H.type} uuid=${J}`);return}if(W(`[bridge:repl] Ingress message type=${H.type}${J?` uuid=${J}`:""}`),H.type==="user"){if(J)Q.add(J);B("tengu_bridge_message_received",{is_repl:!0}),$?.(H)}else W(`[bridge:repl] Ignoring non-user inbound message: type=${H.type}`)}catch(H){W(`[bridge:repl] Failed to parse ingress message: ${G(H)}`)}}var y="This session is outbound-only. Enable Remote Control locally to allow inbound control.";function g(f,X){let{transport:Q,sessionId:$,outboundOnly:Z,onInterrupt:z,onSetModel:H,onSetMaxThinkingTokens:J,onSetPermissionMode:h}=X;if(!Q){W("[bridge:repl] Cannot respond to control_request: transport not configured");return}let V;if(Z&&f.request.subtype!=="initialize"){V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:y}};let x={...V,session_id:$};Q.write(x),W(`[bridge:repl] Rejected ${f.request.subtype} (outbound-only) request_id=${f.request_id}`);return}switch(f.request.subtype){case"initialize":V={type:"control_response",response:{subtype:"success",request_id:f.request_id,response:{commands:[],output_style:"normal",available_output_styles:["normal"],models:[],account:{},pid:process.pid}}};break;case"set_model":H?.(f.request.model),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;case"set_max_thinking_tokens":J?.(f.request.max_thinking_tokens),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;case"set_permission_mode":{let x=h?.(f.request.mode)??{ok:!1,error:"set_permission_mode is not supported in this context (onSetPermissionMode callback not registered)"};if(x.ok)V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};else V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:x.error}};break}case"interrupt":z?.(),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;default:V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:`REPL bridge does not handle control_request subtype: ${f.request.subtype}`}}}let _={...V,session_id:$};Q.write(_),W(`[bridge:repl] Sent control_response for ${f.request.subtype} request_id=${f.request_id} result=${V.response.subtype}`)}function d(f){return{type:"result",subtype:"success",duration_ms:0,duration_api_ms:0,is_error:!1,num_turns:0,result:"",stop_reason:null,total_cost_usd:0,usage:{...N},modelUsage:{},permission_denials:[],session_id:f,uuid:O()}}class R{capacity;ring;set=new Set;writeIdx=0;constructor(f){this.capacity=f,this.ring=Array(f)}add(f){if(this.set.has(f))return;let X=this.ring[this.writeIdx];if(X!==void 0)this.set.delete(X);this.ring[this.writeIdx]=f,this.set.add(f),this.writeIdx=(this.writeIdx+1)%this.capacity}has(f){return this.set.has(f)}clear(){this.set.clear(),this.ring.fill(void 0),this.writeIdx=0}}
|
|
2
|
+
export{v as wb,q as xb,p as yb,g as zb,d as Ab,R as Bb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ei as M,fi as w,gi as A}from"./cli-0.7.0-d8vr3j93.mjs";import{_fa as X,aga as N,bga as $,cga as O}from"./cli-0.7.0-5ktz31fq.mjs";import{$ha as C,Yha as R}from"./cli-0.7.0-hrtdae85.mjs";import{Aia as L,Nia as _}from"./cli-0.7.0-na9s209m.mjs";import{ooa as T,rka as H}from"./cli-0.7.0-x2vc8nds.mjs";import{Apa as y,ipa as W}from"./cli-0.7.0-sbwhas5a.mjs";y();N();T();C();_();O();A();import{randomUUID as I}from"crypto";import{mkdir as P,writeFile as U}from"fs/promises";import{basename as v,join as B}from"path";var D=30000;function Q(q){R(`[bridge:inbound-attach] ${q}`)}var j=$(()=>X.object({file_uuid:X.string(),file_name:X.string()})),k=$(()=>X.array(j()));function S(q){if(typeof q!=="object"||q===null||!("file_attachments"in q))return[];let G=k().safeParse(q.file_attachments);return G.success?G.data:[]}function z(q){return v(q).replace(/[^a-zA-Z0-9._-]/g,"_")||"attachment"}function x(){return B(L(),"uploads",H())}async function b(q){let G=M();if(!G){Q("skip: no oauth token");return}let J;try{let V=`${w()}/api/oauth/files/${encodeURIComponent(q.file_uuid)}/content`,Z=await W.get(V,{headers:{Authorization:`Bearer ${G}`},responseType:"arraybuffer",timeout:D,validateStatus:()=>!0});if(Z.status!==200){Q(`fetch ${q.file_uuid} failed: status=${Z.status}`);return}J=Buffer.from(Z.data)}catch(V){Q(`fetch ${q.file_uuid} threw: ${V}`);return}let K=z(q.file_name),F=(q.file_uuid.slice(0,8)||I().slice(0,8)).replace(/[^a-zA-Z0-9_-]/g,"_"),E=x(),Y=B(E,`${F}-${K}`);try{await P(E,{recursive:!0}),await U(Y,J)}catch(V){Q(`write ${Y} failed: ${V}`);return}return Q(`resolved ${q.file_uuid} → ${Y} (${J.length} bytes)`),Y}async function f(q){if(q.length===0)return"";Q(`resolving ${q.length} attachment(s)`);let J=(await Promise.all(q.map(b))).filter((K)=>K!==void 0);if(J.length===0)return"";return J.map((K)=>`@"${K}"`).join(" ")+" "}function l(q,G){if(!G)return q;if(typeof q==="string")return G+q;let J=q.findLastIndex((K)=>K.type==="text");if(J!==-1){let K=q[J];if(K.type==="text")return[...q.slice(0,J),{...K,text:G+K.text},...q.slice(J+1)]}return[...q,{type:"text",text:G.trimEnd()}]}async function s(q,G){let J=S(q);if(J.length===0)return G;let K=await f(J);return l(G,K)}
|
|
2
|
+
export{S as Db,f as Eb,l as Fb,s as Gb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Nd as j,Od as E}from"./cli-0.7.0-q5sbn5b2.mjs";import{Zo as W,aK as X,ap as v,cK as Y,lK as Z,nK as w,rK as _,tK as $,yK as f}from"./cli-0.7.0-7g132rdj.mjs";import{Fca as S,Rca as A,aaa as Q,naa as T,nea as V,vea as N}from"./cli-0.7.0-h6kfhzzd.mjs";import{$ha as R,Yha as B}from"./cli-0.7.0-hrtdae85.mjs";import{qia as L,xia as K}from"./cli-0.7.0-ba1xb8x3.mjs";import{Zpa as y}from"./cli-0.7.0-8p56ked8.mjs";function d(q){if(J=q,G!==null&&G.length>0)q(G),G=null;return()=>{J=null}}async function C(){let q=await Y(),D=X(),x=new Set;for(let[z,h]of Object.entries(q)){let F=D[z]?.autoUpdate;if(F!==void 0?F:Q(z,h))x.add(z.toLowerCase())}return x}async function M(q,D){let x=!1;for(let{scope:z}of D)try{let h=await j(q,z);if(h.success&&!h.alreadyUpToDate)x=!0,B(`Plugin autoupdate: updated ${q} from ${h.oldVersion} to ${h.newVersion}`);else if(!h.alreadyUpToDate)B(`Plugin autoupdate: failed to update ${q}: ${h.message}`,{level:"warn"})}catch(h){B(`Plugin autoupdate: error updating ${q}: ${L(h)}`,{level:"warn"})}return x?q:null}async function P(q){let D=_(),x=Object.keys(D.plugins);if(x.length===0)return[];return(await Promise.allSettled(x.map(async(h)=>{let{marketplace:F}=W(h);if(!F||!q.has(F.toLowerCase()))return null;let H=D.plugins[h];if(!H||H.length===0)return null;let O=H.filter($);if(O.length===0)return null;return M(h,O)}))).filter((h)=>h.status==="fulfilled"&&h.value!==null).map((h)=>h.value)}async function m(q){return P(q)}function t(){(async()=>{if(S()){B("Plugin autoupdate: skipped (auto-updater disabled)");return}try{let q=await C();if(q.size===0)return;let x=(await Promise.allSettled(Array.from(q).map(async(h)=>{try{await Z(h,void 0,{disableCredentialHelper:!0})}catch(F){B(`Plugin autoupdate: failed to refresh marketplace ${h}: ${L(F)}`,{level:"warn"})}}))).filter((h)=>h.status==="rejected");if(x.length>0)B(`Plugin autoupdate: ${x.length} marketplace refresh(es) failed`,{level:"warn"});B("Plugin autoupdate: checking installed plugins");let z=await m(q);if(z.length>0)if(J)J(z);else G=z}catch(q){V(q)}})()}var J=null,G=null;var U=y(()=>{E();A();R();K();N();f();w();v();T()});
|
|
2
|
+
export{d as jd,P as kd,t as ld,U as md};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{a7 as D}from"./cli-0.7.0-kr6jdp53.mjs";import{$ha as a,Kha as L,Oha as JG,Yha as W}from"./cli-0.7.0-hrtdae85.mjs";import{Cia as c,Dia as jG,Nia as GG}from"./cli-0.7.0-na9s209m.mjs";import{Noa as U,Ooa as g}from"./cli-0.7.0-wspeyepj.mjs";import{Apa as RG,ipa as H}from"./cli-0.7.0-sbwhas5a.mjs";import{Epa as wG}from"./cli-0.7.0-3stm3k7p.mjs";import{Vpa as WG,Zpa as j,_pa as e}from"./cli-0.7.0-8p56ked8.mjs";function hG(){_.cache.clear?.(),W("Cleared CA certificates cache")}var _;var p=j(()=>{g();a();GG();JG();_=U(()=>{let G=c("--use-system-ca")||c("--use-openssl-ca"),J=process.env.NODE_EXTRA_CA_CERTS;if(W(`CA certs: useSystemCA=${G}, extraCertsPath=${J}`),!G&&!J)return;let Q=e("tls"),K=[];if(G){let Y=Q.getCACertificates,Z=Y?.("system");if(Z&&Z.length>0)K.push(...Z),W(`CA certs: Loaded ${K.length} system CA certificates (--use-system-ca)`);else if(!Y&&!J){W("CA certs: --use-system-ca set but system CA API unavailable, deferring to runtime");return}else K.push(...Q.rootCertificates),W(`CA certs: Loaded ${K.length} bundled root certificates as base (--use-system-ca fallback)`)}else K.push(...Q.rootCertificates),W(`CA certs: Loaded ${K.length} bundled root certificates as base`);if(J)try{let Y=L().readFileSync(J,{encoding:"utf8"});K.push(Y),W(`CA certs: Appended extra certificates from NODE_EXTRA_CA_CERTS (${J})`)}catch(Y){W(`CA certs: Failed to read NODE_EXTRA_CA_CERTS file (${J}): ${Y}`,{level:"error"})}return K.length>0?K:void 0})});import{Agent as EG}from"https";function gG(){let G=F(),J=_();if(!G&&!J)return;return{...G,...J&&{ca:J}}}function v(){let G=F(),J=_();if(!G&&!J)return{};let Q={...G,...J&&{ca:J}};if(typeof Bun<"u")return{tls:Q};return W("TLS: Created undici agent with custom certificates"),{dispatcher:new(D()).Agent({connect:{cert:Q.cert,key:Q.key,passphrase:Q.passphrase,...Q.ca&&{ca:Q.ca}},pipelining:1})}}function aG(){F.cache.clear?.(),P.cache.clear?.(),W("Cleared mTLS configuration cache")}function pG(){if(!F())return;if(process.env.NODE_EXTRA_CA_CERTS)W("NODE_EXTRA_CA_CERTS detected - Node.js will automatically append to built-in CAs")}var F,P;var KG=j(()=>{g();p();a();JG();F=U(()=>{let G={};if(process.env.CLAUDE_CODE_CLIENT_CERT)try{G.cert=L().readFileSync(process.env.CLAUDE_CODE_CLIENT_CERT,{encoding:"utf8"}),W("mTLS: Loaded client certificate from CLAUDE_CODE_CLIENT_CERT")}catch(J){W(`mTLS: Failed to load client certificate: ${J}`,{level:"error"})}if(process.env.CLAUDE_CODE_CLIENT_KEY)try{G.key=L().readFileSync(process.env.CLAUDE_CODE_CLIENT_KEY,{encoding:"utf8"}),W("mTLS: Loaded client key from CLAUDE_CODE_CLIENT_KEY")}catch(J){W(`mTLS: Failed to load client key: ${J}`,{level:"error"})}if(process.env.CLAUDE_CODE_CLIENT_KEY_PASSPHRASE)G.passphrase=process.env.CLAUDE_CODE_CLIENT_KEY_PASSPHRASE,W("mTLS: Using client key passphrase");if(Object.keys(G).length===0)return;return G}),P=U(()=>{let G=F(),J=_();if(!G&&!J)return;let Q={...G,...J&&{ca:J},keepAlive:!0};return W("mTLS: Creating HTTPS agent with custom certificates"),new EG(Q)})});var QG=()=>{};import*as YG from"net";import*as ZG from"http";import{Agent as SG}from"https";var B,i;var $G=j(()=>{QG();B=Symbol("AgentBaseInternalState");i=class i extends ZG.Agent{constructor(G){super(G);this[B]={}}isSecureEndpoint(G){if(G){if(typeof G.secureEndpoint==="boolean")return G.secureEndpoint;if(typeof G.protocol==="string")return G.protocol==="https:"}let{stack:J}=Error();if(typeof J!=="string")return!1;return J.split(`
|
|
2
|
+
`).some((Q)=>Q.indexOf("(https.js:")!==-1||Q.indexOf("node:https:")!==-1)}incrementSockets(G){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;if(!this.sockets[G])this.sockets[G]=[];let J=new YG.Socket({writable:!1});return this.sockets[G].push(J),this.totalSocketCount++,J}decrementSockets(G,J){if(!this.sockets[G]||J===null)return;let Q=this.sockets[G],K=Q.indexOf(J);if(K!==-1){if(Q.splice(K,1),this.totalSocketCount--,Q.length===0)delete this.sockets[G]}}getName(G){if(this.isSecureEndpoint(G))return SG.prototype.getName.call(this,G);return super.getName(G)}createSocket(G,J,Q){let K={...J,secureEndpoint:this.isSecureEndpoint(J)},Y=this.getName(K),Z=this.incrementSockets(Y);Promise.resolve().then(()=>this.connect(G,K)).then((w)=>{if(this.decrementSockets(Y,Z),typeof w.addRequest==="function")try{return w.addRequest(G,K)}catch($){return Q($)}this[B].currentSocket=w,super.createSocket(G,J,Q)},(w)=>{this.decrementSockets(Y,Z),Q(w)})}createConnection(){let G=this[B].currentSocket;if(this[B].currentSocket=void 0,!G)throw Error("No socket was returned in the `connect()` function");return G}get defaultPort(){return this[B].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(G){if(this[B])this[B].defaultPort=G}get protocol(){return this[B].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(G){if(this[B])this[B].protocol=G}}});function n(G){return new Promise((J,Q)=>{let K=0,Y=[];function Z(){let X=G.read();if(X)q(X);else G.once("readable",Z)}function w(){G.removeListener("end",$),G.removeListener("error",V),G.removeListener("readable",Z)}function $(){w(),C("onend"),Q(Error("Proxy connection ended before receiving CONNECT response"))}function V(X){w(),C("onerror %o",X),Q(X)}function q(X){Y.push(X),K+=X.length;let z=Buffer.concat(Y,K),O=z.indexOf(`\r
|
|
3
|
+
\r
|
|
4
|
+
`);if(O===-1){C("have not received end of HTTP headers yet..."),Z();return}let b=z.slice(0,O).toString("ascii").split(`\r
|
|
5
|
+
`),f=b.shift();if(!f)return G.destroy(),Q(Error("No header received from proxy CONNECT response"));let t=f.split(" "),TG=+t[1],IG=t.slice(2).join(" "),E={};for(let S of b){if(!S)continue;let u=S.indexOf(":");if(u===-1)return G.destroy(),Q(Error(`Invalid header from proxy CONNECT response: "${S}"`));let d=S.slice(0,u).toLowerCase(),l=S.slice(u+1).trimStart(),A=E[d];if(typeof A==="string")E[d]=[A,l];else if(Array.isArray(A))A.push(l);else E[d]=l}C("got proxy server response: %o %o",f,E),w(),J({connect:{statusCode:TG,statusText:IG,headers:E},buffered:z})}G.on("error",V),G.on("end",$),Z()})}var XG,C;var zG=j(()=>{XG=WG(wG(),1),C=XG.default("https-proxy-agent:parse-proxy-response")});function VG(){return async({response:G,scheme:J})=>{if(J.toLowerCase()!=="negotiate")throw Error(`Expected Negotiate scheme but got "${J}"`);let Q;try{Q=await import("kerberos")}catch{throw Error('The "kerberos" package is required for Negotiate proxy authentication. Install it with: npm install kerberos')}let K=G.headers["proxy-authenticate"]||"",Y=Array.isArray(K)?K[0]:K,Z=typeof Y==="string"&&Y.includes(" ")?Y.split(" ").slice(1).join(" "):void 0,$=await(await Q.initializeClient("HTTP@proxy",{mechOID:Q.GSS_MECH_OID_SPNEGO})).step(Z||"");if(!$)throw Error("Kerberos client.step() returned no token");return{headers:{"Proxy-Authorization":`Negotiate ${$}`}}}}var BG=()=>{};import*as M from"net";import*as R from"tls";import LG from"assert";import{URL as DG}from"url";function MG(G){setImmediate(()=>{G.resume()})}function s(G,...J){let Q={},K;for(K in G)if(!J.includes(K))Q[K]=G[K];return Q}var HG,T,k=(G)=>{if(G.servername===void 0&&G.host&&!M.isIP(G.host))return{...G,servername:G.host};return G},x;var qG=j(()=>{$G();zG();BG();HG=WG(wG(),1),T=HG.default("https-proxy-agent");x=class x extends i{constructor(G,J){super(J);if(this.options={path:void 0},this.proxy=typeof G==="string"?new DG(G):G,this.proxyHeaders=J?.headers??{},T("Creating new HttpsProxyAgent instance: %o",this.proxy.href),J?.negotiate)this.onProxyAuth=VG();else if(J?.onProxyAuth)this.onProxyAuth=J.onProxyAuth;let Q=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),K=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...J?s(J,"headers","onProxyAuth","negotiate"):null,host:Q,port:K}}async connect(G,J){let{proxy:Q}=this;if(!J.host)throw TypeError('No "host" provided');let K;if(Q.protocol==="https:")T("Creating `tls.Socket`: %o",this.connectOpts),K=R.connect(k(this.connectOpts));else T("Creating `net.Socket`: %o",this.connectOpts),K=M.connect(this.connectOpts);let Y=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders},Z=M.isIPv6(J.host)?`[${J.host}]`:J.host,w=`CONNECT ${Z}:${J.port} HTTP/1.1\r
|
|
6
|
+
`;if(Q.username||Q.password){let z=`${decodeURIComponent(Q.username)}:${decodeURIComponent(Q.password)}`;Y["Proxy-Authorization"]=`Basic ${Buffer.from(z).toString("base64")}`}if(Y.Host=`${Z}:${J.port}`,!Y["Proxy-Connection"])Y["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let z of Object.keys(Y))w+=`${z}: ${Y[z]}\r
|
|
7
|
+
`;let $=n(K);K.write(`${w}\r
|
|
8
|
+
`);let{connect:V,buffered:q}=await $;if(G.emit("proxyConnect",V),this.emit("proxyConnect",V,G),G.emit("proxy",{proxy:this.proxy.href,socket:K}),V.statusCode===200){if(G.once("socket",MG),J.secureEndpoint)return T("Upgrading socket connection to TLS"),R.connect({...s(k(J),"host","path","port"),socket:K});return K}if(V.statusCode===407&&this.onProxyAuth){T("Got 407 response, invoking onProxyAuth callback"),K.destroy();let z=V.headers["proxy-authenticate"]||"",O=Array.isArray(z)?z[0].split(/\s/)[0]:z.split(/\s/)[0],b=await this.onProxyAuth({response:V,scheme:O});return this._connectWithAuth(G,J,b.headers)}K.destroy();let X=new M.Socket({writable:!1});return X.readable=!0,G.once("socket",(z)=>{T("Replaying proxy buffer for failed request"),LG(z.listenerCount("data")>0),z.push(q),z.push(null)}),X}async _connectWithAuth(G,J,Q){let{proxy:K}=this,Y;if(K.protocol==="https:")Y=R.connect(k(this.connectOpts));else Y=M.connect(this.connectOpts);let Z=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders},w=M.isIPv6(J.host)?`[${J.host}]`:J.host,$=`CONNECT ${w}:${J.port} HTTP/1.1\r
|
|
9
|
+
`;if(K.username||K.password){let X=`${decodeURIComponent(K.username)}:${decodeURIComponent(K.password)}`;Z["Proxy-Authorization"]=`Basic ${Buffer.from(X).toString("base64")}`}if(Object.assign(Z,Q),Z.Host=`${w}:${J.port}`,!Z["Proxy-Connection"])Z["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let X of Object.keys(Z))$+=`${X}: ${Z[X]}\r
|
|
10
|
+
`;let V=n(Y);Y.write(`${$}\r
|
|
11
|
+
`);let{connect:q}=await V;if(G.emit("proxyConnect",q),this.emit("proxyConnect",q,G),q.statusCode===200){if(G.once("socket",MG),J.secureEndpoint)return T("Upgrading socket connection to TLS"),R.connect({...s(k(J),"host","path","port"),socket:Y});return Y}throw Y.destroy(),Error(`Proxy authentication failed with status ${q.statusCode} after retry`)}};x.protocols=["http","https"]});function MJ(G){r.set(G,!0),UG(G)}function UG(G){NG.cache.delete?.(G)}function HJ(G){_G.set(G,!0),UG(G)}function OG(G){return _G.get(G)===!0}function bG(G){switch(G.family){case 0:case 4:case 6:return G.family;case"IPv6":return 6;case"IPv4":case void 0:return 4;default:throw Error(`Unsupported address family: ${G.family}`)}}function I(G=process.env){return G.https_proxy||G.HTTPS_PROXY||G.http_proxy||G.HTTP_PROXY}function AG(G=process.env){return G.no_proxy||G.NO_PROXY}function h(G,J=AG()){if(!J)return!1;if(J==="*")return!0;try{let Q=new URL(G),K=Q.hostname.toLowerCase(),Y=Q.port||(Q.protocol==="https:"||Q.protocol==="wss:"?"443":"80"),Z=`${K}:${Y}`;return J.split(/[,\s]+/).filter(Boolean).some(($)=>{if($=$.toLowerCase().trim(),$.includes(":"))return Z===$;if($.startsWith(".")){let V=$;return K===$.substring(1)||K.endsWith(V)}return K===$})}catch{return!1}}function y(G,J={}){let Q=F(),K=_(),Y={...Q&&{cert:Q.cert,key:Q.key,passphrase:Q.passphrase},...K&&{ca:K}};if(jG(process.env.CLAUDE_CODE_PROXY_RESOLVES_HOSTS))Y.lookup=(Z,w,$)=>{$(null,Z,bG(w))};return new x(G,{...Y,...J})}function qJ(G={}){let J=I(),Q=P(),K=H.create({proxy:!1});if(!J){if(Q)K.defaults.httpsAgent=Q;return K}let Y=y(J,G);return K.interceptors.request.use((Z)=>{if(Z.url&&h(Z.url))Z.httpsAgent=Q,Z.httpAgent=Q;else Z.httpsAgent=Y,Z.httpAgent=Y;return Z}),K}function jJ(G){let J=I();if(!J)return;if(h(G))return;return y(J)}function UJ(G){let J=I();if(!J)return;if(h(G))return;return J}function _J(G){let J=G?.provider&&r.get(G.provider)?{keepalive:!1}:{};if(G?.forAnthropicAPI){let Y=process.env.ANTHROPIC_UNIX_SOCKET;if(Y&&typeof Bun<"u")return{...J,unix:Y}}let Q=I();if(Q){if(typeof Bun<"u")return{...J,proxy:Q,...v()};return{...J,dispatcher:o(Q)}}let K=v();if(G?.provider&&!K.dispatcher)return{...J,...K,dispatcher:NG(G.provider)};return{...J,...K}}function FJ(){let G=I(),J=P();if(m!==void 0)H.interceptors.request.eject(m),m=void 0;if(H.defaults.proxy=void 0,H.defaults.httpAgent=void 0,H.defaults.httpsAgent=void 0,G){H.defaults.proxy=!1;let Q=y(G);m=H.interceptors.request.use((K)=>{if(K.url&&h(K.url))if(J)K.httpsAgent=J,K.httpAgent=J;else delete K.httpsAgent,delete K.httpAgent;else K.httpsAgent=Q,K.httpAgent=Q;return K}),D().setGlobalDispatcher(o(G))}else if(J){H.defaults.httpsAgent=J;let Q=v();if(Q.dispatcher)D().setGlobalDispatcher(Q.dispatcher)}}async function NJ(){let G=I();if(!G)return{};let[{NodeHttpHandler:J},{defaultProvider:Q}]=await Promise.all([import("./index-0.7.0-3qc9y7vs.mjs"),import("./index-0.7.0-p4n8wp5y.mjs")]),K=y(G),Y=new J({httpAgent:K,httpsAgent:K});return{requestHandler:Y,credentials:Q({clientConfig:{requestHandler:Y}})}}function TJ(){o.cache.clear?.(),W("Cleared proxy agent cache")}var r,_G,o,N,FG,PG,NG,m;var vG=j(()=>{RG();qG();g();p();a();GG();KG();r=new Map;_G=new Map;o=U((G)=>{let J=D(),Q=F(),K=_(),Y={httpProxy:G,httpsProxy:G,noProxy:process.env.NO_PROXY||process.env.no_proxy};if(Q||K){let Z={...Q&&{cert:Q.cert,key:Q.key,passphrase:Q.passphrase},...K&&{ca:K}};Y.connect=Z,Y.requestTls=Z}return new J.EnvHttpProxyAgent(Y)}),N={connections:12,keepAliveTimeout:30000,pipelining:1},FG={firstParty:{...N,allowH2:!0},openai:{...N,allowH2:!0},gemini:{...N,allowH2:!0},mistral:{...N,allowH2:!0},github:{...N,allowH2:!0},codex:{...N,allowH2:!0},"nvidia-nim":{...N,allowH2:!0},minimax:{...N,allowH2:!0}},PG=FG.openai,NG=U((G)=>{let J=D(),Q=FG[G]??PG,K={...Q,allowH2:Q.allowH2&&!OG(G),keepAliveTimeout:r.get(G)?100:Q.keepAliveTimeout};return new J.Agent(K)})});
|
|
12
|
+
export{hG as F6,p as G6,F as H6,gG as I6,aG as J6,pG as K6,KG as L6,MJ as M6,HJ as N6,OG as O6,I as P6,h as Q6,qJ as R6,jJ as S6,UJ as T6,_J as U6,FJ as V6,NJ as W6,TJ as X6,vG as Y6};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$E as w,WE as R,XE as E,YE as l,ZE as i,_E as c,aF as O,eF as y,fF as e}from"./cli-0.7.0-7g132rdj.mjs";import{BW as x,CW as s}from"./cli-0.7.0-a7rry8ha.mjs";import{$Y as j,GZ as Q,RX as n,RZ as K,aZ as r,kZ as k,mZ as W}from"./cli-0.7.0-p9q4x3f1.mjs";import{W1 as A,X1 as V,Y1 as D,Z1 as v}from"./cli-0.7.0-wgy69726.mjs";import{_1 as t}from"./cli-0.7.0-asw5nd1q.mjs";import{Vpa as q,Zpa as p}from"./cli-0.7.0-8p56ked8.mjs";function X1(J){let b=S.c(17),{query:$,placeholder:N,isFocused:Z,isTerminalFocused:H,prefix:g,width:P,cursorOffset:_,borderless:Y}=J,G=N===void 0?"Search…":N,h=g===void 0?"⌕":g,L=Y===void 0?!1:Y,B=_??$.length,m=L?void 0:"round",z=Z?"suggestion":void 0,d=!Z,F=L?0:1,T=!Z,X;if(b[0]!==Z||b[1]!==H||b[2]!==B||b[3]!==G||b[4]!==$)X=Z?V(A,{children:$?H?D(A,{children:[V(W,{children:$.slice(0,B)}),V(W,{inverse:!0,children:B<$.length?$[B]:" "}),B<$.length&&V(W,{children:$.slice(B+1)})]}):V(W,{children:$}):H?D(A,{children:[V(W,{inverse:!0,children:G.charAt(0)}),V(W,{dimColor:!0,children:G.slice(1)})]}):V(W,{dimColor:!0,children:G})}):$?V(W,{children:$}):V(W,{children:G}),b[0]=Z,b[1]=H,b[2]=B,b[3]=G,b[4]=$,b[5]=X;else X=b[5];let M;if(b[6]!==h||b[7]!==T||b[8]!==X)M=D(W,{dimColor:T,children:[h," ",X]}),b[6]=h,b[7]=T,b[8]=X,b[9]=M;else M=b[9];let I;if(b[10]!==M||b[11]!==m||b[12]!==z||b[13]!==d||b[14]!==F||b[15]!==P)I=V(k,{flexShrink:0,borderStyle:m,borderColor:z,borderDimColor:d,paddingX:F,width:P,children:M}),b[10]=M,b[11]=m,b[12]=z,b[13]=d,b[14]=F,b[15]=P,b[16]=I;else I=b[16];return I}var S;var u=p(()=>{K();v();S=q(n(),1)});function d1(J){if(J.ctrl&&(J.key==="k"||J.key==="u"||J.key==="w"))return!0;if(J.meta&&J.key==="backspace")return!0;return!1}function T1(J){return(J.ctrl||J.meta)&&J.key==="y"}function W1({isActive:J,onExit:b,onCancel:$,onExitUp:N,columns:Z,passthroughCtrlKeys:H=[],initialQuery:g="",backspaceExitsOnEmpty:P=!0}){let{columns:_}=x(),Y=Z??_,[G,h]=U.useState(g),[L,B]=U.useState(g.length),m=U.useCallback((d)=>{h(d),B(d.length)},[]),z=(d)=>{if(!J)return;let F=y.fromText(G,Y,L);if(d.ctrl&&H.includes(d.key.toLowerCase()))return;if(!d1(d))l();if(!T1(d))O();if(d.key==="return"||d.key==="down"){d.preventDefault(),b();return}if(d.key==="up"){if(d.preventDefault(),N)N();return}if(d.key==="escape"){if(d.preventDefault(),$)$();else if(G.length>0)h(""),B(0);else b();return}if(d.key==="backspace"){if(d.preventDefault(),d.meta){let{cursor:X,killed:M}=F.deleteWordBefore();R(M,"prepend"),h(X.text),B(X.offset);return}if(G.length===0){if(P)($??b)();return}let T=F.backspace();h(T.text),B(T.offset);return}if(d.key==="delete"){d.preventDefault();let T=F.del();h(T.text),B(T.offset);return}if(d.key==="left"&&(d.ctrl||d.meta||d.fn)){d.preventDefault();let T=F.prevWord();B(T.offset);return}if(d.key==="right"&&(d.ctrl||d.meta||d.fn)){d.preventDefault();let T=F.nextWord();B(T.offset);return}if(d.key==="left"){d.preventDefault();let T=F.left();B(T.offset);return}if(d.key==="right"){d.preventDefault();let T=F.right();B(T.offset);return}if(d.key==="home"){d.preventDefault(),B(0);return}if(d.key==="end"){d.preventDefault(),B(G.length);return}if(d.ctrl){switch(d.preventDefault(),d.key.toLowerCase()){case"a":B(0);return;case"e":B(G.length);return;case"b":B(F.left().offset);return;case"f":B(F.right().offset);return;case"d":{if(G.length===0){($??b)();return}let T=F.del();h(T.text),B(T.offset);return}case"h":{if(G.length===0){if(P)($??b)();return}let T=F.backspace();h(T.text),B(T.offset);return}case"k":{let{cursor:T,killed:X}=F.deleteToLineEnd();R(X,"append"),h(T.text),B(T.offset);return}case"u":{let{cursor:T,killed:X}=F.deleteToLineStart();R(X,"prepend"),h(T.text),B(T.offset);return}case"w":{let{cursor:T,killed:X}=F.deleteWordBefore();R(X,"prepend"),h(T.text),B(T.offset);return}case"y":{let T=E();if(T.length>0){let X=F.offset,M=F.insert(T);i(X,T.length),h(M.text),B(M.offset)}return}case"g":case"c":if($){$();return}}return}if(d.meta){switch(d.preventDefault(),d.key.toLowerCase()){case"b":B(F.prevWord().offset);return;case"f":B(F.nextWord().offset);return;case"d":{let T=F.deleteWordAfter();h(T.text),B(T.offset);return}case"y":{let T=c();if(T){let{text:X,start:M,length:I}=T,f=G.slice(0,M),a=G.slice(M+I),C=f+X+a,o=M+X.length;w(X.length),h(C),B(o)}return}}return}if(d.key==="tab")return;if(d.key.length>=1&&!b1.has(d.key)){d.preventDefault();let T=F.insert(d.key);h(T.text),B(T.offset)}};return Q((d,F,T)=>{z(new j(T.keypress))},{isActive:J}),{query:G,setQuery:m,cursorOffset:L,handleKeyDown:z}}var U,b1;var B1=p(()=>{r();K();e();s();U=q(t(),1);b1=new Set(["pageup","pagedown","insert","wheelup","wheeldown","mouse","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"])});
|
|
2
|
+
export{X1 as Zg,u as _g,W1 as $g,B1 as ah};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L8 as Z,N8 as f,_da as B,bea as K,qda as $,rda as y}from"./cli-0.7.0-h6kfhzzd.mjs";import{Fia as Y,Nia as E}from"./cli-0.7.0-na9s209m.mjs";import{Zpa as N,_pa as x}from"./cli-0.7.0-8p56ked8.mjs";import{existsSync as S}from"node:fs";import{homedir as F}from"node:os";import{join as X}from"node:path";function _(){if(Y())return;try{return $().read()?.gemini?.accessToken?.trim()||void 0}catch{return}}function J(b){let w=b?.trim();return w?w:void 0}function V(b=process.env){return J(b.GOOGLE_CLOUD_PROJECT)??J(b.GCLOUD_PROJECT)??J(b.GOOGLE_PROJECT_ID)}function D(b=process.env){let w=J(b.GEMINI_AUTH_MODE)?.toLowerCase();if(w==="api-key"||w==="access-token"||w==="adc")return w;return}function P(b=process.env){let w=J(b.GOOGLE_APPLICATION_CREDENTIALS),q=new Set;if(w)q.add(w);q.add(X(F(),".config","gcloud","application_default_credentials.json"));let O=J(b.APPDATA);if(O)q.add(X(O,"gcloud","application_default_credentials.json"));return[...q]}function k(b=process.env){return P(b).some((w)=>S(w))}function G(b){if(typeof b==="string")return J(b);return J(b?.token)}async function A(){let{GoogleAuth:b}=await import("google-auth-library");return new b({scopes:[z]})}async function L(b,w){if(!k(b))return{kind:"none"};try{let q=await(w.createGoogleAuth??A)(),O=await q.getClient(),R=G(await O.getAccessToken());if(!R)return{kind:"none"};let Q=V(b)??(typeof q.getProjectId==="function"?J(await q.getProjectId().catch(()=>{return})):void 0);return{kind:"adc",credential:R,...Q?{projectId:Q}:{}}}catch{return{kind:"none"}}}async function s(b=process.env,w={}){let q=D(b),O=B(),R=O?.transport==="gemini"?J(O.apiKey):void 0,U=q==="access-token"||q==="adc"?void 0:R;if(U&&(q===void 0||q==="api-key"))return{kind:"api-key",credential:U};let Q=q==="api-key"||q==="adc"?void 0:J(_());if(Q&&(q===void 0||q==="access-token")){let W=V(b);return{kind:"access-token",credential:Q,...W?{projectId:W}:{}}}if(q==="api-key"||q==="access-token")return{kind:"none"};if(w.createGoogleAuth)return L(b,w);return T(J(b.GOOGLE_APPLICATION_CREDENTIALS),J(b.APPDATA),F(),V(b))}var z="https://www.googleapis.com/auth/cloud-platform",C=300000,T;var g=N(()=>{K();E();f();y();T=Z(async(b,w,q,O)=>L({GOOGLE_APPLICATION_CREDENTIALS:b,APPDATA:w,GOOGLE_CLOUD_PROJECT:O,GCLOUD_PROJECT:O,GOOGLE_PROJECT_ID:O,HOME:q},{}),C)});
|
|
2
|
+
export{D as ni,s as oi,g as pi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ypa as x,Zpa as z}from"./cli-0.7.0-8p56ked8.mjs";var H={};x(H,{toInfraSessionId:()=>G,toCompatSessionId:()=>F,setCseShimGate:()=>A});function A(j){q=j}function F(j){if(!j.startsWith("cse_"))return j;if(q&&!q())return j;return"session_"+j.slice(4)}function G(j){if(!j.startsWith("session_"))return j;return"cse_"+j.slice(8)}var q;var J=()=>{};
|
|
2
|
+
export{A as P0,F as Q0,G as R0,H as S0,J as T0};
|