@unieai/code 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/App-ncpmz34p.js +2 -0
- package/dist/chunks/ApproveApiKey-fqzjf1j3.js +2 -0
- package/dist/chunks/{assistant-ftzr3mjp.js → AssistantSessionChooser-wxmyvgcf.js} +1 -1
- package/dist/chunks/BypassPermissionsModeDialog-3ksmd8pp.js +2 -0
- package/dist/chunks/{ClaudeInChromeOnboarding-qa0pvwfw.js → ClaudeInChromeOnboarding-ckjppjhr.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-rrsfavte.js +2 -0
- package/dist/chunks/ConsoleOAuthFlow-04xt4sby.js +2 -0
- package/dist/chunks/{DiffDialog-t6vvtbb2.js → DiffDialog-ptnc4sgx.js} +1 -1
- package/dist/chunks/Doctor-kg5m2zma.js +2 -0
- package/dist/chunks/Grove-rf9xhe2e.js +2 -0
- package/dist/chunks/{ITermBackend-73waaahf.js → ITermBackend-wgbbpgpy.js} +1 -1
- package/dist/chunks/{InProcessTransport-qwjgb17j.js → InProcessTransport-vgh7qgjn.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-zmqw3fj1.js → InvalidConfigDialog-6spqsgmr.js} +1 -1
- package/dist/chunks/InvalidSettingsDialog-m6y6esgz.js +2 -0
- package/dist/chunks/{Onboarding-p0tq6pgz.js → Onboarding-j1m69bqm.js} +1 -1
- package/dist/chunks/REPL-bpg86z4h.js +2 -0
- package/dist/chunks/{ResumeConversation-krn9hqb1.js → ResumeConversation-ymc529y6.js} +1 -1
- package/dist/chunks/{SnapshotUpdateDialog-raq029pd.js → SnapshotUpdateDialog-aya2c2f9.js} +1 -1
- package/dist/chunks/{TeleportProgress-vyy2k3bv.js → TeleportProgress-kn3qgvd9.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-ff0h2cnq.js → TeleportRepoMismatchDialog-01v6e2qz.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-esjykret.js → TeleportResumeWrapper-48dsm503.js} +1 -1
- package/dist/chunks/{TmuxBackend-14kmnkcb.js → TmuxBackend-s0bt8zqj.js} +1 -1
- package/dist/chunks/ToolSearchTool-4rm3kr13.js +2 -0
- package/dist/chunks/{TrustDialog-7fvaze2x.js → TrustDialog-xtn3kq0n.js} +1 -1
- package/dist/chunks/TungstenTool-3wjjz6cf.js +2 -0
- package/dist/chunks/{add-dir-kqw72mky.js → add-dir-z0kz5nf7.js} +1 -1
- package/dist/chunks/{agents-z66twpqr.js → agents-ex4cdx64.js} +1 -1
- package/dist/chunks/agents-w6zde2j9.js +4 -0
- package/dist/chunks/ant-claude-for-chrome-mcp-gr0b0jr4.js +2 -0
- package/dist/chunks/api-07pqphw5.js +2 -0
- package/dist/chunks/asciicast-2k1ztt6v.js +2 -0
- package/dist/chunks/{AssistantSessionChooser-g1vsya6h.js → assistant-bmwndz7j.js} +1 -1
- package/dist/chunks/{auth-wk077awh.js → auth-g2p039wk.js} +1 -1
- package/dist/chunks/auth-g509w5pr.js +2 -0
- package/dist/chunks/backgroundHousekeeping-hw0chw1d.js +2 -0
- package/dist/chunks/{branch-1d0b8590.js → branch-rdvbhvts.js} +1 -1
- package/dist/chunks/{bridgePointer-vhd47np6.js → bridgePointer-9rqn5tp6.js} +1 -1
- package/dist/chunks/{btw-s3r5jhyd.js → btw-xts6twbq.js} +1 -1
- package/dist/chunks/{buddy-xzm5npk8.js → buddy-yc09g048.js} +1 -1
- package/dist/chunks/{cachedMicrocompact-6j3zxr4g.js → cachedMicrocompact-fa2mdnyh.js} +1 -1
- package/dist/chunks/caches-3qzm958c.js +2 -0
- package/dist/chunks/{chrome-mdyx0s5j.js → chrome-gb6g0d5p.js} +1 -1
- package/dist/chunks/{chromeNativeHost-8wc6wcr6.js → chromeNativeHost-jsntnc29.js} +1 -1
- package/dist/chunks/{claudeDesktop-p5bfxmvz.js → claudeDesktop-me56qerx.js} +1 -1
- package/dist/chunks/{cleanup-q46nbce1.js → cleanup-hxj6tm50.js} +1 -1
- package/dist/chunks/clear-ssfbry3k.js +2 -0
- package/dist/chunks/{cli-bmk0rb5v.js → cli-07f2hk9d.js} +1 -1
- package/dist/chunks/{cli-h4a90xbh.js → cli-0nz8v3dj.js} +1 -1
- package/dist/chunks/{cli-fwrj8ybs.js → cli-16k24hzp.js} +1 -1
- package/dist/chunks/{cli-msmzt4c3.js → cli-192xnkcx.js} +1 -1
- package/dist/chunks/{cli-g4n9das2.js → cli-1eejy071.js} +1 -1
- package/dist/chunks/{cli-3m8n808e.js → cli-1p7nc6zb.js} +1 -1
- package/dist/chunks/{cli-s160fqyz.js → cli-1q1b8rgs.js} +1 -1
- package/dist/chunks/{cli-99mqr54v.js → cli-222ywgt0.js} +1 -1
- package/dist/chunks/{cli-f63fdj4w.js → cli-2428yw99.js} +1 -1
- package/dist/chunks/{cli-v943fd6a.js → cli-2fqrjjs9.js} +1 -1
- package/dist/chunks/{cli-t4j047cx.js → cli-2j6cv2kz.js} +1 -1
- package/dist/chunks/{cli-xpa1neza.js → cli-2sbq6ggm.js} +2 -2
- package/dist/chunks/{cli-8qd16mt4.js → cli-33tchr20.js} +1 -1
- package/dist/chunks/{cli-zjbzak9n.js → cli-3619x17q.js} +1 -1
- package/dist/chunks/{cli-gtm212j6.js → cli-3hrmwgsv.js} +1 -1
- package/dist/chunks/{cli-hzr2zraz.js → cli-3tkd82y4.js} +1 -1
- package/dist/chunks/{cli-zev50xap.js → cli-3tmtx9ka.js} +1 -1
- package/dist/chunks/{cli-xfsqvp8r.js → cli-4pwyex04.js} +1 -1
- package/dist/chunks/{cli-jj93qmmc.js → cli-5ajcy93q.js} +2 -2
- package/dist/chunks/{cli-sycqd3xe.js → cli-5c6e6txh.js} +48 -48
- package/dist/chunks/{cli-0w4wc1z0.js → cli-5kehgkgh.js} +1 -1
- package/dist/chunks/{cli-fghyxar5.js → cli-601zv0wv.js} +1 -1
- package/dist/chunks/{cli-r3etpht1.js → cli-609dp2ck.js} +1 -1
- package/dist/chunks/{cli-ns0aaggm.js → cli-63wps6p0.js} +1 -1
- package/dist/chunks/{cli-m0z3rmf0.js → cli-64x5ghm5.js} +1 -1
- package/dist/chunks/{cli-de1hwp88.js → cli-67azkkwm.js} +1 -1
- package/dist/chunks/{cli-dbdqrqmt.js → cli-6cqemsm9.js} +1 -1
- package/dist/chunks/{cli-27mzrnr8.js → cli-6ee37m6j.js} +1 -1
- package/dist/chunks/{cli-mb1qrqw1.js → cli-6qt2xm18.js} +1 -1
- package/dist/chunks/{cli-49m97nbg.js → cli-7ed2q42n.js} +1 -1
- package/dist/chunks/{cli-s9fhtgmz.js → cli-7jw2qe69.js} +1 -1
- package/dist/chunks/cli-7k17xstr.js +3 -0
- package/dist/chunks/{cli-61x73ksv.js → cli-7n4d5yzr.js} +1 -1
- package/dist/chunks/{cli-p0vh69b9.js → cli-7wxv39ry.js} +2 -2
- package/dist/chunks/{cli-15sqp3mq.js → cli-8h10q2x8.js} +1 -1
- package/dist/chunks/{cli-yqbvprz7.js → cli-8j0b3b55.js} +1 -1
- package/dist/chunks/{cli-akcxtvv9.js → cli-8jym9hp6.js} +1 -1
- package/dist/chunks/{cli-4ewb3q42.js → cli-8kpqq0ea.js} +2 -2
- package/dist/chunks/{cli-2rw44zfx.js → cli-8xyb31dy.js} +1 -1
- package/dist/chunks/cli-8xz7dd7z.js +3 -0
- package/dist/chunks/{cli-g5wq5ptg.js → cli-8ykv66e4.js} +1 -1
- package/dist/chunks/{cli-jegyadmb.js → cli-8z8d5bgb.js} +1 -1
- package/dist/chunks/{cli-cqkne34j.js → cli-93sm9n17.js} +1 -1
- package/dist/chunks/{cli-q0156x0d.js → cli-97vx3m99.js} +1 -1
- package/dist/chunks/{cli-1jp3rm7n.js → cli-9e8f55fp.js} +1 -1
- package/dist/chunks/{cli-2wd8eaac.js → cli-9hqmq5g6.js} +1 -1
- package/dist/chunks/{cli-6bxfdgv1.js → cli-9tbmrp89.js} +1 -1
- package/dist/chunks/{cli-5dt9yjha.js → cli-9xtyh8c7.js} +1 -1
- package/dist/chunks/{cli-sh9w2tbd.js → cli-a1cx6p3g.js} +1 -1
- package/dist/chunks/{cli-ja540nr7.js → cli-a1dqnvy2.js} +1 -1
- package/dist/chunks/{cli-wt2bfbn0.js → cli-a25jeqs8.js} +1 -1
- package/dist/chunks/{cli-x8xgga1a.js → cli-a2d962bq.js} +2 -2
- package/dist/chunks/{cli-h120wpk2.js → cli-a826q5zk.js} +1 -1
- package/dist/chunks/{cli-k4v08k8t.js → cli-an97yxg9.js} +1 -1
- package/dist/chunks/{cli-m12smc5e.js → cli-asc9xmsr.js} +1 -1
- package/dist/chunks/{cli-hke6r0q8.js → cli-awb77t95.js} +2 -2
- package/dist/chunks/{cli-6yprtw88.js → cli-awe5yg6m.js} +1 -1
- package/dist/chunks/{cli-15w3eaed.js → cli-ax0ckqpv.js} +1 -1
- package/dist/chunks/{cli-mbp8f3f3.js → cli-b29enbbc.js} +1 -1
- package/dist/chunks/{cli-me4e2p3e.js → cli-b3k8arn1.js} +25 -25
- package/dist/chunks/{cli-c22wpdk4.js → cli-b5z57an7.js} +1 -1
- package/dist/chunks/{cli-0dc8sd37.js → cli-b8j8bm5m.js} +1 -1
- package/dist/chunks/{cli-51720d82.js → cli-bdgrtpsy.js} +2 -2
- package/dist/chunks/{cli-yrwenjxs.js → cli-bfm3f0yw.js} +1 -1
- package/dist/chunks/{cli-764c4bsm.js → cli-bj0csmzs.js} +1 -1
- package/dist/chunks/{cli-ms5j6fff.js → cli-bnr79ddy.js} +1 -1
- package/dist/chunks/{cli-a52ra30v.js → cli-bpj9na88.js} +1 -1
- package/dist/chunks/{cli-v9f860t5.js → cli-brr3bnrj.js} +1 -1
- package/dist/chunks/{cli-eyw3czmn.js → cli-bzrat9yd.js} +1 -1
- package/dist/chunks/{cli-msw0vv86.js → cli-ca1jmr8f.js} +1 -1
- package/dist/chunks/{cli-br6zjh6x.js → cli-ceas97gw.js} +1 -1
- package/dist/chunks/{cli-kqv5b8zh.js → cli-cfbfexxj.js} +1 -1
- package/dist/chunks/{cli-tckzkegq.js → cli-chvks6bg.js} +1 -1
- package/dist/chunks/cli-cmh6qwg8.js +3 -0
- package/dist/chunks/{cli-khs3sj9k.js → cli-d1w21hsm.js} +1 -1
- package/dist/chunks/{cli-z5e72gsd.js → cli-d2pn0xfj.js} +1 -1
- package/dist/chunks/{cli-fm14mg07.js → cli-df5r5xrp.js} +1 -1
- package/dist/chunks/{cli-2rwjx3w0.js → cli-dx0pk7k2.js} +1 -1
- package/dist/chunks/{cli-p2cqnrnp.js → cli-dy9qrrps.js} +1 -1
- package/dist/chunks/{cli-q46epwyh.js → cli-e3q6b1cv.js} +1 -1
- package/dist/chunks/{cli-fs7yttfp.js → cli-e4a4fjx9.js} +2 -2
- package/dist/chunks/{cli-t9jht3kb.js → cli-e5yek4vx.js} +2 -2
- package/dist/chunks/{cli-5f0w3fy6.js → cli-e9t5kfxm.js} +1 -1
- package/dist/chunks/{cli-1n8he7s8.js → cli-eh1wx76n.js} +1 -1
- package/dist/chunks/{cli-d0hzw78c.js → cli-ez2xsd4m.js} +1 -1
- package/dist/chunks/{cli-n5s5fnyj.js → cli-fdjfk8yq.js} +2 -2
- package/dist/chunks/{cli-rvad3yhg.js → cli-fnt125we.js} +2 -2
- package/dist/chunks/{cli-0qt9btbe.js → cli-fz053waw.js} +1 -1
- package/dist/chunks/{cli-89x414pj.js → cli-g2s3391y.js} +1 -1
- package/dist/chunks/cli-geka8fb7.js +3 -0
- package/dist/chunks/{cli-73jf8hyz.js → cli-gfweqbpz.js} +1 -1
- package/dist/chunks/{cli-tfv2qcgf.js → cli-gypyp608.js} +1 -1
- package/dist/chunks/{cli-1ny2386w.js → cli-h2t2hyz7.js} +1 -1
- package/dist/chunks/{cli-zp8s7q5w.js → cli-hp5gs22f.js} +1 -1
- package/dist/chunks/{cli-pgg33dhw.js → cli-hpxspent.js} +1 -1
- package/dist/chunks/{cli-ezs5sney.js → cli-hrmzaf5d.js} +2 -2
- package/dist/chunks/{cli-8dmy2s42.js → cli-hs2k9997.js} +1 -1
- package/dist/chunks/{cli-19ncan36.js → cli-j403r21v.js} +1 -1
- package/dist/chunks/{cli-wn2srq2e.js → cli-j4r75xsd.js} +1 -1
- package/dist/chunks/{cli-5vsnhp97.js → cli-jmq1x925.js} +1 -1
- package/dist/chunks/{cli-4nejhkd0.js → cli-jrwh6rs0.js} +1 -1
- package/dist/chunks/{cli-vwg0v35a.js → cli-jz50hv3m.js} +1 -1
- package/dist/chunks/{cli-vkvmhjha.js → cli-jz8jcrhh.js} +1 -1
- package/dist/chunks/{cli-nvnj7r73.js → cli-ktzyyx91.js} +1 -1
- package/dist/chunks/{cli-9aq7vxaq.js → cli-kx3r72jp.js} +1 -1
- package/dist/chunks/{cli-tyqh91zq.js → cli-m3r80gy0.js} +1 -1
- package/dist/chunks/{cli-9z9r2set.js → cli-m6amgxq3.js} +1 -1
- package/dist/chunks/{cli-qaxvg7gv.js → cli-mcbntv3p.js} +1 -1
- package/dist/chunks/{cli-pbc8sk2d.js → cli-mx33m3gs.js} +1 -1
- package/dist/chunks/{cli-r83ttew2.js → cli-n5wt59z1.js} +1 -1
- package/dist/chunks/{cli-gq5fve62.js → cli-nqvfpxp6.js} +1 -1
- package/dist/chunks/{cli-zpcncwrv.js → cli-pgjnzqk4.js} +1 -1
- package/dist/chunks/{cli-6pdpyz1a.js → cli-phwbqkv7.js} +1 -1
- package/dist/chunks/{cli-57yrpnaq.js → cli-ps5qshk4.js} +1 -1
- package/dist/chunks/{cli-4mvvtchx.js → cli-psqvdh1r.js} +1 -1
- package/dist/chunks/{cli-gxgdnjfn.js → cli-q0vret0x.js} +1 -1
- package/dist/chunks/{cli-zxdnz6vp.js → cli-q2g5mjv6.js} +1 -1
- package/dist/chunks/{cli-tq5z9qv3.js → cli-q8zmmp6z.js} +2 -2
- package/dist/chunks/{cli-j08dmxw5.js → cli-qpjkqhg2.js} +1 -1
- package/dist/chunks/{cli-scaqq0v9.js → cli-qrmc38f8.js} +1 -1
- package/dist/chunks/{cli-w1d8n9g3.js → cli-qwx84m9c.js} +1 -1
- package/dist/chunks/{cli-s6vr7213.js → cli-r43jhzwm.js} +1 -1
- package/dist/chunks/{cli-x70v8rsj.js → cli-rc3w6tqd.js} +2 -2
- package/dist/chunks/{cli-7c99j0pt.js → cli-rd5ax7sn.js} +1 -1
- package/dist/chunks/{cli-m8fq163z.js → cli-rjy86nps.js} +1 -1
- package/dist/chunks/cli-rwh0a2m1.js +3 -0
- package/dist/chunks/{cli-3gwqrmcd.js → cli-ry9g546q.js} +1 -1
- package/dist/chunks/{cli-8mk2zg4a.js → cli-rz03bav0.js} +1 -1
- package/dist/chunks/{cli-66jj9zj3.js → cli-sbm8tsyq.js} +1 -1
- package/dist/chunks/{cli-55ntywtj.js → cli-shsgq494.js} +1 -1
- package/dist/chunks/{cli-tt9a4124.js → cli-sr25begm.js} +1 -1
- package/dist/chunks/{cli-c60c9qvm.js → cli-swrtc7tv.js} +1 -1
- package/dist/chunks/{cli-cwbxhdt1.js → cli-sxe9wke0.js} +1 -1
- package/dist/chunks/{cli-qm684n63.js → cli-szxfz15b.js} +1 -1
- package/dist/chunks/{cli-w52yvzkn.js → cli-t4see9hh.js} +2 -2
- package/dist/chunks/cli-t5ddsvmv.js +3 -0
- package/dist/chunks/cli-t5yqvdb3.js +3 -0
- package/dist/chunks/{cli-wbe1p8n2.js → cli-t7sx6zqn.js} +1 -1
- package/dist/chunks/cli-t8ydjjs7.js +3 -0
- package/dist/chunks/{cli-3ac555qw.js → cli-tafg3e9w.js} +2 -2
- package/dist/chunks/{cli-zjfya500.js → cli-tpjr1pz9.js} +1 -1
- package/dist/chunks/{cli-d53fhs6v.js → cli-vb6aa4jk.js} +1 -1
- package/dist/chunks/{cli-749tdaqc.js → cli-vfh77r55.js} +1 -1
- package/dist/chunks/{cli-jkj867t1.js → cli-vm7dr5aa.js} +2 -2
- package/dist/chunks/{cli-k2nh5cby.js → cli-vqne1z50.js} +1 -1
- package/dist/chunks/{cli-42kma5r3.js → cli-vtsy70mz.js} +1 -1
- package/dist/chunks/{cli-mj03488e.js → cli-vy3e90k9.js} +1 -1
- package/dist/chunks/{cli-vkzp66cm.js → cli-wvctks7e.js} +1 -1
- package/dist/chunks/{cli-er7z496e.js → cli-wznsj6nb.js} +1 -1
- package/dist/chunks/{cli-msgx4pnp.js → cli-x9s7jxq5.js} +1 -1
- package/dist/chunks/{cli-grxvgq2n.js → cli-xqqnx8gk.js} +1 -1
- package/dist/chunks/{cli-rjerv816.js → cli-yaxs01at.js} +2 -2
- package/dist/chunks/{cli-fdya77ch.js → cli-yb5m6jwq.js} +3 -3
- package/dist/chunks/{cli-mzcsnm06.js → cli-yfb8bk69.js} +2 -2
- package/dist/chunks/{cli-rxb5q8zw.js → cli-yktdhy9p.js} +2 -2
- package/dist/chunks/{cli-4a4bb1kf.js → cli-yt4ezhhk.js} +1 -1
- package/dist/chunks/{cli-jgn9jprh.js → cli-yxsn8ang.js} +1 -1
- package/dist/chunks/{cli-350pymj4.js → cli-z02gsrtd.js} +2 -2
- package/dist/chunks/{cli-xmgm2573.js → cli-z2ewnqgr.js} +2 -2
- package/dist/chunks/{cli-r9db9mqv.js → cli-zqrzc3qx.js} +1 -1
- package/dist/chunks/{cli-wm8qb6j3.js → cli-zwn9x1p2.js} +1 -1
- package/dist/chunks/{cli-kq16afrr.js → cli-zxe1a0ey.js} +2 -2
- package/dist/chunks/client-qxx2ja27.js +2 -0
- package/dist/chunks/color-k1ew8kzn.js +2 -0
- package/dist/chunks/commitAttribution-nsa26sdx.js +2 -0
- package/dist/chunks/common-7t28qq0q.js +2 -0
- package/dist/chunks/{compact-zmvj1pk0.js → compact-kysg5kxd.js} +1 -1
- package/dist/chunks/config-d4kj5q8e.js +2 -0
- package/dist/chunks/{config-gj0gbg5g.js → config-txzzncm9.js} +1 -1
- package/dist/chunks/{context-h1qc69rg.js → context-aat04hqp.js} +1 -1
- package/dist/chunks/context-noninteractive-w54t6xnc.js +2 -0
- package/dist/chunks/conversation-brecqh0t.js +2 -0
- package/dist/chunks/{copy-76r9v46d.js → copy-zpvnnk85.js} +1 -1
- package/dist/chunks/cost-5fbyws6x.js +5 -0
- package/dist/chunks/createSession-hsp3x7vw.js +2 -0
- package/dist/chunks/desktop-7kdmxet0.js +2 -0
- package/dist/chunks/detectRepository-9xqead5f.js +2 -0
- package/dist/chunks/detection-z3cdks0s.js +2 -0
- package/dist/chunks/{devtools-10ba48t9.js → devtools-7jd4m7th.js} +1 -1
- package/dist/chunks/{diff-05xxjeqc.js → diff-xaw6ebj0.js} +1 -1
- package/dist/chunks/doctor-nbm4z0tx.js +2 -0
- package/dist/chunks/{earlyInput-navj6cdn.js → earlyInput-e8zh4d2d.js} +1 -1
- package/dist/chunks/{effort-a190c878.js → effort-bj5x7fcg.js} +1 -1
- package/dist/chunks/executor-e1744nra.js +2 -0
- package/dist/chunks/exit-894g29w2.js +2 -0
- package/dist/chunks/{export-ct4sty4d.js → export-tjrkechp.js} +1 -1
- package/dist/chunks/extra-usage-noninteractive-577ac873.js +2 -0
- package/dist/chunks/extra-usage-tfwmdc7z.js +2 -0
- package/dist/chunks/fast-1krm57mn.js +2 -0
- package/dist/chunks/feedback-2421cbpm.js +2 -0
- package/dist/chunks/{files-qrrrkjke.js → files-n3b22fs2.js} +1 -1
- package/dist/chunks/firstPartyEventLogger-1kwwcqdn.js +2 -0
- package/dist/chunks/gates-sd1cp8f2.js +2 -0
- package/dist/chunks/git-t6e9xdt2.js +2 -0
- package/dist/chunks/goal-0sxyk3va.js +2 -0
- package/dist/chunks/{growthbook-f7ag30hy.js → growthbook-4hx0kbpq.js} +1 -1
- package/dist/chunks/{heapdump-16gnh3zm.js → heapdump-2y7wcy1r.js} +1 -1
- package/dist/chunks/{help-rgcakcxe.js → help-a7mc9946.js} +1 -1
- package/dist/chunks/{hooks-c7fqwas5.js → hooks-22nm9hn0.js} +1 -1
- package/dist/chunks/hooks-tf9v5b0x.js +2 -0
- package/dist/chunks/{ide-q83qr9cn.js → ide-9x5zsk63.js} +1 -1
- package/dist/chunks/index-p1k4dhfc.js +2 -0
- package/dist/chunks/{initReplBridge-zfwxgpsm.js → initReplBridge-xjc6eaan.js} +1 -1
- package/dist/chunks/{ink-vkxsn90v.js → ink-9n8bszp5.js} +1 -1
- package/dist/chunks/{insights-4fwap4e5.js → insights-n7k1ty4n.js} +1 -1
- package/dist/chunks/{install-github-app-djzea7r4.js → install-github-app-zdsmjft8.js} +1 -1
- package/dist/chunks/{install-7nxzmgp5.js → install-rhzcmymh.js} +1 -1
- package/dist/chunks/install-slack-app-vhfe2dsf.js +2 -0
- package/dist/chunks/{instrumentation-223qqr23.js → instrumentation-5jjvsvke.js} +1 -1
- package/dist/chunks/keybindings-tqnmw7ng.js +3 -0
- package/dist/chunks/loadAgentsDir-j7pntb5v.js +2 -0
- package/dist/chunks/loadPluginHooks-sta7ra57.js +2 -0
- package/dist/chunks/login-j7x2fjw8.js +2 -0
- package/dist/chunks/logout-53bvwba1.js +2 -0
- package/dist/chunks/{main-0b8hyp8h.js → main-6h6y0rzf.js} +13 -13
- package/dist/chunks/{mcp-fn4yrf5y.js → mcp-3mjagnnt.js} +1 -1
- package/dist/chunks/{mcp-9enw5a8j.js → mcp-yqhzespv.js} +1 -1
- package/dist/chunks/{mcp-yymqpmv6.js → mcp-yrt7dbxp.js} +3 -3
- package/dist/chunks/{mcpServer-85gt8ypc.js → mcpServer-f90a93nt.js} +1 -1
- package/dist/chunks/{mcpServer-60jg9v58.js → mcpServer-v1dy489g.js} +1 -1
- package/dist/chunks/{memory-kam5z1cw.js → memory-mdwb22wh.js} +1 -1
- package/dist/chunks/{mobile-7zsgawnb.js → mobile-j4jwvavn.js} +1 -1
- package/dist/chunks/{model-03987182.js → model-hz3nn362.js} +1 -1
- package/dist/chunks/{model-wbxx5kcd.js → model-tf1ne2j9.js} +1 -1
- package/dist/chunks/{oauth-y0p2y1w5.js → oauth-1b0qpxz4.js} +1 -1
- package/dist/chunks/{output-style-x148mzhn.js → output-style-t39s3jqx.js} +1 -1
- package/dist/chunks/parser-8venanpw.js +2 -0
- package/dist/chunks/{passes-jrmjk5zk.js → passes-s3fqswrg.js} +1 -1
- package/dist/chunks/{permissions-karmgb0m.js → permissions-a050zfqv.js} +1 -1
- package/dist/chunks/plan-gjaybyvb.js +2 -0
- package/dist/chunks/plugin-trf2388p.js +2 -0
- package/dist/chunks/pluginStartupCheck-wxmc7h98.js +2 -0
- package/dist/chunks/{plugins-vvf897b4.js → plugins-4py04yzf.js} +2 -2
- package/dist/chunks/{preauthorizedConfig-p02f23jb.js → preauthorizedConfig-hmxcgb8e.js} +1 -1
- package/dist/chunks/{print-krwpbp2j.js → print-pmzxgktf.js} +4 -4
- package/dist/chunks/privacy-settings-b2rz35r5.js +2 -0
- package/dist/chunks/process-n5355p53.js +2 -0
- package/dist/chunks/{processBashCommand-8fqgv2ec.js → processBashCommand-zkztsgn4.js} +1 -1
- package/dist/chunks/{processSlashCommand-q32wy80b.js → processSlashCommand-mfh1h592.js} +1 -1
- package/dist/chunks/prompt-2jyjhkwg.js +2 -0
- package/dist/chunks/prompt-b34a0h5z.js +2 -0
- package/dist/chunks/provider-prompt-qe4s2yzh.js +2 -0
- package/dist/chunks/{rate-limit-options-rd4rjfv5.js → rate-limit-options-kd432dap.js} +1 -1
- package/dist/chunks/registry-d7cd5dqg.js +2 -0
- package/dist/chunks/release-notes-rwgbn4pp.js +6 -0
- package/dist/chunks/reload-plugins-9axdwaaj.js +3 -0
- package/dist/chunks/{remote-env-nn9ngr99.js → remote-env-rg4k5em5.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-cg7qd8m4.js → remoteBridgeCore-t980tt3v.js} +1 -1
- package/dist/chunks/rename-xap3rpbv.js +2 -0
- package/dist/chunks/{resume-4rvj8jbz.js → resume-3tc40yn9.js} +1 -1
- package/dist/chunks/{rewind-r4g5njsg.js → rewind-b6vg7dxs.js} +1 -1
- package/dist/chunks/sandbox-adapter-1z8xktva.js +2 -0
- package/dist/chunks/{sandbox-toggle-620bkz9q.js → sandbox-toggle-eke03mr8.js} +1 -1
- package/dist/chunks/{session-5vm1vwv1.js → session-53f3eza5.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-xscvsvqt.js +2 -0
- package/dist/chunks/{sessionStorage-ffkhmn5q.js → sessionStorage-rb63e8bn.js} +1 -1
- package/dist/chunks/settings-hp0ksjn9.js +2 -0
- package/dist/chunks/{setup-vegs56f5.js → setup-gravfzvg.js} +1 -1
- package/dist/chunks/setup-ssq8b1e6.js +2 -0
- package/dist/chunks/{setup-pf09nfsj.js → setup-z05dsr8q.js} +2 -2
- package/dist/chunks/sinks-agafqaxj.js +2 -0
- package/dist/chunks/{skills-evga8f7n.js → skills-41mfq71n.js} +1 -1
- package/dist/chunks/startupProfiler-wmf8nvfd.js +2 -0
- package/dist/chunks/state-rhxyy4qm.js +2 -0
- package/dist/chunks/{stats-mgqf6r7c.js → stats-7qg84dw1.js} +1 -1
- package/dist/chunks/status-sran2y9h.js +2 -0
- package/dist/chunks/stickers-hythmrsd.js +2 -0
- package/dist/chunks/subprocessEnv-b12dkzky.js +2 -0
- package/dist/chunks/{systemPromptSections-07y2z2wn.js → systemPromptSections-jxxyhnxe.js} +1 -1
- package/dist/chunks/{tag-gd73kstd.js → tag-58ndeaa9.js} +1 -1
- package/dist/chunks/tasks-52g28x72.js +2 -0
- package/dist/chunks/{teamHelpers-8ykc4bxa.js → teamHelpers-rxt9rvmd.js} +1 -1
- package/dist/chunks/teammateModeSnapshot-2782d4w9.js +2 -0
- package/dist/chunks/teleport-8gjys6yn.js +2 -0
- package/dist/chunks/terminalSetup-bbftxeqk.js +2 -0
- package/dist/chunks/theme-b38te5rz.js +2 -0
- package/dist/chunks/thinkback-05a9q24j.js +2 -0
- package/dist/chunks/thinkback-play-1nbagfm5.js +2 -0
- package/dist/chunks/toolSearch-7rnke366.js +2 -0
- package/dist/chunks/trustedDevice-2dn4981h.js +2 -0
- package/dist/chunks/{ultrareviewCommand-j23bjbf8.js → ultrareviewCommand-qwnsjdez.js} +1 -1
- package/dist/chunks/{update-w8wdxh3m.js → update-ney1krzn.js} +1 -1
- package/dist/chunks/upgrade-zxxxfq8c.js +2 -0
- package/dist/chunks/{upstreamproxy-x405ef9p.js → upstreamproxy-34wva0r5.js} +1 -1
- package/dist/chunks/usage-82ghrfb3.js +2 -0
- package/dist/chunks/util-xm9cs164.js +2 -0
- package/dist/chunks/utils-zs0ft181.js +2 -0
- package/dist/chunks/vim-6gxdrp1k.js +2 -0
- package/dist/chunks/worktree-xjxz4ndt.js +2 -0
- package/dist/chunks/worktreeModeEnabled-8ndm5yfs.js +2 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/App-s5ex5j86.js +0 -2
- package/dist/chunks/ApproveApiKey-b4z6h2gn.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-jbg97eja.js +0 -2
- package/dist/chunks/ClaudeMdExternalIncludesDialog-gqmed78y.js +0 -2
- package/dist/chunks/ConsoleOAuthFlow-yh72vs8j.js +0 -2
- package/dist/chunks/Doctor-k08ggw2j.js +0 -2
- package/dist/chunks/Grove-tkkskg8n.js +0 -2
- package/dist/chunks/InvalidSettingsDialog-tnd5hymg.js +0 -2
- package/dist/chunks/REPL-hjjz80kq.js +0 -2
- package/dist/chunks/ToolSearchTool-w4t61c7d.js +0 -2
- package/dist/chunks/TungstenTool-rv96z549.js +0 -2
- package/dist/chunks/agents-3exybgtb.js +0 -4
- package/dist/chunks/ant-claude-for-chrome-mcp-712xg07f.js +0 -2
- package/dist/chunks/api-z8svc3xt.js +0 -2
- package/dist/chunks/asciicast-vzd7qjbb.js +0 -2
- package/dist/chunks/auth-gbyfq0g2.js +0 -2
- package/dist/chunks/backgroundHousekeeping-m8gthtkh.js +0 -2
- package/dist/chunks/caches-fbggdeq7.js +0 -2
- package/dist/chunks/clear-fwad6zxy.js +0 -2
- package/dist/chunks/cli-55jdp9ky.js +0 -3
- package/dist/chunks/cli-78apjp3t.js +0 -3
- package/dist/chunks/cli-8hxz2qs6.js +0 -3
- package/dist/chunks/cli-95wg48h9.js +0 -3
- package/dist/chunks/cli-edkqs0ge.js +0 -3
- package/dist/chunks/cli-fakdskp6.js +0 -3
- package/dist/chunks/cli-h4dspaac.js +0 -3
- package/dist/chunks/cli-przq3zk6.js +0 -3
- package/dist/chunks/client-dkpgx025.js +0 -2
- package/dist/chunks/color-zrm6r755.js +0 -2
- package/dist/chunks/commitAttribution-3y6pessz.js +0 -2
- package/dist/chunks/common-0bee37at.js +0 -2
- package/dist/chunks/config-hbq35b68.js +0 -2
- package/dist/chunks/context-noninteractive-7wbe6qvd.js +0 -2
- package/dist/chunks/conversation-fwnfp0p5.js +0 -2
- package/dist/chunks/cost-56r5xxqy.js +0 -5
- package/dist/chunks/createSession-m5y8fjy4.js +0 -2
- package/dist/chunks/desktop-z3jqgnw7.js +0 -2
- package/dist/chunks/detectRepository-w6wawmmg.js +0 -2
- package/dist/chunks/detection-1yb2c7hh.js +0 -2
- package/dist/chunks/doctor-hgwjdraj.js +0 -2
- package/dist/chunks/executor-s42mdmqs.js +0 -2
- package/dist/chunks/exit-kyrjy6hb.js +0 -2
- package/dist/chunks/extra-usage-noninteractive-byts9mme.js +0 -2
- package/dist/chunks/extra-usage-xh1mkrca.js +0 -2
- package/dist/chunks/fast-g4aa49jf.js +0 -2
- package/dist/chunks/feedback-m5r66qd5.js +0 -2
- package/dist/chunks/firstPartyEventLogger-mthxtmgc.js +0 -2
- package/dist/chunks/gates-yhakv4vb.js +0 -2
- package/dist/chunks/git-c39vd9dm.js +0 -2
- package/dist/chunks/goal-24dr7fwz.js +0 -2
- package/dist/chunks/hooks-8dh43zmv.js +0 -2
- package/dist/chunks/index-v875zpde.js +0 -2
- package/dist/chunks/install-slack-app-3rde0k08.js +0 -2
- package/dist/chunks/keybindings-6t5f69wx.js +0 -3
- package/dist/chunks/loadAgentsDir-f8shfnw3.js +0 -2
- package/dist/chunks/loadPluginHooks-mdwjrjtp.js +0 -2
- package/dist/chunks/login-34j3xdr9.js +0 -2
- package/dist/chunks/logout-yew8mymc.js +0 -2
- package/dist/chunks/parser-4y4b0e6b.js +0 -2
- package/dist/chunks/plan-w0beh9bh.js +0 -2
- package/dist/chunks/plugin-6nwptn3s.js +0 -2
- package/dist/chunks/pluginStartupCheck-0nzv1ae9.js +0 -2
- package/dist/chunks/privacy-settings-m0mfykh0.js +0 -2
- package/dist/chunks/process-26nny2p0.js +0 -2
- package/dist/chunks/prompt-gw1e1gef.js +0 -2
- package/dist/chunks/prompt-xgw2hxrc.js +0 -2
- package/dist/chunks/provider-prompt-s26vatcw.js +0 -2
- package/dist/chunks/registry-fp7x9ekd.js +0 -2
- package/dist/chunks/release-notes-76y1r2s1.js +0 -6
- package/dist/chunks/reload-plugins-z0fepkva.js +0 -3
- package/dist/chunks/rename-fdjzyjar.js +0 -2
- package/dist/chunks/sandbox-adapter-craea9vm.js +0 -2
- package/dist/chunks/sessionFileAccessHooks-5jbvwabj.js +0 -2
- package/dist/chunks/settings-s2bcajs6.js +0 -2
- package/dist/chunks/setup-fwcttwbm.js +0 -2
- package/dist/chunks/sinks-wd4ccgbf.js +0 -2
- package/dist/chunks/startupProfiler-x5zbs2j7.js +0 -2
- package/dist/chunks/state-qpmfrvsv.js +0 -2
- package/dist/chunks/status-78yks3jw.js +0 -2
- package/dist/chunks/stickers-bdp8w2gr.js +0 -2
- package/dist/chunks/subprocessEnv-s797f06r.js +0 -2
- package/dist/chunks/tasks-63qaca0z.js +0 -2
- package/dist/chunks/teammateModeSnapshot-ae9r29dy.js +0 -2
- package/dist/chunks/teleport-es58k4xz.js +0 -2
- package/dist/chunks/terminalSetup-gyh5z5e2.js +0 -2
- package/dist/chunks/theme-qrhbaht6.js +0 -2
- package/dist/chunks/thinkback-5bs7ezv5.js +0 -2
- package/dist/chunks/thinkback-play-1dy160y5.js +0 -2
- package/dist/chunks/toolSearch-6cv284b7.js +0 -2
- package/dist/chunks/trustedDevice-77ketbgg.js +0 -2
- package/dist/chunks/upgrade-nft7c1yk.js +0 -2
- package/dist/chunks/usage-s5qgc615.js +0 -2
- package/dist/chunks/util-1geb93kp.js +0 -2
- package/dist/chunks/utils-6sb44pg8.js +0 -2
- package/dist/chunks/vim-kq91w44a.js +0 -2
- package/dist/chunks/worktree-0af6b1mt.js +0 -2
- package/dist/chunks/worktreeModeEnabled-ea6wb7aj.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{fda as j}from"./cli-w1d8n9g3.js";import{randomUUID as Y}from"crypto";var w=()=>{};function l(){return b}function i(G){b=G}function n(G){return H.has(G)?H.get(G):void 0}function r(G,J){H.set(G,J)}function s(G){return q.get(G)}function a(G,J){q.set(G,J)}function y(){b=null,H.clear(),q.clear()}function o(){return F}function E(G){F=G}function t(){F=void 0}var b=null,H,q,F;var L=j(()=>{H=new Map;q=new Map});function O(){let G=new Set;return{subscribe(J){return G.add(J),()=>{G.delete(J)}},emit(...J){for(let Q of G)Q(...J)},clear(){G.clear()}}}var _=()=>{};import{realpathSync as h}from"fs";import z from"lodash-es/sumBy.js";import{cwd as m}from"process";function k(){let G="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof h==="function"){let Q=m();try{G=h(Q).normalize("NFC")}catch{G=Q.normalize("NFC")}}return{originalCwd:G,projectRoot:G,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:G,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:Y(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,replBridgeActive:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Vx(){return x.sessionId}function Zx(G={}){if(G.setCurrentAsParent)x.parentSessionId=x.sessionId;return x.planSlugCache.delete(x.sessionId),x.sessionId=Y(),x.sessionProjectDir=null,x.sessionId}function $x(){return x.parentSessionId}function zx(G,J=null){x.planSlugCache.delete(x.sessionId),x.sessionId=G,x.sessionProjectDir=J,B.emit(G)}function Hx(){return x.sessionProjectDir}function Kx(){return x.originalCwd}function Xx(){return x.projectRoot}function Yx(G){x.originalCwd=G.normalize("NFC")}function bx(G){x.projectRoot=G.normalize("NFC")}function qx(){return x.cwd}function Fx(G){x.cwd=G.normalize("NFC")}function Ux(){return x.directConnectServerUrl}function Bx(G){x.directConnectServerUrl=G}function Wx(G,J){x.totalAPIDuration+=G,x.totalAPIDurationWithoutRetries+=J}function Nx(){x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalCostUSD=0}function fx(G,J,Q){x.modelUsage[Q]=J,x.totalCostUSD+=G}function Px(){return x.totalCostUSD}function Rx(){return x.totalAPIDuration}function wx(){return Date.now()-x.startTime}function yx(){return x.totalAPIDurationWithoutRetries}function Lx(){return x.totalToolDuration}function Ox(G){x.totalToolDuration+=G,x.turnToolDurationMs+=G,x.turnToolCount++}function _x(){return x.turnHookDurationMs}function hx(G){x.turnHookDurationMs+=G,x.turnHookCount++}function Dx(){x.turnHookDurationMs=0,x.turnHookCount=0}function Mx(){return x.turnHookCount}function kx(){return x.turnToolDurationMs}function Ix(){x.turnToolDurationMs=0,x.turnToolCount=0}function Cx(){return x.turnToolCount}function px(){return x.turnClassifierDurationMs}function gx(G){x.turnClassifierDurationMs+=G,x.turnClassifierCount++}function mx(){x.turnClassifierDurationMs=0,x.turnClassifierCount=0}function vx(){return x.turnClassifierCount}function cx(){return x.statsStore}function dx(G){x.statsStore=G}function ux(G){if(G)I();else W=!0}function lx(){if(W)I()}function I(){x.lastInteractionTime=Date.now(),W=!1}function ix(G,J){x.totalLinesAdded+=G,x.totalLinesRemoved+=J}function nx(){return x.totalLinesAdded}function rx(){return x.totalLinesRemoved}function sx(){return z(Object.values(x.modelUsage),"inputTokens")}function C(){return z(Object.values(x.modelUsage),"outputTokens")}function ax(){return z(Object.values(x.modelUsage),"cacheReadInputTokens")}function ox(){return z(Object.values(x.modelUsage),"cacheCreationInputTokens")}function Ex(){return z(Object.values(x.modelUsage),"webSearchRequests")}function tx(){return C()-N}function Ax(){return f}function Sx(G){N=C(),f=G,X=0}function ex(){return X}function Tx(){X++}function x0(){x.hasUnknownModelCost=!0}function G0(){return x.hasUnknownModelCost}function J0(){return x.lastMainRequestId}function Q0(G){x.lastMainRequestId=G}function V0(){return x.lastApiCompletionTimestamp}function Z0(G){x.lastApiCompletionTimestamp=G}function $0(){x.pendingPostCompaction=!0}function z0(){let G=x.pendingPostCompaction;return x.pendingPostCompaction=!1,G}function j0(){return x.lastInteractionTime}function H0(){if(K=!0,$)clearTimeout($);$=setTimeout(()=>{K=!1,$=void 0},p),$.unref?.()}function K0(){return K}async function X0(){while(K)await new Promise((G)=>setTimeout(G,p).unref?.())}function Y0(){return x.modelUsage}function b0(G){return x.modelUsage[G]}function q0(){return x.mainLoopModelOverride}function F0(){return x.initialMainLoopModel}function U0(G){x.mainLoopModelOverride=G}function B0(G){x.initialMainLoopModel=G}function W0(){return x.sdkBetas}function N0(G){x.sdkBetas=G}function f0(){x.totalCostUSD=0,x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalToolDuration=0,x.startTime=Date.now(),x.totalLinesAdded=0,x.totalLinesRemoved=0,x.hasUnknownModelCost=!1,x.modelUsage={},x.promptId=null}function P0({totalCostUSD:G,totalAPIDuration:J,totalAPIDurationWithoutRetries:Q,totalToolDuration:V,totalLinesAdded:Z,totalLinesRemoved:g,lastDuration:P,modelUsage:R}){if(x.totalCostUSD=G,x.totalAPIDuration=J,x.totalAPIDurationWithoutRetries=Q,x.totalToolDuration=V,x.totalLinesAdded=Z,x.totalLinesRemoved=g,R)x.modelUsage=R;if(P)x.startTime=Date.now()-P}function R0(){throw Error("resetStateForTests can only be called in tests")}function w0(){return x.modelStrings}function y0(G){x.modelStrings=G}function L0(){x.modelStrings=null}function O0(G,J){x.meter=G,x.sessionCounter=J("claude_code.session.count",{description:"Count of CLI sessions started"}),x.locCounter=J("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),x.prCounter=J("claude_code.pull_request.count",{description:"Number of pull requests created"}),x.commitCounter=J("claude_code.commit.count",{description:"Number of git commits created"}),x.costCounter=J("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),x.tokenCounter=J("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),x.codeEditToolDecisionCounter=J("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),x.activeTimeCounter=J("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function _0(){return x.meter}function h0(){return x.sessionCounter}function D0(){return x.locCounter}function M0(){return x.prCounter}function k0(){return x.commitCounter}function I0(){return x.costCounter}function C0(){return x.tokenCounter}function p0(){return x.codeEditToolDecisionCounter}function g0(){return x.activeTimeCounter}function m0(){return x.loggerProvider}function v0(G){x.loggerProvider=G}function c0(){return x.eventLogger}function d0(G){x.eventLogger=G}function u0(){return x.meterProvider}function l0(G){x.meterProvider=G}function i0(){return x.tracerProvider}function n0(G){x.tracerProvider=G}function v(){return!x.isInteractive}function r0(){return x.isInteractive}function s0(G){x.isInteractive=G}function a0(){return x.clientType}function o0(G){x.clientType=G}function E0(){return x.sdkAgentProgressSummariesEnabled}function t0(G){x.sdkAgentProgressSummariesEnabled=G}function A0(){return x.kairosActive}function S0(G){x.kairosActive=G}function e0(){return x.replBridgeActive}function T0(G){x.replBridgeActive=G}function x1(){return x.strictToolResultPairing}function G1(G){x.strictToolResultPairing=G}function J1(){return x.userMsgOptIn}function Q1(G){x.userMsgOptIn=G}function V1(){return x.sessionSource}function Z1(G){x.sessionSource=G}function $1(){return x.questionPreviewFormat}function z1(G){x.questionPreviewFormat=G}function j1(){return x.agentColorMap}function H1(){return x.flagSettingsPath}function K1(G){x.flagSettingsPath=G}function X1(){return x.flagSettingsInline}function Y1(G){x.flagSettingsInline=G}function b1(){return x.sessionIngressToken}function q1(G){x.sessionIngressToken=G}function F1(){return x.oauthTokenFromFd}function U1(G){x.oauthTokenFromFd=G}function B1(){return x.apiKeyFromFd}function W1(G){x.apiKeyFromFd=G}function N1(G){x.lastAPIRequest=G}function f1(){return x.lastAPIRequest}function P1(G){x.lastAPIRequestMessages=G}function R1(){return x.lastAPIRequestMessages}function w1(G){x.lastClassifierRequests=G}function y1(){return x.lastClassifierRequests}function L1(G){x.cachedClaudeMdContent=G}function O1(){return x.cachedClaudeMdContent}function _1(G){if(x.inMemoryErrorLog.length>=100)x.inMemoryErrorLog.shift();x.inMemoryErrorLog.push(G)}function h1(){return x.allowedSettingSources}function D1(G){x.allowedSettingSources=G}function M1(){return v()&&x.clientType!=="claude-vscode"}function k1(G){x.inlinePlugins=G}function I1(){return x.inlinePlugins}function C1(G){x.chromeFlagOverride=G}function p1(){return x.chromeFlagOverride}function g1(G){x.useCoworkPlugins=G,y()}function m1(){return x.useCoworkPlugins}function v1(G){x.sessionBypassPermissionsMode=G}function c1(){return x.sessionBypassPermissionsMode}function d1(G){x.scheduledTasksEnabled=G}function u1(){return x.scheduledTasksEnabled}function l1(){return x.sessionCronTasks}function i1(G){x.sessionCronTasks.push(G)}function n1(G){if(G.length===0)return 0;let J=new Set(G),Q=x.sessionCronTasks.filter((Z)=>!J.has(Z.id)),V=x.sessionCronTasks.length-Q.length;if(V===0)return 0;return x.sessionCronTasks=Q,V}function r1(G){x.sessionTrustAccepted=G}function s1(){return x.sessionTrustAccepted}function a1(G){x.sessionPersistenceDisabled=G}function o1(){return x.sessionPersistenceDisabled}function E1(){return x.hasExitedPlanMode}function t1(G){x.hasExitedPlanMode=G}function A1(){return x.needsPlanModeExitAttachment}function S1(G){x.needsPlanModeExitAttachment=G}function e1(G,J){if(J==="plan"&&G!=="plan")x.needsPlanModeExitAttachment=!1;if(G==="plan"&&J!=="plan")x.needsPlanModeExitAttachment=!0}function T1(){return x.needsAutoModeExitAttachment}function x2(G){x.needsAutoModeExitAttachment=G}function G2(G,J){if(G==="auto"&&J==="plan"||G==="plan"&&J==="auto")return;let Q=G==="auto",V=J==="auto";if(V&&!Q)x.needsAutoModeExitAttachment=!1;if(Q&&!V)x.needsAutoModeExitAttachment=!0}function J2(){return x.lspRecommendationShownThisSession}function Q2(G){x.lspRecommendationShownThisSession=G}function V2(G){x.initJsonSchema=G}function Z2(){return x.initJsonSchema}function $2(G){if(!x.registeredHooks)x.registeredHooks={};for(let[J,Q]of Object.entries(G)){let V=J;if(!x.registeredHooks[V])x.registeredHooks[V]=[];x.registeredHooks[V].push(...Q)}}function z2(){return x.registeredHooks}function j2(){x.registeredHooks=null}function H2(){if(!x.registeredHooks)return;let G={};for(let[J,Q]of Object.entries(x.registeredHooks)){let V=Q.filter((Z)=>!("pluginRoot"in Z));if(V.length>0)G[J]=V}x.registeredHooks=Object.keys(G).length>0?G:null}function K2(){x.initJsonSchema=null,x.registeredHooks=null}function X2(){return x.planSlugCache}function Y2(){return x.sessionCreatedTeams}function b2(G){x.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:G.sessionId}}function q2(){return x.teleportedSessionInfo}function F2(){if(x.teleportedSessionInfo)x.teleportedSessionInfo.hasLoggedFirstMessage=!0}function U2(G,J,Q,V=null){let Z=`${V??""}:${G}`;x.invokedSkills.set(Z,{skillName:G,skillPath:J,content:Q,invokedAt:Date.now(),agentId:V})}function B2(){return x.invokedSkills}function W2(G){let J=G??null,Q=new Map;for(let[V,Z]of x.invokedSkills)if(Z.agentId===J)Q.set(V,Z);return Q}function N2(G){if(!G||G.size===0){x.invokedSkills.clear();return}for(let[J,Q]of x.invokedSkills)if(Q.agentId===null||!G.has(Q.agentId))x.invokedSkills.delete(J)}function f2(G){for(let[J,Q]of x.invokedSkills)if(Q.agentId===G)x.invokedSkills.delete(J)}function P2(G,J){if(process.env.USER_TYPE!=="ant")return;if(G.includes("exec")&&G.includes("claude-prompt-"))return;let Q=Date.now();if(x.slowOperations=x.slowOperations.filter((V)=>Q-V.timestamp<U),x.slowOperations.push({operation:G,durationMs:J,timestamp:Q}),x.slowOperations.length>D)x.slowOperations=x.slowOperations.slice(-D)}function R2(){if(x.slowOperations.length===0)return M;let G=Date.now();if(x.slowOperations.some((J)=>G-J.timestamp>=U)){if(x.slowOperations=x.slowOperations.filter((J)=>G-J.timestamp<U),x.slowOperations.length===0)return M}return x.slowOperations}function w2(){return x.mainThreadAgentType}function y2(G){x.mainThreadAgentType=G}function L2(){return x.isRemoteMode}function O2(G){x.isRemoteMode=G}function _2(){return x.systemPromptSectionCache}function h2(G,J){x.systemPromptSectionCache.set(G,J)}function D2(){x.systemPromptSectionCache.clear()}function M2(){return x.lastEmittedDate}function k2(G){x.lastEmittedDate=G}function I2(){return x.additionalDirectoriesForClaudeMd}function C2(G){x.additionalDirectoriesForClaudeMd=G}function p2(){return x.allowedChannels}function g2(G){x.allowedChannels=G}function m2(){return x.hasDevChannels}function v2(G){x.hasDevChannels=G}function c2(){return x.promptCache1hAllowlist}function d2(G){x.promptCache1hAllowlist=G}function u2(){return x.promptCache1hEligible}function l2(G){x.promptCache1hEligible=G}function i2(){return x.afkModeHeaderLatched}function n2(G){x.afkModeHeaderLatched=G}function r2(){return x.fastModeHeaderLatched}function s2(G){x.fastModeHeaderLatched=G}function a2(){return x.cacheEditingHeaderLatched}function o2(G){x.cacheEditingHeaderLatched=G}function E2(){return x.thinkingClearLatched}function t2(G){x.thinkingClearLatched=G}function A2(){x.afkModeHeaderLatched=null,x.fastModeHeaderLatched=null,x.cacheEditingHeaderLatched=null,x.thinkingClearLatched=null}function S2(){return x.promptId}function e2(G){x.promptId=G}var x,B,jx,W=!1,N=0,f=null,X=0,K=!1,$,p=150,D=10,U=1e4,M;var c=j(()=>{w();L();_();x=k();B=O(),jx=B.subscribe;M=[]});
|
|
3
|
-
export{l as
|
|
2
|
+
import{hda as j}from"./cli-qwx84m9c.js";import{randomUUID as Y}from"crypto";var w=()=>{};function l(){return b}function i(G){b=G}function n(G){return H.has(G)?H.get(G):void 0}function r(G,J){H.set(G,J)}function s(G){return q.get(G)}function a(G,J){q.set(G,J)}function y(){b=null,H.clear(),q.clear()}function o(){return F}function E(G){F=G}function t(){F=void 0}var b=null,H,q,F;var L=j(()=>{H=new Map;q=new Map});function O(){let G=new Set;return{subscribe(J){return G.add(J),()=>{G.delete(J)}},emit(...J){for(let Q of G)Q(...J)},clear(){G.clear()}}}var _=()=>{};import{realpathSync as h}from"fs";import z from"lodash-es/sumBy.js";import{cwd as m}from"process";function k(){let G="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof h==="function"){let Q=m();try{G=h(Q).normalize("NFC")}catch{G=Q.normalize("NFC")}}return{originalCwd:G,projectRoot:G,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:G,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:Y(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,replBridgeActive:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Vx(){return x.sessionId}function Zx(G={}){if(G.setCurrentAsParent)x.parentSessionId=x.sessionId;return x.planSlugCache.delete(x.sessionId),x.sessionId=Y(),x.sessionProjectDir=null,x.sessionId}function $x(){return x.parentSessionId}function zx(G,J=null){x.planSlugCache.delete(x.sessionId),x.sessionId=G,x.sessionProjectDir=J,B.emit(G)}function Hx(){return x.sessionProjectDir}function Kx(){return x.originalCwd}function Xx(){return x.projectRoot}function Yx(G){x.originalCwd=G.normalize("NFC")}function bx(G){x.projectRoot=G.normalize("NFC")}function qx(){return x.cwd}function Fx(G){x.cwd=G.normalize("NFC")}function Ux(){return x.directConnectServerUrl}function Bx(G){x.directConnectServerUrl=G}function Wx(G,J){x.totalAPIDuration+=G,x.totalAPIDurationWithoutRetries+=J}function Nx(){x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalCostUSD=0}function fx(G,J,Q){x.modelUsage[Q]=J,x.totalCostUSD+=G}function Px(){return x.totalCostUSD}function Rx(){return x.totalAPIDuration}function wx(){return Date.now()-x.startTime}function yx(){return x.totalAPIDurationWithoutRetries}function Lx(){return x.totalToolDuration}function Ox(G){x.totalToolDuration+=G,x.turnToolDurationMs+=G,x.turnToolCount++}function _x(){return x.turnHookDurationMs}function hx(G){x.turnHookDurationMs+=G,x.turnHookCount++}function Dx(){x.turnHookDurationMs=0,x.turnHookCount=0}function Mx(){return x.turnHookCount}function kx(){return x.turnToolDurationMs}function Ix(){x.turnToolDurationMs=0,x.turnToolCount=0}function Cx(){return x.turnToolCount}function px(){return x.turnClassifierDurationMs}function gx(G){x.turnClassifierDurationMs+=G,x.turnClassifierCount++}function mx(){x.turnClassifierDurationMs=0,x.turnClassifierCount=0}function vx(){return x.turnClassifierCount}function cx(){return x.statsStore}function dx(G){x.statsStore=G}function ux(G){if(G)I();else W=!0}function lx(){if(W)I()}function I(){x.lastInteractionTime=Date.now(),W=!1}function ix(G,J){x.totalLinesAdded+=G,x.totalLinesRemoved+=J}function nx(){return x.totalLinesAdded}function rx(){return x.totalLinesRemoved}function sx(){return z(Object.values(x.modelUsage),"inputTokens")}function C(){return z(Object.values(x.modelUsage),"outputTokens")}function ax(){return z(Object.values(x.modelUsage),"cacheReadInputTokens")}function ox(){return z(Object.values(x.modelUsage),"cacheCreationInputTokens")}function Ex(){return z(Object.values(x.modelUsage),"webSearchRequests")}function tx(){return C()-N}function Ax(){return f}function Sx(G){N=C(),f=G,X=0}function ex(){return X}function Tx(){X++}function x0(){x.hasUnknownModelCost=!0}function G0(){return x.hasUnknownModelCost}function J0(){return x.lastMainRequestId}function Q0(G){x.lastMainRequestId=G}function V0(){return x.lastApiCompletionTimestamp}function Z0(G){x.lastApiCompletionTimestamp=G}function $0(){x.pendingPostCompaction=!0}function z0(){let G=x.pendingPostCompaction;return x.pendingPostCompaction=!1,G}function j0(){return x.lastInteractionTime}function H0(){if(K=!0,$)clearTimeout($);$=setTimeout(()=>{K=!1,$=void 0},p),$.unref?.()}function K0(){return K}async function X0(){while(K)await new Promise((G)=>setTimeout(G,p).unref?.())}function Y0(){return x.modelUsage}function b0(G){return x.modelUsage[G]}function q0(){return x.mainLoopModelOverride}function F0(){return x.initialMainLoopModel}function U0(G){x.mainLoopModelOverride=G}function B0(G){x.initialMainLoopModel=G}function W0(){return x.sdkBetas}function N0(G){x.sdkBetas=G}function f0(){x.totalCostUSD=0,x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalToolDuration=0,x.startTime=Date.now(),x.totalLinesAdded=0,x.totalLinesRemoved=0,x.hasUnknownModelCost=!1,x.modelUsage={},x.promptId=null}function P0({totalCostUSD:G,totalAPIDuration:J,totalAPIDurationWithoutRetries:Q,totalToolDuration:V,totalLinesAdded:Z,totalLinesRemoved:g,lastDuration:P,modelUsage:R}){if(x.totalCostUSD=G,x.totalAPIDuration=J,x.totalAPIDurationWithoutRetries=Q,x.totalToolDuration=V,x.totalLinesAdded=Z,x.totalLinesRemoved=g,R)x.modelUsage=R;if(P)x.startTime=Date.now()-P}function R0(){throw Error("resetStateForTests can only be called in tests")}function w0(){return x.modelStrings}function y0(G){x.modelStrings=G}function L0(){x.modelStrings=null}function O0(G,J){x.meter=G,x.sessionCounter=J("claude_code.session.count",{description:"Count of CLI sessions started"}),x.locCounter=J("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),x.prCounter=J("claude_code.pull_request.count",{description:"Number of pull requests created"}),x.commitCounter=J("claude_code.commit.count",{description:"Number of git commits created"}),x.costCounter=J("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),x.tokenCounter=J("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),x.codeEditToolDecisionCounter=J("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),x.activeTimeCounter=J("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function _0(){return x.meter}function h0(){return x.sessionCounter}function D0(){return x.locCounter}function M0(){return x.prCounter}function k0(){return x.commitCounter}function I0(){return x.costCounter}function C0(){return x.tokenCounter}function p0(){return x.codeEditToolDecisionCounter}function g0(){return x.activeTimeCounter}function m0(){return x.loggerProvider}function v0(G){x.loggerProvider=G}function c0(){return x.eventLogger}function d0(G){x.eventLogger=G}function u0(){return x.meterProvider}function l0(G){x.meterProvider=G}function i0(){return x.tracerProvider}function n0(G){x.tracerProvider=G}function v(){return!x.isInteractive}function r0(){return x.isInteractive}function s0(G){x.isInteractive=G}function a0(){return x.clientType}function o0(G){x.clientType=G}function E0(){return x.sdkAgentProgressSummariesEnabled}function t0(G){x.sdkAgentProgressSummariesEnabled=G}function A0(){return x.kairosActive}function S0(G){x.kairosActive=G}function e0(){return x.replBridgeActive}function T0(G){x.replBridgeActive=G}function x1(){return x.strictToolResultPairing}function G1(G){x.strictToolResultPairing=G}function J1(){return x.userMsgOptIn}function Q1(G){x.userMsgOptIn=G}function V1(){return x.sessionSource}function Z1(G){x.sessionSource=G}function $1(){return x.questionPreviewFormat}function z1(G){x.questionPreviewFormat=G}function j1(){return x.agentColorMap}function H1(){return x.flagSettingsPath}function K1(G){x.flagSettingsPath=G}function X1(){return x.flagSettingsInline}function Y1(G){x.flagSettingsInline=G}function b1(){return x.sessionIngressToken}function q1(G){x.sessionIngressToken=G}function F1(){return x.oauthTokenFromFd}function U1(G){x.oauthTokenFromFd=G}function B1(){return x.apiKeyFromFd}function W1(G){x.apiKeyFromFd=G}function N1(G){x.lastAPIRequest=G}function f1(){return x.lastAPIRequest}function P1(G){x.lastAPIRequestMessages=G}function R1(){return x.lastAPIRequestMessages}function w1(G){x.lastClassifierRequests=G}function y1(){return x.lastClassifierRequests}function L1(G){x.cachedClaudeMdContent=G}function O1(){return x.cachedClaudeMdContent}function _1(G){if(x.inMemoryErrorLog.length>=100)x.inMemoryErrorLog.shift();x.inMemoryErrorLog.push(G)}function h1(){return x.allowedSettingSources}function D1(G){x.allowedSettingSources=G}function M1(){return v()&&x.clientType!=="claude-vscode"}function k1(G){x.inlinePlugins=G}function I1(){return x.inlinePlugins}function C1(G){x.chromeFlagOverride=G}function p1(){return x.chromeFlagOverride}function g1(G){x.useCoworkPlugins=G,y()}function m1(){return x.useCoworkPlugins}function v1(G){x.sessionBypassPermissionsMode=G}function c1(){return x.sessionBypassPermissionsMode}function d1(G){x.scheduledTasksEnabled=G}function u1(){return x.scheduledTasksEnabled}function l1(){return x.sessionCronTasks}function i1(G){x.sessionCronTasks.push(G)}function n1(G){if(G.length===0)return 0;let J=new Set(G),Q=x.sessionCronTasks.filter((Z)=>!J.has(Z.id)),V=x.sessionCronTasks.length-Q.length;if(V===0)return 0;return x.sessionCronTasks=Q,V}function r1(G){x.sessionTrustAccepted=G}function s1(){return x.sessionTrustAccepted}function a1(G){x.sessionPersistenceDisabled=G}function o1(){return x.sessionPersistenceDisabled}function E1(){return x.hasExitedPlanMode}function t1(G){x.hasExitedPlanMode=G}function A1(){return x.needsPlanModeExitAttachment}function S1(G){x.needsPlanModeExitAttachment=G}function e1(G,J){if(J==="plan"&&G!=="plan")x.needsPlanModeExitAttachment=!1;if(G==="plan"&&J!=="plan")x.needsPlanModeExitAttachment=!0}function T1(){return x.needsAutoModeExitAttachment}function x2(G){x.needsAutoModeExitAttachment=G}function G2(G,J){if(G==="auto"&&J==="plan"||G==="plan"&&J==="auto")return;let Q=G==="auto",V=J==="auto";if(V&&!Q)x.needsAutoModeExitAttachment=!1;if(Q&&!V)x.needsAutoModeExitAttachment=!0}function J2(){return x.lspRecommendationShownThisSession}function Q2(G){x.lspRecommendationShownThisSession=G}function V2(G){x.initJsonSchema=G}function Z2(){return x.initJsonSchema}function $2(G){if(!x.registeredHooks)x.registeredHooks={};for(let[J,Q]of Object.entries(G)){let V=J;if(!x.registeredHooks[V])x.registeredHooks[V]=[];x.registeredHooks[V].push(...Q)}}function z2(){return x.registeredHooks}function j2(){x.registeredHooks=null}function H2(){if(!x.registeredHooks)return;let G={};for(let[J,Q]of Object.entries(x.registeredHooks)){let V=Q.filter((Z)=>!("pluginRoot"in Z));if(V.length>0)G[J]=V}x.registeredHooks=Object.keys(G).length>0?G:null}function K2(){x.initJsonSchema=null,x.registeredHooks=null}function X2(){return x.planSlugCache}function Y2(){return x.sessionCreatedTeams}function b2(G){x.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:G.sessionId}}function q2(){return x.teleportedSessionInfo}function F2(){if(x.teleportedSessionInfo)x.teleportedSessionInfo.hasLoggedFirstMessage=!0}function U2(G,J,Q,V=null){let Z=`${V??""}:${G}`;x.invokedSkills.set(Z,{skillName:G,skillPath:J,content:Q,invokedAt:Date.now(),agentId:V})}function B2(){return x.invokedSkills}function W2(G){let J=G??null,Q=new Map;for(let[V,Z]of x.invokedSkills)if(Z.agentId===J)Q.set(V,Z);return Q}function N2(G){if(!G||G.size===0){x.invokedSkills.clear();return}for(let[J,Q]of x.invokedSkills)if(Q.agentId===null||!G.has(Q.agentId))x.invokedSkills.delete(J)}function f2(G){for(let[J,Q]of x.invokedSkills)if(Q.agentId===G)x.invokedSkills.delete(J)}function P2(G,J){if(process.env.USER_TYPE!=="ant")return;if(G.includes("exec")&&G.includes("claude-prompt-"))return;let Q=Date.now();if(x.slowOperations=x.slowOperations.filter((V)=>Q-V.timestamp<U),x.slowOperations.push({operation:G,durationMs:J,timestamp:Q}),x.slowOperations.length>D)x.slowOperations=x.slowOperations.slice(-D)}function R2(){if(x.slowOperations.length===0)return M;let G=Date.now();if(x.slowOperations.some((J)=>G-J.timestamp>=U)){if(x.slowOperations=x.slowOperations.filter((J)=>G-J.timestamp<U),x.slowOperations.length===0)return M}return x.slowOperations}function w2(){return x.mainThreadAgentType}function y2(G){x.mainThreadAgentType=G}function L2(){return x.isRemoteMode}function O2(G){x.isRemoteMode=G}function _2(){return x.systemPromptSectionCache}function h2(G,J){x.systemPromptSectionCache.set(G,J)}function D2(){x.systemPromptSectionCache.clear()}function M2(){return x.lastEmittedDate}function k2(G){x.lastEmittedDate=G}function I2(){return x.additionalDirectoriesForClaudeMd}function C2(G){x.additionalDirectoriesForClaudeMd=G}function p2(){return x.allowedChannels}function g2(G){x.allowedChannels=G}function m2(){return x.hasDevChannels}function v2(G){x.hasDevChannels=G}function c2(){return x.promptCache1hAllowlist}function d2(G){x.promptCache1hAllowlist=G}function u2(){return x.promptCache1hEligible}function l2(G){x.promptCache1hEligible=G}function i2(){return x.afkModeHeaderLatched}function n2(G){x.afkModeHeaderLatched=G}function r2(){return x.fastModeHeaderLatched}function s2(G){x.fastModeHeaderLatched=G}function a2(){return x.cacheEditingHeaderLatched}function o2(G){x.cacheEditingHeaderLatched=G}function E2(){return x.thinkingClearLatched}function t2(G){x.thinkingClearLatched=G}function A2(){x.afkModeHeaderLatched=null,x.fastModeHeaderLatched=null,x.cacheEditingHeaderLatched=null,x.thinkingClearLatched=null}function S2(){return x.promptId}function e2(G){x.promptId=G}var x,B,jx,W=!1,N=0,f=null,X=0,K=!1,$,p=150,D=10,U=1e4,M;var c=j(()=>{w();L();_();x=k();B=O(),jx=B.subscribe;M=[]});
|
|
3
|
+
export{l as V_,i as W_,n as X_,r as Y_,s as Z_,a as __,y as $_,o as a$,E as b$,t as c$,L as d$,O as e$,_ as f$,Vx as g$,Zx as h$,$x as i$,zx as j$,jx as k$,Hx as l$,Kx as m$,Xx as n$,Yx as o$,bx as p$,qx as q$,Fx as r$,Ux as s$,Bx as t$,Wx as u$,Nx as v$,fx as w$,Px as x$,Rx as y$,wx as z$,yx as A$,Lx as B$,Ox as C$,_x as D$,hx as E$,Dx as F$,Mx as G$,kx as H$,Ix as I$,Cx as J$,px as K$,gx as L$,mx as M$,vx as N$,cx as O$,dx as P$,ux as Q$,lx as R$,ix as S$,nx as T$,rx as U$,sx as V$,C as W$,ax as X$,ox as Y$,Ex as Z$,tx as _$,Ax as $$,Sx as aaa,ex as baa,Tx as caa,x0 as daa,G0 as eaa,J0 as faa,Q0 as gaa,V0 as haa,Z0 as iaa,$0 as jaa,z0 as kaa,j0 as laa,H0 as maa,K0 as naa,X0 as oaa,Y0 as paa,b0 as qaa,q0 as raa,F0 as saa,U0 as taa,B0 as uaa,W0 as vaa,N0 as waa,f0 as xaa,P0 as yaa,R0 as zaa,w0 as Aaa,y0 as Baa,L0 as Caa,O0 as Daa,_0 as Eaa,h0 as Faa,D0 as Gaa,M0 as Haa,k0 as Iaa,I0 as Jaa,C0 as Kaa,p0 as Laa,g0 as Maa,m0 as Naa,v0 as Oaa,c0 as Paa,d0 as Qaa,u0 as Raa,l0 as Saa,i0 as Taa,n0 as Uaa,v as Vaa,r0 as Waa,s0 as Xaa,a0 as Yaa,o0 as Zaa,E0 as _aa,t0 as $aa,A0 as aba,S0 as bba,e0 as cba,T0 as dba,x1 as eba,G1 as fba,J1 as gba,Q1 as hba,V1 as iba,Z1 as jba,$1 as kba,z1 as lba,j1 as mba,H1 as nba,K1 as oba,X1 as pba,Y1 as qba,b1 as rba,q1 as sba,F1 as tba,U1 as uba,B1 as vba,W1 as wba,N1 as xba,f1 as yba,P1 as zba,R1 as Aba,w1 as Bba,y1 as Cba,L1 as Dba,O1 as Eba,_1 as Fba,h1 as Gba,D1 as Hba,M1 as Iba,k1 as Jba,I1 as Kba,C1 as Lba,p1 as Mba,g1 as Nba,m1 as Oba,v1 as Pba,c1 as Qba,d1 as Rba,u1 as Sba,l1 as Tba,i1 as Uba,n1 as Vba,r1 as Wba,s1 as Xba,a1 as Yba,o1 as Zba,E1 as _ba,t1 as $ba,A1 as aca,S1 as bca,e1 as cca,T1 as dca,x2 as eca,G2 as fca,J2 as gca,Q2 as hca,V2 as ica,Z2 as jca,$2 as kca,z2 as lca,j2 as mca,H2 as nca,K2 as oca,X2 as pca,Y2 as qca,b2 as rca,q2 as sca,F2 as tca,U2 as uca,B2 as vca,W2 as wca,N2 as xca,f2 as yca,P2 as zca,R2 as Aca,w2 as Bca,y2 as Cca,L2 as Dca,O2 as Eca,_2 as Fca,h2 as Gca,D2 as Hca,M2 as Ica,k2 as Jca,I2 as Kca,C2 as Lca,p2 as Mca,g2 as Nca,m2 as Oca,v2 as Pca,c2 as Qca,d2 as Rca,u2 as Sca,l2 as Tca,i2 as Uca,n2 as Vca,r2 as Wca,s2 as Xca,a2 as Yca,o2 as Zca,E2 as _ca,t2 as $ca,A2 as ada,S2 as bda,e2 as cda,c as dda};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{nR as X,rR as S}from"./cli-
|
|
2
|
+
import{nR as X,rR as S}from"./cli-brr3bnrj.js";import{Q3 as b,u3 as B,x3 as O}from"./cli-192xnkcx.js";import{C8 as y,G8 as w,L8 as P,z8 as H}from"./cli-8kpqq0ea.js";import{Y9 as k,d_ as p}from"./cli-awb77t95.js";import{H_ as I,U_ as M}from"./cli-q8zmmp6z.js";import{Vaa as W,dda as f}from"./cli-tafg3e9w.js";import{hda as A}from"./cli-qwx84m9c.js";import E from"axios";import{mkdir as _,readFile as d,writeFile as F}from"fs/promises";import{dirname as G,join as N}from"path";import{coerce as U}from"semver";function T(){return N(I(),"cache","changelog.md")}async function qq(){let J=O();if(!J.cachedChangelog)return;let q=T();try{await _(G(q),{recursive:!0}),await F(q,J.cachedChangelog,{encoding:"utf-8",flag:"wx"})}catch{}B(({cachedChangelog:Y,...z})=>z)}async function m(){if(W())return;if(H())return;let J=await E.get(V);if(J.status===200){let q=J.data;if(q===$)return;let Y=T();await _(G(Y),{recursive:!0}),await F(Y,q,{encoding:"utf-8"}),$=q;let z=Date.now();B((K)=>({...K,changelogLastFetched:z}))}}async function v(){if($!==null)return $;let J=T();try{let q=await d(J,"utf-8");return $=q,q}catch{return $="",""}}function j(){return $??""}function L(J){try{if(!J)return{};let q={},Y=J.split(/^## /gm).slice(1);for(let z of Y){let K=z.trim().split(`
|
|
3
3
|
`);if(K.length===0)continue;let Q=K[0];if(!Q)continue;let Z=Q.split(" - ")[0]?.trim()||"";if(!Z)continue;let D=K.slice(1).filter((x)=>x.trim().startsWith("- ")).map((x)=>x.trim().substring(2).trim()).filter(Boolean);if(D.length>0)q[Z]=D}return q}catch(q){return w(k(q)),{}}}function R(J,q,Y=j()){try{let z=L(Y),K=U(J),Q=q?U(q):null;if(!Q||K&&X(K.version,Q.version))return Object.entries(z).filter(([Z])=>!Q||X(Z,Q.version)).sort(([Z],[D])=>X(Z,D)?-1:1).flatMap(([Z,D])=>D).filter(Boolean).slice(0,u)}catch(z){return w(k(z)),[]}return[]}function zq(J=j()){try{let q=L(J);return Object.keys(q).sort((z,K)=>X(z,K)?1:-1).map((z)=>{let K=q[z];if(!K||K.length===0)return null;let Q=K.filter(Boolean);if(Q.length===0)return null;return[z,Q]}).filter((z)=>z!==null)}catch(q){return w(k(q)),[]}}async function Jq(J,q=MACRO.VERSION){if(process.env.USER_TYPE==="ant"){let Q=MACRO.VERSION_CHANGELOG;if(Q){let Z=Q.trim().split(`
|
|
4
4
|
`).filter(Boolean);return{hasReleaseNotes:Z.length>0,releaseNotes:Z}}return{hasReleaseNotes:!1,releaseNotes:[]}}let Y=await v();if(J!==q||!Y)m().catch((Q)=>w(k(Q)));let z=R(q,J,Y);return{hasReleaseNotes:z.length>0,releaseNotes:z}}function Kq(J,q=MACRO.VERSION){if(process.env.USER_TYPE==="ant"){let z=MACRO.VERSION_CHANGELOG;if(z){let K=z.trim().split(`
|
|
5
5
|
`).filter(Boolean);return{hasReleaseNotes:K.length>0,releaseNotes:K}}return{hasReleaseNotes:!1,releaseNotes:[]}}let Y=R(q,J);return{hasReleaseNotes:Y.length>0,releaseNotes:Y}}var u=5,e="https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md",V="https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md",$=null;var C=A(()=>{f();b();M();p();P();y();S()});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$R as y,dS as V}from"./cli-
|
|
2
|
+
import{$R as y,dS as V}from"./cli-a25jeqs8.js";import{I7 as p,K7 as K}from"./cli-7wxv39ry.js";import{s9 as q,u9 as Q}from"./cli-5ajcy93q.js";import{hda as J}from"./cli-qwx84m9c.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
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,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Tb as Ef,Zb as Y8}from"./cli-
|
|
2
|
+
import{Tb as Ef,Zb as Y8}from"./cli-m6amgxq3.js";import{AF as z6,Ap as MK,BF as hK,Bg as sq,Bu as HK,CA as zf,DF as n8,Dg as Pf,Dp as S8,EA as jK,Eg as Z6,Ep as Sq,Fp as M8,Gu as o8,HA as I8,Ku as Jq,Lm as gf,Lu as Bq,Mm as O8,Nw as Vf,Pk as Zq,Qw as V6,Rw as F6,Sw as J6,Tw as v6,Uw as B6,VE as hf,Vw as U6,Wm as zK,Ww as Q6,Xm as c8,Ym as h6,Yw as iq,Zk as RK,Zm as CK,Zw as gq,_w as X6,aj as Iq,av as Yf,bj as g6,bt as tq,bv as eK,cJ as tf,ct as Nf,dt as rq,et as wf,fJ as d8,gJ as c6,hA as Uq,hJ as AK,jA as vf,ki as Gf,ni as FK,oE as jf,oq as pf,oz as YK,pq as BK,pz as V8,rE as If,sv as of,tA as _f,tv as H8,uA as lK,uG as t6,um as nq,vE as nf,vG as dK,wm as DK,zA as vK}from"./cli-b3k8arn1.js";import{QL as OK,RL as L8,SL as a,TL as Tq,WL as wq,XL as mq,YL as t,ZL as $q}from"./cli-4pwyex04.js";import{EO as P6,FO as sf,TO as Yq,UO as dq}from"./cli-8jym9hp6.js";import{DQ as N,FQ as M,JQ as K6,TQ as Af,fR as Hq,kP as Fq}from"./cli-a2d962bq.js";import{YR as m6,dS as g8}from"./cli-a25jeqs8.js";import{fS as o6,pS as pK}from"./cli-ceas97gw.js";import{FU as Mq,FV as Lf,GU as Gq,GV as Sf,JV as _8,LU as Eq,Q2 as s6,VW as e6,WV as _q,WW as mK,a3 as $K,cW as u6}from"./cli-192xnkcx.js";import{c4 as _K,d4 as pq,f4 as y6}from"./cli-r43jhzwm.js";import{B5 as r6,C5 as z8}from"./cli-an97yxg9.js";import{D5 as Y6,E5 as GK}from"./cli-hpxspent.js";import{c6 as yq,f6 as uq,h6 as ef,j6 as f6,k6 as eq,r6 as Cq}from"./cli-bdgrtpsy.js";import{G8 as l6,L8 as TK}from"./cli-8kpqq0ea.js";import{$8 as C6,_8 as Pq}from"./cli-e5yek4vx.js";import{A_ as S6,Z9 as Dq,d_ as a6,p_ as lf,r_ as k8,x_ as Rq}from"./cli-awb77t95.js";import{fda as uK,hda as fq}from"./cli-qwx84m9c.js";function Vq(K){return typeof K==="object"&&K!==null&&"type"in K&&K.type==="local_agent"}function O6(K){return{...K,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:c6(K.status)?Date.now()+ZK:void 0}}function M6(K,q){Pq("tengu_transcript_view_enter",{}),q((f)=>{let P=f.tasks[K],_=f.viewingAgentTaskId,w=_!==void 0?f.tasks[_]:void 0,O=_!==void 0&&_!==K&&Vq(w)&&w.retain,z=Vq(P)&&(!P.retain||P.evictAfter!==void 0),Y=f.viewingAgentTaskId!==K||f.viewSelectionMode!=="viewing-agent";if(!z&&!Y&&!O)return f;let v=f.tasks;if(O||z){if(v={...f.tasks},O)v[_]=O6(w);if(z)v[K]={...P,retain:!0,evictAfter:void 0}}return{...f,viewingAgentTaskId:K,viewSelectionMode:"viewing-agent",tasks:v}})}function H6(K){Pq("tengu_transcript_view_exit",{}),K((q)=>{let f=q.viewingAgentTaskId,P={...q,viewingAgentTaskId:void 0,viewSelectionMode:"none"};if(f===void 0)return q.viewSelectionMode==="none"?q:P;let _=q.tasks[f];if(!Vq(_)||!_.retain)return P;return{...P,tasks:{...q.tasks,[f]:O6(_)}}})}function PP(K,q){q((f)=>{let P=f.tasks[K];if(!Vq(P))return f;if(P.status==="running")return P.abortController?.abort(),f;if(P.evictAfter===0)return f;let _=f.viewingAgentTaskId===K;return{...f,tasks:{...f.tasks,[K]:{...O6(P),evictAfter:0}},..._&&{viewingAgentTaskId:void 0,viewSelectionMode:"none"}}})}var ZK=30000;var d6=fq(()=>{C6();AK()});class I6{exitPlanCalls=[];results=new Map;rejectedIds=new Set;terminated=null;rescanAfterRejection=!1;everSeenPending=!1;get rejectCount(){return this.rejectedIds.size}get hasPendingPlan(){let K=this.exitPlanCalls.findLast((q)=>!this.rejectedIds.has(q));return K!==void 0&&!this.results.has(K)}ingest(K){for(let P of K)if(P.type==="assistant")for(let _ of P.message.content){if(_.type!=="tool_use")continue;let w=_;if(w.name===Iq)this.exitPlanCalls.push(w.id)}else if(P.type==="user"){let _=P.message.content;if(!Array.isArray(_))continue;for(let w of _)if(w.type==="tool_result")this.results.set(w.tool_use_id,w)}else if(P.type==="result"&&P.subtype!=="success")this.terminated={subtype:P.subtype};let q=K.length>0||this.rescanAfterRejection;this.rescanAfterRejection=!1;let f=null;if(q){for(let P=this.exitPlanCalls.length-1;P>=0;P--){let _=this.exitPlanCalls[P];if(this.rejectedIds.has(_))continue;let w=this.results.get(_);if(!w)f={kind:"pending"};else if(w.is_error===!0){let O=bK(w.content);f=O!==null?{kind:"teleport",plan:O}:{kind:"rejected",id:_}}else f={kind:"approved",plan:NK(w.content)};break}if(f?.kind==="approved"||f?.kind==="teleport")return f}if(f?.kind==="rejected")this.rejectedIds.add(f.id),this.rescanAfterRejection=!0;if(this.terminated)return{kind:"terminated",subtype:this.terminated.subtype};if(f?.kind==="rejected")return f;if(f?.kind==="pending")return this.everSeenPending=!0,f;return{kind:"unchanged"}}}async function n6(K,q,f,P){let _=Date.now()+q,w=new I6,O=null,z=0,Y="running";while(Date.now()<_){if(P?.())throw new hq("poll stopped by caller","stopped",w.rejectCount);let v,h;try{let X=await V6(K,O);v=X.newEvents,O=X.lastEventId,h=X.sessionStatus,z=0}catch(X){if(!o6(X)||++z>=yK)throw new hq(X instanceof Error?X.message:String(X),"network_or_unknown",w.rejectCount,{cause:X});await Y6(L6);continue}let j;try{j=w.ingest(v)}catch(X){throw new hq(X instanceof Error?X.message:String(X),"extract_marker_missing",w.rejectCount)}if(j.kind==="approved")return{plan:j.plan,rejectCount:w.rejectCount,executionTarget:"remote"};if(j.kind==="teleport")return{plan:j.plan,rejectCount:w.rejectCount,executionTarget:"local"};if(j.kind==="terminated")throw new hq(`remote session ended (${j.subtype}) before plan approval`,"terminated",w.rejectCount);let J=(h==="idle"||h==="requires_action")&&v.length===0,Z=w.hasPendingPlan?"plan_ready":J?"needs_input":"running";if(Z!==Y)Rq(`[ultraplan] phase ${Y} \u2192 ${Z}`),Y=Z,f?.(Z);await Y6(L6)}throw new hq(w.everSeenPending?`no approval after ${q/1000}s`:`ExitPlanMode never reached after ${q/1000}s (the remote container failed to start, or session ID mismatch?)`,w.everSeenPending?"timeout_pending":"timeout_no_plan",w.rejectCount)}function E6(K){return typeof K==="string"?K:Array.isArray(K)?K.map((q)=>("text"in q)?q.text:"").join(""):""}function bK(K){let q=E6(K),f=`${kK}
|
|
3
3
|
`,P=q.indexOf(f);if(P===-1)return null;return q.slice(P+f.length).trimEnd()}function NK(K){let q=E6(K),f=[`## Approved Plan (edited by user):
|
|
4
4
|
`,`## Approved Plan:
|
|
5
5
|
`];for(let P of f){let _=q.indexOf(P);if(_!==-1)return q.slice(_+P.length).trimEnd()}throw Error(`ExitPlanMode approved but tool_result has no "## Approved Plan:" marker \u2014 remote may have hit the empty-plan or isAgent branch. Content preview: ${q.slice(0,200)}`)}var L6=3000,yK=5,hq,kK="__ULTRAPLAN_TELEPORT_LOCAL__";var i6=fq(()=>{g6();S6();GK();pK();v6();hq=class hq extends Error{reason;rejectCount;constructor(K,q,f,P){super(K,P);this.reason=q;this.rejectCount=f;this.name="UltraplanPollError"}}});var x6=uK((vP,rK)=>{rK.exports=`You are a planning assistant.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ga as oY}from"./cli-mq300hkq.js";import{Na as aY}from"./cli-
|
|
2
|
+
import{Ga as oY}from"./cli-mq300hkq.js";import{Na as aY}from"./cli-asc9xmsr.js";import{tg as q0,ug as b9}from"./cli-bfm3f0yw.js";import{$k as dY,AF as NY,DE as LY,DF as GW,Dk as RZ,Ek as uZ,Ep as JY,Fk as LZ,Fp as XW,Gk as pZ,Hl as JZ,JE as P0,JJ as T0,Kl as KZ,LE as U0,Ll as _Y,OG as D0,Ou as KY,PE as j0,Pt as vY,Pu as JW,QJ as rY,Qt as VW,Rv as GY,SA as mY,TA as X9,TD as J0,Uv as HY,VE as QZ,Vv as VZ,WD as q9,XA as x,XG as $0,ZA as E9,ZG as b0,Zv as KW,al as Q9,bD as k0,bH as C9,bK as nY,dD as S0,eE as FZ,em as v0,ft as qY,gm as D9,gt as jZ,hD as f0,hF as lY,ht as OY,iE as m,iJ as iY,it as FY,jF as J9,jJ as K9,jt as yY,kt as PY,lC as O0,lt as DZ,mC as T9,mt as $Z,nt as UY,oD as h9,oE as ZZ,ot as jY,pt as DY,qt as $Y,rt as bY,sE as yZ,st as EY,tt as TY,up as V0,ut as MY,vt as CY,wC as F0,wt as FW,xC as y0,xJ as E0,xp as $9,yC as M9}from"./cli-b3k8arn1.js";import{aO as QY,bO as WW}from"./cli-awe5yg6m.js";import{$O as QW,EO as ZY,FO as ZW,SO as YY,TO as WY,UO as YW,_O as XY}from"./cli-8jym9hp6.js";import{DQ as M,FQ as U,fR as e0}from"./cli-a2d962bq.js";import{YS as N0,ZS as B0,_S as P9,iT as A0,vT as U9}from"./cli-8z8d5bgb.js";import{BY as Q0,D0 as X0,F1 as V9,FV as Z0,FW as W0,FY as v9,GV as Y0,IT as C0,JV as z9,NW as _9,cU as k9,kV as R0,rV as f9}from"./cli-192xnkcx.js";import{d4 as vZ,f4 as t0}from"./cli-r43jhzwm.js";import{$4 as w,a5 as zY}from"./cli-t5ddsvmv.js";import{f6 as dZ,n6 as mZ,r6 as a0}from"./cli-bdgrtpsy.js";import{C7 as S9,Q6 as gY,S6 as W9,e7 as I0}from"./cli-yb5m6jwq.js";import{N7 as eY,O7 as w9}from"./cli-fnt125we.js";import{G8 as l,L8 as eZ,Q7 as _Z,T7 as lZ,U7 as iZ,V7 as rZ,W7 as nZ,Z7 as aZ,_7 as oZ,k8 as sZ,q8 as o0,v8 as tZ,y8 as s0}from"./cli-8kpqq0ea.js";import{$8 as OZ,_8 as g}from"./cli-e5yek4vx.js";import{A_ as PZ,R9 as xY,Z9 as M0,d_ as uY,f_ as HZ,g_ as pY,j_ as EZ,x_ as d}from"./cli-awb77t95.js";import{C_ as cY,G_ as Y9}from"./cli-rc3w6tqd.js";import{cda as L0,dda as MZ,g$ as sY,m$ as kZ,vaa as tY}from"./cli-tafg3e9w.js";import{gda as r0,hda as n0,ida as z0}from"./cli-qwx84m9c.js";var _W={};r0(_W,{selectableUserMessagesFilter:()=>wY,messagesAfterAreOnlySynthetic:()=>zW,MessageSelector:()=>LW});import{c as XZ}from"react/compiler-runtime";import{randomUUID as HW}from"crypto";import AZ from"figures";import{useCallback as o,useEffect as wZ,useMemo as cZ,useState as c}from"react";import*as s from"path";import{jsxDEV as N,Fragment as h}from"react/jsx-dev-runtime";function BY(W){return W.type==="text"}function qZ(W){return W==="summarize"||W==="summarize_up_to"}function LW({messages:W,onPreRestore:Y,onRestoreMessage:Q,onRestoreCode:X,onSummarize:J,onClose:H,preselectedMessage:G}){let L=NY((v)=>v.fileHistory),[B,z]=c(void 0),K=GY(),A=cZ(HW,[]),q=cZ(()=>[...W.filter(wY),{...m({content:""}),uuid:A}],[W,A]),[O,V]=c(q.length-1),j=Math.max(0,Math.min(O-Math.floor(zZ/2),q.length-zZ)),k=q.length>1,[_,b]=c(G),[P,S]=c(void 0);wZ(()=>{if(!G||!K)return;let v=!1;return VZ(L,G.uuid).then(($)=>{if(!v)S($)}),()=>{v=!0}},[G,K,L]);let[F,D]=c(!1),[u,i]=c(null),[t,e]=c("both"),[NZ,n]=c(""),[y,C]=c("");function E(v){let $=v?[{value:"both",label:"Restore code and conversation"},{value:"conversation",label:"Restore conversation"},{value:"code",label:"Restore code"}]:[{value:"conversation",label:"Restore conversation"}],I={type:"input",placeholder:"add context (optional)",initialValue:"",allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:": "};return $.push({value:"summarize",label:"Summarize from here",...I,onChange:n}),$.push({value:"nevermind",label:"Never mind"}),$}wZ(()=>{g("tengu_message_selector_opened",{})},[]);async function f(v){Y(),D(!0);try{await Q(v),D(!1),H()}catch($){l($),D(!1),z(`Failed to restore the conversation:
|
|
3
3
|
${$}`)}}async function r(v){let $=W.indexOf(v),I=W.length-1-$;if(g("tengu_message_selector_selected",{index_from_end:I,message_type:v.type,is_current_prompt:!1}),!W.includes(v)){H();return}if(!K){await f(v);return}let R=await VZ(L,v.uuid);b(v),S(R)}async function x0(v){if(g("tengu_message_selector_restore_option_selected",{option:v}),!_){z("Message not found.");return}if(v==="nevermind"){if(G)H();else b(void 0);return}if(qZ(v)){Y(),D(!0),i(v),z(void 0);try{let R=v==="summarize_up_to"?"up_to":"from",a=(R==="up_to"?y:NZ).trim()||void 0;await J(_,a,R),D(!1),i(null),b(void 0),H()}catch(R){l(R),D(!1),i(null),b(void 0),z(`Failed to summarize:
|
|
4
4
|
${R}`)}return}Y(),D(!0),z(void 0);let $=null,I=null;if(v==="code"||v==="both")try{await X(_)}catch(R){$=R,l($)}if(v==="conversation"||v==="both")try{await Q(_)}catch(R){I=R,l(I)}if(D(!1),b(void 0),I&&$)z(`Failed to restore the conversation and code:
|
|
5
5
|
${I}
|
|
@@ -12,5 +12,5 @@ ${$}`);else H()}let SZ=QY(),u0=o(()=>{if(_&&!G){b(void 0);return}g("tengu_messag
|
|
|
12
12
|
`);if(Q===-1)break;let X=W.slice(0,Q);W=W.slice(Q+1);let J=await this.processLine(X);if(J)gY("info","cli_stdin_message_parsed",{type:J.type}),yield J}}.bind(this);yield*Y();for await(let Q of this.input)W+=Q,yield*Y();if(W){let Q=await this.processLine(W);if(Q)yield Q}this.inputClosed=!0;for(let Q of this.pendingRequests.values())Q.reject(Error("Tool permission stream closed before response received"))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map((W)=>W.request).filter((W)=>W.request.subtype==="can_use_tool")}setUnexpectedResponseCallback(W){this.unexpectedResponseCallback=W}injectControlResponse(W){let Y=W.response?.request_id;if(!Y)return;let Q=this.pendingRequests.get(Y);if(!Q)return;if(this.trackResolvedToolUseId(Q.request),this.pendingRequests.delete(Y),this.write({type:"control_cancel_request",request_id:Y}),W.response.subtype==="error")Q.reject(Error(W.response.error));else{let X=W.response.response;if(Q.schema)try{Q.resolve(Q.schema.parse(X))}catch(J){Q.reject(J)}else Q.resolve({})}}setOnControlRequestSent(W){this.onControlRequestSent=W}setOnControlRequestResolved(W){this.onControlRequestResolved=W}async processLine(W){if(!W)return;try{let Y=oY(pY(W));if(Y.type==="keep_alive")return;if(Y.type==="update_environment_variables"){let Q=Object.keys(Y.variables);for(let[X,J]of Object.entries(Y.variables))process.env[X]=J;d(`[structuredIO] applied update_environment_variables: ${Q.join(", ")}`);return}if(Y.type==="control_response"){let Q="uuid"in Y&&typeof Y.uuid==="string"?Y.uuid:void 0;if(Q)dY(Q,"completed");let X=this.pendingRequests.get(Y.response.request_id);if(!X){let G=(Y.response.subtype==="success"?Y.response.response:void 0)?.toolUseID;if(typeof G==="string"&&this.resolvedToolUseIds.has(G)){d(`Ignoring duplicate control_response for already-resolved toolUseID=${G} request_id=${Y.response.request_id}`);return}if(this.unexpectedResponseCallback)await this.unexpectedResponseCallback(Y);return}if(this.trackResolvedToolUseId(X.request),this.pendingRequests.delete(Y.response.request_id),X.request.request.subtype==="can_use_tool"&&this.onControlRequestResolved)this.onControlRequestResolved(Y.response.request_id);if(Y.response.subtype==="error"){X.reject(Error(Y.response.error));return}let J=Y.response.response;if(X.schema)try{X.resolve(X.schema.parse(J))}catch(H){X.reject(H)}else X.resolve({});if(this.replayUserMessages)return Y;return}if(Y.type!=="user"&&Y.type!=="control_request"&&Y.type!=="assistant"&&Y.type!=="system"){d(`Ignoring unknown message type: ${Y.type}`,{level:"warn"});return}if(Y.type==="control_request"){if(!Y.request)hY("Error: Missing request on control_request");return Y}if(Y.type==="assistant"||Y.type==="system")return Y;if(Y.message.role!=="user")hY(`Error: Expected message role 'user', got '${Y.message.role}'`);return Y}catch(Y){console.error(`Error parsing streaming input line: ${W}: ${Y}`),process.exit(1)}}async write(W){cY(SY(W)+`
|
|
13
13
|
`)}async sendRequest(W,Y,Q,X=TZ()){let J={type:"control_request",request_id:X,request:W};if(this.inputClosed)throw Error("Stream closed");if(Q?.aborted)throw Error("Request aborted");if(this.outbound.enqueue(J),W.subtype==="can_use_tool"&&this.onControlRequestSent)this.onControlRequestSent(J);let H=()=>{this.outbound.enqueue({type:"control_cancel_request",request_id:X});let G=this.pendingRequests.get(X);if(G)this.trackResolvedToolUseId(G.request),G.reject(new xY)};if(Q)Q.addEventListener("abort",H,{once:!0});try{return await new Promise((G,L)=>{this.pendingRequests.set(X,{request:{type:"control_request",request_id:X,request:W},resolve:(B)=>{G(B)},reject:L,schema:Y})})}finally{if(Q)Q.removeEventListener("abort",H);this.pendingRequests.delete(X)}}createCanUseTool(W){return async(Y,Q,X,J,H,G)=>{let L=G??await lY(Y,Q,X,J,H);if(L.behavior==="allow"||L.behavior==="deny")return L;let B=new AbortController,z=X.abortController.signal,K=()=>B.abort();z.addEventListener("abort",K,{once:!0});try{let A=A9(Y.name,H,Q,X,L.suggestions).then((j)=>({source:"hook",decision:j})),q=TZ();W?.(L9(Y,Q,H,q));let O=this.sendRequest({subtype:"can_use_tool",tool_name:Y.name,input:Q,permission_suggestions:L.suggestions,blocked_path:L.blockedPath,decision_reason:H9(L.decisionReason),tool_use_id:H,agent_id:X.agentId},UZ(),B.signal,q).then((j)=>({source:"sdk",result:j})),V=await Promise.race([A,O]);if(V.source==="hook"){if(V.decision)return O.catch(()=>{}),B.abort(),V.decision;let j=await O;return GZ(j.result,Y,Q,X)}return GZ(V.result,Y,Q,X)}catch(A){return GZ({behavior:"deny",message:`Tool permission request failed: ${A}`,toolUseID:H},Y,Q,X)}finally{if(this.getPendingPermissionRequests().length===0)aY("running");z.removeEventListener("abort",K)}}}createHookCallback(W,Y){return{type:"callback",timeout:Y,callback:async(Q,X,J)=>{try{return await this.sendRequest({subtype:"hook_callback",callback_id:W,input:Q,tool_use_id:X||void 0},iY(),J)}catch(H){return console.error(`Error in hook callback ${W}:`,H),{}}}}}async handleElicitation(W,Y,Q,X,J,H,G){try{return await this.sendRequest({subtype:"elicitation",mcp_server_name:W,message:Y,mode:J,url:H,elicitation_id:G,requested_schema:Q},IY(),X)}catch{return{action:"cancel"}}}createSandboxAskCallback(){return async(W)=>{try{return(await this.sendRequest({subtype:"can_use_tool",tool_name:G9,input:{host:W.host},tool_use_id:TZ(),description:`Allow network connection to ${W.host}?`},UZ())).behavior==="allow"}catch{return!1}}}async sendMcpMessage(W,Y){return(await this.sendRequest({subtype:"mcp_message",server_name:W,message:Y},fY.object({mcp_response:fY.any()}))).mcp_response}}function hY(W){console.error(W),process.exit(1)}async function A9(W,Y,Q,X,J){let G=X.getAppState().toolPermissionContext.mode,L=rY(W,Y,Q,X,G,J,X.abortController.signal);for await(let B of L)if(B.permissionRequestResult&&(B.permissionRequestResult.behavior==="allow"||B.permissionRequestResult.behavior==="deny")){let z=B.permissionRequestResult;if(z.behavior==="allow"){let K=z.updatedInput||Q,A=z.updatedPermissions??[];if(A.length>0){KZ(A);let q=X.getAppState(),O=JZ(q.toolPermissionContext,A);X.setAppState((V)=>{if(V.toolPermissionContext===O)return V;return{...V,toolPermissionContext:O}})}return{behavior:"allow",updatedInput:K,userModified:!1,decisionReason:{type:"hook",hookName:"PermissionRequest"}}}else return{behavior:"deny",message:z.message||"Permission denied by PermissionRequest hook",decisionReason:{type:"hook",hookName:"PermissionRequest"}}}return}MZ();q9();z9();V9();w9();v9();_9();import{randomUUID as O9}from"crypto";function F9(W){return W===Z0?Y0:W}function B6(W){let Q=W0()?.outputStyle??J0,X={type:"system",subtype:"init",cwd:eY(),session_id:sY(),tools:W.tools.map((J)=>F9(J.name)),mcp_servers:W.mcpClients.map((J)=>({name:J.name,status:J.type})),model:W.model,permissionMode:W.permissionMode,slash_commands:W.commands.filter((J)=>J.userInvocable!==!1).map((J)=>J.name),apiKeySource:X0().source,betas:tY(),claude_code_version:MACRO.VERSION,output_style:Q,agents:W.agents.map((J)=>J.agentType),skills:W.skills.filter((J)=>J.userInvocable!==!1).map((J)=>J.name),plugins:W.plugins.map((J)=>({name:J.name,path:J.path,source:J.source})),uuid:O9()};return X.fast_mode_state=Q0(W.model,W.fastMode),X}var K0={"`":"`",'"':'"',"<":">","{":"}","[":"]","(":")","'":"'"};function y9(W,Y){if(!new RegExp(Y,"i").test(W))return[];if(W.startsWith("/"))return[];let X=[],J=null,H=0,G=(K)=>!!K&&/[\p{L}\p{N}_]/u.test(K);for(let K=0;K<W.length;K++){let A=W[K];if(J){if(J==="["&&A==="["){H=K;continue}if(A!==K0[J])continue;if(J==="'"&&G(W[K+1]))continue;X.push({start:H,end:K+1}),J=null}else if(A==="<"&&K+1<W.length&&/[a-zA-Z/]/.test(W[K+1])||A==="'"&&!G(W[K-1])||A!=="<"&&A!=="'"&&A in K0)J=A,H=K}let L=[],B=new RegExp(`\\b${Y}\\b`,"gi"),z=W.matchAll(B);for(let K of z){if(K.index===void 0)continue;let A=K.index,q=A+K[0].length;if(X.some((j)=>A>=j.start&&A<j.end))continue;let O=W[A-1],V=W[q];if(O==="/"||O==="\\"||O==="-")continue;if(V==="/"||V==="\\"||V==="-"||V==="?")continue;if(V==="."&&G(W[q+1]))continue;L.push({word:K[0],start:A,end:q})}return L}function w6(W){return y9(W,"ultrareview")}OZ();QZ();C9();T9();M9();D9();nY();pZ();$9();QZ();E9();b9();import{randomUUID as I9}from"crypto";MZ();OZ();QZ();P9();U9();import{randomUUID as j9}from"crypto";function G0(W){let Y=W.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(Y)}function H0(W){let Y=W.toLowerCase().trim();if(Y==="continue")return!0;return/\b(keep going|go on)\b/.test(Y)}function w0(W,Y,Q,X,J,H,G){let L=j9();L0(L);let B=typeof W==="string"?W:W.find((O)=>O.type==="text")?.text||"";A0(B);let z=typeof W==="string"?W:W.findLast((O)=>O.type==="text")?.text||"";if(z)B0("user_prompt",{prompt_length:String(z.length),prompt:N0(z),"prompt.id":L});let K=G0(B),A=H0(B);if(g("tengu_input_prompt",{is_negative:K,is_keep_going:A}),Y.length>0){let O=typeof W==="string"?W.trim()?[{type:"text",text:W}]:[]:W;return{messages:[m({content:[...O,...Y],uuid:J,imagePasteIds:Q.length>0?Q:void 0,permissionMode:H,isMeta:G||void 0}),...X],shouldQuery:!0}}return{messages:[m({content:W,uuid:J,permissionMode:H,isMeta:G||void 0}),...X],shouldQuery:!0}}async function g6({input:W,preExpansionInput:Y,mode:Q,setToolJSX:X,context:J,pastedContents:H,ideSelection:G,messages:L,setUserInputOnProcessing:B,uuid:z,isAlreadyProcessing:K,querySource:A,canUseTool:q,skipSlashCommands:O,bridgeOrigin:V,isMeta:j,skipAttachments:k}){let _=typeof W==="string"?W:null;if(Q==="prompt"&&_!==null&&!j)B?.(_);x("query_process_user_input_base_start");let b=J.getAppState(),P=await R9(W,Q,X,J,H,G,L,z,K,A,q,b.toolPermissionContext.mode,O,V,j,k,Y);if(x("query_process_user_input_base_end"),!P.shouldQuery)return P;x("query_hooks_start");let S=P0(W)||"";for await(let F of T0(S,b.toolPermissionContext.mode,J,J.requestPrompt)){if(F.message?.type==="progress")continue;if(F.blockingError){let D=E0(F.blockingError);return{messages:[U0(`${D}
|
|
14
14
|
|
|
15
|
-
Original prompt: ${W}`,"warning")],shouldQuery:!1,allowedTools:P.allowedTools}}if(F.preventContinuation){let D=F.stopReason?`Operation stopped by hook: ${F.stopReason}`:"Operation stopped by hook";return P.messages.push(m({content:D})),P.shouldQuery=!1,P}if(F.additionalContexts&&F.additionalContexts.length>0)P.messages.push(y0({type:"hook_additional_context",content:F.additionalContexts.map(_0),hookName:"UserPromptSubmit",toolUseID:`hook-${I9()}`,hookEvent:"UserPromptSubmit"}));if(F.message)switch(F.message.attachment.type){case"hook_success":if(!F.message.attachment.content)break;P.messages.push({...F.message,attachment:{...F.message.attachment,content:_0(F.message.attachment.content)}});break;default:P.messages.push(F.message);break}}return x("query_hooks_end"),P}var CZ=1e4;function _0(W){if(W.length>CZ)return`${W.substring(0,CZ)}\u2026 [output truncated - exceeded ${CZ} characters]`;return W}async function R9(W,Y,Q,X,J,H,G,L,B,z,K,A,q,O,V,j,k){let _=null,b=[],P=[],S=W;if(typeof W==="string")_=W;else if(W.length>0){x("query_image_processing_start");let y=[];for(let E of W)if(E.type==="image"){let f=await RZ(E);if(f.dimensions){let r=LZ(f.dimensions);if(r)P.push(r)}y.push(f.block)}else y.push(E);S=y,x("query_image_processing_end");let C=y[y.length-1];if(C?.type==="text")_=C.text,b=y.slice(0,-1);else b=y}if(_===null&&Y!=="prompt")throw Error(`Mode: ${Y} requires a string input.`);let F=J?Object.values(J).filter(O0):[],D=F.map((y)=>y.id),u=J?await V0(J):new Map;x("query_pasted_image_processing_start");let i=await Promise.all(F.map(async(y)=>{let C={type:"image",source:{type:"base64",media_type:y.mediaType||"image/png",data:y.content}};return g("tengu_pasted_image_resize_attempt",{original_size_bytes:y.content.length}),{resized:await RZ(C),originalDimensions:y.dimensions,sourcePath:y.sourcePath??u.get(y.id)}})),t=[];for(let{resized:y,originalDimensions:C,sourcePath:E}of i){if(y.dimensions){let f=LZ(y.dimensions,E);if(f)P.push(f)}else if(C){let f=LZ(C,E);if(f)P.push(f)}else if(E)P.push(`[Image source: ${E}]`);t.push(y.block)}x("query_pasted_image_processing_end");let e=q;if(O&&_!==null&&_.startsWith("/")){let y=q0(_),C=y?b0(y.commandName,X.options.commands):void 0;if(C)if($0(C))e=!1;else{let E=`/${D0(C)} isn't available over Remote Control.`;return{messages:[m({content:_,uuid:L}),j0(`<local-command-stdout>${E}</local-command-stdout>`)],shouldQuery:!1,resultText:E}}}let NZ=!j&&_!==null&&(Y!=="prompt"||e||!_.startsWith("/"));x("query_attachment_loading_start");let n=NZ?await v0(F0(_,X,H??null,[],G,z)):[];if(x("query_attachment_loading_end"),_!==null&&Y==="bash"){let{processBashCommand:y}=await import("./processBashCommand-
|
|
15
|
+
Original prompt: ${W}`,"warning")],shouldQuery:!1,allowedTools:P.allowedTools}}if(F.preventContinuation){let D=F.stopReason?`Operation stopped by hook: ${F.stopReason}`:"Operation stopped by hook";return P.messages.push(m({content:D})),P.shouldQuery=!1,P}if(F.additionalContexts&&F.additionalContexts.length>0)P.messages.push(y0({type:"hook_additional_context",content:F.additionalContexts.map(_0),hookName:"UserPromptSubmit",toolUseID:`hook-${I9()}`,hookEvent:"UserPromptSubmit"}));if(F.message)switch(F.message.attachment.type){case"hook_success":if(!F.message.attachment.content)break;P.messages.push({...F.message,attachment:{...F.message.attachment,content:_0(F.message.attachment.content)}});break;default:P.messages.push(F.message);break}}return x("query_hooks_end"),P}var CZ=1e4;function _0(W){if(W.length>CZ)return`${W.substring(0,CZ)}\u2026 [output truncated - exceeded ${CZ} characters]`;return W}async function R9(W,Y,Q,X,J,H,G,L,B,z,K,A,q,O,V,j,k){let _=null,b=[],P=[],S=W;if(typeof W==="string")_=W;else if(W.length>0){x("query_image_processing_start");let y=[];for(let E of W)if(E.type==="image"){let f=await RZ(E);if(f.dimensions){let r=LZ(f.dimensions);if(r)P.push(r)}y.push(f.block)}else y.push(E);S=y,x("query_image_processing_end");let C=y[y.length-1];if(C?.type==="text")_=C.text,b=y.slice(0,-1);else b=y}if(_===null&&Y!=="prompt")throw Error(`Mode: ${Y} requires a string input.`);let F=J?Object.values(J).filter(O0):[],D=F.map((y)=>y.id),u=J?await V0(J):new Map;x("query_pasted_image_processing_start");let i=await Promise.all(F.map(async(y)=>{let C={type:"image",source:{type:"base64",media_type:y.mediaType||"image/png",data:y.content}};return g("tengu_pasted_image_resize_attempt",{original_size_bytes:y.content.length}),{resized:await RZ(C),originalDimensions:y.dimensions,sourcePath:y.sourcePath??u.get(y.id)}})),t=[];for(let{resized:y,originalDimensions:C,sourcePath:E}of i){if(y.dimensions){let f=LZ(y.dimensions,E);if(f)P.push(f)}else if(C){let f=LZ(C,E);if(f)P.push(f)}else if(E)P.push(`[Image source: ${E}]`);t.push(y.block)}x("query_pasted_image_processing_end");let e=q;if(O&&_!==null&&_.startsWith("/")){let y=q0(_),C=y?b0(y.commandName,X.options.commands):void 0;if(C)if($0(C))e=!1;else{let E=`/${D0(C)} isn't available over Remote Control.`;return{messages:[m({content:_,uuid:L}),j0(`<local-command-stdout>${E}</local-command-stdout>`)],shouldQuery:!1,resultText:E}}}let NZ=!j&&_!==null&&(Y!=="prompt"||e||!_.startsWith("/"));x("query_attachment_loading_start");let n=NZ?await v0(F0(_,X,H??null,[],G,z)):[];if(x("query_attachment_loading_end"),_!==null&&Y==="bash"){let{processBashCommand:y}=await import("./processBashCommand-zkztsgn4.js");return IZ(await y(_,b,n,X,Q),P)}if(_!==null&&!e&&_.startsWith("/")){let{processSlashCommand:y}=await import("./processSlashCommand-mfh1h592.js"),C=await y(_,b,t,n,X,Q,L,B,K);return IZ(C,P)}if(_!==null&&Y==="prompt"){let y=_.trim(),C=n.find((E)=>E.attachment.type==="agent_mention");if(C){let E=`@agent-${C.attachment.agentType}`,f=y===E,r=y.startsWith(E)&&!f;g("tengu_subagent_at_mention",{is_subagent_only:f,is_prefix:r})}}return IZ(w0(S,t,D,n,L,A,V),P)}function IZ(W,Y){if(Y.length>0)W.messages.push(m({content:Y.map((Q)=>({type:"text",text:Q})),isMeta:!0}));return W}MZ();PZ();uY();k9();S9();eZ();h9();f9();import x9 from"lodash-es/isEqual.js";import{isAbsolute as u9,resolve as p9}from"path";function c9(W,Y,Q){let X=[],J=[],H=[];for(let[G,L]of Object.entries(W)){let B=Y[G],z=h0(L.source,Q?.projectRoot);if(!B)X.push(G);else if(L.sourceIsFallback)H.push(G);else if(!x9(z,B.source))J.push({name:G,declaredSource:z,materializedSource:B.source});else H.push(G)}return{missing:X,sourceChanged:J,upToDate:H}}async function ZX(W){let Y=k0();if(Object.keys(Y).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let Q;try{Q=await S0()}catch(K){l(K),Q={}}let X=c9(Y,Q,{projectRoot:kZ()}),J=[...X.missing.map((K)=>({name:K,source:h0(Y[K].source),action:"install"})),...X.sourceChanged.map(({name:K,declaredSource:A})=>({name:K,source:A,action:"update"}))],H=[],G=[];for(let K of J){if(W?.skip?.(K.name,K.source)){H.push(K.name);continue}if(K.action==="update"&&R0(K.source)&&!await C0(K.source.path)){d(`[reconcile] '${K.name}' declared path does not exist; keeping materialized entry`),H.push(K.name);continue}G.push(K)}if(G.length===0)return{installed:[],updated:[],failed:[],upToDate:X.upToDate,skipped:H};d(`[reconcile] ${G.length} marketplace(s): ${G.map((K)=>`${K.name}(${K.action})`).join(", ")}`);let L=[],B=[],z=[];for(let K=0;K<G.length;K++){let{name:A,source:q,action:O}=G[K];W?.onProgress?.({type:"installing",name:A,action:O,index:K+1,total:G.length});try{let V=await f0(q);if(O==="install")L.push(A);else B.push(A);W?.onProgress?.({type:"installed",name:A,alreadyMaterialized:V.alreadyMaterialized})}catch(V){let j=M0(V);z.push({name:A,error:j}),W?.onProgress?.({type:"failed",name:A,error:j}),l(V)}}return{installed:L,updated:B,failed:z,upToDate:X.upToDate,skipped:H}}function h0(W,Y){if((W.source==="directory"||W.source==="file")&&!u9(W.path)){let Q=Y??kZ(),X=I0(Q);return{...W,path:p9(X??Q,W.path)}}return W}
|
|
16
16
|
export{d9 as aa,F9 as ba,B6 as ca,LW as da,wY as ea,zW as fa,_W as ga,vW as ha,w6 as ia,g6 as ja,UZ as ka,GZ as la,SY as ma,B9 as na,c9 as oa,ZX as pa};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{EO as g,FO as Q}from"./cli-
|
|
2
|
+
import{EO as g,FO as Q}from"./cli-8jym9hp6.js";import{DQ as d,FQ as y,fR as B}from"./cli-a2d962bq.js";import{$5 as H,a6 as U,b6 as L,c6 as S,r6 as F}from"./cli-bdgrtpsy.js";import{hda as s}from"./cli-qwx84m9c.js";import{c as V}from"react/compiler-runtime";import{memo as l}from"react";import{jsxDEV as A}from"react/jsx-dev-runtime";function _q(P){if(P.startsWith("file-"))return"+";if(P.startsWith("mcp-resource-"))return"\u25C7";if(P.startsWith("agent-"))return"*";return"+"}function fq(P){return P.startsWith("file-")||P.startsWith("mcp-resource-")||P.startsWith("agent-")}function rq(P){let _=V(22),{suggestions:q,selectedSuggestion:f,maxColumnWidth:D,overlay:$}=P,{rows:n}=g(),W=$?qq:Math.min(6,Math.max(1,n-3));if(q.length===0)return null;let J;if(_[0]!==D||_[1]!==q)J=D??Math.max(...q.map(Pq))+5,_[0]=D,_[1]=q,_[2]=J;else J=_[2];let w=J,v=Math.max(0,Math.min(f-Math.floor(W/2),q.length-W)),p=Math.min(v+W,q.length),K,O,j,M;if(_[3]!==p||_[4]!==w||_[5]!==$||_[6]!==f||_[7]!==v||_[8]!==q){let T=q.slice(v,p);K=d,O="column",j=$?void 0:"flex-end";let k;if(_[13]!==w||_[14]!==f||_[15]!==q)k=(z)=>A(Kq,{item:z,maxColumnWidth:w,isSelected:z.id===q[f]?.id},z.id,!1,void 0,this),_[13]=w,_[14]=f,_[15]=q,_[16]=k;else k=_[16];M=T.map(k),_[3]=p,_[4]=w,_[5]=$,_[6]=f,_[7]=v,_[8]=q,_[9]=K,_[10]=O,_[11]=j,_[12]=M}else K=_[9],O=_[10],j=_[11],M=_[12];let o;if(_[17]!==K||_[18]!==O||_[19]!==j||_[20]!==M)o=A(K,{flexDirection:O,justifyContent:j,children:M},void 0,!1,void 0,this),_[17]=K,_[18]=O,_[19]=j,_[20]=M,_[21]=o;else o=_[21];return o}function Pq(P){return H(P.displayText)}var qq=5,Kq,oq;var jq=s(()=>{Q();U();B();F();Kq=l(function(_){let q=V(36),{item:f,maxColumnWidth:D,isSelected:$}=_,n=g().columns;if(fq(f.id)){let Y;if(q[0]!==f.id)Y=_q(f.id),q[0]=f.id,q[1]=Y;else Y=q[1];let h=Y,G=$?"suggestion":void 0,t=!$,E=f.id.startsWith("file-"),I=f.id.startsWith("mcp-resource-"),R=f.description?3:0,e;if(E){let r;if(q[2]!==f.description)r=f.description?Math.min(20,H(f.description)):0,q[2]=f.description,q[3]=r;else r=q[3];let m=r,c=n-2-4-R-m,N;if(q[4]!==f.displayText||q[5]!==c)N=L(f.displayText,c),q[4]=f.displayText,q[5]=c,q[6]=N;else N=q[6];e=N}else if(I){let r;if(q[7]!==f.displayText)r=S(f.displayText,30),q[7]=f.displayText,q[8]=r;else r=q[8];e=r}else e=f.displayText;let x=n-2-H(e)-R-4,X;if(f.description){let r=Math.max(0,x),m;if(q[9]!==f.description||q[10]!==r)m=S(f.description.replace(/\s+/g," "),r),q[9]=f.description,q[10]=r,q[11]=m;else m=q[11];X=`${h} ${e} \u2013 ${m}`}else X=`${h} ${e}`;let b;if(q[12]!==t||q[13]!==X||q[14]!==G)b=A(y,{color:G,dimColor:t,wrap:"truncate",children:X},void 0,!1,void 0,this),q[12]=t,q[13]=X,q[14]=G,q[15]=b;else b=q[15];return b}let J=Math.floor(n*0.4),w=Math.min(D??H(f.displayText)+5,J),v=f.color||($?"suggestion":void 0),p=!$,K=f.displayText;if(H(K)>w-2){let Y=w-2,h;if(q[16]!==K||q[17]!==Y)h=S(K,Y),q[16]=K,q[17]=Y,q[18]=h;else h=q[18];K=h}let O=K+" ".repeat(Math.max(0,w-H(K))),j=f.tag?`[${f.tag}] `:"",M=H(j),o=Math.max(0,n-w-M-4),T;if(q[19]!==o||q[20]!==f.description)T=f.description?S(f.description.replace(/\s+/g," "),o):"",q[19]=o,q[20]=f.description,q[21]=T;else T=q[21];let k=T,z;if(q[22]!==O||q[23]!==p||q[24]!==v)z=A(y,{color:v,dimColor:p,children:O},void 0,!1,void 0,this),q[22]=O,q[23]=p,q[24]=v,q[25]=z;else z=q[25];let u;if(q[26]!==j)u=j?A(y,{dimColor:!0,children:j},void 0,!1,void 0,this):null,q[26]=j,q[27]=u;else u=q[27];let i=$?"suggestion":void 0,C=!$,a;if(q[28]!==i||q[29]!==C||q[30]!==k)a=A(y,{color:i,dimColor:C,children:k},void 0,!1,void 0,this),q[28]=i,q[29]=C,q[30]=k,q[31]=a;else a=q[31];let Z;if(q[32]!==z||q[33]!==u||q[34]!==a)Z=A(y,{wrap:"truncate",children:[z,u,a]},void 0,!0,void 0,this),q[32]=z,q[33]=u,q[34]=a,q[35]=Z;else Z=q[35];return Z});oq=l(rq)});
|
|
3
3
|
export{rq as Qf,oq as Rf,jq as Sf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{F1 as D,b1 as q}from"./cli-
|
|
2
|
+
import{F1 as D,b1 as q}from"./cli-192xnkcx.js";import{D9 as m,E9 as z}from"./cli-zxe1a0ey.js";import{hda as x}from"./cli-qwx84m9c.js";function E(){return process.env.USER_TYPE==="ant"&&process.env.CLAUDE_BRIDGE_OAUTH_TOKEN||void 0}function F(){return process.env.USER_TYPE==="ant"&&process.env.CLAUDE_BRIDGE_BASE_URL||void 0}function K(){return E()??q()?.accessToken}function M(){return F()??m().BASE_API_URL}var G=x(()=>{z();D()});
|
|
3
3
|
export{E as dc,F as ec,K as fc,M as gc,G as hc};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{J4 as D,O4 as H}from"./cli-
|
|
2
|
+
import{J4 as D,O4 as H}from"./cli-601zv0wv.js";import{N7 as U,O7 as f}from"./cli-fnt125we.js";import{G8 as Z,L8 as S}from"./cli-8kpqq0ea.js";import{n_ as V,r_ as A}from"./cli-awb77t95.js";import{hda as x}from"./cli-qwx84m9c.js";import{LRUCache as I}from"lru-cache";import{basename as E,dirname as m,join as j,sep as O}from"path";function k(q){return b.has(q.toLowerCase())}function R(q,B){if(!q)return{directory:B||U(),prefix:""};let G=D(q,B);if(q.endsWith("/")||q.endsWith(O))return{directory:G,prefix:""};let W=m(G),J=E(q);return{directory:W,prefix:J}}async function u(q){let B=M.get(q);if(B)return B;try{let J=(await V().readdir(q)).filter((Q)=>Q.isDirectory()&&!k(Q.name)).map((Q)=>({name:Q.name,path:j(q,Q.name),type:"directory"})).slice(0,100);return M.set(q,J),J}catch(G){return Z(G),[]}}async function o(q,B={}){let{basePath:G=U(),maxResults:W=10}=B,{directory:J,prefix:Q}=R(q,G),$=await u(J),z=Q.toLowerCase();return $.filter((v)=>v.name.toLowerCase().startsWith(z)).slice(0,W).map((v)=>({id:v.path,displayText:v.name+"/",description:"directory",metadata:{type:"directory"}}))}function h(q){return q.startsWith("~/")||q.startsWith("/")||q.startsWith("./")||q.startsWith("../")||q==="~"||q==="."||q===".."}async function C(q,B=!1){let G=`${q}:${B}`,W=F.get(G);if(W)return W;try{let $=(await V().readdir(q)).filter((z)=>B||!z.name.startsWith(".")).map((z)=>({name:z.name,path:j(q,z.name),type:z.isDirectory()?"directory":"file"})).sort((z,Y)=>{if(z.type==="directory"&&Y.type!=="directory")return-1;if(z.type!=="directory"&&Y.type==="directory")return 1;return z.name.localeCompare(Y.name)}).slice(0,100);return F.set(G,$),$}catch(J){return Z(J),[]}}async function n(q,B={}){let{basePath:G=U(),maxResults:W=10,includeFiles:J=!0,includeHidden:Q=!1}=B,{directory:$,prefix:z}=R(q,G),Y=await C($,Q),v=z.toLowerCase(),T=Y.filter((X)=>{if(!J&&X.type==="file")return!1;return X.name.toLowerCase().startsWith(v)}).slice(0,W),_=q.includes("/")||q.includes(O),K="";if(_){let X=q.lastIndexOf("/"),N=q.lastIndexOf(O),g=Math.max(X,N);K=q.substring(0,g+1)}if(K.startsWith("./")||K.startsWith("."+O))K=K.slice(2);return T.map((X)=>{let N=K+X.name;return{id:N,displayText:X.type==="directory"?N+"/":N,metadata:{type:X.type}}})}var w=500,L=300000,b,M,F;var y=x(()=>{f();A();S();H();b=new Set([".git",".svn",".hg",".bzr",".jj",".sl"]),M=new I({max:w,ttl:L}),F=new I({max:w,ttl:L})});
|
|
3
3
|
export{o as Mf,h as Nf,n as Of,y as Pf};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{E1 as M,F1 as O,Q2 as R,U2 as W,a3 as U,qX as x,rX as L}from"./cli-
|
|
2
|
+
import{E1 as M,F1 as O,Q2 as R,U2 as W,a3 as U,qX as x,rX as L}from"./cli-192xnkcx.js";import{C8 as I,z8 as Q}from"./cli-8kpqq0ea.js";import{D9 as P,E9 as H}from"./cli-zxe1a0ey.js";import{A_ as F,Z9 as w,d_ as h,f_ as N,j_ as B,x_ as f}from"./cli-awb77t95.js";import{eda as $,hda as b}from"./cli-qwx84m9c.js";import V from"axios";import Y from"lodash-es/memoize.js";import{hostname as v}from"os";function X(){return R(G,!1)}function k(){if(!X())return;return y()}function g(){y.cache?.clear?.()}function u(){if(!X())return;let i=x();try{let q=i.read();if(q?.trustedDeviceToken)delete q.trustedDeviceToken,i.update(q)}catch{}y.cache?.clear?.()}async function n(){try{if(!await W(G)){f(`[trusted-device] Gate ${G} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){f("[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)");return}let{getClaudeAIOAuthTokens:i}=(O(),$(M)),q=i()?.accessToken;if(!q){f("[trusted-device] No OAuth token, skipping enrollment");return}let J=x();if(Q()){f("[trusted-device] Essential traffic only, skipping enrollment");return}let Z=P().BASE_API_URL,m;try{m=await V.post(`${Z}/api/auth/trusted_devices`,{display_name:`Claude Code on ${v()} \xB7 ${process.platform}`},{headers:{Authorization:`Bearer ${q}`,"Content-Type":"application/json"},timeout:1e4,validateStatus:(j)=>j<500})}catch(j){f(`[trusted-device] Enrollment request failed: ${w(j)}`);return}if(m.status!==200&&m.status!==201){f(`[trusted-device] Enrollment failed ${m.status}: ${N(m.data).slice(0,200)}`);return}let z=m.data?.device_token;if(!z||typeof z!=="string"){f("[trusted-device] Enrollment response missing device_token field");return}try{let j=J.read();if(!j){f("[trusted-device] Cannot read storage, skipping token persist");return}j.trustedDeviceToken=z;let K=J.update(j);if(!K.success){f(`[trusted-device] Failed to persist token: ${K.warning??"unknown"}`);return}y.cache?.clear?.(),f(`[trusted-device] Enrolled device_id=${m.data.device_id??"unknown"}`)}catch(j){f(`[trusted-device] Storage write failed: ${w(j)}`)}}catch(i){f(`[trusted-device] Enrollment error: ${w(i)}`)}}var G="tengu_sessions_elevated_auth_enforcement",y;var C=b(()=>{H();U();F();h();I();L();B();y=Y(()=>{let i=process.env.CLAUDE_TRUSTED_DEVICE_TOKEN;if(i)return i;return x().read()?.trustedDeviceToken})});
|
|
3
3
|
export{k as _K,g as $K,u as aL,n as bL,C as cL};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{AF as c,BF as wq,DF as yq}from"./cli-
|
|
2
|
+
import{AF as c,BF as wq,DF as yq}from"./cli-b3k8arn1.js";import{YL as Pq,ZL as Nq}from"./cli-4pwyex04.js";import{TO as kq,UO as uq}from"./cli-8jym9hp6.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-a2d962bq.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-192xnkcx.js";import{j6 as s,r6 as Jq}from"./cli-bdgrtpsy.js";import{$8 as Zq,_8 as L}from"./cli-e5yek4vx.js";import{hda as n}from"./cli-qwx84m9c.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
3
|
export{T as Bb,F as Cb,mq as Db,K6 as Eb,Rq as Fb};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{A_ as H,M9 as $,O9 as O,_9 as K,d_ as m,f_ as M,g_ as b,j_ as E,x_ as V}from"./cli-awb77t95.js";import{H_ as Z,U_ as f}from"./cli-q8zmmp6z.js";import{dda as N,g$ as Q}from"./cli-tafg3e9w.js";import{hda as _}from"./cli-qwx84m9c.js";import{mkdir as U,readFile as w,unlink as J,writeFile as D}from"fs/promises";import{join as S}from"path";function h(G){if(typeof G!=="object"||G===null)return!1;return"sessionId"in G&&typeof G.sessionId==="string"&&"pid"in G&&typeof G.pid==="number"}function q(){return S(Z(),p)}async function z(){try{let G=await w(q(),"utf8"),T=b(G);return h(T)?T:void 0}catch{return}}function A(G){try{return process.kill(G,0),!0}catch{return!1}}async function X(G){try{return await D(q(),M(G),{flag:"wx"}),!0}catch(T){if(K(T)==="EEXIST")return!1;throw T}}function Y(){B?.(),B=$(async()=>{await P()})}async function o(){let G=await z();if(!G)return{kind:"free"};if(G.sessionId===Q())return{kind:"held_by_self"};if(A(G.pid))return{kind:"blocked",by:G.sessionId};return V(`Recovering stale computer-use lock from session ${G.sessionId} (PID ${G.pid})`),await J(q()).catch(()=>{}),{kind:"free"}}function a(){return B!==void 0}async function r(){let G=Q(),T={sessionId:G,pid:process.pid,acquiredAt:Date.now()};if(await U(Z(),{recursive:!0}),await X(T))return Y(),W;let y=await z();if(!y){if(await J(q()).catch(()=>{}),await X(T))return Y(),W;return{kind:"blocked",by:(await z())?.sessionId??"unknown"}}if(y.sessionId===G)return I;if(A(y.pid))return{kind:"blocked",by:y.sessionId};if(V(`Recovering stale computer-use lock from session ${y.sessionId} (PID ${y.pid})`),await J(q()).catch(()=>{}),await X(T))return Y(),W;return{kind:"blocked",by:(await z())?.sessionId??"unknown"}}async function P(){B?.(),B=void 0;let G=await z();if(!G||G.sessionId!==Q())return!1;try{return await J(q()),V("Released computer-use lock"),!0}catch{return!1}}var p="computer-use.lock",B,W,I;var j=_(()=>{N();O();H();f();E();m();W={kind:"acquired",fresh:!0},I={kind:"acquired",fresh:!1}});function n(G){return!1}function u(){}var v=()=>{};
|
|
3
3
|
export{o as wR,a as xR,r as yR,P as zR,j as AR,n as BR,u as CR,v as DR};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ln as M,Vn as Z,co as d,do as G,jo as t}from"./cli-
|
|
2
|
+
import{Ln as M,Vn as Z,co as d,do as G,jo as t}from"./cli-b3k8arn1.js";import{DQ as k,FQ as $,JQ as n,fR as X}from"./cli-a2d962bq.js";import{hda as W}from"./cli-qwx84m9c.js";import{c as T}from"react/compiler-runtime";import{jsxDEV as K}from"react/jsx-dev-runtime";function b(_){let q=T(26),{scope:f,parsingErrors:w,warnings:z}=_,P=w.length>0,v=z.length>0;if(!P&&!v)return null;let h;if(q[0]!==P||q[1]!==v)h=(P||v)&&K($,{color:P?"error":"warning",children:["[",P?"Failed to parse":"Contains warnings","]"," "]},void 0,!0,void 0,this),q[0]=P,q[1]=v,q[2]=h;else h=q[2];let j;if(q[3]!==f)j=G(f),q[3]=f,q[4]=j;else j=q[4];let O;if(q[5]!==j)O=K($,{children:j},void 0,!1,void 0,this),q[5]=j,q[6]=O;else O=q[6];let o;if(q[7]!==h||q[8]!==O)o=K(k,{children:[h,O]},void 0,!0,void 0,this),q[7]=h,q[8]=O,q[9]=o;else o=q[9];let Y;if(q[10]===Symbol.for("react.memo_cache_sentinel"))Y=K($,{dimColor:!0,children:"Location: "},void 0,!1,void 0,this),q[10]=Y;else Y=q[10];let p;if(q[11]!==f)p=d(f),q[11]=f,q[12]=p;else p=q[12];let H;if(q[13]!==p)H=K(k,{children:[Y,K($,{dimColor:!0,children:p},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[13]=p,q[14]=H;else H=q[14];let e;if(q[15]!==w)e=w.map(J),q[15]=w,q[16]=e;else e=q[16];let u;if(q[17]!==z)u=z.map(l),q[17]=z,q[18]=u;else u=q[18];let r;if(q[19]!==e||q[20]!==u)r=K(k,{marginLeft:1,flexDirection:"column",children:[e,u]},void 0,!0,void 0,this),q[19]=e,q[20]=u,q[21]=r;else r=q[21];let a;if(q[22]!==r||q[23]!==o||q[24]!==H)a=K(k,{flexDirection:"column",marginTop:1,children:[o,H,r]},void 0,!0,void 0,this),q[22]=r,q[23]=o,q[24]=H,q[25]=a;else a=q[25];return a}function l(_,q){let f=_.mcpErrorMetadata?.serverName;return K(k,{children:K($,{children:[K($,{dimColor:!0,children:"\u2514 "},void 0,!1,void 0,this),K($,{color:"warning",children:"[Warning]"},void 0,!1,void 0,this),K($,{dimColor:!0,children:[" ",f&&`[${f}] `,_.path&&_.path!==""?`${_.path}: `:"",_.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},`warning-${q}`,!1,void 0,this)}function J(_,q){let f=_.mcpErrorMetadata?.serverName;return K(k,{children:K($,{children:[K($,{dimColor:!0,children:"\u2514 "},void 0,!1,void 0,this),K($,{color:"error",children:"[Error]"},void 0,!1,void 0,this),K($,{dimColor:!0,children:[" ",f&&`[${f}] `,_.path&&_.path!==""?`${_.path}: `:"",_.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},`error-${q}`,!1,void 0,this)}function V(){let _=T(6),q;if(_[0]===Symbol.for("react.memo_cache_sentinel"))q={scope:"user",config:M("user")},_[0]=q;else q=_[0];let f;if(_[1]===Symbol.for("react.memo_cache_sentinel"))f={scope:"project",config:M("project")},_[1]=f;else f=_[1];let w;if(_[2]===Symbol.for("react.memo_cache_sentinel"))w={scope:"local",config:M("local")},_[2]=w;else w=_[2];let z;if(_[3]===Symbol.for("react.memo_cache_sentinel"))z=[q,f,w,{scope:"enterprise",config:M("enterprise")}],_[3]=z;else z=_[3];let P=z,v=P.some(D),h=P.some(y);if(!v&&!h)return null;let j;if(_[4]===Symbol.for("react.memo_cache_sentinel"))j=K($,{bold:!0,children:"MCP Config Diagnostics"},void 0,!1,void 0,this),_[4]=j;else j=_[4];let O;if(_[5]===Symbol.for("react.memo_cache_sentinel"))O=K(k,{flexDirection:"column",marginTop:1,marginBottom:1,children:[j,K(k,{marginTop:1,children:K($,{dimColor:!0,children:["For help configuring MCP servers, see:"," ",K(n,{url:"https://code.claude.com/docs/en/mcp",children:"https://code.claude.com/docs/en/mcp"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),P.map(i)]},void 0,!0,void 0,this),_[5]=O;else O=_[5];return O}function i(_){let{scope:q,config:f}=_;return K(b,{scope:q,parsingErrors:m(f.errors,"fatal"),warnings:m(f.errors,"warning")},q,!1,void 0,this)}function y(_){let{config:q}=_;return m(q.errors,"warning").length>0}function D(_){let{config:q}=_;return m(q.errors,"fatal").length>0}function m(_,q){return _.filter((f)=>f.mcpErrorMetadata?.severity===q)}var R=W(()=>{Z();t();X()});
|
|
3
3
|
export{V as ne,R as oe};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{$ as
|
|
2
|
+
import{e_ as G,j_ as N}from"./cli-awb77t95.js";import{hda as M,jda as B,kda as F}from"./cli-qwx84m9c.js";import{execSync as Q}from"child_process";function $(q,H){let z=[];try{const X=B(z,G`execSync: ${q.slice(0,100)}`,0);return Q(q,H)}catch(I){var J=I,K=1}finally{F(z,J,K)}}var V=M(()=>{N()});
|
|
3
|
+
export{$ as I9,V as J9};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{E7 as m,F7 as oJ}from"./cli-yfb8bk69.js";import{I7 as X,K7 as rJ}from"./cli-7wxv39ry.js";import{N7 as k,O7 as e}from"./cli-fnt125we.js";import{G8 as EJ,L8 as nJ}from"./cli-8kpqq0ea.js";import{G9 as jJ,H9 as iJ}from"./cli-2sbq6ggm.js";import{A_ as aJ,M9 as t,O9 as DJ,f_ as l,j_ as GJ,n_ as R,r_ as s,x_ as O}from"./cli-awb77t95.js";import{dda as pJ,oaa as i}from"./cli-tafg3e9w.js";import{hda as v,ida as sJ}from"./cli-qwx84m9c.js";function h(J){let $=J.slice(J.lastIndexOf(".")).toLowerCase();return kJ.has($)}function g(J){let $=Math.min(J.length,IJ),q=0;for(let K=0;K<$;K++){let Q=J[K];if(Q===0)return!0;if(Q<32&&Q!==9&&Q!==10&&Q!==13)q++}return q/$>0.1}var kJ,IJ=8192;var c=v(()=>{kJ=new Set([".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".tiff",".tif",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".m4v",".mpeg",".mpg",".mp3",".wav",".ogg",".flac",".aac",".m4a",".wma",".aiff",".opus",".zip",".tar",".gz",".bz2",".7z",".rar",".xz",".z",".tgz",".iso",".exe",".dll",".so",".dylib",".bin",".o",".a",".obj",".lib",".app",".msi",".deb",".rpm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".ttf",".otf",".woff",".woff2",".eot",".pyc",".pyo",".class",".jar",".war",".ear",".node",".wasm",".rlib",".sqlite",".sqlite3",".db",".mdb",".idx",".psd",".ai",".eps",".sketch",".fig",".xd",".blend",".3ds",".max",".swf",".fla",".lockb",".dat",".data"])});import{dirname as bJ}from"path";function U(J,$,q){let K=yJ();if(!K)return;let Q={timestamp:new Date().toISOString(),level:J,event:$,data:q??{}},Y=R(),Z=l(Q)+`
|
|
3
3
|
`;try{Y.appendFileSync(K,Z)}catch{try{Y.mkdirSync(bJ(K)),Y.appendFileSync(K,Z)}catch{}}}function yJ(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function T2(J,$,q){let K=Date.now();U("info",`${J}_started`);try{let Q=await $(),Y=q?q(Q):{};return U("info",`${J}_completed`,{duration_ms:Date.now()-K,...Y}),Q}catch(Q){throw U("error",`${J}_failed`,{duration_ms:Date.now()-K}),Q}}var a=v(()=>{s();GJ()});import{readFile as vJ}from"fs/promises";import{join as CJ}from"path";async function C(J,$,q,K){try{let Q=await vJ(CJ(J,"config"),"utf-8");return SJ(Q,$,q,K)}catch{return null}}function SJ(J,$,q,K){let Q=J.split(`
|
|
4
4
|
`),Y=$.toLowerCase(),Z=K.toLowerCase(),A=!1;for(let W of Q){let H=W.trim();if(H.length===0||H[0]==="#"||H[0]===";")continue;if(H[0]==="["){A=wJ(H,Y,q);continue}if(!A)continue;let _=RJ(H);if(_&&_.key.toLowerCase()===Z)return _.value}return null}function RJ(J){let $=0;while($<J.length&&FJ(J[$]))$++;if($===0)return null;let q=J.slice(0,$);while($<J.length&&(J[$]===" "||J[$]==="\t"))$++;if($>=J.length||J[$]!=="=")return null;$++;while($<J.length&&(J[$]===" "||J[$]==="\t"))$++;let K=PJ(J,$);return{key:q,value:K}}function PJ(J,$){let q="",K=!1,Q=$;while(Q<J.length){let Y=J[Q];if(!K&&(Y==="#"||Y===";"))break;if(Y==='"'){K=!K,Q++;continue}if(Y==="\\"&&Q+1<J.length){let Z=J[Q+1];if(K){switch(Z){case"n":q+=`
|
|
5
5
|
`;break;case"t":q+="\t";break;case"b":q+="\b";break;case'"':q+='"';break;case"\\":q+="\\";break;default:q+=Z;break}Q+=2;continue}if(Z==="\\"){q+="\\",Q+=2;continue}}q+=Y,Q++}if(!K)q=xJ(q);return q}function xJ(J){let $=J.length;while($>0&&(J[$-1]===" "||J[$-1]==="\t"))$--;return J.slice(0,$)}function wJ(J,$,q){let K=1;while(K<J.length&&J[K]!=="]"&&J[K]!==" "&&J[K]!=="\t"&&J[K]!=='"')K++;if(J.slice(1,K).toLowerCase()!==$)return!1;if(q===null)return K<J.length&&J[K]==="]";while(K<J.length&&(J[K]===" "||J[K]==="\t"))K++;if(K>=J.length||J[K]!=='"')return!1;K++;let Y="";while(K<J.length&&J[K]!=='"'){if(J[K]==="\\"&&K+1<J.length){let Z=J[K+1];if(Z==="\\"||Z==='"'){Y+=Z,K+=2;continue}Y+=Z,K+=2;continue}Y+=J[K],K++}if(K>=J.length||J[K]!=='"')return!1;if(K++,K>=J.length||J[K]!=="]")return!1;return Y===q}function FJ(J){return J>="a"&&J<="z"||J>="A"&&J<="Z"||J>="0"&&J<="9"||J==="-"}var n=()=>{};import{unwatchFile as o,watchFile as fJ}from"fs";import{readdir as uJ,readFile as j,stat as JJ}from"fs/promises";import{join as L,resolve as P}from"path";function w2(){N.clear()}async function z(J){let $=P(J??k()),q=N.get($);if(q!==void 0)return q;let K=G($);if(!K)return N.set($,null),null;let Q=L(K,".git");try{if((await JJ(Q)).isFile()){let Z=(await j(Q,"utf-8")).trim();if(Z.startsWith("gitdir:")){let A=Z.slice(7).trim(),W=P(K,A);return N.set($,W),W}}return N.set($,Q),Q}catch{return N.set($,null),null}}function x(J){if(!J||J.startsWith("-")||J.startsWith("/"))return!1;if(J.includes(".."))return!1;if(J.split("/").some(($)=>$==="."||$===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(J))return!1;return!0}function D(J){return/^[0-9a-f]{40}$/.test(J)||/^[0-9a-f]{64}$/.test(J)}async function S(J){try{let $=(await j(L(J,"HEAD"),"utf-8")).trim();if($.startsWith("ref:")){let q=$.slice(4).trim();if(q.startsWith("refs/heads/")){let Q=q.slice(11);if(!x(Q))return null;return{type:"branch",name:Q}}if(!x(q))return null;let K=await I(J,q);return K?{type:"detached",sha:K}:{type:"detached",sha:""}}if(!D($))return null;return{type:"detached",sha:$}}catch{return null}}async function I(J,$){let q=await r(J,$);if(q)return q;let K=await T(J);if(K&&K!==J)return r(K,$);return null}async function r(J,$){try{let q=(await j(L(J,$),"utf-8")).trim();if(q.startsWith("ref:")){let K=q.slice(4).trim();if(!x(K))return null;return I(J,K)}if(!D(q))return null;return q}catch{}try{let q=await j(L(J,"packed-refs"),"utf-8");for(let K of q.split(`
|
|
6
|
-
`)){if(K.startsWith("#")||K.startsWith("^"))continue;let Q=K.indexOf(" ");if(Q===-1)continue;if(K.slice(Q+1)===$){let Y=K.slice(0,Q);return D(Y)?Y:null}}}catch{}return null}async function T(J){try{let $=(await j(L(J,"commondir"),"utf-8")).trim();return P(J,$)}catch{return null}}async function mJ(J,$,q){try{let K=(await j(L(J,$),"utf-8")).trim();if(K.startsWith("ref:")){let Q=K.slice(4).trim();if(Q.startsWith(q)){let Y=Q.slice(q.length);if(!x(Y))return null;return Y}}}catch{}return null}class $J{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await z(),this.initialized=!0,!this.gitDir)return;this.commonDir=await T(this.gitDir),this.watchPath(L(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(L(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),t(async()=>{this.stopWatching()})}watchPath(J,$){this.watchedPaths.push(J),fJ(J,{interval:dJ},$)}async watchCurrentBranchRef(){if(!this.gitDir)return;let J=await S(this.gitDir),$=this.commonDir??this.gitDir,q=J?.type==="branch"?L($,"refs","heads",J.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)o(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((K)=>K!==this.branchRefPath);if(this.branchRefPath=q,!q)return;this.watchPath(q,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await i(),await this.watchCurrentBranchRef()}invalidate(){for(let J of this.cache.values())J.dirty=!0}stopWatching(){for(let J of this.watchedPaths)o(J);this.watchedPaths=[],this.branchRefPath=null}async get(J,$){await this.ensureStarted();let q=this.cache.get(J);if(q&&!q.dirty)return q.value;if(q)q.dirty=!1;let K=await $(),Q=this.cache.get(J);if(Q&&!Q.dirty)Q.value=K;if(!Q)this.cache.set(J,{value:K,dirty:!1,compute:$});return K}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function hJ(){let J=await z();if(!J)return"HEAD";let $=await S(J);if(!$)return"HEAD";return $.type==="branch"?$.name:"HEAD"}async function gJ(){let J=await z();if(!J)return"";let $=await S(J);if(!$)return"";if($.type==="branch")return await I(J,`refs/heads/${$.name}`)??"";return $.sha}async function cJ(){let J=await z();if(!J)return null;let $=await C(J,"remote","origin","url");if($)return $;let q=await T(J);if(q&&q!==J)return C(q,"remote","origin","url");return null}async function lJ(){let J=await z();if(!J)return"main";let $=await T(J)??J,q=await mJ($,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let K of["main","master"])if(await I($,`refs/remotes/origin/${K}`))return K;return"main"}function qJ(){return w.get("branch",hJ)}function KJ(){return w.get("head",gJ)}function QJ(){return w.get("remoteUrl",cJ)}function YJ(){return w.get("defaultBranch",lJ)}async function F2(J){let $=await z(J);if(!$)return null;let q=await S($);if(!q)return null;if(q.type==="branch")return I($,`refs/heads/${q.name}`);return q.sha}async function p2(J){let $;try{let K=(await j(L(J,".git"),"utf-8")).trim();if(!K.startsWith("gitdir:"))return null;$=P(J,K.slice(7).trim())}catch{return null}let q=await S($);if(!q)return null;if(q.type==="branch")return I($,`refs/heads/${q.name}`);return q.sha}async function D2(J){let $=await z(J);if(!$)return null;let q=await C($,"remote","origin","url");if(q)return q;let K=await T($);if(K&&K!==$)return C(K,"remote","origin","url");return null}async function ZJ(){let J=await z();if(!J)return!1;let $=await T(J)??J;try{return await JJ(L($,"shallow")),!0}catch{return!1}}async function XJ(){try{let J=await z();if(!J)return 0;let $=await T(J)??J;return(await uJ(L($,"worktrees"))).length+1}catch{return 1}}var N,dJ=1000,w;var VJ=v(()=>{pJ();DJ();e();AJ();n();N=new Map;w=new $J});import{createHash as tJ}from"crypto";import{readFileSync as f,realpathSync as WJ,statSync as HJ}from"fs";import{open as eJ,readFile as J2,realpath as LJ,stat as $2}from"fs/promises";import TJ from"lodash-es/memoize.js";import{basename as q2,dirname as u,join as M,resolve as p,sep as MJ}from"path";function K2(){function J($){let q=zJ($);return q===NJ?null:q}return J.cache=zJ.cache,J}function Q2(){function J($){let q=G($);if(!q)return null;return OJ(q)}return J.cache=OJ.cache,J}function $3(J){return z(J)}async function q3(){let J=k(),$=G(J);if(!$)return!1;try{let[q,K]=await Promise.all([LJ(J),LJ($)]);return q===K}catch{return J===$}}function V2(J){let $=J.trim();if(!$)return null;let q=$.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2])return`${q[1]}/${q[2]}`.toLowerCase();let K=$.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(K&&K[1]&&K[2]){let Q=K[1],Y=K[2];if(U2(Q)&&Y.startsWith("git/")){let Z=Y.slice(4),A=Z.split("/");if(A.length>=3&&A[0].includes("."))return Z.toLowerCase();return`github.com/${Z}`.toLowerCase()}return`${Q}/${Y}`.toLowerCase()}return null}async function Y3(){let J=await d();if(!J)return null;let $=V2(J);if(!$)return null;return tJ("sha256").update($).digest("hex").substring(0,16)}async function A3(){try{let[J,$,q,K,Q,Y]=await Promise.all([Z2(),X2(),d(),A2(),W2(),L2()]);return{commitHash:J,branchName:$,remoteUrl:q,isHeadOnRemote:K,isClean:Q,worktreeCount:Y}}catch(J){return null}}async function W3(){let{parseGitRemote:J}=await import("./detectRepository-
|
|
6
|
+
`)){if(K.startsWith("#")||K.startsWith("^"))continue;let Q=K.indexOf(" ");if(Q===-1)continue;if(K.slice(Q+1)===$){let Y=K.slice(0,Q);return D(Y)?Y:null}}}catch{}return null}async function T(J){try{let $=(await j(L(J,"commondir"),"utf-8")).trim();return P(J,$)}catch{return null}}async function mJ(J,$,q){try{let K=(await j(L(J,$),"utf-8")).trim();if(K.startsWith("ref:")){let Q=K.slice(4).trim();if(Q.startsWith(q)){let Y=Q.slice(q.length);if(!x(Y))return null;return Y}}}catch{}return null}class $J{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await z(),this.initialized=!0,!this.gitDir)return;this.commonDir=await T(this.gitDir),this.watchPath(L(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(L(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),t(async()=>{this.stopWatching()})}watchPath(J,$){this.watchedPaths.push(J),fJ(J,{interval:dJ},$)}async watchCurrentBranchRef(){if(!this.gitDir)return;let J=await S(this.gitDir),$=this.commonDir??this.gitDir,q=J?.type==="branch"?L($,"refs","heads",J.name):null;if(q===this.branchRefPath)return;if(this.branchRefPath)o(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((K)=>K!==this.branchRefPath);if(this.branchRefPath=q,!q)return;this.watchPath(q,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await i(),await this.watchCurrentBranchRef()}invalidate(){for(let J of this.cache.values())J.dirty=!0}stopWatching(){for(let J of this.watchedPaths)o(J);this.watchedPaths=[],this.branchRefPath=null}async get(J,$){await this.ensureStarted();let q=this.cache.get(J);if(q&&!q.dirty)return q.value;if(q)q.dirty=!1;let K=await $(),Q=this.cache.get(J);if(Q&&!Q.dirty)Q.value=K;if(!Q)this.cache.set(J,{value:K,dirty:!1,compute:$});return K}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function hJ(){let J=await z();if(!J)return"HEAD";let $=await S(J);if(!$)return"HEAD";return $.type==="branch"?$.name:"HEAD"}async function gJ(){let J=await z();if(!J)return"";let $=await S(J);if(!$)return"";if($.type==="branch")return await I(J,`refs/heads/${$.name}`)??"";return $.sha}async function cJ(){let J=await z();if(!J)return null;let $=await C(J,"remote","origin","url");if($)return $;let q=await T(J);if(q&&q!==J)return C(q,"remote","origin","url");return null}async function lJ(){let J=await z();if(!J)return"main";let $=await T(J)??J,q=await mJ($,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let K of["main","master"])if(await I($,`refs/remotes/origin/${K}`))return K;return"main"}function qJ(){return w.get("branch",hJ)}function KJ(){return w.get("head",gJ)}function QJ(){return w.get("remoteUrl",cJ)}function YJ(){return w.get("defaultBranch",lJ)}async function F2(J){let $=await z(J);if(!$)return null;let q=await S($);if(!q)return null;if(q.type==="branch")return I($,`refs/heads/${q.name}`);return q.sha}async function p2(J){let $;try{let K=(await j(L(J,".git"),"utf-8")).trim();if(!K.startsWith("gitdir:"))return null;$=P(J,K.slice(7).trim())}catch{return null}let q=await S($);if(!q)return null;if(q.type==="branch")return I($,`refs/heads/${q.name}`);return q.sha}async function D2(J){let $=await z(J);if(!$)return null;let q=await C($,"remote","origin","url");if(q)return q;let K=await T($);if(K&&K!==$)return C(K,"remote","origin","url");return null}async function ZJ(){let J=await z();if(!J)return!1;let $=await T(J)??J;try{return await JJ(L($,"shallow")),!0}catch{return!1}}async function XJ(){try{let J=await z();if(!J)return 0;let $=await T(J)??J;return(await uJ(L($,"worktrees"))).length+1}catch{return 1}}var N,dJ=1000,w;var VJ=v(()=>{pJ();DJ();e();AJ();n();N=new Map;w=new $J});import{createHash as tJ}from"crypto";import{readFileSync as f,realpathSync as WJ,statSync as HJ}from"fs";import{open as eJ,readFile as J2,realpath as LJ,stat as $2}from"fs/promises";import TJ from"lodash-es/memoize.js";import{basename as q2,dirname as u,join as M,resolve as p,sep as MJ}from"path";function K2(){function J($){let q=zJ($);return q===NJ?null:q}return J.cache=zJ.cache,J}function Q2(){function J($){let q=G($);if(!q)return null;return OJ(q)}return J.cache=OJ.cache,J}function $3(J){return z(J)}async function q3(){let J=k(),$=G(J);if(!$)return!1;try{let[q,K]=await Promise.all([LJ(J),LJ($)]);return q===K}catch{return J===$}}function V2(J){let $=J.trim();if(!$)return null;let q=$.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2])return`${q[1]}/${q[2]}`.toLowerCase();let K=$.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(K&&K[1]&&K[2]){let Q=K[1],Y=K[2];if(U2(Q)&&Y.startsWith("git/")){let Z=Y.slice(4),A=Z.split("/");if(A.length>=3&&A[0].includes("."))return Z.toLowerCase();return`github.com/${Z}`.toLowerCase()}return`${Q}/${Y}`.toLowerCase()}return null}async function Y3(){let J=await d();if(!J)return null;let $=V2(J);if(!$)return null;return tJ("sha256").update($).digest("hex").substring(0,16)}async function A3(){try{let[J,$,q,K,Q,Y]=await Promise.all([Z2(),X2(),d(),A2(),W2(),L2()]);return{commitHash:J,branchName:$,remoteUrl:q,isHeadOnRemote:K,isClean:Q,worktreeCount:Y}}catch(J){return null}}async function W3(){let{parseGitRemote:J}=await import("./detectRepository-9xqead5f.js"),$=await d();if(!$)return O("Local GitHub repo: unknown"),null;let q=J($);if(q&&q.host==="github.com"){let K=`${q.owner}/${q.name}`;return O(`Local GitHub repo: ${K}`),K}return O("Local GitHub repo: unknown"),null}async function z2(){let{stdout:J,code:$}=await X(V(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if($===0&&J.trim())return J.trim();let{stdout:q,code:K}=await X(V(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(K===0){let Y=q.match(/HEAD branch: (\S+)/);if(Y&&Y[1])return`origin/${Y[1]}`}let Q=["origin/main","origin/staging","origin/master"];for(let Y of Q){let{code:Z}=await X(V(),["rev-parse","--verify",Y],{preserveOutputOnError:!1});if(Z===0)return Y}return null}function O2(){return ZJ()}async function F(){let{stdout:J,code:$}=await X(V(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),q=J.trim();if($!==0||!q)return[];let K=q.split(`
|
|
7
7
|
`).filter(Boolean),Q=[],Y=0;for(let Z of K){if(Q.length>=_J){O(`Untracked file capture: reached max file count (${_J})`);break}if(h(Z))continue;try{let W=(await $2(Z)).size;if(W>UJ){O(`Untracked file capture: skipping ${Z} (exceeds ${UJ} bytes)`);continue}if(Y+W>BJ){O(`Untracked file capture: reached total size limit (${BJ} bytes)`);break}if(W===0){Q.push({path:Z,content:""});continue}let H=Math.min(M2,W),_=await eJ(Z,"r");try{let b=Buffer.alloc(H),{bytesRead:y}=await _.read(b,0,H,0),E=b.subarray(0,y);if(g(E))continue;let B;if(W<=H)B=E.toString("utf-8");else B=await J2(Z,"utf-8");Q.push({path:Z,content:B}),Y+=W}finally{await _.close()}}catch(A){O(`Failed to read untracked file ${Z}: ${A}`)}}return Q}async function H3(){try{if(!await Y2())return null;if(await O2()){O("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:E},B]=await Promise.all([X(V(),["diff","HEAD"]),F()]);return{remote_base_sha:null,remote_base:null,patch:E||"",untracked_files:B,format_patch:null,head_sha:null,branch_name:null}}let $=await z2();if(!$){O("No remote found, using HEAD-only mode for issue");let[{stdout:E},B]=await Promise.all([X(V(),["diff","HEAD"]),F()]);return{remote_base_sha:null,remote_base:null,patch:E||"",untracked_files:B,format_patch:null,head_sha:null,branch_name:null}}let{stdout:q,code:K}=await X(V(),["merge-base","HEAD",$],{preserveOutputOnError:!1});if(K!==0||!q.trim()){O("Merge-base failed, using HEAD-only mode for issue");let[{stdout:E},B]=await Promise.all([X(V(),["diff","HEAD"]),F()]);return{remote_base_sha:null,remote_base:null,patch:E||"",untracked_files:B,format_patch:null,head_sha:null,branch_name:null}}let Q=q.trim(),[{stdout:Y},Z,{stdout:A,code:W},{stdout:H},{stdout:_}]=await Promise.all([X(V(),["diff",Q]),F(),X(V(),["format-patch",`${Q}..HEAD`,"--stdout"]),X(V(),["rev-parse","HEAD"]),X(V(),["rev-parse","--abbrev-ref","HEAD"])]),b=null;if(W===0&&A&&A.trim())b=A;let y=_?.trim();return{remote_base_sha:Q,remote_base:$,patch:Y||"",untracked_files:Z,format_patch:b,head_sha:H?.trim()||null,branch_name:y&&y!=="HEAD"?y:null}}catch(J){return EJ(J),null}}function U2(J){let $=J.split(":")[0]??"";return $==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test($)}function L3(){let J=R(),$=k(),q=M($,".git");try{let K=J.statSync(q);if(K.isFile())return!1;if(K.isDirectory()){let Q=M(q,"HEAD");try{if(J.statSync(Q).isFile())return!1}catch{}}}catch{}try{if(J.statSync(M($,"HEAD")).isFile())return!0}catch{}try{if(J.statSync(M($,"objects")).isDirectory())return!0}catch{}try{if(J.statSync(M($,"refs")).isDirectory())return!0}catch{}return!1}var NJ,zJ,G,OJ,J3,V,Y2,K3=async(J)=>{return G(J)!==null},Z2=async()=>{return KJ()},X2=async()=>{return qJ()},Q3=async()=>{return YJ()},d=async()=>{return QJ()},A2=async()=>{let{code:J}=await X(V(),["rev-parse","@{u}"],{preserveOutputOnError:!1});return J===0},Z3=async()=>{let{stdout:J,code:$}=await X(V(),["rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1});return $===0&&parseInt(J.trim(),10)>0},W2=async(J)=>{let $=["--no-optional-locks","status","--porcelain"];if(J?.ignoreUntracked)$.push("-uno");let{stdout:q}=await X(V(),$,{preserveOutputOnError:!1});return q.trim().length===0},X3=async()=>{let{stdout:J}=await X(V(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return J.trim().split(`
|
|
8
8
|
`).map(($)=>$.trim().split(" ",2)[1]?.trim()).filter(($)=>typeof $==="string")},H2=async()=>{let{stdout:J}=await X(V(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1}),$=[],q=[];return J.trim().split(`
|
|
9
9
|
`).filter((K)=>K.length>0).forEach((K)=>{let Q=K.substring(0,2),Y=K.substring(2).trim();if(Q==="??")q.push(Y);else if(Y)$.push(Y)}),{tracked:$,untracked:q}},L2=async()=>{return XJ()},V3=async(J)=>{try{let $=J||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:q}=await H2();if(q.length>0){let{code:Q}=await X(V(),["add",...q],{preserveOutputOnError:!1});if(Q!==0)return!1}let{code:K}=await X(V(),["stash","push","--message",$],{preserveOutputOnError:!1});return K===0}catch($){return!1}},UJ=524288000,BJ=5368709120,_J=20000,M2=65536;var AJ=v(()=>{c();e();aJ();a();rJ();s();VJ();nJ();oJ();iJ();NJ=Symbol("git-root-not-found"),zJ=m((J)=>{let $=Date.now();U("info","find_git_root_started");let q=p(J),K=q.substring(0,q.indexOf(MJ)+1)||MJ,Q=0;while(q!==K){try{let Z=M(q,".git");Q++;let A=HJ(Z);if(A.isDirectory()||A.isFile())return U("info","find_git_root_completed",{duration_ms:Date.now()-$,stat_count:Q,found:!0}),q.normalize("NFC")}catch{}let Y=u(q);if(Y===q)break;q=Y}try{let Y=M(K,".git");Q++;let Z=HJ(Y);if(Z.isDirectory()||Z.isFile())return U("info","find_git_root_completed",{duration_ms:Date.now()-$,stat_count:Q,found:!0}),K.normalize("NFC")}catch{}return U("info","find_git_root_completed",{duration_ms:Date.now()-$,stat_count:Q,found:!1}),NJ},(J)=>J,50),G=K2();OJ=m((J)=>{try{let $=f(M(J,".git"),"utf-8").trim();if(!$.startsWith("gitdir:"))return J;let q=p(J,$.slice(7).trim()),K=p(q,f(M(q,"commondir"),"utf-8").trim());if(p(u(q))!==M(K,"worktrees"))return J;if(WJ(f(M(q,"gitdir"),"utf-8").trim())!==M(WJ(J),".git"))return J;if(q2(K)!==".git")return K.normalize("NFC");return u(K).normalize("NFC")}catch{return J}},(J)=>J,50),J3=Q2();V=TJ(()=>{return jJ("git")||"git"}),Y2=TJ(async()=>{let J=Date.now();U("info","is_git_check_started");let $=G(k())!==null;return U("info","is_git_check_completed",{duration_ms:Date.now()-J,is_git:$}),$})});
|
|
10
|
-
export{U as
|
|
10
|
+
export{U as Q6,T2 as R6,a as S6,h as T6,c as U6,C as V6,n as W6,w2 as X6,z as Y6,I as Z6,T as _6,F2 as $6,p2 as a7,D2 as b7,VJ as c7,G as d7,J3 as e7,V as f7,Y2 as g7,$3 as h7,q3 as i7,K3 as j7,Z2 as k7,X2 as l7,Q3 as m7,d as n7,V2 as o7,Y3 as p7,A2 as q7,Z3 as r7,W2 as s7,X3 as t7,H2 as u7,L2 as v7,V3 as w7,A3 as x7,W3 as y7,z2 as z7,H3 as A7,L3 as B7,AJ as C7};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{U as
|
|
2
|
+
import{G8 as W,L8 as Z}from"./cli-8kpqq0ea.js";import{f_ as T,j_ as Y}from"./cli-awb77t95.js";import{hda as X}from"./cli-qwx84m9c.js";import{LRUCache as _}from"lru-cache";function U(N,P=300000){let D=new Map,A=new Map,I=async(...B)=>{let q=T(B),G=D.get(q),J=Date.now();if(!G){let K=A.get(q);if(K)return K;let H=N(...B);A.set(q,H);try{let Q=await H;if(A.get(q)===H)D.set(q,{value:Q,timestamp:J,refreshing:!1});return Q}finally{if(A.get(q)===H)A.delete(q)}}if(G&&J-G.timestamp>P&&!G.refreshing){G.refreshing=!0;let K=G;return N(...B).then((H)=>{if(D.get(q)===K)D.set(q,{value:H,timestamp:Date.now(),refreshing:!1})}).catch((H)=>{if(W(H),D.get(q)===K)D.delete(q)}),G.value}return D.get(q).value};return I.cache={clear:()=>{D.clear(),A.clear()}},I}function x(N,P,D=100){let A=new _({max:D}),I=(...B)=>{let q=P(...B),G=A.get(q);if(G!==void 0)return G;let J=N(...B);return A.set(q,J),J};return I.cache={clear:()=>A.clear(),size:()=>A.size,delete:(B)=>A.delete(B),get:(B)=>A.peek(B),has:(B)=>A.has(B)},I}var $=X(()=>{Z();Y()});
|
|
3
|
+
export{U as D7,x as E7,$ as F7};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{B as
|
|
2
|
+
import{hda as q}from"./cli-qwx84m9c.js";function B(k){let j=k.replace(/[^a-zA-Z0-9_-]/g,"_");if(k.startsWith("claude.ai "))j=j.replace(/_+/g,"_").replace(/^_|_$/g,"");return j}var x=()=>{};
|
|
3
|
+
export{B as j9,x as k9};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$f as U,ag as B}from"./cli-
|
|
2
|
+
import{$f as U,ag as B}from"./cli-9tbmrp89.js";import{F1 as $,b1 as Q,g1 as R,vX as K,wX as Z}from"./cli-192xnkcx.js";import{B5 as N,C5 as _}from"./cli-an97yxg9.js";import{G8 as J,L8 as Y}from"./cli-8kpqq0ea.js";import{hda as X}from"./cli-qwx84m9c.js";import{jsxDEV as F}from"react/jsx-dev-runtime";async function C(y,W){try{if(R()){let q=Q(),z=!1;if(q?.subscriptionType&&q?.rateLimitTier)z=q.subscriptionType==="max"&&q.rateLimitTier==="default_claude_max_20x";else if(q?.accessToken){let H=await K(q.accessToken);z=H?.organization?.organization_type==="claude_max"&&H?.organization?.rate_limit_tier==="default_claude_max_20x"}if(z)return setTimeout(y,0,"You are already on the highest Max subscription plan. For additional usage, run /login to switch to an API usage-billed account."),null}return await N("https://claude.ai/upgrade/max"),F(U,{startingMessage:"Starting new login following /upgrade. Exit with Ctrl-C to use existing account.",onDone:(q)=>{W.onChangeAPIKey(),y(q?"Login successful":"Login interrupted")}},void 0,!1,void 0,this)}catch(G){J(G),setTimeout(y,0,"Failed to open browser. Please visit https://claude.ai/upgrade/max to upgrade.")}return null}var L=X(()=>{Z();$();_();Y();B()});
|
|
3
3
|
export{C as Wa,L as Xa};
|