@caspian2026/agent-sdk 0.0.18 → 0.0.20
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/{chunk-s9dazft8.js → chunk-09nzqj0f.js} +2927 -764
- package/dist/{chunk-9gn2ft16.js → chunk-0a8jb5c8.js} +9 -9
- package/dist/{chunk-xrtkg6a5.js → chunk-0b85d7q0.js} +7 -7
- package/dist/{chunk-5j8md8dg.js → chunk-0dwdg9bz.js} +9 -9
- package/dist/{chunk-ap1wxeh4.js → chunk-0f84wjjc.js} +79 -79
- package/dist/chunk-0fw1mz8s.js +27 -0
- package/dist/{chunk-kwekc97v.js → chunk-0pbwcm8b.js} +1 -1
- package/dist/chunk-0pqv68xt.js +133 -0
- package/dist/chunk-0pv13fxq.js +1684 -0
- package/dist/chunk-0tgn1431.js +38 -0
- package/dist/{chunk-bg4x9ex0.js → chunk-0tja7d1y.js} +6 -6
- package/dist/{chunk-xs6my1r1.js → chunk-0w2ntzwz.js} +92 -92
- package/dist/chunk-0yshjsxt.js +122 -0
- package/dist/chunk-0z9s957c.js +94 -0
- package/dist/{chunk-fyc5fepv.js → chunk-0zscb6c7.js} +1 -1
- package/dist/{chunk-x8d2ehd7.js → chunk-13pmg16e.js} +1 -1
- package/dist/{chunk-v4t6dyyh.js → chunk-15f7ee0j.js} +245 -158
- package/dist/{chunk-ksrvrndt.js → chunk-1ehn6qdp.js} +13 -13
- package/dist/chunk-1gt45dyg.js +101 -0
- package/dist/{chunk-39dpcr2t.js → chunk-1s9jxpjm.js} +7 -7
- package/dist/{chunk-3c25bcsw.js → chunk-1t3cyn1k.js} +1 -1
- package/dist/{chunk-bpa7mm4n.js → chunk-1ycd7t0f.js} +88 -88
- package/dist/{chunk-aj428gay.js → chunk-1ytng03p.js} +12 -12
- package/dist/{chunk-72na7rqk.js → chunk-25jhz0br.js} +16 -16
- package/dist/{chunk-wp3ryedc.js → chunk-26kp0k1t.js} +79 -79
- package/dist/{chunk-175v9c0j.js → chunk-2b00k9ep.js} +78 -78
- package/dist/{chunk-egme4m15.js → chunk-2bh7f2wa.js} +13 -13
- package/dist/{chunk-hf0q1g1n.js → chunk-2bk4jvse.js} +7 -7
- package/dist/{chunk-0vkfrmqm.js → chunk-2mfzqkzn.js} +69 -29
- package/dist/{chunk-szj5wvdy.js → chunk-2qpy8kne.js} +1 -1
- package/dist/{chunk-pwwa7s62.js → chunk-2vc3fyp9.js} +2 -2
- package/dist/{chunk-n4022dzr.js → chunk-37j24srh.js} +6 -6
- package/dist/{chunk-bxd7dzz4.js → chunk-39r7sh1h.js} +90 -90
- package/dist/{chunk-a6d2q415.js → chunk-3hcfwedh.js} +5 -5
- package/dist/{chunk-6e84jw8j.js → chunk-3hxr3x9d.js} +2 -2
- package/dist/{chunk-2zf2y9xh.js → chunk-3jbxhytz.js} +8 -8
- package/dist/{chunk-ch53xex6.js → chunk-3k8ecscj.js} +78 -78
- package/dist/chunk-3kx7brrn.js +55 -0
- package/dist/{chunk-yb6xww2x.js → chunk-3w4xq6cv.js} +92 -92
- package/dist/{chunk-6rhzfq66.js → chunk-3xamk0n1.js} +25 -25
- package/dist/{chunk-yt3s7a7d.js → chunk-41wn5eqw.js} +10 -10
- package/dist/{chunk-fys33rtr.js → chunk-44bqv91d.js} +3 -3
- package/dist/{chunk-cgfdkzhb.js → chunk-4bcx2a3p.js} +1 -1
- package/dist/{chunk-mswx2nma.js → chunk-4e1j46k0.js} +3 -3
- package/dist/{chunk-dg5g4rx6.js → chunk-4fwzreqj.js} +6 -6
- package/dist/{chunk-8p1zdkhr.js → chunk-4kfhh3aw.js} +4 -4
- package/dist/chunk-4kfs8ymb.js +92 -0
- package/dist/{chunk-t29a6zb5.js → chunk-4nqm22j3.js} +6 -4
- package/dist/{chunk-27west95.js → chunk-4v1mr2x2.js} +41 -41
- package/dist/{chunk-qmaadr70.js → chunk-4yq5zz3m.js} +9 -9
- package/dist/{chunk-y6ktw609.js → chunk-52pp0dbk.js} +4 -4
- package/dist/{chunk-3nk79af8.js → chunk-568q88qz.js} +1 -1
- package/dist/{chunk-ase86y73.js → chunk-5f57qtf9.js} +1 -1
- package/dist/{chunk-07069jq1.js → chunk-5gr6ekgm.js} +4 -4
- package/dist/{chunk-ppwjyveh.js → chunk-5nqrdqz5.js} +1 -1
- package/dist/chunk-5rhmrt2j.js +121 -0
- package/dist/{chunk-fbfjz4mv.js → chunk-5sd5fz78.js} +78 -78
- package/dist/{chunk-nsc89h0n.js → chunk-5v6wr1z4.js} +3 -9
- package/dist/{chunk-69n11zng.js → chunk-5vavvf6y.js} +5 -5
- package/dist/{chunk-g6xtx9ad.js → chunk-60a647ty.js} +81 -81
- package/dist/{chunk-dwyaks7s.js → chunk-61x3akfa.js} +2 -2
- package/dist/chunk-626watky.js +50 -0
- package/dist/{chunk-v786pxdf.js → chunk-62jrhytw.js} +10 -10
- package/dist/{chunk-a4x613vq.js → chunk-638qz5y7.js} +5 -5
- package/dist/{chunk-n8780srz.js → chunk-657k4mef.js} +78 -79
- package/dist/chunk-6aqa0ec5.js +145 -0
- package/dist/{chunk-1e7a4d58.js → chunk-6c22q39e.js} +78 -78
- package/dist/{chunk-b0kf00ff.js → chunk-6d05fvxz.js} +2 -2
- package/dist/{chunk-dapz0pb2.js → chunk-6fe0an4e.js} +79 -79
- package/dist/{chunk-wpegnpmd.js → chunk-6fx36a3s.js} +5 -5
- package/dist/{chunk-dsd0v5za.js → chunk-6hs3wed5.js} +7 -7
- package/dist/{chunk-d1m96xhv.js → chunk-6qb753r5.js} +79 -79
- package/dist/{chunk-0xjaqda8.js → chunk-6rcf54zd.js} +48 -27
- package/dist/{chunk-jtwdv23y.js → chunk-6twsw69m.js} +7 -7
- package/dist/{chunk-6p6mwfc8.js → chunk-6vp8zen2.js} +79 -79
- package/dist/chunk-6zfb4n08.js +91 -0
- package/dist/chunk-73bgy356.js +90 -0
- package/dist/{chunk-6gjke1xd.js → chunk-7ba45tqg.js} +5 -5
- package/dist/{chunk-j1y56wgn.js → chunk-7dc9d8fy.js} +7 -7
- package/dist/{chunk-5vp228m5.js → chunk-7deqmrby.js} +5 -5
- package/dist/{chunk-9x5zgy22.js → chunk-7e9xcw77.js} +1 -1
- package/dist/{chunk-gapsz2hr.js → chunk-7gbe6ftc.js} +9 -9
- package/dist/{chunk-xhfmdq1y.js → chunk-7gte8zc4.js} +1 -1
- package/dist/{chunk-6nsd9606.js → chunk-7kp42hzq.js} +2 -2
- package/dist/{chunk-hakdhagh.js → chunk-7njkaxjp.js} +39 -120
- package/dist/chunk-7nphjzve.js +105 -0
- package/dist/chunk-7sp9dk6d.js +20 -0
- package/dist/{chunk-wgk9sxk7.js → chunk-7tdk9ypw.js} +10 -10
- package/dist/{chunk-6dj5t602.js → chunk-7wegz81g.js} +1 -1
- package/dist/{chunk-7wm5s02e.js → chunk-7yexhdjs.js} +1 -1
- package/dist/{chunk-51pjmydp.js → chunk-88k0rgdp.js} +11 -11
- package/dist/{chunk-a4vds27m.js → chunk-8a1jee0e.js} +2 -2
- package/dist/{chunk-kd5k97vr.js → chunk-8ady2sm4.js} +10 -28
- package/dist/chunk-8jmkpx1h.js +123 -0
- package/dist/{chunk-1h6cfybr.js → chunk-8m1gfrme.js} +14 -14
- package/dist/{chunk-7sgtxrsc.js → chunk-8q5fzyem.js} +10 -8
- package/dist/{chunk-zzm33q8x.js → chunk-8r1napm7.js} +1 -1
- package/dist/{chunk-cdz5yb0r.js → chunk-9029sbq1.js} +1 -1
- package/dist/{chunk-y1784krc.js → chunk-92wwx9vf.js} +2 -2
- package/dist/{chunk-7ekgfz41.js → chunk-93hxjnkb.js} +78 -78
- package/dist/{chunk-7v42bsr9.js → chunk-93kvs6fh.js} +6 -6
- package/dist/{chunk-7ep76qfm.js → chunk-9b71sn2g.js} +41 -41
- package/dist/{chunk-mjgzpvks.js → chunk-9drwsb3g.js} +80 -80
- package/dist/{chunk-frnaaxw8.js → chunk-9p62r6he.js} +6 -6
- package/dist/{chunk-e86wz4cn.js → chunk-9re786wa.js} +40 -40
- package/dist/{chunk-hp00gn9k.js → chunk-9rhy5vt7.js} +9 -9
- package/dist/chunk-9xq7ef8y.js +100 -0
- package/dist/chunk-9ydxqdhe.js +121 -0
- package/dist/{chunk-45fm4zby.js → chunk-a00gfn8e.js} +2 -2
- package/dist/{chunk-qt5e2evw.js → chunk-a1mewckj.js} +78 -78
- package/dist/{chunk-k8vp0atq.js → chunk-a3qtafgw.js} +79 -79
- package/dist/chunk-ab6apbd2.js +140 -0
- package/dist/{chunk-d4mdda98.js → chunk-apjnwens.js} +8 -8
- package/dist/{chunk-ddsjkqs4.js → chunk-b1hygym1.js} +8 -8
- package/dist/{chunk-qatfdxvd.js → chunk-b610qrvk.js} +3 -3
- package/dist/{chunk-83pxcp3r.js → chunk-bbhg7m1a.js} +79 -79
- package/dist/{chunk-83hfzbx3.js → chunk-bdhdmkya.js} +1 -1
- package/dist/chunk-bdrsheny.js +35 -0
- package/dist/{chunk-vyjeh50y.js → chunk-bktmgb4n.js} +68 -39
- package/dist/{chunk-feyzykye.js → chunk-bq0wp28e.js} +1 -1
- package/dist/{chunk-0vp3wfab.js → chunk-bs9rn85s.js} +1 -1
- package/dist/{chunk-q41bvf6v.js → chunk-bstyysxw.js} +3 -3
- package/dist/{chunk-yyex5gsf.js → chunk-bta8w8ge.js} +10 -10
- package/dist/chunk-bvfqg3cg.js +131 -0
- package/dist/{chunk-zpnrabf3.js → chunk-bw8y1msy.js} +5 -5
- package/dist/{chunk-hxavvf2h.js → chunk-c2k1n6yb.js} +41 -335
- package/dist/{chunk-rgk6mfwe.js → chunk-c6gpdd2c.js} +78 -78
- package/dist/{chunk-tmjt0nae.js → chunk-cajjdb7j.js} +4 -4
- package/dist/{chunk-5hnhres8.js → chunk-ccdh8eh2.js} +38 -38
- package/dist/{chunk-57qr194r.js → chunk-cfpnb7x4.js} +78 -78
- package/dist/{chunk-9t6ktd1k.js → chunk-cgzq4zww.js} +4 -4
- package/dist/chunk-cj0j4n23.js +71 -0
- package/dist/{chunk-0731m51q.js → chunk-ckrs789w.js} +1 -1
- package/dist/{chunk-ejjp1fy1.js → chunk-cqb31tfg.js} +6 -6
- package/dist/{chunk-zx09tq9a.js → chunk-cx21etb2.js} +2 -2
- package/dist/chunk-cynnhyy3.js +103 -0
- package/dist/chunk-d0zx5hba.js +85 -0
- package/dist/{chunk-svx8h8tt.js → chunk-d2cypdsx.js} +23 -23
- package/dist/{chunk-1h2famwb.js → chunk-d99k9r9g.js} +1 -1
- package/dist/{chunk-mn96ajge.js → chunk-dg2k597k.js} +9 -9
- package/dist/{chunk-ewadzrm8.js → chunk-dh01e4bp.js} +2 -2
- package/dist/{chunk-ztc0wy8h.js → chunk-dmp3nd67.js} +90 -90
- package/dist/{chunk-43rp9zbk.js → chunk-dv38yqdn.js} +3 -3
- package/dist/{chunk-bwtw1cbj.js → chunk-dy8278wt.js} +7 -7
- package/dist/{chunk-fryfy1ac.js → chunk-dzcb2ekz.js} +4 -4
- package/dist/{chunk-0z7km4rh.js → chunk-e01rphq3.js} +114 -117
- package/dist/{chunk-gtn3b2xr.js → chunk-e22at2jn.js} +4 -4
- package/dist/chunk-e6s584g7.js +77 -0
- package/dist/{chunk-a9jh9m0x.js → chunk-e7j6g62d.js} +9 -9
- package/dist/chunk-e90dyenj.js +127 -0
- package/dist/{chunk-eeag0gpw.js → chunk-eb4t4ehh.js} +6 -6
- package/dist/{chunk-p4k5pzge.js → chunk-ej882sb5.js} +27 -33
- package/dist/{chunk-aejyn03k.js → chunk-ekewg3tj.js} +4 -4
- package/dist/chunk-em5s71j6.js +89 -0
- package/dist/chunk-eqcgr89w.js +646 -0
- package/dist/{chunk-5zqatqff.js → chunk-et3jfht8.js} +13 -13
- package/dist/{chunk-qp2qdcda.js → chunk-eta5aekm.js} +9 -30
- package/dist/{chunk-6xe15dps.js → chunk-ewsvbzhz.js} +3 -3
- package/dist/{chunk-hd6rkyjg.js → chunk-eynfddhq.js} +143 -144
- package/dist/{chunk-66zry909.js → chunk-f517h74h.js} +1 -1
- package/dist/{chunk-4pbx3g7s.js → chunk-f79jyxwd.js} +4 -4
- package/dist/{chunk-hwfknpxv.js → chunk-f9ybfyyp.js} +2 -2
- package/dist/chunk-f9zvs66e.js +105 -0
- package/dist/{chunk-7aw745vx.js → chunk-fdwtd6s9.js} +3 -3
- package/dist/{chunk-2jdbfhb2.js → chunk-fefs2xby.js} +25 -25
- package/dist/{chunk-jzthz1bx.js → chunk-fpq87r80.js} +1 -1
- package/dist/{chunk-c25z9zmd.js → chunk-fqr6n9z6.js} +3 -3
- package/dist/{chunk-s8kj6ajy.js → chunk-fr5s5ceq.js} +2 -2
- package/dist/chunk-gaf31961.js +81 -0
- package/dist/{chunk-64c1avct.js → chunk-gbvmks09.js} +1 -1
- package/dist/{chunk-y4ca9kqz.js → chunk-ggk84sc5.js} +4 -4
- package/dist/chunk-gkz2djp0.js +121 -0
- package/dist/{chunk-grd58s24.js → chunk-gm8ht8g9.js} +6 -6
- package/dist/{chunk-6vrbnjz8.js → chunk-gt43z5zd.js} +81 -81
- package/dist/chunk-gwktnbeg.js +90 -0
- package/dist/{chunk-xv3era3s.js → chunk-gxsrvxjn.js} +1 -1
- package/dist/chunk-h0bgwz9v.js +55 -0
- package/dist/{chunk-tzfd1egv.js → chunk-h1tv19q0.js} +80 -80
- package/dist/chunk-h3v46eky.js +105 -0
- package/dist/{chunk-vtxskzvg.js → chunk-h4tnp6dw.js} +7 -7
- package/dist/{chunk-sm9q19ws.js → chunk-h8n0a991.js} +79 -79
- package/dist/{chunk-gp605hkw.js → chunk-hbz8xggv.js} +11 -11
- package/dist/{chunk-v78fj8by.js → chunk-he9zw1gh.js} +2 -2
- package/dist/{chunk-asenzcq2.js → chunk-hgb8024k.js} +8 -8
- package/dist/{chunk-8sxpmxaj.js → chunk-hhvf84fa.js} +193 -195
- package/dist/chunk-hycm92ss.js +52 -0
- package/dist/{chunk-kwkcmv5p.js → chunk-j0bfbce5.js} +36 -36
- package/dist/{chunk-efr7hp9d.js → chunk-j15xyew5.js} +4 -4
- package/dist/chunk-j3c5r08n.js +87 -0
- package/dist/chunk-j3q2sbhc.js +107 -0
- package/dist/{chunk-rh5v7hf7.js → chunk-j77g2v22.js} +5 -5
- package/dist/{chunk-ps49ymvj.js → chunk-ja1nqz5q.js} +2 -2
- package/dist/{chunk-x66axbfx.js → chunk-ja23mty8.js} +83 -83
- package/dist/{chunk-c2he84t1.js → chunk-jrqjxhxj.js} +2 -2
- package/dist/{chunk-87xg6yb4.js → chunk-jsvsnqkn.js} +2 -2
- package/dist/{chunk-b71fc01f.js → chunk-jw9zwgea.js} +4 -4
- package/dist/{chunk-we205f8x.js → chunk-jwqveqpr.js} +9 -9
- package/dist/{chunk-v4dh4hcd.js → chunk-k0dprbnn.js} +78 -78
- package/dist/{chunk-2h6f45jx.js → chunk-k3gvjjm9.js} +5 -5
- package/dist/{chunk-2fwze72g.js → chunk-k6cq3j7z.js} +1 -1
- package/dist/{chunk-x7fdwq3d.js → chunk-k6wmp81y.js} +1 -1
- package/dist/{chunk-e8xjcdk1.js → chunk-k8by1vfd.js} +19 -19
- package/dist/chunk-k9h7kjf6.js +8 -0
- package/dist/chunk-karea2z2.js +89 -0
- package/dist/{chunk-wa8yn2p0.js → chunk-kcp41jcn.js} +2 -2
- package/dist/{chunk-g7qtsqk8.js → chunk-khwhppzs.js} +2 -2
- package/dist/{chunk-68ffk5qa.js → chunk-kjx9a9p4.js} +2 -2
- package/dist/chunk-kra9y8qb.js +97 -0
- package/dist/{chunk-j5bth84e.js → chunk-kt25n52f.js} +4 -4
- package/dist/{chunk-c5hr98qm.js → chunk-m12e2wq3.js} +80 -80
- package/dist/{chunk-h9n54swm.js → chunk-m13ptmf2.js} +2 -2
- package/dist/{chunk-4jm600zv.js → chunk-m6vs965c.js} +1 -1
- package/dist/{chunk-0vz3p22g.js → chunk-m82ketm1.js} +78 -78
- package/dist/{chunk-kpr0q6sr.js → chunk-m8qvkabg.js} +4 -4
- package/dist/{chunk-wqdfck13.js → chunk-ma6x4ws8.js} +46 -46
- package/dist/{chunk-c54cp070.js → chunk-mbfzfg56.js} +85 -85
- package/dist/{chunk-2jzpw1pf.js → chunk-mtstpt1e.js} +43 -43
- package/dist/chunk-mwzwm2z2.js +60 -0
- package/dist/{chunk-w28t9jy7.js → chunk-myac8yfs.js} +5 -5
- package/dist/{chunk-a7gk9w5h.js → chunk-n3vmrzcy.js} +5 -5
- package/dist/chunk-n535j168.js +131 -0
- package/dist/{chunk-v9smspw2.js → chunk-n9ne98cj.js} +5 -4
- package/dist/{chunk-fq5vhqx0.js → chunk-n9xhrzxs.js} +78 -78
- package/dist/{chunk-s43qhc1v.js → chunk-ngde5k9k.js} +79 -79
- package/dist/{chunk-a7fqavjt.js → chunk-nsxw4b3j.js} +8 -8
- package/dist/{chunk-9pnc5v9y.js → chunk-nwdpjkrw.js} +78 -78
- package/dist/{chunk-sd36yzx8.js → chunk-nztayqyx.js} +1 -1
- package/dist/{chunk-db92x7yq.js → chunk-p0n9ew4x.js} +4 -4
- package/dist/{chunk-ehtwnxpg.js → chunk-p4e5ymdw.js} +1 -1
- package/dist/{chunk-cnsj3vq2.js → chunk-p8hn07q2.js} +1 -1
- package/dist/chunk-p9nkqgej.js +19 -0
- package/dist/{chunk-agfhxmaa.js → chunk-pg4fbhbm.js} +11 -11
- package/dist/{chunk-qd5n2h9f.js → chunk-pg8asjpk.js} +20 -20
- package/dist/chunk-pgptefy1.js +114 -0
- package/dist/chunk-pjn0s3j1.js +111 -0
- package/dist/chunk-pkwv0q5q.js +91 -0
- package/dist/{chunk-netzwgv1.js → chunk-pnc7q9rt.js} +1 -1
- package/dist/{chunk-xeb6075z.js → chunk-pnrdvxhy.js} +2 -2
- package/dist/{chunk-5dpys8tw.js → chunk-pp5zbnpr.js} +80 -80
- package/dist/{chunk-gq2ty76e.js → chunk-pqf2bjy1.js} +4 -4
- package/dist/{chunk-3fhrs3qm.js → chunk-pqxyft7d.js} +8 -8
- package/dist/{chunk-2k3y6fnp.js → chunk-pt1jzmkv.js} +2 -2
- package/dist/{chunk-vdagxf3w.js → chunk-pt6vj628.js} +9 -9
- package/dist/{chunk-c7jwbe76.js → chunk-pyn4ry36.js} +103 -57
- package/dist/{chunk-3b2t95m2.js → chunk-q53kkzhr.js} +80 -80
- package/dist/chunk-q6m9qgaa.js +88 -0
- package/dist/{chunk-p8na2wwp.js → chunk-q74fcthe.js} +2 -2
- package/dist/{chunk-zthjz9rz.js → chunk-q8t0ym9s.js} +83 -83
- package/dist/{chunk-mcws22k3.js → chunk-q9y73cmh.js} +1 -1
- package/dist/{chunk-fajg8x36.js → chunk-qbbf7rr5.js} +1818 -727
- package/dist/{chunk-qb6k2afy.js → chunk-qka6pqrq.js} +11 -11
- package/dist/{chunk-0paqc2yw.js → chunk-qqc3b97c.js} +1 -1
- package/dist/{chunk-t9p85zff.js → chunk-qrdbqeve.js} +2 -2
- package/dist/{chunk-96thjkqe.js → chunk-qrgxbrs9.js} +1958 -3027
- package/dist/{chunk-etnkcek5.js → chunk-qs4stpt5.js} +14 -14
- package/dist/{chunk-b1kcd3ss.js → chunk-r055z03k.js} +1 -1
- package/dist/{chunk-ns7x6xam.js → chunk-r1q9s5hs.js} +13 -10
- package/dist/{chunk-b8zcqbbd.js → chunk-r27tskss.js} +11 -9
- package/dist/{chunk-etdt1xz3.js → chunk-r4pq77kb.js} +3 -3
- package/dist/{chunk-5z28bqne.js → chunk-r585pc0g.js} +4 -3
- package/dist/chunk-r82c7gfc.js +58 -0
- package/dist/{chunk-aejj9p9y.js → chunk-ra9hbfyz.js} +3 -3
- package/dist/{chunk-jnqvh4rm.js → chunk-rfj6gjwh.js} +15 -15
- package/dist/{chunk-qkczt8cr.js → chunk-rgaedd84.js} +5 -5
- package/dist/chunk-rgshryeb.js +93 -0
- package/dist/chunk-rk2kb2ec.js +101 -0
- package/dist/{chunk-x6r4v44b.js → chunk-rpta0rqz.js} +1 -1
- package/dist/{chunk-2gzv8nrw.js → chunk-rrtpbztr.js} +4 -3
- package/dist/{chunk-qhsd552n.js → chunk-rx9ypbjy.js} +8 -8
- package/dist/{chunk-3ecxxh0v.js → chunk-rzk001ay.js} +85 -85
- package/dist/{chunk-je14p1p5.js → chunk-rzn9w8p2.js} +3 -3
- package/dist/chunk-s0p653k2.js +93 -0
- package/dist/{chunk-mbz52548.js → chunk-s13y3w7e.js} +36 -36
- package/dist/{chunk-634c89zh.js → chunk-s201s689.js} +18 -18
- package/dist/{chunk-wvxaaw85.js → chunk-s5arr49c.js} +11 -200
- package/dist/{chunk-ytw7cet7.js → chunk-s7tq4e5g.js} +78 -78
- package/dist/{chunk-98hsxvwg.js → chunk-s9906sac.js} +83 -83
- package/dist/{chunk-kgk4p214.js → chunk-s9jxtj04.js} +103 -103
- package/dist/{chunk-j7ptfetg.js → chunk-sbe9zd56.js} +6 -6
- package/dist/chunk-skypjdyc.js +147 -0
- package/dist/{chunk-fbv4apne.js → chunk-snd4pbkp.js} +1 -1
- package/dist/{chunk-7xee389k.js → chunk-sthmb4xf.js} +78 -78
- package/dist/{chunk-1gx78081.js → chunk-t3yc7m07.js} +1 -1
- package/dist/{chunk-2avrzsjc.js → chunk-t83amzhd.js} +12 -12
- package/dist/{chunk-hqdwr6mz.js → chunk-t8chhacb.js} +2 -2
- package/dist/{chunk-k0p9w03v.js → chunk-taqr0qw1.js} +3 -3
- package/dist/{chunk-e0pv7mxq.js → chunk-tdf3ha9b.js} +79 -79
- package/dist/{chunk-8g5pe1gr.js → chunk-tevzn1xp.js} +1 -1
- package/dist/chunk-tgayhxvz.js +41 -0
- package/dist/{chunk-j64ga6ta.js → chunk-tkbwrjte.js} +325 -284
- package/dist/{chunk-qsxj0kfc.js → chunk-tmye4d2k.js} +15 -15
- package/dist/{chunk-55raexh7.js → chunk-tnpk0ne1.js} +2458 -1002
- package/dist/{chunk-vfszgkkq.js → chunk-tnv92c5m.js} +80 -80
- package/dist/{chunk-jd32zbps.js → chunk-trm02xde.js} +2 -2
- package/dist/{chunk-zkyqgt3m.js → chunk-tyc5c0q4.js} +8 -8
- package/dist/{chunk-jbv0d2xg.js → chunk-v2szqm5g.js} +5 -5
- package/dist/{chunk-7p9xptww.js → chunk-v8k67zfz.js} +1123 -388
- package/dist/{chunk-0fjwyhtj.js → chunk-v9sy0cj3.js} +10 -10
- package/dist/{chunk-p7vkh4wx.js → chunk-vbe1ersf.js} +1 -1
- package/dist/{chunk-xe47nxbq.js → chunk-vd5dh925.js} +78 -78
- package/dist/{chunk-cfvgegjj.js → chunk-vnrevqdf.js} +4 -4
- package/dist/{chunk-q9pw9pca.js → chunk-vq4k182g.js} +5 -5
- package/dist/chunk-vr5vyt2h.js +107 -0
- package/dist/{chunk-tbhsqgh4.js → chunk-vv84k232.js} +5 -5
- package/dist/chunk-vvjhax8n.js +114 -0
- package/dist/chunk-vvsts2t9.js +30 -0
- package/dist/{chunk-ymxwas49.js → chunk-vwkb146r.js} +90 -90
- package/dist/{chunk-7bz03dax.js → chunk-vwt2fv6j.js} +3 -3
- package/dist/{chunk-5vzqvgea.js → chunk-vx28ztc7.js} +20 -20
- package/dist/{chunk-g9f19ttm.js → chunk-vxsad4bw.js} +2 -2
- package/dist/chunk-w287mz4p.js +146 -0
- package/dist/{chunk-sd8209pb.js → chunk-w2bff8pq.js} +12 -92
- package/dist/{chunk-grbjajg5.js → chunk-w60c0dkw.js} +5 -5
- package/dist/chunk-wa852b5b.js +113 -0
- package/dist/{chunk-7xyswgjh.js → chunk-wfh12nzh.js} +1 -1
- package/dist/{chunk-vf612n57.js → chunk-wt799fvk.js} +34 -34
- package/dist/{chunk-qajrkk97.js → chunk-wwrswxg1.js} +1 -1
- package/dist/{chunk-afbvx9ey.js → chunk-wyyd1qfn.js} +81 -81
- package/dist/{chunk-6sdx75d8.js → chunk-x09aacvx.js} +5 -5
- package/dist/{chunk-fhej4f56.js → chunk-x4x3691j.js} +12 -12
- package/dist/chunk-xbpt4dv8.js +155 -0
- package/dist/{chunk-rn0v1hk8.js → chunk-xdxdztxa.js} +1 -1
- package/dist/{chunk-fdhbpqkt.js → chunk-xggbj4j9.js} +3 -3
- package/dist/chunk-xj72jfpd.js +33 -0
- package/dist/{chunk-2nya3j5t.js → chunk-xj8tk3d7.js} +3 -3
- package/dist/{chunk-0a8mnxpe.js → chunk-xkra2684.js} +85 -90
- package/dist/{chunk-2671jfzz.js → chunk-xm9zf0tv.js} +78 -78
- package/dist/chunk-xwbh3j1x.js +107 -0
- package/dist/chunk-xwrar1c5.js +97 -0
- package/dist/{chunk-14xjyt14.js → chunk-xygy5v97.js} +30 -30
- package/dist/{chunk-xycbvwy2.js → chunk-xyzbgjpv.js} +2 -2
- package/dist/{chunk-2tm611h9.js → chunk-y83gxqvc.js} +3 -3
- package/dist/{chunk-9an46bhy.js → chunk-y8b45mt2.js} +4 -4
- package/dist/{chunk-yd5sv0na.js → chunk-ycpdfeya.js} +79 -79
- package/dist/{chunk-4v6h9fhy.js → chunk-yh46f77t.js} +78 -78
- package/dist/{chunk-p620jjt8.js → chunk-ykvf93ft.js} +79 -79
- package/dist/{chunk-26wtxbdc.js → chunk-ynx3fetd.js} +1222 -463
- package/dist/{chunk-vkcqcmdv.js → chunk-yp64t9je.js} +8 -8
- package/dist/{chunk-eqp1rfft.js → chunk-ysfam81t.js} +2 -2
- package/dist/chunk-yt9mady7.js +36 -0
- package/dist/{chunk-hc158qrt.js → chunk-yteprw63.js} +26 -26
- package/dist/{chunk-9d13k3m6.js → chunk-ytt8da3v.js} +81 -81
- package/dist/{chunk-5xt8w19j.js → chunk-yvm9t98e.js} +7 -18
- package/dist/{chunk-c7c3t5kg.js → chunk-z7yj7dfh.js} +10 -10
- package/dist/{chunk-5mxbpsb4.js → chunk-z8b8f2n3.js} +79 -79
- package/dist/{chunk-96523fnw.js → chunk-z8n8cjhz.js} +2 -2
- package/dist/{chunk-5ccdsxgy.js → chunk-z9v4bxrj.js} +3 -3
- package/dist/{chunk-9k9th7xv.js → chunk-zat7q2e0.js} +79 -79
- package/dist/chunk-zfxp82tk.js +24 -0
- package/dist/chunk-zgkngrp4.js +54 -0
- package/dist/{chunk-h6bgcfma.js → chunk-zhnnzkzm.js} +14 -14
- package/dist/{chunk-2jyvw1vd.js → chunk-zp5nvg44.js} +2 -2
- package/dist/{chunk-1a5w7wdt.js → chunk-zqajmq38.js} +6 -6
- package/dist/{chunk-v1kzp02e.js → chunk-zx9r7a23.js} +1 -1
- package/dist/cli.js +11 -11
- package/dist/gateway/worker.js +23440 -21268
- package/dist/sdk/query.cjs +8 -18
- package/dist/sdk/query.js +1 -1
- package/package.json +128 -128
- package/dist/chunk-07nc7v02.js +0 -121
- package/dist/chunk-0m45arzy.js +0 -101
- package/dist/chunk-0m6r5xry.js +0 -133
- package/dist/chunk-24s7fatk.js +0 -52
- package/dist/chunk-2apvtmkd.js +0 -30
- package/dist/chunk-3b8bwc0r.js +0 -130
- package/dist/chunk-3cmhd7fz.js +0 -93
- package/dist/chunk-3g03wcny.js +0 -107
- package/dist/chunk-3mgywd32.js +0 -8
- package/dist/chunk-405v2pq2.js +0 -2186
- package/dist/chunk-485en4m4.js +0 -105
- package/dist/chunk-4fvbhs6s.js +0 -97
- package/dist/chunk-510y033v.js +0 -91
- package/dist/chunk-657y059h.js +0 -41
- package/dist/chunk-6w51dnv1.js +0 -35
- package/dist/chunk-84hebfv5.js +0 -97
- package/dist/chunk-85hp74zz.js +0 -121
- package/dist/chunk-865gwyhc.js +0 -100
- package/dist/chunk-8y55mc4q.js +0 -20
- package/dist/chunk-amkyhs41.js +0 -93
- package/dist/chunk-av6sfjhb.js +0 -107
- package/dist/chunk-b66hjndz.js +0 -103
- package/dist/chunk-c01dn3n0.js +0 -58
- package/dist/chunk-c6sjhj89.js +0 -1284
- package/dist/chunk-cg185b3s.js +0 -71
- package/dist/chunk-ckg9f3bq.js +0 -111
- package/dist/chunk-ckx8wtr1.js +0 -60
- package/dist/chunk-d348dy5e.js +0 -89
- package/dist/chunk-dd3fkytw.js +0 -90
- package/dist/chunk-df4rn6zx.js +0 -131
- package/dist/chunk-djna15b0.js +0 -55
- package/dist/chunk-eszdke28.js +0 -33
- package/dist/chunk-eyys9mkd.js +0 -36
- package/dist/chunk-f5f76rs0.js +0 -122
- package/dist/chunk-fhwnqkps.js +0 -114
- package/dist/chunk-fkttqetc.js +0 -77
- package/dist/chunk-gdwdqewd.js +0 -19
- package/dist/chunk-gfvab3pt.js +0 -146
- package/dist/chunk-gnhr6m0v.js +0 -91
- package/dist/chunk-gq4ptzy4.js +0 -50
- package/dist/chunk-gt5qmg5w.js +0 -121
- package/dist/chunk-h3rtwnzt.js +0 -27
- package/dist/chunk-h5kqbyza.js +0 -85
- package/dist/chunk-h8e89948.js +0 -24
- package/dist/chunk-hm185n1k.js +0 -105
- package/dist/chunk-ht2vfyw7.js +0 -127
- package/dist/chunk-j1jcmemq.js +0 -155
- package/dist/chunk-jch08yr8.js +0 -107
- package/dist/chunk-ng3tkgf2.js +0 -90
- package/dist/chunk-pxqvh94k.js +0 -88
- package/dist/chunk-qjr6jsys.js +0 -89
- package/dist/chunk-qk9hhrzj.js +0 -114
- package/dist/chunk-qnfx3qtx.js +0 -617
- package/dist/chunk-r9fbv9wd.js +0 -94
- package/dist/chunk-rnmravvv.js +0 -148
- package/dist/chunk-sactn8fj.js +0 -92
- package/dist/chunk-sq32fw07.js +0 -101
- package/dist/chunk-sqq17sk1.js +0 -55
- package/dist/chunk-t0fqphva.js +0 -123
- package/dist/chunk-t5b0h3vc.js +0 -54
- package/dist/chunk-vgn0fyes.js +0 -145
- package/dist/chunk-vkaz7qe2.js +0 -113
- package/dist/chunk-wd531rah.js +0 -140
- package/dist/chunk-wrtabh03.js +0 -81
- package/dist/chunk-x43vg58b.js +0 -87
- package/dist/chunk-xf4d0bmf.js +0 -105
- package/dist/chunk-xqa13w46.js +0 -71
- package/dist/chunk-xxahhkz2.js +0 -38
package/dist/chunk-405v2pq2.js
DELETED
|
@@ -1,2186 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
ConfigurableShortcutHint,
|
|
4
|
-
Select,
|
|
5
|
-
SelectMulti,
|
|
6
|
-
TextInput,
|
|
7
|
-
init_ConfigurableShortcutHint,
|
|
8
|
-
init_CustomSelect,
|
|
9
|
-
init_SelectMulti,
|
|
10
|
-
init_TextInput,
|
|
11
|
-
init_useTerminalSize
|
|
12
|
-
} from "./chunk-96thjkqe.js";
|
|
13
|
-
import"./chunk-mcws22k3.js";
|
|
14
|
-
import"./chunk-jzthz1bx.js";
|
|
15
|
-
import"./chunk-aejj9p9y.js";
|
|
16
|
-
import"./chunk-hwfknpxv.js";
|
|
17
|
-
import"./chunk-1gx78081.js";
|
|
18
|
-
import"./chunk-ehtwnxpg.js";
|
|
19
|
-
import"./chunk-y6ktw609.js";
|
|
20
|
-
import"./chunk-vtxskzvg.js";
|
|
21
|
-
import"./chunk-87xg6yb4.js";
|
|
22
|
-
import"./chunk-ksrvrndt.js";
|
|
23
|
-
import"./chunk-2gzv8nrw.js";
|
|
24
|
-
import"./chunk-2h6f45jx.js";
|
|
25
|
-
import"./chunk-cgfdkzhb.js";
|
|
26
|
-
import {
|
|
27
|
-
init_useExitOnCtrlCDWithKeybindings,
|
|
28
|
-
useExitOnCtrlCDWithKeybindings
|
|
29
|
-
} from "./chunk-jbv0d2xg.js";
|
|
30
|
-
import"./chunk-j5bth84e.js";
|
|
31
|
-
import"./chunk-mn96ajge.js";
|
|
32
|
-
import"./chunk-ps49ymvj.js";
|
|
33
|
-
import {
|
|
34
|
-
init_useKeybinding
|
|
35
|
-
} from "./chunk-68ffk5qa.js";
|
|
36
|
-
import"./chunk-a9jh9m0x.js";
|
|
37
|
-
import"./chunk-1h6cfybr.js";
|
|
38
|
-
import"./chunk-j7ptfetg.js";
|
|
39
|
-
import"./chunk-q41bvf6v.js";
|
|
40
|
-
import"./chunk-p7vkh4wx.js";
|
|
41
|
-
import"./chunk-kpr0q6sr.js";
|
|
42
|
-
import"./chunk-39dpcr2t.js";
|
|
43
|
-
import"./chunk-43rp9zbk.js";
|
|
44
|
-
import"./chunk-qhsd552n.js";
|
|
45
|
-
import"./chunk-xeb6075z.js";
|
|
46
|
-
import"./chunk-a4vds27m.js";
|
|
47
|
-
import"./chunk-v4t6dyyh.js";
|
|
48
|
-
import"./chunk-yt3s7a7d.js";
|
|
49
|
-
import {
|
|
50
|
-
init_browser,
|
|
51
|
-
openBrowser
|
|
52
|
-
} from "./chunk-2k3y6fnp.js";
|
|
53
|
-
import {
|
|
54
|
-
getAnthropicApiKey,
|
|
55
|
-
init_auth,
|
|
56
|
-
init_config,
|
|
57
|
-
init_stringUtils,
|
|
58
|
-
plural,
|
|
59
|
-
saveGlobalConfig
|
|
60
|
-
} from "./chunk-7p9xptww.js";
|
|
61
|
-
import"./chunk-ejjp1fy1.js";
|
|
62
|
-
import"./chunk-j1y56wgn.js";
|
|
63
|
-
import"./chunk-6nsd9606.js";
|
|
64
|
-
import"./chunk-64c1avct.js";
|
|
65
|
-
import"./chunk-8g5pe1gr.js";
|
|
66
|
-
import"./chunk-4pbx3g7s.js";
|
|
67
|
-
import"./chunk-26wtxbdc.js";
|
|
68
|
-
import"./chunk-cfvgegjj.js";
|
|
69
|
-
import"./chunk-4jm600zv.js";
|
|
70
|
-
import"./chunk-c25z9zmd.js";
|
|
71
|
-
import"./chunk-fys33rtr.js";
|
|
72
|
-
import"./chunk-3c25bcsw.js";
|
|
73
|
-
import"./chunk-1a5w7wdt.js";
|
|
74
|
-
import"./chunk-bwtw1cbj.js";
|
|
75
|
-
import"./chunk-cdz5yb0r.js";
|
|
76
|
-
import {
|
|
77
|
-
Byline,
|
|
78
|
-
Dialog,
|
|
79
|
-
KeyboardShortcutHint,
|
|
80
|
-
Link,
|
|
81
|
-
ThemedBox_default,
|
|
82
|
-
ThemedText,
|
|
83
|
-
color,
|
|
84
|
-
init_src,
|
|
85
|
-
useKeybinding,
|
|
86
|
-
useKeybindings,
|
|
87
|
-
useTerminalSize,
|
|
88
|
-
useTheme
|
|
89
|
-
} from "./chunk-c7jwbe76.js";
|
|
90
|
-
import"./chunk-0vkfrmqm.js";
|
|
91
|
-
import {
|
|
92
|
-
require_jsx_dev_runtime,
|
|
93
|
-
require_react
|
|
94
|
-
} from "./chunk-7sgtxrsc.js";
|
|
95
|
-
import"./chunk-0xjaqda8.js";
|
|
96
|
-
import {
|
|
97
|
-
init_analytics,
|
|
98
|
-
logEvent
|
|
99
|
-
} from "./chunk-x8d2ehd7.js";
|
|
100
|
-
import"./chunk-db92x7yq.js";
|
|
101
|
-
import {
|
|
102
|
-
getGithubRepo,
|
|
103
|
-
init_git
|
|
104
|
-
} from "./chunk-kd5k97vr.js";
|
|
105
|
-
import"./chunk-w28t9jy7.js";
|
|
106
|
-
import"./chunk-qnfx3qtx.js";
|
|
107
|
-
import {
|
|
108
|
-
execFileNoThrow,
|
|
109
|
-
init_execFileNoThrow
|
|
110
|
-
} from "./chunk-9an46bhy.js";
|
|
111
|
-
import"./chunk-s8kj6ajy.js";
|
|
112
|
-
import"./chunk-2nya3j5t.js";
|
|
113
|
-
import"./chunk-dwyaks7s.js";
|
|
114
|
-
import {
|
|
115
|
-
execa,
|
|
116
|
-
init_execa
|
|
117
|
-
} from "./chunk-5z28bqne.js";
|
|
118
|
-
import {
|
|
119
|
-
figures_default,
|
|
120
|
-
init_figures
|
|
121
|
-
} from "./chunk-qajrkk97.js";
|
|
122
|
-
import {
|
|
123
|
-
init_log,
|
|
124
|
-
logError
|
|
125
|
-
} from "./chunk-yb6xww2x.js";
|
|
126
|
-
import"./chunk-nsc89h0n.js";
|
|
127
|
-
import"./chunk-fbv4apne.js";
|
|
128
|
-
import"./chunk-k8vp0atq.js";
|
|
129
|
-
import"./chunk-vf612n57.js";
|
|
130
|
-
import"./chunk-07069jq1.js";
|
|
131
|
-
import"./chunk-d4mdda98.js";
|
|
132
|
-
import"./chunk-55raexh7.js";
|
|
133
|
-
import"./chunk-v9smspw2.js";
|
|
134
|
-
import"./chunk-v1kzp02e.js";
|
|
135
|
-
import"./chunk-7wm5s02e.js";
|
|
136
|
-
import"./chunk-b0kf00ff.js";
|
|
137
|
-
import"./chunk-netzwgv1.js";
|
|
138
|
-
import {
|
|
139
|
-
__esm,
|
|
140
|
-
__toESM
|
|
141
|
-
} from "./chunk-qp2qdcda.js";
|
|
142
|
-
|
|
143
|
-
// src/components/WorkflowMultiselectDialog.tsx
|
|
144
|
-
function renderInputGuide(exitState) {
|
|
145
|
-
if (exitState.pending) {
|
|
146
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
147
|
-
children: [
|
|
148
|
-
"Press ",
|
|
149
|
-
exitState.keyName,
|
|
150
|
-
" again to exit"
|
|
151
|
-
]
|
|
152
|
-
}, undefined, true, undefined, this);
|
|
153
|
-
}
|
|
154
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Byline, {
|
|
155
|
-
children: [
|
|
156
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(KeyboardShortcutHint, {
|
|
157
|
-
shortcut: "\u2191\u2193",
|
|
158
|
-
action: "navigate"
|
|
159
|
-
}, undefined, false, undefined, this),
|
|
160
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(KeyboardShortcutHint, {
|
|
161
|
-
shortcut: "Space",
|
|
162
|
-
action: "toggle"
|
|
163
|
-
}, undefined, false, undefined, this),
|
|
164
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(KeyboardShortcutHint, {
|
|
165
|
-
shortcut: "Enter",
|
|
166
|
-
action: "confirm"
|
|
167
|
-
}, undefined, false, undefined, this),
|
|
168
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ConfigurableShortcutHint, {
|
|
169
|
-
action: "confirm:no",
|
|
170
|
-
context: "Confirmation",
|
|
171
|
-
fallback: "Esc",
|
|
172
|
-
description: "cancel"
|
|
173
|
-
}, undefined, false, undefined, this)
|
|
174
|
-
]
|
|
175
|
-
}, undefined, true, undefined, this);
|
|
176
|
-
}
|
|
177
|
-
function WorkflowMultiselectDialog({
|
|
178
|
-
onSubmit,
|
|
179
|
-
defaultSelections
|
|
180
|
-
}) {
|
|
181
|
-
const [showError, setShowError] = import_react.useState(false);
|
|
182
|
-
const handleSubmit = import_react.useCallback((selectedValues) => {
|
|
183
|
-
if (selectedValues.length === 0) {
|
|
184
|
-
setShowError(true);
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
setShowError(false);
|
|
188
|
-
onSubmit(selectedValues);
|
|
189
|
-
}, [onSubmit]);
|
|
190
|
-
const handleChange = import_react.useCallback(() => {
|
|
191
|
-
setShowError(false);
|
|
192
|
-
}, []);
|
|
193
|
-
const handleCancel = import_react.useCallback(() => {
|
|
194
|
-
setShowError(true);
|
|
195
|
-
}, []);
|
|
196
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
|
|
197
|
-
title: "Select GitHub workflows to install",
|
|
198
|
-
subtitle: "We'll create a workflow file in your repository for each one you select.",
|
|
199
|
-
onCancel: handleCancel,
|
|
200
|
-
inputGuide: renderInputGuide,
|
|
201
|
-
children: [
|
|
202
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
203
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
204
|
-
dimColor: true,
|
|
205
|
-
children: [
|
|
206
|
-
"More workflow examples (issue triage, CI fixes, etc.) at:",
|
|
207
|
-
" ",
|
|
208
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Link, {
|
|
209
|
-
url: "https://github.com/anthropics/claude-code-action/blob/main/examples/",
|
|
210
|
-
children: "https://github.com/anthropics/claude-code-action/blob/main/examples/"
|
|
211
|
-
}, undefined, false, undefined, this)
|
|
212
|
-
]
|
|
213
|
-
}, undefined, true, undefined, this)
|
|
214
|
-
}, undefined, false, undefined, this),
|
|
215
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(SelectMulti, {
|
|
216
|
-
options: WORKFLOWS.map((workflow) => ({
|
|
217
|
-
label: workflow.label,
|
|
218
|
-
value: workflow.value
|
|
219
|
-
})),
|
|
220
|
-
defaultValue: defaultSelections,
|
|
221
|
-
onSubmit: handleSubmit,
|
|
222
|
-
onChange: handleChange,
|
|
223
|
-
onCancel: handleCancel,
|
|
224
|
-
hideIndexes: true
|
|
225
|
-
}, undefined, false, undefined, this),
|
|
226
|
-
showError && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
227
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
228
|
-
color: "error",
|
|
229
|
-
children: "You must select at least one workflow to continue"
|
|
230
|
-
}, undefined, false, undefined, this)
|
|
231
|
-
}, undefined, false, undefined, this)
|
|
232
|
-
]
|
|
233
|
-
}, undefined, true, undefined, this);
|
|
234
|
-
}
|
|
235
|
-
var import_react, jsx_dev_runtime, WORKFLOWS;
|
|
236
|
-
var init_WorkflowMultiselectDialog = __esm(() => {
|
|
237
|
-
init_src();
|
|
238
|
-
init_ConfigurableShortcutHint();
|
|
239
|
-
init_SelectMulti();
|
|
240
|
-
import_react = __toESM(require_react(), 1);
|
|
241
|
-
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
242
|
-
WORKFLOWS = [
|
|
243
|
-
{
|
|
244
|
-
value: "claude",
|
|
245
|
-
label: "@Claude Code - Tag @claude in issues and PR comments"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
value: "claude-review",
|
|
249
|
-
label: "Claude Code Review - Automated code review on new PRs"
|
|
250
|
-
}
|
|
251
|
-
];
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
// src/constants/github-app.ts
|
|
255
|
-
var PR_TITLE = "Add Claude Code GitHub Workflow", GITHUB_ACTION_SETUP_DOCS_URL = "https://github.com/anthropics/claude-code-action/blob/main/docs/setup.md", WORKFLOW_CONTENT = `name: Claude Code
|
|
256
|
-
|
|
257
|
-
on:
|
|
258
|
-
issue_comment:
|
|
259
|
-
types: [created]
|
|
260
|
-
pull_request_review_comment:
|
|
261
|
-
types: [created]
|
|
262
|
-
issues:
|
|
263
|
-
types: [opened, assigned]
|
|
264
|
-
pull_request_review:
|
|
265
|
-
types: [submitted]
|
|
266
|
-
|
|
267
|
-
jobs:
|
|
268
|
-
claude:
|
|
269
|
-
if: |
|
|
270
|
-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
271
|
-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
272
|
-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
273
|
-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
|
274
|
-
runs-on: ubuntu-latest
|
|
275
|
-
permissions:
|
|
276
|
-
contents: read
|
|
277
|
-
pull-requests: read
|
|
278
|
-
issues: read
|
|
279
|
-
id-token: write
|
|
280
|
-
actions: read # Required for Claude to read CI results on PRs
|
|
281
|
-
steps:
|
|
282
|
-
- name: Checkout repository
|
|
283
|
-
uses: actions/checkout@v4
|
|
284
|
-
with:
|
|
285
|
-
fetch-depth: 1
|
|
286
|
-
|
|
287
|
-
- name: Run Claude Code
|
|
288
|
-
id: claude
|
|
289
|
-
uses: anthropics/claude-code-action@v1
|
|
290
|
-
with:
|
|
291
|
-
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
292
|
-
|
|
293
|
-
# This is an optional setting that allows Claude to read CI results on PRs
|
|
294
|
-
additional_permissions: |
|
|
295
|
-
actions: read
|
|
296
|
-
|
|
297
|
-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
|
298
|
-
# prompt: 'Update the pull request description to include a summary of changes.'
|
|
299
|
-
|
|
300
|
-
# Optional: Add claude_args to customize behavior and configuration
|
|
301
|
-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
302
|
-
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
303
|
-
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
|
304
|
-
|
|
305
|
-
`, PR_BODY = `## \uD83E\uDD16 Installing Claude Code GitHub App
|
|
306
|
-
|
|
307
|
-
This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.
|
|
308
|
-
|
|
309
|
-
### What is Claude Code?
|
|
310
|
-
|
|
311
|
-
[Claude Code](https://claude.com/claude-code) is an AI coding agent that can help with:
|
|
312
|
-
- Bug fixes and improvements
|
|
313
|
-
- Documentation updates
|
|
314
|
-
- Implementing new features
|
|
315
|
-
- Code reviews and suggestions
|
|
316
|
-
- Writing tests
|
|
317
|
-
- And more!
|
|
318
|
-
|
|
319
|
-
### How it works
|
|
320
|
-
|
|
321
|
-
Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
|
|
322
|
-
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
|
|
323
|
-
|
|
324
|
-
### Important Notes
|
|
325
|
-
|
|
326
|
-
- **This workflow won't take effect until this PR is merged**
|
|
327
|
-
- **@claude mentions won't work until after the merge is complete**
|
|
328
|
-
- The workflow runs automatically whenever Claude is mentioned in PR or issue comments
|
|
329
|
-
- Claude gets access to the entire PR or issue context including files, diffs, and previous comments
|
|
330
|
-
|
|
331
|
-
### Security
|
|
332
|
-
|
|
333
|
-
- Our Anthropic API key is securely stored as a GitHub Actions secret
|
|
334
|
-
- Only users with write access to the repository can trigger the workflow
|
|
335
|
-
- All Claude runs are stored in the GitHub Actions run history
|
|
336
|
-
- Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
|
|
337
|
-
- We can add more allowed tools by adding them to the workflow file like:
|
|
338
|
-
|
|
339
|
-
\`\`\`
|
|
340
|
-
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)
|
|
341
|
-
\`\`\`
|
|
342
|
-
|
|
343
|
-
There's more information in the [Claude Code action repo](https://github.com/anthropics/claude-code-action).
|
|
344
|
-
|
|
345
|
-
After merging this PR, let's try mentioning @claude in a comment on any PR to get started!`, CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT = `name: Claude Code Review
|
|
346
|
-
|
|
347
|
-
on:
|
|
348
|
-
pull_request:
|
|
349
|
-
types: [opened, synchronize, ready_for_review, reopened]
|
|
350
|
-
# Optional: Only run on specific file changes
|
|
351
|
-
# paths:
|
|
352
|
-
# - "src/**/*.ts"
|
|
353
|
-
# - "src/**/*.tsx"
|
|
354
|
-
# - "src/**/*.js"
|
|
355
|
-
# - "src/**/*.jsx"
|
|
356
|
-
|
|
357
|
-
jobs:
|
|
358
|
-
claude-review:
|
|
359
|
-
# Optional: Filter by PR author
|
|
360
|
-
# if: |
|
|
361
|
-
# github.event.pull_request.user.login == 'external-contributor' ||
|
|
362
|
-
# github.event.pull_request.user.login == 'new-developer' ||
|
|
363
|
-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
|
364
|
-
|
|
365
|
-
runs-on: ubuntu-latest
|
|
366
|
-
permissions:
|
|
367
|
-
contents: read
|
|
368
|
-
pull-requests: read
|
|
369
|
-
issues: read
|
|
370
|
-
id-token: write
|
|
371
|
-
|
|
372
|
-
steps:
|
|
373
|
-
- name: Checkout repository
|
|
374
|
-
uses: actions/checkout@v4
|
|
375
|
-
with:
|
|
376
|
-
fetch-depth: 1
|
|
377
|
-
|
|
378
|
-
- name: Run Claude Code Review
|
|
379
|
-
id: claude-review
|
|
380
|
-
uses: anthropics/claude-code-action@v1
|
|
381
|
-
with:
|
|
382
|
-
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
383
|
-
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
|
384
|
-
plugins: 'code-review@claude-code-plugins'
|
|
385
|
-
prompt: '/code-review:code-review \${{ github.repository }}/pull/\${{ github.event.pull_request.number }}'
|
|
386
|
-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
387
|
-
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
388
|
-
|
|
389
|
-
`;
|
|
390
|
-
var init_github_app = () => {};
|
|
391
|
-
|
|
392
|
-
// src/commands/install-github-app/ApiKeyStep.tsx
|
|
393
|
-
function ApiKeyStep({
|
|
394
|
-
existingApiKey,
|
|
395
|
-
apiKeyOrOAuthToken,
|
|
396
|
-
onApiKeyChange,
|
|
397
|
-
onSubmit,
|
|
398
|
-
onToggleUseExistingKey,
|
|
399
|
-
onCreateOAuthToken,
|
|
400
|
-
selectedOption = existingApiKey ? "existing" : onCreateOAuthToken ? "oauth" : "new",
|
|
401
|
-
onSelectOption
|
|
402
|
-
}) {
|
|
403
|
-
const [cursorOffset, setCursorOffset] = import_react2.useState(0);
|
|
404
|
-
const terminalSize = useTerminalSize();
|
|
405
|
-
const [theme] = useTheme();
|
|
406
|
-
const handlePrevious = import_react2.useCallback(() => {
|
|
407
|
-
if (selectedOption === "new" && onCreateOAuthToken) {
|
|
408
|
-
onSelectOption?.("oauth");
|
|
409
|
-
} else if (selectedOption === "oauth" && existingApiKey) {
|
|
410
|
-
onSelectOption?.("existing");
|
|
411
|
-
onToggleUseExistingKey(true);
|
|
412
|
-
}
|
|
413
|
-
}, [
|
|
414
|
-
selectedOption,
|
|
415
|
-
onCreateOAuthToken,
|
|
416
|
-
existingApiKey,
|
|
417
|
-
onSelectOption,
|
|
418
|
-
onToggleUseExistingKey
|
|
419
|
-
]);
|
|
420
|
-
const handleNext = import_react2.useCallback(() => {
|
|
421
|
-
if (selectedOption === "existing") {
|
|
422
|
-
onSelectOption?.(onCreateOAuthToken ? "oauth" : "new");
|
|
423
|
-
onToggleUseExistingKey(false);
|
|
424
|
-
} else if (selectedOption === "oauth") {
|
|
425
|
-
onSelectOption?.("new");
|
|
426
|
-
}
|
|
427
|
-
}, [
|
|
428
|
-
selectedOption,
|
|
429
|
-
onCreateOAuthToken,
|
|
430
|
-
onSelectOption,
|
|
431
|
-
onToggleUseExistingKey
|
|
432
|
-
]);
|
|
433
|
-
const handleConfirm = import_react2.useCallback(() => {
|
|
434
|
-
if (selectedOption === "oauth" && onCreateOAuthToken) {
|
|
435
|
-
onCreateOAuthToken();
|
|
436
|
-
} else {
|
|
437
|
-
onSubmit();
|
|
438
|
-
}
|
|
439
|
-
}, [selectedOption, onCreateOAuthToken, onSubmit]);
|
|
440
|
-
const isTextInputVisible = selectedOption === "new";
|
|
441
|
-
useKeybindings({
|
|
442
|
-
"confirm:previous": handlePrevious,
|
|
443
|
-
"confirm:next": handleNext,
|
|
444
|
-
"confirm:yes": handleConfirm
|
|
445
|
-
}, { context: "Confirmation", isActive: !isTextInputVisible });
|
|
446
|
-
useKeybindings({
|
|
447
|
-
"confirm:previous": handlePrevious,
|
|
448
|
-
"confirm:next": handleNext
|
|
449
|
-
}, { context: "Confirmation", isActive: isTextInputVisible });
|
|
450
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(jsx_dev_runtime2.Fragment, {
|
|
451
|
-
children: [
|
|
452
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
453
|
-
flexDirection: "column",
|
|
454
|
-
borderStyle: "round",
|
|
455
|
-
paddingX: 1,
|
|
456
|
-
children: [
|
|
457
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
458
|
-
flexDirection: "column",
|
|
459
|
-
marginBottom: 1,
|
|
460
|
-
children: [
|
|
461
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
462
|
-
bold: true,
|
|
463
|
-
children: "Install GitHub App"
|
|
464
|
-
}, undefined, false, undefined, this),
|
|
465
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
466
|
-
dimColor: true,
|
|
467
|
-
children: "Choose API key"
|
|
468
|
-
}, undefined, false, undefined, this)
|
|
469
|
-
]
|
|
470
|
-
}, undefined, true, undefined, this),
|
|
471
|
-
existingApiKey && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
472
|
-
marginBottom: 1,
|
|
473
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
474
|
-
children: [
|
|
475
|
-
selectedOption === "existing" ? color("success", theme)("> ") : " ",
|
|
476
|
-
"Use your existing Claude Code API key"
|
|
477
|
-
]
|
|
478
|
-
}, undefined, true, undefined, this)
|
|
479
|
-
}, undefined, false, undefined, this),
|
|
480
|
-
onCreateOAuthToken && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
481
|
-
marginBottom: 1,
|
|
482
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
483
|
-
children: [
|
|
484
|
-
selectedOption === "oauth" ? color("success", theme)("> ") : " ",
|
|
485
|
-
"Create a long-lived token with your Claude subscription"
|
|
486
|
-
]
|
|
487
|
-
}, undefined, true, undefined, this)
|
|
488
|
-
}, undefined, false, undefined, this),
|
|
489
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
490
|
-
marginBottom: 1,
|
|
491
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
492
|
-
children: [
|
|
493
|
-
selectedOption === "new" ? color("success", theme)("> ") : " ",
|
|
494
|
-
"Enter a new API key"
|
|
495
|
-
]
|
|
496
|
-
}, undefined, true, undefined, this)
|
|
497
|
-
}, undefined, false, undefined, this),
|
|
498
|
-
selectedOption === "new" && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(TextInput, {
|
|
499
|
-
value: apiKeyOrOAuthToken,
|
|
500
|
-
onChange: onApiKeyChange,
|
|
501
|
-
onSubmit,
|
|
502
|
-
onPaste: onApiKeyChange,
|
|
503
|
-
focus: true,
|
|
504
|
-
placeholder: "sk-ant\u2026 (Create a new key at https://platform.claude.com/settings/keys)",
|
|
505
|
-
mask: "*",
|
|
506
|
-
columns: terminalSize.columns,
|
|
507
|
-
cursorOffset,
|
|
508
|
-
onChangeCursorOffset: setCursorOffset,
|
|
509
|
-
showCursor: true
|
|
510
|
-
}, undefined, false, undefined, this)
|
|
511
|
-
]
|
|
512
|
-
}, undefined, true, undefined, this),
|
|
513
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
514
|
-
marginLeft: 3,
|
|
515
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
516
|
-
dimColor: true,
|
|
517
|
-
children: "\u2191/\u2193 to select \xB7 Enter to continue"
|
|
518
|
-
}, undefined, false, undefined, this)
|
|
519
|
-
}, undefined, false, undefined, this)
|
|
520
|
-
]
|
|
521
|
-
}, undefined, true, undefined, this);
|
|
522
|
-
}
|
|
523
|
-
var import_react2, jsx_dev_runtime2;
|
|
524
|
-
var init_ApiKeyStep = __esm(() => {
|
|
525
|
-
init_TextInput();
|
|
526
|
-
init_useTerminalSize();
|
|
527
|
-
init_src();
|
|
528
|
-
init_useKeybinding();
|
|
529
|
-
import_react2 = __toESM(require_react(), 1);
|
|
530
|
-
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
531
|
-
});
|
|
532
|
-
|
|
533
|
-
// src/commands/install-github-app/CheckExistingSecretStep.tsx
|
|
534
|
-
function CheckExistingSecretStep({
|
|
535
|
-
useExistingSecret,
|
|
536
|
-
secretName,
|
|
537
|
-
onToggleUseExistingSecret,
|
|
538
|
-
onSecretNameChange,
|
|
539
|
-
onSubmit
|
|
540
|
-
}) {
|
|
541
|
-
const [cursorOffset, setCursorOffset] = import_react3.useState(0);
|
|
542
|
-
const terminalSize = useTerminalSize();
|
|
543
|
-
const [theme] = useTheme();
|
|
544
|
-
const handlePrevious = import_react3.useCallback(() => onToggleUseExistingSecret(true), [onToggleUseExistingSecret]);
|
|
545
|
-
const handleNext = import_react3.useCallback(() => onToggleUseExistingSecret(false), [onToggleUseExistingSecret]);
|
|
546
|
-
useKeybindings({
|
|
547
|
-
"confirm:previous": handlePrevious,
|
|
548
|
-
"confirm:next": handleNext,
|
|
549
|
-
"confirm:yes": onSubmit
|
|
550
|
-
}, { context: "Confirmation", isActive: useExistingSecret });
|
|
551
|
-
useKeybindings({
|
|
552
|
-
"confirm:previous": handlePrevious,
|
|
553
|
-
"confirm:next": handleNext
|
|
554
|
-
}, { context: "Confirmation", isActive: !useExistingSecret });
|
|
555
|
-
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
556
|
-
children: [
|
|
557
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
558
|
-
flexDirection: "column",
|
|
559
|
-
borderStyle: "round",
|
|
560
|
-
paddingX: 1,
|
|
561
|
-
children: [
|
|
562
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
563
|
-
flexDirection: "column",
|
|
564
|
-
marginBottom: 1,
|
|
565
|
-
children: [
|
|
566
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
567
|
-
bold: true,
|
|
568
|
-
children: "Install GitHub App"
|
|
569
|
-
}, undefined, false, undefined, this),
|
|
570
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
571
|
-
dimColor: true,
|
|
572
|
-
children: "Setup API key secret"
|
|
573
|
-
}, undefined, false, undefined, this)
|
|
574
|
-
]
|
|
575
|
-
}, undefined, true, undefined, this),
|
|
576
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
577
|
-
marginBottom: 1,
|
|
578
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
579
|
-
color: "warning",
|
|
580
|
-
children: "ANTHROPIC_API_KEY already exists in repository secrets!"
|
|
581
|
-
}, undefined, false, undefined, this)
|
|
582
|
-
}, undefined, false, undefined, this),
|
|
583
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
584
|
-
marginBottom: 1,
|
|
585
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
586
|
-
children: "Would you like to:"
|
|
587
|
-
}, undefined, false, undefined, this)
|
|
588
|
-
}, undefined, false, undefined, this),
|
|
589
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
590
|
-
marginBottom: 1,
|
|
591
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
592
|
-
children: [
|
|
593
|
-
useExistingSecret ? color("success", theme)("> ") : " ",
|
|
594
|
-
"Use the existing API key"
|
|
595
|
-
]
|
|
596
|
-
}, undefined, true, undefined, this)
|
|
597
|
-
}, undefined, false, undefined, this),
|
|
598
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
599
|
-
marginBottom: 1,
|
|
600
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
601
|
-
children: [
|
|
602
|
-
!useExistingSecret ? color("success", theme)("> ") : " ",
|
|
603
|
-
"Create a new secret with a different name"
|
|
604
|
-
]
|
|
605
|
-
}, undefined, true, undefined, this)
|
|
606
|
-
}, undefined, false, undefined, this),
|
|
607
|
-
!useExistingSecret && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
608
|
-
children: [
|
|
609
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
610
|
-
marginBottom: 1,
|
|
611
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
612
|
-
children: "Enter new secret name (alphanumeric with underscores):"
|
|
613
|
-
}, undefined, false, undefined, this)
|
|
614
|
-
}, undefined, false, undefined, this),
|
|
615
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(TextInput, {
|
|
616
|
-
value: secretName,
|
|
617
|
-
onChange: onSecretNameChange,
|
|
618
|
-
onSubmit,
|
|
619
|
-
focus: true,
|
|
620
|
-
placeholder: "e.g., CLAUDE_API_KEY",
|
|
621
|
-
columns: terminalSize.columns,
|
|
622
|
-
cursorOffset,
|
|
623
|
-
onChangeCursorOffset: setCursorOffset,
|
|
624
|
-
showCursor: true
|
|
625
|
-
}, undefined, false, undefined, this)
|
|
626
|
-
]
|
|
627
|
-
}, undefined, true, undefined, this)
|
|
628
|
-
]
|
|
629
|
-
}, undefined, true, undefined, this),
|
|
630
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
631
|
-
marginLeft: 3,
|
|
632
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
633
|
-
dimColor: true,
|
|
634
|
-
children: "\u2191/\u2193 to select \xB7 Enter to continue"
|
|
635
|
-
}, undefined, false, undefined, this)
|
|
636
|
-
}, undefined, false, undefined, this)
|
|
637
|
-
]
|
|
638
|
-
}, undefined, true, undefined, this);
|
|
639
|
-
}
|
|
640
|
-
var import_react3, jsx_dev_runtime3;
|
|
641
|
-
var init_CheckExistingSecretStep = __esm(() => {
|
|
642
|
-
init_TextInput();
|
|
643
|
-
init_useTerminalSize();
|
|
644
|
-
init_src();
|
|
645
|
-
init_useKeybinding();
|
|
646
|
-
import_react3 = __toESM(require_react(), 1);
|
|
647
|
-
jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
|
|
648
|
-
});
|
|
649
|
-
|
|
650
|
-
// src/commands/install-github-app/CheckGitHubStep.tsx
|
|
651
|
-
function CheckGitHubStep() {
|
|
652
|
-
return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
653
|
-
children: "Checking GitHub CLI installation\u2026"
|
|
654
|
-
}, undefined, false, undefined, this);
|
|
655
|
-
}
|
|
656
|
-
var jsx_dev_runtime4;
|
|
657
|
-
var init_CheckGitHubStep = __esm(() => {
|
|
658
|
-
init_src();
|
|
659
|
-
jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
|
|
660
|
-
});
|
|
661
|
-
|
|
662
|
-
// src/commands/install-github-app/ChooseRepoStep.tsx
|
|
663
|
-
function ChooseRepoStep({
|
|
664
|
-
currentRepo,
|
|
665
|
-
useCurrentRepo,
|
|
666
|
-
repoUrl,
|
|
667
|
-
onRepoUrlChange,
|
|
668
|
-
onSubmit,
|
|
669
|
-
onToggleUseCurrentRepo
|
|
670
|
-
}) {
|
|
671
|
-
const [cursorOffset, setCursorOffset] = import_react4.useState(0);
|
|
672
|
-
const [showEmptyError, setShowEmptyError] = import_react4.useState(false);
|
|
673
|
-
const terminalSize = useTerminalSize();
|
|
674
|
-
const textInputColumns = terminalSize.columns;
|
|
675
|
-
const handleSubmit = import_react4.useCallback(() => {
|
|
676
|
-
const repoName = useCurrentRepo ? currentRepo : repoUrl;
|
|
677
|
-
if (!repoName?.trim()) {
|
|
678
|
-
setShowEmptyError(true);
|
|
679
|
-
return;
|
|
680
|
-
}
|
|
681
|
-
onSubmit();
|
|
682
|
-
}, [useCurrentRepo, currentRepo, repoUrl, onSubmit]);
|
|
683
|
-
const isTextInputVisible = !useCurrentRepo || !currentRepo;
|
|
684
|
-
const handlePrevious = import_react4.useCallback(() => {
|
|
685
|
-
onToggleUseCurrentRepo(true);
|
|
686
|
-
setShowEmptyError(false);
|
|
687
|
-
}, [onToggleUseCurrentRepo]);
|
|
688
|
-
const handleNext = import_react4.useCallback(() => {
|
|
689
|
-
onToggleUseCurrentRepo(false);
|
|
690
|
-
setShowEmptyError(false);
|
|
691
|
-
}, [onToggleUseCurrentRepo]);
|
|
692
|
-
useKeybindings({
|
|
693
|
-
"confirm:previous": handlePrevious,
|
|
694
|
-
"confirm:next": handleNext,
|
|
695
|
-
"confirm:yes": handleSubmit
|
|
696
|
-
}, { context: "Confirmation", isActive: !isTextInputVisible });
|
|
697
|
-
useKeybindings({
|
|
698
|
-
"confirm:previous": handlePrevious,
|
|
699
|
-
"confirm:next": handleNext
|
|
700
|
-
}, { context: "Confirmation", isActive: isTextInputVisible });
|
|
701
|
-
return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
|
|
702
|
-
children: [
|
|
703
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
704
|
-
flexDirection: "column",
|
|
705
|
-
borderStyle: "round",
|
|
706
|
-
paddingX: 1,
|
|
707
|
-
children: [
|
|
708
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
709
|
-
flexDirection: "column",
|
|
710
|
-
marginBottom: 1,
|
|
711
|
-
children: [
|
|
712
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
713
|
-
bold: true,
|
|
714
|
-
children: "Install GitHub App"
|
|
715
|
-
}, undefined, false, undefined, this),
|
|
716
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
717
|
-
dimColor: true,
|
|
718
|
-
children: "Select GitHub repository"
|
|
719
|
-
}, undefined, false, undefined, this)
|
|
720
|
-
]
|
|
721
|
-
}, undefined, true, undefined, this),
|
|
722
|
-
currentRepo && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
723
|
-
marginBottom: 1,
|
|
724
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
725
|
-
bold: useCurrentRepo,
|
|
726
|
-
color: useCurrentRepo ? "permission" : undefined,
|
|
727
|
-
children: [
|
|
728
|
-
useCurrentRepo ? "> " : " ",
|
|
729
|
-
"Use current repository: ",
|
|
730
|
-
currentRepo
|
|
731
|
-
]
|
|
732
|
-
}, undefined, true, undefined, this)
|
|
733
|
-
}, undefined, false, undefined, this),
|
|
734
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
735
|
-
marginBottom: 1,
|
|
736
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
737
|
-
bold: !useCurrentRepo || !currentRepo,
|
|
738
|
-
color: !useCurrentRepo || !currentRepo ? "permission" : undefined,
|
|
739
|
-
children: [
|
|
740
|
-
!useCurrentRepo || !currentRepo ? "> " : " ",
|
|
741
|
-
currentRepo ? "Enter a different repository" : "Enter repository"
|
|
742
|
-
]
|
|
743
|
-
}, undefined, true, undefined, this)
|
|
744
|
-
}, undefined, false, undefined, this),
|
|
745
|
-
(!useCurrentRepo || !currentRepo) && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
746
|
-
marginLeft: 2,
|
|
747
|
-
marginBottom: 1,
|
|
748
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(TextInput, {
|
|
749
|
-
value: repoUrl,
|
|
750
|
-
onChange: (value) => {
|
|
751
|
-
onRepoUrlChange(value);
|
|
752
|
-
setShowEmptyError(false);
|
|
753
|
-
},
|
|
754
|
-
onSubmit: handleSubmit,
|
|
755
|
-
focus: true,
|
|
756
|
-
placeholder: "Enter a repo as owner/repo or https://github.com/owner/repo\u2026",
|
|
757
|
-
columns: textInputColumns,
|
|
758
|
-
cursorOffset,
|
|
759
|
-
onChangeCursorOffset: setCursorOffset,
|
|
760
|
-
showCursor: true
|
|
761
|
-
}, undefined, false, undefined, this)
|
|
762
|
-
}, undefined, false, undefined, this)
|
|
763
|
-
]
|
|
764
|
-
}, undefined, true, undefined, this),
|
|
765
|
-
showEmptyError && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
766
|
-
marginLeft: 3,
|
|
767
|
-
marginBottom: 1,
|
|
768
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
769
|
-
color: "error",
|
|
770
|
-
children: "Please enter a repository name to continue"
|
|
771
|
-
}, undefined, false, undefined, this)
|
|
772
|
-
}, undefined, false, undefined, this),
|
|
773
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
774
|
-
marginLeft: 3,
|
|
775
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
776
|
-
dimColor: true,
|
|
777
|
-
children: [
|
|
778
|
-
currentRepo ? "\u2191/\u2193 to select \xB7 " : "",
|
|
779
|
-
"Enter to continue"
|
|
780
|
-
]
|
|
781
|
-
}, undefined, true, undefined, this)
|
|
782
|
-
}, undefined, false, undefined, this)
|
|
783
|
-
]
|
|
784
|
-
}, undefined, true, undefined, this);
|
|
785
|
-
}
|
|
786
|
-
var import_react4, jsx_dev_runtime5;
|
|
787
|
-
var init_ChooseRepoStep = __esm(() => {
|
|
788
|
-
init_TextInput();
|
|
789
|
-
init_useTerminalSize();
|
|
790
|
-
init_src();
|
|
791
|
-
init_useKeybinding();
|
|
792
|
-
import_react4 = __toESM(require_react(), 1);
|
|
793
|
-
jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
|
|
794
|
-
});
|
|
795
|
-
|
|
796
|
-
// src/commands/install-github-app/CreatingStep.tsx
|
|
797
|
-
function CreatingStep({
|
|
798
|
-
currentWorkflowInstallStep,
|
|
799
|
-
secretExists,
|
|
800
|
-
useExistingSecret,
|
|
801
|
-
secretName,
|
|
802
|
-
skipWorkflow = false,
|
|
803
|
-
selectedWorkflows
|
|
804
|
-
}) {
|
|
805
|
-
const progressSteps = skipWorkflow ? [
|
|
806
|
-
"Getting repository information",
|
|
807
|
-
secretExists && useExistingSecret ? "Using existing API key secret" : `Setting up ${secretName} secret`
|
|
808
|
-
] : [
|
|
809
|
-
"Getting repository information",
|
|
810
|
-
"Creating branch",
|
|
811
|
-
selectedWorkflows.length > 1 ? "Creating workflow files" : "Creating workflow file",
|
|
812
|
-
secretExists && useExistingSecret ? "Using existing API key secret" : `Setting up ${secretName} secret`,
|
|
813
|
-
"Opening pull request page"
|
|
814
|
-
];
|
|
815
|
-
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(jsx_dev_runtime6.Fragment, {
|
|
816
|
-
children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
817
|
-
flexDirection: "column",
|
|
818
|
-
borderStyle: "round",
|
|
819
|
-
paddingX: 1,
|
|
820
|
-
children: [
|
|
821
|
-
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
822
|
-
flexDirection: "column",
|
|
823
|
-
marginBottom: 1,
|
|
824
|
-
children: [
|
|
825
|
-
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
826
|
-
bold: true,
|
|
827
|
-
children: "Install GitHub App"
|
|
828
|
-
}, undefined, false, undefined, this),
|
|
829
|
-
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
830
|
-
dimColor: true,
|
|
831
|
-
children: "Create GitHub Actions workflow"
|
|
832
|
-
}, undefined, false, undefined, this)
|
|
833
|
-
]
|
|
834
|
-
}, undefined, true, undefined, this),
|
|
835
|
-
progressSteps.map((stepText, index) => {
|
|
836
|
-
let status = "pending";
|
|
837
|
-
if (index < currentWorkflowInstallStep) {
|
|
838
|
-
status = "completed";
|
|
839
|
-
} else if (index === currentWorkflowInstallStep) {
|
|
840
|
-
status = "in-progress";
|
|
841
|
-
}
|
|
842
|
-
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
843
|
-
children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
844
|
-
color: status === "completed" ? "success" : status === "in-progress" ? "warning" : undefined,
|
|
845
|
-
children: [
|
|
846
|
-
status === "completed" ? "\u2713 " : "",
|
|
847
|
-
stepText,
|
|
848
|
-
status === "in-progress" ? "\u2026" : ""
|
|
849
|
-
]
|
|
850
|
-
}, undefined, true, undefined, this)
|
|
851
|
-
}, index, false, undefined, this);
|
|
852
|
-
})
|
|
853
|
-
]
|
|
854
|
-
}, undefined, true, undefined, this)
|
|
855
|
-
}, undefined, false, undefined, this);
|
|
856
|
-
}
|
|
857
|
-
var jsx_dev_runtime6;
|
|
858
|
-
var init_CreatingStep = __esm(() => {
|
|
859
|
-
init_src();
|
|
860
|
-
jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
// src/commands/install-github-app/ErrorStep.tsx
|
|
864
|
-
function ErrorStep({
|
|
865
|
-
error,
|
|
866
|
-
errorReason,
|
|
867
|
-
errorInstructions
|
|
868
|
-
}) {
|
|
869
|
-
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
870
|
-
children: [
|
|
871
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
872
|
-
flexDirection: "column",
|
|
873
|
-
borderStyle: "round",
|
|
874
|
-
paddingX: 1,
|
|
875
|
-
children: [
|
|
876
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
877
|
-
flexDirection: "column",
|
|
878
|
-
marginBottom: 1,
|
|
879
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
880
|
-
bold: true,
|
|
881
|
-
children: "Install GitHub App"
|
|
882
|
-
}, undefined, false, undefined, this)
|
|
883
|
-
}, undefined, false, undefined, this),
|
|
884
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
885
|
-
color: "error",
|
|
886
|
-
children: [
|
|
887
|
-
"Error: ",
|
|
888
|
-
error
|
|
889
|
-
]
|
|
890
|
-
}, undefined, true, undefined, this),
|
|
891
|
-
errorReason && /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
892
|
-
marginTop: 1,
|
|
893
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
894
|
-
dimColor: true,
|
|
895
|
-
children: [
|
|
896
|
-
"Reason: ",
|
|
897
|
-
errorReason
|
|
898
|
-
]
|
|
899
|
-
}, undefined, true, undefined, this)
|
|
900
|
-
}, undefined, false, undefined, this),
|
|
901
|
-
errorInstructions && errorInstructions.length > 0 && /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
902
|
-
flexDirection: "column",
|
|
903
|
-
marginTop: 1,
|
|
904
|
-
children: [
|
|
905
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
906
|
-
dimColor: true,
|
|
907
|
-
children: "How to fix:"
|
|
908
|
-
}, undefined, false, undefined, this),
|
|
909
|
-
errorInstructions.map((instruction, index) => /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
910
|
-
marginLeft: 2,
|
|
911
|
-
children: [
|
|
912
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
913
|
-
dimColor: true,
|
|
914
|
-
children: "\u2022 "
|
|
915
|
-
}, undefined, false, undefined, this),
|
|
916
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
917
|
-
children: instruction
|
|
918
|
-
}, undefined, false, undefined, this)
|
|
919
|
-
]
|
|
920
|
-
}, index, true, undefined, this))
|
|
921
|
-
]
|
|
922
|
-
}, undefined, true, undefined, this),
|
|
923
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
924
|
-
marginTop: 1,
|
|
925
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
926
|
-
dimColor: true,
|
|
927
|
-
children: [
|
|
928
|
-
"For manual setup instructions, see:",
|
|
929
|
-
" ",
|
|
930
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
931
|
-
color: "claude",
|
|
932
|
-
children: GITHUB_ACTION_SETUP_DOCS_URL
|
|
933
|
-
}, undefined, false, undefined, this)
|
|
934
|
-
]
|
|
935
|
-
}, undefined, true, undefined, this)
|
|
936
|
-
}, undefined, false, undefined, this)
|
|
937
|
-
]
|
|
938
|
-
}, undefined, true, undefined, this),
|
|
939
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
940
|
-
marginLeft: 3,
|
|
941
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
942
|
-
dimColor: true,
|
|
943
|
-
children: "Press any key to exit"
|
|
944
|
-
}, undefined, false, undefined, this)
|
|
945
|
-
}, undefined, false, undefined, this)
|
|
946
|
-
]
|
|
947
|
-
}, undefined, true, undefined, this);
|
|
948
|
-
}
|
|
949
|
-
var jsx_dev_runtime7;
|
|
950
|
-
var init_ErrorStep = __esm(() => {
|
|
951
|
-
init_github_app();
|
|
952
|
-
init_src();
|
|
953
|
-
jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
|
|
954
|
-
});
|
|
955
|
-
|
|
956
|
-
// src/commands/install-github-app/ExistingWorkflowStep.tsx
|
|
957
|
-
function ExistingWorkflowStep({
|
|
958
|
-
repoName,
|
|
959
|
-
onSelectAction
|
|
960
|
-
}) {
|
|
961
|
-
const options = [
|
|
962
|
-
{
|
|
963
|
-
label: "Update workflow file with latest version",
|
|
964
|
-
value: "update"
|
|
965
|
-
},
|
|
966
|
-
{
|
|
967
|
-
label: "Skip workflow update (configure secrets only)",
|
|
968
|
-
value: "skip"
|
|
969
|
-
},
|
|
970
|
-
{
|
|
971
|
-
label: "Exit without making changes",
|
|
972
|
-
value: "exit"
|
|
973
|
-
}
|
|
974
|
-
];
|
|
975
|
-
const handleSelect = (value) => {
|
|
976
|
-
onSelectAction(value);
|
|
977
|
-
};
|
|
978
|
-
const handleCancel = () => {
|
|
979
|
-
onSelectAction("exit");
|
|
980
|
-
};
|
|
981
|
-
return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
982
|
-
flexDirection: "column",
|
|
983
|
-
borderStyle: "round",
|
|
984
|
-
borderDimColor: true,
|
|
985
|
-
paddingX: 1,
|
|
986
|
-
children: [
|
|
987
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
988
|
-
flexDirection: "column",
|
|
989
|
-
marginBottom: 1,
|
|
990
|
-
children: [
|
|
991
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
992
|
-
bold: true,
|
|
993
|
-
children: "Existing Workflow Found"
|
|
994
|
-
}, undefined, false, undefined, this),
|
|
995
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
996
|
-
dimColor: true,
|
|
997
|
-
children: [
|
|
998
|
-
"Repository: ",
|
|
999
|
-
repoName
|
|
1000
|
-
]
|
|
1001
|
-
}, undefined, true, undefined, this)
|
|
1002
|
-
]
|
|
1003
|
-
}, undefined, true, undefined, this),
|
|
1004
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1005
|
-
flexDirection: "column",
|
|
1006
|
-
marginBottom: 1,
|
|
1007
|
-
children: [
|
|
1008
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1009
|
-
children: [
|
|
1010
|
-
"A Claude workflow file already exists at",
|
|
1011
|
-
" ",
|
|
1012
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1013
|
-
color: "claude",
|
|
1014
|
-
children: ".github/workflows/claude.yml"
|
|
1015
|
-
}, undefined, false, undefined, this)
|
|
1016
|
-
]
|
|
1017
|
-
}, undefined, true, undefined, this),
|
|
1018
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1019
|
-
dimColor: true,
|
|
1020
|
-
children: "What would you like to do?"
|
|
1021
|
-
}, undefined, false, undefined, this)
|
|
1022
|
-
]
|
|
1023
|
-
}, undefined, true, undefined, this),
|
|
1024
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1025
|
-
flexDirection: "column",
|
|
1026
|
-
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Select, {
|
|
1027
|
-
options,
|
|
1028
|
-
onChange: handleSelect,
|
|
1029
|
-
onCancel: handleCancel
|
|
1030
|
-
}, undefined, false, undefined, this)
|
|
1031
|
-
}, undefined, false, undefined, this),
|
|
1032
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1033
|
-
marginTop: 1,
|
|
1034
|
-
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1035
|
-
dimColor: true,
|
|
1036
|
-
children: [
|
|
1037
|
-
"View the latest workflow template at:",
|
|
1038
|
-
" ",
|
|
1039
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1040
|
-
color: "claude",
|
|
1041
|
-
children: "https://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml"
|
|
1042
|
-
}, undefined, false, undefined, this)
|
|
1043
|
-
]
|
|
1044
|
-
}, undefined, true, undefined, this)
|
|
1045
|
-
}, undefined, false, undefined, this)
|
|
1046
|
-
]
|
|
1047
|
-
}, undefined, true, undefined, this);
|
|
1048
|
-
}
|
|
1049
|
-
var jsx_dev_runtime8;
|
|
1050
|
-
var init_ExistingWorkflowStep = __esm(() => {
|
|
1051
|
-
init_CustomSelect();
|
|
1052
|
-
init_src();
|
|
1053
|
-
jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1054
|
-
});
|
|
1055
|
-
|
|
1056
|
-
// src/commands/install-github-app/InstallAppStep.tsx
|
|
1057
|
-
function InstallAppStep({ repoUrl, onSubmit }) {
|
|
1058
|
-
useKeybinding("confirm:yes", onSubmit, { context: "Confirmation" });
|
|
1059
|
-
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1060
|
-
flexDirection: "column",
|
|
1061
|
-
borderStyle: "round",
|
|
1062
|
-
borderDimColor: true,
|
|
1063
|
-
paddingX: 1,
|
|
1064
|
-
children: [
|
|
1065
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1066
|
-
flexDirection: "column",
|
|
1067
|
-
marginBottom: 1,
|
|
1068
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1069
|
-
bold: true,
|
|
1070
|
-
children: "Install the Claude GitHub App"
|
|
1071
|
-
}, undefined, false, undefined, this)
|
|
1072
|
-
}, undefined, false, undefined, this),
|
|
1073
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1074
|
-
marginBottom: 1,
|
|
1075
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1076
|
-
children: "Opening browser to install the Claude GitHub App\u2026"
|
|
1077
|
-
}, undefined, false, undefined, this)
|
|
1078
|
-
}, undefined, false, undefined, this),
|
|
1079
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1080
|
-
marginBottom: 1,
|
|
1081
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1082
|
-
children: "If your browser doesn't open automatically, visit:"
|
|
1083
|
-
}, undefined, false, undefined, this)
|
|
1084
|
-
}, undefined, false, undefined, this),
|
|
1085
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1086
|
-
marginBottom: 1,
|
|
1087
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1088
|
-
underline: true,
|
|
1089
|
-
children: "https://github.com/apps/claude"
|
|
1090
|
-
}, undefined, false, undefined, this)
|
|
1091
|
-
}, undefined, false, undefined, this),
|
|
1092
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1093
|
-
marginBottom: 1,
|
|
1094
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1095
|
-
children: [
|
|
1096
|
-
"Please install the app for repository: ",
|
|
1097
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1098
|
-
bold: true,
|
|
1099
|
-
children: repoUrl
|
|
1100
|
-
}, undefined, false, undefined, this)
|
|
1101
|
-
]
|
|
1102
|
-
}, undefined, true, undefined, this)
|
|
1103
|
-
}, undefined, false, undefined, this),
|
|
1104
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1105
|
-
marginBottom: 1,
|
|
1106
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1107
|
-
dimColor: true,
|
|
1108
|
-
children: "Important: Make sure to grant access to this specific repository"
|
|
1109
|
-
}, undefined, false, undefined, this)
|
|
1110
|
-
}, undefined, false, undefined, this),
|
|
1111
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1112
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1113
|
-
bold: true,
|
|
1114
|
-
color: "permission",
|
|
1115
|
-
children: [
|
|
1116
|
-
"Press Enter once you've installed the app",
|
|
1117
|
-
figures_default.ellipsis
|
|
1118
|
-
]
|
|
1119
|
-
}, undefined, true, undefined, this)
|
|
1120
|
-
}, undefined, false, undefined, this),
|
|
1121
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1122
|
-
marginTop: 1,
|
|
1123
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1124
|
-
dimColor: true,
|
|
1125
|
-
children: [
|
|
1126
|
-
"Having trouble? See manual setup instructions at:",
|
|
1127
|
-
" ",
|
|
1128
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1129
|
-
color: "claude",
|
|
1130
|
-
children: GITHUB_ACTION_SETUP_DOCS_URL
|
|
1131
|
-
}, undefined, false, undefined, this)
|
|
1132
|
-
]
|
|
1133
|
-
}, undefined, true, undefined, this)
|
|
1134
|
-
}, undefined, false, undefined, this)
|
|
1135
|
-
]
|
|
1136
|
-
}, undefined, true, undefined, this);
|
|
1137
|
-
}
|
|
1138
|
-
var jsx_dev_runtime9;
|
|
1139
|
-
var init_InstallAppStep = __esm(() => {
|
|
1140
|
-
init_figures();
|
|
1141
|
-
init_github_app();
|
|
1142
|
-
init_src();
|
|
1143
|
-
init_useKeybinding();
|
|
1144
|
-
jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1145
|
-
});
|
|
1146
|
-
|
|
1147
|
-
// src/commands/install-github-app/SuccessStep.tsx
|
|
1148
|
-
function SuccessStep({
|
|
1149
|
-
secretExists,
|
|
1150
|
-
useExistingSecret,
|
|
1151
|
-
secretName,
|
|
1152
|
-
skipWorkflow = false
|
|
1153
|
-
}) {
|
|
1154
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
1155
|
-
children: [
|
|
1156
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
1157
|
-
flexDirection: "column",
|
|
1158
|
-
borderStyle: "round",
|
|
1159
|
-
paddingX: 1,
|
|
1160
|
-
children: [
|
|
1161
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
1162
|
-
flexDirection: "column",
|
|
1163
|
-
marginBottom: 1,
|
|
1164
|
-
children: [
|
|
1165
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1166
|
-
bold: true,
|
|
1167
|
-
children: "Install GitHub App"
|
|
1168
|
-
}, undefined, false, undefined, this),
|
|
1169
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1170
|
-
dimColor: true,
|
|
1171
|
-
children: "Success"
|
|
1172
|
-
}, undefined, false, undefined, this)
|
|
1173
|
-
]
|
|
1174
|
-
}, undefined, true, undefined, this),
|
|
1175
|
-
!skipWorkflow && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1176
|
-
color: "success",
|
|
1177
|
-
children: "\u2713 GitHub Actions workflow created!"
|
|
1178
|
-
}, undefined, false, undefined, this),
|
|
1179
|
-
secretExists && useExistingSecret && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
1180
|
-
marginTop: 1,
|
|
1181
|
-
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1182
|
-
color: "success",
|
|
1183
|
-
children: "\u2713 Using existing ANTHROPIC_API_KEY secret"
|
|
1184
|
-
}, undefined, false, undefined, this)
|
|
1185
|
-
}, undefined, false, undefined, this),
|
|
1186
|
-
(!secretExists || !useExistingSecret) && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
1187
|
-
marginTop: 1,
|
|
1188
|
-
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1189
|
-
color: "success",
|
|
1190
|
-
children: [
|
|
1191
|
-
"\u2713 API key saved as ",
|
|
1192
|
-
secretName,
|
|
1193
|
-
" secret"
|
|
1194
|
-
]
|
|
1195
|
-
}, undefined, true, undefined, this)
|
|
1196
|
-
}, undefined, false, undefined, this),
|
|
1197
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
1198
|
-
marginTop: 1,
|
|
1199
|
-
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1200
|
-
children: "Next steps:"
|
|
1201
|
-
}, undefined, false, undefined, this)
|
|
1202
|
-
}, undefined, false, undefined, this),
|
|
1203
|
-
skipWorkflow ? /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
1204
|
-
children: [
|
|
1205
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1206
|
-
children: "1. Install the Claude GitHub App if you haven't already"
|
|
1207
|
-
}, undefined, false, undefined, this),
|
|
1208
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1209
|
-
children: "2. Your workflow file was kept unchanged"
|
|
1210
|
-
}, undefined, false, undefined, this),
|
|
1211
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1212
|
-
children: "3. API key is configured and ready to use"
|
|
1213
|
-
}, undefined, false, undefined, this)
|
|
1214
|
-
]
|
|
1215
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(jsx_dev_runtime10.Fragment, {
|
|
1216
|
-
children: [
|
|
1217
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1218
|
-
children: "1. A pre-filled PR page has been created"
|
|
1219
|
-
}, undefined, false, undefined, this),
|
|
1220
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1221
|
-
children: "2. Install the Claude GitHub App if you haven't already"
|
|
1222
|
-
}, undefined, false, undefined, this),
|
|
1223
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1224
|
-
children: "3. Merge the PR to enable Claude PR assistance"
|
|
1225
|
-
}, undefined, false, undefined, this)
|
|
1226
|
-
]
|
|
1227
|
-
}, undefined, true, undefined, this)
|
|
1228
|
-
]
|
|
1229
|
-
}, undefined, true, undefined, this),
|
|
1230
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
1231
|
-
marginLeft: 3,
|
|
1232
|
-
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
1233
|
-
dimColor: true,
|
|
1234
|
-
children: "Press any key to exit"
|
|
1235
|
-
}, undefined, false, undefined, this)
|
|
1236
|
-
}, undefined, false, undefined, this)
|
|
1237
|
-
]
|
|
1238
|
-
}, undefined, true, undefined, this);
|
|
1239
|
-
}
|
|
1240
|
-
var jsx_dev_runtime10;
|
|
1241
|
-
var init_SuccessStep = __esm(() => {
|
|
1242
|
-
init_src();
|
|
1243
|
-
jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1244
|
-
});
|
|
1245
|
-
|
|
1246
|
-
// src/commands/install-github-app/setupGitHubActions.ts
|
|
1247
|
-
async function createWorkflowFile(repoName, branchName, workflowPath, workflowContent, secretName, message, context) {
|
|
1248
|
-
const checkFileResult = await execFileNoThrow("gh", [
|
|
1249
|
-
"api",
|
|
1250
|
-
`repos/${repoName}/contents/${workflowPath}`,
|
|
1251
|
-
"--jq",
|
|
1252
|
-
".sha"
|
|
1253
|
-
]);
|
|
1254
|
-
let fileSha = null;
|
|
1255
|
-
if (checkFileResult.code === 0) {
|
|
1256
|
-
fileSha = checkFileResult.stdout.trim();
|
|
1257
|
-
}
|
|
1258
|
-
let content = workflowContent;
|
|
1259
|
-
if (secretName === "CLAUDE_CODE_OAUTH_TOKEN") {
|
|
1260
|
-
content = workflowContent.replace(/anthropic_api_key: \$\{\{ secrets\.ANTHROPIC_API_KEY \}\}/g, `claude_code_oauth_token: \${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}`);
|
|
1261
|
-
} else if (secretName !== "ANTHROPIC_API_KEY") {
|
|
1262
|
-
content = workflowContent.replace(/anthropic_api_key: \$\{\{ secrets\.ANTHROPIC_API_KEY \}\}/g, `anthropic_api_key: \${{ secrets.${secretName} }}`);
|
|
1263
|
-
}
|
|
1264
|
-
const base64Content = Buffer.from(content).toString("base64");
|
|
1265
|
-
const apiParams = [
|
|
1266
|
-
"api",
|
|
1267
|
-
"--method",
|
|
1268
|
-
"PUT",
|
|
1269
|
-
`repos/${repoName}/contents/${workflowPath}`,
|
|
1270
|
-
"-f",
|
|
1271
|
-
`message=${fileSha ? `"Update ${message}"` : `"${message}"`}`,
|
|
1272
|
-
"-f",
|
|
1273
|
-
`content=${base64Content}`,
|
|
1274
|
-
"-f",
|
|
1275
|
-
`branch=${branchName}`
|
|
1276
|
-
];
|
|
1277
|
-
if (fileSha) {
|
|
1278
|
-
apiParams.push("-f", `sha=${fileSha}`);
|
|
1279
|
-
}
|
|
1280
|
-
const createFileResult = await execFileNoThrow("gh", apiParams);
|
|
1281
|
-
if (createFileResult.code !== 0) {
|
|
1282
|
-
if (createFileResult.stderr.includes("422") && createFileResult.stderr.includes("sha")) {
|
|
1283
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1284
|
-
reason: "failed_to_create_workflow_file",
|
|
1285
|
-
exit_code: createFileResult.code,
|
|
1286
|
-
...context
|
|
1287
|
-
});
|
|
1288
|
-
throw new Error(`Failed to create workflow file ${workflowPath}: A Claude workflow file already exists in this repository. Please remove it first or update it manually.`);
|
|
1289
|
-
}
|
|
1290
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1291
|
-
reason: "failed_to_create_workflow_file",
|
|
1292
|
-
exit_code: createFileResult.code,
|
|
1293
|
-
...context
|
|
1294
|
-
});
|
|
1295
|
-
const helpText = `
|
|
1296
|
-
|
|
1297
|
-
Need help? Common issues:
|
|
1298
|
-
` + `\xB7 Permission denied \u2192 Run: gh auth refresh -h github.com -s repo,workflow
|
|
1299
|
-
` + `\xB7 Not authorized \u2192 Ensure you have admin access to the repository
|
|
1300
|
-
` + "\xB7 For manual setup \u2192 Visit: https://github.com/anthropics/claude-code-action";
|
|
1301
|
-
throw new Error(`Failed to create workflow file ${workflowPath}: ${createFileResult.stderr}${helpText}`);
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
async function setupGitHubActions(repoName, apiKeyOrOAuthToken, secretName, updateProgress, skipWorkflow = false, selectedWorkflows, authType, context) {
|
|
1305
|
-
try {
|
|
1306
|
-
logEvent("tengu_setup_github_actions_started", {
|
|
1307
|
-
skip_workflow: skipWorkflow,
|
|
1308
|
-
has_api_key: !!apiKeyOrOAuthToken,
|
|
1309
|
-
using_default_secret_name: secretName === "ANTHROPIC_API_KEY",
|
|
1310
|
-
selected_claude_workflow: selectedWorkflows.includes("claude"),
|
|
1311
|
-
selected_claude_review_workflow: selectedWorkflows.includes("claude-review"),
|
|
1312
|
-
...context
|
|
1313
|
-
});
|
|
1314
|
-
const repoCheckResult = await execFileNoThrow("gh", [
|
|
1315
|
-
"api",
|
|
1316
|
-
`repos/${repoName}`,
|
|
1317
|
-
"--jq",
|
|
1318
|
-
".id"
|
|
1319
|
-
]);
|
|
1320
|
-
if (repoCheckResult.code !== 0) {
|
|
1321
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1322
|
-
reason: "repo_not_found",
|
|
1323
|
-
exit_code: repoCheckResult.code,
|
|
1324
|
-
...context
|
|
1325
|
-
});
|
|
1326
|
-
throw new Error(`Failed to access repository ${repoName}: ${repoCheckResult.stderr}`);
|
|
1327
|
-
}
|
|
1328
|
-
const defaultBranchResult = await execFileNoThrow("gh", [
|
|
1329
|
-
"api",
|
|
1330
|
-
`repos/${repoName}`,
|
|
1331
|
-
"--jq",
|
|
1332
|
-
".default_branch"
|
|
1333
|
-
]);
|
|
1334
|
-
if (defaultBranchResult.code !== 0) {
|
|
1335
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1336
|
-
reason: "failed_to_get_default_branch",
|
|
1337
|
-
exit_code: defaultBranchResult.code,
|
|
1338
|
-
...context
|
|
1339
|
-
});
|
|
1340
|
-
throw new Error(`Failed to get default branch: ${defaultBranchResult.stderr}`);
|
|
1341
|
-
}
|
|
1342
|
-
const defaultBranch = defaultBranchResult.stdout.trim();
|
|
1343
|
-
const shaResult = await execFileNoThrow("gh", [
|
|
1344
|
-
"api",
|
|
1345
|
-
`repos/${repoName}/git/ref/heads/${defaultBranch}`,
|
|
1346
|
-
"--jq",
|
|
1347
|
-
".object.sha"
|
|
1348
|
-
]);
|
|
1349
|
-
if (shaResult.code !== 0) {
|
|
1350
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1351
|
-
reason: "failed_to_get_branch_sha",
|
|
1352
|
-
exit_code: shaResult.code,
|
|
1353
|
-
...context
|
|
1354
|
-
});
|
|
1355
|
-
throw new Error(`Failed to get branch SHA: ${shaResult.stderr}`);
|
|
1356
|
-
}
|
|
1357
|
-
const sha = shaResult.stdout.trim();
|
|
1358
|
-
let branchName = null;
|
|
1359
|
-
if (!skipWorkflow) {
|
|
1360
|
-
updateProgress();
|
|
1361
|
-
branchName = `add-claude-github-actions-${Date.now()}`;
|
|
1362
|
-
const createBranchResult = await execFileNoThrow("gh", [
|
|
1363
|
-
"api",
|
|
1364
|
-
"--method",
|
|
1365
|
-
"POST",
|
|
1366
|
-
`repos/${repoName}/git/refs`,
|
|
1367
|
-
"-f",
|
|
1368
|
-
`ref=refs/heads/${branchName}`,
|
|
1369
|
-
"-f",
|
|
1370
|
-
`sha=${sha}`
|
|
1371
|
-
]);
|
|
1372
|
-
if (createBranchResult.code !== 0) {
|
|
1373
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1374
|
-
reason: "failed_to_create_branch",
|
|
1375
|
-
exit_code: createBranchResult.code,
|
|
1376
|
-
...context
|
|
1377
|
-
});
|
|
1378
|
-
throw new Error(`Failed to create branch: ${createBranchResult.stderr}`);
|
|
1379
|
-
}
|
|
1380
|
-
updateProgress();
|
|
1381
|
-
const workflows = [];
|
|
1382
|
-
if (selectedWorkflows.includes("claude")) {
|
|
1383
|
-
workflows.push({
|
|
1384
|
-
path: ".github/workflows/claude.yml",
|
|
1385
|
-
content: WORKFLOW_CONTENT,
|
|
1386
|
-
message: "Claude PR Assistant workflow"
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
if (selectedWorkflows.includes("claude-review")) {
|
|
1390
|
-
workflows.push({
|
|
1391
|
-
path: ".github/workflows/claude-code-review.yml",
|
|
1392
|
-
content: CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT,
|
|
1393
|
-
message: "Claude Code Review workflow"
|
|
1394
|
-
});
|
|
1395
|
-
}
|
|
1396
|
-
for (const workflow of workflows) {
|
|
1397
|
-
await createWorkflowFile(repoName, branchName, workflow.path, workflow.content, secretName, workflow.message, context);
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
updateProgress();
|
|
1401
|
-
if (apiKeyOrOAuthToken) {
|
|
1402
|
-
const setSecretResult = await execFileNoThrow("gh", [
|
|
1403
|
-
"secret",
|
|
1404
|
-
"set",
|
|
1405
|
-
secretName,
|
|
1406
|
-
"--body",
|
|
1407
|
-
apiKeyOrOAuthToken,
|
|
1408
|
-
"--repo",
|
|
1409
|
-
repoName
|
|
1410
|
-
]);
|
|
1411
|
-
if (setSecretResult.code !== 0) {
|
|
1412
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1413
|
-
reason: "failed_to_set_api_key_secret",
|
|
1414
|
-
exit_code: setSecretResult.code,
|
|
1415
|
-
...context
|
|
1416
|
-
});
|
|
1417
|
-
const helpText = `
|
|
1418
|
-
|
|
1419
|
-
Need help? Common issues:
|
|
1420
|
-
` + `\xB7 Permission denied \u2192 Run: gh auth refresh -h github.com -s repo
|
|
1421
|
-
` + `\xB7 Not authorized \u2192 Ensure you have admin access to the repository
|
|
1422
|
-
` + "\xB7 For manual setup \u2192 Visit: https://github.com/anthropics/claude-code-action";
|
|
1423
|
-
throw new Error(`Failed to set API key secret: ${setSecretResult.stderr || "Unknown error"}${helpText}`);
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
if (!skipWorkflow && branchName) {
|
|
1427
|
-
updateProgress();
|
|
1428
|
-
const compareUrl = `https://github.com/${repoName}/compare/${defaultBranch}...${branchName}?quick_pull=1&title=${encodeURIComponent(PR_TITLE)}&body=${encodeURIComponent(PR_BODY)}`;
|
|
1429
|
-
await openBrowser(compareUrl);
|
|
1430
|
-
}
|
|
1431
|
-
logEvent("tengu_setup_github_actions_completed", {
|
|
1432
|
-
skip_workflow: skipWorkflow,
|
|
1433
|
-
has_api_key: !!apiKeyOrOAuthToken,
|
|
1434
|
-
auth_type: authType,
|
|
1435
|
-
using_default_secret_name: secretName === "ANTHROPIC_API_KEY",
|
|
1436
|
-
selected_claude_workflow: selectedWorkflows.includes("claude"),
|
|
1437
|
-
selected_claude_review_workflow: selectedWorkflows.includes("claude-review"),
|
|
1438
|
-
...context
|
|
1439
|
-
});
|
|
1440
|
-
saveGlobalConfig((current) => ({
|
|
1441
|
-
...current,
|
|
1442
|
-
githubActionSetupCount: (current.githubActionSetupCount ?? 0) + 1
|
|
1443
|
-
}));
|
|
1444
|
-
} catch (error) {
|
|
1445
|
-
if (!error || !(error instanceof Error) || !error.message.includes("Failed to")) {
|
|
1446
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
1447
|
-
reason: "unexpected_error",
|
|
1448
|
-
...context
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
if (error instanceof Error) {
|
|
1452
|
-
logError(error);
|
|
1453
|
-
}
|
|
1454
|
-
throw error;
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
var init_setupGitHubActions = __esm(() => {
|
|
1458
|
-
init_analytics();
|
|
1459
|
-
init_config();
|
|
1460
|
-
init_github_app();
|
|
1461
|
-
init_browser();
|
|
1462
|
-
init_execFileNoThrow();
|
|
1463
|
-
init_log();
|
|
1464
|
-
});
|
|
1465
|
-
|
|
1466
|
-
// src/commands/install-github-app/WarningsStep.tsx
|
|
1467
|
-
function WarningsStep({ warnings, onContinue }) {
|
|
1468
|
-
useKeybinding("confirm:yes", onContinue, { context: "Confirmation" });
|
|
1469
|
-
return /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(jsx_dev_runtime11.Fragment, {
|
|
1470
|
-
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
1471
|
-
flexDirection: "column",
|
|
1472
|
-
borderStyle: "round",
|
|
1473
|
-
paddingX: 1,
|
|
1474
|
-
children: [
|
|
1475
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
1476
|
-
flexDirection: "column",
|
|
1477
|
-
marginBottom: 1,
|
|
1478
|
-
children: [
|
|
1479
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1480
|
-
bold: true,
|
|
1481
|
-
children: [
|
|
1482
|
-
figures_default.warning,
|
|
1483
|
-
" Setup Warnings"
|
|
1484
|
-
]
|
|
1485
|
-
}, undefined, true, undefined, this),
|
|
1486
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1487
|
-
dimColor: true,
|
|
1488
|
-
children: "We found some potential issues, but you can continue anyway"
|
|
1489
|
-
}, undefined, false, undefined, this)
|
|
1490
|
-
]
|
|
1491
|
-
}, undefined, true, undefined, this),
|
|
1492
|
-
warnings.map((warning, index) => /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
1493
|
-
flexDirection: "column",
|
|
1494
|
-
marginBottom: 1,
|
|
1495
|
-
children: [
|
|
1496
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1497
|
-
color: "warning",
|
|
1498
|
-
bold: true,
|
|
1499
|
-
children: warning.title
|
|
1500
|
-
}, undefined, false, undefined, this),
|
|
1501
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1502
|
-
children: warning.message
|
|
1503
|
-
}, undefined, false, undefined, this),
|
|
1504
|
-
warning.instructions.length > 0 && /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
1505
|
-
flexDirection: "column",
|
|
1506
|
-
marginLeft: 2,
|
|
1507
|
-
marginTop: 1,
|
|
1508
|
-
children: warning.instructions.map((instruction, i) => /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1509
|
-
dimColor: true,
|
|
1510
|
-
children: [
|
|
1511
|
-
"\u2022 ",
|
|
1512
|
-
instruction
|
|
1513
|
-
]
|
|
1514
|
-
}, i, true, undefined, this))
|
|
1515
|
-
}, undefined, false, undefined, this)
|
|
1516
|
-
]
|
|
1517
|
-
}, index, true, undefined, this)),
|
|
1518
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
1519
|
-
marginTop: 1,
|
|
1520
|
-
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1521
|
-
bold: true,
|
|
1522
|
-
color: "permission",
|
|
1523
|
-
children: "Press Enter to continue anyway, or Ctrl+C to exit and fix issues"
|
|
1524
|
-
}, undefined, false, undefined, this)
|
|
1525
|
-
}, undefined, false, undefined, this),
|
|
1526
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
1527
|
-
marginTop: 1,
|
|
1528
|
-
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1529
|
-
dimColor: true,
|
|
1530
|
-
children: [
|
|
1531
|
-
"You can also try the manual setup steps if needed:",
|
|
1532
|
-
" ",
|
|
1533
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
1534
|
-
color: "claude",
|
|
1535
|
-
children: GITHUB_ACTION_SETUP_DOCS_URL
|
|
1536
|
-
}, undefined, false, undefined, this)
|
|
1537
|
-
]
|
|
1538
|
-
}, undefined, true, undefined, this)
|
|
1539
|
-
}, undefined, false, undefined, this)
|
|
1540
|
-
]
|
|
1541
|
-
}, undefined, true, undefined, this)
|
|
1542
|
-
}, undefined, false, undefined, this);
|
|
1543
|
-
}
|
|
1544
|
-
var jsx_dev_runtime11;
|
|
1545
|
-
var init_WarningsStep = __esm(() => {
|
|
1546
|
-
init_figures();
|
|
1547
|
-
init_github_app();
|
|
1548
|
-
init_src();
|
|
1549
|
-
init_useKeybinding();
|
|
1550
|
-
jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1551
|
-
});
|
|
1552
|
-
|
|
1553
|
-
// src/commands/install-github-app/install-github-app.tsx
|
|
1554
|
-
function InstallGitHubApp(props) {
|
|
1555
|
-
const [existingApiKey] = import_react5.useState(() => getAnthropicApiKey());
|
|
1556
|
-
const [state, setState] = import_react5.useState({
|
|
1557
|
-
...INITIAL_STATE,
|
|
1558
|
-
useExistingKey: !!existingApiKey,
|
|
1559
|
-
selectedApiKeyOption: existingApiKey ? "existing" : "new"
|
|
1560
|
-
});
|
|
1561
|
-
useExitOnCtrlCDWithKeybindings();
|
|
1562
|
-
import_react5.default.useEffect(() => {
|
|
1563
|
-
logEvent("tengu_install_github_app_started", {});
|
|
1564
|
-
}, []);
|
|
1565
|
-
const checkGitHubCLI = import_react5.useCallback(async () => {
|
|
1566
|
-
const warnings = [];
|
|
1567
|
-
const ghVersionResult = await execa("gh --version", {
|
|
1568
|
-
shell: true,
|
|
1569
|
-
reject: false
|
|
1570
|
-
});
|
|
1571
|
-
if (ghVersionResult.exitCode !== 0) {
|
|
1572
|
-
warnings.push({
|
|
1573
|
-
title: "GitHub CLI not found",
|
|
1574
|
-
message: "GitHub CLI (gh) does not appear to be installed or accessible.",
|
|
1575
|
-
instructions: [
|
|
1576
|
-
"Install GitHub CLI from https://cli.github.com/",
|
|
1577
|
-
"macOS: brew install gh",
|
|
1578
|
-
"Windows: winget install --id GitHub.cli",
|
|
1579
|
-
"Linux: See installation instructions at https://github.com/cli/cli#installation"
|
|
1580
|
-
]
|
|
1581
|
-
});
|
|
1582
|
-
}
|
|
1583
|
-
const authResult = await execa("gh auth status -a", {
|
|
1584
|
-
shell: true,
|
|
1585
|
-
reject: false
|
|
1586
|
-
});
|
|
1587
|
-
if (authResult.exitCode !== 0) {
|
|
1588
|
-
warnings.push({
|
|
1589
|
-
title: "GitHub CLI not authenticated",
|
|
1590
|
-
message: "GitHub CLI does not appear to be authenticated.",
|
|
1591
|
-
instructions: [
|
|
1592
|
-
"Run: gh auth login",
|
|
1593
|
-
"Follow the prompts to authenticate with GitHub",
|
|
1594
|
-
"Or set up authentication using environment variables or other methods"
|
|
1595
|
-
]
|
|
1596
|
-
});
|
|
1597
|
-
} else {
|
|
1598
|
-
const tokenScopesMatch = authResult.stdout.match(/Token scopes:.*$/m);
|
|
1599
|
-
if (tokenScopesMatch) {
|
|
1600
|
-
const scopes = tokenScopesMatch[0];
|
|
1601
|
-
const missingScopes = [];
|
|
1602
|
-
if (!scopes.includes("repo")) {
|
|
1603
|
-
missingScopes.push("repo");
|
|
1604
|
-
}
|
|
1605
|
-
if (!scopes.includes("workflow")) {
|
|
1606
|
-
missingScopes.push("workflow");
|
|
1607
|
-
}
|
|
1608
|
-
if (missingScopes.length > 0) {
|
|
1609
|
-
setState((prev) => ({
|
|
1610
|
-
...prev,
|
|
1611
|
-
step: "error",
|
|
1612
|
-
error: `GitHub CLI is missing required permissions: ${missingScopes.join(", ")}.`,
|
|
1613
|
-
errorReason: "Missing required scopes",
|
|
1614
|
-
errorInstructions: [
|
|
1615
|
-
`Your GitHub CLI authentication is missing the "${missingScopes.join('" and "')}" ${plural(missingScopes.length, "scope")} needed to manage GitHub Actions and secrets.`,
|
|
1616
|
-
"",
|
|
1617
|
-
"To fix this, run:",
|
|
1618
|
-
" gh auth refresh -h github.com -s repo,workflow",
|
|
1619
|
-
"",
|
|
1620
|
-
"This will add the necessary permissions to manage workflows and secrets."
|
|
1621
|
-
]
|
|
1622
|
-
}));
|
|
1623
|
-
return;
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
const currentRepo = await getGithubRepo() ?? "";
|
|
1628
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1629
|
-
step: "check-gh"
|
|
1630
|
-
});
|
|
1631
|
-
setState((prev) => ({
|
|
1632
|
-
...prev,
|
|
1633
|
-
warnings,
|
|
1634
|
-
currentRepo,
|
|
1635
|
-
selectedRepoName: currentRepo,
|
|
1636
|
-
useCurrentRepo: !!currentRepo,
|
|
1637
|
-
step: warnings.length > 0 ? "warnings" : "choose-repo"
|
|
1638
|
-
}));
|
|
1639
|
-
}, []);
|
|
1640
|
-
import_react5.default.useEffect(() => {
|
|
1641
|
-
if (state.step === "check-gh") {
|
|
1642
|
-
checkGitHubCLI();
|
|
1643
|
-
}
|
|
1644
|
-
}, [state.step, checkGitHubCLI]);
|
|
1645
|
-
const runSetupGitHubActions = import_react5.useCallback(async (apiKeyOrOAuthToken, secretName) => {
|
|
1646
|
-
setState((prev) => ({
|
|
1647
|
-
...prev,
|
|
1648
|
-
step: "creating",
|
|
1649
|
-
currentWorkflowInstallStep: 0
|
|
1650
|
-
}));
|
|
1651
|
-
try {
|
|
1652
|
-
await setupGitHubActions(state.selectedRepoName, apiKeyOrOAuthToken, secretName, () => {
|
|
1653
|
-
setState((prev) => ({
|
|
1654
|
-
...prev,
|
|
1655
|
-
currentWorkflowInstallStep: prev.currentWorkflowInstallStep + 1
|
|
1656
|
-
}));
|
|
1657
|
-
}, state.workflowAction === "skip", state.selectedWorkflows, state.authType, {
|
|
1658
|
-
useCurrentRepo: state.useCurrentRepo,
|
|
1659
|
-
workflowExists: state.workflowExists,
|
|
1660
|
-
secretExists: state.secretExists
|
|
1661
|
-
});
|
|
1662
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1663
|
-
step: "creating"
|
|
1664
|
-
});
|
|
1665
|
-
setState((prev) => ({ ...prev, step: "success" }));
|
|
1666
|
-
} catch (error) {
|
|
1667
|
-
const errorMessage = error instanceof Error ? error.message : "Failed to set up GitHub Actions";
|
|
1668
|
-
if (errorMessage.includes("workflow file already exists")) {
|
|
1669
|
-
logEvent("tengu_install_github_app_error", {
|
|
1670
|
-
reason: "workflow_file_exists"
|
|
1671
|
-
});
|
|
1672
|
-
setState((prev) => ({
|
|
1673
|
-
...prev,
|
|
1674
|
-
step: "error",
|
|
1675
|
-
error: "A Claude workflow file already exists in this repository.",
|
|
1676
|
-
errorReason: "Workflow file conflict",
|
|
1677
|
-
errorInstructions: [
|
|
1678
|
-
"The file .github/workflows/claude.yml already exists",
|
|
1679
|
-
"You can either:",
|
|
1680
|
-
" 1. Delete the existing file and run this command again",
|
|
1681
|
-
" 2. Update the existing file manually using the template from:",
|
|
1682
|
-
` ${GITHUB_ACTION_SETUP_DOCS_URL}`
|
|
1683
|
-
]
|
|
1684
|
-
}));
|
|
1685
|
-
} else {
|
|
1686
|
-
logEvent("tengu_install_github_app_error", {
|
|
1687
|
-
reason: "setup_github_actions_failed"
|
|
1688
|
-
});
|
|
1689
|
-
setState((prev) => ({
|
|
1690
|
-
...prev,
|
|
1691
|
-
step: "error",
|
|
1692
|
-
error: errorMessage,
|
|
1693
|
-
errorReason: "GitHub Actions setup failed",
|
|
1694
|
-
errorInstructions: []
|
|
1695
|
-
}));
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
}, [
|
|
1699
|
-
state.selectedRepoName,
|
|
1700
|
-
state.workflowAction,
|
|
1701
|
-
state.selectedWorkflows,
|
|
1702
|
-
state.useCurrentRepo,
|
|
1703
|
-
state.workflowExists,
|
|
1704
|
-
state.secretExists,
|
|
1705
|
-
state.authType
|
|
1706
|
-
]);
|
|
1707
|
-
async function openGitHubAppInstallation() {
|
|
1708
|
-
const installUrl = "https://github.com/apps/claude";
|
|
1709
|
-
await openBrowser(installUrl);
|
|
1710
|
-
}
|
|
1711
|
-
async function checkRepositoryPermissions(repoName) {
|
|
1712
|
-
try {
|
|
1713
|
-
const result = await execFileNoThrow("gh", [
|
|
1714
|
-
"api",
|
|
1715
|
-
`repos/${repoName}`,
|
|
1716
|
-
"--jq",
|
|
1717
|
-
".permissions.admin"
|
|
1718
|
-
]);
|
|
1719
|
-
if (result.code === 0) {
|
|
1720
|
-
const hasAdmin = result.stdout.trim() === "true";
|
|
1721
|
-
return { hasAccess: hasAdmin };
|
|
1722
|
-
}
|
|
1723
|
-
if (result.stderr.includes("404") || result.stderr.includes("Not Found")) {
|
|
1724
|
-
return {
|
|
1725
|
-
hasAccess: false,
|
|
1726
|
-
error: "repository_not_found"
|
|
1727
|
-
};
|
|
1728
|
-
}
|
|
1729
|
-
return { hasAccess: false };
|
|
1730
|
-
} catch {
|
|
1731
|
-
return { hasAccess: false };
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
async function checkExistingWorkflowFile(repoName) {
|
|
1735
|
-
const checkFileResult = await execFileNoThrow("gh", [
|
|
1736
|
-
"api",
|
|
1737
|
-
`repos/${repoName}/contents/.github/workflows/claude.yml`,
|
|
1738
|
-
"--jq",
|
|
1739
|
-
".sha"
|
|
1740
|
-
]);
|
|
1741
|
-
return checkFileResult.code === 0;
|
|
1742
|
-
}
|
|
1743
|
-
async function checkExistingSecret() {
|
|
1744
|
-
const checkSecretsResult = await execFileNoThrow("gh", [
|
|
1745
|
-
"secret",
|
|
1746
|
-
"list",
|
|
1747
|
-
"--app",
|
|
1748
|
-
"actions",
|
|
1749
|
-
"--repo",
|
|
1750
|
-
state.selectedRepoName
|
|
1751
|
-
]);
|
|
1752
|
-
if (checkSecretsResult.code === 0) {
|
|
1753
|
-
const lines = checkSecretsResult.stdout.split(`
|
|
1754
|
-
`);
|
|
1755
|
-
const hasAnthropicKey = lines.some((line) => {
|
|
1756
|
-
return /^ANTHROPIC_API_KEY\s+/.test(line);
|
|
1757
|
-
});
|
|
1758
|
-
if (hasAnthropicKey) {
|
|
1759
|
-
setState((prev) => ({
|
|
1760
|
-
...prev,
|
|
1761
|
-
secretExists: true,
|
|
1762
|
-
step: "check-existing-secret"
|
|
1763
|
-
}));
|
|
1764
|
-
} else {
|
|
1765
|
-
if (existingApiKey) {
|
|
1766
|
-
setState((prev) => ({
|
|
1767
|
-
...prev,
|
|
1768
|
-
apiKeyOrOAuthToken: existingApiKey,
|
|
1769
|
-
useExistingKey: true
|
|
1770
|
-
}));
|
|
1771
|
-
await runSetupGitHubActions(existingApiKey, state.secretName);
|
|
1772
|
-
} else {
|
|
1773
|
-
setState((prev) => ({ ...prev, step: "api-key" }));
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
} else {
|
|
1777
|
-
if (existingApiKey) {
|
|
1778
|
-
setState((prev) => ({
|
|
1779
|
-
...prev,
|
|
1780
|
-
apiKeyOrOAuthToken: existingApiKey,
|
|
1781
|
-
useExistingKey: true
|
|
1782
|
-
}));
|
|
1783
|
-
await runSetupGitHubActions(existingApiKey, state.secretName);
|
|
1784
|
-
} else {
|
|
1785
|
-
setState((prev) => ({ ...prev, step: "api-key" }));
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
|
-
const handleSubmit = async () => {
|
|
1790
|
-
if (state.step === "warnings") {
|
|
1791
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1792
|
-
step: "warnings"
|
|
1793
|
-
});
|
|
1794
|
-
setState((prev) => ({ ...prev, step: "install-app" }));
|
|
1795
|
-
setTimeout(openGitHubAppInstallation, 0);
|
|
1796
|
-
} else if (state.step === "choose-repo") {
|
|
1797
|
-
let repoName = state.useCurrentRepo ? state.currentRepo : state.selectedRepoName;
|
|
1798
|
-
if (!repoName.trim()) {
|
|
1799
|
-
return;
|
|
1800
|
-
}
|
|
1801
|
-
const repoWarnings = [];
|
|
1802
|
-
if (repoName.includes("github.com")) {
|
|
1803
|
-
const match = repoName.match(/github\.com[:/]([^/]+\/[^/]+)(\.git)?$/);
|
|
1804
|
-
if (!match) {
|
|
1805
|
-
repoWarnings.push({
|
|
1806
|
-
title: "Invalid GitHub URL format",
|
|
1807
|
-
message: "The repository URL format appears to be invalid.",
|
|
1808
|
-
instructions: [
|
|
1809
|
-
"Use format: owner/repo or https://github.com/owner/repo",
|
|
1810
|
-
"Example: anthropics/claude-cli"
|
|
1811
|
-
]
|
|
1812
|
-
});
|
|
1813
|
-
} else {
|
|
1814
|
-
repoName = match[1]?.replace(/\.git$/, "") || "";
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
if (!repoName.includes("/")) {
|
|
1818
|
-
repoWarnings.push({
|
|
1819
|
-
title: "Repository format warning",
|
|
1820
|
-
message: 'Repository should be in format "owner/repo"',
|
|
1821
|
-
instructions: [
|
|
1822
|
-
"Use format: owner/repo",
|
|
1823
|
-
"Example: anthropics/claude-cli"
|
|
1824
|
-
]
|
|
1825
|
-
});
|
|
1826
|
-
}
|
|
1827
|
-
const permissionCheck = await checkRepositoryPermissions(repoName);
|
|
1828
|
-
if (permissionCheck.error === "repository_not_found") {
|
|
1829
|
-
repoWarnings.push({
|
|
1830
|
-
title: "Repository not found",
|
|
1831
|
-
message: `Repository ${repoName} was not found or you don't have access.`,
|
|
1832
|
-
instructions: [
|
|
1833
|
-
`Check that the repository name is correct: ${repoName}`,
|
|
1834
|
-
"Ensure you have access to this repository",
|
|
1835
|
-
'For private repositories, make sure your GitHub token has the "repo" scope',
|
|
1836
|
-
"You can add the repo scope with: gh auth refresh -h github.com -s repo,workflow"
|
|
1837
|
-
]
|
|
1838
|
-
});
|
|
1839
|
-
} else if (!permissionCheck.hasAccess) {
|
|
1840
|
-
repoWarnings.push({
|
|
1841
|
-
title: "Admin permissions required",
|
|
1842
|
-
message: `You might need admin permissions on ${repoName} to set up GitHub Actions.`,
|
|
1843
|
-
instructions: [
|
|
1844
|
-
"Repository admins can install GitHub Apps and set secrets",
|
|
1845
|
-
"Ask a repository admin to run this command if setup fails",
|
|
1846
|
-
"Alternatively, you can use the manual setup instructions"
|
|
1847
|
-
]
|
|
1848
|
-
});
|
|
1849
|
-
}
|
|
1850
|
-
const workflowExists = await checkExistingWorkflowFile(repoName);
|
|
1851
|
-
if (repoWarnings.length > 0) {
|
|
1852
|
-
const allWarnings = [...state.warnings, ...repoWarnings];
|
|
1853
|
-
setState((prev) => ({
|
|
1854
|
-
...prev,
|
|
1855
|
-
selectedRepoName: repoName,
|
|
1856
|
-
workflowExists,
|
|
1857
|
-
warnings: allWarnings,
|
|
1858
|
-
step: "warnings"
|
|
1859
|
-
}));
|
|
1860
|
-
} else {
|
|
1861
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1862
|
-
step: "choose-repo"
|
|
1863
|
-
});
|
|
1864
|
-
setState((prev) => ({
|
|
1865
|
-
...prev,
|
|
1866
|
-
selectedRepoName: repoName,
|
|
1867
|
-
workflowExists,
|
|
1868
|
-
step: "install-app"
|
|
1869
|
-
}));
|
|
1870
|
-
setTimeout(openGitHubAppInstallation, 0);
|
|
1871
|
-
}
|
|
1872
|
-
} else if (state.step === "install-app") {
|
|
1873
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1874
|
-
step: "install-app"
|
|
1875
|
-
});
|
|
1876
|
-
if (state.workflowExists) {
|
|
1877
|
-
setState((prev) => ({ ...prev, step: "check-existing-workflow" }));
|
|
1878
|
-
} else {
|
|
1879
|
-
setState((prev) => ({ ...prev, step: "select-workflows" }));
|
|
1880
|
-
}
|
|
1881
|
-
} else if (state.step === "check-existing-workflow") {
|
|
1882
|
-
return;
|
|
1883
|
-
} else if (state.step === "select-workflows") {
|
|
1884
|
-
return;
|
|
1885
|
-
} else if (state.step === "check-existing-secret") {
|
|
1886
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1887
|
-
step: "check-existing-secret"
|
|
1888
|
-
});
|
|
1889
|
-
if (state.useExistingSecret) {
|
|
1890
|
-
await runSetupGitHubActions(null, state.secretName);
|
|
1891
|
-
} else {
|
|
1892
|
-
await runSetupGitHubActions(state.apiKeyOrOAuthToken, state.secretName);
|
|
1893
|
-
}
|
|
1894
|
-
} else if (state.step === "api-key") {
|
|
1895
|
-
if (state.selectedApiKeyOption === "oauth") {
|
|
1896
|
-
return;
|
|
1897
|
-
}
|
|
1898
|
-
const apiKeyToUse = state.selectedApiKeyOption === "existing" ? existingApiKey : state.apiKeyOrOAuthToken;
|
|
1899
|
-
if (!apiKeyToUse) {
|
|
1900
|
-
logEvent("tengu_install_github_app_error", {
|
|
1901
|
-
reason: "api_key_missing"
|
|
1902
|
-
});
|
|
1903
|
-
setState((prev) => ({
|
|
1904
|
-
...prev,
|
|
1905
|
-
step: "error",
|
|
1906
|
-
error: "API key is required"
|
|
1907
|
-
}));
|
|
1908
|
-
return;
|
|
1909
|
-
}
|
|
1910
|
-
setState((prev) => ({
|
|
1911
|
-
...prev,
|
|
1912
|
-
apiKeyOrOAuthToken: apiKeyToUse,
|
|
1913
|
-
useExistingKey: state.selectedApiKeyOption === "existing"
|
|
1914
|
-
}));
|
|
1915
|
-
const checkSecretsResult = await execFileNoThrow("gh", [
|
|
1916
|
-
"secret",
|
|
1917
|
-
"list",
|
|
1918
|
-
"--app",
|
|
1919
|
-
"actions",
|
|
1920
|
-
"--repo",
|
|
1921
|
-
state.selectedRepoName
|
|
1922
|
-
]);
|
|
1923
|
-
if (checkSecretsResult.code === 0) {
|
|
1924
|
-
const lines = checkSecretsResult.stdout.split(`
|
|
1925
|
-
`);
|
|
1926
|
-
const hasAnthropicKey = lines.some((line) => {
|
|
1927
|
-
return /^ANTHROPIC_API_KEY\s+/.test(line);
|
|
1928
|
-
});
|
|
1929
|
-
if (hasAnthropicKey) {
|
|
1930
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1931
|
-
step: "api-key"
|
|
1932
|
-
});
|
|
1933
|
-
setState((prev) => ({
|
|
1934
|
-
...prev,
|
|
1935
|
-
secretExists: true,
|
|
1936
|
-
step: "check-existing-secret"
|
|
1937
|
-
}));
|
|
1938
|
-
} else {
|
|
1939
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1940
|
-
step: "api-key"
|
|
1941
|
-
});
|
|
1942
|
-
await runSetupGitHubActions(apiKeyToUse, state.secretName);
|
|
1943
|
-
}
|
|
1944
|
-
} else {
|
|
1945
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1946
|
-
step: "api-key"
|
|
1947
|
-
});
|
|
1948
|
-
await runSetupGitHubActions(apiKeyToUse, state.secretName);
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
};
|
|
1952
|
-
const handleRepoUrlChange = (value) => {
|
|
1953
|
-
setState((prev) => ({ ...prev, selectedRepoName: value }));
|
|
1954
|
-
};
|
|
1955
|
-
const handleApiKeyChange = (value) => {
|
|
1956
|
-
setState((prev) => ({ ...prev, apiKeyOrOAuthToken: value }));
|
|
1957
|
-
};
|
|
1958
|
-
const handleApiKeyOptionChange = (option) => {
|
|
1959
|
-
setState((prev) => ({ ...prev, selectedApiKeyOption: option }));
|
|
1960
|
-
};
|
|
1961
|
-
const handleCreateOAuthToken = import_react5.useCallback(() => {
|
|
1962
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1963
|
-
step: "api-key"
|
|
1964
|
-
});
|
|
1965
|
-
setState((prev) => ({ ...prev, step: "oauth-flow" }));
|
|
1966
|
-
}, []);
|
|
1967
|
-
const handleOAuthSuccess = import_react5.useCallback((token) => {
|
|
1968
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
1969
|
-
step: "oauth-flow"
|
|
1970
|
-
});
|
|
1971
|
-
setState((prev) => ({
|
|
1972
|
-
...prev,
|
|
1973
|
-
apiKeyOrOAuthToken: token,
|
|
1974
|
-
useExistingKey: false,
|
|
1975
|
-
secretName: "CLAUDE_CODE_OAUTH_TOKEN",
|
|
1976
|
-
authType: "oauth_token"
|
|
1977
|
-
}));
|
|
1978
|
-
runSetupGitHubActions(token, "CLAUDE_CODE_OAUTH_TOKEN");
|
|
1979
|
-
}, [runSetupGitHubActions]);
|
|
1980
|
-
const handleOAuthCancel = import_react5.useCallback(() => {
|
|
1981
|
-
setState((prev) => ({ ...prev, step: "api-key" }));
|
|
1982
|
-
}, []);
|
|
1983
|
-
const handleSecretNameChange = (value) => {
|
|
1984
|
-
if (value && !/^[a-zA-Z0-9_]+$/.test(value))
|
|
1985
|
-
return;
|
|
1986
|
-
setState((prev) => ({ ...prev, secretName: value }));
|
|
1987
|
-
};
|
|
1988
|
-
const handleToggleUseCurrentRepo = (useCurrentRepo) => {
|
|
1989
|
-
setState((prev) => ({
|
|
1990
|
-
...prev,
|
|
1991
|
-
useCurrentRepo,
|
|
1992
|
-
selectedRepoName: useCurrentRepo ? prev.currentRepo : ""
|
|
1993
|
-
}));
|
|
1994
|
-
};
|
|
1995
|
-
const handleToggleUseExistingKey = (useExistingKey) => {
|
|
1996
|
-
setState((prev) => ({ ...prev, useExistingKey }));
|
|
1997
|
-
};
|
|
1998
|
-
const handleToggleUseExistingSecret = (useExistingSecret) => {
|
|
1999
|
-
setState((prev) => ({
|
|
2000
|
-
...prev,
|
|
2001
|
-
useExistingSecret,
|
|
2002
|
-
secretName: useExistingSecret ? "ANTHROPIC_API_KEY" : ""
|
|
2003
|
-
}));
|
|
2004
|
-
};
|
|
2005
|
-
const handleWorkflowAction = async (action) => {
|
|
2006
|
-
if (action === "exit") {
|
|
2007
|
-
props.onDone("Installation cancelled by user");
|
|
2008
|
-
return;
|
|
2009
|
-
}
|
|
2010
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
2011
|
-
step: "check-existing-workflow"
|
|
2012
|
-
});
|
|
2013
|
-
setState((prev) => ({ ...prev, workflowAction: action }));
|
|
2014
|
-
if (action === "skip" || action === "update") {
|
|
2015
|
-
if (existingApiKey) {
|
|
2016
|
-
await checkExistingSecret();
|
|
2017
|
-
} else {
|
|
2018
|
-
setState((prev) => ({ ...prev, step: "api-key" }));
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
};
|
|
2022
|
-
function handleDismissKeyDown(e) {
|
|
2023
|
-
e.preventDefault();
|
|
2024
|
-
if (state.step === "success") {
|
|
2025
|
-
logEvent("tengu_install_github_app_completed", {});
|
|
2026
|
-
}
|
|
2027
|
-
props.onDone(state.step === "success" ? "GitHub Actions setup complete!" : state.error ? `Couldn't install GitHub App: ${state.error}
|
|
2028
|
-
For manual setup instructions, see: ${GITHUB_ACTION_SETUP_DOCS_URL}` : `GitHub App installation failed
|
|
2029
|
-
For manual setup instructions, see: ${GITHUB_ACTION_SETUP_DOCS_URL}`);
|
|
2030
|
-
}
|
|
2031
|
-
switch (state.step) {
|
|
2032
|
-
case "check-gh":
|
|
2033
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(CheckGitHubStep, {}, undefined, false, undefined, this);
|
|
2034
|
-
case "warnings":
|
|
2035
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(WarningsStep, {
|
|
2036
|
-
warnings: state.warnings,
|
|
2037
|
-
onContinue: handleSubmit
|
|
2038
|
-
}, undefined, false, undefined, this);
|
|
2039
|
-
case "choose-repo":
|
|
2040
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ChooseRepoStep, {
|
|
2041
|
-
currentRepo: state.currentRepo,
|
|
2042
|
-
useCurrentRepo: state.useCurrentRepo,
|
|
2043
|
-
repoUrl: state.selectedRepoName,
|
|
2044
|
-
onRepoUrlChange: handleRepoUrlChange,
|
|
2045
|
-
onToggleUseCurrentRepo: handleToggleUseCurrentRepo,
|
|
2046
|
-
onSubmit: handleSubmit
|
|
2047
|
-
}, undefined, false, undefined, this);
|
|
2048
|
-
case "install-app":
|
|
2049
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(InstallAppStep, {
|
|
2050
|
-
repoUrl: state.selectedRepoName,
|
|
2051
|
-
onSubmit: handleSubmit
|
|
2052
|
-
}, undefined, false, undefined, this);
|
|
2053
|
-
case "check-existing-workflow":
|
|
2054
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ExistingWorkflowStep, {
|
|
2055
|
-
repoName: state.selectedRepoName,
|
|
2056
|
-
onSelectAction: handleWorkflowAction
|
|
2057
|
-
}, undefined, false, undefined, this);
|
|
2058
|
-
case "check-existing-secret":
|
|
2059
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(CheckExistingSecretStep, {
|
|
2060
|
-
useExistingSecret: state.useExistingSecret,
|
|
2061
|
-
secretName: state.secretName,
|
|
2062
|
-
onToggleUseExistingSecret: handleToggleUseExistingSecret,
|
|
2063
|
-
onSecretNameChange: handleSecretNameChange,
|
|
2064
|
-
onSubmit: handleSubmit
|
|
2065
|
-
}, undefined, false, undefined, this);
|
|
2066
|
-
case "api-key":
|
|
2067
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ApiKeyStep, {
|
|
2068
|
-
existingApiKey,
|
|
2069
|
-
useExistingKey: state.useExistingKey,
|
|
2070
|
-
apiKeyOrOAuthToken: state.apiKeyOrOAuthToken,
|
|
2071
|
-
onApiKeyChange: handleApiKeyChange,
|
|
2072
|
-
onToggleUseExistingKey: handleToggleUseExistingKey,
|
|
2073
|
-
onSubmit: handleSubmit,
|
|
2074
|
-
onCreateOAuthToken: undefined,
|
|
2075
|
-
selectedOption: state.selectedApiKeyOption,
|
|
2076
|
-
onSelectOption: handleApiKeyOptionChange
|
|
2077
|
-
}, undefined, false, undefined, this);
|
|
2078
|
-
case "creating":
|
|
2079
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(CreatingStep, {
|
|
2080
|
-
currentWorkflowInstallStep: state.currentWorkflowInstallStep,
|
|
2081
|
-
secretExists: state.secretExists,
|
|
2082
|
-
useExistingSecret: state.useExistingSecret,
|
|
2083
|
-
secretName: state.secretName,
|
|
2084
|
-
skipWorkflow: state.workflowAction === "skip",
|
|
2085
|
-
selectedWorkflows: state.selectedWorkflows
|
|
2086
|
-
}, undefined, false, undefined, this);
|
|
2087
|
-
case "success":
|
|
2088
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2089
|
-
tabIndex: 0,
|
|
2090
|
-
autoFocus: true,
|
|
2091
|
-
onKeyDown: handleDismissKeyDown,
|
|
2092
|
-
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(SuccessStep, {
|
|
2093
|
-
secretExists: state.secretExists,
|
|
2094
|
-
useExistingSecret: state.useExistingSecret,
|
|
2095
|
-
secretName: state.secretName,
|
|
2096
|
-
skipWorkflow: state.workflowAction === "skip"
|
|
2097
|
-
}, undefined, false, undefined, this)
|
|
2098
|
-
}, undefined, false, undefined, this);
|
|
2099
|
-
case "error":
|
|
2100
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2101
|
-
tabIndex: 0,
|
|
2102
|
-
autoFocus: true,
|
|
2103
|
-
onKeyDown: handleDismissKeyDown,
|
|
2104
|
-
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ErrorStep, {
|
|
2105
|
-
error: state.error,
|
|
2106
|
-
errorReason: state.errorReason,
|
|
2107
|
-
errorInstructions: state.errorInstructions
|
|
2108
|
-
}, undefined, false, undefined, this)
|
|
2109
|
-
}, undefined, false, undefined, this);
|
|
2110
|
-
case "select-workflows":
|
|
2111
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(WorkflowMultiselectDialog, {
|
|
2112
|
-
defaultSelections: state.selectedWorkflows,
|
|
2113
|
-
onSubmit: (selectedWorkflows) => {
|
|
2114
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
2115
|
-
step: "select-workflows"
|
|
2116
|
-
});
|
|
2117
|
-
setState((prev) => ({
|
|
2118
|
-
...prev,
|
|
2119
|
-
selectedWorkflows
|
|
2120
|
-
}));
|
|
2121
|
-
if (existingApiKey) {
|
|
2122
|
-
checkExistingSecret();
|
|
2123
|
-
} else {
|
|
2124
|
-
setState((prev) => ({ ...prev, step: "api-key" }));
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
}, undefined, false, undefined, this);
|
|
2128
|
-
case "oauth-flow":
|
|
2129
|
-
setState((prev) => ({ ...prev, step: "api-key" }));
|
|
2130
|
-
return null;
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
async function call(onDone) {
|
|
2134
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(InstallGitHubApp, {
|
|
2135
|
-
onDone
|
|
2136
|
-
}, undefined, false, undefined, this);
|
|
2137
|
-
}
|
|
2138
|
-
var import_react5, jsx_dev_runtime12, INITIAL_STATE;
|
|
2139
|
-
var init_install_github_app = __esm(() => {
|
|
2140
|
-
init_execa();
|
|
2141
|
-
init_analytics();
|
|
2142
|
-
init_WorkflowMultiselectDialog();
|
|
2143
|
-
init_github_app();
|
|
2144
|
-
init_useExitOnCtrlCDWithKeybindings();
|
|
2145
|
-
init_src();
|
|
2146
|
-
init_auth();
|
|
2147
|
-
init_browser();
|
|
2148
|
-
init_execFileNoThrow();
|
|
2149
|
-
init_git();
|
|
2150
|
-
init_stringUtils();
|
|
2151
|
-
init_ApiKeyStep();
|
|
2152
|
-
init_CheckExistingSecretStep();
|
|
2153
|
-
init_CheckGitHubStep();
|
|
2154
|
-
init_ChooseRepoStep();
|
|
2155
|
-
init_CreatingStep();
|
|
2156
|
-
init_ErrorStep();
|
|
2157
|
-
init_ExistingWorkflowStep();
|
|
2158
|
-
init_InstallAppStep();
|
|
2159
|
-
init_SuccessStep();
|
|
2160
|
-
init_setupGitHubActions();
|
|
2161
|
-
init_WarningsStep();
|
|
2162
|
-
import_react5 = __toESM(require_react(), 1);
|
|
2163
|
-
jsx_dev_runtime12 = __toESM(require_jsx_dev_runtime(), 1);
|
|
2164
|
-
INITIAL_STATE = {
|
|
2165
|
-
step: "check-gh",
|
|
2166
|
-
selectedRepoName: "",
|
|
2167
|
-
currentRepo: "",
|
|
2168
|
-
useCurrentRepo: false,
|
|
2169
|
-
apiKeyOrOAuthToken: "",
|
|
2170
|
-
useExistingKey: true,
|
|
2171
|
-
currentWorkflowInstallStep: 0,
|
|
2172
|
-
warnings: [],
|
|
2173
|
-
secretExists: false,
|
|
2174
|
-
secretName: "ANTHROPIC_API_KEY",
|
|
2175
|
-
useExistingSecret: true,
|
|
2176
|
-
workflowExists: false,
|
|
2177
|
-
selectedWorkflows: ["claude", "claude-review"],
|
|
2178
|
-
selectedApiKeyOption: "new",
|
|
2179
|
-
authType: "api_key"
|
|
2180
|
-
};
|
|
2181
|
-
});
|
|
2182
|
-
init_install_github_app();
|
|
2183
|
-
|
|
2184
|
-
export {
|
|
2185
|
-
call
|
|
2186
|
-
};
|