@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,18 @@
|
|
|
1
|
+
import{Od as YZ,Pd as gQ}from"./cli-0.5.7-ayjrdmrk.mjs";import{Qd as kZ,Wd as XX}from"./cli-0.5.7-q8v8naf8.mjs";import{$l as Z0,$v as RQ,AB as vX,AN as LZ,BD as OQ,BF as pZ,Bp as MZ,Ci as u0,Cq as d0,Cx as NZ,Di as pJ,Dx as rQ,ED as gX,EF as kJ,Ep as lQ,Eq as hQ,FF as JZ,Fy as IX,GF as OJ,Gx as a0,Gy as DX,HD as j0,HF as WJ,Hl as HJ,Hx as CZ,ID as QX,IF as ZZ,Il as DQ,JF as QZ,KF as XZ,MF as p0,MG as $0,Mt as NQ,NF as _0,Nt as CX,OF as PJ,OG as FZ,Pq as VQ,Sq as KX,Vl as qQ,Vt as zJ,Wi as dZ,Wl as yX,Wt as WQ,Xi as tQ,Xl as l,Yl as A0,Yt as bX,Zt as yZ,_i as r0,_t as iQ,aj as GZ,am as B0,ay as fJ,bF as WZ,bj as UJ,bq as aZ,by as BX,cF as RZ,dF as s0,dm as n,em as I0,eq as FX,fF as MJ,fo as GQ,fq as cJ,fw as AX,gF as F0,gq as LQ,hF as i0,hi as VZ,ho as EX,iy as mZ,jy as ZX,mC as HQ,nq as U0,pC as hX,pN as lZ,uN as iZ,xq as vQ,zB as FQ}from"./cli-0.5.7-q2e6xpch.mjs";import{AU as nZ,OU as q0,PU as g0,zU as QJ}from"./cli-0.5.7-7a9gq9ff.mjs";import{AV as l0,KW as C,MW as V,QW as JJ,_W as wZ,pX as f0,rV as R0}from"./cli-0.5.7-x1w96j6d.mjs";import{FY as hJ,MY as MX}from"./cli-0.5.7-9acdh8nc.mjs";import{OY as o,PY as f,QY as W,RY as $}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as o0}from"./cli-0.5.7-8sbq2qed.mjs";import{bZ as mJ,lZ as MQ}from"./cli-0.5.7-m5q27x96.mjs";import{nZ as DJ,oZ as JX}from"./cli-0.5.7-6pssgqdn.mjs";import{GZ as tJ,HZ as IQ,v2 as NJ,w2 as wQ}from"./cli-0.5.7-8ychjqct.mjs";import{B6 as eJ,J6 as BQ,K6 as e0,L6 as cZ,L9 as z0,M9 as w0,R9 as m0,Z_ as Q0,f$ as IJ,q8 as fQ,r8 as M0,t8 as CJ}from"./cli-0.5.7-469r2a5r.mjs";import{Sca as y0,Vca as b0,Xca as oZ,Zca as t0,_ca as x0,fda as h0}from"./cli-0.5.7-5mrw857q.mjs";import{Ada as eQ,xda as TZ,yda as uZ}from"./cli-0.5.7-0s7wtvbz.mjs";import{Kda as aJ,Wda as AQ}from"./cli-0.5.7-35yf0b84.mjs";import{Nea as t,Pea as _J}from"./cli-0.5.7-26pwg6gg.mjs";import{Dfa as $Z,Ffa as RX,Pfa as D0,Sfa as dJ}from"./cli-0.5.7-twqt7rxq.mjs";import{Gga as v0,Nga as sJ}from"./cli-0.5.7-skfm51ta.mjs";import{Vma as J0,Wma as FJ,Yma as $J,Zma as a}from"./cli-0.5.7-258ytmbr.mjs";function T0(Q){return typeof Q==="object"&&Q!==null&&"type"in Q&&Q.type==="local_agent"}function qJ(Q){return{...Q,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:cJ(Q.status)?Date.now()+UQ:void 0}}function GJ(Q,J){t("tengu_transcript_view_enter",{}),J((Z)=>{let X=Z.tasks[Q],z=Z.viewingAgentTaskId,Y=z!==void 0?Z.tasks[z]:void 0,G=z!==void 0&&z!==Q&&T0(Y)&&Y.retain,q=T0(X)&&(!X.retain||X.evictAfter!==void 0),R=Z.viewingAgentTaskId!==Q||Z.viewSelectionMode!=="viewing-agent";if(!q&&!R&&!G)return Z;let F=Z.tasks;if(G||q){if(F={...Z.tasks},G)F[z]=qJ(Y);if(q)F[Q]={...X,retain:!0,evictAfter:void 0}}return{...Z,viewingAgentTaskId:Q,viewSelectionMode:"viewing-agent",tasks:F}})}function VJ(Q){t("tengu_transcript_view_exit",{}),Q((J)=>{let Z=J.viewingAgentTaskId,X={...J,viewingAgentTaskId:void 0,viewSelectionMode:"none"};if(Z===void 0)return J.viewSelectionMode==="none"?J:X;let z=J.tasks[Z];if(!T0(z)||!z.retain)return X;return{...X,tasks:{...J.tasks,[Z]:qJ(z)}}})}function xX(Q,J){J((Z)=>{let X=Z.tasks[Q];if(!T0(X))return Z;if(X.status==="running")return X.abortController?.abort(),Z;if(X.evictAfter===0)return Z;let z=Z.viewingAgentTaskId===Q;return{...Z,tasks:{...Z.tasks,[Q]:{...qJ(X),evictAfter:0}},...z&&{viewingAgentTaskId:void 0,viewSelectionMode:"none"}}})}var UQ=30000;var TJ=a(()=>{_J();LQ()});class xJ{exitPlanCalls=[];results=new Map;rejectedIds=new Set;terminated=null;rescanAfterRejection=!1;everSeenPending=!1;get rejectCount(){return this.rejectedIds.size}get hasPendingPlan(){let Q=this.exitPlanCalls.findLast((J)=>!this.rejectedIds.has(J));return Q!==void 0&&!this.results.has(Q)}ingest(Q){for(let X of Q)if(X.type==="assistant")for(let z of X.message.content){if(z.type!=="tool_use")continue;let Y=z;if(Y.name===u0)this.exitPlanCalls.push(Y.id)}else if(X.type==="user"){let z=X.message.content;if(!Array.isArray(z))continue;for(let Y of z)if(Y.type==="tool_result")this.results.set(Y.tool_use_id,Y)}else if(X.type==="result"&&X.subtype!=="success")this.terminated={subtype:X.subtype};let J=Q.length>0||this.rescanAfterRejection;this.rescanAfterRejection=!1;let Z=null;if(J){for(let X=this.exitPlanCalls.length-1;X>=0;X--){let z=this.exitPlanCalls[X];if(this.rejectedIds.has(z))continue;let Y=this.results.get(z);if(!Y)Z={kind:"pending"};else if(Y.is_error===!0){let G=KQ(Y.content);Z=G!==null?{kind:"teleport",plan:G}:{kind:"rejected",id:z}}else Z={kind:"approved",plan:CQ(Y.content)};break}if(Z?.kind==="approved"||Z?.kind==="teleport")return Z}if(Z?.kind==="rejected")this.rejectedIds.add(Z.id),this.rescanAfterRejection=!0;if(this.terminated)return{kind:"terminated",subtype:this.terminated.subtype};if(Z?.kind==="rejected")return Z;if(Z?.kind==="pending")return this.everSeenPending=!0,Z;return{kind:"unchanged"}}}async function rJ(Q,J,Z,X){let z=Date.now()+J,Y=new xJ,G=null,q=0,R="running";while(Date.now()<z){if(X?.())throw new W0("poll stopped by caller","stopped",Y.rejectCount);let F,O;try{let L=await kJ(Q,G);F=L.newEvents,G=L.lastEventId,O=L.sessionStatus,q=0}catch(L){if(!mJ(L)||++q>=yQ)throw new W0(L instanceof Error?L.message:String(L),"network_or_unknown",Y.rejectCount,{cause:L});await NJ(uJ);continue}let H;try{H=Y.ingest(F)}catch(L){throw new W0(L instanceof Error?L.message:String(L),"extract_marker_missing",Y.rejectCount)}if(H.kind==="approved")return{plan:H.plan,rejectCount:Y.rejectCount,executionTarget:"remote"};if(H.kind==="teleport")return{plan:H.plan,rejectCount:Y.rejectCount,executionTarget:"local"};if(H.kind==="terminated")throw new W0(`remote session ended (${H.subtype}) before plan approval`,"terminated",Y.rejectCount);let P=(O==="idle"||O==="requires_action")&&F.length===0,w=Y.hasPendingPlan?"plan_ready":P?"needs_input":"running";if(w!==R)D0(`[ultraplan] phase ${R} → ${w}`),R=w,Z?.(w);await NJ(uJ)}throw new W0(Y.everSeenPending?`no approval after ${J/1000}s`:`ExitPlanMode never reached after ${J/1000}s (the remote container failed to start, or session ID mismatch?)`,Y.everSeenPending?"timeout_pending":"timeout_no_plan",Y.rejectCount)}function lJ(Q){return typeof Q==="string"?Q:Array.isArray(Q)?Q.map((J)=>("text"in J)?J.text:"").join(""):""}function KQ(Q){let J=lJ(Q),Z=`${EQ}
|
|
2
|
+
`,X=J.indexOf(Z);if(X===-1)return null;return J.slice(X+Z.length).trimEnd()}function CQ(Q){let J=lJ(Q),Z=[`## Approved Plan (edited by user):
|
|
3
|
+
`,`## Approved Plan:
|
|
4
|
+
`];for(let X of Z){let z=J.indexOf(X);if(z!==-1)return J.slice(z+X.length).trimEnd()}throw Error(`ExitPlanMode approved but tool_result has no "## Approved Plan:" marker — remote may have hit the empty-plan or isAgent branch. Content preview: ${J.slice(0,200)}`)}var uJ=3000,yQ=5,W0,EQ="__ULTRAPLAN_TELEPORT_LOCAL__";var iJ=a(()=>{pJ();dJ();wQ();MQ();WJ();W0=class W0 extends Error{reason;rejectCount;constructor(Q,J,Z,X){super(Q,X);this.reason=J;this.rejectCount=Z;this.name="UltraplanPollError"}}});var oJ={};$J(oJ,{default:()=>bQ});var bQ=`This is a planning prompt stub.
|
|
5
|
+
`;var nJ=()=>{};function jQ(){return aJ("tengu_ultraplan_model",tJ.opus46.firstParty)}function TQ(Q,J){let Z=[];if(J)Z.push("Here is a draft plan to refine:","",J,"");if(Z.push(cQ),Q)Z.push("",Q);return Z.join(`
|
|
6
|
+
`)}function uQ(Q,J,Z,X,z){let Y=Date.now(),G=!1;(async()=>{try{let{plan:q,rejectCount:R,executionTarget:F}=await rJ(J,SQ,(O)=>{if(O==="needs_input")t("tengu_ultraplan_awaiting_input",{});d0(Q,z,(H)=>{if(H.status!=="running")return H;let P=O==="running"?void 0:O;return H.ultraplanPhase===P?H:{...H,ultraplanPhase:P}})},()=>X().tasks?.[Q]?.status!=="running");if(t("tengu_ultraplan_approved",{duration_ms:Date.now()-Y,plan_length:q.length,reject_count:R,execution_target:F}),F==="remote"){if(X().tasks?.[Q]?.status!=="running")return;d0(Q,z,(H)=>H.status!=="running"?H:{...H,status:"completed",endTime:Date.now()}),z((H)=>H.ultraplanSessionUrl===Z?{...H,ultraplanSessionUrl:void 0}:H),U0({value:[`Ultraplan approved — executing in Claude Code on the web. Follow along at: ${Z}`,"","Results will land as a pull request when the remote session finishes. There is nothing to do here."].join(`
|
|
7
|
+
`),mode:"task-notification"})}else z((O)=>{let H=O.tasks?.[Q];if(!H||H.status!=="running")return O;return{...O,ultraplanPendingChoice:{plan:q,sessionId:J,taskId:Q}}})}catch(q){if(X().tasks?.[Q]?.status!=="running")return;G=!0,t("tengu_ultraplan_failed",{duration_ms:Date.now()-Y,reason:q instanceof W0?q.reason:"network_or_unknown",reject_count:q instanceof W0?q.rejectCount:void 0}),U0({value:`Ultraplan failed: ${v0(q)}
|
|
8
|
+
|
|
9
|
+
Session: ${Z}`,mode:"task-notification"}),OJ(J).catch((F)=>D0(`ultraplan archive failed: ${String(F)}`)),z((F)=>F.ultraplanSessionUrl===Z?{...F,ultraplanSessionUrl:void 0}:F)}finally{if(G)d0(Q,z,(q)=>q.status!=="running"?q:{...q,status:"failed",endTime:Date.now()})}})()}function dQ(Q){let J=Q?`${YZ} `:"";return`${z0} ultraplan
|
|
10
|
+
${J}Starting Claude Code on the web…`}function mQ(Q){return`${z0} ultraplan · Monitor progress in Claude Code on the web ${Q}
|
|
11
|
+
You can continue working — when the ${z0} fills, press ↓ to view results`}function fZ(Q){return Q?`ultraplan: already polling. Open ${Q} to check status, or wait for the plan to land here.`:"ultraplan: already launching. Please wait for the session to start."}async function LJ(Q,J,Z){await p0.kill(Q,Z),Z((z)=>z.ultraplanSessionUrl||z.ultraplanPendingChoice||z.ultraplanLaunching?{...z,ultraplanSessionUrl:void 0,ultraplanPendingChoice:void 0,ultraplanLaunching:void 0}:z);let X=HJ(J,process.env.SESSION_INGRESS_URL);U0({value:`Ultraplan stopped.
|
|
12
|
+
|
|
13
|
+
Session: ${X}`,mode:"task-notification"}),U0({value:"The user stopped the ultraplan session above. Do not respond to the stop notification — wait for their next message.",mode:"task-notification",isMeta:!0})}async function pQ(Q){let{blurb:J,seedPlan:Z,getAppState:X,setAppState:z,signal:Y,disconnectedBridge:G,onSessionReady:q}=Q,{ultraplanSessionUrl:R,ultraplanLaunching:F}=X();if(R||F)return t("tengu_ultraplan_create_failed",{reason:R?"already_polling":"already_launching"}),fZ(R);if(!J&&!Z)return['Usage: /ultraplan \\<prompt\\>, or include "ultraplan" anywhere',"in your prompt","","Advanced multi-agent plan mode with our most powerful model","(Opus). Runs in Claude Code on the web. When the plan is ready,","you can execute it in the web session or send it back here.","Terminal stays free while the remote plans.","Requires /login.","",`Terms: ${zZ}`].join(`
|
|
14
|
+
`);return z((O)=>O.ultraplanLaunching?O:{...O,ultraplanLaunching:!0}),kQ({blurb:J,seedPlan:Z,getAppState:X,setAppState:z,signal:Y,onSessionReady:q}),dQ(G)}async function kQ(Q){let{blurb:J,seedPlan:Z,getAppState:X,setAppState:z,signal:Y,onSessionReady:G}=Q,q;try{let R=jQ(),F=await ZZ();if(!F.eligible){t("tengu_ultraplan_create_failed",{reason:"precondition",precondition_errors:F.errors.map((K)=>K.type).join(",")});let U=F.errors.map(QZ).join(`
|
|
15
|
+
`);U0({value:`ultraplan: cannot launch remote session —
|
|
16
|
+
${U}`,mode:"task-notification"});return}let O=TQ(J,Z),H,P=await JZ({initialMessage:O,description:J||"Refine local plan",model:R,permissionMode:"plan",ultraplan:!0,signal:Y,useDefaultEnvironment:!0,onBundleFail:(U)=>{H=U}});if(!P){t("tengu_ultraplan_create_failed",{reason:H?"bundle_fail":"teleport_null"}),U0({value:`ultraplan: session creation failed${H?` — ${H}`:""}. See --debug for details.`,mode:"task-notification"});return}q=P.id;let w=HJ(P.id,process.env.SESSION_INGRESS_URL);z((U)=>({...U,ultraplanSessionUrl:w,ultraplanLaunching:void 0})),G?.(mQ(w)),t("tengu_ultraplan_launched",{has_seed_plan:Boolean(Z),model:R});let{taskId:L}=XZ({remoteTaskType:"ultraplan",session:{id:P.id,title:J||"Ultraplan"},command:J,context:{abortController:new AbortController,getAppState:X,setAppState:z},isUltraplan:!0});uQ(L,P.id,w,X,z)}catch(R){if(eJ(R),t("tengu_ultraplan_create_failed",{reason:"unexpected_error"}),U0({value:`ultraplan: unexpected error — ${v0(R)}`,mode:"task-notification"}),q)OJ(q).catch((F)=>D0("ultraplan: failed to archive orphaned session",F)),z((F)=>F.ultraplanSessionUrl?{...F,ultraplanSessionUrl:void 0}:F)}finally{z((R)=>R.ultraplanLaunching?{...R,ultraplanLaunching:void 0}:R)}}var SQ=1800000,zZ="https://code.claude.com/docs/en/claude-code-on-the-web",RJ,_Q,cQ,xQ=async(Q,J,Z)=>{let X=Z.trim();if(!X){let G=await pQ({blurb:X,getAppState:J.getAppState,setAppState:J.setAppState,signal:J.abortController.signal});return Q(G,{display:"system"}),null}let{ultraplanSessionUrl:z,ultraplanLaunching:Y}=J.getAppState();if(z||Y)return t("tengu_ultraplan_create_failed",{reason:z?"already_polling":"already_launching"}),Q(fZ(z),{display:"system"}),null;return J.setAppState((G)=>({...G,ultraplanLaunchPending:{blurb:X}})),Q(void 0,{display:"skip"}),null},WY;var qZ=a(()=>{gQ();m0();DQ();AQ();_J();PJ();dJ();sJ();BQ();vQ();IQ();hQ();WJ();iJ();RJ=(nJ(),FJ(oJ)),_Q=(typeof RJ==="string"?RJ:RJ.default).trimEnd(),cQ=_Q;WY={type:"local-jsx",name:"ultraplan",description:`~10–30 min · Claude Code on the web drafts an advanced plan you can edit and approve. See ${zZ}`,argumentHint:"<prompt>",isEnabled:()=>!1,load:()=>Promise.resolve({call:xQ})}});function k0(Q,J,Z){let X=GZ(J,Q.toolName);if(!X)return Q.toolName;try{let z=X.inputSchema.safeParse(Q.input),Y=z.success?z.data:{},G=X.userFacingName(Y);if(!G)return Q.toolName;let q=X.renderToolUseMessage(Y,{theme:Z,verbose:!1});if(q)return W(V,{children:[G,"(",q,")"]});return G}catch{return Q.toolName}}var wJ=a(()=>{f0();UJ();$()});function OZ(Q){let J=HZ.c(54),{agent:Z,onDone:X,onKillAgent:z,onBack:Y}=Q,[G]=l0(),q;if(J[0]===Symbol.for("react.memo_cache_sentinel"))q=$0(r0()),J[0]=q;else q=J[0];let R=q,F=F0(Z.startTime,Z.status==="running",1000,Z.totalPausedMs??0),O;if(J[1]!==X)O={"confirm:yes":X},J[1]=X,J[2]=O;else O=J[2];let H;if(J[3]===Symbol.for("react.memo_cache_sentinel"))H={context:"Confirmation"},J[3]=H;else H=J[3];q0(O,H);let P;if(J[4]!==Z.status||J[5]!==Y||J[6]!==X||J[7]!==z)P=(g)=>{if(g.key===" ")g.preventDefault(),X();else if(g.key==="left"&&Y)g.preventDefault(),Y();else if(g.key==="x"&&Z.status==="running"&&z)g.preventDefault(),z()},J[4]=Z.status,J[5]=Y,J[6]=X,J[7]=z,J[8]=P;else P=J[8];let w=P,L;if(J[9]!==Z.prompt)L=VZ(Z.prompt,"plan"),J[9]=Z.prompt,J[10]=L;else L=J[10];let U=L,K=Z.prompt.length>300?Z.prompt.substring(0,297)+"…":Z.prompt,E=Z.result?.totalTokens??Z.progress?.tokenCount,A=Z.result?.totalToolUseCount??Z.progress?.toolUseCount,v=Z.selectedAgent?.agentType??"agent",D=Z.description||"Async agent",I;if(J[11]!==v||J[12]!==D)I=W(V,{children:[v," ›"," ",D]}),J[11]=v,J[12]=D,J[13]=I;else I=J[13];let y=I,B;if(J[14]!==Z.status)B=Z.status!=="running"&&W(V,{color:RZ(Z.status),children:[WZ(Z.status)," ",Z.status==="completed"?"Completed":Z.status==="failed"?"Failed":"Stopped"," · "]}),J[14]=Z.status,J[15]=B;else B=J[15];let m;if(J[16]!==E)m=E!==void 0&&E>0&&W(o,{children:[" · ",x0(E)," tokens"]}),J[16]=E,J[17]=m;else m=J[17];let u;if(J[18]!==A)u=A!==void 0&&A>0&&W(o,{children:[" ","· ",A," ",A===1?"tool":"tools"]}),J[18]=A,J[19]=u;else u=J[19];let S;if(J[20]!==F||J[21]!==m||J[22]!==u)S=W(V,{dimColor:!0,children:[F,m,u]}),J[20]=F,J[21]=m,J[22]=u,J[23]=S;else S=J[23];let x;if(J[24]!==S||J[25]!==B)x=W(V,{children:[B,S]}),J[24]=S,J[25]=B,J[26]=x;else x=J[26];let d=x,h;if(J[27]!==Z.status||J[28]!==Y||J[29]!==z)h=(g)=>g.pending?W(V,{children:["Press ",g.keyName," again to exit"]}):W(Z0,{children:[Y&&f(l,{shortcut:"←",action:"go back"}),f(l,{shortcut:"Esc/Enter/Space",action:"close"}),Z.status==="running"&&z&&f(l,{shortcut:"x",action:"stop"})]}),J[27]=Z.status,J[28]=Y,J[29]=z,J[30]=h;else h=J[30];let b;if(J[31]!==Z.progress||J[32]!==Z.status||J[33]!==G)b=Z.status==="running"&&Z.progress?.recentActivities&&Z.progress.recentActivities.length>0&&W(C,{flexDirection:"column",children:[f(V,{bold:!0,dimColor:!0,children:"Progress"}),Z.progress.recentActivities.map((g,k)=>W(V,{dimColor:k<Z.progress.recentActivities.length-1,wrap:"truncate-end",children:[k===Z.progress.recentActivities.length-1?"› ":" ",k0(g,R,G)]},k))]}),J[31]=Z.progress,J[32]=Z.status,J[33]=G,J[34]=b;else b=J[34];let p;if(J[35]!==K||J[36]!==U)p=U?f(C,{marginTop:1,children:f(NZ,{addMargin:!1,planContent:U})}):W(C,{flexDirection:"column",marginTop:1,children:[f(V,{bold:!0,dimColor:!0,children:"Prompt"}),f(V,{wrap:"wrap",children:K})]}),J[35]=K,J[36]=U,J[37]=p;else p=J[37];let c;if(J[38]!==Z.error||J[39]!==Z.status)c=Z.status==="failed"&&Z.error&&W(C,{flexDirection:"column",marginTop:1,children:[f(V,{bold:!0,color:"error",children:"Error"}),f(V,{color:"error",wrap:"wrap",children:Z.error})]}),J[38]=Z.error,J[39]=Z.status,J[40]=c;else c=J[40];let _;if(J[41]!==b||J[42]!==p||J[43]!==c)_=W(C,{flexDirection:"column",children:[b,p,c]}),J[41]=b,J[42]=p,J[43]=c,J[44]=_;else _=J[44];let j;if(J[45]!==X||J[46]!==d||J[47]!==h||J[48]!==_||J[49]!==y)j=f(n,{title:y,subtitle:d,onCancel:X,color:"background",inputGuide:h,children:_}),J[45]=X,J[46]=d,J[47]=h,J[48]=_,J[49]=y,J[50]=j;else j=J[50];let T;if(J[51]!==w||J[52]!==j)T=f(C,{flexDirection:"column",tabIndex:0,autoFocus:!0,onKeyDown:w,children:j}),J[51]=w,J[52]=j,J[53]=T;else T=J[53];return T}var HZ;var PZ=a(()=>{i0();f0();g0();UJ();FZ();h0();LZ();B0();I0();A0();rQ();wJ();MJ();$();HZ=J0(R0(),1)});function bJ(Q,J,Z,X){if(!Q)return`${J} found · ${Z} verified`;if(Q==="synthesizing"){let z=[`${Z} verified`];if(X>0)z.push(`${X} refuted`);return z.push("deduping"),z.join(" · ")}if(Q==="verifying"){let z=[`${J} found`,`${Z} verified`];if(X>0)z.push(`${X} refuted`);return z.join(" · ")}return J>0?`${J} found`:"finding"}function yJ(Q){let J=n0.c(5),{text:Z,phase:X}=Q,z=X===void 0?0:X,Y;if(J[0]!==Z)Y=[...Z],J[0]=Z,J[1]=Y;else Y=J[1];let G;if(J[2]!==z||J[3]!==Y)G=f(o,{children:Y.map((q,R)=>f(V,{color:MZ(R+z),children:q},R))}),J[2]=z,J[3]=Y,J[4]=G;else G=J[4];return G}function EJ(Q,J,Z){let X=KJ.useRef(Q),z=KJ.useRef(J);if(Z||Q<X.current)X.current=Q;else if(Q>X.current&&J!==z.current)X.current+=1,z.current=J;return X.current}function $Q(Q){let J=n0.c(15),{session:Z}=Q,z=yZ().prefersReducedMotion??!1,Y=Z.reviewProgress,G=Z.status==="running",[,q]=wZ(G&&!z?UZ:null),R=Y?.bugsFound??0,F=Y?.bugsVerified??0,O=Y?.bugsRefuted??0,H=z||!G,P=EJ(R,q,H),w=EJ(F,q,H),L=EJ(O,q,H),U=Math.floor(q/(UZ*3))%7;if(Z.status==="completed"){let B;if(J[0]===Symbol.for("react.memo_cache_sentinel"))B=W(o,{children:[W(V,{color:"background",children:[w0," "]}),f(yJ,{text:"ultrareview",phase:0}),f(V,{dimColor:!0,children:" ready · shift+↓ to view"})]}),J[0]=B;else B=J[0];return B}if(Z.status==="failed"){let B;if(J[1]===Symbol.for("react.memo_cache_sentinel"))B=W(o,{children:[W(V,{color:"background",children:[w0," "]}),f(yJ,{text:"ultrareview",phase:0}),W(V,{color:"error",dimColor:!0,children:[" · ","error"]})]}),J[1]=B;else B=J[1];return B}let K;if(J[2]!==P||J[3]!==Y||J[4]!==L||J[5]!==w)K=!Y?"setting up":bJ(Y.stage,P,w,L),J[2]=P,J[3]=Y,J[4]=L,J[5]=w,J[6]=K;else K=J[6];let E=K,A;if(J[7]===Symbol.for("react.memo_cache_sentinel"))A=W(V,{color:"background",children:[z0," "]}),J[7]=A;else A=J[7];let v=G?U:0,D;if(J[8]!==v)D=f(yJ,{text:"ultrareview",phase:v}),J[8]=v,J[9]=D;else D=J[9];let I;if(J[10]!==E)I=W(V,{dimColor:!0,children:[" · ",E]}),J[10]=E,J[11]=I;else I=J[11];let y;if(J[12]!==D||J[13]!==I)y=W(o,{children:[A,D,I]}),J[12]=D,J[13]=I,J[14]=y;else y=J[14];return y}function S0(Q){let J=n0.c(11),{session:Z}=Q;if(Z.isRemoteReview){let q;if(J[0]!==Z)q=f($Q,{session:Z}),J[0]=Z,J[1]=q;else q=J[1];return q}if(Z.status==="completed"){let q;if(J[2]===Symbol.for("react.memo_cache_sentinel"))q=f(V,{bold:!0,color:"success",dimColor:!0,children:"done"}),J[2]=q;else q=J[2];return q}if(Z.status==="failed"){let q;if(J[3]===Symbol.for("react.memo_cache_sentinel"))q=f(V,{bold:!0,color:"error",dimColor:!0,children:"error"}),J[3]=q;else q=J[3];return q}if(!Z.todoList.length){let q;if(J[4]!==Z.status)q=W(V,{dimColor:!0,children:[Z.status,"…"]}),J[4]=Z.status,J[5]=q;else q=J[5];return q}let X;if(J[6]!==Z.todoList)X=M0(Z.todoList,oQ),J[6]=Z.todoList,J[7]=X;else X=J[7];let z=X,Y=Z.todoList.length,G;if(J[8]!==z||J[9]!==Y)G=W(V,{dimColor:!0,children:[z,"/",Y]}),J[8]=z,J[9]=Y,J[10]=G;else G=J[10];return G}function oQ(Q){return Q.status==="completed"}var n0,KJ,UZ=80;var AJ=a(()=>{m0();iQ();f0();CJ();lQ();$();n0=J0(R0(),1),KJ=J0(o0(),1)});function H0(Q){let J=BJ.c(4),{status:Z,label:X,suffix:z}=Q,Y=X??Z,G=Z==="completed"?"success":Z==="failed"?"error":Z==="killed"?"warning":void 0,q;if(J[0]!==G||J[1]!==Y||J[2]!==z)q=W(V,{color:G,dimColor:!0,children:["(",Y,z,")"]}),J[0]=G,J[1]=Y,J[2]=z,J[3]=q;else q=J[3];return q}function EZ(Q){let J=BJ.c(4),{shell:Z}=Q;switch(Z.status){case"completed":{let X;if(J[0]===Symbol.for("react.memo_cache_sentinel"))X=f(H0,{status:"completed",label:"done"}),J[0]=X;else X=J[0];return X}case"failed":{let X;if(J[1]===Symbol.for("react.memo_cache_sentinel"))X=f(H0,{status:"failed",label:"error"}),J[1]=X;else X=J[1];return X}case"killed":{let X;if(J[2]===Symbol.for("react.memo_cache_sentinel"))X=f(H0,{status:"killed",label:"stopped"}),J[2]=X;else X=J[2];return X}case"running":case"pending":{let X;if(J[3]===Symbol.for("react.memo_cache_sentinel"))X=f(H0,{status:"running"}),J[3]=X;else X=J[3];return X}}}var BJ;var KZ=a(()=>{f0();$();BJ=J0(R0(),1)});function AZ(Q){let J=bZ.c(92),{task:Z,maxActivityWidth:X}=Q,z=X??40;switch(Z.type){case"local_bash":{let Y=Z.kind==="monitor"?Z.description:Z.command,G;if(J[0]!==z||J[1]!==Y)G=b0(Y,z,!0),J[0]=z,J[1]=Y,J[2]=G;else G=J[2];let q;if(J[3]!==Z)q=f(EZ,{shell:Z}),J[3]=Z,J[4]=q;else q=J[4];let R;if(J[5]!==G||J[6]!==q)R=W(V,{children:[G," ",q]}),J[5]=G,J[6]=q,J[7]=R;else R=J[7];return R}case"remote_agent":{if(Z.isRemoteReview){let P;if(J[8]!==Z)P=f(V,{children:f(S0,{session:Z})}),J[8]=Z,J[9]=P;else P=J[9];return P}let G=Z.status==="running"||Z.status==="pending"?z0:w0,q;if(J[10]!==G)q=W(V,{dimColor:!0,children:[G," "]}),J[10]=G,J[11]=q;else q=J[11];let R;if(J[12]!==z||J[13]!==Z.title)R=b0(Z.title,z,!0),J[12]=z,J[13]=Z.title,J[14]=R;else R=J[14];let F;if(J[15]===Symbol.for("react.memo_cache_sentinel"))F=f(V,{dimColor:!0,children:" · "}),J[15]=F;else F=J[15];let O;if(J[16]!==Z)O=f(S0,{session:Z}),J[16]=Z,J[17]=O;else O=J[17];let H;if(J[18]!==q||J[19]!==R||J[20]!==O)H=W(V,{children:[q,R,F,O]}),J[18]=q,J[19]=R,J[20]=O,J[21]=H;else H=J[21];return H}case"local_agent":{let Y;if(J[22]!==z||J[23]!==Z.description)Y=b0(Z.description,z,!0),J[22]=z,J[23]=Z.description,J[24]=Y;else Y=J[24];let G=Z.status==="completed"?"done":void 0,q=Z.status==="completed"&&!Z.notified?", unread":void 0,R;if(J[25]!==G||J[26]!==q||J[27]!==Z.status)R=f(H0,{status:Z.status,label:G,suffix:q}),J[25]=G,J[26]=q,J[27]=Z.status,J[28]=R;else R=J[28];let F;if(J[29]!==Y||J[30]!==R)F=W(V,{children:[Y," ",R]}),J[29]=Y,J[30]=R,J[31]=F;else F=J[31];return F}case"in_process_teammate":{let Y,G,q,R,F,O;if(J[32]!==z||J[33]!==Z){let w=s0(Z);G=V;let L;if(J[40]!==Z.identity.color)L=a0(Z.identity.color),J[40]=Z.identity.color,J[41]=L;else L=J[41];if(J[42]!==L||J[43]!==Z.identity.agentName)O=W(V,{color:L,children:["@",Z.identity.agentName]}),J[42]=L,J[43]=Z.identity.agentName,J[44]=O;else O=J[44];Y=V,q=!0,R=": ",F=b0(w,z,!0),J[32]=z,J[33]=Z,J[34]=Y,J[35]=G,J[36]=q,J[37]=R,J[38]=F,J[39]=O}else Y=J[34],G=J[35],q=J[36],R=J[37],F=J[38],O=J[39];let H;if(J[45]!==Y||J[46]!==q||J[47]!==R||J[48]!==F)H=W(Y,{dimColor:q,children:[R,F]}),J[45]=Y,J[46]=q,J[47]=R,J[48]=F,J[49]=H;else H=J[49];let P;if(J[50]!==G||J[51]!==O||J[52]!==H)P=W(G,{children:[O,H]}),J[50]=G,J[51]=O,J[52]=H,J[53]=P;else P=J[53];return P}case"local_workflow":{let Y=Z.workflowName??Z.summary??Z.description,G;if(J[54]!==z||J[55]!==Y)G=b0(Y,z,!0),J[54]=z,J[55]=Y,J[56]=G;else G=J[56];let q;if(J[57]!==Z.agentCount||J[58]!==Z.status)q=Z.status==="running"?`${Z.agentCount} ${Q0(Z.agentCount,"agent")}`:Z.status==="completed"?"done":void 0,J[57]=Z.agentCount,J[58]=Z.status,J[59]=q;else q=J[59];let R=Z.status==="completed"&&!Z.notified?", unread":void 0,F;if(J[60]!==q||J[61]!==R||J[62]!==Z.status)F=f(H0,{status:Z.status,label:q,suffix:R}),J[60]=q,J[61]=R,J[62]=Z.status,J[63]=F;else F=J[63];let O;if(J[64]!==G||J[65]!==F)O=W(V,{children:[G," ",F]}),J[64]=G,J[65]=F,J[66]=O;else O=J[66];return O}case"monitor_mcp":{let Y;if(J[67]!==z||J[68]!==Z.description)Y=b0(Z.description,z,!0),J[67]=z,J[68]=Z.description,J[69]=Y;else Y=J[69];let G=Z.status==="completed"?"done":void 0,q=Z.status==="completed"&&!Z.notified?", unread":void 0,R;if(J[70]!==G||J[71]!==q||J[72]!==Z.status)R=f(H0,{status:Z.status,label:G,suffix:q}),J[70]=G,J[71]=q,J[72]=Z.status,J[73]=R;else R=J[73];let F;if(J[74]!==Y||J[75]!==R)F=W(V,{children:[Y," ",R]}),J[74]=Y,J[75]=R,J[76]=F;else F=J[76];return F}case"dream":{let Y=Z.filesTouched.length,G;if(J[77]!==Y||J[78]!==Z.phase||J[79]!==Z.sessionsReviewing)G=Z.phase==="updating"&&Y>0?`${Y} ${Q0(Y,"file")}`:`${Z.sessionsReviewing} ${Q0(Z.sessionsReviewing,"session")}`,J[77]=Y,J[78]=Z.phase,J[79]=Z.sessionsReviewing,J[80]=G;else G=J[80];let q=G,R;if(J[81]!==q||J[82]!==Z.phase)R=W(V,{dimColor:!0,children:["· ",Z.phase," · ",q]}),J[81]=q,J[82]=Z.phase,J[83]=R;else R=J[83];let F=Z.status==="completed"?"done":void 0,O=Z.status==="completed"&&!Z.notified?", unread":void 0,H;if(J[84]!==F||J[85]!==O||J[86]!==Z.status)H=f(H0,{status:Z.status,label:F,suffix:O}),J[84]=F,J[85]=O,J[86]=Z.status,J[87]=H;else H=J[87];let P;if(J[88]!==R||J[89]!==H||J[90]!==Z.description)P=W(V,{children:[Z.description," ",R," ",H]}),J[88]=R,J[89]=H,J[90]=Z.description,J[91]=P;else P=J[91];return P}}}var bZ;var BZ=a(()=>{f0();h0();CZ();IJ();m0();AJ();KZ();MJ();$();bZ=J0(R0(),1)});function DZ(Q){let J=IZ.c(70),{task:Z,onDone:X,onBack:z,onKill:Y}=Q,G=F0(Z.startTime,Z.status==="running",1000,0),q;if(J[0]!==X)q={"confirm:yes":X},J[0]=X,J[1]=q;else q=J[1];let R;if(J[2]===Symbol.for("react.memo_cache_sentinel"))R={context:"Confirmation"},J[2]=R;else R=J[2];q0(q,R);let F;if(J[3]!==z||J[4]!==X||J[5]!==Y||J[6]!==Z.status)F=(b)=>{if(b.key===" ")b.preventDefault(),X();else if(b.key==="left"&&z)b.preventDefault(),z();else if(b.key==="x"&&Z.status==="running"&&Y)b.preventDefault(),Y()},J[3]=z,J[4]=X,J[5]=Y,J[6]=Z.status,J[7]=F;else F=J[7];let O=F,H,P,w,L,U,K,E,A,v,D,I,y,B,m,u,S;if(J[8]!==G||J[9]!==O||J[10]!==z||J[11]!==X||J[12]!==Y||J[13]!==Z.filesTouched.length||J[14]!==Z.sessionsReviewing||J[15]!==Z.status||J[16]!==Z.turns){let b=Z.turns.filter(sQ),p=b.slice(-nQ),c=b.length-p.length;w=C,E="column",A=0,v=!0,D=O,P=n,u="Memory consolidation";let _=Z.sessionsReviewing,j;if(J[33]!==Z.sessionsReviewing)j=Q0(Z.sessionsReviewing,"session"),J[33]=Z.sessionsReviewing,J[34]=j;else j=J[34];let T;if(J[35]!==Z.filesTouched.length)T=Z.filesTouched.length>0&&W(o,{children:[" ","· ",Z.filesTouched.length," ",Q0(Z.filesTouched.length,"file")," touched"]}),J[35]=Z.filesTouched.length,J[36]=T;else T=J[36];if(J[37]!==G||J[38]!==j||J[39]!==T||J[40]!==Z.sessionsReviewing)S=W(V,{dimColor:!0,children:[G," · reviewing ",_," ",j,T]}),J[37]=G,J[38]=j,J[39]=T,J[40]=Z.sessionsReviewing,J[41]=S;else S=J[41];if(L=X,U="background",J[42]!==z||J[43]!==Y||J[44]!==Z.status)K=(k)=>k.pending?W(V,{children:["Press ",k.keyName," again to exit"]}):W(Z0,{children:[z&&f(l,{shortcut:"←",action:"go back"}),f(l,{shortcut:"Esc/Enter/Space",action:"close"}),Z.status==="running"&&Y&&f(l,{shortcut:"x",action:"stop"})]}),J[42]=z,J[43]=Y,J[44]=Z.status,J[45]=K;else K=J[45];H=C,I="column",y=1;let g;if(J[46]===Symbol.for("react.memo_cache_sentinel"))g=f(V,{bold:!0,children:"Status:"}),J[46]=g;else g=J[46];if(J[47]!==Z.status)B=W(V,{children:[g," ",Z.status==="running"?f(V,{color:"background",children:"running"}):Z.status==="completed"?f(V,{color:"success",children:Z.status}):f(V,{color:"error",children:Z.status})]}),J[47]=Z.status,J[48]=B;else B=J[48];m=p.length===0?f(V,{dimColor:!0,children:Z.status==="running"?"Starting…":"(no text output)"}):W(o,{children:[c>0&&W(V,{dimColor:!0,children:["(",c," earlier ",Q0(c,"turn"),")"]}),p.map(aQ)]}),J[8]=G,J[9]=O,J[10]=z,J[11]=X,J[12]=Y,J[13]=Z.filesTouched.length,J[14]=Z.sessionsReviewing,J[15]=Z.status,J[16]=Z.turns,J[17]=H,J[18]=P,J[19]=w,J[20]=L,J[21]=U,J[22]=K,J[23]=E,J[24]=A,J[25]=v,J[26]=D,J[27]=I,J[28]=y,J[29]=B,J[30]=m,J[31]=u,J[32]=S}else H=J[17],P=J[18],w=J[19],L=J[20],U=J[21],K=J[22],E=J[23],A=J[24],v=J[25],D=J[26],I=J[27],y=J[28],B=J[29],m=J[30],u=J[31],S=J[32];let x;if(J[49]!==H||J[50]!==I||J[51]!==y||J[52]!==B||J[53]!==m)x=W(H,{flexDirection:I,gap:y,children:[B,m]}),J[49]=H,J[50]=I,J[51]=y,J[52]=B,J[53]=m,J[54]=x;else x=J[54];let d;if(J[55]!==P||J[56]!==L||J[57]!==U||J[58]!==K||J[59]!==x||J[60]!==u||J[61]!==S)d=f(P,{title:u,subtitle:S,onCancel:L,color:U,inputGuide:K,children:x}),J[55]=P,J[56]=L,J[57]=U,J[58]=K,J[59]=x,J[60]=u,J[61]=S,J[62]=d;else d=J[62];let h;if(J[63]!==w||J[64]!==E||J[65]!==A||J[66]!==v||J[67]!==D||J[68]!==d)h=f(w,{flexDirection:E,tabIndex:A,autoFocus:v,onKeyDown:D,children:d}),J[63]=w,J[64]=E,J[65]=A,J[66]=v,J[67]=D,J[68]=d,J[69]=h;else h=J[69];return h}function aQ(Q,J){return W(C,{flexDirection:"column",children:[f(V,{wrap:"wrap",children:Q.text}),Q.toolUseCount>0&&W(V,{dimColor:!0,children:[" ","(",Q.toolUseCount," ",Q0(Q.toolUseCount,"tool"),")"]})]},J)}function sQ(Q){return Q.text!==""}var IZ,nQ=6;var vZ=a(()=>{i0();f0();g0();IJ();B0();I0();A0();$();IZ=J0(R0(),1)});function gZ(Q){let J=hZ.c(63),{teammate:Z,onDone:X,onKill:z,onBack:Y,onForeground:G}=Q,[q]=l0(),R;if(J[0]===Symbol.for("react.memo_cache_sentinel"))R=$0(r0()),J[0]=R;else R=J[0];let F=R,O=F0(Z.startTime,Z.status==="running",1000,Z.totalPausedMs??0),H;if(J[1]!==X)H={"confirm:yes":X},J[1]=X,J[2]=H;else H=J[2];let P;if(J[3]===Symbol.for("react.memo_cache_sentinel"))P={context:"Confirmation"},J[3]=P;else P=J[3];q0(H,P);let w;if(J[4]!==Y||J[5]!==X||J[6]!==G||J[7]!==z||J[8]!==Z.status)w=(M)=>{if(M.key===" ")M.preventDefault(),X();else if(M.key==="left"&&Y)M.preventDefault(),Y();else if(M.key==="x"&&Z.status==="running"&&z)M.preventDefault(),z();else if(M.key==="f"&&Z.status==="running"&&G)M.preventDefault(),G()},J[4]=Y,J[5]=X,J[6]=G,J[7]=z,J[8]=Z.status,J[9]=w;else w=J[9];let L=w,U;if(J[10]!==Z)U=s0(Z),J[10]=Z,J[11]=U;else U=J[11];let K=U,E=Z.result?.totalTokens??Z.progress?.tokenCount,A=Z.result?.totalToolUseCount??Z.progress?.toolUseCount,v;if(J[12]!==Z.prompt)v=y0(Z.prompt,300),J[12]=Z.prompt,J[13]=v;else v=J[13];let D=v,I;if(J[14]!==Z.identity.color)I=a0(Z.identity.color),J[14]=Z.identity.color,J[15]=I;else I=J[15];let y;if(J[16]!==I||J[17]!==Z.identity.agentName)y=W(V,{color:I,children:["@",Z.identity.agentName]}),J[16]=I,J[17]=Z.identity.agentName,J[18]=y;else y=J[18];let B;if(J[19]!==K)B=K&&W(V,{dimColor:!0,children:[" (",K,")"]}),J[19]=K,J[20]=B;else B=J[20];let m;if(J[21]!==y||J[22]!==B)m=W(V,{children:[y,B]}),J[21]=y,J[22]=B,J[23]=m;else m=J[23];let u=m,S;if(J[24]!==Z.status)S=Z.status!=="running"&&W(V,{color:Z.status==="completed"?"success":Z.status==="killed"?"warning":"error",children:[Z.status==="completed"?"Completed":Z.status==="failed"?"Failed":"Stopped"," · "]}),J[24]=Z.status,J[25]=S;else S=J[25];let x;if(J[26]!==E)x=E!==void 0&&E>0&&W(o,{children:[" · ",x0(E)," tokens"]}),J[26]=E,J[27]=x;else x=J[27];let d;if(J[28]!==A)d=A!==void 0&&A>0&&W(o,{children:[" ","· ",A," ",A===1?"tool":"tools"]}),J[28]=A,J[29]=d;else d=J[29];let h;if(J[30]!==O||J[31]!==x||J[32]!==d)h=W(V,{dimColor:!0,children:[O,x,d]}),J[30]=O,J[31]=x,J[32]=d,J[33]=h;else h=J[33];let b;if(J[34]!==S||J[35]!==h)b=W(V,{children:[S,h]}),J[34]=S,J[35]=h,J[36]=b;else b=J[36];let p=b,c;if(J[37]!==Y||J[38]!==G||J[39]!==z||J[40]!==Z.status)c=(M)=>M.pending?W(V,{children:["Press ",M.keyName," again to exit"]}):W(Z0,{children:[Y&&f(l,{shortcut:"←",action:"go back"}),f(l,{shortcut:"Esc/Enter/Space",action:"close"}),Z.status==="running"&&z&&f(l,{shortcut:"x",action:"stop"}),Z.status==="running"&&G&&f(l,{shortcut:"f",action:"foreground"})]}),J[37]=Y,J[38]=G,J[39]=z,J[40]=Z.status,J[41]=c;else c=J[41];let _;if(J[42]!==Z.progress||J[43]!==Z.status||J[44]!==q)_=Z.status==="running"&&Z.progress?.recentActivities&&Z.progress.recentActivities.length>0&&W(C,{flexDirection:"column",children:[f(V,{bold:!0,dimColor:!0,children:"Progress"}),Z.progress.recentActivities.map((M,r)=>W(V,{dimColor:r<Z.progress.recentActivities.length-1,wrap:"truncate-end",children:[r===Z.progress.recentActivities.length-1?"› ":" ",k0(M,F,q)]},r))]}),J[42]=Z.progress,J[43]=Z.status,J[44]=q,J[45]=_;else _=J[45];let j;if(J[46]===Symbol.for("react.memo_cache_sentinel"))j=f(V,{bold:!0,dimColor:!0,children:"Prompt"}),J[46]=j;else j=J[46];let T;if(J[47]!==D)T=W(C,{flexDirection:"column",marginTop:1,children:[j,f(V,{wrap:"wrap",children:D})]}),J[47]=D,J[48]=T;else T=J[48];let g;if(J[49]!==Z.error||J[50]!==Z.status)g=Z.status==="failed"&&Z.error&&W(C,{flexDirection:"column",marginTop:1,children:[f(V,{bold:!0,color:"error",children:"Error"}),f(V,{color:"error",wrap:"wrap",children:Z.error})]}),J[49]=Z.error,J[50]=Z.status,J[51]=g;else g=J[51];let k;if(J[52]!==X||J[53]!==p||J[54]!==c||J[55]!==_||J[56]!==T||J[57]!==g||J[58]!==u)k=W(n,{title:u,subtitle:p,onCancel:X,color:"background",inputGuide:c,children:[_,T,g]}),J[52]=X,J[53]=p,J[54]=c,J[55]=_,J[56]=T,J[57]=g,J[58]=u,J[59]=k;else k=J[59];let N;if(J[60]!==L||J[61]!==k)N=f(C,{flexDirection:"column",tabIndex:0,autoFocus:!0,onKeyDown:L,children:k}),J[60]=L,J[61]=k,J[62]=N;else N=J[62];return N}var hZ;var SZ=a(()=>{i0();f0();g0();UJ();FZ();h0();CZ();B0();I0();A0();wJ();MJ();$();hZ=J0(R0(),1)});function YX(Q,J){if(Q===u0)return"Review the plan in Claude Code on the web";if(!J||typeof J!=="object")return Q;if(Q===dZ&&"questions"in J){let Z=J.questions;if(Array.isArray(Z)&&Z[0]&&typeof Z[0]==="object"){let X="question"in Z[0]&&typeof Z[0].question==="string"&&Z[0].question?Z[0].question:("header"in Z[0])&&typeof Z[0].header==="string"?Z[0].header:null;if(X){let z=X.replace(/\s+/g," ").trim();return`Answer in browser: ${y0(z,50)}`}}}for(let Z of Object.values(J))if(typeof Z==="string"&&Z.trim()){let X=Z.replace(/\s+/g," ").trim();return`${Q} ${y0(X,60)}`}return Q}function qX(Q){let J=ZJ.c(70),{session:Z,onDone:X,onBack:z,onKill:Y}=Q,G=Z.status==="running"||Z.status==="pending",q=Z.ultraplanPhase,R=G?q?zX[q]:"running":Z.status,F=F0(Z.startTime,G,1000,0,Z.endTime),O=0,H=0,P=null;for(let X0 of Z.log){if(X0.type!=="assistant")continue;for(let e of X0.message.content){if(e.type!=="tool_use")continue;if(H++,P=e,e.name===TZ||e.name===uZ)O++}}let w=1+O,L;if(J[0]!==P)L=P?YX(P.name,P.input):null,J[0]=P,J[1]=L;else L=J[1];let U;if(J[2]!==H||J[3]!==w||J[4]!==L)U={agentsWorking:w,toolCalls:H,lastToolCall:L},J[2]=H,J[3]=w,J[4]=L,J[5]=U;else U=J[5];let{agentsWorking:K,toolCalls:E,lastToolCall:A}=U,v;if(J[6]!==Z.sessionId)v=_0(Z.sessionId),J[6]=Z.sessionId,J[7]=v;else v=J[7];let D=v,I;if(J[8]!==z||J[9]!==X)I=z??(()=>X("Remote session details dismissed",{display:"system"})),J[8]=z,J[9]=X,J[10]=I;else I=J[10];let y=I,[B,m]=O0.useState(!1);if(B){let X0;if(J[11]===Symbol.for("react.memo_cache_sentinel"))X0=()=>m(!1),J[11]=X0;else X0=J[11];let e;if(J[12]===Symbol.for("react.memo_cache_sentinel"))e=f(V,{dimColor:!0,children:"This will terminate the Claude Code on the web session."}),J[12]=e;else e=J[12];let C0;if(J[13]===Symbol.for("react.memo_cache_sentinel"))C0={label:"Terminate session",value:"stop"},J[13]=C0;else C0=J[13];let i;if(J[14]===Symbol.for("react.memo_cache_sentinel"))i=[C0,{label:"Back",value:"back"}],J[14]=i;else i=J[14];let L0;if(J[15]!==y||J[16]!==Y)L0=f(n,{title:"Stop ultraplan?",onCancel:X0,color:"background",children:W(C,{flexDirection:"column",gap:1,children:[e,f(j0,{options:i,onChange:(c0)=>{if(c0==="stop")Y?.(),y();else m(!1)}})]})}),J[15]=y,J[16]=Y,J[17]=L0;else L0=J[17];return L0}let u=q==="plan_ready"?w0:z0,S;if(J[18]!==u)S=W(V,{color:"background",children:[u," "]}),J[18]=u,J[19]=S;else S=J[19];let x;if(J[20]===Symbol.for("react.memo_cache_sentinel"))x=f(V,{bold:!0,children:"ultraplan"}),J[20]=x;else x=J[20];let d;if(J[21]!==F||J[22]!==R)d=W(V,{dimColor:!0,children:[" · ",F," · ",R]}),J[21]=F,J[22]=R,J[23]=d;else d=J[23];let h;if(J[24]!==S||J[25]!==d)h=W(V,{children:[S,x,d]}),J[24]=S,J[25]=d,J[26]=h;else h=J[26];let b;if(J[27]!==q)b=q==="plan_ready"&&W(V,{color:"success",children:[e0.tick," "]}),J[27]=q,J[28]=b;else b=J[28];let p;if(J[29]!==K)p=Q0(K,"agent"),J[29]=K,J[30]=p;else p=J[30];let c=q?fX[q]:"working",_;if(J[31]!==E)_=Q0(E,"call"),J[31]=E,J[32]=_;else _=J[32];let j;if(J[33]!==K||J[34]!==b||J[35]!==p||J[36]!==c||J[37]!==_||J[38]!==E)j=W(V,{children:[b,K," ",p," ",c," · ",E," tool"," ",_]}),J[33]=K,J[34]=b,J[35]=p,J[36]=c,J[37]=_,J[38]=E,J[39]=j;else j=J[39];let T;if(J[40]!==A)T=A&&f(V,{dimColor:!0,children:A}),J[40]=A,J[41]=T;else T=J[41];let g;if(J[42]!==D)g=f(V,{dimColor:!0,children:D}),J[42]=D,J[43]=g;else g=J[43];let k;if(J[44]!==D||J[45]!==g)k=f(JJ,{url:D,children:g}),J[44]=D,J[45]=g,J[46]=k;else k=J[46];let N;if(J[47]===Symbol.for("react.memo_cache_sentinel"))N={label:"Review in Claude Code on the web",value:"open"},J[47]=N;else N=J[47];let M;if(J[48]!==Y||J[49]!==G)M=Y&&G?[{label:"Stop ultraplan",value:"stop"}]:[],J[48]=Y,J[49]=G,J[50]=M;else M=J[50];let r;if(J[51]===Symbol.for("react.memo_cache_sentinel"))r={label:"Back",value:"back"},J[51]=r;else r=J[51];let s;if(J[52]!==M)s=[N,...M,r],J[52]=M,J[53]=s;else s=J[53];let Y0;if(J[54]!==y||J[55]!==X||J[56]!==D)Y0=(X0)=>{switch(X0){case"open":{DJ(D),X();return}case"stop":{m(!0);return}case"back":{y();return}}},J[54]=y,J[55]=X,J[56]=D,J[57]=Y0;else Y0=J[57];let V0;if(J[58]!==s||J[59]!==Y0)V0=f(j0,{options:s,onChange:Y0}),J[58]=s,J[59]=Y0,J[60]=V0;else V0=J[60];let N0;if(J[61]!==j||J[62]!==T||J[63]!==k||J[64]!==V0)N0=W(C,{flexDirection:"column",gap:1,children:[j,T,k,V0]}),J[61]=j,J[62]=T,J[63]=k,J[64]=V0,J[65]=N0;else N0=J[65];let K0;if(J[66]!==y||J[67]!==h||J[68]!==N0)K0=f(n,{title:h,onCancel:y,color:"background",children:N0}),J[66]=y,J[67]=h,J[68]=N0,J[69]=K0;else K0=J[69];return K0}function GX(Q){let J=ZJ.c(15),{stage:Z,completed:X,hasProgress:z}=Q,Y;if(J[0]!==Z)Y=Z?jZ.indexOf(Z):-1,J[0]=Z,J[1]=Y;else Y=J[1];let G=Y,q=!X&&!z,R;if(J[2]!==q)R=q?f(V,{color:"background",children:"Setup"}):f(V,{dimColor:!0,children:"Setup"}),J[2]=q,J[3]=R;else R=J[3];let F;if(J[4]===Symbol.for("react.memo_cache_sentinel"))F=f(V,{dimColor:!0,children:" → "}),J[4]=F;else F=J[4];let O;if(J[5]!==X||J[6]!==G||J[7]!==q)O=jZ.map((w,L)=>{let U=!X&&!q&&L===G;return W(O0.default.Fragment,{children:[L>0&&f(V,{dimColor:!0,children:" → "}),U?f(V,{color:"background",children:_Z[w]}):f(V,{dimColor:!0,children:_Z[w]})]},w)}),J[5]=X,J[6]=G,J[7]=q,J[8]=O;else O=J[8];let H;if(J[9]!==X)H=X&&f(V,{color:"success",children:" ✓"}),J[9]=X,J[10]=H;else H=J[10];let P;if(J[11]!==R||J[12]!==O||J[13]!==H)P=W(V,{children:[R,F,O,H]}),J[11]=R,J[12]=O,J[13]=H,J[14]=P;else P=J[14];return P}function VX(Q){let J=Q.reviewProgress;if(!J)return Q.status==="completed"?"done":"setting up";let Z=J.bugsVerified,X=J.bugsRefuted??0;if(Q.status==="completed"){let z=[`${Z} ${Q0(Z,"finding")}`];if(X>0)z.push(`${X} refuted`);return z.join(" · ")}return bJ(J.stage,J.bugsFound,Z,X)}function NX(Q){let J=ZJ.c(56),{session:Z,onDone:X,onBack:z,onKill:Y}=Q,G=Z.status==="completed",q=Z.status==="running"||Z.status==="pending",[R,F]=O0.useState(!1),O=F0(Z.startTime,q,1000,0,Z.endTime),H;if(J[0]!==X)H=()=>X("Remote session details dismissed",{display:"system"}),J[0]=X,J[1]=H;else H=J[1];let P=H,w=z??P,L;if(J[2]!==Z.sessionId)L=_0(Z.sessionId),J[2]=Z.sessionId,J[3]=L;else L=J[3];let U=L,K=G?"ready":q?"running":Z.status;if(R){let k;if(J[4]===Symbol.for("react.memo_cache_sentinel"))k=()=>F(!1),J[4]=k;else k=J[4];let N;if(J[5]===Symbol.for("react.memo_cache_sentinel"))N=f(V,{dimColor:!0,children:"This archives the remote session and stops local tracking. The review will not complete and any findings so far are discarded."}),J[5]=N;else N=J[5];let M;if(J[6]===Symbol.for("react.memo_cache_sentinel"))M={label:"Stop ultrareview",value:"stop"},J[6]=M;else M=J[6];let r;if(J[7]===Symbol.for("react.memo_cache_sentinel"))r=[M,{label:"Back",value:"back"}],J[7]=r;else r=J[7];let s;if(J[8]!==w||J[9]!==Y)s=f(n,{title:"Stop ultrareview?",onCancel:k,color:"background",children:W(C,{flexDirection:"column",gap:1,children:[N,f(j0,{options:r,onChange:(Y0)=>{if(Y0==="stop")Y?.(),w();else F(!1)}})]})}),J[8]=w,J[9]=Y,J[10]=s;else s=J[10];return s}let E;if(J[11]!==G||J[12]!==Y||J[13]!==q)E=G?[{label:"Open in Claude Code on the web",value:"open"},{label:"Dismiss",value:"dismiss"}]:[{label:"Open in Claude Code on the web",value:"open"},...Y&&q?[{label:"Stop ultrareview",value:"stop"}]:[],{label:"Back",value:"back"}],J[11]=G,J[12]=Y,J[13]=q,J[14]=E;else E=J[14];let A=E,v;if(J[15]!==w||J[16]!==P||J[17]!==X||J[18]!==U)v=(k)=>{J:switch(k){case"open":{DJ(U),X();break J}case"stop":{F(!0);break J}case"back":{w();break J}case"dismiss":P()}},J[15]=w,J[16]=P,J[17]=X,J[18]=U,J[19]=v;else v=J[19];let D=v,I=G?w0:z0,y;if(J[20]!==I)y=W(V,{color:"background",children:[I," "]}),J[20]=I,J[21]=y;else y=J[21];let B;if(J[22]===Symbol.for("react.memo_cache_sentinel"))B=f(V,{bold:!0,children:"ultrareview"}),J[22]=B;else B=J[22];let m;if(J[23]!==O||J[24]!==K)m=W(V,{dimColor:!0,children:[" · ",O," · ",K]}),J[23]=O,J[24]=K,J[25]=m;else m=J[25];let u;if(J[26]!==y||J[27]!==m)u=W(V,{children:[y,B,m]}),J[26]=y,J[27]=m,J[28]=u;else u=J[28];let S=Z.reviewProgress?.stage,x=!!Z.reviewProgress,d;if(J[29]!==G||J[30]!==S||J[31]!==x)d=f(GX,{stage:S,completed:G,hasProgress:x}),J[29]=G,J[30]=S,J[31]=x,J[32]=d;else d=J[32];let h;if(J[33]!==Z)h=VX(Z),J[33]=Z,J[34]=h;else h=J[34];let b;if(J[35]!==h)b=f(V,{children:h}),J[35]=h,J[36]=b;else b=J[36];let p;if(J[37]!==U)p=f(V,{dimColor:!0,children:U}),J[37]=U,J[38]=p;else p=J[38];let c;if(J[39]!==U||J[40]!==p)c=f(JJ,{url:U,children:p}),J[39]=U,J[40]=p,J[41]=c;else c=J[41];let _;if(J[42]!==b||J[43]!==c)_=W(C,{flexDirection:"column",children:[b,c]}),J[42]=b,J[43]=c,J[44]=_;else _=J[44];let j;if(J[45]!==D||J[46]!==A)j=f(j0,{options:A,onChange:D}),J[45]=D,J[46]=A,J[47]=j;else j=J[47];let T;if(J[48]!==d||J[49]!==_||J[50]!==j)T=W(C,{flexDirection:"column",gap:1,children:[d,_,j]}),J[48]=d,J[49]=_,J[50]=j,J[51]=T;else T=J[51];let g;if(J[52]!==w||J[53]!==T||J[54]!==u)g=f(n,{title:u,onCancel:w,color:"background",inputGuide:WX,children:T}),J[52]=w,J[53]=T,J[54]=u,J[55]=g;else g=J[55];return g}function WX(Q){return Q.pending?W(V,{children:["Press ",Q.keyName," again to exit"]}):W(Z0,{children:[f(l,{shortcut:"Enter",action:"select"}),f(l,{shortcut:"Esc",action:"go back"})]})}function xZ({session:Q,toolUseContext:J,onDone:Z,onBack:X,onKill:z}){let[Y,G]=O0.useState(!1),[q,R]=O0.useState(null),F=O0.useMemo(()=>{if(Q.isUltraplan||Q.isRemoteReview)return[];return lZ(kZ(Q.log)).filter((U)=>U.type!=="progress").slice(-3)},[Q]);if(Q.isUltraplan)return f(qX,{session:Q,onDone:Z,onBack:X,onKill:z});if(Q.isRemoteReview)return f(NX,{session:Q,onDone:Z,onBack:X,onKill:z});let O=()=>Z("Remote session details dismissed",{display:"system"}),H=(U)=>{if(U.key===" ")U.preventDefault(),Z("Remote session details dismissed",{display:"system"});else if(U.key==="left"&&X)U.preventDefault(),X();else if(U.key==="t"&&!Y)U.preventDefault(),P();else if(U.key==="return")U.preventDefault(),O()};async function P(){G(!0),R(null);try{await pZ(Q.sessionId)}catch(U){R(v0(U))}finally{G(!1)}}let w=y0(Q.title,50),L=Q.status==="pending"?"starting":Q.status;return f(C,{flexDirection:"column",tabIndex:0,autoFocus:!0,onKeyDown:H,children:W(n,{title:"Remote session details",onCancel:O,color:"background",inputGuide:(U)=>U.pending?W(V,{children:["Press ",U.keyName," again to exit"]}):W(Z0,{children:[X&&f(l,{shortcut:"←",action:"go back"}),f(l,{shortcut:"Esc/Enter/Space",action:"close"}),!Y&&f(l,{shortcut:"t",action:"teleport"})]}),children:[W(C,{flexDirection:"column",children:[W(V,{children:[f(V,{bold:!0,children:"Status"}),":"," ",L==="running"||L==="starting"?f(V,{color:"background",children:L}):L==="completed"?f(V,{color:"success",children:L}):f(V,{color:"error",children:L})]}),W(V,{children:[f(V,{bold:!0,children:"Runtime"}),":"," ",t0((Q.endTime??Date.now())-Q.startTime)]}),W(V,{wrap:"truncate-end",children:[f(V,{bold:!0,children:"Title"}),": ",w]}),W(V,{children:[f(V,{bold:!0,children:"Progress"}),":"," ",f(S0,{session:Q})]}),W(V,{children:[f(V,{bold:!0,children:"Session URL"}),":"," ",f(JJ,{url:_0(Q.sessionId),children:f(V,{dimColor:!0,children:_0(Q.sessionId)})})]})]}),Q.log.length>0&&W(C,{flexDirection:"column",marginTop:1,children:[W(V,{children:[f(V,{bold:!0,children:"Recent messages"}),":"]}),f(C,{flexDirection:"column",height:10,overflowY:"hidden",children:F.map((U,K)=>f(mZ,{message:U,lookups:iZ,addMargin:K>0,tools:J.options.tools,commands:J.options.commands,verbose:J.options.verbose,inProgressToolUseIDs:new Set,progressMessagesForMessage:[],shouldAnimate:!1,shouldShowDot:!1,style:"condensed",isTranscriptMode:!1,isStatic:!0},K))}),f(C,{marginTop:1,children:W(V,{dimColor:!0,italic:!0,children:["Showing last ",F.length," of ",Q.log.length," ","messages"]})})]}),q&&f(C,{marginTop:1,children:W(V,{color:"error",children:["Teleport failed: ",q]})}),Y&&f(V,{color:"background",children:"Teleporting to session…"})]})})}var ZJ,O0,zX,fX,jZ,_Z;var rZ=a(()=>{cZ();m0();i0();f0();PJ();eQ();tQ();pJ();JX();sJ();h0();XX();LZ();IJ();WJ();QX();B0();I0();A0();ZX();AJ();$();ZJ=J0(R0(),1),O0=J0(o0(),1);zX={needs_input:"input required",plan_ready:"ready"},fX={needs_input:"waiting",plan_ready:"done"};jZ=["finding","verifying","synthesizing"],_Z={finding:"Find",verifying:"Verify",synthesizing:"Dedupe"}});async function sZ(Q){let J=aZ(Q.id);try{let Z=await $Z(J,HX);return{content:Z.content,bytesTotal:Z.bytesTotal}}catch{return{content:"",bytesTotal:0}}}function eZ(Q){let J=vJ.c(57),{shell:Z,onDone:X,onKillShell:z,onBack:Y}=Q,{columns:G}=QJ(),q;if(J[0]!==Z)q=()=>sZ(Z),J[0]=Z,J[1]=q;else q=J[1];let[R,F]=G0.useState(q),O=G0.useDeferredValue(R),H;if(J[2]!==Z)H=()=>{if(Z.status!=="running")return;let r=setInterval(OX,1000,F,Z);return()=>clearInterval(r)},J[2]=Z,J[3]=H;else H=J[3];let P;if(J[4]!==Z.id||J[5]!==Z.status)P=[Z.id,Z.status],J[4]=Z.id,J[5]=Z.status,J[6]=P;else P=J[6];G0.useEffect(H,P);let w;if(J[7]!==X)w=()=>X("Shell details dismissed",{display:"system"}),J[7]=X,J[8]=w;else w=J[8];let L=w,U;if(J[9]!==L)U={"confirm:yes":L},J[9]=L,J[10]=U;else U=J[10];let K;if(J[11]===Symbol.for("react.memo_cache_sentinel"))K={context:"Confirmation"},J[11]=K;else K=J[11];q0(U,K);let E;if(J[12]!==Y||J[13]!==X||J[14]!==z||J[15]!==Z.status)E=(r)=>{if(r.key===" ")r.preventDefault(),X("Shell details dismissed",{display:"system"});else if(r.key==="left"&&Y)r.preventDefault(),Y();else if(r.key==="x"&&Z.status==="running"&&z)r.preventDefault(),z()},J[12]=Y,J[13]=X,J[14]=z,J[15]=Z.status,J[16]=E;else E=J[16];let A=E,v=Z.kind==="monitor",D;if(J[17]!==Z.command)D=y0(Z.command,280),J[17]=Z.command,J[18]=D;else D=J[18];let I=D,y=v?"Monitor details":"Shell details",B;if(J[19]!==Y||J[20]!==z||J[21]!==Z.status)B=(r)=>r.pending?W(V,{children:["Press ",r.keyName," again to exit"]}):W(Z0,{children:[Y&&f(l,{shortcut:"←",action:"go back"}),f(l,{shortcut:"Esc/Enter/Space",action:"close"}),Z.status==="running"&&z&&f(l,{shortcut:"x",action:"stop"})]}),J[19]=Y,J[20]=z,J[21]=Z.status,J[22]=B;else B=J[22];let m;if(J[23]===Symbol.for("react.memo_cache_sentinel"))m=f(V,{bold:!0,children:"Status:"}),J[23]=m;else m=J[23];let u;if(J[24]!==Z.result||J[25]!==Z.status)u=W(V,{children:[m," ",Z.status==="running"?W(V,{color:"background",children:[Z.status,Z.result?.code!==void 0&&` (exit code: ${Z.result.code})`]}):Z.status==="completed"?W(V,{color:"success",children:[Z.status,Z.result?.code!==void 0&&` (exit code: ${Z.result.code})`]}):W(V,{color:"error",children:[Z.status,Z.result?.code!==void 0&&` (exit code: ${Z.result.code})`]})]}),J[24]=Z.result,J[25]=Z.status,J[26]=u;else u=J[26];let S;if(J[27]===Symbol.for("react.memo_cache_sentinel"))S=f(V,{bold:!0,children:"Runtime:"}),J[27]=S;else S=J[27];let x;if(J[28]!==Z.endTime)x=Z.endTime??Date.now(),J[28]=Z.endTime,J[29]=x;else x=J[29];let d=x-Z.startTime,h;if(J[30]!==d)h=t0(d),J[30]=d,J[31]=h;else h=J[31];let b;if(J[32]!==h)b=W(V,{children:[S," ",h]}),J[32]=h,J[33]=b;else b=J[33];let p=v?"Script:":"Command:",c;if(J[34]!==p)c=f(V,{bold:!0,children:p}),J[34]=p,J[35]=c;else c=J[35];let _;if(J[36]!==I||J[37]!==c)_=W(V,{wrap:"wrap",children:[c," ",I]}),J[36]=I,J[37]=c,J[38]=_;else _=J[38];let j;if(J[39]!==u||J[40]!==b||J[41]!==_)j=W(C,{flexDirection:"column",children:[u,b,_]}),J[39]=u,J[40]=b,J[41]=_,J[42]=j;else j=J[42];let T;if(J[43]===Symbol.for("react.memo_cache_sentinel"))T=f(V,{bold:!0,children:"Output:"}),J[43]=T;else T=J[43];let g;if(J[44]===Symbol.for("react.memo_cache_sentinel"))g=f(V,{dimColor:!0,children:"Loading output…"}),J[44]=g;else g=J[44];let k;if(J[45]!==G||J[46]!==O)k=W(C,{flexDirection:"column",children:[T,f(G0.Suspense,{fallback:g,children:f(PX,{outputPromise:O,columns:G})})]}),J[45]=G,J[46]=O,J[47]=k;else k=J[47];let N;if(J[48]!==L||J[49]!==B||J[50]!==j||J[51]!==k||J[52]!==y)N=W(n,{title:y,onCancel:L,color:"background",inputGuide:B,children:[j,k]}),J[48]=L,J[49]=B,J[50]=j,J[51]=k,J[52]=y,J[53]=N;else N=J[53];let M;if(J[54]!==A||J[55]!==N)M=f(C,{flexDirection:"column",tabIndex:0,autoFocus:!0,onKeyDown:A,children:N}),J[54]=A,J[55]=N,J[56]=M;else M=J[56];return M}function OX(Q,J){return Q(sZ(J))}function PX(Q){let J=vJ.c(19),{outputPromise:Z,columns:X}=Q,{content:z,bytesTotal:Y}=G0.use(Z);if(!z){let U;if(J[0]===Symbol.for("react.memo_cache_sentinel"))U=f(V,{dimColor:!0,children:"No output available"}),J[0]=U;else U=J[0];return U}let G,q;if(J[1]!==Y||J[2]!==z){let U=[],K=z.length;for(let E=0;E<10&&K>0;E++){let A=z.lastIndexOf(`
|
|
17
|
+
`,K-1);U.push(A+1),K=A}U.reverse(),G=Y>z.length,q=[];for(let E=0;E<U.length;E++){let A=U[E],v=E<U.length-1?U[E+1]-1:z.length,D=z.slice(A,v);if(D)q.push(D)}J[1]=Y,J[2]=z,J[3]=G,J[4]=q}else G=J[3],q=J[4];let R=X-6,F;if(J[5]!==q)F=q.map(LX),J[5]=q,J[6]=F;else F=J[6];let O;if(J[7]!==R||J[8]!==F)O=f(C,{borderStyle:"round",paddingX:1,flexDirection:"column",height:12,maxWidth:R,children:F}),J[7]=R,J[8]=F,J[9]=O;else O=J[9];let H=`Showing ${q.length} lines`,P;if(J[10]!==Y||J[11]!==G)P=G?` of ${oZ(Y)}`:"",J[10]=Y,J[11]=G,J[12]=P;else P=J[12];let w;if(J[13]!==H||J[14]!==P)w=W(V,{dimColor:!0,italic:!0,children:[H,P]}),J[13]=H,J[14]=P,J[15]=w;else w=J[15];let L;if(J[16]!==O||J[17]!==w)L=W(o,{children:[O,w]}),J[16]=O,J[17]=w,J[18]=L;else L=J[18];return L}function LX(Q,J){return f(V,{wrap:"truncate-end",children:Q},J)}var vJ,G0,HX=8192;var tZ=a(()=>{nZ();f0();g0();h0();RX();FX();B0();I0();A0();$();vJ=J0(R0(),1),G0=J0(o0(),1)});var JQ={};$J(JQ,{default:()=>wX});var UX=()=>null,wX;var ZQ=a(()=>{wX=UX});function jX(Q,J){return Object.values(Q??{}).filter(fJ).filter((X)=>!(X.type==="local_agent"&&X.id===J))}function Sf({onDone:Q,toolUseContext:J,initialDetailTaskId:Z}){let X=zJ((N)=>N.tasks),z=zJ((N)=>N.foregroundedTaskId),Y=zJ((N)=>N.expandedView)==="teammates",G=WQ(),q=qQ("chat:killAgents","Chat","ctrl+x ctrl+k"),R=X,F=P0.useRef(!1),[O,H]=P0.useState(()=>{if(Z)return F.current=!0,{mode:"detail",itemId:Z};let N=jX(R,z);if(N.length===1)return F.current=!0,{mode:"detail",itemId:N[0].id};return{mode:"list"}}),[P,w]=P0.useState(0);OQ("background-tasks-dialog");let{bashTasks:L,remoteSessions:U,agentTasks:K,teammateTasks:E,workflowTasks:A,mcpMonitors:v,dreamTasks:D,allSelectableItems:I}=P0.useMemo(()=>{let r=Object.values(R??{}).filter(fJ).map(_X).sort((i,L0)=>{let c0=i.status,jJ=L0.status;if(c0==="running"&&jJ!=="running")return-1;if(c0!=="running"&&jJ==="running")return 1;let PQ="task"in i?i.task.startTime:0;return("task"in L0?L0.task.startTime:0)-PQ}),s=r.filter((i)=>i.type==="local_bash"),Y0=r.filter((i)=>i.type==="remote_agent"),V0=r.filter((i)=>i.type==="local_agent"&&i.id!==z),N0=r.filter((i)=>i.type==="local_workflow"),K0=r.filter((i)=>i.type==="monitor_mcp"),X0=r.filter((i)=>i.type==="dream"),e=Y?[]:r.filter((i)=>i.type==="in_process_teammate"),C0=e.length>0?[{id:"__leader__",type:"leader",label:`@${hJ}`,status:"running"}]:[];return{bashTasks:s,remoteSessions:Y0,agentTasks:V0,workflowTasks:N0,mcpMonitors:K0,dreamTasks:X0,teammateTasks:[...C0,...e],allSelectableItems:[...C0,...e,...s,...K0,...Y0,...V0,...N0,...X0]}},[R,z,Y]),y=I[P]??null;q0({"confirm:previous":()=>w((N)=>Math.max(0,N-1)),"confirm:next":()=>w((N)=>Math.min(I.length-1,N+1)),"confirm:yes":()=>{let N=I[P];if(N)if(N.type==="leader")VJ(G),Q("Viewing leader",{display:"system"});else H({mode:"detail",itemId:N.id})}},{context:"Confirmation",isActive:O.mode==="list"});let B=(N)=>{if(O.mode!=="list")return;if(N.key==="left"){N.preventDefault(),Q("Background tasks dialog dismissed",{display:"system"});return}let M=I[P];if(!M)return;if(N.key==="x"){if(N.preventDefault(),M.type==="local_bash"&&M.status==="running")m(M.id);else if(M.type==="local_agent"&&M.status==="running")u(M.id);else if(M.type==="in_process_teammate"&&M.status==="running")S(M.id);else if(M.type==="local_workflow"&&M.status==="running"&&XJ)XJ(M.id,G);else if(M.type==="monitor_mcp"&&M.status==="running"&&YJ)YJ(M.id,G);else if(M.type==="dream"&&M.status==="running")x(M.id);else if(M.type==="remote_agent"&&M.status==="running")if(M.task.isUltraplan)LJ(M.id,M.task.sessionId,G);else d(M.id)}if(N.key==="f"){if(M.type==="in_process_teammate"&&M.status==="running")N.preventDefault(),GJ(M.id,G),Q("Viewing teammate",{display:"system"});else if(M.type==="leader")N.preventDefault(),VJ(G),Q("Viewing leader",{display:"system"})}};async function m(N){await VQ.kill(N,G)}async function u(N){await HQ.kill(N,G)}async function S(N){await RQ.kill(N,G)}async function x(N){await FQ.kill(N,G)}async function d(N){await p0.kill(N,G)}let h=NQ(Q);P0.useEffect(()=>{if(O.mode!=="list"){let M=(R??{})[O.itemId];if(!M||M.type!=="local_workflow"&&!fJ(M))if(F.current)h("Background tasks dialog dismissed",{display:"system"});else H({mode:"list"})}let N=I.length;if(P>=N&&N>0)w(N-1)},[O,R,P,I,h]);let b=()=>{if(F.current&&I.length<=1)Q("Background tasks dialog dismissed",{display:"system"});else F.current=!1,H({mode:"list"})};if(O.mode!=="list"&&R){let N=R[O.itemId];if(!N)return null;switch(N.type){case"local_bash":return f(eZ,{shell:N,onDone:Q,onKillShell:()=>void m(N.id),onBack:b},`shell-${N.id}`);case"local_agent":return f(OZ,{agent:N,onDone:Q,onKillAgent:()=>void u(N.id),onBack:b},`agent-${N.id}`);case"remote_agent":return f(xZ,{session:N,onDone:Q,toolUseContext:J,onBack:b,onKill:N.status!=="running"?void 0:N.isUltraplan?()=>void LJ(N.id,N.sessionId,G):()=>void d(N.id)},`session-${N.id}`);case"in_process_teammate":return f(gZ,{teammate:N,onDone:Q,onKill:N.status==="running"?()=>void S(N.id):void 0,onBack:b,onForeground:N.status==="running"?()=>{GJ(N.id,G),Q("Viewing teammate",{display:"system"})}:void 0},`teammate-${N.id}`);case"local_workflow":if(!QQ)return null;return f(QQ,{workflow:N,onDone:Q,onKill:N.status==="running"&&XJ?()=>XJ(N.id,G):void 0,onSkipAgent:N.status==="running"&&XQ?(M)=>XQ(N.id,M,G):void 0,onRetryAgent:N.status==="running"&&YQ?(M)=>YQ(N.id,M,G):void 0,onBack:b},`workflow-${N.id}`);case"monitor_mcp":if(!zQ)return null;return f(zQ,{task:N,onKill:N.status==="running"&&YJ?()=>YJ(N.id,G):void 0,onBack:b},`monitor-mcp-${N.id}`);case"dream":return f(DZ,{task:N,onDone:()=>Q("Background tasks dialog dismissed",{display:"system"}),onBack:b,onKill:N.status==="running"?()=>void x(N.id):void 0},`dream-${N.id}`)}}let p=M0(L,(N)=>N.status==="running"),c=M0(U,(N)=>N.status==="running"||N.status==="pending")+M0(K,(N)=>N.status==="running"),_=M0(E,(N)=>N.status==="running"),j=fQ([..._>0?[W(V,{children:[_," ",_!==1?"agents":"agent"]},"teammates")]:[],...p>0?[W(V,{children:[p," ",p!==1?"active shells":"active shell"]},"shells")]:[],...c>0?[W(V,{children:[c," ",c!==1?"active agents":"active agent"]},"agents")]:[]],(N)=>f(V,{children:" · "},`separator-${N}`)),T=[f(l,{shortcut:"↑/↓",action:"select"},"upDown"),f(l,{shortcut:"Enter",action:"view"},"enter"),...y?.type==="in_process_teammate"&&y.status==="running"?[f(l,{shortcut:"f",action:"foreground"},"foreground")]:[],...(y?.type==="local_bash"||y?.type==="local_agent"||y?.type==="in_process_teammate"||y?.type==="local_workflow"||y?.type==="monitor_mcp"||y?.type==="dream"||y?.type==="remote_agent")&&y.status==="running"?[f(l,{shortcut:"x",action:"stop"},"kill")]:[],...K.some((N)=>N.status==="running")?[f(l,{shortcut:q,action:"stop all agents"},"kill-all")]:[],f(l,{shortcut:"←/Esc",action:"close"},"esc")],g=()=>Q("Background tasks dialog dismissed",{display:"system"});function k(N){if(N.pending)return W(V,{children:["Press ",N.keyName," again to exit"]});return f(Z0,{children:T})}return f(C,{flexDirection:"column",tabIndex:0,autoFocus:!0,onKeyDown:B,children:f(n,{title:"Background tasks",subtitle:f(o,{children:j}),onCancel:g,color:"background",inputGuide:k,children:I.length===0?f(V,{dimColor:!0,children:"No tasks currently running"}):W(C,{flexDirection:"column",children:[E.length>0&&W(C,{flexDirection:"column",children:[(L.length>0||U.length>0||K.length>0)&&W(V,{dimColor:!0,children:[W(V,{bold:!0,children:[" ","Agents"]})," (",M0(E,(N)=>N.type!=="leader"),")"]}),f(C,{flexDirection:"column",children:f(cX,{teammateTasks:E,currentSelectionId:y?.id})})]}),L.length>0&&W(C,{flexDirection:"column",marginTop:E.length>0?1:0,children:[(E.length>0||U.length>0||K.length>0)&&W(V,{dimColor:!0,children:[W(V,{bold:!0,children:[" ","Shells"]})," (",L.length,")"]}),f(C,{flexDirection:"column",children:L.map((N)=>f(E0,{item:N,isSelected:N.id===y?.id},N.id))})]}),v.length>0&&W(C,{flexDirection:"column",marginTop:E.length>0||L.length>0?1:0,children:[W(V,{dimColor:!0,children:[W(V,{bold:!0,children:[" ","Monitors"]})," (",v.length,")"]}),f(C,{flexDirection:"column",children:v.map((N)=>f(E0,{item:N,isSelected:N.id===y?.id},N.id))})]}),U.length>0&&W(C,{flexDirection:"column",marginTop:E.length>0||L.length>0||v.length>0?1:0,children:[W(V,{dimColor:!0,children:[W(V,{bold:!0,children:[" ","Remote agents"]})," (",U.length,")"]}),f(C,{flexDirection:"column",children:U.map((N)=>f(E0,{item:N,isSelected:N.id===y?.id},N.id))})]}),K.length>0&&W(C,{flexDirection:"column",marginTop:E.length>0||L.length>0||v.length>0||U.length>0?1:0,children:[W(V,{dimColor:!0,children:[W(V,{bold:!0,children:[" ","Local agents"]})," (",K.length,")"]}),f(C,{flexDirection:"column",children:K.map((N)=>f(E0,{item:N,isSelected:N.id===y?.id},N.id))})]}),A.length>0&&W(C,{flexDirection:"column",marginTop:E.length>0||L.length>0||v.length>0||U.length>0||K.length>0?1:0,children:[W(V,{dimColor:!0,children:[W(V,{bold:!0,children:[" ","Workflows"]})," (",A.length,")"]}),f(C,{flexDirection:"column",children:A.map((N)=>f(E0,{item:N,isSelected:N.id===y?.id},N.id))})]}),D.length>0&&f(C,{flexDirection:"column",marginTop:E.length>0||L.length>0||v.length>0||U.length>0||K.length>0||A.length>0?1:0,children:f(C,{flexDirection:"column",children:D.map((N)=>f(E0,{item:N,isSelected:N.id===y?.id},N.id))})})]})})})}function _X(Q){switch(Q.type){case"local_bash":return{id:Q.id,type:"local_bash",label:Q.kind==="monitor"?Q.description:Q.command,status:Q.status,task:Q};case"remote_agent":return{id:Q.id,type:"remote_agent",label:Q.title,status:Q.status,task:Q};case"local_agent":return{id:Q.id,type:"local_agent",label:Q.description,status:Q.status,task:Q};case"in_process_teammate":return{id:Q.id,type:"in_process_teammate",label:`@${Q.identity.agentName}`,status:Q.status,task:Q};case"local_workflow":return{id:Q.id,type:"local_workflow",label:Q.summary??Q.description,status:Q.status,task:Q};case"monitor_mcp":return{id:Q.id,type:"monitor_mcp",label:Q.description,status:Q.status,task:Q};case"dream":return{id:Q.id,type:"dream",label:Q.description,status:Q.status,task:Q}}}function E0(Q){let J=gJ.c(14),{item:Z,isSelected:X}=Q,{columns:z}=QJ(),Y=Math.max(30,z-26),G;if(J[0]===Symbol.for("react.memo_cache_sentinel"))G=GQ(),J[0]=G;else G=J[0];let q=G,R=q&&X,F=X?e0.pointer+" ":" ",O;if(J[1]!==R||J[2]!==F)O=f(V,{dimColor:R,children:F}),J[1]=R,J[2]=F,J[3]=O;else O=J[3];let H=X&&!q?"suggestion":void 0,P;if(J[4]!==Z.task||J[5]!==Z.type||J[6]!==Y)P=Z.type==="leader"?W(V,{children:["@",hJ]}):f(AZ,{task:Z.task,maxActivityWidth:Y}),J[4]=Z.task,J[5]=Z.type,J[6]=Y,J[7]=P;else P=J[7];let w;if(J[8]!==H||J[9]!==P)w=f(V,{color:H,children:P}),J[8]=H,J[9]=P,J[10]=w;else w=J[10];let L;if(J[11]!==O||J[12]!==w)L=W(C,{flexDirection:"row",children:[O,w]}),J[11]=O,J[12]=w,J[13]=L;else L=J[13];return L}function cX(Q){let J=gJ.c(3),{teammateTasks:Z,currentSelectionId:X}=Q,z;if(J[0]!==X||J[1]!==Z){let Y=Z.filter(uX),G=Z.filter(TX),q=new Map;for(let F of G){let O=F.task.identity.teamName,H=q.get(O);if(H)H.push(F);else q.set(O,[F])}let R=[...q.entries()];z=f(o,{children:R.map((F)=>{let[O,H]=F,P=H.length+Y.length;return W(C,{flexDirection:"column",children:[W(V,{dimColor:!0,children:[" ","Team: ",O," (",P,")"]}),Y.map((w)=>f(E0,{item:w,isSelected:w.id===X},`${w.id}-${O}`)),H.map((w)=>f(E0,{item:w,isSelected:w.id===X},w.id))]},O)})}),J[0]=X,J[1]=Z,J[2]=z}else z=J[2];return z}function TX(Q){return Q.type==="in_process_teammate"}function uX(Q){return Q.type==="leader"}var gJ,P0,QQ=null,SJ=null,XJ,XQ,YQ,SX,YJ,zQ;var dX=a(()=>{cZ();EX();CX();nZ();bX();TJ();vX();AX();hX();KX();PJ();BX();CJ();MX();qZ();gX();f0();g0();yX();CJ();B0();I0();A0();PZ();BZ();vZ();SZ();rZ();tZ();$();gJ=J0(R0(),1),P0=J0(o0(),1),XJ=SJ?.killWorkflowTask??null,XQ=SJ?.skipWorkflowAgent??null,YQ=SJ?.retryWorkflowAgent??null,SX=(DX(),FJ(IX)),YJ=SX?.killMonitorMcp??null,zQ=(ZQ(),FJ(JQ)).MonitorMcpDetailDialog});
|
|
18
|
+
export{GJ as Fd,VJ as Gd,xX as Hd,TJ as Id,pQ as Jd,qZ as Kd,Sf as Ld,dX as Md};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{gR as k,hR as f,xR as u}from"./cli-0.5.7-93k1z52y.mjs";import{gS as C,sS as d}from"./cli-0.5.7-vyxaeh82.mjs";import{jZ as A,lZ as F}from"./cli-0.5.7-m5q27x96.mjs";import{IZ as q,NZ as i}from"./cli-0.5.7-8ychjqct.mjs";import{F3 as W,I3 as _,P3 as j,Q3 as w,V3 as I}from"./cli-0.5.7-g4n7dg2d.mjs";import{B6 as V,J6 as U}from"./cli-0.5.7-469r2a5r.mjs";import{Lea as M,Mea as v}from"./cli-0.5.7-xepvraxn.mjs";import{Pfa as J,Sfa as x,sfa as X,tfa as R,xfa as p}from"./cli-0.5.7-twqt7rxq.mjs";import{Gga as P,Nga as T}from"./cli-0.5.7-skfm51ta.mjs";import{_ma as O}from"./cli-0.5.7-258ytmbr.mjs";x();U();F();v();x();T();U();_();I();p();import{randomUUID as E}from"crypto";var h=2000,y=5,S=30000,Y=3,c=new Set([4003]);function D(B){if(typeof B!=="object"||B===null||!("type"in B))return!1;return typeof B.type==="string"}class L{sessionId;orgUuid;getAccessToken;callbacks;ws=null;state="closed";reconnectAttempts=0;sessionNotFoundRetries=0;pingInterval=null;reconnectTimer=null;constructor(B,z,Q,H){this.sessionId=B;this.orgUuid=z;this.getAccessToken=Q;this.callbacks=H}async connect(){if(this.state==="connecting"){J("[SessionsWebSocket] Already connecting");return}this.state="connecting";let z=`${M().BASE_API_URL.replace("https://","wss://")}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;J(`[SessionsWebSocket] Connecting to ${z}`);let H={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":"2023-06-01"};if(typeof Bun<"u"){let $=new globalThis.WebSocket(z,{headers:H,proxy:w(z),tls:W()||void 0});this.ws=$,$.addEventListener("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),$.addEventListener("message",(Z)=>{let K=typeof Z.data==="string"?Z.data:String(Z.data);this.handleMessage(K)}),$.addEventListener("error",()=>{let Z=Error("[SessionsWebSocket] WebSocket error");V(Z),this.callbacks.onError?.(Z)}),$.addEventListener("close",(Z)=>{J(`[SessionsWebSocket] Closed: code=${Z.code} reason=${Z.reason}`),this.handleClose(Z.code)}),$.addEventListener("pong",()=>{J("[SessionsWebSocket] Pong received")})}else{let{default:$}=await import("./wrapper-0.5.7-8k82xd0n.mjs"),Z=new $(z,{headers:H,agent:j(z),...W()});this.ws=Z,Z.on("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),Z.on("message",(K)=>{this.handleMessage(K.toString())}),Z.on("error",(K)=>{V(Error(`[SessionsWebSocket] Error: ${K.message}`)),this.callbacks.onError?.(K)}),Z.on("close",(K,G)=>{J(`[SessionsWebSocket] Closed: code=${K} reason=${G.toString()}`),this.handleClose(K)}),Z.on("pong",()=>{J("[SessionsWebSocket] Pong received")})}}handleMessage(B){try{let z=R(B);if(D(z))this.callbacks.onMessage(z);else J(`[SessionsWebSocket] Ignoring message type: ${typeof z==="object"&&z!==null&&"type"in z?String(z.type):"unknown"}`)}catch(z){V(Error(`[SessionsWebSocket] Failed to parse message: ${P(z)}`))}}handleClose(B){if(this.stopPingInterval(),this.state==="closed")return;this.ws=null;let z=this.state;if(this.state="closed",c.has(B)){J(`[SessionsWebSocket] Permanent close code ${B}, not reconnecting`),this.callbacks.onClose?.();return}if(B===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>Y){J(`[SessionsWebSocket] 4001 retry budget exhausted (${Y}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(h*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${Y}`);return}if(z==="connected"&&this.reconnectAttempts<y)this.reconnectAttempts++,this.scheduleReconnect(h,`attempt ${this.reconnectAttempts}/${y}`);else J("[SessionsWebSocket] Not reconnecting"),this.callbacks.onClose?.()}scheduleReconnect(B,z){this.callbacks.onReconnecting?.(),J(`[SessionsWebSocket] Scheduling reconnect (${z}) in ${B}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},B)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state==="connected")try{this.ws.ping?.()}catch{}},S)}stopPingInterval(){if(this.pingInterval)clearInterval(this.pingInterval),this.pingInterval=null}sendControlResponse(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}J("[SessionsWebSocket] Sending control response"),this.ws.send(X(B))}sendControlRequest(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}let z={type:"control_request",request_id:E(),request:B};J(`[SessionsWebSocket] Sending control request: ${B.subtype}`),this.ws.send(X(z))}isConnected(){return this.state==="connected"}close(){if(J("[SessionsWebSocket] Closing connection"),this.state="closed",this.stopPingInterval(),this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.ws)this.ws.close(),this.ws=null}reconnect(){J("[SessionsWebSocket] Force reconnecting"),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}}function N(B){return B.type!=="control_request"&&B.type!=="control_response"&&B.type!=="control_cancel_request"}class b{config;callbacks;websocket=null;pendingPermissionRequests=new Map;constructor(B,z){this.config=B;this.callbacks=z}connect(){J(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let B={onMessage:(z)=>this.handleMessage(z),onConnected:()=>{J("[RemoteSessionManager] Connected"),this.callbacks.onConnected?.()},onClose:()=>{J("[RemoteSessionManager] Disconnected"),this.callbacks.onDisconnected?.()},onReconnecting:()=>{J("[RemoteSessionManager] Reconnecting"),this.callbacks.onReconnecting?.()},onError:(z)=>{V(z),this.callbacks.onError?.(z)}};this.websocket=new L(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,B),this.websocket.connect()}handleMessage(B){if(B.type==="control_request"){this.handleControlRequest(B);return}if(B.type==="control_cancel_request"){let{request_id:z}=B,Q=this.pendingPermissionRequests.get(z);J(`[RemoteSessionManager] Permission request cancelled: ${z}`),this.pendingPermissionRequests.delete(z),this.callbacks.onPermissionCancelled?.(z,Q?.tool_use_id);return}if(B.type==="control_response"){J("[RemoteSessionManager] Received control response");return}if(N(B))this.callbacks.onMessage(B)}handleControlRequest(B){let{request_id:z,request:Q}=B;if(Q.subtype==="can_use_tool")J(`[RemoteSessionManager] Permission request for tool: ${Q.tool_name}`),this.pendingPermissionRequests.set(z,Q),this.callbacks.onPermissionRequest(Q,z);else{J(`[RemoteSessionManager] Unsupported control request subtype: ${Q.subtype}`);let H={type:"control_response",response:{subtype:"error",request_id:z,error:`Unsupported control request subtype: ${Q.subtype}`}};this.websocket?.sendControlResponse(H)}}async sendMessage(B,z){J(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let Q=await A(this.config.sessionId,B,z);if(!Q)V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`));return Q}respondToPermissionRequest(B,z){if(!this.pendingPermissionRequests.get(B)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${B}`));return}this.pendingPermissionRequests.delete(B);let H={type:"control_response",response:{subtype:"success",request_id:B,response:{behavior:z.behavior,...z.behavior==="allow"?{updatedInput:z.updatedInput}:{message:z.message}}}};J(`[RemoteSessionManager] Sending permission response: ${z.behavior}`),this.websocket?.sendControlResponse(H)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){J("[RemoteSessionManager] Sending interrupt signal"),this.websocket?.sendControlRequest({subtype:"interrupt"})}getSessionId(){return this.config.sessionId}disconnect(){J("[RemoteSessionManager] Disconnecting"),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){J("[RemoteSessionManager] Reconnecting WebSocket"),this.websocket?.reconnect()}}function $z(B,z,Q,H=!1,$=!1){return{sessionId:B,getAccessToken:z,orgUuid:Q,hasInitialPrompt:H,viewerOnly:$}}x();U();d();u();function Xz(){let B=C();if(!B?.teamName||!B?.agentName){J("[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)");return}let{teamName:z,agentId:Q,agentName:H}=B,$=f(z);if(!$){V(Error(`[computeInitialTeamContext] Could not read team file for ${z}`));return}let Z=k(z),K=!Q;return J(`[Reconnection] Computed initial team context for ${K?"leader":`teammate ${H}`} in team ${z}`),{teamName:z,teamFilePath:Z,leadAgentId:$.leadAgentId,selfAgentId:Q,selfAgentName:H,isLeader:K,teammates:{}}}function Wz(B,z,Q){let H=f(z);if(!H){V(Error(`[initializeTeammateContextFromSession] Could not read team file for ${z} (agent: ${Q})`));return}let $=H.members.find((G)=>G.name===Q);if(!$)J(`[Reconnection] Member ${Q} not found in team ${z} - may have been removed`);let Z=$?.agentId,K=k(z);B((G)=>({...G,teamContext:{teamName:z,teamFilePath:K,leadAgentId:H.leadAgentId,selfAgentId:Z,selfAgentName:Q,isLeader:!1,teammates:{}}})),J(`[Reconnection] Initialized agent context from session for ${Q} in team ${z}`)}i();var m={"claude-3-opus":{modelName:"Claude 3 Opus",retirementDates:{firstParty:"January 5, 2026",bedrock:"January 15, 2026",vertex:"January 5, 2026",foundry:"January 5, 2026"}},"claude-3-7-sonnet":{modelName:"Claude 3.7 Sonnet",retirementDates:{firstParty:"February 19, 2026",bedrock:"April 28, 2026",vertex:"May 11, 2026",foundry:"February 19, 2026"}},"claude-3-5-haiku":{modelName:"Claude 3.5 Haiku",retirementDates:{firstParty:"February 19, 2026",bedrock:null,vertex:null,foundry:null}}};function l(B){let z=B.toLowerCase(),Q=q();for(let[H,$]of Object.entries(m)){let Z=$.retirementDates[Q];if(!z.includes(H)||!Z)continue;return{isDeprecated:!0,modelName:$.modelName,retirementDate:Z}}return{isDeprecated:!1}}function Lz(B){if(!B)return null;let z=l(B);if(!z.isDeprecated)return null;return`⚠ ${z.modelName} will be retired on ${z.retirementDate}. Consider switching to a newer model.`}
|
|
2
|
+
export{b as Fa,$z as Ga,Xz as Ha,Wz as Ia,Lz as Ja};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Pea as h}from"./cli-0.5.7-26pwg6gg.mjs";import{Sfa as f}from"./cli-0.5.7-twqt7rxq.mjs";import{Zma as Z}from"./cli-0.5.7-258ytmbr.mjs";var $=()=>{};var F=Z(()=>{$()});var K;var G=Z(()=>{K=new Set(["if","then","elif","else","fi","while","until","for","in","do","done","case","esac","function","select"])});var M=Z(()=>{G();$();F();_();O()});var _=Z(()=>{G();$();F();M()});var O=Z(()=>{G();$();F();_();M()});var Sz;var w=Z(()=>{$();F();O();G();Sz=Promise.resolve()});async function kz(){}async function oz(z){if(!z||z.length>D)return null;return null}async function dz(z){if(!z||z.length>D)return null;return null}function nz(z){if(z.type==="declaration_command"){let J=z.children[0];return J&&x.has(J.text)?[J.text]:[]}let X=[],V=!1;for(let J of z.children){if(J.type==="variable_assignment")continue;if(J.type==="command_name"||!V&&J.type==="word"){V=!0,X.push(J.text);continue}if(v.has(J.type))X.push(l(J.text));else if(m.has(J.type))break}return X}function l(z){return z.length>=2&&(z[0]==='"'&&z.at(-1)==='"'||z[0]==="'"&&z.at(-1)==="'")?z.slice(1,-1):z}var D=1e4,x,v,m,pz;var L=Z(()=>{h();f();w();x=new Set(["export","declare","typeset","readonly","local","unset","unsetenv"]),v=new Set(["word","string","raw_string","number"]),m=new Set(["command_substitution","process_substitution"]);pz=Symbol("parse-aborted")});
|
|
2
|
+
export{K as oY,w as pY,kz as qY,oz as rY,pz as sY,dz as tY,nz as uY,L as vY};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{de as R,fe as d}from"./cli-0.5.7-w2fb8g6y.mjs";import{WT as j,ZT as c}from"./cli-0.5.7-aq7a3646.mjs";import{Pfa as K,Sfa as D}from"./cli-0.5.7-twqt7rxq.mjs";import{Gga as C,Nga as h}from"./cli-0.5.7-skfm51ta.mjs";import{Zma as I,_ma as J}from"./cli-0.5.7-258ytmbr.mjs";async function i({environmentId:X,title:Q,events:q,gitRepoUrl:$,branch:Y,signal:z,baseUrl:G,getAccessToken:L,permissionMode:W}){let{getClaudeAIOAuthTokens:B}=await import("./auth-0.5.7-ez3n1qpx.mjs"),{getOrganizationUUID:Z}=await import("./client-0.5.7-bqw74z29.mjs"),{getOauthConfig:V}=await import("./oauth-0.5.7-xf0qbv6v.mjs"),{getOAuthHeaders:P}=await import("./api-0.5.7-j8bn129y.mjs"),{parseGitHubRepository:N}=await import("./detectRepository-0.5.7-3dy7yz89.mjs"),{getDefaultBranch:_}=await import("./git-0.5.7-7gyptyxn.mjs"),{getMainLoopModel:M}=await import("./model-0.5.7-7mt2xn7w.mjs"),{default:T}=await import("./index-0.5.7-yw3tp60c.mjs"),x=L?.()??B()?.accessToken;if(!x)return K("[bridge] No access token for session creation"),null;let k=await Z();if(!k)return K("[bridge] No org UUID for session creation"),null;let E=null,v=null;if($){let{parseGitRemote:y}=await import("./detectRepository-0.5.7-3dy7yz89.mjs"),O=y($);if(O){let{host:A,owner:S,name:f}=O,F=Y||await _()||void 0;E={type:"git_repository",url:`https://${A}/${S}/${f}`,revision:F},v={type:"git_repository",git_info:{type:"github",repo:`${S}/${f}`,branches:[`claude/${Y||"task"}`]}}}else{let A=N($);if(A){let[S,f]=A.split("/");if(S&&f){let F=Y||await _()||void 0;E={type:"git_repository",url:`https://github.com/${S}/${f}`,revision:F},v={type:"git_repository",git_info:{type:"github",repo:`${S}/${f}`,branches:[`claude/${Y||"task"}`]}}}}}}let m={...Q!==void 0&&{title:Q},events:q,session_context:{sources:E?[E]:[],outcomes:v?[v]:[],model:M()},environment_id:X,source:"remote-control",...W&&{permission_mode:W}},U={...P(x),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":k},b=`${G??V().BASE_API_URL}/v1/sessions`,H;try{H=await T.post(b,m,{headers:U,signal:z,validateStatus:(y)=>y<500})}catch(y){return K(`[bridge] Session creation request failed: ${C(y)}`),null}if(!(H.status===200||H.status===201)){let y=R(H.data);return K(`[bridge] Session creation failed with status ${H.status}${y?`: ${y}`:""}`),null}let w=H.data;if(!w||typeof w!=="object"||!("id"in w)||typeof w.id!=="string")return K("[bridge] No session ID in response"),null;return w.id}async function r(X,Q){let{getClaudeAIOAuthTokens:q}=await import("./auth-0.5.7-ez3n1qpx.mjs"),{getOrganizationUUID:$}=await import("./client-0.5.7-bqw74z29.mjs"),{getOauthConfig:Y}=await import("./oauth-0.5.7-xf0qbv6v.mjs"),{getOAuthHeaders:z}=await import("./api-0.5.7-j8bn129y.mjs"),{default:G}=await import("./index-0.5.7-yw3tp60c.mjs"),L=Q?.getAccessToken?.()??q()?.accessToken;if(!L)return K("[bridge] No access token for session fetch"),null;let W=await $();if(!W)return K("[bridge] No org UUID for session fetch"),null;let B={...z(L),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":W},Z=`${Q?.baseUrl??Y().BASE_API_URL}/v1/sessions/${X}`,V=1e4;K(`[bridge] Fetching session ${X}`);let P;try{P=await G.get(Z,{headers:B,timeout:V,validateStatus:(N)=>N<500})}catch(N){if(G.isAxiosError(N)){let _=N.response?.status??"no-response",M=N.code??"unknown-code",T=N.config?.url??Z,x=N.config?.method?.toUpperCase()??"GET",k=N.message??C(N),E=N.config?.timeout??V;K(`[bridge] Session fetch request failed: status=${_} code=${M} method=${x} url=${T} timeout=${E} message=${k}`)}else K(`[bridge] Session fetch request failed: url=${Z} timeout=${V} message=${C(N)}`);return null}if(P.status!==200){let N=R(P.data);return K(`[bridge] Session fetch failed with status ${P.status} url=${Z}${N?`: ${N}`:""}`),null}return P.data}async function t(X,Q){let{getClaudeAIOAuthTokens:q}=await import("./auth-0.5.7-ez3n1qpx.mjs"),{getOrganizationUUID:$}=await import("./client-0.5.7-bqw74z29.mjs"),{getOauthConfig:Y}=await import("./oauth-0.5.7-xf0qbv6v.mjs"),{getOAuthHeaders:z}=await import("./api-0.5.7-j8bn129y.mjs"),{default:G}=await import("./index-0.5.7-yw3tp60c.mjs"),L=Q?.getAccessToken?.()??q()?.accessToken;if(!L){K("[bridge] No access token for session archive");return}let W=await $();if(!W){K("[bridge] No org UUID for session archive");return}let B={...z(L),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":W},Z=`${Q?.baseUrl??Y().BASE_API_URL}/v1/sessions/${X}/archive`;K(`[bridge] Archiving session ${X}`);let V=await G.post(Z,{},{headers:B,timeout:Q?.timeoutMs??1e4,validateStatus:(P)=>P<500});if(V.status===200)K(`[bridge] Session ${X} archived successfully`);else{let P=R(V.data);K(`[bridge] Session archive failed with status ${V.status}${P?`: ${P}`:""}`)}}async function o(X,Q,q){let{getClaudeAIOAuthTokens:$}=await import("./auth-0.5.7-ez3n1qpx.mjs"),{getOrganizationUUID:Y}=await import("./client-0.5.7-bqw74z29.mjs"),{getOauthConfig:z}=await import("./oauth-0.5.7-xf0qbv6v.mjs"),{getOAuthHeaders:G}=await import("./api-0.5.7-j8bn129y.mjs"),{default:L}=await import("./index-0.5.7-yw3tp60c.mjs"),W=q?.getAccessToken?.()??$()?.accessToken;if(!W){K("[bridge] No access token for session title update");return}let B=await Y();if(!B){K("[bridge] No org UUID for session title update");return}let Z={...G(W),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},V=j(X),P=`${q?.baseUrl??z().BASE_API_URL}/v1/sessions/${V}`;K(`[bridge] Updating session title: ${V} → ${Q}`);try{let N=await L.patch(P,{title:Q},{headers:Z,timeout:1e4,validateStatus:(_)=>_<500});if(N.status===200)K("[bridge] Session title updated successfully");else{let _=R(N.data);K(`[bridge] Session title update failed with status ${N.status}${_?`: ${_}`:""}`)}}catch(N){K(`[bridge] Session title update request failed: ${C(N)}`)}}var p=I(()=>{D();h();d();c()});
|
|
2
|
+
export{i as Xd,r as Yd,t as Zd,o as _d,p as $d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jh as R,lh as y,mh as v}from"./cli-0.5.7-d19d4v07.mjs";import{MW as K,pX as E,rV as c}from"./cli-0.5.7-x1w96j6d.mjs";import{OY as O,PY as N,QY as M,RY as U}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as G}from"./cli-0.5.7-8sbq2qed.mjs";import{Haa as L,_aa as b}from"./cli-0.5.7-469r2a5r.mjs";import{Vca as Z,fda as W}from"./cli-0.5.7-5mrw857q.mjs";import{Pea as p}from"./cli-0.5.7-26pwg6gg.mjs";import{Vma as F,Zma as j}from"./cli-0.5.7-258ytmbr.mjs";function f(){let q=R();if(!q||!q.available||q.granted)return!1;return y(q)!==null}function r(){if(!f())return!1;let q=L();if(q.hasVisitedExtraUsage)return!1;if((q.overageCreditUpsellSeenCount??0)>=T)return!1;return!0}function C(q){return`${q} in extra usage for third-party apps · /extra-usage`}function w(q){return`${q} in extra usage`}function n(q){let k=S.c(8),{maxWidth:z,twoLine:P}=q,Q,H;if(k[0]!==z||k[1]!==P){H=Symbol.for("react.early_return_sentinel");k:{let A=R();if(!A){H=null;break k}let V=y(A);if(!V){H=null;break k}if(P){let I=w(V),J;if(k[4]!==z)J=z?Z(_,z):_,k[4]=z,k[5]=J;else J=k[5];let Y;if(k[6]!==J)Y=N(K,{dimColor:!0,children:J}),k[6]=J,k[7]=Y;else Y=k[7];H=M(O,{children:[N(K,{color:"claude",children:z?Z(I,z):I}),Y]});break k}let B=C(V),X=z?Z(B,z):B,D=Math.min(w(V).length,X.length);Q=M(K,{dimColor:!0,children:[N(K,{color:"claude",children:X.slice(0,D)}),X.slice(D)]})}k[0]=z,k[1]=P,k[2]=Q,k[3]=H}else Q=k[2],H=k[3];if(H!==Symbol.for("react.early_return_sentinel"))return H;return Q}var S,$,T=3,_="On us. Works on third-party apps · /extra-usage";var l=j(()=>{E();p();v();b();W();U();S=F(c(),1),$=F(G(),1)});
|
|
2
|
+
export{f as Vf,r as Wf,n as Xf,l as Yf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{AJ as $,zJ as Q}from"./cli-0.5.7-q2e6xpch.mjs";import{aha as V,aia as W,bha as P,bia as E}from"./cli-0.5.7-hp25yk8y.mjs";import{Zma as L}from"./cli-0.5.7-258ytmbr.mjs";function Z(x,q,D,G){var H=-1,J=x==null?0:x.length;while(++H<J){var K=x[H];q(G,K,D(K),x)}return G}var M;var N=L(()=>{M=Z});function B(x,q,D,G){return Q(x,function(H,J,K){q(G,H,D(H),K)}),G}var S;var U=L(()=>{$();S=B});function I(x,q){return function(D,G){var H=V(D)?M:S,J=q?q():{};return H(D,x,W(G,2),J)}}var X;var Y=L(()=>{N();U();E();P();X=I});var R,v;var C=L(()=>{Y();R=X(function(x,q,D){x[D?0:1].push(q)},function(){return[[],[]]}),v=R});
|
|
2
|
+
export{v as Wb,C as Xb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{R6 as z,T6 as G}from"./cli-0.5.7-469r2a5r.mjs";import{Zma as D}from"./cli-0.5.7-258ytmbr.mjs";function H(k){let g;try{g=new URL(k)}catch(A){throw Error(`Invalid URL format: ${k}`)}if(g.protocol!=="http:"&&g.protocol!=="https:")throw Error(`Invalid URL protocol: must use http:// or https://, got ${g.protocol}`)}async function K(k){try{let g=process.platform;if(g==="win32"){let{code:C}=await z("explorer",[k]);return C===0}let A=g==="darwin"?"open":"xdg-open",{code:B}=await z(A,[k]);return B===0}catch(g){return!1}}async function L(k){try{H(k);let g=process.env.BROWSER,A=process.platform;if(A==="win32"){if(g){let{code:C}=await z(g,[`"${k}"`]);return C===0}let{code:B}=await z("rundll32",["url,OpenURL",k],{});return B===0}else{let B=g||(A==="darwin"?"open":"xdg-open"),{code:C}=await z(B,[k]);return C===0}}catch(g){return!1}}var I=D(()=>{G()});
|
|
2
|
+
export{K as mZ,L as nZ,I as oZ};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Jf as p,Kf as Kq}from"./cli-0.5.7-jf3f8gen.mjs";import{EO as l,bi as $,di as Yq,eP as Oq}from"./cli-0.5.7-q2e6xpch.mjs";import{KW as T,MW as R,eX as u,pX as Aq,rV as Gq}from"./cli-0.5.7-x1w96j6d.mjs";import{gY as t,iY as v,lY as e}from"./cli-0.5.7-kp9pg4sr.mjs";import{PY as P,QY as N,RY as S}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as Zq}from"./cli-0.5.7-8sbq2qed.mjs";import{nZ as d,oZ as Vq}from"./cli-0.5.7-6pssgqdn.mjs";import{R6 as G,S8 as s,T6 as o,w8 as j}from"./cli-0.5.7-469r2a5r.mjs";import{Zda as L,_da as n}from"./cli-0.5.7-sjx0wm99.mjs";import{Pfa as w,Sfa as r}from"./cli-0.5.7-twqt7rxq.mjs";import{Gga as c,Nga as Xq}from"./cli-0.5.7-skfm51ta.mjs";import{ima as i,ria as f}from"./cli-0.5.7-hp25yk8y.mjs";import{Vma as I,Zma as h}from"./cli-0.5.7-258ytmbr.mjs";import{readdir as qq}from"fs/promises";import{join as zq}from"path";function _(){let H=[process.argv[1]||"",process.execPath||""],q=["/build-ant/","/build-ant-native/","/build-external/","/build-external-native/"];return H.some((z)=>q.some((Q)=>z.includes(Q)))}function Jq(H){let q=_()?"claude-dev":"claude",z=new URL(`${q}://resume`);return z.searchParams.set("session",H),z.searchParams.set("cwd",L()),z.toString()}async function g(){if(_())return!0;let H=process.platform;if(H==="darwin")return j("/Applications/Claude.app");else if(H==="linux"){let{code:q,stdout:z}=await G("xdg-mime",["query","default","x-scheme-handler/claude"]);return q===0&&z.trim().length>0}else if(H==="win32"){let{code:q}=await G("reg",["query","HKEY_CLASSES_ROOT\\claude","/ve"]);return q===0}return!1}async function Qq(){let H=process.platform;if(H==="darwin"){let{code:q,stdout:z}=await G("defaults",["read","/Applications/Claude.app/Contents/Info.plist","CFBundleShortVersionString"]);if(q!==0)return null;let Q=z.trim();return Q.length>0?Q:null}else if(H==="win32"){let q=process.env.LOCALAPPDATA;if(!q)return null;let z=zq(q,"AnthropicClaude");try{let Y=(await qq(z)).filter((W)=>W.startsWith("app-")).map((W)=>W.slice(4)).filter((W)=>K.coerce(W)!==null).sort((W,B)=>{let V=K.coerce(W),y=K.coerce(B);return V.compare(y)});return Y.length>0?Y[Y.length-1]:null}catch{return null}}return null}async function x(){if(!await g())return{status:"not-installed"};let q;try{q=await Qq()}catch{return{status:"ready",version:"unknown"}}if(!q)return{status:"ready",version:"unknown"};let z=K.coerce(q);if(!z||!v(z.version,Hq))return{status:"version-too-old",version:q};return{status:"ready",version:q}}async function Wq(H){let q=process.platform;if(w(`Opening deep link: ${H}`),q==="darwin"){if(_()){let{code:Q}=await G("osascript",["-e",`tell application "Electron" to open location "${H}"`]);return Q===0}let{code:z}=await G("open",[H]);return z===0}else if(q==="linux"){let{code:z}=await G("xdg-open",[H]);return z===0}else if(q==="win32"){let{code:z}=await G("cmd",["/c","start","",H]);return z===0}return!1}async function m(){let H=f();if(!await g())return{success:!1,error:"Claude Desktop is not installed. Install it from https://claude.ai/download"};let z=Jq(H);if(!await Wq(z))return{success:!1,error:"Failed to open Claude Desktop. Please try opening it manually.",deepLinkUrl:z};return{success:!0,deepLinkUrl:z}}var K,Hq="1.1.2396";var k=h(()=>{i();n();r();o();s();e();K=I(t(),1)});function Pq(){switch(process.platform){case"win32":return"https://claude.ai/api/desktop/win32/x64/exe/latest/redirect";default:return"https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect"}}function mq(H){let q=a.c(20),{onDone:z}=H,[Q,Y]=A.useState("checking"),[W,B]=A.useState(null),[V,y]=A.useState(""),O;if(q[0]!==W||q[1]!==z||q[2]!==Q)O=(J)=>{if(Q==="error"){z(W??"Unknown error",{display:"system"});return}if(Q==="prompt-download"){if(J==="y"||J==="Y")d(Pq()).catch(Bq),z(`Starting download. Re-run /desktop once you’ve installed the app.
|
|
2
|
+
Learn more at ${D}`,{display:"system"});else if(J==="n"||J==="N")z(`The desktop app is required for /desktop. Learn more at ${D}`,{display:"system"})}},q[0]=W,q[1]=z,q[2]=Q,q[3]=O;else O=q[3];u(O);let E,F;if(q[4]!==z)E=()=>{(async function(){Y("checking");let X=await x();if(X.status==="not-installed"){y("Claude Desktop is not installed."),Y("prompt-download");return}if(X.status==="version-too-old"){y(`Claude Desktop needs to be updated (found v${X.version}, need v1.1.2396+).`),Y("prompt-download");return}Y("flushing"),await l(),Y("opening");let U=await m();if(!U.success){B(U.error??"Failed to open Claude Desktop"),Y("error");return}Y("success"),setTimeout(Rq,500,z)})().catch((Z)=>{B(c(Z)),Y("error")})},F=[z],q[4]=z,q[5]=E,q[6]=F;else E=q[5],F=q[6];if(A.useEffect(E,F),Q==="error"){let J;if(q[7]!==W)J=N(R,{color:"error",children:["Error: ",W]}),q[7]=W,q[8]=J;else J=q[8];let Z;if(q[9]===Symbol.for("react.memo_cache_sentinel"))Z=P(R,{dimColor:!0,children:"Press any key to continue…"}),q[9]=Z;else Z=q[9];let X;if(q[10]!==J)X=N(T,{flexDirection:"column",paddingX:2,children:[J,Z]}),q[10]=J,q[11]=X;else X=q[11];return X}if(Q==="prompt-download"){let J;if(q[12]!==V)J=P(R,{children:V}),q[12]=V,q[13]=J;else J=q[13];let Z;if(q[14]===Symbol.for("react.memo_cache_sentinel"))Z=P(R,{children:"Download now? (y/n)"}),q[14]=Z;else Z=q[14];let X;if(q[15]!==J)X=N(T,{flexDirection:"column",paddingX:2,children:[J,Z]}),q[15]=J,q[16]=X;else X=q[16];return X}let C;if(q[17]===Symbol.for("react.memo_cache_sentinel"))C={checking:"Checking for Claude Desktop…",flushing:"Saving session…",opening:"Opening Claude Desktop…",success:"Opening in Claude Desktop…"},q[17]=C;else C=q[17];let b=C[Q],M;if(q[18]!==b)M=P(p,{message:b}),q[18]=b,q[19]=M;else M=q[19];return M}async function Rq(H){H("Session transferred to Claude Desktop",{display:"system"}),await $(0,"other")}function Bq(){}var a,A,D="https://clau.de/desktop";var yq=h(()=>{Aq();Vq();k();Xq();Yq();Oq();Kq();S();a=I(Gq(),1),A=I(Zq(),1)});
|
|
3
|
+
export{mq as Hf,yq as If};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{iY as o,lY as OJ}from"./cli-0.5.7-kp9pg4sr.mjs";import{B6 as q,Eaa as v,J$ as i,J6 as I,S6 as K,T$ as HJ,T6 as D,_aa as E,w9 as G,y9 as BJ}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as A,Pea as zJ}from"./cli-0.5.7-26pwg6gg.mjs";import{Bfa as y,Ffa as F,Pfa as W,Sfa as XJ,sfa as k,tfa as j,xfa as C}from"./cli-0.5.7-twqt7rxq.mjs";import{$fa as H,mga as b}from"./cli-0.5.7-tqn2ged5.mjs";import{Hga as O,Iga as w,Lga as p,Nga as R,wga as l}from"./cli-0.5.7-skfm51ta.mjs";import{Zma as M}from"./cli-0.5.7-258ytmbr.mjs";import{access as P,chmod as JJ,writeFile as QJ}from"fs/promises";import{homedir as f}from"os";import{join as B}from"path";function S(){return B(H(),"local")}function YJ(J=f()){return B(J,".claude","local")}function m(J){let Q=J?.homeDir??f(),Y=J?.configHomeDir??H();return Array.from(new Set([B(Y,"local"),YJ(Q)]))}function d(J){return[B(J,"node_modules",".bin","claudin"),B(J,"node_modules",".bin","claude")]}function ZJ(J){let Q=J.replace(/\\+/g,"/");return Q.includes("/.claudin/local/node_modules/")||Q.includes("/.claude/local/node_modules/")}function T(){return B(S(),"claudin")}function DJ(){return ZJ(process.argv[1]||"")}async function L(J,Q,Y){try{return await QJ(J,Q,{encoding:"utf8",flag:"wx",mode:Y}),!0}catch(Z){if(O(Z)==="EEXIST")return!1;throw Z}}async function $J(){try{let J=S();await y().mkdir(J),await L(B(J,"package.json"),k({name:"claudin-local",version:"0.0.1",private:!0},null,2));let Q=T();if(await L(Q,`#!/bin/sh
|
|
2
|
+
exec "${J}/node_modules/.bin/claudin" "$@"`,493))await JJ(Q,493);return!0}catch(J){return q(J),!1}}async function EJ(J,Q){try{if(!await $J())return"install_failed";let Z=await K("npm",["install",`@claudiolabs/claudin@${Q?Q:J==="stable"?"stable":"latest"}`],{cwd:S(),maxBuffer:1e6});if(Z.code!==0){let $=Error(`Failed to install Claude CLI package: ${Z.stderr}`);return q($),Z.code===190?"in_progress":"install_failed"}return v(($)=>({...$,installMethod:"local"})),"success"}catch(Y){return q(Y),"install_failed"}}async function PJ(){for(let J of m())for(let Q of d(J))try{return await P(Q),!0}catch{}return!1}async function fJ(){for(let J of m())for(let Q of d(J))try{return await P(Q),J}catch{}return null}function mJ(){let J=process.env.SHELL||"";if(J.includes("zsh"))return"zsh";if(J.includes("bash"))return"bash";if(J.includes("fish"))return"fish";return"unknown"}var u=M(()=>{E();b();R();D();F();I();C()});import{open as qJ,readFile as WJ,stat as KJ}from"fs/promises";import{homedir as h}from"os";import{join as U}from"path";function V(J){let Q=J?.homedir??h(),Z=(J?.env??process.env).ZDOTDIR||Q;return{zsh:U(Z,".zshrc"),bash:U(Q,".bashrc"),fish:U(Q,".config/fish/config.fish")}}function g(J){let Q=!1;return{filtered:J.filter((Z)=>{if(c.test(Z)){let $=Z.match(/alias\s+claude\s*=\s*["']([^"']+)["']/);if(!$)$=Z.match(/alias\s+claude\s*=\s*([^#\n]+)/);if($&&$[1]){if($[1].trim()===T())return Q=!0,!1}}return!0}),hadAlias:Q}}async function x(J){try{return(await WJ(J,{encoding:"utf8"})).split(`
|
|
3
|
+
`)}catch(Q){if(p(Q))return null;throw Q}}async function n(J,Q){let Y=await qJ(J,"w");try{await Y.writeFile(Q.join(`
|
|
4
|
+
`),{encoding:"utf8"}),await Y.datasync()}finally{await Y.close()}}async function NJ(J){let Q=V(J);for(let Y of Object.values(Q)){let Z=await x(Y);if(!Z)continue;for(let $ of Z)if(c.test($)){let N=$.match(/alias\s+claude=["']?([^"'\s]+)/);if(N&&N[1])return N[1]}}return null}async function nJ(J){let Q=await NJ(J);if(!Q)return null;let Y=J?.homedir??h(),Z=Q.startsWith("~")?Q.replace("~",Y):Q;try{let $=await KJ(Z);if($.isFile()||$.isSymbolicLink())return Q}catch{}return null}var c;var s=M(()=>{R();u();c=/^\s*alias\s+claude\s*=/});import{constants as yJ}from"fs";import{access as GJ,writeFile as a}from"fs/promises";import{homedir as X}from"os";import{join as _J}from"path";function r(){let J=process.argv[1]||"";if(J.includes("/.bun/install/global/"))return!0;let Q=process.env.BUN_INSTALL;if(Q&&J.startsWith(Q))return!0;return!1}async function vJ(){let J=await K("bun",["pm","ls","-g"],{cwd:X()});if(J.code!==0)return!1;return J.stdout.includes("@claudiolabs/claudin")}async function zQ(){}async function BQ(){return}async function HQ(){return}function OQ(J){let Y=i()?.minimumVersion;if(!Y)return!1;let Z=!o(J,Y);if(Z)W(`Skipping update to ${J} - below minimumVersion ${Y}`);return Z}function e(){return _J(H(),".update.lock")}async function wJ(){let J=y(),Q=e();try{let Y=await J.stat(Q);if(Date.now()-Y.mtimeMs<t)return!1;try{let $=await J.stat(Q);if(Date.now()-$.mtimeMs<t)return!1;await J.unlink(Q)}catch($){if(!w($))return q($),!1}}catch(Y){if(!w(Y))return q(Y),!1}try{return await a(Q,`${process.pid}`,{encoding:"utf8",flag:"wx"}),!0}catch(Y){let Z=O(Y);if(Z==="EEXIST")return!1;if(Z==="ENOENT")try{return await J.mkdir(H()),await a(Q,`${process.pid}`,{encoding:"utf8",flag:"wx"}),!0}catch($){if(O($)==="EEXIST")return!1;return q($),!1}return q(Y),!1}}async function MJ(){let J=y(),Q=e();try{if(await J.readFile(Q,{encoding:"utf8"})===`${process.pid}`)await J.unlink(Q)}catch(Y){if(w(Y))return;q(Y)}}async function RJ(){let J=G.isRunningWithBun()||r(),Q=null;if(J)Q=await K("bun",["pm","bin","-g"],{cwd:X()});else Q=await K("npm",["-g","config","get","prefix"],{cwd:X()});if(Q.code!==0)return q(Error(`Failed to check ${J?"bun":"npm"} permissions`)),null;return Q.stdout.trim()}async function SJ(){try{let J=await RJ();if(!J)return{hasPermissions:!1,npmPrefix:null};try{return await GJ(J,yJ.W_OK),{hasPermissions:!0,npmPrefix:J}}catch{return q(new _("Insufficient permissions for global npm install.")),{hasPermissions:!1,npmPrefix:J}}}catch(J){return q(J),{hasPermissions:!1,npmPrefix:null}}}async function yQ(J,Q={}){let Y=J==="stable"?"stable":"latest",Z=Q.timeoutMs??5000,$=await K("npm",["view",`@claudiolabs/claudin@${Y}`,"version","--prefer-online"],{abortSignal:AbortSignal.timeout(Z),cwd:X()});if($.code!==0){if(W(`npm view failed with code ${$.code}`),$.stderr)W(`npm stderr: ${$.stderr.trim()}`);else W("npm stderr: (empty)");if($.stdout)W(`npm stdout: ${$.stdout.trim()}`);return null}return $.stdout.trim()}async function GQ(){let J=await K("npm",["view","@claudiolabs/claudin","dist-tags","--json","--prefer-online"],{abortSignal:AbortSignal.timeout(5000),cwd:X()});if(J.code!==0)return W(`npm view dist-tags failed with code ${J.code}`),{latest:null,stable:null};try{let Q=j(J.stdout.trim());return{latest:typeof Q.latest==="string"?Q.latest:null,stable:typeof Q.stable==="string"?Q.stable:null}}catch(Q){return W(`Failed to parse dist-tags: ${Q}`),{latest:null,stable:null}}}async function _Q(J){return null}async function vQ(){return{latest:null,stable:null}}async function wQ(J){let Y=await K("npm",["view","@claudiolabs/claudin","versions","--json","--prefer-online"],{abortSignal:AbortSignal.timeout(30000),cwd:X()});if(Y.code!==0){if(W(`npm view versions failed with code ${Y.code}`),Y.stderr)W(`npm stderr: ${Y.stderr.trim()}`);return[]}try{return j(Y.stdout.trim()).slice(-J).reverse()}catch(Z){return W(`Failed to parse version history: ${Z}`),[]}}async function MQ(J){if(!await wJ())return q(new _("Another process is currently installing an update")),A("tengu_auto_updater_lock_contention",{pid:process.pid,currentVersion:"99.0.0"}),"in_progress";try{if(await TJ(),!G.isRunningWithBun()&&G.isNpmFromWindowsPath())return q(Error("Windows NPM detected in WSL environment")),A("tengu_auto_updater_windows_npm_in_wsl",{currentVersion:"99.0.0"}),console.error(`
|
|
5
|
+
Error: Windows NPM detected in WSL
|
|
6
|
+
|
|
7
|
+
You're running Claude Code in WSL but using the Windows NPM installation from /mnt/c/.
|
|
8
|
+
This configuration is not supported for updates.
|
|
9
|
+
|
|
10
|
+
To fix this issue:
|
|
11
|
+
1. Install Node.js within your Linux distribution: e.g. sudo apt install nodejs npm
|
|
12
|
+
2. Make sure Linux NPM is in your PATH before the Windows version
|
|
13
|
+
3. Try updating again with 'claude update'
|
|
14
|
+
`),"install_failed";let{hasPermissions:Q}=await SJ();if(!Q)return"no_permissions";let Y=J?`@claudiolabs/claudin@${J}`:"@claudiolabs/claudin",Z=G.isRunningWithBun()||r()?"bun":"npm",N=await K(Z,Z==="npm"?["install","-g","--force",Y]:["install","-g",Y],{cwd:X()});if(N.code!==0){let z=new _(`Failed to install new version of claude: ${N.stdout} ${N.stderr}`);return q(z),"install_failed"}if(Z==="npm"&&await vJ()){let z=await K("bun",["install","-g",Y],{cwd:X()});if(z.code!==0)q(new _(`Failed to update bun global install: ${z.stdout} ${z.stderr}`))}return v((z)=>({...z,installMethod:"global"})),"success"}finally{await MJ()}}async function TJ(){let J=V();for(let[,Q]of Object.entries(J))try{let Y=await x(Q);if(!Y)continue;let{filtered:Z,hadAlias:$}=g(Y);if($)await n(Q,Z),W(`Removed claude alias from ${Q}`)}catch(Y){W(`Failed to remove alias from ${Q}: ${Y}`,{level:"error"})}}var _,t=300000;var UJ=M(()=>{zJ();E();XJ();BJ();b();R();D();F();I();OJ();HJ();s();C();_=class _ extends l{}});
|
|
15
|
+
export{DJ as wS,EJ as xS,PJ as yS,fJ as zS,mJ as AS,u as BS,V as CS,g as DS,x as ES,n as FS,NJ as GS,nJ as HS,s as IS,zQ as JS,BQ as KS,HQ as LS,OQ as MS,e as NS,SJ as OS,yQ as PS,GQ as QS,_Q as RS,vQ as SS,wQ as TS,MQ as US,UJ as VS};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{KW as p,MW as u,SW as UQ,eX as h,pX as y,rV as m,xW as k,yW as FQ}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as S,QY as $,RY as j}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as f}from"./cli-0.5.7-8sbq2qed.mjs";import{Pca as GQ,Qca as PQ}from"./cli-0.5.7-5mrw857q.mjs";import{Vma as W,Zma as P}from"./cli-0.5.7-258ytmbr.mjs";function d(){let X=c.useContext(k);if(!X)throw Error("useTerminalSize must be used within an Ink App component");return X}var c;var a=P(()=>{FQ();c=W(f(),1)});function o(X,Q){if(Q.escape)return"escape";if(Q.return)return"enter";if(Q.tab)return"tab";if(Q.backspace)return"backspace";if(Q.delete)return"delete";if(Q.upArrow)return"up";if(Q.downArrow)return"down";if(Q.leftArrow)return"left";if(Q.rightArrow)return"right";if(Q.pageUp)return"pageup";if(Q.pageDown)return"pagedown";if(Q.wheelUp)return"wheelup";if(Q.wheelDown)return"wheeldown";if(Q.home)return"home";if(Q.end)return"end";if(X.length===1)return X.toLowerCase();return null}var s=()=>{};function r(X){let Q=X.split("+"),V={key:"",ctrl:!1,alt:!1,shift:!1,meta:!1,super:!1};for(let Z of Q){let Y=Z.toLowerCase();switch(Y){case"ctrl":case"control":V.ctrl=!0;break;case"alt":case"opt":case"option":V.alt=!0;break;case"shift":V.shift=!0;break;case"meta":V.meta=!0;break;case"cmd":case"command":case"super":case"win":V.super=!0;break;case"esc":V.key="escape";break;case"return":V.key="enter";break;case"space":V.key=" ";break;case"↑":V.key="up";break;case"↓":V.key="down";break;case"←":V.key="left";break;case"→":V.key="right";break;default:V.key=Y;break}}return V}function IQ(X){if(X===" ")return[r("space")];return X.trim().split(/\s+/).map(r)}function BQ(X){let Q=[];if(X.ctrl)Q.push("ctrl");if(X.alt)Q.push("alt");if(X.shift)Q.push("shift");if(X.meta)Q.push("meta");if(X.super)Q.push("cmd");let V=EQ(X.key);return Q.push(V),Q.join("+")}function EQ(X){switch(X){case"escape":return"Esc";case" ":return"Space";case"tab":return"tab";case"enter":return"Enter";case"backspace":return"Backspace";case"delete":return"Delete";case"up":return"↑";case"down":return"↓";case"left":return"←";case"right":return"→";case"pageup":return"PageUp";case"pagedown":return"PageDown";case"home":return"Home";case"end":return"End";default:return X}}function b(X){return X.map(BQ).join(" ")}function jQ(X){let Q=[];for(let V of X)for(let[Z,Y]of Object.entries(V.bindings))Q.push({chord:IQ(Z),action:Y,context:V.context});return Q}var i=()=>{};function n(X,Q,V){let Z=V.findLast((Y)=>Y.action===X&&Y.context===Q);return Z?b(Z.chord):void 0}function zQ(X,Q){let V=o(X,Q);if(!V)return null;let Z=Q.escape?!1:Q.meta;return{key:V,ctrl:Q.ctrl,alt:Z,shift:Q.shift,meta:Z,super:Q.super}}function t(X,Q){return X.key===Q.key&&X.ctrl===Q.ctrl&&X.shift===Q.shift&&(X.alt||X.meta)===(Q.alt||Q.meta)&&X.super===Q.super}function NQ(X,Q){if(X.length>=Q.chord.length)return!1;for(let V=0;V<X.length;V++){let Z=X[V],Y=Q.chord[V];if(!Z||!Y)return!1;if(!t(Z,Y))return!1}return!0}function SQ(X,Q){if(X.length!==Q.chord.length)return!1;for(let V=0;V<X.length;V++){let Z=X[V],Y=Q.chord[V];if(!Z||!Y)return!1;if(!t(Z,Y))return!1}return!0}function e(X,Q,V,Z,Y){if(Q.escape&&Y!==null)return{type:"chord_cancelled"};let J=zQ(X,Q);if(!J){if(Y!==null)return{type:"chord_cancelled"};return{type:"none"}}let G=Y?[...Y,J]:[J],q=new Set(V),I=Z.filter((U)=>q.has(U.context)),F=new Map;for(let U of I)if(U.chord.length>G.length&&NQ(G,U))F.set(b(U.chord),U.action);let B=!1;for(let U of F.values())if(U!==null){B=!0;break}if(B)return{type:"chord_started",pending:G};let H;for(let U of I)if(SQ(G,U))H=U;if(H){if(H.action===null)return{type:"unbound"};return{type:"match",action:H.action}}if(Y!==null)return{type:"chord_cancelled"};return{type:"none"}}var QQ=P(()=>{s();i()});function $Q(X){let Q=x.c(24),{bindings:V,pendingChordRef:Z,pendingChord:Y,setPendingChord:J,activeContexts:G,registerActiveContext:q,unregisterActiveContext:I,handlerRegistryRef:F,children:B}=X,H;if(Q[0]!==V)H=(L,O)=>n(L,O,V),Q[0]=V,Q[1]=H;else H=Q[1];let U=H,_;if(Q[2]!==F)_=(L)=>{let O=F.current;if(!O)return _Q;if(!O.has(L.action))O.set(L.action,new Set);return O.get(L.action).add(L),()=>{let D=O.get(L.action);if(D){if(D.delete(L),D.size===0)O.delete(L.action)}}},Q[2]=F,Q[3]=_;else _=Q[3];let v=_,A;if(Q[4]!==G||Q[5]!==F)A=(L)=>{let O=F.current;if(!O)return!1;let D=O.get(L);if(!D||D.size===0)return!1;for(let g of D)if(G.has(g.context))return g.handler(),!0;return!1},Q[4]=G,Q[5]=F,Q[6]=A;else A=Q[6];let R=A,z;if(Q[7]!==V||Q[8]!==Z)z=(L,O,D)=>e(L,O,D,V,Z.current),Q[7]=V,Q[8]=Z,Q[9]=z;else z=Q[9];let w;if(Q[10]!==G||Q[11]!==V||Q[12]!==U||Q[13]!==R||Q[14]!==Y||Q[15]!==q||Q[16]!==v||Q[17]!==J||Q[18]!==z||Q[19]!==I)w={resolve:z,setPendingChord:J,getDisplayText:U,bindings:V,pendingChord:Y,activeContexts:G,registerActiveContext:q,unregisterActiveContext:I,registerHandler:v,invokeAction:R},Q[10]=G,Q[11]=V,Q[12]=U,Q[13]=R,Q[14]=Y,Q[15]=q,Q[16]=v,Q[17]=J,Q[18]=z,Q[19]=I,Q[20]=w;else w=Q[20];let N=w,E;if(Q[21]!==B||Q[22]!==N)E=S(VQ.Provider,{value:N,children:B}),Q[21]=B,Q[22]=N,Q[23]=E;else E=Q[23];return E}function _Q(){}function C(){return T.useContext(VQ)}function pQ(X,Q){let V=x.c(5),Z=Q===void 0?!0:Q,Y=C(),J,G;if(V[0]!==X||V[1]!==Z||V[2]!==Y)J=()=>{if(!Y||!Z)return;return Y.registerActiveContext(X),()=>{Y.unregisterActiveContext(X)}},G=[X,Y,Z],V[0]=X,V[1]=Z,V[2]=Y,V[3]=J,V[4]=G;else J=V[3],G=V[4];T.useLayoutEffect(J,G)}var x,T,VQ;var XQ=P(()=>{QQ();j();x=W(m(),1),T=W(f(),1),VQ=T.createContext(null)});function lQ(X,Q,V={}){let{context:Z="Global",isActive:Y=!0}=V,J=C();M.useEffect(()=>{if(!J||!Y)return;return J.registerHandler({action:X,context:Z,handler:Q})},[X,Z,Q,J,Y]);let G=M.useCallback((q,I,F)=>{if(!J)return;let B=[...J.activeContexts,Z,"Global"],H=[...new Set(B)],U=J.resolve(q,I,H);switch(U.type){case"match":if(J.setPendingChord(null),U.action===X){if(Q()!==!1)F.stopImmediatePropagation()}break;case"chord_started":J.setPendingChord(U.pending),F.stopImmediatePropagation();break;case"chord_cancelled":J.setPendingChord(null);break;case"unbound":J.setPendingChord(null),F.stopImmediatePropagation();break;case"none":break}},[X,Z,Q,J]);h(G,{isActive:Y})}function gQ(X,Q={}){let{context:V="Global",isActive:Z=!0}=Q,Y=C();M.useEffect(()=>{if(!Y||!Z)return;let G=[];for(let[q,I]of Object.entries(X))G.push(Y.registerHandler({action:q,context:V,handler:I}));return()=>{for(let q of G)q()}},[V,X,Y,Z]);let J=M.useCallback((G,q,I)=>{if(!Y)return;let F=[...Y.activeContexts,V,"Global"],B=[...new Set(F)],H=Y.resolve(G,q,B);switch(H.type){case"match":if(Y.setPendingChord(null),H.action in X){let U=X[H.action];if(U&&U()!==!1)I.stopImmediatePropagation()}break;case"chord_started":Y.setPendingChord(H.pending),I.stopImmediatePropagation();break;case"chord_cancelled":Y.setPendingChord(null);break;case"unbound":Y.setPendingChord(null),I.stopImmediatePropagation();break;case"none":break}},[V,X,Y]);h(J,{isActive:Z})}var M;var DQ=P(()=>{y();XQ();M=W(f(),1)});function ZQ(){return K.useContext(l)!==null}function cQ(X){let Q=YQ.c(3),V=K.useContext(l),Z;if(Q[0]!==V||Q[1]!==X)Z=V?{rows:V.rows,columns:V.columns}:X,Q[0]=V,Q[1]=X,Q[2]=Z;else Z=Q[2];return Z}function dQ(){return K.useContext(l)?.scrollRef??null}var YQ,K,l;var JQ=P(()=>{YQ=W(m(),1),K=W(f(),1),l=K.createContext(null)});function HQ(X){let Q=qQ.c(21),{width:V,color:Z,char:Y,padding:J,title:G}=X,q=Y===void 0?"─":Y,I=J===void 0?0:J,{columns:F}=d(),B=Math.max(0,(V??F)-I);if(G){let v=GQ(G)+2,A=Math.max(0,B-v),R=Math.floor(A/2),z=A-R,w=!Z,N;if(Q[0]!==q||Q[1]!==R)N=q.repeat(R),Q[0]=q,Q[1]=R,Q[2]=N;else N=Q[2];let E;if(Q[3]!==G)E=S(u,{dimColor:!0,children:S(UQ,{children:G})}),Q[3]=G,Q[4]=E;else E=Q[4];let L;if(Q[5]!==q||Q[6]!==z)L=q.repeat(z),Q[5]=q,Q[6]=z,Q[7]=L;else L=Q[7];let O;if(Q[8]!==Z||Q[9]!==w||Q[10]!==N||Q[11]!==E||Q[12]!==L)O=$(u,{color:Z,dimColor:w,children:[N," ",E," ",L]}),Q[8]=Z,Q[9]=w,Q[10]=N,Q[11]=E,Q[12]=L,Q[13]=O;else O=Q[13];return O}let H=!Z,U;if(Q[14]!==q||Q[15]!==B)U=q.repeat(B),Q[14]=q,Q[15]=B,Q[16]=U;else U=Q[16];let _;if(Q[17]!==Z||Q[18]!==H||Q[19]!==U)_=S(u,{color:Z,dimColor:H,children:U}),Q[17]=Z,Q[18]=H,Q[19]=U,Q[20]=_;else _=Q[20];return _}var qQ;var LQ=P(()=>{a();PQ();y();j();qQ=W(m(),1)});function VV(X){let Q=OQ.c(9),{children:V,color:Z}=X;if(ZQ()){let q;if(Q[0]!==V)q=S(p,{flexDirection:"column",paddingX:1,flexShrink:0,children:V}),Q[0]=V,Q[1]=q;else q=Q[1];return q}let Y;if(Q[2]!==Z)Y=S(HQ,{color:Z}),Q[2]=Z,Q[3]=Y;else Y=Q[3];let J;if(Q[4]!==V)J=S(p,{flexDirection:"column",paddingX:2,children:V}),Q[4]=V,Q[5]=J;else J=Q[5];let G;if(Q[6]!==Y||Q[7]!==J)G=$(p,{flexDirection:"column",paddingTop:1,children:[Y,J]}),Q[6]=Y,Q[7]=J,Q[8]=G;else G=Q[8];return G}var OQ;var RQ=P(()=>{JQ();y();LQ();j();OQ=W(m(),1)});
|
|
2
|
+
export{d as zU,a as AU,r as BU,IQ as CU,b as DU,jQ as EU,i as FU,n as GU,e as HU,QQ as IU,$Q as JU,C as KU,pQ as LU,XQ as MU,lQ as NU,gQ as OU,DQ as PU,l as QU,ZQ as RU,cQ as SU,dQ as TU,JQ as UU,HQ as VU,LQ as WU,VV as XU,RQ as YU};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{B3 as WB,j3 as Z,m3 as T,s3 as f}from"./cli-0.5.7-8ychjqct.mjs";import{Haa as A,O6 as w,P6 as JB,Saa as v,_aa as QB,x9 as _,y9 as KB}from"./cli-0.5.7-469r2a5r.mjs";import{Zda as O,_da as BB}from"./cli-0.5.7-sjx0wm99.mjs";import{cga as F,mga as e}from"./cli-0.5.7-tqn2ged5.mjs";import{Gha as I,Hha as c,Oga as M,Pga as m,aha as S,bha as s,ima as a,ria as R}from"./cli-0.5.7-hp25yk8y.mjs";import{Hma as q,Ima as t}from"./cli-0.5.7-m4wwfa6q.mjs";import{Zma as K}from"./cli-0.5.7-258ytmbr.mjs";function p(B,J){return B+b(h()*(J-B+1))}var b,h,D;var G=K(()=>{b=Math.floor,h=Math.random;D=p});function u(B){var J=B.length;return J?B[D(0,J-1)]:void 0}var Y;var H=K(()=>{G();Y=u});function l(B,J){return M(J,function(X){return B[X]})}var z;var P=K(()=>{m();z=l});function i(B){return B==null?[]:z(B,I(B))}var U;var C=K(()=>{P();c();U=i});function n(B){return Y(U(B))}var k;var E=K(()=>{H();C();k=n});function o(B){var J=S(B)?Y:k;return J(B)}var kB;var r=K(()=>{H();E();s();kB=o});async function vB(){if(W===null&&!Q)Q=YB(),W=await Q,Q=null,d.cache.clear?.()}function TB(){W=null,Q=null,d.cache.clear?.(),g.cache.clear?.()}function XB(){if(W!==null)return W;let B=Z();if(B?.emailAddress)return B.emailAddress;return}async function YB(){let B=Z();if(B?.emailAddress)return B.emailAddress;return g()}var W=null,Q=null,d,g;var ZB=K(()=>{JB();t();a();WB();QB();BB();KB();e();d=q((B)=>{let J=v(),X=A(),$,N,L;if(B){if($=T()??void 0,N=f()??void 0,$&&X.claudeCodeFirstTokenDate){let x=new Date(X.claudeCodeFirstTokenDate).getTime();if(!isNaN(x))L=x}}let V=Z(),j=V?.organizationUuid,y=V?.accountUuid;return{deviceId:J,sessionId:R(),email:XB(),appVersion:"99.0.0",platform:_(),organizationUuid:j,accountUuid:y,userType:void 0,subscriptionType:$,rateLimitTier:N,firstTokenTime:L,...F(process.env.GITHUB_ACTIONS)&&{githubActionsMetadata:{actor:process.env.GITHUB_ACTOR,actorId:process.env.GITHUB_ACTOR_ID,repository:process.env.GITHUB_REPOSITORY,repositoryId:process.env.GITHUB_REPOSITORY_ID,repositoryOwner:process.env.GITHUB_REPOSITORY_OWNER,repositoryOwnerId:process.env.GITHUB_REPOSITORY_OWNER_ID}}}});g=q(async()=>{let B=await w("git config --get user.email",{shell:!0,reject:!1,cwd:O()});return B.exitCode===0&&B.stdout?B.stdout.trim():void 0})});
|
|
2
|
+
export{kB as lQ,r as mQ,vB as nQ,TB as oQ,g as pQ,ZB as qQ};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{F as A0,P as l0}from"./cli-0.5.7-q0pq4367.mjs";import{_ as a0}from"./cli-0.5.7-bnapjxz4.mjs";import{ub as u0}from"./cli-0.5.7-3jrq7w6x.mjs";import{Wb as F0,Xb as v0}from"./cli-0.5.7-6gkpb0vw.mjs";import{qd as E0,sd as Qf}from"./cli-0.5.7-w024nwsf.mjs";import{vd as d,wd as Mf}from"./cli-0.5.7-qdcp748z.mjs";import{qh as B0,rh as Ff}from"./cli-0.5.7-hhre0h51.mjs";import{$h as p,$l as _0,Bk as G0,CC as y0,FD as I0,GC as qf,GD as j0,HD as s,JD as $0,Lk as D0,Nk as N0,OD as w,PD as U0,QD as K0,Qk as Rf,RD as Vf,TI as q0,Tk as k0,Ut as P,Vk as Uf,Xl as a,Yl as S0,Yt as R0,Zl as f0,_l as p0,am as d0,bJ as n0,bi as P0,di as cf,dm as k,em as n,pJ as V0,qE as b0,rE as Jf,rJ as s0}from"./cli-0.5.7-q2e6xpch.mjs";import{KW as e,MW as D,QW as j,fW as w0,jW as Lf,pX as v,rV as u}from"./cli-0.5.7-x1w96j6d.mjs";import{OY as o,PY as F,QY as H,RY as Z}from"./cli-0.5.7-vgc7nzef.mjs";import{JZ as O0,NZ as _f,p0 as m0,q0 as If}from"./cli-0.5.7-8ychjqct.mjs";import{Eaa as i,G$ as W,Haa as x,Jaa as T0,K$ as m,N$ as H0,P$ as W0,T$ as l,_aa as M0,kca as C0,nca as ff,yaa as z0}from"./cli-0.5.7-469r2a5r.mjs";import{Ida as Y0,Qda as Z0,Wda as o0}from"./cli-0.5.7-35yf0b84.mjs";import{Nea as z,Pea as A}from"./cli-0.5.7-26pwg6gg.mjs";import{Sfa as t0}from"./cli-0.5.7-twqt7rxq.mjs";import{cga as S,jga as h0,mga as e0}from"./cli-0.5.7-tqn2ged5.mjs";import{_ia as Q0,bla as X0,ima as r0}from"./cli-0.5.7-hp25yk8y.mjs";import{Vma as E,_ma as h}from"./cli-0.5.7-258ytmbr.mjs";A();cf();r0();import{appendFileSync as Xf}from"fs";Uf();Lf();U0();o0();ff();qf();A();l();$0();n();var t=E(u(),1);v();Z();var g=E(u(),1);function N(){let _=g.c(1),f;if(_[0]===Symbol.for("react.memo_cache_sentinel"))f=H(D,{children:["MCP servers may execute code or access system resources. All tool calls require approval. Learn more in the"," ",F(j,{url:"https://code.claude.com/docs/en/mcp",children:"MCP documentation"}),"."]}),_[0]=f;else f=_[0];return f}Z();function r(_){let f=t.c(13),{serverName:I,onDone:L}=_,V;if(f[0]!==L||f[1]!==I)V=function(Y){z("tengu_mcp_dialog_choice",{choice:Y});f:switch(Y){case"yes":case"yes_all":{let C=(m()||{}).enabledMcpjsonServers||[];if(!C.includes(I))W("localSettings",{enabledMcpjsonServers:[...C,I]});if(Y==="yes_all")W("localSettings",{enableAllProjectMcpServers:!0});L();break f}case"no":{let C=(m()||{}).disabledMcpjsonServers||[];if(!C.includes(I))W("localSettings",{disabledMcpjsonServers:[...C,I]});L()}}},f[0]=L,f[1]=I,f[2]=V;else V=f[2];let U=V,M=`New MCP server found in .mcp.json: ${I}`,q;if(f[3]!==U)q=()=>U("no"),f[3]=U,f[4]=q;else q=f[4];let c;if(f[5]===Symbol.for("react.memo_cache_sentinel"))c=F(N,{}),f[5]=c;else c=f[5];let R;if(f[6]===Symbol.for("react.memo_cache_sentinel"))R=[{label:"Use this and all future MCP servers in this project",value:"yes_all"},{label:"Use this MCP server",value:"yes"},{label:"Continue without using this MCP server",value:"no"}],f[6]=R;else R=f[6];let J;if(f[7]!==U)J=F(s,{options:R,onChange:(X)=>U(X),onCancel:()=>U("no")}),f[7]=U,f[8]=J;else J=f[8];let Q;if(f[9]!==M||f[10]!==q||f[11]!==J)Q=H(k,{title:M,color:"warning",onCancel:q,children:[c,J]}),f[9]=M,f[10]=q,f[11]=J,f[12]=Q;else Q=f[12];return Q}v0();A();v();l();p0();j0();d0();n();S0();var c0=E(u(),1);Z();function L0(_){let f=c0.c(21),{serverNames:I,onDone:L}=_,V;if(f[0]!==L||f[1]!==I)V=function(y){let G=m()||{},i0=G.enabledMcpjsonServers||[],x0=G.disabledMcpjsonServers||[],[K,b]=F0(I,(B)=>y.includes(B));if(z("tengu_mcp_multidialog_choice",{approved:K.length,rejected:b.length}),K.length>0){let B=[...new Set([...i0,...K])];W("localSettings",{enabledMcpjsonServers:B})}if(b.length>0){let B=[...new Set([...x0,...b])];W("localSettings",{disabledMcpjsonServers:B})}L()},f[0]=L,f[1]=I,f[2]=V;else V=f[2];let U=V,M;if(f[3]!==L||f[4]!==I)M=()=>{let y=(m()||{}).disabledMcpjsonServers||[],G=[...new Set([...y,...I])];W("localSettings",{disabledMcpjsonServers:G}),L()},f[3]=L,f[4]=I,f[5]=M;else M=f[5];let q=M,c=`${I.length} new MCP servers found in .mcp.json`,R;if(f[6]===Symbol.for("react.memo_cache_sentinel"))R=F(N,{}),f[6]=R;else R=f[6];let J;if(f[7]!==I)J=I.map(g0),f[7]=I,f[8]=J;else J=f[8];let Q;if(f[9]!==q||f[10]!==U||f[11]!==I||f[12]!==J)Q=F(I0,{options:J,defaultValue:I,onSubmit:U,onCancel:q,hideIndexes:!0}),f[9]=q,f[10]=U,f[11]=I,f[12]=J,f[13]=Q;else Q=f[13];let X;if(f[14]!==q||f[15]!==c||f[16]!==Q)X=H(k,{title:c,subtitle:"Select any you wish to enable.",color:"warning",onCancel:q,hideInputGuide:!0,children:[R,Q]}),f[14]=q,f[15]=c,f[16]=Q,f[17]=X;else X=f[17];let Y;if(f[18]===Symbol.for("react.memo_cache_sentinel"))Y=F(e,{paddingX:1,children:F(D,{dimColor:!0,italic:!0,children:H(_0,{children:[F(a,{shortcut:"Space",action:"select"}),F(a,{shortcut:"Enter",action:"confirm"}),F(f0,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"reject all"})]})})}),f[18]=Y;else Y=f[18];let O;if(f[19]!==X)O=H(o,{children:[X,Y]}),f[19]=X,f[20]=O;else O=f[20];return O}function g0(_){return{label:_,value:_}}U0();R0();n0();s0();Z();async function J0(_){let{servers:f}=q0("project"),I=Object.keys(f).filter((L)=>V0(L)==="pending");if(I.length===0)return;await new Promise((L)=>{let V=()=>void L();if(I.length===1&&I[0]!==void 0){let U=I[0];_.render(F(P,{children:F(w,{children:F(r,{serverName:U,onDone:V})})}))}else _.render(F(P,{children:F(w,{children:F(L0,{serverNames:I,onDone:V})})}))})}R0();Mf();If();Rf();M0();Qf();M0();t0();e0();class ${frameDurations=[];firstRenderTime;lastRenderTime;record(_){let f=performance.now();if(this.firstRenderTime===void 0)this.firstRenderTime=f;this.lastRenderTime=f,this.frameDurations.push(_)}getMetrics(){if(this.frameDurations.length===0||this.firstRenderTime===void 0||this.lastRenderTime===void 0)return;let _=this.lastRenderTime-this.firstRenderTime;if(_<=0)return;let I=this.frameDurations.length/(_/1000),L=this.frameDurations.slice().sort((q,c)=>c-q),V=Math.max(0,Math.ceil(L.length*0.01)-1),U=L[V],M=U>0?1000/U:0;return{averageFps:Math.round(I*100)/100,low1PctFps:Math.round(M*100)/100}}}Ff();_f();Vf();Jf();l();Z();function Yf(){i((_)=>({..._,hasCompletedOnboarding:!0,lastOnboardingVersion:"99.0.0"}))}function Zf(_,f){return new Promise((I)=>{let L=(V)=>void I(V);_.render(f(L))})}async function b1(_,f,I){return hf(_,f,{color:"error",beforeExit:I})}async function hf(_,f,I){let{Text:L}=await import("./ink-0.5.7-dwmx157s.mjs"),V=I?.color,U=I?.exitCode??1;_.render(V?F(L,{color:V,children:f}):F(L,{children:f})),_.unmount(),await I?.beforeExit?.(),process.exit(U)}function T(_,f,I){return Zf(_,(L)=>F(P,{onChangeAppState:I?.onChangeAppState,children:F(w,{children:f(L)})}))}async function E1(_,f){_.render(f),l0(),await _.waitUntilExit(),await P0(0)}async function u1(_,f,I,L,V){if(S(!1)||process.env.IS_DEMO)return!1;let U=O0(),M=!1;if(E0()){let{MigrationDialog:c}=await import("./MigrationDialog-0.5.7-nkkcryn5.mjs");await T(_,(R)=>F(c,{onDone:()=>void R()}))}let q=x();if(U&&(!q.theme||!q.hasCompletedOnboarding)){M=!0;let{Onboarding:c}=await import("./Onboarding-0.5.7-v3jtvbkn.mjs");await T(_,(R)=>F(c,{onDone:()=>{Yf(),R()}}),{onChangeAppState:d})}if(!S(process.env.CLAUBBIT)){if(U&&!z0()){let{TrustDialog:c}=await import("./TrustDialog-0.5.7-r4dhznyf.mjs");await T(_,(R)=>F(c,{commands:L,onDone:R}))}if(X0(!0),Z0(),Y0(),k0(),U){let{errors:c}=b0();if(c.length===0)await J0(_);if(await N0()){let R=D0(await G0(!0)),{ClaudeMdExternalIncludesDialog:J}=await import("./ClaudeMdExternalIncludesDialog-0.5.7-8p2b9258.mjs");await T(_,(Q)=>F(J,{onDone:Q,isStandaloneDialog:!0,externalIncludes:R}))}}}if(a0(),B0(),setImmediate(()=>A0()),await y0()){let{GroveDialog:c}=await import("./Grove-0.5.7-7xphv8qp.mjs");if(await T(_,(J)=>F(c,{showIfAlreadyViewed:!1,location:M?"onboarding":"policy_update_modal",onDone:J}))==="escape")return z("tengu_grove_policy_exited",{}),p(0),!1}{let c=C0(),R=c?.transport==="anthropic"?c.apiKey?.trim():void 0;if(R&&!h0()){let J=m0(R);if(T0(J)==="new"){let{ApproveApiKey:X}=await import("./ApproveApiKey-0.5.7-djmd358f.mjs");await T(_,(Y)=>F(X,{customApiKeyTruncated:J,onDone:Y}),{onChangeAppState:d})}}}if((f==="bypassPermissions"||I)&&!H0()){let{BypassPermissionsModeDialog:c}=await import("./BypassPermissionsModeDialog-0.5.7-m2n3zekg.mjs");await T(_,(R)=>F(c,{onAccept:R}))}if(f==="auto"&&!W0()){let{AutoModeOptInDialog:c}=await import("./AutoModeOptInDialog-0.5.7-dgpfkf7n.mjs");await T(_,(R)=>F(c,{onAccept:R,onDecline:()=>p(1),declineExits:!0}))}return M}function A1(_){let f=0,I=K0(_);if(I.stdin)z("tengu_stdin_interactive",{});let L=new $,V=u0();Q0(V);let U=process.env.CLAUDE_CODE_FRAME_TIMING_LOG;return{getFpsMetrics:()=>L.getMetrics(),stats:V,renderOptions:{...I,onFrame:(M)=>{if(L.record(M.durationMs),V.observe("frame_duration_ms",M.durationMs),U&&M.phases){let q=JSON.stringify({total:M.durationMs,...M.phases,rss:process.memoryUsage.rss(),cpu:process.cpuUsage()})+`
|
|
2
|
+
`;Xf(U,q)}if(w0())return;for(let q of M.flickers){if(q.reason==="resize")continue;let c=Date.now();if(c-f<1000)z("tengu_flicker",{desiredHeight:q.desiredHeight,actualHeight:q.availableHeight,reason:q.reason});f=c}}}}}
|
|
3
|
+
export{Yf as s,Zf as t,b1 as u,hf as v,T as w,E1 as x,u1 as y,A1 as z};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{IW as X,OW as JT,PW as ST,pX as IT}from"./cli-0.5.7-x1w96j6d.mjs";import{X3 as K,Y3 as UT}from"./cli-0.5.7-xn6deh04.mjs";import{B6 as H,Eaa as z,Haa as V,J6 as o,M8 as s,Maa as l,Naa as d,O7 as BT,P7 as VT,R6 as Y,S8 as XT,T6 as n,W8 as FT,Z8 as qT,_8 as _T,_aa as D,gaa as f,iaa as YT,w9 as Q,y9 as OT}from"./cli-0.5.7-469r2a5r.mjs";import{Zda as E,_da as KT}from"./cli-0.5.7-sjx0wm99.mjs";import{Bfa as P,Ffa as QT,sfa as GT,tfa as $T,xfa as zT}from"./cli-0.5.7-twqt7rxq.mjs";import{Lga as u,Nga as LT}from"./cli-0.5.7-skfm51ta.mjs";import{Hma as r,Ima as ZT}from"./cli-0.5.7-m4wwfa6q.mjs";import{Zma as I}from"./cli-0.5.7-258ytmbr.mjs";function m(){let T=f(E(),P().existsSync)!==null,w=s(E());return[{key:"workspace",text:"Ask Claude to create a new app or clone a repository",isComplete:!1,isCompletable:!0,isEnabled:w},{key:"claudemd",text:"Set up repo instructions (/init creates AGENTS.md or updates existing CLAUDE.md; either file counts)",isComplete:T,isCompletable:!0,isEnabled:!w}]}function M(){return m().filter(({isCompletable:T,isEnabled:w})=>T&&w).every(({isComplete:T})=>T)}var k=I(()=>{KT();XT();QT();YT()});function a(){if(l().hasCompletedProjectOnboarding)return;if(M())d((T)=>({...T,hasCompletedProjectOnboarding:!0}))}var fT;var h=I(()=>{ZT();D();k();k();fT=r(()=>{let T=l();if(T.hasCompletedProjectOnboarding||T.projectOnboardingSeenCount>=4||process.env.IS_DEMO)return!1;return!M()})});import{stat as i}from"fs/promises";import{homedir as xT}from"os";import{join as HT}from"path";function RT(T){z((w)=>({...w,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:T}))}function L(){z((T)=>({...T,appleTerminalSetupInProgress:!1}))}function WT(){let T=V();return{inProgress:T.appleTerminalSetupInProgress??!1,backupPath:T.appleTerminalBackupPath||null}}function _(){return HT(xT(),"Library","Preferences","com.apple.Terminal.plist")}async function t(){let T=_(),w=`${T}.bak`;try{let{code:v}=await Y("defaults",["export","com.apple.Terminal",T]);if(v!==0)return null;try{await i(T)}catch{return null}return await Y("defaults",["export","com.apple.Terminal",w]),RT(w),w}catch(v){return H(v),null}}async function e(){let{inProgress:T,backupPath:w}=WT();if(!T)return{status:"no_backup"};if(!w)return L(),{status:"no_backup"};try{await i(w)}catch{return L(),{status:"no_backup"}}try{let{code:v}=await Y("defaults",["import","com.apple.Terminal",w]);if(v!==0)return{status:"failed",backupPath:w};return await Y("killall",["cfprefsd"]),L(),{status:"restored"}}catch(v){return H(Error(`Failed to restore Terminal.app settings with: ${v}`)),L(),{status:"failed",backupPath:w}}}var TT=I(()=>{D();n();o()});import{randomBytes as y}from"crypto";import{copyFile as N,mkdir as c,readFile as p,writeFile as C}from"fs/promises";import{homedir as g,platform as A}from"os";import{dirname as MT,join as R}from"path";import{pathToFileURL as AT}from"url";function jT(){let T=process.env.VSCODE_GIT_ASKPASS_MAIN??"",w=process.env.PATH??"";return T.includes(".vscode-server")||T.includes(".cursor-server")||T.includes(".windsurf-server")||w.includes(".vscode-server")||w.includes(".cursor-server")||w.includes(".windsurf-server")}function Ww(){if(!Q.terminal||!(Q.terminal in j))return null;return j[Q.terminal]??null}function Z(T){if(!JT())return T;return`\x1B]8;;${AT(T).href}\x07${T}\x1B]8;;\x07`}function uT(){return A()==="darwin"&&Q.terminal==="Apple_Terminal"||Q.terminal==="vscode"||Q.terminal==="cursor"||Q.terminal==="windsurf"||Q.terminal==="alacritty"||Q.terminal==="zed"}async function ET(T){let w="";switch(Q.terminal){case"Apple_Terminal":w=await kT(T);break;case"vscode":w=await b("VSCode",T);break;case"cursor":w=await b("Cursor",T);break;case"windsurf":w=await b("Windsurf",T);break;case"alacritty":w=await lT(T);break;case"zed":w=await DT(T);break;case null:break}return z((v)=>{if(["vscode","cursor","windsurf","alacritty","zed"].includes(Q.terminal??"")){if(v.shiftEnterKeyBindingInstalled===!0)return v;return{...v,shiftEnterKeyBindingInstalled:!0}}else if(Q.terminal==="Apple_Terminal"){if(v.optionAsMetaKeyInstalled===!0)return v;return{...v,optionAsMetaKeyInstalled:!0}}return v}),a(),w}function Lw(){return V().shiftEnterKeyBindingInstalled===!0}function zw(){return V().hasUsedBackslashReturn===!0}function Vw(){if(!V().hasUsedBackslashReturn)z((w)=>({...w,hasUsedBackslashReturn:!0}))}async function _w(T,w,v){if(Q.terminal&&Q.terminal in j){let $=`Shift+Enter is natively supported in ${j[Q.terminal]}.
|
|
2
|
+
|
|
3
|
+
No configuration needed. Just use Shift+Enter to add newlines.`;return T($),null}if(!uT()){let $=Q.terminal||"your current terminal",B=BT(),J="";if(B==="macos")J=` • macOS: Apple Terminal
|
|
4
|
+
`;else if(B==="windows")J=` • Windows: Windows Terminal
|
|
5
|
+
`;let F=`Terminal setup cannot be run from ${$}.
|
|
6
|
+
|
|
7
|
+
This command configures a convenient Shift+Enter shortcut for multi-line prompts.
|
|
8
|
+
${K.dim("Note: You can already use backslash (\\\\) + return to add newlines.")}
|
|
9
|
+
|
|
10
|
+
To set up the shortcut (optional):
|
|
11
|
+
1. Exit tmux/screen temporarily
|
|
12
|
+
2. Run /terminal-setup directly in one of these terminals:
|
|
13
|
+
${J} • IDE: VSCode, Cursor, Windsurf, Zed
|
|
14
|
+
• Other: Alacritty
|
|
15
|
+
3. Return to tmux/screen - settings will persist
|
|
16
|
+
|
|
17
|
+
${K.dim("Note: iTerm2, WezTerm, Ghostty, Kitty, and Warp support Shift+Enter natively.")}`;return T(F),null}let q=await ET(w.options.theme);return T(q),null}async function b(T="VSCode",w){if(jT())return`${X("warning",w)(`Cannot install keybindings from a remote ${T} session.`)}${G}${G}${T} keybindings must be installed on your local machine, not the remote server.${G}${G}To install the Shift+Enter keybinding:${G}1. Open ${T} on your local machine (not connected to remote)${G}2. Open the Command Palette (Cmd/Ctrl+Shift+P) → "Preferences: Open Keyboard Shortcuts (JSON)"${G}3. Add this keybinding (the file must be a JSON array):${G}${G}${K.dim(`[
|
|
18
|
+
{
|
|
19
|
+
"key": "shift+enter",
|
|
20
|
+
"command": "workbench.action.terminal.sendSequence",
|
|
21
|
+
"args": { "text": "\\u001b\\r" },
|
|
22
|
+
"when": "terminalFocus"
|
|
23
|
+
}
|
|
24
|
+
]`)}${G}`;let v=T==="VSCode"?"Code":T,q=R(g(),A()==="win32"?R("AppData","Roaming",v,"User"):A()==="darwin"?R("Library","Application Support",v,"User"):R(".config",v,"User")),$=R(q,"keybindings.json");try{await c(q,{recursive:!0});let B="[]",J=[],F=!1;try{B=await p($,{encoding:"utf-8"}),F=!0,J=FT(B)??[]}catch(x){if(!u(x))throw x}if(F){let x=y(4).toString("hex"),S=`${$}.${x}.bak`;try{await N($,S)}catch{return`${X("warning",w)(`Error backing up existing ${T} terminal keybindings. Bailing out.`)}${G}${K.dim(`See ${Z($)}`)}${G}${K.dim(`Backup path: ${Z(S)}`)}${G}`}}if(J.find((x)=>x.key==="shift+enter"&&x.command==="workbench.action.terminal.sendSequence"&&x.when==="terminalFocus"))return`${X("warning",w)(`Found existing ${T} terminal Shift+Enter key binding. Remove it to continue.`)}${G}${K.dim(`See ${Z($)}`)}${G}`;let U=qT(B,{key:"shift+enter",command:"workbench.action.terminal.sendSequence",args:{text:"\x1B\r"},when:"terminalFocus"});return await C($,U,{encoding:"utf-8"}),`${X("success",w)(`Installed ${T} terminal Shift+Enter key binding`)}${G}${K.dim(`See ${Z($)}`)}${G}`}catch(B){throw H(B),Error(`Failed to install ${T} terminal Shift+Enter key binding`)}}async function wT(T){let{code:w}=await Y("/usr/libexec/PlistBuddy",["-c",`Add :'Window Settings':'${T}':useOptionAsMetaKey bool true`,_()]);if(w!==0){let{code:v}=await Y("/usr/libexec/PlistBuddy",["-c",`Set :'Window Settings':'${T}':useOptionAsMetaKey true`,_()]);if(v!==0)return H(Error(`Failed to enable Option as Meta key for Terminal.app profile: ${T}`)),!1}return!0}async function vT(T){let{code:w}=await Y("/usr/libexec/PlistBuddy",["-c",`Add :'Window Settings':'${T}':Bell bool false`,_()]);if(w!==0){let{code:v}=await Y("/usr/libexec/PlistBuddy",["-c",`Set :'Window Settings':'${T}':Bell false`,_()]);if(v!==0)return H(Error(`Failed to disable audio bell for Terminal.app profile: ${T}`)),!1}return!0}async function kT(T){try{if(!await t())throw Error("Failed to create backup of Terminal.app preferences, bailing out");let{stdout:v,code:q}=await Y("defaults",["read","com.apple.Terminal","Default Window Settings"]);if(q!==0||!v.trim())throw Error("Failed to read default Terminal.app profile");let{stdout:$,code:B}=await Y("defaults",["read","com.apple.Terminal","Startup Window Settings"]);if(B!==0||!$.trim())throw Error("Failed to read startup Terminal.app profile");let J=!1,F=v.trim(),W=await wT(F),O=await vT(F);if(W||O)J=!0;let U=$.trim();if(U!==F){let x=await wT(U),S=await vT(U);if(x||S)J=!0}if(!J)throw Error("Failed to enable Option as Meta key or disable audio bell for any Terminal.app profile");return await Y("killall",["cfprefsd"]),L(),`${X("success",T)("Configured Terminal.app settings:")}${G}${X("success",T)('- Enabled "Use Option as Meta key"')}${G}${X("success",T)("- Switched to visual bell")}${G}${K.dim("Option+Enter will now enter a newline.")}${G}${K.dim("You must restart Terminal.app for changes to take effect.",T)}${G}`}catch(w){H(w);let v=await e(),q="Failed to enable Option as Meta key for Terminal.app.";if(v.status==="restored")throw Error(`${q} Your settings have been restored from backup.`);else if(v.status==="failed")throw Error(`${q} Restoring from backup failed, try manually with: defaults import com.apple.Terminal ${v.backupPath}`);else throw Error(`${q} No backup was available to restore from.`)}}async function lT(T){let v=[],q=process.env.XDG_CONFIG_HOME;if(q)v.push(R(q,"alacritty","alacritty.toml"));else v.push(R(g(),".config","alacritty","alacritty.toml"));if(A()==="win32"){let F=process.env.APPDATA;if(F)v.push(R(F,"alacritty","alacritty.toml"))}let $=null,B="",J=!1;for(let F of v)try{B=await p(F,{encoding:"utf-8"}),$=F,J=!0;break}catch(W){if(!u(W))throw W}if(!$)$=v[0]??null;if(!$)throw Error("No valid config path found for Alacritty");try{if(J){if(B.includes('mods = "Shift"')&&B.includes('key = "Return"'))return`${X("warning",T)("Found existing Alacritty Shift+Enter key binding. Remove it to continue.")}${G}${K.dim(`See ${Z($)}`)}${G}`;let W=y(4).toString("hex"),O=`${$}.${W}.bak`;try{await N($,O)}catch{return`${X("warning",T)("Error backing up existing Alacritty config. Bailing out.")}${G}${K.dim(`See ${Z($)}`)}${G}${K.dim(`Backup path: ${Z(O)}`)}${G}`}}else await c(MT($),{recursive:!0});let F=B;if(B&&!B.endsWith(`
|
|
25
|
+
`))F+=`
|
|
26
|
+
`;return F+=`
|
|
27
|
+
[[keyboard.bindings]]
|
|
28
|
+
key = "Return"
|
|
29
|
+
mods = "Shift"
|
|
30
|
+
chars = "\\u001B\\r"
|
|
31
|
+
`,await C($,F,{encoding:"utf-8"}),`${X("success",T)("Installed Alacritty Shift+Enter key binding")}${G}${X("success",T)("You may need to restart Alacritty for changes to take effect")}${G}${K.dim(`See ${Z($)}`)}${G}`}catch(F){throw H(F),Error("Failed to install Alacritty Shift+Enter key binding")}}async function DT(T){let w=R(g(),".config","zed"),v=R(w,"keymap.json");try{await c(w,{recursive:!0});let q="[]",$=!1;try{q=await p(v,{encoding:"utf-8"}),$=!0}catch(J){if(!u(J))throw J}if($){if(q.includes("shift-enter"))return`${X("warning",T)("Found existing Zed Shift+Enter key binding. Remove it to continue.")}${G}${K.dim(`See ${Z(v)}`)}${G}`;let J=y(4).toString("hex"),F=`${v}.${J}.bak`;try{await N(v,F)}catch{return`${X("warning",T)("Error backing up existing Zed keymap. Bailing out.")}${G}${K.dim(`See ${Z(v)}`)}${G}${K.dim(`Backup path: ${Z(F)}`)}${G}`}}let B;try{if(B=$T(q),!Array.isArray(B))B=[]}catch{B=[]}return B.push({context:"Terminal",bindings:{"shift-enter":["terminal::SendText","\x1B\r"]}}),await C(v,GT(B,null,2)+`
|
|
32
|
+
`,{encoding:"utf-8"}),`${X("success",T)("Installed Zed Shift+Enter key binding")}${G}${K.dim(`See ${Z(v)}`)}${G}`}catch(q){throw H(q),Error("Failed to install Zed Shift+Enter key binding")}}var G=`
|
|
33
|
+
`,j;var bT=I(()=>{UT();ST();IT();h();TT();D();OT();LT();n();_T();o();VT();zT();j={ghostty:"Ghostty",kitty:"Kitty","iTerm.app":"iTerm2",WezTerm:"WezTerm",WarpTerminal:"Warp"}});
|
|
34
|
+
export{a as JT,h as KT,e as LT,TT as MT,Ww as NT,uT as OT,ET as PT,Lw as QT,zw as RT,Vw as ST,_w as TT,bT as UT};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{HD as S,ID as qf,Oj as X,Tj as Af,Zz as Z,_z as $f,bi as a,dP as Bf,di as If,dm as c,eP as Hf,ej as m,em as Yf,kF as v,lF as zf,pj as R,sj as N,tj as M,zj as yf}from"./cli-0.5.7-q2e6xpch.mjs";import{lQ as i,mQ as Kf}from"./cli-0.5.7-7hm7dxyp.mjs";import{KW as T,MW as d,pX as _f,rV as Jf}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as Y,QY as D,RY as P}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as Of}from"./cli-0.5.7-8sbq2qed.mjs";import{R6 as b,T6 as ff}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as L,Pea as Gf}from"./cli-0.5.7-26pwg6gg.mjs";import{Pfa as W,Sfa as e}from"./cli-0.5.7-twqt7rxq.mjs";import{Vma as g,Wma as s,Zma as k}from"./cli-0.5.7-258ytmbr.mjs";function E(){(Hf(),s(Bf)).saveWorktreeState(null)}function l({onDone:K,onCancel:_}){let[$,y]=q.useState("loading"),[O,I]=q.useState([]),[G,z]=q.useState(0),[p,A]=q.useState(),f=m();if(q.useEffect(()=>{async function B(){let J=[],H=await b("git",["status","--porcelain"]);if(H.stdout)J=H.stdout.split(`
|
|
2
|
+
`).filter((V)=>V.trim()!==""),I(J);if(f){let{stdout:V}=await b("git",["rev-list","--count",`${f.originalHeadCommit}..HEAD`]),w=parseInt(V.trim())||0;if(z(w),J.length===0&&w===0){y("removing"),M().then(()=>{process.chdir(f.originalCwd),Z(f.originalCwd),E(),X.cache.clear?.(),A("Worktree removed (no changes)")}).catch((t)=>{W(`Failed to clean up worktree: ${t}`,{level:"error"}),A("Worktree cleanup failed, exiting anyway")}).then(()=>{y("done")});return}else y("asking")}}B()},[f]),q.useEffect(()=>{if($==="done")K(p)},[$,K,p]),!f)return K("No active worktree session found",{display:"system"}),null;if($==="loading"||$==="done")return null;async function j(B){if(!f)return;let J=Boolean(f.tmuxSessionName);if(B==="keep"||B==="keep-with-tmux"){if(y("keeping"),L("tengu_worktree_kept",{commits:G,changed_files:O.length}),await N(),process.chdir(f.originalCwd),Z(f.originalCwd),E(),X.cache.clear?.(),J)A(`Worktree kept. Your work is saved at ${f.worktreePath} on branch ${f.worktreeBranch}. Reattach to tmux session with: tmux attach -t ${f.tmuxSessionName}`);else A(`Worktree kept. Your work is saved at ${f.worktreePath} on branch ${f.worktreeBranch}`);y("done")}else if(B==="keep-kill-tmux"){if(y("keeping"),L("tengu_worktree_kept",{commits:G,changed_files:O.length}),f.tmuxSessionName)await R(f.tmuxSessionName);await N(),process.chdir(f.originalCwd),Z(f.originalCwd),E(),X.cache.clear?.(),A(`Worktree kept at ${f.worktreePath} on branch ${f.worktreeBranch}. Tmux session terminated.`),y("done")}else if(B==="remove"||B==="remove-with-tmux"){if(y("removing"),L("tengu_worktree_removed",{commits:G,changed_files:O.length}),f.tmuxSessionName)await R(f.tmuxSessionName);try{await M(),process.chdir(f.originalCwd),Z(f.originalCwd),E(),X.cache.clear?.()}catch(V){W(`Failed to clean up worktree: ${V}`,{level:"error"}),A("Worktree cleanup failed, exiting anyway"),y("done");return}let H=J?" Tmux session terminated.":"";if(G>0&&O.length>0)A(`Worktree removed. ${G} ${G===1?"commit":"commits"} and uncommitted changes were discarded.${H}`);else if(G>0)A(`Worktree removed. ${G} ${G===1?"commit":"commits"} on ${f.worktreeBranch} ${G===1?"was":"were"} discarded.${H}`);else if(O.length>0)A(`Worktree removed. Uncommitted changes were discarded.${H}`);else A(`Worktree removed.${H}`);y("done")}}if($==="keeping")return D(T,{flexDirection:"row",marginY:1,children:[Y(v,{}),Y(d,{children:"Keeping worktree…"})]});if($==="removing")return D(T,{flexDirection:"row",marginY:1,children:[Y(v,{}),Y(d,{children:"Removing worktree…"})]});let x=f.worktreeBranch,U=O.length>0,F=G>0,Q="";if(U&&F)Q=`You have ${O.length} uncommitted ${O.length===1?"file":"files"} and ${G} ${G===1?"commit":"commits"} on ${x}. All will be lost if you remove.`;else if(U)Q=`You have ${O.length} uncommitted ${O.length===1?"file":"files"}. These will be lost if you remove the worktree.`;else if(F)Q=`You have ${G} ${G===1?"commit":"commits"} on ${x}. The branch will be deleted if you remove the worktree.`;else Q="You are working in a worktree. Keep it to continue working there, or remove it to clean up.";function r(){if(_){_();return}j("keep")}let h=U||F?"All changes and commits will be lost.":"Clean up the worktree directory.",C=Boolean(f.tmuxSessionName),o=C?[{label:"Keep worktree and tmux session",value:"keep-with-tmux",description:`Stays at ${f.worktreePath}. Reattach with: tmux attach -t ${f.tmuxSessionName}`},{label:"Keep worktree, kill tmux session",value:"keep-kill-tmux",description:`Keeps worktree at ${f.worktreePath}, terminates tmux session.`},{label:"Remove worktree and tmux session",value:"remove-with-tmux",description:h}]:[{label:"Keep worktree",value:"keep",description:`Stays at ${f.worktreePath}`},{label:"Remove worktree",value:"remove",description:h}];return Y(c,{title:"Exiting worktree session",subtitle:Q,onCancel:r,children:Y(S,{defaultFocusValue:C?"keep-with-tmux":"keep",options:o,onChange:j})})}var q;var u=k(()=>{Gf();e();_f();ff();Af();$f();yf();qf();Yf();zf();P();q=g(Of(),1)});function Vf(){return i(Qf)??"Goodbye!"}function xf(K){let _=n.c(5),{showWorktree:$,onDone:y,onCancel:O}=K,I;if(_[0]!==y)I=async function(p){y(p??Vf()),await a(0,"prompt_input_exit")},_[0]=y,_[1]=I;else I=_[1];let G=I;if($){let z;if(_[2]!==O||_[3]!==G)z=Y(l,{onDone:G,onCancel:O}),_[2]=O,_[3]=G,_[4]=z;else z=_[4];return z}return null}var n,Qf;var Xf=k(()=>{Kf();If();u();P();n=g(Jf(),1),Qf=["Goodbye!","See ya!","Bye!","Catch you later!"]});
|
|
3
|
+
export{xf as Ab,Xf as Bb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Rg as e,Ug as fq}from"./cli-0.5.7-y3pa8ttm.mjs";import{Vg as t,Xg as Hq}from"./cli-0.5.7-eyemfxtz.mjs";import{$K as Oq,$l as $,HD as n,ID as Mq,Xl as S,Yl as Nq,ZK as o,Zl as g,_K as s,_l as Vq,am as Wq,dm as i,em as Yq,xD as r,yD as kq}from"./cli-0.5.7-q2e6xpch.mjs";import{NU as u,PU as Zq}from"./cli-0.5.7-7a9gq9ff.mjs";import{KW as M,MW as F,cX as c,dX as Uq,pX as Xq,rV as Qq}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as L,QY as R,RY as l}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as Lq}from"./cli-0.5.7-8sbq2qed.mjs";import{K6 as d,L6 as Jq}from"./cli-0.5.7-469r2a5r.mjs";import{Vma as a,Zma as Gq}from"./cli-0.5.7-258ytmbr.mjs";function qq(){let Z=T.c(1),q;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))q=L(F,{dimColor:!0,children:"Claude Code will be able to read files in this directory and make edits when auto-accept edits is on."}),Z[0]=q;else q=Z[0];return q}function wq(Z){let q=T.c(5),{path:X}=Z,Q;if(q[0]!==X)Q=L(F,{color:"permission",children:X}),q[0]=X,q[1]=Q;else Q=q[1];let N;if(q[2]===Symbol.for("react.memo_cache_sentinel"))N=L(qq,{}),q[2]=N;else N=q[2];let J;if(q[3]!==Q)J=R(M,{flexDirection:"column",paddingX:2,gap:1,children:[Q,N]}),q[3]=Q,q[4]=J;else J=q[4];return J}function Kq(Z){let q=T.c(14),{value:X,onChange:Q,onSubmit:N,error:J,suggestions:V,selectedSuggestion:w}=Z,k;if(q[0]===Symbol.for("react.memo_cache_sentinel"))k=L(F,{children:"Enter the path to the directory:"}),q[0]=k;else k=q[0];let Y;if(q[1]!==Q||q[2]!==N||q[3]!==X)Y=L(M,{borderDimColor:!0,borderStyle:"round",marginY:1,paddingLeft:1,children:L(r,{showCursor:!0,placeholder:`Directory path${d.ellipsis}`,value:X,onChange:Q,onSubmit:N,columns:80,cursorOffset:X.length,onChangeCursorOffset:Aq})}),q[1]=Q,q[2]=N,q[3]=X,q[4]=Y;else Y=q[4];let W;if(q[5]!==w||q[6]!==V)W=V.length>0&&L(M,{marginBottom:1,children:L(t,{suggestions:V,selectedSuggestion:w})}),q[5]=w,q[6]=V,q[7]=W;else W=q[7];let U;if(q[8]!==J)U=J&&L(F,{color:"error",children:J}),q[8]=J,q[9]=U;else U=q[9];let O;if(q[10]!==Y||q[11]!==W||q[12]!==U)O=R(M,{flexDirection:"column",children:[k,Y,W,U]}),q[10]=Y,q[11]=W,q[12]=U,q[13]=O;else O=q[13];return O}function Aq(){}function lq(Z){let q=T.c(34),{onAddDirectory:X,onCancel:Q,permissionContext:N,directoryPath:J}=Z,[V,w]=H.useState(""),[k,Y]=H.useState(null),W;if(q[0]===Symbol.for("react.memo_cache_sentinel"))W=[],q[0]=W;else W=q[0];let[U,O]=H.useState(W),[f,B]=H.useState(0),v;if(q[1]===Symbol.for("react.memo_cache_sentinel"))v=async(z)=>{if(!z){O([]),B(0);return}let G=await e(z);O(G),B(0)},q[1]=v;else v=q[1];let I=c(v,100),C,P;if(q[2]!==I||q[3]!==V)C=()=>{I(V)},P=[V,I],q[2]=I,q[3]=V,q[4]=C,q[5]=P;else C=q[4],P=q[5];H.useEffect(C,P);let m;if(q[6]===Symbol.for("react.memo_cache_sentinel"))m=(z)=>{let G=z.id+"/";w(G),Y(null)},q[6]=m;else m=q[6];let zq=m,_;if(q[7]!==X||q[8]!==N)_=async(z)=>{let G=await o(z,N);if(G.resultType==="success")X(G.absolutePath,!1);else Y(s(G))},q[7]=X,q[8]=N,q[9]=_;else _=q[9];let K=_,D;if(q[10]===Symbol.for("react.memo_cache_sentinel"))D={context:"Settings"},q[10]=D;else D=q[10];u("confirm:no",Q,D);let b;if(q[11]!==K||q[12]!==f||q[13]!==U)b=(z)=>{if(U.length>0){if(z.key==="tab"){z.preventDefault();let G=U[f];if(G)zq(G);return}if(z.key==="return"){z.preventDefault();let G=U[f];if(G)K(G.id+"/");return}if(z.key==="up"||z.ctrl&&z.key==="p"){z.preventDefault(),B((G)=>G<=0?U.length-1:G-1);return}if(z.key==="down"||z.ctrl&&z.key==="n"){z.preventDefault(),B((G)=>G>=U.length-1?0:G+1);return}}},q[11]=K,q[12]=f,q[13]=U,q[14]=b;else b=q[14];let x=b,j;if(q[15]!==J||q[16]!==X||q[17]!==Q)j=(z)=>{if(!J)return;let G=z;q:switch(G){case"yes-session":{X(J,!1);break q}case"yes-remember":{X(J,!0);break q}case"no":Q()}},q[15]=J,q[16]=X,q[17]=Q,q[18]=j;else j=q[18];let y=j,p=J?void 0:Eq,A;if(q[19]!==V||q[20]!==J||q[21]!==k||q[22]!==y||q[23]!==K||q[24]!==f||q[25]!==U)A=J?R(M,{flexDirection:"column",gap:1,children:[L(wq,{path:J}),L(n,{options:Rq,onChange:y,onCancel:()=>y("no")})]}):R(M,{flexDirection:"column",gap:1,marginX:2,children:[L(qq,{}),L(Kq,{value:V,onChange:w,onSubmit:K,error:k,suggestions:U,selectedSuggestion:f})]}),q[19]=V,q[20]=J,q[21]=k,q[22]=y,q[23]=K,q[24]=f,q[25]=U,q[26]=A;else A=q[26];let E;if(q[27]!==Q||q[28]!==p||q[29]!==A)E=L(i,{title:"Add directory to workspace",onCancel:Q,color:"permission",isCancelActive:!1,inputGuide:p,children:A}),q[27]=Q,q[28]=p,q[29]=A,q[30]=E;else E=q[30];let h;if(q[31]!==x||q[32]!==E)h=L(M,{flexDirection:"column",tabIndex:0,autoFocus:!0,onKeyDown:x,children:E}),q[31]=x,q[32]=E,q[33]=h;else h=q[33];return h}function Eq(Z){return Z.pending?R(F,{children:["Press ",Z.keyName," again to exit"]}):R($,{children:[L(S,{shortcut:"Tab",action:"complete"}),L(S,{shortcut:"Enter",action:"add"}),L(g,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})}var T,H,Rq;var Fq=Gq(()=>{Jq();Uq();Oq();kq();Xq();Zq();fq();Vq();Mq();Wq();Yq();Nq();Hq();l();T=a(Qq(),1),H=a(Lq(),1),Rq=[{value:"yes-session",label:"Yes, for this session"},{value:"yes-remember",label:"Yes, and remember this directory"},{value:"no",label:"No"}]});
|
|
2
|
+
export{lq as Pg,Fq as Qg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{HD as O,JD as j,dm as y,em as p}from"./cli-0.5.7-q2e6xpch.mjs";import{KW as F,MW as I,QW as R,pX as v,rV as S}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as Z,QY as N,RY as U}from"./cli-0.5.7-vgc7nzef.mjs";import{SY as d}from"./cli-0.5.7-8sbq2qed.mjs";import{G$ as M,T$ as E}from"./cli-0.5.7-469r2a5r.mjs";import{Nea as H,Pea as b}from"./cli-0.5.7-26pwg6gg.mjs";import{Vma as k}from"./cli-0.5.7-258ytmbr.mjs";b();v();E();j();p();U();var T=k(S(),1),h=k(d(),1),x="Auto mode lets Claude handle permission prompts automatically — Claude checks each tool call for risky actions and prompt injection before executing. Actions Claude identifies as safe are executed, while actions Claude identifies as risky are blocked and Claude may try a different approach. Ideal for long-running tasks. Sessions are slightly more expensive. Claude can make mistakes that allow harmful commands to run, it's recommended to only use in isolated environments. Shift+Tab to change mode.";function l(A){let f=T.c(18),{onAccept:J,onDecline:q,declineExits:C}=A,K;if(f[0]===Symbol.for("react.memo_cache_sentinel"))K=[],f[0]=K;else K=f[0];h.default.useEffect(_,K);let Q;if(f[1]!==J||f[2]!==q)Q=function(m){f:switch(m){case"accept":{H("tengu_auto_mode_opt_in_dialog_accept",{}),M("userSettings",{skipAutoPermissionPrompt:!0}),J();break f}case"accept-default":{H("tengu_auto_mode_opt_in_dialog_accept_default",{}),M("userSettings",{skipAutoPermissionPrompt:!0,permissions:{defaultMode:"auto"}}),J();break f}case"decline":H("tengu_auto_mode_opt_in_dialog_decline",{}),q()}},f[1]=J,f[2]=q,f[3]=Q;else Q=f[3];let B=Q,V;if(f[4]===Symbol.for("react.memo_cache_sentinel"))V=N(F,{flexDirection:"column",gap:1,children:[Z(I,{children:x}),Z(R,{url:"https://code.claude.com/docs/en/security"})]}),f[4]=V;else V=f[4];let W;if(f[5]===Symbol.for("react.memo_cache_sentinel"))W=[{label:"Yes, and make it my default mode",value:"accept-default"}],f[5]=W;else W=f[5];let X;if(f[6]===Symbol.for("react.memo_cache_sentinel"))X={label:"Yes, enable auto mode",value:"accept"},f[6]=X;else X=f[6];let L=C?"No, exit":"No, go back",w;if(f[7]!==L)w=[...W,X,{label:L,value:"decline"}],f[7]=L,f[8]=w;else w=f[8];let z;if(f[9]!==B)z=(P)=>B(P),f[9]=B,f[10]=z;else z=f[10];let G;if(f[11]!==q||f[12]!==w||f[13]!==z)G=Z(O,{options:w,onChange:z,onCancel:q}),f[11]=q,f[12]=w,f[13]=z,f[14]=G;else G=f[14];let Y;if(f[15]!==q||f[16]!==G)Y=N(y,{title:"Enable auto mode?",color:"warning",onCancel:q,children:[V,G]}),f[15]=q,f[16]=G,f[17]=Y;else Y=f[17];return Y}function _(){H("tengu_auto_mode_opt_in_dialog_shown",{})}
|
|
2
|
+
export{x as mb,l as nb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Yma as Q,Zma as U}from"./cli-0.5.7-258ytmbr.mjs";var w={};Q(w,{default:()=>x,createSupportsColor:()=>K});import M from"node:process";import V from"node:os";import O from"node:tty";function z(q,B=globalThis.Deno?globalThis.Deno.args:M.argv){let D=q.startsWith("-")?"":q.length===1?"-":"--",E=B.indexOf(D+q),G=B.indexOf("--");return E!==-1&&(G===-1||E<G)}function X(){if(!("FORCE_COLOR"in j))return;if(j.FORCE_COLOR==="true")return 1;if(j.FORCE_COLOR==="false")return 0;if(j.FORCE_COLOR.length===0)return 1;let q=Math.min(Number.parseInt(j.FORCE_COLOR,10),3);if(![0,1,2,3].includes(q))return;return q}function Z(q){if(q===0)return!1;return{level:q,hasBasic:!0,has256:q>=2,has16m:q>=3}}function $(q,{streamIsTTY:B,sniffFlags:D=!0}={}){let E=X();if(E!==void 0)H=E;let G=D?H:E;if(G===0)return 0;if(D){if(z("color=16m")||z("color=full")||z("color=truecolor"))return 3;if(z("color=256"))return 2}if("TF_BUILD"in j&&"AGENT_NAME"in j)return 1;if(q&&!B&&G===void 0)return 0;let J=G||0;if(j.TERM==="dumb")return J;if(M.platform==="win32"){let A=V.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in j){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((A)=>(A in j)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in j))||j.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in j)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(j.TEAMCITY_VERSION)?1:0;if(j.COLORTERM==="truecolor")return 3;if(j.TERM==="xterm-kitty")return 3;if(j.TERM==="xterm-ghostty")return 3;if(j.TERM==="wezterm")return 3;if("TERM_PROGRAM"in j){let A=Number.parseInt((j.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(j.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(j.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(j.TERM))return 1;if("COLORTERM"in j)return 1;return J}function K(q,B={}){let D=$(q,{streamIsTTY:q&&q.isTTY,...B});return Z(D)}var j,H,b,x;var L=U(()=>{({env:j}=M);if(z("no-color")||z("no-colors")||z("color=false")||z("color=never"))H=0;else if(z("color")||z("colors")||z("color=true")||z("color=always"))H=1;b={stdout:K({isTTY:O.isatty(1)}),stderr:K({isTTY:O.isatty(2)})},x=b});
|
|
2
|
+
export{K as b6,w as c6,L as d6};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ub as z,Vb as K}from"./cli-0.5.7-9ysat94v.mjs";import{NG as w,OG as J}from"./cli-0.5.7-q2e6xpch.mjs";import{SY as H}from"./cli-0.5.7-8sbq2qed.mjs";import{Vma as E,Zma as G}from"./cli-0.5.7-258ytmbr.mjs";function V(q,v,k){return B.useMemo(()=>{let D=w(k,v);return z(q,D,k.mode)},[q,v,k,!1,!1])}var B;var N=G(()=>{J();K();B=E(H(),1)});
|
|
2
|
+
export{V as Qb,N as Rb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TI as C,bJ as N,kJ as $,lJ as k,rJ as V}from"./cli-0.5.7-q2e6xpch.mjs";import{KW as f,MW as t,QW as v,pX as D,rV as P}from"./cli-0.5.7-x1w96j6d.mjs";import{PY as n,QY as i,RY as M}from"./cli-0.5.7-vgc7nzef.mjs";import{Vma as w,Zma as L}from"./cli-0.5.7-258ytmbr.mjs";function W(o){let e=b.c(26),{scope:r,parsingErrors:s,warnings:m}=o,a=s.length>0,g=m.length>0;if(!a&&!g)return null;let p;if(e[0]!==a||e[1]!==g)p=(a||g)&&i(t,{color:a?"error":"warning",children:["[",a?"Failed to parse":"Contains warnings","]"," "]}),e[0]=a,e[1]=g,e[2]=p;else p=e[2];let c;if(e[3]!==r)c=k(r),e[3]=r,e[4]=c;else c=e[4];let l;if(e[5]!==c)l=n(t,{children:c}),e[5]=c,e[6]=l;else l=e[6];let u;if(e[7]!==p||e[8]!==l)u=i(f,{children:[p,l]}),e[7]=p,e[8]=l,e[9]=u;else u=e[9];let E;if(e[10]===Symbol.for("react.memo_cache_sentinel"))E=n(t,{dimColor:!0,children:"Location: "}),e[10]=E;else E=e[10];let h;if(e[11]!==r)h=$(r),e[11]=r,e[12]=h;else h=e[12];let d;if(e[13]!==h)d=i(f,{children:[E,n(t,{dimColor:!0,children:h})]}),e[13]=h,e[14]=d;else d=e[14];let T;if(e[15]!==s)T=s.map(F),e[15]=s,e[16]=T;else T=e[16];let _;if(e[17]!==m)_=m.map(x),e[17]=m,e[18]=_;else _=e[18];let y;if(e[19]!==T||e[20]!==_)y=i(f,{marginLeft:1,flexDirection:"column",children:[T,_]}),e[19]=T,e[20]=_,e[21]=y;else y=e[21];let S;if(e[22]!==y||e[23]!==u||e[24]!==d)S=i(f,{flexDirection:"column",marginTop:1,children:[u,d,y]}),e[22]=y,e[23]=u,e[24]=d,e[25]=S;else S=e[25];return S}function x(o,e){let r=o.mcpErrorMetadata?.serverName;return n(f,{children:i(t,{children:[n(t,{dimColor:!0,children:"└ "}),n(t,{color:"warning",children:"[Warning]"}),i(t,{dimColor:!0,children:[" ",r&&`[${r}] `,o.path&&o.path!==""?`${o.path}: `:"",o.message]})]})},`warning-${e}`)}function F(o,e){let r=o.mcpErrorMetadata?.serverName;return n(f,{children:i(t,{children:[n(t,{dimColor:!0,children:"└ "}),n(t,{color:"error",children:"[Error]"}),i(t,{dimColor:!0,children:[" ",r&&`[${r}] `,o.path&&o.path!==""?`${o.path}: `:"",o.message]})]})},`error-${e}`)}function J(){let o=b.c(6),e;if(o[0]===Symbol.for("react.memo_cache_sentinel"))e={scope:"user",config:C("user")},o[0]=e;else e=o[0];let r;if(o[1]===Symbol.for("react.memo_cache_sentinel"))r={scope:"project",config:C("project")},o[1]=r;else r=o[1];let s;if(o[2]===Symbol.for("react.memo_cache_sentinel"))s={scope:"local",config:C("local")},o[2]=s;else s=o[2];let m;if(o[3]===Symbol.for("react.memo_cache_sentinel"))m=[e,r,s,{scope:"enterprise",config:C("enterprise")}],o[3]=m;else m=o[3];let a=m,g=a.some(q),p=a.some(R);if(!g&&!p)return null;let c;if(o[4]===Symbol.for("react.memo_cache_sentinel"))c=n(t,{bold:!0,children:"MCP Config Diagnostics"}),o[4]=c;else c=o[4];let l;if(o[5]===Symbol.for("react.memo_cache_sentinel"))l=i(f,{flexDirection:"column",marginTop:1,marginBottom:1,children:[c,n(f,{marginTop:1,children:i(t,{dimColor:!0,children:["For help configuring MCP servers, see:"," ",n(v,{url:"https://code.claude.com/docs/en/mcp",children:"https://code.claude.com/docs/en/mcp"})]})}),a.map(A)]}),o[5]=l;else l=o[5];return l}function A(o){let{scope:e,config:r}=o;return n(W,{scope:e,parsingErrors:B(r.errors,"fatal"),warnings:B(r.errors,"warning")},e)}function R(o){let{config:e}=o;return B(e.errors,"warning").length>0}function q(o){let{config:e}=o;return B(e.errors,"fatal").length>0}function B(o,e){return o.filter((r)=>r.mcpErrorMetadata?.severity===e)}var b;var z=L(()=>{N();V();D();M();b=w(P(),1)});
|
|
2
|
+
export{J as uf,z as vf};
|