@claudiolabs/claudin 0.6.13 → 0.6.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AgentTool-0.6.14-xrhjvxqt.mjs +1 -0
- package/dist/chunks/App-0.6.14-nfgrt17c.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.6.14-4394rxge.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.6.14-k9ycen5r.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.6.14-83erp0by.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.6.14-yg241yyt.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.14-h284g2h5.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.6.14-1j52jykj.mjs +1 -0
- package/dist/chunks/DiffDialog-0.6.14-qf3p4jd6.mjs +7 -0
- package/dist/chunks/Doctor-0.6.14-9tzq86fq.mjs +1 -0
- package/dist/chunks/ExplorerDialog-0.6.14-ngnzawn3.mjs +6 -0
- package/dist/chunks/Grove-0.6.14-nf1j5862.mjs +1 -0
- package/dist/chunks/ITermBackend-0.6.14-fcrrth30.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.6.14-pc5rtmwz.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.6.14-f2aqj7b2.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.6.14-y72q04xs.mjs +1 -0
- package/dist/chunks/Onboarding-0.6.14-z4c051ds.mjs +1 -0
- package/dist/chunks/ProviderManager-0.6.14-5v58y8rq.mjs +1 -0
- package/dist/chunks/REPL-0.6.14-m1rtq4nq.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.6.14-58nmeyhm.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.6.14-hy43hxaf.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.6.14-5kncw55y.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.6.14-nwfww4kk.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.6.14-z2dt3f1b.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.6.14-pqjfnrw6.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.6.14-0cce0b2h.mjs +1 -0
- package/dist/chunks/TrustDialog-0.6.14-5yzgt2bj.mjs +1 -0
- package/dist/chunks/activeProvider-0.6.14-mw3fqk9q.mjs +1 -0
- package/dist/chunks/add-dir-0.6.14-yw3tymgp.mjs +1 -0
- package/dist/chunks/agents-0.6.14-kjhjevhb.mjs +3 -0
- package/dist/chunks/agents-0.6.14-nv6zbrmz.mjs +110 -0
- package/dist/chunks/api-0.6.14-fv7cq859.mjs +1 -0
- package/dist/chunks/asciicast-0.6.14-f74vgv8x.mjs +1 -0
- package/dist/chunks/assistant-0.6.14-1gccdgy8.mjs +1 -0
- package/dist/chunks/auth-0.6.14-f22qzwg0.mjs +1 -0
- package/dist/chunks/auth-0.6.14-ngdv38z5.mjs +1 -0
- package/dist/chunks/autoMode-0.6.14-fav4fw0r.mjs +48 -0
- package/dist/chunks/autoUpdater-0.6.14-y0g8h11s.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-0.6.14-fhkm64fw.mjs +1 -0
- package/dist/chunks/branch-0.6.14-yc20c8aq.mjs +4 -0
- package/dist/chunks/bridge-0.6.14-7gf7tehd.mjs +2 -0
- package/dist/chunks/bridgeConfig-0.6.14-wt7r4fwp.mjs +1 -0
- package/dist/chunks/bridgeEnabled-0.6.14-hztrqdk5.mjs +1 -0
- package/dist/chunks/bridgeMain-0.6.14-5zr5zygz.mjs +88 -0
- package/dist/chunks/bridgePointer-0.6.14-18tfrr2m.mjs +1 -0
- package/dist/chunks/btw-0.6.14-85qdeh59.mjs +1 -0
- package/dist/chunks/buddy-0.6.14-76httc04.mjs +3 -0
- package/dist/chunks/cacache-0.6.14-8azhr0nq.mjs +1 -0
- package/dist/chunks/cache-probe-0.6.14-baevy66q.mjs +21 -0
- package/dist/chunks/cacheStats-0.6.14-gyeh90zg.mjs +4 -0
- package/dist/chunks/caches-0.6.14-pjn29fse.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.6.14-eqfeec6n.mjs +1 -0
- package/dist/chunks/claudemd-0.6.14-axn98g3r.mjs +1 -0
- package/dist/chunks/clear-0.6.14-rqxgps7y.mjs +1 -0
- package/dist/chunks/clearTerminal-0.6.14-qv4wd3dp.mjs +1 -0
- package/dist/chunks/cli-0.6.14-00n6mq14.mjs +2 -0
- package/dist/chunks/cli-0.6.14-01m8v54j.mjs +59 -0
- package/dist/chunks/cli-0.6.14-02qtx9sh.mjs +2 -0
- package/dist/chunks/cli-0.6.14-04m30ved.mjs +2 -0
- package/dist/chunks/cli-0.6.14-06eabjt6.mjs +2 -0
- package/dist/chunks/cli-0.6.14-0a0ncvrs.mjs +2 -0
- package/dist/chunks/cli-0.6.14-0bsm5jn0.mjs +2 -0
- package/dist/chunks/cli-0.6.14-0h1s6fwr.mjs +5 -0
- package/dist/chunks/cli-0.6.14-0kj0zvsp.mjs +2 -0
- package/dist/chunks/cli-0.6.14-0kk6g260.mjs +2 -0
- package/dist/chunks/cli-0.6.14-0ycrhwsw.mjs +6 -0
- package/dist/chunks/cli-0.6.14-1007zfjt.mjs +2 -0
- package/dist/chunks/cli-0.6.14-106t4q8a.mjs +2 -0
- package/dist/chunks/cli-0.6.14-11n72npf.mjs +4 -0
- package/dist/chunks/cli-0.6.14-198q94mb.mjs +2 -0
- package/dist/chunks/cli-0.6.14-1mp3bqqa.mjs +2 -0
- package/dist/chunks/cli-0.6.14-1rd9c9zq.mjs +2 -0
- package/dist/chunks/cli-0.6.14-1rk4shzr.mjs +4 -0
- package/dist/chunks/cli-0.6.14-1wfs4a9y.mjs +34 -0
- package/dist/chunks/cli-0.6.14-1whzwvvw.mjs +1 -0
- package/dist/chunks/cli-0.6.14-1wqr5xn1.mjs +15 -0
- package/dist/chunks/cli-0.6.14-1ys7hxgb.mjs +2 -0
- package/dist/chunks/cli-0.6.14-21808d8s.mjs +2 -0
- package/dist/chunks/cli-0.6.14-28qb772v.mjs +2 -0
- package/dist/chunks/cli-0.6.14-28ysbvb3.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2bs3j4p8.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2cexfn3w.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2hzx798v.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2javagj5.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2jgq14za.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2kj6t828.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2nwr8x55.mjs +2 -0
- package/dist/chunks/cli-0.6.14-2wn0hvep.mjs +2 -0
- package/dist/chunks/cli-0.6.14-3hq9q0xq.mjs +2 -0
- package/dist/chunks/cli-0.6.14-41a9k5hf.mjs +2 -0
- package/dist/chunks/cli-0.6.14-45cmq90s.mjs +2 -0
- package/dist/chunks/cli-0.6.14-45zdemyc.mjs +2 -0
- package/dist/chunks/cli-0.6.14-474e3rz7.mjs +2 -0
- package/dist/chunks/cli-0.6.14-480kc454.mjs +2 -0
- package/dist/chunks/cli-0.6.14-4jf7959w.mjs +2 -0
- package/dist/chunks/cli-0.6.14-4txh6031.mjs +2 -0
- package/dist/chunks/cli-0.6.14-4x6ppgsd.mjs +2 -0
- package/dist/chunks/cli-0.6.14-50e0q2ad.mjs +42 -0
- package/dist/chunks/cli-0.6.14-54jnnybp.mjs +8 -0
- package/dist/chunks/cli-0.6.14-58f16f68.mjs +2 -0
- package/dist/chunks/cli-0.6.14-645ardy7.mjs +2 -0
- package/dist/chunks/cli-0.6.14-666a7kck.mjs +2 -0
- package/dist/chunks/cli-0.6.14-67c3dtne.mjs +3 -0
- package/dist/chunks/cli-0.6.14-697075tj.mjs +133 -0
- package/dist/chunks/cli-0.6.14-6aay4k94.mjs +4 -0
- package/dist/chunks/cli-0.6.14-6bagc6mm.mjs +3 -0
- package/dist/chunks/cli-0.6.14-6ewrcjxp.mjs +2 -0
- package/dist/chunks/cli-0.6.14-6fqpmby9.mjs +2 -0
- package/dist/chunks/cli-0.6.14-6g4tz2xj.mjs +2 -0
- package/dist/chunks/cli-0.6.14-6jfxad27.mjs +2 -0
- package/dist/chunks/cli-0.6.14-6qk1tfbt.mjs +3 -0
- package/dist/chunks/cli-0.6.14-70gt6pyh.mjs +2 -0
- package/dist/chunks/cli-0.6.14-7202pzsa.mjs +2 -0
- package/dist/chunks/cli-0.6.14-742r2xc2.mjs +2 -0
- package/dist/chunks/cli-0.6.14-7dv884y9.mjs +2 -0
- package/dist/chunks/cli-0.6.14-7e258xyd.mjs +2 -0
- package/dist/chunks/cli-0.6.14-7r0v4vgc.mjs +4 -0
- package/dist/chunks/cli-0.6.14-7v6ykh0a.mjs +3 -0
- package/dist/chunks/cli-0.6.14-8br8tabm.mjs +2 -0
- package/dist/chunks/cli-0.6.14-8byhrd64.mjs +15 -0
- package/dist/chunks/cli-0.6.14-8csp6x7m.mjs +2 -0
- package/dist/chunks/cli-0.6.14-8fwb0rxq.mjs +28 -0
- package/dist/chunks/cli-0.6.14-8n7jces4.mjs +18 -0
- package/dist/chunks/cli-0.6.14-8y4djf48.mjs +2 -0
- package/dist/chunks/cli-0.6.14-91q3yxr1.mjs +7 -0
- package/dist/chunks/cli-0.6.14-96g9dpcc.mjs +2 -0
- package/dist/chunks/cli-0.6.14-99fa5ayv.mjs +2 -0
- package/dist/chunks/cli-0.6.14-99js5k5c.mjs +2 -0
- package/dist/chunks/cli-0.6.14-9byxqpdv.mjs +2 -0
- package/dist/chunks/cli-0.6.14-9cx1z2pw.mjs +2 -0
- package/dist/chunks/cli-0.6.14-9hvsvn95.mjs +2 -0
- package/dist/chunks/cli-0.6.14-9vb8dn9c.mjs +2 -0
- package/dist/chunks/cli-0.6.14-agy54y78.mjs +2 -0
- package/dist/chunks/cli-0.6.14-ahr7p5ae.mjs +2 -0
- package/dist/chunks/cli-0.6.14-aq75zv9g.mjs +2 -0
- package/dist/chunks/cli-0.6.14-atdabjtf.mjs +2 -0
- package/dist/chunks/cli-0.6.14-b84drszx.mjs +133 -0
- package/dist/chunks/cli-0.6.14-bxkmnd7t.mjs +2 -0
- package/dist/chunks/cli-0.6.14-by6pfc25.mjs +2 -0
- package/dist/chunks/cli-0.6.14-bypp2d0a.mjs +2 -0
- package/dist/chunks/cli-0.6.14-caxxj8jv.mjs +4 -0
- package/dist/chunks/cli-0.6.14-cwgdsa6g.mjs +2 -0
- package/dist/chunks/cli-0.6.14-czceqk0q.mjs +2 -0
- package/dist/chunks/cli-0.6.14-d7hwk3k9.mjs +6 -0
- package/dist/chunks/cli-0.6.14-dvpqcja3.mjs +2 -0
- package/dist/chunks/cli-0.6.14-dxbqd9pq.mjs +12 -0
- package/dist/chunks/cli-0.6.14-e4k2wv6r.mjs +6 -0
- package/dist/chunks/cli-0.6.14-ebpc2q9b.mjs +17 -0
- package/dist/chunks/cli-0.6.14-edddpydh.mjs +3 -0
- package/dist/chunks/cli-0.6.14-ejemjmg6.mjs +2 -0
- package/dist/chunks/cli-0.6.14-et3604gq.mjs +39 -0
- package/dist/chunks/cli-0.6.14-f2qf9rpv.mjs +2 -0
- package/dist/chunks/cli-0.6.14-f5hmncvj.mjs +2 -0
- package/dist/chunks/cli-0.6.14-f7cc62eb.mjs +2 -0
- package/dist/chunks/cli-0.6.14-f8c4q74r.mjs +2 -0
- package/dist/chunks/cli-0.6.14-fde4ab0h.mjs +2 -0
- package/dist/chunks/cli-0.6.14-fdqtsv1m.mjs +20 -0
- package/dist/chunks/cli-0.6.14-ffm0j5zp.mjs +2 -0
- package/dist/chunks/cli-0.6.14-fj1s0rkp.mjs +2 -0
- package/dist/chunks/cli-0.6.14-frt92hs0.mjs +9 -0
- package/dist/chunks/cli-0.6.14-fz53f5mk.mjs +2 -0
- package/dist/chunks/cli-0.6.14-g50h10rn.mjs +2 -0
- package/dist/chunks/cli-0.6.14-g6dh1cms.mjs +2 -0
- package/dist/chunks/cli-0.6.14-g818hb3n.mjs +67 -0
- package/dist/chunks/cli-0.6.14-gva5ynrb.mjs +5 -0
- package/dist/chunks/cli-0.6.14-h16dbgdt.mjs +12 -0
- package/dist/chunks/cli-0.6.14-h57ntdbv.mjs +4 -0
- package/dist/chunks/cli-0.6.14-h7ta197w.mjs +2 -0
- package/dist/chunks/cli-0.6.14-h9nhb76w.mjs +24 -0
- package/dist/chunks/cli-0.6.14-hphp4crf.mjs +2 -0
- package/dist/chunks/cli-0.6.14-hwwpzjf6.mjs +16 -0
- package/dist/chunks/cli-0.6.14-jccr8khp.mjs +2 -0
- package/dist/chunks/cli-0.6.14-jd419b75.mjs +2 -0
- package/dist/chunks/cli-0.6.14-jrza7rgy.mjs +2 -0
- package/dist/chunks/cli-0.6.14-jsk6pprz.mjs +3 -0
- package/dist/chunks/cli-0.6.14-jt2n5c1v.mjs +2 -0
- package/dist/chunks/cli-0.6.14-k0xhn7g8.mjs +2 -0
- package/dist/chunks/cli-0.6.14-k2gx4ab3.mjs +2 -0
- package/dist/chunks/cli-0.6.14-ka8hq4g3.mjs +2 -0
- package/dist/chunks/cli-0.6.14-kf6m200b.mjs +17 -0
- package/dist/chunks/cli-0.6.14-kkgqr44y.mjs +2 -0
- package/dist/chunks/cli-0.6.14-kwnf1xer.mjs +2 -0
- package/dist/chunks/cli-0.6.14-m3bx95g6.mjs +2 -0
- package/dist/chunks/cli-0.6.14-m43ydag7.mjs +2 -0
- package/dist/chunks/cli-0.6.14-mb6vtzwv.mjs +24 -0
- package/dist/chunks/cli-0.6.14-mfccnezj.mjs +21 -0
- package/dist/chunks/cli-0.6.14-mg7c9km9.mjs +2 -0
- package/dist/chunks/cli-0.6.14-n33bnafx.mjs +2 -0
- package/dist/chunks/cli-0.6.14-n3mgs3pe.mjs +2 -0
- package/dist/chunks/cli-0.6.14-n83d4d40.mjs +3 -0
- package/dist/chunks/cli-0.6.14-nwprj5e9.mjs +2 -0
- package/dist/chunks/cli-0.6.14-nynda58b.mjs +45 -0
- package/dist/chunks/cli-0.6.14-nz0nygqh.mjs +18 -0
- package/dist/chunks/cli-0.6.14-p0w8rth4.mjs +10 -0
- package/dist/chunks/cli-0.6.14-p1b2fr7h.mjs +15 -0
- package/dist/chunks/cli-0.6.14-p1tqmfbz.mjs +2 -0
- package/dist/chunks/cli-0.6.14-p380n7ja.mjs +12 -0
- package/dist/chunks/cli-0.6.14-p722jmps.mjs +2 -0
- package/dist/chunks/cli-0.6.14-p9g6q20d.mjs +2 -0
- package/dist/chunks/cli-0.6.14-q1pvwt5p.mjs +3 -0
- package/dist/chunks/cli-0.6.14-q565grvj.mjs +25 -0
- package/dist/chunks/cli-0.6.14-q9jdrh1d.mjs +2 -0
- package/dist/chunks/cli-0.6.14-qc8cmr0r.mjs +3 -0
- package/dist/chunks/cli-0.6.14-qx9bvx4j.mjs +2 -0
- package/dist/chunks/cli-0.6.14-qy6pdc22.mjs +3 -0
- package/dist/chunks/cli-0.6.14-qygdwtnt.mjs +2 -0
- package/dist/chunks/cli-0.6.14-qysasn12.mjs +2 -0
- package/dist/chunks/cli-0.6.14-qzya6w20.mjs +2 -0
- package/dist/chunks/cli-0.6.14-rmxstabz.mjs +58 -0
- package/dist/chunks/cli-0.6.14-rn7sy805.mjs +2 -0
- package/dist/chunks/cli-0.6.14-s1dz4xc5.mjs +2 -0
- package/dist/chunks/cli-0.6.14-sbxb46et.mjs +2 -0
- package/dist/chunks/cli-0.6.14-sfan5yg2.mjs +5420 -0
- package/dist/chunks/cli-0.6.14-sydjzmja.mjs +2 -0
- package/dist/chunks/cli-0.6.14-t0h283eb.mjs +2 -0
- package/dist/chunks/cli-0.6.14-t2qdx2z0.mjs +2 -0
- package/dist/chunks/cli-0.6.14-t88fpm4q.mjs +2 -0
- package/dist/chunks/cli-0.6.14-tag8j147.mjs +2 -0
- package/dist/chunks/cli-0.6.14-tdxev2bd.mjs +2 -0
- package/dist/chunks/cli-0.6.14-tme0rm4s.mjs +2 -0
- package/dist/chunks/cli-0.6.14-tsj8ceqz.mjs +4 -0
- package/dist/chunks/cli-0.6.14-twrb9ymv.mjs +2 -0
- package/dist/chunks/cli-0.6.14-v3f1f3sz.mjs +2 -0
- package/dist/chunks/cli-0.6.14-vatc2ew2.mjs +6 -0
- package/dist/chunks/cli-0.6.14-vcc877tq.mjs +5 -0
- package/dist/chunks/cli-0.6.14-vdt75vby.mjs +4 -0
- package/dist/chunks/cli-0.6.14-vtvsgpwy.mjs +2 -0
- package/dist/chunks/cli-0.6.14-wadqcwj7.mjs +4 -0
- package/dist/chunks/cli-0.6.14-wat8851e.mjs +2 -0
- package/dist/chunks/cli-0.6.14-wgfwkbbx.mjs +2 -0
- package/dist/chunks/cli-0.6.14-wmh9wt8e.mjs +2 -0
- package/dist/chunks/cli-0.6.14-wnqatmtw.mjs +2 -0
- package/dist/chunks/cli-0.6.14-x5c5tsdg.mjs +50 -0
- package/dist/chunks/cli-0.6.14-x5v6ap8c.mjs +2 -0
- package/dist/chunks/cli-0.6.14-x95b1v8n.mjs +2 -0
- package/dist/chunks/cli-0.6.14-xkdca0es.mjs +4 -0
- package/dist/chunks/cli-0.6.14-y6edg2da.mjs +2 -0
- package/dist/chunks/cli-0.6.14-y6jp1vbw.mjs +2 -0
- package/dist/chunks/cli-0.6.14-yqgjsp01.mjs +2 -0
- package/dist/chunks/cli-0.6.14-yzehn0ck.mjs +3 -0
- package/dist/chunks/cli-0.6.14-z0d41c6a.mjs +3 -0
- package/dist/chunks/cli-0.6.14-z2f9x7q6.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zaq2td5m.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zbg4rtam.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zcj7h5kt.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zdxkyktd.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zdzmxpyn.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zkvgknj2.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zqc493f5.mjs +2 -0
- package/dist/chunks/cli-0.6.14-zs6qf39k.mjs +193 -0
- package/dist/chunks/cli-0.6.14-zz49ny6n.mjs +3 -0
- package/dist/chunks/client-0.6.14-a37v2hkc.mjs +1 -0
- package/dist/chunks/color-0.6.14-bzg7gay9.mjs +1 -0
- package/dist/chunks/compact-0.6.14-tc6cp8fp.mjs +3 -0
- package/dist/chunks/config-0.6.14-3wmc0969.mjs +1 -0
- package/dist/chunks/config-0.6.14-b68r8gag.mjs +1 -0
- package/dist/chunks/constants-0.6.14-v7badbs1.mjs +1 -0
- package/dist/chunks/context-0.6.14-xp245pp8.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.6.14-hd0hk9h9.mjs +1 -0
- package/dist/chunks/conversation-0.6.14-891b08cf.mjs +1 -0
- package/dist/chunks/copilotHeaders-0.6.14-b9a2v65h.mjs +1 -0
- package/dist/chunks/copy-0.6.14-azcjvt9f.mjs +9 -0
- package/dist/chunks/cost-0.6.14-f4y2w5f0.mjs +1 -0
- package/dist/chunks/createSSHSession-0.6.14-8vvxmzhm.mjs +1 -0
- package/dist/chunks/createSession-0.6.14-9mbn7pxm.mjs +1 -0
- package/dist/chunks/debug-0.6.14-72pxzjer.mjs +1 -0
- package/dist/chunks/defaultActionDeps-0.6.14-576scmq8.mjs +1367 -0
- package/dist/chunks/desktop-0.6.14-hb7yxjq0.mjs +1 -0
- package/dist/chunks/detectRepository-0.6.14-y7mnfkm3.mjs +1 -0
- package/dist/chunks/detection-0.6.14-rfe82fdp.mjs +1 -0
- package/dist/chunks/diff-0.6.14-z24ty79x.mjs +1 -0
- package/dist/chunks/doctor-0.6.14-t7aa116a.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-0.6.14-3pvysh1e.mjs +1 -0
- package/dist/chunks/earlyInput-0.6.14-4sras35a.mjs +1 -0
- package/dist/chunks/effort-0.6.14-6km9yng9.mjs +10 -0
- package/dist/chunks/envLessBridgeConfig-0.6.14-g7kb3d4z.mjs +1 -0
- package/dist/chunks/envUtils-0.6.14-4hmq0b5a.mjs +1 -0
- package/dist/chunks/environmentSelection-0.6.14-yf31rwvq.mjs +1 -0
- package/dist/chunks/environments-0.6.14-npzg2j62.mjs +1 -0
- package/dist/chunks/errors-0.6.14-86nj6401.mjs +1 -0
- package/dist/chunks/exampleCommands-0.6.14-n1qk8rhj.mjs +1 -0
- package/dist/chunks/exit-0.6.14-5za2fg93.mjs +1 -0
- package/dist/chunks/explorer-0.6.14-hexd7b76.mjs +1 -0
- package/dist/chunks/export-0.6.14-1v7e95q9.mjs +2 -0
- package/dist/chunks/extra-usage-0.6.14-gx6570zn.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.6.14-vdwdwnz9.mjs +1 -0
- package/dist/chunks/fast-0.6.14-pnkczy1j.mjs +1 -0
- package/dist/chunks/feedback-0.6.14-gtmr1g2q.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.6.14-t9nfzshv.mjs +1 -0
- package/dist/chunks/git-0.6.14-f74k03xt.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.6.14-ez3p2wg3.mjs +1 -0
- package/dist/chunks/goal-0.6.14-5d0ya1j2.mjs +4 -0
- package/dist/chunks/grove-0.6.14-sxnhb95y.mjs +1 -0
- package/dist/chunks/growthbook-0.6.14-gge4tqg1.mjs +1 -0
- package/dist/chunks/headless-0.6.14-b2wxjfrs.mjs +2 -0
- package/dist/chunks/heapdump-0.6.14-mms7s76k.mjs +6 -0
- package/dist/chunks/help-0.6.14-pqn4adtv.mjs +1 -0
- package/dist/chunks/hookChains-0.6.14-pqje8ftz.mjs +3 -0
- package/dist/chunks/hooks-0.6.14-ctdgjqej.mjs +1 -0
- package/dist/chunks/hooks-0.6.14-m71syqtm.mjs +79 -0
- package/dist/chunks/ide-0.6.14-0jxzgh55.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.6.14-q7t6pn66.mjs +1 -0
- package/dist/chunks/inboundAttachments-0.6.14-q86263h2.mjs +1 -0
- package/dist/chunks/index-0.6.14-0cq48avx.mjs +1 -0
- package/dist/chunks/index-0.6.14-1mbqhpsc.mjs +1 -0
- package/dist/chunks/index-0.6.14-2862bv8a.mjs +2 -0
- package/dist/chunks/index-0.6.14-30t6majr.mjs +9 -0
- package/dist/chunks/index-0.6.14-3bzm9qc7.mjs +1 -0
- package/dist/chunks/index-0.6.14-61adtkwy.mjs +1 -0
- package/dist/chunks/index-0.6.14-6wed8pvs.mjs +1 -0
- package/dist/chunks/index-0.6.14-7s3sge6q.mjs +1 -0
- package/dist/chunks/index-0.6.14-8zzk0q1e.mjs +5 -0
- package/dist/chunks/index-0.6.14-9f0htcmg.mjs +1 -0
- package/dist/chunks/index-0.6.14-9rp3a2yc.mjs +1 -0
- package/dist/chunks/index-0.6.14-b8e5bnmy.mjs +1 -0
- package/dist/chunks/index-0.6.14-cjbhcv9x.mjs +1 -0
- package/dist/chunks/index-0.6.14-dstgm3mq.mjs +1 -0
- package/dist/chunks/index-0.6.14-grrxerr7.mjs +30 -0
- package/dist/chunks/index-0.6.14-hzpvqqxz.mjs +1 -0
- package/dist/chunks/index-0.6.14-ma34hgd2.mjs +1 -0
- package/dist/chunks/index-0.6.14-pe5f6erk.mjs +1 -0
- package/dist/chunks/index-0.6.14-q7ycrfky.mjs +1 -0
- package/dist/chunks/index-0.6.14-tj7zcx0j.mjs +2 -0
- package/dist/chunks/index-0.6.14-vsmnqyw7.mjs +9 -0
- package/dist/chunks/index-0.6.14-wjwtw877.mjs +1 -0
- package/dist/chunks/index-0.6.14-xr4ygqd8.mjs +1 -0
- package/dist/chunks/init-0.6.14-xsyn9ype.mjs +1 -0
- package/dist/chunks/initReplBridge-0.6.14-4xf599ff.mjs +1 -0
- package/dist/chunks/ink-0.6.14-nmt32hk2.mjs +1 -0
- package/dist/chunks/insights-0.6.14-19xzs05z.mjs +870 -0
- package/dist/chunks/install-0.6.14-vqtax3vj.mjs +1 -0
- package/dist/chunks/install-github-app-0.6.14-763gk6yh.mjs +149 -0
- package/dist/chunks/install-slack-app-0.6.14-errj5jgt.mjs +1 -0
- package/dist/chunks/instrumentation-0.6.14-5hpeqy3p.mjs +1 -0
- package/dist/chunks/interactiveHelpers-0.6.14-b57szzcn.mjs +1 -0
- package/dist/chunks/keybindings-0.6.14-xrfkf4ee.mjs +2 -0
- package/dist/chunks/knowledge-0.6.14-afa9zk0n.mjs +2 -0
- package/dist/chunks/latestVersionCache-0.6.14-srzyzbck.mjs +1 -0
- package/dist/chunks/loadAgentsDir-0.6.14-fa11st0a.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.6.14-pxqawxmk.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.6.14-q996y4ys.mjs +1 -0
- package/dist/chunks/log-0.6.14-r5g98evz.mjs +1 -0
- package/dist/chunks/main-0.6.14-t80arejb.mjs +1 -0
- package/dist/chunks/managedEnv-0.6.14-c69sc493.mjs +1 -0
- package/dist/chunks/mcp-0.6.14-kgz52fqg.mjs +17 -0
- package/dist/chunks/mcp-0.6.14-rp59xhps.mjs +1 -0
- package/dist/chunks/mcp-0.6.14-tsyhv9kh.mjs +4 -0
- package/dist/chunks/mcpb-0.6.14-t3tjab75.mjs +1 -0
- package/dist/chunks/memory-0.6.14-m03pztgw.mjs +3 -0
- package/dist/chunks/model-0.6.14-jdqn7n40.mjs +1 -0
- package/dist/chunks/model-0.6.14-qv4hzczr.mjs +2 -0
- package/dist/chunks/node-0.6.14-hjvhe7hn.mjs +12 -0
- package/dist/chunks/oauth-0.6.14-wy6c29gv.mjs +1 -0
- package/dist/chunks/openaiShim-0.6.14-da1kj5v4.mjs +14 -0
- package/dist/chunks/output-style-0.6.14-t6v2gb8n.mjs +1 -0
- package/dist/chunks/package-FMOR3ELU-0.6.14-emy5wf3r.mjs +1 -0
- package/dist/chunks/parseConnectUrl-0.6.14-3vqsr0kx.mjs +1 -0
- package/dist/chunks/parser-0.6.14-1sqra6j7.mjs +1 -0
- package/dist/chunks/passes-0.6.14-myy267ws.mjs +1 -0
- package/dist/chunks/permissions-0.6.14-3z8pbz2g.mjs +3 -0
- package/dist/chunks/permissions-0.6.14-79t7ebq2.mjs +1 -0
- package/dist/chunks/plan-0.6.14-y045axp0.mjs +1 -0
- package/dist/chunks/plist-0.6.14-ab99byjh.mjs +1 -0
- package/dist/chunks/plugin-0.6.14-qz01xk73.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.6.14-qzs78ynj.mjs +1 -0
- package/dist/chunks/plugins-0.6.14-aswnzxep.mjs +9 -0
- package/dist/chunks/preActionHook-0.6.14-1d096j7q.mjs +2 -0
- package/dist/chunks/print-0.6.14-ar39mndx.mjs +57 -0
- package/dist/chunks/privacy-settings-0.6.14-87dkr1af.mjs +1 -0
- package/dist/chunks/process-0.6.14-c0akc420.mjs +1 -0
- package/dist/chunks/processBashCommand-0.6.14-es5xezck.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.6.14-gqdsehy1.mjs +9 -0
- package/dist/chunks/prompt-0.6.14-9ry1h9sp.mjs +1 -0
- package/dist/chunks/prompt-0.6.14-tjm76x4x.mjs +1 -0
- package/dist/chunks/prompts-0.6.14-jvcj7380.mjs +1 -0
- package/dist/chunks/protocolHandler-0.6.14-ef5v3zyh.mjs +13 -0
- package/dist/chunks/provider-0.6.14-eey11cp2.mjs +2 -0
- package/dist/chunks/providerProfiles-0.6.14-svsc9dz2.mjs +1 -0
- package/dist/chunks/providerValidation-0.6.14-gnv5n4kb.mjs +6 -0
- package/dist/chunks/rate-limit-options-0.6.14-bmz8ww7q.mjs +1 -0
- package/dist/chunks/registerSubcommands-0.6.14-fywkqked.mjs +34 -0
- package/dist/chunks/registry-0.6.14-kphmp02w.mjs +1 -0
- package/dist/chunks/release-notes-0.6.14-3avcrn6e.mjs +5 -0
- package/dist/chunks/reload-plugins-0.6.14-gfg76jqa.mjs +2 -0
- package/dist/chunks/remote-env-0.6.14-rsbq7bet.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.6.14-qp6qx722.mjs +1 -0
- package/dist/chunks/remoteSession-0.6.14-7ms8beek.mjs +1 -0
- package/dist/chunks/rename-0.6.14-8gj3cr0t.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.6.14-e4vhwyxz.mjs +1 -0
- package/dist/chunks/replLauncher-0.6.14-n2w77h31.mjs +1 -0
- package/dist/chunks/resume-0.6.14-kq4j9a02.mjs +2 -0
- package/dist/chunks/rewind-0.6.14-t4kjyzca.mjs +1 -0
- package/dist/chunks/rootOptions-0.6.14-m544z408.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.6.14-1gefp492.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.6.14-rrm1sx8h.mjs +1 -0
- package/dist/chunks/session-0.6.14-c4fxdqq4.mjs +2 -0
- package/dist/chunks/sessionDiscovery-0.6.14-xa35ttn0.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-0.6.14-sadh6z4m.mjs +1 -0
- package/dist/chunks/sessionStorage-0.6.14-f5hcr3w9.mjs +1 -0
- package/dist/chunks/settings-0.6.14-kadpzkck.mjs +1 -0
- package/dist/chunks/setup-0.6.14-e9fxzm03.mjs +5 -0
- package/dist/chunks/sinks-0.6.14-6ykwkv40.mjs +1 -0
- package/dist/chunks/skills-0.6.14-txsmfaj3.mjs +1 -0
- package/dist/chunks/startupProfiler-0.6.14-3v8z482z.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-0.6.14-41zkqddn.mjs +1 -0
- package/dist/chunks/state-0.6.14-4n3ak598.mjs +1 -0
- package/dist/chunks/stats-0.6.14-ea3435fh.mjs +6 -0
- package/dist/chunks/status-0.6.14-phzcwc8s.mjs +1 -0
- package/dist/chunks/stickers-0.6.14-6qww40c0.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.6.14-4t9m3vaq.mjs +1 -0
- package/dist/chunks/tasks-0.6.14-1jwxz28f.mjs +1 -0
- package/dist/chunks/teamHelpers-0.6.14-vyhakypg.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.6.14-12r7yt67.mjs +1 -0
- package/dist/chunks/teleport-0.6.14-55jrt6fb.mjs +1 -0
- package/dist/chunks/terminalSetup-0.6.14-d79aqeyc.mjs +1 -0
- package/dist/chunks/theme-0.6.14-4859e0jg.mjs +1 -0
- package/dist/chunks/thinkback-0.6.14-5hxy4f53.mjs +1 -0
- package/dist/chunks/thinkback-play-0.6.14-rcstrvmt.mjs +1 -0
- package/dist/chunks/toolPool-0.6.14-dgws7ran.mjs +1 -0
- package/dist/chunks/toolSearch-0.6.14-wy210e1q.mjs +1 -0
- package/dist/chunks/tools-0.6.14-4brh5a3k.mjs +1 -0
- package/dist/chunks/trustedDevice-0.6.14-bvc0mt34.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.6.14-wq5f2s7f.mjs +69 -0
- package/dist/chunks/types-0.6.14-zbh1a4yy.mjs +1 -0
- package/dist/chunks/ultrareviewCommand-0.6.14-pjr2ry7s.mjs +4 -0
- package/dist/chunks/update-0.6.14-gh8hbk2s.mjs +86 -0
- package/dist/chunks/upgrade-0.6.14-p84xqcx2.mjs +1 -0
- package/dist/chunks/upload-0.6.14-n7wr7bpj.mjs +7 -0
- package/dist/chunks/upstreamproxy-0.6.14-dfrtndvx.mjs +14 -0
- package/dist/chunks/url-handler-napi-0.6.14-dxy70q48.mjs +1 -0
- package/dist/chunks/usage-0.6.14-xxq4jwr7.mjs +1 -0
- package/dist/chunks/util-0.6.14-8cvteh10.mjs +1 -0
- package/dist/chunks/utils-0.6.14-310awtc9.mjs +1 -0
- package/dist/chunks/vim-0.6.14-j69d6qse.mjs +1 -0
- package/dist/chunks/watcher-0.6.14-5getwwq0.mjs +1 -0
- package/dist/chunks/wiki-0.6.14-d818xacs.mjs +132 -0
- package/dist/chunks/worktree-0.6.14-jfb07r4d.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.6.14-25qk5mhk.mjs +1 -0
- package/dist/chunks/wrapper-0.6.14-ecgg0wpw.mjs +7 -0
- package/dist/claudin-vscode.vsix +0 -0
- package/dist/cli.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunks/AgentTool-0.6.13-372t6jvm.mjs +0 -1
- package/dist/chunks/App-0.6.13-qvfyfba9.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.6.13-6nmfyyev.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-0.6.13-b6yfhres.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.6.13-dyqtw95c.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.6.13-5pgva0rj.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.13-waw1tn55.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.6.13-hjwa1fbn.mjs +0 -1
- package/dist/chunks/DiffDialog-0.6.13-dk52swdy.mjs +0 -7
- package/dist/chunks/Doctor-0.6.13-1a58bmer.mjs +0 -1
- package/dist/chunks/ExplorerDialog-0.6.13-2jsr1kdp.mjs +0 -6
- package/dist/chunks/Grove-0.6.13-ndwmcy2m.mjs +0 -1
- package/dist/chunks/ITermBackend-0.6.13-nf00ba9t.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.6.13-5tjcywmj.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.6.13-hfvttszy.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.6.13-8kny4cnv.mjs +0 -1
- package/dist/chunks/Onboarding-0.6.13-kq8ksp1e.mjs +0 -1
- package/dist/chunks/ProviderManager-0.6.13-qk3hqkes.mjs +0 -1
- package/dist/chunks/REPL-0.6.13-61en5qve.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.6.13-3fqxexjm.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-0.6.13-62cd6tth.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.6.13-15xb363h.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.6.13-dsedgexe.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.6.13-9j8hn55r.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.6.13-8vwnn7q5.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.6.13-zh1xxj19.mjs +0 -1
- package/dist/chunks/TrustDialog-0.6.13-bxhrfq4g.mjs +0 -1
- package/dist/chunks/activeProvider-0.6.13-czzs1epn.mjs +0 -1
- package/dist/chunks/add-dir-0.6.13-j5n5k274.mjs +0 -1
- package/dist/chunks/agents-0.6.13-0m0b4n5a.mjs +0 -3
- package/dist/chunks/agents-0.6.13-v7mba2z1.mjs +0 -110
- package/dist/chunks/api-0.6.13-1s3mg09p.mjs +0 -1
- package/dist/chunks/asciicast-0.6.13-3mbwg05w.mjs +0 -1
- package/dist/chunks/assistant-0.6.13-bg17bbaf.mjs +0 -1
- package/dist/chunks/auth-0.6.13-586trvnj.mjs +0 -1
- package/dist/chunks/auth-0.6.13-jkzs3jr4.mjs +0 -1
- package/dist/chunks/autoMode-0.6.13-9sxgpw8z.mjs +0 -48
- package/dist/chunks/autoUpdater-0.6.13-0rtsfmyq.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.6.13-dfn3gpk2.mjs +0 -1
- package/dist/chunks/branch-0.6.13-nncg27cq.mjs +0 -4
- package/dist/chunks/bridge-0.6.13-p1vtbdeq.mjs +0 -2
- package/dist/chunks/bridgeConfig-0.6.13-99p1h4gg.mjs +0 -1
- package/dist/chunks/bridgeEnabled-0.6.13-jxfgwjry.mjs +0 -1
- package/dist/chunks/bridgeMain-0.6.13-fthkw7s3.mjs +0 -88
- package/dist/chunks/bridgePointer-0.6.13-zs37h6xx.mjs +0 -1
- package/dist/chunks/btw-0.6.13-hhztcxbv.mjs +0 -1
- package/dist/chunks/buddy-0.6.13-0j9feqm5.mjs +0 -3
- package/dist/chunks/cacache-0.6.13-kqpn2432.mjs +0 -1
- package/dist/chunks/cache-probe-0.6.13-d98620ds.mjs +0 -21
- package/dist/chunks/cacheStats-0.6.13-yktwg0rm.mjs +0 -4
- package/dist/chunks/caches-0.6.13-5s0az6ex.mjs +0 -1
- package/dist/chunks/claudeDesktop-0.6.13-ecqnvr2j.mjs +0 -1
- package/dist/chunks/claudemd-0.6.13-yae0af2s.mjs +0 -1
- package/dist/chunks/clear-0.6.13-nqy8a9yn.mjs +0 -1
- package/dist/chunks/clearTerminal-0.6.13-72xf6n5m.mjs +0 -1
- package/dist/chunks/cli-0.6.13-004msxtb.mjs +0 -2
- package/dist/chunks/cli-0.6.13-03nk0m3d.mjs +0 -24
- package/dist/chunks/cli-0.6.13-05yxsqtw.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0602v59h.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0fqa9efa.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0k53jyws.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0q2ceerc.mjs +0 -2
- package/dist/chunks/cli-0.6.13-0xg54q0q.mjs +0 -3
- package/dist/chunks/cli-0.6.13-15925v1q.mjs +0 -2
- package/dist/chunks/cli-0.6.13-17fmkp6v.mjs +0 -3
- package/dist/chunks/cli-0.6.13-1ax2v1qb.mjs +0 -24
- package/dist/chunks/cli-0.6.13-1hj4de9z.mjs +0 -18
- package/dist/chunks/cli-0.6.13-1jhzkjnr.mjs +0 -2
- package/dist/chunks/cli-0.6.13-1pb6yp4f.mjs +0 -2
- package/dist/chunks/cli-0.6.13-27ey3345.mjs +0 -17
- package/dist/chunks/cli-0.6.13-2999v1f0.mjs +0 -5
- package/dist/chunks/cli-0.6.13-2d7gmnka.mjs +0 -2
- package/dist/chunks/cli-0.6.13-2k50jqzf.mjs +0 -2
- package/dist/chunks/cli-0.6.13-2s33ahe4.mjs +0 -5420
- package/dist/chunks/cli-0.6.13-31zhsxsz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-35rszksn.mjs +0 -2
- package/dist/chunks/cli-0.6.13-3812a7q8.mjs +0 -34
- package/dist/chunks/cli-0.6.13-3c8w16xp.mjs +0 -3
- package/dist/chunks/cli-0.6.13-3w1r3c0v.mjs +0 -2
- package/dist/chunks/cli-0.6.13-45x35nyh.mjs +0 -2
- package/dist/chunks/cli-0.6.13-46hqxeb7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-4hknb5dd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-50wr9g3w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-56b3061c.mjs +0 -18
- package/dist/chunks/cli-0.6.13-56j5q7d2.mjs +0 -42
- package/dist/chunks/cli-0.6.13-5gh7ptbm.mjs +0 -4
- package/dist/chunks/cli-0.6.13-5t9gd5mv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-643zsnv9.mjs +0 -2
- package/dist/chunks/cli-0.6.13-667dsr1w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-77hs0qtg.mjs +0 -2
- package/dist/chunks/cli-0.6.13-79mne5jt.mjs +0 -2
- package/dist/chunks/cli-0.6.13-7c9n56f7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-7ga8d4j1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-7pva2mmr.mjs +0 -3
- package/dist/chunks/cli-0.6.13-7vd0kdw5.mjs +0 -2
- package/dist/chunks/cli-0.6.13-82datd4w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-86pqnjyd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-881js45c.mjs +0 -2
- package/dist/chunks/cli-0.6.13-8t0ttrk7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-8ws8a2xy.mjs +0 -3
- package/dist/chunks/cli-0.6.13-949racwr.mjs +0 -7
- package/dist/chunks/cli-0.6.13-94nwan0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-97cs7c2r.mjs +0 -2
- package/dist/chunks/cli-0.6.13-9h9fp7zs.mjs +0 -2
- package/dist/chunks/cli-0.6.13-9wktvaax.mjs +0 -50
- package/dist/chunks/cli-0.6.13-ac8nyfp1.mjs +0 -58
- package/dist/chunks/cli-0.6.13-aekttw5a.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ajc8203j.mjs +0 -2
- package/dist/chunks/cli-0.6.13-axsf5w7q.mjs +0 -2
- package/dist/chunks/cli-0.6.13-aztg2ca1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-b3zncvcq.mjs +0 -16
- package/dist/chunks/cli-0.6.13-b55baxv4.mjs +0 -2
- package/dist/chunks/cli-0.6.13-bthkgbv5.mjs +0 -2
- package/dist/chunks/cli-0.6.13-c3452432.mjs +0 -5
- package/dist/chunks/cli-0.6.13-cc118njq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-cc2eb8bm.mjs +0 -2
- package/dist/chunks/cli-0.6.13-cwm0q4km.mjs +0 -2
- package/dist/chunks/cli-0.6.13-cxnnt8b1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-d2rfg5mp.mjs +0 -2
- package/dist/chunks/cli-0.6.13-da6fhpes.mjs +0 -133
- package/dist/chunks/cli-0.6.13-dada1afp.mjs +0 -6
- package/dist/chunks/cli-0.6.13-dayy1aa4.mjs +0 -2
- package/dist/chunks/cli-0.6.13-dh1skxhh.mjs +0 -2
- package/dist/chunks/cli-0.6.13-dvfmqzm9.mjs +0 -2
- package/dist/chunks/cli-0.6.13-e1t2dda2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ea52zrzt.mjs +0 -2
- package/dist/chunks/cli-0.6.13-eaev9cr7.mjs +0 -2
- package/dist/chunks/cli-0.6.13-erzcm5hv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-esv4y00y.mjs +0 -2
- package/dist/chunks/cli-0.6.13-etytm730.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ew05qjsa.mjs +0 -4
- package/dist/chunks/cli-0.6.13-f58v0vk7.mjs +0 -6
- package/dist/chunks/cli-0.6.13-f67v536f.mjs +0 -59
- package/dist/chunks/cli-0.6.13-f6qwz2h0.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fkaxh655.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fspszw8w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fw6m0fbm.mjs +0 -10
- package/dist/chunks/cli-0.6.13-fxj1zytn.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fy3vgkpz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-fzzdrhms.mjs +0 -4
- package/dist/chunks/cli-0.6.13-g65dfg11.mjs +0 -6
- package/dist/chunks/cli-0.6.13-gkfcc3c2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-gpb93cvz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-grrshx1z.mjs +0 -2
- package/dist/chunks/cli-0.6.13-gsfs6kre.mjs +0 -2
- package/dist/chunks/cli-0.6.13-gyq9mepg.mjs +0 -2
- package/dist/chunks/cli-0.6.13-h3ymv3nd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-h5dej6se.mjs +0 -3
- package/dist/chunks/cli-0.6.13-hd0sd535.mjs +0 -193
- package/dist/chunks/cli-0.6.13-hp0r1ftj.mjs +0 -12
- package/dist/chunks/cli-0.6.13-hx71w6e6.mjs +0 -3
- package/dist/chunks/cli-0.6.13-hxfvksxq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-j6mr3jmk.mjs +0 -4
- package/dist/chunks/cli-0.6.13-jhhmjq66.mjs +0 -133
- package/dist/chunks/cli-0.6.13-jjx7jq0w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-jmzvtd06.mjs +0 -2
- package/dist/chunks/cli-0.6.13-jrdsk8wb.mjs +0 -3
- package/dist/chunks/cli-0.6.13-k0kyv254.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kd5h1s1s.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kdm4832x.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kekrwb08.mjs +0 -45
- package/dist/chunks/cli-0.6.13-kmg491hy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-kqq5n5q3.mjs +0 -12
- package/dist/chunks/cli-0.6.13-kxjmrbfd.mjs +0 -3
- package/dist/chunks/cli-0.6.13-m4pb5k9v.mjs +0 -2
- package/dist/chunks/cli-0.6.13-me17wefv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-mreqrsw2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-mt7jkjdp.mjs +0 -39
- package/dist/chunks/cli-0.6.13-mxr0y1kd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-n4qwe0a1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-n67mrj2g.mjs +0 -15
- package/dist/chunks/cli-0.6.13-n9fz7y3a.mjs +0 -4
- package/dist/chunks/cli-0.6.13-nqd696hv.mjs +0 -2
- package/dist/chunks/cli-0.6.13-nvcr131g.mjs +0 -4
- package/dist/chunks/cli-0.6.13-p02kfjzd.mjs +0 -8
- package/dist/chunks/cli-0.6.13-p2k33k0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-p5xafpx4.mjs +0 -3
- package/dist/chunks/cli-0.6.13-pa4yv2ra.mjs +0 -2
- package/dist/chunks/cli-0.6.13-pbk4h5n3.mjs +0 -3
- package/dist/chunks/cli-0.6.13-pezf5r7h.mjs +0 -2
- package/dist/chunks/cli-0.6.13-pmwrb4jf.mjs +0 -2
- package/dist/chunks/cli-0.6.13-prh9py3z.mjs +0 -2
- package/dist/chunks/cli-0.6.13-pyh5s43x.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q161snt1.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q2ssb82w.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q4spcjyn.mjs +0 -2
- package/dist/chunks/cli-0.6.13-q8qzja14.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qbn7xx3z.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qemvn3t7.mjs +0 -4
- package/dist/chunks/cli-0.6.13-qfh8s56n.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qj9zpvjy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qtea9rcg.mjs +0 -2
- package/dist/chunks/cli-0.6.13-qyd73z97.mjs +0 -2
- package/dist/chunks/cli-0.6.13-r043ksv1.mjs +0 -1
- package/dist/chunks/cli-0.6.13-r1exgbp8.mjs +0 -4
- package/dist/chunks/cli-0.6.13-r2w3m6g9.mjs +0 -2
- package/dist/chunks/cli-0.6.13-r4z5mchw.mjs +0 -2
- package/dist/chunks/cli-0.6.13-r7gkf1df.mjs +0 -2
- package/dist/chunks/cli-0.6.13-rkm2drsy.mjs +0 -6
- package/dist/chunks/cli-0.6.13-s2vxndky.mjs +0 -2
- package/dist/chunks/cli-0.6.13-s3r638fw.mjs +0 -2
- package/dist/chunks/cli-0.6.13-s9rv2pr3.mjs +0 -4
- package/dist/chunks/cli-0.6.13-sa8gmxxv.mjs +0 -3
- package/dist/chunks/cli-0.6.13-t5bkdhfz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tbg0cceg.mjs +0 -15
- package/dist/chunks/cli-0.6.13-tecj2x0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tfaydn5r.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tj2kvtza.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tss2yk53.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tvy6tmhe.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tyd40vcz.mjs +0 -2
- package/dist/chunks/cli-0.6.13-tzsj5e1c.mjs +0 -17
- package/dist/chunks/cli-0.6.13-v05nfcar.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v160yjcc.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v2vt3snq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v7kg9gbp.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v824ppa4.mjs +0 -3
- package/dist/chunks/cli-0.6.13-v83qp6b0.mjs +0 -2
- package/dist/chunks/cli-0.6.13-v8ksdm64.mjs +0 -2
- package/dist/chunks/cli-0.6.13-vkbwqnxx.mjs +0 -2
- package/dist/chunks/cli-0.6.13-vv2qqj0d.mjs +0 -2
- package/dist/chunks/cli-0.6.13-vxq8z40t.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w039mymy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w0qrn825.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w1jqswyq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-w91d8mwx.mjs +0 -2
- package/dist/chunks/cli-0.6.13-waf5mvv3.mjs +0 -5
- package/dist/chunks/cli-0.6.13-wer1zp9j.mjs +0 -20
- package/dist/chunks/cli-0.6.13-wtc8585b.mjs +0 -2
- package/dist/chunks/cli-0.6.13-x28t8s6n.mjs +0 -2
- package/dist/chunks/cli-0.6.13-xc81kqm2.mjs +0 -2
- package/dist/chunks/cli-0.6.13-xdedyafk.mjs +0 -12
- package/dist/chunks/cli-0.6.13-xf37gba3.mjs +0 -21
- package/dist/chunks/cli-0.6.13-xkw3qe38.mjs +0 -2
- package/dist/chunks/cli-0.6.13-xpjrhgmy.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y1j0jnkt.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y20earfr.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y4v6kta5.mjs +0 -2
- package/dist/chunks/cli-0.6.13-y6xnb20z.mjs +0 -28
- package/dist/chunks/cli-0.6.13-y8bhbkcr.mjs +0 -2
- package/dist/chunks/cli-0.6.13-yamxpaqw.mjs +0 -67
- package/dist/chunks/cli-0.6.13-ykg1yrfj.mjs +0 -2
- package/dist/chunks/cli-0.6.13-yrjy4at4.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ytn0a18c.mjs +0 -2
- package/dist/chunks/cli-0.6.13-ywdbvmgd.mjs +0 -2
- package/dist/chunks/cli-0.6.13-z8s5yfv6.mjs +0 -9
- package/dist/chunks/cli-0.6.13-zcy8dsbx.mjs +0 -25
- package/dist/chunks/cli-0.6.13-zd9jp62z.mjs +0 -15
- package/dist/chunks/cli-0.6.13-ze0ah657.mjs +0 -4
- package/dist/chunks/cli-0.6.13-zktd03aq.mjs +0 -2
- package/dist/chunks/cli-0.6.13-zw3t7bxg.mjs +0 -2
- package/dist/chunks/client-0.6.13-apag8p3w.mjs +0 -1
- package/dist/chunks/color-0.6.13-m7e3xes9.mjs +0 -1
- package/dist/chunks/compact-0.6.13-064k380y.mjs +0 -3
- package/dist/chunks/config-0.6.13-2gskfa7r.mjs +0 -1
- package/dist/chunks/config-0.6.13-m7tbch3j.mjs +0 -1
- package/dist/chunks/constants-0.6.13-bq183whd.mjs +0 -1
- package/dist/chunks/context-0.6.13-4jm66js8.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.6.13-2c2pa7c4.mjs +0 -1
- package/dist/chunks/conversation-0.6.13-gb8qd0a6.mjs +0 -1
- package/dist/chunks/copilotHeaders-0.6.13-sdz00vtr.mjs +0 -1
- package/dist/chunks/copy-0.6.13-11ksdws3.mjs +0 -9
- package/dist/chunks/cost-0.6.13-ht9hjse5.mjs +0 -1
- package/dist/chunks/createSSHSession-0.6.13-9nj8wxrq.mjs +0 -1
- package/dist/chunks/createSession-0.6.13-zx0ak0ar.mjs +0 -1
- package/dist/chunks/debug-0.6.13-1b2b2vfp.mjs +0 -1
- package/dist/chunks/defaultActionDeps-0.6.13-4ypccnwe.mjs +0 -1367
- package/dist/chunks/desktop-0.6.13-5jae65dg.mjs +0 -1
- package/dist/chunks/detectRepository-0.6.13-e3va8684.mjs +0 -1
- package/dist/chunks/detection-0.6.13-5kdd4ryt.mjs +0 -1
- package/dist/chunks/diff-0.6.13-3qr723e3.mjs +0 -1
- package/dist/chunks/doctor-0.6.13-ykby6vex.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-0.6.13-m5tnyxr2.mjs +0 -1
- package/dist/chunks/earlyInput-0.6.13-e90ax06h.mjs +0 -1
- package/dist/chunks/effort-0.6.13-tqkv5tt7.mjs +0 -10
- package/dist/chunks/envLessBridgeConfig-0.6.13-m8pp5emf.mjs +0 -1
- package/dist/chunks/envUtils-0.6.13-6q29pewb.mjs +0 -1
- package/dist/chunks/environmentSelection-0.6.13-ajfa3pm0.mjs +0 -1
- package/dist/chunks/environments-0.6.13-gpjjpygt.mjs +0 -1
- package/dist/chunks/errors-0.6.13-amqhpv1w.mjs +0 -1
- package/dist/chunks/exampleCommands-0.6.13-yscjfr02.mjs +0 -1
- package/dist/chunks/exit-0.6.13-aex1mh9r.mjs +0 -1
- package/dist/chunks/explorer-0.6.13-g670396m.mjs +0 -1
- package/dist/chunks/export-0.6.13-zytxcpn5.mjs +0 -2
- package/dist/chunks/extra-usage-0.6.13-js9s3mpg.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.6.13-1y21hfpz.mjs +0 -1
- package/dist/chunks/fast-0.6.13-eqx76m6v.mjs +0 -1
- package/dist/chunks/feedback-0.6.13-b2yh5zgv.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-0.6.13-29x54d6r.mjs +0 -1
- package/dist/chunks/git-0.6.13-r45r70q4.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.6.13-3saqxp80.mjs +0 -1
- package/dist/chunks/goal-0.6.13-jm5f9y8r.mjs +0 -4
- package/dist/chunks/grove-0.6.13-9vr9ry8t.mjs +0 -1
- package/dist/chunks/growthbook-0.6.13-r6367yym.mjs +0 -1
- package/dist/chunks/headless-0.6.13-gfageb5h.mjs +0 -2
- package/dist/chunks/heapdump-0.6.13-m8g832m5.mjs +0 -6
- package/dist/chunks/help-0.6.13-781b4zzf.mjs +0 -1
- package/dist/chunks/hookChains-0.6.13-ztaa33k2.mjs +0 -3
- package/dist/chunks/hooks-0.6.13-2vp3h6tg.mjs +0 -1
- package/dist/chunks/hooks-0.6.13-ma0g96bd.mjs +0 -79
- package/dist/chunks/ide-0.6.13-ev74eqfz.mjs +0 -3
- package/dist/chunks/image-processor-napi-0.6.13-1yfk6729.mjs +0 -1
- package/dist/chunks/inboundAttachments-0.6.13-15y4n0ap.mjs +0 -1
- package/dist/chunks/index-0.6.13-22g8yp33.mjs +0 -1
- package/dist/chunks/index-0.6.13-3d9rd6ba.mjs +0 -1
- package/dist/chunks/index-0.6.13-3yrze12y.mjs +0 -2
- package/dist/chunks/index-0.6.13-4mx71hjt.mjs +0 -2
- package/dist/chunks/index-0.6.13-68g8rnf9.mjs +0 -1
- package/dist/chunks/index-0.6.13-6t8yz88d.mjs +0 -1
- package/dist/chunks/index-0.6.13-af1dgcmj.mjs +0 -1
- package/dist/chunks/index-0.6.13-afmvxwx2.mjs +0 -1
- package/dist/chunks/index-0.6.13-by0wfak3.mjs +0 -9
- package/dist/chunks/index-0.6.13-cx9jy8c2.mjs +0 -1
- package/dist/chunks/index-0.6.13-fd4kgsd2.mjs +0 -1
- package/dist/chunks/index-0.6.13-jte6phkv.mjs +0 -1
- package/dist/chunks/index-0.6.13-m632g3gy.mjs +0 -1
- package/dist/chunks/index-0.6.13-mwpm4arf.mjs +0 -5
- package/dist/chunks/index-0.6.13-nwvcwdkk.mjs +0 -30
- package/dist/chunks/index-0.6.13-nwy6gtkk.mjs +0 -1
- package/dist/chunks/index-0.6.13-ptnyngf8.mjs +0 -1
- package/dist/chunks/index-0.6.13-q3shbg14.mjs +0 -1
- package/dist/chunks/index-0.6.13-qbgadtxv.mjs +0 -1
- package/dist/chunks/index-0.6.13-sv4q66cp.mjs +0 -1
- package/dist/chunks/index-0.6.13-waxz0ekk.mjs +0 -1
- package/dist/chunks/index-0.6.13-why7ggz3.mjs +0 -9
- package/dist/chunks/index-0.6.13-y16k48ab.mjs +0 -1
- package/dist/chunks/init-0.6.13-4hnytb22.mjs +0 -1
- package/dist/chunks/initReplBridge-0.6.13-7zgngybp.mjs +0 -1
- package/dist/chunks/ink-0.6.13-tzqbb17q.mjs +0 -1
- package/dist/chunks/insights-0.6.13-jydg844c.mjs +0 -870
- package/dist/chunks/install-0.6.13-n2sd9y79.mjs +0 -1
- package/dist/chunks/install-github-app-0.6.13-e0f07703.mjs +0 -149
- package/dist/chunks/install-slack-app-0.6.13-bf4yjq6t.mjs +0 -1
- package/dist/chunks/instrumentation-0.6.13-adfxdg5f.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.6.13-xp328y9v.mjs +0 -1
- package/dist/chunks/keybindings-0.6.13-ktc3mjr7.mjs +0 -2
- package/dist/chunks/knowledge-0.6.13-187esqxd.mjs +0 -2
- package/dist/chunks/latestVersionCache-0.6.13-m4bhcjqa.mjs +0 -1
- package/dist/chunks/loadAgentsDir-0.6.13-6zpt11ke.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.6.13-828skfe0.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.6.13-aft854e2.mjs +0 -1
- package/dist/chunks/log-0.6.13-k8w72xt1.mjs +0 -1
- package/dist/chunks/main-0.6.13-g9fjc6sv.mjs +0 -1
- package/dist/chunks/managedEnv-0.6.13-gqrx16t7.mjs +0 -1
- package/dist/chunks/mcp-0.6.13-dyg98wmq.mjs +0 -1
- package/dist/chunks/mcp-0.6.13-mzkm1215.mjs +0 -4
- package/dist/chunks/mcp-0.6.13-zkt6y77x.mjs +0 -17
- package/dist/chunks/mcpb-0.6.13-dre8w2ra.mjs +0 -1
- package/dist/chunks/memory-0.6.13-atsckryz.mjs +0 -3
- package/dist/chunks/model-0.6.13-0atttv57.mjs +0 -1
- package/dist/chunks/model-0.6.13-2jvx0cgc.mjs +0 -2
- package/dist/chunks/node-0.6.13-x2bbeer9.mjs +0 -12
- package/dist/chunks/oauth-0.6.13-57mmwqmy.mjs +0 -1
- package/dist/chunks/openaiShim-0.6.13-yb751f6g.mjs +0 -14
- package/dist/chunks/output-style-0.6.13-m28me769.mjs +0 -1
- package/dist/chunks/package-FMOR3ELU-0.6.13-dfhez176.mjs +0 -1
- package/dist/chunks/parseConnectUrl-0.6.13-6ckj0vmf.mjs +0 -1
- package/dist/chunks/parser-0.6.13-cmp0vgjm.mjs +0 -1
- package/dist/chunks/passes-0.6.13-q60h610m.mjs +0 -1
- package/dist/chunks/permissions-0.6.13-9cf5bca2.mjs +0 -3
- package/dist/chunks/permissions-0.6.13-nqms1fh9.mjs +0 -1
- package/dist/chunks/plan-0.6.13-jnph14bx.mjs +0 -1
- package/dist/chunks/plist-0.6.13-fwm9pvp5.mjs +0 -1
- package/dist/chunks/plugin-0.6.13-4hpbymfw.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.6.13-yftpxhh1.mjs +0 -1
- package/dist/chunks/plugins-0.6.13-jkptkxsv.mjs +0 -9
- package/dist/chunks/preActionHook-0.6.13-jxg6wxk8.mjs +0 -2
- package/dist/chunks/print-0.6.13-7cpe5d4z.mjs +0 -57
- package/dist/chunks/privacy-settings-0.6.13-5a5rxfdv.mjs +0 -1
- package/dist/chunks/process-0.6.13-38dsvzca.mjs +0 -1
- package/dist/chunks/processBashCommand-0.6.13-2hx0q8zw.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.6.13-5r7afr4g.mjs +0 -9
- package/dist/chunks/prompt-0.6.13-pafq1qab.mjs +0 -1
- package/dist/chunks/prompt-0.6.13-y81g0m1b.mjs +0 -1
- package/dist/chunks/prompts-0.6.13-702ak30b.mjs +0 -1
- package/dist/chunks/protocolHandler-0.6.13-t8f8haqj.mjs +0 -13
- package/dist/chunks/provider-0.6.13-2sx115qq.mjs +0 -2
- package/dist/chunks/providerProfiles-0.6.13-f8x8hr6k.mjs +0 -1
- package/dist/chunks/providerValidation-0.6.13-tf07v3tj.mjs +0 -6
- package/dist/chunks/rate-limit-options-0.6.13-aensbess.mjs +0 -1
- package/dist/chunks/registerSubcommands-0.6.13-656h79d4.mjs +0 -34
- package/dist/chunks/registry-0.6.13-pstf339a.mjs +0 -1
- package/dist/chunks/release-notes-0.6.13-hrppyszt.mjs +0 -5
- package/dist/chunks/reload-plugins-0.6.13-je6wrn33.mjs +0 -2
- package/dist/chunks/remote-env-0.6.13-z246d03z.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.6.13-ynnqhw07.mjs +0 -1
- package/dist/chunks/remoteSession-0.6.13-mv8v6s9c.mjs +0 -1
- package/dist/chunks/rename-0.6.13-xpt0c85z.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.6.13-rrpbzf13.mjs +0 -1
- package/dist/chunks/replLauncher-0.6.13-waeszqvx.mjs +0 -1
- package/dist/chunks/resume-0.6.13-sr7y57a2.mjs +0 -2
- package/dist/chunks/rewind-0.6.13-8czd98jc.mjs +0 -1
- package/dist/chunks/rootOptions-0.6.13-9h4cq5pq.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.6.13-hs1rvj4e.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.6.13-8j9r0wf9.mjs +0 -1
- package/dist/chunks/session-0.6.13-83jr96cj.mjs +0 -2
- package/dist/chunks/sessionDiscovery-0.6.13-wvzp1v01.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-0.6.13-4fkbba35.mjs +0 -1
- package/dist/chunks/sessionStorage-0.6.13-rswa4zsd.mjs +0 -1
- package/dist/chunks/settings-0.6.13-6t3fk1ch.mjs +0 -1
- package/dist/chunks/setup-0.6.13-q8jrvatq.mjs +0 -5
- package/dist/chunks/sinks-0.6.13-zatt5gaw.mjs +0 -1
- package/dist/chunks/skills-0.6.13-3c0whjxb.mjs +0 -1
- package/dist/chunks/startupProfiler-0.6.13-cphqp37f.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-0.6.13-hstp7str.mjs +0 -1
- package/dist/chunks/state-0.6.13-257cjw4h.mjs +0 -1
- package/dist/chunks/stats-0.6.13-cg0xacnc.mjs +0 -6
- package/dist/chunks/status-0.6.13-cefspgtr.mjs +0 -1
- package/dist/chunks/stickers-0.6.13-6e4t4ej1.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.6.13-am2fa4tp.mjs +0 -1
- package/dist/chunks/tasks-0.6.13-2v9gfhwe.mjs +0 -1
- package/dist/chunks/teamHelpers-0.6.13-nesaxh5h.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.6.13-s8fahdkf.mjs +0 -1
- package/dist/chunks/teleport-0.6.13-15chrxd3.mjs +0 -1
- package/dist/chunks/terminalSetup-0.6.13-45tchntj.mjs +0 -1
- package/dist/chunks/theme-0.6.13-xzb35tqq.mjs +0 -1
- package/dist/chunks/thinkback-0.6.13-t9v5q33p.mjs +0 -1
- package/dist/chunks/thinkback-play-0.6.13-3zft02zv.mjs +0 -1
- package/dist/chunks/toolPool-0.6.13-v9s7e0g9.mjs +0 -1
- package/dist/chunks/toolSearch-0.6.13-yx9rjn17.mjs +0 -1
- package/dist/chunks/tools-0.6.13-heefxcxe.mjs +0 -1
- package/dist/chunks/trustedDevice-0.6.13-x08npyhs.mjs +0 -1
- package/dist/chunks/turndown.cjs-0.6.13-tqfk5xkj.mjs +0 -69
- package/dist/chunks/types-0.6.13-26eegce9.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-0.6.13-pg8b86h2.mjs +0 -4
- package/dist/chunks/update-0.6.13-tj94pp6r.mjs +0 -86
- package/dist/chunks/upgrade-0.6.13-3qy3gqyq.mjs +0 -1
- package/dist/chunks/upload-0.6.13-jgydpvy4.mjs +0 -7
- package/dist/chunks/upstreamproxy-0.6.13-3jmepw2f.mjs +0 -14
- package/dist/chunks/url-handler-napi-0.6.13-cqr9xp6y.mjs +0 -1
- package/dist/chunks/usage-0.6.13-whrgny68.mjs +0 -1
- package/dist/chunks/util-0.6.13-dcwcf9pm.mjs +0 -1
- package/dist/chunks/utils-0.6.13-jybbphy0.mjs +0 -1
- package/dist/chunks/vim-0.6.13-rt1g3nw1.mjs +0 -1
- package/dist/chunks/watcher-0.6.13-jr5jxn5j.mjs +0 -1
- package/dist/chunks/wiki-0.6.13-pt6cr77j.mjs +0 -132
- package/dist/chunks/worktree-0.6.13-efnvp677.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.6.13-zdfe46d8.mjs +0 -1
- package/dist/chunks/wrapper-0.6.13-w672jy5j.mjs +0 -7
- /package/dist/chunks/{cli-0.6.13-e3h2z83b.mjs → cli-0.6.14-2rgps43t.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-tsz6mx5f.mjs → cli-0.6.14-74vp9e0h.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-1dwgndg5.mjs → cli-0.6.14-75anr16f.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-5qvssn7h.mjs → cli-0.6.14-mjqpmr9h.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-p839x5sj.mjs → cli-0.6.14-qtx4mpnr.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-h2yxttam.mjs → cli-0.6.14-vd0wy56c.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-s9yqkgwe.mjs → cli-0.6.14-yhc397bd.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.13-rmzzvjt2.mjs → cli-0.6.14-zaf65t8e.mjs} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{$n as D,LE as F,ME as y,PE as S,VE as o,do as r}from"./cli-0.6.14-sfan5yg2.mjs";import{FX as A,GX as l,HX as z,IX as O}from"./cli-0.6.14-01m8v54j.mjs";import{O8 as x,P8 as d,R8 as b,S8 as g}from"./cli-0.6.14-zs6qf39k.mjs";import{$ha as I,Eha as k,Gha as p,Kha as L,Oha as c,Yha as V}from"./cli-0.6.14-e4k2wv6r.mjs";import{Noa as T,Ooa as C}from"./cli-0.6.14-zqc493f5.mjs";import{Vpa as w}from"./cli-0.6.14-mjqpmr9h.mjs";import{spawn as G,spawnSync as _}from"child_process";import{basename as R}from"path";function u(q){return!!b(q)}function N(q){let H=R(q.split(" ")[0]??"");return h.find((B)=>H.includes(B))}function m(q,H,B){if(!B)return[H];if(f.has(q))return["-g",`${H}:${B}`];if(q==="subl")return[`${H}:${B}`];return[H]}function Qq(q,H){let B=v();if(!B)return!1;let J=B.split(" "),X=J[0]??B,K=J.slice(1),Q=N(B);if(Q){let W=m(Q,q,H),Z={detached:!0,stdio:"ignore"},M;if(process.platform==="win32"){let U=W.map((E)=>`"${E}"`).join(" ");M=G(`${B} ${U}`,{...Z,shell:!0})}else M=G(X,[...K,...W],Z);return M.on("error",(U)=>V(`editor spawn failed: ${U}`,{level:"error"})),M.unref(),!0}let $=z.get(process.stdout);if(!$)return!1;let Y=H&&P.test(R(X));$.enterAlternateScreen();try{let W={stdio:"inherit"},Z;if(process.platform==="win32"){let M=Y?`+${H} `:"";Z=_(`${B} ${M}"${q}"`,{...W,shell:!0})}else{let M=[...K,...Y?[`+${H}`,q]:[q]];Z=_(X,M,W)}if(Z.error)return V(`editor spawn failed: ${Z.error}`,{level:"error"}),!1;return!0}finally{$.exitAlternateScreen()}}var h,P,f,v;var j=w(()=>{C();O();I();g();h=["code","cursor","windsurf","codium","subl","atom","gedit","notepad++","notepad"],P=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,f=new Set(["code","cursor","windsurf","codium"]);v=T(()=>{if(process.env.VISUAL?.trim())return process.env.VISUAL.trim();if(process.env.EDITOR?.trim())return process.env.EDITOR.trim();if(process.platform==="win32")return"start /wait notepad";return["code","vi","nano"].find((H)=>u(H))})});function a(q){return N(q)!==void 0}function i(q){let H=L(),B=z.get(process.stdout);if(!B)throw Error("Ink instance not found - cannot pause rendering");let J=v();if(!J)return{content:null};try{H.statSync(q)}catch{return{content:null}}let X=!a(J);if(X)B.enterAlternateScreen();else B.pause(),B.suspendStdin();try{let K=s[J]??J;return x(`${K} "${q}"`,{stdio:"inherit"}),{content:H.readFileSync(q,{encoding:"utf-8"})}}catch(K){if(typeof K==="object"&&K!==null&&"status"in K&&typeof K.status==="number"){let Q=K.status;if(Q!==0)return{content:null,error:`${D(J)} exited with code ${Q}`}}return{content:null}}finally{if(X)B.exitAlternateScreen();else B.resumeStdin(),B.resume()}}function n(q,H,B){let J=q;for(let[X,K]of Object.entries(B))if(K.type==="text"){let Q=parseInt(X),$=K.content,Y=J.indexOf($);if(Y!==-1){let W=F($),Z=y(Q,W);J=J.slice(0,Y)+Z+J.slice(Y+$.length)}}return J}function Nq(q,H){let B=L(),J=A();try{let X=H?S(q,H):q;k(J,X,{encoding:"utf-8",flush:!0});let K=i(J);if(K.content===null)return K;let Q=K.content;if(Q.endsWith(`
|
|
2
|
+
`)&&!Q.endsWith(`
|
|
3
|
+
|
|
4
|
+
`))Q=Q.slice(0,-1);if(H)Q=n(Q,q,H);return{content:Q}}finally{try{B.unlinkSync(J)}catch{}}}var s;var t=w(()=>{o();O();j();d();c();r();p();l();s={code:"code -w",subl:"subl --wait"}});
|
|
5
|
+
export{Qq as pg,v as qg,j as rg,i as sg,Nq as tg,t as ug};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{Bn as E,Cn as Uq,Fn as r,Gn as Xq,Jn as d,Kn as Yq,pE as x,qE as s,rE as C,tE as n,uE as $,wE as Zq,xF as o,zF as Mq}from"./cli-0.6.14-sfan5yg2.mjs";import{GZ as a,RX as Jq,RZ as Qq,kZ as N,mZ as U,qZ as V}from"./cli-0.6.14-01m8v54j.mjs";import{W1 as u,X1 as J,Y1 as X,Z1 as g}from"./cli-0.6.14-4txh6031.mjs";import{_1 as zq}from"./cli-0.6.14-f2qf9rpv.mjs";import{Vga as w,Yga as qq}from"./cli-0.6.14-106t4q8a.mjs";import{Rpa as i,Vpa as t}from"./cli-0.6.14-mjqpmr9h.mjs";function Fq(){let z=f.c(9),q;if(z[0]===Symbol.for("react.memo_cache_sentinel"))q=X(U,{children:["An update to our Consumer Terms and Privacy Policy will take effect on"," ",J(U,{bold:!0,children:"October 8, 2025"}),". You can accept the updated terms today."]}),z[0]=q;else q=z[0];let F;if(z[1]===Symbol.for("react.memo_cache_sentinel"))F=J(U,{children:"What's changing?"}),z[1]=F;else F=z[1];let Y,Z;if(z[2]===Symbol.for("react.memo_cache_sentinel"))Y=J(U,{children:"· "}),Z=J(U,{bold:!0,children:"You can help improve Claude "}),z[2]=Y,z[3]=Z;else Y=z[2],Z=z[3];let W;if(z[4]===Symbol.for("react.memo_cache_sentinel"))W=J(N,{paddingLeft:1,children:X(U,{children:[Y,Z,X(U,{children:["— Allow the use of your chats and coding sessions to train and improve Anthropic AI models. Change anytime in your Privacy Settings (",J(V,{url:"https://claude.ai/settings/data-privacy-controls"}),")."]})]})}),z[4]=W;else W=z[4];let P;if(z[5]===Symbol.for("react.memo_cache_sentinel"))P=X(N,{flexDirection:"column",children:[F,W,J(N,{paddingLeft:1,children:X(U,{children:[J(U,{children:"· "}),J(U,{bold:!0,children:"Updates to data retention "}),J(U,{children:"— To help us improve our AI models and safety protections, we're extending data retention to 5 years."})]})})]}),z[5]=P;else P=z[5];let Q;if(z[6]===Symbol.for("react.memo_cache_sentinel"))Q=J(V,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"}),z[6]=Q;else Q=z[6];let H;if(z[7]===Symbol.for("react.memo_cache_sentinel"))H=J(V,{url:"https://anthropic.com/legal/terms"}),z[7]=H;else H=z[7];let O;if(z[8]===Symbol.for("react.memo_cache_sentinel"))O=X(u,{children:[q,P,X(U,{children:["Learn more (",Q,") or read the updated Consumer Terms (",H,") and Privacy Policy (",J(V,{url:"https://anthropic.com/legal/privacy"}),")"]})]}),z[8]=O;else O=z[8];return O}function Nq(){let z=f.c(7),q;if(z[0]===Symbol.for("react.memo_cache_sentinel"))q=J(U,{children:"We've updated our Consumer Terms and Privacy Policy."}),z[0]=q;else q=z[0];let F;if(z[1]===Symbol.for("react.memo_cache_sentinel"))F=J(U,{children:"What's changing?"}),z[1]=F;else F=z[1];let Y;if(z[2]===Symbol.for("react.memo_cache_sentinel"))Y=X(N,{flexDirection:"column",children:[J(U,{bold:!0,children:"Help improve Claude"}),J(U,{children:"Allow the use of your chats and coding sessions to train and improve Anthropic AI models. You can change this anytime in Privacy Settings"}),J(V,{url:"https://claude.ai/settings/data-privacy-controls"})]}),z[2]=Y;else Y=z[2];let Z;if(z[3]===Symbol.for("react.memo_cache_sentinel"))Z=X(N,{flexDirection:"column",gap:1,children:[F,Y,X(N,{flexDirection:"column",children:[J(U,{bold:!0,children:"How this affects data retention"}),J(U,{children:"Turning ON the improve Claude setting extends data retention from 30 days to 5 years. Turning it OFF keeps the default 30-day data retention. Delete data anytime."})]})]}),z[3]=Z;else Z=z[3];let W;if(z[4]===Symbol.for("react.memo_cache_sentinel"))W=J(V,{url:"https://www.anthropic.com/news/updates-to-our-consumer-terms"}),z[4]=W;else W=z[4];let P;if(z[5]===Symbol.for("react.memo_cache_sentinel"))P=J(V,{url:"https://anthropic.com/legal/terms"}),z[5]=P;else P=z[5];let Q;if(z[6]===Symbol.for("react.memo_cache_sentinel"))Q=X(u,{children:[q,Z,X(U,{children:["Learn more (",W,") or read the updated Consumer Terms (",P,") and Privacy Policy (",J(V,{url:"https://anthropic.com/legal/privacy"}),")"]})]}),z[6]=Q;else Q=z[6];return Q}function kq(z){let q=f.c(34),{showIfAlreadyViewed:F,location:Y,onDone:Z}=z,[W,P]=_.useState(null),[Q,H]=_.useState(null),O,R;if(q[0]!==Y||q[1]!==Z||q[2]!==F)O=()=>{(async function(){let[e,c]=await Promise.all([x(),n()]),j=c.success?c.data:null;H(j);let l=$(e,c,F);if(P(l),!l){Z("skip_rendering");return}s(),w("tengu_grove_policy_viewed",{location:Y,dismissable:j?.notice_is_grace_period})})()},R=[F,Y,Z],q[0]=Y,q[1]=Z,q[2]=F,q[3]=O,q[4]=R;else O=q[3],R=q[4];if(_.useEffect(O,R),W===null)return null;if(!W)return null;let K;if(q[5]!==Q?.notice_is_grace_period||q[6]!==Z)K=async function(v){q:switch(v){case"accept_opt_in":{await C(!0),w("tengu_grove_policy_submitted",{state:!0,dismissable:Q?.notice_is_grace_period});break q}case"accept_opt_out":{await C(!1),w("tengu_grove_policy_submitted",{state:!1,dismissable:Q?.notice_is_grace_period});break q}case"defer":{w("tengu_grove_policy_dismissed",{state:!0});break q}case"escape":w("tengu_grove_policy_escaped",{})}Z(v)},q[5]=Q?.notice_is_grace_period,q[6]=Z,q[7]=K;else K=q[7];let A=K,L;if(q[8]!==Q?.domain_excluded)L=Q?.domain_excluded?[{label:"Accept terms · Help improve Claude: OFF (for emails with your domain)",value:"accept_opt_out"}]:[{label:"Accept terms · Help improve Claude: ON",value:"accept_opt_in"},{label:"Accept terms · Help improve Claude: OFF",value:"accept_opt_out"}],q[8]=Q?.domain_excluded,q[9]=L;else L=q[9];let I=L,G;if(q[10]!==Q?.notice_is_grace_period||q[11]!==A)G=function(){if(Q?.notice_is_grace_period){A("defer");return}A("escape")},q[10]=Q?.notice_is_grace_period,q[11]=A,q[12]=G;else G=q[12];let M=G,k;if(q[13]!==Q?.notice_is_grace_period)k=J(N,{flexDirection:"column",gap:1,flexGrow:1,children:Q?.notice_is_grace_period?J(Fq,{}):J(Nq,{})}),q[13]=Q?.notice_is_grace_period,q[14]=k;else k=q[14];let D;if(q[15]===Symbol.for("react.memo_cache_sentinel"))D=J(N,{flexShrink:0,children:J(U,{color:"professionalBlue",children:Wq})}),q[15]=D;else D=q[15];let B;if(q[16]!==k)B=X(N,{flexDirection:"row",children:[k,D]}),q[16]=k,q[17]=B;else B=q[17];let T;if(q[18]===Symbol.for("react.memo_cache_sentinel"))T=X(N,{flexDirection:"column",children:[J(U,{bold:!0,children:"Please select how you'd like to continue"}),J(U,{children:"Your choice takes effect immediately upon confirmation."})]}),q[18]=T;else T=q[18];let b;if(q[19]!==Q?.notice_is_grace_period)b=Q?.notice_is_grace_period?[{label:"Not now",value:"defer"}]:[],q[19]=Q?.notice_is_grace_period,q[20]=b;else b=q[20];let m;if(q[21]!==I||q[22]!==b)m=[...I,...b],q[21]=I,q[22]=b,q[23]=m;else m=q[23];let p;if(q[24]!==A)p=(h)=>A(h),q[24]=A,q[25]=p;else p=q[25];let y;if(q[26]!==M||q[27]!==m||q[28]!==p)y=X(N,{flexDirection:"column",gap:1,children:[T,J(o,{options:m,onChange:p,onCancel:M})]}),q[26]=M,q[27]=m,q[28]=p,q[29]=y;else y=q[29];let S;if(q[30]!==M||q[31]!==y||q[32]!==B)S=X(d,{title:"Updates to Consumer Terms and Policies",color:"professionalBlue",onCancel:M,inputGuide:Oq,children:[B,y]}),q[30]=M,q[31]=y,q[32]=B,q[33]=S;else S=q[33];return S}function Oq(z){return z.pending?X(U,{children:["Press ",z.keyName," again to exit"]}):X(r,{children:[J(E,{shortcut:"Enter",action:"confirm"}),J(E,{shortcut:"Esc",action:"cancel"})]})}function _q(z){let q=f.c(17),{settings:F,domainExcluded:Y,onDone:Z}=z,[W,P]=_.useState(F.grove_enabled),Q;if(q[0]===Symbol.for("react.memo_cache_sentinel"))Q=[],q[0]=Q;else Q=q[0];_.default.useEffect(Pq,Q);let H;if(q[1]!==Y||q[2]!==W)H=async(M,k)=>{if(!Y&&(k.tab||k.return||M===" ")){let D=!W;P(D),await C(D)}},q[1]=Y,q[2]=W,q[3]=H;else H=q[3];a(H);let O;if(q[4]===Symbol.for("react.memo_cache_sentinel"))O=J(U,{color:"error",children:"false"}),q[4]=O;else O=q[4];let R=O;if(Y){let M;if(q[5]===Symbol.for("react.memo_cache_sentinel"))M=J(U,{color:"error",children:"false (for emails with your domain)"}),q[5]=M;else M=q[5];R=M}else if(W){let M;if(q[6]===Symbol.for("react.memo_cache_sentinel"))M=J(U,{color:"success",children:"true"}),q[6]=M;else M=q[6];R=M}let K;if(q[7]!==Y)K=(M)=>M.pending?X(U,{children:["Press ",M.keyName," again to exit"]}):Y?J(E,{shortcut:"Esc",action:"cancel"}):X(r,{children:[J(E,{shortcut:"Enter/Tab/Space",action:"toggle"}),J(E,{shortcut:"Esc",action:"cancel"})]}),q[7]=Y,q[8]=K;else K=q[8];let A;if(q[9]===Symbol.for("react.memo_cache_sentinel"))A=X(U,{children:["Review and manage your privacy settings at"," ",J(V,{url:"https://claude.ai/settings/data-privacy-controls"})]}),q[9]=A;else A=q[9];let L;if(q[10]===Symbol.for("react.memo_cache_sentinel"))L=J(N,{width:44,children:J(U,{bold:!0,children:"Help improve Claude"})}),q[10]=L;else L=q[10];let I;if(q[11]!==R)I=X(N,{children:[L,J(N,{children:R})]}),q[11]=R,q[12]=I;else I=q[12];let G;if(q[13]!==Z||q[14]!==K||q[15]!==I)G=X(d,{title:"Data Privacy",color:"professionalBlue",onCancel:Z,inputGuide:K,children:[A,I]}),q[13]=Z,q[14]=K,q[15]=I,q[16]=G;else G=q[16];return G}function Pq(){w("tengu_grove_privacy_settings_viewed",{})}var f,_,Wq=` _____________
|
|
2
|
+
| \\ \\
|
|
3
|
+
| NEW TERMS \\__\\
|
|
4
|
+
| |
|
|
5
|
+
| ---------- |
|
|
6
|
+
| ---------- |
|
|
7
|
+
| ---------- |
|
|
8
|
+
| ---------- |
|
|
9
|
+
| ---------- |
|
|
10
|
+
| |
|
|
11
|
+
|______________|`;var Aq=t(()=>{qq();Qq();Zq();Mq();Xq();Yq();Uq();g();f=i(Jq(),1),_=i(zq(),1)});
|
|
12
|
+
export{kq as ic,_q as jc,Aq as kc};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Ki as cJ,UP as UJ,pJ as DJ,qJ as BJ,rJ as lJ,rQ as jJ,sQ as $V,vo as IJ,xo as pJ}from"./cli-0.6.14-sfan5yg2.mjs";import{D9 as NJ,Gba as uJ,H9 as gJ,Rca as hJ,T8 as WJ,Y8 as l,nea as G,u9 as mJ,vea as dJ,wba as m,wca as YJ,x8 as p,y8 as fJ}from"./cli-0.6.14-zs6qf39k.mjs";import{fga as U,gga as PJ}from"./cli-0.6.14-45cmq90s.mjs";import{Vga as f,Yga as SJ}from"./cli-0.6.14-106t4q8a.mjs";import{$ha as kJ,Kha as VJ,Oha as bJ,Yha as Q}from"./cli-0.6.14-e4k2wv6r.mjs";import{qia as JJ,xia as yJ}from"./cli-0.6.14-tsj8ceqz.mjs";import{nka as qJ,oka as zJ}from"./cli-0.6.14-f8c4q74r.mjs";import{Rpa as wJ,Vpa as _J}from"./cli-0.6.14-mjqpmr9h.mjs";class c{paths=[];lowerPaths=[];charBits=new Int32Array(0);pathLens=new Uint16Array(0);topLevelCache=null;readyCount=0;loadFromFileList(J){let W=new Set,Z=[];for(let V of J)if(V.length>0&&!W.has(V))W.add(V),Z.push(V);this.buildIndex(Z)}loadFromFileListAsync(J){let W=()=>{},Z=new Promise((Y)=>{W=Y}),V=this.buildAsync(J,W);return{queryable:Z,done:V}}async buildAsync(J,W){let Z=new Set,V=[],Y=performance.now();for(let X=0;X<J.length;X++){let _=J[X];if(_.length>0&&!Z.has(_))Z.add(_),V.push(_);if((X&255)===255&&performance.now()-Y>4)await b(),Y=performance.now()}this.resetArrays(V),Y=performance.now();let $=!0;for(let X=0;X<V.length;X++)if(this.indexPath(X),(X&255)===255&&performance.now()-Y>4){if(this.readyCount=X+1,$)W(),$=!1;await b(),Y=performance.now()}this.readyCount=V.length,W()}buildIndex(J){this.resetArrays(J);for(let W=0;W<J.length;W++)this.indexPath(W);this.readyCount=J.length}resetArrays(J){let W=J.length;this.paths=J,this.lowerPaths=Array(W),this.charBits=new Int32Array(W),this.pathLens=new Uint16Array(W),this.readyCount=0,this.topLevelCache=LJ(J,100)}indexPath(J){let W=this.paths[J].toLowerCase();this.lowerPaths[J]=W;let Z=W.length;this.pathLens[J]=Z;let V=0;for(let Y=0;Y<Z;Y++){let $=W.charCodeAt(Y);if($>=97&&$<=122)V|=1<<$-97}this.charBits[J]=V}search(J,W){if(W<=0)return[];if(J.length===0){if(this.topLevelCache)return this.topLevelCache.slice(0,W);return[]}let Z=J!==J.toLowerCase(),V=Z?J:J.toLowerCase(),Y=Math.min(V.length,64),$=Array(Y),X=0;for(let M=0;M<Y;M++){let B=V.charAt(M);$[M]=B;let E=B.charCodeAt(0);if(E>=97&&E<=122)X|=1<<E-97}let _=Y*24+8+32,H=[],N=-1/0,{paths:I,lowerPaths:q,charBits:x,pathLens:j,readyCount:g}=this;J:for(let M=0;M<g;M++){if((x[M]&X)!==X)continue;let B=Z?I[M]:q[M],E=B.indexOf($[0]);if(E===-1)continue;y[0]=E;let C=0,u=0,h=E;for(let A=1;A<Y;A++){if(E=B.indexOf($[A],h+1),E===-1)continue J;y[A]=E;let F=E-h-1;if(F===0)u+=4;else C+=3+F*1;h=E}if(H.length===W&&_+u-C<=N)continue;let S=I[M],vJ=j[M],T=Y*16+u-C;T+=HJ(S,y[0],!0);for(let A=1;A<Y;A++)T+=HJ(S,y[A],!1);if(T+=Math.max(0,32-(vJ>>2)),H.length<W){if(H.push({path:S,fuzzScore:T}),H.length===W)H.sort((A,F)=>A.fuzzScore-F.fuzzScore),N=H[0].fuzzScore}else if(T>N){let A=0,F=H.length;while(A<F){let d=A+F>>1;if(H[d].fuzzScore<T)A=d+1;else F=d}H.splice(A,0,{path:S,fuzzScore:T}),H.shift(),N=H[0].fuzzScore}}H.sort((M,B)=>B.fuzzScore-M.fuzzScore);let D=H.length,w=Math.max(D,1),z=Array(D);for(let M=0;M<D;M++){let B=H[M].path,E=M/w,C=B.includes("test")?Math.min(E*1.05,1):E;z[M]={path:B,score:C}}return z}}function HJ(J,W,Z){if(W===0)return Z?8:0;let V=J.charCodeAt(W-1);if(RJ(V))return 8;if(GJ(V)&&CJ(J.charCodeAt(W)))return 6;return 0}function RJ(J){return J===47||J===92||J===45||J===95||J===46||J===32}function GJ(J){return J>=97&&J<=122}function CJ(J){return J>=65&&J<=90}function b(){return new Promise((J)=>setImmediate(J))}function LJ(J,W){let Z=new Set;for(let Y of J){let $=Y.length;for(let _=0;_<Y.length;_++){let H=Y.charCodeAt(_);if(H===47||H===92){$=_;break}}let X=Y.slice(0,$);if(X.length>0){if(Z.add(X),Z.size>=W)break}}let V=Array.from(Z);return V.sort((Y,$)=>{let X=Y.length-$.length;if(X!==0)return X;return Y<$?-1:Y>$?1:0}),V.slice(0,W).map((Y)=>({path:Y,score:0}))}var QJ=4,y;var MJ=_J(()=>{y=new Int32Array(64)});import{statSync as nJ}from"fs";import*as O from"path";function n(){if(!K)K=new c;return K}function vV(){K=null,v=null,R++,k=null,L=[],$J=[],XJ=[],ZJ.clear(),s=null,o=null,a=0,i=null,r=null,P=null}function xJ(J){let W=J.length,Z=Math.max(1,Math.floor(W/500)),V=-2128831035;for(let Y=0;Y<W;Y+=Z){let $=J[Y];for(let X=0;X<$.length;X++)V=(V^$.charCodeAt(X))*16777619|0;V=V*16777619|0}if(W>0){let Y=J[W-1];for(let $=0;$<Y.length;$++)V=(V^Y.charCodeAt($))*16777619|0}return`${W}:${(V>>>0).toString(16)}`}function sJ(){let J=WJ(U());if(!J)return null;try{return nJ(O.join(J,".git","index")).mtimeMs}catch{return null}}function OJ(J,W,Z){if(Z===W)return J;return J.map((V)=>{let Y=O.join(W,V);return O.relative(Z,Y)})}async function oJ(J){if(J.length===0)return;if(!K||L.length===0)return;let W=await FJ(J),Z=[...L,...$J,...XJ,...J,...W],V=xJ(Z);if(V===P){Q("[FileIndex] skipped index rebuild — merged paths unchanged");return}await K.loadFromFileListAsync(Z).done,P=V,Q(`[FileIndex] rebuilt index with ${L.length} tracked + ${J.length} untracked files`)}async function EJ(J,W){let Z=`${J}:${W}`;if(o===Z)return s;let V=VJ(),Y=[".ignore",".rgignore"],$=[...new Set([J,W])],X=KJ.default(),_=!1,H=$.flatMap((q)=>Y.map((x)=>O.join(q,x))),N=await Promise.all(H.map((q)=>V.readFile(q,{encoding:"utf8"}).catch(()=>null)));for(let[q,x]of N.entries()){if(x===null)continue;X.add(x),_=!0,Q(`[FileIndex] loaded ignore patterns from ${H[q]}`)}let I=_?X:null;return s=I,o=Z,I}async function aJ(J,W){let Z=Date.now();Q("[FileIndex] getFilesUsingGit called");let V=WJ(U());if(!V)return Q("[FileIndex] not a git repo, returning null"),null;try{let Y=U(),$=Date.now(),X=await p(l(),["-c","core.quotepath=false","ls-files","--recurse-submodules"],{timeout:5000,abortSignal:J,cwd:V});if(Q(`[FileIndex] git ls-files (tracked) took ${Date.now()-$}ms`),X.code!==0)return Q(`[FileIndex] git ls-files failed (code=${X.code}, stderr=${X.stderr}), falling back to ripgrep`),null;let _=X.stdout.trim().split(`
|
|
2
|
+
`).filter(Boolean),H=OJ(_,V,Y),N=await EJ(V,Y);if(N){let q=H.length;H=N.filter(H),Q(`[FileIndex] applied ignore patterns: ${q} -> ${H.length} files`)}L=H;let I=Date.now()-Z;if(Q(`[FileIndex] git ls-files: ${H.length} tracked files in ${I}ms`),f("tengu_file_suggestions_git_ls_files",{file_count:H.length,tracked_count:H.length,untracked_count:0,duration_ms:I}),!k){let q=W?["-c","core.quotepath=false","ls-files","--others","--exclude-standard"]:["-c","core.quotepath=false","ls-files","--others"],x=R;k=p(l(),q,{timeout:1e4,cwd:V}).then(async(j)=>{if(x!==R)return;if(j.code===0){let g=j.stdout.trim().split(`
|
|
3
|
+
`).filter(Boolean),D=OJ(g,V,Y),w=await EJ(V,Y);if(w&&D.length>0){let z=D.length;D=w.filter(D),Q(`[FileIndex] applied ignore patterns to untracked: ${z} -> ${D.length} files`)}Q(`[FileIndex] background untracked fetch: ${D.length} files`),oJ(D)}}).catch((j)=>{Q(`[FileIndex] background untracked fetch failed: ${j}`)}).finally(()=>{k=null})}return H}catch(Y){return Q(`[FileIndex] git ls-files error: ${JJ(Y)}`),null}}async function FJ(J){let W=new Set,Z=performance.now();for(let V=0;V<J.length;V++)if(iJ(J,V,V+1,W),(V&255)===255&&performance.now()-Z>QJ)await b(),Z=performance.now();return[...W].map((V)=>V+O.sep)}function iJ(J,W,Z,V){for(let Y=W;Y<Z;Y++){let $=O.dirname(J[Y]);while($!=="."&&!V.has($)){let X=O.dirname($);if(X===$)break;V.add($),$=X}}}async function rJ(J){return(await Promise.all(DJ.map((Z)=>BJ(Z,J)))).flatMap((Z)=>Z.map((V)=>V.filePath))}async function tJ(J,W){Q(`[FileIndex] getProjectFiles called, respectGitignore=${W}`);let Z=await aJ(J,W);if(Z!==null)return Q(`[FileIndex] using git ls-files result (${Z.length} files)`),Z;return Q("[FileIndex] git ls-files returned null, falling back to ripgrep"),TJ(J,W)}async function TJ(J,W){let Z=Date.now(),V=["--files","--follow","--hidden","--glob","!.git/","--glob","!.svn/","--glob","!.hg/","--glob","!.bzr/","--glob","!.jj/","--glob","!.sl/"];if(!W)V.push("--no-ignore-vcs");let $=(await IJ(V,".",J)).map((_)=>O.relative(U(),_)),X=Date.now()-Z;return Q(`[FileIndex] ripgrep: ${$.length} files in ${X}ms`),f("tengu_file_suggestions_ripgrep",{file_count:$.length,duration_ms:X}),$}async function RV(){let J=AbortSignal.timeout(1e4),W=m(),Z=YJ(),V=W.respectGitignore??Z.respectGitignore??!0;try{return await TJ(J,V)}catch(Y){return G(Y),[]}}async function eJ(){let J=AbortSignal.timeout(1e4),W=n();try{let Z=m(),V=YJ(),Y=Z.respectGitignore??V.respectGitignore??!0,$=U(),[X,_]=await Promise.all([tJ(J,Y),rJ($)]);$J=_;let H=[...X,..._],N=await FJ(H);XJ=N;let I=[...N,...H],q=xJ(I);if(q!==r)await W.loadFromFileListAsync(I).done,r=q,P=null;else Q("[FileIndex] skipped index rebuild — tracked paths unchanged")}catch(Z){G(Z)}return W}function JV(J,W){let Z=Math.min(J.length,W.length),V=0;while(V<Z&&J[V]===W[V])V++;return J.substring(0,V)}function GV(J){if(J.length===0)return"";let W=J.map((V)=>V.displayText),Z=W[0];for(let V=1;V<W.length;V++){let Y=W[V];if(Z=JV(Z,Y),Z==="")return""}return Z}function t(J,W){return{id:`file-${J}`,displayText:J,metadata:W!==void 0?{score:W}:void 0}}function VV(J,W){return J.search(W,e).map((V)=>t(V.path,V.score))}function AJ(){if(v)return;let J=sJ();if(K){if(!(J!==null&&J!==i)&&Date.now()-a<WV)return}let W=R,Z=Date.now();n(),v=eJ().then((V)=>{if(W!==R)return V;return v=null,ZJ.emit(),i=J,a=Date.now(),Q(`[FileIndex] cache refresh completed in ${Date.now()-Z}ms`),V}).catch((V)=>{if(Q(`[FileIndex] Cache refresh failed: ${JJ(V)}`),G(V),W===R)v=null;return n()})}async function YV(){let J=VJ(),W=U();try{let Z=await J.readdir(W);return Z.sort((V,Y)=>{let $=V.isDirectory(),X=Y.isDirectory();if($!==X)return $?-1:1;let _=V.name.startsWith("."),H=Y.name.startsWith(".");if(_!==H)return _?-1:1;return V.name.toLowerCase().localeCompare(Y.name.toLowerCase())}),Z.map((V)=>{let Y=O.join(W,V.name),$=O.relative(W,Y);return V.isDirectory()?$+O.sep:$})}catch(Z){return G(Z),[]}}async function CV(J,W=!1){if(!J&&!W)return[];if(m().fileSuggestion?.type==="command"){let V={...UJ(),query:J};return(await jJ(V)).slice(0,e).map(t)}if(J===""||J==="."||J==="./"){let V=await YV();return AJ(),V.slice(0,e).map(t)}let Z=Date.now();try{let V=v!==null;AJ();let Y=J,$="."+O.sep;if(J.startsWith($))Y=J.substring(2);if(Y.startsWith("~"))Y=NJ(Y);let X=K?VV(K,Y):[],_=Date.now()-Z;return Q(`[FileIndex] generateFileSuggestions: ${X.length} results in ${_}ms (${V?"partial":"full"} index)`),f("tengu_file_suggestions_query",{duration_ms:_,cache_hit:!V,result_count:X.length,query_length:J.length}),X}catch(V){return G(V),[]}}function LV(J,W,Z,V,Y,$){let X=typeof J==="string"?J:J.displayText,_=W.substring(0,V)+X+W.substring(V+Z.length);Y(_);let H=V+X.length;$(H)}var KJ,K=null,v=null,ZJ,jV,R=0,k=null,L,$J,XJ,s=null,o=null,a=0,i=null,r=null,P=null,e=100,WV=5000;var ZV=_J(()=>{lJ();MJ();SJ();hJ();PJ();kJ();yJ();fJ();bJ();mJ();$V();dJ();gJ();pJ();uJ();zJ();KJ=wJ(cJ(),1);ZJ=qJ(),jV=ZJ.subscribe,L=[],$J=[],XJ=[]});
|
|
4
|
+
export{c as Sh,MJ as Th,jV as Uh,vV as Vh,RV as Wh,GV as Xh,AJ as Yh,CV as Zh,LV as _h,ZV as $h};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{PO as x,SO as B}from"./cli-0.6.14-sfan5yg2.mjs";import{Vpa as z}from"./cli-0.6.14-mjqpmr9h.mjs";function H(q){if(!q)return 0;return q.activeAgents.filter((b)=>b.source!=="built-in").reduce((b,w)=>{let y=`${w.agentType}: ${w.whenToUse}`;return b+x(y)},0)}var G=15000;var A=z(()=>{B()});
|
|
2
|
+
export{G as kg,H as lg,A as mg};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{Cb as DY}from"./cli-0.6.14-74vp9e0h.mjs";import{Jc as LY,Mc as iQ}from"./cli-0.6.14-kwnf1xer.mjs";import{Nh as V0,Oh as p6}from"./cli-0.6.14-nz0nygqh.mjs";import{li as pY,mi as A6}from"./cli-0.6.14-t88fpm4q.mjs";import{$w as h0,$z as uY,AP as xZ,Az as D6,Bs as r9,KC as HY,Kk as L9,LC as aQ,Lk as u6,Mj as KZ,Mk as z9,Mp as iZ,Nk as q9,Np as AY,Ok as bZ,Op as FZ,Pj as E0,Pk as Y0,Pp as _Y,Qk as D9,RP as wZ,Rk as XZ,Sk as Q0,Tk as v9,UM as BY,UN as gY,Uj as hY,Uk as A9,Vk as sY,WC as NY,WM as rQ,XC as nQ,YC as RY,_C as z6,aK as P9,ax as uZ,bA as v6,bO as dY,bx as k0,cD as n,cK as F9,cQ as rY,cx as x0,dO as lY,dx as u0,eD as U6,ex as p0,fB as cY,fx as pZ,gB as _6,gK as M9,gx as cZ,hA as CY,hO as w6,hp as j9,hx as c0,iA as TY,iP as s,ip as i6,ix as m0,jA as L6,jx as g0,kB as mY,kx as d0,lB as O6,lQ as iY,lx as l0,mH as T0,mt as ZY,mx as a0,nH as s9,nK as o6,nt as xQ,nx as n0,oP as aY,ot as JY,ox as r0,pQ as zY,pt as lQ,px as i0,qt as kY,qx as GQ,sJ as PY,sQ as qY,ts as M0,vJ as J6,vP as nY,vm as yZ,vv as I0,wP as kZ,ws as b0,xF as C0,xs as fZ,xz as xY,yF as o9,ym as $Z,yv as i9,zm as e0}from"./cli-0.6.14-sfan5yg2.mjs";import{TV as Q9,XV as R6}from"./cli-0.6.14-mb6vtzwv.mjs";import{$W as F0,BW as y0,CW as d9,PW as $0,QW as j0,RW as l9,UW as P0,VW as a9,aX as n9}from"./cli-0.6.14-p1tqmfbz.mjs";import{RX as m9,RZ as g9,kZ as p,mZ as M}from"./cli-0.6.14-01m8v54j.mjs";import{W1 as a,X1 as E,Y1 as b,Z1 as J0}from"./cli-0.6.14-4txh6031.mjs";import{_1 as c9}from"./cli-0.6.14-f2qf9rpv.mjs";import{E6 as G6,H5 as jY,d4 as $Y,h4 as K6}from"./cli-0.6.14-hwwpzjf6.mjs";import{$9 as TZ,B_ as n6,Baa as V6,E_ as Y9,Gba as W6,J_ as T6,U8 as E9,b_ as x9,e_ as y9,f8 as _Z,g8 as k9,gaa as $9,gea as U0,jea as p9,naa as r6,nea as e,s8 as GY,u8 as dQ,u9 as a6,vea as w0,xba as yY,yaa as wY,zaa as EY}from"./cli-0.6.14-zs6qf39k.mjs";import{Gea as B0,Oea as L0,Sea as h9}from"./cli-0.6.14-xkdca0es.mjs";import{Hfa as $6,wfa as oY}from"./cli-0.6.14-2kj6t828.mjs";import{$fa as h,_fa as Y,aga as JZ,bga as q,cga as EZ}from"./cli-0.6.14-g818hb3n.mjs";import{Ega as O0,Kga as u9,fga as UY,gga as X6,iga as RZ,lga as z0,mga as q0,nga as D0,oga as v0,rga as A0,sga as _0}from"./cli-0.6.14-45cmq90s.mjs";import{Vga as g,Yga as UZ}from"./cli-0.6.14-106t4q8a.mjs";import{$ga as Z9,$ha as HZ,Bha as ZZ,Cha as WY,Gha as PZ,Yha as I,bha as C6}from"./cli-0.6.14-e4k2wv6r.mjs";import{bia as KY,fia as gQ}from"./cli-0.6.14-9vb8dn9c.mjs";import{iia as VY,qia as w9,ria as tZ,xia as lZ}from"./cli-0.6.14-tsj8ceqz.mjs";import{Gla as OY,Yma as J9,Zma as DZ,_ma as H9,ana as N9,bna as X0,dna as B9,loa as IY,ooa as BZ,rka as NZ,xka as W0,yka as eY}from"./cli-0.6.14-f8c4q74r.mjs";import{Rpa as N0,Upa as hZ,Vpa as OZ,Wpa as rZ}from"./cli-0.6.14-mjqpmr9h.mjs";var WQ={};hZ(WQ,{selectableUserMessagesFilter:()=>S0,messagesAfterAreOnlySynthetic:()=>VQ,MessageSelector:()=>e9});import{randomUUID as t9}from"crypto";import*as QZ from"path";function R0(Q){return Q.type==="text"}function SZ(Q){return Q==="summarize"||Q==="summarize_up_to"}function e9({messages:Q,onPreRestore:Z,onRestoreMessage:X,onRestoreCode:V,onSummarize:W,onClose:H,preselectedMessage:G}){let K=I0((U)=>U.fileHistory),[B,z]=T.useState(void 0),J=M0(),L=T.useMemo(t9,[]),_=T.useMemo(()=>[...Q.filter(S0),{...s({content:""}),uuid:L}],[Q,L]),[w,v]=T.useState(_.length-1),P=Math.max(0,Math.min(w-Math.floor(CZ/2),_.length-CZ)),f=_.length>1,[D,F]=T.useState(G),[y,S]=T.useState(void 0);T.useEffect(()=>{if(!G||!J)return;let U=!1;return fZ(K,G.uuid).then((R)=>{if(!U)S(R)}),()=>{U=!0}},[G,J,K]);let[O,$]=T.useState(!1),[d,i]=T.useState(null),[o,C]=T.useState("both"),[k,x]=T.useState(""),[A,j]=T.useState("");function N(U){let R=U?[{value:"both",label:"Restore code and conversation"},{value:"conversation",label:"Restore conversation"},{value:"code",label:"Restore code"}]:[{value:"conversation",label:"Restore conversation"}],c={type:"input",placeholder:"add context (optional)",initialValue:"",allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:": "};return R.push({value:"summarize",label:"Summarize from here",...c,onChange:x}),R.push({value:"nevermind",label:"Never mind"}),R}T.useEffect(()=>{g("tengu_message_selector_opened",{})},[]);async function u(U){Z(),$(!0);try{await X(U),$(!1),H()}catch(R){e(R),$(!1),z(`Failed to restore the conversation:
|
|
2
|
+
${R}`)}}async function l(U){let R=Q.indexOf(U),c=Q.length-1-R;if(g("tengu_message_selector_selected",{index_from_end:c,message_type:U.type,is_current_prompt:!1}),!Q.includes(U)){H();return}if(!J){await u(U);return}let m=await fZ(K,U.uuid);F(U),S(m)}async function VZ(U){if(g("tengu_message_selector_restore_option_selected",{option:U}),!D){z("Message not found.");return}if(U==="nevermind"){if(G)H();else F(void 0);return}if(SZ(U)){Z(),$(!0),i(U),z(void 0);try{let m=U==="summarize_up_to"?"up_to":"from",YZ=(m==="up_to"?A:k).trim()||void 0;await W(D,YZ,m),$(!1),i(null),F(void 0),H()}catch(m){e(m),$(!1),i(null),F(void 0),z(`Failed to summarize:
|
|
3
|
+
${m}`)}return}Z(),$(!0),z(void 0);let R=null,c=null;if(U==="code"||U==="both")try{await V(D)}catch(m){R=m,e(R)}if(U==="conversation"||U==="both")try{await X(D)}catch(m){c=m,e(c)}if($(!1),F(void 0),c&&R)z(`Failed to restore the conversation and code:
|
|
4
|
+
${c}
|
|
5
|
+
${R}`);else if(c)z(`Failed to restore the conversation:
|
|
6
|
+
${c}`);else if(R)z(`Failed to restore the code:
|
|
7
|
+
${R}`);else H()}let WZ=P0(),t=T.useCallback(()=>{if(D&&!G){F(void 0);return}g("tengu_message_selector_cancelled",{}),H()},[H,D,G]),I9=T.useCallback(()=>v((U)=>Math.max(0,U-1)),[]),C9=T.useCallback(()=>v((U)=>Math.min(_.length-1,U+1)),[_.length]),T9=T.useCallback(()=>v(0),[]),R9=T.useCallback(()=>v(_.length-1),[_.length]),f9=T.useCallback(()=>{let U=_[w];if(U)l(U)},[_,w,l]);$0("confirm:no",t,{context:"Confirmation",isActive:!D}),j0({"messageSelector:up":I9,"messageSelector:down":C9,"messageSelector:top":T9,"messageSelector:bottom":R9,"messageSelector:select":f9},{context:"MessageSelector",isActive:!O&&!B&&!D&&f});let[K0,G0]=T.useState({});T.useEffect(()=>{async function U(){if(!J)return;Promise.all(_.map(async(R,c)=>{if(R.uuid!==L){let m=b0(K,R.uuid),YZ=_.at(c+1),AZ=m?XQ(Q,R.uuid,YZ?.uuid!==L?YZ?.uuid:void 0):void 0;if(AZ!==void 0)G0((r)=>({...r,[c]:AZ}));else G0((r)=>({...r,[c]:void 0}))}}))}U()},[_,Q,L,K,J]);let vZ=J&&y?.filesChanged&&y.filesChanged.length>0,S9=!B&&!D&&!G&&f;return b(p,{flexDirection:"column",width:"100%",children:[E(F0,{color:"suggestion"}),b(p,{flexDirection:"column",marginX:1,gap:1,children:[E(M,{bold:!0,color:"suggestion",children:"Rewind"}),B&&E(a,{children:b(M,{color:"error",children:["Error: ",B]})}),!f&&E(a,{children:E(M,{children:"Nothing to rewind to yet."})}),!B&&D&&f&&b(a,{children:[b(M,{children:["Confirm you want to restore"," ",!y&&"the conversation ","to the point before you sent this message:"]}),b(p,{flexDirection:"column",paddingLeft:1,borderStyle:"single",borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[E(H0,{userMessage:D,color:"text",isCurrent:!1}),b(M,{dimColor:!0,children:["(",L0(new Date(D.timestamp)),")"]})]}),E(YQ,{selectedRestoreOption:o,canRestoreCode:!!vZ,diffStatsForRestore:y}),O&&SZ(d)?b(p,{flexDirection:"row",gap:1,children:[E(T0,{}),E(M,{children:"Summarizing…"})]}):E(C0,{isDisabled:O,options:N(!!vZ),defaultFocusValue:vZ?"both":"conversation",onFocus:(U)=>C(U),onChange:(U)=>VZ(U),onCancel:()=>G?H():F(void 0)}),vZ&&E(p,{marginBottom:1,children:b(M,{dimColor:!0,children:[_Z.warning," Rewinding does not affect files edited manually or via bash."]})})]}),S9&&b(a,{children:[J?E(M,{children:"Restore the code and/or conversation to the point before…"}):E(M,{children:"Restore and fork the conversation to the point before…"}),E(p,{width:"100%",flexDirection:"column",children:_.slice(P,P+CZ).map((U,R)=>{let c=P+R,m=c===w,YZ=U.uuid===L,AZ=c in K0,r=K0[c],IZ=r?.filesChanged&&r.filesChanged.length;return b(p,{height:J?3:2,overflow:"hidden",width:"100%",flexDirection:"row",children:[E(p,{width:2,minWidth:2,children:m?b(M,{color:"permission",bold:!0,children:[_Z.pointer," "]}):E(M,{children:" "})}),b(p,{flexDirection:"column",children:[E(p,{flexShrink:1,height:1,overflow:"hidden",children:E(H0,{userMessage:U,color:m?"suggestion":void 0,isCurrent:YZ,paddingRight:10})}),J&&AZ&&E(p,{height:1,flexDirection:"row",children:r?E(a,{children:E(M,{dimColor:!m,color:"inactive",children:IZ?b(a,{children:[IZ===1&&r.filesChanged[0]?`${QZ.basename(r.filesChanged[0])} `:`${IZ} files changed `,E(f0,{diffStats:r})]}):E(a,{children:"No code changes"})})}):b(M,{dimColor:!0,color:"warning",children:[_Z.warning," No code restore"]})})]})]},U.uuid)})})]}),!D&&E(M,{dimColor:!0,italic:!0,children:WZ.pending?b(a,{children:["Press ",WZ.keyName," again to exit"]}):b(a,{children:[!B&&f&&"Enter to continue · ","Esc to exit"]})})]})]})}function ZQ(Q){switch(Q){case"summarize":return"Messages after this point will be summarized.";case"summarize_up_to":return"Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.";case"both":case"conversation":return"The conversation will be forked.";case"code":case"nevermind":return"The conversation will be unchanged."}}function YQ(Q){let Z=GZ.c(11),{selectedRestoreOption:X,canRestoreCode:V,diffStatsForRestore:W}=Q,H=V&&(X==="both"||X==="code"),G;if(Z[0]!==X)G=ZQ(X),Z[0]=X,Z[1]=G;else G=Z[1];let K;if(Z[2]!==G)K=E(M,{dimColor:!0,children:G}),Z[2]=G,Z[3]=K;else K=Z[3];let B;if(Z[4]!==W||Z[5]!==X||Z[6]!==H)B=!SZ(X)&&(H?E(QQ,{diffStatsForRestore:W}):E(M,{dimColor:!0,children:"The code will be unchanged."})),Z[4]=W,Z[5]=X,Z[6]=H,Z[7]=B;else B=Z[7];let z;if(Z[8]!==K||Z[9]!==B)z=b(p,{flexDirection:"column",children:[K,B]}),Z[8]=K,Z[9]=B,Z[10]=z;else z=Z[10];return z}function QQ(Q){let Z=GZ.c(14),{diffStatsForRestore:X}=Q;if(X===void 0)return;if(!X.filesChanged||!X.filesChanged[0]){let K;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))K=E(M,{dimColor:!0,children:"The code has not changed (nothing will be restored)."}),Z[0]=K;else K=Z[0];return K}let V=X.filesChanged.length,W;if(V===1){let K;if(Z[1]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[1]=X.filesChanged[0],Z[2]=K;else K=Z[2];W=K}else if(V===2){let K;if(Z[3]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[3]=X.filesChanged[0],Z[4]=K;else K=Z[4];let B=K,z;if(Z[5]!==X.filesChanged[1])z=QZ.basename(X.filesChanged[1]||""),Z[5]=X.filesChanged[1],Z[6]=z;else z=Z[6];W=`${B} and ${z}`}else{let K;if(Z[7]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[7]=X.filesChanged[0],Z[8]=K;else K=Z[8];W=`${K} and ${X.filesChanged.length-1} other files`}let H;if(Z[9]!==X)H=E(f0,{diffStats:X}),Z[9]=X,Z[10]=H;else H=Z[10];let G;if(Z[11]!==W||Z[12]!==H)G=E(a,{children:b(M,{dimColor:!0,children:["The code will be restored"," ",H," in ",W,"."]})}),Z[11]=W,Z[12]=H,Z[13]=G;else G=Z[13];return G}function f0(Q){let Z=GZ.c(7),{diffStats:X}=Q;if(!X||!X.filesChanged)return;let V;if(Z[0]!==X.insertions)V=b(M,{color:"diffAddedWord",children:["+",X.insertions," "]}),Z[0]=X.insertions,Z[1]=V;else V=Z[1];let W;if(Z[2]!==X.deletions)W=b(M,{color:"diffRemovedWord",children:["-",X.deletions]}),Z[2]=X.deletions,Z[3]=W;else W=Z[3];let H;if(Z[4]!==V||Z[5]!==W)H=b(a,{children:[V,W]}),Z[4]=V,Z[5]=W,Z[6]=H;else H=Z[6];return H}function H0(Q){let Z=GZ.c(31),{userMessage:X,color:V,dimColor:W,isCurrent:H,paddingRight:G}=Q,{columns:K}=y0();if(H){let S;if(Z[0]!==V||Z[1]!==W)S=E(p,{width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"(current)"})}),Z[0]=V,Z[1]=W,Z[2]=S;else S=Z[2];return S}let B=X.message.content,z=typeof B==="string"?null:B[B.length-1],J,L,_,w,v,P,f,D;if(Z[3]!==V||Z[4]!==K||Z[5]!==B||Z[6]!==W||Z[7]!==z||Z[8]!==G){D=Symbol.for("react.early_return_sentinel");Z:{let S=typeof B==="string"?B.trim():z&&R0(z)?z.text.trim():"(no prompt)",O=U0(S);if(E0(O)){let $;if(Z[17]!==V||Z[18]!==W)$=E(p,{flexDirection:"row",width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"((empty message))"})}),Z[17]=V,Z[18]=W,Z[19]=$;else $=Z[19];D=$;break Z}if(O.includes("<bash-input>")){let $=KZ(O,"bash-input");if($){let d;if(Z[20]===Symbol.for("react.memo_cache_sentinel"))d=E(M,{color:"bashBorder",children:"!"}),Z[20]=d;else d=Z[20];D=b(p,{flexDirection:"row",width:"100%",children:[d,b(M,{color:V,dimColor:W,children:[" ",$]})]});break Z}}if(O.includes(`<${RZ}>`)){let $=KZ(O,RZ),d=KZ(O,"command-args"),i=KZ(O,"skill-format")==="true";if($)if(i){D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["Skill(",$,")"]})});break Z}else{D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["/",$," ",d]})});break Z}}L=p,P="row",f="100%",J=M,_=V,w=W,v=G?B0(O,K-G,!0):O.slice(0,500).split(`
|
|
8
|
+
`).slice(0,4).join(`
|
|
9
|
+
`)}Z[3]=V,Z[4]=K,Z[5]=B,Z[6]=W,Z[7]=z,Z[8]=G,Z[9]=J,Z[10]=L,Z[11]=_,Z[12]=w,Z[13]=v,Z[14]=P,Z[15]=f,Z[16]=D}else J=Z[9],L=Z[10],_=Z[11],w=Z[12],v=Z[13],P=Z[14],f=Z[15],D=Z[16];if(D!==Symbol.for("react.early_return_sentinel"))return D;let F;if(Z[21]!==J||Z[22]!==_||Z[23]!==w||Z[24]!==v)F=E(J,{color:_,dimColor:w,children:v}),Z[21]=J,Z[22]=_,Z[23]=w,Z[24]=v,Z[25]=F;else F=Z[25];let y;if(Z[26]!==L||Z[27]!==P||Z[28]!==f||Z[29]!==F)y=E(L,{flexDirection:P,width:f,children:F}),Z[26]=L,Z[27]=P,Z[28]=f,Z[29]=F,Z[30]=y;else y=Z[30];return y}function XQ(Q,Z,X){let V=Q.findIndex((B)=>B.uuid===Z);if(V===-1)return;let W=X?Q.findIndex((B)=>B.uuid===X):Q.length;if(W===-1)W=Q.length;let H=[],G=0,K=0;for(let B=V+1;B<W;B++){let z=Q[B];if(!z||!xZ(z))continue;let J=z.toolUseResult;if(!J||!J.filePath||!J.structuredPatch)continue;if(!H.includes(J.filePath))H.push(J.filePath);try{if("type"in J&&J.type==="create")G+=J.content.split(/\r?\n/).length;else for(let L of J.structuredPatch){let _=TZ(L.lines,(v)=>v.startsWith("+")),w=TZ(L.lines,(v)=>v.startsWith("-"));G+=_,K+=w}}catch{continue}}return{filesChanged:H,insertions:G,deletions:K}}function S0(Q){if(Q.type!=="user")return!1;if(Array.isArray(Q.message.content)&&Q.message.content[0]?.type==="tool_result")return!1;if(kZ(Q))return!1;if(Q.isMeta)return!1;if(Q.isCompactSummary||Q.isVisibleInTranscriptOnly)return!1;let Z=Q.message.content,X=typeof Z==="string"?null:Z[Z.length-1],V=typeof Z==="string"?Z.trim():X&&R0(X)?X.text.trim():"";if(V.indexOf(`<${D0}>`)!==-1||V.indexOf(`<${v0}>`)!==-1||V.indexOf(`<${z0}>`)!==-1||V.indexOf(`<${q0}>`)!==-1||V.indexOf(`<${_0}>`)!==-1||V.indexOf(`<${A0}>`)!==-1||V.indexOf(`<${O0}`)!==-1)return!1;return!0}function VQ(Q,Z){for(let X=Z+1;X<Q.length;X++){let V=Q[X];if(!V)continue;if(kZ(V))continue;if(xZ(V))continue;if(V.type==="progress")continue;if(V.type==="system")continue;if(V.type==="attachment")continue;if(V.type==="user"&&V.isMeta)continue;if(V.type==="assistant"){let W=V.message.content;if(Array.isArray(W)){if(W.some((G)=>G.type==="text"&&G.text.trim()||G.type==="tool_use"))return!1}continue}if(V.type==="user")return!1}return!0}var GZ,T,CZ=7;var KQ=OZ(()=>{k9();UZ();i9();r9();w0();a9();g9();l9();p9();wZ();o9();s9();d9();u9();x9();h9();n9();J0();GZ=N0(m9(),1),T=N0(c9(),1)});var b6={};hZ(b6,{getCronJitterConfig:()=>M6});function M6(){let Q=oY("tengu_kairos_cron_config",XZ,j6),Z=F6().safeParse(Q);return Z.success?Z.data:XZ}var j6=60000,oZ=1800000,P6=2592000000,F6;var I6=OZ(()=>{JZ();$6();sY();EZ();F6=q(()=>Y.object({recurringFrac:Y.number().min(0).max(1),recurringCapMs:Y.number().int().min(0).max(oZ),oneShotMaxMs:Y.number().int().min(0).max(oZ),oneShotFloorMs:Y.number().int().min(0).max(oZ),oneShotMinuteMod:Y.number().int().min(1).max(60),recurringMaxAgeMs:Y.number().int().min(0).max(P6).default(XZ.recurringMaxAgeMs)}).refine((Q)=>Q.oneShotFloorMs<=Q.oneShotMaxMs))});import{mkdir as f6,readFile as S6,unlink as X9,writeFile as eZ}from"fs/promises";import{dirname as h6,join as V9}from"path";function zZ(Q){return V9(Q??eY(),k6)}async function W9(Q){let Z;try{Z=await S6(zZ(Q),"utf8")}catch{return}let X=x6().safeParse(Y9(Z,!1));return X.success?X.data:void 0}async function tY(Q,Z){let X=zZ(Z),V=ZZ(Q);try{return await eZ(X,V,{flag:"wx"}),!0}catch(W){let H=tZ(W);if(H==="EEXIST")return!1;if(H==="ENOENT"){await f6(h6(X),{recursive:!0});try{return await eZ(X,V,{flag:"wx"}),!0}catch(G){if(tZ(G)==="EEXIST")return!1;throw G}}throw W}}function sZ(Q){MZ?.(),MZ=Z9(async()=>{await qZ(Q)})}async function Z0(Q){let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V={sessionId:X,pid:process.pid,acquiredAt:Date.now()};if(await tY(V,Z))return LZ=void 0,sZ(Q),I(`[ScheduledTasks] acquired scheduler lock (PID ${process.pid})`),!0;let W=await W9(Z);if(W?.sessionId===X){if(W.pid!==process.pid)await eZ(zZ(Z),ZZ(V)),sZ(Q);return!0}if(W&&Q9(W.pid)){if(LZ!==W.sessionId)LZ=W.sessionId,I(`[ScheduledTasks] scheduler lock held by session ${W.sessionId} (PID ${W.pid})`);return!1}if(W)I(`[ScheduledTasks] recovering stale scheduler lock from PID ${W.pid}`);if(await X9(zZ(Z)).catch(()=>{}),await tY(V,Z))return LZ=void 0,sZ(Q),!0;return!1}async function qZ(Q){MZ?.(),MZ=void 0,LZ=void 0;let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V=await W9(Z);if(!V||V.sessionId!==X)return;try{await X9(zZ(Z)),I("[ScheduledTasks] released scheduler lock")}catch{}}var k6,x6,MZ,LZ;var K9=OZ(()=>{JZ();BZ();C6();HZ();lZ();R6();T6();EZ();PZ();k6=V9(".claudin","scheduled_tasks.lock"),x6=q(()=>Y.object({sessionId:Y.string(),pid:Y.number(),acquiredAt:Y.number()}))});var d6={};hZ(d6,{takeDueSessionWakeup:()=>O9,isRecurringTaskAged:()=>_9,createCronScheduler:()=>g6,buildMissedTaskNotification:()=>U9});function _9(Q,Z,X){if(X===0)return!1;return Boolean(Q.recurring&&!Q.permanent&&Z-Q.createdAt>=X)}function O9(Q){let Z=X0();if(!Z||Q<Z.fireAtMs)return null;return B9(),{prompt:V0(Z.prompt),reason:Z.reason}}function g6(Q){let{onFire:Z,isLoading:X,assistantMode:V=!1,onFireTask:W,onMissed:H,onWakeupFire:G,dir:K,lockIdentity:B,getJitterConfig:z,isKilled:J,filter:L}=Q,_=K||B?{dir:K,lockIdentity:B}:void 0,w=[],v=new Map,P=new Set,f=new Set,D=null,F=null,y=null,S=null,O=!1,$=!1;async function d(C){let k=await q9(K);if(O)return;if(w=k,!C)return;let x=Date.now(),A=A9(k,x).filter((j)=>!j.recurring&&!P.has(j.id)&&(!L||L(j)));if(A.length>0){for(let j of A)P.add(j.id),v.set(j.id,1/0);if(g("tengu_scheduled_task_missed",{count:A.length,taskIds:A.map((j)=>j.id).join(",")}),H)H(A);else Z(U9(A));Y0(A.map((j)=>j.id),K).catch((j)=>I(`[ScheduledTasks] failed to remove missed tasks: ${j}`)),I(`[ScheduledTasks] surfaced ${A.length} missed one-shot task(s)`)}}function i(){if(J?.())return;if(X()&&!V)return;let C=Date.now(),k=new Set,x=[],A=z?.()??XZ;function j(N,u){if(L&&!L(N))return;if(k.add(N.id),f.has(N.id))return;let l=v.get(N.id);if(l===void 0)l=N.recurring?Q0(N.cron,N.lastFiredAt??N.createdAt,N.id,A)??1/0:v9(N.cron,N.createdAt,N.id,A)??1/0,v.set(N.id,l),I(`[ScheduledTasks] scheduled ${N.id} for ${l===1/0?"never":new Date(l).toISOString()}`);if(C<l)return;I(`[ScheduledTasks] firing ${N.id}${N.recurring?" (recurring)":""}`),g("tengu_scheduled_task_fire",{recurring:N.recurring??!1,taskId:N.id});let VZ=K===void 0?V0(N.prompt,void 0,N.agentId):N.prompt;if(W)W(VZ===N.prompt?N:{...N,prompt:VZ});else Z(VZ);let WZ=_9(N,C,A.recurringMaxAgeMs);if(WZ){let t=Math.floor((C-N.createdAt)/1000/60/60);I(`[ScheduledTasks] recurring task ${N.id} aged out (${t}h since creation), deleting after final fire`),g("tengu_scheduled_task_expired",{taskId:N.id,ageHours:t})}if(N.recurring&&!WZ){let t=Q0(N.cron,C,N.id,A)??1/0;if(v.set(N.id,t),!u)x.push(N.id)}else if(u)N9([N.id]),v.delete(N.id);else f.add(N.id),Y0([N.id],K).catch((t)=>I(`[ScheduledTasks] failed to remove task ${N.id}: ${t}`)).finally(()=>f.delete(N.id)),v.delete(N.id)}if($){for(let N of w)j(N,!1);if(x.length>0){for(let N of x)f.add(N);D9(x,C,K).catch((N)=>I(`[ScheduledTasks] failed to persist lastFiredAt: ${N}`)).finally(()=>{for(let N of x)f.delete(N)})}}if(K===void 0){for(let u of H9())j(u,!0);let N=O9(C);if(N!==null)if(I("[ScheduledTasks] firing pending ScheduleWakeup"),g("tengu_schedule_wakeup_fire",{}),G)G(N.prompt,N.reason);else Z(N.prompt)}if(k.size===0){v.clear();return}for(let N of v.keys())if(!k.has(N))v.delete(N)}async function o(){if(O)return;if(D)clearInterval(D),D=null;let{default:C}=await import("./index-0.6.14-9f0htcmg.mjs");if(O)return;if($=await Z0(_).catch(()=>!1),O){if($)$=!1,qZ(_);return}if(!$)y=setInterval(()=>{Z0(_).then((x)=>{if(O){if(x)qZ(_);return}if(x){if($=!0,y)clearInterval(y),y=null}}).catch((x)=>I(String(x),{level:"error"}))},m6),y.unref?.();d(!0);let k=z9(K);S=C.watch(k,{persistent:!1,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:c6},ignorePermissionErrors:!0}),S.on("add",()=>void d(!1)),S.on("change",()=>void d(!1)),S.on("unlink",()=>{if(!O)w=[],v.clear()}),F=setInterval(i,G9),F.unref?.()}return{start(){if(O=!1,K!==void 0){I(`[ScheduledTasks] scheduler start() — dir=${K}, hasTasks=${bZ(K)}`),o();return}if(I(`[ScheduledTasks] scheduler start() — enabled=${DZ()}, hasTasks=${bZ()}`),!DZ()&&(V||bZ()))J9(!0);if(DZ()){o();return}D=setInterval((C)=>{if(DZ())C()},G9,o),D.unref?.()},stop(){if(O=!0,D)clearInterval(D),D=null;if(F)clearInterval(F),F=null;if(y)clearInterval(y),y=null;if(S?.close(),S=null,$)$=!1,qZ(_)},getNextFireTime(){let C=1/0;for(let k of v.values())if(k<C)C=k;if(K===void 0){let k=X0();if(k&&k.fireAtMs<C)C=k.fireAtMs}return C===1/0?null:C}}}function U9(Q){let Z=Q.length>1,X=`The following one-shot scheduled task${Z?"s were":" was"} missed while Claude was not running. ${Z?"They have":"It has"} already been removed from .claudin/scheduled_tasks.json.
|
|
10
|
+
|
|
11
|
+
Do NOT execute ${Z?"these prompts":"this prompt"} yet. First use the AskUserQuestion tool to ask whether to run ${Z?"each one":"it"} now. Only execute if the user confirms.`,V=Q.map((W)=>{let H=`[${L9(W.cron)}, created ${new Date(W.createdAt).toLocaleString()}]`,G=(W.prompt.match(/`+/g)??[]).reduce((B,z)=>Math.max(B,z.length),0),K="`".repeat(Math.max(3,G+1));return`${H}
|
|
12
|
+
${K}
|
|
13
|
+
${W.prompt}
|
|
14
|
+
${K}`});return`${X}
|
|
15
|
+
|
|
16
|
+
${V.join(`
|
|
17
|
+
|
|
18
|
+
`)}`}var G9=1000,c6=300,m6=5000;var l6=OZ(()=>{BZ();UZ();u6();sY();K9();HZ();p6()});import{randomUUID as dZ}from"crypto";JZ();EZ();GQ();var JQ=q(()=>Y.unknown()),HQ=q(()=>Y.object({matcher:Y.string().optional(),hookCallbackIds:Y.array(Y.string()),timeout:Y.number().optional()}).describe("Configuration for matching and routing hook callbacks.")),NQ=q(()=>Y.object({subtype:Y.literal("initialize"),hooks:Y.record(u0(),Y.array(HQ())).optional(),sdkMcpServers:Y.array(Y.string()).optional(),jsonSchema:Y.record(Y.string(),Y.unknown()).optional(),systemPrompt:Y.string().optional(),appendSystemPrompt:Y.string().optional(),agents:Y.record(Y.string(),g0()).optional(),promptSuggestions:Y.boolean().optional(),agentProgressSummaries:Y.boolean().optional()}).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration.")),EX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),output_style:Y.string(),available_output_styles:Y.array(Y.string()),models:Y.array(c0()),account:m0(),pid:Y.number().optional().describe("@internal CLI process PID for tmux socket isolation"),fast_mode_state:i0().optional()}).describe("Response from session initialization with available commands, models, and account info.")),BQ=q(()=>Y.object({subtype:Y.literal("interrupt")}).describe("Interrupts the currently running conversation turn.")),LQ=q(()=>Y.object({subtype:Y.literal("can_use_tool"),tool_name:Y.string(),input:Y.record(Y.string(),Y.unknown()),permission_suggestions:Y.array(k0()).optional(),blocked_path:Y.string().optional(),decision_reason:Y.string().optional(),title:Y.string().optional(),display_name:Y.string().optional(),tool_use_id:Y.string(),agent_id:Y.string().optional(),description:Y.string().optional()}).describe("Requests permission to use a tool with the given input.")),zQ=q(()=>Y.object({subtype:Y.literal("set_permission_mode"),mode:x0(),ultraplan:Y.boolean().optional().describe("@internal CCR ultraplan session marker.")}).describe("Sets the permission mode for tool execution handling.")),qQ=q(()=>Y.object({subtype:Y.literal("set_model"),model:Y.string().optional()}).describe("Sets the model to use for subsequent conversation turns.")),DQ=q(()=>Y.object({subtype:Y.literal("set_max_thinking_tokens"),max_thinking_tokens:Y.number().nullable()}).describe("Sets the maximum number of thinking tokens for extended thinking.")),vQ=q(()=>Y.object({subtype:Y.literal("mcp_status")}).describe("Requests the current status of all MCP server connections.")),yX=q(()=>Y.object({mcpServers:Y.array(uZ())}).describe("Response containing the current status of all MCP server connections.")),AQ=q(()=>Y.object({subtype:Y.literal("get_context_usage")}).describe("Requests a breakdown of current context window usage by category.")),_Q=q(()=>Y.object({name:Y.string(),tokens:Y.number(),color:Y.string(),isDeferred:Y.boolean().optional()})),OQ=q(()=>Y.object({color:Y.string(),isFilled:Y.boolean(),categoryName:Y.string(),tokens:Y.number(),percentage:Y.number(),squareFullness:Y.number()})),$X=q(()=>Y.object({categories:Y.array(_Q()),totalTokens:Y.number(),maxTokens:Y.number(),rawMaxTokens:Y.number(),percentage:Y.number(),gridRows:Y.array(Y.array(OQ())),model:Y.string(),memoryFiles:Y.array(Y.object({path:Y.string(),type:Y.string(),tokens:Y.number()})),mcpTools:Y.array(Y.object({name:Y.string(),serverName:Y.string(),tokens:Y.number(),isLoaded:Y.boolean().optional()})),deferredBuiltinTools:Y.array(Y.object({name:Y.string(),tokens:Y.number(),isLoaded:Y.boolean()})).optional(),systemTools:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),systemPromptSections:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),agents:Y.array(Y.object({agentType:Y.string(),source:Y.string(),tokens:Y.number()})),slashCommands:Y.object({totalCommands:Y.number(),includedCommands:Y.number(),tokens:Y.number()}).optional(),skills:Y.object({totalSkills:Y.number(),includedSkills:Y.number(),tokens:Y.number(),skillFrontmatter:Y.array(Y.object({name:Y.string(),source:Y.string(),tokens:Y.number()}))}).optional(),autoCompactThreshold:Y.number().optional(),isAutoCompactEnabled:Y.boolean(),messageBreakdown:Y.object({toolCallTokens:Y.number(),toolResultTokens:Y.number(),attachmentTokens:Y.number(),assistantMessageTokens:Y.number(),userMessageTokens:Y.number(),toolCallsByType:Y.array(Y.object({name:Y.string(),callTokens:Y.number(),resultTokens:Y.number()})),attachmentsByType:Y.array(Y.object({name:Y.string(),tokens:Y.number()}))}).optional(),apiUsage:Y.object({input_tokens:Y.number(),output_tokens:Y.number(),cache_creation_input_tokens:Y.number(),cache_read_input_tokens:Y.number()}).nullable()}).describe("Breakdown of current context window usage by category (system prompt, tools, messages, etc.).")),UQ=q(()=>Y.object({subtype:Y.literal("rewind_files"),user_message_id:Y.string(),dry_run:Y.boolean().optional()}).describe("Rewinds file changes made since a specific user message.")),jX=q(()=>Y.object({canRewind:Y.boolean(),error:Y.string().optional(),filesChanged:Y.array(Y.string()).optional(),insertions:Y.number().optional(),deletions:Y.number().optional()}).describe("Result of a rewindFiles operation.")),wQ=q(()=>Y.object({subtype:Y.literal("cancel_async_message"),message_uuid:Y.string()}).describe("Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.")),PX=q(()=>Y.object({cancelled:Y.boolean()}).describe("Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).")),EQ=q(()=>Y.object({subtype:Y.literal("seed_read_state"),path:Y.string(),mtime:Y.number()}).describe("Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.")),yQ=q(()=>Y.object({subtype:Y.literal("hook_callback"),callback_id:Y.string(),input:p0(),tool_use_id:Y.string().optional()}).describe("Delivers a hook callback with its input data.")),$Q=q(()=>Y.object({subtype:Y.literal("mcp_message"),server_name:Y.string(),message:JQ()}).describe("Sends a JSON-RPC message to a specific MCP server.")),jQ=q(()=>Y.object({subtype:Y.literal("mcp_set_servers"),servers:Y.record(Y.string(),h0())}).describe("Replaces the set of dynamically managed MCP servers.")),FX=q(()=>Y.object({added:Y.array(Y.string()),removed:Y.array(Y.string()),errors:Y.record(Y.string(),Y.string())}).describe("Result of replacing the set of dynamically managed MCP servers.")),PQ=q(()=>Y.object({subtype:Y.literal("reload_plugins")}).describe("Reloads plugins from disk and returns the refreshed session components.")),MX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),plugins:Y.array(Y.object({name:Y.string(),path:Y.string(),source:Y.string().optional()})),mcpServers:Y.array(uZ()),error_count:Y.number()}).describe("Refreshed commands, agents, plugins, and MCP server status after reload.")),FQ=q(()=>Y.object({subtype:Y.literal("mcp_reconnect"),serverName:Y.string()}).describe("Reconnects a disconnected or failed MCP server.")),MQ=q(()=>Y.object({subtype:Y.literal("mcp_toggle"),serverName:Y.string(),enabled:Y.boolean()}).describe("Enables or disables an MCP server.")),bQ=q(()=>Y.object({subtype:Y.literal("stop_task"),task_id:Y.string()}).describe("Stops a running task.")),IQ=q(()=>Y.object({subtype:Y.literal("apply_flag_settings"),settings:Y.record(Y.string(),Y.unknown())}).describe("Merges the provided settings into the flag settings layer, updating the active configuration.")),CQ=q(()=>Y.object({subtype:Y.literal("get_settings")}).describe("Returns the effective merged settings and the raw per-source settings.")),bX=q(()=>Y.object({effective:Y.record(Y.string(),Y.unknown()),sources:Y.array(Y.object({source:Y.enum(["userSettings","projectSettings","localSettings","flagSettings","policySettings"]),settings:Y.record(Y.string(),Y.unknown())})).describe("Ordered low-to-high priority — later entries override earlier ones."),applied:Y.object({model:Y.string(),effort:Y.enum(["low","medium","high","max"]).nullable()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe("Effective merged settings plus raw per-source settings in merge order.")),TQ=q(()=>Y.object({subtype:Y.literal("elicitation"),mcp_server_name:Y.string(),message:Y.string(),mode:Y.enum(["form","url"]).optional(),url:Y.string().optional(),elicitation_id:Y.string().optional(),requested_schema:Y.record(Y.string(),Y.unknown()).optional()}).describe("Requests the SDK consumer to handle an MCP elicitation (user input request).")),o0=q(()=>Y.object({action:Y.enum(["accept","decline","cancel"]),content:Y.record(Y.string(),Y.unknown()).optional()}).describe("Response from the SDK consumer for an elicitation request.")),RQ=q(()=>Y.union([BQ(),LQ(),NQ(),zQ(),qQ(),DQ(),vQ(),AQ(),yQ(),$Q(),UQ(),wQ(),EQ(),jQ(),PQ(),FQ(),MQ(),bQ(),IQ(),CQ(),TQ()])),mZ=q(()=>Y.object({type:Y.literal("control_request"),request_id:Y.string(),request:RQ()})),fQ=q(()=>Y.object({subtype:Y.literal("success"),request_id:Y.string(),response:Y.record(Y.string(),Y.unknown()).optional()})),SQ=q(()=>Y.object({subtype:Y.literal("error"),request_id:Y.string(),error:Y.string(),pending_permission_requests:Y.array(Y.lazy(()=>mZ())).optional()})),s0=q(()=>Y.object({type:Y.literal("control_response"),response:Y.union([fQ(),SQ()])})),hQ=q(()=>Y.object({type:Y.literal("control_cancel_request"),request_id:Y.string()}).describe("Cancels a currently open control request.")),t0=q(()=>Y.object({type:Y.literal("keep_alive")}).describe("Keep-alive message to maintain WebSocket connection.")),kQ=q(()=>Y.object({type:Y.literal("update_environment_variables"),variables:Y.record(Y.string(),Y.string())}).describe("Updates environment variables at runtime.")),IX=q(()=>Y.union([r0(),l0(),a0(),n0(),s0(),mZ(),hQ(),t0()])),CX=q(()=>Y.union([d0(),mZ(),s0(),t0(),kQ()]));lQ();HZ();dQ();lZ();JZ();HZ();EZ();e0();xQ();var xX=q(()=>h.object({tool_name:h.string().describe("The name of the tool requesting permission"),input:h.record(h.string(),h.unknown()).describe("The input for the tool"),tool_use_id:h.string().optional().describe("The unique tool use request ID")})),YY=q(()=>h.enum(["user_temporary","user_permanent","user_reject"]).optional().catch(void 0)),uQ=q(()=>h.object({behavior:h.literal("allow"),updatedInput:h.record(h.string(),h.unknown()),updatedPermissions:h.array(ZY()).optional().catch((Q)=>{I(`Malformed updatedPermissions from SDK host ignored: ${Q.error.issues[0]?.message??"unknown"}`,{level:"warn"});return}),toolUseID:h.string().optional(),decisionClassification:YY()})),pQ=q(()=>h.object({behavior:h.literal("deny"),message:h.string(),interrupt:h.boolean().optional(),toolUseID:h.string().optional(),decisionClassification:YY()})),gZ=q(()=>h.union([uQ(),pQ()]));function jZ(Q,Z,X,V){let W={type:"permissionPromptTool",permissionPromptToolName:Z.name,toolResult:Q};if(Q.behavior==="allow"){let H=Q.updatedPermissions;if(H)V.setAppState((K)=>({...K,toolPermissionContext:yZ(K.toolPermissionContext,H)})),$Z(H);let G=Object.keys(Q.updatedInput).length>0?Q.updatedInput:X;return{...Q,updatedInput:G,decisionReason:W}}else if(Q.behavior==="deny"&&Q.interrupt)I(`SDK permission prompt deny+interrupt: tool=${Z.name} message=${Q.message}`),V.abortController.abort();return{...Q,decisionReason:W}}rQ();gQ();PZ();JZ();aQ();qY();e0();iQ();PZ();nQ();PZ();var cQ=/\u2028|\u2029/g;function mQ(Q){return Q.replace(cQ,(Z)=>Z==="\u2028"?"\\u2028":"\\u2029")}function QY(Q){return mQ(ZZ(Q))}var oQ="SandboxNetworkAccess";function sQ(Q){if(!Q)return;if(Q.type==="classifier")return Q.reason;switch(Q.type){case"rule":case"mode":case"subcommandResults":case"permissionPromptTool":return;case"hook":case"asyncAgent":case"sandboxOverride":case"workingDir":case"safetyCheck":case"other":return Q.reason}}function tQ(Q,Z,X,V){let W;try{W=Q.getActivityDescription?.(Z)??Q.getToolUseSummary?.(Z)??Q.userFacingName(Z)}catch{W=Q.name}return{tool_name:Q.name,action_description:W,tool_use_id:X,request_id:V,input:Z}}var eQ=1000;class Z6{input;replayUserMessages;structuredInput;pendingRequests=new Map;restoredWorkerState=Promise.resolve(null);inputClosed=!1;unexpectedResponseCallback;resolvedToolUseIds=new Set;prependedLines=[];onControlRequestSent;onControlRequestResolved;outbound=new NY;constructor(Q,Z){this.input=Q;this.replayUserMessages=Z;this.input=Q,this.structuredInput=this.read()}trackResolvedToolUseId(Q){if(Q.request.subtype==="can_use_tool"){if(this.resolvedToolUseIds.add(Q.request.tool_use_id),this.resolvedToolUseIds.size>eQ){let Z=this.resolvedToolUseIds.values().next().value;if(Z!==void 0)this.resolvedToolUseIds.delete(Z)}}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(Q){this.prependedLines.push(ZZ({type:"user",session_id:"",message:{role:"user",content:Q},parent_tool_use_id:null})+`
|
|
19
|
+
`)}async*read(){let Q="",Z=async function*(){for(;;){if(this.prependedLines.length>0)Q=this.prependedLines.join("")+Q,this.prependedLines=[];let X=Q.indexOf(`
|
|
20
|
+
`);if(X===-1)break;let V=Q.slice(0,X);Q=Q.slice(X+1);let W=await this.processLine(V);if(W)GY("info","cli_stdin_message_parsed",{type:W.type}),yield W}}.bind(this);yield*Z();for await(let X of this.input)Q+=X,yield*Z();if(Q){let X=await this.processLine(Q);if(X)yield X}this.inputClosed=!0;for(let X of this.pendingRequests.values())X.reject(Error("Tool permission stream closed before response received"))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map((Q)=>Q.request).filter((Q)=>Q.request.subtype==="can_use_tool")}setUnexpectedResponseCallback(Q){this.unexpectedResponseCallback=Q}injectControlResponse(Q){let Z=Q.response?.request_id;if(!Z)return;let X=this.pendingRequests.get(Z);if(!X)return;if(this.trackResolvedToolUseId(X.request),this.pendingRequests.delete(Z),this.write({type:"control_cancel_request",request_id:Z}),Q.response.subtype==="error")X.reject(Error(Q.response.error));else{let V=Q.response.response;if(X.schema)try{X.resolve(X.schema.parse(V))}catch(W){X.reject(W)}else X.resolve({})}}setOnControlRequestSent(Q){this.onControlRequestSent=Q}setOnControlRequestResolved(Q){this.onControlRequestResolved=Q}async processLine(Q){if(!Q)return;try{let Z=DY(WY(Q));if(Z.type==="keep_alive")return;if(Z.type==="update_environment_variables"){let X=Object.keys(Z.variables);for(let[V,W]of Object.entries(Z.variables))process.env[V]=W;I(`[structuredIO] applied update_environment_variables: ${X.join(", ")}`);return}if(Z.type==="control_response"){let X="uuid"in Z&&typeof Z.uuid==="string"?Z.uuid:void 0;if(X)HY(X,"completed");let V=this.pendingRequests.get(Z.response.request_id);if(!V){let G=(Z.response.subtype==="success"?Z.response.response:void 0)?.toolUseID;if(typeof G==="string"&&this.resolvedToolUseIds.has(G)){I(`Ignoring duplicate control_response for already-resolved toolUseID=${G} request_id=${Z.response.request_id}`);return}if(this.unexpectedResponseCallback)await this.unexpectedResponseCallback(Z);return}if(this.trackResolvedToolUseId(V.request),this.pendingRequests.delete(Z.response.request_id),V.request.request.subtype==="can_use_tool"&&this.onControlRequestResolved)this.onControlRequestResolved(Z.response.request_id);if(Z.response.subtype==="error"){V.reject(Error(Z.response.error));return}let W=Z.response.response;if(V.schema)try{V.resolve(V.schema.parse(W))}catch(H){V.reject(H)}else V.resolve({});if(this.replayUserMessages)return Z;return}if(Z.type!=="user"&&Z.type!=="control_request"&&Z.type!=="assistant"&&Z.type!=="system"){I(`Ignoring unknown message type: ${Z.type}`,{level:"warn"});return}if(Z.type==="control_request"){if(!Z.request)XY("Error: Missing request on control_request");return Z}if(Z.type==="assistant"||Z.type==="system")return Z;if(Z.message.role!=="user")XY(`Error: Expected message role 'user', got '${Z.message.role}'`);return Z}catch(Z){console.error(`Error parsing streaming input line: ${Q}: ${Z}`),process.exit(1)}}async write(Q){KY(QY(Q)+`
|
|
21
|
+
`)}async sendRequest(Q,Z,X,V=dZ()){let W={type:"control_request",request_id:V,request:Q};if(this.inputClosed)throw Error("Stream closed");if(X?.aborted)throw Error("Request aborted");if(this.outbound.enqueue(W),Q.subtype==="can_use_tool"&&this.onControlRequestSent)this.onControlRequestSent(W);let H=()=>{this.outbound.enqueue({type:"control_cancel_request",request_id:V});let G=this.pendingRequests.get(V);if(G)this.trackResolvedToolUseId(G.request),G.reject(new VY)};if(X)X.addEventListener("abort",H,{once:!0});try{return await new Promise((G,K)=>{this.pendingRequests.set(V,{request:{type:"control_request",request_id:V,request:Q},resolve:(B)=>{G(B)},reject:K,schema:Z})})}finally{if(X)X.removeEventListener("abort",H);this.pendingRequests.delete(V)}}createCanUseTool(Q){return async(Z,X,V,W,H,G)=>{let K=G??await BY(Z,X,V,W,H);if(K.behavior==="allow"||K.behavior==="deny")return K;let B=new AbortController,z=V.abortController.signal,J=()=>B.abort();z.addEventListener("abort",J,{once:!0});try{let L=Y6(Z.name,H,X,V,K.suggestions).then((P)=>({source:"hook",decision:P})),_=dZ();Q?.(tQ(Z,X,H,_));let w=this.sendRequest({subtype:"can_use_tool",tool_name:Z.name,input:X,permission_suggestions:K.suggestions,blocked_path:K.blockedPath,decision_reason:sQ(K.decisionReason),tool_use_id:H,agent_id:V.agentId},gZ(),B.signal,_).then((P)=>({source:"sdk",result:P})),v=await Promise.race([L,w]);if(v.source==="hook"){if(v.decision)return w.catch(()=>{}),B.abort(),v.decision;let P=await w;return jZ(P.result,Z,X,V)}return jZ(v.result,Z,X,V)}catch(L){return jZ({behavior:"deny",message:`Tool permission request failed: ${L}`,toolUseID:H},Z,X,V)}finally{if(this.getPendingPermissionRequests().length===0)LY("running");z.removeEventListener("abort",J)}}}createHookCallback(Q,Z){return{type:"callback",timeout:Z,callback:async(X,V,W)=>{try{return await this.sendRequest({subtype:"hook_callback",callback_id:Q,input:X,tool_use_id:V||void 0},JY(),W)}catch(H){return console.error(`Error in hook callback ${Q}:`,H),{}}}}}async handleElicitation(Q,Z,X,V,W,H,G){try{return await this.sendRequest({subtype:"elicitation",mcp_server_name:Q,message:Z,mode:W,url:H,elicitation_id:G,requested_schema:X},o0(),V)}catch{return{action:"cancel"}}}createSandboxAskCallback(){return async(Q)=>{try{return(await this.sendRequest({subtype:"can_use_tool",tool_name:oQ,input:{host:Q.host},tool_use_id:dZ(),description:`Allow network connection to ${Q.host}?`},gZ())).behavior==="allow"}catch{return!1}}}async sendMcpMessage(Q,Z){return(await this.sendRequest({subtype:"mcp_message",server_name:Q,message:Z},Y.object({mcp_response:Y.any()}))).mcp_response}}function XY(Q){console.error(Q),process.exit(1)}async function Y6(Q,Z,X,V,W){let G=V.getAppState().toolPermissionContext.mode,K=zY(Q,Z,X,V,G,W,V.abortController.signal);for await(let B of K)if(B.permissionRequestResult&&(B.permissionRequestResult.behavior==="allow"||B.permissionRequestResult.behavior==="deny")){let z=B.permissionRequestResult;if(z.behavior==="allow"){let J=z.updatedInput||X,L=z.updatedPermissions??[];if(L.length>0){$Z(L);let _=V.getAppState(),w=yZ(_.toolPermissionContext,L);V.setAppState((v)=>{if(v.toolPermissionContext===w)return v;return{...v,toolPermissionContext:w}})}return{behavior:"allow",updatedInput:J,userModified:!1,decisionReason:{type:"hook",hookName:"PermissionRequest"}}}else return{behavior:"deny",message:z.message||"Permission denied by PermissionRequest hook",decisionReason:{type:"hook",hookName:"PermissionRequest"}}}return}_Y();function HV(Q){if(Q.type!=="user")return;let Z=Q.message?.content;if(!Z)return;if(Array.isArray(Z)&&Z.length===0)return;let X="uuid"in Q&&typeof Q.uuid==="string"?Q.uuid:void 0;return{content:Array.isArray(Z)?Q6(Z):Z,uuid:X}}function Q6(Q){if(!Q.some(vY))return Q;return Q.map((Z)=>{if(!vY(Z))return Z;let X=Z.source,V=typeof X.mediaType==="string"&&X.mediaType?X.mediaType:AY(Z.source.data);return{...Z,source:{type:"base64",media_type:V,data:Z.source.data}}})}function vY(Q){if(Q.type!=="image"||Q.source?.type!=="base64")return!1;return!Q.source.media_type}BZ();J6();V6();G6();X6();K6();W6();import{randomUUID as H6}from"crypto";function N6(Q){return Q===wY?EY:Q}function OV(Q){let X=yY()?.outputStyle??PY,V={type:"system",subtype:"init",cwd:UY(),session_id:NZ(),tools:Q.tools.map((W)=>N6(W.name)),mcp_servers:Q.mcpClients.map((W)=>({name:W.name,status:W.type})),model:Q.model,permissionMode:Q.permissionMode,slash_commands:Q.commands.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),apiKeySource:jY().source,betas:OY(),claude_code_version:"99.0.0",output_style:X,agents:Q.agents.map((W)=>W.agentType),skills:Q.skills.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),plugins:Q.plugins.map((W)=>({name:W.name,path:W.path,source:W.source})),uuid:H6()};return V.fast_mode_state=$Y(Q.model,Q.fastMode),V}var FY={"`":"`",'"':'"',"<":">","{":"}","[":"]","(":")","'":"'"};function B6(Q,Z){if(!new RegExp(Z,"i").test(Q))return[];if(Q.startsWith("/"))return[];let V=[],W=null,H=0,G=(J)=>!!J&&/[\p{L}\p{N}_]/u.test(J);for(let J=0;J<Q.length;J++){let L=Q[J];if(W){if(W==="["&&L==="["){H=J;continue}if(L!==FY[W])continue;if(W==="'"&&G(Q[J+1]))continue;V.push({start:H,end:J+1}),W=null}else if(L==="<"&&J+1<Q.length&&/[a-zA-Z/]/.test(Q[J+1])||L==="'"&&!G(Q[J-1])||L!=="<"&&L!=="'"&&L in FY)W=L,H=J}let K=[],B=new RegExp(`\\b${Z}\\b`,"gi"),z=Q.matchAll(B);for(let J of z){if(J.index===void 0)continue;let L=J.index,_=L+J[0].length;if(V.some((P)=>L>=P.start&&L<P.end))continue;let w=Q[L-1],v=Q[_];if(w==="/"||w==="\\"||w==="-")continue;if(v==="/"||v==="\\"||v==="-"||v==="?")continue;if(v==="."&&G(Q[_+1]))continue;K.push({word:J[0],start:L,end:_})}return K}function wV(Q){return B6(Q,"ultrareview")}UZ();wZ();w6();_6();O6();v6();qY();_Y();D6();wZ();U6();A6();import{randomUUID as E6}from"crypto";BZ();UZ();wZ();L6();z6();import{randomUUID as q6}from"crypto";function MY(Q){let Z=Q.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(Z)}function bY(Q){let Z=Q.toLowerCase().trim();if(Z==="continue")return!0;return/\b(keep going|go on)\b/.test(Z)}function fY(Q,Z,X,V,W,H,G){let K=q6();IY(K);let B=typeof Q==="string"?Q:Q.find((w)=>w.type==="text")?.text||"";RY(B);let z=typeof Q==="string"?Q:Q.findLast((w)=>w.type==="text")?.text||"";if(z)TY("user_prompt",{prompt_length:String(z.length),prompt:CY(z),"prompt.id":K});let J=MY(B),L=bY(B);if(g("tengu_input_prompt",{is_negative:J,is_keep_going:L}),Z.length>0){let w=typeof Q==="string"?Q.trim()?[{type:"text",text:Q}]:[]:Q;return{messages:[s({content:[...w,...Z],uuid:W,imagePasteIds:X.length>0?X:void 0,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}return{messages:[s({content:Q,uuid:W,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}async function iV({input:Q,preExpansionInput:Z,mode:X,setToolJSX:V,context:W,pastedContents:H,ideSelection:G,messages:K,setUserInputOnProcessing:B,uuid:z,isAlreadyProcessing:J,querySource:L,canUseTool:_,skipSlashCommands:w,bridgeOrigin:v,isMeta:P,skipAttachments:f}){let D=typeof Q==="string"?Q:null;if(X==="prompt"&&D!==null&&!P)B?.(D);n("query_process_user_input_base_start");let F=W.getAppState(),y=await y6(Q,X,V,W,H,G,K,z,J,L,_,F.toolPermissionContext.mode,w,v,P,f,Z);if(n("query_process_user_input_base_end"),!y.shouldQuery)return y;n("query_hooks_start");let S=hY(Q)||"";for await(let O of iY(S,F.toolPermissionContext.mode,W,W.requestPrompt)){if(O.message?.type==="progress")continue;if(O.blockingError){let $=rY(O.blockingError);return{messages:[aY(`${$}
|
|
22
|
+
|
|
23
|
+
Original prompt: ${Q}`,"warning")],shouldQuery:!1,allowedTools:y.allowedTools}}if(O.preventContinuation){let $=O.stopReason?`Operation stopped by hook: ${O.stopReason}`:"Operation stopped by hook";return y.messages.push(s({content:$})),y.shouldQuery=!1,y}if(O.additionalContexts&&O.additionalContexts.length>0)y.messages.push(kY({type:"hook_additional_context",content:O.additionalContexts.map(SY),hookName:"UserPromptSubmit",toolUseID:`hook-${E6()}`,hookEvent:"UserPromptSubmit"}));if(O.message)switch(O.message.attachment.type){case"hook_success":if(!O.message.attachment.content)break;y.messages.push({...O.message,attachment:{...O.message.attachment,content:SY(O.message.attachment.content)}});break;default:y.messages.push(O.message);break}}return n("query_hooks_end"),y}var aZ=1e4;function SY(Q){if(Q.length>aZ)return`${Q.substring(0,aZ)}… [output truncated - exceeded ${aZ} characters]`;return Q}async function y6(Q,Z,X,V,W,H,G,K,B,z,J,L,_,w,v,P,f){let D=null,F=[],y=[],S=Q;if(typeof Q==="string")D=Q;else if(Q.length>0){n("query_image_processing_start");let A=[];for(let N of Q)if(N.type==="image"){let u=await iZ(N);if(u.dimensions){let l=FZ(u.dimensions);if(l)y.push(l)}A.push(u.block)}else A.push(N);S=A,n("query_image_processing_end");let j=A[A.length-1];if(j?.type==="text")D=j.text,F=A.slice(0,-1);else F=A}if(D===null&&Z!=="prompt")throw Error(`Mode: ${Z} requires a string input.`);let O=W?Object.values(W).filter(cY):[],$=O.map((A)=>A.id),d=W?await xY(W):new Map;n("query_pasted_image_processing_start");let i=await Promise.all(O.map(async(A)=>{let j={type:"image",source:{type:"base64",media_type:A.mediaType||"image/png",data:A.content}};return g("tengu_pasted_image_resize_attempt",{original_size_bytes:A.content.length}),{resized:await iZ(j),originalDimensions:A.dimensions,sourcePath:A.sourcePath??d.get(A.id)}})),o=[];for(let{resized:A,originalDimensions:j,sourcePath:N}of i){if(A.dimensions){let u=FZ(A.dimensions,N);if(u)y.push(u)}else if(j){let u=FZ(j,N);if(u)y.push(u)}else if(N)y.push(`[Image source: ${N}]`);o.push(A.block)}n("query_pasted_image_processing_end");let C=_;if(w&&D!==null&&D.startsWith("/")){let A=pY(D),j=A?lY(A.commandName,V.options.commands):void 0;if(j)if(dY(j))C=!1;else{let N=`/${gY(j)} isn't available over Remote Control.`;return{messages:[s({content:D,uuid:K}),nY(`<local-command-stdout>${N}</local-command-stdout>`)],shouldQuery:!1,resultText:N}}}let k=!P&&D!==null&&(Z!=="prompt"||C||!D.startsWith("/"));n("query_attachment_loading_start");let x=k?await uY(mY(D,V,H??null,[],G,z)):[];if(n("query_attachment_loading_end"),D!==null&&Z==="bash"){let{processBashCommand:A}=await import("./processBashCommand-0.6.14-es5xezck.mjs");return nZ(await A(D,F,x,V,X),y)}if(D!==null&&!C&&D.startsWith("/")){let{processSlashCommand:A}=await import("./processSlashCommand-0.6.14-gqdsehy1.mjs"),j=await A(D,F,o,x,V,X,K,B,J);return nZ(j,y)}if(D!==null&&Z==="prompt"){let A=D.trim(),j=x.find((N)=>N.attachment.type==="agent_mention");if(j){let N=`@agent-${j.attachment.agentType}`,u=A===N,l=A.startsWith(N)&&!u;g("tengu_subagent_at_mention",{is_subagent_only:u,is_prefix:l})}}return nZ(fY(S,o,$,x,K,L,v),y)}function nZ(Q,Z){if(Z.length>0)Q.messages.push(s({content:Z.map((X)=>({type:"text",text:X})),isMeta:!0}));return Q}i6();BZ();HZ();lZ();n6();a6();w0();o6();r6();import{isAbsolute as s6,resolve as t6}from"path";function e6(Q,Z,X){let V=[],W=[],H=[];for(let[G,K]of Object.entries(Q)){let B=Z[G],z=b9(K.source,X?.projectRoot);if(!B)V.push(G);else if(K.sourceIsFallback)H.push(G);else if(!j9(z,B.source))W.push({name:G,declaredSource:z,materializedSource:B.source});else H.push(G)}return{missing:V,sourceChanged:W,upToDate:H}}async function IW(Q){let Z=P9();if(Object.keys(Z).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let X;try{X=await F9()}catch(J){e(J),X={}}let V=e6(Z,X,{projectRoot:W0()}),W=[...V.missing.map((J)=>({name:J,source:b9(Z[J].source),action:"install"})),...V.sourceChanged.map(({name:J,declaredSource:L})=>({name:J,source:L,action:"update"}))],H=[],G=[];for(let J of W){if(Q?.skip?.(J.name,J.source)){H.push(J.name);continue}if(J.action==="update"&&$9(J.source)&&!await y9(J.source.path)){I(`[reconcile] '${J.name}' declared path does not exist; keeping materialized entry`),H.push(J.name);continue}G.push(J)}if(G.length===0)return{installed:[],updated:[],failed:[],upToDate:V.upToDate,skipped:H};I(`[reconcile] ${G.length} marketplace(s): ${G.map((J)=>`${J.name}(${J.action})`).join(", ")}`);let K=[],B=[],z=[];for(let J=0;J<G.length;J++){let{name:L,source:_,action:w}=G[J];Q?.onProgress?.({type:"installing",name:L,action:w,index:J+1,total:G.length});try{let v=await M9(_);if(w==="install")K.push(L);else B.push(L);Q?.onProgress?.({type:"installed",name:L,alreadyMaterialized:v.alreadyMaterialized})}catch(v){let P=w9(v);z.push({name:L,error:P}),Q?.onProgress?.({type:"failed",name:L,error:P}),e(v)}}return{installed:K,updated:B,failed:z,upToDate:V.upToDate,skipped:H}}function b9(Q,Z){if((Q.source==="directory"||Q.source==="file")&&!s6(Q.path)){let X=Z??W0(),V=E9(X);return{...Q,path:t6(V??X,Q.path)}}return Q}
|
|
24
|
+
export{HV as Z,N6 as _,OV as $,e9 as aa,S0 as ba,VQ as ca,WQ as da,KQ as ea,wV as fa,iV as ga,gZ as ha,jZ as ia,QY as ja,oQ as ka,Z6 as la,e6 as ma,IW as na,M6 as oa,b6 as pa,I6 as qa,g6 as ra,d6 as sa,l6 as ta};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Kq as _,yS as z}from"./cli-0.6.14-sfan5yg2.mjs";import{h2 as f}from"./cli-0.6.14-zbg4rtam.mjs";import{E6 as A,U2 as K,z5 as k}from"./cli-0.6.14-hwwpzjf6.mjs";import{Gba as v,Rca as x,W_ as W,u8 as L,u9 as T}from"./cli-0.6.14-zs6qf39k.mjs";import{Hfa as H}from"./cli-0.6.14-2kj6t828.mjs";import{_fa as b,aga as Q,bga as q,cga as V}from"./cli-0.6.14-g818hb3n.mjs";import{Uga as w}from"./cli-0.6.14-41a9k5hf.mjs";import{Yga as O}from"./cli-0.6.14-106t4q8a.mjs";import{xia as U}from"./cli-0.6.14-tsj8ceqz.mjs";import{mka as X,ooa as B}from"./cli-0.6.14-f8c4q74r.mjs";import{Vpa as G}from"./cli-0.6.14-mjqpmr9h.mjs";var Z,$;var J=G(()=>{Q();V();Z=q(()=>b.object({entries:b.record(b.string(),b.string())})),$=q(()=>b.object({userId:b.string(),version:b.number(),lastModified:b.string(),checksum:b.string(),content:Z()}))});var Y=G(()=>{B();w();A();z();x();L();U();T();K();W();v();X();k();f();H();O();_();J()});
|
|
2
|
+
export{Y as td};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{W6 as k2,Y6 as x8}from"./cli-0.6.14-p380n7ja.mjs";import{$6 as mZ,_6 as h}from"./cli-0.6.14-0ycrhwsw.mjs";import{k7 as d5,m7 as w8}from"./cli-0.6.14-645ardy7.mjs";import{$7 as I4,$_ as S1,Cca as r1,E$ as VZ,Gba as j0,L8 as N5,N8 as dZ,Naa as o1,Pba as n4,Pda as m5,Rba as nZ,Rca as i,Rda as W4,Sba as v1,Tba as h8,Tca as e1,Uca as zZ,Waa as WZ,Xda as c5,Zca as Z4,_da as K,a$ as A8,a8 as s,b8 as L2,bea as $0,c8 as O0,d8 as y4,e8 as s2,k8 as H0,l8 as G1,lda as V4,n$ as a1,nca as d,nda as $4,nea as N,qda as O2,rba as k,rda as tZ,sca as p5,tba as B2,tca as C,v8 as D5,vea as s0,wba as Q0,wca as L,xba as y,y8 as cZ}from"./cli-0.6.14-zs6qf39k.mjs";import{Hfa as M1,vfa as A0,xfa as k4}from"./cli-0.6.14-2kj6t828.mjs";import{Mga as v5,Nga as d4,Oga as B0,Qga as z8,Rga as G8,Tga as O,Uga as y0}from"./cli-0.6.14-41a9k5hf.mjs";import{Vga as x,Yga as j2}from"./cli-0.6.14-106t4q8a.mjs";import{$ha as Z0,Cha as K5,Gha as pZ,Kha as i2,Oha as S8,Yha as z,_ha as d0}from"./cli-0.6.14-e4k2wv6r.mjs";import{qia as p,sia as q1,xia as V1}from"./cli-0.6.14-tsj8ceqz.mjs";import{Aia as L5,Dia as F,Fia as g,Hia as P2,Kia as c4,Nia as u}from"./cli-0.6.14-rn7sy805.mjs";import{Cla as s1,Cma as J1,Dma as Q1,Ema as X1,Fma as Y1,Gla as P4,Lla as v0,Mla as J2,Rma as x2,ema as f,lma as _1,nka as Y0,oka as w1,ola as p1,ooa as J0}from"./cli-0.6.14-f8c4q74r.mjs";import{Noa as v,Ooa as l0}from"./cli-0.6.14-zqc493f5.mjs";import{Bpa as q2,jpa as P}from"./cli-0.6.14-8fwb0rxq.mjs";import{Spa as S0,Upa as c2,Vpa as H,Wpa as e}from"./cli-0.6.14-mjqpmr9h.mjs";function I5(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:q,context:W}=$.shift();try{let G=await Z.apply(W,X);Y(G)}catch(G){q(G)}}if(J=!1,$.length>0)Q()}return function(...X){return new Promise((Y,q)=>{$.push({args:X,resolve:Y,reject:q,context:this}),Q()})}}var y5=()=>{};function C5(Z,$){return Z.find((J)=>J.includes($))??null}async function A5(){let{BedrockClient:Z}=await import("@aws-sdk/client-bedrock"),$=P2(),J=F(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await k2(),...J&&{requestHandler:new(await import("./index-0.6.14-hzpvqqxz.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-0.6.14-3bzm9qc7.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await z0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}async function u$(){let{BedrockRuntimeClient:Z}=await import("@aws-sdk/client-bedrock-runtime"),$=P2(),J=F(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await k2(),...J&&{requestHandler:new(await import("./index-0.6.14-hzpvqqxz.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-0.6.14-3bzm9qc7.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await z0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}function j8(Z){return Z.startsWith("anthropic.")}function R8(Z){if(!Z.startsWith("arn:"))return Z;let $=Z.lastIndexOf("/");if($===-1)return Z;return Z.substring($+1)}function H8(Z){let $=R8(Z);for(let J of B8)if($.startsWith(`${J}.anthropic.`))return J;return}function m$(Z,$){let J=H8(Z);if(J)return Z.replace(`${J}.`,`${$}.`);if(j8(Z))return`${$}.${Z}`;return Z}var T5,p$,B8;var h5=H(()=>{l0();n();u();s0();x8();T5=v(async function(){let[Z,{ListInferenceProfilesCommand:$}]=await Promise.all([A5(),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 N(X),X}});p$=v(async function(Z){try{let[$,{GetInferenceProfileCommand:J}]=await Promise.all([A5(),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 q=Y.modelArn.lastIndexOf("/");return q>=0?Y.modelArn.substring(q+1):Y.modelArn}catch($){return N($),null}});B8=["us","eu","apac","global"]});var E2,_2,M2,S2,v2,I2,y2,T2,C2,a0,o0,r0,A2,h2,f2,G0,d$,f5;var g2=H(()=>{E2={firstParty:"claude-3-7-sonnet-20250219",bedrock:"us.anthropic.claude-3-7-sonnet-20250219-v1:0",vertex:"claude-3-7-sonnet@20250219",foundry:"claude-3-7-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},_2={firstParty:"claude-3-5-sonnet-20241022",bedrock:"anthropic.claude-3-5-sonnet-20241022-v2:0",vertex:"claude-3-5-sonnet-v2@20241022",foundry:"claude-3-5-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},M2={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"},S2={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"},v2={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"},I2={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"},y2={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"},T2={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"},C2={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"},a0={firstParty:"claude-opus-4-6",bedrock:"us.anthropic.claude-opus-4-6-v1",vertex:"claude-opus-4-6",foundry:"claude-opus-4-6",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},o0={firstParty:"claude-opus-4-7",bedrock:"us.anthropic.claude-opus-4-7-v1",vertex:"claude-opus-4-7",foundry:"claude-opus-4-7",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},r0={firstParty:"claude-opus-4-8",bedrock:"anthropic.claude-opus-4-8",vertex:"claude-opus-4-8",foundry:"claude-opus-4-8",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},A2={firstParty:"claude-fable-5",bedrock:"anthropic.claude-fable-5",vertex:"claude-fable-5",foundry:"claude-fable-5",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5",mistral:"devstral-latest"},h2={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"},f2={firstParty:"claude-sonnet-5",bedrock:"anthropic.claude-sonnet-5",vertex:"claude-sonnet-5",foundry:"claude-sonnet-5",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5",mistral:"mistral-medium-latest"},G0={haiku35:M2,haiku45:S2,sonnet35:_2,sonnet37:E2,sonnet40:v2,sonnet45:I2,sonnet46:h2,sonnet5:f2,opus40:y2,opus41:T2,opus45:C2,opus46:a0,opus47:o0,opus48:r0,fable5:A2},d$=Object.values(G0).map((Z)=>Z.firstParty),f5=Object.fromEntries(Object.entries(G0).map(([Z,$])=>[$.firstParty,Z]))});function g5(){return Object.values(e0)}var e0,u2;var p2=H(()=>{e0={"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2-Codex",family:"gpt-codex",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 mini",family:"gpt-mini",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:264000,output:64000}},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",family:"gpt",attachment:!0,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2023-10",release_date:"2024-05-01",last_updated:"2024-08-06",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",family:"gpt",attachment:!1,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2024-06",release_date:"2024-06-01",last_updated:"2024-06-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",family:"claude-opus",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2026-01",release_date:"2026-04-01",last_updated:"2026-04-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",family:"claude-sonnet",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",family:"claude-haiku",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:144000,output:32768}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",family:"gemini-pro",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image","audio"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:64000}},"grok-code-fast-1":{id:"grok-code-fast-1",name:"Grok Code Fast 1",family:"grok",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:256000,output:64000}}},u2=Object.fromEntries(Object.values(e0).map((Z)=>[Z.id,Z.name]))});var _0={};c2(_0,{prefetchCopilotModelCatalog:()=>n2,normalizeBareCopilotModelId:()=>d2,getEffectiveCopilotModels:()=>b8,getCopilotDisplayName:()=>O8,getCatalogCopilotMaxOutputTokens:()=>k8,getCatalogCopilotContextWindow:()=>P8,getCachedCopilotCatalog:()=>N8,fetchCopilotModelCatalog:()=>t5,copilotModelSupportsAnthropicMessages:()=>U8,_setCopilotCatalogForTesting:()=>E8});function E0(){let Z=K();if(Z?.transport!=="github_copilot")return null;return(Z.baseUrl||"https://api.githubcopilot.com").replace(/\/+$/,"")}function n5(){if(!t)return!1;let Z=E0();return Z!==null&&x0===Z}function L8(){if(u5)return;u5=!0,p5(()=>{let Z=E0();if(Z&&x0!==Z)n2()})}function d2(Z){let $=Z.split("?",1)[0]??Z,J=$.lastIndexOf(":"),Q=(J===-1?$:$.slice(J+1)).trim(),X=Q.indexOf("/");return X===-1?Q:Q.slice(X+1)}function K8(Z){if(!Array.isArray(Z))return null;return Z.filter(($)=>typeof $==="string")}function D8(Z){let $=Z.id?.trim();if(!$)return null;let J=Z.capabilities?.type?.trim().toLowerCase();if(J&&J!=="chat")return null;if(Z.policy?.state==="disabled")return null;let Q=Z.capabilities?.limits??{},X=Z.capabilities?.supports??{},Y=X.vision===!0||Boolean(Q.vision),q=X.adaptive_thinking===!0||Array.isArray(X.reasoning_effort)||typeof X.max_thinking_budget==="number";return{model:{id:$,name:Z.name?.trim()||$,family:Z.capabilities?.family?.trim()||$,attachment:Y,reasoning:q,tool_call:X.tool_calls===!0,temperature:!0,knowledge:"",release_date:"",last_updated:"",modalities:{input:Y?["text","image"]:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:Q.max_context_window_tokens??128000,...typeof Q.max_prompt_tokens==="number"?{input:Q.max_prompt_tokens}:{},output:Q.max_output_tokens??16384}},supportedEndpoints:K8(Z.supported_endpoints),pickerEnabled:Z.model_picker_enabled!==!1}}async function t5(){let Z=K();if(Z?.transport!=="github_copilot")return null;if(m5(Z.baseUrl)!=="copilot")return null;let $=Z.extras?.githubToken??Z.apiKey;if(!$)return null;let J=(Z.baseUrl||"https://api.githubcopilot.com").replace(/\/+$/,""),Q=new AbortController,X=setTimeout(()=>Q.abort(),F8);try{let Y=await fetch(`${J}/models`,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${$}`,...d5},signal:Q.signal});if(!Y.ok)return null;let q=await Y.json();if(!Array.isArray(q?.data))return null;let W=new Set,G=[];for(let B of q.data){let R=D8(B);if(!R||W.has(R.model.id))continue;W.add(R.model.id),G.push(R)}return G.length>0?G:null}catch{return z("[CopilotCatalog] /models fetch failed — using hardcoded registry"),null}finally{clearTimeout(X)}}function n2(){L8();let Z=E0();if(!Z)return;if(t&&x0!==Z)t=null,x0=null;if(Z2){if(m2===Z)return;Z2.finally(()=>n2());return}m2=Z,Z2=t5().then(($)=>{if($&&E0()===Z)t=$,x0=Z}).finally(()=>{Z2=null,m2=null})}function N8(){return t}function b8(){if(n5()){let Z=t?.filter(($)=>$.pickerEnabled).map(($)=>$.model);if(Z&&Z.length>0)return Z}return g5()}function $2(Z){if(!n5())return;let $=d2(Z);return t.find((J)=>J.model.id===$)}function O8(Z){let $=d2(Z);return $2($)?.model.name??e0[$]?.name}function U8(Z){let $=$2(Z);if(!$||$.supportedEndpoints===null)return null;return $.supportedEndpoints.some((J)=>J.includes("/v1/messages"))}function P8(Z){return $2(Z)?.model.limit.context}function k8(Z){return $2(Z)?.model.limit.output}function E8(Z){t=Z,x0=Z?E0():null}var F8=5000,t=null,x0=null,Z2=null,m2=null,u5=!1;var M0=H(()=>{$0();w8();c5();i();Z0();p2()});function V(){let Z=K();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 ZJ(){return V()==="firstParty"}function $J(Z){let $=K();if($?.transport!=="github_copilot")return!1;let J=Z?.trim()||$.model?.trim()||"";if(!J.toLowerCase().includes("claude-"))return!1;try{let{copilotModelSupportsAnthropicMessages:Q}=(M0(),S0(_0)),X=Q(J);if(X!==null)return X}catch{}return!0}function JJ(){return V()}function QJ(){let Z=K();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 l=H(()=>{$0()});function Q2(Z){let $=Z==="codex"||Z==="github"?"openai":Z,J={};for(let Q of l5)J[Q]=G0[Q][$];return J}async function _8(){let Z=Q2("bedrock"),$;try{$=await T5()}catch(Q){return N(Q),Z}if(!$?.length)return Z;let J={};for(let Q of l5){let X=G0[Q].firstParty;J[Q]=C5($,X)||Z[Q]}return J}function i5(Z){let $=Q0().modelOverrides;if(!$)return Z;let J={...Z};for(let[Q,X]of Object.entries($)){let Y=f5[Q];if(Y&&X)J[Y]=X}return J}function X2(Z){let $;try{$=Q0().modelOverrides}catch{return Z}if(!$)return Z;for(let[J,Q]of Object.entries($))if(Q===Z)return J;return Z}function M8(){if(v0()!==null)return;if(V()!=="bedrock"){J2(Q2(V()));return}s5()}function j(){let Z=v0();if(Z===null)return M8(),i5(Q2(V()));return i5(Z)}async function jJ(){if(v0()!==null)return;if(V()!=="bedrock"){J2(Q2(V()));return}await s5()}var l5,s5;var Y2=H(()=>{J0();s0();y5();j0();h5();g2();l();l5=Object.keys(G0);s5=I5(async()=>{if(v0()!==null)return;try{let Z=await _8();J2(Z)}catch(Z){N(Z)}})});function FJ(){if(F(process.env.DISABLE_COST_WARNINGS))return!1;if(U())return!1;let $=I0(),J=X0()!==null;if(!$.hasToken&&!J)return!1;let Q=L(),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 LJ(){if(a5!==null)return a5;if(!U())return!1;let Z=M();if(Z==="max"||Z==="pro")return!0;let J=L().oauthAccount?.organizationRole;return!!J&&["admin","billing","owner","primary_owner"].includes(J)}var a5=null;var o5=H(()=>{n();i();u()});function bJ(Z){return Z}function OJ(){return!1}function r5(){return null}function e5(){return!1}var Z1=H(()=>{o5()});async function SJ(){let $=L().oauthAccount?.accountUuid,J=X0();if(!$||!J)return;let Q=`${O().BASE_API_URL}/api/claude_cli_profile`;try{return(await P.get(Q,{headers:{"x-api-key":J,"anthropic-beta":B0},params:{account_uuid:$},timeout:1e4})).data}catch(X){N(X)}}async function R0(Z){let $=`${O().BASE_API_URL}/api/oauth/profile`;try{return(await P.get($,{headers:{Authorization:`Bearer ${Z}`,"Content-Type":"application/json"},timeout:1e4})).data}catch(J){N(J)}}var t2=H(()=>{q2();y0();n();i();s0()});import{mkdirSync as v8,writeFileSync as I8}from"fs";function C8(Z,$,J){if(!F(process.env.CLAUDE_CODE_REMOTE))return;try{v8(V2,{recursive:!0,mode:448}),I8(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 $1(Z,$){try{let Q=i2().readFileSync(Z,{encoding:"utf8"}).trim();if(!Q)return null;return z(`Read ${$} from well-known file ${Z}`),Q}catch(J){if(!q1(J))z(`Failed to read ${$} from ${Z}: ${p(J)}`,{level:"debug"});return null}}function W1({envVar:Z,wellKnownPath:$,label:J,getCached:Q,setCached:X}){let Y=Q();if(Y!==void 0)return Y;let q=process.env[Z];if(!q){let G=$1($,J);return X(G),G}let W=parseInt(q,10);if(Number.isNaN(W))return z(`${Z} must be a valid file descriptor number, got: ${q}`,{level:"error"}),X(null),null;try{let G=i2(),B=process.platform==="darwin"||process.platform==="freebsd"?`/dev/fd/${W}`:`/proc/self/fd/${W}`,R=G.readFileSync(B,{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),C8($,R,J),R}catch(G){z(`Failed to read ${J} from file descriptor ${W}: ${p(G)}`,{level:"error"});let B=$1($,J);return X(B),B}}function W2(){return W1({envVar:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",wellKnownPath:y8,label:"OAuth token",getCached:J1,setCached:Q1})}function l2(){return W1({envVar:"CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR",wellKnownPath:T8,label:"API key",getCached:X1,setCached:Y1})}var V2="/home/claude/.claude/remote",y8,T8,fJ;var z1=H(()=>{J0();Z0();u();V1();S8();y8=`${V2}/.oauth_token`,T8=`${V2}/.api_key`,fJ=`${V2}/.session_ingress_token`});async function x1(){if(process.platform==="darwin"){let Z=s();if((await H0(`security delete-generic-password -a $USER -s "${Z}"`,{shell:!0,reject:!1})).exitCode!==0)throw Error("Failed to delete keychain entry")}}function z2(Z){return Z.slice(-20)}var j1=H(()=>{G1();s2()});function dJ(Z){return Z?.name==="CredentialsProviderError"}function B1(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 a2(){let{STSClient:Z,GetCallerIdentityCommand:$}=await import("@aws-sdk/client-sts");await new Z().send(new $({}))}async function R1(){try{z("Clearing AWS credential provider cache");let{fromIni:Z}=await import("@aws-sdk/credential-providers");await Z({ignoreCache:!0})(),z("AWS credential provider cache refreshed")}catch(Z){z("Failed to clear AWS credential cache (this is expected if no credentials are configured)")}}var H1=H(()=>{Z0()});class T{static instance=null;status={isAuthenticating:!1,output:[]};changed=Y0();static getInstance(){if(!T.instance)T.instance=new T;return T.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(T.instance)T.instance.changed.clear(),T.instance=null}}var F1=H(()=>{w1()});var G2="claude-code-20250219",L1="interleaved-thinking-2025-05-14",T0="context-1m-2025-08-07",K1="context-management-2025-06-27",D1="structured-outputs-2025-12-15",o2="web-search-2025-03-05",N1="advanced-tool-use-2025-11-20",b1="tool-search-tool-2025-10-19",lJ="effort-2025-11-24",sJ="task-budgets-2026-03-13",O1="prompt-caching-scope-2026-01-05",aJ="extended-cache-ttl-2025-04-11",oJ="fast-mode-2026-02-01",U1="redact-thinking-2026-02-12",P1="thinking-token-count-2026-05-13",k1="token-efficient-tools-2026-03-28",rJ="afk-mode-2026-01-31",eJ="advisor-tool-2026-03-01",r2,Z3;var e2=H(()=>{r2=new Set(["interleaved-thinking-2025-05-14","context-1m-2025-08-07","tool-search-tool-2025-10-19"]),Z3=new Set(["claude-code-20250219","interleaved-thinking-2025-05-14","context-management-2025-06-27"])});function A(){if(V()!=="firstParty")return!1;return!F(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)}function I1(){if(!A())return!1;return g8()===null}function f8(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 g8(){if(V()!=="firstParty")return"Fast mode is not available on third-party providers";if(!A())return"Fast mode is not available";let Z=A0("tengu_penguins_off",null);if(Z!==null)return z(`Fast mode unavailable: ${Z}`),Z;if(!S1()&&A0("tengu_marble_sandcastle",!1))return"Fast mode requires the native binary · Install from: https://claude.com/product/claude-code";if(f()&&x2()&&!_1()){if(!k("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(_.status==="disabled"){if(_.reason==="network_error"||_.reason==="unknown"){if(F(process.env.CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS))return null}let $=w()!==null?"oauth":"api-key",J=f8(_.reason,$);return z(`Fast mode unavailable: ${J}`),J}return null}function L3(){return"opus"+(f0()?"[1m]":"")}function K3(Z){if(!A())return!1;if(!I1())return!1;if(!y1(Z))return!1;let $=Q0();if($.fastModePerSessionOptIn)return!1;return $.fastMode===!0}function y1(Z){if(!A())return!1;let $=Z??h0(),J=I($).toLowerCase();return J.includes("opus-4-7")||J.includes("opus-4-6")}function u8(){if(w0.status==="cooldown"&&Date.now()>=w0.resetAt){if(A()&&!Z5)z("Fast mode cooldown expired, re-enabling fast mode"),Z5=!0,C1.emit();w0={status:"active"}}return w0}function b3(Z,$){if(!A())return;w0={status:"cooldown",resetAt:Z,reason:$},Z5=!1;let J=Z-Date.now();z(`Fast mode cooldown triggered (${$}), duration ${Math.round(J/1000)}s`),x("tengu_fast_mode_fallback_triggered",{cooldown_duration_ms:J,cooldown_reason:$}),T1.emit(Z,$)}function O3(){w0={status:"active"}}function U3(){if(_.status==="disabled")return;_={status:"disabled",reason:"preference"},B2("userSettings",{fastMode:void 0}),C((Z)=>({...Z,penguinModeOrgEnabled:!1})),$5.emit(!1)}function p8(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 m8(Z){return Z==="org_level_disabled_until"||Z==="out_of_credits"}function k3(Z){let $=p8(Z);if(z(`Fast mode overage rejection: ${Z??"unknown"} — ${$}`),x("tengu_fast_mode_overage_rejected",{overage_disabled_reason:Z??"unknown"}),!m8(Z))B2("userSettings",{fastMode:void 0}),C((J)=>({...J,penguinModeOrgEnabled:!1}));A1.emit($)}function c8(){return u8().status==="cooldown"}function E3(Z,$){let J=A()&&I1()&&!!$&&y1(Z);if(J&&c8())return"cooldown";if(J)return"on";return"off"}async function d8(Z){let $=`${O().BASE_API_URL}/api/claude_code_penguin_mode`,J="accessToken"in Z?{Authorization:`Bearer ${Z.accessToken}`,"anthropic-beta":B0}:{"x-api-key":Z.apiKey};return(await P.get($,{headers:J})).data}function M3(){if(!A())return;if(_.status!=="pending")return;_=L().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"unknown"}}async function S3(){if(v1())return;if(!A())return;if(C0)return z("Fast mode prefetch in progress, returning in-flight promise"),C0;let Z=X0();if(!(w()?.accessToken&&q0())&&!Z){_=L().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"preference"};return}let J=Date.now();if(J-E1<n8){z("Skipping fast mode prefetch, fetched recently");return}E1=J;let Q=async()=>{let Y=w(),q=Y?.accessToken&&q0()?{accessToken:Y.accessToken}:Z?{apiKey:Z}:null;if(!q)throw Error("No auth available");return d8(q)};async function X(){try{let Y;try{Y=await Q()}catch(W){if(P.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 B=w()?.accessToken;if(B)await J5(B),Y=await Q();else throw W}else throw W}let q=_.status!=="pending"?_.status==="enabled":L().penguinModeOrgEnabled;if(_=Y.enabled?{status:"enabled"}:{status:"disabled",reason:Y.disabled_reason??"preference"},q!==Y.enabled){if(!Y.enabled)B2("userSettings",{fastMode:void 0});C((W)=>({...W,penguinModeOrgEnabled:Y.enabled})),$5.emit(Y.enabled)}z(`Org fast mode: ${Y.enabled?"enabled":`disabled (${Y.disabled_reason??"preference"})`}`)}catch(Y){_=L().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"network_error"},z(`Failed to fetch org fast mode status, defaulting to ${_.status==="enabled"?"enabled (cached)":"disabled (network_error)"}: ${Y}`,{level:"error"}),x("tengu_org_penguin_mode_fetch_failed",{})}finally{C0=null}}return C0=X(),C0}var F3="Opus 4.7",w0,Z5=!1,T1,C1,D3,N3,A1,P3,_,$5,_3,n8=30000,E1=0,C0=null;var h1=H(()=>{q2();y0();M1();J0();j2();n();A8();i();Z0();u();F0();l();h8();j0();w1();w0={status:"active"},T1=Y0(),C1=Y0(),D3=T1.subscribe,N3=C1.subscribe;A1=Y0(),P3=A1.subscribe;_={status:"pending"},$5=Y0(),_3=$5.subscribe});function r8(Z){for(let $ of o8)if($.pattern.test(Z))return $.cost;return}function Q5(Z){if(A()&&Z)return i8;return K0}function e8(Z,$){let J=Z.promptCacheWrite1hTokens??Z.promptCacheWriteTokens,Q=$.cache_creation,X=Q?(Q.ephemeral_5m_input_tokens??0)/1e6*Z.promptCacheWriteTokens+(Q.ephemeral_1h_input_tokens??0)/1e6*J:($.cache_creation_input_tokens??0)/1e6*Z.promptCacheWriteTokens;return $.input_tokens/1e6*Z.inputTokens+$.output_tokens/1e6*Z.outputTokens+($.cache_read_input_tokens??0)/1e6*Z.promptCacheReadTokens+X+($.server_tool_use?.web_search_requests??0)*Z.webSearchRequests}function ZZ(Z,$){let J=b(Z);if(J===D(a0.firstParty)||J===D(o0.firstParty)||J===D(r0.firstParty)){let X=$.speed==="fast";return Q5(X)}let Q=g1[J];if(!Q){let X=r8(Z);if(X)return X;return $Z(Z,J),g1[b(h0())]??a8}return Q}function $Z(Z,$){x("tengu_unknown_model_cost",{model:Z,shortName:$}),p1()}function JZ(Z,$){let J=ZZ(Z,$);return e8(J,$)}function h3(Z,$){let J={input_tokens:$.inputTokens,output_tokens:$.outputTokens,cache_read_input_tokens:$.cacheReadInputTokens,cache_creation_input_tokens:$.cacheCreationInputTokens};return JZ(Z,J)}function u1(Z){if(Number.isInteger(Z))return`$${Z}`;return`$${Z.toFixed(2)}`}function m1(Z){return`${u1(Z.inputTokens)}/${u1(Z.outputTokens)} per Mtok`}var L0,f1,K0,t8,i8,l8,s8,a8,o8,g1;var c1=H(()=>{j2();J0();h1();g2();F0();L0={inputTokens:3,outputTokens:15,promptCacheWriteTokens:3.75,promptCacheWrite1hTokens:6,promptCacheReadTokens:0.3,webSearchRequests:0.01},f1={inputTokens:15,outputTokens:75,promptCacheWriteTokens:18.75,promptCacheWrite1hTokens:30,promptCacheReadTokens:1.5,webSearchRequests:0.01},K0={inputTokens:5,outputTokens:25,promptCacheWriteTokens:6.25,promptCacheWrite1hTokens:10,promptCacheReadTokens:0.5,webSearchRequests:0.01},t8={inputTokens:10,outputTokens:50,promptCacheWriteTokens:12.5,promptCacheWrite1hTokens:20,promptCacheReadTokens:1,webSearchRequests:0.01},i8={inputTokens:30,outputTokens:150,promptCacheWriteTokens:37.5,promptCacheWrite1hTokens:60,promptCacheReadTokens:3,webSearchRequests:0.01},l8={inputTokens:0.8,outputTokens:4,promptCacheWriteTokens:1,promptCacheWrite1hTokens:1.6,promptCacheReadTokens:0.08,webSearchRequests:0.01},s8={inputTokens:1,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheWrite1hTokens:2,promptCacheReadTokens:0.1,webSearchRequests:0.01},a8=K0,o8=[{pattern:/gpt-5-nano/i,label:"gpt-5-nano",cost:{inputTokens:0.05,outputTokens:0.4,promptCacheWriteTokens:0.05,promptCacheReadTokens:0.005,webSearchRequests:0}},{pattern:/gpt-5-mini/i,label:"gpt-5-mini",cost:{inputTokens:0.25,outputTokens:2,promptCacheWriteTokens:0.25,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gpt-5/i,label:"gpt-5",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gpt-4o-mini/i,label:"gpt-4o-mini",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/gpt-4o/i,label:"gpt-4o",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:1.25,webSearchRequests:0}},{pattern:/gpt-4\.1/i,label:"gpt-4.1",cost:{inputTokens:2,outputTokens:8,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/o4-mini/i,label:"o4-mini",cost:{inputTokens:0.55,outputTokens:2.2,promptCacheWriteTokens:0.55,promptCacheReadTokens:0.275,webSearchRequests:0}},{pattern:/\bo3\b/i,label:"o3",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/\bo1\b/i,label:"o1",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/gemini.*2\.5.*pro/i,label:"gemini-2.5-pro",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini.*2\.5.*flash/i,label:"gemini-2.5-flash",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/gemini.*flash/i,label:"gemini-flash",cost:{inputTokens:0.1,outputTokens:0.4,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gemini.*pro/i,label:"gemini-pro",cost:{inputTokens:1.25,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini/i,label:"gemini",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/deepseek/i,label:"deepseek",cost:{inputTokens:0.14,outputTokens:0.28,promptCacheWriteTokens:0.14,promptCacheReadTokens:0.0028,webSearchRequests:0}},{pattern:/kimi-for-coding/i,label:"kimi-for-coding",cost:{inputTokens:1,outputTokens:2,promptCacheWriteTokens:1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/kimi/i,label:"kimi",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/moonshot/i,label:"moonshot",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/devstral/i,label:"devstral",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/mistral.*large.*3/i,label:"mistral-large-3",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/mistral.*large/i,label:"mistral-large",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:2,webSearchRequests:0}},{pattern:/mistral.*medium/i,label:"mistral-medium",cost:{inputTokens:0.4,outputTokens:2,promptCacheWriteTokens:0.4,promptCacheReadTokens:0.4,webSearchRequests:0}},{pattern:/mistral.*small/i,label:"mistral-small",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*8b/i,label:"ministral-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*3b/i,label:"ministral-3b",cost:{inputTokens:0.04,outputTokens:0.04,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/llama.*405/i,label:"llama-405b",cost:{inputTokens:3.5,outputTokens:3.5,promptCacheWriteTokens:3.5,promptCacheReadTokens:3.5,webSearchRequests:0}},{pattern:/llama.*70/i,label:"llama-70b",cost:{inputTokens:0.59,outputTokens:0.79,promptCacheWriteTokens:0.59,promptCacheReadTokens:0.59,webSearchRequests:0}},{pattern:/llama.*8b/i,label:"llama-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/qwen/i,label:"qwen",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/minimax/i,label:"minimax",cost:{inputTokens:0.2,outputTokens:1.1,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.2,webSearchRequests:0}},{pattern:/\bglm/i,label:"glm",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4.*fast/i,label:"grok-4-fast",cost:{inputTokens:0.2,outputTokens:0.5,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.05,webSearchRequests:0}},{pattern:/grok.*4\.20/i,label:"grok-4.20",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4/i,label:"grok-4",cost:{inputTokens:3,outputTokens:15,promptCacheWriteTokens:3,promptCacheReadTokens:0.75,webSearchRequests:0}},{pattern:/grok/i,label:"grok",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/command-?r-?plus|command-r\+/i,label:"command-r-plus",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?a\b/i,label:"command-a",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?r7b/i,label:"command-r7b",cost:{inputTokens:0.0375,outputTokens:0.15,promptCacheWriteTokens:0.0375,promptCacheReadTokens:0.0375,webSearchRequests:0}},{pattern:/command-?r/i,label:"command-r",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.15,webSearchRequests:0}},{pattern:/gemma.*27b/i,label:"gemma-27b",cost:{inputTokens:0.08,outputTokens:0.16,promptCacheWriteTokens:0.08,promptCacheReadTokens:0.08,webSearchRequests:0}},{pattern:/gemma.*12b/i,label:"gemma-12b",cost:{inputTokens:0.04,outputTokens:0.13,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/gemma/i,label:"gemma",cost:{inputTokens:0.04,outputTokens:0.08,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/phi-?4-?mini/i,label:"phi-4-mini",cost:{inputTokens:0.075,outputTokens:0.3,promptCacheWriteTokens:0.075,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/phi-?4/i,label:"phi-4",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}},{pattern:/\bphi\b/i,label:"phi",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}}];g1={[D(M2.firstParty)]:l8,[D(S2.firstParty)]:s8,[D(_2.firstParty)]:L0,[D(E2.firstParty)]:L0,[D(v2.firstParty)]:L0,[D(I2.firstParty)]:L0,[D(h2.firstParty)]:L0,[D(f2.firstParty)]:L0,[D(y2.firstParty)]:f1,[D(T2.firstParty)]:f1,[D(C2.firstParty)]:K0,[D(a0.firstParty)]:K0,[D(o0.firstParty)]:K0,[D(r0.firstParty)]:K0,[D(A2.firstParty)]:t8}});function m(Z){return QZ.includes(Z)}function D0(Z){return XZ.includes(Z)}var QZ,XZ;var X5=H(()=>{QZ=["sonnet","opus","haiku","fable","best","sonnet[1m]","opus[1m]","opusplan"];XZ=["sonnet","opus","haiku"]});function YZ(Z,$){if(Z.includes($))return!0;if(m(Z))return I(Z).toLowerCase().includes($);return!1}function d1(Z,$){if(!Z.startsWith($))return!1;return Z.length===$.length||Z[$.length]==="-"}function qZ(Z,$){let J=m(Z)?I(Z).toLowerCase():Z;if(d1(J,$))return!0;if(!$.startsWith("claude-")&&d1(J,`claude-${$}`))return!0;return!1}function n1(Z,$){for(let J of $){if(D0(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 t1(Z){let $=y()||{},{availableModels:J}=$;if(!J)return!0;if(J.length===0)return!1;let X=X2(Z).trim().toLowerCase(),Y=J.map((q)=>q.trim().toLowerCase());if(Y.includes(X)){if(!D0(X)||!n1(X,Y))return!0}for(let q of Y)if(D0(q)&&!n1(q,Y)&&YZ(X,q))return!0;if(m(X)){let q=I(X).toLowerCase();if(Y.includes(q))return!0}for(let q of Y)if(!D0(q)&&m(q)){if(I(q).toLowerCase()===X)return!0}for(let q of Y)if(!D0(q)&&!m(q)){if(qZ(X,q))return!0}return!1}var i1=H(()=>{j0();X5();F0();Y2()});function R2(Z){if(typeof Z!=="string")return;let $=Z.trim();return $.length>0?$:void 0}function b0(){let Z=K();if(!Z?.model)return;return e1(Z.model)}function W7(){if(process.env.ANTHROPIC_SMALL_FAST_MODEL)return process.env.ANTHROPIC_SMALL_FAST_MODEL;let Z=b0();if(V()==="gemini")return Z||"gemini-2.0-flash-lite";if(V()==="mistral")return Z||"ministral-3b-latest";if(V()==="openai")return Z||"gpt-4o-mini";if(V()==="codex")return Z||"codexspark";if(V()==="github")return Z||"github:copilot";if(V()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(V()==="minimax")return Z||"MiniMax-M2.5-highspeed";return J4()}function z7(Z){return Z===j().opus40||Z===j().opus41||Z===j().opus45||Z===j().opus46||Z===j().opus47||Z===j().opus48}function Y5(){let Z,$=s1();if($!==void 0)Z=$;else{let J=y()||{},Q=R2(J.model),X=b0();if(Z4()!==void 0)Z=R2(r1().activeModelForProject)||void 0;else Z=X||Q||void 0}if(Z&&!t1(Z))return;return Z}function G7(){let Z=Y5();if(Z!==void 0&&Z!==null)return I(Z);return Q4()}function GZ(){return N0()}function N0(){if(process.env.ANTHROPIC_DEFAULT_OPUS_MODEL)return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;let Z=b0();if(V()==="gemini")return Z||"gemini-2.5-pro";if(V()==="mistral")return Z||"devstral-latest";if(V()==="openai")return Z||"gpt-4o";if(V()==="codex")return Z||"gpt-5.5";if(V()==="github")return Z||"github:copilot";if(V()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(V()==="minimax")return Z||"MiniMax-M2.7";if(V()!=="firstParty")return j().opus46;return j().opus48}function g0(){if(process.env.ANTHROPIC_DEFAULT_SONNET_MODEL)return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;let Z=b0();if(V()==="gemini")return Z||"gemini-2.0-flash";if(V()==="mistral")return Z||"mistral-medium-latest";if(V()==="openai")return Z||"gpt-4o";if(V()==="codex")return Z||"gpt-5.5";if(V()==="github")return Z||"github:copilot";if(V()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(V()==="minimax")return Z||"MiniMax-M2.5";if(V()!=="firstParty")return j().sonnet45;return j().sonnet5}function J4(){if(process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL)return process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;let Z=b0();if(V()==="mistral")return Z||"ministral-3b-latest";if(V()==="openai")return Z||"gpt-4o-mini";if(V()==="codex")return Z||"gpt-5.5";if(V()==="github")return Z||"github:copilot";if(V()==="gemini")return Z||"gemini-2.0-flash-lite";if(V()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(V()==="minimax")return Z||"MiniMax-M2.5-highspeed";return j().haiku45}function x7(Z){let{permissionMode:$,mainLoopModel:J,exceeds200kTokens:Q=!1}=Z;if(Y5()==="opusplan"&&$==="plan"&&!Q)return N0();if(Y5()==="haiku"&&$==="plan")return g0();return J}function h0(){let Z=b0();if(V()==="github"){let $=y()||{};return R2($.model)||Z||"github:copilot"}if(V()==="gemini")return Z||"gemini-2.0-flash";if(V()==="mistral")return Z||"devstral-latest";if(V()==="openai")return Z||"gpt-4o";if(V()==="codex")return Z||"gpt-5.5";if(H2())return N0()+(f0()?"[1m]":"");if(w2())return N0()+(f0()?"[1m]":"");return g0()}function Q4(){return I(h0())}function D(Z){if(Z=Z.toLowerCase(),Z.includes("claude-fable-5"))return"claude-fable-5";if(Z.includes("claude-opus-4-8"))return"claude-opus-4-8";if(Z.includes("claude-opus-4-7"))return"claude-opus-4-7";if(Z.includes("claude-opus-4-6"))return"claude-opus-4-6";if(Z.includes("claude-opus-4-5"))return"claude-opus-4-5";if(Z.includes("claude-opus-4-1"))return"claude-opus-4-1";if(Z.includes("claude-opus-4"))return"claude-opus-4";if(Z.includes("claude-sonnet-5"))return"claude-sonnet-5";if(Z.includes("claude-sonnet-4-6"))return"claude-sonnet-4-6";if(Z.includes("claude-sonnet-4-5"))return"claude-sonnet-4-5";if(Z.includes("claude-sonnet-4"))return"claude-sonnet-4";if(Z.includes("claude-haiku-4-5"))return"claude-haiku-4-5";if(Z.includes("claude-3-7-sonnet"))return"claude-3-7-sonnet";if(Z.includes("claude-3-5-sonnet"))return"claude-3-5-sonnet";if(Z.includes("claude-3-5-haiku"))return"claude-3-5-haiku";if(Z.includes("claude-3-opus"))return"claude-3-opus";if(Z.includes("claude-3-sonnet"))return"claude-3-sonnet";if(Z.includes("claude-3-haiku"))return"claude-3-haiku";let $=Z.match(/(claude-(\d+-\d+-)?\w+)/);if($&&$[1])return $[1];return Z}function b(Z){return D(X2(Z))}function xZ(Z=!1){if(H2()||w2()){if(f0())return`Opus 4.8 with 1M context · Most capable for complex work${Z?l1(!0):""}`;return`Opus 4.8 · Most capable for complex work${Z?l1(!0):""}`}return"Sonnet 5 · Best for everyday tasks"}function j7(Z){if(Z==="opusplan")return"Opus 4.8 in plan mode, else Sonnet 5";return Y4(I(Z))}function l1(Z){if(V()!=="firstParty")return"";let $=m1(Q5(Z));return` ·${Z?` (${a1})`:""} ${$}`}function f0(){if(V0()||W5()||V()!=="firstParty")return!1;if(U()&&M()===null)return!1;return!0}function B7(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 o1(Z);return Y4(Z)}function X4(Z){if(V()==="openai"||V()==="gemini"||V()==="codex"||V()==="github"){if(u2[Z])return u2[Z];if(V()==="github"){let{getCopilotDisplayName:$}=(M0(),S0(_0));return $(Z)??null}return null}switch(Z){case"gpt-5.5":return"GPT-5.5";case"gpt-5.4":return"GPT-5.4";case"gpt-5.3-codex-spark":return"GPT-5.3 Codex Spark";case j().fable5:return"Fable 5";case j().opus48:return"Opus 4.8";case j().opus48+"[1m]":return"Opus 4.8 (1M context)";case j().opus47:return"Opus 4.7";case j().opus47+"[1m]":return"Opus 4.7 (1M context)";case j().opus46:return"Opus 4.6";case j().opus46+"[1m]":return"Opus 4.6 (1M context)";case j().opus45:return"Opus 4.5";case j().opus41:return"Opus 4.1";case j().opus40:return"Opus 4";case j().sonnet5:return"Sonnet 5";case j().sonnet46+"[1m]":return"Sonnet 4.6 (1M context)";case j().sonnet46:return"Sonnet 4.6";case j().sonnet45+"[1m]":return"Sonnet 4.5 (1M context)";case j().sonnet45:return"Sonnet 4.5";case j().sonnet40:return"Sonnet 4";case j().sonnet40+"[1m]":return"Sonnet 4 (1M context)";case j().sonnet37:return"Sonnet 3.7";case j().sonnet35:return"Sonnet 3.5";case j().haiku45:return"Haiku 4.5";case j().haiku35:return"Haiku 3.5";default:return null}}function Y4(Z){let $=X4(Z);if($)return $;if(Z==="github:copilot")return"GPT-4o";return Z}function R7(Z){let $=X4(Z);if($)return`Claude ${$}`;return`Claude (${Z})`}function I(Z){let $=R2(Z);if(!$)return g0();let J=$.toLowerCase(),Q=a(J),X=Q?J.replace(/\[1m]$/i,"").trim():J;if(m(X))switch(X){case"opusplan":return g0()+(Q?"[1m]":"");case"sonnet":return g0()+(Q?"[1m]":"");case"haiku":return J4()+(Q?"[1m]":"");case"opus":return N0()+(Q?"[1m]":"");case"best":return GZ();default:}if(X==="codexplan")return"gpt-5.5";if(X==="codexspark")return"gpt-5.3-codex-spark";if(X==="fable"||X==="fable5")return j().fable5;if(V()==="firstParty"&&BZ(X)&&RZ())return N0()+(Q?"[1m]":"");if(Q)return $.replace(/\[1m\]$/i,"").trim()+"[1m]";return $}function H7(Z,$){if(a(Z)||!a($))return Z;if(q5(I(Z)))return Z+"[1m]";return Z}function BZ(Z){return jZ.includes(Z)}function RZ(){return!F(process.env.CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP)}function w7(Z){if(Z===null){if(U())return`Default (${xZ()})`;return`Default (${Q4()})`}let $=I(Z);return Z===$?$:`${Z} (${$})`}function F7(Z){if(V()==="foundry")return;let $=Z.toLowerCase().includes("[1m]"),J=b(Z);if(J.includes("claude-fable-5"))return"Fable 5";if(J.includes("claude-opus-4-8"))return $?"Opus 4.8 (with 1M context)":"Opus 4.8";if(J.includes("claude-opus-4-7"))return $?"Opus 4.7 (with 1M context)":"Opus 4.7";if(J.includes("claude-opus-4-6"))return $?"Opus 4.6 (with 1M context)":"Opus 4.6";if(J.includes("claude-opus-4-5"))return"Opus 4.5";if(J.includes("claude-opus-4-1"))return"Opus 4.1";if(J.includes("claude-opus-4"))return"Opus 4";if(J.includes("claude-sonnet-5"))return"Sonnet 5";if(J.includes("claude-sonnet-4-6"))return $?"Sonnet 4.6 (with 1M context)":"Sonnet 4.6";if(J.includes("claude-sonnet-4-5"))return $?"Sonnet 4.5 (with 1M context)":"Sonnet 4.5";if(J.includes("claude-sonnet-4"))return $?"Sonnet 4 (with 1M context)":"Sonnet 4";if(J.includes("claude-3-7-sonnet"))return"Claude 3.7 Sonnet";if(J.includes("claude-3-5-sonnet"))return"Claude 3.5 Sonnet";if(J.includes("claude-haiku-4-5"))return"Haiku 4.5";if(J.includes("claude-3-5-haiku"))return"Claude 3.5 Haiku";return}function L7(Z){return Z.replace(/\[(1|2)m\]/gi,"")}function K7(Z){let $=b(Z);return $.includes("opus-4-7")||$.includes("opus-4-8")||$.includes("fable-5")||$.includes("sonnet-5")}var jZ;var F0=H(()=>{J0();$0();i();$4();n();V5();u();zZ();Y2();c1();j0();l();VZ();i1();X5();WZ();p2();jZ=["claude-opus-4-20250514","claude-opus-4-1-20250805","claude-opus-4-0","claude-opus-4-1"]});function z5(Z){return}async function N7(){}var q4=()=>{};var B4={};c2(B4,{prefetchOpenAICompatibleModels:()=>UZ,getDiscoveredContextWindow:()=>HZ,discoverOpenAICompatibleModelOptions:()=>j4});function HZ(Z){return G4.get(Z)}function wZ(){return(K()?.baseUrl??"https://api.openai.com/v1").replace(/\/+$/,"")}function x4(Z){try{let $=new URL(Z).hostname.toLowerCase();return $.endsWith(".openai.azure.com")||$.endsWith(".cognitiveservices.azure.com")}catch{return!1}}function FZ(Z){try{return new URL(Z).hostname.toLowerCase().includes("bankr")}catch{return!1}}function LZ(Z){let $=K()?.apiKey?.trim();if(!$)return{};if(FZ(Z))return{"X-API-Key":$};let J={Authorization:`Bearer ${$}`};if(x4(Z))J["api-key"]=$;return J}function KZ(Z){let $=Z.endsWith("/v1")?`${Z}/models`:`${Z}/v1/models`,J=`${Z}/models`,Q=process.env.OPENAI_API_VERSION?.trim(),X=Q&&x4(Z)?(Y)=>{try{let q=new URL(Y);return q.searchParams.set("api-version",Q),q.toString()}catch{return Y}}:(Y)=>Y;if($===J)return[X($)];return[X($),X(J)]}function DZ(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 NZ(Z){if(Z>=1e6)return`${Z/1e6}M ctx`;if(Z>=1000)return`${Math.round(Z/1000)}K ctx`;return`${Z} ctx`}async function bZ(Z,$){let J=new Set;for(let Q of Z)try{let X=await P.get(Q,{headers:$,timeout:z4}),Y=[];for(let q of X.data?.data??[]){let W=q.id?.trim();if(!W||J.has(W))continue;J.add(W);let G=q.name?.trim()||W,B=q.context_length??null;if(B&&B>0)G4.set(W,B);let R=B?` · ${NZ(B)}`:"";Y.push({value:W,label:G,description:`${W}${R}`})}if(Y.length>0)return Y.sort((q,W)=>{let G=String(q.value).split("/")[0]??"",B=String(W.value).split("/")[0]??"",R=G.localeCompare(B);return R!==0?R:String(q.value).localeCompare(String(W.value))}),Y}catch{z(`[ModelDiscovery] Failed to fetch OpenAI models from ${Q}`)}return[]}async function OZ(Z,$){try{let J=await P.get(Z,{headers:$,timeout:z4}),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 j4(){if(V()!=="openai")return[];let Z=wZ(),$=LZ(Z),J=await bZ(KZ(Z),$);if(J.length>0)return J;let Q=DZ(Z);if(Q)return OZ(Q,$);return[]}function UZ(){if(u0)return u0;return u0=(async()=>{if(!W4()?.startsWith("openai:"))return;try{let $=await j4();if($.length>0)V4($)}catch{}finally{u0=null}})(),u0}var z4=5000,G4,u0=null;var R4=H(()=>{q2();$0();c5();Z0();l();$4();G4=new Map});function w4(Z,$,J){let Q=K()?.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=H4($,J);if(X!==void 0)return X;return H4(Z,J)}function H4(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 F4(Z){let $=w4(PZ,EZ,Z);if($!==void 0)return $;try{let{getDiscoveredContextWindow:J}=(R4(),S0(B4)),Q=J(Z);if(Q!==void 0)return Q}catch{}try{let{getCatalogCopilotContextWindow:J}=(M0(),S0(_0));return J(Z)}catch{return}}function L4(Z){let $=w4(kZ,_Z,Z);if($!==void 0)return $;try{let{getCatalogCopilotMaxOutputTokens:J}=(M0(),S0(_0));return J(Z)}catch{return}}var PZ,kZ,EZ,_Z;var K4=H(()=>{$0();PZ={"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},kZ={"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},EZ=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_CONTEXT_WINDOWS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})(),_Z=(()=>{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 D4(){let Z=K()?.transport;return Z==="openai_compat"||Z==="gemini"||Z==="mistral"||Z==="github_copilot"||Z==="codex_responses"}function V0(){return F(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)}function a(Z){if(V0())return!1;return/\[1m\]/i.test(Z)}function q5(Z){if(V0())return!1;let $=b(Z);return $.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("opus-4-6")||$.includes("opus-4-7")||$.includes("opus-4-8")||$.includes("fable-5")}function p7(Z,$){if(a(Z))return 1e6;if(D4()){let Q=F4(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."),MZ}let J=z5(Z);if(J?.max_input_tokens&&J.max_input_tokens>=1e5){if(J.max_input_tokens>G5&&V0())return G5;return J.max_input_tokens}if(!V0()&&(b(Z).includes("fable-5")||b(Z).includes("sonnet-5")))return 1e6;if($?.includes(T0)&&q5(Z))return 1e6;if(IZ(Z))return 1e6;return G5}function IZ(Z){if(V0())return!1;if(a(Z))return!1;if(!b(Z).includes("sonnet-4-6"))return!1;return L().clientDataCache?.coral_reef_sonnet==="true"}function m7(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 c7(Z){let $,J;if(D4()){let Y=L4(Z);if(Y!==void 0)return{default:Y,upperLimit:Y}}let Q=b(Z);if(Q.includes("fable-5")||Q.includes("opus-4-7")||Q.includes("opus-4-6"))$=64000,J=128000;else if(Q.includes("sonnet-4-6"))$=32000,J=128000;else if(Q.includes("opus-4-5")||Q.includes("sonnet-4")||Q.includes("haiku-4"))$=32000,J=64000;else if(Q.includes("opus-4-1")||Q.includes("opus-4"))$=32000,J=32000;else if(Q.includes("claude-3-opus"))$=4096,J=4096;else if(Q.includes("claude-3-sonnet"))$=8192,J=8192;else if(Q.includes("claude-3-haiku"))$=4096,J=4096;else if(Q.includes("3-5-sonnet")||Q.includes("3-5-haiku"))$=8192,J=8192;else if(Q.includes("3-7-sonnet"))$=32000,J=64000;else $=SZ,J=vZ;let X=z5(Z);if(X?.max_tokens&&X.max_tokens>=4096)J=X.max_tokens,$=Math.min($,J);return{default:$,upperLimit:J}}var G5=200000,MZ,f7=20000,SZ=32000,vZ=64000,g7=8000,u7=64000;var V5=H(()=>{e2();$0();i();u();F0();q4();K4();MZ=(()=>{let Z=parseInt(process.env.CLAUDE_CODE_OPENAI_FALLBACK_CONTEXT_WINDOW??"",10);return!isNaN(Z)&&Z>0?Z:128000})()});var yZ,N4;var b4=H(()=>{l0();l();yZ=[{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"}],N4=v((Z,$)=>{if(V()==="firstParty")return;let J=Z.toLowerCase();for(let Q of yZ){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((q)=>q.trim()).includes($)}return},(Z,$)=>`${Z.toLowerCase()}:${$}`)});function TZ(Z){let $=[],J=[];for(let Q of Z)if(E4.includes(Q))$.push(Q);else J.push(Q);return{allowed:$,disallowed:J}}function V9(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}=TZ(Z);for(let Q of J)console.warn(`Warning: Beta header '${Q}' is not allowed. Only the following betas are supported: ${E4.join(", ")}`);return $.length>0?$:void 0}function O4(Z){let $=N4(Z,"interleaved_thinking");if($!==void 0)return $;let J=b(Z),Q=V();if(Q==="foundry")return!0;if(Q==="firstParty")return!J.includes("claude-3-");return J.includes("claude-opus-4")||J.includes("claude-sonnet-5")||J.includes("claude-sonnet-4")}function CZ(Z){let $=b(Z);return $.includes("claude-opus-4")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function AZ(Z){let $=b(Z),J=V();if(J==="foundry")return!0;if(J==="firstParty")return!$.includes("claude-3-");return $.includes("claude-opus-4")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function hZ(Z){let $=b(Z),J=V();if(J!=="firstParty"&&J!=="foundry")return!1;return $.includes("claude-fable-5")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4-6")||$.includes("claude-sonnet-4-5")||$.includes("claude-opus-4-1")||$.includes("claude-opus-4-5")||$.includes("claude-opus-4-6")||$.includes("claude-opus-4-7")||$.includes("claude-opus-4-8")||$.includes("claude-haiku-4-5")}function W9(Z){let $=b(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 z9(){let Z=V();if(Z==="vertex"||Z==="bedrock")return b1;return N1}function U4(){return(V()==="firstParty"||V()==="foundry")&&!F(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function G9(){if(F(process.env.CLAUDIN_DISABLE_GLOBAL_CACHE_SCOPE))return!1;return V()==="firstParty"&&!F(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function x9(Z,$){let J=[..._4(Z)];if($?.isAgenticQuery){if(!J.includes(G2))J.push(G2)}let Q=P4();if(!Q||Q.length===0)return J;return[...J,...Q.filter((X)=>!J.includes(X))]}function M4(){x5.cache?.clear?.(),_4.cache?.clear?.(),fZ.cache?.clear?.()}var E4,x5,_4,fZ;var S4=H(()=>{l0();M1();J0();e2();y0();n();V5();u();F0();b4();l();j0();E4=[T0];x5=v((Z)=>{let $=[],J=b(Z).includes("haiku"),Q=V(),X=U4();if(!J)$.push(G2);if(U())$.push(B0);if(a(Z))$.push(T0);if(!F(process.env.DISABLE_INTERLEAVED_THINKING)&&O4(Z))$.push(L1);if(X&&O4(Z)&&!f()&&Q0().showThinkingSummaries!==!0)$.push(U1),$.push(P1);let Y=AZ(Z);if(U4()&&Y)$.push(K1);let q=k4("tengu_tool_pear"),W=!q&&(F(process.env.CLAUDE_CODE_JSON_TOOL_USE)||A0("tengu_amber_json_tools",!1));if(X&&hZ(Z)&&q)$.push(D1);if(X&&W)$.push(k1);if(Q==="vertex"&&CZ(Z))$.push(o2);if(Q==="foundry")$.push(o2);if(X)$.push(O1);if(process.env.ANTHROPIC_BETAS)$.push(...process.env.ANTHROPIC_BETAS.split(",").map((G)=>G.trim()).filter(Boolean));return $}),_4=v((Z)=>{let $=x5(Z);if(V()==="bedrock")return $.filter((J)=>!r2.has(J));return $}),fZ=v((Z)=>{return x5(Z).filter((J)=>r2.has(J))})});import{execFile as gZ}from"child_process";function v4(Z){return new Promise(($)=>{gZ("security",["find-generic-password","-a",L2(),"-w","-s",Z],{encoding:"utf-8",timeout:uZ},(J,Q)=>{$({stdout:J?null:Q?.trim()||null,timedOut:Boolean(J&&"killed"in J&&J.killed)})})})}function w9(){if(process.platform!=="darwin"||F2||g())return;let Z=v4(s(I4)),$=v4(s());F2=Promise.all([Z,$]).then(([J,Q])=>{if(!J.timedOut)y4(J.stdout);if(!Q.timedOut)j5={stdout:Q.stdout}})}async function F9(){if(F2)await F2}function T4(){return j5}function B5(){j5=null}var uZ=1e4,j5=null,F2=null;var C4=H(()=>{u();s2()});function R5(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,B)=>{W?.removeEventListener("abort",G),B()},Z,$,q,Q);function q(){if(clearTimeout(Y),J?.throwOnAbort||J?.abortError)X(J.abortError?.()??Error("aborted"));else Q()}if($?.addEventListener("abort",q,{once:!0}),J?.unref)Y.unref()})}var A4=()=>{};function D9(){return h4}function f4(){h4.clear()}var h4;var g4=H(()=>{h4=new Map});var S$={};c2(S$,{validateForceLoginOrg:()=>M$,saveOAuthTokensIfNeeded:()=>J8,saveApiKey:()=>M5,removeApiKey:()=>w$,refreshGcpCredentialsIfNeeded:()=>_5,refreshGcpAuth:()=>Z8,refreshAwsAuth:()=>r4,refreshAndGetAwsCredentials:()=>z0,prefetchGcpCredentialsIfSafe:()=>j$,prefetchAwsCredentialsAndBedRockInfoIfSafe:()=>B$,prefetchApiKeyFromApiKeyHelperIfSafe:()=>$$,isUsing3PServices:()=>b2,isTeamSubscriber:()=>b$,isTeamPremiumSubscriber:()=>w2,isProSubscriber:()=>W5,isOverageProvisioningAllowed:()=>D$,isOtelHeadersHelperFromProjectOrLocalSettings:()=>q8,isMaxSubscriber:()=>H2,isGcpAuthRefreshFromProjectSettings:()=>E5,isEnterpriseSubscriber:()=>O$,isCustomApiKeyApproved:()=>H$,isConsumerSubscriber:()=>E$,isClaudeAISubscriber:()=>U,isAwsCredentialExportFromProjectSettings:()=>P5,isAwsAuthRefreshFromProjectSettings:()=>O5,isAnthropicAuthEnabled:()=>k0,is1PApiCustomer:()=>K$,hasProfileScope:()=>q0,hasOpusAccess:()=>N$,hasAnthropicApiKeyAuth:()=>oZ,handleOAuth401Error:()=>J5,getSubscriptionType:()=>M,getSubscriptionName:()=>X8,getRateLimitTier:()=>Q8,getOtelHeadersFromHelper:()=>P$,getOauthAccountInfo:()=>N2,getConfiguredApiKeyHelper:()=>o,getClaudeAIOAuthTokensAsync:()=>c0,getClaudeAIOAuthTokens:()=>w,getAuthTokenSource:()=>I0,getApiKeyHelperElapsedMs:()=>rZ,getApiKeyFromConfigOrMacOSKeychain:()=>U2,getApiKeyFromApiKeyHelperCached:()=>w5,getApiKeyFromApiKeyHelper:()=>o4,getAnthropicApiKeyWithSource:()=>n0,getAnthropicApiKey:()=>X0,getAccountInformation:()=>_$,clearOAuthTokenCache:()=>S5,clearGcpCredentialsCache:()=>x$,clearAwsCredentialsCache:()=>q$,clearApiKeyHelperCache:()=>Z$,checkGcpCredentialsValid:()=>e4,checkAndRefreshOAuthTokenIfNeeded:()=>t0,calculateApiKeyHelperTTL:()=>a4});import{exec as l4}from"child_process";import{mkdir as iZ,stat as lZ}from"fs/promises";import{join as sZ}from"path";function D2(){return F(process.env.CLAUDE_CODE_REMOTE)||process.env.CLAUDE_CODE_ENTRYPOINT==="claude-desktop"}function k0(){if(g())return!1;if(process.env.ANTHROPIC_UNIX_SOCKET)return!!process.env.CLAUDE_CODE_OAUTH_TOKEN;let Z=b2(),J=(y()||{}).apiKeyHelper,Q=process.env.ANTHROPIC_AUTH_TOKEN||J||process.env.CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR,X;try{({source:X}=n0({skipRetrievingKeyFromApiKeyHelper:!0}))}catch{X="none"}let Y=X==="ANTHROPIC_API_KEY"||X==="apiKeyHelper";return!(Z||Q&&!D2()||Y&&!D2())}function I0(){if(g()){if(o())return{source:"apiKeyHelper",hasToken:!0};return{source:"none",hasToken:!1}}if(process.env.ANTHROPIC_AUTH_TOKEN&&!D2())return{source:"ANTHROPIC_AUTH_TOKEN",hasToken:!0};if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{source:"CLAUDE_CODE_OAUTH_TOKEN",hasToken:!0};if(W2()){if(process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)return{source:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",hasToken:!0};return{source:"CCR_OAUTH_TOKEN_FILE",hasToken:!0}}if(o()&&!D2())return{source:"apiKeyHelper",hasToken:!0};let J=w();if(P0(J?.scopes)&&J?.accessToken)return{source:"claude.ai",hasToken:!0};return{source:"none",hasToken:!1}}function X0(){let{key:Z}=n0();return Z}function oZ(){try{let{key:Z,source:$}=n0({skipRetrievingKeyFromApiKeyHelper:!0});return Z!==null&&$!=="none"}catch{return!1}}function n0(Z={}){let $=(()=>{let q=K();if(q?.transport!=="anthropic")return;let W=q.apiKey?.trim();return W&&W.length>0?W:void 0})();if(g()){if($)return{key:$,source:"ANTHROPIC_API_KEY"};if(o())return{key:Z.skipRetrievingKeyFromApiKeyHelper?null:w5(),source:"apiKeyHelper"};return{key:null,source:"none"}}let J=c4()?void 0:$;if(x2()&&J)return{key:J,source:"ANTHROPIC_API_KEY"};if(F(process.env.CI)){let q=l2();if(q)return{key:q,source:"ANTHROPIC_API_KEY"};if(!b2()&&!J&&!process.env.CLAUDE_CODE_OAUTH_TOKEN&&!process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Configure an Anthropic profile via /provider or set CLAUDE_CODE_OAUTH_TOKEN");if(J&&!b2())return{key:J,source:"ANTHROPIC_API_KEY"};return{key:null,source:"none"}}if(J&&L().customApiKeyResponses?.approved?.includes(z2(J)))return{key:J,source:"ANTHROPIC_API_KEY"};let Q=l2();if(Q)return{key:Q,source:"ANTHROPIC_API_KEY"};if(o()){if(Z.skipRetrievingKeyFromApiKeyHelper)return{key:null,source:"apiKeyHelper"};return{key:w5(),source:"apiKeyHelper"}}let Y=U2();if(Y)return Y;return{key:null,source:"none"}}function o(){if(g())return k("flagSettings")?.apiKeyHelper;return(y()||{}).apiKeyHelper}function s4(){let Z=o();if(!Z)return!1;let $=k("projectSettings"),J=k("localSettings");return $?.apiKeyHelper===Z||J?.apiKeyHelper===Z}function b5(){return(y()||{}).awsAuthRefresh}function O5(){let Z=b5();if(!Z)return!1;let $=k("projectSettings"),J=k("localSettings");return $?.awsAuthRefresh===Z||J?.awsAuthRefresh===Z}function U5(){return(y()||{}).awsCredentialExport}function P5(){let Z=U5();if(!Z)return!1;let $=k("projectSettings"),J=k("localSettings");return $?.awsCredentialExport===Z||J?.awsCredentialExport===Z}function a4(){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 aZ}function rZ(){let Z=c?.startedAt;return Z?Date.now()-Z:0}async function o4(Z){if(!o())return null;let $=a4();if(S){if(Date.now()-S.timestamp<$)return S.value;if(!c)c={promise:u4(Z,!1,U0),startedAt:null};return S.value}if(c)return c.promise;return c={promise:u4(Z,!0,U0),startedAt:Date.now()},c.promise}async function u4(Z,$,J){try{let Q=await eZ(Z);if(J!==U0)return Q;if(Q!==null)S={value:Q,timestamp:Date.now()};return Q}catch(Q){if(J!==U0)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"}),!$&&S&&S.value!==" ")return S={...S,timestamp:Date.now()},S.value;return S={value:" ",timestamp:Date.now()}," "}finally{if(J===U0)c=null}}async function eZ(Z){let $=o();if(!$)return null;if(s4()){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 d0("apiKeyHelper invoked before trust check",Y),x("tengu_apiKeyHelper_missing_trust11",{}),null}}let J=await H0($,{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 w5(){return S?.value??null}function Z$(){U0++,S=null,c=null}function $$(Z){if(s4()&&!d())return;o4(Z)}async function Q$(){let Z=b5();if(!Z)return!1;if(O5()){if(!d()&&!f()){let J=Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("awsAuthRefresh invoked before trust check",J),x("tengu_awsAuthRefresh_missing_trust",{}),!1}}try{return z("Fetching AWS caller identity for AWS auth refresh command"),await a2(),z("Fetched AWS caller identity, skipping AWS auth refresh command"),!1}catch{return r4(Z)}}function r4(Z){z("Running AWS auth refresh command");let $=T.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=l4(Z,{timeout:X$});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 ~/.claudin/config.json):");console.error(W),$.endAuthentication(!1),J(!1)}})})}async function Y$(){let Z=U5();if(!Z)return null;if(P5()){if(!d()&&!f()){let J=Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("awsCredentialExport invoked before trust check",J),x("tengu_awsCredentialExport_missing_trust",{}),null}}try{return z("Fetching AWS caller identity for credential export command"),await a2(),z("Fetched AWS caller identity, skipping AWS credential export command"),null}catch{try{z("Running AWS credential export command");let $=await H0(Z,{shell:!0,reject:!1});if($.exitCode!==0||!$.stdout)throw Error("awsCredentialExport did not return a valid value");let J=K5($.stdout.trim());if(!B1(J))throw Error("awsCredentialExport did not return valid AWS STS output structure");return z("AWS credentials retrieved from awsCredentialExport"),{accessKeyId:J.Credentials.AccessKeyId,secretAccessKey:J.Credentials.SecretAccessKey,sessionToken:J.Credentials.SessionToken}}catch($){let J=h.red("Error getting AWS credentials from awsCredentialExport (in settings or ~/.claudin/config.json):");if($ instanceof Error)console.error(J,$.message);else console.error(J,$);return null}}}function q$(){z0.cache.clear()}function k5(){return(y()||{}).gcpAuthRefresh}function E5(){let Z=k5();if(!Z)return!1;let $=k("projectSettings"),J=k("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=R5(V$).then(()=>{throw new V8("GCP credentials check timed out")});return await Promise.race([J,Q]),!0}catch{return!1}}async function z$(){let Z=k5();if(!Z)return!1;if(E5()){if(!d()&&!f()){let J=Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("gcpAuthRefresh invoked before trust check",J),x("tengu_gcpAuthRefresh_missing_trust",{}),!1}}try{if(z("Checking GCP credentials validity for auth refresh"),await e4())return z("GCP credentials are valid, skipping auth refresh command"),!1}catch{}return Z8(Z)}function Z8(Z){z("Running GCP auth refresh command");let $=T.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=l4(Z,{timeout:G$});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 ~/.claudin/config.json):");console.error(W),$.endAuthentication(!1),J(!1)}})})}function x$(){_5.cache.clear()}function j$(){if(!k5())return;if(E5()){if(!d()&&!f())return}_5()}function B$(){let Z=b5(),$=U5();if(!Z&&!$)return;if(O5()||P5()){if(!d()&&!f())return}z0(),j()}function R$(Z){return/^[a-zA-Z0-9-_]+$/.test(Z)}async function M5(Z){if(!R$(Z))throw Error("Invalid API key format. API key must contain only alphanumeric characters, dashes, and underscores.");await $8();let $=!1;if(process.platform==="darwin")try{let Q=s(),X=L2(),Y=Buffer.from(Z,"utf-8").toString("hex"),q=`add-generic-password -U -a "${X}" -s "${Q}" -X "${Y}"
|
|
2
|
+
`;await H0("security",["-i"],{input:q,reject:!1}),x("tengu_api_key_saved_to_keychain",{}),$=!0}catch(Q){N(Q),x("tengu_api_key_keychain_error",{error:p(Q)}),x("tengu_api_key_saved_to_config",{})}else x("tengu_api_key_saved_to_config",{});let J=z2(Z);C((Q)=>{let X=Q.customApiKeyResponses?.approved??[];return{...Q,primaryApiKey:$?Q.primaryApiKey:Z,customApiKeyResponses:{...Q.customApiKeyResponses,approved:X.includes(J)?X:[...X,J],rejected:Q.customApiKeyResponses?.rejected??[]}}}),U2.cache.clear?.(),B5()}function H$(Z){let $=L(),J=z2(Z);return $.customApiKeyResponses?.approved?.includes(J)??!1}async function w$(){await $8(),C((Z)=>({...Z,primaryApiKey:void 0})),U2.cache.clear?.(),B5()}async function $8(){try{await x1()}catch(Z){N(Z)}}function J8(Z){if(!P0(Z.scopes))return x("tengu_oauth_tokens_not_claude_ai",{}),{success:!0};if(!Z.refreshToken||!Z.expiresAt)return x("tengu_oauth_tokens_inference_only",{}),{success:!0};let $=O2(),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)x("tengu_oauth_tokens_saved",{storageBackend:J});else x("tengu_oauth_tokens_save_failed",{storageBackend:J});return w.cache?.clear?.(),M4(),f4(),Y}catch(Q){return N(Q),x("tengu_oauth_tokens_save_exception",{storageBackend:J,error:p(Q)}),{success:!1,warning:"Failed to save OAuth tokens"}}}function S5(){w.cache?.clear?.(),O0()}async function F$(){try{let{mtimeMs:Z}=await lZ(sZ(L5(),".credentials.json"));if(Z!==p4)p4=Z,S5()}catch{w.cache?.clear?.()}}function J5(Z){let $=H5.get(Z);if($)return $;let J=L$(Z).finally(()=>{H5.delete(Z)});return H5.set(Z,J),J}async function L$(Z){S5();let $=await c0();if(!$?.refreshToken)return!1;if($.accessToken!==Z)return x("tengu_oauth_401_recovered_from_keychain",{}),!0;return t0(0,!0)}async function c0(){if(g())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN||W2())return w();try{let J=(await O2().readAsync())?.claudeAiOauth;if(!J?.accessToken)return null;return J}catch(Z){return N(Z),null}}function t0(Z=0,$=!1){if(Z===0&&!$){if(p0)return p0;return p0=F5(Z,$).finally(()=>{p0=null}),p0}return F5(Z,$)}async function F5(Z,$){await F$();let Q=w();if(!$){if(!Q?.refreshToken||!m0(Q.expiresAt))return!1}if(!Q?.refreshToken)return!1;if(!P0(Q.scopes))return!1;w.cache?.clear?.(),O0();let X=await c0();if(!X?.refreshToken||!m0(X.expiresAt))return!1;let Y=L5();await iZ(Y,{recursive:!0});let q;try{x("tengu_oauth_token_refresh_lock_acquiring",{}),q=await n4(Y),x("tengu_oauth_token_refresh_lock_acquired",{})}catch(W){if(W.code==="ELOCKED"){if(Z<5)return x("tengu_oauth_token_refresh_lock_retry",{retryCount:Z+1}),await R5(1000+Math.random()*1000),F5(Z+1,$);return x("tengu_oauth_token_refresh_lock_retry_limit_reached",{maxRetries:5}),!1}return N(W),x("tengu_oauth_token_refresh_lock_error",{error:p(W)}),!1}try{w.cache?.clear?.(),O0();let W=await c0();if(!W?.refreshToken||!m0(W.expiresAt))return x("tengu_oauth_token_refresh_race_resolved",{}),!1;x("tengu_oauth_token_refresh_starting",{});let G=await t4(W.refreshToken,{scopes:P0(W.scopes)?void 0:W.scopes});return J8(G),w.cache?.clear?.(),O0(),!0}catch(W){N(W),w.cache?.clear?.(),O0();let G=await c0();if(G&&!m0(G.expiresAt))return x("tengu_oauth_token_refresh_race_recovered",{}),!0;return!1}finally{x("tengu_oauth_token_refresh_lock_releasing",{}),await q(),x("tengu_oauth_token_refresh_lock_released",{})}}function U(){if(!k0())return!1;return P0(w()?.scopes)}function q0(){return w()?.scopes?.includes(d4)??!1}function K$(){{let Z=K()?.transport;if(Z==="bedrock"||Z==="vertex"||Z==="foundry")return!1}if(U())return!1;return!0}function N2(){return k0()?L().oauthAccount:void 0}function D$(){let $=N2()?.billingType;if(!U()||!$)return!1;if($!=="stripe_subscription"&&$!=="stripe_subscription_contracted"&&$!=="apple_subscription"&&$!=="google_play_subscription")return!1;return!0}function N$(){let Z=M();return Z==="max"||Z==="enterprise"||Z==="team"||Z==="pro"||Z===null}function M(){if(e5())return r5();if(!k0())return null;let Z=w();if(!Z)return null;return Z.subscriptionType??null}function H2(){return M()==="max"}function b$(){return M()==="team"}function w2(){return M()==="team"&&Q8()==="default_claude_max_5x"}function O$(){return M()==="enterprise"}function W5(){return M()==="pro"}function Q8(){if(!k0())return null;let Z=w();if(!Z)return null;return Z.rateLimitTier??null}function X8(){switch(M()){case"enterprise":return"Claude Enterprise";case"team":return"Claude Team";case"max":return"Claude Max";case"pro":return"Claude Pro";default:return"Claude API"}}function b2(){let Z=K()?.transport;if(!Z)return!1;return Z!=="anthropic"}function Y8(){return(y()||{}).otelHeadersHelper}function q8(){let Z=Y8();if(!Z)return!1;let $=k("projectSettings"),J=k("localSettings");return $?.otelHeadersHelper===Z||J?.otelHeadersHelper===Z}function P$(){let Z=Y8();if(!Z)return{};let $=parseInt(process.env.CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS||U$.toString());if(K2&&Date.now()-m4<$)return K2;if(q8()){if(!d())return{}}try{let J=D5(Z,{timeout:30000})?.toString().trim();if(!J)throw Error("otelHeadersHelper did not return a valid value");let Q=K5(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 K2=Q,m4=Date.now(),K2}catch(J){throw N(Error(`Error getting OpenTelemetry headers from otelHeadersHelper (in settings): ${p(J)}`)),J}}function k$(Z){return Z==="max"||Z==="pro"}function E$(){let Z=M();return U()&&Z!==null&&k$(Z)}function _$(){if(V()!=="firstParty")return;let{source:$}=I0(),J={};if($==="CLAUDE_CODE_OAUTH_TOKEN"||$==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR")J.tokenSource=$;else if(U())J.subscription=X8();else J.tokenSource=$;let{key:Q,source:X}=n0();if(Q)J.apiKeySource=X;if($==="claude.ai"||X==="/login managed key"){let q=N2()?.organizationName;if(q)J.organization=q}let Y=N2()?.emailAddress;if(($==="claude.ai"||X==="/login managed key")&&Y)J.email=Y;return J}async function M$(){if(process.env.ANTHROPIC_UNIX_SOCKET)return{valid:!0};if(!k0())return{valid:!0};let Z=k("policySettings")?.forceLoginOrgUUID;if(!Z)return{valid:!0};await t0();let $=w();if(!$)return{valid:!0};let{source:J}=I0(),Q=J==="CLAUDE_CODE_OAUTH_TOKEN"||J==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",X=await R0($.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 aZ=300000,S=null,c=null,U0=0,J$=3600000,X$=180000,z0,V$=5000,W$=3600000,G$=180000,_5,U2,w,p4=0,H5,p0=null,K2=null,m4=0,U$=1740000,V8;var n=H(()=>{mZ();G1();l0();y0();j2();Y2();l();J0();$0();Z1();i4();t2();z1();j1();H1();F1();S4();i();Z0();u();V1();cZ();nZ();s0();dZ();tZ();C4();s2();j0();A4();pZ();g4();z0=N5(async()=>{let Z=await Q$(),$=await Y$();if(Z||$)await R1();return $},J$);_5=N5(async()=>{return await z$()},W$);U2=v(()=>{if(g())return null;if(process.platform==="darwin"){let $=T4();if($){if($.stdout)return{key:$.stdout,source:"/login managed key"}}else{let J=s();try{let Q=D5(`security find-generic-password -a $USER -w -s "${J}"`);if(Q)return{key:Q,source:"/login managed key"}}catch(Q){N(Q)}}}let Z=L();if(!Z.primaryApiKey)return null;return{key:Z.primaryApiKey,source:"/login managed key"}});w=v(()=>{if(g())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{accessToken:process.env.CLAUDE_CODE_OAUTH_TOKEN,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};let Z=W2();if(Z)return{accessToken:Z,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};try{let Q=O2().read()?.claudeAiOauth;if(!Q?.accessToken)return null;return Q}catch($){return N($),null}});H5=new Map;V8=class V8 extends Error{}});function P0(Z){return Boolean(Z?.includes(v5))}function v$(Z){return Z?.split(" ").filter(Boolean)??[]}function GQ({codeChallenge:Z,state:$,port:J,isManual:Q,loginWithClaudeAi:X,inferenceOnly:Y,orgUUID:q,loginHint:W,loginMethod:G}){let B=X?O().CLAUDE_AI_AUTHORIZE_URL:O().CONSOLE_AUTHORIZE_URL,R=new URL(B);R.searchParams.append("code","true"),R.searchParams.append("client_id",O().CLIENT_ID),R.searchParams.append("response_type","code"),R.searchParams.append("redirect_uri",Q?O().MANUAL_REDIRECT_URL:`http://localhost:${J}/callback`);let W0=Y?[v5]:G8;if(R.searchParams.append("scope",W0.join(" ")),R.searchParams.append("code_challenge",Z),R.searchParams.append("code_challenge_method","S256"),R.searchParams.append("state",$),q)R.searchParams.append("orgUUID",q);if(W)R.searchParams.append("login_hint",W);if(G)R.searchParams.append("login_method",G);return R.toString()}async function xQ(Z,$,J,Q,X=!1,Y){let q={grant_type:"authorization_code",code:Z,redirect_uri:X?O().MANUAL_REDIRECT_URL:`http://localhost:${Q}/callback`,client_id:O().CLIENT_ID,code_verifier:J,state:$};if(Y!==void 0)q.expires_in=Y;let W=await P.post(O().TOKEN_URL,q,{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 x("tengu_oauth_token_exchange_success",{}),W.data}async function t4(Z,{scopes:$}={}){let J={grant_type:"refresh_token",refresh_token:Z,client_id:O().CLIENT_ID,scope:(($?.length)?$:z8).join(" ")};try{let Q=await P.post(O().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:q=Z,expires_in:W}=X,G=Date.now()+W*1000,B=v$(X.scope);x("tengu_oauth_token_refresh_success",{});let R=L(),W0=w(),E=R.oauthAccount?.billingType!==void 0&&R.oauthAccount?.accountCreatedAt!==void 0&&R.oauthAccount?.subscriptionCreatedAt!==void 0&&W0?.subscriptionType!=null&&W0?.rateLimitTier!=null?null:await I$(Y);if(E&&R.oauthAccount){let r={};if(E.displayName!==void 0)r.displayName=E.displayName;if(typeof E.hasExtraUsageEnabled==="boolean")r.hasExtraUsageEnabled=E.hasExtraUsageEnabled;if(E.billingType!==null)r.billingType=E.billingType;if(E.accountCreatedAt!==void 0)r.accountCreatedAt=E.accountCreatedAt;if(E.subscriptionCreatedAt!==void 0)r.subscriptionCreatedAt=E.subscriptionCreatedAt;if(Object.keys(r).length>0)C((i0)=>({...i0,oauthAccount:i0.oauthAccount?{...i0.oauthAccount,...r}:i0.oauthAccount}))}return{accessToken:Y,refreshToken:q,expiresAt:G,scopes:B,subscriptionType:E?.subscriptionType??W0?.subscriptionType??null,rateLimitTier:E?.rateLimitTier??W0?.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=P.isAxiosError(Q)&&Q.response?.data?JSON.stringify(Q.response.data):void 0;throw x("tengu_oauth_token_refresh_failure",{error:Q.message,...X&&{responseBody:X}}),Q}}async function jQ(Z){let $=await P.get(O().ROLES_URL,{headers:{Authorization:`Bearer ${Z}`}});if($.status!==200)throw Error(`Failed to fetch user roles: ${$.statusText}`);let J=$.data;if(!L().oauthAccount)throw Error("OAuth account information not found in config");C((X)=>({...X,oauthAccount:X.oauthAccount?{...X.oauthAccount,organizationRole:J.organization_role,workspaceRole:J.workspace_role,organizationName:J.organization_name}:X.oauthAccount})),x("tengu_oauth_roles_stored",{org_role:J.organization_role})}async function BQ(Z){try{let $=await P.post(O().API_KEY_URL,null,{headers:{Authorization:`Bearer ${Z}`}}),J=$.data?.raw_key;if(J)return await M5(J),x("tengu_oauth_api_key",{status:"success",statusCode:$.status}),J;return null}catch($){throw x("tengu_oauth_api_key",{status:"failure",error:$ instanceof Error?$.message:String($)}),$}}function m0(Z){if(Z===null)return!1;let $=300000;return Date.now()+$>=Z}async function I$(Z){let $=await R0(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 x("tengu_oauth_profile_fetch_success",{}),{...X,rawProfile:$}}async function RQ(){let $=L().oauthAccount?.organizationUuid;if($)return $;let J=w()?.accessToken;if(J===void 0||!q0())return null;let X=(await R0(J))?.organization?.uuid;if(!X)return null;return X}async function HQ(){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(!L().oauthAccount)W8({accountUuid:Z,emailAddress:$,organizationUuid:J})}await t0();let X=L();if(X.oauthAccount&&X.oauthAccount.billingType!==void 0&&X.oauthAccount.accountCreatedAt!==void 0&&X.oauthAccount.subscriptionCreatedAt!==void 0||!U()||!q0())return!1;let Y=w();if(Y?.accessToken){let q=await R0(Y.accessToken);if(q){if(Q)z("OAuth profile fetch succeeded, overriding env var account info",{level:"info"});return W8({accountUuid:q.account.uuid,emailAddress:q.account.email,organizationUuid:q.organization.uuid,displayName:q.account.display_name||void 0,hasExtraUsageEnabled:q.organization.has_extra_usage_enabled??!1,billingType:q.organization.billing_type??void 0,accountCreatedAt:q.account.created_at,subscriptionCreatedAt:q.organization.subscription_created_at??void 0}),!0}}return!1}function W8({accountUuid:Z,emailAddress:$,organizationUuid:J,displayName:Q,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:q,subscriptionCreatedAt:W}){let G={accountUuid:Z,emailAddress:$,organizationUuid:J,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:q,subscriptionCreatedAt:W};if(Q)G.displayName=Q;C((B)=>{if(B.oauthAccount?.accountUuid===G.accountUuid&&B.oauthAccount?.emailAddress===G.emailAddress&&B.oauthAccount?.organizationUuid===G.organizationUuid&&B.oauthAccount?.displayName===G.displayName&&B.oauthAccount?.hasExtraUsageEnabled===G.hasExtraUsageEnabled&&B.oauthAccount?.billingType===G.billingType&&B.oauthAccount?.accountCreatedAt===G.accountCreatedAt&&B.oauthAccount?.subscriptionCreatedAt===G.subscriptionCreatedAt)return B;return{...B,oauthAccount:G}})}var i4=H(()=>{q2();j2();y0();n();i();Z0();t2()});
|
|
16
|
+
export{w9 as x2,F9 as y2,C4 as z2,I5 as A2,y5 as B2,u$ as C2,p$ as D2,j8 as E2,H8 as F2,m$ as G2,h5 as H2,a0 as I2,o0 as J2,G0 as K2,g2 as L2,n2 as M2,b8 as N2,M0 as O2,V as P2,ZJ as Q2,$J as R2,JJ as S2,QJ as T2,l as U2,j as V2,jJ as W2,Y2 as X2,FJ as Y2,LJ as Z2,o5 as _2,bJ as $2,OJ as a3,Z1 as b3,SJ as c3,R0 as d3,t2 as e3,P0 as f3,v$ as g3,GQ as h3,xQ as i3,t4 as j3,jQ as k3,BQ as l3,m0 as m3,I$ as n3,RQ as o3,HQ as p3,W8 as q3,i4 as r3,fJ as s3,C8 as t3,$1 as u3,z1 as v3,z2 as w3,j1 as x3,dJ as y3,H1 as z3,T as A3,F1 as B3,T0 as C3,K1 as D3,D1 as E3,lJ as F3,sJ as G3,O1 as H3,aJ as I3,oJ as J3,U1 as K3,rJ as L3,eJ as M3,Z3 as N3,e2 as O3,A as P3,I1 as Q3,g8 as R3,F3 as S3,L3 as T3,K3 as U3,y1 as V3,D3 as W3,N3 as X3,u8 as Y3,b3 as Z3,O3 as _3,U3 as $3,P3 as a4,k3 as b4,c8 as c4,E3 as d4,_3 as e4,M3 as f4,S3 as g4,h1 as h4,L0 as i4,t8 as j4,l8 as k4,s8 as l4,Q5 as m4,JZ as n4,h3 as o4,m1 as p4,c1 as q4,QZ as r4,X5 as s4,t1 as t4,i1 as u4,W7 as v4,z7 as w4,Y5 as x4,G7 as y4,GZ as z4,N0 as A4,g0 as B4,J4 as C4,x7 as D4,h0 as E4,Q4 as F4,D as G4,b as H4,xZ as I4,j7 as J4,l1 as K4,f0 as L4,B7 as M4,X4 as N4,Y4 as O4,R7 as P4,I as Q4,H7 as R4,RZ as S4,w7 as T4,F7 as U4,L7 as V4,K7 as W4,F0 as X4,N7 as Y4,q4 as Z4,j4 as _4,UZ as $4,R4 as a5,f7 as b5,g7 as c5,u7 as d5,V0 as e5,a as f5,p7 as g5,IZ as h5,m7 as i5,c7 as j5,V5 as k5,N4 as l5,b4 as m5,V9 as n5,hZ as o5,W9 as p5,z9 as q5,U4 as r5,G9 as s5,_4 as t5,fZ as u5,x9 as v5,M4 as w5,S4 as x5,R5 as y5,A4 as z5,D9 as A5,f4 as B5,g4 as C5,k0 as D5,I0 as E5,X0 as F5,oZ as G5,n0 as H5,o as I5,O5 as J5,P5 as K5,a4 as L5,rZ as M5,o4 as N5,w5 as O5,Z$ as P5,$$ as Q5,r4 as R5,z0 as S5,q$ as T5,E5 as U5,e4 as V5,Z8 as W5,_5 as X5,x$ as Y5,j$ as Z5,B$ as _5,U2 as $5,M5 as a6,H$ as b6,w$ as c6,J8 as d6,w as e6,S5 as f6,J5 as g6,c0 as h6,t0 as i6,U as j6,q0 as k6,K$ as l6,N2 as m6,D$ as n6,N$ as o6,M as p6,H2 as q6,b$ as r6,w2 as s6,O$ as t6,W5 as u6,Q8 as v6,X8 as w6,b2 as x6,q8 as y6,P$ as z6,E$ as A6,_$ as B6,M$ as C6,S$ as D6,n as E6};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Bha as E,Cha as F,Gha as M}from"./cli-0.6.14-e4k2wv6r.mjs";import{Bpa as N,jpa as H}from"./cli-0.6.14-8fwb0rxq.mjs";N();M();function V(z){let C=Buffer.from(z,"base64url").toString("utf-8"),q=F(C);if(!q||typeof q!=="object"||!("version"in q)||q.version!==1)throw Error(`Unsupported work secret version: ${q&&typeof q==="object"&&"version"in q?q.version:"unknown"}`);let A=q;if(typeof A.session_ingress_token!=="string"||A.session_ingress_token.length===0)throw Error("Invalid work secret: missing or empty session_ingress_token");if(typeof A.api_base_url!=="string")throw Error("Invalid work secret: missing api_base_url");return q}function W(z,C){let q=new URL(z).hostname,A=q==="localhost"||q==="127.0.0.1",D=A?"ws":"wss",J=A?"v2":"v1",K=z.replace(/^https?:\/\//,"").replace(/\/+$/,"");return`${D}://${K}/${J}/session_ingress/ws/${C}`}function X(z,C){if(z===C)return!0;let q=z.slice(z.lastIndexOf("_")+1),A=C.slice(C.lastIndexOf("_")+1);return q.length>=4&&q===A}function Y(z,C){return`${z.replace(/\/+$/,"")}/v1/code/sessions/${C}`}async function Z(z,C){let q=await H.post(`${z}/worker/register`,{},{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"},timeout:1e4}),A=q.data?.worker_epoch,D=typeof A==="string"?Number(A):A;if(typeof D!=="number"||!Number.isFinite(D)||!Number.isSafeInteger(D))throw Error(`registerWorker: invalid worker_epoch in response: ${E(q.data)}`);return D}
|
|
2
|
+
export{V as pb,W as qb,X as rb,Y as sb,Z as tb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{RX as Z,RZ as k,mZ as K}from"./cli-0.6.14-01m8v54j.mjs";import{Y1 as J,Z1 as H}from"./cli-0.6.14-4txh6031.mjs";import{f8 as v,g8 as Y}from"./cli-0.6.14-zs6qf39k.mjs";import{Rpa as V,Vpa as X}from"./cli-0.6.14-mjqpmr9h.mjs";function N(M){let b=L.c(5),{status:P,withSpace:D}=M,Q=D===void 0?!1:D,q=A[P],z=!q.color,B=Q&&" ",y;if(b[0]!==q.color||b[1]!==q.icon||b[2]!==z||b[3]!==B)y=J(K,{color:q.color,dimColor:z,children:[q.icon,B]}),b[0]=q.color,b[1]=q.icon,b[2]=z,b[3]=B,b[4]=y;else y=b[4];return y}var L,A;var C=X(()=>{Y();k();H();L=V(Z(),1),A={success:{icon:v.tick,color:"success"},error:{icon:v.cross,color:"error"},warning:{icon:v.warning,color:"warning"},info:{icon:v.info,color:"suggestion"},pending:{icon:v.circle,color:void 0},loading:{icon:"…",color:void 0}}});
|
|
2
|
+
export{N as gh,C as hh};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Jf as EG,Kf as iG,Qf as rG}from"./cli-0.6.14-vdt75vby.mjs";import{BE as KG,CE as mG,JL as $G,KL as oG,Pm as FG,Qm as OG,Rr as uG,SK as LG,TK as BG,Um as VG,VK as pG,XK as WG,YK as qG,bL as a,cn as fG,fL as DG,fM as bG,hL as y,iL as o,iM as sG,jL as lG,lL as kG,mM as f,nM as s,oM as c,pM as v,qL as _G,qM as i,sr as vG,tM as u,vv as l,wv as jG,xM as cG,xv as HG,yv as dG,zL as aG}from"./cli-0.6.14-sfan5yg2.mjs";import{RX as QJ}from"./cli-0.6.14-01m8v54j.mjs";import{X1 as wG,Z1 as PG}from"./cli-0.6.14-4txh6031.mjs";import{_1 as YG}from"./cli-0.6.14-f2qf9rpv.mjs";import{rea as R,saa as zG,sea as _,vea as gG,xaa as CG}from"./cli-0.6.14-zs6qf39k.mjs";import{Hfa as NG}from"./cli-0.6.14-2kj6t828.mjs";import{Vga as A,Yga as MG}from"./cli-0.6.14-106t4q8a.mjs";import{$ha as SG,Gha as yG,Yha as ZG}from"./cli-0.6.14-e4k2wv6r.mjs";import{qia as h,xia as TG}from"./cli-0.6.14-tsj8ceqz.mjs";import{ooa as XG,rka as QG}from"./cli-0.6.14-f8c4q74r.mjs";import{Rpa as r,Vpa as p}from"./cli-0.6.14-mjqpmr9h.mjs";var e=p(()=>{yG();NG()});function GG(Z){let z="plugin"in Z?Z.plugin:"no-plugin";return`${Z.type}:${Z.source}:${z}`}function JG(Z,z){if(z.length===0)return;Z((k)=>{let U=new Set(k.plugins.errors.map((j)=>GG(j))),$=z.filter((j)=>!U.has(GG(j)));if($.length===0)return k;return{...k,plugins:{...k.plugins,errors:[...k.plugins.errors,...$]}}})}function GJ(Z,z,k,U){let $=z==="disabled"?U??[]:U;if($===void 0)return Z;let j=new Map;for(let W of $)if(W.name!==void 0)j.set(W.name,W);let V=[],P=new Set;for(let W of Z){if(!W.name?.startsWith(k)){V.push(W);continue}let w=j.get(W.name);if(w)V.push(w),P.add(W.name)}for(let W of $)if(W.name===void 0||!P.has(W.name))V.push(W);return V}function IG(Z,z=!1){let k=HG(),U=l((G)=>G.authVersion),$=l((G)=>G.mcp.pluginReconnectKey),j=jG(),V=D.useRef(new Map),P=D.useRef(new Set),W=D.useRef(null);D.useEffect(()=>{},[j]);let{addNotification:w}=KG(),RG=16,d=D.useRef([]),N=D.useRef(null),C=D.useCallback(()=>{N.current=null;let G=d.current;if(G.length===0)return;d.current=[],j((Y)=>{let F=Y.mcp;for(let B of G){let{tools:X,commands:H,resources:q,...J}=B,K=J.type==="disabled"||J.type==="failed"?H??[]:H,Q=J.type==="disabled"||J.type==="failed"?q??[]:q,O=zG(J.name),I=F.clients.findIndex((M)=>M.name===J.name)===-1?[...F.clients,J]:F.clients.map((M)=>M.name===J.name?J:M),g=GJ(F.tools,J.type,O,X),x=K===void 0?F.commands:[...$G(F.commands,(M)=>kG(M,J.name)),...K],m=Q===void 0?F.resources:{...F.resources,...Q.length>0?{[J.name]:Q}:EG(F.resources,J.name)};F={...F,clients:I,tools:g,commands:x,resources:m}}return{...Y,mcp:F}})},[j]),b=D.useCallback((G)=>{if(d.current.push(G),N.current===null)N.current=setTimeout(C,RG)},[C]),E=D.useCallback(({client:G,tools:Y,commands:F,resources:B})=>{switch(b({...G,tools:Y,commands:F,resources:B}),G.type){case"connected":{if(bG(G.client,G.name,j),G.client.onclose=()=>{let X=G.config.type??"stdio";if(u(G.name,G.config).catch(()=>{ZG(`Failed to invalidate the server cache: ${G.name}`)}),y(G.name)){_(G.name,"Server is disabled, skipping automatic reconnection");return}if(X!=="stdio"&&X!=="sdk"){let H=JJ(X);_(G.name,`${H} transport closed/disconnected, attempting automatic reconnection`);let q=V.current.get(G.name);if(q)clearTimeout(q),V.current.delete(G.name);(async()=>{for(let K=1;K<=T;K++){if(y(G.name)){_(G.name,"Server disabled during reconnection, stopping retry"),V.current.delete(G.name);return}b({...G,type:"pending",reconnectAttempt:K,maxReconnectAttempts:T});let Q=Date.now();try{let L=await v(G.name,G.config),I=Date.now()-Q;if(L.client.type==="connected"){_(G.name,`${H} reconnection successful after ${I}ms (attempt ${K})`),V.current.delete(G.name),E(L);return}if(_(G.name,`${H} reconnection attempt ${K} completed with status: ${L.client.type}`),K===T){_(G.name,`Max reconnection attempts (${T}) reached, giving up`),V.current.delete(G.name),E(L);return}}catch(L){let I=Date.now()-Q;if(R(G.name,`${H} reconnection attempt ${K} failed after ${I}ms: ${L}`),K===T){_(G.name,`Max reconnection attempts (${T}) reached, giving up`),V.current.delete(G.name),b({...G,type:"failed"});return}}let O=Math.min(tG*Math.pow(2,K-1),eG);_(G.name,`Scheduling reconnection attempt ${K+1} in ${O}ms`),await new Promise((L)=>{let I=setTimeout(L,O);V.current.set(G.name,I)})}})()}else b({...G,type:"failed"})},!1)switch(X.action){case"register":case"skip":}if(G.capabilities?.tools?.listChanged)G.client.setNotificationHandler(VG,async()=>{_(G.name,"Received tools/list_changed notification, refreshing tools");try{let X=f.cache.get(G.name);f.cache.delete(G.name);let H=await f(G),q=H.length;if(X)X.then((J)=>{A("tengu_mcp_list_changed",{type:"tools",previousCount:J.length,newCount:q})},()=>{A("tengu_mcp_list_changed",{type:"tools",newCount:q})});else A("tengu_mcp_list_changed",{type:"tools",newCount:q});b({...G,tools:H})}catch(X){R(G.name,`Failed to refresh tools after list_changed notification: ${h(X)}`)}});if(G.capabilities?.prompts?.listChanged)G.client.setNotificationHandler(OG,async()=>{_(G.name,"Received prompts/list_changed notification, refreshing prompts"),A("tengu_mcp_list_changed",{type:"prompts"});try{c.cache.delete(G.name);let[X,H]=await Promise.all([c(G),Promise.resolve([])]);b({...G,commands:[...X,...H]}),nG?.()}catch(X){R(G.name,`Failed to refresh prompts after list_changed notification: ${h(X)}`)}});if(G.capabilities?.resources?.listChanged)G.client.setNotificationHandler(FG,async()=>{_(G.name,"Received resources/list_changed notification, refreshing resources"),A("tengu_mcp_list_changed",{type:"resources"});try{s.cache.delete(G.name);{let X=await s(G);b({...G,resources:X})}}catch(X){R(G.name,`Failed to refresh resources after list_changed notification: ${h(X)}`)}});break}case"needs-auth":case"failed":case"pending":case"disabled":break}},[b]),t=QG();D.useEffect(()=>{async function G(){let{servers:Y,errors:F}=z?{servers:{},errors:[]}:await a(Z),B={...Y,...Z};JG(j,F),j((X)=>{let{stale:H,...q}=_G(X.mcp,B);for(let Q of H){let O=V.current.get(Q.name);if(O)clearTimeout(O),V.current.delete(Q.name);if(Q.type==="connected")Q.client.onclose=void 0,u(Q.name,Q.config).catch(()=>{})}let J=new Set(q.clients.map((Q)=>Q.name)),K=Object.entries(B).filter(([Q])=>!J.has(Q)).map(([Q,O])=>({name:Q,type:y(Q)?"disabled":"pending",config:O}));if(K.length===0&&H.length===0)return X;return{...X,mcp:{...X.mcp,...q,clients:[...q.clients,...K]}}})}G().catch((Y)=>{R("useManageMCPConnections",`Failed to initialize servers as pending: ${h(Y)}`)})},[z,Z,j,t,$]),D.useEffect(()=>{let G=!1;async function Y(){let F;if(z||DG())F=Promise.resolve({});else BG(),F=LG();let{servers:B,errors:X}=z?{servers:{},errors:[]}:await a(Z,F);if(G)return;JG(j,X);let H={...B,...Z},q=Object.fromEntries(Object.entries(H).filter(([O])=>!y(O)));i(E,q).catch((O)=>{R("useManageMcpConnections",`Failed to get MCP resources: ${h(O)}`)});let J={};if(!z){if(J=qG(await F).allowed,G)return;if(Object.keys(J).length>0){let{servers:O}=WG(J,H);J=O}if(Object.keys(J).length>0){j((L)=>{let I=new Set(L.mcp.clients.map((x)=>x.name)),g=Object.entries(J).filter(([x])=>!I.has(x)).map(([x,m])=>({name:x,type:y(x)?"disabled":"pending",config:m}));if(g.length===0)return L;return{...L,mcp:{...L.mcp,clients:[...L.mcp.clients,...g]}}});let O=Object.fromEntries(Object.entries(J).filter(([L])=>!y(L)));i(E,O).catch((L)=>{R("useManageMcpConnections",`Failed to get claude.ai MCP resources: ${h(L)}`)})}}let K={...H,...J},Q={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0};for(let O of Object.values(K))if(O.scope==="enterprise")Q.enterprise++;else if(O.scope==="user")Q.global++;else if(O.scope==="project")Q.project++;else if(O.scope==="local")Q.user++;else if(O.scope==="dynamic")Q.plugin++;else if(O.scope==="claudeai")Q.claudeai++;A("tengu_mcp_servers",{...Q})}return Y(),()=>{G=!0}},[z,Z,E,j,U,t,$]),D.useEffect(()=>{let G=V.current;return()=>{for(let Y of G.values())clearTimeout(Y);if(G.clear(),N.current!==null)clearTimeout(N.current),N.current=null,C()}},[C]);let AG=D.useCallback(async(G)=>{let Y=k.getState().mcp.clients.find((X)=>X.name===G);if(!Y)throw Error(`MCP server ${G} not found`);let F=V.current.get(G);if(F)clearTimeout(F),V.current.delete(G);let B=await v(G,Y.config);return E(B),B},[k,E]),hG=D.useCallback(async(G)=>{let Y=k.getState().mcp.clients.find((B)=>B.name===G);if(!Y)throw Error(`MCP server ${G} not found`);if(Y.type!=="disabled"){let B=V.current.get(G);if(B)clearTimeout(B),V.current.delete(G);if(o(G,!1),Y.type==="connected")await u(G,Y.config);b({name:G,type:"disabled",config:Y.config})}else{o(G,!0),b({name:G,type:"pending",config:Y.config});let B=await v(G,Y.config);E(B)}},[k,b,E]);return{reconnectMcpServer:AG,toggleMcpServer:hG}}function JJ(Z){switch(Z){case"http":return"HTTP";case"ws":case"ws-ide":return"WebSocket";default:return"SSE"}}var D,nG=null,T=5,tG=1000,eG=30000;var UG=p(()=>{XG();cG();fG();iG();oG();MG();lG();SG();XG();mG();dG();TG();gG();uG();rG();e();pG();sG();CG();aG();vG();D=r(YG(),1)});function aJ(){let Z=S.useContext(n);if(!Z)throw Error("useMcpReconnect must be used within MCPConnectionManager");return Z.reconnectMcpServer}function oJ(){let Z=S.useContext(n);if(!Z)throw Error("useMcpToggleEnabled must be used within MCPConnectionManager");return Z.toggleMcpServer}function sJ(Z){let z=xG.c(6),{children:k,dynamicMcpConfig:U,isStrictMcpConfig:$}=Z,{reconnectMcpServer:j,toggleMcpServer:V}=IG(U,$),P;if(z[0]!==j||z[1]!==V)P={reconnectMcpServer:j,toggleMcpServer:V},z[0]=j,z[1]=V,z[2]=P;else P=z[2];let W=P,w;if(z[3]!==k||z[4]!==W)w=wG(n.Provider,{value:W,children:k}),z[3]=k,z[4]=W,z[5]=w;else w=z[5];return w}var xG,S,n;var XJ=p(()=>{UG();PG();xG=r(QJ(),1),S=r(YG(),1),n=S.createContext(null)});
|
|
2
|
+
export{e as Ef,aJ as Ff,oJ as Gf,sJ as Hf,XJ as If};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{xg as d,yg as Vq}from"./cli-0.6.14-g6dh1cms.mjs";import{CR as l,cS as Oq,wQ as a,yQ as yq}from"./cli-0.6.14-sfan5yg2.mjs";import{GZ as $,RX as Zq,RZ as Gq,kZ as T,mZ as R}from"./cli-0.6.14-01m8v54j.mjs";import{J0 as t,L0 as v,O0 as e}from"./cli-0.6.14-p9g6q20d.mjs";import{X1 as P,Y1 as N,Z1 as S}from"./cli-0.6.14-4txh6031.mjs";import{_1 as Yq}from"./cli-0.6.14-f2qf9rpv.mjs";import{v2 as u,w2 as Aq}from"./cli-0.6.14-67c3dtne.mjs";import{B_ as s,e_ as j,w8 as G,y8 as o}from"./cli-0.6.14-zs6qf39k.mjs";import{fga as w,gga as r}from"./cli-0.6.14-45cmq90s.mjs";import{$ha as n,Yha as L}from"./cli-0.6.14-e4k2wv6r.mjs";import{qia as c,xia as Xq}from"./cli-0.6.14-tsj8ceqz.mjs";import{ooa as i,rka as f}from"./cli-0.6.14-f8c4q74r.mjs";import{Rpa as I,Vpa as h}from"./cli-0.6.14-mjqpmr9h.mjs";import{readdir as qq}from"fs/promises";import{join as zq}from"path";function _(){let H=[process.argv[1]||"",process.execPath||""],q=["/build-ant/","/build-ant-native/","/build-external/","/build-external-native/"];return H.some((z)=>q.some((Q)=>z.includes(Q)))}function Jq(H){let q=_()?"claude-dev":"claude",z=new URL(`${q}://resume`);return z.searchParams.set("session",H),z.searchParams.set("cwd",w()),z.toString()}async function g(){if(_())return!0;let H=process.platform;if(H==="darwin")return j("/Applications/Claude.app");else if(H==="linux"){let{code:q,stdout:z}=await G("xdg-mime",["query","default","x-scheme-handler/claude"]);return q===0&&z.trim().length>0}else if(H==="win32"){let{code:q}=await G("reg",["query","HKEY_CLASSES_ROOT\\claude","/ve"]);return q===0}return!1}async function Qq(){let H=process.platform;if(H==="darwin"){let{code:q,stdout:z}=await G("defaults",["read","/Applications/Claude.app/Contents/Info.plist","CFBundleShortVersionString"]);if(q!==0)return null;let Q=z.trim();return Q.length>0?Q:null}else if(H==="win32"){let q=process.env.LOCALAPPDATA;if(!q)return null;let z=zq(q,"AnthropicClaude");try{let Y=(await qq(z)).filter((W)=>W.startsWith("app-")).map((W)=>W.slice(4)).filter((W)=>K.coerce(W)!==null).sort((W,B)=>{let V=K.coerce(W),y=K.coerce(B);return V.compare(y)});return Y.length>0?Y[Y.length-1]:null}catch{return null}}return null}async function x(){if(!await g())return{status:"not-installed"};let q;try{q=await Qq()}catch{return{status:"ready",version:"unknown"}}if(!q)return{status:"ready",version:"unknown"};let z=K.coerce(q);if(!z||!v(z.version,Hq))return{status:"version-too-old",version:q};return{status:"ready",version:q}}async function Wq(H){let q=process.platform;if(L(`Opening deep link: ${H}`),q==="darwin"){if(_()){let{code:Q}=await G("osascript",["-e",`tell application "Electron" to open location "${H}"`]);return Q===0}let{code:z}=await G("open",[H]);return z===0}else if(q==="linux"){let{code:z}=await G("xdg-open",[H]);return z===0}else if(q==="win32"){let{code:z}=await G("cmd",["/c","start","",H]);return z===0}return!1}async function m(){let H=f();if(!await g())return{success:!1,error:"Claude Desktop is not installed. Install it from https://claude.ai/download"};let z=Jq(H);if(!await Wq(z))return{success:!1,error:"Failed to open Claude Desktop. Please try opening it manually.",deepLinkUrl:z};return{success:!0,deepLinkUrl:z}}var K,Hq="1.1.2396";var k=h(()=>{i();r();n();o();s();e();K=I(t(),1)});function Kq(){switch(process.platform){case"win32":return"https://claude.ai/api/desktop/win32/x64/exe/latest/redirect";default:return"https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect"}}function mq(H){let q=p.c(20),{onDone:z}=H,[Q,Y]=A.useState("checking"),[W,B]=A.useState(null),[V,y]=A.useState(""),O;if(q[0]!==W||q[1]!==z||q[2]!==Q)O=(J)=>{if(Q==="error"){z(W??"Unknown error",{display:"system"});return}if(Q==="prompt-download"){if(J==="y"||J==="Y")u(Kq()).catch(Rq),z(`Starting download. Re-run /desktop once you’ve installed the app.
|
|
2
|
+
Learn more at ${D}`,{display:"system"});else if(J==="n"||J==="N")z(`The desktop app is required for /desktop. Learn more at ${D}`,{display:"system"})}},q[0]=W,q[1]=z,q[2]=Q,q[3]=O;else O=q[3];$(O);let E,F;if(q[4]!==z)E=()=>{(async function(){Y("checking");let X=await x();if(X.status==="not-installed"){y("Claude Desktop is not installed."),Y("prompt-download");return}if(X.status==="version-too-old"){y(`Claude Desktop needs to be updated (found v${X.version}, need v1.1.2396+).`),Y("prompt-download");return}Y("flushing"),await l(),Y("opening");let U=await m();if(!U.success){B(U.error??"Failed to open Claude Desktop"),Y("error");return}Y("success"),setTimeout(Pq,500,z)})().catch((Z)=>{B(c(Z)),Y("error")})},F=[z],q[4]=z,q[5]=E,q[6]=F;else E=q[5],F=q[6];if(A.useEffect(E,F),Q==="error"){let J;if(q[7]!==W)J=N(R,{color:"error",children:["Error: ",W]}),q[7]=W,q[8]=J;else J=q[8];let Z;if(q[9]===Symbol.for("react.memo_cache_sentinel"))Z=P(R,{dimColor:!0,children:"Press any key to continue…"}),q[9]=Z;else Z=q[9];let X;if(q[10]!==J)X=N(T,{flexDirection:"column",paddingX:2,children:[J,Z]}),q[10]=J,q[11]=X;else X=q[11];return X}if(Q==="prompt-download"){let J;if(q[12]!==V)J=P(R,{children:V}),q[12]=V,q[13]=J;else J=q[13];let Z;if(q[14]===Symbol.for("react.memo_cache_sentinel"))Z=P(R,{children:"Download now? (y/n)"}),q[14]=Z;else Z=q[14];let X;if(q[15]!==J)X=N(T,{flexDirection:"column",paddingX:2,children:[J,Z]}),q[15]=J,q[16]=X;else X=q[16];return X}let C;if(q[17]===Symbol.for("react.memo_cache_sentinel"))C={checking:"Checking for Claude Desktop…",flushing:"Saving session…",opening:"Opening Claude Desktop…",success:"Opening in Claude Desktop…"},q[17]=C;else C=q[17];let b=C[Q],M;if(q[18]!==b)M=P(d,{message:b}),q[18]=b,q[19]=M;else M=q[19];return M}async function Pq(H){H("Session transferred to Claude Desktop",{display:"system"}),await a(0,"other")}function Rq(){}var p,A,D="https://clau.de/desktop";var Bq=h(()=>{Gq();Aq();k();Xq();yq();Oq();Vq();S();p=I(Zq(),1),A=I(Yq(),1)});
|
|
3
|
+
export{mq as vg,Bq as wg};
|