@claudiolabs/claudio 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AgentTool-0.1.15-aene6e12.mjs +1 -0
- package/dist/chunks/App-0.1.15-skbrajfh.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.1.15-zkd425a9.mjs +1 -0
- package/dist/chunks/{AssistantSessionChooser-0.1.13-tcg2ckh4.mjs → AssistantSessionChooser-0.1.15-3wyrkte5.mjs} +1 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.15-xemnqw1q.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.1.15-51n3nd6r.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.15-g407nd3p.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.1.15-80g71gdg.mjs +1 -0
- package/dist/chunks/{DiffDialog-0.1.13-3a9b1b48.mjs → DiffDialog-0.1.15-86m0j64m.mjs} +1 -1
- package/dist/chunks/Doctor-0.1.15-9x07ccn6.mjs +1 -0
- package/dist/chunks/Grove-0.1.15-jdcp80ev.mjs +1 -0
- package/dist/chunks/ITermBackend-0.1.15-ejm7gc8d.mjs +1 -0
- package/dist/chunks/{InProcessTransport-0.1.13-k5mkjvww.mjs → InProcessTransport-0.1.15-p32k8qva.mjs} +1 -1
- package/dist/chunks/InvalidConfigDialog-0.1.15-rctrbcsm.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.1.15-bjsk3qxm.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.1.15-6x3bjqw1.mjs +1 -0
- package/dist/chunks/Onboarding-0.1.15-pqx4v1wq.mjs +1 -0
- package/dist/chunks/ProviderManager-0.1.15-t8sezf1q.mjs +1 -0
- package/dist/chunks/REPL-0.1.15-6e0xrr9y.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.1.15-fm1gvj49.mjs +1 -0
- package/dist/chunks/{SnapshotUpdateDialog-0.1.13-has41zv0.mjs → SnapshotUpdateDialog-0.1.15-t3evkrvq.mjs} +1 -1
- package/dist/chunks/TeleportProgress-0.1.15-gad6kpfq.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.15-00rkfxqs.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.1.15-bwv0syaw.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.1.15-0d8n5p59.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.1.15-1cemq4m9.mjs +1 -0
- package/dist/chunks/TrustDialog-0.1.15-srz2xcqx.mjs +1 -0
- package/dist/chunks/activeProvider-0.1.15-1fp1bec5.mjs +1 -0
- package/dist/chunks/add-dir-0.1.15-qj517xx8.mjs +1 -0
- package/dist/chunks/agents-0.1.15-vkekdkan.mjs +3 -0
- package/dist/chunks/agents-0.1.15-x18jhwwk.mjs +111 -0
- package/dist/chunks/api-0.1.15-jq17qdd8.mjs +1 -0
- package/dist/chunks/{asciicast-0.1.13-d6ce2h4r.mjs → asciicast-0.1.15-4t4tanfk.mjs} +1 -1
- package/dist/chunks/assistant-0.1.15-9fhfbk14.mjs +1 -0
- package/dist/chunks/auth-0.1.15-ddyv63ax.mjs +1 -0
- package/dist/chunks/{auth-0.1.13-fwdmg15h.mjs → auth-0.1.15-x6bxj6d1.mjs} +1 -1
- package/dist/chunks/{autoMode-0.1.13-4xh49kt4.mjs → autoMode-0.1.15-p9r45wxy.mjs} +1 -1
- package/dist/chunks/backgroundHousekeeping-0.1.15-sbv1p8kj.mjs +1 -0
- package/dist/chunks/branch-0.1.15-cqq1x0cj.mjs +4 -0
- package/dist/chunks/{bridgePointer-0.1.13-s1qw0857.mjs → bridgePointer-0.1.15-p6kq1zz7.mjs} +1 -1
- package/dist/chunks/btw-0.1.15-q693ppfr.mjs +1 -0
- package/dist/chunks/{buddy-0.1.13-2wvpbqx1.mjs → buddy-0.1.15-vcca6k2p.mjs} +1 -1
- package/dist/chunks/cacache-0.1.15-tj6nes3h.mjs +1 -0
- package/dist/chunks/{cache-probe-0.1.13-ze8mf958.mjs → cache-probe-0.1.15-dfdjj53r.mjs} +1 -1
- package/dist/chunks/{cacheStats-0.1.13-jtrw4rdj.mjs → cacheStats-0.1.15-v9v9y02q.mjs} +1 -1
- package/dist/chunks/caches-0.1.15-tynjvd5a.mjs +1 -0
- package/dist/chunks/{claudeDesktop-0.1.13-fs8rre9b.mjs → claudeDesktop-0.1.15-rxtx8hbf.mjs} +1 -1
- package/dist/chunks/claudemd-0.1.15-s942v7vd.mjs +1 -0
- package/dist/chunks/clear-0.1.15-2tqn4fj6.mjs +1 -0
- package/dist/chunks/clearTerminal-0.1.15-qycj6c0p.mjs +1 -0
- package/dist/chunks/cli-0.1.15-0a38j3t8.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-s9fgd2dx.mjs → cli-0.1.15-0g0abv7y.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-gd3nndc7.mjs → cli-0.1.15-11sdbfxy.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-12azgmva.mjs +2 -0
- package/dist/chunks/cli-0.1.15-1hxkpjgs.mjs +2 -0
- package/dist/chunks/cli-0.1.15-1kmf57b0.mjs +2 -0
- package/dist/chunks/cli-0.1.15-1nkkhw5c.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-2cdtdhek.mjs → cli-0.1.15-20tvdt2s.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-ks4x4cct.mjs → cli-0.1.15-216kns0c.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-229xqnrp.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-zgnanj3x.mjs → cli-0.1.15-23cavaaa.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-fh5dndvp.mjs → cli-0.1.15-26hkdean.mjs} +919 -915
- package/dist/chunks/{cli-0.1.13-fwd5b6q8.mjs → cli-0.1.15-2ccapgj1.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-2h647znt.mjs +2 -0
- package/dist/chunks/cli-0.1.15-2te4sfkh.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-cjmpc9q5.mjs → cli-0.1.15-2vwx57re.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-mkw72mxc.mjs → cli-0.1.15-30tz5ck8.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-36pxgzf6.mjs +2 -0
- package/dist/chunks/cli-0.1.15-3jz926ax.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-3pctg5zc.mjs → cli-0.1.15-3qwnw3ca.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-3rcdvk7c.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-30j4h365.mjs → cli-0.1.15-3z0tzzs8.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-dag38tkx.mjs → cli-0.1.15-4892kydg.mjs} +5 -5
- package/dist/chunks/{cli-0.1.13-13fh0g36.mjs → cli-0.1.15-4fc5wnse.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-b24n1wvw.mjs → cli-0.1.15-4hnhxg2w.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-4hzd3m6p.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-dak36ez8.mjs → cli-0.1.15-4y7051f2.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-5ydypzty.mjs → cli-0.1.15-5denzf1p.mjs} +3 -3
- package/dist/chunks/{cli-0.1.13-p4nz8zmd.mjs → cli-0.1.15-5g0zxgxn.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-3k1n20ra.mjs → cli-0.1.15-5qx5p8cd.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-5tz7z79g.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-m5c2efjx.mjs → cli-0.1.15-618hqv9f.mjs} +1 -1
- package/dist/chunks/{cli-0.1.13-hjqn3n5a.mjs → cli-0.1.15-68f0jtkh.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-pqk4c7m7.mjs → cli-0.1.15-69kq5chw.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-pw5dks39.mjs → cli-0.1.15-6mad0r56.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-bkg3sva7.mjs → cli-0.1.15-6nwbd09n.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-9043n2e8.mjs → cli-0.1.15-6r12ayea.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-0hyneh5t.mjs → cli-0.1.15-6r630k68.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-vn7ckv16.mjs → cli-0.1.15-77346q11.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-fdmvysv0.mjs → cli-0.1.15-7mfwj2xs.mjs} +1 -1
- package/dist/chunks/{cli-0.1.13-b40skdsz.mjs → cli-0.1.15-7myqm617.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-hgkwnhwv.mjs → cli-0.1.15-7rr53z40.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-7ve9h395.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-zm2zgw7m.mjs → cli-0.1.15-82r3zgmq.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-8k69z9kk.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-p2wyk6z7.mjs → cli-0.1.15-8sgewact.mjs} +3 -3
- package/dist/chunks/{cli-0.1.13-g654740k.mjs → cli-0.1.15-8v8bskr0.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-8sszxge2.mjs → cli-0.1.15-90ye3yqx.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-99wmm9j7.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-1gbn4dgj.mjs → cli-0.1.15-9m2znwvb.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-1g6bgaa6.mjs → cli-0.1.15-9pe3dbgs.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-9w140hjt.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-jeyjdb2m.mjs → cli-0.1.15-a10ekh15.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-ct9m5223.mjs → cli-0.1.15-a8kgfrkd.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-tknwgkgp.mjs → cli-0.1.15-acdm8b28.mjs} +3 -3
- package/dist/chunks/cli-0.1.15-ajg1d1bh.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-0xy8k6yv.mjs → cli-0.1.15-asts8hm3.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-apjxy5tn.mjs → cli-0.1.15-b1t6c81s.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-b21k5hzy.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-x461rxn2.mjs → cli-0.1.15-b6gdqjbg.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-b7f6hacc.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-hyvpn2ht.mjs → cli-0.1.15-b7p48xfw.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-njvp7vtc.mjs → cli-0.1.15-be4mz6ka.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-behp1dag.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-8pw4n94k.mjs → cli-0.1.15-bfd337b0.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-dmgp48vg.mjs → cli-0.1.15-bpcmpy8b.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-8snyqhjj.mjs → cli-0.1.15-bz57rf9t.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-cbseyggr.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-v32xwe08.mjs → cli-0.1.15-cenwnwnx.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-qdtwrf9z.mjs → cli-0.1.15-cf4s92e9.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-s928gjab.mjs → cli-0.1.15-cqzrzsh5.mjs} +3 -3
- package/dist/chunks/{cli-0.1.13-v467fj8c.mjs → cli-0.1.15-cr7qy3wd.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-cyq0gbzk.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-yd536yw4.mjs → cli-0.1.15-d9nfa2yf.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-0zpmhn2j.mjs → cli-0.1.15-dcabmk2v.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-b3xc1r3k.mjs → cli-0.1.15-dcxa8b6s.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-t5w452fj.mjs → cli-0.1.15-dp2e8j4f.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-dq954y1q.mjs +2 -0
- package/dist/chunks/cli-0.1.15-dqkhbs67.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-fzb4yx18.mjs → cli-0.1.15-e2e7hn7p.mjs} +4 -4
- package/dist/chunks/cli-0.1.15-e494j2sj.mjs +4 -0
- package/dist/chunks/{cli-0.1.13-vj532g9m.mjs → cli-0.1.15-e64w5wan.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-6gmqjyv9.mjs → cli-0.1.15-e70ktyft.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-em40knm7.mjs +4 -0
- package/dist/chunks/{cli-0.1.13-y7aqqca1.mjs → cli-0.1.15-en9ppdbd.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-9jajvw4r.mjs → cli-0.1.15-f838g4vw.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-d6tr2j76.mjs → cli-0.1.15-f8abjagh.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-fe92jeft.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-v6z41645.mjs → cli-0.1.15-fmnyh9j9.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-nsbk0w3b.mjs → cli-0.1.15-fr83vs1y.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-rftgy1b8.mjs → cli-0.1.15-ft6xtjsa.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-87xfe2f3.mjs → cli-0.1.15-g5wt8d3g.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-xvvtja1h.mjs → cli-0.1.15-ghvjjc4g.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-579v6j6d.mjs → cli-0.1.15-gkzany0s.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-jz57znb6.mjs → cli-0.1.15-gmdv5ny8.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-1pxg82cx.mjs → cli-0.1.15-gn4wnxx3.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-xde08pkt.mjs → cli-0.1.15-gqf82qvm.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-kzn9sspk.mjs → cli-0.1.15-gqp8kzp0.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-ctjpk124.mjs → cli-0.1.15-gtn9gx9w.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-gwbebdj7.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-ck28msre.mjs → cli-0.1.15-gxgy4enj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-saz6qetz.mjs → cli-0.1.15-h3a2cbdb.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-wz7v1tqx.mjs → cli-0.1.15-h4erh2cn.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-h7cb0pw7.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-mahtf0ay.mjs → cli-0.1.15-htms4w3h.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-hyydz4kc.mjs +12 -0
- package/dist/chunks/{cli-0.1.13-2vrh3n9y.mjs → cli-0.1.15-j5m3s9r5.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-s6w3ej6f.mjs → cli-0.1.15-jy7cjb23.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-tq3dqmem.mjs → cli-0.1.15-k0bn0cze.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-asrdd8dh.mjs → cli-0.1.15-knpxv22b.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-m61dhxfs.mjs → cli-0.1.15-ks9rz9tk.mjs} +3 -3
- package/dist/chunks/{cli-0.1.13-6p0jxfnp.mjs → cli-0.1.15-kw7che8m.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-m0v1d1kt.mjs +821 -0
- package/dist/chunks/{cli-0.1.13-8gd1x101.mjs → cli-0.1.15-m7gtc61y.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-bj67mp7n.mjs → cli-0.1.15-mhbfhhf6.mjs} +1 -1
- package/dist/chunks/cli-0.1.15-my0y22r7.mjs +6 -0
- package/dist/chunks/{cli-0.1.13-nc3ce357.mjs → cli-0.1.15-n97y4hq4.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-d8wkcw90.mjs → cli-0.1.15-ncammv2n.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-nejf7yqz.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-rkaxch5j.mjs → cli-0.1.15-njg0k6ga.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-144gn3fd.mjs → cli-0.1.15-nk50qhet.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-a4xga299.mjs → cli-0.1.15-nkn6jfmb.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-nts79xbr.mjs +2 -0
- package/dist/chunks/cli-0.1.15-nw94frpp.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-2c7g6rpx.mjs → cli-0.1.15-nx5v1cvm.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-0gfnmq08.mjs → cli-0.1.15-p159ga3t.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-p47rrzrn.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-xv6wh44y.mjs → cli-0.1.15-p5ty029c.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-pcqjreq6.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-5061js0h.mjs → cli-0.1.15-pxf97j8y.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-wxdmc1dd.mjs → cli-0.1.15-pya8tbx3.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-q021qg07.mjs +2 -0
- package/dist/chunks/cli-0.1.15-q35rzjnz.mjs +16 -0
- package/dist/chunks/{cli-0.1.13-gvz2qezh.mjs → cli-0.1.15-qhz07at6.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-qns6xv34.mjs +134 -0
- package/dist/chunks/{cli-0.1.13-myd004mr.mjs → cli-0.1.15-r626437v.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-xkdwvsg9.mjs → cli-0.1.15-r8qzzahw.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-r9nrfwrq.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-fabrrwqa.mjs → cli-0.1.15-rbx47sc3.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-ga4mmwbc.mjs → cli-0.1.15-rq9n4js4.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-wwnez3j0.mjs → cli-0.1.15-rr65b3dk.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-rs5swvy0.mjs +4 -0
- package/dist/chunks/{cli-0.1.13-h7a36dnk.mjs → cli-0.1.15-rv6zpjh8.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-rvtve9kq.mjs +3 -0
- package/dist/chunks/cli-0.1.15-rwx8446j.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-p625yxtg.mjs → cli-0.1.15-s7trme0x.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-ajsw8n7h.mjs → cli-0.1.15-sct02cw6.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-d85aba8r.mjs → cli-0.1.15-sd5jysf2.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-0p3b9j40.mjs → cli-0.1.15-sg3n1v0w.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-nwt2jc8b.mjs → cli-0.1.15-svhrqvzp.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-8ppsn0an.mjs → cli-0.1.15-tj4kzvth.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-tn4214gj.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-79vtnprb.mjs → cli-0.1.15-tp614m5f.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-j7796v8f.mjs → cli-0.1.15-twq0mjmr.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-84tbx1nf.mjs → cli-0.1.15-v07ep52w.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-v8zwx5j6.mjs +3 -0
- package/dist/chunks/{cli-0.1.13-mezw1vk8.mjs → cli-0.1.15-vwb8h4r1.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-vwt4hc0t.mjs → cli-0.1.15-vzk22hwe.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-cyj5snev.mjs → cli-0.1.15-w8q8f37x.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-rjjyq9ej.mjs → cli-0.1.15-wfn10357.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-wmwtv0tz.mjs +2 -0
- package/dist/chunks/cli-0.1.15-wn40n534.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-5j5bg3t2.mjs → cli-0.1.15-x3yhaxm9.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-wh68ve92.mjs → cli-0.1.15-x69hfzmj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-00qdyz6f.mjs → cli-0.1.15-xaw2s45s.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-ky4z1s1h.mjs → cli-0.1.15-xe4dq144.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-e58n0k16.mjs → cli-0.1.15-xery8c8c.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-y2pbhx6p.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-5c4fyghf.mjs → cli-0.1.15-y6fkcbes.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-y7xkk5ds.mjs +2 -0
- package/dist/chunks/cli-0.1.15-yghcqf7h.mjs +2 -0
- package/dist/chunks/{cli-0.1.13-w8h6wdez.mjs → cli-0.1.15-yjxhk7qj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-eh7dqeqt.mjs → cli-0.1.15-ywed2hpz.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-s90a26ca.mjs → cli-0.1.15-yxm6wwfz.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-yym7bka2.mjs +2 -0
- package/dist/chunks/cli-0.1.15-z2yexprk.mjs +4 -0
- package/dist/chunks/{cli-0.1.13-5krmz4nd.mjs → cli-0.1.15-z35x5bfj.mjs} +2 -2
- package/dist/chunks/{cli-0.1.13-fz5dm31h.mjs → cli-0.1.15-zap1wk9j.mjs} +2 -2
- package/dist/chunks/cli-0.1.15-zf1s8y92.mjs +2 -0
- package/dist/chunks/cli-0.1.15-ztxn2vjm.mjs +2 -0
- package/dist/chunks/client-0.1.15-pbb4218v.mjs +1 -0
- package/dist/chunks/color-0.1.15-w9tvjt51.mjs +1 -0
- package/dist/chunks/compact-0.1.15-2a2eywaz.mjs +3 -0
- package/dist/chunks/config-0.1.15-m4gwmfb1.mjs +1 -0
- package/dist/chunks/config-0.1.15-r15yk3zr.mjs +1 -0
- package/dist/chunks/context-0.1.15-ghkedaaw.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.1.15-wwa3qz84.mjs +1 -0
- package/dist/chunks/conversation-0.1.15-n1bn5vmb.mjs +1 -0
- package/dist/chunks/{copy-0.1.13-03jy5tfn.mjs → copy-0.1.15-53q3e2fk.mjs} +1 -1
- package/dist/chunks/cost-0.1.15-garxyfxy.mjs +1 -0
- package/dist/chunks/createSession-0.1.15-krz8fv09.mjs +1 -0
- package/dist/chunks/desktop-0.1.15-j0znhh3a.mjs +1 -0
- package/dist/chunks/detectRepository-0.1.15-f34tbbq5.mjs +1 -0
- package/dist/chunks/detection-0.1.15-qfkk58tf.mjs +1 -0
- package/dist/chunks/diff-0.1.15-gc5686z3.mjs +1 -0
- package/dist/chunks/doctor-0.1.15-hhtv9s33.mjs +1 -0
- package/dist/chunks/earlyInput-0.1.15-ftgt9y2w.mjs +1 -0
- package/dist/chunks/effort-0.1.15-5za6yh63.mjs +8 -0
- package/dist/chunks/environmentSelection-0.1.15-59904m5c.mjs +1 -0
- package/dist/chunks/environments-0.1.15-fn4ybjrt.mjs +1 -0
- package/dist/chunks/exit-0.1.15-qxj6czd5.mjs +1 -0
- package/dist/chunks/export-0.1.15-h5n9s624.mjs +2 -0
- package/dist/chunks/extra-usage-0.1.15-4a6e6rsa.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.1.15-rgqd9ef7.mjs +1 -0
- package/dist/chunks/fast-0.1.15-98jhvjxk.mjs +1 -0
- package/dist/chunks/feedback-0.1.15-pqe68x4v.mjs +14 -0
- package/dist/chunks/{firstPartyEventLogger-0.1.13-6m3fvkcj.mjs → firstPartyEventLogger-0.1.15-pss0293k.mjs} +1 -1
- package/dist/chunks/git-0.1.15-002t17pq.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.1.15-2a6dqqse.mjs +1 -0
- package/dist/chunks/{growthbook-0.1.13-sramqmzv.mjs → growthbook-0.1.15-m7gdvgqa.mjs} +1 -1
- package/dist/chunks/{heapdump-0.1.13-3n7hv372.mjs → heapdump-0.1.15-s8h9rwpe.mjs} +1 -1
- package/dist/chunks/help-0.1.15-y48dg88b.mjs +1 -0
- package/dist/chunks/{hookChains-0.1.13-te9q466p.mjs → hookChains-0.1.15-z46c2xkf.mjs} +2 -2
- package/dist/chunks/{hooks-0.1.13-g6kx1mk3.mjs → hooks-0.1.15-f81kq7m2.mjs} +1 -1
- package/dist/chunks/hooks-0.1.15-vanat6cg.mjs +1 -0
- package/dist/chunks/{ide-0.1.13-ke3v5mb7.mjs → ide-0.1.15-xepj09gj.mjs} +1 -1
- package/dist/chunks/image-processor-napi-0.1.15-5w5sybn1.mjs +1 -0
- package/dist/chunks/index-0.1.15-0z186jwx.mjs +1 -0
- package/dist/chunks/index-0.1.15-136649ke.mjs +1 -0
- package/dist/chunks/{index-0.1.13-psynrf7p.mjs → index-0.1.15-15ftbc8a.mjs} +2 -2
- package/dist/chunks/index-0.1.15-1r19582s.mjs +1 -0
- package/dist/chunks/{index-0.1.13-9meb2pab.mjs → index-0.1.15-3jxezstk.mjs} +1 -1
- package/dist/chunks/index-0.1.15-52zxtxf2.mjs +1 -0
- package/dist/chunks/{index-0.1.13-tvt8fxrq.mjs → index-0.1.15-628tag5v.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-018yhz6j.mjs → index-0.1.15-77j1wp6f.mjs} +1 -1
- package/dist/chunks/index-0.1.15-7cp4n6z6.mjs +1 -0
- package/dist/chunks/{index-0.1.13-mc5ag4wj.mjs → index-0.1.15-832xm57n.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-j9c4bjzh.mjs → index-0.1.15-abzge0fa.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-nm8pkj0f.mjs → index-0.1.15-b9sdtjj4.mjs} +2 -2
- package/dist/chunks/index-0.1.15-bvr8e4dt.mjs +1 -0
- package/dist/chunks/{index-0.1.13-5g9shrc4.mjs → index-0.1.15-d4ea93sj.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-c29wq5dx.mjs → index-0.1.15-f1y1067a.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-3zjrdjrv.mjs → index-0.1.15-n2q4dkvc.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-bc4sh2m1.mjs → index-0.1.15-nzmg6zng.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-4cjfx282.mjs → index-0.1.15-r9ck21mp.mjs} +1 -1
- package/dist/chunks/index-0.1.15-rb4nqzzk.mjs +1 -0
- package/dist/chunks/{index-0.1.13-7c5y7cbf.mjs → index-0.1.15-tf5b20vy.mjs} +1 -1
- package/dist/chunks/{index-0.1.13-a06q9ad9.mjs → index-0.1.15-x8ghxne4.mjs} +1 -1
- package/dist/chunks/index-0.1.15-z3k5tm3n.mjs +1 -0
- package/dist/chunks/initReplBridge-0.1.15-g7q1qemf.mjs +1 -0
- package/dist/chunks/ink-0.1.15-rd56fvsx.mjs +1 -0
- package/dist/chunks/{insights-0.1.13-t81417ej.mjs → insights-0.1.15-2zt9898j.mjs} +1 -1
- package/dist/chunks/install-0.1.15-z6a6aa3t.mjs +1 -0
- package/dist/chunks/{install-github-app-0.1.13-yvnx16za.mjs → install-github-app-0.1.15-h746hza3.mjs} +1 -1
- package/dist/chunks/install-slack-app-0.1.15-2yhy3kwz.mjs +1 -0
- package/dist/chunks/{instrumentation-0.1.13-bvt39wrk.mjs → instrumentation-0.1.15-bwm4tb1y.mjs} +1 -1
- package/dist/chunks/interactiveHelpers-0.1.15-z5nx1rw2.mjs +1 -0
- package/dist/chunks/keybindings-0.1.15-cxmw2kd4.mjs +2 -0
- package/dist/chunks/knowledge-0.1.15-2bnycc4a.mjs +2 -0
- package/dist/chunks/loadAgentsDir-0.1.15-e4ms71xe.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.1.15-rcg3267j.mjs +1 -0
- package/dist/chunks/lsp-0.1.15-veqrp99h.mjs +1 -0
- package/dist/chunks/main-0.1.15-bfvfcwwj.mjs +1 -0
- package/dist/chunks/managedEnv-0.1.15-1mxydytg.mjs +1 -0
- package/dist/chunks/mcp-0.1.15-rfy9pyrt.mjs +1 -0
- package/dist/chunks/{mcp-0.1.13-x9twbpqk.mjs → mcp-0.1.15-tw9s435t.mjs} +3 -3
- package/dist/chunks/mcp-0.1.15-zc7h2fyj.mjs +4 -0
- package/dist/chunks/mcpServer-0.1.15-t7dsptwh.mjs +1 -0
- package/dist/chunks/mcpb-0.1.15-5mam984d.mjs +1 -0
- package/dist/chunks/memory-0.1.15-b6zkcs44.mjs +3 -0
- package/dist/chunks/{mobile-0.1.13-pzekbte3.mjs → mobile-0.1.15-sm8kbft4.mjs} +1 -1
- package/dist/chunks/model-0.1.15-843f7654.mjs +1 -0
- package/dist/chunks/model-0.1.15-e62wxf7h.mjs +2 -0
- package/dist/chunks/{oauth-0.1.13-bk91rvfd.mjs → oauth-0.1.15-gxgmqwwx.mjs} +1 -1
- package/dist/chunks/{openaiShim-0.1.13-c9z5r4zj.mjs → openaiShim-0.1.15-0yryhq9r.mjs} +1 -1
- package/dist/chunks/{output-style-0.1.13-c4ah6hc0.mjs → output-style-0.1.15-d20e4vc3.mjs} +1 -1
- package/dist/chunks/package-WSP46L7M-0.1.15-jsqef57n.mjs +1 -0
- package/dist/chunks/parser-0.1.15-wbja947p.mjs +1 -0
- package/dist/chunks/passes-0.1.15-726y1cyq.mjs +1 -0
- package/dist/chunks/permissions-0.1.15-4pqgyt4h.mjs +3 -0
- package/dist/chunks/plan-0.1.15-p06bpb7x.mjs +1 -0
- package/dist/chunks/plist-0.1.15-fseac2c0.mjs +1 -0
- package/dist/chunks/plugin-0.1.15-yeqq1san.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.1.15-s9v7kq6q.mjs +1 -0
- package/dist/chunks/{plugins-0.1.13-1nvjxkbc.mjs → plugins-0.1.15-3rpwr86v.mjs} +2 -2
- package/dist/chunks/{print-0.1.13-g2dmfpmq.mjs → print-0.1.15-64y2p7wj.mjs} +4 -4
- package/dist/chunks/privacy-settings-0.1.15-rq35tcyk.mjs +1 -0
- package/dist/chunks/{process-0.1.13-ycxbd26n.mjs → process-0.1.15-g6km3z8k.mjs} +1 -1
- package/dist/chunks/processBashCommand-0.1.15-57ga0c30.mjs +1 -0
- package/dist/chunks/{processSlashCommand-0.1.13-16gwwvqz.mjs → processSlashCommand-0.1.15-mee2mbyy.mjs} +1 -1
- package/dist/chunks/prompt-0.1.15-gm20yk5m.mjs +1 -0
- package/dist/chunks/prompt-0.1.15-gxjy2vnc.mjs +1 -0
- package/dist/chunks/prompts-0.1.15-v7p366n5.mjs +1 -0
- package/dist/chunks/provider-0.1.15-gz0fhpp7.mjs +2 -0
- package/dist/chunks/providerProfiles-0.1.15-v7p3m9kf.mjs +1 -0
- package/dist/chunks/rate-limit-options-0.1.15-3vs25v7e.mjs +1 -0
- package/dist/chunks/registry-0.1.15-3h7bxrc2.mjs +1 -0
- package/dist/chunks/release-notes-0.1.15-1g908440.mjs +5 -0
- package/dist/chunks/reload-plugins-0.1.15-5r2acf43.mjs +2 -0
- package/dist/chunks/remote-env-0.1.15-fd5z1adp.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.1.15-kbthngek.mjs +1 -0
- package/dist/chunks/remoteSession-0.1.15-yrg8c3z1.mjs +1 -0
- package/dist/chunks/rename-0.1.15-8079z5ff.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.1.15-cz1pf5m3.mjs +1 -0
- package/dist/chunks/resume-0.1.15-s4hv4t9y.mjs +2 -0
- package/dist/chunks/{rewind-0.1.13-zxcfrje2.mjs → rewind-0.1.15-fevxgefp.mjs} +1 -1
- package/dist/chunks/sandbox-adapter-0.1.15-yra7frkv.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.1.15-fn86ac4p.mjs +1 -0
- package/dist/chunks/session-0.1.15-crg226x4.mjs +2 -0
- package/dist/chunks/sessionFileAccessHooks-0.1.15-f3kpf3s7.mjs +1 -0
- package/dist/chunks/sessionStorage-0.1.15-x0gw4hbz.mjs +1 -0
- package/dist/chunks/setup-0.1.15-6znmc2q6.mjs +5 -0
- package/dist/chunks/sinks-0.1.15-npqf68gv.mjs +1 -0
- package/dist/chunks/skills-0.1.15-sybv0v2p.mjs +1 -0
- package/dist/chunks/startupProfiler-0.1.15-nwkwwtx6.mjs +1 -0
- package/dist/chunks/state-0.1.15-rr5k0vbf.mjs +1 -0
- package/dist/chunks/{stats-0.1.13-yrtt99gr.mjs → stats-0.1.15-3c4f5zp4.mjs} +1 -1
- package/dist/chunks/status-0.1.15-cvscafrs.mjs +1 -0
- package/dist/chunks/stickers-0.1.15-ee8ptkd4.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.1.15-330g0p7g.mjs +1 -0
- package/dist/chunks/tasks-0.1.15-a4y42df2.mjs +1 -0
- package/dist/chunks/teamHelpers-0.1.15-gw6hwmyj.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.1.15-t2czx776.mjs +1 -0
- package/dist/chunks/teleport-0.1.15-bg434zjk.mjs +1 -0
- package/dist/chunks/terminalSetup-0.1.15-ged9eavp.mjs +1 -0
- package/dist/chunks/theme-0.1.15-zq998m8x.mjs +1 -0
- package/dist/chunks/thinkback-0.1.15-g09k62ck.mjs +1 -0
- package/dist/chunks/thinkback-play-0.1.15-mn7j6mm2.mjs +1 -0
- package/dist/chunks/toolPool-0.1.15-wej7eaff.mjs +1 -0
- package/dist/chunks/toolSearch-0.1.15-v6zmdk1y.mjs +1 -0
- package/dist/chunks/trustedDevice-0.1.15-t9sax8yq.mjs +1 -0
- package/dist/chunks/{turndown.cjs-0.1.13-2wbn8j6y.mjs → turndown.cjs-0.1.15-pmxpe7z8.mjs} +1 -1
- package/dist/chunks/{ultrareviewCommand-0.1.13-sj6asgpk.mjs → ultrareviewCommand-0.1.15-3gjgaeyn.mjs} +1 -1
- package/dist/chunks/{update-0.1.13-sx7hc0kj.mjs → update-0.1.15-jtd1h3e7.mjs} +11 -11
- package/dist/chunks/upgrade-0.1.15-07pcdyyq.mjs +1 -0
- package/dist/chunks/{upstreamproxy-0.1.13-pwxv6kww.mjs → upstreamproxy-0.1.15-wtbs40ct.mjs} +1 -1
- package/dist/chunks/usage-0.1.15-ayne7pw6.mjs +1 -0
- package/dist/chunks/util-0.1.15-vs1eanbw.mjs +1 -0
- package/dist/chunks/utils-0.1.15-aq7vgwy1.mjs +1 -0
- package/dist/chunks/vim-0.1.15-syferjfa.mjs +1 -0
- package/dist/chunks/watcher-0.1.15-bh7ych8a.mjs +1 -0
- package/dist/chunks/{wiki-0.1.13-regg8ff2.mjs → wiki-0.1.15-pp951r9h.mjs} +1 -1
- package/dist/chunks/worktree-0.1.15-twyfdw3p.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.1.15-afv7sbw1.mjs +1 -0
- package/dist/chunks/{wrapper-0.1.13-8nsef109.mjs → wrapper-0.1.15-dw3awx2b.mjs} +1 -1
- package/dist/claudio-vscode.vsix +0 -0
- package/dist/cli.mjs +5 -5
- package/package.json +1 -1
- package/dist/chunks/AgentTool-0.1.13-yacqe6gs.mjs +0 -1
- package/dist/chunks/App-0.1.13-45tpe56w.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.1.13-rvk3ghpz.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.1.13-4qkeekab.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.1.13-wpjjxqtw.mjs +0 -1
- package/dist/chunks/ClaudeInChromeOnboarding-0.1.13-k8349mz5.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.13-jg36gq05.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.1.13-svk1vdbj.mjs +0 -1
- package/dist/chunks/Doctor-0.1.13-zktnx7ce.mjs +0 -1
- package/dist/chunks/Grove-0.1.13-1hnmb7jn.mjs +0 -1
- package/dist/chunks/ITermBackend-0.1.13-esbr21j4.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.1.13-7wr7g7vx.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.1.13-j8t2pnak.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.1.13-jd2k6vk6.mjs +0 -1
- package/dist/chunks/Onboarding-0.1.13-j8d7hwbe.mjs +0 -1
- package/dist/chunks/ProviderManager-0.1.13-qcfa4ppx.mjs +0 -1
- package/dist/chunks/REPL-0.1.13-zpcaf2zq.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.1.13-nwwjp69z.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.1.13-ssgexm6r.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.1.13-r95sr8bp.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.1.13-1qxft9es.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.1.13-jf14wbka.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.1.13-xzmz0wz4.mjs +0 -1
- package/dist/chunks/TrustDialog-0.1.13-pegd35qh.mjs +0 -1
- package/dist/chunks/activeProvider-0.1.13-n3mrppkb.mjs +0 -1
- package/dist/chunks/add-dir-0.1.13-3zm44vdy.mjs +0 -1
- package/dist/chunks/agents-0.1.13-a0aj4df9.mjs +0 -111
- package/dist/chunks/agents-0.1.13-phdd6357.mjs +0 -3
- package/dist/chunks/api-0.1.13-vmdan95h.mjs +0 -1
- package/dist/chunks/assistant-0.1.13-y9yer51w.mjs +0 -1
- package/dist/chunks/auth-0.1.13-gw7n7j0w.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.1.13-tagm38w5.mjs +0 -1
- package/dist/chunks/branch-0.1.13-hjmxvn3n.mjs +0 -4
- package/dist/chunks/btw-0.1.13-ggywf7w1.mjs +0 -1
- package/dist/chunks/cacache-0.1.13-sy5bqn6j.mjs +0 -1
- package/dist/chunks/caches-0.1.13-0swwryxr.mjs +0 -1
- package/dist/chunks/chrome-0.1.13-ztyyyz4s.mjs +0 -1
- package/dist/chunks/chromeNativeHost-0.1.13-96ex7t46.mjs +0 -2
- package/dist/chunks/claude-for-chrome-mcp-0.1.13-6hy7w25p.mjs +0 -1
- package/dist/chunks/claudemd-0.1.13-942nfe7r.mjs +0 -1
- package/dist/chunks/clear-0.1.13-zge2t5n9.mjs +0 -1
- package/dist/chunks/clearTerminal-0.1.13-b5v1edw2.mjs +0 -1
- package/dist/chunks/cli-0.1.13-0b728dvh.mjs +0 -2
- package/dist/chunks/cli-0.1.13-0gyt273r.mjs +0 -2
- package/dist/chunks/cli-0.1.13-1hw65avy.mjs +0 -2
- package/dist/chunks/cli-0.1.13-1y21vq1h.mjs +0 -2
- package/dist/chunks/cli-0.1.13-2sx61wcx.mjs +0 -2
- package/dist/chunks/cli-0.1.13-3rr4fg79.mjs +0 -2
- package/dist/chunks/cli-0.1.13-45hjhcbc.mjs +0 -2
- package/dist/chunks/cli-0.1.13-4prgqshq.mjs +0 -2
- package/dist/chunks/cli-0.1.13-52f40ba4.mjs +0 -2
- package/dist/chunks/cli-0.1.13-5b7hgn91.mjs +0 -2
- package/dist/chunks/cli-0.1.13-5d4ke9a2.mjs +0 -4
- package/dist/chunks/cli-0.1.13-5rnhv49w.mjs +0 -2
- package/dist/chunks/cli-0.1.13-5s4m8qj9.mjs +0 -100
- package/dist/chunks/cli-0.1.13-6q3wa261.mjs +0 -2
- package/dist/chunks/cli-0.1.13-73w3wbmf.mjs +0 -3
- package/dist/chunks/cli-0.1.13-73yztj5x.mjs +0 -10
- package/dist/chunks/cli-0.1.13-85w0nxy9.mjs +0 -2
- package/dist/chunks/cli-0.1.13-91b1h8ww.mjs +0 -2
- package/dist/chunks/cli-0.1.13-9a1hzdsv.mjs +0 -2
- package/dist/chunks/cli-0.1.13-bzgpcgdt.mjs +0 -16
- package/dist/chunks/cli-0.1.13-c5b4ygdq.mjs +0 -2
- package/dist/chunks/cli-0.1.13-crcgrfse.mjs +0 -2
- package/dist/chunks/cli-0.1.13-d66pryf3.mjs +0 -2
- package/dist/chunks/cli-0.1.13-dgw8xfv1.mjs +0 -2
- package/dist/chunks/cli-0.1.13-f6gfa426.mjs +0 -2
- package/dist/chunks/cli-0.1.13-ft5k86va.mjs +0 -2
- package/dist/chunks/cli-0.1.13-g2v4avcv.mjs +0 -2
- package/dist/chunks/cli-0.1.13-gtgqh4bn.mjs +0 -2
- package/dist/chunks/cli-0.1.13-h3vb5402.mjs +0 -2
- package/dist/chunks/cli-0.1.13-hzdj03rn.mjs +0 -2
- package/dist/chunks/cli-0.1.13-jakv6e7b.mjs +0 -2
- package/dist/chunks/cli-0.1.13-m5aaczvd.mjs +0 -2
- package/dist/chunks/cli-0.1.13-mywk7e49.mjs +0 -134
- package/dist/chunks/cli-0.1.13-n1tj5bdc.mjs +0 -2
- package/dist/chunks/cli-0.1.13-n31sw1c8.mjs +0 -2
- package/dist/chunks/cli-0.1.13-nc8ww3rn.mjs +0 -6
- package/dist/chunks/cli-0.1.13-p00rtvrc.mjs +0 -2
- package/dist/chunks/cli-0.1.13-p84ry3q5.mjs +0 -2
- package/dist/chunks/cli-0.1.13-q93vqpjh.mjs +0 -833
- package/dist/chunks/cli-0.1.13-qxtrzerx.mjs +0 -2
- package/dist/chunks/cli-0.1.13-r09724ac.mjs +0 -2
- package/dist/chunks/cli-0.1.13-sgxk7d0h.mjs +0 -2
- package/dist/chunks/cli-0.1.13-sr9axhrw.mjs +0 -2
- package/dist/chunks/cli-0.1.13-ss1k5gqk.mjs +0 -3
- package/dist/chunks/cli-0.1.13-ssgwnxc5.mjs +0 -4
- package/dist/chunks/cli-0.1.13-t1zx7s60.mjs +0 -2
- package/dist/chunks/cli-0.1.13-t34z5r3c.mjs +0 -2
- package/dist/chunks/cli-0.1.13-v1b9yhsy.mjs +0 -2
- package/dist/chunks/cli-0.1.13-v56n2wqm.mjs +0 -2
- package/dist/chunks/cli-0.1.13-vdz792pb.mjs +0 -2
- package/dist/chunks/cli-0.1.13-w08qr05m.mjs +0 -2
- package/dist/chunks/cli-0.1.13-wpsqhe6v.mjs +0 -4
- package/dist/chunks/cli-0.1.13-wr0c9hyh.mjs +0 -4
- package/dist/chunks/cli-0.1.13-x3zt8q8r.mjs +0 -2
- package/dist/chunks/cli-0.1.13-x4n4my99.mjs +0 -2
- package/dist/chunks/cli-0.1.13-xwkys72y.mjs +0 -12
- package/dist/chunks/cli-0.1.13-y3aj3amr.mjs +0 -4
- package/dist/chunks/cli-0.1.13-y3e5jkh7.mjs +0 -2
- package/dist/chunks/cli-0.1.13-yeb03vme.mjs +0 -2
- package/dist/chunks/cli-0.1.13-yhe2a0cx.mjs +0 -2
- package/dist/chunks/cli-0.1.13-yrvakyyp.mjs +0 -2
- package/dist/chunks/cli-0.1.13-z0jm6xd0.mjs +0 -2
- package/dist/chunks/cli-0.1.13-z387wpj9.mjs +0 -2
- package/dist/chunks/cli-0.1.13-zmft0mps.mjs +0 -2
- package/dist/chunks/client-0.1.13-mbp3h3fc.mjs +0 -1
- package/dist/chunks/color-0.1.13-p7kzn9d4.mjs +0 -1
- package/dist/chunks/compact-0.1.13-603r2t03.mjs +0 -3
- package/dist/chunks/config-0.1.13-fn4hrgp2.mjs +0 -1
- package/dist/chunks/config-0.1.13-q8fcew9w.mjs +0 -1
- package/dist/chunks/context-0.1.13-5fz212w3.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.1.13-fjn2461g.mjs +0 -1
- package/dist/chunks/conversation-0.1.13-zjqxzcfr.mjs +0 -1
- package/dist/chunks/cost-0.1.13-zch21h6x.mjs +0 -1
- package/dist/chunks/createSession-0.1.13-mh3jt0b0.mjs +0 -1
- package/dist/chunks/desktop-0.1.13-w51djw8z.mjs +0 -1
- package/dist/chunks/detectRepository-0.1.13-5tt2922a.mjs +0 -1
- package/dist/chunks/detection-0.1.13-k001d88v.mjs +0 -1
- package/dist/chunks/diff-0.1.13-vz7x7nm3.mjs +0 -1
- package/dist/chunks/doctor-0.1.13-egkgh28s.mjs +0 -1
- package/dist/chunks/earlyInput-0.1.13-tpq0qmw0.mjs +0 -1
- package/dist/chunks/effort-0.1.13-11mfjfnb.mjs +0 -8
- package/dist/chunks/environmentSelection-0.1.13-8fagqvgw.mjs +0 -1
- package/dist/chunks/environments-0.1.13-x1xw45es.mjs +0 -1
- package/dist/chunks/exit-0.1.13-3m34eg2x.mjs +0 -1
- package/dist/chunks/export-0.1.13-sq3jk66f.mjs +0 -2
- package/dist/chunks/extra-usage-0.1.13-dh2sxr12.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.1.13-7yfmamd2.mjs +0 -1
- package/dist/chunks/fast-0.1.13-w1sk95j2.mjs +0 -1
- package/dist/chunks/feedback-0.1.13-ewxaenqk.mjs +0 -14
- package/dist/chunks/git-0.1.13-2rp45xgd.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.1.13-e9c7cay9.mjs +0 -1
- package/dist/chunks/help-0.1.13-knrgw1dq.mjs +0 -1
- package/dist/chunks/hooks-0.1.13-1cp6zhk0.mjs +0 -1
- package/dist/chunks/image-processor-napi-0.1.13-h7fg935p.mjs +0 -1
- package/dist/chunks/index-0.1.13-0z5ns7r2.mjs +0 -1
- package/dist/chunks/index-0.1.13-1y9cm2x6.mjs +0 -1
- package/dist/chunks/index-0.1.13-7fm7tk25.mjs +0 -1
- package/dist/chunks/index-0.1.13-98j8cxkv.mjs +0 -1
- package/dist/chunks/index-0.1.13-h2mpm4c0.mjs +0 -1
- package/dist/chunks/index-0.1.13-h4wytk4z.mjs +0 -1
- package/dist/chunks/index-0.1.13-m9m61529.mjs +0 -1
- package/dist/chunks/index-0.1.13-qjt3h799.mjs +0 -1
- package/dist/chunks/initReplBridge-0.1.13-cd8avwfa.mjs +0 -1
- package/dist/chunks/ink-0.1.13-8ga6a1ny.mjs +0 -1
- package/dist/chunks/install-0.1.13-1bq7fwkd.mjs +0 -1
- package/dist/chunks/install-slack-app-0.1.13-2a6ydfjg.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.1.13-p29payqv.mjs +0 -1
- package/dist/chunks/keybindings-0.1.13-nr2he9m8.mjs +0 -2
- package/dist/chunks/knowledge-0.1.13-9a2md3fm.mjs +0 -2
- package/dist/chunks/loadAgentsDir-0.1.13-jmqfw7w4.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.1.13-qagn7gmw.mjs +0 -1
- package/dist/chunks/logout-0.1.13-d6ghx6h9.mjs +0 -1
- package/dist/chunks/lsp-0.1.13-q6xr2am5.mjs +0 -1
- package/dist/chunks/main-0.1.13-e5tbkphz.mjs +0 -1
- package/dist/chunks/managedEnv-0.1.13-n073hj5h.mjs +0 -1
- package/dist/chunks/mcp-0.1.13-0bw6qtwy.mjs +0 -4
- package/dist/chunks/mcp-0.1.13-1kaxfeey.mjs +0 -1
- package/dist/chunks/mcpServer-0.1.13-jf5dhyys.mjs +0 -1
- package/dist/chunks/mcpb-0.1.13-e55321kr.mjs +0 -1
- package/dist/chunks/memory-0.1.13-qwtbe97v.mjs +0 -3
- package/dist/chunks/model-0.1.13-a42465ep.mjs +0 -1
- package/dist/chunks/model-0.1.13-mqqrpy8m.mjs +0 -2
- package/dist/chunks/package-WSP46L7M-0.1.13-sme2jxpt.mjs +0 -1
- package/dist/chunks/parser-0.1.13-mm8j9rwt.mjs +0 -1
- package/dist/chunks/passes-0.1.13-bcbvjdzs.mjs +0 -1
- package/dist/chunks/permissions-0.1.13-c03934ka.mjs +0 -3
- package/dist/chunks/plan-0.1.13-fgs4vbwk.mjs +0 -1
- package/dist/chunks/plist-0.1.13-f3bfg2tf.mjs +0 -1
- package/dist/chunks/plugin-0.1.13-p5aqty2y.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.1.13-f8tcmc9s.mjs +0 -1
- package/dist/chunks/privacy-settings-0.1.13-xkaezd0n.mjs +0 -1
- package/dist/chunks/processBashCommand-0.1.13-x4ggp1t8.mjs +0 -1
- package/dist/chunks/prompt-0.1.13-j0tnske2.mjs +0 -1
- package/dist/chunks/prompt-0.1.13-mdxfbbqp.mjs +0 -1
- package/dist/chunks/prompts-0.1.13-gtp7vnge.mjs +0 -1
- package/dist/chunks/provider-0.1.13-e9ayet7n.mjs +0 -2
- package/dist/chunks/providerProfiles-0.1.13-y9gs55qq.mjs +0 -1
- package/dist/chunks/rate-limit-options-0.1.13-va0322ws.mjs +0 -1
- package/dist/chunks/registry-0.1.13-e33aasxk.mjs +0 -1
- package/dist/chunks/release-notes-0.1.13-jmkp5g6h.mjs +0 -5
- package/dist/chunks/reload-plugins-0.1.13-0p5x4cr9.mjs +0 -2
- package/dist/chunks/remote-env-0.1.13-d7evw9tc.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.1.13-sq5rr5x0.mjs +0 -1
- package/dist/chunks/remoteSession-0.1.13-zjhajyna.mjs +0 -1
- package/dist/chunks/rename-0.1.13-t30c4tx9.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.1.13-38jvakp0.mjs +0 -1
- package/dist/chunks/resume-0.1.13-ta7t0vbz.mjs +0 -2
- package/dist/chunks/sandbox-adapter-0.1.13-x04v4bxn.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.1.13-w0p8r4ta.mjs +0 -1
- package/dist/chunks/session-0.1.13-cjn060z1.mjs +0 -2
- package/dist/chunks/sessionFileAccessHooks-0.1.13-mr3y5jpc.mjs +0 -1
- package/dist/chunks/sessionStorage-0.1.13-8gahjm86.mjs +0 -1
- package/dist/chunks/setup-0.1.13-ap9dpanw.mjs +0 -5
- package/dist/chunks/sinks-0.1.13-r13nv1fw.mjs +0 -1
- package/dist/chunks/skills-0.1.13-jd5g0cex.mjs +0 -1
- package/dist/chunks/startupProfiler-0.1.13-d4g7sykt.mjs +0 -1
- package/dist/chunks/state-0.1.13-cv8jd04r.mjs +0 -1
- package/dist/chunks/status-0.1.13-4x7h3dec.mjs +0 -1
- package/dist/chunks/stickers-0.1.13-8szx17mh.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.1.13-9asfa8pp.mjs +0 -1
- package/dist/chunks/tasks-0.1.13-dsy415kp.mjs +0 -1
- package/dist/chunks/teamHelpers-0.1.13-z4fpbggy.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.1.13-cc6scthx.mjs +0 -1
- package/dist/chunks/teleport-0.1.13-gx6zbjr3.mjs +0 -1
- package/dist/chunks/terminalSetup-0.1.13-wmg8wa4f.mjs +0 -1
- package/dist/chunks/theme-0.1.13-m8mdm37k.mjs +0 -1
- package/dist/chunks/thinkback-0.1.13-4jwhbbcv.mjs +0 -1
- package/dist/chunks/thinkback-play-0.1.13-0vz0yjza.mjs +0 -1
- package/dist/chunks/toolPool-0.1.13-z741g6f2.mjs +0 -1
- package/dist/chunks/toolSearch-0.1.13-jaadtdmb.mjs +0 -1
- package/dist/chunks/trustedDevice-0.1.13-w279yc46.mjs +0 -1
- package/dist/chunks/upgrade-0.1.13-dce1xd29.mjs +0 -1
- package/dist/chunks/usage-0.1.13-mr2bn5g6.mjs +0 -1
- package/dist/chunks/util-0.1.13-ef9r7w41.mjs +0 -1
- package/dist/chunks/utils-0.1.13-03dvz81t.mjs +0 -1
- package/dist/chunks/vim-0.1.13-3x0ehdme.mjs +0 -1
- package/dist/chunks/watcher-0.1.13-yzxxvgz3.mjs +0 -1
- package/dist/chunks/worktree-0.1.13-kdhzfvjx.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.1.13-d4t06wcm.mjs +0 -1
- /package/dist/chunks/{cli-0.1.13-gs7rcvne.mjs → cli-0.1.15-p6bypqrv.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ona as V_,Pna as su,Rna as K_,Sna as f_}from"./cli-0.1.13-tknwgkgp.mjs";import{Vna as H,Yna as $_}from"./cli-0.1.13-bj67mp7n.mjs";var W_=H((k_)=>{var z_=$_("node:stream"),v=V_(),K=f_(),q=K_(),m=(_)=>_?.body instanceof z_.Readable||typeof ReadableStream<"u"&&_?.body instanceof ReadableStream,G_=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],J_=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],X_=["TimeoutError","RequestTimeout","RequestTimeoutException"],C_=[500,502,503,504],d_=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Z_=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],A=(_)=>_?.$retryable!==void 0,p=(_)=>G_.includes(_.name),y=(_)=>_.$metadata?.clockSkewCorrected,s=(_)=>{let u=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(_&&_ instanceof TypeError))return!1;return u.has(_.message)},J=(_)=>_.$metadata?.httpStatusCode===429||J_.includes(_.name)||_.$retryable?.throttling==!0,X=(_,u=0)=>A(_)||y(_)||_.name==="InvalidSignatureException"&&_.message?.includes("Signature expired")||X_.includes(_.name)||d_.includes(_?.code||"")||Z_.includes(_?.code||"")||C_.includes(_.$metadata?.httpStatusCode||0)||s(_)||o(_)||_.cause!==void 0&&u<=10&&X(_.cause,u+1),a=(_)=>{if(_.$metadata?.httpStatusCode!==void 0){let u=_.$metadata.httpStatusCode;if(500<=u&&u<=599&&!X(_))return!0;return!1}return!1};function o(_){return _.code==="ERR_HTTP2_STREAM_ERROR"&&_.message.includes("NGHTTP2_REFUSED_STREAM")}var e=100,Q=20000,t=500,Z=500,r=5,__=10,g=1,c="amz-sdk-invocation-id",w="amz-sdk-request";function u_(_,u){if(!K.HttpResponse.isInstance(_))return;for(let E of Object.keys(_.headers)){let O=E.toLowerCase();if(O==="retry-after"){let T=_.headers[E],b=NaN;if(T.endsWith("GMT"))try{b=(q.parseRfc7231DateTime(T).getTime()-Date.now())/1000}catch(L){u?.trace?.("Failed to parse retry-after header"),u?.trace?.(L)}else if(T.match(/ GMT, ((\d+)|(\d+\.\d+))$/))b=Number(T.match(/ GMT, ([\d.]+)$/)?.[1]);else if(T.match(/^((\d+)|(\d+\.\d+))$/))b=Number(T);else if(Date.parse(T)>=Date.now())b=(Date.parse(T)-Date.now())/1000;if(isNaN(b))return;return new Date(Date.now()+b*1000)}else if(O==="x-amz-retry-after"){let T=_.headers[E],b=Number(T);if(isNaN(b)){u?.trace?.(`Failed to parse x-amz-retry-after=${T}`);return}return new Date(Date.now()+b)}}}function H_(_,u){return u_(_,u)}var E_=(_)=>{if(_ instanceof Error)return _;if(_ instanceof Object)return Object.assign(Error(),_);if(typeof _==="string")return Error(_);return Error(`AWS SDK error wrapper for ${_}`)};function O_(_){return(u)=>(E,O)=>async(T)=>{let b=await u.retryStrategy(),L=await u.maxAttempts();if(Q_(b)){b=b;let N=await b.acquireInitialRetryToken((O.partition_id??"")+(O.__retryLongPoll?":longpoll":"")),j=Error(),Y=0,F=0,{request:I}=T,R=K.HttpRequest.isInstance(I);if(R)I.headers[c]=q.v4();while(!0)try{if(R)I.headers[w]=`attempt=${Y+1}; max=${L}`;let{response:V,output:z}=await E(T);return b.recordSuccess(N),z.$metadata.attempts=Y+1,z.$metadata.totalRetryDelay=F,{response:V,output:z}}catch(V){let z=c_(V,u.logger);if(j=E_(V),R&&_(I))throw(O.logger instanceof v.NoOpLogger?console:O.logger)?.warn("An error was encountered in a non-retryable streaming request."),j;try{N=await b.refreshRetryTokenForRetry(N,z)}catch(x){if(typeof x.$backoff==="number")await l(x.$backoff);if(!j.$metadata)j.$metadata={};throw j.$metadata.attempts=Y+1,j.$metadata.totalRetryDelay=F,j}Y=N.getRetryCount();let k=N.getRetryDelay();F+=k,await l(k)}}else{if(b=b,b?.mode)O.userAgent=[...O.userAgent||[],["cfg/retry-mode",b.mode]];return b.retry(E,T)}}}var l=(_)=>new Promise((u)=>setTimeout(u,_)),Q_=(_)=>typeof _.acquireInitialRetryToken<"u"&&typeof _.refreshRetryTokenForRetry<"u"&&typeof _.recordSuccess<"u",c_=(_,u)=>{let E={error:_,errorType:w_(_)},O=u_(_.$response,u);if(O)E.retryAfterHint=O;return E},w_=(_)=>{if(J(_))return"THROTTLING";if(X(_))return"TRANSIENT";if(a(_))return"SERVER_ERROR";return"CLIENT_ERROR"},b_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function B_(_){let u=O_(_);return(E)=>({applyToStack:(O)=>{O.add(u(E),b_)}})}class C{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(_){this.beta=_?.beta??0.7,this.minCapacity=_?.minCapacity??1,this.minFillRate=_?.minFillRate??0.5,this.scaleConstant=_?.scaleConstant??0.4,this.smooth=_?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(_){let u;this.updateMeasuredRate();let E=_;if(E?.errorType==="THROTTLING"||J(E?.error??_)){let b=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=b,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),u=this.cubicThrottle(b),this.enableTokenBucket()}else this.calculateTimeWindow(),u=this.cubicSuccess(this.getCurrentTimeInSeconds());let T=Math.min(u,2*this.measuredTxRate);this.updateTokenBucketRate(T)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(_){if(!this.enabled)return;this.refillTokenBucket();while(_>this.availableTokens){let u=(_-this.availableTokens)/this.fillRate*1000;await new Promise((E)=>C.setTimeoutFn(E,u)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-_}refillTokenBucket(){let _=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=_;return}let u=(_-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+u),this.lastTimestamp=_}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(_){return this.getPrecise(_*this.beta)}cubicSuccess(_){return this.getPrecise(this.scaleConstant*Math.pow(_-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(_){this.refillTokenBucket(),this.fillRate=Math.max(_,this.minFillRate),this.maxCapacity=Math.max(_,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let _=this.getCurrentTimeInSeconds(),u=Math.floor(_*2)/2;if(this.requestCount++,u>this.lastTxRateBucket){let E=this.requestCount/(u-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(E*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=u}}getPrecise(_){return parseFloat(_.toFixed(8))}}class M{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return M.v2026?50:100}static throttlingDelay(){return M.v2026?1000:500}static cost(){return M.v2026?14:5}static throttlingCost(){return M.v2026?5:10}static modifiedCostType(){return M.v2026?"THROTTLING":"TRANSIENT"}}class T_{x=M.delay();computeNextBackoffDelay(_){let u=Math.random(),E=2,O=u*Math.min(this.x*2**_,Q);return Math.floor(O)}setDelayBase(_){this.x=_}}class h{delay;count;cost;longPoll;constructor(_,u,E,O){this.delay=_,this.count=u,this.cost=E,this.longPoll=O}getRetryCount(){return this.count}getRetryDelay(){return Math.min(Q,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}k_.RETRY_MODES=void 0;(function(_){_.STANDARD="standard",_.ADAPTIVE="adaptive"})(k_.RETRY_MODES||(k_.RETRY_MODES={}));var $=3,Y_=k_.RETRY_MODES.STANDARD,d={incompatible:1,attempts:2,capacity:3},G=class{mode=k_.RETRY_MODES.STANDARD;capacity=Z;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(u){if(typeof u==="number")this.maxAttemptsProvider=async()=>u;else if(typeof u==="function")this.maxAttemptsProvider=u;else if(u&&typeof u==="object")this.maxAttemptsProvider=async()=>u.maxAttempts,this.baseDelay=u.baseDelay,this.retryBackoffStrategy=u.backoff;this.maxAttemptsProvider??=async()=>$,this.baseDelay??=M.delay(),this.retryBackoffStrategy??=new T_}async acquireInitialRetryToken(u){return new h(M.delay(),0,void 0,M.v2026&&u.includes(":longpoll"))}async refreshRetryTokenForRetry(u,E){let O=await this.getMaxAttempts(),T=this.retryCode(u,E,O),b=T===0,L=u.isLongPoll?.();if(b||L){let N=E.errorType;this.retryBackoffStrategy.setDelayBase(N==="THROTTLING"?M.throttlingDelay():this.baseDelay);let j=this.retryBackoffStrategy.computeNextBackoffDelay(u.getRetryCount()),Y=j;if(E.retryAfterHint instanceof Date)Y=Math.max(j,Math.min(E.retryAfterHint.getTime()-Date.now(),j+5000));if(!b)throw Object.assign(Error("No retry token available"),{$backoff:M.v2026&&T===d.capacity&&L?Y:0});else{let F=this.getCapacityCost(N);return this.capacity-=F,new h(Y,u.getRetryCount()+1,F,u.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(u){this.capacity=Math.min(Z,this.capacity+(u.getRetryCost()??g))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(u){return console.warn(`Max attempts provider could not resolve. Using default of ${$}`),$}}retryCode(u,E,O){let T=u.getRetryCount()+1,b=this.isRetryableError(E.errorType)?0:d.incompatible,L=T<O?0:d.attempts,N=this.capacity>=this.getCapacityCost(E.errorType)?0:d.capacity;return b||L||N}getCapacityCost(u){return u===M.modifiedCostType()?M.throttlingCost():M.cost()}isRetryableError(u){return u==="THROTTLING"||u==="TRANSIENT"}},j_=class{mode=k_.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(u,E){let{rateLimiter:O}=E??{};this.rateLimiter=O??new C,this.standardRetryStrategy=E?new G({maxAttempts:typeof u==="number"?u:3,...E}):new G(u)}async acquireInitialRetryToken(u){let E=await this.standardRetryStrategy.acquireInitialRetryToken(u);return await this.rateLimiter.getSendToken(),E}async refreshRetryTokenForRetry(u,E){this.rateLimiter.updateClientSendingRate(E);let O=await this.standardRetryStrategy.refreshRetryTokenForRetry(u,E);return await this.rateLimiter.getSendToken(),O}recordSuccess(u){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(u)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}};class P_ extends G{computeNextBackoffDelay;constructor(_,u=M.delay()){super(typeof _==="function"?_:async()=>_);if(typeof u==="number")this.computeNextBackoffDelay=()=>u;else this.computeNextBackoffDelay=u}async refreshRetryTokenForRetry(_,u){let E=await super.refreshRetryTokenForRetry(_,u);return E.getRetryDelay=()=>this.computeNextBackoffDelay(E.getRetryCount()),E}}var v_=(_,u)=>{let E=_,O=g,T=r,b=__,L=_,N=(I)=>I.name==="TimeoutError"?b:T,j=(I)=>N(I)<=L;return Object.freeze({hasRetryTokens:j,retrieveRetryTokens:(I)=>{if(!j(I))throw Error("No retry token available");let R=N(I);return L-=R,R},releaseRetryTokens:(I)=>{L+=I??O,L=Math.min(L,E)}})},L_=(_,u)=>Math.floor(Math.min(Q,Math.random()*2**u*_)),N_=(_)=>{if(!_)return!1;return A(_)||p(_)||J(_)||X(_)};class n{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=k_.RETRY_MODES.STANDARD;constructor(_,u){this.maxAttemptsProvider=_,this.retryDecider=u?.retryDecider??N_,this.delayDecider=u?.delayDecider??L_,this.retryQuota=u?.retryQuota??v_(Z)}shouldRetry(_,u,E){return u<E&&this.retryDecider(_)&&this.retryQuota.hasRetryTokens(_)}async getMaxAttempts(){let _;try{_=await this.maxAttemptsProvider()}catch(u){_=$}return _}async retry(_,u,E){let O,T=0,b=0,L=await this.getMaxAttempts(),{request:N}=u;if(K.HttpRequest.isInstance(N))N.headers[c]=q.v4();while(!0)try{if(K.HttpRequest.isInstance(N))N.headers[w]=`attempt=${T+1}; max=${L}`;if(E?.beforeRequest)await E.beforeRequest();let{response:j,output:Y}=await _(u);if(E?.afterRequest)E.afterRequest(j);return this.retryQuota.releaseRetryTokens(O),Y.$metadata.attempts=T+1,Y.$metadata.totalRetryDelay=b,{response:j,output:Y}}catch(j){let Y=E_(j);if(T++,this.shouldRetry(Y,T,L)){O=this.retryQuota.retrieveRetryTokens(Y);let F=this.delayDecider(J(Y)?t:e,T),I=h_(Y.$response),R=Math.max(I||0,F);b+=R,await new Promise((V)=>setTimeout(V,R));continue}if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=T,Y.$metadata.totalRetryDelay=b,Y}}}var h_=(_)=>{if(!K.HttpResponse.isInstance(_))return;let u=Object.keys(_.headers).find((b)=>b.toLowerCase()==="retry-after");if(!u)return;let E=_.headers[u],O=Number(E);if(!Number.isNaN(O))return O*1000;return new Date(E).getTime()-Date.now()};class M_ extends n{rateLimiter;constructor(_,u){let{rateLimiter:E,...O}=u??{};super(_,O);this.rateLimiter=E??new C,this.mode=k_.RETRY_MODES.ADAPTIVE}async retry(_,u){return super.retry(_,u,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(E)=>{this.rateLimiter.updateClientSendingRate(E)}})}}var S="AWS_MAX_ATTEMPTS",i="max_attempts",S_={environmentVariableSelector:(_)=>{let u=_[S];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Environment variable ${S} mast be a number, got "${u}"`);return E},configFileSelector:(_)=>{let u=_[i];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Shared config file entry ${i} mast be a number, got "${u}"`);return E},default:$},i_=(_)=>{let{retryStrategy:u,retryMode:E}=_,O=v.normalizeProvider(_.maxAttempts??$),T=u?Promise.resolve(u):void 0,b=async()=>await v.normalizeProvider(E)()===k_.RETRY_MODES.ADAPTIVE?new j_(O):new G(O);return Object.assign(_,{maxAttempts:O,retryStrategy:()=>T??=b()})},U_="AWS_RETRY_MODE",I_="retry_mode",q_={environmentVariableSelector:(_)=>_[U_],configFileSelector:(_)=>_[I_],default:Y_},F_=()=>(_)=>async(u)=>{let{request:E}=u;if(K.HttpRequest.isInstance(E))delete E.headers[c],delete E.headers[w];return _(u)},R_={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},A_=(_)=>({applyToStack:(u)=>{u.addRelativeTo(F_(),R_)}}),g_=O_(m),n_=B_(m);k_.AdaptiveRetryStrategy=j_;k_.CONFIG_MAX_ATTEMPTS=i;k_.CONFIG_RETRY_MODE=I_;k_.ConfiguredRetryStrategy=P_;k_.DEFAULT_MAX_ATTEMPTS=$;k_.DEFAULT_RETRY_DELAY_BASE=e;k_.DEFAULT_RETRY_MODE=Y_;k_.DefaultRateLimiter=C;k_.DeprecatedAdaptiveRetryStrategy=M_;k_.DeprecatedStandardRetryStrategy=n;k_.ENV_MAX_ATTEMPTS=S;k_.ENV_RETRY_MODE=U_;k_.INITIAL_RETRY_TOKENS=Z;k_.INVOCATION_ID_HEADER=c;k_.MAXIMUM_RETRY_DELAY=Q;k_.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=S_;k_.NODE_RETRY_MODE_CONFIG_OPTIONS=q_;k_.NO_RETRY_INCREMENT=g;k_.REQUEST_HEADER=w;k_.RETRY_COST=r;k_.Retry=M;k_.StandardRetryStrategy=G;k_.THROTTLING_RETRY_DELAY_BASE=t;k_.TIMEOUT_RETRY_COST=__;k_.defaultDelayDecider=L_;k_.defaultRetryDecider=N_;k_.getOmitRetryHeadersPlugin=A_;k_.getRetryAfterHint=H_;k_.getRetryPlugin=n_;k_.isBrowserNetworkError=s;k_.isClockSkewCorrectedError=y;k_.isClockSkewError=p;k_.isNodeJsHttp2TransientError=o;k_.isRetryableByTrait=A;k_.isServerError=a;k_.isThrottlingError=J;k_.isTransientError=X;k_.omitRetryHeadersMiddleware=F_;k_.omitRetryHeadersMiddlewareOptions=R_;k_.resolveRetryConfig=i_;k_.retryMiddleware=g_;k_.retryMiddlewareOptions=b_});var D_=H((P)=>{Object.defineProperty(P,"__esModule",{value:!0});P.TIMEOUT_RETRY_COST=P.THROTTLING_RETRY_DELAY_BASE=P.Retry=P.RETRY_MODES=P.RETRY_COST=P.NO_RETRY_INCREMENT=P.REQUEST_HEADER=P.MAXIMUM_RETRY_DELAY=P.INVOCATION_ID_HEADER=P.INITIAL_RETRY_TOKENS=P.DEFAULT_RETRY_MODE=P.DEFAULT_RETRY_DELAY_BASE=P.DEFAULT_MAX_ATTEMPTS=P.StandardRetryStrategy=P.DefaultRateLimiter=P.ConfiguredRetryStrategy=P.AdaptiveRetryStrategy=void 0;var U=W_();Object.defineProperty(P,"AdaptiveRetryStrategy",{enumerable:!0,get:function(){return U.AdaptiveRetryStrategy}});Object.defineProperty(P,"ConfiguredRetryStrategy",{enumerable:!0,get:function(){return U.ConfiguredRetryStrategy}});Object.defineProperty(P,"DefaultRateLimiter",{enumerable:!0,get:function(){return U.DefaultRateLimiter}});Object.defineProperty(P,"StandardRetryStrategy",{enumerable:!0,get:function(){return U.StandardRetryStrategy}});Object.defineProperty(P,"DEFAULT_MAX_ATTEMPTS",{enumerable:!0,get:function(){return U.DEFAULT_MAX_ATTEMPTS}});Object.defineProperty(P,"DEFAULT_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_DELAY_BASE}});Object.defineProperty(P,"DEFAULT_RETRY_MODE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_MODE}});Object.defineProperty(P,"INITIAL_RETRY_TOKENS",{enumerable:!0,get:function(){return U.INITIAL_RETRY_TOKENS}});Object.defineProperty(P,"INVOCATION_ID_HEADER",{enumerable:!0,get:function(){return U.INVOCATION_ID_HEADER}});Object.defineProperty(P,"MAXIMUM_RETRY_DELAY",{enumerable:!0,get:function(){return U.MAXIMUM_RETRY_DELAY}});Object.defineProperty(P,"REQUEST_HEADER",{enumerable:!0,get:function(){return U.REQUEST_HEADER}});Object.defineProperty(P,"NO_RETRY_INCREMENT",{enumerable:!0,get:function(){return U.NO_RETRY_INCREMENT}});Object.defineProperty(P,"RETRY_COST",{enumerable:!0,get:function(){return U.RETRY_COST}});Object.defineProperty(P,"RETRY_MODES",{enumerable:!0,get:function(){return U.RETRY_MODES}});Object.defineProperty(P,"Retry",{enumerable:!0,get:function(){return U.Retry}});Object.defineProperty(P,"THROTTLING_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.THROTTLING_RETRY_DELAY_BASE}});Object.defineProperty(P,"TIMEOUT_RETRY_COST",{enumerable:!0,get:function(){return U.TIMEOUT_RETRY_COST}})});var yu=H((gu)=>{var wu=D_(),B={warningEmitted:!1},Bu=(_)=>{if(_&&!B.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){B.warningEmitted=!0;return}let u=parseInt(_.substring(1,_.indexOf("."))),E=22;if(u<E)B.warningEmitted=!0,process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
|
|
1
|
+
import{Ula as V_,Vla as su,Xla as K_,Yla as f_}from"./cli-0.1.15-acdm8b28.mjs";import{$la as H,cma as $_}from"./cli-0.1.15-mhbfhhf6.mjs";var W_=H((k_)=>{var z_=$_("node:stream"),v=V_(),K=f_(),q=K_(),m=(_)=>_?.body instanceof z_.Readable||typeof ReadableStream<"u"&&_?.body instanceof ReadableStream,G_=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],J_=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],X_=["TimeoutError","RequestTimeout","RequestTimeoutException"],C_=[500,502,503,504],d_=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Z_=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],A=(_)=>_?.$retryable!==void 0,p=(_)=>G_.includes(_.name),y=(_)=>_.$metadata?.clockSkewCorrected,s=(_)=>{let u=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(_&&_ instanceof TypeError))return!1;return u.has(_.message)},J=(_)=>_.$metadata?.httpStatusCode===429||J_.includes(_.name)||_.$retryable?.throttling==!0,X=(_,u=0)=>A(_)||y(_)||_.name==="InvalidSignatureException"&&_.message?.includes("Signature expired")||X_.includes(_.name)||d_.includes(_?.code||"")||Z_.includes(_?.code||"")||C_.includes(_.$metadata?.httpStatusCode||0)||s(_)||o(_)||_.cause!==void 0&&u<=10&&X(_.cause,u+1),a=(_)=>{if(_.$metadata?.httpStatusCode!==void 0){let u=_.$metadata.httpStatusCode;if(500<=u&&u<=599&&!X(_))return!0;return!1}return!1};function o(_){return _.code==="ERR_HTTP2_STREAM_ERROR"&&_.message.includes("NGHTTP2_REFUSED_STREAM")}var e=100,Q=20000,t=500,Z=500,r=5,__=10,g=1,c="amz-sdk-invocation-id",w="amz-sdk-request";function u_(_,u){if(!K.HttpResponse.isInstance(_))return;for(let E of Object.keys(_.headers)){let O=E.toLowerCase();if(O==="retry-after"){let T=_.headers[E],b=NaN;if(T.endsWith("GMT"))try{b=(q.parseRfc7231DateTime(T).getTime()-Date.now())/1000}catch(L){u?.trace?.("Failed to parse retry-after header"),u?.trace?.(L)}else if(T.match(/ GMT, ((\d+)|(\d+\.\d+))$/))b=Number(T.match(/ GMT, ([\d.]+)$/)?.[1]);else if(T.match(/^((\d+)|(\d+\.\d+))$/))b=Number(T);else if(Date.parse(T)>=Date.now())b=(Date.parse(T)-Date.now())/1000;if(isNaN(b))return;return new Date(Date.now()+b*1000)}else if(O==="x-amz-retry-after"){let T=_.headers[E],b=Number(T);if(isNaN(b)){u?.trace?.(`Failed to parse x-amz-retry-after=${T}`);return}return new Date(Date.now()+b)}}}function H_(_,u){return u_(_,u)}var E_=(_)=>{if(_ instanceof Error)return _;if(_ instanceof Object)return Object.assign(Error(),_);if(typeof _==="string")return Error(_);return Error(`AWS SDK error wrapper for ${_}`)};function O_(_){return(u)=>(E,O)=>async(T)=>{let b=await u.retryStrategy(),L=await u.maxAttempts();if(Q_(b)){b=b;let N=await b.acquireInitialRetryToken((O.partition_id??"")+(O.__retryLongPoll?":longpoll":"")),j=Error(),Y=0,F=0,{request:I}=T,R=K.HttpRequest.isInstance(I);if(R)I.headers[c]=q.v4();while(!0)try{if(R)I.headers[w]=`attempt=${Y+1}; max=${L}`;let{response:V,output:z}=await E(T);return b.recordSuccess(N),z.$metadata.attempts=Y+1,z.$metadata.totalRetryDelay=F,{response:V,output:z}}catch(V){let z=c_(V,u.logger);if(j=E_(V),R&&_(I))throw(O.logger instanceof v.NoOpLogger?console:O.logger)?.warn("An error was encountered in a non-retryable streaming request."),j;try{N=await b.refreshRetryTokenForRetry(N,z)}catch(x){if(typeof x.$backoff==="number")await l(x.$backoff);if(!j.$metadata)j.$metadata={};throw j.$metadata.attempts=Y+1,j.$metadata.totalRetryDelay=F,j}Y=N.getRetryCount();let k=N.getRetryDelay();F+=k,await l(k)}}else{if(b=b,b?.mode)O.userAgent=[...O.userAgent||[],["cfg/retry-mode",b.mode]];return b.retry(E,T)}}}var l=(_)=>new Promise((u)=>setTimeout(u,_)),Q_=(_)=>typeof _.acquireInitialRetryToken<"u"&&typeof _.refreshRetryTokenForRetry<"u"&&typeof _.recordSuccess<"u",c_=(_,u)=>{let E={error:_,errorType:w_(_)},O=u_(_.$response,u);if(O)E.retryAfterHint=O;return E},w_=(_)=>{if(J(_))return"THROTTLING";if(X(_))return"TRANSIENT";if(a(_))return"SERVER_ERROR";return"CLIENT_ERROR"},b_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function B_(_){let u=O_(_);return(E)=>({applyToStack:(O)=>{O.add(u(E),b_)}})}class C{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(_){this.beta=_?.beta??0.7,this.minCapacity=_?.minCapacity??1,this.minFillRate=_?.minFillRate??0.5,this.scaleConstant=_?.scaleConstant??0.4,this.smooth=_?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(_){let u;this.updateMeasuredRate();let E=_;if(E?.errorType==="THROTTLING"||J(E?.error??_)){let b=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=b,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),u=this.cubicThrottle(b),this.enableTokenBucket()}else this.calculateTimeWindow(),u=this.cubicSuccess(this.getCurrentTimeInSeconds());let T=Math.min(u,2*this.measuredTxRate);this.updateTokenBucketRate(T)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(_){if(!this.enabled)return;this.refillTokenBucket();while(_>this.availableTokens){let u=(_-this.availableTokens)/this.fillRate*1000;await new Promise((E)=>C.setTimeoutFn(E,u)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-_}refillTokenBucket(){let _=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=_;return}let u=(_-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+u),this.lastTimestamp=_}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(_){return this.getPrecise(_*this.beta)}cubicSuccess(_){return this.getPrecise(this.scaleConstant*Math.pow(_-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(_){this.refillTokenBucket(),this.fillRate=Math.max(_,this.minFillRate),this.maxCapacity=Math.max(_,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let _=this.getCurrentTimeInSeconds(),u=Math.floor(_*2)/2;if(this.requestCount++,u>this.lastTxRateBucket){let E=this.requestCount/(u-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(E*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=u}}getPrecise(_){return parseFloat(_.toFixed(8))}}class M{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return M.v2026?50:100}static throttlingDelay(){return M.v2026?1000:500}static cost(){return M.v2026?14:5}static throttlingCost(){return M.v2026?5:10}static modifiedCostType(){return M.v2026?"THROTTLING":"TRANSIENT"}}class T_{x=M.delay();computeNextBackoffDelay(_){let u=Math.random(),E=2,O=u*Math.min(this.x*2**_,Q);return Math.floor(O)}setDelayBase(_){this.x=_}}class h{delay;count;cost;longPoll;constructor(_,u,E,O){this.delay=_,this.count=u,this.cost=E,this.longPoll=O}getRetryCount(){return this.count}getRetryDelay(){return Math.min(Q,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}k_.RETRY_MODES=void 0;(function(_){_.STANDARD="standard",_.ADAPTIVE="adaptive"})(k_.RETRY_MODES||(k_.RETRY_MODES={}));var $=3,Y_=k_.RETRY_MODES.STANDARD,d={incompatible:1,attempts:2,capacity:3},G=class{mode=k_.RETRY_MODES.STANDARD;capacity=Z;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(u){if(typeof u==="number")this.maxAttemptsProvider=async()=>u;else if(typeof u==="function")this.maxAttemptsProvider=u;else if(u&&typeof u==="object")this.maxAttemptsProvider=async()=>u.maxAttempts,this.baseDelay=u.baseDelay,this.retryBackoffStrategy=u.backoff;this.maxAttemptsProvider??=async()=>$,this.baseDelay??=M.delay(),this.retryBackoffStrategy??=new T_}async acquireInitialRetryToken(u){return new h(M.delay(),0,void 0,M.v2026&&u.includes(":longpoll"))}async refreshRetryTokenForRetry(u,E){let O=await this.getMaxAttempts(),T=this.retryCode(u,E,O),b=T===0,L=u.isLongPoll?.();if(b||L){let N=E.errorType;this.retryBackoffStrategy.setDelayBase(N==="THROTTLING"?M.throttlingDelay():this.baseDelay);let j=this.retryBackoffStrategy.computeNextBackoffDelay(u.getRetryCount()),Y=j;if(E.retryAfterHint instanceof Date)Y=Math.max(j,Math.min(E.retryAfterHint.getTime()-Date.now(),j+5000));if(!b)throw Object.assign(Error("No retry token available"),{$backoff:M.v2026&&T===d.capacity&&L?Y:0});else{let F=this.getCapacityCost(N);return this.capacity-=F,new h(Y,u.getRetryCount()+1,F,u.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(u){this.capacity=Math.min(Z,this.capacity+(u.getRetryCost()??g))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(u){return console.warn(`Max attempts provider could not resolve. Using default of ${$}`),$}}retryCode(u,E,O){let T=u.getRetryCount()+1,b=this.isRetryableError(E.errorType)?0:d.incompatible,L=T<O?0:d.attempts,N=this.capacity>=this.getCapacityCost(E.errorType)?0:d.capacity;return b||L||N}getCapacityCost(u){return u===M.modifiedCostType()?M.throttlingCost():M.cost()}isRetryableError(u){return u==="THROTTLING"||u==="TRANSIENT"}},j_=class{mode=k_.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(u,E){let{rateLimiter:O}=E??{};this.rateLimiter=O??new C,this.standardRetryStrategy=E?new G({maxAttempts:typeof u==="number"?u:3,...E}):new G(u)}async acquireInitialRetryToken(u){let E=await this.standardRetryStrategy.acquireInitialRetryToken(u);return await this.rateLimiter.getSendToken(),E}async refreshRetryTokenForRetry(u,E){this.rateLimiter.updateClientSendingRate(E);let O=await this.standardRetryStrategy.refreshRetryTokenForRetry(u,E);return await this.rateLimiter.getSendToken(),O}recordSuccess(u){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(u)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}};class P_ extends G{computeNextBackoffDelay;constructor(_,u=M.delay()){super(typeof _==="function"?_:async()=>_);if(typeof u==="number")this.computeNextBackoffDelay=()=>u;else this.computeNextBackoffDelay=u}async refreshRetryTokenForRetry(_,u){let E=await super.refreshRetryTokenForRetry(_,u);return E.getRetryDelay=()=>this.computeNextBackoffDelay(E.getRetryCount()),E}}var v_=(_,u)=>{let E=_,O=g,T=r,b=__,L=_,N=(I)=>I.name==="TimeoutError"?b:T,j=(I)=>N(I)<=L;return Object.freeze({hasRetryTokens:j,retrieveRetryTokens:(I)=>{if(!j(I))throw Error("No retry token available");let R=N(I);return L-=R,R},releaseRetryTokens:(I)=>{L+=I??O,L=Math.min(L,E)}})},L_=(_,u)=>Math.floor(Math.min(Q,Math.random()*2**u*_)),N_=(_)=>{if(!_)return!1;return A(_)||p(_)||J(_)||X(_)};class n{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=k_.RETRY_MODES.STANDARD;constructor(_,u){this.maxAttemptsProvider=_,this.retryDecider=u?.retryDecider??N_,this.delayDecider=u?.delayDecider??L_,this.retryQuota=u?.retryQuota??v_(Z)}shouldRetry(_,u,E){return u<E&&this.retryDecider(_)&&this.retryQuota.hasRetryTokens(_)}async getMaxAttempts(){let _;try{_=await this.maxAttemptsProvider()}catch(u){_=$}return _}async retry(_,u,E){let O,T=0,b=0,L=await this.getMaxAttempts(),{request:N}=u;if(K.HttpRequest.isInstance(N))N.headers[c]=q.v4();while(!0)try{if(K.HttpRequest.isInstance(N))N.headers[w]=`attempt=${T+1}; max=${L}`;if(E?.beforeRequest)await E.beforeRequest();let{response:j,output:Y}=await _(u);if(E?.afterRequest)E.afterRequest(j);return this.retryQuota.releaseRetryTokens(O),Y.$metadata.attempts=T+1,Y.$metadata.totalRetryDelay=b,{response:j,output:Y}}catch(j){let Y=E_(j);if(T++,this.shouldRetry(Y,T,L)){O=this.retryQuota.retrieveRetryTokens(Y);let F=this.delayDecider(J(Y)?t:e,T),I=h_(Y.$response),R=Math.max(I||0,F);b+=R,await new Promise((V)=>setTimeout(V,R));continue}if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=T,Y.$metadata.totalRetryDelay=b,Y}}}var h_=(_)=>{if(!K.HttpResponse.isInstance(_))return;let u=Object.keys(_.headers).find((b)=>b.toLowerCase()==="retry-after");if(!u)return;let E=_.headers[u],O=Number(E);if(!Number.isNaN(O))return O*1000;return new Date(E).getTime()-Date.now()};class M_ extends n{rateLimiter;constructor(_,u){let{rateLimiter:E,...O}=u??{};super(_,O);this.rateLimiter=E??new C,this.mode=k_.RETRY_MODES.ADAPTIVE}async retry(_,u){return super.retry(_,u,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(E)=>{this.rateLimiter.updateClientSendingRate(E)}})}}var S="AWS_MAX_ATTEMPTS",i="max_attempts",S_={environmentVariableSelector:(_)=>{let u=_[S];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Environment variable ${S} mast be a number, got "${u}"`);return E},configFileSelector:(_)=>{let u=_[i];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Shared config file entry ${i} mast be a number, got "${u}"`);return E},default:$},i_=(_)=>{let{retryStrategy:u,retryMode:E}=_,O=v.normalizeProvider(_.maxAttempts??$),T=u?Promise.resolve(u):void 0,b=async()=>await v.normalizeProvider(E)()===k_.RETRY_MODES.ADAPTIVE?new j_(O):new G(O);return Object.assign(_,{maxAttempts:O,retryStrategy:()=>T??=b()})},U_="AWS_RETRY_MODE",I_="retry_mode",q_={environmentVariableSelector:(_)=>_[U_],configFileSelector:(_)=>_[I_],default:Y_},F_=()=>(_)=>async(u)=>{let{request:E}=u;if(K.HttpRequest.isInstance(E))delete E.headers[c],delete E.headers[w];return _(u)},R_={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},A_=(_)=>({applyToStack:(u)=>{u.addRelativeTo(F_(),R_)}}),g_=O_(m),n_=B_(m);k_.AdaptiveRetryStrategy=j_;k_.CONFIG_MAX_ATTEMPTS=i;k_.CONFIG_RETRY_MODE=I_;k_.ConfiguredRetryStrategy=P_;k_.DEFAULT_MAX_ATTEMPTS=$;k_.DEFAULT_RETRY_DELAY_BASE=e;k_.DEFAULT_RETRY_MODE=Y_;k_.DefaultRateLimiter=C;k_.DeprecatedAdaptiveRetryStrategy=M_;k_.DeprecatedStandardRetryStrategy=n;k_.ENV_MAX_ATTEMPTS=S;k_.ENV_RETRY_MODE=U_;k_.INITIAL_RETRY_TOKENS=Z;k_.INVOCATION_ID_HEADER=c;k_.MAXIMUM_RETRY_DELAY=Q;k_.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=S_;k_.NODE_RETRY_MODE_CONFIG_OPTIONS=q_;k_.NO_RETRY_INCREMENT=g;k_.REQUEST_HEADER=w;k_.RETRY_COST=r;k_.Retry=M;k_.StandardRetryStrategy=G;k_.THROTTLING_RETRY_DELAY_BASE=t;k_.TIMEOUT_RETRY_COST=__;k_.defaultDelayDecider=L_;k_.defaultRetryDecider=N_;k_.getOmitRetryHeadersPlugin=A_;k_.getRetryAfterHint=H_;k_.getRetryPlugin=n_;k_.isBrowserNetworkError=s;k_.isClockSkewCorrectedError=y;k_.isClockSkewError=p;k_.isNodeJsHttp2TransientError=o;k_.isRetryableByTrait=A;k_.isServerError=a;k_.isThrottlingError=J;k_.isTransientError=X;k_.omitRetryHeadersMiddleware=F_;k_.omitRetryHeadersMiddlewareOptions=R_;k_.resolveRetryConfig=i_;k_.retryMiddleware=g_;k_.retryMiddlewareOptions=b_});var D_=H((P)=>{Object.defineProperty(P,"__esModule",{value:!0});P.TIMEOUT_RETRY_COST=P.THROTTLING_RETRY_DELAY_BASE=P.Retry=P.RETRY_MODES=P.RETRY_COST=P.NO_RETRY_INCREMENT=P.REQUEST_HEADER=P.MAXIMUM_RETRY_DELAY=P.INVOCATION_ID_HEADER=P.INITIAL_RETRY_TOKENS=P.DEFAULT_RETRY_MODE=P.DEFAULT_RETRY_DELAY_BASE=P.DEFAULT_MAX_ATTEMPTS=P.StandardRetryStrategy=P.DefaultRateLimiter=P.ConfiguredRetryStrategy=P.AdaptiveRetryStrategy=void 0;var U=W_();Object.defineProperty(P,"AdaptiveRetryStrategy",{enumerable:!0,get:function(){return U.AdaptiveRetryStrategy}});Object.defineProperty(P,"ConfiguredRetryStrategy",{enumerable:!0,get:function(){return U.ConfiguredRetryStrategy}});Object.defineProperty(P,"DefaultRateLimiter",{enumerable:!0,get:function(){return U.DefaultRateLimiter}});Object.defineProperty(P,"StandardRetryStrategy",{enumerable:!0,get:function(){return U.StandardRetryStrategy}});Object.defineProperty(P,"DEFAULT_MAX_ATTEMPTS",{enumerable:!0,get:function(){return U.DEFAULT_MAX_ATTEMPTS}});Object.defineProperty(P,"DEFAULT_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_DELAY_BASE}});Object.defineProperty(P,"DEFAULT_RETRY_MODE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_MODE}});Object.defineProperty(P,"INITIAL_RETRY_TOKENS",{enumerable:!0,get:function(){return U.INITIAL_RETRY_TOKENS}});Object.defineProperty(P,"INVOCATION_ID_HEADER",{enumerable:!0,get:function(){return U.INVOCATION_ID_HEADER}});Object.defineProperty(P,"MAXIMUM_RETRY_DELAY",{enumerable:!0,get:function(){return U.MAXIMUM_RETRY_DELAY}});Object.defineProperty(P,"REQUEST_HEADER",{enumerable:!0,get:function(){return U.REQUEST_HEADER}});Object.defineProperty(P,"NO_RETRY_INCREMENT",{enumerable:!0,get:function(){return U.NO_RETRY_INCREMENT}});Object.defineProperty(P,"RETRY_COST",{enumerable:!0,get:function(){return U.RETRY_COST}});Object.defineProperty(P,"RETRY_MODES",{enumerable:!0,get:function(){return U.RETRY_MODES}});Object.defineProperty(P,"Retry",{enumerable:!0,get:function(){return U.Retry}});Object.defineProperty(P,"THROTTLING_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.THROTTLING_RETRY_DELAY_BASE}});Object.defineProperty(P,"TIMEOUT_RETRY_COST",{enumerable:!0,get:function(){return U.TIMEOUT_RETRY_COST}})});var yu=H((gu)=>{var wu=D_(),B={warningEmitted:!1},Bu=(_)=>{if(_&&!B.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){B.warningEmitted=!0;return}let u=parseInt(_.substring(1,_.indexOf("."))),E=22;if(u<E)B.warningEmitted=!0,process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
|
|
2
2
|
versions published after the first week of January 2027
|
|
3
3
|
will require node >=${E}. You are running node ${_}.
|
|
4
4
|
|
|
@@ -6,4 +6,4 @@ To continue receiving updates to AWS services, bug fixes,
|
|
|
6
6
|
and security updates please upgrade to node >=${E}.
|
|
7
7
|
|
|
8
8
|
More information can be found at: https://a.co/c895JFp`)}},vu=()=>(_,u)=>async(E)=>{return u.__retryLongPoll=!0,_(E)},hu={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},Su=(_)=>({applyToStack:(u)=>{u.add(vu(),hu)}});function iu(_,u,E){if(!_.$source)_.$source={};return _.$source[u]=E,_}wu.Retry.v2026||=typeof process==="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";function qu(_,u,E){if(!_.__aws_sdk_context)_.__aws_sdk_context={features:{}};else if(!_.__aws_sdk_context.features)_.__aws_sdk_context.features={};_.__aws_sdk_context.features[u]=E}function Au(_,u,E){if(!_.$source)_.$source={};return _.$source[u]=E,_}gu.emitWarningIfUnsupportedVersion=Bu;gu.getLongPollPlugin=Su;gu.setCredentialFeature=iu;gu.setFeature=qu;gu.setTokenFeature=Au;gu.state=B});var ou=H((D)=>{Object.defineProperty(D,"__esModule",{value:!0});D.memoize=D.fromStatic=D.chain=D.TokenProviderError=D.CredentialsProviderError=D.ProviderError=void 0;var f=su();Object.defineProperty(D,"ProviderError",{enumerable:!0,get:function(){return f.ProviderError}});Object.defineProperty(D,"CredentialsProviderError",{enumerable:!0,get:function(){return f.CredentialsProviderError}});Object.defineProperty(D,"TokenProviderError",{enumerable:!0,get:function(){return f.TokenProviderError}});Object.defineProperty(D,"chain",{enumerable:!0,get:function(){return f.chain}});Object.defineProperty(D,"fromStatic",{enumerable:!0,get:function(){return f.fromValue}});Object.defineProperty(D,"memoize",{enumerable:!0,get:function(){return f.memoize}})});
|
|
9
|
-
export{W_ as
|
|
9
|
+
export{W_ as Nla,D_ as Ola,yu as Pla,ou as Qla};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{hP as a,iP as E,kP as r,lP as o,mP as s,rP as GQ}from"./cli-0.1.13-pqk4c7m7.mjs";import{GX as N,IX as t}from"./cli-0.1.13-0xy8k6yv.mjs";import{k4 as U,l4 as I}from"./cli-0.1.13-bzgpcgdt.mjs";import{D5 as n,K5 as KQ}from"./cli-0.1.13-5ydypzty.mjs";import{C6 as e,T6 as jQ}from"./cli-0.1.13-wh68ve92.mjs";import{B7 as Y,D7 as h}from"./cli-0.1.13-dag38tkx.mjs";import{qga as u,rga as ZQ}from"./cli-0.1.13-45hjhcbc.mjs";import{Qga as H,Rga as i,Wga as F,Yga as k,Zga as R,aha as y,oha as K,rha as b}from"./cli-0.1.13-144gn3fd.mjs";ZQ();b();h();F();y();function D(Q){if(Q<60000)return`${Math.round(Q/1000)}s`;let W=Math.floor(Q/60000),Z=Math.round(Q%60000/1000);return Z>0?`${W}m ${Z}s`:`${W}m`}function $Q(Q){let Z=(Q.startsWith("sk-ant-si-")?Q.slice(10):Q).split(".");if(Z.length!==3||!Z[1])return null;try{return R(Buffer.from(Z[1],"base64url").toString("utf8"))}catch{return null}}function f(Q){let W=$Q(Q);if(W!==null&&typeof W==="object"&&"exp"in W&&typeof W.exp==="number")return W.exp;return null}var zQ=300000,p=1800000,m=3,JQ=60000;function FQ({getAccessToken:Q,onRefresh:W,label:Z,refreshBufferMs:z=zQ}){let $=new Map,J=new Map,G=new Map;function X(V){let w=(G.get(V)??0)+1;return G.set(V,w),w}function q(V,w){let j=f(w);if(!j){K(`[${Z}:token] Could not decode JWT expiry for sessionId=${V}, token prefix=${w.slice(0,15)}…, keeping existing timer`);return}let C=$.get(V);if(C)clearTimeout(C);let B=X(V),P=new Date(j*1000).toISOString(),v=j*1000-Date.now()-z;if(v<=0){K(`[${Z}:token] Token for sessionId=${V} expires=${P} (past or within buffer), refreshing immediately`),O(V,B);return}K(`[${Z}:token] Scheduled token refresh for sessionId=${V} in ${D(v)} (expires=${P}, buffer=${z/1000}s)`);let WQ=setTimeout(O,v,V,B);$.set(V,WQ)}function L(V,w){let j=$.get(V);if(j)clearTimeout(j);let C=X(V),B=Math.max(w*1000-z,30000);K(`[${Z}:token] Scheduled token refresh for sessionId=${V} in ${D(B)} (expires_in=${w}s, buffer=${z/1000}s)`);let P=setTimeout(O,B,V,C);$.set(V,P)}async function O(V,w){let j;try{j=await Q()}catch(B){K(`[${Z}:token] getAccessToken threw for sessionId=${V}: ${H(B)}`,{level:"error"})}if(G.get(V)!==w){K(`[${Z}:token] doRefresh for sessionId=${V} stale (gen ${w} vs ${G.get(V)}), skipping`);return}if(!j){let B=(J.get(V)??0)+1;if(J.set(V,B),K(`[${Z}:token] No OAuth token available for refresh, sessionId=${V} (failure ${B}/${m})`,{level:"error"}),Y("error","bridge_token_refresh_no_oauth"),B<m){let P=setTimeout(O,JQ,V,w);$.set(V,P)}return}J.delete(V),K(`[${Z}:token] Refreshing token for sessionId=${V}: new token prefix=${j.slice(0,15)}…`),u("tengu_bridge_token_refreshed",{}),W(V,j);let C=setTimeout(O,p,V,w);$.set(V,C),K(`[${Z}:token] Scheduled follow-up refresh for sessionId=${V} in ${D(p)}`)}function _(V){X(V);let w=$.get(V);if(w)clearTimeout(w),$.delete(V);J.delete(V)}function QQ(){for(let V of G.keys())X(V);for(let V of $.values())clearTimeout(V);$.clear(),J.clear()}return{schedule:q,scheduleFromExpiresIn:L,cancel:_,cancelAll:QQ}}import{randomUUID as g}from"crypto";b();h();F();KQ();GQ();r();I();t();y();class T extends Error{retryAfterMs;constructor(Q,W){super(Q);this.retryAfterMs=W}}class x{pending=[];pendingAtClose=0;draining=!1;closed=!1;backpressureResolvers=[];sleepResolve=null;flushResolvers=[];droppedBatches=0;config;constructor(Q){this.config=Q}get droppedBatchCount(){return this.droppedBatches}get pendingCount(){return this.closed?this.pendingAtClose:this.pending.length}async enqueue(Q){if(this.closed)return;let W=Array.isArray(Q)?Q:[Q];if(W.length===0)return;while(this.pending.length+W.length>this.config.maxQueueSize&&!this.closed)await new Promise((Z)=>{this.backpressureResolvers.push(Z)});if(this.closed)return;this.pending.push(...W),this.drain()}flush(){if(this.pending.length===0&&!this.draining)return Promise.resolve();return this.drain(),new Promise((Q)=>{this.flushResolvers.push(Q)})}close(){if(this.closed)return;this.closed=!0,this.pendingAtClose=this.pending.length,this.pending=[],this.sleepResolve?.(),this.sleepResolve=null;for(let Q of this.backpressureResolvers)Q();this.backpressureResolvers=[];for(let Q of this.flushResolvers)Q();this.flushResolvers=[]}async drain(){if(this.draining||this.closed)return;this.draining=!0;let Q=0;try{while(this.pending.length>0&&!this.closed){let W=this.takeBatch();if(W.length===0)continue;try{await this.config.send(W),Q=0}catch(Z){if(Q++,this.config.maxConsecutiveFailures!==void 0&&Q>=this.config.maxConsecutiveFailures){this.droppedBatches++,this.config.onBatchDropped?.(W.length,Q),Q=0,this.releaseBackpressure();continue}this.pending=W.concat(this.pending);let z=Z instanceof T?Z.retryAfterMs:void 0;await this.sleep(this.retryDelay(Q,z));continue}this.releaseBackpressure()}}finally{if(this.draining=!1,this.pending.length===0){for(let W of this.flushResolvers)W();this.flushResolvers=[]}}}takeBatch(){let{maxBatchSize:Q,maxBatchBytes:W}=this.config;if(W===void 0)return this.pending.splice(0,Q);let Z=0,z=0;while(z<this.pending.length&&z<Q){let $;try{$=Buffer.byteLength(k(this.pending[z]))}catch{this.pending.splice(z,1);continue}if(z>0&&Z+$>W)break;Z+=$,z++}return this.pending.splice(0,z)}retryDelay(Q,W){let Z=Math.random()*this.config.jitterMs;if(W!==void 0)return Math.max(this.config.baseDelayMs,Math.min(W,this.config.maxDelayMs))+Z;return Math.min(this.config.baseDelayMs*2**(Q-1),this.config.maxDelayMs)+Z}releaseBackpressure(){let Q=this.backpressureResolvers;this.backpressureResolvers=[];for(let W of Q)W()}sleep(Q){return new Promise((W)=>{this.sleepResolve=W,setTimeout((Z,z)=>{Z.sleepResolve=null,z()},Q,this,W)})}}I();class c{inflight=null;pending=null;closed=!1;config;constructor(Q){this.config=Q}enqueue(Q){if(this.closed)return;this.pending=this.pending?d(this.pending,Q):Q,this.drain()}close(){this.closed=!0,this.pending=null}async drain(){if(this.inflight||this.closed)return;if(!this.pending)return;let Q=this.pending;this.pending=null,this.inflight=this.sendWithRetry(Q).then(()=>{if(this.inflight=null,this.pending&&!this.closed)this.drain()})}async sendWithRetry(Q){let W=Q,Z=0;while(!this.closed){if(await this.config.send(W))return;if(Z++,await U(this.retryDelay(Z)),this.pending&&!this.closed)W=d(W,this.pending),this.pending=null}}retryDelay(Q){let W=Math.min(this.config.baseDelayMs*2**(Q-1),this.config.maxDelayMs),Z=Math.random()*this.config.jitterMs;return W+Z}}function d(Q,W){let Z={...Q};for(let[z,$]of Object.entries(W))if((z==="external_metadata"||z==="internal_metadata")&&Z[z]&&typeof Z[z]==="object"&&typeof $==="object"&&$!==null)Z[z]={...Z[z],...$};else Z[z]=$;return Z}var VQ=20000,YQ=100;function l(){return!0}class M extends Error{reason;constructor(Q){super(`CCRClient init failed: ${Q}`);this.reason=Q}}var XQ=10;function qQ(){return{byMessage:new Map,scopeToMessage:new Map}}function S(Q){return`${Q.session_id}:${Q.parent_tool_use_id??""}`}function wQ(Q,W){let Z=[],z=new Map;for(let $ of Q)switch($.event.type){case"message_start":{let J=$.event.message.id,G=W.scopeToMessage.get(S($));if(G)W.byMessage.delete(G);W.scopeToMessage.set(S($),J),W.byMessage.set(J,[]),Z.push($);break}case"content_block_delta":{if($.event.delta.type!=="text_delta"){Z.push($);break}let J=W.scopeToMessage.get(S($)),G=J?W.byMessage.get(J):void 0;if(!G){Z.push($);break}let X=G[$.event.index]??=[];X.push($.event.delta.text);let q=z.get(X);if(q){q.event.delta.text=X.join("");break}let L={type:"stream_event",uuid:$.uuid,session_id:$.session_id,parent_tool_use_id:$.parent_tool_use_id,event:{type:"content_block_delta",index:$.event.index,delta:{type:"text_delta",text:X.join("")}}};z.set(X,L),Z.push(L);break}default:Z.push($)}return Z}function LQ(Q,W){Q.byMessage.delete(W.message.id);let Z=S(W);if(Q.scopeToMessage.get(Z)===W.message.id)Q.scopeToMessage.delete(Z)}class OQ{workerEpoch=0;heartbeatIntervalMs;heartbeatJitterFraction;heartbeatTimer=null;heartbeatInFlight=!1;closed=!1;consecutiveAuthFailures=0;currentState=null;sessionBaseUrl;sessionId;http=n({keepAlive:!0});streamEventBuffer=[];streamEventTimer=null;streamTextAccumulator=qQ();workerState;eventUploader;internalEventUploader;deliveryUploader;onEpochMismatch;getAuthHeaders;constructor(Q,W,Z){if(this.onEpochMismatch=Z?.onEpochMismatch??(()=>{process.exit(1)}),this.heartbeatIntervalMs=Z?.heartbeatIntervalMs??VQ,this.heartbeatJitterFraction=Z?.heartbeatJitterFraction??0,this.getAuthHeaders=Z?.getAuthHeaders??E,W.protocol!=="http:"&&W.protocol!=="https:")throw Error(`CCRClient: Expected http(s) URL, got ${W.protocol}`);let z=W.pathname.replace(/\/$/,"");this.sessionBaseUrl=`${W.protocol}//${W.host}${z}`,this.sessionId=z.split("/").pop()||"",this.workerState=new c({send:($)=>this.request("put","/worker",{worker_epoch:this.workerEpoch,...$},"PUT worker").then((J)=>J.ok),baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.eventUploader=new x({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:1e5,send:async($)=>{let J=await this.request("post","/worker/events",{worker_epoch:this.workerEpoch,events:$},"client events");if(!J.ok)throw new T("client event POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.internalEventUploader=new x({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:200,send:async($)=>{let J=await this.request("post","/worker/internal-events",{worker_epoch:this.workerEpoch,events:$},"internal events");if(!J.ok)throw new T("internal event POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.deliveryUploader=new x({maxBatchSize:64,maxQueueSize:64,send:async($)=>{let J=await this.request("post","/worker/events/delivery",{worker_epoch:this.workerEpoch,updates:$.map((G)=>({event_id:G.eventId,status:G.status}))},"delivery batch");if(!J.ok)throw new T("delivery POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),Q.setOnEvent(($)=>{this.reportDelivery($.event_id,"received")})}async initialize(Q){let W=Date.now();if(Object.keys(this.getAuthHeaders()).length===0)throw new M("no_auth_headers");if(Q===void 0){let G=process.env.CLAUDE_CODE_WORKER_EPOCH;Q=G?parseInt(G,10):NaN}if(isNaN(Q))throw new M("missing_epoch");this.workerEpoch=Q;let Z=this.getWorkerState();if(!(await this.request("put","/worker",{worker_status:"idle",worker_epoch:this.workerEpoch,external_metadata:{pending_action:null,task_summary:null}},"PUT worker (init)")).ok)throw new M("worker_register_failed");this.currentState="idle",this.startHeartbeat(),o(()=>{this.writeEvent({type:"keep_alive"})}),K(`CCRClient: initialized, epoch=${this.workerEpoch}`),Y("info","cli_worker_lifecycle_initialized",{epoch:this.workerEpoch,duration_ms:Date.now()-W});let{metadata:$,durationMs:J}=await Z;if(!this.closed)Y("info","cli_worker_state_restored",{duration_ms:J,had_state:$!==null});return $}async getWorkerState(){let Q=Date.now(),W=this.getAuthHeaders();if(Object.keys(W).length===0)return{metadata:null,durationMs:0};return{metadata:(await this.getWithRetry(`${this.sessionBaseUrl}/worker`,W,"worker_state"))?.worker?.external_metadata??null,durationMs:Date.now()-Q}}async request(Q,W,Z,z,{timeout:$=1e4}={}){let J=this.getAuthHeaders();if(Object.keys(J).length===0)return{ok:!1};try{let G=await this.http[Q](`${this.sessionBaseUrl}${W}`,Z,{headers:{...J,"Content-Type":"application/json","anthropic-version":"2023-06-01","User-Agent":N()},validateStatus:l,timeout:$});if(G.status>=200&&G.status<300)return this.consecutiveAuthFailures=0,{ok:!0};if(G.status===409)this.handleEpochMismatch();if(G.status===401||G.status===403){let X=a(),q=X?f(X):null;if(q!==null&&q*1000<Date.now())K(`CCRClient: session_token expired (exp=${new Date(q*1000).toISOString()}) — no refresh was delivered, exiting`,{level:"error"}),Y("error","cli_worker_token_expired_no_refresh"),this.onEpochMismatch();if(this.consecutiveAuthFailures++,this.consecutiveAuthFailures>=XQ)K(`CCRClient: ${this.consecutiveAuthFailures} consecutive auth failures with a valid-looking token — server-side auth unrecoverable, exiting`,{level:"error"}),Y("error","cli_worker_auth_failures_exhausted"),this.onEpochMismatch()}if(K(`CCRClient: ${z} returned ${G.status}`,{level:"warn"}),Y("warn","cli_worker_request_failed",{method:Q,path:W,status:G.status}),G.status===429){let X=G.headers?.["retry-after"],q=typeof X==="string"?parseInt(X,10):NaN;if(!isNaN(q)&&q>=0)return{ok:!1,retryAfterMs:q*1000}}return{ok:!1}}catch(G){return K(`CCRClient: ${z} failed: ${H(G)}`,{level:"warn"}),Y("warn","cli_worker_request_error",{method:Q,path:W,error_code:i(G)}),{ok:!1}}}reportState(Q,W){if(Q===this.currentState&&!W)return;this.currentState=Q,this.workerState.enqueue({worker_status:Q,requires_action_details:W?{tool_name:W.tool_name,action_description:W.action_description,request_id:W.request_id}:null})}reportMetadata(Q){this.workerState.enqueue({external_metadata:Q})}handleEpochMismatch(){K("CCRClient: Epoch mismatch (409), shutting down",{level:"error"}),Y("error","cli_worker_epoch_mismatch"),this.onEpochMismatch()}startHeartbeat(){this.stopHeartbeat();let Q=()=>{let Z=this.heartbeatIntervalMs*this.heartbeatJitterFraction*(2*Math.random()-1);this.heartbeatTimer=setTimeout(W,this.heartbeatIntervalMs+Z)},W=()=>{if(this.sendHeartbeat(),this.heartbeatTimer===null)return;Q()};Q()}stopHeartbeat(){if(this.heartbeatTimer)clearTimeout(this.heartbeatTimer),this.heartbeatTimer=null}async sendHeartbeat(){if(this.heartbeatInFlight)return;this.heartbeatInFlight=!0;try{if((await this.request("post","/worker/heartbeat",{session_id:this.sessionId,worker_epoch:this.workerEpoch},"Heartbeat",{timeout:5000})).ok)K("CCRClient: Heartbeat sent")}finally{this.heartbeatInFlight=!1}}async writeEvent(Q){if(Q.type==="stream_event"){if(this.streamEventBuffer.push(Q),!this.streamEventTimer)this.streamEventTimer=setTimeout(()=>void this.flushStreamEventBuffer(),YQ);return}if(await this.flushStreamEventBuffer(),Q.type==="assistant")LQ(this.streamTextAccumulator,Q);await this.eventUploader.enqueue(this.toClientEvent(Q))}toClientEvent(Q){let W=Q;return{payload:{...W,uuid:typeof W.uuid==="string"?W.uuid:g()}}}async flushStreamEventBuffer(){if(this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;if(this.streamEventBuffer.length===0)return;let Q=this.streamEventBuffer;this.streamEventBuffer=[];let W=wQ(Q,this.streamTextAccumulator);await this.eventUploader.enqueue(W.map((Z)=>({payload:Z,ephemeral:!0})))}async writeInternalEvent(Q,W,{isCompaction:Z=!1,agentId:z}={}){let $={payload:{type:Q,...W,uuid:typeof W.uuid==="string"?W.uuid:g()},...Z&&{is_compaction:!0},...z&&{agent_id:z}};await this.internalEventUploader.enqueue($)}flushInternalEvents(){return this.internalEventUploader.flush()}async flush(){return await this.flushStreamEventBuffer(),this.eventUploader.flush()}async readInternalEvents(){return this.paginatedGet("/worker/internal-events",{},"internal_events")}async readSubagentInternalEvents(){return this.paginatedGet("/worker/internal-events",{subagents:"true"},"subagent_events")}async paginatedGet(Q,W,Z){let z=this.getAuthHeaders();if(Object.keys(z).length===0)return null;let $=[],J;do{let G=new URL(`${this.sessionBaseUrl}${Q}`);for(let[q,L]of Object.entries(W))G.searchParams.set(q,L);if(J)G.searchParams.set("cursor",J);let X=await this.getWithRetry(G.toString(),z,Z);if(!X)return null;$.push(...X.data??[]),J=X.next_cursor}while(J);return K(`CCRClient: Read ${$.length} internal events from ${Q}${W.subagents?" (subagents)":""}`),$}async getWithRetry(Q,W,Z){for(let z=1;z<=10;z++){let $;try{$=await this.http.get(Q,{headers:{...W,"anthropic-version":"2023-06-01","User-Agent":N()},validateStatus:l,timeout:30000})}catch(J){if(K(`CCRClient: GET ${Q} failed (attempt ${z}/10): ${H(J)}`,{level:"warn"}),z<10){let G=Math.min(500*2**(z-1),30000)+Math.random()*500;await U(G)}continue}if($.status>=200&&$.status<300)return $.data;if($.status===409)this.handleEpochMismatch();if(K(`CCRClient: GET ${Q} returned ${$.status} (attempt ${z}/10)`,{level:"warn"}),z<10){let J=Math.min(500*2**(z-1),30000)+Math.random()*500;await U(J)}}return K("CCRClient: GET retries exhausted",{level:"error"}),Y("error","cli_worker_get_retries_exhausted",{context:Z}),null}reportDelivery(Q,W){this.deliveryUploader.enqueue({eventId:Q,status:W})}getWorkerEpoch(){return this.workerEpoch}get internalEventsPending(){return this.internalEventUploader.pendingCount}close(){if(this.closed=!0,this.stopHeartbeat(),s(),this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;this.streamEventBuffer=[],this.streamTextAccumulator.byMessage.clear(),this.streamTextAccumulator.scopeToMessage.clear(),this.workerState.close(),this.eventUploader.close(),this.internalEventUploader.close(),this.deliveryUploader.close()}}jQ();b();h();F();r();I();y();t();var BQ=1000,HQ=30000,UQ=600000,CQ=45000,PQ=new Set([401,403,404]),A=10,TQ=500,NQ=8000,kQ={stream:!0};function xQ(){return!0}function AQ(Q){let W=[],Z=0,z;while((z=Q.indexOf(`
|
|
1
|
+
import{$O as s,WO as a,XO as E,ZO as r,_O as o,eP as GQ}from"./cli-0.1.15-69kq5chw.mjs";import{OV as N,QV as t}from"./cli-0.1.15-asts8hm3.mjs";import{s2 as U,t2 as I}from"./cli-0.1.15-q35rzjnz.mjs";import{L3 as n,S3 as KQ}from"./cli-0.1.15-5denzf1p.mjs";import{$4 as jQ,K4 as e}from"./cli-0.1.15-x69hfzmj.mjs";import{J5 as Y,L5 as h}from"./cli-0.1.15-4892kydg.mjs";import{yea as u,zea as ZQ}from"./cli-0.1.15-b7f6hacc.mjs";import{Yea as H,Zea as i,cfa as F,efa as k,ffa as R,ifa as y,wfa as K,zfa as b}from"./cli-0.1.15-nk50qhet.mjs";ZQ();b();h();F();y();function D(Q){if(Q<60000)return`${Math.round(Q/1000)}s`;let W=Math.floor(Q/60000),Z=Math.round(Q%60000/1000);return Z>0?`${W}m ${Z}s`:`${W}m`}function $Q(Q){let Z=(Q.startsWith("sk-ant-si-")?Q.slice(10):Q).split(".");if(Z.length!==3||!Z[1])return null;try{return R(Buffer.from(Z[1],"base64url").toString("utf8"))}catch{return null}}function f(Q){let W=$Q(Q);if(W!==null&&typeof W==="object"&&"exp"in W&&typeof W.exp==="number")return W.exp;return null}var zQ=300000,p=1800000,m=3,JQ=60000;function FQ({getAccessToken:Q,onRefresh:W,label:Z,refreshBufferMs:z=zQ}){let $=new Map,J=new Map,G=new Map;function X(V){let w=(G.get(V)??0)+1;return G.set(V,w),w}function q(V,w){let j=f(w);if(!j){K(`[${Z}:token] Could not decode JWT expiry for sessionId=${V}, token prefix=${w.slice(0,15)}…, keeping existing timer`);return}let C=$.get(V);if(C)clearTimeout(C);let B=X(V),P=new Date(j*1000).toISOString(),v=j*1000-Date.now()-z;if(v<=0){K(`[${Z}:token] Token for sessionId=${V} expires=${P} (past or within buffer), refreshing immediately`),O(V,B);return}K(`[${Z}:token] Scheduled token refresh for sessionId=${V} in ${D(v)} (expires=${P}, buffer=${z/1000}s)`);let WQ=setTimeout(O,v,V,B);$.set(V,WQ)}function L(V,w){let j=$.get(V);if(j)clearTimeout(j);let C=X(V),B=Math.max(w*1000-z,30000);K(`[${Z}:token] Scheduled token refresh for sessionId=${V} in ${D(B)} (expires_in=${w}s, buffer=${z/1000}s)`);let P=setTimeout(O,B,V,C);$.set(V,P)}async function O(V,w){let j;try{j=await Q()}catch(B){K(`[${Z}:token] getAccessToken threw for sessionId=${V}: ${H(B)}`,{level:"error"})}if(G.get(V)!==w){K(`[${Z}:token] doRefresh for sessionId=${V} stale (gen ${w} vs ${G.get(V)}), skipping`);return}if(!j){let B=(J.get(V)??0)+1;if(J.set(V,B),K(`[${Z}:token] No OAuth token available for refresh, sessionId=${V} (failure ${B}/${m})`,{level:"error"}),Y("error","bridge_token_refresh_no_oauth"),B<m){let P=setTimeout(O,JQ,V,w);$.set(V,P)}return}J.delete(V),K(`[${Z}:token] Refreshing token for sessionId=${V}: new token prefix=${j.slice(0,15)}…`),u("tengu_bridge_token_refreshed",{}),W(V,j);let C=setTimeout(O,p,V,w);$.set(V,C),K(`[${Z}:token] Scheduled follow-up refresh for sessionId=${V} in ${D(p)}`)}function _(V){X(V);let w=$.get(V);if(w)clearTimeout(w),$.delete(V);J.delete(V)}function QQ(){for(let V of G.keys())X(V);for(let V of $.values())clearTimeout(V);$.clear(),J.clear()}return{schedule:q,scheduleFromExpiresIn:L,cancel:_,cancelAll:QQ}}import{randomUUID as g}from"crypto";b();h();F();KQ();GQ();r();I();t();y();class T extends Error{retryAfterMs;constructor(Q,W){super(Q);this.retryAfterMs=W}}class x{pending=[];pendingAtClose=0;draining=!1;closed=!1;backpressureResolvers=[];sleepResolve=null;flushResolvers=[];droppedBatches=0;config;constructor(Q){this.config=Q}get droppedBatchCount(){return this.droppedBatches}get pendingCount(){return this.closed?this.pendingAtClose:this.pending.length}async enqueue(Q){if(this.closed)return;let W=Array.isArray(Q)?Q:[Q];if(W.length===0)return;while(this.pending.length+W.length>this.config.maxQueueSize&&!this.closed)await new Promise((Z)=>{this.backpressureResolvers.push(Z)});if(this.closed)return;this.pending.push(...W),this.drain()}flush(){if(this.pending.length===0&&!this.draining)return Promise.resolve();return this.drain(),new Promise((Q)=>{this.flushResolvers.push(Q)})}close(){if(this.closed)return;this.closed=!0,this.pendingAtClose=this.pending.length,this.pending=[],this.sleepResolve?.(),this.sleepResolve=null;for(let Q of this.backpressureResolvers)Q();this.backpressureResolvers=[];for(let Q of this.flushResolvers)Q();this.flushResolvers=[]}async drain(){if(this.draining||this.closed)return;this.draining=!0;let Q=0;try{while(this.pending.length>0&&!this.closed){let W=this.takeBatch();if(W.length===0)continue;try{await this.config.send(W),Q=0}catch(Z){if(Q++,this.config.maxConsecutiveFailures!==void 0&&Q>=this.config.maxConsecutiveFailures){this.droppedBatches++,this.config.onBatchDropped?.(W.length,Q),Q=0,this.releaseBackpressure();continue}this.pending=W.concat(this.pending);let z=Z instanceof T?Z.retryAfterMs:void 0;await this.sleep(this.retryDelay(Q,z));continue}this.releaseBackpressure()}}finally{if(this.draining=!1,this.pending.length===0){for(let W of this.flushResolvers)W();this.flushResolvers=[]}}}takeBatch(){let{maxBatchSize:Q,maxBatchBytes:W}=this.config;if(W===void 0)return this.pending.splice(0,Q);let Z=0,z=0;while(z<this.pending.length&&z<Q){let $;try{$=Buffer.byteLength(k(this.pending[z]))}catch{this.pending.splice(z,1);continue}if(z>0&&Z+$>W)break;Z+=$,z++}return this.pending.splice(0,z)}retryDelay(Q,W){let Z=Math.random()*this.config.jitterMs;if(W!==void 0)return Math.max(this.config.baseDelayMs,Math.min(W,this.config.maxDelayMs))+Z;return Math.min(this.config.baseDelayMs*2**(Q-1),this.config.maxDelayMs)+Z}releaseBackpressure(){let Q=this.backpressureResolvers;this.backpressureResolvers=[];for(let W of Q)W()}sleep(Q){return new Promise((W)=>{this.sleepResolve=W,setTimeout((Z,z)=>{Z.sleepResolve=null,z()},Q,this,W)})}}I();class c{inflight=null;pending=null;closed=!1;config;constructor(Q){this.config=Q}enqueue(Q){if(this.closed)return;this.pending=this.pending?d(this.pending,Q):Q,this.drain()}close(){this.closed=!0,this.pending=null}async drain(){if(this.inflight||this.closed)return;if(!this.pending)return;let Q=this.pending;this.pending=null,this.inflight=this.sendWithRetry(Q).then(()=>{if(this.inflight=null,this.pending&&!this.closed)this.drain()})}async sendWithRetry(Q){let W=Q,Z=0;while(!this.closed){if(await this.config.send(W))return;if(Z++,await U(this.retryDelay(Z)),this.pending&&!this.closed)W=d(W,this.pending),this.pending=null}}retryDelay(Q){let W=Math.min(this.config.baseDelayMs*2**(Q-1),this.config.maxDelayMs),Z=Math.random()*this.config.jitterMs;return W+Z}}function d(Q,W){let Z={...Q};for(let[z,$]of Object.entries(W))if((z==="external_metadata"||z==="internal_metadata")&&Z[z]&&typeof Z[z]==="object"&&typeof $==="object"&&$!==null)Z[z]={...Z[z],...$};else Z[z]=$;return Z}var VQ=20000,YQ=100;function l(){return!0}class M extends Error{reason;constructor(Q){super(`CCRClient init failed: ${Q}`);this.reason=Q}}var XQ=10;function qQ(){return{byMessage:new Map,scopeToMessage:new Map}}function S(Q){return`${Q.session_id}:${Q.parent_tool_use_id??""}`}function wQ(Q,W){let Z=[],z=new Map;for(let $ of Q)switch($.event.type){case"message_start":{let J=$.event.message.id,G=W.scopeToMessage.get(S($));if(G)W.byMessage.delete(G);W.scopeToMessage.set(S($),J),W.byMessage.set(J,[]),Z.push($);break}case"content_block_delta":{if($.event.delta.type!=="text_delta"){Z.push($);break}let J=W.scopeToMessage.get(S($)),G=J?W.byMessage.get(J):void 0;if(!G){Z.push($);break}let X=G[$.event.index]??=[];X.push($.event.delta.text);let q=z.get(X);if(q){q.event.delta.text=X.join("");break}let L={type:"stream_event",uuid:$.uuid,session_id:$.session_id,parent_tool_use_id:$.parent_tool_use_id,event:{type:"content_block_delta",index:$.event.index,delta:{type:"text_delta",text:X.join("")}}};z.set(X,L),Z.push(L);break}default:Z.push($)}return Z}function LQ(Q,W){Q.byMessage.delete(W.message.id);let Z=S(W);if(Q.scopeToMessage.get(Z)===W.message.id)Q.scopeToMessage.delete(Z)}class OQ{workerEpoch=0;heartbeatIntervalMs;heartbeatJitterFraction;heartbeatTimer=null;heartbeatInFlight=!1;closed=!1;consecutiveAuthFailures=0;currentState=null;sessionBaseUrl;sessionId;http=n({keepAlive:!0});streamEventBuffer=[];streamEventTimer=null;streamTextAccumulator=qQ();workerState;eventUploader;internalEventUploader;deliveryUploader;onEpochMismatch;getAuthHeaders;constructor(Q,W,Z){if(this.onEpochMismatch=Z?.onEpochMismatch??(()=>{process.exit(1)}),this.heartbeatIntervalMs=Z?.heartbeatIntervalMs??VQ,this.heartbeatJitterFraction=Z?.heartbeatJitterFraction??0,this.getAuthHeaders=Z?.getAuthHeaders??E,W.protocol!=="http:"&&W.protocol!=="https:")throw Error(`CCRClient: Expected http(s) URL, got ${W.protocol}`);let z=W.pathname.replace(/\/$/,"");this.sessionBaseUrl=`${W.protocol}//${W.host}${z}`,this.sessionId=z.split("/").pop()||"",this.workerState=new c({send:($)=>this.request("put","/worker",{worker_epoch:this.workerEpoch,...$},"PUT worker").then((J)=>J.ok),baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.eventUploader=new x({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:1e5,send:async($)=>{let J=await this.request("post","/worker/events",{worker_epoch:this.workerEpoch,events:$},"client events");if(!J.ok)throw new T("client event POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.internalEventUploader=new x({maxBatchSize:100,maxBatchBytes:10485760,maxQueueSize:200,send:async($)=>{let J=await this.request("post","/worker/internal-events",{worker_epoch:this.workerEpoch,events:$},"internal events");if(!J.ok)throw new T("internal event POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),this.deliveryUploader=new x({maxBatchSize:64,maxQueueSize:64,send:async($)=>{let J=await this.request("post","/worker/events/delivery",{worker_epoch:this.workerEpoch,updates:$.map((G)=>({event_id:G.eventId,status:G.status}))},"delivery batch");if(!J.ok)throw new T("delivery POST failed",J.retryAfterMs)},baseDelayMs:500,maxDelayMs:30000,jitterMs:500}),Q.setOnEvent(($)=>{this.reportDelivery($.event_id,"received")})}async initialize(Q){let W=Date.now();if(Object.keys(this.getAuthHeaders()).length===0)throw new M("no_auth_headers");if(Q===void 0){let G=process.env.CLAUDE_CODE_WORKER_EPOCH;Q=G?parseInt(G,10):NaN}if(isNaN(Q))throw new M("missing_epoch");this.workerEpoch=Q;let Z=this.getWorkerState();if(!(await this.request("put","/worker",{worker_status:"idle",worker_epoch:this.workerEpoch,external_metadata:{pending_action:null,task_summary:null}},"PUT worker (init)")).ok)throw new M("worker_register_failed");this.currentState="idle",this.startHeartbeat(),o(()=>{this.writeEvent({type:"keep_alive"})}),K(`CCRClient: initialized, epoch=${this.workerEpoch}`),Y("info","cli_worker_lifecycle_initialized",{epoch:this.workerEpoch,duration_ms:Date.now()-W});let{metadata:$,durationMs:J}=await Z;if(!this.closed)Y("info","cli_worker_state_restored",{duration_ms:J,had_state:$!==null});return $}async getWorkerState(){let Q=Date.now(),W=this.getAuthHeaders();if(Object.keys(W).length===0)return{metadata:null,durationMs:0};return{metadata:(await this.getWithRetry(`${this.sessionBaseUrl}/worker`,W,"worker_state"))?.worker?.external_metadata??null,durationMs:Date.now()-Q}}async request(Q,W,Z,z,{timeout:$=1e4}={}){let J=this.getAuthHeaders();if(Object.keys(J).length===0)return{ok:!1};try{let G=await this.http[Q](`${this.sessionBaseUrl}${W}`,Z,{headers:{...J,"Content-Type":"application/json","anthropic-version":"2023-06-01","User-Agent":N()},validateStatus:l,timeout:$});if(G.status>=200&&G.status<300)return this.consecutiveAuthFailures=0,{ok:!0};if(G.status===409)this.handleEpochMismatch();if(G.status===401||G.status===403){let X=a(),q=X?f(X):null;if(q!==null&&q*1000<Date.now())K(`CCRClient: session_token expired (exp=${new Date(q*1000).toISOString()}) — no refresh was delivered, exiting`,{level:"error"}),Y("error","cli_worker_token_expired_no_refresh"),this.onEpochMismatch();if(this.consecutiveAuthFailures++,this.consecutiveAuthFailures>=XQ)K(`CCRClient: ${this.consecutiveAuthFailures} consecutive auth failures with a valid-looking token — server-side auth unrecoverable, exiting`,{level:"error"}),Y("error","cli_worker_auth_failures_exhausted"),this.onEpochMismatch()}if(K(`CCRClient: ${z} returned ${G.status}`,{level:"warn"}),Y("warn","cli_worker_request_failed",{method:Q,path:W,status:G.status}),G.status===429){let X=G.headers?.["retry-after"],q=typeof X==="string"?parseInt(X,10):NaN;if(!isNaN(q)&&q>=0)return{ok:!1,retryAfterMs:q*1000}}return{ok:!1}}catch(G){return K(`CCRClient: ${z} failed: ${H(G)}`,{level:"warn"}),Y("warn","cli_worker_request_error",{method:Q,path:W,error_code:i(G)}),{ok:!1}}}reportState(Q,W){if(Q===this.currentState&&!W)return;this.currentState=Q,this.workerState.enqueue({worker_status:Q,requires_action_details:W?{tool_name:W.tool_name,action_description:W.action_description,request_id:W.request_id}:null})}reportMetadata(Q){this.workerState.enqueue({external_metadata:Q})}handleEpochMismatch(){K("CCRClient: Epoch mismatch (409), shutting down",{level:"error"}),Y("error","cli_worker_epoch_mismatch"),this.onEpochMismatch()}startHeartbeat(){this.stopHeartbeat();let Q=()=>{let Z=this.heartbeatIntervalMs*this.heartbeatJitterFraction*(2*Math.random()-1);this.heartbeatTimer=setTimeout(W,this.heartbeatIntervalMs+Z)},W=()=>{if(this.sendHeartbeat(),this.heartbeatTimer===null)return;Q()};Q()}stopHeartbeat(){if(this.heartbeatTimer)clearTimeout(this.heartbeatTimer),this.heartbeatTimer=null}async sendHeartbeat(){if(this.heartbeatInFlight)return;this.heartbeatInFlight=!0;try{if((await this.request("post","/worker/heartbeat",{session_id:this.sessionId,worker_epoch:this.workerEpoch},"Heartbeat",{timeout:5000})).ok)K("CCRClient: Heartbeat sent")}finally{this.heartbeatInFlight=!1}}async writeEvent(Q){if(Q.type==="stream_event"){if(this.streamEventBuffer.push(Q),!this.streamEventTimer)this.streamEventTimer=setTimeout(()=>void this.flushStreamEventBuffer(),YQ);return}if(await this.flushStreamEventBuffer(),Q.type==="assistant")LQ(this.streamTextAccumulator,Q);await this.eventUploader.enqueue(this.toClientEvent(Q))}toClientEvent(Q){let W=Q;return{payload:{...W,uuid:typeof W.uuid==="string"?W.uuid:g()}}}async flushStreamEventBuffer(){if(this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;if(this.streamEventBuffer.length===0)return;let Q=this.streamEventBuffer;this.streamEventBuffer=[];let W=wQ(Q,this.streamTextAccumulator);await this.eventUploader.enqueue(W.map((Z)=>({payload:Z,ephemeral:!0})))}async writeInternalEvent(Q,W,{isCompaction:Z=!1,agentId:z}={}){let $={payload:{type:Q,...W,uuid:typeof W.uuid==="string"?W.uuid:g()},...Z&&{is_compaction:!0},...z&&{agent_id:z}};await this.internalEventUploader.enqueue($)}flushInternalEvents(){return this.internalEventUploader.flush()}async flush(){return await this.flushStreamEventBuffer(),this.eventUploader.flush()}async readInternalEvents(){return this.paginatedGet("/worker/internal-events",{},"internal_events")}async readSubagentInternalEvents(){return this.paginatedGet("/worker/internal-events",{subagents:"true"},"subagent_events")}async paginatedGet(Q,W,Z){let z=this.getAuthHeaders();if(Object.keys(z).length===0)return null;let $=[],J;do{let G=new URL(`${this.sessionBaseUrl}${Q}`);for(let[q,L]of Object.entries(W))G.searchParams.set(q,L);if(J)G.searchParams.set("cursor",J);let X=await this.getWithRetry(G.toString(),z,Z);if(!X)return null;$.push(...X.data??[]),J=X.next_cursor}while(J);return K(`CCRClient: Read ${$.length} internal events from ${Q}${W.subagents?" (subagents)":""}`),$}async getWithRetry(Q,W,Z){for(let z=1;z<=10;z++){let $;try{$=await this.http.get(Q,{headers:{...W,"anthropic-version":"2023-06-01","User-Agent":N()},validateStatus:l,timeout:30000})}catch(J){if(K(`CCRClient: GET ${Q} failed (attempt ${z}/10): ${H(J)}`,{level:"warn"}),z<10){let G=Math.min(500*2**(z-1),30000)+Math.random()*500;await U(G)}continue}if($.status>=200&&$.status<300)return $.data;if($.status===409)this.handleEpochMismatch();if(K(`CCRClient: GET ${Q} returned ${$.status} (attempt ${z}/10)`,{level:"warn"}),z<10){let J=Math.min(500*2**(z-1),30000)+Math.random()*500;await U(J)}}return K("CCRClient: GET retries exhausted",{level:"error"}),Y("error","cli_worker_get_retries_exhausted",{context:Z}),null}reportDelivery(Q,W){this.deliveryUploader.enqueue({eventId:Q,status:W})}getWorkerEpoch(){return this.workerEpoch}get internalEventsPending(){return this.internalEventUploader.pendingCount}close(){if(this.closed=!0,this.stopHeartbeat(),s(),this.streamEventTimer)clearTimeout(this.streamEventTimer),this.streamEventTimer=null;this.streamEventBuffer=[],this.streamTextAccumulator.byMessage.clear(),this.streamTextAccumulator.scopeToMessage.clear(),this.workerState.close(),this.eventUploader.close(),this.internalEventUploader.close(),this.deliveryUploader.close()}}jQ();b();h();F();r();I();y();t();var BQ=1000,HQ=30000,UQ=600000,CQ=45000,PQ=new Set([401,403,404]),A=10,TQ=500,NQ=8000,kQ={stream:!0};function xQ(){return!0}function AQ(Q){let W=[],Z=0,z;while((z=Q.indexOf(`
|
|
2
2
|
|
|
3
3
|
`,Z))!==-1){let $=Q.slice(Z,z);if(Z=z+2,!$.trim())continue;let J={},G=!1;for(let X of $.split(`
|
|
4
4
|
`)){if(X.startsWith(":")){G=!0;continue}let q=X.indexOf(":");if(q===-1)continue;let L=X.slice(0,q),O=X[q+1]===" "?X.slice(q+2):X.slice(q+1);switch(L){case"event":J.event=O;break;case"id":J.id=O;break;case"data":J.data=J.data?J.data+`
|
|
5
5
|
`+O:O;break}}if(J.data||G)W.push(J)}return{frames:W,remaining:Q.slice(Z)}}class _Q{url;state="idle";onData;onCloseCallback;onEventCallback;headers;sessionId;refreshHeaders;getAuthHeaders;abortController=null;lastSequenceNum=0;seenSequenceNums=new Set;reconnectAttempts=0;reconnectStartTime=null;reconnectTimer=null;livenessTimer=null;postUrl;constructor(Q,W={},Z,z,$,J){this.url=Q;if(this.headers=W,this.sessionId=Z,this.refreshHeaders=z,this.getAuthHeaders=J??E,this.postUrl=RQ(Q),$!==void 0&&$>0)this.lastSequenceNum=$;K(`SSETransport: SSE URL = ${Q.href}`),K(`SSETransport: POST URL = ${this.postUrl}`),Y("info","cli_sse_transport_initialized")}getLastSequenceNum(){return this.lastSequenceNum}async connect(){if(this.state!=="idle"&&this.state!=="reconnecting"){K(`SSETransport: Cannot connect, current state is ${this.state}`,{level:"error"}),Y("error","cli_sse_connect_failed");return}this.state="reconnecting";let Q=Date.now(),W=new URL(this.url.href);if(this.lastSequenceNum>0)W.searchParams.set("from_sequence_num",String(this.lastSequenceNum));let Z=this.getAuthHeaders(),z={...this.headers,...Z,Accept:"text/event-stream","anthropic-version":"2023-06-01","User-Agent":N()};if(Z.Cookie)delete z.Authorization;if(this.lastSequenceNum>0)z["Last-Event-ID"]=String(this.lastSequenceNum);K(`SSETransport: Opening ${W.href}`),Y("info","cli_sse_connect_opening"),this.abortController=new AbortController;try{let $=await fetch(W.href,{headers:z,signal:this.abortController.signal});if(!$.ok){let G=PQ.has($.status);if(K(`SSETransport: HTTP ${$.status}${G?" (permanent)":""}`,{level:"error"}),Y("error","cli_sse_connect_http_error",{status:$.status}),G){this.state="closed",this.onCloseCallback?.($.status);return}this.handleConnectionError();return}if(!$.body){K("SSETransport: No response body"),this.handleConnectionError();return}let J=Date.now()-Q;K("SSETransport: Connected"),Y("info","cli_sse_connect_connected",{duration_ms:J}),this.state="connected",this.reconnectAttempts=0,this.reconnectStartTime=null,this.resetLivenessTimer(),await this.readStream($.body)}catch($){if(this.abortController?.signal.aborted)return;K(`SSETransport: Connection error: ${H($)}`,{level:"error"}),Y("error","cli_sse_connect_error"),this.handleConnectionError()}}async readStream(Q){let W=Q.getReader(),Z=new TextDecoder,z="";try{while(!0){let{done:$,value:J}=await W.read();if($)break;z+=Z.decode(J,kQ);let{frames:G,remaining:X}=AQ(z);z=X;for(let q of G){if(this.resetLivenessTimer(),q.id){let L=parseInt(q.id,10);if(!isNaN(L)){if(this.seenSequenceNums.has(L))K(`SSETransport: DUPLICATE frame seq=${L} (lastSequenceNum=${this.lastSequenceNum}, seenCount=${this.seenSequenceNums.size})`,{level:"warn"}),Y("warn","cli_sse_duplicate_sequence");else if(this.seenSequenceNums.add(L),this.seenSequenceNums.size>1000){let O=this.lastSequenceNum-200;for(let _ of this.seenSequenceNums)if(_<O)this.seenSequenceNums.delete(_)}if(L>this.lastSequenceNum)this.lastSequenceNum=L}}if(q.event&&q.data)this.handleSSEFrame(q.event,q.data);else if(q.data)K("SSETransport: Frame has data: but no event: field — dropped",{level:"warn"}),Y("warn","cli_sse_frame_missing_event_field")}}}catch($){if(this.abortController?.signal.aborted)return;K(`SSETransport: Stream read error: ${H($)}`,{level:"error"}),Y("error","cli_sse_stream_read_error")}finally{W.releaseLock()}if(this.state!=="closing"&&this.state!=="closed")K("SSETransport: Stream ended, reconnecting"),this.handleConnectionError()}handleSSEFrame(Q,W){if(Q!=="client_event"){K(`SSETransport: Unexpected SSE event type '${Q}' on worker stream`,{level:"warn"}),Y("warn","cli_sse_unexpected_event_type",{event_type:Q});return}let Z;try{Z=R(W)}catch($){K(`SSETransport: Failed to parse client_event data: ${H($)}`,{level:"error"});return}let z=Z.payload;if(z&&typeof z==="object"&&"type"in z){let $=this.sessionId?` session=${this.sessionId}`:"";K(`SSETransport: Event seq=${Z.sequence_num} event_id=${Z.event_id} event_type=${Z.event_type} payload_type=${String(z.type)}${$}`),Y("info","cli_sse_message_received"),this.onData?.(k(z)+`
|
|
6
6
|
`)}else K(`SSETransport: Ignoring client_event with no type in payload: event_id=${Z.event_id}`);this.onEventCallback?.(Z)}handleConnectionError(){if(this.clearLivenessTimer(),this.state==="closing"||this.state==="closed")return;this.abortController?.abort(),this.abortController=null;let Q=Date.now();if(!this.reconnectStartTime)this.reconnectStartTime=Q;let W=Q-this.reconnectStartTime;if(W<UQ){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.refreshHeaders){let $=this.refreshHeaders();Object.assign(this.headers,$),K("SSETransport: Refreshed headers for reconnect")}this.state="reconnecting",this.reconnectAttempts++;let Z=Math.min(BQ*Math.pow(2,this.reconnectAttempts-1),HQ),z=Math.max(0,Z+Z*0.25*(2*Math.random()-1));K(`SSETransport: Reconnecting in ${Math.round(z)}ms (attempt ${this.reconnectAttempts}, ${Math.round(W/1000)}s elapsed)`),Y("error","cli_sse_reconnect_attempt",{reconnectAttempts:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},z)}else K(`SSETransport: Reconnection time budget exhausted after ${Math.round(W/1000)}s`,{level:"error"}),Y("error","cli_sse_reconnect_exhausted",{reconnectAttempts:this.reconnectAttempts,elapsedMs:W}),this.state="closed",this.onCloseCallback?.()}onLivenessTimeout=()=>{this.livenessTimer=null,K("SSETransport: Liveness timeout, reconnecting",{level:"error"}),Y("error","cli_sse_liveness_timeout"),this.abortController?.abort(),this.handleConnectionError()};resetLivenessTimer(){this.clearLivenessTimer(),this.livenessTimer=setTimeout(this.onLivenessTimeout,CQ)}clearLivenessTimer(){if(this.livenessTimer)clearTimeout(this.livenessTimer),this.livenessTimer=null}async write(Q){let W=this.getAuthHeaders();if(Object.keys(W).length===0){K("SSETransport: No session token available for POST"),Y("warn","cli_sse_post_no_token");return}let Z={...W,"Content-Type":"application/json","anthropic-version":"2023-06-01","User-Agent":N()};K(`SSETransport: POST body keys=${Object.keys(Q).join(",")}`);for(let z=1;z<=A;z++){try{let J=await e.post(this.postUrl,Q,{headers:Z,validateStatus:xQ});if(J.status===200||J.status===201){K(`SSETransport: POST success type=${Q.type}`);return}if(K(`SSETransport: POST ${J.status} body=${k(J.data).slice(0,200)}`),J.status>=400&&J.status<500&&J.status!==429){K(`SSETransport: POST returned ${J.status} (client error), not retrying`),Y("warn","cli_sse_post_client_error",{status:J.status});return}K(`SSETransport: POST returned ${J.status}, attempt ${z}/${A}`),Y("warn","cli_sse_post_retryable_error",{status:J.status,attempt:z})}catch(J){K(`SSETransport: POST error: ${J.message}, attempt ${z}/${A}`),Y("warn","cli_sse_post_network_error",{attempt:z})}if(z===A){K(`SSETransport: POST failed after ${A} attempts, continuing`),Y("warn","cli_sse_post_retries_exhausted");return}let $=Math.min(TQ*Math.pow(2,z-1),NQ);await U($)}}isConnectedStatus(){return this.state==="connected"}isClosedStatus(){return this.state==="closed"}setOnData(Q){this.onData=Q}setOnClose(Q){this.onCloseCallback=Q}setOnEvent(Q){this.onEventCallback=Q}close(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;this.clearLivenessTimer(),this.state="closing",this.abortController?.abort(),this.abortController=null}}function RQ(Q){let W=Q.pathname;if(W.endsWith("/stream"))W=W.slice(0,-7);return`${Q.protocol}//${Q.host}${W}`}
|
|
7
|
-
export{FQ as
|
|
7
|
+
export{FQ as D,x as E,M as F,OQ as G,_Q as H};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
function t(s){if(s===null||typeof s!=="object")return s;let e=s;if("requestId"in e&&!("request_id"in e))e.request_id=e.requestId,delete e.requestId;if("response"in e&&e.response!==null&&typeof e.response==="object"){let n=e.response;if("requestId"in n&&!("request_id"in n))n.request_id=n.requestId,delete n.requestId}return s}
|
|
2
|
-
export{t as
|
|
2
|
+
export{t as Qa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{Z as
|
|
1
|
+
import{qS as y,rS as O}from"./cli-0.1.15-8v8bskr0.mjs";import{AU as h,CU as T,fV as H}from"./cli-0.1.15-68f0jtkh.mjs";import{EV as s,GV as I}from"./cli-0.1.15-gxgy4enj.mjs";import{HV as z}from"./cli-0.1.15-tp614m5f.mjs";import{e6 as E,f6 as A}from"./cli-0.1.15-4892kydg.mjs";import{Qda as i,Rda as U,Sda as R,Tda as p,gea as V}from"./cli-0.1.15-11sdbfxy.mjs";import{Zla as X,bma as q}from"./cli-0.1.15-mhbfhhf6.mjs";function J(o){if(o.startsWith("file-"))return"+";if(o.startsWith("mcp-resource-"))return"◇";if(o.startsWith("agent-"))return"*";return"+"}function K(o){return o.startsWith("file-")||o.startsWith("mcp-resource-")||o.startsWith("agent-")}function Z({suggestions:o,selectedSuggestion:t,maxColumnWidth:m,overlay:e}){let{rows:a}=y(),r=e?Y:Math.min(6,Math.max(1,a-3));if(o.length===0)return null;let u=m??Math.max(...o.map((n)=>i(n.displayText)))+5,l=Math.max(0,Math.min(t-Math.floor(r/2),o.length-r)),f=Math.min(l+r,o.length),d=o.slice(l,f);return s(h,{flexDirection:"column",justifyContent:e?void 0:"flex-end",children:d.map((n)=>s(Q,{item:n,maxColumnWidth:u,isSelected:n.id===o[t]?.id},`${n.id}:${n.id===o[t]?.id?"selected":"idle"}`))})}var C,Y=5,k,G=" ",W,Q,at;var j=q(()=>{A();O();U();H();V();I();C=X(z(),1),k=`${E.pointer} `,W=i(k);Q=C.memo(function({item:t,maxColumnWidth:m,isSelected:e}){let a=y().columns,r=e?k:G,u=e?"suggestion":void 0,l=e?"inverseText":void 0;if(K(t.id)){let $=J(t.id),F=!e,N=t.id.startsWith("file-"),_=t.id.startsWith("mcp-resource-"),tt=2,ot=4,b=t.description?3:0,c;if(N){let x=t.description?Math.min(20,i(t.description)):0,L=a-W-2-4-b-x;c=R(t.displayText,L)}else if(_)c=p(t.displayText,30);else c=t.displayText;let v=a-W-2-i(c)-b-4,g;if(t.description){let x=p(t.description.replace(/\s+/g," "),Math.max(0,v));g=`${r}${$} ${c} - ${x}`}else g=`${r}${$} ${c}`;return s(h,{width:"100%",opaque:!0,backgroundColor:u,children:s(T,{color:l,dimColor:F,bold:e,wrap:"truncate",children:g})})}let f=Math.floor(a*0.4),d=Math.min(m??i(t.displayText)+5,f),n=t.displayText;if(i(n)>d-2)n=p(n,d-2);let w=r+n+" ".repeat(Math.max(0,d-i(n))),M=t.tag?`[${t.tag}] `:"",P=i(M),D=Math.max(0,a-W-d-P-4),S=t.description?p(t.description.replace(/\s+/g," "),D):"",B=`${w}${M}${S}`;return s(h,{width:"100%",opaque:!0,backgroundColor:u,children:s(T,{color:l,dimColor:!e,bold:e,wrap:"truncate",children:B})})});at=C.memo(Z)});
|
|
2
|
+
export{Z as qg,at as rg,j as sg};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{Fz as
|
|
1
|
+
import{Wa as Uq}from"./cli-0.1.15-618hqv9f.mjs";import{AM as L,Au as iq,BA as Y,Cl as _,DA as p,EA as d,GA as _q,Hy as Kq,Il as cq,Ip as W,JA as Qq,Jy as lq,KA as Xq,KO as eq,LN as l,Np as dq,OA as oq,PH as $q,Qp as Gq,Rp as gq,To as hq,Vh as b,XL as Bq,YL as Vq,ZL as Yq,_H as sq,aN as tq,cO as a,eL as u,fL as i,hi as mq,kA as v,lA as aq,oO as Tq,pL as Oq,qO as D,rO as x,sM as yq,vC as w,vp as zq,wC as nq,wF as g,xp as pq,zF as Lq,zM as Rq,zl as qq,zu as Jq}from"./cli-0.1.15-26hkdean.mjs";import{wP as h,xP as Mq}from"./cli-0.1.15-a8kgfrkd.mjs";import{OP as Hq,aQ as uq}from"./cli-0.1.15-3jz926ax.mjs";import{bR as Zq,eR as rq}from"./cli-0.1.15-216kns0c.mjs";import{H1 as e,N1 as Aq}from"./cli-0.1.15-q35rzjnz.mjs";import{vca as T,wca as Sq}from"./cli-0.1.15-rr65b3dk.mjs";import{yea as c,zea as Nq}from"./cli-0.1.15-b7f6hacc.mjs";import{Cea as S,Eea as Fq,mfa as A,qfa as Iq,wfa as B,zfa as m}from"./cli-0.1.15-nk50qhet.mjs";import{Dha as O,Gia as s,Iia as t,Nka as E,Vka as C,mla as f,tha as P,uha as Eq,vha as n,yha as r}from"./cli-0.1.15-12azgmva.mjs";Mq();f();Oq();Nq();_q();Lq();Fq();m();Iq();Tq();Eq();import*as $ from"path";var bq=1000,Wq=500,vq=300,wq=2000,Dq=typeof Bun<"u",X=null,Z=null,y=new Set,N=!1,M=!1,k=!1,j=null,U=P(),R=null;async function xq(){if(N||M)return;if(N=!0,!k)k=!0,d(()=>{u(),U.emit()});let q=await Pq();if(q.length===0)return;B(`Watching for changes in skill/command directories: ${q.join(", ")}...`),X=h.watch(q,{persistent:!0,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:R?.stabilityThreshold??bq,pollInterval:R?.pollInterval??Wq},ignored:(z,G)=>{if(G&&!G.isFile()&&!G.isDirectory())return!0;return z.split($.sep).some((H)=>H===".git")},ignorePermissionErrors:!0,usePolling:Dq,interval:R?.chokidarInterval??wq,atomic:!0}),X.on("add",I),X.on("change",I),X.on("unlink",I),j=S(async()=>{await o()})}function o(){if(M=!0,j)j(),j=null;let q=Promise.resolve();if(X)q=X.close(),X=null;if(Z)clearTimeout(Z),Z=null;return y.clear(),U.clear(),q}var kq=U.subscribe;async function Pq(){let q=A(),z=[],G=Y("userSettings","skills");if(G)try{await q.stat(G),z.push(G)}catch{}let H=Y("userSettings","commands");if(H)try{await q.stat(H),z.push(H)}catch{}let J=Y("projectSettings","skills");if(J)try{let K=$.resolve(J);await q.stat(K),z.push(K)}catch{}let Q=Y("projectSettings","commands");if(Q)try{let K=$.resolve(Q);await q.stat(K),z.push(K)}catch{}for(let K of C()){let V=$.join(K,".claudio","skills");try{await q.stat(V),z.push(V)}catch{}}return z}function I(q){B(`Detected skill change: ${q}`),c("tengu_skill_file_changed",{source:"chokidar"}),Cq(q)}function Cq(q){if(y.add(q),Z)clearTimeout(Z);Z=setTimeout(async()=>{Z=null;let z=[...y];y.clear();let G=await a("skills",z[0]);if(l(G)){B(`ConfigChange hook blocked skill reload (${z.length} paths)`);return}p(),i(),g(),U.emit()},R?.reloadDebounce??vq)}async function fq(q){if(X)await X.close(),X=null;if(Z)clearTimeout(Z),Z=null;y.clear(),U.clear(),N=!1,M=!1,R=q??null}var Fz={initialize:xq,dispose:o,subscribe:kq,resetForTesting:fq};f();nq();oq();cq();gq();pq();import{dirname as qz}from"path";mq();hq();rq();Sq();m();lq();sq();Aq();dq();aq();tq();uq();iq();eq();function zz(q){for(let z=q.length-1;z>=0;z--){let G=q[z];if(G?.type!=="assistant")continue;let H=G.message.content.find((K)=>K.type==="tool_use"&&K.name===Gq);if(!H||H.type!=="tool_use")continue;let J=H.input;if(J===null||typeof J!=="object")return[];let Q=Jq().safeParse(J.todos);return Q.success?Q.data:[]}return[]}function uz(q,z){if(q.fileHistorySnapshots&&q.fileHistorySnapshots.length>0)Kq(q.fileHistorySnapshots,(G)=>{z((H)=>({...H,fileHistory:G}))});if(!Hq()&&q.messages&&q.messages.length>0){let G=zz(q.messages);if(G.length>0){let H=n();z((J)=>({...J,todos:{...J.todos,[H]:G}}))}}}function Gz(q){return}function Hz(q,z){if(!q&&!z)return;return{name:q??"",color:z==="default"?void 0:z}}function Jz(q,z,G){if(z)return{agentDefinition:z,agentType:void 0};if(!q)return E(void 0),{agentDefinition:void 0,agentType:void 0};let H=G.activeAgents.find((J)=>J.agentType===q);if(!H)return B(`Resumed session had agent "${q}" but it is no longer available. Using default behavior.`),E(void 0),{agentDefinition:void 0,agentType:void 0};if(E(H.agentType),!s()&&H.model&&H.model!=="inherit")t(e(H.model));return{agentDefinition:H,agentType:H.agentType}}async function Kz(q,z,G,H){if(!q)return H;_.cache.clear?.();let J=await _(z),Q=[...J.allAgents,...G];return{...J,allAgents:Q,activeAgents:qq(Q)}}function Qz(q){let z=D();if(z){L(z);return}if(!q)return;try{process.chdir(q.worktreePath)}catch{L(null);return}v(q.worktreePath),O(T()),x(q),b(),w(),W.cache.clear?.()}function iz(){let q=D();if(!q)return;x(null),b(),w(),W.cache.clear?.();try{process.chdir(q.originalCwd)}catch{return}v(q.originalCwd),O(T())}async function lz(q,z,G){let H;if(H=G.modeApi?.matchSessionMode(q.mode),H)q.messages.push($q(H,"warning"));if(!z.forkSession){let F=z.sessionIdOverride??q.sessionId;if(F){if(r(zq(F),z.transcriptPath?qz(z.transcriptPath):null),await Uq(),await Vq(),!Qq(F))Xq(q.messages)}}else if(q.contentReplacements?.length)await Bq(q.contentReplacements);if(yq(z.forkSession?{...q,worktreeSession:void 0}:q),!z.forkSession)Qz(q.worktreeSession),Yq();let{agentDefinition:J,agentType:Q}=Jz(q.agentSetting,G.mainThreadAgentDefinition,G.agentDefinitions);Rq(G.modeApi?.isCoordinatorMode()?"coordinator":"normal");let K=z.includeAttribution?Gz(q):void 0,V=Hz(q.agentName,q.agentColor);Zq(q.agentName);let jq=await Kz(!!H,G.currentCwd,G.cliAgents,G.agentDefinitions);return{messages:q.messages,fileHistorySnapshots:q.fileHistorySnapshots,contentReplacements:q.contentReplacements,agentName:q.agentName,agentColor:q.agentColor==="default"?void 0:q.agentColor,restoredAgentDef:J,initialState:{...G.initialState,...Q&&{agent:Q},...K&&{attribution:K},...V&&{standaloneAgentContext:V},agentDefinitions:jq}}}
|
|
2
|
+
export{Fz as Ca,uz as Da,Hz as Ea,Jz as Fa,Qz as Ga,iz as Ha,lz as Ia};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{gf as p,hf as Kq}from"./cli-0.1.15-yxm6wwfz.mjs";import{Pu as d,Qu as Vq,aM as l,aN as Oq}from"./cli-0.1.15-26hkdean.mjs";import{AU as T,CU as R,QS as Zq,WU as $,fV as Gq}from"./cli-0.1.15-68f0jtkh.mjs";import{nV as t,pV as v,sV as e}from"./cli-0.1.15-pya8tbx3.mjs";import{EV as P,FV as N,GV as S}from"./cli-0.1.15-gxgy4enj.mjs";import{HV as Yq}from"./cli-0.1.15-tp614m5f.mjs";import{cW as u,dW as Aq}from"./cli-0.1.15-j5m3s9r5.mjs";import{T7 as j,l6 as G,n6 as o,n8 as s}from"./cli-0.1.15-4892kydg.mjs";import{vca as L,wca as n}from"./cli-0.1.15-rr65b3dk.mjs";import{Yea as c,cfa as Xq,wfa as w,zfa as r}from"./cli-0.1.15-nk50qhet.mjs";import{mla as i,vha as f}from"./cli-0.1.15-12azgmva.mjs";import{Zla as I,bma as h}from"./cli-0.1.15-mhbfhhf6.mjs";import{readdir as qq}from"fs/promises";import{join as zq}from"path";function _(){let H=[process.argv[1]||"",process.execPath||""],q=["/build-ant/","/build-ant-native/","/build-external/","/build-external-native/"];return H.some((z)=>q.some((Q)=>z.includes(Q)))}function Jq(H){let q=_()?"claude-dev":"claude",z=new URL(`${q}://resume`);return z.searchParams.set("session",H),z.searchParams.set("cwd",L()),z.toString()}async function g(){if(_())return!0;let H=process.platform;if(H==="darwin")return j("/Applications/Claude.app");else if(H==="linux"){let{code:q,stdout:z}=await G("xdg-mime",["query","default","x-scheme-handler/claude"]);return q===0&&z.trim().length>0}else if(H==="win32"){let{code:q}=await G("reg",["query","HKEY_CLASSES_ROOT\\claude","/ve"]);return q===0}return!1}async function Qq(){let H=process.platform;if(H==="darwin"){let{code:q,stdout:z}=await G("defaults",["read","/Applications/Claude.app/Contents/Info.plist","CFBundleShortVersionString"]);if(q!==0)return null;let Q=z.trim();return Q.length>0?Q:null}else if(H==="win32"){let q=process.env.LOCALAPPDATA;if(!q)return null;let z=zq(q,"AnthropicClaude");try{let Y=(await qq(z)).filter((W)=>W.startsWith("app-")).map((W)=>W.slice(4)).filter((W)=>K.coerce(W)!==null).sort((W,B)=>{let V=K.coerce(W),y=K.coerce(B);return V.compare(y)});return Y.length>0?Y[Y.length-1]:null}catch{return null}}return null}async function x(){if(!await g())return{status:"not-installed"};let q;try{q=await Qq()}catch{return{status:"ready",version:"unknown"}}if(!q)return{status:"ready",version:"unknown"};let z=K.coerce(q);if(!z||!v(z.version,Hq))return{status:"version-too-old",version:q};return{status:"ready",version:q}}async function Wq(H){let q=process.platform;if(w(`Opening deep link: ${H}`),q==="darwin"){if(_()){let{code:Q}=await G("osascript",["-e",`tell application "Electron" to open location "${H}"`]);return Q===0}let{code:z}=await G("open",[H]);return z===0}else if(q==="linux"){let{code:z}=await G("xdg-open",[H]);return z===0}else if(q==="win32"){let{code:z}=await G("cmd",["/c","start","",H]);return z===0}return!1}async function m(){let H=f();if(!await g())return{success:!1,error:"Claude Desktop is not installed. Install it from https://claude.ai/download"};let z=Jq(H);if(!await Wq(z))return{success:!1,error:"Failed to open Claude Desktop. Please try opening it manually.",deepLinkUrl:z};return{success:!0,deepLinkUrl:z}}var K,Hq="1.1.2396";var k=h(()=>{i();n();r();o();s();e();K=I(t(),1)});function Pq(){switch(process.platform){case"win32":return"https://claude.ai/api/desktop/win32/x64/exe/latest/redirect";default:return"https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect"}}function mq(H){let q=a.c(20),{onDone:z}=H,[Q,Y]=A.useState("checking"),[W,B]=A.useState(null),[V,y]=A.useState(""),O;if(q[0]!==W||q[1]!==z||q[2]!==Q)O=(J)=>{if(Q==="error"){z(W??"Unknown error",{display:"system"});return}if(Q==="prompt-download"){if(J==="y"||J==="Y")u(Pq()).catch(Bq),z(`Starting download. Re-run /desktop once you’ve installed the app.
|
|
2
2
|
Learn more at ${D}`,{display:"system"});else if(J==="n"||J==="N")z(`The desktop app is required for /desktop. Learn more at ${D}`,{display:"system"})}},q[0]=W,q[1]=z,q[2]=Q,q[3]=O;else O=q[3];$(O);let E,F;if(q[4]!==z)E=()=>{(async function(){Y("checking");let X=await x();if(X.status==="not-installed"){y("Claude Desktop is not installed."),Y("prompt-download");return}if(X.status==="version-too-old"){y(`Claude Desktop needs to be updated (found v${X.version}, need v1.1.2396+).`),Y("prompt-download");return}Y("flushing"),await l(),Y("opening");let U=await m();if(!U.success){B(U.error??"Failed to open Claude Desktop"),Y("error");return}Y("success"),setTimeout(Rq,500,z)})().catch((Z)=>{B(c(Z)),Y("error")})},F=[z],q[4]=z,q[5]=E,q[6]=F;else E=q[5],F=q[6];if(A.useEffect(E,F),Q==="error"){let J;if(q[7]!==W)J=N(R,{color:"error",children:["Error: ",W]}),q[7]=W,q[8]=J;else J=q[8];let Z;if(q[9]===Symbol.for("react.memo_cache_sentinel"))Z=P(R,{dimColor:!0,children:"Press any key to continue…"}),q[9]=Z;else Z=q[9];let X;if(q[10]!==J)X=N(T,{flexDirection:"column",paddingX:2,children:[J,Z]}),q[10]=J,q[11]=X;else X=q[11];return X}if(Q==="prompt-download"){let J;if(q[12]!==V)J=P(R,{children:V}),q[12]=V,q[13]=J;else J=q[13];let Z;if(q[14]===Symbol.for("react.memo_cache_sentinel"))Z=P(R,{children:"Download now? (y/n)"}),q[14]=Z;else Z=q[14];let X;if(q[15]!==J)X=N(T,{flexDirection:"column",paddingX:2,children:[J,Z]}),q[15]=J,q[16]=X;else X=q[16];return X}let C;if(q[17]===Symbol.for("react.memo_cache_sentinel"))C={checking:"Checking for Claude Desktop…",flushing:"Saving session…",opening:"Opening Claude Desktop…",success:"Opening in Claude Desktop…"},q[17]=C;else C=q[17];let b=C[Q],M;if(q[18]!==b)M=P(p,{message:b}),q[18]=b,q[19]=M;else M=q[19];return M}async function Rq(H){H("Session transferred to Claude Desktop",{display:"system"}),await d(0,"other")}function Bq(){}var a,A,D="https://clau.de/desktop";var yq=h(()=>{Gq();Aq();k();Xq();Vq();Oq();Kq();S();a=I(Zq(),1),A=I(Yq(),1)});
|
|
3
|
-
export{mq as
|
|
3
|
+
export{mq as ef,yq as ff};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{kb as U,lb as y}from"./cli-0.1.15-5qx5p8cd.mjs";import{pY as K}from"./cli-0.1.15-behp1dag.mjs";import{J2 as _,N2 as $,S2 as H,y3 as f}from"./cli-0.1.15-q35rzjnz.mjs";import{Gaa as G,U$ as Q,X$ as B,Z_ as N,_5 as W,d6 as P,j$ as g,oaa as A,r9 as J,s9 as X,x9 as b,yaa as Y,zaa as Z}from"./cli-0.1.15-4892kydg.mjs";import{Xea as V,cfa as O}from"./cli-0.1.15-nk50qhet.mjs";import{Iia as I,mla as L}from"./cli-0.1.15-12azgmva.mjs";L();f();A();O();P();G();b();g();function i(j){return(k)=>({...k,...typeof j.permission_mode==="string"?{toolPermissionContext:{...k.toolPermissionContext,mode:X(j.permission_mode)}}:{},...typeof j.is_ultraplan_mode==="boolean"?{isUltraplanMode:j.is_ultraplan_mode}:{}})}function p({newState:j,oldState:k}){let R=k.toolPermissionContext.mode,D=j.toolPermissionContext.mode;if(R!==D){let q=J(R),z=J(D);if(q!==z){let F=z==="plan"&&j.isUltraplanMode&&!k.isUltraplanMode?!0:null;U({permission_mode:z,is_ultraplan_mode:F})}y(D)}if(j.mainLoopModel!==k.mainLoopModel&&j.mainLoopModel===null)N("userSettings",{model:void 0}),I(null),Z();if(j.mainLoopModel!==k.mainLoopModel&&j.mainLoopModel!==null)N("userSettings",{model:j.mainLoopModel}),I(j.mainLoopModel),Y(j.mainLoopModel);if(j.expandedView!==k.expandedView){let q=j.expandedView==="tasks",z=j.expandedView==="teammates";if(B().showExpandedTodos!==q||B().showSpinnerTree!==z)Q((F)=>({...F,showExpandedTodos:q,showSpinnerTree:z}))}if(j.verbose!==k.verbose&&B().verbose!==j.verbose){let q=j.verbose;Q((z)=>({...z,verbose:q}))}if(j.settings!==k.settings)try{if(_(),$(),H(),j.settings.env!==k.settings.env)K()}catch(q){W(V(q))}}
|
|
2
|
+
export{i as bb,p as cb};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)},flush:K.flush,dispose:K.dispose}}var R=new Map;function M(G){let K=R.get(G);if(!K){let Q=I(G);K=S({writeFn:(U)=>{try{V().appendFileSync(G,U)}catch{V().mkdirSync(Q),V().appendFileSync(G,U)}},flushIntervalMs:1000,maxBufferSize:50}),R.set(G,K),B(async()=>K?.dispose())}return K}function f(G,K){}function v(G){if(typeof G==="string")return G;if(G&&typeof G==="object"){let K=G;if(typeof K.message==="string")return K.message;if(typeof K.error==="object"&&K.error&&"message"in K.error&&typeof K.error.message==="string")return K.error.message}return}function j(G){let K=G.stack||G.message,Q="";if(H.isAxiosError(G)&&G.config?.url){let U=[`url=${G.config.url}`];if(G.response?.status!==void 0)U.push(`status=${G.response.status}`);let Y=v(G.response?.data);if(Y)U.push(`body=${Y}`);Q=`[${U.join(",")}] `}X(`${G.name}: ${Q}${K}`,{level:"error"}),f(D(),{error:`${Q}${K}`})}function b(G,K){X(`MCP server "${G}" ${K}`,{level:"error"});let Q=J(G),Y={error:K instanceof Error?K.stack||K.message:String(K),timestamp:new Date().toISOString(),sessionId:Z(),cwd:V().cwd()};M(Q).write(Y)}function u(G,K){X(`MCP server "${G}": ${K}`);let Q=J(G),U={debug:K,timestamp:new Date().toISOString(),sessionId:Z(),cwd:V().cwd()};M(Q).write(U)}function k(){z({logError:j,logMCPError:b,logMCPDebug:u,getErrorsPath:D,getMCPLogsPath:J}),X("Error log sink initialized")}function
|
|
3
|
-
export{
|
|
1
|
+
import{M as A}from"./cli-0.1.15-7ve9h395.mjs";import{$4 as P,K4 as H}from"./cli-0.1.15-x69hfzmj.mjs";import{P5 as $,Q5 as y,Y5 as q,Z5 as z,d6 as F}from"./cli-0.1.15-4892kydg.mjs";import{Aea as _,Bea as N,Cea as B,Eea as W,efa as O,ifa as w,mfa as V,qfa as C,wfa as X,zfa as E}from"./cli-0.1.15-nk50qhet.mjs";import{mla as L,vha as Z}from"./cli-0.1.15-12azgmva.mjs";P();L();N();y();W();E();C();F();w();import{dirname as I,join as x}from"path";var T=q(new Date);function D(){return x($.errors(),T+".jsonl")}function J(G){return x($.mcpLogs(G),T+".jsonl")}function S(G){let K=_(G);return{write(Q){K.write(O(Q)+`
|
|
2
|
+
`)},flush:K.flush,dispose:K.dispose}}var R=new Map;function M(G){let K=R.get(G);if(!K){let Q=I(G);K=S({writeFn:(U)=>{try{V().appendFileSync(G,U)}catch{V().mkdirSync(Q),V().appendFileSync(G,U)}},flushIntervalMs:1000,maxBufferSize:50}),R.set(G,K),B(async()=>K?.dispose())}return K}function f(G,K){}function v(G){if(typeof G==="string")return G;if(G&&typeof G==="object"){let K=G;if(typeof K.message==="string")return K.message;if(typeof K.error==="object"&&K.error&&"message"in K.error&&typeof K.error.message==="string")return K.error.message}return}function j(G){let K=G.stack||G.message,Q="";if(H.isAxiosError(G)&&G.config?.url){let U=[`url=${G.config.url}`];if(G.response?.status!==void 0)U.push(`status=${G.response.status}`);let Y=v(G.response?.data);if(Y)U.push(`body=${Y}`);Q=`[${U.join(",")}] `}X(`${G.name}: ${Q}${K}`,{level:"error"}),f(D(),{error:`${Q}${K}`})}function b(G,K){X(`MCP server "${G}" ${K}`,{level:"error"});let Q=J(G),Y={error:K instanceof Error?K.stack||K.message:String(K),timestamp:new Date().toISOString(),sessionId:Z(),cwd:V().cwd()};M(Q).write(Y)}function u(G,K){X(`MCP server "${G}": ${K}`);let Q=J(G),U={debug:K,timestamp:new Date().toISOString(),sessionId:Z(),cwd:V().cwd()};M(Q).write(U)}function k(){z({logError:j,logMCPError:b,logMCPDebug:u,getErrorsPath:D,getMCPLogsPath:J}),X("Error log sink initialized")}function e(){k(),A()}
|
|
3
|
+
export{e as K};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{d as
|
|
1
|
+
import{AU as p,CU as u,IU as UQ,QS as m,WU as h,fV as y,lU as k,mU as FQ}from"./cli-0.1.15-68f0jtkh.mjs";import{EV as S,FV as $,GV as j}from"./cli-0.1.15-gxgy4enj.mjs";import{HV as f}from"./cli-0.1.15-tp614m5f.mjs";import{Qda as GQ,Rda as PQ}from"./cli-0.1.15-11sdbfxy.mjs";import{Zla as W,bma as P}from"./cli-0.1.15-mhbfhhf6.mjs";function d(){let X=c.useContext(k);if(!X)throw Error("useTerminalSize must be used within an Ink App component");return X}var c;var a=P(()=>{FQ();c=W(f(),1)});function o(X,Q){if(Q.escape)return"escape";if(Q.return)return"enter";if(Q.tab)return"tab";if(Q.backspace)return"backspace";if(Q.delete)return"delete";if(Q.upArrow)return"up";if(Q.downArrow)return"down";if(Q.leftArrow)return"left";if(Q.rightArrow)return"right";if(Q.pageUp)return"pageup";if(Q.pageDown)return"pagedown";if(Q.wheelUp)return"wheelup";if(Q.wheelDown)return"wheeldown";if(Q.home)return"home";if(Q.end)return"end";if(X.length===1)return X.toLowerCase();return null}var s=()=>{};function r(X){let Q=X.split("+"),V={key:"",ctrl:!1,alt:!1,shift:!1,meta:!1,super:!1};for(let Z of Q){let Y=Z.toLowerCase();switch(Y){case"ctrl":case"control":V.ctrl=!0;break;case"alt":case"opt":case"option":V.alt=!0;break;case"shift":V.shift=!0;break;case"meta":V.meta=!0;break;case"cmd":case"command":case"super":case"win":V.super=!0;break;case"esc":V.key="escape";break;case"return":V.key="enter";break;case"space":V.key=" ";break;case"↑":V.key="up";break;case"↓":V.key="down";break;case"←":V.key="left";break;case"→":V.key="right";break;default:V.key=Y;break}}return V}function IQ(X){if(X===" ")return[r("space")];return X.trim().split(/\s+/).map(r)}function BQ(X){let Q=[];if(X.ctrl)Q.push("ctrl");if(X.alt)Q.push("alt");if(X.shift)Q.push("shift");if(X.meta)Q.push("meta");if(X.super)Q.push("cmd");let V=EQ(X.key);return Q.push(V),Q.join("+")}function EQ(X){switch(X){case"escape":return"Esc";case" ":return"Space";case"tab":return"tab";case"enter":return"Enter";case"backspace":return"Backspace";case"delete":return"Delete";case"up":return"↑";case"down":return"↓";case"left":return"←";case"right":return"→";case"pageup":return"PageUp";case"pagedown":return"PageDown";case"home":return"Home";case"end":return"End";default:return X}}function b(X){return X.map(BQ).join(" ")}function jQ(X){let Q=[];for(let V of X)for(let[Z,Y]of Object.entries(V.bindings))Q.push({chord:IQ(Z),action:Y,context:V.context});return Q}var i=()=>{};function n(X,Q,V){let Z=V.findLast((Y)=>Y.action===X&&Y.context===Q);return Z?b(Z.chord):void 0}function zQ(X,Q){let V=o(X,Q);if(!V)return null;let Z=Q.escape?!1:Q.meta;return{key:V,ctrl:Q.ctrl,alt:Z,shift:Q.shift,meta:Z,super:Q.super}}function t(X,Q){return X.key===Q.key&&X.ctrl===Q.ctrl&&X.shift===Q.shift&&(X.alt||X.meta)===(Q.alt||Q.meta)&&X.super===Q.super}function NQ(X,Q){if(X.length>=Q.chord.length)return!1;for(let V=0;V<X.length;V++){let Z=X[V],Y=Q.chord[V];if(!Z||!Y)return!1;if(!t(Z,Y))return!1}return!0}function SQ(X,Q){if(X.length!==Q.chord.length)return!1;for(let V=0;V<X.length;V++){let Z=X[V],Y=Q.chord[V];if(!Z||!Y)return!1;if(!t(Z,Y))return!1}return!0}function e(X,Q,V,Z,Y){if(Q.escape&&Y!==null)return{type:"chord_cancelled"};let J=zQ(X,Q);if(!J){if(Y!==null)return{type:"chord_cancelled"};return{type:"none"}}let G=Y?[...Y,J]:[J],q=new Set(V),I=Z.filter((U)=>q.has(U.context)),F=new Map;for(let U of I)if(U.chord.length>G.length&&NQ(G,U))F.set(b(U.chord),U.action);let B=!1;for(let U of F.values())if(U!==null){B=!0;break}if(B)return{type:"chord_started",pending:G};let H;for(let U of I)if(SQ(G,U))H=U;if(H){if(H.action===null)return{type:"unbound"};return{type:"match",action:H.action}}if(Y!==null)return{type:"chord_cancelled"};return{type:"none"}}var QQ=P(()=>{s();i()});function $Q(X){let Q=x.c(24),{bindings:V,pendingChordRef:Z,pendingChord:Y,setPendingChord:J,activeContexts:G,registerActiveContext:q,unregisterActiveContext:I,handlerRegistryRef:F,children:B}=X,H;if(Q[0]!==V)H=(L,O)=>n(L,O,V),Q[0]=V,Q[1]=H;else H=Q[1];let U=H,_;if(Q[2]!==F)_=(L)=>{let O=F.current;if(!O)return _Q;if(!O.has(L.action))O.set(L.action,new Set);return O.get(L.action).add(L),()=>{let D=O.get(L.action);if(D){if(D.delete(L),D.size===0)O.delete(L.action)}}},Q[2]=F,Q[3]=_;else _=Q[3];let v=_,A;if(Q[4]!==G||Q[5]!==F)A=(L)=>{let O=F.current;if(!O)return!1;let D=O.get(L);if(!D||D.size===0)return!1;for(let g of D)if(G.has(g.context))return g.handler(),!0;return!1},Q[4]=G,Q[5]=F,Q[6]=A;else A=Q[6];let R=A,z;if(Q[7]!==V||Q[8]!==Z)z=(L,O,D)=>e(L,O,D,V,Z.current),Q[7]=V,Q[8]=Z,Q[9]=z;else z=Q[9];let w;if(Q[10]!==G||Q[11]!==V||Q[12]!==U||Q[13]!==R||Q[14]!==Y||Q[15]!==q||Q[16]!==v||Q[17]!==J||Q[18]!==z||Q[19]!==I)w={resolve:z,setPendingChord:J,getDisplayText:U,bindings:V,pendingChord:Y,activeContexts:G,registerActiveContext:q,unregisterActiveContext:I,registerHandler:v,invokeAction:R},Q[10]=G,Q[11]=V,Q[12]=U,Q[13]=R,Q[14]=Y,Q[15]=q,Q[16]=v,Q[17]=J,Q[18]=z,Q[19]=I,Q[20]=w;else w=Q[20];let N=w,E;if(Q[21]!==B||Q[22]!==N)E=S(VQ.Provider,{value:N,children:B}),Q[21]=B,Q[22]=N,Q[23]=E;else E=Q[23];return E}function _Q(){}function C(){return T.useContext(VQ)}function pQ(X,Q){let V=x.c(5),Z=Q===void 0?!0:Q,Y=C(),J,G;if(V[0]!==X||V[1]!==Z||V[2]!==Y)J=()=>{if(!Y||!Z)return;return Y.registerActiveContext(X),()=>{Y.unregisterActiveContext(X)}},G=[X,Y,Z],V[0]=X,V[1]=Z,V[2]=Y,V[3]=J,V[4]=G;else J=V[3],G=V[4];T.useLayoutEffect(J,G)}var x,T,VQ;var XQ=P(()=>{QQ();j();x=W(m(),1),T=W(f(),1),VQ=T.createContext(null)});function lQ(X,Q,V={}){let{context:Z="Global",isActive:Y=!0}=V,J=C();M.useEffect(()=>{if(!J||!Y)return;return J.registerHandler({action:X,context:Z,handler:Q})},[X,Z,Q,J,Y]);let G=M.useCallback((q,I,F)=>{if(!J)return;let B=[...J.activeContexts,Z,"Global"],H=[...new Set(B)],U=J.resolve(q,I,H);switch(U.type){case"match":if(J.setPendingChord(null),U.action===X){if(Q()!==!1)F.stopImmediatePropagation()}break;case"chord_started":J.setPendingChord(U.pending),F.stopImmediatePropagation();break;case"chord_cancelled":J.setPendingChord(null);break;case"unbound":J.setPendingChord(null),F.stopImmediatePropagation();break;case"none":break}},[X,Z,Q,J]);h(G,{isActive:Y})}function gQ(X,Q={}){let{context:V="Global",isActive:Z=!0}=Q,Y=C();M.useEffect(()=>{if(!Y||!Z)return;let G=[];for(let[q,I]of Object.entries(X))G.push(Y.registerHandler({action:q,context:V,handler:I}));return()=>{for(let q of G)q()}},[V,X,Y,Z]);let J=M.useCallback((G,q,I)=>{if(!Y)return;let F=[...Y.activeContexts,V,"Global"],B=[...new Set(F)],H=Y.resolve(G,q,B);switch(H.type){case"match":if(Y.setPendingChord(null),H.action in X){let U=X[H.action];if(U&&U()!==!1)I.stopImmediatePropagation()}break;case"chord_started":Y.setPendingChord(H.pending),I.stopImmediatePropagation();break;case"chord_cancelled":Y.setPendingChord(null);break;case"unbound":Y.setPendingChord(null),I.stopImmediatePropagation();break;case"none":break}},[V,X,Y]);h(J,{isActive:Z})}var M;var DQ=P(()=>{y();XQ();M=W(f(),1)});function ZQ(){return K.useContext(l)!==null}function cQ(X){let Q=YQ.c(3),V=K.useContext(l),Z;if(Q[0]!==V||Q[1]!==X)Z=V?{rows:V.rows,columns:V.columns}:X,Q[0]=V,Q[1]=X,Q[2]=Z;else Z=Q[2];return Z}function dQ(){return K.useContext(l)?.scrollRef??null}var YQ,K,l;var JQ=P(()=>{YQ=W(m(),1),K=W(f(),1),l=K.createContext(null)});function HQ(X){let Q=qQ.c(21),{width:V,color:Z,char:Y,padding:J,title:G}=X,q=Y===void 0?"─":Y,I=J===void 0?0:J,{columns:F}=d(),B=Math.max(0,(V??F)-I);if(G){let v=GQ(G)+2,A=Math.max(0,B-v),R=Math.floor(A/2),z=A-R,w=!Z,N;if(Q[0]!==q||Q[1]!==R)N=q.repeat(R),Q[0]=q,Q[1]=R,Q[2]=N;else N=Q[2];let E;if(Q[3]!==G)E=S(u,{dimColor:!0,children:S(UQ,{children:G})}),Q[3]=G,Q[4]=E;else E=Q[4];let L;if(Q[5]!==q||Q[6]!==z)L=q.repeat(z),Q[5]=q,Q[6]=z,Q[7]=L;else L=Q[7];let O;if(Q[8]!==Z||Q[9]!==w||Q[10]!==N||Q[11]!==E||Q[12]!==L)O=$(u,{color:Z,dimColor:w,children:[N," ",E," ",L]}),Q[8]=Z,Q[9]=w,Q[10]=N,Q[11]=E,Q[12]=L,Q[13]=O;else O=Q[13];return O}let H=!Z,U;if(Q[14]!==q||Q[15]!==B)U=q.repeat(B),Q[14]=q,Q[15]=B,Q[16]=U;else U=Q[16];let _;if(Q[17]!==Z||Q[18]!==H||Q[19]!==U)_=S(u,{color:Z,dimColor:H,children:U}),Q[17]=Z,Q[18]=H,Q[19]=U,Q[20]=_;else _=Q[20];return _}var qQ;var LQ=P(()=>{a();PQ();y();j();qQ=W(m(),1)});function VV(X){let Q=OQ.c(9),{children:V,color:Z}=X;if(ZQ()){let q;if(Q[0]!==V)q=S(p,{flexDirection:"column",paddingX:1,flexShrink:0,children:V}),Q[0]=V,Q[1]=q;else q=Q[1];return q}let Y;if(Q[2]!==Z)Y=S(HQ,{color:Z}),Q[2]=Z,Q[3]=Y;else Y=Q[3];let J;if(Q[4]!==V)J=S(p,{flexDirection:"column",paddingX:2,children:V}),Q[4]=V,Q[5]=J;else J=Q[5];let G;if(Q[6]!==Y||Q[7]!==J)G=$(p,{flexDirection:"column",paddingTop:1,children:[Y,J]}),Q[6]=Y,Q[7]=J,Q[8]=G;else G=Q[8];return G}var OQ;var RQ=P(()=>{JQ();y();LQ();j();OQ=W(m(),1)});
|
|
2
|
+
export{d as qS,a as rS,r as sS,IQ as tS,b as uS,jQ as vS,i as wS,n as xS,e as yS,QQ as zS,$Q as AS,C as BS,pQ as CS,XQ as DS,lQ as ES,gQ as FS,DQ as GS,l as HS,ZQ as IS,cQ as JS,dQ as KS,JQ as LS,HQ as MS,LQ as NS,VV as OS,RQ as PS};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{v as
|
|
1
|
+
import{Qa as Y}from"./cli-0.1.15-7mfwj2xs.mjs";import{fP as N,gP as C}from"./cli-0.1.15-69kq5chw.mjs";import{S5 as L,U5 as j}from"./cli-0.1.15-4892kydg.mjs";import{yea as A,zea as w}from"./cli-0.1.15-b7f6hacc.mjs";import{Yea as B,cfa as k,ffa as G,ifa as K,wfa as W,zfa as E}from"./cli-0.1.15-nk50qhet.mjs";w();C();import{randomUUID as O}from"crypto";E();j();k();K();function T(f){return f!==null&&typeof f==="object"&&"type"in f&&typeof f.type==="string"}function P(f){return f!==null&&typeof f==="object"&&"type"in f&&f.type==="control_response"&&"response"in f}function S(f){return f!==null&&typeof f==="object"&&"type"in f&&f.type==="control_request"&&"request_id"in f&&"request"in f}function v(f){if((f.type==="user"||f.type==="assistant")&&f.isVirtual)return!1;return f.type==="user"||f.type==="assistant"||f.type==="system"&&f.subtype==="local_command"}function q(f){if(f.type!=="user"||f.isMeta||f.toolUseResult||f.isCompactSummary)return;if(f.origin&&f.origin.kind!=="human")return;let X=f.message.content,Q;if(typeof X==="string")Q=X;else for(let Z of X)if(Z.type==="text"){Q=Z.text;break}if(!Q)return;return L(Q)||void 0}function p(f,X,Q,$,Z,z){try{let H=Y(G(f));if(P(H)){W("[bridge:repl] Ingress message type=control_response"),Z?.(H);return}if(S(H)){W(`[bridge:repl] Inbound control_request subtype=${H.request.subtype}`),z?.(H);return}if(!T(H))return;let J="uuid"in H&&typeof H.uuid==="string"?H.uuid:void 0;if(J&&X.has(J)){W(`[bridge:repl] Ignoring echo: type=${H.type} uuid=${J}`);return}if(J&&Q.has(J)){W(`[bridge:repl] Ignoring re-delivered inbound: type=${H.type} uuid=${J}`);return}if(W(`[bridge:repl] Ingress message type=${H.type}${J?` uuid=${J}`:""}`),H.type==="user"){if(J)Q.add(J);A("tengu_bridge_message_received",{is_repl:!0}),$?.(H)}else W(`[bridge:repl] Ignoring non-user inbound message: type=${H.type}`)}catch(H){W(`[bridge:repl] Failed to parse ingress message: ${B(H)}`)}}var y="This session is outbound-only. Enable Remote Control locally to allow inbound control.";function g(f,X){let{transport:Q,sessionId:$,outboundOnly:Z,onInterrupt:z,onSetModel:H,onSetMaxThinkingTokens:J,onSetPermissionMode:h}=X;if(!Q){W("[bridge:repl] Cannot respond to control_request: transport not configured");return}let V;if(Z&&f.request.subtype!=="initialize"){V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:y}};let x={...V,session_id:$};Q.write(x),W(`[bridge:repl] Rejected ${f.request.subtype} (outbound-only) request_id=${f.request_id}`);return}switch(f.request.subtype){case"initialize":V={type:"control_response",response:{subtype:"success",request_id:f.request_id,response:{commands:[],output_style:"normal",available_output_styles:["normal"],models:[],account:{},pid:process.pid}}};break;case"set_model":H?.(f.request.model),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;case"set_max_thinking_tokens":J?.(f.request.max_thinking_tokens),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;case"set_permission_mode":{let x=h?.(f.request.mode)??{ok:!1,error:"set_permission_mode is not supported in this context (onSetPermissionMode callback not registered)"};if(x.ok)V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};else V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:x.error}};break}case"interrupt":z?.(),V={type:"control_response",response:{subtype:"success",request_id:f.request_id}};break;default:V={type:"control_response",response:{subtype:"error",request_id:f.request_id,error:`REPL bridge does not handle control_request subtype: ${f.request.subtype}`}}}let _={...V,session_id:$};Q.write(_),W(`[bridge:repl] Sent control_response for ${f.request.subtype} request_id=${f.request_id} result=${V.response.subtype}`)}function d(f){return{type:"result",subtype:"success",duration_ms:0,duration_api_ms:0,is_error:!1,num_turns:0,result:"",stop_reason:null,total_cost_usd:0,usage:{...N},modelUsage:{},permission_denials:[],session_id:f,uuid:O()}}class R{capacity;ring;set=new Set;writeIdx=0;constructor(f){this.capacity=f,this.ring=Array(f)}add(f){if(this.set.has(f))return;let X=this.ring[this.writeIdx];if(X!==void 0)this.set.delete(X);this.ring[this.writeIdx]=f,this.set.add(f),this.writeIdx=(this.writeIdx+1)%this.capacity}has(f){return this.set.has(f)}clear(){this.set.clear(),this.ring.fill(void 0),this.writeIdx=0}}
|
|
2
|
+
export{v as Ka,q as La,p as Ma,g as Na,d as Oa,R as Pa};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ig as G,Kg as m}from"./cli-0.1.15-pcqjreq6.mjs";import{Lg as H,Mg as C}from"./cli-0.1.15-gwbebdj7.mjs";import{VV as X,XV as Y,aW as R}from"./cli-0.1.15-y6fkcbes.mjs";import{cW as k,dW as y}from"./cli-0.1.15-j5m3s9r5.mjs";import{QZ as w,RZ as E,j3 as B,y3 as f}from"./cli-0.1.15-q35rzjnz.mjs";import{$4 as I,K4 as W}from"./cli-0.1.15-x69hfzmj.mjs";import{U$ as S,X$ as j,_5 as Q,d6 as x,oaa as D}from"./cli-0.1.15-4892kydg.mjs";import{hda as V,ida as b}from"./cli-0.1.15-6mad0r56.mjs";import{bma as Z}from"./cli-0.1.15-mhbfhhf6.mjs";async function _(L){let{accessToken:N,orgUUID:P}=await X(),K={...Y(N),"x-organization-uuid":P},J=`${V().BASE_API_URL}/api/oauth/organizations/${P}/admin_requests`;return(await W.post(J,L,{headers:K})).data}async function $(L,N){let{accessToken:P,orgUUID:K}=await X(),J={...Y(P),"x-organization-uuid":K},F=`${V().BASE_API_URL}/api/oauth/organizations/${K}/admin_requests/me?request_type=${L}`;for(let v of N)F+=`&statuses=${v}`;return(await W.get(F,{headers:J})).data}async function z(L){let{accessToken:N,orgUUID:P}=await X(),K={...Y(N),"x-organization-uuid":P},J=`${V().BASE_API_URL}/api/oauth/organizations/${P}/admin_requests/eligibility?request_type=${L}`;return(await W.get(J,{headers:K})).data}var M=Z(()=>{I();b();R()});async function i(){if(!j().hasVisitedExtraUsage)S((J)=>({...J,hasVisitedExtraUsage:!0}));G();let L=B(),N=L==="team"||L==="enterprise";if(!w()&&N){let J;try{J=(await H())?.extra_usage}catch(F){Q(F)}if(J?.is_enabled&&J.monthly_limit===null)return{type:"message",value:"Your organization already has unlimited extra usage. No request needed."};try{if((await z("limit_increase"))?.is_allowed===!1)return{type:"message",value:"Please contact your admin to manage extra usage settings."}}catch(F){Q(F)}try{let F=await $("limit_increase",["pending","dismissed"]);if(F&&F.length>0)return{type:"message",value:"You have already submitted a request for extra usage to your admin."}}catch(F){Q(F)}try{return await _({request_type:"limit_increase",details:null}),{type:"message",value:J?.is_enabled?"Request sent to your admin to increase extra usage.":"Request sent to your admin to enable extra usage."}}catch(F){Q(F)}return{type:"message",value:"Please contact your admin to manage extra usage settings."}}let K=N?"https://claude.ai/admin-settings/usage":"https://claude.ai/settings/usage";try{let J=await k(K);return{type:"browser-opened",url:K,opened:J}}catch(J){return Q(J),{type:"message",value:`Failed to open browser. Please visit ${K} to manage extra usage.`}}}var A=Z(()=>{M();m();C();f();E();y();D();x()});
|
|
2
|
+
export{i as Fg,A as Gg};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fd as w,gd as _,hd as D,id as L,jd as A,kd as h,ld as y}from"./cli-0.1.15-e494j2sj.mjs";import{DG as X,EG as O,Pu as j,Qu as I,Wj as R,Zj as b,pu as W,su as V,uu as C}from"./cli-0.1.15-26hkdean.mjs";import{_5 as U,d6 as M,e6 as K,f6 as N}from"./cli-0.1.15-4892kydg.mjs";import{yea as Q,zea as S}from"./cli-0.1.15-b7f6hacc.mjs";import{Yea as B,cfa as v}from"./cli-0.1.15-nk50qhet.mjs";import{Pfa as x,Tfa as F}from"./cli-0.1.15-tj4kzvth.mjs";N();v();I();M();O();b();F();C();S();y();function Z(z,J,q){U(z);let G=q?`${J} plugin "${q}"`:J==="disable-all"?"disable all plugins":`${J} plugins`;console.error(`${K.cross} Failed to ${G}: ${B(z)}`);let H=q?(()=>{let{name:Y,marketplace:$}=R(q);return{_PROTO_plugin_name:Y,...$&&{_PROTO_marketplace_name:$},...W(Y,$,X())}})():{};Q("tengu_plugin_command_failed",{command:J,error_category:V(z),...H}),process.exit(1)}async function g(z,J="user"){try{console.log(`Installing plugin "${z}"...`);let q=await w(z,J);if(!q.success)throw Error(q.message);console.log(`${K.tick} ${q.message}`);let{name:G,marketplace:H}=R(q.pluginId||z);Q("tengu_plugin_installed_cli",{_PROTO_plugin_name:G,...H&&{_PROTO_marketplace_name:H},scope:q.scope||J,install_source:"cli-explicit",...W(G,H,X())}),process.exit(0)}catch(q){Z(q,"install",z)}}async function a(z,J="user",q=!1){try{let G=await _(z,J,!q);if(!G.success)throw Error(G.message);console.log(`${K.tick} ${G.message}`);let{name:H,marketplace:Y}=R(G.pluginId||z);Q("tengu_plugin_uninstalled_cli",{_PROTO_plugin_name:H,...Y&&{_PROTO_marketplace_name:Y},scope:G.scope||J,...W(H,Y,X())}),process.exit(0)}catch(G){Z(G,"uninstall",z)}}async function i(z,J){try{let q=await D(z,J);if(!q.success)throw Error(q.message);console.log(`${K.tick} ${q.message}`);let{name:G,marketplace:H}=R(q.pluginId||z);Q("tengu_plugin_enabled_cli",{_PROTO_plugin_name:G,...H&&{_PROTO_marketplace_name:H},scope:q.scope,...W(G,H,X())}),process.exit(0)}catch(q){Z(q,"enable",z)}}async function u(z,J){try{let q=await L(z,J);if(!q.success)throw Error(q.message);console.log(`${K.tick} ${q.message}`);let{name:G,marketplace:H}=R(q.pluginId||z);Q("tengu_plugin_disabled_cli",{_PROTO_plugin_name:G,...H&&{_PROTO_marketplace_name:H},scope:q.scope,...W(G,H,X())}),process.exit(0)}catch(q){Z(q,"disable",z)}}async function n(){try{let z=await A();if(!z.success)throw Error(z.message);console.log(`${K.tick} ${z.message}`),Q("tengu_plugin_disabled_all_cli",{}),process.exit(0)}catch(z){Z(z,"disable-all")}}async function r(z,J){try{x(`Checking for updates for plugin "${z}" at ${J} scope…
|
|
2
2
|
`);let q=await h(z,J);if(!q.success)throw Error(q.message);if(x(`${K.tick} ${q.message}
|
|
3
3
|
`),!q.alreadyUpToDate){let{name:G,marketplace:H}=R(q.pluginId||z);Q("tengu_plugin_updated_cli",{_PROTO_plugin_name:G,...H&&{_PROTO_marketplace_name:H},old_version:q.oldVersion||"unknown",new_version:q.newVersion||"unknown",...W(G,H,X())})}await j(0)}catch(q){Z(q,"update",z)}}
|
|
4
|
-
export{g as
|
|
4
|
+
export{g as k,a as l,i as m,u as n,n as o,r as p};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{X as
|
|
1
|
+
import{Lla as M,Mla as Y}from"./cli-0.1.15-p5ty029c.mjs";import{bma as W}from"./cli-0.1.15-mhbfhhf6.mjs";import{homedir as Z}from"os";import{join as Q}from"path";function $(q){if(q?.configDirEnv)return q.configDirEnv.normalize("NFC");let B=q?.homeDir??Z();return Q(B,".claudio").normalize("NFC")}function N(){return process.env.CLAUDIO_CONFIG_DIR}function _(){return Q(X(),"teams")}function j(q){let B=process.env.NODE_OPTIONS;if(!B)return!1;return B.split(/\s+/).includes(q)}function U(q){if(!q)return!1;if(typeof q==="boolean")return q;let B=q.toLowerCase().trim();return["1","true","yes","on"].includes(B)}function I(q){if(q===void 0)return!1;if(typeof q==="boolean")return!q;if(!q)return!1;let B=q.toLowerCase().trim();return["0","false","no","off"].includes(B)}function S(){return U(process.env.CLAUDE_CODE_SIMPLE)||process.argv.includes("--bare")}function T(q){let B={};if(q)for(let F of q){let[J,...K]=F.split("=");if(!J||K.length===0)throw Error(`Invalid environment variable format: ${F}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);B[J]=K.join("=")}return B}function c(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1"}function L(){return process.env.CLOUD_ML_REGION||"us-east5"}function w(){return U(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function z(){return!1}function O(){return!1}function x(q){if(q){let B=b.find(([F])=>q.startsWith(F));if(B)return process.env[B[1]]||L()}return L()}var X,b;var k=W(()=>{Y();X=M(()=>$({configDirEnv:N()}),()=>process.env.CLAUDIO_CONFIG_DIR??"");b=[["claude-haiku-4-5","VERTEX_REGION_CLAUDE_HAIKU_4_5"],["claude-3-5-haiku","VERTEX_REGION_CLAUDE_3_5_HAIKU"],["claude-3-5-sonnet","VERTEX_REGION_CLAUDE_3_5_SONNET"],["claude-3-7-sonnet","VERTEX_REGION_CLAUDE_3_7_SONNET"],["claude-opus-4-7","VERTEX_REGION_CLAUDE_4_7_OPUS"],["claude-opus-4-6","VERTEX_REGION_CLAUDE_4_6_OPUS"],["claude-opus-4-1","VERTEX_REGION_CLAUDE_4_1_OPUS"],["claude-opus-4","VERTEX_REGION_CLAUDE_4_0_OPUS"],["claude-sonnet-4-6","VERTEX_REGION_CLAUDE_4_6_SONNET"],["claude-sonnet-4-5","VERTEX_REGION_CLAUDE_4_5_SONNET"],["claude-sonnet-4","VERTEX_REGION_CLAUDE_4_0_SONNET"]]});
|
|
2
|
+
export{X as Afa,_ as Bfa,j as Cfa,U as Dfa,I as Efa,S as Ffa,T as Gfa,c as Hfa,L as Ifa,w as Jfa,z as Kfa,O as Lfa,x as Mfa,k as Nfa};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{X$ as P,oaa as y}from"./cli-0.1.15-4892kydg.mjs";import{bma as U}from"./cli-0.1.15-mhbfhhf6.mjs";var j,D,G,M,N,Y,C,_,R,f,E,I,k,A,b,h,m,p,u,T,w,L,O,X,$,e;var W=U(()=>{j=["common","uncommon","rare","epic","legendary"],D=String.fromCharCode,G=D(100,117,99,107),M=D(103,111,111,115,101),N=D(98,108,111,98),Y=D(99,97,116),C=D(100,114,97,103,111,110),_=D(111,99,116,111,112,117,115),R=D(111,119,108),f=D(112,101,110,103,117,105,110),E=D(116,117,114,116,108,101),I=D(115,110,97,105,108),k=D(103,104,111,115,116),A=D(97,120,111,108,111,116,108),b=D(99,97,112,121,98,97,114,97),h=D(99,97,99,116,117,115),m=D(114,111,98,111,116),p=D(114,97,98,98,105,116),u=D(109,117,115,104,114,111,111,109),T=D(99,104,111,110,107),w=[G,M,N,Y,C,_,R,f,E,I,k,A,b,h,m,p,u,T],L=["·","✦","×","◉","@","°"],O=["none","crown","tophat","propeller","halo","wizard","beanie","tinyduck"],X=["DEBUGGING","PATIENCE","CHAOS","WISDOM","SNARK"],$={common:60,uncommon:25,rare:10,epic:4,legendary:1},e={common:"inactive",uncommon:"success",rare:"permission",epic:"autoAccept",legendary:"warning"}});function v(q){let z=q>>>0;return function(){z|=0,z=z+1831565813|0;let B=Math.imul(z^z>>>15,1|z);return B=B+Math.imul(B^B>>>7,61|B)^B,((B^B>>>14)>>>0)/4294967296}}function F(q){if(typeof Bun<"u")return Number(BigInt(Bun.hash(q))&0xffffffffn);let z=2166136261;for(let B=0;B<q.length;B++)z^=q.charCodeAt(B),z=Math.imul(z,16777619);return z>>>0}function K(q,z){return z[Math.floor(q()*z.length)]}function S(q){let z=Object.values($).reduce((J,Q)=>J+Q,0),B=q()*z;for(let J of j)if(B-=$[J],B<0)return J;return"common"}function i(q,z){let B=d[z],J=K(q,X),Q=K(q,X);while(Q===J)Q=K(q,X);let Z={};for(let V of X)if(V===J)Z[V]=Math.min(100,B+50+Math.floor(q()*30));else if(V===Q)Z[V]=Math.max(1,B-10+Math.floor(q()*15));else Z[V]=B+Math.floor(q()*40);return Z}function H(q){let z=S(q);return{bones:{rarity:z,species:K(q,w),eye:K(q,L),hat:z==="common"?"none":K(q,O),shiny:q()<0.01,stats:i(q,z)},inspirationSeed:Math.floor(q()*1e9)}}function l(q){let z=q+c;if(x?.key===z)return x.value;let B=H(v(F(z)));return x={key:z,value:B},B}function a(q){return H(v(F(q)))}function s(){let q=P();return q.oauthAccount?.accountUuid??q.userID??"anon"}function r(){let q=P().companion;if(!q)return;let{bones:z}=l(s());return{...q,...z}}var d,c="friend-2026-401",x;var g=U(()=>{y();W();d={common:5,uncommon:15,rare:25,epic:35,legendary:50}});
|
|
2
|
+
export{G as EQ,M as FQ,N as GQ,Y as HQ,C as IQ,_ as JQ,R as KQ,f as LQ,E as MQ,I as NQ,k as OQ,A as PQ,b as QQ,h as RQ,m as SQ,p as TQ,u as UQ,T as VQ,e as WQ,W as XQ,a as YQ,s as ZQ,r as _Q,g as $Q};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{D as
|
|
1
|
+
import{A6 as Z,C6 as f,Paa as $,Qaa as y,vba as B,yba as K}from"./cli-0.1.15-4892kydg.mjs";import{Ffa as Y,Nfa as E}from"./cli-0.1.15-9pe3dbgs.mjs";import{bma as N,cma as x}from"./cli-0.1.15-mhbfhhf6.mjs";import{existsSync as S}from"node:fs";import{homedir as F}from"node:os";import{join as X}from"node:path";function _(){if(Y())return;try{return $().read()?.gemini?.accessToken?.trim()||void 0}catch{return}}function J(b){let w=b?.trim();return w?w:void 0}function V(b=process.env){return J(b.GOOGLE_CLOUD_PROJECT)??J(b.GCLOUD_PROJECT)??J(b.GOOGLE_PROJECT_ID)}function D(b=process.env){let w=J(b.GEMINI_AUTH_MODE)?.toLowerCase();if(w==="api-key"||w==="access-token"||w==="adc")return w;return}function P(b=process.env){let w=J(b.GOOGLE_APPLICATION_CREDENTIALS),q=new Set;if(w)q.add(w);q.add(X(F(),".config","gcloud","application_default_credentials.json"));let O=J(b.APPDATA);if(O)q.add(X(O,"gcloud","application_default_credentials.json"));return[...q]}function k(b=process.env){return P(b).some((w)=>S(w))}function G(b){if(typeof b==="string")return J(b);return J(b?.token)}async function A(){let{GoogleAuth:b}=await import("google-auth-library");return new b({scopes:[z]})}async function L(b,w){if(!k(b))return{kind:"none"};try{let q=await(w.createGoogleAuth??A)(),O=await q.getClient(),R=G(await O.getAccessToken());if(!R)return{kind:"none"};let Q=V(b)??(typeof q.getProjectId==="function"?J(await q.getProjectId().catch(()=>{return})):void 0);return{kind:"adc",credential:R,...Q?{projectId:Q}:{}}}catch{return{kind:"none"}}}async function s(b=process.env,w={}){let q=D(b),O=B(),R=O?.transport==="gemini"?J(O.apiKey):void 0,U=q==="access-token"||q==="adc"?void 0:R;if(U&&(q===void 0||q==="api-key"))return{kind:"api-key",credential:U};let Q=q==="api-key"||q==="adc"?void 0:J(_());if(Q&&(q===void 0||q==="access-token")){let W=V(b);return{kind:"access-token",credential:Q,...W?{projectId:W}:{}}}if(q==="api-key"||q==="access-token")return{kind:"none"};if(w.createGoogleAuth)return L(b,w);return T(J(b.GOOGLE_APPLICATION_CREDENTIALS),J(b.APPDATA),F(),V(b))}var z="https://www.googleapis.com/auth/cloud-platform",C=300000,T;var g=N(()=>{K();E();f();y();T=Z(async(b,w,q,O)=>L({GOOGLE_APPLICATION_CREDENTIALS:b,APPDATA:w,GOOGLE_CLOUD_PROJECT:O,GCLOUD_PROJECT:O,GOOGLE_PROJECT_ID:O,HOME:q},{}),C)});
|
|
2
|
+
export{D as A4,s as B4,g as C4};
|