@unieai/code 0.0.10 → 0.0.11
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/README.en.md +6 -59
- package/README.md +5 -59
- package/dist/chunks/App-s5ex5j86.js +2 -0
- package/dist/chunks/ApproveApiKey-b4z6h2gn.js +2 -0
- package/dist/chunks/{assistant-yvtpv5sv.js → AssistantSessionChooser-g1vsya6h.js} +1 -1
- package/dist/chunks/BypassPermissionsModeDialog-jbg97eja.js +2 -0
- package/dist/chunks/ClaudeInChromeOnboarding-qa0pvwfw.js +2 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-gqmed78y.js +2 -0
- package/dist/chunks/ConsoleOAuthFlow-yh72vs8j.js +2 -0
- package/dist/chunks/{DiffDialog-v8smgzpd.js → DiffDialog-t6vvtbb2.js} +1 -1
- package/dist/chunks/Doctor-k08ggw2j.js +2 -0
- package/dist/chunks/Grove-tkkskg8n.js +2 -0
- package/dist/chunks/ITermBackend-73waaahf.js +2 -0
- package/dist/chunks/{InProcessTransport-57c2w5v4.js → InProcessTransport-qwjgb17j.js} +1 -1
- package/dist/chunks/InvalidConfigDialog-zmqw3fj1.js +2 -0
- package/dist/chunks/InvalidSettingsDialog-tnd5hymg.js +2 -0
- package/dist/chunks/Onboarding-p0tq6pgz.js +2 -0
- package/dist/chunks/REPL-hjjz80kq.js +2 -0
- package/dist/chunks/ResumeConversation-krn9hqb1.js +2 -0
- package/dist/chunks/{SnapshotUpdateDialog-5yvfnp0q.js → SnapshotUpdateDialog-raq029pd.js} +1 -1
- package/dist/chunks/TeleportProgress-vyy2k3bv.js +2 -0
- package/dist/chunks/TeleportRepoMismatchDialog-ff0h2cnq.js +2 -0
- package/dist/chunks/TeleportResumeWrapper-esjykret.js +2 -0
- package/dist/chunks/{TmuxBackend-j665sv6f.js → TmuxBackend-14kmnkcb.js} +1 -1
- package/dist/chunks/ToolSearchTool-w4t61c7d.js +2 -0
- package/dist/chunks/TrustDialog-7fvaze2x.js +2 -0
- package/dist/chunks/TungstenTool-rv96z549.js +2 -0
- package/dist/chunks/add-dir-kqw72mky.js +2 -0
- package/dist/chunks/agents-3exybgtb.js +4 -0
- package/dist/chunks/{agents-e7x38q37.js → agents-z66twpqr.js} +1 -1
- package/dist/chunks/ant-claude-for-chrome-mcp-712xg07f.js +2 -0
- package/dist/chunks/api-z8svc3xt.js +2 -0
- package/dist/chunks/asciicast-vzd7qjbb.js +2 -0
- package/dist/chunks/{AssistantSessionChooser-0r5zamt1.js → assistant-ftzr3mjp.js} +1 -1
- package/dist/chunks/auth-gbyfq0g2.js +2 -0
- package/dist/chunks/auth-wk077awh.js +2 -0
- package/dist/chunks/backgroundHousekeeping-m8gthtkh.js +2 -0
- package/dist/chunks/branch-1d0b8590.js +5 -0
- package/dist/chunks/{bridgePointer-9q6wh2ct.js → bridgePointer-vhd47np6.js} +1 -1
- package/dist/chunks/btw-s3r5jhyd.js +2 -0
- package/dist/chunks/buddy-xzm5npk8.js +2 -0
- package/dist/chunks/{cachedMicrocompact-thnhx1zt.js → cachedMicrocompact-6j3zxr4g.js} +1 -1
- package/dist/chunks/caches-fbggdeq7.js +2 -0
- package/dist/chunks/chrome-mdyx0s5j.js +2 -0
- package/dist/chunks/{chromeNativeHost-nnjkj164.js → chromeNativeHost-8wc6wcr6.js} +1 -1
- package/dist/chunks/{claudeDesktop-nsangyk5.js → claudeDesktop-p5bfxmvz.js} +1 -1
- package/dist/chunks/{cleanup-mv462dsh.js → cleanup-q46nbce1.js} +1 -1
- package/dist/chunks/clear-fwad6zxy.js +2 -0
- package/dist/chunks/{cli-sbp2221d.js → cli-0dc8sd37.js} +2 -2
- package/dist/chunks/{cli-3xhqacdd.js → cli-0qt9btbe.js} +2 -2
- package/dist/chunks/{cli-4j5yyvek.js → cli-0w4wc1z0.js} +2 -2
- package/dist/chunks/{cli-r6hm1q63.js → cli-15sqp3mq.js} +2 -2
- package/dist/chunks/{cli-45ftgn85.js → cli-15w3eaed.js} +1 -1
- package/dist/chunks/{cli-b7wx1479.js → cli-19ncan36.js} +1 -1
- package/dist/chunks/{cli-hx28w3cq.js → cli-1jp3rm7n.js} +1 -1
- package/dist/chunks/{cli-90b87f45.js → cli-1n8he7s8.js} +2 -2
- package/dist/chunks/{cli-bthzmdgv.js → cli-1ny2386w.js} +2 -2
- package/dist/chunks/{cli-vq899n8p.js → cli-27mzrnr8.js} +1 -1
- package/dist/chunks/{cli-gnjff7md.js → cli-2rw44zfx.js} +2 -2
- package/dist/chunks/{cli-7gpep1x5.js → cli-2rwjx3w0.js} +1 -1
- package/dist/chunks/{cli-jqppy97b.js → cli-2wd8eaac.js} +2 -2
- package/dist/chunks/{cli-3hwpymrd.js → cli-350pymj4.js} +2 -2
- package/dist/chunks/{cli-w754xmyv.js → cli-3ac555qw.js} +2 -2
- package/dist/chunks/{cli-8kyjh67j.js → cli-3gwqrmcd.js} +1 -1
- package/dist/chunks/{cli-msr9n6da.js → cli-3m8n808e.js} +2 -2
- package/dist/chunks/{cli-ptv3h2tx.js → cli-42kma5r3.js} +1 -1
- package/dist/chunks/{cli-r9p0g894.js → cli-49m97nbg.js} +2 -2
- package/dist/chunks/{cli-bkxwwj81.js → cli-4a4bb1kf.js} +1 -1
- package/dist/chunks/{cli-3bxtq5dc.js → cli-4ewb3q42.js} +2 -2
- package/dist/chunks/{cli-v3mf1g0z.js → cli-4mvvtchx.js} +2 -2
- package/dist/chunks/{cli-r2p5bkx5.js → cli-4nejhkd0.js} +2 -2
- package/dist/chunks/{cli-dx46fn1w.js → cli-51720d82.js} +2 -2
- package/dist/chunks/cli-55jdp9ky.js +3 -0
- package/dist/chunks/{cli-6vwdnz9p.js → cli-55ntywtj.js} +1 -1
- package/dist/chunks/{cli-pz8vxqw0.js → cli-57yrpnaq.js} +2 -2
- package/dist/chunks/{cli-59ysj9y4.js → cli-5dt9yjha.js} +2 -2
- package/dist/chunks/{cli-e37w9dxm.js → cli-5f0w3fy6.js} +1 -1
- package/dist/chunks/{cli-z9jm4xjn.js → cli-5vsnhp97.js} +2 -2
- package/dist/chunks/{cli-x758qvv7.js → cli-61x73ksv.js} +1 -1
- package/dist/chunks/{cli-ye3qk73s.js → cli-66jj9zj3.js} +1 -1
- package/dist/chunks/{cli-zac1afnb.js → cli-6bxfdgv1.js} +1 -1
- package/dist/chunks/{cli-md1h6sbv.js → cli-6pdpyz1a.js} +1 -1
- package/dist/chunks/{cli-mejr8b5m.js → cli-6yprtw88.js} +2 -2
- package/dist/chunks/{cli-qs0v3mf6.js → cli-73jf8hyz.js} +2 -2
- package/dist/chunks/{cli-948we41z.js → cli-749tdaqc.js} +2 -2
- package/dist/chunks/{cli-vxxkrd5y.js → cli-764c4bsm.js} +2 -2
- package/dist/chunks/cli-78apjp3t.js +3 -0
- package/dist/chunks/{cli-k0jpcxwa.js → cli-7c99j0pt.js} +2 -2
- package/dist/chunks/{cli-by5b2216.js → cli-89x414pj.js} +2 -2
- package/dist/chunks/{cli-fqb71hy3.js → cli-8dmy2s42.js} +1 -1
- package/dist/chunks/cli-8hxz2qs6.js +3 -0
- package/dist/chunks/cli-8mk2zg4a.js +4 -0
- package/dist/chunks/{cli-29gcax34.js → cli-8qd16mt4.js} +2 -2
- package/dist/chunks/cli-95wg48h9.js +3 -0
- package/dist/chunks/{cli-wz9r5s81.js → cli-99mqr54v.js} +2 -2
- package/dist/chunks/{cli-8qk46mt3.js → cli-9aq7vxaq.js} +1 -1
- package/dist/chunks/{cli-zcpjf07m.js → cli-9z9r2set.js} +2 -2
- package/dist/chunks/{cli-2wvsym16.js → cli-a52ra30v.js} +1 -1
- package/dist/chunks/{cli-s6qk3rbv.js → cli-akcxtvv9.js} +2 -2
- package/dist/chunks/{cli-h3kcprht.js → cli-bmk0rb5v.js} +2 -2
- package/dist/chunks/{cli-pmzht94n.js → cli-br6zjh6x.js} +2 -2
- package/dist/chunks/{cli-z8hqtyjg.js → cli-c22wpdk4.js} +1 -1
- package/dist/chunks/{cli-zbt28krs.js → cli-c60c9qvm.js} +1 -1
- package/dist/chunks/{cli-3357rxva.js → cli-cqkne34j.js} +2 -2
- package/dist/chunks/{cli-0s65jzgr.js → cli-cwbxhdt1.js} +1 -1
- package/dist/chunks/{cli-xsap3gxj.js → cli-d0hzw78c.js} +1 -1
- package/dist/chunks/{cli-0b4dmvvw.js → cli-d53fhs6v.js} +2 -2
- package/dist/chunks/{cli-extf4h54.js → cli-dbdqrqmt.js} +1 -1
- package/dist/chunks/{cli-yf3sh3aw.js → cli-de1hwp88.js} +1 -1
- package/dist/chunks/cli-edkqs0ge.js +3 -0
- package/dist/chunks/{cli-dsnjsvqs.js → cli-er7z496e.js} +2 -2
- package/dist/chunks/{cli-atpfeg28.js → cli-eyw3czmn.js} +2 -2
- package/dist/chunks/{cli-tyxvdf66.js → cli-ezs5sney.js} +2 -2
- package/dist/chunks/{cli-tn47e131.js → cli-f63fdj4w.js} +2 -2
- package/dist/chunks/cli-fakdskp6.js +3 -0
- package/dist/chunks/{cli-nj726gac.js → cli-fdya77ch.js} +3 -3
- package/dist/chunks/{cli-b1dptek2.js → cli-fghyxar5.js} +2 -2
- package/dist/chunks/{cli-g1spmn9n.js → cli-fm14mg07.js} +1 -1
- package/dist/chunks/{cli-cr1hvkmz.js → cli-fs7yttfp.js} +2 -2
- package/dist/chunks/{cli-rcvta3zk.js → cli-fwrj8ybs.js} +2 -2
- package/dist/chunks/{cli-v77avvvk.js → cli-g4n9das2.js} +1 -1
- package/dist/chunks/{cli-cbdrqqf2.js → cli-g5wq5ptg.js} +2 -2
- package/dist/chunks/{cli-yrk194b9.js → cli-gq5fve62.js} +1 -1
- package/dist/chunks/{cli-nykt265k.js → cli-grxvgq2n.js} +1 -1
- package/dist/chunks/{cli-ffjjv4j8.js → cli-gtm212j6.js} +2 -2
- package/dist/chunks/{cli-skq9ktf8.js → cli-gxgdnjfn.js} +1 -1
- package/dist/chunks/{cli-x5z5m6y7.js → cli-h120wpk2.js} +1 -1
- package/dist/chunks/{cli-58t6a5n6.js → cli-h4a90xbh.js} +1 -1
- package/dist/chunks/cli-h4dspaac.js +3 -0
- package/dist/chunks/{cli-a98b285v.js → cli-hke6r0q8.js} +2 -2
- package/dist/chunks/{cli-jxwm52wg.js → cli-hzr2zraz.js} +1 -1
- package/dist/chunks/{cli-x4a9geyz.js → cli-j08dmxw5.js} +1 -1
- package/dist/chunks/{cli-jvs98a70.js → cli-ja540nr7.js} +1 -1
- package/dist/chunks/{cli-dr1ph0pp.js → cli-jegyadmb.js} +2 -2
- package/dist/chunks/{cli-xjx11p6m.js → cli-jgn9jprh.js} +2 -2
- package/dist/chunks/{cli-n3m134cf.js → cli-jj93qmmc.js} +2 -2
- package/dist/chunks/{cli-kje3t5yg.js → cli-jkj867t1.js} +3 -3
- package/dist/chunks/{cli-6he3kpeb.js → cli-k2nh5cby.js} +2 -2
- package/dist/chunks/{cli-3je4vtx7.js → cli-k4v08k8t.js} +2 -2
- package/dist/chunks/{cli-c2pn6csk.js → cli-khs3sj9k.js} +1 -1
- package/dist/chunks/{cli-shz2e0q5.js → cli-kq16afrr.js} +2 -2
- package/dist/chunks/{cli-2zh6c5xz.js → cli-kqv5b8zh.js} +1 -1
- package/dist/chunks/{cli-k8fd74g6.js → cli-m0z3rmf0.js} +2 -2
- package/dist/chunks/{cli-a72n4ej7.js → cli-m12smc5e.js} +1 -1
- package/dist/chunks/{cli-15zbq52w.js → cli-m8fq163z.js} +1 -1
- package/dist/chunks/{cli-1215h20m.js → cli-mb1qrqw1.js} +2 -2
- package/dist/chunks/{cli-50wh7ttg.js → cli-mbp8f3f3.js} +2 -2
- package/dist/chunks/{cli-5pb6kdxn.js → cli-me4e2p3e.js} +595 -595
- package/dist/chunks/{cli-vz1j9n38.js → cli-mj03488e.js} +2 -2
- package/dist/chunks/{cli-6dcra6rs.js → cli-ms5j6fff.js} +2 -2
- package/dist/chunks/{cli-0v6qg4zv.js → cli-msgx4pnp.js} +2 -2
- package/dist/chunks/cli-msmzt4c3.js +130 -0
- package/dist/chunks/{cli-h5yfk29j.js → cli-msw0vv86.js} +2 -2
- package/dist/chunks/{cli-ewts4g0p.js → cli-mzcsnm06.js} +2 -2
- package/dist/chunks/{cli-wr4k6ngg.js → cli-n5s5fnyj.js} +2 -2
- package/dist/chunks/{cli-ygq3fy9g.js → cli-ns0aaggm.js} +1 -1
- package/dist/chunks/{cli-1a2nss2m.js → cli-nvnj7r73.js} +1 -1
- package/dist/chunks/{cli-hpzy0mat.js → cli-p0vh69b9.js} +2 -2
- package/dist/chunks/{cli-zf7yzkn6.js → cli-p2cqnrnp.js} +2 -2
- package/dist/chunks/{cli-px7jhzgq.js → cli-pbc8sk2d.js} +2 -2
- package/dist/chunks/{cli-29078yxj.js → cli-pgg33dhw.js} +2 -2
- package/dist/chunks/cli-przq3zk6.js +3 -0
- package/dist/chunks/{cli-q9fn82b1.js → cli-q0156x0d.js} +2 -2
- package/dist/chunks/{cli-zdy5bccv.js → cli-q46epwyh.js} +1 -1
- package/dist/chunks/{cli-v8w48y51.js → cli-qaxvg7gv.js} +1 -1
- package/dist/chunks/{cli-ytj910yt.js → cli-qm684n63.js} +1 -1
- package/dist/chunks/{cli-2qec7gn4.js → cli-r3etpht1.js} +1 -1
- package/dist/chunks/{cli-amy2yafd.js → cli-r83ttew2.js} +2 -2
- package/dist/chunks/{cli-22zbzzap.js → cli-r9db9mqv.js} +1 -1
- package/dist/chunks/{cli-3q7meftn.js → cli-rjerv816.js} +2 -2
- package/dist/chunks/{cli-mx6xk0dw.js → cli-rvad3yhg.js} +2 -2
- package/dist/chunks/{cli-wfqsfwa2.js → cli-rxb5q8zw.js} +2 -2
- package/dist/chunks/{cli-7cn4gwqc.js → cli-s160fqyz.js} +2 -2
- package/dist/chunks/{cli-v2hg35qk.js → cli-s6vr7213.js} +2 -2
- package/dist/chunks/{cli-49dqgzsg.js → cli-s9fhtgmz.js} +2 -2
- package/dist/chunks/{cli-tezq577c.js → cli-scaqq0v9.js} +2 -2
- package/dist/chunks/{cli-15tr7ade.js → cli-sh9w2tbd.js} +1 -1
- package/dist/chunks/{cli-zd2e6bq1.js → cli-sycqd3xe.js} +4 -4
- package/dist/chunks/{cli-d06qr5p3.js → cli-t4j047cx.js} +2 -2
- package/dist/chunks/{cli-s5epnnj5.js → cli-t9jht3kb.js} +2 -2
- package/dist/chunks/{cli-bd1ryrzd.js → cli-tckzkegq.js} +1 -1
- package/dist/chunks/{cli-p2gt60aj.js → cli-tfv2qcgf.js} +1 -1
- package/dist/chunks/{cli-1qszxdan.js → cli-tq5z9qv3.js} +2 -2
- package/dist/chunks/{cli-wthnf2t5.js → cli-tt9a4124.js} +1 -1
- package/dist/chunks/{cli-8v5ajztt.js → cli-tyqh91zq.js} +1 -1
- package/dist/chunks/cli-v943fd6a.js +3 -0
- package/dist/chunks/{cli-wn4ywgbv.js → cli-v9f860t5.js} +2 -2
- package/dist/chunks/{cli-qc7zfabw.js → cli-vkvmhjha.js} +2 -2
- package/dist/chunks/{cli-6b6e5zj9.js → cli-vkzp66cm.js} +2 -2
- package/dist/chunks/{cli-6qhwqfwp.js → cli-vwg0v35a.js} +2 -2
- package/dist/chunks/{cli-x514vyva.js → cli-w1d8n9g3.js} +1 -1
- package/dist/chunks/cli-w52yvzkn.js +3 -0
- package/dist/chunks/{cli-et2cj5dc.js → cli-wbe1p8n2.js} +2 -2
- package/dist/chunks/{cli-5mdbbvnv.js → cli-wm8qb6j3.js} +1 -1
- package/dist/chunks/{cli-1tq57kq0.js → cli-wn2srq2e.js} +1 -1
- package/dist/chunks/{cli-088ac95n.js → cli-wt2bfbn0.js} +2 -2
- package/dist/chunks/{cli-jmypsed1.js → cli-x70v8rsj.js} +2 -2
- package/dist/chunks/{cli-5wh173wa.js → cli-x8xgga1a.js} +3 -3
- package/dist/chunks/{cli-2vc9kv40.js → cli-xfsqvp8r.js} +2 -2
- package/dist/chunks/{cli-6xmbrh42.js → cli-xmgm2573.js} +2 -2
- package/dist/chunks/{cli-d58ptbve.js → cli-xpa1neza.js} +2 -2
- package/dist/chunks/{cli-6bxmycm6.js → cli-yqbvprz7.js} +1 -1
- package/dist/chunks/{cli-bz32070f.js → cli-yrwenjxs.js} +1 -1
- package/dist/chunks/{cli-3p0mfsqg.js → cli-z5e72gsd.js} +1 -1
- package/dist/chunks/{cli-z2jpyr57.js → cli-zev50xap.js} +1 -1
- package/dist/chunks/{cli-mjz85907.js → cli-zjbzak9n.js} +1 -1
- package/dist/chunks/{cli-h2dynmt7.js → cli-zjfya500.js} +1 -1
- package/dist/chunks/{cli-60mdvk6q.js → cli-zp8s7q5w.js} +1 -1
- package/dist/chunks/{cli-znz72ctn.js → cli-zpcncwrv.js} +1 -1
- package/dist/chunks/{cli-ew59cmn3.js → cli-zxdnz6vp.js} +1 -1
- package/dist/chunks/client-dkpgx025.js +2 -0
- package/dist/chunks/color-zrm6r755.js +2 -0
- package/dist/chunks/commitAttribution-3y6pessz.js +2 -0
- package/dist/chunks/common-0bee37at.js +2 -0
- package/dist/chunks/compact-zmvj1pk0.js +4 -0
- package/dist/chunks/config-gj0gbg5g.js +2 -0
- package/dist/chunks/config-hbq35b68.js +2 -0
- package/dist/chunks/context-h1qc69rg.js +2 -0
- package/dist/chunks/context-noninteractive-7wbe6qvd.js +2 -0
- package/dist/chunks/conversation-fwnfp0p5.js +2 -0
- package/dist/chunks/{copy-bpypgpy8.js → copy-76r9v46d.js} +1 -1
- package/dist/chunks/cost-56r5xxqy.js +5 -0
- package/dist/chunks/createSession-m5y8fjy4.js +2 -0
- package/dist/chunks/desktop-z3jqgnw7.js +2 -0
- package/dist/chunks/detectRepository-w6wawmmg.js +2 -0
- package/dist/chunks/detection-1yb2c7hh.js +2 -0
- package/dist/chunks/{devtools-mt3vnaw3.js → devtools-10ba48t9.js} +1 -1
- package/dist/chunks/{diff-bcdc10jv.js → diff-05xxjeqc.js} +1 -1
- package/dist/chunks/doctor-hgwjdraj.js +2 -0
- package/dist/chunks/earlyInput-navj6cdn.js +2 -0
- package/dist/chunks/effort-a190c878.js +9 -0
- package/dist/chunks/executor-s42mdmqs.js +2 -0
- package/dist/chunks/exit-kyrjy6hb.js +2 -0
- package/dist/chunks/export-ct4sty4d.js +3 -0
- package/dist/chunks/extra-usage-noninteractive-byts9mme.js +2 -0
- package/dist/chunks/extra-usage-xh1mkrca.js +2 -0
- package/dist/chunks/fast-g4aa49jf.js +2 -0
- package/dist/chunks/feedback-m5r66qd5.js +2 -0
- package/dist/chunks/{files-fx3xz1bj.js → files-qrrrkjke.js} +1 -1
- package/dist/chunks/firstPartyEventLogger-mthxtmgc.js +2 -0
- package/dist/chunks/gates-yhakv4vb.js +2 -0
- package/dist/chunks/git-c39vd9dm.js +2 -0
- package/dist/chunks/goal-24dr7fwz.js +2 -0
- package/dist/chunks/growthbook-f7ag30hy.js +2 -0
- package/dist/chunks/heapdump-16gnh3zm.js +7 -0
- package/dist/chunks/help-rgcakcxe.js +2 -0
- package/dist/chunks/hooks-8dh43zmv.js +2 -0
- package/dist/chunks/{hooks-7kspbr6v.js → hooks-c7fqwas5.js} +1 -1
- package/dist/chunks/{ide-5bsqkr23.js → ide-q83qr9cn.js} +1 -1
- package/dist/chunks/index-v875zpde.js +2 -0
- package/dist/chunks/initReplBridge-zfwxgpsm.js +2 -0
- package/dist/chunks/ink-vkxsn90v.js +2 -0
- package/dist/chunks/{insights-z9edzgf1.js → insights-4fwap4e5.js} +1 -1
- package/dist/chunks/install-7nxzmgp5.js +2 -0
- package/dist/chunks/{install-github-app-918fh4r2.js → install-github-app-djzea7r4.js} +1 -1
- package/dist/chunks/install-slack-app-3rde0k08.js +2 -0
- package/dist/chunks/{instrumentation-b8ysw74t.js → instrumentation-223qqr23.js} +1 -1
- package/dist/chunks/keybindings-6t5f69wx.js +3 -0
- package/dist/chunks/loadAgentsDir-f8shfnw3.js +2 -0
- package/dist/chunks/loadPluginHooks-mdwjrjtp.js +2 -0
- package/dist/chunks/login-34j3xdr9.js +2 -0
- package/dist/chunks/logout-yew8mymc.js +2 -0
- package/dist/chunks/{main-sqrzjvg9.js → main-0b8hyp8h.js} +79 -79
- package/dist/chunks/mcp-9enw5a8j.js +2 -0
- package/dist/chunks/mcp-fn4yrf5y.js +3 -0
- package/dist/chunks/{mcp-dqh1vtvf.js → mcp-yymqpmv6.js} +3 -3
- package/dist/chunks/mcpServer-60jg9v58.js +2 -0
- package/dist/chunks/mcpServer-85gt8ypc.js +2 -0
- package/dist/chunks/memory-kam5z1cw.js +4 -0
- package/dist/chunks/{mobile-9m41g9bp.js → mobile-7zsgawnb.js} +1 -1
- package/dist/chunks/model-03987182.js +2 -0
- package/dist/chunks/model-wbxx5kcd.js +3 -0
- package/dist/chunks/{oauth-98khjrd8.js → oauth-y0p2y1w5.js} +1 -1
- package/dist/chunks/{output-style-1h6b2zf8.js → output-style-x148mzhn.js} +1 -1
- package/dist/chunks/parser-4y4b0e6b.js +2 -0
- package/dist/chunks/passes-jrmjk5zk.js +2 -0
- package/dist/chunks/permissions-karmgb0m.js +4 -0
- package/dist/chunks/plan-w0beh9bh.js +2 -0
- package/dist/chunks/plugin-6nwptn3s.js +2 -0
- package/dist/chunks/pluginStartupCheck-0nzv1ae9.js +2 -0
- package/dist/chunks/{plugins-pe89pa7p.js → plugins-vvf897b4.js} +2 -2
- package/dist/chunks/{preauthorizedConfig-g0aq6f03.js → preauthorizedConfig-p02f23jb.js} +1 -1
- package/dist/chunks/{print-cjjnhg9d.js → print-krwpbp2j.js} +4 -4
- package/dist/chunks/privacy-settings-m0mfykh0.js +2 -0
- package/dist/chunks/process-26nny2p0.js +2 -0
- package/dist/chunks/processBashCommand-8fqgv2ec.js +2 -0
- package/dist/chunks/{processSlashCommand-6d8rnm8v.js → processSlashCommand-q32wy80b.js} +1 -1
- package/dist/chunks/prompt-gw1e1gef.js +2 -0
- package/dist/chunks/prompt-xgw2hxrc.js +2 -0
- package/dist/chunks/provider-prompt-s26vatcw.js +2 -0
- package/dist/chunks/rate-limit-options-rd4rjfv5.js +2 -0
- package/dist/chunks/registry-fp7x9ekd.js +2 -0
- package/dist/chunks/release-notes-76y1r2s1.js +6 -0
- package/dist/chunks/reload-plugins-z0fepkva.js +3 -0
- package/dist/chunks/remote-env-nn9ngr99.js +2 -0
- package/dist/chunks/remoteBridgeCore-cg7qd8m4.js +2 -0
- package/dist/chunks/rename-fdjzyjar.js +2 -0
- package/dist/chunks/resume-4rvj8jbz.js +3 -0
- package/dist/chunks/{rewind-cpv2pwfx.js → rewind-r4g5njsg.js} +1 -1
- package/dist/chunks/sandbox-adapter-craea9vm.js +2 -0
- package/dist/chunks/sandbox-toggle-620bkz9q.js +2 -0
- package/dist/chunks/session-5vm1vwv1.js +3 -0
- package/dist/chunks/sessionFileAccessHooks-5jbvwabj.js +2 -0
- package/dist/chunks/sessionStorage-ffkhmn5q.js +2 -0
- package/dist/chunks/settings-s2bcajs6.js +2 -0
- package/dist/chunks/setup-fwcttwbm.js +2 -0
- package/dist/chunks/setup-pf09nfsj.js +7 -0
- package/dist/chunks/{setup-mecsw2ye.js → setup-vegs56f5.js} +1 -1
- package/dist/chunks/sinks-wd4ccgbf.js +2 -0
- package/dist/chunks/skills-evga8f7n.js +2 -0
- package/dist/chunks/startupProfiler-x5zbs2j7.js +2 -0
- package/dist/chunks/state-qpmfrvsv.js +2 -0
- package/dist/chunks/{stats-3v0r4e1v.js → stats-mgqf6r7c.js} +1 -1
- package/dist/chunks/status-78yks3jw.js +2 -0
- package/dist/chunks/stickers-bdp8w2gr.js +2 -0
- package/dist/chunks/subprocessEnv-s797f06r.js +2 -0
- package/dist/chunks/{systemPromptSections-htbs443y.js → systemPromptSections-07y2z2wn.js} +1 -1
- package/dist/chunks/tag-gd73kstd.js +12 -0
- package/dist/chunks/tasks-63qaca0z.js +2 -0
- package/dist/chunks/{teamHelpers-dddedf19.js → teamHelpers-8ykc4bxa.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-ae9r29dy.js +2 -0
- package/dist/chunks/teleport-es58k4xz.js +2 -0
- package/dist/chunks/terminalSetup-gyh5z5e2.js +2 -0
- package/dist/chunks/theme-qrhbaht6.js +2 -0
- package/dist/chunks/thinkback-5bs7ezv5.js +2 -0
- package/dist/chunks/thinkback-play-1dy160y5.js +2 -0
- package/dist/chunks/toolSearch-6cv284b7.js +2 -0
- package/dist/chunks/trustedDevice-77ketbgg.js +2 -0
- package/dist/chunks/{ultrareviewCommand-jtmh2xb1.js → ultrareviewCommand-j23bjbf8.js} +1 -1
- package/dist/chunks/{update-mkzzbt54.js → update-w8wdxh3m.js} +1 -1
- package/dist/chunks/upgrade-nft7c1yk.js +2 -0
- package/dist/chunks/{upstreamproxy-hbbvxzb5.js → upstreamproxy-x405ef9p.js} +1 -1
- package/dist/chunks/usage-s5qgc615.js +2 -0
- package/dist/chunks/util-1geb93kp.js +2 -0
- package/dist/chunks/utils-6sb44pg8.js +2 -0
- package/dist/chunks/vim-kq91w44a.js +2 -0
- package/dist/chunks/worktree-0af6b1mt.js +2 -0
- package/dist/chunks/worktreeModeEnabled-ea6wb7aj.js +2 -0
- package/dist/cli.js +1 -1
- package/package.json +4 -1
- package/dist/chunks/App-skattzvx.js +0 -2
- package/dist/chunks/ApproveApiKey-1zk1g80v.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-4bd5a65d.js +0 -2
- package/dist/chunks/ClaudeInChromeOnboarding-jrj410t2.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog-2bn5pwwr.js +0 -2
- package/dist/chunks/ConsoleOAuthFlow-8hn6958t.js +0 -2
- package/dist/chunks/Doctor-w0eqwfzb.js +0 -2
- package/dist/chunks/Grove-ygg0z9mr.js +0 -2
- package/dist/chunks/ITermBackend-ht0ds6se.js +0 -2
- package/dist/chunks/InvalidConfigDialog-h2jkde64.js +0 -2
- package/dist/chunks/InvalidSettingsDialog-3p7ehs0t.js +0 -2
- package/dist/chunks/Onboarding-np5yfyy1.js +0 -2
- package/dist/chunks/REPL-8811fta4.js +0 -2
- package/dist/chunks/ResumeConversation-d03pbgnw.js +0 -2
- package/dist/chunks/TeleportProgress-ghjbbh9h.js +0 -2
- package/dist/chunks/TeleportRepoMismatchDialog-hhcyekar.js +0 -2
- package/dist/chunks/TeleportResumeWrapper-66e7dnk5.js +0 -2
- package/dist/chunks/ToolSearchTool-dgwhh0gd.js +0 -2
- package/dist/chunks/TrustDialog-w9tj4t8r.js +0 -2
- package/dist/chunks/TungstenTool-7k2gt6pa.js +0 -2
- package/dist/chunks/add-dir-pg1rb88e.js +0 -2
- package/dist/chunks/agents-mcbqv3h3.js +0 -4
- package/dist/chunks/ant-claude-for-chrome-mcp-c765s2bt.js +0 -2
- package/dist/chunks/api-qvdz0vdp.js +0 -2
- package/dist/chunks/asciicast-ygqjzj6w.js +0 -2
- package/dist/chunks/auth-gkfrn4ga.js +0 -2
- package/dist/chunks/auth-y1hqesm6.js +0 -2
- package/dist/chunks/backgroundHousekeeping-wk8ne1wg.js +0 -2
- package/dist/chunks/branch-yre4hh7s.js +0 -5
- package/dist/chunks/btw-091q02sh.js +0 -2
- package/dist/chunks/buddy-5xd2vjhm.js +0 -2
- package/dist/chunks/caches-g4cc992y.js +0 -2
- package/dist/chunks/chrome-rd8crze6.js +0 -2
- package/dist/chunks/clear-25jzke5j.js +0 -2
- package/dist/chunks/cli-6hvqmebc.js +0 -3
- package/dist/chunks/cli-9hskw92e.js +0 -130
- package/dist/chunks/cli-avcnnw0n.js +0 -3
- package/dist/chunks/cli-e9pafjv1.js +0 -4
- package/dist/chunks/cli-gyp5wyzg.js +0 -3
- package/dist/chunks/cli-jbbxj53h.js +0 -3
- package/dist/chunks/cli-pbp5hza0.js +0 -3
- package/dist/chunks/cli-tzaj50bd.js +0 -3
- package/dist/chunks/cli-xzsc9n84.js +0 -3
- package/dist/chunks/cli-yv1znypb.js +0 -3
- package/dist/chunks/client-037bm52v.js +0 -2
- package/dist/chunks/color-ceqfke15.js +0 -2
- package/dist/chunks/commitAttribution-3ewwca68.js +0 -2
- package/dist/chunks/common-jn8w5r1w.js +0 -2
- package/dist/chunks/compact-631qpkbp.js +0 -4
- package/dist/chunks/config-6em7qq45.js +0 -2
- package/dist/chunks/config-h2e5ra49.js +0 -2
- package/dist/chunks/context-31c3znwn.js +0 -2
- package/dist/chunks/context-noninteractive-q418vz0p.js +0 -2
- package/dist/chunks/conversation-yz22h1cb.js +0 -2
- package/dist/chunks/cost-8rr9expn.js +0 -5
- package/dist/chunks/createSession-jratqxvc.js +0 -2
- package/dist/chunks/desktop-zq22ksq3.js +0 -2
- package/dist/chunks/detectRepository-djxyq37h.js +0 -2
- package/dist/chunks/detection-b18r43da.js +0 -2
- package/dist/chunks/doctor-cs43t62h.js +0 -2
- package/dist/chunks/earlyInput-361tx72y.js +0 -2
- package/dist/chunks/effort-qw83nert.js +0 -9
- package/dist/chunks/executor-rvxyyheh.js +0 -2
- package/dist/chunks/exit-kynz824m.js +0 -2
- package/dist/chunks/export-95j3srp6.js +0 -3
- package/dist/chunks/extra-usage-hxyp53v5.js +0 -2
- package/dist/chunks/extra-usage-noninteractive-53w28t1j.js +0 -2
- package/dist/chunks/fast-ec1hxnv7.js +0 -2
- package/dist/chunks/feedback-qtsk3t9f.js +0 -2
- package/dist/chunks/firstPartyEventLogger-4yfx731e.js +0 -2
- package/dist/chunks/gates-85t459a0.js +0 -2
- package/dist/chunks/git-e0mvprv8.js +0 -2
- package/dist/chunks/goal-ywc7exvv.js +0 -2
- package/dist/chunks/growthbook-ykj8089v.js +0 -2
- package/dist/chunks/heapdump-w6a13cfe.js +0 -7
- package/dist/chunks/help-enq1htxe.js +0 -2
- package/dist/chunks/hooks-wxm384wn.js +0 -2
- package/dist/chunks/initReplBridge-acrf7hyb.js +0 -2
- package/dist/chunks/ink-9vrw9yhe.js +0 -2
- package/dist/chunks/install-c8gv4wfg.js +0 -2
- package/dist/chunks/install-slack-app-1aqgxsb6.js +0 -2
- package/dist/chunks/keybindings-v92d2xht.js +0 -3
- package/dist/chunks/loadAgentsDir-k53rdwbr.js +0 -2
- package/dist/chunks/loadPluginHooks-rmzgs29p.js +0 -2
- package/dist/chunks/login-j9bz1g34.js +0 -2
- package/dist/chunks/logout-58wm6hsc.js +0 -2
- package/dist/chunks/mcp-z3j236hk.js +0 -3
- package/dist/chunks/mcp-zryxxcaz.js +0 -2
- package/dist/chunks/mcpServer-b2m7ewct.js +0 -2
- package/dist/chunks/mcpServer-xpq096r4.js +0 -2
- package/dist/chunks/memory-5tvqvktk.js +0 -4
- package/dist/chunks/model-cta1svwb.js +0 -3
- package/dist/chunks/model-d96jkka7.js +0 -2
- package/dist/chunks/parser-jpf6bfmz.js +0 -2
- package/dist/chunks/passes-reh6ja9j.js +0 -2
- package/dist/chunks/permissions-xgydmrq2.js +0 -4
- package/dist/chunks/plan-z4k8zj56.js +0 -2
- package/dist/chunks/plugin-0tztmcsg.js +0 -2
- package/dist/chunks/pluginStartupCheck-vxmkvt40.js +0 -2
- package/dist/chunks/privacy-settings-zbrc40a1.js +0 -2
- package/dist/chunks/process-msr26xa0.js +0 -2
- package/dist/chunks/processBashCommand-hnhy8brr.js +0 -2
- package/dist/chunks/prompt-cfaneybz.js +0 -2
- package/dist/chunks/prompt-wg6hfj0k.js +0 -2
- package/dist/chunks/provider-prompt-c8wew66t.js +0 -2
- package/dist/chunks/rate-limit-options-fyjqpxp3.js +0 -2
- package/dist/chunks/registry-ht9aazng.js +0 -2
- package/dist/chunks/release-notes-5v16zb9c.js +0 -6
- package/dist/chunks/reload-plugins-apyma8vs.js +0 -3
- package/dist/chunks/remote-env-p6ym55w6.js +0 -2
- package/dist/chunks/remoteBridgeCore-0v9x8112.js +0 -2
- package/dist/chunks/rename-j9rc9dwj.js +0 -2
- package/dist/chunks/resume-tbr3mkch.js +0 -3
- package/dist/chunks/sandbox-adapter-qh943bs4.js +0 -2
- package/dist/chunks/sandbox-toggle-1f70ejwk.js +0 -2
- package/dist/chunks/session-42zhjgd2.js +0 -3
- package/dist/chunks/sessionFileAccessHooks-1nh915er.js +0 -2
- package/dist/chunks/sessionStorage-j5m0nf55.js +0 -2
- package/dist/chunks/settings-c709knqg.js +0 -2
- package/dist/chunks/setup-0n2p20yw.js +0 -7
- package/dist/chunks/setup-2hqyyxff.js +0 -2
- package/dist/chunks/sinks-q6etaenz.js +0 -2
- package/dist/chunks/skills-xads3027.js +0 -2
- package/dist/chunks/startupProfiler-4wmjq0yd.js +0 -2
- package/dist/chunks/state-edaz98bj.js +0 -2
- package/dist/chunks/status-9rtty0ee.js +0 -2
- package/dist/chunks/stickers-m73qwecp.js +0 -2
- package/dist/chunks/subprocessEnv-rass28aq.js +0 -2
- package/dist/chunks/tag-vj93fgp6.js +0 -12
- package/dist/chunks/tasks-avbqta2s.js +0 -2
- package/dist/chunks/teammateModeSnapshot-32yfa4hf.js +0 -2
- package/dist/chunks/teleport-jw6w0rn4.js +0 -2
- package/dist/chunks/terminalSetup-ppt6v9xf.js +0 -2
- package/dist/chunks/theme-2csrfbca.js +0 -2
- package/dist/chunks/thinkback-2ahfejyt.js +0 -2
- package/dist/chunks/thinkback-play-kffa7rdp.js +0 -2
- package/dist/chunks/toolSearch-ptrcr8ec.js +0 -2
- package/dist/chunks/trustedDevice-xvtp79f1.js +0 -2
- package/dist/chunks/upgrade-c4argpvv.js +0 -2
- package/dist/chunks/usage-w30yajzy.js +0 -2
- package/dist/chunks/util-zkawe0w0.js +0 -2
- package/dist/chunks/utils-v86tf27x.js +0 -2
- package/dist/chunks/vim-3stm1kbg.js +0 -2
- package/dist/chunks/worktree-pbeayfjp.js +0 -2
- package/dist/chunks/worktreeModeEnabled-ysks760x.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ch as O,Fh as f,ci as j,hi as qq,ym as M,zm as g}from"./cli-
|
|
2
|
+
import{Ch as O,Fh as f,ci as j,hi as qq,ym as M,zm as g}from"./cli-me4e2p3e.js";import{F1 as u,NW as p,Q2 as G,a3 as y,b1 as F,m1 as D,zW as k}from"./cli-msmzt4c3.js";import{$4 as V,a5 as b}from"./cli-fakdskp6.js";import{E8 as S,J8 as e,j8 as H,o8 as o}from"./cli-4ewb3q42.js";import{d_ as P,e_ as I,h_ as n,l_ as _,p_ as r,v_ as N,y_ as t}from"./cli-hke6r0q8.js";import{Kca as C,bda as d}from"./cli-3ac555qw.js";import{fda as Y}from"./cli-w1d8n9g3.js";import{z as B}from"zod/v4";function v(){let q=G("tengu_harbor_ledger",[]),J=h().safeParse(q);return J.success?J.data:[]}function w(){return G("tengu_harbor",!1)}var h;var z=Y(()=>{b();f();y();h=V(()=>B.array(B.object({marketplace:B.string(),plugin:B.string()})))});import{z as U}from"zod/v4";function kq(q,J,Q){let W=Object.entries(Q??{}).filter(([x])=>l.test(x)).map(([x,$])=>` ${x}="${M($)}"`).join("");return`<${H} source="${M(q)}"${W}>
|
|
3
3
|
${J}
|
|
4
4
|
</${H}>`}function i(q,J){if((q==="team"||q==="enterprise")&&J)return{entries:J,source:"org"};return{entries:v(),source:"ledger"}}function s(q,J){let Q=q.split(":");return J.find((W)=>W.kind==="server"?q===W.name:Q[0]==="plugin"&&Q[1]===W.name)}function Fq(q,J,Q){if(!J?.experimental?.["claude/channel"])return{action:"skip",kind:"capability",reason:"server did not declare claude/channel capability"};if(!w())return{action:"skip",kind:"disabled",reason:"channels feature is not currently available"};if(!F()?.accessToken)return{action:"skip",kind:"auth",reason:"channels requires claude.ai authentication (run /login)"};let W=D(),x=W==="team"||W==="enterprise",$=x?k("policySettings"):void 0;if(x&&$?.channelsEnabled!==!0)return{action:"skip",kind:"policy",reason:"channels not enabled by org policy (set channelsEnabled: true in managed settings)"};let Z=s(q,C());if(!Z)return{action:"skip",kind:"session",reason:`server ${q} not in --channels list for this session`};if(Z.kind==="plugin"){let L=Q?O(Q).marketplace:void 0;if(L!==Z.marketplace)return{action:"skip",kind:"marketplace",reason:`you asked for plugin:${Z.name}@${Z.marketplace} but the installed ${Z.name} plugin is from ${L??"an unknown source"}`};if(!Z.dev){let{entries:E,source:m}=i(W,$?.allowedChannelPlugins);if(!E.some((T)=>T.plugin===Z.name&&T.marketplace===Z.marketplace))return{action:"skip",kind:"allowlist",reason:m==="org"?`plugin ${Z.name}@${Z.marketplace} is not on your org's approved channels list (set allowedChannelPlugins in managed settings)`:`plugin ${Z.name}@${Z.marketplace} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`}}}else if(!Z.dev)return{action:"skip",kind:"allowlist",reason:`server ${Z.name} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`};return{action:"register"}}var zq,c="notifications/claude/channel/permission",Cq,l;var a=Y(()=>{d();o();u();b();f();p();g();z();zq=V(()=>U.object({method:U.literal("notifications/claude/channel"),params:U.object({content:U.string(),meta:U.record(U.string(),U.string()).optional()})})),Cq=V(()=>U.object({method:U.literal(c),params:U.object({request_id:U.string(),behavior:U.enum(["allow","deny"])})})),l=/^[a-zA-Z_][a-zA-Z0-9_]*$/});import{randomBytes as Jq}from"crypto";import{readFile as Qq,rename as Wq,unlink as Zq,writeFile as $q}from"fs/promises";import{join as xq}from"path";function A(){return xq(j(),Kq)}function Vq(q){let J=I(q);if(typeof J!=="object"||J===null||!("plugins"in J)||typeof J.plugins!=="object"||J.plugins===null)return{};let Q=J.plugins,W={};for(let[x,$]of Object.entries(Q))if($&&typeof $==="object"&&"flaggedAt"in $&&typeof $.flaggedAt==="string"){let Z={flaggedAt:$.flaggedAt};if("seenAt"in $&&typeof $.seenAt==="string")Z.seenAt=$.seenAt;W[x]=Z}return W}async function R(){try{let q=await Qq(A(),{encoding:"utf-8"});return Vq(q)}catch{return{}}}async function X(q){let J=A(),Q=`${J}.${Jq(8).toString("hex")}.tmp`;try{await _().mkdir(j());let W=P({plugins:q},null,2);await $q(Q,W,{encoding:"utf-8",mode:384}),await Wq(Q,J),K=q}catch(W){S(W);try{await Zq(Q)}catch{}}}async function yq(){let q=await R(),J=Date.now(),Q=!1;for(let[W,x]of Object.entries(q))if(x.seenAt&&J-new Date(x.seenAt).getTime()>=Uq)delete q[W],Q=!0;if(K=q,Q)await X(q)}function hq(){return K??{}}async function dq(q){if(K===null)K=await R();let J={...K,[q]:{flaggedAt:new Date().toISOString()}};await X(J),N(`Flagged plugin: ${q}`)}async function oq(q){if(K===null)K=await R();let J=new Date().toISOString(),Q=!1,W={...K};for(let x of q){let $=W[x];if($&&!$.seenAt)W[x]={...$,seenAt:J},Q=!0}if(Q)await X(W)}async function pq(q){if(K===null)K=await R();if(!(q in K))return;let{[q]:J,...Q}=K;K=Q,await X(Q)}var Kq="flagged-plugins.json",Uq=172800000,K=null;var Bq=Y(()=>{t();r();e();n();qq()});
|
|
5
|
-
export{z as
|
|
5
|
+
export{z as id,zq as jd,kq as kd,s as ld,Fq as md,a as nd,yq as od,hq as pd,dq as qd,oq as rd,pq as sd,Bq as td};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{BQ as d,CQ as E,DQ as m,FQ as X,fR as e,kP as G}from"./cli-x8xgga1a.js";import{fda as Z}from"./cli-w1d8n9g3.js";import o from"figures";function r(_,q={}){let{showValues:$=!0,hideFunctions:k=!1,themeName:O="dark",treeCharColors:f={}}=q,K=[],P=new WeakSet;function w(j,z){if(!z)return j;return d(z,O)(j)}function Y(j,z,u,a=0){if(typeof j==="string"){K.push(z+w(j,f.value));return}if(typeof j!=="object"||j===null){if($){let v=String(j);K.push(z+w(v,f.value))}return}if(P.has(j)){K.push(z+w("[Circular]",f.value));return}P.add(j);let H=Object.keys(j).filter((v)=>{let t=j[v];if(k&&typeof t==="function")return!1;return!0});H.forEach((v,t)=>{let M=j[v],J=t===H.length-1,D=a===0&&t===0?"":z,y=J?W.lastBranch:W.branch,V=w(y,f.treeChar),b=v.trim()===""?"":w(v,f.key),T=D+V+(b?" "+b:""),N=v.trim()!=="";if(M&&typeof M==="object"&&P.has(M)){let n=w("[Circular]",f.value);K.push(T+(N?": ":T?" ":"")+n)}else if(M&&typeof M==="object"&&!Array.isArray(M)){K.push(T);let n=J?W.empty:W.line,S=w(n,f.treeChar),i=D+S+" ";Y(M,i,J,a+1)}else if(Array.isArray(M))K.push(T+(N?": ":T?" ":"")+"[Array("+M.length+")]");else if($){let n=typeof M==="function"?"[Function]":String(M),S=w(n,f.value);T+=(N?": ":T?" ":"")+S,K.push(T)}else K.push(T)})}let p=Object.keys(_);if(p.length===0)return w("(empty)",f.value);if(p.length===1&&p[0]!==void 0&&p[0].trim()===""&&typeof _[p[0]]==="string"){let j=p[0],z=w(W.lastBranch,f.treeChar),u=w(_[j],f.value);return z+" "+u}return Y(_,"",!0),K.join(`
|
|
3
3
|
`)}var W;var R=Z(()=>{E();W={branch:o.lineUpDownRight,lastBranch:o.lineUpRight,line:o.lineVertical,empty:" "}});import{c as L}from"react/compiler-runtime";import c from"lodash-es/setWith.js";import{jsxDEV as h}from"react/jsx-dev-runtime";function x(_){let q={};return _.forEach(($)=>{if(!$.path){q[""]=$.message;return}let k=$.path.split("."),O=$.path;if($.invalidValue!==null&&$.invalidValue!==void 0&&k.length>0){let f=[];for(let K=0;K<k.length;K++){let P=k[K];if(!P)continue;let w=parseInt(P,10);if(!isNaN(w)&&K===k.length-1){let Y;if(typeof $.invalidValue==="string")Y=`"${$.invalidValue}"`;else if($.invalidValue===null)Y="null";else if($.invalidValue===void 0)Y="undefined";else Y=String($.invalidValue);f.push(Y)}else f.push(P)}O=f.join(".")}c(q,O,$.message,Object)}),q}function $q(_){let q=L(9),{errors:$}=_,[k]=G();if($.length===0)return null;let O,f,K;if(q[0]!==$||q[1]!==k){let w=$.reduce(s,{}),Y=Object.keys(w).sort();O=m,f="column",K=Y.map((p)=>{let j=w[p]||[];j.sort(l);let z=x(j),u=new Map;j.forEach((H)=>{if(H.suggestion||H.docLink){let v=`${H.suggestion||""}|${H.docLink||""}`;if(!u.has(v))u.set(v,{suggestion:H.suggestion,docLink:H.docLink})}});let a=r(z,{showValues:!0,themeName:k,treeCharColors:{treeChar:"inactive",key:"text",value:"inactive"}});return h(m,{flexDirection:"column",children:[h(X,{children:p},void 0,!1,void 0,this),h(m,{marginLeft:1,children:h(X,{dimColor:!0,children:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),u.size>0&&h(m,{flexDirection:"column",marginTop:1,children:Array.from(u.values()).map(A)},void 0,!1,void 0,this)]},p,!0,void 0,this)}),q[0]=$,q[1]=k,q[2]=O,q[3]=f,q[4]=K}else O=q[2],f=q[3],K=q[4];let P;if(q[5]!==O||q[6]!==f||q[7]!==K)P=h(O,{flexDirection:f,children:K},void 0,!1,void 0,this),q[5]=O,q[6]=f,q[7]=K,q[8]=P;else P=q[8];return P}function A(_,q){return h(m,{flexDirection:"column",marginBottom:1,children:[_.suggestion&&h(X,{dimColor:!0,wrap:"wrap",children:_.suggestion},void 0,!1,void 0,this),_.docLink&&h(X,{dimColor:!0,wrap:"wrap",children:["Learn more: ",_.docLink]},void 0,!0,void 0,this)]},`suggestion-pair-${q}`,!0,void 0,this)}function l(_,q){if(!_.path&&q.path)return-1;if(_.path&&!q.path)return 1;return(_.path||"").localeCompare(q.path||"")}function s(_,q){let $=q.file||"(file not specified)";if(!_[$])_[$]=[];return _[$].push(q),_}var g=Z(()=>{e();R()});
|
|
4
4
|
export{$q as ce,g as de};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{G5 as L,H5 as _,J5 as b,K5 as R,L5 as M,M5 as S,N5 as m,O5 as C,P5 as w,Q5 as x,R5 as F,S5 as A,T5 as W,U5 as Y,V5 as T,W5 as h,X5 as y,Y5 as c}from"./cli-w52yvzkn.js";import{fda as I,gda as K}from"./cli-w1d8n9g3.js";function U(J){return J-Date.now()<=v}function r(){return!!Y()?.refreshToken}class O{async startDeviceFlow(J={}){let N=L(J.studioUrl),P=await R(N),Q=p(N,P);if(await J.onPrompt?.({userCode:P.user_code,verificationUriComplete:Q,studioUrl:N}),J.openBrowser)try{await J.openBrowser(Q)}catch{}return await g(N,P,J.pollSignal,J.gatewayUrl)}async ensureFreshTokens(){h();let J=await T();if(!J)return null;if(!U(J.expiresAt))return J;let N=await S(J.studioUrl,J.refreshToken),P={...J,accessToken:N.access_token,refreshToken:N.refresh_token,expiresAt:Date.now()+N.expires_in*1000},Q=W(P);if(!Q.success)throw Error(Q.warning??"Failed to persist refreshed UnieAI tokens");return P}async ensureFreshAccessToken(){return(await this.ensureFreshTokens())?.accessToken??null}async getOrgs(){let J=await this.ensureFreshTokens();if(!J)throw Error("Not logged in to UnieAI Studio.");return x(J.studioUrl,J.accessToken)}async getConfig(J){let N=await this.ensureFreshTokens();if(!N)throw Error("Not logged in to UnieAI Studio.");let P=J??N.activeOrgId;if(!P)throw Error('No active organization. Run "claude auth orgs --unieai" to pick one.');return F(N.studioUrl,N.accessToken,P)}async setActiveOrg(J){let N=await this.ensureFreshTokens();if(!N)throw Error("Not logged in to UnieAI Studio.");let P={...N,activeOrgId:J},Q=W(P);if(!Q.success)throw Error(Q.warning??"Failed to update active organization");return P}async logout(){let J=Y();if(J?.accessToken){let N=J.gatewayKeyId;if(!N&&J.activeOrgId)try{N=(await F(J.studioUrl,J.accessToken,J.activeOrgId))?.provider?.unieai?.options?.apiKeyId}catch{}if(N)await m(J.studioUrl,J.accessToken,N)}if(J?.refreshToken)try{await C(J.studioUrl,J.refreshToken)}catch{}return y()}}function p(J,N){let P=N.verification_uri_complete;if(/^https?:\/\//i.test(P))return P;let Q=P.startsWith("/")?P:`/${P}`;return`${J}${Q}`}async function g(J,N,P,Q){let X=Math.max(N.interval,1)*1000,q=Date.now()+N.expires_in*1000;while(Date.now()<q){if(P?.aborted)return{kind:"error",message:"Login cancelled."};await u(X,P);let Z=await M(J,N.device_code);switch(Z.kind){case"success":return{kind:"success",tokens:await k(J,Z.tokens,Q)};case"pending":continue;case"slow_down":X+=5000;continue;case"expired":return{kind:"expired"};case"denied":return{kind:"denied"};case"error":return{kind:"error",message:Z.description?`${Z.error}: ${Z.description}`:Z.error}}}return{kind:"expired"}}async function k(J,N,P){let Q,X=[];try{Q=await w(J,N.access_token)}catch{}try{X=await x(J,N.access_token)}catch{}let q=P?.trim(),Z={accessToken:N.access_token,refreshToken:N.refresh_token,expiresAt:Date.now()+N.expires_in*1000,studioUrl:J,accountId:Q?.id,email:Q?.email,activeOrgId:X[0]?.id,...q?{gatewayBaseURL:_(q),gatewayBaseURLLocked:!0}:{}},z=W(Z);if(!z.success)throw Error(z.warning??"Failed to persist UnieAI Studio tokens");return Z}async function u(J,N){return new Promise((P)=>{if(N?.aborted){P();return}let Q=setTimeout(()=>{N?.removeEventListener("abort",X),P()},J),X=()=>{clearTimeout(Q),N?.removeEventListener("abort",X),P()};N?.addEventListener("abort",X,{once:!0})})}async function n(){let J=new O;try{return await J.ensureFreshTokens()}catch{return null}}async function i(){try{let{saveGlobalConfig:J}=await import("./config-gj0gbg5g.js"),Q=(await new O().getConfig())?.provider?.unieai,X=Q?.models??{},q=Y()?.studioUrl,Z=q?`UnieAI Studio (${q})`:"UnieAI Studio",z=[],H=[];for(let[$,j]of Object.entries(X)){let B=(j&&typeof j==="object"&&"name"in j&&typeof j.name==="string"?j.name:"")||$;H.push($),z.push({value:$,label:B,description:`${Z} \xB7 ${$}`})}if(J(($)=>({...$,unieaiModelOptionsCache:z})),H.length>0)try{let $=await import("./settings-s2bcajs6.js"),j=$.getSettingsForSource("userSettings")??{},B=j.model;if(!B||!H.includes(B))$.updateSettingsForSource("userSettings",{...j,model:H[0]})}catch{}let D=Q?.options,E=D?.apiKey??Q?.apiKey,G=D?.apiKeyId??Q?.apiKeyId,f=D?.baseURL??Q?.baseURL,V=Y();if(V&&E){let $=b({studioUrl:V.studioUrl,userGatewayUrl:V.gatewayBaseURLLocked?V.gatewayBaseURL:void 0,configBaseURL:f});W({...V,gatewayApiKey:E,gatewayBaseURL:$,...G?{gatewayKeyId:G}:{},availableModelIds:H})}return z.length}catch{return 0}}var v=300000;var a=I(()=>{A();c()});
|
|
3
|
+
export{U as JR,r as KR,O as LR,n as MR,i as NR,a as OR};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$d as r,Wd as b,Xd as I}from"./cli-zjfya500.js";import{OI as i,vI as T}from"./cli-me4e2p3e.js";import{nR as v,rR as h}from"./cli-v9f860t5.js";import{EW as A,F1 as o,NW as n,RT as P,cU as g,g1 as x,t1 as L}from"./cli-msmzt4c3.js";import{U5 as y,Y5 as d}from"./cli-w52yvzkn.js";import{Z5 as k,_5 as W,a6 as G,c6 as R,d6 as F,p6 as p}from"./cli-51720d82.js";import{L7 as E,M7 as m}from"./cli-rvad3yhg.js";import{bda as c,e$ as f,q$ as _}from"./cli-3ac555qw.js";import{fda as u}from"./cli-w1d8n9g3.js";function kq(z){if(z>=70)return"horizontal";return"compact"}function Bq(z,J,q){if(J==="horizontal"){let Y=q,K=S+O+H+Y,Z=z-K,$=Math.max(30,Z),B=Math.min(Y+$+H+O,z-S);if(B<Y+$+H+O)$=B-Y-H-O;return{leftWidth:Y,rightWidth:$,totalWidth:B}}let Q=Math.min(z-S,N+20);return{leftWidth:Q,rightWidth:Q,totalWidth:Q}}function Xq(z,J,q){let Q=Math.max(k(z),k(J),k(q),20);return Math.min(Q+4,N)}function Vq(z){if(!z||z.length>l)return"Welcome back!";return`Welcome back ${z}!`}function Uq(z,J){if(k(z)<=J)return z;let q="/",Q="\u2026",Y=1,K=1,Z=z.split(q),$=Z[0]||"",B=Z[Z.length-1]||"",D=k($),V=k(B);if(Z.length===1)return G(z,J);if($===""&&Y+K+V>=J)return`${q}${G(B,Math.max(1,J-K))}`;if($!==""&&Y*2+K+V>=J)return`${Q}${q}${G(B,Math.max(1,J-Y-K))}`;if(Z.length===2){let X=J-Y-K-V;return`${R($,X)}${Q}${q}${B}`}let M=J-D-V-Y-2*K;if(M<=0){let X=Math.max(0,J-V-Y-2*K);return`${R($,X)}${q}${Q}${q}${B}`}let C=[];for(let X=Z.length-2;X>0;X--){let U=Z[X];if(U&&k(U)+K<=M)C.unshift(U),M-=k(U)+K;else break}if(C.length===0)return`${$}${q}${Q}${q}${B}`;return`${$}${q}${Q}${q}${C.join(q)}${q}${B}`}async function wq(){if(j)return j;let z=f();return j=T(10).then((J)=>{return w=J.filter((q)=>{if(q.isSidechain)return!1;if(q.sessionId===z)return!1;if(q.summary?.includes("I apologize"))return!1;let Q=q.summary&&q.summary!=="No prompt",Y=q.firstPrompt&&q.firstPrompt!=="No prompt";return Q||Y}).slice(0,3),w}).catch(()=>{return w=[],w}),j}function Hq(){return w}function Oq(){let z=process.env.DEMO_VERSION??MACRO.VERSION,J=_(),q=process.env.DEMO_VERSION?"/code/claude":P(E()),Q=J?`${q} in ${J.replace(/^https?:\/\//,"")}`:q,K=y()?.refreshToken?"UnieAI Studio":x()?L():"API Usage Billing",Z=A().agent;return{version:z,cwd:Q,billingType:K,agentName:Z}}function jq(z,J,q){if(k(z)+3+k(J)>q)return{shouldSplit:!0,truncatedModel:F(z,q),truncatedBilling:F(J,q)};return{shouldSplit:!1,truncatedModel:F(z,Math.max(q-k(J)-3,10)),truncatedBilling:J}}function Gq(z){if(process.env.USER_TYPE==="ant"){let K=MACRO.VERSION_CHANGELOG;if(K)return K.trim().split(`
|
|
3
|
+
`).filter(Boolean).slice(0,z);return[]}let J=b();if(!J)return[];let q;try{q=I(J)}catch{return[]}let Q=[],Y=Object.keys(q).sort((K,Z)=>v(K,Z)?-1:1).slice(0,3);for(let K of Y){let Z=q[K];if(Z)Q.push(...Z)}return Q.slice(0,z)}var N=50,l=20,S=4,H=1,O=2,w,j=null;var s=u(()=>{c();W();o();d();m();g();p();r();h();i();n();w=[]});
|
|
4
|
+
export{kq as Cc,Bq as Dc,Xq as Ec,Vq as Fc,Uq as Gc,wq as Hc,Hq as Ic,Oq as Jc,jq as Kc,Gq as Lc,s as Mc};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{S as
|
|
2
|
+
import{c5 as $,g5 as P}from"./cli-mb1qrqw1.js";import{G7 as V,I7 as E}from"./cli-p0vh69b9.js";import{h9 as D,i9 as T}from"./cli-rxb5q8zw.js";import{D9 as k,F9 as O}from"./cli-xpa1neza.js";import{$9 as x,b_ as C,v_ as Z,y_ as N}from"./cli-hke6r0q8.js";import{fda as B}from"./cli-w1d8n9g3.js";import{readdirSync as y}from"fs";import{stat as W}from"fs/promises";import{homedir as F,platform as H,tmpdir as _,userInfo as M}from"os";import{join as J}from"path";function i(){let v=$(),G=F(),q=[];for(let z of X){let j=K[z],Q;switch(v){case"macos":Q=j.macos.dataPath;break;case"linux":case"wsl":Q=j.linux.dataPath;break;case"windows":{if(j.windows.dataPath.length>0){let Y=j.windows.useRoaming?J(G,"AppData","Roaming"):J(G,"AppData","Local");q.push({browser:z,path:J(Y,...j.windows.dataPath)})}continue}}if(Q&&Q.length>0)q.push({browser:z,path:J(G,...Q)})}return q}function c(){let v=$(),G=F(),q=[];for(let z of X){let j=K[z];switch(v){case"macos":if(j.macos.nativeMessagingPath.length>0)q.push({browser:z,path:J(G,...j.macos.nativeMessagingPath)});break;case"linux":case"wsl":if(j.linux.nativeMessagingPath.length>0)q.push({browser:z,path:J(G,...j.linux.nativeMessagingPath)});break;case"windows":break}}return q}function t(){let v=[];for(let G of X){let q=K[G];if(q.windows.registryKey)v.push({browser:G,key:q.windows.registryKey})}return v}async function w(){let v=$();for(let G of X){let q=K[G];switch(v){case"macos":{let z=`/Applications/${q.macos.appName}.app`;try{if((await W(z)).isDirectory())return Z(`[Claude in Chrome] Detected browser: ${q.name}`),G}catch(j){if(!x(j))throw j}break}case"wsl":case"linux":{for(let z of q.linux.binaries)if(await k(z).catch(()=>null))return Z(`[Claude in Chrome] Detected browser: ${q.name}`),G;break}case"windows":{let z=F();if(q.windows.dataPath.length>0){let j=q.windows.useRoaming?J(z,"AppData","Roaming"):J(z,"AppData","Local"),Q=J(j,...q.windows.dataPath);try{if((await W(Q)).isDirectory())return Z(`[Claude in Chrome] Detected browser: ${q.name}`),G}catch(Y){if(!x(Y))throw Y}}break}}}return null}function r(v){return D(v)===S}function o(v){if(L.size>=R&&!L.has(v))L.clear();L.add(v)}async function a(v){let G=$(),q=await w();if(!q)return Z("[Claude in Chrome] No compatible browser found"),!1;let z=K[q];switch(G){case"macos":{let{code:j}=await V("open",["-a",z.macos.appName,v]);return j===0}case"windows":{let{code:j}=await V("rundll32",["url,OpenURL",v]);return j===0}case"wsl":case"linux":{for(let j of z.linux.binaries){let{code:Q}=await V(j,[v]);if(Q===0)return!0}return!1}default:return!1}}function U(){return`/tmp/claude-mcp-browser-bridge-${A()}`}function e(){if(H()==="win32")return`\\\\.\\pipe\\${u()}`;return J(U(),`${process.pid}.sock`)}function jj(){if(H()==="win32")return[`\\\\.\\pipe\\${u()}`];let v=[],G=U();try{let Q=y(G);for(let Y of Q)if(Y.endsWith(".sock"))v.push(J(G,Y))}catch{}let q=`claude-mcp-browser-bridge-${A()}`,z=J(_(),q),j=`/tmp/${q}`;if(!v.includes(z))v.push(z);if(z!==j&&!v.includes(j))v.push(j);return v}function u(){return`claude-mcp-browser-bridge-${A()}`}function A(){try{return M().username||"default"}catch{return process.env.USER||process.env.USERNAME||"default"}}var S="claude-in-chrome",K,X,R=200,L;var b=B(()=>{T();N();C();E();P();O();K={chrome:{name:"Google Chrome",macos:{appName:"Google Chrome",dataPath:["Library","Application Support","Google","Chrome"],nativeMessagingPath:["Library","Application Support","Google","Chrome","NativeMessagingHosts"]},linux:{binaries:["google-chrome","google-chrome-stable"],dataPath:[".config","google-chrome"],nativeMessagingPath:[".config","google-chrome","NativeMessagingHosts"]},windows:{dataPath:["Google","Chrome","User Data"],registryKey:"HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts"}},brave:{name:"Brave",macos:{appName:"Brave Browser",dataPath:["Library","Application Support","BraveSoftware","Brave-Browser"],nativeMessagingPath:["Library","Application Support","BraveSoftware","Brave-Browser","NativeMessagingHosts"]},linux:{binaries:["brave-browser","brave"],dataPath:[".config","BraveSoftware","Brave-Browser"],nativeMessagingPath:[".config","BraveSoftware","Brave-Browser","NativeMessagingHosts"]},windows:{dataPath:["BraveSoftware","Brave-Browser","User Data"],registryKey:"HKCU\\Software\\BraveSoftware\\Brave-Browser\\NativeMessagingHosts"}},arc:{name:"Arc",macos:{appName:"Arc",dataPath:["Library","Application Support","Arc","User Data"],nativeMessagingPath:["Library","Application Support","Arc","User Data","NativeMessagingHosts"]},linux:{binaries:[],dataPath:[],nativeMessagingPath:[]},windows:{dataPath:["Arc","User Data"],registryKey:"HKCU\\Software\\ArcBrowser\\Arc\\NativeMessagingHosts"}},chromium:{name:"Chromium",macos:{appName:"Chromium",dataPath:["Library","Application Support","Chromium"],nativeMessagingPath:["Library","Application Support","Chromium","NativeMessagingHosts"]},linux:{binaries:["chromium","chromium-browser"],dataPath:[".config","chromium"],nativeMessagingPath:[".config","chromium","NativeMessagingHosts"]},windows:{dataPath:["Chromium","User Data"],registryKey:"HKCU\\Software\\Chromium\\NativeMessagingHosts"}},edge:{name:"Microsoft Edge",macos:{appName:"Microsoft Edge",dataPath:["Library","Application Support","Microsoft Edge"],nativeMessagingPath:["Library","Application Support","Microsoft Edge","NativeMessagingHosts"]},linux:{binaries:["microsoft-edge","microsoft-edge-stable"],dataPath:[".config","microsoft-edge"],nativeMessagingPath:[".config","microsoft-edge","NativeMessagingHosts"]},windows:{dataPath:["Microsoft","Edge","User Data"],registryKey:"HKCU\\Software\\Microsoft\\Edge\\NativeMessagingHosts"}},vivaldi:{name:"Vivaldi",macos:{appName:"Vivaldi",dataPath:["Library","Application Support","Vivaldi"],nativeMessagingPath:["Library","Application Support","Vivaldi","NativeMessagingHosts"]},linux:{binaries:["vivaldi","vivaldi-stable"],dataPath:[".config","vivaldi"],nativeMessagingPath:[".config","vivaldi","NativeMessagingHosts"]},windows:{dataPath:["Vivaldi","User Data"],registryKey:"HKCU\\Software\\Vivaldi\\NativeMessagingHosts"}},opera:{name:"Opera",macos:{appName:"Opera",dataPath:["Library","Application Support","com.operasoftware.Opera"],nativeMessagingPath:["Library","Application Support","com.operasoftware.Opera","NativeMessagingHosts"]},linux:{binaries:["opera"],dataPath:[".config","opera"],nativeMessagingPath:[".config","opera","NativeMessagingHosts"]},windows:{dataPath:["Opera Software","Opera Stable"],registryKey:"HKCU\\Software\\Opera Software\\Opera Stable\\NativeMessagingHosts",useRoaming:!0}}},X=["chrome","brave","arc","edge","chromium","vivaldi","opera"];L=new Set});
|
|
3
|
+
export{S as ZM,i as _M,c as $M,t as aN,r as bN,o as cN,a as dN,U as eN,e as fN,jj as gN,b as hN};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{C6 as
|
|
2
|
+
import{C6 as L,G6 as O}from"./cli-ezs5sney.js";import{fda as N}from"./cli-w1d8n9g3.js";function S(){if(!process.stdin.isTTY||D||process.argv.includes("-p")||process.argv.includes("--print"))return;D=!0,z="";try{process.stdin.setEncoding("utf8"),process.stdin.setRawMode(!0),process.stdin.ref(),F=()=>{let q=process.stdin.read();while(q!==null){if(typeof q==="string")P(q);q=process.stdin.read()}},process.stdin.on("readable",F)}catch{D=!1}}function P(q){let w=0;while(w<q.length){let K=q[w],A=K.charCodeAt(0);if(A===3){J(),process.exit(130);return}if(A===4){J();return}if(A===127||A===8){if(z.length>0){let M=L(z);z=z.slice(0,-(M.length||1))}w++;continue}if(A===27){w++;while(w<q.length&&!(q.charCodeAt(w)>=64&&q.charCodeAt(w)<=126))w++;if(w<q.length)w++;continue}if(A<32&&A!==9&&A!==10&&A!==13){w++;continue}if(A===13){z+=`
|
|
3
3
|
`,w++;continue}z+=K,w++}}function J(){if(!D)return;if(D=!1,F)process.stdin.removeListener("readable",F),F=null}function T(){J();let q=z.trim();return z="",q}function U(){return z.trim().length>0}function V(q){z=q}function W(){return D}var z="",D=!1,F=null;var Q=N(()=>{O()});
|
|
4
|
-
export{S as
|
|
4
|
+
export{S as gR,J as hR,T as iR,U as jR,V as kR,W as lR,Q as mR};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{HK as z,Hk as I,IE as L,Ik as v,JK as x,VE as X}from"./cli-me4e2p3e.js";import{T3 as P,Y3 as w}from"./cli-msw0vv86.js";import{$4 as R,a5 as j}from"./cli-fakdskp6.js";import{Y8 as F,Z8 as A}from"./cli-t9jht3kb.js";import{v_ as k,y_ as b}from"./cli-hke6r0q8.js";import{Taa as C,bda as y}from"./cli-3ac555qw.js";import{fda as H}from"./cli-w1d8n9g3.js";function O(Q){return Q.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function K(Q,Y){let U=Q.match(new RegExp(`<${Y}(?:\\s[^>]*)?>([\\s\\S]*?)<\\/${Y}>`,"i"))?.[1]?.trim();return U?O(U):void 0}function D(Q){return Q.replace(/\s+/g," ").trim()}function B(Q){let Y=K(Q,"command-name"),Z=K(Q,"command-args");if(Y)return D([Y,Z].filter(Boolean).join(" "));let U=Q.replace(M," ");return D(U)}function V(Q){return/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/.test(Q)}var M;var W=H(()=>{M=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{z as f}from"zod/v4";function n(Q){let Y=[];for(let U of Q){if(U.type!=="user"&&U.type!=="assistant")continue;if("isMeta"in U&&U.isMeta)continue;if("origin"in U&&U.origin&&U.origin.kind!=="human")continue;let q=U.message.content;if(typeof q==="string")Y.push(q);else if(Array.isArray(q)){for(let $ of q)if("type"in $&&$.type==="text"&&"text"in $)Y.push($.text)}}let Z=Y.join(`
|
|
3
3
|
`);return Z.length>G?Z.slice(-G):Z}function E(Q){let Y=B(Q);if(!Y)return null;if(Y.length>N)return null;if(V(Y))return null;return Y}async function a(Q,Y){let Z=B(Q);if(!Z)return null;try{let U=await z({systemPrompt:I([_]),userPrompt:Z,outputFormat:{type:"json_schema",schema:{type:"object",properties:{title:{type:"string"}},required:["title"],additionalProperties:!1}},signal:Y,options:{querySource:"generate_session_title",agents:[],isNonInteractiveSession:C(),hasAppendSystemPrompt:!1,mcpTools:[]}}),q=L(U.message.content),$=h().safeParse(P(q)),J=$.success?E($.data.title):null;return F("tengu_session_title_generated",{success:J!==null}),J}catch(U){return k(`generateSessionTitle failed: ${U}`,{level:"error"}),F("tengu_session_title_generated",{success:!1}),null}}var G=1000,N=80,_=`Generate a concise, sentence-case title (3-7 words) that captures the main topic or goal of this coding session. The title should be clear enough that the user recognizes the session in a list. Use sentence case: capitalize only the first word and proper nouns.
|
|
4
4
|
|
|
5
5
|
Return JSON with a single "title" field.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{L as
|
|
2
|
+
import{VE as I,aj as J,bj as f,gw as Q,hE as W,jw as F}from"./cli-me4e2p3e.js";import{T7 as B,U7 as H,o8 as $}from"./cli-4ewb3q42.js";import{bda as Z,e$ as v}from"./cli-3ac555qw.js";import{fda as Y}from"./cli-w1d8n9g3.js";import{randomUUID as P}from"crypto";import U from"strip-ansi";function L(j){return j.flatMap((h)=>{switch(h.type){case"assistant":return[{type:"assistant",message:h.message,uuid:h.uuid,requestId:void 0,timestamp:new Date().toISOString()}];case"user":return[{type:"user",message:h.message,uuid:h.uuid??P(),timestamp:h.timestamp??new Date().toISOString(),isMeta:h.isSynthetic}];case"system":if(h.subtype==="compact_boundary")return[{type:"system",content:"Conversation compacted",level:"info",subtype:"compact_boundary",compactMetadata:X(h.compact_metadata),uuid:h.uuid,timestamp:new Date().toISOString()}];return[];default:return[]}})}function V(j){let h=j.preservedSegment;return{trigger:j.trigger,pre_tokens:j.preTokens,...h&&{preserved_segment:{head_uuid:h.headUuid,anchor_uuid:h.anchorUuid,tail_uuid:h.tailUuid}}}}function X(j){let h=j.preserved_segment;return{trigger:j.trigger,preTokens:j.pre_tokens,...h&&{preservedSegment:{headUuid:h.head_uuid,anchorUuid:h.anchor_uuid,tailUuid:h.tail_uuid}}}}function S(j){return j.flatMap((h)=>{switch(h.type){case"assistant":return[{type:"assistant",message:z(h),session_id:v(),parent_tool_use_id:null,uuid:h.uuid,error:h.error}];case"user":return[{type:"user",message:h.message,session_id:v(),parent_tool_use_id:null,uuid:h.uuid,timestamp:h.timestamp,isSynthetic:h.isMeta||h.isVisibleInTranscriptOnly,...h.toolUseResult!==void 0?{tool_use_result:h.toolUseResult}:{}}];case"system":if(h.subtype==="compact_boundary"&&h.compactMetadata)return[{type:"system",subtype:"compact_boundary",session_id:v(),uuid:h.uuid,compact_metadata:V(h.compactMetadata)}];if(h.subtype==="local_command"&&(h.content.includes(`<${B}>`)||h.content.includes(`<${H}>`)))return[w(h.content,h.uuid)];return[];default:return[]}})}function w(j,h){let x=U(j).replace(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/,"$1").replace(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/,"$1").trim();return{type:"assistant",message:W({content:x}).message,parent_tool_use_id:null,session_id:v(),uuid:h}}function r(j){if(!j)return;return{status:j.status,...j.resetsAt!==void 0&&{resetsAt:j.resetsAt},...j.rateLimitType!==void 0&&{rateLimitType:j.rateLimitType},...j.utilization!==void 0&&{utilization:j.utilization},...j.overageStatus!==void 0&&{overageStatus:j.overageStatus},...j.overageResetsAt!==void 0&&{overageResetsAt:j.overageResetsAt},...j.overageDisabledReason!==void 0&&{overageDisabledReason:j.overageDisabledReason},...j.isUsingOverage!==void 0&&{isUsingOverage:j.isUsingOverage},...j.surpassedThreshold!==void 0&&{surpassedThreshold:j.surpassedThreshold}}}function z(j){let h=j.message.content;if(!Array.isArray(h))return j.message;let x=h.map((q)=>{if(q.type!=="tool_use")return q;if(q.name===J){let y=Q();if(y)return{...q,input:{...q.input,plan:y}}}return q});return{...j.message,content:x}}var G=Y(()=>{Z();$();f();I();F()});
|
|
3
|
+
export{L as Tb,V as Ub,X as Vb,S as Wb,w as Xb,r as Yb,G as Zb};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{AF as z,DF as X}from"./cli-me4e2p3e.js";import{$Y as C,H2 as I,a3 as Q,lZ as H,rZ as P}from"./cli-msmzt4c3.js";import{fda as O}from"./cli-w1d8n9g3.js";import{useEffect as T,useReducer as V}from"react";function v(){let J=z((q)=>q.mainLoopModel),K=z((q)=>q.mainLoopModelForSession),[,N]=V((q)=>q+1,0);return T(()=>I(N),[]),H(K??J??C())}var W=O(()=>{Q();X();P()});
|
|
3
3
|
export{v as ig,W as jg};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{e as
|
|
2
|
+
import{DQ as W,FQ as N,LQ as q_,WQ as E,fR as L,nQ as n,oQ as P_}from"./cli-x8xgga1a.js";import{Z5 as __,_5 as J_}from"./cli-51720d82.js";import{fda as J}from"./cli-w1d8n9g3.js";import{useContext as K_}from"react";function e(){let f=K_(n);if(!f)throw Error("useTerminalSize must be used within an Ink App component");return f}var Z=J(()=>{P_()});function d(f,_){if(_.escape)return"escape";if(_.return)return"enter";if(_.tab)return"tab";if(_.backspace)return"backspace";if(_.delete)return"delete";if(_.upArrow)return"up";if(_.downArrow)return"down";if(_.leftArrow)return"left";if(_.rightArrow)return"right";if(_.pageUp)return"pageup";if(_.pageDown)return"pagedown";if(_.wheelUp)return"wheelup";if(_.wheelDown)return"wheeldown";if(_.home)return"home";if(_.end)return"end";if(f.length===1)return f.toLowerCase();return null}var G=()=>{};function c(f){let _=f.split("+"),q={key:"",ctrl:!1,alt:!1,shift:!1,meta:!1,super:!1};for(let P of _){let $=P.toLowerCase();switch($){case"ctrl":case"control":q.ctrl=!0;break;case"alt":case"opt":case"option":q.alt=!0;break;case"shift":q.shift=!0;break;case"meta":q.meta=!0;break;case"cmd":case"command":case"super":case"win":q.super=!0;break;case"esc":q.key="escape";break;case"return":q.key="enter";break;case"space":q.key=" ";break;case"\u2191":q.key="up";break;case"\u2193":q.key="down";break;case"\u2190":q.key="left";break;case"\u2192":q.key="right";break;default:q.key=$;break}}return q}function w_(f){if(f===" ")return[c("space")];return f.trim().split(/\s+/).map(c)}function j_(f){let _=[];if(f.ctrl)_.push("ctrl");if(f.alt)_.push("alt");if(f.shift)_.push("shift");if(f.meta)_.push("meta");if(f.super)_.push("cmd");let q=M_(f.key);return _.push(q),_.join("+")}function M_(f){switch(f){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"\u2191";case"down":return"\u2193";case"left":return"\u2190";case"right":return"\u2192";case"pageup":return"PageUp";case"pagedown":return"PageDown";case"home":return"Home";case"end":return"End";default:return f}}function a(f){return f.map(j_).join(" ")}function y_(f){let _=[];for(let q of f)for(let[P,$]of Object.entries(q.bindings))_.push({chord:w_(P),action:$,context:q.context});return _}var x=()=>{};function b(f,_,q){let P=q.findLast(($)=>$.action===f&&$.context===_);return P?a(P.chord):void 0}function z_(f,_){let q=d(f,_);if(!q)return null;let P=_.escape?!1:_.meta;return{key:q,ctrl:_.ctrl,alt:P,shift:_.shift,meta:P,super:_.super}}function g(f,_){return f.key===_.key&&f.ctrl===_.ctrl&&f.shift===_.shift&&(f.alt||f.meta)===(_.alt||_.meta)&&f.super===_.super}function O_(f,_){if(f.length>=_.chord.length)return!1;for(let q=0;q<f.length;q++){let P=f[q],$=_.chord[q];if(!P||!$)return!1;if(!g(P,$))return!1}return!0}function v_(f,_){if(f.length!==_.chord.length)return!1;for(let q=0;q<f.length;q++){let P=f[q],$=_.chord[q];if(!P||!$)return!1;if(!g(P,$))return!1}return!0}function t(f,_,q,P,$){if(_.escape&&$!==null)return{type:"chord_cancelled"};let K=z_(f,_);if(!K){if($!==null)return{type:"chord_cancelled"};return{type:"none"}}let w=$?[...$,K]:[K],M=new Set(q),r=P.filter((j)=>M.has(j.context)),Y=new Map;for(let j of r)if(j.chord.length>w.length&&O_(w,j))Y.set(a(j.chord),j.action);let T=!1;for(let j of Y.values())if(j!==null){T=!0;break}if(T)return{type:"chord_started",pending:w};let z;for(let j of r)if(v_(w,j))z=j;if(z){if(z.action===null)return{type:"unbound"};return{type:"match",action:z.action}}if($!==null)return{type:"chord_cancelled"};return{type:"none"}}var l=J(()=>{G();x()});import{c as I}from"react/compiler-runtime";import{createContext as Y_,useContext as r_,useLayoutEffect as T_}from"react";import{jsxDEV as H_}from"react/jsx-dev-runtime";function d_(f){let _=I(24),{bindings:q,pendingChordRef:P,pendingChord:$,setPendingChord:K,activeContexts:w,registerActiveContext:M,unregisterActiveContext:r,handlerRegistryRef:Y,children:T}=f,z;if(_[0]!==q)z=(O,v)=>b(O,v,q),_[0]=q,_[1]=z;else z=_[1];let j=z,D;if(_[2]!==Y)D=(O)=>{let v=Y.current;if(!v)return A_;if(!v.has(O.action))v.set(O.action,new Set);return v.get(O.action).add(O),()=>{let p=v.get(O.action);if(p){if(p.delete(O),p.size===0)v.delete(O.action)}}},_[2]=Y,_[3]=D;else D=_[3];let k=D,m;if(_[4]!==w||_[5]!==Y)m=(O)=>{let v=Y.current;if(!v)return!1;let p=v.get(O);if(!p||p.size===0)return!1;for(let C of p)if(w.has(C.context))return C.handler(),!0;return!1},_[4]=w,_[5]=Y,_[6]=m;else m=_[6];let o=m,H;if(_[7]!==q||_[8]!==P)H=(O,v,p)=>t(O,v,p,q,P.current),_[7]=q,_[8]=P,_[9]=H;else H=_[9];let u;if(_[10]!==w||_[11]!==q||_[12]!==j||_[13]!==o||_[14]!==$||_[15]!==M||_[16]!==k||_[17]!==K||_[18]!==H||_[19]!==r)u={resolve:H,setPendingChord:K,getDisplayText:j,bindings:q,pendingChord:$,activeContexts:w,registerActiveContext:M,unregisterActiveContext:r,registerHandler:k,invokeAction:o},_[10]=w,_[11]=q,_[12]=j,_[13]=o,_[14]=$,_[15]=M,_[16]=k,_[17]=K,_[18]=H,_[19]=r,_[20]=u;else u=_[20];let h=u,A;if(_[21]!==T||_[22]!==h)A=H_(s.Provider,{value:h,children:T},void 0,!1,void 0,this),_[21]=T,_[22]=h,_[23]=A;else A=_[23];return A}function A_(){}function X(){return r_(s)}function G_(f,_){let q=I(5),P=_===void 0?!0:_,$=X(),K,w;if(q[0]!==f||q[1]!==P||q[2]!==$)K=()=>{if(!$||!P)return;return $.registerActiveContext(f),()=>{$.unregisterActiveContext(f)}},w=[f,$,P],q[0]=f,q[1]=P,q[2]=$,q[3]=K,q[4]=w;else K=q[3],w=q[4];T_(K,w)}var s;var i=J(()=>{l();s=Y_(null)});import{useCallback as F,useEffect as U}from"react";function l_(f,_,q={}){let{context:P="Global",isActive:$=!0}=q,K=X();U(()=>{if(!K||!$)return;return K.registerHandler({action:f,context:P,handler:_})},[f,P,_,K,$]);let w=F((M,r,Y)=>{if(!K)return;let T=[...K.activeContexts,P,"Global"],z=[...new Set(T)],j=K.resolve(M,r,z);switch(j.type){case"match":if(K.setPendingChord(null),j.action===f){if(_()!==!1)Y.stopImmediatePropagation()}break;case"chord_started":K.setPendingChord(j.pending),Y.stopImmediatePropagation();break;case"chord_cancelled":K.setPendingChord(null);break;case"unbound":K.setPendingChord(null),Y.stopImmediatePropagation();break;case"none":break}},[f,P,_,K]);E(w,{isActive:$})}function I_(f,_={}){let{context:q="Global",isActive:P=!0}=_,$=X();U(()=>{if(!$||!P)return;let w=[];for(let[M,r]of Object.entries(f))w.push($.registerHandler({action:M,context:q,handler:r}));return()=>{for(let M of w)M()}},[q,f,$,P]);let K=F((w,M,r)=>{if(!$)return;let Y=[...$.activeContexts,q,"Global"],T=[...new Set(Y)],z=$.resolve(w,M,T);switch(z.type){case"match":if($.setPendingChord(null),z.action in f){let j=f[z.action];if(j&&j()!==!1)r.stopImmediatePropagation()}break;case"chord_started":$.setPendingChord(z.pending),r.stopImmediatePropagation();break;case"chord_cancelled":$.setPendingChord(null);break;case"unbound":$.setPendingChord(null),r.stopImmediatePropagation();break;case"none":break}},[q,f,$]);E(K,{isActive:P})}var h_=J(()=>{L();i()});import{c as D_}from"react/compiler-runtime";import{createContext as p_,useContext as R}from"react";function B(){return R(V)!==null}function U_(f){let _=D_(3),q=R(V),P;if(_[0]!==q||_[1]!==f)P=q?{rows:q.rows,columns:q.columns}:f,_[0]=q,_[1]=f,_[2]=P;else P=_[2];return P}function B_(){return R(V)?.scrollRef??null}var V;var Q=J(()=>{V=p_(null)});import{c as o_}from"react/compiler-runtime";import{jsxDEV as S}from"react/jsx-dev-runtime";function f_(f){let _=o_(21),{width:q,color:P,char:$,padding:K,title:w}=f,M=$===void 0?"\u2500":$,r=K===void 0?0:K,{columns:Y}=e(),T=Math.max(0,(q??Y)-r);if(w){let k=__(w)+2,m=Math.max(0,T-k),o=Math.floor(m/2),H=m-o,u=!P,h;if(_[0]!==M||_[1]!==o)h=M.repeat(o),_[0]=M,_[1]=o,_[2]=h;else h=_[2];let A;if(_[3]!==w)A=S(N,{dimColor:!0,children:S(q_,{children:w},void 0,!1,void 0,this)},void 0,!1,void 0,this),_[3]=w,_[4]=A;else A=_[4];let O;if(_[5]!==M||_[6]!==H)O=M.repeat(H),_[5]=M,_[6]=H,_[7]=O;else O=_[7];let v;if(_[8]!==P||_[9]!==u||_[10]!==h||_[11]!==A||_[12]!==O)v=S(N,{color:P,dimColor:u,children:[h," ",A," ",O]},void 0,!0,void 0,this),_[8]=P,_[9]=u,_[10]=h,_[11]=A,_[12]=O,_[13]=v;else v=_[13];return v}let z=!P,j;if(_[14]!==M||_[15]!==T)j=M.repeat(T),_[14]=M,_[15]=T,_[16]=j;else j=_[16];let D;if(_[17]!==P||_[18]!==z||_[19]!==j)D=S(N,{color:P,dimColor:z,children:j},void 0,!1,void 0,this),_[17]=P,_[18]=z,_[19]=j,_[20]=D;else D=_[20];return D}var $_=J(()=>{Z();J_();L()});import{c as u_}from"react/compiler-runtime";import{jsxDEV as y}from"react/jsx-dev-runtime";function O6(f){let _=u_(9),{children:q,color:P}=f;if(B()){let M;if(_[0]!==q)M=y(W,{flexDirection:"column",paddingX:1,flexShrink:0,children:q},void 0,!1,void 0,this),_[0]=q,_[1]=M;else M=_[1];return M}let $;if(_[2]!==P)$=y(f_,{color:P},void 0,!1,void 0,this),_[2]=P,_[3]=$;else $=_[3];let K;if(_[4]!==q)K=y(W,{flexDirection:"column",paddingX:2,children:q},void 0,!1,void 0,this),_[4]=q,_[5]=K;else K=_[5];let w;if(_[6]!==$||_[7]!==K)w=y(W,{flexDirection:"column",paddingTop:1,children:[$,K]},void 0,!0,void 0,this),_[6]=$,_[7]=K,_[8]=w;else w=_[8];return w}var m_=J(()=>{Q();L();$_()});
|
|
3
|
+
export{e as EO,Z as FO,c as GO,w_ as HO,a as IO,y_ as JO,x as KO,b as LO,t as MO,l as NO,d_ as OO,X as PO,G_ as QO,i as RO,l_ as SO,I_ as TO,h_ as UO,V as VO,B as WO,U_ as XO,B_ as YO,Q as ZO,f_ as _O,$_ as $O,O6 as aP,m_ as bP};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Tm as $,bo as w,jo as g}from"./cli-
|
|
3
|
-
export{v as
|
|
2
|
+
import{Tm as $,bo as w,jo as g}from"./cli-me4e2p3e.js";import{fda as Z}from"./cli-w1d8n9g3.js";import U from"lodash-es/partition.js";import V from"lodash-es/uniqBy.js";function v(z,G,X){let[H,J]=U(V([...z,...G],"name"),w),k=(K,Q)=>K.name.localeCompare(Q.name);return[...J.sort(k),...H.sort(k)]}var W=Z(()=>{$();g()});
|
|
3
|
+
export{v as rb,W as sb};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{VJ as
|
|
2
|
+
import{F1 as I,GX as j,JX as h,b1 as f}from"./cli-msmzt4c3.js";import{$4 as y,a5 as E}from"./cli-fakdskp6.js";import{D5 as b,E5 as T}from"./cli-pgg33dhw.js";import{M6 as _,N6 as R}from"./cli-n5s5fnyj.js";import{E8 as F,J8 as D}from"./cli-4ewb3q42.js";import{B9 as Y,C9 as m}from"./cli-kq16afrr.js";import{W9 as k,X9 as X,b_ as O,d_ as M,h_ as U,v_ as W,y_ as z}from"./cli-hke6r0q8.js";import{fda as A}from"./cli-w1d8n9g3.js";import q from"axios";import{randomUUID as c}from"crypto";import N from"zod/v4";function d(J){if(!q.isAxiosError(J))return!1;if(!J.response)return!0;if(J.response.status>=500)return!0;return!1}async function l(J,$){let B;for(let K=0;K<=x;K++)try{return await q.get(J,$)}catch(Q){if(B=Q,!d(Q))throw Q;if(K>=x)throw W(`Teleport request failed after ${K+1} attempts: ${X(Q)}`),Q;let V=S[K]??2000;W(`Teleport request failed (attempt ${K+1}/${x+1}), retrying in ${V}ms: ${X(Q)}`),await b(V)}throw B}async function C(){let J=f()?.accessToken;if(J===void 0)throw Error("Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.");let $=await j();if(!$)throw Error("Unable to get organization UUID");return{accessToken:J,orgUUID:$}}async function $J(){let{accessToken:J,orgUUID:$}=await C(),B=`${Y().BASE_API_URL}/v1/sessions`;try{let K={...L(J),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":$},Q=await l(B,{headers:K});if(Q.status!==200)throw Error(`Failed to fetch code sessions: ${Q.statusText}`);return Q.data.data.map((Z)=>{let v=Z.session_context.sources.find((G)=>G.type==="git_repository"),H=null;if(v?.url){let G=_(v.url);if(G){let[w,P]=G.split("/");if(w&&P)H={name:P,owner:{login:w},default_branch:v.revision||void 0}}}return{id:Z.id,title:Z.title||"Untitled",description:"",status:Z.session_status,repo:H,turns:[],created_at:Z.created_at,updated_at:Z.updated_at}})}catch(K){let Q=k(K);throw F(Q),K}}function L(J){return{Authorization:`Bearer ${J}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"}}async function BJ(J){let{accessToken:$,orgUUID:B}=await C(),K=`${Y().BASE_API_URL}/v1/sessions/${J}`,Q={...L($),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},V=await q.get(K,{headers:Q,timeout:15000,validateStatus:(Z)=>Z<500});if(V.status!==200){let v=V.data?.error?.message;if(V.status===404)throw Error(`Session not found: ${J}`);if(V.status===401)throw Error("Session expired. Please run /login to sign in again.");throw Error(v||`Failed to fetch session: ${V.status} ${V.statusText}`)}return V.data}function NJ(J){return J.session_context.outcomes?.find((B)=>B.type==="git_repository")?.git_info?.branches[0]}async function WJ(J,$,B){try{let{accessToken:K,orgUUID:Q}=await C(),V=`${Y().BASE_API_URL}/v1/sessions/${J}/events`,Z={...L(K),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":Q},H={events:[{uuid:B?.uuid??c(),session_id:J,type:"user",parent_tool_use_id:null,message:{role:"user",content:$}}]};W(`[sendEventToRemoteSession] Sending event to session ${J}`);let G=await q.post(V,H,{headers:Z,validateStatus:(w)=>w<500,timeout:30000});if(G.status===200||G.status===201)return W(`[sendEventToRemoteSession] Successfully sent event to session ${J}`),!0;return W(`[sendEventToRemoteSession] Failed with status ${G.status}: ${M(G.data)}`),!1}catch(K){return W(`[sendEventToRemoteSession] Error: ${X(K)}`),!1}}async function GJ(J,$){try{let{accessToken:B,orgUUID:K}=await C(),Q=`${Y().BASE_API_URL}/v1/sessions/${J}`,V={...L(B),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":K};W(`[updateSessionTitle] Updating title for session ${J}: "${$}"`);let Z=await q.patch(Q,{title:$},{headers:V,validateStatus:(v)=>v<500});if(Z.status===200)return W(`[updateSessionTitle] Successfully updated title for session ${J}`),!0;return W(`[updateSessionTitle] Failed with status ${Z.status}: ${M(Z.data)}`),!1}catch(B){return W(`[updateSessionTitle] Error: ${X(B)}`),!1}}var S,x,VJ="ccr-byoc-2025-07-29",ZJ;var p=A(()=>{m();h();I();z();R();O();E();D();T();U();S=[2000,4000,8000,16000],x=S.length;ZJ=y(()=>N.object({id:N.string(),title:N.string(),description:N.string(),status:N.enum(["idle","working","waiting","completed","archived","cancelled","rejected"]),repo:N.object({name:N.string(),owner:N.object({login:N.string()}),default_branch:N.string().optional()}).nullable(),turns:N.array(N.string()),created_at:N.string(),updated_at:N.string()}))});
|
|
3
|
+
export{VJ as eS,d as fS,l as gS,ZJ as hS,C as iS,$J as jS,L as kS,BJ as lS,NJ as mS,WJ as nS,GJ as oS,p as pS};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Wf as Qq,Xf as Wq}from"./cli-15sqp3mq.js";import{EO as Jq,FO as Dq,TO as i,UO as _q,WO as Lq,YO as Pq,ZO as Sq}from"./cli-akcxtvv9.js";import{DQ as K,FQ as F,fR as jq}from"./cli-x8xgga1a.js";import{Z5 as l,_5 as Eq}from"./cli-51720d82.js";import{fda as wq}from"./cli-w1d8n9g3.js";import{c as o}from"react/compiler-runtime";import{createContext as mq,useContext as s,useEffect as pq,useState as r}from"react";import{jsxDEV as U}from"react/jsx-dev-runtime";function lq(A){let q=o(25),{title:J,color:X,defaultTab:P,children:L,hidden:G,useFullWidth:O,selectedTab:z,onTabChange:Z,banner:g,disableNavigation:a,initialHeaderFocused:n,contentHeight:R,navFromContent:d}=A,Uq=n===void 0?!0:n,Xq=d===void 0?!1:d,{columns:t}=Jq(),Y=L.map(gq),e=P?Y.findIndex((Q)=>P===Q[0]):0,I=z!==void 0,[Yq,Zq]=r(e!==-1?e:0),qq=I?Y.findIndex((Q)=>Q[0]===z):-1,N=I?qq!==-1?qq:0:Yq,M=Pq(),[k,v]=r(Uq),V;if(q[0]===Symbol.for("react.memo_cache_sentinel"))V=()=>v(!0),q[0]=V;else V=q[0];let kq=V,w;if(q[1]===Symbol.for("react.memo_cache_sentinel"))w=()=>v(!1),q[1]=w;else w=q[1];let zq=w,[Nq,Aq]=r(0),E;if(q[2]===Symbol.for("react.memo_cache_sentinel"))E=()=>{return Aq(fq),()=>Aq(Fq)},q[2]=E;else E=q[2];let Mq=E,j=Nq>0,D=(Q)=>{let p=(N+Y.length+Q)%Y.length,H=Y[p]?.[0];if(I&&Z&&H)Z(H);else Zq(p);v(!0)},C=!G&&!a&&k,_;if(q[3]!==C)_={context:"Tabs",isActive:C},q[3]=C,q[4]=_;else _=q[4];i({"tabs:next":()=>D(1),"tabs:previous":()=>D(-1)},_);let S;if(q[5]!==k||q[6]!==G||q[7]!==j)S=(Q)=>{if(!k||!j||G)return;if(Q.key==="down")Q.preventDefault(),v(!1)},q[5]=k,q[6]=G,q[7]=j,q[8]=S;else S=q[8];let T=S,x=Xq&&!k&&j&&!G&&!a,W;if(q[9]!==x)W={context:"Tabs",isActive:x},q[9]=x,q[10]=W;else W=q[10];i({"tabs:next":()=>{D(1),v(!0)},"tabs:previous":()=>{D(-1),v(!0)}},W);let vq=J?l(J)+1:0,Bq=Y.reduce(Hq,0),Kq=vq+Bq,Gq=O?Math.max(0,t-Kq):0,y=O?t:void 0,b=K,yq="column",Oq=0,Rq=!0,u=M?0:void 0,$=!G&&U(K,{flexDirection:"row",gap:1,flexShrink:M?0:void 0,children:[J!==void 0&&U(F,{bold:!0,color:X,children:J},void 0,!1,void 0,this),Y.map((Q,p)=>{let[H,Vq]=Q,h=N===p,c=X&&h&&k;return U(F,{backgroundColor:c?X:void 0,color:c?"inverseText":void 0,inverse:h&&!c,bold:h,children:[" ",Vq," "]},H,!0,void 0,this)}),Gq>0&&U(F,{children:" ".repeat(Gq)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B;if(q[11]!==L||q[12]!==R||q[13]!==y||q[14]!==G||q[15]!==M||q[16]!==N)B=M?U(K,{width:y,marginTop:G?0:1,flexShrink:0,children:U(Qq,{ref:M,flexDirection:"column",flexShrink:0,children:L},N,!1,void 0,this)},void 0,!1,void 0,this):U(K,{width:y,marginTop:G?0:1,height:R,overflowY:R!==void 0?"hidden":void 0,children:L},void 0,!1,void 0,this),q[11]=L,q[12]=R,q[13]=y,q[14]=G,q[15]=M,q[16]=N,q[17]=B;else B=q[17];let m;if(q[18]!==b||q[19]!==g||q[20]!==T||q[21]!==u||q[22]!==$||q[23]!==B)m=U(b,{flexDirection:yq,tabIndex:Oq,autoFocus:Rq,onKeyDown:T,flexShrink:u,children:[$,g,B]},void 0,!0,void 0,this),q[18]=b,q[19]=g,q[20]=T,q[21]=u,q[22]=$,q[23]=B,q[24]=m;else m=q[24];return U(f.Provider,{value:{selectedTab:Y[N][0],width:y,headerFocused:k,focusHeader:kq,blurHeader:zq,registerOptIn:Mq},children:m},void 0,!1,void 0,this)}function Hq(A,q){let[,J]=q;return A+(J?l(J):0)+2+1}function Fq(A){return A-1}function fq(A){return A+1}function gq(A){return[A.props.id??A.props.title,A.props.title]}function oq(A){let q=o(4),{title:J,id:X,children:P}=A,{selectedTab:L,width:G}=s(f),O=Lq();if(L!==(X??J))return null;let z=O?0:void 0,Z;if(q[0]!==P||q[1]!==z||q[2]!==G)Z=U(K,{width:G,flexShrink:z,children:P},void 0,!1,void 0,this),q[0]=P,q[1]=z,q[2]=G,q[3]=Z;else Z=q[3];return Z}function sq(){let{width:A}=s(f);return A}function aq(){let A=o(6),{headerFocused:q,focusHeader:J,blurHeader:X,registerOptIn:P}=s(f),L;if(A[0]!==P)L=[P],A[0]=P,A[1]=L;else L=A[1];pq(P,L);let G;if(A[2]!==X||A[3]!==J||A[4]!==q)G={headerFocused:q,focusHeader:J,blurHeader:X},A[2]=X,A[3]=J,A[4]=q,A[5]=G;else G=A[5];return G}var f;var Iq=wq(()=>{Sq();Dq();Wq();Eq();jq();_q();f=mq({selectedTab:void 0,width:void 0,headerFocused:!1,focusHeader:()=>{},blurHeader:()=>{},registerOptIn:()=>()=>{}})});
|
|
3
3
|
export{lq as gf,oq as hf,sq as if,aq as jf,Iq as kf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{UQ as O,dR as j,fR as v}from"./cli-x8xgga1a.js";import{fda as A}from"./cli-w1d8n9g3.js";import{c as e}from"react/compiler-runtime";import{useLayoutEffect as o}from"react";import{PassThrough as p}from"stream";import z from"strip-ansi";import{jsxDEV as M,Fragment as n}from"react/jsx-dev-runtime";function Y(q){let _=e(5),{children:$}=q,{exit:f}=O(),K,w;if(_[0]!==f)K=()=>{let k=setTimeout(f,0);return()=>clearTimeout(k)},w=[f],_[0]=f,_[1]=K,_[2]=w;else K=_[1],w=_[2];o(K,w);let r;if(_[3]!==$)r=M(n,{children:$},void 0,!1,void 0,this),_[3]=$,_[4]=r;else r=_[4];return r}function h(q){let _=q.indexOf(P);if(_===-1)return q;let $=_+P.length,f=q.indexOf(a,$);if(f===-1)return q;return q.slice($,f)}function H(q,_){return new Promise(async($)=>{let f="",K=new p;if(_!==void 0)K.columns=_;K.on("data",(r)=>{f+=r.toString()}),await(await j(M(Y,{children:q},void 0,!1,void 0,this),{stdout:K,patchConsole:!1})).waitUntilExit(),await $(h(f))})}async function C(q,_){let $=await H(q,_);return z($)}var P="\x1B[?2026h",a="\x1B[?2026l";var D=A(()=>{v()});
|
|
3
3
|
export{H as nf,C as of,D as pf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ac as $,Bc as E}from"./cli-
|
|
3
|
-
export{k as
|
|
2
|
+
import{Ac as $,Bc as E}from"./cli-khs3sj9k.js";import{nf as _,pf as D}from"./cli-c60c9qvm.js";import{DF as K,hn as X,jn as W,zF as Z}from"./cli-me4e2p3e.js";import{OO as Y,RO as C}from"./cli-akcxtvv9.js";import{fda as U}from"./cli-w1d8n9g3.js";import{useRef as N}from"react";import T from"strip-ansi";import{jsxDEV as L}from"react/jsx-dev-runtime";function V({children:q}){let{bindings:F}=X(),H=N(null),G=N(new Map),I=N(new Set).current;return L(Y,{bindings:F,pendingChordRef:H,pendingChord:null,setPendingChord:()=>{},activeContexts:I,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:G,children:q},void 0,!1,void 0,this)}function A(q){if(!("message"in q))return 1;let F=q.message.content;return Array.isArray(F)?F.length:1}async function P(q,F,H,{columns:G,verbose:I=!1,chunkSize:J=40,onProgress:B}={}){let M=(w)=>_(L(Z,{children:L(V,{children:L($,{messages:q,tools:F,commands:[],verbose:I,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:"export",screen:"prompt",streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:w},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),G),O=J;for(let w of q)O+=A(w);for(let w=0;w<O;w+=J){let Q=await M([w,w+J]);if(T(Q).trim()==="")break;await H(Q),B?.(w+J)}}async function k(q,F=[],H){let G=[];return await P(q,F,(I)=>void G.push(T(I)),{columns:H}),G.join("")}var x=U(()=>{E();C();W();K();D()});
|
|
3
|
+
export{k as hb,x as ib};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{FQ as q,fR as h}from"./cli-x8xgga1a.js";import{fda as $}from"./cli-w1d8n9g3.js";import{c as v}from"react/compiler-runtime";import{jsxDEV as K}from"react/jsx-dev-runtime";function r(){let f=v(1),_;if(f[0]===Symbol.for("react.memo_cache_sentinel"))_=K(q,{color:"permission",children:["Press ",K(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to continue\u2026"]},void 0,!0,void 0,this),f[0]=_;else _=f[0];return _}var w=$(()=>{h()});
|
|
3
3
|
export{r as ee,w as fe};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{VR as AJ,aS as oJ}from"./cli-088ac95n.js";import{A4 as ZJ,B4 as $J,F4 as bJ,J4 as SJ,K4 as h,L4 as zJ,T4 as qJ,v4 as PJ,w4 as U}from"./cli-v2hg35qk.js";import{I5 as w,J5 as YJ}from"./cli-avcnnw0n.js";import{$6 as vJ,w7 as gJ}from"./cli-nj726gac.js";import{D7 as xJ,E7 as lJ}from"./cli-hpzy0mat.js";import{B8 as fJ,w8 as L}from"./cli-3bxtq5dc.js";import{$9 as v,T9 as W,U9 as x,Z9 as QJ,a_ as y,d_ as VJ,r_ as G,u_ as XJ}from"./cli-a98b285v.js";import{B_ as a,C_ as l,E_ as e,O_ as JJ}from"./cli-1qszxdan.js";import{$_ as DJ,Paa as s,Zca as t,__ as i,a$ as m,kca as N}from"./cli-w754xmyv.js";import{bda as I,cda as CJ}from"./cli-x514vyva.js";import{mkdir as cJ,readdir as g,readFile as GJ,unlink as KJ,writeFile as u}from"fs/promises";import{join as D}from"path";import{z as _}from"zod/v4";function EQ(J){if(M===J)return;M=J,B()}function UQ(){if(M===void 0)return;M=void 0,B()}function B(){try{RJ.emit()}catch{}}function _J(J){return D(H(J),uJ)}async function o(J){let Q=_J(J);try{let V=(await GJ(Q,"utf-8")).trim(),X=parseInt(V,10);return isNaN(X)?0:X}catch{return 0}}async function WJ(J,Q){let V=_J(J);await u(V,String(Q))}function OQ(){if(e(process.env.CLAUDE_CODE_ENABLE_TASKS))return!0;return!s()}async function CQ(J){let Q=H(J),V=await n(J),X;try{X=await U(V,f);let Z=await EJ(J);if(Z>0){let $=await o(J);if(Z>$)await WJ(J,Z)}let Y;try{Y=await g(Q)}catch{Y=[]}for(let $ of Y)if($.endsWith(".json")&&!$.startsWith(".")){let q=D(Q,$);try{await KJ(q)}catch{}}B()}finally{if(X)await X()}}function xQ(){if(process.env.CLAUDE_CODE_TASK_LIST_ID)return process.env.CLAUDE_CODE_TASK_LIST_ID;let J=$J();if(J)return J.teamName;return h()||M||m()}function HJ(J){return J.replace(/[^a-zA-Z0-9_-]/g,"-")}function H(J){return D(a(),"tasks",HJ(J))}function z(J,Q){return D(H(J),`${HJ(Q)}.json`)}async function FJ(J){let Q=H(J);try{await cJ(Q,{recursive:!0})}catch{}}async function EJ(J){let Q=H(J),V;try{V=await g(Q)}catch{return 0}let X=0;for(let Z of V){if(!Z.endsWith(".json"))continue;let Y=parseInt(Z.replace(".json",""),10);if(!isNaN(Y)&&Y>X)X=Y}return X}async function NJ(J){let[Q,V]=await Promise.all([EJ(J),o(J)]);return Math.max(Q,V)}async function vQ(J,Q){let V=await n(J),X;try{X=await U(V,f);let Z=await NJ(J),Y=String(Z+1),$={id:Y,...Q},q=z(J,Y);return await u(q,v($,null,2)),B(),Y}finally{if(X)await X()}}async function C(J,Q){let V=z(J,Q);try{let X=await GJ(V,"utf-8"),Z=y(X);if(process.env.USER_TYPE==="ant"){if(Z.status==="open")Z.status="pending";else if(Z.status==="resolved")Z.status="completed";else if(Z.status&&["planning","implementing","reviewing","verifying"].includes(Z.status))Z.status="in_progress"}let Y=hJ().safeParse(Z);if(!Y.success)return G(`[Tasks] Task ${Q} failed schema validation: ${Y.error.message}`),null;return Y.data}catch(X){if(x(X)==="ENOENT")return null;return G(`[Tasks] Failed to read task ${Q}: ${W(X)}`),L(X),null}}async function UJ(J,Q,V){let X=await C(J,Q);if(!X)return null;let Z={...X,...V,id:Q},Y=z(J,Q);return await u(Y,v(Z,null,2)),B(),Z}async function j(J,Q,V){let X=z(J,Q);if(!await C(J,Q))return null;let Y;try{return Y=await U(X,f),await UJ(J,Q,V)}finally{await Y?.()}}async function SQ(J,Q){let V=z(J,Q);try{let X=parseInt(Q,10);if(!isNaN(X)){let Y=await o(J);if(X>Y)await WJ(J,X)}try{await KJ(V)}catch(Y){if(x(Y)==="ENOENT")return!1;throw Y}let Z=await F(J);for(let Y of Z){let $=Y.blocks.filter((K)=>K!==Q),q=Y.blockedBy.filter((K)=>K!==Q);if($.length!==Y.blocks.length||q.length!==Y.blockedBy.length)await j(J,Y.id,{blocks:$,blockedBy:q})}return B(),!0}catch{return!1}}async function F(J){let Q=H(J),V;try{V=await g(Q)}catch{return[]}let X=V.filter((Y)=>Y.endsWith(".json")).map((Y)=>Y.replace(".json",""));return(await Promise.all(X.map((Y)=>C(J,Y)))).filter((Y)=>Y!==null)}async function zQ(J,Q,V){let[X,Z]=await Promise.all([C(J,Q),C(J,V)]);if(!X||!Z)return!1;if(!X.blocks.includes(V))await j(J,Q,{blocks:[...X.blocks,V]});if(!Z.blockedBy.includes(Q))await j(J,V,{blockedBy:[...Z.blockedBy,Q]});return!0}function TJ(J){return D(H(J),".lock")}async function n(J){await FJ(J);let Q=TJ(J);try{await u(Q,"",{flag:"wx"})}catch{}return Q}async function AQ(J,Q,V,X={}){let Z=z(J,Q);if(!await C(J,Q))return{success:!1,reason:"task_not_found"};if(X.checkAgentBusy)return IJ(J,Q,V);let $;try{$=await U(Z,f);let q=await C(J,Q);if(!q)return{success:!1,reason:"task_not_found"};if(q.owner&&q.owner!==V)return{success:!1,reason:"already_claimed",task:q};if(q.status==="completed")return{success:!1,reason:"already_resolved",task:q};let K=await F(J),O=new Set(K.filter((A)=>A.status!=="completed").map((A)=>A.id)),T=q.blockedBy.filter((A)=>O.has(A));if(T.length>0)return{success:!1,reason:"blocked",task:q,blockedByTasks:T};return{success:!0,task:await UJ(J,Q,{owner:V})}}catch(q){return G(`[Tasks] Failed to claim task ${Q}: ${W(q)}`),L(q),{success:!1,reason:"task_not_found"}}finally{if($)await $()}}async function IJ(J,Q,V){let X=await n(J),Z;try{Z=await U(X,f);let Y=await F(J),$=Y.find((R)=>R.id===Q);if(!$)return{success:!1,reason:"task_not_found"};if($.owner&&$.owner!==V)return{success:!1,reason:"already_claimed",task:$};if($.status==="completed")return{success:!1,reason:"already_resolved",task:$};let q=new Set(Y.filter((R)=>R.status!=="completed").map((R)=>R.id)),K=$.blockedBy.filter((R)=>q.has(R));if(K.length>0)return{success:!1,reason:"blocked",task:$,blockedByTasks:K};let O=Y.filter((R)=>R.status!=="completed"&&R.owner===V&&R.id!==Q);if(O.length>0)return{success:!1,reason:"agent_busy",task:$,busyWithTasks:O.map((R)=>R.id)};return{success:!0,task:await j(J,Q,{owner:V})}}catch(Y){return G(`[Tasks] Failed to claim task ${Q} with busy check: ${W(Y)}`),L(Y),{success:!1,reason:"task_not_found"}}finally{if(Z)await Z()}}async function MQ(J,Q,V,X){let Y=(await F(J)).filter((K)=>K.status!=="completed"&&(K.owner===Q||K.owner===V));for(let K of Y)await j(J,K.id,{owner:void 0,status:"pending"});if(Y.length>0)G(`[Tasks] Unassigned ${Y.length} task(s) from ${V}`);let q=`${V} ${X==="terminated"?"was terminated":"has shut down"}.`;if(Y.length>0){let K=Y.map((O)=>`#${O.id} "${O.subject}"`).join(", ");q+=` ${Y.length} task(s) were unassigned: ${K}. Use TaskList to check availability and TaskUpdate with owner to reassign them to idle teammates.`}return{unassignedTasks:Y.map((K)=>({id:K.id,subject:K.subject})),notificationMessage:q}}var RJ,M,BQ,LJ,hJ,uJ=".highwatermark",f,jQ="tasklist";var BJ=I(()=>{t();PJ();XJ();JJ();QJ();YJ();ZJ();fJ();DJ();VJ();qJ();bJ();RJ=i();BQ=RJ.subscribe;LJ=w(()=>_.enum(["pending","in_progress","completed"])),hJ=w(()=>_.object({id:_.string(),subject:_.string(),description:_.string(),activeForm:_.string().optional(),owner:_.string().optional(),status:LJ(),blocks:_.array(_.string()),blockedBy:_.array(_.string()),metadata:_.record(_.string(),_.unknown()).optional()})),f={retries:{retries:30,minTimeout:5,maxTimeout:100}}});function k(J){return J==="tmux"||J==="iterm2"}var OJ=()=>{};import{mkdirSync as nJ,readFileSync as kJ,writeFileSync as dJ}from"fs";import{mkdir as MJ,readFile as jJ,rm as d,writeFile as r}from"fs/promises";import{join as p}from"path";import{z as P}from"zod/v4";function yJ(J){return J.replace(/[^a-zA-Z0-9]/g,"-").toLowerCase()}function kQ(J){return J.replace(/@/g,"-")}function b(J){return p(l(),yJ(J))}function c(J){return p(b(J),"config.json")}function E(J){try{let Q=kJ(c(J),"utf-8");return y(Q)}catch(Q){if(x(Q)==="ENOENT")return null;return G(`[TeammateTool] Failed to read team file for ${J}: ${W(Q)}`),null}}async function wJ(J){try{let Q=await jJ(c(J),"utf-8");return y(Q)}catch(Q){if(x(Q)==="ENOENT")return null;return G(`[TeammateTool] Failed to read team file for ${J}: ${W(Q)}`),null}}function S(J,Q){let V=b(J);nJ(V,{recursive:!0}),dJ(c(J),v(Q,null,2))}async function rJ(J,Q){let V=b(J);await MJ(V,{recursive:!0}),await r(c(J),v(Q,null,2))}async function dQ(J,Q){let V=b(J),X=c(J),Z=`${X}.lock`;await MJ(V,{recursive:!0});try{await r(X,"{}",{encoding:"utf-8",flag:"wx"})}catch($){if(x($)!=="EEXIST")throw $}let Y=await U(X,{lockfilePath:Z,retries:{retries:10,minTimeout:5,maxTimeout:100}});try{let $=await wJ(J);if(!$||!Array.isArray($.members))throw Error(`Team "${J}" does not exist`);let q=Q($)??$;return await r(X,v(q,null,2)),q}finally{await Y()}}function rQ(J,Q){let V=Q.agentId||Q.name;if(!V)return G("[TeammateTool] removeTeammateFromTeamFile called with no identifier"),!1;let X=E(J);if(!X)return G(`[TeammateTool] Cannot remove teammate ${V}: failed to read team file for "${J}"`),!1;let Z=X.members.length;if(X.members=X.members.filter((Y)=>{if(Q.agentId&&Y.agentId===Q.agentId)return!1;if(Q.name&&Y.name===Q.name)return!1;return!0}),X.members.length===Z)return G(`[TeammateTool] Teammate ${V} not found in team file for "${J}"`),!1;return S(J,X),G(`[TeammateTool] Removed teammate from team file: ${V}`),!0}function iQ(J,Q){let V=E(J);if(!V)return!1;let X=V.hiddenPaneIds??[];if(!X.includes(Q))X.push(Q),V.hiddenPaneIds=X,S(J,V),G(`[TeammateTool] Added ${Q} to hidden panes for team ${J}`);return!0}function mQ(J,Q){let V=E(J);if(!V)return!1;let X=V.hiddenPaneIds??[],Z=X.indexOf(Q);if(Z!==-1)X.splice(Z,1),V.hiddenPaneIds=X,S(J,V),G(`[TeammateTool] Removed ${Q} from hidden panes for team ${J}`);return!0}function sQ(J,Q){let V=E(J);if(!V)return!1;let X=V.members.findIndex((Z)=>Z.tmuxPaneId===Q);if(X===-1)return!1;if(V.members.splice(X,1),V.hiddenPaneIds){let Z=V.hiddenPaneIds.indexOf(Q);if(Z!==-1)V.hiddenPaneIds.splice(Z,1)}return S(J,V),G(`[TeammateTool] Removed member with pane ${Q} from team ${J}`),!0}function tQ(J,Q){let V=E(J);if(!V)return!1;let X=V.members.findIndex((Z)=>Z.agentId===Q);if(X===-1)return!1;return V.members.splice(X,1),S(J,V),G(`[TeammateTool] Removed member ${Q} from team ${J}`),!0}function iJ(J,Q,V){let X=E(J);if(!X)return!1;let Z=X.members.find(($)=>$.name===Q);if(!Z)return G(`[TeammateTool] Cannot set member mode: member ${Q} not found in team ${J}`),!1;if(Z.mode===V)return!0;let Y=X.members.map(($)=>$.name===Q?{...$,mode:V}:$);return S(J,{...X,members:Y}),G(`[TeammateTool] Set member ${Q} in team ${J} to mode: ${V}`),!0}function aQ(J,Q){if(!zJ())return;let V=Q??h(),X=SJ();if(V&&X)iJ(V,X,J)}function eQ(J,Q){let V=E(J);if(!V)return!1;let X=new Map(Q.map(($)=>[$.memberName,$.mode])),Z=!1,Y=V.members.map(($)=>{let q=X.get($.name);if(q!==void 0&&$.mode!==q)return Z=!0,{...$,mode:q};return $});if(Z)S(J,{...V,members:Y}),G(`[TeammateTool] Set ${Q.length} member modes in team ${J}`);return!0}async function JV(J,Q,V){let X=await wJ(J);if(!X){G(`[TeammateTool] Cannot set member active: team ${J} not found`);return}let Z=X.members.find((Y)=>Y.name===Q);if(!Z){G(`[TeammateTool] Cannot set member active: member ${Q} not found in team ${J}`);return}if(Z.isActive===V)return;Z.isActive=V,await rJ(J,X),G(`[TeammateTool] Set member ${Q} in team ${J} to ${V?"active":"idle"}`)}async function mJ(J){let Q=p(J,".git"),V=null;try{let Z=(await jJ(Q,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(Z&&Z[1]){let Y=Z[1],$=p(Y,"..","..");V=p($,"..")}}catch{}if(V){let X=await xJ(vJ(),["worktree","remove","--force",J],{cwd:V});if(X.code===0){G(`[TeammateTool] Removed worktree via git: ${J}`);return}if(X.stderr?.includes("not a working tree")){G(`[TeammateTool] Worktree already removed: ${J}`);return}G(`[TeammateTool] git worktree remove failed, falling back to rm: ${X.stderr}`)}try{await d(J,{recursive:!0,force:!0}),G(`[TeammateTool] Removed worktree directory manually: ${J}`)}catch(X){G(`[TeammateTool] Failed to remove worktree ${J}: ${W(X)}`)}}function QV(J){N().add(J)}function VV(J){N().delete(J)}async function XV(){let J=N();if(J.size===0)return;let Q=Array.from(J);G(`cleanupSessionTeams: removing ${Q.length} orphan team dir(s): ${Q.join(", ")}`),await Promise.allSettled(Q.map((V)=>sJ(V))),await Promise.allSettled(Q.map((V)=>tJ(V))),J.clear()}async function sJ(J){let Q=E(J);if(!Q)return;let V=Q.members.filter((q)=>q.name!==AJ&&q.tmuxPaneId&&q.backendType&&k(q.backendType));if(V.length===0)return;let[{ensureBackendsRegistered:X,getBackendByType:Z},{isInsideTmux:Y}]=await Promise.all([import("./registry-ht9aazng.js"),import("./detection-b18r43da.js")]);await X();let $=!await Y();await Promise.allSettled(V.map(async(q)=>{if(!q.tmuxPaneId||!q.backendType||!k(q.backendType))return;let K=await Z(q.backendType).killPane(q.tmuxPaneId,$);G(`cleanupSessionTeams: killPane ${q.name} (${q.backendType} ${q.tmuxPaneId}) \u2192 ${K}`)}))}async function tJ(J){let Q=yJ(J),V=E(J),X=[];if(V){for(let $ of V.members)if($.worktreePath)X.push($.worktreePath)}for(let $ of X)await mJ($);let Z=b(J);try{await d(Z,{recursive:!0,force:!0}),G(`[TeammateTool] Cleaned up team directory: ${Z}`)}catch($){G(`[TeammateTool] Failed to clean up team directory ${Z}: ${W($)}`)}let Y=H(Q);try{await d(Y,{recursive:!0,force:!0}),G(`[TeammateTool] Cleaned up tasks directory: ${Y}`),B()}catch($){G(`[TeammateTool] Failed to clean up tasks directory ${Y}: ${W($)}`)}}var nQ;var aJ=I(()=>{t();XJ();JJ();QJ();lJ();gJ();YJ();ZJ();VJ();BJ();qJ();OJ();oJ();nQ=w(()=>P.strictObject({operation:P.enum(["spawnTeam","cleanup"]).describe("Operation: spawnTeam to create a team, cleanup to remove team and task directories."),agent_type:P.string().optional().describe('Type/role of the team lead (e.g., "researcher", "test-runner"). Used for team file and inter-agent coordination.'),team_name:P.string().optional().describe("Name for the new team to create (required for spawnTeam)."),description:P.string().optional().describe("Team description/purpose (only used with spawnTeam).")}))});
|
|
2
|
+
import{YR as AJ,dS as oJ}from"./cli-wt2bfbn0.js";import{D4 as qJ,f4 as PJ,g4 as U,k4 as ZJ,l4 as $J,p4 as bJ,t4 as SJ,u4 as h,v4 as zJ}from"./cli-s6vr7213.js";import{$4 as w,a5 as YJ}from"./cli-fakdskp6.js";import{A7 as gJ,d7 as vJ}from"./cli-fdya77ch.js";import{H7 as xJ,I7 as lJ}from"./cli-p0vh69b9.js";import{E8 as L,J8 as fJ}from"./cli-4ewb3q42.js";import{X9 as W,Y9 as x,b_ as QJ,d_ as v,e_ as y,h_ as VJ,v_ as G,y_ as XJ}from"./cli-hke6r0q8.js";import{F_ as a,G_ as l,I_ as e,S_ as JJ}from"./cli-tq5z9qv3.js";import{Taa as s,bda as t,c$ as i,d$ as DJ,e$ as m,oca as N}from"./cli-3ac555qw.js";import{fda as I,gda as CJ}from"./cli-w1d8n9g3.js";import{mkdir as cJ,readdir as g,readFile as GJ,unlink as KJ,writeFile as u}from"fs/promises";import{join as D}from"path";import{z as _}from"zod/v4";function EQ(J){if(M===J)return;M=J,B()}function UQ(){if(M===void 0)return;M=void 0,B()}function B(){try{RJ.emit()}catch{}}function _J(J){return D(H(J),uJ)}async function o(J){let Q=_J(J);try{let V=(await GJ(Q,"utf-8")).trim(),X=parseInt(V,10);return isNaN(X)?0:X}catch{return 0}}async function WJ(J,Q){let V=_J(J);await u(V,String(Q))}function OQ(){if(e(process.env.CLAUDE_CODE_ENABLE_TASKS))return!0;return!s()}async function CQ(J){let Q=H(J),V=await n(J),X;try{X=await U(V,f);let Z=await EJ(J);if(Z>0){let $=await o(J);if(Z>$)await WJ(J,Z)}let Y;try{Y=await g(Q)}catch{Y=[]}for(let $ of Y)if($.endsWith(".json")&&!$.startsWith(".")){let q=D(Q,$);try{await KJ(q)}catch{}}B()}finally{if(X)await X()}}function xQ(){if(process.env.CLAUDE_CODE_TASK_LIST_ID)return process.env.CLAUDE_CODE_TASK_LIST_ID;let J=$J();if(J)return J.teamName;return h()||M||m()}function HJ(J){return J.replace(/[^a-zA-Z0-9_-]/g,"-")}function H(J){return D(a(),"tasks",HJ(J))}function z(J,Q){return D(H(J),`${HJ(Q)}.json`)}async function FJ(J){let Q=H(J);try{await cJ(Q,{recursive:!0})}catch{}}async function EJ(J){let Q=H(J),V;try{V=await g(Q)}catch{return 0}let X=0;for(let Z of V){if(!Z.endsWith(".json"))continue;let Y=parseInt(Z.replace(".json",""),10);if(!isNaN(Y)&&Y>X)X=Y}return X}async function NJ(J){let[Q,V]=await Promise.all([EJ(J),o(J)]);return Math.max(Q,V)}async function vQ(J,Q){let V=await n(J),X;try{X=await U(V,f);let Z=await NJ(J),Y=String(Z+1),$={id:Y,...Q},q=z(J,Y);return await u(q,v($,null,2)),B(),Y}finally{if(X)await X()}}async function C(J,Q){let V=z(J,Q);try{let X=await GJ(V,"utf-8"),Z=y(X);if(process.env.USER_TYPE==="ant"){if(Z.status==="open")Z.status="pending";else if(Z.status==="resolved")Z.status="completed";else if(Z.status&&["planning","implementing","reviewing","verifying"].includes(Z.status))Z.status="in_progress"}let Y=hJ().safeParse(Z);if(!Y.success)return G(`[Tasks] Task ${Q} failed schema validation: ${Y.error.message}`),null;return Y.data}catch(X){if(x(X)==="ENOENT")return null;return G(`[Tasks] Failed to read task ${Q}: ${W(X)}`),L(X),null}}async function UJ(J,Q,V){let X=await C(J,Q);if(!X)return null;let Z={...X,...V,id:Q},Y=z(J,Q);return await u(Y,v(Z,null,2)),B(),Z}async function j(J,Q,V){let X=z(J,Q);if(!await C(J,Q))return null;let Y;try{return Y=await U(X,f),await UJ(J,Q,V)}finally{await Y?.()}}async function SQ(J,Q){let V=z(J,Q);try{let X=parseInt(Q,10);if(!isNaN(X)){let Y=await o(J);if(X>Y)await WJ(J,X)}try{await KJ(V)}catch(Y){if(x(Y)==="ENOENT")return!1;throw Y}let Z=await F(J);for(let Y of Z){let $=Y.blocks.filter((K)=>K!==Q),q=Y.blockedBy.filter((K)=>K!==Q);if($.length!==Y.blocks.length||q.length!==Y.blockedBy.length)await j(J,Y.id,{blocks:$,blockedBy:q})}return B(),!0}catch{return!1}}async function F(J){let Q=H(J),V;try{V=await g(Q)}catch{return[]}let X=V.filter((Y)=>Y.endsWith(".json")).map((Y)=>Y.replace(".json",""));return(await Promise.all(X.map((Y)=>C(J,Y)))).filter((Y)=>Y!==null)}async function zQ(J,Q,V){let[X,Z]=await Promise.all([C(J,Q),C(J,V)]);if(!X||!Z)return!1;if(!X.blocks.includes(V))await j(J,Q,{blocks:[...X.blocks,V]});if(!Z.blockedBy.includes(Q))await j(J,V,{blockedBy:[...Z.blockedBy,Q]});return!0}function TJ(J){return D(H(J),".lock")}async function n(J){await FJ(J);let Q=TJ(J);try{await u(Q,"",{flag:"wx"})}catch{}return Q}async function AQ(J,Q,V,X={}){let Z=z(J,Q);if(!await C(J,Q))return{success:!1,reason:"task_not_found"};if(X.checkAgentBusy)return IJ(J,Q,V);let $;try{$=await U(Z,f);let q=await C(J,Q);if(!q)return{success:!1,reason:"task_not_found"};if(q.owner&&q.owner!==V)return{success:!1,reason:"already_claimed",task:q};if(q.status==="completed")return{success:!1,reason:"already_resolved",task:q};let K=await F(J),O=new Set(K.filter((A)=>A.status!=="completed").map((A)=>A.id)),T=q.blockedBy.filter((A)=>O.has(A));if(T.length>0)return{success:!1,reason:"blocked",task:q,blockedByTasks:T};return{success:!0,task:await UJ(J,Q,{owner:V})}}catch(q){return G(`[Tasks] Failed to claim task ${Q}: ${W(q)}`),L(q),{success:!1,reason:"task_not_found"}}finally{if($)await $()}}async function IJ(J,Q,V){let X=await n(J),Z;try{Z=await U(X,f);let Y=await F(J),$=Y.find((R)=>R.id===Q);if(!$)return{success:!1,reason:"task_not_found"};if($.owner&&$.owner!==V)return{success:!1,reason:"already_claimed",task:$};if($.status==="completed")return{success:!1,reason:"already_resolved",task:$};let q=new Set(Y.filter((R)=>R.status!=="completed").map((R)=>R.id)),K=$.blockedBy.filter((R)=>q.has(R));if(K.length>0)return{success:!1,reason:"blocked",task:$,blockedByTasks:K};let O=Y.filter((R)=>R.status!=="completed"&&R.owner===V&&R.id!==Q);if(O.length>0)return{success:!1,reason:"agent_busy",task:$,busyWithTasks:O.map((R)=>R.id)};return{success:!0,task:await j(J,Q,{owner:V})}}catch(Y){return G(`[Tasks] Failed to claim task ${Q} with busy check: ${W(Y)}`),L(Y),{success:!1,reason:"task_not_found"}}finally{if(Z)await Z()}}async function MQ(J,Q,V,X){let Y=(await F(J)).filter((K)=>K.status!=="completed"&&(K.owner===Q||K.owner===V));for(let K of Y)await j(J,K.id,{owner:void 0,status:"pending"});if(Y.length>0)G(`[Tasks] Unassigned ${Y.length} task(s) from ${V}`);let q=`${V} ${X==="terminated"?"was terminated":"has shut down"}.`;if(Y.length>0){let K=Y.map((O)=>`#${O.id} "${O.subject}"`).join(", ");q+=` ${Y.length} task(s) were unassigned: ${K}. Use TaskList to check availability and TaskUpdate with owner to reassign them to idle teammates.`}return{unassignedTasks:Y.map((K)=>({id:K.id,subject:K.subject})),notificationMessage:q}}var RJ,M,BQ,LJ,hJ,uJ=".highwatermark",f,jQ="tasklist";var BJ=I(()=>{t();PJ();XJ();JJ();QJ();YJ();ZJ();fJ();DJ();VJ();qJ();bJ();RJ=i();BQ=RJ.subscribe;LJ=w(()=>_.enum(["pending","in_progress","completed"])),hJ=w(()=>_.object({id:_.string(),subject:_.string(),description:_.string(),activeForm:_.string().optional(),owner:_.string().optional(),status:LJ(),blocks:_.array(_.string()),blockedBy:_.array(_.string()),metadata:_.record(_.string(),_.unknown()).optional()})),f={retries:{retries:30,minTimeout:5,maxTimeout:100}}});function k(J){return J==="tmux"||J==="iterm2"}var OJ=()=>{};import{mkdirSync as nJ,readFileSync as kJ,writeFileSync as dJ}from"fs";import{mkdir as MJ,readFile as jJ,rm as d,writeFile as r}from"fs/promises";import{join as p}from"path";import{z as P}from"zod/v4";function yJ(J){return J.replace(/[^a-zA-Z0-9]/g,"-").toLowerCase()}function kQ(J){return J.replace(/@/g,"-")}function b(J){return p(l(),yJ(J))}function c(J){return p(b(J),"config.json")}function E(J){try{let Q=kJ(c(J),"utf-8");return y(Q)}catch(Q){if(x(Q)==="ENOENT")return null;return G(`[TeammateTool] Failed to read team file for ${J}: ${W(Q)}`),null}}async function wJ(J){try{let Q=await jJ(c(J),"utf-8");return y(Q)}catch(Q){if(x(Q)==="ENOENT")return null;return G(`[TeammateTool] Failed to read team file for ${J}: ${W(Q)}`),null}}function S(J,Q){let V=b(J);nJ(V,{recursive:!0}),dJ(c(J),v(Q,null,2))}async function rJ(J,Q){let V=b(J);await MJ(V,{recursive:!0}),await r(c(J),v(Q,null,2))}async function dQ(J,Q){let V=b(J),X=c(J),Z=`${X}.lock`;await MJ(V,{recursive:!0});try{await r(X,"{}",{encoding:"utf-8",flag:"wx"})}catch($){if(x($)!=="EEXIST")throw $}let Y=await U(X,{lockfilePath:Z,retries:{retries:10,minTimeout:5,maxTimeout:100}});try{let $=await wJ(J);if(!$||!Array.isArray($.members))throw Error(`Team "${J}" does not exist`);let q=Q($)??$;return await r(X,v(q,null,2)),q}finally{await Y()}}function rQ(J,Q){let V=Q.agentId||Q.name;if(!V)return G("[TeammateTool] removeTeammateFromTeamFile called with no identifier"),!1;let X=E(J);if(!X)return G(`[TeammateTool] Cannot remove teammate ${V}: failed to read team file for "${J}"`),!1;let Z=X.members.length;if(X.members=X.members.filter((Y)=>{if(Q.agentId&&Y.agentId===Q.agentId)return!1;if(Q.name&&Y.name===Q.name)return!1;return!0}),X.members.length===Z)return G(`[TeammateTool] Teammate ${V} not found in team file for "${J}"`),!1;return S(J,X),G(`[TeammateTool] Removed teammate from team file: ${V}`),!0}function iQ(J,Q){let V=E(J);if(!V)return!1;let X=V.hiddenPaneIds??[];if(!X.includes(Q))X.push(Q),V.hiddenPaneIds=X,S(J,V),G(`[TeammateTool] Added ${Q} to hidden panes for team ${J}`);return!0}function mQ(J,Q){let V=E(J);if(!V)return!1;let X=V.hiddenPaneIds??[],Z=X.indexOf(Q);if(Z!==-1)X.splice(Z,1),V.hiddenPaneIds=X,S(J,V),G(`[TeammateTool] Removed ${Q} from hidden panes for team ${J}`);return!0}function sQ(J,Q){let V=E(J);if(!V)return!1;let X=V.members.findIndex((Z)=>Z.tmuxPaneId===Q);if(X===-1)return!1;if(V.members.splice(X,1),V.hiddenPaneIds){let Z=V.hiddenPaneIds.indexOf(Q);if(Z!==-1)V.hiddenPaneIds.splice(Z,1)}return S(J,V),G(`[TeammateTool] Removed member with pane ${Q} from team ${J}`),!0}function tQ(J,Q){let V=E(J);if(!V)return!1;let X=V.members.findIndex((Z)=>Z.agentId===Q);if(X===-1)return!1;return V.members.splice(X,1),S(J,V),G(`[TeammateTool] Removed member ${Q} from team ${J}`),!0}function iJ(J,Q,V){let X=E(J);if(!X)return!1;let Z=X.members.find(($)=>$.name===Q);if(!Z)return G(`[TeammateTool] Cannot set member mode: member ${Q} not found in team ${J}`),!1;if(Z.mode===V)return!0;let Y=X.members.map(($)=>$.name===Q?{...$,mode:V}:$);return S(J,{...X,members:Y}),G(`[TeammateTool] Set member ${Q} in team ${J} to mode: ${V}`),!0}function aQ(J,Q){if(!zJ())return;let V=Q??h(),X=SJ();if(V&&X)iJ(V,X,J)}function eQ(J,Q){let V=E(J);if(!V)return!1;let X=new Map(Q.map(($)=>[$.memberName,$.mode])),Z=!1,Y=V.members.map(($)=>{let q=X.get($.name);if(q!==void 0&&$.mode!==q)return Z=!0,{...$,mode:q};return $});if(Z)S(J,{...V,members:Y}),G(`[TeammateTool] Set ${Q.length} member modes in team ${J}`);return!0}async function JV(J,Q,V){let X=await wJ(J);if(!X){G(`[TeammateTool] Cannot set member active: team ${J} not found`);return}let Z=X.members.find((Y)=>Y.name===Q);if(!Z){G(`[TeammateTool] Cannot set member active: member ${Q} not found in team ${J}`);return}if(Z.isActive===V)return;Z.isActive=V,await rJ(J,X),G(`[TeammateTool] Set member ${Q} in team ${J} to ${V?"active":"idle"}`)}async function mJ(J){let Q=p(J,".git"),V=null;try{let Z=(await jJ(Q,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(Z&&Z[1]){let Y=Z[1],$=p(Y,"..","..");V=p($,"..")}}catch{}if(V){let X=await xJ(vJ(),["worktree","remove","--force",J],{cwd:V});if(X.code===0){G(`[TeammateTool] Removed worktree via git: ${J}`);return}if(X.stderr?.includes("not a working tree")){G(`[TeammateTool] Worktree already removed: ${J}`);return}G(`[TeammateTool] git worktree remove failed, falling back to rm: ${X.stderr}`)}try{await d(J,{recursive:!0,force:!0}),G(`[TeammateTool] Removed worktree directory manually: ${J}`)}catch(X){G(`[TeammateTool] Failed to remove worktree ${J}: ${W(X)}`)}}function QV(J){N().add(J)}function VV(J){N().delete(J)}async function XV(){let J=N();if(J.size===0)return;let Q=Array.from(J);G(`cleanupSessionTeams: removing ${Q.length} orphan team dir(s): ${Q.join(", ")}`),await Promise.allSettled(Q.map((V)=>sJ(V))),await Promise.allSettled(Q.map((V)=>tJ(V))),J.clear()}async function sJ(J){let Q=E(J);if(!Q)return;let V=Q.members.filter((q)=>q.name!==AJ&&q.tmuxPaneId&&q.backendType&&k(q.backendType));if(V.length===0)return;let[{ensureBackendsRegistered:X,getBackendByType:Z},{isInsideTmux:Y}]=await Promise.all([import("./registry-fp7x9ekd.js"),import("./detection-1yb2c7hh.js")]);await X();let $=!await Y();await Promise.allSettled(V.map(async(q)=>{if(!q.tmuxPaneId||!q.backendType||!k(q.backendType))return;let K=await Z(q.backendType).killPane(q.tmuxPaneId,$);G(`cleanupSessionTeams: killPane ${q.name} (${q.backendType} ${q.tmuxPaneId}) \u2192 ${K}`)}))}async function tJ(J){let Q=yJ(J),V=E(J),X=[];if(V){for(let $ of V.members)if($.worktreePath)X.push($.worktreePath)}for(let $ of X)await mJ($);let Z=b(J);try{await d(Z,{recursive:!0,force:!0}),G(`[TeammateTool] Cleaned up team directory: ${Z}`)}catch($){G(`[TeammateTool] Failed to clean up team directory ${Z}: ${W($)}`)}let Y=H(Q);try{await d(Y,{recursive:!0,force:!0}),G(`[TeammateTool] Cleaned up tasks directory: ${Y}`),B()}catch($){G(`[TeammateTool] Failed to clean up tasks directory ${Y}: ${W($)}`)}}var nQ;var aJ=I(()=>{t();XJ();JJ();QJ();lJ();gJ();YJ();ZJ();VJ();BJ();qJ();OJ();oJ();nQ=w(()=>P.strictObject({operation:P.enum(["spawnTeam","cleanup"]).describe("Operation: spawnTeam to create a team, cleanup to remove team and task directories."),agent_type:P.string().optional().describe('Type/role of the team lead (e.g., "researcher", "test-runner"). Used for team file and inter-agent coordination.'),team_name:P.string().optional().describe("Name for the new team to create (required for spawnTeam)."),description:P.string().optional().describe("Team description/purpose (only used with spawnTeam).")}))});
|
|
3
3
|
export{EQ as gM,UQ as hM,BQ as iM,LJ as jM,OQ as kM,CQ as lM,xQ as mM,HJ as nM,H as oM,FJ as pM,vQ as qM,C as rM,j as sM,SQ as tM,F as uM,zQ as vM,AQ as wM,MQ as xM,jQ as yM,BJ as zM,k as AM,OJ as BM,nQ as CM,yJ as DM,kQ as EM,b as FM,c as GM,E as HM,wJ as IM,rJ as JM,dQ as KM,rQ as LM,iQ as MM,mQ as NM,sQ as OM,tQ as PM,iJ as QM,aQ as RM,eQ as SM,JV as TM,QV as UM,VV as VM,XV as WM,tJ as XM,aJ as YM};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{j as
|
|
2
|
+
import{$R as y,dS as V}from"./cli-wt2bfbn0.js";import{G7 as p,I7 as K}from"./cli-p0vh69b9.js";import{q9 as q,s9 as Q}from"./cli-jj93qmmc.js";import{fda as J}from"./cli-w1d8n9g3.js";function j(){return!!z}async function D(){if(b!==null)return b;return b=!!z,b}function P(){return W||null}async function w(){return(await p(y,["-V"])).code===0}function E(){if(f!==null)return f;let k=process.env.TERM_PROGRAM,B=!!process.env.ITERM_SESSION_ID,H=q.terminal==="iTerm.app";return f=k==="iTerm.app"||B||H,f}async function F(){return(await p(Y,["session","list"])).code===0}function G(){b=null,f=null}var z,W,b=null,f=null,Y="it2";var Z=J(()=>{Q();K();V();z=process.env.TMUX,W=process.env.TMUX_PANE});
|
|
3
|
+
export{j as PR,D as QR,P as RR,w as SR,E as TR,Y as UR,F as VR,G as WR,Z as XR};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{BO as w,DO as c,uO as F,xO as d}from"./cli-2rw44zfx.js";import{X9 as R,b_ as h,v_ as K,y_ as D}from"./cli-hke6r0q8.js";import{fda as I,gda as J}from"./cli-w1d8n9g3.js";async function i({environmentId:W,title:Q,events:$,gitRepoUrl:Y,branch:X,signal:_,baseUrl:G,getAccessToken:Z,permissionMode:V}){let{getClaudeAIOAuthTokens:q}=await import("./auth-wk077awh.js"),{getOrganizationUUID:B}=await import("./client-dkpgx025.js"),{getOauthConfig:P}=await import("./oauth-y0p2y1w5.js"),{getOAuthHeaders:N}=await import("./api-z8svc3xt.js"),{parseGitHubRepository:y}=await import("./detectRepository-w6wawmmg.js"),{getDefaultBranch:z}=await import("./git-c39vd9dm.js"),{getMainLoopModel:O}=await import("./model-03987182.js"),{default:j}=await import("axios"),v=Z?.()??q()?.accessToken;if(!v)return K("[bridge] No access token for session creation"),null;let A=await B();if(!A)return K("[bridge] No org UUID for session creation"),null;let C=null,M=null;if(Y){let{parseGitRemote:L}=await import("./detectRepository-w6wawmmg.js"),T=L(Y);if(T){let{host:x,owner:H,name:S}=T,k=X||await z()||void 0;C={type:"git_repository",url:`https://${x}/${H}/${S}`,revision:k},M={type:"git_repository",git_info:{type:"github",repo:`${H}/${S}`,branches:[`claude/${X||"task"}`]}}}else{let x=y(Y);if(x){let[H,S]=x.split("/");if(H&&S){let k=X||await z()||void 0;C={type:"git_repository",url:`https://github.com/${H}/${S}`,revision:k},M={type:"git_repository",git_info:{type:"github",repo:`${H}/${S}`,branches:[`claude/${X||"task"}`]}}}}}}let m={...Q!==void 0&&{title:Q},events:$,session_context:{sources:C?[C]:[],outcomes:M?[M]:[],model:O()},environment_id:W,source:"remote-control",...V&&{permission_mode:V}},U={...N(v),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":A},b=`${G??P().BASE_API_URL}/v1/sessions`,E;try{E=await j.post(b,m,{headers:U,signal:_,validateStatus:(L)=>L<500})}catch(L){return K(`[bridge] Session creation request failed: ${R(L)}`),null}if(!(E.status===200||E.status===201)){let L=w(E.data);return K(`[bridge] Session creation failed with status ${E.status}${L?`: ${L}`:""}`),null}let f=E.data;if(!f||typeof f!=="object"||!("id"in f)||typeof f.id!=="string")return K("[bridge] No session ID in response"),null;return f.id}async function r(W,Q){let{getClaudeAIOAuthTokens:$}=await import("./auth-wk077awh.js"),{getOrganizationUUID:Y}=await import("./client-dkpgx025.js"),{getOauthConfig:X}=await import("./oauth-y0p2y1w5.js"),{getOAuthHeaders:_}=await import("./api-z8svc3xt.js"),{default:G}=await import("axios"),Z=Q?.getAccessToken?.()??$()?.accessToken;if(!Z)return K("[bridge] No access token for session fetch"),null;let V=await Y();if(!V)return K("[bridge] No org UUID for session fetch"),null;let q={..._(Z),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":V},B=`${Q?.baseUrl??X().BASE_API_URL}/v1/sessions/${W}`;K(`[bridge] Fetching session ${W}`);let P;try{P=await G.get(B,{headers:q,timeout:1e4,validateStatus:(N)=>N<500})}catch(N){return K(`[bridge] Session fetch request failed: ${R(N)}`),null}if(P.status!==200){let N=w(P.data);return K(`[bridge] Session fetch failed with status ${P.status}${N?`: ${N}`:""}`),null}return P.data}async function t(W,Q){let{getClaudeAIOAuthTokens:$}=await import("./auth-wk077awh.js"),{getOrganizationUUID:Y}=await import("./client-dkpgx025.js"),{getOauthConfig:X}=await import("./oauth-y0p2y1w5.js"),{getOAuthHeaders:_}=await import("./api-z8svc3xt.js"),{default:G}=await import("axios"),Z=Q?.getAccessToken?.()??$()?.accessToken;if(!Z){K("[bridge] No access token for session archive");return}let V=await Y();if(!V){K("[bridge] No org UUID for session archive");return}let q={..._(Z),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":V},B=`${Q?.baseUrl??X().BASE_API_URL}/v1/sessions/${W}/archive`;K(`[bridge] Archiving session ${W}`);let P=await G.post(B,{},{headers:q,timeout:Q?.timeoutMs??1e4,validateStatus:(N)=>N<500});if(P.status===200)K(`[bridge] Session ${W} archived successfully`);else{let N=w(P.data);K(`[bridge] Session archive failed with status ${P.status}${N?`: ${N}`:""}`)}}async function o(W,Q,$){let{getClaudeAIOAuthTokens:Y}=await import("./auth-wk077awh.js"),{getOrganizationUUID:X}=await import("./client-dkpgx025.js"),{getOauthConfig:_}=await import("./oauth-y0p2y1w5.js"),{getOAuthHeaders:G}=await import("./api-z8svc3xt.js"),{default:Z}=await import("axios"),V=$?.getAccessToken?.()??Y()?.accessToken;if(!V){K("[bridge] No access token for session title update");return}let q=await X();if(!q){K("[bridge] No org UUID for session title update");return}let B={...G(V),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":q},P=F(W),N=`${$?.baseUrl??_().BASE_API_URL}/v1/sessions/${P}`;K(`[bridge] Updating session title: ${P} \u2192 ${Q}`);try{let y=await Z.patch(N,{title:Q},{headers:B,timeout:1e4,validateStatus:(z)=>z<500});if(y.status===200)K("[bridge] Session title updated successfully");else{let z=w(y.data);K(`[bridge] Session title update failed with status ${y.status}${z?`: ${z}`:""}`)}}catch(y){K(`[bridge] Session title update request failed: ${R(y)}`)}}var p=I(()=>{D();h();c();d()});
|
|
3
3
|
export{i as _b,r as $b,t as ac,o as bc,p as cc};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{fn as Pq,jn as Dq}from"./cli-
|
|
2
|
+
import{fn as Pq,jn as Dq}from"./cli-me4e2p3e.js";import{QL as Q,RL as Vq}from"./cli-xfsqvp8r.js";import{oO as Iq,pO as Kq,sO as _q}from"./cli-eyw3czmn.js";import{DQ as L,FQ as O,fR as yq}from"./cli-x8xgga1a.js";import{FY as Bq,Q3 as fq,a3 as kq,lY as bq,mY as Mq,x3 as Uq}from"./cli-msmzt4c3.js";import{c5 as Xq,g5 as pq}from"./cli-mb1qrqw1.js";import{q9 as Rq,s9 as gq}from"./cli-jj93qmmc.js";import{fda as Nq}from"./cli-w1d8n9g3.js";function aq(){return Uq().editorMode==="vim"}function Wq(){if(Rq.terminal==="Apple_Terminal"&&process.platform==="darwin")return"shift + \u23CE for newline";if(Iq())return"shift + \u23CE for newline";return Kq()?"\\\u23CE for newline":"backslash (\\) + return (\u23CE) for newline"}function Cq(Y,q){if(q.ctrl||q.meta||q.escape||q.return||q.tab||q.backspace||q.delete||q.upArrow||q.downArrow||q.leftArrow||q.rightArrow||q.pageUp||q.pageDown||q.home||q.end)return!1;return Y.length>0&&!/^\s/.test(Y)&&!Y.startsWith("\x1B")}var vq=Nq(()=>{_q();fq();gq()});import{c as jq}from"react/compiler-runtime";import{jsxDEV as J}from"react/jsx-dev-runtime";function T(Y){return Y.replace(/\+/g," + ")}function oq(Y){let q=jq(99),{dimColor:H,fixedWidth:Fq,gap:u,paddingX:x}=Y,s=Q("app:toggleTranscript","Global","ctrl+o"),B;if(q[0]!==s)B=T(s),q[0]=s,q[1]=B;else B=q[1];let m=B,l=Q("app:toggleTodos","Global","ctrl+t"),k;if(q[2]!==l)k=T(l),q[2]=l,q[3]=k;else k=q[3];let e=k,d=Q("chat:undo","Chat","ctrl+_"),y;if(q[4]!==d)y=T(d),q[4]=d,q[5]=y;else y=q[5];let i=y,r=Q("chat:stash","Chat","ctrl+s"),D;if(q[6]!==r)D=T(r),q[6]=r,q[7]=D;else D=q[7];let $=D,o=Q("chat:cycleMode","Chat","shift+tab"),V;if(q[8]!==o)V=T(o),q[8]=o,q[9]=V;else V=q[9];let t=V,qq=Q("chat:modelPicker","Chat","alt+p"),j;if(q[10]!==qq)j=T(qq),q[10]=qq,q[11]=j;else j=q[11];let Hq=j,Jq=Q("chat:fastMode","Chat","alt+o"),n;if(q[12]!==Jq)n=T(Jq),q[12]=Jq,q[13]=n;else n=q[13];let Lq=n,Oq=Q("chat:externalEditor","Chat","ctrl+g"),S;if(q[14]!==Oq)S=T(Oq),q[14]=Oq,q[15]=S;else S=q[15];let Qq=S,Tq=Q("app:toggleTerminal","Global","meta+j"),E;if(q[16]!==Tq)E=T(Tq),q[16]=Tq,q[17]=E;else E=q[17];let Gq=E,Yq=Q("chat:imagePaste","Chat","ctrl+v"),h;if(q[18]!==Yq)h=T(Yq),q[18]=Yq,q[19]=h;else h=q[19];let Zq=h,a;if(q[20]!==H||q[21]!==Gq)a=null,q[20]=H,q[21]=Gq,q[22]=a;else a=q[22];let wq=a,zq=Fq?24:void 0,Z;if(q[23]!==H)Z=J(L,{children:J(O,{dimColor:H,children:"! for bash mode"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[23]=H,q[24]=Z;else Z=q[24];let w;if(q[25]!==H)w=J(L,{children:J(O,{dimColor:H,children:"/ for commands"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[25]=H,q[26]=w;else w=q[26];let z;if(q[27]!==H)z=J(L,{children:J(O,{dimColor:H,children:"@ for file paths"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[27]=H,q[28]=z;else z=q[28];let A;if(q[29]!==H)A=J(L,{children:J(O,{dimColor:H,children:"& for background"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[29]=H,q[30]=A;else A=q[30];let F;if(q[31]!==H)F=J(L,{children:J(O,{dimColor:H,children:"/btw for side question"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[31]=H,q[32]=F;else F=q[32];let G;if(q[33]!==zq||q[34]!==Z||q[35]!==w||q[36]!==z||q[37]!==A||q[38]!==F)G=J(L,{flexDirection:"column",width:zq,children:[Z,w,z,A,F]},void 0,!0,void 0,this),q[33]=zq,q[34]=Z,q[35]=w,q[36]=z,q[37]=A,q[38]=F,q[39]=G;else G=q[39];let Aq=Fq?35:void 0,N;if(q[40]!==H)N=J(L,{children:J(O,{dimColor:H,children:"double tap esc to clear input"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[40]=H,q[41]=N;else N=q[41];let R;if(q[42]!==t||q[43]!==H)R=J(L,{children:J(O,{dimColor:H,children:[t," ","to auto-accept edits"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[42]=t,q[43]=H,q[44]=R;else R=q[44];let U;if(q[45]!==H||q[46]!==m)U=J(L,{children:J(O,{dimColor:H,children:[m," for verbose output"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[45]=H,q[46]=m,q[47]=U;else U=q[47];let I;if(q[48]!==H||q[49]!==e)I=J(L,{children:J(O,{dimColor:H,children:[e," to toggle tasks"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[48]=H,q[49]=e,q[50]=I;else I=q[50];let C;if(q[51]===Symbol.for("react.memo_cache_sentinel"))C=Wq(),q[51]=C;else C=q[51];let K;if(q[52]!==H)K=J(L,{children:J(O,{dimColor:H,children:C},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[52]=H,q[53]=K;else K=q[53];let W;if(q[54]!==Aq||q[55]!==N||q[56]!==R||q[57]!==U||q[58]!==I||q[59]!==K||q[60]!==wq)W=J(L,{flexDirection:"column",width:Aq,children:[N,R,U,I,wq,K]},void 0,!0,void 0,this),q[54]=Aq,q[55]=N,q[56]=R,q[57]=U,q[58]=I,q[59]=K,q[60]=wq,q[61]=W;else W=q[61];let v;if(q[62]!==H||q[63]!==i)v=J(L,{children:J(O,{dimColor:H,children:[i," to undo"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[62]=H,q[63]=i,q[64]=v;else v=q[64];let X;if(q[65]!==H)X=Xq()!=="windows"&&J(L,{children:J(O,{dimColor:H,children:"ctrl + z to suspend"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[65]=H,q[66]=X;else X=q[66];let b;if(q[67]!==H||q[68]!==Zq)b=J(L,{children:J(O,{dimColor:H,children:[Zq," to paste images"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[67]=H,q[68]=Zq,q[69]=b;else b=q[69];let M;if(q[70]!==H||q[71]!==Hq)M=J(L,{children:J(O,{dimColor:H,children:[Hq," to switch model"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[70]=H,q[71]=Hq,q[72]=M;else M=q[72];let P;if(q[73]!==H||q[74]!==Lq)P=bq()&&Mq()&&J(L,{children:J(O,{dimColor:H,children:[Lq," to toggle fast mode"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[73]=H,q[74]=Lq,q[75]=P;else P=q[75];let g;if(q[76]!==H||q[77]!==$)g=J(L,{children:J(O,{dimColor:H,children:[$," to stash prompt"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[76]=H,q[77]=$,q[78]=g;else g=q[78];let f;if(q[79]!==H||q[80]!==Qq)f=J(L,{children:J(O,{dimColor:H,children:[Qq," to edit in $EDITOR"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[79]=H,q[80]=Qq,q[81]=f;else f=q[81];let _;if(q[82]!==H)_=Pq()&&J(L,{children:J(O,{dimColor:H,children:"/keybindings to customize"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[82]=H,q[83]=_;else _=q[83];let p;if(q[84]!==v||q[85]!==X||q[86]!==b||q[87]!==M||q[88]!==P||q[89]!==g||q[90]!==f||q[91]!==_)p=J(L,{flexDirection:"column",children:[v,X,b,M,P,g,f,_]},void 0,!0,void 0,this),q[84]=v,q[85]=X,q[86]=b,q[87]=M,q[88]=P,q[89]=g,q[90]=f,q[91]=_,q[92]=p;else p=q[92];let c;if(q[93]!==u||q[94]!==x||q[95]!==G||q[96]!==W||q[97]!==p)c=J(L,{paddingX:x,flexDirection:"row",gap:u,children:[G,W,p]},void 0,!0,void 0,this),q[93]=u,q[94]=x,q[95]=G,q[96]=W,q[97]=p,q[98]=c;else c=q[98];return c}var nq=Nq(()=>{yq();pq();Dq();Vq();kq();Bq();vq()});
|
|
3
3
|
export{aq as pe,Cq as qe,vq as re,oq as se,nq as te};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Bf as f,Gf as c}from"./cli-vkvmhjha.js";import{Hf as F,Jf as l}from"./cli-4mvvtchx.js";import{$t as L,Fj as Z,GB as x,Gj as A,Gx as b,HB as n,Hx as S,Pv as M,Qj as _,Qv as g,TG as W,Vj as P,Wi as Y,Wj as $,Xi as v,Xj as B,Yj as N,Zj as V,_E as U,_j as D,aF as o,bH as s,bx as R,cx as C,cy as j,dy as h,eu as d,jl as z,kl as p,vC as G,vp as E,xp as m,yC as i}from"./cli-me4e2p3e.js";import{H6 as X,N6 as I}from"./cli-n5s5fnyj.js";import{V6 as Q,a7 as u}from"./cli-fdya77ch.js";import{Hca as O,bda as k,vca as K}from"./cli-3ac555qw.js";import{fda as T,gda as w}from"./cli-w1d8n9g3.js";function Mq(J=new Set){let H=J.size>0;if(V.cache.clear?.(),N.cache.clear?.(),B.cache.clear?.(),Y.cache.clear?.(),f(),W(),!H)Z();if($(null),O(null),x(),G(),_("session_start"),E(),M(),!H)L();if(process.env.USER_TYPE==="ant")import("./TungstenTool-rv96z549.js").then(({clearSessionsWithTungstenUsage:q,resetInitializationState:y})=>{q(),y()});if(X(),U(),!H)z();K(J),Q(),j(),R(),F(),b(),import("./utils-6sb44pg8.js").then(({clearWebFetchCache:q})=>q()),import("./ToolSearchTool-w4t61c7d.js").then(({clearToolSearchDescriptionCache:q})=>q()),import("./loadAgentsDir-f8shfnw3.js").then(({clearAgentDefinitionsCache:q})=>q()),import("./prompt-xgw2hxrc.js").then(({clearPromptCache:q})=>q())}var r=T(()=>{k();s();v();D();c();d();p();A();g();n();C();l();h();i();o();P();I();u();m();S()});
|
|
3
|
+
export{Mq as yf,r as zf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{T as
|
|
2
|
+
import{AF as c,BF as wq,DF as yq}from"./cli-me4e2p3e.js";import{YL as Pq,ZL as Nq}from"./cli-xfsqvp8r.js";import{TO as kq,UO as uq}from"./cli-akcxtvv9.js";import{BQ as S,CQ as hq,DQ as Z,FQ as P,JQ as fq,fR as U,hP as l,iP as Xq}from"./cli-x8xgga1a.js";import{BW as a,EY as zq,FY as Cq,JY as x,LU as Wq,MY as b,NW as rq,NY as $q,Q3 as Aq,lY as e,nY as E,oY as D,pY as t,rY as V,uY as qq,wY as Kq,x3 as B,zU as j}from"./cli-msmzt4c3.js";import{h6 as s,p6 as Jq}from"./cli-51720d82.js";import{Y8 as L,Z8 as Zq}from"./cli-t9jht3kb.js";import{fda as n}from"./cli-w1d8n9g3.js";import{c as jq}from"react/compiler-runtime";import Hq from"chalk";import{jsxDEV as o}from"react/jsx-dev-runtime";function Q(K){let q=jq(2),{cooldown:z}=K;if(z){let w;if(q[0]===Symbol.for("react.memo_cache_sentinel"))w=o(P,{color:"promptBorder",dimColor:!0,children:j},void 0,!1,void 0,this),q[0]=w;else w=q[0];return w}let f;if(q[1]===Symbol.for("react.memo_cache_sentinel"))f=o(P,{color:"fastMode",children:j},void 0,!1,void 0,this),q[1]=f;else f=q[1];return f}function T(K=!0,q=!1){if(!K)return j;let z=l(B().theme);if(q)return Hq.dim(S("promptBorder",z)(j));return S("fastMode",z)(j)}var F=n(()=>{Wq();U();Aq();Xq();hq()});import{c as vq}from"react/compiler-runtime";import{useState as Gq}from"react";import{jsxDEV as k,Fragment as gq}from"react/jsx-dev-runtime";function I(K,q){if(Kq(),a("userSettings",{fastMode:K?!0:void 0}),K)q((z)=>{let f=!V(z.mainLoopModel);return{...z,...f?{mainLoopModel:t(),mainLoopModelForSession:null}:{},fastMode:!0}});else q((z)=>({...z,fastMode:!1}))}function mq(K){let q=vq(30),{onDone:z,unavailableReason:f}=K,w=c(Lq),O=c(Dq),W=wq(),[_,_q]=Gq(O??!1),J;if(q[0]===Symbol.for("react.memo_cache_sentinel"))J=qq(),q[0]=J;else J=q[0];let r=J,d=r.status==="cooldown",Y=f!==null,C;if(q[1]===Symbol.for("react.memo_cache_sentinel"))C=b(x(!0)),q[1]=C;else C=q[1];let i=C,$;if(q[2]!==_||q[3]!==Y||q[4]!==w||q[5]!==z||q[6]!==W)$=function(){if(Y)return;if(I(_,W),L("tengu_fast_mode_toggled",{enabled:_,source:"picker"}),_){let p=T(_),Oq=!V(w)?` \xB7 model set to ${D}`:"";z(`${p} Fast mode ON${Oq} \xB7 ${i}`)}else W(Tq),z("Fast mode OFF")},q[2]=_,q[3]=Y,q[4]=w,q[5]=z,q[6]=W,q[7]=$;else $=q[7];let g=$,u;if(q[8]!==O||q[9]!==Y||q[10]!==z||q[11]!==W)u=function(){if(Y){if(O)I(!1,W);z("Fast mode OFF",{display:"system"});return}let p=O?`${T()} Kept Fast mode ON`:"Kept Fast mode OFF";z(p,{display:"system"})},q[8]=O,q[9]=Y,q[10]=z,q[11]=W,q[12]=u;else u=q[12];let R=u,N;if(q[13]!==Y)N=function(){if(Y)return;_q(Mq)},q[13]=Y,q[14]=N;else N=q[14];let A=N,y;if(q[15]!==g||q[16]!==A)y={"confirm:yes":g,"confirm:nextField":A,"confirm:next":A,"confirm:previous":A,"confirm:cycleMode":A,"confirm:toggle":A},q[15]=g,q[16]=A,q[17]=y;else y=q[17];let v;if(q[18]===Symbol.for("react.memo_cache_sentinel"))v={context:"Confirmation"},q[18]=v;else v=q[18];kq(y,v);let G;if(q[19]===Symbol.for("react.memo_cache_sentinel"))G=k(P,{children:[k(Q,{cooldown:d},void 0,!1,void 0,this)," Fast mode (research preview)"]},void 0,!0,void 0,this),q[19]=G;else G=q[19];let Yq=G,X;if(q[20]!==Y)X=(H)=>H.pending?k(P,{children:["Press ",H.keyName," again to exit"]},void 0,!0,void 0,this):Y?k(P,{children:"Esc to cancel"},void 0,!1,void 0,this):k(P,{children:"Tab to toggle \xB7 Enter to confirm \xB7 Esc to cancel"},void 0,!1,void 0,this),q[20]=Y,q[21]=X;else X=q[21];let h;if(q[22]!==_||q[23]!==f)h=f?k(Z,{marginLeft:2,children:k(P,{color:"error",children:f},void 0,!1,void 0,this)},void 0,!1,void 0,this):k(gq,{children:[k(Z,{flexDirection:"column",gap:0,marginLeft:2,children:k(Z,{flexDirection:"row",gap:2,children:[k(P,{bold:!0,children:"Fast mode"},void 0,!1,void 0,this),k(P,{color:_?"fastMode":void 0,bold:_,children:_?"ON ":"OFF"},void 0,!1,void 0,this),k(P,{dimColor:!0,children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),d&&r.status==="cooldown"&&k(Z,{marginLeft:2,children:k(P,{color:"warning",children:[r.reason==="overloaded"?"Fast mode overloaded and is temporarily unavailable":"You've hit your fast limit"," \xB7 resets in ",s(r.resetAt-Date.now(),{hideTrailingZeros:!0})]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[22]=_,q[23]=f,q[24]=h;else h=q[24];let m;if(q[25]===Symbol.for("react.memo_cache_sentinel"))m=k(P,{dimColor:!0,children:["Learn more:"," ",k(fq,{url:"https://code.claude.com/docs/en/fast-mode",children:"https://code.claude.com/docs/en/fast-mode"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[25]=m;else m=q[25];let M;if(q[26]!==R||q[27]!==h||q[28]!==X)M=k(Pq,{title:Yq,subtitle:`High-speed mode for ${D}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:R,color:"fastMode",inputGuide:X,children:[h,m]},void 0,!0,void 0,this),q[26]=R,q[27]=h,q[28]=X,q[29]=M;else M=q[29];return M}function Mq(K){return!K}function Tq(K){return{...K,fastMode:!1}}function Dq(K){return K.fastMode}function Lq(K){return K.mainLoopModel}async function Vq(K,q,z){let f=E();if(f)return`Fast mode unavailable: ${f}`;let{mainLoopModel:w}=q();if(I(K,z),L("tengu_fast_mode_toggled",{enabled:K,source:"shortcut"}),K){let O=T(!0),W=!V(w)?` \xB7 model set to ${D}`:"",_=b(x(!0));return`${O} Fast mode ON${W} \xB7 ${_}`}else return"Fast mode OFF"}async function K6(K,q,z){if(!e())return null;await zq();let f=z?.trim().toLowerCase();if(f==="on"||f==="off"){let O=await Vq(f==="on",q.getAppState,q.setAppState);return K(O),null}let w=E();return L("tengu_fast_mode_picker_shown",{unavailable_reason:w??""}),k(mq,{onDone:K,unavailableReason:w},void 0,!1,void 0,this)}var Rq=n(()=>{Nq();F();U();uq();Zq();yq();Cq();Jq();$q();rq()});
|
|
3
|
+
export{T as Bb,F as Cb,mq as Db,K6 as Eb,Rq as Fb};
|