@claudiolabs/claudio 0.1.11 → 0.1.13
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/bin/claudio +7 -0
- package/dist/chunks/AgentTool-0.1.13-yacqe6gs.mjs +1 -0
- package/dist/chunks/App-0.1.13-45tpe56w.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.1.13-rvk3ghpz.mjs +1 -0
- package/dist/chunks/{AssistantSessionChooser-0.1.11-kb5jvw8n.mjs → AssistantSessionChooser-0.1.13-tcg2ckh4.mjs} +1 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.13-4qkeekab.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.1.13-wpjjxqtw.mjs +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-0.1.13-k8349mz5.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.13-jg36gq05.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.1.13-svk1vdbj.mjs +1 -0
- package/dist/chunks/DiffDialog-0.1.13-3a9b1b48.mjs +3 -0
- package/dist/chunks/Doctor-0.1.13-zktnx7ce.mjs +1 -0
- package/dist/chunks/Grove-0.1.13-1hnmb7jn.mjs +1 -0
- package/dist/chunks/ITermBackend-0.1.13-esbr21j4.mjs +1 -0
- package/dist/chunks/{InProcessTransport-0.1.11-xecmx0sw.mjs → InProcessTransport-0.1.13-k5mkjvww.mjs} +1 -1
- package/dist/chunks/InvalidConfigDialog-0.1.13-7wr7g7vx.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.1.13-j8t2pnak.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.1.13-jd2k6vk6.mjs +1 -0
- package/dist/chunks/Onboarding-0.1.13-j8d7hwbe.mjs +1 -0
- package/dist/chunks/ProviderManager-0.1.13-qcfa4ppx.mjs +1 -0
- package/dist/chunks/REPL-0.1.13-zpcaf2zq.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.1.13-nwwjp69z.mjs +1 -0
- package/dist/chunks/{SnapshotUpdateDialog-0.1.11-h881m192.mjs → SnapshotUpdateDialog-0.1.13-has41zv0.mjs} +1 -1
- package/dist/chunks/TeleportProgress-0.1.13-ssgexm6r.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.13-r95sr8bp.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.1.13-1qxft9es.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.1.13-jf14wbka.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.1.13-xzmz0wz4.mjs +1 -0
- package/dist/chunks/TrustDialog-0.1.13-pegd35qh.mjs +1 -0
- package/dist/chunks/activeProvider-0.1.13-n3mrppkb.mjs +1 -0
- package/dist/chunks/add-dir-0.1.13-3zm44vdy.mjs +1 -0
- package/dist/chunks/agents-0.1.13-a0aj4df9.mjs +111 -0
- package/dist/chunks/agents-0.1.13-phdd6357.mjs +3 -0
- package/dist/chunks/api-0.1.13-vmdan95h.mjs +1 -0
- package/dist/chunks/{asciicast-0.1.11-7mkaazy8.mjs → asciicast-0.1.13-d6ce2h4r.mjs} +1 -1
- package/dist/chunks/assistant-0.1.13-y9yer51w.mjs +1 -0
- package/dist/chunks/{auth-0.1.11-p47wajra.mjs → auth-0.1.13-fwdmg15h.mjs} +1 -1
- package/dist/chunks/auth-0.1.13-gw7n7j0w.mjs +1 -0
- package/dist/chunks/{autoMode-0.1.11-nv8vsag0.mjs → autoMode-0.1.13-4xh49kt4.mjs} +1 -1
- package/dist/chunks/backgroundHousekeeping-0.1.13-tagm38w5.mjs +1 -0
- package/dist/chunks/branch-0.1.13-hjmxvn3n.mjs +4 -0
- package/dist/chunks/{bridgePointer-0.1.11-wr8dfs91.mjs → bridgePointer-0.1.13-s1qw0857.mjs} +1 -1
- package/dist/chunks/btw-0.1.13-ggywf7w1.mjs +1 -0
- package/dist/chunks/{buddy-0.1.11-gsj76spy.mjs → buddy-0.1.13-2wvpbqx1.mjs} +1 -1
- package/dist/chunks/{cacache-0.1.11-wtz0ca19.mjs → cacache-0.1.13-sy5bqn6j.mjs} +1 -1
- package/dist/chunks/{cache-probe-0.1.11-pgsemwpr.mjs → cache-probe-0.1.13-ze8mf958.mjs} +1 -1
- package/dist/chunks/{cacheStats-0.1.11-1zqq6pm7.mjs → cacheStats-0.1.13-jtrw4rdj.mjs} +1 -1
- package/dist/chunks/caches-0.1.13-0swwryxr.mjs +1 -0
- package/dist/chunks/chrome-0.1.13-ztyyyz4s.mjs +1 -0
- package/dist/chunks/{chromeNativeHost-0.1.11-m5kskzjw.mjs → chromeNativeHost-0.1.13-96ex7t46.mjs} +1 -1
- package/dist/chunks/{claude-for-chrome-mcp-0.1.11-h99xhv8j.mjs → claude-for-chrome-mcp-0.1.13-6hy7w25p.mjs} +1 -1
- package/dist/chunks/{claudeDesktop-0.1.11-zpdtj6k8.mjs → claudeDesktop-0.1.13-fs8rre9b.mjs} +1 -1
- package/dist/chunks/claudemd-0.1.13-942nfe7r.mjs +1 -0
- package/dist/chunks/clear-0.1.13-zge2t5n9.mjs +1 -0
- package/dist/chunks/clearTerminal-0.1.13-b5v1edw2.mjs +1 -0
- package/dist/chunks/cli-0.1.13-00qdyz6f.mjs +3 -0
- package/dist/chunks/cli-0.1.13-0b728dvh.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-4ggr81tw.mjs → cli-0.1.13-0gfnmq08.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-0gyt273r.mjs +2 -0
- package/dist/chunks/cli-0.1.13-0hyneh5t.mjs +9 -0
- package/dist/chunks/{cli-0.1.11-rj68n2kw.mjs → cli-0.1.13-0p3b9j40.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-50naxqgt.mjs → cli-0.1.13-0xy8k6yv.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-yv5pfq6n.mjs → cli-0.1.13-0zpmhn2j.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-wc9bay3d.mjs → cli-0.1.13-13fh0g36.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-vq5fvf9m.mjs → cli-0.1.13-144gn3fd.mjs} +3 -3
- package/dist/chunks/{cli-0.1.11-d3exw047.mjs → cli-0.1.13-1g6bgaa6.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-nhwmv5g6.mjs → cli-0.1.13-1gbn4dgj.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-rj9ea3zn.mjs → cli-0.1.13-1hw65avy.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-1pxg82cx.mjs +2 -0
- package/dist/chunks/cli-0.1.13-1y21vq1h.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-852v06g0.mjs → cli-0.1.13-2c7g6rpx.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-h2hxx8ma.mjs → cli-0.1.13-2cdtdhek.mjs} +5 -5
- package/dist/chunks/{cli-0.1.11-t07hba0z.mjs → cli-0.1.13-2sx61wcx.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-16086k9e.mjs → cli-0.1.13-2vrh3n9y.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-70f778wy.mjs → cli-0.1.13-30j4h365.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-7tybqg56.mjs → cli-0.1.13-3k1n20ra.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-y909w8bb.mjs → cli-0.1.13-3pctg5zc.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-dpfxvfty.mjs → cli-0.1.13-3rr4fg79.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-45hjhcbc.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-fstfs72j.mjs → cli-0.1.13-4prgqshq.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-5hs4xyjq.mjs → cli-0.1.13-5061js0h.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-rrnr3ab1.mjs → cli-0.1.13-52f40ba4.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-579v6j6d.mjs +4 -0
- package/dist/chunks/cli-0.1.13-5b7hgn91.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-v6kwgrqc.mjs → cli-0.1.13-5c4fyghf.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-hmfevmz1.mjs → cli-0.1.13-5d4ke9a2.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-5j5bg3t2.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-p22bdjhv.mjs → cli-0.1.13-5krmz4nd.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-5rnhv49w.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-r990p54m.mjs → cli-0.1.13-5s4m8qj9.mjs} +5 -5
- package/dist/chunks/{cli-0.1.11-b0jasw23.mjs → cli-0.1.13-5ydypzty.mjs} +3 -3
- package/dist/chunks/cli-0.1.13-6gmqjyv9.mjs +2 -0
- package/dist/chunks/cli-0.1.13-6p0jxfnp.mjs +2 -0
- package/dist/chunks/cli-0.1.13-6q3wa261.mjs +2 -0
- package/dist/chunks/cli-0.1.13-73w3wbmf.mjs +3 -0
- package/dist/chunks/{cli-0.1.11-chnrb9xx.mjs → cli-0.1.13-73yztj5x.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-79vtnprb.mjs +2 -0
- package/dist/chunks/cli-0.1.13-84tbx1nf.mjs +3 -0
- package/dist/chunks/{cli-0.1.11-21epc92q.mjs → cli-0.1.13-85w0nxy9.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-8qrhqvh5.mjs → cli-0.1.13-87xfe2f3.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-bwpemkht.mjs → cli-0.1.13-8gd1x101.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-e5ecf583.mjs → cli-0.1.13-8ppsn0an.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-ft47r1wq.mjs → cli-0.1.13-8pw4n94k.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-tvfkn5mh.mjs → cli-0.1.13-8snyqhjj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-v8j5bkfs.mjs → cli-0.1.13-8sszxge2.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-9043n2e8.mjs +2 -0
- package/dist/chunks/cli-0.1.13-91b1h8ww.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-mj78w4sp.mjs → cli-0.1.13-9a1hzdsv.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-9jajvw4r.mjs +2 -0
- package/dist/chunks/cli-0.1.13-a4xga299.mjs +50 -0
- package/dist/chunks/cli-0.1.13-ajsw8n7h.mjs +5 -0
- package/dist/chunks/cli-0.1.13-apjxy5tn.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-0tge574q.mjs → cli-0.1.13-asrdd8dh.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-b24n1wvw.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-2w8d5vqb.mjs → cli-0.1.13-b3xc1r3k.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-b40skdsz.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-yrfxpjhr.mjs → cli-0.1.13-bj67mp7n.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-dcswnc8x.mjs → cli-0.1.13-bkg3sva7.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-bzgpcgdt.mjs +16 -0
- package/dist/chunks/{cli-0.1.11-qrq0sw0h.mjs → cli-0.1.13-c5b4ygdq.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-jj3s3dxd.mjs → cli-0.1.13-cjmpc9q5.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-ck28msre.mjs +2 -0
- package/dist/chunks/cli-0.1.13-crcgrfse.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-t7dc7fbj.mjs → cli-0.1.13-ct9m5223.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-ctjvkg5k.mjs → cli-0.1.13-ctjpk124.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-1xr9et85.mjs → cli-0.1.13-cyj5snev.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-5hrysrcd.mjs → cli-0.1.13-d66pryf3.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-h762f6hr.mjs → cli-0.1.13-d6tr2j76.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-d85aba8r.mjs +2 -0
- package/dist/chunks/cli-0.1.13-d8wkcw90.mjs +25 -0
- package/dist/chunks/{cli-0.1.11-v7bwjqf0.mjs → cli-0.1.13-dag38tkx.mjs} +55 -55
- package/dist/chunks/{cli-0.1.11-jye250b3.mjs → cli-0.1.13-dak36ez8.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-dgw8xfv1.mjs +2 -0
- package/dist/chunks/cli-0.1.13-dmgp48vg.mjs +2 -0
- package/dist/chunks/cli-0.1.13-e58n0k16.mjs +2 -0
- package/dist/chunks/cli-0.1.13-eh7dqeqt.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-d4ahh3jz.mjs → cli-0.1.13-f6gfa426.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-pr9jdfxt.mjs → cli-0.1.13-fabrrwqa.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-fh5dndvp.mjs +5043 -0
- package/dist/chunks/{cli-0.1.11-cezypfbt.mjs → cli-0.1.13-ft5k86va.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-hgsa4nnp.mjs → cli-0.1.13-fwd5b6q8.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-jkrt4znb.mjs → cli-0.1.13-fz5dm31h.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-fzb4yx18.mjs +24 -0
- package/dist/chunks/{cli-0.1.11-g2202evh.mjs → cli-0.1.13-g2v4avcv.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-g654740k.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-w3trj52p.mjs → cli-0.1.13-ga4mmwbc.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-nx8a99hz.mjs → cli-0.1.13-gd3nndc7.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-gtgqh4bn.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-z4hb2mcd.mjs → cli-0.1.13-gvz2qezh.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-h3vb5402.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-qpzn4q17.mjs → cli-0.1.13-h7a36dnk.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-hgkwnhwv.mjs +2 -0
- package/dist/chunks/cli-0.1.13-hjqn3n5a.mjs +59 -0
- package/dist/chunks/cli-0.1.13-hyvpn2ht.mjs +45 -0
- package/dist/chunks/{cli-0.1.11-jjgjkqqv.mjs → cli-0.1.13-hzdj03rn.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-91mf8dfr.mjs → cli-0.1.13-j7796v8f.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-z62s8qx1.mjs → cli-0.1.13-jakv6e7b.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-6r97rwda.mjs → cli-0.1.13-jeyjdb2m.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-h7e4rkwk.mjs → cli-0.1.13-jz57znb6.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-sma2xhvv.mjs → cli-0.1.13-ks4x4cct.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-ky4z1s1h.mjs +20 -0
- package/dist/chunks/{cli-0.1.11-ek6mck0j.mjs → cli-0.1.13-kzn9sspk.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-fs3d0ajf.mjs → cli-0.1.13-m5aaczvd.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-p4eeg584.mjs → cli-0.1.13-m61dhxfs.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-7vz357wm.mjs → cli-0.1.13-mahtf0ay.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-mezw1vk8.mjs +18 -0
- package/dist/chunks/{cli-0.1.11-egck69w4.mjs → cli-0.1.13-mkw72mxc.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-q58q9jqr.mjs → cli-0.1.13-myd004mr.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-mywk7e49.mjs +134 -0
- package/dist/chunks/cli-0.1.13-n1tj5bdc.mjs +2 -0
- package/dist/chunks/cli-0.1.13-n31sw1c8.mjs +2 -0
- package/dist/chunks/cli-0.1.13-nc3ce357.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-kghg51gb.mjs → cli-0.1.13-nc8ww3rn.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-rvk3t45h.mjs → cli-0.1.13-njvp7vtc.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-nsbk0w3b.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-jr50ahcv.mjs → cli-0.1.13-nwt2jc8b.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-p00rtvrc.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-56bdg2vw.mjs → cli-0.1.13-p2wyk6z7.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-h7phna9g.mjs → cli-0.1.13-p4nz8zmd.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-p625yxtg.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-96y2d09c.mjs → cli-0.1.13-p84ry3q5.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-1bryv90w.mjs → cli-0.1.13-pqk4c7m7.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-7qpnfx56.mjs → cli-0.1.13-pw5dks39.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-q93vqpjh.mjs +833 -0
- package/dist/chunks/{cli-0.1.11-y4c6y87y.mjs → cli-0.1.13-qdtwrf9z.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-qxtrzerx.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-fptq9w4t.mjs → cli-0.1.13-r09724ac.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-5vqj6k7m.mjs → cli-0.1.13-rftgy1b8.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-rjjyq9ej.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-gdcvfp9f.mjs → cli-0.1.13-rkaxch5j.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-s6w3ej6f.mjs +3 -0
- package/dist/chunks/cli-0.1.13-s90a26ca.mjs +2 -0
- package/dist/chunks/cli-0.1.13-s928gjab.mjs +5 -0
- package/dist/chunks/{cli-0.1.11-7mmhsc3x.mjs → cli-0.1.13-s9fgd2dx.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-3p2f194m.mjs → cli-0.1.13-saz6qetz.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-weav8142.mjs → cli-0.1.13-sgxk7d0h.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-sr9axhrw.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-6vqzqsdj.mjs → cli-0.1.13-ss1k5gqk.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-ssgwnxc5.mjs +4 -0
- package/dist/chunks/cli-0.1.13-t1zx7s60.mjs +2 -0
- package/dist/chunks/cli-0.1.13-t34z5r3c.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-w3fp9par.mjs → cli-0.1.13-t5w452fj.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-tknwgkgp.mjs +17 -0
- package/dist/chunks/{cli-0.1.11-hhs8ke9g.mjs → cli-0.1.13-tq3dqmem.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-h3jatwe1.mjs → cli-0.1.13-v1b9yhsy.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-mstxxz33.mjs → cli-0.1.13-v32xwe08.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-sqqzwx4h.mjs → cli-0.1.13-v467fj8c.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-v56n2wqm.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-s6yfjcm5.mjs → cli-0.1.13-v6z41645.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-vdz792pb.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-anvzywg4.mjs → cli-0.1.13-vj532g9m.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-anegs86e.mjs → cli-0.1.13-vn7ckv16.mjs} +1 -1
- package/dist/chunks/cli-0.1.13-vwt4hc0t.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-bbx2h4x9.mjs → cli-0.1.13-w08qr05m.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-w8h6wdez.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-d10nfa6g.mjs → cli-0.1.13-wh68ve92.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-bqpcwywz.mjs → cli-0.1.13-wpsqhe6v.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-424zgj5k.mjs → cli-0.1.13-wr0c9hyh.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-7xr2ermy.mjs → cli-0.1.13-wwnez3j0.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-6zkfmcxp.mjs → cli-0.1.13-wxdmc1dd.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-0n77qn68.mjs → cli-0.1.13-wz7v1tqx.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-n24p2y0p.mjs → cli-0.1.13-x3zt8q8r.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-05ngjm8p.mjs → cli-0.1.13-x461rxn2.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-x4n4my99.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-ktwtyqmp.mjs → cli-0.1.13-xde08pkt.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-5e45zda5.mjs → cli-0.1.13-xkdwvsg9.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-98zcwng9.mjs → cli-0.1.13-xv6wh44y.mjs} +2 -2
- package/dist/chunks/{cli-0.1.11-3tqzgd9f.mjs → cli-0.1.13-xvvtja1h.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-xwkys72y.mjs +12 -0
- package/dist/chunks/cli-0.1.13-y3aj3amr.mjs +4 -0
- package/dist/chunks/cli-0.1.13-y3e5jkh7.mjs +2 -0
- package/dist/chunks/{cli-0.1.11-be28ty4m.mjs → cli-0.1.13-y7aqqca1.mjs} +1 -1
- package/dist/chunks/{cli-0.1.11-zb2sa3e2.mjs → cli-0.1.13-yd536yw4.mjs} +7 -10
- package/dist/chunks/{cli-0.1.11-zfnmx1ny.mjs → cli-0.1.13-yeb03vme.mjs} +2 -2
- package/dist/chunks/cli-0.1.13-yhe2a0cx.mjs +2 -0
- package/dist/chunks/cli-0.1.13-yrvakyyp.mjs +2 -0
- package/dist/chunks/cli-0.1.13-z0jm6xd0.mjs +2 -0
- package/dist/chunks/cli-0.1.13-z387wpj9.mjs +2 -0
- package/dist/chunks/cli-0.1.13-zgnanj3x.mjs +12 -0
- package/dist/chunks/cli-0.1.13-zm2zgw7m.mjs +3 -0
- package/dist/chunks/cli-0.1.13-zmft0mps.mjs +2 -0
- package/dist/chunks/client-0.1.13-mbp3h3fc.mjs +1 -0
- package/dist/chunks/color-0.1.13-p7kzn9d4.mjs +1 -0
- package/dist/chunks/compact-0.1.13-603r2t03.mjs +3 -0
- package/dist/chunks/config-0.1.13-fn4hrgp2.mjs +1 -0
- package/dist/chunks/{config-0.1.11-cqy7fnab.mjs → config-0.1.13-q8fcew9w.mjs} +1 -1
- package/dist/chunks/context-0.1.13-5fz212w3.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.1.13-fjn2461g.mjs +1 -0
- package/dist/chunks/conversation-0.1.13-zjqxzcfr.mjs +1 -0
- package/dist/chunks/copy-0.1.13-03jy5tfn.mjs +9 -0
- package/dist/chunks/cost-0.1.13-zch21h6x.mjs +1 -0
- package/dist/chunks/createSession-0.1.13-mh3jt0b0.mjs +1 -0
- package/dist/chunks/desktop-0.1.13-w51djw8z.mjs +1 -0
- package/dist/chunks/detectRepository-0.1.13-5tt2922a.mjs +1 -0
- package/dist/chunks/detection-0.1.13-k001d88v.mjs +1 -0
- package/dist/chunks/diff-0.1.13-vz7x7nm3.mjs +1 -0
- package/dist/chunks/doctor-0.1.13-egkgh28s.mjs +1 -0
- package/dist/chunks/earlyInput-0.1.13-tpq0qmw0.mjs +1 -0
- package/dist/chunks/effort-0.1.13-11mfjfnb.mjs +8 -0
- package/dist/chunks/environmentSelection-0.1.13-8fagqvgw.mjs +1 -0
- package/dist/chunks/environments-0.1.13-x1xw45es.mjs +1 -0
- package/dist/chunks/exit-0.1.13-3m34eg2x.mjs +1 -0
- package/dist/chunks/export-0.1.13-sq3jk66f.mjs +2 -0
- package/dist/chunks/extra-usage-0.1.13-dh2sxr12.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.1.13-7yfmamd2.mjs +1 -0
- package/dist/chunks/fast-0.1.13-w1sk95j2.mjs +1 -0
- package/dist/chunks/feedback-0.1.13-ewxaenqk.mjs +14 -0
- package/dist/chunks/{firstPartyEventLogger-0.1.11-y7qkhdj6.mjs → firstPartyEventLogger-0.1.13-6m3fvkcj.mjs} +1 -1
- package/dist/chunks/git-0.1.13-2rp45xgd.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.1.13-e9c7cay9.mjs +1 -0
- package/dist/chunks/{growthbook-0.1.11-2w2b1mzd.mjs → growthbook-0.1.13-sramqmzv.mjs} +1 -1
- package/dist/chunks/{heapdump-0.1.11-b216wzt7.mjs → heapdump-0.1.13-3n7hv372.mjs} +1 -1
- package/dist/chunks/help-0.1.13-knrgw1dq.mjs +1 -0
- package/dist/chunks/{hookChains-0.1.11-jp8f82q7.mjs → hookChains-0.1.13-te9q466p.mjs} +2 -2
- package/dist/chunks/hooks-0.1.13-1cp6zhk0.mjs +1 -0
- package/dist/chunks/hooks-0.1.13-g6kx1mk3.mjs +79 -0
- package/dist/chunks/ide-0.1.13-ke3v5mb7.mjs +3 -0
- package/dist/chunks/{image-processor-napi-0.1.11-dpg3ygnw.mjs → image-processor-napi-0.1.13-h7fg935p.mjs} +1 -1
- package/dist/chunks/{index-0.1.11-b2q967nq.mjs → index-0.1.13-018yhz6j.mjs} +1 -1
- package/dist/chunks/index-0.1.13-0z5ns7r2.mjs +1 -0
- package/dist/chunks/index-0.1.13-1y9cm2x6.mjs +1 -0
- package/dist/chunks/{index-0.1.11-wbhj1ny7.mjs → index-0.1.13-3zjrdjrv.mjs} +1 -1
- package/dist/chunks/index-0.1.13-4cjfx282.mjs +1 -0
- package/dist/chunks/index-0.1.13-5g9shrc4.mjs +9 -0
- package/dist/chunks/index-0.1.13-7c5y7cbf.mjs +2 -0
- package/dist/chunks/index-0.1.13-7fm7tk25.mjs +1 -0
- package/dist/chunks/index-0.1.13-98j8cxkv.mjs +1 -0
- package/dist/chunks/index-0.1.13-9meb2pab.mjs +1 -0
- package/dist/chunks/index-0.1.13-a06q9ad9.mjs +2 -0
- package/dist/chunks/index-0.1.13-bc4sh2m1.mjs +1 -0
- package/dist/chunks/index-0.1.13-c29wq5dx.mjs +5 -0
- package/dist/chunks/index-0.1.13-h2mpm4c0.mjs +1 -0
- package/dist/chunks/index-0.1.13-h4wytk4z.mjs +1 -0
- package/dist/chunks/index-0.1.13-j9c4bjzh.mjs +1 -0
- package/dist/chunks/index-0.1.13-m9m61529.mjs +1 -0
- package/dist/chunks/index-0.1.13-mc5ag4wj.mjs +1 -0
- package/dist/chunks/index-0.1.13-nm8pkj0f.mjs +9 -0
- package/dist/chunks/index-0.1.13-psynrf7p.mjs +10 -0
- package/dist/chunks/index-0.1.13-qjt3h799.mjs +1 -0
- package/dist/chunks/index-0.1.13-tvt8fxrq.mjs +1 -0
- package/dist/chunks/initReplBridge-0.1.13-cd8avwfa.mjs +1 -0
- package/dist/chunks/ink-0.1.13-8ga6a1ny.mjs +1 -0
- package/dist/chunks/{insights-0.1.11-4yjg2bxs.mjs → insights-0.1.13-t81417ej.mjs} +3 -3
- package/dist/chunks/install-0.1.13-1bq7fwkd.mjs +1 -0
- package/dist/chunks/install-github-app-0.1.13-yvnx16za.mjs +149 -0
- package/dist/chunks/install-slack-app-0.1.13-2a6ydfjg.mjs +1 -0
- package/dist/chunks/instrumentation-0.1.13-bvt39wrk.mjs +12 -0
- package/dist/chunks/interactiveHelpers-0.1.13-p29payqv.mjs +1 -0
- package/dist/chunks/keybindings-0.1.13-nr2he9m8.mjs +2 -0
- package/dist/chunks/{knowledge-0.1.11-wpjw8ybd.mjs → knowledge-0.1.13-9a2md3fm.mjs} +1 -1
- package/dist/chunks/loadAgentsDir-0.1.13-jmqfw7w4.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.1.13-qagn7gmw.mjs +1 -0
- package/dist/chunks/logout-0.1.13-d6ghx6h9.mjs +1 -0
- package/dist/chunks/lsp-0.1.13-q6xr2am5.mjs +1 -0
- package/dist/chunks/main-0.1.13-e5tbkphz.mjs +1 -0
- package/dist/chunks/managedEnv-0.1.13-n073hj5h.mjs +1 -0
- package/dist/chunks/mcp-0.1.13-0bw6qtwy.mjs +4 -0
- package/dist/chunks/mcp-0.1.13-1kaxfeey.mjs +1 -0
- package/dist/chunks/mcp-0.1.13-x9twbpqk.mjs +17 -0
- package/dist/chunks/{mcpServer-0.1.11-czg51mvy.mjs → mcpServer-0.1.13-jf5dhyys.mjs} +1 -1
- package/dist/chunks/{mcpb-0.1.11-czkze48a.mjs → mcpb-0.1.13-e55321kr.mjs} +1 -1
- package/dist/chunks/memory-0.1.13-qwtbe97v.mjs +3 -0
- package/dist/chunks/mobile-0.1.13-pzekbte3.mjs +2 -0
- package/dist/chunks/model-0.1.13-a42465ep.mjs +1 -0
- package/dist/chunks/model-0.1.13-mqqrpy8m.mjs +2 -0
- package/dist/chunks/{oauth-0.1.11-jkkd9wzq.mjs → oauth-0.1.13-bk91rvfd.mjs} +1 -1
- package/dist/chunks/{openaiShim-0.1.11-b9yqnc9c.mjs → openaiShim-0.1.13-c9z5r4zj.mjs} +2 -2
- package/dist/chunks/{output-style-0.1.11-zwxn1knb.mjs → output-style-0.1.13-c4ah6hc0.mjs} +1 -1
- package/dist/chunks/package-WSP46L7M-0.1.13-sme2jxpt.mjs +1 -0
- package/dist/chunks/parser-0.1.13-mm8j9rwt.mjs +1 -0
- package/dist/chunks/passes-0.1.13-bcbvjdzs.mjs +1 -0
- package/dist/chunks/permissions-0.1.13-c03934ka.mjs +3 -0
- package/dist/chunks/plan-0.1.13-fgs4vbwk.mjs +1 -0
- package/dist/chunks/{plist-0.1.11-0sn6nqv3.mjs → plist-0.1.13-f3bfg2tf.mjs} +1 -1
- package/dist/chunks/plugin-0.1.13-p5aqty2y.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.1.13-f8tcmc9s.mjs +1 -0
- package/dist/chunks/{plugins-0.1.11-t3pgcpcj.mjs → plugins-0.1.13-1nvjxkbc.mjs} +2 -2
- package/dist/chunks/{print-0.1.11-y9vz77h9.mjs → print-0.1.13-g2dmfpmq.mjs} +10 -10
- package/dist/chunks/privacy-settings-0.1.13-xkaezd0n.mjs +1 -0
- package/dist/chunks/{process-0.1.11-s6jnx5xw.mjs → process-0.1.13-ycxbd26n.mjs} +1 -1
- package/dist/chunks/processBashCommand-0.1.13-x4ggp1t8.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.1.13-16gwwvqz.mjs +9 -0
- package/dist/chunks/prompt-0.1.13-j0tnske2.mjs +1 -0
- package/dist/chunks/prompt-0.1.13-mdxfbbqp.mjs +1 -0
- package/dist/chunks/prompts-0.1.13-gtp7vnge.mjs +1 -0
- package/dist/chunks/provider-0.1.13-e9ayet7n.mjs +2 -0
- package/dist/chunks/providerProfiles-0.1.13-y9gs55qq.mjs +1 -0
- package/dist/chunks/rate-limit-options-0.1.13-va0322ws.mjs +1 -0
- package/dist/chunks/registry-0.1.13-e33aasxk.mjs +1 -0
- package/dist/chunks/release-notes-0.1.13-jmkp5g6h.mjs +5 -0
- package/dist/chunks/reload-plugins-0.1.13-0p5x4cr9.mjs +2 -0
- package/dist/chunks/remote-env-0.1.13-d7evw9tc.mjs +1 -0
- package/dist/chunks/{remoteBridgeCore-0.1.11-hn821p07.mjs → remoteBridgeCore-0.1.13-sq5rr5x0.mjs} +1 -1
- package/dist/chunks/remoteSession-0.1.13-zjhajyna.mjs +1 -0
- package/dist/chunks/rename-0.1.13-t30c4tx9.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.1.13-38jvakp0.mjs +1 -0
- package/dist/chunks/resume-0.1.13-ta7t0vbz.mjs +2 -0
- package/dist/chunks/{rewind-0.1.11-t4mfk815.mjs → rewind-0.1.13-zxcfrje2.mjs} +1 -1
- package/dist/chunks/sandbox-adapter-0.1.13-x04v4bxn.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.1.13-w0p8r4ta.mjs +1 -0
- package/dist/chunks/session-0.1.13-cjn060z1.mjs +2 -0
- package/dist/chunks/sessionFileAccessHooks-0.1.13-mr3y5jpc.mjs +1 -0
- package/dist/chunks/sessionStorage-0.1.13-8gahjm86.mjs +1 -0
- package/dist/chunks/setup-0.1.13-ap9dpanw.mjs +5 -0
- package/dist/chunks/sinks-0.1.13-r13nv1fw.mjs +1 -0
- package/dist/chunks/skills-0.1.13-jd5g0cex.mjs +1 -0
- package/dist/chunks/startupProfiler-0.1.13-d4g7sykt.mjs +1 -0
- package/dist/chunks/{state-0.1.11-3fjxywyv.mjs → state-0.1.13-cv8jd04r.mjs} +1 -1
- package/dist/chunks/{stats-0.1.11-hxzms6gg.mjs → stats-0.1.13-yrtt99gr.mjs} +6 -6
- package/dist/chunks/status-0.1.13-4x7h3dec.mjs +1 -0
- package/dist/chunks/stickers-0.1.13-8szx17mh.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.1.13-9asfa8pp.mjs +1 -0
- package/dist/chunks/tasks-0.1.13-dsy415kp.mjs +1 -0
- package/dist/chunks/teamHelpers-0.1.13-z4fpbggy.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.1.13-cc6scthx.mjs +1 -0
- package/dist/chunks/teleport-0.1.13-gx6zbjr3.mjs +1 -0
- package/dist/chunks/terminalSetup-0.1.13-wmg8wa4f.mjs +1 -0
- package/dist/chunks/theme-0.1.13-m8mdm37k.mjs +1 -0
- package/dist/chunks/thinkback-0.1.13-4jwhbbcv.mjs +1 -0
- package/dist/chunks/thinkback-play-0.1.13-0vz0yjza.mjs +1 -0
- package/dist/chunks/toolPool-0.1.13-z741g6f2.mjs +1 -0
- package/dist/chunks/toolSearch-0.1.13-jaadtdmb.mjs +1 -0
- package/dist/chunks/trustedDevice-0.1.13-w279yc46.mjs +1 -0
- package/dist/chunks/{turndown.cjs-0.1.11-brwqmyse.mjs → turndown.cjs-0.1.13-2wbn8j6y.mjs} +1 -1
- package/dist/chunks/ultrareviewCommand-0.1.13-sj6asgpk.mjs +4 -0
- package/dist/chunks/{update-0.1.11-p33kxpg4.mjs → update-0.1.13-sx7hc0kj.mjs} +11 -11
- package/dist/chunks/upgrade-0.1.13-dce1xd29.mjs +1 -0
- package/dist/chunks/{upstreamproxy-0.1.11-vk16qw88.mjs → upstreamproxy-0.1.13-pwxv6kww.mjs} +1 -1
- package/dist/chunks/usage-0.1.13-mr2bn5g6.mjs +1 -0
- package/dist/chunks/util-0.1.13-ef9r7w41.mjs +1 -0
- package/dist/chunks/utils-0.1.13-03dvz81t.mjs +1 -0
- package/dist/chunks/vim-0.1.13-3x0ehdme.mjs +1 -0
- package/dist/chunks/watcher-0.1.13-yzxxvgz3.mjs +1 -0
- package/dist/chunks/{wiki-0.1.11-v0twhcnn.mjs → wiki-0.1.13-regg8ff2.mjs} +1 -1
- package/dist/chunks/worktree-0.1.13-kdhzfvjx.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.1.13-d4t06wcm.mjs +1 -0
- package/dist/chunks/{wrapper-0.1.11-rt9xsnjh.mjs → wrapper-0.1.13-8nsef109.mjs} +1 -1
- package/dist/claudio-vscode.vsix +0 -0
- package/dist/cli.mjs +3 -3
- package/package.json +5 -19
- package/dist/chunks/AgentTool-0.1.11-m06x003m.mjs +0 -1
- package/dist/chunks/App-0.1.11-z60c27dk.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.1.11-dpm879x7.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.11-dnqj2p8g.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.1.11-h71pmj5p.mjs +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-0.1.11-vjwzqejw.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.11-0wpjjdn9.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.1.11-xzbcx3cw.mjs +0 -1
- package/dist/chunks/DiffDialog-0.1.11-k3zsm9tz.mjs +0 -3
- package/dist/chunks/Doctor-0.1.11-958cxvhj.mjs +0 -1
- package/dist/chunks/Grove-0.1.11-93bnbcec.mjs +0 -1
- package/dist/chunks/ITermBackend-0.1.11-xbxm144g.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.1.11-vbeef1wb.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.1.11-5bct7bny.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.1.11-13kfzmtt.mjs +0 -1
- package/dist/chunks/Onboarding-0.1.11-kz5hnpx3.mjs +0 -1
- package/dist/chunks/ProviderManager-0.1.11-nggswmdv.mjs +0 -1
- package/dist/chunks/REPL-0.1.11-ctxx4039.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.1.11-gwxzn4yg.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.1.11-z1ez7pce.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.11-pjt2g9ss.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.1.11-9y29zset.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.1.11-5a4ddj92.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.1.11-w3cgae0s.mjs +0 -1
- package/dist/chunks/TrustDialog-0.1.11-3dsrj239.mjs +0 -1
- package/dist/chunks/activeProvider-0.1.11-qrn947by.mjs +0 -1
- package/dist/chunks/add-dir-0.1.11-9j7tq9gk.mjs +0 -1
- package/dist/chunks/agents-0.1.11-26pbss9x.mjs +0 -3
- package/dist/chunks/agents-0.1.11-m56gfjmy.mjs +0 -111
- package/dist/chunks/api-0.1.11-5ygenb1h.mjs +0 -1
- package/dist/chunks/assistant-0.1.11-5xbar4vv.mjs +0 -1
- package/dist/chunks/auth-0.1.11-2363mst5.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.1.11-fy6tykxe.mjs +0 -1
- package/dist/chunks/branch-0.1.11-aqhrj1x2.mjs +0 -4
- package/dist/chunks/btw-0.1.11-2kks7dfd.mjs +0 -1
- package/dist/chunks/caches-0.1.11-vewfnrya.mjs +0 -1
- package/dist/chunks/chrome-0.1.11-0g5459b5.mjs +0 -1
- package/dist/chunks/claudemd-0.1.11-qrr22x5b.mjs +0 -1
- package/dist/chunks/clear-0.1.11-c93nbam7.mjs +0 -1
- package/dist/chunks/clearTerminal-0.1.11-pdrc3735.mjs +0 -1
- package/dist/chunks/cli-0.1.11-036me3yr.mjs +0 -2
- package/dist/chunks/cli-0.1.11-05g86mrk.mjs +0 -2
- package/dist/chunks/cli-0.1.11-0fshz0ak.mjs +0 -2
- package/dist/chunks/cli-0.1.11-0qwee9gy.mjs +0 -2
- package/dist/chunks/cli-0.1.11-10nmrfsz.mjs +0 -8
- package/dist/chunks/cli-0.1.11-1b48xqbe.mjs +0 -2
- package/dist/chunks/cli-0.1.11-1bmswdg3.mjs +0 -2
- package/dist/chunks/cli-0.1.11-1bxwxewq.mjs +0 -833
- package/dist/chunks/cli-0.1.11-1e6fgnts.mjs +0 -3
- package/dist/chunks/cli-0.1.11-23qqxmk4.mjs +0 -2
- package/dist/chunks/cli-0.1.11-2xf0g9qc.mjs +0 -45
- package/dist/chunks/cli-0.1.11-3f5dv6mt.mjs +0 -2
- package/dist/chunks/cli-0.1.11-4bn5ap1n.mjs +0 -2
- package/dist/chunks/cli-0.1.11-4cdyzvxv.mjs +0 -3
- package/dist/chunks/cli-0.1.11-4xsg15d1.mjs +0 -2
- package/dist/chunks/cli-0.1.11-56p41bk3.mjs +0 -2
- package/dist/chunks/cli-0.1.11-5zqfr92n.mjs +0 -2
- package/dist/chunks/cli-0.1.11-71ewwy7m.mjs +0 -50
- package/dist/chunks/cli-0.1.11-7238rfy8.mjs +0 -2
- package/dist/chunks/cli-0.1.11-7t04gqx2.mjs +0 -3
- package/dist/chunks/cli-0.1.11-84j34n0s.mjs +0 -2
- package/dist/chunks/cli-0.1.11-at3c85af.mjs +0 -2
- package/dist/chunks/cli-0.1.11-bhqwqe2w.mjs +0 -2
- package/dist/chunks/cli-0.1.11-btayz9zj.mjs +0 -2
- package/dist/chunks/cli-0.1.11-bvd2r7an.mjs +0 -252
- package/dist/chunks/cli-0.1.11-bwn9ehxv.mjs +0 -2
- package/dist/chunks/cli-0.1.11-cdpswj0n.mjs +0 -2
- package/dist/chunks/cli-0.1.11-cf049e4w.mjs +0 -134
- package/dist/chunks/cli-0.1.11-cw0ss3jw.mjs +0 -4
- package/dist/chunks/cli-0.1.11-cwptjaf7.mjs +0 -12
- package/dist/chunks/cli-0.1.11-da6szcvw.mjs +0 -2
- package/dist/chunks/cli-0.1.11-e66dak4h.mjs +0 -4
- package/dist/chunks/cli-0.1.11-e7gjxknm.mjs +0 -16
- package/dist/chunks/cli-0.1.11-eh7tjdab.mjs +0 -18
- package/dist/chunks/cli-0.1.11-emw2wfff.mjs +0 -3
- package/dist/chunks/cli-0.1.11-fag2wtke.mjs +0 -2
- package/dist/chunks/cli-0.1.11-fveg0t77.mjs +0 -22
- package/dist/chunks/cli-0.1.11-fx6ztxrs.mjs +0 -5
- package/dist/chunks/cli-0.1.11-g33qp0jz.mjs +0 -2
- package/dist/chunks/cli-0.1.11-gc069ne7.mjs +0 -2
- package/dist/chunks/cli-0.1.11-ggrme14p.mjs +0 -2
- package/dist/chunks/cli-0.1.11-h02tyg8p.mjs +0 -2
- package/dist/chunks/cli-0.1.11-hrn726gf.mjs +0 -2
- package/dist/chunks/cli-0.1.11-hzezqkew.mjs +0 -2
- package/dist/chunks/cli-0.1.11-jne21ka1.mjs +0 -2
- package/dist/chunks/cli-0.1.11-kk0qqs5v.mjs +0 -7
- package/dist/chunks/cli-0.1.11-kndj4a86.mjs +0 -2
- package/dist/chunks/cli-0.1.11-kthpxpj3.mjs +0 -24
- package/dist/chunks/cli-0.1.11-m0aaey0g.mjs +0 -4
- package/dist/chunks/cli-0.1.11-m1dpnkp0.mjs +0 -2
- package/dist/chunks/cli-0.1.11-mr356stf.mjs +0 -2
- package/dist/chunks/cli-0.1.11-n23d2wej.mjs +0 -2
- package/dist/chunks/cli-0.1.11-na9tsy21.mjs +0 -2
- package/dist/chunks/cli-0.1.11-nesh7dep.mjs +0 -2
- package/dist/chunks/cli-0.1.11-nhjbgc7t.mjs +0 -2
- package/dist/chunks/cli-0.1.11-pfgwwtw9.mjs +0 -2
- package/dist/chunks/cli-0.1.11-q89t0xzx.mjs +0 -2
- package/dist/chunks/cli-0.1.11-qbcfg80y.mjs +0 -16
- package/dist/chunks/cli-0.1.11-qheffjft.mjs +0 -2
- package/dist/chunks/cli-0.1.11-rmyvg4yw.mjs +0 -2
- package/dist/chunks/cli-0.1.11-s8ygndzf.mjs +0 -5036
- package/dist/chunks/cli-0.1.11-ta77hm2b.mjs +0 -2
- package/dist/chunks/cli-0.1.11-trcf78n1.mjs +0 -2
- package/dist/chunks/cli-0.1.11-v2s8ey1n.mjs +0 -12
- package/dist/chunks/cli-0.1.11-vb5f7c3a.mjs +0 -2
- package/dist/chunks/cli-0.1.11-vch8cn95.mjs +0 -2
- package/dist/chunks/cli-0.1.11-vzet5m4y.mjs +0 -2
- package/dist/chunks/cli-0.1.11-w3ydpv9v.mjs +0 -2
- package/dist/chunks/cli-0.1.11-wjxhn7j5.mjs +0 -2
- package/dist/chunks/cli-0.1.11-x37jysc0.mjs +0 -14
- package/dist/chunks/cli-0.1.11-x5nvafch.mjs +0 -2
- package/dist/chunks/cli-0.1.11-xhrk5hr0.mjs +0 -2
- package/dist/chunks/cli-0.1.11-xp93fxnp.mjs +0 -2
- package/dist/chunks/cli-0.1.11-xwj7cmkj.mjs +0 -2
- package/dist/chunks/cli-0.1.11-yd6f29v2.mjs +0 -2
- package/dist/chunks/cli-0.1.11-yhk2y3c0.mjs +0 -2
- package/dist/chunks/cli-0.1.11-yvnhbsfn.mjs +0 -3
- package/dist/chunks/cli-0.1.11-z0thk4h0.mjs +0 -2
- package/dist/chunks/cli-0.1.11-zdyddegg.mjs +0 -2
- package/dist/chunks/cli-0.1.11-zwkjaj0d.mjs +0 -2
- package/dist/chunks/client-0.1.11-h38k7vkj.mjs +0 -1
- package/dist/chunks/color-0.1.11-b7favzc8.mjs +0 -1
- package/dist/chunks/compact-0.1.11-damm234b.mjs +0 -3
- package/dist/chunks/config-0.1.11-bb6v0pwv.mjs +0 -1
- package/dist/chunks/context-0.1.11-e2s56h3b.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.1.11-s6b9q91h.mjs +0 -1
- package/dist/chunks/conversation-0.1.11-d8ejy4b9.mjs +0 -1
- package/dist/chunks/copy-0.1.11-aq32vn1b.mjs +0 -9
- package/dist/chunks/cost-0.1.11-3z9y6a5a.mjs +0 -1
- package/dist/chunks/createSession-0.1.11-rgaw7n2v.mjs +0 -1
- package/dist/chunks/desktop-0.1.11-k8ac4bfx.mjs +0 -1
- package/dist/chunks/detectRepository-0.1.11-m3chgqa1.mjs +0 -1
- package/dist/chunks/detection-0.1.11-aa9k5rxv.mjs +0 -1
- package/dist/chunks/devtools-0.1.11-fkz4akhx.mjs +0 -1
- package/dist/chunks/diff-0.1.11-tcqh42f6.mjs +0 -1
- package/dist/chunks/doctor-0.1.11-6fwwz8hp.mjs +0 -1
- package/dist/chunks/earlyInput-0.1.11-94asnfvh.mjs +0 -1
- package/dist/chunks/effort-0.1.11-zcxskzrb.mjs +0 -8
- package/dist/chunks/environmentSelection-0.1.11-6ngvrt1m.mjs +0 -1
- package/dist/chunks/environments-0.1.11-pdsv6dgq.mjs +0 -1
- package/dist/chunks/exit-0.1.11-2jab9tfm.mjs +0 -1
- package/dist/chunks/export-0.1.11-wv5bd05w.mjs +0 -2
- package/dist/chunks/extra-usage-0.1.11-f5rm0265.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.1.11-dt7znwbn.mjs +0 -1
- package/dist/chunks/fast-0.1.11-a665n9kz.mjs +0 -1
- package/dist/chunks/feedback-0.1.11-q77qty87.mjs +0 -14
- package/dist/chunks/git-0.1.11-g77ppr52.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.1.11-9vhs3xqj.mjs +0 -1
- package/dist/chunks/help-0.1.11-byp88gen.mjs +0 -1
- package/dist/chunks/hooks-0.1.11-v9jan2ss.mjs +0 -1
- package/dist/chunks/hooks-0.1.11-vf6vcsgg.mjs +0 -79
- package/dist/chunks/ide-0.1.11-7nxbd03r.mjs +0 -3
- package/dist/chunks/index-0.1.11-3dfjfmc6.mjs +0 -1
- package/dist/chunks/index-0.1.11-82wnmfq3.mjs +0 -9
- package/dist/chunks/index-0.1.11-8gtaa17w.mjs +0 -1
- package/dist/chunks/index-0.1.11-ajdpkanw.mjs +0 -1
- package/dist/chunks/index-0.1.11-bhrstsgc.mjs +0 -1
- package/dist/chunks/index-0.1.11-d6qbzwah.mjs +0 -1
- package/dist/chunks/index-0.1.11-d9ft1b0s.mjs +0 -1
- package/dist/chunks/index-0.1.11-e52dzxjz.mjs +0 -5
- package/dist/chunks/index-0.1.11-gb3saayk.mjs +0 -2
- package/dist/chunks/index-0.1.11-kksxmkwe.mjs +0 -1
- package/dist/chunks/index-0.1.11-n564rmwy.mjs +0 -1
- package/dist/chunks/index-0.1.11-n90nxjqp.mjs +0 -1
- package/dist/chunks/index-0.1.11-p0j3w83p.mjs +0 -1
- package/dist/chunks/index-0.1.11-pmkgntay.mjs +0 -7
- package/dist/chunks/index-0.1.11-qspcw49p.mjs +0 -1
- package/dist/chunks/index-0.1.11-r6p77pf7.mjs +0 -1
- package/dist/chunks/index-0.1.11-s0w8xy7q.mjs +0 -9
- package/dist/chunks/index-0.1.11-wze82293.mjs +0 -1
- package/dist/chunks/index-0.1.11-xs4mng75.mjs +0 -1
- package/dist/chunks/index-0.1.11-yej3awws.mjs +0 -2
- package/dist/chunks/initReplBridge-0.1.11-71963wyw.mjs +0 -1
- package/dist/chunks/ink-0.1.11-tzp2q9bd.mjs +0 -1
- package/dist/chunks/install-0.1.11-4zfvr6pk.mjs +0 -1
- package/dist/chunks/install-github-app-0.1.11-frqzdwsz.mjs +0 -149
- package/dist/chunks/install-slack-app-0.1.11-0yyjjvrw.mjs +0 -1
- package/dist/chunks/instrumentation-0.1.11-zyp2r390.mjs +0 -12
- package/dist/chunks/interactiveHelpers-0.1.11-chnsxp26.mjs +0 -1
- package/dist/chunks/keybindings-0.1.11-r2jke9h5.mjs +0 -2
- package/dist/chunks/loadAgentsDir-0.1.11-bwymseqa.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.1.11-npf49gc4.mjs +0 -1
- package/dist/chunks/logout-0.1.11-48ynp610.mjs +0 -1
- package/dist/chunks/lsp-0.1.11-e4z6m5t5.mjs +0 -1
- package/dist/chunks/main-0.1.11-6sh6xycv.mjs +0 -1
- package/dist/chunks/managedEnv-0.1.11-6bnnpsm0.mjs +0 -1
- package/dist/chunks/mcp-0.1.11-vjjx8eer.mjs +0 -17
- package/dist/chunks/mcp-0.1.11-zf74a6am.mjs +0 -4
- package/dist/chunks/mcp-0.1.11-zw22jjqc.mjs +0 -1
- package/dist/chunks/memory-0.1.11-k7y98zqn.mjs +0 -3
- package/dist/chunks/mobile-0.1.11-2w5py2cb.mjs +0 -2
- package/dist/chunks/model-0.1.11-4v166f98.mjs +0 -2
- package/dist/chunks/model-0.1.11-qekc9c4w.mjs +0 -1
- package/dist/chunks/package-HMBVQOZ4-0.1.11-n77wqhxr.mjs +0 -1
- package/dist/chunks/parser-0.1.11-vvhz2p5h.mjs +0 -1
- package/dist/chunks/passes-0.1.11-dgshr9c4.mjs +0 -1
- package/dist/chunks/permissions-0.1.11-71fn7rsk.mjs +0 -3
- package/dist/chunks/plan-0.1.11-1xyzxjgr.mjs +0 -1
- package/dist/chunks/plugin-0.1.11-menj210d.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.1.11-ytjn1kxg.mjs +0 -1
- package/dist/chunks/privacy-settings-0.1.11-3ah0v02p.mjs +0 -1
- package/dist/chunks/processBashCommand-0.1.11-txp79ekj.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.1.11-fdvs7etd.mjs +0 -9
- package/dist/chunks/prompt-0.1.11-4f7rsvd2.mjs +0 -1
- package/dist/chunks/prompt-0.1.11-bzkv3rsd.mjs +0 -1
- package/dist/chunks/prompts-0.1.11-xczb1nwa.mjs +0 -1
- package/dist/chunks/provider-0.1.11-cqeqqqbt.mjs +0 -2
- package/dist/chunks/providerProfiles-0.1.11-ewn8w0f1.mjs +0 -1
- package/dist/chunks/rate-limit-options-0.1.11-6bca3g5n.mjs +0 -1
- package/dist/chunks/registry-0.1.11-wjnpx9yf.mjs +0 -1
- package/dist/chunks/release-notes-0.1.11-dhe37z3c.mjs +0 -5
- package/dist/chunks/reload-plugins-0.1.11-gzep3pg3.mjs +0 -2
- package/dist/chunks/remote-env-0.1.11-yday97nq.mjs +0 -1
- package/dist/chunks/remoteSession-0.1.11-g3h440pv.mjs +0 -1
- package/dist/chunks/rename-0.1.11-ke9btph2.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.1.11-t5njc196.mjs +0 -1
- package/dist/chunks/resume-0.1.11-d4bbgty9.mjs +0 -2
- package/dist/chunks/sandbox-adapter-0.1.11-3czn1nws.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.1.11-qxv2w9n1.mjs +0 -1
- package/dist/chunks/session-0.1.11-2z972raf.mjs +0 -2
- package/dist/chunks/sessionFileAccessHooks-0.1.11-f3exnspr.mjs +0 -1
- package/dist/chunks/sessionStorage-0.1.11-aa2ftdjn.mjs +0 -1
- package/dist/chunks/setup-0.1.11-epmpszzf.mjs +0 -5
- package/dist/chunks/sinks-0.1.11-q3zcj5me.mjs +0 -1
- package/dist/chunks/skills-0.1.11-9xbyp1p5.mjs +0 -1
- package/dist/chunks/startupProfiler-0.1.11-5s07826j.mjs +0 -1
- package/dist/chunks/status-0.1.11-drvp15n8.mjs +0 -1
- package/dist/chunks/stickers-0.1.11-44f4tawn.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.1.11-5w00fpez.mjs +0 -1
- package/dist/chunks/tasks-0.1.11-dn8h18fk.mjs +0 -1
- package/dist/chunks/teamHelpers-0.1.11-ca7kref8.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.1.11-an88rdgv.mjs +0 -1
- package/dist/chunks/teleport-0.1.11-8e3k0ex6.mjs +0 -1
- package/dist/chunks/terminalSetup-0.1.11-gtdwp0an.mjs +0 -1
- package/dist/chunks/theme-0.1.11-p447kczd.mjs +0 -1
- package/dist/chunks/thinkback-0.1.11-3f1xvkt5.mjs +0 -1
- package/dist/chunks/thinkback-play-0.1.11-0ax4h089.mjs +0 -1
- package/dist/chunks/toolPool-0.1.11-xrywy61j.mjs +0 -1
- package/dist/chunks/toolSearch-0.1.11-7yjvjxhp.mjs +0 -1
- package/dist/chunks/trustedDevice-0.1.11-070f1wch.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-0.1.11-0m9b3kr5.mjs +0 -4
- package/dist/chunks/upgrade-0.1.11-1aj14cqt.mjs +0 -1
- package/dist/chunks/usage-0.1.11-hch4v5jb.mjs +0 -1
- package/dist/chunks/util-0.1.11-sjkxad5k.mjs +0 -1
- package/dist/chunks/utils-0.1.11-2bk8zn4g.mjs +0 -1
- package/dist/chunks/vim-0.1.11-v1rz1d56.mjs +0 -1
- package/dist/chunks/watcher-0.1.11-v8mkv1xy.mjs +0 -1
- package/dist/chunks/worktree-0.1.11-d7chpamf.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.1.11-tsxv6h6g.mjs +0 -1
- /package/dist/chunks/{cli-0.1.11-4px8nt5r.mjs → cli-0.1.13-fdmvysv0.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.11-x3q39kf7.mjs → cli-0.1.13-gs7rcvne.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.11-tyh8gms9.mjs → cli-0.1.13-m5c2efjx.mjs} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{I5 as R2,K5 as u4}from"./cli-0.1.13-5ydypzty.mjs";import{M5 as h,N5 as jZ}from"./cli-0.1.13-v6z41645.mjs";import{C6 as O,T6 as s0}from"./cli-0.1.13-wh68ve92.mjs";import{Aca as i,Bca as q2,Cca as K0,Dca as q4,Eca as I2,F_ as Y1,G_ as e4,Hca as x2,Iba as d,Ica as GZ,Mba as M,N7 as X1,O7 as r4,Paa as b,Pba as F,Raa as Q2,S7 as K,T_ as P1,Taa as e,Uaa as C,X7 as c0,a8 as x0,b8 as u5,bba as q0,c8 as Q5,d$ as U8,eda as A1,f8 as qZ,gca as W0,iaa as E1,ica as k1,jca as _8,kba as K4,kda as y8,mba as zZ,nda as D,qda as V0,raa as O8,s8 as X5,u8 as WZ,wca as M1,yca as I8,zca as V4}from"./cli-0.1.13-dag38tkx.mjs";import{$ea as N,Uea as H5,Vea as L4,Wea as z0,Yea as h4,Zea as f4,afa as b0}from"./cli-0.1.13-pw5dks39.mjs";import{Afa as Q1,ofa as k0,qfa as Z4}from"./cli-0.1.13-rjjyq9ej.mjs";import{qga as j,rga as J2}from"./cli-0.1.13-45hjhcbc.mjs";import{Qga as p,Sga as M5,Wga as A5,Zga as J5,aha as VZ,eha as k2,iha as t4,oha as z,qha as f0,rha as j0}from"./cli-0.1.13-144gn3fd.mjs";import{Bha as L,Dha as u,Fha as H2,Iha as F4,Lha as g,yha as $5}from"./cli-0.1.13-1g6bgaa6.mjs";import{Ala as C5,Bla as S5,Cka as e1,Hka as O0,Ika as t0,Nla as $2,ala as f,gna as r,hla as J1,kka as R1,lja as $0,mja as n5,yka as b1,yla as y5,zla as T5}from"./cli-0.1.13-52f40ba4.mjs";import{Fna as y,Gna as m0}from"./cli-0.1.13-xv6wh44y.mjs";import{Una as m8,Wna as S1,Xna as B,Yna as o}from"./cli-0.1.13-bj67mp7n.mjs";function R5(Z){let $=[],J=!1;async function Q(){if(J)return;if($.length===0)return;J=!0;while($.length>0){let{args:X,resolve:Y,reject:V,context:W}=$.shift();try{let G=await Z.apply(W,X);Y(G)}catch(G){V(G)}}if(J=!1,$.length>0)Q()}return function(...X){return new Promise((Y,V)=>{$.push({args:X,resolve:Y,reject:V,context:this}),Q()})}}var w5=()=>{};function L5(Z,$){return Z.find((J)=>J.includes($))??null}async function K5(){let{BedrockClient:Z}=await import("@aws-sdk/client-bedrock"),$=H2(),J=L(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await R2(),...J&&{requestHandler:new(await import("./index-0.1.13-1y9cm2x6.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-0.1.13-7fm7tk25.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await X0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}async function Y3(){let{BedrockRuntimeClient:Z}=await import("@aws-sdk/client-bedrock-runtime"),$=H2(),J=L(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await R2(),...J&&{requestHandler:new(await import("./index-0.1.13-1y9cm2x6.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-0.1.13-7fm7tk25.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await X0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}function g4(Z){return Z.startsWith("anthropic.")}function m4(Z){if(!Z.startsWith("arn:"))return Z;let $=Z.lastIndexOf("/");if($===-1)return Z;return Z.substring($+1)}function c4(Z){let $=m4(Z);for(let J of p4)if($.startsWith(`${J}.anthropic.`))return J;return}function q3(Z,$){let J=c4(Z);if(J)return Z.replace(`${J}.`,`${$}.`);if(g4(Z))return`${$}.${Z}`;return Z}var F5,V3,p4;var D5=B(()=>{m0();n();g();c0();u4();F5=y(async function(){let[Z,{ListInferenceProfilesCommand:$}]=await Promise.all([K5(),import("@aws-sdk/client-bedrock")]),J=[],Q;try{do{let X=new $({...Q&&{nextToken:Q},typeEquals:"SYSTEM_DEFINED"}),Y=await Z.send(X);if(Y.inferenceProfileSummaries)J.push(...Y.inferenceProfileSummaries);Q=Y.nextToken}while(Q);return J.filter((X)=>X.inferenceProfileId?.includes("anthropic")).map((X)=>X.inferenceProfileId).filter(Boolean)}catch(X){throw K(X),X}});V3=y(async function(Z){try{let[$,{GetInferenceProfileCommand:J}]=await Promise.all([K5(),import("@aws-sdk/client-bedrock")]),Q=new J({inferenceProfileIdentifier:Z}),X=await $.send(Q);if(!X.models||X.models.length===0)return null;let Y=X.models[0];if(!Y?.modelArn)return null;let V=Y.modelArn.lastIndexOf("/");return V>=0?Y.modelArn.substring(V+1):Y.modelArn}catch($){return K($),null}});p4=["us","eu","apac","global"]});var w2,F2,L2,K2,D2,N2,U2,O2,_2,d0,n0,b2,Y0,z3,N5;var P2=B(()=>{w2={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"},F2={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"},L2={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"},K2={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"},D2={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"},N2={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"},U2={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"},O2={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"},_2={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"},d0={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"},n0={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"},b2={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"},Y0={haiku35:L2,haiku45:K2,sonnet35:F2,sonnet37:w2,sonnet40:D2,sonnet45:N2,sonnet46:b2,opus40:U2,opus41:O2,opus45:_2,opus46:d0,opus47:n0},z3=Object.values(Y0).map((Z)=>Z.firstParty),N5=Object.fromEntries(Object.entries(Y0).map(([Z,$])=>[$.firstParty,Z]))});function q(){let Z=D();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 x3(){return q()==="firstParty"}function B3(Z){let $=D();if($?.transport!=="github_copilot")return!1;return(Z?.trim()||$.model?.trim()||"").toLowerCase().includes("claude-")}function H3(){return q()}function R3(){let Z=D();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 t=B(()=>{V0()});function i0(Z){let $=Z==="codex"||Z==="github"?"openai":Z,J={};for(let Q of O5)J[Q]=Y0[Q][$];return J}async function d4(){let Z=i0("bedrock"),$;try{$=await F5()}catch(Q){return K(Q),Z}if(!$?.length)return Z;let J={};for(let Q of O5){let X=Y0[Q].firstParty;J[Q]=L5($,X)||Z[Q]}return J}function U5(Z){let $=e().modelOverrides;if(!$)return Z;let J={...Z};for(let[Q,X]of Object.entries($)){let Y=N5[Q];if(Y&&X)J[Y]=X}return J}function l0(Z){let $;try{$=e().modelOverrides}catch{return Z}if(!$)return Z;for(let[J,Q]of Object.entries($))if(Q===Z)return J;return Z}function n4(){if(O0()!==null)return;if(q()!=="bedrock"){t0(i0(q()));return}_5()}function H(){let Z=O0();if(Z===null)return n4(),U5(i0(q()));return U5(Z)}async function _3(){if(O0()!==null)return;if(q()!=="bedrock"){t0(i0(q()));return}await _5()}var O5,_5;var a0=B(()=>{r();c0();w5();q0();D5();P2();t();O5=Object.keys(Y0);_5=R5(async()=>{if(O0()!==null)return;try{let Z=await d4();t0(Z)}catch(Z){K(Z)}})});function v3(){if(L(process.env.DISABLE_COST_WARNINGS))return!1;if(U())return!1;let $=_0(),J=Z0()!==null;if(!$.hasToken&&!J)return!1;let Q=F(),X=Q.oauthAccount?.organizationRole,Y=Q.oauthAccount?.workspaceRole;if(!X||!Y)return!1;return["admin","billing"].includes(X)||["workspace_admin","workspace_billing"].includes(Y)}function I3(){if(b5!==null)return b5;if(!U())return!1;let Z=v();if(Z==="max"||Z==="pro")return!0;let J=F().oauthAccount?.organizationRole;return!!J&&["admin","billing","owner","primary_owner"].includes(J)}var b5=null;var P5=B(()=>{n();W0();g()});function S3(Z){return Z}function M3(){return!1}function E5(){return null}function k5(){return!1}var v5=B(()=>{P5()});async function m3(){let $=F().oauthAccount?.accountUuid,J=Z0();if(!$||!J)return;let Q=`${N().BASE_API_URL}/api/claude_cli_profile`;try{return(await O.get(Q,{headers:{"x-api-key":J,"anthropic-beta":z0},params:{account_uuid:$},timeout:1e4})).data}catch(X){K(X)}}async function G0(Z){let $=`${N().BASE_API_URL}/api/oauth/profile`;try{return(await O.get($,{headers:{Authorization:`Bearer ${Z}`,"Content-Type":"application/json"},timeout:1e4})).data}catch(J){K(J)}}var E2=B(()=>{s0();b0();n();W0();c0()});import{mkdirSync as i4,writeFileSync as l4}from"fs";function o4(Z,$,J){if(!L(process.env.CLAUDE_CODE_REMOTE))return;try{i4(o0,{recursive:!0,mode:448}),l4(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 I5(Z,$){try{let Q=k2().readFileSync(Z,{encoding:"utf8"}).trim();if(!Q)return null;return z(`Read ${$} from well-known file ${Z}`),Q}catch(J){if(!M5(J))z(`Failed to read ${$} from ${Z}: ${p(J)}`,{level:"debug"});return null}}function h5({envVar:Z,wellKnownPath:$,label:J,getCached:Q,setCached:X}){let Y=Q();if(Y!==void 0)return Y;let V=process.env[Z];if(!V){let G=I5($,J);return X(G),G}let W=parseInt(V,10);if(Number.isNaN(W))return z(`${Z} must be a valid file descriptor number, got: ${V}`,{level:"error"}),X(null),null;try{let G=k2(),x=process.platform==="darwin"||process.platform==="freebsd"?`/dev/fd/${W}`:`/proc/self/fd/${W}`,R=G.readFileSync(x,{encoding:"utf8"}).trim();if(!R)return z(`File descriptor contained empty ${J}`,{level:"error"}),X(null),null;return z(`Successfully read ${J} from file descriptor ${W}`),X(R),o4($,R,J),R}catch(G){z(`Failed to read ${J} from file descriptor ${W}: ${p(G)}`,{level:"error"});let x=I5($,J);return X(x),x}}function r0(){return h5({envVar:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",wellKnownPath:a4,label:"OAuth token",getCached:y5,setCached:T5})}function v2(){return h5({envVar:"CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR",wellKnownPath:s4,label:"API key",getCached:C5,setCached:S5})}var o0="/home/claude/.claude/remote",a4,s4,s3;var f5=B(()=>{r();j0();g();A5();t4();a4=`${o0}/.oauth_token`,s4=`${o0}/.api_key`,s3=`${o0}/.session_ingress_token`});async function g5(){if(process.platform==="darwin"){let Z=i();if((await x0(`security delete-generic-password -a $USER -s "${Z}"`,{shell:!0,reject:!1})).exitCode!==0)throw Error("Failed to delete keychain entry")}}function e0(Z){return Z.slice(-20)}var p5=B(()=>{u5();I2()});function J9(Z){return Z?.name==="CredentialsProviderError"}function m5(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 y2(){let{STSClient:Z,GetCallerIdentityCommand:$}=await import("@aws-sdk/client-sts");await new Z().send(new $({}))}async function c5(){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 d5=B(()=>{j0()});class S{static instance=null;status={isAuthenticating:!1,output:[]};changed=$0();static getInstance(){if(!S.instance)S.instance=new S;return S.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(S.instance)S.instance.changed.clear(),S.instance=null}}var t5=B(()=>{n5()});var Z2="claude-code-20250219",i5="interleaved-thinking-2025-05-14",P0="context-1m-2025-08-07",l5="context-management-2025-06-27",a5="structured-outputs-2025-12-15",T2="web-search-2025-03-05",s5="advanced-tool-use-2025-11-20",o5="tool-search-tool-2025-10-19",V9="effort-2025-11-24",q9="task-budgets-2026-03-13",r5="prompt-caching-scope-2026-01-05",W9="fast-mode-2026-02-01",e5="redact-thinking-2026-02-12",Z1="token-efficient-tools-2026-03-28",z9="afk-mode-2026-01-31",G9="advisor-tool-2026-03-01",C2,j9;var S2=B(()=>{C2=new Set(["interleaved-thinking-2025-05-14","context-1m-2025-08-07","tool-search-tool-2025-10-19"]),j9=new Set(["claude-code-20250219","interleaved-thinking-2025-05-14","context-management-2025-06-27"])});function A(){if(q()!=="firstParty")return!1;return!L(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)}function V1(){if(!A())return!1;return $8()===null}function Z8(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 $8(){if(q()!=="firstParty")return"Fast mode is not available on third-party providers";if(!A())return"Fast mode is not available";let Z=k0("tengu_penguins_off",null);if(Z!==null)return z(`Fast mode unavailable: ${Z}`),Z;if(!Y1()&&k0("tengu_marble_sandcastle",!1))return"Fast mode requires the native binary · Install from: https://claude.com/product/claude-code";if(f()&&$2()&&!J1()){if(!b("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(k.status==="disabled"){if(k.reason==="network_error"||k.reason==="unknown"){if(L(process.env.CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS))return null}let $=w()!==null?"oauth":"api-key",J=Z8(k.reason,$);return z(`Fast mode unavailable: ${J}`),J}return null}function v9(){return"opus"+(I0()?"[1m]":"")}function I9(Z){if(!A())return!1;if(!V1())return!1;if(!q1(Z))return!1;let $=e();if($.fastModePerSessionOptIn)return!1;return $.fastMode===!0}function q1(Z){if(!A())return!1;let $=Z??v0(),J=T($).toLowerCase();return J.includes("opus-4-7")||J.includes("opus-4-6")}function J8(){if(B0.status==="cooldown"&&Date.now()>=B0.resetAt){if(A()&&!M2)z("Fast mode cooldown expired, re-enabling fast mode"),M2=!0,z1.emit();B0={status:"active"}}return B0}function C9(Z,$){if(!A())return;B0={status:"cooldown",resetAt:Z,reason:$},M2=!1;let J=Z-Date.now();z(`Fast mode cooldown triggered (${$}), duration ${Math.round(J/1000)}s`),j("tengu_fast_mode_fallback_triggered",{cooldown_duration_ms:J,cooldown_reason:$}),W1.emit(Z,$)}function S9(){B0={status:"active"}}function M9(){if(k.status==="disabled")return;k={status:"disabled",reason:"preference"},Q2("userSettings",{fastMode:void 0}),M((Z)=>({...Z,penguinModeOrgEnabled:!1})),A2.emit(!1)}function Q8(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 X8(Z){return Z==="org_level_disabled_until"||Z==="out_of_credits"}function h9(Z){let $=Q8(Z);if(z(`Fast mode overage rejection: ${Z??"unknown"} — ${$}`),j("tengu_fast_mode_overage_rejected",{overage_disabled_reason:Z??"unknown"}),!X8(Z))Q2("userSettings",{fastMode:void 0}),M((J)=>({...J,penguinModeOrgEnabled:!1}));G1.emit($)}function Y8(){return J8().status==="cooldown"}function f9(Z,$){let J=A()&&V1()&&!!$&&q1(Z);if(J&&Y8())return"cooldown";if(J)return"on";return"off"}async function V8(Z){let $=`${N().BASE_API_URL}/api/claude_code_penguin_mode`,J="accessToken"in Z?{Authorization:`Bearer ${Z.accessToken}`,"anthropic-beta":z0}:{"x-api-key":Z.apiKey};return(await O.get($,{headers:J})).data}function g9(){if(!A())return;if(k.status!=="pending")return;k=F().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"unknown"}}async function p9(){if(X1())return;if(!A())return;if(E0)return z("Fast mode prefetch in progress, returning in-flight promise"),E0;let Z=Z0();if(!(w()?.accessToken&&J0())&&!Z){k=F().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"preference"};return}let J=Date.now();if(J-$1<q8){z("Skipping fast mode prefetch, fetched recently");return}$1=J;let Q=async()=>{let Y=w(),V=Y?.accessToken&&J0()?{accessToken:Y.accessToken}:Z?{apiKey:Z}:null;if(!V)throw Error("No auth available");return V8(V)};async function X(){try{let Y;try{Y=await Q()}catch(W){if(O.isAxiosError(W)&&(W.response?.status===401||W.response?.status===403&&typeof W.response?.data==="string"&&W.response.data.includes("OAuth token has been revoked"))){let x=w()?.accessToken;if(x)await h2(x),Y=await Q();else throw W}else throw W}let V=k.status!=="pending"?k.status==="enabled":F().penguinModeOrgEnabled;if(k=Y.enabled?{status:"enabled"}:{status:"disabled",reason:Y.disabled_reason??"preference"},V!==Y.enabled){if(!Y.enabled)Q2("userSettings",{fastMode:void 0});M((W)=>({...W,penguinModeOrgEnabled:Y.enabled})),A2.emit(Y.enabled)}z(`Org fast mode: ${Y.enabled?"enabled":`disabled (${Y.disabled_reason??"preference"})`}`)}catch(Y){k=F().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"network_error"},z(`Failed to fetch org fast mode status, defaulting to ${k.status==="enabled"?"enabled (cached)":"disabled (network_error)"}: ${Y}`,{level:"error"}),j("tengu_org_penguin_mode_fetch_failed",{})}finally{E0=null}}return E0=X(),E0}var k9="Opus 4.7",B0,M2=!1,W1,z1,y9,T9,G1,A9,k,A2,u9,q8=30000,$1=0,E0=null;var j1=B(()=>{s0();b0();Q1();r();J2();n();e4();W0();j0();g();H0();t();r4();q0();n5();B0={status:"active"},W1=$0(),z1=$0(),y9=W1.subscribe,T9=z1.subscribe;G1=$0(),A9=G1.subscribe;k={status:"pending"},A2=$0(),u9=A2.subscribe});function B8(Z){for(let $ of x8)if($.pattern.test(Z))return $.cost;return}function f2(Z){if(A()&&Z)return W8;return T0}function H8(Z,$){return $.input_tokens/1e6*Z.inputTokens+$.output_tokens/1e6*Z.outputTokens+($.cache_read_input_tokens??0)/1e6*Z.promptCacheReadTokens+($.cache_creation_input_tokens??0)/1e6*Z.promptCacheWriteTokens+($.server_tool_use?.web_search_requests??0)*Z.webSearchRequests}function R8(Z,$){let J=P(Z);if(J===_(d0.firstParty)||J===_(n0.firstParty)){let X=$.speed==="fast";return f2(X)}let Q=B1[J];if(!Q){let X=B8(Z);if(X)return X;return w8(Z,J),B1[P(v0())]??j8}return Q}function w8(Z,$){j("tengu_unknown_model_cost",{model:Z,shortName:$}),R1()}function F8(Z,$){let J=R8(Z,$);return H8(J,$)}function l9(Z,$){let J={input_tokens:$.inputTokens,output_tokens:$.outputTokens,cache_read_input_tokens:$.cacheReadInputTokens,cache_creation_input_tokens:$.cacheCreationInputTokens};return F8(Z,J)}function H1(Z){if(Number.isInteger(Z))return`$${Z}`;return`$${Z.toFixed(2)}`}function w1(Z){return`${H1(Z.inputTokens)}/${H1(Z.outputTokens)} per Mtok`}var y0,x1,T0,W8,z8,G8,j8,x8,B1;var F1=B(()=>{J2();r();j1();P2();H0();y0={inputTokens:3,outputTokens:15,promptCacheWriteTokens:3.75,promptCacheReadTokens:0.3,webSearchRequests:0.01},x1={inputTokens:15,outputTokens:75,promptCacheWriteTokens:18.75,promptCacheReadTokens:1.5,webSearchRequests:0.01},T0={inputTokens:5,outputTokens:25,promptCacheWriteTokens:6.25,promptCacheReadTokens:0.5,webSearchRequests:0.01},W8={inputTokens:30,outputTokens:150,promptCacheWriteTokens:37.5,promptCacheReadTokens:3,webSearchRequests:0.01},z8={inputTokens:0.8,outputTokens:4,promptCacheWriteTokens:1,promptCacheReadTokens:0.08,webSearchRequests:0.01},G8={inputTokens:1,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.1,webSearchRequests:0.01},j8=T0,x8=[{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}}];B1={[_(L2.firstParty)]:z8,[_(K2.firstParty)]:G8,[_(F2.firstParty)]:y0,[_(w2.firstParty)]:y0,[_(D2.firstParty)]:y0,[_(N2.firstParty)]:y0,[_(b2.firstParty)]:y0,[_(U2.firstParty)]:x1,[_(O2.firstParty)]:x1,[_(_2.firstParty)]:T0,[_(d0.firstParty)]:T0,[_(n0.firstParty)]:T0}});function m(Z){return L8.includes(Z)}function R0(Z){return K8.includes(Z)}var L8,K8;var u2=B(()=>{L8=["sonnet","opus","haiku","best","sonnet[1m]","opus[1m]","opusplan"];K8=["sonnet","opus","haiku"]});function D8(Z,$){if(Z.includes($))return!0;if(m(Z))return T(Z).toLowerCase().includes($);return!1}function L1(Z,$){if(!Z.startsWith($))return!1;return Z.length===$.length||Z[$.length]==="-"}function N8(Z,$){let J=m(Z)?T(Z).toLowerCase():Z;if(L1(J,$))return!0;if(!$.startsWith("claude-")&&L1(J,`claude-${$}`))return!0;return!1}function K1(Z,$){for(let J of $){if(R0(J))continue;let Q=J.indexOf(Z);if(Q===-1)continue;let X=Q+Z.length;if(X===J.length||J[X]==="-")return!0}return!1}function D1(Z){let $=C()||{},{availableModels:J}=$;if(!J)return!0;if(J.length===0)return!1;let X=l0(Z).trim().toLowerCase(),Y=J.map((V)=>V.trim().toLowerCase());if(Y.includes(X)){if(!R0(X)||!K1(X,Y))return!0}for(let V of Y)if(R0(V)&&!K1(V,Y)&&D8(X,V))return!0;if(m(X)){let V=T(X).toLowerCase();if(Y.includes(V))return!0}for(let V of Y)if(!R0(V)&&m(V)){if(T(V).toLowerCase()===X)return!0}for(let V of Y)if(!R0(V)&&!m(V)){if(N8(X,V))return!0}return!1}var N1=B(()=>{q0();u2();H0();a0()});function J$(){return Object.values(U1)}var U1,g2;var O1=B(()=>{U1={"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}}},g2=Object.fromEntries(Object.values(U1).map((Z)=>[Z.id,Z.name]))});function m2(Z){if(typeof Z!=="string")return;let $=Z.trim();return $.length>0?$:void 0}function F0(){let Z=D();if(!Z?.model)return;return k1(Z.model)}function K$(){if(process.env.ANTHROPIC_SMALL_FAST_MODEL)return process.env.ANTHROPIC_SMALL_FAST_MODEL;let Z=F0();if(q()==="gemini")return Z||"gemini-2.0-flash-lite";if(q()==="mistral")return Z||"ministral-3b-latest";if(q()==="openai")return Z||"gpt-4o-mini";if(q()==="codex")return Z||"codexspark";if(q()==="github")return Z||"github:copilot";if(q()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.5-highspeed";return v1()}function D$(Z){return Z===H().opus40||Z===H().opus41||Z===H().opus45||Z===H().opus46||Z===H().opus47}function p2(){let Z,$=b1();if($!==void 0)Z=$;else{let J=C()||{},Q=m2(J.model);Z=F0()||Q||void 0}if(Z&&!D1(Z))return;return Z}function N$(){let Z=p2();if(Z!==void 0&&Z!==null)return T(Z);return I1()}function b8(){return w0()}function w0(){if(process.env.ANTHROPIC_DEFAULT_OPUS_MODEL)return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;let Z=F0();if(q()==="gemini")return Z||"gemini-2.5-pro";if(q()==="mistral")return Z||"devstral-latest";if(q()==="openai")return Z||"gpt-4o";if(q()==="codex")return Z||"gpt-5.5";if(q()==="github")return Z||"github:copilot";if(q()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.7";if(q()!=="firstParty")return H().opus46;return H().opus47}function C0(){if(process.env.ANTHROPIC_DEFAULT_SONNET_MODEL)return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;let Z=F0();if(q()==="gemini")return Z||"gemini-2.0-flash";if(q()==="mistral")return Z||"mistral-medium-latest";if(q()==="openai")return Z||"gpt-4o";if(q()==="codex")return Z||"gpt-5.5";if(q()==="github")return Z||"github:copilot";if(q()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.5";if(q()!=="firstParty")return H().sonnet45;return H().sonnet46}function v1(){if(process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL)return process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;let Z=F0();if(q()==="mistral")return Z||"ministral-3b-latest";if(q()==="openai")return Z||"gpt-4o-mini";if(q()==="codex")return Z||"gpt-5.5";if(q()==="github")return Z||"github:copilot";if(q()==="gemini")return Z||"gemini-2.0-flash-lite";if(q()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.5-highspeed";return H().haiku45}function U$(Z){let{permissionMode:$,mainLoopModel:J,exceeds200kTokens:Q=!1}=Z;if(p2()==="opusplan"&&$==="plan"&&!Q)return w0();if(p2()==="haiku"&&$==="plan")return C0();return J}function v0(){let Z=F0();if(q()==="github"){let $=C()||{};return m2($.model)||Z||"github:copilot"}if(q()==="gemini")return Z||"gemini-2.0-flash";if(q()==="mistral")return Z||"devstral-latest";if(q()==="openai")return Z||"gpt-4o";if(q()==="codex")return Z||"gpt-5.5";if(X2())return w0()+(I0()?"[1m]":"");if(Y2())return w0()+(I0()?"[1m]":"");return C0()}function I1(){return T(v0())}function _(Z){if(Z=Z.toLowerCase(),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-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 P(Z){return _(l0(Z))}function P8(Z=!1){if(X2()||Y2()){if(I0())return`Opus 4.7 with 1M context · Most capable for complex work${Z?_1(!0):""}`;return`Opus 4.7 · Most capable for complex work${Z?_1(!0):""}`}return"Sonnet 4.6 · Best for everyday tasks"}function O$(Z){if(Z==="opusplan")return"Opus 4.7 in plan mode, else Sonnet 4.6";return T1(T(Z))}function _1(Z){if(q()!=="firstParty")return"";let $=w1(f2(Z));return` ·${Z?` (${P1})`:""} ${$}`}function I0(){if(L0()||n2()||q()!=="firstParty")return!1;if(U()&&v()===null)return!1;return!0}function _$(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 E1(Z);return T1(Z)}function y1(Z){if(q()==="openai"||q()==="gemini"||q()==="codex"||q()==="github"){if(g2[Z])return g2[Z];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 H().opus47:return"Opus 4.7";case H().opus47+"[1m]":return"Opus 4.7 (1M context)";case H().opus46:return"Opus 4.6";case H().opus46+"[1m]":return"Opus 4.6 (1M context)";case H().opus45:return"Opus 4.5";case H().opus41:return"Opus 4.1";case H().opus40:return"Opus 4";case H().sonnet46+"[1m]":return"Sonnet 4.6 (1M context)";case H().sonnet46:return"Sonnet 4.6";case H().sonnet45+"[1m]":return"Sonnet 4.5 (1M context)";case H().sonnet45:return"Sonnet 4.5";case H().sonnet40:return"Sonnet 4";case H().sonnet40+"[1m]":return"Sonnet 4 (1M context)";case H().sonnet37:return"Sonnet 3.7";case H().sonnet35:return"Sonnet 3.5";case H().haiku45:return"Haiku 4.5";case H().haiku35:return"Haiku 3.5";default:return null}}function T1(Z){let $=y1(Z);if($)return $;if(Z==="github:copilot")return"GPT-4o";return Z}function b$(Z){let $=y1(Z);if($)return`Claude ${$}`;return`Claude (${Z})`}function T(Z){let $=m2(Z);if(!$)return C0();let J=$.toLowerCase(),Q=l(J),X=Q?J.replace(/\[1m]$/i,"").trim():J;if(m(X))switch(X){case"opusplan":return C0()+(Q?"[1m]":"");case"sonnet":return C0()+(Q?"[1m]":"");case"haiku":return v1()+(Q?"[1m]":"");case"opus":return w0()+(Q?"[1m]":"");case"best":return b8();default:}if(X==="codexplan")return"gpt-5.5";if(X==="codexspark")return"gpt-5.3-codex-spark";if(q()==="firstParty"&&k8(X)&&v8())return w0()+(Q?"[1m]":"");if(Q)return $.replace(/\[1m\]$/i,"").trim()+"[1m]";return $}function P$(Z,$){if(l(Z)||!l($))return Z;if(c2(T(Z)))return Z+"[1m]";return Z}function k8(Z){return E8.includes(Z)}function v8(){return!L(process.env.CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP)}function E$(Z){if(Z===null){if(U())return`Default (${P8()})`;return`Default (${I1()})`}let $=T(Z);return Z===$?$:`${Z} (${$})`}function k$(Z){if(q()==="foundry")return;let $=Z.toLowerCase().includes("[1m]"),J=P(Z);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-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 v$(Z){return Z.replace(/\[(1|2)m\]/gi,"")}var E8;var H0=B(()=>{r();V0();n();d2();g();_8();a0();F1();q0();t();U8();N1();u2();O8();O1();E8=["claude-opus-4-20250514","claude-opus-4-1-20250805","claude-opus-4-0","claude-opus-4-1"]});function t2(Z){return}async function y$(){}var C1=()=>{};var p1={};S1(p1,{prefetchOpenAICompatibleModels:()=>p8,getDiscoveredContextWindow:()=>T8,discoverOpenAICompatibleModelOptions:()=>g1});function T8(Z){return f1.get(Z)}function C8(){return(D()?.baseUrl??"https://api.openai.com/v1").replace(/\/+$/,"")}function u1(Z){try{let $=new URL(Z).hostname.toLowerCase();return $.endsWith(".openai.azure.com")||$.endsWith(".cognitiveservices.azure.com")}catch{return!1}}function S8(Z){try{return new URL(Z).hostname.toLowerCase().includes("bankr")}catch{return!1}}function M8(Z){let $=D()?.apiKey?.trim();if(!$)return{};if(S8(Z))return{"X-API-Key":$};let J={Authorization:`Bearer ${$}`};if(u1(Z))J["api-key"]=$;return J}function A8(Z){let $=Z.endsWith("/v1")?`${Z}/models`:`${Z}/v1/models`,J=`${Z}/models`,Q=process.env.OPENAI_API_VERSION?.trim(),X=Q&&u1(Z)?(Y)=>{try{let V=new URL(Y);return V.searchParams.set("api-version",Q),V.toString()}catch{return Y}}:(Y)=>Y;if($===J)return[X($)];return[X($),X(J)]}function h8(Z){try{let $=new URL(Z),J=$.pathname.replace(/\/+$/,""),X=`${J.endsWith("/v1")?J.slice(0,-3):J}/api/tags`.replace(/\/{2,}/g,"/");return`${$.origin}${X}`}catch{return null}}function f8(Z){if(Z>=1e6)return`${Z/1e6}M ctx`;if(Z>=1000)return`${Math.round(Z/1000)}K ctx`;return`${Z} ctx`}async function u8(Z,$){let J=new Set;for(let Q of Z)try{let X=await O.get(Q,{headers:$,timeout:h1}),Y=[];for(let V of X.data?.data??[]){let W=V.id?.trim();if(!W||J.has(W))continue;J.add(W);let G=V.name?.trim()||W,x=V.context_length??null;if(x&&x>0)f1.set(W,x);let R=x?` · ${f8(x)}`:"";Y.push({value:W,label:G,description:`${W}${R}`})}if(Y.length>0)return Y.sort((V,W)=>{let G=String(V.value).split("/")[0]??"",x=String(W.value).split("/")[0]??"",R=G.localeCompare(x);return R!==0?R:String(V.value).localeCompare(String(W.value))}),Y}catch{z(`[ModelDiscovery] Failed to fetch OpenAI models from ${Q}`)}return[]}async function g8(Z,$){try{let J=await O.get(Z,{headers:$,timeout:h1}),Q=new Set;return(J.data?.models??[]).map((X)=>X.name?.trim()??"").filter((X)=>{if(!X||Q.has(X))return!1;return Q.add(X),!0}).map((X)=>({value:X,label:X,description:"Ollama model"}))}catch{return z(`[ModelDiscovery] Failed to fetch Ollama models from ${Z}`),[]}}async function g1(){if(q()!=="openai")return[];let Z=C8(),$=M8(Z),J=await u8(A8(Z),$);if(J.length>0)return J;let Q=h8(Z);if(Q)return g8(Q,$);return[]}function p8(){if(S0)return S0;return S0=(async()=>{if(!A1()?.startsWith("openai:"))return;try{let $=await g1();if($.length>0)M1($)}catch{}finally{S0=null}})(),S0}var h1=5000,f1,S0=null;var m1=B(()=>{s0();V0();y8();j0();t();I8();f1=new Map});function d1(Z,$,J){let Q=D()?.model?.trim();if(Q&&Q!==J){let Y=`${Q}:${J}`;if($[Y]!==void 0)return $[Y];if(Z[Y]!==void 0)return Z[Y]}let X=c1($,J);if(X!==void 0)return X;return c1(Z,J)}function c1(Z,$){if(Z[$]!==void 0)return Z[$];let J=Object.keys(Z).sort((Q,X)=>X.length-Q.length);for(let Q of J)if($.startsWith(Q))return Z[Q];return}function n1(Z){let $=d1(c8,n8,Z);if($!==void 0)return $;try{let{getDiscoveredContextWindow:J}=(m1(),m8(p1));return J(Z)}catch{return}}function t1(Z){return d1(d8,t8,Z)}var c8,d8,n8,t8;var i1=B(()=>{V0();c8={"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,"gpt-5.5":1050000,"gpt-5.5-mini":400000,"gpt-5.5-nano":400000,"gpt-5.4":1050000,"gpt-5.4-mini":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,"kimi-for-coding":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},d8={"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,"gpt-5.5":128000,"gpt-5.5-mini":128000,"gpt-5.5-nano":128000,"gpt-5.4":128000,"gpt-5.4-mini":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,"kimi-for-coding":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},n8=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_CONTEXT_WINDOWS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})(),t8=(()=>{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 l1(){let Z=D()?.transport;return Z==="openai_compat"||Z==="gemini"||Z==="mistral"||Z==="github_copilot"||Z==="codex_responses"}function L0(){return L(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)}function l(Z){if(L0())return!1;return/\[1m\]/i.test(Z)}function c2(Z){if(L0())return!1;let $=P(Z);return $.includes("claude-sonnet-4")||$.includes("opus-4-6")||$.includes("opus-4-7")}function o$(Z,$){if(l(Z))return 1e6;if(l1()){let Q=n1(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."),i8}let J=t2(Z);if(J?.max_input_tokens&&J.max_input_tokens>=1e5){if(J.max_input_tokens>i2&&L0())return i2;return J.max_input_tokens}if($?.includes(P0)&&c2(Z))return 1e6;if(s8(Z))return 1e6;return i2}function s8(Z){if(L0())return!1;if(l(Z))return!1;if(!P(Z).includes("sonnet-4-6"))return!1;return F().clientDataCache?.coral_reef_sonnet==="true"}function r$(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),X=Math.min(100,Math.max(0,Q));return{used:X,remaining:100-X}}function o8(Z){let $,J;if(l1()){let Y=t1(Z);if(Y!==void 0)return{default:Y,upperLimit:Y}}let Q=P(Z);if(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 $=l8,J=a8;let X=t2(Z);if(X?.max_tokens&&X.max_tokens>=4096)J=X.max_tokens,$=Math.min($,J);return{default:$,upperLimit:J}}function e$(Z){return o8(Z).upperLimit-1}var i2=200000,i8,l$=20000,l8=32000,a8=64000,a$=8000,s$=64000;var d2=B(()=>{S2();V0();W0();g();H0();C1();i1();i8=(()=>{let Z=parseInt(process.env.CLAUDE_CODE_OPENAI_FALLBACK_CONTEXT_WINDOW??"",10);return!isNaN(Z)&&Z>0?Z:128000})()});var r8,a1;var s1=B(()=>{m0();t();r8=[{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"}],a1=y((Z,$)=>{if(q()==="firstParty")return;let J=Z.toLowerCase();for(let Q of r8){let X=process.env[Q.modelEnvVar],Y=process.env[Q.capabilitiesEnvVar];if(!X||Y===void 0)continue;if(J!==X.toLowerCase())continue;return Y.toLowerCase().split(",").map((V)=>V.trim()).includes($)}return},(Z,$)=>`${Z.toLowerCase()}:${$}`)});function e8(Z){let $=[],J=[];for(let Q of Z)if($4.includes(Q))$.push(Q);else J.push(Q);return{allowed:$,disallowed:J}}function FJ(Z){if(!Z||Z.length===0)return;if(U()){console.warn("Warning: Custom betas are only available for API key users. Ignoring provided betas.");return}let{allowed:$,disallowed:J}=e8(Z);for(let Q of J)console.warn(`Warning: Beta header '${Q}' is not allowed. Only the following betas are supported: ${$4.join(", ")}`);return $.length>0?$:void 0}function o1(Z){let $=a1(Z,"interleaved_thinking");if($!==void 0)return $;let J=P(Z),Q=q();if(Q==="foundry")return!0;if(Q==="firstParty")return!J.includes("claude-3-");return J.includes("claude-opus-4")||J.includes("claude-sonnet-4")}function ZZ(Z){let $=P(Z);return $.includes("claude-opus-4")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function $Z(Z){let $=P(Z),J=q();if(J==="foundry")return!0;if(J==="firstParty")return!$.includes("claude-3-");return $.includes("claude-opus-4")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function JZ(Z){let $=P(Z),J=q();if(J!=="firstParty"&&J!=="foundry")return!1;return $.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-haiku-4-5")}function LJ(Z){let $=P(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 KJ(){let Z=q();if(Z==="vertex"||Z==="bedrock")return o5;return s5}function r1(){return(q()==="firstParty"||q()==="foundry")&&!L(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function DJ(){return q()==="firstParty"&&!L(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function NJ(Z,$){let J=[...J4(Z)];if($?.isAgenticQuery){if(!J.includes(Z2))J.push(Z2)}let Q=e1();if(!Q||Q.length===0)return J;return[...J,...Q.filter((X)=>!J.includes(X))]}function Q4(){l2.cache?.clear?.(),J4.cache?.clear?.(),QZ.cache?.clear?.()}var $4,l2,J4,QZ;var X4=B(()=>{m0();Q1();r();S2();b0();n();d2();g();H0();s1();t();q0();$4=[P0];l2=y((Z)=>{let $=[],J=P(Z).includes("haiku"),Q=q(),X=r1();if(!J)$.push(Z2);if(U())$.push(z0);if(l(Z))$.push(P0);if(!L(process.env.DISABLE_INTERLEAVED_THINKING)&&o1(Z))$.push(i5);if(X&&o1(Z)&&!f()&&e().showThinkingSummaries!==!0)$.push(e5);let Y=$Z(Z);if(r1()&&Y)$.push(l5);let V=Z4("tengu_tool_pear"),W=!V&&(L(process.env.CLAUDE_CODE_JSON_TOOL_USE)||k0("tengu_amber_json_tools",!1));if(X&&JZ(Z)&&V)$.push(a5);if(X&&W)$.push(Z1);if(Q==="vertex"&&ZZ(Z))$.push(T2);if(Q==="foundry")$.push(T2);if(X)$.push(r5);if(process.env.ANTHROPIC_BETAS)$.push(...process.env.ANTHROPIC_BETAS.split(",").map((G)=>G.trim()).filter(Boolean));return $}),J4=y((Z)=>{let $=l2(Z);if(q()==="bedrock")return $.filter((J)=>!C2.has(J));return $}),QZ=y((Z)=>{return l2(Z).filter((J)=>C2.has(J))})});import{execFile as XZ}from"child_process";function Y4(Z){return new Promise(($)=>{XZ("security",["find-generic-password","-a",q2(),"-w","-s",Z],{encoding:"utf-8",timeout:YZ},(J,Q)=>{$({stdout:J?null:Q?.trim()||null,timedOut:Boolean(J&&"killed"in J&&J.killed)})})})}function PJ(){if(process.platform!=="darwin"||V2||u())return;let Z=Y4(i(V4)),$=Y4(i());V2=Promise.all([Z,$]).then(([J,Q])=>{if(!J.timedOut)q4(J.stdout);if(!Q.timedOut)a2={stdout:Q.stdout}})}async function EJ(){if(V2)await V2}function W4(){return a2}function s2(){a2=null}var YZ=1e4,a2=null,V2=null;var z4=B(()=>{g();I2()});function o2(Z,$,J){return new Promise((Q,X)=>{if($?.aborted){if(J?.throwOnAbort||J?.abortError)X(J.abortError?.()??Error("aborted"));else Q();return}let Y=setTimeout((W,G,x)=>{W?.removeEventListener("abort",G),x()},Z,$,V,Q);function V(){if(clearTimeout(Y),J?.throwOnAbort||J?.abortError)X(J.abortError?.()??Error("aborted"));else Q()}if($?.addEventListener("abort",V,{once:!0}),J?.unref)Y.unref()})}var G4=()=>{};function IJ(){return j4}function x4(){j4.clear()}var j4;var B4=B(()=>{j4=new Map});var aZ={};S1(aZ,{validateForceLoginOrg:()=>lZ,saveOAuthTokensIfNeeded:()=>I4,saveApiKey:()=>x5,removeApiKey:()=>MZ,refreshGcpCredentialsIfNeeded:()=>j5,refreshGcpAuth:()=>k4,refreshAwsAuth:()=>P4,refreshAndGetAwsCredentials:()=>X0,prefetchGcpCredentialsIfSafe:()=>yZ,prefetchAwsCredentialsAndBedRockInfoIfSafe:()=>TZ,prefetchApiKeyFromApiKeyHelperIfSafe:()=>DZ,isUsing3PServices:()=>j2,isTeamSubscriber:()=>pZ,isTeamPremiumSubscriber:()=>Y2,isProSubscriber:()=>n2,isOverageProvisioningAllowed:()=>uZ,isOtelHeadersHelperFromProjectOrLocalSettings:()=>S4,isMaxSubscriber:()=>X2,isGcpAuthRefreshFromProjectSettings:()=>G5,isEnterpriseSubscriber:()=>mZ,isCustomApiKeyApproved:()=>SZ,isConsumerSubscriber:()=>tZ,isClaudeAISubscriber:()=>U,isAwsCredentialExportFromProjectSettings:()=>W5,isAwsAuthRefreshFromProjectSettings:()=>V5,isAnthropicAuthEnabled:()=>U0,is1PApiCustomer:()=>fZ,hasProfileScope:()=>J0,hasOpusAccess:()=>gZ,hasAnthropicApiKeyAuth:()=>wZ,handleOAuth401Error:()=>h2,getSubscriptionType:()=>v,getSubscriptionName:()=>T4,getRateLimitTier:()=>y4,getOtelHeadersFromHelper:()=>dZ,getOauthAccountInfo:()=>G2,getConfiguredApiKeyHelper:()=>a,getClaudeAIOAuthTokensAsync:()=>h0,getClaudeAIOAuthTokens:()=>w,getAuthTokenSource:()=>_0,getApiKeyHelperElapsedMs:()=>FZ,getApiKeyFromConfigOrMacOSKeychain:()=>B2,getApiKeyFromApiKeyHelperCached:()=>e2,getApiKeyFromApiKeyHelper:()=>b4,getAnthropicApiKeyWithSource:()=>u0,getAnthropicApiKey:()=>Z0,getAccountInformation:()=>iZ,clearOAuthTokenCache:()=>B5,clearGcpCredentialsCache:()=>IZ,clearAwsCredentialsCache:()=>bZ,clearApiKeyHelperCache:()=>KZ,checkGcpCredentialsValid:()=>E4,checkAndRefreshOAuthTokenIfNeeded:()=>g0,calculateApiKeyHelperTTL:()=>_4});import{exec as U4}from"child_process";import{mkdir as xZ,stat as BZ}from"fs/promises";import{join as HZ}from"path";function z2(){return L(process.env.CLAUDE_CODE_REMOTE)||process.env.CLAUDE_CODE_ENTRYPOINT==="claude-desktop"}function U0(){if(u())return!1;if(process.env.ANTHROPIC_UNIX_SOCKET)return!!process.env.CLAUDE_CODE_OAUTH_TOKEN;let Z=j2(),J=(C()||{}).apiKeyHelper,Q=process.env.ANTHROPIC_AUTH_TOKEN||J||process.env.CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR,X;try{({source:X}=u0({skipRetrievingKeyFromApiKeyHelper:!0}))}catch{X="none"}let Y=X==="ANTHROPIC_API_KEY"||X==="apiKeyHelper";return!(Z||Q&&!z2()||Y&&!z2())}function _0(){if(u()){if(a())return{source:"apiKeyHelper",hasToken:!0};return{source:"none",hasToken:!1}}if(process.env.ANTHROPIC_AUTH_TOKEN&&!z2())return{source:"ANTHROPIC_AUTH_TOKEN",hasToken:!0};if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{source:"CLAUDE_CODE_OAUTH_TOKEN",hasToken:!0};if(r0()){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(a()&&!z2())return{source:"apiKeyHelper",hasToken:!0};let J=w();if(N0(J?.scopes)&&J?.accessToken)return{source:"claude.ai",hasToken:!0};return{source:"none",hasToken:!1}}function Z0(){let{key:Z}=u0();return Z}function wZ(){try{let{key:Z,source:$}=u0({skipRetrievingKeyFromApiKeyHelper:!0});return Z!==null&&$!=="none"}catch{return!1}}function u0(Z={}){let $=(()=>{let V=D();if(V?.transport!=="anthropic")return;let W=V.apiKey?.trim();return W&&W.length>0?W:void 0})();if(u()){if($)return{key:$,source:"ANTHROPIC_API_KEY"};if(a())return{key:Z.skipRetrievingKeyFromApiKeyHelper?null:e2(),source:"apiKeyHelper"};return{key:null,source:"none"}}let J=F4()?void 0:$;if($2()&&J)return{key:J,source:"ANTHROPIC_API_KEY"};if(L(process.env.CI)){let V=v2();if(V)return{key:V,source:"ANTHROPIC_API_KEY"};if(!j2()&&!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&&!j2())return{key:J,source:"ANTHROPIC_API_KEY"};return{key:null,source:"none"}}if(J&&F().customApiKeyResponses?.approved?.includes(e0(J)))return{key:J,source:"ANTHROPIC_API_KEY"};let Q=v2();if(Q)return{key:Q,source:"ANTHROPIC_API_KEY"};if(a()){if(Z.skipRetrievingKeyFromApiKeyHelper)return{key:null,source:"apiKeyHelper"};return{key:e2(),source:"apiKeyHelper"}}let Y=B2();if(Y)return Y;return{key:null,source:"none"}}function a(){if(u())return b("flagSettings")?.apiKeyHelper;return(C()||{}).apiKeyHelper}function O4(){let Z=a();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.apiKeyHelper===Z||J?.apiKeyHelper===Z}function Y5(){return(C()||{}).awsAuthRefresh}function V5(){let Z=Y5();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.awsAuthRefresh===Z||J?.awsAuthRefresh===Z}function q5(){return(C()||{}).awsCredentialExport}function W5(){let Z=q5();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.awsCredentialExport===Z||J?.awsCredentialExport===Z}function _4(){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 RZ}function FZ(){let Z=c?.startedAt;return Z?Date.now()-Z:0}async function b4(Z){if(!a())return null;let $=_4();if(I){if(Date.now()-I.timestamp<$)return I.value;if(!c)c={promise:H4(Z,!1,D0),startedAt:null};return I.value}if(c)return c.promise;return c={promise:H4(Z,!0,D0),startedAt:Date.now()},c.promise}async function H4(Z,$,J){try{let Q=await LZ(Z);if(J!==D0)return Q;if(Q!==null)I={value:Q,timestamp:Date.now()};return Q}catch(Q){if(J!==D0)return" ";let X=Q instanceof Error?Q.message:String(Q);if(console.error(h.red(`apiKeyHelper failed: ${X}`)),z(`Error getting API key from apiKeyHelper: ${X}`,{level:"error"}),!$&&I&&I.value!==" ")return I={...I,timestamp:Date.now()},I.value;return I={value:" ",timestamp:Date.now()}," "}finally{if(J===D0)c=null}}async function LZ(Z){let $=a();if(!$)return null;if(O4()){if(!d()&&!Z){let Y=Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return f0("apiKeyHelper invoked before trust check",Y),j("tengu_apiKeyHelper_missing_trust11",{}),null}}let J=await x0($,{shell:!0,timeout:600000,reject:!1});if(J.failed){let X=J.timedOut?"timed out":`exited ${J.exitCode}`,Y=J.stderr?.trim();throw Error(Y?`${X}: ${Y}`:X)}let Q=J.stdout?.trim();if(!Q)throw Error("did not return a value");return Q}function e2(){return I?.value??null}function KZ(){D0++,I=null,c=null}function DZ(Z){if(O4()&&!d())return;b4(Z)}async function UZ(){let Z=Y5();if(!Z)return!1;if(V5()){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 f0("awsAuthRefresh invoked before trust check",J),j("tengu_awsAuthRefresh_missing_trust",{}),!1}}try{return z("Fetching AWS caller identity for AWS auth refresh command"),await y2(),z("Fetched AWS caller identity, skipping AWS auth refresh command"),!1}catch{return P4(Z)}}function P4(Z){z("Running AWS auth refresh command");let $=S.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=U4(Z,{timeout:OZ});Q.stdout.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.addOutput(Y),z(Y,{level:"debug"})}),Q.stderr.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.setError(Y),z(Y,{level:"error"})}),Q.on("close",(X,Y)=>{if(X===0)z("AWS auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let W=Y==="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 ~/.claudio/config.json):");console.error(W),$.endAuthentication(!1),J(!1)}})})}async function _Z(){let Z=q5();if(!Z)return null;if(W5()){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 f0("awsCredentialExport invoked before trust check",J),j("tengu_awsCredentialExport_missing_trust",{}),null}}try{return z("Fetching AWS caller identity for credential export command"),await y2(),z("Fetched AWS caller identity, skipping AWS credential export command"),null}catch{try{z("Running AWS credential export command");let $=await x0(Z,{shell:!0,reject:!1});if($.exitCode!==0||!$.stdout)throw Error("awsCredentialExport did not return a valid value");let J=J5($.stdout.trim());if(!m5(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 ~/.claudio/config.json):");if($ instanceof Error)console.error(J,$.message);else console.error(J,$);return null}}}function bZ(){X0.cache.clear()}function z5(){return(C()||{}).gcpAuthRefresh}function G5(){let Z=z5();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.gcpAuthRefresh===Z||J?.gcpAuthRefresh===Z}async function E4(){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=o2(PZ).then(()=>{throw new M4("GCP credentials check timed out")});return await Promise.race([J,Q]),!0}catch{return!1}}async function kZ(){let Z=z5();if(!Z)return!1;if(G5()){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 f0("gcpAuthRefresh invoked before trust check",J),j("tengu_gcpAuthRefresh_missing_trust",{}),!1}}try{if(z("Checking GCP credentials validity for auth refresh"),await E4())return z("GCP credentials are valid, skipping auth refresh command"),!1}catch{}return k4(Z)}function k4(Z){z("Running GCP auth refresh command");let $=S.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=U4(Z,{timeout:vZ});Q.stdout.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.addOutput(Y),z(Y,{level:"debug"})}),Q.stderr.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.setError(Y),z(Y,{level:"error"})}),Q.on("close",(X,Y)=>{if(X===0)z("GCP auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let W=Y==="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 ~/.claudio/config.json):");console.error(W),$.endAuthentication(!1),J(!1)}})})}function IZ(){j5.cache.clear()}function yZ(){if(!z5())return;if(G5()){if(!d()&&!f())return}j5()}function TZ(){let Z=Y5(),$=q5();if(!Z&&!$)return;if(V5()||W5()){if(!d()&&!f())return}X0(),H()}function CZ(Z){return/^[a-zA-Z0-9-_]+$/.test(Z)}async function x5(Z){if(!CZ(Z))throw Error("Invalid API key format. API key must contain only alphanumeric characters, dashes, and underscores.");await v4();let $=!1;if(process.platform==="darwin")try{let Q=i(),X=q2(),Y=Buffer.from(Z,"utf-8").toString("hex"),V=`add-generic-password -U -a "${X}" -s "${Q}" -X "${Y}"
|
|
2
|
+
`;await x0("security",["-i"],{input:V,reject:!1}),j("tengu_api_key_saved_to_keychain",{}),$=!0}catch(Q){K(Q),j("tengu_api_key_keychain_error",{error:p(Q)}),j("tengu_api_key_saved_to_config",{})}else j("tengu_api_key_saved_to_config",{});let J=e0(Z);M((Q)=>{let X=Q.customApiKeyResponses?.approved??[];return{...Q,primaryApiKey:$?Q.primaryApiKey:Z,customApiKeyResponses:{...Q.customApiKeyResponses,approved:X.includes(J)?X:[...X,J],rejected:Q.customApiKeyResponses?.rejected??[]}}}),B2.cache.clear?.(),s2()}function SZ(Z){let $=F(),J=e0(Z);return $.customApiKeyResponses?.approved?.includes(J)??!1}async function MZ(){await v4(),M((Z)=>({...Z,primaryApiKey:void 0})),B2.cache.clear?.(),s2()}async function v4(){try{await g5()}catch(Z){K(Z)}}function I4(Z){if(!N0(Z.scopes))return j("tengu_oauth_tokens_not_claude_ai",{}),{success:!0};if(!Z.refreshToken||!Z.expiresAt)return j("tengu_oauth_tokens_inference_only",{}),{success:!0};let $=x2(),J=$.name;try{let Q=$.read()||{},X=Q.claudeAiOauth;Q.claudeAiOauth={accessToken:Z.accessToken,refreshToken:Z.refreshToken,expiresAt:Z.expiresAt,scopes:Z.scopes,subscriptionType:Z.subscriptionType??X?.subscriptionType??null,rateLimitTier:Z.rateLimitTier??X?.rateLimitTier??null};let Y=$.update(Q);if(Y.success)j("tengu_oauth_tokens_saved",{storageBackend:J});else j("tengu_oauth_tokens_save_failed",{storageBackend:J});return w.cache?.clear?.(),Q4(),x4(),Y}catch(Q){return K(Q),j("tengu_oauth_tokens_save_exception",{storageBackend:J,error:p(Q)}),{success:!1,warning:"Failed to save OAuth tokens"}}}function B5(){w.cache?.clear?.(),K0()}async function AZ(){try{let{mtimeMs:Z}=await BZ(HZ($5(),".credentials.json"));if(Z!==R4)R4=Z,B5()}catch{w.cache?.clear?.()}}function h2(Z){let $=r2.get(Z);if($)return $;let J=hZ(Z).finally(()=>{r2.delete(Z)});return r2.set(Z,J),J}async function hZ(Z){B5();let $=await h0();if(!$?.refreshToken)return!1;if($.accessToken!==Z)return j("tengu_oauth_401_recovered_from_keychain",{}),!0;return g0(0,!0)}async function h0(){if(u())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN||r0())return w();try{let J=(await x2().readAsync())?.claudeAiOauth;if(!J?.accessToken)return null;return J}catch(Z){return K(Z),null}}function g0(Z=0,$=!1){if(Z===0&&!$){if(M0)return M0;return M0=Z5(Z,$).finally(()=>{M0=null}),M0}return Z5(Z,$)}async function Z5(Z,$){await AZ();let Q=w();if(!$){if(!Q?.refreshToken||!A0(Q.expiresAt))return!1}if(!Q?.refreshToken)return!1;if(!N0(Q.scopes))return!1;w.cache?.clear?.(),K0();let X=await h0();if(!X?.refreshToken||!A0(X.expiresAt))return!1;let Y=$5();await xZ(Y,{recursive:!0});let V;try{j("tengu_oauth_token_refresh_lock_acquiring",{}),V=await K4(Y),j("tengu_oauth_token_refresh_lock_acquired",{})}catch(W){if(W.code==="ELOCKED"){if(Z<5)return j("tengu_oauth_token_refresh_lock_retry",{retryCount:Z+1}),await o2(1000+Math.random()*1000),Z5(Z+1,$);return j("tengu_oauth_token_refresh_lock_retry_limit_reached",{maxRetries:5}),!1}return K(W),j("tengu_oauth_token_refresh_lock_error",{error:p(W)}),!1}try{w.cache?.clear?.(),K0();let W=await h0();if(!W?.refreshToken||!A0(W.expiresAt))return j("tengu_oauth_token_refresh_race_resolved",{}),!1;j("tengu_oauth_token_refresh_starting",{});let G=await D4(W.refreshToken,{scopes:N0(W.scopes)?void 0:W.scopes});return I4(G),w.cache?.clear?.(),K0(),!0}catch(W){K(W),w.cache?.clear?.(),K0();let G=await h0();if(G&&!A0(G.expiresAt))return j("tengu_oauth_token_refresh_race_recovered",{}),!0;return!1}finally{j("tengu_oauth_token_refresh_lock_releasing",{}),await V(),j("tengu_oauth_token_refresh_lock_released",{})}}function U(){if(!U0())return!1;return N0(w()?.scopes)}function J0(){return w()?.scopes?.includes(L4)??!1}function fZ(){{let Z=D()?.transport;if(Z==="bedrock"||Z==="vertex"||Z==="foundry")return!1}if(U())return!1;return!0}function G2(){return U0()?F().oauthAccount:void 0}function uZ(){let $=G2()?.billingType;if(!U()||!$)return!1;if($!=="stripe_subscription"&&$!=="stripe_subscription_contracted"&&$!=="apple_subscription"&&$!=="google_play_subscription")return!1;return!0}function gZ(){let Z=v();return Z==="max"||Z==="enterprise"||Z==="team"||Z==="pro"||Z===null}function v(){if(k5())return E5();if(!U0())return null;let Z=w();if(!Z)return null;return Z.subscriptionType??null}function X2(){return v()==="max"}function pZ(){return v()==="team"}function Y2(){return v()==="team"&&y4()==="default_claude_max_5x"}function mZ(){return v()==="enterprise"}function n2(){return v()==="pro"}function y4(){if(!U0())return null;let Z=w();if(!Z)return null;return Z.rateLimitTier??null}function T4(){switch(v()){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 j2(){let Z=D()?.transport;if(!Z)return!1;return Z!=="anthropic"}function C4(){return(C()||{}).otelHeadersHelper}function S4(){let Z=C4();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.otelHeadersHelper===Z||J?.otelHeadersHelper===Z}function dZ(){let Z=C4();if(!Z)return{};let $=parseInt(process.env.CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS||cZ.toString());if(W2&&Date.now()-w4<$)return W2;if(S4()){if(!d())return{}}try{let J=Q5(Z,{timeout:30000})?.toString().trim();if(!J)throw Error("otelHeadersHelper did not return a valid value");let Q=J5(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[X,Y]of Object.entries(Q))if(typeof Y!=="string")throw Error(`otelHeadersHelper returned non-string value for key "${X}": ${typeof Y}`);return W2=Q,w4=Date.now(),W2}catch(J){throw K(Error(`Error getting OpenTelemetry headers from otelHeadersHelper (in settings): ${p(J)}`)),J}}function nZ(Z){return Z==="max"||Z==="pro"}function tZ(){let Z=v();return U()&&Z!==null&&nZ(Z)}function iZ(){if(q()!=="firstParty")return;let{source:$}=_0(),J={};if($==="CLAUDE_CODE_OAUTH_TOKEN"||$==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR")J.tokenSource=$;else if(U())J.subscription=T4();else J.tokenSource=$;let{key:Q,source:X}=u0();if(Q)J.apiKeySource=X;if($==="claude.ai"||X==="/login managed key"){let V=G2()?.organizationName;if(V)J.organization=V}let Y=G2()?.emailAddress;if(($==="claude.ai"||X==="/login managed key")&&Y)J.email=Y;return J}async function lZ(){if(process.env.ANTHROPIC_UNIX_SOCKET)return{valid:!0};if(!U0())return{valid:!0};let Z=b("policySettings")?.forceLoginOrgUUID;if(!Z)return{valid:!0};await g0();let $=w();if(!$)return{valid:!0};let{source:J}=_0(),Q=J==="CLAUDE_CODE_OAUTH_TOKEN"||J==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",X=await G0($.accessToken);if(!X)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 Y=X.organization.uuid;if(Y===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: ${Y}
|
|
11
|
+
|
|
12
|
+
Remove the environment variable or obtain a token for the correct organization.`};return{valid:!1,message:`Your authentication token belongs to organization ${Y},
|
|
13
|
+
but this machine requires organization ${Z}.
|
|
14
|
+
|
|
15
|
+
Please log in with the correct organization: claude auth login`}}var RZ=300000,I=null,c=null,D0=0,NZ=3600000,OZ=180000,X0,PZ=5000,EZ=3600000,vZ=180000,j5,B2,w,R4=0,r2,M0=null,W2=null,w4=0,cZ=1740000,M4;var n=B(()=>{jZ();u5();m0();b0();J2();a0();t();r();V0();v5();N4();E2();f5();p5();d5();t5();X4();W0();j0();g();A5();qZ();zZ();c0();WZ();GZ();z4();I2();q0();G4();VZ();B4();X0=X5(async()=>{let Z=await UZ(),$=await _Z();if(Z||$)await c5();return $},NZ);j5=X5(async()=>{return await kZ()},EZ);B2=y(()=>{if(u())return null;if(process.platform==="darwin"){let $=W4();if($){if($.stdout)return{key:$.stdout,source:"/login managed key"}}else{let J=i();try{let Q=Q5(`security find-generic-password -a $USER -w -s "${J}"`);if(Q)return{key:Q,source:"/login managed key"}}catch(Q){K(Q)}}}let Z=F();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=r0();if(Z)return{accessToken:Z,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};try{let Q=x2().read()?.claudeAiOauth;if(!Q?.accessToken)return null;return Q}catch($){return K($),null}});r2=new Map;M4=class M4 extends Error{}});function N0(Z){return Boolean(Z?.includes(H5))}function sZ(Z){return Z?.split(" ").filter(Boolean)??[]}function DQ({codeChallenge:Z,state:$,port:J,isManual:Q,loginWithClaudeAi:X,inferenceOnly:Y,orgUUID:V,loginHint:W,loginMethod:G}){let x=X?N().CLAUDE_AI_AUTHORIZE_URL:N().CONSOLE_AUTHORIZE_URL,R=new URL(x);R.searchParams.append("code","true"),R.searchParams.append("client_id",N().CLIENT_ID),R.searchParams.append("response_type","code"),R.searchParams.append("redirect_uri",Q?N().MANUAL_REDIRECT_URL:`http://localhost:${J}/callback`);let Q0=Y?[H5]:f4;if(R.searchParams.append("scope",Q0.join(" ")),R.searchParams.append("code_challenge",Z),R.searchParams.append("code_challenge_method","S256"),R.searchParams.append("state",$),V)R.searchParams.append("orgUUID",V);if(W)R.searchParams.append("login_hint",W);if(G)R.searchParams.append("login_method",G);return R.toString()}async function NQ(Z,$,J,Q,X=!1,Y){let V={grant_type:"authorization_code",code:Z,redirect_uri:X?N().MANUAL_REDIRECT_URL:`http://localhost:${Q}/callback`,client_id:N().CLIENT_ID,code_verifier:J,state:$};if(Y!==void 0)V.expires_in=Y;let W=await O.post(N().TOKEN_URL,V,{headers:{"Content-Type":"application/json"},timeout:15000});if(W.status!==200)throw Error(W.status===401?"Authentication failed: Invalid authorization code":`Token exchange failed (${W.status}): ${W.statusText}`);return j("tengu_oauth_token_exchange_success",{}),W.data}async function D4(Z,{scopes:$}={}){let J={grant_type:"refresh_token",refresh_token:Z,client_id:N().CLIENT_ID,scope:(($?.length)?$:h4).join(" ")};try{let Q=await O.post(N().TOKEN_URL,J,{headers:{"Content-Type":"application/json"},timeout:15000});if(Q.status!==200)throw Error(`Token refresh failed: ${Q.statusText}`);let X=Q.data,{access_token:Y,refresh_token:V=Z,expires_in:W}=X,G=Date.now()+W*1000,x=sZ(X.scope);j("tengu_oauth_token_refresh_success",{});let R=F(),Q0=w(),E=R.oauthAccount?.billingType!==void 0&&R.oauthAccount?.accountCreatedAt!==void 0&&R.oauthAccount?.subscriptionCreatedAt!==void 0&&Q0?.subscriptionType!=null&&Q0?.rateLimitTier!=null?null:await oZ(Y);if(E&&R.oauthAccount){let s={};if(E.displayName!==void 0)s.displayName=E.displayName;if(typeof E.hasExtraUsageEnabled==="boolean")s.hasExtraUsageEnabled=E.hasExtraUsageEnabled;if(E.billingType!==null)s.billingType=E.billingType;if(E.accountCreatedAt!==void 0)s.accountCreatedAt=E.accountCreatedAt;if(E.subscriptionCreatedAt!==void 0)s.subscriptionCreatedAt=E.subscriptionCreatedAt;if(Object.keys(s).length>0)M((p0)=>({...p0,oauthAccount:p0.oauthAccount?{...p0.oauthAccount,...s}:p0.oauthAccount}))}return{accessToken:Y,refreshToken:V,expiresAt:G,scopes:x,subscriptionType:E?.subscriptionType??Q0?.subscriptionType??null,rateLimitTier:E?.rateLimitTier??Q0?.rateLimitTier??null,profile:E?.rawProfile,tokenAccount:X.account?{uuid:X.account.uuid,emailAddress:X.account.email_address,organizationUuid:X.organization?.uuid}:void 0}}catch(Q){let X=O.isAxiosError(Q)&&Q.response?.data?JSON.stringify(Q.response.data):void 0;throw j("tengu_oauth_token_refresh_failure",{error:Q.message,...X&&{responseBody:X}}),Q}}async function UQ(Z){let $=await O.get(N().ROLES_URL,{headers:{Authorization:`Bearer ${Z}`}});if($.status!==200)throw Error(`Failed to fetch user roles: ${$.statusText}`);let J=$.data;if(!F().oauthAccount)throw Error("OAuth account information not found in config");M((X)=>({...X,oauthAccount:X.oauthAccount?{...X.oauthAccount,organizationRole:J.organization_role,workspaceRole:J.workspace_role,organizationName:J.organization_name}:X.oauthAccount})),j("tengu_oauth_roles_stored",{org_role:J.organization_role})}async function OQ(Z){try{let $=await O.post(N().API_KEY_URL,null,{headers:{Authorization:`Bearer ${Z}`}}),J=$.data?.raw_key;if(J)return await x5(J),j("tengu_oauth_api_key",{status:"success",statusCode:$.status}),J;return null}catch($){throw j("tengu_oauth_api_key",{status:"failure",error:$ instanceof Error?$.message:String($)}),$}}function A0(Z){if(Z===null)return!1;let $=300000;return Date.now()+$>=Z}async function oZ(Z){let $=await G0(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 X={subscriptionType:Q,rateLimitTier:$?.organization?.rate_limit_tier??null,hasExtraUsageEnabled:$?.organization?.has_extra_usage_enabled??null,billingType:$?.organization?.billing_type??null};if($?.account?.display_name)X.displayName=$.account.display_name;if($?.account?.created_at)X.accountCreatedAt=$.account.created_at;if($?.organization?.subscription_created_at)X.subscriptionCreatedAt=$.organization.subscription_created_at;return j("tengu_oauth_profile_fetch_success",{}),{...X,rawProfile:$}}async function _Q(){let $=F().oauthAccount?.organizationUuid;if($)return $;let J=w()?.accessToken;if(J===void 0||!J0())return null;let X=(await G0(J))?.organization?.uuid;if(!X)return null;return X}async function bQ(){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(!F().oauthAccount)A4({accountUuid:Z,emailAddress:$,organizationUuid:J})}await g0();let X=F();if(X.oauthAccount&&X.oauthAccount.billingType!==void 0&&X.oauthAccount.accountCreatedAt!==void 0&&X.oauthAccount.subscriptionCreatedAt!==void 0||!U()||!J0())return!1;let Y=w();if(Y?.accessToken){let V=await G0(Y.accessToken);if(V){if(Q)z("OAuth profile fetch succeeded, overriding env var account info",{level:"info"});return A4({accountUuid:V.account.uuid,emailAddress:V.account.email,organizationUuid:V.organization.uuid,displayName:V.account.display_name||void 0,hasExtraUsageEnabled:V.organization.has_extra_usage_enabled??!1,billingType:V.organization.billing_type??void 0,accountCreatedAt:V.account.created_at,subscriptionCreatedAt:V.organization.subscription_created_at??void 0}),!0}}return!1}function A4({accountUuid:Z,emailAddress:$,organizationUuid:J,displayName:Q,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:V,subscriptionCreatedAt:W}){let G={accountUuid:Z,emailAddress:$,organizationUuid:J,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:V,subscriptionCreatedAt:W};if(Q)G.displayName=Q;M((x)=>{if(x.oauthAccount?.accountUuid===G.accountUuid&&x.oauthAccount?.emailAddress===G.emailAddress&&x.oauthAccount?.organizationUuid===G.organizationUuid&&x.oauthAccount?.displayName===G.displayName&&x.oauthAccount?.hasExtraUsageEnabled===G.hasExtraUsageEnabled&&x.oauthAccount?.billingType===G.billingType&&x.oauthAccount?.accountCreatedAt===G.accountCreatedAt&&x.oauthAccount?.subscriptionCreatedAt===G.subscriptionCreatedAt)return x;return{...x,oauthAccount:G}})}var N4=B(()=>{s0();J2();b0();n();W0();j0();E2()});
|
|
16
|
+
export{R5 as m1,w5 as n1,Y3 as o1,V3 as p1,g4 as q1,c4 as r1,q3 as s1,D5 as t1,d0 as u1,n0 as v1,Y0 as w1,P2 as x1,q as y1,x3 as z1,B3 as A1,H3 as B1,R3 as C1,t as D1,H as E1,_3 as F1,a0 as G1,v3 as H1,I3 as I1,P5 as J1,S3 as K1,M3 as L1,v5 as M1,m3 as N1,G0 as O1,E2 as P1,N0 as Q1,sZ as R1,DQ as S1,NQ as T1,D4 as U1,UQ as V1,OQ as W1,A0 as X1,oZ as Y1,_Q as Z1,bQ as _1,A4 as $1,N4 as a2,s3 as b2,o4 as c2,I5 as d2,f5 as e2,e0 as f2,p5 as g2,J9 as h2,d5 as i2,S as j2,t5 as k2,P0 as l2,l5 as m2,a5 as n2,V9 as o2,q9 as p2,r5 as q2,W9 as r2,e5 as s2,z9 as t2,G9 as u2,j9 as v2,S2 as w2,A as x2,V1 as y2,$8 as z2,k9 as A2,v9 as B2,I9 as C2,q1 as D2,y9 as E2,T9 as F2,J8 as G2,C9 as H2,S9 as I2,M9 as J2,A9 as K2,h9 as L2,Y8 as M2,f9 as N2,u9 as O2,g9 as P2,p9 as Q2,j1 as R2,y0 as S2,z8 as T2,G8 as U2,f2 as V2,F8 as W2,l9 as X2,w1 as Y2,F1 as Z2,L8 as _2,u2 as $2,D1 as a3,N1 as b3,J$ as c3,O1 as d3,K$ as e3,D$ as f3,p2 as g3,N$ as h3,b8 as i3,w0 as j3,C0 as k3,v1 as l3,U$ as m3,v0 as n3,I1 as o3,_ as p3,P as q3,P8 as r3,O$ as s3,_1 as t3,I0 as u3,_$ as v3,y1 as w3,T1 as x3,b$ as y3,T as z3,P$ as A3,v8 as B3,E$ as C3,k$ as D3,v$ as E3,H0 as F3,y$ as G3,C1 as H3,g1 as I3,p8 as J3,m1 as K3,l$ as L3,a$ as M3,s$ as N3,L0 as O3,l as P3,o$ as Q3,s8 as R3,r$ as S3,o8 as T3,e$ as U3,d2 as V3,a1 as W3,s1 as X3,FJ as Y3,JZ as Z3,LJ as _3,KJ as $3,r1 as a4,DJ as b4,J4 as c4,QZ as d4,NJ as e4,Q4 as f4,X4 as g4,PJ as h4,EJ as i4,z4 as j4,o2 as k4,G4 as l4,IJ as m4,x4 as n4,B4 as o4,U0 as p4,_0 as q4,Z0 as r4,wZ as s4,u0 as t4,a as u4,V5 as v4,W5 as w4,_4 as x4,FZ as y4,b4 as z4,e2 as A4,KZ as B4,DZ as C4,P4 as D4,X0 as E4,bZ as F4,G5 as G4,E4 as H4,k4 as I4,j5 as J4,IZ as K4,yZ as L4,TZ as M4,B2 as N4,x5 as O4,SZ as P4,MZ as Q4,I4 as R4,w as S4,B5 as T4,h2 as U4,h0 as V4,g0 as W4,U as X4,J0 as Y4,fZ as Z4,G2 as _4,uZ as $4,gZ as a5,v as b5,X2 as c5,pZ as d5,Y2 as e5,mZ as f5,n2 as g5,y4 as h5,T4 as i5,j2 as j5,S4 as k5,dZ as l5,tZ as m5,iZ as n5,lZ as o5,aZ as p5,n as q5};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{t as
|
|
1
|
+
import{NX as Y,PX as Z,UX as F}from"./cli-0.1.13-5c4fyghf.mjs";import{X4 as x,_4 as L,b5 as H,q5 as f}from"./cli-0.1.13-bzgpcgdt.mjs";import{C6 as X,T6 as w}from"./cli-0.1.13-wh68ve92.mjs";import{Mba as q,N7 as v,O7 as T,Pba as Q,S7 as G,X7 as P,gca as U}from"./cli-0.1.13-dag38tkx.mjs";import{$ea as W,afa as A}from"./cli-0.1.13-pw5dks39.mjs";import{oha as K,rha as R}from"./cli-0.1.13-144gn3fd.mjs";import{Xna as O}from"./cli-0.1.13-bj67mp7n.mjs";async function D(j="claude_code_guest_pass"){let{accessToken:B,orgUUID:z}=await Y(),J={...Z(B),"x-organization-uuid":z},M=`${W().BASE_API_URL}/api/oauth/organizations/${z}/referral/eligibility`;return(await X.get(M,{headers:J,params:{campaign:j},timeout:5000})).data}async function t(j="claude_code_guest_pass"){let{accessToken:B,orgUUID:z}=await Y(),J={...Z(B),"x-organization-uuid":z},M=`${W().BASE_API_URL}/api/oauth/organizations/${z}/referral/redemptions`;return(await X.get(M,{headers:J,params:{campaign:j},timeout:1e4})).data}function k(){return!!(L()?.organizationUuid&&x()&&H()==="max")}function i(){if(!k())return{eligible:!1,needsRefresh:!1,hasCache:!1};let j=L()?.organizationUuid;if(!j)return{eligible:!1,needsRefresh:!1,hasCache:!1};let z=Q().passesEligibilityCache?.[j];if(!z)return{eligible:!1,needsRefresh:!0,hasCache:!1};let{eligible:J,timestamp:M}=z,_=Date.now()-M>S;return{eligible:J,needsRefresh:_,hasCache:!0}}function n(j){let B=m[j.currency]??`${j.currency} `,z=j.amount_minor_units/100,J=z%1===0?z.toString():z.toFixed(2);return`${B}${J}`}function a(){let j=L()?.organizationUuid;if(!j)return null;return Q().passesEligibilityCache?.[j]?.referrer_reward??null}function s(){let j=L()?.organizationUuid;if(!j)return null;return Q().passesEligibilityCache?.[j]?.remaining_passes??null}async function $(){if(N)return K("Passes: Reusing in-flight eligibility fetch"),N;let j=L()?.organizationUuid;if(!j)return null;return N=(async()=>{try{let B=await D(),z={...B,timestamp:Date.now()};return q((J)=>({...J,passesEligibilityCache:{...J.passesEligibilityCache,[j]:z}})),K(`Passes eligibility cached for org ${j}: ${B.eligible}`),B}catch(B){return K("Failed to fetch and cache passes eligibility"),G(B),null}finally{N=null}})(),N}async function E(){if(!k())return null;let j=L()?.organizationUuid;if(!j)return null;let z=Q().passesEligibilityCache?.[j],J=Date.now();if(!z)return K("Passes: No cache, fetching eligibility in background (command unavailable this session)"),$(),null;if(J-z.timestamp>S){K("Passes: Cache stale, returning cached data and refreshing in background"),$();let{timestamp:_,...C}=z;return C}K("Passes: Using fresh cached eligibility data");let{timestamp:M,...V}=z;return V}async function g(){if(v())return;E()}var S=86400000,N=null,m;var b=O(()=>{w();A();f();U();R();P();T();F();m={USD:"$",EUR:"€",GBP:"£",BRL:"R$",CAD:"CA$",AUD:"A$",NZD:"NZ$",SGD:"S$"}});
|
|
2
|
+
export{t as XR,i as YR,n as ZR,a as _R,s as $R,E as aS,g as bS,b as cS};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Vn as J,Wn as k,ZH as L,lI as z,wJ as f,yJ as P}from"./cli-0.1.13-fh5dndvp.mjs";import{i_ as F,n_ as A}from"./cli-0.1.13-dag38tkx.mjs";import{gea as W,iea as R,jea as H,kea as X}from"./cli-0.1.13-jz57znb6.mjs";import{qga as Y,rga as h}from"./cli-0.1.13-45hjhcbc.mjs";import{oha as D,rha as M}from"./cli-0.1.13-144gn3fd.mjs";import{ala as q,gna as C}from"./cli-0.1.13-52f40ba4.mjs";import{Xna as V}from"./cli-0.1.13-bj67mp7n.mjs";function S(U){let Q=[];for(let w of U){if(w.type!=="user"&&w.type!=="assistant")continue;if("isMeta"in w&&w.isMeta)continue;if("origin"in w&&w.origin&&w.origin.kind!=="human")continue;let K=w.message.content;if(typeof K==="string")Q.push(K);else if(Array.isArray(K)){for(let B of K)if("type"in B&&B.type==="text"&&"text"in B)Q.push(B.text)}}let G=Q.join(`
|
|
2
2
|
`);return G.length>$?G.slice(-$):G}async function T(U,Q){let G=U.trim();if(!G)return null;try{let w=await f({systemPrompt:J([v]),userPrompt:G,outputFormat:{type:"json_schema",schema:{type:"object",properties:{title:{type:"string"}},required:["title"],additionalProperties:!1}},signal:Q,options:{querySource:"generate_session_title",agents:[],isNonInteractiveSession:q(),hasAppendSystemPrompt:!1,mcpTools:[]}}),K=L(w.message.content),B=I().safeParse(F(K)),Z=B.success?B.data.title.trim()||null:null;return Y("tengu_session_title_generated",{success:Z!==null}),Z}catch(w){return D(`generateSessionTitle failed: ${w}`,{level:"error"}),Y("tengu_session_title_generated",{success:!1}),"Claudio"}}var $=1000,v=`Generate a concise, sentence-case title (3-7 words) that captures the main topic or goal of this coding session. The title should be clear enough that the user recognizes the session in a list. Use sentence case: capitalize only the first word and proper nouns.
|
|
3
3
|
|
|
4
4
|
Return JSON with a single "title" field.
|
|
@@ -12,4 +12,4 @@ Good examples:
|
|
|
12
12
|
Bad (too vague): {"title": "Code changes"}
|
|
13
13
|
Bad (too long): {"title": "Investigate and fix the issue where the login button does not respond on mobile devices"}
|
|
14
14
|
Bad (wrong case): {"title": "Fix Login Button On Mobile"}`,I;var _=V(()=>{R();C();h();P();M();A();X();z();k();I=H(()=>W.object({title:W.string()}))});
|
|
15
|
-
export{S as
|
|
15
|
+
export{S as Pd,T as Qd,_ as Rd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Xna as l}from"./cli-0.1.13-bj67mp7n.mjs";function o(i,e,r){var t=null;if(r!==void 0&&(t=""+r),e.key!==void 0&&(t=""+e.key),"key"in e){r={};for(var s in e)s!=="key"&&(r[s]=e[s])}else r=e;return e=r.ref,{$$typeof:n,type:i,key:t,ref:e!==void 0?e:null,props:r}}var n,d,u,E,a;var c=l(()=>{n=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");u=d,E=o,a=o});
|
|
2
|
+
export{u as vX,E as wX,a as xX,c as yX};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{se as bG,te as rG,ze as iG}from"./cli-0.1.13-5d4ke9a2.mjs";import{$I as aG,CI as o,DI as lG,Nq as jG,Oq as HG,Qq as dG,Sq as KG,Xq as LG,YI as kG,cJ as f,eJ as v,er as mG,fJ as s,gJ as c,gr as WG,hr as qG,iJ as u,iK as i,jJ as r,jK as _G,kK as UG,lK as sG,lo as uG,mJ as oG,mK as $G,mr as l,nK as cG,qr as DG,sr as R,tr as a,ur as pG}from"./cli-0.1.13-fh5dndvp.mjs";import{jT as JJ}from"./cli-0.1.13-hjqn3n5a.mjs";import{DW as VG,RW as vG,vW as FG,yW as OG}from"./cli-0.1.13-wr0c9hyh.mjs";import{wX as wG,yX as PG}from"./cli-0.1.13-ck28msre.mjs";import{zX as BG}from"./cli-0.1.13-79vtnprb.mjs";import{T$ as YG,U7 as I,V7 as k,X7 as CG,Y$ as fG}from"./cli-0.1.13-dag38tkx.mjs";import{Afa as NG}from"./cli-0.1.13-rjjyq9ej.mjs";import{qga as x,rga as gG}from"./cli-0.1.13-45hjhcbc.mjs";import{Qga as w,Wga as MG,aha as TG,oha as zG,rha as SG}from"./cli-0.1.13-144gn3fd.mjs";import{gna as ZG,nja as XG}from"./cli-0.1.13-52f40ba4.mjs";import{Tna as n,Xna as p}from"./cli-0.1.13-bj67mp7n.mjs";var GG=p(()=>{TG();NG()});function JG(F){let B="plugin"in F?F.plugin:"no-plugin";return`${F.type}:${F.source}:${B}`}function QG(F,B){if(B.length===0)return;F((D)=>{let h=new Set(D.plugins.errors.map((H)=>JG(H))),P=B.filter((H)=>!h.has(JG(H)));if(P.length===0)return D;return{...D,plugins:{...D.plugins,errors:[...D.plugins.errors,...P]}}})}function EG(F,B=!1){let D=UG(),h=i((G)=>G.authVersion),P=i((G)=>G.mcp.pluginReconnectKey),H=_G(),K=q.useRef(new Map),N=q.useRef(new Set),S=q.useRef(null);q.useEffect(()=>{},[H]);let{addNotification:T}=$G(),RG=16,d=q.useRef([]),y=q.useRef(null),C=q.useCallback(()=>{y.current=null;let G=d.current;if(G.length===0)return;d.current=[],H((Y)=>{let z=Y.mcp;for(let L of G){let{tools:Q,commands:O,resources:W,...J}=L,V=J.type==="disabled"||J.type==="failed"?Q??[]:Q,X=J.type==="disabled"||J.type==="failed"?O??[]:O,Z=J.type==="disabled"||J.type==="failed"?W??[]:W,j=YG(J.name),g=z.clients.findIndex((E)=>E.name===J.name)===-1?[...z.clients,J]:z.clients.map((E)=>E.name===J.name?J:E),b=V===void 0?z.tools:[...o(z.tools,(E)=>E.name?.startsWith(j)),...V],m=X===void 0?z.commands:[...o(z.commands,(E)=>KG(E,J.name)),...X],hG=Z===void 0?z.resources:{...z.resources,...Z.length>0?{[J.name]:Z}:bG(z.resources,J.name)};z={...z,clients:g,tools:b,commands:m,resources:hG}}return{...Y,mcp:z}})},[H]),_=q.useCallback((G)=>{if(d.current.push(G),y.current===null)y.current=setTimeout(C,RG)},[C]),U=q.useCallback(({client:G,tools:Y,commands:z,resources:L})=>{switch(_({...G,tools:Y,commands:z,resources:L}),G.type){case"connected":{if(kG(G.client,G.name,H),G.client.onclose=()=>{let Q=G.config.type??"stdio";if(f(G.name,G.config).catch(()=>{zG(`Failed to invalidate the server cache: ${G.name}`)}),R(G.name)){k(G.name,"Server is disabled, skipping automatic reconnection");return}if(Q!=="stdio"&&Q!=="sdk"){let O=GJ(Q);k(G.name,`${O} transport closed/disconnected, attempting automatic reconnection`);let W=K.current.get(G.name);if(W)clearTimeout(W),K.current.delete(G.name);(async()=>{for(let V=1;V<=A;V++){if(R(G.name)){k(G.name,"Server disabled during reconnection, stopping retry"),K.current.delete(G.name);return}_({...G,type:"pending",reconnectAttempt:V,maxReconnectAttempts:A});let X=Date.now();try{let j=await u(G.name,G.config),$=Date.now()-X;if(j.client.type==="connected"){k(G.name,`${O} reconnection successful after ${$}ms (attempt ${V})`),K.current.delete(G.name),U(j);return}if(k(G.name,`${O} reconnection attempt ${V} completed with status: ${j.client.type}`),V===A){k(G.name,`Max reconnection attempts (${A}) reached, giving up`),K.current.delete(G.name),U(j);return}}catch(j){let $=Date.now()-X;if(I(G.name,`${O} reconnection attempt ${V} failed after ${$}ms: ${j}`),V===A){k(G.name,`Max reconnection attempts (${A}) reached, giving up`),K.current.delete(G.name),_({...G,type:"failed"});return}}let Z=Math.min(tG*Math.pow(2,V-1),eG);k(G.name,`Scheduling reconnection attempt ${V+1} in ${Z}ms`),await new Promise((j)=>{let $=setTimeout(j,Z);K.current.set(G.name,$)})}})()}else _({...G,type:"failed"})},!1)switch(Q.action){case"register":case"skip":}if(G.capabilities?.tools?.listChanged)G.client.setNotificationHandler(VG,async()=>{k(G.name,"Received tools/list_changed notification, refreshing tools");try{let Q=v.cache.get(G.name);v.cache.delete(G.name);let O=await v(G),W=O.length;if(Q)Q.then((J)=>{x("tengu_mcp_list_changed",{type:"tools",previousCount:J.length,newCount:W})},()=>{x("tengu_mcp_list_changed",{type:"tools",newCount:W})});else x("tengu_mcp_list_changed",{type:"tools",newCount:W});_({...G,tools:O})}catch(Q){I(G.name,`Failed to refresh tools after list_changed notification: ${w(Q)}`)}});if(G.capabilities?.prompts?.listChanged)G.client.setNotificationHandler(OG,async()=>{k(G.name,"Received prompts/list_changed notification, refreshing prompts"),x("tengu_mcp_list_changed",{type:"prompts"});try{c.cache.delete(G.name);let[Q,O]=await Promise.all([c(G),Promise.resolve([])]);_({...G,commands:[...Q,...O]}),nG?.()}catch(Q){I(G.name,`Failed to refresh prompts after list_changed notification: ${w(Q)}`)}});if(G.capabilities?.resources?.listChanged)G.client.setNotificationHandler(FG,async()=>{k(G.name,"Received resources/list_changed notification, refreshing resources"),x("tengu_mcp_list_changed",{type:"resources"});try{s.cache.delete(G.name);{let Q=await s(G);_({...G,resources:Q})}}catch(Q){I(G.name,`Failed to refresh resources after list_changed notification: ${w(Q)}`)}});break}case"needs-auth":case"failed":case"pending":case"disabled":break}},[_]),e=XG();q.useEffect(()=>{async function G(){let{servers:Y,errors:z}=B?{servers:{},errors:[]}:await l(F),L={...Y,...F};QG(H,z),H((Q)=>{let{stale:O,...W}=LG(Q.mcp,L);for(let X of O){let Z=K.current.get(X.name);if(Z)clearTimeout(Z),K.current.delete(X.name);if(X.type==="connected")X.client.onclose=void 0,f(X.name,X.config).catch(()=>{})}let J=new Set(W.clients.map((X)=>X.name)),V=Object.entries(L).filter(([X])=>!J.has(X)).map(([X,Z])=>({name:X,type:R(X)?"disabled":"pending",config:Z}));if(V.length===0&&O.length===0)return Q;return{...Q,mcp:{...Q.mcp,...W,clients:[...W.clients,...V]}}})}G().catch((Y)=>{I("useManageMCPConnections",`Failed to initialize servers as pending: ${w(Y)}`)})},[B,F,H,e,P]),q.useEffect(()=>{let G=!1;async function Y(){let z;if(B||DG())z=Promise.resolve({});else HG(),z=jG();let{servers:L,errors:Q}=B?{servers:{},errors:[]}:await l(F,z);if(G)return;QG(H,Q);let O={...L,...F},W=Object.fromEntries(Object.entries(O).filter(([Z])=>!R(Z)));r(U,W).catch((Z)=>{I("useManageMcpConnections",`Failed to get MCP resources: ${w(Z)}`)});let J={};if(!B){if(J=qG(await z).allowed,G)return;if(Object.keys(J).length>0){let{servers:Z}=WG(J,O);J=Z}if(Object.keys(J).length>0){H((j)=>{let $=new Set(j.mcp.clients.map((b)=>b.name)),g=Object.entries(J).filter(([b])=>!$.has(b)).map(([b,m])=>({name:b,type:R(b)?"disabled":"pending",config:m}));if(g.length===0)return j;return{...j,mcp:{...j.mcp,clients:[...j.mcp.clients,...g]}}});let Z=Object.fromEntries(Object.entries(J).filter(([j])=>!R(j)));r(U,Z).catch((j)=>{I("useManageMcpConnections",`Failed to get claude.ai MCP resources: ${w(j)}`)})}}let V={...O,...J},X={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0};for(let Z of Object.values(V))if(Z.scope==="enterprise")X.enterprise++;else if(Z.scope==="user")X.global++;else if(Z.scope==="project")X.project++;else if(Z.scope==="local")X.user++;else if(Z.scope==="dynamic")X.plugin++;else if(Z.scope==="claudeai")X.claudeai++;x("tengu_mcp_servers",{...X})}return Y(),()=>{G=!0}},[B,F,U,H,h,e,P]),q.useEffect(()=>{let G=K.current;return()=>{for(let Y of G.values())clearTimeout(Y);if(G.clear(),y.current!==null)clearTimeout(y.current),y.current=null,C()}},[C]);let yG=q.useCallback(async(G)=>{let Y=D.getState().mcp.clients.find((Q)=>Q.name===G);if(!Y)throw Error(`MCP server ${G} not found`);let z=K.current.get(G);if(z)clearTimeout(z),K.current.delete(G);let L=await u(G,Y.config);return U(L),L},[D,U]),AG=q.useCallback(async(G)=>{let Y=D.getState().mcp.clients.find((L)=>L.name===G);if(!Y)throw Error(`MCP server ${G} not found`);if(Y.type!=="disabled"){let L=K.current.get(G);if(L)clearTimeout(L),K.current.delete(G);if(a(G,!1),Y.type==="connected")await f(G,Y.config);_({name:G,type:"disabled",config:Y.config})}else{a(G,!0),_({name:G,type:"pending",config:Y.config});let L=await u(G,Y.config);U(L)}},[D,_,U]);return{reconnectMcpServer:yG,toggleMcpServer:AG}}function GJ(F){switch(F){case"http":return"HTTP";case"ws":case"ws-ide":return"WebSocket";default:return"SSE"}}var q,nG=null,A=5,tG=1000,eG=30000;var IG=p(()=>{ZG();oG();vG();rG();lG();gG();pG();SG();ZG();cG();sG();MG();CG();uG();iG();GG();dG();aG();fG();mG();q=n(BG(),1)});function mJ(){let F=M.useContext(t);if(!F)throw Error("useMcpReconnect must be used within MCPConnectionManager");return F.reconnectMcpServer}function pJ(){let F=M.useContext(t);if(!F)throw Error("useMcpToggleEnabled must be used within MCPConnectionManager");return F.toggleMcpServer}function lJ(F){let B=xG.c(6),{children:D,dynamicMcpConfig:h,isStrictMcpConfig:P}=F,{reconnectMcpServer:H,toggleMcpServer:K}=EG(h,P),N;if(B[0]!==H||B[1]!==K)N={reconnectMcpServer:H,toggleMcpServer:K},B[0]=H,B[1]=K,B[2]=N;else N=B[2];let S=N,T;if(B[3]!==D||B[4]!==S)T=wG(t.Provider,{value:S,children:D}),B[3]=D,B[4]=S,B[5]=T;else T=B[5];return T}var xG,M,t;var QJ=p(()=>{IG();PG();xG=n(JJ(),1),M=n(BG(),1),t=M.createContext(null)});
|
|
2
|
+
export{GG as ne,mJ as oe,pJ as pe,lJ as qe,QJ as re};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Rna as _}from"./cli-0.1.11-yrfxpjhr.mjs";import{stat as Cq,lstat as d,readdir as Mq,realpath as Kq}from"node:fs/promises";import{Readable as Nq}from"node:stream";import{resolve as c,relative as Yq,join as Hq,sep as Iq}from"node:path";function i(q,J={}){let Q=J.entryType||J.type;if(Q==="both")Q=Y.FILE_DIR_TYPE;if(Q)J.type=Q;if(!q)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof q!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(Q&&!l.includes(Q))throw Error(`readdirp: Invalid type passed. Use one of ${l.join(", ")}`);return J.root=q,new h(J)}var Y,g,n="READDIRP_RECURSIVE_ERROR",Oq,l,bq,Vq,Dq=(q)=>Oq.has(q.code),Lq,o=(q)=>!0,p=(q)=>{if(q===void 0)return o;if(typeof q==="function")return q;if(typeof q==="string"){let J=q.trim();return(Q)=>Q.basename===J}if(Array.isArray(q)){let J=q.map((Q)=>Q.trim());return(Q)=>J.some((X)=>Q.basename===X)}return o},h;var s=_(()=>{Y={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},g={root:".",fileFilter:(q)=>!0,directoryFilter:(q)=>!0,type:Y.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(g);Oq=new Set(["ENOENT","EPERM","EACCES","ELOOP",n]),l=[Y.DIR_TYPE,Y.EVERYTHING_TYPE,Y.FILE_DIR_TYPE,Y.FILE_TYPE],bq=new Set([Y.DIR_TYPE,Y.EVERYTHING_TYPE,Y.FILE_DIR_TYPE]),Vq=new Set([Y.EVERYTHING_TYPE,Y.FILE_DIR_TYPE,Y.FILE_TYPE]),Lq=process.platform==="win32";h=class h extends Nq{constructor(q={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:q.highWaterMark});let J={...g,...q},{root:Q,type:X}=J;this._fileFilter=p(J.fileFilter),this._directoryFilter=p(J.directoryFilter);let Z=J.lstat?d:Cq;if(Lq)this._stat=(z)=>Z(z,{bigint:!0});else this._stat=Z;this._maxDepth=J.depth??g.depth,this._wantsDir=X?bq.has(X):!1,this._wantsFile=X?Vq.has(X):!1,this._wantsEverything=X===Y.EVERYTHING_TYPE,this._root=c(Q),this._isDirent=!J.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(Q,1)],this.reading=!1,this.parent=void 0}async _read(q){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&q>0){let J=this.parent,Q=J&&J.files;if(Q&&Q.length>0){let{path:X,depth:Z}=J,z=Q.splice(0,q).map((G)=>this._formatEntry(G,X)),$=await Promise.all(z);for(let G of $){if(!G)continue;if(this.destroyed)return;let x=await this._getEntryType(G);if(x==="directory"&&this._directoryFilter(G)){if(Z<=this._maxDepth)this.parents.push(this._exploreDir(G.fullPath,Z+1));if(this._wantsDir)this.push(G),q--}else if((x==="file"||this._includeAsFile(G))&&this._fileFilter(G)){if(this._wantsFile)this.push(G),q--}}}else{let X=this.parents.pop();if(!X){this.push(null);break}if(this.parent=await X,this.destroyed)return}}}catch(J){this.destroy(J)}finally{this.reading=!1}}async _exploreDir(q,J){let Q;try{Q=await Mq(q,this._rdOptions)}catch(X){this._onError(X)}return{files:Q,depth:J,path:q}}async _formatEntry(q,J){let Q,X=this._isDirent?q.name:q;try{let Z=c(Hq(J,X));Q={path:Yq(this._root,Z),fullPath:Z,basename:X},Q[this._statsProp]=this._isDirent?q:await this._stat(Z)}catch(Z){this._onError(Z);return}return Q}_onError(q){if(Dq(q)&&!this.destroyed)this.emit("warn",q);else this.destroy(q)}async _getEntryType(q){if(!q&&this._statsProp in q)return"";let J=q[this._statsProp];if(J.isFile())return"file";if(J.isDirectory())return"directory";if(J&&J.isSymbolicLink()){let Q=q.fullPath;try{let X=await Kq(Q),Z=await d(X);if(Z.isFile())return"file";if(Z.isDirectory()){let z=X.length;if(Q.startsWith(X)&&Q.substr(z,1)===Iq){let $=Error(`Circular symlink detected: "${Q}" points to "${X}"`);return $.code=n,this._onError($)}return"directory"}}catch(X){return this._onError(X),""}}}_includeAsFile(q){let J=q&&q[this._statsProp];return J&&this._wantsEverything&&!J.isDirectory()}}});import{watchFile as Wq,unwatchFile as a,watch as Fq}from"fs";import{open as Aq,stat as e,lstat as Rq,realpath as u}from"fs/promises";import*as M from"path";import{type as Tq}from"os";function r(q,J,Q,X,Z){let z=($,G)=>{if(Q(q),Z($,G,{watchedPath:q}),G&&q!==G)F(M.resolve(q,G),I,M.join(q,G))};try{return Fq(q,{persistent:J.persistent},z)}catch($){X($);return}}class E{constructor(q){this.fsw=q,this._boundHandleError=(J)=>q._handleError(J)}_watchWithNodeFs(q,J){let Q=this.fsw.options,X=M.dirname(q),Z=M.basename(q);this.fsw._getWatchedDir(X).add(Z);let $=M.resolve(q),G={persistent:Q.persistent};if(!J)J=A;let x;if(Q.usePolling){let U=Q.interval!==Q.binaryInterval;G.interval=U&&fq(Z)?Q.binaryInterval:Q.interval,x=dq(q,$,G,{listener:J,rawEmitter:this.fsw._emitRaw})}else x=mq(q,$,G,{listener:J,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return x}_handleFile(q,J,Q){if(this.fsw.closed)return;let X=M.dirname(q),Z=M.basename(q),z=this.fsw._getWatchedDir(X),$=J;if(z.has(Z))return;let G=async(U,j)=>{if(!this.fsw._throttle(Sq,q,5))return;if(!j||j.mtimeMs===0)try{let k=await e(q);if(this.fsw.closed)return;let{atimeMs:K,mtimeMs:N}=k;if(!K||K<=N||N!==$.mtimeMs)this.fsw._emit(H.CHANGE,q,k);if((_q||uq||Pq)&&$.ino!==k.ino){this.fsw._closeFile(U),$=k;let b=this._watchWithNodeFs(q,G);if(b)this.fsw._addPathCloser(U,b)}else $=k}catch(k){this.fsw._remove(X,Z)}else if(z.has(Z)){let{atimeMs:k,mtimeMs:K}=j;if(!k||k<=K||K!==$.mtimeMs)this.fsw._emit(H.CHANGE,q,j);$=j}},x=this._watchWithNodeFs(q,G);if(!(Q&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(q)){if(!this.fsw._throttle(H.ADD,q,0))return;this.fsw._emit(H.ADD,q,J)}return x}async _handleSymlink(q,J,Q,X){if(this.fsw.closed)return;let Z=q.fullPath,z=this.fsw._getWatchedDir(J);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let $;try{$=await u(Q)}catch(G){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(z.has(X)){if(this.fsw._symlinkPaths.get(Z)!==$)this.fsw._symlinkPaths.set(Z,$),this.fsw._emit(H.CHANGE,Q,q.stats)}else z.add(X),this.fsw._symlinkPaths.set(Z,$),this.fsw._emit(H.ADD,Q,q.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(Z))return!0;this.fsw._symlinkPaths.set(Z,!0)}_handleRead(q,J,Q,X,Z,z,$){if(q=M.join(q,""),$=this.fsw._throttle("readdir",q,1000),!$)return;let G=this.fsw._getWatchedDir(Q.path),x=new Set,U=this.fsw._readdirp(q,{fileFilter:(j)=>Q.filterPath(j),directoryFilter:(j)=>Q.filterDir(j)});if(!U)return;return U.on(gq,async(j)=>{if(this.fsw.closed){U=void 0;return}let k=j.path,K=M.join(q,k);if(x.add(k),j.stats.isSymbolicLink()&&await this._handleSymlink(j,q,K,k))return;if(this.fsw.closed){U=void 0;return}if(k===X||!X&&!G.has(k))this.fsw._incrReadyCount(),K=M.join(Z,M.relative(Z,K)),this._addToNodeFs(K,J,Q,z+1)}).on(H.ERROR,this._boundHandleError),new Promise((j,k)=>{if(!U)return k();U.once(v,()=>{if(this.fsw.closed){U=void 0;return}let K=$?$.clear():!1;if(j(void 0),G.getChildren().filter((N)=>{return N!==q&&!x.has(N)}).forEach((N)=>{this.fsw._remove(q,N)}),U=void 0,K)this._handleRead(q,!1,Q,X,Z,z,$)})})}async _handleDir(q,J,Q,X,Z,z,$){let G=this.fsw._getWatchedDir(M.dirname(q)),x=G.has(M.basename(q));if(!(Q&&this.fsw.options.ignoreInitial)&&!Z&&!x)this.fsw._emit(H.ADD_DIR,q,J);G.add(M.basename(q)),this.fsw._getWatchedDir(q);let U,j,k=this.fsw.options.depth;if((k==null||X<=k)&&!this.fsw._symlinkPaths.has($)){if(!Z){if(await this._handleRead(q,Q,z,Z,q,X,U),this.fsw.closed)return}j=this._watchWithNodeFs(q,(K,N)=>{if(N&&N.mtimeMs===0)return;this._handleRead(K,!1,z,Z,q,X,U)})}return j}async _addToNodeFs(q,J,Q,X,Z){let z=this.fsw._emitReady;if(this.fsw._isIgnored(q)||this.fsw.closed)return z(),!1;let $=this.fsw._getWatchHelpers(q);if(Q)$.filterPath=(G)=>Q.filterPath(G),$.filterDir=(G)=>Q.filterDir(G);try{let G=await vq[$.statMethod]($.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored($.watchPath,G))return z(),!1;let x=this.fsw.options.followSymlinks,U;if(G.isDirectory()){let j=M.resolve(q),k=x?await u(q):q;if(this.fsw.closed)return;if(U=await this._handleDir($.watchPath,G,J,X,Z,$,k),this.fsw.closed)return;if(j!==k&&k!==void 0)this.fsw._symlinkPaths.set(j,k)}else if(G.isSymbolicLink()){let j=x?await u(q):q;if(this.fsw.closed)return;let k=M.dirname($.watchPath);if(this.fsw._getWatchedDir(k).add($.watchPath),this.fsw._emit(H.ADD,$.watchPath,G),U=await this._handleDir(k,G,J,X,q,$,j),this.fsw.closed)return;if(j!==void 0)this.fsw._symlinkPaths.set(M.resolve(q),j)}else U=this._handleFile($.watchPath,G,J);if(z(),U)this.fsw._addPathCloser(q,U);return!1}catch(G){if(this.fsw._handleError(G))return z(),q}}}var gq="data",v="end",t="close",A=()=>{},R,w,_q,uq,Pq,qq,C,H,Sq="watch",vq,I="listeners",L="errHandlers",O="rawEmitters",wq,Eq,fq=(q)=>Eq.has(M.extname(q).slice(1).toLowerCase()),S=(q,J)=>{if(q instanceof Set)q.forEach(J);else J(q)},V=(q,J,Q)=>{let X=q[J];if(!(X instanceof Set))q[J]=X=new Set([X]);X.add(Q)},yq=(q)=>(J)=>{let Q=q[J];if(Q instanceof Set)Q.clear();else delete q[J]},D=(q,J,Q)=>{let X=q[J];if(X instanceof Set)X.delete(Q);else if(X===Q)delete q[J]},Jq=(q)=>q instanceof Set?q.size===0:!q,W,F=(q,J,Q,X,Z)=>{let z=W.get(q);if(!z)return;S(z[J],($)=>{$(Q,X,Z)})},mq=(q,J,Q,X)=>{let{listener:Z,errHandler:z,rawEmitter:$}=X,G=W.get(J),x;if(!Q.persistent){if(x=r(q,Q,Z,z,$),!x)return;return x.close.bind(x)}if(G)V(G,I,Z),V(G,L,z),V(G,O,$);else{if(x=r(q,Q,F.bind(null,J,I),z,F.bind(null,J,O)),!x)return;x.on(H.ERROR,async(U)=>{let j=F.bind(null,J,L);if(G)G.watcherUnusable=!0;if(w&&U.code==="EPERM")try{await(await Aq(q,"r")).close(),j(U)}catch(k){}else j(U)}),G={listeners:Z,errHandlers:z,rawEmitters:$,watcher:x},W.set(J,G)}return()=>{if(D(G,I,Z),D(G,L,z),D(G,O,$),Jq(G.listeners))G.watcher.close(),W.delete(J),wq.forEach(yq(G)),G.watcher=void 0,Object.freeze(G)}},P,dq=(q,J,Q,X)=>{let{listener:Z,rawEmitter:z}=X,$=P.get(J),G=$&&$.options;if(G&&(G.persistent<Q.persistent||G.interval>Q.interval))a(J),$=void 0;if($)V($,I,Z),V($,O,z);else $={listeners:Z,rawEmitters:z,options:Q,watcher:Wq(J,Q,(x,U)=>{S($.rawEmitters,(k)=>{k(H.CHANGE,J,{curr:x,prev:U})});let j=x.mtimeMs;if(x.size!==U.size||j>U.mtimeMs||j===0)S($.listeners,(k)=>k(q,x))})},P.set(J,$);return()=>{if(D($,I,Z),D($,O,z),Jq($.listeners))P.delete(J),a(J),$.options=$.watcher=void 0,Object.freeze($)}};var Qq=_(()=>{R=process.platform,w=R==="win32",_q=R==="darwin",uq=R==="linux",Pq=R==="freebsd",qq=Tq()==="OS400",C={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},H=C,vq={lstat:Rq,stat:e},wq=[I,L,O],Eq=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),W=new Map;P=new Map});import{stat as cq}from"fs";import{stat as lq,readdir as oq}from"fs/promises";import{EventEmitter as pq}from"events";import*as B from"path";function T(q){return Array.isArray(q)?q:[q]}function eq(q){if(typeof q==="function")return q;if(typeof q==="string")return(J)=>q===J;if(q instanceof RegExp)return(J)=>q.test(J);if(typeof q==="object"&&q!==null)return(J)=>{if(q.path===J)return!0;if(q.recursive){let Q=B.relative(q.path,J);if(!Q)return!1;return!Q.startsWith("..")&&!B.isAbsolute(Q)}return!1};return()=>!1}function tq(q){if(typeof q!=="string")throw Error("string expected");q=B.normalize(q),q=q.replace(/\\/g,"/");let J=!1;if(q.startsWith("//"))J=!0;let Q=/\/\//;while(q.match(Q))q=q.replace(Q,"/");if(J)q="/"+q;return q}function Zq(q,J,Q){let X=tq(J);for(let Z=0;Z<q.length;Z++){let z=q[Z];if(z(X,Q))return!0}return!1}function qJ(q,J){if(q==null)throw TypeError("anymatch: specify first argument");let X=T(q).map((Z)=>eq(Z));if(J==null)return(Z,z)=>{return Zq(X,Z,z)};return Zq(X,J)}class kq{constructor(q,J){this.path=q,this._removeWatcher=J,this.items=new Set}add(q){let{items:J}=this;if(!J)return;if(q!==Uq&&q!==hq)J.add(q)}async remove(q){let{items:J}=this;if(!J)return;if(J.delete(q),J.size>0)return;let Q=this.path;try{await oq(Q)}catch(X){if(this._removeWatcher)this._removeWatcher(B.dirname(Q),B.basename(Q))}}has(q){let{items:J}=this;if(!J)return;return J.has(q)}getChildren(){let{items:q}=this;if(!q)return[];return[...q.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=A,this.items=QJ,Object.freeze(this)}}class jq{constructor(q,J,Q){this.fsw=Q;let X=q;this.path=q=q.replace(rq,""),this.watchPath=X,this.fullWatchPath=B.resolve(X),this.dirParts=[],this.dirParts.forEach((Z)=>{if(Z.length>1)Z.pop()}),this.followSymlinks=J,this.statMethod=J?XJ:ZJ}entryPath(q){return B.join(this.watchPath,B.relative(this.watchPath,q.fullPath))}filterPath(q){let{stats:J}=q;if(J&&J.isSymbolicLink())return this.filterDir(q);let Q=this.entryPath(q);return this.fsw._isntIgnored(Q,J)&&this.fsw._hasReadPermissions(J)}filterDir(q){return this.fsw._isntIgnored(this.entryPath(q),q.stats)}}function $J(q,J={}){let Q=new m(J);return Q.add(q),Q}var f="/",nq="//",Uq=".",hq="..",iq="string",sq,Xq,aq,rq,y=(q)=>typeof q==="object"&&q!==null&&!(q instanceof RegExp),$q=(q)=>{let J=T(q).flat();if(!J.every((Q)=>typeof Q===iq))throw TypeError(`Non-string provided as watch path: ${J}`);return J.map(xq)},Gq=(q)=>{let J=q.replace(sq,f),Q=!1;if(J.startsWith(nq))Q=!0;while(J.match(Xq))J=J.replace(Xq,f);if(Q)J=f+J;return J},xq=(q)=>Gq(B.normalize(Gq(q))),zq=(q="")=>(J)=>{if(typeof J==="string")return xq(B.isAbsolute(J)?J:B.join(q,J));else return J},JJ=(q,J)=>{if(B.isAbsolute(q))return q;return B.join(J,q)},QJ,XJ="stat",ZJ="lstat",m,bJ;var GJ=_(()=>{s();Qq();/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */sq=/\\/g,Xq=/\/\//,aq=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,rq=/^\.[/\\]/;QJ=Object.freeze(new Set);m=class m extends pq{constructor(q={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let J=q.awaitWriteFinish,Q={stabilityThreshold:2000,pollInterval:100},X={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...q,ignored:q.ignored?T(q.ignored):T([]),awaitWriteFinish:J===!0?Q:typeof J==="object"?{...Q,...J}:!1};if(qq)X.usePolling=!0;if(X.atomic===void 0)X.atomic=!X.usePolling;let Z=process.env.CHOKIDAR_USEPOLLING;if(Z!==void 0){let G=Z.toLowerCase();if(G==="false"||G==="0")X.usePolling=!1;else if(G==="true"||G==="1")X.usePolling=!0;else X.usePolling=!!G}let z=process.env.CHOKIDAR_INTERVAL;if(z)X.interval=Number.parseInt(z,10);let $=0;this._emitReady=()=>{if($++,$>=this._readyCount)this._emitReady=A,this._readyEmitted=!0,process.nextTick(()=>this.emit(C.READY))},this._emitRaw=(...G)=>this.emit(C.RAW,...G),this._boundRemove=this._remove.bind(this),this.options=X,this._nodeFsHandler=new E(this),Object.freeze(X)}_addIgnoredPath(q){if(y(q)){for(let J of this._ignoredPaths)if(y(J)&&J.path===q.path&&J.recursive===q.recursive)return}this._ignoredPaths.add(q)}_removeIgnoredPath(q){if(this._ignoredPaths.delete(q),typeof q==="string"){for(let J of this._ignoredPaths)if(y(J)&&J.path===q)this._ignoredPaths.delete(J)}}add(q,J,Q){let{cwd:X}=this.options;this.closed=!1,this._closePromise=void 0;let Z=$q(q);if(X)Z=Z.map((z)=>{return JJ(z,X)});if(Z.forEach((z)=>{this._removeIgnoredPath(z)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=Z.length,Promise.all(Z.map(async(z)=>{let $=await this._nodeFsHandler._addToNodeFs(z,!Q,void 0,0,J);if($)this._emitReady();return $})).then((z)=>{if(this.closed)return;z.forEach(($)=>{if($)this.add(B.dirname($),B.basename(J||$))})}),this}unwatch(q){if(this.closed)return this;let J=$q(q),{cwd:Q}=this.options;return J.forEach((X)=>{if(!B.isAbsolute(X)&&!this._closers.has(X)){if(Q)X=B.join(Q,X);X=B.resolve(X)}if(this._closePath(X),this._addIgnoredPath(X),this._watched.has(X))this._addIgnoredPath({path:X,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let q=[];return this._closers.forEach((J)=>J.forEach((Q)=>{let X=Q();if(X instanceof Promise)q.push(X)})),this._streams.forEach((J)=>J.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((J)=>J.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=q.length?Promise.all(q).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let q={};return this._watched.forEach((J,Q)=>{let Z=(this.options.cwd?B.relative(this.options.cwd,Q):Q)||Uq;q[Z]=J.getChildren().sort()}),q}emitWithAll(q,J){if(this.emit(q,...J),q!==C.ERROR)this.emit(C.ALL,q,...J)}async _emit(q,J,Q){if(this.closed)return;let X=this.options;if(w)J=B.normalize(J);if(X.cwd)J=B.relative(X.cwd,J);let Z=[J];if(Q!=null)Z.push(Q);let z=X.awaitWriteFinish,$;if(z&&($=this._pendingWrites.get(J)))return $.lastChange=new Date,this;if(X.atomic){if(q===C.UNLINK)return this._pendingUnlinks.set(J,[q,...Z]),setTimeout(()=>{this._pendingUnlinks.forEach((G,x)=>{this.emit(...G),this.emit(C.ALL,...G),this._pendingUnlinks.delete(x)})},typeof X.atomic==="number"?X.atomic:100),this;if(q===C.ADD&&this._pendingUnlinks.has(J))q=C.CHANGE,this._pendingUnlinks.delete(J)}if(z&&(q===C.ADD||q===C.CHANGE)&&this._readyEmitted){let G=(x,U)=>{if(x)q=C.ERROR,Z[0]=x,this.emitWithAll(q,Z);else if(U){if(Z.length>1)Z[1]=U;else Z.push(U);this.emitWithAll(q,Z)}};return this._awaitWriteFinish(J,z.stabilityThreshold,q,G),this}if(q===C.CHANGE){if(!this._throttle(C.CHANGE,J,50))return this}if(X.alwaysStat&&Q===void 0&&(q===C.ADD||q===C.ADD_DIR||q===C.CHANGE)){let G=X.cwd?B.join(X.cwd,J):J,x;try{x=await lq(G)}catch(U){}if(!x||this.closed)return;Z.push(x)}return this.emitWithAll(q,Z),this}_handleError(q){let J=q&&q.code;if(q&&J!=="ENOENT"&&J!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||J!=="EPERM"&&J!=="EACCES"))this.emit(C.ERROR,q);return q||this.closed}_throttle(q,J,Q){if(!this._throttled.has(q))this._throttled.set(q,new Map);let X=this._throttled.get(q);if(!X)throw Error("invalid throttle");let Z=X.get(J);if(Z)return Z.count++,!1;let z,$=()=>{let x=X.get(J),U=x?x.count:0;if(X.delete(J),clearTimeout(z),x)clearTimeout(x.timeoutObject);return U};z=setTimeout($,Q);let G={timeoutObject:z,clear:$,count:0};return X.set(J,G),G}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(q,J,Q,X){let Z=this.options.awaitWriteFinish;if(typeof Z!=="object")return;let z=Z.pollInterval,$,G=q;if(this.options.cwd&&!B.isAbsolute(q))G=B.join(this.options.cwd,q);let x=new Date,U=this._pendingWrites;function j(k){cq(G,(K,N)=>{if(K||!U.has(q)){if(K&&K.code!=="ENOENT")X(K);return}let b=Number(new Date);if(k&&N.size!==k.size)U.get(q).lastChange=b;let Bq=U.get(q);if(b-Bq.lastChange>=J)U.delete(q),X(void 0,N);else $=setTimeout(j,z,N)})}if(!U.has(q))U.set(q,{lastChange:x,cancelWait:()=>{return U.delete(q),clearTimeout($),Q}}),$=setTimeout(j,z)}_isIgnored(q,J){if(this.options.atomic&&aq.test(q))return!0;if(!this._userIgnored){let{cwd:Q}=this.options,Z=(this.options.ignored||[]).map(zq(Q)),$=[...[...this._ignoredPaths].map(zq(Q)),...Z];this._userIgnored=qJ($,void 0)}return this._userIgnored(q,J)}_isntIgnored(q,J){return!this._isIgnored(q,J)}_getWatchHelpers(q){return new jq(q,this.options.followSymlinks,this)}_getWatchedDir(q){let J=B.resolve(q);if(!this._watched.has(J))this._watched.set(J,new kq(J,this._boundRemove));return this._watched.get(J)}_hasReadPermissions(q){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number(q.mode)&256)}_remove(q,J,Q){let X=B.join(q,J),Z=B.resolve(X);if(Q=Q!=null?Q:this._watched.has(X)||this._watched.has(Z),!this._throttle("remove",X,100))return;if(!Q&&this._watched.size===1)this.add(q,J,!0);this._getWatchedDir(X).getChildren().forEach((k)=>this._remove(X,k));let G=this._getWatchedDir(q),x=G.has(J);if(G.remove(J),this._symlinkPaths.has(Z))this._symlinkPaths.delete(Z);let U=X;if(this.options.cwd)U=B.relative(this.options.cwd,X);if(this.options.awaitWriteFinish&&this._pendingWrites.has(U)){if(this._pendingWrites.get(U).cancelWait()===C.ADD)return}this._watched.delete(X),this._watched.delete(Z);let j=Q?C.UNLINK_DIR:C.UNLINK;if(x&&!this._isIgnored(X))this._emit(j,X);this._closePath(X)}_closePath(q){this._closeFile(q);let J=B.dirname(q);this._getWatchedDir(J).remove(B.basename(q))}_closeFile(q){let J=this._closers.get(q);if(!J)return;J.forEach((Q)=>Q()),this._closers.delete(q)}_addPathCloser(q,J){if(!J)return;let Q=this._closers.get(q);if(!Q)Q=[],this._closers.set(q,Q);Q.push(J)}_readdirp(q,J){if(this.closed)return;let Q={type:C.ALL,alwaysStat:!0,lstat:!0,...J,depth:0},X=i(q,Q);return this._streams.add(X),X.once(t,()=>{X=void 0}),X.once(v,()=>{if(X)this._streams.delete(X),X=void 0}),X}};bJ={watch:$J,FSWatcher:m}});
|
|
2
|
-
export{jq as
|
|
1
|
+
import{Xna as _}from"./cli-0.1.13-bj67mp7n.mjs";import{stat as Cq,lstat as d,readdir as Mq,realpath as Kq}from"node:fs/promises";import{Readable as Nq}from"node:stream";import{resolve as c,relative as Yq,join as Hq,sep as Iq}from"node:path";function i(q,J={}){let Q=J.entryType||J.type;if(Q==="both")Q=Y.FILE_DIR_TYPE;if(Q)J.type=Q;if(!q)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof q!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(Q&&!l.includes(Q))throw Error(`readdirp: Invalid type passed. Use one of ${l.join(", ")}`);return J.root=q,new h(J)}var Y,g,n="READDIRP_RECURSIVE_ERROR",Oq,l,bq,Vq,Dq=(q)=>Oq.has(q.code),Lq,o=(q)=>!0,p=(q)=>{if(q===void 0)return o;if(typeof q==="function")return q;if(typeof q==="string"){let J=q.trim();return(Q)=>Q.basename===J}if(Array.isArray(q)){let J=q.map((Q)=>Q.trim());return(Q)=>J.some((X)=>Q.basename===X)}return o},h;var s=_(()=>{Y={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},g={root:".",fileFilter:(q)=>!0,directoryFilter:(q)=>!0,type:Y.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(g);Oq=new Set(["ENOENT","EPERM","EACCES","ELOOP",n]),l=[Y.DIR_TYPE,Y.EVERYTHING_TYPE,Y.FILE_DIR_TYPE,Y.FILE_TYPE],bq=new Set([Y.DIR_TYPE,Y.EVERYTHING_TYPE,Y.FILE_DIR_TYPE]),Vq=new Set([Y.EVERYTHING_TYPE,Y.FILE_DIR_TYPE,Y.FILE_TYPE]),Lq=process.platform==="win32";h=class h extends Nq{constructor(q={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:q.highWaterMark});let J={...g,...q},{root:Q,type:X}=J;this._fileFilter=p(J.fileFilter),this._directoryFilter=p(J.directoryFilter);let Z=J.lstat?d:Cq;if(Lq)this._stat=(z)=>Z(z,{bigint:!0});else this._stat=Z;this._maxDepth=J.depth??g.depth,this._wantsDir=X?bq.has(X):!1,this._wantsFile=X?Vq.has(X):!1,this._wantsEverything=X===Y.EVERYTHING_TYPE,this._root=c(Q),this._isDirent=!J.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(Q,1)],this.reading=!1,this.parent=void 0}async _read(q){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&q>0){let J=this.parent,Q=J&&J.files;if(Q&&Q.length>0){let{path:X,depth:Z}=J,z=Q.splice(0,q).map((G)=>this._formatEntry(G,X)),$=await Promise.all(z);for(let G of $){if(!G)continue;if(this.destroyed)return;let x=await this._getEntryType(G);if(x==="directory"&&this._directoryFilter(G)){if(Z<=this._maxDepth)this.parents.push(this._exploreDir(G.fullPath,Z+1));if(this._wantsDir)this.push(G),q--}else if((x==="file"||this._includeAsFile(G))&&this._fileFilter(G)){if(this._wantsFile)this.push(G),q--}}}else{let X=this.parents.pop();if(!X){this.push(null);break}if(this.parent=await X,this.destroyed)return}}}catch(J){this.destroy(J)}finally{this.reading=!1}}async _exploreDir(q,J){let Q;try{Q=await Mq(q,this._rdOptions)}catch(X){this._onError(X)}return{files:Q,depth:J,path:q}}async _formatEntry(q,J){let Q,X=this._isDirent?q.name:q;try{let Z=c(Hq(J,X));Q={path:Yq(this._root,Z),fullPath:Z,basename:X},Q[this._statsProp]=this._isDirent?q:await this._stat(Z)}catch(Z){this._onError(Z);return}return Q}_onError(q){if(Dq(q)&&!this.destroyed)this.emit("warn",q);else this.destroy(q)}async _getEntryType(q){if(!q&&this._statsProp in q)return"";let J=q[this._statsProp];if(J.isFile())return"file";if(J.isDirectory())return"directory";if(J&&J.isSymbolicLink()){let Q=q.fullPath;try{let X=await Kq(Q),Z=await d(X);if(Z.isFile())return"file";if(Z.isDirectory()){let z=X.length;if(Q.startsWith(X)&&Q.substr(z,1)===Iq){let $=Error(`Circular symlink detected: "${Q}" points to "${X}"`);return $.code=n,this._onError($)}return"directory"}}catch(X){return this._onError(X),""}}}_includeAsFile(q){let J=q&&q[this._statsProp];return J&&this._wantsEverything&&!J.isDirectory()}}});import{watchFile as Wq,unwatchFile as a,watch as Fq}from"fs";import{open as Aq,stat as e,lstat as Rq,realpath as u}from"fs/promises";import*as M from"path";import{type as Tq}from"os";function r(q,J,Q,X,Z){let z=($,G)=>{if(Q(q),Z($,G,{watchedPath:q}),G&&q!==G)F(M.resolve(q,G),I,M.join(q,G))};try{return Fq(q,{persistent:J.persistent},z)}catch($){X($);return}}class E{constructor(q){this.fsw=q,this._boundHandleError=(J)=>q._handleError(J)}_watchWithNodeFs(q,J){let Q=this.fsw.options,X=M.dirname(q),Z=M.basename(q);this.fsw._getWatchedDir(X).add(Z);let $=M.resolve(q),G={persistent:Q.persistent};if(!J)J=A;let x;if(Q.usePolling){let U=Q.interval!==Q.binaryInterval;G.interval=U&&fq(Z)?Q.binaryInterval:Q.interval,x=dq(q,$,G,{listener:J,rawEmitter:this.fsw._emitRaw})}else x=mq(q,$,G,{listener:J,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return x}_handleFile(q,J,Q){if(this.fsw.closed)return;let X=M.dirname(q),Z=M.basename(q),z=this.fsw._getWatchedDir(X),$=J;if(z.has(Z))return;let G=async(U,j)=>{if(!this.fsw._throttle(Sq,q,5))return;if(!j||j.mtimeMs===0)try{let k=await e(q);if(this.fsw.closed)return;let{atimeMs:K,mtimeMs:N}=k;if(!K||K<=N||N!==$.mtimeMs)this.fsw._emit(H.CHANGE,q,k);if((_q||uq||Pq)&&$.ino!==k.ino){this.fsw._closeFile(U),$=k;let b=this._watchWithNodeFs(q,G);if(b)this.fsw._addPathCloser(U,b)}else $=k}catch(k){this.fsw._remove(X,Z)}else if(z.has(Z)){let{atimeMs:k,mtimeMs:K}=j;if(!k||k<=K||K!==$.mtimeMs)this.fsw._emit(H.CHANGE,q,j);$=j}},x=this._watchWithNodeFs(q,G);if(!(Q&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(q)){if(!this.fsw._throttle(H.ADD,q,0))return;this.fsw._emit(H.ADD,q,J)}return x}async _handleSymlink(q,J,Q,X){if(this.fsw.closed)return;let Z=q.fullPath,z=this.fsw._getWatchedDir(J);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let $;try{$=await u(Q)}catch(G){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(z.has(X)){if(this.fsw._symlinkPaths.get(Z)!==$)this.fsw._symlinkPaths.set(Z,$),this.fsw._emit(H.CHANGE,Q,q.stats)}else z.add(X),this.fsw._symlinkPaths.set(Z,$),this.fsw._emit(H.ADD,Q,q.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(Z))return!0;this.fsw._symlinkPaths.set(Z,!0)}_handleRead(q,J,Q,X,Z,z,$){if(q=M.join(q,""),$=this.fsw._throttle("readdir",q,1000),!$)return;let G=this.fsw._getWatchedDir(Q.path),x=new Set,U=this.fsw._readdirp(q,{fileFilter:(j)=>Q.filterPath(j),directoryFilter:(j)=>Q.filterDir(j)});if(!U)return;return U.on(gq,async(j)=>{if(this.fsw.closed){U=void 0;return}let k=j.path,K=M.join(q,k);if(x.add(k),j.stats.isSymbolicLink()&&await this._handleSymlink(j,q,K,k))return;if(this.fsw.closed){U=void 0;return}if(k===X||!X&&!G.has(k))this.fsw._incrReadyCount(),K=M.join(Z,M.relative(Z,K)),this._addToNodeFs(K,J,Q,z+1)}).on(H.ERROR,this._boundHandleError),new Promise((j,k)=>{if(!U)return k();U.once(v,()=>{if(this.fsw.closed){U=void 0;return}let K=$?$.clear():!1;if(j(void 0),G.getChildren().filter((N)=>{return N!==q&&!x.has(N)}).forEach((N)=>{this.fsw._remove(q,N)}),U=void 0,K)this._handleRead(q,!1,Q,X,Z,z,$)})})}async _handleDir(q,J,Q,X,Z,z,$){let G=this.fsw._getWatchedDir(M.dirname(q)),x=G.has(M.basename(q));if(!(Q&&this.fsw.options.ignoreInitial)&&!Z&&!x)this.fsw._emit(H.ADD_DIR,q,J);G.add(M.basename(q)),this.fsw._getWatchedDir(q);let U,j,k=this.fsw.options.depth;if((k==null||X<=k)&&!this.fsw._symlinkPaths.has($)){if(!Z){if(await this._handleRead(q,Q,z,Z,q,X,U),this.fsw.closed)return}j=this._watchWithNodeFs(q,(K,N)=>{if(N&&N.mtimeMs===0)return;this._handleRead(K,!1,z,Z,q,X,U)})}return j}async _addToNodeFs(q,J,Q,X,Z){let z=this.fsw._emitReady;if(this.fsw._isIgnored(q)||this.fsw.closed)return z(),!1;let $=this.fsw._getWatchHelpers(q);if(Q)$.filterPath=(G)=>Q.filterPath(G),$.filterDir=(G)=>Q.filterDir(G);try{let G=await vq[$.statMethod]($.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored($.watchPath,G))return z(),!1;let x=this.fsw.options.followSymlinks,U;if(G.isDirectory()){let j=M.resolve(q),k=x?await u(q):q;if(this.fsw.closed)return;if(U=await this._handleDir($.watchPath,G,J,X,Z,$,k),this.fsw.closed)return;if(j!==k&&k!==void 0)this.fsw._symlinkPaths.set(j,k)}else if(G.isSymbolicLink()){let j=x?await u(q):q;if(this.fsw.closed)return;let k=M.dirname($.watchPath);if(this.fsw._getWatchedDir(k).add($.watchPath),this.fsw._emit(H.ADD,$.watchPath,G),U=await this._handleDir(k,G,J,X,q,$,j),this.fsw.closed)return;if(j!==void 0)this.fsw._symlinkPaths.set(M.resolve(q),j)}else U=this._handleFile($.watchPath,G,J);if(z(),U)this.fsw._addPathCloser(q,U);return!1}catch(G){if(this.fsw._handleError(G))return z(),q}}}var gq="data",v="end",t="close",A=()=>{},R,w,_q,uq,Pq,qq,C,H,Sq="watch",vq,I="listeners",L="errHandlers",O="rawEmitters",wq,Eq,fq=(q)=>Eq.has(M.extname(q).slice(1).toLowerCase()),S=(q,J)=>{if(q instanceof Set)q.forEach(J);else J(q)},V=(q,J,Q)=>{let X=q[J];if(!(X instanceof Set))q[J]=X=new Set([X]);X.add(Q)},yq=(q)=>(J)=>{let Q=q[J];if(Q instanceof Set)Q.clear();else delete q[J]},D=(q,J,Q)=>{let X=q[J];if(X instanceof Set)X.delete(Q);else if(X===Q)delete q[J]},Jq=(q)=>q instanceof Set?q.size===0:!q,W,F=(q,J,Q,X,Z)=>{let z=W.get(q);if(!z)return;S(z[J],($)=>{$(Q,X,Z)})},mq=(q,J,Q,X)=>{let{listener:Z,errHandler:z,rawEmitter:$}=X,G=W.get(J),x;if(!Q.persistent){if(x=r(q,Q,Z,z,$),!x)return;return x.close.bind(x)}if(G)V(G,I,Z),V(G,L,z),V(G,O,$);else{if(x=r(q,Q,F.bind(null,J,I),z,F.bind(null,J,O)),!x)return;x.on(H.ERROR,async(U)=>{let j=F.bind(null,J,L);if(G)G.watcherUnusable=!0;if(w&&U.code==="EPERM")try{await(await Aq(q,"r")).close(),j(U)}catch(k){}else j(U)}),G={listeners:Z,errHandlers:z,rawEmitters:$,watcher:x},W.set(J,G)}return()=>{if(D(G,I,Z),D(G,L,z),D(G,O,$),Jq(G.listeners))G.watcher.close(),W.delete(J),wq.forEach(yq(G)),G.watcher=void 0,Object.freeze(G)}},P,dq=(q,J,Q,X)=>{let{listener:Z,rawEmitter:z}=X,$=P.get(J),G=$&&$.options;if(G&&(G.persistent<Q.persistent||G.interval>Q.interval))a(J),$=void 0;if($)V($,I,Z),V($,O,z);else $={listeners:Z,rawEmitters:z,options:Q,watcher:Wq(J,Q,(x,U)=>{S($.rawEmitters,(k)=>{k(H.CHANGE,J,{curr:x,prev:U})});let j=x.mtimeMs;if(x.size!==U.size||j>U.mtimeMs||j===0)S($.listeners,(k)=>k(q,x))})},P.set(J,$);return()=>{if(D($,I,Z),D($,O,z),Jq($.listeners))P.delete(J),a(J),$.options=$.watcher=void 0,Object.freeze($)}};var Qq=_(()=>{R=process.platform,w=R==="win32",_q=R==="darwin",uq=R==="linux",Pq=R==="freebsd",qq=Tq()==="OS400",C={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},H=C,vq={lstat:Rq,stat:e},wq=[I,L,O],Eq=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),W=new Map;P=new Map});import{stat as cq}from"fs";import{stat as lq,readdir as oq}from"fs/promises";import{EventEmitter as pq}from"events";import*as B from"path";function T(q){return Array.isArray(q)?q:[q]}function eq(q){if(typeof q==="function")return q;if(typeof q==="string")return(J)=>q===J;if(q instanceof RegExp)return(J)=>q.test(J);if(typeof q==="object"&&q!==null)return(J)=>{if(q.path===J)return!0;if(q.recursive){let Q=B.relative(q.path,J);if(!Q)return!1;return!Q.startsWith("..")&&!B.isAbsolute(Q)}return!1};return()=>!1}function tq(q){if(typeof q!=="string")throw Error("string expected");q=B.normalize(q),q=q.replace(/\\/g,"/");let J=!1;if(q.startsWith("//"))J=!0;let Q=/\/\//;while(q.match(Q))q=q.replace(Q,"/");if(J)q="/"+q;return q}function Zq(q,J,Q){let X=tq(J);for(let Z=0;Z<q.length;Z++){let z=q[Z];if(z(X,Q))return!0}return!1}function qJ(q,J){if(q==null)throw TypeError("anymatch: specify first argument");let X=T(q).map((Z)=>eq(Z));if(J==null)return(Z,z)=>{return Zq(X,Z,z)};return Zq(X,J)}class kq{constructor(q,J){this.path=q,this._removeWatcher=J,this.items=new Set}add(q){let{items:J}=this;if(!J)return;if(q!==Uq&&q!==hq)J.add(q)}async remove(q){let{items:J}=this;if(!J)return;if(J.delete(q),J.size>0)return;let Q=this.path;try{await oq(Q)}catch(X){if(this._removeWatcher)this._removeWatcher(B.dirname(Q),B.basename(Q))}}has(q){let{items:J}=this;if(!J)return;return J.has(q)}getChildren(){let{items:q}=this;if(!q)return[];return[...q.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=A,this.items=QJ,Object.freeze(this)}}class jq{constructor(q,J,Q){this.fsw=Q;let X=q;this.path=q=q.replace(rq,""),this.watchPath=X,this.fullWatchPath=B.resolve(X),this.dirParts=[],this.dirParts.forEach((Z)=>{if(Z.length>1)Z.pop()}),this.followSymlinks=J,this.statMethod=J?XJ:ZJ}entryPath(q){return B.join(this.watchPath,B.relative(this.watchPath,q.fullPath))}filterPath(q){let{stats:J}=q;if(J&&J.isSymbolicLink())return this.filterDir(q);let Q=this.entryPath(q);return this.fsw._isntIgnored(Q,J)&&this.fsw._hasReadPermissions(J)}filterDir(q){return this.fsw._isntIgnored(this.entryPath(q),q.stats)}}function $J(q,J={}){let Q=new m(J);return Q.add(q),Q}var f="/",nq="//",Uq=".",hq="..",iq="string",sq,Xq,aq,rq,y=(q)=>typeof q==="object"&&q!==null&&!(q instanceof RegExp),$q=(q)=>{let J=T(q).flat();if(!J.every((Q)=>typeof Q===iq))throw TypeError(`Non-string provided as watch path: ${J}`);return J.map(xq)},Gq=(q)=>{let J=q.replace(sq,f),Q=!1;if(J.startsWith(nq))Q=!0;while(J.match(Xq))J=J.replace(Xq,f);if(Q)J=f+J;return J},xq=(q)=>Gq(B.normalize(Gq(q))),zq=(q="")=>(J)=>{if(typeof J==="string")return xq(B.isAbsolute(J)?J:B.join(q,J));else return J},JJ=(q,J)=>{if(B.isAbsolute(q))return q;return B.join(J,q)},QJ,XJ="stat",ZJ="lstat",m,bJ;var GJ=_(()=>{s();Qq();/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */sq=/\\/g,Xq=/\/\//,aq=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,rq=/^\.[/\\]/;QJ=Object.freeze(new Set);m=class m extends pq{constructor(q={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let J=q.awaitWriteFinish,Q={stabilityThreshold:2000,pollInterval:100},X={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...q,ignored:q.ignored?T(q.ignored):T([]),awaitWriteFinish:J===!0?Q:typeof J==="object"?{...Q,...J}:!1};if(qq)X.usePolling=!0;if(X.atomic===void 0)X.atomic=!X.usePolling;let Z=process.env.CHOKIDAR_USEPOLLING;if(Z!==void 0){let G=Z.toLowerCase();if(G==="false"||G==="0")X.usePolling=!1;else if(G==="true"||G==="1")X.usePolling=!0;else X.usePolling=!!G}let z=process.env.CHOKIDAR_INTERVAL;if(z)X.interval=Number.parseInt(z,10);let $=0;this._emitReady=()=>{if($++,$>=this._readyCount)this._emitReady=A,this._readyEmitted=!0,process.nextTick(()=>this.emit(C.READY))},this._emitRaw=(...G)=>this.emit(C.RAW,...G),this._boundRemove=this._remove.bind(this),this.options=X,this._nodeFsHandler=new E(this),Object.freeze(X)}_addIgnoredPath(q){if(y(q)){for(let J of this._ignoredPaths)if(y(J)&&J.path===q.path&&J.recursive===q.recursive)return}this._ignoredPaths.add(q)}_removeIgnoredPath(q){if(this._ignoredPaths.delete(q),typeof q==="string"){for(let J of this._ignoredPaths)if(y(J)&&J.path===q)this._ignoredPaths.delete(J)}}add(q,J,Q){let{cwd:X}=this.options;this.closed=!1,this._closePromise=void 0;let Z=$q(q);if(X)Z=Z.map((z)=>{return JJ(z,X)});if(Z.forEach((z)=>{this._removeIgnoredPath(z)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=Z.length,Promise.all(Z.map(async(z)=>{let $=await this._nodeFsHandler._addToNodeFs(z,!Q,void 0,0,J);if($)this._emitReady();return $})).then((z)=>{if(this.closed)return;z.forEach(($)=>{if($)this.add(B.dirname($),B.basename(J||$))})}),this}unwatch(q){if(this.closed)return this;let J=$q(q),{cwd:Q}=this.options;return J.forEach((X)=>{if(!B.isAbsolute(X)&&!this._closers.has(X)){if(Q)X=B.join(Q,X);X=B.resolve(X)}if(this._closePath(X),this._addIgnoredPath(X),this._watched.has(X))this._addIgnoredPath({path:X,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let q=[];return this._closers.forEach((J)=>J.forEach((Q)=>{let X=Q();if(X instanceof Promise)q.push(X)})),this._streams.forEach((J)=>J.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((J)=>J.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=q.length?Promise.all(q).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let q={};return this._watched.forEach((J,Q)=>{let Z=(this.options.cwd?B.relative(this.options.cwd,Q):Q)||Uq;q[Z]=J.getChildren().sort()}),q}emitWithAll(q,J){if(this.emit(q,...J),q!==C.ERROR)this.emit(C.ALL,q,...J)}async _emit(q,J,Q){if(this.closed)return;let X=this.options;if(w)J=B.normalize(J);if(X.cwd)J=B.relative(X.cwd,J);let Z=[J];if(Q!=null)Z.push(Q);let z=X.awaitWriteFinish,$;if(z&&($=this._pendingWrites.get(J)))return $.lastChange=new Date,this;if(X.atomic){if(q===C.UNLINK)return this._pendingUnlinks.set(J,[q,...Z]),setTimeout(()=>{this._pendingUnlinks.forEach((G,x)=>{this.emit(...G),this.emit(C.ALL,...G),this._pendingUnlinks.delete(x)})},typeof X.atomic==="number"?X.atomic:100),this;if(q===C.ADD&&this._pendingUnlinks.has(J))q=C.CHANGE,this._pendingUnlinks.delete(J)}if(z&&(q===C.ADD||q===C.CHANGE)&&this._readyEmitted){let G=(x,U)=>{if(x)q=C.ERROR,Z[0]=x,this.emitWithAll(q,Z);else if(U){if(Z.length>1)Z[1]=U;else Z.push(U);this.emitWithAll(q,Z)}};return this._awaitWriteFinish(J,z.stabilityThreshold,q,G),this}if(q===C.CHANGE){if(!this._throttle(C.CHANGE,J,50))return this}if(X.alwaysStat&&Q===void 0&&(q===C.ADD||q===C.ADD_DIR||q===C.CHANGE)){let G=X.cwd?B.join(X.cwd,J):J,x;try{x=await lq(G)}catch(U){}if(!x||this.closed)return;Z.push(x)}return this.emitWithAll(q,Z),this}_handleError(q){let J=q&&q.code;if(q&&J!=="ENOENT"&&J!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||J!=="EPERM"&&J!=="EACCES"))this.emit(C.ERROR,q);return q||this.closed}_throttle(q,J,Q){if(!this._throttled.has(q))this._throttled.set(q,new Map);let X=this._throttled.get(q);if(!X)throw Error("invalid throttle");let Z=X.get(J);if(Z)return Z.count++,!1;let z,$=()=>{let x=X.get(J),U=x?x.count:0;if(X.delete(J),clearTimeout(z),x)clearTimeout(x.timeoutObject);return U};z=setTimeout($,Q);let G={timeoutObject:z,clear:$,count:0};return X.set(J,G),G}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(q,J,Q,X){let Z=this.options.awaitWriteFinish;if(typeof Z!=="object")return;let z=Z.pollInterval,$,G=q;if(this.options.cwd&&!B.isAbsolute(q))G=B.join(this.options.cwd,q);let x=new Date,U=this._pendingWrites;function j(k){cq(G,(K,N)=>{if(K||!U.has(q)){if(K&&K.code!=="ENOENT")X(K);return}let b=Number(new Date);if(k&&N.size!==k.size)U.get(q).lastChange=b;let Bq=U.get(q);if(b-Bq.lastChange>=J)U.delete(q),X(void 0,N);else $=setTimeout(j,z,N)})}if(!U.has(q))U.set(q,{lastChange:x,cancelWait:()=>{return U.delete(q),clearTimeout($),Q}}),$=setTimeout(j,z)}_isIgnored(q,J){if(this.options.atomic&&aq.test(q))return!0;if(!this._userIgnored){let{cwd:Q}=this.options,Z=(this.options.ignored||[]).map(zq(Q)),$=[...[...this._ignoredPaths].map(zq(Q)),...Z];this._userIgnored=qJ($,void 0)}return this._userIgnored(q,J)}_isntIgnored(q,J){return!this._isIgnored(q,J)}_getWatchHelpers(q){return new jq(q,this.options.followSymlinks,this)}_getWatchedDir(q){let J=B.resolve(q);if(!this._watched.has(J))this._watched.set(J,new kq(J,this._boundRemove));return this._watched.get(J)}_hasReadPermissions(q){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number(q.mode)&256)}_remove(q,J,Q){let X=B.join(q,J),Z=B.resolve(X);if(Q=Q!=null?Q:this._watched.has(X)||this._watched.has(Z),!this._throttle("remove",X,100))return;if(!Q&&this._watched.size===1)this.add(q,J,!0);this._getWatchedDir(X).getChildren().forEach((k)=>this._remove(X,k));let G=this._getWatchedDir(q),x=G.has(J);if(G.remove(J),this._symlinkPaths.has(Z))this._symlinkPaths.delete(Z);let U=X;if(this.options.cwd)U=B.relative(this.options.cwd,X);if(this.options.awaitWriteFinish&&this._pendingWrites.has(U)){if(this._pendingWrites.get(U).cancelWait()===C.ADD)return}this._watched.delete(X),this._watched.delete(Z);let j=Q?C.UNLINK_DIR:C.UNLINK;if(x&&!this._isIgnored(X))this._emit(j,X);this._closePath(X)}_closePath(q){this._closeFile(q);let J=B.dirname(q);this._getWatchedDir(J).remove(B.basename(q))}_closeFile(q){let J=this._closers.get(q);if(!J)return;J.forEach((Q)=>Q()),this._closers.delete(q)}_addPathCloser(q,J){if(!J)return;let Q=this._closers.get(q);if(!Q)Q=[],this._closers.set(q,Q);Q.push(J)}_readdirp(q,J){if(this.closed)return;let Q={type:C.ALL,alwaysStat:!0,lstat:!0,...J,depth:0},X=i(q,Q);return this._streams.add(X),X.once(t,()=>{X=void 0}),X.once(v,()=>{if(X)this._streams.delete(X),X=void 0}),X}};bJ={watch:$J,FSWatcher:m}});
|
|
2
|
+
export{jq as MQ,m as NQ,$J as OQ,bJ as PQ,GJ as QQ};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{P as
|
|
1
|
+
import{Yb as K,Zb as Y}from"./cli-0.1.13-xvvtja1h.mjs";import{Dq as H,Eq as U,Iq as V,Jq as W,Rm as G,Sm as B,Yq as J,er as X}from"./cli-0.1.13-fh5dndvp.mjs";import{Una as q,Xna as v}from"./cli-0.1.13-bj67mp7n.mjs";function P(h){return x.some((g)=>h.endsWith(g))}function C(h){return h.filter((g)=>H.has(g.name)||P(g.name))}function A(h,g,E){let[Q,Z]=K(G([...h,...g],"name"),J),k=($,j)=>$.name.localeCompare(j.name),w=[...Z.sort(k),...Q.sort(k)];if(z){if(z.isCoordinatorMode())return C(w)}return w}var x,z;var D=v(()=>{Y();B();U();X();x=["subscribe_pr_activity","unsubscribe_pr_activity"];z=(W(),q(V))});
|
|
2
|
+
export{P as Ub,C as Vb,A as Wb,D as Xb};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{G as
|
|
1
|
+
import{Vna as D,Yna as J}from"./cli-0.1.13-bj67mp7n.mjs";var G=D((V,E)=>{E.exports=(O,k=process.argv)=>{let q=O.startsWith("-")?"":O.length===1?"-":"--",i=k.indexOf(q+O),B=k.indexOf("--");return i!==-1&&(B===-1||i<B)}});var U=D((W,K)=>{var M=J("os"),H=J("tty"),P=G(),{env:x}=process,j;if(P("no-color")||P("no-colors")||P("color=false")||P("color=never"))j=0;else if(P("color")||P("colors")||P("color=true")||P("color=always"))j=1;if("FORCE_COLOR"in x)if(x.FORCE_COLOR==="true")j=1;else if(x.FORCE_COLOR==="false")j=0;else j=x.FORCE_COLOR.length===0?1:Math.min(parseInt(x.FORCE_COLOR,10),3);function z(O){if(O===0)return!1;return{level:O,hasBasic:!0,has256:O>=2,has16m:O>=3}}function A(O,k){if(j===0)return 0;if(P("color=16m")||P("color=full")||P("color=truecolor"))return 3;if(P("color=256"))return 2;if(O&&!k&&j===void 0)return 0;let q=j||0;if(x.TERM==="dumb")return q;if(process.platform==="win32"){let i=M.release().split(".");if(Number(i[0])>=10&&Number(i[2])>=10586)return Number(i[2])>=14931?3:2;return 1}if("CI"in x){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((i)=>(i in x))||x.CI_NAME==="codeship")return 1;return q}if("TEAMCITY_VERSION"in x)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(x.TEAMCITY_VERSION)?1:0;if(x.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in x){let i=parseInt((x.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(x.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(x.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(x.TERM))return 1;if("COLORTERM"in x)return 1;return q}function Q(O){let k=A(O,O&&O.isTTY);return z(k)}K.exports={supportsColor:Q,stdout:z(A(!0,H.isatty(1))),stderr:z(A(!0,H.isatty(2)))}});
|
|
2
|
+
export{G as Z6,U as _6};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{KK as o,MK as jj,NK as _j,OK as qj,PK as zj,QK as hj,RK as Fj,SK as Gj,TK as Hj,fs as B,gs as D,hs as Lj}from"./cli-0.1.11-s8ygndzf.mjs";import{H3 as I,K2 as T,L2 as m,M2 as r,N3 as Uj,P4 as w,Q2 as $,R2 as Kj,U2 as M,V2 as Tj,W2 as p,W4 as t,X2 as wj,Y4 as e,_2 as y,b3 as a,c3 as d,d3 as S,f3 as n,i3 as b,i5 as bj,j3 as i,k3 as s,l3 as Z,m3 as U,q1 as J,r3 as C,v1 as Bj,v3 as K,w1 as X,x3 as Ej,y1 as Dj}from"./cli-0.1.11-qbcfg80y.mjs";import{Cba as f,Haa as l,Qaa as Xj,Tca as k,Uca as H,Vba as Yj,Zca as $j,aca as _,fca as h,ica as c,lca as Zj}from"./cli-0.1.11-v7bwjqf0.mjs";import{Vma as Wj,mka as x}from"./cli-0.1.11-rrnr3ab1.mjs";import{Rna as Vj}from"./cli-0.1.11-yrfxpjhr.mjs";function Jj(){let j=f(),q=k();if(!q)return[];if(j.additionalModelOptionsCacheScope!==void 0)return j.additionalModelOptionsCacheScope===q?j.additionalModelOptionsCache??[]:[];return q==="firstParty"?j.additionalModelOptionsCache??[]:[]}function V(j=!1){if(w())return{value:null,label:"Default (recommended)",description:i(j)};let q=J()!=="firstParty";return{value:null,label:"Default (recommended)",description:`Use the default model (currently ${s(n())})${q?"":` · ${$(T)}`}`}}function Cj(){let j=J()!=="firstParty",q=process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;if(j&&q){let F=I(q);return{value:"sonnet",label:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME??q,description:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION??`Custom Sonnet model${F?" (1M context)":""}`,descriptionForModel:`${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION??`Custom Sonnet model${F?" with 1M context":""}`} (${q})`}}}function Nj(){let j=J()!=="firstParty";return{value:j?X().sonnet46:"sonnet",label:"Sonnet",description:`Sonnet 4.6 · Best for everyday tasks${j?"":` · ${$(T)}`}`,descriptionForModel:"Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"}}function xj(){let j=J()!=="firstParty",q=process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;if(j&&q){let F=I(q);return{value:"opus",label:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME??q,description:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION??`Custom Opus model${F?" (1M context)":""}`,descriptionForModel:`${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION??`Custom Opus model${F?" with 1M context":""}`} (${q})`}}}function kj(){return{value:"opus",label:"Opus 4.1",description:"Opus 4.1 · Legacy",descriptionForModel:"Opus 4.1 - legacy version"}}function A(j=!1){return{value:J()!=="firstParty"?X().opus47:"opus",label:"Opus",description:`Opus 4.7 · Most capable for complex work${Z(j)}`,descriptionForModel:"Opus 4.7 - most capable for complex work"}}function E(j=!1){return{value:X().opus46,label:"Opus 4.6",description:`Opus 4.6 · Previous Opus${Z(j)}`,descriptionForModel:"Opus 4.6 - previous Opus version"}}function v(){let j=J()!=="firstParty";return{value:j?X().sonnet46+"[1m]":"sonnet[1m]",label:"Sonnet (1M context)",description:`Sonnet 4.6 for long sessions${j?"":` · ${$(T)}`}`,descriptionForModel:"Sonnet 4.6 with 1M context window - for long sessions with large codebases"}}function yj(j=!1){return{value:J()!=="firstParty"?X().opus47+"[1m]":"opus[1m]",label:"Opus (1M context)",description:`Opus 4.7 for long sessions${Z(j)}`,descriptionForModel:"Opus 4.7 with 1M context window - for long sessions with large codebases"}}function Sj(j=!1){return{value:X().opus46+"[1m]",label:"Opus 4.6 (1M context)",description:`Opus 4.6 with 1M context · Previous Opus${Z(j)}`,descriptionForModel:"Opus 4.6 with 1M context - previous Opus version"}}function Ij(){let j=J()!=="firstParty",q=process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;if(j&&q)return{value:"haiku",label:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME??q,description:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION??"Custom Haiku model",descriptionForModel:`${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION??"Custom Haiku model"} (${q})`}}function Qj(){return{value:"haiku",label:"Haiku",description:`Haiku 4.5 · Fastest for quick answers${J()!=="firstParty"?"":` · ${$(r)}`}`,descriptionForModel:"Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."}}function Aj(){return{value:"haiku",label:"Haiku",description:`Haiku 3.5 for simple tasks${J()!=="firstParty"?"":` · ${$(m)}`}`,descriptionForModel:"Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."}}function vj(){return S()===X().haiku45?Qj():Aj()}function Rj(j=!1){return{value:"opus",label:"Opus",description:`Opus 4.7 · Most capable for complex work${j?Z(!0):""}`}}function P(){let j=J()!=="firstParty";return{value:"sonnet[1m]",label:"Sonnet (1M context)",description:`Sonnet 4.6 with 1M context${w()?" · Billed as extra usage":""}${j?"":` · ${$(T)}`}`}}function g(j=!1){return{value:"opus[1m]",label:"Opus (1M context)",description:`Opus 4.7 with 1M context${w()?" · Billed as extra usage":""}${Z(j)}`}}function N(j=!1){let q=J()!=="firstParty";return{value:q?X().opus47+"[1m]":"opus[1m]",label:"Opus (1M context)",description:`Opus 4.7 with 1M context · Most capable for complex work${!q&&j?Z(j):""}`,descriptionForModel:"Opus 4.7 with 1M context - most capable for complex work"}}function gj(){return{value:"opusplan",label:"Opus Plan Mode",description:"Use Opus 4.7 in plan mode, Sonnet 4.6 otherwise"}}function Oj(){return{value:"gpt-5.5",label:"gpt-5.5",description:"GPT-5.5 on the Codex backend with high reasoning"}}function uj(){return{value:"gpt-5.3-codex-spark",label:"gpt-5.3-codex-spark",description:"GPT-5.3 Codex Spark on the Codex backend for fast tool loops"}}function lj(){return[{value:"gpt-5.5",label:"gpt-5.5",description:"GPT-5.5 with high reasoning"},{value:"gpt-5.4",label:"gpt-5.4",description:"GPT-5.4 with high reasoning"},{value:"gpt-5.3-codex",label:"gpt-5.3-codex",description:"GPT-5.3 Codex with high reasoning"},{value:"gpt-5.3-codex-spark",label:"gpt-5.3-codex-spark",description:"GPT-5.3 Codex Spark for fast tool loops"},{value:"codexspark",label:"codexspark",description:"GPT-5.3 Codex Spark alias for fast tool loops"},{value:"gpt-5.2-codex",label:"gpt-5.2-codex",description:"GPT-5.2 Codex with high reasoning"},{value:"gpt-5.1-codex-max",label:"gpt-5.1-codex-max",description:"GPT-5.1 Codex Max for deep reasoning"},{value:"gpt-5.1-codex-mini",label:"gpt-5.1-codex-mini",description:"GPT-5.1 Codex Mini - faster, cheaper"},{value:"gpt-5.5-mini",label:"gpt-5.5-mini",description:"GPT-5.5 Mini - faster, cheaper"},{value:"gpt-5.4-mini",label:"gpt-5.4-mini",description:"GPT-5.4 Mini - faster, cheaper"}]}function fj(){return p().map((j)=>({value:j.id,label:j.name,description:`${j.family}${j.reasoning?" · Reasoning":""}${j.tool_call?" · Tool call":""} · ${Math.round(j.limit.context/1000)}K context`}))}function u(j=!1){if(J()==="github")return[V(j),...fj()];if(J()==="openai"&&o()){let z=V(j),G=jj();if(G.length>0)return[z,...G];let L=y()??x();if(L!=null)return[z,{value:L,label:L,description:"Currently configured Ollama model"}];return[z]}if(qj()){let z=V(j),G=zj();if(G.length>0)return[z,...G];return[z]}if(Fj()){let z=V(j),G=Gj();if(G.length>0)return[z,...G];return[z]}if(w()){if(t()||e()){let G=[V(j)];if(!U()&&B())G.push(g(j));if(G.push(Pj),D())G.push(P());return G.push(E(j)),G.push(O),G}let z=[V(j)];if(D())z.push(P());if(U())z.push(N(j));else if(z.push(Rj(j)),B())z.push(g(j));return z.push(E(j)),z.push(O),z}if(k()?.startsWith("openai:")){let z=c();return[V(j),...z.length>0?z:Jj()]}if(J()==="openai"&&!H()){let z=_();if(z){let G=h(z);if(G.length>0)return W([V(j),...G])}}let q=[];{let z=_();if(z){let G=h(z);q.push(...G)}}if(J()==="firstParty"){let z=[V(j)];if(D())z.push(v());if(U())z.push(N(j));else if(z.push(A(j)),B())z.push(yj(j));return z.push(E(j)),z.push(Qj()),z.push(...q),z}let F=[V(j)];if(H()||J()==="codex")F.push(...lj());let Q=Cj();if(Q!==void 0)F.push(Q);else if(F.push(Nj()),D())F.push(v());let R=xj();if(R!==void 0)F.push(R);else if(F.push(kj()),F.push(E(j)),F.push(A(j)),B())F.push(Sj(j));let Y=Ij();if(Y!==void 0)F.push(Y);else F.push(vj());return F.push(...q),F}function cj(j){let q=b(j);if(q.includes("claude-sonnet-4-6")||q.includes("claude-sonnet-4-5")||q.includes("claude-sonnet-4-")||q.includes("claude-3-7-sonnet")||q.includes("claude-3-5-sonnet")){let F=K(d());if(F)return{alias:"Sonnet",currentVersionName:F}}if(q.includes("claude-opus-4")){let F=K(a());if(F)return{alias:"Opus",currentVersionName:F}}if(q.includes("claude-haiku")||q.includes("claude-3-5-haiku")){let F=K(S());if(F)return{alias:"Haiku",currentVersionName:F}}return null}function mj(j){let q=K(j);if(!q)return null;let F=cj(j);if(!F)return{value:j,label:q,description:j};if(q!==F.currentVersionName)return{value:j,label:q,description:`Newer version available · select ${F.alias} for ${F.currentVersionName}`};return{value:j,label:q,description:j}}function Rq(j=!1){if(J()==="github")return W(u(j));let q=u(j),F=process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;if(F&&!q.some((z)=>z.value===F))q.push({value:F,label:process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME??F,description:process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION??`Custom model (${F})`});for(let z of Jj())if(!q.some((G)=>G.value===z.value))q.push(z);let Q=null,R=y(),Y=x();if(R!==void 0&&R!==null)Q=R;else if(Y!==null)Q=Y;if(Q===null||q.some((z)=>{if(z.value===Q)return!0;if(z.value===null)return!1;try{return b(C(String(z.value)))===b(C(Q))}catch{return!1}}))return W(q);else if(Q==="opusplan")return W([...q,gj()]);else if(Q==="gpt-5.5")return W([...q,Oj()]);else if(Q==="gpt-5.3-codex-spark")return W([...q,uj()]);else if(Q==="opus"&&J()==="firstParty")return W([...q,Rj(j)]);else if(Q==="opus[1m]"&&J()==="firstParty")return W([...q,N(j)]);else{let z=mj(Q);if(z)q.push(z);else q.push({value:Q,label:Q,description:"Custom model"});return W(q)}}function W(j){let F=!(l()||{}).availableModels?j:j.filter((R)=>R.value===null||R.value!==null&&M(R.value)),Q=new Set;return F.filter((R)=>{let Y=String(R.value);if(Q.has(Y))return!1;return Q.add(Y),!0})}var Pj,O;var rj=Vj(()=>{Wj();$j();bj();Dj();Kj();Xj();Lj();Bj();Tj();Ej();Uj();Yj();Zj();_j();hj();Hj();wj();Pj={value:"sonnet",label:"Sonnet",description:"Sonnet 4.6 · Best for everyday tasks"},O={value:"haiku",label:"Haiku",description:"Haiku 4.5 · Fastest for quick answers"}});
|
|
1
|
+
import{RK as o,TK as jj,UK as _j,VK as qj,WK as zj,XK as hj,YK as Fj,ZK as Gj,_K as Hj,ks as B,ls as D,ms as Lj}from"./cli-0.1.13-fh5dndvp.mjs";import{D1 as Bj,D3 as K,E1 as X,F3 as Ej,G1 as Dj,P3 as I,S2 as T,T2 as m,U2 as r,V3 as Uj,X4 as w,Y2 as $,Z2 as Kj,a3 as M,b3 as Tj,c3 as p,c5 as t,d3 as wj,e5 as e,g3 as y,j3 as a,k3 as d,l3 as S,n3 as n,q3 as b,q5 as bj,r3 as i,s3 as s,t3 as Z,u3 as U,y1 as J,z3 as C}from"./cli-0.1.13-bzgpcgdt.mjs";import{Pba as f,Uaa as l,bba as Xj,eda as k,fda as H,gca as Yj,kda as $j,nca as _,sca as h,vca as c,yca as Zj}from"./cli-0.1.13-dag38tkx.mjs";import{gna as Wj,zka as x}from"./cli-0.1.13-52f40ba4.mjs";import{Xna as Vj}from"./cli-0.1.13-bj67mp7n.mjs";function Jj(){let j=f(),q=k();if(!q)return[];if(j.additionalModelOptionsCacheScope!==void 0)return j.additionalModelOptionsCacheScope===q?j.additionalModelOptionsCache??[]:[];return q==="firstParty"?j.additionalModelOptionsCache??[]:[]}function V(j=!1){if(w())return{value:null,label:"Default (recommended)",description:i(j)};let q=J()!=="firstParty";return{value:null,label:"Default (recommended)",description:`Use the default model (currently ${s(n())})${q?"":` · ${$(T)}`}`}}function Cj(){let j=J()!=="firstParty",q=process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;if(j&&q){let F=I(q);return{value:"sonnet",label:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME??q,description:process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION??`Custom Sonnet model${F?" (1M context)":""}`,descriptionForModel:`${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION??`Custom Sonnet model${F?" with 1M context":""}`} (${q})`}}}function Nj(){let j=J()!=="firstParty";return{value:j?X().sonnet46:"sonnet",label:"Sonnet",description:`Sonnet 4.6 · Best for everyday tasks${j?"":` · ${$(T)}`}`,descriptionForModel:"Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"}}function xj(){let j=J()!=="firstParty",q=process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;if(j&&q){let F=I(q);return{value:"opus",label:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME??q,description:process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION??`Custom Opus model${F?" (1M context)":""}`,descriptionForModel:`${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION??`Custom Opus model${F?" with 1M context":""}`} (${q})`}}}function kj(){return{value:"opus",label:"Opus 4.1",description:"Opus 4.1 · Legacy",descriptionForModel:"Opus 4.1 - legacy version"}}function A(j=!1){return{value:J()!=="firstParty"?X().opus47:"opus",label:"Opus",description:`Opus 4.7 · Most capable for complex work${Z(j)}`,descriptionForModel:"Opus 4.7 - most capable for complex work"}}function E(j=!1){return{value:X().opus46,label:"Opus 4.6",description:`Opus 4.6 · Previous Opus${Z(j)}`,descriptionForModel:"Opus 4.6 - previous Opus version"}}function v(){let j=J()!=="firstParty";return{value:j?X().sonnet46+"[1m]":"sonnet[1m]",label:"Sonnet (1M context)",description:`Sonnet 4.6 for long sessions${j?"":` · ${$(T)}`}`,descriptionForModel:"Sonnet 4.6 with 1M context window - for long sessions with large codebases"}}function yj(j=!1){return{value:J()!=="firstParty"?X().opus47+"[1m]":"opus[1m]",label:"Opus (1M context)",description:`Opus 4.7 for long sessions${Z(j)}`,descriptionForModel:"Opus 4.7 with 1M context window - for long sessions with large codebases"}}function Sj(j=!1){return{value:X().opus46+"[1m]",label:"Opus 4.6 (1M context)",description:`Opus 4.6 with 1M context · Previous Opus${Z(j)}`,descriptionForModel:"Opus 4.6 with 1M context - previous Opus version"}}function Ij(){let j=J()!=="firstParty",q=process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;if(j&&q)return{value:"haiku",label:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME??q,description:process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION??"Custom Haiku model",descriptionForModel:`${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION??"Custom Haiku model"} (${q})`}}function Qj(){return{value:"haiku",label:"Haiku",description:`Haiku 4.5 · Fastest for quick answers${J()!=="firstParty"?"":` · ${$(r)}`}`,descriptionForModel:"Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."}}function Aj(){return{value:"haiku",label:"Haiku",description:`Haiku 3.5 for simple tasks${J()!=="firstParty"?"":` · ${$(m)}`}`,descriptionForModel:"Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."}}function vj(){return S()===X().haiku45?Qj():Aj()}function Rj(j=!1){return{value:"opus",label:"Opus",description:`Opus 4.7 · Most capable for complex work${j?Z(!0):""}`}}function P(){let j=J()!=="firstParty";return{value:"sonnet[1m]",label:"Sonnet (1M context)",description:`Sonnet 4.6 with 1M context${w()?" · Billed as extra usage":""}${j?"":` · ${$(T)}`}`}}function g(j=!1){return{value:"opus[1m]",label:"Opus (1M context)",description:`Opus 4.7 with 1M context${w()?" · Billed as extra usage":""}${Z(j)}`}}function N(j=!1){let q=J()!=="firstParty";return{value:q?X().opus47+"[1m]":"opus[1m]",label:"Opus (1M context)",description:`Opus 4.7 with 1M context · Most capable for complex work${!q&&j?Z(j):""}`,descriptionForModel:"Opus 4.7 with 1M context - most capable for complex work"}}function gj(){return{value:"opusplan",label:"Opus Plan Mode",description:"Use Opus 4.7 in plan mode, Sonnet 4.6 otherwise"}}function Oj(){return{value:"gpt-5.5",label:"gpt-5.5",description:"GPT-5.5 on the Codex backend with high reasoning"}}function uj(){return{value:"gpt-5.3-codex-spark",label:"gpt-5.3-codex-spark",description:"GPT-5.3 Codex Spark on the Codex backend for fast tool loops"}}function lj(){return[{value:"gpt-5.5",label:"gpt-5.5",description:"GPT-5.5 with high reasoning"},{value:"gpt-5.4",label:"gpt-5.4",description:"GPT-5.4 with high reasoning"},{value:"gpt-5.3-codex",label:"gpt-5.3-codex",description:"GPT-5.3 Codex with high reasoning"},{value:"gpt-5.3-codex-spark",label:"gpt-5.3-codex-spark",description:"GPT-5.3 Codex Spark for fast tool loops"},{value:"codexspark",label:"codexspark",description:"GPT-5.3 Codex Spark alias for fast tool loops"},{value:"gpt-5.2-codex",label:"gpt-5.2-codex",description:"GPT-5.2 Codex with high reasoning"},{value:"gpt-5.1-codex-max",label:"gpt-5.1-codex-max",description:"GPT-5.1 Codex Max for deep reasoning"},{value:"gpt-5.1-codex-mini",label:"gpt-5.1-codex-mini",description:"GPT-5.1 Codex Mini - faster, cheaper"},{value:"gpt-5.5-mini",label:"gpt-5.5-mini",description:"GPT-5.5 Mini - faster, cheaper"},{value:"gpt-5.4-mini",label:"gpt-5.4-mini",description:"GPT-5.4 Mini - faster, cheaper"}]}function fj(){return p().map((j)=>({value:j.id,label:j.name,description:`${j.family}${j.reasoning?" · Reasoning":""}${j.tool_call?" · Tool call":""} · ${Math.round(j.limit.context/1000)}K context`}))}function u(j=!1){if(J()==="github")return[V(j),...fj()];if(J()==="openai"&&o()){let z=V(j),G=jj();if(G.length>0)return[z,...G];let L=y()??x();if(L!=null)return[z,{value:L,label:L,description:"Currently configured Ollama model"}];return[z]}if(qj()){let z=V(j),G=zj();if(G.length>0)return[z,...G];return[z]}if(Fj()){let z=V(j),G=Gj();if(G.length>0)return[z,...G];return[z]}if(w()){if(t()||e()){let G=[V(j)];if(!U()&&B())G.push(g(j));if(G.push(Pj),D())G.push(P());return G.push(E(j)),G.push(O),G}let z=[V(j)];if(D())z.push(P());if(U())z.push(N(j));else if(z.push(Rj(j)),B())z.push(g(j));return z.push(E(j)),z.push(O),z}if(k()?.startsWith("openai:")){let z=c();return[V(j),...z.length>0?z:Jj()]}if(J()==="openai"&&!H()){let z=_();if(z){let G=h(z);if(G.length>0)return W([V(j),...G])}}let q=[];{let z=_();if(z){let G=h(z);q.push(...G)}}if(J()==="firstParty"){let z=[V(j)];if(D())z.push(v());if(U())z.push(N(j));else if(z.push(A(j)),B())z.push(yj(j));return z.push(E(j)),z.push(Qj()),z.push(...q),z}let F=[V(j)];if(H()||J()==="codex")F.push(...lj());let Q=Cj();if(Q!==void 0)F.push(Q);else if(F.push(Nj()),D())F.push(v());let R=xj();if(R!==void 0)F.push(R);else if(F.push(kj()),F.push(E(j)),F.push(A(j)),B())F.push(Sj(j));let Y=Ij();if(Y!==void 0)F.push(Y);else F.push(vj());return F.push(...q),F}function cj(j){let q=b(j);if(q.includes("claude-sonnet-4-6")||q.includes("claude-sonnet-4-5")||q.includes("claude-sonnet-4-")||q.includes("claude-3-7-sonnet")||q.includes("claude-3-5-sonnet")){let F=K(d());if(F)return{alias:"Sonnet",currentVersionName:F}}if(q.includes("claude-opus-4")){let F=K(a());if(F)return{alias:"Opus",currentVersionName:F}}if(q.includes("claude-haiku")||q.includes("claude-3-5-haiku")){let F=K(S());if(F)return{alias:"Haiku",currentVersionName:F}}return null}function mj(j){let q=K(j);if(!q)return null;let F=cj(j);if(!F)return{value:j,label:q,description:j};if(q!==F.currentVersionName)return{value:j,label:q,description:`Newer version available · select ${F.alias} for ${F.currentVersionName}`};return{value:j,label:q,description:j}}function Rq(j=!1){if(J()==="github")return W(u(j));let q=u(j),F=process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;if(F&&!q.some((z)=>z.value===F))q.push({value:F,label:process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME??F,description:process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION??`Custom model (${F})`});for(let z of Jj())if(!q.some((G)=>G.value===z.value))q.push(z);let Q=null,R=y(),Y=x();if(R!==void 0&&R!==null)Q=R;else if(Y!==null)Q=Y;if(Q===null||q.some((z)=>{if(z.value===Q)return!0;if(z.value===null)return!1;try{return b(C(String(z.value)))===b(C(Q))}catch{return!1}}))return W(q);else if(Q==="opusplan")return W([...q,gj()]);else if(Q==="gpt-5.5")return W([...q,Oj()]);else if(Q==="gpt-5.3-codex-spark")return W([...q,uj()]);else if(Q==="opus"&&J()==="firstParty")return W([...q,Rj(j)]);else if(Q==="opus[1m]"&&J()==="firstParty")return W([...q,N(j)]);else{let z=mj(Q);if(z)q.push(z);else q.push({value:Q,label:Q,description:"Custom model"});return W(q)}}function W(j){let F=!(l()||{}).availableModels?j:j.filter((R)=>R.value===null||R.value!==null&&M(R.value)),Q=new Set;return F.filter((R)=>{let Y=String(R.value);if(Q.has(Y))return!1;return Q.add(Y),!0})}var Pj,O;var rj=Vj(()=>{Wj();$j();bj();Dj();Kj();Xj();Lj();Bj();Tj();Ej();Uj();Yj();Zj();_j();hj();Hj();wj();Pj={value:"sonnet",label:"Sonnet",description:"Sonnet 4.6 · Best for everyday tasks"},O={value:"haiku",label:"Haiku",description:"Haiku 4.5 · Fastest for quick answers"}});
|
|
2
2
|
export{Rq as Df,rj as Ef};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{E as
|
|
1
|
+
import{GX as N,HX as V,IX as D}from"./cli-0.1.13-0xy8k6yv.mjs";import{D1 as _,S4 as J,U4 as $,X4 as B,q5 as x,r4 as Z,y1 as Y}from"./cli-0.1.13-bzgpcgdt.mjs";import{C6 as X,T6 as R}from"./cli-0.1.13-wh68ve92.mjs";import{Wea as Q,afa as P}from"./cli-0.1.13-pw5dks39.mjs";import{Xna as W}from"./cli-0.1.13-bj67mp7n.mjs";function E(){let z=process.env.CLAUDE_AGENT_SDK_VERSION?`, agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`:"",F=process.env.CLAUDE_AGENT_SDK_CLIENT_APP?`, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`:"";return`claude-cli/99.0.0 (${process.env.CLAUDE_CODE_ENTRYPOINT??"cli"}${z}${F})`}function I(){let z=[];if(process.env.CLAUDE_CODE_ENTRYPOINT)z.push(process.env.CLAUDE_CODE_ENTRYPOINT);if(process.env.CLAUDE_AGENT_SDK_VERSION)z.push(`agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`);if(process.env.CLAUDE_AGENT_SDK_CLIENT_APP)z.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);return`claude-code/99.0.0${z.length>0?` (${z.join(", ")})`:""}`}function w(){if(Y()==="firstParty")return`Claude-User (${N()}; +https://support.anthropic.com/)`;return`Claudio-User (${V()})`}function C(){if(B()){let F=J();if(!F?.accessToken)return{headers:{},error:"No OAuth token available"};return{headers:{Authorization:`Bearer ${F.accessToken}`,"anthropic-beta":Q}}}let z=Z();if(!z)return{headers:{},error:"No API key available"};return{headers:{"x-api-key":z}}}async function O(z,F){try{return await z()}catch(G){if(!X.isAxiosError(G))throw G;let L=G.response?.status;if(!(L===401||F?.also403Revoked&&L===403&&typeof G.response?.data==="string"&&G.response.data.includes("OAuth token has been revoked")))throw G;let M=J()?.accessToken;if(!M)throw G;return await $(M),await z()}}var H=W(()=>{R();P();x();_();D()});
|
|
2
|
+
export{E as AX,I as BX,w as CX,C as DX,O as EX,H as FX};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Hca as R,Ica as T,d8 as U,f8 as m,lca as P,nda as H,pca as M,qda as E,yca as S}from"./cli-0.1.13-dag38tkx.mjs";import{Dha as K,Lha as G}from"./cli-0.1.13-1g6bgaa6.mjs";import{Xna as x}from"./cli-0.1.13-bj67mp7n.mjs";function B(){return process.env.GITHUB_DEVICE_FLOW_CLIENT_ID?.trim()||f}function O(J){return new Promise((N)=>setTimeout(N,J))}async function n(J){let N=J?.clientId??B();if(!N)throw new j("No OAuth client ID: set GITHUB_DEVICE_FLOW_CLIENT_ID.");let V=J?.fetchImpl??fetch,$=J?.scope?.trim()||Y,X=$===Y?[$]:[$,Y],y="Device code request failed.";for(let W of X){let Z=await V(g,{method:"POST",headers:{Accept:"application/json"},body:new URLSearchParams({client_id:N,scope:W})});if(!Z.ok){let C=await Z.text().catch(()=>"");y=`Device code request failed: ${Z.status} ${C}`;let F=/invalid_scope/i.test(C);if(W!==Y&&F)continue;throw new j(y)}let Q=await Z.json(),z=Q.device_code,q=Q.user_code,A=Q.verification_uri;if(typeof z!=="string"||typeof q!=="string"||typeof A!=="string")throw new j("Malformed device code response from GitHub");return{device_code:z,user_code:q,verification_uri:A,expires_in:typeof Q.expires_in==="number"?Q.expires_in:900,interval:typeof Q.interval==="number"?Q.interval:5}}throw new j(y)}async function d(J,N){let V=N?.clientId??B();if(!V)throw new j("client_id required for polling");let $=Math.max(1,N?.initialInterval??5),X=N?.timeoutSeconds??900,y=N?.fetchImpl??fetch,W=Date.now();while((Date.now()-W)/1000<X){let Z=await y(_,{method:"POST",headers:{Accept:"application/json"},body:new URLSearchParams({client_id:V,device_code:J,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});if(!Z.ok){let q=await Z.text().catch(()=>"");throw new j(`Token request failed: ${Z.status} ${q}`)}let Q=await Z.json(),z=Q.error;if(z==null){let q=Q.access_token;if(typeof q==="string"&&q)return q;throw new j("No access_token in response")}if(z==="authorization_pending"){await O($*1000);continue}if(z==="slow_down"){$=typeof Q.interval==="number"?Q.interval:$+5,await O($*1000);continue}if(z==="expired_token")throw new j("Device code expired. Start the login flow again.");if(z==="access_denied")throw new j("Authorization was denied or cancelled.");throw new j(`GitHub OAuth error: ${z}`)}throw new j("Timed out waiting for authorization.")}async function a(J){try{if(process.platform==="darwin")await U("open",[J],{useCwd:!1,timeout:5000});else if(process.platform==="win32")await U("cmd",["/c","start","",J],{useCwd:!1,timeout:5000});else await U("xdg-open",[J],{useCwd:!1,timeout:5000})}catch{}}async function w(J,N){let $=await(N??fetch)(k,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${J}`,...b}});if(!$.ok){let z=await $.text().catch(()=>"");throw new j(`Copilot token exchange failed: ${$.status} ${z}`)}let X=await $.json(),y=X.token,W=X.expires_at,Z=X.refresh_in,Q=X.endpoints;if(typeof y!=="string"||typeof W!=="number"||typeof Z!=="number"||!Q||typeof Q!=="object"||typeof Q.api!=="string")throw new j("Malformed Copilot token response");return{token:y,expires_at:W,refresh_in:Z,endpoints:Q}}var f="Iv1.b507a08c87ecfe98",g="https://github.com/login/device/code",_="https://github.com/login/oauth/access_token",k="https://api.github.com/copilot_internal/v2/token",Y="read:user",b,j;var I=x(()=>{m();b={"User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.99.3","Editor-Plugin-Version":"copilot-chat/0.26.7","Copilot-Integration-Id":"vscode-chat"};j=class j extends Error{constructor(J){super(J);this.name="GitHubDeviceFlowError"}}});function D(){return H()?.transport==="github_copilot"}function h(J){let N=J.match(/exp=(\d+)/);if(N){let X=Number(N[1]);if(!Number.isNaN(X))return Date.now()>=X*1000?"expired":"valid"}let V=J.split(".");if(V.length===3&&V.every((X)=>/^[A-Za-z0-9_-]+$/.test(X)))try{let X=V[1].replace(/-/g,"+").replace(/_/g,"/"),y=X+"=".repeat((4-X.length%4)%4),W=Buffer.from(y,"base64").toString("utf8"),Z=JSON.parse(W);if(Z&&typeof Z==="object"&&Z.exp)return Date.now()>=Z.exp*1000?"expired":"valid"}catch{return"invalid_format"}return"invalid_format"}function v(){if(K())return;try{return R().read()?.githubModels?.accessToken?.trim()||void 0}catch{return}}async function QJ(){if(K())return;try{return(await R().readAsync())?.githubModels?.accessToken?.trim()||void 0}catch{return}}function XJ(){if(!D())return;if(K())return;if(v())return}async function ZJ(){if(!D())return!1;if(K())return!1;try{let V=R().read()?.githubModels,$=V?.accessToken?.trim()||"",X=V?.oauthAccessToken?.trim()||"";if(!$&&!X)return!1;if(($?h($):"expired")==="valid")return!1;if(!X)return!1;let W=await w(X);if(!u(W.token,X).success)return!1;let Q=P().find((z)=>z.provider==="openai"&&z.extras?.githubToken!==void 0);if(Q)M(Q.id,{provider:"openai",name:Q.name,baseUrl:Q.baseUrl,model:Q.model,apiKey:W.token,extras:{...Q.extras,githubToken:W.token}});return!0}catch{return!1}}function u(J,N){if(K())return{success:!1,warning:"Bare mode: secure storage is disabled."};let V=J.trim();if(!V)return{success:!1,warning:"Token is empty."};let $=R(),X=$.read()||{},y=X[L],W=N?.trim(),Z={accessToken:V};if(W)Z.oauthAccessToken=W;else if(y?.oauthAccessToken?.trim())Z.oauthAccessToken=y.oauthAccessToken.trim();let Q={...X,[L]:Z};return $.update(Q)}function $J(){if(K())return{success:!0};let J=R(),V={...J.read()||{}};return delete V[L],J.update(V)}var L="githubModels",JJ="CLAUDE_CODE_GITHUB_TOKEN_HYDRATED";var l=x(()=>{E();G();T();I();S()});
|
|
2
|
+
export{n as p0,d as q0,a as r0,w as s0,I as t0,L as u0,JJ as v0,v as w0,QJ as x0,XJ as y0,ZJ as z0,u as A0,$J as B0,l as C0};
|