@ebrindley/build 0.0.0-stage → 2026.11.14-rc.1
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/.build-project/providers/catalog.json +13951 -0
- package/.build-project/providers/pricing.json +1978 -0
- package/.build-project/providers/registry.json +4103 -0
- package/.github/SECURITY.md +74 -0
- package/.nvmrc +1 -0
- package/CHANGELOG.md +50 -0
- package/CODE_OF_CONDUCT.md +42 -0
- package/CONTRIBUTING.md +24 -0
- package/INSTALL.md +591 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/THIRD_PARTY_NOTICES.txt +26 -0
- package/dist/ai-judge-P76PUIGG.js +191 -0
- package/dist/allowlist-grounding-KPLN6NC5.js +16 -0
- package/dist/allowlist-utils-MZZKKXRD.js +31 -0
- package/dist/apply-completion-mode-NMTHIBGZ.js +110 -0
- package/dist/artifact-migrator-WPACNSEP.js +276 -0
- package/dist/ask-4TXKP3RI.js +176 -0
- package/dist/auth-3QJRCG25.js +98 -0
- package/dist/auth-6NHIMHHG.js +185 -0
- package/dist/auth-CJZKTUL6.js +165 -0
- package/dist/auth-LVJRJDMU.js +12 -0
- package/dist/auth-M2U6RZMX.js +94 -0
- package/dist/auth-SVBBT6HI.js +97 -0
- package/dist/auth-TVVKCHQW.js +13 -0
- package/dist/auth-VVLC77S3.js +44 -0
- package/dist/auth-VXRYDYX5.js +91 -0
- package/dist/auth-WJ626JPZ.js +95 -0
- package/dist/auth-liveness-XO4AGDDD.js +53 -0
- package/dist/autoloop-cleanup-SI3VGAAR.js +106 -0
- package/dist/autoloop-evidence-gates-J5GG5YQB.js +39 -0
- package/dist/autoloop-gate-policy-A4AIURPT.js +169 -0
- package/dist/autoloop-helpers-ZJ53ZIAQ.js +52 -0
- package/dist/autoloop-ledger-P6TIDP7C.js +96 -0
- package/dist/autoloop-ledger-subscriber-HFAGOZXH.js +161 -0
- package/dist/autoloop-run-defaults-GWGZBNT7.js +27 -0
- package/dist/autoloop-run-lock-GBWRM5A2.js +197 -0
- package/dist/autoloop-success-IV4WF5D5.js +93 -0
- package/dist/autoloop-termination-summary-GI6IBQWD.js +58 -0
- package/dist/autoloop-trajectory-2YRYN66M.js +70 -0
- package/dist/autoloop-wall-clock-T7ZVIQOC.js +12 -0
- package/dist/automatic-branch-cleanup-R62X2C5O.js +49 -0
- package/dist/autonomous-loop-controller-27HNZ3YO.js +4386 -0
- package/dist/backend-YUTFDZXZ.js +30 -0
- package/dist/background-executor-Z3ODTMD7.js +260 -0
- package/dist/backlog-RWVPK3EA.js +403 -0
- package/dist/backlog-execution-intent-GWUV5TUK.js +19 -0
- package/dist/backup-active-store-RWKK2BQU.js +16 -0
- package/dist/backup-machine-stores-SCDSMQQ6.js +251 -0
- package/dist/backup-telemetry-db-D3BN3JBM.js +26 -0
- package/dist/branch-archive-manager-FMSQ7YJF.js +18 -0
- package/dist/branch-cleanup-manager-ST6FJGND.js +35 -0
- package/dist/build-gate-SP7WFXG2.js +68 -0
- package/dist/build-root-S7DINODY.js +18 -0
- package/dist/change-summary-R6CB6VXJ.js +50 -0
- package/dist/chunk-255GCQ3R.js +486 -0
- package/dist/chunk-2C2AZO23.js +273 -0
- package/dist/chunk-2JIX3EKV.js +39 -0
- package/dist/chunk-2KO7HVZM.js +106 -0
- package/dist/chunk-2L36U25O.js +100 -0
- package/dist/chunk-2NMNFUQA.js +475 -0
- package/dist/chunk-2OUAEH67.js +83 -0
- package/dist/chunk-2VLJUXJU.js +115 -0
- package/dist/chunk-2VUEDIUM.js +77 -0
- package/dist/chunk-2Z5Q3SUY.js +65 -0
- package/dist/chunk-33IGPPUI.js +292 -0
- package/dist/chunk-352PCJLK.js +283 -0
- package/dist/chunk-35J4NE6S.js +226 -0
- package/dist/chunk-36VSKVB7.js +199 -0
- package/dist/chunk-3AMLRT2B.js +306 -0
- package/dist/chunk-3G7ORD7Z.js +272 -0
- package/dist/chunk-3H4MWYIC.js +198 -0
- package/dist/chunk-3HW3BM6X.js +27 -0
- package/dist/chunk-3IP5I32P.js +1351 -0
- package/dist/chunk-3JKNRYEE.js +14 -0
- package/dist/chunk-3LBW2KRC.js +1154 -0
- package/dist/chunk-3M57DADF.js +44 -0
- package/dist/chunk-3NGHELNE.js +1040 -0
- package/dist/chunk-3P5IN5E7.js +9 -0
- package/dist/chunk-3PL22IYZ.js +20 -0
- package/dist/chunk-3S2R4XJI.js +203 -0
- package/dist/chunk-3UBZI5DW.js +61 -0
- package/dist/chunk-3WY5TU2O.js +823 -0
- package/dist/chunk-43OKHTW4.js +82 -0
- package/dist/chunk-45KUJBDI.js +112 -0
- package/dist/chunk-47X5LM7B.js +224 -0
- package/dist/chunk-4BTDUT2S.js +42 -0
- package/dist/chunk-4DJL2VXA.js +24 -0
- package/dist/chunk-4EBSXZ73.js +48 -0
- package/dist/chunk-4EJKQIW2.js +17503 -0
- package/dist/chunk-4F2A5GIJ.js +100 -0
- package/dist/chunk-4KYTNIKH.js +235 -0
- package/dist/chunk-4QCF4WLL.js +1217 -0
- package/dist/chunk-4QKP6I4C.js +294 -0
- package/dist/chunk-4U6XK2DG.js +300 -0
- package/dist/chunk-4UMRUFBD.js +132 -0
- package/dist/chunk-4US4SYJ4.js +569 -0
- package/dist/chunk-56WPYDJH.js +624 -0
- package/dist/chunk-5AW4RMNG.js +24 -0
- package/dist/chunk-5BQAY2JI.js +248 -0
- package/dist/chunk-5EQN56OZ.js +155 -0
- package/dist/chunk-5F43TUIN.js +38 -0
- package/dist/chunk-5FKHIKTS.js +115 -0
- package/dist/chunk-5HCN4JO5.js +268 -0
- package/dist/chunk-5HDP7XZG.js +91 -0
- package/dist/chunk-5KQETTNS.js +152 -0
- package/dist/chunk-5PAYRRPK.js +318 -0
- package/dist/chunk-5PDVN2KO.js +498 -0
- package/dist/chunk-5PRWELNO.js +293 -0
- package/dist/chunk-5UBIFVRD.js +509 -0
- package/dist/chunk-5WV5L5XS.js +6858 -0
- package/dist/chunk-5XTL67ZG.js +373 -0
- package/dist/chunk-5YDE3Q62.js +46 -0
- package/dist/chunk-62NR3IQM.js +11639 -0
- package/dist/chunk-67YRJPJO.js +19 -0
- package/dist/chunk-6CB3KJRY.js +21 -0
- package/dist/chunk-6DBMALXL.js +29 -0
- package/dist/chunk-6FIBNIQU.js +73 -0
- package/dist/chunk-6G3XRYS3.js +2222 -0
- package/dist/chunk-6G57FYBV.js +189 -0
- package/dist/chunk-6J7ZWRKC.js +860 -0
- package/dist/chunk-6K76F2VW.js +204 -0
- package/dist/chunk-6L2XFPAR.js +50 -0
- package/dist/chunk-6LLGKBYC.js +2177 -0
- package/dist/chunk-6PZY2TTU.js +921 -0
- package/dist/chunk-6T6NHXK4.js +230 -0
- package/dist/chunk-6TBEX4R4.js +432 -0
- package/dist/chunk-6TRD7TEE.js +911 -0
- package/dist/chunk-726G6WDL.js +351 -0
- package/dist/chunk-75XKIYZH.js +541 -0
- package/dist/chunk-76A74QWN.js +119 -0
- package/dist/chunk-77I6G4CO.js +1 -0
- package/dist/chunk-7DJ6SQH3.js +510 -0
- package/dist/chunk-7E5NKFMT.js +162 -0
- package/dist/chunk-7HP2GFH2.js +306 -0
- package/dist/chunk-7HPCIOMA.js +1383 -0
- package/dist/chunk-7KBEOPVB.js +73 -0
- package/dist/chunk-7RMARDVH.js +33 -0
- package/dist/chunk-7S3YDXCH.js +627 -0
- package/dist/chunk-7SEWU4QG.js +36 -0
- package/dist/chunk-7TI73NPY.js +2896 -0
- package/dist/chunk-7TUTZTI2.js +911 -0
- package/dist/chunk-7VRJHTGZ.js +6406 -0
- package/dist/chunk-7YAOUUKK.js +493 -0
- package/dist/chunk-A3MYUPDL.js +5111 -0
- package/dist/chunk-A5A5QAUX.js +389 -0
- package/dist/chunk-ABMN3UEO.js +351 -0
- package/dist/chunk-AISTV5XU.js +226 -0
- package/dist/chunk-AJBTKGJZ.js +48 -0
- package/dist/chunk-AJMMLLP7.js +244 -0
- package/dist/chunk-AJN5Y5YZ.js +160 -0
- package/dist/chunk-ALDTFNZ3.js +150 -0
- package/dist/chunk-AM2CBMUV.js +529 -0
- package/dist/chunk-APKT7ARR.js +78 -0
- package/dist/chunk-ATBM6AW5.js +53 -0
- package/dist/chunk-ATKEKM3E.js +206 -0
- package/dist/chunk-ATLM7JIT.js +735 -0
- package/dist/chunk-AUJLW6JZ.js +92 -0
- package/dist/chunk-AY3MHEFM.js +24 -0
- package/dist/chunk-B7KDXQGO.js +19364 -0
- package/dist/chunk-B7PYTV72.js +236 -0
- package/dist/chunk-BAWJNMWF.js +339 -0
- package/dist/chunk-BBPIILO2.js +88 -0
- package/dist/chunk-BD3PGW6A.js +957 -0
- package/dist/chunk-BDJTIZHS.js +213 -0
- package/dist/chunk-BDPYFAB4.js +44 -0
- package/dist/chunk-BDYUPPEZ.js +176 -0
- package/dist/chunk-BF4WFISU.js +465 -0
- package/dist/chunk-BMJUJHQJ.js +22805 -0
- package/dist/chunk-BOCYU4HP.js +14 -0
- package/dist/chunk-BQ3VAGXH.js +243 -0
- package/dist/chunk-BQJOGAWT.js +31 -0
- package/dist/chunk-BT7EG7CO.js +68 -0
- package/dist/chunk-BTKKMYOG.js +1016 -0
- package/dist/chunk-BV3XQQLU.js +27 -0
- package/dist/chunk-BW443KUW.js +4885 -0
- package/dist/chunk-BY6ODHNZ.js +78 -0
- package/dist/chunk-BZRLSZNV.js +79 -0
- package/dist/chunk-C2SG2QFC.js +4696 -0
- package/dist/chunk-C2UGB2MV.js +568 -0
- package/dist/chunk-C3KCMAJP.js +756 -0
- package/dist/chunk-CA6GSDIV.js +2017 -0
- package/dist/chunk-CBZHP756.js +430 -0
- package/dist/chunk-CE4O646H.js +4933 -0
- package/dist/chunk-CE5OZBYY.js +21 -0
- package/dist/chunk-CHA2HDE5.js +126 -0
- package/dist/chunk-CIHWPGS5.js +146 -0
- package/dist/chunk-CJBSZX3F.js +127 -0
- package/dist/chunk-CLA6QIJM.js +43 -0
- package/dist/chunk-CPSVQR2I.js +365 -0
- package/dist/chunk-CRPRVNQ4.js +254 -0
- package/dist/chunk-CSIE4Y7C.js +1093 -0
- package/dist/chunk-CSOPSYDY.js +142 -0
- package/dist/chunk-CTAFIG47.js +141 -0
- package/dist/chunk-CTLW3SYJ.js +128 -0
- package/dist/chunk-CULBXMSK.js +110 -0
- package/dist/chunk-CXZ3DZL5.js +229 -0
- package/dist/chunk-D2IFUTLM.js +568 -0
- package/dist/chunk-D2M2Y5ID.js +21 -0
- package/dist/chunk-D4VJFCGZ.js +89 -0
- package/dist/chunk-D6WTZMZB.js +48 -0
- package/dist/chunk-DAS7J3JW.js +352 -0
- package/dist/chunk-DD4FGKKB.js +13 -0
- package/dist/chunk-DFDPRCSF.js +1012 -0
- package/dist/chunk-DJG5RIOR.js +9 -0
- package/dist/chunk-DP3RIHLU.js +655 -0
- package/dist/chunk-DP7FKP6W.js +855 -0
- package/dist/chunk-DR2ZKRVU.js +2479 -0
- package/dist/chunk-DS2JZ677.js +79 -0
- package/dist/chunk-DYET2NYJ.js +1063 -0
- package/dist/chunk-E2BWHHGS.js +2773 -0
- package/dist/chunk-EAEVKNJA.js +209 -0
- package/dist/chunk-EEUESN3T.js +575 -0
- package/dist/chunk-EIPHXFQV.js +15883 -0
- package/dist/chunk-EJ4LUU5Y.js +73 -0
- package/dist/chunk-EJVCDTAN.js +116 -0
- package/dist/chunk-ELD3RAZR.js +535 -0
- package/dist/chunk-ENYRCL43.js +26 -0
- package/dist/chunk-EO5UROKQ.js +173 -0
- package/dist/chunk-EP4SVAVI.js +87 -0
- package/dist/chunk-EPAMVGI3.js +1562 -0
- package/dist/chunk-EPRMH6HO.js +24 -0
- package/dist/chunk-ETA2K4KI.js +30 -0
- package/dist/chunk-ETAD4NKD.js +31 -0
- package/dist/chunk-EXA26FFC.js +459 -0
- package/dist/chunk-F55YABKV.js +258 -0
- package/dist/chunk-F5DNGU5W.js +27 -0
- package/dist/chunk-F622MJYV.js +103 -0
- package/dist/chunk-FAWJTC34.js +43 -0
- package/dist/chunk-FAZBRHGG.js +47 -0
- package/dist/chunk-FDI23B6R.js +1060 -0
- package/dist/chunk-FIEUSGNJ.js +39 -0
- package/dist/chunk-FKCG7K6H.js +1146 -0
- package/dist/chunk-FOEINBBP.js +268 -0
- package/dist/chunk-FRBPKBFE.js +30 -0
- package/dist/chunk-FSJ5TTZ3.js +29 -0
- package/dist/chunk-FTXOKV7Q.js +4783 -0
- package/dist/chunk-FWKOARI5.js +5297 -0
- package/dist/chunk-FY6Y4Z2F.js +852 -0
- package/dist/chunk-G4P33EWZ.js +657 -0
- package/dist/chunk-G7PQCXVH.js +228 -0
- package/dist/chunk-GAFJEYLK.js +29 -0
- package/dist/chunk-GBUCRC4E.js +1717 -0
- package/dist/chunk-GC4CRMTS.js +642 -0
- package/dist/chunk-GD5U6MD4.js +873 -0
- package/dist/chunk-GIDSGJBQ.js +269 -0
- package/dist/chunk-GM74HUBM.js +264 -0
- package/dist/chunk-GO6DRECI.js +1 -0
- package/dist/chunk-GOFVBTMN.js +314 -0
- package/dist/chunk-GOSY2TKK.js +20 -0
- package/dist/chunk-GQIP72ZJ.js +13 -0
- package/dist/chunk-GQXLXRFA.js +28 -0
- package/dist/chunk-GT6HFKJB.js +48 -0
- package/dist/chunk-GVJGSSKM.js +174 -0
- package/dist/chunk-GWHGTG37.js +36 -0
- package/dist/chunk-GZ63U7U2.js +47 -0
- package/dist/chunk-GZAJHLKO.js +18 -0
- package/dist/chunk-H3HGMISG.js +483 -0
- package/dist/chunk-H3ISZJMJ.js +403 -0
- package/dist/chunk-H3S2VHTT.js +152 -0
- package/dist/chunk-H4HXVWEC.js +9 -0
- package/dist/chunk-H6MJGKAW.js +120 -0
- package/dist/chunk-H6MNY4Z6.js +116 -0
- package/dist/chunk-HBZ322WZ.js +35 -0
- package/dist/chunk-HEP3ILP4.js +34 -0
- package/dist/chunk-HFF4KABU.js +154 -0
- package/dist/chunk-HGFXODKO.js +106 -0
- package/dist/chunk-HHWDTB6S.js +59 -0
- package/dist/chunk-HKO45NLZ.js +286 -0
- package/dist/chunk-HLVTEA6A.js +89 -0
- package/dist/chunk-HS3SY6HN.js +160 -0
- package/dist/chunk-HXN7G3OB.js +2147 -0
- package/dist/chunk-HZYKRLN3.js +753 -0
- package/dist/chunk-I56TH7VM.js +46 -0
- package/dist/chunk-IAAFU3XY.js +525 -0
- package/dist/chunk-IMEYU36R.js +344 -0
- package/dist/chunk-IOJ2RARW.js +205 -0
- package/dist/chunk-IUKOPCCE.js +441 -0
- package/dist/chunk-IVEPZQJO.js +33 -0
- package/dist/chunk-IVZEONFC.js +43 -0
- package/dist/chunk-IYY3HQAD.js +484 -0
- package/dist/chunk-J2ICMYDA.js +48 -0
- package/dist/chunk-J6NZX6QH.js +398 -0
- package/dist/chunk-J7XAYE7M.js +616 -0
- package/dist/chunk-JBBB2Y47.js +432 -0
- package/dist/chunk-JJAULOAQ.js +89 -0
- package/dist/chunk-JKSAZHPA.js +342 -0
- package/dist/chunk-JLS65NUQ.js +14 -0
- package/dist/chunk-JMJYHBIQ.js +81 -0
- package/dist/chunk-JNMWYMC6.js +38 -0
- package/dist/chunk-JNSTWNNW.js +25 -0
- package/dist/chunk-JQ5ENKLV.js +1266 -0
- package/dist/chunk-JQUMSIGC.js +100 -0
- package/dist/chunk-JTQ2LHWH.js +976 -0
- package/dist/chunk-JVHGMURQ.js +1106 -0
- package/dist/chunk-K7FAFORM.js +14 -0
- package/dist/chunk-KHMEI3DQ.js +173 -0
- package/dist/chunk-KHW3UD7B.js +69 -0
- package/dist/chunk-KI5DKAD3.js +2659 -0
- package/dist/chunk-KK3WQW5C.js +267 -0
- package/dist/chunk-KKQKWAMF.js +365 -0
- package/dist/chunk-KQ4NGOJI.js +14 -0
- package/dist/chunk-KQYQOXMS.js +342 -0
- package/dist/chunk-KRZP5VWN.js +1122 -0
- package/dist/chunk-KTMW65UX.js +14 -0
- package/dist/chunk-KWNWTV73.js +616 -0
- package/dist/chunk-KZ4JMGZ5.js +96 -0
- package/dist/chunk-L2PIVBOV.js +281 -0
- package/dist/chunk-L2S235CU.js +314 -0
- package/dist/chunk-L32WD57F.js +98 -0
- package/dist/chunk-LDJCKAJP.js +123 -0
- package/dist/chunk-LKJ3ZHTV.js +82 -0
- package/dist/chunk-LMQGJUMB.js +128 -0
- package/dist/chunk-LPQ7NZEN.js +209 -0
- package/dist/chunk-LR3SKBM4.js +380 -0
- package/dist/chunk-LRGH3CCV.js +148 -0
- package/dist/chunk-LS3G3OE4.js +2203 -0
- package/dist/chunk-LULOGMMM.js +1133 -0
- package/dist/chunk-LX4F24ZH.js +157 -0
- package/dist/chunk-LXGBPGVL.js +115 -0
- package/dist/chunk-LYCHRJ2C.js +1039 -0
- package/dist/chunk-M2D3JXGN.js +1104 -0
- package/dist/chunk-M43JKX7J.js +9193 -0
- package/dist/chunk-M4BUEXXF.js +839 -0
- package/dist/chunk-M6UHOC4I.js +553 -0
- package/dist/chunk-MD3HNAHH.js +6029 -0
- package/dist/chunk-MEMSY6VY.js +223 -0
- package/dist/chunk-MF3OKFQV.js +2002 -0
- package/dist/chunk-MFTHF7CD.js +716 -0
- package/dist/chunk-MGWZLY7K.js +167 -0
- package/dist/chunk-MHLEZQQI.js +145 -0
- package/dist/chunk-MJ6WNSIX.js +192 -0
- package/dist/chunk-MKASIKWZ.js +442 -0
- package/dist/chunk-MNOVBYFU.js +60 -0
- package/dist/chunk-MP6P7Y2A.js +180 -0
- package/dist/chunk-MT2WAIR3.js +131 -0
- package/dist/chunk-MTK57LHX.js +315 -0
- package/dist/chunk-MULMXX4V.js +150 -0
- package/dist/chunk-MY3ZPUN4.js +151 -0
- package/dist/chunk-MYLH2S4G.js +64 -0
- package/dist/chunk-MZ5WYKNA.js +28 -0
- package/dist/chunk-N3Q2JNPV.js +249 -0
- package/dist/chunk-N5DX4JAK.js +12 -0
- package/dist/chunk-NAINGKHF.js +35 -0
- package/dist/chunk-NEQUQHOX.js +223 -0
- package/dist/chunk-NHTIXJCR.js +17 -0
- package/dist/chunk-NLK4HOEL.js +1892 -0
- package/dist/chunk-NRFRY3GE.js +256 -0
- package/dist/chunk-NVOHIJKG.js +1319 -0
- package/dist/chunk-NXH3RX7O.js +523 -0
- package/dist/chunk-NXZ3DURF.js +257 -0
- package/dist/chunk-NY7VYMMY.js +220 -0
- package/dist/chunk-NZ4AOB7R.js +127 -0
- package/dist/chunk-O26L6F7F.js +209 -0
- package/dist/chunk-O4XNVUL6.js +1423 -0
- package/dist/chunk-O53PBXMZ.js +169 -0
- package/dist/chunk-O5RRIUEP.js +124 -0
- package/dist/chunk-O5X6BKAO.js +10 -0
- package/dist/chunk-O6ZQUVTR.js +31 -0
- package/dist/chunk-OBOOETH3.js +398 -0
- package/dist/chunk-OC7Z6AJQ.js +81 -0
- package/dist/chunk-OECHS63F.js +49 -0
- package/dist/chunk-OFHRC75P.js +3365 -0
- package/dist/chunk-OH7IEZ63.js +307 -0
- package/dist/chunk-OI734GRS.js +115 -0
- package/dist/chunk-OMX5VL43.js +79 -0
- package/dist/chunk-ONHAMBN6.js +12 -0
- package/dist/chunk-ONWEOPI3.js +849 -0
- package/dist/chunk-OSK7QWPD.js +637 -0
- package/dist/chunk-OTXLMJKP.js +438 -0
- package/dist/chunk-OXK5HA4B.js +31 -0
- package/dist/chunk-OZAUKWHB.js +22 -0
- package/dist/chunk-P3UARDCT.js +1814 -0
- package/dist/chunk-P5P2EKGH.js +94 -0
- package/dist/chunk-P6SSWAKY.js +29 -0
- package/dist/chunk-P77HFDOK.js +1697 -0
- package/dist/chunk-P7CQGPLS.js +30 -0
- package/dist/chunk-P7RVCHQV.js +197 -0
- package/dist/chunk-PEXIIJRN.js +505 -0
- package/dist/chunk-PJH32GLW.js +455 -0
- package/dist/chunk-PNFTPNSR.js +20 -0
- package/dist/chunk-PPHXX4W7.js +175 -0
- package/dist/chunk-PPZESPJT.js +262 -0
- package/dist/chunk-PRDHI2L5.js +296 -0
- package/dist/chunk-PSTKWHHN.js +32 -0
- package/dist/chunk-PTDYGMC7.js +5080 -0
- package/dist/chunk-PV53ODOT.js +555 -0
- package/dist/chunk-PVJBTI7P.js +24 -0
- package/dist/chunk-PXKERBKX.js +100 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-Q3DHEZA5.js +85 -0
- package/dist/chunk-Q7ADHWBE.js +8284 -0
- package/dist/chunk-QBWF4444.js +112 -0
- package/dist/chunk-QFLBRWCJ.js +126 -0
- package/dist/chunk-QILAQACE.js +107 -0
- package/dist/chunk-QJ6OEH4K.js +3683 -0
- package/dist/chunk-QK3NLYTV.js +320 -0
- package/dist/chunk-QOIASNEJ.js +98 -0
- package/dist/chunk-QP5ST7RI.js +904 -0
- package/dist/chunk-QTAOU53N.js +107 -0
- package/dist/chunk-QTBZFXYZ.js +314 -0
- package/dist/chunk-QWDV4OSL.js +142 -0
- package/dist/chunk-QWMQ74KD.js +508 -0
- package/dist/chunk-QX6LOMMH.js +158 -0
- package/dist/chunk-QXBKIHY7.js +238 -0
- package/dist/chunk-QXBKTJT6.js +270 -0
- package/dist/chunk-QXEPWDWA.js +1639 -0
- package/dist/chunk-QYQOVOLR.js +196 -0
- package/dist/chunk-QYXG23AM.js +247 -0
- package/dist/chunk-QZ74FBZC.js +5549 -0
- package/dist/chunk-R2CKS6WT.js +73 -0
- package/dist/chunk-R2TIYG7U.js +68 -0
- package/dist/chunk-R5V5GC3M.js +305 -0
- package/dist/chunk-RACDQC7S.js +3587 -0
- package/dist/chunk-RBBTBCHX.js +289 -0
- package/dist/chunk-RBKLOUXA.js +121 -0
- package/dist/chunk-RCP2Y6DQ.js +86 -0
- package/dist/chunk-RCYEJSD5.js +260 -0
- package/dist/chunk-RFDVSI4N.js +134 -0
- package/dist/chunk-RGXSKAPL.js +899 -0
- package/dist/chunk-RI4EX2QE.js +18 -0
- package/dist/chunk-RIMARPCF.js +152 -0
- package/dist/chunk-RJ6RSNT6.js +42 -0
- package/dist/chunk-RNI2GUIF.js +131 -0
- package/dist/chunk-RNZGCRJR.js +763 -0
- package/dist/chunk-RPIMAMV7.js +361 -0
- package/dist/chunk-RPLZ56H4.js +684 -0
- package/dist/chunk-RRC5BL7B.js +285 -0
- package/dist/chunk-RSYTSBOO.js +79 -0
- package/dist/chunk-RVMOOPSL.js +1212 -0
- package/dist/chunk-RWQQIKIC.js +35 -0
- package/dist/chunk-RXNV6FN2.js +236 -0
- package/dist/chunk-RXW6TSOH.js +168 -0
- package/dist/chunk-S2VQCZO4.js +22 -0
- package/dist/chunk-S47ISY27.js +183 -0
- package/dist/chunk-S6GZSVSF.js +340 -0
- package/dist/chunk-S6I4KISU.js +142 -0
- package/dist/chunk-SDJV2DTQ.js +491 -0
- package/dist/chunk-SDPIFNLD.js +33 -0
- package/dist/chunk-SF6YK3JI.js +835 -0
- package/dist/chunk-SFY5MOZC.js +611 -0
- package/dist/chunk-SGSZXSWM.js +593 -0
- package/dist/chunk-SHLWN3SJ.js +3892 -0
- package/dist/chunk-SK5ERXEO.js +681 -0
- package/dist/chunk-STW7OFOA.js +581 -0
- package/dist/chunk-SV4CD6L7.js +302 -0
- package/dist/chunk-SVJM3LJA.js +27 -0
- package/dist/chunk-SVNCLR45.js +729 -0
- package/dist/chunk-SVUNZOPG.js +129 -0
- package/dist/chunk-SZAJAHLF.js +3583 -0
- package/dist/chunk-T42WJJZC.js +951 -0
- package/dist/chunk-T5KLCNR7.js +43 -0
- package/dist/chunk-T5XLUYV3.js +34 -0
- package/dist/chunk-T75B55ZF.js +308 -0
- package/dist/chunk-T7AV45DV.js +191 -0
- package/dist/chunk-T7E5JS6N.js +57 -0
- package/dist/chunk-T7UY44GG.js +62 -0
- package/dist/chunk-TA3N5MMO.js +450 -0
- package/dist/chunk-TAJPCXSB.js +13 -0
- package/dist/chunk-TDAXL57Q.js +1225 -0
- package/dist/chunk-TDSEX5CF.js +24 -0
- package/dist/chunk-TGCVL74Y.js +28 -0
- package/dist/chunk-TIKTYUJO.js +296 -0
- package/dist/chunk-TJPAOGOE.js +2403 -0
- package/dist/chunk-TMBDRHAX.js +19 -0
- package/dist/chunk-TOROQXMH.js +353 -0
- package/dist/chunk-TS5WMNOJ.js +976 -0
- package/dist/chunk-TUQMMFEQ.js +2244 -0
- package/dist/chunk-U4DRS6ZW.js +11 -0
- package/dist/chunk-U5KS22IN.js +204 -0
- package/dist/chunk-UAPHFJPN.js +673 -0
- package/dist/chunk-UBVRHGAZ.js +237 -0
- package/dist/chunk-UDNNAQN5.js +98 -0
- package/dist/chunk-UGBKABLL.js +241 -0
- package/dist/chunk-UJP3XM54.js +342 -0
- package/dist/chunk-UKMPASIC.js +399 -0
- package/dist/chunk-UPHU64NB.js +1327 -0
- package/dist/chunk-UTDEOPKV.js +30 -0
- package/dist/chunk-UVKWU3SM.js +39 -0
- package/dist/chunk-V2TVPO3X.js +521 -0
- package/dist/chunk-V3KLVK7B.js +398 -0
- package/dist/chunk-V3WDLXPF.js +66 -0
- package/dist/chunk-V3YFFHDR.js +17 -0
- package/dist/chunk-VBNCKCCI.js +16 -0
- package/dist/chunk-VFRNYYVF.js +405 -0
- package/dist/chunk-VHW7QQJU.js +333 -0
- package/dist/chunk-VIFHYTI5.js +31 -0
- package/dist/chunk-VKBDYZ4I.js +14931 -0
- package/dist/chunk-VKKRXOFE.js +42 -0
- package/dist/chunk-VKRGWY72.js +9564 -0
- package/dist/chunk-VLMDM56Q.js +268 -0
- package/dist/chunk-VMFZEVVX.js +99 -0
- package/dist/chunk-VN4ENVVB.js +373 -0
- package/dist/chunk-VSWC5ZXI.js +103 -0
- package/dist/chunk-VUDLFGB4.js +726 -0
- package/dist/chunk-W6XSZKRH.js +93 -0
- package/dist/chunk-WEI3ZDZH.js +33 -0
- package/dist/chunk-WEIUS5NT.js +26 -0
- package/dist/chunk-WEW7UFWE.js +546 -0
- package/dist/chunk-WF7KFA3V.js +3673 -0
- package/dist/chunk-WGQAXLNA.js +384 -0
- package/dist/chunk-WGTFA6SF.js +936 -0
- package/dist/chunk-WJAL4JL3.js +206 -0
- package/dist/chunk-WKFOJ5ZG.js +141 -0
- package/dist/chunk-WNECKKO2.js +154 -0
- package/dist/chunk-WNP552XG.js +3803 -0
- package/dist/chunk-WPKLYOAM.js +195 -0
- package/dist/chunk-WQF3LSM7.js +4057 -0
- package/dist/chunk-WSH37YQN.js +243 -0
- package/dist/chunk-WV3KQDPE.js +84 -0
- package/dist/chunk-WVMB4G4B.js +1162 -0
- package/dist/chunk-XAXQRRKV.js +193 -0
- package/dist/chunk-XCOIBNET.js +13 -0
- package/dist/chunk-XDM65LBX.js +53 -0
- package/dist/chunk-XGU6PBO5.js +645 -0
- package/dist/chunk-XHOI4V62.js +43 -0
- package/dist/chunk-XJ2E7YEJ.js +117 -0
- package/dist/chunk-XLOAOXNN.js +1408 -0
- package/dist/chunk-XMFW7H67.js +1300 -0
- package/dist/chunk-XON4ZCYX.js +69 -0
- package/dist/chunk-XPVNGHPF.js +339 -0
- package/dist/chunk-XSJTIFUY.js +31 -0
- package/dist/chunk-XT7OVWM3.js +64 -0
- package/dist/chunk-XV7NZL4B.js +57 -0
- package/dist/chunk-XWIZ6B5S.js +109 -0
- package/dist/chunk-XWLIKOBX.js +240 -0
- package/dist/chunk-XXWHJM6Z.js +627 -0
- package/dist/chunk-XYL6WTBK.js +1775 -0
- package/dist/chunk-XZOXEIN4.js +156 -0
- package/dist/chunk-Y4ZDDHB6.js +44 -0
- package/dist/chunk-Y733RB7T.js +194 -0
- package/dist/chunk-YKC75XK4.js +147 -0
- package/dist/chunk-YKMXFVK7.js +27 -0
- package/dist/chunk-YO5BAJ55.js +225 -0
- package/dist/chunk-YTB3AMBR.js +1523 -0
- package/dist/chunk-YVCMDVBB.js +698 -0
- package/dist/chunk-YYQJK6RH.js +1480 -0
- package/dist/chunk-YYTOA6DP.js +114 -0
- package/dist/chunk-Z5WGNULV.js +88 -0
- package/dist/chunk-Z7CDQNH3.js +20 -0
- package/dist/chunk-ZC7NMYW7.js +525 -0
- package/dist/chunk-ZH4G3FU5.js +187 -0
- package/dist/chunk-ZHLPH5SW.js +1853 -0
- package/dist/chunk-ZJB6SQPA.js +257 -0
- package/dist/chunk-ZL6E4HMY.js +42 -0
- package/dist/chunk-ZMLOC3DW.js +62 -0
- package/dist/chunk-ZR3DRTPS.js +101 -0
- package/dist/chunk-ZUQOHGNF.js +1087 -0
- package/dist/chunk-ZVVD2XGV.js +1369 -0
- package/dist/chunk-ZWJVJRAJ.js +147 -0
- package/dist/chunk-ZZ44KOJE.js +936 -0
- package/dist/cli-utils-UZXE5ZDI.js +31 -0
- package/dist/cli-validation-7V62UMMF.js +146 -0
- package/dist/commit-utils-X5NF3HPV.js +49 -0
- package/dist/compatibility-notice-IHNXR2JR.js +21 -0
- package/dist/compete-config-resolver-6IV5CXGB.js +125 -0
- package/dist/compete-results-VEALUDCA.js +318 -0
- package/dist/competition-outcome-tracker-HBS3DAIW.js +62 -0
- package/dist/config-5O667W6K.js +238 -0
- package/dist/config-D6YAZASH.js +10 -0
- package/dist/config-MIPRDYYV.js +46 -0
- package/dist/config-audit-GA5DCUAI.js +371 -0
- package/dist/config-explain-4LMO556H.js +71 -0
- package/dist/config-loader-RGP634PC.js +51 -0
- package/dist/config-manager-HUUYZBVH.js +114 -0
- package/dist/config-merger-TVUJBZTS.js +14 -0
- package/dist/config-validator-C2YJK6D2.js +122 -0
- package/dist/cost-47AWUZZA.js +85 -0
- package/dist/data-migration-state-OAUL2WPQ.js +35 -0
- package/dist/db-migrator-TBXW3YKD.js +34 -0
- package/dist/default-paths-UILB62BN.js +49 -0
- package/dist/discovery-V6GYUJUC.js +53 -0
- package/dist/doctor-5YSXN65Z.js +271 -0
- package/dist/doctor-context-blocks-Z6QMVXAA.js +231 -0
- package/dist/doctor-instructions-import-JXHDDOE5.js +70 -0
- package/dist/doctor-purpose-6YJOXPBE.js +30 -0
- package/dist/domain-analyzer-2SA5MZ6I.js +48 -0
- package/dist/ensure-initialized-43TQXLWG.js +78 -0
- package/dist/entry.js +922 -0
- package/dist/error-parser-core-MZFMFANN.js +70 -0
- package/dist/evaluation-context-LGVCCZCD.js +63 -0
- package/dist/evidence-plan-resolver-TTWTL3KQ.js +111 -0
- package/dist/execution-data-writer-ZFAKAVYW.js +72 -0
- package/dist/execution-policy-applier-KQWS3O5P.js +63 -0
- package/dist/execution-preflight-DASJWWQF.js +223 -0
- package/dist/execution-roles-TUTFKMZD.js +112 -0
- package/dist/exit-code-error-QIY5DOKF.js +18 -0
- package/dist/external-temp-cleanup-CAW7LQ6R.js +360 -0
- package/dist/factory-3OIDTOAV.js +209 -0
- package/dist/file-utils-ZQYNBQBW.js +45 -0
- package/dist/flywheel-allowlist-revert-H22HA6JE.js +21 -0
- package/dist/flywheel-autoloop-executor-EOVQVGCP.js +316 -0
- package/dist/flywheel-autoloop-unverified-TOKYFCDC.js +36 -0
- package/dist/flywheel-competition-executor-JHAXBGES.js +320 -0
- package/dist/flywheel-executor-EJPCV25V.js +437 -0
- package/dist/flywheel-git-isolation-7OEY5HE3.js +56 -0
- package/dist/flywheel-manifest-HDPNMWWF.js +114 -0
- package/dist/flywheel-model-defaults-OX7MOPHX.js +110 -0
- package/dist/flywheel-preflight-N7NJMMJ6.js +163 -0
- package/dist/flywheel-resume-2O45MS7Y.js +31 -0
- package/dist/flywheel-resume-execution-lease-P2BK257J.js +59 -0
- package/dist/flywheel-safety-AVAVFXIJ.js +19 -0
- package/dist/flywheel-scope-decision-ALJUUNGG.js +14 -0
- package/dist/get-telemetry-logger-5X5JXNZB.js +155 -0
- package/dist/git-message-style-KOQUZVIJ.js +104 -0
- package/dist/guidance-profile-config-G3K5YQOO.js +113 -0
- package/dist/guidance-profile-renderer-TX4TNDFL.js +23 -0
- package/dist/identity-XLQJ4YJF.js +25 -0
- package/dist/index-query-MTGZRGNM.js +37 -0
- package/dist/index.js +85588 -0
- package/dist/indexer-KBF2A232.js +44 -0
- package/dist/init-TBSOCS2S.js +245 -0
- package/dist/instructions-import-offer-56MA4P4X.js +363 -0
- package/dist/instructions-run-NBII7W36.js +114 -0
- package/dist/interrupted-work-E4TLKJLE.js +43 -0
- package/dist/invoke-provider-auth-JUYALPCP.js +38 -0
- package/dist/judge-scoring.json +64 -0
- package/dist/lab-mode-YXQ2Y3NG.js +44 -0
- package/dist/lab-utils-NVOWZERE.js +29 -0
- package/dist/linux-host-class-YDWQX65O.js +31 -0
- package/dist/llm-judge-executor-CD74WGPL.js +179 -0
- package/dist/local-ci-config-GWKQ5OQO.js +48 -0
- package/dist/local-executor-3DACBI56.js +280 -0
- package/dist/logger-PO2MGSJH.js +154 -0
- package/dist/matrix-prompt-builder-DDTTOGVL.js +527 -0
- package/dist/matrix-result-parser-EZJM4YXP.js +14 -0
- package/dist/merge-batch-3VU62Q6D.js +313 -0
- package/dist/merge-batch-members-VIWGVRHP.js +24 -0
- package/dist/merge-queue-5UES5GTA.js +126 -0
- package/dist/merge-queue-trust-DUNZ4J65.js +21 -0
- package/dist/metadata-UKSMWM6J.js +29 -0
- package/dist/model-catalog-readiness-3NS3PK4O.js +202 -0
- package/dist/model-invocations-db-5NTDQ54O.js +70 -0
- package/dist/model-resolver-JFZ2MHOJ.js +39 -0
- package/dist/model-resolver-KRV2SOHB.js +217 -0
- package/dist/model-roles-2HTCTA75.js +110 -0
- package/dist/monitor-ZJKTHGPO.js +96 -0
- package/dist/nested-worktrees-2WUWQ75N.js +23 -0
- package/dist/next-5RS7WISZ.js +148 -0
- package/dist/next-LZIWRYGK.js +96 -0
- package/dist/opportunistic-TL4S26VX.js +86 -0
- package/dist/optimization-config-resolver-AWJX44FF.js +148 -0
- package/dist/package-HJR4QJT4.js +10 -0
- package/dist/parse-git-status-7PIYFPS2.js +21 -0
- package/dist/path-security-5WJSY56G.js +41 -0
- package/dist/paths-JUI7C4KU.js +45 -0
- package/dist/plan-backlog-list-fast-UJZNSWVD.js +89 -0
- package/dist/plan-backlog-show-fast-LXBWOMU2.js +114 -0
- package/dist/plan-sprint-list-fast-MWZHKH6P.js +110 -0
- package/dist/plan-sprint-status-fast-TCXDV45R.js +116 -0
- package/dist/plan-task-status-fast-P5TGGHBW.js +114 -0
- package/dist/plan-to-flywheel-HSGJUZB4.js +529 -0
- package/dist/preflight-PJHGTJNZ.js +12 -0
- package/dist/process-registry-B4ZUCN7T.js +28 -0
- package/dist/process-scanner-TU3QHWVB.js +23 -0
- package/dist/processes-6FHVGT72.js +28 -0
- package/dist/processes-json-fast-YWTMUWXB.js +72 -0
- package/dist/profile-4SMIT777.js +209 -0
- package/dist/project-runtime-paths-2UQNG5Y4.js +41 -0
- package/dist/protected-branches-N36LDBFY.js +71 -0
- package/dist/provider-aware-resource-manager-YTFAHNGJ.js +40 -0
- package/dist/provider-matrix-W7UZGMJF.js +214 -0
- package/dist/provider-matrix-renderer-MEC3PER7.js +139 -0
- package/dist/provider-output-forwarding-2AHL7YMA.js +26 -0
- package/dist/provider-registry-WCZ65QHC.js +136 -0
- package/dist/provider-temp-cleanup-IUNPJCZF.js +14 -0
- package/dist/prune-engine-EOQVWEP6.js +448 -0
- package/dist/publication-turn-S3UPPPH7.js +44 -0
- package/dist/quality-gate-WDBGVBOT.js +72 -0
- package/dist/quickstart-7QRPZYSF.js +105 -0
- package/dist/readiness-3HL55QZL.js +215 -0
- package/dist/readiness-KNIGRRCW.js +139 -0
- package/dist/registry-X6AHSKBH.js +217 -0
- package/dist/repair-helpers-TTV5FEF4.js +117 -0
- package/dist/repo-root-YG6MQZDW.js +28 -0
- package/dist/resolution-engine-XUQUTRTS.js +187 -0
- package/dist/resolve-provider-cli-ZEXVZKET.js +44 -0
- package/dist/restore-telemetry-db-7ED3F6DX.js +459 -0
- package/dist/routing-events-AW6SRZ6G.js +13 -0
- package/dist/routing-history-store-FMDDQL6W.js +39 -0
- package/dist/routing-planner-XA57GZHY.js +221 -0
- package/dist/runner-PUCNKWCT.js +1194 -0
- package/dist/runner-XCLPVO5E.js +1801 -0
- package/dist/safety-E3JJVSFL.js +67 -0
- package/dist/safety-stanza-A3VLCZ2H.js +49 -0
- package/dist/sandbox-OD4LOUZF.js +80 -0
- package/dist/sandbox-P7PMT2AI.js +72 -0
- package/dist/schema-extensions.sql +234 -0
- package/dist/security-JI22TBEB.js +17 -0
- package/dist/setup-bb-plugin-FQXLA76Y.js +531 -0
- package/dist/setup-claude-code-NF4ZSHVE.js +197 -0
- package/dist/setup-temp-cleanup-2APZ4HMA.js +29 -0
- package/dist/shared-utils-23YENZ6L.js +40 -0
- package/dist/simple-artifact-goal-MQLDDMMX.js +29 -0
- package/dist/sprint-XCOC4XXU.js +403 -0
- package/dist/sprint-bridge-OZYG46PJ.js +117 -0
- package/dist/sprint-completion-dependents-YFQU5JDC.js +43 -0
- package/dist/sprint-execution-service-NP5HBU6T.js +376 -0
- package/dist/sprint-manager-TBKUDU3M.js +140 -0
- package/dist/sqlite-timeout-config-U2CT4LKU.js +13 -0
- package/dist/sqlite-wrapper-QMWCB5MI.js +19 -0
- package/dist/stale-cleanup-orchestrator-SFKS7B7J.js +71 -0
- package/dist/storage-access-I3V5LER7.js +31 -0
- package/dist/store-7X4JJZVD.js +25 -0
- package/dist/task-classifier-QITIA5JF.js +558 -0
- package/dist/task-list-fast-M7KUVLTK.js +112 -0
- package/dist/task-manager-3JSGIS2D.js +136 -0
- package/dist/task-report-RMC5RBLY.js +64 -0
- package/dist/task-type-detector-6RG3YNZF.js +27 -0
- package/dist/task-type-resolver-IAEHX2SX.js +64 -0
- package/dist/telemetry-WEYZO4OT.js +212 -0
- package/dist/telemetry-health-tracker-4GFW2EMP.js +12 -0
- package/dist/telemetry-path-resolver-H3NFHHQY.js +34 -0
- package/dist/telemetry-reliability-7ZVZFFXV.js +76 -0
- package/dist/transports-NREZQTJK.js +106 -0
- package/dist/unified-cost-tracker-VQSMUKB3.js +59 -0
- package/dist/unified-state-cleanup-GGAXLHXF.js +292 -0
- package/dist/universal-cost-calculator-DDIFTBAW.js +70 -0
- package/dist/user-agents-QLIGPLP2.js +30 -0
- package/dist/variant-execution-JOLABWQB.js +319 -0
- package/dist/variant-opt-parser-LRER4Z4C.js +251 -0
- package/dist/variant-request-input-PL37N3AN.js +11 -0
- package/dist/variant-state-cleanup-UM6E447S.js +287 -0
- package/dist/variant-worker-2AMIEGCQ.js +4517 -0
- package/dist/variant-worker.js +26 -0
- package/dist/variants-4ESVSSLL.js +267 -0
- package/dist/verification-command-N5KNDNN5.js +66 -0
- package/dist/verify-command-timeout-DQUYH33Z.js +11 -0
- package/dist/verify-commands-OIZYQJRL.js +65 -0
- package/dist/warning-JSKSFKBT.js +13 -0
- package/dist/work-edge-K65NHVWY.js +50 -0
- package/dist/work-item-writer-KY5ZWZWW.js +30 -0
- package/dist/worker-WIWN62MC.js +1504 -0
- package/dist/worker.js +21 -0
- package/dist/workspace-tree-identity-OKMMEB22.js +52 -0
- package/dist/worktree-environment-KH47J7UE.js +64 -0
- package/dist/worktree-metrics-PVB2RJ22.js +66 -0
- package/dist/writeback-IQTIUNV7.js +50 -0
- package/docs/CLI_REFERENCE.md +8285 -0
- package/docs/PROVIDER_SETUP.md +1737 -0
- package/docs/README.md +94 -0
- package/docs/TROUBLESHOOTING.md +2192 -0
- package/docs/getting-started/QUICK_START.md +260 -0
- package/docs/getting-started/README.md +198 -0
- package/docs/getting-started/SETUP.md +25 -0
- package/docs/reference/AGENT_CONTEXT.md +84 -0
- package/docs/reference/DELIVERY_ONBOARDING.md +198 -0
- package/docs/reference/PROVIDER_RELEASE_TIERS.md +34 -0
- package/docs/reference/SECURITY.md +288 -0
- package/docs/reference/TELEMETRY_PRIVACY.md +259 -0
- package/install.sh +4041 -0
- package/integrations/bb-plugin-build/README.md +391 -0
- package/integrations/bb-plugin-build/app.css +431 -0
- package/integrations/bb-plugin-build/app.tsx +6210 -0
- package/integrations/bb-plugin-build/package.json +45 -0
- package/integrations/bb-plugin-build/server.ts +488 -0
- package/integrations/bb-plugin-build/src/adapter.ts +3672 -0
- package/integrations/bb-plugin-build/src/backlog-authoring-model.ts +150 -0
- package/integrations/bb-plugin-build/src/backlog-authoring-schema.ts +458 -0
- package/integrations/bb-plugin-build/src/backlog-authoring-service.ts +467 -0
- package/integrations/bb-plugin-build/src/backlog-authoring-view.ts +1025 -0
- package/integrations/bb-plugin-build/src/command-evidence-schema.ts +13 -0
- package/integrations/bb-plugin-build/src/competition-defaults-schema.ts +122 -0
- package/integrations/bb-plugin-build/src/competition-defaults-service.ts +105 -0
- package/integrations/bb-plugin-build/src/competition-defaults-view.ts +138 -0
- package/integrations/bb-plugin-build/src/contract.ts +718 -0
- package/integrations/bb-plugin-build/src/execution-activity-view.ts +98 -0
- package/integrations/bb-plugin-build/src/finalize-model.ts +205 -0
- package/integrations/bb-plugin-build/src/finalize-schema.ts +150 -0
- package/integrations/bb-plugin-build/src/finalize-service.ts +330 -0
- package/integrations/bb-plugin-build/src/finalize-view.ts +159 -0
- package/integrations/bb-plugin-build/src/judge-operations-readback.ts +303 -0
- package/integrations/bb-plugin-build/src/judge-operations-schema.ts +33 -0
- package/integrations/bb-plugin-build/src/judge-operations-view.ts +459 -0
- package/integrations/bb-plugin-build/src/model.ts +1318 -0
- package/integrations/bb-plugin-build/src/monitor-service.ts +233 -0
- package/integrations/bb-plugin-build/src/panel-read-ux.ts +97 -0
- package/integrations/bb-plugin-build/src/patch-preview-schema.ts +166 -0
- package/integrations/bb-plugin-build/src/patch-preview-service.ts +480 -0
- package/integrations/bb-plugin-build/src/patch-preview-view.ts +109 -0
- package/integrations/bb-plugin-build/src/planning-readback.ts +228 -0
- package/integrations/bb-plugin-build/src/planning-service.ts +647 -0
- package/integrations/bb-plugin-build/src/planning-sync-evidence.ts +37 -0
- package/integrations/bb-plugin-build/src/planning-workspace-readback.ts +33 -0
- package/integrations/bb-plugin-build/src/planning-workspace-schema.ts +131 -0
- package/integrations/bb-plugin-build/src/planning-workspace.ts +333 -0
- package/integrations/bb-plugin-build/src/poll-handoff.ts +136 -0
- package/integrations/bb-plugin-build/src/project-target-server.ts +21 -0
- package/integrations/bb-plugin-build/src/project-target.ts +45 -0
- package/integrations/bb-plugin-build/src/reference-index.ts +218 -0
- package/integrations/bb-plugin-build/src/repository-identity.ts +17 -0
- package/integrations/bb-plugin-build/src/repository-schema.ts +30 -0
- package/integrations/bb-plugin-build/src/result-explorer-view.ts +597 -0
- package/integrations/bb-plugin-build/src/result-readback-model.ts +163 -0
- package/integrations/bb-plugin-build/src/result-readback-schema.ts +319 -0
- package/integrations/bb-plugin-build/src/result-readback-service.ts +333 -0
- package/integrations/bb-plugin-build/src/run-page-view.ts +332 -0
- package/integrations/bb-plugin-build/src/setup-config-schema.ts +293 -0
- package/integrations/bb-plugin-build/src/setup-config-service.ts +620 -0
- package/integrations/bb-plugin-build/src/setup-config-view.ts +388 -0
- package/integrations/bb-plugin-build/src/sprint-close-model.ts +150 -0
- package/integrations/bb-plugin-build/src/sprint-close-schema.ts +128 -0
- package/integrations/bb-plugin-build/src/sprint-close-service.ts +293 -0
- package/integrations/bb-plugin-build/src/sprint-close-view.ts +116 -0
- package/integrations/bb-plugin-build/src/sprint-composition-model.ts +709 -0
- package/integrations/bb-plugin-build/src/sprint-composition-readback.ts +231 -0
- package/integrations/bb-plugin-build/src/sprint-composition-schema.ts +597 -0
- package/integrations/bb-plugin-build/src/sprint-composition-service.ts +773 -0
- package/integrations/bb-plugin-build/src/sprint-composition-view.ts +1221 -0
- package/integrations/bb-plugin-build/src/sprint-execution-schema.ts +188 -0
- package/integrations/bb-plugin-build/src/sprint-execution-service.ts +289 -0
- package/integrations/bb-plugin-build/src/sprint-execution-view.ts +54 -0
- package/integrations/bb-plugin-build/src/task-authoring-model.ts +563 -0
- package/integrations/bb-plugin-build/src/task-authoring-schema.ts +629 -0
- package/integrations/bb-plugin-build/src/task-authoring-service.ts +842 -0
- package/integrations/bb-plugin-build/src/task-authoring-view.ts +1227 -0
- package/integrations/bb-plugin-build/src/task-catalog-schema.ts +46 -0
- package/integrations/bb-plugin-build/src/task-catalog-service.ts +44 -0
- package/integrations/bb-plugin-build/src/task-detail-readback.ts +56 -0
- package/integrations/bb-plugin-build/src/task-detail-schema.ts +171 -0
- package/integrations/bb-plugin-build/src/task-navigation.ts +446 -0
- package/integrations/bb-plugin-build/src/workbench-route.ts +74 -0
- package/npm-shrinkwrap.json +3753 -0
- package/package.json +273 -4
- package/schemas/README.md +80 -0
- package/schemas/build.config.schema.json +2110 -0
- package/schemas/config-v1.schema.json +136 -0
- package/schemas/execution-config.schema.json +47 -0
- package/schemas/judge-scoring.schema.json +257 -0
- package/schemas/provider-config.schema.json +179 -0
- package/schemas/telemetry-config.schema.json +79 -0
- package/schemas/user-preferences.schema.json +141 -0
- package/scripts/assert-node-runtime.mjs +146 -0
- package/scripts/preflight-native.mjs +49 -0
- package/scripts/setup-git-hooks.mjs +39 -0
- package/scripts/sync.sh +2871 -0
- package/scripts/write-node-launcher.sh +138 -0
- package/src/resources/gemini/slash-packs/default/plan.toml +15 -0
- package/src/resources/gemini/slash-packs/default/summary.toml +16 -0
- package/src/resources/gemini/slash-packs/default/tests.toml +16 -0
- package/templates/.build-project/README.md +41 -0
- package/templates/.build-project/agents/README.md +50 -0
- package/templates/.build-project/agents/architect.md +10 -0
- package/templates/.build-project/agents/code-reviewer.md +10 -0
- package/templates/.build-project/agents/debugger.md +10 -0
- package/templates/.build-project/agents/documenter.md +10 -0
- package/templates/.build-project/agents/test-automator.md +10 -0
- package/templates/.build-project/config/build.config.jsonc +64 -0
- package/templates/.build-project/config/project-context.template.json +6 -0
- package/templates/.build-project/config/task-type-aliases.presets/kanban.yaml +14 -0
- package/templates/.build-project/config/task-type-aliases.presets/scrum.yaml +17 -0
- package/templates/.build-project/config/task-type-aliases.presets/xp.yaml +12 -0
- package/templates/.build-project/config/task-type-aliases.yaml +29 -0
- package/templates/.build-project/gitignore.template +70 -0
- package/templates/.build-project/task-types/analysis.yaml +38 -0
- package/templates/.build-project/task-types/architecture.yaml +35 -0
- package/templates/.build-project/task-types/doc.yaml +34 -0
- package/templates/.build-project/task-types/feature.yaml +22 -0
- package/templates/.build-project/task-types/general.yaml +4 -0
- package/templates/.build-project/task-types/security.yaml +38 -0
- package/templates/AGENTS.template.md +85 -0
- package/templates/CLAUDE.template.md +1 -0
- package/templates/GEMINI.template.md +1 -0
- package/templates/builtin-workflows/code-review.yaml +73 -0
- package/templates/builtin-workflows/skills/code-review/SKILL.md +61 -0
- package/templates/builtin-workflows/skills/execution-contract-analysis/SKILL.md +24 -0
- package/templates/builtin-workflows/skills/execution-contract-code/SKILL.md +19 -0
- package/templates/builtin-workflows/skills/execution-contract-structured/SKILL.md +17 -0
- package/templates/ci/incident-intake.mjs +787 -0
- package/templates/ci/incidents.yml.template +103 -0
- package/templates/ci/node.yml.template +17 -0
- package/templates/ci/python.yml.template +17 -0
- package/templates/guard-kit/GUARD_SETUP.md.template +258 -0
- package/templates/guard-kit/build-guard.yml.template +189 -0
- package/templates/guard-kit/check.mjs.template +932 -0
- package/templates/guard-kit/config.json.template +7 -0
- package/templates/guard-kit/policy.json.template +1 -0
- package/templates/profiles/README.md +57 -0
- package/templates/profiles/frontier-claude.json +23 -0
- package/templates/profiles/frontier-codex.json +23 -0
|
@@ -0,0 +1,1504 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildJudgeCompletenessTelemetryFromVariants,
|
|
3
|
+
loadConfiguredConcurrency,
|
|
4
|
+
mergeJudgeEvaluatedVariantSignals,
|
|
5
|
+
parseDeliverableContract,
|
|
6
|
+
parseProviderLimits,
|
|
7
|
+
persistJudgeResults,
|
|
8
|
+
persistNativeResearchTraces,
|
|
9
|
+
resolveJudgeRequestedLabel,
|
|
10
|
+
resolvePersistedJudgeRunState,
|
|
11
|
+
resolveWinnerVerifiedForDecision,
|
|
12
|
+
shouldStopBeforeJudgeOrSynthesis
|
|
13
|
+
} from "./chunk-RACDQC7S.js";
|
|
14
|
+
import {
|
|
15
|
+
parseNativeResearchProviders
|
|
16
|
+
} from "./chunk-OSK7QWPD.js";
|
|
17
|
+
import {
|
|
18
|
+
buildCompetitionDecisionTelemetry,
|
|
19
|
+
finalizeInterruptedEvaluationHandle,
|
|
20
|
+
inferCompetitionFinalOutcome,
|
|
21
|
+
isVerifiedVariantForGatePolicy,
|
|
22
|
+
persistCompeteBacklogProvenance,
|
|
23
|
+
resolveCompeteBacklogSuccessOutcome,
|
|
24
|
+
resolveCompetitionJudgeWinner,
|
|
25
|
+
resolveRunSummaryPrimaryJudge,
|
|
26
|
+
toHandleWinnerMetadata
|
|
27
|
+
} from "./chunk-Q7ADHWBE.js";
|
|
28
|
+
import "./chunk-3PL22IYZ.js";
|
|
29
|
+
import {
|
|
30
|
+
judgeForceModelOption
|
|
31
|
+
} from "./chunk-AY3MHEFM.js";
|
|
32
|
+
import {
|
|
33
|
+
startDetachedWorkerRegistryHeartbeat
|
|
34
|
+
} from "./chunk-P7RVCHQV.js";
|
|
35
|
+
import "./chunk-XPVNGHPF.js";
|
|
36
|
+
import "./chunk-3S2R4XJI.js";
|
|
37
|
+
import "./chunk-YYTOA6DP.js";
|
|
38
|
+
import "./chunk-H3S2VHTT.js";
|
|
39
|
+
import "./chunk-EO5UROKQ.js";
|
|
40
|
+
import {
|
|
41
|
+
attemptSynthesisWithGateValidation,
|
|
42
|
+
backfillMasterFinalVariantTelemetry,
|
|
43
|
+
buildWinnerVerification,
|
|
44
|
+
cleanupSynthesisInputPatches,
|
|
45
|
+
persistSynthesisDeliveryVariant,
|
|
46
|
+
resolveProviderConcurrencyOverrides,
|
|
47
|
+
resolveSynthesisInputPatchDir,
|
|
48
|
+
runBasicCompetition,
|
|
49
|
+
selectWinnerWithJudge,
|
|
50
|
+
shouldRunCompetitionSynthesis,
|
|
51
|
+
throwIfBasicCompetitionGloballyTimedOut
|
|
52
|
+
} from "./chunk-VKBDYZ4I.js";
|
|
53
|
+
import "./chunk-BDYUPPEZ.js";
|
|
54
|
+
import {
|
|
55
|
+
createEvaluationHandleFinalState,
|
|
56
|
+
finalizeEvaluationHandle,
|
|
57
|
+
isDurableHandleCompletion,
|
|
58
|
+
updateEvaluationHandleWithResult,
|
|
59
|
+
updateEvaluationHandleWithSynthesisResult
|
|
60
|
+
} from "./chunk-JQ5ENKLV.js";
|
|
61
|
+
import "./chunk-PNFTPNSR.js";
|
|
62
|
+
import "./chunk-DAS7J3JW.js";
|
|
63
|
+
import "./chunk-WEW7UFWE.js";
|
|
64
|
+
import "./chunk-LULOGMMM.js";
|
|
65
|
+
import "./chunk-QILAQACE.js";
|
|
66
|
+
import "./chunk-LS3G3OE4.js";
|
|
67
|
+
import "./chunk-BTKKMYOG.js";
|
|
68
|
+
import "./chunk-S6GZSVSF.js";
|
|
69
|
+
import "./chunk-77I6G4CO.js";
|
|
70
|
+
import "./chunk-NEQUQHOX.js";
|
|
71
|
+
import "./chunk-DJG5RIOR.js";
|
|
72
|
+
import "./chunk-ZWJVJRAJ.js";
|
|
73
|
+
import "./chunk-A5A5QAUX.js";
|
|
74
|
+
import "./chunk-JQUMSIGC.js";
|
|
75
|
+
import "./chunk-ZL6E4HMY.js";
|
|
76
|
+
import "./chunk-2OUAEH67.js";
|
|
77
|
+
import "./chunk-H4HXVWEC.js";
|
|
78
|
+
import "./chunk-WPKLYOAM.js";
|
|
79
|
+
import "./chunk-BZRLSZNV.js";
|
|
80
|
+
import "./chunk-GM74HUBM.js";
|
|
81
|
+
import "./chunk-2L36U25O.js";
|
|
82
|
+
import "./chunk-CA6GSDIV.js";
|
|
83
|
+
import "./chunk-BQ3VAGXH.js";
|
|
84
|
+
import "./chunk-GT6HFKJB.js";
|
|
85
|
+
import "./chunk-3HW3BM6X.js";
|
|
86
|
+
import "./chunk-VLMDM56Q.js";
|
|
87
|
+
import "./chunk-7HP2GFH2.js";
|
|
88
|
+
import "./chunk-VKKRXOFE.js";
|
|
89
|
+
import "./chunk-BF4WFISU.js";
|
|
90
|
+
import "./chunk-ZUQOHGNF.js";
|
|
91
|
+
import "./chunk-V3WDLXPF.js";
|
|
92
|
+
import {
|
|
93
|
+
buildTerminalCompetitionDeliveryRecord,
|
|
94
|
+
finalizeVariantVerification,
|
|
95
|
+
resolveRequiredGatePolicyForPhase
|
|
96
|
+
} from "./chunk-B7KDXQGO.js";
|
|
97
|
+
import "./chunk-W6XSZKRH.js";
|
|
98
|
+
import "./chunk-L2PIVBOV.js";
|
|
99
|
+
import "./chunk-5YDE3Q62.js";
|
|
100
|
+
import "./chunk-3NGHELNE.js";
|
|
101
|
+
import "./chunk-7TUTZTI2.js";
|
|
102
|
+
import "./chunk-ONWEOPI3.js";
|
|
103
|
+
import "./chunk-HHWDTB6S.js";
|
|
104
|
+
import "./chunk-VKRGWY72.js";
|
|
105
|
+
import "./chunk-5XTL67ZG.js";
|
|
106
|
+
import "./chunk-XMFW7H67.js";
|
|
107
|
+
import "./chunk-GOSY2TKK.js";
|
|
108
|
+
import "./chunk-IYY3HQAD.js";
|
|
109
|
+
import "./chunk-HZYKRLN3.js";
|
|
110
|
+
import "./chunk-PVJBTI7P.js";
|
|
111
|
+
import "./chunk-ZZ44KOJE.js";
|
|
112
|
+
import "./chunk-UKMPASIC.js";
|
|
113
|
+
import "./chunk-5PRWELNO.js";
|
|
114
|
+
import "./chunk-LPQ7NZEN.js";
|
|
115
|
+
import "./chunk-TGCVL74Y.js";
|
|
116
|
+
import "./chunk-QXBKIHY7.js";
|
|
117
|
+
import "./chunk-Q3DHEZA5.js";
|
|
118
|
+
import "./chunk-76A74QWN.js";
|
|
119
|
+
import "./chunk-4EJKQIW2.js";
|
|
120
|
+
import "./chunk-L32WD57F.js";
|
|
121
|
+
import "./chunk-6DBMALXL.js";
|
|
122
|
+
import "./chunk-MKASIKWZ.js";
|
|
123
|
+
import "./chunk-UDNNAQN5.js";
|
|
124
|
+
import "./chunk-T7AV45DV.js";
|
|
125
|
+
import "./chunk-HKO45NLZ.js";
|
|
126
|
+
import "./chunk-ABMN3UEO.js";
|
|
127
|
+
import "./chunk-3IP5I32P.js";
|
|
128
|
+
import "./chunk-5HCN4JO5.js";
|
|
129
|
+
import "./chunk-WGTFA6SF.js";
|
|
130
|
+
import "./chunk-LDJCKAJP.js";
|
|
131
|
+
import {
|
|
132
|
+
ProcessRegistry
|
|
133
|
+
} from "./chunk-QP5ST7RI.js";
|
|
134
|
+
import "./chunk-FY6Y4Z2F.js";
|
|
135
|
+
import "./chunk-HS3SY6HN.js";
|
|
136
|
+
import "./chunk-ENYRCL43.js";
|
|
137
|
+
import "./chunk-FDI23B6R.js";
|
|
138
|
+
import "./chunk-Z7CDQNH3.js";
|
|
139
|
+
import "./chunk-PRDHI2L5.js";
|
|
140
|
+
import "./chunk-T5KLCNR7.js";
|
|
141
|
+
import "./chunk-JVHGMURQ.js";
|
|
142
|
+
import "./chunk-NY7VYMMY.js";
|
|
143
|
+
import "./chunk-T42WJJZC.js";
|
|
144
|
+
import "./chunk-B7PYTV72.js";
|
|
145
|
+
import "./chunk-4QKP6I4C.js";
|
|
146
|
+
import "./chunk-GWHGTG37.js";
|
|
147
|
+
import "./chunk-P3UARDCT.js";
|
|
148
|
+
import "./chunk-GQXLXRFA.js";
|
|
149
|
+
import "./chunk-3UBZI5DW.js";
|
|
150
|
+
import "./chunk-BDPYFAB4.js";
|
|
151
|
+
import "./chunk-RNI2GUIF.js";
|
|
152
|
+
import "./chunk-CE5OZBYY.js";
|
|
153
|
+
import "./chunk-3WY5TU2O.js";
|
|
154
|
+
import "./chunk-ATLM7JIT.js";
|
|
155
|
+
import "./chunk-XON4ZCYX.js";
|
|
156
|
+
import "./chunk-PPHXX4W7.js";
|
|
157
|
+
import "./chunk-5AW4RMNG.js";
|
|
158
|
+
import {
|
|
159
|
+
ExitCodeError
|
|
160
|
+
} from "./chunk-Y4ZDDHB6.js";
|
|
161
|
+
import "./chunk-WKFOJ5ZG.js";
|
|
162
|
+
import "./chunk-PTDYGMC7.js";
|
|
163
|
+
import "./chunk-SVNCLR45.js";
|
|
164
|
+
import "./chunk-5F43TUIN.js";
|
|
165
|
+
import "./chunk-RI4EX2QE.js";
|
|
166
|
+
import "./chunk-ETA2K4KI.js";
|
|
167
|
+
import "./chunk-CRPRVNQ4.js";
|
|
168
|
+
import "./chunk-KQ4NGOJI.js";
|
|
169
|
+
import "./chunk-TMBDRHAX.js";
|
|
170
|
+
import "./chunk-RVMOOPSL.js";
|
|
171
|
+
import "./chunk-4UMRUFBD.js";
|
|
172
|
+
import "./chunk-3M57DADF.js";
|
|
173
|
+
import "./chunk-RGXSKAPL.js";
|
|
174
|
+
import "./chunk-T7UY44GG.js";
|
|
175
|
+
import "./chunk-GD5U6MD4.js";
|
|
176
|
+
import "./chunk-7RMARDVH.js";
|
|
177
|
+
import "./chunk-APKT7ARR.js";
|
|
178
|
+
import "./chunk-ZMLOC3DW.js";
|
|
179
|
+
import "./chunk-FIEUSGNJ.js";
|
|
180
|
+
import "./chunk-WEIUS5NT.js";
|
|
181
|
+
import "./chunk-KQYQOXMS.js";
|
|
182
|
+
import "./chunk-S47ISY27.js";
|
|
183
|
+
import "./chunk-JMJYHBIQ.js";
|
|
184
|
+
import "./chunk-YKMXFVK7.js";
|
|
185
|
+
import "./chunk-O6ZQUVTR.js";
|
|
186
|
+
import "./chunk-RCYEJSD5.js";
|
|
187
|
+
import "./chunk-FAWJTC34.js";
|
|
188
|
+
import "./chunk-UBVRHGAZ.js";
|
|
189
|
+
import "./chunk-5HDP7XZG.js";
|
|
190
|
+
import "./chunk-H3ISZJMJ.js";
|
|
191
|
+
import "./chunk-ATKEKM3E.js";
|
|
192
|
+
import "./chunk-S6I4KISU.js";
|
|
193
|
+
import "./chunk-DYET2NYJ.js";
|
|
194
|
+
import "./chunk-MYLH2S4G.js";
|
|
195
|
+
import "./chunk-3P5IN5E7.js";
|
|
196
|
+
import "./chunk-CBZHP756.js";
|
|
197
|
+
import "./chunk-WEI3ZDZH.js";
|
|
198
|
+
import "./chunk-H6MJGKAW.js";
|
|
199
|
+
import "./chunk-67YRJPJO.js";
|
|
200
|
+
import "./chunk-SZAJAHLF.js";
|
|
201
|
+
import "./chunk-SF6YK3JI.js";
|
|
202
|
+
import "./chunk-JBBB2Y47.js";
|
|
203
|
+
import "./chunk-WJAL4JL3.js";
|
|
204
|
+
import "./chunk-RBKLOUXA.js";
|
|
205
|
+
import "./chunk-4EBSXZ73.js";
|
|
206
|
+
import "./chunk-CSOPSYDY.js";
|
|
207
|
+
import "./chunk-VMFZEVVX.js";
|
|
208
|
+
import "./chunk-U5KS22IN.js";
|
|
209
|
+
import "./chunk-DD4FGKKB.js";
|
|
210
|
+
import "./chunk-M43JKX7J.js";
|
|
211
|
+
import "./chunk-SDPIFNLD.js";
|
|
212
|
+
import "./chunk-GO6DRECI.js";
|
|
213
|
+
import "./chunk-5WV5L5XS.js";
|
|
214
|
+
import "./chunk-QWMQ74KD.js";
|
|
215
|
+
import "./chunk-GAFJEYLK.js";
|
|
216
|
+
import "./chunk-YKC75XK4.js";
|
|
217
|
+
import "./chunk-T7E5JS6N.js";
|
|
218
|
+
import "./chunk-ZJB6SQPA.js";
|
|
219
|
+
import "./chunk-QTBZFXYZ.js";
|
|
220
|
+
import {
|
|
221
|
+
signalCoordinator
|
|
222
|
+
} from "./chunk-GC4CRMTS.js";
|
|
223
|
+
import "./chunk-P7CQGPLS.js";
|
|
224
|
+
import "./chunk-E2BWHHGS.js";
|
|
225
|
+
import "./chunk-IVZEONFC.js";
|
|
226
|
+
import "./chunk-M2D3JXGN.js";
|
|
227
|
+
import "./chunk-MEMSY6VY.js";
|
|
228
|
+
import "./chunk-VBNCKCCI.js";
|
|
229
|
+
import "./chunk-33IGPPUI.js";
|
|
230
|
+
import "./chunk-UPHU64NB.js";
|
|
231
|
+
import "./chunk-JLS65NUQ.js";
|
|
232
|
+
import "./chunk-FRBPKBFE.js";
|
|
233
|
+
import "./chunk-BAWJNMWF.js";
|
|
234
|
+
import "./chunk-LX4F24ZH.js";
|
|
235
|
+
import "./chunk-BBPIILO2.js";
|
|
236
|
+
import "./chunk-2NMNFUQA.js";
|
|
237
|
+
import "./chunk-DP3RIHLU.js";
|
|
238
|
+
import {
|
|
239
|
+
formatVariantIdentifier
|
|
240
|
+
} from "./chunk-DFDPRCSF.js";
|
|
241
|
+
import "./chunk-D2M2Y5ID.js";
|
|
242
|
+
import "./chunk-UJP3XM54.js";
|
|
243
|
+
import "./chunk-MULMXX4V.js";
|
|
244
|
+
import "./chunk-UTDEOPKV.js";
|
|
245
|
+
import {
|
|
246
|
+
atomicWriteJson
|
|
247
|
+
} from "./chunk-RFDVSI4N.js";
|
|
248
|
+
import "./chunk-M4BUEXXF.js";
|
|
249
|
+
import "./chunk-ZH4G3FU5.js";
|
|
250
|
+
import "./chunk-726G6WDL.js";
|
|
251
|
+
import "./chunk-2C2AZO23.js";
|
|
252
|
+
import "./chunk-5UBIFVRD.js";
|
|
253
|
+
import "./chunk-3AMLRT2B.js";
|
|
254
|
+
import "./chunk-CE4O646H.js";
|
|
255
|
+
import "./chunk-YVCMDVBB.js";
|
|
256
|
+
import "./chunk-7HPCIOMA.js";
|
|
257
|
+
import {
|
|
258
|
+
parseJsonWithContext
|
|
259
|
+
} from "./chunk-P6SSWAKY.js";
|
|
260
|
+
import "./chunk-ETAD4NKD.js";
|
|
261
|
+
import "./chunk-NZ4AOB7R.js";
|
|
262
|
+
import "./chunk-7YAOUUKK.js";
|
|
263
|
+
import "./chunk-XYL6WTBK.js";
|
|
264
|
+
import "./chunk-O5X6BKAO.js";
|
|
265
|
+
import "./chunk-R2CKS6WT.js";
|
|
266
|
+
import {
|
|
267
|
+
deriveVariantOutcome
|
|
268
|
+
} from "./chunk-YYQJK6RH.js";
|
|
269
|
+
import "./chunk-EPRMH6HO.js";
|
|
270
|
+
import "./chunk-XHOI4V62.js";
|
|
271
|
+
import {
|
|
272
|
+
assertSafePathComponent
|
|
273
|
+
} from "./chunk-S2VQCZO4.js";
|
|
274
|
+
import "./chunk-6TBEX4R4.js";
|
|
275
|
+
import "./chunk-PXKERBKX.js";
|
|
276
|
+
import "./chunk-QYQOVOLR.js";
|
|
277
|
+
import "./chunk-QFLBRWCJ.js";
|
|
278
|
+
import "./chunk-SFY5MOZC.js";
|
|
279
|
+
import "./chunk-SVUNZOPG.js";
|
|
280
|
+
import "./chunk-SGSZXSWM.js";
|
|
281
|
+
import "./chunk-R2TIYG7U.js";
|
|
282
|
+
import "./chunk-5FKHIKTS.js";
|
|
283
|
+
import "./chunk-LR3SKBM4.js";
|
|
284
|
+
import "./chunk-XJ2E7YEJ.js";
|
|
285
|
+
import "./chunk-O4XNVUL6.js";
|
|
286
|
+
import "./chunk-4U6XK2DG.js";
|
|
287
|
+
import "./chunk-BY6ODHNZ.js";
|
|
288
|
+
import "./chunk-3H4MWYIC.js";
|
|
289
|
+
import "./chunk-DP7FKP6W.js";
|
|
290
|
+
import "./chunk-VIFHYTI5.js";
|
|
291
|
+
import "./chunk-XGU6PBO5.js";
|
|
292
|
+
import "./chunk-F55YABKV.js";
|
|
293
|
+
import "./chunk-YO5BAJ55.js";
|
|
294
|
+
import "./chunk-CTAFIG47.js";
|
|
295
|
+
import "./chunk-D6WTZMZB.js";
|
|
296
|
+
import "./chunk-5EQN56OZ.js";
|
|
297
|
+
import "./chunk-RBBTBCHX.js";
|
|
298
|
+
import "./chunk-4DJL2VXA.js";
|
|
299
|
+
import "./chunk-62NR3IQM.js";
|
|
300
|
+
import "./chunk-TUQMMFEQ.js";
|
|
301
|
+
import "./chunk-EPAMVGI3.js";
|
|
302
|
+
import "./chunk-6CB3KJRY.js";
|
|
303
|
+
import "./chunk-L2S235CU.js";
|
|
304
|
+
import "./chunk-D4VJFCGZ.js";
|
|
305
|
+
import "./chunk-RPIMAMV7.js";
|
|
306
|
+
import "./chunk-ALDTFNZ3.js";
|
|
307
|
+
import "./chunk-QOIASNEJ.js";
|
|
308
|
+
import "./chunk-2VUEDIUM.js";
|
|
309
|
+
import "./chunk-MJ6WNSIX.js";
|
|
310
|
+
import "./chunk-5KQETTNS.js";
|
|
311
|
+
import "./chunk-J2ICMYDA.js";
|
|
312
|
+
import "./chunk-2VLJUXJU.js";
|
|
313
|
+
import "./chunk-PPZESPJT.js";
|
|
314
|
+
import "./chunk-XCOIBNET.js";
|
|
315
|
+
import "./chunk-Y733RB7T.js";
|
|
316
|
+
import "./chunk-H3HGMISG.js";
|
|
317
|
+
import "./chunk-FAZBRHGG.js";
|
|
318
|
+
import "./chunk-CJBSZX3F.js";
|
|
319
|
+
import {
|
|
320
|
+
LabPathResolver
|
|
321
|
+
} from "./chunk-C3KCMAJP.js";
|
|
322
|
+
import "./chunk-FKCG7K6H.js";
|
|
323
|
+
import {
|
|
324
|
+
resolveRunStateDir
|
|
325
|
+
} from "./chunk-AJN5Y5YZ.js";
|
|
326
|
+
import "./chunk-MHLEZQQI.js";
|
|
327
|
+
import "./chunk-HEP3ILP4.js";
|
|
328
|
+
import "./chunk-BQJOGAWT.js";
|
|
329
|
+
import "./chunk-WV3KQDPE.js";
|
|
330
|
+
import "./chunk-VSWC5ZXI.js";
|
|
331
|
+
import "./chunk-XV7NZL4B.js";
|
|
332
|
+
import "./chunk-KKQKWAMF.js";
|
|
333
|
+
import "./chunk-RWQQIKIC.js";
|
|
334
|
+
import "./chunk-GVJGSSKM.js";
|
|
335
|
+
import "./chunk-QJ6OEH4K.js";
|
|
336
|
+
import "./chunk-BD3PGW6A.js";
|
|
337
|
+
import "./chunk-43OKHTW4.js";
|
|
338
|
+
import "./chunk-MNOVBYFU.js";
|
|
339
|
+
import "./chunk-QXBKTJT6.js";
|
|
340
|
+
import "./chunk-4BTDUT2S.js";
|
|
341
|
+
import "./chunk-35J4NE6S.js";
|
|
342
|
+
import "./chunk-RIMARPCF.js";
|
|
343
|
+
import "./chunk-HGFXODKO.js";
|
|
344
|
+
import "./chunk-N5DX4JAK.js";
|
|
345
|
+
import "./chunk-V2TVPO3X.js";
|
|
346
|
+
import "./chunk-RRC5BL7B.js";
|
|
347
|
+
import "./chunk-352PCJLK.js";
|
|
348
|
+
import "./chunk-RCP2Y6DQ.js";
|
|
349
|
+
import "./chunk-M6UHOC4I.js";
|
|
350
|
+
import "./chunk-LRGH3CCV.js";
|
|
351
|
+
import "./chunk-BV3XQQLU.js";
|
|
352
|
+
import "./chunk-PSTKWHHN.js";
|
|
353
|
+
import "./chunk-KTMW65UX.js";
|
|
354
|
+
import "./chunk-3JKNRYEE.js";
|
|
355
|
+
import "./chunk-MT2WAIR3.js";
|
|
356
|
+
import "./chunk-WGQAXLNA.js";
|
|
357
|
+
import "./chunk-ONHAMBN6.js";
|
|
358
|
+
import "./chunk-XSJTIFUY.js";
|
|
359
|
+
import "./chunk-XWIZ6B5S.js";
|
|
360
|
+
import "./chunk-U4DRS6ZW.js";
|
|
361
|
+
import "./chunk-I56TH7VM.js";
|
|
362
|
+
import "./chunk-Z5WGNULV.js";
|
|
363
|
+
import "./chunk-O26L6F7F.js";
|
|
364
|
+
import "./chunk-RJ6RSNT6.js";
|
|
365
|
+
import {
|
|
366
|
+
assertBuildRuntimeReady
|
|
367
|
+
} from "./chunk-ZR3DRTPS.js";
|
|
368
|
+
import "./chunk-TAJPCXSB.js";
|
|
369
|
+
import "./chunk-56WPYDJH.js";
|
|
370
|
+
import "./chunk-RSYTSBOO.js";
|
|
371
|
+
import "./chunk-STW7OFOA.js";
|
|
372
|
+
import {
|
|
373
|
+
resolveBuildRoot
|
|
374
|
+
} from "./chunk-CHA2HDE5.js";
|
|
375
|
+
import "./chunk-JNMWYMC6.js";
|
|
376
|
+
import {
|
|
377
|
+
BUILD_RESEARCH_NATIVE_PROVIDERS,
|
|
378
|
+
createExecutionContext,
|
|
379
|
+
debugLog,
|
|
380
|
+
getExecutionContext,
|
|
381
|
+
readEnv,
|
|
382
|
+
resolveBuildDirFromContext,
|
|
383
|
+
resolveCliRepoRoot,
|
|
384
|
+
setExecutionContext
|
|
385
|
+
} from "./chunk-7VRJHTGZ.js";
|
|
386
|
+
import "./chunk-XDM65LBX.js";
|
|
387
|
+
import {
|
|
388
|
+
sanitizeString
|
|
389
|
+
} from "./chunk-CPSVQR2I.js";
|
|
390
|
+
import "./chunk-PZ5AY32C.js";
|
|
391
|
+
|
|
392
|
+
// src/cli/worker.ts
|
|
393
|
+
import { mkdir, readFile, unlink } from "fs/promises";
|
|
394
|
+
import path from "path";
|
|
395
|
+
import { pathToFileURL } from "url";
|
|
396
|
+
import { Command } from "commander";
|
|
397
|
+
|
|
398
|
+
// src/cli/handlers/compete/background-finalization.ts
|
|
399
|
+
function readBackgroundRunMetadata(value) {
|
|
400
|
+
if (value === void 0) return void 0;
|
|
401
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
402
|
+
throw new Error("Worker run metadata must be an object");
|
|
403
|
+
}
|
|
404
|
+
const metadata = value;
|
|
405
|
+
if (metadata.runSemantics !== void 0 && !["competition", "fusion", "analysis"].includes(metadata.runSemantics)) {
|
|
406
|
+
throw new Error("Worker run metadata has invalid run semantics");
|
|
407
|
+
}
|
|
408
|
+
const replay = metadata.replay;
|
|
409
|
+
if (replay !== void 0 && (!replay || typeof replay !== "object" || Array.isArray(replay) || [replay.command, replay.taskLabel, replay.executionIntent].some(
|
|
410
|
+
(item) => item !== void 0 && typeof item !== "string"
|
|
411
|
+
) || replay.argv !== void 0 && (!Array.isArray(replay.argv) || replay.argv.some((item) => typeof item !== "string")))) {
|
|
412
|
+
throw new Error("Worker run metadata has invalid replay data");
|
|
413
|
+
}
|
|
414
|
+
return { runSemantics: metadata.runSemantics, replay };
|
|
415
|
+
}
|
|
416
|
+
function finalizeWorkerWinner(taskId, result, options2 = {}) {
|
|
417
|
+
const winnerMetadata = toHandleWinnerMetadata(result.winner);
|
|
418
|
+
const inferredOutcome = inferCompetitionFinalOutcome(result);
|
|
419
|
+
const requiredGatePolicy = options2.requiredGatePolicy ?? "all";
|
|
420
|
+
const executionIntent = options2.runMetadata?.replay?.executionIntent ?? result.winner?.executionIntent ?? (result.winner?.testsExecuted?.skipReason === "analysis-intent" ? "analysis" : void 0);
|
|
421
|
+
const decisionTelemetry = buildCompetitionDecisionTelemetry({
|
|
422
|
+
winner: result.winner,
|
|
423
|
+
winnerVerified: resolveWinnerVerifiedForDecision({
|
|
424
|
+
winner: result.winner,
|
|
425
|
+
verifiedVariants: result.variants.filter(
|
|
426
|
+
(variant) => isVerifiedVariantForGatePolicy(variant, requiredGatePolicy)
|
|
427
|
+
),
|
|
428
|
+
verificationApplicable: executionIntent !== "analysis",
|
|
429
|
+
requiredGatePolicy
|
|
430
|
+
}),
|
|
431
|
+
latestDecision: options2.latestDecision ?? (options2.judgeError ? {
|
|
432
|
+
winnerDeclared: false,
|
|
433
|
+
reason: options2.judgeError,
|
|
434
|
+
decisionOutcome: "unavailable",
|
|
435
|
+
judgeFailures: [
|
|
436
|
+
{ judgeType: options2.aiJudgePrimary ?? "ai", reason: options2.judgeError }
|
|
437
|
+
]
|
|
438
|
+
} : void 0),
|
|
439
|
+
primaryJudge: resolveRunSummaryPrimaryJudge(options2.aiJudgePrimary, result.winner)
|
|
440
|
+
});
|
|
441
|
+
const judgeState = resolvePersistedJudgeRunState({
|
|
442
|
+
isFusionRun: false,
|
|
443
|
+
judgeOff: options2.judgeOff === true,
|
|
444
|
+
aiJudgeRequested: options2.aiJudgeRequested === true,
|
|
445
|
+
decisionOutcome: decisionTelemetry.decision.outcome,
|
|
446
|
+
decisionReason: options2.judgeError ?? decisionTelemetry.decision.reason,
|
|
447
|
+
winnerSelectionSource: result.winner?.winnerSelectionSource,
|
|
448
|
+
winnerSelectionReason: result.winner?.winnerSelectionReason
|
|
449
|
+
});
|
|
450
|
+
const common = {
|
|
451
|
+
...!options2.judgeOff ? decisionTelemetry : {},
|
|
452
|
+
runMetadata: {
|
|
453
|
+
...options2.runMetadata,
|
|
454
|
+
runSemantics: options2.runMetadata?.runSemantics ?? "competition",
|
|
455
|
+
judge: {
|
|
456
|
+
requested: resolveJudgeRequestedLabel({
|
|
457
|
+
effectiveJudge: options2.judgeOff ? "off" : void 0,
|
|
458
|
+
aiJudgeRequested: options2.aiJudgeRequested === true,
|
|
459
|
+
aiJudgePrimary: options2.aiJudgePrimary
|
|
460
|
+
}),
|
|
461
|
+
...judgeState
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
winnerVerification: result.winnerVerification,
|
|
465
|
+
completenessTelemetry: buildJudgeCompletenessTelemetryFromVariants(result.variants),
|
|
466
|
+
// Which artifact this run selected for delivery. Without it a later
|
|
467
|
+
// `compete apply` resolves the judge winner and silently omits a validated
|
|
468
|
+
// synthesis artifact the run selected.
|
|
469
|
+
delivery: buildTerminalCompetitionDeliveryRecord({
|
|
470
|
+
winner: result.winner,
|
|
471
|
+
synthesisDeliveryVariant: result.synthesisDeliveryVariant
|
|
472
|
+
})
|
|
473
|
+
};
|
|
474
|
+
const finalState = options2.judgeOff ? createEvaluationHandleFinalState({
|
|
475
|
+
...common,
|
|
476
|
+
outcome: "no_winner",
|
|
477
|
+
winner: null,
|
|
478
|
+
decision: {
|
|
479
|
+
outcome: "none",
|
|
480
|
+
reason: "judge_off",
|
|
481
|
+
decisionStatus: "not_run",
|
|
482
|
+
decisionOutcome: "no_judge",
|
|
483
|
+
primaryJudge: "n/a"
|
|
484
|
+
}
|
|
485
|
+
}) : inferredOutcome === "winner_selected" && winnerMetadata ? createEvaluationHandleFinalState({
|
|
486
|
+
...common,
|
|
487
|
+
outcome: "winner_selected",
|
|
488
|
+
winner: winnerMetadata
|
|
489
|
+
}) : inferredOutcome === "timed_out" ? createEvaluationHandleFinalState({
|
|
490
|
+
...common,
|
|
491
|
+
outcome: "timed_out",
|
|
492
|
+
winner: null,
|
|
493
|
+
errorMessage: "Competition ended with timed_out"
|
|
494
|
+
}) : createEvaluationHandleFinalState({
|
|
495
|
+
...common,
|
|
496
|
+
outcome: inferredOutcome === "all_failed" ? "all_failed" : "no_winner",
|
|
497
|
+
winner: null
|
|
498
|
+
});
|
|
499
|
+
const finalizeResult = finalizeEvaluationHandle(taskId, finalState);
|
|
500
|
+
if (finalizeResult.kind === "persistence_failed") {
|
|
501
|
+
console.warn(
|
|
502
|
+
`[Worker ${process.pid}] Failed to finalize authoritative winner: ${finalizeResult.error}`
|
|
503
|
+
);
|
|
504
|
+
} else if (finalizeResult.kind === "absent") {
|
|
505
|
+
if (options2.requireHandle) {
|
|
506
|
+
console.warn(
|
|
507
|
+
`[Worker ${process.pid}] Required evaluation handle absent during authoritative finalize`
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
} else if (finalizeResult.kind === "not_terminal") {
|
|
511
|
+
console.warn(
|
|
512
|
+
`[Worker ${process.pid}] Evaluation handle still running (active candidates); authoritative finalize deferred`
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
return finalizeResult;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// src/cli/handlers/compete/background-judge-winner.ts
|
|
519
|
+
function resolveBackgroundJudgeWinner(input) {
|
|
520
|
+
mergeJudgeEvaluatedVariantSignals(input.variants, input.evaluatedVariants);
|
|
521
|
+
if (!input.judgedWinner) return null;
|
|
522
|
+
return resolveCompetitionJudgeWinner(
|
|
523
|
+
input.variants,
|
|
524
|
+
input.judgedWinner,
|
|
525
|
+
resolveRequiredGatePolicyForPhase(input.prompt, "post-judge")
|
|
526
|
+
).winner;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// src/cli/worker.ts
|
|
530
|
+
function shouldPromoteBackgroundSynthesisDelivery(input) {
|
|
531
|
+
if (!input.synthesisVariant) return false;
|
|
532
|
+
if (input.synthesisApplied !== true) return false;
|
|
533
|
+
if (input.gatesPassed !== true) return false;
|
|
534
|
+
const strategy = input.strategy ?? "agentic-synthesis";
|
|
535
|
+
return strategy === "agentic-synthesis" || input.complementaryPatchApplied === true;
|
|
536
|
+
}
|
|
537
|
+
async function persistBackgroundSynthesisDeliveryVariant(options2) {
|
|
538
|
+
return persistSynthesisDeliveryVariant({
|
|
539
|
+
...options2,
|
|
540
|
+
backfillTelemetry: (variant) => backfillMasterFinalVariantTelemetry(options2.taskId, variant, {
|
|
541
|
+
buildDir: options2.buildDir
|
|
542
|
+
})
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
var program = new Command();
|
|
546
|
+
var WORKER_REGISTRY_HEARTBEAT_MS = 6e4;
|
|
547
|
+
var BACKGROUND_WORKER_FINAL_CLEANUP_TIMEOUT_MS = 15e3;
|
|
548
|
+
program.requiredOption("--task-id <id>", "Task ID").option("--backlog-item <id>", "Backlog item ID associated with this background compete run").option(
|
|
549
|
+
"--config-file <path>",
|
|
550
|
+
"Path to config JSON file containing {prompt, variants} (preferred)"
|
|
551
|
+
).option("--prompt <prompt>", "Task prompt (legacy; requires --variants too)").option("--variants <variants>", "Variants JSON (legacy; requires --prompt too)").option("--timeout <ms>", "Timeout in milliseconds").option("--executor-timeout-minutes <minutes>", "Per-variant executor timeout in minutes").option(
|
|
552
|
+
"--max-concurrent <n>",
|
|
553
|
+
"Maximum concurrent variant executions (threaded from the foreground compete flag)",
|
|
554
|
+
(value) => Number.parseInt(value, 10)
|
|
555
|
+
).option(
|
|
556
|
+
"--provider-limit <limit>",
|
|
557
|
+
"Per-provider concurrency limit provider=N (repeatable; threaded from the foreground compete flag)",
|
|
558
|
+
(value, previous) => [...previous, value],
|
|
559
|
+
[]
|
|
560
|
+
).option("--verbose", "Verbose output").option("--ai-judge", "Use AI judge").option("--judge-off", "Disable automatic winner selection for multi-variant comparison").option("--ai-judge-model <model>", "AI judge model").option("--ai-judge-verbose", "AI judge verbose output").option("--ai-judge-show-rationale", "Show AI judge rationale").option("--ai-judge-verbosity <level>", "AI judge verbosity level").option("--ai-judge-min-score <score>", "AI judge minimum score", parseFloat).option(
|
|
561
|
+
"--ai-judge-confidence-threshold <threshold>",
|
|
562
|
+
"AI judge confidence threshold",
|
|
563
|
+
parseFloat
|
|
564
|
+
).option("--ai-judge-streaming", "Enable AI judge streaming").option("--ai-judge-telemetry", "Enable AI judge telemetry").option("--judge-run [judges]", "Run one or more judges: ai,multi-lens (no value = ai only)").option("--judge-primary <judge>", "Primary judge for winner selection when multiple judges run").option(
|
|
565
|
+
"--judge-models <models>",
|
|
566
|
+
"Judge model plan: a registered judge-capable provider. Deprecated aliases: claude, codex."
|
|
567
|
+
).option(
|
|
568
|
+
"--judge-model <role=provider:model>",
|
|
569
|
+
"Scoped judge model override: ai, multi-lens, parent, or worker",
|
|
570
|
+
(value, previous = []) => [...previous, value],
|
|
571
|
+
[]
|
|
572
|
+
).addOption(judgeForceModelOption(program)).option("--judge-strict", "Strict judge mode: one judge attempt without retries or reruns").option(
|
|
573
|
+
"--synthesize",
|
|
574
|
+
"Enable synthesis when multiple edit/code variants produce a winner; use --no-synthesize to disable"
|
|
575
|
+
).option("--no-synthesize", "Disable synthesis of top-N variants").option("--synthesis-top-n <n>", "Number of top variants to synthesize", parseInt).option(
|
|
576
|
+
"--synthesis-strategy <strategy>",
|
|
577
|
+
"Synthesis strategy (agentic-synthesis default or cherry-pick experimental deterministic mode)"
|
|
578
|
+
).option("--synthesis-model <model>", "Model for synthesis generation").option("--create-pr", "Create PR for winning variant").option("--verification-mode <mode>", "Verification mode (auto|touched|full|off)").option("--anonymize-judge", "Anonymize judge evaluation").option("--no-anonymize-judge", "Disable anonymous judge labels").option("--preserve-worktrees", "Preserve worktrees after execution").option("--no-preserve-worktrees", "Remove worktrees after execution, even for one variant").option(
|
|
579
|
+
"--judge-profile <profile>",
|
|
580
|
+
"Judge profile (best-as-delivered|acceptance-ready|best-foundation; alias: merge-ready\u2192acceptance-ready)"
|
|
581
|
+
).option("--cost-metrics", "Show cost metrics");
|
|
582
|
+
function resolveWorkerAnonymizeJudge(workerOptions) {
|
|
583
|
+
if (workerOptions.anonymizeJudge === false || workerOptions.noAnonymizeJudge === true) {
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
if (workerOptions.anonymizeJudge === true) {
|
|
587
|
+
return true;
|
|
588
|
+
}
|
|
589
|
+
return void 0;
|
|
590
|
+
}
|
|
591
|
+
var options;
|
|
592
|
+
function sanitizeBackgroundDiagnosticEntries(entries) {
|
|
593
|
+
return entries?.map((entry) => sanitizeString(entry));
|
|
594
|
+
}
|
|
595
|
+
function buildBackgroundWorkerVariantHealthState(variant) {
|
|
596
|
+
const diagnostics = variant.providerDiagnostics;
|
|
597
|
+
return {
|
|
598
|
+
providerDiagnostics: diagnostics ? {
|
|
599
|
+
finalAnswerPresent: diagnostics.finalAnswerPresent,
|
|
600
|
+
terminalResultPresent: diagnostics.terminalResultPresent,
|
|
601
|
+
toolErrors: sanitizeBackgroundDiagnosticEntries(diagnostics.toolErrors),
|
|
602
|
+
authErrors: sanitizeBackgroundDiagnosticEntries(diagnostics.authErrors),
|
|
603
|
+
transportErrors: sanitizeBackgroundDiagnosticEntries(diagnostics.transportErrors),
|
|
604
|
+
retryErrors: sanitizeBackgroundDiagnosticEntries(diagnostics.retryErrors),
|
|
605
|
+
stderrSeverity: diagnostics.stderrSeverity
|
|
606
|
+
} : void 0,
|
|
607
|
+
authError: variant.authError ? {
|
|
608
|
+
provider: sanitizeString(variant.authError.provider),
|
|
609
|
+
message: sanitizeString(variant.authError.message)
|
|
610
|
+
} : void 0
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
function getBackgroundStatePath(taskId) {
|
|
614
|
+
const safeTaskId = assertSafePathComponent(taskId, "taskId");
|
|
615
|
+
return path.join(
|
|
616
|
+
resolveRunStateDir(resolveBuildDirFromContext()),
|
|
617
|
+
"background",
|
|
618
|
+
`${safeTaskId}.json`
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
async function persistFatalBootstrapFailure(taskId, fatalError) {
|
|
622
|
+
const failedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
623
|
+
const errorMessage = sanitizeString(
|
|
624
|
+
fatalError instanceof Error ? fatalError.message : String(fatalError)
|
|
625
|
+
);
|
|
626
|
+
try {
|
|
627
|
+
const statePath = getBackgroundStatePath(taskId);
|
|
628
|
+
await mkdir(path.dirname(statePath), { recursive: true });
|
|
629
|
+
await atomicWriteJson(statePath, {
|
|
630
|
+
taskId,
|
|
631
|
+
pid: process.pid,
|
|
632
|
+
status: "failed",
|
|
633
|
+
failedAt,
|
|
634
|
+
activePhase: "startup",
|
|
635
|
+
elapsedMs: 0,
|
|
636
|
+
orchestratorTimeoutObserved: false,
|
|
637
|
+
terminationSource: "exception",
|
|
638
|
+
error: errorMessage
|
|
639
|
+
});
|
|
640
|
+
} catch {
|
|
641
|
+
}
|
|
642
|
+
try {
|
|
643
|
+
finalizeEvaluationHandle(
|
|
644
|
+
taskId,
|
|
645
|
+
createEvaluationHandleFinalState({
|
|
646
|
+
outcome: "error",
|
|
647
|
+
completedAt: failedAt,
|
|
648
|
+
errorMessage,
|
|
649
|
+
winner: null
|
|
650
|
+
})
|
|
651
|
+
);
|
|
652
|
+
} catch (finalizeError) {
|
|
653
|
+
console.error(
|
|
654
|
+
`[Worker ${process.pid}] Failed to finalize evaluation handle on fatal bootstrap error:`,
|
|
655
|
+
finalizeError
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
try {
|
|
659
|
+
const registry = new ProcessRegistry({ verbose: false });
|
|
660
|
+
await registry.init();
|
|
661
|
+
await registry.unregister(process.pid);
|
|
662
|
+
} catch {
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
function summarizeVariants(variants) {
|
|
666
|
+
return variants.map((variant) => ({
|
|
667
|
+
provider: variant.provider,
|
|
668
|
+
model: variant.model,
|
|
669
|
+
executionMode: variant.executionMode,
|
|
670
|
+
variant: formatVariantIdentifier(variant)
|
|
671
|
+
}));
|
|
672
|
+
}
|
|
673
|
+
function isOrchestratorTimeoutError(error) {
|
|
674
|
+
return error instanceof Error && ("code" in error && error.code === "COMPETITION_TIMEOUT" || /Orchestrator timeout after .* minutes/i.test(error.message));
|
|
675
|
+
}
|
|
676
|
+
function resolveBackgroundBasicJudgeState(options2) {
|
|
677
|
+
const judgeOff = options2.judgeOff === true;
|
|
678
|
+
return {
|
|
679
|
+
judgeOff,
|
|
680
|
+
aiJudgeRequested: !judgeOff && (options2.aiJudge === true || options2.aiJudgeRun !== void 0 || options2.aiJudgePrimary !== void 0)
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
function getBackgroundBasicEvaluationHandleOptions(aiJudgeRequested, judgeOff = false) {
|
|
684
|
+
return {
|
|
685
|
+
persistEvaluationHandle: true,
|
|
686
|
+
deferEvaluationHandleFinalization: aiJudgeRequested || judgeOff
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
function resolveBackgroundBasicCompetitionSynthesize(input) {
|
|
690
|
+
if (input.judgeOff || input.aiJudgeRequested) return false;
|
|
691
|
+
return input.synthesize;
|
|
692
|
+
}
|
|
693
|
+
function updateDeferredEvaluationOwnershipAfterFinalization(currentlyOwned, finalizationSucceeded) {
|
|
694
|
+
return finalizationSucceeded ? false : currentlyOwned;
|
|
695
|
+
}
|
|
696
|
+
function didAuthoritativeWinnerFinalize(result, requested = "completed") {
|
|
697
|
+
return isDurableHandleCompletion(result, requested);
|
|
698
|
+
}
|
|
699
|
+
function resolveBackgroundCompetitionFailure(result) {
|
|
700
|
+
const outcome = inferCompetitionFinalOutcome(result);
|
|
701
|
+
return outcome === "all_failed" || outcome === "timed_out" ? `Competition ended with ${outcome}` : void 0;
|
|
702
|
+
}
|
|
703
|
+
function mapBackgroundWorkerResult(result) {
|
|
704
|
+
return {
|
|
705
|
+
success: result.variants.some(
|
|
706
|
+
(v) => (v.outcome ?? deriveVariantOutcome(v)).verification.status === "passed"
|
|
707
|
+
),
|
|
708
|
+
winner: result.winner ? {
|
|
709
|
+
variant: result.winner.variant,
|
|
710
|
+
provider: result.winner.provider,
|
|
711
|
+
model: result.winner.model,
|
|
712
|
+
executionMode: result.winner.executionMode
|
|
713
|
+
} : null,
|
|
714
|
+
winnerVerification: "winnerVerification" in result ? result.winnerVerification : void 0,
|
|
715
|
+
synthesis: getWorkerSynthesisResult(result),
|
|
716
|
+
variants: result.variants.map((v) => ({
|
|
717
|
+
variant: v.variant,
|
|
718
|
+
provider: v.provider,
|
|
719
|
+
model: v.model,
|
|
720
|
+
executionMode: v.executionMode,
|
|
721
|
+
success: v.success,
|
|
722
|
+
outcome: v.outcome ?? deriveVariantOutcome(v),
|
|
723
|
+
prNumber: v.prNumber,
|
|
724
|
+
prUrl: v.prUrl,
|
|
725
|
+
cloudTaskId: v.cloudTaskId,
|
|
726
|
+
completeness: v.completeness,
|
|
727
|
+
duration: v.duration,
|
|
728
|
+
postProviderPhaseDurationsMs: v.postProviderPhaseDurationsMs,
|
|
729
|
+
errorMessage: v.error?.message,
|
|
730
|
+
...buildBackgroundWorkerVariantHealthState(v),
|
|
731
|
+
timedOut: v.timedOut,
|
|
732
|
+
terminationReason: v.terminationReason,
|
|
733
|
+
submittedOnly: v.submittedOnly,
|
|
734
|
+
inputSpecWarning: v.inputSpecWarning,
|
|
735
|
+
researchTrace: v.researchTrace
|
|
736
|
+
}))
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
function buildBackgroundCompetitionFailedState(result, failureMessage) {
|
|
740
|
+
return {
|
|
741
|
+
status: "failed",
|
|
742
|
+
terminationSource: "exception",
|
|
743
|
+
error: failureMessage,
|
|
744
|
+
result: mapBackgroundWorkerResult(result)
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
function buildBackgroundResearchExecutionContext(taskId) {
|
|
748
|
+
const nativeResearchProviders = readEnv(BUILD_RESEARCH_NATIVE_PROVIDERS).value;
|
|
749
|
+
if (!nativeResearchProviders) return {};
|
|
750
|
+
const base = getExecutionContext();
|
|
751
|
+
return {
|
|
752
|
+
executionContext: createExecutionContext({
|
|
753
|
+
repoRoot: base.repoRoot,
|
|
754
|
+
buildDir: base.buildDir,
|
|
755
|
+
taskId,
|
|
756
|
+
envOverrides: {
|
|
757
|
+
BUILD_RESEARCH_NATIVE_PROVIDERS: nativeResearchProviders
|
|
758
|
+
}
|
|
759
|
+
})
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
function finalizeDeferredWorkerEvaluationFailure(input) {
|
|
763
|
+
for (const variant of input.variants ?? []) {
|
|
764
|
+
updateEvaluationHandleWithResult(input.taskId, variant);
|
|
765
|
+
}
|
|
766
|
+
finalizeInterruptedEvaluationHandle(input);
|
|
767
|
+
}
|
|
768
|
+
function getWorkerSynthesisResult(result) {
|
|
769
|
+
if ("synthesisResult" in result) return result.synthesisResult;
|
|
770
|
+
if ("synthesis" in result) return result.synthesis ?? void 0;
|
|
771
|
+
return void 0;
|
|
772
|
+
}
|
|
773
|
+
function refreshWinnerVerification(prompt, result) {
|
|
774
|
+
result.winnerVerification = buildWinnerVerification({
|
|
775
|
+
winner: result.winner,
|
|
776
|
+
variants: result.variants,
|
|
777
|
+
requiredGatePolicy: resolveRequiredGatePolicyForPhase(prompt, "post-judge")
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
function validateWorkerVariants(variants) {
|
|
781
|
+
if (!Array.isArray(variants) || variants.length === 0) {
|
|
782
|
+
throw new Error("Worker variants must be a non-empty array");
|
|
783
|
+
}
|
|
784
|
+
return variants.map((variant, index) => {
|
|
785
|
+
if (typeof variant !== "object" || variant === null) {
|
|
786
|
+
throw new Error(`Worker variant at index ${index} must be an object`);
|
|
787
|
+
}
|
|
788
|
+
const candidate = variant;
|
|
789
|
+
if (typeof candidate.provider !== "string" || candidate.provider.trim().length === 0) {
|
|
790
|
+
throw new Error(`Worker variant at index ${index} is missing a valid provider`);
|
|
791
|
+
}
|
|
792
|
+
if (typeof candidate.executionMode !== "string" || candidate.executionMode.trim().length === 0) {
|
|
793
|
+
throw new Error(`Worker variant at index ${index} is missing a valid executionMode`);
|
|
794
|
+
}
|
|
795
|
+
if (candidate.model !== void 0 && typeof candidate.model !== "string") {
|
|
796
|
+
throw new Error(`Worker variant at index ${index} has a non-string model`);
|
|
797
|
+
}
|
|
798
|
+
return variant;
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
async function loadExistingWorkerState(statePath) {
|
|
802
|
+
try {
|
|
803
|
+
const raw = await readFile(statePath, "utf-8");
|
|
804
|
+
return parseJsonWithContext(
|
|
805
|
+
raw,
|
|
806
|
+
`Background worker state (${statePath})`
|
|
807
|
+
);
|
|
808
|
+
} catch {
|
|
809
|
+
return {};
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
async function loadWorkerConfigFile(configFilePath) {
|
|
813
|
+
const raw = await readFile(configFilePath, "utf-8");
|
|
814
|
+
const config = parseJsonWithContext(raw, `Worker config file (${configFilePath})`);
|
|
815
|
+
if (typeof config.prompt !== "string" || config.prompt.trim().length === 0) {
|
|
816
|
+
throw new Error(`Worker config file (${configFilePath}) is missing a valid prompt`);
|
|
817
|
+
}
|
|
818
|
+
const deliverableContract = parseDeliverableContract(config.deliverableContract);
|
|
819
|
+
const result = {
|
|
820
|
+
prompt: config.prompt,
|
|
821
|
+
variants: validateWorkerVariants(config.variants),
|
|
822
|
+
...config.runMetadata !== void 0 ? { runMetadata: readBackgroundRunMetadata(config.runMetadata) } : {},
|
|
823
|
+
...typeof config.editsExpected === "boolean" ? { editsExpected: config.editsExpected } : {},
|
|
824
|
+
...deliverableContract ? { deliverableContract } : {},
|
|
825
|
+
...Array.isArray(config.researchExcludeDomain) && config.researchExcludeDomain.every((item) => typeof item === "string") ? { researchExcludeDomain: config.researchExcludeDomain } : {}
|
|
826
|
+
};
|
|
827
|
+
try {
|
|
828
|
+
await unlink(configFilePath);
|
|
829
|
+
} catch {
|
|
830
|
+
}
|
|
831
|
+
return result;
|
|
832
|
+
}
|
|
833
|
+
async function main() {
|
|
834
|
+
const startedAt = /* @__PURE__ */ new Date();
|
|
835
|
+
const statePath = getBackgroundStatePath(options.taskId);
|
|
836
|
+
const timeoutMinutes = options.timeout ? parseInt(options.timeout, 10) / 6e4 : void 0;
|
|
837
|
+
const executorTimeoutMinutes = options.executorTimeoutMinutes !== void 0 ? parseFloat(options.executorTimeoutMinutes) : void 0;
|
|
838
|
+
let activePhase = "startup";
|
|
839
|
+
let orchestratorTimeoutObserved = false;
|
|
840
|
+
let orchestratorTimeoutMessage;
|
|
841
|
+
let stateRecord = {
|
|
842
|
+
taskId: options.taskId,
|
|
843
|
+
pid: process.pid,
|
|
844
|
+
parentPid: process.ppid,
|
|
845
|
+
status: "running",
|
|
846
|
+
startedAt: startedAt.toISOString(),
|
|
847
|
+
activePhase,
|
|
848
|
+
elapsedMs: 0,
|
|
849
|
+
timeoutMinutes,
|
|
850
|
+
executorTimeoutMinutes,
|
|
851
|
+
orchestratorTimeoutObserved: false,
|
|
852
|
+
...options.backlogItemId ? { backlogItemId: options.backlogItemId } : {}
|
|
853
|
+
};
|
|
854
|
+
let pendingStateWrite = Promise.resolve();
|
|
855
|
+
let workerDeferredEvaluationHandleFinalization = false;
|
|
856
|
+
let workerDeferredEvaluationHandleVariantResults;
|
|
857
|
+
let workerRetainedJudgedWinner;
|
|
858
|
+
let detachedWorkerHeartbeat;
|
|
859
|
+
const writeState = async (patch, phaseOverride) => {
|
|
860
|
+
const nextWrite = pendingStateWrite.then(async () => {
|
|
861
|
+
if (patch.status === "completed" && (signalCoordinator.isShuttingDown || signalShutdownStarted)) {
|
|
862
|
+
const completedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
863
|
+
const message = "Competition interrupted during shutdown before completed state persistence";
|
|
864
|
+
failDeferredEvaluationForShutdown(message, completedAt);
|
|
865
|
+
throw new ExitCodeError(143, message);
|
|
866
|
+
}
|
|
867
|
+
activePhase = phaseOverride ?? activePhase;
|
|
868
|
+
stateRecord = {
|
|
869
|
+
...stateRecord,
|
|
870
|
+
...patch,
|
|
871
|
+
activePhase,
|
|
872
|
+
elapsedMs: Date.now() - startedAt.getTime(),
|
|
873
|
+
orchestratorTimeoutObserved,
|
|
874
|
+
orchestratorTimeoutMessage
|
|
875
|
+
};
|
|
876
|
+
const existing = await loadExistingWorkerState(statePath);
|
|
877
|
+
await mkdir(path.dirname(statePath), { recursive: true });
|
|
878
|
+
await atomicWriteJson(statePath, {
|
|
879
|
+
...existing,
|
|
880
|
+
...stateRecord
|
|
881
|
+
});
|
|
882
|
+
});
|
|
883
|
+
pendingStateWrite = nextWrite.catch((error) => {
|
|
884
|
+
debugLog(
|
|
885
|
+
`[variant-worker] Failed to persist worker state at ${statePath}: ${error instanceof Error ? error.message : String(error)}`
|
|
886
|
+
);
|
|
887
|
+
});
|
|
888
|
+
await nextWrite;
|
|
889
|
+
};
|
|
890
|
+
const unregisterWorker = async () => {
|
|
891
|
+
await detachedWorkerHeartbeat?.unregister();
|
|
892
|
+
detachedWorkerHeartbeat = void 0;
|
|
893
|
+
};
|
|
894
|
+
const persistBacklogProvenance = async (phase, errorMessage, successOutcome) => {
|
|
895
|
+
await persistCompeteBacklogProvenance(
|
|
896
|
+
resolveBuildRoot(process.cwd()),
|
|
897
|
+
options.backlogItemId,
|
|
898
|
+
phase,
|
|
899
|
+
errorMessage,
|
|
900
|
+
phase === "success" ? { executingPid: null, successOutcome } : void 0
|
|
901
|
+
);
|
|
902
|
+
};
|
|
903
|
+
const failDeferredEvaluationForShutdown = (errorMessage, completedAt) => {
|
|
904
|
+
if (!workerDeferredEvaluationHandleFinalization) {
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
finalizeDeferredWorkerEvaluationFailure({
|
|
908
|
+
taskId: options.taskId,
|
|
909
|
+
variants: workerDeferredEvaluationHandleVariantResults,
|
|
910
|
+
completedAt,
|
|
911
|
+
errorMessage,
|
|
912
|
+
retainedJudgedWinner: workerRetainedJudgedWinner
|
|
913
|
+
});
|
|
914
|
+
workerDeferredEvaluationHandleFinalization = false;
|
|
915
|
+
};
|
|
916
|
+
const throwIfSignalShutdownStarted = (phase) => {
|
|
917
|
+
if (!signalCoordinator.isShuttingDown) {
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
const completedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
921
|
+
const message = `Competition interrupted during shutdown before ${phase}`;
|
|
922
|
+
failDeferredEvaluationForShutdown(message, completedAt);
|
|
923
|
+
throw new ExitCodeError(143, message);
|
|
924
|
+
};
|
|
925
|
+
let signalShutdownStarted = false;
|
|
926
|
+
const shutdownForSignal = async (signal) => {
|
|
927
|
+
if (signalShutdownStarted) {
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
signalShutdownStarted = true;
|
|
931
|
+
const terminatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
932
|
+
try {
|
|
933
|
+
await writeState(
|
|
934
|
+
{
|
|
935
|
+
status: "terminated",
|
|
936
|
+
terminatedAt,
|
|
937
|
+
signalReceivedAt: terminatedAt,
|
|
938
|
+
signal,
|
|
939
|
+
signalDiagnostics: {
|
|
940
|
+
pid: process.pid,
|
|
941
|
+
parentPid: process.ppid,
|
|
942
|
+
platform: process.platform,
|
|
943
|
+
uptimeMs: Math.round(process.uptime() * 1e3),
|
|
944
|
+
cwd: process.cwd(),
|
|
945
|
+
argv: process.argv.slice(0, 8),
|
|
946
|
+
activePhase
|
|
947
|
+
},
|
|
948
|
+
terminationSource: "signal",
|
|
949
|
+
error: `Background worker received ${signal}`
|
|
950
|
+
},
|
|
951
|
+
"shutdown"
|
|
952
|
+
);
|
|
953
|
+
} catch (error) {
|
|
954
|
+
console.error(
|
|
955
|
+
`[Worker ${process.pid}] Failed to persist ${signal} termination state:`,
|
|
956
|
+
error
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
await persistBacklogProvenance("failure", `Interrupted by ${signal}`);
|
|
960
|
+
try {
|
|
961
|
+
if (workerDeferredEvaluationHandleFinalization) {
|
|
962
|
+
failDeferredEvaluationForShutdown(`Background worker received ${signal}`, terminatedAt);
|
|
963
|
+
} else {
|
|
964
|
+
finalizeEvaluationHandle(
|
|
965
|
+
options.taskId,
|
|
966
|
+
createEvaluationHandleFinalState({
|
|
967
|
+
outcome: "error",
|
|
968
|
+
completedAt: terminatedAt,
|
|
969
|
+
errorMessage: `Background worker received ${signal}`,
|
|
970
|
+
winner: null
|
|
971
|
+
})
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
} catch (finalizeError) {
|
|
975
|
+
console.error(
|
|
976
|
+
`[Worker ${process.pid}] Failed to finalize evaluation handle on ${signal}:`,
|
|
977
|
+
finalizeError
|
|
978
|
+
);
|
|
979
|
+
}
|
|
980
|
+
if (workerDeferredEvaluationHandleVariantResults) {
|
|
981
|
+
const buildDir = resolveBuildDirFromContext();
|
|
982
|
+
await cleanupSynthesisInputPatches(workerDeferredEvaluationHandleVariantResults, {
|
|
983
|
+
expectedRoot: resolveSynthesisInputPatchDir(buildDir, options.taskId)
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
await unregisterWorker();
|
|
987
|
+
};
|
|
988
|
+
const signalCleanupName = `BackgroundWorker:${options.taskId}:${process.pid}`;
|
|
989
|
+
const workerSignalCleanup = LabPathResolver.getInstance().bindCurrentContext(
|
|
990
|
+
async (context) => {
|
|
991
|
+
if (context.reason !== "SIGINT" && context.reason !== "SIGTERM" && context.reason !== "SIGHUP") {
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
await shutdownForSignal(context.reason);
|
|
995
|
+
}
|
|
996
|
+
);
|
|
997
|
+
signalCoordinator.register(signalCleanupName, workerSignalCleanup, {
|
|
998
|
+
priority: "critical",
|
|
999
|
+
phase: "global-cleanup"
|
|
1000
|
+
});
|
|
1001
|
+
const removeSignalHandlers = () => {
|
|
1002
|
+
signalCoordinator.unregister(signalCleanupName);
|
|
1003
|
+
};
|
|
1004
|
+
const runNormalCleanupHandlers = async (reason) => {
|
|
1005
|
+
try {
|
|
1006
|
+
await signalCoordinator.runCleanupHandlers(reason, {
|
|
1007
|
+
timeoutMs: BACKGROUND_WORKER_FINAL_CLEANUP_TIMEOUT_MS,
|
|
1008
|
+
excludeNames: [signalCleanupName]
|
|
1009
|
+
});
|
|
1010
|
+
} catch (error) {
|
|
1011
|
+
const message = sanitizeString(error instanceof Error ? error.message : String(error));
|
|
1012
|
+
console.error(`[Worker ${process.pid}] Failed during ${reason} cleanup: ${message}`);
|
|
1013
|
+
}
|
|
1014
|
+
};
|
|
1015
|
+
try {
|
|
1016
|
+
console.log(`[Worker ${process.pid}] Starting background task ${options.taskId}`);
|
|
1017
|
+
await writeState(
|
|
1018
|
+
{
|
|
1019
|
+
status: "running",
|
|
1020
|
+
taskIdSource: "cli-arg"
|
|
1021
|
+
},
|
|
1022
|
+
"startup"
|
|
1023
|
+
);
|
|
1024
|
+
let prompt;
|
|
1025
|
+
let variants;
|
|
1026
|
+
let editsExpected;
|
|
1027
|
+
let deliverableContract;
|
|
1028
|
+
let researchExcludeDomain;
|
|
1029
|
+
let runMetadata;
|
|
1030
|
+
let latestJudgeDecision;
|
|
1031
|
+
let judgeError;
|
|
1032
|
+
activePhase = "loading_config";
|
|
1033
|
+
if (options.configFile) {
|
|
1034
|
+
const loadedConfig = await loadWorkerConfigFile(options.configFile);
|
|
1035
|
+
prompt = loadedConfig.prompt;
|
|
1036
|
+
variants = loadedConfig.variants;
|
|
1037
|
+
editsExpected = loadedConfig.editsExpected;
|
|
1038
|
+
deliverableContract = loadedConfig.deliverableContract;
|
|
1039
|
+
researchExcludeDomain = loadedConfig.researchExcludeDomain;
|
|
1040
|
+
runMetadata = loadedConfig.runMetadata;
|
|
1041
|
+
} else {
|
|
1042
|
+
if (!options.prompt || !options.variants) {
|
|
1043
|
+
throw new Error("Worker requires either --config-file or both --prompt and --variants");
|
|
1044
|
+
}
|
|
1045
|
+
prompt = options.prompt;
|
|
1046
|
+
variants = validateWorkerVariants(
|
|
1047
|
+
parseJsonWithContext(options.variants, "Worker variants")
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
await writeState(
|
|
1051
|
+
{
|
|
1052
|
+
promptSource: options.configFile ? "config-file" : "inline",
|
|
1053
|
+
configFile: options.configFile,
|
|
1054
|
+
variantCount: variants.length,
|
|
1055
|
+
variants: summarizeVariants(variants)
|
|
1056
|
+
},
|
|
1057
|
+
"loading_config"
|
|
1058
|
+
);
|
|
1059
|
+
activePhase = "registering_process";
|
|
1060
|
+
detachedWorkerHeartbeat = await startDetachedWorkerRegistryHeartbeat({
|
|
1061
|
+
taskId: options.taskId,
|
|
1062
|
+
command: "build compete (background worker)",
|
|
1063
|
+
owner: "compete",
|
|
1064
|
+
intervalMs: WORKER_REGISTRY_HEARTBEAT_MS
|
|
1065
|
+
});
|
|
1066
|
+
if (!detachedWorkerHeartbeat.active) {
|
|
1067
|
+
debugLog("[variant-worker] Detached worker registry heartbeat unavailable");
|
|
1068
|
+
}
|
|
1069
|
+
await writeState(
|
|
1070
|
+
{
|
|
1071
|
+
status: "running"
|
|
1072
|
+
},
|
|
1073
|
+
"executing_variants"
|
|
1074
|
+
);
|
|
1075
|
+
const { aiJudgeRequested, judgeOff } = resolveBackgroundBasicJudgeState(options);
|
|
1076
|
+
const basicEvaluationHandleOptions = getBackgroundBasicEvaluationHandleOptions(
|
|
1077
|
+
aiJudgeRequested,
|
|
1078
|
+
judgeOff
|
|
1079
|
+
);
|
|
1080
|
+
workerDeferredEvaluationHandleFinalization = basicEvaluationHandleOptions.deferEvaluationHandleFinalization;
|
|
1081
|
+
let requiredWinnerFinalizationError;
|
|
1082
|
+
const finalizeAuthoritativeWorkerWinner = (basicResult2, judgeOff2) => {
|
|
1083
|
+
const requiredGatePolicy = resolveRequiredGatePolicyForPhase(prompt, "post-judge");
|
|
1084
|
+
for (const variant of basicResult2.variants)
|
|
1085
|
+
finalizeVariantVerification(variant, requiredGatePolicy);
|
|
1086
|
+
const requireHandle = workerDeferredEvaluationHandleFinalization;
|
|
1087
|
+
const finalizeResult = finalizeWorkerWinner(options.taskId, basicResult2, {
|
|
1088
|
+
judgeOff: judgeOff2,
|
|
1089
|
+
requireHandle,
|
|
1090
|
+
runMetadata,
|
|
1091
|
+
aiJudgeRequested,
|
|
1092
|
+
aiJudgePrimary: options.aiJudgePrimary,
|
|
1093
|
+
latestDecision: latestJudgeDecision,
|
|
1094
|
+
judgeError,
|
|
1095
|
+
requiredGatePolicy
|
|
1096
|
+
});
|
|
1097
|
+
const requestedStatus = !judgeOff2 && resolveBackgroundCompetitionFailure(basicResult2) !== void 0 ? "failed" : "completed";
|
|
1098
|
+
const durable = didAuthoritativeWinnerFinalize(finalizeResult, requestedStatus);
|
|
1099
|
+
if (requireHandle && !durable) {
|
|
1100
|
+
requiredWinnerFinalizationError = `Required evaluation handle did not reach durable ${requestedStatus} state (kind=${finalizeResult.kind})`;
|
|
1101
|
+
}
|
|
1102
|
+
workerDeferredEvaluationHandleFinalization = updateDeferredEvaluationOwnershipAfterFinalization(
|
|
1103
|
+
workerDeferredEvaluationHandleFinalization,
|
|
1104
|
+
durable || !requireHandle || requiredWinnerFinalizationError !== void 0
|
|
1105
|
+
);
|
|
1106
|
+
};
|
|
1107
|
+
const {
|
|
1108
|
+
maxConcurrent: workerConfiguredMaxConcurrent,
|
|
1109
|
+
worktreeMax: workerConfiguredWorktreeMax
|
|
1110
|
+
} = await loadConfiguredConcurrency(options.maxConcurrent);
|
|
1111
|
+
let result;
|
|
1112
|
+
const basicResult = await runBasicCompetition(
|
|
1113
|
+
options.taskId,
|
|
1114
|
+
prompt,
|
|
1115
|
+
variants,
|
|
1116
|
+
{
|
|
1117
|
+
timeoutMinutes,
|
|
1118
|
+
perVariantTimeoutMinutes: executorTimeoutMinutes,
|
|
1119
|
+
maxConcurrentVariants: options.maxConcurrent ?? workerConfiguredMaxConcurrent,
|
|
1120
|
+
providerLimits: resolveProviderConcurrencyOverrides({
|
|
1121
|
+
cliLimits: parseProviderLimits(options.providerLimit)
|
|
1122
|
+
}).overrides,
|
|
1123
|
+
configuredWorktreeMaxConcurrent: workerConfiguredWorktreeMax,
|
|
1124
|
+
verbose: options.verbose || false,
|
|
1125
|
+
preserveWorktrees: options.preserveWorktrees ?? variants.length === 1,
|
|
1126
|
+
synthesize: resolveBackgroundBasicCompetitionSynthesize({
|
|
1127
|
+
synthesize: options.synthesize,
|
|
1128
|
+
aiJudgeRequested,
|
|
1129
|
+
judgeOff
|
|
1130
|
+
}),
|
|
1131
|
+
createPr: options.createPr || false,
|
|
1132
|
+
synthesisTopN: options.synthesisTopN,
|
|
1133
|
+
synthesisStrategy: options.synthesisStrategy,
|
|
1134
|
+
synthesisModel: options.synthesisModel,
|
|
1135
|
+
synthesisTimeoutMs: executorTimeoutMinutes !== void 0 ? executorTimeoutMinutes * 60 * 1e3 : void 0,
|
|
1136
|
+
// Native web-search clearance. This background
|
|
1137
|
+
// worker's env was built by the background-executor, which re-applied
|
|
1138
|
+
// the trusted per-run value (the master strips it from inheritance to
|
|
1139
|
+
// block shell spoofing). Thread it into the executionContext so the
|
|
1140
|
+
// worker's own master re-applies it to variant children — instead of
|
|
1141
|
+
// a process.env fallback, which would be spoofable on foreground runs.
|
|
1142
|
+
...buildBackgroundResearchExecutionContext(options.taskId),
|
|
1143
|
+
...basicEvaluationHandleOptions,
|
|
1144
|
+
deliverableContract,
|
|
1145
|
+
initialRunMetadata: runMetadata
|
|
1146
|
+
}
|
|
1147
|
+
);
|
|
1148
|
+
result = basicResult;
|
|
1149
|
+
workerDeferredEvaluationHandleVariantResults = basicResult.variants;
|
|
1150
|
+
if (basicResult.timeout?.globalTimedOut) {
|
|
1151
|
+
workerDeferredEvaluationHandleFinalization = false;
|
|
1152
|
+
orchestratorTimeoutObserved = true;
|
|
1153
|
+
orchestratorTimeoutMessage = `Competition timed out after ${basicResult.timeout.timeoutMs / 6e4} minutes`;
|
|
1154
|
+
throwIfBasicCompetitionGloballyTimedOut(basicResult);
|
|
1155
|
+
}
|
|
1156
|
+
const interruptedBySignal = shouldStopBeforeJudgeOrSynthesis(
|
|
1157
|
+
signalCoordinator.isShuttingDown,
|
|
1158
|
+
basicResult.variants
|
|
1159
|
+
);
|
|
1160
|
+
if (interruptedBySignal) {
|
|
1161
|
+
failDeferredEvaluationForShutdown(
|
|
1162
|
+
"Competition interrupted during shutdown before judge/synthesis completed",
|
|
1163
|
+
(/* @__PURE__ */ new Date()).toISOString()
|
|
1164
|
+
);
|
|
1165
|
+
throw new ExitCodeError(143, "Competition interrupted during shutdown");
|
|
1166
|
+
}
|
|
1167
|
+
if (readEnv(BUILD_RESEARCH_NATIVE_PROVIDERS).value) {
|
|
1168
|
+
const traceResult = await persistNativeResearchTraces({
|
|
1169
|
+
variants: basicResult.variants,
|
|
1170
|
+
taskId: options.taskId,
|
|
1171
|
+
// The env var IS the parent's clearance decision for this run, so it is
|
|
1172
|
+
// also the authoritative cleared set here.
|
|
1173
|
+
clearedProviders: parseNativeResearchProviders(),
|
|
1174
|
+
excludedDomains: researchExcludeDomain
|
|
1175
|
+
});
|
|
1176
|
+
for (const failure of traceResult.failures) {
|
|
1177
|
+
debugLog(
|
|
1178
|
+
`[Worker ${process.pid}] Failed to persist citation trace for ${failure.variantId}: ${failure.error}`
|
|
1179
|
+
);
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
throwIfSignalShutdownStarted("judge/synthesis");
|
|
1183
|
+
if (aiJudgeRequested) {
|
|
1184
|
+
let synthesisJudgeContext;
|
|
1185
|
+
try {
|
|
1186
|
+
const judgeResult = await selectWinnerWithJudge(prompt, basicResult.variants, {
|
|
1187
|
+
taskId: options.taskId,
|
|
1188
|
+
useAIJudge: true,
|
|
1189
|
+
aiJudgeModel: options.aiJudgeModel,
|
|
1190
|
+
aiJudgeVerbose: options.aiJudgeVerbose || false,
|
|
1191
|
+
aiJudgeShowRationale: options.aiJudgeShowRationale || false,
|
|
1192
|
+
aiJudgeVerbosity: options.aiJudgeVerbosity,
|
|
1193
|
+
aiJudgeMinScore: options.aiJudgeMinScore,
|
|
1194
|
+
aiJudgeConfidenceThreshold: options.aiJudgeConfidenceThreshold,
|
|
1195
|
+
aiJudgeStreaming: options.aiJudgeStreaming || false,
|
|
1196
|
+
aiJudgeTelemetry: options.aiJudgeTelemetry !== false,
|
|
1197
|
+
aiJudgeRun: options.aiJudgeRun,
|
|
1198
|
+
aiJudgePrimary: options.aiJudgePrimary,
|
|
1199
|
+
judgeModels: options.judgeModels,
|
|
1200
|
+
judgeModel: options.judgeModel,
|
|
1201
|
+
judgeAllowUnsafeModel: options.judgeAllowUnsafeModel,
|
|
1202
|
+
judgeStrict: options.judgeStrict || false,
|
|
1203
|
+
verificationMode: options.verificationMode,
|
|
1204
|
+
judgeProfile: options.judgeProfile,
|
|
1205
|
+
anonymizeJudge: resolveWorkerAnonymizeJudge(options),
|
|
1206
|
+
editsExpected,
|
|
1207
|
+
executionIntentEffective: deliverableContract?.executionIntentEffective
|
|
1208
|
+
});
|
|
1209
|
+
synthesisJudgeContext = judgeResult.synthesisContext;
|
|
1210
|
+
latestJudgeDecision = judgeResult.decision;
|
|
1211
|
+
basicResult.winner = resolveBackgroundJudgeWinner({
|
|
1212
|
+
prompt,
|
|
1213
|
+
variants: basicResult.variants,
|
|
1214
|
+
judgedWinner: judgeResult.winner,
|
|
1215
|
+
evaluatedVariants: judgeResult.evaluatedVariants
|
|
1216
|
+
});
|
|
1217
|
+
for (const variant of basicResult.variants) {
|
|
1218
|
+
finalizeVariantVerification(
|
|
1219
|
+
variant,
|
|
1220
|
+
resolveRequiredGatePolicyForPhase(prompt, "post-judge")
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
if (judgeResult.winner) {
|
|
1224
|
+
await persistJudgeResults(
|
|
1225
|
+
options.taskId,
|
|
1226
|
+
basicResult.variants,
|
|
1227
|
+
judgeResult.winner,
|
|
1228
|
+
resolveBuildDirFromContext()
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
if (basicResult.winner) {
|
|
1232
|
+
workerRetainedJudgedWinner = {
|
|
1233
|
+
winner: basicResult.winner,
|
|
1234
|
+
decision: judgeResult.decision,
|
|
1235
|
+
primaryJudge: resolveRunSummaryPrimaryJudge(
|
|
1236
|
+
options.aiJudgePrimary,
|
|
1237
|
+
basicResult.winner
|
|
1238
|
+
)
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
} catch (error) {
|
|
1242
|
+
judgeError = sanitizeString(error instanceof Error ? error.message : String(error));
|
|
1243
|
+
console.warn(
|
|
1244
|
+
`[Worker ${process.pid}] AI judge failed in background basic mode: ${error instanceof Error ? error.message : String(error)}`
|
|
1245
|
+
);
|
|
1246
|
+
basicResult.winner = null;
|
|
1247
|
+
}
|
|
1248
|
+
refreshWinnerVerification(prompt, basicResult);
|
|
1249
|
+
const shouldSynthesizeAfterJudge = shouldRunCompetitionSynthesis({
|
|
1250
|
+
synthesize: options.synthesize,
|
|
1251
|
+
deliverableContract: editsExpected === void 0 ? void 0 : {
|
|
1252
|
+
editsExpected
|
|
1253
|
+
},
|
|
1254
|
+
variantCount: basicResult.variants.length,
|
|
1255
|
+
hasWinner: basicResult.winner !== null
|
|
1256
|
+
});
|
|
1257
|
+
if (shouldSynthesizeAfterJudge) {
|
|
1258
|
+
const synthesisStrategy = options.synthesisStrategy ?? "agentic-synthesis";
|
|
1259
|
+
const synthesisAttempt = await attemptSynthesisWithGateValidation(
|
|
1260
|
+
options.taskId,
|
|
1261
|
+
prompt,
|
|
1262
|
+
basicResult.variants,
|
|
1263
|
+
{
|
|
1264
|
+
synthesisTopN: options.synthesisTopN ?? 2,
|
|
1265
|
+
synthesisStrategy,
|
|
1266
|
+
synthesisModel: options.synthesisModel,
|
|
1267
|
+
synthesisTimeoutMs: executorTimeoutMinutes !== void 0 ? executorTimeoutMinutes * 60 * 1e3 : void 0,
|
|
1268
|
+
preserveWorktrees: options.preserveWorktrees ?? variants.length === 1,
|
|
1269
|
+
repoRoot: resolveBuildRoot(process.cwd()),
|
|
1270
|
+
createPr: options.createPr || false,
|
|
1271
|
+
selectedWinner: basicResult.winner ?? void 0,
|
|
1272
|
+
judgeContext: synthesisJudgeContext,
|
|
1273
|
+
aiJudgeModel: options.aiJudgeModel,
|
|
1274
|
+
judgeModels: options.judgeModels,
|
|
1275
|
+
judgeModel: options.judgeModel,
|
|
1276
|
+
judgeAllowUnsafeModel: options.judgeAllowUnsafeModel,
|
|
1277
|
+
judgeConfigCwd: process.cwd()
|
|
1278
|
+
},
|
|
1279
|
+
options.verbose || false
|
|
1280
|
+
);
|
|
1281
|
+
if (synthesisAttempt) {
|
|
1282
|
+
basicResult.synthesisResult = synthesisAttempt.mergedResult;
|
|
1283
|
+
const eligibleSynthesisDeliveryVariant = shouldPromoteBackgroundSynthesisDelivery({
|
|
1284
|
+
synthesisVariant: synthesisAttempt.synthesisVariant,
|
|
1285
|
+
synthesisApplied: synthesisAttempt.mergedResult?.synthesisApplied,
|
|
1286
|
+
gatesPassed: synthesisAttempt.gatesPassed,
|
|
1287
|
+
strategy: synthesisStrategy,
|
|
1288
|
+
complementaryPatchApplied: synthesisAttempt.mergedResult?.complementaryPatchApplied
|
|
1289
|
+
}) && synthesisAttempt.synthesisVariant ? synthesisAttempt.synthesisVariant : void 0;
|
|
1290
|
+
if (eligibleSynthesisDeliveryVariant) {
|
|
1291
|
+
eligibleSynthesisDeliveryVariant.outcome = eligibleSynthesisDeliveryVariant.outcome ?? deriveVariantOutcome(eligibleSynthesisDeliveryVariant);
|
|
1292
|
+
await persistBackgroundSynthesisDeliveryVariant({
|
|
1293
|
+
taskId: options.taskId,
|
|
1294
|
+
buildDir: resolveBuildDirFromContext(),
|
|
1295
|
+
variant: eligibleSynthesisDeliveryVariant
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
updateEvaluationHandleWithSynthesisResult(options.taskId, synthesisAttempt.mergedResult);
|
|
1299
|
+
if (eligibleSynthesisDeliveryVariant) {
|
|
1300
|
+
basicResult.variants.push(eligibleSynthesisDeliveryVariant);
|
|
1301
|
+
basicResult.synthesisDeliveryVariant = eligibleSynthesisDeliveryVariant;
|
|
1302
|
+
basicResult.winnerIsSynthesis = false;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
} else {
|
|
1306
|
+
const buildDir = resolveBuildDirFromContext();
|
|
1307
|
+
await cleanupSynthesisInputPatches(basicResult.variants, {
|
|
1308
|
+
expectedRoot: resolveSynthesisInputPatchDir(buildDir, options.taskId)
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
throwIfSignalShutdownStarted("winner finalization");
|
|
1312
|
+
finalizeAuthoritativeWorkerWinner(basicResult, judgeOff);
|
|
1313
|
+
} else if (variants.length > 1) {
|
|
1314
|
+
basicResult.winner = null;
|
|
1315
|
+
refreshWinnerVerification(prompt, basicResult);
|
|
1316
|
+
const buildDir = resolveBuildDirFromContext();
|
|
1317
|
+
await cleanupSynthesisInputPatches(basicResult.variants, {
|
|
1318
|
+
expectedRoot: resolveSynthesisInputPatchDir(buildDir, options.taskId)
|
|
1319
|
+
});
|
|
1320
|
+
throwIfSignalShutdownStarted("winner finalization");
|
|
1321
|
+
finalizeAuthoritativeWorkerWinner(basicResult, judgeOff);
|
|
1322
|
+
} else if (judgeOff) {
|
|
1323
|
+
refreshWinnerVerification(prompt, basicResult);
|
|
1324
|
+
const buildDir = resolveBuildDirFromContext();
|
|
1325
|
+
await cleanupSynthesisInputPatches(basicResult.variants, {
|
|
1326
|
+
expectedRoot: resolveSynthesisInputPatchDir(buildDir, options.taskId)
|
|
1327
|
+
});
|
|
1328
|
+
throwIfSignalShutdownStarted("identity finalization");
|
|
1329
|
+
finalizeAuthoritativeWorkerWinner(basicResult, true);
|
|
1330
|
+
}
|
|
1331
|
+
throwIfSignalShutdownStarted("success state persistence");
|
|
1332
|
+
const competitionFailure = resolveBackgroundCompetitionFailure(result);
|
|
1333
|
+
if (competitionFailure !== void 0) {
|
|
1334
|
+
await writeState(
|
|
1335
|
+
{
|
|
1336
|
+
...buildBackgroundCompetitionFailedState(result, competitionFailure),
|
|
1337
|
+
failedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1338
|
+
},
|
|
1339
|
+
"writing_result"
|
|
1340
|
+
);
|
|
1341
|
+
throw new ExitCodeError(1, competitionFailure);
|
|
1342
|
+
}
|
|
1343
|
+
await writeState(
|
|
1344
|
+
{
|
|
1345
|
+
status: requiredWinnerFinalizationError ? "failed" : "completed",
|
|
1346
|
+
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1347
|
+
terminationSource: requiredWinnerFinalizationError ? "exception" : "success",
|
|
1348
|
+
...requiredWinnerFinalizationError ? { error: requiredWinnerFinalizationError } : {},
|
|
1349
|
+
result: mapBackgroundWorkerResult(result)
|
|
1350
|
+
},
|
|
1351
|
+
"writing_result"
|
|
1352
|
+
);
|
|
1353
|
+
if (requiredWinnerFinalizationError) {
|
|
1354
|
+
throw new ExitCodeError(1, requiredWinnerFinalizationError);
|
|
1355
|
+
}
|
|
1356
|
+
console.log(`[Worker ${process.pid}] Task ${options.taskId} completed successfully`);
|
|
1357
|
+
await persistBacklogProvenance(
|
|
1358
|
+
"success",
|
|
1359
|
+
void 0,
|
|
1360
|
+
resolveCompeteBacklogSuccessOutcome({
|
|
1361
|
+
winner: result.winner,
|
|
1362
|
+
completionApplyRan: true,
|
|
1363
|
+
createPr: options.createPr
|
|
1364
|
+
})
|
|
1365
|
+
);
|
|
1366
|
+
activePhase = "cleanup";
|
|
1367
|
+
await runNormalCleanupHandlers("background-worker exit");
|
|
1368
|
+
await unregisterWorker();
|
|
1369
|
+
removeSignalHandlers();
|
|
1370
|
+
return 0;
|
|
1371
|
+
} catch (error) {
|
|
1372
|
+
console.error(
|
|
1373
|
+
`[Worker ${process.pid}] Task ${options.taskId} failed: ${sanitizeString(
|
|
1374
|
+
error instanceof Error ? error.message : String(error)
|
|
1375
|
+
)}`
|
|
1376
|
+
);
|
|
1377
|
+
const failedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1378
|
+
const errorMessage = sanitizeString(error instanceof Error ? error.message : "Unknown error");
|
|
1379
|
+
try {
|
|
1380
|
+
if (isOrchestratorTimeoutError(error)) {
|
|
1381
|
+
orchestratorTimeoutObserved = true;
|
|
1382
|
+
orchestratorTimeoutMessage = error.message;
|
|
1383
|
+
}
|
|
1384
|
+
if (signalCoordinator.isShuttingDown || signalShutdownStarted) {
|
|
1385
|
+
await writeState({ failedAt, shutdownError: errorMessage }, "cleanup");
|
|
1386
|
+
} else {
|
|
1387
|
+
await writeState(
|
|
1388
|
+
{
|
|
1389
|
+
status: "failed",
|
|
1390
|
+
failedAt,
|
|
1391
|
+
terminationSource: "exception",
|
|
1392
|
+
error: errorMessage
|
|
1393
|
+
},
|
|
1394
|
+
"cleanup"
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
} catch (writeError) {
|
|
1398
|
+
console.error("[Worker] Failed to write error state:", writeError);
|
|
1399
|
+
}
|
|
1400
|
+
if (workerDeferredEvaluationHandleFinalization) {
|
|
1401
|
+
finalizeDeferredWorkerEvaluationFailure({
|
|
1402
|
+
taskId: options.taskId,
|
|
1403
|
+
variants: workerDeferredEvaluationHandleVariantResults,
|
|
1404
|
+
completedAt: failedAt,
|
|
1405
|
+
errorMessage,
|
|
1406
|
+
retainedJudgedWinner: workerRetainedJudgedWinner
|
|
1407
|
+
});
|
|
1408
|
+
workerDeferredEvaluationHandleFinalization = false;
|
|
1409
|
+
}
|
|
1410
|
+
if (workerDeferredEvaluationHandleVariantResults) {
|
|
1411
|
+
const buildDir = resolveBuildDirFromContext();
|
|
1412
|
+
await cleanupSynthesisInputPatches(workerDeferredEvaluationHandleVariantResults, {
|
|
1413
|
+
expectedRoot: resolveSynthesisInputPatchDir(buildDir, options.taskId)
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
await persistBacklogProvenance("failure", errorMessage);
|
|
1417
|
+
await runNormalCleanupHandlers("background-worker fatal-exit");
|
|
1418
|
+
await unregisterWorker();
|
|
1419
|
+
removeSignalHandlers();
|
|
1420
|
+
return 1;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
function isExecutedDirectly() {
|
|
1424
|
+
const entryPoint = process.argv[1];
|
|
1425
|
+
return entryPoint !== void 0 && import.meta.url === pathToFileURL(entryPoint).href;
|
|
1426
|
+
}
|
|
1427
|
+
function parseWorkerOptions(argv) {
|
|
1428
|
+
program.parse(argv);
|
|
1429
|
+
const parsed = program.opts();
|
|
1430
|
+
if (parsed.judgeRun !== void 0) {
|
|
1431
|
+
parsed.aiJudgeRun = parsed.judgeRun;
|
|
1432
|
+
}
|
|
1433
|
+
if (parsed.judgePrimary !== void 0) {
|
|
1434
|
+
parsed.aiJudgePrimary = parsed.judgePrimary;
|
|
1435
|
+
}
|
|
1436
|
+
if (parsed.backlogItem !== void 0) {
|
|
1437
|
+
parsed.backlogItemId = parsed.backlogItem;
|
|
1438
|
+
}
|
|
1439
|
+
return parsed;
|
|
1440
|
+
}
|
|
1441
|
+
function establishWorkerExecutionContext(taskId) {
|
|
1442
|
+
const repoRoot = resolveCliRepoRoot(process.cwd());
|
|
1443
|
+
setExecutionContext(
|
|
1444
|
+
createExecutionContext({
|
|
1445
|
+
repoRoot,
|
|
1446
|
+
buildDir: path.join(repoRoot, ".build-project"),
|
|
1447
|
+
taskId,
|
|
1448
|
+
envOverrides: {}
|
|
1449
|
+
})
|
|
1450
|
+
);
|
|
1451
|
+
}
|
|
1452
|
+
async function runWorkerEntrypoint(entryOptions = {}) {
|
|
1453
|
+
if (!entryOptions.runtimeAlreadyChecked) {
|
|
1454
|
+
assertBuildRuntimeReady({ command: "worker" });
|
|
1455
|
+
}
|
|
1456
|
+
try {
|
|
1457
|
+
options = parseWorkerOptions(process.argv);
|
|
1458
|
+
} catch (parseError) {
|
|
1459
|
+
console.error(
|
|
1460
|
+
`[Worker ${process.pid}] Failed to parse worker options: ${sanitizeString(
|
|
1461
|
+
parseError instanceof Error ? parseError.message : String(parseError)
|
|
1462
|
+
)}`
|
|
1463
|
+
);
|
|
1464
|
+
return 1;
|
|
1465
|
+
}
|
|
1466
|
+
establishWorkerExecutionContext(options.taskId);
|
|
1467
|
+
try {
|
|
1468
|
+
return await main();
|
|
1469
|
+
} catch (fatalError) {
|
|
1470
|
+
console.error(
|
|
1471
|
+
`[Worker ${process.pid}] Fatal bootstrap error: ${sanitizeString(
|
|
1472
|
+
fatalError instanceof Error ? fatalError.message : String(fatalError)
|
|
1473
|
+
)}`
|
|
1474
|
+
);
|
|
1475
|
+
await persistFatalBootstrapFailure(options.taskId, fatalError);
|
|
1476
|
+
return 1;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
if (isExecutedDirectly()) {
|
|
1480
|
+
runWorkerEntrypoint().then((exitCode) => process.exit(exitCode)).catch((error) => {
|
|
1481
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}
|
|
1482
|
+
`);
|
|
1483
|
+
process.exit(1);
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
export {
|
|
1487
|
+
buildBackgroundCompetitionFailedState,
|
|
1488
|
+
buildBackgroundWorkerVariantHealthState,
|
|
1489
|
+
didAuthoritativeWinnerFinalize,
|
|
1490
|
+
establishWorkerExecutionContext,
|
|
1491
|
+
finalizeWorkerWinner,
|
|
1492
|
+
getBackgroundBasicEvaluationHandleOptions,
|
|
1493
|
+
loadWorkerConfigFile,
|
|
1494
|
+
parseWorkerOptions,
|
|
1495
|
+
persistBackgroundSynthesisDeliveryVariant,
|
|
1496
|
+
persistFatalBootstrapFailure,
|
|
1497
|
+
resolveBackgroundBasicCompetitionSynthesize,
|
|
1498
|
+
resolveBackgroundBasicJudgeState,
|
|
1499
|
+
resolveBackgroundCompetitionFailure,
|
|
1500
|
+
runWorkerEntrypoint,
|
|
1501
|
+
shouldPromoteBackgroundSynthesisDelivery,
|
|
1502
|
+
updateDeferredEvaluationOwnershipAfterFinalization
|
|
1503
|
+
};
|
|
1504
|
+
//# sourceMappingURL=worker-WIWN62MC.js.map
|