@joshuafolkken/kit 1.3000.0 → 1.3044.0
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/.claude/skills/workflow-commands/backlogrun-steps.md +1 -1
- package/.claude/skills/workflow-commands/kickoff.md +6 -0
- package/.claude/skills/workflow-commands/progress-watcher.md +10 -8
- package/dist/.inputs-verified.json +1 -1
- package/dist/commands/adopt.js +12 -12
- package/dist/commands/auto-ok-judge-cli.js +18 -14
- package/dist/commands/auto-ok-main.js +42 -40
- package/dist/commands/backlog-budget-main.js +3 -3
- package/dist/commands/backlog-drive-cli.js +276 -188
- package/dist/commands/backlog-next-main.js +77 -75
- package/dist/commands/backlog-offer-main.js +80 -78
- package/dist/commands/backlog-plan-cli.js +96 -97
- package/dist/commands/backlog-triage-cli.js +94 -92
- package/dist/commands/backlogrun-cli.js +212 -206
- package/dist/commands/behavior-cli.js +12 -13
- package/dist/commands/bump-version-main.js +2 -2
- package/dist/commands/bytes-command.js +61 -22
- package/dist/commands/check-related.js +61 -60
- package/dist/commands/{chunk-X7PN54LZ.js → chunk-22DVQCP6.js} +16 -6
- package/dist/commands/{chunk-UTBVTCQN.js → chunk-24OATKOF.js} +301 -168
- package/dist/commands/{chunk-7GHOFHUS.js → chunk-24ZDAWML.js} +3 -3
- package/dist/commands/{chunk-HBNB3TLG.js → chunk-2BB5ZR2F.js} +13 -7
- package/dist/commands/{chunk-F22G3VDB.js → chunk-2BC33QPY.js} +1 -1
- package/dist/commands/{chunk-72EW7AVI.js → chunk-2BJJUTZA.js} +2 -2
- package/dist/commands/{chunk-XDQOWUVT.js → chunk-2CXT6MBR.js} +4 -4
- package/dist/commands/{chunk-TVJE67O2.js → chunk-2EZTYLO4.js} +6 -6
- package/dist/commands/{chunk-JLYW7CP6.js → chunk-2PHOLX62.js} +1 -1
- package/dist/commands/{chunk-6EU5ZCDP.js → chunk-2QM72JCJ.js} +23 -87
- package/dist/commands/{chunk-EFHSCUFN.js → chunk-2VFPUPSG.js} +2 -2
- package/dist/commands/{chunk-ATRMETHT.js → chunk-2XAH3MHV.js} +1 -1
- package/dist/commands/{chunk-T2E724HN.js → chunk-34JJYCIY.js} +2 -2
- package/dist/commands/{chunk-REMKUFAC.js → chunk-34KZDKQJ.js} +1 -1
- package/dist/commands/{chunk-GK2KY4MO.js → chunk-352KLSFX.js} +3 -3
- package/dist/commands/{chunk-7S6VRZOH.js → chunk-3AEDZZNL.js} +5 -5
- package/dist/commands/{chunk-KVJDDECB.js → chunk-3B2HEFNO.js} +2 -2
- package/dist/commands/{chunk-HZBTXKT2.js → chunk-3Z425MM3.js} +2 -2
- package/dist/commands/{chunk-J3G2R64I.js → chunk-3ZOX4G4U.js} +3 -3
- package/dist/commands/{chunk-LRS2OS5J.js → chunk-452HWOJ7.js} +2 -2
- package/dist/commands/{chunk-HRT4KWP4.js → chunk-475EFIJV.js} +1 -1
- package/dist/commands/{chunk-4HBVHYNL.js → chunk-47UZB54M.js} +3 -3
- package/dist/commands/{chunk-H4LYG37R.js → chunk-4DN4XVPL.js} +6 -6
- package/dist/commands/{chunk-TMLNI3YW.js → chunk-4HERA2GY.js} +1 -1
- package/dist/commands/{chunk-W6V4DWC5.js → chunk-4JI35CVO.js} +1 -1
- package/dist/commands/{chunk-YT342DRV.js → chunk-4L4LNWZ7.js} +2 -2
- package/dist/commands/{chunk-ZZAH3YQP.js → chunk-4N32QKJZ.js} +6 -6
- package/dist/commands/{chunk-GDUK5YPO.js → chunk-4NRSFLG7.js} +12 -12
- package/dist/commands/{chunk-O5QZ2S6X.js → chunk-4OKRPAUT.js} +4 -4
- package/dist/commands/{chunk-QDFDB4CF.js → chunk-4Q64PG46.js} +13 -13
- package/dist/commands/{chunk-HO52D6JY.js → chunk-4UDTQVDD.js} +14 -14
- package/dist/commands/{chunk-HPVLI26Z.js → chunk-4WR2LEZL.js} +6 -6
- package/dist/commands/{chunk-DP7WIGQ4.js → chunk-4ZJOC6OK.js} +4 -4
- package/dist/commands/{chunk-WTRDWEUQ.js → chunk-4ZQM4I7R.js} +12 -12
- package/dist/commands/{chunk-OTZJXU2R.js → chunk-54X37JEJ.js} +8 -8
- package/dist/commands/{chunk-A5V7EWIX.js → chunk-56KW5EOK.js} +2 -2
- package/dist/commands/chunk-5CG3XU3O.js +74 -0
- package/dist/commands/{chunk-FC33R5UN.js → chunk-5ESZLHDZ.js} +13 -15
- package/dist/commands/{chunk-OVA7STGP.js → chunk-5FBRMARM.js} +9 -9
- package/dist/commands/{chunk-SK2LJBFS.js → chunk-5PCK53WP.js} +3 -3
- package/dist/commands/{chunk-6NV2F7QH.js → chunk-5RG4S66L.js} +1 -1
- package/dist/commands/{chunk-JOARHU3M.js → chunk-5UJGACVN.js} +1 -1
- package/dist/commands/{chunk-NKOET4FB.js → chunk-5Y7B7FDL.js} +2 -2
- package/dist/commands/{chunk-XMBRXCIE.js → chunk-5Z6E5ZUV.js} +4 -4
- package/dist/commands/{chunk-RZ4OKKPM.js → chunk-5ZNUH4LV.js} +2 -2
- package/dist/commands/{chunk-7CHCZBNF.js → chunk-6CFHLMKM.js} +4 -4
- package/dist/commands/{chunk-TXXYC7EV.js → chunk-6DDK5XWK.js} +1 -1
- package/dist/commands/{chunk-2TQXCH2K.js → chunk-6GQX752S.js} +3 -3
- package/dist/commands/{chunk-RY6ZDHKB.js → chunk-6MAZ55GF.js} +107 -84
- package/dist/commands/{chunk-SNFLV7VV.js → chunk-6RUWU2SB.js} +2 -2
- package/dist/commands/{chunk-D4SZK7H2.js → chunk-6TIVDEKG.js} +2 -2
- package/dist/commands/{chunk-RIQ75QWR.js → chunk-6UCWAFQY.js} +55 -43
- package/dist/commands/{chunk-4D5KWMFL.js → chunk-6YURRFRU.js} +19 -19
- package/dist/commands/{chunk-7MOZEEFJ.js → chunk-6YVURZAJ.js} +1 -1
- package/dist/commands/{chunk-73JOEKIC.js → chunk-6Z4YZG7P.js} +5 -5
- package/dist/commands/{chunk-NJ53AWJU.js → chunk-77BIN247.js} +9 -9
- package/dist/commands/{chunk-MZHOPRI6.js → chunk-7ABHNNY3.js} +7 -7
- package/dist/commands/{chunk-6WTVAL4D.js → chunk-7C7FOKJK.js} +1 -1
- package/dist/commands/{chunk-KVSSLDA3.js → chunk-7HAGC6SW.js} +5 -5
- package/dist/commands/{chunk-IG22Y5MA.js → chunk-7KKUFLH5.js} +1 -1
- package/dist/commands/{chunk-ZQ3CKRMP.js → chunk-7MJYLUF4.js} +2 -2
- package/dist/commands/{chunk-6UGFS3EU.js → chunk-7NHZCI5Y.js} +11 -11
- package/dist/commands/{chunk-FB3D7CX5.js → chunk-7OQ56DVW.js} +5 -7
- package/dist/commands/{chunk-EK327QOS.js → chunk-7VWPGTZO.js} +10 -10
- package/dist/commands/{chunk-WSOF74K4.js → chunk-7YZXS3AK.js} +3 -3
- package/dist/commands/{chunk-N6TYL3B2.js → chunk-AAUDI7WJ.js} +2 -2
- package/dist/commands/{chunk-3GF52L5F.js → chunk-AC26ZUG5.js} +12 -24
- package/dist/commands/{chunk-EK2Y6B4X.js → chunk-ACZ52JPI.js} +7 -7
- package/dist/commands/{chunk-VD72V5VX.js → chunk-AJ65WNJB.js} +4 -4
- package/dist/commands/{chunk-MYWRGF5A.js → chunk-AK7SEO4Y.js} +2 -2
- package/dist/commands/{chunk-IBEKFLWG.js → chunk-ALDAS2WG.js} +9 -9
- package/dist/commands/{chunk-W32DIQEP.js → chunk-ARFBIJFS.js} +1 -1
- package/dist/commands/{chunk-F3WBEEYC.js → chunk-AVVMDVGO.js} +5 -5
- package/dist/commands/chunk-AXXEMVRJ.js +23 -0
- package/dist/commands/{chunk-GIGKMIPQ.js → chunk-B3M5WSGN.js} +1 -1
- package/dist/commands/{chunk-4Z5723GA.js → chunk-B7ZNIEDV.js} +5 -4
- package/dist/commands/{chunk-B3XFOHDX.js → chunk-BCUDQWYK.js} +10 -4
- package/dist/commands/{chunk-PR3JCPP7.js → chunk-BMKWSWWE.js} +1 -1
- package/dist/commands/{chunk-RZJAUVMI.js → chunk-BMM4RHCG.js} +2 -2
- package/dist/commands/{chunk-LAKVPOJQ.js → chunk-BMTYUJNT.js} +2 -2
- package/dist/commands/{chunk-DAJCUSPG.js → chunk-BRHPRDDV.js} +3 -3
- package/dist/commands/{chunk-UZAU6UI6.js → chunk-BRUBX64M.js} +2 -2
- package/dist/commands/{chunk-BFLFPKQQ.js → chunk-BTZJDHQT.js} +4 -4
- package/dist/commands/{chunk-AI5K4QJO.js → chunk-BYFC6MD2.js} +1 -1
- package/dist/commands/{chunk-JGTLNFFE.js → chunk-BYGJ3BCJ.js} +10 -10
- package/dist/commands/{chunk-5HWZFL4D.js → chunk-C54QXJD6.js} +51 -18
- package/dist/commands/{chunk-LMS6N6GE.js → chunk-CBAKBWSZ.js} +7 -7
- package/dist/commands/{chunk-7EAMUVIO.js → chunk-CFHRNTE5.js} +1 -1
- package/dist/commands/{chunk-UIWAMLQH.js → chunk-CGYDIYHD.js} +2 -2
- package/dist/commands/{chunk-4QYW2IL7.js → chunk-CHKYPF5O.js} +1 -1
- package/dist/commands/{chunk-5HCPSV45.js → chunk-CJBW6BWG.js} +8 -8
- package/dist/commands/chunk-CKUKK7JG.js +252 -0
- package/dist/commands/{chunk-4PES3BAA.js → chunk-CMHGDCGN.js} +3 -3
- package/dist/commands/{chunk-F6OWP2AY.js → chunk-CNGTHSUS.js} +22 -22
- package/dist/commands/{chunk-B2EA2HCY.js → chunk-COGKULQH.js} +4 -4
- package/dist/commands/{chunk-S7XWXG4M.js → chunk-CP2J4RV2.js} +175 -81
- package/dist/commands/{chunk-YGDNUTTI.js → chunk-CQUZ6TNQ.js} +2 -2
- package/dist/commands/chunk-CQZI7RIK.js +72 -0
- package/dist/commands/chunk-CVJHQOI3.js +153 -0
- package/dist/commands/{chunk-2MJ4OCDL.js → chunk-CWCKCZS6.js} +1 -1
- package/dist/commands/chunk-D5OHVIPM.js +17 -0
- package/dist/commands/{chunk-TPKFVVJQ.js → chunk-D6D6WQR6.js} +2 -2
- package/dist/commands/{chunk-5PAEXYIY.js → chunk-D7JRJI44.js} +69 -6
- package/dist/commands/{chunk-LOSOLCCW.js → chunk-D7OAU32Z.js} +1 -1
- package/dist/commands/{chunk-VZHC2I3T.js → chunk-DAAX7XDS.js} +8 -8
- package/dist/commands/{chunk-OHVAEJSM.js → chunk-DEZF7QZZ.js} +5 -5
- package/dist/commands/{chunk-CA6F5OXK.js → chunk-DYZOOWVW.js} +124 -21
- package/dist/commands/{chunk-TKGBF75Y.js → chunk-EDKOSZ3K.js} +5 -5
- package/dist/commands/{chunk-YPNTORQD.js → chunk-EFDVE5P5.js} +1 -1
- package/dist/commands/{chunk-EH3LVYOX.js → chunk-EGIHAEMT.js} +1 -1
- package/dist/commands/{chunk-7P4X4TQL.js → chunk-EKLU6QR7.js} +4 -4
- package/dist/commands/{chunk-ILQZFUDC.js → chunk-ELY76WAR.js} +2 -2
- package/dist/commands/{chunk-2VLHFILE.js → chunk-EM3HAZF6.js} +2 -2
- package/dist/commands/{chunk-F2HFWLQR.js → chunk-EMTZAGT5.js} +20 -1
- package/dist/commands/{chunk-GA4VIFHD.js → chunk-ERG4QRNG.js} +2 -2
- package/dist/commands/{chunk-ICEMFE2V.js → chunk-EUGNQCYK.js} +1 -1
- package/dist/commands/{chunk-3HU3LPIF.js → chunk-EXDFKKMH.js} +2 -2
- package/dist/commands/{chunk-ISPBJVXM.js → chunk-EXWB34R2.js} +7 -7
- package/dist/commands/{chunk-FNOSSXLG.js → chunk-EYMPBHDN.js} +2 -2
- package/dist/commands/{chunk-7V5UVKFG.js → chunk-EZ7IPKIH.js} +2 -2
- package/dist/commands/{chunk-KQWSENCT.js → chunk-F6IQHZYY.js} +3 -3
- package/dist/commands/{chunk-7ZECP3J6.js → chunk-FDS65XOJ.js} +5 -5
- package/dist/commands/{chunk-KXRFGPZD.js → chunk-FGG7V473.js} +21 -5
- package/dist/commands/{chunk-PZ6VWHOO.js → chunk-FHFWNNUC.js} +1 -1
- package/dist/commands/{chunk-XBRD2BDL.js → chunk-FJX7AENO.js} +2 -2
- package/dist/commands/{chunk-M42SLJCD.js → chunk-FKZ5E4JD.js} +4 -4
- package/dist/commands/{chunk-F2J6DGDM.js → chunk-FMZWRDKH.js} +8 -8
- package/dist/commands/{chunk-DSBK66US.js → chunk-FOKCRIAN.js} +10 -10
- package/dist/commands/{chunk-OI7KM4K3.js → chunk-FQGWO2ZH.js} +2 -2
- package/dist/commands/{chunk-2IESYBZH.js → chunk-FURNDIT3.js} +3 -3
- package/dist/commands/chunk-FVDQNMP6.js +93 -0
- package/dist/commands/{chunk-PZU6FZO6.js → chunk-FWU3H4TX.js} +1 -1
- package/dist/commands/{chunk-RYZ3RQRH.js → chunk-G3HBYHFA.js} +1 -1
- package/dist/commands/{chunk-HCA5QG2U.js → chunk-G4E4M2P4.js} +2 -2
- package/dist/commands/{chunk-VJLZ3IQQ.js → chunk-G5KSL2Q2.js} +1 -1
- package/dist/commands/{chunk-Y5ZW3KN5.js → chunk-G6XC7V6Y.js} +2 -2
- package/dist/commands/{chunk-73EBNBUW.js → chunk-GCPP5XIG.js} +1 -1
- package/dist/commands/{chunk-Q3463XNL.js → chunk-GITT5A5A.js} +3 -3
- package/dist/commands/{chunk-T2IO4LEB.js → chunk-GLC47H7I.js} +10 -10
- package/dist/commands/{chunk-GA6E4VGO.js → chunk-GUR54ELE.js} +1 -1
- package/dist/commands/{chunk-7IT23HIR.js → chunk-GY4DMCKS.js} +2 -2
- package/dist/commands/{chunk-PZ4ITSLG.js → chunk-H6JQRHDC.js} +3 -3
- package/dist/commands/{chunk-ZHZSZNE2.js → chunk-HATKF6VX.js} +2 -2
- package/dist/commands/{chunk-ELWNRE6E.js → chunk-HH3CVIFU.js} +5 -5
- package/dist/commands/{chunk-7GMTJDO2.js → chunk-HHMMGDMP.js} +6 -6
- package/dist/commands/{chunk-VD5674LW.js → chunk-HI5WPM6C.js} +2 -2
- package/dist/commands/{chunk-JUUBDYFZ.js → chunk-HQSWPRUF.js} +4 -4
- package/dist/commands/{chunk-ZAJD6T6E.js → chunk-HVCQYZVD.js} +2 -2
- package/dist/commands/chunk-HWEZRNPL.js +66 -0
- package/dist/commands/{chunk-J6GIVMXI.js → chunk-HX3FFIO5.js} +18 -3
- package/dist/commands/{chunk-GU5ML3Y3.js → chunk-HXDTA5VU.js} +13 -68
- package/dist/commands/{chunk-BNXE3NVB.js → chunk-I2KCGKJI.js} +1 -1
- package/dist/commands/{chunk-LC7SBONO.js → chunk-IAD4WLLI.js} +1 -1
- package/dist/commands/{chunk-WWC5L3AO.js → chunk-IB5TT73I.js} +2 -2
- package/dist/commands/{chunk-HOSZITJM.js → chunk-IBAYXCMU.js} +2 -2
- package/dist/commands/chunk-IGDJNXX2.js +49 -0
- package/dist/commands/{chunk-OJ4LGBVD.js → chunk-ILIITIMQ.js} +3 -3
- package/dist/commands/{chunk-CUR2WNYB.js → chunk-IRGDMSTI.js} +3 -3
- package/dist/commands/{chunk-PZTWQYRI.js → chunk-IYJEBWW5.js} +3 -3
- package/dist/commands/{chunk-A3D2XHOJ.js → chunk-J22PSIXR.js} +40 -9
- package/dist/commands/{chunk-O27H6NN6.js → chunk-J66YBAAM.js} +3 -5
- package/dist/commands/{chunk-P6RGQXHI.js → chunk-J6WKZRV2.js} +2 -2
- package/dist/commands/{chunk-NFEBQED3.js → chunk-J7IO3AYH.js} +2 -2
- package/dist/commands/{chunk-T57W3UWK.js → chunk-JAKC2BHX.js} +1 -1
- package/dist/commands/{chunk-3EO2XN3A.js → chunk-JCAQ7B6J.js} +4 -4
- package/dist/commands/{chunk-QQZOQ7AM.js → chunk-JFLFGLE4.js} +1 -1
- package/dist/commands/{chunk-ZDSDPKCD.js → chunk-JIGBNCDR.js} +1 -1
- package/dist/commands/{chunk-Q5N2J2UF.js → chunk-JJHWTFWQ.js} +5 -7
- package/dist/commands/{chunk-EI6JG5DF.js → chunk-JKOGWGQM.js} +1 -1
- package/dist/commands/{chunk-RK4HE5NW.js → chunk-JM6EVOFN.js} +4 -4
- package/dist/commands/{chunk-EBNIX2TC.js → chunk-JV24VP2O.js} +1 -1
- package/dist/commands/{chunk-BCK5LW4F.js → chunk-JVKXJ763.js} +3 -3
- package/dist/commands/{chunk-D5TAR6TV.js → chunk-JZHY7D6D.js} +1 -1
- package/dist/commands/{chunk-CRNPPKP2.js → chunk-JZK33TA5.js} +1 -1
- package/dist/commands/{chunk-UOAG2XQT.js → chunk-K275REYP.js} +3 -3
- package/dist/commands/{chunk-HESMKHEB.js → chunk-K4G3HOKS.js} +2 -2
- package/dist/commands/{chunk-L6XN3EXI.js → chunk-K64EIHD2.js} +1 -1
- package/dist/commands/{chunk-RINVPTA2.js → chunk-KCFOP5RI.js} +28 -28
- package/dist/commands/{chunk-O26Y2FOJ.js → chunk-KGE4AS2Y.js} +1 -1
- package/dist/commands/{chunk-EWA72KO7.js → chunk-KK2SL42W.js} +2 -2
- package/dist/commands/{chunk-MMXZKLDU.js → chunk-KK7TEL5G.js} +10 -4
- package/dist/commands/{chunk-UEURNXE5.js → chunk-KKIMVXAP.js} +2 -2
- package/dist/commands/{chunk-MAGJFH5T.js → chunk-KODXWMBX.js} +6 -6
- package/dist/commands/{chunk-D4HNS43Q.js → chunk-KPSKWTOS.js} +17 -17
- package/dist/commands/{chunk-VFJYOAOQ.js → chunk-KTV2HNWB.js} +2 -2
- package/dist/commands/{chunk-OWR2TCOY.js → chunk-KWYQR5MK.js} +5 -5
- package/dist/commands/{chunk-FNQW6NY7.js → chunk-KXK2A2HB.js} +6 -2
- package/dist/commands/{chunk-O5FVBIRI.js → chunk-KZ5BBBMO.js} +5 -5
- package/dist/commands/{chunk-JUJFIATR.js → chunk-KZ7HD37E.js} +6 -6
- package/dist/commands/{chunk-2YCKPX3A.js → chunk-KZZWPUJW.js} +1 -1
- package/dist/commands/{chunk-MYNM3YMR.js → chunk-L7DAL54N.js} +3 -3
- package/dist/commands/{chunk-NOXLKIPR.js → chunk-LAR76BFA.js} +1 -1
- package/dist/commands/{chunk-ZA3W73PF.js → chunk-LB557AHJ.js} +3 -3
- package/dist/commands/{chunk-LYEKT3IN.js → chunk-LEB2VP7F.js} +1 -1
- package/dist/commands/{chunk-WQJ7O3C3.js → chunk-LJXKVLYI.js} +1 -1
- package/dist/commands/{chunk-CHX4QTP4.js → chunk-LJZERYLG.js} +1 -1
- package/dist/commands/{chunk-PF22VUWB.js → chunk-LOOFYHUM.js} +76 -26
- package/dist/commands/{chunk-HIPO6HUG.js → chunk-LPSULLNK.js} +1 -1
- package/dist/commands/{chunk-G47ZNQVG.js → chunk-LR22UK5W.js} +1 -1
- package/dist/commands/{chunk-SV4FHQE7.js → chunk-LT7QSHR4.js} +14 -14
- package/dist/commands/{chunk-HIB5G2X6.js → chunk-LUXWDMKI.js} +7 -7
- package/dist/commands/{chunk-XH6BGVVP.js → chunk-LX7TIEMI.js} +9 -36
- package/dist/commands/{chunk-OGNTJ5JB.js → chunk-LYO6TX5L.js} +1 -1
- package/dist/commands/{chunk-JLREFWJ4.js → chunk-LZ5QXE5N.js} +6 -6
- package/dist/commands/{chunk-WW3TX742.js → chunk-LZPPSOTP.js} +4 -4
- package/dist/commands/{chunk-5WIZR5SC.js → chunk-M4UV3BEV.js} +11 -11
- package/dist/commands/{chunk-LNBUIOK6.js → chunk-M6JDU5EK.js} +4 -4
- package/dist/commands/{chunk-VZSJCFRT.js → chunk-MFBNNTBM.js} +4 -4
- package/dist/commands/{chunk-KHWTJ4F7.js → chunk-MI2OS6TL.js} +3 -3
- package/dist/commands/{chunk-VZCQZFPH.js → chunk-MLW4S35K.js} +19 -8
- package/dist/commands/{chunk-RIUPRMLW.js → chunk-MN425CU6.js} +1 -1
- package/dist/commands/{chunk-7W3D3WRW.js → chunk-MOIOSCZM.js} +2 -2
- package/dist/commands/{chunk-3BNNMJOT.js → chunk-MRORPFSO.js} +20 -320
- package/dist/commands/{chunk-LA5WTOAM.js → chunk-MUGTOJUL.js} +12 -12
- package/dist/commands/{chunk-L6LU2633.js → chunk-MVHPRYHE.js} +1 -1
- package/dist/commands/{chunk-EKCKCX5S.js → chunk-MWO6FOSZ.js} +123 -21
- package/dist/commands/{chunk-AVUGMOHZ.js → chunk-N7QTMTST.js} +2 -2
- package/dist/commands/{chunk-LMSS4ARB.js → chunk-NDBX7LSS.js} +1 -1
- package/dist/commands/{chunk-BEE7OAQ5.js → chunk-NDWZTWXV.js} +21 -2
- package/dist/commands/{chunk-6TESOL3L.js → chunk-NEGJ77RV.js} +7 -7
- package/dist/commands/{chunk-LCEJXF7A.js → chunk-NEGRE5VW.js} +4 -4
- package/dist/commands/{chunk-IXX4SXIP.js → chunk-NFPD2P3V.js} +1 -1
- package/dist/commands/chunk-NHIW7JE6.js +335 -0
- package/dist/commands/{chunk-CJSFC5YI.js → chunk-NILSN7A4.js} +7 -7
- package/dist/commands/{chunk-W4J6YTFE.js → chunk-NOLFSPOB.js} +2 -2
- package/dist/commands/chunk-NT67QTZO.js +65 -0
- package/dist/commands/{chunk-NJT5L6IC.js → chunk-NU7W6QGT.js} +33 -4
- package/dist/commands/chunk-NUR4FQHM.js +21 -0
- package/dist/commands/{chunk-OKKQI4ZG.js → chunk-OAAVY2JK.js} +1 -1
- package/dist/commands/chunk-OF4BY4N7.js +32 -0
- package/dist/commands/{chunk-W47I2KDY.js → chunk-OGS2DK7I.js} +3 -3
- package/dist/commands/{chunk-MS6Q3Z7V.js → chunk-OIPV3PWW.js} +6 -6
- package/dist/commands/{chunk-T33QDAWD.js → chunk-OIX2363L.js} +1 -1
- package/dist/commands/{chunk-GPMSYXYO.js → chunk-OJ65BZBV.js} +283 -15
- package/dist/commands/{chunk-34LAULSC.js → chunk-OKZWEVR4.js} +3 -3
- package/dist/commands/{chunk-2CXAVVST.js → chunk-OL6IF4JC.js} +1 -1
- package/dist/commands/{chunk-6JVNRY5A.js → chunk-OMPRILFH.js} +1 -1
- package/dist/commands/{chunk-VGHSZLYQ.js → chunk-OOWGH2RG.js} +1 -1
- package/dist/commands/{chunk-ERGZPWKP.js → chunk-OP2RFVLS.js} +1 -1
- package/dist/commands/{chunk-UU6GCJGM.js → chunk-ORKVN2LO.js} +2 -2
- package/dist/commands/{chunk-RHII5XI6.js → chunk-OSBWXZJ4.js} +24 -24
- package/dist/commands/{chunk-D3SHCUBC.js → chunk-OVWPZDWP.js} +2 -2
- package/dist/commands/{chunk-Z4HYBFZD.js → chunk-OWYK2BEJ.js} +108 -46
- package/dist/commands/{chunk-P4O67FP5.js → chunk-OX3VQLV2.js} +6 -6
- package/dist/commands/{chunk-L6TU7FC2.js → chunk-OZJP77UM.js} +4 -4
- package/dist/commands/{chunk-SNO7CY2B.js → chunk-P3H3DKTE.js} +2 -2
- package/dist/commands/{chunk-2OIX4JLA.js → chunk-P5SOYWH2.js} +3 -3
- package/dist/commands/{chunk-M4PEC7YW.js → chunk-PHLOTUB7.js} +54 -37
- package/dist/commands/{chunk-73KBUQKI.js → chunk-PTNQCCIB.js} +2 -2
- package/dist/commands/{chunk-4P2LCVGO.js → chunk-PTZEFQUX.js} +8 -8
- package/dist/commands/{chunk-DJVMC3U2.js → chunk-Q426ZSZ4.js} +1 -1
- package/dist/commands/{chunk-US6X7JXC.js → chunk-Q7EEIOAD.js} +4 -4
- package/dist/commands/{chunk-LE7TFPMU.js → chunk-QABRNGQV.js} +2 -2
- package/dist/commands/{chunk-NGKB632X.js → chunk-QDFVVRQP.js} +3 -3
- package/dist/commands/{chunk-36M2UV6C.js → chunk-QGATHT4S.js} +38 -4
- package/dist/commands/{chunk-DIB2Z2OS.js → chunk-QJRVDE7T.js} +1 -1
- package/dist/commands/{chunk-KUJQWO6M.js → chunk-QKTTKAXM.js} +2 -2
- package/dist/commands/{chunk-DXZW4V7J.js → chunk-QMDKDQKW.js} +3 -3
- package/dist/commands/{chunk-VW5SGE7A.js → chunk-QOSC5RKD.js} +1 -1
- package/dist/commands/{chunk-ENLWXAHD.js → chunk-QV5FKMOU.js} +1 -1
- package/dist/commands/{chunk-32SNWQJP.js → chunk-R2THGPI3.js} +2 -2
- package/dist/commands/{chunk-RVHBWSIG.js → chunk-R54Z2Z3X.js} +2 -2
- package/dist/commands/{chunk-CJAA5GAF.js → chunk-RG53UFNW.js} +15 -15
- package/dist/commands/{chunk-HJKZDDDI.js → chunk-RHKCWJQX.js} +1 -1
- package/dist/commands/{chunk-RPDWFUQO.js → chunk-RKIAX4DZ.js} +36 -84
- package/dist/commands/{chunk-LE2T3FGJ.js → chunk-RLBFEHHC.js} +2 -4
- package/dist/commands/{chunk-5GBZ43UA.js → chunk-RMDLFLPE.js} +1 -1
- package/dist/commands/{chunk-U2UH4VM4.js → chunk-RN2YDNLF.js} +2 -2
- package/dist/commands/{chunk-GQHUFNXN.js → chunk-RRAIRS2T.js} +1 -1
- package/dist/commands/{chunk-DRCTDVI2.js → chunk-RUQY5TS3.js} +3 -3
- package/dist/commands/{chunk-WGULS5DA.js → chunk-RW64VHEB.js} +1 -0
- package/dist/commands/{chunk-4G7NKNAZ.js → chunk-RXYMJPJB.js} +3 -3
- package/dist/commands/{chunk-B33BTNB4.js → chunk-S4M6UWR2.js} +21 -5
- package/dist/commands/{chunk-4Q4FXBUQ.js → chunk-SASX3W2M.js} +2 -2
- package/dist/commands/{chunk-TIXJY22D.js → chunk-SJ2ZN575.js} +5 -5
- package/dist/commands/{chunk-NSZTSCBW.js → chunk-SP7DKYGU.js} +13 -13
- package/dist/commands/{chunk-T3FD3Q73.js → chunk-SRG6PKVS.js} +1 -1
- package/dist/commands/{chunk-QA22PBCJ.js → chunk-SSL6A3Y4.js} +3 -3
- package/dist/commands/{chunk-4BEIYKI2.js → chunk-SV4FZR24.js} +2 -0
- package/dist/commands/{chunk-HZSQI6TD.js → chunk-SVTS7ACS.js} +2 -2
- package/dist/commands/{chunk-F7XLEK55.js → chunk-SVV4U5AR.js} +1 -1
- package/dist/commands/{chunk-RRQFITJE.js → chunk-SXJM4DZ5.js} +1 -1
- package/dist/commands/{chunk-OIDMJASD.js → chunk-SYB3M632.js} +1 -1
- package/dist/commands/{chunk-UJOZ2MGX.js → chunk-SYOXIKB7.js} +6 -6
- package/dist/commands/{chunk-5SB37YDW.js → chunk-SZG5HDNP.js} +3 -3
- package/dist/commands/{chunk-R2CF6VZE.js → chunk-T4F33UKZ.js} +4 -4
- package/dist/commands/{chunk-ESQEEL4O.js → chunk-TAEGXID2.js} +2 -2
- package/dist/commands/chunk-TEPYEUYG.js +585 -0
- package/dist/commands/{chunk-LUMCYDGE.js → chunk-TFLHYC2F.js} +2 -2
- package/dist/commands/{chunk-V5OIPYA6.js → chunk-TJKM56WJ.js} +4 -4
- package/dist/commands/{chunk-CYQ3ZF7R.js → chunk-TLAB552K.js} +86 -13
- package/dist/commands/{chunk-ST32OGPY.js → chunk-TP6L4W3W.js} +5 -5
- package/dist/commands/{chunk-C26LKDBE.js → chunk-TR7WWYD5.js} +1 -1
- package/dist/commands/{chunk-PWYXY46Y.js → chunk-TYNH2R66.js} +15 -15
- package/dist/commands/{chunk-AZUE65NT.js → chunk-U5P6G3UV.js} +2 -2
- package/dist/commands/{chunk-REPANBLS.js → chunk-U7Y6RKLK.js} +1 -1
- package/dist/commands/{chunk-55I7OYHI.js → chunk-UIMMWH7U.js} +1 -1
- package/dist/commands/{chunk-72J2G2E7.js → chunk-UKBBWMLE.js} +20 -20
- package/dist/commands/{chunk-VTLL6CKO.js → chunk-UNMSZGSG.js} +14 -14
- package/dist/commands/chunk-UOVUUVDK.js +18 -0
- package/dist/commands/{chunk-JNWHX25C.js → chunk-URDT2O2K.js} +1 -1
- package/dist/commands/{chunk-FGZQSSGH.js → chunk-UREXZJDB.js} +1 -1
- package/dist/commands/{chunk-O4WBADCX.js → chunk-UTHUX7VU.js} +3 -3
- package/dist/commands/{chunk-PDDKRHHS.js → chunk-V5OUZFWK.js} +3 -3
- package/dist/commands/{chunk-N4O5I55P.js → chunk-VCPGFBMN.js} +8 -8
- package/dist/commands/{chunk-WN7NK3NY.js → chunk-VGPIQNDB.js} +1 -1
- package/dist/commands/{chunk-HOGFJHBT.js → chunk-VJS2MCLA.js} +1 -1
- package/dist/commands/{chunk-4YI4SLRJ.js → chunk-VK6D5CWA.js} +8 -8
- package/dist/commands/{chunk-4LWRCPS5.js → chunk-VOF3N4WO.js} +3 -3
- package/dist/commands/{chunk-AM44D7NF.js → chunk-VQRT32JB.js} +1 -1
- package/dist/commands/{chunk-AS3GWVAN.js → chunk-VQVPAVQ3.js} +1 -1
- package/dist/commands/{chunk-6VTJO5L2.js → chunk-VV4TQYGD.js} +3 -3
- package/dist/commands/{chunk-WIE7VUBE.js → chunk-W7DRUOF7.js} +5 -5
- package/dist/commands/{chunk-HH2KDLTP.js → chunk-WAEN2RTT.js} +2 -2
- package/dist/commands/{chunk-NKKH3PBE.js → chunk-WB4T3VY2.js} +18 -1
- package/dist/commands/{chunk-DNJC7X73.js → chunk-WCEUMOKK.js} +2 -2
- package/dist/commands/{chunk-BK6Q4VCA.js → chunk-WTH6NTXU.js} +4 -4
- package/dist/commands/{chunk-WG6GYBRJ.js → chunk-WWVYEHQT.js} +2 -1
- package/dist/commands/{chunk-P4CWLRT2.js → chunk-X3TNPALI.js} +1 -1
- package/dist/commands/{chunk-LZNYHWRO.js → chunk-XC6GG5JR.js} +3 -3
- package/dist/commands/{chunk-RI7EQYKL.js → chunk-XFWI6WHH.js} +2 -2
- package/dist/commands/{chunk-BY3POLIQ.js → chunk-XHGWMD3L.js} +7 -7
- package/dist/commands/{chunk-BPSJSHYD.js → chunk-XI2ABCRX.js} +2 -2
- package/dist/commands/{chunk-TS4ZK46L.js → chunk-XKSUBUIH.js} +5 -5
- package/dist/commands/{chunk-K7GL3BGI.js → chunk-XPBF5DG3.js} +4 -4
- package/dist/commands/{chunk-6SKMZGER.js → chunk-XUMYPESL.js} +20 -8
- package/dist/commands/{chunk-QS5USD4T.js → chunk-XXC32PVL.js} +5 -4
- package/dist/commands/{chunk-ORSI7Y55.js → chunk-XXN2EZBY.js} +1 -1
- package/dist/commands/{chunk-IZVM2TTH.js → chunk-XZQWEVR3.js} +2 -2
- package/dist/commands/{chunk-E3CXOVPQ.js → chunk-Y27PTXXI.js} +1 -1
- package/dist/commands/{chunk-337QQM4C.js → chunk-Y4EBUI6M.js} +106 -5
- package/dist/commands/{chunk-WRX3MINT.js → chunk-YAU3LYNF.js} +1 -1
- package/dist/commands/{chunk-JB7R3A4A.js → chunk-YDURQICF.js} +4 -4
- package/dist/commands/{chunk-RX5JSPPH.js → chunk-YGFOGA7C.js} +11 -11
- package/dist/commands/{chunk-S6SXMBF2.js → chunk-YHJ2AJMA.js} +2 -2
- package/dist/commands/{chunk-MVPUQLN5.js → chunk-YM77CF4D.js} +4 -4
- package/dist/commands/{chunk-ZYIMQHCB.js → chunk-YNPRJCEO.js} +6 -6
- package/dist/commands/{chunk-3UKJFWKS.js → chunk-YTBQAD5W.js} +3 -3
- package/dist/commands/{chunk-KIVOZY2J.js → chunk-ZBZ5DDCH.js} +66 -64
- package/dist/commands/{chunk-TAPDXK34.js → chunk-ZLRUHSOP.js} +1 -1
- package/dist/commands/{chunk-XYAK53TK.js → chunk-ZNR75OXP.js} +2 -1
- package/dist/commands/{chunk-CADFBQJJ.js → chunk-ZSOR4ISJ.js} +4 -4
- package/dist/commands/{chunk-6NRTLH6I.js → chunk-ZYFHYQA7.js} +1 -1
- package/dist/commands/{chunk-Q7TV3OV6.js → chunk-ZZFFSQF4.js} +4 -4
- package/dist/commands/{chunk-PDAY76AN.js → chunk-ZZULXNC2.js} +1 -1
- package/dist/commands/{chunk-5Y7QQYTU.js → chunk-ZZXO6TFH.js} +1 -1
- package/dist/commands/code-symbol-cli.js +4 -4
- package/dist/commands/codex-hook-adapter.js +99 -100
- package/dist/commands/command-derive.js +10 -10
- package/dist/commands/cost-audit-main.js +94 -92
- package/dist/commands/cspell-cached.js +24 -23
- package/dist/commands/defect-origin-main.js +19 -18
- package/dist/commands/defect-report-main.js +15 -14
- package/dist/commands/disposition-cli.js +67 -64
- package/dist/commands/doctor.js +3 -3
- package/dist/commands/document-read-cli.js +89 -9
- package/dist/commands/document-section-main.js +89 -9
- package/dist/commands/edit-files-cli.js +1 -1
- package/dist/commands/effect-audit-cli.js +20 -19
- package/dist/commands/epic-audit-main.js +55 -53
- package/dist/commands/epic-bundle-main.js +87 -85
- package/dist/commands/epic-check.js +16 -15
- package/dist/commands/epic-main.js +93 -91
- package/dist/commands/epic-next-main.js +51 -49
- package/dist/commands/format-edited-cli.js +30 -32
- package/dist/commands/format.js +11 -10
- package/dist/commands/fresh-machine-cli.js +6 -6
- package/dist/commands/git-followup-workflow.js +137 -122
- package/dist/commands/git-workflow.js +28 -27
- package/dist/commands/github-release-cli.js +26 -3
- package/dist/commands/hook-ledger-cli.js +74 -126
- package/dist/commands/init-main.js +20 -19
- package/dist/commands/inputs.json +1909 -1878
- package/dist/commands/issue-ack-cli.js +5 -5
- package/dist/commands/issue-already-done-cli.js +63 -58
- package/dist/commands/issue-body-cli.js +44 -42
- package/dist/commands/issue-cite-main.js +11 -10
- package/dist/commands/issue-comment-main.js +15 -11
- package/dist/commands/issue-consolidate-cli.js +31 -30
- package/dist/commands/issue-file-main.js +114 -110
- package/dist/commands/issue-fold-existing-cli.js +88 -86
- package/dist/commands/issue-fold-main.js +26 -25
- package/dist/commands/issue-lint-main.js +38 -37
- package/dist/commands/issue-measured-cli.js +66 -61
- package/dist/commands/issue-plan-cli.js +103 -101
- package/dist/commands/issue-premise-unmet-cli.js +66 -61
- package/dist/commands/issue-priority-cli.js +13 -12
- package/dist/commands/issue-read-main.js +18 -17
- package/dist/commands/issue-release-class-cli.js +12 -11
- package/dist/commands/issue-release-main.js +13 -12
- package/dist/commands/issue-scout-main.js +89 -87
- package/dist/commands/issue-spill-main.js +114 -110
- package/dist/commands/issue-state-main.js +16 -15
- package/dist/commands/issue-tick-cli.js +14 -13
- package/dist/commands/josh-completion.js +10 -10
- package/dist/commands/lane-adopt-cli.js +19 -19
- package/dist/commands/lane-breakdown-cli.js +154 -126
- package/dist/commands/lane-cli.js +131 -125
- package/dist/commands/lane-launch-main.js +17 -17
- package/dist/commands/lane-limit-cli.js +81 -79
- package/dist/commands/lane-measure-cli.js +246 -130
- package/dist/commands/lane-pause-cli.js +15 -15
- package/dist/commands/lane-plan-cli.js +108 -101
- package/dist/commands/lane-resolve-cli.js +20 -19
- package/dist/commands/lane-restart-cli.js +124 -118
- package/dist/commands/lane-why-cli.js +85 -82
- package/dist/commands/lane-withdraw-cli.js +49 -48
- package/dist/commands/latest-corepack.js +3 -3
- package/dist/commands/latest-if-required-cli.js +9 -9
- package/dist/commands/latest-scope-main.js +5 -5
- package/dist/commands/latest-update.js +3 -3
- package/dist/commands/lines-command.js +3 -3
- package/dist/commands/lint-parallel-main.js +32 -31
- package/dist/commands/lint-related.js +79 -60
- package/dist/commands/lint-rule.js +32 -31
- package/dist/commands/lockfile-policy.js +11 -11
- package/dist/commands/main-merge-main.js +5 -5
- package/dist/commands/main-sync-main.js +5 -5
- package/dist/commands/managed-config-scope-cli.js +3 -3
- package/dist/commands/measure-rerun-cli.js +10 -10
- package/dist/commands/metrics-command.js +91 -58
- package/dist/commands/observation-record-cli.js +3 -3
- package/dist/commands/observations-flush-cli.js +27 -25
- package/dist/commands/oracle-list-cli.js +2 -2
- package/dist/commands/overrides-check.js +4 -4
- package/dist/commands/package-scout-cli.js +67 -26
- package/dist/commands/plan-consumers-main.js +4 -4
- package/dist/commands/plan-scaffold-cli.js +132 -91
- package/dist/commands/pr-classification-main.js +3 -3
- package/dist/commands/pre-commit-lint.js +11 -12
- package/dist/commands/pre-commit-type-check.js +25 -24
- package/dist/commands/pre-push-unit.js +33 -33
- package/dist/commands/pretool-guard-cli.js +90 -91
- package/dist/commands/project-profile-cli.js +5 -4
- package/dist/commands/propagate.js +15 -15
- package/dist/commands/prose-stale-cli.js +20 -19
- package/dist/commands/publishable-range-check.js +4 -4
- package/dist/commands/read-files-cli.js +2 -2
- package/dist/commands/read-set-cli.js +61 -24
- package/dist/commands/refactor-scan-cli.js +6 -6
- package/dist/commands/release-cli.js +64 -36
- package/dist/commands/release-scope-main.js +19 -18
- package/dist/commands/rename-cli.js +27 -29
- package/dist/commands/reserved-run.js +3 -3
- package/dist/commands/retrospective-cli.js +104 -102
- package/dist/commands/review-attest-cli.js +6 -6
- package/dist/commands/review-brief-main.js +127 -109
- package/dist/commands/review-findings-cli.js +2 -2
- package/dist/commands/review-pair-cli.js +110 -84
- package/dist/commands/review-record-main.js +108 -83
- package/dist/commands/review-round2-cli.js +46 -45
- package/dist/commands/review-stops-cli.js +16 -16
- package/dist/commands/review-submit-cli.js +127 -109
- package/dist/commands/rule-list.js +58 -60
- package/dist/commands/rule-value-cli.js +226 -74
- package/dist/commands/run-add-cli.js +28 -27
- package/dist/commands/run-board-main.js +136 -132
- package/dist/commands/run-carry-cli.js +127 -124
- package/dist/commands/run-chain-cli.js +116 -93
- package/dist/commands/run-cut-cli.js +124 -119
- package/dist/commands/run-ending-cli.js +19 -22
- package/dist/commands/run-entry-cli.js +183 -180
- package/dist/commands/run-event-cli.js +5 -5
- package/dist/commands/run-handoff-cli.js +52 -28
- package/dist/commands/run-handoff-lanes-cli.js +15 -15
- package/dist/commands/run-hold-main.js +64 -62
- package/dist/commands/run-liveness-cli.js +11 -11
- package/dist/commands/run-merge-main.js +119 -116
- package/dist/commands/run-next-cli.js +87 -86
- package/dist/commands/run-park-cli.js +111 -92
- package/dist/commands/run-pause-cli.js +147 -133
- package/dist/commands/run-pickup-cli.js +13 -13
- package/dist/commands/run-prep-main.js +83 -82
- package/dist/commands/run-prime-cli.js +107 -87
- package/dist/commands/run-progress-main.js +123 -107
- package/dist/commands/run-report-cli.js +25 -24
- package/dist/commands/run-review-cli.js +168 -149
- package/dist/commands/run-ship-cli.js +208 -203
- package/dist/commands/run-ship-evidence-cli.js +38 -37
- package/dist/commands/run-ship-wait-main.js +40 -37
- package/dist/commands/run-split-cli.js +127 -125
- package/dist/commands/run-stale-main.js +36 -35
- package/dist/commands/run-status-cli.js +16 -15
- package/dist/commands/run-step-cli.js +173 -164
- package/dist/commands/run-tail-cli.js +1 -1
- package/dist/commands/run-tidy-main.js +30 -29
- package/dist/commands/run-wake-main.js +137 -119
- package/dist/commands/run-watcher-guard-cli.js +30 -29
- package/dist/commands/secretlint-scan.js +2 -2
- package/dist/commands/selfcheck-cli.js +27 -26
- package/dist/commands/session-language-main.js +48 -28
- package/dist/commands/sonar-hotspots-cli.js +3 -3
- package/dist/commands/split-assess-cli.js +24 -23
- package/dist/commands/split-child-recover-cli.js +13 -12
- package/dist/commands/start.js +37 -35
- package/dist/commands/stash-pop-main.js +3 -3
- package/dist/commands/stash-push-main.js +3 -3
- package/dist/commands/stop-guard.js +144 -143
- package/dist/commands/sync-main.js +11 -10
- package/dist/commands/telegram-test-main.js +5 -5
- package/dist/commands/test-declared.js +9 -8
- package/dist/commands/test-e2e-guard.js +23 -22
- package/dist/commands/test-pinned-main.js +26 -25
- package/dist/commands/test-reach-cli.js +15 -14
- package/dist/commands/test-red-main.js +5 -5
- package/dist/commands/{test-related-ZT2AO62I.js → test-related-ZCNC46MS.js} +31 -31
- package/dist/commands/test-related-main.js +51 -50
- package/dist/commands/test-unit-guard-main.js +9 -8
- package/dist/commands/time-cli.js +24 -27
- package/dist/commands/time-density-cli.js +8 -9
- package/dist/commands/tree-status-cli.js +4 -4
- package/dist/commands/type-check-command.js +8 -7
- package/dist/commands/ui-shot-cli.js +4 -4
- package/dist/commands/uninstall.js +20 -19
- package/dist/commands/unused-members-cli.js +9 -8
- package/dist/commands/upstream-interrupt-main.js +115 -111
- package/dist/commands/verification-gate.js +46 -46
- package/dist/commands/version-check.js +5 -5
- package/dist/hooks/{chunk-LWD43Z3C.js → chunk-5CUXGQT6.js} +1667 -107
- package/dist/hooks/{chunk-4YXV2REH.js → chunk-5R5YFQR5.js} +8 -8
- package/dist/hooks/{chunk-LKQBEKBI.js → chunk-6RLY27FT.js} +8 -8
- package/dist/hooks/{chunk-CICKRHTB.js → chunk-AO4TOV4V.js} +119 -2679
- package/dist/hooks/{chunk-NUPVO7RI.js → chunk-G5WSPYJ6.js} +4296 -1687
- package/dist/hooks/{chunk-UU4PTPEZ.js → chunk-HHIVWGHX.js} +250 -125
- package/dist/hooks/{chunk-P7BPAU26.js → chunk-IURJANNZ.js} +2 -2
- package/dist/hooks/{chunk-6RR6JZSB.js → chunk-OV22V63P.js} +357 -1744
- package/dist/hooks/{chunk-RQXECHAS.js → chunk-SXABK6UV.js} +57 -45
- package/dist/hooks/codex-hook-adapter.js +11 -11
- package/dist/hooks/daemon.js +1053 -690
- package/dist/hooks/format-edited.js +5 -5
- package/dist/hooks/inputs.json +542 -527
- package/dist/hooks/pretool-guard.js +7 -7
- package/dist/hooks/session-lang.js +293 -16
- package/dist/hooks/stop-guard.js +225 -48
- package/dist/inputs.json +65 -65
- package/dist/josh.js +73 -19
- package/dist/self-sync-guard/index.js +18 -1
- package/dist/version/index.js +18 -1
- package/package.json +3 -3
- package/pnpm-workspace.yaml +5 -13
- package/prompts/collaboration-workflow/issue-template.en.md +56 -52
- package/scripts/agent/agent-argv.ts +20 -6
- package/scripts/agent/agent-phase-profile.ts +89 -0
- package/scripts/agent/agent-role-profile.ts +3 -71
- package/scripts/agent/agent-ship-cap.ts +44 -0
- package/scripts/agent/agent-worker-profile.ts +154 -0
- package/scripts/agent/claude-agent-argv.ts +1 -1
- package/scripts/agent/lane-instructions.ts +29 -3
- package/scripts/auto-ok/auto-ok-judge-cli.ts +3 -0
- package/scripts/auto-ok/auto-ok-judge-write.ts +2 -1
- package/scripts/auto-ok/auto-ok-judge.ts +4 -2
- package/scripts/backlog/backlog-drive-escalate.ts +115 -0
- package/scripts/backlog/backlog-drive-stalled-retry.ts +48 -10
- package/scripts/document/document-scan.ts +35 -1
- package/scripts/gh/git-pr-checks-failed.ts +24 -0
- package/scripts/hooks/implementation-shell-deny-expansion.ts +20 -0
- package/scripts/hooks/implementation-shell-deny-git.ts +128 -0
- package/scripts/hooks/implementation-shell-deny.ts +14 -138
- package/scripts/hooks/implementation-shell.ts +28 -5
- package/scripts/hooks/step-zero-notice.ts +9 -6
- package/scripts/hooks/stop-actions.ts +4 -2
- package/scripts/init/init-logic-workspace.ts +1 -1
- package/scripts/issue/issue-auto-ok.ts +43 -4
- package/scripts/issue/issue-body-keys.ts +4 -0
- package/scripts/issue/issue-comment-cli.ts +15 -2
- package/scripts/issue/issue-evidence-exit.ts +6 -2
- package/scripts/issue/issue-file-cli.ts +5 -1
- package/scripts/issue/issue-file-pass.ts +14 -7
- package/scripts/issue/issue-file-worker.ts +95 -0
- package/scripts/issue/issue-file.ts +1 -1
- package/scripts/issue/issue-outcome.ts +107 -0
- package/scripts/issue/issue-read.ts +12 -7
- package/scripts/issue/issue-watch-diff.ts +2 -1
- package/scripts/josh/josh-commands-ai.ts +2 -2
- package/scripts/josh/josh-commands-development.ts +21 -5
- package/scripts/josh/josh-commands-issue-write.ts +3 -2
- package/scripts/josh/josh-commands-lint.ts +1 -1
- package/scripts/josh/josh-commands-project.ts +7 -2
- package/scripts/josh/josh-commands-run.ts +10 -2
- package/scripts/josh/josh-commands-workflow.ts +5 -0
- package/scripts/josh/session-language-cli.ts +1 -1
- package/scripts/lane/lane-breakdown-cli.ts +14 -4
- package/scripts/lane/lane-breakdown-text.ts +7 -0
- package/scripts/lane/lane-breakdown.ts +21 -1
- package/scripts/lane/lane-dispatch-prepare.ts +83 -0
- package/scripts/lane/lane-dispatch.ts +3 -53
- package/scripts/lane/lane-elapsed-time.ts +118 -0
- package/scripts/lane/lane-ledger-schema-ship.ts +4 -1
- package/scripts/lane/lane-net-time.ts +35 -7
- package/scripts/lane/lane-overrun.ts +1 -1
- package/scripts/lane/lane-plan-cli.ts +7 -3
- package/scripts/lane/lane-plan-estimate.ts +57 -0
- package/scripts/lane/lane-plan-size.ts +11 -20
- package/scripts/lane/lane-plan.ts +1 -0
- package/scripts/lane/lane-relaunch.ts +9 -4
- package/scripts/lane/lane-stage-budget.ts +6 -1
- package/scripts/lane/lane-stage-events.ts +103 -0
- package/scripts/lane/lane-stats-tables.ts +3 -0
- package/scripts/lane/lane-stop-check-stats.ts +117 -0
- package/scripts/lane/lane-stop-stats.ts +30 -6
- package/scripts/lane/lane-why-causes.ts +3 -11
- package/scripts/lane/openai-lane-supervisor-owner.ts +12 -0
- package/scripts/lane/openai-lane-supervisor.ts +36 -1
- package/scripts/lib/home-tilde.ts +24 -0
- package/scripts/lib/package-manifest.ts +27 -1
- package/scripts/observations/observation-ledger-archive.ts +180 -0
- package/scripts/observations/observation-ledger-home.ts +1 -0
- package/scripts/observations/observation-ledger.ts +5 -0
- package/scripts/observations/observations-flush-transaction.ts +358 -0
- package/scripts/observations/observations-flush.ts +72 -172
- package/scripts/plan/plan-scaffold-cli.ts +17 -6
- package/scripts/plan/plan-scaffold.ts +11 -0
- package/scripts/release/github-release-notes.ts +24 -0
- package/scripts/release/github-release-runs.ts +32 -6
- package/scripts/release/github-release.ts +10 -2
- package/scripts/release/release-progress.ts +22 -10
- package/scripts/release/release-publish-run.ts +39 -6
- package/scripts/repo/repository-labels.ts +23 -11
- package/scripts/review/review-comment-round.ts +10 -5
- package/scripts/rules/broad-investigation-shell.ts +2 -2
- package/scripts/rules/codex-prompt.ts +63 -0
- package/scripts/rules/direct-issue-comment.ts +62 -2
- package/scripts/rules/direct-issue-read.ts +55 -2
- package/scripts/rules/guard-remedy.ts +10 -4
- package/scripts/rules/issue-citation.ts +20 -9
- package/scripts/rules/last-prompt.ts +8 -4
- package/scripts/rules/rule-value-cli.ts +85 -4
- package/scripts/rules/rule-value-trend.ts +108 -0
- package/scripts/rules/shell-redirects.ts +19 -7
- package/scripts/rules/shell-segments.ts +145 -20
- package/scripts/rules/shell-tokens.ts +66 -0
- package/scripts/rules/standalone-gh-call.ts +63 -0
- package/scripts/rules/unasked-filing.ts +12 -4
- package/scripts/run/board/run-board-closed.ts +10 -1
- package/scripts/run/board/run-board-decision-read.ts +52 -12
- package/scripts/run/board/run-board-decision.ts +5 -0
- package/scripts/run/board/run-board-ending-reason.ts +21 -7
- package/scripts/run/board/run-board-github.ts +8 -1
- package/scripts/run/board/run-board-header.ts +4 -5
- package/scripts/run/board/run-board-layout.ts +5 -3
- package/scripts/run/board/run-board-link.ts +2 -0
- package/scripts/run/board/run-board-operation.ts +6 -2
- package/scripts/run/board/run-board-pause-fixture.json +12 -0
- package/scripts/run/board/run-board-pause.ts +87 -0
- package/scripts/run/board/run-board-plan-shared.ts +2 -0
- package/scripts/run/board/run-board-read.ts +7 -1
- package/scripts/run/board/run-board-render-condition.ts +10 -1
- package/scripts/run/board/run-board-render-title.ts +7 -0
- package/scripts/run/board/run-board-roots.ts +25 -2
- package/scripts/run/board/run-board-settle.ts +16 -2
- package/scripts/run/board/run-board-setup.ts +13 -7
- package/scripts/run/board/run-board-snapshot.ts +4 -0
- package/scripts/run/board/run-board-status.ts +13 -1
- package/scripts/run/board/run-board-tick.ts +7 -1
- package/scripts/run/cut/run-cut-cli.ts +2 -1
- package/scripts/run/park/run-park-cli.ts +13 -1
- package/scripts/run/park/run-park-escalate.ts +102 -0
- package/scripts/run/park/run-stalled.ts +29 -7
- package/scripts/run/review/run-review-early-push.ts +6 -6
- package/scripts/run/ship/run-ship-stop-cause.ts +12 -1
- package/scripts/split/split-assess.ts +14 -5
- package/scripts/test/test-related-touched.ts +21 -3
- package/scripts/test/test-related.ts +1 -1
- package/dist/commands/chunk-6WEVLIZE.js +0 -29
- package/dist/commands/chunk-E2ZCUKHT.js +0 -274
- package/dist/commands/chunk-NMLCPYBN.js +0 -134
- package/dist/commands/chunk-QEIO2ZNQ.js +0 -324
- package/dist/commands/chunk-QWX7EBC6.js +0 -112
- package/dist/commands/chunk-RQRLW4XK.js +0 -20
- package/dist/commands/chunk-UCQJDYE3.js +0 -21
- package/dist/commands/chunk-W4YH2DF3.js +0 -58
- package/dist/commands/{chunk-LRA3PXHS.js → chunk-ENKFCOVY.js} +3 -3
- package/dist/commands/{chunk-RUWV4INF.js → chunk-HQGNXR6I.js} +3 -3
package/dist/hooks/daemon.js
CHANGED
|
@@ -2261,7 +2261,7 @@ import {
|
|
|
2261
2261
|
writeSync as writeSync4
|
|
2262
2262
|
} from "node:fs";
|
|
2263
2263
|
import { Socket } from "node:net";
|
|
2264
|
-
import
|
|
2264
|
+
import path77 from "node:path";
|
|
2265
2265
|
import { createInterface as createInterface2 } from "node:readline";
|
|
2266
2266
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
2267
2267
|
|
|
@@ -3630,10 +3630,10 @@ function mergeDefs(...defs) {
|
|
|
3630
3630
|
function cloneDef(schema2) {
|
|
3631
3631
|
return mergeDefs(schema2._zod.def);
|
|
3632
3632
|
}
|
|
3633
|
-
function getElementAtPath(obj,
|
|
3634
|
-
if (!
|
|
3633
|
+
function getElementAtPath(obj, path78) {
|
|
3634
|
+
if (!path78)
|
|
3635
3635
|
return obj;
|
|
3636
|
-
return
|
|
3636
|
+
return path78.reduce((acc, key3) => acc?.[key3], obj);
|
|
3637
3637
|
}
|
|
3638
3638
|
function promiseAllObject(promisesObj) {
|
|
3639
3639
|
const keys = Object.keys(promisesObj);
|
|
@@ -3973,11 +3973,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
3973
3973
|
}
|
|
3974
3974
|
return false;
|
|
3975
3975
|
}
|
|
3976
|
-
function prefixIssues(
|
|
3976
|
+
function prefixIssues(path78, issues) {
|
|
3977
3977
|
return issues.map((iss) => {
|
|
3978
3978
|
var _a3;
|
|
3979
3979
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
3980
|
-
iss.path.unshift(
|
|
3980
|
+
iss.path.unshift(path78);
|
|
3981
3981
|
return iss;
|
|
3982
3982
|
});
|
|
3983
3983
|
}
|
|
@@ -4439,16 +4439,16 @@ function flattenError(error62, mapper = (issue3) => issue3.message) {
|
|
|
4439
4439
|
}
|
|
4440
4440
|
function formatError(error62, mapper = (issue3) => issue3.message) {
|
|
4441
4441
|
const fieldErrors = { _errors: [] };
|
|
4442
|
-
const processError = (error63,
|
|
4442
|
+
const processError = (error63, path78 = []) => {
|
|
4443
4443
|
for (const issue3 of error63.issues) {
|
|
4444
4444
|
if (issue3.code === "invalid_union" && issue3.errors.length) {
|
|
4445
|
-
issue3.errors.map((issues) => processError({ issues }, [...
|
|
4445
|
+
issue3.errors.map((issues) => processError({ issues }, [...path78, ...issue3.path]));
|
|
4446
4446
|
} else if (issue3.code === "invalid_key") {
|
|
4447
|
-
processError({ issues: issue3.issues }, [...
|
|
4447
|
+
processError({ issues: issue3.issues }, [...path78, ...issue3.path]);
|
|
4448
4448
|
} else if (issue3.code === "invalid_element") {
|
|
4449
|
-
processError({ issues: issue3.issues }, [...
|
|
4449
|
+
processError({ issues: issue3.issues }, [...path78, ...issue3.path]);
|
|
4450
4450
|
} else {
|
|
4451
|
-
const fullpath = [...
|
|
4451
|
+
const fullpath = [...path78, ...issue3.path];
|
|
4452
4452
|
if (fullpath.length === 0) {
|
|
4453
4453
|
fieldErrors._errors.push(mapper(issue3));
|
|
4454
4454
|
} else {
|
|
@@ -4487,17 +4487,17 @@ function formatError(error62, mapper = (issue3) => issue3.message) {
|
|
|
4487
4487
|
}
|
|
4488
4488
|
function treeifyError(error62, mapper = (issue3) => issue3.message) {
|
|
4489
4489
|
const result = { errors: [] };
|
|
4490
|
-
const processError = (error63,
|
|
4490
|
+
const processError = (error63, path78 = []) => {
|
|
4491
4491
|
var _a3;
|
|
4492
4492
|
for (const issue3 of error63.issues) {
|
|
4493
4493
|
if (issue3.code === "invalid_union" && issue3.errors.length) {
|
|
4494
|
-
issue3.errors.map((issues) => processError({ issues }, [...
|
|
4494
|
+
issue3.errors.map((issues) => processError({ issues }, [...path78, ...issue3.path]));
|
|
4495
4495
|
} else if (issue3.code === "invalid_key") {
|
|
4496
|
-
processError({ issues: issue3.issues }, [...
|
|
4496
|
+
processError({ issues: issue3.issues }, [...path78, ...issue3.path]);
|
|
4497
4497
|
} else if (issue3.code === "invalid_element") {
|
|
4498
|
-
processError({ issues: issue3.issues }, [...
|
|
4498
|
+
processError({ issues: issue3.issues }, [...path78, ...issue3.path]);
|
|
4499
4499
|
} else {
|
|
4500
|
-
const fullpath = [...
|
|
4500
|
+
const fullpath = [...path78, ...issue3.path];
|
|
4501
4501
|
if (fullpath.length === 0) {
|
|
4502
4502
|
result.errors.push(mapper(issue3));
|
|
4503
4503
|
continue;
|
|
@@ -4536,8 +4536,8 @@ function treeifyError(error62, mapper = (issue3) => issue3.message) {
|
|
|
4536
4536
|
}
|
|
4537
4537
|
function toDotPath(_path) {
|
|
4538
4538
|
const segs = [];
|
|
4539
|
-
const
|
|
4540
|
-
for (const seg of
|
|
4539
|
+
const path78 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
4540
|
+
for (const seg of path78) {
|
|
4541
4541
|
if (typeof seg === "number")
|
|
4542
4542
|
segs.push(`[${seg}]`);
|
|
4543
4543
|
else if (typeof seg === "symbol")
|
|
@@ -5614,23 +5614,23 @@ function canParseURL(input2) {
|
|
|
5614
5614
|
return false;
|
|
5615
5615
|
}
|
|
5616
5616
|
}
|
|
5617
|
-
function validateURL(
|
|
5617
|
+
function validateURL(trimmed5, def) {
|
|
5618
5618
|
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
|
|
5619
|
-
return canParseURL(
|
|
5619
|
+
return canParseURL(trimmed5) || URL_UNPARSEABLE;
|
|
5620
5620
|
}
|
|
5621
|
-
return parseURLObject(
|
|
5621
|
+
return parseURLObject(trimmed5, def);
|
|
5622
5622
|
}
|
|
5623
|
-
function parseURLObject(
|
|
5624
|
-
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(
|
|
5623
|
+
function parseURLObject(trimmed5, def) {
|
|
5624
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed5)) {
|
|
5625
5625
|
return URL_BAD_FORMAT;
|
|
5626
5626
|
}
|
|
5627
5627
|
try {
|
|
5628
5628
|
if (typeof URL !== "undefined") {
|
|
5629
5629
|
const URLStatic = URL;
|
|
5630
5630
|
if (typeof URLStatic.parse === "function")
|
|
5631
|
-
return URLStatic.parse(
|
|
5631
|
+
return URLStatic.parse(trimmed5) ?? URL_UNPARSEABLE;
|
|
5632
5632
|
}
|
|
5633
|
-
return new URL(
|
|
5633
|
+
return new URL(trimmed5);
|
|
5634
5634
|
} catch {
|
|
5635
5635
|
return URL_UNPARSEABLE;
|
|
5636
5636
|
}
|
|
@@ -5651,8 +5651,8 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
5651
5651
|
$ZodStringFormat.init(inst, def);
|
|
5652
5652
|
inst._zod.check = (payload) => {
|
|
5653
5653
|
try {
|
|
5654
|
-
const
|
|
5655
|
-
const url2 = validateURL(
|
|
5654
|
+
const trimmed5 = payload.value.trim();
|
|
5655
|
+
const url2 = validateURL(trimmed5, def);
|
|
5656
5656
|
if (url2 === URL_BAD_FORMAT) {
|
|
5657
5657
|
payload.issues.push({
|
|
5658
5658
|
code: "invalid_format",
|
|
@@ -5675,7 +5675,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
5675
5675
|
return;
|
|
5676
5676
|
}
|
|
5677
5677
|
if (url2 === true) {
|
|
5678
|
-
payload.value = stripTabAndNewline(
|
|
5678
|
+
payload.value = stripTabAndNewline(trimmed5);
|
|
5679
5679
|
return;
|
|
5680
5680
|
}
|
|
5681
5681
|
if (def.hostname && !urlHostnameOk(url2, def.hostname)) {
|
|
@@ -5700,7 +5700,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
5700
5700
|
continue: !def.abort
|
|
5701
5701
|
});
|
|
5702
5702
|
}
|
|
5703
|
-
payload.value = def.normalize ? url2.href : stripTabAndNewline(
|
|
5703
|
+
payload.value = def.normalize ? url2.href : stripTabAndNewline(trimmed5);
|
|
5704
5704
|
return;
|
|
5705
5705
|
} catch (_) {
|
|
5706
5706
|
payload.issues.push({
|
|
@@ -21675,13 +21675,13 @@ function resolveRef(ref, ctx) {
|
|
|
21675
21675
|
if (!ref.startsWith("#")) {
|
|
21676
21676
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
21677
21677
|
}
|
|
21678
|
-
const
|
|
21679
|
-
if (
|
|
21678
|
+
const path78 = ref.slice(1).split("/").filter(Boolean);
|
|
21679
|
+
if (path78.length === 0) {
|
|
21680
21680
|
return ctx.rootSchema;
|
|
21681
21681
|
}
|
|
21682
21682
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
21683
|
-
if (
|
|
21684
|
-
const key3 =
|
|
21683
|
+
if (path78[0] === defsKey) {
|
|
21684
|
+
const key3 = path78[1] === void 0 ? void 0 : decodeJSONPointerSegment(path78[1]);
|
|
21685
21685
|
if (!key3 || !ctx.defs[key3]) {
|
|
21686
21686
|
throw new Error(`Reference not found: ${ref}`);
|
|
21687
21687
|
}
|
|
@@ -27769,17 +27769,17 @@ var writeToFiles = (chunks, stdioItems, outputFiles) => {
|
|
|
27769
27769
|
const writtenPaths = /* @__PURE__ */ new Set();
|
|
27770
27770
|
for (const stdioItem of fileItems) {
|
|
27771
27771
|
const { type, append: append6 } = stdioItem;
|
|
27772
|
-
const
|
|
27773
|
-
if (writtenPaths.has(
|
|
27772
|
+
const path78 = type === "fileNumber" ? stdioItem.path : getFileTarget(stdioItem);
|
|
27773
|
+
if (writtenPaths.has(path78)) {
|
|
27774
27774
|
continue;
|
|
27775
27775
|
}
|
|
27776
|
-
writtenPaths.add(
|
|
27777
|
-
if (append6 || outputFiles.has(
|
|
27778
|
-
appendFileSync(
|
|
27776
|
+
writtenPaths.add(path78);
|
|
27777
|
+
if (append6 || outputFiles.has(path78)) {
|
|
27778
|
+
appendFileSync(path78, contents);
|
|
27779
27779
|
} else {
|
|
27780
|
-
writeFileSync3(
|
|
27780
|
+
writeFileSync3(path78, contents);
|
|
27781
27781
|
}
|
|
27782
|
-
outputFiles.add(
|
|
27782
|
+
outputFiles.add(path78);
|
|
27783
27783
|
}
|
|
27784
27784
|
};
|
|
27785
27785
|
|
|
@@ -30739,9 +30739,9 @@ var NAME_ONLY_FLAG = "--name-only";
|
|
|
30739
30739
|
var DEFAULT_BRANCH_FALLBACK = "main";
|
|
30740
30740
|
var DEFAULT_BRANCH_ARGUMENTS = ["symbolic-ref", "refs/remotes/origin/HEAD"];
|
|
30741
30741
|
function default_branch_of(output2) {
|
|
30742
|
-
const
|
|
30743
|
-
if (!
|
|
30744
|
-
return
|
|
30742
|
+
const trimmed5 = output2?.trim() ?? "";
|
|
30743
|
+
if (!trimmed5.startsWith(REFS_REMOTES_ORIGIN_PREFIX)) return DEFAULT_BRANCH_FALLBACK;
|
|
30744
|
+
return trimmed5.slice(REFS_REMOTES_ORIGIN_PREFIX.length);
|
|
30745
30745
|
}
|
|
30746
30746
|
async function get_default_branch() {
|
|
30747
30747
|
try {
|
|
@@ -31909,9 +31909,9 @@ function answer_help_or_unknown(argv, known_flags, command3) {
|
|
|
31909
31909
|
console.info(usage_line(known_flags, command3));
|
|
31910
31910
|
return 0;
|
|
31911
31911
|
}
|
|
31912
|
-
const
|
|
31913
|
-
if (
|
|
31914
|
-
console.error(
|
|
31912
|
+
const refusal6 = refuse_unknown_flags(argv, known_flags, command3);
|
|
31913
|
+
if (refusal6 === void 0) return void 0;
|
|
31914
|
+
console.error(refusal6);
|
|
31915
31915
|
return 1;
|
|
31916
31916
|
}
|
|
31917
31917
|
function parse_or_undefined2(config2) {
|
|
@@ -31977,11 +31977,11 @@ function to_positive(raw) {
|
|
|
31977
31977
|
return to_integer(raw, POSITIVE_PATTERN);
|
|
31978
31978
|
}
|
|
31979
31979
|
function read_positive_setting(raw, name, fallback) {
|
|
31980
|
-
const
|
|
31981
|
-
if (
|
|
31982
|
-
const limit = to_positive(
|
|
31980
|
+
const trimmed5 = raw?.trim() ?? "";
|
|
31981
|
+
if (trimmed5 === "") return { kind: "limit", limit: fallback };
|
|
31982
|
+
const limit = to_positive(trimmed5);
|
|
31983
31983
|
if (limit !== void 0) return { kind: "limit", limit };
|
|
31984
|
-
return { kind: "problem", problem: `${name} must be a positive integer, not "${
|
|
31984
|
+
return { kind: "problem", problem: `${name} must be a positive integer, not "${trimmed5}"` };
|
|
31985
31985
|
}
|
|
31986
31986
|
var cli_flags = {
|
|
31987
31987
|
to_count,
|
|
@@ -32307,20 +32307,20 @@ var ABSENT_CODE = "ENOENT";
|
|
|
32307
32307
|
function is_absent(error62) {
|
|
32308
32308
|
return error62 instanceof Error && "code" in error62 && error62.code === ABSENT_CODE;
|
|
32309
32309
|
}
|
|
32310
|
-
function read_optional(
|
|
32310
|
+
function read_optional(path78) {
|
|
32311
32311
|
try {
|
|
32312
|
-
return readFileSync7(
|
|
32312
|
+
return readFileSync7(path78, "utf8");
|
|
32313
32313
|
} catch (error62) {
|
|
32314
32314
|
if (is_absent(error62)) return void 0;
|
|
32315
32315
|
throw error62;
|
|
32316
32316
|
}
|
|
32317
32317
|
}
|
|
32318
|
-
function read_file_or_empty(
|
|
32319
|
-
return read_optional(
|
|
32318
|
+
function read_file_or_empty(path78) {
|
|
32319
|
+
return read_optional(path78) ?? "";
|
|
32320
32320
|
}
|
|
32321
|
-
function read_if_readable(
|
|
32321
|
+
function read_if_readable(path78) {
|
|
32322
32322
|
try {
|
|
32323
|
-
return readFileSync7(
|
|
32323
|
+
return readFileSync7(path78, "utf8");
|
|
32324
32324
|
} catch {
|
|
32325
32325
|
return void 0;
|
|
32326
32326
|
}
|
|
@@ -33024,10 +33024,10 @@ async function target() {
|
|
|
33024
33024
|
return void 0;
|
|
33025
33025
|
}
|
|
33026
33026
|
}
|
|
33027
|
-
function append(
|
|
33028
|
-
const descriptor = openSync2(
|
|
33027
|
+
function append(path78, entry) {
|
|
33028
|
+
const descriptor = openSync2(path78, APPEND_FLAGS, LEDGER_FILE_MODE);
|
|
33029
33029
|
try {
|
|
33030
|
-
if (!stamp_file.is_own_regular_file(
|
|
33030
|
+
if (!stamp_file.is_own_regular_file(path78)) {
|
|
33031
33031
|
throw new Error("Ledger is not an owned regular file");
|
|
33032
33032
|
}
|
|
33033
33033
|
writeSync(descriptor, `${JSON.stringify(entry)}${LINE_SEPARATOR}`);
|
|
@@ -33035,9 +33035,9 @@ function append(path77, entry) {
|
|
|
33035
33035
|
closeSync2(descriptor);
|
|
33036
33036
|
}
|
|
33037
33037
|
}
|
|
33038
|
-
async function record2(entry,
|
|
33038
|
+
async function record2(entry, path78) {
|
|
33039
33039
|
try {
|
|
33040
|
-
const destination =
|
|
33040
|
+
const destination = path78 ?? await target();
|
|
33041
33041
|
if (destination !== void 0) append(destination, entry);
|
|
33042
33042
|
} catch {
|
|
33043
33043
|
}
|
|
@@ -33045,84 +33045,84 @@ async function record2(entry, path77) {
|
|
|
33045
33045
|
function now_iso() {
|
|
33046
33046
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
33047
33047
|
}
|
|
33048
|
-
async function record_gate(
|
|
33049
|
-
await record2({ kind: KIND2.GATE, at: now_iso(), ...gate },
|
|
33048
|
+
async function record_gate(path78, gate) {
|
|
33049
|
+
await record2({ kind: KIND2.GATE, at: now_iso(), ...gate }, path78);
|
|
33050
33050
|
}
|
|
33051
33051
|
async function record_merge(issue3, at = /* @__PURE__ */ new Date()) {
|
|
33052
33052
|
await record2({ kind: KIND2.MERGE, at: at.toISOString(), issue: issue3 });
|
|
33053
33053
|
}
|
|
33054
|
-
async function record_dispatch(issue3,
|
|
33055
|
-
await record2({ kind: KIND2.DISPATCH, at: now_iso(), issue: issue3 },
|
|
33054
|
+
async function record_dispatch(issue3, path78) {
|
|
33055
|
+
await record2({ kind: KIND2.DISPATCH, at: now_iso(), issue: issue3 }, path78);
|
|
33056
33056
|
}
|
|
33057
|
-
async function record_stage(stage,
|
|
33058
|
-
await record2({ kind: KIND2.STAGE, at: now_iso(), ...stage },
|
|
33057
|
+
async function record_stage(stage, path78) {
|
|
33058
|
+
await record2({ kind: KIND2.STAGE, at: now_iso(), ...stage }, path78);
|
|
33059
33059
|
}
|
|
33060
|
-
async function record_stop(stop,
|
|
33061
|
-
await record2({ kind: KIND2.STOP, at: now_iso(), ...stop },
|
|
33060
|
+
async function record_stop(stop, path78) {
|
|
33061
|
+
await record2({ kind: KIND2.STOP, at: now_iso(), ...stop }, path78);
|
|
33062
33062
|
}
|
|
33063
|
-
async function record_chain(chain,
|
|
33064
|
-
await record2({ kind: KIND2.CHAIN, at: now_iso(), ...chain },
|
|
33063
|
+
async function record_chain(chain, path78) {
|
|
33064
|
+
await record2({ kind: KIND2.CHAIN, at: now_iso(), ...chain }, path78);
|
|
33065
33065
|
}
|
|
33066
|
-
async function record_overlap(overlap,
|
|
33067
|
-
await record2({ kind: KIND2.OVERLAP, at: now_iso(), ...overlap },
|
|
33066
|
+
async function record_overlap(overlap, path78) {
|
|
33067
|
+
await record2({ kind: KIND2.OVERLAP, at: now_iso(), ...overlap }, path78);
|
|
33068
33068
|
}
|
|
33069
|
-
async function record_held(held,
|
|
33069
|
+
async function record_held(held, path78) {
|
|
33070
33070
|
const waiting = held.waiting ?? [];
|
|
33071
33071
|
const named = waiting.length > 0 ? { waiting: [...waiting] } : {};
|
|
33072
|
-
await record2({ kind: KIND2.HELD, at: now_iso(), reason: held.reason, ...named },
|
|
33072
|
+
await record2({ kind: KIND2.HELD, at: now_iso(), reason: held.reason, ...named }, path78);
|
|
33073
33073
|
}
|
|
33074
|
-
async function record_released(
|
|
33075
|
-
await record2({ kind: KIND2.RELEASED, at: now_iso() },
|
|
33074
|
+
async function record_released(path78) {
|
|
33075
|
+
await record2({ kind: KIND2.RELEASED, at: now_iso() }, path78);
|
|
33076
33076
|
}
|
|
33077
|
-
async function record_lane_state(change,
|
|
33078
|
-
await record2({ kind: KIND2.LANE_STATE, at: now_iso(), ...change },
|
|
33077
|
+
async function record_lane_state(change, path78) {
|
|
33078
|
+
await record2({ kind: KIND2.LANE_STATE, at: now_iso(), ...change }, path78);
|
|
33079
33079
|
}
|
|
33080
|
-
async function record_offerable(is_offerable,
|
|
33081
|
-
await record2({ kind: KIND2.OFFERABLE, at: now_iso(), is_offerable },
|
|
33080
|
+
async function record_offerable(is_offerable, path78) {
|
|
33081
|
+
await record2({ kind: KIND2.OFFERABLE, at: now_iso(), is_offerable }, path78);
|
|
33082
33082
|
}
|
|
33083
|
-
async function record_offer(offer,
|
|
33084
|
-
await record2({ kind: KIND2.OFFER, at: now_iso(), ...offer },
|
|
33083
|
+
async function record_offer(offer, path78) {
|
|
33084
|
+
await record2({ kind: KIND2.OFFER, at: now_iso(), ...offer }, path78);
|
|
33085
33085
|
}
|
|
33086
|
-
async function record_round_one(round_one,
|
|
33087
|
-
await record2({ kind: KIND2.ROUND_ONE, at: now_iso(), ...round_one },
|
|
33086
|
+
async function record_round_one(round_one, path78) {
|
|
33087
|
+
await record2({ kind: KIND2.ROUND_ONE, at: now_iso(), ...round_one }, path78);
|
|
33088
33088
|
}
|
|
33089
|
-
async function record_round_two(round_two,
|
|
33090
|
-
await record2({ kind: KIND2.ROUND_TWO, at: now_iso(), ...round_two },
|
|
33089
|
+
async function record_round_two(round_two, path78) {
|
|
33090
|
+
await record2({ kind: KIND2.ROUND_TWO, at: now_iso(), ...round_two }, path78);
|
|
33091
33091
|
}
|
|
33092
|
-
async function record_core_wait(wait,
|
|
33093
|
-
await record2({ kind: KIND2.CORE_WAIT, at: now_iso(), ...wait },
|
|
33092
|
+
async function record_core_wait(wait, path78) {
|
|
33093
|
+
await record2({ kind: KIND2.CORE_WAIT, at: now_iso(), ...wait }, path78);
|
|
33094
33094
|
}
|
|
33095
|
-
async function record_unit_files(files2,
|
|
33096
|
-
await record2({ kind: KIND2.UNIT_FILES, at: now_iso(), files: [...files2] },
|
|
33095
|
+
async function record_unit_files(files2, path78) {
|
|
33096
|
+
await record2({ kind: KIND2.UNIT_FILES, at: now_iso(), files: [...files2] }, path78);
|
|
33097
33097
|
}
|
|
33098
|
-
async function record_test_related(run4,
|
|
33099
|
-
await record2({ kind: KIND2.TEST_RELATED, at: now_iso(), ...run4 },
|
|
33098
|
+
async function record_test_related(run4, path78) {
|
|
33099
|
+
await record2({ kind: KIND2.TEST_RELATED, at: now_iso(), ...run4 }, path78);
|
|
33100
33100
|
}
|
|
33101
|
-
async function record_test_pinned(run4,
|
|
33102
|
-
await record2({ kind: KIND2.TEST_PINNED, at: now_iso(), ...run4 },
|
|
33101
|
+
async function record_test_pinned(run4, path78) {
|
|
33102
|
+
await record2({ kind: KIND2.TEST_PINNED, at: now_iso(), ...run4 }, path78);
|
|
33103
33103
|
}
|
|
33104
|
-
async function record_split_notice(notice3,
|
|
33105
|
-
await record2({ kind: KIND2.SPLIT_NOTICE, at: now_iso(), ...notice3 },
|
|
33104
|
+
async function record_split_notice(notice3, path78) {
|
|
33105
|
+
await record2({ kind: KIND2.SPLIT_NOTICE, at: now_iso(), ...notice3 }, path78);
|
|
33106
33106
|
}
|
|
33107
|
-
async function record_split_filed(filed,
|
|
33108
|
-
const destination =
|
|
33107
|
+
async function record_split_filed(filed, path78) {
|
|
33108
|
+
const destination = path78 ?? await target();
|
|
33109
33109
|
if (destination === void 0) throw new Error("Could not resolve the split-child ledger");
|
|
33110
33110
|
append(destination, { kind: KIND2.SPLIT_FILED, at: now_iso(), ...filed });
|
|
33111
33111
|
}
|
|
33112
|
-
async function record_push_miss(miss,
|
|
33113
|
-
await record2({ kind: KIND2.PUSH_MISS, at: now_iso(), ...miss },
|
|
33112
|
+
async function record_push_miss(miss, path78) {
|
|
33113
|
+
await record2({ kind: KIND2.PUSH_MISS, at: now_iso(), ...miss }, path78);
|
|
33114
33114
|
}
|
|
33115
|
-
async function record_early_push(push4,
|
|
33116
|
-
await record2({ kind: KIND2.EARLY_PUSH, at: now_iso(), ...push4 },
|
|
33115
|
+
async function record_early_push(push4, path78) {
|
|
33116
|
+
await record2({ kind: KIND2.EARLY_PUSH, at: now_iso(), ...push4 }, path78);
|
|
33117
33117
|
}
|
|
33118
|
-
async function record_ship_lap(lap2,
|
|
33119
|
-
await record2({ kind: KIND2.SHIP_LAP, at: now_iso(), ...lap2 },
|
|
33118
|
+
async function record_ship_lap(lap2, path78) {
|
|
33119
|
+
await record2({ kind: KIND2.SHIP_LAP, at: now_iso(), ...lap2 }, path78);
|
|
33120
33120
|
}
|
|
33121
|
-
async function record_size(size,
|
|
33122
|
-
await record2({ kind: KIND2.SIZE, at: now_iso(), ...size },
|
|
33121
|
+
async function record_size(size, path78) {
|
|
33122
|
+
await record2({ kind: KIND2.SIZE, at: now_iso(), ...size }, path78);
|
|
33123
33123
|
}
|
|
33124
|
-
async function record_unplanned_notice(notice3,
|
|
33125
|
-
await record2({ kind: KIND2.UNPLANNED_NOTICE, at: now_iso(), ...notice3 },
|
|
33124
|
+
async function record_unplanned_notice(notice3, path78) {
|
|
33125
|
+
await record2({ kind: KIND2.UNPLANNED_NOTICE, at: now_iso(), ...notice3 }, path78);
|
|
33126
33126
|
}
|
|
33127
33127
|
var lane_ledger_write = {
|
|
33128
33128
|
CI_WAIT_STAGE,
|
|
@@ -33306,9 +33306,9 @@ async function keep_full_output(issue3, output2) {
|
|
|
33306
33306
|
}
|
|
33307
33307
|
}
|
|
33308
33308
|
async function omitted_range(issue3, lines) {
|
|
33309
|
-
const
|
|
33309
|
+
const path78 = await keep_full_output(issue3, lines.join(LINE_BREAK));
|
|
33310
33310
|
const last_line = lines.length - EXCERPT_LINE_LIMIT;
|
|
33311
|
-
return
|
|
33311
|
+
return path78 === void 0 ? { last_line } : { path: path78, last_line };
|
|
33312
33312
|
}
|
|
33313
33313
|
function clipped(lines) {
|
|
33314
33314
|
return lines.map((line2) => line2.slice(0, EXCERPT_LINE_WIDTH));
|
|
@@ -33756,11 +33756,11 @@ function read_trimmed(environment3, key3) {
|
|
|
33756
33756
|
return raw === void 0 ? "" : raw.trim();
|
|
33757
33757
|
}
|
|
33758
33758
|
function resolve_bounded(environment3, key3, max) {
|
|
33759
|
-
const
|
|
33760
|
-
if (
|
|
33761
|
-
if (!INTEGER_PATTERN.test(
|
|
33762
|
-
const value2 = Number(
|
|
33763
|
-
if (value2 > max) fail_invalid(key3,
|
|
33759
|
+
const trimmed5 = read_trimmed(environment3, key3);
|
|
33760
|
+
if (trimmed5.length === 0) return MIN_SEED;
|
|
33761
|
+
if (!INTEGER_PATTERN.test(trimmed5)) fail_invalid(key3, trimmed5, max);
|
|
33762
|
+
const value2 = Number(trimmed5);
|
|
33763
|
+
if (value2 > max) fail_invalid(key3, trimmed5, max);
|
|
33764
33764
|
return value2;
|
|
33765
33765
|
}
|
|
33766
33766
|
function resolve_seed(environment3 = process.env) {
|
|
@@ -33956,10 +33956,10 @@ function record_refusal(target3, now_ms) {
|
|
|
33956
33956
|
}
|
|
33957
33957
|
}
|
|
33958
33958
|
function create_refusal_stamp(prefix2) {
|
|
33959
|
-
function
|
|
33959
|
+
function path78(transcript_path) {
|
|
33960
33960
|
return stamp_file.stamp_path(prefix2, transcript_path);
|
|
33961
33961
|
}
|
|
33962
|
-
return { path:
|
|
33962
|
+
return { path: path78, last_ms: last_refusal_ms, record: record_refusal };
|
|
33963
33963
|
}
|
|
33964
33964
|
var { load_environment_file: load_environment_file3 } = josh_environment_file;
|
|
33965
33965
|
var NO_OUTCOME = { reason: void 0, notice: void 0, fault: void 0 };
|
|
@@ -34029,10 +34029,10 @@ function create_transcript_guard(spec) {
|
|
|
34029
34029
|
return { reason: void 0, notice: void 0, fault: fault_notice(spec.switch_key, error62) };
|
|
34030
34030
|
}
|
|
34031
34031
|
}
|
|
34032
|
-
function
|
|
34032
|
+
function refusal6(...call) {
|
|
34033
34033
|
return outcome(...call).reason;
|
|
34034
34034
|
}
|
|
34035
|
-
return { is_enabled: is_enabled6, outcome, refusal:
|
|
34035
|
+
return { is_enabled: is_enabled6, outcome, refusal: refusal6, refusal_path: stamp2.path };
|
|
34036
34036
|
}
|
|
34037
34037
|
function emit_outcome(outcome) {
|
|
34038
34038
|
const { reason: reason4, notice: notice3, fault } = outcome;
|
|
@@ -34710,9 +34710,9 @@ var KEY_CONTEXT = "context";
|
|
|
34710
34710
|
var KEY_DESCRIPTION = "description";
|
|
34711
34711
|
function read_string(value2) {
|
|
34712
34712
|
if (typeof value2 !== "string") return void 0;
|
|
34713
|
-
const
|
|
34714
|
-
if (
|
|
34715
|
-
return
|
|
34713
|
+
const trimmed5 = value2.trim();
|
|
34714
|
+
if (trimmed5.length === 0) return void 0;
|
|
34715
|
+
return trimmed5;
|
|
34716
34716
|
}
|
|
34717
34717
|
var PENDING_STATUS_STATES = /* @__PURE__ */ new Set(["pending", "expected"]);
|
|
34718
34718
|
function parse_status_context(item) {
|
|
@@ -35054,37 +35054,37 @@ var time_format = {
|
|
|
35054
35054
|
function new_path() {
|
|
35055
35055
|
return { pending: /* @__PURE__ */ new Set(), settled: /* @__PURE__ */ new Set(), check_ms: {} };
|
|
35056
35056
|
}
|
|
35057
|
-
function settle2(
|
|
35058
|
-
if (
|
|
35059
|
-
|
|
35057
|
+
function settle2(path78, name, elapsed_ms) {
|
|
35058
|
+
if (path78.pending.delete(name)) path78.check_ms[name] = elapsed_ms;
|
|
35059
|
+
path78.settled.add(name);
|
|
35060
35060
|
}
|
|
35061
|
-
function hold(
|
|
35062
|
-
if (
|
|
35063
|
-
|
|
35061
|
+
function hold(path78, name) {
|
|
35062
|
+
if (path78.settled.has(name)) path78.has_rerun = true;
|
|
35063
|
+
path78.pending.add(name);
|
|
35064
35064
|
}
|
|
35065
|
-
function observe(
|
|
35066
|
-
|
|
35067
|
-
const elapsed_ms = now_ms -
|
|
35065
|
+
function observe(path78, snapshot4, now_ms) {
|
|
35066
|
+
path78.start_ms ??= now_ms;
|
|
35067
|
+
const elapsed_ms = now_ms - path78.start_ms;
|
|
35068
35068
|
const checks = snapshot4.rollup.filter((check6) => !is_coderabbit_check(check6.name));
|
|
35069
35069
|
const pending = new Set(
|
|
35070
35070
|
checks.filter((check6) => check6.status === CHECK_STATUS_PENDING).map((check6) => check6.name)
|
|
35071
35071
|
);
|
|
35072
|
-
for (const name of pending) hold(
|
|
35073
|
-
for (const check6 of checks) if (!pending.has(check6.name)) settle2(
|
|
35072
|
+
for (const name of pending) hold(path78, name);
|
|
35073
|
+
for (const check6 of checks) if (!pending.has(check6.name)) settle2(path78, check6.name, elapsed_ms);
|
|
35074
35074
|
}
|
|
35075
|
-
function observer_of(
|
|
35076
|
-
const is_first_wait =
|
|
35075
|
+
function observer_of(path78) {
|
|
35076
|
+
const is_first_wait = path78.start_ms === void 0;
|
|
35077
35077
|
return async function time_checks(snapshot4) {
|
|
35078
|
-
if (is_first_wait) observe(
|
|
35078
|
+
if (is_first_wait) observe(path78, snapshot4, performance.now());
|
|
35079
35079
|
};
|
|
35080
35080
|
}
|
|
35081
|
-
function record_of(
|
|
35082
|
-
const [last] = Object.entries(
|
|
35081
|
+
function record_of(path78) {
|
|
35082
|
+
const [last] = Object.entries(path78.check_ms).toSorted((left, right) => right[1] - left[1]);
|
|
35083
35083
|
if (last === void 0) return {};
|
|
35084
35084
|
return {
|
|
35085
35085
|
last_check: last[0],
|
|
35086
|
-
check_ms: { ...
|
|
35087
|
-
...
|
|
35086
|
+
check_ms: { ...path78.check_ms },
|
|
35087
|
+
...path78.has_rerun && { has_rerun: path78.has_rerun }
|
|
35088
35088
|
};
|
|
35089
35089
|
}
|
|
35090
35090
|
var followup_ci_path = { new_path, observe, observer_of, record_of };
|
|
@@ -35754,9 +35754,9 @@ function parse_url_like(url2) {
|
|
|
35754
35754
|
}
|
|
35755
35755
|
}
|
|
35756
35756
|
function parse_origin_url(url2) {
|
|
35757
|
-
const
|
|
35758
|
-
if (
|
|
35759
|
-
return parse_url_like(
|
|
35757
|
+
const trimmed5 = url2.trim();
|
|
35758
|
+
if (trimmed5 === "") return void 0;
|
|
35759
|
+
return parse_url_like(trimmed5) ?? parse_scp_like(trimmed5);
|
|
35760
35760
|
}
|
|
35761
35761
|
function is_section_header(line2) {
|
|
35762
35762
|
return line2.startsWith(SECTION_PREFIX);
|
|
@@ -35972,12 +35972,22 @@ function line_references(line2) {
|
|
|
35972
35972
|
function collect_line_references(line2, found) {
|
|
35973
35973
|
for (const reference2 of line_references(line2)) found.push(`${reference2.prefix}${reference2.text}`);
|
|
35974
35974
|
}
|
|
35975
|
+
function closes_fence(line2, marker, fence) {
|
|
35976
|
+
return marker.startsWith(fence) && line2.trim() === marker;
|
|
35977
|
+
}
|
|
35978
|
+
function fence_after(line2, fence) {
|
|
35979
|
+
const match = FENCE_MARKER.exec(line2);
|
|
35980
|
+
if (match === null) return fence;
|
|
35981
|
+
const marker = match[0].trimStart();
|
|
35982
|
+
if (fence === "") return marker;
|
|
35983
|
+
return closes_fence(line2, marker, fence) ? "" : fence;
|
|
35984
|
+
}
|
|
35975
35985
|
function lines_outside_fences(message) {
|
|
35976
35986
|
const lines = [];
|
|
35977
|
-
let
|
|
35987
|
+
let fence = "";
|
|
35978
35988
|
for (const line2 of message.split("\n")) {
|
|
35979
|
-
|
|
35980
|
-
|
|
35989
|
+
fence = fence_after(line2, fence);
|
|
35990
|
+
if (fence === "" && !FENCE_MARKER.test(line2)) lines.push(line2);
|
|
35981
35991
|
}
|
|
35982
35992
|
return lines;
|
|
35983
35993
|
}
|
|
@@ -36013,10 +36023,10 @@ function rewrite_line(line2, slug, is_in_fence) {
|
|
|
36013
36023
|
}
|
|
36014
36024
|
function linkify(message, slug) {
|
|
36015
36025
|
const out = [];
|
|
36016
|
-
let
|
|
36026
|
+
let fence = "";
|
|
36017
36027
|
for (const line2 of message.split("\n")) {
|
|
36018
|
-
|
|
36019
|
-
out.push(rewrite_line(line2, slug,
|
|
36028
|
+
fence = fence_after(line2, fence);
|
|
36029
|
+
out.push(rewrite_line(line2, slug, fence !== ""));
|
|
36020
36030
|
}
|
|
36021
36031
|
return out.join("\n");
|
|
36022
36032
|
}
|
|
@@ -36765,9 +36775,9 @@ var SECONDS_SUFFIX = " s";
|
|
|
36765
36775
|
var DIGIT_OR_POINT = /[\d.]/u;
|
|
36766
36776
|
var NO_STAGES = [];
|
|
36767
36777
|
function stage_body(line2) {
|
|
36768
|
-
const
|
|
36769
|
-
if (!
|
|
36770
|
-
return
|
|
36778
|
+
const trimmed5 = line2.trimStart();
|
|
36779
|
+
if (!trimmed5.startsWith(git_followup_stages.STAGE_LINE_PREFIX)) return void 0;
|
|
36780
|
+
return trimmed5.slice(git_followup_stages.STAGE_LINE_PREFIX.length);
|
|
36771
36781
|
}
|
|
36772
36782
|
function digits_start(head) {
|
|
36773
36783
|
let index = head.length;
|
|
@@ -36930,14 +36940,14 @@ function format_gate_failed(failed_labels, total) {
|
|
|
36930
36940
|
var GATE_OPENING_PREFIX = "plan: ";
|
|
36931
36941
|
var GATE_OPENING_MARK = " checks at once";
|
|
36932
36942
|
function is_gate_opening(line2) {
|
|
36933
|
-
const
|
|
36934
|
-
return
|
|
36943
|
+
const trimmed5 = line2.trimStart();
|
|
36944
|
+
return trimmed5.startsWith(GATE_OPENING_PREFIX) && trimmed5.includes(GATE_OPENING_MARK);
|
|
36935
36945
|
}
|
|
36936
36946
|
function read_verdict(line2) {
|
|
36937
|
-
const
|
|
36938
|
-
if (
|
|
36939
|
-
if (
|
|
36940
|
-
if (
|
|
36947
|
+
const trimmed5 = line2.trimStart();
|
|
36948
|
+
if (trimmed5.startsWith(GATE_FAILED_PREFIX)) return FAILED_VERDICT;
|
|
36949
|
+
if (trimmed5.startsWith(GATE_PASSED_PREFIX)) return PASSED_VERDICT;
|
|
36950
|
+
if (trimmed5.startsWith(GATE_UNVERIFIED_PREFIX)) return UNVERIFIED_VERDICT;
|
|
36941
36951
|
return void 0;
|
|
36942
36952
|
}
|
|
36943
36953
|
var josh_verdict = {
|
|
@@ -37513,9 +37523,9 @@ function refusal_body(text3) {
|
|
|
37513
37523
|
return text3.trimStart().replace(HOOK_ERROR_LABEL, "");
|
|
37514
37524
|
}
|
|
37515
37525
|
function guard_from_refusal(text3) {
|
|
37516
|
-
const
|
|
37517
|
-
if (!
|
|
37518
|
-
const headline =
|
|
37526
|
+
const trimmed5 = refusal_body(text3);
|
|
37527
|
+
if (!trimmed5.startsWith(REFUSAL_MARKER)) return "";
|
|
37528
|
+
const headline = trimmed5.slice(REFUSAL_MARKER.length).split("\n", 1)[0]?.trimStart() ?? "";
|
|
37519
37529
|
const colon = headline.indexOf(":");
|
|
37520
37530
|
return (colon === -1 ? headline : headline.slice(0, colon)).trim();
|
|
37521
37531
|
}
|
|
@@ -38430,7 +38440,7 @@ function describe_span(span) {
|
|
|
38430
38440
|
}
|
|
38431
38441
|
var FOLD_MINIMUM = 2;
|
|
38432
38442
|
function read_targets(sequence) {
|
|
38433
|
-
const paths2 = sequence.filter((span) => span.is_bundleable && !span.is_writing).map((span) => span.targets[0] ?? "").filter((
|
|
38443
|
+
const paths2 = sequence.filter((span) => span.is_bundleable && !span.is_writing).map((span) => span.targets[0] ?? "").filter((path78) => path78 !== "" && time_bundle_call.has_extension(path78));
|
|
38434
38444
|
return [...new Set(paths2)];
|
|
38435
38445
|
}
|
|
38436
38446
|
function read_fold_directive(sequence) {
|
|
@@ -38439,7 +38449,7 @@ function read_fold_directive(sequence) {
|
|
|
38439
38449
|
return ` Fold them into one call: \`pnpm josh read:files ${paths2.join(" ")}\`.`;
|
|
38440
38450
|
}
|
|
38441
38451
|
function write_targets(sequence) {
|
|
38442
|
-
const paths2 = sequence.filter((span) => span.label === EDIT_TOOL).map((span) => span.targets[0] ?? "").filter((
|
|
38452
|
+
const paths2 = sequence.filter((span) => span.label === EDIT_TOOL).map((span) => span.targets[0] ?? "").filter((path78) => path78 !== "" && time_bundle_call.has_extension(path78));
|
|
38443
38453
|
return [...new Set(paths2)];
|
|
38444
38454
|
}
|
|
38445
38455
|
function write_fold_directive(sequence) {
|
|
@@ -39533,9 +39543,9 @@ function file_path(flag, value2) {
|
|
|
39533
39543
|
}
|
|
39534
39544
|
function field_source(flag, raw) {
|
|
39535
39545
|
const value2 = raw.replaceAll(QUOTES, "");
|
|
39536
|
-
const
|
|
39537
|
-
if (
|
|
39538
|
-
return
|
|
39546
|
+
const path78 = file_path(flag, value2);
|
|
39547
|
+
if (path78 === void 0) return { kind: "text", value: field_value(value2) };
|
|
39548
|
+
return path78 === STANDARD_INPUT ? void 0 : { kind: "file", value: path78 };
|
|
39539
39549
|
}
|
|
39540
39550
|
function field_sources(segment) {
|
|
39541
39551
|
return flags_of(segment).flatMap(([flag, next]) => {
|
|
@@ -39590,16 +39600,16 @@ function placeholder_of(segment, previous = "") {
|
|
|
39590
39600
|
if (NUMBER.test(segment)) return "{n}";
|
|
39591
39601
|
return SHA.test(segment) ? "{sha}" : segment;
|
|
39592
39602
|
}
|
|
39593
|
-
function normalized(
|
|
39594
|
-
const [bare = ""] =
|
|
39603
|
+
function normalized(path78) {
|
|
39604
|
+
const [bare = ""] = path78.replace(/^\//u, "").split("?", 1);
|
|
39595
39605
|
const segments = bare.split("/");
|
|
39596
39606
|
const is_repo = segments[0] === OWNER_REPO2[0];
|
|
39597
39607
|
return segments.map(
|
|
39598
39608
|
(segment, index) => is_repo && index < OWNER_REPO2.length ? OWNER_REPO2[index] : placeholder_of(segment, segments[index - 1])
|
|
39599
39609
|
).join("/");
|
|
39600
39610
|
}
|
|
39601
|
-
function of_api(
|
|
39602
|
-
const bare = normalized(
|
|
39611
|
+
function of_api(path78, method = DEFAULT_METHOD) {
|
|
39612
|
+
const bare = normalized(path78);
|
|
39603
39613
|
return bare === GRAPHQL ? GRAPHQL : `${method.toUpperCase()} ${bare}`;
|
|
39604
39614
|
}
|
|
39605
39615
|
function path_of(arguments_) {
|
|
@@ -40038,25 +40048,25 @@ function parse_status_line(output2) {
|
|
|
40038
40048
|
function status_of_failure(error62) {
|
|
40039
40049
|
return has_stdout_field(error62) ? parse_status_line(error62.stdout) : void 0;
|
|
40040
40050
|
}
|
|
40041
|
-
async function spawn_gh_api_status(
|
|
40051
|
+
async function spawn_gh_api_status(path78, timeout_ms) {
|
|
40042
40052
|
const options = to_spawn_options(timeout_ms);
|
|
40043
40053
|
try {
|
|
40044
40054
|
await check_gh_installed();
|
|
40045
|
-
gh_request_tally.count_call(gh_call_kind.of_api(
|
|
40046
|
-
const { stdout } = await execa("gh", ["api", "--include", "--silent",
|
|
40055
|
+
gh_request_tally.count_call(gh_call_kind.of_api(path78));
|
|
40056
|
+
const { stdout } = await execa("gh", ["api", "--include", "--silent", path78], options);
|
|
40047
40057
|
return parse_status_line(stdout);
|
|
40048
40058
|
} catch (error62) {
|
|
40049
40059
|
return status_of_failure(error62);
|
|
40050
40060
|
}
|
|
40051
40061
|
}
|
|
40052
|
-
async function exec_gh_api_status(
|
|
40053
|
-
return await gh_slots.run(async () => await spawn_gh_api_status(
|
|
40062
|
+
async function exec_gh_api_status(path78, timeout_ms) {
|
|
40063
|
+
return await gh_slots.run(async () => await spawn_gh_api_status(path78, timeout_ms));
|
|
40054
40064
|
}
|
|
40055
|
-
function exec_gh_api_status_sync(
|
|
40065
|
+
function exec_gh_api_status_sync(path78, timeout_ms) {
|
|
40056
40066
|
const options = to_spawn_options(timeout_ms);
|
|
40057
|
-
gh_request_tally.count_call(gh_call_kind.of_api(
|
|
40067
|
+
gh_request_tally.count_call(gh_call_kind.of_api(path78));
|
|
40058
40068
|
try {
|
|
40059
|
-
const { stdout } = execaSync("gh", ["api", "--include", "--silent",
|
|
40069
|
+
const { stdout } = execaSync("gh", ["api", "--include", "--silent", path78], options);
|
|
40060
40070
|
return parse_status_line(stdout);
|
|
40061
40071
|
} catch (error62) {
|
|
40062
40072
|
return status_of_failure(error62);
|
|
@@ -40161,9 +40171,9 @@ var HEADER_BODY_SEPARATOR = /\r?\n\r?\n/u;
|
|
|
40161
40171
|
var ETAG_HEADER = /^etag: *(?<etag>[^\r\n]+)/imu;
|
|
40162
40172
|
var UNCHANGED = { kind: "unchanged" };
|
|
40163
40173
|
var UNREADABLE = { kind: "unreadable" };
|
|
40164
|
-
function to_args(
|
|
40174
|
+
function to_args(path78, etag) {
|
|
40165
40175
|
const header = etag === void 0 ? [] : [HEADER_FLAG, `${IF_NONE_MATCH}${etag}`];
|
|
40166
|
-
return ["api", INCLUDE_FLAG, ...header,
|
|
40176
|
+
return ["api", INCLUDE_FLAG, ...header, path78];
|
|
40167
40177
|
}
|
|
40168
40178
|
function to_changed(output2) {
|
|
40169
40179
|
const [headers = "", ...rest] = output2.split(HEADER_BODY_SEPARATOR);
|
|
@@ -40177,27 +40187,27 @@ function failure_status(error62) {
|
|
|
40177
40187
|
const cause = error62 instanceof Error ? error62.cause : void 0;
|
|
40178
40188
|
return has_stdout_field(cause) ? git_gh_exec.parse_status_line(cause.stdout) : void 0;
|
|
40179
40189
|
}
|
|
40180
|
-
function not_modified(
|
|
40181
|
-
gh_request_tally.count_not_modified(gh_call_kind.of_api(
|
|
40190
|
+
function not_modified(path78) {
|
|
40191
|
+
gh_request_tally.count_not_modified(gh_call_kind.of_api(path78));
|
|
40182
40192
|
return UNCHANGED;
|
|
40183
40193
|
}
|
|
40184
|
-
function rethrow_failure(error62,
|
|
40194
|
+
function rethrow_failure(error62, path78) {
|
|
40185
40195
|
const status2 = failure_status(error62);
|
|
40186
|
-
if (status2 === NOT_MODIFIED_STATUS) return not_modified(
|
|
40196
|
+
if (status2 === NOT_MODIFIED_STATUS) return not_modified(path78);
|
|
40187
40197
|
if (status2 !== void 0 && error62 instanceof Error) gh_failure.attach(error62, { status: status2 });
|
|
40188
40198
|
throw error62;
|
|
40189
40199
|
}
|
|
40190
|
-
async function request_conditional(
|
|
40200
|
+
async function request_conditional(path78, etag, timeout_ms) {
|
|
40191
40201
|
try {
|
|
40192
|
-
return to_read(await git_gh_exec.exec_gh_command(to_args(
|
|
40202
|
+
return to_read(await git_gh_exec.exec_gh_command(to_args(path78, etag), timeout_ms));
|
|
40193
40203
|
} catch (error62) {
|
|
40194
|
-
return rethrow_failure(error62,
|
|
40204
|
+
return rethrow_failure(error62, path78);
|
|
40195
40205
|
}
|
|
40196
40206
|
}
|
|
40197
|
-
async function read_conditional(
|
|
40207
|
+
async function read_conditional(path78, etag, timeout_ms) {
|
|
40198
40208
|
const retry = timeout_ms === void 0 ? gh_retry.with_read_retry : gh_retry.with_retry;
|
|
40199
40209
|
try {
|
|
40200
|
-
return await retry(async () => await request_conditional(
|
|
40210
|
+
return await retry(async () => await request_conditional(path78, etag, timeout_ms));
|
|
40201
40211
|
} catch (error62) {
|
|
40202
40212
|
return { kind: "unreadable", cause: error62 };
|
|
40203
40213
|
}
|
|
@@ -40217,32 +40227,32 @@ function settle3(previous, answer2) {
|
|
|
40217
40227
|
if (answer2.etag === void 0) return { body: answer2.body };
|
|
40218
40228
|
return { body: answer2.body, kept: { etag: answer2.etag, body: answer2.body } };
|
|
40219
40229
|
}
|
|
40220
|
-
function slot_of(
|
|
40221
|
-
const name = stamp_file.digest(
|
|
40230
|
+
function slot_of(path78) {
|
|
40231
|
+
const name = stamp_file.digest(path78).slice(0, PATH_DIGEST_LENGTH);
|
|
40222
40232
|
return { prefix: `${SLOT_PREFIX}${name}-`, ttl_ms: HOURS_KEPT * MS_PER_HOUR };
|
|
40223
40233
|
}
|
|
40224
|
-
function unreadable(
|
|
40234
|
+
function unreadable(path78, answer2) {
|
|
40225
40235
|
const cause = answer2.kind === "unreadable" ? answer2.cause : void 0;
|
|
40226
|
-
return cause ?? new Error(`${UNREADABLE_MESSAGE}: ${
|
|
40236
|
+
return cause ?? new Error(`${UNREADABLE_MESSAGE}: ${path78}`);
|
|
40227
40237
|
}
|
|
40228
|
-
async function read_detail(
|
|
40229
|
-
const slot = slot_of(
|
|
40230
|
-
const previous = shared_cache.read(slot,
|
|
40231
|
-
const answer2 = await git_gh_conditional.read_conditional(
|
|
40238
|
+
async function read_detail(path78, timeout_ms) {
|
|
40239
|
+
const slot = slot_of(path78);
|
|
40240
|
+
const previous = shared_cache.read(slot, path78, kept_schema, Date.now());
|
|
40241
|
+
const answer2 = await git_gh_conditional.read_conditional(path78, previous?.etag, timeout_ms);
|
|
40232
40242
|
const settled2 = settle3(previous, answer2);
|
|
40233
|
-
if (settled2 === void 0) throw unreadable(
|
|
40234
|
-
if (settled2.kept !== void 0) shared_cache.write(slot,
|
|
40243
|
+
if (settled2 === void 0) throw unreadable(path78, answer2);
|
|
40244
|
+
if (settled2.kept !== void 0) shared_cache.write(slot, path78, settled2.kept, Date.now());
|
|
40235
40245
|
return { body: settled2.body, is_unchanged: answer2.kind === "unchanged" };
|
|
40236
40246
|
}
|
|
40237
|
-
async function read6(
|
|
40238
|
-
const { body } = await read_detail(
|
|
40247
|
+
async function read6(path78, timeout_ms) {
|
|
40248
|
+
const { body } = await read_detail(path78, timeout_ms);
|
|
40239
40249
|
return body;
|
|
40240
40250
|
}
|
|
40241
|
-
async function read_listing(
|
|
40242
|
-
const first = await read_page(
|
|
40251
|
+
async function read_listing(path78, per_page, read_page = read6) {
|
|
40252
|
+
const first = await read_page(path78);
|
|
40243
40253
|
const rows = parse_json_array_or_undefined(first, external_exports.unknown());
|
|
40244
40254
|
if (rows === void 0 || rows.length < per_page) return first;
|
|
40245
|
-
return await git_gh_exec.exec_gh_api({ path:
|
|
40255
|
+
return await git_gh_exec.exec_gh_api({ path: path78, should_paginate: true });
|
|
40246
40256
|
}
|
|
40247
40257
|
var git_gh_etag_read = { read: read6, read_detail, read_listing, settle: settle3, slot_of };
|
|
40248
40258
|
|
|
@@ -40268,8 +40278,8 @@ function has_write_role(raw) {
|
|
|
40268
40278
|
}
|
|
40269
40279
|
async function read_permission(asked) {
|
|
40270
40280
|
try {
|
|
40271
|
-
const
|
|
40272
|
-
const raw = await git_gh_etag_read.read(
|
|
40281
|
+
const path78 = permission_path(asked.login, asked.repo);
|
|
40282
|
+
const raw = await git_gh_etag_read.read(path78, asked.timeout_ms);
|
|
40273
40283
|
return has_write_role(raw);
|
|
40274
40284
|
} catch {
|
|
40275
40285
|
return void 0;
|
|
@@ -40319,8 +40329,8 @@ var gh_author_association = {
|
|
|
40319
40329
|
|
|
40320
40330
|
// scripts/gh/git-gh-helpers.ts
|
|
40321
40331
|
function parse_pr_state_string(result) {
|
|
40322
|
-
const
|
|
40323
|
-
return
|
|
40332
|
+
const trimmed5 = result.trim();
|
|
40333
|
+
return trimmed5.length > 0 ? trimmed5 : void 0;
|
|
40324
40334
|
}
|
|
40325
40335
|
function is_pr_already_exists_message(error_message) {
|
|
40326
40336
|
return error_message.toLowerCase().includes("already exists");
|
|
@@ -40739,18 +40749,18 @@ var git_gh_issue_graphql = {
|
|
|
40739
40749
|
// scripts/gh/git-gh-issue-memo.ts
|
|
40740
40750
|
var FRESH_MS = 1e4;
|
|
40741
40751
|
var read_by_path = /* @__PURE__ */ new Map();
|
|
40742
|
-
function fresh_entry(
|
|
40743
|
-
const entry = read_by_path.get(
|
|
40752
|
+
function fresh_entry(path78, now_ms) {
|
|
40753
|
+
const entry = read_by_path.get(path78);
|
|
40744
40754
|
return entry !== void 0 && now_ms - entry.at_ms < FRESH_MS ? entry : void 0;
|
|
40745
40755
|
}
|
|
40746
|
-
async function read7(
|
|
40756
|
+
async function read7(path78) {
|
|
40747
40757
|
const now_ms = Date.now();
|
|
40748
|
-
const entry = fresh_entry(
|
|
40749
|
-
read_by_path.set(
|
|
40758
|
+
const entry = fresh_entry(path78, now_ms) ?? { read: git_gh_etag_read.read(path78), at_ms: now_ms };
|
|
40759
|
+
read_by_path.set(path78, entry);
|
|
40750
40760
|
try {
|
|
40751
40761
|
return await entry.read;
|
|
40752
40762
|
} catch (error62) {
|
|
40753
|
-
if (read_by_path.get(
|
|
40763
|
+
if (read_by_path.get(path78) === entry) read_by_path.delete(path78);
|
|
40754
40764
|
throw error62;
|
|
40755
40765
|
}
|
|
40756
40766
|
}
|
|
@@ -40990,9 +41000,9 @@ async function issue_get_labels_and_body(issue_number) {
|
|
|
40990
41000
|
return await issue_view_json(issue_number, "number,state,labels,body");
|
|
40991
41001
|
}
|
|
40992
41002
|
async function issue_list_comments(issue_number, timeout_ms, repo, read_path) {
|
|
40993
|
-
const
|
|
41003
|
+
const path78 = `${git_gh_api_path.issue_comments_api_path(issue_number, repo)}${git_gh_api_path.FULL_PAGE_QUERY}`;
|
|
40994
41004
|
try {
|
|
40995
|
-
return await (read_path?.(
|
|
41005
|
+
return await (read_path?.(path78) ?? git_gh_exec.exec_gh_api({ path: path78, should_paginate: true, timeout_ms }));
|
|
40996
41006
|
} catch {
|
|
40997
41007
|
return void 0;
|
|
40998
41008
|
}
|
|
@@ -41013,8 +41023,8 @@ async function issue_read_with_comments(issue_number, fields, repo) {
|
|
|
41013
41023
|
comments_json: graphql.comments_json
|
|
41014
41024
|
};
|
|
41015
41025
|
}
|
|
41016
|
-
async function read_comments_conditionally(
|
|
41017
|
-
return await git_gh_etag_read.read_listing(
|
|
41026
|
+
async function read_comments_conditionally(path78) {
|
|
41027
|
+
return await git_gh_etag_read.read_listing(path78, git_gh_api_path.FULL_PAGE_SIZE);
|
|
41018
41028
|
}
|
|
41019
41029
|
async function has_no_relations_endpoint(issue_number, repo) {
|
|
41020
41030
|
const status2 = await git_gh_exec.exec_gh_api_status(
|
|
@@ -41166,6 +41176,7 @@ var issue_watch_diff = {
|
|
|
41166
41176
|
RUN_MARKER,
|
|
41167
41177
|
WITHHELD_BODY_EDIT,
|
|
41168
41178
|
baseline_of,
|
|
41179
|
+
is_automated,
|
|
41169
41180
|
landed_times,
|
|
41170
41181
|
parse_comments,
|
|
41171
41182
|
unread_diff,
|
|
@@ -41561,8 +41572,8 @@ async function review_refusal_here() {
|
|
|
41561
41572
|
return await review_refusal(await git_command.repository_root());
|
|
41562
41573
|
}
|
|
41563
41574
|
async function assert_read_here() {
|
|
41564
|
-
const
|
|
41565
|
-
if (
|
|
41575
|
+
const refusal6 = await unread_refusal(await git_command.repository_root());
|
|
41576
|
+
if (refusal6 !== void 0) throw new Error(refusal6);
|
|
41566
41577
|
}
|
|
41567
41578
|
var issue_watch_gate = {
|
|
41568
41579
|
assert_read_here,
|
|
@@ -41799,40 +41810,134 @@ function shell_script_index(call) {
|
|
|
41799
41810
|
}
|
|
41800
41811
|
var interpreter_options = { SHELLS, is_inline_execution, shell_script_index, syntax_word };
|
|
41801
41812
|
|
|
41813
|
+
// scripts/rules/shell-tokens.ts
|
|
41814
|
+
var OPERATOR = String.raw`;;&?|;&|&&|\|\||(?<!>)\|&?|;|\n|(?<![<>])&(?!>)`;
|
|
41815
|
+
var WORD2 = String.raw`(?:[^\s;&|]|(?<=[<>])&|&(?=>)|(?<=>)\|)+`;
|
|
41816
|
+
var TOKEN_PATTERN = new RegExp(`(?<operator>${OPERATOR})|${WORD2}`, "gu");
|
|
41817
|
+
var SEPARATOR2 = /[;&|]/gu;
|
|
41818
|
+
var HELD = "_";
|
|
41819
|
+
var BLANK = " ";
|
|
41820
|
+
function tokens_of2(reading) {
|
|
41821
|
+
return [...reading.matchAll(TOKEN_PATTERN)].map((match) => ({
|
|
41822
|
+
begin: match.index,
|
|
41823
|
+
end: match.index + match[0].length,
|
|
41824
|
+
kind: match.groups?.["operator"] === void 0 ? "word" : "operator",
|
|
41825
|
+
text: match[0]
|
|
41826
|
+
}));
|
|
41827
|
+
}
|
|
41828
|
+
function quote_held(line2) {
|
|
41829
|
+
const plain2 = time_shell.blanked(line2);
|
|
41830
|
+
if (plain2 === void 0) return line2;
|
|
41831
|
+
return line2.replaceAll(
|
|
41832
|
+
SEPARATOR2,
|
|
41833
|
+
(character, offset) => plain2[offset] === BLANK ? HELD : character
|
|
41834
|
+
);
|
|
41835
|
+
}
|
|
41836
|
+
function words_of4(line2) {
|
|
41837
|
+
return tokens_of2(quote_held(line2)).filter((token) => token.kind === "word").map((token) => ({ ...token, text: line2.slice(token.begin, token.end) }));
|
|
41838
|
+
}
|
|
41839
|
+
var shell_tokens = { tokens_of: tokens_of2, words_of: words_of4 };
|
|
41840
|
+
|
|
41802
41841
|
// scripts/rules/shell-segments.ts
|
|
41803
|
-
var
|
|
41804
|
-
var
|
|
41805
|
-
var
|
|
41842
|
+
var SEGMENT_OPERATORS = /* @__PURE__ */ new Set(["&&", "||", ";", ";;", ";;&", ";&", "\n"]);
|
|
41843
|
+
var COMMAND_OPERATORS = /* @__PURE__ */ new Set([...SEGMENT_OPERATORS, "|", "|&", "&"]);
|
|
41844
|
+
var CASE_ARM_ENDS = /* @__PURE__ */ new Set([";;", ";;&", ";&"]);
|
|
41845
|
+
var GROUP_OPENER = "{";
|
|
41846
|
+
var FUNCTION_HEAD_END = "()";
|
|
41847
|
+
var FUNCTION_KEYWORD = "function";
|
|
41848
|
+
var FUNCTION_NAME_OFFSET = 2;
|
|
41849
|
+
var PATTERN_END = ")";
|
|
41850
|
+
var NEWLINE = "\n";
|
|
41851
|
+
var PATTERN_LINK = "|";
|
|
41852
|
+
var ARM_START = "in";
|
|
41853
|
+
var QUOTING2 = /['"]|\\[\s\S]?/gu;
|
|
41854
|
+
function is_function_head(tokens, index) {
|
|
41855
|
+
const previous = tokens[index - 1];
|
|
41856
|
+
if (previous?.text.endsWith(FUNCTION_HEAD_END) === true) return true;
|
|
41857
|
+
return tokens[index - FUNCTION_NAME_OFFSET]?.text === FUNCTION_KEYWORD;
|
|
41858
|
+
}
|
|
41859
|
+
function is_group_opener(tokens, index) {
|
|
41860
|
+
if (tokens[index]?.text !== GROUP_OPENER) return false;
|
|
41861
|
+
const previous = tokens[index - 1];
|
|
41862
|
+
return previous?.kind !== "word" || is_function_head(tokens, index);
|
|
41863
|
+
}
|
|
41864
|
+
function follows_case_head(tokens, index) {
|
|
41865
|
+
return tokens.slice(0, index).some((token) => token.text === "case");
|
|
41866
|
+
}
|
|
41867
|
+
function quoting_end(text3) {
|
|
41868
|
+
const quoting = [...text3.matchAll(QUOTING2)].at(-1);
|
|
41869
|
+
return quoting === void 0 ? 0 : quoting.index + quoting[0].length;
|
|
41870
|
+
}
|
|
41871
|
+
function close_end(text3) {
|
|
41872
|
+
const close2 = text3.indexOf(PATTERN_END, quoting_end(text3));
|
|
41873
|
+
return close2 === -1 ? close2 : close2 + 1;
|
|
41874
|
+
}
|
|
41875
|
+
function is_pattern_part(token) {
|
|
41876
|
+
if (token.kind === "operator") return token.text === PATTERN_LINK;
|
|
41877
|
+
return token.text !== ARM_START && close_end(token.text) < 0;
|
|
41878
|
+
}
|
|
41879
|
+
function lead_index(tokens, index) {
|
|
41880
|
+
const start2 = tokens.slice(0, index).findLastIndex((token) => !is_pattern_part(token)) + 1;
|
|
41881
|
+
return tokens.slice(0, start2).findLastIndex((token) => token.text !== NEWLINE);
|
|
41882
|
+
}
|
|
41883
|
+
function is_arm_lead(tokens, lead_at) {
|
|
41884
|
+
const lead = tokens[lead_at];
|
|
41885
|
+
if (lead === void 0) return false;
|
|
41886
|
+
if (CASE_ARM_ENDS.has(lead.text)) return true;
|
|
41887
|
+
return lead.text === ARM_START && follows_case_head(tokens, lead_at);
|
|
41888
|
+
}
|
|
41889
|
+
function pattern_cut(tokens, index, token) {
|
|
41890
|
+
const close2 = close_end(token.text);
|
|
41891
|
+
if (close2 < 0 || !is_arm_lead(tokens, lead_index(tokens, index))) return void 0;
|
|
41892
|
+
return { begin: token.begin, end: token.begin + close2 };
|
|
41893
|
+
}
|
|
41894
|
+
function word_cut(tokens, index, token) {
|
|
41895
|
+
return is_group_opener(tokens, index) ? token : pattern_cut(tokens, index, token);
|
|
41896
|
+
}
|
|
41897
|
+
function cut_of(tokens, index, operators) {
|
|
41898
|
+
const token = tokens[index];
|
|
41899
|
+
if (token === void 0) return void 0;
|
|
41900
|
+
if (token.kind === "word") return word_cut(tokens, index, token);
|
|
41901
|
+
return operators.has(token.text) ? token : void 0;
|
|
41902
|
+
}
|
|
41903
|
+
function cuts_of(reading, operators) {
|
|
41904
|
+
const tokens = shell_tokens.tokens_of(reading);
|
|
41905
|
+
return tokens.flatMap((_token, index) => cut_of(tokens, index, operators) ?? []);
|
|
41906
|
+
}
|
|
41907
|
+
function pieces_of(command3, cuts) {
|
|
41908
|
+
const starts = [0, ...cuts.map((cut) => cut.end)];
|
|
41909
|
+
return starts.map((start2, index) => command3.slice(start2, cuts[index]?.begin ?? command3.length));
|
|
41910
|
+
}
|
|
41911
|
+
function trimmed2(pieces) {
|
|
41912
|
+
return pieces.map((piece) => piece.trim());
|
|
41913
|
+
}
|
|
41806
41914
|
function segments_of(command3) {
|
|
41807
|
-
return
|
|
41915
|
+
return trimmed2(pieces_of(command3, cuts_of(command3, SEGMENT_OPERATORS)));
|
|
41808
41916
|
}
|
|
41809
41917
|
function commands_of(command3) {
|
|
41810
|
-
return
|
|
41918
|
+
return trimmed2(pieces_of(command3, cuts_of(command3, COMMAND_OPERATORS)));
|
|
41811
41919
|
}
|
|
41812
|
-
var COMMAND_SEPARATORS = new RegExp(COMMAND_SEPARATOR2.source, "gu");
|
|
41813
41920
|
function quote_aware_commands_of(command3) {
|
|
41814
41921
|
const plain2 = time_shell.blanked(command3);
|
|
41815
41922
|
if (plain2 === void 0) return commands_of(command3);
|
|
41816
|
-
|
|
41817
|
-
begin: match.index,
|
|
41818
|
-
end: match.index + match[0].length
|
|
41819
|
-
}));
|
|
41820
|
-
const starts = [0, ...cuts.map((cut) => cut.end)];
|
|
41821
|
-
const stops = cuts.map((cut) => cut.begin);
|
|
41822
|
-
return starts.map((start2, index) => command3.slice(start2, stops[index] ?? command3.length).trim());
|
|
41923
|
+
return trimmed2(pieces_of(command3, cuts_of(plain2, COMMAND_OPERATORS)));
|
|
41823
41924
|
}
|
|
41824
41925
|
var LINE_CONTINUATION = /\\\n/gu;
|
|
41825
41926
|
function joined_continuations(command3) {
|
|
41826
41927
|
return command3.replaceAll(LINE_CONTINUATION, " ");
|
|
41827
41928
|
}
|
|
41828
41929
|
function parts_of(command3) {
|
|
41829
|
-
|
|
41930
|
+
const cuts = cuts_of(command3, SEGMENT_OPERATORS);
|
|
41931
|
+
return pieces_of(command3, cuts).flatMap((piece, index) => {
|
|
41932
|
+
const cut = cuts[index];
|
|
41933
|
+
return cut === void 0 ? piece : [piece, command3.slice(cut.begin, cut.end)];
|
|
41934
|
+
});
|
|
41830
41935
|
}
|
|
41831
41936
|
function first_of(command3) {
|
|
41832
41937
|
const plain2 = time_shell.blanked(command3);
|
|
41833
41938
|
if (plain2 === void 0) return void 0;
|
|
41834
|
-
const cut = plain2
|
|
41835
|
-
return
|
|
41939
|
+
const [cut] = cuts_of(plain2, SEGMENT_OPERATORS);
|
|
41940
|
+
return command3.slice(0, cut?.begin ?? command3.length).trim();
|
|
41836
41941
|
}
|
|
41837
41942
|
function is_josh_command(segment, names) {
|
|
41838
41943
|
const named = time_josh_names.josh_command_of(segment);
|
|
@@ -41902,6 +42007,10 @@ import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
|
41902
42007
|
|
|
41903
42008
|
// scripts/document/document-scan.ts
|
|
41904
42009
|
var COMMAND_PATTERN = /`(?:pnpm )?josh ([a-z][a-z0-9:-]+)/gu;
|
|
42010
|
+
var CODE_SPAN_PATTERN = /`([^`\n]+)`/gu;
|
|
42011
|
+
var COMMAND_SEPARATOR_PATTERN = /&&|\|\||[|;]/u;
|
|
42012
|
+
var INVOCATION_PATTERN = /\bjosh ([a-z][a-z0-9:-]+)/u;
|
|
42013
|
+
var FLAG_PATTERN = /(?<![\w-])--[a-z][a-z0-9-]*/gu;
|
|
41905
42014
|
var LABEL_PATTERN = /(?:labels\[\]=|\/labels\/|labels -f name=)([a-z][a-z0-9:_-]*)/gu;
|
|
41906
42015
|
var SECTION_PATTERN = /(?<![\w./:`-])(?<tick>`?)(?<file>[\w./-]+\.md)\k<tick>\s*→\s*(?:§\w+,\s*)?["「](?<heading>[^"」]+)["」]/gu;
|
|
41907
42016
|
var ADJACENT_PATTERN = /["「](?<heading>[^"「」]+)["」]\s+(?:above|below)\b/gu;
|
|
@@ -41915,14 +42024,27 @@ function matches(text3, pattern) {
|
|
|
41915
42024
|
function command_references(text3) {
|
|
41916
42025
|
return matches(text3, COMMAND_PATTERN).map((match) => match[1] ?? "").filter((name) => !name.endsWith(":"));
|
|
41917
42026
|
}
|
|
42027
|
+
function flag_names(text3) {
|
|
42028
|
+
return text3.match(FLAG_PATTERN) ?? [];
|
|
42029
|
+
}
|
|
42030
|
+
function invocation_flags(segment) {
|
|
42031
|
+
const match = INVOCATION_PATTERN.exec(segment);
|
|
42032
|
+
if (match === null) return [];
|
|
42033
|
+
const [invocation, command3 = ""] = match;
|
|
42034
|
+
const rest = segment.slice(match.index + invocation.length);
|
|
42035
|
+
return flag_names(rest).map((flag) => ({ command: command3, flag }));
|
|
42036
|
+
}
|
|
42037
|
+
function command_flag_references(text3) {
|
|
42038
|
+
return matches(text3, CODE_SPAN_PATTERN).flatMap((span) => (span[1] ?? "").split(COMMAND_SEPARATOR_PATTERN)).flatMap((segment) => invocation_flags(segment));
|
|
42039
|
+
}
|
|
41918
42040
|
function is_real_label(token) {
|
|
41919
42041
|
return token.length > 0 && !token.endsWith(":") && !token.includes("<");
|
|
41920
42042
|
}
|
|
41921
42043
|
function label_references(text3) {
|
|
41922
42044
|
return matches(text3, LABEL_PATTERN).map((match) => match[1] ?? "").filter((token) => is_real_label(token));
|
|
41923
42045
|
}
|
|
41924
|
-
function base_name(
|
|
41925
|
-
return
|
|
42046
|
+
function base_name(path78) {
|
|
42047
|
+
return path78.split("/").at(-1) ?? path78;
|
|
41926
42048
|
}
|
|
41927
42049
|
function is_placeholder_file(name) {
|
|
41928
42050
|
return name.includes("<") || PLACEHOLDER_FILES.has(base_name(name).toLowerCase());
|
|
@@ -41953,7 +42075,9 @@ function reference_forms(title) {
|
|
|
41953
42075
|
var document_scan = {
|
|
41954
42076
|
adjacent_references,
|
|
41955
42077
|
bare_arrow_references,
|
|
42078
|
+
command_flag_references,
|
|
41956
42079
|
command_references,
|
|
42080
|
+
flag_names,
|
|
41957
42081
|
label_references,
|
|
41958
42082
|
link_targets,
|
|
41959
42083
|
normalize_reference,
|
|
@@ -41967,7 +42091,7 @@ var FENCE = "```";
|
|
|
41967
42091
|
var SINGLE_MATCH = 1;
|
|
41968
42092
|
var BOLD_LABEL_PATTERN = /\*\*([^*]+?)\*\*/gu;
|
|
41969
42093
|
var BOLD_DELIMITER = "**";
|
|
41970
|
-
var
|
|
42094
|
+
var CODE_SPAN_PATTERN2 = /``[^\n]*?``|`[^`\n]*`/gu;
|
|
41971
42095
|
var LABEL_LEVEL = 7;
|
|
41972
42096
|
var LIST_ITEM_PATTERN = /^(?<indent>\s*)(?:[-*]|\d+\.) /u;
|
|
41973
42097
|
function to_heading(line2, index) {
|
|
@@ -42012,7 +42136,7 @@ function unfenced_text(markdown) {
|
|
|
42012
42136
|
return lines.map((line2, index) => fenced[index] === true ? "" : line2).join("\n");
|
|
42013
42137
|
}
|
|
42014
42138
|
function code_masked(text3) {
|
|
42015
|
-
return text3.replaceAll(
|
|
42139
|
+
return text3.replaceAll(CODE_SPAN_PATTERN2, (span) => span.replaceAll("*", " "));
|
|
42016
42140
|
}
|
|
42017
42141
|
function labels(markdown) {
|
|
42018
42142
|
const text3 = unfenced_text(markdown);
|
|
@@ -42140,6 +42264,22 @@ var GATE_STEPS_SCHEMA = external_exports.array(GATE_STEP_SCHEMA).refine((steps)
|
|
|
42140
42264
|
message: "step names must be unique"
|
|
42141
42265
|
});
|
|
42142
42266
|
var GATE_SCHEMA = external_exports.object({ steps: GATE_STEPS_SCHEMA.optional() });
|
|
42267
|
+
var WORKER_PROFILE_SCHEMA = external_exports.strictObject({
|
|
42268
|
+
name: external_exports.string().min(1),
|
|
42269
|
+
model: external_exports.string().min(1),
|
|
42270
|
+
effort: external_exports.string().min(1),
|
|
42271
|
+
when: external_exports.string().min(1)
|
|
42272
|
+
});
|
|
42273
|
+
var WORKER_PROFILES_SCHEMA = external_exports.array(WORKER_PROFILE_SCHEMA).min(1).refine((profiles) => new Set(profiles.map((profile) => profile.name)).size === profiles.length, {
|
|
42274
|
+
message: "profile names must be unique"
|
|
42275
|
+
});
|
|
42276
|
+
var WORKER_SCHEMA = external_exports.strictObject({
|
|
42277
|
+
default: external_exports.string().min(1),
|
|
42278
|
+
escalate: external_exports.boolean().default(false),
|
|
42279
|
+
profiles: WORKER_PROFILES_SCHEMA
|
|
42280
|
+
}).refine((worker) => worker.profiles.some((profile) => profile.name === worker.default), {
|
|
42281
|
+
message: "default must name one of the profiles"
|
|
42282
|
+
});
|
|
42143
42283
|
var josh_schemas = {
|
|
42144
42284
|
format: external_exports.object({ josh: external_exports.object({ format: FORMAT_SCHEMA.optional() }).optional() }),
|
|
42145
42285
|
gate_steps: external_exports.object({ josh: external_exports.object({ gate: GATE_SCHEMA.optional() }).optional() }),
|
|
@@ -42147,7 +42287,8 @@ var josh_schemas = {
|
|
|
42147
42287
|
progress_interval_minutes: external_exports.object({
|
|
42148
42288
|
josh: external_exports.object({ progress_interval_minutes: external_exports.number().positive() }).optional()
|
|
42149
42289
|
}),
|
|
42150
|
-
review_gate: external_exports.object({ josh: external_exports.object({ review_gate: REVIEW_GATE_SCHEMA }).optional() })
|
|
42290
|
+
review_gate: external_exports.object({ josh: external_exports.object({ review_gate: REVIEW_GATE_SCHEMA }).optional() }),
|
|
42291
|
+
worker: external_exports.object({ josh: external_exports.object({ worker: WORKER_SCHEMA.optional() }).optional() })
|
|
42151
42292
|
};
|
|
42152
42293
|
function manifest_path(directory) {
|
|
42153
42294
|
return path35.join(directory, PACKAGE_JSON);
|
|
@@ -42381,28 +42522,63 @@ var consultation_handoff = {
|
|
|
42381
42522
|
is_handoff_call
|
|
42382
42523
|
};
|
|
42383
42524
|
|
|
42525
|
+
// scripts/agent/agent-phase-profile.ts
|
|
42526
|
+
var { OPENAI_PROVIDER: OPENAI_PROVIDER3, trimmed: trimmed3 } = agent_provider;
|
|
42527
|
+
var { PHASE_SCHEMA: PHASE_SCHEMA2, PRE_GATE_PHASE: PRE_GATE_PHASE2 } = agent_profile_schema;
|
|
42528
|
+
var SONNET_MODEL = "claude-sonnet-5-5";
|
|
42529
|
+
var SHIP_EFFORT = "low";
|
|
42530
|
+
var PHASE_EFFORT = {
|
|
42531
|
+
worker: { [PRE_GATE_PHASE2]: SHIP_EFFORT }
|
|
42532
|
+
};
|
|
42533
|
+
var PHASE_MODELS = {
|
|
42534
|
+
worker: { [PRE_GATE_PHASE2]: { key: "JOSH_WORKER_SHIP_MODEL", value: SONNET_MODEL } }
|
|
42535
|
+
};
|
|
42536
|
+
function phase_model_keys() {
|
|
42537
|
+
return Object.values(PHASE_MODELS).flatMap(
|
|
42538
|
+
(phases) => Object.values(phases).map(({ key: key3 }) => key3)
|
|
42539
|
+
);
|
|
42540
|
+
}
|
|
42541
|
+
function phase_entry(table, role, phase) {
|
|
42542
|
+
const parsed = PHASE_SCHEMA2.safeParse(phase);
|
|
42543
|
+
return parsed.success ? table[role]?.[parsed.data] : void 0;
|
|
42544
|
+
}
|
|
42545
|
+
function phase_model(role, provider, phase, environment3) {
|
|
42546
|
+
const entry = provider === OPENAI_PROVIDER3 ? void 0 : phase_entry(PHASE_MODELS, role, phase);
|
|
42547
|
+
if (entry === void 0) return void 0;
|
|
42548
|
+
return { key: entry.key, value: trimmed3(environment3[entry.key]) ?? entry.value };
|
|
42549
|
+
}
|
|
42550
|
+
function phase_effort(role, phase, fallback) {
|
|
42551
|
+
return phase_entry(PHASE_EFFORT, role, phase) ?? fallback;
|
|
42552
|
+
}
|
|
42553
|
+
var agent_phase_profile = {
|
|
42554
|
+
SONNET_MODEL,
|
|
42555
|
+
phase_effort,
|
|
42556
|
+
phase_model,
|
|
42557
|
+
phase_model_keys
|
|
42558
|
+
};
|
|
42559
|
+
|
|
42384
42560
|
// scripts/agent/agent-role-profile.ts
|
|
42385
42561
|
var {
|
|
42386
42562
|
CODEX_SESSION_KEY: CODEX_SESSION_KEY2,
|
|
42387
42563
|
HANDED_PROVIDER_KEY: HANDED_PROVIDER_KEY2,
|
|
42388
|
-
OPENAI_PROVIDER:
|
|
42564
|
+
OPENAI_PROVIDER: OPENAI_PROVIDER4,
|
|
42389
42565
|
default_notice: default_notice2,
|
|
42390
42566
|
handoff_environment: handoff_environment2,
|
|
42391
42567
|
has_completion_callback: has_completion_callback2,
|
|
42392
42568
|
rejection: rejection2,
|
|
42393
42569
|
resolve_provider: resolve_provider2,
|
|
42394
|
-
trimmed:
|
|
42570
|
+
trimmed: trimmed4,
|
|
42395
42571
|
warn_of_default: warn_of_default2
|
|
42396
42572
|
} = agent_provider;
|
|
42397
42573
|
var { consultation_provider: consultation_provider2 } = agent_consultation_model;
|
|
42574
|
+
var { SONNET_MODEL: SONNET_MODEL2, phase_effort: phase_effort2, phase_model: phase_model2, phase_model_keys: phase_model_keys2 } = agent_phase_profile;
|
|
42398
42575
|
var {
|
|
42399
42576
|
DEFAULT_PROFILES: DEFAULT_PROFILES2,
|
|
42400
42577
|
EFFORT_SCHEMA: EFFORT_SCHEMA2,
|
|
42401
42578
|
IMPLEMENTATION_PHASE: IMPLEMENTATION_PHASE2,
|
|
42402
42579
|
OPENAI_MODEL: OPENAI_MODEL2,
|
|
42403
42580
|
OPENAI_PROFILES: OPENAI_PROFILES2,
|
|
42404
|
-
|
|
42405
|
-
PRE_GATE_PHASE: PRE_GATE_PHASE2,
|
|
42581
|
+
PRE_GATE_PHASE: PRE_GATE_PHASE3,
|
|
42406
42582
|
REVIEWER: REVIEWER2,
|
|
42407
42583
|
SCHEDULER: SCHEDULER2,
|
|
42408
42584
|
WORKER: WORKER2,
|
|
@@ -42412,13 +42588,12 @@ var {
|
|
|
42412
42588
|
var VERIFICATION_EFFORT = "high";
|
|
42413
42589
|
var PROVIDER_PROFILES = { anthropic: DEFAULT_PROFILES2, openai: OPENAI_PROFILES2 };
|
|
42414
42590
|
var FIRST_REVIEW_ROUND = 1;
|
|
42415
|
-
var SONNET_MODEL = "claude-sonnet-5-5";
|
|
42416
42591
|
var VERIFICATION_PROFILES = {
|
|
42417
42592
|
anthropic: {
|
|
42418
42593
|
...DEFAULT_PROFILES2.reviewer,
|
|
42419
42594
|
// Sonnet holds the verification pass by the eval criterion: on every `verification-fix-*`
|
|
42420
42595
|
// scenario its pass/fail equals Opus's (100% agreement), and Opus passes all 4.
|
|
42421
|
-
model:
|
|
42596
|
+
model: SONNET_MODEL2,
|
|
42422
42597
|
effort: VERIFICATION_EFFORT
|
|
42423
42598
|
},
|
|
42424
42599
|
openai: { ...OPENAI_PROFILES2.reviewer, effort: VERIFICATION_EFFORT }
|
|
@@ -42428,33 +42603,21 @@ var VERIFICATION_KEYS = {
|
|
|
42428
42603
|
effort: "JOSH_REVIEWER_VERIFICATION_EFFORT"
|
|
42429
42604
|
};
|
|
42430
42605
|
var INVESTIGATION_MODELS = {
|
|
42431
|
-
anthropic:
|
|
42606
|
+
anthropic: SONNET_MODEL2,
|
|
42432
42607
|
openai: OPENAI_MODEL2
|
|
42433
42608
|
};
|
|
42434
42609
|
var INVESTIGATION_MODEL_KEY = "JOSH_INVESTIGATION_MODEL";
|
|
42435
|
-
var SHIP_EFFORT = "low";
|
|
42436
|
-
var PHASE_EFFORT = {
|
|
42437
|
-
worker: { [PRE_GATE_PHASE2]: SHIP_EFFORT }
|
|
42438
|
-
};
|
|
42439
|
-
var PHASE_MODELS = {
|
|
42440
|
-
worker: { [PRE_GATE_PHASE2]: { key: "JOSH_WORKER_SHIP_MODEL", value: SONNET_MODEL } }
|
|
42441
|
-
};
|
|
42442
42610
|
var ENV_KEYS = {
|
|
42443
42611
|
scheduler: { model: "JOSH_SCHEDULER_MODEL", effort: "JOSH_SCHEDULER_EFFORT" },
|
|
42444
42612
|
worker: { model: "JOSH_WORKER_MODEL", effort: "JOSH_WORKER_EFFORT" },
|
|
42445
42613
|
reviewer: { model: "JOSH_REVIEWER_MODEL", effort: "JOSH_REVIEWER_EFFORT" }
|
|
42446
42614
|
};
|
|
42447
42615
|
var LEGACY_WORKER_KEYS = { model: "JOSH_LANE_MODEL", effort: "JOSH_LANE_EFFORT" };
|
|
42448
|
-
function phase_model_keys() {
|
|
42449
|
-
return Object.values(PHASE_MODELS).flatMap(
|
|
42450
|
-
(phases) => Object.values(phases).map(({ key: key3 }) => key3)
|
|
42451
|
-
);
|
|
42452
|
-
}
|
|
42453
42616
|
var PROFILE_KEYS = [
|
|
42454
42617
|
...Object.values(ENV_KEYS).flatMap((keys) => [keys.model, keys.effort]),
|
|
42455
42618
|
...Object.values(LEGACY_WORKER_KEYS),
|
|
42456
42619
|
...Object.values(VERIFICATION_KEYS),
|
|
42457
|
-
...
|
|
42620
|
+
...phase_model_keys2(),
|
|
42458
42621
|
INVESTIGATION_MODEL_KEY
|
|
42459
42622
|
];
|
|
42460
42623
|
var { MAX_VALUE_LENGTH: MAX_VALUE_LENGTH2, is_safe_prompt: is_safe_prompt2, is_safe_value: is_safe_value3 } = agent_safe_text;
|
|
@@ -42468,22 +42631,13 @@ function override_keys(role, field2, round) {
|
|
|
42468
42631
|
}
|
|
42469
42632
|
function override_value(role, field2, environment3, round) {
|
|
42470
42633
|
const keys = override_keys(role, field2, round);
|
|
42471
|
-
const key3 = keys.find((candidate) =>
|
|
42472
|
-
return key3 === void 0 ? { key: keys[0], value: void 0 } : { key: key3, value:
|
|
42473
|
-
}
|
|
42474
|
-
function phase_entry(table, role, phase) {
|
|
42475
|
-
const parsed = PHASE_SCHEMA2.safeParse(phase);
|
|
42476
|
-
return parsed.success ? table[role]?.[parsed.data] : void 0;
|
|
42477
|
-
}
|
|
42478
|
-
function phase_model(role, provider, phase, environment3) {
|
|
42479
|
-
const entry = provider === OPENAI_PROVIDER3 ? void 0 : phase_entry(PHASE_MODELS, role, phase);
|
|
42480
|
-
if (entry === void 0) return void 0;
|
|
42481
|
-
return { key: entry.key, value: trimmed2(environment3[entry.key]) ?? entry.value };
|
|
42634
|
+
const key3 = keys.find((candidate) => trimmed4(environment3[candidate]) !== void 0);
|
|
42635
|
+
return key3 === void 0 ? { key: keys[0], value: void 0 } : { key: key3, value: trimmed4(environment3[key3]) };
|
|
42482
42636
|
}
|
|
42483
42637
|
function model_override(role, environment3, provider, stage) {
|
|
42484
|
-
const phased =
|
|
42638
|
+
const phased = phase_model2(role, provider, stage.phase, environment3);
|
|
42485
42639
|
if (phased !== void 0) return phased;
|
|
42486
|
-
return provider ===
|
|
42640
|
+
return provider === OPENAI_PROVIDER4 ? { key: ENV_KEYS[role].model, value: void 0 } : override_value(role, "model", environment3, stage.round);
|
|
42487
42641
|
}
|
|
42488
42642
|
function resolved_effort(override, fallback) {
|
|
42489
42643
|
const parsed = EFFORT_SCHEMA2.safeParse(override.value ?? fallback);
|
|
@@ -42498,16 +42652,13 @@ function validate2(profile, model_key) {
|
|
|
42498
42652
|
}
|
|
42499
42653
|
return { kind: "profile", profile };
|
|
42500
42654
|
}
|
|
42501
|
-
function phase_effort(role, phase, fallback) {
|
|
42502
|
-
return phase_entry(PHASE_EFFORT, role, phase) ?? fallback;
|
|
42503
|
-
}
|
|
42504
42655
|
function overridden_effort(profile, phase, environment3) {
|
|
42505
42656
|
const parsed = EFFORT_SCHEMA2.safeParse(override_value(profile.role, "effort", environment3).value);
|
|
42506
|
-
return parsed.success ? parsed.data :
|
|
42657
|
+
return parsed.success ? parsed.data : phase_effort2(profile.role, phase, profile.effort);
|
|
42507
42658
|
}
|
|
42508
42659
|
function with_phase(profile, phase, environment3 = process.env) {
|
|
42509
42660
|
const effort = overridden_effort(profile, phase, environment3);
|
|
42510
|
-
const model =
|
|
42661
|
+
const model = phase_model2(profile.role, profile.provider, phase, environment3);
|
|
42511
42662
|
if (model === void 0) return { kind: "profile", profile: { ...profile, effort } };
|
|
42512
42663
|
return validate2({ ...profile, model: model.value, effort }, model.key);
|
|
42513
42664
|
}
|
|
@@ -42520,7 +42671,7 @@ function resolve_stage(role, environment3, stage) {
|
|
|
42520
42671
|
const defaults = stage_defaults(selected.provider, role, stage.round);
|
|
42521
42672
|
const model = model_override(role, environment3, selected.provider, stage);
|
|
42522
42673
|
const effort = override_value(role, "effort", environment3, stage.round);
|
|
42523
|
-
const resolved4 = resolved_effort(effort,
|
|
42674
|
+
const resolved4 = resolved_effort(effort, phase_effort2(role, stage.phase, defaults.effort));
|
|
42524
42675
|
if (resolved4.kind === "rejected") return resolved4;
|
|
42525
42676
|
const profile = {
|
|
42526
42677
|
provider: selected.provider,
|
|
@@ -42536,15 +42687,15 @@ function resolve2(role, environment3 = process.env, phase) {
|
|
|
42536
42687
|
function reduced_review(result, environment3) {
|
|
42537
42688
|
if (result.kind === "rejected") return result;
|
|
42538
42689
|
const { profile } = result;
|
|
42539
|
-
if (profile.provider !== "anthropic" ||
|
|
42540
|
-
return { kind: "profile", profile: { ...profile, model:
|
|
42690
|
+
if (profile.provider !== "anthropic" || trimmed4(environment3["JOSH_REVIEWER_MODEL"])) return result;
|
|
42691
|
+
return { kind: "profile", profile: { ...profile, model: SONNET_MODEL2 } };
|
|
42541
42692
|
}
|
|
42542
42693
|
function resolve_review(round, environment3 = process.env, is_reduced = false) {
|
|
42543
42694
|
const result = resolve_stage(REVIEWER2, environment3, { round });
|
|
42544
42695
|
return is_reduced && round === FIRST_REVIEW_ROUND ? reduced_review(result, environment3) : result;
|
|
42545
42696
|
}
|
|
42546
42697
|
function investigation_model(provider, environment3 = process.env) {
|
|
42547
|
-
const override = provider ===
|
|
42698
|
+
const override = provider === OPENAI_PROVIDER4 ? void 0 : trimmed4(environment3[INVESTIGATION_MODEL_KEY]);
|
|
42548
42699
|
return override ?? INVESTIGATION_MODELS[provider];
|
|
42549
42700
|
}
|
|
42550
42701
|
var agent_role_profile = {
|
|
@@ -42555,7 +42706,7 @@ var agent_role_profile = {
|
|
|
42555
42706
|
INVESTIGATION_MODEL_KEY,
|
|
42556
42707
|
MAX_VALUE_LENGTH: MAX_VALUE_LENGTH2,
|
|
42557
42708
|
OPENAI_PROFILES: OPENAI_PROFILES2,
|
|
42558
|
-
PRE_GATE_PHASE:
|
|
42709
|
+
PRE_GATE_PHASE: PRE_GATE_PHASE3,
|
|
42559
42710
|
PROFILE_KEYS,
|
|
42560
42711
|
REVIEWER: REVIEWER2,
|
|
42561
42712
|
SCHEDULER: SCHEDULER2,
|
|
@@ -42572,6 +42723,7 @@ var agent_role_profile = {
|
|
|
42572
42723
|
resolve: resolve2,
|
|
42573
42724
|
resolve_provider: resolve_provider2,
|
|
42574
42725
|
resolve_review,
|
|
42726
|
+
validate: validate2,
|
|
42575
42727
|
warn_of_default: warn_of_default2,
|
|
42576
42728
|
with_phase
|
|
42577
42729
|
};
|
|
@@ -42595,7 +42747,6 @@ var LINE_COUNT_PREFIXES = ["--lines=", "-n", "-"];
|
|
|
42595
42747
|
var DIGITS = /^\d+$/u;
|
|
42596
42748
|
var FROM_LINE = /^\+\d+$/u;
|
|
42597
42749
|
var QUOTES2 = /^['"]|['"]$/gu;
|
|
42598
|
-
var WHITESPACE2 = /\s+/u;
|
|
42599
42750
|
var ASSIGNMENT = /^\w+=/u;
|
|
42600
42751
|
var ALWAYS_BROAD = /* @__PURE__ */ new Set(["find", "for", "node", "python", "python3"]);
|
|
42601
42752
|
var ANALYSIS_PREFIX = "josh cost:";
|
|
@@ -42667,8 +42818,8 @@ var COMMAND_TESTS = /* @__PURE__ */ new Map([
|
|
|
42667
42818
|
["tail", ends_past_cap],
|
|
42668
42819
|
["cat", cat_reads_past_cap]
|
|
42669
42820
|
]);
|
|
42670
|
-
function
|
|
42671
|
-
const words =
|
|
42821
|
+
function words_of5(segment) {
|
|
42822
|
+
const words = shell_tokens.words_of(segment).map((word2) => word2.text.replaceAll(QUOTES2, ""));
|
|
42672
42823
|
const start2 = words.findIndex((word2) => !ASSIGNMENT.test(word2));
|
|
42673
42824
|
return start2 === -1 ? [] : words.slice(start2);
|
|
42674
42825
|
}
|
|
@@ -42681,7 +42832,7 @@ function reads_past_cap(segment, name, rest, is_piped) {
|
|
|
42681
42832
|
}
|
|
42682
42833
|
function is_broad_segment(segment, is_piped) {
|
|
42683
42834
|
if (time_josh_names.josh_command_of(segment).startsWith(ANALYSIS_PREFIX)) return true;
|
|
42684
|
-
const [name = "", ...rest] =
|
|
42835
|
+
const [name = "", ...rest] = words_of5(segment);
|
|
42685
42836
|
return ALWAYS_BROAD.has(name) || reads_past_cap(segment, name, rest, is_piped);
|
|
42686
42837
|
}
|
|
42687
42838
|
function is_broad_pipeline(pipeline) {
|
|
@@ -42762,7 +42913,7 @@ function is_broad_investigation(call) {
|
|
|
42762
42913
|
var broad_investigation = { READ_LINE_CAP: READ_LINE_CAP2, is_broad_investigation, is_delegated_investigation };
|
|
42763
42914
|
|
|
42764
42915
|
// scripts/rules/consultation-investigation.ts
|
|
42765
|
-
var { ANTHROPIC_PROVIDER: ANTHROPIC_PROVIDER4, OPENAI_PROVIDER:
|
|
42916
|
+
var { ANTHROPIC_PROVIDER: ANTHROPIC_PROVIDER4, OPENAI_PROVIDER: OPENAI_PROVIDER5 } = agent_provider;
|
|
42766
42917
|
var { READ_LINE_CAP: READ_LINE_CAP3, is_broad_investigation: is_broad_investigation2, is_delegated_investigation: is_delegated_investigation2 } = broad_investigation;
|
|
42767
42918
|
var DELEGATION = ".claude/skills/workflow-commands/delegation.md";
|
|
42768
42919
|
var TOPIC = `\`${DELEGATION}\` \u2192 "A consultation main line hands its investigation to a unit"`;
|
|
@@ -42805,7 +42956,7 @@ var ROW4 = row("consultation-investigation", ANTHROPIC_PROVIDER4, "an `investiga
|
|
|
42805
42956
|
fires: "a broad investigation call \u2014 `Glob`, `WebFetch`, a `Read` past the line cap, a tree `Grep` or shell search, an investigation dispatch inheriting the model \u2014 on the consultation main line on Opus or Fable. Every occurrence",
|
|
42806
42957
|
quiet: QUIET
|
|
42807
42958
|
});
|
|
42808
|
-
var CODEX_ROW = row("consultation-investigation-codex",
|
|
42959
|
+
var CODEX_ROW = row("consultation-investigation-codex", OPENAI_PROVIDER5, "a Codex subagent", {
|
|
42809
42960
|
title: "Consultation main line delegates investigation (Codex)",
|
|
42810
42961
|
topic: TOPIC,
|
|
42811
42962
|
fires: "a broad shell investigation on the consultation main line on Codex Astra. Every occurrence",
|
|
@@ -43113,7 +43264,7 @@ var core_weights = { CORE_WEIGHTS, ESLINT_HEAP_MIB, MEASURED, MEMORY_MB, TOOL_ME
|
|
|
43113
43264
|
// scripts/gate/command-memory.ts
|
|
43114
43265
|
var JOSH_PROGRAM = "josh";
|
|
43115
43266
|
var RESERVED_RUN = "reserved-run";
|
|
43116
|
-
var
|
|
43267
|
+
var COMMAND_SEPARATOR2 = "--";
|
|
43117
43268
|
var ESLINT = "eslint";
|
|
43118
43269
|
var VITEST = "vitest";
|
|
43119
43270
|
var AUTO_WORKERS = "auto";
|
|
@@ -43128,7 +43279,7 @@ var WORKER_FLAGS = {
|
|
|
43128
43279
|
};
|
|
43129
43280
|
function wrapped_command_of(call) {
|
|
43130
43281
|
if (call.name !== JOSH_PROGRAM || call.args[0] !== RESERVED_RUN) return void 0;
|
|
43131
|
-
const separator = call.args.indexOf(
|
|
43282
|
+
const separator = call.args.indexOf(COMMAND_SEPARATOR2);
|
|
43132
43283
|
return separator === -1 ? void 0 : call.args.slice(separator + 1).join(" ");
|
|
43133
43284
|
}
|
|
43134
43285
|
function reading_of(segment, is_reserved) {
|
|
@@ -43254,6 +43405,36 @@ var ROW8 = {
|
|
|
43254
43405
|
};
|
|
43255
43406
|
var direct_git_status = { DIRECT_GIT_STATUS_REASON, ROW: ROW8, is_covered_status };
|
|
43256
43407
|
|
|
43408
|
+
// scripts/rules/direct-issue-comment.ts
|
|
43409
|
+
import path39 from "node:path";
|
|
43410
|
+
|
|
43411
|
+
// scripts/rules/standalone-gh-call.ts
|
|
43412
|
+
var WORD_SEPARATOR3 = " ";
|
|
43413
|
+
var PLAIN_WORD = /^[\w./=-]+$/u;
|
|
43414
|
+
function line_of2(words) {
|
|
43415
|
+
return words.join(WORD_SEPARATOR3);
|
|
43416
|
+
}
|
|
43417
|
+
function is_plain_word(word2) {
|
|
43418
|
+
return PLAIN_WORD.test(word2);
|
|
43419
|
+
}
|
|
43420
|
+
function split_issue(rest) {
|
|
43421
|
+
const issues = rest.filter((word2) => issue_number_shape.is_issue_number(word2));
|
|
43422
|
+
const [issue3] = issues;
|
|
43423
|
+
const flags = line_of2(rest.filter((word2) => !issue_number_shape.is_issue_number(word2)));
|
|
43424
|
+
return issue3 !== void 0 && issues.length === 1 ? { issue: issue3, flags } : void 0;
|
|
43425
|
+
}
|
|
43426
|
+
function call_of(line2, lead) {
|
|
43427
|
+
const words = line2.trim().split(WORD_SEPARATOR3);
|
|
43428
|
+
const is_lead = line_of2(words.slice(0, lead.length)) === line_of2(lead);
|
|
43429
|
+
return is_lead && words.every((word2) => is_plain_word(word2)) ? split_issue(words.slice(lead.length)) : void 0;
|
|
43430
|
+
}
|
|
43431
|
+
function input_of(call, command_of3) {
|
|
43432
|
+
if (call.name !== cost_blocks.BASH_TOOL || !json_value.is_record(call.input)) return void 0;
|
|
43433
|
+
const command3 = command_of3(time_shell.bash_command(call.input));
|
|
43434
|
+
return command3 === void 0 ? void 0 : { ...call.input, command: command3 };
|
|
43435
|
+
}
|
|
43436
|
+
var standalone_gh_call = { call_of, input_of, is_plain_word, line_of: line_of2 };
|
|
43437
|
+
|
|
43257
43438
|
// scripts/rules/direct-issue-comment.ts
|
|
43258
43439
|
var ISSUE_GROUP = "issue";
|
|
43259
43440
|
var COMMENT_ACTION = "comment";
|
|
@@ -43313,6 +43494,28 @@ function is_any_comment(command3) {
|
|
|
43313
43494
|
return is_direct_issue_comment(command3) || is_josh_comment(command3);
|
|
43314
43495
|
}
|
|
43315
43496
|
var DIRECT_ISSUE_COMMENT_REASON = "\u26D4 direct issue comment: `gh issue comment` (or a `gh api` write to `\u2026/issues/<N>/comments`) posts without the run marker, so the run reads its own comment as a person updating the issue \u2014 the review goes stale and `pnpm josh followup` refuses the merge. Post with `pnpm josh issue:comment <N> --body-file <path>` instead (`shell-body.md`). **This rule fires on every occurrence, not once per run.**";
|
|
43497
|
+
var COMMENT_WORDS = ["gh", ISSUE_GROUP, COMMENT_ACTION];
|
|
43498
|
+
var BODY_FILE_SPELLING = /^(?:(?:-F|--body-file) |--body-file=)(?<file>[\w./-]+)$/u;
|
|
43499
|
+
var STDIN_PATH = "-";
|
|
43500
|
+
var ISSUE_COMMENT_COMMAND = "pnpm josh issue:comment";
|
|
43501
|
+
var BODY_FILE_FLAG = "--body-file";
|
|
43502
|
+
function body_file_of(flags, cwd) {
|
|
43503
|
+
const file2 = BODY_FILE_SPELLING.exec(flags)?.groups?.["file"];
|
|
43504
|
+
return file2 === void 0 || file2 === STDIN_PATH ? void 0 : path39.resolve(cwd, file2);
|
|
43505
|
+
}
|
|
43506
|
+
function issue_comment_of(comment, cwd) {
|
|
43507
|
+
const resolved4 = body_file_of(comment.flags, cwd);
|
|
43508
|
+
return resolved4 !== void 0 && standalone_gh_call.is_plain_word(resolved4) ? standalone_gh_call.line_of([ISSUE_COMMENT_COMMAND, comment.issue, BODY_FILE_FLAG, resolved4]) : void 0;
|
|
43509
|
+
}
|
|
43510
|
+
function issue_comment_command(command3, context) {
|
|
43511
|
+
const comment = standalone_gh_call.call_of(command3, COMMENT_WORDS);
|
|
43512
|
+
const post = comment === void 0 ? void 0 : issue_comment_of(comment, context.cwd);
|
|
43513
|
+
return post !== void 0 && is_direct_issue_comment_in(command3.trim(), context) ? post : void 0;
|
|
43514
|
+
}
|
|
43515
|
+
function issue_comment_input(call, _tail, context) {
|
|
43516
|
+
return standalone_gh_call.input_of(call, (command3) => issue_comment_command(command3, context));
|
|
43517
|
+
}
|
|
43518
|
+
var ISSUE_COMMENT_NOTE = "\u21BB direct issue comment: this `gh issue comment <N> --body-file <path>` ran as `pnpm josh issue:comment <N> --body-file <path>`, which posts the run marker (`shell-body.md`).";
|
|
43316
43519
|
var ROW9 = {
|
|
43317
43520
|
id: "direct-issue-comment",
|
|
43318
43521
|
is_trigger: bash_triggers.on_bash_command(is_direct_issue_comment_in),
|
|
@@ -43320,14 +43523,22 @@ var ROW9 = {
|
|
|
43320
43523
|
decide: () => true,
|
|
43321
43524
|
keeps: bash_triggers.on_bash_command(is_josh_comment),
|
|
43322
43525
|
reaches: bash_triggers.on_bash_command(is_any_comment),
|
|
43526
|
+
rewrite: issue_comment_input,
|
|
43527
|
+
rewrite_note: ISSUE_COMMENT_NOTE,
|
|
43323
43528
|
about: {
|
|
43324
43529
|
title: "Direct issue comment",
|
|
43325
43530
|
topic: "`shell-body.md`",
|
|
43326
|
-
fires: "a comment to the checkout's own repository outside `josh issue:comment` (`gh issue comment` with no `--repo`, or a `gh api` write to `repos/<owner>/<r>/issues/<N>/comments` whose owner is the `{owner}` placeholder or the checkout's own `owner/repo` spelled out); it points at `pnpm josh issue:comment`.
|
|
43531
|
+
fires: "a comment to the checkout's own repository outside `josh issue:comment` (`gh issue comment` with no `--repo`, or a `gh api` write to `repos/<owner>/<r>/issues/<N>/comments` whose owner is the `{owner}` placeholder or the checkout's own `owner/repo` spelled out); it points at `pnpm josh issue:comment`. A line that is only `gh issue comment <N>` with one `--body-file` / `-F <path>` is rewritten to `pnpm josh issue:comment <N> --body-file <path>`; every other form is refused, every occurrence",
|
|
43327
43532
|
quiet: "`pnpm josh issue:comment`, or reading the comments \u2014 the path that writes the run marker"
|
|
43328
43533
|
}
|
|
43329
43534
|
};
|
|
43330
|
-
var direct_issue_comment = {
|
|
43535
|
+
var direct_issue_comment = {
|
|
43536
|
+
DIRECT_ISSUE_COMMENT_REASON,
|
|
43537
|
+
ISSUE_COMMENT_NOTE,
|
|
43538
|
+
ROW: ROW9,
|
|
43539
|
+
is_direct_issue_comment,
|
|
43540
|
+
issue_comment_command
|
|
43541
|
+
};
|
|
43331
43542
|
|
|
43332
43543
|
// scripts/rules/tail-commands.ts
|
|
43333
43544
|
function is_bash_use(block) {
|
|
@@ -43441,9 +43652,9 @@ function rewritable_path(command3) {
|
|
|
43441
43652
|
}
|
|
43442
43653
|
function comments_command(command3) {
|
|
43443
43654
|
if (!is_body_only_issue_read(command3)) return void 0;
|
|
43444
|
-
const
|
|
43445
|
-
if (
|
|
43446
|
-
return `gh api --paginate ${
|
|
43655
|
+
const path78 = rewritable_path(command3);
|
|
43656
|
+
if (path78 === void 0) return void 0;
|
|
43657
|
+
return `gh api --paginate ${path78}/comments --jq ${COMMENTS_JQ}
|
|
43447
43658
|
${command3}`;
|
|
43448
43659
|
}
|
|
43449
43660
|
function comments_input(call, tail) {
|
|
@@ -43571,6 +43782,28 @@ function is_josh_read(command3) {
|
|
|
43571
43782
|
function is_any_read(command3) {
|
|
43572
43783
|
return is_direct_issue_read(command3) || is_josh_read(command3);
|
|
43573
43784
|
}
|
|
43785
|
+
var VIEW_WORDS = ["gh", ISSUE_GROUP2, VIEW_ACTION];
|
|
43786
|
+
var REPO_SPELLING = /^(?:(?:-R|--repo) |--repo=)(?<repo>[\w.-]+\/[\w.-]+)$/u;
|
|
43787
|
+
var ISSUE_READ_COMMAND2 = "pnpm josh issue:read";
|
|
43788
|
+
var REPO_FLAG = "--repo";
|
|
43789
|
+
function carried_repo(flags) {
|
|
43790
|
+
if (flags === "") return [];
|
|
43791
|
+
const repo = REPO_SPELLING.exec(flags)?.groups?.["repo"];
|
|
43792
|
+
return repo === void 0 ? void 0 : [REPO_FLAG, repo];
|
|
43793
|
+
}
|
|
43794
|
+
function issue_read_of(view2) {
|
|
43795
|
+
const repo = carried_repo(view2.flags);
|
|
43796
|
+
return repo === void 0 ? void 0 : standalone_gh_call.line_of([ISSUE_READ_COMMAND2, view2.issue, ...repo]);
|
|
43797
|
+
}
|
|
43798
|
+
function issue_read_command(command3) {
|
|
43799
|
+
const view2 = standalone_gh_call.call_of(command3, VIEW_WORDS);
|
|
43800
|
+
const read14 = view2 === void 0 ? void 0 : issue_read_of(view2);
|
|
43801
|
+
return read14 !== void 0 && is_direct_issue_read(command3.trim()) ? read14 : void 0;
|
|
43802
|
+
}
|
|
43803
|
+
function issue_read_input(call) {
|
|
43804
|
+
return standalone_gh_call.input_of(call, issue_read_command);
|
|
43805
|
+
}
|
|
43806
|
+
var ISSUE_READ_NOTE = "\u21BB direct issue read: this `gh issue view <N>` ran as `pnpm josh issue:read <N>`, which withholds a comment from an author without write access (`issue-comments.md`).";
|
|
43574
43807
|
var DIRECT_ISSUE_READ_REASON = "\u26D4 direct issue read: pnpm josh issue:read <N>\nRun that in place of this read of `\u2026/issues/<N>`, its comments or its timeline (`gh api` or `gh issue view`) \u2014 it withholds a comment from an author without write access and marks an untrusted body as a report, which a raw read prints whole as if it were an instruction (`issue-comments.md`). **This rule fires on every occurrence, not once per run.**";
|
|
43575
43808
|
var ROW11 = {
|
|
43576
43809
|
id: "direct-issue-read",
|
|
@@ -43579,14 +43812,22 @@ var ROW11 = {
|
|
|
43579
43812
|
decide: () => true,
|
|
43580
43813
|
keeps: bash_triggers.on_bash_command(is_josh_read),
|
|
43581
43814
|
reaches: bash_triggers.on_bash_command(is_any_read),
|
|
43815
|
+
rewrite: issue_read_input,
|
|
43816
|
+
rewrite_note: ISSUE_READ_NOTE,
|
|
43582
43817
|
about: {
|
|
43583
43818
|
title: "Direct issue read",
|
|
43584
43819
|
topic: "`issue-comments.md`",
|
|
43585
|
-
fires: "a `gh api` GET of the checkout's own `repos/<o>/<r>/issues/<N>`, `\u2026/comments` or `\u2026/timeline` (the `{owner}` placeholder or the origin spelled out), or a `gh issue view <N>` of it, with no projection or one naming the body (or, for the view, the comments); it points at `pnpm josh issue:read`.
|
|
43820
|
+
fires: "a `gh api` GET of the checkout's own `repos/<o>/<r>/issues/<N>`, `\u2026/comments` or `\u2026/timeline` (the `{owner}` placeholder or the origin spelled out), or a `gh issue view <N>` of it, with no projection or one naming the body (or, for the view, the comments); it points at `pnpm josh issue:read`. A line that is only `gh issue view <N>`, with at most `-R` / `--repo <owner>/<repo>`, is rewritten to `pnpm josh issue:read <N>`; every other form is refused, every occurrence",
|
|
43586
43821
|
quiet: "`pnpm josh issue:read` / `run:prep` / `run:entry`, a `--jq` / `--json` projection without the body or the comments, `gh issue view --web`, or another repository named outright"
|
|
43587
43822
|
}
|
|
43588
43823
|
};
|
|
43589
|
-
var direct_issue_read = {
|
|
43824
|
+
var direct_issue_read = {
|
|
43825
|
+
DIRECT_ISSUE_READ_REASON,
|
|
43826
|
+
ISSUE_READ_NOTE,
|
|
43827
|
+
ROW: ROW11,
|
|
43828
|
+
is_direct_issue_read,
|
|
43829
|
+
issue_read_command
|
|
43830
|
+
};
|
|
43590
43831
|
|
|
43591
43832
|
// scripts/rules/direct-vitest-run.ts
|
|
43592
43833
|
var VITEST_PROGRAM = "vitest";
|
|
@@ -43920,7 +44161,7 @@ var run_progress_config = {
|
|
|
43920
44161
|
|
|
43921
44162
|
// scripts/rules/early-heartbeat.ts
|
|
43922
44163
|
var ARM_PREFIX = "josh-heartbeat-arm-";
|
|
43923
|
-
var
|
|
44164
|
+
var SEGMENT_SEPARATOR = /&&|\|\||;|&|\n/u;
|
|
43924
44165
|
var SLEEP_SEGMENT = /^sleep\s+(\d+(?:\.\d+)?)([smhd]?)$/u;
|
|
43925
44166
|
var INERT_SEGMENT = /^(?::|true|(?:echo|printf|date)\b.*)$/u;
|
|
43926
44167
|
var LOOP_KEYWORD = /\b(?:while|until|for|do|done)\b/u;
|
|
@@ -43931,7 +44172,7 @@ var UNIT_GROUP = 2;
|
|
|
43931
44172
|
var NO_SECONDS = 0;
|
|
43932
44173
|
var ARM_RECORD = hook_decision.create_refusal_stamp(ARM_PREFIX);
|
|
43933
44174
|
function segments_of2(command3) {
|
|
43934
|
-
return command3.split(
|
|
44175
|
+
return command3.split(SEGMENT_SEPARATOR).map((segment) => segment.trim()).filter((segment) => segment !== "");
|
|
43935
44176
|
}
|
|
43936
44177
|
function sleep_seconds(segment) {
|
|
43937
44178
|
const matched = SLEEP_SEGMENT.exec(segment);
|
|
@@ -44062,10 +44303,10 @@ function is_interpreter_write(segment, body) {
|
|
|
44062
44303
|
}
|
|
44063
44304
|
var PERL = "perl";
|
|
44064
44305
|
var PERL_IN_PLACE = /^-[A-Za-z0-9]*i/u;
|
|
44065
|
-
var
|
|
44306
|
+
var WHITESPACE2 = /\s+/u;
|
|
44066
44307
|
function is_in_place_perl(segment) {
|
|
44067
44308
|
if (time_shell.leading_word(segment) !== PERL) return false;
|
|
44068
|
-
return segment.split(
|
|
44309
|
+
return segment.split(WHITESPACE2).some((word2) => PERL_IN_PLACE.test(word2));
|
|
44069
44310
|
}
|
|
44070
44311
|
function has_body_interpreter(line2) {
|
|
44071
44312
|
return shell_segments.segments_of(line2.text).some((segment) => is_interpreter_write(segment, line2.body) || is_in_place_perl(segment));
|
|
@@ -44463,11 +44704,11 @@ var git_force = {
|
|
|
44463
44704
|
};
|
|
44464
44705
|
|
|
44465
44706
|
// scripts/rules/implementation-cut.ts
|
|
44466
|
-
import
|
|
44707
|
+
import path43 from "node:path";
|
|
44467
44708
|
|
|
44468
44709
|
// scripts/cost-runtime/codex-usage.ts
|
|
44469
44710
|
import { globSync, readFileSync as readFileSync16 } from "node:fs";
|
|
44470
|
-
import
|
|
44711
|
+
import path40 from "node:path";
|
|
44471
44712
|
var THREAD_ID_PATTERN = /^[A-Za-z0-9-]+$/u;
|
|
44472
44713
|
var SESSION_META_SCHEMA = external_exports.looseObject({
|
|
44473
44714
|
type: external_exports.literal("session_meta"),
|
|
@@ -44509,7 +44750,7 @@ function measurement_from(content, target3, thread_id) {
|
|
|
44509
44750
|
function rollout_files(home, thread_id) {
|
|
44510
44751
|
if (!THREAD_ID_PATTERN.test(thread_id)) return [];
|
|
44511
44752
|
return globSync(`sessions/**/*${thread_id}.jsonl`, { cwd: home }).map(
|
|
44512
|
-
(file2) =>
|
|
44753
|
+
(file2) => path40.join(home, file2)
|
|
44513
44754
|
);
|
|
44514
44755
|
}
|
|
44515
44756
|
function read_measurement(file2, target3, thread_id) {
|
|
@@ -44529,7 +44770,7 @@ function latest_measurement(files2, target3, thread_id) {
|
|
|
44529
44770
|
function measurement(target3, default_home, environment3 = process.env) {
|
|
44530
44771
|
const thread_id = environment3["CODEX_THREAD_ID"];
|
|
44531
44772
|
if (thread_id === void 0) return void 0;
|
|
44532
|
-
const home = environment3["CODEX_HOME"] ??
|
|
44773
|
+
const home = environment3["CODEX_HOME"] ?? path40.join(default_home, ".codex");
|
|
44533
44774
|
return latest_measurement(rollout_files(home, thread_id), target3, thread_id);
|
|
44534
44775
|
}
|
|
44535
44776
|
var codex_usage = { measurement };
|
|
@@ -44827,9 +45068,9 @@ var cost_verdict = {
|
|
|
44827
45068
|
};
|
|
44828
45069
|
|
|
44829
45070
|
// scripts/cost-runtime/transcript-cwd.ts
|
|
44830
|
-
import
|
|
45071
|
+
import path41 from "node:path";
|
|
44831
45072
|
function resolve3(target3, cwd) {
|
|
44832
|
-
return target3 === void 0 ? cwd :
|
|
45073
|
+
return target3 === void 0 ? cwd : path41.resolve(target3);
|
|
44833
45074
|
}
|
|
44834
45075
|
var transcript_cwd = { resolve: resolve3 };
|
|
44835
45076
|
|
|
@@ -44855,8 +45096,8 @@ function limit_of(limit, measurement2) {
|
|
|
44855
45096
|
function threshold_option(over) {
|
|
44856
45097
|
return over === void 0 ? {} : { over };
|
|
44857
45098
|
}
|
|
44858
|
-
function path_option(
|
|
44859
|
-
return
|
|
45099
|
+
function path_option(path78) {
|
|
45100
|
+
return path78 === void 0 ? {} : { path: path78 };
|
|
44860
45101
|
}
|
|
44861
45102
|
function cut_options(values) {
|
|
44862
45103
|
return values.over === void 0 ? { over: CUT_LIMIT, ...path_option(values.path) } : void 0;
|
|
@@ -45327,7 +45568,7 @@ function release2(target3, cut, issue3) {
|
|
|
45327
45568
|
var run_cut_adoption = { can_replace, release: release2, session };
|
|
45328
45569
|
|
|
45329
45570
|
// scripts/run/cut/run-cut-digest.ts
|
|
45330
|
-
import
|
|
45571
|
+
import path42 from "node:path";
|
|
45331
45572
|
var session_digest_schema = external_exports.object({
|
|
45332
45573
|
read: external_exports.array(external_exports.string()),
|
|
45333
45574
|
decisions: external_exports.array(external_exports.string())
|
|
@@ -45342,7 +45583,7 @@ var ASSISTANT = "assistant";
|
|
|
45342
45583
|
var READ_LABEL = "Already read before the cut \u2014 re-read only the lines you need";
|
|
45343
45584
|
var DECISIONS_LABEL = "Decided before the cut \u2014 do not reopen";
|
|
45344
45585
|
function shown_path(target3, cwd) {
|
|
45345
|
-
const relative =
|
|
45586
|
+
const relative = path42.relative(cwd, path42.resolve(cwd, target3));
|
|
45346
45587
|
return relative.startsWith("..") ? target3 : relative;
|
|
45347
45588
|
}
|
|
45348
45589
|
function newest_unique(entries, limit) {
|
|
@@ -45405,7 +45646,7 @@ var run_cut_digest = {
|
|
|
45405
45646
|
|
|
45406
45647
|
// scripts/run/cut/run-cut.ts
|
|
45407
45648
|
var CUT_PREFIX = "josh-run-cut-";
|
|
45408
|
-
var { PRE_GATE_PHASE:
|
|
45649
|
+
var { PRE_GATE_PHASE: PRE_GATE_PHASE4, IMPLEMENTATION_PHASE: IMPLEMENTATION_PHASE3 } = agent_profile_schema;
|
|
45409
45650
|
var CUT_MAX_AGE_MS = backlog_budget.DEFAULT_IDLE_MS;
|
|
45410
45651
|
var CUT_MAX_AGE_HOURS = backlog_budget.IDLE_WAIT_HOURS;
|
|
45411
45652
|
var END_COMMAND2 = "pnpm josh run:cut --end";
|
|
@@ -45588,7 +45829,7 @@ var run_cut = {
|
|
|
45588
45829
|
END_COMMAND: END_COMMAND2,
|
|
45589
45830
|
IMPLEMENTATION_PHASE: IMPLEMENTATION_PHASE3,
|
|
45590
45831
|
MAX_HANDOFF_BYTES,
|
|
45591
|
-
PRE_GATE_PHASE:
|
|
45832
|
+
PRE_GATE_PHASE: PRE_GATE_PHASE4,
|
|
45592
45833
|
adopt_cut,
|
|
45593
45834
|
begin_cut,
|
|
45594
45835
|
busy_message: busy_message2,
|
|
@@ -45747,7 +45988,7 @@ function environment_for3(transcript, source) {
|
|
|
45747
45988
|
}
|
|
45748
45989
|
return {
|
|
45749
45990
|
...source,
|
|
45750
|
-
[agent_session_environment.SESSION_ID_KEY]:
|
|
45991
|
+
[agent_session_environment.SESSION_ID_KEY]: path43.basename(transcript, ".jsonl")
|
|
45751
45992
|
};
|
|
45752
45993
|
}
|
|
45753
45994
|
function session_verdict2(transcript, directory, source) {
|
|
@@ -45794,8 +46035,8 @@ function file_path_of(call) {
|
|
|
45794
46035
|
return typeof value2 === "string" ? value2 : "";
|
|
45795
46036
|
}
|
|
45796
46037
|
function is_handoff_write(call, directory, issue3) {
|
|
45797
|
-
const handoff2 =
|
|
45798
|
-
return
|
|
46038
|
+
const handoff2 = path43.resolve(directory, run_cut_handoff.handoff_path_of(issue3));
|
|
46039
|
+
return path43.resolve(directory, file_path_of(call)) === handoff2;
|
|
45799
46040
|
}
|
|
45800
46041
|
function refusable_issue(call, state) {
|
|
45801
46042
|
const issue3 = uncut_run_issue(state);
|
|
@@ -46596,8 +46837,8 @@ function fallback_reason(action) {
|
|
|
46596
46837
|
return action.kind === "notify" ? STOP_NOTIFY_REASON : HOLD_RELEASE_REASON;
|
|
46597
46838
|
}
|
|
46598
46839
|
function block_envelope(reason4, lang, notice3) {
|
|
46599
|
-
const
|
|
46600
|
-
return JSON.stringify(notice3 === void 0 ?
|
|
46840
|
+
const refusal6 = { decision: BLOCK_DECISION, reason: `${reason4} ${language_note(lang)}` };
|
|
46841
|
+
return JSON.stringify(notice3 === void 0 ? refusal6 : { ...refusal6, systemMessage: notice3 });
|
|
46601
46842
|
}
|
|
46602
46843
|
function notice_envelope3(notice3) {
|
|
46603
46844
|
return JSON.stringify({ systemMessage: notice3 });
|
|
@@ -46856,7 +47097,7 @@ function is_headless(source = process.env) {
|
|
|
46856
47097
|
var agent_headless = { KEY: KEY4, environment, is_headless };
|
|
46857
47098
|
|
|
46858
47099
|
// scripts/agent/agent-launch-environment.ts
|
|
46859
|
-
var
|
|
47100
|
+
var OPENAI_PROVIDER6 = "openai";
|
|
46860
47101
|
function build2(profile, environment3 = {}) {
|
|
46861
47102
|
if (profile === void 0) return { ...environment3, [agent_session_role.KEY]: void 0 };
|
|
46862
47103
|
const marked = {
|
|
@@ -46864,7 +47105,7 @@ function build2(profile, environment3 = {}) {
|
|
|
46864
47105
|
...environment3,
|
|
46865
47106
|
...agent_session_role.env_for(profile.role)
|
|
46866
47107
|
};
|
|
46867
|
-
return profile.provider ===
|
|
47108
|
+
return profile.provider === OPENAI_PROVIDER6 ? { TMPDIR: PLATFORM_TEMP_ROOT, ...marked } : marked;
|
|
46868
47109
|
}
|
|
46869
47110
|
var agent_launch_environment = { build: build2 };
|
|
46870
47111
|
|
|
@@ -48335,17 +48576,17 @@ function word_before(segment, call) {
|
|
|
48335
48576
|
const words = git_argv.words_of(segment);
|
|
48336
48577
|
return words[words.length - call.args.length - BEFORE_PROGRAM] ?? "";
|
|
48337
48578
|
}
|
|
48338
|
-
function
|
|
48579
|
+
function call_of2(segment) {
|
|
48339
48580
|
const call = git_argv.program_of(segment);
|
|
48340
48581
|
if (call === void 0) return void 0;
|
|
48341
48582
|
const is_lookup = LOOKUP_FLAGS.has(call.name) && plain_name(word_before(segment, call)) === LOOKUP_WRAPPER;
|
|
48342
48583
|
return { name: is_lookup ? LOOKUP_WRAPPER : plain_name(call.name), args: call.args };
|
|
48343
48584
|
}
|
|
48344
48585
|
function resolved_call(segment) {
|
|
48345
|
-
let call =
|
|
48586
|
+
let call = call_of2(segment);
|
|
48346
48587
|
let inner = inner_words_of(call);
|
|
48347
48588
|
while (inner !== void 0) {
|
|
48348
|
-
call =
|
|
48589
|
+
call = call_of2(inner.join(" "));
|
|
48349
48590
|
inner = inner_words_of(call);
|
|
48350
48591
|
}
|
|
48351
48592
|
return call;
|
|
@@ -48668,15 +48909,15 @@ var PUSH_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
|
48668
48909
|
"-o",
|
|
48669
48910
|
"--push-option"
|
|
48670
48911
|
]);
|
|
48671
|
-
var
|
|
48912
|
+
var QUOTING3 = /["'\\]/gu;
|
|
48672
48913
|
var PUSH_CONFIG = /^(?:remote\.|url\.|core\.(?:sshCommand|gitProxy))/iu;
|
|
48673
48914
|
var CONFIG_ENVIRONMENT = /^GIT_CONFIG(?:_[A-Z0-9_]+)?=/u;
|
|
48674
48915
|
function has_push_config(line2) {
|
|
48675
|
-
return git_argv.config_arguments_of(line2).some((word2) => PUSH_CONFIG.test(word2.replaceAll(
|
|
48916
|
+
return git_argv.config_arguments_of(line2).some((word2) => PUSH_CONFIG.test(word2.replaceAll(QUOTING3, "")));
|
|
48676
48917
|
}
|
|
48677
48918
|
function has_config_environment(segment, call) {
|
|
48678
48919
|
const prefix2 = git_argv.words_of(segment).slice(0, -(call.args.length + 1));
|
|
48679
|
-
return prefix2.some((word2) => CONFIG_ENVIRONMENT.test(word2.replaceAll(
|
|
48920
|
+
return prefix2.some((word2) => CONFIG_ENVIRONMENT.test(word2.replaceAll(QUOTING3, "")));
|
|
48680
48921
|
}
|
|
48681
48922
|
function has_push_override(segment, call, args) {
|
|
48682
48923
|
const line2 = [call.name, ...call.args].join(" ");
|
|
@@ -48697,7 +48938,7 @@ function is_foreign_push(segment, call) {
|
|
|
48697
48938
|
if (parsed?.subcommand !== PUSH) return false;
|
|
48698
48939
|
if (has_push_override(segment, call, parsed.args)) return true;
|
|
48699
48940
|
const remote = parsed.args.find((word2) => !word2.startsWith(FLAG_PREFIX13));
|
|
48700
|
-
return remote?.replaceAll(
|
|
48941
|
+
return remote?.replaceAll(QUOTING3, "") !== ORIGIN;
|
|
48701
48942
|
}
|
|
48702
48943
|
function is_restricted(segment, call) {
|
|
48703
48944
|
const plain2 = {
|
|
@@ -49022,22 +49263,22 @@ var ROW36 = {
|
|
|
49022
49263
|
var index_guard = { INDEX_MUTATION_REASON, ROW: ROW36, is_index_mutation };
|
|
49023
49264
|
|
|
49024
49265
|
// scripts/rules/protected-files.ts
|
|
49025
|
-
import
|
|
49266
|
+
import path46 from "node:path";
|
|
49026
49267
|
|
|
49027
49268
|
// scripts/doctor/doctor-consumer.ts
|
|
49028
49269
|
import { existsSync as existsSync8 } from "node:fs";
|
|
49029
|
-
import
|
|
49270
|
+
import path44 from "node:path";
|
|
49030
49271
|
|
|
49031
49272
|
// scripts/version/kit-descriptor.ts
|
|
49032
49273
|
var KIT_PACKAGE_NAME = "@joshuafolkken/kit";
|
|
49033
49274
|
|
|
49034
49275
|
// scripts/doctor/doctor-consumer.ts
|
|
49035
49276
|
var NODE_MODULES = "node_modules";
|
|
49036
|
-
var SETTINGS_PATH =
|
|
49277
|
+
var SETTINGS_PATH = path44.join(".claude", "settings.json");
|
|
49037
49278
|
var CLAUDE_MD = "CLAUDE.md";
|
|
49038
49279
|
var PLUGIN_ID = "kit@kit";
|
|
49039
49280
|
var CLAUDE_MD_POINTER = `@${NODE_MODULES}/${KIT_PACKAGE_NAME}/dist/${CLAUDE_MD}`;
|
|
49040
|
-
var SECRETLINT_BIN =
|
|
49281
|
+
var SECRETLINT_BIN = path44.join(NODE_MODULES, ".bin", "secretlint");
|
|
49041
49282
|
var manifest_schema = external_exports.object({
|
|
49042
49283
|
name: external_exports.string().optional(),
|
|
49043
49284
|
dependencies: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
@@ -49059,10 +49300,10 @@ function lists_kit_dependency(manifest) {
|
|
|
49059
49300
|
function is_kit_consumer(root2) {
|
|
49060
49301
|
const manifest = parse_manifest(root2);
|
|
49061
49302
|
if (manifest?.name === KIT_PACKAGE_NAME) return false;
|
|
49062
|
-
return lists_kit_dependency(manifest) || existsSync8(
|
|
49303
|
+
return lists_kit_dependency(manifest) || existsSync8(path44.join(root2, NODE_MODULES, KIT_PACKAGE_NAME));
|
|
49063
49304
|
}
|
|
49064
49305
|
function is_plugin_declared(root2) {
|
|
49065
|
-
const content = file_reader.read_if_readable(
|
|
49306
|
+
const content = file_reader.read_if_readable(path44.join(root2, SETTINGS_PATH));
|
|
49066
49307
|
if (content === void 0) return false;
|
|
49067
49308
|
const parsed = settings_schema.safeParse(json_value.parse_or_undefined(content));
|
|
49068
49309
|
return parsed.success && parsed.data.enabledPlugins?.[PLUGIN_ID] === true;
|
|
@@ -49074,13 +49315,13 @@ function configured_hooks_path(root2) {
|
|
|
49074
49315
|
return value2 === "" ? void 0 : value2;
|
|
49075
49316
|
}
|
|
49076
49317
|
function claude_md_state(root2) {
|
|
49077
|
-
const content = file_reader.read_if_readable(
|
|
49318
|
+
const content = file_reader.read_if_readable(path44.join(root2, CLAUDE_MD));
|
|
49078
49319
|
if (content === void 0) return STATE_MISSING;
|
|
49079
49320
|
if (!content.includes(CLAUDE_MD_POINTER)) return STATE_OK;
|
|
49080
|
-
return existsSync8(
|
|
49321
|
+
return existsSync8(path44.join(root2, NODE_MODULES, KIT_PACKAGE_NAME, "dist", CLAUDE_MD)) ? STATE_OK : STATE_TARGET_MISSING;
|
|
49081
49322
|
}
|
|
49082
49323
|
function is_secretlint_runnable(root2) {
|
|
49083
|
-
return existsSync8(
|
|
49324
|
+
return existsSync8(path44.join(root2, SECRETLINT_BIN));
|
|
49084
49325
|
}
|
|
49085
49326
|
function status_line(is_ok, ok_text, warn_text) {
|
|
49086
49327
|
return is_ok ? ` \u2713 ${ok_text}` : ` \u26A0 ${warn_text}`;
|
|
@@ -49142,7 +49383,7 @@ var doctor_consumer = {
|
|
|
49142
49383
|
|
|
49143
49384
|
// scripts/rules/secret-paths.ts
|
|
49144
49385
|
import os3 from "node:os";
|
|
49145
|
-
import
|
|
49386
|
+
import path45 from "node:path";
|
|
49146
49387
|
var TOKEN_QUOTES = /["']/gu;
|
|
49147
49388
|
var BRACED_VARIABLE = /\$\{(\w+)\}/gu;
|
|
49148
49389
|
var BACKSLASH = /\\/gu;
|
|
@@ -49159,7 +49400,7 @@ var HOME_PREFIXES = ["~/", "$HOME/"];
|
|
|
49159
49400
|
var HOME_SECRET_FILES = /* @__PURE__ */ new Set([".netrc", ".curlrc", ".npmrc"]);
|
|
49160
49401
|
var HOME_SECRET_DIRECTORIES = [".ssh", ".config/gh"];
|
|
49161
49402
|
function is_environment_file(token) {
|
|
49162
|
-
const name =
|
|
49403
|
+
const name = path45.basename(token);
|
|
49163
49404
|
if (TRACKED_VARIANTS.has(name)) return false;
|
|
49164
49405
|
return SECRET_FILES.has(name) || name.startsWith(ENVIRONMENT_VARIANT_PREFIX);
|
|
49165
49406
|
}
|
|
@@ -49184,7 +49425,7 @@ function is_secret_token(token) {
|
|
|
49184
49425
|
function spellings_of(word2) {
|
|
49185
49426
|
const token = word2.replaceAll(TOKEN_QUOTES, "").replaceAll(BRACED_VARIABLE, "$$$1");
|
|
49186
49427
|
return [token.replaceAll(BACKSLASH, ""), token.replaceAll(BACKSLASH, "/")].map(
|
|
49187
|
-
(spelling) =>
|
|
49428
|
+
(spelling) => path45.posix.normalize(spelling)
|
|
49188
49429
|
);
|
|
49189
49430
|
}
|
|
49190
49431
|
function is_secret_path(word2) {
|
|
@@ -49197,7 +49438,7 @@ var READ_MARK = "read";
|
|
|
49197
49438
|
var WRITE_MARK = "write";
|
|
49198
49439
|
var READ_OPERATOR = "<";
|
|
49199
49440
|
var REDIRECT = />\||[<>]/gu;
|
|
49200
|
-
var
|
|
49441
|
+
var PIECE_END = "\0";
|
|
49201
49442
|
var NEXT8 = 1;
|
|
49202
49443
|
var ANY_MARK = /* @__PURE__ */ new Set([READ_MARK, WRITE_MARK]);
|
|
49203
49444
|
var { SHELLS: SHELLS3 } = nested_commands;
|
|
@@ -49208,13 +49449,16 @@ function redirect_marks_of(segment, program) {
|
|
|
49208
49449
|
function mark_of(operator) {
|
|
49209
49450
|
return operator === READ_OPERATOR ? READ_MARK : WRITE_MARK;
|
|
49210
49451
|
}
|
|
49211
|
-
function
|
|
49212
|
-
const
|
|
49213
|
-
const spaced = segment.replaceAll(
|
|
49452
|
+
function marked_pieces(word2, marks) {
|
|
49453
|
+
const pieced = word2.text.replaceAll(
|
|
49214
49454
|
REDIRECT,
|
|
49215
|
-
(operator, offset) => marks.startsWith(operator, offset) ?
|
|
49455
|
+
(operator, offset) => marks.startsWith(operator, word2.begin + offset) ? `${PIECE_END}${mark_of(operator)}${PIECE_END}` : operator
|
|
49216
49456
|
);
|
|
49217
|
-
return
|
|
49457
|
+
return pieced.split(PIECE_END).filter((piece) => piece !== "");
|
|
49458
|
+
}
|
|
49459
|
+
function marked_words(segment, program) {
|
|
49460
|
+
const marks = redirect_marks_of(segment, program);
|
|
49461
|
+
return shell_tokens.words_of(segment).flatMap((word2) => marked_pieces(word2, marks));
|
|
49218
49462
|
}
|
|
49219
49463
|
function targets_of(segment, program) {
|
|
49220
49464
|
const words = marked_words(segment, program);
|
|
@@ -49228,7 +49472,7 @@ var GREP_TOOL = "Grep";
|
|
|
49228
49472
|
var FILE_TOOLS = /* @__PURE__ */ new Set([READ_TOOL3, GREP_TOOL]);
|
|
49229
49473
|
var { is_edit_tool: is_edit_tool4 } = edit_tool;
|
|
49230
49474
|
var { is_secret_path: is_secret_path2 } = secret_paths;
|
|
49231
|
-
var SETTINGS_FILE =
|
|
49475
|
+
var SETTINGS_FILE = path46.join(".claude", "settings.json");
|
|
49232
49476
|
var SHELL_PROGRAMS = /* @__PURE__ */ new Set([
|
|
49233
49477
|
"cp",
|
|
49234
49478
|
"install",
|
|
@@ -49293,9 +49537,9 @@ function is_secret_access(call) {
|
|
|
49293
49537
|
}
|
|
49294
49538
|
function is_consumer_settings_edit(call, is_kit_consumer2) {
|
|
49295
49539
|
if (!is_edit_tool4(call.name)) return false;
|
|
49296
|
-
const file_path3 =
|
|
49297
|
-
if (!file_path3.endsWith(`${
|
|
49298
|
-
return is_kit_consumer2(
|
|
49540
|
+
const file_path3 = path46.resolve(file_path_of2(call));
|
|
49541
|
+
if (!file_path3.endsWith(`${path46.sep}${SETTINGS_FILE}`)) return false;
|
|
49542
|
+
return is_kit_consumer2(path46.dirname(path46.dirname(file_path3)));
|
|
49299
49543
|
}
|
|
49300
49544
|
function is_protected_file_call(call, is_kit_consumer2 = doctor_consumer.is_kit_consumer) {
|
|
49301
49545
|
return is_secret_access(call) || is_consumer_settings_edit(call, is_kit_consumer2);
|
|
@@ -49935,12 +50179,12 @@ var shell_body_trigger = {
|
|
|
49935
50179
|
|
|
49936
50180
|
// scripts/gate/project-checks.ts
|
|
49937
50181
|
import { existsSync as existsSync21, globSync as globSync2 } from "node:fs";
|
|
49938
|
-
import
|
|
50182
|
+
import path65 from "node:path";
|
|
49939
50183
|
|
|
49940
50184
|
// scripts/build/local-bin.ts
|
|
49941
50185
|
import { existsSync as existsSync9, readFileSync as readFileSync17 } from "node:fs";
|
|
49942
50186
|
import { createRequire } from "node:module";
|
|
49943
|
-
import
|
|
50187
|
+
import path47 from "node:path";
|
|
49944
50188
|
|
|
49945
50189
|
// scripts/lib/pnpm-reach.ts
|
|
49946
50190
|
var PREREQUISITES_URL = "https://github.com/joshuafolkken/kit/blob/main/docs/setup/prerequisites.md#2-install-pnpm-and-nodejs";
|
|
@@ -49988,7 +50232,7 @@ var WINDOWS_PLATFORM3 = "win32";
|
|
|
49988
50232
|
var WINDOWS_SHIM_SUFFIX = ".cmd";
|
|
49989
50233
|
function resolve_local_bin(project_root2, bin_name) {
|
|
49990
50234
|
const shim = process.platform === WINDOWS_PLATFORM3 ? `${bin_name}${WINDOWS_SHIM_SUFFIX}` : bin_name;
|
|
49991
|
-
return
|
|
50235
|
+
return path47.join(project_root2, NODE_MODULES2, BIN_DIR, shim);
|
|
49992
50236
|
}
|
|
49993
50237
|
function find_local_bin_upwards(start_directory, bin_name) {
|
|
49994
50238
|
return ancestor_directories.list(start_directory).map((directory) => resolve_local_bin(directory, bin_name)).find((candidate) => existsSync9(candidate));
|
|
@@ -49996,7 +50240,7 @@ function find_local_bin_upwards(start_directory, bin_name) {
|
|
|
49996
50240
|
|
|
49997
50241
|
// scripts/init/own-formatter.ts
|
|
49998
50242
|
import { existsSync as existsSync10 } from "node:fs";
|
|
49999
|
-
import
|
|
50243
|
+
import path48 from "node:path";
|
|
50000
50244
|
var OWN_FORMATTER_CONFIGS = [
|
|
50001
50245
|
"biome.json",
|
|
50002
50246
|
"biome.jsonc",
|
|
@@ -50006,22 +50250,22 @@ var OWN_FORMATTER_CONFIGS = [
|
|
|
50006
50250
|
".dprint.jsonc"
|
|
50007
50251
|
];
|
|
50008
50252
|
function find_config(root2) {
|
|
50009
|
-
return OWN_FORMATTER_CONFIGS.find((name) => existsSync10(
|
|
50253
|
+
return OWN_FORMATTER_CONFIGS.find((name) => existsSync10(path48.join(root2, name)));
|
|
50010
50254
|
}
|
|
50011
50255
|
var own_formatter = { find_config };
|
|
50012
50256
|
|
|
50013
50257
|
// scripts/init/project-profile.ts
|
|
50014
50258
|
import { existsSync as existsSync20, readdirSync as readdirSync10 } from "node:fs";
|
|
50015
|
-
import
|
|
50259
|
+
import path64 from "node:path";
|
|
50016
50260
|
|
|
50017
50261
|
// scripts/safe-chain/pack-hook.ts
|
|
50018
50262
|
import { existsSync as existsSync11, readFileSync as readFileSync19, rmSync as rmSync6 } from "node:fs";
|
|
50019
|
-
import
|
|
50263
|
+
import path50 from "node:path";
|
|
50020
50264
|
|
|
50021
50265
|
// scripts/sync/file-content.ts
|
|
50022
50266
|
import { lstatSync as lstatSync5, mkdirSync as mkdirSync5, readFileSync as readFileSync18, readlinkSync, writeFileSync as writeFileSync6 } from "node:fs";
|
|
50023
|
-
import
|
|
50024
|
-
var PATH_SEPARATORS =
|
|
50267
|
+
import path49 from "node:path";
|
|
50268
|
+
var PATH_SEPARATORS = path49.sep === "\\" ? /[/\\]/u : /\//u;
|
|
50025
50269
|
|
|
50026
50270
|
// scripts/safe-chain/pack-hook.ts
|
|
50027
50271
|
var PACK_HOOK_FILE = ".pnpmfile.mjs";
|
|
@@ -50036,7 +50280,7 @@ var MESSAGES = {
|
|
|
50036
50280
|
|
|
50037
50281
|
// scripts/safe-chain/project-config.ts
|
|
50038
50282
|
import { existsSync as existsSync12, readFileSync as readFileSync21 } from "node:fs";
|
|
50039
|
-
import
|
|
50283
|
+
import path53 from "node:path";
|
|
50040
50284
|
|
|
50041
50285
|
// node_modules/.pnpm/js-yaml@5.5.0/node_modules/js-yaml/dist/js-yaml.mjs
|
|
50042
50286
|
var NOT_RESOLVED = /* @__PURE__ */ Symbol("NOT_RESOLVED");
|
|
@@ -53227,11 +53471,11 @@ function parse_yaml_documents(content) {
|
|
|
53227
53471
|
var yaml_document = { is_mapping_document, parse_yaml, parse_yaml_documents };
|
|
53228
53472
|
|
|
53229
53473
|
// scripts/version/release-window.ts
|
|
53230
|
-
import
|
|
53474
|
+
import path52 from "node:path";
|
|
53231
53475
|
|
|
53232
53476
|
// scripts/version/release-age.ts
|
|
53233
53477
|
import { readFileSync as readFileSync20 } from "node:fs";
|
|
53234
|
-
import
|
|
53478
|
+
import path51 from "node:path";
|
|
53235
53479
|
var import_semver = __toESM(require_semver2(), 1);
|
|
53236
53480
|
var NO_QUARANTINE_MINUTES = 0;
|
|
53237
53481
|
var WORKSPACE_PATH = "pnpm-workspace.yaml";
|
|
@@ -53277,14 +53521,14 @@ function read_minimum_release_age(workspace_path = WORKSPACE_PATH) {
|
|
|
53277
53521
|
return read_declared_minimum_release_age(workspace_path) ?? NO_QUARANTINE_MINUTES;
|
|
53278
53522
|
}
|
|
53279
53523
|
function find_declared_minimum_release_age(start2, boundary) {
|
|
53280
|
-
const declared = read_declared_minimum_release_age(
|
|
53524
|
+
const declared = read_declared_minimum_release_age(path51.join(start2, WORKSPACE_PATH));
|
|
53281
53525
|
if (declared !== void 0) return declared;
|
|
53282
53526
|
if (start2 === boundary) return void 0;
|
|
53283
|
-
const parent =
|
|
53527
|
+
const parent = path51.dirname(start2);
|
|
53284
53528
|
return parent === start2 ? void 0 : find_declared_minimum_release_age(parent, boundary);
|
|
53285
53529
|
}
|
|
53286
53530
|
function read_nearest_minimum_release_age(start2, boundary) {
|
|
53287
|
-
return find_declared_minimum_release_age(
|
|
53531
|
+
return find_declared_minimum_release_age(path51.resolve(start2), boundary) ?? NO_QUARANTINE_MINUTES;
|
|
53288
53532
|
}
|
|
53289
53533
|
var release_age = {
|
|
53290
53534
|
release_times_schema,
|
|
@@ -53763,10 +54007,10 @@ function set_json_key(content, key3, value2) {
|
|
|
53763
54007
|
const indented = fit_value(content, value_text, line_indent(content, existing.offset));
|
|
53764
54008
|
return with_trailing_newline(replace_range(content, existing, indented));
|
|
53765
54009
|
}
|
|
53766
|
-
function resolve_parent(content,
|
|
54010
|
+
function resolve_parent(content, path78) {
|
|
53767
54011
|
const root2 = parse_root(content);
|
|
53768
54012
|
if (root2 === void 0) return void 0;
|
|
53769
|
-
const parent =
|
|
54013
|
+
const parent = path78.length > 1 ? findNodeAtLocation(root2, path78.slice(0, -1)) : root2;
|
|
53770
54014
|
return parent?.type === "object" ? parent : void 0;
|
|
53771
54015
|
}
|
|
53772
54016
|
function cut_ranges(content, parent, ranges) {
|
|
@@ -53777,24 +54021,24 @@ function cut_ranges(content, parent, ranges) {
|
|
|
53777
54021
|
}
|
|
53778
54022
|
return next;
|
|
53779
54023
|
}
|
|
53780
|
-
function rebalance_new_last(content,
|
|
53781
|
-
const parent = resolve_parent(content,
|
|
54024
|
+
function rebalance_new_last(content, path78) {
|
|
54025
|
+
const parent = resolve_parent(content, path78);
|
|
53782
54026
|
const last = parent?.children?.at(-1);
|
|
53783
54027
|
if (parent === void 0 || last === void 0) return content;
|
|
53784
54028
|
return rebalance(content, last, has_separator_after(content, parent.offset, parent.offset));
|
|
53785
54029
|
}
|
|
53786
|
-
function cut_property(content, parent,
|
|
53787
|
-
const index = property_index(parent,
|
|
54030
|
+
function cut_property(content, parent, path78) {
|
|
54031
|
+
const index = property_index(parent, path78.at(-1) ?? "");
|
|
53788
54032
|
const ranges = removal_ranges(content, parent, index);
|
|
53789
54033
|
if (ranges.length === 0) return content;
|
|
53790
54034
|
const cut = cut_ranges(content, parent, ranges);
|
|
53791
54035
|
const did_end_object = index === (parent.children ?? []).length - 1;
|
|
53792
|
-
return did_end_object ? rebalance_new_last(cut,
|
|
54036
|
+
return did_end_object ? rebalance_new_last(cut, path78) : cut;
|
|
53793
54037
|
}
|
|
53794
|
-
function remove_json_path(content,
|
|
53795
|
-
const parent = resolve_parent(content,
|
|
54038
|
+
function remove_json_path(content, path78) {
|
|
54039
|
+
const parent = resolve_parent(content, path78);
|
|
53796
54040
|
if (parent === void 0) return content;
|
|
53797
|
-
const next = cut_property(content, parent,
|
|
54041
|
+
const next = cut_property(content, parent, path78);
|
|
53798
54042
|
return next === content ? content : with_trailing_newline(next);
|
|
53799
54043
|
}
|
|
53800
54044
|
function remove_json_key(content, key3) {
|
|
@@ -53960,13 +54204,13 @@ var kit_base_preset = {
|
|
|
53960
54204
|
|
|
53961
54205
|
// scripts/init/tsconfig-preset-migration.ts
|
|
53962
54206
|
import { existsSync as existsSync13 } from "node:fs";
|
|
53963
|
-
import
|
|
54207
|
+
import path54 from "node:path";
|
|
53964
54208
|
var LEGACY_PRESET_ENTRY = /@joshuafolkken\/[^/]+\/tsconfig\/[^/]+\.jsonc$/u;
|
|
53965
54209
|
var LEGACY_SUFFIX = ".jsonc";
|
|
53966
54210
|
var CURRENT_SUFFIX = ".json";
|
|
53967
54211
|
var EXTENDS_FIELD = "extends";
|
|
53968
54212
|
function is_migration_target_present(base_directory, entry) {
|
|
53969
|
-
return existsSync13(
|
|
54213
|
+
return existsSync13(path54.resolve(base_directory, entry));
|
|
53970
54214
|
}
|
|
53971
54215
|
function migrate_entry(base_directory, entry) {
|
|
53972
54216
|
if (!LEGACY_PRESET_ENTRY.test(entry)) return entry;
|
|
@@ -54379,7 +54623,7 @@ var init_logic_sonar = {
|
|
|
54379
54623
|
|
|
54380
54624
|
// scripts/init/init-logic-templates.ts
|
|
54381
54625
|
import { existsSync as existsSync14, readFileSync as readFileSync22 } from "node:fs";
|
|
54382
|
-
import
|
|
54626
|
+
import path55 from "node:path";
|
|
54383
54627
|
var ESLINT_VANILLA = `import { create_vanilla_config } from '@joshuafolkken/kit/eslint/vanilla'
|
|
54384
54628
|
|
|
54385
54629
|
export default create_vanilla_config({
|
|
@@ -54464,7 +54708,7 @@ function merge_eslint_config(existing) {
|
|
|
54464
54708
|
return apply_rules_template(rules_blocks.join(",\n"));
|
|
54465
54709
|
}
|
|
54466
54710
|
function detect_tailwind_stylesheet(project_root2) {
|
|
54467
|
-
return existsSync14(
|
|
54711
|
+
return existsSync14(path55.join(project_root2, DEFAULT_TAILWIND_STYLESHEET)) ? DEFAULT_TAILWIND_STYLESHEET : void 0;
|
|
54468
54712
|
}
|
|
54469
54713
|
function generate_prettier_config(stylesheet) {
|
|
54470
54714
|
const stylesheet_line = stylesheet === void 0 ? "" : ` tailwindStylesheet: '${stylesheet}',
|
|
@@ -54478,7 +54722,7 @@ ${stylesheet_line}}
|
|
|
54478
54722
|
}
|
|
54479
54723
|
function existing_stylesheet(existing, project_root2) {
|
|
54480
54724
|
const named = TAILWIND_STYLESHEET_PATTERN.exec(existing)?.[1];
|
|
54481
|
-
return named !== void 0 && existsSync14(
|
|
54725
|
+
return named !== void 0 && existsSync14(path55.resolve(project_root2, named)) ? named : void 0;
|
|
54482
54726
|
}
|
|
54483
54727
|
function merge_prettier_config(existing, project_root2) {
|
|
54484
54728
|
const stylesheet = existing_stylesheet(existing, project_root2) ?? detect_tailwind_stylesheet(project_root2);
|
|
@@ -54850,8 +55094,8 @@ function merge_npmrc(content) {
|
|
|
54850
55094
|
return kept2.length === lines.length ? content : kept2.join("\n");
|
|
54851
55095
|
}
|
|
54852
55096
|
function is_gitignore_pattern(line2) {
|
|
54853
|
-
const
|
|
54854
|
-
return
|
|
55097
|
+
const trimmed5 = line2.trim();
|
|
55098
|
+
return trimmed5.length > 0 && !trimmed5.startsWith("#");
|
|
54855
55099
|
}
|
|
54856
55100
|
function merge_gitignore(existing, template) {
|
|
54857
55101
|
const existing_lines = new Set(existing.split("\n"));
|
|
@@ -55121,26 +55365,26 @@ var SYNCED_PATHS_LIST = "SYNCED_PATHS";
|
|
|
55121
55365
|
var PLUGIN_SKILL_DIRECTORIES_LIST = "PLUGIN_SKILL_DIRECTORIES";
|
|
55122
55366
|
var NPM_PUBLISH_FILES_LIST = "NPM_PUBLISH_FILES";
|
|
55123
55367
|
var PATH_SEPARATOR7 = "/";
|
|
55124
|
-
function is_inside(
|
|
55125
|
-
return
|
|
55368
|
+
function is_inside(path78, directory) {
|
|
55369
|
+
return path78 === directory || path78.startsWith(`${directory}${PATH_SEPARATOR7}`);
|
|
55126
55370
|
}
|
|
55127
|
-
function matches_file(
|
|
55128
|
-
return init_logic.get_ai_copy_files().includes(
|
|
55371
|
+
function matches_file(path78) {
|
|
55372
|
+
return init_logic.get_ai_copy_files().includes(path78);
|
|
55129
55373
|
}
|
|
55130
|
-
function matches_mapping(
|
|
55131
|
-
return init_logic.get_ai_copy_file_mappings().some((mapping) => mapping.src ===
|
|
55374
|
+
function matches_mapping(path78) {
|
|
55375
|
+
return init_logic.get_ai_copy_file_mappings().some((mapping) => mapping.src === path78 || mapping.dest === path78);
|
|
55132
55376
|
}
|
|
55133
|
-
function matches_directory(
|
|
55134
|
-
return init_logic.get_ai_copy_directories().some((directory) => is_inside(
|
|
55377
|
+
function matches_directory(path78) {
|
|
55378
|
+
return init_logic.get_ai_copy_directories().some((directory) => is_inside(path78, directory));
|
|
55135
55379
|
}
|
|
55136
|
-
function matches_plugin_skill(
|
|
55137
|
-
return PLUGIN_SKILL_DIRECTORIES.some((directory) => is_inside(
|
|
55380
|
+
function matches_plugin_skill(path78) {
|
|
55381
|
+
return PLUGIN_SKILL_DIRECTORIES.some((directory) => is_inside(path78, directory));
|
|
55138
55382
|
}
|
|
55139
|
-
function matches_synced_path(
|
|
55140
|
-
return synced_paths.get_synced_paths().includes(
|
|
55383
|
+
function matches_synced_path(path78) {
|
|
55384
|
+
return synced_paths.get_synced_paths().includes(path78);
|
|
55141
55385
|
}
|
|
55142
|
-
function matches_npm_publish_file(
|
|
55143
|
-
return
|
|
55386
|
+
function matches_npm_publish_file(path78) {
|
|
55387
|
+
return path78 === npm_publish_files.PUBLISH_WORKFLOW;
|
|
55144
55388
|
}
|
|
55145
55389
|
var MATCHERS = [
|
|
55146
55390
|
{ list: AI_COPY_FILES_LIST, matches: matches_file },
|
|
@@ -55150,18 +55394,18 @@ var MATCHERS = [
|
|
|
55150
55394
|
{ list: SYNCED_PATHS_LIST, matches: matches_synced_path },
|
|
55151
55395
|
{ list: NPM_PUBLISH_FILES_LIST, matches: matches_npm_publish_file }
|
|
55152
55396
|
];
|
|
55153
|
-
function find_list(
|
|
55154
|
-
return MATCHERS.find((matcher) => matcher.matches(
|
|
55397
|
+
function find_list(path78) {
|
|
55398
|
+
return MATCHERS.find((matcher) => matcher.matches(path78))?.list;
|
|
55155
55399
|
}
|
|
55156
|
-
function to_hit(
|
|
55157
|
-
const list3 = find_list(
|
|
55158
|
-
return list3 === void 0 ? void 0 : { path:
|
|
55400
|
+
function to_hit(path78) {
|
|
55401
|
+
const list3 = find_list(path78);
|
|
55402
|
+
return list3 === void 0 ? void 0 : { path: path78, list: list3 };
|
|
55159
55403
|
}
|
|
55160
55404
|
function find_managed_paths(paths2) {
|
|
55161
|
-
return paths2.flatMap((
|
|
55405
|
+
return paths2.flatMap((path78) => to_hit(path78) ?? []);
|
|
55162
55406
|
}
|
|
55163
55407
|
function has_managed_path(paths2) {
|
|
55164
|
-
return paths2.some((
|
|
55408
|
+
return paths2.some((path78) => find_list(path78) !== void 0);
|
|
55165
55409
|
}
|
|
55166
55410
|
function format_hit(hit) {
|
|
55167
55411
|
return `${hit.path} (${hit.list})`;
|
|
@@ -55178,11 +55422,11 @@ var managed_config_scope = {
|
|
|
55178
55422
|
|
|
55179
55423
|
// scripts/init/init-actions.ts
|
|
55180
55424
|
import { readFileSync as readFileSync24 } from "node:fs";
|
|
55181
|
-
import
|
|
55425
|
+
import path57 from "node:path";
|
|
55182
55426
|
|
|
55183
55427
|
// scripts/init/session-language-environment.ts
|
|
55184
55428
|
import { existsSync as existsSync15, readFileSync as readFileSync23 } from "node:fs";
|
|
55185
|
-
import
|
|
55429
|
+
import path56 from "node:path";
|
|
55186
55430
|
|
|
55187
55431
|
// scripts/josh/session-language.ts
|
|
55188
55432
|
var ENV_KEY = "JOSH_SESSION_LANG";
|
|
@@ -55198,7 +55442,7 @@ function is_japanese(lang) {
|
|
|
55198
55442
|
var session_language = { DEFAULT_SESSION_LANG, ENV_KEY, resolve_session_lang, is_japanese };
|
|
55199
55443
|
|
|
55200
55444
|
// scripts/init/session-language-environment.ts
|
|
55201
|
-
var CLAUDE_SETTINGS_PATH =
|
|
55445
|
+
var CLAUDE_SETTINGS_PATH = path56.join(".claude", "settings.json");
|
|
55202
55446
|
var KEY_LINE_PATTERN = new RegExp(
|
|
55203
55447
|
String.raw`^\s*(?:export\s+)?${session_language.ENV_KEY}\s*=`,
|
|
55204
55448
|
"mu"
|
|
@@ -55215,7 +55459,7 @@ var BASIC_PRETTIER_CONFIG = "prettier.config.mjs";
|
|
|
55215
55459
|
|
|
55216
55460
|
// scripts/init/init-ai-copy.ts
|
|
55217
55461
|
import { existsSync as existsSync19, readFileSync as readFileSync28 } from "node:fs";
|
|
55218
|
-
import
|
|
55462
|
+
import path63 from "node:path";
|
|
55219
55463
|
|
|
55220
55464
|
// scripts/managed-marker/managed-marker-logic.ts
|
|
55221
55465
|
var MARKER_TOKEN = "josh-managed-workflow:";
|
|
@@ -55223,21 +55467,21 @@ var MARKER_PREFIX = `# ${MARKER_TOKEN}`;
|
|
|
55223
55467
|
|
|
55224
55468
|
// scripts/sync/directory-copy-guard.ts
|
|
55225
55469
|
import { cpSync, lstatSync as lstatSync6, readdirSync as readdirSync9, readFileSync as readFileSync26 } from "node:fs";
|
|
55226
|
-
import
|
|
55470
|
+
import path61 from "node:path";
|
|
55227
55471
|
|
|
55228
55472
|
// scripts/sync/workflow-pin-logic.ts
|
|
55229
55473
|
import { readdirSync as readdirSync8, readFileSync as readFileSync25 } from "node:fs";
|
|
55230
|
-
import
|
|
55474
|
+
import path58 from "node:path";
|
|
55231
55475
|
|
|
55232
55476
|
// scripts/ci/composite-actions.ts
|
|
55233
55477
|
import { existsSync as existsSync16, readdirSync as readdirSync7 } from "node:fs";
|
|
55234
55478
|
|
|
55235
55479
|
// scripts/init/claude-plugin-config.ts
|
|
55236
|
-
import
|
|
55480
|
+
import path59 from "node:path";
|
|
55237
55481
|
var MARKETPLACE_NAME = "kit";
|
|
55238
55482
|
var PLUGIN_ID2 = "kit@kit";
|
|
55239
55483
|
var MARKETPLACE_PATH = "./node_modules/@joshuafolkken/kit";
|
|
55240
|
-
var CLAUDE_SETTINGS_DESTINATION =
|
|
55484
|
+
var CLAUDE_SETTINGS_DESTINATION = path59.join(".claude", "settings.json");
|
|
55241
55485
|
var PLUGIN_SETTINGS = {
|
|
55242
55486
|
extraKnownMarketplaces: {
|
|
55243
55487
|
[MARKETPLACE_NAME]: { source: { source: "directory", path: MARKETPLACE_PATH } }
|
|
@@ -55326,7 +55570,7 @@ var KIT_COMMAND_MARKERS = [
|
|
|
55326
55570
|
];
|
|
55327
55571
|
|
|
55328
55572
|
// scripts/init/security-policy.ts
|
|
55329
|
-
import
|
|
55573
|
+
import path60 from "node:path";
|
|
55330
55574
|
var SECURITY_MD = "SECURITY.md";
|
|
55331
55575
|
var SECURITY_TEMPLATE = "templates/SECURITY.md";
|
|
55332
55576
|
var REPOSITORY_PLACEHOLDER = "{{REPOSITORY}}";
|
|
@@ -55342,15 +55586,15 @@ function apply_repository(content, repository2) {
|
|
|
55342
55586
|
return content.replaceAll(REPOSITORY_PLACEHOLDER, () => repository2);
|
|
55343
55587
|
}
|
|
55344
55588
|
function apply_repository_for_destination(destination_path, content) {
|
|
55345
|
-
if (
|
|
55346
|
-
const repository2 = repository_at(
|
|
55589
|
+
if (path60.basename(destination_path) !== SECURITY_MD) return content;
|
|
55590
|
+
const repository2 = repository_at(path60.dirname(destination_path));
|
|
55347
55591
|
if (repository2 === void 0) {
|
|
55348
55592
|
throw new Error(`${SECURITY_MD} needs a GitHub origin to name the repository it reports to`);
|
|
55349
55593
|
}
|
|
55350
55594
|
return apply_repository(content, repository2);
|
|
55351
55595
|
}
|
|
55352
55596
|
function does_report_to_kit(root2) {
|
|
55353
|
-
const existing = file_reader.read_if_readable(
|
|
55597
|
+
const existing = file_reader.read_if_readable(path60.join(root2, SECURITY_MD)) ?? "";
|
|
55354
55598
|
return new Set(existing.split(LINK_DELIMITER)).has(KIT_ADVISORY_URL);
|
|
55355
55599
|
}
|
|
55356
55600
|
function unresolved_warning(root2) {
|
|
@@ -55374,7 +55618,7 @@ var security_policy = {
|
|
|
55374
55618
|
|
|
55375
55619
|
// scripts/init/init-sonar.ts
|
|
55376
55620
|
import { existsSync as existsSync18 } from "node:fs";
|
|
55377
|
-
import
|
|
55621
|
+
import path62 from "node:path";
|
|
55378
55622
|
|
|
55379
55623
|
// scripts/security/sonar-file.ts
|
|
55380
55624
|
import { existsSync as existsSync17, readFileSync as readFileSync27 } from "node:fs";
|
|
@@ -55518,12 +55762,12 @@ function should_visit(entry) {
|
|
|
55518
55762
|
function scan_directory(directory, pending) {
|
|
55519
55763
|
const entries = readdirSync10(directory, { withFileTypes: true });
|
|
55520
55764
|
pending.push(
|
|
55521
|
-
...entries.filter((entry) => should_visit(entry)).map((entry) =>
|
|
55765
|
+
...entries.filter((entry) => should_visit(entry)).map((entry) => path64.join(directory, entry.name))
|
|
55522
55766
|
);
|
|
55523
|
-
return entries.filter((entry) => entry.isFile()).map((entry) =>
|
|
55767
|
+
return entries.filter((entry) => entry.isFile()).map((entry) => path64.join(directory, entry.name));
|
|
55524
55768
|
}
|
|
55525
55769
|
function is_project_file(root2, file2) {
|
|
55526
|
-
const relative_path =
|
|
55770
|
+
const relative_path = path64.relative(root2, file2).split(path64.sep).join(path64.posix.sep);
|
|
55527
55771
|
return !kit_written_paths.is_kit_written(relative_path);
|
|
55528
55772
|
}
|
|
55529
55773
|
function list_files(root2) {
|
|
@@ -55535,7 +55779,7 @@ function list_files(root2) {
|
|
|
55535
55779
|
return files2;
|
|
55536
55780
|
}
|
|
55537
55781
|
function file_extensions(root2) {
|
|
55538
|
-
return list_files(root2).filter((file2) => is_project_file(root2, file2)).map((file2) =>
|
|
55782
|
+
return list_files(root2).filter((file2) => is_project_file(root2, file2)).map((file2) => path64.extname(file2));
|
|
55539
55783
|
}
|
|
55540
55784
|
function scan_files(root2) {
|
|
55541
55785
|
const extensions = file_extensions(root2);
|
|
@@ -55549,7 +55793,7 @@ function has_github_remote(root2) {
|
|
|
55549
55793
|
return url2 !== void 0 && repo_origin.parse_origin_url(url2) !== void 0;
|
|
55550
55794
|
}
|
|
55551
55795
|
function has_git(root2) {
|
|
55552
|
-
return existsSync20(
|
|
55796
|
+
return existsSync20(path64.join(root2, ".git"));
|
|
55553
55797
|
}
|
|
55554
55798
|
function has_workflow(root2) {
|
|
55555
55799
|
return workflow_mark.is_requested() || workflow_mark.is_recorded(read_manifest2(root2));
|
|
@@ -55634,7 +55878,7 @@ function has_files(directory, pattern) {
|
|
|
55634
55878
|
return globSync2(pattern, { cwd: project_root(directory), exclude: is_ignored }).length > 0;
|
|
55635
55879
|
}
|
|
55636
55880
|
function has_config(directory, names) {
|
|
55637
|
-
return names.some((name) => existsSync21(
|
|
55881
|
+
return names.some((name) => existsSync21(path65.join(project_root(directory), name)));
|
|
55638
55882
|
}
|
|
55639
55883
|
function has_bin(directory, bin_name) {
|
|
55640
55884
|
return find_local_bin_upwards(directory, bin_name) !== void 0;
|
|
@@ -55692,7 +55936,7 @@ function format_scope(directory) {
|
|
|
55692
55936
|
return manifest?.josh?.format ?? DEFAULT_FORMAT_SCOPE;
|
|
55693
55937
|
}
|
|
55694
55938
|
function is_web_file(file_path3) {
|
|
55695
|
-
return WEB_EXTENSIONS2.includes(
|
|
55939
|
+
return WEB_EXTENSIONS2.includes(path65.extname(file_path3).slice(1));
|
|
55696
55940
|
}
|
|
55697
55941
|
function prettier_targets(directory, targets) {
|
|
55698
55942
|
if (!is_basic(directory) || format_scope(directory) === "all") return targets;
|
|
@@ -55749,40 +55993,40 @@ var BASIC_REQUIRED_SUFFIXES = [
|
|
|
55749
55993
|
".toml"
|
|
55750
55994
|
];
|
|
55751
55995
|
function normalize2(paths2) {
|
|
55752
|
-
return paths2.map((
|
|
55996
|
+
return paths2.map((path78) => path78.trim()).filter((path78) => path78 !== "");
|
|
55753
55997
|
}
|
|
55754
|
-
function is_test_file(
|
|
55755
|
-
return TEST_SUFFIXES.some((suffix) =>
|
|
55998
|
+
function is_test_file(path78) {
|
|
55999
|
+
return TEST_SUFFIXES.some((suffix) => path78.endsWith(suffix));
|
|
55756
56000
|
}
|
|
55757
|
-
function is_basic_manual(
|
|
55758
|
-
const lower2 =
|
|
56001
|
+
function is_basic_manual(path78, is_basic2) {
|
|
56002
|
+
const lower2 = path78.toLowerCase();
|
|
55759
56003
|
return is_basic2 && BASIC_REQUIRED_SUFFIXES.every((suffix) => !lower2.endsWith(suffix));
|
|
55760
56004
|
}
|
|
55761
|
-
function is_basic_visual(
|
|
55762
|
-
const lower2 =
|
|
56005
|
+
function is_basic_visual(path78) {
|
|
56006
|
+
const lower2 = path78.toLowerCase();
|
|
55763
56007
|
return BASIC_VISUAL_SUFFIXES.some((suffix) => lower2.endsWith(suffix));
|
|
55764
56008
|
}
|
|
55765
|
-
function is_exempt2(
|
|
55766
|
-
if (EXEMPT_PATHS.includes(
|
|
55767
|
-
return EXEMPT_SUFFIXES.some((suffix) =>
|
|
56009
|
+
function is_exempt2(path78, is_basic2 = false) {
|
|
56010
|
+
if (EXEMPT_PATHS.includes(path78) || is_basic_manual(path78, is_basic2)) return true;
|
|
56011
|
+
return EXEMPT_SUFFIXES.some((suffix) => path78.endsWith(suffix)) || EXEMPT_PREFIXES.some((prefix2) => path78.startsWith(prefix2));
|
|
55768
56012
|
}
|
|
55769
|
-
function is_runtime(
|
|
55770
|
-
return !is_test_file(
|
|
56013
|
+
function is_runtime(path78, is_basic2 = false) {
|
|
56014
|
+
return !is_test_file(path78) && !is_exempt2(path78, is_basic2);
|
|
55771
56015
|
}
|
|
55772
56016
|
function verdict_for3(paths2, is_basic2 = false) {
|
|
55773
56017
|
const changed = normalize2(paths2);
|
|
55774
|
-
if (changed.some((
|
|
55775
|
-
if (changed.some((
|
|
56018
|
+
if (changed.some((path78) => is_test_file(path78))) return "satisfied";
|
|
56019
|
+
if (changed.some((path78) => is_runtime(path78, is_basic2))) return "required";
|
|
55776
56020
|
return "exempt";
|
|
55777
56021
|
}
|
|
55778
56022
|
function runtime_files(paths2, is_basic2 = false) {
|
|
55779
|
-
return normalize2(paths2).filter((
|
|
56023
|
+
return normalize2(paths2).filter((path78) => is_runtime(path78, is_basic2));
|
|
55780
56024
|
}
|
|
55781
56025
|
function exempt_files(paths2, is_basic2 = false) {
|
|
55782
|
-
return normalize2(paths2).filter((
|
|
56026
|
+
return normalize2(paths2).filter((path78) => is_exempt2(path78, is_basic2));
|
|
55783
56027
|
}
|
|
55784
56028
|
function manual_check_files(paths2, is_basic2) {
|
|
55785
|
-
return normalize2(paths2).filter((
|
|
56029
|
+
return normalize2(paths2).filter((path78) => is_exempt2(path78, is_basic2) && !is_exempt2(path78));
|
|
55786
56030
|
}
|
|
55787
56031
|
var test_declared_logic = {
|
|
55788
56032
|
EXEMPT_PATHS,
|
|
@@ -55857,7 +56101,7 @@ var test_declared_commit = { REASON: REASON6, ROW: ROW44 };
|
|
|
55857
56101
|
|
|
55858
56102
|
// scripts/lane/lane-registry.ts
|
|
55859
56103
|
import { chmodSync as chmodSync2, existsSync as existsSync22, statSync as statSync10, writeFileSync as writeFileSync7 } from "node:fs";
|
|
55860
|
-
import
|
|
56104
|
+
import path67 from "node:path";
|
|
55861
56105
|
|
|
55862
56106
|
// scripts/git/git-ls-remote.ts
|
|
55863
56107
|
var LS_REMOTE_COMMAND = "ls-remote";
|
|
@@ -55942,8 +56186,8 @@ var MIN_QUOTED_LENGTH = 2;
|
|
|
55942
56186
|
var FIRST_CHARACTER_END = 1;
|
|
55943
56187
|
var LAST_CHARACTER_START = -1;
|
|
55944
56188
|
function strip_export(line2) {
|
|
55945
|
-
const
|
|
55946
|
-
return
|
|
56189
|
+
const trimmed5 = line2.trimStart();
|
|
56190
|
+
return trimmed5.startsWith(EXPORT_PREFIX) ? trimmed5.slice(EXPORT_PREFIX.length).trimStart() : trimmed5;
|
|
55947
56191
|
}
|
|
55948
56192
|
function is_key_line(line2, key3) {
|
|
55949
56193
|
const body = strip_export(line2);
|
|
@@ -55957,8 +56201,8 @@ function is_output_line(line2) {
|
|
|
55957
56201
|
return is_key_line(line2, LANE_OUTPUT_KEY);
|
|
55958
56202
|
}
|
|
55959
56203
|
function split_lines(content) {
|
|
55960
|
-
const
|
|
55961
|
-
return
|
|
56204
|
+
const trimmed5 = content.trimEnd();
|
|
56205
|
+
return trimmed5.length === 0 ? [] : trimmed5.split("\n");
|
|
55962
56206
|
}
|
|
55963
56207
|
function is_quoted(raw) {
|
|
55964
56208
|
const first = raw.slice(0, FIRST_CHARACTER_END);
|
|
@@ -56045,7 +56289,7 @@ var lane_environment = {
|
|
|
56045
56289
|
// scripts/run/run-liveness.ts
|
|
56046
56290
|
import { readFileSync as readFileSync29, realpathSync, statSync as statSync9 } from "node:fs";
|
|
56047
56291
|
import { homedir as homedir2, tmpdir as tmpdir3 } from "node:os";
|
|
56048
|
-
import
|
|
56292
|
+
import path66 from "node:path";
|
|
56049
56293
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
56050
56294
|
|
|
56051
56295
|
// scripts/agent/claude-result-event.ts
|
|
@@ -56362,12 +56606,12 @@ var ALLOWED_ROOTS = [
|
|
|
56362
56606
|
)
|
|
56363
56607
|
];
|
|
56364
56608
|
function is_within3(candidate, root2) {
|
|
56365
|
-
const relative =
|
|
56366
|
-
return relative !== "" && !relative.startsWith("..") && !
|
|
56609
|
+
const relative = path66.relative(root2, candidate);
|
|
56610
|
+
return relative !== "" && !relative.startsWith("..") && !path66.isAbsolute(relative);
|
|
56367
56611
|
}
|
|
56368
56612
|
function to_safe_path(output_path) {
|
|
56369
|
-
const normalized3 =
|
|
56370
|
-
if (!
|
|
56613
|
+
const normalized3 = path66.normalize(output_path);
|
|
56614
|
+
if (!path66.isAbsolute(normalized3)) return void 0;
|
|
56371
56615
|
return ALLOWED_ROOTS.some((root2) => is_within3(normalized3, root2)) ? normalized3 : void 0;
|
|
56372
56616
|
}
|
|
56373
56617
|
function sample_output(output_path) {
|
|
@@ -56675,15 +56919,15 @@ function held_seat(content) {
|
|
|
56675
56919
|
return seat_from_content(content) ?? EMPTY_SEAT;
|
|
56676
56920
|
}
|
|
56677
56921
|
function read_environment(directory) {
|
|
56678
|
-
return file_reader.read_if_readable(
|
|
56922
|
+
return file_reader.read_if_readable(path67.join(directory, ENV_FILE_NAME));
|
|
56679
56923
|
}
|
|
56680
56924
|
function write_environment(directory, content) {
|
|
56681
|
-
const file2 =
|
|
56925
|
+
const file2 = path67.join(directory, ENV_FILE_NAME);
|
|
56682
56926
|
writeFileSync7(file2, content, { mode: OWNER_ONLY_MODE });
|
|
56683
56927
|
chmodSync2(file2, OWNER_ONLY_MODE);
|
|
56684
56928
|
}
|
|
56685
56929
|
function dispatched_at(directory) {
|
|
56686
|
-
return statSync10(
|
|
56930
|
+
return statSync10(path67.join(directory, ENV_FILE_NAME), { throwIfNoEntry: false })?.mtimeMs;
|
|
56687
56931
|
}
|
|
56688
56932
|
function branch_issue(branch2) {
|
|
56689
56933
|
if (!branch2?.endsWith(lane_paths.LANE_BRANCH_SUFFIX)) return void 0;
|
|
@@ -56888,6 +57132,50 @@ var run_headless = {
|
|
|
56888
57132
|
must_keep_waiting
|
|
56889
57133
|
};
|
|
56890
57134
|
|
|
57135
|
+
// scripts/rules/codex-prompt.ts
|
|
57136
|
+
var content_schema = external_exports.array(
|
|
57137
|
+
external_exports.object({
|
|
57138
|
+
type: external_exports.string(),
|
|
57139
|
+
text: external_exports.string().optional()
|
|
57140
|
+
})
|
|
57141
|
+
);
|
|
57142
|
+
var provenance_schema = external_exports.object({ provenance: external_exports.object({ type: external_exports.string() }) });
|
|
57143
|
+
var metadata_schema = external_exports.object({ content_item_metadata: external_exports.array(provenance_schema) });
|
|
57144
|
+
var payload_schema2 = external_exports.object({
|
|
57145
|
+
type: external_exports.literal("message"),
|
|
57146
|
+
role: external_exports.enum(["user", "assistant"]),
|
|
57147
|
+
content: content_schema,
|
|
57148
|
+
internal_chat_message_metadata_passthrough: metadata_schema.optional()
|
|
57149
|
+
});
|
|
57150
|
+
var record_schema4 = external_exports.object({
|
|
57151
|
+
type: external_exports.literal("response_item"),
|
|
57152
|
+
timestamp: external_exports.string(),
|
|
57153
|
+
payload: payload_schema2
|
|
57154
|
+
});
|
|
57155
|
+
function content_text(block) {
|
|
57156
|
+
if (block.type !== "input_text" && block.type !== "output_text") return "";
|
|
57157
|
+
return block.text ?? "";
|
|
57158
|
+
}
|
|
57159
|
+
function person_content(payload) {
|
|
57160
|
+
const metadata = payload.internal_chat_message_metadata_passthrough?.content_item_metadata;
|
|
57161
|
+
if (metadata?.length !== payload.content.length) return void 0;
|
|
57162
|
+
const authored = payload.content.filter((_block, index) => metadata[index]?.provenance.type === "user").map((block) => content_text(block));
|
|
57163
|
+
return authored.length === 0 ? void 0 : authored.join("\n");
|
|
57164
|
+
}
|
|
57165
|
+
function normalize3(line2) {
|
|
57166
|
+
const record11 = json_value.parse_with(line2, record_schema4);
|
|
57167
|
+
if (record11 === void 0) return line2;
|
|
57168
|
+
const { payload, timestamp } = record11;
|
|
57169
|
+
const content = payload.role === "user" ? person_content(payload) : payload.content.map((block) => content_text(block)).join("\n");
|
|
57170
|
+
return JSON.stringify({
|
|
57171
|
+
type: payload.role,
|
|
57172
|
+
timestamp,
|
|
57173
|
+
...content === void 0 && { origin: { kind: "harness" } },
|
|
57174
|
+
message: { content: content ?? "" }
|
|
57175
|
+
});
|
|
57176
|
+
}
|
|
57177
|
+
var codex_prompt = { normalize: normalize3 };
|
|
57178
|
+
|
|
56891
57179
|
// scripts/rules/turn-filings.ts
|
|
56892
57180
|
function is_filing_use(block) {
|
|
56893
57181
|
if (!tail_commands.is_bash_use(block)) return false;
|
|
@@ -56946,7 +57234,9 @@ function is_person(line2) {
|
|
|
56946
57234
|
return line2.origin === null || line2.origin === void 0 || line2.origin.kind === HUMAN_ORIGIN;
|
|
56947
57235
|
}
|
|
56948
57236
|
function person_line(line2) {
|
|
56949
|
-
const
|
|
57237
|
+
const normalized3 = codex_prompt.normalize(line2);
|
|
57238
|
+
if (!turn_filings.is_prompt_line(normalized3)) return void 0;
|
|
57239
|
+
const parsed = PROMPT_LINE_SCHEMA.safeParse(json_value.parse_or_undefined(normalized3));
|
|
56950
57240
|
return parsed.success && is_person(parsed.data) ? parsed.data : void 0;
|
|
56951
57241
|
}
|
|
56952
57242
|
function person_text(line2) {
|
|
@@ -56955,15 +57245,15 @@ function person_text(line2) {
|
|
|
56955
57245
|
return time_reported_failure.result_text(person.message.content);
|
|
56956
57246
|
}
|
|
56957
57247
|
function turn_prompt(tail) {
|
|
56958
|
-
const opener = tail.split("\n").findLast((line2) => turn_filings.is_prompt_line(line2));
|
|
57248
|
+
const opener = tail.split("\n").map((line2) => codex_prompt.normalize(line2)).findLast((line2) => turn_filings.is_prompt_line(line2));
|
|
56959
57249
|
if (opener === void 0) return NO_PROMPT;
|
|
56960
57250
|
return person_text(opener) ?? NO_PROMPT;
|
|
56961
57251
|
}
|
|
56962
57252
|
function person_prompt(tail) {
|
|
56963
|
-
return tail.split("\n").
|
|
57253
|
+
return tail.split("\n").map((line2) => person_text(line2)).findLast((text3) => text3 !== void 0);
|
|
56964
57254
|
}
|
|
56965
57255
|
function prompt_time(tail) {
|
|
56966
|
-
return tail.split("\n").
|
|
57256
|
+
return tail.split("\n").map((line2) => person_line(line2)?.timestamp ?? void 0).findLast((time3) => time3 !== void 0);
|
|
56967
57257
|
}
|
|
56968
57258
|
function tail_time(tail) {
|
|
56969
57259
|
return tail.split("\n").map((line2) => TIMED_LINE_SCHEMA.safeParse(json_value.parse_or_undefined(line2)).data?.timestamp).find((time3) => time3 !== void 0);
|
|
@@ -56997,15 +57287,17 @@ var CHECK_FLAG = /\s--check\b/u;
|
|
|
56997
57287
|
var QUOTED = /"[^"]*"|'[^']*'/gu;
|
|
56998
57288
|
var UNASKED_FILING_REASON = "\u26D4 unasked filing: this interactive session files an Issue only on the person\u2019s explicit instruction (\u300C\u8D77\u7968\u300D, \u201Cfile an issue\u201D, or a command whose procedure files, such as `kickoff new`). Propose the Issue in the reply and file it once they confirm. It fires on every occurrence (`.claude/skills/workflow-commands/observation-filing.md`).";
|
|
56999
57289
|
function is_instructed(prompt) {
|
|
57000
|
-
const
|
|
57001
|
-
return FILING_WORDS.some((pattern) => pattern.test(
|
|
57290
|
+
const trimmed5 = issue_citation.prose_lines(prompt).join("\n").replaceAll(/(?<!`)(`+)(?!`)[\s\S]*?(?<!`)\1(?!`)/gu, "").replaceAll(/「[^「」\n]*」|『[^『』\n]*』|"[^"\n]*"|'[^'\n]*'/gu, "").trim();
|
|
57291
|
+
return FILING_WORDS.some((pattern) => pattern.test(trimmed5));
|
|
57002
57292
|
}
|
|
57003
57293
|
function reply_text(line2) {
|
|
57004
|
-
const parsed = ASSISTANT_LINE_SCHEMA.safeParse(
|
|
57294
|
+
const parsed = ASSISTANT_LINE_SCHEMA.safeParse(
|
|
57295
|
+
json_value.parse_or_undefined(codex_prompt.normalize(line2))
|
|
57296
|
+
);
|
|
57005
57297
|
return parsed.success ? time_reported_failure.result_text(parsed.data.message.content) : "";
|
|
57006
57298
|
}
|
|
57007
57299
|
function is_person_line(line2) {
|
|
57008
|
-
return
|
|
57300
|
+
return last_prompt.person_prompt(line2) !== void 0;
|
|
57009
57301
|
}
|
|
57010
57302
|
function reply_before_prompt(tail) {
|
|
57011
57303
|
const lines = tail.split("\n");
|
|
@@ -57014,8 +57306,8 @@ function reply_before_prompt(tail) {
|
|
|
57014
57306
|
return replies.findLast((text3) => text3 !== "") ?? "";
|
|
57015
57307
|
}
|
|
57016
57308
|
function is_confirmed(prompt, tail) {
|
|
57017
|
-
const
|
|
57018
|
-
if (
|
|
57309
|
+
const trimmed5 = prompt.trim();
|
|
57310
|
+
if (trimmed5.length > SHORT_REPLY || !AFFIRMATIVE.test(trimmed5)) return false;
|
|
57019
57311
|
const reply2 = reply_before_prompt(tail);
|
|
57020
57312
|
return PROPOSALS.some((pattern) => pattern.test(reply2));
|
|
57021
57313
|
}
|
|
@@ -57282,6 +57574,7 @@ var HOLD_RELEASE = "the hook releases the hold itself; it blocks only when that
|
|
|
57282
57574
|
var FILING_OFFER = "the filing needs a title and a body only the model can write";
|
|
57283
57575
|
var CONCISE_REPLY = "the shorter reply is prose only the model can write";
|
|
57284
57576
|
var NARROW_ENOUGH = "which reading is narrow enough to keep is the author\u2019s call";
|
|
57577
|
+
var BODY_TO_FILE = "the body moves to a file the call does not name";
|
|
57285
57578
|
function rewrite() {
|
|
57286
57579
|
return { remedy: "rewrite", why: REWRITTEN };
|
|
57287
57580
|
}
|
|
@@ -57307,16 +57600,21 @@ var GUARD_REMEDIES = {
|
|
|
57307
57600
|
"shell-body": judgment(
|
|
57308
57601
|
"which part of the body the shell was meant to expand is the author's, not the hook's"
|
|
57309
57602
|
),
|
|
57310
|
-
"raw-field-body": judgment(
|
|
57603
|
+
"raw-field-body": judgment(BODY_TO_FILE),
|
|
57311
57604
|
"credential-body": judgment(
|
|
57312
57605
|
"which text is the credential, and what replaces it, is the author\u2019s"
|
|
57313
57606
|
),
|
|
57314
57607
|
"rule-body": judgment("a trigger-plus-pointer line is written, not derived"),
|
|
57315
57608
|
"direct-filing": judgment(ANOTHER_COMMAND),
|
|
57316
57609
|
"unasked-filing": judgment(NO_RUN),
|
|
57317
|
-
|
|
57318
|
-
|
|
57319
|
-
"direct-
|
|
57610
|
+
// A standalone `gh issue comment <N> --body-file <path>` run as `pnpm josh issue:comment`; an inline
|
|
57611
|
+
// `--body` is refused, since `issue:comment` trims it and expands `\n` (joshuafolkken/kit#7330).
|
|
57612
|
+
"direct-issue-comment": rewrite(),
|
|
57613
|
+
"direct-issue-read": rewrite(),
|
|
57614
|
+
// a standalone `gh issue view <N>` run as `pnpm josh issue:read <N>`
|
|
57615
|
+
"direct-git-status": judgment(
|
|
57616
|
+
"the refusal is spent once per run and its reissue passes, so a rewrite saves at most one round trip while trading the long-format listing the call asked for for porcelain"
|
|
57617
|
+
),
|
|
57320
57618
|
"direct-vitest-run": judgment(ANOTHER_COMMAND),
|
|
57321
57619
|
"direct-pr-create": judgment(ANOTHER_COMMAND),
|
|
57322
57620
|
"pr-merge": judgment(ANOTHER_COMMAND),
|
|
@@ -57913,8 +58211,8 @@ async function issue_list_by_label_summary(label3, limit, options) {
|
|
|
57913
58211
|
});
|
|
57914
58212
|
}
|
|
57915
58213
|
async function issue_list_label_first_page(label3) {
|
|
57916
|
-
const
|
|
57917
|
-
return await git_gh_etag_read.read_detail(
|
|
58214
|
+
const path78 = git_gh_issue_list.listing_path({ label: label3 }, FIRST_PAGE);
|
|
58215
|
+
return await git_gh_etag_read.read_detail(path78);
|
|
57918
58216
|
}
|
|
57919
58217
|
async function issue_list_by_label_in_repo(label3, limit, repo) {
|
|
57920
58218
|
return await issue_list2({ json_fields: SUMMARY_FIELDS, limit, label: label3, repo });
|
|
@@ -57968,7 +58266,10 @@ var KEYS = {
|
|
|
57968
58266
|
measure_absent: { ja: "\u8A08\u6E2C\u5BA3\u8A00\u306A\u3057", en: "No measure declaration" },
|
|
57969
58267
|
sample_gate: { ja: "\u5B9F\u65BD\u53EF\u80FD\u6761\u4EF6", en: "Sample gate" },
|
|
57970
58268
|
not_before: { ja: "\u5B9F\u65BD\u53EF\u80FD\u65E5", en: "Not before" },
|
|
57971
|
-
source: { ja: "\u51FA\u3069\u3053\u308D", en: "Source" }
|
|
58269
|
+
source: { ja: "\u51FA\u3069\u3053\u308D", en: "Source" },
|
|
58270
|
+
constraint_source: { ja: "\u51FA\u6240", en: "Constraint source" },
|
|
58271
|
+
constraint_reference: { ja: "\u53C2\u7167", en: "Constraint reference" },
|
|
58272
|
+
constraint_instruction: { ja: "\u6307\u793A", en: "Constraint instruction" }
|
|
57972
58273
|
};
|
|
57973
58274
|
var VALUES = {
|
|
57974
58275
|
bug: { ja: "\u4E0D\u5177\u5408", en: "defect" },
|
|
@@ -57996,7 +58297,8 @@ var HEADINGS = {
|
|
|
57996
58297
|
trigger: { ja: "\u767A\u706B\u70B9", en: "Trigger" },
|
|
57997
58298
|
baseline: { ja: "\u30D9\u30FC\u30B9\u30E9\u30A4\u30F3", en: "Baseline" },
|
|
57998
58299
|
reproduction: { ja: "\u518D\u73FE", en: "Reproduction" },
|
|
57999
|
-
expected_effect: { ja: "\u671F\u5F85\u52B9\u679C", en: "Expected effect" }
|
|
58300
|
+
expected_effect: { ja: "\u671F\u5F85\u52B9\u679C", en: "Expected effect" },
|
|
58301
|
+
auto_execution_constraint: { ja: "\u81EA\u52D5\u5B9F\u884C\u306E\u5236\u7D04", en: "Automatic execution constraint" }
|
|
58000
58302
|
};
|
|
58001
58303
|
var SIZE_VALUES = {
|
|
58002
58304
|
ja: "\u7D04 <files> \u30D5\u30A1\u30A4\u30EB / <lines> \u884C\uFF08\u30C6\u30B9\u30C8\u9664\u304F\uFF09",
|
|
@@ -58052,12 +58354,12 @@ function indent_of2(raw) {
|
|
|
58052
58354
|
return raw.slice(0, raw.length - raw.trimStart().length);
|
|
58053
58355
|
}
|
|
58054
58356
|
function canonical_value(rest) {
|
|
58055
|
-
const
|
|
58357
|
+
const trimmed5 = rest.trimStart();
|
|
58056
58358
|
const found = VALUE_TEXTS.find(
|
|
58057
|
-
({ text: text3 }) =>
|
|
58359
|
+
({ text: text3 }) => trimmed5.startsWith(text3) && VALUE_END.test(trimmed5.slice(text3.length))
|
|
58058
58360
|
);
|
|
58059
58361
|
if (found === void 0) return rest;
|
|
58060
|
-
return `${indent_of2(rest)}${text_of2(found.row)}${
|
|
58362
|
+
return `${indent_of2(rest)}${text_of2(found.row)}${trimmed5.slice(found.text.length)}`;
|
|
58061
58363
|
}
|
|
58062
58364
|
function canonical_declaration(raw) {
|
|
58063
58365
|
const text3 = raw.trimStart();
|
|
@@ -58190,7 +58492,7 @@ var DECLARATION_LINE = new RegExp(
|
|
|
58190
58492
|
);
|
|
58191
58493
|
var BACKGROUND_HEADING = issue_body_keys.heading("background");
|
|
58192
58494
|
var BULLET3 = "- ";
|
|
58193
|
-
var
|
|
58495
|
+
var NEWLINE2 = "\n";
|
|
58194
58496
|
var DECLARE_COMMAND = "pnpm josh issue:release-class <issue> <label>";
|
|
58195
58497
|
var DECIDING_LABELS = [ENHANCEMENT_LABEL, BUG_LABEL, BREAKING_CHANGE_LABEL].join(", ");
|
|
58196
58498
|
var LEGACY_LABELS = /* @__PURE__ */ new Set(["semver-major", "semver-minor"]);
|
|
@@ -58222,8 +58524,8 @@ function block_end(lines) {
|
|
|
58222
58524
|
return run4 === -1 ? lines.length : first + run4;
|
|
58223
58525
|
}
|
|
58224
58526
|
function append_line2(before, line2) {
|
|
58225
|
-
const separator = before === "" || before.endsWith(
|
|
58226
|
-
return `${before}${separator}${line2}${
|
|
58527
|
+
const separator = before === "" || before.endsWith(NEWLINE2) ? "" : NEWLINE2;
|
|
58528
|
+
return `${before}${separator}${line2}${NEWLINE2}`;
|
|
58227
58529
|
}
|
|
58228
58530
|
function insert_line(section2, line2) {
|
|
58229
58531
|
const lines = section2.split(/(?<=\n)/u);
|
|
@@ -58236,7 +58538,7 @@ function with_declaration(body, label3) {
|
|
|
58236
58538
|
return append_line2(stripped, declaration(label3));
|
|
58237
58539
|
}
|
|
58238
58540
|
return markdown_section.map_section(
|
|
58239
|
-
stripped.endsWith(
|
|
58541
|
+
stripped.endsWith(NEWLINE2) ? stripped : `${stripped}${NEWLINE2}`,
|
|
58240
58542
|
(line2) => line2.trim() === BACKGROUND_HEADING,
|
|
58241
58543
|
(section2) => insert_line(section2, declaration(label3))
|
|
58242
58544
|
);
|
|
@@ -58251,7 +58553,7 @@ function release_candidates(candidates2) {
|
|
|
58251
58553
|
function issue_candidates(labels2, body) {
|
|
58252
58554
|
const names = labels2.map((label3) => label3.toLowerCase());
|
|
58253
58555
|
const declared = [
|
|
58254
|
-
...markdown_section.canonical_lines(body).join(
|
|
58556
|
+
...markdown_section.canonical_lines(body).join(NEWLINE2).matchAll(DECLARATION)
|
|
58255
58557
|
].map((match) => match[1] ?? "");
|
|
58256
58558
|
const candidates2 = [...release_candidates([...names, ...declared].filter(is_classification))];
|
|
58257
58559
|
const unknown2 = declared.filter((value2) => !is_classification(value2));
|
|
@@ -58283,10 +58585,10 @@ function select_issue_classification(issue_json) {
|
|
|
58283
58585
|
);
|
|
58284
58586
|
}
|
|
58285
58587
|
function fetch_current_labels(repository2, pull_number) {
|
|
58286
|
-
const
|
|
58588
|
+
const path78 = git_gh_api_path.issue_labels_api_path(String(pull_number), repository2);
|
|
58287
58589
|
try {
|
|
58288
58590
|
const names = git_gh_exec.exec_gh_api_sync({
|
|
58289
|
-
path:
|
|
58591
|
+
path: path78,
|
|
58290
58592
|
should_paginate: true,
|
|
58291
58593
|
jq_filter: LABEL_NAMES_FILTER2
|
|
58292
58594
|
});
|
|
@@ -58564,9 +58866,9 @@ async function read_comments2(branch_name, to_path, to_json) {
|
|
|
58564
58866
|
note_unreadable_comments(branch_name, unresolved_reason(read14));
|
|
58565
58867
|
return void 0;
|
|
58566
58868
|
}
|
|
58567
|
-
const
|
|
58869
|
+
const path78 = `${to_path(String(read14.pr_number))}${COMMENTS_QUERY}`;
|
|
58568
58870
|
try {
|
|
58569
|
-
return to_json(await git_gh_exec.exec_gh_api({ path:
|
|
58871
|
+
return to_json(await git_gh_exec.exec_gh_api({ path: path78, should_paginate: true }));
|
|
58570
58872
|
} catch (error62) {
|
|
58571
58873
|
note_unreadable_comments(branch_name, error_text.message_of(error62));
|
|
58572
58874
|
return void 0;
|
|
@@ -58637,36 +58939,36 @@ var UNREADABLE_POLL_MESSAGE = "gh api could not read a merge-gate poll";
|
|
|
58637
58939
|
var PAGE_SIZE = 100;
|
|
58638
58940
|
var kept_by_path = /* @__PURE__ */ new Map();
|
|
58639
58941
|
var page_schema = external_exports.object({ total_count: external_exports.number() });
|
|
58640
|
-
function unreadable2(
|
|
58942
|
+
function unreadable2(path78, answer2) {
|
|
58641
58943
|
const cause = answer2.kind === "unreadable" ? answer2.cause : void 0;
|
|
58642
58944
|
const reason4 = cause === void 0 ? "" : `: ${error_text.message_of(cause)}`;
|
|
58643
|
-
return new Error(`${UNREADABLE_POLL_MESSAGE}: ${
|
|
58945
|
+
return new Error(`${UNREADABLE_POLL_MESSAGE}: ${path78}${reason4}`, { cause });
|
|
58644
58946
|
}
|
|
58645
|
-
function settle_kept(
|
|
58646
|
-
const settled2 = git_gh_etag_read.settle(kept_by_path.get(
|
|
58647
|
-
if (settled2?.kept !== void 0) kept_by_path.set(
|
|
58947
|
+
function settle_kept(path78, answer2) {
|
|
58948
|
+
const settled2 = git_gh_etag_read.settle(kept_by_path.get(path78), answer2);
|
|
58949
|
+
if (settled2?.kept !== void 0) kept_by_path.set(path78, settled2.kept);
|
|
58648
58950
|
return settled2?.body;
|
|
58649
58951
|
}
|
|
58650
|
-
async function read_answer(
|
|
58651
|
-
return await git_gh_conditional.read_conditional(
|
|
58952
|
+
async function read_answer(path78) {
|
|
58953
|
+
return await git_gh_conditional.read_conditional(path78, kept_by_path.get(path78)?.etag);
|
|
58652
58954
|
}
|
|
58653
|
-
async function read10(
|
|
58654
|
-
const answer2 = await read_answer(
|
|
58655
|
-
const body = settle_kept(
|
|
58656
|
-
if (body === void 0) throw unreadable2(
|
|
58955
|
+
async function read10(path78) {
|
|
58956
|
+
const answer2 = await read_answer(path78);
|
|
58957
|
+
const body = settle_kept(path78, answer2);
|
|
58958
|
+
if (body === void 0) throw unreadable2(path78, answer2);
|
|
58657
58959
|
return body;
|
|
58658
58960
|
}
|
|
58659
|
-
async function read_detail2(
|
|
58660
|
-
const answer2 = await read_answer(
|
|
58661
|
-
const body = settle_kept(
|
|
58961
|
+
async function read_detail2(path78) {
|
|
58962
|
+
const answer2 = await read_answer(path78);
|
|
58963
|
+
const body = settle_kept(path78, answer2);
|
|
58662
58964
|
return body === void 0 ? void 0 : { body, is_unchanged: answer2.kind === "unchanged" };
|
|
58663
58965
|
}
|
|
58664
58966
|
function is_whole_listing(page) {
|
|
58665
58967
|
const total = json_value.parse_with(page, page_schema)?.total_count;
|
|
58666
58968
|
return total !== void 0 && total <= PAGE_SIZE;
|
|
58667
58969
|
}
|
|
58668
|
-
async function read_object_pages(
|
|
58669
|
-
const full_path = `${
|
|
58970
|
+
async function read_object_pages(path78) {
|
|
58971
|
+
const full_path = `${path78}${FULL_PAGE_QUERY}`;
|
|
58670
58972
|
const page = await read10(full_path);
|
|
58671
58973
|
if (is_whole_listing(page)) return `[${page}]`;
|
|
58672
58974
|
return await git_gh_exec.exec_gh_api({
|
|
@@ -58675,8 +58977,8 @@ async function read_object_pages(path77) {
|
|
|
58675
58977
|
should_slurp: true
|
|
58676
58978
|
});
|
|
58677
58979
|
}
|
|
58678
|
-
async function read_array_pages(
|
|
58679
|
-
return await git_gh_etag_read.read_listing(`${
|
|
58980
|
+
async function read_array_pages(path78) {
|
|
58981
|
+
return await git_gh_etag_read.read_listing(`${path78}${FULL_PAGE_QUERY}`, PAGE_SIZE, read10);
|
|
58680
58982
|
}
|
|
58681
58983
|
function forget_poll_reads() {
|
|
58682
58984
|
kept_by_path.clear();
|
|
@@ -59073,8 +59375,8 @@ async function read_status_check_rollup(commit_sha) {
|
|
|
59073
59375
|
return git_gh_pr_rollup.to_status_check_rollup({ check_runs_json, status_json });
|
|
59074
59376
|
}
|
|
59075
59377
|
async function read_rest_review_decision(pr_number) {
|
|
59076
|
-
const
|
|
59077
|
-
return git_gh_pr_review.to_review_decision(await git_gh_poll_read.read_array_pages(
|
|
59378
|
+
const path78 = git_gh_api_path.pull_reviews_api_path(String(pr_number));
|
|
59379
|
+
return git_gh_pr_review.to_review_decision(await git_gh_poll_read.read_array_pages(path78));
|
|
59078
59380
|
}
|
|
59079
59381
|
async function pr_get_review_decision(pr_number) {
|
|
59080
59382
|
const graphql_decision = await git_gh_pr_graphql_snapshot.read_review_decision(pr_number);
|
|
@@ -59388,14 +59690,14 @@ function next_etag(read14, previous) {
|
|
|
59388
59690
|
}
|
|
59389
59691
|
async function probe_head(branch_name, etags) {
|
|
59390
59692
|
const reads = await Promise.all(
|
|
59391
|
-
probe_paths(branch_name).map(async (
|
|
59392
|
-
path:
|
|
59393
|
-
read: await git_gh_conditional.read_conditional(
|
|
59693
|
+
probe_paths(branch_name).map(async (path78) => ({
|
|
59694
|
+
path: path78,
|
|
59695
|
+
read: await git_gh_conditional.read_conditional(path78, etags.get(path78))
|
|
59394
59696
|
}))
|
|
59395
59697
|
);
|
|
59396
59698
|
return {
|
|
59397
59699
|
is_unchanged: reads.every(({ read: read14 }) => read14.kind === "unchanged"),
|
|
59398
|
-
etags: new Map(reads.map(({ path:
|
|
59700
|
+
etags: new Map(reads.map(({ path: path78, read: read14 }) => [path78, next_etag(read14, etags.get(path78))]))
|
|
59399
59701
|
};
|
|
59400
59702
|
}
|
|
59401
59703
|
function is_merge_state_known(snapshot4) {
|
|
@@ -60280,9 +60582,9 @@ var run_watcher_guard = {
|
|
|
60280
60582
|
// scripts/run/run-watcher-hook.ts
|
|
60281
60583
|
var SWITCH_ENV_KEY8 = "JOSH_WATCHER_GUARD";
|
|
60282
60584
|
var STAMP_PREFIX6 = "josh-watcher-guard-";
|
|
60283
|
-
var
|
|
60585
|
+
var payload_schema3 = external_exports.object({ transcript_path: external_exports.string().min(1) });
|
|
60284
60586
|
function transcript_of3(raw_payload) {
|
|
60285
|
-
return json_value.parse_with(raw_payload,
|
|
60587
|
+
return json_value.parse_with(raw_payload, payload_schema3)?.transcript_path;
|
|
60286
60588
|
}
|
|
60287
60589
|
function fires_once(transcript, now_ms) {
|
|
60288
60590
|
const stamp2 = hook_decision.create_refusal_stamp(STAMP_PREFIX6);
|
|
@@ -60453,11 +60755,11 @@ var run_poll_hook = {
|
|
|
60453
60755
|
|
|
60454
60756
|
// scripts/hooks/bash-revert.ts
|
|
60455
60757
|
import { copyFileSync as copyFileSync2, existsSync as existsSync23, mkdirSync as mkdirSync6, readFileSync as readFileSync31, rmSync as rmSync7 } from "node:fs";
|
|
60456
|
-
import
|
|
60758
|
+
import path69 from "node:path";
|
|
60457
60759
|
|
|
60458
60760
|
// scripts/hooks/step-zero-notice.ts
|
|
60459
60761
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
60460
|
-
import
|
|
60762
|
+
import path68 from "node:path";
|
|
60461
60763
|
var STAMP_PREFIX8 = "josh-step-zero-notice-";
|
|
60462
60764
|
var EDIT_TOOLS3 = /* @__PURE__ */ new Set(["Edit", "Write"]);
|
|
60463
60765
|
var PARENT_PREFIX = "..";
|
|
@@ -60472,22 +60774,22 @@ function edited_paths(tool_input) {
|
|
|
60472
60774
|
);
|
|
60473
60775
|
}
|
|
60474
60776
|
function is_external(relative) {
|
|
60475
|
-
return relative.startsWith(PARENT_PREFIX) ||
|
|
60777
|
+
return relative.startsWith(PARENT_PREFIX) || path68.isAbsolute(relative);
|
|
60476
60778
|
}
|
|
60477
|
-
function is_scratch_record(file_path3) {
|
|
60478
|
-
const relative =
|
|
60779
|
+
function is_scratch_record(file_path3, scratch_root = tmpdir4()) {
|
|
60780
|
+
const relative = path68.relative(scratch_root, file_path3);
|
|
60479
60781
|
const is_scratch = !is_external(relative);
|
|
60480
|
-
return is_scratch && [".md", ".json", ".txt"].includes(
|
|
60782
|
+
return is_scratch && [".md", ".json", ".txt"].includes(path68.extname(file_path3));
|
|
60481
60783
|
}
|
|
60482
60784
|
function should_skip_external(relative, file_path3, should_include_external) {
|
|
60483
60785
|
return is_external(relative) && (!should_include_external || is_scratch_record(file_path3));
|
|
60484
60786
|
}
|
|
60485
60787
|
function is_runtime_file(file_path3, root2, should_include_external = false) {
|
|
60486
|
-
const relative =
|
|
60487
|
-
if (should_skip_external(relative,
|
|
60788
|
+
const relative = path68.relative(root2, path68.resolve(root2, file_path3));
|
|
60789
|
+
if (is_scratch_record(path68.resolve(root2, file_path3), path68.join(root2, ".josh/tmp")) || should_skip_external(relative, path68.resolve(root2, file_path3), should_include_external)) {
|
|
60488
60790
|
return false;
|
|
60489
60791
|
}
|
|
60490
|
-
return !test_declared_logic.is_exempt(relative.split(
|
|
60792
|
+
return !test_declared_logic.is_exempt(relative.split(path68.sep).join("/"));
|
|
60491
60793
|
}
|
|
60492
60794
|
function is_runtime_edit(raw_payload, root2 = process.cwd(), should_include_external = false) {
|
|
60493
60795
|
const payload = hook_tool_payload.parse(raw_payload);
|
|
@@ -60547,7 +60849,7 @@ function is_guarded_file(file2, root2) {
|
|
|
60547
60849
|
}
|
|
60548
60850
|
function snapshot3(root2, entries = dirty_entries(root2)) {
|
|
60549
60851
|
const runtime = entries.map((entry) => entry.slice(STATUS_WIDTH)).filter((file2) => is_guarded_file(file2, root2));
|
|
60550
|
-
return Object.fromEntries(runtime.map((file2) => [file2, content_hash(
|
|
60852
|
+
return Object.fromEntries(runtime.map((file2) => [file2, content_hash(path69.join(root2, file2))]));
|
|
60551
60853
|
}
|
|
60552
60854
|
function guarded_transcript(raw_payload) {
|
|
60553
60855
|
if (agent_session_role.can_implement()) return void 0;
|
|
@@ -60555,17 +60857,17 @@ function guarded_transcript(raw_payload) {
|
|
|
60555
60857
|
return payload?.tool_name === "Bash" ? payload.transcript_path : void 0;
|
|
60556
60858
|
}
|
|
60557
60859
|
function copy_into(source, destination) {
|
|
60558
|
-
mkdirSync6(
|
|
60860
|
+
mkdirSync6(path69.dirname(destination), { recursive: true });
|
|
60559
60861
|
copyFileSync2(source, destination);
|
|
60560
60862
|
}
|
|
60561
60863
|
function saved_directory(transcript, root2) {
|
|
60562
|
-
const key3 =
|
|
60563
|
-
return
|
|
60864
|
+
const key3 = path69.basename(stamp_file.stamp_path(STAMP_PREFIX9, transcript), STAMP_EXTENSION);
|
|
60865
|
+
return path69.join(root2, BACKUP_DIRECTORY, BEFORE_CALL_DIRECTORY, key3);
|
|
60564
60866
|
}
|
|
60565
60867
|
function save_dirty(before, root2, saved) {
|
|
60566
60868
|
rmSync7(saved, { recursive: true, force: true });
|
|
60567
60869
|
for (const [file2, hash2] of Object.entries(before)) {
|
|
60568
|
-
if (hash2 !== ABSENT) copy_into(
|
|
60870
|
+
if (hash2 !== ABSENT) copy_into(path69.join(root2, file2), path69.join(saved, file2));
|
|
60569
60871
|
}
|
|
60570
60872
|
}
|
|
60571
60873
|
function stamp(raw_payload, root2 = process.cwd()) {
|
|
@@ -60593,9 +60895,9 @@ function moved_entries(transcript, root2) {
|
|
|
60593
60895
|
const after = snapshot3(root2, entries);
|
|
60594
60896
|
const saved = saved_directory(transcript, root2);
|
|
60595
60897
|
const dirty = Object.keys(before).filter(
|
|
60596
|
-
(file2) => content_hash(
|
|
60898
|
+
(file2) => content_hash(path69.join(root2, file2)) !== before[file2]
|
|
60597
60899
|
);
|
|
60598
|
-
const intact = dirty.filter((file2) => content_hash(
|
|
60900
|
+
const intact = dirty.filter((file2) => content_hash(path69.join(saved, file2)) === before[file2]);
|
|
60599
60901
|
return {
|
|
60600
60902
|
revert: entries.filter((entry) => {
|
|
60601
60903
|
const file2 = entry_file(entry);
|
|
@@ -60610,20 +60912,20 @@ function restore2(file2, root2) {
|
|
|
60610
60912
|
if (restored.exit_code !== 0) git_spawn_sync.run(["rm", "-q", "-f", "--", file2], { cwd: root2 });
|
|
60611
60913
|
}
|
|
60612
60914
|
function back_up(file2, root2, backup) {
|
|
60613
|
-
const source =
|
|
60614
|
-
if (existsSync23(source)) copy_into(source,
|
|
60915
|
+
const source = path69.join(root2, file2);
|
|
60916
|
+
if (existsSync23(source)) copy_into(source, path69.join(backup, file2));
|
|
60615
60917
|
}
|
|
60616
60918
|
function revert_file(entry, root2, backup) {
|
|
60617
60919
|
const file2 = entry_file(entry);
|
|
60618
60920
|
back_up(file2, root2, backup);
|
|
60619
|
-
if (entry.startsWith(UNTRACKED)) rmSync7(
|
|
60921
|
+
if (entry.startsWith(UNTRACKED)) rmSync7(path69.join(root2, file2), { force: true });
|
|
60620
60922
|
else restore2(file2, root2);
|
|
60621
60923
|
}
|
|
60622
60924
|
function restore_saved(file2, root2, backup, saved) {
|
|
60623
|
-
const copy =
|
|
60925
|
+
const copy = path69.join(saved, file2);
|
|
60624
60926
|
back_up(file2, root2, backup);
|
|
60625
|
-
if (existsSync23(copy)) copy_into(copy,
|
|
60626
|
-
else rmSync7(
|
|
60927
|
+
if (existsSync23(copy)) copy_into(copy, path69.join(root2, file2));
|
|
60928
|
+
else rmSync7(path69.join(root2, file2), { force: true });
|
|
60627
60929
|
}
|
|
60628
60930
|
function put_back(moved, root2, backup, saved) {
|
|
60629
60931
|
for (const entry of moved.revert) revert_file(entry, root2, backup);
|
|
@@ -60650,8 +60952,8 @@ function revert(raw_payload, root2 = process.cwd()) {
|
|
|
60650
60952
|
if (transcript === void 0) return void 0;
|
|
60651
60953
|
const moved = moved_entries(transcript, root2);
|
|
60652
60954
|
if (moved.revert.length + moved.restore.length + moved.keep.length === 0) return void 0;
|
|
60653
|
-
const backup =
|
|
60654
|
-
put_back(moved, root2,
|
|
60955
|
+
const backup = path69.join(BACKUP_DIRECTORY, (/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-"));
|
|
60956
|
+
put_back(moved, root2, path69.join(root2, backup), saved_directory(transcript, root2));
|
|
60655
60957
|
return JSON.stringify({ decision: "block", reason: block_reason2(moved, backup) });
|
|
60656
60958
|
}
|
|
60657
60959
|
function is_shell2(raw_payload) {
|
|
@@ -60758,11 +61060,11 @@ var direct_gh_usage = { record: record8 };
|
|
|
60758
61060
|
// scripts/hooks/hook-demoted.ts
|
|
60759
61061
|
import { readFileSync as readFileSync33 } from "node:fs";
|
|
60760
61062
|
import { mkdir as mkdir3, writeFile as writeFile2 } from "node:fs/promises";
|
|
60761
|
-
import
|
|
61063
|
+
import path73 from "node:path";
|
|
60762
61064
|
|
|
60763
61065
|
// scripts/hooks/hook-ledger.ts
|
|
60764
61066
|
import { appendFile as appendFile2, mkdir as mkdir2 } from "node:fs/promises";
|
|
60765
|
-
import
|
|
61067
|
+
import path72 from "node:path";
|
|
60766
61068
|
|
|
60767
61069
|
// scripts/lib/git-animation.ts
|
|
60768
61070
|
import ora from "ora";
|
|
@@ -60950,7 +61252,7 @@ var git_branch = {
|
|
|
60950
61252
|
|
|
60951
61253
|
// scripts/observations/observation-ledger-home.ts
|
|
60952
61254
|
import { appendFile, mkdir, readdir, readFile as readFile2 } from "node:fs/promises";
|
|
60953
|
-
import
|
|
61255
|
+
import path71 from "node:path";
|
|
60954
61256
|
|
|
60955
61257
|
// scripts/observations/observation-ledger-migrate.ts
|
|
60956
61258
|
import {
|
|
@@ -60962,7 +61264,7 @@ import {
|
|
|
60962
61264
|
rmdirSync,
|
|
60963
61265
|
rmSync as rmSync8
|
|
60964
61266
|
} from "node:fs";
|
|
60965
|
-
import
|
|
61267
|
+
import path70 from "node:path";
|
|
60966
61268
|
|
|
60967
61269
|
// scripts/observations/observation-ledger-line.ts
|
|
60968
61270
|
var KEY_PREFIX = "- k:";
|
|
@@ -61024,7 +61326,7 @@ var observation_ledger_line = {
|
|
|
61024
61326
|
};
|
|
61025
61327
|
|
|
61026
61328
|
// scripts/observations/observation-ledger-migrate.ts
|
|
61027
|
-
var
|
|
61329
|
+
var NEWLINE3 = "\n";
|
|
61028
61330
|
function claim_path(legacy) {
|
|
61029
61331
|
return `${legacy}.${String(process.pid)}${MIGRATION_CLAIM_SUFFIX}`;
|
|
61030
61332
|
}
|
|
@@ -61043,24 +61345,24 @@ function is_stale_claim(name, legacy_name) {
|
|
|
61043
61345
|
return Number.isSafeInteger(pid) && !process_identity.is_present_pid(pid);
|
|
61044
61346
|
}
|
|
61045
61347
|
function stale_claims(legacy) {
|
|
61046
|
-
const directory =
|
|
61348
|
+
const directory = path70.dirname(legacy);
|
|
61047
61349
|
try {
|
|
61048
|
-
return readdirSync11(directory).filter((name) => is_stale_claim(name,
|
|
61350
|
+
return readdirSync11(directory).filter((name) => is_stale_claim(name, path70.basename(legacy))).map((name) => path70.join(directory, name));
|
|
61049
61351
|
} catch {
|
|
61050
61352
|
return [];
|
|
61051
61353
|
}
|
|
61052
61354
|
}
|
|
61053
61355
|
function terminated(content) {
|
|
61054
|
-
return content.length === 0 || content.endsWith(
|
|
61356
|
+
return content.length === 0 || content.endsWith(NEWLINE3) ? content : `${content}${NEWLINE3}`;
|
|
61055
61357
|
}
|
|
61056
61358
|
function carried(content, ledger) {
|
|
61057
61359
|
if (ledger === void 0) return terminated(content);
|
|
61058
|
-
const lines = content.split(
|
|
61360
|
+
const lines = content.split(NEWLINE3).filter((line2) => line2.length > 0);
|
|
61059
61361
|
const missing = observation_ledger_line.missing_lines(lines, ledger);
|
|
61060
|
-
return missing.length === 0 ? "" : `${missing.join(
|
|
61362
|
+
return missing.length === 0 ? "" : `${missing.join(NEWLINE3)}${NEWLINE3}`;
|
|
61061
61363
|
}
|
|
61062
61364
|
function absorb(claimed, target3) {
|
|
61063
|
-
mkdirSync7(
|
|
61365
|
+
mkdirSync7(path70.dirname(target3), { recursive: true });
|
|
61064
61366
|
appendFileSync2(
|
|
61065
61367
|
target3,
|
|
61066
61368
|
carried(readFileSync32(claimed, "utf8"), file_reader.read_if_readable(target3)),
|
|
@@ -61098,11 +61400,11 @@ function legacy_directory_names(directory) {
|
|
|
61098
61400
|
}
|
|
61099
61401
|
}
|
|
61100
61402
|
function migrate_directory(root2) {
|
|
61101
|
-
const legacy_directory =
|
|
61403
|
+
const legacy_directory = path70.join(root2, LEGACY_OBSERVATION_LEDGER_DIRECTORY);
|
|
61102
61404
|
const did_move = legacy_directory_names(legacy_directory).map(
|
|
61103
61405
|
(name) => migrate_one(
|
|
61104
|
-
|
|
61105
|
-
|
|
61406
|
+
path70.join(legacy_directory, name),
|
|
61407
|
+
path70.join(root2, OBSERVATION_LEDGER_DIRECTORY, name)
|
|
61106
61408
|
)
|
|
61107
61409
|
).some(Boolean);
|
|
61108
61410
|
try {
|
|
@@ -61112,9 +61414,9 @@ function migrate_directory(root2) {
|
|
|
61112
61414
|
return did_move;
|
|
61113
61415
|
}
|
|
61114
61416
|
function migrate(root2) {
|
|
61115
|
-
const target3 =
|
|
61417
|
+
const target3 = path70.join(root2, OBSERVATION_LEDGER_DIRECTORY, LEGACY_LEDGER_FILE);
|
|
61116
61418
|
const moved_files = LEGACY_OBSERVATION_LEDGER_PATHS.map(
|
|
61117
|
-
(legacy) => migrate_one(
|
|
61419
|
+
(legacy) => migrate_one(path70.join(root2, legacy), target3)
|
|
61118
61420
|
);
|
|
61119
61421
|
return [...moved_files, migrate_directory(root2)].some(Boolean);
|
|
61120
61422
|
}
|
|
@@ -61128,11 +61430,11 @@ function ledger_root(cwd = process.cwd()) {
|
|
|
61128
61430
|
function ledger_directory(cwd = process.cwd()) {
|
|
61129
61431
|
const root2 = ledger_root(cwd);
|
|
61130
61432
|
observation_ledger_migrate.migrate(root2);
|
|
61131
|
-
return
|
|
61433
|
+
return path71.join(root2, OBSERVATION_LEDGER_DIRECTORY);
|
|
61132
61434
|
}
|
|
61133
61435
|
function file_path2(name, cwd) {
|
|
61134
61436
|
ledger_directory(cwd);
|
|
61135
|
-
return
|
|
61437
|
+
return path71.join(ledger_root(cwd), observation_ledger.ledger_file(name));
|
|
61136
61438
|
}
|
|
61137
61439
|
function issue_path(issue3, cwd = process.cwd()) {
|
|
61138
61440
|
return file_path2(issue3, cwd);
|
|
@@ -61175,13 +61477,13 @@ async function read11(cwd = process.cwd(), is_strict = false) {
|
|
|
61175
61477
|
const files2 = await ledger_files(directory, is_strict);
|
|
61176
61478
|
if (files2 === void 0) return void 0;
|
|
61177
61479
|
const contents = await Promise.all(
|
|
61178
|
-
files2.map(async (name) => await read_file(
|
|
61480
|
+
files2.map(async (name) => await read_file(path71.join(directory, name), is_strict))
|
|
61179
61481
|
);
|
|
61180
61482
|
return contents.join("");
|
|
61181
61483
|
}
|
|
61182
61484
|
async function append4(target3, lines) {
|
|
61183
61485
|
if (lines.length === 0) return;
|
|
61184
|
-
await mkdir(
|
|
61486
|
+
await mkdir(path71.dirname(target3), { recursive: true });
|
|
61185
61487
|
await appendFile(target3, `${lines.join("\n")}
|
|
61186
61488
|
`, "utf8");
|
|
61187
61489
|
}
|
|
@@ -61192,6 +61494,7 @@ var observation_ledger_home = {
|
|
|
61192
61494
|
ledger_date,
|
|
61193
61495
|
ledger_root,
|
|
61194
61496
|
read: read11,
|
|
61497
|
+
read_file,
|
|
61195
61498
|
writer_path
|
|
61196
61499
|
};
|
|
61197
61500
|
|
|
@@ -61203,12 +61506,12 @@ var RULE_HEAD = 48;
|
|
|
61203
61506
|
var STOP_TOOL = "Stop";
|
|
61204
61507
|
var COMMAND_FIELDS = ["command", "file_path", "pattern", "url", "prompt"];
|
|
61205
61508
|
var input_schema = external_exports.record(external_exports.string(), external_exports.unknown());
|
|
61206
|
-
var
|
|
61509
|
+
var payload_schema4 = external_exports.object({
|
|
61207
61510
|
tool_name: external_exports.string().catch(STOP_TOOL),
|
|
61208
61511
|
tool_input: external_exports.unknown().optional(),
|
|
61209
61512
|
transcript_path: external_exports.string().catch("")
|
|
61210
61513
|
});
|
|
61211
|
-
var EMPTY_PAYLOAD =
|
|
61514
|
+
var EMPTY_PAYLOAD = payload_schema4.parse({});
|
|
61212
61515
|
var block_schema = external_exports.object({ decision: external_exports.literal("block"), reason: external_exports.string() });
|
|
61213
61516
|
function rule_of(reason4) {
|
|
61214
61517
|
const guard = time_transcript_line.guard_from_refusal(reason4);
|
|
@@ -61219,12 +61522,12 @@ function command_of2(input2) {
|
|
|
61219
61522
|
const value2 = COMMAND_FIELDS.map((key3) => fields[key3]).find((field2) => typeof field2 === "string");
|
|
61220
61523
|
return typeof value2 === "string" ? value2.slice(0, COMMAND_HEAD) : "";
|
|
61221
61524
|
}
|
|
61222
|
-
function entry_of2(
|
|
61223
|
-
const payload = json_value.parse_with(
|
|
61525
|
+
function entry_of2(refusal6, branch2, now, environment3) {
|
|
61526
|
+
const payload = json_value.parse_with(refusal6.raw_payload, payload_schema4) ?? EMPTY_PAYLOAD;
|
|
61224
61527
|
return {
|
|
61225
61528
|
at: now.toISOString(),
|
|
61226
|
-
hook:
|
|
61227
|
-
rule: rule_of(
|
|
61529
|
+
hook: refusal6.hook,
|
|
61530
|
+
rule: rule_of(refusal6.reason),
|
|
61228
61531
|
tool: payload.tool_name,
|
|
61229
61532
|
role: environment3[agent_session_role.KEY] ?? "",
|
|
61230
61533
|
issue: git_branch.issue_from_branch(branch2),
|
|
@@ -61235,19 +61538,19 @@ function entry_of2(refusal4, branch2, now, environment3) {
|
|
|
61235
61538
|
function ledger_directory2(context = hook_context.from_process()) {
|
|
61236
61539
|
if (context.env["VITEST"] !== void 0) return void 0;
|
|
61237
61540
|
const common2 = git_common_directory.repository(context.cwd);
|
|
61238
|
-
return common2 === void 0 ? void 0 :
|
|
61541
|
+
return common2 === void 0 ? void 0 : path72.join(common2, git_common_directory.STATE_DIRECTORY, LEDGER_DIRECTORY);
|
|
61239
61542
|
}
|
|
61240
61543
|
async function append5(entry, directory) {
|
|
61241
61544
|
const day = observation_ledger_home.ledger_date(new Date(entry.at));
|
|
61242
61545
|
await mkdir2(directory, { recursive: true });
|
|
61243
|
-
await appendFile2(
|
|
61546
|
+
await appendFile2(path72.join(directory, `${day}${LEDGER_EXTENSION}`), `${JSON.stringify(entry)}
|
|
61244
61547
|
`);
|
|
61245
61548
|
}
|
|
61246
|
-
async function record9(
|
|
61549
|
+
async function record9(refusal6, directory = ledger_directory2(), context = hook_context.from_process()) {
|
|
61247
61550
|
if (directory === void 0) return;
|
|
61248
61551
|
try {
|
|
61249
61552
|
const branch2 = await git_spawn.read(["-C", context.cwd, "rev-parse", "--abbrev-ref", "HEAD"]);
|
|
61250
|
-
await append5(entry_of2(
|
|
61553
|
+
await append5(entry_of2(refusal6, branch2, /* @__PURE__ */ new Date(), context.env), directory);
|
|
61251
61554
|
} catch {
|
|
61252
61555
|
}
|
|
61253
61556
|
}
|
|
@@ -61286,7 +61589,7 @@ function rules(environment3 = process.env) {
|
|
|
61286
61589
|
async function write_rules(demoted, file2 = DEMOTED_FILE) {
|
|
61287
61590
|
const sorted = [...demoted].toSorted((left, right) => left.localeCompare(right));
|
|
61288
61591
|
const body = JSON.stringify({ rules: sorted }, void 0, INDENT);
|
|
61289
|
-
await mkdir3(
|
|
61592
|
+
await mkdir3(path73.dirname(file2), { recursive: true });
|
|
61290
61593
|
await writeFile2(file2, `${body}
|
|
61291
61594
|
`);
|
|
61292
61595
|
}
|
|
@@ -61315,7 +61618,7 @@ var hook_demoted = {
|
|
|
61315
61618
|
};
|
|
61316
61619
|
|
|
61317
61620
|
// scripts/hooks/implementation-shell.ts
|
|
61318
|
-
import
|
|
61621
|
+
import path76 from "node:path";
|
|
61319
61622
|
|
|
61320
61623
|
// scripts/josh/josh-commands-backlog.ts
|
|
61321
61624
|
var EXCLUDE = "--exclude <N>";
|
|
@@ -62003,7 +62306,7 @@ var ISSUE_WRITE_COMMANDS = {
|
|
|
62003
62306
|
},
|
|
62004
62307
|
{
|
|
62005
62308
|
names: ["--label <name>"],
|
|
62006
|
-
description: "an extra label (
|
|
62309
|
+
description: "an extra label (e.g. `epic`). Repeatable. With `josh.worker`, `worker:<name>` names a printed profile."
|
|
62007
62310
|
},
|
|
62008
62311
|
{
|
|
62009
62312
|
names: ["--defect / --verification / --every-run <yes|no|unknown>"],
|
|
@@ -62027,7 +62330,7 @@ var ISSUE_WRITE_COMMANDS = {
|
|
|
62027
62330
|
},
|
|
62028
62331
|
{
|
|
62029
62332
|
names: ["--no-auto-ok"],
|
|
62030
|
-
description: "needs
|
|
62333
|
+
description: "needs human judgement or a verified user prohibition; no `auto-ok`."
|
|
62031
62334
|
},
|
|
62032
62335
|
{
|
|
62033
62336
|
names: ["--release"],
|
|
@@ -62102,7 +62405,7 @@ var ISSUE_WRITE_COMMANDS = {
|
|
|
62102
62405
|
// scripts/josh/josh-commands-issue.ts
|
|
62103
62406
|
var REPO3 = "--repo <owner/repo>";
|
|
62104
62407
|
var CONCURRENT = "several numbers, read concurrently";
|
|
62105
|
-
var
|
|
62408
|
+
var REPO_FLAG2 = {
|
|
62106
62409
|
names: [REPO3],
|
|
62107
62410
|
description: "read an issue in another repository; applies to every number."
|
|
62108
62411
|
};
|
|
@@ -62147,7 +62450,7 @@ var ISSUE_COMMANDS = {
|
|
|
62147
62450
|
{ arguments: "1715 1567 1605", note: CONCURRENT },
|
|
62148
62451
|
{ arguments: "42 --repo joshuafolkken/app-kit", note: "an issue in another repo" }
|
|
62149
62452
|
],
|
|
62150
|
-
flags: [
|
|
62453
|
+
flags: [REPO_FLAG2]
|
|
62151
62454
|
}
|
|
62152
62455
|
},
|
|
62153
62456
|
"issue:state": {
|
|
@@ -62161,7 +62464,7 @@ var ISSUE_COMMANDS = {
|
|
|
62161
62464
|
{ arguments: "42 43 44", note: "each block headed by `issue:`" },
|
|
62162
62465
|
{ arguments: "42 43 --repo joshuafolkken/app-kit", note: "a child in another repo" }
|
|
62163
62466
|
],
|
|
62164
|
-
flags: [
|
|
62467
|
+
flags: [REPO_FLAG2]
|
|
62165
62468
|
}
|
|
62166
62469
|
},
|
|
62167
62470
|
"issue:scout": {
|
|
@@ -62777,7 +63080,7 @@ var PROGRESS_COMMANDS = {
|
|
|
62777
63080
|
// scripts/josh/josh-commands-run.ts
|
|
62778
63081
|
var OWNER2 = "--owner <pid>";
|
|
62779
63082
|
var OUTPUT = "--output <path>";
|
|
62780
|
-
var
|
|
63083
|
+
var REPO_FLAG3 = { names: ["--repo <owner/name>"], description: "a child in another repository." };
|
|
62781
63084
|
var ISSUE = { arguments: "<N>" };
|
|
62782
63085
|
var RUN_HOLD_SCRIPT = "scripts/run/hold/run-hold-main.ts";
|
|
62783
63086
|
var RUN_COMMANDS = {
|
|
@@ -62940,17 +63243,25 @@ var RUN_COMMANDS = {
|
|
|
62940
63243
|
},
|
|
62941
63244
|
"run:park": {
|
|
62942
63245
|
script: "scripts/run/park/run-park-cli.ts",
|
|
62943
|
-
description: "Park a lane child for a decision, or clear the park",
|
|
63246
|
+
description: "Park a lane child for a decision or an escalation, or clear the park",
|
|
62944
63247
|
category: "AI tools",
|
|
62945
63248
|
tsx_arguments: OPTIONAL_ENV_FILE_FLAGS,
|
|
62946
|
-
reference: [
|
|
63249
|
+
reference: [
|
|
63250
|
+
"<issue> --body-file <path> | <issue> --clear | <issue> --escalate <reason>",
|
|
63251
|
+
"automation",
|
|
63252
|
+
["files", "network"]
|
|
63253
|
+
],
|
|
62947
63254
|
usage: {
|
|
62948
63255
|
examples: [
|
|
62949
63256
|
{
|
|
62950
63257
|
arguments: "1839 --body-file .josh/tmp/park-1839.md",
|
|
62951
63258
|
note: "options, tiers and a recommendation; then needs-decision, the record, run:release"
|
|
62952
63259
|
},
|
|
62953
|
-
{ arguments: "1839 --clear", note: "remove needs-decision and the record" }
|
|
63260
|
+
{ arguments: "1839 --clear", note: "remove needs-decision and the record" },
|
|
63261
|
+
{
|
|
63262
|
+
arguments: '1839 --escalate "needs a stronger model"',
|
|
63263
|
+
note: "josh.worker.escalate only: run:stalled with the reason, resumed one profile up"
|
|
63264
|
+
}
|
|
62954
63265
|
]
|
|
62955
63266
|
}
|
|
62956
63267
|
},
|
|
@@ -62978,7 +63289,7 @@ var RUN_COMMANDS = {
|
|
|
62978
63289
|
description: "silent window the file must be frozen for (default 30)."
|
|
62979
63290
|
},
|
|
62980
63291
|
{ names: ["--gap <sec>"], description: "spacing between samples (default 5)." },
|
|
62981
|
-
|
|
63292
|
+
REPO_FLAG3
|
|
62982
63293
|
]
|
|
62983
63294
|
}
|
|
62984
63295
|
},
|
|
@@ -62997,7 +63308,7 @@ var RUN_COMMANDS = {
|
|
|
62997
63308
|
names: [OUTPUT],
|
|
62998
63309
|
description: "the child's transcript, absolute and under the home or temp directory (validated the same way `run:liveness --output` is)."
|
|
62999
63310
|
},
|
|
63000
|
-
|
|
63311
|
+
REPO_FLAG3
|
|
63001
63312
|
]
|
|
63002
63313
|
}
|
|
63003
63314
|
},
|
|
@@ -63736,7 +64047,7 @@ var AI_COMMANDS = {
|
|
|
63736
64047
|
description: "Record a lane child's planned files; yield its lane, naming file and holder, when an earlier-planned running lane declares or plans one; `--size-approval` bounds lines/files",
|
|
63737
64048
|
category: "AI tools",
|
|
63738
64049
|
reference: [
|
|
63739
|
-
"<issue> <path>... [--probe] [--single] [--size-approval <json-file>] [--imports <path>...]",
|
|
64050
|
+
"<issue> <path>... [--probe] [--single] [--estimate <json-file>] [--size-approval <json-file>] [--imports <path>...]",
|
|
63740
64051
|
"automation",
|
|
63741
64052
|
["files", "network"]
|
|
63742
64053
|
],
|
|
@@ -63799,7 +64110,7 @@ var AI_COMMANDS = {
|
|
|
63799
64110
|
},
|
|
63800
64111
|
"lane:stats": {
|
|
63801
64112
|
...MEASURE_ARGUMENTS,
|
|
63802
|
-
description: "Print period lane throughput, stage, stop, check and machine-load statistics; --sinks shows stage totals, --over lane chains, --why cause groups above a net-minute threshold, and --pairs scoped pair runs",
|
|
64113
|
+
description: "Print period lane throughput, stage, stop (by failed CI check, longest first), check and machine-load statistics; --sinks shows stage totals, --over lane chains, --why cause groups above a net-minute threshold, and --pairs scoped pair runs",
|
|
63803
64114
|
category: "AI tools",
|
|
63804
64115
|
reference: [
|
|
63805
64116
|
"(--period <days> | --since <instant>) [--limit <lane-limit> | --sinks [<minutes>] | --over <minutes> | --why <minutes> | --pairs]",
|
|
@@ -63967,16 +64278,16 @@ import { availableParallelism } from "node:os";
|
|
|
63967
64278
|
|
|
63968
64279
|
// scripts/test/unit-lane-count.ts
|
|
63969
64280
|
import { readdirSync as readdirSync12 } from "node:fs";
|
|
63970
|
-
import
|
|
64281
|
+
import path74 from "node:path";
|
|
63971
64282
|
function is_idle_lane(lanes_root, issue3, environment3) {
|
|
63972
|
-
const common2 = git_directory.resolve_git_directory(
|
|
64283
|
+
const common2 = git_directory.resolve_git_directory(path74.join(lanes_root, issue3));
|
|
63973
64284
|
if (common2 === void 0) return false;
|
|
63974
64285
|
const override = environment3[platform_temporary.TEMP_ROOT_KEY];
|
|
63975
64286
|
const state_root3 = durable_state_root.state_root(override, () => common2);
|
|
63976
64287
|
return lane_state_record.is_idle(state_root3, common2, issue3);
|
|
63977
64288
|
}
|
|
63978
64289
|
function own_lane(checkout2, environment3) {
|
|
63979
|
-
return lane_paths.lane_issue_of(lane_paths.checkout_of(
|
|
64290
|
+
return lane_paths.lane_issue_of(lane_paths.checkout_of(path74.resolve(checkout2)), environment3);
|
|
63980
64291
|
}
|
|
63981
64292
|
function live_lane_count(checkout2 = process.cwd(), environment3 = process.env) {
|
|
63982
64293
|
try {
|
|
@@ -63994,7 +64305,7 @@ var unit_lane_count = { live_lane_count };
|
|
|
63994
64305
|
|
|
63995
64306
|
// scripts/test/unit-run-marker.ts
|
|
63996
64307
|
import { readdirSync as readdirSync13 } from "node:fs";
|
|
63997
|
-
import
|
|
64308
|
+
import path75 from "node:path";
|
|
63998
64309
|
var RUN_PREFIX = "josh-unit-running-";
|
|
63999
64310
|
var MIN_WORKERS = 1;
|
|
64000
64311
|
var SOLO_RUNS = 1;
|
|
@@ -64031,7 +64342,7 @@ function is_marker_live(source) {
|
|
|
64031
64342
|
return false;
|
|
64032
64343
|
}
|
|
64033
64344
|
function live_run_count(directory = PLATFORM_TEMP_ROOT) {
|
|
64034
|
-
return marker_files(directory).filter((name) => is_marker_live(
|
|
64345
|
+
return marker_files(directory).filter((name) => is_marker_live(path75.join(directory, name))).length;
|
|
64035
64346
|
}
|
|
64036
64347
|
var NESTED_KEY = "JOSH_UNIT_RUN_MARKED";
|
|
64037
64348
|
var NESTED_VALUE = "1";
|
|
@@ -64567,6 +64878,7 @@ var TEST_CHECK_COMMANDS = {
|
|
|
64567
64878
|
|
|
64568
64879
|
// scripts/josh/josh-commands-development.ts
|
|
64569
64880
|
var NARROWED = { arguments: "scripts/thing.ts", note: "narrow by the given files instead" };
|
|
64881
|
+
var FORWARDED_TO_VITEST = "flags are forwarded to vitest";
|
|
64570
64882
|
var UNSEEDED = {};
|
|
64571
64883
|
var FILE_ARGUMENTS = "[files...]";
|
|
64572
64884
|
var REQUIRED_FILE_ARGUMENTS = "<files...>";
|
|
@@ -64608,13 +64920,14 @@ var DEV_COMMANDS = {
|
|
|
64608
64920
|
script: "scripts/lint/lint-parallel-main.ts",
|
|
64609
64921
|
description: "Check code with prettier and eslint (skips a tool a basic project lacks)",
|
|
64610
64922
|
category: "Development",
|
|
64611
|
-
reference: ["[--changed]", "developer", ["processes"]],
|
|
64923
|
+
reference: ["[--changed] [--shard=<n>]", "developer", ["processes"]],
|
|
64612
64924
|
core_weight: core_weights.CORE_WEIGHTS.lint,
|
|
64613
64925
|
memory_mb: core_weights.MEMORY_MB.lint,
|
|
64614
64926
|
usage: {
|
|
64615
64927
|
examples: [
|
|
64616
64928
|
{ arguments: "" },
|
|
64617
|
-
{ arguments: "--changed", note: "the branch's changed files \u2014 the gate's form" }
|
|
64929
|
+
{ arguments: "--changed", note: "the branch's changed files \u2014 the gate's form" },
|
|
64930
|
+
{ arguments: "--shard=1", note: "one of two fixed halves of the tree (1 or 2) \u2014 a CI leg" }
|
|
64618
64931
|
]
|
|
64619
64932
|
}
|
|
64620
64933
|
},
|
|
@@ -64682,7 +64995,11 @@ var DEV_COMMANDS = {
|
|
|
64682
64995
|
script: "scripts/rules/rule-value-cli.ts",
|
|
64683
64996
|
description: "Print each delivered rule's unaided compliance \u2014 runs reached, kept rate, refusals",
|
|
64684
64997
|
category: "AI tools",
|
|
64685
|
-
reference: [
|
|
64998
|
+
reference: [
|
|
64999
|
+
"[--fresh | --refresh | --period <days> | --weekly <rule-id>... | --prose]",
|
|
65000
|
+
"developer",
|
|
65001
|
+
["files"]
|
|
65002
|
+
],
|
|
64686
65003
|
usage: {
|
|
64687
65004
|
examples: [
|
|
64688
65005
|
{ arguments: "", note: "a reading cached under 15 minutes ago, else measure" },
|
|
@@ -64691,6 +65008,14 @@ var DEV_COMMANDS = {
|
|
|
64691
65008
|
arguments: "--refresh",
|
|
64692
65009
|
note: "write the reading to the loop-head cache instead of stdout"
|
|
64693
65010
|
},
|
|
65011
|
+
{
|
|
65012
|
+
arguments: "--period 7",
|
|
65013
|
+
note: "measure only the transcripts written in the last 7 days, cache untouched"
|
|
65014
|
+
},
|
|
65015
|
+
{
|
|
65016
|
+
arguments: "--weekly <rule-id>...",
|
|
65017
|
+
note: "reached / refused / rephrased of the named rules, one line per week"
|
|
65018
|
+
},
|
|
64694
65019
|
{ arguments: "--prose", note: "class each prose rule: enforced, measured or prose only" }
|
|
64695
65020
|
]
|
|
64696
65021
|
}
|
|
@@ -64775,7 +65100,9 @@ var DEV_COMMANDS = {
|
|
|
64775
65100
|
category: "Development",
|
|
64776
65101
|
reference: [FILTER_ARGUMENTS, "developer", ["processes"]],
|
|
64777
65102
|
...gate_plan.DIRECT_UNIT_CLAIM,
|
|
64778
|
-
usage: {
|
|
65103
|
+
usage: {
|
|
65104
|
+
examples: [{ arguments: "" }, { arguments: "--shard=1/3", note: FORWARDED_TO_VITEST }]
|
|
65105
|
+
}
|
|
64779
65106
|
},
|
|
64780
65107
|
"test:related": {
|
|
64781
65108
|
script: "scripts/test/test-related-main.ts",
|
|
@@ -64786,8 +65113,8 @@ var DEV_COMMANDS = {
|
|
|
64786
65113
|
examples: [
|
|
64787
65114
|
{ arguments: "" },
|
|
64788
65115
|
NARROWED,
|
|
64789
|
-
{ arguments: "--touched", note: "
|
|
64790
|
-
{ arguments: "--silent", note:
|
|
65116
|
+
{ arguments: "--touched", note: "diff tests, same-named tests and direct test importers" },
|
|
65117
|
+
{ arguments: "--silent", note: FORWARDED_TO_VITEST }
|
|
64791
65118
|
]
|
|
64792
65119
|
}
|
|
64793
65120
|
},
|
|
@@ -64995,7 +65322,7 @@ var LINT_COMMANDS = {
|
|
|
64995
65322
|
script: "scripts/plan/plan-scaffold-cli.ts",
|
|
64996
65323
|
description: "Print a work summary's inputs in one call: the run:prep skeleton, planned files near the line limit, the test:declared verdict, the owed cases and the plan:consumers draft",
|
|
64997
65324
|
category: "AI tools",
|
|
64998
|
-
reference: ["<issue> [<path>...]", "automation", ["network"]],
|
|
65325
|
+
reference: ["<issue> [<path>...] [--estimate <json-file>]", "automation", ["network"]],
|
|
64999
65326
|
usage: {
|
|
65000
65327
|
examples: [
|
|
65001
65328
|
{ arguments: "123", note: "planned files from the issue body" },
|
|
@@ -65365,8 +65692,13 @@ var PROJECT_COMMANDS = {
|
|
|
65365
65692
|
script: "scripts/sync/sync-main.ts",
|
|
65366
65693
|
description: "Sync config files",
|
|
65367
65694
|
category: "Project",
|
|
65368
|
-
reference: ["", "developer", ["files"]],
|
|
65369
|
-
usage: {
|
|
65695
|
+
reference: ["[--force]", "developer", ["files"]],
|
|
65696
|
+
usage: {
|
|
65697
|
+
examples: [
|
|
65698
|
+
{ arguments: "", note: "overwrite managed files" },
|
|
65699
|
+
{ arguments: "--force", note: "also replace a file you added to, dropping your additions" }
|
|
65700
|
+
]
|
|
65701
|
+
}
|
|
65370
65702
|
},
|
|
65371
65703
|
uninstall: {
|
|
65372
65704
|
script: "scripts/uninstall/uninstall.ts",
|
|
@@ -65621,6 +65953,10 @@ var WORKFLOW_COMMANDS = {
|
|
|
65621
65953
|
{
|
|
65622
65954
|
names: [SKIP_COMMIT, SKIP_PUSH],
|
|
65623
65955
|
description: "recover/open a PR without a new commit or push."
|
|
65956
|
+
},
|
|
65957
|
+
{
|
|
65958
|
+
names: ["--body-file <path>"],
|
|
65959
|
+
description: "extra PR body text after `closes #N`, from a file (`-` = stdin); use it when the text holds a backtick or `$`."
|
|
65624
65960
|
}
|
|
65625
65961
|
]
|
|
65626
65962
|
}
|
|
@@ -65923,7 +66259,17 @@ function refusal(args) {
|
|
|
65923
66259
|
}
|
|
65924
66260
|
var josh_read_only = { ALL_FLAG, entry_of: entry_of3, is_help_request, refusal };
|
|
65925
66261
|
|
|
65926
|
-
// scripts/hooks/implementation-shell-deny.ts
|
|
66262
|
+
// scripts/hooks/implementation-shell-deny-expansion.ts
|
|
66263
|
+
var DYNAMIC = /[$`]/u;
|
|
66264
|
+
function is_dynamic(word2) {
|
|
66265
|
+
return DYNAMIC.test(word2);
|
|
66266
|
+
}
|
|
66267
|
+
function refusal2(program, word2) {
|
|
66268
|
+
return `\`${program} ${word2}\`, an expansion that may spell a write`;
|
|
66269
|
+
}
|
|
66270
|
+
var implementation_shell_deny_expansion = { is_dynamic, refusal: refusal2 };
|
|
66271
|
+
|
|
66272
|
+
// scripts/hooks/implementation-shell-deny-git.ts
|
|
65927
66273
|
var GIT_WRITES = /* @__PURE__ */ new Set([
|
|
65928
66274
|
"add",
|
|
65929
66275
|
"am",
|
|
@@ -65971,11 +66317,7 @@ var LIST_MODE = /^(?:-l$|--list$|-n\d*$|--contains|--no-contains|--points-at|--m
|
|
|
65971
66317
|
var LIST_VALUE_FLAGS = /* @__PURE__ */ new Set(["--sort", "--format"]);
|
|
65972
66318
|
var REFLOG_WRITES = /* @__PURE__ */ new Set(["expire", "delete"]);
|
|
65973
66319
|
var GIT_WRITE_FLAGS = /^-c$|^--(?:config-env|exec-path|output|ext-diff|textconv)/u;
|
|
65974
|
-
var DYNAMIC = /[$`]/u;
|
|
65975
66320
|
var QUOTES6 = /['"\\]/gu;
|
|
65976
|
-
function is_dynamic(word2) {
|
|
65977
|
-
return DYNAMIC.test(word2);
|
|
65978
|
-
}
|
|
65979
66321
|
function is_branch_change(argument) {
|
|
65980
66322
|
return BRANCH_CHANGE.test(argument) || git_argv.short_cluster_has(argument, BRANCH_CHANGE_LETTERS);
|
|
65981
66323
|
}
|
|
@@ -65997,6 +66339,32 @@ var GIT_READ_FORMS = /* @__PURE__ */ new Map([
|
|
|
65997
66339
|
["tag", is_listing],
|
|
65998
66340
|
["reflog", (args) => !REFLOG_WRITES.has(args[0] ?? "")]
|
|
65999
66341
|
]);
|
|
66342
|
+
function is_git_write(subcommand, args) {
|
|
66343
|
+
if (GIT_WRITES.has(subcommand)) return true;
|
|
66344
|
+
const read_form = GIT_READ_FORMS.get(subcommand);
|
|
66345
|
+
if (read_form === void 0) return false;
|
|
66346
|
+
return args.some((argument) => implementation_shell_deny_expansion.is_dynamic(argument)) || !read_form(args);
|
|
66347
|
+
}
|
|
66348
|
+
function parsed_git(segment) {
|
|
66349
|
+
return git_argv.parse(segment) ?? git_argv.parse(segment.replaceAll(QUOTES6, ""));
|
|
66350
|
+
}
|
|
66351
|
+
function subcommand_refusal(segment) {
|
|
66352
|
+
const call = parsed_git(segment);
|
|
66353
|
+
if (call?.subcommand === void 0) return void 0;
|
|
66354
|
+
if (implementation_shell_deny_expansion.is_dynamic(call.subcommand)) return implementation_shell_deny_expansion.refusal("git", call.subcommand);
|
|
66355
|
+
const subcommand = call.subcommand.replaceAll(QUOTES6, "");
|
|
66356
|
+
const args = call.args.map((argument) => argument.replaceAll(QUOTES6, ""));
|
|
66357
|
+
return is_git_write(subcommand, args) ? `\`git ${subcommand}\`, a git write` : void 0;
|
|
66358
|
+
}
|
|
66359
|
+
function refusal3(segment, args) {
|
|
66360
|
+
if (args.some((argument) => GIT_WRITE_FLAGS.test(argument))) {
|
|
66361
|
+
return "a git option that rewrites its configuration, runs a program or writes a file";
|
|
66362
|
+
}
|
|
66363
|
+
return subcommand_refusal(segment);
|
|
66364
|
+
}
|
|
66365
|
+
var implementation_shell_deny_git = { refusal: refusal3 };
|
|
66366
|
+
|
|
66367
|
+
// scripts/hooks/implementation-shell-deny.ts
|
|
66000
66368
|
var GH_READS = /* @__PURE__ */ new Set([
|
|
66001
66369
|
"checks",
|
|
66002
66370
|
"code",
|
|
@@ -66106,48 +66474,22 @@ var JOSH_SHARED_WRITES = /* @__PURE__ */ new Set([
|
|
|
66106
66474
|
"sync",
|
|
66107
66475
|
"uninstall"
|
|
66108
66476
|
]);
|
|
66109
|
-
function expansion_refusal(program, word2) {
|
|
66110
|
-
return `\`${program} ${word2}\`, an expansion that may spell a write`;
|
|
66111
|
-
}
|
|
66112
|
-
function is_git_write(subcommand, args) {
|
|
66113
|
-
if (GIT_WRITES.has(subcommand)) return true;
|
|
66114
|
-
const read_form = GIT_READ_FORMS.get(subcommand);
|
|
66115
|
-
if (read_form === void 0) return false;
|
|
66116
|
-
return args.some((argument) => is_dynamic(argument)) || !read_form(args);
|
|
66117
|
-
}
|
|
66118
|
-
function parsed_git(segment) {
|
|
66119
|
-
return git_argv.parse(segment) ?? git_argv.parse(segment.replaceAll(QUOTES6, ""));
|
|
66120
|
-
}
|
|
66121
|
-
function subcommand_refusal(segment) {
|
|
66122
|
-
const call = parsed_git(segment);
|
|
66123
|
-
if (call?.subcommand === void 0) return void 0;
|
|
66124
|
-
if (is_dynamic(call.subcommand)) return expansion_refusal("git", call.subcommand);
|
|
66125
|
-
const subcommand = call.subcommand.replaceAll(QUOTES6, "");
|
|
66126
|
-
const args = call.args.map((argument) => argument.replaceAll(QUOTES6, ""));
|
|
66127
|
-
return is_git_write(subcommand, args) ? `\`git ${subcommand}\`, a git write` : void 0;
|
|
66128
|
-
}
|
|
66129
|
-
function git_refusal(segment, args) {
|
|
66130
|
-
if (args.some((argument) => GIT_WRITE_FLAGS.test(argument))) {
|
|
66131
|
-
return "a git option that rewrites its configuration, runs a program or writes a file";
|
|
66132
|
-
}
|
|
66133
|
-
return subcommand_refusal(segment);
|
|
66134
|
-
}
|
|
66135
66477
|
function is_gh_api_write(args) {
|
|
66136
66478
|
if (args.includes("graphql")) return args.some((argument) => GRAPHQL_MUTATION2.test(argument));
|
|
66137
66479
|
return gh_api.is_write(["gh", ...args].join(" "));
|
|
66138
66480
|
}
|
|
66139
66481
|
function is_gh_verb(argument) {
|
|
66140
|
-
return GH_WRITES.has(argument) || GH_READS.has(argument) || is_dynamic(argument);
|
|
66482
|
+
return GH_WRITES.has(argument) || GH_READS.has(argument) || implementation_shell_deny_expansion.is_dynamic(argument);
|
|
66141
66483
|
}
|
|
66142
66484
|
function verb_refusal(group, args) {
|
|
66143
66485
|
const verb = args.slice(1).find((argument) => is_gh_verb(argument));
|
|
66144
66486
|
if (verb === void 0 || GH_READS.has(verb)) return void 0;
|
|
66145
|
-
return is_dynamic(verb) ?
|
|
66487
|
+
return implementation_shell_deny_expansion.is_dynamic(verb) ? implementation_shell_deny_expansion.refusal(`gh ${group}`, verb) : `\`gh ${group} ${verb}\`, a GitHub write`;
|
|
66146
66488
|
}
|
|
66147
66489
|
function gh_refusal(args) {
|
|
66148
66490
|
const group = args[0] ?? "";
|
|
66149
66491
|
if (group === "api") return is_gh_api_write(args) ? "a `gh api` call other than GET" : void 0;
|
|
66150
|
-
return is_dynamic(group) ?
|
|
66492
|
+
return implementation_shell_deny_expansion.is_dynamic(group) ? implementation_shell_deny_expansion.refusal("gh", group) : verb_refusal(group, args);
|
|
66151
66493
|
}
|
|
66152
66494
|
function is_flag(argument) {
|
|
66153
66495
|
return argument.startsWith("-");
|
|
@@ -66164,7 +66506,7 @@ function package_actions(call) {
|
|
|
66164
66506
|
return end === -1 && call.name === "yarn" ? [...actions, "install"] : actions;
|
|
66165
66507
|
}
|
|
66166
66508
|
function action_refusal(manager, action) {
|
|
66167
|
-
if (is_dynamic(action)) return
|
|
66509
|
+
if (implementation_shell_deny_expansion.is_dynamic(action)) return implementation_shell_deny_expansion.refusal(manager, action);
|
|
66168
66510
|
return PACKAGE_WRITES.has(action) ? `\`${action}\`, a dependency change` : void 0;
|
|
66169
66511
|
}
|
|
66170
66512
|
function package_refusal(call) {
|
|
@@ -66172,19 +66514,19 @@ function package_refusal(call) {
|
|
|
66172
66514
|
}
|
|
66173
66515
|
function josh_refusal(args) {
|
|
66174
66516
|
const command3 = canonical_command(args[0] ?? "");
|
|
66175
|
-
if (is_dynamic(command3)) return
|
|
66517
|
+
if (implementation_shell_deny_expansion.is_dynamic(command3)) return implementation_shell_deny_expansion.refusal("josh", command3);
|
|
66176
66518
|
if (!JOSH_SHARED_WRITES.has(command3)) return void 0;
|
|
66177
66519
|
const rule = josh_read_only.refusal(args);
|
|
66178
66520
|
return rule === void 0 ? void 0 : `\`josh ${command3}\`, a shared-state write: ${rule}`;
|
|
66179
66521
|
}
|
|
66180
|
-
function
|
|
66181
|
-
if (is_dynamic(call.name)) return `\`${call.name}\`, a program an expansion names`;
|
|
66182
|
-
if (call.name === "git") return
|
|
66522
|
+
function refusal4(segment, call) {
|
|
66523
|
+
if (implementation_shell_deny_expansion.is_dynamic(call.name)) return `\`${call.name}\`, a program an expansion names`;
|
|
66524
|
+
if (call.name === "git") return implementation_shell_deny_git.refusal(segment, call.args);
|
|
66183
66525
|
if (call.name === "gh") return gh_refusal(call.args);
|
|
66184
66526
|
if (call.name === "josh") return josh_refusal(call.args);
|
|
66185
66527
|
return package_refusal(call);
|
|
66186
66528
|
}
|
|
66187
|
-
var implementation_shell_deny = { refusal:
|
|
66529
|
+
var implementation_shell_deny = { refusal: refusal4 };
|
|
66188
66530
|
|
|
66189
66531
|
// scripts/hooks/implementation-shell-nested.ts
|
|
66190
66532
|
var SUBSTITUTION3 = /\$\(([^()]*)\)|`([^`]*)`|[<>]\(([^()]*)\)/u;
|
|
@@ -66306,8 +66648,21 @@ var QUOTES7 = /^['"]|['"]$/gu;
|
|
|
66306
66648
|
var DYNAMIC_PATH = /[$`*?{}\\]/u;
|
|
66307
66649
|
var COMPOUND_HEAD = /^\s*(?:[({!]\s*|(?:if|then|else|elif|while|until|do)\s+)+/u;
|
|
66308
66650
|
var COMPOUND_CLOSERS = /* @__PURE__ */ new Set([")", "}", " ", " ", "\n"]);
|
|
66309
|
-
var KEYWORDS = /* @__PURE__ */ new Set([
|
|
66310
|
-
|
|
66651
|
+
var KEYWORDS = /* @__PURE__ */ new Set([
|
|
66652
|
+
"for",
|
|
66653
|
+
"do",
|
|
66654
|
+
"done",
|
|
66655
|
+
"then",
|
|
66656
|
+
"else",
|
|
66657
|
+
"fi",
|
|
66658
|
+
"case",
|
|
66659
|
+
"select",
|
|
66660
|
+
"function",
|
|
66661
|
+
"esac"
|
|
66662
|
+
]);
|
|
66663
|
+
var FUNCTION_START = /^(?:function\s|[\w.:-]+\s*\(\s*\))/u;
|
|
66664
|
+
var FUNCTION_HEAD = /^(?:function\s+)?[\w.:-]+(?:\s*\()?$/u;
|
|
66665
|
+
var UNREAD_ARMS = [/^case\s[\s\S]*\)/u, /^[^\s$`]*\)/u];
|
|
66311
66666
|
var ARGUMENT_QUOTES = /['"\\]/gu;
|
|
66312
66667
|
var TIME_PROGRAM = /(?:^|\/)time$/u;
|
|
66313
66668
|
var TIME_WRITE = /^-(?:[A-Za-z]*o|-o)/u;
|
|
@@ -66355,8 +66710,8 @@ function written_args(call) {
|
|
|
66355
66710
|
return written.map((argument) => argument.slice(argument.indexOf("=") + 1));
|
|
66356
66711
|
}
|
|
66357
66712
|
function is_outside(target3, root2) {
|
|
66358
|
-
const relative =
|
|
66359
|
-
return relative.startsWith("..") ||
|
|
66713
|
+
const relative = path76.relative(root2, path76.resolve(root2, target3.replaceAll(QUOTES7, "")));
|
|
66714
|
+
return relative.startsWith("..") || path76.isAbsolute(relative);
|
|
66360
66715
|
}
|
|
66361
66716
|
function file_write_refusal(call, root2) {
|
|
66362
66717
|
return write_args_are_unsafe(call.args, root2) ? `\`${call.name}\` to a runtime path` : void 0;
|
|
@@ -66386,26 +66741,30 @@ function body_of2(segment) {
|
|
|
66386
66741
|
while (end > 0 && COMPOUND_CLOSERS.has(body.charAt(end - 1))) end -= 1;
|
|
66387
66742
|
return body.slice(0, end);
|
|
66388
66743
|
}
|
|
66389
|
-
function
|
|
66744
|
+
function call_of3(segment) {
|
|
66390
66745
|
const body = body_of2(segment);
|
|
66391
66746
|
if (KEYWORDS.has(git_argv.words_of(body)[0] ?? "")) return void 0;
|
|
66392
66747
|
return git_argv.program_of(body);
|
|
66393
66748
|
}
|
|
66394
66749
|
function command_refusal(segment, root2) {
|
|
66395
|
-
const call =
|
|
66750
|
+
const call = call_of3(segment);
|
|
66396
66751
|
return call === void 0 ? void 0 : call_refusal(body_of2(segment), call, root2);
|
|
66397
66752
|
}
|
|
66753
|
+
function is_unread_body(body) {
|
|
66754
|
+
if (FUNCTION_START.test(body)) return !FUNCTION_HEAD.test(body);
|
|
66755
|
+
return UNREAD_ARMS.some((pattern) => pattern.test(body));
|
|
66756
|
+
}
|
|
66398
66757
|
function segment_refusal(segment, root2) {
|
|
66399
66758
|
if (wrapper_writes(segment)) return "a time output file";
|
|
66400
|
-
if (
|
|
66759
|
+
if (is_unread_body(body_of2(segment))) return "a `case` arm or function body";
|
|
66401
66760
|
const target3 = redirected_paths(segment).find((redirected) => unsafe_path(redirected, root2));
|
|
66402
66761
|
return target3 === void 0 ? command_refusal(segment, root2) : `redirect to \`${target3}\``;
|
|
66403
66762
|
}
|
|
66404
66763
|
function is_cd(segment) {
|
|
66405
|
-
return
|
|
66764
|
+
return call_of3(segment)?.name === "cd";
|
|
66406
66765
|
}
|
|
66407
66766
|
function is_write2(segment) {
|
|
66408
|
-
const call =
|
|
66767
|
+
const call = call_of3(segment);
|
|
66409
66768
|
if (call !== void 0 && (FILE_PROGRAMS.has(call.name) || writes_elsewhere(call))) return true;
|
|
66410
66769
|
return redirected_paths(segment).some((redirected) => redirected !== "/dev/null");
|
|
66411
66770
|
}
|
|
@@ -66416,7 +66775,7 @@ function segments_refusal(segments, root2) {
|
|
|
66416
66775
|
}
|
|
66417
66776
|
function nested_lines(line2, segments) {
|
|
66418
66777
|
const launched2 = segments.flatMap((segment) => {
|
|
66419
|
-
const call =
|
|
66778
|
+
const call = call_of3(segment);
|
|
66420
66779
|
return call === void 0 ? [] : implementation_shell_nested.call_commands(call);
|
|
66421
66780
|
});
|
|
66422
66781
|
return [...implementation_shell_nested.substitution_bodies(line2), ...launched2];
|
|
@@ -66437,13 +66796,13 @@ function input_refusal(command3) {
|
|
|
66437
66796
|
if (command3.trim() === "") return "an empty command";
|
|
66438
66797
|
return time_shell.has_heredoc(command3) ? "a heredoc" : void 0;
|
|
66439
66798
|
}
|
|
66440
|
-
function
|
|
66799
|
+
function refusal5(command3, root2 = process.cwd()) {
|
|
66441
66800
|
return input_refusal(command3) ?? segments_refusal(segments_of3(command3), root2);
|
|
66442
66801
|
}
|
|
66443
66802
|
function is_unsafe(command3, root2 = process.cwd()) {
|
|
66444
|
-
return
|
|
66803
|
+
return refusal5(command3, root2) !== void 0;
|
|
66445
66804
|
}
|
|
66446
|
-
var implementation_shell = { is_unsafe, refusal:
|
|
66805
|
+
var implementation_shell = { is_unsafe, refusal: refusal5 };
|
|
66447
66806
|
|
|
66448
66807
|
// scripts/hooks/implementation-authority.ts
|
|
66449
66808
|
var HANDOFF3 = " Implementation refused before execution. Record the plan with issue:plan or issue:comment and hand it to lane:dispatch; repeating the request does not grant authority.";
|
|
@@ -66480,27 +66839,27 @@ var FILE_EXTENSION2 = /\.[a-z]\w*$/iu;
|
|
|
66480
66839
|
var ROOT_FILE_EXTENSION = /\.(?:[cm]?[jt]sx?|svelte|jsonc?|md|ya?ml|css|html|sh|toml|txt|properties)$/u;
|
|
66481
66840
|
var GLOB = "*";
|
|
66482
66841
|
var ISSUE_MARK = "#";
|
|
66483
|
-
var
|
|
66842
|
+
var SEPARATOR3 = "/";
|
|
66484
66843
|
var MIN_DIRECTORY_DEPTH = 2;
|
|
66485
66844
|
var DOCS_DIRECTORY = "docs/";
|
|
66486
66845
|
var MARKDOWN = ".md";
|
|
66487
|
-
function without_glob(
|
|
66488
|
-
const glob =
|
|
66489
|
-
return glob === -1 ?
|
|
66846
|
+
function without_glob(path78) {
|
|
66847
|
+
const glob = path78.indexOf(GLOB);
|
|
66848
|
+
return glob === -1 ? path78 : path78.slice(0, path78.lastIndexOf(SEPARATOR3, glob) + 1);
|
|
66490
66849
|
}
|
|
66491
66850
|
function is_narrow(directory) {
|
|
66492
|
-
return directory.split(
|
|
66851
|
+
return directory.split(SEPARATOR3).filter(Boolean).length >= MIN_DIRECTORY_DEPTH;
|
|
66493
66852
|
}
|
|
66494
|
-
function is_file3(
|
|
66495
|
-
return (
|
|
66853
|
+
function is_file3(path78) {
|
|
66854
|
+
return (path78.includes(SEPARATOR3) ? FILE_EXTENSION2 : ROOT_FILE_EXTENSION).test(path78);
|
|
66496
66855
|
}
|
|
66497
|
-
function claim_of(
|
|
66498
|
-
if (
|
|
66499
|
-
return is_file3(
|
|
66856
|
+
function claim_of(path78) {
|
|
66857
|
+
if (path78.endsWith(SEPARATOR3)) return is_narrow(path78) ? path78 : void 0;
|
|
66858
|
+
return is_file3(path78) ? path78 : void 0;
|
|
66500
66859
|
}
|
|
66501
66860
|
function path_claims(tokens) {
|
|
66502
66861
|
const paths2 = tokens.filter((token) => !token.includes(ISSUE_MARK)).map((token) => claim_of(without_glob(token.replace(LINE_SUFFIX2, ""))));
|
|
66503
|
-
return new Set(paths2.filter((
|
|
66862
|
+
return new Set(paths2.filter((path78) => path78 !== void 0));
|
|
66504
66863
|
}
|
|
66505
66864
|
function declared_paths(body) {
|
|
66506
66865
|
return path_claims([...body.matchAll(CODE_SPAN)].map((match) => match[1] ?? ""));
|
|
@@ -66509,10 +66868,10 @@ function declared_of(issues) {
|
|
|
66509
66868
|
return new Map(issues.map((issue3) => [issue3.number, declared_paths(issue3.body ?? "")]));
|
|
66510
66869
|
}
|
|
66511
66870
|
function contains(outer, inner) {
|
|
66512
|
-
return outer.endsWith(
|
|
66871
|
+
return outer.endsWith(SEPARATOR3) ? inner.startsWith(outer) : outer === inner;
|
|
66513
66872
|
}
|
|
66514
|
-
function is_shared_document(
|
|
66515
|
-
return
|
|
66873
|
+
function is_shared_document(path78) {
|
|
66874
|
+
return path78.startsWith(DOCS_DIRECTORY) && (path78.endsWith(SEPARATOR3) || path78.endsWith(MARKDOWN));
|
|
66516
66875
|
}
|
|
66517
66876
|
function overlaps(left, right) {
|
|
66518
66877
|
if (is_shared_document(left) || is_shared_document(right)) return false;
|
|
@@ -66520,7 +66879,7 @@ function overlaps(left, right) {
|
|
|
66520
66879
|
}
|
|
66521
66880
|
function claims_of(declared, holders) {
|
|
66522
66881
|
const pairs = holders.flatMap(
|
|
66523
|
-
(number4) => [...declared.get(number4) ?? []].map((
|
|
66882
|
+
(number4) => [...declared.get(number4) ?? []].map((path78) => [path78, number4])
|
|
66524
66883
|
);
|
|
66525
66884
|
return new Map(pairs);
|
|
66526
66885
|
}
|
|
@@ -66536,7 +66895,7 @@ function paths_of(child, declared, repo) {
|
|
|
66536
66895
|
}
|
|
66537
66896
|
function clash_of(claims, paths2) {
|
|
66538
66897
|
const clashes = [...paths2].flatMap(
|
|
66539
|
-
(
|
|
66898
|
+
(path78) => [...claims].filter(([claimed]) => overlaps(claimed, path78)).map(([claimed, holder]) => ({ path: path78, claimed, holder }))
|
|
66540
66899
|
);
|
|
66541
66900
|
return clashes[0];
|
|
66542
66901
|
}
|
|
@@ -66562,7 +66921,7 @@ function visit3(walk, child, paths2) {
|
|
|
66562
66921
|
const clash = clash_of(walk.claims, paths2);
|
|
66563
66922
|
if (clash === void 0) {
|
|
66564
66923
|
walk.offered.push(child);
|
|
66565
|
-
for (const
|
|
66924
|
+
for (const path78 of paths2) walk.claims.set(path78, child.number);
|
|
66566
66925
|
return;
|
|
66567
66926
|
}
|
|
66568
66927
|
walk.withheld.push(child);
|
|
@@ -66629,7 +66988,7 @@ var issue_fields_schema2 = external_exports.looseObject({
|
|
|
66629
66988
|
});
|
|
66630
66989
|
var comment_schema2 = external_exports.looseObject({
|
|
66631
66990
|
html_url: external_exports.string().optional(),
|
|
66632
|
-
user: external_exports.looseObject({ login: external_exports.string() }).optional(),
|
|
66991
|
+
user: external_exports.looseObject({ login: external_exports.string(), type: external_exports.string().optional() }).optional(),
|
|
66633
66992
|
created_at: external_exports.string().optional(),
|
|
66634
66993
|
body: external_exports.string().optional(),
|
|
66635
66994
|
author_association: external_exports.string().nullish()
|
|
@@ -66658,16 +67017,18 @@ async function parse_issue_fields(json2, repo) {
|
|
|
66658
67017
|
}
|
|
66659
67018
|
async function to_comment2(raw, repo) {
|
|
66660
67019
|
const login = raw.user?.login;
|
|
67020
|
+
const is_trusted2 = await gh_author_association.trust_of({
|
|
67021
|
+
login,
|
|
67022
|
+
association: raw.author_association,
|
|
67023
|
+
repo
|
|
67024
|
+
});
|
|
66661
67025
|
return {
|
|
66662
67026
|
html_url: raw.html_url,
|
|
66663
67027
|
author: login ?? UNKNOWN_AUTHOR2,
|
|
66664
67028
|
created_at: raw.created_at ?? UNKNOWN_TIME2,
|
|
66665
67029
|
body: raw.body ?? "",
|
|
66666
|
-
is_trusted:
|
|
66667
|
-
|
|
66668
|
-
association: raw.author_association,
|
|
66669
|
-
repo
|
|
66670
|
-
})
|
|
67030
|
+
is_trusted: is_trusted2,
|
|
67031
|
+
is_automated: issue_watch_diff.is_automated(raw, is_trusted2)
|
|
66671
67032
|
};
|
|
66672
67033
|
}
|
|
66673
67034
|
async function parse_comments2(json2, repo) {
|
|
@@ -66681,7 +67042,8 @@ function trusted_bodies(comments) {
|
|
|
66681
67042
|
}
|
|
66682
67043
|
function format_comment(comment) {
|
|
66683
67044
|
const trust = gh_comment_input.trust_of(comment.author, comment.is_trusted);
|
|
66684
|
-
const
|
|
67045
|
+
const source = comment.is_automated === true ? " [automated]" : "";
|
|
67046
|
+
const heading2 = `${COMMENT_HEADING2}${comment.author}${AT2}${comment.created_at} [${trust}]${source}`;
|
|
66685
67047
|
return `${heading2}
|
|
66686
67048
|
${comment.is_trusted === true ? comment.body : UNTRUSTED_COMMENT}`;
|
|
66687
67049
|
}
|
|
@@ -66791,6 +67153,7 @@ var lane_plan_schema = external_exports.object({
|
|
|
66791
67153
|
issue: external_exports.number(),
|
|
66792
67154
|
paths: external_exports.array(external_exports.string()),
|
|
66793
67155
|
planned_at: external_exports.string(),
|
|
67156
|
+
estimated_size: external_exports.object({ files: external_exports.number(), lines: external_exports.number() }).optional(),
|
|
66794
67157
|
size_approval: lane_plan_approval.approval_schema.optional(),
|
|
66795
67158
|
// `--single`: the plan is one deliverable with no separately-mergeable part, so a files-axis overrun
|
|
66796
67159
|
// is noted for the pre-gate `run:cut` to verify rather than refused (joshuafolkken/kit#6647).
|
|
@@ -67049,8 +67412,8 @@ function emit2(raw_payload, outcome, rewrite3, context = hook_context.from_proce
|
|
|
67049
67412
|
`);
|
|
67050
67413
|
}
|
|
67051
67414
|
async function record_refusal2(judged_payload, outcome, context = hook_context.from_process(), demoted = hook_demoted.rules(context.env)) {
|
|
67052
|
-
const
|
|
67053
|
-
await hook_ledger.record_reason(HOOK_NAME2,
|
|
67415
|
+
const refusal6 = outcome.reason ?? hook_demoted.refusal_of(outcome.notice, demoted);
|
|
67416
|
+
await hook_ledger.record_reason(HOOK_NAME2, refusal6, judged_payload, context);
|
|
67054
67417
|
if (outcome.reason === void 0) await direct_gh_usage.record(judged_payload, context);
|
|
67055
67418
|
}
|
|
67056
67419
|
async function respond2(raw_payload, context = hook_context.from_process()) {
|
|
@@ -67142,8 +67505,8 @@ var hook_daemon_call = { answer, is_answerable, parse_environment, LAUNCH_DIRECT
|
|
|
67142
67505
|
|
|
67143
67506
|
// tools/hooks/hook-daemon.ts
|
|
67144
67507
|
var DAEMON_SCRIPT = fileURLToPath7(import.meta.url);
|
|
67145
|
-
var PACKAGE_DIR2 =
|
|
67146
|
-
var OUT_DIR =
|
|
67508
|
+
var PACKAGE_DIR2 = path77.join(path77.dirname(DAEMON_SCRIPT), "..", "..");
|
|
67509
|
+
var OUT_DIR = path77.join(PACKAGE_DIR2, "dist", "hooks");
|
|
67147
67510
|
var DETACH_FLAG2 = "--detach";
|
|
67148
67511
|
var REQUESTS_NAME = "requests";
|
|
67149
67512
|
var PID_NAME = "pid";
|
|
@@ -67157,11 +67520,11 @@ var REPLY_FLAGS = constants8.O_WRONLY + constants8.O_NONBLOCK;
|
|
|
67157
67520
|
var REQUESTS_FLAGS = constants8.O_RDWR + constants8.O_NONBLOCK;
|
|
67158
67521
|
var ARGUMENTS_START = 2;
|
|
67159
67522
|
function stamp_text2(out_directory) {
|
|
67160
|
-
const stamp_path2 =
|
|
67523
|
+
const stamp_path2 = path77.join(out_directory, hook_bundle_stamp.STAMP_NAME);
|
|
67161
67524
|
return existsSync24(stamp_path2) ? readFileSync34(stamp_path2, "utf8") : "";
|
|
67162
67525
|
}
|
|
67163
67526
|
function is_installed(package_directory) {
|
|
67164
|
-
return package_directory.split(
|
|
67527
|
+
return package_directory.split(path77.sep).includes("node_modules");
|
|
67165
67528
|
}
|
|
67166
67529
|
function bundle_currency(out_directory, package_directory) {
|
|
67167
67530
|
const loaded = stamp_text2(out_directory);
|
|
@@ -67176,7 +67539,7 @@ function own_answer() {
|
|
|
67176
67539
|
}
|
|
67177
67540
|
function reply(request2, text3) {
|
|
67178
67541
|
try {
|
|
67179
|
-
const descriptor = openSync5(
|
|
67542
|
+
const descriptor = openSync5(path77.join(request2, "reply"), REPLY_FLAGS);
|
|
67180
67543
|
writeSync4(descriptor, `${text3}
|
|
67181
67544
|
`);
|
|
67182
67545
|
closeSync5(descriptor);
|
|
@@ -67185,7 +67548,7 @@ function reply(request2, text3) {
|
|
|
67185
67548
|
}
|
|
67186
67549
|
}
|
|
67187
67550
|
function is_own_directory(directory) {
|
|
67188
|
-
const pid_path =
|
|
67551
|
+
const pid_path = path77.join(directory, PID_NAME);
|
|
67189
67552
|
return existsSync24(pid_path) && readFileSync34(pid_path, "utf8").trim() === String(process.pid);
|
|
67190
67553
|
}
|
|
67191
67554
|
function close(daemon) {
|
|
@@ -67210,25 +67573,25 @@ function is_refused_stale(daemon, request2) {
|
|
|
67210
67573
|
return true;
|
|
67211
67574
|
}
|
|
67212
67575
|
function write_answer(request2, answer2) {
|
|
67213
|
-
writeFileSync8(
|
|
67214
|
-
writeFileSync8(
|
|
67576
|
+
writeFileSync8(path77.join(request2, "out"), answer2.stdout);
|
|
67577
|
+
writeFileSync8(path77.join(request2, "err"), answer2.stderr);
|
|
67215
67578
|
reply(request2, String(answer2.status));
|
|
67216
67579
|
}
|
|
67217
|
-
function
|
|
67218
|
-
const environment_path =
|
|
67580
|
+
function call_of4(request2) {
|
|
67581
|
+
const environment_path = path77.join(request2, ENVIRONMENT_NAME);
|
|
67219
67582
|
if (!existsSync24(environment_path)) return void 0;
|
|
67220
67583
|
const environment3 = hook_daemon_call.parse_environment(readFileSync34(environment_path, "utf8"));
|
|
67221
67584
|
rmSync9(environment_path, { force: true });
|
|
67222
67585
|
return {
|
|
67223
|
-
raw_payload: readFileSync34(
|
|
67224
|
-
launch_directory: readFileSync34(
|
|
67225
|
-
launcher_pid: Number(readFileSync34(
|
|
67586
|
+
raw_payload: readFileSync34(path77.join(request2, "payload"), "utf8"),
|
|
67587
|
+
launch_directory: readFileSync34(path77.join(request2, "cwd"), "utf8"),
|
|
67588
|
+
launcher_pid: Number(readFileSync34(path77.join(request2, LAUNCHER_NAME), "utf8")),
|
|
67226
67589
|
environment: environment3
|
|
67227
67590
|
};
|
|
67228
67591
|
}
|
|
67229
67592
|
async function serve_call(daemon, request2) {
|
|
67230
67593
|
if (is_refused_stale(daemon, request2)) return;
|
|
67231
|
-
const call =
|
|
67594
|
+
const call = call_of4(request2);
|
|
67232
67595
|
if (call === void 0 || !hook_daemon_call.is_answerable(call)) reply(request2, STALE_REPLY);
|
|
67233
67596
|
else write_answer(request2, await daemon.answer(call));
|
|
67234
67597
|
arm_idle(daemon);
|
|
@@ -67246,8 +67609,8 @@ async function serve(daemon) {
|
|
|
67246
67609
|
function claim4(directory) {
|
|
67247
67610
|
const staging = `${directory}.${String(process.pid)}`;
|
|
67248
67611
|
mkdirSync8(staging, { recursive: true });
|
|
67249
|
-
execFileSync4("mkfifo", [
|
|
67250
|
-
writeFileSync8(
|
|
67612
|
+
execFileSync4("mkfifo", [path77.join(staging, REQUESTS_NAME)]);
|
|
67613
|
+
writeFileSync8(path77.join(staging, PID_NAME), `${String(process.pid)}
|
|
67251
67614
|
`);
|
|
67252
67615
|
try {
|
|
67253
67616
|
renameSync4(staging, directory);
|
|
@@ -67258,7 +67621,7 @@ function claim4(directory) {
|
|
|
67258
67621
|
}
|
|
67259
67622
|
}
|
|
67260
67623
|
function daemon_of(directory, options) {
|
|
67261
|
-
const descriptor = openSync5(
|
|
67624
|
+
const descriptor = openSync5(path77.join(directory, REQUESTS_NAME), REQUESTS_FLAGS);
|
|
67262
67625
|
const input2 = new Socket({ fd: descriptor, readable: true, writable: false });
|
|
67263
67626
|
return {
|
|
67264
67627
|
directory,
|