@claudiolabs/claudin 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AgentTool-1.1.7-ta4a3hax.mjs +1 -0
- package/dist/chunks/App-1.1.7-bb5w6zvz.mjs +1 -0
- package/dist/chunks/ApproveApiKey-1.1.7-92afe7m0.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-1.1.7-gx3qxf94.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-1.1.7-d0as32bc.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-1.1.7-etp5s6ps.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.7-9thhg137.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-1.1.7-wwv2cgzz.mjs +1 -0
- package/dist/chunks/DiffDialog-1.1.7-30wzw849.mjs +7 -0
- package/dist/chunks/Doctor-1.1.7-m040nz42.mjs +1 -0
- package/dist/chunks/ExplorerDialog-1.1.7-xemvy0mx.mjs +6 -0
- package/dist/chunks/Grove-1.1.7-0synn9dr.mjs +1 -0
- package/dist/chunks/ITermBackend-1.1.7-be5cx2dr.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-1.1.7-b37xct1d.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-1.1.7-89avh225.mjs +1 -0
- package/dist/chunks/MigrationDialog-1.1.7-1k5yjmhb.mjs +1 -0
- package/dist/chunks/Onboarding-1.1.7-0qnmq973.mjs +1 -0
- package/dist/chunks/ProviderManager-1.1.7-h9tf58hn.mjs +1 -0
- package/dist/chunks/REPL-1.1.7-93jsr9mr.mjs +1 -0
- package/dist/chunks/ResumeConversation-1.1.7-gv6zzztg.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-1.1.7-p7e7703c.mjs +1 -0
- package/dist/chunks/TeleportProgress-1.1.7-p8bxj585.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.7-nz62ycxc.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-1.1.7-p5pzbd37.mjs +1 -0
- package/dist/chunks/TmuxBackend-1.1.7-6wwv8wy2.mjs +9 -0
- package/dist/chunks/ToolSearchTool-1.1.7-cdgerv78.mjs +1 -0
- package/dist/chunks/TrustDialog-1.1.7-h6jenc4t.mjs +1 -0
- package/dist/chunks/activeProvider-1.1.7-3xbperzf.mjs +1 -0
- package/dist/chunks/add-dir-1.1.7-e1padvq0.mjs +1 -0
- package/dist/chunks/agentTypes-1.1.7-s8xd8r8v.mjs +1 -0
- package/dist/chunks/agents-1.1.7-a5ngvagv.mjs +3 -0
- package/dist/chunks/agents-1.1.7-c2hzc3gf.mjs +110 -0
- package/dist/chunks/api-1.1.7-fkvjxbac.mjs +1 -0
- package/dist/chunks/asciicast-1.1.7-9j8vqr1m.mjs +1 -0
- package/dist/chunks/assistant-1.1.7-fxfh1k7b.mjs +1 -0
- package/dist/chunks/auth-1.1.7-nrjefdt5.mjs +1 -0
- package/dist/chunks/auth-1.1.7-z48g7tsc.mjs +1 -0
- package/dist/chunks/autoMode-1.1.7-13583dda.mjs +48 -0
- package/dist/chunks/autoUpdater-1.1.7-s5qp83zy.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-1.1.7-4nc59aph.mjs +1 -0
- package/dist/chunks/branch-1.1.7-ar2367j0.mjs +4 -0
- package/dist/chunks/bridge-1.1.7-qk1825qz.mjs +2 -0
- package/dist/chunks/bridgeConfig-1.1.7-dfwv9704.mjs +1 -0
- package/dist/chunks/bridgeEnabled-1.1.7-ergk9b5s.mjs +1 -0
- package/dist/chunks/bridgeMain-1.1.7-re0t745d.mjs +88 -0
- package/dist/chunks/bridgePointer-1.1.7-pcfmgmj9.mjs +1 -0
- package/dist/chunks/btw-1.1.7-g8g55nje.mjs +1 -0
- package/dist/chunks/buddy-1.1.7-m8tx1e1a.mjs +3 -0
- package/dist/chunks/cacache-1.1.7-5t3nj244.mjs +1 -0
- package/dist/chunks/cache-probe-1.1.7-wk6sr8ma.mjs +21 -0
- package/dist/chunks/cacheStats-1.1.7-3wd7pt08.mjs +4 -0
- package/dist/chunks/caches-1.1.7-rwrwkfmc.mjs +1 -0
- package/dist/chunks/claudeDesktop-1.1.7-3pkhb5wd.mjs +1 -0
- package/dist/chunks/claudemd-1.1.7-zw1vywa0.mjs +1 -0
- package/dist/chunks/clear-1.1.7-xme70phr.mjs +1 -0
- package/dist/chunks/clearTerminal-1.1.7-cjgtkhn0.mjs +1 -0
- package/dist/chunks/cli-1.1.7-00r59ren.mjs +2 -0
- package/dist/chunks/cli-1.1.7-00xwy80x.mjs +2 -0
- package/dist/chunks/cli-1.1.7-07qdmr1e.mjs +15 -0
- package/dist/chunks/cli-1.1.7-0dn48gxn.mjs +2 -0
- package/dist/chunks/cli-1.1.7-0ptzaz8z.mjs +15 -0
- package/dist/chunks/cli-1.1.7-0sbdqb04.mjs +45 -0
- package/dist/chunks/cli-1.1.7-0yczgbvg.mjs +133 -0
- package/dist/chunks/cli-1.1.7-17ye23zw.mjs +2 -0
- package/dist/chunks/cli-1.1.7-1fyag9qs.mjs +18 -0
- package/dist/chunks/cli-1.1.7-1pt67y2k.mjs +2 -0
- package/dist/chunks/cli-1.1.7-1sjzdsvt.mjs +2 -0
- package/dist/chunks/cli-1.1.7-1wwtwdd5.mjs +2 -0
- package/dist/chunks/cli-1.1.7-237ea9et.mjs +2 -0
- package/dist/chunks/cli-1.1.7-247qq37c.mjs +2 -0
- package/dist/chunks/cli-1.1.7-29jtrc18.mjs +6 -0
- package/dist/chunks/cli-1.1.7-2j5f9qsg.mjs +2 -0
- package/dist/chunks/cli-1.1.7-370fzee5.mjs +202 -0
- package/dist/chunks/cli-1.1.7-37vw5n8s.mjs +4 -0
- package/dist/chunks/cli-1.1.7-3c1fz3tj.mjs +3 -0
- package/dist/chunks/cli-1.1.7-3c59vjgs.mjs +3 -0
- package/dist/chunks/cli-1.1.7-3s5h7xwp.mjs +2 -0
- package/dist/chunks/cli-1.1.7-3yd94afn.mjs +2 -0
- package/dist/chunks/cli-1.1.7-45h3r40v.mjs +2 -0
- package/dist/chunks/cli-1.1.7-4jb3802k.mjs +6 -0
- package/dist/chunks/cli-1.1.7-4vn54hra.mjs +2 -0
- package/dist/chunks/cli-1.1.7-4w65nb7a.mjs +2 -0
- package/dist/chunks/cli-1.1.7-53ptk5md.mjs +2 -0
- package/dist/chunks/cli-1.1.7-55sdnwxx.mjs +2 -0
- package/dist/chunks/cli-1.1.7-5a7dx8xv.mjs +67 -0
- package/dist/chunks/cli-1.1.7-5afzqeez.mjs +2 -0
- package/dist/chunks/cli-1.1.7-5hy6nrtz.mjs +2 -0
- package/dist/chunks/cli-1.1.7-5jtj2ksb.mjs +2 -0
- package/dist/chunks/cli-1.1.7-5p7dfxc8.mjs +3 -0
- package/dist/chunks/cli-1.1.7-5xg15za9.mjs +2 -0
- package/dist/chunks/cli-1.1.7-6327xnsa.mjs +16 -0
- package/dist/chunks/cli-1.1.7-6393tfa4.mjs +2 -0
- package/dist/chunks/cli-1.1.7-6k9j331s.mjs +2 -0
- package/dist/chunks/cli-1.1.7-709xp7h3.mjs +2 -0
- package/dist/chunks/cli-1.1.7-70dq06tj.mjs +2 -0
- package/dist/chunks/cli-1.1.7-77fv8msz.mjs +4 -0
- package/dist/chunks/cli-1.1.7-78k36t0w.mjs +2 -0
- package/dist/chunks/cli-1.1.7-7m4h7kpa.mjs +4 -0
- package/dist/chunks/cli-1.1.7-7ykpgzpd.mjs +2 -0
- package/dist/chunks/cli-1.1.7-7zf1vqxk.mjs +2 -0
- package/dist/chunks/cli-1.1.7-80x28qvs.mjs +50 -0
- package/dist/chunks/cli-1.1.7-89xnqhx8.mjs +2 -0
- package/dist/chunks/cli-1.1.7-8e3qerv0.mjs +59 -0
- package/dist/chunks/cli-1.1.7-8f779vem.mjs +2 -0
- package/dist/chunks/cli-1.1.7-8hfhdq9h.mjs +2 -0
- package/dist/chunks/cli-1.1.7-8ht7sy5z.mjs +2 -0
- package/dist/chunks/cli-1.1.7-8pdn9bvd.mjs +2 -0
- package/dist/chunks/cli-1.1.7-8wevpaq4.mjs +25 -0
- package/dist/chunks/cli-1.1.7-903dbpsw.mjs +2 -0
- package/dist/chunks/cli-1.1.7-91mbg6d2.mjs +2 -0
- package/dist/chunks/cli-1.1.7-9cr42mkf.mjs +2 -0
- package/dist/chunks/cli-1.1.7-9twa1dgn.mjs +2 -0
- package/dist/chunks/cli-1.1.7-9wapsqqm.mjs +2 -0
- package/dist/chunks/cli-1.1.7-a16gq5s9.mjs +2 -0
- package/dist/chunks/cli-1.1.7-a1sffgeq.mjs +2 -0
- package/dist/chunks/cli-1.1.7-a34vkb0g.mjs +2 -0
- package/dist/chunks/cli-1.1.7-a59w1d0k.mjs +3 -0
- package/dist/chunks/cli-1.1.7-a5zb1mk0.mjs +4 -0
- package/dist/chunks/cli-1.1.7-aa0r6myz.mjs +3 -0
- package/dist/chunks/cli-1.1.7-ac6ve6ks.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ah2nkq02.mjs +2 -0
- package/dist/chunks/cli-1.1.7-aq4f719n.mjs +2 -0
- package/dist/chunks/cli-1.1.7-asb7164v.mjs +18 -0
- package/dist/chunks/cli-1.1.7-asnfms2j.mjs +15 -0
- package/dist/chunks/cli-1.1.7-avggtwyk.mjs +2 -0
- package/dist/chunks/cli-1.1.7-avhh3ykn.mjs +2 -0
- package/dist/chunks/cli-1.1.7-avqm93yx.mjs +2 -0
- package/dist/chunks/cli-1.1.7-avsxepp6.mjs +2 -0
- package/dist/chunks/cli-1.1.7-az0v3sy4.mjs +39 -0
- package/dist/chunks/cli-1.1.7-b9n3ev12.mjs +2 -0
- package/dist/chunks/cli-1.1.7-be3bepsr.mjs +2 -0
- package/dist/chunks/cli-1.1.7-bgyeh9f1.mjs +5 -0
- package/dist/chunks/cli-1.1.7-bmf232xq.mjs +2 -0
- package/dist/chunks/cli-1.1.7-bn38catj.mjs +2 -0
- package/dist/chunks/cli-1.1.7-bsg2jwaz.mjs +2 -0
- package/dist/chunks/cli-1.1.7-c32f3enb.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ca9b0k53.mjs +3 -0
- package/dist/chunks/cli-1.1.7-cfchvspf.mjs +12 -0
- package/dist/chunks/cli-1.1.7-cgcj8thk.mjs +2 -0
- package/dist/chunks/cli-1.1.7-cs5v2rwy.mjs +2 -0
- package/dist/chunks/cli-1.1.7-czrff7za.mjs +3 -0
- package/dist/chunks/cli-1.1.7-d44wcebs.mjs +2 -0
- package/dist/chunks/cli-1.1.7-dax2hwtd.mjs +2 -0
- package/dist/chunks/cli-1.1.7-dc8xhdv8.mjs +4 -0
- package/dist/chunks/cli-1.1.7-dnhbz3wm.mjs +2 -0
- package/dist/chunks/cli-1.1.7-dy1j64nd.mjs +2 -0
- package/dist/chunks/cli-1.1.7-e30xkgx8.mjs +2 -0
- package/dist/chunks/cli-1.1.7-e3ks80fz.mjs +6 -0
- package/dist/chunks/cli-1.1.7-e8rpt6jw.mjs +2 -0
- package/dist/chunks/cli-1.1.7-e9p7j4yw.mjs +2 -0
- package/dist/chunks/cli-1.1.7-esfdh0fz.mjs +4 -0
- package/dist/chunks/cli-1.1.7-eskazk5w.mjs +4 -0
- package/dist/chunks/cli-1.1.7-f47dycnc.mjs +2 -0
- package/dist/chunks/cli-1.1.7-fdmx4e0y.mjs +2 -0
- package/dist/chunks/cli-1.1.7-fh4kn809.mjs +2 -0
- package/dist/chunks/cli-1.1.7-fhatjz8y.mjs +2 -0
- package/dist/chunks/cli-1.1.7-fq766b4m.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ftcsqcsq.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ftxzdrxy.mjs +2 -0
- package/dist/chunks/cli-1.1.7-fzz66s7r.mjs +2 -0
- package/dist/chunks/cli-1.1.7-g69xsadf.mjs +5652 -0
- package/dist/chunks/cli-1.1.7-g84cjr3b.mjs +2 -0
- package/dist/chunks/cli-1.1.7-g9j8sjq1.mjs +2 -0
- package/dist/chunks/cli-1.1.7-gejatr5b.mjs +3 -0
- package/dist/chunks/cli-1.1.7-gjhe5v32.mjs +3 -0
- package/dist/chunks/cli-1.1.7-gm3vnavd.mjs +4 -0
- package/dist/chunks/cli-1.1.7-gsqhqm2p.mjs +2 -0
- package/dist/chunks/cli-1.1.7-gzqe35hp.mjs +2 -0
- package/dist/chunks/cli-1.1.7-h3m2ycf6.mjs +2 -0
- package/dist/chunks/cli-1.1.7-h6bad0y5.mjs +2 -0
- package/dist/chunks/cli-1.1.7-hht84q9b.mjs +2 -0
- package/dist/chunks/cli-1.1.7-j5s1nhz9.mjs +2 -0
- package/dist/chunks/cli-1.1.7-k0cy37cc.mjs +9 -0
- package/dist/chunks/cli-1.1.7-kbdranyx.mjs +2 -0
- package/dist/chunks/cli-1.1.7-m09c3zsc.mjs +1 -0
- package/dist/chunks/cli-1.1.7-m20ny6y6.mjs +2 -0
- package/dist/chunks/cli-1.1.7-m2jc7mts.mjs +2 -0
- package/dist/chunks/cli-1.1.7-m2rq9nq2.mjs +2 -0
- package/dist/chunks/cli-1.1.7-m4c2snne.mjs +42 -0
- package/dist/chunks/cli-1.1.7-m554nr3m.mjs +2 -0
- package/dist/chunks/cli-1.1.7-m7cx26gk.mjs +2 -0
- package/dist/chunks/cli-1.1.7-m7nyg4k2.mjs +2 -0
- package/dist/chunks/cli-1.1.7-m8kaqtm6.mjs +2 -0
- package/dist/chunks/cli-1.1.7-mxwxnfss.mjs +24 -0
- package/dist/chunks/cli-1.1.7-n642xdmn.mjs +2 -0
- package/dist/chunks/cli-1.1.7-n7ne87b1.mjs +8 -0
- package/dist/chunks/cli-1.1.7-natjc2r8.mjs +2 -0
- package/dist/chunks/cli-1.1.7-nay1q35s.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ncn26e96.mjs +2 -0
- package/dist/chunks/cli-1.1.7-nctcfgp0.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ndrf1r31.mjs +2 -0
- package/dist/chunks/cli-1.1.7-nywqmry6.mjs +2 -0
- package/dist/chunks/cli-1.1.7-p3a6cf8x.mjs +2 -0
- package/dist/chunks/cli-1.1.7-pcg3fv2k.mjs +2 -0
- package/dist/chunks/cli-1.1.7-phntwycy.mjs +21 -0
- package/dist/chunks/cli-1.1.7-pm52s8y4.mjs +2 -0
- package/dist/chunks/cli-1.1.7-q5cm825a.mjs +6 -0
- package/dist/chunks/cli-1.1.7-q711j0bm.mjs +2 -0
- package/dist/chunks/cli-1.1.7-qgh6hg9x.mjs +2 -0
- package/dist/chunks/cli-1.1.7-qgj0pn3h.mjs +2 -0
- package/dist/chunks/cli-1.1.7-qrkqafcw.mjs +2 -0
- package/dist/chunks/cli-1.1.7-qztj9jjs.mjs +17 -0
- package/dist/chunks/cli-1.1.7-r4j6e9vx.mjs +2 -0
- package/dist/chunks/cli-1.1.7-r8e45107.mjs +3 -0
- package/dist/chunks/cli-1.1.7-r9bf07me.mjs +9 -0
- package/dist/chunks/cli-1.1.7-rb629pva.mjs +2 -0
- package/dist/chunks/cli-1.1.7-rj70j99r.mjs +4 -0
- package/dist/chunks/cli-1.1.7-rtcac49z.mjs +2 -0
- package/dist/chunks/cli-1.1.7-sf4he5ds.mjs +17 -0
- package/dist/chunks/cli-1.1.7-sj06qxbn.mjs +2 -0
- package/dist/chunks/cli-1.1.7-sqb51kyw.mjs +34 -0
- package/dist/chunks/cli-1.1.7-svmaept7.mjs +2 -0
- package/dist/chunks/cli-1.1.7-svpmye16.mjs +2 -0
- package/dist/chunks/cli-1.1.7-sy3nh37g.mjs +2 -0
- package/dist/chunks/cli-1.1.7-t3vmh9fp.mjs +12 -0
- package/dist/chunks/cli-1.1.7-t4band33.mjs +133 -0
- package/dist/chunks/cli-1.1.7-t7869eaw.mjs +2 -0
- package/dist/chunks/cli-1.1.7-t9k89a7f.mjs +12 -0
- package/dist/chunks/cli-1.1.7-tdw09vfy.mjs +6 -0
- package/dist/chunks/cli-1.1.7-tebqyjfs.mjs +2 -0
- package/dist/chunks/cli-1.1.7-tj4a73gm.mjs +2 -0
- package/dist/chunks/cli-1.1.7-tpjej6bk.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ttgr0wt8.mjs +5 -0
- package/dist/chunks/cli-1.1.7-v90pc090.mjs +2 -0
- package/dist/chunks/cli-1.1.7-v9fzr2wc.mjs +25 -0
- package/dist/chunks/cli-1.1.7-vbkerts0.mjs +58 -0
- package/dist/chunks/cli-1.1.7-veert5hx.mjs +7 -0
- package/dist/chunks/cli-1.1.7-vegzg3sv.mjs +2 -0
- package/dist/chunks/cli-1.1.7-vgnyrdsx.mjs +2 -0
- package/dist/chunks/cli-1.1.7-vhahreqp.mjs +2 -0
- package/dist/chunks/cli-1.1.7-vyxrgqgm.mjs +2 -0
- package/dist/chunks/cli-1.1.7-w7qe5saq.mjs +24 -0
- package/dist/chunks/cli-1.1.7-wczms3t6.mjs +3 -0
- package/dist/chunks/cli-1.1.7-wfpdnn8a.mjs +2 -0
- package/dist/chunks/cli-1.1.7-wnveck2c.mjs +2 -0
- package/dist/chunks/cli-1.1.7-wtb39gjs.mjs +2 -0
- package/dist/chunks/cli-1.1.7-wv4k34jv.mjs +20 -0
- package/dist/chunks/cli-1.1.7-wxge1tea.mjs +24 -0
- package/dist/chunks/cli-1.1.7-x1mh9vnk.mjs +2 -0
- package/dist/chunks/cli-1.1.7-x20kjfvg.mjs +6 -0
- package/dist/chunks/cli-1.1.7-x3bpzsev.mjs +24 -0
- package/dist/chunks/cli-1.1.7-x5gz0q3n.mjs +2 -0
- package/dist/chunks/cli-1.1.7-xbk0ex0w.mjs +2 -0
- package/dist/chunks/cli-1.1.7-xr9v14yb.mjs +2 -0
- package/dist/chunks/cli-1.1.7-xtcz12t9.mjs +3 -0
- package/dist/chunks/cli-1.1.7-xv2n043b.mjs +4 -0
- package/dist/chunks/cli-1.1.7-xzys836y.mjs +2 -0
- package/dist/chunks/cli-1.1.7-yatnaq1h.mjs +2 -0
- package/dist/chunks/cli-1.1.7-ybe5t1at.mjs +2 -0
- package/dist/chunks/cli-1.1.7-yejce50d.mjs +2 -0
- package/dist/chunks/cli-1.1.7-yf8r2p8t.mjs +2 -0
- package/dist/chunks/cli-1.1.7-yvfbn06j.mjs +2 -0
- package/dist/chunks/cli-1.1.7-z10gdn10.mjs +2 -0
- package/dist/chunks/cli-1.1.7-z7aapeb8.mjs +2 -0
- package/dist/chunks/cli-1.1.7-zaz1vdc9.mjs +2 -0
- package/dist/chunks/cli-1.1.7-zcxfemky.mjs +2 -0
- package/dist/chunks/cli-1.1.7-zk6vqjve.mjs +4 -0
- package/dist/chunks/cli-1.1.7-zpr5n1k0.mjs +2 -0
- package/dist/chunks/cli-1.1.7-zxr9h2qd.mjs +2 -0
- package/dist/chunks/client-1.1.7-zsnn57xt.mjs +1 -0
- package/dist/chunks/color-1.1.7-71p1dnta.mjs +1 -0
- package/dist/chunks/compact-1.1.7-e6arr03s.mjs +3 -0
- package/dist/chunks/config-1.1.7-g3d8g7g2.mjs +1 -0
- package/dist/chunks/config-1.1.7-nejamxf1.mjs +1 -0
- package/dist/chunks/constants-1.1.7-454c76bh.mjs +1 -0
- package/dist/chunks/context-1.1.7-p0442d4z.mjs +1 -0
- package/dist/chunks/context-noninteractive-1.1.7-v71njac2.mjs +1 -0
- package/dist/chunks/conversation-1.1.7-8ywg16g5.mjs +1 -0
- package/dist/chunks/copilotHeaders-1.1.7-qw0bnew9.mjs +1 -0
- package/dist/chunks/copy-1.1.7-dfdpmxck.mjs +9 -0
- package/dist/chunks/cost-1.1.7-2r3rhrq2.mjs +1 -0
- package/dist/chunks/createSSHSession-1.1.7-abvj6vqh.mjs +1 -0
- package/dist/chunks/createSession-1.1.7-a0t9ns7c.mjs +1 -0
- package/dist/chunks/debug-1.1.7-r660pqwp.mjs +1 -0
- package/dist/chunks/defaultActionDeps-1.1.7-79kexp4a.mjs +1446 -0
- package/dist/chunks/desktop-1.1.7-sy4n39yq.mjs +1 -0
- package/dist/chunks/detectRepository-1.1.7-p52dxbn9.mjs +1 -0
- package/dist/chunks/detection-1.1.7-8e2z2aph.mjs +1 -0
- package/dist/chunks/diff-1.1.7-yt5nf8gj.mjs +1 -0
- package/dist/chunks/doctor-1.1.7-emta4vaz.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-1.1.7-4tam9mf5.mjs +1 -0
- package/dist/chunks/earlyInput-1.1.7-93ms6qsc.mjs +1 -0
- package/dist/chunks/effort-1.1.7-1fp3rh9f.mjs +13 -0
- package/dist/chunks/engine-1.1.7-yngz7phq.mjs +1 -0
- package/dist/chunks/envLessBridgeConfig-1.1.7-j2h0sf63.mjs +1 -0
- package/dist/chunks/envUtils-1.1.7-9y71p8yv.mjs +1 -0
- package/dist/chunks/environmentSelection-1.1.7-pd11v0zx.mjs +1 -0
- package/dist/chunks/environments-1.1.7-ck5qxyqy.mjs +1 -0
- package/dist/chunks/errors-1.1.7-emnk1qwy.mjs +1 -0
- package/dist/chunks/exampleCommands-1.1.7-2ksd03w4.mjs +1 -0
- package/dist/chunks/execFileNoThrow-1.1.7-jqbw02pg.mjs +1 -0
- package/dist/chunks/exit-1.1.7-wpfmrwdn.mjs +1 -0
- package/dist/chunks/explorer-1.1.7-b8tcxb5d.mjs +1 -0
- package/dist/chunks/export-1.1.7-zz79hhsz.mjs +2 -0
- package/dist/chunks/extra-usage-1.1.7-dt936zfb.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-1.1.7-shwjbctc.mjs +1 -0
- package/dist/chunks/fast-1.1.7-w7b1aqwk.mjs +1 -0
- package/dist/chunks/feedback-1.1.7-n9j2nr98.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-1.1.7-c0a02n4j.mjs +1 -0
- package/dist/chunks/git-1.1.7-9z0c0q3r.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-1.1.7-akhn8qhf.mjs +1 -0
- package/dist/chunks/goal-1.1.7-aw2580k9.mjs +4 -0
- package/dist/chunks/grove-1.1.7-kjhhr548.mjs +1 -0
- package/dist/chunks/growthbook-1.1.7-w746wv7x.mjs +1 -0
- package/dist/chunks/headless-1.1.7-y4j0h9z8.mjs +2 -0
- package/dist/chunks/heapdump-1.1.7-rct22hze.mjs +6 -0
- package/dist/chunks/help-1.1.7-y0c2ms52.mjs +1 -0
- package/dist/chunks/hookChains-1.1.7-xzn9ad36.mjs +3 -0
- package/dist/chunks/hooks-1.1.7-emcz8q8s.mjs +79 -0
- package/dist/chunks/hooks-1.1.7-jp0h65wb.mjs +1 -0
- package/dist/chunks/ide-1.1.7-x8w21qd6.mjs +3 -0
- package/dist/chunks/image-processor-napi-1.1.7-wy6ecw5p.mjs +1 -0
- package/dist/chunks/inboundAttachments-1.1.7-nw4e83c9.mjs +1 -0
- package/dist/chunks/index-1.1.7-189vzkzr.mjs +1 -0
- package/dist/chunks/index-1.1.7-23d4va8a.mjs +2 -0
- package/dist/chunks/index-1.1.7-36msf70m.mjs +1 -0
- package/dist/chunks/index-1.1.7-6nnrrxjs.mjs +9 -0
- package/dist/chunks/index-1.1.7-78kw401a.mjs +1 -0
- package/dist/chunks/index-1.1.7-9ag3vjcz.mjs +1 -0
- package/dist/chunks/index-1.1.7-abraka41.mjs +1 -0
- package/dist/chunks/index-1.1.7-apb8ray2.mjs +1 -0
- package/dist/chunks/index-1.1.7-b2e78mb7.mjs +1 -0
- package/dist/chunks/index-1.1.7-cxtqz2cx.mjs +1 -0
- package/dist/chunks/index-1.1.7-ep7qax1n.mjs +5 -0
- package/dist/chunks/index-1.1.7-fahb6z70.mjs +1 -0
- package/dist/chunks/index-1.1.7-g7me7k35.mjs +1 -0
- package/dist/chunks/index-1.1.7-gsdssjta.mjs +2 -0
- package/dist/chunks/index-1.1.7-n6c5mp02.mjs +1 -0
- package/dist/chunks/index-1.1.7-ngf7447d.mjs +9 -0
- package/dist/chunks/index-1.1.7-pbdmsdx4.mjs +1 -0
- package/dist/chunks/index-1.1.7-q3560epc.mjs +23 -0
- package/dist/chunks/index-1.1.7-ta1t48pj.mjs +30 -0
- package/dist/chunks/index-1.1.7-vrvbq3pq.mjs +1 -0
- package/dist/chunks/index-1.1.7-w3k1r4fj.mjs +1 -0
- package/dist/chunks/index-1.1.7-w40fc6hp.mjs +1 -0
- package/dist/chunks/index-1.1.7-wrysc35z.mjs +1 -0
- package/dist/chunks/init-1.1.7-35gnmfwk.mjs +1 -0
- package/dist/chunks/initReplBridge-1.1.7-tckq0ph3.mjs +1 -0
- package/dist/chunks/ink-1.1.7-00k9mpt1.mjs +1 -0
- package/dist/chunks/insights-1.1.7-0733jret.mjs +870 -0
- package/dist/chunks/install-1.1.7-hm4q4vg3.mjs +1 -0
- package/dist/chunks/install-github-app-1.1.7-td4vg9cd.mjs +149 -0
- package/dist/chunks/install-slack-app-1.1.7-wcg8aqqz.mjs +1 -0
- package/dist/chunks/instrumentation-1.1.7-c07a380v.mjs +1 -0
- package/dist/chunks/interactiveHelpers-1.1.7-46866tc9.mjs +1 -0
- package/dist/chunks/keybindings-1.1.7-8bb3ehzd.mjs +2 -0
- package/dist/chunks/knowledge-1.1.7-tvqfhagb.mjs +2 -0
- package/dist/chunks/latestVersionCache-1.1.7-21sf5wht.mjs +1 -0
- package/dist/chunks/loadAgentsDir-1.1.7-0fsxdwtb.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.1.7-dme9wkc4.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.1.7-tn0by9qv.mjs +1 -0
- package/dist/chunks/log-1.1.7-3ry9dq4f.mjs +1 -0
- package/dist/chunks/main-1.1.7-z35y86b1.mjs +1 -0
- package/dist/chunks/managedEnv-1.1.7-hkhdt6m1.mjs +1 -0
- package/dist/chunks/mcp-1.1.7-fhw7q8d8.mjs +4 -0
- package/dist/chunks/mcp-1.1.7-h76xwxj7.mjs +1 -0
- package/dist/chunks/mcp-1.1.7-qxaxb5n8.mjs +17 -0
- package/dist/chunks/mcpb-1.1.7-fh84mmcn.mjs +1 -0
- package/dist/chunks/memory-1.1.7-rja0b4e3.mjs +72 -0
- package/dist/chunks/model-1.1.7-8h1q1vva.mjs +1 -0
- package/dist/chunks/model-1.1.7-qn8a1vgp.mjs +2 -0
- package/dist/chunks/node-1.1.7-br2cm23q.mjs +12 -0
- package/dist/chunks/oauth-1.1.7-xprf6gf8.mjs +1 -0
- package/dist/chunks/openaiShim-1.1.7-xpv4sdj1.mjs +14 -0
- package/dist/chunks/output-style-1.1.7-gwp6rb3c.mjs +1 -0
- package/dist/chunks/package-L37ZVTF4-1.1.7-tv37rpat.mjs +1 -0
- package/dist/chunks/parseConnectUrl-1.1.7-hxb18rh0.mjs +1 -0
- package/dist/chunks/parser-1.1.7-gxryvbxk.mjs +1 -0
- package/dist/chunks/passes-1.1.7-pgn5svgj.mjs +1 -0
- package/dist/chunks/permissions-1.1.7-hgf49z9d.mjs +3 -0
- package/dist/chunks/permissions-1.1.7-vwc3xcnn.mjs +1 -0
- package/dist/chunks/plan-1.1.7-5pd1ezzt.mjs +1 -0
- package/dist/chunks/plist-1.1.7-bgk5tgcz.mjs +1 -0
- package/dist/chunks/plugin-1.1.7-b2da306j.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-1.1.7-75pwt0x6.mjs +1 -0
- package/dist/chunks/plugins-1.1.7-wgq2tns5.mjs +9 -0
- package/dist/chunks/preActionHook-1.1.7-9jppavfm.mjs +2 -0
- package/dist/chunks/print-1.1.7-hcpp1psj.mjs +57 -0
- package/dist/chunks/privacy-settings-1.1.7-0rhg1990.mjs +1 -0
- package/dist/chunks/process-1.1.7-sz6mk2ax.mjs +1 -0
- package/dist/chunks/processBashCommand-1.1.7-h988ta18.mjs +1 -0
- package/dist/chunks/processSlashCommand-1.1.7-xj9yd54c.mjs +9 -0
- package/dist/chunks/prompt-1.1.7-9n1828tb.mjs +1 -0
- package/dist/chunks/prompt-1.1.7-xbh39c5a.mjs +1 -0
- package/dist/chunks/prompts-1.1.7-tm2b4n8b.mjs +1 -0
- package/dist/chunks/protocolHandler-1.1.7-x5r0fnay.mjs +13 -0
- package/dist/chunks/provider-1.1.7-8nkjfnp7.mjs +2 -0
- package/dist/chunks/providerProfiles-1.1.7-3hy3rra6.mjs +1 -0
- package/dist/chunks/providerValidation-1.1.7-wpwhgmgj.mjs +6 -0
- package/dist/chunks/rate-limit-options-1.1.7-qqwd9f98.mjs +1 -0
- package/dist/chunks/registerSubcommands-1.1.7-z933969a.mjs +34 -0
- package/dist/chunks/registry-1.1.7-zt717sdd.mjs +1 -0
- package/dist/chunks/release-notes-1.1.7-hkyqmgj0.mjs +5 -0
- package/dist/chunks/reload-plugins-1.1.7-90wc1rrg.mjs +2 -0
- package/dist/chunks/remote-env-1.1.7-gyhmvnmb.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-1.1.7-kxpxxqbj.mjs +1 -0
- package/dist/chunks/remoteSession-1.1.7-931g1df4.mjs +1 -0
- package/dist/chunks/rename-1.1.7-pdcr2fqc.mjs +1 -0
- package/dist/chunks/replBridgeHandle-1.1.7-wp87p7xp.mjs +1 -0
- package/dist/chunks/replLauncher-1.1.7-7z04w8w8.mjs +1 -0
- package/dist/chunks/resume-1.1.7-8p8bahzg.mjs +2 -0
- package/dist/chunks/rewind-1.1.7-v2ajm3w0.mjs +1 -0
- package/dist/chunks/rootOptions-1.1.7-kj11gm8y.mjs +1 -0
- package/dist/chunks/runWorkflowHeadless-1.1.7-7d5db3vq.mjs +10 -0
- package/dist/chunks/sandbox-adapter-1.1.7-3waw05qr.mjs +1 -0
- package/dist/chunks/sandbox-toggle-1.1.7-zhrme3nq.mjs +1 -0
- package/dist/chunks/session-1.1.7-b11ew8hv.mjs +2 -0
- package/dist/chunks/sessionDiscovery-1.1.7-3w4gd5vr.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-1.1.7-f1ktfmjp.mjs +1 -0
- package/dist/chunks/sessionStorage-1.1.7-0qj40f5g.mjs +1 -0
- package/dist/chunks/settings-1.1.7-ayf1fhp5.mjs +1 -0
- package/dist/chunks/setup-1.1.7-r7d17dtz.mjs +5 -0
- package/dist/chunks/sinks-1.1.7-agpm7pdt.mjs +1 -0
- package/dist/chunks/skills-1.1.7-xj1mgj1w.mjs +1 -0
- package/dist/chunks/startupProfiler-1.1.7-vy3ha1nb.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-1.1.7-m03evcd7.mjs +1 -0
- package/dist/chunks/state-1.1.7-a4z499r3.mjs +1 -0
- package/dist/chunks/stats-1.1.7-jxbtehxs.mjs +6 -0
- package/dist/chunks/status-1.1.7-j7b4zw5r.mjs +1 -0
- package/dist/chunks/stickers-1.1.7-2feaa91e.mjs +1 -0
- package/dist/chunks/subprocessEnv-1.1.7-7yjfarpg.mjs +1 -0
- package/dist/chunks/tasks-1.1.7-74xbzaa7.mjs +1 -0
- package/dist/chunks/teamHelpers-1.1.7-y101nwrn.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-1.1.7-h5693rcg.mjs +1 -0
- package/dist/chunks/teleport-1.1.7-yjke98c8.mjs +1 -0
- package/dist/chunks/terminalSetup-1.1.7-tq3qth9s.mjs +1 -0
- package/dist/chunks/theme-1.1.7-5n3fsvh8.mjs +1 -0
- package/dist/chunks/thinkback-1.1.7-8wxb9n8q.mjs +1 -0
- package/dist/chunks/thinkback-play-1.1.7-rvzk8rt2.mjs +1 -0
- package/dist/chunks/toolPool-1.1.7-s3xnzfs1.mjs +1 -0
- package/dist/chunks/toolSearch-1.1.7-b99evmfg.mjs +1 -0
- package/dist/chunks/tools-1.1.7-1bs5mhnz.mjs +1 -0
- package/dist/chunks/trustedDevice-1.1.7-sk8ewavd.mjs +1 -0
- package/dist/chunks/turndown.cjs-1.1.7-tcj3tmer.mjs +69 -0
- package/dist/chunks/types-1.1.7-dt3wqg7h.mjs +1 -0
- package/dist/chunks/ultrareviewCommand-1.1.7-5d0eav8t.mjs +4 -0
- package/dist/chunks/update-1.1.7-cc4860dp.mjs +72 -0
- package/dist/chunks/upgrade-1.1.7-xnqh398m.mjs +1 -0
- package/dist/chunks/upload-1.1.7-e1023tbm.mjs +7 -0
- package/dist/chunks/upstreamproxy-1.1.7-54yd40wz.mjs +14 -0
- package/dist/chunks/url-handler-napi-1.1.7-98renjvs.mjs +1 -0
- package/dist/chunks/usage-1.1.7-vr50x59b.mjs +1 -0
- package/dist/chunks/util-1.1.7-07n3bcf9.mjs +1 -0
- package/dist/chunks/utils-1.1.7-2gs8qp9e.mjs +1 -0
- package/dist/chunks/vim-1.1.7-1hdr63bv.mjs +1 -0
- package/dist/chunks/watchLoop-1.1.7-dqnb4ew5.mjs +13 -0
- package/dist/chunks/watcher-1.1.7-0vhx6jqw.mjs +1 -0
- package/dist/chunks/wiki-1.1.7-hbab147s.mjs +132 -0
- package/dist/chunks/workflows-1.1.7-sqc7rhqm.mjs +1 -0
- package/dist/chunks/worktree-1.1.7-bgka176p.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-1.1.7-ddyrd6w3.mjs +1 -0
- package/dist/chunks/wrapper-1.1.7-tjp6nrw4.mjs +7 -0
- package/dist/cli.mjs +2 -2
- package/package.json +9 -9
- package/dist/chunks/AgentTool-1.1.5-car4wryg.mjs +0 -1
- package/dist/chunks/App-1.1.5-z0yx1svv.mjs +0 -1
- package/dist/chunks/ApproveApiKey-1.1.5-w45fejta.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-1.1.5-wpzenq2z.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-1.1.5-4s0r270q.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-1.1.5-dx9d1z78.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.5-0k0z6a1m.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1.1.5-sbdb54nq.mjs +0 -1
- package/dist/chunks/DiffDialog-1.1.5-9tz97bn9.mjs +0 -7
- package/dist/chunks/Doctor-1.1.5-apx3wyew.mjs +0 -1
- package/dist/chunks/ExplorerDialog-1.1.5-891875tg.mjs +0 -6
- package/dist/chunks/Grove-1.1.5-7qgs0ctk.mjs +0 -1
- package/dist/chunks/ITermBackend-1.1.5-6sez284v.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-1.1.5-5dj12wwy.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-1.1.5-qhe96ke7.mjs +0 -1
- package/dist/chunks/MigrationDialog-1.1.5-n3ckkvap.mjs +0 -1
- package/dist/chunks/Onboarding-1.1.5-3zcfdapk.mjs +0 -1
- package/dist/chunks/ProviderManager-1.1.5-md334w8f.mjs +0 -1
- package/dist/chunks/REPL-1.1.5-nsj3srpq.mjs +0 -1
- package/dist/chunks/ResumeConversation-1.1.5-19hsx4tm.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-1.1.5-h3eyae2y.mjs +0 -1
- package/dist/chunks/TeleportProgress-1.1.5-f81xwyhr.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.5-nx2v36t1.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-1.1.5-rk93z4dr.mjs +0 -1
- package/dist/chunks/TmuxBackend-1.1.5-7xpzhazh.mjs +0 -9
- package/dist/chunks/ToolSearchTool-1.1.5-vwdgwpbq.mjs +0 -1
- package/dist/chunks/TrustDialog-1.1.5-d9yxahsv.mjs +0 -1
- package/dist/chunks/activeProvider-1.1.5-h81mhrtj.mjs +0 -1
- package/dist/chunks/add-dir-1.1.5-9z4prdv7.mjs +0 -1
- package/dist/chunks/agentTypes-1.1.5-2r72vjnd.mjs +0 -1
- package/dist/chunks/agents-1.1.5-42ak0q7h.mjs +0 -110
- package/dist/chunks/agents-1.1.5-6mddedjv.mjs +0 -3
- package/dist/chunks/api-1.1.5-wv0hk17a.mjs +0 -1
- package/dist/chunks/asciicast-1.1.5-6hpenp1g.mjs +0 -1
- package/dist/chunks/assistant-1.1.5-gtrb1ytz.mjs +0 -1
- package/dist/chunks/auth-1.1.5-3gb86bzb.mjs +0 -1
- package/dist/chunks/auth-1.1.5-nmydgbfa.mjs +0 -1
- package/dist/chunks/autoMode-1.1.5-7dv0v1v1.mjs +0 -48
- package/dist/chunks/autoUpdater-1.1.5-64mbk0zw.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-1.1.5-g7cnfdvq.mjs +0 -1
- package/dist/chunks/branch-1.1.5-yaqv3wbc.mjs +0 -4
- package/dist/chunks/bridge-1.1.5-154psxbc.mjs +0 -2
- package/dist/chunks/bridgeConfig-1.1.5-s174he1k.mjs +0 -1
- package/dist/chunks/bridgeEnabled-1.1.5-w6e3wcsk.mjs +0 -1
- package/dist/chunks/bridgeMain-1.1.5-yhcrds6r.mjs +0 -88
- package/dist/chunks/bridgePointer-1.1.5-kebmje48.mjs +0 -1
- package/dist/chunks/btw-1.1.5-mfkqctq8.mjs +0 -1
- package/dist/chunks/buddy-1.1.5-k7ntvcd9.mjs +0 -3
- package/dist/chunks/cacache-1.1.5-c43ce176.mjs +0 -1
- package/dist/chunks/cache-probe-1.1.5-wjk6v8ah.mjs +0 -21
- package/dist/chunks/cacheStats-1.1.5-tw30ndt7.mjs +0 -4
- package/dist/chunks/caches-1.1.5-cftgxft7.mjs +0 -1
- package/dist/chunks/claudeDesktop-1.1.5-pwme5y05.mjs +0 -1
- package/dist/chunks/claudemd-1.1.5-4ze3v28n.mjs +0 -1
- package/dist/chunks/clear-1.1.5-gwbert39.mjs +0 -1
- package/dist/chunks/clearTerminal-1.1.5-dgbcqbp5.mjs +0 -1
- package/dist/chunks/cli-1.1.5-04a4w5qm.mjs +0 -2
- package/dist/chunks/cli-1.1.5-04mta7g9.mjs +0 -2
- package/dist/chunks/cli-1.1.5-06s5q1ja.mjs +0 -2
- package/dist/chunks/cli-1.1.5-0a8jb3pr.mjs +0 -2
- package/dist/chunks/cli-1.1.5-0amg980q.mjs +0 -2
- package/dist/chunks/cli-1.1.5-0gd61h7z.mjs +0 -2
- package/dist/chunks/cli-1.1.5-0jp6cq2j.mjs +0 -2
- package/dist/chunks/cli-1.1.5-0kq9h6ts.mjs +0 -2
- package/dist/chunks/cli-1.1.5-0rnv5bg3.mjs +0 -9
- package/dist/chunks/cli-1.1.5-0yw3n72x.mjs +0 -2
- package/dist/chunks/cli-1.1.5-126h7k7m.mjs +0 -2
- package/dist/chunks/cli-1.1.5-1385z6tg.mjs +0 -2
- package/dist/chunks/cli-1.1.5-15q297nh.mjs +0 -2
- package/dist/chunks/cli-1.1.5-17pq11ad.mjs +0 -15
- package/dist/chunks/cli-1.1.5-1k6n7e0p.mjs +0 -2
- package/dist/chunks/cli-1.1.5-1ms5wad6.mjs +0 -2
- package/dist/chunks/cli-1.1.5-1qr5p3pk.mjs +0 -3
- package/dist/chunks/cli-1.1.5-20206ha7.mjs +0 -3
- package/dist/chunks/cli-1.1.5-2bc86bd2.mjs +0 -2
- package/dist/chunks/cli-1.1.5-2e2rwx0h.mjs +0 -2
- package/dist/chunks/cli-1.1.5-2evbbg97.mjs +0 -2
- package/dist/chunks/cli-1.1.5-2g7w64ck.mjs +0 -2
- package/dist/chunks/cli-1.1.5-2kgng99f.mjs +0 -24
- package/dist/chunks/cli-1.1.5-2qf8qy7f.mjs +0 -2
- package/dist/chunks/cli-1.1.5-2r25f40p.mjs +0 -2
- package/dist/chunks/cli-1.1.5-2rmwkb2s.mjs +0 -4
- package/dist/chunks/cli-1.1.5-2v5ehg8c.mjs +0 -2
- package/dist/chunks/cli-1.1.5-3389j5t0.mjs +0 -17
- package/dist/chunks/cli-1.1.5-362kw0jy.mjs +0 -2
- package/dist/chunks/cli-1.1.5-3mact63s.mjs +0 -2
- package/dist/chunks/cli-1.1.5-3n83mvmz.mjs +0 -2
- package/dist/chunks/cli-1.1.5-3q931f2n.mjs +0 -2
- package/dist/chunks/cli-1.1.5-3wtxx0sm.mjs +0 -133
- package/dist/chunks/cli-1.1.5-3xf010sx.mjs +0 -4
- package/dist/chunks/cli-1.1.5-3zc9bseg.mjs +0 -6
- package/dist/chunks/cli-1.1.5-3zpkftsv.mjs +0 -2
- package/dist/chunks/cli-1.1.5-43ng5pm1.mjs +0 -3
- package/dist/chunks/cli-1.1.5-43y030nv.mjs +0 -2
- package/dist/chunks/cli-1.1.5-46qvwkna.mjs +0 -12
- package/dist/chunks/cli-1.1.5-4gt9am76.mjs +0 -2
- package/dist/chunks/cli-1.1.5-4w21hywc.mjs +0 -34
- package/dist/chunks/cli-1.1.5-4xh64wf2.mjs +0 -2
- package/dist/chunks/cli-1.1.5-4zdp08yw.mjs +0 -2
- package/dist/chunks/cli-1.1.5-50vh2xqs.mjs +0 -2
- package/dist/chunks/cli-1.1.5-54qyvbmc.mjs +0 -2
- package/dist/chunks/cli-1.1.5-5973nce5.mjs +0 -2
- package/dist/chunks/cli-1.1.5-5pmp4wy1.mjs +0 -2
- package/dist/chunks/cli-1.1.5-5rsae1r8.mjs +0 -2
- package/dist/chunks/cli-1.1.5-600z85n1.mjs +0 -18
- package/dist/chunks/cli-1.1.5-60cafcfa.mjs +0 -2
- package/dist/chunks/cli-1.1.5-62ntg4mw.mjs +0 -2
- package/dist/chunks/cli-1.1.5-6cxs0npd.mjs +0 -25
- package/dist/chunks/cli-1.1.5-6dmtdkjb.mjs +0 -3
- package/dist/chunks/cli-1.1.5-6s77vhbn.mjs +0 -2
- package/dist/chunks/cli-1.1.5-6yjhrk9v.mjs +0 -2
- package/dist/chunks/cli-1.1.5-6zgcprsm.mjs +0 -4
- package/dist/chunks/cli-1.1.5-74d8s15n.mjs +0 -20
- package/dist/chunks/cli-1.1.5-7fh6xvxr.mjs +0 -24
- package/dist/chunks/cli-1.1.5-7fnn4cxx.mjs +0 -2
- package/dist/chunks/cli-1.1.5-7fr21xne.mjs +0 -2
- package/dist/chunks/cli-1.1.5-7rnam3pn.mjs +0 -2
- package/dist/chunks/cli-1.1.5-7x24fkdt.mjs +0 -2
- package/dist/chunks/cli-1.1.5-81ek1hnd.mjs +0 -7
- package/dist/chunks/cli-1.1.5-8nkgdwbz.mjs +0 -2
- package/dist/chunks/cli-1.1.5-8sm7bn8y.mjs +0 -2
- package/dist/chunks/cli-1.1.5-8y8kwrpv.mjs +0 -50
- package/dist/chunks/cli-1.1.5-8z6nvxgy.mjs +0 -2
- package/dist/chunks/cli-1.1.5-91h2qx3w.mjs +0 -4
- package/dist/chunks/cli-1.1.5-97sv1sx5.mjs +0 -2
- package/dist/chunks/cli-1.1.5-9d2hd2n0.mjs +0 -2
- package/dist/chunks/cli-1.1.5-9eg1em3k.mjs +0 -4
- package/dist/chunks/cli-1.1.5-9myk8nsj.mjs +0 -2
- package/dist/chunks/cli-1.1.5-9p1q31nx.mjs +0 -2
- package/dist/chunks/cli-1.1.5-9pjr2mxf.mjs +0 -5
- package/dist/chunks/cli-1.1.5-9q40r2jj.mjs +0 -59
- package/dist/chunks/cli-1.1.5-9s6mqtv8.mjs +0 -3
- package/dist/chunks/cli-1.1.5-a41pf5rk.mjs +0 -2
- package/dist/chunks/cli-1.1.5-am2yr9em.mjs +0 -2
- package/dist/chunks/cli-1.1.5-ay6eds7m.mjs +0 -6
- package/dist/chunks/cli-1.1.5-azgr9ksh.mjs +0 -45
- package/dist/chunks/cli-1.1.5-ba4n22ph.mjs +0 -2
- package/dist/chunks/cli-1.1.5-bcgy5mbp.mjs +0 -5649
- package/dist/chunks/cli-1.1.5-bh2pjxv2.mjs +0 -12
- package/dist/chunks/cli-1.1.5-brfx4pre.mjs +0 -3
- package/dist/chunks/cli-1.1.5-bs0hzzxt.mjs +0 -2
- package/dist/chunks/cli-1.1.5-c5wk6r1v.mjs +0 -2
- package/dist/chunks/cli-1.1.5-cbafqtmk.mjs +0 -2
- package/dist/chunks/cli-1.1.5-cy7bp5f8.mjs +0 -2
- package/dist/chunks/cli-1.1.5-d60etcng.mjs +0 -2
- package/dist/chunks/cli-1.1.5-dbfj54qv.mjs +0 -4
- package/dist/chunks/cli-1.1.5-denrjjr8.mjs +0 -2
- package/dist/chunks/cli-1.1.5-djfg6qcy.mjs +0 -4
- package/dist/chunks/cli-1.1.5-dknh0wry.mjs +0 -2
- package/dist/chunks/cli-1.1.5-dmgep5pw.mjs +0 -15
- package/dist/chunks/cli-1.1.5-dpwkjrhv.mjs +0 -2
- package/dist/chunks/cli-1.1.5-dv98e0wx.mjs +0 -17
- package/dist/chunks/cli-1.1.5-dvzmss5c.mjs +0 -12
- package/dist/chunks/cli-1.1.5-e51n4cww.mjs +0 -2
- package/dist/chunks/cli-1.1.5-ecxx0wpb.mjs +0 -2
- package/dist/chunks/cli-1.1.5-eg17f7k7.mjs +0 -2
- package/dist/chunks/cli-1.1.5-ehbpt4w6.mjs +0 -2
- package/dist/chunks/cli-1.1.5-epjw98jw.mjs +0 -3
- package/dist/chunks/cli-1.1.5-ez9ctahf.mjs +0 -133
- package/dist/chunks/cli-1.1.5-fqwwgfme.mjs +0 -21
- package/dist/chunks/cli-1.1.5-fr76ha7s.mjs +0 -2
- package/dist/chunks/cli-1.1.5-g04gzz34.mjs +0 -2
- package/dist/chunks/cli-1.1.5-g5gyt5h8.mjs +0 -2
- package/dist/chunks/cli-1.1.5-gm4ptwx4.mjs +0 -2
- package/dist/chunks/cli-1.1.5-gr7dgsaq.mjs +0 -2
- package/dist/chunks/cli-1.1.5-gsmrbqh1.mjs +0 -2
- package/dist/chunks/cli-1.1.5-gwt7szsh.mjs +0 -2
- package/dist/chunks/cli-1.1.5-h1w0v5x0.mjs +0 -2
- package/dist/chunks/cli-1.1.5-h5k7t8m7.mjs +0 -8
- package/dist/chunks/cli-1.1.5-hs02jchx.mjs +0 -2
- package/dist/chunks/cli-1.1.5-j298304z.mjs +0 -2
- package/dist/chunks/cli-1.1.5-j5g040vf.mjs +0 -2
- package/dist/chunks/cli-1.1.5-jknqq4v0.mjs +0 -2
- package/dist/chunks/cli-1.1.5-jq32vtrb.mjs +0 -58
- package/dist/chunks/cli-1.1.5-jqef0dgk.mjs +0 -42
- package/dist/chunks/cli-1.1.5-k0y1mt50.mjs +0 -4
- package/dist/chunks/cli-1.1.5-k7zeqxym.mjs +0 -9
- package/dist/chunks/cli-1.1.5-kbpaxqg8.mjs +0 -2
- package/dist/chunks/cli-1.1.5-kc9qhatt.mjs +0 -18
- package/dist/chunks/cli-1.1.5-kdxm5m52.mjs +0 -2
- package/dist/chunks/cli-1.1.5-keef1hq8.mjs +0 -2
- package/dist/chunks/cli-1.1.5-khj9bq82.mjs +0 -3
- package/dist/chunks/cli-1.1.5-kq8vk6pv.mjs +0 -2
- package/dist/chunks/cli-1.1.5-ks2gq7tg.mjs +0 -2
- package/dist/chunks/cli-1.1.5-kzdgyb0j.mjs +0 -3
- package/dist/chunks/cli-1.1.5-m78s0fnh.mjs +0 -2
- package/dist/chunks/cli-1.1.5-mrwhx936.mjs +0 -15
- package/dist/chunks/cli-1.1.5-mx0yvg1w.mjs +0 -2
- package/dist/chunks/cli-1.1.5-mzxdmdxn.mjs +0 -2
- package/dist/chunks/cli-1.1.5-n4xgjbwe.mjs +0 -2
- package/dist/chunks/cli-1.1.5-n6wx6zn2.mjs +0 -2
- package/dist/chunks/cli-1.1.5-nkhse0vg.mjs +0 -67
- package/dist/chunks/cli-1.1.5-nvf47p1p.mjs +0 -12
- package/dist/chunks/cli-1.1.5-p76ywbdf.mjs +0 -2
- package/dist/chunks/cli-1.1.5-pthrjd43.mjs +0 -2
- package/dist/chunks/cli-1.1.5-q2x467jp.mjs +0 -6
- package/dist/chunks/cli-1.1.5-qdha9akj.mjs +0 -2
- package/dist/chunks/cli-1.1.5-qg67v24h.mjs +0 -2
- package/dist/chunks/cli-1.1.5-qxvbnypq.mjs +0 -2
- package/dist/chunks/cli-1.1.5-qypb27cc.mjs +0 -2
- package/dist/chunks/cli-1.1.5-r152533n.mjs +0 -2
- package/dist/chunks/cli-1.1.5-r43zh250.mjs +0 -3
- package/dist/chunks/cli-1.1.5-ra53k7hj.mjs +0 -39
- package/dist/chunks/cli-1.1.5-rah577er.mjs +0 -2
- package/dist/chunks/cli-1.1.5-rc2g2735.mjs +0 -2
- package/dist/chunks/cli-1.1.5-rdfya3vt.mjs +0 -2
- package/dist/chunks/cli-1.1.5-rqvgas0b.mjs +0 -2
- package/dist/chunks/cli-1.1.5-rqw75dc4.mjs +0 -2
- package/dist/chunks/cli-1.1.5-rwv58vt9.mjs +0 -2
- package/dist/chunks/cli-1.1.5-s0cez7yn.mjs +0 -2
- package/dist/chunks/cli-1.1.5-sc49xm3j.mjs +0 -2
- package/dist/chunks/cli-1.1.5-sf5x5qyd.mjs +0 -2
- package/dist/chunks/cli-1.1.5-sfnf38sj.mjs +0 -2
- package/dist/chunks/cli-1.1.5-sm03z8tn.mjs +0 -4
- package/dist/chunks/cli-1.1.5-srf8k7x8.mjs +0 -2
- package/dist/chunks/cli-1.1.5-stcmqfnq.mjs +0 -2
- package/dist/chunks/cli-1.1.5-sxj5bjbt.mjs +0 -24
- package/dist/chunks/cli-1.1.5-syhvsvgh.mjs +0 -2
- package/dist/chunks/cli-1.1.5-szzwagmb.mjs +0 -1
- package/dist/chunks/cli-1.1.5-t4gteprn.mjs +0 -2
- package/dist/chunks/cli-1.1.5-t9j8c92k.mjs +0 -2
- package/dist/chunks/cli-1.1.5-tae4w5sa.mjs +0 -2
- package/dist/chunks/cli-1.1.5-tbr6vnhr.mjs +0 -2
- package/dist/chunks/cli-1.1.5-ttm2crpm.mjs +0 -2
- package/dist/chunks/cli-1.1.5-v9a6fbsq.mjs +0 -202
- package/dist/chunks/cli-1.1.5-va6jtxjw.mjs +0 -2
- package/dist/chunks/cli-1.1.5-vnrym8w3.mjs +0 -2
- package/dist/chunks/cli-1.1.5-vrkwrr2h.mjs +0 -2
- package/dist/chunks/cli-1.1.5-w81t9aj2.mjs +0 -3
- package/dist/chunks/cli-1.1.5-weseckxt.mjs +0 -2
- package/dist/chunks/cli-1.1.5-wv8954rf.mjs +0 -2
- package/dist/chunks/cli-1.1.5-x7xwtg60.mjs +0 -25
- package/dist/chunks/cli-1.1.5-x8h674be.mjs +0 -2
- package/dist/chunks/cli-1.1.5-x8r6zvjf.mjs +0 -2
- package/dist/chunks/cli-1.1.5-xd8qwq5t.mjs +0 -4
- package/dist/chunks/cli-1.1.5-xm9scgfb.mjs +0 -6
- package/dist/chunks/cli-1.1.5-xn9p8nks.mjs +0 -2
- package/dist/chunks/cli-1.1.5-xzxcvrkj.mjs +0 -18
- package/dist/chunks/cli-1.1.5-y2bqj565.mjs +0 -2
- package/dist/chunks/cli-1.1.5-y39w08qk.mjs +0 -16
- package/dist/chunks/cli-1.1.5-y3cdh5em.mjs +0 -2
- package/dist/chunks/cli-1.1.5-y3dcmn9x.mjs +0 -2
- package/dist/chunks/cli-1.1.5-y489qfqe.mjs +0 -2
- package/dist/chunks/cli-1.1.5-y72dp044.mjs +0 -2
- package/dist/chunks/cli-1.1.5-y8301wby.mjs +0 -2
- package/dist/chunks/cli-1.1.5-y9z2ea67.mjs +0 -3
- package/dist/chunks/cli-1.1.5-ybhszeme.mjs +0 -6
- package/dist/chunks/cli-1.1.5-yhnfdcpq.mjs +0 -2
- package/dist/chunks/cli-1.1.5-yprjw8c0.mjs +0 -2
- package/dist/chunks/cli-1.1.5-ysgr8ehw.mjs +0 -2
- package/dist/chunks/cli-1.1.5-za0gqhad.mjs +0 -2
- package/dist/chunks/cli-1.1.5-za286hep.mjs +0 -2
- package/dist/chunks/cli-1.1.5-zaqz0p2z.mjs +0 -2
- package/dist/chunks/cli-1.1.5-zf1qpy4s.mjs +0 -5
- package/dist/chunks/cli-1.1.5-zfdptz6e.mjs +0 -2
- package/dist/chunks/cli-1.1.5-zhrqhz6k.mjs +0 -2
- package/dist/chunks/cli-1.1.5-znkch0ha.mjs +0 -2
- package/dist/chunks/cli-1.1.5-zp9z6jbr.mjs +0 -4
- package/dist/chunks/cli-1.1.5-zqf5btpq.mjs +0 -2
- package/dist/chunks/client-1.1.5-b7jy0ghd.mjs +0 -1
- package/dist/chunks/color-1.1.5-6y847zdb.mjs +0 -1
- package/dist/chunks/compact-1.1.5-qeq8t2tr.mjs +0 -3
- package/dist/chunks/config-1.1.5-80m4yf0n.mjs +0 -1
- package/dist/chunks/config-1.1.5-k42c66af.mjs +0 -1
- package/dist/chunks/constants-1.1.5-j7wq8kbt.mjs +0 -1
- package/dist/chunks/context-1.1.5-yg5tzb6e.mjs +0 -1
- package/dist/chunks/context-noninteractive-1.1.5-x9avg7mv.mjs +0 -1
- package/dist/chunks/conversation-1.1.5-26nfjzvp.mjs +0 -1
- package/dist/chunks/copilotHeaders-1.1.5-r1ppkqcb.mjs +0 -1
- package/dist/chunks/copy-1.1.5-ca7qm1hb.mjs +0 -9
- package/dist/chunks/cost-1.1.5-78gr4gxd.mjs +0 -1
- package/dist/chunks/createSSHSession-1.1.5-kqscm0vz.mjs +0 -1
- package/dist/chunks/createSession-1.1.5-p3sakr7e.mjs +0 -1
- package/dist/chunks/debug-1.1.5-p8srxkzw.mjs +0 -1
- package/dist/chunks/defaultActionDeps-1.1.5-eyhb0fk5.mjs +0 -1446
- package/dist/chunks/desktop-1.1.5-5grfbqvk.mjs +0 -1
- package/dist/chunks/detectRepository-1.1.5-bwa3vtz3.mjs +0 -1
- package/dist/chunks/detection-1.1.5-vt7wfg5r.mjs +0 -1
- package/dist/chunks/diff-1.1.5-s3pxjw5c.mjs +0 -1
- package/dist/chunks/doctor-1.1.5-4wbxz46k.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-1.1.5-kr5t2280.mjs +0 -1
- package/dist/chunks/earlyInput-1.1.5-skyzxj8w.mjs +0 -1
- package/dist/chunks/effort-1.1.5-s9va7gy4.mjs +0 -13
- package/dist/chunks/engine-1.1.5-wx72h5z7.mjs +0 -1
- package/dist/chunks/envLessBridgeConfig-1.1.5-tpxb4pq7.mjs +0 -1
- package/dist/chunks/envUtils-1.1.5-6e5wrnvd.mjs +0 -1
- package/dist/chunks/environmentSelection-1.1.5-3mw0z7qc.mjs +0 -1
- package/dist/chunks/environments-1.1.5-m3j75h8p.mjs +0 -1
- package/dist/chunks/errors-1.1.5-nq9vsksc.mjs +0 -1
- package/dist/chunks/exampleCommands-1.1.5-q9e08k2w.mjs +0 -1
- package/dist/chunks/execFileNoThrow-1.1.5-dydczmz0.mjs +0 -1
- package/dist/chunks/exit-1.1.5-5h9189tx.mjs +0 -1
- package/dist/chunks/explorer-1.1.5-wqz086gd.mjs +0 -1
- package/dist/chunks/export-1.1.5-1k3wgj33.mjs +0 -2
- package/dist/chunks/extra-usage-1.1.5-06tk7xa5.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-1.1.5-xjjt7q6e.mjs +0 -1
- package/dist/chunks/fast-1.1.5-we1vtmqs.mjs +0 -1
- package/dist/chunks/feedback-1.1.5-pkxyr6az.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-1.1.5-px4bh3ss.mjs +0 -1
- package/dist/chunks/git-1.1.5-g821etp0.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-1.1.5-jbdn9dvv.mjs +0 -1
- package/dist/chunks/goal-1.1.5-ysbtt444.mjs +0 -4
- package/dist/chunks/grove-1.1.5-mhavkgtj.mjs +0 -1
- package/dist/chunks/growthbook-1.1.5-dm9d5fyr.mjs +0 -1
- package/dist/chunks/headless-1.1.5-2a7gvzd4.mjs +0 -2
- package/dist/chunks/heapdump-1.1.5-mwggejz6.mjs +0 -6
- package/dist/chunks/help-1.1.5-7dqcztc7.mjs +0 -1
- package/dist/chunks/hookChains-1.1.5-cmdxm1q5.mjs +0 -3
- package/dist/chunks/hooks-1.1.5-07j88vdd.mjs +0 -1
- package/dist/chunks/hooks-1.1.5-cf4zytg3.mjs +0 -79
- package/dist/chunks/ide-1.1.5-gqbtkqh9.mjs +0 -3
- package/dist/chunks/image-processor-napi-1.1.5-xdg4a2re.mjs +0 -1
- package/dist/chunks/inboundAttachments-1.1.5-mmme8bgb.mjs +0 -1
- package/dist/chunks/index-1.1.5-0e8nxkr5.mjs +0 -1
- package/dist/chunks/index-1.1.5-2psfav1z.mjs +0 -1
- package/dist/chunks/index-1.1.5-31yhmzz8.mjs +0 -30
- package/dist/chunks/index-1.1.5-7xbjb6c2.mjs +0 -1
- package/dist/chunks/index-1.1.5-8gbjp6gm.mjs +0 -1
- package/dist/chunks/index-1.1.5-9qaxnf95.mjs +0 -9
- package/dist/chunks/index-1.1.5-d80m9w2r.mjs +0 -1
- package/dist/chunks/index-1.1.5-dd9v93f3.mjs +0 -1
- package/dist/chunks/index-1.1.5-f15v7ehp.mjs +0 -2
- package/dist/chunks/index-1.1.5-gtcrsq6a.mjs +0 -1
- package/dist/chunks/index-1.1.5-k2mjk2hh.mjs +0 -1
- package/dist/chunks/index-1.1.5-k56wbbcc.mjs +0 -1
- package/dist/chunks/index-1.1.5-m8h0gt4v.mjs +0 -5
- package/dist/chunks/index-1.1.5-pc824vej.mjs +0 -17
- package/dist/chunks/index-1.1.5-r9dx3d9c.mjs +0 -9
- package/dist/chunks/index-1.1.5-rfsmfb7z.mjs +0 -1
- package/dist/chunks/index-1.1.5-skqdqj9f.mjs +0 -1
- package/dist/chunks/index-1.1.5-t75dn8we.mjs +0 -1
- package/dist/chunks/index-1.1.5-tje0j1qr.mjs +0 -1
- package/dist/chunks/index-1.1.5-vacssesj.mjs +0 -1
- package/dist/chunks/index-1.1.5-wypaz2jv.mjs +0 -2
- package/dist/chunks/index-1.1.5-z8sj89fp.mjs +0 -1
- package/dist/chunks/index-1.1.5-zw1sqbsw.mjs +0 -1
- package/dist/chunks/init-1.1.5-9n4y6y9n.mjs +0 -1
- package/dist/chunks/initReplBridge-1.1.5-9vj405en.mjs +0 -1
- package/dist/chunks/ink-1.1.5-vzb2fpxv.mjs +0 -1
- package/dist/chunks/insights-1.1.5-wfvxz2j9.mjs +0 -870
- package/dist/chunks/install-1.1.5-zxa0xtc5.mjs +0 -1
- package/dist/chunks/install-github-app-1.1.5-gjkvtpss.mjs +0 -149
- package/dist/chunks/install-slack-app-1.1.5-cn8k75hh.mjs +0 -1
- package/dist/chunks/instrumentation-1.1.5-ra2c7a9w.mjs +0 -1
- package/dist/chunks/interactiveHelpers-1.1.5-hc7k117d.mjs +0 -1
- package/dist/chunks/keybindings-1.1.5-pvq5zpgs.mjs +0 -2
- package/dist/chunks/knowledge-1.1.5-04xy0wqx.mjs +0 -2
- package/dist/chunks/latestVersionCache-1.1.5-q0n7h96f.mjs +0 -1
- package/dist/chunks/loadAgentsDir-1.1.5-x8j4b3r6.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.1.5-2f77cnnd.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.1.5-r82hvbrr.mjs +0 -1
- package/dist/chunks/log-1.1.5-bq8jjtaf.mjs +0 -1
- package/dist/chunks/main-1.1.5-g2ptyrq9.mjs +0 -1
- package/dist/chunks/managedEnv-1.1.5-rhwtthhc.mjs +0 -1
- package/dist/chunks/mcp-1.1.5-3kpff1y9.mjs +0 -4
- package/dist/chunks/mcp-1.1.5-7w7pv5qr.mjs +0 -17
- package/dist/chunks/mcp-1.1.5-qdck46bh.mjs +0 -1
- package/dist/chunks/mcpb-1.1.5-s6qaatsk.mjs +0 -1
- package/dist/chunks/memory-1.1.5-sahcfrfk.mjs +0 -72
- package/dist/chunks/model-1.1.5-fyw5q2ag.mjs +0 -1
- package/dist/chunks/model-1.1.5-q7rv0mjx.mjs +0 -2
- package/dist/chunks/node-1.1.5-mpnx0eww.mjs +0 -12
- package/dist/chunks/oauth-1.1.5-3j8hpr8a.mjs +0 -1
- package/dist/chunks/openaiShim-1.1.5-3gwkgyz6.mjs +0 -14
- package/dist/chunks/output-style-1.1.5-zmb3q1dm.mjs +0 -1
- package/dist/chunks/package-2VNCXFNY-1.1.5-c28vg45a.mjs +0 -1
- package/dist/chunks/parseConnectUrl-1.1.5-5m4axefq.mjs +0 -1
- package/dist/chunks/parser-1.1.5-z6sbh7rn.mjs +0 -1
- package/dist/chunks/passes-1.1.5-5wv8397q.mjs +0 -1
- package/dist/chunks/permissions-1.1.5-4j98y6ey.mjs +0 -1
- package/dist/chunks/permissions-1.1.5-rg816dk9.mjs +0 -3
- package/dist/chunks/plan-1.1.5-5ta24jg9.mjs +0 -1
- package/dist/chunks/plist-1.1.5-g61dbe0t.mjs +0 -1
- package/dist/chunks/plugin-1.1.5-qpm7s8qr.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-1.1.5-mrx0c0tk.mjs +0 -1
- package/dist/chunks/plugins-1.1.5-sqsfnz52.mjs +0 -9
- package/dist/chunks/preActionHook-1.1.5-97bkr9c6.mjs +0 -2
- package/dist/chunks/print-1.1.5-dmhsr0z8.mjs +0 -57
- package/dist/chunks/privacy-settings-1.1.5-m80j4n8y.mjs +0 -1
- package/dist/chunks/process-1.1.5-wgen5xeq.mjs +0 -1
- package/dist/chunks/processBashCommand-1.1.5-kbtffj67.mjs +0 -1
- package/dist/chunks/processSlashCommand-1.1.5-e9gs2skb.mjs +0 -9
- package/dist/chunks/prompt-1.1.5-nze4mgb1.mjs +0 -1
- package/dist/chunks/prompt-1.1.5-rt3khqxe.mjs +0 -1
- package/dist/chunks/prompts-1.1.5-n7j717c7.mjs +0 -1
- package/dist/chunks/protocolHandler-1.1.5-t2gwfb5r.mjs +0 -13
- package/dist/chunks/provider-1.1.5-frpk8g8n.mjs +0 -2
- package/dist/chunks/providerProfiles-1.1.5-73fdzmet.mjs +0 -1
- package/dist/chunks/providerValidation-1.1.5-jgwkyrde.mjs +0 -6
- package/dist/chunks/rate-limit-options-1.1.5-r2g52qq0.mjs +0 -1
- package/dist/chunks/registerSubcommands-1.1.5-7a3c8p1r.mjs +0 -34
- package/dist/chunks/registry-1.1.5-ez5tf749.mjs +0 -1
- package/dist/chunks/release-notes-1.1.5-3s2ydgkr.mjs +0 -5
- package/dist/chunks/reload-plugins-1.1.5-ewy48323.mjs +0 -2
- package/dist/chunks/remote-env-1.1.5-fjnn4w8w.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-1.1.5-dykd344q.mjs +0 -1
- package/dist/chunks/remoteSession-1.1.5-zh3f0taa.mjs +0 -1
- package/dist/chunks/rename-1.1.5-87w96zgn.mjs +0 -1
- package/dist/chunks/replBridgeHandle-1.1.5-k6qqd6n9.mjs +0 -1
- package/dist/chunks/replLauncher-1.1.5-f5be34k2.mjs +0 -1
- package/dist/chunks/resume-1.1.5-6m8daxjc.mjs +0 -2
- package/dist/chunks/rewind-1.1.5-h0p52671.mjs +0 -1
- package/dist/chunks/rootOptions-1.1.5-vwgeptzg.mjs +0 -1
- package/dist/chunks/runWorkflowHeadless-1.1.5-rq7nrfys.mjs +0 -10
- package/dist/chunks/sandbox-adapter-1.1.5-v44d4c8t.mjs +0 -1
- package/dist/chunks/sandbox-toggle-1.1.5-1p7ft47t.mjs +0 -1
- package/dist/chunks/session-1.1.5-z13kjbfr.mjs +0 -2
- package/dist/chunks/sessionDiscovery-1.1.5-ay13sxfh.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-1.1.5-657ppg5q.mjs +0 -1
- package/dist/chunks/sessionStorage-1.1.5-6wbgfrx2.mjs +0 -1
- package/dist/chunks/settings-1.1.5-trqwe36q.mjs +0 -1
- package/dist/chunks/setup-1.1.5-36qva9ce.mjs +0 -5
- package/dist/chunks/sinks-1.1.5-xrb884av.mjs +0 -1
- package/dist/chunks/skills-1.1.5-fx5xev0z.mjs +0 -1
- package/dist/chunks/startupProfiler-1.1.5-4srbezwa.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-1.1.5-z783f2gh.mjs +0 -1
- package/dist/chunks/state-1.1.5-emwaw100.mjs +0 -1
- package/dist/chunks/stats-1.1.5-yq9rd0vh.mjs +0 -6
- package/dist/chunks/status-1.1.5-3z0rsyyn.mjs +0 -1
- package/dist/chunks/stickers-1.1.5-svtd2cf2.mjs +0 -1
- package/dist/chunks/subprocessEnv-1.1.5-s8t729hb.mjs +0 -1
- package/dist/chunks/tasks-1.1.5-7xtpdxmb.mjs +0 -1
- package/dist/chunks/teamHelpers-1.1.5-3f13a139.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-1.1.5-mppw7mas.mjs +0 -1
- package/dist/chunks/teleport-1.1.5-kcw56shc.mjs +0 -1
- package/dist/chunks/terminalSetup-1.1.5-775nwnpp.mjs +0 -1
- package/dist/chunks/theme-1.1.5-05qfpzcq.mjs +0 -1
- package/dist/chunks/thinkback-1.1.5-w56d1tpy.mjs +0 -1
- package/dist/chunks/thinkback-play-1.1.5-316nwkk0.mjs +0 -1
- package/dist/chunks/toolPool-1.1.5-q7fh21qp.mjs +0 -1
- package/dist/chunks/toolSearch-1.1.5-y8qqtj5g.mjs +0 -1
- package/dist/chunks/tools-1.1.5-z7xa3j7q.mjs +0 -1
- package/dist/chunks/trustedDevice-1.1.5-b691w8cr.mjs +0 -1
- package/dist/chunks/turndown.cjs-1.1.5-37sae4sj.mjs +0 -69
- package/dist/chunks/types-1.1.5-2g1j2fq0.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-1.1.5-0c9fawfn.mjs +0 -4
- package/dist/chunks/update-1.1.5-xd9ws9t3.mjs +0 -72
- package/dist/chunks/upgrade-1.1.5-534zzem5.mjs +0 -1
- package/dist/chunks/upload-1.1.5-c4826hfz.mjs +0 -7
- package/dist/chunks/upstreamproxy-1.1.5-7zb7f97v.mjs +0 -14
- package/dist/chunks/url-handler-napi-1.1.5-0vy3dhf8.mjs +0 -1
- package/dist/chunks/usage-1.1.5-xc1ksj33.mjs +0 -1
- package/dist/chunks/util-1.1.5-fx75rnha.mjs +0 -1
- package/dist/chunks/utils-1.1.5-1fxys2da.mjs +0 -1
- package/dist/chunks/vim-1.1.5-p9apxkqt.mjs +0 -1
- package/dist/chunks/watchLoop-1.1.5-s6ntndn2.mjs +0 -13
- package/dist/chunks/watcher-1.1.5-vsvwk41x.mjs +0 -1
- package/dist/chunks/wiki-1.1.5-9egxgqaa.mjs +0 -132
- package/dist/chunks/workflows-1.1.5-rgerb51y.mjs +0 -1
- package/dist/chunks/worktree-1.1.5-9byj3hpm.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-1.1.5-abb9xdvs.mjs +0 -1
- package/dist/chunks/wrapper-1.1.5-tad03vhy.mjs +0 -7
- /package/dist/chunks/{cli-1.1.5-a3ew1094.mjs → cli-1.1.7-72scj2da.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.5-k89gf8y1.mjs → cli-1.1.7-8yk0ktps.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.5-60nnwyjy.mjs → cli-1.1.7-c1q5d5ds.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.5-m2tvhjca.mjs → cli-1.1.7-f0hcstcc.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.5-bfqs63at.mjs → cli-1.1.7-h8bj6vzr.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.5-v8kvgy84.mjs → cli-1.1.7-hr9a4wzy.mjs} +0 -0
- /package/dist/chunks/{cli-1.1.5-9tkrrje2.mjs → cli-1.1.7-k69a0vax.mjs} +0 -0
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{cc as DY}from"./cli-1.1.5-bfqs63at.mjs";import{$c as iQ,Yc as LY}from"./cli-1.1.5-y2bqj565.mjs";import{gi as V0,hi as p6}from"./cli-1.1.5-600z85n1.mjs";import{$i as A6,_i as pY}from"./cli-1.1.5-mx0yvg1w.mjs";import{$A as v6,AQ as aY,AS as iY,BK as dY,CQ as nY,Ct as b0,Dq as iZ,Dt as fZ,ES as zY,Ep as j9,Eq as AY,Fp as i6,Fq as FZ,GQ as w6,Gq as _Y,HS as qY,Ht as r9,ID as HY,IO as BY,JD as aQ,KO as rQ,LR as kZ,PR as xZ,Sm as yZ,UD as NY,UL as P9,VD as nQ,Vm as $Z,WL as F9,Wm as e0,ZA as uY,_D as RY,_L as M9,aE as z6,dC as cY,eC as _6,eE as n,eS as wZ,ew as h0,fB as CY,fM as o6,fl as L9,fw as uZ,gB as TY,gE as U6,gk as KZ,gl as u6,gw as k0,hB as L6,hl as z9,hw as x0,iC as mY,il as q9,iw as u0,iy as I0,jC as O6,jk as E0,jl as bZ,jw as p0,kI as T0,kL as PY,kl as Y0,kw as pZ,lI as s9,ll as D9,lw as cZ,ly as i9,ml as XZ,mw as c0,nL as J6,nl as Q0,nw as m0,oK as s,ok as hY,ol as v9,ow as g0,pl as A9,pw as d0,ql as sY,qw as l0,rQ as lY,rS as rY,rw as a0,su as ZY,sw as n0,tu as xQ,tw as r0,uK as gY,uu as JY,uw as i0,vu as lQ,vw as GQ,vz as xY,wu as kY,xG as C0,yG as o9,yz as D6,zt as M0}from"./cli-1.1.5-bcgy5mbp.mjs";import{IX as Q9,MX as R6}from"./cli-1.1.5-sxj5bjbt.mjs";import{BY as $0,CY as j0,DY as l9,GY as P0,HY as a9,NY as F0,OY as n9,nY as y0,oY as d9}from"./cli-1.1.5-bs0hzzxt.mjs";import{DZ as m9,H1 as g9,a1 as p,c1 as M}from"./cli-1.1.5-9q40r2jj.mjs";import{n4 as a,o4 as E,p4 as b,q4 as J0}from"./cli-1.1.5-0a8jb3pr.mjs";import{r4 as c9}from"./cli-1.1.5-43y030nv.mjs";import{B6 as K6,a9 as G6,d8 as jY,x6 as $Y}from"./cli-1.1.5-y39w08qk.mjs";import{$ca as V6,Caa as y9,D_ as _Z,E_ as k9,Gca as $9,Jga as U0,Mga as p9,Nca as r6,P_ as GY,Qga as e,R_ as dQ,S$ as a6,Xda as yY,Yca as wY,Yga as w0,Zaa as n6,Zca as EY,bba as Y9,eea as W6,gba as T6,q$ as E9,xaa as TZ,zaa as x9}from"./cli-1.1.5-v9a6fbsq.mjs";import{hha as B0,pha as L0,tha as h9}from"./cli-1.1.5-3xf010sx.mjs";import{Zha as oY,iia as $6}from"./cli-1.1.5-dpwkjrhv.mjs";import{Bia as Y,Cia as h,Dia as JZ,Eia as q,Fia as EZ}from"./cli-1.1.5-nkhse0vg.mjs";import{Iia as UY,Kia as X6,Mia as RZ,Pia as z0,Qia as q0,Ria as D0,Sia as v0,Uia as A0,Via as _0,fja as O0,lja as u9}from"./cli-1.1.5-0amg980q.mjs";import{wja as g,zja as UZ}from"./cli-1.1.5-zqf5btpq.mjs";import{Cja as Z9,Cka as HZ,Eja as C6,cka as ZZ,dka as WY,hka as PZ,zka as I}from"./cli-1.1.5-3zc9bseg.mjs";import{Eka as KY,Ika as gQ}from"./cli-1.1.5-pthrjd43.mjs";import{Lka as VY,Zka as w9,_ka as tZ,ela as lZ}from"./cli-1.1.5-xd8qwq5t.mjs";import{Hpa as J9,Ipa as DZ,Jpa as H9,Lpa as N9,Mpa as X0,Opa as B9,Wqa as IY,Zqa as BZ,_ma as NZ,ena as W0,fna as eY,poa as OY}from"./cli-1.1.5-0gd61h7z.mjs";import{Esa as N0,Hsa as hZ,Isa as OZ,Jsa as rZ}from"./cli-1.1.5-keef1hq8.mjs";var WQ={};hZ(WQ,{selectableUserMessagesFilter:()=>S0,messagesAfterAreOnlySynthetic:()=>VQ,MessageSelector:()=>e9});import{randomUUID as t9}from"crypto";import*as QZ from"path";function R0(Q){return Q.type==="text"}function SZ(Q){return Q==="summarize"||Q==="summarize_up_to"}function e9({messages:Q,onPreRestore:Z,onRestoreMessage:X,onRestoreCode:V,onSummarize:W,onClose:H,preselectedMessage:G}){let K=I0((U)=>U.fileHistory),[B,z]=T.useState(void 0),J=M0(),L=T.useMemo(t9,[]),_=T.useMemo(()=>[...Q.filter(S0),{...s({content:""}),uuid:L}],[Q,L]),[w,v]=T.useState(_.length-1),P=Math.max(0,Math.min(w-Math.floor(CZ/2),_.length-CZ)),f=_.length>1,[D,F]=T.useState(G),[y,S]=T.useState(void 0);T.useEffect(()=>{if(!G||!J)return;let U=!1;return fZ(K,G.uuid).then((R)=>{if(!U)S(R)}),()=>{U=!0}},[G,J,K]);let[O,$]=T.useState(!1),[d,i]=T.useState(null),[o,C]=T.useState("both"),[k,x]=T.useState(""),[A,j]=T.useState("");function N(U){let R=U?[{value:"both",label:"Restore code and conversation"},{value:"conversation",label:"Restore conversation"},{value:"code",label:"Restore code"}]:[{value:"conversation",label:"Restore conversation"}],c={type:"input",placeholder:"add context (optional)",initialValue:"",allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:": "};return R.push({value:"summarize",label:"Summarize from here",...c,onChange:x}),R.push({value:"nevermind",label:"Never mind"}),R}T.useEffect(()=>{g("tengu_message_selector_opened",{})},[]);async function u(U){Z(),$(!0);try{await X(U),$(!1),H()}catch(R){e(R),$(!1),z(`Failed to restore the conversation:
|
|
2
|
-
${R}`)}}async function l(U){let R=Q.indexOf(U),c=Q.length-1-R;if(g("tengu_message_selector_selected",{index_from_end:c,message_type:U.type,is_current_prompt:!1}),!Q.includes(U)){H();return}if(!J){await u(U);return}let m=await fZ(K,U.uuid);F(U),S(m)}async function VZ(U){if(g("tengu_message_selector_restore_option_selected",{option:U}),!D){z("Message not found.");return}if(U==="nevermind"){if(G)H();else F(void 0);return}if(SZ(U)){Z(),$(!0),i(U),z(void 0);try{let m=U==="summarize_up_to"?"up_to":"from",YZ=(m==="up_to"?A:k).trim()||void 0;await W(D,YZ,m),$(!1),i(null),F(void 0),H()}catch(m){e(m),$(!1),i(null),F(void 0),z(`Failed to summarize:
|
|
3
|
-
${m}`)}return}Z(),$(!0),z(void 0);let R=null,c=null;if(U==="code"||U==="both")try{await V(D)}catch(m){R=m,e(R)}if(U==="conversation"||U==="both")try{await X(D)}catch(m){c=m,e(c)}if($(!1),F(void 0),c&&R)z(`Failed to restore the conversation and code:
|
|
4
|
-
${c}
|
|
5
|
-
${R}`);else if(c)z(`Failed to restore the conversation:
|
|
6
|
-
${c}`);else if(R)z(`Failed to restore the code:
|
|
7
|
-
${R}`);else H()}let WZ=P0(),t=T.useCallback(()=>{if(D&&!G){F(void 0);return}g("tengu_message_selector_cancelled",{}),H()},[H,D,G]),I9=T.useCallback(()=>v((U)=>Math.max(0,U-1)),[]),C9=T.useCallback(()=>v((U)=>Math.min(_.length-1,U+1)),[_.length]),T9=T.useCallback(()=>v(0),[]),R9=T.useCallback(()=>v(_.length-1),[_.length]),f9=T.useCallback(()=>{let U=_[w];if(U)l(U)},[_,w,l]);$0("confirm:no",t,{context:"Confirmation",isActive:!D}),j0({"messageSelector:up":I9,"messageSelector:down":C9,"messageSelector:top":T9,"messageSelector:bottom":R9,"messageSelector:select":f9},{context:"MessageSelector",isActive:!O&&!B&&!D&&f});let[K0,G0]=T.useState({});T.useEffect(()=>{async function U(){if(!J)return;Promise.all(_.map(async(R,c)=>{if(R.uuid!==L){let m=b0(K,R.uuid),YZ=_.at(c+1),AZ=m?XQ(Q,R.uuid,YZ?.uuid!==L?YZ?.uuid:void 0):void 0;if(AZ!==void 0)G0((r)=>({...r,[c]:AZ}));else G0((r)=>({...r,[c]:void 0}))}}))}U()},[_,Q,L,K,J]);let vZ=J&&y?.filesChanged&&y.filesChanged.length>0,S9=!B&&!D&&!G&&f;return b(p,{flexDirection:"column",width:"100%",children:[E(F0,{color:"suggestion"}),b(p,{flexDirection:"column",marginX:1,gap:1,children:[E(M,{bold:!0,color:"suggestion",children:"Rewind"}),B&&E(a,{children:b(M,{color:"error",children:["Error: ",B]})}),!f&&E(a,{children:E(M,{children:"Nothing to rewind to yet."})}),!B&&D&&f&&b(a,{children:[b(M,{children:["Confirm you want to restore"," ",!y&&"the conversation ","to the point before you sent this message:"]}),b(p,{flexDirection:"column",paddingLeft:1,borderStyle:"single",borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[E(H0,{userMessage:D,color:"text",isCurrent:!1}),b(M,{dimColor:!0,children:["(",L0(new Date(D.timestamp)),")"]})]}),E(YQ,{selectedRestoreOption:o,canRestoreCode:!!vZ,diffStatsForRestore:y}),O&&SZ(d)?b(p,{flexDirection:"row",gap:1,children:[E(T0,{}),E(M,{children:"Summarizing…"})]}):E(C0,{isDisabled:O,options:N(!!vZ),defaultFocusValue:vZ?"both":"conversation",onFocus:(U)=>C(U),onChange:(U)=>VZ(U),onCancel:()=>G?H():F(void 0)}),vZ&&E(p,{marginBottom:1,children:b(M,{dimColor:!0,children:[_Z.warning," Rewinding does not affect files edited manually or via bash."]})})]}),S9&&b(a,{children:[J?E(M,{children:"Restore the code and/or conversation to the point before…"}):E(M,{children:"Restore and fork the conversation to the point before…"}),E(p,{width:"100%",flexDirection:"column",children:_.slice(P,P+CZ).map((U,R)=>{let c=P+R,m=c===w,YZ=U.uuid===L,AZ=c in K0,r=K0[c],IZ=r?.filesChanged&&r.filesChanged.length;return b(p,{height:J?3:2,overflow:"hidden",width:"100%",flexDirection:"row",children:[E(p,{width:2,minWidth:2,children:m?b(M,{color:"permission",bold:!0,children:[_Z.pointer," "]}):E(M,{children:" "})}),b(p,{flexDirection:"column",children:[E(p,{flexShrink:1,height:1,overflow:"hidden",children:E(H0,{userMessage:U,color:m?"suggestion":void 0,isCurrent:YZ,paddingRight:10})}),J&&AZ&&E(p,{height:1,flexDirection:"row",children:r?E(a,{children:E(M,{dimColor:!m,color:"inactive",children:IZ?b(a,{children:[IZ===1&&r.filesChanged[0]?`${QZ.basename(r.filesChanged[0])} `:`${IZ} files changed `,E(f0,{diffStats:r})]}):E(a,{children:"No code changes"})})}):b(M,{dimColor:!0,color:"warning",children:[_Z.warning," No code restore"]})})]})]},U.uuid)})})]}),!D&&E(M,{dimColor:!0,italic:!0,children:WZ.pending?b(a,{children:["Press ",WZ.keyName," again to exit"]}):b(a,{children:[!B&&f&&"Enter to continue · ","Esc to exit"]})})]})]})}function ZQ(Q){switch(Q){case"summarize":return"Messages after this point will be summarized.";case"summarize_up_to":return"Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.";case"both":case"conversation":return"The conversation will be forked.";case"code":case"nevermind":return"The conversation will be unchanged."}}function YQ(Q){let Z=GZ.c(11),{selectedRestoreOption:X,canRestoreCode:V,diffStatsForRestore:W}=Q,H=V&&(X==="both"||X==="code"),G;if(Z[0]!==X)G=ZQ(X),Z[0]=X,Z[1]=G;else G=Z[1];let K;if(Z[2]!==G)K=E(M,{dimColor:!0,children:G}),Z[2]=G,Z[3]=K;else K=Z[3];let B;if(Z[4]!==W||Z[5]!==X||Z[6]!==H)B=!SZ(X)&&(H?E(QQ,{diffStatsForRestore:W}):E(M,{dimColor:!0,children:"The code will be unchanged."})),Z[4]=W,Z[5]=X,Z[6]=H,Z[7]=B;else B=Z[7];let z;if(Z[8]!==K||Z[9]!==B)z=b(p,{flexDirection:"column",children:[K,B]}),Z[8]=K,Z[9]=B,Z[10]=z;else z=Z[10];return z}function QQ(Q){let Z=GZ.c(14),{diffStatsForRestore:X}=Q;if(X===void 0)return;if(!X.filesChanged||!X.filesChanged[0]){let K;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))K=E(M,{dimColor:!0,children:"The code has not changed (nothing will be restored)."}),Z[0]=K;else K=Z[0];return K}let V=X.filesChanged.length,W;if(V===1){let K;if(Z[1]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[1]=X.filesChanged[0],Z[2]=K;else K=Z[2];W=K}else if(V===2){let K;if(Z[3]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[3]=X.filesChanged[0],Z[4]=K;else K=Z[4];let B=K,z;if(Z[5]!==X.filesChanged[1])z=QZ.basename(X.filesChanged[1]||""),Z[5]=X.filesChanged[1],Z[6]=z;else z=Z[6];W=`${B} and ${z}`}else{let K;if(Z[7]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[7]=X.filesChanged[0],Z[8]=K;else K=Z[8];W=`${K} and ${X.filesChanged.length-1} other files`}let H;if(Z[9]!==X)H=E(f0,{diffStats:X}),Z[9]=X,Z[10]=H;else H=Z[10];let G;if(Z[11]!==W||Z[12]!==H)G=E(a,{children:b(M,{dimColor:!0,children:["The code will be restored"," ",H," in ",W,"."]})}),Z[11]=W,Z[12]=H,Z[13]=G;else G=Z[13];return G}function f0(Q){let Z=GZ.c(7),{diffStats:X}=Q;if(!X||!X.filesChanged)return;let V;if(Z[0]!==X.insertions)V=b(M,{color:"diffAddedWord",children:["+",X.insertions," "]}),Z[0]=X.insertions,Z[1]=V;else V=Z[1];let W;if(Z[2]!==X.deletions)W=b(M,{color:"diffRemovedWord",children:["-",X.deletions]}),Z[2]=X.deletions,Z[3]=W;else W=Z[3];let H;if(Z[4]!==V||Z[5]!==W)H=b(a,{children:[V,W]}),Z[4]=V,Z[5]=W,Z[6]=H;else H=Z[6];return H}function H0(Q){let Z=GZ.c(31),{userMessage:X,color:V,dimColor:W,isCurrent:H,paddingRight:G}=Q,{columns:K}=y0();if(H){let S;if(Z[0]!==V||Z[1]!==W)S=E(p,{width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"(current)"})}),Z[0]=V,Z[1]=W,Z[2]=S;else S=Z[2];return S}let B=X.message.content,z=typeof B==="string"?null:B[B.length-1],J,L,_,w,v,P,f,D;if(Z[3]!==V||Z[4]!==K||Z[5]!==B||Z[6]!==W||Z[7]!==z||Z[8]!==G){D=Symbol.for("react.early_return_sentinel");Z:{let S=typeof B==="string"?B.trim():z&&R0(z)?z.text.trim():"(no prompt)",O=U0(S);if(E0(O)){let $;if(Z[17]!==V||Z[18]!==W)$=E(p,{flexDirection:"row",width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"((empty message))"})}),Z[17]=V,Z[18]=W,Z[19]=$;else $=Z[19];D=$;break Z}if(O.includes("<bash-input>")){let $=KZ(O,"bash-input");if($){let d;if(Z[20]===Symbol.for("react.memo_cache_sentinel"))d=E(M,{color:"bashBorder",children:"!"}),Z[20]=d;else d=Z[20];D=b(p,{flexDirection:"row",width:"100%",children:[d,b(M,{color:V,dimColor:W,children:[" ",$]})]});break Z}}if(O.includes(`<${RZ}>`)){let $=KZ(O,RZ),d=KZ(O,"command-args"),i=KZ(O,"skill-format")==="true";if($)if(i){D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["Skill(",$,")"]})});break Z}else{D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["/",$," ",d]})});break Z}}L=p,P="row",f="100%",J=M,_=V,w=W,v=G?B0(O,K-G,!0):O.slice(0,500).split(`
|
|
8
|
-
`).slice(0,4).join(`
|
|
9
|
-
`)}Z[3]=V,Z[4]=K,Z[5]=B,Z[6]=W,Z[7]=z,Z[8]=G,Z[9]=J,Z[10]=L,Z[11]=_,Z[12]=w,Z[13]=v,Z[14]=P,Z[15]=f,Z[16]=D}else J=Z[9],L=Z[10],_=Z[11],w=Z[12],v=Z[13],P=Z[14],f=Z[15],D=Z[16];if(D!==Symbol.for("react.early_return_sentinel"))return D;let F;if(Z[21]!==J||Z[22]!==_||Z[23]!==w||Z[24]!==v)F=E(J,{color:_,dimColor:w,children:v}),Z[21]=J,Z[22]=_,Z[23]=w,Z[24]=v,Z[25]=F;else F=Z[25];let y;if(Z[26]!==L||Z[27]!==P||Z[28]!==f||Z[29]!==F)y=E(L,{flexDirection:P,width:f,children:F}),Z[26]=L,Z[27]=P,Z[28]=f,Z[29]=F,Z[30]=y;else y=Z[30];return y}function XQ(Q,Z,X){let V=Q.findIndex((B)=>B.uuid===Z);if(V===-1)return;let W=X?Q.findIndex((B)=>B.uuid===X):Q.length;if(W===-1)W=Q.length;let H=[],G=0,K=0;for(let B=V+1;B<W;B++){let z=Q[B];if(!z||!xZ(z))continue;let J=z.toolUseResult;if(!J||!J.filePath||!J.structuredPatch)continue;if(!H.includes(J.filePath))H.push(J.filePath);try{if("type"in J&&J.type==="create")G+=J.content.split(/\r?\n/).length;else for(let L of J.structuredPatch){let _=TZ(L.lines,(v)=>v.startsWith("+")),w=TZ(L.lines,(v)=>v.startsWith("-"));G+=_,K+=w}}catch{continue}}return{filesChanged:H,insertions:G,deletions:K}}function S0(Q){if(Q.type!=="user")return!1;if(Array.isArray(Q.message.content)&&Q.message.content[0]?.type==="tool_result")return!1;if(kZ(Q))return!1;if(Q.isMeta)return!1;if(Q.isCompactSummary||Q.isVisibleInTranscriptOnly)return!1;let Z=Q.message.content,X=typeof Z==="string"?null:Z[Z.length-1],V=typeof Z==="string"?Z.trim():X&&R0(X)?X.text.trim():"";if(V.indexOf(`<${D0}>`)!==-1||V.indexOf(`<${v0}>`)!==-1||V.indexOf(`<${z0}>`)!==-1||V.indexOf(`<${q0}>`)!==-1||V.indexOf(`<${_0}>`)!==-1||V.indexOf(`<${A0}>`)!==-1||V.indexOf(`<${O0}`)!==-1)return!1;return!0}function VQ(Q,Z){for(let X=Z+1;X<Q.length;X++){let V=Q[X];if(!V)continue;if(kZ(V))continue;if(xZ(V))continue;if(V.type==="progress")continue;if(V.type==="system")continue;if(V.type==="attachment")continue;if(V.type==="user"&&V.isMeta)continue;if(V.type==="assistant"){let W=V.message.content;if(Array.isArray(W)){if(W.some((G)=>G.type==="text"&&G.text.trim()||G.type==="tool_use"))return!1}continue}if(V.type==="user")return!1}return!0}var GZ,T,CZ=7;var KQ=OZ(()=>{k9();UZ();i9();r9();w0();a9();g9();l9();p9();wZ();o9();s9();d9();u9();x9();h9();n9();J0();GZ=N0(m9(),1),T=N0(c9(),1)});var b6={};hZ(b6,{getCronJitterConfig:()=>M6});function M6(){let Q=oY("tengu_kairos_cron_config",XZ,j6),Z=F6().safeParse(Q);return Z.success?Z.data:XZ}var j6=60000,oZ=1800000,P6=2592000000,F6;var I6=OZ(()=>{JZ();$6();sY();EZ();F6=q(()=>Y.object({recurringFrac:Y.number().min(0).max(1),recurringCapMs:Y.number().int().min(0).max(oZ),oneShotMaxMs:Y.number().int().min(0).max(oZ),oneShotFloorMs:Y.number().int().min(0).max(oZ),oneShotMinuteMod:Y.number().int().min(1).max(60),recurringMaxAgeMs:Y.number().int().min(0).max(P6).default(XZ.recurringMaxAgeMs)}).refine((Q)=>Q.oneShotFloorMs<=Q.oneShotMaxMs))});import{mkdir as f6,readFile as S6,unlink as X9,writeFile as eZ}from"fs/promises";import{dirname as h6,join as V9}from"path";function zZ(Q){return V9(Q??eY(),k6)}async function W9(Q){let Z;try{Z=await S6(zZ(Q),"utf8")}catch{return}let X=x6().safeParse(Y9(Z,!1));return X.success?X.data:void 0}async function tY(Q,Z){let X=zZ(Z),V=ZZ(Q);try{return await eZ(X,V,{flag:"wx"}),!0}catch(W){let H=tZ(W);if(H==="EEXIST")return!1;if(H==="ENOENT"){await f6(h6(X),{recursive:!0});try{return await eZ(X,V,{flag:"wx"}),!0}catch(G){if(tZ(G)==="EEXIST")return!1;throw G}}throw W}}function sZ(Q){MZ?.(),MZ=Z9(async()=>{await qZ(Q)})}async function Z0(Q){let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V={sessionId:X,pid:process.pid,acquiredAt:Date.now()};if(await tY(V,Z))return LZ=void 0,sZ(Q),I(`[ScheduledTasks] acquired scheduler lock (PID ${process.pid})`),!0;let W=await W9(Z);if(W?.sessionId===X){if(W.pid!==process.pid)await eZ(zZ(Z),ZZ(V)),sZ(Q);return!0}if(W&&Q9(W.pid)){if(LZ!==W.sessionId)LZ=W.sessionId,I(`[ScheduledTasks] scheduler lock held by session ${W.sessionId} (PID ${W.pid})`);return!1}if(W)I(`[ScheduledTasks] recovering stale scheduler lock from PID ${W.pid}`);if(await X9(zZ(Z)).catch(()=>{}),await tY(V,Z))return LZ=void 0,sZ(Q),!0;return!1}async function qZ(Q){MZ?.(),MZ=void 0,LZ=void 0;let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V=await W9(Z);if(!V||V.sessionId!==X)return;try{await X9(zZ(Z)),I("[ScheduledTasks] released scheduler lock")}catch{}}var k6,x6,MZ,LZ;var K9=OZ(()=>{JZ();BZ();C6();HZ();lZ();R6();T6();EZ();PZ();k6=V9(".claudin","scheduled_tasks.lock"),x6=q(()=>Y.object({sessionId:Y.string(),pid:Y.number(),acquiredAt:Y.number()}))});var d6={};hZ(d6,{takeDueSessionWakeup:()=>O9,isRecurringTaskAged:()=>_9,createCronScheduler:()=>g6,buildMissedTaskNotification:()=>U9});function _9(Q,Z,X){if(X===0)return!1;return Boolean(Q.recurring&&!Q.permanent&&Z-Q.createdAt>=X)}function O9(Q){let Z=X0();if(!Z||Q<Z.fireAtMs)return null;return B9(),{prompt:V0(Z.prompt),reason:Z.reason}}function g6(Q){let{onFire:Z,isLoading:X,assistantMode:V=!1,onFireTask:W,onMissed:H,onWakeupFire:G,dir:K,lockIdentity:B,getJitterConfig:z,isKilled:J,filter:L}=Q,_=K||B?{dir:K,lockIdentity:B}:void 0,w=[],v=new Map,P=new Set,f=new Set,D=null,F=null,y=null,S=null,O=!1,$=!1;async function d(C){let k=await q9(K);if(O)return;if(w=k,!C)return;let x=Date.now(),A=A9(k,x).filter((j)=>!j.recurring&&!P.has(j.id)&&(!L||L(j)));if(A.length>0){for(let j of A)P.add(j.id),v.set(j.id,1/0);if(g("tengu_scheduled_task_missed",{count:A.length,taskIds:A.map((j)=>j.id).join(",")}),H)H(A);else Z(U9(A));Y0(A.map((j)=>j.id),K).catch((j)=>I(`[ScheduledTasks] failed to remove missed tasks: ${j}`)),I(`[ScheduledTasks] surfaced ${A.length} missed one-shot task(s)`)}}function i(){if(J?.())return;if(X()&&!V)return;let C=Date.now(),k=new Set,x=[],A=z?.()??XZ;function j(N,u){if(L&&!L(N))return;if(k.add(N.id),f.has(N.id))return;let l=v.get(N.id);if(l===void 0)l=N.recurring?Q0(N.cron,N.lastFiredAt??N.createdAt,N.id,A)??1/0:v9(N.cron,N.createdAt,N.id,A)??1/0,v.set(N.id,l),I(`[ScheduledTasks] scheduled ${N.id} for ${l===1/0?"never":new Date(l).toISOString()}`);if(C<l)return;I(`[ScheduledTasks] firing ${N.id}${N.recurring?" (recurring)":""}`),g("tengu_scheduled_task_fire",{recurring:N.recurring??!1,taskId:N.id});let VZ=K===void 0?V0(N.prompt,void 0,N.agentId):N.prompt;if(W)W(VZ===N.prompt?N:{...N,prompt:VZ});else Z(VZ);let WZ=_9(N,C,A.recurringMaxAgeMs);if(WZ){let t=Math.floor((C-N.createdAt)/1000/60/60);I(`[ScheduledTasks] recurring task ${N.id} aged out (${t}h since creation), deleting after final fire`),g("tengu_scheduled_task_expired",{taskId:N.id,ageHours:t})}if(N.recurring&&!WZ){let t=Q0(N.cron,C,N.id,A)??1/0;if(v.set(N.id,t),!u)x.push(N.id)}else if(u)N9([N.id]),v.delete(N.id);else f.add(N.id),Y0([N.id],K).catch((t)=>I(`[ScheduledTasks] failed to remove task ${N.id}: ${t}`)).finally(()=>f.delete(N.id)),v.delete(N.id)}if($){for(let N of w)j(N,!1);if(x.length>0){for(let N of x)f.add(N);D9(x,C,K).catch((N)=>I(`[ScheduledTasks] failed to persist lastFiredAt: ${N}`)).finally(()=>{for(let N of x)f.delete(N)})}}if(K===void 0){for(let u of H9())j(u,!0);let N=O9(C);if(N!==null)if(I("[ScheduledTasks] firing pending ScheduleWakeup"),g("tengu_schedule_wakeup_fire",{}),G)G(N.prompt,N.reason);else Z(N.prompt)}if(k.size===0){v.clear();return}for(let N of v.keys())if(!k.has(N))v.delete(N)}async function o(){if(O)return;if(D)clearInterval(D),D=null;let{default:C}=await import("./index-1.1.5-t75dn8we.mjs");if(O)return;if($=await Z0(_).catch(()=>!1),O){if($)$=!1,qZ(_);return}if(!$)y=setInterval(()=>{Z0(_).then((x)=>{if(O){if(x)qZ(_);return}if(x){if($=!0,y)clearInterval(y),y=null}}).catch((x)=>I(String(x),{level:"error"}))},m6),y.unref?.();d(!0);let k=z9(K);S=C.watch(k,{persistent:!1,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:c6},ignorePermissionErrors:!0}),S.on("add",()=>void d(!1)),S.on("change",()=>void d(!1)),S.on("unlink",()=>{if(!O)w=[],v.clear()}),F=setInterval(i,G9),F.unref?.()}return{start(){if(O=!1,K!==void 0){I(`[ScheduledTasks] scheduler start() — dir=${K}, hasTasks=${bZ(K)}`),o();return}if(I(`[ScheduledTasks] scheduler start() — enabled=${DZ()}, hasTasks=${bZ()}`),!DZ()&&(V||bZ()))J9(!0);if(DZ()){o();return}D=setInterval((C)=>{if(DZ())C()},G9,o),D.unref?.()},stop(){if(O=!0,D)clearInterval(D),D=null;if(F)clearInterval(F),F=null;if(y)clearInterval(y),y=null;if(S?.close(),S=null,$)$=!1,qZ(_)},getNextFireTime(){let C=1/0;for(let k of v.values())if(k<C)C=k;if(K===void 0){let k=X0();if(k&&k.fireAtMs<C)C=k.fireAtMs}return C===1/0?null:C}}}function U9(Q){let Z=Q.length>1,X=`The following one-shot scheduled task${Z?"s were":" was"} missed while Claude was not running. ${Z?"They have":"It has"} already been removed from .claudin/scheduled_tasks.json.
|
|
10
|
-
|
|
11
|
-
Do NOT execute ${Z?"these prompts":"this prompt"} yet. First use the AskUserQuestion tool to ask whether to run ${Z?"each one":"it"} now. Only execute if the user confirms.`,V=Q.map((W)=>{let H=`[${L9(W.cron)}, created ${new Date(W.createdAt).toLocaleString()}]`,G=(W.prompt.match(/`+/g)??[]).reduce((B,z)=>Math.max(B,z.length),0),K="`".repeat(Math.max(3,G+1));return`${H}
|
|
12
|
-
${K}
|
|
13
|
-
${W.prompt}
|
|
14
|
-
${K}`});return`${X}
|
|
15
|
-
|
|
16
|
-
${V.join(`
|
|
17
|
-
|
|
18
|
-
`)}`}var G9=1000,c6=300,m6=5000;var l6=OZ(()=>{BZ();UZ();u6();sY();K9();HZ();p6()});import{randomUUID as dZ}from"crypto";JZ();EZ();GQ();var JQ=q(()=>Y.unknown()),HQ=q(()=>Y.object({matcher:Y.string().optional(),hookCallbackIds:Y.array(Y.string()),timeout:Y.number().optional()}).describe("Configuration for matching and routing hook callbacks.")),NQ=q(()=>Y.object({subtype:Y.literal("initialize"),hooks:Y.record(u0(),Y.array(HQ())).optional(),sdkMcpServers:Y.array(Y.string()).optional(),jsonSchema:Y.record(Y.string(),Y.unknown()).optional(),systemPrompt:Y.string().optional(),appendSystemPrompt:Y.string().optional(),agents:Y.record(Y.string(),g0()).optional(),promptSuggestions:Y.boolean().optional(),agentProgressSummaries:Y.boolean().optional()}).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration.")),EX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),output_style:Y.string(),available_output_styles:Y.array(Y.string()),models:Y.array(c0()),account:m0(),pid:Y.number().optional().describe("@internal CLI process PID for tmux socket isolation"),fast_mode_state:i0().optional()}).describe("Response from session initialization with available commands, models, and account info.")),BQ=q(()=>Y.object({subtype:Y.literal("interrupt")}).describe("Interrupts the currently running conversation turn.")),LQ=q(()=>Y.object({subtype:Y.literal("can_use_tool"),tool_name:Y.string(),input:Y.record(Y.string(),Y.unknown()),permission_suggestions:Y.array(k0()).optional(),blocked_path:Y.string().optional(),decision_reason:Y.string().optional(),title:Y.string().optional(),display_name:Y.string().optional(),tool_use_id:Y.string(),agent_id:Y.string().optional(),description:Y.string().optional()}).describe("Requests permission to use a tool with the given input.")),zQ=q(()=>Y.object({subtype:Y.literal("set_permission_mode"),mode:x0(),ultraplan:Y.boolean().optional().describe("@internal CCR ultraplan session marker.")}).describe("Sets the permission mode for tool execution handling.")),qQ=q(()=>Y.object({subtype:Y.literal("set_model"),model:Y.string().optional()}).describe("Sets the model to use for subsequent conversation turns.")),DQ=q(()=>Y.object({subtype:Y.literal("set_max_thinking_tokens"),max_thinking_tokens:Y.number().nullable()}).describe("Sets the maximum number of thinking tokens for extended thinking.")),vQ=q(()=>Y.object({subtype:Y.literal("mcp_status")}).describe("Requests the current status of all MCP server connections.")),yX=q(()=>Y.object({mcpServers:Y.array(uZ())}).describe("Response containing the current status of all MCP server connections.")),AQ=q(()=>Y.object({subtype:Y.literal("get_context_usage")}).describe("Requests a breakdown of current context window usage by category.")),_Q=q(()=>Y.object({name:Y.string(),tokens:Y.number(),color:Y.string(),isDeferred:Y.boolean().optional()})),OQ=q(()=>Y.object({color:Y.string(),isFilled:Y.boolean(),categoryName:Y.string(),tokens:Y.number(),percentage:Y.number(),squareFullness:Y.number()})),$X=q(()=>Y.object({categories:Y.array(_Q()),totalTokens:Y.number(),maxTokens:Y.number(),rawMaxTokens:Y.number(),percentage:Y.number(),gridRows:Y.array(Y.array(OQ())),model:Y.string(),memoryFiles:Y.array(Y.object({path:Y.string(),type:Y.string(),tokens:Y.number()})),mcpTools:Y.array(Y.object({name:Y.string(),serverName:Y.string(),tokens:Y.number(),isLoaded:Y.boolean().optional()})),deferredBuiltinTools:Y.array(Y.object({name:Y.string(),tokens:Y.number(),isLoaded:Y.boolean()})).optional(),systemTools:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),systemPromptSections:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),agents:Y.array(Y.object({agentType:Y.string(),source:Y.string(),tokens:Y.number()})),slashCommands:Y.object({totalCommands:Y.number(),includedCommands:Y.number(),tokens:Y.number()}).optional(),skills:Y.object({totalSkills:Y.number(),includedSkills:Y.number(),tokens:Y.number(),skillFrontmatter:Y.array(Y.object({name:Y.string(),source:Y.string(),tokens:Y.number()}))}).optional(),autoCompactThreshold:Y.number().optional(),isAutoCompactEnabled:Y.boolean(),messageBreakdown:Y.object({toolCallTokens:Y.number(),toolResultTokens:Y.number(),attachmentTokens:Y.number(),assistantMessageTokens:Y.number(),userMessageTokens:Y.number(),toolCallsByType:Y.array(Y.object({name:Y.string(),callTokens:Y.number(),resultTokens:Y.number()})),attachmentsByType:Y.array(Y.object({name:Y.string(),tokens:Y.number()}))}).optional(),apiUsage:Y.object({input_tokens:Y.number(),output_tokens:Y.number(),cache_creation_input_tokens:Y.number(),cache_read_input_tokens:Y.number()}).nullable()}).describe("Breakdown of current context window usage by category (system prompt, tools, messages, etc.).")),UQ=q(()=>Y.object({subtype:Y.literal("rewind_files"),user_message_id:Y.string(),dry_run:Y.boolean().optional()}).describe("Rewinds file changes made since a specific user message.")),jX=q(()=>Y.object({canRewind:Y.boolean(),error:Y.string().optional(),filesChanged:Y.array(Y.string()).optional(),insertions:Y.number().optional(),deletions:Y.number().optional()}).describe("Result of a rewindFiles operation.")),wQ=q(()=>Y.object({subtype:Y.literal("cancel_async_message"),message_uuid:Y.string()}).describe("Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.")),PX=q(()=>Y.object({cancelled:Y.boolean()}).describe("Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).")),EQ=q(()=>Y.object({subtype:Y.literal("seed_read_state"),path:Y.string(),mtime:Y.number()}).describe("Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.")),yQ=q(()=>Y.object({subtype:Y.literal("hook_callback"),callback_id:Y.string(),input:p0(),tool_use_id:Y.string().optional()}).describe("Delivers a hook callback with its input data.")),$Q=q(()=>Y.object({subtype:Y.literal("mcp_message"),server_name:Y.string(),message:JQ()}).describe("Sends a JSON-RPC message to a specific MCP server.")),jQ=q(()=>Y.object({subtype:Y.literal("mcp_set_servers"),servers:Y.record(Y.string(),h0())}).describe("Replaces the set of dynamically managed MCP servers.")),FX=q(()=>Y.object({added:Y.array(Y.string()),removed:Y.array(Y.string()),errors:Y.record(Y.string(),Y.string())}).describe("Result of replacing the set of dynamically managed MCP servers.")),PQ=q(()=>Y.object({subtype:Y.literal("reload_plugins")}).describe("Reloads plugins from disk and returns the refreshed session components.")),MX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),plugins:Y.array(Y.object({name:Y.string(),path:Y.string(),source:Y.string().optional()})),mcpServers:Y.array(uZ()),error_count:Y.number()}).describe("Refreshed commands, agents, plugins, and MCP server status after reload.")),FQ=q(()=>Y.object({subtype:Y.literal("mcp_reconnect"),serverName:Y.string()}).describe("Reconnects a disconnected or failed MCP server.")),MQ=q(()=>Y.object({subtype:Y.literal("mcp_toggle"),serverName:Y.string(),enabled:Y.boolean()}).describe("Enables or disables an MCP server.")),bQ=q(()=>Y.object({subtype:Y.literal("stop_task"),task_id:Y.string()}).describe("Stops a running task.")),IQ=q(()=>Y.object({subtype:Y.literal("apply_flag_settings"),settings:Y.record(Y.string(),Y.unknown())}).describe("Merges the provided settings into the flag settings layer, updating the active configuration.")),CQ=q(()=>Y.object({subtype:Y.literal("get_settings")}).describe("Returns the effective merged settings and the raw per-source settings.")),bX=q(()=>Y.object({effective:Y.record(Y.string(),Y.unknown()),sources:Y.array(Y.object({source:Y.enum(["userSettings","projectSettings","localSettings","flagSettings","policySettings"]),settings:Y.record(Y.string(),Y.unknown())})).describe("Ordered low-to-high priority — later entries override earlier ones."),applied:Y.object({model:Y.string(),effort:Y.enum(["low","medium","high","max"]).nullable()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe("Effective merged settings plus raw per-source settings in merge order.")),TQ=q(()=>Y.object({subtype:Y.literal("elicitation"),mcp_server_name:Y.string(),message:Y.string(),mode:Y.enum(["form","url"]).optional(),url:Y.string().optional(),elicitation_id:Y.string().optional(),requested_schema:Y.record(Y.string(),Y.unknown()).optional()}).describe("Requests the SDK consumer to handle an MCP elicitation (user input request).")),o0=q(()=>Y.object({action:Y.enum(["accept","decline","cancel"]),content:Y.record(Y.string(),Y.unknown()).optional()}).describe("Response from the SDK consumer for an elicitation request.")),RQ=q(()=>Y.union([BQ(),LQ(),NQ(),zQ(),qQ(),DQ(),vQ(),AQ(),yQ(),$Q(),UQ(),wQ(),EQ(),jQ(),PQ(),FQ(),MQ(),bQ(),IQ(),CQ(),TQ()])),mZ=q(()=>Y.object({type:Y.literal("control_request"),request_id:Y.string(),request:RQ()})),fQ=q(()=>Y.object({subtype:Y.literal("success"),request_id:Y.string(),response:Y.record(Y.string(),Y.unknown()).optional()})),SQ=q(()=>Y.object({subtype:Y.literal("error"),request_id:Y.string(),error:Y.string(),pending_permission_requests:Y.array(Y.lazy(()=>mZ())).optional()})),s0=q(()=>Y.object({type:Y.literal("control_response"),response:Y.union([fQ(),SQ()])})),hQ=q(()=>Y.object({type:Y.literal("control_cancel_request"),request_id:Y.string()}).describe("Cancels a currently open control request.")),t0=q(()=>Y.object({type:Y.literal("keep_alive")}).describe("Keep-alive message to maintain WebSocket connection.")),kQ=q(()=>Y.object({type:Y.literal("update_environment_variables"),variables:Y.record(Y.string(),Y.string())}).describe("Updates environment variables at runtime.")),IX=q(()=>Y.union([r0(),l0(),a0(),n0(),s0(),mZ(),hQ(),t0()])),CX=q(()=>Y.union([d0(),mZ(),s0(),t0(),kQ()]));lQ();HZ();dQ();lZ();JZ();HZ();EZ();e0();xQ();var xX=q(()=>h.object({tool_name:h.string().describe("The name of the tool requesting permission"),input:h.record(h.string(),h.unknown()).describe("The input for the tool"),tool_use_id:h.string().optional().describe("The unique tool use request ID")})),YY=q(()=>h.enum(["user_temporary","user_permanent","user_reject"]).optional().catch(void 0)),uQ=q(()=>h.object({behavior:h.literal("allow"),updatedInput:h.record(h.string(),h.unknown()),updatedPermissions:h.array(ZY()).optional().catch((Q)=>{I(`Malformed updatedPermissions from SDK host ignored: ${Q.error.issues[0]?.message??"unknown"}`,{level:"warn"});return}),toolUseID:h.string().optional(),decisionClassification:YY()})),pQ=q(()=>h.object({behavior:h.literal("deny"),message:h.string(),interrupt:h.boolean().optional(),toolUseID:h.string().optional(),decisionClassification:YY()})),gZ=q(()=>h.union([uQ(),pQ()]));function jZ(Q,Z,X,V){let W={type:"permissionPromptTool",permissionPromptToolName:Z.name,toolResult:Q};if(Q.behavior==="allow"){let H=Q.updatedPermissions;if(H)V.setAppState((K)=>({...K,toolPermissionContext:yZ(K.toolPermissionContext,H)})),$Z(H);let G=Object.keys(Q.updatedInput).length>0?Q.updatedInput:X;return{...Q,updatedInput:G,decisionReason:W}}else if(Q.behavior==="deny"&&Q.interrupt)I(`SDK permission prompt deny+interrupt: tool=${Z.name} message=${Q.message}`),V.abortController.abort();return{...Q,decisionReason:W}}rQ();gQ();PZ();JZ();aQ();qY();e0();iQ();PZ();nQ();PZ();var cQ=/\u2028|\u2029/g;function mQ(Q){return Q.replace(cQ,(Z)=>Z==="\u2028"?"\\u2028":"\\u2029")}function QY(Q){return mQ(ZZ(Q))}var oQ="SandboxNetworkAccess";function sQ(Q){if(!Q)return;if(Q.type==="classifier")return Q.reason;switch(Q.type){case"rule":case"mode":case"subcommandResults":case"permissionPromptTool":return;case"hook":case"asyncAgent":case"sandboxOverride":case"workingDir":case"safetyCheck":case"other":return Q.reason}}function tQ(Q,Z,X,V){let W;try{W=Q.getActivityDescription?.(Z)??Q.getToolUseSummary?.(Z)??Q.userFacingName(Z)}catch{W=Q.name}return{tool_name:Q.name,action_description:W,tool_use_id:X,request_id:V,input:Z}}var eQ=1000;class Z6{input;replayUserMessages;structuredInput;pendingRequests=new Map;restoredWorkerState=Promise.resolve(null);inputClosed=!1;unexpectedResponseCallback;resolvedToolUseIds=new Set;prependedLines=[];onControlRequestSent;onControlRequestResolved;outbound=new NY;constructor(Q,Z){this.input=Q;this.replayUserMessages=Z;this.input=Q,this.structuredInput=this.read()}trackResolvedToolUseId(Q){if(Q.request.subtype==="can_use_tool"){if(this.resolvedToolUseIds.add(Q.request.tool_use_id),this.resolvedToolUseIds.size>eQ){let Z=this.resolvedToolUseIds.values().next().value;if(Z!==void 0)this.resolvedToolUseIds.delete(Z)}}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(Q){this.prependedLines.push(ZZ({type:"user",session_id:"",message:{role:"user",content:Q},parent_tool_use_id:null})+`
|
|
19
|
-
`)}async*read(){let Q="",Z=async function*(){for(;;){if(this.prependedLines.length>0)Q=this.prependedLines.join("")+Q,this.prependedLines=[];let X=Q.indexOf(`
|
|
20
|
-
`);if(X===-1)break;let V=Q.slice(0,X);Q=Q.slice(X+1);let W=await this.processLine(V);if(W)GY("info","cli_stdin_message_parsed",{type:W.type}),yield W}}.bind(this);yield*Z();for await(let X of this.input)Q+=X,yield*Z();if(Q){let X=await this.processLine(Q);if(X)yield X}this.inputClosed=!0;for(let X of this.pendingRequests.values())X.reject(Error("Tool permission stream closed before response received"))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map((Q)=>Q.request).filter((Q)=>Q.request.subtype==="can_use_tool")}setUnexpectedResponseCallback(Q){this.unexpectedResponseCallback=Q}injectControlResponse(Q){let Z=Q.response?.request_id;if(!Z)return;let X=this.pendingRequests.get(Z);if(!X)return;if(this.trackResolvedToolUseId(X.request),this.pendingRequests.delete(Z),this.write({type:"control_cancel_request",request_id:Z}),Q.response.subtype==="error")X.reject(Error(Q.response.error));else{let V=Q.response.response;if(X.schema)try{X.resolve(X.schema.parse(V))}catch(W){X.reject(W)}else X.resolve({})}}setOnControlRequestSent(Q){this.onControlRequestSent=Q}setOnControlRequestResolved(Q){this.onControlRequestResolved=Q}async processLine(Q){if(!Q)return;try{let Z=DY(WY(Q));if(Z.type==="keep_alive")return;if(Z.type==="update_environment_variables"){let X=Object.keys(Z.variables);for(let[V,W]of Object.entries(Z.variables))process.env[V]=W;I(`[structuredIO] applied update_environment_variables: ${X.join(", ")}`);return}if(Z.type==="control_response"){let X="uuid"in Z&&typeof Z.uuid==="string"?Z.uuid:void 0;if(X)HY(X,"completed");let V=this.pendingRequests.get(Z.response.request_id);if(!V){let G=(Z.response.subtype==="success"?Z.response.response:void 0)?.toolUseID;if(typeof G==="string"&&this.resolvedToolUseIds.has(G)){I(`Ignoring duplicate control_response for already-resolved toolUseID=${G} request_id=${Z.response.request_id}`);return}if(this.unexpectedResponseCallback)await this.unexpectedResponseCallback(Z);return}if(this.trackResolvedToolUseId(V.request),this.pendingRequests.delete(Z.response.request_id),V.request.request.subtype==="can_use_tool"&&this.onControlRequestResolved)this.onControlRequestResolved(Z.response.request_id);if(Z.response.subtype==="error"){V.reject(Error(Z.response.error));return}let W=Z.response.response;if(V.schema)try{V.resolve(V.schema.parse(W))}catch(H){V.reject(H)}else V.resolve({});if(this.replayUserMessages)return Z;return}if(Z.type!=="user"&&Z.type!=="control_request"&&Z.type!=="assistant"&&Z.type!=="system"){I(`Ignoring unknown message type: ${Z.type}`,{level:"warn"});return}if(Z.type==="control_request"){if(!Z.request)XY("Error: Missing request on control_request");return Z}if(Z.type==="assistant"||Z.type==="system")return Z;if(Z.message.role!=="user")XY(`Error: Expected message role 'user', got '${Z.message.role}'`);return Z}catch(Z){console.error(`Error parsing streaming input line: ${Q}: ${Z}`),process.exit(1)}}async write(Q){KY(QY(Q)+`
|
|
21
|
-
`)}async sendRequest(Q,Z,X,V=dZ()){let W={type:"control_request",request_id:V,request:Q};if(this.inputClosed)throw Error("Stream closed");if(X?.aborted)throw Error("Request aborted");if(this.outbound.enqueue(W),Q.subtype==="can_use_tool"&&this.onControlRequestSent)this.onControlRequestSent(W);let H=()=>{this.outbound.enqueue({type:"control_cancel_request",request_id:V});let G=this.pendingRequests.get(V);if(G)this.trackResolvedToolUseId(G.request),G.reject(new VY)};if(X)X.addEventListener("abort",H,{once:!0});try{return await new Promise((G,K)=>{this.pendingRequests.set(V,{request:{type:"control_request",request_id:V,request:Q},resolve:(B)=>{G(B)},reject:K,schema:Z})})}finally{if(X)X.removeEventListener("abort",H);this.pendingRequests.delete(V)}}createCanUseTool(Q){return async(Z,X,V,W,H,G)=>{let K=G??await BY(Z,X,V,W,H);if(K.behavior==="allow"||K.behavior==="deny")return K;let B=new AbortController,z=V.abortController.signal,J=()=>B.abort();z.addEventListener("abort",J,{once:!0});try{let L=Y6(Z.name,H,X,V,K.suggestions).then((P)=>({source:"hook",decision:P})),_=dZ();Q?.(tQ(Z,X,H,_));let w=this.sendRequest({subtype:"can_use_tool",tool_name:Z.name,input:X,permission_suggestions:K.suggestions,blocked_path:K.blockedPath,decision_reason:sQ(K.decisionReason),tool_use_id:H,agent_id:V.agentId},gZ(),B.signal,_).then((P)=>({source:"sdk",result:P})),v=await Promise.race([L,w]);if(v.source==="hook"){if(v.decision)return w.catch(()=>{}),B.abort(),v.decision;let P=await w;return jZ(P.result,Z,X,V)}return jZ(v.result,Z,X,V)}catch(L){return jZ({behavior:"deny",message:`Tool permission request failed: ${L}`,toolUseID:H},Z,X,V)}finally{if(this.getPendingPermissionRequests().length===0)LY("running");z.removeEventListener("abort",J)}}}createHookCallback(Q,Z){return{type:"callback",timeout:Z,callback:async(X,V,W)=>{try{return await this.sendRequest({subtype:"hook_callback",callback_id:Q,input:X,tool_use_id:V||void 0},JY(),W)}catch(H){return console.error(`Error in hook callback ${Q}:`,H),{}}}}}async handleElicitation(Q,Z,X,V,W,H,G){try{return await this.sendRequest({subtype:"elicitation",mcp_server_name:Q,message:Z,mode:W,url:H,elicitation_id:G,requested_schema:X},o0(),V)}catch{return{action:"cancel"}}}createSandboxAskCallback(){return async(Q)=>{try{return(await this.sendRequest({subtype:"can_use_tool",tool_name:oQ,input:{host:Q.host},tool_use_id:dZ(),description:`Allow network connection to ${Q.host}?`},gZ())).behavior==="allow"}catch{return!1}}}async sendMcpMessage(Q,Z){return(await this.sendRequest({subtype:"mcp_message",server_name:Q,message:Z},Y.object({mcp_response:Y.any()}))).mcp_response}}function XY(Q){console.error(Q),process.exit(1)}async function Y6(Q,Z,X,V,W){let G=V.getAppState().toolPermissionContext.mode,K=zY(Q,Z,X,V,G,W,V.abortController.signal);for await(let B of K)if(B.permissionRequestResult&&(B.permissionRequestResult.behavior==="allow"||B.permissionRequestResult.behavior==="deny")){let z=B.permissionRequestResult;if(z.behavior==="allow"){let J=z.updatedInput||X,L=z.updatedPermissions??[];if(L.length>0){$Z(L);let _=V.getAppState(),w=yZ(_.toolPermissionContext,L);V.setAppState((v)=>{if(v.toolPermissionContext===w)return v;return{...v,toolPermissionContext:w}})}return{behavior:"allow",updatedInput:J,userModified:!1,decisionReason:{type:"hook",hookName:"PermissionRequest"}}}else return{behavior:"deny",message:z.message||"Permission denied by PermissionRequest hook",decisionReason:{type:"hook",hookName:"PermissionRequest"}}}return}_Y();function HV(Q){if(Q.type!=="user")return;let Z=Q.message?.content;if(!Z)return;if(Array.isArray(Z)&&Z.length===0)return;let X="uuid"in Q&&typeof Q.uuid==="string"?Q.uuid:void 0;return{content:Array.isArray(Z)?Q6(Z):Z,uuid:X}}function Q6(Q){if(!Q.some(vY))return Q;return Q.map((Z)=>{if(!vY(Z))return Z;let X=Z.source,V=typeof X.mediaType==="string"&&X.mediaType?X.mediaType:AY(Z.source.data);return{...Z,source:{type:"base64",media_type:V,data:Z.source.data}}})}function vY(Q){if(Q.type!=="image"||Q.source?.type!=="base64")return!1;return!Q.source.media_type}BZ();J6();V6();G6();X6();K6();W6();import{randomUUID as H6}from"crypto";function N6(Q){return Q===wY?EY:Q}function OV(Q){let X=yY()?.outputStyle??PY,V={type:"system",subtype:"init",cwd:UY(),session_id:NZ(),tools:Q.tools.map((W)=>N6(W.name)),mcp_servers:Q.mcpClients.map((W)=>({name:W.name,status:W.type})),model:Q.model,permissionMode:Q.permissionMode,slash_commands:Q.commands.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),apiKeySource:jY().source,betas:OY(),claude_code_version:"99.0.0",output_style:X,agents:Q.agents.map((W)=>W.agentType),skills:Q.skills.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),plugins:Q.plugins.map((W)=>({name:W.name,path:W.path,source:W.source})),uuid:H6()};return V.fast_mode_state=$Y(Q.model,Q.fastMode),V}var FY={"`":"`",'"':'"',"<":">","{":"}","[":"]","(":")","'":"'"};function B6(Q,Z){if(!new RegExp(Z,"i").test(Q))return[];if(Q.startsWith("/"))return[];let V=[],W=null,H=0,G=(J)=>!!J&&/[\p{L}\p{N}_]/u.test(J);for(let J=0;J<Q.length;J++){let L=Q[J];if(W){if(W==="["&&L==="["){H=J;continue}if(L!==FY[W])continue;if(W==="'"&&G(Q[J+1]))continue;V.push({start:H,end:J+1}),W=null}else if(L==="<"&&J+1<Q.length&&/[a-zA-Z/]/.test(Q[J+1])||L==="'"&&!G(Q[J-1])||L!=="<"&&L!=="'"&&L in FY)W=L,H=J}let K=[],B=new RegExp(`\\b${Z}\\b`,"gi"),z=Q.matchAll(B);for(let J of z){if(J.index===void 0)continue;let L=J.index,_=L+J[0].length;if(V.some((P)=>L>=P.start&&L<P.end))continue;let w=Q[L-1],v=Q[_];if(w==="/"||w==="\\"||w==="-")continue;if(v==="/"||v==="\\"||v==="-"||v==="?")continue;if(v==="."&&G(Q[_+1]))continue;K.push({word:J[0],start:L,end:_})}return K}function wV(Q){return B6(Q,"ultrareview")}UZ();wZ();w6();_6();O6();v6();qY();_Y();D6();wZ();U6();A6();import{randomUUID as E6}from"crypto";BZ();UZ();wZ();L6();z6();import{randomUUID as q6}from"crypto";function MY(Q){let Z=Q.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(Z)}function bY(Q){let Z=Q.toLowerCase().trim();if(Z==="continue")return!0;return/\b(keep going|go on)\b/.test(Z)}function fY(Q,Z,X,V,W,H,G){let K=q6();IY(K);let B=typeof Q==="string"?Q:Q.find((w)=>w.type==="text")?.text||"";RY(B);let z=typeof Q==="string"?Q:Q.findLast((w)=>w.type==="text")?.text||"";if(z)TY("user_prompt",{prompt_length:String(z.length),prompt:CY(z),"prompt.id":K});let J=MY(B),L=bY(B);if(g("tengu_input_prompt",{is_negative:J,is_keep_going:L}),Z.length>0){let w=typeof Q==="string"?Q.trim()?[{type:"text",text:Q}]:[]:Q;return{messages:[s({content:[...w,...Z],uuid:W,imagePasteIds:X.length>0?X:void 0,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}return{messages:[s({content:Q,uuid:W,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}async function iV({input:Q,preExpansionInput:Z,mode:X,setToolJSX:V,context:W,pastedContents:H,ideSelection:G,messages:K,setUserInputOnProcessing:B,uuid:z,isAlreadyProcessing:J,querySource:L,canUseTool:_,skipSlashCommands:w,bridgeOrigin:v,isMeta:P,skipAttachments:f}){let D=typeof Q==="string"?Q:null;if(X==="prompt"&&D!==null&&!P)B?.(D);n("query_process_user_input_base_start");let F=W.getAppState(),y=await y6(Q,X,V,W,H,G,K,z,J,L,_,F.toolPermissionContext.mode,w,v,P,f,Z);if(n("query_process_user_input_base_end"),!y.shouldQuery)return y;n("query_hooks_start");let S=hY(Q)||"";for await(let O of iY(S,F.toolPermissionContext.mode,W,W.requestPrompt)){if(O.message?.type==="progress")continue;if(O.blockingError){let $=rY(O.blockingError);return{messages:[gY(`${$}
|
|
22
|
-
|
|
23
|
-
Original prompt: ${Q}`,"warning")],shouldQuery:!1,allowedTools:y.allowedTools}}if(O.preventContinuation){let $=O.stopReason?`Operation stopped by hook: ${O.stopReason}`:"Operation stopped by hook";return y.messages.push(s({content:$})),y.shouldQuery=!1,y}if(O.additionalContexts&&O.additionalContexts.length>0)y.messages.push(kY({type:"hook_additional_context",content:O.additionalContexts.map(SY),hookName:"UserPromptSubmit",toolUseID:`hook-${E6()}`,hookEvent:"UserPromptSubmit"}));if(O.message)switch(O.message.attachment.type){case"hook_success":if(!O.message.attachment.content)break;y.messages.push({...O.message,attachment:{...O.message.attachment,content:SY(O.message.attachment.content)}});break;default:y.messages.push(O.message);break}}return n("query_hooks_end"),y}var aZ=1e4;function SY(Q){if(Q.length>aZ)return`${Q.substring(0,aZ)}… [output truncated - exceeded ${aZ} characters]`;return Q}async function y6(Q,Z,X,V,W,H,G,K,B,z,J,L,_,w,v,P,f){let D=null,F=[],y=[],S=Q;if(typeof Q==="string")D=Q;else if(Q.length>0){n("query_image_processing_start");let A=[];for(let N of Q)if(N.type==="image"){let u=await iZ(N);if(u.dimensions){let l=FZ(u.dimensions);if(l)y.push(l)}A.push(u.block)}else A.push(N);S=A,n("query_image_processing_end");let j=A[A.length-1];if(j?.type==="text")D=j.text,F=A.slice(0,-1);else F=A}if(D===null&&Z!=="prompt")throw Error(`Mode: ${Z} requires a string input.`);let O=W?Object.values(W).filter(cY):[],$=O.map((A)=>A.id),d=W?await xY(W):new Map;n("query_pasted_image_processing_start");let i=await Promise.all(O.map(async(A)=>{let j={type:"image",source:{type:"base64",media_type:A.mediaType||"image/png",data:A.content}};return g("tengu_pasted_image_resize_attempt",{original_size_bytes:A.content.length}),{resized:await iZ(j),originalDimensions:A.dimensions,sourcePath:A.sourcePath??d.get(A.id)}})),o=[];for(let{resized:A,originalDimensions:j,sourcePath:N}of i){if(A.dimensions){let u=FZ(A.dimensions,N);if(u)y.push(u)}else if(j){let u=FZ(j,N);if(u)y.push(u)}else if(N)y.push(`[Image source: ${N}]`);o.push(A.block)}n("query_pasted_image_processing_end");let C=_;if(w&&D!==null&&D.startsWith("/")){let A=pY(D),j=A?nY(A.commandName,V.options.commands):void 0;if(j)if(aY(j))C=!1;else{let N=`/${lY(j)} isn't available over Remote Control.`;return{messages:[s({content:D,uuid:K}),dY(`<local-command-stdout>${N}</local-command-stdout>`)],shouldQuery:!1,resultText:N}}}let k=!P&&D!==null&&(Z!=="prompt"||C||!D.startsWith("/"));n("query_attachment_loading_start");let x=k?await uY(mY(D,V,H??null,[],G,z)):[];if(n("query_attachment_loading_end"),D!==null&&Z==="bash"){let{processBashCommand:A}=await import("./processBashCommand-1.1.5-kbtffj67.mjs");return nZ(await A(D,F,x,V,X),y)}if(D!==null&&!C&&D.startsWith("/")){let{processSlashCommand:A}=await import("./processSlashCommand-1.1.5-e9gs2skb.mjs"),j=await A(D,F,o,x,V,X,K,B,J);return nZ(j,y)}if(D!==null&&Z==="prompt"){let A=D.trim(),j=x.find((N)=>N.attachment.type==="agent_mention");if(j){let N=`@agent-${j.attachment.agentType}`,u=A===N,l=A.startsWith(N)&&!u;g("tengu_subagent_at_mention",{is_subagent_only:u,is_prefix:l})}}return nZ(fY(S,o,$,x,K,L,v),y)}function nZ(Q,Z){if(Z.length>0)Q.messages.push(s({content:Z.map((X)=>({type:"text",text:X})),isMeta:!0}));return Q}i6();BZ();HZ();lZ();n6();a6();w0();o6();r6();import{isAbsolute as s6,resolve as t6}from"path";function e6(Q,Z,X){let V=[],W=[],H=[];for(let[G,K]of Object.entries(Q)){let B=Z[G],z=b9(K.source,X?.projectRoot);if(!B)V.push(G);else if(K.sourceIsFallback)H.push(G);else if(!j9(z,B.source))W.push({name:G,declaredSource:z,materializedSource:B.source});else H.push(G)}return{missing:V,sourceChanged:W,upToDate:H}}async function IW(Q){let Z=P9();if(Object.keys(Z).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let X;try{X=await F9()}catch(J){e(J),X={}}let V=e6(Z,X,{projectRoot:W0()}),W=[...V.missing.map((J)=>({name:J,source:b9(Z[J].source),action:"install"})),...V.sourceChanged.map(({name:J,declaredSource:L})=>({name:J,source:L,action:"update"}))],H=[],G=[];for(let J of W){if(Q?.skip?.(J.name,J.source)){H.push(J.name);continue}if(J.action==="update"&&$9(J.source)&&!await y9(J.source.path)){I(`[reconcile] '${J.name}' declared path does not exist; keeping materialized entry`),H.push(J.name);continue}G.push(J)}if(G.length===0)return{installed:[],updated:[],failed:[],upToDate:V.upToDate,skipped:H};I(`[reconcile] ${G.length} marketplace(s): ${G.map((J)=>`${J.name}(${J.action})`).join(", ")}`);let K=[],B=[],z=[];for(let J=0;J<G.length;J++){let{name:L,source:_,action:w}=G[J];Q?.onProgress?.({type:"installing",name:L,action:w,index:J+1,total:G.length});try{let v=await M9(_);if(w==="install")K.push(L);else B.push(L);Q?.onProgress?.({type:"installed",name:L,alreadyMaterialized:v.alreadyMaterialized})}catch(v){let P=w9(v);z.push({name:L,error:P}),Q?.onProgress?.({type:"failed",name:L,error:P}),e(v)}}return{installed:K,updated:B,failed:z,upToDate:V.upToDate,skipped:H}}function b9(Q,Z){if((Q.source==="directory"||Q.source==="file")&&!s6(Q.path)){let X=Z??W0(),V=E9(X);return{...Q,path:t6(V??X,Q.path)}}return Q}
|
|
24
|
-
export{HV as la,N6 as ma,OV as na,e9 as oa,S0 as pa,VQ as qa,WQ as ra,KQ as sa,wV as ta,iV as ua,gZ as va,jZ as wa,QY as xa,oQ as ya,Z6 as za,e6 as Aa,IW as Ba,M6 as Ca,b6 as Da,I6 as Ea,g6 as Fa,d6 as Ga,l6 as Ha};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Qi as J,Si as K,Ti as M}from"./cli-1.1.5-2qf8qy7f.mjs";import{DZ as P,H1 as X}from"./cli-1.1.5-9q40r2jj.mjs";import{q4 as q}from"./cli-1.1.5-0a8jb3pr.mjs";import{r4 as N}from"./cli-1.1.5-43y030nv.mjs";import{Xea as H,qfa as Z}from"./cli-1.1.5-v9a6fbsq.mjs";import{tha as Y}from"./cli-1.1.5-3xf010sx.mjs";import{zja as V}from"./cli-1.1.5-zqf5btpq.mjs";import{Esa as z,Isa as Q}from"./cli-1.1.5-keef1hq8.mjs";function B(){let k=J();if(!k||!k.available||k.granted)return!1;return K(k)!==null}function c(){if(!B())return!1;let k=H();if(k.hasVisitedExtraUsage)return!1;if((k.overageCreditUpsellSeenCount??0)>=A)return!1;return!0}var R,y,A=3;var D=Q(()=>{X();V();M();Z();Y();q();R=z(P(),1),y=z(N(),1)});
|
|
2
|
-
export{c as Xg,D as Yg};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$h as j,bi as l}from"./cli-1.1.5-jq32vtrb.mjs";import{li as W,ri as i}from"./cli-1.1.5-djfg6qcy.mjs";import{$O as o,BO as n,GQ as s,Lx as U,Mx as m,WT as G,Xw as B,Yj as Z,Zj as P,_O as b,aj as Y,aw as $,ax as p,bj as A,bw as D,dx as N,eD as L,ex as g,fD as h,hU as r,iU as R,jC as d,jU as f,kU as F,lU as u,mU as t,nC as E,oC as C,wQ as x,wv as _,wz as V,yz as S,zO as M}from"./cli-1.1.5-bcgy5mbp.mjs";import{o_ as Q,u_ as k}from"./cli-1.1.5-e51n4cww.mjs";import{Aaa as X,Baa as v,Z_ as O,e$ as I}from"./cli-1.1.5-v9a6fbsq.mjs";import{Aqa as K,Zqa as T,oqa as J}from"./cli-1.1.5-0gd61h7z.mjs";import{Isa as y,Jsa as w}from"./cli-1.1.5-keef1hq8.mjs";function Mq(H=new Set){let z=H.size>0;if(u.cache.clear?.(),F.cache.clear?.(),f.cache.clear?.(),Y.cache.clear?.(),W(),x(),!z)N();if(R(null),K(null),b(),_(),G("session_start"),V(),X.clear(),Z(),!z)B();if(Q(),M(),!z)U();J(H),O(),L(),$(),j(),E(),import("./utils-1.1.5-1fxys2da.mjs").then(({clearWebFetchCache:q})=>q()),import("./ToolSearchTool-1.1.5-vwdgwpbq.mjs").then(({clearToolSearchDescriptionCache:q})=>q()),import("./loadAgentsDir-1.1.5-x8j4b3r6.mjs").then(({clearAgentDefinitionsCache:q})=>q()),import("./prompt-1.1.5-nze4mgb1.mjs").then(({clearPromptCache:q})=>q())}var c=y(()=>{T();s();A();t();i();p();m();g();P();o();D();l();h();d();n();r();k();I();v();S();C()});
|
|
2
|
-
export{Mq as Zh,c as _h};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Xea as P,qfa as y}from"./cli-1.1.5-v9a6fbsq.mjs";import{Isa as U}from"./cli-1.1.5-keef1hq8.mjs";var j,D,G,M,N,Y,C,_,R,f,E,I,k,A,b,h,m,p,u,T,w,L,O,X,$,e;var W=U(()=>{j=["common","uncommon","rare","epic","legendary"],D=String.fromCharCode,G=D(100,117,99,107),M=D(103,111,111,115,101),N=D(98,108,111,98),Y=D(99,97,116),C=D(100,114,97,103,111,110),_=D(111,99,116,111,112,117,115),R=D(111,119,108),f=D(112,101,110,103,117,105,110),E=D(116,117,114,116,108,101),I=D(115,110,97,105,108),k=D(103,104,111,115,116),A=D(97,120,111,108,111,116,108),b=D(99,97,112,121,98,97,114,97),h=D(99,97,99,116,117,115),m=D(114,111,98,111,116),p=D(114,97,98,98,105,116),u=D(109,117,115,104,114,111,111,109),T=D(99,104,111,110,107),w=[G,M,N,Y,C,_,R,f,E,I,k,A,b,h,m,p,u,T],L=["·","✦","×","◉","@","°"],O=["none","crown","tophat","propeller","halo","wizard","beanie","tinyduck"],X=["DEBUGGING","PATIENCE","CHAOS","WISDOM","SNARK"],$={common:60,uncommon:25,rare:10,epic:4,legendary:1},e={common:"inactive",uncommon:"success",rare:"permission",epic:"autoAccept",legendary:"warning"}});function v(q){let z=q>>>0;return function(){z|=0,z=z+1831565813|0;let B=Math.imul(z^z>>>15,1|z);return B=B+Math.imul(B^B>>>7,61|B)^B,((B^B>>>14)>>>0)/4294967296}}function F(q){if(typeof Bun<"u")return Number(BigInt(Bun.hash(q))&0xffffffffn);let z=2166136261;for(let B=0;B<q.length;B++)z^=q.charCodeAt(B),z=Math.imul(z,16777619);return z>>>0}function K(q,z){return z[Math.floor(q()*z.length)]}function S(q){let z=Object.values($).reduce((J,Q)=>J+Q,0),B=q()*z;for(let J of j)if(B-=$[J],B<0)return J;return"common"}function i(q,z){let B=d[z],J=K(q,X),Q=K(q,X);while(Q===J)Q=K(q,X);let Z={};for(let V of X)if(V===J)Z[V]=Math.min(100,B+50+Math.floor(q()*30));else if(V===Q)Z[V]=Math.max(1,B-10+Math.floor(q()*15));else Z[V]=B+Math.floor(q()*40);return Z}function H(q){let z=S(q);return{bones:{rarity:z,species:K(q,w),eye:K(q,L),hat:z==="common"?"none":K(q,O),shiny:q()<0.01,stats:i(q,z)},inspirationSeed:Math.floor(q()*1e9)}}function l(q){let z=q+c;if(x?.key===z)return x.value;let B=H(v(F(z)));return x={key:z,value:B},B}function a(q){return H(v(F(q)))}function s(){let q=P();return q.oauthAccount?.accountUuid??q.userID??"anon"}function r(){let q=P().companion;if(!q)return;let{bones:z}=l(s());return{...q,...z}}var d,c="friend-2026-401",x;var g=U(()=>{y();W();d={common:5,uncommon:15,rare:25,epic:35,legendary:50}});
|
|
2
|
-
export{G as kX,M as lX,N as mX,Y as nX,C as oX,_ as pX,R as qX,f as rX,E as sX,I as tX,k as uX,A as vX,b as wX,h as xX,m as yX,p as zX,u as AX,T as BX,e as CX,W as DX,a as EX,s as FX,r as GX,g as HX};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{Wb as d}from"./cli-1.1.5-4gt9am76.mjs";import{IW as y,JW as U,LW as f,MW as h,NW as c,SW as i}from"./cli-1.1.5-97sv1sx5.mjs";import{A4 as b,y4 as O}from"./cli-1.1.5-ttm2crpm.mjs";import{W7 as B,X7 as M}from"./cli-1.1.5-y39w08qk.mjs";import{n9 as I,u9 as u}from"./cli-1.1.5-dvzmss5c.mjs";import{P_ as V,R_ as v}from"./cli-1.1.5-v9a6fbsq.mjs";import{Cka as D,cka as H,dka as m,hka as T,zka as G}from"./cli-1.1.5-3zc9bseg.mjs";import{Zka as q,_ka as S,ela as F}from"./cli-1.1.5-xd8qwq5t.mjs";import{Tra as p,jsa as s}from"./cli-1.1.5-xzxcvrkj.mjs";import{randomUUID as N}from"crypto";D();v();F();u();i();f();M();b();T();class j extends Error{retryAfterMs;constructor(J,K){super(J);this.retryAfterMs=K}}class R{pending=[];pendingAtClose=0;draining=!1;closed=!1;backpressureResolvers=[];sleepResolve=null;flushResolvers=[];droppedBatches=0;config;constructor(J){this.config=J}get droppedBatchCount(){return this.droppedBatches}get pendingCount(){return this.closed?this.pendingAtClose:this.pending.length}async enqueue(J){if(this.closed)return;let K=Array.isArray(J)?J:[J];if(K.length===0)return;while(this.pending.length+K.length>this.config.maxQueueSize&&!this.closed)await new Promise((W)=>{this.backpressureResolvers.push(W)});if(this.closed)return;this.pending.push(...K),this.drain()}flush(){if(this.pending.length===0&&!this.draining)return Promise.resolve();return this.drain(),new Promise((J)=>{this.flushResolvers.push(J)})}close(){if(this.closed)return;this.closed=!0,this.pendingAtClose=this.pending.length,this.pending=[],this.sleepResolve?.(),this.sleepResolve=null;for(let J of this.backpressureResolvers)J();this.backpressureResolvers=[];for(let J of this.flushResolvers)J();this.flushResolvers=[]}async drain(){if(this.draining||this.closed)return;this.draining=!0;let J=0;try{while(this.pending.length>0&&!this.closed){let K=this.takeBatch();if(K.length===0)continue;try{await this.config.send(K),J=0}catch(W){if(J++,this.config.maxConsecutiveFailures!==void 0&&J>=this.config.maxConsecutiveFailures){this.droppedBatches++,this.config.onBatchDropped?.(K.length,J),J=0,this.releaseBackpressure();continue}this.pending=K.concat(this.pending);let Z=W instanceof j?W.retryAfterMs:void 0;await this.sleep(this.retryDelay(J,Z));continue}this.releaseBackpressure()}}finally{if(this.draining=!1,this.pending.length===0){for(let K of this.flushResolvers)K();this.flushResolvers=[]}}}takeBatch(){let{maxBatchSize:J,maxBatchBytes:K}=this.config;if(K===void 0)return this.pending.splice(0,J);let W=0,Z=0;while(Z<this.pending.length&&Z<J){let Q;try{Q=Buffer.byteLength(H(this.pending[Z]))}catch{this.pending.splice(Z,1);continue}if(Z>0&&W+Q>K)break;W+=Q,Z++}return this.pending.splice(0,Z)}retryDelay(J,K){let W=Math.random()*this.config.jitterMs;if(K!==void 0)return Math.max(this.config.baseDelayMs,Math.min(K,this.config.maxDelayMs))+W;return Math.min(this.config.baseDelayMs*2**(J-1),this.config.maxDelayMs)+W}releaseBackpressure(){let J=this.backpressureResolvers;this.backpressureResolvers=[];for(let K of J)K()}sleep(J){return new Promise((K)=>{this.sleepResolve=K,setTimeout((W,Z)=>{W.sleepResolve=null,Z()},J,this,K)})}}M();class A{inflight=null;pending=null;closed=!1;config;constructor(J){this.config=J}enqueue(J){if(this.closed)return;this.pending=this.pending?P(this.pending,J):J,this.drain()}close(){this.closed=!0,this.pending=null}async drain(){if(this.inflight||this.closed)return;if(!this.pending)return;let J=this.pending;this.pending=null,this.inflight=this.sendWithRetry(J).then(()=>{if(this.inflight=null,this.pending&&!this.closed)this.drain()})}async sendWithRetry(J){let K=J,W=0;while(!this.closed){if(await this.config.send(K))return;if(W++,await B(this.retryDelay(W)),this.pending&&!this.closed)K=P(K,this.pending),this.pending=null}}retryDelay(J){let K=Math.min(this.config.baseDelayMs*2**(J-1),this.config.maxDelayMs),W=Math.random()*this.config.jitterMs;return K+W}}function P(J,K){let W={...J};for(let[Z,Q]of Object.entries(K))if((Z==="external_metadata"||Z==="internal_metadata")&&W[Z]&&typeof W[Z]==="object"&&typeof Q==="object"&&Q!==null)W[Z]={...W[Z],...Q};else W[Z]=Q;return W}var g=20000,n=100;function E(){return!0}class k extends Error{reason;constructor(J){super(`CCRClient init failed: ${J}`);this.reason=J}}var l=10;function o(){return{byMessage:new Map,scopeToMessage:new Map}}function C(J){return`${J.session_id}:${J.parent_tool_use_id??""}`}function r(J,K){let W=[],Z=new Map;for(let Q of J)switch(Q.event.type){case"message_start":{let $=Q.event.message.id,z=K.scopeToMessage.get(C(Q));if(z)K.byMessage.delete(z);K.scopeToMessage.set(C(Q),$),K.byMessage.set($,[]),W.push(Q);break}case"content_block_delta":{if(Q.event.delta.type!=="text_delta"){W.push(Q);break}let $=K.scopeToMessage.get(C(Q)),z=$?K.byMessage.get($):void 0;if(!z){W.push(Q);break}let L=z[Q.event.index]??=[];L.push(Q.event.delta.text);let Y=Z.get(L);if(Y){Y.event.delta.text=L.join("");break}let X={type:"stream_event",uuid:Q.uuid,session_id:Q.session_id,parent_tool_use_id:Q.parent_tool_use_id,event:{type:"content_block_delta",index:Q.event.index,delta:{type:"text_delta",text:L.join("")}}};Z.set(L,X),W.push(X);break}default:W.push(Q)}return W}function t(J,K){J.byMessage.delete(K.message.id);let W=C(K);if(J.scopeToMessage.get(W)===K.message.id)J.scopeToMessage.delete(W)}class a{workerEpoch=0;heartbeatIntervalMs;heartbeatJitterFraction;heartbeatTimer=null;heartbeatInFlight=!1;closed=!1;consecutiveAuthFailures=0;currentState=null;sessionBaseUrl;sessionId;http=I({keepAlive:!0});streamEventBuffer=[];streamEventTimer=null;streamTextAccumulator=o();workerState;eventUploader;internalEventUploader;deliveryUploader;onEpochMismatch;getAuthHeaders;constructor(J,K,W){if(this.onEpochMismatch=W?.onEpochMismatch??(()=>{process.exit(1)}),this.heartbeatIntervalMs=W?.heartbeatIntervalMs??g,this.heartbeatJitterFraction=W?.heartbeatJitterFraction??0,this.getAuthHeaders=W?.getAuthHeaders??U,K.protocol!=="http:"&&K.protocol!=="https:")throw Error(`CCRClient: Expected http(s) URL, got ${K.protocol}`);let Z=K.pathname.replace(/\/$/,"");this.sessionBaseUrl=`${K.protocol}//${K.host}${Z}`,this.sessionId=Z.split("/").pop()||"",this.workerState=new A({send:(Q)=>this.request("put","/worker",{worker_epoch:this.workerEpoch,...Q},"PUT worker").then(($)=>$.ok),baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.eventUploader=new R({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:1e5,send:async(Q)=>{let $=await this.request("post","/worker/events",{worker_epoch:this.workerEpoch,events:Q},"client events");if(!$.ok)throw new j("client event POST failed",$.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.internalEventUploader=new R({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:200,send:async(Q)=>{let $=await this.request("post","/worker/internal-events",{worker_epoch:this.workerEpoch,events:Q},"internal events");if(!$.ok)throw new j("internal event POST failed",$.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.deliveryUploader=new R({maxBatchSize:64,maxQueueSize:64,send:async(Q)=>{let $=await this.request("post","/worker/events/delivery",{worker_epoch:this.workerEpoch,updates:Q.map((z)=>({event_id:z.eventId,status:z.status}))},"delivery batch");if(!$.ok)throw new j("delivery POST failed",$.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),J.setOnEvent((Q)=>{this.reportDelivery(Q.event_id,"received")})}async initialize(J){let K=Date.now();if(Object.keys(this.getAuthHeaders()).length===0)throw new k("no_auth_headers");if(J===void 0){let z=process.env.CLAUDE_CODE_WORKER_EPOCH;J=z?parseInt(z,10):NaN}if(isNaN(J))throw new k("missing_epoch");this.workerEpoch=J;let W=this.getWorkerState();if(!(await this.request("put","/worker",{worker_status:"idle",worker_epoch:this.workerEpoch,external_metadata:{pending_action:null,task_summary:null}},"PUT worker (init)")).ok)throw new k("worker_register_failed");this.currentState="idle",this.startHeartbeat(),h(()=>{this.writeEvent({type:"keep_alive"})}),G(`CCRClient: initialized, epoch=${this.workerEpoch}`),V("info","cli_worker_lifecycle_initialized",{epoch:this.workerEpoch,duration_ms:Date.now()-K});let{metadata:Q,durationMs:$}=await W;if(!this.closed)V("info","cli_worker_state_restored",{duration_ms:$,had_state:Q!==null});return Q}async getWorkerState(){let J=Date.now(),K=this.getAuthHeaders();if(Object.keys(K).length===0)return{metadata:null,durationMs:0};return{metadata:(await this.getWithRetry(`${this.sessionBaseUrl}/worker`,K,"worker_state"))?.worker?.external_metadata??null,durationMs:Date.now()-J}}async request(J,K,W,Z,{timeout:Q=1e4}={}){let $=this.getAuthHeaders();if(Object.keys($).length===0)return{ok:!1};try{let z=await this.http[J](`${this.sessionBaseUrl}${K}`,W,{headers:{...$,"Content-Type":"application/json","anthropic-version":"2023-06-01","User-Agent":O()},validateStatus:E,timeout:Q});if(z.status>=200&&z.status<300)return this.consecutiveAuthFailures=0,{ok:!0};if(z.status===409)this.handleEpochMismatch();if(z.status===401||z.status===403){let L=y(),Y=L?d(L):null;if(Y!==null&&Y*1000<Date.now())G(`CCRClient: session_token expired (exp=${new Date(Y*1000).toISOString()}) — no refresh was delivered, exiting`,{level:"error"}),V("error","cli_worker_token_expired_no_refresh"),this.onEpochMismatch();if(this.consecutiveAuthFailures++,this.consecutiveAuthFailures>=l)G(`CCRClient: ${this.consecutiveAuthFailures} consecutive auth failures with a valid-looking token — server-side auth unrecoverable, exiting`,{level:"error"}),V("error","cli_worker_auth_failures_exhausted"),this.onEpochMismatch()}if(G(`CCRClient: ${Z} returned ${z.status}`,{level:"warn"}),V("warn","cli_worker_request_failed",{method:J,path:K,status:z.status}),z.status===429){let L=z.headers?.["retry-after"],Y=typeof L==="string"?parseInt(L,10):NaN;if(!isNaN(Y)&&Y>=0)return{ok:!1,retryAfterMs:Y*1000}}return{ok:!1}}catch(z){return G(`CCRClient: ${Z} failed: ${q(z)}`,{level:"warn"}),V("warn","cli_worker_request_error",{method:J,path:K,error_code:S(z)}),{ok:!1}}}reportState(J,K){if(J===this.currentState&&!K)return;this.currentState=J,this.workerState.enqueue({worker_status:J,requires_action_details:K?{tool_name:K.tool_name,action_description:K.action_description,request_id:K.request_id}:null})}reportMetadata(J){this.workerState.enqueue({external_metadata:J})}handleEpochMismatch(){G("CCRClient: Epoch mismatch (409), shutting down",{level:"error"}),V("error","cli_worker_epoch_mismatch"),this.onEpochMismatch()}startHeartbeat(){this.stopHeartbeat();let J=()=>{let W=this.heartbeatIntervalMs*this.heartbeatJitterFraction*(2*Math.random()-1);this.heartbeatTimer=setTimeout(K,this.heartbeatIntervalMs+W)},K=()=>{if(this.sendHeartbeat(),this.heartbeatTimer===null)return;J()};J()}stopHeartbeat(){if(this.heartbeatTimer)clearTimeout(this.heartbeatTimer),this.heartbeatTimer=null}async sendHeartbeat(){if(this.heartbeatInFlight)return;this.heartbeatInFlight=!0;try{if((await this.request("post","/worker/heartbeat",{session_id:this.sessionId,worker_epoch:this.workerEpoch},"Heartbeat",{timeout:5000})).ok)G("CCRClient: Heartbeat sent")}finally{this.heartbeatInFlight=!1}}async writeEvent(J){if(J.type==="stream_event"){if(this.streamEventBuffer.push(J),!this.streamEventTimer)this.streamEventTimer=setTimeout(()=>void this.flushStreamEventBuffer(),n);return}if(await this.flushStreamEventBuffer(),J.type==="assistant")t(this.streamTextAccumulator,J);await this.eventUploader.enqueue(this.toClientEvent(J))}toClientEvent(J){let K=J;return{payload:{...K,uuid:typeof K.uuid==="string"?K.uuid:N()}}}async flushStreamEventBuffer(){if(this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;if(this.streamEventBuffer.length===0)return;let J=this.streamEventBuffer;this.streamEventBuffer=[];let K=r(J,this.streamTextAccumulator);await this.eventUploader.enqueue(K.map((W)=>({payload:W,ephemeral:!0})))}async writeInternalEvent(J,K,{isCompaction:W=!1,agentId:Z}={}){let Q={payload:{type:J,...K,uuid:typeof K.uuid==="string"?K.uuid:N()},...W&&{is_compaction:!0},...Z&&{agent_id:Z}};await this.internalEventUploader.enqueue(Q)}flushInternalEvents(){return this.internalEventUploader.flush()}async flush(){return await this.flushStreamEventBuffer(),this.eventUploader.flush()}async readInternalEvents(){return this.paginatedGet("/worker/internal-events",{},"internal_events")}async readSubagentInternalEvents(){return this.paginatedGet("/worker/internal-events",{subagents:"true"},"subagent_events")}async paginatedGet(J,K,W){let Z=this.getAuthHeaders();if(Object.keys(Z).length===0)return null;let Q=[],$;do{let z=new URL(`${this.sessionBaseUrl}${J}`);for(let[Y,X]of Object.entries(K))z.searchParams.set(Y,X);if($)z.searchParams.set("cursor",$);let L=await this.getWithRetry(z.toString(),Z,W);if(!L)return null;Q.push(...L.data??[]),$=L.next_cursor}while($);return G(`CCRClient: Read ${Q.length} internal events from ${J}${K.subagents?" (subagents)":""}`),Q}async getWithRetry(J,K,W){for(let Z=1;Z<=10;Z++){let Q;try{Q=await this.http.get(J,{headers:{...K,"anthropic-version":"2023-06-01","User-Agent":O()},validateStatus:E,timeout:30000})}catch($){if(G(`CCRClient: GET ${J} failed (attempt ${Z}/10): ${q($)}`,{level:"warn"}),Z<10){let z=Math.min(500*2**(Z-1),30000)+Math.random()*500;await B(z)}continue}if(Q.status>=200&&Q.status<300)return Q.data;if(Q.status===409)this.handleEpochMismatch();if(G(`CCRClient: GET ${J} returned ${Q.status} (attempt ${Z}/10)`,{level:"warn"}),Z<10){let $=Math.min(500*2**(Z-1),30000)+Math.random()*500;await B($)}}return G("CCRClient: GET retries exhausted",{level:"error"}),V("error","cli_worker_get_retries_exhausted",{context:W}),null}reportDelivery(J,K){this.deliveryUploader.enqueue({eventId:J,status:K})}getWorkerEpoch(){return this.workerEpoch}get internalEventsPending(){return this.internalEventUploader.pendingCount}close(){if(this.closed=!0,this.stopHeartbeat(),c(),this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;this.streamEventBuffer=[],this.streamTextAccumulator.byMessage.clear(),this.streamTextAccumulator.scopeToMessage.clear(),this.workerState.close(),this.eventUploader.close(),this.internalEventUploader.close(),this.deliveryUploader.close()}}s();D();v();F();f();M();T();b();var e=1000,JJ=30000,KJ=600000,QJ=45000,WJ=new Set([401,403,404]),x=10,ZJ=500,$J=8000,GJ={stream:!0};function zJ(){return!0}function VJ(J){let K=[],W=0,Z;while((Z=J.indexOf(`
|
|
2
|
-
|
|
3
|
-
`,W))!==-1){let Q=J.slice(W,Z);if(W=Z+2,!Q.trim())continue;let $={},z=!1;for(let L of Q.split(`
|
|
4
|
-
`)){if(L.startsWith(":")){z=!0;continue}let Y=L.indexOf(":");if(Y===-1)continue;let X=L.slice(0,Y),w=L[Y+1]===" "?L.slice(Y+2):L.slice(Y+1);switch(X){case"event":$.event=w;break;case"id":$.id=w;break;case"data":$.data=$.data?$.data+`
|
|
5
|
-
`+w:w;break}}if($.data||z)K.push($)}return{frames:K,remaining:J.slice(W)}}class YJ{url;state="idle";onData;onCloseCallback;onEventCallback;headers;sessionId;refreshHeaders;getAuthHeaders;abortController=null;lastSequenceNum=0;seenSequenceNums=new Set;reconnectAttempts=0;reconnectStartTime=null;reconnectTimer=null;livenessTimer=null;postUrl;constructor(J,K={},W,Z,Q,$){this.url=J;if(this.headers=K,this.sessionId=W,this.refreshHeaders=Z,this.getAuthHeaders=$??U,this.postUrl=LJ(J),Q!==void 0&&Q>0)this.lastSequenceNum=Q;G(`SSETransport: SSE URL = ${J.href}`),G(`SSETransport: POST URL = ${this.postUrl}`),V("info","cli_sse_transport_initialized")}getLastSequenceNum(){return this.lastSequenceNum}async connect(){if(this.state!=="idle"&&this.state!=="reconnecting"){G(`SSETransport: Cannot connect, current state is ${this.state}`,{level:"error"}),V("error","cli_sse_connect_failed");return}this.state="reconnecting";let J=Date.now(),K=new URL(this.url.href);if(this.lastSequenceNum>0)K.searchParams.set("from_sequence_num",String(this.lastSequenceNum));let W=this.getAuthHeaders(),Z={...this.headers,...W,Accept:"text/event-stream","anthropic-version":"2023-06-01","User-Agent":O()};if(W.Cookie)delete Z.Authorization;if(this.lastSequenceNum>0)Z["Last-Event-ID"]=String(this.lastSequenceNum);G(`SSETransport: Opening ${K.href}`),V("info","cli_sse_connect_opening"),this.abortController=new AbortController;try{let Q=await fetch(K.href,{headers:Z,signal:this.abortController.signal});if(!Q.ok){let z=WJ.has(Q.status);if(G(`SSETransport: HTTP ${Q.status}${z?" (permanent)":""}`,{level:"error"}),V("error","cli_sse_connect_http_error",{status:Q.status}),z){this.state="closed",this.onCloseCallback?.(Q.status);return}this.handleConnectionError();return}if(!Q.body){G("SSETransport: No response body"),this.handleConnectionError();return}let $=Date.now()-J;G("SSETransport: Connected"),V("info","cli_sse_connect_connected",{duration_ms:$}),this.state="connected",this.reconnectAttempts=0,this.reconnectStartTime=null,this.resetLivenessTimer(),await this.readStream(Q.body)}catch(Q){if(this.abortController?.signal.aborted)return;G(`SSETransport: Connection error: ${q(Q)}`,{level:"error"}),V("error","cli_sse_connect_error"),this.handleConnectionError()}}async readStream(J){let K=J.getReader(),W=new TextDecoder,Z="";try{while(!0){let{done:Q,value:$}=await K.read();if(Q)break;Z+=W.decode($,GJ);let{frames:z,remaining:L}=VJ(Z);Z=L;for(let Y of z){if(this.resetLivenessTimer(),Y.id){let X=parseInt(Y.id,10);if(!isNaN(X)){if(this.seenSequenceNums.has(X))G(`SSETransport: DUPLICATE frame seq=${X} (lastSequenceNum=${this.lastSequenceNum}, seenCount=${this.seenSequenceNums.size})`,{level:"warn"}),V("warn","cli_sse_duplicate_sequence");else if(this.seenSequenceNums.add(X),this.seenSequenceNums.size>1000){let w=this.lastSequenceNum-200;for(let _ of this.seenSequenceNums)if(_<w)this.seenSequenceNums.delete(_)}if(X>this.lastSequenceNum)this.lastSequenceNum=X}}if(Y.event&&Y.data)this.handleSSEFrame(Y.event,Y.data);else if(Y.data)G("SSETransport: Frame has data: but no event: field — dropped",{level:"warn"}),V("warn","cli_sse_frame_missing_event_field")}}}catch(Q){if(this.abortController?.signal.aborted)return;G(`SSETransport: Stream read error: ${q(Q)}`,{level:"error"}),V("error","cli_sse_stream_read_error")}finally{K.releaseLock()}if(this.state!=="closing"&&this.state!=="closed")G("SSETransport: Stream ended, reconnecting"),this.handleConnectionError()}handleSSEFrame(J,K){if(J!=="client_event"){G(`SSETransport: Unexpected SSE event type '${J}' on worker stream`,{level:"warn"}),V("warn","cli_sse_unexpected_event_type",{event_type:J});return}let W;try{W=m(K)}catch(Q){G(`SSETransport: Failed to parse client_event data: ${q(Q)}`,{level:"error"});return}let Z=W.payload;if(Z&&typeof Z==="object"&&"type"in Z){let Q=this.sessionId?` session=${this.sessionId}`:"";G(`SSETransport: Event seq=${W.sequence_num} event_id=${W.event_id} event_type=${W.event_type} payload_type=${String(Z.type)}${Q}`),V("info","cli_sse_message_received"),this.onData?.(H(Z)+`
|
|
6
|
-
`)}else G(`SSETransport: Ignoring client_event with no type in payload: event_id=${W.event_id}`);this.onEventCallback?.(W)}handleConnectionError(){if(this.clearLivenessTimer(),this.state==="closing"||this.state==="closed")return;this.abortController?.abort(),this.abortController=null;let J=Date.now();if(!this.reconnectStartTime)this.reconnectStartTime=J;let K=J-this.reconnectStartTime;if(K<KJ){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.refreshHeaders){let Q=this.refreshHeaders();Object.assign(this.headers,Q),G("SSETransport: Refreshed headers for reconnect")}this.state="reconnecting",this.reconnectAttempts++;let W=Math.min(e*Math.pow(2,this.reconnectAttempts-1),JJ),Z=Math.max(0,W+W*0.25*(2*Math.random()-1));G(`SSETransport: Reconnecting in ${Math.round(Z)}ms (attempt ${this.reconnectAttempts}, ${Math.round(K/1000)}s elapsed)`),V("error","cli_sse_reconnect_attempt",{reconnectAttempts:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},Z)}else G(`SSETransport: Reconnection time budget exhausted after ${Math.round(K/1000)}s`,{level:"error"}),V("error","cli_sse_reconnect_exhausted",{reconnectAttempts:this.reconnectAttempts,elapsedMs:K}),this.state="closed",this.onCloseCallback?.()}onLivenessTimeout=()=>{this.livenessTimer=null,G("SSETransport: Liveness timeout, reconnecting",{level:"error"}),V("error","cli_sse_liveness_timeout"),this.abortController?.abort(),this.handleConnectionError()};resetLivenessTimer(){this.clearLivenessTimer(),this.livenessTimer=setTimeout(this.onLivenessTimeout,QJ)}clearLivenessTimer(){if(this.livenessTimer)clearTimeout(this.livenessTimer),this.livenessTimer=null}async write(J){let K=this.getAuthHeaders();if(Object.keys(K).length===0){G("SSETransport: No session token available for POST"),V("warn","cli_sse_post_no_token");return}let W={...K,"Content-Type":"application/json","anthropic-version":"2023-06-01","User-Agent":O()};G(`SSETransport: POST body keys=${Object.keys(J).join(",")}`);for(let Z=1;Z<=x;Z++){try{let $=await p.post(this.postUrl,J,{headers:W,validateStatus:zJ});if($.status===200||$.status===201){G(`SSETransport: POST success type=${J.type}`);return}if(G(`SSETransport: POST ${$.status} body=${H($.data).slice(0,200)}`),$.status>=400&&$.status<500&&$.status!==429){G(`SSETransport: POST returned ${$.status} (client error), not retrying`),V("warn","cli_sse_post_client_error",{status:$.status});return}G(`SSETransport: POST returned ${$.status}, attempt ${Z}/${x}`),V("warn","cli_sse_post_retryable_error",{status:$.status,attempt:Z})}catch($){G(`SSETransport: POST error: ${$.message}, attempt ${Z}/${x}`),V("warn","cli_sse_post_network_error",{attempt:Z})}if(Z===x){G(`SSETransport: POST failed after ${x} attempts, continuing`),V("warn","cli_sse_post_retries_exhausted");return}let Q=Math.min(ZJ*Math.pow(2,Z-1),$J);await B(Q)}}isConnectedStatus(){return this.state==="connected"}isClosedStatus(){return this.state==="closed"}setOnData(J){this.onData=J}setOnClose(J){this.onCloseCallback=J}setOnEvent(J){this.onEventCallback=J}close(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;this.clearLivenessTimer(),this.state="closing",this.abortController?.abort(),this.abortController=null}}function LJ(J){let K=J.pathname;if(K.endsWith("/stream"))K=K.slice(0,-7);return`${J.protocol}//${J.host}${K}`}
|
|
7
|
-
export{R as Nb,k as Ob,a as Pb,YJ as Qb};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Hsa as Q,Isa as U}from"./cli-1.1.5-keef1hq8.mjs";var w={};Q(w,{default:()=>x,createSupportsColor:()=>K});import M from"node:process";import V from"node:os";import O from"node:tty";function z(q,B=globalThis.Deno?globalThis.Deno.args:M.argv){let D=q.startsWith("-")?"":q.length===1?"-":"--",E=B.indexOf(D+q),G=B.indexOf("--");return E!==-1&&(G===-1||E<G)}function X(){if(!("FORCE_COLOR"in j))return;if(j.FORCE_COLOR==="true")return 1;if(j.FORCE_COLOR==="false")return 0;if(j.FORCE_COLOR.length===0)return 1;let q=Math.min(Number.parseInt(j.FORCE_COLOR,10),3);if(![0,1,2,3].includes(q))return;return q}function Z(q){if(q===0)return!1;return{level:q,hasBasic:!0,has256:q>=2,has16m:q>=3}}function $(q,{streamIsTTY:B,sniffFlags:D=!0}={}){let E=X();if(E!==void 0)H=E;let G=D?H:E;if(G===0)return 0;if(D){if(z("color=16m")||z("color=full")||z("color=truecolor"))return 3;if(z("color=256"))return 2}if("TF_BUILD"in j&&"AGENT_NAME"in j)return 1;if(q&&!B&&G===void 0)return 0;let J=G||0;if(j.TERM==="dumb")return J;if(M.platform==="win32"){let A=V.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in j){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((A)=>(A in j)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in j))||j.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in j)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(j.TEAMCITY_VERSION)?1:0;if(j.COLORTERM==="truecolor")return 3;if(j.TERM==="xterm-kitty")return 3;if(j.TERM==="xterm-ghostty")return 3;if(j.TERM==="wezterm")return 3;if("TERM_PROGRAM"in j){let A=Number.parseInt((j.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(j.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(j.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(j.TERM))return 1;if("COLORTERM"in j)return 1;return J}function K(q,B={}){let D=$(q,{streamIsTTY:q&&q.isTTY,...B});return Z(D)}var j,H,b,x;var L=U(()=>{({env:j}=M);if(z("no-color")||z("no-colors")||z("color=false")||z("color=never"))H=0;else if(z("color")||z("colors")||z("color=true")||z("color=always"))H=1;b={stdout:K({isTTY:O.isatty(1)}),stderr:K({isTTY:O.isatty(2)})},x=b});
|
|
2
|
-
export{K as psa,w as qsa,L as rsa};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import{Fc as zc,Gc as on}from"./cli-1.1.5-denrjjr8.mjs";import{Hc as Vh,Ic as jt,Jc as Vt,Kc as Oc,Mc as jn}from"./cli-1.1.5-1385z6tg.mjs";import{Nc as ft,Qc as Dn}from"./cli-1.1.5-2evbbg97.mjs";import{$p as Ln,OG as bu,PG as ln,QG as Ou,RG as zu,SG as Ru,Sp as Mu,TG as rn,Tp as Tu,Up as Uu,Vp as Eu,Wp as nc,Xp as Ct,Yp as Xh,Zp as Pu,_p as Bu,aq as Nh,cq as ou,dq as ac,fq as pu,iq as ku,jq as An,jy as bc,kI as eh,kq as Lu,lI as jc,lq as Qu,ly as Pn,mq as Nu,nG as Xt,nI as In,nq as Ju,oG as sh,oI as xn,oq as at,pq as Ah,qq as gn,rq as Jh,sx as Cc,tq as Gu,tx as lc,uq as mc,ux as rc,vr as yc,vx as wc,wq as Su,wr as Un,wx as En,xG as S,yG as Dc,zG as Bn}from"./cli-1.1.5-bcgy5mbp.mjs";import{BY as D,DY as Mn,PY as uc,QY as Tn}from"./cli-1.1.5-bs0hzzxt.mjs";import{H1 as Eh,a1 as F,c1 as y}from"./cli-1.1.5-9q40r2jj.mjs";import{K2 as Ph,L2 as Bh,M2 as Ih,N2 as xh,O2 as Dh,P2 as xc,S2 as jh,W2 as oh,X2 as cc,Y2 as ph}from"./cli-1.1.5-9d2hd2n0.mjs";import{n4 as yt,o4 as n,p4 as z,q4 as Tt}from"./cli-1.1.5-0a8jb3pr.mjs";import{r4 as Qt}from"./cli-1.1.5-43y030nv.mjs";import{O4 as Pt,P4 as qu}from"./cli-1.1.5-6dmtdkjb.mjs";import{_6 as Dt,d5 as Uh,f5 as Ic,r7 as Wn}from"./cli-1.1.5-y39w08qk.mjs";import{$fa as wu,Afa as Jt,Bfa as Fh,Cfa as ut,D_ as qt,Dfa as ct,E_ as Sn,Hfa as nt,Ifa as _h,Kfa as kh,Ofa as Th,Tfa as Oh,Ufa as yu,Vfa as Cu,Wfa as Ut,Xfa as zh,Yfa as lu,Zfa as bh,_fa as ru,aga as Cn,bga as Lh,cga as gu,dga as Qh,fga as Xu,hga as hc,iga as pt,rfa as tc,sfa as $t,tfa as Hn,ufa as ot,vfa as x,xfa as B,yfa as xt,yga as Kn}from"./cli-1.1.5-v9a6fbsq.mjs";import{mla as o,ula as Et}from"./cli-1.1.5-rqw75dc4.mjs";import{Esa as Lt,Fsa as Gn,Isa as I}from"./cli-1.1.5-keef1hq8.mjs";function pc(t,h=Ch,u){let a=x().find((w)=>w.provider==="openai"&&w.extras?.githubToken!==void 0);if(a){if(!ct(a.id,{provider:"openai",name:a.name,baseUrl:u||a.baseUrl,model:a.model||h,apiKey:t,extras:{...a.extras,githubToken:t}}))return{mode:"failed"};return nt(a.id),{mode:"updated"}}if(!ut({provider:"openai",name:"GitHub Copilot",baseUrl:u||oc,model:h,apiKey:t,extras:{githubToken:t}},{makeActive:!0}))return{mode:"failed"};return{mode:"created"}}function vh({onDone:t,onBack:h,onChangeAPIKey:u}){let a=jh()?.trim()?"already-authed":"menu",[C,w]=j.useState(a),[f,A]=j.useState(null),[$,R]=j.useState(""),[X,J]=j.useState(0),[Q,H]=j.useState(null),V=j.useCallback(async(i,Z=Ch,mt,N)=>{let P=oh(i,mt,N?.enterpriseDomain);if(!P.success){A(P.warning??"Could not save token to secure storage."),w("error");return}if(pc(i,Z,N?.baseUrl).mode==="failed"){A("Could not save the GitHub Copilot provider profile."),w("error");return}Uh(),u?.(),t("GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.",{display:"user"})},[u,t]),O=j.useCallback(async(i)=>{w("device-busy"),A(null),H(null);try{let Z=await Bh({domain:i});H({user_code:Z.user_code,verification_uri:Z.verification_uri}),await xh(Z.verification_uri);let mt=await Ih(Z.device_code,{initialInterval:Z.interval,timeoutSeconds:Z.expires_in,domain:i}),N=await Dh(mt,{domain:i});await V(N.token,Ch,mt,{baseUrl:N.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:i})}catch(Z){A(Z instanceof Error?Z.message:String(Z)),w("error")}},[V]);if(C==="already-authed")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot"}),n(y,{children:"You are already signed in to GitHub Copilot."}),n(y,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),n(S,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"back"}],onChange:(Z)=>{if(Z==="sign-in-again"){O();return}if(Z==="enterprise"){w("enterprise-domain");return}if(h){h();return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="enterprise-domain")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Enterprise sign-in"}),n(y,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:">"}),n(Xt,{value:$,onChange:R,onSubmit:()=>{let Z=Ph($);if(!Z){O();return}O(Z)},onExit:()=>w(a),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:X,onChangeCursorOffset:J})]}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(C==="error"&&f)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"red",children:f}),n(S,{options:[{label:h?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(Z)=>{if(Z==="back"){if(h){h();return}w("menu"),A(null);return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="device-busy")return z(F,{flexDirection:"column",gap:1,children:[n(y,{children:"GitHub Copilot sign-in"}),Q?z(yt,{children:[z(y,{children:["Enter code ",n(y,{bold:!0,children:Q.user_code})," at"," ",Q.verification_uri]}),n(y,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):n(y,{dimColor:!0,children:"Requesting device code from GitHub..."}),n(eh,{})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot setup"}),n(y,{dimColor:!0,children:"Stores your token in the OS credential store (macOS Keychain when available) and creates a /provider profile so Copilot is the active provider — no manual env exports required."}),n(S,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(i)=>{if(i==="cancel"){if(h){h();return}t("GitHub onboard cancelled",{display:"system"});return}if(i==="enterprise"){w("enterprise-domain");return}O()}})]})}var j,Ch="github:copilot",oc="https://api.githubcopilot.com";var tu=I(()=>{Dc();jc();sh();Eh();xc();ph();Ic();Th();Tt();j=Lt(Qt(),1)});function uu(t){return[t.name,t.family??"",...t.families??[],t.parameterSize??"",t.quantizationLevel??""].join(" ").toLowerCase()}function Nt(t,h){return h.some((u)=>t.includes(u))}function tn(t){return!Nt(uu(t),hu)}function hn(t){return t.find(tn)??null}function lh(t){let u=`${t.parameterSize??""} ${t.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(u?.[1])return Number(u[1]);if(typeof t.sizeBytes==="number"&&t.sizeBytes>0)return Number((t.sizeBytes/1e9).toFixed(1));return null}function un(t){return(t.quantizationLevel??t.name).toLowerCase()}function cn(t,h,u){if(t===null)return u.push("unknown size"),0;if(h==="latency"){if(t<=4)return u.push("tiny model for low latency"),32;if(t<=8)return u.push("small model for fast responses"),26;if(t<=14)return u.push("mid-sized model with acceptable latency"),16;if(t<=24)return u.push("larger model may be slower"),8;return u.push("large model likely slower locally"),t<=40?0:-8}if(h==="coding"){if(t>=7&&t<=14)return u.push("strong coding size tier"),24;if(t>14&&t<=34)return u.push("large coding-capable size tier"),28;if(t>34)return u.push("very large model with higher quality potential"),18;return u.push("compact model may trade off coding depth"),12}if(t>=7&&t<=14)return u.push("great balanced size tier"),26;if(t>=3&&t<7)return u.push("compact balanced size tier"),18;if(t>14&&t<=24)return u.push("high quality balanced size tier"),20;if(t>24)return u.push("large model for quality-first usage"),10;return u.push("very small model for general usage"),8}function nn(t,h,u){let a=un(t);if(a.includes("q4"))return u.push("efficient Q4 quantization"),h==="latency"?8:4;if(a.includes("q5"))return u.push("balanced Q5 quantization"),h==="latency"?6:5;if(a.includes("q8"))return u.push("higher quality Q8 quantization"),h==="latency"?2:5;return 0}function an(t,h,u){if(h.score!==t.score)return h.score-t.score;let a=lh(t)??Number.POSITIVE_INFINITY,C=lh(h)??Number.POSITIVE_INFINITY;if(u==="latency")return a-C;if(u==="coding")return C-a;let w=14;return Math.abs(a-w)-Math.abs(C-w)}function rh(t,h){return t.map((u)=>{let a=uu(u),C=[],w=0;if(Nt(a,hu))w-=40,C.push("not a chat-first model");if(Nt(a,sc))w+=h==="coding"?24:h==="balanced"?10:4,C.push("coding-oriented model family");if(Nt(a,ec))w+=h==="latency"?4:h==="coding"?6:8,C.push("strong general-purpose model family");if(Nt(a,vc))w+=h==="latency"?2:6,C.push("chat/instruct tuned");if(a.includes("vision")||a.includes("vl"))w-=2,C.push("vision model adds extra overhead");w+=cn(lh(u),h,C),w+=nn(u,h,C);let f=C.slice(0,3).join(", ");return{...u,score:w,reasons:C,summary:f}}).sort((u,a)=>an(u,a,h))}function cu(t,h){return hn(rh(t,h))}var sc,ec,vc,hu;var nu=I(()=>{sc=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],ec=["llama","qwen","mistral","gemma","phi","deepseek"],vc=["instruct","chat","assistant"],hu=["embed","embedding","rerank","bge","whisper"]});function yn(t){let h=t.toLowerCase();return mn.some((u)=>h.includes(u))}function wh(t){try{let h=new URL(t);if(h.username)h.username="redacted";if(h.password)h.password="redacted";for(let u of h.searchParams.keys())if(yn(u))h.searchParams.set(u,"redacted");return h.toString()}catch{return t.replace(/\/\/[^/@\s]+(?::[^/@\s]*)?@/g,"//redacted@").replace(/([?&](?:token|access_token|refresh_token|api_key|apikey|key|password|passwd|pwd|auth|authorization|signature|sig|secret)=)[^&#]*/gi,"$1redacted")}}var mn;var au=I(()=>{mn=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function wn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URL(`${Oh}/oauth/authorize`);return u.searchParams.append("response_type","code"),u.searchParams.append("client_id",zh()),u.searchParams.append("redirect_uri",h),u.searchParams.append("scope",yu),u.searchParams.append("code_challenge",t.codeChallenge),u.searchParams.append("code_challenge_method","S256"),u.searchParams.append("id_token_add_organizations","true"),u.searchParams.append("codex_cli_simplified_flow","true"),u.searchParams.append("state",t.state),u.searchParams.append("originator",Cu),u.toString()}function bn(){return`<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title>Codex Login Complete</title>
|
|
6
|
-
<style>
|
|
7
|
-
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
8
|
-
h1 { margin: 0 0 12px; font-size: 22px; }
|
|
9
|
-
p { margin: 0 0 10px; }
|
|
10
|
-
</style>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<h1>Codex login complete</h1>
|
|
14
|
-
<p>You can return to Claudin now.</p>
|
|
15
|
-
<p>Claudin will finish activating your new Codex OAuth login.</p>
|
|
16
|
-
</body>
|
|
17
|
-
</html>`}function On(t){return`<!doctype html>
|
|
18
|
-
<html lang="en">
|
|
19
|
-
<head>
|
|
20
|
-
<meta charset="utf-8" />
|
|
21
|
-
<title>Codex Login Failed</title>
|
|
22
|
-
<style>
|
|
23
|
-
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
24
|
-
h1 { margin: 0 0 12px; font-size: 22px; color: #991b1b; }
|
|
25
|
-
p { margin: 0 0 10px; }
|
|
26
|
-
</style>
|
|
27
|
-
</head>
|
|
28
|
-
<body>
|
|
29
|
-
<h1>Codex login failed</h1>
|
|
30
|
-
<p>${ru(t)}</p>
|
|
31
|
-
<p>You can close this window and try again in Claudin.</p>
|
|
32
|
-
</body>
|
|
33
|
-
</html>`}function mu(){return`<!doctype html>
|
|
34
|
-
<html lang="en">
|
|
35
|
-
<head>
|
|
36
|
-
<meta charset="utf-8" />
|
|
37
|
-
<title>Codex Login Cancelled</title>
|
|
38
|
-
<style>
|
|
39
|
-
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
40
|
-
h1 { margin: 0 0 12px; font-size: 22px; }
|
|
41
|
-
p { margin: 0 0 10px; }
|
|
42
|
-
</style>
|
|
43
|
-
</head>
|
|
44
|
-
<body>
|
|
45
|
-
<h1>Codex login cancelled</h1>
|
|
46
|
-
<p>You can close this window and retry in Claudin.</p>
|
|
47
|
-
</body>
|
|
48
|
-
</html>`}async function zn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:h,client_id:zh(),code_verifier:t.codeVerifier}),a=await fetch(`${Oh}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u,signal:t.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!a.ok){let R=await a.text().catch(()=>"");throw Error(R.trim()?`Codex OAuth token exchange failed (${a.status}): ${R.trim()}`:`Codex OAuth token exchange failed with status ${a.status}.`)}let C=await a.json(),w=Ut(C.access_token),f=Ut(C.refresh_token);if(!w||!f)throw Error("Codex OAuth completed, but the token response was missing credentials.");let A=Ut(C.id_token);return{apiKey:A?await wu(A).catch(()=>{return}):void 0,accessToken:w,refreshToken:f,idToken:A,accountId:bh(A)??bh(w)}}class Rh{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(t){let h=Ou(),u=lu(),a=new bu("/auth/callback");this.authCodeListener=a,this.port=null;try{let C=await a.start(u);this.port=C;let w=Ru(),f=await zu(h),A=wn({port:C,codeChallenge:f,state:w});try{let $=await a.waitForAuthorization(w,async()=>{await t(A)}),R=new AbortController;this.tokenExchangeAbortController=R;let X;try{X=await zn({authorizationCode:$,codeVerifier:h,port:C,signal:R.signal})}finally{if(this.tokenExchangeAbortController===R)this.tokenExchangeAbortController=null}if(this.authCodeListener!==a)throw this.buildCancellationError();return a.handleSuccessRedirect([],(J)=>{J.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),J.end(bn())}),X}catch($){let R=this.authCodeListener===a?$:this.buildCancellationError();if(a.hasPendingResponse()){let X=R instanceof Error&&R.message==="Codex OAuth flow was cancelled.";a.handleErrorRedirect((J)=>{J.writeHead(X?200:400,{"Content-Type":"text/html; charset=utf-8"}),J.end(X?mu():On(R instanceof Error?R.message:String(R)))})}throw R}finally{this.cleanup()}}catch(C){let w=C instanceof Error?C.message:String(C);if(w.includes("EADDRINUSE")||w.includes(String(u)))throw Error(`Codex OAuth needs localhost:${u} for its callback. Close any app already using that port and try again.`);throw C}}cleanup(){let t=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(t),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((h)=>{h.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),h.end(mu())});this.authCodeListener?.cancelPendingAuthorization(t),this.authCodeListener=null,this.port=null}}var Au=I(()=>{ln();rn();Cn()});function Rn(){return new Rh}function $u(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Rn,a=t.deps?.openBrowser??Pt,C=t.deps?.saveCodexCredentials??gu,w=t.deps?.isBareMode??o,[f,A]=Bt.useState({state:"starting"});return Bt.useEffect(()=>{if(w()){A({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startOAuthFlow(async(X)=>{if($)return;A({state:"waiting",authUrl:X,browserOpened:null});let J=await a(X);if($)return;A({state:"waiting",authUrl:X,browserOpened:J})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=C({apiKey:X.apiKey,accessToken:X.accessToken,refreshToken:X.refreshToken,idToken:X.idToken,accountId:X.accountId,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;A({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,w,h,a,C]),f}var Bt;var fu=I(()=>{Au();qu();Xu();Et();Bt=Lt(Qt(),1)});function du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":ku()}}function _u(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function fn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Fn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Qu,{method:"POST",headers:du(),body:new URLSearchParams({client_id:Ah(),scope:Ju}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`xAI device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=at(C.device_code),f=at(C.user_code),A=at(C.verification_uri);if(!w||!f||!A)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:at(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:Zu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Vu/1000}}async function _n(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??fn,C=h?.now??(()=>Date.now()),w=_u(t.expires_in,Zu),f=C()+w,A=Math.max(_u(t.interval,Vu),Xn);while(C()<f){if(h?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let $=await u(Lu,{method:"POST",headers:du(),body:new URLSearchParams({grant_type:Nu,client_id:Ah(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=at(Q.access_token),V=at(Q.refresh_token);if(!H||!V)throw Error("xAI OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:3600;return{accessToken:H,refreshToken:V,idToken:at(Q.id_token),expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+qn,$n),await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(R.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`xAI device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("xAI device authorization timed out.")}class gh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Fn({signal:h.signal});return await t(u),await _n(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var Vu=5000,Xn=1000,qn=5000,$n=60000,Zu=300000,Fu=3000;var Yu=I(()=>{An();gn()});function kn(){return new gh}function Hu(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??kn,a=t.deps?.saveXaiCredentials??Gu,C=t.deps?.isBareMode??o,[w,f]=It.useState({state:"starting"});return It.useEffect(()=>{if(C()){f({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let A=!1,$=u();return $.startDeviceFlow(async(R)=>{if(A)return;f({state:"waiting",userCode:R.user_code,verificationUri:R.verification_uri,verificationUriComplete:R.verification_uri_complete})}).then(async(R)=>{if(A)return;await h(R,(J)=>{let Q=a({accessToken:R.accessToken,refreshToken:R.refreshToken,idToken:R.idToken,expiresAt:R.expiresAt,profileId:J?.profileId});if(!Q.success)throw Error(Q.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((R)=>{if(A)return;f({state:"error",message:R instanceof Error?R.message:String(R)})}),()=>{A=!0,$.cleanup()}},[u,C,h,a]),w}var It;var Ku=I(()=>{Yu();Et();Su();It=Lt(Qt(),1)});async function Du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":Eu,...await Bu()}}function iu(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function Vn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Zn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Mu,{method:"POST",headers:await Du(),body:new URLSearchParams({client_id:Xh()}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`Kimi device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=Ct(C.device_code),f=Ct(C.user_code),A=Ct(C.verification_uri);if(!w||!f||!A)throw Error("Kimi device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:Ct(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:xu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Iu/1000}}async function dn(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??Vn,C=h?.now??(()=>Date.now()),w=iu(t.expires_in,xu),f=C()+w,A=Math.max(iu(t.interval,Iu),Qn);while(C()<f){if(h?.signal?.aborted)throw Error("Kimi device authorization was cancelled.");let $=await u(Tu,{method:"POST",headers:await Du(),body:new URLSearchParams({grant_type:Uu,client_id:Xh(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=Ct(Q.access_token),V=Ct(Q.refresh_token);if(!H||!V)throw Error("Kimi OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:900;return{accessToken:H,refreshToken:V,expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+Nn,Jn),await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("Kimi device authorization was denied.");if(R.error==="expired_token")throw Error("Kimi device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`Kimi device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("Kimi device authorization timed out.")}class qh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Zn({signal:h.signal});return await t(u),await dn(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("Kimi device authorization was cancelled.")),this.abortController=null}}var Iu=5000,Qn=1000,Nn=5000,Jn=60000,xu=1800000,Wu=3000;var ju=I(()=>{Ln();Pu()});function Yn(){return new qh}function su(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Yn,a=t.deps?.saveKimiCredentials??ou,C=t.deps?.isBareMode??o,[w,f]=lt.useState({state:"starting"}),A=lt.useRef(!1);return lt.useEffect(()=>{if(C()){f({state:"error",message:"Kimi Code OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startDeviceFlow(async(X)=>{if($)return;f({state:"waiting",userCode:X.user_code,verificationUri:X.verification_uri,verificationUriComplete:X.verification_uri_complete})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=a({accessToken:X.accessToken,refreshToken:X.refreshToken,expiresAt:X.expiresAt,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Kimi Code OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;f({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,C,h,a]),lt.useEffect(()=>{if(w.state!=="waiting")return;if(A.current)return;let $=w.verificationUriComplete??w.verificationUri;if(!$)return;A.current=!0,Pt($).catch(()=>{})},[w]),w}var lt;var eu=I(()=>{ju();qu();Et();pu();lt=Lt(Qt(),1)});function ca(t){return{name:t.name,baseUrl:t.baseUrl,model:t.model,apiKey:t.apiKey??""}}function na(t){let h=ot(t);return{name:h.name,baseUrl:h.baseUrl,model:h.model,apiKey:h.apiKey??""}}function aa(t){let h={};for(let u of t.split(/\r?\n/)){let a=u.trim();if(!a)continue;let C=a.indexOf(":");if(C<=0)continue;let w=a.slice(0,C).trim(),f=a.slice(C+1).trim();if(w&&f)h[w]=f}return h}function ma(t){if(!t)return"";return Object.entries(t).map(([h,u])=>`${h}: ${u}`).join(`
|
|
49
|
-
`)}function ya(t,h){let u={},a=t.awsRegion?.trim();if(a)u.awsRegion=a;let C=t.gcpProject?.trim();if(C)u.gcpProject=C;let w=t.gcpRegion?.trim();if(w)u.gcpRegion=w;let f=t.azureResource?.trim();if(f)u.azureResource=f;let A=aa(h);if(Object.keys(A).length>0)u.customHeaders=A;return Object.keys(u).length>0?u:void 0}function la(t,h){let u=h?" (active)":"",a=t.apiKey?"key set":"no key",C=t.provider==="anthropic"?"anthropic":"openai-compatible",w=tc(t.model),f=w.length<=3?w.join(", "):`${w[0]}, ${w[1]} + ${w.length-2} more`;return`${C} · ${t.baseUrl} · ${f} · ${a}${u}`}function ra(t,h){if(t.state==="unreachable")return`Could not reach Atomic Chat at ${wh(h)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(t.state==="no_models")return"Atomic Chat is running, but no models are loaded. Download and load a model inside the Atomic Chat app first, or enter details manually.";return""}function wa(t,h){if(t.state==="unreachable")return`Could not reach Ollama at ${wh(h)}. Start Ollama first, or enter the endpoint manually.`;if(t.state==="no_models")return"Ollama is running, but no installed models were found. Pull a chat model such as qwen2.5-coder:7b or llama3.1:8b first, or enter details manually.";if(t.state==="generation_failed"){let u=t.probeModel??"the selected model",a=t.detail?` Details: ${t.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${u}.${a} Run "ollama run ${u}" once and retry, or enter details manually.`}return""}function fh(t,h){if(!h)return;return t.find((u)=>u.id===h)}function vu(t,h){return Boolean(t&&h&&t.id===h)}function ba(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===Zh&&!u.apiKey)}function Oa(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===pt&&!u.apiKey)}function za(t,h){return t.find((u)=>u.provider==="anthropic"&&u.baseUrl===h&&!u.apiKey)}function Ra({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=$u({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Codex OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Codex OAuth"}),n(y,{children:"Sign in with your ChatGPT account in the browser. Claudin will store the resulting Codex credentials securely and switch this session to the new Codex login when setup completes."}),a.state==="starting"?n(y,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):a.browserOpened===!1?z(yt,{children:[n(y,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),n(y,{children:a.authUrl})]}):a.browserOpened===!0?z(yt,{children:[n(y,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),n(y,{children:a.authUrl})]}):n(y,{dimColor:!0,children:"Opening your browser..."}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Aa({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=Hu({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"xAI OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from xAI..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function ga({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t);let a=su({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Kimi Code OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to Moonshot AI authentication choices"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI · Kimi Code"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from Kimi..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Vm({mode:t,onDone:h}){let u=bc(),[a,C]=g.useState([]),[w,f]=g.useState(),[A,$]=g.useState(),[R,X]=g.useState(!1),[J,Q]=g.useState(),H=g.useRef(0),[V,O]=g.useState(t==="first-run"?"select-preset":"menu"),[wt,i]=g.useState(null),[Z,mt]=g.useState("openai"),[N,P]=g.useState(()=>na("ollama")),[Zt,dt]=g.useState({}),[dh,st]=g.useState(""),[Rc,Ac]=g.useState(0),[gc,Xc]=g.useState(0),[et,Yh]=g.useState(null),[bt,Ft]=g.useState(0),[Ot,p]=g.useState(0),[qc,s]=g.useState(0),[Gh,Y]=g.useState(),[zt,_]=g.useState(),[$c,fc]=g.useState(),[Sh,Yt]=g.useState(!1),[_t,kt]=g.useState(),[e,Gt]=g.useState({state:"idle"}),[v,St]=g.useState({state:"idle"}),[tt,vt]=g.useState({state:"idle"}),[Fc,_c]=g.useState(!0),[kc,E]=g.useState(!1),th=g.useRef(!1),[hh,uh]=g.useState(()=>Vt()),[Hh,Lc]=g.useState(()=>Oc());g.useEffect(()=>{queueMicrotask(()=>{let c=x(),m=B()?.id;C(c),f(m),$(xt()),Q(Fh()),X(Jt()),_c(!1)})},[]);let Rt=rt[Ot]??rt[0],Ht=Rt.key,Qc=N[Ht],ch=a.length>0,Kt=ch,Kh=g.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Copy ~/.claude/ tokens, settings, skills, agents, plugins."}]:[],{value:"activate",label:"Set active provider (Global)",description:J?`Currently: ${a.find((c)=>c.id===J)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!Kt},{value:"activate-project",label:"Set active provider (Project)",description:A?`Currently: ${a.find((c)=>c.id===A)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!Kt},...R?[{value:"clear-project-override",label:"Clear project provider override",description:A?"Stop overriding for this project; fall back to global":"Project override points to a missing profile; clear it"}]:[],{value:"edit",label:"Edit provider",description:"Update URL, model, or key",disabled:!ch},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!Kt},...Sh?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[Kt,ch,Sh,hh,J,A,a]),nh=g.useCallback(()=>{if(o()){H.current+=1,Yt(!1),kt(void 0);return}let c=++H.current;(async()=>{let m=await Lh();if(c!==H.current)return;Yt(Boolean(m?.apiKey||m?.accessToken||m?.refreshToken||m?.idToken)),kt(m?.profileId)})()},[]);g.useEffect(()=>{return nh(),()=>{H.current+=1}},[nh]),g.useEffect(()=>{if(V!=="select-ollama-model")return;let c=!1;return Gt({state:"loading"}),(async()=>{let m=await wc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)Gt({state:"unavailable",message:wa(m,N.baseUrl)});return}let l=rh(m.models,"balanced"),r=cu(m.models,"balanced");if(!c)Gt({state:"ready",defaultValue:r?.name??l[0]?.name,options:l.map((b)=>({label:b.name,value:b.name,description:b.summary}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-atomic-chat-model")return;let c=!1;return St({state:"loading"}),(async()=>{let m=await rc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)St({state:"unavailable",message:ra(m,N.baseUrl)});return}if(!c)St({state:"ready",defaultValue:m.models[0],options:m.models.map((l)=>({label:l,value:l}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-openai-model")return;let c=!1;return vt({state:"loading"}),(async()=>{let m=await Cc({baseUrl:N.baseUrl,apiKey:N.apiKey||void 0});if(c)return;if(!m||m.length===0){vt({state:"unavailable",message:"Couldn't list models from this provider. Enter the model id manually, or go back to check the base URL and API key."});return}let{options:l,defaultValue:r}=lc(m,N.model);vt({state:"ready",options:l,defaultValue:r})})(),()=>{c=!0}},[N.baseUrl,N.apiKey,V]);function K(){if(th.current)return;th.current=!0,queueMicrotask(()=>{let c=x();C(c),f(B()?.id),$(xt()),Q(Fh()),X(Jt()),nh(),th.current=!1})}function At(){return null}function ah(c){if(c.activationWarning)return`${c.prefix}. Saved for next startup. Warning: ${c.warnings.join("; ")}.`;if(c.warnings.length>0)return`${c.prefix}. Claudin switched to it for this session with warnings: ${c.warnings.join("; ")}.`;return`${c.prefix}. Claudin switched to it for this session.`}async function mh(c){if(c?.accessToken&&c.accountId)return null;let m=await Lh();if(!m)return"stored Codex OAuth credentials could not be loaded";if(!m.accountId)return"stored Codex OAuth credentials are missing a ChatGPT account id";return null}function Wh(){yc()}async function Nc(c){let m="provider";E(!0),Y("Activating provider...");try{await new Promise((ht)=>queueMicrotask(ht));let l=Jt(),r=nt(c);if(!r){_("Could not change active provider."),E(!1),L();return}let b=l?B()??r:r,q=$t(b.model)||Dt();if(!l)u((ht)=>({...ht,mainLoopModel:q,mainLoopModelForSession:null}));m=r.name;let k=At(),d=vu(r,_t),T=d?await mh():null;K();let U=l&&b.id!==r.id?` (project override still active — this project keeps using ${b.name}; use "Clear project provider override" to apply the new default here)`:"",W=d?ah({prefix:`Active provider: ${r.name}${U}`,activationWarning:T,warnings:[T,k?`could not clear startup provider override (${k})`:null].filter((ht)=>Boolean(ht))}):k?`Active provider: ${r.name}${U}. Warning: could not clear startup provider override (${k}).`:`Active provider: ${r.name}${U}`;Y(W),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:q,message:`Provider switched to ${r.name} (${q})`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish activating ${m}: ${r}`),L()}}async function Jc(){E(!0),Y("Clearing project provider override...");try{await new Promise((m)=>queueMicrotask(m)),_h(null),K();let c=B();if(c){let m=$t(c.model)||Dt();ft(),u((l)=>({...l,mainLoopModel:m,mainLoopModelForSession:null})),Y(`Project override cleared. Using global default: ${c.name}.`),E(!1),h({action:"activated",activeProfileId:c.id,activeProviderName:c.name,activeProviderModel:m,message:`Project override cleared — using ${c.name} (${m})`}),L()}else Y("Project provider override cleared. No global default set."),E(!1),h({action:"saved",message:"Project provider override cleared. No global default set."}),L()}catch(c){K(),Y(void 0),E(!1);let m=c instanceof Error?c.message:String(c);_(`Could not clear project provider override: ${m}`),L()}}async function Vc(c){let m="provider";E(!0),Y("Setting provider for this project...");try{await new Promise((W)=>queueMicrotask(W));let l=xt(),r=_h(c);if(!r){_("Could not set project provider override."),E(!1),L();return}let b=$t(r.model)||Dt();if(l===r.id)ft();u((W)=>({...W,mainLoopModel:b,mainLoopModelForSession:null})),m=r.name;let q=At(),k=vu(r,_t),d=k?await mh():null;K();let T=`Active provider for this project: ${r.name}. Other projects keep the global default.`,U=k?ah({prefix:T,activationWarning:d,warnings:[d,q?`could not clear startup provider override (${q})`:null].filter((W)=>Boolean(W))}):q?`${T} Warning: could not clear startup provider override (${q}).`:T;Y(U),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:b,message:`Provider switched to ${r.name} (${b}) for this project`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish setting ${m} for this project: ${r}`),L()}}function L(){fc("done"),O("menu")}function Wt(c){h({action:"cancelled",message:c})}function ih(c){let m=ot(c),l={name:m.name,baseUrl:m.baseUrl,model:m.model,apiKey:m.apiKey??""};if(i(null),mt(m.provider??"openai"),P(l),dt({}),st(""),Yh(c),p(0),Ft(0),s(l.name.length),_(void 0),c==="ollama"){Gt({state:"loading"}),O("select-ollama-model");return}if(c==="atomic-chat"){St({state:"loading"}),O("select-atomic-chat-model");return}if(c==="anthropic"){O("anthropic-auth-choice");return}if(c==="bedrock"||c==="vertex"||c==="foundry"){O("cloud-extras");return}O("form")}function Zc(c){let m=a.find((r)=>r.id===c);if(!m)return;let l=ca(m);i(c),mt(m.provider??"openai"),P(l),dt({awsRegion:m.extras?.awsRegion,gcpProject:m.extras?.gcpProject,gcpRegion:m.extras?.gcpRegion,azureResource:m.extras?.azureResource}),st(ma(m.extras?.customHeaders)),Yh(null),p(0),Ft(0),s(l.name.length),_(void 0),O("form")}function it(c=N){let m=ya(Zt,dh),l={provider:Z,name:c.name,baseUrl:c.baseUrl,model:c.model,apiKey:c.apiKey,extras:m},r=wt?ct(wt,l):ut(l,{makeActive:!0});if(!r){_("Could not save provider. Fill all required fields.");return}let b=B()?.id===r.id;if(b)ft(),u((U)=>({...U,mainLoopModel:$t(r.model),mainLoopModelForSession:null}));let q=b?At():null;K();let k=!wt&&Jt()&&!b,d=k?B()?.name??"override target":null,T=wt?`Updated provider: ${r.name}`:k?`Added provider: ${r.name} (now global default — project keeps using ${d}; use "Clear project provider override" to apply here)`:`Added provider: ${r.name} (now active)`;if(Y(q?`${T}. Warning: could not clear startup provider override (${q}).`:T),t==="first-run"){h({action:"saved",activeProfileId:r.id,message:`Provider configured: ${r.name}`});return}i(null),p(0),_(void 0),L()}function dc(){if(v.state==="loading"||v.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),n(y,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(v.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Atomic Chat setup"}),n(y,{dimColor:!0,children:v.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),n(y,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),n(S,{options:v.options,defaultValue:v.defaultValue,defaultFocusValue:v.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,v.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function Yc(){if(e.state==="loading"||e.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Ollama"}),n(y,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(e.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Ollama setup"}),n(y,{dimColor:!0,children:e.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Ollama model"}),n(y,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),n(S,{options:e.options,defaultValue:e.defaultValue,defaultFocusValue:e.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,e.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function gt(c){let m=rt.findIndex((l)=>l.key===c);p(m<0?0:m),s(N[c].length),_(void 0),O("form")}function Gc(){if(tt.state==="loading"||tt.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Fetching models"}),n(y,{dimColor:!0,children:"Looking for models on your OpenAI-compatible provider…"}),n(y,{dimColor:!0,children:"Press Esc to enter the model manually."})]});if(tt.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:tt.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Type the model id yourself"},{value:"back",label:"Back",description:"Return to the API key step"}],onChange:(l)=>{if(l==="manual"){gt("model");return}gt("apiKey")},onCancel:()=>gt("apiKey"),visibleOptionCount:2})]});let c=[...tt.options,{value:$h,label:"Enter a model id manually",description:"Type an id the provider did not list"}],m=tt.defaultValue??$h;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:"Models from your OpenAI-compatible provider."}),n(S,{options:c,defaultValue:m,defaultFocusValue:m,inlineDescriptions:!0,visibleOptionCount:Math.min(8,c.length),onChange:(l)=>{if(l===$h){gt("model");return}let r={...N,model:l};P(r),Mh(r)},onCancel:()=>gt("apiKey")}),n(y,{dimColor:!0,children:"Enter to select · Esc to go back"})]})}function Mh(c){if(et==="anthropic"||et==="custom"){P(c),O("custom-headers");return}it(c)}function Sc(c){let m=c.trim();if(!Rt.optional&&m.length===0){_(`${Rt.label} is required.`);return}let l={...N,[Ht]:m};if(P(l),_(void 0),Ot<rt.length-1){let r=Ot+1,b=rt[r]?.key??"name";if(b==="model"&&!pn.has(Z)&&l.baseUrl.trim().length>0){O("select-openai-model");return}p(r),s(l[b].length);return}Mh(l)}function Hc(){if(_(void 0),Ot>0){let c=Ot-1,m=rt[c]?.key??"name";p(c),s(N[m].length);return}if(t==="first-run"){O("select-preset");return}L()}D("confirm:no",Hc,{context:"Settings",isActive:V==="form"}),D("confirm:no",()=>gt("model"),{context:"Settings",isActive:V==="select-openai-model"&&(tt.state==="loading"||tt.state==="idle")});function Kc(){if(_(void 0),bt>0){Ft(bt-1);return}O("select-preset")}D("confirm:no",Kc,{context:"Settings",isActive:V==="cloud-extras"}),D("confirm:no",()=>O("form"),{context:"Settings",isActive:V==="custom-headers"}),D("confirm:no",()=>O("select-preset"),{context:"Settings",isActive:V==="anthropic-auth-choice"||V==="anthropic-oauth"||V==="kimi-auth-choice"}),D("confirm:no",()=>O("kimi-auth-choice"),{context:"Settings",isActive:V==="kimi-oauth"});function Wc(){let c=!o(),m=[...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Reuse ~/.claude/ tokens, settings, theme, MCP, skills, agents, plugins."}]:[],{value:"dashscope-intl",label:"Alibaba Coding Plan",description:"Alibaba DashScope International endpoint"},{value:"dashscope-cn",label:"Alibaba Coding Plan (China)",description:"Alibaba DashScope China endpoint"},{value:"anthropic",label:"Anthropic",description:"Native Claude API (x-api-key auth)"},{value:"atomic-chat",label:"Atomic Chat",description:"Local Model Provider"},{value:"azure-openai",label:"Azure OpenAI",description:"Azure OpenAI endpoint (model=deployment name)"},{value:"foundry",label:"Azure AI Foundry",description:"Anthropic models hosted on Azure AI Foundry (resource-scoped)"},{value:"bedrock",label:"AWS Bedrock",description:"Anthropic models on AWS Bedrock (region-scoped, AWS creds)"},{value:"bankr",label:"Bankr",description:"Bankr LLM Gateway (OpenAI-compatible)"},{value:"cloudflare-workers-ai",label:"Cloudflare Workers AI",description:"Cloudflare Workers AI (OpenAI-compatible); set your account ID in the base URL"},{value:"cloudflare-ai-gateway",label:"Cloudflare AI Gateway",description:"Cloudflare AI Gateway unified endpoint; set your account ID in the base URL"},...c?[{value:"codex-oauth",label:"Codex OAuth",description:"Sign in with ChatGPT in your browser and store Codex credentials securely"},{value:"xai-oauth",label:"xAI / Grok (OAuth)",description:"Sign in with xAI in your browser and store Grok credentials securely"}]:[],{value:"github-onboard",label:"GitHub Copilot",description:"Sign in with GitHub in your browser to use Copilot models"},{value:"deepseek",label:"DeepSeek",description:"DeepSeek OpenAI-compatible endpoint"},{value:"gemini",label:"Google Gemini",description:"Gemini OpenAI-compatible endpoint"},{value:"vertex",label:"Google Vertex AI",description:"Anthropic models on Vertex AI (project + region, ADC)"},{value:"groq",label:"Groq",description:"Groq OpenAI-compatible endpoint"},{value:"lmstudio",label:"LM Studio",description:"Local LM Studio endpoint"},{value:"minimax",label:"MiniMax",description:"MiniMax API endpoint"},{value:"mistral",label:"Mistral",description:"Mistral OpenAI-compatible endpoint"},{value:"moonshotai",label:"Moonshot AI",description:"API key or Kimi Code OAuth sign-in"},{value:"nvidia-nim",label:"NVIDIA NIM",description:"NVIDIA NIM endpoint"},{value:"opencode-go",label:"OpenCode GO",description:"OpenCode GO OpenAI-compatible endpoint"},{value:"opencode-zen",label:"OpenCode Zen",description:"OpenCode Zen OpenAI-compatible endpoint"},{value:"ollama",label:"Ollama",description:"Local or remote Ollama endpoint"},{value:"openai",label:"OpenAI",description:"OpenAI API with API key"},{value:"openrouter",label:"OpenRouter",description:"OpenRouter OpenAI-compatible endpoint"},{value:"together",label:"Together AI",description:"Together chat/completions endpoint"},{value:"zai",label:"Z.AI (GLM Coding Plan)",description:"Z.AI GLM Coding Plan (OpenAI-compatible)"},{value:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...t==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:t==="first-run"?"Set up provider":"Choose provider preset"}),n(y,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),n(S,{options:m,onChange:(l)=>{if(l==="skip"){Wt("Provider setup skipped");return}if(l==="codex-oauth"){O("codex-oauth");return}if(l==="xai-oauth"){O("xai-oauth");return}if(l==="moonshotai"){O("kimi-auth-choice");return}if(l==="github-onboard"){O("github-onboard");return}if(l==="import-legacy"){(async()=>{let r=await Vh({force:!0});uh(Vt()),K();let b=jt(r);if(r.errors.length>0){_(b);return}let q=B();if(t==="first-run"&&q){h({action:"saved",activeProfileId:q.id,activeProviderName:q.name,activeProviderModel:q.model,message:b});return}if(Y(b),_(void 0),t==="manage")L()})();return}ih(l)},onCancel:()=>{if(t==="first-run"){Wt("Provider setup skipped");return}L()},visibleOptionCount:Math.min(13,m.length)})]})}function ic(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Claude, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste an x-api-key value (sk-ant-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("anthropic-oauth");return}if(c==="apiKey"){O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Mc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Kimi Code subscription in the browser, or paste a Moonshot AI API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Kimi Code, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste a Moonshot AI API key (sk-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("kimi-oauth");return}if(c==="apiKey"){ih("moonshotai");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Tc(){let c=(xn(),Gn(In)).ConsoleOAuthFlow;return n(F,{flexDirection:"column",gap:1,children:n(c,{mode:"login",onDone:()=>{let m=ot("anthropic"),l={provider:"anthropic",name:m.name,baseUrl:m.baseUrl,model:m.model},r=za(x(),m.baseUrl),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("OAuth completed, but the Anthropic profile could not be saved."),O("select-preset");return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("OAuth completed, but the Anthropic profile could not be set as the startup provider."),O("select-preset");return}let k=`Anthropic OAuth configured: ${q.name}`;if(K(),t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}})})}function Uc(){let c=et;if(c!=="bedrock"&&c!=="vertex"&&c!=="foundry")return null;let m=Ca[c],l=m[bt]??m[0],r=Zt[l.key]??"";function b(q){let k=q.trim();if(k.length===0){_(`${l.label} is required.`);return}let d={...Zt,[l.key]:k};if(dt(d),_(void 0),bt<m.length-1){Ft(bt+1);return}Ft(0),O("form")}return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:`${c==="bedrock"?"AWS Bedrock":c==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),n(y,{dimColor:!0,children:l.helpText}),z(y,{dimColor:!0,children:["Step ",bt+1," of ",m.length,": ",l.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:r,onChange:(q)=>dt((k)=>({...k,[l.key]:q})),onSubmit:b,focus:!0,showCursor:!0,placeholder:`${l.placeholder}${qt.ellipsis}`,columns:80,cursorOffset:Rc,onChangeCursorOffset:Ac})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Ec(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Custom headers (optional)"}),z(y,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",n(y,{children:"Header: Value"}),". Leave empty to skip."]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:dh,onChange:st,onSubmit:()=>it(N),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:gc,onChangeCursorOffset:Xc})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}function Pc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:wt?"Edit provider profile":"Create provider profile"}),n(y,{dimColor:!0,children:Rt.helpText}),z(y,{dimColor:!0,children:["Provider type:"," ",Z==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),z(y,{dimColor:!0,children:["Step ",Ot+1," of ",rt.length,": ",Rt.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:Qc,onChange:(c)=>P((m)=>({...m,[Ht]:c})),onSubmit:Sc,focus:!0,showCursor:!0,placeholder:`${Rt.placeholder}${qt.ellipsis}`,mask:Ht==="apiKey"?"*":void 0,columns:80,cursorOffset:qc,onChangeCursorOffset:s})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Bc(){let c=a.length>0,m=c;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Provider manager"}),n(y,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),Gh&&n(y,{children:Gh}),n(F,{flexDirection:"column",children:a.length===0?n(y,{dimColor:!0,children:"No provider profiles configured yet."}):a.map((l)=>z(y,{dimColor:!0,children:["- ",l.name,": ",la(l,l.id===w)]},l.id))}),n(S,{options:Kh,onChange:(l)=>{switch(_(void 0),l){case"add":O("select-preset");break;case"import-legacy":{(async()=>{let r=await Vh({force:!0});if(uh(Vt()),K(),r.errors.length>0)_(jt(r));else Y(jt(r))})();break}case"activate":if(m)O("select-active");break;case"activate-project":if(m)O("select-active-project");break;case"clear-project-override":Jc();break;case"edit":if(c)O("select-edit");break;case"delete":if(m)O("select-delete");break;case"logout-codex-oauth":{let r=Qh();if(!r.success){_(r.warning??"Could not clear Codex OAuth credentials.");break}Yt(!1),kt(void 0);let b=fh(x(),_t),q=null;if(b){let k=kh(b.id);if(!k.removed){_("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),K();break}Wh(),q=k.activeProfileId?At():null}K(),Y(q?`Codex OAuth logged out. Warning: could not clear startup provider override (${q}).`:"Codex OAuth logged out.");break}default:Wt("Provider manager closed");break}},onCancel:()=>Wt("Provider manager closed"),defaultFocusValue:$c,visibleOptionCount:Kh.length})]})}function Mt(c,m,l){let r=a.map((b)=>{let q=[];if(b.id===w)q.push("active");if(A&&b.id===A)q.push("this project");if(J&&b.id===J)q.push("global default");let k=q.length>0?` (${q.join(", ")})`:"";return{value:b.id,label:`${b.name}${k}`,description:`${b.provider==="anthropic"?"anthropic":"openai-compatible"} · ${b.baseUrl} · ${b.model}`}});if(r.length===0)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(y,{dimColor:!0,children:m}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>L(),onCancel:()=>L(),visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(S,{options:r,onChange:l,onCancel:()=>L(),visibleOptionCount:Math.min(10,Math.max(2,r.length))})]})}let G;switch(V){case"select-preset":G=Wc();break;case"select-ollama-model":G=Yc();break;case"select-openai-model":G=Gc();break;case"select-atomic-chat-model":G=dc();break;case"codex-oauth":G=n(Ra,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:sn,baseUrl:hc,model:en,apiKey:""},r=fh(x(),_t),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Codex OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Codex OAuth login finished, but the provider could not be set as the startup provider."),L();return}m({profileId:b.id});let k=At(),d=await mh(c);Yt(!0),kt(b.id),K();let T=[d,k?`could not clear startup provider override (${k})`:null].filter((W)=>Boolean(W)),U=ah({prefix:"Codex OAuth configured",activationWarning:d,warnings:T});if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:U});return}Y(U),_(void 0),L()}});break;case"xai-oauth":G=n(Aa,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:vn,baseUrl:pt,model:ta,apiKey:""},r=Oa(x(),Jh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("xAI OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("xAI OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="xAI / Grok configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"kimi-auth-choice":G=Mc();break;case"kimi-oauth":G=n(ga,{onBack:()=>O("kimi-auth-choice"),onConfigured:async(c,m)=>{let l={provider:"openai",name:ha,baseUrl:Zh,model:ua,apiKey:""},r=ba(x(),Nh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Kimi Code OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Kimi Code OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="Kimi Code configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"github-onboard":G=n(vh,{onDone:(c)=>{if(c)Y(c),_(void 0);K(),L()},onBack:()=>O("select-preset"),onChangeAPIKey:K});break;case"anthropic-auth-choice":G=ic();break;case"anthropic-oauth":G=Tc();break;case"cloud-extras":G=Uc();break;case"custom-headers":G=Ec();break;case"form":G=Pc();break;case"select-active":G=Mt("Set active provider (Global)","No providers available. Add one first.",(c)=>{Nc(c)});break;case"select-active-project":G=Mt("Set active provider (Project)","No providers available. Add one first.",(c)=>{Vc(c)});break;case"select-edit":G=Mt("Edit provider","No providers available. Add one first.",(c)=>{Zc(c)});break;case"select-delete":G=Mt("Delete provider","No providers available. Add one first.",(c)=>{let m=a.find((W)=>W.id===c),l=m?.provider==="openai"&&m?.extras?.githubToken!==void 0,r=fh(a,_t)?.id===c,b=Jh()?.profileId,q=m?.provider==="openai"&&m.baseUrl===pt&&!m.apiKey&&b===c,k=Nh()?.profileId,d=m?.provider==="openai"&&m.baseUrl===Zh&&!m.apiKey&&k===c,T=B()?.id===c,U=kh(c);if(!U.removed)_("Could not delete provider.");else{let W=[];if(r){let M=Qh();if(!M.success)W.push(M.warning??"could not clear Codex OAuth credentials");else kt(void 0);Wh()}if(l){let M=cc();if(!M.success)W.push(M.warning??"could not clear GitHub Copilot token")}if(q){let M=mc();if(!M.success)W.push(M.warning??"could not clear xAI OAuth credentials")}if(d){let M=ac();if(!M.success)W.push(M.warning??"could not clear Kimi Code OAuth credentials")}let ht=U.activeProfileId?At():null;if(ht)W.push(`could not clear startup provider override (${ht})`);if(K(),T){let M=B();if(M)ft(),u((yh)=>({...yh,mainLoopModel:$t(M.model),mainLoopModelForSession:null}));else ft(),u((yh)=>({...yh,mainLoopModel:null,mainLoopModelForSession:null}))}Y(W.length>0?`Provider deleted. Warning: ${W.join("; ")}.`:"Provider deleted")}L()});break;case"menu":default:G=Bc();break}return z(uc,{color:"permission",children:[n(zc,{enabled:Hh,onDismiss:(c)=>{uh(Vt()),Lc(!1),K();let m=B();if(c==="migrated"&&t==="first-run"&&m)h({action:"saved",activeProfileId:m.id,activeProviderName:m.name,activeProviderModel:m.model})}}),Hh?null:Fc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Loading providers..."}),n(y,{dimColor:!0,children:"Reading provider profiles from disk."})]}):kc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Activating provider..."}),n(y,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):G]})}var g,rt,$h="\x00__manual__",pn,sn="Codex OAuth",en="codexplan",vn="xAI / Grok (OAuth)",ta="grok-4",ha="Moonshot AI",ua,Zh="https://api.kimi.com/coding/v1",Ca;var Xa=I(()=>{Sn();tu();Kn();Eh();Mn();Pn();Dn();Xu();Et();Hn();Wn();Un();Th();ph();En();nu();au();Bn();Tn();on();sh();fu();Ku();eu();Su();pu();Pu();jn();Tt();g=Lt(Qt(),1),rt=[{key:"name",label:"Provider name",placeholder:"e.g. Ollama Home, OpenAI Work",helpText:"A short label shown in /provider and startup setup."},{key:"baseUrl",label:"Base URL",placeholder:"e.g. http://localhost:11434/v1",helpText:"API base URL used for this provider profile."},{key:"apiKey",label:"API key",placeholder:"Leave empty if your provider does not require one",helpText:"Optional. Press Enter with empty value to skip.",optional:!0},{key:"model",label:"Default model",placeholder:"e.g. llama3.1:8b or glm-4.7; glm-4.7-flash",helpText:'Model name(s) to use. Separate multiple with ";" or ","; first is default.'}],pn=new Set(["anthropic","bedrock","vertex","foundry"]),ua=nc;Ca={bedrock:[{key:"awsRegion",label:"AWS region",placeholder:"e.g. us-east-1",helpText:"Region of your Bedrock-enabled AWS account. Credentials are picked up from the AWS SDK chain."}],vertex:[{key:"gcpProject",label:"GCP project ID",placeholder:"e.g. my-project-123456",helpText:"Google Cloud project where Vertex AI is enabled. Credentials are picked up from ADC."},{key:"gcpRegion",label:"GCP region",placeholder:"e.g. us-central1",helpText:"Vertex AI region for the model."}],foundry:[{key:"azureResource",label:"Azure resource",placeholder:"e.g. my-foundry-resource",helpText:"Name of your Azure AI Foundry resource. Credentials are picked up from DefaultAzureCredential."}]}});
|
|
50
|
-
export{wh as Ac,au as Bc,aa as Cc,Vm as Dc,Xa as Ec};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{rg as OJ,sg as hQ}from"./cli-1.1.5-43ng5pm1.mjs";import{tg as PJ,ug as WQ}from"./cli-1.1.5-srf8k7x8.mjs";import{vg as AJ,wg as LQ}from"./cli-1.1.5-a41pf5rk.mjs";import{xg as iq,yg as $J}from"./cli-1.1.5-qdha9akj.mjs";import{Ag as oq,Bg as gJ,zg as Fq}from"./cli-1.1.5-znkch0ha.mjs";import{Cg as LJ,Dg as RQ}from"./cli-1.1.5-62ntg4mw.mjs";import{$G as Mq,$o as Tq,Do as VJ,Eo as VQ,QT as wq,Qt as XJ,Rt as XQ,St as yJ,Tt as NJ,UT as tq,Ut as yQ,XT as qJ,_o as P,aH as UQ,aR as sq,bH as wJ,cH as HJ,cR as oJ,dH as RJ,eH as wQ,hU as eJ,iy as g,ly as NQ,qR as Aq,tR as nJ,ty as uq,uy as mq,wJ as WJ,wy as pq,xJ as hJ,xy as uJ,yJ as HQ}from"./cli-1.1.5-bcgy5mbp.mjs";import{LU as BJ,NU as UJ,QU as BQ}from"./cli-1.1.5-17pq11ad.mjs";import{AW as FJ,EW as FQ}from"./cli-1.1.5-3n83mvmz.mjs";import{CY as GJ,DY as YQ,GY as KJ,HY as GQ,PY as vq,QY as KQ}from"./cli-1.1.5-bs0hzzxt.mjs";import{DZ as Pq,H1 as Oq,a1 as y,c1 as Q}from"./cli-1.1.5-9q40r2jj.mjs";import{n4 as h,o4 as Y,p4 as Z,q4 as c}from"./cli-1.1.5-0a8jb3pr.mjs";import{r4 as zQ}from"./cli-1.1.5-43y030nv.mjs";import{H7 as YJ,I7 as ZQ,T6 as rq,_6 as zJ,r7 as aq}from"./cli-1.1.5-y39w08qk.mjs";import{Caa as Iq,D_ as $,E_ as qQ,Wda as ZJ,Zaa as JQ,eea as QQ,ida as gq,jda as cJ,mda as xq,uda as lJ}from"./cli-1.1.5-v9a6fbsq.mjs";import{hla as QJ,ula as tJ}from"./cli-1.1.5-rqw75dc4.mjs";import{Zqa as sJ,ena as JJ}from"./cli-1.1.5-0gd61h7z.mjs";import{Esa as Bq,Isa as Uq}from"./cli-1.1.5-keef1hq8.mjs";function _q(){let J=jq.c(2);if(!uq())return null;let q,V;if(J[0]===Symbol.for("react.memo_cache_sentinel")){V=Symbol.for("react.early_return_sentinel");q:{let G=pq();if(G.length===0){V=null;break q}let K=G.filter(_J),X=G.filter(jJ);q=Z(y,{flexDirection:"column",marginTop:1,marginBottom:1,children:[Y(Q,{bold:!0,color:K.length>0?"error":"warning",children:"Keybinding Configuration Issues"}),Z(y,{children:[Y(Q,{dimColor:!0,children:"Location: "}),Y(Q,{dimColor:!0,children:mq()})]}),Z(y,{marginLeft:1,flexDirection:"column",marginTop:1,children:[K.map(pJ),X.map(mJ)]})]})}J[0]=q,J[1]=V}else q=J[0],V=J[1];if(V!==Symbol.for("react.early_return_sentinel"))return V;return q}function mJ(J,q){return Z(y,{flexDirection:"column",children:[Z(y,{children:[Y(Q,{dimColor:!0,children:"└ "}),Y(Q,{color:"warning",children:"[Warning]"}),Z(Q,{dimColor:!0,children:[" ",J.message]})]}),J.suggestion&&Y(y,{marginLeft:3,children:Z(Q,{dimColor:!0,children:["→ ",J.suggestion]})})]},`warning-${q}`)}function pJ(J,q){return Z(y,{flexDirection:"column",children:[Z(y,{children:[Y(Q,{dimColor:!0,children:"└ "}),Y(Q,{color:"error",children:"[Error]"}),Z(Q,{dimColor:!0,children:[" ",J.message]})]}),J.suggestion&&Y(y,{marginLeft:3,children:Z(Q,{dimColor:!0,children:["→ ",J.suggestion]})})]},`error-${q}`)}function jJ(J){return J.severity==="warning"}function _J(J){return J.severity==="error"}var jq;var dq=Uq(()=>{Oq();uJ();c();jq=Bq(Pq(),1)});function lq(){let J=cq.c(2);if(!P.isSupportedPlatform())return null;if(!P.isSandboxEnabledInSettings())return null;let q,V;if(J[0]===Symbol.for("react.memo_cache_sentinel")){V=Symbol.for("react.early_return_sentinel");q:{let G=P.checkDependencies(),K=G.errors.length>0,X=G.warnings.length>0;if(!K&&!X){V=null;break q}q=Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,children:"Sandbox"}),Z(Q,{children:["└ Status: ",Y(Q,{color:K?"error":"warning",children:K?"Missing dependencies":"Available (with warnings)"})]}),G.errors.map(TJ),G.warnings.map(dJ),K&&Y(Q,{dimColor:!0,children:"└ Run /sandbox for install instructions"})]})}J[0]=q,J[1]=V}else q=J[0],V=J[1];if(V!==Symbol.for("react.early_return_sentinel"))return V;return q}function dJ(J,q){return Z(Q,{color:"warning",children:["└ ",J]},q)}function TJ(J,q){return Z(Q,{color:"error",children:["└ ",J]},q)}var cq;var $q=Uq(()=>{Oq();Tq();c();cq=Bq(Pq(),1)});async function xJ(){let J=qJ(await tq());if(J.length===0)return null;let q=J.sort((G,K)=>K.content.length-G.content.length).map((G)=>`${G.path}: ${G.content.length.toLocaleString()} chars`);return{type:"claudemd_files",severity:"warning",message:J.length===1?`Large CLAUDE.md file detected (${J[0].content.length.toLocaleString()} chars > ${wq.toLocaleString()})`:`${J.length} large CLAUDE.md files detected (each > ${wq.toLocaleString()} chars)`,details:q,currentValue:J.length,threshold:wq}}async function rJ(J){if(!J)return null;let q=oq(J);if(q<=Fq)return null;let V=J.activeAgents.filter((K)=>K.source!=="built-in").map((K)=>{let X=`${K.agentType}: ${K.whenToUse}`;return{name:K.agentType,tokens:Aq(X)}}).sort((K,X)=>X.tokens-K.tokens),G=V.slice(0,5).map((K)=>`${K.name}: ~${K.tokens.toLocaleString()} tokens`);if(V.length>5)G.push(`(${V.length-5} more custom agents)`);return{type:"agent_descriptions",severity:"warning",message:`Large agent descriptions (~${q.toLocaleString()} tokens > ${Fq.toLocaleString()})`,details:G,currentValue:q,threshold:Fq}}async function aJ(J,q,V){let G=J.filter((K)=>K.isMcp);if(G.length===0)return null;try{let K=rq(),{mcpToolTokens:X,mcpToolDetails:B}=await sq(J,q,V,K);if(X<=l)return null;let U=new Map;for(let R of B){let x=R.name.split("__")[1]||"unknown",N=U.get(x)||{count:0,tokens:0};U.set(x,{count:N.count+1,tokens:N.tokens+R.tokens})}let H=Array.from(U.entries()).sort((R,F)=>F[1].tokens-R[1].tokens),z=H.slice(0,5).map(([R,F])=>`${R}: ${F.count} tools (~${F.tokens.toLocaleString()} tokens)`);if(H.length>5)z.push(`(${H.length-5} more servers)`);return{type:"mcp_tools",severity:"warning",message:`Large MCP tools context (~${X.toLocaleString()} tokens > ${l.toLocaleString()})`,details:z,currentValue:X,threshold:l}}catch(K){let X=G.reduce((B,U)=>{let H=(U.name?.length||0)+U.description.length;return B+Aq(H.toString())},0);if(X<=l)return null;return{type:"mcp_tools",severity:"warning",message:`Large MCP tools context (~${X.toLocaleString()} tokens estimated > ${l.toLocaleString()})`,details:[`${G.length} MCP tools detected (token count estimated)`],currentValue:X,threshold:l}}}async function iJ(J){let q=await J(),V=P.isSandboxingEnabled()&&P.isAutoAllowBashIfSandboxedEnabled(),G=iq(q,{sandboxAutoAllowEnabled:V});if(G.length===0)return null;let K=G.flatMap((X)=>[`${gq(X.rule.ruleValue)}: ${X.reason}`,` Fix: ${X.fix}`]);return{type:"unreachable_rules",severity:"warning",message:`${G.length} ${xq(G.length,"unreachable permission rule")} detected`,details:K,currentValue:G.length,threshold:0}}async function nq(J,q,V){let[G,K,X,B]=await Promise.all([xJ(),rJ(q),aJ(J,V,q),iJ(V)]);return{claudeMdWarning:G,agentWarning:K,mcpWarning:X,unreachableRulesWarning:B}}var l=25000;var eq=Uq(()=>{nJ();oJ();eJ();aq();cJ();$J();Tq();gJ();lJ()});import{join as bq}from"path";function PQ(J){let q=Cq.c(8),{promise:V}=J,G=w.use(V);if(!G.latest){let U;if(q[0]===Symbol.for("react.memo_cache_sentinel"))U=Y(Q,{dimColor:!0,children:"└ Failed to fetch versions"}),q[0]=U;else U=q[0];return U}let K;if(q[1]!==G.stable)K=G.stable&&Z(Q,{children:["└ Stable version: ",G.stable]}),q[1]=G.stable,q[2]=K;else K=q[2];let X;if(q[3]!==G.latest)X=Z(Q,{children:["└ Latest version: ",G.latest]}),q[3]=G.latest,q[4]=X;else X=q[4];let B;if(q[5]!==K||q[6]!==X)B=Z(h,{children:[K,X]}),q[5]=K,q[6]=X,q[7]=B;else B=q[7];return B}function _Z(J){let q=Cq.c(84),{onDone:V}=J,G=g(cQ),K=g(TQ),X=g(dQ),B=g(_Q);KJ();let U;if(q[0]!==K)U=K||[],q[0]=K,q[1]=U;else U=q[1];let H=U,[z,R]=w.useState(null),[F,x]=w.useState(null),[N,bJ]=w.useState(null),[L,kq]=w.useState(null),Hq=AJ(),r;if(q[2]===Symbol.for("react.memo_cache_sentinel"))r=Mq().then(pQ),q[2]=r;else r=q[2];let IJ=r,vJ=ZJ()?.autoUpdatesChannel??"latest",a;if(q[3]!==Hq)a=Hq.filter(mQ),q[3]=Hq,q[4]=a;else a=q[4];let i=a,o;if(q[5]===Symbol.for("react.memo_cache_sentinel"))o=[{name:"BASH_MAX_OUTPUT_LENGTH",default:NJ,upperLimit:yJ},{name:"TASK_MAX_OUTPUT_LENGTH",default:hJ,upperLimit:WJ},{name:"CLAUDE_CODE_MAX_OUTPUT_TOKENS",...YJ(zJ())}].map(uQ).filter(EQ),q[5]=o;else o=q[5];let Sq=o,n,e;if(q[6]!==G||q[7]!==X||q[8]!==H)n=()=>{Mq().then(R),(async()=>{let W=bq(QJ(),"agents"),Dq=bq(JJ(),".claudin","agents"),{activeAgents:fq,allAgents:MJ,failedFiles:Eq}=G,[CJ,kJ]=await Promise.all([Iq(W),Iq(Dq)]),SJ={activeAgents:fq.map(fQ),userAgentsDir:W,projectAgentsDir:Dq,userDirExists:CJ,projectDirExists:kJ,failedFiles:Eq};x(SJ);let DJ=await nq(H,{activeAgents:fq,allAgents:MJ,failedFiles:Eq},async()=>X);if(bJ(DJ),wJ()){let Lq=bq(FJ(),"claude","locks"),fJ=RJ(Lq),EJ=HJ(Lq);kq({enabled:!0,locks:EJ,locksDir:Lq,staleLocksCleaned:fJ})}else kq({enabled:!1,locks:[],locksDir:"",staleLocksCleaned:0})})()},e=[X,H,G],q[6]=G,q[7]=X,q[8]=H,q[9]=n,q[10]=e;else n=q[9],e=q[10];w.useEffect(n,e);let s;if(q[11]!==V)s=()=>{V("Claude Code diagnostics dismissed",{display:"system"})},q[11]=V,q[12]=s;else s=q[12];let t=s,qq;if(q[13]!==t)qq={"confirm:yes":t,"confirm:no":t},q[13]=t,q[14]=qq;else qq=q[14];let Jq;if(q[15]===Symbol.for("react.memo_cache_sentinel"))Jq={context:"Confirmation"},q[15]=Jq;else Jq=q[15];if(GJ(qq,Jq),!z){let W;if(q[16]===Symbol.for("react.memo_cache_sentinel"))W=Y(vq,{children:Y(Q,{dimColor:!0,children:"Checking installation status…"})}),q[16]=W;else W=q[16];return W}let Qq;if(q[17]===Symbol.for("react.memo_cache_sentinel"))Qq=Y(Q,{bold:!0,children:"Diagnostics"}),q[17]=Qq;else Qq=q[17];let O;if(q[18]!==z.installationType||q[19]!==z.version)O=Z(Q,{children:["└ Currently running: ",z.installationType," (",z.version,")"]}),q[18]=z.installationType,q[19]=z.version,q[20]=O;else O=q[20];let A;if(q[21]!==z.packageManager)A=z.packageManager&&Z(Q,{children:["└ Package manager: ",z.packageManager]}),q[21]=z.packageManager,q[22]=A;else A=q[22];let b;if(q[23]!==z.installationPath)b=Z(Q,{children:["└ Path: ",z.installationPath]}),q[23]=z.installationPath,q[24]=b;else b=q[24];let I;if(q[25]!==z.invokedBinary)I=Z(Q,{children:["└ Invoked: ",z.invokedBinary]}),q[25]=z.invokedBinary,q[26]=I;else I=q[26];let v;if(q[27]!==z.configInstallMethod)v=Z(Q,{children:["└ Config install method: ",z.configInstallMethod]}),q[27]=z.configInstallMethod,q[28]=v;else v=q[28];let Rq=z.ripgrepStatus.working?"OK":"Not working",Wq=z.ripgrepStatus.mode==="embedded"?"bundled":z.ripgrepStatus.mode==="builtin"?"vendor":z.ripgrepStatus.systemPath||"system",M;if(q[29]!==Rq||q[30]!==Wq)M=Z(Q,{children:["└ Search: ",Rq," (",Wq,")"]}),q[29]=Rq,q[30]=Wq,q[31]=M;else M=q[31];let C;if(q[32]!==z.recommendation)C=z.recommendation&&Z(h,{children:[Y(Q,{}),Z(Q,{color:"warning",children:["Recommendation: ",z.recommendation.split(`
|
|
2
|
-
`)[0]]}),Y(Q,{dimColor:!0,children:z.recommendation.split(`
|
|
3
|
-
`)[1]})]}),q[32]=z.recommendation,q[33]=C;else C=q[33];let k;if(q[34]!==z.multipleInstallations)k=z.multipleInstallations.length>1&&Z(h,{children:[Y(Q,{}),Y(Q,{color:"warning",children:"Warning: Multiple installations found"}),z.multipleInstallations.map(DQ)]}),q[34]=z.multipleInstallations,q[35]=k;else k=q[35];let S;if(q[36]!==z.warnings)S=z.warnings.length>0&&Z(h,{children:[Y(Q,{}),z.warnings.map(SQ)]}),q[36]=z.warnings,q[37]=S;else S=q[37];let D;if(q[38]!==i)D=i.length>0&&Z(y,{flexDirection:"column",marginTop:1,marginBottom:1,children:[Y(Q,{bold:!0,children:"Invalid Settings"}),Y(OJ,{errors:i})]}),q[38]=i,q[39]=D;else D=q[39];let f;if(q[40]!==O||q[41]!==A||q[42]!==b||q[43]!==I||q[44]!==v||q[45]!==M||q[46]!==C||q[47]!==k||q[48]!==S||q[49]!==D)f=Z(y,{flexDirection:"column",children:[Qq,O,A,b,I,v,M,C,k,S,D]}),q[40]=O,q[41]=A,q[42]=b,q[43]=I,q[44]=v,q[45]=M,q[46]=C,q[47]=k,q[48]=S,q[49]=D,q[50]=f;else f=q[50];let Zq;if(q[51]===Symbol.for("react.memo_cache_sentinel"))Zq=Y(Q,{bold:!0,children:"Updates"}),q[51]=Zq;else Zq=q[51];let hq=z.packageManager?"Managed by package manager":z.autoUpdates,E;if(q[52]!==hq)E=Z(Q,{children:["└ Auto-updates:"," ",hq]}),q[52]=hq,q[53]=E;else E=q[53];let u;if(q[54]!==z.hasUpdatePermissions)u=z.hasUpdatePermissions!==null&&Z(Q,{children:["└ Update permissions:"," ",z.hasUpdatePermissions?"Yes":"No (requires sudo)"]}),q[54]=z.hasUpdatePermissions,q[55]=u;else u=q[55];let zq;if(q[56]===Symbol.for("react.memo_cache_sentinel"))zq=Z(Q,{children:["└ Auto-update channel: ",vJ]}),q[56]=zq;else zq=q[56];let Yq;if(q[57]===Symbol.for("react.memo_cache_sentinel"))Yq=Y(w.Suspense,{fallback:null,children:Y(PQ,{promise:IJ})}),q[57]=Yq;else Yq=q[57];let m;if(q[58]!==E||q[59]!==u)m=Z(y,{flexDirection:"column",children:[Zq,E,u,zq,Yq]}),q[58]=E,q[59]=u,q[60]=m;else m=q[60];let Gq,Kq,Vq,Xq;if(q[61]===Symbol.for("react.memo_cache_sentinel"))Gq=Y(lq,{}),Kq=Y(LJ,{}),Vq=Y(_q,{}),Xq=Sq.length>0&&Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,children:"Environment Variables"}),Sq.map(kQ)]}),q[61]=Gq,q[62]=Kq,q[63]=Vq,q[64]=Xq;else Gq=q[61],Kq=q[62],Vq=q[63],Xq=q[64];let p;if(q[65]!==L)p=L?.enabled&&Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,children:"Version Locks"}),L.staleLocksCleaned>0&&Z(Q,{dimColor:!0,children:["└ Cleaned ",L.staleLocksCleaned," stale lock(s)"]}),L.locks.length===0?Y(Q,{dimColor:!0,children:"└ No active version locks"}):L.locks.map(CQ)]}),q[65]=L,q[66]=p;else p=q[66];let j;if(q[67]!==F)j=F?.failedFiles&&F.failedFiles.length>0&&Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,color:"error",children:"Agent Parse Errors"}),Z(Q,{color:"error",children:["└ Failed to parse ",F.failedFiles.length," agent file(s):"]}),F.failedFiles.map(MQ)]}),q[67]=F,q[68]=j;else j=q[68];let _;if(q[69]!==B)_=B.length>0&&Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,color:"error",children:"Plugin Errors"}),Z(Q,{color:"error",children:["└ ",B.length," plugin error(s) detected:"]}),B.map(vQ)]}),q[69]=B,q[70]=_;else _=q[70];let d;if(q[71]!==N)d=N?.unreachableRulesWarning&&Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,color:"warning",children:"Unreachable Permission Rules"}),Z(Q,{children:["└"," ",Z(Q,{color:"warning",children:[$.warning," ",N.unreachableRulesWarning.message]})]}),N.unreachableRulesWarning.details.map(IQ)]}),q[71]=N,q[72]=d;else d=q[72];let T;if(q[73]!==N)T=N&&(N.claudeMdWarning||N.agentWarning||N.mcpWarning)&&Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,children:"Context Usage Warnings"}),N.claudeMdWarning&&Z(h,{children:[Z(Q,{children:["└"," ",Z(Q,{color:"warning",children:[$.warning," ",N.claudeMdWarning.message]})]}),Z(Q,{children:[" ","└ Files:"]}),N.claudeMdWarning.details.map(bQ)]}),N.agentWarning&&Z(h,{children:[Z(Q,{children:["└"," ",Z(Q,{color:"warning",children:[$.warning," ",N.agentWarning.message]})]}),Z(Q,{children:[" ","└ Top contributors:"]}),N.agentWarning.details.map(AQ)]}),N.mcpWarning&&Z(h,{children:[Z(Q,{children:["└"," ",Z(Q,{color:"warning",children:[$.warning," ",N.mcpWarning.message]})]}),Z(Q,{children:[" ","└ MCP servers:"]}),N.mcpWarning.details.map(OQ)]})]}),q[73]=N,q[74]=T;else T=q[74];let yq;if(q[75]===Symbol.for("react.memo_cache_sentinel"))yq=Y(y,{children:Y(PJ,{})}),q[75]=yq;else yq=q[75];let Nq;if(q[76]!==f||q[77]!==m||q[78]!==p||q[79]!==j||q[80]!==_||q[81]!==d||q[82]!==T)Nq=Z(vq,{children:[f,m,Gq,Kq,Vq,Xq,p,j,_,d,T,yq]}),q[76]=f,q[77]=m,q[78]=p,q[79]=j,q[80]=_,q[81]=d,q[82]=T,q[83]=Nq;else Nq=q[83];return Nq}function OQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J]},q)}function AQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J]},q)}function bQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J]},q)}function IQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J]},q)}function vQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J.source||"unknown","plugin"in J&&J.plugin?` [${J.plugin}]`:"",":"," ",VJ(J)]},q)}function MQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J.path,": ",J.error]},q)}function CQ(J,q){return Z(Q,{children:["└ ",J.version,": PID ",J.pid," ",J.isProcessRunning?Y(Q,{children:"(running)"}):Y(Q,{color:"warning",children:"(stale)"})]},q)}function kQ(J,q){return Z(Q,{children:["└ ",J.name,":"," ",Y(Q,{color:J.status==="capped"?"warning":"error",children:J.message})]},q)}function SQ(J,q){return Z(y,{flexDirection:"column",children:[Z(Q,{color:"warning",children:["Warning: ",J.issue]}),Z(Q,{children:["Fix: ",J.fix]})]},q)}function DQ(J,q){return Z(Q,{children:["└ ",J.type," at ",J.path]},q)}function fQ(J){return{agentType:J.agentType,source:J.source}}function EQ(J){return J.status!=="valid"}function uQ(J){let q=process.env[J.name],V=XJ(J.name,q,J.default,J.upperLimit);return{name:J.name,...V}}function mQ(J){return J.mcpErrorMetadata===void 0}function pQ(J){return(J.installationType==="native"?UJ:BJ)().catch(jQ)}function jQ(){return{latest:null,stable:null}}function _Q(J){return J.plugins.errors}function dQ(J){return J.toolPermissionContext}function TQ(J){return J.mcp.tools}function cQ(J){return J.agentDefinitions}var Cq,w;var lQ=Uq(()=>{qQ();dq();RQ();ZQ();aq();tJ();sJ();KQ();WQ();$q();hQ();LQ();GQ();Oq();YQ();NQ();VQ();BQ();eq();UQ();XQ();JQ();wQ();QQ();yQ();HQ();FQ();c();Cq=Bq(Pq(),1),w=Bq(zQ(),1)});
|
|
4
|
-
export{_Z as pg,lQ as qg};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{M5 as H,N5 as _,O5 as Y,P5 as y}from"./cli-1.1.5-y39w08qk.mjs";import{P_ as M,R_ as f}from"./cli-1.1.5-v9a6fbsq.mjs";import{Cja as F,Cka as S,Eja as b,lka as P,pka as p,zka as x}from"./cli-1.1.5-3zc9bseg.mjs";import{Zka as V,ela as R}from"./cli-1.1.5-xd8qwq5t.mjs";import{kla as U,ula as g}from"./cli-1.1.5-rqw75dc4.mjs";import{Zqa as A,jpa as D,kpa as W}from"./cli-1.1.5-0gd61h7z.mjs";import{Isa as L}from"./cli-1.1.5-keef1hq8.mjs";function I(){let q=D();if(q!==void 0)return q;let G=process.env.CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR;if(!G){let w=process.env.CLAUDE_SESSION_INGRESS_TOKEN_FILE??H,z=Y(w,"session ingress token");return W(z),z}let Q=parseInt(G,10);if(Number.isNaN(Q))return x(`CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR must be a valid file descriptor number, got: ${G}`,{level:"error"}),W(null),null;try{let w=P(),z=process.platform==="darwin"||process.platform==="freebsd"?`/dev/fd/${Q}`:`/proc/self/fd/${Q}`,X=w.readFileSync(z,{encoding:"utf8"}).trim();if(!X)return x("File descriptor contained empty token",{level:"error"}),W(null),null;return x(`Successfully read token from file descriptor ${Q}`),W(X),_(H,X,"session ingress token"),X}catch(w){x(`Failed to read token from file descriptor ${Q}: ${V(w)}`,{level:"error"});let z=process.env.CLAUDE_SESSION_INGRESS_TOKEN_FILE??H,X=Y(z,"session ingress token");return W(X),X}}function k(){let q=process.env.CLAUDE_CODE_SESSION_ACCESS_TOKEN;if(q)return q;return I()}function s(){let q=k();if(!q)return{};if(q.startsWith("sk-ant-sid")){let G={Cookie:`sessionKey=${q}`},Q=process.env.CLAUDE_CODE_ORGANIZATION_UUID;if(Q)G["X-Organization-Uuid"]=Q;return G}return{Authorization:`Bearer ${q}`}}function o(q){process.env.CLAUDE_CODE_SESSION_ACCESS_TOKEN=q}var u=L(()=>{A();y();S();R();p()});function E(){j(),K=setInterval(()=>{if(M("debug","session_keepalive_heartbeat",{refcount:J}),U(process.env.CLAUDE_CODE_REMOTE_SEND_KEEPALIVES))$?.()},C)}function v(){if(j(),$===null)return;B=setTimeout(()=>{M("info","session_idle_30s"),B=null},C)}function j(){if(B!==null)clearTimeout(B),B=null}function e(q){if($=q,J>0&&K===null)E()}function qq(){if($=null,K!==null)clearInterval(K),K=null;j()}function Gq(){if(U(process.env.CLAUDE_CODE_REMOTE_SEND_KEEPALIVES))$?.()}function Jq(){return $!==null}function Kq(q){if(J++,Z.set(q,(Z.get(q)??0)+1),J===1){if(O=Date.now(),$!==null&&K===null)E()}if(!N)N=!0,F(async()=>{M("info","session_activity_at_shutdown",{refcount:J,active:Object.fromEntries(Z),oldest_activity_ms:J>0&&O!==null?Date.now()-O:null})})}function Qq(q){if(J>0)J--;let G=(Z.get(q)??0)-1;if(G>0)Z.set(q,G);else Z.delete(q);if(J===0&&K!==null)clearInterval(K),K=null,v()}var C=30000,$=null,J=0,Z,O=null,K=null,B=null,N=!1;var h=L(()=>{b();f();g();Z=new Map});var $q;var m=L(()=>{$q={input_tokens:0,cache_creation_input_tokens:0,cache_read_input_tokens:0,output_tokens:0,output_tokens_details:{thinking_tokens:0},server_tool_use:{web_search_requests:0,web_fetch_requests:0},service_tier:"standard",cache_creation:{ephemeral_1h_input_tokens:0,ephemeral_5m_input_tokens:0},inference_geo:"",iterations:[],speed:"standard"}});
|
|
2
|
-
export{k as IW,s as JW,o as KW,u as LW,e as MW,qq as NW,Gq as OW,Jq as PW,Kq as QW,Qq as RW,h as SW,$q as TW,m as UW};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O4 as M,P4 as E}from"./cli-1.1.5-6dmtdkjb.mjs";import{Bga as S,Dfa as F,Ega as p,Ofa as l,Rfa as L,Sfa as c,vfa as _}from"./cli-1.1.5-v9a6fbsq.mjs";import{mla as Y,ula as m}from"./cli-1.1.5-rqw75dc4.mjs";import{Isa as B}from"./cli-1.1.5-keef1hq8.mjs";function R(J){if(!J)return;let Q=J.trim().replace(/^https?:\/\//i,"").replace(/\/+$/,"");if(!Q||Q.toLowerCase()==="github.com")return;return Q}function b(J){return J?`https://${J}/login/device/code`:g}function v(J){return J?`https://${J}/login/oauth/access_token`:f}function h(J){return J?`https://api.${J}/copilot_internal/v2/token`:G}function H(){return process.env.GITHUB_DEVICE_FLOW_CLIENT_ID?.trim()||T}function P(J){return new Promise((Q)=>setTimeout(Q,J))}async function r(J){let Q=J?.clientId??H();if(!Q)throw new q("No OAuth client ID: set GITHUB_DEVICE_FLOW_CLIENT_ID.");let Z=J?.fetchImpl??fetch,y=J?.scope?.trim()||C,$=y===C?[y]:[y,C],j="Device code request failed.",z=b(R(J?.domain));for(let V of $){let W=await Z(z,{method:"POST",headers:{Accept:"application/json"},body:new URLSearchParams({client_id:Q,scope:V})});if(!W.ok){let w=await W.text().catch(()=>"");j=`Device code request failed: ${W.status} ${w}`;let D=/invalid_scope/i.test(w);if(V!==C&&D)continue;throw new q(j)}let X=await W.json(),N=X.device_code,K=X.user_code,x=X.verification_uri;if(typeof N!=="string"||typeof K!=="string"||typeof x!=="string")throw new q("Malformed device code response from GitHub");return{device_code:N,user_code:K,verification_uri:x,expires_in:typeof X.expires_in==="number"?X.expires_in:900,interval:typeof X.interval==="number"?X.interval:5}}throw new q(j)}async function o(J,Q){let Z=Q?.clientId??H();if(!Z)throw new q("client_id required for polling");let y=Math.max(1,Q?.initialInterval??5),$=Q?.timeoutSeconds??900,j=Q?.fetchImpl??fetch,z=v(R(Q?.domain)),V=Date.now();while((Date.now()-V)/1000<$){let W=await j(z,{method:"POST",headers:{Accept:"application/json"},body:new URLSearchParams({client_id:Z,device_code:J,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});if(!W.ok){let K=await W.text().catch(()=>"");throw new q(`Token request failed: ${W.status} ${K}`)}let X=await W.json(),N=X.error;if(N==null){let K=X.access_token;if(typeof K==="string"&&K)return K;throw new q("No access_token in response")}if(N==="authorization_pending"){await P(y*1000);continue}if(N==="slow_down"){y=typeof X.interval==="number"?X.interval:y+5,await P(y*1000);continue}if(N==="expired_token")throw new q("Device code expired. Start the login flow again.");if(N==="access_denied")throw new q("Authorization was denied or cancelled.");throw new q(`GitHub OAuth error: ${N}`)}throw new q("Timed out waiting for authorization.")}async function e(J){await M(J)}async function I(J,Q){let Z=typeof Q==="function"?{fetchImpl:Q}:Q??{},y=Z.fetchImpl??fetch,$=h(R(Z.domain)),j=await y($,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${J}`,...u}});if(!j.ok){let K=await j.text().catch(()=>"");throw new q(`Copilot token exchange failed: ${j.status} ${K}`)}let z=await j.json(),V=z.token,W=z.expires_at,X=z.refresh_in,N=z.endpoints;if(typeof V!=="string"||typeof W!=="number"||typeof X!=="number"||!N||typeof N!=="object"||typeof N.api!=="string")throw new q("Malformed Copilot token response");return{token:V,expires_at:W,refresh_in:X,endpoints:N}}var T="Iv1.b507a08c87ecfe98",g="https://github.com/login/device/code",f="https://github.com/login/oauth/access_token",G="https://api.github.com/copilot_internal/v2/token",C="read:user",u,q;var O=B(()=>{E();u={"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"};q=class q extends Error{constructor(J){super(J);this.name="GitHubDeviceFlowError"}}});function k(){return S()?.transport==="github_copilot"}function d(J){let Q=J.match(/exp=(\d+)/);if(Q){let $=Number(Q[1]);if(!Number.isNaN($))return Date.now()>=$*1000?"expired":"valid"}let Z=J.split(".");if(Z.length===3&&Z.every(($)=>/^[A-Za-z0-9_-]+$/.test($)))try{let $=Z[1].replace(/-/g,"+").replace(/_/g,"/"),j=$+"=".repeat((4-$.length%4)%4),z=Buffer.from(j,"base64").toString("utf8"),V=JSON.parse(z);if(V&&typeof V==="object"&&V.exp)return Date.now()>=V.exp*1000?"expired":"valid"}catch{return"invalid_format"}return"invalid_format"}function a(){if(Y())return;try{return L().read()?.githubModels?.accessToken?.trim()||void 0}catch{return}}async function WJ(){if(Y())return;try{return(await L().readAsync())?.githubModels?.accessToken?.trim()||void 0}catch{return}}function yJ(){if(!k())return;if(Y())return;if(a())return}async function zJ(){if(!k())return!1;if(Y())return!1;if(A)return A;return A=(async()=>{try{let Z=L().read()?.githubModels,y=Z?.accessToken?.trim()||"",$=Z?.oauthAccessToken?.trim()||"";if(!y&&!$)return!1;if((y?d(y):"expired")==="valid")return!1;if(!$)return!1;let z=Z?.enterpriseDomain?.trim()||void 0,V=await I($,{domain:z});if(!n(V.token,$,z).success)return!1;let X=_().find((N)=>N.provider==="openai"&&N.extras?.githubToken!==void 0);if(X)F(X.id,{provider:"openai",name:X.name,baseUrl:X.baseUrl,model:X.model,apiKey:V.token,extras:{...X.extras,githubToken:V.token}});return!0}catch{return!1}finally{A=null}})(),A}function n(J,Q,Z){if(Y())return{success:!1,warning:"Bare mode: secure storage is disabled."};let y=J.trim();if(!y)return{success:!1,warning:"Token is empty."};let $=L(),j=$.read()||{},z=j[U],V=Q?.trim(),W={accessToken:y};if(V){if(W.oauthAccessToken=V,Z?.trim())W.enterpriseDomain=Z.trim()}else{if(z?.oauthAccessToken?.trim())W.oauthAccessToken=z.oauthAccessToken.trim();let N=Z?.trim()||z?.enterpriseDomain?.trim();if(N)W.enterpriseDomain=N}let X={...j,[U]:W};return $.update(X)}function jJ(){if(Y())return{success:!0};let J=L(),Z={...J.read()||{}};return delete Z[U],J.update(Z)}var U="githubModels",VJ="CLAUDE_CODE_GITHUB_TOKEN_HYDRATED",A=null;var s=B(()=>{p();m();c();O();l()});
|
|
2
|
-
export{R as K2,r as L2,o as M2,e as N2,I as O2,O as P2,U as Q2,VJ as R2,a as S2,WJ as T2,yJ as U2,zJ as V2,n as W2,jJ as X2,s as Y2};
|