@claudiolabs/claudin 0.5.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/LICENSE +207 -0
- package/README.md +91 -0
- package/bin/claudin +152 -0
- package/dist/chunks/AgentTool-0.5.7-0krqsszm.mjs +1 -0
- package/dist/chunks/App-0.5.7-k8c6xsbz.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.5.7-djmd358f.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.5.7-40f5p134.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.5.7-dgpfkf7n.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.5.7-m2n3zekg.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.7-8p2b9258.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.5.7-e11rkgsy.mjs +1 -0
- package/dist/chunks/DiffDialog-0.5.7-df3q0dyx.mjs +3 -0
- package/dist/chunks/Doctor-0.5.7-996gqph8.mjs +1 -0
- package/dist/chunks/Grove-0.5.7-7xphv8qp.mjs +1 -0
- package/dist/chunks/ITermBackend-0.5.7-rv5t26my.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.5.7-76awdeqe.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.5.7-d59ky2sv.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.5.7-nkkcryn5.mjs +1 -0
- package/dist/chunks/Onboarding-0.5.7-v3jtvbkn.mjs +1 -0
- package/dist/chunks/ProviderManager-0.5.7-92navbez.mjs +1 -0
- package/dist/chunks/REPL-0.5.7-6zag11mg.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.5.7-hpgm4f1s.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.5.7-xrverbhp.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.5.7-xn5z7dt4.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.5.7-s29rrsak.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.5.7-3r5mn1za.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.5.7-k3c0537z.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.5.7-mybq3qz5.mjs +1 -0
- package/dist/chunks/TrustDialog-0.5.7-r4dhznyf.mjs +1 -0
- package/dist/chunks/activeProvider-0.5.7-8emdm8j8.mjs +1 -0
- package/dist/chunks/add-dir-0.5.7-jwaavdc7.mjs +1 -0
- package/dist/chunks/agents-0.5.7-e7dajmrs.mjs +110 -0
- package/dist/chunks/agents-0.5.7-q2vtj7pt.mjs +3 -0
- package/dist/chunks/api-0.5.7-j8bn129y.mjs +1 -0
- package/dist/chunks/asciicast-0.5.7-rp1h8swq.mjs +1 -0
- package/dist/chunks/assistant-0.5.7-sfk22b3z.mjs +1 -0
- package/dist/chunks/auth-0.5.7-ez3n1qpx.mjs +1 -0
- package/dist/chunks/auth-0.5.7-khssh83t.mjs +1 -0
- package/dist/chunks/autoMode-0.5.7-ezn856pd.mjs +48 -0
- package/dist/chunks/autoUpdater-0.5.7-dkw2aw1e.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-0.5.7-9ejvx75r.mjs +1 -0
- package/dist/chunks/branch-0.5.7-cjbtbwg1.mjs +4 -0
- package/dist/chunks/bridgePointer-0.5.7-5z0vqchx.mjs +1 -0
- package/dist/chunks/btw-0.5.7-p3kbd1wf.mjs +1 -0
- package/dist/chunks/buddy-0.5.7-pa55rfb4.mjs +3 -0
- package/dist/chunks/cacache-0.5.7-anq54jwq.mjs +1 -0
- package/dist/chunks/cache-probe-0.5.7-6j5hzxc4.mjs +21 -0
- package/dist/chunks/cacheStats-0.5.7-e1byp2n2.mjs +4 -0
- package/dist/chunks/caches-0.5.7-w8n6wxaj.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.5.7-5kkyx4pz.mjs +1 -0
- package/dist/chunks/claudemd-0.5.7-jb7byep9.mjs +1 -0
- package/dist/chunks/clear-0.5.7-tkh04z2c.mjs +1 -0
- package/dist/chunks/clearTerminal-0.5.7-mbqev32s.mjs +1 -0
- package/dist/chunks/cli-0.5.7-023jpnwm.mjs +2 -0
- package/dist/chunks/cli-0.5.7-08mn1pmc.mjs +5 -0
- package/dist/chunks/cli-0.5.7-0bv1xcbe.mjs +21 -0
- package/dist/chunks/cli-0.5.7-0df5m6td.mjs +2 -0
- package/dist/chunks/cli-0.5.7-0rvzfmhb.mjs +2 -0
- package/dist/chunks/cli-0.5.7-0s7wtvbz.mjs +2 -0
- package/dist/chunks/cli-0.5.7-1fmgwk5c.mjs +2 -0
- package/dist/chunks/cli-0.5.7-1kmeaqmc.mjs +2 -0
- package/dist/chunks/cli-0.5.7-20cz322w.mjs +2 -0
- package/dist/chunks/cli-0.5.7-23hg3t0h.mjs +2 -0
- package/dist/chunks/cli-0.5.7-258ytmbr.mjs +2 -0
- package/dist/chunks/cli-0.5.7-26pwg6gg.mjs +2 -0
- package/dist/chunks/cli-0.5.7-2h4rgwc9.mjs +2 -0
- package/dist/chunks/cli-0.5.7-2qxsy7jq.mjs +12 -0
- package/dist/chunks/cli-0.5.7-2tnvc3ka.mjs +2 -0
- package/dist/chunks/cli-0.5.7-2xm61gkr.mjs +5 -0
- package/dist/chunks/cli-0.5.7-2ytftsg5.mjs +2 -0
- package/dist/chunks/cli-0.5.7-31969syr.mjs +2 -0
- package/dist/chunks/cli-0.5.7-31hdc2nc.mjs +2 -0
- package/dist/chunks/cli-0.5.7-35yf0b84.mjs +2 -0
- package/dist/chunks/cli-0.5.7-3jrq7w6x.mjs +2 -0
- package/dist/chunks/cli-0.5.7-3xssm25z.mjs +2 -0
- package/dist/chunks/cli-0.5.7-469r2a5r.mjs +193 -0
- package/dist/chunks/cli-0.5.7-4eg4pktt.mjs +2 -0
- package/dist/chunks/cli-0.5.7-4gmpny6k.mjs +133 -0
- package/dist/chunks/cli-0.5.7-4zv4np07.mjs +2 -0
- package/dist/chunks/cli-0.5.7-500c5b8m.mjs +4 -0
- package/dist/chunks/cli-0.5.7-52mwnwy6.mjs +58 -0
- package/dist/chunks/cli-0.5.7-55zn2cct.mjs +4 -0
- package/dist/chunks/cli-0.5.7-5736yt36.mjs +2 -0
- package/dist/chunks/cli-0.5.7-5aghfr8k.mjs +3 -0
- package/dist/chunks/cli-0.5.7-5by4fby4.mjs +2 -0
- package/dist/chunks/cli-0.5.7-5e5xfeq6.mjs +2 -0
- package/dist/chunks/cli-0.5.7-5jaayymr.mjs +17 -0
- package/dist/chunks/cli-0.5.7-5jms2g5g.mjs +2 -0
- package/dist/chunks/cli-0.5.7-5kv9dgvn.mjs +2 -0
- package/dist/chunks/cli-0.5.7-5mrw857q.mjs +4 -0
- package/dist/chunks/cli-0.5.7-5q6tfz39.mjs +2 -0
- package/dist/chunks/cli-0.5.7-650e2qk4.mjs +18 -0
- package/dist/chunks/cli-0.5.7-67xxeffj.mjs +2 -0
- package/dist/chunks/cli-0.5.7-6d26vvaa.mjs +2 -0
- package/dist/chunks/cli-0.5.7-6g3w68ks.mjs +2 -0
- package/dist/chunks/cli-0.5.7-6gfay8ap.mjs +2 -0
- package/dist/chunks/cli-0.5.7-6gkpb0vw.mjs +2 -0
- package/dist/chunks/cli-0.5.7-6pssgqdn.mjs +2 -0
- package/dist/chunks/cli-0.5.7-6thqe6p4.mjs +3 -0
- package/dist/chunks/cli-0.5.7-73er78b7.mjs +15 -0
- package/dist/chunks/cli-0.5.7-7a9gq9ff.mjs +2 -0
- package/dist/chunks/cli-0.5.7-7hm7dxyp.mjs +2 -0
- package/dist/chunks/cli-0.5.7-7k456xwn.mjs +3 -0
- package/dist/chunks/cli-0.5.7-7mmyazqh.mjs +34 -0
- package/dist/chunks/cli-0.5.7-7rgsmfw7.mjs +3 -0
- package/dist/chunks/cli-0.5.7-7wyhqw17.mjs +2 -0
- package/dist/chunks/cli-0.5.7-82x8qaxx.mjs +2 -0
- package/dist/chunks/cli-0.5.7-89fcvfy0.mjs +2 -0
- package/dist/chunks/cli-0.5.7-8ac9d7r6.mjs +2 -0
- package/dist/chunks/cli-0.5.7-8ap24w7a.mjs +2 -0
- package/dist/chunks/cli-0.5.7-8e61g5bq.mjs +10 -0
- package/dist/chunks/cli-0.5.7-8sbq2qed.mjs +2 -0
- package/dist/chunks/cli-0.5.7-8sqyymdb.mjs +2 -0
- package/dist/chunks/cli-0.5.7-8ychjqct.mjs +16 -0
- package/dist/chunks/cli-0.5.7-93eaxn9a.mjs +2 -0
- package/dist/chunks/cli-0.5.7-93k1z52y.mjs +2 -0
- package/dist/chunks/cli-0.5.7-9acdh8nc.mjs +2 -0
- package/dist/chunks/cli-0.5.7-9jck3vts.mjs +15 -0
- package/dist/chunks/cli-0.5.7-9rbmn26q.mjs +24 -0
- package/dist/chunks/cli-0.5.7-9sysdak3.mjs +2 -0
- package/dist/chunks/cli-0.5.7-9ysat94v.mjs +2 -0
- package/dist/chunks/cli-0.5.7-9z55nm22.mjs +3 -0
- package/dist/chunks/cli-0.5.7-9zwbnq8g.mjs +2 -0
- package/dist/chunks/cli-0.5.7-a47hzz3r.mjs +2 -0
- package/dist/chunks/cli-0.5.7-aq7a3646.mjs +2 -0
- package/dist/chunks/cli-0.5.7-ayjrdmrk.mjs +2 -0
- package/dist/chunks/cli-0.5.7-b51h487f.mjs +2 -0
- package/dist/chunks/cli-0.5.7-bkptgahs.mjs +4 -0
- package/dist/chunks/cli-0.5.7-bnapjxz4.mjs +2 -0
- package/dist/chunks/cli-0.5.7-bzrvdrq4.mjs +2 -0
- package/dist/chunks/cli-0.5.7-c1mv1399.mjs +2 -0
- package/dist/chunks/cli-0.5.7-c9dtw94k.mjs +2 -0
- package/dist/chunks/cli-0.5.7-cakvh73p.mjs +2 -0
- package/dist/chunks/cli-0.5.7-d19d4v07.mjs +2 -0
- package/dist/chunks/cli-0.5.7-d4gtv7f7.mjs +2 -0
- package/dist/chunks/cli-0.5.7-de90yre1.mjs +2 -0
- package/dist/chunks/cli-0.5.7-dntg9qbj.mjs +133 -0
- package/dist/chunks/cli-0.5.7-dp3z7wkh.mjs +2 -0
- package/dist/chunks/cli-0.5.7-dr7n1fyv.mjs +20 -0
- package/dist/chunks/cli-0.5.7-e8eqdfnf.mjs +2 -0
- package/dist/chunks/cli-0.5.7-eer6xagb.mjs +2 -0
- package/dist/chunks/cli-0.5.7-esx85d2g.mjs +2 -0
- package/dist/chunks/cli-0.5.7-eyemfxtz.mjs +2 -0
- package/dist/chunks/cli-0.5.7-fx3gesdm.mjs +2 -0
- package/dist/chunks/cli-0.5.7-g2dd5t6j.mjs +2 -0
- package/dist/chunks/cli-0.5.7-g4n7dg2d.mjs +9 -0
- package/dist/chunks/cli-0.5.7-g7k0r0ea.mjs +5 -0
- package/dist/chunks/cli-0.5.7-g8dqk0se.mjs +2 -0
- package/dist/chunks/cli-0.5.7-gcnk0vke.mjs +6 -0
- package/dist/chunks/cli-0.5.7-gnq8vh0c.mjs +2 -0
- package/dist/chunks/cli-0.5.7-gy4csxb5.mjs +2 -0
- package/dist/chunks/cli-0.5.7-h9v4tqbs.mjs +24 -0
- package/dist/chunks/cli-0.5.7-hdcnw5y4.mjs +2 -0
- package/dist/chunks/cli-0.5.7-hhre0h51.mjs +2 -0
- package/dist/chunks/cli-0.5.7-hp25yk8y.mjs +2 -0
- package/dist/chunks/cli-0.5.7-hq4wbper.mjs +11 -0
- package/dist/chunks/cli-0.5.7-hw11qa05.mjs +3 -0
- package/dist/chunks/cli-0.5.7-hw3pyj8g.mjs +2 -0
- package/dist/chunks/cli-0.5.7-j7h72bgz.mjs +2 -0
- package/dist/chunks/cli-0.5.7-j8q5bja8.mjs +2 -0
- package/dist/chunks/cli-0.5.7-jf3f8gen.mjs +2 -0
- package/dist/chunks/cli-0.5.7-jga8kgpr.mjs +2 -0
- package/dist/chunks/cli-0.5.7-jptzskw1.mjs +2 -0
- package/dist/chunks/cli-0.5.7-jw2te6th.mjs +2 -0
- package/dist/chunks/cli-0.5.7-k11mzgcb.mjs +2 -0
- package/dist/chunks/cli-0.5.7-kctf48t4.mjs +7 -0
- package/dist/chunks/cli-0.5.7-knkzkqbw.mjs +2 -0
- package/dist/chunks/cli-0.5.7-kp9pg4sr.mjs +2 -0
- package/dist/chunks/cli-0.5.7-kvazvrra.mjs +2 -0
- package/dist/chunks/cli-0.5.7-ky5khwx2.mjs +2 -0
- package/dist/chunks/cli-0.5.7-m0841vt9.mjs +2 -0
- package/dist/chunks/cli-0.5.7-m4ekdyhj.mjs +2 -0
- package/dist/chunks/cli-0.5.7-m4wwfa6q.mjs +2 -0
- package/dist/chunks/cli-0.5.7-m5q27x96.mjs +2 -0
- package/dist/chunks/cli-0.5.7-m82d23hf.mjs +2 -0
- package/dist/chunks/cli-0.5.7-mdcw5fyw.mjs +4 -0
- package/dist/chunks/cli-0.5.7-mz4njeb9.mjs +39 -0
- package/dist/chunks/cli-0.5.7-mzfr99sc.mjs +67 -0
- package/dist/chunks/cli-0.5.7-p381d4sx.mjs +3 -0
- package/dist/chunks/cli-0.5.7-p4mv49ab.mjs +25 -0
- package/dist/chunks/cli-0.5.7-pse9qff7.mjs +2 -0
- package/dist/chunks/cli-0.5.7-pzjz115k.mjs +2 -0
- package/dist/chunks/cli-0.5.7-q0pq4367.mjs +9 -0
- package/dist/chunks/cli-0.5.7-q2e6xpch.mjs +5281 -0
- package/dist/chunks/cli-0.5.7-q6sgd9ng.mjs +12 -0
- package/dist/chunks/cli-0.5.7-q8v8naf8.mjs +2 -0
- package/dist/chunks/cli-0.5.7-qdcp748z.mjs +2 -0
- package/dist/chunks/cli-0.5.7-qdqrgv1q.mjs +2 -0
- package/dist/chunks/cli-0.5.7-qk0n5hqa.mjs +9 -0
- package/dist/chunks/cli-0.5.7-r4cdt1b9.mjs +50 -0
- package/dist/chunks/cli-0.5.7-ra5kv4tw.mjs +2 -0
- package/dist/chunks/cli-0.5.7-rb75eq83.mjs +2 -0
- package/dist/chunks/cli-0.5.7-rggstqv6.mjs +2 -0
- package/dist/chunks/cli-0.5.7-rr1yd8f3.mjs +4 -0
- package/dist/chunks/cli-0.5.7-rzts2ke3.mjs +2 -0
- package/dist/chunks/cli-0.5.7-s09knvta.mjs +3 -0
- package/dist/chunks/cli-0.5.7-s5nd54ga.mjs +3 -0
- package/dist/chunks/cli-0.5.7-sb3fjts4.mjs +2 -0
- package/dist/chunks/cli-0.5.7-sjd6g3n6.mjs +15 -0
- package/dist/chunks/cli-0.5.7-sjx0wm99.mjs +2 -0
- package/dist/chunks/cli-0.5.7-skfm51ta.mjs +44 -0
- package/dist/chunks/cli-0.5.7-sx7pr75m.mjs +2 -0
- package/dist/chunks/cli-0.5.7-t6mtpr04.mjs +2 -0
- package/dist/chunks/cli-0.5.7-t8z48kc2.mjs +4 -0
- package/dist/chunks/cli-0.5.7-tbga87q3.mjs +2 -0
- package/dist/chunks/cli-0.5.7-tc3vm4ra.mjs +2 -0
- package/dist/chunks/cli-0.5.7-tgq7dtyz.mjs +2 -0
- package/dist/chunks/cli-0.5.7-tpjjm1z2.mjs +45 -0
- package/dist/chunks/cli-0.5.7-tqn2ged5.mjs +2 -0
- package/dist/chunks/cli-0.5.7-twqt7rxq.mjs +6 -0
- package/dist/chunks/cli-0.5.7-vgc7nzef.mjs +2 -0
- package/dist/chunks/cli-0.5.7-vk8p3n59.mjs +2 -0
- package/dist/chunks/cli-0.5.7-vn5aht50.mjs +2 -0
- package/dist/chunks/cli-0.5.7-vvrg78m6.mjs +2 -0
- package/dist/chunks/cli-0.5.7-vy4r02pg.mjs +4 -0
- package/dist/chunks/cli-0.5.7-vyxaeh82.mjs +2 -0
- package/dist/chunks/cli-0.5.7-w024nwsf.mjs +2 -0
- package/dist/chunks/cli-0.5.7-w16wj21h.mjs +2 -0
- package/dist/chunks/cli-0.5.7-w1bf9y93.mjs +3 -0
- package/dist/chunks/cli-0.5.7-w2fb8g6y.mjs +2 -0
- package/dist/chunks/cli-0.5.7-w50j12vv.mjs +2 -0
- package/dist/chunks/cli-0.5.7-w6nex68w.mjs +2 -0
- package/dist/chunks/cli-0.5.7-wz2cbwxt.mjs +4 -0
- package/dist/chunks/cli-0.5.7-x0n9mq65.mjs +2 -0
- package/dist/chunks/cli-0.5.7-x1azmh1g.mjs +2 -0
- package/dist/chunks/cli-0.5.7-x1w96j6d.mjs +59 -0
- package/dist/chunks/cli-0.5.7-x7dabprd.mjs +2 -0
- package/dist/chunks/cli-0.5.7-x8t1aeey.mjs +2 -0
- package/dist/chunks/cli-0.5.7-xepvraxn.mjs +2 -0
- package/dist/chunks/cli-0.5.7-xn6deh04.mjs +6 -0
- package/dist/chunks/cli-0.5.7-y2vc4xb6.mjs +12 -0
- package/dist/chunks/cli-0.5.7-y3pa8ttm.mjs +2 -0
- package/dist/chunks/cli-0.5.7-yaywev87.mjs +2 -0
- package/dist/chunks/cli-0.5.7-ycj2xr53.mjs +3 -0
- package/dist/chunks/cli-0.5.7-yzncgfs4.mjs +18 -0
- package/dist/chunks/cli-0.5.7-z1n09m4p.mjs +2 -0
- package/dist/chunks/cli-0.5.7-z97pranc.mjs +2 -0
- package/dist/chunks/cli-0.5.7-za19q18c.mjs +2 -0
- package/dist/chunks/cli-0.5.7-zb8ztx8p.mjs +2 -0
- package/dist/chunks/cli-0.5.7-zkw2fx86.mjs +2 -0
- package/dist/chunks/client-0.5.7-bqw74z29.mjs +1 -0
- package/dist/chunks/color-0.5.7-v1s3bvcj.mjs +1 -0
- package/dist/chunks/compact-0.5.7-7kxsprp5.mjs +3 -0
- package/dist/chunks/config-0.5.7-e41nnxnm.mjs +1 -0
- package/dist/chunks/config-0.5.7-q40ykcbb.mjs +1 -0
- package/dist/chunks/context-0.5.7-qvcehmj5.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.5.7-02tkje0w.mjs +1 -0
- package/dist/chunks/conversation-0.5.7-h7r20gzw.mjs +1 -0
- package/dist/chunks/copy-0.5.7-p3xxq9b3.mjs +9 -0
- package/dist/chunks/cost-0.5.7-s3rzm0vd.mjs +1 -0
- package/dist/chunks/createSSHSession-0.5.7-s9fc5f1h.mjs +1 -0
- package/dist/chunks/createSession-0.5.7-4e64teqm.mjs +1 -0
- package/dist/chunks/debug-0.5.7-v8bqkmzm.mjs +1 -0
- package/dist/chunks/desktop-0.5.7-tna0yskx.mjs +1 -0
- package/dist/chunks/detectRepository-0.5.7-3dy7yz89.mjs +1 -0
- package/dist/chunks/detection-0.5.7-39zsjy8t.mjs +1 -0
- package/dist/chunks/diff-0.5.7-9ywmnxmx.mjs +1 -0
- package/dist/chunks/doctor-0.5.7-ty5zxpem.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-0.5.7-g458bh9g.mjs +1 -0
- package/dist/chunks/earlyInput-0.5.7-x73yj3dn.mjs +1 -0
- package/dist/chunks/effort-0.5.7-h76k43fj.mjs +10 -0
- package/dist/chunks/envUtils-0.5.7-w1t7akfc.mjs +1 -0
- package/dist/chunks/environmentSelection-0.5.7-5dsnr0sv.mjs +1 -0
- package/dist/chunks/environments-0.5.7-pqh2gnjb.mjs +1 -0
- package/dist/chunks/errors-0.5.7-pa0hz043.mjs +1 -0
- package/dist/chunks/exampleCommands-0.5.7-3dtjxdad.mjs +1 -0
- package/dist/chunks/exit-0.5.7-0wrw77gk.mjs +1 -0
- package/dist/chunks/export-0.5.7-zw9rbf4j.mjs +2 -0
- package/dist/chunks/extra-usage-0.5.7-rfya84j0.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.5.7-a1b9ndnm.mjs +1 -0
- package/dist/chunks/fast-0.5.7-2p6srbep.mjs +1 -0
- package/dist/chunks/feedback-0.5.7-181z18rn.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.5.7-xndd9dd0.mjs +1 -0
- package/dist/chunks/git-0.5.7-7gyptyxn.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.5.7-9zhn44n6.mjs +1 -0
- package/dist/chunks/growthbook-0.5.7-1mynkk8j.mjs +1 -0
- package/dist/chunks/headless-0.5.7-9f87m6f5.mjs +2 -0
- package/dist/chunks/heapdump-0.5.7-ns6mqawv.mjs +6 -0
- package/dist/chunks/help-0.5.7-px56h6fs.mjs +1 -0
- package/dist/chunks/hookChains-0.5.7-1a6qvexe.mjs +3 -0
- package/dist/chunks/hooks-0.5.7-azm2m6rs.mjs +79 -0
- package/dist/chunks/hooks-0.5.7-fyp8e3f5.mjs +1 -0
- package/dist/chunks/ide-0.5.7-v9hbn8cp.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.5.7-e41p58ef.mjs +1 -0
- package/dist/chunks/index-0.5.7-0tncgnn3.mjs +1 -0
- package/dist/chunks/index-0.5.7-30mrmtkn.mjs +1 -0
- package/dist/chunks/index-0.5.7-62s7cp1b.mjs +1 -0
- package/dist/chunks/index-0.5.7-69akvbm4.mjs +1 -0
- package/dist/chunks/index-0.5.7-6y6f5cws.mjs +1 -0
- package/dist/chunks/index-0.5.7-7w3agvzm.mjs +10 -0
- package/dist/chunks/index-0.5.7-8jwymzr6.mjs +1 -0
- package/dist/chunks/index-0.5.7-8m53gyr6.mjs +9 -0
- package/dist/chunks/index-0.5.7-ct6jw15p.mjs +2 -0
- package/dist/chunks/index-0.5.7-dr470b86.mjs +1 -0
- package/dist/chunks/index-0.5.7-e4rvp0fn.mjs +1 -0
- package/dist/chunks/index-0.5.7-fkw6rn8z.mjs +1 -0
- package/dist/chunks/index-0.5.7-h1xjcbtb.mjs +1 -0
- package/dist/chunks/index-0.5.7-ma3xmxv3.mjs +2 -0
- package/dist/chunks/index-0.5.7-qn7zmh31.mjs +9 -0
- package/dist/chunks/index-0.5.7-rd44m0e6.mjs +30 -0
- package/dist/chunks/index-0.5.7-te1s21zz.mjs +5 -0
- package/dist/chunks/index-0.5.7-vm9zmzmr.mjs +1 -0
- package/dist/chunks/index-0.5.7-wpffxvtn.mjs +1 -0
- package/dist/chunks/index-0.5.7-wwfn7x53.mjs +1 -0
- package/dist/chunks/index-0.5.7-ybcvbcjt.mjs +1 -0
- package/dist/chunks/index-0.5.7-yw3tp60c.mjs +1 -0
- package/dist/chunks/initReplBridge-0.5.7-xpy8ap8n.mjs +1 -0
- package/dist/chunks/ink-0.5.7-dwmx157s.mjs +1 -0
- package/dist/chunks/insights-0.5.7-5fpd27dr.mjs +870 -0
- package/dist/chunks/install-0.5.7-6sc73ew8.mjs +1 -0
- package/dist/chunks/install-github-app-0.5.7-jcyktynf.mjs +149 -0
- package/dist/chunks/install-slack-app-0.5.7-mk4a14ww.mjs +1 -0
- package/dist/chunks/instrumentation-0.5.7-116w6tf4.mjs +1 -0
- package/dist/chunks/interactiveHelpers-0.5.7-zbfkwcsb.mjs +1 -0
- package/dist/chunks/keybindings-0.5.7-k2s0bryc.mjs +2 -0
- package/dist/chunks/knowledge-0.5.7-55b2ckth.mjs +2 -0
- package/dist/chunks/latestVersionCache-0.5.7-k9pyxzrk.mjs +1 -0
- package/dist/chunks/loadAgentsDir-0.5.7-9bmbg04z.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.7-bcdwwerp.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.7-mdt3yvfc.mjs +1 -0
- package/dist/chunks/log-0.5.7-wcft0eyv.mjs +1 -0
- package/dist/chunks/main-0.5.7-9sxhszx9.mjs +1236 -0
- package/dist/chunks/managedEnv-0.5.7-k4gyyt60.mjs +1 -0
- package/dist/chunks/mcp-0.5.7-9z74evcf.mjs +1 -0
- package/dist/chunks/mcp-0.5.7-djz3mjw4.mjs +4 -0
- package/dist/chunks/mcp-0.5.7-n62qd49c.mjs +17 -0
- package/dist/chunks/mcpb-0.5.7-bqt73vjr.mjs +1 -0
- package/dist/chunks/memory-0.5.7-chxjrvf2.mjs +3 -0
- package/dist/chunks/mobile-0.5.7-y0cn32br.mjs +2 -0
- package/dist/chunks/model-0.5.7-7mt2xn7w.mjs +1 -0
- package/dist/chunks/model-0.5.7-fdhr0cwa.mjs +2 -0
- package/dist/chunks/oauth-0.5.7-xf0qbv6v.mjs +1 -0
- package/dist/chunks/openaiShim-0.5.7-0cejk3sb.mjs +14 -0
- package/dist/chunks/output-style-0.5.7-t5qc5jxe.mjs +1 -0
- package/dist/chunks/package-APBHZ5F3-0.5.7-7bp8s9sg.mjs +1 -0
- package/dist/chunks/parseConnectUrl-0.5.7-903apk0t.mjs +1 -0
- package/dist/chunks/parser-0.5.7-jnq01hth.mjs +1 -0
- package/dist/chunks/passes-0.5.7-nk3fgxyh.mjs +1 -0
- package/dist/chunks/permissions-0.5.7-q7whkp76.mjs +3 -0
- package/dist/chunks/plan-0.5.7-w5hgy3s7.mjs +1 -0
- package/dist/chunks/plist-0.5.7-jwz5qjtz.mjs +1 -0
- package/dist/chunks/plugin-0.5.7-x7xcey6d.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.5.7-gy2e0dge.mjs +1 -0
- package/dist/chunks/plugins-0.5.7-2ehzph1a.mjs +9 -0
- package/dist/chunks/print-0.5.7-mjx6j0dk.mjs +57 -0
- package/dist/chunks/privacy-settings-0.5.7-rkmc34t8.mjs +1 -0
- package/dist/chunks/process-0.5.7-8c0qwpv6.mjs +1 -0
- package/dist/chunks/processBashCommand-0.5.7-czwzjsj9.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.5.7-512rz16m.mjs +9 -0
- package/dist/chunks/prompt-0.5.7-r8ewyzer.mjs +1 -0
- package/dist/chunks/prompt-0.5.7-z98k679g.mjs +1 -0
- package/dist/chunks/prompts-0.5.7-g8mh8as5.mjs +1 -0
- package/dist/chunks/protocolHandler-0.5.7-p86as7s6.mjs +13 -0
- package/dist/chunks/provider-0.5.7-x4t1g0nh.mjs +2 -0
- package/dist/chunks/providerProfiles-0.5.7-dz70g8ys.mjs +1 -0
- package/dist/chunks/rate-limit-options-0.5.7-n282sweb.mjs +1 -0
- package/dist/chunks/registry-0.5.7-h8q8eay6.mjs +1 -0
- package/dist/chunks/release-notes-0.5.7-2h20frk0.mjs +5 -0
- package/dist/chunks/reload-plugins-0.5.7-z50apk74.mjs +2 -0
- package/dist/chunks/remote-env-0.5.7-08abe77m.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.5.7-jdasqn18.mjs +1 -0
- package/dist/chunks/remoteSession-0.5.7-nq05jhdv.mjs +1 -0
- package/dist/chunks/rename-0.5.7-812j1w4d.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.5.7-aa3cp3ea.mjs +1 -0
- package/dist/chunks/resume-0.5.7-weq0rn3m.mjs +2 -0
- package/dist/chunks/rewind-0.5.7-y54y78kx.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.5.7-tb5qenm4.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.5.7-nxcpekeq.mjs +1 -0
- package/dist/chunks/session-0.5.7-ky2s0856.mjs +2 -0
- package/dist/chunks/sessionDiscovery-0.5.7-wr82xcxs.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-0.5.7-0j8f4we0.mjs +1 -0
- package/dist/chunks/sessionStorage-0.5.7-qghsxmr2.mjs +1 -0
- package/dist/chunks/settings-0.5.7-xa4hccmb.mjs +1 -0
- package/dist/chunks/setup-0.5.7-s4yfpbyd.mjs +5 -0
- package/dist/chunks/sinks-0.5.7-feq030bq.mjs +1 -0
- package/dist/chunks/skills-0.5.7-h2r9d209.mjs +1 -0
- package/dist/chunks/startupProfiler-0.5.7-f44bsnqn.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-0.5.7-7ff14fag.mjs +1 -0
- package/dist/chunks/state-0.5.7-cwk8b4cx.mjs +1 -0
- package/dist/chunks/stats-0.5.7-wd077xj7.mjs +6 -0
- package/dist/chunks/status-0.5.7-5qy7pnk9.mjs +1 -0
- package/dist/chunks/stickers-0.5.7-7s145w6d.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.5.7-5dv3w3xn.mjs +1 -0
- package/dist/chunks/tasks-0.5.7-q79z0h3e.mjs +1 -0
- package/dist/chunks/teamHelpers-0.5.7-b8qf5f0d.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.5.7-kvmjwag8.mjs +1 -0
- package/dist/chunks/teleport-0.5.7-x740q45r.mjs +1 -0
- package/dist/chunks/terminalSetup-0.5.7-z8ytqt6q.mjs +1 -0
- package/dist/chunks/theme-0.5.7-9asaqpc9.mjs +1 -0
- package/dist/chunks/thinkback-0.5.7-6bzqdm8h.mjs +1 -0
- package/dist/chunks/thinkback-play-0.5.7-5m54zaez.mjs +1 -0
- package/dist/chunks/toolPool-0.5.7-5rd6jp71.mjs +1 -0
- package/dist/chunks/toolSearch-0.5.7-wgqasfmq.mjs +1 -0
- package/dist/chunks/trustedDevice-0.5.7-5qbzragc.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.5.7-3fjybn8j.mjs +69 -0
- package/dist/chunks/ultrareviewCommand-0.5.7-98p7mn4r.mjs +4 -0
- package/dist/chunks/update-0.5.7-2jgnt5gj.mjs +86 -0
- package/dist/chunks/upgrade-0.5.7-1fa84f4g.mjs +1 -0
- package/dist/chunks/upstreamproxy-0.5.7-1p7vn612.mjs +14 -0
- package/dist/chunks/url-handler-napi-0.5.7-312p1719.mjs +1 -0
- package/dist/chunks/usage-0.5.7-qrsabcka.mjs +1 -0
- package/dist/chunks/util-0.5.7-tpzcah5j.mjs +1 -0
- package/dist/chunks/utils-0.5.7-8a2ekyr5.mjs +1 -0
- package/dist/chunks/vim-0.5.7-w4e8vpjf.mjs +1 -0
- package/dist/chunks/watcher-0.5.7-cj50b60x.mjs +1 -0
- package/dist/chunks/wiki-0.5.7-ccjdtg8v.mjs +132 -0
- package/dist/chunks/worktree-0.5.7-g8wrf9zf.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.5.7-w4jdaq8p.mjs +1 -0
- package/dist/chunks/wrapper-0.5.7-8k82xd0n.mjs +7 -0
- package/dist/claudin-vscode.vsix +0 -0
- package/dist/cli.mjs +7 -0
- package/package.json +141 -0
- package/scripts/v8cache-gc.mjs +84 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{VP as t,WP as E,YP as a,ZP as o,_P as s,dQ as GQ}from"./cli-0.5.7-w16wj21h.mjs";import{$Y as r,ZY as N}from"./cli-0.5.7-20cz322w.mjs";import{v2 as U,w2 as I}from"./cli-0.5.7-8ychjqct.mjs";import{O3 as n,V3 as KQ}from"./cli-0.5.7-g4n7dg2d.mjs";import{F5 as e,X5 as jQ}from"./cli-0.5.7-yzncgfs4.mjs";import{k6 as Y,m6 as h}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as u,Pea as ZQ}from"./cli-0.5.7-26pwg6gg.mjs";import{Pfa as K,Sfa as b,sfa as k,tfa as R,xfa as y}from"./cli-0.5.7-twqt7rxq.mjs";import{Gga as H,Hga as i,Nga as F}from"./cli-0.5.7-skfm51ta.mjs";ZQ();b();h();F();y();function D(Q){if(Q<60000)return`${Math.round(Q/1000)}s`;let W=Math.floor(Q/60000),Z=Math.round(Q%60000/1000);return Z>0?`${W}m ${Z}s`:`${W}m`}function $Q(Q){let Z=(Q.startsWith("sk-ant-si-")?Q.slice(10):Q).split(".");if(Z.length!==3||!Z[1])return null;try{return R(Buffer.from(Z[1],"base64url").toString("utf8"))}catch{return null}}function f(Q){let W=$Q(Q);if(W!==null&&typeof W==="object"&&"exp"in W&&typeof W.exp==="number")return W.exp;return null}var zQ=300000,p=1800000,m=3,JQ=60000;function FQ({getAccessToken:Q,onRefresh:W,label:Z,refreshBufferMs:z=zQ}){let $=new Map,J=new Map,G=new Map;function X(V){let w=(G.get(V)??0)+1;return G.set(V,w),w}function q(V,w){let j=f(w);if(!j){K(`[${Z}:token] Could not decode JWT expiry for sessionId=${V}, token prefix=${w.slice(0,15)}…, keeping existing timer`);return}let C=$.get(V);if(C)clearTimeout(C);let B=X(V),P=new Date(j*1000).toISOString(),v=j*1000-Date.now()-z;if(v<=0){K(`[${Z}:token] Token for sessionId=${V} expires=${P} (past or within buffer), refreshing immediately`),O(V,B);return}K(`[${Z}:token] Scheduled token refresh for sessionId=${V} in ${D(v)} (expires=${P}, buffer=${z/1000}s)`);let WQ=setTimeout(O,v,V,B);$.set(V,WQ)}function L(V,w){let j=$.get(V);if(j)clearTimeout(j);let C=X(V),B=Math.max(w*1000-z,30000);K(`[${Z}:token] Scheduled token refresh for sessionId=${V} in ${D(B)} (expires_in=${w}s, buffer=${z/1000}s)`);let P=setTimeout(O,B,V,C);$.set(V,P)}async function O(V,w){let j;try{j=await Q()}catch(B){K(`[${Z}:token] getAccessToken threw for sessionId=${V}: ${H(B)}`,{level:"error"})}if(G.get(V)!==w){K(`[${Z}:token] doRefresh for sessionId=${V} stale (gen ${w} vs ${G.get(V)}), skipping`);return}if(!j){let B=(J.get(V)??0)+1;if(J.set(V,B),K(`[${Z}:token] No OAuth token available for refresh, sessionId=${V} (failure ${B}/${m})`,{level:"error"}),Y("error","bridge_token_refresh_no_oauth"),B<m){let P=setTimeout(O,JQ,V,w);$.set(V,P)}return}J.delete(V),K(`[${Z}:token] Refreshing token for sessionId=${V}: new token prefix=${j.slice(0,15)}…`),u("tengu_bridge_token_refreshed",{}),W(V,j);let C=setTimeout(O,p,V,w);$.set(V,C),K(`[${Z}:token] Scheduled follow-up refresh for sessionId=${V} in ${D(p)}`)}function _(V){X(V);let w=$.get(V);if(w)clearTimeout(w),$.delete(V);J.delete(V)}function QQ(){for(let V of G.keys())X(V);for(let V of $.values())clearTimeout(V);$.clear(),J.clear()}return{schedule:q,scheduleFromExpiresIn:L,cancel:_,cancelAll:QQ}}import{randomUUID as g}from"crypto";b();h();F();KQ();GQ();a();I();r();y();class T extends Error{retryAfterMs;constructor(Q,W){super(Q);this.retryAfterMs=W}}class x{pending=[];pendingAtClose=0;draining=!1;closed=!1;backpressureResolvers=[];sleepResolve=null;flushResolvers=[];droppedBatches=0;config;constructor(Q){this.config=Q}get droppedBatchCount(){return this.droppedBatches}get pendingCount(){return this.closed?this.pendingAtClose:this.pending.length}async enqueue(Q){if(this.closed)return;let W=Array.isArray(Q)?Q:[Q];if(W.length===0)return;while(this.pending.length+W.length>this.config.maxQueueSize&&!this.closed)await new Promise((Z)=>{this.backpressureResolvers.push(Z)});if(this.closed)return;this.pending.push(...W),this.drain()}flush(){if(this.pending.length===0&&!this.draining)return Promise.resolve();return this.drain(),new Promise((Q)=>{this.flushResolvers.push(Q)})}close(){if(this.closed)return;this.closed=!0,this.pendingAtClose=this.pending.length,this.pending=[],this.sleepResolve?.(),this.sleepResolve=null;for(let Q of this.backpressureResolvers)Q();this.backpressureResolvers=[];for(let Q of this.flushResolvers)Q();this.flushResolvers=[]}async drain(){if(this.draining||this.closed)return;this.draining=!0;let Q=0;try{while(this.pending.length>0&&!this.closed){let W=this.takeBatch();if(W.length===0)continue;try{await this.config.send(W),Q=0}catch(Z){if(Q++,this.config.maxConsecutiveFailures!==void 0&&Q>=this.config.maxConsecutiveFailures){this.droppedBatches++,this.config.onBatchDropped?.(W.length,Q),Q=0,this.releaseBackpressure();continue}this.pending=W.concat(this.pending);let z=Z instanceof T?Z.retryAfterMs:void 0;await this.sleep(this.retryDelay(Q,z));continue}this.releaseBackpressure()}}finally{if(this.draining=!1,this.pending.length===0){for(let W of this.flushResolvers)W();this.flushResolvers=[]}}}takeBatch(){let{maxBatchSize:Q,maxBatchBytes:W}=this.config;if(W===void 0)return this.pending.splice(0,Q);let Z=0,z=0;while(z<this.pending.length&&z<Q){let $;try{$=Buffer.byteLength(k(this.pending[z]))}catch{this.pending.splice(z,1);continue}if(z>0&&Z+$>W)break;Z+=$,z++}return this.pending.splice(0,z)}retryDelay(Q,W){let Z=Math.random()*this.config.jitterMs;if(W!==void 0)return Math.max(this.config.baseDelayMs,Math.min(W,this.config.maxDelayMs))+Z;return Math.min(this.config.baseDelayMs*2**(Q-1),this.config.maxDelayMs)+Z}releaseBackpressure(){let Q=this.backpressureResolvers;this.backpressureResolvers=[];for(let W of Q)W()}sleep(Q){return new Promise((W)=>{this.sleepResolve=W,setTimeout((Z,z)=>{Z.sleepResolve=null,z()},Q,this,W)})}}I();class c{inflight=null;pending=null;closed=!1;config;constructor(Q){this.config=Q}enqueue(Q){if(this.closed)return;this.pending=this.pending?d(this.pending,Q):Q,this.drain()}close(){this.closed=!0,this.pending=null}async drain(){if(this.inflight||this.closed)return;if(!this.pending)return;let Q=this.pending;this.pending=null,this.inflight=this.sendWithRetry(Q).then(()=>{if(this.inflight=null,this.pending&&!this.closed)this.drain()})}async sendWithRetry(Q){let W=Q,Z=0;while(!this.closed){if(await this.config.send(W))return;if(Z++,await U(this.retryDelay(Z)),this.pending&&!this.closed)W=d(W,this.pending),this.pending=null}}retryDelay(Q){let W=Math.min(this.config.baseDelayMs*2**(Q-1),this.config.maxDelayMs),Z=Math.random()*this.config.jitterMs;return W+Z}}function d(Q,W){let Z={...Q};for(let[z,$]of Object.entries(W))if((z==="external_metadata"||z==="internal_metadata")&&Z[z]&&typeof Z[z]==="object"&&typeof $==="object"&&$!==null)Z[z]={...Z[z],...$};else Z[z]=$;return Z}var VQ=20000,YQ=100;function l(){return!0}class M extends Error{reason;constructor(Q){super(`CCRClient init failed: ${Q}`);this.reason=Q}}var XQ=10;function qQ(){return{byMessage:new Map,scopeToMessage:new Map}}function S(Q){return`${Q.session_id}:${Q.parent_tool_use_id??""}`}function wQ(Q,W){let Z=[],z=new Map;for(let $ of Q)switch($.event.type){case"message_start":{let J=$.event.message.id,G=W.scopeToMessage.get(S($));if(G)W.byMessage.delete(G);W.scopeToMessage.set(S($),J),W.byMessage.set(J,[]),Z.push($);break}case"content_block_delta":{if($.event.delta.type!=="text_delta"){Z.push($);break}let J=W.scopeToMessage.get(S($)),G=J?W.byMessage.get(J):void 0;if(!G){Z.push($);break}let X=G[$.event.index]??=[];X.push($.event.delta.text);let q=z.get(X);if(q){q.event.delta.text=X.join("");break}let L={type:"stream_event",uuid:$.uuid,session_id:$.session_id,parent_tool_use_id:$.parent_tool_use_id,event:{type:"content_block_delta",index:$.event.index,delta:{type:"text_delta",text:X.join("")}}};z.set(X,L),Z.push(L);break}default:Z.push($)}return Z}function LQ(Q,W){Q.byMessage.delete(W.message.id);let Z=S(W);if(Q.scopeToMessage.get(Z)===W.message.id)Q.scopeToMessage.delete(Z)}class OQ{workerEpoch=0;heartbeatIntervalMs;heartbeatJitterFraction;heartbeatTimer=null;heartbeatInFlight=!1;closed=!1;consecutiveAuthFailures=0;currentState=null;sessionBaseUrl;sessionId;http=n({keepAlive:!0});streamEventBuffer=[];streamEventTimer=null;streamTextAccumulator=qQ();workerState;eventUploader;internalEventUploader;deliveryUploader;onEpochMismatch;getAuthHeaders;constructor(Q,W,Z){if(this.onEpochMismatch=Z?.onEpochMismatch??(()=>{process.exit(1)}),this.heartbeatIntervalMs=Z?.heartbeatIntervalMs??VQ,this.heartbeatJitterFraction=Z?.heartbeatJitterFraction??0,this.getAuthHeaders=Z?.getAuthHeaders??E,W.protocol!=="http:"&&W.protocol!=="https:")throw Error(`CCRClient: Expected http(s) URL, got ${W.protocol}`);let z=W.pathname.replace(/\/$/,"");this.sessionBaseUrl=`${W.protocol}//${W.host}${z}`,this.sessionId=z.split("/").pop()||"",this.workerState=new c({send:($)=>this.request("put","/worker",{worker_epoch:this.workerEpoch,...$},"PUT worker").then((J)=>J.ok),baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.eventUploader=new x({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:1e5,send:async($)=>{let J=await this.request("post","/worker/events",{worker_epoch:this.workerEpoch,events:$},"client events");if(!J.ok)throw new T("client event POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.internalEventUploader=new x({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:200,send:async($)=>{let J=await this.request("post","/worker/internal-events",{worker_epoch:this.workerEpoch,events:$},"internal events");if(!J.ok)throw new T("internal event POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.deliveryUploader=new x({maxBatchSize:64,maxQueueSize:64,send:async($)=>{let J=await this.request("post","/worker/events/delivery",{worker_epoch:this.workerEpoch,updates:$.map((G)=>({event_id:G.eventId,status:G.status}))},"delivery batch");if(!J.ok)throw new T("delivery POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),Q.setOnEvent(($)=>{this.reportDelivery($.event_id,"received")})}async initialize(Q){let W=Date.now();if(Object.keys(this.getAuthHeaders()).length===0)throw new M("no_auth_headers");if(Q===void 0){let G=process.env.CLAUDE_CODE_WORKER_EPOCH;Q=G?parseInt(G,10):NaN}if(isNaN(Q))throw new M("missing_epoch");this.workerEpoch=Q;let Z=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 M("worker_register_failed");this.currentState="idle",this.startHeartbeat(),o(()=>{this.writeEvent({type:"keep_alive"})}),K(`CCRClient: initialized, epoch=${this.workerEpoch}`),Y("info","cli_worker_lifecycle_initialized",{epoch:this.workerEpoch,duration_ms:Date.now()-W});let{metadata:$,durationMs:J}=await Z;if(!this.closed)Y("info","cli_worker_state_restored",{duration_ms:J,had_state:$!==null});return $}async getWorkerState(){let Q=Date.now(),W=this.getAuthHeaders();if(Object.keys(W).length===0)return{metadata:null,durationMs:0};return{metadata:(await this.getWithRetry(`${this.sessionBaseUrl}/worker`,W,"worker_state"))?.worker?.external_metadata??null,durationMs:Date.now()-Q}}async request(Q,W,Z,z,{timeout:$=1e4}={}){let J=this.getAuthHeaders();if(Object.keys(J).length===0)return{ok:!1};try{let G=await this.http[Q](`${this.sessionBaseUrl}${W}`,Z,{headers:{...J,"Content-Type":"application/json","anthropic-version":"2023-06-01","User-Agent":N()},validateStatus:l,timeout:$});if(G.status>=200&&G.status<300)return this.consecutiveAuthFailures=0,{ok:!0};if(G.status===409)this.handleEpochMismatch();if(G.status===401||G.status===403){let X=t(),q=X?f(X):null;if(q!==null&&q*1000<Date.now())K(`CCRClient: session_token expired (exp=${new Date(q*1000).toISOString()}) — no refresh was delivered, exiting`,{level:"error"}),Y("error","cli_worker_token_expired_no_refresh"),this.onEpochMismatch();if(this.consecutiveAuthFailures++,this.consecutiveAuthFailures>=XQ)K(`CCRClient: ${this.consecutiveAuthFailures} consecutive auth failures with a valid-looking token — server-side auth unrecoverable, exiting`,{level:"error"}),Y("error","cli_worker_auth_failures_exhausted"),this.onEpochMismatch()}if(K(`CCRClient: ${z} returned ${G.status}`,{level:"warn"}),Y("warn","cli_worker_request_failed",{method:Q,path:W,status:G.status}),G.status===429){let X=G.headers?.["retry-after"],q=typeof X==="string"?parseInt(X,10):NaN;if(!isNaN(q)&&q>=0)return{ok:!1,retryAfterMs:q*1000}}return{ok:!1}}catch(G){return K(`CCRClient: ${z} failed: ${H(G)}`,{level:"warn"}),Y("warn","cli_worker_request_error",{method:Q,path:W,error_code:i(G)}),{ok:!1}}}reportState(Q,W){if(Q===this.currentState&&!W)return;this.currentState=Q,this.workerState.enqueue({worker_status:Q,requires_action_details:W?{tool_name:W.tool_name,action_description:W.action_description,request_id:W.request_id}:null})}reportMetadata(Q){this.workerState.enqueue({external_metadata:Q})}handleEpochMismatch(){K("CCRClient: Epoch mismatch (409), shutting down",{level:"error"}),Y("error","cli_worker_epoch_mismatch"),this.onEpochMismatch()}startHeartbeat(){this.stopHeartbeat();let Q=()=>{let Z=this.heartbeatIntervalMs*this.heartbeatJitterFraction*(2*Math.random()-1);this.heartbeatTimer=setTimeout(W,this.heartbeatIntervalMs+Z)},W=()=>{if(this.sendHeartbeat(),this.heartbeatTimer===null)return;Q()};Q()}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)K("CCRClient: Heartbeat sent")}finally{this.heartbeatInFlight=!1}}async writeEvent(Q){if(Q.type==="stream_event"){if(this.streamEventBuffer.push(Q),!this.streamEventTimer)this.streamEventTimer=setTimeout(()=>void this.flushStreamEventBuffer(),YQ);return}if(await this.flushStreamEventBuffer(),Q.type==="assistant")LQ(this.streamTextAccumulator,Q);await this.eventUploader.enqueue(this.toClientEvent(Q))}toClientEvent(Q){let W=Q;return{payload:{...W,uuid:typeof W.uuid==="string"?W.uuid:g()}}}async flushStreamEventBuffer(){if(this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;if(this.streamEventBuffer.length===0)return;let Q=this.streamEventBuffer;this.streamEventBuffer=[];let W=wQ(Q,this.streamTextAccumulator);await this.eventUploader.enqueue(W.map((Z)=>({payload:Z,ephemeral:!0})))}async writeInternalEvent(Q,W,{isCompaction:Z=!1,agentId:z}={}){let $={payload:{type:Q,...W,uuid:typeof W.uuid==="string"?W.uuid:g()},...Z&&{is_compaction:!0},...z&&{agent_id:z}};await this.internalEventUploader.enqueue($)}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(Q,W,Z){let z=this.getAuthHeaders();if(Object.keys(z).length===0)return null;let $=[],J;do{let G=new URL(`${this.sessionBaseUrl}${Q}`);for(let[q,L]of Object.entries(W))G.searchParams.set(q,L);if(J)G.searchParams.set("cursor",J);let X=await this.getWithRetry(G.toString(),z,Z);if(!X)return null;$.push(...X.data??[]),J=X.next_cursor}while(J);return K(`CCRClient: Read ${$.length} internal events from ${Q}${W.subagents?" (subagents)":""}`),$}async getWithRetry(Q,W,Z){for(let z=1;z<=10;z++){let $;try{$=await this.http.get(Q,{headers:{...W,"anthropic-version":"2023-06-01","User-Agent":N()},validateStatus:l,timeout:30000})}catch(J){if(K(`CCRClient: GET ${Q} failed (attempt ${z}/10): ${H(J)}`,{level:"warn"}),z<10){let G=Math.min(500*2**(z-1),30000)+Math.random()*500;await U(G)}continue}if($.status>=200&&$.status<300)return $.data;if($.status===409)this.handleEpochMismatch();if(K(`CCRClient: GET ${Q} returned ${$.status} (attempt ${z}/10)`,{level:"warn"}),z<10){let J=Math.min(500*2**(z-1),30000)+Math.random()*500;await U(J)}}return K("CCRClient: GET retries exhausted",{level:"error"}),Y("error","cli_worker_get_retries_exhausted",{context:Z}),null}reportDelivery(Q,W){this.deliveryUploader.enqueue({eventId:Q,status:W})}getWorkerEpoch(){return this.workerEpoch}get internalEventsPending(){return this.internalEventUploader.pendingCount}close(){if(this.closed=!0,this.stopHeartbeat(),s(),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()}}jQ();b();h();F();a();I();y();r();var BQ=1000,HQ=30000,UQ=600000,CQ=45000,PQ=new Set([401,403,404]),A=10,TQ=500,NQ=8000,kQ={stream:!0};function xQ(){return!0}function AQ(Q){let W=[],Z=0,z;while((z=Q.indexOf(`
|
|
2
|
+
|
|
3
|
+
`,Z))!==-1){let $=Q.slice(Z,z);if(Z=z+2,!$.trim())continue;let J={},G=!1;for(let X of $.split(`
|
|
4
|
+
`)){if(X.startsWith(":")){G=!0;continue}let q=X.indexOf(":");if(q===-1)continue;let L=X.slice(0,q),O=X[q+1]===" "?X.slice(q+2):X.slice(q+1);switch(L){case"event":J.event=O;break;case"id":J.id=O;break;case"data":J.data=J.data?J.data+`
|
|
5
|
+
`+O:O;break}}if(J.data||G)W.push(J)}return{frames:W,remaining:Q.slice(Z)}}class _Q{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(Q,W={},Z,z,$,J){this.url=Q;if(this.headers=W,this.sessionId=Z,this.refreshHeaders=z,this.getAuthHeaders=J??E,this.postUrl=RQ(Q),$!==void 0&&$>0)this.lastSequenceNum=$;K(`SSETransport: SSE URL = ${Q.href}`),K(`SSETransport: POST URL = ${this.postUrl}`),Y("info","cli_sse_transport_initialized")}getLastSequenceNum(){return this.lastSequenceNum}async connect(){if(this.state!=="idle"&&this.state!=="reconnecting"){K(`SSETransport: Cannot connect, current state is ${this.state}`,{level:"error"}),Y("error","cli_sse_connect_failed");return}this.state="reconnecting";let Q=Date.now(),W=new URL(this.url.href);if(this.lastSequenceNum>0)W.searchParams.set("from_sequence_num",String(this.lastSequenceNum));let Z=this.getAuthHeaders(),z={...this.headers,...Z,Accept:"text/event-stream","anthropic-version":"2023-06-01","User-Agent":N()};if(Z.Cookie)delete z.Authorization;if(this.lastSequenceNum>0)z["Last-Event-ID"]=String(this.lastSequenceNum);K(`SSETransport: Opening ${W.href}`),Y("info","cli_sse_connect_opening"),this.abortController=new AbortController;try{let $=await fetch(W.href,{headers:z,signal:this.abortController.signal});if(!$.ok){let G=PQ.has($.status);if(K(`SSETransport: HTTP ${$.status}${G?" (permanent)":""}`,{level:"error"}),Y("error","cli_sse_connect_http_error",{status:$.status}),G){this.state="closed",this.onCloseCallback?.($.status);return}this.handleConnectionError();return}if(!$.body){K("SSETransport: No response body"),this.handleConnectionError();return}let J=Date.now()-Q;K("SSETransport: Connected"),Y("info","cli_sse_connect_connected",{duration_ms:J}),this.state="connected",this.reconnectAttempts=0,this.reconnectStartTime=null,this.resetLivenessTimer(),await this.readStream($.body)}catch($){if(this.abortController?.signal.aborted)return;K(`SSETransport: Connection error: ${H($)}`,{level:"error"}),Y("error","cli_sse_connect_error"),this.handleConnectionError()}}async readStream(Q){let W=Q.getReader(),Z=new TextDecoder,z="";try{while(!0){let{done:$,value:J}=await W.read();if($)break;z+=Z.decode(J,kQ);let{frames:G,remaining:X}=AQ(z);z=X;for(let q of G){if(this.resetLivenessTimer(),q.id){let L=parseInt(q.id,10);if(!isNaN(L)){if(this.seenSequenceNums.has(L))K(`SSETransport: DUPLICATE frame seq=${L} (lastSequenceNum=${this.lastSequenceNum}, seenCount=${this.seenSequenceNums.size})`,{level:"warn"}),Y("warn","cli_sse_duplicate_sequence");else if(this.seenSequenceNums.add(L),this.seenSequenceNums.size>1000){let O=this.lastSequenceNum-200;for(let _ of this.seenSequenceNums)if(_<O)this.seenSequenceNums.delete(_)}if(L>this.lastSequenceNum)this.lastSequenceNum=L}}if(q.event&&q.data)this.handleSSEFrame(q.event,q.data);else if(q.data)K("SSETransport: Frame has data: but no event: field — dropped",{level:"warn"}),Y("warn","cli_sse_frame_missing_event_field")}}}catch($){if(this.abortController?.signal.aborted)return;K(`SSETransport: Stream read error: ${H($)}`,{level:"error"}),Y("error","cli_sse_stream_read_error")}finally{W.releaseLock()}if(this.state!=="closing"&&this.state!=="closed")K("SSETransport: Stream ended, reconnecting"),this.handleConnectionError()}handleSSEFrame(Q,W){if(Q!=="client_event"){K(`SSETransport: Unexpected SSE event type '${Q}' on worker stream`,{level:"warn"}),Y("warn","cli_sse_unexpected_event_type",{event_type:Q});return}let Z;try{Z=R(W)}catch($){K(`SSETransport: Failed to parse client_event data: ${H($)}`,{level:"error"});return}let z=Z.payload;if(z&&typeof z==="object"&&"type"in z){let $=this.sessionId?` session=${this.sessionId}`:"";K(`SSETransport: Event seq=${Z.sequence_num} event_id=${Z.event_id} event_type=${Z.event_type} payload_type=${String(z.type)}${$}`),Y("info","cli_sse_message_received"),this.onData?.(k(z)+`
|
|
6
|
+
`)}else K(`SSETransport: Ignoring client_event with no type in payload: event_id=${Z.event_id}`);this.onEventCallback?.(Z)}handleConnectionError(){if(this.clearLivenessTimer(),this.state==="closing"||this.state==="closed")return;this.abortController?.abort(),this.abortController=null;let Q=Date.now();if(!this.reconnectStartTime)this.reconnectStartTime=Q;let W=Q-this.reconnectStartTime;if(W<UQ){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.refreshHeaders){let $=this.refreshHeaders();Object.assign(this.headers,$),K("SSETransport: Refreshed headers for reconnect")}this.state="reconnecting",this.reconnectAttempts++;let Z=Math.min(BQ*Math.pow(2,this.reconnectAttempts-1),HQ),z=Math.max(0,Z+Z*0.25*(2*Math.random()-1));K(`SSETransport: Reconnecting in ${Math.round(z)}ms (attempt ${this.reconnectAttempts}, ${Math.round(W/1000)}s elapsed)`),Y("error","cli_sse_reconnect_attempt",{reconnectAttempts:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},z)}else K(`SSETransport: Reconnection time budget exhausted after ${Math.round(W/1000)}s`,{level:"error"}),Y("error","cli_sse_reconnect_exhausted",{reconnectAttempts:this.reconnectAttempts,elapsedMs:W}),this.state="closed",this.onCloseCallback?.()}onLivenessTimeout=()=>{this.livenessTimer=null,K("SSETransport: Liveness timeout, reconnecting",{level:"error"}),Y("error","cli_sse_liveness_timeout"),this.abortController?.abort(),this.handleConnectionError()};resetLivenessTimer(){this.clearLivenessTimer(),this.livenessTimer=setTimeout(this.onLivenessTimeout,CQ)}clearLivenessTimer(){if(this.livenessTimer)clearTimeout(this.livenessTimer),this.livenessTimer=null}async write(Q){let W=this.getAuthHeaders();if(Object.keys(W).length===0){K("SSETransport: No session token available for POST"),Y("warn","cli_sse_post_no_token");return}let Z={...W,"Content-Type":"application/json","anthropic-version":"2023-06-01","User-Agent":N()};K(`SSETransport: POST body keys=${Object.keys(Q).join(",")}`);for(let z=1;z<=A;z++){try{let J=await e.post(this.postUrl,Q,{headers:Z,validateStatus:xQ});if(J.status===200||J.status===201){K(`SSETransport: POST success type=${Q.type}`);return}if(K(`SSETransport: POST ${J.status} body=${k(J.data).slice(0,200)}`),J.status>=400&&J.status<500&&J.status!==429){K(`SSETransport: POST returned ${J.status} (client error), not retrying`),Y("warn","cli_sse_post_client_error",{status:J.status});return}K(`SSETransport: POST returned ${J.status}, attempt ${z}/${A}`),Y("warn","cli_sse_post_retryable_error",{status:J.status,attempt:z})}catch(J){K(`SSETransport: POST error: ${J.message}, attempt ${z}/${A}`),Y("warn","cli_sse_post_network_error",{attempt:z})}if(z===A){K(`SSETransport: POST failed after ${A} attempts, continuing`),Y("warn","cli_sse_post_retries_exhausted");return}let $=Math.min(TQ*Math.pow(2,z-1),NQ);await U($)}}isConnectedStatus(){return this.state==="connected"}isClosedStatus(){return this.state==="closed"}setOnData(Q){this.onData=Q}setOnClose(Q){this.onCloseCallback=Q}setOnEvent(Q){this.onEventCallback=Q}close(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;this.clearLivenessTimer(),this.state="closing",this.abortController?.abort(),this.abortController=null}}function RQ(Q){let W=Q.pathname;if(W.endsWith("/stream"))W=W.slice(0,-7);return`${Q.protocol}//${Q.host}${W}`}
|
|
7
|
+
export{FQ as n,x as o,M as p,OQ as q,_Q as r};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$l as QJ,Gp as Eq,HD as KJ,Hp as v,Hw as kJ,Ip as zJ,Iw as _J,JD as vJ,Ll as oq,Ml as jJ,Op as XJ,Qp as GJ,Tp as cq,Up as Vq,Vt as Cq,Wt as wJ,Xl as qJ,Xp as YJ,Yl as hJ,Yp as pq,Yt as MJ,Zl as JJ,_l as OJ,am as FJ}from"./cli-0.5.7-q2e6xpch.mjs";import{AT as VJ,zT as tq}from"./cli-0.5.7-yaywev87.mjs";import{OU as eq,PU as mJ,XU as ZJ,YU as gJ}from"./cli-0.5.7-7a9gq9ff.mjs";import{KW as H,MW as Y,pX as TJ,rV as CJ}from"./cli-0.5.7-x1w96j6d.mjs";import{OY as lq,PY as X,QY as K,RY as rq}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as DJ}from"./cli-0.5.7-8sbq2qed.mjs";import{$1 as UJ,B1 as S,B3 as uJ,I0 as jq,J0 as fq,K1 as g,L0 as yq,N1 as Dq,R1 as yJ,X0 as sq,a1 as NJ,e2 as rJ,g3 as HJ,z1 as mq}from"./cli-0.5.7-8ychjqct.mjs";import{E$ as aq,F9 as _q,G$ as iq,G9 as vq,H9 as Rq,I9 as Sq,J9 as xq,R9 as RJ,T$ as LJ}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as $q,Pea as bJ}from"./cli-0.5.7-26pwg6gg.mjs";import{Vma as dq,Zma as bq}from"./cli-0.5.7-258ytmbr.mjs";function iJ(J,q){if(!v(q))return;let Z=cq(q,J);return`${Lq(Z)} ${Z} · /effort`}function Lq(J){if(Eq(J))return xq;switch(J){case"low":return _q;case"medium":return vq;case"high":return Rq;case"max":return Sq;default:return Rq}}var nq=bq(()=>{RJ();pq()});function BQ(J){let q=hq.c(82),{initial:Z,sessionModel:z,onSelect:G,onCancel:w,isStandaloneCommand:W,showFastModeNotice:Yq,headerText:WJ,skipSettingsWrite:wq}=J,kq=wJ(),E=tq(),B=Z===null?x:Z,[A,BJ]=Gq.useState(B),AJ=Cq(cJ),[P,IJ]=Gq.useState(!1),R=Cq(EJ),c;if(q[0]!==R)c=R!==void 0?Vq(R):void 0,q[0]=R,q[1]=c;else c=q[1];let[b,Oq]=Gq.useState(c),Kq=AJ??!1,p;if(q[2]!==Kq)p=kJ(Kq),q[2]=Kq,q[3]=p;else p=q[3];let M=p,Uq;q:{if(Z!==null&&!M.some((Q)=>{if(Q.value===Z)return!0;if(Q.value===null)return!1;try{return S(g(String(Q.value)))===S(g(Z))}catch{return!1}})){let Q;if(q[4]!==Z)Q=Dq(Z),q[4]=Z,q[5]=Q;else Q=q[5];let k;if(q[6]!==Z||q[7]!==Q)k={value:Z,label:Q,description:"Current model"},q[6]=Z,q[7]=Q,q[8]=k;else k=q[8];let L;if(q[9]!==M||q[10]!==k)L=[...M,k],q[9]=M,q[10]=k,q[11]=L;else L=q[11];Uq=L;break q}Uq=M}let Hq=Uq,n;if(q[12]!==Hq)n=Hq.map(xJ),q[12]=Hq,q[13]=n;else n=q[13];let U=n,r;if(q[14]!==B||q[15]!==U)r=U.find((Q)=>{if(Q.value===B)return!0;if(B===x||Q.value===null)return!1;try{return S(g(String(Q.value)))===S(g(String(B)))}catch{return!1}})?.value??U[0]?.value??void 0,q[14]=B,q[15]=U,q[16]=r;else r=q[16];let Wq=r,u=Math.min(10,U.length),d=Math.max(0,U.length-u),$;if(q[17]!==A||q[18]!==U)$=U.find((Q)=>Q.value===A)?.label,q[17]=A,q[18]=U,q[19]=$;else $=q[19];let a=$,I,i;if(q[20]!==A){let Q=Tq(A);I=Q?v(Q):!1,i=Q?zJ(Q):!1,q[20]=A,q[21]=I,q[22]=i}else I=q[21],i=q[22];let f=i,s;if(q[23]!==A)s=Nq(A),q[23]=A,q[24]=s;else s=q[24];let N=s,_=b==="max"&&!f?"high":b,l;if(q[25]!==R||q[26]!==P)l=(Q)=>{if(BJ(Q),!P&&R===void 0)Oq(Nq(Q))},q[25]=R,q[26]=P,q[27]=l;else l=q[27];let Bq=l,o;if(q[28]!==N||q[29]!==I||q[30]!==f)o=(Q)=>{if(!I)return;Oq((k)=>pJ(k??N,Q,f)),IJ(!0)},q[28]=N,q[29]=I,q[30]=f,q[31]=o;else o=q[31];let e=o,t;if(q[32]!==e)t={"modelPicker:decreaseEffort":()=>e("left"),"modelPicker:increaseEffort":()=>e("right")},q[32]=e,q[33]=t;else t=q[33];let qq;if(q[34]===Symbol.for("react.memo_cache_sentinel"))qq={context:"ModelPicker"},q[34]=qq;else qq=q[34];eq(t,qq);let Jq;if(q[35]!==b||q[36]!==P||q[37]!==G||q[38]!==kq||q[39]!==wq)Jq=function(k){if($q("tengu_model_command_menu_effort",{effort:b}),!wq){let gq=GJ(b,Nq(k),aq("userSettings")?.effortLevel,P),Mq=XJ(gq);if(Mq!==void 0)iq("userSettings",{effortLevel:Mq});kq((PJ)=>({...PJ,effortValue:gq}))}let L=Tq(k),Fq=P&&L&&v(L)?b:void 0;if(k===x){G(null,Fq);return}G(k,Fq)},q[35]=b,q[36]=P,q[37]=G,q[38]=kq,q[39]=wq,q[40]=Jq;else Jq=q[40];let Aq=Jq,Qq;if(q[41]===Symbol.for("react.memo_cache_sentinel"))Qq=X(Y,{color:"remember",bold:!0,children:"Select model"}),q[41]=Qq;else Qq=q[41];let Iq=WJ??"Switch between Claude models. Applies to this session and future Claude Code sessions. For other/previous model names, specify with --model.",y;if(q[42]!==Iq)y=X(Y,{dimColor:!0,children:Iq}),q[42]=Iq,q[43]=y;else y=q[43];let D;if(q[44]!==z)D=z&&K(Y,{dimColor:!0,children:["Currently using ",Dq(z)," for this session (set by plan mode). Selecting a model will undo this."]}),q[44]=z,q[45]=D;else D=q[45];let C;if(q[46]!==y||q[47]!==D)C=K(H,{marginBottom:1,flexDirection:"column",children:[Qq,y,D]}),q[46]=y,q[47]=D,q[48]=C;else C=q[48];let Pq=w??SJ,T;if(q[49]!==Bq||q[50]!==Aq||q[51]!==Wq||q[52]!==B||q[53]!==U||q[54]!==Pq||q[55]!==u)T=X(H,{flexDirection:"column",children:X(KJ,{defaultValue:B,defaultFocusValue:Wq,options:U,onChange:Aq,onFocus:Bq,onCancel:Pq,visibleOptionCount:u})}),q[49]=Bq,q[50]=Aq,q[51]=Wq,q[52]=B,q[53]=U,q[54]=Pq,q[55]=u,q[56]=T;else T=q[56];let j;if(q[57]!==d)j=d>0&&X(H,{paddingLeft:3,children:K(Y,{dimColor:!0,children:["and ",d," more…"]})}),q[57]=d,q[58]=j;else j=q[58];let m;if(q[59]!==T||q[60]!==j)m=K(H,{flexDirection:"column",marginBottom:1,children:[T,j]}),q[59]=T,q[60]=j,q[61]=m;else m=q[61];let V;if(q[62]!==_||q[63]!==N||q[64]!==a||q[65]!==I)V=X(H,{marginBottom:1,flexDirection:"column",children:I?K(Y,{dimColor:!0,children:[X(uq,{effort:_})," ",oq(_)," effort",_===N?" (default)":""," ",X(Y,{color:"subtle",children:"← → to adjust"})]}):K(Y,{color:"subtle",children:[X(uq,{effort:void 0})," Effort not supported",a?` for ${a}`:""]})}),q[62]=_,q[63]=N,q[64]=a,q[65]=I,q[66]=V;else V=q[66];let h;if(q[67]!==Yq)h=jq()?Yq?X(H,{marginBottom:1,children:K(Y,{dimColor:!0,children:["Fast mode is ",X(Y,{bold:!0,children:"ON"})," and available with"," ",yq," only (/fast). Switching to other models turn off fast mode."]})}):fq()&&!sq()?X(H,{marginBottom:1,children:K(Y,{dimColor:!0,children:["Use ",X(Y,{bold:!0,children:"/fast"})," to turn on Fast mode (",yq," only)."]})}):null:null,q[67]=Yq,q[68]=h;else h=q[68];let O;if(q[69]!==C||q[70]!==m||q[71]!==V||q[72]!==h)O=K(H,{flexDirection:"column",children:[C,m,V,h]}),q[69]=C,q[70]=m,q[71]=V,q[72]=h,q[73]=O;else O=q[73];let F;if(q[74]!==E||q[75]!==W)F=W&&X(Y,{dimColor:!0,italic:!0,children:E.pending?K(lq,{children:["Press ",E.keyName," again to exit"]}):K(QJ,{children:[X(qJ,{shortcut:"Enter",action:"confirm"}),X(JJ,{action:"select:cancel",context:"Select",fallback:"Esc",description:"exit"})]})}),q[74]=E,q[75]=W,q[76]=F;else F=q[76];let Zq;if(q[77]!==O||q[78]!==F)Zq=K(H,{flexDirection:"column",children:[O,F]}),q[77]=O,q[78]=F,q[79]=Zq;else Zq=q[79];let zq=Zq;if(!W)return zq;let Xq;if(q[80]!==zq)Xq=X(ZJ,{color:"permission",children:zq}),q[80]=zq,q[81]=Xq;else Xq=q[81];return Xq}function SJ(){}function xJ(J){return{...J,value:J.value===null?x:J.value}}function EJ(J){return J.effortValue}function cJ(J){return jq()?J.fastMode:!1}function Tq(J){if(!J)return;return J===x?mq():g(J)}function uq(J){let q=hq.c(5),{effort:Z}=J,z=Z?"claude":"subtle",G=Z??"low",w;if(q[0]!==G)w=Lq(G),q[0]=G,q[1]=w;else w=q[1];let W;if(q[2]!==z||q[3]!==w)W=X(Y,{color:z,children:w}),q[2]=z,q[3]=w,q[4]=W;else W=q[4];return W}function pJ(J,q,Z){let z=Z?["low","medium","high","max"]:["low","medium","high"],G=z.indexOf(J),w=G!==-1?G:z.indexOf("high");if(q==="right")return z[(w+1)%z.length];else return z[(w-1+z.length)%z.length]}function Nq(J){let q=Tq(J)??mq(),Z=YJ(q);return Z!==void 0?Vq(Z):"high"}var hq,Gq,x="__NO_PREFERENCE__";var nJ=bq(()=>{jJ();VJ();bJ();NJ();TJ();mJ();MJ();pq();yJ();_J();LJ();OJ();vJ();FJ();hJ();gJ();nq();rq();hq=dq(CJ(),1),Gq=dq(DJ(),1)});function bQ(J,q,Z){if(!HJ())return!1;if(q)return!0;if(J===null||!UJ(J))return!1;let z=J.toLowerCase().replace(/\[1m\]$/,"").trim(),G=z==="opus"||z.includes("opus-4-6")||z.includes("opus-4-7"),w=z==="sonnet"||z.includes("sonnet-4-6");if(G&&Z)return!1;return G||w}var dJ=bq(()=>{uJ();rJ()});
|
|
2
|
+
export{iJ as Zf,Lq as _f,nq as $f,BQ as ag,nJ as bg,bQ as cg,dJ as dg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Xma as O,Zma as KJ}from"./cli-0.5.7-258ytmbr.mjs";var N=O((zJ,Oq)=>{var K1=Number.MAX_SAFE_INTEGER||9007199254740991,j1=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Oq.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:K1,RELEASE_TYPES:j1,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var R=O((UJ,Hq)=>{var z1=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...q)=>console.error("SEMVER",...q):()=>{};Hq.exports=z1});var C=O((A,wq)=>{var{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:U1,MAX_LENGTH:Y1}=N(),F1=R();A=wq.exports={};var I1=A.re=[],O1=A.safeRe=[],j=A.src=[],H1=A.safeSrc=[],z=A.t={},w1=0,e="[a-zA-Z0-9-]",y1=[["\\s",1],["\\d",Y1],[e,U1]],B1=(q)=>{for(let[$,J]of y1)q=q.split(`${$}*`).join(`${$}{0,${J}}`).split(`${$}+`).join(`${$}{1,${J}}`);return q},w=(q,$,J)=>{let Q=B1($),W=w1++;F1(q,W,$),z[q]=W,j[W]=$,H1[W]=Q,I1[W]=new RegExp($,J?"g":void 0),O1[W]=new RegExp(Q,J?"g":void 0)};w("NUMERICIDENTIFIER","0|[1-9]\\d*");w("NUMERICIDENTIFIERLOOSE","\\d+");w("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${e}*`);w("MAINVERSION",`(${j[z.NUMERICIDENTIFIER]})\\.(${j[z.NUMERICIDENTIFIER]})\\.(${j[z.NUMERICIDENTIFIER]})`);w("MAINVERSIONLOOSE",`(${j[z.NUMERICIDENTIFIERLOOSE]})\\.(${j[z.NUMERICIDENTIFIERLOOSE]})\\.(${j[z.NUMERICIDENTIFIERLOOSE]})`);w("PRERELEASEIDENTIFIER",`(?:${j[z.NONNUMERICIDENTIFIER]}|${j[z.NUMERICIDENTIFIER]})`);w("PRERELEASEIDENTIFIERLOOSE",`(?:${j[z.NONNUMERICIDENTIFIER]}|${j[z.NUMERICIDENTIFIERLOOSE]})`);w("PRERELEASE",`(?:-(${j[z.PRERELEASEIDENTIFIER]}(?:\\.${j[z.PRERELEASEIDENTIFIER]})*))`);w("PRERELEASELOOSE",`(?:-?(${j[z.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${j[z.PRERELEASEIDENTIFIERLOOSE]})*))`);w("BUILDIDENTIFIER",`${e}+`);w("BUILD",`(?:\\+(${j[z.BUILDIDENTIFIER]}(?:\\.${j[z.BUILDIDENTIFIER]})*))`);w("FULLPLAIN",`v?${j[z.MAINVERSION]}${j[z.PRERELEASE]}?${j[z.BUILD]}?`);w("FULL",`^${j[z.FULLPLAIN]}$`);w("LOOSEPLAIN",`[v=\\s]*${j[z.MAINVERSIONLOOSE]}${j[z.PRERELEASELOOSE]}?${j[z.BUILD]}?`);w("LOOSE",`^${j[z.LOOSEPLAIN]}$`);w("GTLT","((?:<|>)?=?)");w("XRANGEIDENTIFIERLOOSE",`${j[z.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);w("XRANGEIDENTIFIER",`${j[z.NUMERICIDENTIFIER]}|x|X|\\*`);w("XRANGEPLAIN",`[v=\\s]*(${j[z.XRANGEIDENTIFIER]})(?:\\.(${j[z.XRANGEIDENTIFIER]})(?:\\.(${j[z.XRANGEIDENTIFIER]})(?:${j[z.PRERELEASE]})?${j[z.BUILD]}?)?)?`);w("XRANGEPLAINLOOSE",`[v=\\s]*(${j[z.XRANGEIDENTIFIERLOOSE]})(?:\\.(${j[z.XRANGEIDENTIFIERLOOSE]})(?:\\.(${j[z.XRANGEIDENTIFIERLOOSE]})(?:${j[z.PRERELEASELOOSE]})?${j[z.BUILD]}?)?)?`);w("XRANGE",`^${j[z.GTLT]}\\s*${j[z.XRANGEPLAIN]}$`);w("XRANGELOOSE",`^${j[z.GTLT]}\\s*${j[z.XRANGEPLAINLOOSE]}$`);w("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`);w("COERCE",`${j[z.COERCEPLAIN]}(?:$|[^\\d])`);w("COERCEFULL",j[z.COERCEPLAIN]+`(?:${j[z.PRERELEASE]})?(?:${j[z.BUILD]})?(?:$|[^\\d])`);w("COERCERTL",j[z.COERCE],!0);w("COERCERTLFULL",j[z.COERCEFULL],!0);w("LONETILDE","(?:~>?)");w("TILDETRIM",`(\\s*)${j[z.LONETILDE]}\\s+`,!0);A.tildeTrimReplace="$1~";w("TILDE",`^${j[z.LONETILDE]}${j[z.XRANGEPLAIN]}$`);w("TILDELOOSE",`^${j[z.LONETILDE]}${j[z.XRANGEPLAINLOOSE]}$`);w("LONECARET","(?:\\^)");w("CARETTRIM",`(\\s*)${j[z.LONECARET]}\\s+`,!0);A.caretTrimReplace="$1^";w("CARET",`^${j[z.LONECARET]}${j[z.XRANGEPLAIN]}$`);w("CARETLOOSE",`^${j[z.LONECARET]}${j[z.XRANGEPLAINLOOSE]}$`);w("COMPARATORLOOSE",`^${j[z.GTLT]}\\s*(${j[z.LOOSEPLAIN]})$|^$`);w("COMPARATOR",`^${j[z.GTLT]}\\s*(${j[z.FULLPLAIN]})$|^$`);w("COMPARATORTRIM",`(\\s*)${j[z.GTLT]}\\s*(${j[z.LOOSEPLAIN]}|${j[z.XRANGEPLAIN]})`,!0);A.comparatorTrimReplace="$1$2$3";w("HYPHENRANGE",`^\\s*(${j[z.XRANGEPLAIN]})\\s+-\\s+(${j[z.XRANGEPLAIN]})\\s*$`);w("HYPHENRANGELOOSE",`^\\s*(${j[z.XRANGEPLAINLOOSE]})\\s+-\\s+(${j[z.XRANGEPLAINLOOSE]})\\s*$`);w("STAR","(<|>)?=?\\s*\\*");w("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");w("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var f=O((YJ,yq)=>{var x1=Object.freeze({loose:!0}),D1=Object.freeze({}),G1=(q)=>{if(!q)return D1;if(typeof q!=="object")return x1;return q};yq.exports=G1});var o=O((FJ,Dq)=>{var Bq=/^[0-9]+$/,xq=(q,$)=>{if(typeof q==="number"&&typeof $==="number")return q===$?0:q<$?-1:1;let J=Bq.test(q),Q=Bq.test($);if(J&&Q)q=+q,$=+$;return q===$?0:J&&!Q?-1:Q&&!J?1:q<$?-1:1},V1=(q,$)=>xq($,q);Dq.exports={compareIdentifiers:xq,rcompareIdentifiers:V1}});var D=O((IJ,Vq)=>{var h=R(),{MAX_LENGTH:Gq,MAX_SAFE_INTEGER:v}=N(),{safeRe:d,t:l}=C(),P1=f(),{compareIdentifiers:qq}=o();class L{constructor(q,$){if($=P1($),q instanceof L)if(q.loose===!!$.loose&&q.includePrerelease===!!$.includePrerelease)return q;else q=q.version;else if(typeof q!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof q}".`);if(q.length>Gq)throw TypeError(`version is longer than ${Gq} characters`);h("SemVer",q,$),this.options=$,this.loose=!!$.loose,this.includePrerelease=!!$.includePrerelease;let J=q.trim().match($.loose?d[l.LOOSE]:d[l.FULL]);if(!J)throw TypeError(`Invalid Version: ${q}`);if(this.raw=q,this.major=+J[1],this.minor=+J[2],this.patch=+J[3],this.major>v||this.major<0)throw TypeError("Invalid major version");if(this.minor>v||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>v||this.patch<0)throw TypeError("Invalid patch version");if(!J[4])this.prerelease=[];else this.prerelease=J[4].split(".").map((Q)=>{if(/^[0-9]+$/.test(Q)){let W=+Q;if(W>=0&&W<v)return W}return Q});this.build=J[5]?J[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(q){if(h("SemVer.compare",this.version,this.options,q),!(q instanceof L)){if(typeof q==="string"&&q===this.version)return 0;q=new L(q,this.options)}if(q.version===this.version)return 0;return this.compareMain(q)||this.comparePre(q)}compareMain(q){if(!(q instanceof L))q=new L(q,this.options);if(this.major<q.major)return-1;if(this.major>q.major)return 1;if(this.minor<q.minor)return-1;if(this.minor>q.minor)return 1;if(this.patch<q.patch)return-1;if(this.patch>q.patch)return 1;return 0}comparePre(q){if(!(q instanceof L))q=new L(q,this.options);if(this.prerelease.length&&!q.prerelease.length)return-1;else if(!this.prerelease.length&&q.prerelease.length)return 1;else if(!this.prerelease.length&&!q.prerelease.length)return 0;let $=0;do{let J=this.prerelease[$],Q=q.prerelease[$];if(h("prerelease compare",$,J,Q),J===void 0&&Q===void 0)return 0;else if(Q===void 0)return 1;else if(J===void 0)return-1;else if(J===Q)continue;else return qq(J,Q)}while(++$)}compareBuild(q){if(!(q instanceof L))q=new L(q,this.options);let $=0;do{let J=this.build[$],Q=q.build[$];if(h("build compare",$,J,Q),J===void 0&&Q===void 0)return 0;else if(Q===void 0)return 1;else if(J===void 0)return-1;else if(J===Q)continue;else return qq(J,Q)}while(++$)}inc(q,$,J){if(q.startsWith("pre")){if(!$&&J===!1)throw Error("invalid increment argument: identifier is empty");if($){let Q=`-${$}`.match(this.options.loose?d[l.PRERELEASELOOSE]:d[l.PRERELEASE]);if(!Q||Q[1]!==$)throw Error(`invalid identifier: ${$}`)}}switch(q){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",$,J);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",$,J);break;case"prepatch":this.prerelease.length=0,this.inc("patch",$,J),this.inc("pre",$,J);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",$,J);this.inc("pre",$,J);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let Q=Number(J)?1:0;if(this.prerelease.length===0)this.prerelease=[Q];else{let W=this.prerelease.length;while(--W>=0)if(typeof this.prerelease[W]==="number")this.prerelease[W]++,W=-2;if(W===-1){if($===this.prerelease.join(".")&&J===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(Q)}}if($){let W=[$,Q];if(J===!1)W=[$];if(qq(this.prerelease[0],$)===0){if(isNaN(this.prerelease[1]))this.prerelease=W}else this.prerelease=W}break}default:throw Error(`invalid increment argument: ${q}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}Vq.exports=L});var E=O((OJ,Xq)=>{var Pq=D(),X1=(q,$,J=!1)=>{if(q instanceof Pq)return q;try{return new Pq(q,$)}catch(Q){if(!J)return null;throw Q}};Xq.exports=X1});var Lq=O((HJ,_q)=>{var _1=E(),L1=(q,$)=>{let J=_1(q,$);return J?J.version:null};_q.exports=L1});var Eq=O((wJ,Aq)=>{var A1=E(),E1=(q,$)=>{let J=A1(q.trim().replace(/^[=v]+/,""),$);return J?J.version:null};Aq.exports=E1});var Rq=O((yJ,Cq)=>{var Nq=D(),N1=(q,$,J,Q,W)=>{if(typeof J==="string")W=Q,Q=J,J=void 0;try{return new Nq(q instanceof Nq?q.version:q,J).inc($,Q,W).version}catch(Z){return null}};Cq.exports=N1});var uq=O((BJ,kq)=>{var Sq=E(),C1=(q,$)=>{let J=Sq(q,null,!0),Q=Sq($,null,!0),W=J.compare(Q);if(W===0)return null;let Z=W>0,K=Z?J:Q,U=Z?Q:J,Y=!!K.prerelease.length;if(!!U.prerelease.length&&!Y){if(!U.patch&&!U.minor)return"major";if(U.compareMain(K)===0){if(U.minor&&!U.patch)return"minor";return"patch"}}let F=Y?"pre":"";if(J.major!==Q.major)return F+"major";if(J.minor!==Q.minor)return F+"minor";if(J.patch!==Q.patch)return F+"patch";return"prerelease"};kq.exports=C1});var Mq=O((xJ,Tq)=>{var R1=D(),S1=(q,$)=>new R1(q,$).major;Tq.exports=S1});var fq=O((DJ,bq)=>{var k1=D(),u1=(q,$)=>new k1(q,$).minor;bq.exports=u1});var vq=O((GJ,hq)=>{var T1=D(),M1=(q,$)=>new T1(q,$).patch;hq.exports=M1});var lq=O((VJ,dq)=>{var b1=E(),f1=(q,$)=>{let J=b1(q,$);return J&&J.prerelease.length?J.prerelease:null};dq.exports=f1});var X=O((PJ,cq)=>{var gq=D(),h1=(q,$,J)=>new gq(q,J).compare(new gq($,J));cq.exports=h1});var pq=O((XJ,mq)=>{var v1=X(),d1=(q,$,J)=>v1($,q,J);mq.exports=d1});var aq=O((_J,sq)=>{var l1=X(),g1=(q,$)=>l1(q,$,!0);sq.exports=g1});var g=O((LJ,iq)=>{var nq=D(),c1=(q,$,J)=>{let Q=new nq(q,J),W=new nq($,J);return Q.compare(W)||Q.compareBuild(W)};iq.exports=c1});var tq=O((AJ,rq)=>{var m1=g(),p1=(q,$)=>q.sort((J,Q)=>m1(J,Q,$));rq.exports=p1});var oq=O((EJ,eq)=>{var s1=g(),a1=(q,$)=>q.sort((J,Q)=>s1(Q,J,$));eq.exports=a1});var S=O((NJ,q0)=>{var n1=X(),i1=(q,$,J)=>n1(q,$,J)>0;q0.exports=i1});var c=O((CJ,$0)=>{var r1=X(),t1=(q,$,J)=>r1(q,$,J)<0;$0.exports=t1});var $q=O((RJ,J0)=>{var e1=X(),o1=(q,$,J)=>e1(q,$,J)===0;J0.exports=o1});var Jq=O((SJ,Q0)=>{var q$=X(),$$=(q,$,J)=>q$(q,$,J)!==0;Q0.exports=$$});var m=O((kJ,W0)=>{var J$=X(),Q$=(q,$,J)=>J$(q,$,J)>=0;W0.exports=Q$});var p=O((uJ,Z0)=>{var W$=X(),Z$=(q,$,J)=>W$(q,$,J)<=0;Z0.exports=Z$});var Qq=O((TJ,K0)=>{var K$=$q(),j$=Jq(),z$=S(),U$=m(),Y$=c(),F$=p(),I$=(q,$,J,Q)=>{switch($){case"===":if(typeof q==="object")q=q.version;if(typeof J==="object")J=J.version;return q===J;case"!==":if(typeof q==="object")q=q.version;if(typeof J==="object")J=J.version;return q!==J;case"":case"=":case"==":return K$(q,J,Q);case"!=":return j$(q,J,Q);case">":return z$(q,J,Q);case">=":return U$(q,J,Q);case"<":return Y$(q,J,Q);case"<=":return F$(q,J,Q);default:throw TypeError(`Invalid operator: ${$}`)}};K0.exports=I$});var z0=O((MJ,j0)=>{var O$=D(),H$=E(),{safeRe:s,t:a}=C(),w$=(q,$)=>{if(q instanceof O$)return q;if(typeof q==="number")q=String(q);if(typeof q!=="string")return null;$=$||{};let J=null;if(!$.rtl)J=q.match($.includePrerelease?s[a.COERCEFULL]:s[a.COERCE]);else{let Y=$.includePrerelease?s[a.COERCERTLFULL]:s[a.COERCERTL],H;while((H=Y.exec(q))&&(!J||J.index+J[0].length!==q.length)){if(!J||H.index+H[0].length!==J.index+J[0].length)J=H;Y.lastIndex=H.index+H[1].length+H[2].length}Y.lastIndex=-1}if(J===null)return null;let Q=J[2],W=J[3]||"0",Z=J[4]||"0",K=$.includePrerelease&&J[5]?`-${J[5]}`:"",U=$.includePrerelease&&J[6]?`+${J[6]}`:"";return H$(`${Q}.${W}.${Z}${K}${U}`,$)};j0.exports=w$});var Y0=O((bJ,U0)=>{var y$=E(),B$=N(),x$=D(),D$=(q,$,J)=>{if(!B$.RELEASE_TYPES.includes($))return null;let Q=G$(q,J);return Q&&V$(Q,$)},G$=(q,$)=>{let J=q instanceof x$?q.version:q;return y$(J,$)},V$=(q,$)=>{if(P$($))return q.version;switch(q.prerelease=[],$){case"major":q.minor=0,q.patch=0;break;case"minor":q.patch=0;break}return q.format()},P$=(q)=>{return q.startsWith("pre")};U0.exports=D$});var O0=O((fJ,I0)=>{class F0{constructor(){this.max=1000,this.map=new Map}get(q){let $=this.map.get(q);if($===void 0)return;else return this.map.delete(q),this.map.set(q,$),$}delete(q){return this.map.delete(q)}set(q,$){if(!this.delete(q)&&$!==void 0){if(this.map.size>=this.max){let Q=this.map.keys().next().value;this.delete(Q)}this.map.set(q,$)}return this}}I0.exports=F0});var _=O((hJ,B0)=>{var X$=/\s+/g;class k{constructor(q,$){if($=L$($),q instanceof k)if(q.loose===!!$.loose&&q.includePrerelease===!!$.includePrerelease)return q;else return new k(q.raw,$);if(q instanceof Wq)return this.raw=q.value,this.set=[[q]],this.formatted=void 0,this;if(this.options=$,this.loose=!!$.loose,this.includePrerelease=!!$.includePrerelease,this.raw=q.trim().replace(X$," "),this.set=this.raw.split("||").map((J)=>this.parseRange(J.trim())).filter((J)=>J.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let J=this.set[0];if(this.set=this.set.filter((Q)=>!w0(Q[0])),this.set.length===0)this.set=[J];else if(this.set.length>1){for(let Q of this.set)if(Q.length===1&&k$(Q[0])){this.set=[Q];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let q=0;q<this.set.length;q++){if(q>0)this.formatted+="||";let $=this.set[q];for(let J=0;J<$.length;J++){if(J>0)this.formatted+=" ";this.formatted+=$[J].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(q){let J=((this.options.includePrerelease&&R$)|(this.options.loose&&S$))+":"+q,Q=H0.get(J);if(Q)return Q;let W=this.options.loose,Z=W?V[G.HYPHENRANGELOOSE]:V[G.HYPHENRANGE];q=q.replace(Z,g$(this.options.includePrerelease)),B("hyphen replace",q),q=q.replace(V[G.COMPARATORTRIM],E$),B("comparator trim",q),q=q.replace(V[G.TILDETRIM],N$),B("tilde trim",q),q=q.replace(V[G.CARETTRIM],C$),B("caret trim",q);let K=q.split(" ").map((F)=>u$(F,this.options)).join(" ").split(/\s+/).map((F)=>l$(F,this.options));if(W)K=K.filter((F)=>{return B("loose invalid filter",F,this.options),!!F.match(V[G.COMPARATORLOOSE])});B("range list",K);let U=new Map,Y=K.map((F)=>new Wq(F,this.options));for(let F of Y){if(w0(F))return[F];U.set(F.value,F)}if(U.size>1&&U.has(""))U.delete("");let H=[...U.values()];return H0.set(J,H),H}intersects(q,$){if(!(q instanceof k))throw TypeError("a Range is required");return this.set.some((J)=>{return y0(J,$)&&q.set.some((Q)=>{return y0(Q,$)&&J.every((W)=>{return Q.every((Z)=>{return W.intersects(Z,$)})})})})}test(q){if(!q)return!1;if(typeof q==="string")try{q=new A$(q,this.options)}catch($){return!1}for(let $=0;$<this.set.length;$++)if(c$(this.set[$],q,this.options))return!0;return!1}}B0.exports=k;var _$=O0(),H0=new _$,L$=f(),Wq=u(),B=R(),A$=D(),{safeRe:V,t:G,comparatorTrimReplace:E$,tildeTrimReplace:N$,caretTrimReplace:C$}=C(),{FLAG_INCLUDE_PRERELEASE:R$,FLAG_LOOSE:S$}=N(),w0=(q)=>q.value==="<0.0.0-0",k$=(q)=>q.value==="",y0=(q,$)=>{let J=!0,Q=q.slice(),W=Q.pop();while(J&&Q.length)J=Q.every((Z)=>{return W.intersects(Z,$)}),W=Q.pop();return J},u$=(q,$)=>{return q=q.replace(V[G.BUILD],""),B("comp",q,$),q=b$(q,$),B("caret",q),q=T$(q,$),B("tildes",q),q=h$(q,$),B("xrange",q),q=d$(q,$),B("stars",q),q},P=(q)=>!q||q.toLowerCase()==="x"||q==="*",T$=(q,$)=>{return q.trim().split(/\s+/).map((J)=>M$(J,$)).join(" ")},M$=(q,$)=>{let J=$.loose?V[G.TILDELOOSE]:V[G.TILDE];return q.replace(J,(Q,W,Z,K,U)=>{B("tilde",q,Q,W,Z,K,U);let Y;if(P(W))Y="";else if(P(Z))Y=`>=${W}.0.0 <${+W+1}.0.0-0`;else if(P(K))Y=`>=${W}.${Z}.0 <${W}.${+Z+1}.0-0`;else if(U)B("replaceTilde pr",U),Y=`>=${W}.${Z}.${K}-${U} <${W}.${+Z+1}.0-0`;else Y=`>=${W}.${Z}.${K} <${W}.${+Z+1}.0-0`;return B("tilde return",Y),Y})},b$=(q,$)=>{return q.trim().split(/\s+/).map((J)=>f$(J,$)).join(" ")},f$=(q,$)=>{B("caret",q,$);let J=$.loose?V[G.CARETLOOSE]:V[G.CARET],Q=$.includePrerelease?"-0":"";return q.replace(J,(W,Z,K,U,Y)=>{B("caret",q,W,Z,K,U,Y);let H;if(P(Z))H="";else if(P(K))H=`>=${Z}.0.0${Q} <${+Z+1}.0.0-0`;else if(P(U))if(Z==="0")H=`>=${Z}.${K}.0${Q} <${Z}.${+K+1}.0-0`;else H=`>=${Z}.${K}.0${Q} <${+Z+1}.0.0-0`;else if(Y)if(B("replaceCaret pr",Y),Z==="0")if(K==="0")H=`>=${Z}.${K}.${U}-${Y} <${Z}.${K}.${+U+1}-0`;else H=`>=${Z}.${K}.${U}-${Y} <${Z}.${+K+1}.0-0`;else H=`>=${Z}.${K}.${U}-${Y} <${+Z+1}.0.0-0`;else if(B("no pr"),Z==="0")if(K==="0")H=`>=${Z}.${K}.${U}${Q} <${Z}.${K}.${+U+1}-0`;else H=`>=${Z}.${K}.${U}${Q} <${Z}.${+K+1}.0-0`;else H=`>=${Z}.${K}.${U} <${+Z+1}.0.0-0`;return B("caret return",H),H})},h$=(q,$)=>{return B("replaceXRanges",q,$),q.split(/\s+/).map((J)=>v$(J,$)).join(" ")},v$=(q,$)=>{q=q.trim();let J=$.loose?V[G.XRANGELOOSE]:V[G.XRANGE];return q.replace(J,(Q,W,Z,K,U,Y)=>{B("xRange",q,Q,W,Z,K,U,Y);let H=P(Z),F=H||P(K),y=F||P(U),x=y;if(W==="="&&x)W="";if(Y=$.includePrerelease?"-0":"",H)if(W===">"||W==="<")Q="<0.0.0-0";else Q="*";else if(W&&x){if(F)K=0;if(U=0,W===">")if(W=">=",F)Z=+Z+1,K=0,U=0;else K=+K+1,U=0;else if(W==="<=")if(W="<",F)Z=+Z+1;else K=+K+1;if(W==="<")Y="-0";Q=`${W+Z}.${K}.${U}${Y}`}else if(F)Q=`>=${Z}.0.0${Y} <${+Z+1}.0.0-0`;else if(y)Q=`>=${Z}.${K}.0${Y} <${Z}.${+K+1}.0-0`;return B("xRange return",Q),Q})},d$=(q,$)=>{return B("replaceStars",q,$),q.trim().replace(V[G.STAR],"")},l$=(q,$)=>{return B("replaceGTE0",q,$),q.trim().replace(V[$.includePrerelease?G.GTE0PRE:G.GTE0],"")},g$=(q)=>($,J,Q,W,Z,K,U,Y,H,F,y,x)=>{if(P(Q))J="";else if(P(W))J=`>=${Q}.0.0${q?"-0":""}`;else if(P(Z))J=`>=${Q}.${W}.0${q?"-0":""}`;else if(K)J=`>=${J}`;else J=`>=${J}${q?"-0":""}`;if(P(H))Y="";else if(P(F))Y=`<${+H+1}.0.0-0`;else if(P(y))Y=`<${H}.${+F+1}.0-0`;else if(x)Y=`<=${H}.${F}.${y}-${x}`;else if(q)Y=`<${H}.${F}.${+y+1}-0`;else Y=`<=${Y}`;return`${J} ${Y}`.trim()},c$=(q,$,J)=>{for(let Q=0;Q<q.length;Q++)if(!q[Q].test($))return!1;if($.prerelease.length&&!J.includePrerelease){for(let Q=0;Q<q.length;Q++){if(B(q[Q].semver),q[Q].semver===Wq.ANY)continue;if(q[Q].semver.prerelease.length>0){let W=q[Q].semver;if(W.major===$.major&&W.minor===$.minor&&W.patch===$.patch)return!0}}return!1}return!0}});var u=O((vJ,X0)=>{var T=Symbol("SemVer ANY");class n{static get ANY(){return T}constructor(q,$){if($=x0($),q instanceof n)if(q.loose===!!$.loose)return q;else q=q.value;if(q=q.trim().split(/\s+/).join(" "),Kq("comparator",q,$),this.options=$,this.loose=!!$.loose,this.parse(q),this.semver===T)this.value="";else this.value=this.operator+this.semver.version;Kq("comp",this)}parse(q){let $=this.options.loose?D0[G0.COMPARATORLOOSE]:D0[G0.COMPARATOR],J=q.match($);if(!J)throw TypeError(`Invalid comparator: ${q}`);if(this.operator=J[1]!==void 0?J[1]:"",this.operator==="=")this.operator="";if(!J[2])this.semver=T;else this.semver=new V0(J[2],this.options.loose)}toString(){return this.value}test(q){if(Kq("Comparator.test",q,this.options.loose),this.semver===T||q===T)return!0;if(typeof q==="string")try{q=new V0(q,this.options)}catch($){return!1}return Zq(q,this.operator,this.semver,this.options)}intersects(q,$){if(!(q instanceof n))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new P0(q.value,$).test(this.value)}else if(q.operator===""){if(q.value==="")return!0;return new P0(this.value,$).test(q.semver)}if($=x0($),$.includePrerelease&&(this.value==="<0.0.0-0"||q.value==="<0.0.0-0"))return!1;if(!$.includePrerelease&&(this.value.startsWith("<0.0.0")||q.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&q.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&q.operator.startsWith("<"))return!0;if(this.semver.version===q.semver.version&&this.operator.includes("=")&&q.operator.includes("="))return!0;if(Zq(this.semver,"<",q.semver,$)&&this.operator.startsWith(">")&&q.operator.startsWith("<"))return!0;if(Zq(this.semver,">",q.semver,$)&&this.operator.startsWith("<")&&q.operator.startsWith(">"))return!0;return!1}}X0.exports=n;var x0=f(),{safeRe:D0,t:G0}=C(),Zq=Qq(),Kq=R(),V0=D(),P0=_()});var M=O((dJ,_0)=>{var m$=_(),p$=(q,$,J)=>{try{$=new m$($,J)}catch(Q){return!1}return $.test(q)};_0.exports=p$});var A0=O((lJ,L0)=>{var s$=_(),a$=(q,$)=>new s$(q,$).set.map((J)=>J.map((Q)=>Q.value).join(" ").trim().split(" "));L0.exports=a$});var N0=O((gJ,E0)=>{var n$=D(),i$=_(),r$=(q,$,J)=>{let Q=null,W=null,Z=null;try{Z=new i$($,J)}catch(K){return null}return q.forEach((K)=>{if(Z.test(K)){if(!Q||W.compare(K)===-1)Q=K,W=new n$(Q,J)}}),Q};E0.exports=r$});var R0=O((cJ,C0)=>{var t$=D(),e$=_(),o$=(q,$,J)=>{let Q=null,W=null,Z=null;try{Z=new e$($,J)}catch(K){return null}return q.forEach((K)=>{if(Z.test(K)){if(!Q||W.compare(K)===1)Q=K,W=new t$(Q,J)}}),Q};C0.exports=o$});var u0=O((mJ,k0)=>{var jq=D(),q9=_(),S0=S(),$9=(q,$)=>{q=new q9(q,$);let J=new jq("0.0.0");if(q.test(J))return J;if(J=new jq("0.0.0-0"),q.test(J))return J;J=null;for(let Q=0;Q<q.set.length;++Q){let W=q.set[Q],Z=null;if(W.forEach((K)=>{let U=new jq(K.semver.version);switch(K.operator){case">":if(U.prerelease.length===0)U.patch++;else U.prerelease.push(0);U.raw=U.format();case"":case">=":if(!Z||S0(U,Z))Z=U;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${K.operator}`)}}),Z&&(!J||S0(J,Z)))J=Z}if(J&&q.test(J))return J;return null};k0.exports=$9});var M0=O((pJ,T0)=>{var J9=_(),Q9=(q,$)=>{try{return new J9(q,$).range||"*"}catch(J){return null}};T0.exports=Q9});var i=O((sJ,v0)=>{var W9=D(),h0=u(),{ANY:Z9}=h0,K9=_(),j9=M(),b0=S(),f0=c(),z9=p(),U9=m(),Y9=(q,$,J,Q)=>{q=new W9(q,Q),$=new K9($,Q);let W,Z,K,U,Y;switch(J){case">":W=b0,Z=z9,K=f0,U=">",Y=">=";break;case"<":W=f0,Z=U9,K=b0,U="<",Y="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(j9(q,$,Q))return!1;for(let H=0;H<$.set.length;++H){let F=$.set[H],y=null,x=null;if(F.forEach((I)=>{if(I.semver===Z9)I=new h0(">=0.0.0");if(y=y||I,x=x||I,W(I.semver,y.semver,Q))y=I;else if(K(I.semver,x.semver,Q))x=I}),y.operator===U||y.operator===Y)return!1;if((!x.operator||x.operator===U)&&Z(q,x.semver))return!1;else if(x.operator===Y&&K(q,x.semver))return!1}return!0};v0.exports=Y9});var l0=O((aJ,d0)=>{var F9=i(),I9=(q,$,J)=>F9(q,$,">",J);d0.exports=I9});var c0=O((nJ,g0)=>{var O9=i(),H9=(q,$,J)=>O9(q,$,"<",J);g0.exports=H9});var s0=O((iJ,p0)=>{var m0=_(),w9=(q,$,J)=>{return q=new m0(q,J),$=new m0($,J),q.intersects($,J)};p0.exports=w9});var n0=O((rJ,a0)=>{var y9=M(),B9=X();a0.exports=(q,$,J)=>{let Q=[],W=null,Z=null,K=q.sort((F,y)=>B9(F,y,J));for(let F of K)if(y9(F,$,J)){if(Z=F,!W)W=F}else{if(Z)Q.push([W,Z]);Z=null,W=null}if(W)Q.push([W,null]);let U=[];for(let[F,y]of Q)if(F===y)U.push(F);else if(!y&&F===K[0])U.push("*");else if(!y)U.push(`>=${F}`);else if(F===K[0])U.push(`<=${y}`);else U.push(`${F} - ${y}`);let Y=U.join(" || "),H=typeof $.raw==="string"?$.raw:String($);return Y.length<H.length?Y:$}});var q1=O((tJ,o0)=>{var i0=_(),Uq=u(),{ANY:zq}=Uq,b=M(),Yq=X(),x9=(q,$,J={})=>{if(q===$)return!0;q=new i0(q,J),$=new i0($,J);let Q=!1;q:for(let W of q.set){for(let Z of $.set){let K=G9(W,Z,J);if(Q=Q||K!==null,K)continue q}if(Q)return!1}return!0},D9=[new Uq(">=0.0.0-0")],r0=[new Uq(">=0.0.0")],G9=(q,$,J)=>{if(q===$)return!0;if(q.length===1&&q[0].semver===zq)if($.length===1&&$[0].semver===zq)return!0;else if(J.includePrerelease)q=D9;else q=r0;if($.length===1&&$[0].semver===zq)if(J.includePrerelease)return!0;else $=r0;let Q=new Set,W,Z;for(let I of q)if(I.operator===">"||I.operator===">=")W=t0(W,I,J);else if(I.operator==="<"||I.operator==="<=")Z=e0(Z,I,J);else Q.add(I.semver);if(Q.size>1)return null;let K;if(W&&Z){if(K=Yq(W.semver,Z.semver,J),K>0)return null;else if(K===0&&(W.operator!==">="||Z.operator!=="<="))return null}for(let I of Q){if(W&&!b(I,String(W),J))return null;if(Z&&!b(I,String(Z),J))return null;for(let Z1 of $)if(!b(I,String(Z1),J))return!1;return!0}let U,Y,H,F,y=Z&&!J.includePrerelease&&Z.semver.prerelease.length?Z.semver:!1,x=W&&!J.includePrerelease&&W.semver.prerelease.length?W.semver:!1;if(y&&y.prerelease.length===1&&Z.operator==="<"&&y.prerelease[0]===0)y=!1;for(let I of $){if(F=F||I.operator===">"||I.operator===">=",H=H||I.operator==="<"||I.operator==="<=",W){if(x){if(I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===x.major&&I.semver.minor===x.minor&&I.semver.patch===x.patch)x=!1}if(I.operator===">"||I.operator===">="){if(U=t0(W,I,J),U===I&&U!==W)return!1}else if(W.operator===">="&&!b(W.semver,String(I),J))return!1}if(Z){if(y){if(I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===y.major&&I.semver.minor===y.minor&&I.semver.patch===y.patch)y=!1}if(I.operator==="<"||I.operator==="<="){if(Y=e0(Z,I,J),Y===I&&Y!==Z)return!1}else if(Z.operator==="<="&&!b(Z.semver,String(I),J))return!1}if(!I.operator&&(Z||W)&&K!==0)return!1}if(W&&H&&!Z&&K!==0)return!1;if(Z&&F&&!W&&K!==0)return!1;if(x||y)return!1;return!0},t0=(q,$,J)=>{if(!q)return $;let Q=Yq(q.semver,$.semver,J);return Q>0?q:Q<0?$:$.operator===">"&&q.operator===">="?$:q},e0=(q,$,J)=>{if(!q)return $;let Q=Yq(q.semver,$.semver,J);return Q<0?q:Q>0?$:$.operator==="<"&&q.operator==="<="?$:q};o0.exports=x9});var W1=O((eJ,Q1)=>{var Fq=C(),$1=N(),V9=D(),J1=o(),P9=E(),X9=Lq(),_9=Eq(),L9=Rq(),A9=uq(),E9=Mq(),N9=fq(),C9=vq(),R9=lq(),S9=X(),k9=pq(),u9=aq(),T9=g(),M9=tq(),b9=oq(),f9=S(),h9=c(),v9=$q(),d9=Jq(),l9=m(),g9=p(),c9=Qq(),m9=z0(),p9=Y0(),s9=u(),a9=_(),n9=M(),i9=A0(),r9=N0(),t9=R0(),e9=u0(),o9=M0(),qJ=i(),$J=l0(),JJ=c0(),QJ=s0(),WJ=n0(),ZJ=q1();Q1.exports={parse:P9,valid:X9,clean:_9,inc:L9,diff:A9,major:E9,minor:N9,patch:C9,prerelease:R9,compare:S9,rcompare:k9,compareLoose:u9,compareBuild:T9,sort:M9,rsort:b9,gt:f9,lt:h9,eq:v9,neq:d9,gte:l9,lte:g9,cmp:c9,coerce:m9,truncate:p9,Comparator:s9,Range:a9,satisfies:n9,toComparators:i9,maxSatisfying:r9,minSatisfying:t9,minVersion:e9,validRange:o9,outside:qJ,gtr:$J,ltr:JJ,intersects:QJ,simplifyRange:WJ,subset:ZJ,SemVer:V9,re:Fq.re,src:Fq.src,tokens:Fq.t,SEMVER_SPEC_VERSION:$1.SEMVER_SPEC_VERSION,RELEASE_TYPES:$1.RELEASE_TYPES,compareIdentifiers:J1.compareIdentifiers,rcompareIdentifiers:J1.rcompareIdentifiers}});function r(){if(!Iq)Iq=W1();return Iq}function oJ(q,$){if(typeof Bun<"u")return Bun.semver.order(q,$)===1;return r().gt(q,$,{loose:!0})}function qQ(q,$){if(typeof Bun<"u")return Bun.semver.order(q,$)>=0;return r().gte(q,$,{loose:!0})}function $Q(q,$){if(typeof Bun<"u")return Bun.semver.order(q,$)===-1;return r().lt(q,$,{loose:!0})}function JQ(q,$){if(typeof Bun<"u")return Bun.semver.satisfies(q,$);return r().satisfies(q,$,{loose:!0})}var Iq;var jJ=()=>{};
|
|
2
|
+
export{W1 as gY,oJ as hY,qQ as iY,$Q as jY,JQ as kY,jJ as lY};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{HD as h,JD as I,dm as g,em as k}from"./cli-0.5.7-q2e6xpch.mjs";import{MW as s,pX as _,rV as S}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as c,QY as m,RY as T}from"./cli-0.5.7-vgc7nzef.mjs";import{Eaa as b,_aa as P}from"./cli-0.5.7-469r2a5r.mjs";import{Vma as D}from"./cli-0.5.7-258ytmbr.mjs";_();P();I();k();T();var v=D(S(),1);function E(C){let e=v.c(17),{customApiKeyTruncated:o,onDone:p}=C,r;if(e[0]!==o||e[1]!==p)r=function(R){e:switch(R){case"yes":{b((n)=>({...n,customApiKeyResponses:{...n.customApiKeyResponses,approved:[...n.customApiKeyResponses?.approved??[],o]}})),p(!0);break e}case"no":b((n)=>({...n,customApiKeyResponses:{...n.customApiKeyResponses,rejected:[...n.customApiKeyResponses?.rejected??[],o]}})),p(!1)}},e[0]=o,e[1]=p,e[2]=r;else r=e[2];let t=r,l;if(e[3]!==t)l=()=>t("no"),e[3]=t,e[4]=l;else l=e[4];let f;if(e[5]===Symbol.for("react.memo_cache_sentinel"))f=c(s,{bold:!0,children:"ANTHROPIC_API_KEY"}),e[5]=f;else f=e[5];let i;if(e[6]!==o)i=m(s,{children:[f,m(s,{children:[": sk-ant-...",o]})]}),e[6]=o,e[7]=i;else i=e[7];let u;if(e[8]===Symbol.for("react.memo_cache_sentinel"))u=c(s,{children:"Do you want to use this API key?"}),e[8]=u;else u=e[8];let y;if(e[9]===Symbol.for("react.memo_cache_sentinel"))y={label:"Yes",value:"yes"},e[9]=y;else y=e[9];let d;if(e[10]===Symbol.for("react.memo_cache_sentinel"))d=[y,{label:m(s,{children:["No (",c(s,{bold:!0,children:"recommended"}),")"]}),value:"no"}],e[10]=d;else d=e[10];let a;if(e[11]!==t)a=c(h,{defaultValue:"no",defaultFocusValue:"no",options:d,onChange:(K)=>t(K),onCancel:()=>t("no")}),e[11]=t,e[12]=a;else a=e[12];let A;if(e[13]!==l||e[14]!==i||e[15]!==a)A=m(g,{title:"Detected a custom API key in your environment",color:"warning",onCancel:l,children:[i,u,a]}),e[13]=l,e[14]=i,e[15]=a,e[16]=A;else A=e[16];return A}
|
|
2
|
+
export{E as ga};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Hc as Jq,Lc as Tq}from"./cli-0.5.7-rr1yd8f3.mjs";import{Sc as zq,Tc as bq}from"./cli-0.5.7-m82d23hf.mjs";import{AH as S,DH as Nq,GI as D,HD as r,ID as Gq,JI as Cq,OH as s,PH as _q,TH as a,WH as l,_H as t,dI as e,dm as n,em as yq,fI as Rq,kF as u,lF as fq,mI as qq,qI as Fq}from"./cli-0.5.7-q2e6xpch.mjs";import{KW as F,MW as C,ZU as i,_U as Kq,pX as Oq,rV as Bq}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as v,QY as R,RY as p}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as Lq}from"./cli-0.5.7-8sbq2qed.mjs";import{B6 as m,J6 as Zq,O6 as g,O7 as o,P6 as Xq,P7 as vq,R6 as $,S8 as wq,T6 as Hq,w8 as x}from"./cli-0.5.7-469r2a5r.mjs";import{Pfa as B,Sfa as Yq}from"./cli-0.5.7-twqt7rxq.mjs";import{Fga as P,Iga as h,Nga as Wq}from"./cli-0.5.7-skfm51ta.mjs";import{Vma as d,Zma as Vq}from"./cli-0.5.7-258ytmbr.mjs";import{readFile as c}from"fs/promises";import{join as j}from"path";function Qq(){return s}function Aq(){return Mq}function Uq(){return`thinkback@${Qq()}`}async function jq(){let{enabled:H}=await D(),q=H.find((U)=>U.name==="thinkback"||U.source&&U.source.includes(Uq()));if(!q)return null;let J=j(q.path,"skills",Sq);if(await x(J))return J;return null}async function Iq(H){let q=j(H,"year_in_review.js"),J=j(H,"player.js");try{await c(q)}catch(z){if(h(z))return{success:!1,message:"No animation found. Run /think-back first to generate one."};return m(z),{success:!1,message:`Could not access animation data: ${P(z).message}`}}try{await c(J)}catch(z){if(h(z))return{success:!1,message:"Player script not found. The player.js file is missing from the thinkback skill."};return m(z),{success:!1,message:`Could not access player script: ${P(z).message}`}}let U=i.get(process.stdout);if(!U)return{success:!1,message:"Failed to access terminal instance"};U.enterAlternateScreen();try{await g("node",[J],{stdio:"inherit",cwd:H,reject:!1})}catch{}finally{U.exitAlternateScreen()}let O=j(H,"year_in_review.html");if(await x(O)){let z=o();$(z==="macos"?"open":z==="windows"?"start":"xdg-open",[O])}return{success:!0,message:"Year in review animation complete!"}}function Pq({onReady:H,onError:q}){let[J,U]=K.useState({phase:"checking"}),[O,z]=K.useState("");if(K.useEffect(()=>{async function Z(){try{let y=await l(),Y=Qq(),G=Aq(),X=Uq(),_=Y in y,L=qq(X);if(!_)U({phase:"installing-marketplace"}),B(`Installing marketplace ${G}`),await t({source:"github",repo:G},(V)=>{z(V)}),S(),B(`Marketplace ${Y} installed`);else if(!L)U({phase:"installing-marketplace"}),z("Updating marketplace…"),B(`Refreshing marketplace ${Y}`),await e(Y,(V)=>{z(V)}),a(),S(),B(`Marketplace ${Y} refreshed`);if(!L){U({phase:"installing-plugin"}),B(`Installing plugin ${X}`);let V=await zq([X]);if(V.failed.length>0){let w=V.failed.map((W)=>`${W.name}: ${W.error}`).join(", ");throw Error(`Failed to install plugin: ${w}`)}S(),B(`Plugin ${X} installed`)}else{let{disabled:V}=await D();if(V.some((W)=>W.name==="thinkback"||W.source?.includes(X))){U({phase:"enabling-plugin"}),B(`Enabling plugin ${X}`);let W=await Jq(X);if(!W.success)throw Error(`Failed to enable plugin: ${W.message}`);S(),B(`Plugin ${X} enabled`)}}U({phase:"ready"}),H()}catch(y){let Y=P(y);m(Y),U({phase:"error",message:Y.message}),q(Y.message)}}Z()},[H,q]),J.phase==="error")return v(F,{flexDirection:"column",children:R(C,{color:"error",children:["Error: ",J.message]})});if(J.phase==="ready")return null;let T=J.phase==="checking"?"Checking thinkback installation…":J.phase==="installing-marketplace"?"Installing marketplace…":J.phase==="enabling-plugin"?"Enabling thinkback plugin…":"Installing thinkback plugin…";return v(F,{flexDirection:"column",children:R(F,{children:[v(u,{}),v(C,{children:O||T})]})})}function mq(H){let q=k.c(19),{onDone:J,onAction:U,skillDir:O,hasGenerated:z}=H,[T,Z]=K.useState(!1),y;if(q[0]!==z)y=z?[{label:"Play animation",value:"play",description:"Watch your year in review"},{label:"Edit content",value:"edit",description:"Modify the animation"},{label:"Fix errors",value:"fix",description:"Fix validation or rendering issues"},{label:"Regenerate",value:"regenerate",description:"Create a new animation from scratch"}]:[{label:"Let's go!",value:"regenerate",description:"Generate your personalized animation"}],q[0]=z,q[1]=y;else y=q[1];let Y=y,G;if(q[2]!==U||q[3]!==J||q[4]!==O)G=function(b){if(Z(!0),b==="play")Iq(O).then(()=>{J(void 0,{display:"skip"})});else U(b)},q[2]=U,q[3]=J,q[4]=O,q[5]=G;else G=q[5];let X=G,_;if(q[6]!==J)_=function(){J(void 0,{display:"skip"})},q[6]=J,q[7]=_;else _=q[7];let L=_;if(T)return null;let V;if(q[8]!==z)V=!z&&R(F,{flexDirection:"column",children:[v(C,{children:"Relive your year of coding with Claude."}),v(C,{dimColor:!0,children:"We'll create a personalized ASCII animation celebrating your journey."})]}),q[8]=z,q[9]=V;else V=q[9];let w;if(q[10]!==X||q[11]!==Y)w=v(r,{options:Y,onChange:X,visibleOptionCount:5}),q[10]=X,q[11]=Y,q[12]=w;else w=q[12];let W;if(q[13]!==V||q[14]!==w)W=R(F,{flexDirection:"column",gap:1,children:[V,w]}),q[13]=V,q[14]=w,q[15]=W;else W=q[15];let f;if(q[16]!==L||q[17]!==W)f=v(n,{title:"Think Back on 2025 with Claude Code",subtitle:"Generate your 2025 Claude Code Think Back (takes a few minutes to run)",onCancel:L,color:"claude",children:W}),q[16]=L,q[17]=W,q[18]=f;else f=q[18];return f}function uq(H){let q=k.c(27),{onDone:J}=H,[U,O]=K.useState(!1),[z,T]=K.useState(null),[Z,y]=K.useState(null),[Y,G]=K.useState(null),X;if(q[0]===Symbol.for("react.memo_cache_sentinel"))X=function(){O(!0)},q[0]=X;else X=q[0];let _=X,L;if(q[1]!==J)L=(Q)=>{T(Q),J(`Error with thinkback: ${Q}. Try running /plugin to manually install the think-back plugin.`,{display:"system"})},q[1]=J,q[2]=L;else L=q[2];let V=L,w,W;if(q[3]!==V||q[4]!==U||q[5]!==z||q[6]!==Z)w=()=>{if(U&&!Z&&!z)jq().then((Q)=>{if(Q)B(`Thinkback skill directory: ${Q}`),y(Q);else V("Could not find thinkback skill directory")})},W=[U,Z,z,V],q[3]=V,q[4]=U,q[5]=z,q[6]=Z,q[7]=w,q[8]=W;else w=q[7],W=q[8];K.useEffect(w,W);let f,M;if(q[9]!==Z)f=()=>{if(!Z)return;let Q=j(Z,"year_in_review.js");x(Q).then((N)=>{B(`Checking for ${Q}: ${N?"found":"not found"}`),G(N)})},M=[Z],q[9]=Z,q[10]=f,q[11]=M;else f=q[10],M=q[11];K.useEffect(f,M);let b;if(q[12]!==J)b=function(N){J({edit:xq,fix:Eq,regenerate:hq}[N],{display:"user",shouldQuery:!0})},q[12]=J,q[13]=b;else b=q[13];let E=b;if(z){let Q;if(q[14]!==z)Q=R(C,{color:"error",children:["Error: ",z]}),q[14]=z,q[15]=Q;else Q=q[15];let N;if(q[16]===Symbol.for("react.memo_cache_sentinel"))N=v(C,{dimColor:!0,children:"Try running /plugin to manually install the think-back plugin."}),q[16]=N;else N=q[16];let A;if(q[17]!==Q)A=R(F,{flexDirection:"column",children:[Q,N]}),q[17]=Q,q[18]=A;else A=q[18];return A}if(!U){let Q;if(q[19]!==V)Q=v(Pq,{onReady:_,onError:V}),q[19]=V,q[20]=Q;else Q=q[20];return Q}if(!Z||Y===null){let Q;if(q[21]===Symbol.for("react.memo_cache_sentinel"))Q=R(F,{children:[v(u,{}),v(C,{children:"Loading thinkback skill…"})]}),q[21]=Q;else Q=q[21];return Q}let I;if(q[22]!==E||q[23]!==Y||q[24]!==J||q[25]!==Z)I=v(mq,{onDone:J,onAction:E,skillDir:Z,hasGenerated:Y}),q[22]=E,q[23]=Y,q[24]=J,q[25]=Z,q[26]=I;else I=q[26];return I}async function Yz(H){return v(uq,{onDone:H})}var k,K,Mq="anthropics/claude-plugins-official",Sq="thinkback",xq='Use the Skill tool to invoke the "thinkback" skill with mode=edit to modify my existing Claude Code year in review animation. Ask me what I want to change. When the animation is ready, tell the user to run /think-back again to play it.',Eq='Use the Skill tool to invoke the "thinkback" skill with mode=fix to fix validation or rendering errors in my existing Claude Code year in review animation. Run the validator, identify errors, and fix them. When the animation is ready, tell the user to run /think-back again to play it.',hq='Use the Skill tool to invoke the "thinkback" skill with mode=regenerate to create a completely new Claude Code year in review animation from scratch. Delete the existing animation and start fresh. When the animation is ready, tell the user to run /think-back again to play it.';var Dq=Vq(()=>{Xq();Gq();yq();fq();Kq();Oq();Tq();Yq();Wq();Hq();wq();Zq();vq();Nq();Fq();Rq();_q();Cq();bq();p();k=d(Bq(),1),K=d(Lq(),1)});
|
|
2
|
+
export{Iq as xc,Yz as yc,Dq as zc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{MW as K,pX as k,rV as Z}from"./cli-0.5.7-x1w96j6d.mjs";import{QY as J,RY as H}from"./cli-0.5.7-vgc7nzef.mjs";import{K6 as v,L6 as Y}from"./cli-0.5.7-469r2a5r.mjs";import{Vma as V,Zma as X}from"./cli-0.5.7-258ytmbr.mjs";function N(M){let b=L.c(5),{status:P,withSpace:D}=M,Q=D===void 0?!1:D,q=A[P],z=!q.color,B=Q&&" ",y;if(b[0]!==q.color||b[1]!==q.icon||b[2]!==z||b[3]!==B)y=J(K,{color:q.color,dimColor:z,children:[q.icon,B]}),b[0]=q.color,b[1]=q.icon,b[2]=z,b[3]=B,b[4]=y;else y=b[4];return y}var L,A;var C=X(()=>{Y();k();H();L=V(Z(),1),A={success:{icon:v.tick,color:"success"},error:{icon:v.cross,color:"error"},warning:{icon:v.warning,color:"warning"},info:{icon:v.info,color:"suggestion"},pending:{icon:v.circle,color:void 0},loading:{icon:"…",color:void 0}}});
|
|
2
|
+
export{N as pg,C as qg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Zma as B}from"./cli-0.5.7-258ytmbr.mjs";function F(z){let k=z.trim();if(!k.startsWith("/"))return null;let b=k.slice(1).split(" ");if(!b[0])return null;let j=b[0],l=!1,q=1;if(b.length>1&&b[1]==="(MCP)")j=j+" (MCP)",l=!0,q=2;let A=b.slice(q).join(" ");return{commandName:j,args:A,isMcp:l}}var C=()=>{};
|
|
2
|
+
export{F as ah,C as bh};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Zma as V}from"./cli-0.5.7-258ytmbr.mjs";var k0,b;var T=V(()=>{k0=typeof global=="object"&&global&&global.Object===Object&&global,b=k0});var m0,y0,K;var z=V(()=>{T();m0=typeof self=="object"&&self&&self.Object===Object&&self,y0=b||m0||Function("return this")(),K=y0});var l0,B;var x=V(()=>{z();l0=K.Symbol,B=l0});function c0(q){var Z=v0.call(q,N),Q=q[N];try{q[N]=void 0;var Y=!0}catch(L){}var A=u0.call(q);if(Y)if(Z)q[N]=Q;else delete q[N];return A}var j,v0,u0,N,C;var f=V(()=>{x();j=Object.prototype,v0=j.hasOwnProperty,u0=j.toString,N=B?B.toStringTag:void 0;C=c0});function i0(q){return o0.call(q)}var h0,o0,g;var d=V(()=>{h0=Object.prototype,o0=h0.toString;g=i0});function s0(q){if(q==null)return q===void 0?r0:n0;return p&&p in Object(q)?C(q):g(q)}var n0="[object Null]",r0="[object Undefined]",p,k;var m=V(()=>{x();f();d();p=B?B.toStringTag:void 0;k=s0});function t0(q){var Z=typeof q;return q!=null&&(Z=="object"||Z=="function")}var G;var O=V(()=>{G=t0});function Qq(q){if(!G(q))return!1;var Z=k(q);return Z==e0||Z==qq||Z==a0||Z==Zq}var a0="[object AsyncFunction]",e0="[object Function]",qq="[object GeneratorFunction]",Zq="[object Proxy]",y;var l=V(()=>{m();O();y=Qq});var Vq,I;var v=V(()=>{z();Vq=K["__core-js_shared__"],I=Vq});function Yq(q){return!!u&&u in q}var u,c;var h=V(()=>{v();u=function(){var q=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||"");return q?"Symbol(src)_1."+q:""}();c=Yq});function Xq(q){if(q!=null){try{return Wq.call(q)}catch(Z){}try{return q+""}catch(Z){}}return""}var $q,Wq,o;var i=V(()=>{$q=Function.prototype,Wq=$q.toString;o=Xq});function Nq(q){if(!G(q)||c(q))return!1;var Z=y(q)?Lq:Bq;return Z.test(o(q))}var Kq,Bq,Jq,Uq,Eq,Aq,Lq,n;var r=V(()=>{l();h();O();i();Kq=/[\\^$.*+?()[\]{}|]/g,Bq=/^\[object .+?Constructor\]$/,Jq=Function.prototype,Uq=Object.prototype,Eq=Jq.toString,Aq=Uq.hasOwnProperty,Lq=RegExp("^"+Eq.call(Aq).replace(Kq,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");n=Nq});function wq(q,Z){return q==null?void 0:q[Z]}var s;var t=V(()=>{s=wq});function Fq(q,Z){var Q=s(q,Z);return n(Q)?Q:void 0}var D;var R=V(()=>{r();t();D=Fq});var Pq,$;var w=V(()=>{R();Pq=D(Object,"create"),$=Pq});function zq(){this.__data__=$?$(null):{},this.size=0}var a;var e=V(()=>{w();a=zq});function Gq(q){var Z=this.has(q)&&delete this.__data__[q];return this.size-=Z?1:0,Z}var q0;var Z0=V(()=>{q0=Gq});function Oq(q){var Z=this.__data__;if($){var Q=Z[q];return Q===Iq?void 0:Q}return xq.call(Z,q)?Z[q]:void 0}var Iq="__lodash_hash_undefined__",Dq,xq,Q0;var V0=V(()=>{w();Dq=Object.prototype,xq=Dq.hasOwnProperty;Q0=Oq});function Mq(q){var Z=this.__data__;return $?Z[q]!==void 0:Hq.call(Z,q)}var Rq,Hq,Y0;var $0=V(()=>{w();Rq=Object.prototype,Hq=Rq.hasOwnProperty;Y0=Mq});function Sq(q,Z){var Q=this.__data__;return this.size+=this.has(q)?0:1,Q[q]=$&&Z===void 0?_q:Z,this}var _q="__lodash_hash_undefined__",W0;var X0=V(()=>{w();W0=Sq});function J(q){var Z=-1,Q=q==null?0:q.length;this.clear();while(++Z<Q){var Y=q[Z];this.set(Y[0],Y[1])}}var H;var K0=V(()=>{e();Z0();V0();$0();X0();J.prototype.clear=a;J.prototype.delete=q0;J.prototype.get=Q0;J.prototype.has=Y0;J.prototype.set=W0;H=J});function bq(){this.__data__=[],this.size=0}var B0;var J0=V(()=>{B0=bq});function Tq(q,Z){return q===Z||q!==q&&Z!==Z}var U0;var E0=V(()=>{U0=Tq});function jq(q,Z){var Q=q.length;while(Q--)if(U0(q[Q][0],Z))return Q;return-1}var W;var F=V(()=>{E0();W=jq});function gq(q){var Z=this.__data__,Q=W(Z,q);if(Q<0)return!1;var Y=Z.length-1;if(Q==Y)Z.pop();else fq.call(Z,Q,1);return--this.size,!0}var Cq,fq,A0;var L0=V(()=>{F();Cq=Array.prototype,fq=Cq.splice;A0=gq});function dq(q){var Z=this.__data__,Q=W(Z,q);return Q<0?void 0:Z[Q][1]}var N0;var w0=V(()=>{F();N0=dq});function pq(q){return W(this.__data__,q)>-1}var F0;var P0=V(()=>{F();F0=pq});function kq(q,Z){var Q=this.__data__,Y=W(Q,q);if(Y<0)++this.size,Q.push([q,Z]);else Q[Y][1]=Z;return this}var z0;var G0=V(()=>{F();z0=kq});function U(q){var Z=-1,Q=q==null?0:q.length;this.clear();while(++Z<Q){var Y=q[Z];this.set(Y[0],Y[1])}}var I0;var D0=V(()=>{J0();L0();w0();P0();G0();U.prototype.clear=B0;U.prototype.delete=A0;U.prototype.get=N0;U.prototype.has=F0;U.prototype.set=z0;I0=U});var mq,x0;var O0=V(()=>{R();z();mq=D(K,"Map"),x0=mq});function yq(){this.size=0,this.__data__={hash:new H,map:new(x0||I0),string:new H}}var R0;var H0=V(()=>{K0();D0();O0();R0=yq});function lq(q){var Z=typeof q;return Z=="string"||Z=="number"||Z=="symbol"||Z=="boolean"?q!=="__proto__":q===null}var M0;var _0=V(()=>{M0=lq});function vq(q,Z){var Q=q.__data__;return M0(Z)?Q[typeof Z=="string"?"string":"hash"]:Q.map}var X;var P=V(()=>{_0();X=vq});function uq(q){var Z=X(this,q).delete(q);return this.size-=Z?1:0,Z}var S0;var b0=V(()=>{P();S0=uq});function cq(q){return X(this,q).get(q)}var T0;var j0=V(()=>{P();T0=cq});function hq(q){return X(this,q).has(q)}var C0;var f0=V(()=>{P();C0=hq});function oq(q,Z){var Q=X(this,q),Y=Q.size;return Q.set(q,Z),this.size+=Q.size==Y?0:1,this}var g0;var d0=V(()=>{P();g0=oq});function E(q){var Z=-1,Q=q==null?0:q.length;this.clear();while(++Z<Q){var Y=q[Z];this.set(Y[0],Y[1])}}var M;var p0=V(()=>{H0();b0();j0();f0();d0();E.prototype.clear=R0;E.prototype.delete=S0;E.prototype.get=T0;E.prototype.has=C0;E.prototype.set=g0;M=E});function _(q,Z){if(typeof q!="function"||Z!=null&&typeof Z!="function")throw TypeError(iq);var Q=function(){var Y=arguments,A=Z?Z.apply(this,Y):Y[0],L=Q.cache;if(L.has(A))return L.get(A);var S=q.apply(this,Y);return Q.cache=L.set(A,S)||L,S};return Q.cache=new(_.Cache||M),Q}var iq="Expected a function",j6;var nq=V(()=>{p0();_.Cache=M;j6=_});
|
|
2
|
+
export{U0 as jma,E0 as kma,I0 as lma,D0 as mma,b as nma,T as oma,K as pma,z as qma,B as rma,x as sma,k as tma,m as uma,G as vma,O as wma,y as xma,l as yma,o as zma,i as Ama,D as Bma,R as Cma,x0 as Dma,O0 as Ema,M as Fma,p0 as Gma,j6 as Hma,nq as Ima};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{B3 as d,b3 as f,h0 as j,k0 as I,v2 as b,w2 as c}from"./cli-0.5.7-8ychjqct.mjs";import{D5 as _,E5 as D}from"./cli-0.5.7-0df5m6td.mjs";import{F5 as X,X5 as T}from"./cli-0.5.7-yzncgfs4.mjs";import{B6 as F,J6 as m}from"./cli-0.5.7-469r2a5r.mjs";import{Hca as $,Ica as R,Jca as y,Kca as E}from"./cli-0.5.7-mzfr99sc.mjs";import{Lea as q,Mea as h}from"./cli-0.5.7-xepvraxn.mjs";import{Pfa as W,Sfa as z,sfa as M,xfa as U}from"./cli-0.5.7-twqt7rxq.mjs";import{Fga as k,Gga as Y,Nga as O}from"./cli-0.5.7-skfm51ta.mjs";import{Zma as A}from"./cli-0.5.7-258ytmbr.mjs";import{randomUUID as l}from"crypto";function p(J){if(!X.isAxiosError(J))return!1;if(!J.response)return!0;if(J.response.status>=500)return!0;return!1}async function u(J,B){let N;for(let K=0;K<=x;K++)try{return await X.get(J,B)}catch(Q){if(N=Q,!p(Q))throw Q;if(K>=x)throw W(`Teleport request failed after ${K+1} attempts: ${Y(Q)}`),Q;let V=S[K]??2000;W(`Teleport request failed (attempt ${K+1}/${x+1}), retrying in ${V}ms: ${Y(Q)}`),await b(V)}throw N}async function C(){let J=f()?.accessToken;if(J===void 0)throw Error("Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.");let B=await j();if(!B)throw Error("Unable to get organization UUID");return{accessToken:J,orgUUID:B}}async function NJ(){let{accessToken:J,orgUUID:B}=await C(),N=`${q().BASE_API_URL}/v1/sessions`;try{let K={...L(J),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},Q=await u(N,{headers:K});if(Q.status!==200)throw Error(`Failed to fetch code sessions: ${Q.statusText}`);return Q.data.data.map((Z)=>{let v=Z.session_context.sources.find((G)=>G.type==="git_repository"),H=null;if(v?.url){let G=_(v.url);if(G){let[w,P]=G.split("/");if(w&&P)H={name:P,owner:{login:w},default_branch:v.revision||void 0}}}return{id:Z.id,title:Z.title||"Untitled",description:"",status:Z.session_status,repo:H,turns:[],created_at:Z.created_at,updated_at:Z.updated_at}})}catch(K){let Q=k(K);throw F(Q),K}}function L(J){return{Authorization:`Bearer ${J}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"}}async function WJ(J){let{accessToken:B,orgUUID:N}=await C(),K=`${q().BASE_API_URL}/v1/sessions/${J}`,Q={...L(B),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":N},V=await X.get(K,{headers:Q,timeout:15000,validateStatus:(Z)=>Z<500});if(V.status!==200){let v=V.data?.error?.message;if(V.status===404)throw Error(`Session not found: ${J}`);if(V.status===401)throw Error("Session expired. Please run /login to sign in again.");throw Error(v||`Failed to fetch session: ${V.status} ${V.statusText}`)}return V.data}function GJ(J){return J.session_context.outcomes?.find((N)=>N.type==="git_repository")?.git_info?.branches[0]}async function vJ(J,B,N){try{let{accessToken:K,orgUUID:Q}=await C(),V=`${q().BASE_API_URL}/v1/sessions/${J}/events`,Z={...L(K),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":Q},H={events:[{uuid:N?.uuid??l(),session_id:J,type:"user",parent_tool_use_id:null,message:{role:"user",content:B}}]};W(`[sendEventToRemoteSession] Sending event to session ${J}`);let G=await X.post(V,H,{headers:Z,validateStatus:(w)=>w<500,timeout:30000});if(G.status===200||G.status===201)return W(`[sendEventToRemoteSession] Successfully sent event to session ${J}`),!0;return W(`[sendEventToRemoteSession] Failed with status ${G.status}: ${M(G.data)}`),!1}catch(K){return W(`[sendEventToRemoteSession] Error: ${Y(K)}`),!1}}async function XJ(J,B){try{let{accessToken:N,orgUUID:K}=await C(),Q=`${q().BASE_API_URL}/v1/sessions/${J}`,V={...L(N),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":K};W(`[updateSessionTitle] Updating title for session ${J}: "${B}"`);let Z=await X.patch(Q,{title:B},{headers:V,validateStatus:(v)=>v<500});if(Z.status===200)return W(`[updateSessionTitle] Successfully updated title for session ${J}`),!0;return W(`[updateSessionTitle] Failed with status ${Z.status}: ${M(Z.data)}`),!1}catch(N){return W(`[updateSessionTitle] Error: ${Y(N)}`),!1}}var S,x,$J="ccr-byoc-2025-07-29",BJ;var g=A(()=>{T();h();I();R();d();z();D();O();E();m();c();U();S=[2000,4000,8000,16000],x=S.length;BJ=y(()=>$.object({id:$.string(),title:$.string(),description:$.string(),status:$.enum(["idle","working","waiting","completed","archived","cancelled","rejected"]),repo:$.object({name:$.string(),owner:$.object({login:$.string()}),default_branch:$.string().optional()}).nullable(),turns:$.array($.string()),created_at:$.string(),updated_at:$.string()}))});
|
|
2
|
+
export{$J as aZ,p as bZ,u as cZ,BJ as dZ,C as eZ,NJ as fZ,L as gZ,WJ as hZ,GJ as iZ,vJ as jZ,XJ as kZ,g as lZ};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{AI as c,bI as R,bn as L,cn as D,dn as O,fI as b,gn as _,hn as S,iI as w,oI as M,qI as P,vI as m,wI as h}from"./cli-0.5.7-q2e6xpch.mjs";import{B6 as N,C_ as E,E$ as B,G$ as A,J$ as C,J6 as T,T$ as j,u_ as x}from"./cli-0.5.7-469r2a5r.mjs";import{Zda as U,_da as F}from"./cli-0.5.7-sjx0wm99.mjs";import{Pfa as G,Sfa as v}from"./cli-0.5.7-twqt7rxq.mjs";import{Zma as y}from"./cli-0.5.7-258ytmbr.mjs";import{join as I}from"path";async function qq(){let q=C(),z=[],W=L();for(let[K,Q]of Object.entries(W))if(K.includes("@")&&Q)z.push(K);if(q.enabledPlugins)for(let[K,Q]of Object.entries(q.enabledPlugins)){if(!K.includes("@"))continue;let J=z.indexOf(K);if(Q){if(J===-1)z.push(K)}else if(J!==-1)z.splice(J,1)}return z}function zq(){let q=new Map,z=L();for(let[K,Q]of Object.entries(z)){if(!K.includes("@"))continue;if(Q===!0)q.set(K,"flag");else if(Q===!1)q.delete(K)}let W=[{scope:"managed",source:"policySettings"},{scope:"user",source:"userSettings"},{scope:"project",source:"projectSettings"},{scope:"local",source:"localSettings"},{scope:"flag",source:"flagSettings"}];for(let{scope:K,source:Q}of W){let J=B(Q);if(!J?.enabledPlugins)continue;for(let[V,Y]of Object.entries(J.enabledPlugins)){if(!V.includes("@"))continue;if(V in z&&z[V]!==Y)G(`Plugin ${V} from --add-dir (${z[V]}) overridden by ${Q} (${Y})`);if(Y===!0)q.set(V,K);else if(Y===!1)q.delete(V)}}return G(`Found ${q.size} enabled plugins with scopes: ${Array.from(q.entries()).map(([K,Q])=>`${K}(${Q})`).join(", ")}`),q}function Jq(q){return q!=="flag"}function Kq(q){return O[q]}async function p(){M().catch((W)=>{N(W)});let q=w(),z=Object.keys(q.plugins);return G(`Found ${z.length} installed plugins`),z}async function Qq(q){try{let z=await p(),W=q.filter((J)=>!z.includes(J));return(await Promise.all(W.map(async(J)=>{try{let V=await R(J);return{pluginId:J,found:V!==null&&V!==void 0}}catch(V){return G(`Failed to check plugin ${J} in marketplace: ${V}`),{pluginId:J,found:!1}}}))).filter(({found:J})=>J).map(({pluginId:J})=>J)}catch(z){return N(z),[]}}async function Vq(q,z,W="user"){let K=W!=="user"?U():void 0,Q=_(W),J=B(Q),V={...J?.enabledPlugins},Y=[],k=[];for(let H=0;H<q.length;H++){let X=q[H];if(!X)continue;if(z)z(X,H+1,q.length);try{let Z=await R(X);if(!Z){k.push({name:X,error:"Plugin not found in any marketplace"});continue}let{entry:$,marketplaceInstallLocation:f}=Z;if(!x($.source))await m(X,$,W,K);else h({pluginId:X,installPath:I(f,$.source),version:$.version},W,K);V[X]=!0,Y.push(X)}catch(Z){let $=Z instanceof Error?Z.message:String(Z);k.push({name:X,error:$}),N(Z)}}return A(Q,{...J,enabledPlugins:V}),{installed:Y,failed:k}}var a=y(()=>{F();v();T();j();D();P();b();S();c();E()});
|
|
2
|
+
export{qq as Mc,zq as Nc,Jq as Oc,Kq as Pc,p as Qc,Qq as Rc,Vq as Sc,a as Tc};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{jf as LJ,kf as RQ}from"./cli-0.5.7-hw11qa05.mjs";import{lf as hJ,mf as HQ}from"./cli-0.5.7-c1mv1399.mjs";import{nf as PJ,of as WQ}from"./cli-0.5.7-zkw2fx86.mjs";import{pf as oq,qf as $J}from"./cli-0.5.7-ra5kv4tw.mjs";import{rf as wq,sf as nq,tf as gJ}from"./cli-0.5.7-dp3z7wkh.mjs";import{uf as WJ,vf as wQ}from"./cli-0.5.7-8ap24w7a.mjs";import{Bk as aq,CM as nJ,Cm as VJ,Dm as VQ,Ek as iq,OP as P,PP as $q,Qk as lJ,TP as vq,UP as cQ,Vt as g,Yt as NQ,eE as UJ,fE as FJ,gE as wJ,hE as UQ,lM as tq,nM as oJ,pr as XJ,qr as XQ,rr as yJ,sG as HJ,sr as NJ,tG as RJ,tr as yQ,uG as FQ,ut as uq,vt as mq,xk as Fq,xt as pq,yt as fJ,zM as Aq}from"./cli-0.5.7-q2e6xpch.mjs";import{CQ as BQ,yQ as BJ}from"./cli-0.5.7-bzrvdrq4.mjs";import{QS as zJ,SS as YJ,VS as ZQ}from"./cli-0.5.7-73er78b7.mjs";import{AT as GQ,zT as KJ}from"./cli-0.5.7-yaywev87.mjs";import{OU as GJ,PU as YQ,XU as Mq,YU as KQ}from"./cli-0.5.7-7a9gq9ff.mjs";import{KW as y,MW as Q,pX as Oq,rV as Pq}from"./cli-0.5.7-x1w96j6d.mjs";import{OY as h,PY as Y,QY as Z,RY as c}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as zQ}from"./cli-0.5.7-8sbq2qed.mjs";import{R1 as cJ,d2 as ZJ,e2 as QQ,s1 as rq}from"./cli-0.5.7-8ychjqct.mjs";import{J$ as QJ,K6 as $,L6 as tJ,S8 as qQ,T$ as JQ,V_ as gq,W_ as dJ,Z_ as xq,f$ as TJ,w8 as Iq}from"./cli-0.5.7-469r2a5r.mjs";import{$fa as JJ,mga as sJ}from"./cli-0.5.7-tqn2ged5.mjs";import{ima as eJ,xia as qJ}from"./cli-0.5.7-hp25yk8y.mjs";import{Vma as Bq,Zma as Uq}from"./cli-0.5.7-258ytmbr.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(pJ),X=G.filter(mJ);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(uJ),X.map(EJ)]})]})}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 EJ(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 uJ(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 mJ(J){return J.severity==="warning"}function pJ(J){return J.severity==="error"}var jq;var dq=Uq(()=>{Oq();fJ();c();jq=Bq(Pq(),1)});function cq(){let J=Tq.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(_J),G.warnings.map(jJ),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 jJ(J,q){return Z(Q,{color:"warning",children:["└ ",J]},q)}function _J(J,q){return Z(Q,{color:"error",children:["└ ",J]},q)}var Tq;var lq=Uq(()=>{Oq();$q();c();Tq=Bq(Pq(),1)});async function xJ(){let J=iq(await aq());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 > ${Fq.toLocaleString()})`:`${J.length} large CLAUDE.md files detected (each > ${Fq.toLocaleString()} chars)`,details:q,currentValue:J.length,threshold:Fq}}async function rJ(J){if(!J)return null;let q=nq(J);if(q<=wq)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 > ${wq.toLocaleString()})`,details:G,currentValue:q,threshold:wq}}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 tq(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=oq(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 eq(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 sq=Uq(()=>{nJ();oJ();lJ();cJ();dJ();$J();$q();gJ();TJ()});import{join as bq}from"path";function hQ(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 pZ(J){let q=Cq.c(84),{onDone:V}=J,G=g(dQ),K=g(_Q),X=g(jQ),B=g(pQ);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,OJ]=w.useState(null),[L,kq]=w.useState(null),Hq=PJ(),r;if(q[2]===Symbol.for("react.memo_cache_sentinel"))r=vq().then(uQ),q[2]=r;else r=q[2];let AJ=r,bJ=QJ()?.autoUpdatesChannel??"latest",a;if(q[3]!==Hq)a=Hq.filter(EQ),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:RJ,upperLimit:HJ},{name:"CLAUDE_CODE_MAX_OUTPUT_TOKENS",...ZJ("claude-opus-4-8")}].map(fQ).filter(SQ),q[5]=o;else o=q[5];let Dq=o,n,e;if(q[6]!==G||q[7]!==X||q[8]!==H)n=()=>{vq().then(R),(async()=>{let W=bq(JJ(),"agents"),Sq=bq(qJ(),".claudin","agents"),{activeAgents:fq,allAgents:IJ,failedFiles:Eq}=G,[MJ,vJ]=await Promise.all([Iq(W),Iq(Sq)]),CJ={activeAgents:fq.map(DQ),userAgentsDir:W,projectAgentsDir:Sq,userDirExists:MJ,projectDirExists:vJ,failedFiles:Eq};x(CJ);let kJ=await eq(H,{activeAgents:fq,allAgents:IJ,failedFiles:Eq},async()=>X);if(OJ(kJ),UJ()){let Lq=bq(BJ(),"claude","locks"),DJ=wJ(Lq),SJ=FJ(Lq);kq({enabled:!0,locks:SJ,locksDir:Lq,staleLocksCleaned:DJ})}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(Mq,{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 M;if(q[27]!==z.configInstallMethod)M=Z(Q,{children:["└ Config install method: ",z.configInstallMethod]}),q[27]=z.configInstallMethod,q[28]=M;else M=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",v;if(q[29]!==Rq||q[30]!==Wq)v=Z(Q,{children:["└ Search: ",Rq," (",Wq,")"]}),q[29]=Rq,q[30]=Wq,q[31]=v;else v=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(kQ)]}),q[34]=z.multipleInstallations,q[35]=k;else k=q[35];let D;if(q[36]!==z.warnings)D=z.warnings.length>0&&Z(h,{children:[Y(Q,{}),z.warnings.map(CQ)]}),q[36]=z.warnings,q[37]=D;else D=q[37];let S;if(q[38]!==i)S=i.length>0&&Z(y,{flexDirection:"column",marginTop:1,marginBottom:1,children:[Y(Q,{bold:!0,children:"Invalid Settings"}),Y(LJ,{errors:i})]}),q[38]=i,q[39]=S;else S=q[39];let f;if(q[40]!==O||q[41]!==A||q[42]!==b||q[43]!==I||q[44]!==M||q[45]!==v||q[46]!==C||q[47]!==k||q[48]!==D||q[49]!==S)f=Z(y,{flexDirection:"column",children:[Qq,O,A,b,I,M,v,C,k,D,S]}),q[40]=O,q[41]=A,q[42]=b,q[43]=I,q[44]=M,q[45]=v,q[46]=C,q[47]=k,q[48]=D,q[49]=S,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: ",bJ]}),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(hQ,{promise:AJ})}),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(cq,{}),Kq=Y(WJ,{}),Vq=Y(_q,{}),Xq=Dq.length>0&&Z(y,{flexDirection:"column",children:[Y(Q,{bold:!0,children:"Environment Variables"}),Dq.map(vQ)]}),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(MQ)]}),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(IQ)]}),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(bQ)]}),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(AQ)]}),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(OQ)]}),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(PQ)]}),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(LQ)]})]}),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(hJ,{})}),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(Mq,{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 LQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J]},q)}function PQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J]},q)}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.source||"unknown","plugin"in J&&J.plugin?` [${J.plugin}]`:"",":"," ",VJ(J)]},q)}function IQ(J,q){return Z(Q,{dimColor:!0,children:[" ","└ ",J.path,": ",J.error]},q)}function MQ(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 vQ(J,q){return Z(Q,{children:["└ ",J.name,":"," ",Y(Q,{color:J.status==="capped"?"warning":"error",children:J.message})]},q)}function CQ(J,q){return Z(y,{flexDirection:"column",children:[Z(Q,{color:"warning",children:["Warning: ",J.issue]}),Z(Q,{children:["Fix: ",J.fix]})]},q)}function kQ(J,q){return Z(Q,{children:["└ ",J.type," at ",J.path]},q)}function DQ(J){return{agentType:J.agentType,source:J.source}}function SQ(J){return J.status!=="valid"}function fQ(J){let q=process.env[J.name],V=XJ(J.name,q,J.default,J.upperLimit);return{name:J.name,...V}}function EQ(J){return J.mcpErrorMetadata===void 0}function uQ(J){return(J.installationType==="native"?YJ:zJ)().catch(mQ)}function mQ(){return{latest:null,stable:null}}function pQ(J){return J.plugins.errors}function jQ(J){return J.toolPermissionContext}function _Q(J){return J.mcp.tools}function dQ(J){return J.agentDefinitions}var Cq,w;var TQ=Uq(()=>{tJ();dq();wQ();QQ();sJ();eJ();KQ();HQ();lq();RQ();WQ();GQ();Oq();YQ();NQ();VQ();ZQ();sq();cQ();XQ();qQ();UQ();JQ();yQ();FQ();BQ();c();Cq=Bq(Pq(),1),w=Bq(zQ(),1)});
|
|
4
|
+
export{pZ as hf,TQ as if};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{AN as d,mM as L,mN as N,nM as w,vw as B,ww as U}from"./cli-0.5.7-q2e6xpch.mjs";import{b9 as z,f$ as P,i9 as F}from"./cli-0.5.7-469r2a5r.mjs";import{$ca as H,fda as v}from"./cli-0.5.7-5mrw857q.mjs";import{Zma as j}from"./cli-0.5.7-258ytmbr.mjs";async function V(R){let{messages:I,getAppState:O,options:{mainLoopModel:J,tools:Y,agentDefinitions:Z,customSystemPrompt:W,appendSystemPrompt:X}}=R,Q=N(I),{messages:K}=await B(Q),h=O();return L(K,J,async()=>h.toolPermissionContext,Y,Z,void 0,{options:{customSystemPrompt:W,appendSystemPrompt:X}},void 0,Q)}async function g(R,I){let O=await V(I);return{type:"text",value:b(O)}}function b(R){let{categories:I,totalTokens:O,rawMaxTokens:J,percentage:Y,model:Z,memoryFiles:W,mcpTools:X,agents:Q,skills:K}=R,h=`## Context Usage
|
|
2
|
+
|
|
3
|
+
`;h+=`**Model:** ${Z}
|
|
4
|
+
`,h+=`**Tokens:** ${H(O)} / ${H(J)} (${Y}%)
|
|
5
|
+
`,h+=`
|
|
6
|
+
`;let _=I.filter((q)=>q.tokens>0&&q.name!=="Free space"&&q.name!=="Autocompact buffer");if(_.length>0){h+=`### Estimated usage by category
|
|
7
|
+
|
|
8
|
+
`,h+=`| Category | Tokens | Percentage |
|
|
9
|
+
`,h+=`|----------|--------|------------|
|
|
10
|
+
`;for(let G of _){let $=(G.tokens/J*100).toFixed(1);h+=`| ${G.name} | ${H(G.tokens)} | ${$}% |
|
|
11
|
+
`}let q=I.find((G)=>G.name==="Free space");if(q&&q.tokens>0){let G=(q.tokens/J*100).toFixed(1);h+=`| Free space | ${H(q.tokens)} | ${G}% |
|
|
12
|
+
`}let E=I.find((G)=>G.name==="Autocompact buffer");if(E&&E.tokens>0){let G=(E.tokens/J*100).toFixed(1);h+=`| Autocompact buffer | ${H(E.tokens)} | ${G}% |
|
|
13
|
+
`}h+=`
|
|
14
|
+
`}if(X.length>0){h+=`### MCP Tools
|
|
15
|
+
|
|
16
|
+
`,h+=`| Tool | Server | Tokens |
|
|
17
|
+
`,h+=`|------|--------|--------|
|
|
18
|
+
`;for(let q of X)h+=`| ${q.name} | ${q.serverName} | ${H(q.tokens)} |
|
|
19
|
+
`;h+=`
|
|
20
|
+
`}if(Q.length>0){h+=`### Custom Agents
|
|
21
|
+
|
|
22
|
+
`,h+=`| Agent Type | Source | Tokens |
|
|
23
|
+
`,h+=`|------------|--------|--------|
|
|
24
|
+
`;for(let q of Q){let E;switch(q.source){case"projectSettings":E="Project";break;case"userSettings":E="User";break;case"localSettings":E="Local";break;case"flagSettings":E="Flag";break;case"policySettings":E="Policy";break;case"plugin":E="Plugin";break;case"built-in":E="Built-in";break;default:E=String(q.source)}h+=`| ${q.agentType} | ${E} | ${H(q.tokens)} |
|
|
25
|
+
`}h+=`
|
|
26
|
+
`}if(W.length>0){h+=`### Memory Files
|
|
27
|
+
|
|
28
|
+
`,h+=`| Type | Path | Tokens |
|
|
29
|
+
`,h+=`|------|------|--------|
|
|
30
|
+
`;for(let q of W)h+=`| ${q.type} | ${q.path} | ${H(q.tokens)} |
|
|
31
|
+
`;h+=`
|
|
32
|
+
`}if(K&&K.tokens>0&&K.skillFrontmatter.length>0){h+=`### Skills
|
|
33
|
+
|
|
34
|
+
`,h+=`| Skill | Source | Tokens |
|
|
35
|
+
`,h+=`|-------|--------|--------|
|
|
36
|
+
`;for(let q of K.skillFrontmatter)h+=`| ${q.name} | ${z(q.source)} | ${H(q.tokens)} |
|
|
37
|
+
`;h+=`
|
|
38
|
+
`}return h}var A=j(()=>{U();w();v();d();F();P()});
|
|
39
|
+
export{V as rg,g as sg,A as tg};
|