@claudiolabs/claudio 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/claudio +50 -1
- package/dist/chunks/AgentTool-0.1.12-kgypyeny.mjs +1 -0
- package/dist/chunks/App-0.1.12-t1g68ag4.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.1.12-zpw36mzg.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.1.12-x3zt5579.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.1.12-fgvj28kh.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.1.12-y1vnt631.mjs +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-0.1.12-n4az8bcp.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.12-j7w4pe1r.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.1.12-57crf0yg.mjs +1 -0
- package/dist/chunks/DiffDialog-0.1.12-tzjdg5ys.mjs +3 -0
- package/dist/chunks/Doctor-0.1.12-52dk0t0z.mjs +1 -0
- package/dist/chunks/Grove-0.1.12-m9r696vw.mjs +1 -0
- package/dist/chunks/ITermBackend-0.1.12-85zqw000.mjs +1 -0
- package/dist/chunks/InProcessTransport-0.1.12-xnrc78z1.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.1.12-9w4z4d73.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.1.12-j1jmd6jg.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.1.12-n5zwn0kh.mjs +1 -0
- package/dist/chunks/Onboarding-0.1.12-tc4trc3y.mjs +1 -0
- package/dist/chunks/ProviderManager-0.1.12-01epdnc3.mjs +1 -0
- package/dist/chunks/REPL-0.1.12-4750qvss.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.1.12-sn3hxnfq.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.1.12-f1byjres.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.1.12-p5spc4b6.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.12-562cbm4h.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.1.12-w2rds1kj.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.1.12-02kj3wef.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.1.12-qesye0kj.mjs +1 -0
- package/dist/chunks/TrustDialog-0.1.12-gr62n6f8.mjs +1 -0
- package/dist/chunks/activeProvider-0.1.12-dnn18th9.mjs +1 -0
- package/dist/chunks/add-dir-0.1.12-he4qjfr7.mjs +1 -0
- package/dist/chunks/agents-0.1.12-1dz073e3.mjs +3 -0
- package/dist/chunks/agents-0.1.12-vfwpnn0d.mjs +111 -0
- package/dist/chunks/api-0.1.12-e314x4g9.mjs +1 -0
- package/dist/chunks/asciicast-0.1.12-nwzfr5gz.mjs +1 -0
- package/dist/chunks/assistant-0.1.12-x4e2qcyw.mjs +1 -0
- package/dist/chunks/auth-0.1.12-9xrz11cs.mjs +1 -0
- package/dist/chunks/auth-0.1.12-vhdwtwhb.mjs +1 -0
- package/dist/chunks/autoMode-0.1.12-xjr5qd6q.mjs +48 -0
- package/dist/chunks/backgroundHousekeeping-0.1.12-z7jhyx9z.mjs +1 -0
- package/dist/chunks/branch-0.1.12-e2jz4k8j.mjs +4 -0
- package/dist/chunks/bridgePointer-0.1.12-vdj4j4ke.mjs +1 -0
- package/dist/chunks/btw-0.1.12-k5gxnrq8.mjs +1 -0
- package/dist/chunks/buddy-0.1.12-4q50s2x4.mjs +3 -0
- package/dist/chunks/cacache-0.1.12-mtaw8981.mjs +1 -0
- package/dist/chunks/cache-probe-0.1.12-4s8cc2km.mjs +21 -0
- package/dist/chunks/cacheStats-0.1.12-qqcw6b5n.mjs +4 -0
- package/dist/chunks/caches-0.1.12-jvzzcs09.mjs +1 -0
- package/dist/chunks/chrome-0.1.12-6qypq8nj.mjs +1 -0
- package/dist/chunks/chromeNativeHost-0.1.12-7e2jv2nr.mjs +2 -0
- package/dist/chunks/claude-for-chrome-mcp-0.1.12-2q97mema.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.1.12-1yrkynq4.mjs +1 -0
- package/dist/chunks/claudemd-0.1.12-dnz21tgs.mjs +1 -0
- package/dist/chunks/clear-0.1.12-cq6vnm92.mjs +1 -0
- package/dist/chunks/clearTerminal-0.1.12-pzt74jz3.mjs +1 -0
- package/dist/chunks/cli-0.1.12-024a8zz7.mjs +2 -0
- package/dist/chunks/cli-0.1.12-04jw23rj.mjs +2 -0
- package/dist/chunks/cli-0.1.12-04v3yab2.mjs +3 -0
- package/dist/chunks/cli-0.1.12-0eznapyf.mjs +2 -0
- package/dist/chunks/cli-0.1.12-0kqx19vz.mjs +2 -0
- package/dist/chunks/cli-0.1.12-0vf5f6qn.mjs +2 -0
- package/dist/chunks/cli-0.1.12-0x3cd401.mjs +2 -0
- package/dist/chunks/cli-0.1.12-0xzdygm2.mjs +50 -0
- package/dist/chunks/cli-0.1.12-19as1myk.mjs +2 -0
- package/dist/chunks/cli-0.1.12-1cn8b1tj.mjs +2 -0
- package/dist/chunks/cli-0.1.12-1hv04bp7.mjs +2 -0
- package/dist/chunks/cli-0.1.12-1x06khjr.mjs +2 -0
- package/dist/chunks/cli-0.1.12-238c85zt.mjs +2 -0
- package/dist/chunks/cli-0.1.12-242der7s.mjs +5036 -0
- package/dist/chunks/cli-0.1.12-2f2v27e3.mjs +2 -0
- package/dist/chunks/cli-0.1.12-2fajd44n.mjs +2 -0
- package/dist/chunks/cli-0.1.12-2sqxe53a.mjs +2 -0
- package/dist/chunks/cli-0.1.12-2v18rdhk.mjs +2 -0
- package/dist/chunks/cli-0.1.12-2yy1nw3s.mjs +2 -0
- package/dist/chunks/cli-0.1.12-2zqgfhrb.mjs +2 -0
- package/dist/chunks/cli-0.1.12-34gqc6yf.mjs +2 -0
- package/dist/chunks/cli-0.1.12-352pjhkh.mjs +2 -0
- package/dist/chunks/cli-0.1.12-37ezy1qg.mjs +2 -0
- package/dist/chunks/cli-0.1.12-37ga9zc2.mjs +2 -0
- package/dist/chunks/cli-0.1.12-3d2xpvk2.mjs +2 -0
- package/dist/chunks/cli-0.1.12-3ywnr2v1.mjs +2 -0
- package/dist/chunks/cli-0.1.12-4gj8p030.mjs +22 -0
- package/dist/chunks/cli-0.1.12-4qedbzt3.mjs +24 -0
- package/dist/chunks/cli-0.1.12-4sh0f4y1.mjs +3 -0
- package/dist/chunks/cli-0.1.12-4syxz3pe.mjs +12 -0
- package/dist/chunks/cli-0.1.12-4tanq0qc.mjs +2 -0
- package/dist/chunks/cli-0.1.12-4wwhk7dc.mjs +2 -0
- package/dist/chunks/cli-0.1.12-4ys47rex.mjs +2 -0
- package/dist/chunks/cli-0.1.12-52dbx2x6.mjs +4 -0
- package/dist/chunks/cli-0.1.12-5b3j1c9c.mjs +2 -0
- package/dist/chunks/cli-0.1.12-5exp787z.mjs +18 -0
- package/dist/chunks/cli-0.1.12-5k9mfnz0.mjs +2 -0
- package/dist/chunks/cli-0.1.12-5p9g1vcm.mjs +2 -0
- package/dist/chunks/cli-0.1.12-5pw10pf8.mjs +2 -0
- package/dist/chunks/cli-0.1.12-5qhkbp8w.mjs +2 -0
- package/dist/chunks/cli-0.1.12-5ye0t0xd.mjs +2 -0
- package/dist/chunks/cli-0.1.12-6238zg7k.mjs +2 -0
- package/dist/chunks/cli-0.1.12-6ddq5n4e.mjs +2 -0
- package/dist/chunks/cli-0.1.12-6e4e36bv.mjs +16 -0
- package/dist/chunks/cli-0.1.12-6rjh20wh.mjs +2 -0
- package/dist/chunks/cli-0.1.12-6x2mnahn.mjs +2 -0
- package/dist/chunks/cli-0.1.12-6zryzryc.mjs +2 -0
- package/dist/chunks/cli-0.1.12-73k5qd97.mjs +13 -0
- package/dist/chunks/cli-0.1.12-74tt2500.mjs +2 -0
- package/dist/chunks/cli-0.1.12-756ngehz.mjs +4 -0
- package/dist/chunks/cli-0.1.12-7da43cy1.mjs +2 -0
- package/dist/chunks/cli-0.1.12-7ehqw1dk.mjs +2 -0
- package/dist/chunks/cli-0.1.12-7mjpbm22.mjs +2 -0
- package/dist/chunks/cli-0.1.12-7v8dtyx8.mjs +2 -0
- package/dist/chunks/cli-0.1.12-7xsa2bcp.mjs +2 -0
- package/dist/chunks/cli-0.1.12-817sd5bc.mjs +6 -0
- package/dist/chunks/cli-0.1.12-830kqdpq.mjs +3 -0
- package/dist/chunks/cli-0.1.12-86nmrm6g.mjs +2 -0
- package/dist/chunks/cli-0.1.12-8qm558mj.mjs +2 -0
- package/dist/chunks/cli-0.1.12-8qvgy8xr.mjs +2 -0
- package/dist/chunks/cli-0.1.12-8tdckdxp.mjs +2 -0
- package/dist/chunks/cli-0.1.12-8znn9f50.mjs +2 -0
- package/dist/chunks/cli-0.1.12-9dvxchv3.mjs +2 -0
- package/dist/chunks/cli-0.1.12-9gs0g8yb.mjs +2 -0
- package/dist/chunks/cli-0.1.12-9pq0gse0.mjs +3 -0
- package/dist/chunks/cli-0.1.12-9v01t95v.mjs +2 -0
- package/dist/chunks/cli-0.1.12-a2frnpdd.mjs +2 -0
- package/dist/chunks/cli-0.1.12-a2qh6gjr.mjs +5 -0
- package/dist/chunks/cli-0.1.12-a5h71tt8.mjs +34 -0
- package/dist/chunks/cli-0.1.12-actnmgw5.mjs +2 -0
- package/dist/chunks/cli-0.1.12-ae3e3ffp.mjs +2 -0
- package/dist/chunks/cli-0.1.12-af1r644n.mjs +2 -0
- package/dist/chunks/cli-0.1.12-awb2yac7.mjs +3 -0
- package/dist/chunks/cli-0.1.12-b01yrner.mjs +2 -0
- package/dist/chunks/cli-0.1.12-baxk5jyy.mjs +4 -0
- package/dist/chunks/cli-0.1.12-bddm1g1s.mjs +59 -0
- package/dist/chunks/cli-0.1.12-bh7jp3zk.mjs +2 -0
- package/dist/chunks/cli-0.1.12-bhxgr018.mjs +4 -0
- package/dist/chunks/cli-0.1.12-bjzb0sjt.mjs +132 -0
- package/dist/chunks/cli-0.1.12-bmtahtv7.mjs +2 -0
- package/dist/chunks/cli-0.1.12-bnn1nrwd.mjs +2 -0
- package/dist/chunks/cli-0.1.12-bnss4rxn.mjs +833 -0
- package/dist/chunks/cli-0.1.12-c23pyffx.mjs +2 -0
- package/dist/chunks/cli-0.1.12-c28bme4j.mjs +2 -0
- package/dist/chunks/cli-0.1.12-c47ape20.mjs +7 -0
- package/dist/chunks/cli-0.1.12-c8d9vr4b.mjs +2 -0
- package/dist/chunks/cli-0.1.12-cxn1ke77.mjs +2 -0
- package/dist/chunks/cli-0.1.12-d0es0fxd.mjs +2 -0
- package/dist/chunks/cli-0.1.12-d8m01qtm.mjs +2 -0
- package/dist/chunks/cli-0.1.12-dc4e6688.mjs +2 -0
- package/dist/chunks/cli-0.1.12-dqynn0at.mjs +2 -0
- package/dist/chunks/cli-0.1.12-ds2mn8zn.mjs +2 -0
- package/dist/chunks/cli-0.1.12-dtba3gm9.mjs +8 -0
- package/dist/chunks/cli-0.1.12-e262snmb.mjs +3 -0
- package/dist/chunks/cli-0.1.12-e4zeaahk.mjs +2 -0
- package/dist/chunks/cli-0.1.12-erggrdth.mjs +9 -0
- package/dist/chunks/cli-0.1.12-f0x1y6nn.mjs +2 -0
- package/dist/chunks/cli-0.1.12-faa9mx3m.mjs +15 -0
- package/dist/chunks/cli-0.1.12-fqpxr3qb.mjs +2 -0
- package/dist/chunks/cli-0.1.12-fx0zg3d9.mjs +2 -0
- package/dist/chunks/cli-0.1.12-g1yp7kdf.mjs +2 -0
- package/dist/chunks/cli-0.1.12-g2s9mjr6.mjs +2 -0
- package/dist/chunks/cli-0.1.12-g3ycbjxk.mjs +2 -0
- package/dist/chunks/cli-0.1.12-g4sdgt8h.mjs +2 -0
- package/dist/chunks/cli-0.1.12-g604mknq.mjs +2 -0
- package/dist/chunks/cli-0.1.12-g728hcdr.mjs +2 -0
- package/dist/chunks/cli-0.1.12-g8mny195.mjs +2 -0
- package/dist/chunks/cli-0.1.12-h0d833vg.mjs +24 -0
- package/dist/chunks/cli-0.1.12-h248m986.mjs +2 -0
- package/dist/chunks/cli-0.1.12-hfmv72b6.mjs +2 -0
- package/dist/chunks/cli-0.1.12-hsw67esw.mjs +2 -0
- package/dist/chunks/cli-0.1.12-j6gjfwh5.mjs +31 -0
- package/dist/chunks/cli-0.1.12-j6hwb68p.mjs +45 -0
- package/dist/chunks/cli-0.1.12-jjza3gz9.mjs +2 -0
- package/dist/chunks/cli-0.1.12-jqrk975g.mjs +15 -0
- package/dist/chunks/cli-0.1.12-k2164g7e.mjs +2 -0
- package/dist/chunks/cli-0.1.12-kea0zcje.mjs +2 -0
- package/dist/chunks/cli-0.1.12-kg8gb6e3.mjs +2 -0
- package/dist/chunks/cli-0.1.12-ktpqrbjc.mjs +2 -0
- package/dist/chunks/cli-0.1.12-kwc7ew38.mjs +2 -0
- package/dist/chunks/cli-0.1.12-kys514qx.mjs +2 -0
- package/dist/chunks/cli-0.1.12-kzd4y6yq.mjs +3 -0
- package/dist/chunks/cli-0.1.12-m3q5r7wd.mjs +2 -0
- package/dist/chunks/cli-0.1.12-m6jeef2z.mjs +6 -0
- package/dist/chunks/cli-0.1.12-mevh0dza.mjs +2 -0
- package/dist/chunks/cli-0.1.12-mr41yjpw.mjs +2 -0
- package/dist/chunks/cli-0.1.12-mwp84gtr.mjs +2 -0
- package/dist/chunks/cli-0.1.12-nfvtmt75.mjs +2 -0
- package/dist/chunks/cli-0.1.12-nnyca8nb.mjs +2 -0
- package/dist/chunks/cli-0.1.12-nv2m8kgk.mjs +2 -0
- package/dist/chunks/cli-0.1.12-p5w2kms9.mjs +4 -0
- package/dist/chunks/cli-0.1.12-pm5cwtxh.mjs +2 -0
- package/dist/chunks/cli-0.1.12-pnh4t8c3.mjs +2 -0
- package/dist/chunks/cli-0.1.12-ps94e9y5.mjs +2 -0
- package/dist/chunks/cli-0.1.12-q1nn9teh.mjs +3 -0
- package/dist/chunks/cli-0.1.12-q63qrz06.mjs +2 -0
- package/dist/chunks/cli-0.1.12-q8k1zvhb.mjs +2 -0
- package/dist/chunks/cli-0.1.12-qf1kw5cr.mjs +2 -0
- package/dist/chunks/cli-0.1.12-qn20n18h.mjs +12 -0
- package/dist/chunks/cli-0.1.12-qrx9nssg.mjs +21 -0
- package/dist/chunks/cli-0.1.12-qsh4sj4y.mjs +2 -0
- package/dist/chunks/cli-0.1.12-r6f9sy54.mjs +2 -0
- package/dist/chunks/cli-0.1.12-ra3sby5b.mjs +2 -0
- package/dist/chunks/cli-0.1.12-rqedb88a.mjs +10 -0
- package/dist/chunks/cli-0.1.12-rtft4mrx.mjs +4 -0
- package/dist/chunks/cli-0.1.12-rwhrpb6w.mjs +2 -0
- package/dist/chunks/cli-0.1.12-rwzav5h1.mjs +11 -0
- package/dist/chunks/cli-0.1.12-ryycx3v6.mjs +2 -0
- package/dist/chunks/cli-0.1.12-rzpc0tr9.mjs +44 -0
- package/dist/chunks/cli-0.1.12-s0cwq66w.mjs +2 -0
- package/dist/chunks/cli-0.1.12-sd72y750.mjs +12 -0
- package/dist/chunks/cli-0.1.12-sgtpyf6y.mjs +11 -0
- package/dist/chunks/cli-0.1.12-strz382t.mjs +2 -0
- package/dist/chunks/cli-0.1.12-sxxpysy8.mjs +2 -0
- package/dist/chunks/cli-0.1.12-t8712dbc.mjs +2 -0
- package/dist/chunks/cli-0.1.12-tadj1p4y.mjs +2 -0
- package/dist/chunks/cli-0.1.12-tae7cd7e.mjs +2 -0
- package/dist/chunks/cli-0.1.12-taqfqnag.mjs +4 -0
- package/dist/chunks/cli-0.1.12-trdq9d6x.mjs +2 -0
- package/dist/chunks/cli-0.1.12-tyt09z73.mjs +2 -0
- package/dist/chunks/cli-0.1.12-v000x470.mjs +2 -0
- package/dist/chunks/cli-0.1.12-v0510w04.mjs +2 -0
- package/dist/chunks/cli-0.1.12-v79j5ced.mjs +2 -0
- package/dist/chunks/cli-0.1.12-v8j9zstg.mjs +2 -0
- package/dist/chunks/cli-0.1.12-vgbc3g9x.mjs +2 -0
- package/dist/chunks/cli-0.1.12-vpnp7x5c.mjs +100 -0
- package/dist/chunks/cli-0.1.12-vwcas8f6.mjs +2 -0
- package/dist/chunks/cli-0.1.12-vxej5jdm.mjs +2 -0
- package/dist/chunks/cli-0.1.12-vzga2are.mjs +192 -0
- package/dist/chunks/cli-0.1.12-w0qbr98a.mjs +2 -0
- package/dist/chunks/cli-0.1.12-wcdh3m4s.mjs +5 -0
- package/dist/chunks/cli-0.1.12-wdmxm11z.mjs +2 -0
- package/dist/chunks/cli-0.1.12-wfbfq2mm.mjs +3 -0
- package/dist/chunks/cli-0.1.12-wwnkrzck.mjs +134 -0
- package/dist/chunks/cli-0.1.12-xanhpra7.mjs +2 -0
- package/dist/chunks/cli-0.1.12-xcxjv6qd.mjs +2 -0
- package/dist/chunks/cli-0.1.12-xekep4qg.mjs +58 -0
- package/dist/chunks/cli-0.1.12-xfqkrd5x.mjs +2 -0
- package/dist/chunks/cli-0.1.12-xj3mv67x.mjs +39 -0
- package/dist/chunks/cli-0.1.12-y04asmqh.mjs +2 -0
- package/dist/chunks/cli-0.1.12-y0fb5j7x.mjs +2 -0
- package/dist/chunks/cli-0.1.12-y9598sy3.mjs +16 -0
- package/dist/chunks/cli-0.1.12-ybm1kvwy.mjs +4 -0
- package/dist/chunks/cli-0.1.12-yk12dgnx.mjs +2 -0
- package/dist/chunks/cli-0.1.12-ytxphavm.mjs +2 -0
- package/dist/chunks/cli-0.1.12-z8eybrhz.mjs +2 -0
- package/dist/chunks/cli-0.1.12-zk49aaxv.mjs +2 -0
- package/dist/chunks/cli-0.1.12-zs5rpqmb.mjs +5 -0
- package/dist/chunks/cli-0.1.12-zwyec6tj.mjs +2 -0
- package/dist/chunks/client-0.1.12-f54egbjx.mjs +1 -0
- package/dist/chunks/color-0.1.12-jss6svg8.mjs +1 -0
- package/dist/chunks/compact-0.1.12-9b9fsqs5.mjs +3 -0
- package/dist/chunks/config-0.1.12-1pyte6wv.mjs +1 -0
- package/dist/chunks/config-0.1.12-ryxz4stj.mjs +1 -0
- package/dist/chunks/context-0.1.12-mnwn2xss.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.1.12-qhe1aprp.mjs +1 -0
- package/dist/chunks/conversation-0.1.12-7pvwtwdn.mjs +1 -0
- package/dist/chunks/copy-0.1.12-w6tabpy0.mjs +9 -0
- package/dist/chunks/cost-0.1.12-3ca0tbv9.mjs +1 -0
- package/dist/chunks/createSession-0.1.12-117q0efg.mjs +1 -0
- package/dist/chunks/desktop-0.1.12-3t2jc3mt.mjs +1 -0
- package/dist/chunks/detectRepository-0.1.12-sd9276rx.mjs +1 -0
- package/dist/chunks/detection-0.1.12-c0tecfvg.mjs +1 -0
- package/dist/chunks/diff-0.1.12-2ck0qzp6.mjs +1 -0
- package/dist/chunks/doctor-0.1.12-rb6t847g.mjs +1 -0
- package/dist/chunks/earlyInput-0.1.12-b94g75cb.mjs +1 -0
- package/dist/chunks/effort-0.1.12-jxkp3wwf.mjs +8 -0
- package/dist/chunks/environmentSelection-0.1.12-z9knjbv1.mjs +1 -0
- package/dist/chunks/environments-0.1.12-m9v7hag6.mjs +1 -0
- package/dist/chunks/exit-0.1.12-0fzdjpbr.mjs +1 -0
- package/dist/chunks/export-0.1.12-s6ag6jke.mjs +2 -0
- package/dist/chunks/extra-usage-0.1.12-x8gd0q32.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.1.12-pfgq5r6b.mjs +1 -0
- package/dist/chunks/fast-0.1.12-9x69m50c.mjs +1 -0
- package/dist/chunks/feedback-0.1.12-d1j49tb4.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.1.12-95kzm3md.mjs +1 -0
- package/dist/chunks/git-0.1.12-7fyh5fhk.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.1.12-6em81h7g.mjs +1 -0
- package/dist/chunks/growthbook-0.1.12-4phnr6b3.mjs +1 -0
- package/dist/chunks/heapdump-0.1.12-m49qs4r7.mjs +6 -0
- package/dist/chunks/help-0.1.12-f02ce11x.mjs +1 -0
- package/dist/chunks/hookChains-0.1.12-brq8x7f7.mjs +3 -0
- package/dist/chunks/hooks-0.1.12-n1f9dp3r.mjs +1 -0
- package/dist/chunks/hooks-0.1.12-swtq74gm.mjs +79 -0
- package/dist/chunks/ide-0.1.12-553mazfs.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.1.12-3mrm0vts.mjs +1 -0
- package/dist/chunks/index-0.1.12-218arkqe.mjs +9 -0
- package/dist/chunks/index-0.1.12-2ykt90tn.mjs +1 -0
- package/dist/chunks/index-0.1.12-34ew4zjx.mjs +1 -0
- package/dist/chunks/index-0.1.12-3nbh75ta.mjs +1 -0
- package/dist/chunks/index-0.1.12-41g5mvtk.mjs +7 -0
- package/dist/chunks/index-0.1.12-77szwkm6.mjs +1 -0
- package/dist/chunks/index-0.1.12-aeeh5zvp.mjs +1 -0
- package/dist/chunks/index-0.1.12-cpv0hf3f.mjs +1 -0
- package/dist/chunks/index-0.1.12-d5w1w05d.mjs +1 -0
- package/dist/chunks/index-0.1.12-d7j83tkh.mjs +1 -0
- package/dist/chunks/index-0.1.12-hvf65cbr.mjs +1 -0
- package/dist/chunks/index-0.1.12-m0e193t8.mjs +1 -0
- package/dist/chunks/index-0.1.12-nc3z95ph.mjs +5 -0
- package/dist/chunks/index-0.1.12-r92p75vh.mjs +1 -0
- package/dist/chunks/index-0.1.12-rhj8dsvk.mjs +30 -0
- package/dist/chunks/index-0.1.12-sxh3dwcy.mjs +1 -0
- package/dist/chunks/index-0.1.12-sy5zw7vk.mjs +1 -0
- package/dist/chunks/index-0.1.12-v53nbtdb.mjs +2 -0
- package/dist/chunks/index-0.1.12-vbv1ac2q.mjs +1 -0
- package/dist/chunks/index-0.1.12-z0brwe1k.mjs +2 -0
- package/dist/chunks/index-0.1.12-zc2ayczg.mjs +1 -0
- package/dist/chunks/index-0.1.12-zqrp5tve.mjs +9 -0
- package/dist/chunks/initReplBridge-0.1.12-yyn8mbyh.mjs +1 -0
- package/dist/chunks/ink-0.1.12-qdefs6hn.mjs +1 -0
- package/dist/chunks/insights-0.1.12-93mz1f1d.mjs +870 -0
- package/dist/chunks/install-0.1.12-11xkk6vf.mjs +1 -0
- package/dist/chunks/install-github-app-0.1.12-qd8g81v4.mjs +149 -0
- package/dist/chunks/install-slack-app-0.1.12-a44xy1pr.mjs +1 -0
- package/dist/chunks/instrumentation-0.1.12-nqv5x6q8.mjs +12 -0
- package/dist/chunks/interactiveHelpers-0.1.12-c4xec7dn.mjs +1 -0
- package/dist/chunks/keybindings-0.1.12-21jbfvfp.mjs +2 -0
- package/dist/chunks/knowledge-0.1.12-1zq0qj6h.mjs +2 -0
- package/dist/chunks/loadAgentsDir-0.1.12-1ckjzc8p.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.1.12-85daax4j.mjs +1 -0
- package/dist/chunks/logout-0.1.12-n2tbfcz8.mjs +1 -0
- package/dist/chunks/lsp-0.1.12-ks84es3y.mjs +1 -0
- package/dist/chunks/main-0.1.12-47ck3kj2.mjs +1 -0
- package/dist/chunks/managedEnv-0.1.12-vt155n3n.mjs +1 -0
- package/dist/chunks/mcp-0.1.12-93a71b1q.mjs +1 -0
- package/dist/chunks/mcp-0.1.12-rwfrrttw.mjs +4 -0
- package/dist/chunks/mcp-0.1.12-vm3tpth6.mjs +17 -0
- package/dist/chunks/mcpServer-0.1.12-zwsas6ss.mjs +1 -0
- package/dist/chunks/mcpb-0.1.12-mcbd7ywh.mjs +1 -0
- package/dist/chunks/memory-0.1.12-7x2msczw.mjs +3 -0
- package/dist/chunks/mobile-0.1.12-qdtxwz76.mjs +2 -0
- package/dist/chunks/model-0.1.12-15e9c8j0.mjs +2 -0
- package/dist/chunks/model-0.1.12-z2qjscwh.mjs +1 -0
- package/dist/chunks/oauth-0.1.12-3aky0v8n.mjs +1 -0
- package/dist/chunks/openaiShim-0.1.12-p458t1q6.mjs +14 -0
- package/dist/chunks/output-style-0.1.12-cahkbh9x.mjs +1 -0
- package/dist/chunks/package-HMBVQOZ4-0.1.12-3njzvqd2.mjs +1 -0
- package/dist/chunks/parser-0.1.12-jz2xz2kd.mjs +1 -0
- package/dist/chunks/passes-0.1.12-7vmawmvq.mjs +1 -0
- package/dist/chunks/permissions-0.1.12-dmp58kwy.mjs +3 -0
- package/dist/chunks/plan-0.1.12-waed49m8.mjs +1 -0
- package/dist/chunks/plist-0.1.12-65r770yt.mjs +1 -0
- package/dist/chunks/plugin-0.1.12-j30rqvv5.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.1.12-5bp08b06.mjs +1 -0
- package/dist/chunks/plugins-0.1.12-sm87b8fm.mjs +9 -0
- package/dist/chunks/print-0.1.12-8mgqmx4k.mjs +57 -0
- package/dist/chunks/privacy-settings-0.1.12-9drzsgkz.mjs +1 -0
- package/dist/chunks/process-0.1.12-t401v84c.mjs +1 -0
- package/dist/chunks/processBashCommand-0.1.12-3s8a2x65.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.1.12-m9sh3sjt.mjs +9 -0
- package/dist/chunks/prompt-0.1.12-786vk11a.mjs +1 -0
- package/dist/chunks/prompt-0.1.12-fg4npvax.mjs +1 -0
- package/dist/chunks/prompts-0.1.12-h3xd9wvy.mjs +1 -0
- package/dist/chunks/provider-0.1.12-wrfpbx8a.mjs +2 -0
- package/dist/chunks/providerProfiles-0.1.12-3fp9n85w.mjs +1 -0
- package/dist/chunks/rate-limit-options-0.1.12-dx2886b6.mjs +1 -0
- package/dist/chunks/registry-0.1.12-btwd6z61.mjs +1 -0
- package/dist/chunks/release-notes-0.1.12-dwzs8z2c.mjs +5 -0
- package/dist/chunks/reload-plugins-0.1.12-ec88j31s.mjs +2 -0
- package/dist/chunks/remote-env-0.1.12-w15618dm.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.1.12-c0y46zw8.mjs +1 -0
- package/dist/chunks/remoteSession-0.1.12-npxn0mje.mjs +1 -0
- package/dist/chunks/rename-0.1.12-sbes9wm3.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.1.12-2jqj7bby.mjs +1 -0
- package/dist/chunks/resume-0.1.12-9vpmw2hg.mjs +2 -0
- package/dist/chunks/rewind-0.1.12-707se5pz.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.1.12-htfmfp9m.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.1.12-qq2yf1ta.mjs +1 -0
- package/dist/chunks/session-0.1.12-2xgt0x74.mjs +2 -0
- package/dist/chunks/sessionFileAccessHooks-0.1.12-xpxt6bqs.mjs +1 -0
- package/dist/chunks/sessionStorage-0.1.12-7s6eezdt.mjs +1 -0
- package/dist/chunks/setup-0.1.12-2kjx6mnf.mjs +5 -0
- package/dist/chunks/sinks-0.1.12-qvx26vtt.mjs +1 -0
- package/dist/chunks/skills-0.1.12-sh637gsv.mjs +1 -0
- package/dist/chunks/startupProfiler-0.1.12-n3fce9wg.mjs +1 -0
- package/dist/chunks/state-0.1.12-e374v6h8.mjs +1 -0
- package/dist/chunks/stats-0.1.12-5pj1c6sr.mjs +6 -0
- package/dist/chunks/status-0.1.12-qphx08h4.mjs +1 -0
- package/dist/chunks/stickers-0.1.12-dksexsqf.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.1.12-sbpfvs29.mjs +1 -0
- package/dist/chunks/tasks-0.1.12-268nn2c6.mjs +1 -0
- package/dist/chunks/teamHelpers-0.1.12-3trvxmmz.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.1.12-28s4rsx4.mjs +1 -0
- package/dist/chunks/teleport-0.1.12-zz9z0w99.mjs +1 -0
- package/dist/chunks/terminalSetup-0.1.12-xf61sxh6.mjs +1 -0
- package/dist/chunks/theme-0.1.12-3rgm5yr1.mjs +1 -0
- package/dist/chunks/thinkback-0.1.12-sf0y9d2d.mjs +1 -0
- package/dist/chunks/thinkback-play-0.1.12-vyyv42tm.mjs +1 -0
- package/dist/chunks/toolPool-0.1.12-tyqns5jv.mjs +1 -0
- package/dist/chunks/toolSearch-0.1.12-k91edc7b.mjs +1 -0
- package/dist/chunks/trustedDevice-0.1.12-w1scr51x.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.1.12-9525v010.mjs +69 -0
- package/dist/chunks/ultrareviewCommand-0.1.12-d5c4096k.mjs +4 -0
- package/dist/chunks/update-0.1.12-hwx0e6fq.mjs +94 -0
- package/dist/chunks/upgrade-0.1.12-zhqgygsd.mjs +1 -0
- package/dist/chunks/upstreamproxy-0.1.12-yhnqfcyb.mjs +14 -0
- package/dist/chunks/usage-0.1.12-g40wd0mq.mjs +1 -0
- package/dist/chunks/util-0.1.12-qdejkkj5.mjs +1 -0
- package/dist/chunks/utils-0.1.12-3f08ztd2.mjs +1 -0
- package/dist/chunks/vim-0.1.12-z78k9k65.mjs +1 -0
- package/dist/chunks/watcher-0.1.12-pkwq5a2d.mjs +1 -0
- package/dist/chunks/wiki-0.1.12-vecp82xq.mjs +132 -0
- package/dist/chunks/worktree-0.1.12-a1mh6hjt.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.1.12-amrewbka.mjs +1 -0
- package/dist/chunks/wrapper-0.1.12-bpewypaz.mjs +7 -0
- package/dist/claudio-vscode.vsix +0 -0
- package/dist/cli.mjs +3 -3
- package/package.json +4 -1
- package/dist/chunks/AgentTool-0.1.10-6d1adwh4.mjs +0 -1
- package/dist/chunks/App-0.1.10-kcqgpy9v.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.1.10-276swzgm.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-0.1.10-zy1wpm5p.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.10-wm40g3s8.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.1.10-s6979mex.mjs +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-0.1.10-r7fr5krr.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.10-r34sxess.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.1.10-fkrt161g.mjs +0 -1
- package/dist/chunks/DiffDialog-0.1.10-z3c417rj.mjs +0 -3
- package/dist/chunks/Doctor-0.1.10-hzxpkma0.mjs +0 -1
- package/dist/chunks/Grove-0.1.10-k7t0bk1q.mjs +0 -1
- package/dist/chunks/ITermBackend-0.1.10-9nmcsqzc.mjs +0 -1
- package/dist/chunks/InProcessTransport-0.1.10-wpgrvt4k.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.1.10-1yxptsrm.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.1.10-2dx3wzpc.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.1.10-52vcfe6j.mjs +0 -1
- package/dist/chunks/Onboarding-0.1.10-sshvgxhv.mjs +0 -1
- package/dist/chunks/ProviderManager-0.1.10-gk479qf3.mjs +0 -1
- package/dist/chunks/REPL-0.1.10-pzwdjhkc.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.1.10-h4qtmeht.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-0.1.10-7pnzpe15.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.1.10-pna8cvtz.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.10-qgt41j05.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.1.10-yhws2rqe.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.1.10-235npnf1.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.1.10-9dwz8tfs.mjs +0 -1
- package/dist/chunks/TrustDialog-0.1.10-j46d8gme.mjs +0 -1
- package/dist/chunks/activeProvider-0.1.10-mc05hsn1.mjs +0 -1
- package/dist/chunks/add-dir-0.1.10-67yt41qd.mjs +0 -1
- package/dist/chunks/agents-0.1.10-c6k1gjp7.mjs +0 -3
- package/dist/chunks/agents-0.1.10-ezzxfn1m.mjs +0 -111
- package/dist/chunks/api-0.1.10-712k136n.mjs +0 -1
- package/dist/chunks/asciicast-0.1.10-p5232pbe.mjs +0 -1
- package/dist/chunks/assistant-0.1.10-ghtz2fm5.mjs +0 -1
- package/dist/chunks/auth-0.1.10-ec2e3mg3.mjs +0 -1
- package/dist/chunks/auth-0.1.10-pnnxbpmz.mjs +0 -1
- package/dist/chunks/autoMode-0.1.10-en4g4zp3.mjs +0 -48
- package/dist/chunks/backgroundHousekeeping-0.1.10-w42bm2y9.mjs +0 -1
- package/dist/chunks/branch-0.1.10-z00acm0q.mjs +0 -4
- package/dist/chunks/bridgePointer-0.1.10-0fpe1aqp.mjs +0 -1
- package/dist/chunks/btw-0.1.10-zz9v05r2.mjs +0 -1
- package/dist/chunks/buddy-0.1.10-g62mmn7n.mjs +0 -3
- package/dist/chunks/cacache-0.1.10-jdqat7je.mjs +0 -1
- package/dist/chunks/cache-probe-0.1.10-m5je5wda.mjs +0 -21
- package/dist/chunks/cacheStats-0.1.10-h3wmx4ck.mjs +0 -4
- package/dist/chunks/caches-0.1.10-gfv0fw3r.mjs +0 -1
- package/dist/chunks/chrome-0.1.10-vn58ms2z.mjs +0 -1
- package/dist/chunks/chromeNativeHost-0.1.10-1546eayv.mjs +0 -2
- package/dist/chunks/claude-for-chrome-mcp-0.1.10-4pjczkdy.mjs +0 -1
- package/dist/chunks/claudeDesktop-0.1.10-gxr4sfek.mjs +0 -1
- package/dist/chunks/claudemd-0.1.10-fxjaqw0j.mjs +0 -1
- package/dist/chunks/clear-0.1.10-7a42j19v.mjs +0 -1
- package/dist/chunks/clearTerminal-0.1.10-vb1ec5bk.mjs +0 -1
- package/dist/chunks/cli-0.1.10-0n4bjm9z.mjs +0 -3
- package/dist/chunks/cli-0.1.10-0zwk2w6t.mjs +0 -3
- package/dist/chunks/cli-0.1.10-17f08ra3.mjs +0 -2
- package/dist/chunks/cli-0.1.10-19jdke0x.mjs +0 -2
- package/dist/chunks/cli-0.1.10-1faf50d6.mjs +0 -2
- package/dist/chunks/cli-0.1.10-1remt68x.mjs +0 -2
- package/dist/chunks/cli-0.1.10-1zgq248j.mjs +0 -2
- package/dist/chunks/cli-0.1.10-227xyew7.mjs +0 -2
- package/dist/chunks/cli-0.1.10-283zk2ee.mjs +0 -2
- package/dist/chunks/cli-0.1.10-28zx3btb.mjs +0 -14
- package/dist/chunks/cli-0.1.10-2a49sq4g.mjs +0 -2
- package/dist/chunks/cli-0.1.10-2ahvbvra.mjs +0 -2
- package/dist/chunks/cli-0.1.10-2gmmnep8.mjs +0 -2
- package/dist/chunks/cli-0.1.10-2k83cndj.mjs +0 -2
- package/dist/chunks/cli-0.1.10-2mqddc7q.mjs +0 -31
- package/dist/chunks/cli-0.1.10-2tygs780.mjs +0 -2
- package/dist/chunks/cli-0.1.10-3chjvgrj.mjs +0 -2
- package/dist/chunks/cli-0.1.10-3d0w3dmn.mjs +0 -12
- package/dist/chunks/cli-0.1.10-3q43p3wr.mjs +0 -11
- package/dist/chunks/cli-0.1.10-3s7cftaq.mjs +0 -39
- package/dist/chunks/cli-0.1.10-3zkqq9sp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-4a42q38j.mjs +0 -2
- package/dist/chunks/cli-0.1.10-4c5p0gjr.mjs +0 -3
- package/dist/chunks/cli-0.1.10-4jsc4zm5.mjs +0 -2
- package/dist/chunks/cli-0.1.10-4md6sg2a.mjs +0 -2
- package/dist/chunks/cli-0.1.10-4n8p34vn.mjs +0 -2
- package/dist/chunks/cli-0.1.10-4n8rvtk0.mjs +0 -2
- package/dist/chunks/cli-0.1.10-4nrdrp9t.mjs +0 -21
- package/dist/chunks/cli-0.1.10-4q7m47pn.mjs +0 -3
- package/dist/chunks/cli-0.1.10-4vnky3f9.mjs +0 -3
- package/dist/chunks/cli-0.1.10-594z8zdp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-5jnkne9q.mjs +0 -2
- package/dist/chunks/cli-0.1.10-5kg4wpz2.mjs +0 -2
- package/dist/chunks/cli-0.1.10-5tyyhz34.mjs +0 -833
- package/dist/chunks/cli-0.1.10-63qeecn7.mjs +0 -24
- package/dist/chunks/cli-0.1.10-6bn5q3gp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-6f66h3s0.mjs +0 -2
- package/dist/chunks/cli-0.1.10-6g6ga1zd.mjs +0 -2
- package/dist/chunks/cli-0.1.10-6p8tttyp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-6wf59qza.mjs +0 -58
- package/dist/chunks/cli-0.1.10-72ece2yk.mjs +0 -2
- package/dist/chunks/cli-0.1.10-73y7xdxy.mjs +0 -2
- package/dist/chunks/cli-0.1.10-7691mckr.mjs +0 -2
- package/dist/chunks/cli-0.1.10-77zcax57.mjs +0 -2
- package/dist/chunks/cli-0.1.10-7d7j1qyf.mjs +0 -2
- package/dist/chunks/cli-0.1.10-7ngfsh9h.mjs +0 -4
- package/dist/chunks/cli-0.1.10-7v1vvde4.mjs +0 -8
- package/dist/chunks/cli-0.1.10-7ydarbm4.mjs +0 -2
- package/dist/chunks/cli-0.1.10-8dyffagh.mjs +0 -2
- package/dist/chunks/cli-0.1.10-91tna7ay.mjs +0 -2
- package/dist/chunks/cli-0.1.10-977j0ey2.mjs +0 -2
- package/dist/chunks/cli-0.1.10-97rwbawt.mjs +0 -2
- package/dist/chunks/cli-0.1.10-9dfywk37.mjs +0 -2
- package/dist/chunks/cli-0.1.10-9rh1hjrr.mjs +0 -16
- package/dist/chunks/cli-0.1.10-9ybfn3a4.mjs +0 -50
- package/dist/chunks/cli-0.1.10-9zjhrr6j.mjs +0 -2
- package/dist/chunks/cli-0.1.10-a4p945wp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-a53q2hat.mjs +0 -2
- package/dist/chunks/cli-0.1.10-a6j6www8.mjs +0 -10
- package/dist/chunks/cli-0.1.10-acy8ec7t.mjs +0 -2
- package/dist/chunks/cli-0.1.10-akaq0zte.mjs +0 -2
- package/dist/chunks/cli-0.1.10-aw4xkrf7.mjs +0 -2
- package/dist/chunks/cli-0.1.10-b59j6twr.mjs +0 -2
- package/dist/chunks/cli-0.1.10-be8dvtg8.mjs +0 -2
- package/dist/chunks/cli-0.1.10-bfw7yx17.mjs +0 -2
- package/dist/chunks/cli-0.1.10-bgxwxmv1.mjs +0 -2
- package/dist/chunks/cli-0.1.10-bqsa7eam.mjs +0 -2
- package/dist/chunks/cli-0.1.10-brfs5rdm.mjs +0 -4
- package/dist/chunks/cli-0.1.10-bw6411be.mjs +0 -3
- package/dist/chunks/cli-0.1.10-bxbkeycj.mjs +0 -4
- package/dist/chunks/cli-0.1.10-c7bkm855.mjs +0 -4
- package/dist/chunks/cli-0.1.10-cd9k16mb.mjs +0 -2
- package/dist/chunks/cli-0.1.10-ckb6d1wg.mjs +0 -5
- package/dist/chunks/cli-0.1.10-cp1bprrv.mjs +0 -2
- package/dist/chunks/cli-0.1.10-crwvcrfq.mjs +0 -2
- package/dist/chunks/cli-0.1.10-d48qgcag.mjs +0 -2
- package/dist/chunks/cli-0.1.10-d70y9y7x.mjs +0 -2
- package/dist/chunks/cli-0.1.10-dh7by4rw.mjs +0 -2
- package/dist/chunks/cli-0.1.10-dx1a4dz7.mjs +0 -2
- package/dist/chunks/cli-0.1.10-dx92txwb.mjs +0 -13
- package/dist/chunks/cli-0.1.10-e0ftjytk.mjs +0 -2
- package/dist/chunks/cli-0.1.10-e4qewc1p.mjs +0 -44
- package/dist/chunks/cli-0.1.10-e64kvn2p.mjs +0 -2
- package/dist/chunks/cli-0.1.10-eh248dzz.mjs +0 -15
- package/dist/chunks/cli-0.1.10-ejtn8grm.mjs +0 -2
- package/dist/chunks/cli-0.1.10-er8zk2kj.mjs +0 -2
- package/dist/chunks/cli-0.1.10-f1nw74m1.mjs +0 -2
- package/dist/chunks/cli-0.1.10-f2jh6yv0.mjs +0 -2
- package/dist/chunks/cli-0.1.10-f38gq0e0.mjs +0 -2
- package/dist/chunks/cli-0.1.10-f7wg8ttz.mjs +0 -2
- package/dist/chunks/cli-0.1.10-fay16q4v.mjs +0 -2
- package/dist/chunks/cli-0.1.10-fcarec7s.mjs +0 -2
- package/dist/chunks/cli-0.1.10-fh4zzwzq.mjs +0 -5
- package/dist/chunks/cli-0.1.10-fhvyzg2m.mjs +0 -2
- package/dist/chunks/cli-0.1.10-frs4kmth.mjs +0 -2
- package/dist/chunks/cli-0.1.10-g6rx9rdb.mjs +0 -132
- package/dist/chunks/cli-0.1.10-gccb3gw8.mjs +0 -4
- package/dist/chunks/cli-0.1.10-gdqbhzyr.mjs +0 -100
- package/dist/chunks/cli-0.1.10-gms4557v.mjs +0 -252
- package/dist/chunks/cli-0.1.10-gnds07ck.mjs +0 -2
- package/dist/chunks/cli-0.1.10-h7dsgrnw.mjs +0 -2
- package/dist/chunks/cli-0.1.10-h7egg5xp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-hbk3dhq8.mjs +0 -24
- package/dist/chunks/cli-0.1.10-hpa8eyg4.mjs +0 -2
- package/dist/chunks/cli-0.1.10-hpg8gdm2.mjs +0 -2
- package/dist/chunks/cli-0.1.10-hrjh10v7.mjs +0 -2
- package/dist/chunks/cli-0.1.10-hwk5cfdc.mjs +0 -2
- package/dist/chunks/cli-0.1.10-hyxg32sc.mjs +0 -2
- package/dist/chunks/cli-0.1.10-jb7jbbms.mjs +0 -2
- package/dist/chunks/cli-0.1.10-jjdvb4je.mjs +0 -2
- package/dist/chunks/cli-0.1.10-js33z9dt.mjs +0 -2
- package/dist/chunks/cli-0.1.10-jy0nmcmp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-jy7ds572.mjs +0 -2
- package/dist/chunks/cli-0.1.10-kdqsv63d.mjs +0 -3
- package/dist/chunks/cli-0.1.10-knbxee8j.mjs +0 -2
- package/dist/chunks/cli-0.1.10-kp2t4r8z.mjs +0 -2
- package/dist/chunks/cli-0.1.10-me1f9fvm.mjs +0 -2
- package/dist/chunks/cli-0.1.10-mjy2g3ce.mjs +0 -7
- package/dist/chunks/cli-0.1.10-mqgz2v10.mjs +0 -2
- package/dist/chunks/cli-0.1.10-mt4jf92z.mjs +0 -2
- package/dist/chunks/cli-0.1.10-mt6tj76h.mjs +0 -192
- package/dist/chunks/cli-0.1.10-mv1psn5z.mjs +0 -15
- package/dist/chunks/cli-0.1.10-n0kq1anb.mjs +0 -22
- package/dist/chunks/cli-0.1.10-nfnje7ew.mjs +0 -34
- package/dist/chunks/cli-0.1.10-nh3yfpyp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-npkfteg7.mjs +0 -2
- package/dist/chunks/cli-0.1.10-nzvv74kz.mjs +0 -2
- package/dist/chunks/cli-0.1.10-nzxw7p2m.mjs +0 -4
- package/dist/chunks/cli-0.1.10-p42gvsdg.mjs +0 -2
- package/dist/chunks/cli-0.1.10-p4a151rw.mjs +0 -2
- package/dist/chunks/cli-0.1.10-p5wpvhbv.mjs +0 -2
- package/dist/chunks/cli-0.1.10-pagxn9ep.mjs +0 -2
- package/dist/chunks/cli-0.1.10-pw67rrjr.mjs +0 -2
- package/dist/chunks/cli-0.1.10-qez6cjt8.mjs +0 -2
- package/dist/chunks/cli-0.1.10-qf6ps98q.mjs +0 -2
- package/dist/chunks/cli-0.1.10-qhh8pa5t.mjs +0 -2
- package/dist/chunks/cli-0.1.10-qkv7g58s.mjs +0 -2
- package/dist/chunks/cli-0.1.10-qtq4gx83.mjs +0 -3
- package/dist/chunks/cli-0.1.10-qw2c8g14.mjs +0 -2
- package/dist/chunks/cli-0.1.10-qw7kdg27.mjs +0 -2
- package/dist/chunks/cli-0.1.10-rgtrj3k8.mjs +0 -2
- package/dist/chunks/cli-0.1.10-rjz4ymc4.mjs +0 -2
- package/dist/chunks/cli-0.1.10-rnwbgj0h.mjs +0 -134
- package/dist/chunks/cli-0.1.10-rpyv9ekb.mjs +0 -45
- package/dist/chunks/cli-0.1.10-rr3xpxx1.mjs +0 -2
- package/dist/chunks/cli-0.1.10-rvb440sp.mjs +0 -2
- package/dist/chunks/cli-0.1.10-s3x3vzah.mjs +0 -2
- package/dist/chunks/cli-0.1.10-s4x77tm0.mjs +0 -2
- package/dist/chunks/cli-0.1.10-s6jxst02.mjs +0 -2
- package/dist/chunks/cli-0.1.10-s7s5bgrq.mjs +0 -11
- package/dist/chunks/cli-0.1.10-s7zk0vc8.mjs +0 -18
- package/dist/chunks/cli-0.1.10-sab6x266.mjs +0 -2
- package/dist/chunks/cli-0.1.10-seekz53q.mjs +0 -2
- package/dist/chunks/cli-0.1.10-sre7cbsg.mjs +0 -2
- package/dist/chunks/cli-0.1.10-szz5tkt1.mjs +0 -4
- package/dist/chunks/cli-0.1.10-t0v9d184.mjs +0 -2
- package/dist/chunks/cli-0.1.10-t1zd86kd.mjs +0 -2
- package/dist/chunks/cli-0.1.10-t8rnwwhq.mjs +0 -2
- package/dist/chunks/cli-0.1.10-ta048zme.mjs +0 -3
- package/dist/chunks/cli-0.1.10-v0vhyf3h.mjs +0 -4
- package/dist/chunks/cli-0.1.10-v385rk98.mjs +0 -2
- package/dist/chunks/cli-0.1.10-v582vfad.mjs +0 -2
- package/dist/chunks/cli-0.1.10-v6gq9bxc.mjs +0 -7
- package/dist/chunks/cli-0.1.10-vrd90nhd.mjs +0 -16
- package/dist/chunks/cli-0.1.10-w1hqcxj1.mjs +0 -2
- package/dist/chunks/cli-0.1.10-w8np72sh.mjs +0 -2
- package/dist/chunks/cli-0.1.10-wajz23ff.mjs +0 -2
- package/dist/chunks/cli-0.1.10-wjmtd9vm.mjs +0 -6
- package/dist/chunks/cli-0.1.10-wm8pd1jq.mjs +0 -2
- package/dist/chunks/cli-0.1.10-wvhzawgv.mjs +0 -12
- package/dist/chunks/cli-0.1.10-x1qs5ctr.mjs +0 -2
- package/dist/chunks/cli-0.1.10-x2eaxa4s.mjs +0 -2
- package/dist/chunks/cli-0.1.10-xjpjs3y5.mjs +0 -2
- package/dist/chunks/cli-0.1.10-xzz1tdne.mjs +0 -2
- package/dist/chunks/cli-0.1.10-y17z0pes.mjs +0 -2
- package/dist/chunks/cli-0.1.10-y1bkenem.mjs +0 -2
- package/dist/chunks/cli-0.1.10-y2byece1.mjs +0 -12
- package/dist/chunks/cli-0.1.10-y3q22zvb.mjs +0 -2
- package/dist/chunks/cli-0.1.10-y6a8q1t3.mjs +0 -9
- package/dist/chunks/cli-0.1.10-y9mkzh11.mjs +0 -5036
- package/dist/chunks/cli-0.1.10-yq3dy7w2.mjs +0 -2
- package/dist/chunks/cli-0.1.10-yset0578.mjs +0 -2
- package/dist/chunks/cli-0.1.10-z20mk55m.mjs +0 -5
- package/dist/chunks/cli-0.1.10-z3f97n2d.mjs +0 -6
- package/dist/chunks/cli-0.1.10-z4a84y0c.mjs +0 -2
- package/dist/chunks/cli-0.1.10-z7ghb8z7.mjs +0 -2
- package/dist/chunks/cli-0.1.10-zeqsd250.mjs +0 -2
- package/dist/chunks/cli-0.1.10-zxcxqxwv.mjs +0 -2
- package/dist/chunks/cli-0.1.10-zxgw1kqq.mjs +0 -2
- package/dist/chunks/client-0.1.10-btm7zd17.mjs +0 -1
- package/dist/chunks/color-0.1.10-h3wdkq18.mjs +0 -1
- package/dist/chunks/compact-0.1.10-3vz0z7cj.mjs +0 -3
- package/dist/chunks/config-0.1.10-37452dtw.mjs +0 -1
- package/dist/chunks/config-0.1.10-apkj5t0e.mjs +0 -1
- package/dist/chunks/context-0.1.10-z4vfp64w.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.1.10-xmmn39z5.mjs +0 -1
- package/dist/chunks/conversation-0.1.10-p82mc6k7.mjs +0 -1
- package/dist/chunks/copy-0.1.10-y1c1gb1w.mjs +0 -9
- package/dist/chunks/cost-0.1.10-d5wpnm54.mjs +0 -1
- package/dist/chunks/createSession-0.1.10-7bq5e7c3.mjs +0 -1
- package/dist/chunks/desktop-0.1.10-3f54fc1k.mjs +0 -1
- package/dist/chunks/detectRepository-0.1.10-1kyc0kvc.mjs +0 -1
- package/dist/chunks/detection-0.1.10-0h6d9cqt.mjs +0 -1
- package/dist/chunks/devtools-0.1.10-93f39njd.mjs +0 -1
- package/dist/chunks/diff-0.1.10-j17ke0k6.mjs +0 -1
- package/dist/chunks/doctor-0.1.10-wcq13152.mjs +0 -1
- package/dist/chunks/earlyInput-0.1.10-k1phbjt5.mjs +0 -1
- package/dist/chunks/effort-0.1.10-kanyae0a.mjs +0 -8
- package/dist/chunks/environmentSelection-0.1.10-ydckkyqx.mjs +0 -1
- package/dist/chunks/environments-0.1.10-7dht1svt.mjs +0 -1
- package/dist/chunks/exit-0.1.10-q7af8rb6.mjs +0 -1
- package/dist/chunks/export-0.1.10-tgsj9sg2.mjs +0 -2
- package/dist/chunks/extra-usage-0.1.10-qccdgzpk.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.1.10-5rpbnmgs.mjs +0 -1
- package/dist/chunks/fast-0.1.10-eq1jgfqk.mjs +0 -1
- package/dist/chunks/feedback-0.1.10-yvpgv2wy.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-0.1.10-1q5vbtwp.mjs +0 -1
- package/dist/chunks/git-0.1.10-ngvcytb0.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.1.10-w5g5cqhg.mjs +0 -1
- package/dist/chunks/growthbook-0.1.10-zkm4sham.mjs +0 -1
- package/dist/chunks/heapdump-0.1.10-29gq2jvb.mjs +0 -6
- package/dist/chunks/help-0.1.10-yj8ra443.mjs +0 -1
- package/dist/chunks/hookChains-0.1.10-32qn4nw8.mjs +0 -3
- package/dist/chunks/hooks-0.1.10-epp78p44.mjs +0 -79
- package/dist/chunks/hooks-0.1.10-fjrmscrk.mjs +0 -1
- package/dist/chunks/ide-0.1.10-361fyyet.mjs +0 -3
- package/dist/chunks/image-processor-napi-0.1.10-18yjap6z.mjs +0 -1
- package/dist/chunks/index-0.1.10-1cxj797w.mjs +0 -2
- package/dist/chunks/index-0.1.10-30c6wwdm.mjs +0 -30
- package/dist/chunks/index-0.1.10-80bh88yr.mjs +0 -1
- package/dist/chunks/index-0.1.10-8apwt1gk.mjs +0 -1
- package/dist/chunks/index-0.1.10-8c4f5nq6.mjs +0 -2
- package/dist/chunks/index-0.1.10-9mqxzarc.mjs +0 -5
- package/dist/chunks/index-0.1.10-c29w46aj.mjs +0 -1
- package/dist/chunks/index-0.1.10-c450y86m.mjs +0 -1
- package/dist/chunks/index-0.1.10-d1r31eyx.mjs +0 -9
- package/dist/chunks/index-0.1.10-drj30y1c.mjs +0 -1
- package/dist/chunks/index-0.1.10-g667a23q.mjs +0 -1
- package/dist/chunks/index-0.1.10-gz2mwwnj.mjs +0 -1
- package/dist/chunks/index-0.1.10-m1gd7g5v.mjs +0 -1
- package/dist/chunks/index-0.1.10-n4bkm7fr.mjs +0 -9
- package/dist/chunks/index-0.1.10-r42rb77w.mjs +0 -7
- package/dist/chunks/index-0.1.10-ra4k3x9k.mjs +0 -1
- package/dist/chunks/index-0.1.10-s32szzwg.mjs +0 -1
- package/dist/chunks/index-0.1.10-std21r3g.mjs +0 -1
- package/dist/chunks/index-0.1.10-t71jm4x7.mjs +0 -1
- package/dist/chunks/index-0.1.10-vpcq7nfa.mjs +0 -1
- package/dist/chunks/index-0.1.10-x6dkpkw7.mjs +0 -1
- package/dist/chunks/index-0.1.10-xqy1yh0c.mjs +0 -1
- package/dist/chunks/initReplBridge-0.1.10-4af5e275.mjs +0 -1
- package/dist/chunks/ink-0.1.10-57r8vscr.mjs +0 -1
- package/dist/chunks/insights-0.1.10-rptwhmpm.mjs +0 -870
- package/dist/chunks/install-0.1.10-9w2w5vre.mjs +0 -1
- package/dist/chunks/install-github-app-0.1.10-xhj1zyqh.mjs +0 -149
- package/dist/chunks/install-slack-app-0.1.10-tq51qy4s.mjs +0 -1
- package/dist/chunks/instrumentation-0.1.10-kyzfec48.mjs +0 -12
- package/dist/chunks/interactiveHelpers-0.1.10-1491802m.mjs +0 -1
- package/dist/chunks/keybindings-0.1.10-fpyw69y7.mjs +0 -2
- package/dist/chunks/knowledge-0.1.10-2aa0bb5w.mjs +0 -2
- package/dist/chunks/loadAgentsDir-0.1.10-h8t0ppav.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.1.10-ne71stmt.mjs +0 -1
- package/dist/chunks/logout-0.1.10-xxm4ydq9.mjs +0 -1
- package/dist/chunks/lsp-0.1.10-k53wta4y.mjs +0 -1
- package/dist/chunks/main-0.1.10-q3qenxfq.mjs +0 -1
- package/dist/chunks/managedEnv-0.1.10-s37qwcz1.mjs +0 -1
- package/dist/chunks/mcp-0.1.10-af795ewj.mjs +0 -1
- package/dist/chunks/mcp-0.1.10-b5z770fs.mjs +0 -17
- package/dist/chunks/mcp-0.1.10-nd17220r.mjs +0 -4
- package/dist/chunks/mcpServer-0.1.10-vrpfykem.mjs +0 -1
- package/dist/chunks/mcpb-0.1.10-jzxbat3k.mjs +0 -1
- package/dist/chunks/memory-0.1.10-zwzw20d5.mjs +0 -3
- package/dist/chunks/mobile-0.1.10-02fzsby3.mjs +0 -2
- package/dist/chunks/model-0.1.10-9g2nyrq7.mjs +0 -1
- package/dist/chunks/model-0.1.10-rygn5rc7.mjs +0 -2
- package/dist/chunks/oauth-0.1.10-t6fn448z.mjs +0 -1
- package/dist/chunks/openaiShim-0.1.10-gnhp89j2.mjs +0 -14
- package/dist/chunks/output-style-0.1.10-tnvcw858.mjs +0 -1
- package/dist/chunks/package-HMBVQOZ4-0.1.10-zd9nnmft.mjs +0 -1
- package/dist/chunks/parser-0.1.10-yemkwzb2.mjs +0 -1
- package/dist/chunks/passes-0.1.10-3zg7g2tp.mjs +0 -1
- package/dist/chunks/permissions-0.1.10-3tmntee5.mjs +0 -3
- package/dist/chunks/plan-0.1.10-sj11cbeb.mjs +0 -1
- package/dist/chunks/plist-0.1.10-mfhsxrkb.mjs +0 -1
- package/dist/chunks/plugin-0.1.10-c2rxcqb7.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.1.10-n5esk5p9.mjs +0 -1
- package/dist/chunks/plugins-0.1.10-cyb1q58v.mjs +0 -9
- package/dist/chunks/print-0.1.10-s2t5nd3y.mjs +0 -57
- package/dist/chunks/privacy-settings-0.1.10-kxx4szxa.mjs +0 -1
- package/dist/chunks/process-0.1.10-kp51xxsy.mjs +0 -1
- package/dist/chunks/processBashCommand-0.1.10-t1cdkkjx.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.1.10-pvndkc40.mjs +0 -9
- package/dist/chunks/prompt-0.1.10-2kjnmw4z.mjs +0 -1
- package/dist/chunks/prompt-0.1.10-v546t6x4.mjs +0 -1
- package/dist/chunks/prompts-0.1.10-8k80tabm.mjs +0 -1
- package/dist/chunks/provider-0.1.10-5p16y1p3.mjs +0 -2
- package/dist/chunks/providerProfiles-0.1.10-0r6j5m52.mjs +0 -1
- package/dist/chunks/rate-limit-options-0.1.10-0sgjcqvt.mjs +0 -1
- package/dist/chunks/registry-0.1.10-nyx80cwb.mjs +0 -1
- package/dist/chunks/release-notes-0.1.10-8bpsjmax.mjs +0 -5
- package/dist/chunks/reload-plugins-0.1.10-f8cj2ymj.mjs +0 -2
- package/dist/chunks/remote-env-0.1.10-x65rh1n3.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.1.10-tk9vhzgk.mjs +0 -1
- package/dist/chunks/remoteSession-0.1.10-xx5eng27.mjs +0 -1
- package/dist/chunks/rename-0.1.10-zjwr9vqm.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.1.10-34e8jwrt.mjs +0 -1
- package/dist/chunks/resume-0.1.10-dc75n2zf.mjs +0 -2
- package/dist/chunks/rewind-0.1.10-kt2968kt.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.1.10-whhwsy1v.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.1.10-19w6767r.mjs +0 -1
- package/dist/chunks/session-0.1.10-pzsbjyqm.mjs +0 -2
- package/dist/chunks/sessionFileAccessHooks-0.1.10-jaadayzy.mjs +0 -1
- package/dist/chunks/sessionStorage-0.1.10-b72srv50.mjs +0 -1
- package/dist/chunks/setup-0.1.10-fbs90hdh.mjs +0 -5
- package/dist/chunks/sinks-0.1.10-02w5f1q9.mjs +0 -1
- package/dist/chunks/skills-0.1.10-pexnbjqd.mjs +0 -1
- package/dist/chunks/startupProfiler-0.1.10-gcv6ckp5.mjs +0 -1
- package/dist/chunks/state-0.1.10-embrgn1a.mjs +0 -1
- package/dist/chunks/stats-0.1.10-s0rzmsxx.mjs +0 -6
- package/dist/chunks/status-0.1.10-8r0jrc8n.mjs +0 -1
- package/dist/chunks/stickers-0.1.10-dj7ganhx.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.1.10-hpv416jp.mjs +0 -1
- package/dist/chunks/tasks-0.1.10-cnvnk57k.mjs +0 -1
- package/dist/chunks/teamHelpers-0.1.10-j6sfy2zc.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.1.10-ddhe13pc.mjs +0 -1
- package/dist/chunks/teleport-0.1.10-saft8sby.mjs +0 -1
- package/dist/chunks/terminalSetup-0.1.10-4p5xvtyy.mjs +0 -1
- package/dist/chunks/theme-0.1.10-5xss74sp.mjs +0 -1
- package/dist/chunks/thinkback-0.1.10-e4bz61r1.mjs +0 -1
- package/dist/chunks/thinkback-play-0.1.10-0vjf0r8c.mjs +0 -1
- package/dist/chunks/toolPool-0.1.10-57jq29ct.mjs +0 -1
- package/dist/chunks/toolSearch-0.1.10-ysjw302j.mjs +0 -1
- package/dist/chunks/trustedDevice-0.1.10-zy988esg.mjs +0 -1
- package/dist/chunks/turndown.cjs-0.1.10-vhmcr6t6.mjs +0 -69
- package/dist/chunks/ultrareviewCommand-0.1.10-sqjsmw0x.mjs +0 -4
- package/dist/chunks/update-0.1.10-p7ctpbkr.mjs +0 -94
- package/dist/chunks/upgrade-0.1.10-8585sfbv.mjs +0 -1
- package/dist/chunks/upstreamproxy-0.1.10-ddbrjzqt.mjs +0 -14
- package/dist/chunks/usage-0.1.10-r8vznre6.mjs +0 -1
- package/dist/chunks/util-0.1.10-51fk6c0k.mjs +0 -1
- package/dist/chunks/utils-0.1.10-43r4vneb.mjs +0 -1
- package/dist/chunks/vim-0.1.10-3yzrqjw5.mjs +0 -1
- package/dist/chunks/watcher-0.1.10-xq2qsexd.mjs +0 -1
- package/dist/chunks/wiki-0.1.10-v3w4719f.mjs +0 -132
- package/dist/chunks/worktree-0.1.10-b5r0y9mr.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.1.10-ckcv927j.mjs +0 -1
- package/dist/chunks/wrapper-0.1.10-10976h3e.mjs +0 -7
- /package/dist/chunks/{cli-0.1.10-tf9dk84p.mjs → cli-0.1.12-41zq3gv6.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.10-xfdakzcb.mjs → cli-0.1.12-ng34ay3g.mjs} +0 -0
- /package/dist/chunks/{cli-0.1.10-9xpgjxhj.mjs → cli-0.1.12-tvawkeks.mjs} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Sna as f,Vna as a}from"./cli-0.1.12-1hv04bp7.mjs";var I=f((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.getHomeDir=void 0;var J=a("os"),z=a("path"),E={},Z=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},ee=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:o=`C:${z.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${o}${r}`;let s=Z();if(!E[s])E[s]=(0,J.homedir)();return E[s]};L.getHomeDir=ee});var T=f((w)=>{Object.defineProperty(w,"__esModule",{value:!0});w.getSSOTokenFilepath=void 0;var te=a("crypto"),re=a("path"),oe=I(),se=(e)=>{let r=(0,te.createHash)("sha1").update(e).digest("hex");return(0,re.join)((0,oe.getHomeDir)(),".aws","sso","cache",`${r}.json`)};w.getSSOTokenFilepath=se});var K=f((q)=>{Object.defineProperty(q,"__esModule",{value:!0});q.getSSOTokenFromFile=q.tokenIntercept=void 0;var ne=a("fs/promises"),ie=T();q.tokenIntercept={};var ce=async(e)=>{if(q.tokenIntercept[e])return q.tokenIntercept[e];let t=(0,ie.getSSOTokenFilepath)(e),r=await(0,ne.readFile)(t,"utf8");return JSON.parse(r)};q.getSSOTokenFromFile=ce});var U=f((de)=>{de.HttpAuthLocation=void 0;(function(e){e.HEADER="header",e.QUERY="query"})(de.HttpAuthLocation||(de.HttpAuthLocation={}));de.HttpApiKeyAuthLocation=void 0;(function(e){e.HEADER="header",e.QUERY="query"})(de.HttpApiKeyAuthLocation||(de.HttpApiKeyAuthLocation={}));de.EndpointURLScheme=void 0;(function(e){e.HTTP="http",e.HTTPS="https"})(de.EndpointURLScheme||(de.EndpointURLScheme={}));de.AlgorithmId=void 0;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(de.AlgorithmId||(de.AlgorithmId={}));var ae=(e)=>{let t=[];if(e.sha256!==void 0)t.push({algorithmId:()=>de.AlgorithmId.SHA256,checksumConstructor:()=>e.sha256});if(e.md5!=null)t.push({algorithmId:()=>de.AlgorithmId.MD5,checksumConstructor:()=>e.md5});return{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},pe=(e)=>{let t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t},le=(e)=>{return ae(e)},ue=(e)=>{return pe(e)};de.FieldPosition=void 0;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(de.FieldPosition||(de.FieldPosition={}));var fe="__smithy_context";de.IniSectionType=void 0;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(de.IniSectionType||(de.IniSectionType={}));de.RequestHandlerProtocol=void 0;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(de.RequestHandlerProtocol||(de.RequestHandlerProtocol={}));de.SMITHY_CONTEXT_KEY=fe;de.getDefaultClientConfiguration=le;de.resolveDefaultRuntimeConfig=ue});var W=f(($)=>{Object.defineProperty($,"__esModule",{value:!0});$.readFile=$.fileIntercept=$.filePromises=void 0;var Se=a("node:fs/promises");$.filePromises={};$.fileIntercept={};var me=(e,t)=>{if($.fileIntercept[e]!==void 0)return $.fileIntercept[e];if(!$.filePromises[e]||t?.ignoreCache)$.filePromises[e]=(0,Se.readFile)(e,"utf8");return $.filePromises[e]};$.readFile=me});var Ue=f((c)=>{var p=I(),S=T(),b=K(),m=a("path"),x=U(),d=W(),G="AWS_PROFILE",X="default",xe=(e)=>e.profile||process.env[G]||X,l=".",Fe=(e)=>Object.entries(e).filter(([t])=>{let r=t.indexOf(l);if(r===-1)return!1;return Object.values(x.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,o])=>{let s=r.indexOf(l),n=r.substring(0,s)===x.IniSectionType.PROFILE?r.substring(s+1):r;return t[n]=o,t},{...e.default&&{default:e.default}}),Oe="AWS_CONFIG_FILE",Q=()=>process.env[Oe]||m.join(p.getHomeDir(),".aws","config"),Ee="AWS_SHARED_CREDENTIALS_FILE",Ie=()=>process.env[Ee]||m.join(p.getHomeDir(),".aws","credentials"),Te=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Pe=["__proto__","profile __proto__"],j=(e)=>{let t={},r,o;for(let s of e.split(/\r?\n/)){let n=s.split(/(^|\s)[;#]/)[0].trim();if(n[0]==="["&&n[n.length-1]==="]"){r=void 0,o=void 0;let i=n.substring(1,n.length-1),u=Te.exec(i);if(u){let[,h,,O]=u;if(Object.values(x.IniSectionType).includes(h))r=[h,O].join(l)}else r=i;if(Pe.includes(i))throw Error(`Found invalid profile name "${i}"`)}else if(r){let i=n.indexOf("=");if(![0,-1].includes(i)){let[u,h]=[n.substring(0,i).trim(),n.substring(i+1).trim()];if(h==="")o=u;else{if(o&&s.trimStart()===s)o=void 0;t[r]=t[r]||{};let O=o?[o,u].join(l):u;t[r][O]=h}}}}return t},Y=()=>({}),B=async(e={})=>{let{filepath:t=Ie(),configFilepath:r=Q()}=e,o=p.getHomeDir(),s="~/",n=t;if(t.startsWith("~/"))n=m.join(o,t.slice(2));let F=r;if(r.startsWith("~/"))F=m.join(o,r.slice(2));let i=await Promise.all([d.readFile(F,{ignoreCache:e.ignoreCache}).then(j).then(Fe).catch(Y),d.readFile(n,{ignoreCache:e.ignoreCache}).then(j).catch(Y)]);return{configFile:i[0],credentialsFile:i[1]}},ve=(e)=>Object.entries(e).filter(([t])=>t.startsWith(x.IniSectionType.SSO_SESSION+l)).reduce((t,[r,o])=>({...t,[r.substring(r.indexOf(l)+1)]:o}),{}),Ce=()=>({}),Re=async(e={})=>d.readFile(e.configFilepath??Q()).then(j).then(ve).catch(Ce),De=(...e)=>{let t={};for(let r of e)for(let[o,s]of Object.entries(r))if(t[o]!==void 0)Object.assign(t[o],s);else t[o]=s;return t},He=async(e)=>{let t=await B(e);return De(t.configFile,t.credentialsFile)},ye={getFileRecord(){return d.fileIntercept},interceptFile(e,t){d.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return b.tokenIntercept},interceptToken(e,t){b.tokenIntercept[e]=t}};c.getSSOTokenFromFile=b.getSSOTokenFromFile;c.readFile=d.readFile;c.CONFIG_PREFIX_SEPARATOR=l;c.DEFAULT_PROFILE=X;c.ENV_PROFILE=G;c.externalDataInterceptor=ye;c.getProfileName=xe;c.loadSharedConfigFiles=B;c.loadSsoSessionData=Re;c.parseKnownFiles=He;Object.prototype.hasOwnProperty.call(p,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:p.__proto__});Object.keys(p).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=p[e]});Object.prototype.hasOwnProperty.call(S,"__proto__")&&!Object.prototype.hasOwnProperty.call(c,"__proto__")&&Object.defineProperty(c,"__proto__",{enumerable:!0,value:S.__proto__});Object.keys(S).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(c,e))c[e]=S[e]})});
|
|
2
|
+
export{Ue as yna};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{Bi as h,Du as k,Eu as I,Ph as $,Sh as m,gI as u,rH as F,sF as A,tF as p,tH as L,zi as U}from"./cli-0.1.12-242der7s.mjs";import{h1 as O,i1 as f}from"./cli-0.1.12-y9598sy3.mjs";import{Kga as b,Mga as T,Wga as S,_ga as E}from"./cli-0.1.12-rzpc0tr9.mjs";import{Bha as C,oha as y}from"./cli-0.1.12-ra3sby5b.mjs";import{Una as N}from"./cli-0.1.12-1hv04bp7.mjs";import{join as P}from"path";function D(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
|
|
2
|
+
|
|
3
|
+
Based on the user conversation above (EXCLUDING this documentation update instruction message), update the Magic Doc file to incorporate any NEW learnings, insights, or information that would be valuable to preserve.
|
|
4
|
+
|
|
5
|
+
The file {{docPath}} has already been read for you. Here are its current contents:
|
|
6
|
+
<current_doc_content>
|
|
7
|
+
{{docContents}}
|
|
8
|
+
</current_doc_content>
|
|
9
|
+
|
|
10
|
+
Document title: {{docTitle}}
|
|
11
|
+
{{customInstructions}}
|
|
12
|
+
|
|
13
|
+
Your ONLY task is to use the Edit tool to update the documentation file if there is substantial new information to add, then stop. You can make multiple edits (update multiple sections as needed) - make all Edit tool calls in parallel in a single message. If there's nothing substantial to add, simply respond with a brief explanation and do not call any tools.
|
|
14
|
+
|
|
15
|
+
CRITICAL RULES FOR EDITING:
|
|
16
|
+
- Preserve the Magic Doc header exactly as-is: # MAGIC DOC: {{docTitle}}
|
|
17
|
+
- If there's an italicized line immediately after the header, preserve it exactly as-is
|
|
18
|
+
- Keep the document CURRENT with the latest state of the codebase - this is NOT a changelog or history
|
|
19
|
+
- Update information IN-PLACE to reflect the current state - do NOT append historical notes or track changes over time
|
|
20
|
+
- Remove or replace outdated information rather than adding "Previously..." or "Updated to..." notes
|
|
21
|
+
- Clean up or DELETE sections that are no longer relevant or don't align with the document's purpose
|
|
22
|
+
- Fix obvious errors: typos, grammar mistakes, broken formatting, incorrect information, or confusing statements
|
|
23
|
+
- Keep the document well organized: use clear headings, logical section order, consistent formatting, and proper nesting
|
|
24
|
+
|
|
25
|
+
DOCUMENTATION PHILOSOPHY - READ CAREFULLY:
|
|
26
|
+
- BE TERSE. High signal only. No filler words or unnecessary elaboration.
|
|
27
|
+
- Documentation is for OVERVIEWS, ARCHITECTURE, and ENTRY POINTS - not detailed code walkthroughs
|
|
28
|
+
- Do NOT duplicate information that's already obvious from reading the source code
|
|
29
|
+
- Do NOT document every function, parameter, or line number reference
|
|
30
|
+
- Focus on: WHY things exist, HOW components connect, WHERE to start reading, WHAT patterns are used
|
|
31
|
+
- Skip: detailed implementation steps, exhaustive API docs, play-by-play narratives
|
|
32
|
+
|
|
33
|
+
What TO document:
|
|
34
|
+
- High-level architecture and system design
|
|
35
|
+
- Non-obvious patterns, conventions, or gotchas
|
|
36
|
+
- Key entry points and where to start reading code
|
|
37
|
+
- Important design decisions and their rationale
|
|
38
|
+
- Critical dependencies or integration points
|
|
39
|
+
- References to related files, docs, or code (like a wiki) - help readers navigate to relevant context
|
|
40
|
+
|
|
41
|
+
What NOT to document:
|
|
42
|
+
- Anything obvious from reading the code itself
|
|
43
|
+
- Exhaustive lists of files, functions, or parameters
|
|
44
|
+
- Step-by-step implementation details
|
|
45
|
+
- Low-level code mechanics
|
|
46
|
+
- Information already in CLAUDE.md or other project docs
|
|
47
|
+
|
|
48
|
+
Use the Edit tool with file_path: {{docPath}}
|
|
49
|
+
|
|
50
|
+
REMEMBER: Only update if there is substantial new information. The Magic Doc header (# MAGIC DOC: {{docTitle}}) must remain unchanged.`}async function g(){let w=S(),z=P(y(),"magic-docs","prompt.md");try{return await w.readFile(z,{encoding:"utf-8"})}catch{return D()}}function M(w,z){return w.replace(/\{\{(\w+)\}\}/g,(B,J)=>Object.prototype.hasOwnProperty.call(z,J)?z[J]:B)}async function R(w,z,B,J){let Y=await g(),K=J?`
|
|
51
|
+
|
|
52
|
+
DOCUMENT-SPECIFIC UPDATE INSTRUCTIONS:
|
|
53
|
+
The document author has provided specific instructions for how this file should be updated. Pay extra attention to these instructions and follow them carefully:
|
|
54
|
+
|
|
55
|
+
"${J}"
|
|
56
|
+
|
|
57
|
+
These instructions take priority over the general rules below. Make sure your updates align with these specific guidelines.`:"";return M(Y,{docContents:w,docPath:z,docTitle:B,customInstructions:K})}var j=N(()=>{C();E()});function Xw(){G.clear()}function l(w){let z=w.match(r);if(!z||!z[1])return null;let B=z[1].trim(),J=z.index+z[0].length,K=w.slice(J).match(/^\s*\n(?:\s*\n)?(.+?)(?:\n|$)/);if(K&&K[1]){let X=K[1].match(d);if(X&&X[1]){let Z=X[1].trim();return{title:B,instructions:Z}}}return{title:B}}function i(){return{agentType:"magic-docs",whenToUse:"Update Magic Docs",tools:[$],model:"sonnet",source:"built-in",baseDir:"built-in",getSystemPrompt:()=>""}}async function s(w,z){let{messages:B,systemPrompt:J,userContext:Y,systemContext:K,toolUseContext:V}=z,X=U(V.readFileState);X.delete(w.path);let Z={...V,readFileState:X},q="";try{let W=(await A.call({file_path:w.path},Z)).data;if(W.type==="text")q=W.file.content}catch(Q){if(b(Q)||Q instanceof Error&&Q.message.startsWith("File does not exist")){G.delete(w.path);return}throw Q}let H=l(q);if(!H){G.delete(w.path);return}let _=await R(q,w.path,H.title,H.instructions),x=async(Q,W)=>{if(Q.name===$&&typeof W==="object"&&W!==null&&"file_path"in W){let v=W.file_path;if(typeof v==="string"&&v===w.path)return{behavior:"allow",updatedInput:W}}return{behavior:"deny",message:`only ${$} is allowed for ${w.path}`,decisionReason:{type:"other",reason:`only ${$} is allowed`}}};for await(let Q of k({agentDefinition:i(),promptMessages:[L({content:_})],toolUseContext:Z,canUseTool:x,isAsync:!0,forkContextMessages:B,querySource:"magic_docs",override:{systemPrompt:J,userContext:Y,systemContext:K},availableTools:Z.options.tools}));}async function Zw(){}var r,d,G,Yw;var a=N(()=>{I();m();p();T();h();u();f();j();r=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,d=/^[_*](.+?)[_*]\s*$/m,G=new Map;Yw=O(async function(w){let{messages:z,querySource:B}=w;if(B!=="repl_main_thread")return;if(F(z))return;if(G.size===0)return;for(let K of Array.from(G.values()))await s(K,w)})});
|
|
58
|
+
export{Xw as pg,Zw as qg,a as rg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{se as bG,te as rG,ze as iG}from"./cli-0.1.12-ybm1kvwy.mjs";import{$I as v,$q as mG,Iq as jG,Jq as HG,Lq as dG,Nq as KG,Sq as LG,TI as kG,WI as aG,ZI as f,aJ as s,bJ as c,bK as i,br as WG,cK as _G,cr as qG,dJ as u,dK as UG,eJ as r,eK as sG,fK as $G,gK as cG,go as uG,hJ as oG,hr as l,lr as DG,nr as R,or as a,pr as pG,xI as o,yI as lG}from"./cli-0.1.12-242der7s.mjs";import{eT as JJ}from"./cli-0.1.12-bddm1g1s.mjs";import{MW as vG,qW as FG,tW as OG,yW as VG}from"./cli-0.1.12-52dbx2x6.mjs";import{rX as wG,tX as PG}from"./cli-0.1.12-04jw23rj.mjs";import{uX as BG}from"./cli-0.1.12-ytxphavm.mjs";import{J$ as YG,K7 as I,L7 as k,N7 as CG,O$ as fG}from"./cli-0.1.12-vzga2are.mjs";import{qfa as NG}from"./cli-0.1.12-g8mny195.mjs";import{gga as x,hga as gG}from"./cli-0.1.12-6x2mnahn.mjs";import{Gga as w,Mga as MG,Sga as TG,eha as zG,hha as SG}from"./cli-0.1.12-rzpc0tr9.mjs";import{Yma as ZG,dja as XG}from"./cli-0.1.12-pm5cwtxh.mjs";import{Qna as n,Una as p}from"./cli-0.1.12-1hv04bp7.mjs";var GG=p(()=>{TG();NG()});function JG(F){let B="plugin"in F?F.plugin:"no-plugin";return`${F.type}:${F.source}:${B}`}function QG(F,B){if(B.length===0)return;F((D)=>{let h=new Set(D.plugins.errors.map((H)=>JG(H))),P=B.filter((H)=>!h.has(JG(H)));if(P.length===0)return D;return{...D,plugins:{...D.plugins,errors:[...D.plugins.errors,...P]}}})}function EG(F,B=!1){let D=UG(),h=i((G)=>G.authVersion),P=i((G)=>G.mcp.pluginReconnectKey),H=_G(),K=q.useRef(new Map),N=q.useRef(new Set),S=q.useRef(null);q.useEffect(()=>{},[H]);let{addNotification:T}=$G(),RG=16,d=q.useRef([]),y=q.useRef(null),C=q.useCallback(()=>{y.current=null;let G=d.current;if(G.length===0)return;d.current=[],H((Y)=>{let z=Y.mcp;for(let L of G){let{tools:Q,commands:O,resources:W,...J}=L,V=J.type==="disabled"||J.type==="failed"?Q??[]:Q,X=J.type==="disabled"||J.type==="failed"?O??[]:O,Z=J.type==="disabled"||J.type==="failed"?W??[]:W,j=YG(J.name),g=z.clients.findIndex((E)=>E.name===J.name)===-1?[...z.clients,J]:z.clients.map((E)=>E.name===J.name?J:E),b=V===void 0?z.tools:[...o(z.tools,(E)=>E.name?.startsWith(j)),...V],m=X===void 0?z.commands:[...o(z.commands,(E)=>KG(E,J.name)),...X],hG=Z===void 0?z.resources:{...z.resources,...Z.length>0?{[J.name]:Z}:bG(z.resources,J.name)};z={...z,clients:g,tools:b,commands:m,resources:hG}}return{...Y,mcp:z}})},[H]),_=q.useCallback((G)=>{if(d.current.push(G),y.current===null)y.current=setTimeout(C,RG)},[C]),U=q.useCallback(({client:G,tools:Y,commands:z,resources:L})=>{switch(_({...G,tools:Y,commands:z,resources:L}),G.type){case"connected":{if(kG(G.client,G.name,H),G.client.onclose=()=>{let Q=G.config.type??"stdio";if(f(G.name,G.config).catch(()=>{zG(`Failed to invalidate the server cache: ${G.name}`)}),R(G.name)){k(G.name,"Server is disabled, skipping automatic reconnection");return}if(Q!=="stdio"&&Q!=="sdk"){let O=GJ(Q);k(G.name,`${O} transport closed/disconnected, attempting automatic reconnection`);let W=K.current.get(G.name);if(W)clearTimeout(W),K.current.delete(G.name);(async()=>{for(let V=1;V<=A;V++){if(R(G.name)){k(G.name,"Server disabled during reconnection, stopping retry"),K.current.delete(G.name);return}_({...G,type:"pending",reconnectAttempt:V,maxReconnectAttempts:A});let X=Date.now();try{let j=await u(G.name,G.config),$=Date.now()-X;if(j.client.type==="connected"){k(G.name,`${O} reconnection successful after ${$}ms (attempt ${V})`),K.current.delete(G.name),U(j);return}if(k(G.name,`${O} reconnection attempt ${V} completed with status: ${j.client.type}`),V===A){k(G.name,`Max reconnection attempts (${A}) reached, giving up`),K.current.delete(G.name),U(j);return}}catch(j){let $=Date.now()-X;if(I(G.name,`${O} reconnection attempt ${V} failed after ${$}ms: ${j}`),V===A){k(G.name,`Max reconnection attempts (${A}) reached, giving up`),K.current.delete(G.name),_({...G,type:"failed"});return}}let Z=Math.min(tG*Math.pow(2,V-1),eG);k(G.name,`Scheduling reconnection attempt ${V+1} in ${Z}ms`),await new Promise((j)=>{let $=setTimeout(j,Z);K.current.set(G.name,$)})}})()}else _({...G,type:"failed"})},!1)switch(Q.action){case"register":case"skip":}if(G.capabilities?.tools?.listChanged)G.client.setNotificationHandler(VG,async()=>{k(G.name,"Received tools/list_changed notification, refreshing tools");try{let Q=v.cache.get(G.name);v.cache.delete(G.name);let O=await v(G),W=O.length;if(Q)Q.then((J)=>{x("tengu_mcp_list_changed",{type:"tools",previousCount:J.length,newCount:W})},()=>{x("tengu_mcp_list_changed",{type:"tools",newCount:W})});else x("tengu_mcp_list_changed",{type:"tools",newCount:W});_({...G,tools:O})}catch(Q){I(G.name,`Failed to refresh tools after list_changed notification: ${w(Q)}`)}});if(G.capabilities?.prompts?.listChanged)G.client.setNotificationHandler(OG,async()=>{k(G.name,"Received prompts/list_changed notification, refreshing prompts"),x("tengu_mcp_list_changed",{type:"prompts"});try{c.cache.delete(G.name);let[Q,O]=await Promise.all([c(G),Promise.resolve([])]);_({...G,commands:[...Q,...O]}),nG?.()}catch(Q){I(G.name,`Failed to refresh prompts after list_changed notification: ${w(Q)}`)}});if(G.capabilities?.resources?.listChanged)G.client.setNotificationHandler(FG,async()=>{k(G.name,"Received resources/list_changed notification, refreshing resources"),x("tengu_mcp_list_changed",{type:"resources"});try{s.cache.delete(G.name);{let Q=await s(G);_({...G,resources:Q})}}catch(Q){I(G.name,`Failed to refresh resources after list_changed notification: ${w(Q)}`)}});break}case"needs-auth":case"failed":case"pending":case"disabled":break}},[_]),e=XG();q.useEffect(()=>{async function G(){let{servers:Y,errors:z}=B?{servers:{},errors:[]}:await l(F),L={...Y,...F};QG(H,z),H((Q)=>{let{stale:O,...W}=LG(Q.mcp,L);for(let X of O){let Z=K.current.get(X.name);if(Z)clearTimeout(Z),K.current.delete(X.name);if(X.type==="connected")X.client.onclose=void 0,f(X.name,X.config).catch(()=>{})}let J=new Set(W.clients.map((X)=>X.name)),V=Object.entries(L).filter(([X])=>!J.has(X)).map(([X,Z])=>({name:X,type:R(X)?"disabled":"pending",config:Z}));if(V.length===0&&O.length===0)return Q;return{...Q,mcp:{...Q.mcp,...W,clients:[...W.clients,...V]}}})}G().catch((Y)=>{I("useManageMCPConnections",`Failed to initialize servers as pending: ${w(Y)}`)})},[B,F,H,e,P]),q.useEffect(()=>{let G=!1;async function Y(){let z;if(B||DG())z=Promise.resolve({});else HG(),z=jG();let{servers:L,errors:Q}=B?{servers:{},errors:[]}:await l(F,z);if(G)return;QG(H,Q);let O={...L,...F},W=Object.fromEntries(Object.entries(O).filter(([Z])=>!R(Z)));r(U,W).catch((Z)=>{I("useManageMcpConnections",`Failed to get MCP resources: ${w(Z)}`)});let J={};if(!B){if(J=qG(await z).allowed,G)return;if(Object.keys(J).length>0){let{servers:Z}=WG(J,O);J=Z}if(Object.keys(J).length>0){H((j)=>{let $=new Set(j.mcp.clients.map((b)=>b.name)),g=Object.entries(J).filter(([b])=>!$.has(b)).map(([b,m])=>({name:b,type:R(b)?"disabled":"pending",config:m}));if(g.length===0)return j;return{...j,mcp:{...j.mcp,clients:[...j.mcp.clients,...g]}}});let Z=Object.fromEntries(Object.entries(J).filter(([j])=>!R(j)));r(U,Z).catch((j)=>{I("useManageMcpConnections",`Failed to get claude.ai MCP resources: ${w(j)}`)})}}let V={...O,...J},X={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0};for(let Z of Object.values(V))if(Z.scope==="enterprise")X.enterprise++;else if(Z.scope==="user")X.global++;else if(Z.scope==="project")X.project++;else if(Z.scope==="local")X.user++;else if(Z.scope==="dynamic")X.plugin++;else if(Z.scope==="claudeai")X.claudeai++;x("tengu_mcp_servers",{...X})}return Y(),()=>{G=!0}},[B,F,U,H,h,e,P]),q.useEffect(()=>{let G=K.current;return()=>{for(let Y of G.values())clearTimeout(Y);if(G.clear(),y.current!==null)clearTimeout(y.current),y.current=null,C()}},[C]);let yG=q.useCallback(async(G)=>{let Y=D.getState().mcp.clients.find((Q)=>Q.name===G);if(!Y)throw Error(`MCP server ${G} not found`);let z=K.current.get(G);if(z)clearTimeout(z),K.current.delete(G);let L=await u(G,Y.config);return U(L),L},[D,U]),AG=q.useCallback(async(G)=>{let Y=D.getState().mcp.clients.find((L)=>L.name===G);if(!Y)throw Error(`MCP server ${G} not found`);if(Y.type!=="disabled"){let L=K.current.get(G);if(L)clearTimeout(L),K.current.delete(G);if(a(G,!1),Y.type==="connected")await f(G,Y.config);_({name:G,type:"disabled",config:Y.config})}else{a(G,!0),_({name:G,type:"pending",config:Y.config});let L=await u(G,Y.config);U(L)}},[D,_,U]);return{reconnectMcpServer:yG,toggleMcpServer:AG}}function GJ(F){switch(F){case"http":return"HTTP";case"ws":case"ws-ide":return"WebSocket";default:return"SSE"}}var q,nG=null,A=5,tG=1000,eG=30000;var IG=p(()=>{ZG();oG();vG();rG();lG();gG();pG();SG();ZG();cG();sG();MG();CG();uG();iG();GG();dG();aG();fG();mG();q=n(BG(),1)});function mJ(){let F=M.useContext(t);if(!F)throw Error("useMcpReconnect must be used within MCPConnectionManager");return F.reconnectMcpServer}function pJ(){let F=M.useContext(t);if(!F)throw Error("useMcpToggleEnabled must be used within MCPConnectionManager");return F.toggleMcpServer}function lJ(F){let B=xG.c(6),{children:D,dynamicMcpConfig:h,isStrictMcpConfig:P}=F,{reconnectMcpServer:H,toggleMcpServer:K}=EG(h,P),N;if(B[0]!==H||B[1]!==K)N={reconnectMcpServer:H,toggleMcpServer:K},B[0]=H,B[1]=K,B[2]=N;else N=B[2];let S=N,T;if(B[3]!==D||B[4]!==S)T=wG(t.Provider,{value:S,children:D}),B[3]=D,B[4]=S,B[5]=T;else T=B[5];return T}var xG,M,t;var QJ=p(()=>{IG();PG();xG=n(JJ(),1),M=n(BG(),1),t=M.createContext(null)});
|
|
2
|
+
export{GG as ne,mJ as oe,pJ as pe,lJ as qe,QJ as re};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{$E as L,YE as B,ZE as U,aF as V,dI as N,gI as b}from"./cli-0.1.12-242der7s.mjs";import{g_ as z,haa as P,n_ as F}from"./cli-0.1.12-vzga2are.mjs";import{Kfa as H,Qfa as v}from"./cli-0.1.12-bhxgr018.mjs";import{Una as j}from"./cli-0.1.12-1hv04bp7.mjs";async function A(R){let{messages:I,getAppState:O,options:{mainLoopModel:J,tools:Y,agentDefinitions:Z,customSystemPrompt:W,appendSystemPrompt:X}}=R,Q=N(I),{messages:K}=await B(Q),h=O();return L(K,J,async()=>h.toolPermissionContext,Y,Z,void 0,{options:{customSystemPrompt:W,appendSystemPrompt:X}},void 0,Q)}async function g(R,I){let O=await A(I);return{type:"text",value:w(O)}}function w(R){let{categories:I,totalTokens:O,rawMaxTokens:J,percentage:Y,model:Z,memoryFiles:W,mcpTools:X,agents:Q,skills:K}=R,h=`## Context Usage
|
|
2
|
+
|
|
3
|
+
`;h+=`**Model:** ${Z}
|
|
4
|
+
`,h+=`**Tokens:** ${H(O)} / ${H(J)} (${Y}%)
|
|
5
|
+
`,h+=`
|
|
6
|
+
`;let _=I.filter((q)=>q.tokens>0&&q.name!=="Free space"&&q.name!=="Autocompact buffer");if(_.length>0){h+=`### Estimated usage by category
|
|
7
|
+
|
|
8
|
+
`,h+=`| Category | Tokens | Percentage |
|
|
9
|
+
`,h+=`|----------|--------|------------|
|
|
10
|
+
`;for(let G of _){let $=(G.tokens/J*100).toFixed(1);h+=`| ${G.name} | ${H(G.tokens)} | ${$}% |
|
|
11
|
+
`}let q=I.find((G)=>G.name==="Free space");if(q&&q.tokens>0){let G=(q.tokens/J*100).toFixed(1);h+=`| Free space | ${H(q.tokens)} | ${G}% |
|
|
12
|
+
`}let E=I.find((G)=>G.name==="Autocompact buffer");if(E&&E.tokens>0){let G=(E.tokens/J*100).toFixed(1);h+=`| Autocompact buffer | ${H(E.tokens)} | ${G}% |
|
|
13
|
+
`}h+=`
|
|
14
|
+
`}if(X.length>0){h+=`### MCP Tools
|
|
15
|
+
|
|
16
|
+
`,h+=`| Tool | Server | Tokens |
|
|
17
|
+
`,h+=`|------|--------|--------|
|
|
18
|
+
`;for(let q of X)h+=`| ${q.name} | ${q.serverName} | ${H(q.tokens)} |
|
|
19
|
+
`;h+=`
|
|
20
|
+
`}if(Q.length>0){h+=`### Custom Agents
|
|
21
|
+
|
|
22
|
+
`,h+=`| Agent Type | Source | Tokens |
|
|
23
|
+
`,h+=`|------------|--------|--------|
|
|
24
|
+
`;for(let q of Q){let E;switch(q.source){case"projectSettings":E="Project";break;case"userSettings":E="User";break;case"localSettings":E="Local";break;case"flagSettings":E="Flag";break;case"policySettings":E="Policy";break;case"plugin":E="Plugin";break;case"built-in":E="Built-in";break;default:E=String(q.source)}h+=`| ${q.agentType} | ${E} | ${H(q.tokens)} |
|
|
25
|
+
`}h+=`
|
|
26
|
+
`}if(W.length>0){h+=`### Memory Files
|
|
27
|
+
|
|
28
|
+
`,h+=`| Type | Path | Tokens |
|
|
29
|
+
`,h+=`|------|------|--------|
|
|
30
|
+
`;for(let q of W)h+=`| ${q.type} | ${q.path} | ${H(q.tokens)} |
|
|
31
|
+
`;h+=`
|
|
32
|
+
`}if(K&&K.tokens>0&&K.skillFrontmatter.length>0){h+=`### Skills
|
|
33
|
+
|
|
34
|
+
`,h+=`| Skill | Source | Tokens |
|
|
35
|
+
`,h+=`|-------|--------|--------|
|
|
36
|
+
`;for(let q of K.skillFrontmatter)h+=`| ${q.name} | ${z(q.source)} | ${H(q.tokens)} |
|
|
37
|
+
`;h+=`
|
|
38
|
+
`}return h}var d=j(()=>{U();V();v();b();F();P()});
|
|
39
|
+
export{A as Yf,g as Zf,d as _f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Sna as D,Vna as J}from"./cli-0.1.12-1hv04bp7.mjs";var G=D((V,E)=>{E.exports=(O,k=process.argv)=>{let q=O.startsWith("-")?"":O.length===1?"-":"--",i=k.indexOf(q+O),B=k.indexOf("--");return i!==-1&&(B===-1||i<B)}});var U=D((W,K)=>{var M=J("os"),H=J("tty"),P=G(),{env:x}=process,j;if(P("no-color")||P("no-colors")||P("color=false")||P("color=never"))j=0;else if(P("color")||P("colors")||P("color=true")||P("color=always"))j=1;if("FORCE_COLOR"in x)if(x.FORCE_COLOR==="true")j=1;else if(x.FORCE_COLOR==="false")j=0;else j=x.FORCE_COLOR.length===0?1:Math.min(parseInt(x.FORCE_COLOR,10),3);function z(O){if(O===0)return!1;return{level:O,hasBasic:!0,has256:O>=2,has16m:O>=3}}function A(O,k){if(j===0)return 0;if(P("color=16m")||P("color=full")||P("color=truecolor"))return 3;if(P("color=256"))return 2;if(O&&!k&&j===void 0)return 0;let q=j||0;if(x.TERM==="dumb")return q;if(process.platform==="win32"){let i=M.release().split(".");if(Number(i[0])>=10&&Number(i[2])>=10586)return Number(i[2])>=14931?3:2;return 1}if("CI"in x){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((i)=>(i in x))||x.CI_NAME==="codeship")return 1;return q}if("TEAMCITY_VERSION"in x)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(x.TEAMCITY_VERSION)?1:0;if(x.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in x){let i=parseInt((x.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(x.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(x.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(x.TERM))return 1;if("COLORTERM"in x)return 1;return q}function Q(O){let k=A(O,O&&O.isTTY);return z(k)}K.exports={supportsColor:Q,stdout:z(A(!0,H.isatty(1))),stderr:z(A(!0,H.isatty(2)))}});
|
|
2
|
+
export{G as P6,U as Q6};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{V7 as Y,X7 as H,dda as w,gda as G,xca as P,yca as b}from"./cli-0.1.12-vzga2are.mjs";import{Bha as k,tha as K}from"./cli-0.1.12-ra3sby5b.mjs";import{Una as O}from"./cli-0.1.12-1hv04bp7.mjs";function f(){return process.env.GITHUB_DEVICE_FLOW_CLIENT_ID?.trim()||D}function C(J){return new Promise(($)=>setTimeout($,J))}async function p(J){let $=J?.clientId??f();if(!$)throw new y("No OAuth client ID: set GITHUB_DEVICE_FLOW_CLIENT_ID.");let V=J?.fetchImpl??fetch,Z=J?.scope?.trim()||R,Q=Z===R?[Z]:[Z,R],W="Device code request failed.";for(let j of Q){let X=await V(F,{method:"POST",headers:{Accept:"application/json"},body:new URLSearchParams({client_id:$,scope:j})});if(!X.ok){let A=await X.text().catch(()=>"");W=`Device code request failed: ${X.status} ${A}`;let M=/invalid_scope/i.test(A);if(j!==R&&M)continue;throw new y(W)}let N=await X.json(),z=N.device_code,q=N.user_code,L=N.verification_uri;if(typeof z!=="string"||typeof q!=="string"||typeof L!=="string")throw new y("Malformed device code response from GitHub");return{device_code:z,user_code:q,verification_uri:L,expires_in:typeof N.expires_in==="number"?N.expires_in:900,interval:typeof N.interval==="number"?N.interval:5}}throw new y(W)}async function u(J,$){let V=$?.clientId??f();if(!V)throw new y("client_id required for polling");let Z=Math.max(1,$?.initialInterval??5),Q=$?.timeoutSeconds??900,W=$?.fetchImpl??fetch,j=Date.now();while((Date.now()-j)/1000<Q){let X=await W(m,{method:"POST",headers:{Accept:"application/json"},body:new URLSearchParams({client_id:V,device_code:J,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});if(!X.ok){let q=await X.text().catch(()=>"");throw new y(`Token request failed: ${X.status} ${q}`)}let N=await X.json(),z=N.error;if(z==null){let q=N.access_token;if(typeof q==="string"&&q)return q;throw new y("No access_token in response")}if(z==="authorization_pending"){await C(Z*1000);continue}if(z==="slow_down"){Z=typeof N.interval==="number"?N.interval:Z+5,await C(Z*1000);continue}if(z==="expired_token")throw new y("Device code expired. Start the login flow again.");if(z==="access_denied")throw new y("Authorization was denied or cancelled.");throw new y(`GitHub OAuth error: ${z}`)}throw new y("Timed out waiting for authorization.")}async function c(J){try{if(process.platform==="darwin")await Y("open",[J],{useCwd:!1,timeout:5000});else if(process.platform==="win32")await Y("cmd",["/c","start","",J],{useCwd:!1,timeout:5000});else await Y("xdg-open",[J],{useCwd:!1,timeout:5000})}catch{}}async function x(J,$){let Z=await($??fetch)(g,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${J}`,..._}});if(!Z.ok){let z=await Z.text().catch(()=>"");throw new y(`Copilot token exchange failed: ${Z.status} ${z}`)}let Q=await Z.json(),W=Q.token,j=Q.expires_at,X=Q.refresh_in,N=Q.endpoints;if(typeof W!=="string"||typeof j!=="number"||typeof X!=="number"||!N||typeof N!=="object"||typeof N.api!=="string")throw new y("Malformed Copilot token response");return{token:W,expires_at:j,refresh_in:X,endpoints:N}}var D="Iv1.b507a08c87ecfe98",F="https://github.com/login/device/code",m="https://github.com/login/oauth/access_token",g="https://api.github.com/copilot_internal/v2/token",R="read:user",_,y;var B=O(()=>{H();_={"User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.99.3","Editor-Plugin-Version":"copilot-chat/0.26.7","Copilot-Integration-Id":"vscode-chat"};y=class y extends Error{constructor(J){super(J);this.name="GitHubDeviceFlowError"}}});function I(){return w()?.transport==="github_copilot"}function S(J){let $=J.match(/exp=(\d+)/);if($){let Q=Number($[1]);if(!Number.isNaN(Q))return Date.now()>=Q*1000?"expired":"valid"}let V=J.split(".");if(V.length===3&&V.every((Q)=>/^[A-Za-z0-9_-]+$/.test(Q)))try{let Q=V[1].replace(/-/g,"+").replace(/_/g,"/"),W=Q+"=".repeat((4-Q.length%4)%4),j=Buffer.from(W,"base64").toString("utf8"),X=JSON.parse(j);if(X&&typeof X==="object"&&X.exp)return Date.now()>=X.exp*1000?"expired":"valid"}catch{return"invalid_format"}return"invalid_format"}function T(){if(K())return;try{return P().read()?.githubModels?.accessToken?.trim()||void 0}catch{return}}async function o(){if(K())return;try{return(await P().readAsync())?.githubModels?.accessToken?.trim()||void 0}catch{return}}function r(){if(!I())return;if(K())return;if(T())return}async function e(){if(!I())return!1;if(K())return!1;try{let V=P().read()?.githubModels,Z=V?.accessToken?.trim()||"",Q=V?.oauthAccessToken?.trim()||"";if(!Z&&!Q)return!1;if((Z?S(Z):"expired")==="valid")return!1;if(!Q)return!1;let j=await x(Q);if(!h(j.token,Q).success)return!1;return!0}catch{return!1}}function h(J,$){if(K())return{success:!1,warning:"Bare mode: secure storage is disabled."};let V=J.trim();if(!V)return{success:!1,warning:"Token is empty."};let Z=P(),Q=Z.read()||{},W=Q[U],j=$?.trim(),X={accessToken:V};if(j)X.oauthAccessToken=j;else if(W?.oauthAccessToken?.trim())X.oauthAccessToken=W.oauthAccessToken.trim();let N={...Q,[U]:X};return Z.update(N)}function JJ(){if(K())return{success:!0};let J=P(),V={...J.read()||{}};return delete V[U],J.update(V)}var U="githubModels",t="CLAUDE_CODE_GITHUB_TOKEN_HYDRATED";var E=O(()=>{G();k();b();B()});
|
|
2
|
+
export{p as k0,u as l0,c as m0,x as n0,B as o0,U as p0,t as q0,T as r0,o as s0,r as t0,e as u0,h as v0,JJ as w0,E as x0};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{D5 as R2,F5 as u4}from"./cli-0.1.12-erggrdth.mjs";import{H5 as h,I5 as jZ}from"./cli-0.1.12-m6jeef2z.mjs";import{J6 as s0,s6 as O}from"./cli-0.1.12-rwzav5h1.mjs";import{$ba as _8,Cba as M,D7 as X1,E7 as r4,Faa as b,Fba as F,Haa as Q2,I7 as K,J_ as P1,Jaa as e,Kaa as C,N7 as c0,S7 as x0,T7 as u5,Taa as q0,U7 as Q5,V_ as U8,Wca as A1,X7 as qZ,Yba as W0,_$ as E1,_ba as k1,aba as K4,ada as y8,cba as zZ,dda as D,gda as V0,haa as O8,i8 as X5,k8 as WZ,mca as M1,oca as I8,pca as V4,qca as i,rca as q2,sca as K0,tca as q4,uca as I2,v_ as Y1,w_ as e4,xca as x2,yba as d,yca as GZ}from"./cli-0.1.12-vzga2are.mjs";import{Kea as H5,Lea as L4,Mea as z0,Oea as h4,Pea as f4,Rea as N,Sea as b0}from"./cli-0.1.12-4wwhk7dc.mjs";import{efa as k0,gfa as Z4,qfa as Q1}from"./cli-0.1.12-g8mny195.mjs";import{gga as j,hga as J2}from"./cli-0.1.12-6x2mnahn.mjs";import{Gga as p,Iga as M5,Mga as A5,Pga as J5,Sga as VZ,Wga as k2,_ga as t4,eha as z,gha as f0,hha as j0}from"./cli-0.1.12-rzpc0tr9.mjs";import{Bha as g,oha as $5,rha as L,tha as u,vha as H2,yha as F4}from"./cli-0.1.12-ra3sby5b.mjs";import{Dla as $2,Ska as f,Yma as r,Zka as J1,aka as R1,bja as $0,cja as n5,oka as b1,ola as y5,pla as T5,qla as C5,rla as S5,ska as e1,xka as O0,yka as t0}from"./cli-0.1.12-pm5cwtxh.mjs";import{vna as y,wna as m0}from"./cli-0.1.12-vgbc3g9x.mjs";import{Rna as m8,Tna as S1,Una as B,Vna as o}from"./cli-0.1.12-1hv04bp7.mjs";function R5(Z){let $=[],J=!1;async function Q(){if(J)return;if($.length===0)return;J=!0;while($.length>0){let{args:X,resolve:Y,reject:V,context:W}=$.shift();try{let G=await Z.apply(W,X);Y(G)}catch(G){V(G)}}if(J=!1,$.length>0)Q()}return function(...X){return new Promise((Y,V)=>{$.push({args:X,resolve:Y,reject:V,context:this}),Q()})}}var w5=()=>{};function L5(Z,$){return Z.find((J)=>J.includes($))??null}async function K5(){let{BedrockClient:Z}=await import("@aws-sdk/client-bedrock"),$=H2(),J=L(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await R2(),...J&&{requestHandler:new(await import("./index-0.1.12-34ew4zjx.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-0.1.12-m0e193t8.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await X0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}async function Y3(){let{BedrockRuntimeClient:Z}=await import("@aws-sdk/client-bedrock-runtime"),$=H2(),J=L(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await R2(),...J&&{requestHandler:new(await import("./index-0.1.12-34ew4zjx.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-0.1.12-m0e193t8.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await X0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}function g4(Z){return Z.startsWith("anthropic.")}function m4(Z){if(!Z.startsWith("arn:"))return Z;let $=Z.lastIndexOf("/");if($===-1)return Z;return Z.substring($+1)}function c4(Z){let $=m4(Z);for(let J of p4)if($.startsWith(`${J}.anthropic.`))return J;return}function q3(Z,$){let J=c4(Z);if(J)return Z.replace(`${J}.`,`${$}.`);if(g4(Z))return`${$}.${Z}`;return Z}var F5,V3,p4;var D5=B(()=>{m0();n();g();c0();u4();F5=y(async function(){let[Z,{ListInferenceProfilesCommand:$}]=await Promise.all([K5(),import("@aws-sdk/client-bedrock")]),J=[],Q;try{do{let X=new $({...Q&&{nextToken:Q},typeEquals:"SYSTEM_DEFINED"}),Y=await Z.send(X);if(Y.inferenceProfileSummaries)J.push(...Y.inferenceProfileSummaries);Q=Y.nextToken}while(Q);return J.filter((X)=>X.inferenceProfileId?.includes("anthropic")).map((X)=>X.inferenceProfileId).filter(Boolean)}catch(X){throw K(X),X}});V3=y(async function(Z){try{let[$,{GetInferenceProfileCommand:J}]=await Promise.all([K5(),import("@aws-sdk/client-bedrock")]),Q=new J({inferenceProfileIdentifier:Z}),X=await $.send(Q);if(!X.models||X.models.length===0)return null;let Y=X.models[0];if(!Y?.modelArn)return null;let V=Y.modelArn.lastIndexOf("/");return V>=0?Y.modelArn.substring(V+1):Y.modelArn}catch($){return K($),null}});p4=["us","eu","apac","global"]});var w2,F2,L2,K2,D2,N2,U2,O2,_2,d0,n0,b2,Y0,z3,N5;var P2=B(()=>{w2={firstParty:"claude-3-7-sonnet-20250219",bedrock:"us.anthropic.claude-3-7-sonnet-20250219-v1:0",vertex:"claude-3-7-sonnet@20250219",foundry:"claude-3-7-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},F2={firstParty:"claude-3-5-sonnet-20241022",bedrock:"anthropic.claude-3-5-sonnet-20241022-v2:0",vertex:"claude-3-5-sonnet-v2@20241022",foundry:"claude-3-5-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},L2={firstParty:"claude-3-5-haiku-20241022",bedrock:"us.anthropic.claude-3-5-haiku-20241022-v1:0",vertex:"claude-3-5-haiku@20241022",foundry:"claude-3-5-haiku",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash-lite",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},K2={firstParty:"claude-haiku-4-5-20251001",bedrock:"us.anthropic.claude-haiku-4-5-20251001-v1:0",vertex:"claude-haiku-4-5@20251001",foundry:"claude-haiku-4-5",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash-lite",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},D2={firstParty:"claude-sonnet-4-20250514",bedrock:"us.anthropic.claude-sonnet-4-20250514-v1:0",vertex:"claude-sonnet-4@20250514",foundry:"claude-sonnet-4",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},N2={firstParty:"claude-sonnet-4-5-20250929",bedrock:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",vertex:"claude-sonnet-4-5@20250929",foundry:"claude-sonnet-4-5",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},U2={firstParty:"claude-opus-4-20250514",bedrock:"us.anthropic.claude-opus-4-20250514-v1:0",vertex:"claude-opus-4@20250514",foundry:"claude-opus-4",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},O2={firstParty:"claude-opus-4-1-20250805",bedrock:"us.anthropic.claude-opus-4-1-20250805-v1:0",vertex:"claude-opus-4-1@20250805",foundry:"claude-opus-4-1",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},_2={firstParty:"claude-opus-4-5-20251101",bedrock:"us.anthropic.claude-opus-4-5-20251101-v1:0",vertex:"claude-opus-4-5@20251101",foundry:"claude-opus-4-5",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},d0={firstParty:"claude-opus-4-6",bedrock:"us.anthropic.claude-opus-4-6-v1",vertex:"claude-opus-4-6",foundry:"claude-opus-4-6",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},n0={firstParty:"claude-opus-4-7",bedrock:"us.anthropic.claude-opus-4-7-v1",vertex:"claude-opus-4-7",foundry:"claude-opus-4-7",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},b2={firstParty:"claude-sonnet-4-6",bedrock:"us.anthropic.claude-sonnet-4-6",vertex:"claude-sonnet-4-6",foundry:"claude-sonnet-4-6",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},Y0={haiku35:L2,haiku45:K2,sonnet35:F2,sonnet37:w2,sonnet40:D2,sonnet45:N2,sonnet46:b2,opus40:U2,opus41:O2,opus45:_2,opus46:d0,opus47:n0},z3=Object.values(Y0).map((Z)=>Z.firstParty),N5=Object.fromEntries(Object.entries(Y0).map(([Z,$])=>[$.firstParty,Z]))});function q(){let Z=D();if(!Z)return"firstParty";switch(Z.transport){case"anthropic":return"firstParty";case"gemini":return"gemini";case"mistral":return"mistral";case"github_copilot":return"github";case"codex_responses":return"codex";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai_compat":{let $=Z.baseUrl?.toLowerCase()??"";if($.includes("nvidia"))return"nvidia-nim";if($.includes("minimax"))return"minimax";return"openai"}default:return"firstParty"}}function x3(){return q()==="firstParty"}function B3(Z){let $=D();if($?.transport!=="github_copilot")return!1;return(Z?.trim()||$.model?.trim()||"").toLowerCase().includes("claude-")}function H3(){return q()}function R3(){let Z=D();if(!Z)return!0;if(Z.transport!=="anthropic")return!1;let $=Z.baseUrl;if(!$)return!0;try{let J=new URL($).host;return["api.anthropic.com"].includes(J)}catch{return!1}}var t=B(()=>{V0()});function i0(Z){let $=Z==="codex"||Z==="github"?"openai":Z,J={};for(let Q of O5)J[Q]=Y0[Q][$];return J}async function d4(){let Z=i0("bedrock"),$;try{$=await F5()}catch(Q){return K(Q),Z}if(!$?.length)return Z;let J={};for(let Q of O5){let X=Y0[Q].firstParty;J[Q]=L5($,X)||Z[Q]}return J}function U5(Z){let $=e().modelOverrides;if(!$)return Z;let J={...Z};for(let[Q,X]of Object.entries($)){let Y=N5[Q];if(Y&&X)J[Y]=X}return J}function l0(Z){let $;try{$=e().modelOverrides}catch{return Z}if(!$)return Z;for(let[J,Q]of Object.entries($))if(Q===Z)return J;return Z}function n4(){if(O0()!==null)return;if(q()!=="bedrock"){t0(i0(q()));return}_5()}function H(){let Z=O0();if(Z===null)return n4(),U5(i0(q()));return U5(Z)}async function _3(){if(O0()!==null)return;if(q()!=="bedrock"){t0(i0(q()));return}await _5()}var O5,_5;var a0=B(()=>{r();c0();w5();q0();D5();P2();t();O5=Object.keys(Y0);_5=R5(async()=>{if(O0()!==null)return;try{let Z=await d4();t0(Z)}catch(Z){K(Z)}})});function v3(){if(L(process.env.DISABLE_COST_WARNINGS))return!1;if(U())return!1;let $=_0(),J=Z0()!==null;if(!$.hasToken&&!J)return!1;let Q=F(),X=Q.oauthAccount?.organizationRole,Y=Q.oauthAccount?.workspaceRole;if(!X||!Y)return!1;return["admin","billing"].includes(X)||["workspace_admin","workspace_billing"].includes(Y)}function I3(){if(b5!==null)return b5;if(!U())return!1;let Z=v();if(Z==="max"||Z==="pro")return!0;let J=F().oauthAccount?.organizationRole;return!!J&&["admin","billing","owner","primary_owner"].includes(J)}var b5=null;var P5=B(()=>{n();W0();g()});function S3(Z){return Z}function M3(){return!1}function E5(){return null}function k5(){return!1}var v5=B(()=>{P5()});async function m3(){let $=F().oauthAccount?.accountUuid,J=Z0();if(!$||!J)return;let Q=`${N().BASE_API_URL}/api/claude_cli_profile`;try{return(await O.get(Q,{headers:{"x-api-key":J,"anthropic-beta":z0},params:{account_uuid:$},timeout:1e4})).data}catch(X){K(X)}}async function G0(Z){let $=`${N().BASE_API_URL}/api/oauth/profile`;try{return(await O.get($,{headers:{Authorization:`Bearer ${Z}`,"Content-Type":"application/json"},timeout:1e4})).data}catch(J){K(J)}}var E2=B(()=>{s0();b0();n();W0();c0()});import{mkdirSync as i4,writeFileSync as l4}from"fs";function o4(Z,$,J){if(!L(process.env.CLAUDE_CODE_REMOTE))return;try{i4(o0,{recursive:!0,mode:448}),l4(Z,$,{encoding:"utf8",mode:384}),z(`Persisted ${J} to ${Z} for subprocess access`)}catch(Q){z(`Failed to persist ${J} to disk (non-fatal): ${p(Q)}`,{level:"error"})}}function I5(Z,$){try{let Q=k2().readFileSync(Z,{encoding:"utf8"}).trim();if(!Q)return null;return z(`Read ${$} from well-known file ${Z}`),Q}catch(J){if(!M5(J))z(`Failed to read ${$} from ${Z}: ${p(J)}`,{level:"debug"});return null}}function h5({envVar:Z,wellKnownPath:$,label:J,getCached:Q,setCached:X}){let Y=Q();if(Y!==void 0)return Y;let V=process.env[Z];if(!V){let G=I5($,J);return X(G),G}let W=parseInt(V,10);if(Number.isNaN(W))return z(`${Z} must be a valid file descriptor number, got: ${V}`,{level:"error"}),X(null),null;try{let G=k2(),x=process.platform==="darwin"||process.platform==="freebsd"?`/dev/fd/${W}`:`/proc/self/fd/${W}`,R=G.readFileSync(x,{encoding:"utf8"}).trim();if(!R)return z(`File descriptor contained empty ${J}`,{level:"error"}),X(null),null;return z(`Successfully read ${J} from file descriptor ${W}`),X(R),o4($,R,J),R}catch(G){z(`Failed to read ${J} from file descriptor ${W}: ${p(G)}`,{level:"error"});let x=I5($,J);return X(x),x}}function r0(){return h5({envVar:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",wellKnownPath:a4,label:"OAuth token",getCached:y5,setCached:T5})}function v2(){return h5({envVar:"CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR",wellKnownPath:s4,label:"API key",getCached:C5,setCached:S5})}var o0="/home/claude/.claude/remote",a4,s4,s3;var f5=B(()=>{r();j0();g();A5();t4();a4=`${o0}/.oauth_token`,s4=`${o0}/.api_key`,s3=`${o0}/.session_ingress_token`});async function g5(){if(process.platform==="darwin"){let Z=i();if((await x0(`security delete-generic-password -a $USER -s "${Z}"`,{shell:!0,reject:!1})).exitCode!==0)throw Error("Failed to delete keychain entry")}}function e0(Z){return Z.slice(-20)}var p5=B(()=>{u5();I2()});function J9(Z){return Z?.name==="CredentialsProviderError"}function m5(Z){if(!Z||typeof Z!=="object")return!1;let $=Z;if(!$.Credentials||typeof $.Credentials!=="object")return!1;let J=$.Credentials;return typeof J.AccessKeyId==="string"&&typeof J.SecretAccessKey==="string"&&typeof J.SessionToken==="string"&&J.AccessKeyId.length>0&&J.SecretAccessKey.length>0&&J.SessionToken.length>0}async function y2(){let{STSClient:Z,GetCallerIdentityCommand:$}=await import("@aws-sdk/client-sts");await new Z().send(new $({}))}async function c5(){try{z("Clearing AWS credential provider cache");let{fromIni:Z}=await import("@aws-sdk/credential-providers");await Z({ignoreCache:!0})(),z("AWS credential provider cache refreshed")}catch(Z){z("Failed to clear AWS credential cache (this is expected if no credentials are configured)")}}var d5=B(()=>{j0()});class S{static instance=null;status={isAuthenticating:!1,output:[]};changed=$0();static getInstance(){if(!S.instance)S.instance=new S;return S.instance}getStatus(){return{...this.status,output:[...this.status.output]}}startAuthentication(){this.status={isAuthenticating:!0,output:[]},this.changed.emit(this.getStatus())}addOutput(Z){this.status.output.push(Z),this.changed.emit(this.getStatus())}setError(Z){this.status.error=Z,this.changed.emit(this.getStatus())}endAuthentication(Z){if(Z)this.status={isAuthenticating:!1,output:[]};else this.status.isAuthenticating=!1;this.changed.emit(this.getStatus())}subscribe=this.changed.subscribe;static reset(){if(S.instance)S.instance.changed.clear(),S.instance=null}}var t5=B(()=>{n5()});var Z2="claude-code-20250219",i5="interleaved-thinking-2025-05-14",P0="context-1m-2025-08-07",l5="context-management-2025-06-27",a5="structured-outputs-2025-12-15",T2="web-search-2025-03-05",s5="advanced-tool-use-2025-11-20",o5="tool-search-tool-2025-10-19",V9="effort-2025-11-24",q9="task-budgets-2026-03-13",r5="prompt-caching-scope-2026-01-05",W9="fast-mode-2026-02-01",e5="redact-thinking-2026-02-12",Z1="token-efficient-tools-2026-03-28",z9="afk-mode-2026-01-31",G9="advisor-tool-2026-03-01",C2,j9;var S2=B(()=>{C2=new Set(["interleaved-thinking-2025-05-14","context-1m-2025-08-07","tool-search-tool-2025-10-19"]),j9=new Set(["claude-code-20250219","interleaved-thinking-2025-05-14","context-management-2025-06-27"])});function A(){if(q()!=="firstParty")return!1;return!L(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)}function V1(){if(!A())return!1;return $8()===null}function Z8(Z,$){switch(Z){case"free":return $==="oauth"?"Fast mode requires a paid subscription":"Fast mode unavailable during evaluation. Please purchase credits.";case"preference":return"Fast mode has been disabled by your organization";case"extra_usage_disabled":return"Fast mode requires extra usage billing · /extra-usage to enable";case"network_error":return"Fast mode unavailable due to network connectivity issues";case"unknown":return"Fast mode is currently unavailable"}}function $8(){if(q()!=="firstParty")return"Fast mode is not available on third-party providers";if(!A())return"Fast mode is not available";let Z=k0("tengu_penguins_off",null);if(Z!==null)return z(`Fast mode unavailable: ${Z}`),Z;if(!Y1()&&k0("tengu_marble_sandcastle",!1))return"Fast mode requires the native binary · Install from: https://claude.com/product/claude-code";if(f()&&$2()&&!J1()){if(!b("flagSettings")?.fastMode)return z("Fast mode unavailable: Fast mode is not available in the Agent SDK"),"Fast mode is not available in the Agent SDK"}if(k.status==="disabled"){if(k.reason==="network_error"||k.reason==="unknown"){if(L(process.env.CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS))return null}let $=w()!==null?"oauth":"api-key",J=Z8(k.reason,$);return z(`Fast mode unavailable: ${J}`),J}return null}function v9(){return"opus"+(I0()?"[1m]":"")}function I9(Z){if(!A())return!1;if(!V1())return!1;if(!q1(Z))return!1;let $=e();if($.fastModePerSessionOptIn)return!1;return $.fastMode===!0}function q1(Z){if(!A())return!1;let $=Z??v0(),J=T($).toLowerCase();return J.includes("opus-4-7")||J.includes("opus-4-6")}function J8(){if(B0.status==="cooldown"&&Date.now()>=B0.resetAt){if(A()&&!M2)z("Fast mode cooldown expired, re-enabling fast mode"),M2=!0,z1.emit();B0={status:"active"}}return B0}function C9(Z,$){if(!A())return;B0={status:"cooldown",resetAt:Z,reason:$},M2=!1;let J=Z-Date.now();z(`Fast mode cooldown triggered (${$}), duration ${Math.round(J/1000)}s`),j("tengu_fast_mode_fallback_triggered",{cooldown_duration_ms:J,cooldown_reason:$}),W1.emit(Z,$)}function S9(){B0={status:"active"}}function M9(){if(k.status==="disabled")return;k={status:"disabled",reason:"preference"},Q2("userSettings",{fastMode:void 0}),M((Z)=>({...Z,penguinModeOrgEnabled:!1})),A2.emit(!1)}function Q8(Z){switch(Z){case"out_of_credits":return"Fast mode disabled · extra usage credits exhausted";case"org_level_disabled":case"org_service_level_disabled":return"Fast mode disabled · extra usage disabled by your organization";case"org_level_disabled_until":return"Fast mode disabled · extra usage spending cap reached";case"member_level_disabled":return"Fast mode disabled · extra usage disabled for your account";case"seat_tier_level_disabled":case"seat_tier_zero_credit_limit":case"member_zero_credit_limit":return"Fast mode disabled · extra usage not available for your plan";case"overage_not_provisioned":case"no_limits_configured":return"Fast mode requires extra usage billing · /extra-usage to enable";default:return"Fast mode disabled · extra usage not available"}}function X8(Z){return Z==="org_level_disabled_until"||Z==="out_of_credits"}function h9(Z){let $=Q8(Z);if(z(`Fast mode overage rejection: ${Z??"unknown"} — ${$}`),j("tengu_fast_mode_overage_rejected",{overage_disabled_reason:Z??"unknown"}),!X8(Z))Q2("userSettings",{fastMode:void 0}),M((J)=>({...J,penguinModeOrgEnabled:!1}));G1.emit($)}function Y8(){return J8().status==="cooldown"}function f9(Z,$){let J=A()&&V1()&&!!$&&q1(Z);if(J&&Y8())return"cooldown";if(J)return"on";return"off"}async function V8(Z){let $=`${N().BASE_API_URL}/api/claude_code_penguin_mode`,J="accessToken"in Z?{Authorization:`Bearer ${Z.accessToken}`,"anthropic-beta":z0}:{"x-api-key":Z.apiKey};return(await O.get($,{headers:J})).data}function g9(){if(!A())return;if(k.status!=="pending")return;k=F().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"unknown"}}async function p9(){if(X1())return;if(!A())return;if(E0)return z("Fast mode prefetch in progress, returning in-flight promise"),E0;let Z=Z0();if(!(w()?.accessToken&&J0())&&!Z){k=F().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"preference"};return}let J=Date.now();if(J-$1<q8){z("Skipping fast mode prefetch, fetched recently");return}$1=J;let Q=async()=>{let Y=w(),V=Y?.accessToken&&J0()?{accessToken:Y.accessToken}:Z?{apiKey:Z}:null;if(!V)throw Error("No auth available");return V8(V)};async function X(){try{let Y;try{Y=await Q()}catch(W){if(O.isAxiosError(W)&&(W.response?.status===401||W.response?.status===403&&typeof W.response?.data==="string"&&W.response.data.includes("OAuth token has been revoked"))){let x=w()?.accessToken;if(x)await h2(x),Y=await Q();else throw W}else throw W}let V=k.status!=="pending"?k.status==="enabled":F().penguinModeOrgEnabled;if(k=Y.enabled?{status:"enabled"}:{status:"disabled",reason:Y.disabled_reason??"preference"},V!==Y.enabled){if(!Y.enabled)Q2("userSettings",{fastMode:void 0});M((W)=>({...W,penguinModeOrgEnabled:Y.enabled})),A2.emit(Y.enabled)}z(`Org fast mode: ${Y.enabled?"enabled":`disabled (${Y.disabled_reason??"preference"})`}`)}catch(Y){k=F().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"network_error"},z(`Failed to fetch org fast mode status, defaulting to ${k.status==="enabled"?"enabled (cached)":"disabled (network_error)"}: ${Y}`,{level:"error"}),j("tengu_org_penguin_mode_fetch_failed",{})}finally{E0=null}}return E0=X(),E0}var k9="Opus 4.7",B0,M2=!1,W1,z1,y9,T9,G1,A9,k,A2,u9,q8=30000,$1=0,E0=null;var j1=B(()=>{s0();b0();Q1();r();J2();n();e4();W0();j0();g();H0();t();r4();q0();n5();B0={status:"active"},W1=$0(),z1=$0(),y9=W1.subscribe,T9=z1.subscribe;G1=$0(),A9=G1.subscribe;k={status:"pending"},A2=$0(),u9=A2.subscribe});function B8(Z){for(let $ of x8)if($.pattern.test(Z))return $.cost;return}function f2(Z){if(A()&&Z)return W8;return T0}function H8(Z,$){return $.input_tokens/1e6*Z.inputTokens+$.output_tokens/1e6*Z.outputTokens+($.cache_read_input_tokens??0)/1e6*Z.promptCacheReadTokens+($.cache_creation_input_tokens??0)/1e6*Z.promptCacheWriteTokens+($.server_tool_use?.web_search_requests??0)*Z.webSearchRequests}function R8(Z,$){let J=P(Z);if(J===_(d0.firstParty)||J===_(n0.firstParty)){let X=$.speed==="fast";return f2(X)}let Q=B1[J];if(!Q){let X=B8(Z);if(X)return X;return w8(Z,J),B1[P(v0())]??j8}return Q}function w8(Z,$){j("tengu_unknown_model_cost",{model:Z,shortName:$}),R1()}function F8(Z,$){let J=R8(Z,$);return H8(J,$)}function l9(Z,$){let J={input_tokens:$.inputTokens,output_tokens:$.outputTokens,cache_read_input_tokens:$.cacheReadInputTokens,cache_creation_input_tokens:$.cacheCreationInputTokens};return F8(Z,J)}function H1(Z){if(Number.isInteger(Z))return`$${Z}`;return`$${Z.toFixed(2)}`}function w1(Z){return`${H1(Z.inputTokens)}/${H1(Z.outputTokens)} per Mtok`}var y0,x1,T0,W8,z8,G8,j8,x8,B1;var F1=B(()=>{J2();r();j1();P2();H0();y0={inputTokens:3,outputTokens:15,promptCacheWriteTokens:3.75,promptCacheReadTokens:0.3,webSearchRequests:0.01},x1={inputTokens:15,outputTokens:75,promptCacheWriteTokens:18.75,promptCacheReadTokens:1.5,webSearchRequests:0.01},T0={inputTokens:5,outputTokens:25,promptCacheWriteTokens:6.25,promptCacheReadTokens:0.5,webSearchRequests:0.01},W8={inputTokens:30,outputTokens:150,promptCacheWriteTokens:37.5,promptCacheReadTokens:3,webSearchRequests:0.01},z8={inputTokens:0.8,outputTokens:4,promptCacheWriteTokens:1,promptCacheReadTokens:0.08,webSearchRequests:0.01},G8={inputTokens:1,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.1,webSearchRequests:0.01},j8=T0,x8=[{pattern:/gpt-5-nano/i,label:"gpt-5-nano",cost:{inputTokens:0.05,outputTokens:0.4,promptCacheWriteTokens:0.05,promptCacheReadTokens:0.005,webSearchRequests:0}},{pattern:/gpt-5-mini/i,label:"gpt-5-mini",cost:{inputTokens:0.25,outputTokens:2,promptCacheWriteTokens:0.25,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gpt-5/i,label:"gpt-5",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gpt-4o-mini/i,label:"gpt-4o-mini",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/gpt-4o/i,label:"gpt-4o",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:1.25,webSearchRequests:0}},{pattern:/gpt-4\.1/i,label:"gpt-4.1",cost:{inputTokens:2,outputTokens:8,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/o4-mini/i,label:"o4-mini",cost:{inputTokens:0.55,outputTokens:2.2,promptCacheWriteTokens:0.55,promptCacheReadTokens:0.275,webSearchRequests:0}},{pattern:/\bo3\b/i,label:"o3",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/\bo1\b/i,label:"o1",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/gemini.*2\.5.*pro/i,label:"gemini-2.5-pro",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini.*2\.5.*flash/i,label:"gemini-2.5-flash",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/gemini.*flash/i,label:"gemini-flash",cost:{inputTokens:0.1,outputTokens:0.4,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gemini.*pro/i,label:"gemini-pro",cost:{inputTokens:1.25,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini/i,label:"gemini",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/deepseek/i,label:"deepseek",cost:{inputTokens:0.14,outputTokens:0.28,promptCacheWriteTokens:0.14,promptCacheReadTokens:0.0028,webSearchRequests:0}},{pattern:/kimi-for-coding/i,label:"kimi-for-coding",cost:{inputTokens:1,outputTokens:2,promptCacheWriteTokens:1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/kimi/i,label:"kimi",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/moonshot/i,label:"moonshot",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/devstral/i,label:"devstral",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/mistral.*large.*3/i,label:"mistral-large-3",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/mistral.*large/i,label:"mistral-large",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:2,webSearchRequests:0}},{pattern:/mistral.*medium/i,label:"mistral-medium",cost:{inputTokens:0.4,outputTokens:2,promptCacheWriteTokens:0.4,promptCacheReadTokens:0.4,webSearchRequests:0}},{pattern:/mistral.*small/i,label:"mistral-small",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*8b/i,label:"ministral-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*3b/i,label:"ministral-3b",cost:{inputTokens:0.04,outputTokens:0.04,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/llama.*405/i,label:"llama-405b",cost:{inputTokens:3.5,outputTokens:3.5,promptCacheWriteTokens:3.5,promptCacheReadTokens:3.5,webSearchRequests:0}},{pattern:/llama.*70/i,label:"llama-70b",cost:{inputTokens:0.59,outputTokens:0.79,promptCacheWriteTokens:0.59,promptCacheReadTokens:0.59,webSearchRequests:0}},{pattern:/llama.*8b/i,label:"llama-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/qwen/i,label:"qwen",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/minimax/i,label:"minimax",cost:{inputTokens:0.2,outputTokens:1.1,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.2,webSearchRequests:0}},{pattern:/\bglm/i,label:"glm",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4.*fast/i,label:"grok-4-fast",cost:{inputTokens:0.2,outputTokens:0.5,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.05,webSearchRequests:0}},{pattern:/grok.*4\.20/i,label:"grok-4.20",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4/i,label:"grok-4",cost:{inputTokens:3,outputTokens:15,promptCacheWriteTokens:3,promptCacheReadTokens:0.75,webSearchRequests:0}},{pattern:/grok/i,label:"grok",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/command-?r-?plus|command-r\+/i,label:"command-r-plus",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?a\b/i,label:"command-a",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?r7b/i,label:"command-r7b",cost:{inputTokens:0.0375,outputTokens:0.15,promptCacheWriteTokens:0.0375,promptCacheReadTokens:0.0375,webSearchRequests:0}},{pattern:/command-?r/i,label:"command-r",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.15,webSearchRequests:0}},{pattern:/gemma.*27b/i,label:"gemma-27b",cost:{inputTokens:0.08,outputTokens:0.16,promptCacheWriteTokens:0.08,promptCacheReadTokens:0.08,webSearchRequests:0}},{pattern:/gemma.*12b/i,label:"gemma-12b",cost:{inputTokens:0.04,outputTokens:0.13,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/gemma/i,label:"gemma",cost:{inputTokens:0.04,outputTokens:0.08,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/phi-?4-?mini/i,label:"phi-4-mini",cost:{inputTokens:0.075,outputTokens:0.3,promptCacheWriteTokens:0.075,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/phi-?4/i,label:"phi-4",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}},{pattern:/\bphi\b/i,label:"phi",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}}];B1={[_(L2.firstParty)]:z8,[_(K2.firstParty)]:G8,[_(F2.firstParty)]:y0,[_(w2.firstParty)]:y0,[_(D2.firstParty)]:y0,[_(N2.firstParty)]:y0,[_(b2.firstParty)]:y0,[_(U2.firstParty)]:x1,[_(O2.firstParty)]:x1,[_(_2.firstParty)]:T0,[_(d0.firstParty)]:T0,[_(n0.firstParty)]:T0}});function m(Z){return L8.includes(Z)}function R0(Z){return K8.includes(Z)}var L8,K8;var u2=B(()=>{L8=["sonnet","opus","haiku","best","sonnet[1m]","opus[1m]","opusplan"];K8=["sonnet","opus","haiku"]});function D8(Z,$){if(Z.includes($))return!0;if(m(Z))return T(Z).toLowerCase().includes($);return!1}function L1(Z,$){if(!Z.startsWith($))return!1;return Z.length===$.length||Z[$.length]==="-"}function N8(Z,$){let J=m(Z)?T(Z).toLowerCase():Z;if(L1(J,$))return!0;if(!$.startsWith("claude-")&&L1(J,`claude-${$}`))return!0;return!1}function K1(Z,$){for(let J of $){if(R0(J))continue;let Q=J.indexOf(Z);if(Q===-1)continue;let X=Q+Z.length;if(X===J.length||J[X]==="-")return!0}return!1}function D1(Z){let $=C()||{},{availableModels:J}=$;if(!J)return!0;if(J.length===0)return!1;let X=l0(Z).trim().toLowerCase(),Y=J.map((V)=>V.trim().toLowerCase());if(Y.includes(X)){if(!R0(X)||!K1(X,Y))return!0}for(let V of Y)if(R0(V)&&!K1(V,Y)&&D8(X,V))return!0;if(m(X)){let V=T(X).toLowerCase();if(Y.includes(V))return!0}for(let V of Y)if(!R0(V)&&m(V)){if(T(V).toLowerCase()===X)return!0}for(let V of Y)if(!R0(V)&&!m(V)){if(N8(X,V))return!0}return!1}var N1=B(()=>{q0();u2();H0();a0()});function J$(){return Object.values(U1)}var U1,g2;var O1=B(()=>{U1={"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2-Codex",family:"gpt-codex",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 mini",family:"gpt-mini",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:264000,output:64000}},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",family:"gpt",attachment:!0,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2023-10",release_date:"2024-05-01",last_updated:"2024-08-06",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",family:"gpt",attachment:!1,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2024-06",release_date:"2024-06-01",last_updated:"2024-06-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",family:"claude-opus",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2026-01",release_date:"2026-04-01",last_updated:"2026-04-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",family:"claude-sonnet",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",family:"claude-haiku",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:144000,output:32768}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",family:"gemini-pro",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image","audio"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:64000}},"grok-code-fast-1":{id:"grok-code-fast-1",name:"Grok Code Fast 1",family:"grok",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:256000,output:64000}}},g2=Object.fromEntries(Object.values(U1).map((Z)=>[Z.id,Z.name]))});function m2(Z){if(typeof Z!=="string")return;let $=Z.trim();return $.length>0?$:void 0}function F0(){let Z=D();if(!Z?.model)return;return k1(Z.model)}function K$(){if(process.env.ANTHROPIC_SMALL_FAST_MODEL)return process.env.ANTHROPIC_SMALL_FAST_MODEL;let Z=F0();if(q()==="gemini")return Z||"gemini-2.0-flash-lite";if(q()==="mistral")return Z||"ministral-3b-latest";if(q()==="openai")return Z||"gpt-4o-mini";if(q()==="codex")return Z||"codexspark";if(q()==="github")return Z||"github:copilot";if(q()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.5-highspeed";return v1()}function D$(Z){return Z===H().opus40||Z===H().opus41||Z===H().opus45||Z===H().opus46||Z===H().opus47}function p2(){let Z,$=b1();if($!==void 0)Z=$;else{let J=C()||{},Q=m2(J.model);Z=F0()||Q||void 0}if(Z&&!D1(Z))return;return Z}function N$(){let Z=p2();if(Z!==void 0&&Z!==null)return T(Z);return I1()}function b8(){return w0()}function w0(){if(process.env.ANTHROPIC_DEFAULT_OPUS_MODEL)return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;let Z=F0();if(q()==="gemini")return Z||"gemini-2.5-pro";if(q()==="mistral")return Z||"devstral-latest";if(q()==="openai")return Z||"gpt-4o";if(q()==="codex")return Z||"gpt-5.5";if(q()==="github")return Z||"github:copilot";if(q()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.7";if(q()!=="firstParty")return H().opus46;return H().opus47}function C0(){if(process.env.ANTHROPIC_DEFAULT_SONNET_MODEL)return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;let Z=F0();if(q()==="gemini")return Z||"gemini-2.0-flash";if(q()==="mistral")return Z||"mistral-medium-latest";if(q()==="openai")return Z||"gpt-4o";if(q()==="codex")return Z||"gpt-5.5";if(q()==="github")return Z||"github:copilot";if(q()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.5";if(q()!=="firstParty")return H().sonnet45;return H().sonnet46}function v1(){if(process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL)return process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;let Z=F0();if(q()==="mistral")return Z||"ministral-3b-latest";if(q()==="openai")return Z||"gpt-4o-mini";if(q()==="codex")return Z||"gpt-5.5";if(q()==="github")return Z||"github:copilot";if(q()==="gemini")return Z||"gemini-2.0-flash-lite";if(q()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(q()==="minimax")return Z||"MiniMax-M2.5-highspeed";return H().haiku45}function U$(Z){let{permissionMode:$,mainLoopModel:J,exceeds200kTokens:Q=!1}=Z;if(p2()==="opusplan"&&$==="plan"&&!Q)return w0();if(p2()==="haiku"&&$==="plan")return C0();return J}function v0(){let Z=F0();if(q()==="github"){let $=C()||{};return m2($.model)||Z||"github:copilot"}if(q()==="gemini")return Z||"gemini-2.0-flash";if(q()==="mistral")return Z||"devstral-latest";if(q()==="openai")return Z||"gpt-4o";if(q()==="codex")return Z||"gpt-5.5";if(X2())return w0()+(I0()?"[1m]":"");if(Y2())return w0()+(I0()?"[1m]":"");return C0()}function I1(){return T(v0())}function _(Z){if(Z=Z.toLowerCase(),Z.includes("claude-opus-4-7"))return"claude-opus-4-7";if(Z.includes("claude-opus-4-6"))return"claude-opus-4-6";if(Z.includes("claude-opus-4-5"))return"claude-opus-4-5";if(Z.includes("claude-opus-4-1"))return"claude-opus-4-1";if(Z.includes("claude-opus-4"))return"claude-opus-4";if(Z.includes("claude-sonnet-4-6"))return"claude-sonnet-4-6";if(Z.includes("claude-sonnet-4-5"))return"claude-sonnet-4-5";if(Z.includes("claude-sonnet-4"))return"claude-sonnet-4";if(Z.includes("claude-haiku-4-5"))return"claude-haiku-4-5";if(Z.includes("claude-3-7-sonnet"))return"claude-3-7-sonnet";if(Z.includes("claude-3-5-sonnet"))return"claude-3-5-sonnet";if(Z.includes("claude-3-5-haiku"))return"claude-3-5-haiku";if(Z.includes("claude-3-opus"))return"claude-3-opus";if(Z.includes("claude-3-sonnet"))return"claude-3-sonnet";if(Z.includes("claude-3-haiku"))return"claude-3-haiku";let $=Z.match(/(claude-(\d+-\d+-)?\w+)/);if($&&$[1])return $[1];return Z}function P(Z){return _(l0(Z))}function P8(Z=!1){if(X2()||Y2()){if(I0())return`Opus 4.7 with 1M context · Most capable for complex work${Z?_1(!0):""}`;return`Opus 4.7 · Most capable for complex work${Z?_1(!0):""}`}return"Sonnet 4.6 · Best for everyday tasks"}function O$(Z){if(Z==="opusplan")return"Opus 4.7 in plan mode, else Sonnet 4.6";return T1(T(Z))}function _1(Z){if(q()!=="firstParty")return"";let $=w1(f2(Z));return` ·${Z?` (${P1})`:""} ${$}`}function I0(){if(L0()||n2()||q()!=="firstParty")return!1;if(U()&&v()===null)return!1;return!0}function _$(Z){if(Z==="opusplan")return"Opus Plan";if(Z==="codexplan")return"codexplan (gpt-5.5)";if(Z==="codexspark")return"codexspark (gpt-5.3-codex-spark)";if(m(Z))return E1(Z);return T1(Z)}function y1(Z){if(q()==="openai"||q()==="gemini"||q()==="codex"||q()==="github"){if(g2[Z])return g2[Z];return null}switch(Z){case"gpt-5.5":return"GPT-5.5";case"gpt-5.4":return"GPT-5.4";case"gpt-5.3-codex-spark":return"GPT-5.3 Codex Spark";case H().opus47:return"Opus 4.7";case H().opus47+"[1m]":return"Opus 4.7 (1M context)";case H().opus46:return"Opus 4.6";case H().opus46+"[1m]":return"Opus 4.6 (1M context)";case H().opus45:return"Opus 4.5";case H().opus41:return"Opus 4.1";case H().opus40:return"Opus 4";case H().sonnet46+"[1m]":return"Sonnet 4.6 (1M context)";case H().sonnet46:return"Sonnet 4.6";case H().sonnet45+"[1m]":return"Sonnet 4.5 (1M context)";case H().sonnet45:return"Sonnet 4.5";case H().sonnet40:return"Sonnet 4";case H().sonnet40+"[1m]":return"Sonnet 4 (1M context)";case H().sonnet37:return"Sonnet 3.7";case H().sonnet35:return"Sonnet 3.5";case H().haiku45:return"Haiku 4.5";case H().haiku35:return"Haiku 3.5";default:return null}}function T1(Z){let $=y1(Z);if($)return $;if(Z==="github:copilot")return"GPT-4o";return Z}function b$(Z){let $=y1(Z);if($)return`Claude ${$}`;return`Claude (${Z})`}function T(Z){let $=m2(Z);if(!$)return C0();let J=$.toLowerCase(),Q=l(J),X=Q?J.replace(/\[1m]$/i,"").trim():J;if(m(X))switch(X){case"opusplan":return C0()+(Q?"[1m]":"");case"sonnet":return C0()+(Q?"[1m]":"");case"haiku":return v1()+(Q?"[1m]":"");case"opus":return w0()+(Q?"[1m]":"");case"best":return b8();default:}if(X==="codexplan")return"gpt-5.5";if(X==="codexspark")return"gpt-5.3-codex-spark";if(q()==="firstParty"&&k8(X)&&v8())return w0()+(Q?"[1m]":"");if(Q)return $.replace(/\[1m\]$/i,"").trim()+"[1m]";return $}function P$(Z,$){if(l(Z)||!l($))return Z;if(c2(T(Z)))return Z+"[1m]";return Z}function k8(Z){return E8.includes(Z)}function v8(){return!L(process.env.CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP)}function E$(Z){if(Z===null){if(U())return`Default (${P8()})`;return`Default (${I1()})`}let $=T(Z);return Z===$?$:`${Z} (${$})`}function k$(Z){if(q()==="foundry")return;let $=Z.toLowerCase().includes("[1m]"),J=P(Z);if(J.includes("claude-opus-4-7"))return $?"Opus 4.7 (with 1M context)":"Opus 4.7";if(J.includes("claude-opus-4-6"))return $?"Opus 4.6 (with 1M context)":"Opus 4.6";if(J.includes("claude-opus-4-5"))return"Opus 4.5";if(J.includes("claude-opus-4-1"))return"Opus 4.1";if(J.includes("claude-opus-4"))return"Opus 4";if(J.includes("claude-sonnet-4-6"))return $?"Sonnet 4.6 (with 1M context)":"Sonnet 4.6";if(J.includes("claude-sonnet-4-5"))return $?"Sonnet 4.5 (with 1M context)":"Sonnet 4.5";if(J.includes("claude-sonnet-4"))return $?"Sonnet 4 (with 1M context)":"Sonnet 4";if(J.includes("claude-3-7-sonnet"))return"Claude 3.7 Sonnet";if(J.includes("claude-3-5-sonnet"))return"Claude 3.5 Sonnet";if(J.includes("claude-haiku-4-5"))return"Haiku 4.5";if(J.includes("claude-3-5-haiku"))return"Claude 3.5 Haiku";return}function v$(Z){return Z.replace(/\[(1|2)m\]/gi,"")}var E8;var H0=B(()=>{r();V0();n();d2();g();_8();a0();F1();q0();t();U8();N1();u2();O8();O1();E8=["claude-opus-4-20250514","claude-opus-4-1-20250805","claude-opus-4-0","claude-opus-4-1"]});function t2(Z){return}async function y$(){}var C1=()=>{};var p1={};S1(p1,{prefetchOpenAICompatibleModels:()=>p8,getDiscoveredContextWindow:()=>T8,discoverOpenAICompatibleModelOptions:()=>g1});function T8(Z){return f1.get(Z)}function C8(){return(D()?.baseUrl??"https://api.openai.com/v1").replace(/\/+$/,"")}function u1(Z){try{let $=new URL(Z).hostname.toLowerCase();return $.endsWith(".openai.azure.com")||$.endsWith(".cognitiveservices.azure.com")}catch{return!1}}function S8(Z){try{return new URL(Z).hostname.toLowerCase().includes("bankr")}catch{return!1}}function M8(Z){let $=D()?.apiKey?.trim();if(!$)return{};if(S8(Z))return{"X-API-Key":$};let J={Authorization:`Bearer ${$}`};if(u1(Z))J["api-key"]=$;return J}function A8(Z){let $=Z.endsWith("/v1")?`${Z}/models`:`${Z}/v1/models`,J=`${Z}/models`,Q=process.env.OPENAI_API_VERSION?.trim(),X=Q&&u1(Z)?(Y)=>{try{let V=new URL(Y);return V.searchParams.set("api-version",Q),V.toString()}catch{return Y}}:(Y)=>Y;if($===J)return[X($)];return[X($),X(J)]}function h8(Z){try{let $=new URL(Z),J=$.pathname.replace(/\/+$/,""),X=`${J.endsWith("/v1")?J.slice(0,-3):J}/api/tags`.replace(/\/{2,}/g,"/");return`${$.origin}${X}`}catch{return null}}function f8(Z){if(Z>=1e6)return`${Z/1e6}M ctx`;if(Z>=1000)return`${Math.round(Z/1000)}K ctx`;return`${Z} ctx`}async function u8(Z,$){let J=new Set;for(let Q of Z)try{let X=await O.get(Q,{headers:$,timeout:h1}),Y=[];for(let V of X.data?.data??[]){let W=V.id?.trim();if(!W||J.has(W))continue;J.add(W);let G=V.name?.trim()||W,x=V.context_length??null;if(x&&x>0)f1.set(W,x);let R=x?` · ${f8(x)}`:"";Y.push({value:W,label:G,description:`${W}${R}`})}if(Y.length>0)return Y.sort((V,W)=>{let G=String(V.value).split("/")[0]??"",x=String(W.value).split("/")[0]??"",R=G.localeCompare(x);return R!==0?R:String(V.value).localeCompare(String(W.value))}),Y}catch{z(`[ModelDiscovery] Failed to fetch OpenAI models from ${Q}`)}return[]}async function g8(Z,$){try{let J=await O.get(Z,{headers:$,timeout:h1}),Q=new Set;return(J.data?.models??[]).map((X)=>X.name?.trim()??"").filter((X)=>{if(!X||Q.has(X))return!1;return Q.add(X),!0}).map((X)=>({value:X,label:X,description:"Ollama model"}))}catch{return z(`[ModelDiscovery] Failed to fetch Ollama models from ${Z}`),[]}}async function g1(){if(q()!=="openai")return[];let Z=C8(),$=M8(Z),J=await u8(A8(Z),$);if(J.length>0)return J;let Q=h8(Z);if(Q)return g8(Q,$);return[]}function p8(){if(S0)return S0;return S0=(async()=>{if(!A1()?.startsWith("openai:"))return;try{let $=await g1();if($.length>0)M1($)}catch{}finally{S0=null}})(),S0}var h1=5000,f1,S0=null;var m1=B(()=>{s0();V0();y8();j0();t();I8();f1=new Map});function d1(Z,$,J){let Q=D()?.model?.trim();if(Q&&Q!==J){let Y=`${Q}:${J}`;if($[Y]!==void 0)return $[Y];if(Z[Y]!==void 0)return Z[Y]}let X=c1($,J);if(X!==void 0)return X;return c1(Z,J)}function c1(Z,$){if(Z[$]!==void 0)return Z[$];let J=Object.keys(Z).sort((Q,X)=>X.length-Q.length);for(let Q of J)if($.startsWith(Q))return Z[Q];return}function n1(Z){let $=d1(c8,n8,Z);if($!==void 0)return $;try{let{getDiscoveredContextWindow:J}=(m1(),m8(p1));return J(Z)}catch{return}}function t1(Z){return d1(d8,t8,Z)}var c8,d8,n8,t8;var i1=B(()=>{V0();c8={"github:copilot":128000,"github:copilot:claude-haiku-4.5":144000,"github:copilot:claude-sonnet-4.6":200000,"github:copilot:claude-opus-4.7":200000,"github:copilot:gpt-4.1":128000,"github:copilot:gpt-4o":128000,"github:copilot:gpt-5-mini":264000,"github:copilot:gpt-5.2-codex":400000,"github:copilot:gpt-5.4":400000,"github:copilot:gpt-5.5":400000,"github:copilot:gemini-3.1-pro-preview":200000,"github:copilot:grok-code-fast-1":256000,"github_copilot/claude-haiku-4.5":144000,"github_copilot/claude-sonnet-4.6":200000,"github_copilot/claude-opus-4.7":200000,"github_copilot/gpt-4.1":128000,"github_copilot/gpt-4o":128000,"github_copilot/gpt-5-mini":264000,"github_copilot/gpt-5.2-codex":400000,"github_copilot/gpt-5.4":400000,"github_copilot/gpt-5.5":400000,"github_copilot/gemini-3.1-pro-preview":200000,"github_copilot/grok-code-fast-1":256000,"gpt-5.5":1050000,"gpt-5.5-mini":400000,"gpt-5.5-nano":400000,"gpt-5.4":1050000,"gpt-5.4-mini":400000,"gpt-5.4-nano":400000,"gpt-4o":128000,"gpt-4o-mini":128000,"gpt-4.1":1047576,"gpt-4.1-mini":1047576,"gpt-4.1-nano":1047576,"gpt-4-turbo":128000,"gpt-4":8192,o1:200000,"o1-mini":128000,"o1-preview":128000,"o1-pro":200000,o3:200000,"o3-mini":200000,"o4-mini":200000,"deepseek-v4-flash":1048576,"deepseek-v4-pro":1048576,"deepseek-chat":128000,"deepseek-reasoner":128000,"llama-3.3-70b-versatile":128000,"llama-3.1-8b-instant":128000,"mixtral-8x7b-32768":32768,"mistral-large-latest":256000,"mistral-small-latest":256000,"devstral-latest":256000,"ministral-3b-latest":256000,"nvidia/llama-3.1-nemotron-70b-instruct":128000,"nvidia/llama-3.1-nemotron-ultra-253b-v1":128000,"nvidia/nemotron-mini-4b-instruct":32768,"meta/llama-3.1-405b-instruct":128000,"meta/llama-3.1-70b-instruct":128000,"meta/llama-3.1-8b-instruct":128000,"meta/llama-3.2-90b-instruct":128000,"meta/llama-3.2-1b-instruct":128000,"meta/llama-3.2-3b-instruct":128000,"meta/llama-3.3-70b-instruct":128000,"google/gemma-2-27b-it":8192,"google/gemma-2-9b-it":8192,"google/gemma-3-27b-it":131072,"google/gemma-3-12b-it":131072,"google/gemma-3-4b-it":131072,"deepseek-ai/deepseek-r1":128000,"deepseek-ai/deepseek-v3":128000,"deepseek-ai/deepseek-v3.2":128000,"qwen/qwen3-32b":128000,"qwen/qwen3-8b":128000,"qwen/qwen2.5-7b-instruct":32768,"mistralai/mistral-large-3-675b-instruct-2512":256000,"mistralai/mistral-large-2-instruct":256000,"mistralai/mistral-small-3.1-24b-instruct-2503":32768,"mistralai/mixtral-8x7b-instruct-v0.1":32768,"microsoft/phi-4-mini-instruct":16384,"microsoft/phi-3.5-mini-instruct":16384,"microsoft/phi-3-mini-128k-instruct":128000,"ibm/granite-3.3-8b-instruct":8192,"ibm/granite-8b-code-instruct":8192,"z-ai/glm5":200000,"z-ai/glm4.7":128000,"moonshotai/kimi-k2.5":200000,"moonshotai/kimi-k2-instruct":128000,"databricks/dbrx-instruct":131072,"ai21labs/jamba-1.5-large-instruct":256000,"ai21labs/jamba-1.5-mini-instruct":256000,"01-ai/yi-large":32768,"MiniMax-M2.7":204800,"MiniMax-M2.7-highspeed":204800,"MiniMax-M2.5":204800,"MiniMax-M2.5-highspeed":204800,"MiniMax-M2.1":204800,"MiniMax-M2.1-highspeed":204800,"minimax-m2.7":204800,"minimax-m2.7-highspeed":204800,"minimax-m2.5":204800,"minimax-m2.5-highspeed":204800,"minimax-m2.1":204800,"minimax-m2.1-highspeed":204800,"MiniMax-Text-01":524288,"MiniMax-Text-01-Preview":262144,"MiniMax-Vision-01":32768,"MiniMax-Vision-01-Fast":16384,"MiniMax-M2":204800,"google/gemini-2.0-flash":1048576,"google/gemini-2.5-pro":1048576,"gemini-2.0-flash":1048576,"gemini-2.5-pro":1048576,"gemini-2.5-flash":1048576,"gemini-3.1-pro":1048576,"gemini-3.1-flash-lite-preview":1048576,"llama3.3:70b":128000,"llama3.1:8b":128000,"llama3.2:3b":128000,"qwen2.5-coder:32b":32768,"qwen2.5-coder:7b":32768,"deepseek-coder-v2:16b":163840,"deepseek-r1:14b":65536,"mistral:7b":32768,"phi4:14b":16384,"gemma2:27b":8192,"codellama:13b":16384,"llama3.2:1b":128000,"qwen3:8b":128000,codestral:32768,"qwen3.6-plus":1e6,"qwen3.5-plus":1e6,"qwen3-coder-plus":1e6,"qwen3-coder-next":262144,"qwen3-max":262144,"qwen3-max-2026-01-23":262144,"kimi-k2.5":262144,"glm-5":202752,"glm-4.7":202752,"kimi-for-coding":262144,"kimi-k2.6":262144,"kimi-k2":131072,"kimi-k2-instruct":131072,"kimi-k2-thinking":262144,"moonshot-v1-8k":8192,"moonshot-v1-32k":32768,"moonshot-v1-128k":131072},d8={"github:copilot":16384,"github:copilot:claude-haiku-4.5":32768,"github:copilot:claude-sonnet-4.6":32000,"github:copilot:claude-opus-4.7":32000,"github:copilot:gpt-4.1":16384,"github:copilot:gpt-4o":16384,"github:copilot:gpt-5-mini":64000,"github:copilot:gpt-5.2-codex":128000,"github:copilot:gpt-5.4":128000,"github:copilot:gpt-5.5":128000,"github:copilot:gemini-3.1-pro-preview":64000,"github:copilot:grok-code-fast-1":64000,"github_copilot/claude-haiku-4.5":32768,"github_copilot/claude-sonnet-4.6":32000,"github_copilot/claude-opus-4.7":32000,"github_copilot/gpt-4.1":16384,"github_copilot/gpt-4o":16384,"github_copilot/gpt-5-mini":64000,"github_copilot/gpt-5.2-codex":128000,"github_copilot/gpt-5.4":128000,"github_copilot/gpt-5.5":128000,"github_copilot/gemini-3.1-pro-preview":64000,"github_copilot/grok-code-fast-1":64000,"gpt-5.5":128000,"gpt-5.5-mini":128000,"gpt-5.5-nano":128000,"gpt-5.4":128000,"gpt-5.4-mini":128000,"gpt-5.4-nano":128000,"gpt-4o":16384,"gpt-4o-mini":16384,"gpt-4.1":32768,"gpt-4.1-mini":32768,"gpt-4.1-nano":32768,"gpt-4-turbo":4096,"gpt-4":4096,o1:1e5,"o1-mini":65536,"o1-preview":32768,"o1-pro":1e5,o3:1e5,"o3-mini":1e5,"o4-mini":1e5,"deepseek-v4-flash":262144,"deepseek-v4-pro":262144,"deepseek-chat":8192,"deepseek-reasoner":65536,"llama-3.3-70b-versatile":32768,"llama-3.1-8b-instant":8192,"mixtral-8x7b-32768":32768,"mistral-large-latest":32768,"mistral-small-latest":32768,"MiniMax-M2.7":131072,"MiniMax-M2.7-highspeed":131072,"MiniMax-M2.5":131072,"MiniMax-M2.5-highspeed":131072,"MiniMax-M2.1":131072,"MiniMax-M2.1-highspeed":131072,"minimax-m2.7":131072,"minimax-m2.7-highspeed":131072,"minimax-m2.5":131072,"minimax-m2.5-highspeed":131072,"minimax-m2.1":131072,"minimax-m2.1-highspeed":131072,"MiniMax-M2":131072,"MiniMax-Text-01":65536,"MiniMax-Text-01-Preview":65536,"MiniMax-Vision-01":16384,"MiniMax-Vision-01-Fast":16384,"google/gemini-2.0-flash":8192,"google/gemini-2.5-pro":65536,"gemini-2.0-flash":8192,"gemini-2.5-pro":65536,"gemini-2.5-flash":65536,"gemini-3.1-pro":65536,"gemini-3.1-flash-lite-preview":65536,"llama3.3:70b":4096,"llama3.1:8b":4096,"llama3.2:3b":4096,"qwen2.5-coder:32b":8192,"qwen2.5-coder:7b":8192,"deepseek-coder-v2:16b":8192,"deepseek-r1:14b":8192,"mistral:7b":4096,"phi4:14b":4096,"gemma2:27b":4096,"codellama:13b":4096,"llama3.2:1b":4096,"qwen3:8b":8192,codestral:8192,"nvidia/llama-3.1-nemotron-70b-instruct":32768,"nvidia/nemotron-mini-4b-instruct":8192,"meta/llama-3.1-405b-instruct":32768,"meta/llama-3.1-70b-instruct":32768,"meta/llama-3.2-90b-instruct":32768,"meta/llama-3.3-70b-instruct":32768,"google/gemma-2-27b-it":4096,"google/gemma-3-27b-it":16384,"google/gemma-3-12b-it":16384,"deepseek-ai/deepseek-r1":32768,"deepseek-ai/deepseek-v3":32768,"deepseek-ai/deepseek-v3.2":32768,"qwen/qwen3-32b":32768,"qwen/qwen2.5-7b-instruct":8192,"mistralai/mistral-large-3-675b-instruct-2512":32768,"mistralai/mixtral-8x7b-instruct-v0.1":8192,"microsoft/phi-4-mini-instruct":4096,"microsoft/phi-3.5-mini-instruct":4096,"ibm/granite-3.3-8b-instruct":4096,"z-ai/glm5":32768,"moonshotai/kimi-k2.5":32768,"databricks/dbrx-instruct":32768,"ai21labs/jamba-1.5-large-instruct":32768,"01-ai/yi-large":8192,"qwen3.6-plus":65536,"qwen3.5-plus":65536,"qwen3-coder-plus":65536,"qwen3-coder-next":65536,"qwen3-max":32768,"qwen3-max-2026-01-23":32768,"kimi-k2.5":32768,"glm-5":16384,"glm-4.7":16384,"kimi-for-coding":32768,"kimi-k2.6":32768,"kimi-k2":32768,"kimi-k2-instruct":32768,"kimi-k2-thinking":32768,"moonshot-v1-8k":4096,"moonshot-v1-32k":16384,"moonshot-v1-128k":32768},n8=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_CONTEXT_WINDOWS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})(),t8=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_MAX_OUTPUT_TOKENS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})()});function l1(){let Z=D()?.transport;return Z==="openai_compat"||Z==="gemini"||Z==="mistral"||Z==="github_copilot"||Z==="codex_responses"}function L0(){return L(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)}function l(Z){if(L0())return!1;return/\[1m\]/i.test(Z)}function c2(Z){if(L0())return!1;let $=P(Z);return $.includes("claude-sonnet-4")||$.includes("opus-4-6")||$.includes("opus-4-7")}function o$(Z,$){if(l(Z))return 1e6;if(l1()){let Q=n1(Z);if(Q!==void 0)return Q;return console.error(`[context] Warning: model "${Z}" not in context window table — using conservative 128k default. `+"Add it to src/utils/model/openaiContextWindows.ts for accurate compaction."),i8}let J=t2(Z);if(J?.max_input_tokens&&J.max_input_tokens>=1e5){if(J.max_input_tokens>i2&&L0())return i2;return J.max_input_tokens}if($?.includes(P0)&&c2(Z))return 1e6;if(s8(Z))return 1e6;return i2}function s8(Z){if(L0())return!1;if(l(Z))return!1;if(!P(Z).includes("sonnet-4-6"))return!1;return F().clientDataCache?.coral_reef_sonnet==="true"}function r$(Z,$){if(!Z)return{used:null,remaining:null};let J=Z.input_tokens+Z.cache_creation_input_tokens+Z.cache_read_input_tokens,Q=Math.round(J/$*100),X=Math.min(100,Math.max(0,Q));return{used:X,remaining:100-X}}function o8(Z){let $,J;if(l1()){let Y=t1(Z);if(Y!==void 0)return{default:Y,upperLimit:Y}}let Q=P(Z);if(Q.includes("opus-4-7")||Q.includes("opus-4-6"))$=64000,J=128000;else if(Q.includes("sonnet-4-6"))$=32000,J=128000;else if(Q.includes("opus-4-5")||Q.includes("sonnet-4")||Q.includes("haiku-4"))$=32000,J=64000;else if(Q.includes("opus-4-1")||Q.includes("opus-4"))$=32000,J=32000;else if(Q.includes("claude-3-opus"))$=4096,J=4096;else if(Q.includes("claude-3-sonnet"))$=8192,J=8192;else if(Q.includes("claude-3-haiku"))$=4096,J=4096;else if(Q.includes("3-5-sonnet")||Q.includes("3-5-haiku"))$=8192,J=8192;else if(Q.includes("3-7-sonnet"))$=32000,J=64000;else $=l8,J=a8;let X=t2(Z);if(X?.max_tokens&&X.max_tokens>=4096)J=X.max_tokens,$=Math.min($,J);return{default:$,upperLimit:J}}function e$(Z){return o8(Z).upperLimit-1}var i2=200000,i8,l$=20000,l8=32000,a8=64000,a$=8000,s$=64000;var d2=B(()=>{S2();V0();W0();g();H0();C1();i1();i8=(()=>{let Z=parseInt(process.env.CLAUDE_CODE_OPENAI_FALLBACK_CONTEXT_WINDOW??"",10);return!isNaN(Z)&&Z>0?Z:128000})()});var r8,a1;var s1=B(()=>{m0();t();r8=[{modelEnvVar:"ANTHROPIC_DEFAULT_OPUS_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES"},{modelEnvVar:"ANTHROPIC_DEFAULT_SONNET_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES"},{modelEnvVar:"ANTHROPIC_DEFAULT_HAIKU_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES"}],a1=y((Z,$)=>{if(q()==="firstParty")return;let J=Z.toLowerCase();for(let Q of r8){let X=process.env[Q.modelEnvVar],Y=process.env[Q.capabilitiesEnvVar];if(!X||Y===void 0)continue;if(J!==X.toLowerCase())continue;return Y.toLowerCase().split(",").map((V)=>V.trim()).includes($)}return},(Z,$)=>`${Z.toLowerCase()}:${$}`)});function e8(Z){let $=[],J=[];for(let Q of Z)if($4.includes(Q))$.push(Q);else J.push(Q);return{allowed:$,disallowed:J}}function FJ(Z){if(!Z||Z.length===0)return;if(U()){console.warn("Warning: Custom betas are only available for API key users. Ignoring provided betas.");return}let{allowed:$,disallowed:J}=e8(Z);for(let Q of J)console.warn(`Warning: Beta header '${Q}' is not allowed. Only the following betas are supported: ${$4.join(", ")}`);return $.length>0?$:void 0}function o1(Z){let $=a1(Z,"interleaved_thinking");if($!==void 0)return $;let J=P(Z),Q=q();if(Q==="foundry")return!0;if(Q==="firstParty")return!J.includes("claude-3-");return J.includes("claude-opus-4")||J.includes("claude-sonnet-4")}function ZZ(Z){let $=P(Z);return $.includes("claude-opus-4")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function $Z(Z){let $=P(Z),J=q();if(J==="foundry")return!0;if(J==="firstParty")return!$.includes("claude-3-");return $.includes("claude-opus-4")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function JZ(Z){let $=P(Z),J=q();if(J!=="firstParty"&&J!=="foundry")return!1;return $.includes("claude-sonnet-4-6")||$.includes("claude-sonnet-4-5")||$.includes("claude-opus-4-1")||$.includes("claude-opus-4-5")||$.includes("claude-opus-4-6")||$.includes("claude-opus-4-7")||$.includes("claude-haiku-4-5")}function LJ(Z){let $=P(Z);if(!$.startsWith("claude-"))return!1;if($.includes("claude-3-"))return!1;if(/claude-(opus|sonnet|haiku)-4(?!-[6-9])/.test($))return!1;return!0}function KJ(){let Z=q();if(Z==="vertex"||Z==="bedrock")return o5;return s5}function r1(){return(q()==="firstParty"||q()==="foundry")&&!L(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function DJ(){return q()==="firstParty"&&!L(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function NJ(Z,$){let J=[...J4(Z)];if($?.isAgenticQuery){if(!J.includes(Z2))J.push(Z2)}let Q=e1();if(!Q||Q.length===0)return J;return[...J,...Q.filter((X)=>!J.includes(X))]}function Q4(){l2.cache?.clear?.(),J4.cache?.clear?.(),QZ.cache?.clear?.()}var $4,l2,J4,QZ;var X4=B(()=>{m0();Q1();r();S2();b0();n();d2();g();H0();s1();t();q0();$4=[P0];l2=y((Z)=>{let $=[],J=P(Z).includes("haiku"),Q=q(),X=r1();if(!J)$.push(Z2);if(U())$.push(z0);if(l(Z))$.push(P0);if(!L(process.env.DISABLE_INTERLEAVED_THINKING)&&o1(Z))$.push(i5);if(X&&o1(Z)&&!f()&&e().showThinkingSummaries!==!0)$.push(e5);let Y=$Z(Z);if(r1()&&Y)$.push(l5);let V=Z4("tengu_tool_pear"),W=!V&&(L(process.env.CLAUDE_CODE_JSON_TOOL_USE)||k0("tengu_amber_json_tools",!1));if(X&&JZ(Z)&&V)$.push(a5);if(X&&W)$.push(Z1);if(Q==="vertex"&&ZZ(Z))$.push(T2);if(Q==="foundry")$.push(T2);if(X)$.push(r5);if(process.env.ANTHROPIC_BETAS)$.push(...process.env.ANTHROPIC_BETAS.split(",").map((G)=>G.trim()).filter(Boolean));return $}),J4=y((Z)=>{let $=l2(Z);if(q()==="bedrock")return $.filter((J)=>!C2.has(J));return $}),QZ=y((Z)=>{return l2(Z).filter((J)=>C2.has(J))})});import{execFile as XZ}from"child_process";function Y4(Z){return new Promise(($)=>{XZ("security",["find-generic-password","-a",q2(),"-w","-s",Z],{encoding:"utf-8",timeout:YZ},(J,Q)=>{$({stdout:J?null:Q?.trim()||null,timedOut:Boolean(J&&"killed"in J&&J.killed)})})})}function PJ(){if(process.platform!=="darwin"||V2||u())return;let Z=Y4(i(V4)),$=Y4(i());V2=Promise.all([Z,$]).then(([J,Q])=>{if(!J.timedOut)q4(J.stdout);if(!Q.timedOut)a2={stdout:Q.stdout}})}async function EJ(){if(V2)await V2}function W4(){return a2}function s2(){a2=null}var YZ=1e4,a2=null,V2=null;var z4=B(()=>{g();I2()});function o2(Z,$,J){return new Promise((Q,X)=>{if($?.aborted){if(J?.throwOnAbort||J?.abortError)X(J.abortError?.()??Error("aborted"));else Q();return}let Y=setTimeout((W,G,x)=>{W?.removeEventListener("abort",G),x()},Z,$,V,Q);function V(){if(clearTimeout(Y),J?.throwOnAbort||J?.abortError)X(J.abortError?.()??Error("aborted"));else Q()}if($?.addEventListener("abort",V,{once:!0}),J?.unref)Y.unref()})}var G4=()=>{};function IJ(){return j4}function x4(){j4.clear()}var j4;var B4=B(()=>{j4=new Map});var aZ={};S1(aZ,{validateForceLoginOrg:()=>lZ,saveOAuthTokensIfNeeded:()=>I4,saveApiKey:()=>x5,removeApiKey:()=>MZ,refreshGcpCredentialsIfNeeded:()=>j5,refreshGcpAuth:()=>k4,refreshAwsAuth:()=>P4,refreshAndGetAwsCredentials:()=>X0,prefetchGcpCredentialsIfSafe:()=>yZ,prefetchAwsCredentialsAndBedRockInfoIfSafe:()=>TZ,prefetchApiKeyFromApiKeyHelperIfSafe:()=>DZ,isUsing3PServices:()=>j2,isTeamSubscriber:()=>pZ,isTeamPremiumSubscriber:()=>Y2,isProSubscriber:()=>n2,isOverageProvisioningAllowed:()=>uZ,isOtelHeadersHelperFromProjectOrLocalSettings:()=>S4,isMaxSubscriber:()=>X2,isGcpAuthRefreshFromProjectSettings:()=>G5,isEnterpriseSubscriber:()=>mZ,isCustomApiKeyApproved:()=>SZ,isConsumerSubscriber:()=>tZ,isClaudeAISubscriber:()=>U,isAwsCredentialExportFromProjectSettings:()=>W5,isAwsAuthRefreshFromProjectSettings:()=>V5,isAnthropicAuthEnabled:()=>U0,is1PApiCustomer:()=>fZ,hasProfileScope:()=>J0,hasOpusAccess:()=>gZ,hasAnthropicApiKeyAuth:()=>wZ,handleOAuth401Error:()=>h2,getSubscriptionType:()=>v,getSubscriptionName:()=>T4,getRateLimitTier:()=>y4,getOtelHeadersFromHelper:()=>dZ,getOauthAccountInfo:()=>G2,getConfiguredApiKeyHelper:()=>a,getClaudeAIOAuthTokensAsync:()=>h0,getClaudeAIOAuthTokens:()=>w,getAuthTokenSource:()=>_0,getApiKeyHelperElapsedMs:()=>FZ,getApiKeyFromConfigOrMacOSKeychain:()=>B2,getApiKeyFromApiKeyHelperCached:()=>e2,getApiKeyFromApiKeyHelper:()=>b4,getAnthropicApiKeyWithSource:()=>u0,getAnthropicApiKey:()=>Z0,getAccountInformation:()=>iZ,clearOAuthTokenCache:()=>B5,clearGcpCredentialsCache:()=>IZ,clearAwsCredentialsCache:()=>bZ,clearApiKeyHelperCache:()=>KZ,checkGcpCredentialsValid:()=>E4,checkAndRefreshOAuthTokenIfNeeded:()=>g0,calculateApiKeyHelperTTL:()=>_4});import{exec as U4}from"child_process";import{mkdir as xZ,stat as BZ}from"fs/promises";import{join as HZ}from"path";function z2(){return L(process.env.CLAUDE_CODE_REMOTE)||process.env.CLAUDE_CODE_ENTRYPOINT==="claude-desktop"}function U0(){if(u())return!1;if(process.env.ANTHROPIC_UNIX_SOCKET)return!!process.env.CLAUDE_CODE_OAUTH_TOKEN;let Z=j2(),J=(C()||{}).apiKeyHelper,Q=process.env.ANTHROPIC_AUTH_TOKEN||J||process.env.CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR,X;try{({source:X}=u0({skipRetrievingKeyFromApiKeyHelper:!0}))}catch{X="none"}let Y=X==="ANTHROPIC_API_KEY"||X==="apiKeyHelper";return!(Z||Q&&!z2()||Y&&!z2())}function _0(){if(u()){if(a())return{source:"apiKeyHelper",hasToken:!0};return{source:"none",hasToken:!1}}if(process.env.ANTHROPIC_AUTH_TOKEN&&!z2())return{source:"ANTHROPIC_AUTH_TOKEN",hasToken:!0};if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{source:"CLAUDE_CODE_OAUTH_TOKEN",hasToken:!0};if(r0()){if(process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)return{source:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",hasToken:!0};return{source:"CCR_OAUTH_TOKEN_FILE",hasToken:!0}}if(a()&&!z2())return{source:"apiKeyHelper",hasToken:!0};let J=w();if(N0(J?.scopes)&&J?.accessToken)return{source:"claude.ai",hasToken:!0};return{source:"none",hasToken:!1}}function Z0(){let{key:Z}=u0();return Z}function wZ(){try{let{key:Z,source:$}=u0({skipRetrievingKeyFromApiKeyHelper:!0});return Z!==null&&$!=="none"}catch{return!1}}function u0(Z={}){let $=(()=>{let V=D();if(V?.transport!=="anthropic")return;let W=V.apiKey?.trim();return W&&W.length>0?W:void 0})();if(u()){if($)return{key:$,source:"ANTHROPIC_API_KEY"};if(a())return{key:Z.skipRetrievingKeyFromApiKeyHelper?null:e2(),source:"apiKeyHelper"};return{key:null,source:"none"}}let J=F4()?void 0:$;if($2()&&J)return{key:J,source:"ANTHROPIC_API_KEY"};if(L(process.env.CI)){let V=v2();if(V)return{key:V,source:"ANTHROPIC_API_KEY"};if(!j2()&&!J&&!process.env.CLAUDE_CODE_OAUTH_TOKEN&&!process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Configure an Anthropic profile via /provider or set CLAUDE_CODE_OAUTH_TOKEN");if(J&&!j2())return{key:J,source:"ANTHROPIC_API_KEY"};return{key:null,source:"none"}}if(J&&F().customApiKeyResponses?.approved?.includes(e0(J)))return{key:J,source:"ANTHROPIC_API_KEY"};let Q=v2();if(Q)return{key:Q,source:"ANTHROPIC_API_KEY"};if(a()){if(Z.skipRetrievingKeyFromApiKeyHelper)return{key:null,source:"apiKeyHelper"};return{key:e2(),source:"apiKeyHelper"}}let Y=B2();if(Y)return Y;return{key:null,source:"none"}}function a(){if(u())return b("flagSettings")?.apiKeyHelper;return(C()||{}).apiKeyHelper}function O4(){let Z=a();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.apiKeyHelper===Z||J?.apiKeyHelper===Z}function Y5(){return(C()||{}).awsAuthRefresh}function V5(){let Z=Y5();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.awsAuthRefresh===Z||J?.awsAuthRefresh===Z}function q5(){return(C()||{}).awsCredentialExport}function W5(){let Z=q5();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.awsCredentialExport===Z||J?.awsCredentialExport===Z}function _4(){let Z=process.env.CLAUDE_CODE_API_KEY_HELPER_TTL_MS;if(Z){let $=parseInt(Z,10);if(!Number.isNaN($)&&$>=0)return $;z(`Found CLAUDE_CODE_API_KEY_HELPER_TTL_MS env var, but it was not a valid number. Got ${Z}`,{level:"error"})}return RZ}function FZ(){let Z=c?.startedAt;return Z?Date.now()-Z:0}async function b4(Z){if(!a())return null;let $=_4();if(I){if(Date.now()-I.timestamp<$)return I.value;if(!c)c={promise:H4(Z,!1,D0),startedAt:null};return I.value}if(c)return c.promise;return c={promise:H4(Z,!0,D0),startedAt:Date.now()},c.promise}async function H4(Z,$,J){try{let Q=await LZ(Z);if(J!==D0)return Q;if(Q!==null)I={value:Q,timestamp:Date.now()};return Q}catch(Q){if(J!==D0)return" ";let X=Q instanceof Error?Q.message:String(Q);if(console.error(h.red(`apiKeyHelper failed: ${X}`)),z(`Error getting API key from apiKeyHelper: ${X}`,{level:"error"}),!$&&I&&I.value!==" ")return I={...I,timestamp:Date.now()},I.value;return I={value:" ",timestamp:Date.now()}," "}finally{if(J===D0)c=null}}async function LZ(Z){let $=a();if(!$)return null;if(O4()){if(!d()&&!Z){let Y=Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return f0("apiKeyHelper invoked before trust check",Y),j("tengu_apiKeyHelper_missing_trust11",{}),null}}let J=await x0($,{shell:!0,timeout:600000,reject:!1});if(J.failed){let X=J.timedOut?"timed out":`exited ${J.exitCode}`,Y=J.stderr?.trim();throw Error(Y?`${X}: ${Y}`:X)}let Q=J.stdout?.trim();if(!Q)throw Error("did not return a value");return Q}function e2(){return I?.value??null}function KZ(){D0++,I=null,c=null}function DZ(Z){if(O4()&&!d())return;b4(Z)}async function UZ(){let Z=Y5();if(!Z)return!1;if(V5()){if(!d()&&!f()){let J=Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return f0("awsAuthRefresh invoked before trust check",J),j("tengu_awsAuthRefresh_missing_trust",{}),!1}}try{return z("Fetching AWS caller identity for AWS auth refresh command"),await y2(),z("Fetched AWS caller identity, skipping AWS auth refresh command"),!1}catch{return P4(Z)}}function P4(Z){z("Running AWS auth refresh command");let $=S.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=U4(Z,{timeout:OZ});Q.stdout.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.addOutput(Y),z(Y,{level:"debug"})}),Q.stderr.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.setError(Y),z(Y,{level:"error"})}),Q.on("close",(X,Y)=>{if(X===0)z("AWS auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let W=Y==="SIGTERM"?h.red("AWS auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal."):h.red("Error running awsAuthRefresh (in settings or ~/.claudio/config.json):");console.error(W),$.endAuthentication(!1),J(!1)}})})}async function _Z(){let Z=q5();if(!Z)return null;if(W5()){if(!d()&&!f()){let J=Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return f0("awsCredentialExport invoked before trust check",J),j("tengu_awsCredentialExport_missing_trust",{}),null}}try{return z("Fetching AWS caller identity for credential export command"),await y2(),z("Fetched AWS caller identity, skipping AWS credential export command"),null}catch{try{z("Running AWS credential export command");let $=await x0(Z,{shell:!0,reject:!1});if($.exitCode!==0||!$.stdout)throw Error("awsCredentialExport did not return a valid value");let J=J5($.stdout.trim());if(!m5(J))throw Error("awsCredentialExport did not return valid AWS STS output structure");return z("AWS credentials retrieved from awsCredentialExport"),{accessKeyId:J.Credentials.AccessKeyId,secretAccessKey:J.Credentials.SecretAccessKey,sessionToken:J.Credentials.SessionToken}}catch($){let J=h.red("Error getting AWS credentials from awsCredentialExport (in settings or ~/.claudio/config.json):");if($ instanceof Error)console.error(J,$.message);else console.error(J,$);return null}}}function bZ(){X0.cache.clear()}function z5(){return(C()||{}).gcpAuthRefresh}function G5(){let Z=z5();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.gcpAuthRefresh===Z||J?.gcpAuthRefresh===Z}async function E4(){try{let{GoogleAuth:Z}=await import("google-auth-library"),$=new Z({scopes:["https://www.googleapis.com/auth/cloud-platform"]}),J=(async()=>{await(await $.getClient()).getAccessToken()})(),Q=o2(PZ).then(()=>{throw new M4("GCP credentials check timed out")});return await Promise.race([J,Q]),!0}catch{return!1}}async function kZ(){let Z=z5();if(!Z)return!1;if(G5()){if(!d()&&!f()){let J=Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return f0("gcpAuthRefresh invoked before trust check",J),j("tengu_gcpAuthRefresh_missing_trust",{}),!1}}try{if(z("Checking GCP credentials validity for auth refresh"),await E4())return z("GCP credentials are valid, skipping auth refresh command"),!1}catch{}return k4(Z)}function k4(Z){z("Running GCP auth refresh command");let $=S.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=U4(Z,{timeout:vZ});Q.stdout.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.addOutput(Y),z(Y,{level:"debug"})}),Q.stderr.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.setError(Y),z(Y,{level:"error"})}),Q.on("close",(X,Y)=>{if(X===0)z("GCP auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let W=Y==="SIGTERM"?h.red("GCP auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal."):h.red("Error running gcpAuthRefresh (in settings or ~/.claudio/config.json):");console.error(W),$.endAuthentication(!1),J(!1)}})})}function IZ(){j5.cache.clear()}function yZ(){if(!z5())return;if(G5()){if(!d()&&!f())return}j5()}function TZ(){let Z=Y5(),$=q5();if(!Z&&!$)return;if(V5()||W5()){if(!d()&&!f())return}X0(),H()}function CZ(Z){return/^[a-zA-Z0-9-_]+$/.test(Z)}async function x5(Z){if(!CZ(Z))throw Error("Invalid API key format. API key must contain only alphanumeric characters, dashes, and underscores.");await v4();let $=!1;if(process.platform==="darwin")try{let Q=i(),X=q2(),Y=Buffer.from(Z,"utf-8").toString("hex"),V=`add-generic-password -U -a "${X}" -s "${Q}" -X "${Y}"
|
|
2
|
+
`;await x0("security",["-i"],{input:V,reject:!1}),j("tengu_api_key_saved_to_keychain",{}),$=!0}catch(Q){K(Q),j("tengu_api_key_keychain_error",{error:p(Q)}),j("tengu_api_key_saved_to_config",{})}else j("tengu_api_key_saved_to_config",{});let J=e0(Z);M((Q)=>{let X=Q.customApiKeyResponses?.approved??[];return{...Q,primaryApiKey:$?Q.primaryApiKey:Z,customApiKeyResponses:{...Q.customApiKeyResponses,approved:X.includes(J)?X:[...X,J],rejected:Q.customApiKeyResponses?.rejected??[]}}}),B2.cache.clear?.(),s2()}function SZ(Z){let $=F(),J=e0(Z);return $.customApiKeyResponses?.approved?.includes(J)??!1}async function MZ(){await v4(),M((Z)=>({...Z,primaryApiKey:void 0})),B2.cache.clear?.(),s2()}async function v4(){try{await g5()}catch(Z){K(Z)}}function I4(Z){if(!N0(Z.scopes))return j("tengu_oauth_tokens_not_claude_ai",{}),{success:!0};if(!Z.refreshToken||!Z.expiresAt)return j("tengu_oauth_tokens_inference_only",{}),{success:!0};let $=x2(),J=$.name;try{let Q=$.read()||{},X=Q.claudeAiOauth;Q.claudeAiOauth={accessToken:Z.accessToken,refreshToken:Z.refreshToken,expiresAt:Z.expiresAt,scopes:Z.scopes,subscriptionType:Z.subscriptionType??X?.subscriptionType??null,rateLimitTier:Z.rateLimitTier??X?.rateLimitTier??null};let Y=$.update(Q);if(Y.success)j("tengu_oauth_tokens_saved",{storageBackend:J});else j("tengu_oauth_tokens_save_failed",{storageBackend:J});return w.cache?.clear?.(),Q4(),x4(),Y}catch(Q){return K(Q),j("tengu_oauth_tokens_save_exception",{storageBackend:J,error:p(Q)}),{success:!1,warning:"Failed to save OAuth tokens"}}}function B5(){w.cache?.clear?.(),K0()}async function AZ(){try{let{mtimeMs:Z}=await BZ(HZ($5(),".credentials.json"));if(Z!==R4)R4=Z,B5()}catch{w.cache?.clear?.()}}function h2(Z){let $=r2.get(Z);if($)return $;let J=hZ(Z).finally(()=>{r2.delete(Z)});return r2.set(Z,J),J}async function hZ(Z){B5();let $=await h0();if(!$?.refreshToken)return!1;if($.accessToken!==Z)return j("tengu_oauth_401_recovered_from_keychain",{}),!0;return g0(0,!0)}async function h0(){if(u())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN||r0())return w();try{let J=(await x2().readAsync())?.claudeAiOauth;if(!J?.accessToken)return null;return J}catch(Z){return K(Z),null}}function g0(Z=0,$=!1){if(Z===0&&!$){if(M0)return M0;return M0=Z5(Z,$).finally(()=>{M0=null}),M0}return Z5(Z,$)}async function Z5(Z,$){await AZ();let Q=w();if(!$){if(!Q?.refreshToken||!A0(Q.expiresAt))return!1}if(!Q?.refreshToken)return!1;if(!N0(Q.scopes))return!1;w.cache?.clear?.(),K0();let X=await h0();if(!X?.refreshToken||!A0(X.expiresAt))return!1;let Y=$5();await xZ(Y,{recursive:!0});let V;try{j("tengu_oauth_token_refresh_lock_acquiring",{}),V=await K4(Y),j("tengu_oauth_token_refresh_lock_acquired",{})}catch(W){if(W.code==="ELOCKED"){if(Z<5)return j("tengu_oauth_token_refresh_lock_retry",{retryCount:Z+1}),await o2(1000+Math.random()*1000),Z5(Z+1,$);return j("tengu_oauth_token_refresh_lock_retry_limit_reached",{maxRetries:5}),!1}return K(W),j("tengu_oauth_token_refresh_lock_error",{error:p(W)}),!1}try{w.cache?.clear?.(),K0();let W=await h0();if(!W?.refreshToken||!A0(W.expiresAt))return j("tengu_oauth_token_refresh_race_resolved",{}),!1;j("tengu_oauth_token_refresh_starting",{});let G=await D4(W.refreshToken,{scopes:N0(W.scopes)?void 0:W.scopes});return I4(G),w.cache?.clear?.(),K0(),!0}catch(W){K(W),w.cache?.clear?.(),K0();let G=await h0();if(G&&!A0(G.expiresAt))return j("tengu_oauth_token_refresh_race_recovered",{}),!0;return!1}finally{j("tengu_oauth_token_refresh_lock_releasing",{}),await V(),j("tengu_oauth_token_refresh_lock_released",{})}}function U(){if(!U0())return!1;return N0(w()?.scopes)}function J0(){return w()?.scopes?.includes(L4)??!1}function fZ(){{let Z=D()?.transport;if(Z==="bedrock"||Z==="vertex"||Z==="foundry")return!1}if(U())return!1;return!0}function G2(){return U0()?F().oauthAccount:void 0}function uZ(){let $=G2()?.billingType;if(!U()||!$)return!1;if($!=="stripe_subscription"&&$!=="stripe_subscription_contracted"&&$!=="apple_subscription"&&$!=="google_play_subscription")return!1;return!0}function gZ(){let Z=v();return Z==="max"||Z==="enterprise"||Z==="team"||Z==="pro"||Z===null}function v(){if(k5())return E5();if(!U0())return null;let Z=w();if(!Z)return null;return Z.subscriptionType??null}function X2(){return v()==="max"}function pZ(){return v()==="team"}function Y2(){return v()==="team"&&y4()==="default_claude_max_5x"}function mZ(){return v()==="enterprise"}function n2(){return v()==="pro"}function y4(){if(!U0())return null;let Z=w();if(!Z)return null;return Z.rateLimitTier??null}function T4(){switch(v()){case"enterprise":return"Claude Enterprise";case"team":return"Claude Team";case"max":return"Claude Max";case"pro":return"Claude Pro";default:return"Claude API"}}function j2(){let Z=D()?.transport;if(!Z)return!1;return Z!=="anthropic"}function C4(){return(C()||{}).otelHeadersHelper}function S4(){let Z=C4();if(!Z)return!1;let $=b("projectSettings"),J=b("localSettings");return $?.otelHeadersHelper===Z||J?.otelHeadersHelper===Z}function dZ(){let Z=C4();if(!Z)return{};let $=parseInt(process.env.CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS||cZ.toString());if(W2&&Date.now()-w4<$)return W2;if(S4()){if(!d())return{}}try{let J=Q5(Z,{timeout:30000})?.toString().trim();if(!J)throw Error("otelHeadersHelper did not return a valid value");let Q=J5(J);if(typeof Q!=="object"||Q===null||Array.isArray(Q))throw Error("otelHeadersHelper must return a JSON object with string key-value pairs");for(let[X,Y]of Object.entries(Q))if(typeof Y!=="string")throw Error(`otelHeadersHelper returned non-string value for key "${X}": ${typeof Y}`);return W2=Q,w4=Date.now(),W2}catch(J){throw K(Error(`Error getting OpenTelemetry headers from otelHeadersHelper (in settings): ${p(J)}`)),J}}function nZ(Z){return Z==="max"||Z==="pro"}function tZ(){let Z=v();return U()&&Z!==null&&nZ(Z)}function iZ(){if(q()!=="firstParty")return;let{source:$}=_0(),J={};if($==="CLAUDE_CODE_OAUTH_TOKEN"||$==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR")J.tokenSource=$;else if(U())J.subscription=T4();else J.tokenSource=$;let{key:Q,source:X}=u0();if(Q)J.apiKeySource=X;if($==="claude.ai"||X==="/login managed key"){let V=G2()?.organizationName;if(V)J.organization=V}let Y=G2()?.emailAddress;if(($==="claude.ai"||X==="/login managed key")&&Y)J.email=Y;return J}async function lZ(){if(process.env.ANTHROPIC_UNIX_SOCKET)return{valid:!0};if(!U0())return{valid:!0};let Z=b("policySettings")?.forceLoginOrgUUID;if(!Z)return{valid:!0};await g0();let $=w();if(!$)return{valid:!0};let{source:J}=_0(),Q=J==="CLAUDE_CODE_OAUTH_TOKEN"||J==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",X=await G0($.accessToken);if(!X)return{valid:!1,message:`Unable to verify organization for the current authentication token.
|
|
3
|
+
This machine requires organization ${Z} but the profile could not be fetched.
|
|
4
|
+
This may be a network error, or the token may lack the user:profile scope required for
|
|
5
|
+
verification (tokens from 'claude setup-token' do not include this scope).
|
|
6
|
+
Try again, or obtain a full-scope token via 'claude auth login'.`};let Y=X.organization.uuid;if(Y===Z)return{valid:!0};if(Q)return{valid:!1,message:`The ${J==="CLAUDE_CODE_OAUTH_TOKEN"?"CLAUDE_CODE_OAUTH_TOKEN":"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR"} environment variable provides a token for a
|
|
7
|
+
different organization than required by this machine's managed settings.
|
|
8
|
+
|
|
9
|
+
Required organization: ${Z}
|
|
10
|
+
Token organization: ${Y}
|
|
11
|
+
|
|
12
|
+
Remove the environment variable or obtain a token for the correct organization.`};return{valid:!1,message:`Your authentication token belongs to organization ${Y},
|
|
13
|
+
but this machine requires organization ${Z}.
|
|
14
|
+
|
|
15
|
+
Please log in with the correct organization: claude auth login`}}var RZ=300000,I=null,c=null,D0=0,NZ=3600000,OZ=180000,X0,PZ=5000,EZ=3600000,vZ=180000,j5,B2,w,R4=0,r2,M0=null,W2=null,w4=0,cZ=1740000,M4;var n=B(()=>{jZ();u5();m0();b0();J2();a0();t();r();V0();v5();N4();E2();f5();p5();d5();t5();X4();W0();j0();g();A5();qZ();zZ();c0();WZ();GZ();z4();I2();q0();G4();VZ();B4();X0=X5(async()=>{let Z=await UZ(),$=await _Z();if(Z||$)await c5();return $},NZ);j5=X5(async()=>{return await kZ()},EZ);B2=y(()=>{if(u())return null;if(process.platform==="darwin"){let $=W4();if($){if($.stdout)return{key:$.stdout,source:"/login managed key"}}else{let J=i();try{let Q=Q5(`security find-generic-password -a $USER -w -s "${J}"`);if(Q)return{key:Q,source:"/login managed key"}}catch(Q){K(Q)}}}let Z=F();if(!Z.primaryApiKey)return null;return{key:Z.primaryApiKey,source:"/login managed key"}});w=y(()=>{if(u())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{accessToken:process.env.CLAUDE_CODE_OAUTH_TOKEN,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};let Z=r0();if(Z)return{accessToken:Z,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};try{let Q=x2().read()?.claudeAiOauth;if(!Q?.accessToken)return null;return Q}catch($){return K($),null}});r2=new Map;M4=class M4 extends Error{}});function N0(Z){return Boolean(Z?.includes(H5))}function sZ(Z){return Z?.split(" ").filter(Boolean)??[]}function DQ({codeChallenge:Z,state:$,port:J,isManual:Q,loginWithClaudeAi:X,inferenceOnly:Y,orgUUID:V,loginHint:W,loginMethod:G}){let x=X?N().CLAUDE_AI_AUTHORIZE_URL:N().CONSOLE_AUTHORIZE_URL,R=new URL(x);R.searchParams.append("code","true"),R.searchParams.append("client_id",N().CLIENT_ID),R.searchParams.append("response_type","code"),R.searchParams.append("redirect_uri",Q?N().MANUAL_REDIRECT_URL:`http://localhost:${J}/callback`);let Q0=Y?[H5]:f4;if(R.searchParams.append("scope",Q0.join(" ")),R.searchParams.append("code_challenge",Z),R.searchParams.append("code_challenge_method","S256"),R.searchParams.append("state",$),V)R.searchParams.append("orgUUID",V);if(W)R.searchParams.append("login_hint",W);if(G)R.searchParams.append("login_method",G);return R.toString()}async function NQ(Z,$,J,Q,X=!1,Y){let V={grant_type:"authorization_code",code:Z,redirect_uri:X?N().MANUAL_REDIRECT_URL:`http://localhost:${Q}/callback`,client_id:N().CLIENT_ID,code_verifier:J,state:$};if(Y!==void 0)V.expires_in=Y;let W=await O.post(N().TOKEN_URL,V,{headers:{"Content-Type":"application/json"},timeout:15000});if(W.status!==200)throw Error(W.status===401?"Authentication failed: Invalid authorization code":`Token exchange failed (${W.status}): ${W.statusText}`);return j("tengu_oauth_token_exchange_success",{}),W.data}async function D4(Z,{scopes:$}={}){let J={grant_type:"refresh_token",refresh_token:Z,client_id:N().CLIENT_ID,scope:(($?.length)?$:h4).join(" ")};try{let Q=await O.post(N().TOKEN_URL,J,{headers:{"Content-Type":"application/json"},timeout:15000});if(Q.status!==200)throw Error(`Token refresh failed: ${Q.statusText}`);let X=Q.data,{access_token:Y,refresh_token:V=Z,expires_in:W}=X,G=Date.now()+W*1000,x=sZ(X.scope);j("tengu_oauth_token_refresh_success",{});let R=F(),Q0=w(),E=R.oauthAccount?.billingType!==void 0&&R.oauthAccount?.accountCreatedAt!==void 0&&R.oauthAccount?.subscriptionCreatedAt!==void 0&&Q0?.subscriptionType!=null&&Q0?.rateLimitTier!=null?null:await oZ(Y);if(E&&R.oauthAccount){let s={};if(E.displayName!==void 0)s.displayName=E.displayName;if(typeof E.hasExtraUsageEnabled==="boolean")s.hasExtraUsageEnabled=E.hasExtraUsageEnabled;if(E.billingType!==null)s.billingType=E.billingType;if(E.accountCreatedAt!==void 0)s.accountCreatedAt=E.accountCreatedAt;if(E.subscriptionCreatedAt!==void 0)s.subscriptionCreatedAt=E.subscriptionCreatedAt;if(Object.keys(s).length>0)M((p0)=>({...p0,oauthAccount:p0.oauthAccount?{...p0.oauthAccount,...s}:p0.oauthAccount}))}return{accessToken:Y,refreshToken:V,expiresAt:G,scopes:x,subscriptionType:E?.subscriptionType??Q0?.subscriptionType??null,rateLimitTier:E?.rateLimitTier??Q0?.rateLimitTier??null,profile:E?.rawProfile,tokenAccount:X.account?{uuid:X.account.uuid,emailAddress:X.account.email_address,organizationUuid:X.organization?.uuid}:void 0}}catch(Q){let X=O.isAxiosError(Q)&&Q.response?.data?JSON.stringify(Q.response.data):void 0;throw j("tengu_oauth_token_refresh_failure",{error:Q.message,...X&&{responseBody:X}}),Q}}async function UQ(Z){let $=await O.get(N().ROLES_URL,{headers:{Authorization:`Bearer ${Z}`}});if($.status!==200)throw Error(`Failed to fetch user roles: ${$.statusText}`);let J=$.data;if(!F().oauthAccount)throw Error("OAuth account information not found in config");M((X)=>({...X,oauthAccount:X.oauthAccount?{...X.oauthAccount,organizationRole:J.organization_role,workspaceRole:J.workspace_role,organizationName:J.organization_name}:X.oauthAccount})),j("tengu_oauth_roles_stored",{org_role:J.organization_role})}async function OQ(Z){try{let $=await O.post(N().API_KEY_URL,null,{headers:{Authorization:`Bearer ${Z}`}}),J=$.data?.raw_key;if(J)return await x5(J),j("tengu_oauth_api_key",{status:"success",statusCode:$.status}),J;return null}catch($){throw j("tengu_oauth_api_key",{status:"failure",error:$ instanceof Error?$.message:String($)}),$}}function A0(Z){if(Z===null)return!1;let $=300000;return Date.now()+$>=Z}async function oZ(Z){let $=await G0(Z),J=$?.organization?.organization_type,Q=null;switch(J){case"claude_max":Q="max";break;case"claude_pro":Q="pro";break;case"claude_enterprise":Q="enterprise";break;case"claude_team":Q="team";break;default:Q=null;break}let X={subscriptionType:Q,rateLimitTier:$?.organization?.rate_limit_tier??null,hasExtraUsageEnabled:$?.organization?.has_extra_usage_enabled??null,billingType:$?.organization?.billing_type??null};if($?.account?.display_name)X.displayName=$.account.display_name;if($?.account?.created_at)X.accountCreatedAt=$.account.created_at;if($?.organization?.subscription_created_at)X.subscriptionCreatedAt=$.organization.subscription_created_at;return j("tengu_oauth_profile_fetch_success",{}),{...X,rawProfile:$}}async function _Q(){let $=F().oauthAccount?.organizationUuid;if($)return $;let J=w()?.accessToken;if(J===void 0||!J0())return null;let X=(await G0(J))?.organization?.uuid;if(!X)return null;return X}async function bQ(){let Z=process.env.CLAUDE_CODE_ACCOUNT_UUID,$=process.env.CLAUDE_CODE_USER_EMAIL,J=process.env.CLAUDE_CODE_ORGANIZATION_UUID,Q=Boolean(Z&&$&&J);if(Z&&$&&J){if(!F().oauthAccount)A4({accountUuid:Z,emailAddress:$,organizationUuid:J})}await g0();let X=F();if(X.oauthAccount&&X.oauthAccount.billingType!==void 0&&X.oauthAccount.accountCreatedAt!==void 0&&X.oauthAccount.subscriptionCreatedAt!==void 0||!U()||!J0())return!1;let Y=w();if(Y?.accessToken){let V=await G0(Y.accessToken);if(V){if(Q)z("OAuth profile fetch succeeded, overriding env var account info",{level:"info"});return A4({accountUuid:V.account.uuid,emailAddress:V.account.email,organizationUuid:V.organization.uuid,displayName:V.account.display_name||void 0,hasExtraUsageEnabled:V.organization.has_extra_usage_enabled??!1,billingType:V.organization.billing_type??void 0,accountCreatedAt:V.account.created_at,subscriptionCreatedAt:V.organization.subscription_created_at??void 0}),!0}}return!1}function A4({accountUuid:Z,emailAddress:$,organizationUuid:J,displayName:Q,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:V,subscriptionCreatedAt:W}){let G={accountUuid:Z,emailAddress:$,organizationUuid:J,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:V,subscriptionCreatedAt:W};if(Q)G.displayName=Q;M((x)=>{if(x.oauthAccount?.accountUuid===G.accountUuid&&x.oauthAccount?.emailAddress===G.emailAddress&&x.oauthAccount?.organizationUuid===G.organizationUuid&&x.oauthAccount?.displayName===G.displayName&&x.oauthAccount?.hasExtraUsageEnabled===G.hasExtraUsageEnabled&&x.oauthAccount?.billingType===G.billingType&&x.oauthAccount?.accountCreatedAt===G.accountCreatedAt&&x.oauthAccount?.subscriptionCreatedAt===G.subscriptionCreatedAt)return x;return{...x,oauthAccount:G}})}var N4=B(()=>{s0();J2();b0();n();W0();j0();E2()});
|
|
16
|
+
export{R5 as h1,w5 as i1,Y3 as j1,V3 as k1,g4 as l1,c4 as m1,q3 as n1,D5 as o1,d0 as p1,n0 as q1,Y0 as r1,P2 as s1,q as t1,x3 as u1,B3 as v1,H3 as w1,R3 as x1,t as y1,H as z1,_3 as A1,a0 as B1,v3 as C1,I3 as D1,P5 as E1,S3 as F1,M3 as G1,v5 as H1,m3 as I1,G0 as J1,E2 as K1,N0 as L1,sZ as M1,DQ as N1,NQ as O1,D4 as P1,UQ as Q1,OQ as R1,A0 as S1,oZ as T1,_Q as U1,bQ as V1,A4 as W1,N4 as X1,s3 as Y1,o4 as Z1,I5 as _1,f5 as $1,e0 as a2,p5 as b2,J9 as c2,d5 as d2,S as e2,t5 as f2,P0 as g2,l5 as h2,a5 as i2,V9 as j2,q9 as k2,r5 as l2,W9 as m2,e5 as n2,z9 as o2,G9 as p2,j9 as q2,S2 as r2,A as s2,V1 as t2,$8 as u2,k9 as v2,v9 as w2,I9 as x2,q1 as y2,y9 as z2,T9 as A2,J8 as B2,C9 as C2,S9 as D2,M9 as E2,A9 as F2,h9 as G2,Y8 as H2,f9 as I2,u9 as J2,g9 as K2,p9 as L2,j1 as M2,y0 as N2,z8 as O2,G8 as P2,f2 as Q2,F8 as R2,l9 as S2,w1 as T2,F1 as U2,L8 as V2,u2 as W2,D1 as X2,N1 as Y2,J$ as Z2,O1 as _2,K$ as $2,D$ as a3,p2 as b3,N$ as c3,b8 as d3,w0 as e3,C0 as f3,v1 as g3,U$ as h3,v0 as i3,I1 as j3,_ as k3,P as l3,P8 as m3,O$ as n3,_1 as o3,I0 as p3,_$ as q3,y1 as r3,T1 as s3,b$ as t3,T as u3,P$ as v3,v8 as w3,E$ as x3,k$ as y3,v$ as z3,H0 as A3,y$ as B3,C1 as C3,g1 as D3,p8 as E3,m1 as F3,l$ as G3,a$ as H3,s$ as I3,L0 as J3,l as K3,o$ as L3,s8 as M3,r$ as N3,o8 as O3,e$ as P3,d2 as Q3,a1 as R3,s1 as S3,FJ as T3,JZ as U3,LJ as V3,KJ as W3,r1 as X3,DJ as Y3,J4 as Z3,QZ as _3,NJ as $3,Q4 as a4,X4 as b4,PJ as c4,EJ as d4,z4 as e4,o2 as f4,G4 as g4,IJ as h4,x4 as i4,B4 as j4,U0 as k4,_0 as l4,Z0 as m4,wZ as n4,u0 as o4,a as p4,V5 as q4,W5 as r4,_4 as s4,FZ as t4,b4 as u4,e2 as v4,KZ as w4,DZ as x4,P4 as y4,X0 as z4,bZ as A4,G5 as B4,E4 as C4,k4 as D4,j5 as E4,IZ as F4,yZ as G4,TZ as H4,B2 as I4,x5 as J4,SZ as K4,MZ as L4,I4 as M4,w as N4,B5 as O4,h2 as P4,h0 as Q4,g0 as R4,U as S4,J0 as T4,fZ as U4,G2 as V4,uZ as W4,gZ as X4,v as Y4,X2 as Z4,pZ as _4,Y2 as $4,mZ as a5,n2 as b5,y4 as c5,T4 as d5,j2 as e5,S4 as f5,dZ as g5,tZ as h5,iZ as i5,lZ as j5,aZ as k5,n as l5};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Dp as m,Ep as E6,Mj as lJ,Nj as aZ,ik as h,lk as LQ,rt as nJ,st as lZ}from"./cli-0.1.12-242der7s.mjs";import{N4 as VQ,Y4 as wQ,l5 as z6}from"./cli-0.1.12-y9598sy3.mjs";import{$6 as S,Faa as EQ,T6 as TJ,Taa as I6,U6 as LZ,X6 as a,Y6 as fQ,Z6 as E,_6 as c,a7 as hJ,f7 as U,f9 as aJ,g7 as F,g9 as Z6,h7 as vJ,h9 as UQ,i7 as RZ,i9 as H6,j7 as mJ,j9 as BQ,k7 as FZ,k9 as K6,l7 as V,m7 as $J,n7 as PJ,o7 as pQ,p7 as yJ,q7 as IZ}from"./cli-0.1.12-vzga2are.mjs";import{$da as I,Yda as K,_da as xQ,aea as NQ}from"./cli-0.1.12-j6gjfwh5.mjs";import{Dea as v,Iea as F6}from"./cli-0.1.12-g3ycbjxk.mjs";import{efa as T,qfa as N6}from"./cli-0.1.12-g8mny195.mjs";import{$ha as xJ,Aia as N,Bia as f,Cha as DQ,Dha as U6,Eha as kJ,Fha as DZ,Hma as zQ,Iia as k,Jia as rJ,Kia as _,Lia as tZ,Mia as uJ,Nia as rZ,Oha as WQ,Pha as X6,Qha as O,Rha as dJ,Yha as l,Yma as R6,Zha as kQ,_ha as w,aia as ZQ,bia as q6,cia as fJ,dia as xZ,gia as C,hia as FJ,iia as L,jia as IJ,uia as z,via as i,wia as _J,xia as NZ}from"./cli-0.1.12-pm5cwtxh.mjs";import{bna as x,cna as GJ,fna as SJ,gna as MZ}from"./cli-0.1.12-vgbc3g9x.mjs";import{Una as Y}from"./cli-0.1.12-1hv04bp7.mjs";function AQ(J,Q){var Z=-1,q=J==null?0:J.length;while(++Z<q)if(Q(J[Z],Z,J)===!1)break;return J}var p;var b=Y(()=>{p=AQ});function OQ(J,Q){return J&&U(Q,z(Q),J)}var u;var n=Y(()=>{F();i();u=OQ});function SQ(J,Q){return J&&U(Q,E(Q),J)}var o;var r=Y(()=>{F();c();o=SQ});function dQ(J,Q){return U(J,l(J),Q)}var s;var t=Y(()=>{F();kQ();s=dQ});function _Q(J,Q){return U(J,a(J),Q)}var e;var JJ=Y(()=>{F();fQ();e=_Q});function vQ(J){var Q=J.length,Z=new J.constructor(Q);if(Q&&typeof J[0]=="string"&&hQ.call(J,"index"))Z.index=J.index,Z.input=J.input;return Z}var TQ,hQ,QJ;var ZJ=Y(()=>{TQ=Object.prototype,hQ=TQ.hasOwnProperty;QJ=vQ});function mQ(J,Q){var Z=Q?V(J.buffer):J.buffer;return new J.constructor(Z,J.byteOffset,J.byteLength)}var qJ;var WJ=Y(()=>{$J();qJ=mQ});function gQ(J){var Q=new J.constructor(J.source,yQ.exec(J));return Q.lastIndex=J.lastIndex,Q}var yQ,XJ;var YJ=Y(()=>{yQ=/\w*$/;XJ=gQ});function jQ(J){return KJ?Object(KJ.call(J)):{}}var HJ,KJ,UJ;var BJ=Y(()=>{GJ();HJ=x?x.prototype:void 0,KJ=HJ?HJ.valueOf:void 0;UJ=jQ});function YZ(J,Q,Z){var q=J.constructor;switch(Q){case sQ:return V(J);case bQ:case iQ:return new q(+J);case tQ:return qJ(J,Z);case aQ:case eQ:case JZ:case QZ:case ZZ:case $Z:case qZ:case WZ:case XZ:return PJ(J,Z);case uQ:return new q;case nQ:case rQ:return new q(J);case cQ:return XJ(J);case oQ:return new q;case lQ:return UJ(J)}}var bQ="[object Boolean]",iQ="[object Date]",uQ="[object Map]",nQ="[object Number]",cQ="[object RegExp]",oQ="[object Set]",rQ="[object String]",lQ="[object Symbol]",sQ="[object ArrayBuffer]",tQ="[object DataView]",aQ="[object Float32Array]",eQ="[object Float64Array]",JZ="[object Int8Array]",QZ="[object Int16Array]",ZZ="[object Int32Array]",$Z="[object Uint8Array]",qZ="[object Uint8ClampedArray]",WZ="[object Uint16Array]",XZ="[object Uint32Array]",MJ;var DJ=Y(()=>{$J();WJ();YJ();BJ();pQ();MJ=YZ});function KZ(J){return w(J)&&N(J)==HZ}var HZ="[object Map]",NJ;var LJ=Y(()=>{f();xJ();NJ=KZ});var RJ,GZ,zJ;var EJ=Y(()=>{LJ();FJ();IJ();RJ=L&&L.isMap,GZ=RJ?C(RJ):NJ,zJ=GZ});function BZ(J){return w(J)&&N(J)==UZ}var UZ="[object Set]",VJ;var wJ=Y(()=>{f();xJ();VJ=BZ});var CJ,PZ,AJ;var OJ=Y(()=>{wJ();FJ();IJ();CJ=L&&L.isSet,PZ=CJ?C(CJ):VJ,AJ=PZ});function A(J,Q,Z,q,W,H){var $,G=Q&zZ,M=Q&EZ,d=Q&VZ;if(Z)$=W?Z(J,q,W,H):Z(J);if($!==void 0)return $;if(!SJ(J))return J;var R=O(J);if(R){if($=QJ(J),!G)return mJ(J,$)}else{var D=N(J),y=D==jJ||D==SZ;if(fJ(J))return vJ(J,G);if(D==pJ||D==gJ||y&&!W){if($=M||y?{}:yJ(J),!G)return M?e(J,o($,J)):s(J,u($,J))}else{if(!X[D])return W?J:{};$=MJ(J,D,G)}}H||(H=new kJ);var g=H.get(J);if(g)return g;if(H.set(J,$),AJ(J))J.forEach(function(B){$.add(A(B,Q,Z,B,J,H))});else if(zJ(J))J.forEach(function(B,P){$.set(P,A(B,Q,Z,P,J,H))});var CQ=d?M?S:_J:M?E:z,j=R?void 0:CQ(J);return p(j||J,function(B,P){if(j)P=B,B=J[P];TJ($,P,A(B,Q,Z,P,J,H))}),$}var zZ=1,EZ=2,VZ=4,gJ="[object Arguments]",wZ="[object Array]",CZ="[object Boolean]",AZ="[object Date]",OZ="[object Error]",jJ="[object Function]",SZ="[object GeneratorFunction]",kZ="[object Map]",dZ="[object Number]",pJ="[object Object]",fZ="[object RegExp]",_Z="[object Set]",TZ="[object String]",hZ="[object Symbol]",vZ="[object WeakMap]",mZ="[object ArrayBuffer]",yZ="[object DataView]",gZ="[object Float32Array]",jZ="[object Float64Array]",pZ="[object Int8Array]",bZ="[object Int16Array]",iZ="[object Int32Array]",uZ="[object Uint8Array]",nZ="[object Uint8ClampedArray]",cZ="[object Uint16Array]",oZ="[object Uint32Array]",X,bJ;var iJ=Y(()=>{DZ();b();LZ();n();r();RZ();FZ();t();JJ();NZ();hJ();f();ZJ();DJ();IZ();dJ();xZ();EJ();MZ();OJ();i();c();X={};X[gJ]=X[wZ]=X[mZ]=X[yZ]=X[CZ]=X[AZ]=X[gZ]=X[jZ]=X[pZ]=X[bZ]=X[iZ]=X[kZ]=X[dZ]=X[pJ]=X[fZ]=X[_Z]=X[TZ]=X[hZ]=X[uZ]=X[nZ]=X[cZ]=X[oZ]=!0;X[OZ]=X[jJ]=X[vZ]=!1;bJ=A});function sZ(J,Q){return Q.length<2?J:uJ(J,nJ(Q,0,-1))}var cJ;var oJ=Y(()=>{rZ();lZ();cJ=sZ});function Q6(J,Q){Q=k(Q,J);var Z=-1,q=Q.length;if(!q)return!0;while(++Z<q){var W=_(Q[Z]);if(W==="__proto__"&&!J6.call(J,"__proto__"))return!1;if((W==="constructor"||W==="prototype")&&Z<q-1)return!1}var H=cJ(J,Q);return H==null||delete H[_(lJ(Q))]}var eZ,J6,sJ;var tJ=Y(()=>{rJ();aZ();oJ();tZ();eZ=Object.prototype,J6=eZ.hasOwnProperty;sJ=Q6});function $6(J){return aJ(J)?void 0:J}var eJ;var JQ=Y(()=>{Z6();eJ=$6});function W6(J){return O(J)||ZQ(J)||!!(QQ&&J&&J[QQ])}var QQ,$Q;var qQ=Y(()=>{GJ();q6();dJ();QQ=x?x.isConcatSpreadable:void 0;$Q=W6});function XQ(J,Q,Z,q,W){var H=-1,$=J.length;Z||(Z=$Q),W||(W=[]);while(++H<$){var G=J[H];if(Q>0&&Z(G))if(Q>1)XQ(G,Q-1,Z,q,W);else WQ(W,G);else if(!q)W[W.length]=G}return W}var YQ;var HQ=Y(()=>{X6();qQ();YQ=XQ});function Y6(J){var Q=J==null?0:J.length;return Q?YQ(J,1):[]}var KQ;var GQ=Y(()=>{HQ();KQ=Y6});function G6(J){return BQ(UQ(J,void 0,KQ),J+"")}var PQ;var MQ=Y(()=>{GQ();H6();K6();PQ=G6});var B6=1,P6=2,M6=4,D6,D$;var x6=Y(()=>{U6();iJ();tJ();rJ();F();JQ();MQ();hJ();D6=PQ(function(J,Q){var Z={};if(J==null)return Z;var q=!1;if(Q=DQ(Q,function(H){return H=k(H,J),q||(q=H.length>1),H}),U(J,S(J),Z),q)Z=bJ(Z,B6|P6|M6,eJ);var W=Q.length;while(W--)sJ(Z,Q[W]);return Z}),D$=D6});function RQ(){let J=T("tengu_harbor_ledger",[]),Q=L6().safeParse(J);return Q.success?Q.data:[]}function FQ(){return T("tengu_harbor",!1)}var L6;var IQ=Y(()=>{xQ();NQ();LQ();N6();L6=I(()=>K.array(K.object({marketplace:K.string(),plugin:K.string()})))});function f$(J,Q,Z){let q=Object.entries(Z??{}).filter(([W])=>w6.test(W)).map(([W,H])=>` ${W}="${m(H)}"`).join("");return`<${v} source="${m(J)}"${q}>
|
|
2
|
+
${Q}
|
|
3
|
+
</${v}>`}function C6(J,Q){if((J==="team"||J==="enterprise")&&Q)return{entries:Q,source:"org"};return{entries:RQ(),source:"ledger"}}function A6(J,Q){let Z=J.split(":");return Q.find((q)=>q.kind==="server"?J===q.name:Z[0]==="plugin"&&Z[1]===q.name)}function _$(J,Q,Z){if(!Q?.experimental?.["claude/channel"])return{action:"skip",kind:"capability",reason:"server did not declare claude/channel capability"};if(!FQ())return{action:"skip",kind:"disabled",reason:"channels feature is not currently available"};if(!VQ()?.accessToken)return{action:"skip",kind:"auth",reason:"channels requires claude.ai authentication (run /login)"};let q=wQ(),W=q==="team"||q==="enterprise",H=W?EQ("policySettings"):void 0;if(W&&H?.channelsEnabled!==!0)return{action:"skip",kind:"policy",reason:"channels not enabled by org policy (set channelsEnabled: true in managed settings)"};let $=A6(J,zQ());if(!$)return{action:"skip",kind:"session",reason:`server ${J} not in --channels list for this session`};if($.kind==="plugin"){let G=Z?h(Z).marketplace:void 0;if(G!==$.marketplace)return{action:"skip",kind:"marketplace",reason:`you asked for plugin:${$.name}@${$.marketplace} but the installed ${$.name} plugin is from ${G??"an unknown source"}`};if(!$.dev){let{entries:M,source:d}=C6(q,H?.allowedChannelPlugins);if(!M.some((R)=>R.plugin===$.name&&R.marketplace===$.marketplace))return{action:"skip",kind:"allowlist",reason:d==="org"?`plugin ${$.name}@${$.marketplace} is not on your org's approved channels list (set allowedChannelPlugins in managed settings)`:`plugin ${$.name}@${$.marketplace} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`}}}else if(!$.dev)return{action:"skip",kind:"allowlist",reason:`server ${$.name} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`};return{action:"register"}}var k$,V6="notifications/claude/channel/permission",d$,w6;var O6=Y(()=>{xQ();R6();F6();z6();NQ();LQ();I6();E6();IQ();k$=I(()=>K.object({method:K.literal("notifications/claude/channel"),params:K.object({content:K.string(),meta:K.record(K.string(),K.string()).optional()})})),d$=I(()=>K.object({method:K.literal(V6),params:K.object({request_id:K.string(),behavior:K.enum(["allow","deny"])})})),w6=/^[a-zA-Z_][a-zA-Z0-9_]*$/});
|
|
4
|
+
export{D$ as se,x6 as te,IQ as ue,k$ as ve,f$ as we,A6 as xe,_$ as ye,O6 as ze};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{k5 as v,l5 as C}from"./cli-0.1.12-y9598sy3.mjs";import{J6 as V,s6 as Z}from"./cli-0.1.12-rwzav5h1.mjs";import{D7 as W,E7 as O,xca as x,yca as Y}from"./cli-0.1.12-vzga2are.mjs";import{Rea as X,Sea as U}from"./cli-0.1.12-4wwhk7dc.mjs";import{efa as P,ifa as Q,qfa as H}from"./cli-0.1.12-g8mny195.mjs";import{Gga as w,Mga as I,Oga as R,Sga as L,eha as f,hha as M}from"./cli-0.1.12-rzpc0tr9.mjs";import{vna as N,wna as F}from"./cli-0.1.12-vgbc3g9x.mjs";import{Rna as h,Una as B}from"./cli-0.1.12-1hv04bp7.mjs";import{hostname as E}from"os";function $(){return P(G,!1)}function u(){if(!$())return;return y()}function n(){y.cache?.clear?.()}function o(){if(!$())return;let i=x();try{let q=i.read();if(q?.trustedDeviceToken)delete q.trustedDeviceToken,i.update(q)}catch{}y.cache?.clear?.()}async function t(){try{if(!await Q(G)){f(`[trusted-device] Gate ${G} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){f("[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)");return}let{getClaudeAIOAuthTokens:i}=(C(),h(v)),q=i()?.accessToken;if(!q){f("[trusted-device] No OAuth token, skipping enrollment");return}let J=x();if(W()){f("[trusted-device] Essential traffic only, skipping enrollment");return}let b=X().BASE_API_URL,m;try{m=await Z.post(`${b}/api/auth/trusted_devices`,{display_name:`Claude Code on ${E()} · ${process.platform}`},{headers:{Authorization:`Bearer ${q}`,"Content-Type":"application/json"},timeout:1e4,validateStatus:(j)=>j<500})}catch(j){f(`[trusted-device] Enrollment request failed: ${w(j)}`);return}if(m.status!==200&&m.status!==201){f(`[trusted-device] Enrollment failed ${m.status}: ${R(m.data).slice(0,200)}`);return}let z=m.data?.device_token;if(!z||typeof z!=="string"){f("[trusted-device] Enrollment response missing device_token field");return}try{let j=J.read();if(!j){f("[trusted-device] Cannot read storage, skipping token persist");return}j.trustedDeviceToken=z;let K=J.update(j);if(!K.success){f(`[trusted-device] Failed to persist token: ${K.warning??"unknown"}`);return}y.cache?.clear?.(),f(`[trusted-device] Enrolled device_id=${m.data.device_id??"unknown"}`)}catch(j){f(`[trusted-device] Storage write failed: ${w(j)}`)}}catch(i){f(`[trusted-device] Enrollment error: ${w(i)}`)}}var G="tengu_sessions_elevated_auth_enforcement",y;var d=B(()=>{V();F();U();H();M();I();O();Y();L();y=N(()=>{let i=process.env.CLAUDE_TRUSTED_DEVICE_TOKEN;if(i)return i;return x().read()?.trustedDeviceToken})});
|
|
2
|
+
export{u as pP,n as qP,o as rP,t as sP,d as tP};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Sna as j}from"./cli-0.1.12-1hv04bp7.mjs";var Lt=j((Q)=>{var y=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),L=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),m=Symbol.iterator;function q(t){if(t===null||typeof t!=="object")return null;return t=m&&t[m]||t["@@iterator"],typeof t==="function"?t:null}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,w={};function l(t,e,n){this.props=t,this.context=e,this.refs=w,this.updater=n||S}l.prototype.isReactComponent={};l.prototype.setState=function(t,e){if(typeof t!=="object"&&typeof t!=="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};l.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function P(){}P.prototype=l.prototype;function v(t,e,n){this.props=t,this.context=e,this.refs=w,this.updater=n||S}var T=v.prototype=new P;T.constructor=v;g(T,l.prototype);T.isPureReactComponent=!0;var C=Array.isArray;function E(){}var f={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function R(t,e,n){var r=n.ref;return{$$typeof:y,type:t,key:e,ref:r!==void 0?r:null,props:n}}function z(t,e){return R(t.type,e,t.props)}function x(t){return typeof t==="object"&&t!==null&&t.$$typeof===y}function G(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var d=/\/+/g;function a(t,e){return typeof t==="object"&&t!==null&&t.key!=null?G(""+t.key):e.toString(36)}function K(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status==="string"?t.then(E,E):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function p(t,e,n,r,o){var u=typeof t;if(u==="undefined"||u==="boolean")t=null;var s=!1;if(t===null)s=!0;else switch(u){case"bigint":case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case y:case $:s=!0;break;case h:return s=t._init,p(s(t._payload),e,n,r,o)}}if(s)return o=o(t),s=r===""?"."+a(t,0):r,C(o)?(n="",s!=null&&(n=s.replace(d,"$&/")+"/"),p(o,e,n,"",function(O){return O})):o!=null&&(x(o)&&(o=z(o,n+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(d,"$&/")+"/")+s)),e.push(o)),1;s=0;var c=r===""?".":r+":";if(C(t))for(var i=0;i<t.length;i++)r=t[i],u=c+a(r,i),s+=p(r,e,n,u,o);else if(i=q(t),typeof i==="function")for(t=i.call(t),i=0;!(r=t.next()).done;)r=r.value,u=c+a(r,i++),s+=p(r,e,n,u,o);else if(u==="object"){if(typeof t.then==="function")return p(K(t),e,n,r,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return s}function _(t,e,n){if(t==null)return t;var r=[],o=0;return p(t,r,"","",function(u){return e.call(n,u,o++)}),r}function B(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){if(t._status===0||t._status===-1)t._status=1,t._result=n},function(n){if(t._status===0||t._status===-1)t._status=2,t._result=n}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var A=typeof reportError==="function"?reportError:function(t){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t==="object"&&t!==null&&typeof t.message==="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",t);return}console.error(t)},W={map:_,forEach:function(t,e,n){_(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return _(t,function(){e++}),e},toArray:function(t){return _(t,function(e){return e})||[]},only:function(t){if(!x(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Q.Activity=D;Q.Children=W;Q.Component=l;Q.Fragment=I;Q.Profiler=M;Q.PureComponent=v;Q.StrictMode=N;Q.Suspense=U;Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f;Q.__COMPILER_RUNTIME={__proto__:null,c:function(t){return f.H.useMemoCache(t)}};Q.cache=function(t){return function(){return t.apply(null,arguments)}};Q.cacheSignal=function(){return null};Q.cloneElement=function(t,e,n){if(t===null||t===void 0)throw Error("The argument must be a React element, but you passed "+t+".");var r=g({},t.props),o=t.key;if(e!=null)for(u in e.key!==void 0&&(o=""+e.key),e)!H.call(e,u)||u==="key"||u==="__self"||u==="__source"||u==="ref"&&e.ref===void 0||(r[u]=e[u]);var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];r.children=s}return R(t.type,o,r)};Q.createContext=function(t){return t={$$typeof:L,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Y,_context:t},t};Q.createElement=function(t,e,n){var r,o={},u=null;if(e!=null)for(r in e.key!==void 0&&(u=""+e.key),e)H.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=e[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var c=Array(s),i=0;i<s;i++)c[i]=arguments[i+2];o.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return R(t,u,o)};Q.createRef=function(){return{current:null}};Q.forwardRef=function(t){return{$$typeof:k,render:t}};Q.isValidElement=x;Q.lazy=function(t){return{$$typeof:h,_payload:{_status:-1,_result:t},_init:B}};Q.memo=function(t,e){return{$$typeof:b,type:t,compare:e===void 0?null:e}};Q.startTransition=function(t){var e=f.T,n={};f.T=n;try{var r=t(),o=f.S;o!==null&&o(n,r),typeof r==="object"&&r!==null&&typeof r.then==="function"&&r.then(E,A)}catch(u){A(u)}finally{e!==null&&n.types!==null&&(e.types=n.types),f.T=e}};Q.unstable_useCacheRefresh=function(){return f.H.useCacheRefresh()};Q.use=function(t){return f.H.use(t)};Q.useActionState=function(t,e,n){return f.H.useActionState(t,e,n)};Q.useCallback=function(t,e){return f.H.useCallback(t,e)};Q.useContext=function(t){return f.H.useContext(t)};Q.useDebugValue=function(){};Q.useDeferredValue=function(t,e){return f.H.useDeferredValue(t,e)};Q.useEffect=function(t,e){return f.H.useEffect(t,e)};Q.useEffectEvent=function(t){return f.H.useEffectEvent(t)};Q.useId=function(){return f.H.useId()};Q.useImperativeHandle=function(t,e,n){return f.H.useImperativeHandle(t,e,n)};Q.useInsertionEffect=function(t,e){return f.H.useInsertionEffect(t,e)};Q.useLayoutEffect=function(t,e){return f.H.useLayoutEffect(t,e)};Q.useMemo=function(t,e){return f.H.useMemo(t,e)};Q.useOptimistic=function(t,e){return f.H.useOptimistic(t,e)};Q.useReducer=function(t,e,n){return f.H.useReducer(t,e,n)};Q.useRef=function(t){return f.H.useRef(t)};Q.useState=function(t){return f.H.useState(t)};Q.useSyncExternalStore=function(t,e,n){return f.H.useSyncExternalStore(t,e,n)};Q.useTransition=function(){return f.H.useTransition()};Q.version="19.2.4"});
|
|
2
|
+
export{Lt as uX};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Mc as j,Nc as E}from"./cli-0.1.12-p5w2kms9.mjs";import{DG as _,GG as $,KG as f,ik as W,lk as v,mG as X,oG as Y,xG as Z,zG as w}from"./cli-0.1.12-242der7s.mjs";import{F$ as A,I7 as Q,N7 as T,Nba as V,Yba as N,s$ as S}from"./cli-0.1.12-vzga2are.mjs";import{Gga as L,Mga as K,eha as B,hha as R}from"./cli-0.1.12-rzpc0tr9.mjs";import{Una as y}from"./cli-0.1.12-1hv04bp7.mjs";function d(q){if(J=q,G!==null&&G.length>0)q(G),G=null;return()=>{J=null}}async function C(){let q=await Y(),D=X(),x=new Set;for(let[z,h]of Object.entries(q)){let F=D[z]?.autoUpdate;if(F!==void 0?F:S(z,h))x.add(z.toLowerCase())}return x}async function M(q,D){let x=!1;for(let{scope:z}of D)try{let h=await j(q,z);if(h.success&&!h.alreadyUpToDate)x=!0,B(`Plugin autoupdate: updated ${q} from ${h.oldVersion} to ${h.newVersion}`);else if(!h.alreadyUpToDate)B(`Plugin autoupdate: failed to update ${q}: ${h.message}`,{level:"warn"})}catch(h){B(`Plugin autoupdate: error updating ${q}: ${L(h)}`,{level:"warn"})}return x?q:null}async function P(q){let D=_(),x=Object.keys(D.plugins);if(x.length===0)return[];return(await Promise.allSettled(x.map(async(h)=>{let{marketplace:F}=W(h);if(!F||!q.has(F.toLowerCase()))return null;let H=D.plugins[h];if(!H||H.length===0)return null;let O=H.filter($);if(O.length===0)return null;return M(h,O)}))).filter((h)=>h.status==="fulfilled"&&h.value!==null).map((h)=>h.value)}async function m(q){return P(q)}function t(){(async()=>{if(V()){B("Plugin autoupdate: skipped (auto-updater disabled)");return}try{let q=await C();if(q.size===0)return;let x=(await Promise.allSettled(Array.from(q).map(async(h)=>{try{await Z(h,void 0,{disableCredentialHelper:!0})}catch(F){B(`Plugin autoupdate: failed to refresh marketplace ${h}: ${L(F)}`,{level:"warn"})}}))).filter((h)=>h.status==="rejected");if(x.length>0)B(`Plugin autoupdate: ${x.length} marketplace refresh(es) failed`,{level:"warn"});B("Plugin autoupdate: checking installed plugins");let z=await m(q);if(z.length>0)if(J)J(z);else G=z}catch(q){Q(q)}})()}var J=null,G=null;var U=y(()=>{E();N();R();K();T();f();w();v();A()});
|
|
2
|
+
export{d as ic,P as jc,t as kc,U as lc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ay as U,By as w}from"./cli-0.1.12-242der7s.mjs";import{QU as N,SU as O,eT as f,vV as k}from"./cli-0.1.12-bddm1g1s.mjs";import{rX as M,sX as H,tX as R}from"./cli-0.1.12-04jw23rj.mjs";import{Qna as Y,Una as Z}from"./cli-0.1.12-1hv04bp7.mjs";function _(X){let q=V.c(10),{message:I,bold:P,dimColor:Q,subtitle:D}=X,J=P===void 0?!1:P,K=Q===void 0?!1:Q,E;if(q[0]===Symbol.for("react.memo_cache_sentinel"))E=M(U,{}),q[0]=E;else E=q[0];let v;if(q[1]!==J||q[2]!==K||q[3]!==I)v=H(N,{flexDirection:"row",children:[E,H(O,{bold:J,dimColor:K,children:[" ",I]})]}),q[1]=J,q[2]=K,q[3]=I,q[4]=v;else v=q[4];let z;if(q[5]!==D)z=D&&M(O,{dimColor:!0,children:D}),q[5]=D,q[6]=z;else z=q[6];let G;if(q[7]!==v||q[8]!==z)G=H(N,{flexDirection:"column",children:[v,z]}),q[7]=v,q[8]=z,q[9]=G;else G=q[9];return G}var V;var A=Z(()=>{k();w();R();V=Y(f(),1)});
|
|
2
|
+
export{_ as jf,A as kf};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{o as f}from"./cli-0.1.12-c47ape20.mjs";import{iA as F,jA as i}from"./cli-0.1.12-242der7s.mjs";import{cP as T,fP as e,gP as k,hP as z,mP as d}from"./cli-0.1.12-7mjpbm22.mjs";import{A5 as U,F5 as c,r5 as W,u5 as m,z5 as y}from"./cli-0.1.12-erggrdth.mjs";import{J6 as s,s6 as S}from"./cli-0.1.12-rwzav5h1.mjs";import{r7 as Z,t7 as R}from"./cli-0.1.12-vzga2are.mjs";import{$da as N,Yda as V,_da as I,aea as v}from"./cli-0.1.12-j6gjfwh5.mjs";import{ffa as E,qfa as b}from"./cli-0.1.12-g8mny195.mjs";import{gga as q,hga as p}from"./cli-0.1.12-6x2mnahn.mjs";import{Oga as O,Sga as w,eha as Y,hha as _}from"./cli-0.1.12-rzpc0tr9.mjs";import{Bha as h,rha as H}from"./cli-0.1.12-ra3sby5b.mjs";import{Vna as u}from"./cli-0.1.12-1hv04bp7.mjs";I();b();v();var j={poll_interval_ms_not_at_capacity:2000,poll_interval_ms_at_capacity:600000,non_exclusive_heartbeat_interval_ms:0,multisession_poll_interval_ms_not_at_capacity:2000,multisession_poll_interval_ms_partial_capacity:2000,multisession_poll_interval_ms_at_capacity:600000,reclaim_older_than_ms:5000,session_keepalive_interval_v2_ms:120000};var x={message:"must be 0 (disabled) or ≥100ms"},C=N(()=>V.object({poll_interval_ms_not_at_capacity:V.number().int().min(100),poll_interval_ms_at_capacity:V.number().int().refine((J)=>J===0||J>=100,x),non_exclusive_heartbeat_interval_ms:V.number().int().min(0).default(0),multisession_poll_interval_ms_not_at_capacity:V.number().int().min(100).default(j.multisession_poll_interval_ms_not_at_capacity),multisession_poll_interval_ms_partial_capacity:V.number().int().min(100).default(j.multisession_poll_interval_ms_partial_capacity),multisession_poll_interval_ms_at_capacity:V.number().int().refine((J)=>J===0||J>=100,x).default(j.multisession_poll_interval_ms_at_capacity),reclaim_older_than_ms:V.number().int().min(1).default(5000),session_keepalive_interval_v2_ms:V.number().int().min(0).default(120000)}).refine((J)=>J.non_exclusive_heartbeat_interval_ms>0||J.poll_interval_ms_at_capacity>0,{message:"at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or poll_interval_ms_at_capacity > 0"}).refine((J)=>J.non_exclusive_heartbeat_interval_ms>0||J.multisession_poll_interval_ms_at_capacity>0,{message:"at-capacity liveness requires non_exclusive_heartbeat_interval_ms > 0 or multisession_poll_interval_ms_at_capacity > 0"}));function BJ(){let J=E("tengu_bridge_poll_interval_config",j,300000),K=C().safeParse(J);return K.success?K.data:j}s();_();R();e();p();i();_();R();h();m();c();d();w();var g=`{"type":"keep_alive"}
|
|
2
|
+
`,t=1000,l=1000,D=30000,n=600000,r=1e4,o=300000,A=D*2,a=new Set([1002,4001,4003]);class L{ws=null;lastSentId=null;url;state="idle";onData;onCloseCallback;onConnectCallback;headers;sessionId;autoReconnect;isBridge;reconnectAttempts=0;reconnectStartTime=null;reconnectTimer=null;lastReconnectAttemptTime=null;lastActivityTime=0;pingInterval=null;pongReceived=!0;keepAliveInterval=null;messageBuffer;isBunWs=!1;connectStartTime=0;refreshHeaders;constructor(J,K={},Q,X,$){this.url=J,this.headers=K,this.sessionId=Q,this.refreshHeaders=X,this.autoReconnect=$?.autoReconnect??!0,this.isBridge=$?.isBridge??!1,this.messageBuffer=new F(t)}async connect(){if(this.state!=="idle"&&this.state!=="reconnecting"){Y(`WebSocketTransport: Cannot connect, current state is ${this.state}`,{level:"error"}),Z("error","cli_websocket_connect_failed");return}this.state="reconnecting",this.connectStartTime=Date.now(),Y(`WebSocketTransport: Opening ${this.url.href}`),Z("info","cli_websocket_connect_opening");let J={...this.headers};if(this.lastSentId)J["X-Last-Request-Id"]=this.lastSentId,Y(`WebSocketTransport: Adding X-Last-Request-Id header: ${this.lastSentId}`);if(typeof Bun<"u"){let K=new globalThis.WebSocket(this.url.href,{headers:J,proxy:U(this.url.href),tls:W()||void 0});this.ws=K,this.isBunWs=!0,K.addEventListener("open",this.onBunOpen),K.addEventListener("message",this.onBunMessage),K.addEventListener("error",this.onBunError),K.addEventListener("close",this.onBunClose),K.addEventListener("pong",this.onPong)}else{let{default:K}=await import("./wrapper-0.1.12-bpewypaz.mjs"),Q=new K(this.url.href,{headers:J,agent:y(this.url.href),...W()});this.ws=Q,this.isBunWs=!1,Q.on("open",this.onNodeOpen),Q.on("message",this.onNodeMessage),Q.on("error",this.onNodeError),Q.on("close",this.onNodeClose),Q.on("pong",this.onPong)}}onBunOpen=()=>{if(this.handleOpenEvent(),this.lastSentId)this.replayBufferedMessages("")};onBunMessage=(J)=>{let K=typeof J.data==="string"?J.data:String(J.data);if(this.lastActivityTime=Date.now(),Z("info","cli_websocket_message_received",{length:K.length}),this.onData)this.onData(K)};onBunError=()=>{Y("WebSocketTransport: Error",{level:"error"}),Z("error","cli_websocket_connect_error")};onBunClose=(J)=>{let K=J.code===1000||J.code===1001;Y(`WebSocketTransport: Closed: ${J.code}`,K?void 0:{level:"error"}),Z("error","cli_websocket_connect_closed"),this.handleConnectionError(J.code)};onNodeOpen=()=>{let J=this.ws;if(this.handleOpenEvent(),!J)return;let Q=J.upgradeReq;if(Q?.headers?.["x-last-request-id"]){let X=Q.headers["x-last-request-id"];this.replayBufferedMessages(X)}};onNodeMessage=(J)=>{let K=J.toString();if(this.lastActivityTime=Date.now(),Z("info","cli_websocket_message_received",{length:K.length}),this.onData)this.onData(K)};onNodeError=(J)=>{Y(`WebSocketTransport: Error: ${J.message}`,{level:"error"}),Z("error","cli_websocket_connect_error")};onNodeClose=(J,K)=>{let Q=J===1000||J===1001;Y(`WebSocketTransport: Closed: ${J}`,Q?void 0:{level:"error"}),Z("error","cli_websocket_connect_closed"),this.handleConnectionError(J)};onPong=()=>{this.pongReceived=!0};handleOpenEvent(){let J=Date.now()-this.connectStartTime;if(Y("WebSocketTransport: Connected"),Z("info","cli_websocket_connect_connected",{duration_ms:J}),this.isBridge&&this.reconnectStartTime!==null)q("tengu_ws_transport_reconnected",{attempts:this.reconnectAttempts,downtimeMs:Date.now()-this.reconnectStartTime});this.reconnectAttempts=0,this.reconnectStartTime=null,this.lastReconnectAttemptTime=null,this.lastActivityTime=Date.now(),this.state="connected",this.onConnectCallback?.(),this.startPingInterval(),this.startKeepaliveInterval(),k(()=>{this.write({type:"keep_alive"})})}sendLine(J){if(!this.ws||this.state!=="connected")return Y("WebSocketTransport: Not connected"),Z("info","cli_websocket_send_not_connected"),!1;try{return this.ws.send(J),this.lastActivityTime=Date.now(),!0}catch(K){return Y(`WebSocketTransport: Failed to send: ${K}`,{level:"error"}),Z("error","cli_websocket_send_error"),this.handleConnectionError(),!1}}removeWsListeners(J){if(this.isBunWs){let K=J;K.removeEventListener("open",this.onBunOpen),K.removeEventListener("message",this.onBunMessage),K.removeEventListener("error",this.onBunError),K.removeEventListener("close",this.onBunClose),K.removeEventListener("pong",this.onPong)}else{let K=J;K.off("open",this.onNodeOpen),K.off("message",this.onNodeMessage),K.off("error",this.onNodeError),K.off("close",this.onNodeClose),K.off("pong",this.onPong)}}doDisconnect(){if(this.stopPingInterval(),this.stopKeepaliveInterval(),z(),this.ws)this.removeWsListeners(this.ws),this.ws.close(),this.ws=null}handleConnectionError(J){if(Y(`WebSocketTransport: Disconnected from ${this.url.href}`+(J!=null?` (code ${J})`:"")),Z("info","cli_websocket_disconnected"),this.isBridge)q("tengu_ws_transport_closed",{closeCode:J,msSinceLastActivity:this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1,wasConnected:this.state==="connected",reconnectAttempts:this.reconnectAttempts});if(this.doDisconnect(),this.state==="closing"||this.state==="closed")return;let K=!1;if(J===4003&&this.refreshHeaders){let $=this.refreshHeaders();if($.Authorization!==this.headers.Authorization)Object.assign(this.headers,$),K=!0,Y("WebSocketTransport: 4003 received but headers refreshed, scheduling reconnect"),Z("info","cli_websocket_4003_token_refreshed")}if(J!=null&&a.has(J)&&!K){Y(`WebSocketTransport: Permanent close code ${J}, not reconnecting`,{level:"error"}),Z("error","cli_websocket_permanent_close",{closeCode:J}),this.state="closed",this.onCloseCallback?.(J);return}if(!this.autoReconnect){this.state="closed",this.onCloseCallback?.(J);return}let Q=Date.now();if(!this.reconnectStartTime)this.reconnectStartTime=Q;if(this.lastReconnectAttemptTime!==null&&Q-this.lastReconnectAttemptTime>A)Y(`WebSocketTransport: Detected system sleep (${Math.round((Q-this.lastReconnectAttemptTime)/1000)}s gap), resetting reconnection budget`),Z("info","cli_websocket_sleep_detected",{gapMs:Q-this.lastReconnectAttemptTime}),this.reconnectStartTime=Q,this.reconnectAttempts=0;this.lastReconnectAttemptTime=Q;let X=Q-this.reconnectStartTime;if(X<n){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(!K&&this.refreshHeaders){let B=this.refreshHeaders();Object.assign(this.headers,B),Y("WebSocketTransport: Refreshed headers for reconnect")}this.state="reconnecting",this.reconnectAttempts++;let $=Math.min(l*Math.pow(2,this.reconnectAttempts-1),D),G=Math.max(0,$+$*0.25*(2*Math.random()-1));if(Y(`WebSocketTransport: Reconnecting in ${Math.round(G)}ms (attempt ${this.reconnectAttempts}, ${Math.round(X/1000)}s elapsed)`),Z("error","cli_websocket_reconnect_attempt",{reconnectAttempts:this.reconnectAttempts}),this.isBridge)q("tengu_ws_transport_reconnecting",{attempt:this.reconnectAttempts,elapsedMs:X,delayMs:Math.round(G)});this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},G)}else if(Y(`WebSocketTransport: Reconnection time budget exhausted after ${Math.round(X/1000)}s for ${this.url.href}`,{level:"error"}),Z("error","cli_websocket_reconnect_exhausted",{reconnectAttempts:this.reconnectAttempts,elapsedMs:X}),this.state="closed",this.onCloseCallback)this.onCloseCallback(J)}close(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;this.stopPingInterval(),this.stopKeepaliveInterval(),z(),this.state="closing",this.doDisconnect()}replayBufferedMessages(J){let K=this.messageBuffer.toArray();if(K.length===0)return;let Q=0;if(J){let $=K.findIndex((G)=>("uuid"in G)&&G.uuid===J);if($>=0){Q=$+1;let G=K.slice(Q);if(this.messageBuffer.clear(),this.messageBuffer.addAll(G),G.length===0)this.lastSentId=null;Y(`WebSocketTransport: Evicted ${Q} confirmed messages, ${G.length} remaining`),Z("info","cli_websocket_evicted_confirmed_messages",{evicted:Q,remaining:G.length})}}let X=K.slice(Q);if(X.length===0){Y("WebSocketTransport: No new messages to replay"),Z("info","cli_websocket_no_messages_to_replay");return}Y(`WebSocketTransport: Replaying ${X.length} buffered messages`),Z("info","cli_websocket_messages_to_replay",{count:X.length});for(let $ of X){let G=O($)+`
|
|
3
|
+
`;if(!this.sendLine(G)){this.handleConnectionError();break}}}isConnectedStatus(){return this.state==="connected"}isClosedStatus(){return this.state==="closed"}setOnData(J){this.onData=J}setOnConnect(J){this.onConnectCallback=J}setOnClose(J){this.onCloseCallback=J}getStateLabel(){return this.state}async write(J){if("uuid"in J&&typeof J.uuid==="string")this.messageBuffer.add(J),this.lastSentId=J.uuid;let K=O(J)+`
|
|
4
|
+
`;if(this.state!=="connected")return;let Q=this.sessionId?` session=${this.sessionId}`:"",X=this.getControlMessageDetailLabel(J);Y(`WebSocketTransport: Sending message type=${J.type}${Q}${X}`),this.sendLine(K)}getControlMessageDetailLabel(J){if(J.type==="control_request"){let{request_id:K,request:Q}=J,X=Q.subtype==="can_use_tool"?Q.tool_name:"";return` subtype=${Q.subtype} request_id=${K}${X?` tool=${X}`:""}`}if(J.type==="control_response"){let{subtype:K,request_id:Q}=J.response;return` subtype=${K} request_id=${Q}`}return""}startPingInterval(){this.stopPingInterval(),this.pongReceived=!0;let J=Date.now();this.pingInterval=setInterval(()=>{if(this.state==="connected"&&this.ws){let K=Date.now(),Q=K-J;if(J=K,Q>A){Y(`WebSocketTransport: ${Math.round(Q/1000)}s tick gap detected — process was suspended, forcing reconnect`),Z("info","cli_websocket_sleep_detected_on_ping",{gapMs:Q}),this.handleConnectionError();return}if(!this.pongReceived){Y("WebSocketTransport: No pong received, connection appears dead",{level:"error"}),Z("error","cli_websocket_pong_timeout"),this.handleConnectionError();return}this.pongReceived=!1;try{this.ws.ping?.()}catch(X){Y(`WebSocketTransport: Ping failed: ${X}`,{level:"error"}),Z("error","cli_websocket_ping_failed")}}},r)}stopPingInterval(){if(this.pingInterval)clearInterval(this.pingInterval),this.pingInterval=null}startKeepaliveInterval(){if(this.stopKeepaliveInterval(),H(process.env.CLAUDE_CODE_REMOTE))return;this.keepAliveInterval=setInterval(()=>{if(this.state==="connected"&&this.ws)try{this.ws.send(g),this.lastActivityTime=Date.now(),Y("WebSocketTransport: Sent periodic keep_alive data frame")}catch(J){Y(`WebSocketTransport: Periodic keep_alive failed: ${J}`,{level:"error"}),Z("error","cli_websocket_keepalive_failed")}},o)}stopKeepaliveInterval(){if(this.keepAliveInterval)clearInterval(this.keepAliveInterval),this.keepAliveInterval=null}}var JJ=100,KJ=15000,QJ=3000;class XJ extends L{postUrl;uploader;streamEventBuffer=[];streamEventTimer=null;constructor(J,K={},Q,X,$){super(J,K,Q,X,$);let{maxConsecutiveFailures:G,onBatchDropped:B}=$??{};this.postUrl=YJ(J),this.uploader=new f({maxBatchSize:500,maxQueueSize:1e5,baseDelayMs:500,maxDelayMs:8000,jitterMs:1000,maxConsecutiveFailures:G,onBatchDropped:(M,P)=>{Z("error","cli_hybrid_batch_dropped_max_failures",{batchSize:M,failures:P}),B?.(M,P)},send:(M)=>this.postOnce(M)}),Y(`HybridTransport: POST URL = ${this.postUrl}`),Z("info","cli_hybrid_transport_initialized")}async write(J){if(J.type==="stream_event"){if(this.streamEventBuffer.push(J),!this.streamEventTimer)this.streamEventTimer=setTimeout(()=>this.flushStreamEvents(),JJ);return}return await this.uploader.enqueue([...this.takeStreamEvents(),J]),this.uploader.flush()}async writeBatch(J){return await this.uploader.enqueue([...this.takeStreamEvents(),...J]),this.uploader.flush()}get droppedBatchCount(){return this.uploader.droppedBatchCount}flush(){return this.uploader.enqueue(this.takeStreamEvents()),this.uploader.flush()}takeStreamEvents(){if(this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;let J=this.streamEventBuffer;return this.streamEventBuffer=[],J}flushStreamEvents(){this.streamEventTimer=null,this.uploader.enqueue(this.takeStreamEvents())}close(){if(this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;this.streamEventBuffer=[];let J=this.uploader,K;Promise.race([J.flush(),new Promise((Q)=>{K=setTimeout(Q,QJ)})]).finally(()=>{clearTimeout(K),J.close()}),super.close()}async postOnce(J){let K=T();if(!K){Y("HybridTransport: No session token available for POST"),Z("warn","cli_hybrid_post_no_token");return}let Q={Authorization:`Bearer ${K}`,"Content-Type":"application/json"},X;try{X=await S.post(this.postUrl,{events:J},{headers:Q,validateStatus:()=>!0,timeout:KJ})}catch($){throw Y(`HybridTransport: POST error: ${$.message}`),Z("warn","cli_hybrid_post_network_error"),$}if(X.status>=200&&X.status<300){Y(`HybridTransport: POST success count=${J.length}`);return}if(X.status>=400&&X.status<500&&X.status!==429){Y(`HybridTransport: POST returned ${X.status} (permanent), dropping`),Z("warn","cli_hybrid_post_client_error",{status:X.status});return}throw Y(`HybridTransport: POST returned ${X.status} (retryable)`),Z("warn","cli_hybrid_post_retryable_error",{status:X.status}),Error(`POST failed with ${X.status}`)}}function YJ(J){let K=J.protocol==="wss:"?"https:":"http:",Q=J.pathname;if(Q=Q.replace("/ws/","/session/"),!Q.endsWith("/events"))Q=Q.endsWith("/")?Q+"events":Q+"/events";return`${K}//${J.host}${Q}${J.search}`}
|
|
5
|
+
export{j,BJ as k,L as l,XJ as m};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{yh as a,zh as l}from"./cli-0.1.12-fx0zg3d9.mjs";import{Ah as m,Bh as c}from"./cli-0.1.12-nnyca8nb.mjs";import{rX as e,tX as n}from"./cli-0.1.12-04jw23rj.mjs";import{Una as s}from"./cli-0.1.12-1hv04bp7.mjs";async function f(o,r){let t=await m();if(t.type==="message")return o(t.value),null;return e(a,{startingMessage:"Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.",onDone:(i)=>{r.onChangeAPIKey(),o(i?"Login successful":"Login interrupted")}})}var g=s(()=>{l();c();n()});
|
|
2
|
+
export{f as wh,g as xh};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L1 as a,M1 as b,N1 as c,O1 as d,P1 as e,Q1 as f,R1 as g,S1 as h,T1 as i,U1 as j,V1 as k,W1 as l,X1 as m}from"./cli-0.1.12-y9598sy3.mjs";import"./cli-0.1.12-erggrdth.mjs";import"./cli-0.1.12-m6jeef2z.mjs";import"./cli-0.1.12-bjzb0sjt.mjs";import"./cli-0.1.12-rwzav5h1.mjs";import"./cli-0.1.12-qn20n18h.mjs";import"./cli-0.1.12-y04asmqh.mjs";import"./cli-0.1.12-vzga2are.mjs";import"./cli-0.1.12-j6gjfwh5.mjs";import"./cli-0.1.12-g3ycbjxk.mjs";import"./cli-0.1.12-4wwhk7dc.mjs";import"./cli-0.1.12-tae7cd7e.mjs";import"./cli-0.1.12-g8mny195.mjs";import"./cli-0.1.12-bhxgr018.mjs";import"./cli-0.1.12-v000x470.mjs";import"./cli-0.1.12-6x2mnahn.mjs";import"./cli-0.1.12-rzpc0tr9.mjs";import"./cli-0.1.12-k2164g7e.mjs";import"./cli-0.1.12-ra3sby5b.mjs";import"./cli-0.1.12-pm5cwtxh.mjs";import"./cli-0.1.12-vgbc3g9x.mjs";import"./cli-0.1.12-1hv04bp7.mjs";m();export{l as storeOAuthAccountInfo,a as shouldUseClaudeAIAuth,e as refreshOAuthToken,k as populateOAuthAccountInfoIfNeeded,b as parseScopes,h as isOAuthTokenExpired,j as getOrganizationUUID,i as fetchProfileInfo,f as fetchAndStoreUserRoles,d as exchangeCodeForTokens,g as createAndStoreApiKey,c as buildAuthUrl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AL as F,CM as H,Dl as Y,gN as f,zl as w}from"./cli-0.1.12-242der7s.mjs";import"./cli-0.1.12-7mjpbm22.mjs";import"./cli-0.1.12-yk12dgnx.mjs";import"./cli-0.1.12-q8k1zvhb.mjs";import"./cli-0.1.12-vpnp7x5c.mjs";import"./cli-0.1.12-kea0zcje.mjs";import"./cli-0.1.12-86nmrm6g.mjs";import"./cli-0.1.12-xcxjv6qd.mjs";import"./cli-0.1.12-f0x1y6nn.mjs";import"./cli-0.1.12-2zqgfhrb.mjs";import{iR as K,qR as Z}from"./cli-0.1.12-6238zg7k.mjs";import"./cli-0.1.12-1x06khjr.mjs";import"./cli-0.1.12-37ezy1qg.mjs";import"./cli-0.1.12-19as1myk.mjs";import"./cli-0.1.12-2v18rdhk.mjs";import"./cli-0.1.12-a5h71tt8.mjs";import"./cli-0.1.12-2fajd44n.mjs";import"./cli-0.1.12-ktpqrbjc.mjs";import"./cli-0.1.12-tyt09z73.mjs";import"./cli-0.1.12-bddm1g1s.mjs";import"./cli-0.1.12-4sh0f4y1.mjs";import"./cli-0.1.12-5ye0t0xd.mjs";import"./cli-0.1.12-sgtpyf6y.mjs";import"./cli-0.1.12-52dbx2x6.mjs";import"./cli-0.1.12-r6f9sy54.mjs";import"./cli-0.1.12-sxxpysy8.mjs";import"./cli-0.1.12-817sd5bc.mjs";import"./cli-0.1.12-h248m986.mjs";import"./cli-0.1.12-04jw23rj.mjs";import"./cli-0.1.12-ytxphavm.mjs";import"./cli-0.1.12-7xsa2bcp.mjs";import"./cli-0.1.12-d8m01qtm.mjs";import"./cli-0.1.12-trdq9d6x.mjs";import"./cli-0.1.12-c23pyffx.mjs";import"./cli-0.1.12-q63qrz06.mjs";import"./cli-0.1.12-4qedbzt3.mjs";import"./cli-0.1.12-vxej5jdm.mjs";import"./cli-0.1.12-v8j9zstg.mjs";import"./cli-0.1.12-352pjhkh.mjs";import"./cli-0.1.12-73k5qd97.mjs";import"./cli-0.1.12-d0es0fxd.mjs";import"./cli-0.1.12-actnmgw5.mjs";import"./cli-0.1.12-qsh4sj4y.mjs";import"./cli-0.1.12-y9598sy3.mjs";import"./cli-0.1.12-erggrdth.mjs";import"./cli-0.1.12-m6jeef2z.mjs";import"./cli-0.1.12-bjzb0sjt.mjs";import"./cli-0.1.12-mr41yjpw.mjs";import"./cli-0.1.12-rwzav5h1.mjs";import"./cli-0.1.12-qn20n18h.mjs";import"./cli-0.1.12-y04asmqh.mjs";import"./cli-0.1.12-vzga2are.mjs";import"./cli-0.1.12-j6gjfwh5.mjs";import"./cli-0.1.12-g3ycbjxk.mjs";import"./cli-0.1.12-4wwhk7dc.mjs";import"./cli-0.1.12-tae7cd7e.mjs";import"./cli-0.1.12-g8mny195.mjs";import"./cli-0.1.12-bhxgr018.mjs";import"./cli-0.1.12-v000x470.mjs";import"./cli-0.1.12-6x2mnahn.mjs";import"./cli-0.1.12-rzpc0tr9.mjs";import"./cli-0.1.12-k2164g7e.mjs";import"./cli-0.1.12-ra3sby5b.mjs";import{Yma as X,dja as B}from"./cli-0.1.12-pm5cwtxh.mjs";import"./cli-0.1.12-vgbc3g9x.mjs";import{Una as W}from"./cli-0.1.12-1hv04bp7.mjs";async function h(q,J,y){if(K())return q("Cannot set color: This session is a swarm teammate. Teammate colors are assigned by the team leader.",{display:"system"}),null;if(!y||y.trim()===""){let b=w.join(", ");return q(`Please provide a color. Available colors: ${b}, default`,{display:"system"}),null}let k=y.trim().toLowerCase();if($.includes(k)){let b=B(),V=F();return await H(b,"default",V),J.setAppState((z)=>({...z,standaloneAgentContext:{...z.standaloneAgentContext,name:z.standaloneAgentContext?.name??"",color:void 0}})),q("Session color reset to default",{display:"system"}),null}if(!w.includes(k)){let b=w.join(", ");return q(`Invalid color "${k}". Available colors: ${b}, default`,{display:"system"}),null}let Q=B(),U=F();return await H(Q,k,U),J.setAppState((b)=>({...b,standaloneAgentContext:{...b.standaloneAgentContext,name:b.standaloneAgentContext?.name??"",color:k}})),q(`Session color set to: ${k}`,{display:"system"}),null}var $;var M=W(()=>{X();Y();f();Z();$=["default","reset","none","gray","grey"]});M();export{h as call};
|