@claudiolabs/claudin 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AgentTool-1.0.17-5sh00rvp.mjs +1 -0
- package/dist/chunks/App-1.0.17-21x955nf.mjs +1 -0
- package/dist/chunks/ApproveApiKey-1.0.17-v9qwnks3.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-1.0.17-7fhpba7s.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-1.0.17-1f2htb8d.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-1.0.17-f0sxwzjz.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.17-3vym5r13.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-1.0.17-zm43ebg6.mjs +1 -0
- package/dist/chunks/DiffDialog-1.0.17-4tms55j9.mjs +7 -0
- package/dist/chunks/Doctor-1.0.17-t06djmxa.mjs +1 -0
- package/dist/chunks/ExplorerDialog-1.0.17-70s33s8m.mjs +6 -0
- package/dist/chunks/Grove-1.0.17-yjm80k3b.mjs +1 -0
- package/dist/chunks/ITermBackend-1.0.17-9m0b17d2.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-1.0.17-emahg4dz.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-1.0.17-c6e0v6c3.mjs +1 -0
- package/dist/chunks/MigrationDialog-1.0.17-c7bybvmz.mjs +1 -0
- package/dist/chunks/Onboarding-1.0.17-b8ejyr1p.mjs +1 -0
- package/dist/chunks/ProviderManager-1.0.17-p0r1dne9.mjs +1 -0
- package/dist/chunks/REPL-1.0.17-wgem7h01.mjs +1 -0
- package/dist/chunks/ResumeConversation-1.0.17-bjzzhjqs.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-1.0.17-k7x0a14y.mjs +1 -0
- package/dist/chunks/TeleportProgress-1.0.17-an8ph2xk.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-1.0.17-tsxxhwhb.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-1.0.17-ktxtd7sf.mjs +1 -0
- package/dist/chunks/TmuxBackend-1.0.17-ffkbx4sp.mjs +9 -0
- package/dist/chunks/ToolSearchTool-1.0.17-x1hvw496.mjs +1 -0
- package/dist/chunks/TrustDialog-1.0.17-3k9jkx42.mjs +1 -0
- package/dist/chunks/activeProvider-1.0.17-3ndd66y9.mjs +1 -0
- package/dist/chunks/add-dir-1.0.17-c4r7f3at.mjs +1 -0
- package/dist/chunks/agentTypes-1.0.17-neqgdzv4.mjs +1 -0
- package/dist/chunks/agents-1.0.17-s7nhde9z.mjs +110 -0
- package/dist/chunks/agents-1.0.17-sfz2xbbe.mjs +3 -0
- package/dist/chunks/api-1.0.17-wawrdq5e.mjs +1 -0
- package/dist/chunks/asciicast-1.0.17-x1k7s3xe.mjs +1 -0
- package/dist/chunks/assistant-1.0.17-j9qj4tcs.mjs +1 -0
- package/dist/chunks/auth-1.0.17-31h7x8d1.mjs +1 -0
- package/dist/chunks/auth-1.0.17-mm386118.mjs +1 -0
- package/dist/chunks/autoMode-1.0.17-tqqmwaya.mjs +48 -0
- package/dist/chunks/autoUpdater-1.0.17-wyfmhbnx.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-1.0.17-10bcwm4v.mjs +1 -0
- package/dist/chunks/branch-1.0.17-k80de7gn.mjs +4 -0
- package/dist/chunks/bridge-1.0.17-tcs32wqn.mjs +2 -0
- package/dist/chunks/bridgeConfig-1.0.17-fw6mj0cy.mjs +1 -0
- package/dist/chunks/bridgeEnabled-1.0.17-3j84y5ft.mjs +1 -0
- package/dist/chunks/bridgeMain-1.0.17-2fm7fkaf.mjs +88 -0
- package/dist/chunks/bridgePointer-1.0.17-16f5ek10.mjs +1 -0
- package/dist/chunks/btw-1.0.17-jx41dad0.mjs +1 -0
- package/dist/chunks/buddy-1.0.17-845ax733.mjs +3 -0
- package/dist/chunks/cacache-1.0.17-b2nj6hfy.mjs +1 -0
- package/dist/chunks/cache-probe-1.0.17-zwhwxqas.mjs +21 -0
- package/dist/chunks/cacheStats-1.0.17-ryzxdsqt.mjs +4 -0
- package/dist/chunks/caches-1.0.17-11t05bjz.mjs +1 -0
- package/dist/chunks/claudeDesktop-1.0.17-53efpe93.mjs +1 -0
- package/dist/chunks/claudemd-1.0.17-zse4k4wj.mjs +1 -0
- package/dist/chunks/clear-1.0.17-jk7fy20t.mjs +1 -0
- package/dist/chunks/clearTerminal-1.0.17-3veatmfp.mjs +1 -0
- package/dist/chunks/cli-1.0.17-04mwr39a.mjs +2 -0
- package/dist/chunks/cli-1.0.17-05v12vep.mjs +2 -0
- package/dist/chunks/cli-1.0.17-082vgztb.mjs +6 -0
- package/dist/chunks/cli-1.0.17-0g7kgsx0.mjs +2 -0
- package/dist/chunks/cli-1.0.17-0gwvjedx.mjs +2 -0
- package/dist/chunks/cli-1.0.17-0h68yp5q.mjs +2 -0
- package/dist/chunks/cli-1.0.17-0h8rgkqn.mjs +18 -0
- package/dist/chunks/cli-1.0.17-0r3rrjqs.mjs +2 -0
- package/dist/chunks/cli-1.0.17-10rqsvs2.mjs +2 -0
- package/dist/chunks/cli-1.0.17-142ww3xz.mjs +67 -0
- package/dist/chunks/cli-1.0.17-182fckgj.mjs +2 -0
- package/dist/chunks/cli-1.0.17-1ay7n4n5.mjs +2 -0
- package/dist/chunks/cli-1.0.17-1d9ccn16.mjs +2 -0
- package/dist/chunks/cli-1.0.17-1gh241a0.mjs +50 -0
- package/dist/chunks/cli-1.0.17-1nnc1g3f.mjs +2 -0
- package/dist/chunks/cli-1.0.17-1ptwye5c.mjs +25 -0
- package/dist/chunks/cli-1.0.17-1w8t10bs.mjs +59 -0
- package/dist/chunks/cli-1.0.17-1ycfrbcz.mjs +133 -0
- package/dist/chunks/cli-1.0.17-1yj54t22.mjs +2 -0
- package/dist/chunks/cli-1.0.17-23znd3er.mjs +2 -0
- package/dist/chunks/cli-1.0.17-28rys8n5.mjs +2 -0
- package/dist/chunks/cli-1.0.17-2c5rzypz.mjs +2 -0
- package/dist/chunks/cli-1.0.17-2f86ehqm.mjs +2 -0
- package/dist/chunks/cli-1.0.17-2jt2w5sh.mjs +42 -0
- package/dist/chunks/cli-1.0.17-2mdpd30s.mjs +3 -0
- package/dist/chunks/cli-1.0.17-2yxp2sz6.mjs +2 -0
- package/dist/chunks/cli-1.0.17-3939hx4x.mjs +2 -0
- package/dist/chunks/cli-1.0.17-3ba3vg5e.mjs +6 -0
- package/dist/chunks/cli-1.0.17-3dm1st8c.mjs +4 -0
- package/dist/chunks/cli-1.0.17-46tr5weq.mjs +2 -0
- package/dist/chunks/cli-1.0.17-472de7yw.mjs +2 -0
- package/dist/chunks/cli-1.0.17-4dka7p1w.mjs +3 -0
- package/dist/chunks/cli-1.0.17-4e7wpg9g.mjs +2 -0
- package/dist/chunks/cli-1.0.17-4ppbs89h.mjs +2 -0
- package/dist/chunks/cli-1.0.17-4prxa3t4.mjs +2 -0
- package/dist/chunks/cli-1.0.17-4qh79bzg.mjs +2 -0
- package/dist/chunks/cli-1.0.17-5g9z2hnd.mjs +2 -0
- package/dist/chunks/cli-1.0.17-5j5603y3.mjs +2 -0
- package/dist/chunks/cli-1.0.17-5jrh9pw3.mjs +6 -0
- package/dist/chunks/cli-1.0.17-5my2a6t5.mjs +2 -0
- package/dist/chunks/cli-1.0.17-5wvqpfzb.mjs +4 -0
- package/dist/chunks/cli-1.0.17-6amam79j.mjs +4 -0
- package/dist/chunks/cli-1.0.17-6gqj4d8v.mjs +2 -0
- package/dist/chunks/cli-1.0.17-6hxscz8d.mjs +2 -0
- package/dist/chunks/cli-1.0.17-6ty7z7jt.mjs +2 -0
- package/dist/chunks/cli-1.0.17-70a54p8v.mjs +2 -0
- package/dist/chunks/cli-1.0.17-7ngvd609.mjs +2 -0
- package/dist/chunks/cli-1.0.17-7p5c1h67.mjs +2 -0
- package/dist/chunks/cli-1.0.17-89k0njkm.mjs +2 -0
- package/dist/chunks/cli-1.0.17-89p1ntv1.mjs +4 -0
- package/dist/chunks/cli-1.0.17-8c9eadan.mjs +2 -0
- package/dist/chunks/cli-1.0.17-8f71d8ge.mjs +2 -0
- package/dist/chunks/cli-1.0.17-8gd4gtyj.mjs +39 -0
- package/dist/chunks/cli-1.0.17-8h47dvj2.mjs +12 -0
- package/dist/chunks/cli-1.0.17-8jrync3y.mjs +2 -0
- package/dist/chunks/cli-1.0.17-8r1zjpkg.mjs +2 -0
- package/dist/chunks/cli-1.0.17-8tbkxnj4.mjs +2 -0
- package/dist/chunks/cli-1.0.17-8vch8btt.mjs +2 -0
- package/dist/chunks/cli-1.0.17-926g8p8g.mjs +2 -0
- package/dist/chunks/cli-1.0.17-95kcmvj1.mjs +2 -0
- package/dist/chunks/cli-1.0.17-9868wetk.mjs +2 -0
- package/dist/chunks/cli-1.0.17-9kwckjes.mjs +15 -0
- package/dist/chunks/cli-1.0.17-9xr21bd5.mjs +45 -0
- package/dist/chunks/cli-1.0.17-a0qpbbgx.mjs +2 -0
- package/dist/chunks/cli-1.0.17-a49frejp.mjs +2 -0
- package/dist/chunks/cli-1.0.17-a6mc44b2.mjs +4 -0
- package/dist/chunks/cli-1.0.17-a77fqcz9.mjs +2 -0
- package/dist/chunks/cli-1.0.17-a8nd0nw1.mjs +15 -0
- package/dist/chunks/cli-1.0.17-a9k3xfma.mjs +25 -0
- package/dist/chunks/cli-1.0.17-ah6z554b.mjs +2 -0
- package/dist/chunks/cli-1.0.17-amskbazt.mjs +2 -0
- package/dist/chunks/cli-1.0.17-at0j3482.mjs +2 -0
- package/dist/chunks/cli-1.0.17-awxt5jcy.mjs +2 -0
- package/dist/chunks/cli-1.0.17-b7zgt5wj.mjs +2 -0
- package/dist/chunks/cli-1.0.17-b91m27j2.mjs +2 -0
- package/dist/chunks/cli-1.0.17-bbq31y7a.mjs +9 -0
- package/dist/chunks/cli-1.0.17-bheyzxzm.mjs +2 -0
- package/dist/chunks/cli-1.0.17-bmw1t0t6.mjs +58 -0
- package/dist/chunks/cli-1.0.17-bner2z30.mjs +16 -0
- package/dist/chunks/cli-1.0.17-bnex4nm7.mjs +6 -0
- package/dist/chunks/cli-1.0.17-btwwqyqt.mjs +2 -0
- package/dist/chunks/cli-1.0.17-bwt7gr42.mjs +5 -0
- package/dist/chunks/cli-1.0.17-bxwv0g41.mjs +7 -0
- package/dist/chunks/cli-1.0.17-bzn05jd6.mjs +2 -0
- package/dist/chunks/cli-1.0.17-c4mj41az.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ca7kkyhc.mjs +2 -0
- package/dist/chunks/cli-1.0.17-cavdar8z.mjs +2 -0
- package/dist/chunks/cli-1.0.17-cd9q5wvd.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ctfz7aky.mjs +2 -0
- package/dist/chunks/cli-1.0.17-cxy5w8mx.mjs +2 -0
- package/dist/chunks/cli-1.0.17-dc668fev.mjs +2 -0
- package/dist/chunks/cli-1.0.17-dfb76sxr.mjs +2 -0
- package/dist/chunks/cli-1.0.17-dgjmb848.mjs +3 -0
- package/dist/chunks/cli-1.0.17-dpms71sy.mjs +4 -0
- package/dist/chunks/cli-1.0.17-dss95ag9.mjs +6 -0
- package/dist/chunks/cli-1.0.17-dyrqnbfs.mjs +2 -0
- package/dist/chunks/cli-1.0.17-e4mt36cj.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ea8m8v7k.mjs +133 -0
- package/dist/chunks/cli-1.0.17-ecr8sjr9.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ee1sf1f4.mjs +2 -0
- package/dist/chunks/cli-1.0.17-emxxxrjh.mjs +2 -0
- package/dist/chunks/cli-1.0.17-erbfjxqt.mjs +2 -0
- package/dist/chunks/cli-1.0.17-es1tv25a.mjs +2 -0
- package/dist/chunks/cli-1.0.17-esydm78q.mjs +2 -0
- package/dist/chunks/cli-1.0.17-f5mwgpmm.mjs +2 -0
- package/dist/chunks/cli-1.0.17-fgbyxz18.mjs +3 -0
- package/dist/chunks/cli-1.0.17-fjz6hvrb.mjs +9 -0
- package/dist/chunks/cli-1.0.17-fkqttg24.mjs +24 -0
- package/dist/chunks/cli-1.0.17-fm4473vw.mjs +2 -0
- package/dist/chunks/cli-1.0.17-gch1jsbe.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ge11eg68.mjs +3 -0
- package/dist/chunks/cli-1.0.17-gwqztngk.mjs +2 -0
- package/dist/chunks/cli-1.0.17-gy47n7qj.mjs +2 -0
- package/dist/chunks/cli-1.0.17-h101c40b.mjs +2 -0
- package/dist/chunks/cli-1.0.17-h3jp181w.mjs +20 -0
- package/dist/chunks/cli-1.0.17-h4w6a4d1.mjs +3 -0
- package/dist/chunks/cli-1.0.17-h6b518v1.mjs +2 -0
- package/dist/chunks/cli-1.0.17-hb445h5r.mjs +2 -0
- package/dist/chunks/cli-1.0.17-hbqxdxv2.mjs +2 -0
- package/dist/chunks/cli-1.0.17-hc0snvws.mjs +2 -0
- package/dist/chunks/cli-1.0.17-hh90k4js.mjs +2 -0
- package/dist/chunks/cli-1.0.17-hswqk374.mjs +12 -0
- package/dist/chunks/cli-1.0.17-hxyavaae.mjs +2 -0
- package/dist/chunks/cli-1.0.17-hzag9kre.mjs +2 -0
- package/dist/chunks/cli-1.0.17-j526q1y7.mjs +2 -0
- package/dist/chunks/cli-1.0.17-j5qmnveg.mjs +2 -0
- package/dist/chunks/cli-1.0.17-jfarzka9.mjs +18 -0
- package/dist/chunks/cli-1.0.17-jfrx870z.mjs +3 -0
- package/dist/chunks/cli-1.0.17-jktkjeyp.mjs +2 -0
- package/dist/chunks/cli-1.0.17-jze67k48.mjs +2 -0
- package/dist/chunks/cli-1.0.17-k165z3yw.mjs +4 -0
- package/dist/chunks/cli-1.0.17-k27bgcpe.mjs +2 -0
- package/dist/chunks/cli-1.0.17-k3xz0fme.mjs +21 -0
- package/dist/chunks/cli-1.0.17-ka8tc4xj.mjs +4 -0
- package/dist/chunks/cli-1.0.17-kn7c19b9.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ksmypgky.mjs +202 -0
- package/dist/chunks/cli-1.0.17-kxfqzcbd.mjs +2 -0
- package/dist/chunks/cli-1.0.17-m2mr0t1a.mjs +2 -0
- package/dist/chunks/cli-1.0.17-m52g3sxg.mjs +17 -0
- package/dist/chunks/cli-1.0.17-m59cbaf4.mjs +5 -0
- package/dist/chunks/cli-1.0.17-m983tex6.mjs +2 -0
- package/dist/chunks/cli-1.0.17-mf9k8ee9.mjs +2 -0
- package/dist/chunks/cli-1.0.17-mhmktnkz.mjs +2 -0
- package/dist/chunks/cli-1.0.17-mk4ctspx.mjs +2 -0
- package/dist/chunks/cli-1.0.17-mnsjbqs4.mjs +2 -0
- package/dist/chunks/cli-1.0.17-mzzfvdfd.mjs +2 -0
- package/dist/chunks/cli-1.0.17-n6v9ztev.mjs +2 -0
- package/dist/chunks/cli-1.0.17-nf9nfc0r.mjs +2 -0
- package/dist/chunks/cli-1.0.17-nkg0ctrj.mjs +2 -0
- package/dist/chunks/cli-1.0.17-park9sag.mjs +3 -0
- package/dist/chunks/cli-1.0.17-pfwa4tne.mjs +2 -0
- package/dist/chunks/cli-1.0.17-pkj16tyk.mjs +2 -0
- package/dist/chunks/cli-1.0.17-pzebvptb.mjs +2 -0
- package/dist/chunks/cli-1.0.17-qadydg9v.mjs +15 -0
- package/dist/chunks/cli-1.0.17-qde4391n.mjs +2 -0
- package/dist/chunks/cli-1.0.17-qnyqadyd.mjs +3 -0
- package/dist/chunks/cli-1.0.17-qx980gch.mjs +5637 -0
- package/dist/chunks/cli-1.0.17-r5sxt70v.mjs +4 -0
- package/dist/chunks/cli-1.0.17-rev3s74x.mjs +4 -0
- package/dist/chunks/cli-1.0.17-rhsj77ax.mjs +12 -0
- package/dist/chunks/cli-1.0.17-rp4pr56x.mjs +2 -0
- package/dist/chunks/cli-1.0.17-rpm2778d.mjs +2 -0
- package/dist/chunks/cli-1.0.17-rq8fyqe6.mjs +2 -0
- package/dist/chunks/cli-1.0.17-rsrbhcgg.mjs +2 -0
- package/dist/chunks/cli-1.0.17-s87gh0xy.mjs +2 -0
- package/dist/chunks/cli-1.0.17-sdwcavah.mjs +2 -0
- package/dist/chunks/cli-1.0.17-svhv399t.mjs +2 -0
- package/dist/chunks/cli-1.0.17-sxwsnjkf.mjs +2 -0
- package/dist/chunks/cli-1.0.17-t3a6qmnj.mjs +2 -0
- package/dist/chunks/cli-1.0.17-tq56x0z7.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ttnq9eyz.mjs +2 -0
- package/dist/chunks/cli-1.0.17-v39zqb3q.mjs +12 -0
- package/dist/chunks/cli-1.0.17-v42jc8b6.mjs +2 -0
- package/dist/chunks/cli-1.0.17-v7gbw6nc.mjs +2 -0
- package/dist/chunks/cli-1.0.17-verxvj0s.mjs +2 -0
- package/dist/chunks/cli-1.0.17-vg1egngy.mjs +2 -0
- package/dist/chunks/cli-1.0.17-vjz0mgdc.mjs +2 -0
- package/dist/chunks/cli-1.0.17-w221edm9.mjs +2 -0
- package/dist/chunks/cli-1.0.17-w335kv69.mjs +2 -0
- package/dist/chunks/cli-1.0.17-wbr7f7wj.mjs +2 -0
- package/dist/chunks/cli-1.0.17-wm0z0tn9.mjs +24 -0
- package/dist/chunks/cli-1.0.17-wp8wyvc5.mjs +34 -0
- package/dist/chunks/cli-1.0.17-wqrh69a1.mjs +8 -0
- package/dist/chunks/cli-1.0.17-x0khsc7b.mjs +2 -0
- package/dist/chunks/cli-1.0.17-xc8m08gx.mjs +2 -0
- package/dist/chunks/cli-1.0.17-xhvs9ddb.mjs +2 -0
- package/dist/chunks/cli-1.0.17-xvntbm80.mjs +3 -0
- package/dist/chunks/cli-1.0.17-xvt8srd0.mjs +2 -0
- package/dist/chunks/cli-1.0.17-y24xrbmn.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ya2pc5rh.mjs +1 -0
- package/dist/chunks/cli-1.0.17-yhm1j87y.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ykztjshc.mjs +2 -0
- package/dist/chunks/cli-1.0.17-ysbbhgx7.mjs +2 -0
- package/dist/chunks/cli-1.0.17-yt9x63kq.mjs +17 -0
- package/dist/chunks/cli-1.0.17-ytcs4408.mjs +2 -0
- package/dist/chunks/cli-1.0.17-z313h4h8.mjs +3 -0
- package/dist/chunks/cli-1.0.17-zjtvw594.mjs +18 -0
- package/dist/chunks/cli-1.0.17-znwer2mk.mjs +3 -0
- package/dist/chunks/cli-1.0.17-zsbjcta9.mjs +2 -0
- package/dist/chunks/cli-1.0.17-zw7pcdw5.mjs +4 -0
- package/dist/chunks/cli-1.0.17-zxmxc807.mjs +2 -0
- package/dist/chunks/cli-1.0.17-zzy8pydb.mjs +24 -0
- package/dist/chunks/client-1.0.17-xqf28e2z.mjs +1 -0
- package/dist/chunks/color-1.0.17-x7gy4qsg.mjs +1 -0
- package/dist/chunks/compact-1.0.17-ntr0k3c1.mjs +3 -0
- package/dist/chunks/config-1.0.17-1bmax1k6.mjs +1 -0
- package/dist/chunks/config-1.0.17-wg2z9bvt.mjs +1 -0
- package/dist/chunks/constants-1.0.17-9g1fvd9s.mjs +1 -0
- package/dist/chunks/context-1.0.17-798z8a9c.mjs +1 -0
- package/dist/chunks/context-noninteractive-1.0.17-fbqqqy1k.mjs +1 -0
- package/dist/chunks/conversation-1.0.17-dh2k9gmk.mjs +1 -0
- package/dist/chunks/copilotHeaders-1.0.17-ztn0cqk4.mjs +1 -0
- package/dist/chunks/copy-1.0.17-74hpmk8e.mjs +9 -0
- package/dist/chunks/cost-1.0.17-edvv39jq.mjs +1 -0
- package/dist/chunks/createSSHSession-1.0.17-9vy9wmd2.mjs +1 -0
- package/dist/chunks/createSession-1.0.17-6ethfgt5.mjs +1 -0
- package/dist/chunks/debug-1.0.17-ka59nr0k.mjs +1 -0
- package/dist/chunks/defaultActionDeps-1.0.17-pa1y8kd6.mjs +1446 -0
- package/dist/chunks/desktop-1.0.17-31m1etzm.mjs +1 -0
- package/dist/chunks/detectRepository-1.0.17-8pz5azd8.mjs +1 -0
- package/dist/chunks/detection-1.0.17-3evcsm4n.mjs +1 -0
- package/dist/chunks/diff-1.0.17-gh9asnv7.mjs +1 -0
- package/dist/chunks/doctor-1.0.17-dk3s21ty.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-1.0.17-31t5hgcb.mjs +1 -0
- package/dist/chunks/earlyInput-1.0.17-t706682g.mjs +1 -0
- package/dist/chunks/effort-1.0.17-qdecy5rp.mjs +10 -0
- package/dist/chunks/engine-1.0.17-1h34mzj4.mjs +1 -0
- package/dist/chunks/envLessBridgeConfig-1.0.17-ae0j9tej.mjs +1 -0
- package/dist/chunks/envUtils-1.0.17-3wpvqsah.mjs +1 -0
- package/dist/chunks/environmentSelection-1.0.17-n74jjawy.mjs +1 -0
- package/dist/chunks/environments-1.0.17-5cwk3b85.mjs +1 -0
- package/dist/chunks/errors-1.0.17-7m26fq8r.mjs +1 -0
- package/dist/chunks/exampleCommands-1.0.17-gva1ra1c.mjs +1 -0
- package/dist/chunks/execFileNoThrow-1.0.17-f7g2n79t.mjs +1 -0
- package/dist/chunks/exit-1.0.17-js0a6tr5.mjs +1 -0
- package/dist/chunks/explorer-1.0.17-0tsv1eaz.mjs +1 -0
- package/dist/chunks/export-1.0.17-y5w7ttdw.mjs +2 -0
- package/dist/chunks/extra-usage-1.0.17-ws6dsej0.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-1.0.17-9fqc29gm.mjs +1 -0
- package/dist/chunks/fast-1.0.17-bz8x0afk.mjs +1 -0
- package/dist/chunks/feedback-1.0.17-t3m4hybn.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-1.0.17-avapd2qj.mjs +1 -0
- package/dist/chunks/git-1.0.17-dp3j8z22.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-1.0.17-kp29gxmn.mjs +1 -0
- package/dist/chunks/goal-1.0.17-gs6qz9xz.mjs +4 -0
- package/dist/chunks/grove-1.0.17-g1jrnrfa.mjs +1 -0
- package/dist/chunks/growthbook-1.0.17-c150q3q5.mjs +1 -0
- package/dist/chunks/headless-1.0.17-3s0pbnt1.mjs +2 -0
- package/dist/chunks/heapdump-1.0.17-7w56g33y.mjs +6 -0
- package/dist/chunks/help-1.0.17-t0jyya03.mjs +1 -0
- package/dist/chunks/hookChains-1.0.17-8hq9yg68.mjs +3 -0
- package/dist/chunks/hooks-1.0.17-75bzpsfq.mjs +1 -0
- package/dist/chunks/hooks-1.0.17-vkahmdgs.mjs +79 -0
- package/dist/chunks/ide-1.0.17-yy904k1k.mjs +3 -0
- package/dist/chunks/image-processor-napi-1.0.17-6faqb25d.mjs +1 -0
- package/dist/chunks/inboundAttachments-1.0.17-tk5xd5n5.mjs +1 -0
- package/dist/chunks/index-1.0.17-3x8p135j.mjs +9 -0
- package/dist/chunks/index-1.0.17-3xzthc12.mjs +1 -0
- package/dist/chunks/index-1.0.17-4hbew0jj.mjs +1 -0
- package/dist/chunks/index-1.0.17-63rw94pj.mjs +1 -0
- package/dist/chunks/index-1.0.17-6sz8n41b.mjs +30 -0
- package/dist/chunks/index-1.0.17-7kafj1wr.mjs +1 -0
- package/dist/chunks/index-1.0.17-8bzj2r89.mjs +1 -0
- package/dist/chunks/index-1.0.17-94k1v6vk.mjs +1 -0
- package/dist/chunks/index-1.0.17-anafdqwk.mjs +2 -0
- package/dist/chunks/index-1.0.17-bmrkyghv.mjs +1 -0
- package/dist/chunks/index-1.0.17-f1kag1j2.mjs +1 -0
- package/dist/chunks/index-1.0.17-fm1dtwyv.mjs +1 -0
- package/dist/chunks/index-1.0.17-htkh5gz1.mjs +1 -0
- package/dist/chunks/index-1.0.17-kbm6jjth.mjs +1 -0
- package/dist/chunks/index-1.0.17-mwn9khh9.mjs +1 -0
- package/dist/chunks/index-1.0.17-r5cma447.mjs +17 -0
- package/dist/chunks/index-1.0.17-rqt631c5.mjs +5 -0
- package/dist/chunks/index-1.0.17-rzz9jfsj.mjs +1 -0
- package/dist/chunks/index-1.0.17-s1j2b6vq.mjs +1 -0
- package/dist/chunks/index-1.0.17-vsgqkee9.mjs +1 -0
- package/dist/chunks/index-1.0.17-ym2rj6bp.mjs +9 -0
- package/dist/chunks/index-1.0.17-z2zgermv.mjs +2 -0
- package/dist/chunks/index-1.0.17-zh9afr9s.mjs +1 -0
- package/dist/chunks/init-1.0.17-fz0hn5sx.mjs +1 -0
- package/dist/chunks/initReplBridge-1.0.17-3r8ea310.mjs +1 -0
- package/dist/chunks/ink-1.0.17-rp7215qx.mjs +1 -0
- package/dist/chunks/insights-1.0.17-q6rck59k.mjs +870 -0
- package/dist/chunks/install-1.0.17-6080qjjr.mjs +1 -0
- package/dist/chunks/install-github-app-1.0.17-z7kv0v60.mjs +149 -0
- package/dist/chunks/install-slack-app-1.0.17-gm26km9g.mjs +1 -0
- package/dist/chunks/instrumentation-1.0.17-jzxwt5er.mjs +1 -0
- package/dist/chunks/interactiveHelpers-1.0.17-w48vtvtz.mjs +1 -0
- package/dist/chunks/keybindings-1.0.17-x6tbbf7w.mjs +2 -0
- package/dist/chunks/knowledge-1.0.17-bfrdctvr.mjs +2 -0
- package/dist/chunks/latestVersionCache-1.0.17-6henz973.mjs +1 -0
- package/dist/chunks/loadAgentsDir-1.0.17-n60qxn26.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.0.17-8tqx0pdk.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.0.17-wav55dek.mjs +1 -0
- package/dist/chunks/log-1.0.17-j1rv6dsh.mjs +1 -0
- package/dist/chunks/main-1.0.17-h4k1en4r.mjs +1 -0
- package/dist/chunks/managedEnv-1.0.17-nt7nm12j.mjs +1 -0
- package/dist/chunks/mcp-1.0.17-23ggaedw.mjs +17 -0
- package/dist/chunks/mcp-1.0.17-jj7xfnfe.mjs +4 -0
- package/dist/chunks/mcp-1.0.17-z4984caf.mjs +1 -0
- package/dist/chunks/mcpb-1.0.17-bhsxvq63.mjs +1 -0
- package/dist/chunks/memory-1.0.17-yt68v7ap.mjs +72 -0
- package/dist/chunks/model-1.0.17-aeyz5p9p.mjs +2 -0
- package/dist/chunks/model-1.0.17-qsjdvrd5.mjs +1 -0
- package/dist/chunks/node-1.0.17-0rq9m4ak.mjs +12 -0
- package/dist/chunks/oauth-1.0.17-yjkwe4k5.mjs +1 -0
- package/dist/chunks/openaiShim-1.0.17-tz5wqwzh.mjs +14 -0
- package/dist/chunks/output-style-1.0.17-9g29453y.mjs +1 -0
- package/dist/chunks/package-2VNCXFNY-1.0.17-rztr9aj4.mjs +1 -0
- package/dist/chunks/parseConnectUrl-1.0.17-hkk9pnna.mjs +1 -0
- package/dist/chunks/parser-1.0.17-msy0vt6k.mjs +1 -0
- package/dist/chunks/passes-1.0.17-j2yp563b.mjs +1 -0
- package/dist/chunks/permissions-1.0.17-gy7m159e.mjs +3 -0
- package/dist/chunks/permissions-1.0.17-v5041xc1.mjs +1 -0
- package/dist/chunks/plan-1.0.17-dsrf8crc.mjs +1 -0
- package/dist/chunks/plist-1.0.17-qj89pt80.mjs +1 -0
- package/dist/chunks/plugin-1.0.17-rtmfht0z.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-1.0.17-9rqvbt4k.mjs +1 -0
- package/dist/chunks/plugins-1.0.17-aa1p63yv.mjs +9 -0
- package/dist/chunks/preActionHook-1.0.17-sk15skx3.mjs +2 -0
- package/dist/chunks/print-1.0.17-2mzd4w21.mjs +57 -0
- package/dist/chunks/privacy-settings-1.0.17-7vm1x5sr.mjs +1 -0
- package/dist/chunks/process-1.0.17-v6aqjwzk.mjs +1 -0
- package/dist/chunks/processBashCommand-1.0.17-zykh4cqf.mjs +1 -0
- package/dist/chunks/processSlashCommand-1.0.17-gcjyjyjr.mjs +9 -0
- package/dist/chunks/prompt-1.0.17-6wa08t1s.mjs +1 -0
- package/dist/chunks/prompt-1.0.17-n7xqvg3b.mjs +1 -0
- package/dist/chunks/prompts-1.0.17-s87r77nr.mjs +1 -0
- package/dist/chunks/protocolHandler-1.0.17-4w13byd5.mjs +13 -0
- package/dist/chunks/provider-1.0.17-55mbqxc2.mjs +2 -0
- package/dist/chunks/providerProfiles-1.0.17-kxhx9m23.mjs +1 -0
- package/dist/chunks/providerValidation-1.0.17-haa5b155.mjs +6 -0
- package/dist/chunks/rate-limit-options-1.0.17-0cqpvcdk.mjs +1 -0
- package/dist/chunks/registerSubcommands-1.0.17-5zmj0kqm.mjs +34 -0
- package/dist/chunks/registry-1.0.17-mkfb3tvt.mjs +1 -0
- package/dist/chunks/release-notes-1.0.17-8snbpqbs.mjs +5 -0
- package/dist/chunks/reload-plugins-1.0.17-eg1v6x99.mjs +2 -0
- package/dist/chunks/remote-env-1.0.17-9fksp65j.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-1.0.17-rtawcjw6.mjs +1 -0
- package/dist/chunks/remoteSession-1.0.17-a1ms2ttj.mjs +1 -0
- package/dist/chunks/rename-1.0.17-09e526vj.mjs +1 -0
- package/dist/chunks/replBridgeHandle-1.0.17-3qyccrd1.mjs +1 -0
- package/dist/chunks/replLauncher-1.0.17-50011rdb.mjs +1 -0
- package/dist/chunks/resume-1.0.17-hy1ncvwh.mjs +2 -0
- package/dist/chunks/rewind-1.0.17-cvna2377.mjs +1 -0
- package/dist/chunks/rootOptions-1.0.17-kpkg1wb0.mjs +1 -0
- package/dist/chunks/runWorkflowHeadless-1.0.17-jbv8z86k.mjs +10 -0
- package/dist/chunks/sandbox-adapter-1.0.17-hq7fx8ex.mjs +1 -0
- package/dist/chunks/sandbox-toggle-1.0.17-kr3wm7t7.mjs +1 -0
- package/dist/chunks/session-1.0.17-5613sexq.mjs +2 -0
- package/dist/chunks/sessionDiscovery-1.0.17-gsw1cxaw.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-1.0.17-p0gkvt4d.mjs +1 -0
- package/dist/chunks/sessionStorage-1.0.17-9ayxcfb9.mjs +1 -0
- package/dist/chunks/settings-1.0.17-dp8x87ef.mjs +1 -0
- package/dist/chunks/setup-1.0.17-ey47rggp.mjs +5 -0
- package/dist/chunks/sinks-1.0.17-pjfn1cvs.mjs +1 -0
- package/dist/chunks/skills-1.0.17-957pj40r.mjs +1 -0
- package/dist/chunks/startupProfiler-1.0.17-r5qx27af.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-1.0.17-ccx0f3x6.mjs +1 -0
- package/dist/chunks/state-1.0.17-wqzcjy24.mjs +1 -0
- package/dist/chunks/stats-1.0.17-qwr66nst.mjs +6 -0
- package/dist/chunks/status-1.0.17-fw5sv974.mjs +1 -0
- package/dist/chunks/stickers-1.0.17-0xx7db6g.mjs +1 -0
- package/dist/chunks/subprocessEnv-1.0.17-n5cn87xp.mjs +1 -0
- package/dist/chunks/tasks-1.0.17-w0q9gftt.mjs +1 -0
- package/dist/chunks/teamHelpers-1.0.17-sa3s8hyk.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-1.0.17-z253vr4f.mjs +1 -0
- package/dist/chunks/teleport-1.0.17-g2by1yjq.mjs +1 -0
- package/dist/chunks/terminalSetup-1.0.17-g2q4wcwh.mjs +1 -0
- package/dist/chunks/theme-1.0.17-40nrdpr3.mjs +1 -0
- package/dist/chunks/thinkback-1.0.17-vzzceq55.mjs +1 -0
- package/dist/chunks/thinkback-play-1.0.17-f75qmjyw.mjs +1 -0
- package/dist/chunks/toolPool-1.0.17-qtydtser.mjs +1 -0
- package/dist/chunks/toolSearch-1.0.17-913zemhq.mjs +1 -0
- package/dist/chunks/tools-1.0.17-22ce3q9j.mjs +1 -0
- package/dist/chunks/trustedDevice-1.0.17-rhbew9da.mjs +1 -0
- package/dist/chunks/turndown.cjs-1.0.17-3b3z4x7p.mjs +69 -0
- package/dist/chunks/types-1.0.17-psrdfpk3.mjs +1 -0
- package/dist/chunks/ultrareviewCommand-1.0.17-srb6z4yz.mjs +4 -0
- package/dist/chunks/update-1.0.17-chegbf04.mjs +88 -0
- package/dist/chunks/upgrade-1.0.17-4r1q1v3q.mjs +1 -0
- package/dist/chunks/upload-1.0.17-am8s1q94.mjs +7 -0
- package/dist/chunks/upstreamproxy-1.0.17-88vgegvm.mjs +14 -0
- package/dist/chunks/url-handler-napi-1.0.17-cg7jf2v4.mjs +1 -0
- package/dist/chunks/usage-1.0.17-0pjtc1jb.mjs +1 -0
- package/dist/chunks/util-1.0.17-cwe172ex.mjs +1 -0
- package/dist/chunks/utils-1.0.17-2q7gzedz.mjs +1 -0
- package/dist/chunks/vim-1.0.17-9re127j9.mjs +1 -0
- package/dist/chunks/watchLoop-1.0.17-8n39xwhz.mjs +13 -0
- package/dist/chunks/watcher-1.0.17-annky0s6.mjs +1 -0
- package/dist/chunks/wiki-1.0.17-p8s2y2fh.mjs +132 -0
- package/dist/chunks/workflows-1.0.17-5ygdx16y.mjs +1 -0
- package/dist/chunks/worktree-1.0.17-zh7mn90d.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-1.0.17-m9g3s832.mjs +1 -0
- package/dist/chunks/wrapper-1.0.17-p976tvn1.mjs +7 -0
- package/dist/cli.mjs +2 -2
- package/dist/help.txt +1 -1
- package/package.json +9 -9
- package/dist/chunks/AgentTool-1.0.16-wvkhgtfr.mjs +0 -1
- package/dist/chunks/App-1.0.16-qj70q7bs.mjs +0 -1
- package/dist/chunks/ApproveApiKey-1.0.16-nwddyyxe.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-1.0.16-s0nz3m0m.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-1.0.16-mz0t23b9.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-1.0.16-v6q56p5k.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.16-pa48jvvz.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1.0.16-8z8an98j.mjs +0 -1
- package/dist/chunks/DiffDialog-1.0.16-en5phhjv.mjs +0 -7
- package/dist/chunks/Doctor-1.0.16-c4vpjrpq.mjs +0 -1
- package/dist/chunks/ExplorerDialog-1.0.16-avpaznp7.mjs +0 -6
- package/dist/chunks/Grove-1.0.16-3n0wq2g4.mjs +0 -1
- package/dist/chunks/ITermBackend-1.0.16-3kamvnmb.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-1.0.16-anyrrqmz.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-1.0.16-xs7rnvw2.mjs +0 -1
- package/dist/chunks/MigrationDialog-1.0.16-hvmezjv6.mjs +0 -1
- package/dist/chunks/Onboarding-1.0.16-j9z9h03k.mjs +0 -1
- package/dist/chunks/ProviderManager-1.0.16-6sby2542.mjs +0 -1
- package/dist/chunks/REPL-1.0.16-2yn8p9d8.mjs +0 -1
- package/dist/chunks/ResumeConversation-1.0.16-mf1fgs4p.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-1.0.16-acer2dt3.mjs +0 -1
- package/dist/chunks/TeleportProgress-1.0.16-p5g78t71.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-1.0.16-w2cbt48d.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-1.0.16-zfsbr2j8.mjs +0 -1
- package/dist/chunks/TmuxBackend-1.0.16-v0xt80ep.mjs +0 -9
- package/dist/chunks/ToolSearchTool-1.0.16-618gxr3s.mjs +0 -1
- package/dist/chunks/TrustDialog-1.0.16-xdf0qyft.mjs +0 -1
- package/dist/chunks/activeProvider-1.0.16-fdvc9c5k.mjs +0 -1
- package/dist/chunks/add-dir-1.0.16-42s0pyww.mjs +0 -1
- package/dist/chunks/agentTypes-1.0.16-ya0z3dtm.mjs +0 -1
- package/dist/chunks/agents-1.0.16-9kh1vnqr.mjs +0 -3
- package/dist/chunks/agents-1.0.16-fxzavm1v.mjs +0 -110
- package/dist/chunks/api-1.0.16-dmy8gm8w.mjs +0 -1
- package/dist/chunks/asciicast-1.0.16-te208gj5.mjs +0 -1
- package/dist/chunks/assistant-1.0.16-k7yyas10.mjs +0 -1
- package/dist/chunks/auth-1.0.16-0t089511.mjs +0 -1
- package/dist/chunks/auth-1.0.16-wsdndr43.mjs +0 -1
- package/dist/chunks/autoMode-1.0.16-9e04q56t.mjs +0 -48
- package/dist/chunks/autoUpdater-1.0.16-wsmefs36.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-1.0.16-pmqfyb9a.mjs +0 -1
- package/dist/chunks/branch-1.0.16-at6phph5.mjs +0 -4
- package/dist/chunks/bridge-1.0.16-jk00c19e.mjs +0 -2
- package/dist/chunks/bridgeConfig-1.0.16-1f1hf2x8.mjs +0 -1
- package/dist/chunks/bridgeEnabled-1.0.16-pr05xsxb.mjs +0 -1
- package/dist/chunks/bridgeMain-1.0.16-df3kzv8s.mjs +0 -88
- package/dist/chunks/bridgePointer-1.0.16-brqbhgy2.mjs +0 -1
- package/dist/chunks/btw-1.0.16-xzfabxj6.mjs +0 -1
- package/dist/chunks/buddy-1.0.16-e678bdsk.mjs +0 -3
- package/dist/chunks/cacache-1.0.16-e2mwray8.mjs +0 -1
- package/dist/chunks/cache-probe-1.0.16-cgbyvz3q.mjs +0 -21
- package/dist/chunks/cacheStats-1.0.16-xg2k7b6y.mjs +0 -4
- package/dist/chunks/caches-1.0.16-9xt8fj7x.mjs +0 -1
- package/dist/chunks/claudeDesktop-1.0.16-etycr23t.mjs +0 -1
- package/dist/chunks/claudemd-1.0.16-05ycq87c.mjs +0 -1
- package/dist/chunks/clear-1.0.16-5rrp0dq2.mjs +0 -1
- package/dist/chunks/clearTerminal-1.0.16-hq8hxrw4.mjs +0 -1
- package/dist/chunks/cli-1.0.16-03b5jjz5.mjs +0 -6
- package/dist/chunks/cli-1.0.16-04tr8fw7.mjs +0 -6
- package/dist/chunks/cli-1.0.16-07b4f4bw.mjs +0 -3
- package/dist/chunks/cli-1.0.16-07x0893e.mjs +0 -2
- package/dist/chunks/cli-1.0.16-0bza13rj.mjs +0 -2
- package/dist/chunks/cli-1.0.16-0f0rbfq7.mjs +0 -2
- package/dist/chunks/cli-1.0.16-0mt6xxrt.mjs +0 -6
- package/dist/chunks/cli-1.0.16-0rqyx4re.mjs +0 -2
- package/dist/chunks/cli-1.0.16-0v8j55zf.mjs +0 -2
- package/dist/chunks/cli-1.0.16-133hhc86.mjs +0 -6
- package/dist/chunks/cli-1.0.16-16qr698n.mjs +0 -2
- package/dist/chunks/cli-1.0.16-19h7ddkz.mjs +0 -2
- package/dist/chunks/cli-1.0.16-1mfcpfa8.mjs +0 -39
- package/dist/chunks/cli-1.0.16-1qh4cd2a.mjs +0 -2
- package/dist/chunks/cli-1.0.16-21yhbzk0.mjs +0 -3
- package/dist/chunks/cli-1.0.16-22djnkp4.mjs +0 -2
- package/dist/chunks/cli-1.0.16-23fvr0wv.mjs +0 -2
- package/dist/chunks/cli-1.0.16-28kyenby.mjs +0 -2
- package/dist/chunks/cli-1.0.16-2ghvdh62.mjs +0 -2
- package/dist/chunks/cli-1.0.16-2gwj41fw.mjs +0 -2
- package/dist/chunks/cli-1.0.16-2hpbjz3s.mjs +0 -3
- package/dist/chunks/cli-1.0.16-2thxt6pw.mjs +0 -59
- package/dist/chunks/cli-1.0.16-2ybxhhr3.mjs +0 -4
- package/dist/chunks/cli-1.0.16-37d6r8fz.mjs +0 -2
- package/dist/chunks/cli-1.0.16-3fv6gk9q.mjs +0 -2
- package/dist/chunks/cli-1.0.16-3jqjnkzm.mjs +0 -2
- package/dist/chunks/cli-1.0.16-3pbtmmrt.mjs +0 -4
- package/dist/chunks/cli-1.0.16-430hp7w5.mjs +0 -2
- package/dist/chunks/cli-1.0.16-4621hbzw.mjs +0 -25
- package/dist/chunks/cli-1.0.16-49dw2eqx.mjs +0 -5
- package/dist/chunks/cli-1.0.16-4a2x18jw.mjs +0 -2
- package/dist/chunks/cli-1.0.16-4bw2zm4f.mjs +0 -2
- package/dist/chunks/cli-1.0.16-4k4qgyyq.mjs +0 -2
- package/dist/chunks/cli-1.0.16-4vns6894.mjs +0 -2
- package/dist/chunks/cli-1.0.16-58sv5vch.mjs +0 -2
- package/dist/chunks/cli-1.0.16-5axjzbba.mjs +0 -2
- package/dist/chunks/cli-1.0.16-5fpnmf91.mjs +0 -15
- package/dist/chunks/cli-1.0.16-5sj9hkp9.mjs +0 -2
- package/dist/chunks/cli-1.0.16-625x0153.mjs +0 -2
- package/dist/chunks/cli-1.0.16-66gzm80h.mjs +0 -2
- package/dist/chunks/cli-1.0.16-6d9kerj1.mjs +0 -2
- package/dist/chunks/cli-1.0.16-6gyjk1vp.mjs +0 -2
- package/dist/chunks/cli-1.0.16-6ynvs67w.mjs +0 -3
- package/dist/chunks/cli-1.0.16-7apw65y7.mjs +0 -2
- package/dist/chunks/cli-1.0.16-7bvmr4rf.mjs +0 -3
- package/dist/chunks/cli-1.0.16-7eybn78f.mjs +0 -2
- package/dist/chunks/cli-1.0.16-7hc7p9x4.mjs +0 -4
- package/dist/chunks/cli-1.0.16-7n29wghc.mjs +0 -3
- package/dist/chunks/cli-1.0.16-7nqp826t.mjs +0 -2
- package/dist/chunks/cli-1.0.16-7r5pnkgj.mjs +0 -2
- package/dist/chunks/cli-1.0.16-80nmsz9m.mjs +0 -2
- package/dist/chunks/cli-1.0.16-80w06txg.mjs +0 -20
- package/dist/chunks/cli-1.0.16-82rcbqg2.mjs +0 -2
- package/dist/chunks/cli-1.0.16-8m9pzkr8.mjs +0 -15
- package/dist/chunks/cli-1.0.16-8mggx8np.mjs +0 -2
- package/dist/chunks/cli-1.0.16-8svbg4t6.mjs +0 -4
- package/dist/chunks/cli-1.0.16-8vfwka4c.mjs +0 -12
- package/dist/chunks/cli-1.0.16-94c7kpx1.mjs +0 -2
- package/dist/chunks/cli-1.0.16-94eetd0b.mjs +0 -2
- package/dist/chunks/cli-1.0.16-997n0rpt.mjs +0 -2
- package/dist/chunks/cli-1.0.16-9m2dkrxt.mjs +0 -2
- package/dist/chunks/cli-1.0.16-a2d2s2cs.mjs +0 -2
- package/dist/chunks/cli-1.0.16-a4dr9ptz.mjs +0 -3
- package/dist/chunks/cli-1.0.16-aa0xse54.mjs +0 -2
- package/dist/chunks/cli-1.0.16-abxtgh7d.mjs +0 -2
- package/dist/chunks/cli-1.0.16-afng6ydq.mjs +0 -2
- package/dist/chunks/cli-1.0.16-ahn721qj.mjs +0 -18
- package/dist/chunks/cli-1.0.16-ar98yh40.mjs +0 -2
- package/dist/chunks/cli-1.0.16-ar9fmtxa.mjs +0 -2
- package/dist/chunks/cli-1.0.16-aw8qjvt6.mjs +0 -1
- package/dist/chunks/cli-1.0.16-b0ds811h.mjs +0 -12
- package/dist/chunks/cli-1.0.16-b475h1qv.mjs +0 -2
- package/dist/chunks/cli-1.0.16-bcax4sz5.mjs +0 -15
- package/dist/chunks/cli-1.0.16-bqa1thts.mjs +0 -2
- package/dist/chunks/cli-1.0.16-c0pqddvv.mjs +0 -2
- package/dist/chunks/cli-1.0.16-cheyjtmw.mjs +0 -2
- package/dist/chunks/cli-1.0.16-cnnfggd0.mjs +0 -133
- package/dist/chunks/cli-1.0.16-d3zrt3hs.mjs +0 -2
- package/dist/chunks/cli-1.0.16-d716n13b.mjs +0 -2
- package/dist/chunks/cli-1.0.16-d77bv0wx.mjs +0 -2
- package/dist/chunks/cli-1.0.16-datw1k5m.mjs +0 -2
- package/dist/chunks/cli-1.0.16-dawsz3cx.mjs +0 -58
- package/dist/chunks/cli-1.0.16-dff4252s.mjs +0 -24
- package/dist/chunks/cli-1.0.16-dggf3mwp.mjs +0 -2
- package/dist/chunks/cli-1.0.16-drphseh7.mjs +0 -4
- package/dist/chunks/cli-1.0.16-dsw73925.mjs +0 -2
- package/dist/chunks/cli-1.0.16-dxcve6pg.mjs +0 -2
- package/dist/chunks/cli-1.0.16-e0qj3bb7.mjs +0 -2
- package/dist/chunks/cli-1.0.16-e7hav3ez.mjs +0 -2
- package/dist/chunks/cli-1.0.16-e830ghzs.mjs +0 -2
- package/dist/chunks/cli-1.0.16-esgranzx.mjs +0 -3
- package/dist/chunks/cli-1.0.16-ewmczs5j.mjs +0 -2
- package/dist/chunks/cli-1.0.16-f4fr2jb2.mjs +0 -2
- package/dist/chunks/cli-1.0.16-fcfaz7s1.mjs +0 -18
- package/dist/chunks/cli-1.0.16-fcjskkf4.mjs +0 -2
- package/dist/chunks/cli-1.0.16-fehsf9kh.mjs +0 -2
- package/dist/chunks/cli-1.0.16-ffca1s3t.mjs +0 -21
- package/dist/chunks/cli-1.0.16-fhqg8pmc.mjs +0 -2
- package/dist/chunks/cli-1.0.16-fmpgxdqc.mjs +0 -2
- package/dist/chunks/cli-1.0.16-fskj6kkz.mjs +0 -12
- package/dist/chunks/cli-1.0.16-g1gw16yf.mjs +0 -9
- package/dist/chunks/cli-1.0.16-g1hxxcer.mjs +0 -2
- package/dist/chunks/cli-1.0.16-g2ya82h9.mjs +0 -2
- package/dist/chunks/cli-1.0.16-g3g33b7n.mjs +0 -2
- package/dist/chunks/cli-1.0.16-g3xbjpm0.mjs +0 -6
- package/dist/chunks/cli-1.0.16-grtt82kn.mjs +0 -45
- package/dist/chunks/cli-1.0.16-gvvtqw93.mjs +0 -3
- package/dist/chunks/cli-1.0.16-gydkk4pv.mjs +0 -2
- package/dist/chunks/cli-1.0.16-h8cqz7s4.mjs +0 -2
- package/dist/chunks/cli-1.0.16-hk1xetmm.mjs +0 -133
- package/dist/chunks/cli-1.0.16-hpznp2f1.mjs +0 -2
- package/dist/chunks/cli-1.0.16-hqqn22q3.mjs +0 -2
- package/dist/chunks/cli-1.0.16-ht8msgzn.mjs +0 -5
- package/dist/chunks/cli-1.0.16-hvfp394x.mjs +0 -3
- package/dist/chunks/cli-1.0.16-j89x551t.mjs +0 -2
- package/dist/chunks/cli-1.0.16-j8kkz0js.mjs +0 -2
- package/dist/chunks/cli-1.0.16-jd106qrc.mjs +0 -4
- package/dist/chunks/cli-1.0.16-jmc56c16.mjs +0 -2
- package/dist/chunks/cli-1.0.16-jrxss67w.mjs +0 -2
- package/dist/chunks/cli-1.0.16-js6p36qa.mjs +0 -2
- package/dist/chunks/cli-1.0.16-k3nksbe5.mjs +0 -2
- package/dist/chunks/cli-1.0.16-k6g22gyn.mjs +0 -2
- package/dist/chunks/cli-1.0.16-kcreqyt3.mjs +0 -2
- package/dist/chunks/cli-1.0.16-kdm4846g.mjs +0 -2
- package/dist/chunks/cli-1.0.16-kh0cfhgd.mjs +0 -2
- package/dist/chunks/cli-1.0.16-ksfap5at.mjs +0 -24
- package/dist/chunks/cli-1.0.16-m5f33qfn.mjs +0 -2
- package/dist/chunks/cli-1.0.16-m6x6p13f.mjs +0 -2
- package/dist/chunks/cli-1.0.16-m8et6040.mjs +0 -2
- package/dist/chunks/cli-1.0.16-mg53mrd2.mjs +0 -17
- package/dist/chunks/cli-1.0.16-mkaje15r.mjs +0 -2
- package/dist/chunks/cli-1.0.16-n6bm43be.mjs +0 -2
- package/dist/chunks/cli-1.0.16-n7vvc80d.mjs +0 -4
- package/dist/chunks/cli-1.0.16-natadjxz.mjs +0 -2
- package/dist/chunks/cli-1.0.16-nh58e5sn.mjs +0 -2
- package/dist/chunks/cli-1.0.16-nxg44e73.mjs +0 -2
- package/dist/chunks/cli-1.0.16-p36pcnvw.mjs +0 -2
- package/dist/chunks/cli-1.0.16-p68tp9h3.mjs +0 -2
- package/dist/chunks/cli-1.0.16-pdf0vmcs.mjs +0 -2
- package/dist/chunks/cli-1.0.16-pdjp1248.mjs +0 -2
- package/dist/chunks/cli-1.0.16-ph1tq97e.mjs +0 -12
- package/dist/chunks/cli-1.0.16-pj0vcmv0.mjs +0 -2
- package/dist/chunks/cli-1.0.16-pqmanw5v.mjs +0 -2
- package/dist/chunks/cli-1.0.16-pz654728.mjs +0 -5557
- package/dist/chunks/cli-1.0.16-q2g1eds7.mjs +0 -2
- package/dist/chunks/cli-1.0.16-q5te24ar.mjs +0 -2
- package/dist/chunks/cli-1.0.16-q6jt90mr.mjs +0 -25
- package/dist/chunks/cli-1.0.16-qc5nvbgq.mjs +0 -2
- package/dist/chunks/cli-1.0.16-qf932scm.mjs +0 -2
- package/dist/chunks/cli-1.0.16-qfnz1281.mjs +0 -2
- package/dist/chunks/cli-1.0.16-qw7khq2v.mjs +0 -42
- package/dist/chunks/cli-1.0.16-r1mtjt6j.mjs +0 -2
- package/dist/chunks/cli-1.0.16-r2fnj3sp.mjs +0 -2
- package/dist/chunks/cli-1.0.16-r4x4j4ex.mjs +0 -2
- package/dist/chunks/cli-1.0.16-r5zwwmrf.mjs +0 -34
- package/dist/chunks/cli-1.0.16-re32rapy.mjs +0 -2
- package/dist/chunks/cli-1.0.16-rfmqmp7n.mjs +0 -67
- package/dist/chunks/cli-1.0.16-rnjfc919.mjs +0 -2
- package/dist/chunks/cli-1.0.16-rvawnzma.mjs +0 -50
- package/dist/chunks/cli-1.0.16-s3ck0xny.mjs +0 -2
- package/dist/chunks/cli-1.0.16-s4pa3dqg.mjs +0 -2
- package/dist/chunks/cli-1.0.16-s5y2vt2x.mjs +0 -16
- package/dist/chunks/cli-1.0.16-s609frp5.mjs +0 -2
- package/dist/chunks/cli-1.0.16-s6nrn76q.mjs +0 -2
- package/dist/chunks/cli-1.0.16-scvxzb6x.mjs +0 -2
- package/dist/chunks/cli-1.0.16-srgnhrpx.mjs +0 -2
- package/dist/chunks/cli-1.0.16-srr48ecc.mjs +0 -18
- package/dist/chunks/cli-1.0.16-stm6nwy6.mjs +0 -2
- package/dist/chunks/cli-1.0.16-t1815494.mjs +0 -7
- package/dist/chunks/cli-1.0.16-t2ky4p5s.mjs +0 -202
- package/dist/chunks/cli-1.0.16-td1tnrvq.mjs +0 -2
- package/dist/chunks/cli-1.0.16-tjqve1gp.mjs +0 -2
- package/dist/chunks/cli-1.0.16-tkw512bx.mjs +0 -2
- package/dist/chunks/cli-1.0.16-tnx6xq60.mjs +0 -2
- package/dist/chunks/cli-1.0.16-v6rpymkv.mjs +0 -2
- package/dist/chunks/cli-1.0.16-vfk0g9d8.mjs +0 -2
- package/dist/chunks/cli-1.0.16-vj5p858w.mjs +0 -3
- package/dist/chunks/cli-1.0.16-w382p4f7.mjs +0 -24
- package/dist/chunks/cli-1.0.16-wg00dea4.mjs +0 -2
- package/dist/chunks/cli-1.0.16-wh1hwpa6.mjs +0 -2
- package/dist/chunks/cli-1.0.16-wk5szq3c.mjs +0 -2
- package/dist/chunks/cli-1.0.16-wmt878h4.mjs +0 -2
- package/dist/chunks/cli-1.0.16-wt9wh18d.mjs +0 -3
- package/dist/chunks/cli-1.0.16-x002k14w.mjs +0 -4
- package/dist/chunks/cli-1.0.16-x50z71rx.mjs +0 -2
- package/dist/chunks/cli-1.0.16-x7frspjb.mjs +0 -2
- package/dist/chunks/cli-1.0.16-xest14mj.mjs +0 -2
- package/dist/chunks/cli-1.0.16-xhrysm93.mjs +0 -4
- package/dist/chunks/cli-1.0.16-xjjsnafh.mjs +0 -2
- package/dist/chunks/cli-1.0.16-xqwz1zgk.mjs +0 -2
- package/dist/chunks/cli-1.0.16-xz63vy3x.mjs +0 -2
- package/dist/chunks/cli-1.0.16-y8etxx4t.mjs +0 -2
- package/dist/chunks/cli-1.0.16-y9yxyd77.mjs +0 -2
- package/dist/chunks/cli-1.0.16-ynm2hz21.mjs +0 -2
- package/dist/chunks/cli-1.0.16-yw011pcb.mjs +0 -2
- package/dist/chunks/cli-1.0.16-z2t6cws8.mjs +0 -8
- package/dist/chunks/cli-1.0.16-z3ew4yak.mjs +0 -4
- package/dist/chunks/cli-1.0.16-z8hf3965.mjs +0 -2
- package/dist/chunks/cli-1.0.16-z8vtm68p.mjs +0 -4
- package/dist/chunks/cli-1.0.16-zakynkzs.mjs +0 -9
- package/dist/chunks/cli-1.0.16-zsvkc5zm.mjs +0 -2
- package/dist/chunks/cli-1.0.16-zv0gp6y5.mjs +0 -17
- package/dist/chunks/client-1.0.16-xhs0p1sr.mjs +0 -1
- package/dist/chunks/color-1.0.16-4vz7gpcs.mjs +0 -1
- package/dist/chunks/compact-1.0.16-h9s4p0tq.mjs +0 -3
- package/dist/chunks/config-1.0.16-g2c7zr5h.mjs +0 -1
- package/dist/chunks/config-1.0.16-ktfgayty.mjs +0 -1
- package/dist/chunks/constants-1.0.16-dttepjbs.mjs +0 -1
- package/dist/chunks/context-1.0.16-qtcs6qm5.mjs +0 -1
- package/dist/chunks/context-noninteractive-1.0.16-rvjhqwht.mjs +0 -1
- package/dist/chunks/conversation-1.0.16-z503kkn8.mjs +0 -1
- package/dist/chunks/copilotHeaders-1.0.16-z5a555zn.mjs +0 -1
- package/dist/chunks/copy-1.0.16-yfb29y6y.mjs +0 -9
- package/dist/chunks/cost-1.0.16-417v6b1a.mjs +0 -1
- package/dist/chunks/createSSHSession-1.0.16-zz14vxmj.mjs +0 -1
- package/dist/chunks/createSession-1.0.16-k1128bhd.mjs +0 -1
- package/dist/chunks/debug-1.0.16-rtt7pq3d.mjs +0 -1
- package/dist/chunks/defaultActionDeps-1.0.16-qxzqz3wz.mjs +0 -1446
- package/dist/chunks/desktop-1.0.16-hkxhs9sk.mjs +0 -1
- package/dist/chunks/detectRepository-1.0.16-4p7e3f4d.mjs +0 -1
- package/dist/chunks/detection-1.0.16-gpt4y10p.mjs +0 -1
- package/dist/chunks/diff-1.0.16-hbcebmqq.mjs +0 -1
- package/dist/chunks/doctor-1.0.16-mbqv4b8m.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-1.0.16-c64s8s2j.mjs +0 -1
- package/dist/chunks/earlyInput-1.0.16-cgk422bw.mjs +0 -1
- package/dist/chunks/effort-1.0.16-fk0fsqw1.mjs +0 -10
- package/dist/chunks/engine-1.0.16-5a0tr5hv.mjs +0 -1
- package/dist/chunks/envLessBridgeConfig-1.0.16-a88zsxm7.mjs +0 -1
- package/dist/chunks/envUtils-1.0.16-5gxzkt3m.mjs +0 -1
- package/dist/chunks/environmentSelection-1.0.16-3pg1req8.mjs +0 -1
- package/dist/chunks/environments-1.0.16-1aggyd97.mjs +0 -1
- package/dist/chunks/errors-1.0.16-vxy9cpnz.mjs +0 -1
- package/dist/chunks/exampleCommands-1.0.16-gw61yzy5.mjs +0 -1
- package/dist/chunks/execFileNoThrow-1.0.16-mg301nrg.mjs +0 -1
- package/dist/chunks/exit-1.0.16-rhqh0qcy.mjs +0 -1
- package/dist/chunks/explorer-1.0.16-dz7153c5.mjs +0 -1
- package/dist/chunks/export-1.0.16-grgk0hrd.mjs +0 -2
- package/dist/chunks/extra-usage-1.0.16-eh8c6s6q.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-1.0.16-775rwnd4.mjs +0 -1
- package/dist/chunks/fast-1.0.16-j6006he1.mjs +0 -1
- package/dist/chunks/feedback-1.0.16-s0tshw39.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-1.0.16-h61b27k3.mjs +0 -1
- package/dist/chunks/git-1.0.16-zgmcchyv.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-1.0.16-q2s6e4s8.mjs +0 -1
- package/dist/chunks/goal-1.0.16-w0e1trst.mjs +0 -4
- package/dist/chunks/grove-1.0.16-rm643s3n.mjs +0 -1
- package/dist/chunks/growthbook-1.0.16-234vever.mjs +0 -1
- package/dist/chunks/headless-1.0.16-0f9r1wnw.mjs +0 -2
- package/dist/chunks/heapdump-1.0.16-2g3xpm87.mjs +0 -6
- package/dist/chunks/help-1.0.16-fmhte0j0.mjs +0 -1
- package/dist/chunks/hookChains-1.0.16-5f5tk1dt.mjs +0 -3
- package/dist/chunks/hooks-1.0.16-35ge6dh4.mjs +0 -1
- package/dist/chunks/hooks-1.0.16-w3s2dqc3.mjs +0 -79
- package/dist/chunks/ide-1.0.16-k72t7fra.mjs +0 -3
- package/dist/chunks/image-processor-napi-1.0.16-wefqw84q.mjs +0 -1
- package/dist/chunks/inboundAttachments-1.0.16-d9p2etx1.mjs +0 -1
- package/dist/chunks/index-1.0.16-0yqaa9dp.mjs +0 -1
- package/dist/chunks/index-1.0.16-2cwev03b.mjs +0 -1
- package/dist/chunks/index-1.0.16-2q4smqnq.mjs +0 -5
- package/dist/chunks/index-1.0.16-43g8hr9c.mjs +0 -1
- package/dist/chunks/index-1.0.16-58jgyw37.mjs +0 -1
- package/dist/chunks/index-1.0.16-6pawckrk.mjs +0 -1
- package/dist/chunks/index-1.0.16-900z9kpq.mjs +0 -1
- package/dist/chunks/index-1.0.16-a6bdp9dx.mjs +0 -1
- package/dist/chunks/index-1.0.16-brq1353t.mjs +0 -1
- package/dist/chunks/index-1.0.16-dkpszwnc.mjs +0 -30
- package/dist/chunks/index-1.0.16-fvhbvz4e.mjs +0 -1
- package/dist/chunks/index-1.0.16-fxg85h4f.mjs +0 -2
- package/dist/chunks/index-1.0.16-jrbr0vgb.mjs +0 -1
- package/dist/chunks/index-1.0.16-kbpve4r7.mjs +0 -1
- package/dist/chunks/index-1.0.16-mcszpr4h.mjs +0 -9
- package/dist/chunks/index-1.0.16-mmxyq9n1.mjs +0 -9
- package/dist/chunks/index-1.0.16-mpgbpm0k.mjs +0 -1
- package/dist/chunks/index-1.0.16-qsmka6f6.mjs +0 -1
- package/dist/chunks/index-1.0.16-rrgfxza5.mjs +0 -2
- package/dist/chunks/index-1.0.16-rsr8xcrt.mjs +0 -17
- package/dist/chunks/index-1.0.16-ryw2h481.mjs +0 -1
- package/dist/chunks/index-1.0.16-stt2baps.mjs +0 -1
- package/dist/chunks/index-1.0.16-zpctfp06.mjs +0 -1
- package/dist/chunks/init-1.0.16-6d9mah78.mjs +0 -1
- package/dist/chunks/initReplBridge-1.0.16-rmj53r70.mjs +0 -1
- package/dist/chunks/ink-1.0.16-bhr33b23.mjs +0 -1
- package/dist/chunks/insights-1.0.16-7kd5gsq0.mjs +0 -870
- package/dist/chunks/install-1.0.16-ab2zfsp3.mjs +0 -1
- package/dist/chunks/install-github-app-1.0.16-7c40s5xx.mjs +0 -149
- package/dist/chunks/install-slack-app-1.0.16-5dv60ceq.mjs +0 -1
- package/dist/chunks/instrumentation-1.0.16-tynczjn9.mjs +0 -1
- package/dist/chunks/interactiveHelpers-1.0.16-9gbm21fb.mjs +0 -1
- package/dist/chunks/keybindings-1.0.16-saxm9cz1.mjs +0 -2
- package/dist/chunks/knowledge-1.0.16-t1e5qmmj.mjs +0 -2
- package/dist/chunks/latestVersionCache-1.0.16-x1vcspx5.mjs +0 -1
- package/dist/chunks/loadAgentsDir-1.0.16-73hvgtg1.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.0.16-nhgxn1vv.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.0.16-zsah8w7s.mjs +0 -1
- package/dist/chunks/log-1.0.16-1thaytya.mjs +0 -1
- package/dist/chunks/main-1.0.16-98hcbpah.mjs +0 -1
- package/dist/chunks/managedEnv-1.0.16-kehw592q.mjs +0 -1
- package/dist/chunks/mcp-1.0.16-279t3wwh.mjs +0 -1
- package/dist/chunks/mcp-1.0.16-44q8kwd8.mjs +0 -4
- package/dist/chunks/mcp-1.0.16-vtjz32eq.mjs +0 -17
- package/dist/chunks/mcpb-1.0.16-c57m9p34.mjs +0 -1
- package/dist/chunks/memory-1.0.16-kjsp1ta2.mjs +0 -72
- package/dist/chunks/model-1.0.16-sk96phs5.mjs +0 -1
- package/dist/chunks/model-1.0.16-ttvdftag.mjs +0 -2
- package/dist/chunks/node-1.0.16-20fb4ffh.mjs +0 -12
- package/dist/chunks/oauth-1.0.16-jxs2a70y.mjs +0 -1
- package/dist/chunks/openaiShim-1.0.16-1n9f8659.mjs +0 -14
- package/dist/chunks/output-style-1.0.16-a7amj8g1.mjs +0 -1
- package/dist/chunks/package-2VNCXFNY-1.0.16-09men0zm.mjs +0 -1
- package/dist/chunks/parseConnectUrl-1.0.16-46kkhskc.mjs +0 -1
- package/dist/chunks/parser-1.0.16-75k3wk1b.mjs +0 -1
- package/dist/chunks/passes-1.0.16-gapgbvp7.mjs +0 -1
- package/dist/chunks/permissions-1.0.16-6gc12sjy.mjs +0 -1
- package/dist/chunks/permissions-1.0.16-taf27235.mjs +0 -3
- package/dist/chunks/plan-1.0.16-4h9sahxh.mjs +0 -1
- package/dist/chunks/plist-1.0.16-00prnk6z.mjs +0 -1
- package/dist/chunks/plugin-1.0.16-jzbt7gzr.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-1.0.16-v0g6m4h4.mjs +0 -1
- package/dist/chunks/plugins-1.0.16-vw4ae418.mjs +0 -9
- package/dist/chunks/preActionHook-1.0.16-cf53tkw8.mjs +0 -2
- package/dist/chunks/print-1.0.16-5trdtnez.mjs +0 -57
- package/dist/chunks/privacy-settings-1.0.16-tg3nb1jr.mjs +0 -1
- package/dist/chunks/process-1.0.16-nfkmm0cz.mjs +0 -1
- package/dist/chunks/processBashCommand-1.0.16-8kfkzt3n.mjs +0 -1
- package/dist/chunks/processSlashCommand-1.0.16-4g1pf3ny.mjs +0 -9
- package/dist/chunks/prompt-1.0.16-436taj0q.mjs +0 -1
- package/dist/chunks/prompt-1.0.16-a7sjgybs.mjs +0 -1
- package/dist/chunks/prompts-1.0.16-pv504jmf.mjs +0 -1
- package/dist/chunks/protocolHandler-1.0.16-4ewyrhnt.mjs +0 -13
- package/dist/chunks/provider-1.0.16-40avs022.mjs +0 -2
- package/dist/chunks/providerProfiles-1.0.16-19xj1cn0.mjs +0 -1
- package/dist/chunks/providerValidation-1.0.16-5kf26qqb.mjs +0 -6
- package/dist/chunks/rate-limit-options-1.0.16-r6wk8rnn.mjs +0 -1
- package/dist/chunks/registerSubcommands-1.0.16-ze1wp99c.mjs +0 -34
- package/dist/chunks/registry-1.0.16-kgejq595.mjs +0 -1
- package/dist/chunks/release-notes-1.0.16-scnheqw0.mjs +0 -5
- package/dist/chunks/reload-plugins-1.0.16-w0zg32ax.mjs +0 -2
- package/dist/chunks/remote-env-1.0.16-synwwy3m.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-1.0.16-ymnjt039.mjs +0 -1
- package/dist/chunks/remoteSession-1.0.16-3aayhp1c.mjs +0 -1
- package/dist/chunks/rename-1.0.16-s36f1cwm.mjs +0 -1
- package/dist/chunks/replBridgeHandle-1.0.16-xcggq12t.mjs +0 -1
- package/dist/chunks/replLauncher-1.0.16-pvrqbab9.mjs +0 -1
- package/dist/chunks/resume-1.0.16-q2dep3y4.mjs +0 -2
- package/dist/chunks/rewind-1.0.16-dq4wm5h4.mjs +0 -1
- package/dist/chunks/rootOptions-1.0.16-r0kb1zct.mjs +0 -1
- package/dist/chunks/runWorkflowHeadless-1.0.16-dysdbd7q.mjs +0 -10
- package/dist/chunks/sandbox-adapter-1.0.16-7n9xg27z.mjs +0 -1
- package/dist/chunks/sandbox-toggle-1.0.16-xz2rf4ej.mjs +0 -1
- package/dist/chunks/session-1.0.16-xkrx4se2.mjs +0 -2
- package/dist/chunks/sessionDiscovery-1.0.16-3dphfc07.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-1.0.16-jrwwz53s.mjs +0 -1
- package/dist/chunks/sessionStorage-1.0.16-ag63vscp.mjs +0 -1
- package/dist/chunks/settings-1.0.16-q87pq0zz.mjs +0 -1
- package/dist/chunks/setup-1.0.16-12fgxwkv.mjs +0 -5
- package/dist/chunks/sinks-1.0.16-36a05p86.mjs +0 -1
- package/dist/chunks/skills-1.0.16-7tmcq0a1.mjs +0 -1
- package/dist/chunks/startupProfiler-1.0.16-mqq1dtg8.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-1.0.16-w07gte63.mjs +0 -1
- package/dist/chunks/state-1.0.16-gwzstmaj.mjs +0 -1
- package/dist/chunks/stats-1.0.16-2erbkz9h.mjs +0 -6
- package/dist/chunks/status-1.0.16-6qqf5na3.mjs +0 -1
- package/dist/chunks/stickers-1.0.16-jf9tyw9z.mjs +0 -1
- package/dist/chunks/subprocessEnv-1.0.16-ngfdv3rn.mjs +0 -1
- package/dist/chunks/tasks-1.0.16-f2mpvw3j.mjs +0 -1
- package/dist/chunks/teamHelpers-1.0.16-1zqfw5kt.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-1.0.16-wq9c6fn5.mjs +0 -1
- package/dist/chunks/teleport-1.0.16-j0nb65ep.mjs +0 -1
- package/dist/chunks/terminalSetup-1.0.16-c2aasdh0.mjs +0 -1
- package/dist/chunks/theme-1.0.16-bp7rwprg.mjs +0 -1
- package/dist/chunks/thinkback-1.0.16-s5q9hf1f.mjs +0 -1
- package/dist/chunks/thinkback-play-1.0.16-qcz7ewrc.mjs +0 -1
- package/dist/chunks/toolPool-1.0.16-8jzr0b7x.mjs +0 -1
- package/dist/chunks/toolSearch-1.0.16-rh3m1amv.mjs +0 -1
- package/dist/chunks/tools-1.0.16-acdg9mcz.mjs +0 -1
- package/dist/chunks/trustedDevice-1.0.16-4skvbzg2.mjs +0 -1
- package/dist/chunks/turndown.cjs-1.0.16-bt2mzb9v.mjs +0 -69
- package/dist/chunks/types-1.0.16-12v2wggf.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-1.0.16-0sggaheg.mjs +0 -4
- package/dist/chunks/update-1.0.16-gaq5feph.mjs +0 -88
- package/dist/chunks/upgrade-1.0.16-4q1tw679.mjs +0 -1
- package/dist/chunks/upload-1.0.16-j0g88k8m.mjs +0 -7
- package/dist/chunks/upstreamproxy-1.0.16-dvxtbfnr.mjs +0 -14
- package/dist/chunks/url-handler-napi-1.0.16-41gcda5k.mjs +0 -1
- package/dist/chunks/usage-1.0.16-81hyem10.mjs +0 -1
- package/dist/chunks/util-1.0.16-vj3f24h4.mjs +0 -1
- package/dist/chunks/utils-1.0.16-b4gx7byh.mjs +0 -1
- package/dist/chunks/vim-1.0.16-jvbyy8tf.mjs +0 -1
- package/dist/chunks/watchLoop-1.0.16-rxr5a1c9.mjs +0 -13
- package/dist/chunks/watcher-1.0.16-c0bhk1zf.mjs +0 -1
- package/dist/chunks/wiki-1.0.16-36wp5225.mjs +0 -132
- package/dist/chunks/workflows-1.0.16-0es24xfj.mjs +0 -1
- package/dist/chunks/worktree-1.0.16-yhpvswv0.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-1.0.16-h6ctn92v.mjs +0 -1
- package/dist/chunks/wrapper-1.0.16-phy8pddr.mjs +0 -7
- /package/dist/chunks/{cli-1.0.16-vkzqt5g9.mjs → cli-1.0.17-9ktgfern.mjs} +0 -0
- /package/dist/chunks/{cli-1.0.16-1mzm316y.mjs → cli-1.0.17-d25jj43z.mjs} +0 -0
- /package/dist/chunks/{cli-1.0.16-jz90b7gc.mjs → cli-1.0.17-j7brfjt1.mjs} +0 -0
- /package/dist/chunks/{cli-1.0.16-bsg2fea8.mjs → cli-1.0.17-t0tb5qzh.mjs} +0 -0
- /package/dist/chunks/{cli-1.0.16-y02n1td1.mjs → cli-1.0.17-v698jz68.mjs} +0 -0
- /package/dist/chunks/{cli-1.0.16-y98j8rxt.mjs → cli-1.0.17-y1rnx6nw.mjs} +0 -0
- /package/dist/chunks/{cli-1.0.16-fjg1p1sc.mjs → cli-1.0.17-zdnd89rw.mjs} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{DV as k,EV as f,UV as u}from"./cli-1.0.16-vfk0g9d8.mjs";import{JX as C,VX as d}from"./cli-1.0.16-g2ya82h9.mjs";import{o4 as A,q4 as F}from"./cli-1.0.16-16qr698n.mjs";import{M4 as q,S4 as i}from"./cli-1.0.16-s5y2vt2x.mjs";import{I8 as W,L8 as _,S8 as j,T8 as w,Y8 as I}from"./cli-1.0.16-fskj6kkz.mjs";import{qga as V,yga as U}from"./cli-1.0.16-t2ky4p5s.mjs";import{Via as M,Wia as v}from"./cli-1.0.16-natadjxz.mjs";import{Dja as X,Eja as R,Ija as p,_ja as J,bka as x}from"./cli-1.0.16-04tr8fw7.mjs";import{Fka as T,yka as P}from"./cli-1.0.16-7hc7p9x4.mjs";import{isa as O}from"./cli-1.0.16-y9yxyd77.mjs";x();U();F();v();x();T();U();_();I();p();import{randomUUID as E}from"crypto";var h=2000,y=5,S=30000,Y=3,c=new Set([4003]);function D(B){if(typeof B!=="object"||B===null||!("type"in B))return!1;return typeof B.type==="string"}class L{sessionId;orgUuid;getAccessToken;callbacks;ws=null;state="closed";reconnectAttempts=0;sessionNotFoundRetries=0;pingInterval=null;reconnectTimer=null;constructor(B,z,Q,H){this.sessionId=B;this.orgUuid=z;this.getAccessToken=Q;this.callbacks=H}async connect(){if(this.state==="connecting"){J("[SessionsWebSocket] Already connecting");return}this.state="connecting";let z=`${M().BASE_API_URL.replace("https://","wss://")}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;J(`[SessionsWebSocket] Connecting to ${z}`);let H={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":"2023-06-01"};if(typeof Bun<"u"){let $=new globalThis.WebSocket(z,{headers:H,proxy:w(z),tls:W()||void 0});this.ws=$,$.addEventListener("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),$.addEventListener("message",(Z)=>{let K=typeof Z.data==="string"?Z.data:String(Z.data);this.handleMessage(K)}),$.addEventListener("error",()=>{let Z=Error("[SessionsWebSocket] WebSocket error");V(Z),this.callbacks.onError?.(Z)}),$.addEventListener("close",(Z)=>{J(`[SessionsWebSocket] Closed: code=${Z.code} reason=${Z.reason}`),this.handleClose(Z.code)}),$.addEventListener("pong",()=>{J("[SessionsWebSocket] Pong received")})}else{let{default:$}=await import("./wrapper-1.0.16-phy8pddr.mjs"),Z=new $(z,{headers:H,agent:j(z),...W()});this.ws=Z,Z.on("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),Z.on("message",(K)=>{this.handleMessage(K.toString())}),Z.on("error",(K)=>{V(Error(`[SessionsWebSocket] Error: ${K.message}`)),this.callbacks.onError?.(K)}),Z.on("close",(K,G)=>{J(`[SessionsWebSocket] Closed: code=${K} reason=${G.toString()}`),this.handleClose(K)}),Z.on("pong",()=>{J("[SessionsWebSocket] Pong received")})}}handleMessage(B){try{let z=R(B);if(D(z))this.callbacks.onMessage(z);else J(`[SessionsWebSocket] Ignoring message type: ${typeof z==="object"&&z!==null&&"type"in z?String(z.type):"unknown"}`)}catch(z){V(Error(`[SessionsWebSocket] Failed to parse message: ${P(z)}`))}}handleClose(B){if(this.stopPingInterval(),this.state==="closed")return;this.ws=null;let z=this.state;if(this.state="closed",c.has(B)){J(`[SessionsWebSocket] Permanent close code ${B}, not reconnecting`),this.callbacks.onClose?.();return}if(B===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>Y){J(`[SessionsWebSocket] 4001 retry budget exhausted (${Y}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(h*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${Y}`);return}if(z==="connected"&&this.reconnectAttempts<y)this.reconnectAttempts++,this.scheduleReconnect(h,`attempt ${this.reconnectAttempts}/${y}`);else J("[SessionsWebSocket] Not reconnecting"),this.callbacks.onClose?.()}scheduleReconnect(B,z){this.callbacks.onReconnecting?.(),J(`[SessionsWebSocket] Scheduling reconnect (${z}) in ${B}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},B)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state==="connected")try{this.ws.ping?.()}catch{}},S)}stopPingInterval(){if(this.pingInterval)clearInterval(this.pingInterval),this.pingInterval=null}sendControlResponse(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}J("[SessionsWebSocket] Sending control response"),this.ws.send(X(B))}sendControlRequest(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}let z={type:"control_request",request_id:E(),request:B};J(`[SessionsWebSocket] Sending control request: ${B.subtype}`),this.ws.send(X(z))}isConnected(){return this.state==="connected"}close(){if(J("[SessionsWebSocket] Closing connection"),this.state="closed",this.stopPingInterval(),this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.ws)this.ws.close(),this.ws=null}reconnect(){J("[SessionsWebSocket] Force reconnecting"),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}}function N(B){return B.type!=="control_request"&&B.type!=="control_response"&&B.type!=="control_cancel_request"}class b{config;callbacks;websocket=null;pendingPermissionRequests=new Map;constructor(B,z){this.config=B;this.callbacks=z}connect(){J(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let B={onMessage:(z)=>this.handleMessage(z),onConnected:()=>{J("[RemoteSessionManager] Connected"),this.callbacks.onConnected?.()},onClose:()=>{J("[RemoteSessionManager] Disconnected"),this.callbacks.onDisconnected?.()},onReconnecting:()=>{J("[RemoteSessionManager] Reconnecting"),this.callbacks.onReconnecting?.()},onError:(z)=>{V(z),this.callbacks.onError?.(z)}};this.websocket=new L(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,B),this.websocket.connect()}handleMessage(B){if(B.type==="control_request"){this.handleControlRequest(B);return}if(B.type==="control_cancel_request"){let{request_id:z}=B,Q=this.pendingPermissionRequests.get(z);J(`[RemoteSessionManager] Permission request cancelled: ${z}`),this.pendingPermissionRequests.delete(z),this.callbacks.onPermissionCancelled?.(z,Q?.tool_use_id);return}if(B.type==="control_response"){J("[RemoteSessionManager] Received control response");return}if(N(B))this.callbacks.onMessage(B)}handleControlRequest(B){let{request_id:z,request:Q}=B;if(Q.subtype==="can_use_tool")J(`[RemoteSessionManager] Permission request for tool: ${Q.tool_name}`),this.pendingPermissionRequests.set(z,Q),this.callbacks.onPermissionRequest(Q,z);else{J(`[RemoteSessionManager] Unsupported control request subtype: ${Q.subtype}`);let H={type:"control_response",response:{subtype:"error",request_id:z,error:`Unsupported control request subtype: ${Q.subtype}`}};this.websocket?.sendControlResponse(H)}}async sendMessage(B,z){J(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let Q=await A(this.config.sessionId,B,z);if(!Q)V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`));return Q}respondToPermissionRequest(B,z){if(!this.pendingPermissionRequests.get(B)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${B}`));return}this.pendingPermissionRequests.delete(B);let H={type:"control_response",response:{subtype:"success",request_id:B,response:{behavior:z.behavior,...z.behavior==="allow"?{updatedInput:z.updatedInput}:{message:z.message}}}};J(`[RemoteSessionManager] Sending permission response: ${z.behavior}`),this.websocket?.sendControlResponse(H)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){J("[RemoteSessionManager] Sending interrupt signal"),this.websocket?.sendControlRequest({subtype:"interrupt"})}getSessionId(){return this.config.sessionId}disconnect(){J("[RemoteSessionManager] Disconnecting"),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){J("[RemoteSessionManager] Reconnecting WebSocket"),this.websocket?.reconnect()}}function $z(B,z,Q,H=!1,$=!1){return{sessionId:B,getAccessToken:z,orgUuid:Q,hasInitialPrompt:H,viewerOnly:$}}x();U();d();u();function Xz(){let B=C();if(!B?.teamName||!B?.agentName){J("[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)");return}let{teamName:z,agentId:Q,agentName:H}=B,$=f(z);if(!$){V(Error(`[computeInitialTeamContext] Could not read team file for ${z}`));return}let Z=k(z),K=!Q;return J(`[Reconnection] Computed initial team context for ${K?"leader":`teammate ${H}`} in team ${z}`),{teamName:z,teamFilePath:Z,leadAgentId:$.leadAgentId,selfAgentId:Q,selfAgentName:H,isLeader:K,teammates:{}}}function Wz(B,z,Q){let H=f(z);if(!H){V(Error(`[initializeTeammateContextFromSession] Could not read team file for ${z} (agent: ${Q})`));return}let $=H.members.find((G)=>G.name===Q);if(!$)J(`[Reconnection] Member ${Q} not found in team ${z} - may have been removed`);let Z=$?.agentId,K=k(z);B((G)=>({...G,teamContext:{teamName:z,teamFilePath:K,leadAgentId:H.leadAgentId,selfAgentId:Z,selfAgentName:Q,isLeader:!1,teammates:{}}})),J(`[Reconnection] Initialized agent context from session for ${Q} in team ${z}`)}i();var m={"claude-3-opus":{modelName:"Claude 3 Opus",retirementDates:{firstParty:"January 5, 2026",bedrock:"January 15, 2026",vertex:"January 5, 2026",foundry:"January 5, 2026"}},"claude-3-7-sonnet":{modelName:"Claude 3.7 Sonnet",retirementDates:{firstParty:"February 19, 2026",bedrock:"April 28, 2026",vertex:"May 11, 2026",foundry:"February 19, 2026"}},"claude-3-5-haiku":{modelName:"Claude 3.5 Haiku",retirementDates:{firstParty:"February 19, 2026",bedrock:null,vertex:null,foundry:null}}};function l(B){let z=B.toLowerCase(),Q=q();for(let[H,$]of Object.entries(m)){let Z=$.retirementDates[Q];if(!z.includes(H)||!Z)continue;return{isDeprecated:!0,modelName:$.modelName,retirementDate:Z}}return{isDeprecated:!1}}function Lz(B){if(!B)return null;let z=l(B);if(!z.isDeprecated)return null;return`⚠ ${z.modelName} will be retired on ${z.retirementDate}. Consider switching to a newer model.`}
|
|
2
|
-
export{b as Na,$z as Oa,Xz as Pa,Wz as Qa,Lz as Ra};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import{Fc as zc,Gc as on}from"./cli-1.0.16-a2d2s2cs.mjs";import{Hc as Vh,Ic as jt,Jc as Vt,Kc as Oc,Mc as jn}from"./cli-1.0.16-dggf3mwp.mjs";import{Nc as ft,Qc as Dn}from"./cli-1.0.16-2gwj41fw.mjs";import{$H as xn,AG as zu,BG as Ru,CG as rn,Np as Mu,Op as Tu,Pp as Uu,Qp as Eu,Rp as nc,Sp as Ct,Tp as Xh,Up as Pu,Vp as Bu,Wp as Ln,XH as eh,Xp as Nh,YF as Xt,YH as jc,ZF as sh,Zp as ou,_H as In,_p as ac,_x as bc,aq as pu,ay as Pn,dq as ku,eq as An,fq as Lu,gG as S,gq as Qu,hG as Dc,hq as Nu,hx as Cc,iG as Bn,iq as Ju,ix as lc,jq as at,jx as rc,kq as Ah,kx as wc,lq as gn,lr as yc,lx as En,mq as Jh,mr as Un,oq as Gu,pq as mc,rq as Su,xG as bu,yG as ln,zG as Ou}from"./cli-1.0.16-pz654728.mjs";import{iY as D,kY as Mn,wY as uc,xY as Tn}from"./cli-1.0.16-b475h1qv.mjs";import{G0 as F,I0 as y,l1 as Eh}from"./cli-1.0.16-2thxt6pw.mjs";import{A2 as oh,B2 as cc,C2 as ph,o2 as Ph,p2 as Bh,q2 as Ih,r2 as xh,s2 as Dh,t2 as xc,w2 as jh}from"./cli-1.0.16-n6bm43be.mjs";import{T3 as yt,U3 as n,V3 as z,W3 as Tt}from"./cli-1.0.16-5axjzbba.mjs";import{X3 as Qt}from"./cli-1.0.16-gydkk4pv.mjs";import{s4 as Pt,t4 as qu}from"./cli-1.0.16-21yhbzk0.mjs";import{D6 as Dt,J4 as Uh,L4 as Ic,V6 as Wn}from"./cli-1.0.16-s5y2vt2x.mjs";import{$ea as xt,Afa as bh,Bfa as ru,Cfa as wu,Dfa as Cn,Efa as Lh,Ffa as gu,Gfa as Qh,Ifa as Xu,Kfa as hc,Lfa as pt,Uea as tc,Vea as $t,Wea as Hn,Xea as ot,Yea as x,_ea as B,_fa as Kn,bfa as Jt,cfa as Fh,dfa as ut,efa as ct,f_ as qt,g_ as Sn,ifa as nt,jfa as _h,lfa as kh,pfa as Th,ufa as Oh,vfa as yu,wfa as Cu,xfa as Ut,yfa as zh,zfa as lu}from"./cli-1.0.16-t2ky4p5s.mjs";import{Nka as o,Vka as Et}from"./cli-1.0.16-q2g1eds7.mjs";import{dsa as Lt,esa as Gn,hsa as I}from"./cli-1.0.16-y9yxyd77.mjs";function pc(t,h=Ch,u){let a=x().find((w)=>w.provider==="openai"&&w.extras?.githubToken!==void 0);if(a){if(!ct(a.id,{provider:"openai",name:a.name,baseUrl:u||a.baseUrl,model:a.model||h,apiKey:t,extras:{...a.extras,githubToken:t}}))return{mode:"failed"};return nt(a.id),{mode:"updated"}}if(!ut({provider:"openai",name:"GitHub Copilot",baseUrl:u||oc,model:h,apiKey:t,extras:{githubToken:t}},{makeActive:!0}))return{mode:"failed"};return{mode:"created"}}function vh({onDone:t,onBack:h,onChangeAPIKey:u}){let a=jh()?.trim()?"already-authed":"menu",[C,w]=j.useState(a),[f,A]=j.useState(null),[$,R]=j.useState(""),[X,J]=j.useState(0),[Q,H]=j.useState(null),V=j.useCallback(async(i,Z=Ch,mt,N)=>{let P=oh(i,mt,N?.enterpriseDomain);if(!P.success){A(P.warning??"Could not save token to secure storage."),w("error");return}if(pc(i,Z,N?.baseUrl).mode==="failed"){A("Could not save the GitHub Copilot provider profile."),w("error");return}Uh(),u?.(),t("GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.",{display:"user"})},[u,t]),O=j.useCallback(async(i)=>{w("device-busy"),A(null),H(null);try{let Z=await Bh({domain:i});H({user_code:Z.user_code,verification_uri:Z.verification_uri}),await xh(Z.verification_uri);let mt=await Ih(Z.device_code,{initialInterval:Z.interval,timeoutSeconds:Z.expires_in,domain:i}),N=await Dh(mt,{domain:i});await V(N.token,Ch,mt,{baseUrl:N.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:i})}catch(Z){A(Z instanceof Error?Z.message:String(Z)),w("error")}},[V]);if(C==="already-authed")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot"}),n(y,{children:"You are already signed in to GitHub Copilot."}),n(y,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),n(S,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"back"}],onChange:(Z)=>{if(Z==="sign-in-again"){O();return}if(Z==="enterprise"){w("enterprise-domain");return}if(h){h();return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="enterprise-domain")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Enterprise sign-in"}),n(y,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:">"}),n(Xt,{value:$,onChange:R,onSubmit:()=>{let Z=Ph($);if(!Z){O();return}O(Z)},onExit:()=>w(a),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:X,onChangeCursorOffset:J})]}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(C==="error"&&f)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"red",children:f}),n(S,{options:[{label:h?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(Z)=>{if(Z==="back"){if(h){h();return}w("menu"),A(null);return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="device-busy")return z(F,{flexDirection:"column",gap:1,children:[n(y,{children:"GitHub Copilot sign-in"}),Q?z(yt,{children:[z(y,{children:["Enter code ",n(y,{bold:!0,children:Q.user_code})," at"," ",Q.verification_uri]}),n(y,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):n(y,{dimColor:!0,children:"Requesting device code from GitHub..."}),n(eh,{})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot setup"}),n(y,{dimColor:!0,children:"Stores your token in the OS credential store (macOS Keychain when available) and creates a /provider profile so Copilot is the active provider — no manual env exports required."}),n(S,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(i)=>{if(i==="cancel"){if(h){h();return}t("GitHub onboard cancelled",{display:"system"});return}if(i==="enterprise"){w("enterprise-domain");return}O()}})]})}var j,Ch="github:copilot",oc="https://api.githubcopilot.com";var tu=I(()=>{Dc();jc();sh();Eh();xc();ph();Ic();Th();Tt();j=Lt(Qt(),1)});function uu(t){return[t.name,t.family??"",...t.families??[],t.parameterSize??"",t.quantizationLevel??""].join(" ").toLowerCase()}function Nt(t,h){return h.some((u)=>t.includes(u))}function tn(t){return!Nt(uu(t),hu)}function hn(t){return t.find(tn)??null}function lh(t){let u=`${t.parameterSize??""} ${t.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(u?.[1])return Number(u[1]);if(typeof t.sizeBytes==="number"&&t.sizeBytes>0)return Number((t.sizeBytes/1e9).toFixed(1));return null}function un(t){return(t.quantizationLevel??t.name).toLowerCase()}function cn(t,h,u){if(t===null)return u.push("unknown size"),0;if(h==="latency"){if(t<=4)return u.push("tiny model for low latency"),32;if(t<=8)return u.push("small model for fast responses"),26;if(t<=14)return u.push("mid-sized model with acceptable latency"),16;if(t<=24)return u.push("larger model may be slower"),8;return u.push("large model likely slower locally"),t<=40?0:-8}if(h==="coding"){if(t>=7&&t<=14)return u.push("strong coding size tier"),24;if(t>14&&t<=34)return u.push("large coding-capable size tier"),28;if(t>34)return u.push("very large model with higher quality potential"),18;return u.push("compact model may trade off coding depth"),12}if(t>=7&&t<=14)return u.push("great balanced size tier"),26;if(t>=3&&t<7)return u.push("compact balanced size tier"),18;if(t>14&&t<=24)return u.push("high quality balanced size tier"),20;if(t>24)return u.push("large model for quality-first usage"),10;return u.push("very small model for general usage"),8}function nn(t,h,u){let a=un(t);if(a.includes("q4"))return u.push("efficient Q4 quantization"),h==="latency"?8:4;if(a.includes("q5"))return u.push("balanced Q5 quantization"),h==="latency"?6:5;if(a.includes("q8"))return u.push("higher quality Q8 quantization"),h==="latency"?2:5;return 0}function an(t,h,u){if(h.score!==t.score)return h.score-t.score;let a=lh(t)??Number.POSITIVE_INFINITY,C=lh(h)??Number.POSITIVE_INFINITY;if(u==="latency")return a-C;if(u==="coding")return C-a;let w=14;return Math.abs(a-w)-Math.abs(C-w)}function rh(t,h){return t.map((u)=>{let a=uu(u),C=[],w=0;if(Nt(a,hu))w-=40,C.push("not a chat-first model");if(Nt(a,sc))w+=h==="coding"?24:h==="balanced"?10:4,C.push("coding-oriented model family");if(Nt(a,ec))w+=h==="latency"?4:h==="coding"?6:8,C.push("strong general-purpose model family");if(Nt(a,vc))w+=h==="latency"?2:6,C.push("chat/instruct tuned");if(a.includes("vision")||a.includes("vl"))w-=2,C.push("vision model adds extra overhead");w+=cn(lh(u),h,C),w+=nn(u,h,C);let f=C.slice(0,3).join(", ");return{...u,score:w,reasons:C,summary:f}}).sort((u,a)=>an(u,a,h))}function cu(t,h){return hn(rh(t,h))}var sc,ec,vc,hu;var nu=I(()=>{sc=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],ec=["llama","qwen","mistral","gemma","phi","deepseek"],vc=["instruct","chat","assistant"],hu=["embed","embedding","rerank","bge","whisper"]});function yn(t){let h=t.toLowerCase();return mn.some((u)=>h.includes(u))}function wh(t){try{let h=new URL(t);if(h.username)h.username="redacted";if(h.password)h.password="redacted";for(let u of h.searchParams.keys())if(yn(u))h.searchParams.set(u,"redacted");return h.toString()}catch{return t.replace(/\/\/[^/@\s]+(?::[^/@\s]*)?@/g,"//redacted@").replace(/([?&](?:token|access_token|refresh_token|api_key|apikey|key|password|passwd|pwd|auth|authorization|signature|sig|secret)=)[^&#]*/gi,"$1redacted")}}var mn;var au=I(()=>{mn=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function wn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URL(`${Oh}/oauth/authorize`);return u.searchParams.append("response_type","code"),u.searchParams.append("client_id",zh()),u.searchParams.append("redirect_uri",h),u.searchParams.append("scope",yu),u.searchParams.append("code_challenge",t.codeChallenge),u.searchParams.append("code_challenge_method","S256"),u.searchParams.append("id_token_add_organizations","true"),u.searchParams.append("codex_cli_simplified_flow","true"),u.searchParams.append("state",t.state),u.searchParams.append("originator",Cu),u.toString()}function bn(){return`<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title>Codex Login Complete</title>
|
|
6
|
-
<style>
|
|
7
|
-
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
8
|
-
h1 { margin: 0 0 12px; font-size: 22px; }
|
|
9
|
-
p { margin: 0 0 10px; }
|
|
10
|
-
</style>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<h1>Codex login complete</h1>
|
|
14
|
-
<p>You can return to Claudin now.</p>
|
|
15
|
-
<p>Claudin will finish activating your new Codex OAuth login.</p>
|
|
16
|
-
</body>
|
|
17
|
-
</html>`}function On(t){return`<!doctype html>
|
|
18
|
-
<html lang="en">
|
|
19
|
-
<head>
|
|
20
|
-
<meta charset="utf-8" />
|
|
21
|
-
<title>Codex Login Failed</title>
|
|
22
|
-
<style>
|
|
23
|
-
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
24
|
-
h1 { margin: 0 0 12px; font-size: 22px; color: #991b1b; }
|
|
25
|
-
p { margin: 0 0 10px; }
|
|
26
|
-
</style>
|
|
27
|
-
</head>
|
|
28
|
-
<body>
|
|
29
|
-
<h1>Codex login failed</h1>
|
|
30
|
-
<p>${ru(t)}</p>
|
|
31
|
-
<p>You can close this window and try again in Claudin.</p>
|
|
32
|
-
</body>
|
|
33
|
-
</html>`}function mu(){return`<!doctype html>
|
|
34
|
-
<html lang="en">
|
|
35
|
-
<head>
|
|
36
|
-
<meta charset="utf-8" />
|
|
37
|
-
<title>Codex Login Cancelled</title>
|
|
38
|
-
<style>
|
|
39
|
-
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
40
|
-
h1 { margin: 0 0 12px; font-size: 22px; }
|
|
41
|
-
p { margin: 0 0 10px; }
|
|
42
|
-
</style>
|
|
43
|
-
</head>
|
|
44
|
-
<body>
|
|
45
|
-
<h1>Codex login cancelled</h1>
|
|
46
|
-
<p>You can close this window and retry in Claudin.</p>
|
|
47
|
-
</body>
|
|
48
|
-
</html>`}async function zn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:h,client_id:zh(),code_verifier:t.codeVerifier}),a=await fetch(`${Oh}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u,signal:t.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!a.ok){let R=await a.text().catch(()=>"");throw Error(R.trim()?`Codex OAuth token exchange failed (${a.status}): ${R.trim()}`:`Codex OAuth token exchange failed with status ${a.status}.`)}let C=await a.json(),w=Ut(C.access_token),f=Ut(C.refresh_token);if(!w||!f)throw Error("Codex OAuth completed, but the token response was missing credentials.");let A=Ut(C.id_token);return{apiKey:A?await wu(A).catch(()=>{return}):void 0,accessToken:w,refreshToken:f,idToken:A,accountId:bh(A)??bh(w)}}class Rh{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(t){let h=Ou(),u=lu(),a=new bu("/auth/callback");this.authCodeListener=a,this.port=null;try{let C=await a.start(u);this.port=C;let w=Ru(),f=await zu(h),A=wn({port:C,codeChallenge:f,state:w});try{let $=await a.waitForAuthorization(w,async()=>{await t(A)}),R=new AbortController;this.tokenExchangeAbortController=R;let X;try{X=await zn({authorizationCode:$,codeVerifier:h,port:C,signal:R.signal})}finally{if(this.tokenExchangeAbortController===R)this.tokenExchangeAbortController=null}if(this.authCodeListener!==a)throw this.buildCancellationError();return a.handleSuccessRedirect([],(J)=>{J.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),J.end(bn())}),X}catch($){let R=this.authCodeListener===a?$:this.buildCancellationError();if(a.hasPendingResponse()){let X=R instanceof Error&&R.message==="Codex OAuth flow was cancelled.";a.handleErrorRedirect((J)=>{J.writeHead(X?200:400,{"Content-Type":"text/html; charset=utf-8"}),J.end(X?mu():On(R instanceof Error?R.message:String(R)))})}throw R}finally{this.cleanup()}}catch(C){let w=C instanceof Error?C.message:String(C);if(w.includes("EADDRINUSE")||w.includes(String(u)))throw Error(`Codex OAuth needs localhost:${u} for its callback. Close any app already using that port and try again.`);throw C}}cleanup(){let t=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(t),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((h)=>{h.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),h.end(mu())});this.authCodeListener?.cancelPendingAuthorization(t),this.authCodeListener=null,this.port=null}}var Au=I(()=>{ln();rn();Cn()});function Rn(){return new Rh}function $u(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Rn,a=t.deps?.openBrowser??Pt,C=t.deps?.saveCodexCredentials??gu,w=t.deps?.isBareMode??o,[f,A]=Bt.useState({state:"starting"});return Bt.useEffect(()=>{if(w()){A({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startOAuthFlow(async(X)=>{if($)return;A({state:"waiting",authUrl:X,browserOpened:null});let J=await a(X);if($)return;A({state:"waiting",authUrl:X,browserOpened:J})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=C({apiKey:X.apiKey,accessToken:X.accessToken,refreshToken:X.refreshToken,idToken:X.idToken,accountId:X.accountId,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;A({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,w,h,a,C]),f}var Bt;var fu=I(()=>{Au();qu();Xu();Et();Bt=Lt(Qt(),1)});function du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":ku()}}function _u(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function fn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Fn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Qu,{method:"POST",headers:du(),body:new URLSearchParams({client_id:Ah(),scope:Ju}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`xAI device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=at(C.device_code),f=at(C.user_code),A=at(C.verification_uri);if(!w||!f||!A)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:at(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:Zu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Vu/1000}}async function _n(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??fn,C=h?.now??(()=>Date.now()),w=_u(t.expires_in,Zu),f=C()+w,A=Math.max(_u(t.interval,Vu),Xn);while(C()<f){if(h?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let $=await u(Lu,{method:"POST",headers:du(),body:new URLSearchParams({grant_type:Nu,client_id:Ah(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=at(Q.access_token),V=at(Q.refresh_token);if(!H||!V)throw Error("xAI OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:3600;return{accessToken:H,refreshToken:V,idToken:at(Q.id_token),expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+qn,$n),await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(R.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`xAI device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("xAI device authorization timed out.")}class gh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Fn({signal:h.signal});return await t(u),await _n(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var Vu=5000,Xn=1000,qn=5000,$n=60000,Zu=300000,Fu=3000;var Yu=I(()=>{An();gn()});function kn(){return new gh}function Hu(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??kn,a=t.deps?.saveXaiCredentials??Gu,C=t.deps?.isBareMode??o,[w,f]=It.useState({state:"starting"});return It.useEffect(()=>{if(C()){f({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let A=!1,$=u();return $.startDeviceFlow(async(R)=>{if(A)return;f({state:"waiting",userCode:R.user_code,verificationUri:R.verification_uri,verificationUriComplete:R.verification_uri_complete})}).then(async(R)=>{if(A)return;await h(R,(J)=>{let Q=a({accessToken:R.accessToken,refreshToken:R.refreshToken,idToken:R.idToken,expiresAt:R.expiresAt,profileId:J?.profileId});if(!Q.success)throw Error(Q.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((R)=>{if(A)return;f({state:"error",message:R instanceof Error?R.message:String(R)})}),()=>{A=!0,$.cleanup()}},[u,C,h,a]),w}var It;var Ku=I(()=>{Yu();Et();Su();It=Lt(Qt(),1)});async function Du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":Eu,...await Bu()}}function iu(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function Vn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Zn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Mu,{method:"POST",headers:await Du(),body:new URLSearchParams({client_id:Xh()}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`Kimi device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=Ct(C.device_code),f=Ct(C.user_code),A=Ct(C.verification_uri);if(!w||!f||!A)throw Error("Kimi device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:Ct(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:xu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Iu/1000}}async function dn(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??Vn,C=h?.now??(()=>Date.now()),w=iu(t.expires_in,xu),f=C()+w,A=Math.max(iu(t.interval,Iu),Qn);while(C()<f){if(h?.signal?.aborted)throw Error("Kimi device authorization was cancelled.");let $=await u(Tu,{method:"POST",headers:await Du(),body:new URLSearchParams({grant_type:Uu,client_id:Xh(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=Ct(Q.access_token),V=Ct(Q.refresh_token);if(!H||!V)throw Error("Kimi OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:900;return{accessToken:H,refreshToken:V,expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+Nn,Jn),await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("Kimi device authorization was denied.");if(R.error==="expired_token")throw Error("Kimi device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`Kimi device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("Kimi device authorization timed out.")}class qh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Zn({signal:h.signal});return await t(u),await dn(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("Kimi device authorization was cancelled.")),this.abortController=null}}var Iu=5000,Qn=1000,Nn=5000,Jn=60000,xu=1800000,Wu=3000;var ju=I(()=>{Ln();Pu()});function Yn(){return new qh}function su(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Yn,a=t.deps?.saveKimiCredentials??ou,C=t.deps?.isBareMode??o,[w,f]=lt.useState({state:"starting"}),A=lt.useRef(!1);return lt.useEffect(()=>{if(C()){f({state:"error",message:"Kimi Code OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startDeviceFlow(async(X)=>{if($)return;f({state:"waiting",userCode:X.user_code,verificationUri:X.verification_uri,verificationUriComplete:X.verification_uri_complete})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=a({accessToken:X.accessToken,refreshToken:X.refreshToken,expiresAt:X.expiresAt,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Kimi Code OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;f({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,C,h,a]),lt.useEffect(()=>{if(w.state!=="waiting")return;if(A.current)return;let $=w.verificationUriComplete??w.verificationUri;if(!$)return;A.current=!0,Pt($).catch(()=>{})},[w]),w}var lt;var eu=I(()=>{ju();qu();Et();pu();lt=Lt(Qt(),1)});function ca(t){return{name:t.name,baseUrl:t.baseUrl,model:t.model,apiKey:t.apiKey??""}}function na(t){let h=ot(t);return{name:h.name,baseUrl:h.baseUrl,model:h.model,apiKey:h.apiKey??""}}function aa(t){let h={};for(let u of t.split(/\r?\n/)){let a=u.trim();if(!a)continue;let C=a.indexOf(":");if(C<=0)continue;let w=a.slice(0,C).trim(),f=a.slice(C+1).trim();if(w&&f)h[w]=f}return h}function ma(t){if(!t)return"";return Object.entries(t).map(([h,u])=>`${h}: ${u}`).join(`
|
|
49
|
-
`)}function ya(t,h){let u={},a=t.awsRegion?.trim();if(a)u.awsRegion=a;let C=t.gcpProject?.trim();if(C)u.gcpProject=C;let w=t.gcpRegion?.trim();if(w)u.gcpRegion=w;let f=t.azureResource?.trim();if(f)u.azureResource=f;let A=aa(h);if(Object.keys(A).length>0)u.customHeaders=A;return Object.keys(u).length>0?u:void 0}function la(t,h){let u=h?" (active)":"",a=t.apiKey?"key set":"no key",C=t.provider==="anthropic"?"anthropic":"openai-compatible",w=tc(t.model),f=w.length<=3?w.join(", "):`${w[0]}, ${w[1]} + ${w.length-2} more`;return`${C} · ${t.baseUrl} · ${f} · ${a}${u}`}function ra(t,h){if(t.state==="unreachable")return`Could not reach Atomic Chat at ${wh(h)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(t.state==="no_models")return"Atomic Chat is running, but no models are loaded. Download and load a model inside the Atomic Chat app first, or enter details manually.";return""}function wa(t,h){if(t.state==="unreachable")return`Could not reach Ollama at ${wh(h)}. Start Ollama first, or enter the endpoint manually.`;if(t.state==="no_models")return"Ollama is running, but no installed models were found. Pull a chat model such as qwen2.5-coder:7b or llama3.1:8b first, or enter details manually.";if(t.state==="generation_failed"){let u=t.probeModel??"the selected model",a=t.detail?` Details: ${t.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${u}.${a} Run "ollama run ${u}" once and retry, or enter details manually.`}return""}function fh(t,h){if(!h)return;return t.find((u)=>u.id===h)}function vu(t,h){return Boolean(t&&h&&t.id===h)}function ba(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===Zh&&!u.apiKey)}function Oa(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===pt&&!u.apiKey)}function za(t,h){return t.find((u)=>u.provider==="anthropic"&&u.baseUrl===h&&!u.apiKey)}function Ra({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=$u({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Codex OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Codex OAuth"}),n(y,{children:"Sign in with your ChatGPT account in the browser. Claudin will store the resulting Codex credentials securely and switch this session to the new Codex login when setup completes."}),a.state==="starting"?n(y,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):a.browserOpened===!1?z(yt,{children:[n(y,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),n(y,{children:a.authUrl})]}):a.browserOpened===!0?z(yt,{children:[n(y,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),n(y,{children:a.authUrl})]}):n(y,{dimColor:!0,children:"Opening your browser..."}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Aa({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=Hu({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"xAI OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from xAI..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function ga({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t);let a=su({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Kimi Code OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to Moonshot AI authentication choices"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI · Kimi Code"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from Kimi..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Vm({mode:t,onDone:h}){let u=bc(),[a,C]=g.useState([]),[w,f]=g.useState(),[A,$]=g.useState(),[R,X]=g.useState(!1),[J,Q]=g.useState(),H=g.useRef(0),[V,O]=g.useState(t==="first-run"?"select-preset":"menu"),[wt,i]=g.useState(null),[Z,mt]=g.useState("openai"),[N,P]=g.useState(()=>na("ollama")),[Zt,dt]=g.useState({}),[dh,st]=g.useState(""),[Rc,Ac]=g.useState(0),[gc,Xc]=g.useState(0),[et,Yh]=g.useState(null),[bt,Ft]=g.useState(0),[Ot,p]=g.useState(0),[qc,s]=g.useState(0),[Gh,Y]=g.useState(),[zt,_]=g.useState(),[$c,fc]=g.useState(),[Sh,Yt]=g.useState(!1),[_t,kt]=g.useState(),[e,Gt]=g.useState({state:"idle"}),[v,St]=g.useState({state:"idle"}),[tt,vt]=g.useState({state:"idle"}),[Fc,_c]=g.useState(!0),[kc,E]=g.useState(!1),th=g.useRef(!1),[hh,uh]=g.useState(()=>Vt()),[Hh,Lc]=g.useState(()=>Oc());g.useEffect(()=>{queueMicrotask(()=>{let c=x(),m=B()?.id;C(c),f(m),$(xt()),Q(Fh()),X(Jt()),_c(!1)})},[]);let Rt=rt[Ot]??rt[0],Ht=Rt.key,Qc=N[Ht],ch=a.length>0,Kt=ch,Kh=g.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Copy ~/.claude/ tokens, settings, skills, agents, plugins."}]:[],{value:"activate",label:"Set active provider (Global)",description:J?`Currently: ${a.find((c)=>c.id===J)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!Kt},{value:"activate-project",label:"Set active provider (Project)",description:A?`Currently: ${a.find((c)=>c.id===A)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!Kt},...R?[{value:"clear-project-override",label:"Clear project provider override",description:A?"Stop overriding for this project; fall back to global":"Project override points to a missing profile; clear it"}]:[],{value:"edit",label:"Edit provider",description:"Update URL, model, or key",disabled:!ch},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!Kt},...Sh?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[Kt,ch,Sh,hh,J,A,a]),nh=g.useCallback(()=>{if(o()){H.current+=1,Yt(!1),kt(void 0);return}let c=++H.current;(async()=>{let m=await Lh();if(c!==H.current)return;Yt(Boolean(m?.apiKey||m?.accessToken||m?.refreshToken||m?.idToken)),kt(m?.profileId)})()},[]);g.useEffect(()=>{return nh(),()=>{H.current+=1}},[nh]),g.useEffect(()=>{if(V!=="select-ollama-model")return;let c=!1;return Gt({state:"loading"}),(async()=>{let m=await wc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)Gt({state:"unavailable",message:wa(m,N.baseUrl)});return}let l=rh(m.models,"balanced"),r=cu(m.models,"balanced");if(!c)Gt({state:"ready",defaultValue:r?.name??l[0]?.name,options:l.map((b)=>({label:b.name,value:b.name,description:b.summary}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-atomic-chat-model")return;let c=!1;return St({state:"loading"}),(async()=>{let m=await rc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)St({state:"unavailable",message:ra(m,N.baseUrl)});return}if(!c)St({state:"ready",defaultValue:m.models[0],options:m.models.map((l)=>({label:l,value:l}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-openai-model")return;let c=!1;return vt({state:"loading"}),(async()=>{let m=await Cc({baseUrl:N.baseUrl,apiKey:N.apiKey||void 0});if(c)return;if(!m||m.length===0){vt({state:"unavailable",message:"Couldn't list models from this provider. Enter the model id manually, or go back to check the base URL and API key."});return}let{options:l,defaultValue:r}=lc(m,N.model);vt({state:"ready",options:l,defaultValue:r})})(),()=>{c=!0}},[N.baseUrl,N.apiKey,V]);function K(){if(th.current)return;th.current=!0,queueMicrotask(()=>{let c=x();C(c),f(B()?.id),$(xt()),Q(Fh()),X(Jt()),nh(),th.current=!1})}function At(){return null}function ah(c){if(c.activationWarning)return`${c.prefix}. Saved for next startup. Warning: ${c.warnings.join("; ")}.`;if(c.warnings.length>0)return`${c.prefix}. Claudin switched to it for this session with warnings: ${c.warnings.join("; ")}.`;return`${c.prefix}. Claudin switched to it for this session.`}async function mh(c){if(c?.accessToken&&c.accountId)return null;let m=await Lh();if(!m)return"stored Codex OAuth credentials could not be loaded";if(!m.accountId)return"stored Codex OAuth credentials are missing a ChatGPT account id";return null}function Wh(){yc()}async function Nc(c){let m="provider";E(!0),Y("Activating provider...");try{await new Promise((ht)=>queueMicrotask(ht));let l=Jt(),r=nt(c);if(!r){_("Could not change active provider."),E(!1),L();return}let b=l?B()??r:r,q=$t(b.model)||Dt();if(!l)u((ht)=>({...ht,mainLoopModel:q,mainLoopModelForSession:null}));m=r.name;let k=At(),d=vu(r,_t),T=d?await mh():null;K();let U=l&&b.id!==r.id?` (project override still active — this project keeps using ${b.name}; use "Clear project provider override" to apply the new default here)`:"",W=d?ah({prefix:`Active provider: ${r.name}${U}`,activationWarning:T,warnings:[T,k?`could not clear startup provider override (${k})`:null].filter((ht)=>Boolean(ht))}):k?`Active provider: ${r.name}${U}. Warning: could not clear startup provider override (${k}).`:`Active provider: ${r.name}${U}`;Y(W),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:q,message:`Provider switched to ${r.name} (${q})`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish activating ${m}: ${r}`),L()}}async function Jc(){E(!0),Y("Clearing project provider override...");try{await new Promise((m)=>queueMicrotask(m)),_h(null),K();let c=B();if(c){let m=$t(c.model)||Dt();ft(),u((l)=>({...l,mainLoopModel:m,mainLoopModelForSession:null})),Y(`Project override cleared. Using global default: ${c.name}.`),E(!1),h({action:"activated",activeProfileId:c.id,activeProviderName:c.name,activeProviderModel:m,message:`Project override cleared — using ${c.name} (${m})`}),L()}else Y("Project provider override cleared. No global default set."),E(!1),h({action:"saved",message:"Project provider override cleared. No global default set."}),L()}catch(c){K(),Y(void 0),E(!1);let m=c instanceof Error?c.message:String(c);_(`Could not clear project provider override: ${m}`),L()}}async function Vc(c){let m="provider";E(!0),Y("Setting provider for this project...");try{await new Promise((W)=>queueMicrotask(W));let l=xt(),r=_h(c);if(!r){_("Could not set project provider override."),E(!1),L();return}let b=$t(r.model)||Dt();if(l===r.id)ft();u((W)=>({...W,mainLoopModel:b,mainLoopModelForSession:null})),m=r.name;let q=At(),k=vu(r,_t),d=k?await mh():null;K();let T=`Active provider for this project: ${r.name}. Other projects keep the global default.`,U=k?ah({prefix:T,activationWarning:d,warnings:[d,q?`could not clear startup provider override (${q})`:null].filter((W)=>Boolean(W))}):q?`${T} Warning: could not clear startup provider override (${q}).`:T;Y(U),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:b,message:`Provider switched to ${r.name} (${b}) for this project`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish setting ${m} for this project: ${r}`),L()}}function L(){fc("done"),O("menu")}function Wt(c){h({action:"cancelled",message:c})}function ih(c){let m=ot(c),l={name:m.name,baseUrl:m.baseUrl,model:m.model,apiKey:m.apiKey??""};if(i(null),mt(m.provider??"openai"),P(l),dt({}),st(""),Yh(c),p(0),Ft(0),s(l.name.length),_(void 0),c==="ollama"){Gt({state:"loading"}),O("select-ollama-model");return}if(c==="atomic-chat"){St({state:"loading"}),O("select-atomic-chat-model");return}if(c==="anthropic"){O("anthropic-auth-choice");return}if(c==="bedrock"||c==="vertex"||c==="foundry"){O("cloud-extras");return}O("form")}function Zc(c){let m=a.find((r)=>r.id===c);if(!m)return;let l=ca(m);i(c),mt(m.provider??"openai"),P(l),dt({awsRegion:m.extras?.awsRegion,gcpProject:m.extras?.gcpProject,gcpRegion:m.extras?.gcpRegion,azureResource:m.extras?.azureResource}),st(ma(m.extras?.customHeaders)),Yh(null),p(0),Ft(0),s(l.name.length),_(void 0),O("form")}function it(c=N){let m=ya(Zt,dh),l={provider:Z,name:c.name,baseUrl:c.baseUrl,model:c.model,apiKey:c.apiKey,extras:m},r=wt?ct(wt,l):ut(l,{makeActive:!0});if(!r){_("Could not save provider. Fill all required fields.");return}let b=B()?.id===r.id;if(b)ft(),u((U)=>({...U,mainLoopModel:$t(r.model),mainLoopModelForSession:null}));let q=b?At():null;K();let k=!wt&&Jt()&&!b,d=k?B()?.name??"override target":null,T=wt?`Updated provider: ${r.name}`:k?`Added provider: ${r.name} (now global default — project keeps using ${d}; use "Clear project provider override" to apply here)`:`Added provider: ${r.name} (now active)`;if(Y(q?`${T}. Warning: could not clear startup provider override (${q}).`:T),t==="first-run"){h({action:"saved",activeProfileId:r.id,message:`Provider configured: ${r.name}`});return}i(null),p(0),_(void 0),L()}function dc(){if(v.state==="loading"||v.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),n(y,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(v.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Atomic Chat setup"}),n(y,{dimColor:!0,children:v.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),n(y,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),n(S,{options:v.options,defaultValue:v.defaultValue,defaultFocusValue:v.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,v.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function Yc(){if(e.state==="loading"||e.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Ollama"}),n(y,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(e.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Ollama setup"}),n(y,{dimColor:!0,children:e.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Ollama model"}),n(y,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),n(S,{options:e.options,defaultValue:e.defaultValue,defaultFocusValue:e.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,e.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function gt(c){let m=rt.findIndex((l)=>l.key===c);p(m<0?0:m),s(N[c].length),_(void 0),O("form")}function Gc(){if(tt.state==="loading"||tt.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Fetching models"}),n(y,{dimColor:!0,children:"Looking for models on your OpenAI-compatible provider…"}),n(y,{dimColor:!0,children:"Press Esc to enter the model manually."})]});if(tt.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:tt.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Type the model id yourself"},{value:"back",label:"Back",description:"Return to the API key step"}],onChange:(l)=>{if(l==="manual"){gt("model");return}gt("apiKey")},onCancel:()=>gt("apiKey"),visibleOptionCount:2})]});let c=[...tt.options,{value:$h,label:"Enter a model id manually",description:"Type an id the provider did not list"}],m=tt.defaultValue??$h;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:"Models from your OpenAI-compatible provider."}),n(S,{options:c,defaultValue:m,defaultFocusValue:m,inlineDescriptions:!0,visibleOptionCount:Math.min(8,c.length),onChange:(l)=>{if(l===$h){gt("model");return}let r={...N,model:l};P(r),Mh(r)},onCancel:()=>gt("apiKey")}),n(y,{dimColor:!0,children:"Enter to select · Esc to go back"})]})}function Mh(c){if(et==="anthropic"||et==="custom"){P(c),O("custom-headers");return}it(c)}function Sc(c){let m=c.trim();if(!Rt.optional&&m.length===0){_(`${Rt.label} is required.`);return}let l={...N,[Ht]:m};if(P(l),_(void 0),Ot<rt.length-1){let r=Ot+1,b=rt[r]?.key??"name";if(b==="model"&&!pn.has(Z)&&l.baseUrl.trim().length>0){O("select-openai-model");return}p(r),s(l[b].length);return}Mh(l)}function Hc(){if(_(void 0),Ot>0){let c=Ot-1,m=rt[c]?.key??"name";p(c),s(N[m].length);return}if(t==="first-run"){O("select-preset");return}L()}D("confirm:no",Hc,{context:"Settings",isActive:V==="form"}),D("confirm:no",()=>gt("model"),{context:"Settings",isActive:V==="select-openai-model"&&(tt.state==="loading"||tt.state==="idle")});function Kc(){if(_(void 0),bt>0){Ft(bt-1);return}O("select-preset")}D("confirm:no",Kc,{context:"Settings",isActive:V==="cloud-extras"}),D("confirm:no",()=>O("form"),{context:"Settings",isActive:V==="custom-headers"}),D("confirm:no",()=>O("select-preset"),{context:"Settings",isActive:V==="anthropic-auth-choice"||V==="anthropic-oauth"||V==="kimi-auth-choice"}),D("confirm:no",()=>O("kimi-auth-choice"),{context:"Settings",isActive:V==="kimi-oauth"});function Wc(){let c=!o(),m=[...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Reuse ~/.claude/ tokens, settings, theme, MCP, skills, agents, plugins."}]:[],{value:"dashscope-intl",label:"Alibaba Coding Plan",description:"Alibaba DashScope International endpoint"},{value:"dashscope-cn",label:"Alibaba Coding Plan (China)",description:"Alibaba DashScope China endpoint"},{value:"anthropic",label:"Anthropic",description:"Native Claude API (x-api-key auth)"},{value:"atomic-chat",label:"Atomic Chat",description:"Local Model Provider"},{value:"azure-openai",label:"Azure OpenAI",description:"Azure OpenAI endpoint (model=deployment name)"},{value:"foundry",label:"Azure AI Foundry",description:"Anthropic models hosted on Azure AI Foundry (resource-scoped)"},{value:"bedrock",label:"AWS Bedrock",description:"Anthropic models on AWS Bedrock (region-scoped, AWS creds)"},{value:"bankr",label:"Bankr",description:"Bankr LLM Gateway (OpenAI-compatible)"},{value:"cloudflare-workers-ai",label:"Cloudflare Workers AI",description:"Cloudflare Workers AI (OpenAI-compatible); set your account ID in the base URL"},{value:"cloudflare-ai-gateway",label:"Cloudflare AI Gateway",description:"Cloudflare AI Gateway unified endpoint; set your account ID in the base URL"},...c?[{value:"codex-oauth",label:"Codex OAuth",description:"Sign in with ChatGPT in your browser and store Codex credentials securely"},{value:"xai-oauth",label:"xAI / Grok (OAuth)",description:"Sign in with xAI in your browser and store Grok credentials securely"}]:[],{value:"github-onboard",label:"GitHub Copilot",description:"Sign in with GitHub in your browser to use Copilot models"},{value:"deepseek",label:"DeepSeek",description:"DeepSeek OpenAI-compatible endpoint"},{value:"gemini",label:"Google Gemini",description:"Gemini OpenAI-compatible endpoint"},{value:"vertex",label:"Google Vertex AI",description:"Anthropic models on Vertex AI (project + region, ADC)"},{value:"groq",label:"Groq",description:"Groq OpenAI-compatible endpoint"},{value:"lmstudio",label:"LM Studio",description:"Local LM Studio endpoint"},{value:"minimax",label:"MiniMax",description:"MiniMax API endpoint"},{value:"mistral",label:"Mistral",description:"Mistral OpenAI-compatible endpoint"},{value:"moonshotai",label:"Moonshot AI",description:"API key or Kimi Code OAuth sign-in"},{value:"nvidia-nim",label:"NVIDIA NIM",description:"NVIDIA NIM endpoint"},{value:"opencode-go",label:"OpenCode GO",description:"OpenCode GO OpenAI-compatible endpoint"},{value:"opencode-zen",label:"OpenCode Zen",description:"OpenCode Zen OpenAI-compatible endpoint"},{value:"ollama",label:"Ollama",description:"Local or remote Ollama endpoint"},{value:"openai",label:"OpenAI",description:"OpenAI API with API key"},{value:"openrouter",label:"OpenRouter",description:"OpenRouter OpenAI-compatible endpoint"},{value:"together",label:"Together AI",description:"Together chat/completions endpoint"},{value:"zai",label:"Z.AI (GLM Coding Plan)",description:"Z.AI GLM Coding Plan (OpenAI-compatible)"},{value:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...t==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:t==="first-run"?"Set up provider":"Choose provider preset"}),n(y,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),n(S,{options:m,onChange:(l)=>{if(l==="skip"){Wt("Provider setup skipped");return}if(l==="codex-oauth"){O("codex-oauth");return}if(l==="xai-oauth"){O("xai-oauth");return}if(l==="moonshotai"){O("kimi-auth-choice");return}if(l==="github-onboard"){O("github-onboard");return}if(l==="import-legacy"){(async()=>{let r=await Vh({force:!0});uh(Vt()),K();let b=jt(r);if(r.errors.length>0){_(b);return}let q=B();if(t==="first-run"&&q){h({action:"saved",activeProfileId:q.id,activeProviderName:q.name,activeProviderModel:q.model,message:b});return}if(Y(b),_(void 0),t==="manage")L()})();return}ih(l)},onCancel:()=>{if(t==="first-run"){Wt("Provider setup skipped");return}L()},visibleOptionCount:Math.min(13,m.length)})]})}function ic(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Claude, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste an x-api-key value (sk-ant-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("anthropic-oauth");return}if(c==="apiKey"){O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Mc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Kimi Code subscription in the browser, or paste a Moonshot AI API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Kimi Code, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste a Moonshot AI API key (sk-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("kimi-oauth");return}if(c==="apiKey"){ih("moonshotai");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Tc(){let c=(xn(),Gn(In)).ConsoleOAuthFlow;return n(F,{flexDirection:"column",gap:1,children:n(c,{mode:"login",onDone:()=>{let m=ot("anthropic"),l={provider:"anthropic",name:m.name,baseUrl:m.baseUrl,model:m.model},r=za(x(),m.baseUrl),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("OAuth completed, but the Anthropic profile could not be saved."),O("select-preset");return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("OAuth completed, but the Anthropic profile could not be set as the startup provider."),O("select-preset");return}let k=`Anthropic OAuth configured: ${q.name}`;if(K(),t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}})})}function Uc(){let c=et;if(c!=="bedrock"&&c!=="vertex"&&c!=="foundry")return null;let m=Ca[c],l=m[bt]??m[0],r=Zt[l.key]??"";function b(q){let k=q.trim();if(k.length===0){_(`${l.label} is required.`);return}let d={...Zt,[l.key]:k};if(dt(d),_(void 0),bt<m.length-1){Ft(bt+1);return}Ft(0),O("form")}return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:`${c==="bedrock"?"AWS Bedrock":c==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),n(y,{dimColor:!0,children:l.helpText}),z(y,{dimColor:!0,children:["Step ",bt+1," of ",m.length,": ",l.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:r,onChange:(q)=>dt((k)=>({...k,[l.key]:q})),onSubmit:b,focus:!0,showCursor:!0,placeholder:`${l.placeholder}${qt.ellipsis}`,columns:80,cursorOffset:Rc,onChangeCursorOffset:Ac})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Ec(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Custom headers (optional)"}),z(y,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",n(y,{children:"Header: Value"}),". Leave empty to skip."]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:dh,onChange:st,onSubmit:()=>it(N),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:gc,onChangeCursorOffset:Xc})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}function Pc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:wt?"Edit provider profile":"Create provider profile"}),n(y,{dimColor:!0,children:Rt.helpText}),z(y,{dimColor:!0,children:["Provider type:"," ",Z==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),z(y,{dimColor:!0,children:["Step ",Ot+1," of ",rt.length,": ",Rt.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:Qc,onChange:(c)=>P((m)=>({...m,[Ht]:c})),onSubmit:Sc,focus:!0,showCursor:!0,placeholder:`${Rt.placeholder}${qt.ellipsis}`,mask:Ht==="apiKey"?"*":void 0,columns:80,cursorOffset:qc,onChangeCursorOffset:s})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Bc(){let c=a.length>0,m=c;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Provider manager"}),n(y,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),Gh&&n(y,{children:Gh}),n(F,{flexDirection:"column",children:a.length===0?n(y,{dimColor:!0,children:"No provider profiles configured yet."}):a.map((l)=>z(y,{dimColor:!0,children:["- ",l.name,": ",la(l,l.id===w)]},l.id))}),n(S,{options:Kh,onChange:(l)=>{switch(_(void 0),l){case"add":O("select-preset");break;case"import-legacy":{(async()=>{let r=await Vh({force:!0});if(uh(Vt()),K(),r.errors.length>0)_(jt(r));else Y(jt(r))})();break}case"activate":if(m)O("select-active");break;case"activate-project":if(m)O("select-active-project");break;case"clear-project-override":Jc();break;case"edit":if(c)O("select-edit");break;case"delete":if(m)O("select-delete");break;case"logout-codex-oauth":{let r=Qh();if(!r.success){_(r.warning??"Could not clear Codex OAuth credentials.");break}Yt(!1),kt(void 0);let b=fh(x(),_t),q=null;if(b){let k=kh(b.id);if(!k.removed){_("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),K();break}Wh(),q=k.activeProfileId?At():null}K(),Y(q?`Codex OAuth logged out. Warning: could not clear startup provider override (${q}).`:"Codex OAuth logged out.");break}default:Wt("Provider manager closed");break}},onCancel:()=>Wt("Provider manager closed"),defaultFocusValue:$c,visibleOptionCount:Kh.length})]})}function Mt(c,m,l){let r=a.map((b)=>{let q=[];if(b.id===w)q.push("active");if(A&&b.id===A)q.push("this project");if(J&&b.id===J)q.push("global default");let k=q.length>0?` (${q.join(", ")})`:"";return{value:b.id,label:`${b.name}${k}`,description:`${b.provider==="anthropic"?"anthropic":"openai-compatible"} · ${b.baseUrl} · ${b.model}`}});if(r.length===0)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(y,{dimColor:!0,children:m}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>L(),onCancel:()=>L(),visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(S,{options:r,onChange:l,onCancel:()=>L(),visibleOptionCount:Math.min(10,Math.max(2,r.length))})]})}let G;switch(V){case"select-preset":G=Wc();break;case"select-ollama-model":G=Yc();break;case"select-openai-model":G=Gc();break;case"select-atomic-chat-model":G=dc();break;case"codex-oauth":G=n(Ra,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:sn,baseUrl:hc,model:en,apiKey:""},r=fh(x(),_t),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Codex OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Codex OAuth login finished, but the provider could not be set as the startup provider."),L();return}m({profileId:b.id});let k=At(),d=await mh(c);Yt(!0),kt(b.id),K();let T=[d,k?`could not clear startup provider override (${k})`:null].filter((W)=>Boolean(W)),U=ah({prefix:"Codex OAuth configured",activationWarning:d,warnings:T});if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:U});return}Y(U),_(void 0),L()}});break;case"xai-oauth":G=n(Aa,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:vn,baseUrl:pt,model:ta,apiKey:""},r=Oa(x(),Jh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("xAI OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("xAI OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="xAI / Grok configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"kimi-auth-choice":G=Mc();break;case"kimi-oauth":G=n(ga,{onBack:()=>O("kimi-auth-choice"),onConfigured:async(c,m)=>{let l={provider:"openai",name:ha,baseUrl:Zh,model:ua,apiKey:""},r=ba(x(),Nh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Kimi Code OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Kimi Code OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="Kimi Code configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"github-onboard":G=n(vh,{onDone:(c)=>{if(c)Y(c),_(void 0);K(),L()},onBack:()=>O("select-preset"),onChangeAPIKey:K});break;case"anthropic-auth-choice":G=ic();break;case"anthropic-oauth":G=Tc();break;case"cloud-extras":G=Uc();break;case"custom-headers":G=Ec();break;case"form":G=Pc();break;case"select-active":G=Mt("Set active provider (Global)","No providers available. Add one first.",(c)=>{Nc(c)});break;case"select-active-project":G=Mt("Set active provider (Project)","No providers available. Add one first.",(c)=>{Vc(c)});break;case"select-edit":G=Mt("Edit provider","No providers available. Add one first.",(c)=>{Zc(c)});break;case"select-delete":G=Mt("Delete provider","No providers available. Add one first.",(c)=>{let m=a.find((W)=>W.id===c),l=m?.provider==="openai"&&m?.extras?.githubToken!==void 0,r=fh(a,_t)?.id===c,b=Jh()?.profileId,q=m?.provider==="openai"&&m.baseUrl===pt&&!m.apiKey&&b===c,k=Nh()?.profileId,d=m?.provider==="openai"&&m.baseUrl===Zh&&!m.apiKey&&k===c,T=B()?.id===c,U=kh(c);if(!U.removed)_("Could not delete provider.");else{let W=[];if(r){let M=Qh();if(!M.success)W.push(M.warning??"could not clear Codex OAuth credentials");else kt(void 0);Wh()}if(l){let M=cc();if(!M.success)W.push(M.warning??"could not clear GitHub Copilot token")}if(q){let M=mc();if(!M.success)W.push(M.warning??"could not clear xAI OAuth credentials")}if(d){let M=ac();if(!M.success)W.push(M.warning??"could not clear Kimi Code OAuth credentials")}let ht=U.activeProfileId?At():null;if(ht)W.push(`could not clear startup provider override (${ht})`);if(K(),T){let M=B();if(M)ft(),u((yh)=>({...yh,mainLoopModel:$t(M.model),mainLoopModelForSession:null}));else ft(),u((yh)=>({...yh,mainLoopModel:null,mainLoopModelForSession:null}))}Y(W.length>0?`Provider deleted. Warning: ${W.join("; ")}.`:"Provider deleted")}L()});break;case"menu":default:G=Bc();break}return z(uc,{color:"permission",children:[n(zc,{enabled:Hh,onDismiss:(c)=>{uh(Vt()),Lc(!1),K();let m=B();if(c==="migrated"&&t==="first-run"&&m)h({action:"saved",activeProfileId:m.id,activeProviderName:m.name,activeProviderModel:m.model})}}),Hh?null:Fc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Loading providers..."}),n(y,{dimColor:!0,children:"Reading provider profiles from disk."})]}):kc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Activating provider..."}),n(y,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):G]})}var g,rt,$h="\x00__manual__",pn,sn="Codex OAuth",en="codexplan",vn="xAI / Grok (OAuth)",ta="grok-4",ha="Moonshot AI",ua,Zh="https://api.kimi.com/coding/v1",Ca;var Xa=I(()=>{Sn();tu();Kn();Eh();Mn();Pn();Dn();Xu();Et();Hn();Wn();Un();Th();ph();En();nu();au();Bn();Tn();on();sh();fu();Ku();eu();Su();pu();Pu();jn();Tt();g=Lt(Qt(),1),rt=[{key:"name",label:"Provider name",placeholder:"e.g. Ollama Home, OpenAI Work",helpText:"A short label shown in /provider and startup setup."},{key:"baseUrl",label:"Base URL",placeholder:"e.g. http://localhost:11434/v1",helpText:"API base URL used for this provider profile."},{key:"apiKey",label:"API key",placeholder:"Leave empty if your provider does not require one",helpText:"Optional. Press Enter with empty value to skip.",optional:!0},{key:"model",label:"Default model",placeholder:"e.g. llama3.1:8b or glm-4.7; glm-4.7-flash",helpText:'Model name(s) to use. Separate multiple with ";" or ","; first is default.'}],pn=new Set(["anthropic","bedrock","vertex","foundry"]),ua=nc;Ca={bedrock:[{key:"awsRegion",label:"AWS region",placeholder:"e.g. us-east-1",helpText:"Region of your Bedrock-enabled AWS account. Credentials are picked up from the AWS SDK chain."}],vertex:[{key:"gcpProject",label:"GCP project ID",placeholder:"e.g. my-project-123456",helpText:"Google Cloud project where Vertex AI is enabled. Credentials are picked up from ADC."},{key:"gcpRegion",label:"GCP region",placeholder:"e.g. us-central1",helpText:"Vertex AI region for the model."}],foundry:[{key:"azureResource",label:"Azure resource",placeholder:"e.g. my-foundry-resource",helpText:"Name of your Azure AI Foundry resource. Credentials are picked up from DefaultAzureCredential."}]}});
|
|
50
|
-
export{wh as Ac,au as Bc,aa as Cc,Vm as Dc,Xa as Ec};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Wh as j,Yh as l}from"./cli-1.0.16-dawsz3cx.mjs";import{gi as W,mi as i}from"./cli-1.0.16-xhrysm93.mjs";import{Ax as U,Bx as m,FT as G,Mw as B,NO as b,OO as o,Rv as $,Rw as p,ST as r,Sv as D,TC as L,TT as R,Tj as Z,UC as h,UT as f,Uj as P,Uw as N,VT as F,Vw as g,WT as u,XT as t,Xi as Y,YB as d,Yi as A,aC as E,bC as C,fv as _,jQ as x,lz as V,mO as M,nz as S,oO as n,tQ as s}from"./cli-1.0.16-pz654728.mjs";import{S9 as Q,Y9 as k}from"./cli-1.0.16-ynm2hz21.mjs";import{B_ as O,I_ as I,caa as X,daa as v}from"./cli-1.0.16-t2ky4p5s.mjs";import{$pa as K,Ppa as J,yqa as T}from"./cli-1.0.16-zsvkc5zm.mjs";import{hsa as y,isa as w}from"./cli-1.0.16-y9yxyd77.mjs";function Mq(H=new Set){let z=H.size>0;if(u.cache.clear?.(),F.cache.clear?.(),f.cache.clear?.(),Y.cache.clear?.(),W(),x(),!z)N();if(R(null),K(null),b(),_(),G("session_start"),V(),X.clear(),Z(),!z)B();if(Q(),M(),!z)U();J(H),O(),L(),$(),j(),E(),import("./utils-1.0.16-b4gx7byh.mjs").then(({clearWebFetchCache:q})=>q()),import("./ToolSearchTool-1.0.16-618gxr3s.mjs").then(({clearToolSearchDescriptionCache:q})=>q()),import("./loadAgentsDir-1.0.16-73hvgtg1.mjs").then(({clearAgentDefinitionsCache:q})=>q()),import("./prompt-1.0.16-a7sjgybs.mjs").then(({clearPromptCache:q})=>q())}var c=y(()=>{T();s();A();t();i();p();m();g();P();o();D();l();h();d();n();r();k();I();v();S();C()});
|
|
2
|
-
export{Mq as Uh,c as Vh};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{hsa as y}from"./cli-1.0.16-y9yxyd77.mjs";function $(q){return typeof q==="number"&&Number.isFinite(q)?q:0}function F(q,z){let B=q;for(let K of z){if(B==null||typeof B!=="object")return;B=B[K]}return B}function x(q){if(!q)return!1;let z="";try{z=new URL(q).hostname.toLowerCase()}catch{}if(!z){let W=q.toLowerCase();return W.includes("localhost")||W.includes("127.0.0.1")||W.includes("::1")}let B=z.startsWith("[")&&z.endsWith("]")?z.slice(1,-1):z;if(B==="localhost"||B.endsWith(".localhost")||B.endsWith(".local")||B.endsWith(".lan")||B.endsWith(".internal")||B.endsWith(".intranet")||B.endsWith(".home.arpa"))return!0;let K=B.match(U);if(K){let W=Number(K[1]),j=Number(K[2]);if(W===10)return!0;if(W===172&&j>=16&&j<=31)return!0;if(W===192&&j===168)return!0;if(W===127)return!0;if(W===169&&j===254)return!0;if(W===100&&j>=64&&j<=127)return!0}if(B==="::1"||B==="::")return!0;if(B.startsWith("fe80:")||f.test(B)||A.test(B))return!0;return!1}function N(q,z){if(q==="github")return z?.githubNativeAnthropic?"copilot-claude":"copilot";if(q==="firstParty"||q==="bedrock"||q==="vertex"||q==="foundry")return"anthropic";if(q==="gemini")return"gemini";if(q==="codex")return"codex";if(q==="openai"){let B=z?.openAiBaseUrl??"";if(x(B))return"self-hosted";let K=B.toLowerCase();if(K.includes(":11434"))return"ollama";if(K.includes("moonshot")||K.includes("kimi"))return"kimi";if(K.includes("deepseek"))return"deepseek";return"openai"}return"openai"}function D(q){if(!q||typeof q!=="object")return 0;let z=q,B=$(z.cache_read_input_tokens);if(B>0)return B;let K=$(F(q,["input_tokens_details","cached_tokens"]))||$(F(q,["prompt_tokens_details","cached_tokens"]));if(K>0)return K;let W=$(z.cached_tokens);if(W>0)return W;let j=$(z.prompt_cache_hit_tokens);if(j>0)return j;let Q=$(z.cached_content_token_count);if(Q>0)return Q;return 0}function Y(q){if(!q||typeof q!=="object")return 0;let B=$(q.cache_creation_input_tokens);if(B>0)return B;return $(F(q,["cache_creation","ephemeral_5m_input_tokens"]))+$(F(q,["cache_creation","ephemeral_1h_input_tokens"]))}function P(q){let z=D(q),B=q??{},K=$(B.input_tokens)||$(B.prompt_tokens),W=K>=z?K-z:K,j=$(B.output_tokens)||$(B.completion_tokens);return{input_tokens:W,output_tokens:j,cache_creation_input_tokens:Y(q),cache_read_input_tokens:z}}function M(q,z){if(!q||typeof q!=="object")return X;let B=q,K=$(B.cache_read_input_tokens),W=$(B.cache_creation_input_tokens),j=$(B.input_tokens);if(z==="copilot"||z==="ollama")return X;if(z==="self-hosted"&&K===0&&W===0)return X;let Q=K+W+j;return{read:K,created:W,total:Q,hitRate:Q>0?Math.min(1,K/Q):null,supported:!0}}function C(q){if(!q)return"[Cache: N/A]";if(!q.supported)return"[Cache: N/A]";if(q.read===0&&q.created===0)return"[Cache: cold]";let z=[`${G(q.read)} read`];if(q.hitRate!==null)z.push(`hit ${Math.round(q.hitRate*100)}%`);return`[Cache: ${z.join(" • ")}]`}function I(q){if(!q)return"[Cache: N/A]";if(!q.supported)return"[Cache: N/A]";let z=[`read=${G(q.read)}`,`created=${G(q.created)}`];if(q.hitRate!==null)z.push(`hit=${Math.round(q.hitRate*100)}%`);else z.push("hit=n/a");return`[Cache: ${z.join(" ")}]`}function G(q){if(q<1000)return String(q);if(q<1e6)return`${(q/1000).toFixed(1).replace(Z,"")}k`;return`${(q/1e6).toFixed(1).replace(Z,"")}m`}function H(q,z){if(!q.supported&&!z.supported)return X;if(!q.supported)return z;if(!z.supported)return q;let B=q.read+z.read,K=q.created+z.created,W=q.total+z.total;return{read:B,created:K,total:W,hitRate:W>0?B/W:null,supported:!0}}var X,U,f,A,Z;var L=y(()=>{X={read:0,created:0,total:0,hitRate:null,supported:!1};U=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,f=/^fc[0-9a-f]{0,2}:/,A=/^fd[0-9a-f]{0,2}:/,Z=/\.0$/});function S(q){return{currentTurn:V,session:V,history:Array(q),historyWriteIdx:0,historySize:0,historyMax:q}}function w(q,z){J.currentTurn=H(J.currentTurn,q),J.session=H(J.session,q);let B={timestamp:Date.now(),label:z,metrics:q};if(J.history[J.historyWriteIdx]=B,J.historyWriteIdx=(J.historyWriteIdx+1)%J.historyMax,J.historySize<J.historyMax)J.historySize++}function T(){J.currentTurn=V}function R(){J.currentTurn=V,J.session=V,J.history=Array(J.historyMax),J.historyWriteIdx=0,J.historySize=0}function b(){return J.currentTurn}function g(){return J.session}function l(){if(J.historySize<J.historyMax)return J.history.slice(0,J.historySize);let q=J.history.slice(J.historyWriteIdx),z=J.history.slice(0,J.historyWriteIdx);return q.concat(z)}var O=500,V,J;var k=y(()=>{L();V={read:0,created:0,total:0,hitRate:null,supported:!1};J=S(O)});
|
|
2
|
-
export{N as D2,P as E2,M as F2,C as G2,I as H2,L as I2,w as J2,T as K2,R as L2,b as M2,g as N2,l as O2,k as P2};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{W8 as E2,Y8 as w8}from"./cli-1.0.16-fskj6kkz.mjs";import{$8 as eZ,_8 as h}from"./cli-1.0.16-g3xbjpm0.mjs";import{k9 as n5,m9 as N8}from"./cli-1.0.16-625x0153.mjs";import{$9 as h4,Eea as e1,Fba as HZ,Hda as B0,L_ as U5,N_ as $$,Oca as r1,Qda as s4,Sda as J$,Sfa as c5,Tda as T1,Tea as i,Uda as d8,Ufa as j4,Vea as Z4,Wea as wZ,Xca as RZ,_ea as $4,_fa as d5,a_ as a,aba as y1,b_ as L2,bba as c8,bga as L,c_ as b0,d_ as f4,e_ as s2,ega as $0,j_ as R0,k_ as x1,nfa as B4,oba as o1,pea as d,pfa as J4,qga as N,sda as O,sfa as k2,tfa as Q$,uda as j2,uea as m5,v_ as N5,vea as C,xda as Q0,y_ as Z$,yda as S,yea as K,yga as a0}from"./cli-1.0.16-t2ky4p5s.mjs";import{Aha as y4,Kha as I1,yha as A0}from"./cli-1.0.16-hpznp2f1.mjs";import{Oia as T5,Pia as a4,Qia as j0,Sia as H8,Tia as R8,Via as b,Wia as S0}from"./cli-1.0.16-natadjxz.mjs";import{Xia as x,_ia as B2}from"./cli-1.0.16-6d9kerj1.mjs";import{Eja as D5,Ija as rZ,Mja as t2,Qja as h8,_ja as z,aka as d0,bka as Z0}from"./cli-1.0.16-04tr8fw7.mjs";import{Aka as V1,Fka as W1,yka as p}from"./cli-1.0.16-7hc7p9x4.mjs";import{Ika as L5,Lka as F,Nka as u,Pka as O2,Ska as t4,Vka as g}from"./cli-1.0.16-q2g1eds7.mjs";import{$oa as x2,Mna as s1,Moa as Q1,Noa as Y1,Ooa as X1,Poa as q1,Qna as I4,Vna as y0,Wna as J2,ooa as f,vma as X0,voa as _1,wma as F1,yna as m1,yqa as J0}from"./cli-1.0.16-zsvkc5zm.mjs";import{Xqa as y,Yqa as t0}from"./cli-1.0.16-0f0rbfq7.mjs";import{Kra as q2,sra as P}from"./cli-1.0.16-fcfaz7s1.mjs";import{esa as I0,gsa as d2,hsa as R,isa as e}from"./cli-1.0.16-y9yxyd77.mjs";function S5(Z){let $=[],J=!1;async function Q(){if(J)return;if($.length===0)return;J=!0;while($.length>0){let{args:Y,resolve:X,reject:q,context:V}=$.shift();try{let G=await Z.apply(V,Y);X(G)}catch(G){q(G)}}if(J=!1,$.length>0)Q()}return function(...Y){return new Promise((X,q)=>{$.push({args:Y,resolve:X,reject:q,context:this}),Q()})}}var M5=()=>{};function A5(Z,$){return Z.find((J)=>J.includes($))??null}async function h5(){let{BedrockClient:Z}=await import("@aws-sdk/client-bedrock"),$=O2(),J=F(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await E2(),...J&&{requestHandler:new(await import("./index-1.0.16-kbpve4r7.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-1.0.16-43g8hr9c.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let Y=await z0();if(Y)Q.credentials={accessKeyId:Y.accessKeyId,secretAccessKey:Y.secretAccessKey,sessionToken:Y.sessionToken}}return new Z(Q)}async function o$(){let{BedrockRuntimeClient:Z}=await import("@aws-sdk/client-bedrock-runtime"),$=O2(),J=F(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await E2(),...J&&{requestHandler:new(await import("./index-1.0.16-kbpve4r7.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-1.0.16-43g8hr9c.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let Y=await z0();if(Y)Q.credentials={accessKeyId:Y.accessKeyId,secretAccessKey:Y.secretAccessKey,sessionToken:Y.sessionToken}}return new Z(Q)}function F8(Z){return Z.startsWith("anthropic.")}function L8(Z){if(!Z.startsWith("arn:"))return Z;let $=Z.lastIndexOf("/");if($===-1)return Z;return Z.substring($+1)}function D8(Z){let $=L8(Z);for(let J of K8)if($.startsWith(`${J}.anthropic.`))return J;return}function e$(Z,$){let J=D8(Z);if(J)return Z.replace(`${J}.`,`${$}.`);if(F8(Z))return`${$}.${Z}`;return Z}var C5,r$,K8;var f5=R(()=>{t0();n();g();a0();w8();C5=y(async function(){let[Z,{ListInferenceProfilesCommand:$}]=await Promise.all([h5(),import("@aws-sdk/client-bedrock")]),J=[],Q;try{do{let Y=new $({...Q&&{nextToken:Q},typeEquals:"SYSTEM_DEFINED"}),X=await Z.send(Y);if(X.inferenceProfileSummaries)J.push(...X.inferenceProfileSummaries);Q=X.nextToken}while(Q);return J.filter((Y)=>Y.inferenceProfileId?.includes("anthropic")).map((Y)=>Y.inferenceProfileId).filter(Boolean)}catch(Y){throw N(Y),Y}});r$=y(async function(Z){try{let[$,{GetInferenceProfileCommand:J}]=await Promise.all([h5(),import("@aws-sdk/client-bedrock")]),Q=new J({inferenceProfileIdentifier:Z}),Y=await $.send(Q);if(!Y.models||Y.models.length===0)return null;let X=Y.models[0];if(!X?.modelArn)return null;let q=X.modelArn.lastIndexOf("/");return q>=0?X.modelArn.substring(q+1):X.modelArn}catch($){return N($),null}});K8=["us","eu","apac","global"]});var v2,_2,I2,y2,T2,S2,M2,C2,A2,s0,o0,r0,h2,f2,u2,G0,$J,u5;var g2=R(()=>{v2={firstParty:"claude-3-7-sonnet-20250219",bedrock:"us.anthropic.claude-3-7-sonnet-20250219-v1:0",vertex:"claude-3-7-sonnet@20250219",foundry:"claude-3-7-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},_2={firstParty:"claude-3-5-sonnet-20241022",bedrock:"anthropic.claude-3-5-sonnet-20241022-v2:0",vertex:"claude-3-5-sonnet-v2@20241022",foundry:"claude-3-5-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},I2={firstParty:"claude-3-5-haiku-20241022",bedrock:"us.anthropic.claude-3-5-haiku-20241022-v1:0",vertex:"claude-3-5-haiku@20241022",foundry:"claude-3-5-haiku",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash-lite",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},y2={firstParty:"claude-haiku-4-5-20251001",bedrock:"us.anthropic.claude-haiku-4-5-20251001-v1:0",vertex:"claude-haiku-4-5@20251001",foundry:"claude-haiku-4-5",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash-lite",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},T2={firstParty:"claude-sonnet-4-20250514",bedrock:"us.anthropic.claude-sonnet-4-20250514-v1:0",vertex:"claude-sonnet-4@20250514",foundry:"claude-sonnet-4",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},S2={firstParty:"claude-sonnet-4-5-20250929",bedrock:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",vertex:"claude-sonnet-4-5@20250929",foundry:"claude-sonnet-4-5",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},M2={firstParty:"claude-opus-4-20250514",bedrock:"us.anthropic.claude-opus-4-20250514-v1:0",vertex:"claude-opus-4@20250514",foundry:"claude-opus-4",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},C2={firstParty:"claude-opus-4-1-20250805",bedrock:"us.anthropic.claude-opus-4-1-20250805-v1:0",vertex:"claude-opus-4-1@20250805",foundry:"claude-opus-4-1",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},A2={firstParty:"claude-opus-4-5-20251101",bedrock:"us.anthropic.claude-opus-4-5-20251101-v1:0",vertex:"claude-opus-4-5@20251101",foundry:"claude-opus-4-5",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},s0={firstParty:"claude-opus-4-6",bedrock:"us.anthropic.claude-opus-4-6-v1",vertex:"claude-opus-4-6",foundry:"claude-opus-4-6",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},o0={firstParty:"claude-opus-4-7",bedrock:"us.anthropic.claude-opus-4-7-v1",vertex:"claude-opus-4-7",foundry:"claude-opus-4-7",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},r0={firstParty:"claude-opus-4-8",bedrock:"anthropic.claude-opus-4-8",vertex:"claude-opus-4-8",foundry:"claude-opus-4-8",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},h2={firstParty:"claude-fable-5",bedrock:"anthropic.claude-fable-5",vertex:"claude-fable-5",foundry:"claude-fable-5",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5",mistral:"devstral-latest"},f2={firstParty:"claude-sonnet-4-6",bedrock:"us.anthropic.claude-sonnet-4-6",vertex:"claude-sonnet-4-6",foundry:"claude-sonnet-4-6",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},u2={firstParty:"claude-sonnet-5",bedrock:"anthropic.claude-sonnet-5",vertex:"claude-sonnet-5",foundry:"claude-sonnet-5",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5",mistral:"mistral-medium-latest"},G0={haiku35:I2,haiku45:y2,sonnet35:_2,sonnet37:v2,sonnet40:T2,sonnet45:S2,sonnet46:f2,sonnet5:u2,opus40:M2,opus41:C2,opus45:A2,opus46:s0,opus47:o0,opus48:r0,fable5:h2},$J=Object.values(G0).map((Z)=>Z.firstParty),u5=Object.fromEntries(Object.entries(G0).map(([Z,$])=>[$.firstParty,Z]))});function g5(){return Object.values(e0)}var e0,p2;var m2=R(()=>{e0={"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2-Codex",family:"gpt-codex",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 mini",family:"gpt-mini",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:264000,output:64000}},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",family:"gpt",attachment:!0,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2023-10",release_date:"2024-05-01",last_updated:"2024-08-06",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",family:"gpt",attachment:!1,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2024-06",release_date:"2024-06-01",last_updated:"2024-06-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",family:"claude-opus",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2026-01",release_date:"2026-04-01",last_updated:"2026-04-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",family:"claude-sonnet",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",family:"claude-haiku",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:144000,output:32768}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",family:"gemini-pro",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image","audio"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:64000}},"grok-code-fast-1":{id:"grok-code-fast-1",name:"Grok Code Fast 1",family:"grok",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:256000,output:64000}}},p2=Object.fromEntries(Object.values(e0).map((Z)=>[Z.id,Z.name]))});var v0={};d2(v0,{prefetchCopilotModelCatalog:()=>l2,normalizeBareCopilotModelId:()=>n2,getEffectiveCopilotModels:()=>E8,getCopilotDisplayName:()=>v8,getCatalogCopilotMaxOutputTokens:()=>y8,getCatalogCopilotContextWindow:()=>I8,getCachedCopilotCatalog:()=>O8,fetchCopilotModelCatalog:()=>i5,copilotModelSupportsAnthropicMessages:()=>_8,_setCopilotCatalogForTesting:()=>T8});function E0(){let Z=L();if(Z?.transport!=="github_copilot")return null;return(Z.baseUrl||"https://api.githubcopilot.com").replace(/\/+$/,"")}function l5(){if(!l)return!1;let Z=E0();return Z!==null&&x0===Z}function b8(){if(p5)return;p5=!0,m5(()=>{let Z=E0();if(Z&&x0!==Z)l2()})}function n2(Z){let $=Z.split("?",1)[0]??Z,J=$.lastIndexOf(":"),Q=(J===-1?$:$.slice(J+1)).trim(),Y=Q.indexOf("/");return Y===-1?Q:Q.slice(Y+1)}function k8(Z){if(!Array.isArray(Z))return null;return Z.filter(($)=>typeof $==="string")}function P8(Z){let $=Z.id?.trim();if(!$)return null;let J=Z.capabilities?.type?.trim().toLowerCase();if(J&&J!=="chat")return null;if(Z.policy?.state==="disabled")return null;let Q=Z.capabilities?.limits??{},Y=Z.capabilities?.supports??{},X=Y.vision===!0||Boolean(Q.vision),q=Y.adaptive_thinking===!0||Array.isArray(Y.reasoning_effort)||typeof Y.max_thinking_budget==="number";return{model:{id:$,name:Z.name?.trim()||$,family:Z.capabilities?.family?.trim()||$,attachment:X,reasoning:q,tool_call:Y.tool_calls===!0,temperature:!0,knowledge:"",release_date:"",last_updated:"",modalities:{input:X?["text","image"]:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:Q.max_context_window_tokens??128000,...typeof Q.max_prompt_tokens==="number"?{input:Q.max_prompt_tokens}:{},output:Q.max_output_tokens??16384}},supportedEndpoints:k8(Z.supported_endpoints),pickerEnabled:Z.model_picker_enabled!==!1}}async function i5(){let Z=L();if(Z?.transport!=="github_copilot")return null;if(c5(Z.baseUrl)!=="copilot")return null;let $=Z.extras?.githubToken??Z.apiKey;if(!$)return null;let J=(Z.baseUrl||"https://api.githubcopilot.com").replace(/\/+$/,""),Q=new AbortController,Y=setTimeout(()=>Q.abort(),U8);try{let X=await fetch(`${J}/models`,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${$}`,...n5},signal:Q.signal});if(!X.ok)return null;let q=await X.json();if(!Array.isArray(q?.data))return null;let V=new Set,G=[];for(let B of q.data){let H=P8(B);if(!H||V.has(H.model.id))continue;V.add(H.model.id),G.push(H)}return G.length>0?G:null}catch{return z("[CopilotCatalog] /models fetch failed — using hardcoded registry"),null}finally{clearTimeout(Y)}}function l2(){b8();let Z=E0();if(!Z)return;if(l&&x0!==Z)l=null,x0=null;if(Z2){if(c2===Z)return;Z2.finally(()=>l2());return}c2=Z,Z2=i5().then(($)=>{if($&&E0()===Z)l=$,x0=Z}).finally(()=>{Z2=null,c2=null})}function O8(){return l}function E8(){if(l5()){let Z=l?.filter(($)=>$.pickerEnabled).map(($)=>$.model);if(Z&&Z.length>0)return Z}return g5()}function $2(Z){if(!l5())return;let $=n2(Z);return l.find((J)=>J.model.id===$)}function v8(Z){let $=n2(Z);return $2($)?.model.name??e0[$]?.name}function _8(Z){let $=$2(Z);if(!$||$.supportedEndpoints===null)return null;return $.supportedEndpoints.some((J)=>J.includes("/v1/messages"))}function I8(Z){return $2(Z)?.model.limit.context}function y8(Z){return $2(Z)?.model.limit.output}function T8(Z){l=Z,x0=Z?E0():null}var U8=5000,l=null,x0=null,Z2=null,c2=null,p5=!1;var _0=R(()=>{$0();N8();d5();i();Z0();m2()});function W(){let Z=L();if(!Z)return"firstParty";switch(Z.transport){case"anthropic":return"firstParty";case"gemini":return"gemini";case"mistral":return"mistral";case"github_copilot":return"github";case"codex_responses":return"codex";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai_compat":{let $=Z.baseUrl?.toLowerCase()??"";if($.includes("nvidia"))return"nvidia-nim";if($.includes("minimax"))return"minimax";return"openai"}default:return"firstParty"}}function xJ(){return W()==="firstParty"}function S8(Z){let $=L();if($?.transport!=="github_copilot")return!1;let J=Z?.trim()||$.model?.trim()||"";if(!J.toLowerCase().includes("claude-"))return!1;try{let{copilotModelSupportsAnthropicMessages:Q}=(_0(),I0(v0)),Y=Q(J);if(Y!==null)return Y}catch{}return!0}function BJ(Z){let $=L()?.transport??"anthropic";if(!M8.has($))return!1;if($==="github_copilot"&&S8(Z))return!1;return!0}function jJ(){return W()}function HJ(){let Z=L();if(!Z)return!0;if(Z.transport!=="anthropic")return!1;let $=Z.baseUrl;if(!$)return!0;try{let J=new URL($).host;return["api.anthropic.com"].includes(J)}catch{return!1}}var M8;var t=R(()=>{$0();M8=new Set(["openai_compat","gemini","mistral","github_copilot","codex_responses"])});function Q2(Z){let $=Z==="codex"||Z==="github"?"openai":Z,J={};for(let Q of a5)J[Q]=G0[Q][$];return J}async function C8(){let Z=Q2("bedrock"),$;try{$=await C5()}catch(Q){return N(Q),Z}if(!$?.length)return Z;let J={};for(let Q of a5){let Y=G0[Q].firstParty;J[Q]=A5($,Y)||Z[Q]}return J}function t5(Z){let $=Q0().modelOverrides;if(!$)return Z;let J={...Z};for(let[Q,Y]of Object.entries($)){let X=u5[Q];if(X&&Y)J[X]=Y}return J}function Y2(Z){let $;try{$=Q0().modelOverrides}catch{return Z}if(!$)return Z;for(let[J,Q]of Object.entries($))if(Q===Z)return J;return Z}function A8(){if(y0()!==null)return;if(W()!=="bedrock"){J2(Q2(W()));return}s5()}function j(){let Z=y0();if(Z===null)return A8(),t5(Q2(W()));return t5(Z)}async function bJ(){if(y0()!==null)return;if(W()!=="bedrock"){J2(Q2(W()));return}await s5()}var a5,s5;var X2=R(()=>{J0();a0();M5();B0();f5();g2();t();a5=Object.keys(G0);s5=S5(async()=>{if(y0()!==null)return;try{let Z=await C8();J2(Z)}catch(Z){N(Z)}})});function vJ(){if(F(process.env.DISABLE_COST_WARNINGS))return!1;if(k())return!1;let $=T0(),J=Y0()!==null;if(!$.hasToken&&!J)return!1;let Q=K(),Y=Q.oauthAccount?.organizationRole,X=Q.oauthAccount?.workspaceRole;if(!Y||!X)return!1;return["admin","billing"].includes(Y)||["workspace_admin","workspace_billing"].includes(X)}function _J(){if(o5!==null)return o5;if(!k())return!1;let Z=_();if(Z==="max"||Z==="pro")return!0;let J=K().oauthAccount?.organizationRole;return!!J&&["admin","billing","owner","primary_owner"].includes(J)}var o5=null;var r5=R(()=>{n();i();g()});function SJ(Z){return Z}function MJ(){return!1}function e5(){return null}function Z1(){return!1}var $1=R(()=>{r5()});async function pJ(){let $=K().oauthAccount?.accountUuid,J=Y0();if(!$||!J)return;let Q=`${b().BASE_API_URL}/api/claude_cli_profile`;try{return(await P.get(Q,{headers:{"x-api-key":J,"anthropic-beta":j0},params:{account_uuid:$},timeout:1e4})).data}catch(Y){N(Y)}}async function H0(Z){let $=`${b().BASE_API_URL}/api/oauth/profile`;try{return(await P.get($,{headers:{Authorization:`Bearer ${Z}`,"Content-Type":"application/json"},timeout:1e4})).data}catch(J){N(J)}}var i2=R(()=>{q2();S0();n();i();a0()});import{mkdirSync as f8,writeFileSync as u8}from"fs";function m8(Z,$,J){if(!F(process.env.CLAUDE_CODE_REMOTE))return;try{f8(V2,{recursive:!0,mode:448}),u8(Z,$,{encoding:"utf8",mode:384}),z(`Persisted ${J} to ${Z} for subprocess access`)}catch(Q){z(`Failed to persist ${J} to disk (non-fatal): ${p(Q)}`,{level:"error"})}}function J1(Z,$){try{let Q=t2().readFileSync(Z,{encoding:"utf8"}).trim();if(!Q)return null;return z(`Read ${$} from well-known file ${Z}`),Q}catch(J){if(!V1(J))z(`Failed to read ${$} from ${Z}: ${p(J)}`,{level:"debug"});return null}}function z1({envVar:Z,wellKnownPath:$,label:J,getCached:Q,setCached:Y}){let X=Q();if(X!==void 0)return X;let q=process.env[Z];if(!q){let G=J1($,J);return Y(G),G}let V=parseInt(q,10);if(Number.isNaN(V))return z(`${Z} must be a valid file descriptor number, got: ${q}`,{level:"error"}),Y(null),null;try{let G=t2(),B=process.platform==="darwin"||process.platform==="freebsd"?`/dev/fd/${V}`:`/proc/self/fd/${V}`,H=G.readFileSync(B,{encoding:"utf8"}).trim();if(!H)return z(`File descriptor contained empty ${J}`,{level:"error"}),Y(null),null;return z(`Successfully read ${J} from file descriptor ${V}`),Y(H),m8($,H,J),H}catch(G){z(`Failed to read ${J} from file descriptor ${V}: ${p(G)}`,{level:"error"});let B=J1($,J);return Y(B),B}}function W2(){return z1({envVar:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",wellKnownPath:g8,label:"OAuth token",getCached:Q1,setCached:Y1})}function a2(){return z1({envVar:"CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR",wellKnownPath:p8,label:"API key",getCached:X1,setCached:q1})}var V2="/home/claude/.claude/remote",g8,p8,aJ;var G1=R(()=>{J0();Z0();g();W1();h8();g8=`${V2}/.oauth_token`,p8=`${V2}/.api_key`,aJ=`${V2}/.session_ingress_token`});async function B1(){if(process.platform==="darwin"){let Z=a();if((await R0(`security delete-generic-password -a $USER -s "${Z}"`,{shell:!0,reject:!1})).exitCode!==0)throw Error("Failed to delete keychain entry")}}function z2(Z){return Z.slice(-20)}var j1=R(()=>{x1();s2()});function $3(Z){return Z?.name==="CredentialsProviderError"}function H1(Z){if(!Z||typeof Z!=="object")return!1;let $=Z;if(!$.Credentials||typeof $.Credentials!=="object")return!1;let J=$.Credentials;return typeof J.AccessKeyId==="string"&&typeof J.SecretAccessKey==="string"&&typeof J.SessionToken==="string"&&J.AccessKeyId.length>0&&J.SecretAccessKey.length>0&&J.SessionToken.length>0}async function o2(){let{STSClient:Z,GetCallerIdentityCommand:$}=await import("@aws-sdk/client-sts");await new Z().send(new $({}))}async function R1(){try{z("Clearing AWS credential provider cache");let{fromIni:Z}=await import("@aws-sdk/credential-providers");await Z({ignoreCache:!0})(),z("AWS credential provider cache refreshed")}catch(Z){z("Failed to clear AWS credential cache (this is expected if no credentials are configured)")}}var w1=R(()=>{Z0()});class M{static instance=null;status={isAuthenticating:!1,output:[]};changed=X0();static getInstance(){if(!M.instance)M.instance=new M;return M.instance}getStatus(){return{...this.status,output:[...this.status.output]}}startAuthentication(){this.status={isAuthenticating:!0,output:[]},this.changed.emit(this.getStatus())}addOutput(Z){this.status.output.push(Z),this.changed.emit(this.getStatus())}setError(Z){this.status.error=Z,this.changed.emit(this.getStatus())}endAuthentication(Z){if(Z)this.status={isAuthenticating:!1,output:[]};else this.status.isAuthenticating=!1;this.changed.emit(this.getStatus())}subscribe=this.changed.subscribe;static reset(){if(M.instance)M.instance.changed.clear(),M.instance=null}}var K1=R(()=>{F1()});var G2="claude-code-20250219",L1="interleaved-thinking-2025-05-14",M0="context-1m-2025-08-07",D1="context-management-2025-06-27",N1="structured-outputs-2025-12-15",r2="web-search-2025-03-05",U1="advanced-tool-use-2025-11-20",b1="tool-search-tool-2025-10-19",X3="effort-2025-11-24",q3="task-budgets-2026-03-13",k1="prompt-caching-scope-2026-01-05",V3="extended-cache-ttl-2025-04-11",W3="fast-mode-2026-02-01",P1="redact-thinking-2026-02-12",O1="thinking-token-count-2026-05-13",E1="token-efficient-tools-2026-03-28",z3="afk-mode-2026-01-31",G3="advisor-tool-2026-03-01",e2,x3;var Z5=R(()=>{e2=new Set(["interleaved-thinking-2025-05-14","context-1m-2025-08-07","tool-search-tool-2025-10-19"]),x3=new Set(["claude-code-20250219","interleaved-thinking-2025-05-14","context-management-2025-06-27"])});function A(){if(W()!=="firstParty")return!1;return!F(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)}function S1(){if(!A())return!1;return l8()===null}function n8(Z,$){switch(Z){case"free":return $==="oauth"?"Fast mode requires a paid subscription":"Fast mode unavailable during evaluation. Please purchase credits.";case"preference":return"Fast mode has been disabled by your organization";case"extra_usage_disabled":return"Fast mode requires extra usage billing · /extra-usage to enable";case"network_error":return"Fast mode unavailable due to network connectivity issues";case"unknown":return"Fast mode is currently unavailable"}}function l8(){if(W()!=="firstParty")return"Fast mode is not available on third-party providers";if(!A())return"Fast mode is not available";let Z=A0("tengu_penguins_off",null);if(Z!==null)return z(`Fast mode unavailable: ${Z}`),Z;if(!y1()&&A0("tengu_marble_sandcastle",!1))return"Fast mode requires the native binary · Install from: https://claude.com/product/claude-code";if(f()&&x2()&&!_1()){if(!O("flagSettings")?.fastMode)return z("Fast mode unavailable: Fast mode is not available in the Agent SDK"),"Fast mode is not available in the Agent SDK"}if(v.status==="disabled"){if(v.reason==="network_error"||v.reason==="unknown"){if(F(process.env.CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS))return null}let $=w()!==null?"oauth":"api-key",J=n8(v.reason,$);return z(`Fast mode unavailable: ${J}`),J}return null}function _3(){return"opus"+(f0()?"[1m]":"")}function I3(Z){if(!A())return!1;if(!S1())return!1;if(!M1(Z))return!1;let $=Q0();if($.fastModePerSessionOptIn)return!1;return $.fastMode===!0}function M1(Z){if(!A())return!1;let $=Z??h0(),J=T($).toLowerCase();return J.includes("opus-4-7")||J.includes("opus-4-6")}function i8(){if(w0.status==="cooldown"&&Date.now()>=w0.resetAt){if(A()&&!$5)z("Fast mode cooldown expired, re-enabling fast mode"),$5=!0,A1.emit();w0={status:"active"}}return w0}function S3(Z,$){if(!A())return;w0={status:"cooldown",resetAt:Z,reason:$},$5=!1;let J=Z-Date.now();z(`Fast mode cooldown triggered (${$}), duration ${Math.round(J/1000)}s`),x("tengu_fast_mode_fallback_triggered",{cooldown_duration_ms:J,cooldown_reason:$}),C1.emit(Z,$)}function M3(){w0={status:"active"}}function C3(){if(v.status==="disabled")return;v={status:"disabled",reason:"preference"},j2("userSettings",{fastMode:void 0}),C((Z)=>({...Z,penguinModeOrgEnabled:!1})),J5.emit(!1)}function t8(Z){switch(Z){case"out_of_credits":return"Fast mode disabled · extra usage credits exhausted";case"org_level_disabled":case"org_service_level_disabled":return"Fast mode disabled · extra usage disabled by your organization";case"org_level_disabled_until":return"Fast mode disabled · extra usage spending cap reached";case"member_level_disabled":return"Fast mode disabled · extra usage disabled for your account";case"seat_tier_level_disabled":case"seat_tier_zero_credit_limit":case"member_zero_credit_limit":return"Fast mode disabled · extra usage not available for your plan";case"overage_not_provisioned":case"no_limits_configured":return"Fast mode requires extra usage billing · /extra-usage to enable";default:return"Fast mode disabled · extra usage not available"}}function a8(Z){return Z==="org_level_disabled_until"||Z==="out_of_credits"}function h3(Z){let $=t8(Z);if(z(`Fast mode overage rejection: ${Z??"unknown"} — ${$}`),x("tengu_fast_mode_overage_rejected",{overage_disabled_reason:Z??"unknown"}),!a8(Z))j2("userSettings",{fastMode:void 0}),C((J)=>({...J,penguinModeOrgEnabled:!1}));h1.emit($)}function s8(){return i8().status==="cooldown"}function f3(Z,$){let J=A()&&S1()&&!!$&&M1(Z);if(J&&s8())return"cooldown";if(J)return"on";return"off"}async function o8(Z){let $=`${b().BASE_API_URL}/api/claude_code_penguin_mode`,J="accessToken"in Z?{Authorization:`Bearer ${Z.accessToken}`,"anthropic-beta":j0}:{"x-api-key":Z.apiKey};return(await P.get($,{headers:J})).data}function g3(){if(!A())return;if(v.status!=="pending")return;v=K().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"unknown"}}async function p3(){if(T1())return;if(!A())return;if(C0)return z("Fast mode prefetch in progress, returning in-flight promise"),C0;let Z=Y0();if(!(w()?.accessToken&&q0())&&!Z){v=K().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"preference"};return}let J=Date.now();if(J-v1<r8){z("Skipping fast mode prefetch, fetched recently");return}v1=J;let Q=async()=>{let X=w(),q=X?.accessToken&&q0()?{accessToken:X.accessToken}:Z?{apiKey:Z}:null;if(!q)throw Error("No auth available");return o8(q)};async function Y(){try{let X;try{X=await Q()}catch(V){if(P.isAxiosError(V)&&(V.response?.status===401||V.response?.status===403&&typeof V.response?.data==="string"&&V.response.data.includes("OAuth token has been revoked"))){let B=w()?.accessToken;if(B)await Q5(B),X=await Q();else throw V}else throw V}let q=v.status!=="pending"?v.status==="enabled":K().penguinModeOrgEnabled;if(v=X.enabled?{status:"enabled"}:{status:"disabled",reason:X.disabled_reason??"preference"},q!==X.enabled){if(!X.enabled)j2("userSettings",{fastMode:void 0});C((V)=>({...V,penguinModeOrgEnabled:X.enabled})),J5.emit(X.enabled)}z(`Org fast mode: ${X.enabled?"enabled":`disabled (${X.disabled_reason??"preference"})`}`)}catch(X){v=K().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"network_error"},z(`Failed to fetch org fast mode status, defaulting to ${v.status==="enabled"?"enabled (cached)":"disabled (network_error)"}: ${X}`,{level:"error"}),x("tengu_org_penguin_mode_fetch_failed",{})}finally{C0=null}}return C0=Y(),C0}var v3="Opus 4.7",w0,$5=!1,C1,A1,y3,T3,h1,A3,v,J5,u3,r8=30000,v1=0,C0=null;var f1=R(()=>{q2();S0();I1();J0();B2();n();c8();i();Z0();g();F0();t();d8();B0();F1();w0={status:"active"},C1=X0(),A1=X0(),y3=C1.subscribe,T3=A1.subscribe;h1=X0(),A3=h1.subscribe;v={status:"pending"},J5=X0(),u3=J5.subscribe});function XZ(Z){for(let $ of YZ)if($.pattern.test(Z))return $.cost;return}function Y5(Z){if(A()&&Z)return ZZ;return L0}function qZ(Z,$){let J=Z.promptCacheWrite1hTokens??Z.promptCacheWriteTokens,Q=$.cache_creation,Y=Q?(Q.ephemeral_5m_input_tokens??0)/1e6*Z.promptCacheWriteTokens+(Q.ephemeral_1h_input_tokens??0)/1e6*J:($.cache_creation_input_tokens??0)/1e6*Z.promptCacheWriteTokens;return $.input_tokens/1e6*Z.inputTokens+$.output_tokens/1e6*Z.outputTokens+($.cache_read_input_tokens??0)/1e6*Z.promptCacheReadTokens+Y+($.server_tool_use?.web_search_requests??0)*Z.webSearchRequests}function VZ(Z,$){let J=U(Z);if(J===D(s0.firstParty)||J===D(o0.firstParty)||J===D(r0.firstParty)){let Y=$.speed==="fast";return Y5(Y)}let Q=g1[J];if(!Q){let Y=XZ(Z);if(Y)return Y;return WZ(Z,J),g1[U(h0())]??QZ}return Q}function WZ(Z,$){x("tengu_unknown_model_cost",{model:Z,shortName:$}),m1()}function zZ(Z,$){let J=VZ(Z,$);return qZ(J,$)}function t3(Z,$){let J={input_tokens:$.inputTokens,output_tokens:$.outputTokens,cache_read_input_tokens:$.cacheReadInputTokens,cache_creation_input_tokens:$.cacheCreationInputTokens};return zZ(Z,J)}function p1(Z){if(Number.isInteger(Z))return`$${Z}`;return`$${Z.toFixed(2)}`}function c1(Z){return`${p1(Z.inputTokens)}/${p1(Z.outputTokens)} per Mtok`}var K0,u1,L0,e8,ZZ,$Z,JZ,QZ,YZ,g1;var d1=R(()=>{B2();J0();f1();g2();F0();K0={inputTokens:3,outputTokens:15,promptCacheWriteTokens:3.75,promptCacheWrite1hTokens:6,promptCacheReadTokens:0.3,webSearchRequests:0.01},u1={inputTokens:15,outputTokens:75,promptCacheWriteTokens:18.75,promptCacheWrite1hTokens:30,promptCacheReadTokens:1.5,webSearchRequests:0.01},L0={inputTokens:5,outputTokens:25,promptCacheWriteTokens:6.25,promptCacheWrite1hTokens:10,promptCacheReadTokens:0.5,webSearchRequests:0.01},e8={inputTokens:10,outputTokens:50,promptCacheWriteTokens:12.5,promptCacheWrite1hTokens:20,promptCacheReadTokens:1,webSearchRequests:0.01},ZZ={inputTokens:30,outputTokens:150,promptCacheWriteTokens:37.5,promptCacheWrite1hTokens:60,promptCacheReadTokens:3,webSearchRequests:0.01},$Z={inputTokens:0.8,outputTokens:4,promptCacheWriteTokens:1,promptCacheWrite1hTokens:1.6,promptCacheReadTokens:0.08,webSearchRequests:0.01},JZ={inputTokens:1,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheWrite1hTokens:2,promptCacheReadTokens:0.1,webSearchRequests:0.01},QZ=L0,YZ=[{pattern:/gpt-5-nano/i,label:"gpt-5-nano",cost:{inputTokens:0.05,outputTokens:0.4,promptCacheWriteTokens:0.05,promptCacheReadTokens:0.005,webSearchRequests:0}},{pattern:/gpt-5-mini/i,label:"gpt-5-mini",cost:{inputTokens:0.25,outputTokens:2,promptCacheWriteTokens:0.25,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gpt-5/i,label:"gpt-5",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gpt-4o-mini/i,label:"gpt-4o-mini",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/gpt-4o/i,label:"gpt-4o",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:1.25,webSearchRequests:0}},{pattern:/gpt-4\.1/i,label:"gpt-4.1",cost:{inputTokens:2,outputTokens:8,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/o4-mini/i,label:"o4-mini",cost:{inputTokens:0.55,outputTokens:2.2,promptCacheWriteTokens:0.55,promptCacheReadTokens:0.275,webSearchRequests:0}},{pattern:/\bo3\b/i,label:"o3",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/\bo1\b/i,label:"o1",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/gemini.*2\.5.*pro/i,label:"gemini-2.5-pro",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini.*2\.5.*flash/i,label:"gemini-2.5-flash",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/gemini.*flash/i,label:"gemini-flash",cost:{inputTokens:0.1,outputTokens:0.4,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gemini.*pro/i,label:"gemini-pro",cost:{inputTokens:1.25,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini/i,label:"gemini",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/deepseek/i,label:"deepseek",cost:{inputTokens:0.14,outputTokens:0.28,promptCacheWriteTokens:0.14,promptCacheReadTokens:0.0028,webSearchRequests:0}},{pattern:/kimi-for-coding/i,label:"kimi-for-coding",cost:{inputTokens:1,outputTokens:2,promptCacheWriteTokens:1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/kimi/i,label:"kimi",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/moonshot/i,label:"moonshot",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/devstral/i,label:"devstral",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/mistral.*large.*3/i,label:"mistral-large-3",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/mistral.*large/i,label:"mistral-large",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:2,webSearchRequests:0}},{pattern:/mistral.*medium/i,label:"mistral-medium",cost:{inputTokens:0.4,outputTokens:2,promptCacheWriteTokens:0.4,promptCacheReadTokens:0.4,webSearchRequests:0}},{pattern:/mistral.*small/i,label:"mistral-small",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*8b/i,label:"ministral-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*3b/i,label:"ministral-3b",cost:{inputTokens:0.04,outputTokens:0.04,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/llama.*405/i,label:"llama-405b",cost:{inputTokens:3.5,outputTokens:3.5,promptCacheWriteTokens:3.5,promptCacheReadTokens:3.5,webSearchRequests:0}},{pattern:/llama.*70/i,label:"llama-70b",cost:{inputTokens:0.59,outputTokens:0.79,promptCacheWriteTokens:0.59,promptCacheReadTokens:0.59,webSearchRequests:0}},{pattern:/llama.*8b/i,label:"llama-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/qwen/i,label:"qwen",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/minimax/i,label:"minimax",cost:{inputTokens:0.2,outputTokens:1.1,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.2,webSearchRequests:0}},{pattern:/\bglm/i,label:"glm",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4.*fast/i,label:"grok-4-fast",cost:{inputTokens:0.2,outputTokens:0.5,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.05,webSearchRequests:0}},{pattern:/grok.*4\.20/i,label:"grok-4.20",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4/i,label:"grok-4",cost:{inputTokens:3,outputTokens:15,promptCacheWriteTokens:3,promptCacheReadTokens:0.75,webSearchRequests:0}},{pattern:/grok/i,label:"grok",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/command-?r-?plus|command-r\+/i,label:"command-r-plus",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?a\b/i,label:"command-a",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?r7b/i,label:"command-r7b",cost:{inputTokens:0.0375,outputTokens:0.15,promptCacheWriteTokens:0.0375,promptCacheReadTokens:0.0375,webSearchRequests:0}},{pattern:/command-?r/i,label:"command-r",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.15,webSearchRequests:0}},{pattern:/gemma.*27b/i,label:"gemma-27b",cost:{inputTokens:0.08,outputTokens:0.16,promptCacheWriteTokens:0.08,promptCacheReadTokens:0.08,webSearchRequests:0}},{pattern:/gemma.*12b/i,label:"gemma-12b",cost:{inputTokens:0.04,outputTokens:0.13,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/gemma/i,label:"gemma",cost:{inputTokens:0.04,outputTokens:0.08,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/phi-?4-?mini/i,label:"phi-4-mini",cost:{inputTokens:0.075,outputTokens:0.3,promptCacheWriteTokens:0.075,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/phi-?4/i,label:"phi-4",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}},{pattern:/\bphi\b/i,label:"phi",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}}];g1={[D(I2.firstParty)]:$Z,[D(y2.firstParty)]:JZ,[D(_2.firstParty)]:K0,[D(v2.firstParty)]:K0,[D(T2.firstParty)]:K0,[D(S2.firstParty)]:K0,[D(f2.firstParty)]:K0,[D(u2.firstParty)]:K0,[D(M2.firstParty)]:u1,[D(C2.firstParty)]:u1,[D(A2.firstParty)]:L0,[D(s0.firstParty)]:L0,[D(o0.firstParty)]:L0,[D(r0.firstParty)]:L0,[D(h2.firstParty)]:e8}});function m(Z){return GZ.includes(Z)}function D0(Z){return xZ.includes(Z)}var GZ,xZ;var X5=R(()=>{GZ=["sonnet","opus","haiku","fable","best","sonnet[1m]","opus[1m]","opusplan"];xZ=["sonnet","opus","haiku"]});function BZ(Z,$){if(Z.includes($))return!0;if(m(Z))return T(Z).toLowerCase().includes($);return!1}function n1(Z,$){if(!Z.startsWith($))return!1;return Z.length===$.length||Z[$.length]==="-"}function jZ(Z,$){let J=m(Z)?T(Z).toLowerCase():Z;if(n1(J,$))return!0;if(!$.startsWith("claude-")&&n1(J,`claude-${$}`))return!0;return!1}function l1(Z,$){for(let J of $){if(D0(J))continue;let Q=J.indexOf(Z);if(Q===-1)continue;let Y=Q+Z.length;if(Y===J.length||J[Y]==="-")return!0}return!1}function i1(Z){let $=S()||{},{availableModels:J}=$;if(!J)return!0;if(J.length===0)return!1;let Y=Y2(Z).trim().toLowerCase(),X=J.map((q)=>q.trim().toLowerCase());if(X.includes(Y)){if(!D0(Y)||!l1(Y,X))return!0}for(let q of X)if(D0(q)&&!l1(q,X)&&BZ(Y,q))return!0;if(m(Y)){let q=T(Y).toLowerCase();if(X.includes(q))return!0}for(let q of X)if(!D0(q)&&m(q)){if(T(q).toLowerCase()===Y)return!0}for(let q of X)if(!D0(q)&&!m(q)){if(jZ(Y,q))return!0}return!1}var t1=R(()=>{B0();X5();F0();X2()});function H2(Z){if(typeof Z!=="string")return;let $=Z.trim();return $.length>0?$:void 0}function U0(){let Z=L();if(!Z?.model)return;return Z4(Z.model)}function L9(){if(process.env.ANTHROPIC_SMALL_FAST_MODEL)return process.env.ANTHROPIC_SMALL_FAST_MODEL;let Z=U0();if(W()==="gemini")return Z||"gemini-2.0-flash-lite";if(W()==="mistral")return Z||"ministral-3b-latest";if(W()==="openai")return Z||"gpt-4o-mini";if(W()==="codex")return Z||"codexspark";if(W()==="github")return Z||"github:copilot";if(W()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.5-highspeed";return Q4()}function D9(Z){return Z===j().opus40||Z===j().opus41||Z===j().opus45||Z===j().opus46||Z===j().opus47||Z===j().opus48}function q5(){let Z,$=s1();if($!==void 0)Z=$;else{let J=S()||{},Q=H2(J.model),X=U0()||Q||void 0,q=e1(),V=H2(q.activeModelForProject);if(V){let G=$4()?.id,B=q.activeModelForProjectProfileId;Z=B===void 0||B===G?V:X}else Z=X}if(Z&&!i1(Z))return;return Z}function N9(){let Z=q5();if(Z!==void 0&&Z!==null)return T(Z);return Y4()}function FZ(){return N0()}function N0(){if(process.env.ANTHROPIC_DEFAULT_OPUS_MODEL)return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;let Z=U0();if(W()==="gemini")return Z||"gemini-2.5-pro";if(W()==="mistral")return Z||"devstral-latest";if(W()==="openai")return Z||"gpt-4o";if(W()==="codex")return Z||"gpt-5.5";if(W()==="github")return Z||"github:copilot";if(W()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.7";if(W()!=="firstParty")return j().opus46;return j().opus48}function u0(){if(process.env.ANTHROPIC_DEFAULT_SONNET_MODEL)return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;let Z=U0();if(W()==="gemini")return Z||"gemini-2.0-flash";if(W()==="mistral")return Z||"mistral-medium-latest";if(W()==="openai")return Z||"gpt-4o";if(W()==="codex")return Z||"gpt-5.5";if(W()==="github")return Z||"github:copilot";if(W()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.5";if(W()!=="firstParty")return j().sonnet45;return j().sonnet5}function Q4(){if(process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL)return process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;let Z=U0();if(W()==="mistral")return Z||"ministral-3b-latest";if(W()==="openai")return Z||"gpt-4o-mini";if(W()==="codex")return Z||"gpt-5.5";if(W()==="github")return Z||"github:copilot";if(W()==="gemini")return Z||"gemini-2.0-flash-lite";if(W()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.5-highspeed";return j().haiku45}function U9(Z){let{permissionMode:$,mainLoopModel:J,exceeds200kTokens:Q=!1}=Z;if(q5()==="opusplan"&&$==="plan"&&!Q)return N0();if(q5()==="haiku"&&$==="plan")return u0();return J}function h0(){let Z=U0();if(W()==="github"){let $=S()||{};return H2($.model)||Z||"github:copilot"}if(W()==="gemini")return Z||"gemini-2.0-flash";if(W()==="mistral")return Z||"devstral-latest";if(W()==="openai")return Z||"gpt-4o";if(W()==="codex")return Z||"gpt-5.5";if(R2())return N0()+(f0()?"[1m]":"");if(w2())return N0()+(f0()?"[1m]":"");return u0()}function Y4(){return T(h0())}function D(Z){if(Z=Z.toLowerCase(),Z.includes("claude-fable-5"))return"claude-fable-5";if(Z.includes("claude-opus-4-8"))return"claude-opus-4-8";if(Z.includes("claude-opus-4-7"))return"claude-opus-4-7";if(Z.includes("claude-opus-4-6"))return"claude-opus-4-6";if(Z.includes("claude-opus-4-5"))return"claude-opus-4-5";if(Z.includes("claude-opus-4-1"))return"claude-opus-4-1";if(Z.includes("claude-opus-4"))return"claude-opus-4";if(Z.includes("claude-sonnet-5"))return"claude-sonnet-5";if(Z.includes("claude-sonnet-4-6"))return"claude-sonnet-4-6";if(Z.includes("claude-sonnet-4-5"))return"claude-sonnet-4-5";if(Z.includes("claude-sonnet-4"))return"claude-sonnet-4";if(Z.includes("claude-haiku-4-5"))return"claude-haiku-4-5";if(Z.includes("claude-3-7-sonnet"))return"claude-3-7-sonnet";if(Z.includes("claude-3-5-sonnet"))return"claude-3-5-sonnet";if(Z.includes("claude-3-5-haiku"))return"claude-3-5-haiku";if(Z.includes("claude-3-opus"))return"claude-3-opus";if(Z.includes("claude-3-sonnet"))return"claude-3-sonnet";if(Z.includes("claude-3-haiku"))return"claude-3-haiku";let $=Z.match(/(claude-(\d+-\d+-)?\w+)/);if($&&$[1])return $[1];return Z}function U(Z){return D(Y2(Z))}function KZ(Z=!1){if(R2()||w2()){if(f0())return`Opus 4.8 with 1M context · Most capable for complex work${Z?a1(!0):""}`;return`Opus 4.8 · Most capable for complex work${Z?a1(!0):""}`}return"Sonnet 5 · Best for everyday tasks"}function b9(Z){if(Z==="opusplan")return"Opus 4.8 in plan mode, else Sonnet 5";return q4(T(Z))}function a1(Z){if(W()!=="firstParty")return"";let $=c1(Y5(Z));return` ·${Z?` (${o1})`:""} ${$}`}function f0(){if(V0()||z5()||W()!=="firstParty")return!1;if(k()&&_()===null)return!1;return!0}function k9(Z){if(Z==="opusplan")return"Opus Plan";if(Z==="codexplan")return"codexplan (gpt-5.5)";if(Z==="codexspark")return"codexspark (gpt-5.3-codex-spark)";if(m(Z))return r1(Z);return q4(Z)}function X4(Z){if(W()==="openai"||W()==="gemini"||W()==="codex"||W()==="github"){if(p2[Z])return p2[Z];if(W()==="github"){let{getCopilotDisplayName:$}=(_0(),I0(v0));return $(Z)??null}return null}switch(Z){case"gpt-5.5":return"GPT-5.5";case"gpt-5.4":return"GPT-5.4";case"gpt-5.3-codex-spark":return"GPT-5.3 Codex Spark";case j().fable5:return"Fable 5";case j().opus48:return"Opus 4.8";case j().opus48+"[1m]":return"Opus 4.8 (1M context)";case j().opus47:return"Opus 4.7";case j().opus47+"[1m]":return"Opus 4.7 (1M context)";case j().opus46:return"Opus 4.6";case j().opus46+"[1m]":return"Opus 4.6 (1M context)";case j().opus45:return"Opus 4.5";case j().opus41:return"Opus 4.1";case j().opus40:return"Opus 4";case j().sonnet5:return"Sonnet 5";case j().sonnet46+"[1m]":return"Sonnet 4.6 (1M context)";case j().sonnet46:return"Sonnet 4.6";case j().sonnet45+"[1m]":return"Sonnet 4.5 (1M context)";case j().sonnet45:return"Sonnet 4.5";case j().sonnet40:return"Sonnet 4";case j().sonnet40+"[1m]":return"Sonnet 4 (1M context)";case j().sonnet37:return"Sonnet 3.7";case j().sonnet35:return"Sonnet 3.5";case j().haiku45:return"Haiku 4.5";case j().haiku35:return"Haiku 3.5";default:return null}}function q4(Z){let $=X4(Z);if($)return $;if(Z==="github:copilot")return"GPT-4o";return Z}function P9(Z){let $=X4(Z);if($)return`Claude ${$}`;return`Claude (${Z})`}function T(Z){let $=H2(Z);if(!$)return u0();let J=$.toLowerCase(),Q=s(J),Y=Q?J.replace(/\[1m]$/i,"").trim():J;if(m(Y))switch(Y){case"opusplan":return u0()+(Q?"[1m]":"");case"sonnet":return u0()+(Q?"[1m]":"");case"haiku":return Q4()+(Q?"[1m]":"");case"opus":return N0()+(Q?"[1m]":"");case"best":return FZ();default:}if(Y==="codexplan")return"gpt-5.5";if(Y==="codexspark")return"gpt-5.3-codex-spark";if(Y==="fable"||Y==="fable5")return j().fable5;if(W()==="firstParty"&&DZ(Y)&&NZ())return N0()+(Q?"[1m]":"");if(Q)return $.replace(/\[1m\]$/i,"").trim()+"[1m]";return $}function O9(Z,$){if(s(Z)||!s($))return Z;if(V5(T(Z)))return Z+"[1m]";return Z}function DZ(Z){return LZ.includes(Z)}function NZ(){return!F(process.env.CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP)}function E9(Z){if(Z===null){if(k())return`Default (${KZ()})`;return`Default (${Y4()})`}let $=T(Z);return Z===$?$:`${Z} (${$})`}function v9(Z){if(W()==="foundry")return;let $=Z.toLowerCase().includes("[1m]"),J=U(Z);if(J.includes("claude-fable-5"))return"Fable 5";if(J.includes("claude-opus-4-8"))return $?"Opus 4.8 (with 1M context)":"Opus 4.8";if(J.includes("claude-opus-4-7"))return $?"Opus 4.7 (with 1M context)":"Opus 4.7";if(J.includes("claude-opus-4-6"))return $?"Opus 4.6 (with 1M context)":"Opus 4.6";if(J.includes("claude-opus-4-5"))return"Opus 4.5";if(J.includes("claude-opus-4-1"))return"Opus 4.1";if(J.includes("claude-opus-4"))return"Opus 4";if(J.includes("claude-sonnet-5"))return"Sonnet 5";if(J.includes("claude-sonnet-4-6"))return $?"Sonnet 4.6 (with 1M context)":"Sonnet 4.6";if(J.includes("claude-sonnet-4-5"))return $?"Sonnet 4.5 (with 1M context)":"Sonnet 4.5";if(J.includes("claude-sonnet-4"))return $?"Sonnet 4 (with 1M context)":"Sonnet 4";if(J.includes("claude-3-7-sonnet"))return"Claude 3.7 Sonnet";if(J.includes("claude-3-5-sonnet"))return"Claude 3.5 Sonnet";if(J.includes("claude-haiku-4-5"))return"Haiku 4.5";if(J.includes("claude-3-5-haiku"))return"Claude 3.5 Haiku";return}function _9(Z){return Z.replace(/\[(1|2)m\]/gi,"")}function I9(Z){let $=U(Z);return $.includes("opus-4-7")||$.includes("opus-4-8")||$.includes("fable-5")||$.includes("sonnet-5")}var LZ;var F0=R(()=>{J0();$0();i();J4();n();W5();g();wZ();X2();d1();B0();t();HZ();t1();X5();RZ();m2();LZ=["claude-opus-4-20250514","claude-opus-4-1-20250805","claude-opus-4-0","claude-opus-4-1"]});function G5(Z){return}async function T9(){}var V4=()=>{};function PZ(Z,$={}){if($.isPro??(kZ.test(Z)||W4.has(Z)))return!1;if(UZ.has(Z))return!0;if(W4.has(Z))return!1;let Q=Z.match(bZ);return Q?Number.parseFloat(Q[1])>5.4:!1}function M9(){return F2.filter((Z)=>PZ(Z.id,{isPro:Z.isPro}))}var F2,UZ,W4,bZ,kZ,z4,G4;var x4=R(()=>{F2=[{id:"gpt-5.6-sol",label:"gpt-5.6-sol",description:"GPT-5.6 Sol - flagship, high reasoning",reasoningEffort:"high",contextInput:1050000,contextOutput:128000},{id:"gpt-5.6-terra",label:"gpt-5.6-terra",description:"GPT-5.6 Terra with high reasoning",reasoningEffort:"high",contextInput:1050000,contextOutput:128000},{id:"gpt-5.6-luna",label:"gpt-5.6-luna",description:"GPT-5.6 Luna with high reasoning",reasoningEffort:"high",contextInput:1050000,contextOutput:128000},{id:"gpt-5.5",label:"gpt-5.5",description:"GPT-5.5 with high reasoning",reasoningEffort:"high",contextInput:1050000,contextOutput:128000},{id:"gpt-5.4",label:"gpt-5.4",description:"GPT-5.4 with high reasoning",reasoningEffort:"high",contextInput:1050000,contextOutput:128000},{id:"gpt-5.3-codex",label:"gpt-5.3-codex",description:"GPT-5.3 Codex with high reasoning",reasoningEffort:"high"},{id:"gpt-5.3-codex-spark",label:"gpt-5.3-codex-spark",description:"GPT-5.3 Codex Spark for fast tool loops"},{id:"codexspark",label:"codexspark",description:"GPT-5.3 Codex Spark alias for fast tool loops"},{id:"gpt-5.2-codex",label:"gpt-5.2-codex",description:"GPT-5.2 Codex with high reasoning",reasoningEffort:"high"},{id:"gpt-5.1-codex-max",label:"gpt-5.1-codex-max",description:"GPT-5.1 Codex Max for deep reasoning",reasoningEffort:"high"},{id:"gpt-5.1-codex-mini",label:"gpt-5.1-codex-mini",description:"GPT-5.1 Codex Mini - faster, cheaper"},{id:"gpt-5.5-mini",label:"gpt-5.5-mini",description:"GPT-5.5 Mini - faster, cheaper",reasoningEffort:"medium",contextInput:400000,contextOutput:128000},{id:"gpt-5.4-mini",label:"gpt-5.4-mini",description:"GPT-5.4 Mini - faster, cheaper",reasoningEffort:"medium",contextInput:400000,contextOutput:128000}],UZ=new Set(F2.filter((Z)=>!Z.isPro).map((Z)=>Z.id)),W4=new Set(["gpt-5.5-pro"]),bZ=/^gpt-(\d+\.\d+)/,kZ=/-pro$/;z4=Object.fromEntries(F2.filter((Z)=>Z.contextInput!==void 0).map((Z)=>[Z.id,Z.contextInput])),G4=Object.fromEntries(F2.filter((Z)=>Z.contextOutput!==void 0).map((Z)=>[Z.id,Z.contextOutput]))});var K4={};d2(K4,{prefetchOpenAICompatibleModels:()=>CZ,getDiscoveredContextWindow:()=>OZ,discoverOpenAICompatibleModelOptions:()=>F4});function OZ(Z){return R4.get(Z)}function EZ(){return(L()?.baseUrl??"https://api.openai.com/v1").replace(/\/+$/,"")}function w4(Z){try{let $=new URL(Z).hostname.toLowerCase();return $.endsWith(".openai.azure.com")||$.endsWith(".cognitiveservices.azure.com")}catch{return!1}}function vZ(Z){try{return new URL(Z).hostname.toLowerCase().includes("bankr")}catch{return!1}}function _Z(Z){let $=L()?.apiKey?.trim();if(!$)return{};if(vZ(Z))return{"X-API-Key":$};let J={Authorization:`Bearer ${$}`};if(w4(Z))J["api-key"]=$;return J}function IZ(Z){let $=Z.endsWith("/v1")?`${Z}/models`:`${Z}/v1/models`,J=`${Z}/models`,Q=process.env.OPENAI_API_VERSION?.trim(),Y=Q&&w4(Z)?(X)=>{try{let q=new URL(X);return q.searchParams.set("api-version",Q),q.toString()}catch{return X}}:(X)=>X;if($===J)return[Y($)];return[Y($),Y(J)]}function yZ(Z){try{let $=new URL(Z),J=$.pathname.replace(/\/+$/,""),Y=`${J.endsWith("/v1")?J.slice(0,-3):J}/api/tags`.replace(/\/{2,}/g,"/");return`${$.origin}${Y}`}catch{return null}}function TZ(Z){if(Z>=1e6)return`${Z/1e6}M ctx`;if(Z>=1000)return`${Math.round(Z/1000)}K ctx`;return`${Z} ctx`}async function SZ(Z,$){let J=new Set;for(let Q of Z)try{let Y=await P.get(Q,{headers:$,timeout:H4}),X=[];for(let q of Y.data?.data??[]){let V=q.id?.trim();if(!V||J.has(V))continue;J.add(V);let G=q.name?.trim()||V,B=q.context_length??null;if(B&&B>0)R4.set(V,B);let H=B?` · ${TZ(B)}`:"";X.push({value:V,label:G,description:`${V}${H}`})}if(X.length>0)return X.sort((q,V)=>{let G=String(q.value).split("/")[0]??"",B=String(V.value).split("/")[0]??"",H=G.localeCompare(B);return H!==0?H:String(q.value).localeCompare(String(V.value))}),X}catch{z(`[ModelDiscovery] Failed to fetch OpenAI models from ${Q}`)}return[]}async function MZ(Z,$){try{let J=await P.get(Z,{headers:$,timeout:H4}),Q=new Set;return(J.data?.models??[]).map((Y)=>Y.name?.trim()??"").filter((Y)=>{if(!Y||Q.has(Y))return!1;return Q.add(Y),!0}).map((Y)=>({value:Y,label:Y,description:"Ollama model"}))}catch{return z(`[ModelDiscovery] Failed to fetch Ollama models from ${Z}`),[]}}async function F4(){if(W()!=="openai")return[];let Z=EZ(),$=_Z(Z),J=await SZ(IZ(Z),$);if(J.length>0)return J;let Q=yZ(Z);if(Q)return MZ(Q,$);return[]}function CZ(){if(g0)return g0;return g0=(async()=>{if(!j4()?.startsWith("openai:"))return;try{let $=await F4();if($.length>0)B4($)}catch{}finally{g0=null}})(),g0}var H4=5000,R4,g0=null;var L4=R(()=>{q2();$0();d5();Z0();t();J4();R4=new Map});function N4(Z,$,J){let Q=L()?.model?.trim();if(Q&&Q!==J){let X=`${Q}:${J}`;if($[X]!==void 0)return $[X];if(Z[X]!==void 0)return Z[X]}let Y=D4($,J);if(Y!==void 0)return Y;return D4(Z,J)}function D4(Z,$){if(Z[$]!==void 0)return Z[$];let J=Object.keys(Z).sort((Q,Y)=>Y.length-Q.length);for(let Q of J)if($.startsWith(Q))return Z[Q];return}function U4(Z){try{let{getDiscoveredContextWindow:J}=(L4(),I0(K4)),Q=J(Z);if(Q!==void 0)return Q}catch{}let $=N4(AZ,fZ,Z);if($!==void 0)return $;try{let{getCatalogCopilotContextWindow:J}=(_0(),I0(v0));return J(Z)}catch{return}}function b4(Z){let $=N4(hZ,uZ,Z);if($!==void 0)return $;try{let{getCatalogCopilotMaxOutputTokens:J}=(_0(),I0(v0));return J(Z)}catch{return}}var AZ,hZ,fZ,uZ;var k4=R(()=>{$0();x4();AZ={"github:copilot":128000,"github:copilot:claude-haiku-4.5":144000,"github:copilot:claude-sonnet-4.6":200000,"github:copilot:claude-opus-4.7":200000,"github:copilot:gpt-4.1":128000,"github:copilot:gpt-4o":128000,"github:copilot:gpt-5-mini":264000,"github:copilot:gpt-5.2-codex":400000,"github:copilot:gpt-5.4":400000,"github:copilot:gpt-5.5":400000,"github:copilot:gemini-3.1-pro-preview":200000,"github:copilot:grok-code-fast-1":256000,"github_copilot/claude-haiku-4.5":144000,"github_copilot/claude-sonnet-4.6":200000,"github_copilot/claude-opus-4.7":200000,"github_copilot/gpt-4.1":128000,"github_copilot/gpt-4o":128000,"github_copilot/gpt-5-mini":264000,"github_copilot/gpt-5.2-codex":400000,"github_copilot/gpt-5.4":400000,"github_copilot/gpt-5.5":400000,"github_copilot/gemini-3.1-pro-preview":200000,"github_copilot/grok-code-fast-1":256000,...z4,"gpt-5.5-nano":400000,"gpt-5.4-nano":400000,"gpt-4o":128000,"gpt-4o-mini":128000,"gpt-4.1":1047576,"gpt-4.1-mini":1047576,"gpt-4.1-nano":1047576,"gpt-4-turbo":128000,"gpt-4":8192,o1:200000,"o1-mini":128000,"o1-preview":128000,"o1-pro":200000,o3:200000,"o3-mini":200000,"o4-mini":200000,"deepseek-v4-flash":1048576,"deepseek-v4-pro":1048576,"deepseek-chat":128000,"deepseek-reasoner":128000,"llama-3.3-70b-versatile":128000,"llama-3.1-8b-instant":128000,"mixtral-8x7b-32768":32768,"mistral-large-latest":256000,"mistral-small-latest":256000,"devstral-latest":256000,"ministral-3b-latest":256000,"nvidia/llama-3.1-nemotron-70b-instruct":128000,"nvidia/llama-3.1-nemotron-ultra-253b-v1":128000,"nvidia/nemotron-mini-4b-instruct":32768,"meta/llama-3.1-405b-instruct":128000,"meta/llama-3.1-70b-instruct":128000,"meta/llama-3.1-8b-instruct":128000,"meta/llama-3.2-90b-instruct":128000,"meta/llama-3.2-1b-instruct":128000,"meta/llama-3.2-3b-instruct":128000,"meta/llama-3.3-70b-instruct":128000,"google/gemma-2-27b-it":8192,"google/gemma-2-9b-it":8192,"google/gemma-3-27b-it":131072,"google/gemma-3-12b-it":131072,"google/gemma-3-4b-it":131072,"deepseek-ai/deepseek-r1":128000,"deepseek-ai/deepseek-v3":128000,"deepseek-ai/deepseek-v3.2":128000,"qwen/qwen3-32b":128000,"qwen/qwen3-8b":128000,"qwen/qwen2.5-7b-instruct":32768,"mistralai/mistral-large-3-675b-instruct-2512":256000,"mistralai/mistral-large-2-instruct":256000,"mistralai/mistral-small-3.1-24b-instruct-2503":32768,"mistralai/mixtral-8x7b-instruct-v0.1":32768,"microsoft/phi-4-mini-instruct":16384,"microsoft/phi-3.5-mini-instruct":16384,"microsoft/phi-3-mini-128k-instruct":128000,"ibm/granite-3.3-8b-instruct":8192,"ibm/granite-8b-code-instruct":8192,"z-ai/glm5":200000,"z-ai/glm4.7":128000,"moonshotai/kimi-k2.5":200000,"moonshotai/kimi-k2-instruct":128000,"databricks/dbrx-instruct":131072,"ai21labs/jamba-1.5-large-instruct":256000,"ai21labs/jamba-1.5-mini-instruct":256000,"01-ai/yi-large":32768,"MiniMax-M2.7":204800,"MiniMax-M2.7-highspeed":204800,"MiniMax-M2.5":204800,"MiniMax-M2.5-highspeed":204800,"MiniMax-M2.1":204800,"MiniMax-M2.1-highspeed":204800,"minimax-m2.7":204800,"minimax-m2.7-highspeed":204800,"minimax-m2.5":204800,"minimax-m2.5-highspeed":204800,"minimax-m2.1":204800,"minimax-m2.1-highspeed":204800,"MiniMax-Text-01":524288,"MiniMax-Text-01-Preview":262144,"MiniMax-Vision-01":32768,"MiniMax-Vision-01-Fast":16384,"MiniMax-M2":204800,"google/gemini-2.0-flash":1048576,"google/gemini-2.5-pro":1048576,"gemini-2.0-flash":1048576,"gemini-2.5-pro":1048576,"gemini-2.5-flash":1048576,"gemini-3.1-pro":1048576,"gemini-3.1-flash-lite-preview":1048576,"llama3.3:70b":128000,"llama3.1:8b":128000,"llama3.2:3b":128000,"qwen2.5-coder:32b":32768,"qwen2.5-coder:7b":32768,"deepseek-coder-v2:16b":163840,"deepseek-r1:14b":65536,"mistral:7b":32768,"phi4:14b":16384,"gemma2:27b":8192,"codellama:13b":16384,"llama3.2:1b":128000,"qwen3:8b":128000,codestral:32768,"qwen3.6-plus":1e6,"qwen3.5-plus":1e6,"qwen3-coder-plus":1e6,"qwen3-coder-next":262144,"qwen3-max":262144,"qwen3-max-2026-01-23":262144,"kimi-k2.5":262144,"glm-5":202752,"glm-4.7":202752,k3:1048576,"kimi-for-coding":262144,"kimi-for-coding-highspeed":262144,"kimi-k2.6":262144,"kimi-k2":131072,"kimi-k2-instruct":131072,"kimi-k2-thinking":262144,"moonshot-v1-8k":8192,"moonshot-v1-32k":32768,"moonshot-v1-128k":131072},hZ={"github:copilot":16384,"github:copilot:claude-haiku-4.5":32768,"github:copilot:claude-sonnet-4.6":32000,"github:copilot:claude-opus-4.7":32000,"github:copilot:gpt-4.1":16384,"github:copilot:gpt-4o":16384,"github:copilot:gpt-5-mini":64000,"github:copilot:gpt-5.2-codex":128000,"github:copilot:gpt-5.4":128000,"github:copilot:gpt-5.5":128000,"github:copilot:gemini-3.1-pro-preview":64000,"github:copilot:grok-code-fast-1":64000,"github_copilot/claude-haiku-4.5":32768,"github_copilot/claude-sonnet-4.6":32000,"github_copilot/claude-opus-4.7":32000,"github_copilot/gpt-4.1":16384,"github_copilot/gpt-4o":16384,"github_copilot/gpt-5-mini":64000,"github_copilot/gpt-5.2-codex":128000,"github_copilot/gpt-5.4":128000,"github_copilot/gpt-5.5":128000,"github_copilot/gemini-3.1-pro-preview":64000,"github_copilot/grok-code-fast-1":64000,...G4,"gpt-5.5-nano":128000,"gpt-5.4-nano":128000,"gpt-4o":16384,"gpt-4o-mini":16384,"gpt-4.1":32768,"gpt-4.1-mini":32768,"gpt-4.1-nano":32768,"gpt-4-turbo":4096,"gpt-4":4096,o1:1e5,"o1-mini":65536,"o1-preview":32768,"o1-pro":1e5,o3:1e5,"o3-mini":1e5,"o4-mini":1e5,"deepseek-v4-flash":262144,"deepseek-v4-pro":262144,"deepseek-chat":8192,"deepseek-reasoner":65536,"llama-3.3-70b-versatile":32768,"llama-3.1-8b-instant":8192,"mixtral-8x7b-32768":32768,"mistral-large-latest":32768,"mistral-small-latest":32768,"MiniMax-M2.7":131072,"MiniMax-M2.7-highspeed":131072,"MiniMax-M2.5":131072,"MiniMax-M2.5-highspeed":131072,"MiniMax-M2.1":131072,"MiniMax-M2.1-highspeed":131072,"minimax-m2.7":131072,"minimax-m2.7-highspeed":131072,"minimax-m2.5":131072,"minimax-m2.5-highspeed":131072,"minimax-m2.1":131072,"minimax-m2.1-highspeed":131072,"MiniMax-M2":131072,"MiniMax-Text-01":65536,"MiniMax-Text-01-Preview":65536,"MiniMax-Vision-01":16384,"MiniMax-Vision-01-Fast":16384,"google/gemini-2.0-flash":8192,"google/gemini-2.5-pro":65536,"gemini-2.0-flash":8192,"gemini-2.5-pro":65536,"gemini-2.5-flash":65536,"gemini-3.1-pro":65536,"gemini-3.1-flash-lite-preview":65536,"llama3.3:70b":4096,"llama3.1:8b":4096,"llama3.2:3b":4096,"qwen2.5-coder:32b":8192,"qwen2.5-coder:7b":8192,"deepseek-coder-v2:16b":8192,"deepseek-r1:14b":8192,"mistral:7b":4096,"phi4:14b":4096,"gemma2:27b":4096,"codellama:13b":4096,"llama3.2:1b":4096,"qwen3:8b":8192,codestral:8192,"nvidia/llama-3.1-nemotron-70b-instruct":32768,"nvidia/nemotron-mini-4b-instruct":8192,"meta/llama-3.1-405b-instruct":32768,"meta/llama-3.1-70b-instruct":32768,"meta/llama-3.2-90b-instruct":32768,"meta/llama-3.3-70b-instruct":32768,"google/gemma-2-27b-it":4096,"google/gemma-3-27b-it":16384,"google/gemma-3-12b-it":16384,"deepseek-ai/deepseek-r1":32768,"deepseek-ai/deepseek-v3":32768,"deepseek-ai/deepseek-v3.2":32768,"qwen/qwen3-32b":32768,"qwen/qwen2.5-7b-instruct":8192,"mistralai/mistral-large-3-675b-instruct-2512":32768,"mistralai/mixtral-8x7b-instruct-v0.1":8192,"microsoft/phi-4-mini-instruct":4096,"microsoft/phi-3.5-mini-instruct":4096,"ibm/granite-3.3-8b-instruct":4096,"z-ai/glm5":32768,"moonshotai/kimi-k2.5":32768,"databricks/dbrx-instruct":32768,"ai21labs/jamba-1.5-large-instruct":32768,"01-ai/yi-large":8192,"qwen3.6-plus":65536,"qwen3.5-plus":65536,"qwen3-coder-plus":65536,"qwen3-coder-next":65536,"qwen3-max":32768,"qwen3-max-2026-01-23":32768,"kimi-k2.5":32768,"glm-5":16384,"glm-4.7":16384,k3:32768,"kimi-for-coding":32768,"kimi-for-coding-highspeed":32768,"kimi-k2.6":32768,"kimi-k2":32768,"kimi-k2-instruct":32768,"kimi-k2-thinking":32768,"moonshot-v1-8k":4096,"moonshot-v1-32k":16384,"moonshot-v1-128k":32768},fZ=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_CONTEXT_WINDOWS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})(),uZ=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_MAX_OUTPUT_TOKENS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})()});function P4(){let Z=L()?.transport;return Z==="openai_compat"||Z==="gemini"||Z==="mistral"||Z==="github_copilot"||Z==="codex_responses"}function V0(){return F(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)}function s(Z){if(V0())return!1;return/\[1m\]/i.test(Z)}function V5(Z){if(V0())return!1;let $=U(Z);return $.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("opus-4-6")||$.includes("opus-4-7")||$.includes("opus-4-8")||$.includes("fable-5")}function $Q(Z,$){if(s(Z))return 1e6;if(P4()){let Q=U4(Z);if(Q!==void 0)return Q;return console.error(`[context] Warning: model "${Z}" not in context window table — using conservative 128k default. `+"Add it to src/utils/model/openaiContextWindows.ts for accurate compaction."),gZ}let J=G5(Z);if(J?.max_input_tokens&&J.max_input_tokens>=1e5){if(J.max_input_tokens>x5&&V0())return x5;return J.max_input_tokens}if(!V0()&&(U(Z).includes("fable-5")||U(Z).includes("sonnet-5")))return 1e6;if($?.includes(M0)&&V5(Z))return 1e6;if(cZ(Z))return 1e6;return x5}function cZ(Z){if(V0())return!1;if(s(Z))return!1;if(!U(Z).includes("sonnet-4-6"))return!1;return K().clientDataCache?.coral_reef_sonnet==="true"}function JQ(Z,$){if(!Z)return{used:null,remaining:null};let J=Z.input_tokens+Z.cache_creation_input_tokens+Z.cache_read_input_tokens,Q=Math.round(J/$*100),Y=Math.min(100,Math.max(0,Q));return{used:Y,remaining:100-Y}}function QQ(Z){let $,J;if(P4()){let X=b4(Z);if(X!==void 0)return{default:X,upperLimit:X}}let Q=U(Z);if(Q.includes("fable-5")||Q.includes("opus-4-7")||Q.includes("opus-4-6"))$=64000,J=128000;else if(Q.includes("sonnet-4-6"))$=32000,J=128000;else if(Q.includes("opus-4-5")||Q.includes("sonnet-4")||Q.includes("haiku-4"))$=32000,J=64000;else if(Q.includes("opus-4-1")||Q.includes("opus-4"))$=32000,J=32000;else if(Q.includes("claude-3-opus"))$=4096,J=4096;else if(Q.includes("claude-3-sonnet"))$=8192,J=8192;else if(Q.includes("claude-3-haiku"))$=4096,J=4096;else if(Q.includes("3-5-sonnet")||Q.includes("3-5-haiku"))$=8192,J=8192;else if(Q.includes("3-7-sonnet"))$=32000,J=64000;else $=pZ,J=mZ;let Y=G5(Z);if(Y?.max_tokens&&Y.max_tokens>=4096)J=Y.max_tokens,$=Math.min($,J);return{default:$,upperLimit:J}}var x5=200000,gZ,r9=20000,pZ=32000,mZ=64000,e9=8000,ZQ=64000;var W5=R(()=>{Z5();$0();i();g();F0();V4();k4();gZ=(()=>{let Z=parseInt(process.env.CLAUDE_CODE_OPENAI_FALLBACK_CONTEXT_WINDOW??"",10);return!isNaN(Z)&&Z>0?Z:128000})()});var dZ,O4;var E4=R(()=>{t0();t();dZ=[{modelEnvVar:"ANTHROPIC_DEFAULT_OPUS_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES"},{modelEnvVar:"ANTHROPIC_DEFAULT_SONNET_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES"},{modelEnvVar:"ANTHROPIC_DEFAULT_HAIKU_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES"}],O4=y((Z,$)=>{if(W()==="firstParty")return;let J=Z.toLowerCase();for(let Q of dZ){let Y=process.env[Q.modelEnvVar],X=process.env[Q.capabilitiesEnvVar];if(!Y||X===void 0)continue;if(J!==Y.toLowerCase())continue;return X.toLowerCase().split(",").map((q)=>q.trim()).includes($)}return},(Z,$)=>`${Z.toLowerCase()}:${$}`)});function nZ(Z){let $=[],J=[];for(let Q of Z)if(T4.includes(Q))$.push(Q);else J.push(Q);return{allowed:$,disallowed:J}}function NQ(Z){if(!Z||Z.length===0)return;if(k()){console.warn("Warning: Custom betas are only available for API key users. Ignoring provided betas.");return}let{allowed:$,disallowed:J}=nZ(Z);for(let Q of J)console.warn(`Warning: Beta header '${Q}' is not allowed. Only the following betas are supported: ${T4.join(", ")}`);return $.length>0?$:void 0}function v4(Z){let $=O4(Z,"interleaved_thinking");if($!==void 0)return $;let J=U(Z),Q=W();if(Q==="foundry")return!0;if(Q==="firstParty")return!J.includes("claude-3-");return J.includes("claude-opus-4")||J.includes("claude-sonnet-5")||J.includes("claude-sonnet-4")}function lZ(Z){let $=U(Z);return $.includes("claude-opus-4")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function iZ(Z){let $=U(Z),J=W();if(J==="foundry")return!0;if(J==="firstParty")return!$.includes("claude-3-");return $.includes("claude-opus-4")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function tZ(Z){let $=U(Z),J=W();if(J!=="firstParty"&&J!=="foundry")return!1;return $.includes("claude-fable-5")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4-6")||$.includes("claude-sonnet-4-5")||$.includes("claude-opus-4-1")||$.includes("claude-opus-4-5")||$.includes("claude-opus-4-6")||$.includes("claude-opus-4-7")||$.includes("claude-opus-4-8")||$.includes("claude-haiku-4-5")}function UQ(Z){let $=U(Z);if(!$.startsWith("claude-"))return!1;if($.includes("claude-3-"))return!1;if(/claude-(opus|sonnet|haiku)-4(?!-[6-9])/.test($))return!1;return!0}function bQ(){let Z=W();if(Z==="vertex"||Z==="bedrock")return b1;return U1}function _4(){return(W()==="firstParty"||W()==="foundry")&&!F(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function kQ(){if(F(process.env.CLAUDIN_DISABLE_GLOBAL_CACHE_SCOPE))return!1;return W()==="firstParty"&&!F(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function PQ(Z,$){let J=[...S4(Z)];if($?.isAgenticQuery){if(!J.includes(G2))J.push(G2)}let Q=I4();if(!Q||Q.length===0)return J;return[...J,...Q.filter((Y)=>!J.includes(Y))]}function M4(){B5.cache?.clear?.(),S4.cache?.clear?.(),aZ.cache?.clear?.()}var T4,B5,S4,aZ;var C4=R(()=>{t0();I1();J0();Z5();S0();n();W5();g();F0();E4();t();B0();T4=[M0];B5=y((Z)=>{let $=[],J=U(Z).includes("haiku"),Q=W(),Y=_4();if(!J)$.push(G2);if(k())$.push(j0);if(s(Z))$.push(M0);if(!F(process.env.DISABLE_INTERLEAVED_THINKING)&&v4(Z))$.push(L1);if(Y&&v4(Z)&&!f()&&Q0().showThinkingSummaries!==!0)$.push(P1),$.push(O1);let X=iZ(Z);if(_4()&&X)$.push(D1);let q=y4("tengu_tool_pear"),V=!q&&(F(process.env.CLAUDE_CODE_JSON_TOOL_USE)||A0("tengu_amber_json_tools",!1));if(Y&&tZ(Z)&&q)$.push(N1);if(Y&&V)$.push(E1);if(Q==="vertex"&&lZ(Z))$.push(r2);if(Q==="foundry")$.push(r2);if(Y)$.push(k1);if(process.env.ANTHROPIC_BETAS)$.push(...process.env.ANTHROPIC_BETAS.split(",").map((G)=>G.trim()).filter(Boolean));return $}),S4=y((Z)=>{let $=B5(Z);if(W()==="bedrock")return $.filter((J)=>!e2.has(J));return $}),aZ=y((Z)=>{return B5(Z).filter((J)=>e2.has(J))})});import{execFile as sZ}from"child_process";function A4(Z){return new Promise(($)=>{sZ("security",["find-generic-password","-a",L2(),"-w","-s",Z],{encoding:"utf-8",timeout:oZ},(J,Q)=>{$({stdout:J?null:Q?.trim()||null,timedOut:Boolean(J&&"killed"in J&&J.killed)})})})}function IQ(){if(process.platform!=="darwin"||K2||u())return;let Z=A4(a(h4)),$=A4(a());K2=Promise.all([Z,$]).then(([J,Q])=>{if(!J.timedOut)f4(J.stdout);if(!Q.timedOut)j5={stdout:Q.stdout}})}async function yQ(){if(K2)await K2}function u4(){return j5}function H5(){j5=null}var oZ=1e4,j5=null,K2=null;var g4=R(()=>{g();s2()});function R5(Z,$,J){return new Promise((Q,Y)=>{if($?.aborted){if(J?.throwOnAbort||J?.abortError)Y(J.abortError?.()??Error("aborted"));else Q();return}let X=setTimeout((V,G,B)=>{V?.removeEventListener("abort",G),B()},Z,$,q,Q);function q(){if(clearTimeout(X),J?.throwOnAbort||J?.abortError)Y(J.abortError?.()??Error("aborted"));else Q()}if($?.addEventListener("abort",q,{once:!0}),J?.unref)X.unref()})}var p4=()=>{};function MQ(){return m4}function c4(){m4.clear()}var m4;var d4=R(()=>{m4=new Map});var p$={};d2(p$,{validateForceLoginOrg:()=>g$,saveOAuthTokensIfNeeded:()=>V8,saveApiKey:()=>I5,removeApiKey:()=>E$,refreshGcpCredentialsIfNeeded:()=>_5,refreshGcpAuth:()=>X8,refreshAwsAuth:()=>Q8,refreshAndGetAwsCredentials:()=>z0,prefetchGcpCredentialsIfSafe:()=>b$,prefetchAwsCredentialsAndBedRockInfoIfSafe:()=>k$,prefetchApiKeyFromApiKeyHelperIfSafe:()=>B$,isUsing3PServices:()=>b2,isTeamSubscriber:()=>S$,isTeamPremiumSubscriber:()=>w2,isProSubscriber:()=>z5,isOverageProvisioningAllowed:()=>y$,isOtelHeadersHelperFromProjectOrLocalSettings:()=>x8,isMaxSubscriber:()=>R2,isGcpAuthRefreshFromProjectSettings:()=>v5,isEnterpriseSubscriber:()=>M$,isCustomApiKeyApproved:()=>O$,isConsumerSubscriber:()=>f$,isClaudeAISubscriber:()=>k,isAwsCredentialExportFromProjectSettings:()=>O5,isAwsAuthRefreshFromProjectSettings:()=>k5,isAnthropicAuthEnabled:()=>O0,is1PApiCustomer:()=>I$,hasProfileScope:()=>q0,hasOpusAccess:()=>T$,hasAnthropicApiKeyAuth:()=>W$,handleOAuth401Error:()=>Q5,getSubscriptionType:()=>_,getSubscriptionName:()=>z8,getRateLimitTier:()=>W8,getOtelHeadersFromHelper:()=>A$,getOauthAccountInfo:()=>U2,getConfiguredApiKeyHelper:()=>o,getClaudeAIOAuthTokensAsync:()=>c0,getClaudeAIOAuthTokens:()=>w,getAuthTokenSource:()=>T0,getApiKeyHelperElapsedMs:()=>z$,getApiKeyFromConfigOrMacOSKeychain:()=>P2,getApiKeyFromApiKeyHelperCached:()=>F5,getApiKeyFromApiKeyHelper:()=>J8,getAnthropicApiKeyWithSource:()=>n0,getAnthropicApiKey:()=>Y0,getAccountInformation:()=>u$,clearOAuthTokenCache:()=>y5,clearGcpCredentialsCache:()=>U$,clearAwsCredentialsCache:()=>F$,clearApiKeyHelperCache:()=>x$,checkGcpCredentialsValid:()=>Y8,checkAndRefreshOAuthTokenIfNeeded:()=>l0,calculateApiKeyHelperTTL:()=>$8});import{exec as e4}from"child_process";import{mkdir as Y$,stat as X$}from"fs/promises";import{join as q$}from"path";function N2(){return F(process.env.CLAUDE_CODE_REMOTE)||process.env.CLAUDE_CODE_ENTRYPOINT==="claude-desktop"}function O0(){if(u())return!1;if(process.env.ANTHROPIC_UNIX_SOCKET)return!!process.env.CLAUDE_CODE_OAUTH_TOKEN;let Z=b2(),J=(S()||{}).apiKeyHelper,Q=process.env.ANTHROPIC_AUTH_TOKEN||J||process.env.CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR,Y;try{({source:Y}=n0({skipRetrievingKeyFromApiKeyHelper:!0}))}catch{Y="none"}let X=Y==="ANTHROPIC_API_KEY"||Y==="apiKeyHelper";return!(Z||Q&&!N2()||X&&!N2())}function T0(){if(u()){if(o())return{source:"apiKeyHelper",hasToken:!0};return{source:"none",hasToken:!1}}if(process.env.ANTHROPIC_AUTH_TOKEN&&!N2())return{source:"ANTHROPIC_AUTH_TOKEN",hasToken:!0};if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{source:"CLAUDE_CODE_OAUTH_TOKEN",hasToken:!0};if(W2()){if(process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)return{source:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",hasToken:!0};return{source:"CCR_OAUTH_TOKEN_FILE",hasToken:!0}}if(o()&&!N2())return{source:"apiKeyHelper",hasToken:!0};let J=w();if(P0(J?.scopes)&&J?.accessToken)return{source:"claude.ai",hasToken:!0};return{source:"none",hasToken:!1}}function Y0(){let{key:Z}=n0();return Z}function W$(){try{let{key:Z,source:$}=n0({skipRetrievingKeyFromApiKeyHelper:!0});return Z!==null&&$!=="none"}catch{return!1}}function n0(Z={}){let $=(()=>{let q=L();if(q?.transport!=="anthropic")return;let V=q.apiKey?.trim();return V&&V.length>0?V:void 0})();if(u()){if($)return{key:$,source:"ANTHROPIC_API_KEY"};if(o())return{key:Z.skipRetrievingKeyFromApiKeyHelper?null:F5(),source:"apiKeyHelper"};return{key:null,source:"none"}}let J=t4()?void 0:$;if(x2()&&J)return{key:J,source:"ANTHROPIC_API_KEY"};if(F(process.env.CI)){let q=a2();if(q)return{key:q,source:"ANTHROPIC_API_KEY"};if(!b2()&&!J&&!process.env.CLAUDE_CODE_OAUTH_TOKEN&&!process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Configure an Anthropic profile via /provider or set CLAUDE_CODE_OAUTH_TOKEN");if(J&&!b2())return{key:J,source:"ANTHROPIC_API_KEY"};return{key:null,source:"none"}}if(J&&K().customApiKeyResponses?.approved?.includes(z2(J)))return{key:J,source:"ANTHROPIC_API_KEY"};let Q=a2();if(Q)return{key:Q,source:"ANTHROPIC_API_KEY"};if(o()){if(Z.skipRetrievingKeyFromApiKeyHelper)return{key:null,source:"apiKeyHelper"};return{key:F5(),source:"apiKeyHelper"}}let X=P2();if(X)return X;return{key:null,source:"none"}}function o(){if(u())return O("flagSettings")?.apiKeyHelper;return(S()||{}).apiKeyHelper}function Z8(){let Z=o();if(!Z)return!1;let $=O("projectSettings"),J=O("localSettings");return $?.apiKeyHelper===Z||J?.apiKeyHelper===Z}function b5(){return(S()||{}).awsAuthRefresh}function k5(){let Z=b5();if(!Z)return!1;let $=O("projectSettings"),J=O("localSettings");return $?.awsAuthRefresh===Z||J?.awsAuthRefresh===Z}function P5(){return(S()||{}).awsCredentialExport}function O5(){let Z=P5();if(!Z)return!1;let $=O("projectSettings"),J=O("localSettings");return $?.awsCredentialExport===Z||J?.awsCredentialExport===Z}function $8(){let Z=process.env.CLAUDE_CODE_API_KEY_HELPER_TTL_MS;if(Z){let $=parseInt(Z,10);if(!Number.isNaN($)&&$>=0)return $;z(`Found CLAUDE_CODE_API_KEY_HELPER_TTL_MS env var, but it was not a valid number. Got ${Z}`,{level:"error"})}return V$}function z$(){let Z=c?.startedAt;return Z?Date.now()-Z:0}async function J8(Z){if(!o())return null;let $=$8();if(I){if(Date.now()-I.timestamp<$)return I.value;if(!c)c={promise:n4(Z,!1,k0),startedAt:null};return I.value}if(c)return c.promise;return c={promise:n4(Z,!0,k0),startedAt:Date.now()},c.promise}async function n4(Z,$,J){try{let Q=await G$(Z);if(J!==k0)return Q;if(Q!==null)I={value:Q,timestamp:Date.now()};return Q}catch(Q){if(J!==k0)return" ";let Y=Q instanceof Error?Q.message:String(Q);if(console.error(h.red(`apiKeyHelper failed: ${Y}`)),z(`Error getting API key from apiKeyHelper: ${Y}`,{level:"error"}),!$&&I&&I.value!==" ")return I={...I,timestamp:Date.now()},I.value;return I={value:" ",timestamp:Date.now()}," "}finally{if(J===k0)c=null}}async function G$(Z){let $=o();if(!$)return null;if(Z8()){if(!d()&&!Z){let X=Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("apiKeyHelper invoked before trust check",X),x("tengu_apiKeyHelper_missing_trust11",{}),null}}let J=await R0($,{shell:!0,timeout:600000,reject:!1});if(J.failed){let Y=J.timedOut?"timed out":`exited ${J.exitCode}`,X=J.stderr?.trim();throw Error(X?`${Y}: ${X}`:Y)}let Q=J.stdout?.trim();if(!Q)throw Error("did not return a value");return Q}function F5(){return I?.value??null}function x$(){k0++,I=null,c=null}function B$(Z){if(Z8()&&!d())return;J8(Z)}async function H$(){let Z=b5();if(!Z)return!1;if(k5()){if(!d()&&!f()){let J=Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("awsAuthRefresh invoked before trust check",J),x("tengu_awsAuthRefresh_missing_trust",{}),!1}}try{return z("Fetching AWS caller identity for AWS auth refresh command"),await o2(),z("Fetched AWS caller identity, skipping AWS auth refresh command"),!1}catch{return Q8(Z)}}function Q8(Z){z("Running AWS auth refresh command");let $=M.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=e4(Z,{timeout:R$});Q.stdout.on("data",(Y)=>{let X=Y.toString().trim();if(X)$.addOutput(X),z(X,{level:"debug"})}),Q.stderr.on("data",(Y)=>{let X=Y.toString().trim();if(X)$.setError(X),z(X,{level:"error"})}),Q.on("close",(Y,X)=>{if(Y===0)z("AWS auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let V=X==="SIGTERM"?h.red("AWS auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal."):h.red("Error running awsAuthRefresh (in settings or ~/.claudin/config.json):");console.error(V),$.endAuthentication(!1),J(!1)}})})}async function w$(){let Z=P5();if(!Z)return null;if(O5()){if(!d()&&!f()){let J=Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("awsCredentialExport invoked before trust check",J),x("tengu_awsCredentialExport_missing_trust",{}),null}}try{return z("Fetching AWS caller identity for credential export command"),await o2(),z("Fetched AWS caller identity, skipping AWS credential export command"),null}catch{try{z("Running AWS credential export command");let $=await R0(Z,{shell:!0,reject:!1});if($.exitCode!==0||!$.stdout)throw Error("awsCredentialExport did not return a valid value");let J=D5($.stdout.trim());if(!H1(J))throw Error("awsCredentialExport did not return valid AWS STS output structure");return z("AWS credentials retrieved from awsCredentialExport"),{accessKeyId:J.Credentials.AccessKeyId,secretAccessKey:J.Credentials.SecretAccessKey,sessionToken:J.Credentials.SessionToken}}catch($){let J=h.red("Error getting AWS credentials from awsCredentialExport (in settings or ~/.claudin/config.json):");if($ instanceof Error)console.error(J,$.message);else console.error(J,$);return null}}}function F$(){z0.cache.clear()}function E5(){return(S()||{}).gcpAuthRefresh}function v5(){let Z=E5();if(!Z)return!1;let $=O("projectSettings"),J=O("localSettings");return $?.gcpAuthRefresh===Z||J?.gcpAuthRefresh===Z}async function Y8(){try{let{GoogleAuth:Z}=await import("google-auth-library"),$=new Z({scopes:["https://www.googleapis.com/auth/cloud-platform"]}),J=(async()=>{await(await $.getClient()).getAccessToken()})(),Q=R5(K$).then(()=>{throw new B8("GCP credentials check timed out")});return await Promise.race([J,Q]),!0}catch{return!1}}async function D$(){let Z=E5();if(!Z)return!1;if(v5()){if(!d()&&!f()){let J=Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("gcpAuthRefresh invoked before trust check",J),x("tengu_gcpAuthRefresh_missing_trust",{}),!1}}try{if(z("Checking GCP credentials validity for auth refresh"),await Y8())return z("GCP credentials are valid, skipping auth refresh command"),!1}catch{}return X8(Z)}function X8(Z){z("Running GCP auth refresh command");let $=M.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=e4(Z,{timeout:N$});Q.stdout.on("data",(Y)=>{let X=Y.toString().trim();if(X)$.addOutput(X),z(X,{level:"debug"})}),Q.stderr.on("data",(Y)=>{let X=Y.toString().trim();if(X)$.setError(X),z(X,{level:"error"})}),Q.on("close",(Y,X)=>{if(Y===0)z("GCP auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let V=X==="SIGTERM"?h.red("GCP auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal."):h.red("Error running gcpAuthRefresh (in settings or ~/.claudin/config.json):");console.error(V),$.endAuthentication(!1),J(!1)}})})}function U$(){_5.cache.clear()}function b$(){if(!E5())return;if(v5()){if(!d()&&!f())return}_5()}function k$(){let Z=b5(),$=P5();if(!Z&&!$)return;if(k5()||O5()){if(!d()&&!f())return}z0(),j()}function P$(Z){return/^[a-zA-Z0-9-_]+$/.test(Z)}async function I5(Z){if(!P$(Z))throw Error("Invalid API key format. API key must contain only alphanumeric characters, dashes, and underscores.");await q8();let $=!1;if(process.platform==="darwin")try{let Q=a(),Y=L2(),X=Buffer.from(Z,"utf-8").toString("hex"),q=`add-generic-password -U -a "${Y}" -s "${Q}" -X "${X}"
|
|
2
|
-
`;await R0("security",["-i"],{input:q,reject:!1}),x("tengu_api_key_saved_to_keychain",{}),$=!0}catch(Q){N(Q),x("tengu_api_key_keychain_error",{error:p(Q)}),x("tengu_api_key_saved_to_config",{})}else x("tengu_api_key_saved_to_config",{});let J=z2(Z);C((Q)=>{let Y=Q.customApiKeyResponses?.approved??[];return{...Q,primaryApiKey:$?Q.primaryApiKey:Z,customApiKeyResponses:{...Q.customApiKeyResponses,approved:Y.includes(J)?Y:[...Y,J],rejected:Q.customApiKeyResponses?.rejected??[]}}}),P2.cache.clear?.(),H5()}function O$(Z){let $=K(),J=z2(Z);return $.customApiKeyResponses?.approved?.includes(J)??!1}async function E$(){await q8(),C((Z)=>({...Z,primaryApiKey:void 0})),P2.cache.clear?.(),H5()}async function q8(){try{await B1()}catch(Z){N(Z)}}function V8(Z){if(!P0(Z.scopes))return x("tengu_oauth_tokens_not_claude_ai",{}),{success:!0};if(!Z.refreshToken||!Z.expiresAt)return x("tengu_oauth_tokens_inference_only",{}),{success:!0};let $=k2(),J=$.name;try{let Q=$.read()||{},Y=Q.claudeAiOauth;Q.claudeAiOauth={accessToken:Z.accessToken,refreshToken:Z.refreshToken,expiresAt:Z.expiresAt,scopes:Z.scopes,subscriptionType:Z.subscriptionType??Y?.subscriptionType??null,rateLimitTier:Z.rateLimitTier??Y?.rateLimitTier??null};let X=$.update(Q);if(X.success)x("tengu_oauth_tokens_saved",{storageBackend:J});else x("tengu_oauth_tokens_save_failed",{storageBackend:J});return w.cache?.clear?.(),M4(),c4(),X}catch(Q){return N(Q),x("tengu_oauth_tokens_save_exception",{storageBackend:J,error:p(Q)}),{success:!1,warning:"Failed to save OAuth tokens"}}}function y5(){w.cache?.clear?.(),b0()}async function v$(){try{let{mtimeMs:Z}=await X$(q$(L5(),".credentials.json"));if(Z!==l4)l4=Z,y5()}catch{w.cache?.clear?.()}}function Q5(Z){let $=w5.get(Z);if($)return $;let J=_$(Z).finally(()=>{w5.delete(Z)});return w5.set(Z,J),J}async function _$(Z){y5();let $=await c0();if(!$?.refreshToken)return!1;if($.accessToken!==Z)return x("tengu_oauth_401_recovered_from_keychain",{}),!0;return l0(0,!0)}async function c0(){if(u())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN||W2())return w();try{let J=(await k2().readAsync())?.claudeAiOauth;if(!J?.accessToken)return null;return J}catch(Z){return N(Z),null}}function l0(Z=0,$=!1){if(Z===0&&!$){if(p0)return p0;return p0=K5(Z,$).finally(()=>{p0=null}),p0}return K5(Z,$)}async function K5(Z,$){await v$();let Q=w();if(!$){if(!Q?.refreshToken||!m0(Q.expiresAt))return!1}if(!Q?.refreshToken)return!1;if(!P0(Q.scopes))return!1;w.cache?.clear?.(),b0();let Y=await c0();if(!Y?.refreshToken||!m0(Y.expiresAt))return!1;let X=L5();await Y$(X,{recursive:!0});let q;try{x("tengu_oauth_token_refresh_lock_acquiring",{}),q=await s4(X),x("tengu_oauth_token_refresh_lock_acquired",{})}catch(V){if(V.code==="ELOCKED"){if(Z<5)return x("tengu_oauth_token_refresh_lock_retry",{retryCount:Z+1}),await R5(1000+Math.random()*1000),K5(Z+1,$);return x("tengu_oauth_token_refresh_lock_retry_limit_reached",{maxRetries:5}),!1}return N(V),x("tengu_oauth_token_refresh_lock_error",{error:p(V)}),!1}try{w.cache?.clear?.(),b0();let V=await c0();if(!V?.refreshToken||!m0(V.expiresAt))return x("tengu_oauth_token_refresh_race_resolved",{}),!1;x("tengu_oauth_token_refresh_starting",{});let G=await o4(V.refreshToken,{scopes:P0(V.scopes)?void 0:V.scopes});return V8(G),w.cache?.clear?.(),b0(),!0}catch(V){N(V),w.cache?.clear?.(),b0();let G=await c0();if(G&&!m0(G.expiresAt))return x("tengu_oauth_token_refresh_race_recovered",{}),!0;return!1}finally{x("tengu_oauth_token_refresh_lock_releasing",{}),await q(),x("tengu_oauth_token_refresh_lock_released",{})}}function k(){if(!O0())return!1;return P0(w()?.scopes)}function q0(){return w()?.scopes?.includes(a4)??!1}function I$(){{let Z=L()?.transport;if(Z==="bedrock"||Z==="vertex"||Z==="foundry")return!1}if(k())return!1;return!0}function U2(){return O0()?K().oauthAccount:void 0}function y$(){let $=U2()?.billingType;if(!k()||!$)return!1;if($!=="stripe_subscription"&&$!=="stripe_subscription_contracted"&&$!=="apple_subscription"&&$!=="google_play_subscription")return!1;return!0}function T$(){let Z=_();return Z==="max"||Z==="enterprise"||Z==="team"||Z==="pro"||Z===null}function _(){if(Z1())return e5();if(!O0())return null;let Z=w();if(!Z)return null;return Z.subscriptionType??null}function R2(){return _()==="max"}function S$(){return _()==="team"}function w2(){return _()==="team"&&W8()==="default_claude_max_5x"}function M$(){return _()==="enterprise"}function z5(){return _()==="pro"}function W8(){if(!O0())return null;let Z=w();if(!Z)return null;return Z.rateLimitTier??null}function z8(){switch(_()){case"enterprise":return"Claude Enterprise";case"team":return"Claude Team";case"max":return"Claude Max";case"pro":return"Claude Pro";default:return"Claude API"}}function b2(){let Z=L()?.transport;if(!Z)return!1;return Z!=="anthropic"}function G8(){return(S()||{}).otelHeadersHelper}function x8(){let Z=G8();if(!Z)return!1;let $=O("projectSettings"),J=O("localSettings");return $?.otelHeadersHelper===Z||J?.otelHeadersHelper===Z}function A$(){let Z=G8();if(!Z)return{};let $=parseInt(process.env.CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS||C$.toString());if(D2&&Date.now()-i4<$)return D2;if(x8()){if(!d())return{}}try{let J=N5(Z,{timeout:30000})?.toString().trim();if(!J)throw Error("otelHeadersHelper did not return a valid value");let Q=D5(J);if(typeof Q!=="object"||Q===null||Array.isArray(Q))throw Error("otelHeadersHelper must return a JSON object with string key-value pairs");for(let[Y,X]of Object.entries(Q))if(typeof X!=="string")throw Error(`otelHeadersHelper returned non-string value for key "${Y}": ${typeof X}`);return D2=Q,i4=Date.now(),D2}catch(J){throw N(Error(`Error getting OpenTelemetry headers from otelHeadersHelper (in settings): ${p(J)}`)),J}}function h$(Z){return Z==="max"||Z==="pro"}function f$(){let Z=_();return k()&&Z!==null&&h$(Z)}function u$(){if(W()!=="firstParty")return;let{source:$}=T0(),J={};if($==="CLAUDE_CODE_OAUTH_TOKEN"||$==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR")J.tokenSource=$;else if(k())J.subscription=z8();else J.tokenSource=$;let{key:Q,source:Y}=n0();if(Q)J.apiKeySource=Y;if($==="claude.ai"||Y==="/login managed key"){let q=U2()?.organizationName;if(q)J.organization=q}let X=U2()?.emailAddress;if(($==="claude.ai"||Y==="/login managed key")&&X)J.email=X;return J}async function g$(){if(process.env.ANTHROPIC_UNIX_SOCKET)return{valid:!0};if(!O0())return{valid:!0};let Z=O("policySettings")?.forceLoginOrgUUID;if(!Z)return{valid:!0};await l0();let $=w();if(!$)return{valid:!0};let{source:J}=T0(),Q=J==="CLAUDE_CODE_OAUTH_TOKEN"||J==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",Y=await H0($.accessToken);if(!Y)return{valid:!1,message:`Unable to verify organization for the current authentication token.
|
|
3
|
-
This machine requires organization ${Z} but the profile could not be fetched.
|
|
4
|
-
This may be a network error, or the token may lack the user:profile scope required for
|
|
5
|
-
verification (tokens from 'claude setup-token' do not include this scope).
|
|
6
|
-
Try again, or obtain a full-scope token via 'claude auth login'.`};let X=Y.organization.uuid;if(X===Z)return{valid:!0};if(Q)return{valid:!1,message:`The ${J==="CLAUDE_CODE_OAUTH_TOKEN"?"CLAUDE_CODE_OAUTH_TOKEN":"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR"} environment variable provides a token for a
|
|
7
|
-
different organization than required by this machine's managed settings.
|
|
8
|
-
|
|
9
|
-
Required organization: ${Z}
|
|
10
|
-
Token organization: ${X}
|
|
11
|
-
|
|
12
|
-
Remove the environment variable or obtain a token for the correct organization.`};return{valid:!1,message:`Your authentication token belongs to organization ${X},
|
|
13
|
-
but this machine requires organization ${Z}.
|
|
14
|
-
|
|
15
|
-
Please log in with the correct organization: claude auth login`}}var V$=300000,I=null,c=null,k0=0,j$=3600000,R$=180000,z0,K$=5000,L$=3600000,N$=180000,_5,P2,w,l4=0,w5,p0=null,D2=null,i4=0,C$=1740000,B8;var n=R(()=>{eZ();x1();t0();S0();B2();X2();t();J0();$0();$1();r4();i2();G1();j1();w1();K1();C4();i();Z0();g();W1();Z$();J$();a0();$$();Q$();g4();s2();B0();p4();rZ();d4();z0=U5(async()=>{let Z=await H$(),$=await w$();if(Z||$)await R1();return $},j$);_5=U5(async()=>{return await D$()},L$);P2=y(()=>{if(u())return null;if(process.platform==="darwin"){let $=u4();if($){if($.stdout)return{key:$.stdout,source:"/login managed key"}}else{let J=a();try{let Q=N5(`security find-generic-password -a $USER -w -s "${J}"`);if(Q)return{key:Q,source:"/login managed key"}}catch(Q){N(Q)}}}let Z=K();if(!Z.primaryApiKey)return null;return{key:Z.primaryApiKey,source:"/login managed key"}});w=y(()=>{if(u())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{accessToken:process.env.CLAUDE_CODE_OAUTH_TOKEN,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};let Z=W2();if(Z)return{accessToken:Z,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};try{let Q=k2().read()?.claudeAiOauth;if(!Q?.accessToken)return null;return Q}catch($){return N($),null}});w5=new Map;B8=class B8 extends Error{}});function P0(Z){return Boolean(Z?.includes(T5))}function m$(Z){return Z?.split(" ").filter(Boolean)??[]}function k7({codeChallenge:Z,state:$,port:J,isManual:Q,loginWithClaudeAi:Y,inferenceOnly:X,orgUUID:q,loginHint:V,loginMethod:G}){let B=Y?b().CLAUDE_AI_AUTHORIZE_URL:b().CONSOLE_AUTHORIZE_URL,H=new URL(B);H.searchParams.append("code","true"),H.searchParams.append("client_id",b().CLIENT_ID),H.searchParams.append("response_type","code"),H.searchParams.append("redirect_uri",Q?b().MANUAL_REDIRECT_URL:`http://localhost:${J}/callback`);let W0=X?[T5]:R8;if(H.searchParams.append("scope",W0.join(" ")),H.searchParams.append("code_challenge",Z),H.searchParams.append("code_challenge_method","S256"),H.searchParams.append("state",$),q)H.searchParams.append("orgUUID",q);if(V)H.searchParams.append("login_hint",V);if(G)H.searchParams.append("login_method",G);return H.toString()}async function P7(Z,$,J,Q,Y=!1,X){let q={grant_type:"authorization_code",code:Z,redirect_uri:Y?b().MANUAL_REDIRECT_URL:`http://localhost:${Q}/callback`,client_id:b().CLIENT_ID,code_verifier:J,state:$};if(X!==void 0)q.expires_in=X;let V=await P.post(b().TOKEN_URL,q,{headers:{"Content-Type":"application/json"},timeout:15000});if(V.status!==200)throw Error(V.status===401?"Authentication failed: Invalid authorization code":`Token exchange failed (${V.status}): ${V.statusText}`);return x("tengu_oauth_token_exchange_success",{}),V.data}async function o4(Z,{scopes:$}={}){let J={grant_type:"refresh_token",refresh_token:Z,client_id:b().CLIENT_ID,scope:(($?.length)?$:H8).join(" ")};try{let Q=await P.post(b().TOKEN_URL,J,{headers:{"Content-Type":"application/json"},timeout:15000});if(Q.status!==200)throw Error(`Token refresh failed: ${Q.statusText}`);let Y=Q.data,{access_token:X,refresh_token:q=Z,expires_in:V}=Y,G=Date.now()+V*1000,B=m$(Y.scope);x("tengu_oauth_token_refresh_success",{});let H=K(),W0=w(),E=H.oauthAccount?.billingType!==void 0&&H.oauthAccount?.accountCreatedAt!==void 0&&H.oauthAccount?.subscriptionCreatedAt!==void 0&&W0?.subscriptionType!=null&&W0?.rateLimitTier!=null?null:await c$(X);if(E&&H.oauthAccount){let r={};if(E.displayName!==void 0)r.displayName=E.displayName;if(typeof E.hasExtraUsageEnabled==="boolean")r.hasExtraUsageEnabled=E.hasExtraUsageEnabled;if(E.billingType!==null)r.billingType=E.billingType;if(E.accountCreatedAt!==void 0)r.accountCreatedAt=E.accountCreatedAt;if(E.subscriptionCreatedAt!==void 0)r.subscriptionCreatedAt=E.subscriptionCreatedAt;if(Object.keys(r).length>0)C((i0)=>({...i0,oauthAccount:i0.oauthAccount?{...i0.oauthAccount,...r}:i0.oauthAccount}))}return{accessToken:X,refreshToken:q,expiresAt:G,scopes:B,subscriptionType:E?.subscriptionType??W0?.subscriptionType??null,rateLimitTier:E?.rateLimitTier??W0?.rateLimitTier??null,profile:E?.rawProfile,tokenAccount:Y.account?{uuid:Y.account.uuid,emailAddress:Y.account.email_address,organizationUuid:Y.organization?.uuid}:void 0}}catch(Q){let Y=P.isAxiosError(Q)&&Q.response?.data?JSON.stringify(Q.response.data):void 0;throw x("tengu_oauth_token_refresh_failure",{error:Q.message,...Y&&{responseBody:Y}}),Q}}async function O7(Z){let $=await P.get(b().ROLES_URL,{headers:{Authorization:`Bearer ${Z}`}});if($.status!==200)throw Error(`Failed to fetch user roles: ${$.statusText}`);let J=$.data;if(!K().oauthAccount)throw Error("OAuth account information not found in config");C((Y)=>({...Y,oauthAccount:Y.oauthAccount?{...Y.oauthAccount,organizationRole:J.organization_role,workspaceRole:J.workspace_role,organizationName:J.organization_name}:Y.oauthAccount})),x("tengu_oauth_roles_stored",{org_role:J.organization_role})}async function E7(Z){try{let $=await P.post(b().API_KEY_URL,null,{headers:{Authorization:`Bearer ${Z}`}}),J=$.data?.raw_key;if(J)return await I5(J),x("tengu_oauth_api_key",{status:"success",statusCode:$.status}),J;return null}catch($){throw x("tengu_oauth_api_key",{status:"failure",error:$ instanceof Error?$.message:String($)}),$}}function m0(Z){if(Z===null)return!1;let $=300000;return Date.now()+$>=Z}async function c$(Z){let $=await H0(Z),J=$?.organization?.organization_type,Q=null;switch(J){case"claude_max":Q="max";break;case"claude_pro":Q="pro";break;case"claude_enterprise":Q="enterprise";break;case"claude_team":Q="team";break;default:Q=null;break}let Y={subscriptionType:Q,rateLimitTier:$?.organization?.rate_limit_tier??null,hasExtraUsageEnabled:$?.organization?.has_extra_usage_enabled??null,billingType:$?.organization?.billing_type??null};if($?.account?.display_name)Y.displayName=$.account.display_name;if($?.account?.created_at)Y.accountCreatedAt=$.account.created_at;if($?.organization?.subscription_created_at)Y.subscriptionCreatedAt=$.organization.subscription_created_at;return x("tengu_oauth_profile_fetch_success",{}),{...Y,rawProfile:$}}async function v7(){let $=K().oauthAccount?.organizationUuid;if($)return $;let J=w()?.accessToken;if(J===void 0||!q0())return null;let Y=(await H0(J))?.organization?.uuid;if(!Y)return null;return Y}async function _7(){let Z=process.env.CLAUDE_CODE_ACCOUNT_UUID,$=process.env.CLAUDE_CODE_USER_EMAIL,J=process.env.CLAUDE_CODE_ORGANIZATION_UUID,Q=Boolean(Z&&$&&J);if(Z&&$&&J){if(!K().oauthAccount)j8({accountUuid:Z,emailAddress:$,organizationUuid:J})}await l0();let Y=K();if(Y.oauthAccount&&Y.oauthAccount.billingType!==void 0&&Y.oauthAccount.accountCreatedAt!==void 0&&Y.oauthAccount.subscriptionCreatedAt!==void 0||!k()||!q0())return!1;let X=w();if(X?.accessToken){let q=await H0(X.accessToken);if(q){if(Q)z("OAuth profile fetch succeeded, overriding env var account info",{level:"info"});return j8({accountUuid:q.account.uuid,emailAddress:q.account.email,organizationUuid:q.organization.uuid,displayName:q.account.display_name||void 0,hasExtraUsageEnabled:q.organization.has_extra_usage_enabled??!1,billingType:q.organization.billing_type??void 0,accountCreatedAt:q.account.created_at,subscriptionCreatedAt:q.organization.subscription_created_at??void 0}),!0}}return!1}function j8({accountUuid:Z,emailAddress:$,organizationUuid:J,displayName:Q,hasExtraUsageEnabled:Y,billingType:X,accountCreatedAt:q,subscriptionCreatedAt:V}){let G={accountUuid:Z,emailAddress:$,organizationUuid:J,hasExtraUsageEnabled:Y,billingType:X,accountCreatedAt:q,subscriptionCreatedAt:V};if(Q)G.displayName=Q;C((B)=>{if(B.oauthAccount?.accountUuid===G.accountUuid&&B.oauthAccount?.emailAddress===G.emailAddress&&B.oauthAccount?.organizationUuid===G.organizationUuid&&B.oauthAccount?.displayName===G.displayName&&B.oauthAccount?.hasExtraUsageEnabled===G.hasExtraUsageEnabled&&B.oauthAccount?.billingType===G.billingType&&B.oauthAccount?.accountCreatedAt===G.accountCreatedAt&&B.oauthAccount?.subscriptionCreatedAt===G.subscriptionCreatedAt)return B;return{...B,oauthAccount:G}})}var r4=R(()=>{q2();B2();S0();n();i();Z0();i2()});
|
|
16
|
-
export{IQ as u4,yQ as v4,g4 as w4,S5 as x4,M5 as y4,o$ as z4,r$ as A4,F8 as B4,D8 as C4,e$ as D4,f5 as E4,s0 as F4,o0 as G4,G0 as H4,g2 as I4,l2 as J4,E8 as K4,_0 as L4,W as M4,xJ as N4,S8 as O4,BJ as P4,jJ as Q4,HJ as R4,t as S4,j as T4,bJ as U4,X2 as V4,vJ as W4,_J as X4,r5 as Y4,SJ as Z4,MJ as _4,$1 as $4,pJ as a5,H0 as b5,i2 as c5,P0 as d5,m$ as e5,k7 as f5,P7 as g5,o4 as h5,O7 as i5,E7 as j5,m0 as k5,c$ as l5,v7 as m5,_7 as n5,j8 as o5,r4 as p5,aJ as q5,m8 as r5,J1 as s5,G1 as t5,z2 as u5,j1 as v5,$3 as w5,w1 as x5,M as y5,K1 as z5,M0 as A5,D1 as B5,N1 as C5,X3 as D5,q3 as E5,k1 as F5,V3 as G5,W3 as H5,P1 as I5,z3 as J5,G3 as K5,x3 as L5,Z5 as M5,A as N5,S1 as O5,l8 as P5,v3 as Q5,_3 as R5,I3 as S5,M1 as T5,y3 as U5,T3 as V5,i8 as W5,S3 as X5,M3 as Y5,C3 as Z5,A3 as _5,h3 as $5,s8 as a6,f3 as b6,u3 as c6,g3 as d6,p3 as e6,f1 as f6,K0 as g6,e8 as h6,$Z as i6,JZ as j6,Y5 as k6,zZ as l6,t3 as m6,c1 as n6,d1 as o6,GZ as p6,X5 as q6,i1 as r6,t1 as s6,L9 as t6,D9 as u6,q5 as v6,N9 as w6,FZ as x6,N0 as y6,u0 as z6,Q4 as A6,U9 as B6,h0 as C6,Y4 as D6,D as E6,U as F6,KZ as G6,b9 as H6,a1 as I6,f0 as J6,k9 as K6,X4 as L6,q4 as M6,P9 as N6,T as O6,O9 as P6,NZ as Q6,E9 as R6,v9 as S6,_9 as T6,I9 as U6,F0 as V6,T9 as W6,V4 as X6,M9 as Y6,x4 as Z6,F4 as _6,CZ as $6,L4 as a7,r9 as b7,e9 as c7,ZQ as d7,V0 as e7,s as f7,$Q as g7,cZ as h7,JQ as i7,QQ as j7,W5 as k7,O4 as l7,E4 as m7,NQ as n7,tZ as o7,UQ as p7,bQ as q7,_4 as r7,kQ as s7,S4 as t7,aZ as u7,PQ as v7,M4 as w7,C4 as x7,R5 as y7,p4 as z7,MQ as A7,c4 as B7,d4 as C7,O0 as D7,T0 as E7,Y0 as F7,W$ as G7,n0 as H7,o as I7,k5 as J7,O5 as K7,$8 as L7,z$ as M7,J8 as N7,F5 as O7,x$ as P7,B$ as Q7,Q8 as R7,z0 as S7,F$ as T7,v5 as U7,Y8 as V7,X8 as W7,_5 as X7,U$ as Y7,b$ as Z7,k$ as _7,P2 as $7,I5 as a8,O$ as b8,E$ as c8,V8 as d8,w as e8,y5 as f8,Q5 as g8,c0 as h8,l0 as i8,k as j8,q0 as k8,I$ as l8,U2 as m8,y$ as n8,T$ as o8,_ as p8,R2 as q8,S$ as r8,w2 as s8,M$ as t8,z5 as u8,W8 as v8,z8 as w8,b2 as x8,x8 as y8,A$ as z8,f$ as A8,u$ as B8,g$ as C8,p$ as D8,n as E8};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{T9 as Z,X9 as _,Y9 as w}from"./cli-1.0.16-ynm2hz21.mjs";import{Baa as D,H_ as Y,I_ as U,T_ as $,Tea as j,eaa as k,u$ as T,vea as W,yea as V}from"./cli-1.0.16-t2ky4p5s.mjs";import{_ja as N,bka as M}from"./cli-1.0.16-04tr8fw7.mjs";import{Fma as X,yqa as O}from"./cli-1.0.16-zsvkc5zm.mjs";O();j();M();w();D();U();T();import{realpath as v}from"fs/promises";async function b(){try{let q=await Z();if(!q){N("Not in a GitHub repository, skipping path mapping update");return}let A=X(),z=$(A)??A,B;try{B=(await v(z)).normalize("NFC")}catch{B=z}let J=q.toLowerCase(),L=V().githubRepoPaths?.[J]??[];if(L[0]===B){N(`Path ${B} already tracked for repo ${J}`);return}let E=L.filter((S)=>S!==B),H=[B,...E];W((S)=>({...S,githubRepoPaths:{...S.githubRepoPaths,[J]:H}})),N(`Added ${B} to tracked paths for repo ${J}`)}catch(q){N(`Error updating repo path mapping: ${q}`)}}function y(q){let A=V(),I=q.toLowerCase();return A.githubRepoPaths?.[I]??[]}async function P(q){let A=await Promise.all(q.map(k));return q.filter((I,z)=>A[z])}async function d(q,A){try{let I=await Y(q);if(!I)return!1;let z=_(I);if(!z)return!1;return z.toLowerCase()===A.toLowerCase()}catch{return!1}}function c(q,A){let I=V(),z=q.toLowerCase(),B=I.githubRepoPaths?.[z]??[],J=B.filter((L)=>L!==A);if(J.length===B.length)return;let Q={...I.githubRepoPaths};if(J.length===0)delete Q[z];else Q[z]=J;W((L)=>({...L,githubRepoPaths:Q})),N(`Removed ${A} from tracked paths for repo ${z}`)}
|
|
2
|
-
export{b as lb,y as mb,P as nb,d as ob,c as pb};
|