@ebrindley/build 2026.11.29-rc.1 → 2026.11.30
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/pricing.json +120 -120
- package/README.md +5 -3
- package/dist/ai-judge-7QRPODW5.js +189 -0
- package/dist/allowlist-utils-UTV2BVC6.js +29 -0
- package/dist/apply-completion-mode-AX3JO47P.js +111 -0
- package/dist/artifact-migrator-COSKRONX.js +251 -0
- package/dist/ask-Y6J7ZG7U.js +177 -0
- package/dist/auth-4S3TCG3U.js +164 -0
- package/dist/auth-7JFLAPPG.js +97 -0
- package/dist/auth-F3L4WM4X.js +100 -0
- package/dist/auth-LKWU6MY3.js +96 -0
- package/dist/auth-LWR4K5WJ.js +184 -0
- package/dist/auth-TCWFPNKH.js +44 -0
- package/dist/auth-XDO5N5W7.js +92 -0
- package/dist/auth-XMI6YGL5.js +98 -0
- package/dist/auth-liveness-JQRZYOPF.js +53 -0
- package/dist/autoloop-cleanup-4BWHK726.js +106 -0
- package/dist/autoloop-gate-policy-RU5QCRRW.js +94 -0
- package/dist/autoloop-helpers-MPQV3CR3.js +52 -0
- package/dist/autoloop-run-defaults-HLLYKMQ5.js +27 -0
- package/dist/autoloop-success-HIWNPIKP.js +94 -0
- package/dist/autoloop-trajectory-NAZJ4FDN.js +71 -0
- package/dist/automatic-branch-cleanup-LITC4HBH.js +49 -0
- package/dist/autonomous-loop-controller-25SLNJRM.js +4419 -0
- package/dist/backend-DQV2E5NO.js +24 -0
- package/dist/backend-order-FA3472YN.js +112 -0
- package/dist/background-executor-M6X23KQK.js +263 -0
- package/dist/backlog-CV5WX5NW.js +390 -0
- package/dist/backlog-execution-intent-55LQ2QLQ.js +80 -0
- package/dist/backup-active-store-J6WW5B6W.js +16 -0
- package/dist/backup-machine-stores-XUJIV63O.js +251 -0
- package/dist/backup-telemetry-db-QQCLTM6R.js +26 -0
- package/dist/branch-cleanup-manager-IHJLSFHO.js +35 -0
- package/dist/build-gate-NHIOCA4K.js +69 -0
- package/dist/build-root-XQ2LDGA6.js +18 -0
- package/dist/change-summary-2P35V4IB.js +50 -0
- package/dist/chunk-2ABQORVF.js +96 -0
- package/dist/chunk-2D6ORBMW.js +204 -0
- package/dist/chunk-2KEKB74O.js +430 -0
- package/dist/chunk-2LY6SWFQ.js +106 -0
- package/dist/chunk-2UYVX52G.js +572 -0
- package/dist/chunk-322VCETO.js +338 -0
- package/dist/chunk-3AM7RQFY.js +568 -0
- package/dist/chunk-3BOQUDNJ.js +225 -0
- package/dist/chunk-3FLVW5SN.js +2018 -0
- package/dist/chunk-3HN5RJ6B.js +220 -0
- package/dist/chunk-3IU5PZID.js +24661 -0
- package/dist/chunk-3UOKKE4L.js +47 -0
- package/dist/chunk-3ZTMXGTM.js +181 -0
- package/dist/chunk-43OVHXJP.js +230 -0
- package/dist/chunk-43SLX7SB.js +3881 -0
- package/dist/chunk-446W2N7G.js +121 -0
- package/dist/chunk-44KC2BDD.js +257 -0
- package/dist/chunk-46CV2AXU.js +485 -0
- package/dist/chunk-4BWTBBOZ.js +173 -0
- package/dist/chunk-4CI7DAXV.js +2369 -0
- package/dist/chunk-4DZUJPGZ.js +6549 -0
- package/dist/chunk-4GMK2FOY.js +4083 -0
- package/dist/chunk-4ICHPKL7.js +50 -0
- package/dist/chunk-4IRFY5CP.js +328 -0
- package/dist/chunk-4NTO4FZY.js +26 -0
- package/dist/chunk-4RENZK5G.js +187 -0
- package/dist/chunk-4UX7WAEA.js +97 -0
- package/dist/chunk-4VAEBC43.js +872 -0
- package/dist/chunk-52EERG2K.js +197 -0
- package/dist/chunk-53I5ZWN4.js +315 -0
- package/dist/chunk-546BJRSJ.js +31 -0
- package/dist/chunk-56RQ7H2T.js +242 -0
- package/dist/chunk-5AKJ35KU.js +643 -0
- package/dist/chunk-5CBUNWJ3.js +237 -0
- package/dist/chunk-5FT5DZJU.js +306 -0
- package/dist/chunk-5I5PD4FV.js +33 -0
- package/dist/chunk-5JEEUMVC.js +576 -0
- package/dist/chunk-5KM4IFF5.js +523 -0
- package/dist/chunk-5M37KC2C.js +2478 -0
- package/dist/chunk-5NGRZQ37.js +1242 -0
- package/dist/chunk-5NYMJQEN.js +825 -0
- package/dist/chunk-5OFOXMEP.js +1052 -0
- package/dist/chunk-5PHWFWO5.js +887 -0
- package/dist/chunk-5QGN4OMZ.js +455 -0
- package/dist/chunk-5WAEIS6W.js +73 -0
- package/dist/chunk-5YTEPJJ6.js +753 -0
- package/dist/chunk-63ZTC7YM.js +180 -0
- package/dist/chunk-64HUBOJA.js +1754 -0
- package/dist/chunk-6K3QYLDK.js +677 -0
- package/dist/chunk-6O335CQ4.js +353 -0
- package/dist/chunk-6OLYI6DQ.js +17786 -0
- package/dist/chunk-6SYGYHJD.js +1027 -0
- package/dist/chunk-6TEFCQNZ.js +1133 -0
- package/dist/chunk-6XDEYPQ6.js +598 -0
- package/dist/chunk-73LLE7JJ.js +241 -0
- package/dist/chunk-76A7N43R.js +73 -0
- package/dist/chunk-77O6UPDY.js +2950 -0
- package/dist/chunk-77SOS44N.js +41 -0
- package/dist/chunk-7GQACZFQ.js +25 -0
- package/dist/chunk-7GS74VLQ.js +14 -0
- package/dist/chunk-7HVAKVRI.js +31 -0
- package/dist/chunk-7IJL2VY6.js +410 -0
- package/dist/chunk-7JLXSLA3.js +1063 -0
- package/dist/chunk-7MAE7V3O.js +546 -0
- package/dist/chunk-7O7H26VW.js +715 -0
- package/dist/chunk-7QAVWRJT.js +19419 -0
- package/dist/chunk-7Z22NOW4.js +8254 -0
- package/dist/chunk-7ZS6SHKA.js +1041 -0
- package/dist/chunk-A3GHJ4KS.js +142 -0
- package/dist/chunk-A5K5ZMOO.js +1487 -0
- package/dist/chunk-A6CFXX4X.js +737 -0
- package/dist/chunk-A7FDC4RZ.js +267 -0
- package/dist/chunk-A7ZYF66E.js +107 -0
- package/dist/chunk-AAPCXLSU.js +307 -0
- package/dist/chunk-ADJVO6UZ.js +977 -0
- package/dist/chunk-ALAFMV3C.js +342 -0
- package/dist/chunk-ALXV5QAB.js +398 -0
- package/dist/chunk-AWFRGPCT.js +4524 -0
- package/dist/chunk-AYLDFRVR.js +90 -0
- package/dist/chunk-B6FHVOH4.js +245 -0
- package/dist/chunk-BIHFSEOF.js +258 -0
- package/dist/chunk-BNMT5HDH.js +490 -0
- package/dist/chunk-BOCPPUPD.js +141 -0
- package/dist/chunk-BUMTGCTJ.js +1751 -0
- package/dist/chunk-BX7BZSCH.js +109 -0
- package/dist/chunk-BXZ7M2IZ.js +19 -0
- package/dist/chunk-CCDLD3YQ.js +204 -0
- package/dist/chunk-CGEQOKBM.js +650 -0
- package/dist/chunk-CHWTDO62.js +116 -0
- package/dist/chunk-CIOL6AGZ.js +655 -0
- package/dist/chunk-CJLYVCXU.js +85 -0
- package/dist/chunk-CP7SZ7WD.js +198 -0
- package/dist/chunk-CQ5UFSDL.js +1437 -0
- package/dist/chunk-CT76GAC6.js +152 -0
- package/dist/chunk-DAY7PLKR.js +1224 -0
- package/dist/chunk-DFRASQCY.js +264 -0
- package/dist/chunk-DKKS7O3V.js +68 -0
- package/dist/chunk-DLRQF4ZI.js +123 -0
- package/dist/chunk-DOS76IXZ.js +66 -0
- package/dist/chunk-DPPKV4VM.js +80 -0
- package/dist/chunk-DRUCSKQA.js +9 -0
- package/dist/chunk-EARCDRPV.js +510 -0
- package/dist/chunk-EAYRH4PM.js +1841 -0
- package/dist/chunk-EDCLABBZ.js +539 -0
- package/dist/chunk-EDI2ZDDG.js +489 -0
- package/dist/chunk-EG7PVC23.js +737 -0
- package/dist/chunk-EGJE7WI7.js +916 -0
- package/dist/chunk-EHLYZFQ3.js +976 -0
- package/dist/chunk-EI6F6KXZ.js +152 -0
- package/dist/chunk-EN3BRJ4M.js +62 -0
- package/dist/chunk-ENEZ2UZK.js +4046 -0
- package/dist/chunk-EOHXAE4I.js +445 -0
- package/dist/chunk-EQ6CFKVC.js +5113 -0
- package/dist/chunk-ERKNN26C.js +73 -0
- package/dist/chunk-ET3645ZR.js +4946 -0
- package/dist/chunk-EVBWWBLK.js +176 -0
- package/dist/chunk-EXPOGJKU.js +34 -0
- package/dist/chunk-EYGGX5VV.js +1358 -0
- package/dist/chunk-FDJD6ZW4.js +293 -0
- package/dist/chunk-FJEJOBYT.js +453 -0
- package/dist/chunk-FPSMXHVW.js +112 -0
- package/dist/chunk-FVLPKRDI.js +1267 -0
- package/dist/chunk-FWGHSP45.js +103 -0
- package/dist/chunk-G3Y74P2M.js +145 -0
- package/dist/chunk-GKYTKOZD.js +323 -0
- package/dist/chunk-GONP4H4J.js +482 -0
- package/dist/chunk-GSAUTEI5.js +15732 -0
- package/dist/chunk-GSSF7WE7.js +5552 -0
- package/dist/chunk-H3F7SQPH.js +1318 -0
- package/dist/chunk-HCPHBNNF.js +123 -0
- package/dist/chunk-HDBKA6HA.js +78 -0
- package/dist/chunk-HEKSYGYR.js +213 -0
- package/dist/chunk-HHLWTZDL.js +152 -0
- package/dist/chunk-HK4D2JQ3.js +365 -0
- package/dist/chunk-HKVI2JEM.js +53 -0
- package/dist/chunk-HLAFY5VQ.js +81 -0
- package/dist/chunk-HLVBWT2S.js +490 -0
- package/dist/chunk-HOJJHGDE.js +151 -0
- package/dist/chunk-HRA3GRZP.js +860 -0
- package/dist/chunk-HTZKX37C.js +6283 -0
- package/dist/chunk-II4QJWBI.js +389 -0
- package/dist/chunk-IKU5ETT5.js +852 -0
- package/dist/chunk-ILEI77YT.js +126 -0
- package/dist/chunk-ILJ35CUI.js +953 -0
- package/dist/chunk-IPCFFUSO.js +371 -0
- package/dist/chunk-IRJ65U55.js +20 -0
- package/dist/chunk-IRNCZ7GA.js +2287 -0
- package/dist/chunk-IT5RHXAL.js +392 -0
- package/dist/chunk-ITAQSLO7.js +302 -0
- package/dist/chunk-J4P3PSF7.js +305 -0
- package/dist/chunk-JCHU42E2.js +178 -0
- package/dist/chunk-JCUYUAJ6.js +2188 -0
- package/dist/chunk-JJWFK773.js +119 -0
- package/dist/chunk-JLQNE3DW.js +115 -0
- package/dist/chunk-JPZ3RFB2.js +224 -0
- package/dist/chunk-JRBDRVLG.js +1611 -0
- package/dist/chunk-JVBFCASW.js +206 -0
- package/dist/chunk-JVLPITFE.js +629 -0
- package/dist/chunk-JVRB7H46.js +154 -0
- package/dist/chunk-K4FEITLB.js +535 -0
- package/dist/chunk-K7IHVLMC.js +699 -0
- package/dist/chunk-K7LDQWAZ.js +226 -0
- package/dist/chunk-KAU7EXOS.js +544 -0
- package/dist/chunk-KCWTI6L6.js +855 -0
- package/dist/chunk-KCXBZT6N.js +1102 -0
- package/dist/chunk-KD3JHVH7.js +866 -0
- package/dist/chunk-KHH6FLUM.js +1672 -0
- package/dist/chunk-KUSBLYIZ.js +48 -0
- package/dist/chunk-L2E25UHK.js +318 -0
- package/dist/chunk-L45TR7YE.js +112 -0
- package/dist/chunk-L65DR3DA.js +128 -0
- package/dist/chunk-LE3HMEYD.js +263 -0
- package/dist/chunk-LIKJR4OZ.js +1429 -0
- package/dist/chunk-LJ4DBWU4.js +891 -0
- package/dist/chunk-LQTESWAU.js +18 -0
- package/dist/chunk-LVHMHEVN.js +3588 -0
- package/dist/chunk-LX5IU5TX.js +205 -0
- package/dist/chunk-LZJGCSW2.js +47 -0
- package/dist/chunk-MFXDLKZ4.js +334 -0
- package/dist/chunk-MHZ6LG6D.js +4692 -0
- package/dist/chunk-MQ62MQY5.js +535 -0
- package/dist/chunk-MTBJJEW6.js +1533 -0
- package/dist/chunk-MWX6GF64.js +1232 -0
- package/dist/chunk-MZWATAJ5.js +396 -0
- package/dist/chunk-MZY2X4BY.js +293 -0
- package/dist/chunk-N2GVQVMZ.js +360 -0
- package/dist/chunk-N2QFPC23.js +43 -0
- package/dist/chunk-N42JP72A.js +469 -0
- package/dist/chunk-N4JIL2JH.js +513 -0
- package/dist/chunk-N6GZBJC6.js +165 -0
- package/dist/chunk-N7DN2XQ2.js +188 -0
- package/dist/chunk-NEQ5COJM.js +487 -0
- package/dist/chunk-NOE2AC4Y.js +698 -0
- package/dist/chunk-NOK2P254.js +244 -0
- package/dist/chunk-NPE2EY5X.js +8991 -0
- package/dist/chunk-NPYXYTD3.js +320 -0
- package/dist/chunk-NSMHZKXN.js +13 -0
- package/dist/chunk-NTOOED63.js +319 -0
- package/dist/chunk-NV25VR5N.js +49 -0
- package/dist/chunk-NZORX7C6.js +43 -0
- package/dist/chunk-O4LG7DC4.js +1104 -0
- package/dist/chunk-OCLFRHVC.js +7024 -0
- package/dist/chunk-OEPYF23A.js +4301 -0
- package/dist/chunk-OFYHGYW2.js +236 -0
- package/dist/chunk-OH534UCC.js +129 -0
- package/dist/chunk-OLLOF3DM.js +1087 -0
- package/dist/chunk-ONSRQNXK.js +3667 -0
- package/dist/chunk-OQQJYRL4.js +884 -0
- package/dist/chunk-PAU2WCB5.js +83 -0
- package/dist/chunk-PCLYURZM.js +205 -0
- package/dist/chunk-PDZFFRVP.js +1461 -0
- package/dist/chunk-PFFMTB4W.js +288 -0
- package/dist/chunk-PMC2WE7L.js +292 -0
- package/dist/chunk-PNQOAORK.js +104 -0
- package/dist/chunk-PVYPEK3I.js +53 -0
- package/dist/chunk-PY3LR36X.js +637 -0
- package/dist/chunk-QCSYILNZ.js +27 -0
- package/dist/chunk-QD4QLWIP.js +229 -0
- package/dist/chunk-QFNYI6GT.js +946 -0
- package/dist/chunk-QGV6VOJI.js +2170 -0
- package/dist/chunk-QISV2HFY.js +525 -0
- package/dist/chunk-QK3F2EC5.js +555 -0
- package/dist/chunk-QKWQWBH3.js +159 -0
- package/dist/chunk-QN7IPD7E.js +204 -0
- package/dist/chunk-QOP72VG4.js +160 -0
- package/dist/chunk-R4BWGIY3.js +1681 -0
- package/dist/chunk-R5D7OHVL.js +99 -0
- package/dist/chunk-R7N4LHZY.js +63 -0
- package/dist/chunk-RBVSIFDW.js +373 -0
- package/dist/chunk-REKAPAX3.js +568 -0
- package/dist/chunk-RGMATJ5Z.js +79 -0
- package/dist/chunk-RIDXBLL6.js +92 -0
- package/dist/chunk-RIG7HTU7.js +167 -0
- package/dist/chunk-RPSVTHDC.js +14351 -0
- package/dist/chunk-RSIZC6TO.js +192 -0
- package/dist/chunk-RXMMCJSL.js +459 -0
- package/dist/chunk-RY4NKXBB.js +61 -0
- package/dist/chunk-S3I7E3GU.js +1139 -0
- package/dist/chunk-S3ZPX3AY.js +248 -0
- package/dist/chunk-S5FAB637.js +1853 -0
- package/dist/chunk-SDP4FSKS.js +124 -0
- package/dist/chunk-SIIUXZN3.js +39 -0
- package/dist/chunk-SJUNPB4C.js +189 -0
- package/dist/chunk-SN6UVHBX.js +88 -0
- package/dist/chunk-STETQZPA.js +616 -0
- package/dist/chunk-SWPL2VQ5.js +3674 -0
- package/dist/chunk-SXKQ6S4K.js +53 -0
- package/dist/chunk-SZXNW33V.js +126 -0
- package/dist/chunk-T4D67MDH.js +452 -0
- package/dist/chunk-TBBMN6WY.js +5405 -0
- package/dist/chunk-TD4VUICM.js +128 -0
- package/dist/chunk-TEWWMUL3.js +120 -0
- package/dist/chunk-TGHMBI3P.js +936 -0
- package/dist/chunk-TIZDT7WN.js +342 -0
- package/dist/chunk-TKOQHBWL.js +2227 -0
- package/dist/chunk-TKUHQCSM.js +970 -0
- package/dist/chunk-TPMLM7RS.js +169 -0
- package/dist/chunk-TQZJK2GF.js +763 -0
- package/dist/chunk-TXSR2GAM.js +1231 -0
- package/dist/chunk-TYGFXH6J.js +521 -0
- package/dist/chunk-U7PECEL6.js +1402 -0
- package/dist/chunk-UENRYSCZ.js +403 -0
- package/dist/chunk-UFRGGXQG.js +9622 -0
- package/dist/chunk-UHGOKHLR.js +912 -0
- package/dist/chunk-UON4D7CJ.js +833 -0
- package/dist/chunk-V5ZK46ZN.js +69 -0
- package/dist/chunk-V6KIOYYV.js +380 -0
- package/dist/chunk-V73CTZKO.js +122 -0
- package/dist/chunk-VAY2U3KK.js +29 -0
- package/dist/chunk-VOEIZFZK.js +527 -0
- package/dist/chunk-VXBODKFY.js +272 -0
- package/dist/chunk-VXGEQLZ2.js +465 -0
- package/dist/chunk-VZH5DGNK.js +160 -0
- package/dist/chunk-WX3G2PN6.js +146 -0
- package/dist/chunk-WZWXLKEX.js +48 -0
- package/dist/chunk-X4CWMMHJ.js +2155 -0
- package/dist/chunk-X6R6CVUC.js +294 -0
- package/dist/chunk-XD63TH2A.js +3639 -0
- package/dist/chunk-XFT3EHMS.js +304 -0
- package/dist/chunk-XHHTSY2C.js +193 -0
- package/dist/chunk-XLERMMC6.js +1414 -0
- package/dist/chunk-XPLKNO54.js +272 -0
- package/dist/chunk-XQK54PEG.js +491 -0
- package/dist/chunk-XR4B4ON2.js +339 -0
- package/dist/chunk-XS5DH42P.js +911 -0
- package/dist/chunk-Y26HWPYX.js +4967 -0
- package/dist/chunk-Y2OSBLHL.js +260 -0
- package/dist/chunk-Y2TFKFAN.js +396 -0
- package/dist/chunk-Y3ATTWF2.js +263 -0
- package/dist/chunk-Y63TWT4U.js +179 -0
- package/dist/chunk-YA5IQXZX.js +344 -0
- package/dist/chunk-YBK3OAFA.js +209 -0
- package/dist/chunk-YIXHBDCQ.js +115 -0
- package/dist/chunk-YKJD7XGX.js +828 -0
- package/dist/chunk-YLQMRUDV.js +147 -0
- package/dist/chunk-YM5C6JQQ.js +460 -0
- package/dist/chunk-YPAVWDXQ.js +60 -0
- package/dist/chunk-YPCF7ZWS.js +110 -0
- package/dist/chunk-YUP4U7F3.js +247 -0
- package/dist/chunk-YY5RNFD7.js +538 -0
- package/dist/chunk-YZRRPMO5.js +15190 -0
- package/dist/chunk-Z3JFB2PG.js +498 -0
- package/dist/chunk-Z6USLNUD.js +1214 -0
- package/dist/chunk-ZEM2MURX.js +514 -0
- package/dist/chunk-ZFHW4JVC.js +127 -0
- package/dist/chunk-ZJRSXT2L.js +951 -0
- package/dist/chunk-ZL35PLQE.js +2898 -0
- package/dist/chunk-ZLBNMVDZ.js +426 -0
- package/dist/chunk-ZMATRK4I.js +624 -0
- package/dist/chunk-ZQEJEV7L.js +557 -0
- package/dist/chunk-ZYXZNKBR.js +540 -0
- package/dist/cli-utils-CR6QZ6QE.js +31 -0
- package/dist/cli-validation-VPKISCKF.js +124 -0
- package/dist/commit-utils-Q3UHGMUB.js +49 -0
- package/dist/compete-config-resolver-ZYXFXJES.js +125 -0
- package/dist/compete-results-6YCPPGUX.js +315 -0
- package/dist/competition-outcome-tracker-JOXGYAME.js +62 -0
- package/dist/config-3PHBXBUC.js +237 -0
- package/dist/config-BVAYS6UF.js +46 -0
- package/dist/config-audit-LL2QG3PL.js +371 -0
- package/dist/config-explain-CSX6Y66G.js +71 -0
- package/dist/config-loader-UQEQJQNQ.js +52 -0
- package/dist/config-manager-MUHTJLH7.js +114 -0
- package/dist/config-merger-2WV7YWJS.js +14 -0
- package/dist/config-validator-OXIIFA7L.js +122 -0
- package/dist/cost-K7VYMBQ5.js +82 -0
- package/dist/data-migration-state-STPHHM6A.js +35 -0
- package/dist/db-migrator-5QZ2C7CL.js +34 -0
- package/dist/default-paths-QO4RD5CH.js +49 -0
- package/dist/discovery-K5RNSXXI.js +53 -0
- package/dist/doctor-E4Q4CKHD.js +268 -0
- package/dist/doctor-context-blocks-ZIYP276L.js +252 -0
- package/dist/doctor-instructions-import-26ZYVWL2.js +70 -0
- package/dist/doctor-purpose-KCLMZX54.js +30 -0
- package/dist/domain-analyzer-EZFIDBH7.js +47 -0
- package/dist/ensure-initialized-ODHQ5IXB.js +75 -0
- package/dist/entry.js +38 -38
- package/dist/error-parser-core-VAX2C2BE.js +70 -0
- package/dist/evaluation-context-PMDGLBBW.js +61 -0
- package/dist/evidence-plan-resolver-5NGSVNXT.js +111 -0
- package/dist/execution-data-writer-C3TN7WLA.js +77 -0
- package/dist/execution-policy-applier-KQ36LBBN.js +63 -0
- package/dist/execution-preflight-W7JMM5XT.js +224 -0
- package/dist/execution-roles-N7KXTA5I.js +112 -0
- package/dist/factory-VSWXYDPJ.js +207 -0
- package/dist/failure-taxonomy-FCEJXQX4.js +26 -0
- package/dist/flywheel-allowlist-revert-BCWV5L5T.js +1 -1
- package/dist/flywheel-autoloop-executor-OKVYXX6O.js +307 -0
- package/dist/flywheel-autoloop-unverified-ZO6OGV63.js +60 -0
- package/dist/flywheel-competition-executor-C6M5FI2A.js +324 -0
- package/dist/flywheel-executor-OPFNQ5DO.js +428 -0
- package/dist/flywheel-git-isolation-KBUQXVRL.js +50 -0
- package/dist/flywheel-manifest-6JVCFVNP.js +114 -0
- package/dist/flywheel-model-defaults-5OXQDJCG.js +115 -0
- package/dist/flywheel-preflight-5N2UWTYS.js +172 -0
- package/dist/flywheel-resume-ALKWQU3E.js +95 -0
- package/dist/flywheel-resume-execution-lease-SSEDP276.js +59 -0
- package/dist/flywheel-safety-FZYEDI7G.js +19 -0
- package/dist/flywheel-scope-decision-KO6UWGHG.js +14 -0
- package/dist/get-telemetry-logger-LWU4WCI5.js +153 -0
- package/dist/git-message-style-OBFYLGHX.js +105 -0
- package/dist/identity-6OB7NIFV.js +25 -0
- package/dist/index-query-ZXNSG63P.js +37 -0
- package/dist/index.js +1199 -1005
- package/dist/indexer-GMCTRQUJ.js +44 -0
- package/dist/init-K777TJZ5.js +244 -0
- package/dist/instructions-PS3QTCXV.js +188 -0
- package/dist/instructions-import-offer-NIYYZFCT.js +366 -0
- package/dist/instructions-run-NUX7OEJA.js +116 -0
- package/dist/interrupted-work-JJDX5BE2.js +43 -0
- package/dist/invocation-telemetry-ANFI74DI.js +78 -0
- package/dist/invoke-provider-auth-L23ZQG6Y.js +38 -0
- package/dist/lab-mode-3CV2FVEJ.js +44 -0
- package/dist/linux-host-class-YDZGPQ77.js +31 -0
- package/dist/llm-judge-executor-3TR2UI4M.js +180 -0
- package/dist/local-ci-config-QPMPQ3CN.js +50 -0
- package/dist/local-executor-Y4U6GGDZ.js +282 -0
- package/dist/logger-KHRXKL4E.js +152 -0
- package/dist/matrix-prompt-builder-CNCNXQAQ.js +536 -0
- package/dist/merge-batch-DU5EHGBP.js +322 -0
- package/dist/merge-queue-GB36JHMJ.js +126 -0
- package/dist/merge-queue-trust-6D2NH3SI.js +21 -0
- package/dist/metadata-45WCCBVK.js +29 -0
- package/dist/model-catalog-readiness-YRGBS7Q5.js +203 -0
- package/dist/model-invocations-db-HLIF6QDW.js +70 -0
- package/dist/model-resolver-OSKB64KV.js +215 -0
- package/dist/model-resolver-STIKZHLT.js +43 -0
- package/dist/monitor-SSW7KL4T.js +96 -0
- package/dist/next-7MVYLB45.js +97 -0
- package/dist/next-BZ2PHISP.js +150 -0
- package/dist/opportunistic-CKPHHTW7.js +86 -0
- package/dist/optimization-config-resolver-2QP2UWZN.js +148 -0
- package/dist/path-security-I5CLJDOY.js +39 -0
- package/dist/paths-37XBCAKZ.js +37 -0
- package/dist/plan-backlog-list-fast-S2WGMPWQ.js +88 -0
- package/dist/plan-backlog-show-fast-JFTAZCRN.js +111 -0
- package/dist/plan-sprint-list-fast-ZEAXVWGM.js +108 -0
- package/dist/plan-sprint-status-fast-UGUK6RXM.js +114 -0
- package/dist/plan-task-status-fast-VBMZHPQV.js +112 -0
- package/dist/process-registry-7OH7WULX.js +28 -0
- package/dist/process-scanner-X73A5I56.js +23 -0
- package/dist/processes-Q5S47K3W.js +29 -0
- package/dist/processes-json-fast-D4MGBC7J.js +72 -0
- package/dist/profile-TJUHSSII.js +207 -0
- package/dist/project-runtime-paths-Z4PJDEKQ.js +41 -0
- package/dist/provider-aware-resource-manager-HBRZTPIW.js +39 -0
- package/dist/provider-matrix-3YJKJDVU.js +212 -0
- package/dist/provider-output-forwarding-FRLPKRCE.js +26 -0
- package/dist/provider-registry-C64B4WNA.js +136 -0
- package/dist/publication-turn-PKP4MLTX.js +44 -0
- package/dist/quality-gate-ZFFFJ2FF.js +73 -0
- package/dist/quickstart-WO4JWPQW.js +107 -0
- package/dist/readiness-KB7T7ASY.js +214 -0
- package/dist/readiness-NJPGSWWZ.js +141 -0
- package/dist/registry-DKCEDGZB.js +215 -0
- package/dist/repo-root-V6U62IJP.js +28 -0
- package/dist/resolution-engine-LJ7LFNPS.js +190 -0
- package/dist/resolve-provider-cli-IID7EUQK.js +44 -0
- package/dist/restore-telemetry-db-2JXSMSTP.js +459 -0
- package/dist/routing-events-P7SHI273.js +13 -0
- package/dist/routing-history-store-6K6K7QPY.js +47 -0
- package/dist/routing-planner-5WP627QU.js +218 -0
- package/dist/runner-2GISBYE7.js +1815 -0
- package/dist/runner-VY4R2ZDQ.js +1202 -0
- package/dist/safety-VORB2OER.js +65 -0
- package/dist/safety-stanza-4N4EKGJW.js +49 -0
- package/dist/sandbox-SHNVGNYF.js +72 -0
- package/dist/sandbox-Z4UKFSX5.js +80 -0
- package/dist/setup-temp-cleanup-CCPUVRP4.js +29 -0
- package/dist/shared-utils-VQZQW5WD.js +42 -0
- package/dist/sprint-bridge-TDGT22W4.js +116 -0
- package/dist/sprint-completion-dependents-7PBL523O.js +43 -0
- package/dist/sprint-execution-service-4A76YEJK.js +373 -0
- package/dist/sprint-manager-X34JLIJU.js +132 -0
- package/dist/sqlite-timeout-config-HEXOFTMM.js +13 -0
- package/dist/sqlite-wrapper-4J37RTNE.js +19 -0
- package/dist/stale-cleanup-orchestrator-YICA3YEU.js +71 -0
- package/dist/storage-access-B3CPV4FH.js +31 -0
- package/dist/store-XPHC4MLJ.js +25 -0
- package/dist/task-classifier-C3E353M3.js +521 -0
- package/dist/task-list-fast-7LWCFIFE.js +108 -0
- package/dist/task-manager-2WSEVZ3E.js +130 -0
- package/dist/task-report-66CTVCDC.js +64 -0
- package/dist/telemetry-WBGBBPCQ.js +196 -0
- package/dist/telemetry-lab-scope-JG6HJRES.js +31 -0
- package/dist/telemetry-path-resolver-BDZFUGVT.js +34 -0
- package/dist/telemetry-reliability-V4BYE5NU.js +77 -0
- package/dist/unified-state-cleanup-XJND3PQ3.js +292 -0
- package/dist/universal-cost-calculator-QUD75SBH.js +70 -0
- package/dist/user-agents-ROOKUA2R.js +30 -0
- package/dist/variant-execution-EFILJOXO.js +317 -0
- package/dist/variant-opt-parser-65YRHC2B.js +248 -0
- package/dist/variant-state-cleanup-LAGQ6JZM.js +287 -0
- package/dist/variant-worker-WEYWKED2.js +4573 -0
- package/dist/variant-worker.js +4 -4
- package/dist/variants-XLUSJZ6F.js +262 -0
- package/dist/verification-command-IEVDCOET.js +67 -0
- package/dist/verify-commands-TTX4FMHU.js +67 -0
- package/dist/work-edge-GG7WSEBW.js +50 -0
- package/dist/worker-KOF2B33T.js +1528 -0
- package/dist/worker.js +4 -4
- package/dist/workspace-tree-identity-XGYRHWQE.js +52 -0
- package/dist/worktree-environment-NRWIGOUP.js +60 -0
- package/dist/worktree-metrics-AM45GE5L.js +66 -0
- package/dist/writeback-573M6DNN.js +51 -0
- package/docs/CLI_REFERENCE.md +8 -8
- package/docs/reference/AGENT_CONTEXT.md +53 -5
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/templates/AGENTS.template.md +10 -27
- package/templates/builtin-workflows/skills/execution-contract-code/SKILL.md +4 -2
- package/dist/ai-judge-DHVNPGD6.js +0 -190
- package/dist/allowlist-utils-C3O2QUMN.js +0 -29
- package/dist/apply-completion-mode-UHZ5CKEK.js +0 -112
- package/dist/artifact-migrator-FKXM2ZHW.js +0 -251
- package/dist/ask-MEVFZPUC.js +0 -178
- package/dist/auth-3H57UDCK.js +0 -165
- package/dist/auth-4IRDL27A.js +0 -97
- package/dist/auth-AG2MHA2W.js +0 -98
- package/dist/auth-MRSKG3B4.js +0 -44
- package/dist/auth-QK3AKGIO.js +0 -101
- package/dist/auth-SFJ3OE2R.js +0 -185
- package/dist/auth-SJVDTKGV.js +0 -99
- package/dist/auth-ZGPTUIVB.js +0 -93
- package/dist/auth-liveness-3DG6JMOQ.js +0 -53
- package/dist/autoloop-cleanup-M2S4SLL5.js +0 -106
- package/dist/autoloop-gate-policy-WSIDFFLA.js +0 -95
- package/dist/autoloop-helpers-YL7UAPVU.js +0 -53
- package/dist/autoloop-run-defaults-B5MWBDMU.js +0 -27
- package/dist/autoloop-success-YJ4VKQJS.js +0 -95
- package/dist/autoloop-trajectory-F2XRLEVN.js +0 -72
- package/dist/automatic-branch-cleanup-YI3NBVWP.js +0 -49
- package/dist/autonomous-loop-controller-NMXPBYG3.js +0 -4415
- package/dist/backend-CAFCYODQ.js +0 -24
- package/dist/backend-order-JS4KDP4I.js +0 -113
- package/dist/background-executor-MMH3OMGR.js +0 -263
- package/dist/backlog-WNDSXTB2.js +0 -390
- package/dist/backlog-execution-intent-2PBE2EEX.js +0 -81
- package/dist/backup-active-store-ZCGFMD2P.js +0 -16
- package/dist/backup-machine-stores-UTJXNZAF.js +0 -251
- package/dist/backup-telemetry-db-IEP7MX6U.js +0 -26
- package/dist/branch-cleanup-manager-742HVESE.js +0 -35
- package/dist/build-gate-NFMITBO4.js +0 -70
- package/dist/build-root-7KNOWDTS.js +0 -18
- package/dist/change-summary-NT2LQ5WF.js +0 -50
- package/dist/chunk-276XSIJL.js +0 -491
- package/dist/chunk-27ARK74R.js +0 -5405
- package/dist/chunk-2FE3E3AI.js +0 -25
- package/dist/chunk-2GK4YBEG.js +0 -248
- package/dist/chunk-2Q7POOGY.js +0 -852
- package/dist/chunk-2ZBV6557.js +0 -241
- package/dist/chunk-3AEKBPBM.js +0 -264
- package/dist/chunk-3FP7EZKJ.js +0 -884
- package/dist/chunk-3HK7W227.js +0 -160
- package/dist/chunk-3I7R646L.js +0 -753
- package/dist/chunk-3L5C37LL.js +0 -953
- package/dist/chunk-3O7A5WDE.js +0 -198
- package/dist/chunk-3OBVSKRE.js +0 -19
- package/dist/chunk-3P5IN5E7.js +0 -9
- package/dist/chunk-3PKZPQSS.js +0 -490
- package/dist/chunk-3RRDBY4I.js +0 -1437
- package/dist/chunk-3SRQN5HS.js +0 -1029
- package/dist/chunk-3VRJJOGI.js +0 -258
- package/dist/chunk-3W6RM44N.js +0 -307
- package/dist/chunk-3ZY37IGM.js +0 -263
- package/dist/chunk-436ME67N.js +0 -373
- package/dist/chunk-445GJ7SE.js +0 -83
- package/dist/chunk-4CKSGA2M.js +0 -50
- package/dist/chunk-4FRHN52E.js +0 -338
- package/dist/chunk-4G72QZO4.js +0 -204
- package/dist/chunk-4QBUZIZU.js +0 -1611
- package/dist/chunk-4TFD62AV.js +0 -179
- package/dist/chunk-5574ECX7.js +0 -53
- package/dist/chunk-56M4KK5M.js +0 -47
- package/dist/chunk-57K6DGM3.js +0 -34
- package/dist/chunk-5AXOWRWV.js +0 -951
- package/dist/chunk-5GBTIYB3.js +0 -2478
- package/dist/chunk-5IYSVNHJ.js +0 -568
- package/dist/chunk-5NAEIRF7.js +0 -178
- package/dist/chunk-5OMO5DOQ.js +0 -629
- package/dist/chunk-5QKU35YH.js +0 -26
- package/dist/chunk-5SLVJBMF.js +0 -43
- package/dist/chunk-5UAEDMLD.js +0 -152
- package/dist/chunk-5XHIYI3C.js +0 -699
- package/dist/chunk-63RRVYDB.js +0 -396
- package/dist/chunk-6AYIB2B3.js +0 -244
- package/dist/chunk-6EFUFGJ7.js +0 -912
- package/dist/chunk-6GETJDOF.js +0 -1853
- package/dist/chunk-6HNWT2WY.js +0 -189
- package/dist/chunk-6M5ZF2WE.js +0 -288
- package/dist/chunk-6RSSRBQO.js +0 -514
- package/dist/chunk-6UYJ473L.js +0 -109
- package/dist/chunk-6ZVBKSOF.js +0 -173
- package/dist/chunk-75ECMNFC.js +0 -410
- package/dist/chunk-776Q6UZ5.js +0 -326
- package/dist/chunk-7ABZ24VQ.js +0 -398
- package/dist/chunk-7AQTBZRG.js +0 -698
- package/dist/chunk-7B4XPQ3A.js +0 -300
- package/dist/chunk-7FD7YASE.js +0 -272
- package/dist/chunk-7HZMBYW6.js +0 -169
- package/dist/chunk-7KVDEYUR.js +0 -260
- package/dist/chunk-7O4GRYXK.js +0 -616
- package/dist/chunk-7PKBK54N.js +0 -128
- package/dist/chunk-A6TYJOSB.js +0 -43
- package/dist/chunk-AAP4LU4F.js +0 -426
- package/dist/chunk-ACMYGDEC.js +0 -523
- package/dist/chunk-ADCBA32I.js +0 -123
- package/dist/chunk-ADHCK4HP.js +0 -62
- package/dist/chunk-AESBIXW6.js +0 -225
- package/dist/chunk-AKAWLZRN.js +0 -1224
- package/dist/chunk-AL5XVEIF.js +0 -1402
- package/dist/chunk-ANZTCH7G.js +0 -88
- package/dist/chunk-AXPHA4LS.js +0 -598
- package/dist/chunk-AZDXVXJE.js +0 -224
- package/dist/chunk-B4TCZUIA.js +0 -116
- package/dist/chunk-BADCEBE3.js +0 -2950
- package/dist/chunk-BAT7354O.js +0 -181
- package/dist/chunk-BCGXEZRY.js +0 -487
- package/dist/chunk-BQRH2P5T.js +0 -293
- package/dist/chunk-C74D53T7.js +0 -459
- package/dist/chunk-CAT22O7B.js +0 -936
- package/dist/chunk-CFHVPNBS.js +0 -165
- package/dist/chunk-CJKUM5Q2.js +0 -60
- package/dist/chunk-CL7QXURF.js +0 -657
- package/dist/chunk-CNBPLPNN.js +0 -204
- package/dist/chunk-CNRT6QG2.js +0 -122
- package/dist/chunk-CPMXKU6U.js +0 -237
- package/dist/chunk-CWPSXIJJ.js +0 -142
- package/dist/chunk-DDQPETWE.js +0 -263
- package/dist/chunk-DEYAKXMN.js +0 -866
- package/dist/chunk-DI3DC4GT.js +0 -126
- package/dist/chunk-DJERA5KD.js +0 -334
- package/dist/chunk-DLYHD7JI.js +0 -115
- package/dist/chunk-DOMVDY3Y.js +0 -48
- package/dist/chunk-DR2JTVW3.js +0 -128
- package/dist/chunk-DY4LST2V.js +0 -159
- package/dist/chunk-DZZ2ETVO.js +0 -31
- package/dist/chunk-EBBMNMPE.js +0 -6283
- package/dist/chunk-EFFA3WG2.js +0 -737
- package/dist/chunk-EIKUSY4Y.js +0 -106
- package/dist/chunk-ELZHXS2U.js +0 -3639
- package/dist/chunk-ENTWET7B.js +0 -389
- package/dist/chunk-EONWEADC.js +0 -469
- package/dist/chunk-ESP4GKLS.js +0 -103
- package/dist/chunk-ETKKYQ6H.js +0 -568
- package/dist/chunk-EUVNDMSQ.js +0 -4048
- package/dist/chunk-EUXY3GSN.js +0 -1672
- package/dist/chunk-EYMZGPZ3.js +0 -272
- package/dist/chunk-F3O7SYOU.js +0 -1681
- package/dist/chunk-F76UFIGF.js +0 -73
- package/dist/chunk-FBZ3GP4S.js +0 -220
- package/dist/chunk-FGHL5MTF.js +0 -204
- package/dist/chunk-FJA75X7L.js +0 -3881
- package/dist/chunk-FM75V5EE.js +0 -120
- package/dist/chunk-FPJBEB7H.js +0 -209
- package/dist/chunk-FXUYKWHO.js +0 -535
- package/dist/chunk-GBPDPVDM.js +0 -1461
- package/dist/chunk-GDTQ66FN.js +0 -344
- package/dist/chunk-GGIM7NWW.js +0 -1414
- package/dist/chunk-GH4N25AZ.js +0 -205
- package/dist/chunk-GJFTLFHH.js +0 -637
- package/dist/chunk-GJRN3UFJ.js +0 -145
- package/dist/chunk-GL4DTEVY.js +0 -152
- package/dist/chunk-GQIMUVSC.js +0 -763
- package/dist/chunk-GR4OO7AT.js +0 -29
- package/dist/chunk-GRKSOYS4.js +0 -538
- package/dist/chunk-GTMMUVJG.js +0 -976
- package/dist/chunk-GUCSW7KT.js +0 -294
- package/dist/chunk-GW4SN5PD.js +0 -230
- package/dist/chunk-GWHGTG37.js +0 -36
- package/dist/chunk-GXIZDTSJ.js +0 -513
- package/dist/chunk-H4PFYO6G.js +0 -99
- package/dist/chunk-H7KLGNJF.js +0 -79
- package/dist/chunk-H7XNJSIW.js +0 -576
- package/dist/chunk-HCWGNUBL.js +0 -247
- package/dist/chunk-HEG24XUV.js +0 -160
- package/dist/chunk-HIJIYOZE.js +0 -318
- package/dist/chunk-HIOZZVWO.js +0 -1139
- package/dist/chunk-HMOOMDSM.js +0 -4692
- package/dist/chunk-HQYED5GO.js +0 -342
- package/dist/chunk-I3HFHBRJ.js +0 -371
- package/dist/chunk-I77BAOY4.js +0 -1052
- package/dist/chunk-I7U34C6J.js +0 -833
- package/dist/chunk-IIWNMEMI.js +0 -213
- package/dist/chunk-ILFIYNW6.js +0 -4301
- package/dist/chunk-ILYUN2LB.js +0 -206
- package/dist/chunk-IMURUMUU.js +0 -872
- package/dist/chunk-IOSKAEBC.js +0 -112
- package/dist/chunk-IQWXTKR2.js +0 -80
- package/dist/chunk-IWX5SVZ7.js +0 -1533
- package/dist/chunk-IYQLR4KG.js +0 -887
- package/dist/chunk-IZU2NMRQ.js +0 -3674
- package/dist/chunk-J75CV2J2.js +0 -48
- package/dist/chunk-JGKQYDI2.js +0 -1214
- package/dist/chunk-JVJVEQSC.js +0 -27
- package/dist/chunk-JY6DF4VH.js +0 -187
- package/dist/chunk-JZDU34B3.js +0 -360
- package/dist/chunk-JZHUN5I5.js +0 -305
- package/dist/chunk-K3WH2Y3Z.js +0 -2188
- package/dist/chunk-K7ZOJSTB.js +0 -891
- package/dist/chunk-KBGQOREQ.js +0 -188
- package/dist/chunk-KBWC7J6T.js +0 -167
- package/dist/chunk-KPJIEMFZ.js +0 -365
- package/dist/chunk-KQ3CTB3O.js +0 -977
- package/dist/chunk-KQSXPX76.js +0 -124
- package/dist/chunk-KV2JP3CE.js +0 -523
- package/dist/chunk-KXFJCM5O.js +0 -315
- package/dist/chunk-KXHYE63U.js +0 -112
- package/dist/chunk-L3XE627V.js +0 -39
- package/dist/chunk-L6SOMVXU.js +0 -107
- package/dist/chunk-LBGCV3MK.js +0 -242
- package/dist/chunk-LJ74VTCM.js +0 -339
- package/dist/chunk-LKESNV6N.js +0 -535
- package/dist/chunk-LKFANUFA.js +0 -380
- package/dist/chunk-LLZSXNS5.js +0 -758
- package/dist/chunk-LQFBZZB2.js +0 -525
- package/dist/chunk-LUVCS2BE.js +0 -68
- package/dist/chunk-LZ2PEIBR.js +0 -677
- package/dist/chunk-M3YQTSSL.js +0 -15192
- package/dist/chunk-M6UHOC4I.js +0 -553
- package/dist/chunk-MB274FPE.js +0 -2854
- package/dist/chunk-MJBEWU4E.js +0 -14
- package/dist/chunk-MLADI4OU.js +0 -304
- package/dist/chunk-MNI3JNZ2.js +0 -226
- package/dist/chunk-MQPLYUZG.js +0 -85
- package/dist/chunk-MQWAKQGT.js +0 -396
- package/dist/chunk-MSMYATWG.js +0 -63
- package/dist/chunk-MTPGRJBS.js +0 -4526
- package/dist/chunk-MVHPKG3F.js +0 -180
- package/dist/chunk-MVU3TQ3I.js +0 -31
- package/dist/chunk-N4OUM6GV.js +0 -489
- package/dist/chunk-N7KJHHOZ.js +0 -2369
- package/dist/chunk-NDT7Y6T5.js +0 -11995
- package/dist/chunk-NMJR5OPH.js +0 -6549
- package/dist/chunk-NSIK2M5L.js +0 -510
- package/dist/chunk-NVZFR6OW.js +0 -69
- package/dist/chunk-NYMUQVN6.js +0 -546
- package/dist/chunk-O4ZE44FO.js +0 -855
- package/dist/chunk-O6KSTAYD.js +0 -624
- package/dist/chunk-O6SA3YFV.js +0 -1242
- package/dist/chunk-O7GXZRHU.js +0 -465
- package/dist/chunk-OAODGJ32.js +0 -1104
- package/dist/chunk-OFJUORWH.js +0 -7024
- package/dist/chunk-OKDVN7LE.js +0 -4083
- package/dist/chunk-OLZ2LOYC.js +0 -962
- package/dist/chunk-OQ5KI3EO.js +0 -17592
- package/dist/chunk-OSPY52VO.js +0 -1232
- package/dist/chunk-OXHHHXJB.js +0 -1318
- package/dist/chunk-OZGCHIZG.js +0 -447
- package/dist/chunk-P4PXB27C.js +0 -485
- package/dist/chunk-P5574V6F.js +0 -229
- package/dist/chunk-PDUW42NU.js +0 -5113
- package/dist/chunk-PHLTLB4A.js +0 -572
- package/dist/chunk-PHV66KBQ.js +0 -152
- package/dist/chunk-PHWAE54T.js +0 -257
- package/dist/chunk-PJWKI4PY.js +0 -490
- package/dist/chunk-PL6SM4VU.js +0 -73
- package/dist/chunk-PMAYERFO.js +0 -392
- package/dist/chunk-PMKHR7AD.js +0 -860
- package/dist/chunk-PSISA5D4.js +0 -445
- package/dist/chunk-Q4J5PBIM.js +0 -1231
- package/dist/chunk-Q4L4UTE2.js +0 -73
- package/dist/chunk-Q6ENJZP6.js +0 -104
- package/dist/chunk-QCBUWOYE.js +0 -1754
- package/dist/chunk-QKUUOEZE.js +0 -49
- package/dist/chunk-QMHKEQKX.js +0 -24659
- package/dist/chunk-QMMGT6LX.js +0 -1489
- package/dist/chunk-QOZEEMKE.js +0 -78
- package/dist/chunk-QQOBYSG4.js +0 -81
- package/dist/chunk-QUL3GGBH.js +0 -4967
- package/dist/chunk-R6RSJ3HK.js +0 -121
- package/dist/chunk-RABQ54O3.js +0 -430
- package/dist/chunk-RBF3OAJ7.js +0 -353
- package/dist/chunk-RCD3YW3M.js +0 -1750
- package/dist/chunk-RD54F2FM.js +0 -2128
- package/dist/chunk-RJ2Y4VD2.js +0 -555
- package/dist/chunk-RKGYRRJN.js +0 -3588
- package/dist/chunk-RRLGIW4Q.js +0 -911
- package/dist/chunk-RTJFWZ5G.js +0 -529
- package/dist/chunk-RZE5ZGVD.js +0 -244
- package/dist/chunk-S4WWRIIW.js +0 -1358
- package/dist/chunk-S5SRUYAA.js +0 -126
- package/dist/chunk-SA66T3C6.js +0 -197
- package/dist/chunk-SAMACWNI.js +0 -236
- package/dist/chunk-SCYAJOMO.js +0 -302
- package/dist/chunk-SD5YZBX2.js +0 -147
- package/dist/chunk-SGKRG6A6.js +0 -1841
- package/dist/chunk-SINZRL5A.js +0 -293
- package/dist/chunk-SJ7EBFIV.js +0 -825
- package/dist/chunk-SLAKWX36.js +0 -450
- package/dist/chunk-STW24UBZ.js +0 -15697
- package/dist/chunk-SZMBOICG.js +0 -9623
- package/dist/chunk-T2LMBLZZ.js +0 -141
- package/dist/chunk-T2OTD6Q4.js +0 -916
- package/dist/chunk-T47G77BS.js +0 -66
- package/dist/chunk-T6LVKXOA.js +0 -129
- package/dist/chunk-TA77GVDI.js +0 -8991
- package/dist/chunk-TAP56GMB.js +0 -205
- package/dist/chunk-TAVRUR7B.js +0 -33
- package/dist/chunk-TM5ZDLBK.js +0 -650
- package/dist/chunk-TONJC7IG.js +0 -119
- package/dist/chunk-TQDDSAUB.js +0 -2155
- package/dist/chunk-TVBWFM3J.js +0 -3667
- package/dist/chunk-TVTSB2CC.js +0 -154
- package/dist/chunk-TYWPQ2PZ.js +0 -192
- package/dist/chunk-TZAMJD4S.js +0 -643
- package/dist/chunk-U7H3FT26.js +0 -193
- package/dist/chunk-UAYSX7EQ.js +0 -498
- package/dist/chunk-UJCLBPFX.js +0 -127
- package/dist/chunk-UQI5FSFT.js +0 -13
- package/dist/chunk-UQRJOE3L.js +0 -20
- package/dist/chunk-UVVDU6LY.js +0 -123
- package/dist/chunk-UWUYNFF4.js +0 -8254
- package/dist/chunk-VCKGW62M.js +0 -539
- package/dist/chunk-VG6VUZDZ.js +0 -1087
- package/dist/chunk-VTTNF3EM.js +0 -482
- package/dist/chunk-VYYMQGGU.js +0 -110
- package/dist/chunk-W6PMHAG6.js +0 -97
- package/dist/chunk-WAGVFGD4.js +0 -1108
- package/dist/chunk-WE7KTHMY.js +0 -267
- package/dist/chunk-WIWXIET7.js +0 -403
- package/dist/chunk-WJ2GWDJQ.js +0 -1063
- package/dist/chunk-WZ7ZP3OJ.js +0 -53
- package/dist/chunk-X5KHWQUT.js +0 -92
- package/dist/chunk-XEUWCZOJ.js +0 -115
- package/dist/chunk-XF4AI443.js +0 -19419
- package/dist/chunk-XFX757OH.js +0 -4933
- package/dist/chunk-XFXG23QS.js +0 -1133
- package/dist/chunk-XFZF2PJD.js +0 -61
- package/dist/chunk-XQJBZMHD.js +0 -2018
- package/dist/chunk-XXH7EUZD.js +0 -53
- package/dist/chunk-Y3VCYEME.js +0 -948
- package/dist/chunk-Y4ZWDBV2.js +0 -1041
- package/dist/chunk-Y57IJDBD.js +0 -2350
- package/dist/chunk-Y7NKKXMX.js +0 -527
- package/dist/chunk-YE3RJ4UF.js +0 -320
- package/dist/chunk-YFSW2X2Q.js +0 -5585
- package/dist/chunk-YH3KASXS.js +0 -96
- package/dist/chunk-YJAI74UZ.js +0 -2227
- package/dist/chunk-YJVL2BRM.js +0 -292
- package/dist/chunk-YK2EU5KA.js +0 -2170
- package/dist/chunk-YK7R6SM7.js +0 -1267
- package/dist/chunk-YSA3GBD6.js +0 -737
- package/dist/chunk-Z4Y56344.js +0 -342
- package/dist/chunk-ZA6RQ365.js +0 -47
- package/dist/chunk-ZABV5JUW.js +0 -521
- package/dist/chunk-ZAS2H4UN.js +0 -1429
- package/dist/chunk-ZBRAQYHO.js +0 -1102
- package/dist/chunk-ZDAZNRRJ.js +0 -151
- package/dist/chunk-ZKDOWP5F.js +0 -18
- package/dist/chunk-ZQXNQRKW.js +0 -306
- package/dist/chunk-ZU3BABSQ.js +0 -146
- package/dist/chunk-ZUMW6TFZ.js +0 -455
- package/dist/chunk-ZXN6QEGQ.js +0 -176
- package/dist/chunk-ZZFFR5QT.js +0 -90
- package/dist/chunk-ZZQM2AXO.js +0 -453
- package/dist/cli-utils-IUUYUL23.js +0 -31
- package/dist/cli-validation-3Y5CBVXR.js +0 -125
- package/dist/commit-utils-ZTUES23W.js +0 -50
- package/dist/compete-config-resolver-K5ZFIA7R.js +0 -126
- package/dist/compete-results-MRI2RBXO.js +0 -315
- package/dist/competition-outcome-tracker-EWNBAYGE.js +0 -63
- package/dist/config-5GEJLIHS.js +0 -237
- package/dist/config-VWMTFJA5.js +0 -46
- package/dist/config-audit-3ANEFCMF.js +0 -371
- package/dist/config-explain-PUQGDDQW.js +0 -71
- package/dist/config-loader-VGGXKEAR.js +0 -52
- package/dist/config-manager-5ZVIIEAM.js +0 -115
- package/dist/config-merger-GTK2LAMB.js +0 -14
- package/dist/config-validator-LWNDS4FZ.js +0 -123
- package/dist/cost-H4LZHVEG.js +0 -83
- package/dist/data-migration-state-IWTL2S75.js +0 -35
- package/dist/db-migrator-OGN6Z2AG.js +0 -34
- package/dist/default-paths-MKNRMMVV.js +0 -49
- package/dist/discovery-OIV7N6ZM.js +0 -53
- package/dist/doctor-2YLBWAOX.js +0 -268
- package/dist/doctor-context-blocks-UO7SG3NU.js +0 -233
- package/dist/doctor-instructions-import-FY5RLABK.js +0 -70
- package/dist/doctor-purpose-UY3UANLP.js +0 -30
- package/dist/domain-analyzer-QKIWVWWS.js +0 -48
- package/dist/ensure-initialized-IUDKZTD2.js +0 -76
- package/dist/error-parser-core-MZFMFANN.js +0 -70
- package/dist/evaluation-context-YPA6QNRG.js +0 -62
- package/dist/evidence-plan-resolver-C6G44Y35.js +0 -112
- package/dist/execution-data-writer-3OPHRWXQ.js +0 -78
- package/dist/execution-policy-applier-SFSYHJ64.js +0 -63
- package/dist/execution-preflight-WBMAWGLC.js +0 -224
- package/dist/execution-roles-WEOTECB5.js +0 -113
- package/dist/factory-TVHI7LIV.js +0 -207
- package/dist/flywheel-autoloop-executor-OOOKI63E.js +0 -307
- package/dist/flywheel-autoloop-unverified-PKNBV5DF.js +0 -37
- package/dist/flywheel-competition-executor-J6GVZDKT.js +0 -324
- package/dist/flywheel-executor-HUHV522T.js +0 -428
- package/dist/flywheel-git-isolation-HNYVZHAX.js +0 -50
- package/dist/flywheel-manifest-IMDPTLWY.js +0 -114
- package/dist/flywheel-model-defaults-JLQZOQE7.js +0 -116
- package/dist/flywheel-preflight-2NDK23MK.js +0 -173
- package/dist/flywheel-resume-OYOYKXOF.js +0 -96
- package/dist/flywheel-resume-execution-lease-WALKY6GR.js +0 -59
- package/dist/flywheel-safety-LQZE7Z6J.js +0 -19
- package/dist/flywheel-scope-decision-5XZ26YNX.js +0 -14
- package/dist/get-telemetry-logger-V2MGHWDR.js +0 -154
- package/dist/git-message-style-7F3U6S2E.js +0 -106
- package/dist/identity-HSTKXB4R.js +0 -25
- package/dist/index-query-6SECY5IF.js +0 -37
- package/dist/indexer-Q7NPA3F6.js +0 -44
- package/dist/init-DFMWM27C.js +0 -244
- package/dist/instructions-H5XNRNIH.js +0 -189
- package/dist/instructions-import-offer-CYIUSJPJ.js +0 -367
- package/dist/instructions-run-W2NQPO37.js +0 -116
- package/dist/interrupted-work-I3DUCAQC.js +0 -43
- package/dist/invoke-provider-auth-7ABM6LER.js +0 -38
- package/dist/lab-mode-QAKDCPGV.js +0 -44
- package/dist/linux-host-class-TBQ2S5CA.js +0 -31
- package/dist/llm-judge-executor-46KOVUAQ.js +0 -181
- package/dist/local-ci-config-QGMLX6MI.js +0 -51
- package/dist/local-executor-EWZJ3AIM.js +0 -282
- package/dist/logger-FWQ5DJ5J.js +0 -153
- package/dist/matrix-prompt-builder-BHLYTCPD.js +0 -537
- package/dist/merge-batch-F7LQY5HT.js +0 -323
- package/dist/merge-queue-LJ56HTT3.js +0 -127
- package/dist/merge-queue-trust-EF77O3F6.js +0 -21
- package/dist/metadata-5PME4NKN.js +0 -29
- package/dist/model-catalog-readiness-ZIASAOXQ.js +0 -204
- package/dist/model-invocations-db-JG452YT3.js +0 -70
- package/dist/model-resolver-TJQNYDKT.js +0 -215
- package/dist/model-resolver-ZPNOVV2T.js +0 -43
- package/dist/monitor-DZNOT4YL.js +0 -97
- package/dist/next-JQSH6MDJ.js +0 -98
- package/dist/next-TSFHAJX6.js +0 -151
- package/dist/opportunistic-CUH6SNNQ.js +0 -86
- package/dist/optimization-config-resolver-2XYSWZL5.js +0 -149
- package/dist/path-security-MXGK2DP5.js +0 -39
- package/dist/paths-VPYRA5OA.js +0 -37
- package/dist/plan-backlog-list-fast-MQXJPID4.js +0 -89
- package/dist/plan-backlog-show-fast-Y6TZYLIG.js +0 -112
- package/dist/plan-sprint-list-fast-2WRXKK3D.js +0 -109
- package/dist/plan-sprint-status-fast-U4YNAECG.js +0 -115
- package/dist/plan-task-status-fast-DKJWYRSW.js +0 -113
- package/dist/process-registry-IXGR4H5W.js +0 -28
- package/dist/process-scanner-T3GBV73O.js +0 -23
- package/dist/processes-RH6V3S3G.js +0 -29
- package/dist/processes-json-fast-AT7F4EZ6.js +0 -72
- package/dist/profile-GZGJF2ZT.js +0 -207
- package/dist/project-runtime-paths-QWSR4WA3.js +0 -41
- package/dist/provider-aware-resource-manager-X6ZKM37N.js +0 -39
- package/dist/provider-matrix-7FMEWDLS.js +0 -212
- package/dist/provider-output-forwarding-4EMU26RM.js +0 -26
- package/dist/provider-registry-N26MRRBF.js +0 -136
- package/dist/publication-turn-DH3G3PFO.js +0 -45
- package/dist/quality-gate-BO2TJQJY.js +0 -74
- package/dist/quickstart-BRJADHZS.js +0 -108
- package/dist/readiness-UO64EUJH.js +0 -215
- package/dist/readiness-VENBXEAE.js +0 -142
- package/dist/registry-SGSBDGXX.js +0 -215
- package/dist/repo-root-2X7E3ZDI.js +0 -28
- package/dist/resolution-engine-R6PSL7VO.js +0 -191
- package/dist/resolve-provider-cli-DIFMYCN6.js +0 -44
- package/dist/restore-telemetry-db-NQSD2TNE.js +0 -459
- package/dist/routing-events-KSNMBELI.js +0 -13
- package/dist/routing-history-store-AJSWAMNY.js +0 -47
- package/dist/routing-planner-7W2EA2FY.js +0 -218
- package/dist/runner-LZVKVDXG.js +0 -1201
- package/dist/runner-MNDHQ44A.js +0 -1809
- package/dist/safety-MN75ODFJ.js +0 -65
- package/dist/safety-stanza-CWYF7XKO.js +0 -49
- package/dist/sandbox-DLUK2MG4.js +0 -72
- package/dist/sandbox-ELRY4M2J.js +0 -80
- package/dist/setup-temp-cleanup-IBL5H7RE.js +0 -29
- package/dist/shared-utils-QT7VJ6SJ.js +0 -42
- package/dist/sprint-bridge-FNBAVD3Z.js +0 -117
- package/dist/sprint-completion-dependents-CRFEVAO7.js +0 -43
- package/dist/sprint-execution-service-XN27PXWK.js +0 -373
- package/dist/sprint-manager-NZ4FBS6Z.js +0 -133
- package/dist/sqlite-timeout-config-D2A7MCIQ.js +0 -13
- package/dist/sqlite-wrapper-CDFTT4FW.js +0 -19
- package/dist/stale-cleanup-orchestrator-6TDX3SJH.js +0 -71
- package/dist/storage-access-4PBODLIC.js +0 -31
- package/dist/store-JER6IA6W.js +0 -25
- package/dist/task-classifier-RVIQXTR7.js +0 -521
- package/dist/task-list-fast-32IFMIUP.js +0 -109
- package/dist/task-manager-SIUGB22A.js +0 -131
- package/dist/task-report-INARR6CG.js +0 -64
- package/dist/telemetry-XKOVBIU2.js +0 -197
- package/dist/telemetry-lab-scope-KTRP6ZIS.js +0 -31
- package/dist/telemetry-path-resolver-THWRQKSF.js +0 -34
- package/dist/telemetry-reliability-7KUQU727.js +0 -78
- package/dist/unified-state-cleanup-FRARWPCV.js +0 -292
- package/dist/universal-cost-calculator-KN2KHWOX.js +0 -70
- package/dist/user-agents-LVES6I5N.js +0 -30
- package/dist/variant-execution-L2O255ML.js +0 -317
- package/dist/variant-opt-parser-XHIIJOEQ.js +0 -248
- package/dist/variant-state-cleanup-QJIIRPS3.js +0 -287
- package/dist/variant-worker-GYKUY3TE.js +0 -4573
- package/dist/variants-FD3MZVQN.js +0 -262
- package/dist/verification-command-6HO365PA.js +0 -68
- package/dist/verify-commands-SYYVWMSJ.js +0 -68
- package/dist/work-edge-6LJRL65N.js +0 -50
- package/dist/worker-YNMJC4GB.js +0 -1528
- package/dist/workspace-tree-identity-EGQNGZC3.js +0 -53
- package/dist/worktree-environment-KYA25PEL.js +0 -65
- package/dist/worktree-metrics-33YN7IFM.js +0 -67
- package/dist/writeback-Q7T7I4S6.js +0 -51
|
@@ -0,0 +1,753 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveProviderPricingPath
|
|
3
|
+
} from "./chunk-PVJBTI7P.js";
|
|
4
|
+
import {
|
|
5
|
+
availableCostAmount,
|
|
6
|
+
billingSourceFromRow,
|
|
7
|
+
computeListPrice,
|
|
8
|
+
costAmountOrNull,
|
|
9
|
+
isAvailableCostAmount,
|
|
10
|
+
listPriceUsageFromRecord,
|
|
11
|
+
longContextFromRow,
|
|
12
|
+
pricingConfidenceFromRow,
|
|
13
|
+
pricingSourceFromRow,
|
|
14
|
+
rateCardFromModelPricing,
|
|
15
|
+
rateCardFromPricingRow,
|
|
16
|
+
resolvePassthroughPricing,
|
|
17
|
+
speedTiersFromRow,
|
|
18
|
+
unavailableCostAmount
|
|
19
|
+
} from "./chunk-ET3645ZR.js";
|
|
20
|
+
import {
|
|
21
|
+
ModelMetadataResolver
|
|
22
|
+
} from "./chunk-NOE2AC4Y.js";
|
|
23
|
+
import {
|
|
24
|
+
parseJsonWithContext
|
|
25
|
+
} from "./chunk-P6SSWAKY.js";
|
|
26
|
+
import {
|
|
27
|
+
ProviderRegistry
|
|
28
|
+
} from "./chunk-ONSRQNXK.js";
|
|
29
|
+
|
|
30
|
+
// src/cost-tracking/universal-cost-calculator.ts
|
|
31
|
+
import { readFileSync } from "fs";
|
|
32
|
+
|
|
33
|
+
// src/cost-tracking/unavailable-cost-breakdown.ts
|
|
34
|
+
function buildUnavailableCostBreakdown(input) {
|
|
35
|
+
const { provider, model, usage, pricingVersion, pricingError, originalModelId } = input;
|
|
36
|
+
return {
|
|
37
|
+
provider,
|
|
38
|
+
model,
|
|
39
|
+
originalModelId: originalModelId ?? model,
|
|
40
|
+
canonicalModelId: model,
|
|
41
|
+
// Component fields stay numeric zeros for structural shape only; they are
|
|
42
|
+
// not a claim that cost is known-zero. Read totalCostAmount for truth.
|
|
43
|
+
inputCost: 0,
|
|
44
|
+
outputCost: 0,
|
|
45
|
+
cacheCost: 0,
|
|
46
|
+
toolCosts: 0,
|
|
47
|
+
infrastructureCost: 0,
|
|
48
|
+
totalCost: 0,
|
|
49
|
+
// deprecated compatibility only; not known zero
|
|
50
|
+
totalCostAmount: unavailableCostAmount("usd", "pricing", pricingError),
|
|
51
|
+
currency: "USD",
|
|
52
|
+
usage,
|
|
53
|
+
pricingVersion,
|
|
54
|
+
billingMode: "metered",
|
|
55
|
+
pricingSource: "unavailable",
|
|
56
|
+
pricingConfidence: "low",
|
|
57
|
+
pricingStatus: "unavailable",
|
|
58
|
+
pricingError
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/cost-tracking/universal-cost-calculator.ts
|
|
63
|
+
function resolveAvailableTotalCostUsd(breakdown) {
|
|
64
|
+
if (!isAvailableCostAmount(breakdown.totalCostAmount)) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return costAmountOrNull(breakdown.totalCostAmount);
|
|
68
|
+
}
|
|
69
|
+
function isCostBreakdownUnavailable(breakdown) {
|
|
70
|
+
return breakdown.pricingStatus === "unavailable" || breakdown.totalCostAmount.status !== "available";
|
|
71
|
+
}
|
|
72
|
+
var TOKENS_PER_MILLION = 1e6;
|
|
73
|
+
var TOKENS_PER_THOUSAND = 1e3;
|
|
74
|
+
var PER_1K_TO_PER_1M = TOKENS_PER_MILLION / TOKENS_PER_THOUSAND;
|
|
75
|
+
var MAX_PLAUSIBLE_PER_MILLION_PRICE = 2e3;
|
|
76
|
+
function per1kToPerMillion(per1kValue, field) {
|
|
77
|
+
if (!Number.isFinite(per1kValue) || per1kValue < 0) {
|
|
78
|
+
throw new Error(
|
|
79
|
+
`Invalid per-1k cost for '${field}': expected a finite non-negative number, got ${per1kValue}.`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
const perMillion = per1kValue * PER_1K_TO_PER_1M;
|
|
83
|
+
if (perMillion > MAX_PLAUSIBLE_PER_MILLION_PRICE) {
|
|
84
|
+
throw new Error(
|
|
85
|
+
`Cost unit mismatch for '${field}': converting ${per1kValue} as a per-1,000-token price yields ${perMillion} per 1,000,000 tokens, which exceeds the plausibility ceiling of ${MAX_PLAUSIBLE_PER_MILLION_PRICE}. This is the signature of a 1000x unit-mixing error (an already-per-1M value placed in a per-1k field). Refusing to apply a ${PER_1K_TO_PER_1M}x conversion. Fix the provider pricing config so '${field}' is genuinely per-1,000-tokens.`
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
return perMillion;
|
|
89
|
+
}
|
|
90
|
+
var UniversalCostCalculator = class {
|
|
91
|
+
pricingVersion = "unknown";
|
|
92
|
+
logger;
|
|
93
|
+
dynamicPricingPath;
|
|
94
|
+
dynamicModelIndex = /* @__PURE__ */ new Map();
|
|
95
|
+
dynamicToolPricingIndex = /* @__PURE__ */ new Map();
|
|
96
|
+
_dynamicPricingManifest = null;
|
|
97
|
+
yamlPricingLoaded = false;
|
|
98
|
+
yamlPricingAvailable = /* @__PURE__ */ new Set();
|
|
99
|
+
// Track which providers have YAML pricing
|
|
100
|
+
constructor(logger, pricingPath) {
|
|
101
|
+
this.logger = logger;
|
|
102
|
+
this.dynamicPricingPath = pricingPath && pricingPath.trim().length > 0 ? pricingPath : resolveProviderPricingPath();
|
|
103
|
+
}
|
|
104
|
+
normalizeModelForProvider(provider, model) {
|
|
105
|
+
if (!model) return model;
|
|
106
|
+
const normalizedProvider = (provider || "").toLowerCase().trim();
|
|
107
|
+
const trimmedModel = model.trim();
|
|
108
|
+
const resolvedModel = ModelMetadataResolver.resolveModel(normalizedProvider, trimmedModel, {
|
|
109
|
+
allowFallback: true
|
|
110
|
+
});
|
|
111
|
+
if (resolvedModel && resolvedModel.matchType !== "fuzzy") {
|
|
112
|
+
return resolvedModel.modelId;
|
|
113
|
+
}
|
|
114
|
+
return trimmedModel;
|
|
115
|
+
}
|
|
116
|
+
resolvePricingProviderId(provider) {
|
|
117
|
+
const normalized = (provider || "").toLowerCase().trim();
|
|
118
|
+
if (!normalized) return provider;
|
|
119
|
+
if (this.yamlPricingAvailable.has(normalized)) {
|
|
120
|
+
return normalized;
|
|
121
|
+
}
|
|
122
|
+
try {
|
|
123
|
+
const registry = ProviderRegistry.load();
|
|
124
|
+
for (const [providerId, config] of Object.entries(registry.providers)) {
|
|
125
|
+
if ((providerId || "").toLowerCase() === normalized) {
|
|
126
|
+
return providerId;
|
|
127
|
+
}
|
|
128
|
+
if ((config.vendor || "").toLowerCase() === normalized) {
|
|
129
|
+
return providerId;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
} catch {
|
|
133
|
+
}
|
|
134
|
+
return provider;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Load and validate pricing configuration
|
|
138
|
+
* Version 2.0+: Loads from YAML (ProviderRegistry) and optional dynamic manifest.
|
|
139
|
+
*/
|
|
140
|
+
async loadPricingData() {
|
|
141
|
+
try {
|
|
142
|
+
const registry = ProviderRegistry.load();
|
|
143
|
+
this.pricingVersion = registry.version || "unknown";
|
|
144
|
+
this.yamlPricingLoaded = true;
|
|
145
|
+
this.yamlPricingAvailable.clear();
|
|
146
|
+
const allProviderIds = ProviderRegistry.getAllProviderIds();
|
|
147
|
+
for (const providerId of allProviderIds) {
|
|
148
|
+
const pricing = ProviderRegistry.getProviderPricing(providerId);
|
|
149
|
+
if (pricing) {
|
|
150
|
+
this.yamlPricingAvailable.add(providerId);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
this.logger.logCostEvent("yaml_pricing_loaded", {
|
|
154
|
+
source: "ProviderRegistry",
|
|
155
|
+
providers: Array.from(this.yamlPricingAvailable),
|
|
156
|
+
count: this.yamlPricingAvailable.size
|
|
157
|
+
});
|
|
158
|
+
} catch (error) {
|
|
159
|
+
this.yamlPricingLoaded = false;
|
|
160
|
+
this.logger.logCostEvent("yaml_pricing_error", {
|
|
161
|
+
error: error instanceof Error ? error.message : String(error)
|
|
162
|
+
});
|
|
163
|
+
throw new Error(
|
|
164
|
+
`Failed to load YAML pricing data: ${error instanceof Error ? error.message : String(error)}`
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
this.loadDynamicPricingManifest();
|
|
168
|
+
this.logger.logCostEvent("pricing_loaded", {
|
|
169
|
+
version: this.pricingVersion,
|
|
170
|
+
providers: this.getAvailableProviders(),
|
|
171
|
+
yamlAvailable: this.yamlPricingLoaded,
|
|
172
|
+
yamlProviders: Array.from(this.yamlPricingAvailable)
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
loadDynamicPricingManifest() {
|
|
176
|
+
try {
|
|
177
|
+
const raw = readFileSync(this.dynamicPricingPath, "utf-8");
|
|
178
|
+
const parsed = parseJsonWithContext(raw, "Dynamic pricing manifest");
|
|
179
|
+
this._dynamicPricingManifest = parsed;
|
|
180
|
+
this.rebuildDynamicPricingIndexes(parsed);
|
|
181
|
+
this.logger.logCostEvent("dynamic_pricing_loaded", {
|
|
182
|
+
path: this.dynamicPricingPath,
|
|
183
|
+
generatedAt: parsed.generatedAt,
|
|
184
|
+
providers: parsed.providers.length
|
|
185
|
+
});
|
|
186
|
+
} catch (error) {
|
|
187
|
+
const maybeErr = error;
|
|
188
|
+
if (maybeErr.code === "ENOENT") {
|
|
189
|
+
this._dynamicPricingManifest = null;
|
|
190
|
+
this.dynamicModelIndex.clear();
|
|
191
|
+
this.dynamicToolPricingIndex.clear();
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this._dynamicPricingManifest = null;
|
|
195
|
+
this.dynamicModelIndex.clear();
|
|
196
|
+
this.dynamicToolPricingIndex.clear();
|
|
197
|
+
this.logger.logCostEvent("dynamic_pricing_error", {
|
|
198
|
+
error: error instanceof Error ? error.message : String(error),
|
|
199
|
+
path: this.dynamicPricingPath
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
rebuildDynamicPricingIndexes(manifest) {
|
|
204
|
+
this.dynamicModelIndex.clear();
|
|
205
|
+
this.dynamicToolPricingIndex.clear();
|
|
206
|
+
for (const provider of manifest.providers) {
|
|
207
|
+
const modelMap = /* @__PURE__ */ new Map();
|
|
208
|
+
for (const model of provider.models) {
|
|
209
|
+
modelMap.set(model.modelId, model);
|
|
210
|
+
}
|
|
211
|
+
this.dynamicModelIndex.set(provider.providerId, modelMap);
|
|
212
|
+
this.dynamicToolPricingIndex.set(provider.providerId, provider.tools);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
applyDynamicPricing(provider, model, pricing) {
|
|
216
|
+
const providerModels = this.dynamicModelIndex.get(provider);
|
|
217
|
+
if (!providerModels) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const dynamicModel = providerModels.get(model);
|
|
221
|
+
if (!dynamicModel) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (typeof dynamicModel.promptPer1k === "number") {
|
|
225
|
+
pricing.inputTokens = per1kToPerMillion(dynamicModel.promptPer1k, "promptPer1k");
|
|
226
|
+
}
|
|
227
|
+
if (typeof dynamicModel.completionPer1k === "number") {
|
|
228
|
+
pricing.outputTokens = per1kToPerMillion(dynamicModel.completionPer1k, "completionPer1k");
|
|
229
|
+
}
|
|
230
|
+
if (typeof dynamicModel.cacheReadPer1k === "number") {
|
|
231
|
+
pricing.cacheRead = per1kToPerMillion(dynamicModel.cacheReadPer1k, "cacheReadPer1k");
|
|
232
|
+
}
|
|
233
|
+
if (typeof dynamicModel.cacheWritePer1k === "number") {
|
|
234
|
+
pricing.cacheWrite = per1kToPerMillion(dynamicModel.cacheWritePer1k, "cacheWritePer1k");
|
|
235
|
+
}
|
|
236
|
+
if (dynamicModel.currency) {
|
|
237
|
+
pricing.currency = dynamicModel.currency;
|
|
238
|
+
}
|
|
239
|
+
if (dynamicModel.unit) {
|
|
240
|
+
pricing.unit = dynamicModel.unit;
|
|
241
|
+
}
|
|
242
|
+
if (dynamicModel.billingMode) {
|
|
243
|
+
pricing.billingMode = dynamicModel.billingMode;
|
|
244
|
+
}
|
|
245
|
+
pricing.features = { ...pricing.features, ...dynamicModel.features };
|
|
246
|
+
pricing.billingSource = dynamicModel.billingSource ?? pricing.billingSource;
|
|
247
|
+
pricing.pricingSource = dynamicModel.pricingSource ?? "dynamic";
|
|
248
|
+
pricing.pricingConfidence = dynamicModel.pricingConfidence ?? "medium";
|
|
249
|
+
pricing.pricingProvider = provider;
|
|
250
|
+
pricing.pricingModel = model;
|
|
251
|
+
}
|
|
252
|
+
getModelPricingWithFallback(provider, model) {
|
|
253
|
+
try {
|
|
254
|
+
return this.getModelPricing(provider, model);
|
|
255
|
+
} catch (error) {
|
|
256
|
+
const providerModels = this.dynamicModelIndex.get(provider);
|
|
257
|
+
const dynamicModel = providerModels?.get(model);
|
|
258
|
+
if (dynamicModel) {
|
|
259
|
+
return {
|
|
260
|
+
inputTokens: per1kToPerMillion(dynamicModel.promptPer1k ?? 0, "promptPer1k"),
|
|
261
|
+
outputTokens: per1kToPerMillion(dynamicModel.completionPer1k ?? 0, "completionPer1k"),
|
|
262
|
+
cacheRead: typeof dynamicModel.cacheReadPer1k === "number" ? per1kToPerMillion(dynamicModel.cacheReadPer1k, "cacheReadPer1k") : void 0,
|
|
263
|
+
cacheWrite: typeof dynamicModel.cacheWritePer1k === "number" ? per1kToPerMillion(dynamicModel.cacheWritePer1k, "cacheWritePer1k") : void 0,
|
|
264
|
+
currency: dynamicModel.currency ?? "USD",
|
|
265
|
+
unit: dynamicModel.unit ?? "per_1M_tokens",
|
|
266
|
+
contextWindow: void 0,
|
|
267
|
+
features: dynamicModel.features ?? {},
|
|
268
|
+
billingMode: dynamicModel.billingMode ?? "metered",
|
|
269
|
+
billingSource: dynamicModel.billingSource,
|
|
270
|
+
pricingSource: dynamicModel.pricingSource ?? "dynamic",
|
|
271
|
+
pricingConfidence: dynamicModel.pricingConfidence ?? "medium",
|
|
272
|
+
pricingProvider: provider,
|
|
273
|
+
pricingModel: model
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
const passthrough = this.getPassthroughModelPricing(provider, model);
|
|
277
|
+
if (passthrough) {
|
|
278
|
+
return passthrough;
|
|
279
|
+
}
|
|
280
|
+
this.logger.logCostEvent("model_pricing_unavailable", {
|
|
281
|
+
provider,
|
|
282
|
+
model,
|
|
283
|
+
error: error instanceof Error ? error.message : String(error)
|
|
284
|
+
});
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
getPassthroughModelPricing(provider, model) {
|
|
289
|
+
const resolved = resolvePassthroughPricing(provider, model);
|
|
290
|
+
if (resolved.status !== "resolved") {
|
|
291
|
+
this.logger.logCostEvent("passthrough_pricing_unavailable", {
|
|
292
|
+
provider,
|
|
293
|
+
model,
|
|
294
|
+
reason: resolved.reason
|
|
295
|
+
});
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
inputTokens: Number(resolved.pricing.input_per_1m_tokens),
|
|
300
|
+
outputTokens: Number(resolved.pricing.output_per_1m_tokens),
|
|
301
|
+
cacheRead: resolved.pricing.cache_read_per_1m_tokens !== void 0 ? Number(resolved.pricing.cache_read_per_1m_tokens) : void 0,
|
|
302
|
+
cacheWrite: resolved.pricing.cache_write_per_1m_tokens !== void 0 ? Number(resolved.pricing.cache_write_per_1m_tokens) : void 0,
|
|
303
|
+
cacheWriteLong: resolved.pricing.cache_write_1h_per_1m_tokens !== void 0 ? Number(resolved.pricing.cache_write_1h_per_1m_tokens) : void 0,
|
|
304
|
+
currency: this.resolvePricingCurrency(resolved.provider),
|
|
305
|
+
unit: "per_1m_tokens",
|
|
306
|
+
declaresTokenRates: true,
|
|
307
|
+
contextWindow: resolved.pricing.context_window,
|
|
308
|
+
features: resolved.pricing.features ?? {},
|
|
309
|
+
billingMode: this.resolveCostBillingMode(resolved.provider),
|
|
310
|
+
// The maker reference stays the source; the route that reached it is recorded apart.
|
|
311
|
+
pricingSource: resolved.source,
|
|
312
|
+
resolutionRoute: `passthrough:${resolved.provider}/${resolved.model}`,
|
|
313
|
+
pricingConfidence: "medium",
|
|
314
|
+
// Long-context and speed tiers survive the passthrough hop.
|
|
315
|
+
longContextPricing: longContextFromRow(resolved.pricing.long_context_pricing),
|
|
316
|
+
speedTiers: speedTiersFromRow(resolved.pricing),
|
|
317
|
+
pricingNotes: resolved.pricing.notes,
|
|
318
|
+
routedSpeedTier: resolved.pricing.routed_speed_tier,
|
|
319
|
+
pricingProvider: resolved.provider,
|
|
320
|
+
pricingModel: resolved.model
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
resolvePricingCurrency(provider) {
|
|
324
|
+
try {
|
|
325
|
+
return ProviderRegistry.getProviderPricing(provider)?.currency ?? "USD";
|
|
326
|
+
} catch {
|
|
327
|
+
return "USD";
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
resolveCostBillingMode(provider) {
|
|
331
|
+
try {
|
|
332
|
+
const billingMode = ProviderRegistry.getProviderPricing(provider)?.billing_mode;
|
|
333
|
+
return billingMode === "metered" ? "metered" : "flat_rate";
|
|
334
|
+
} catch {
|
|
335
|
+
return "metered";
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Calculate cost breakdown for provider usage
|
|
340
|
+
*/
|
|
341
|
+
calculateCost(provider, model, usage) {
|
|
342
|
+
if (!this.yamlPricingLoaded || this.yamlPricingAvailable.size === 0) {
|
|
343
|
+
throw new Error("Pricing data not loaded. Call loadPricingData() first.");
|
|
344
|
+
}
|
|
345
|
+
const resolvedProvider = this.resolvePricingProviderId(provider);
|
|
346
|
+
const normalizedModel = this.normalizeModelForProvider(resolvedProvider, model);
|
|
347
|
+
const tools = usage.tools ?? [];
|
|
348
|
+
const pricing = this.getModelPricingWithFallback(resolvedProvider, normalizedModel);
|
|
349
|
+
if (!pricing) {
|
|
350
|
+
return buildUnavailableCostBreakdown({
|
|
351
|
+
provider: resolvedProvider,
|
|
352
|
+
model: normalizedModel,
|
|
353
|
+
usage: { ...usage, tools },
|
|
354
|
+
pricingVersion: this.pricingVersion,
|
|
355
|
+
pricingError: `Model ${normalizedModel} not found for provider ${resolvedProvider}`,
|
|
356
|
+
originalModelId: model
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
if (pricing.unpricedReason) {
|
|
360
|
+
return buildUnavailableCostBreakdown({
|
|
361
|
+
provider: resolvedProvider,
|
|
362
|
+
model: normalizedModel,
|
|
363
|
+
usage: { ...usage, tools },
|
|
364
|
+
pricingVersion: this.pricingVersion,
|
|
365
|
+
pricingError: `Model ${normalizedModel} is unpriced: ${pricing.unpricedReason}`,
|
|
366
|
+
originalModelId: model
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
this.applyDynamicPricing(resolvedProvider, normalizedModel, pricing);
|
|
370
|
+
const toolPricing = this.getToolPricing(resolvedProvider, tools);
|
|
371
|
+
const infrastructurePricing = this.getInfrastructurePricing(resolvedProvider);
|
|
372
|
+
let inputCost = 0;
|
|
373
|
+
let outputCost = 0;
|
|
374
|
+
let cacheCost = 0;
|
|
375
|
+
let listPrice;
|
|
376
|
+
if (pricing.billingMode === "metered" || pricing.declaresTokenRates) {
|
|
377
|
+
const cacheReadTokens = usage.cacheReadTokens ?? 0;
|
|
378
|
+
if (usage.cacheReadTokensIncludedInInput && cacheReadTokens > usage.inputTokens) {
|
|
379
|
+
throw new Error(
|
|
380
|
+
`Invalid inclusive cache usage: cacheReadTokens (${cacheReadTokens}) exceeds inputTokens (${usage.inputTokens}).`
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
listPrice = computeListPrice(
|
|
384
|
+
rateCardFromModelPricing(pricing),
|
|
385
|
+
listPriceUsageFromRecord(usage),
|
|
386
|
+
usage.speedTier,
|
|
387
|
+
{ speedBreakdown: usage.speedBreakdown, routed: pricing.routedSpeedTier }
|
|
388
|
+
);
|
|
389
|
+
inputCost = listPrice.inputUsd;
|
|
390
|
+
outputCost = listPrice.outputUsd;
|
|
391
|
+
cacheCost = listPrice.cacheUsd;
|
|
392
|
+
}
|
|
393
|
+
const toolCosts = this.calculateToolCosts(toolPricing, tools);
|
|
394
|
+
let infrastructureCost = 0;
|
|
395
|
+
if (usage.executionTimeMinutes && infrastructurePricing) {
|
|
396
|
+
infrastructureCost = usage.executionTimeMinutes * infrastructurePricing.costPerMinute;
|
|
397
|
+
}
|
|
398
|
+
const totalCost = inputCost + outputCost + cacheCost + toolCosts + infrastructureCost;
|
|
399
|
+
const pricingSource = pricing.pricingSource ?? "yaml";
|
|
400
|
+
return {
|
|
401
|
+
provider: resolvedProvider,
|
|
402
|
+
model: normalizedModel,
|
|
403
|
+
originalModelId: model,
|
|
404
|
+
canonicalModelId: pricing.pricingModel ?? normalizedModel,
|
|
405
|
+
inputCost,
|
|
406
|
+
outputCost,
|
|
407
|
+
cacheCost,
|
|
408
|
+
toolCosts,
|
|
409
|
+
infrastructureCost,
|
|
410
|
+
totalCost,
|
|
411
|
+
// deprecated compatibility mirror of available totalCostAmount
|
|
412
|
+
totalCostAmount: availableCostAmount(totalCost, "usd", pricingSource),
|
|
413
|
+
currency: pricing.currency,
|
|
414
|
+
usage,
|
|
415
|
+
pricingVersion: this.pricingVersion,
|
|
416
|
+
billingMode: pricing.billingMode,
|
|
417
|
+
billingSource: pricing.billingSource,
|
|
418
|
+
pricingSource,
|
|
419
|
+
...pricing.resolutionRoute ? { resolutionRoute: pricing.resolutionRoute } : {},
|
|
420
|
+
pricingConfidence: pricing.pricingConfidence ?? "high",
|
|
421
|
+
pricingStatus: "ok",
|
|
422
|
+
...listPrice ? { speedTier: listPrice.speedTier, longContextPremium: listPrice.longContextPremium } : {}
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Predict cost before execution
|
|
427
|
+
*/
|
|
428
|
+
predictCost(provider, model, estimatedTokens) {
|
|
429
|
+
const usage = {
|
|
430
|
+
inputTokens: estimatedTokens.input,
|
|
431
|
+
outputTokens: estimatedTokens.output,
|
|
432
|
+
...estimatedTokens.cacheRead === void 0 ? {} : { cacheReadTokens: estimatedTokens.cacheRead },
|
|
433
|
+
...estimatedTokens.cacheWrite === void 0 ? {} : { cacheWriteTokens: estimatedTokens.cacheWrite },
|
|
434
|
+
// A prediction prices one request, so long-context thresholds apply.
|
|
435
|
+
granularity: "request",
|
|
436
|
+
...estimatedTokens.speedTier ? { speedTier: estimatedTokens.speedTier } : {},
|
|
437
|
+
tools: (estimatedTokens.tools || []).map((tool) => ({
|
|
438
|
+
name: tool.name,
|
|
439
|
+
requests: tool.estimatedRequests
|
|
440
|
+
}))
|
|
441
|
+
};
|
|
442
|
+
return this.calculateCost(provider, model, usage);
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Get available providers from pricing data (YAML + XML)
|
|
446
|
+
*/
|
|
447
|
+
getAvailableProviders() {
|
|
448
|
+
this.ensurePricingLoadedSync();
|
|
449
|
+
const providers = new Set(this.yamlPricingAvailable);
|
|
450
|
+
if (this._dynamicPricingManifest) {
|
|
451
|
+
for (const provider of this._dynamicPricingManifest.providers) {
|
|
452
|
+
providers.add(provider.providerId);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
return Array.from(providers);
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Get available models for a provider (YAML + XML)
|
|
459
|
+
*/
|
|
460
|
+
getAvailableModels(provider) {
|
|
461
|
+
this.ensurePricingLoadedSync();
|
|
462
|
+
const resolvedProvider = this.resolvePricingProviderId(provider);
|
|
463
|
+
const models = /* @__PURE__ */ new Set();
|
|
464
|
+
if (this.yamlPricingLoaded && this.yamlPricingAvailable.has(resolvedProvider)) {
|
|
465
|
+
try {
|
|
466
|
+
const providerPricing = ProviderRegistry.getProviderPricing(resolvedProvider);
|
|
467
|
+
if (providerPricing?.models) {
|
|
468
|
+
for (const modelId of Object.keys(providerPricing.models)) {
|
|
469
|
+
models.add(modelId);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
} catch (error) {
|
|
473
|
+
this.logger.logCostEvent("yaml_models_query_error", {
|
|
474
|
+
provider,
|
|
475
|
+
error: error instanceof Error ? error.message : String(error)
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (this._dynamicPricingManifest) {
|
|
480
|
+
const resolvedLower = resolvedProvider.toLowerCase();
|
|
481
|
+
const providerEntry = this._dynamicPricingManifest.providers.find(
|
|
482
|
+
(p) => p.providerId === resolvedProvider || p.providerId.toLowerCase() === resolvedLower
|
|
483
|
+
);
|
|
484
|
+
if (providerEntry) {
|
|
485
|
+
for (const model of providerEntry.models) {
|
|
486
|
+
models.add(model.modelId);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return Array.from(models);
|
|
491
|
+
}
|
|
492
|
+
getProviderPricingAvailability(provider) {
|
|
493
|
+
this.ensurePricingLoadedSync();
|
|
494
|
+
const resolvedProvider = this.resolvePricingProviderId(provider);
|
|
495
|
+
try {
|
|
496
|
+
const config = ProviderRegistry.getProviderConfig(resolvedProvider);
|
|
497
|
+
const pricing = ProviderRegistry.getProviderPricing(resolvedProvider);
|
|
498
|
+
const catalogModels = config.models?.available ?? [];
|
|
499
|
+
const pricingModels = pricing?.models ?? {};
|
|
500
|
+
return {
|
|
501
|
+
providerId: resolvedProvider,
|
|
502
|
+
billingMode: this.resolveCostBillingMode(resolvedProvider),
|
|
503
|
+
hasModelCatalog: catalogModels.length > 0,
|
|
504
|
+
hasTokenPricing: Object.keys(pricingModels).length > 0
|
|
505
|
+
};
|
|
506
|
+
} catch (error) {
|
|
507
|
+
this.logger.logCostEvent("provider_pricing_profile_unavailable", {
|
|
508
|
+
provider,
|
|
509
|
+
error: error instanceof Error ? error.message : String(error)
|
|
510
|
+
});
|
|
511
|
+
return {
|
|
512
|
+
providerId: resolvedProvider,
|
|
513
|
+
billingMode: "metered",
|
|
514
|
+
hasModelCatalog: false,
|
|
515
|
+
hasTokenPricing: false
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Check if a feature is supported
|
|
521
|
+
*/
|
|
522
|
+
isFeatureSupported(provider, model, feature) {
|
|
523
|
+
const resolvedProvider = this.resolvePricingProviderId(provider);
|
|
524
|
+
const normalizedModel = this.normalizeModelForProvider(resolvedProvider, model);
|
|
525
|
+
const pricing = this.getModelPricingWithFallback(resolvedProvider, normalizedModel);
|
|
526
|
+
if (!pricing) {
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
this.applyDynamicPricing(resolvedProvider, normalizedModel, pricing);
|
|
530
|
+
return pricing.features[feature] || false;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Get the dynamic pricing manifest (for debugging/introspection)
|
|
534
|
+
*/
|
|
535
|
+
getDynamicPricingManifest() {
|
|
536
|
+
return this._dynamicPricingManifest;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Get model pricing from YAML (ProviderRegistry)
|
|
540
|
+
* Returns null if not available in YAML
|
|
541
|
+
*/
|
|
542
|
+
getModelPricingFromYaml(provider, model) {
|
|
543
|
+
if (!this.yamlPricingLoaded || !this.yamlPricingAvailable.has(provider)) {
|
|
544
|
+
return null;
|
|
545
|
+
}
|
|
546
|
+
try {
|
|
547
|
+
const resolvedPricing = ModelMetadataResolver.getPricing(provider, model);
|
|
548
|
+
if (!resolvedPricing) {
|
|
549
|
+
return null;
|
|
550
|
+
}
|
|
551
|
+
const yamlPricing = resolvedPricing.modelPricing;
|
|
552
|
+
const providerPricing = resolvedPricing.providerPricing;
|
|
553
|
+
const inputTokens = yamlPricing.input_per_1m_tokens !== void 0 ? yamlPricing.input_per_1m_tokens : yamlPricing.input_per_1k_tokens !== void 0 ? per1kToPerMillion(yamlPricing.input_per_1k_tokens, "input_per_1k_tokens") : 0;
|
|
554
|
+
const outputTokens = yamlPricing.output_per_1m_tokens !== void 0 ? yamlPricing.output_per_1m_tokens : yamlPricing.output_per_1k_tokens !== void 0 ? per1kToPerMillion(yamlPricing.output_per_1k_tokens, "output_per_1k_tokens") : 0;
|
|
555
|
+
const currency = providerPricing?.currency || "USD";
|
|
556
|
+
const unit = yamlPricing.input_per_1m_tokens !== void 0 || yamlPricing.output_per_1m_tokens !== void 0 ? "per_1m_tokens" : "per_1k_tokens";
|
|
557
|
+
return {
|
|
558
|
+
inputTokens,
|
|
559
|
+
outputTokens,
|
|
560
|
+
cacheRead: yamlPricing.cache_read_per_1m_tokens,
|
|
561
|
+
cacheWrite: yamlPricing.cache_write_per_1m_tokens,
|
|
562
|
+
cacheWriteLong: yamlPricing.cache_write_1h_per_1m_tokens,
|
|
563
|
+
currency,
|
|
564
|
+
unit,
|
|
565
|
+
contextWindow: yamlPricing.context_window,
|
|
566
|
+
declaresTokenRates: rateCardFromPricingRow(yamlPricing) !== void 0,
|
|
567
|
+
features: yamlPricing.features || {},
|
|
568
|
+
billingMode: billingSourceFromRow(yamlPricing) === "api_list_price" ? "metered" : this.resolveCostBillingMode(resolvedPricing.resolvedModel.provider),
|
|
569
|
+
billingSource: billingSourceFromRow(yamlPricing),
|
|
570
|
+
pricingSource: pricingSourceFromRow(yamlPricing) ?? "yaml",
|
|
571
|
+
pricingConfidence: pricingConfidenceFromRow(yamlPricing) ?? "high",
|
|
572
|
+
pricingNotes: yamlPricing.notes,
|
|
573
|
+
...yamlPricing.unpriced_reason ? { unpricedReason: yamlPricing.unpriced_reason } : {},
|
|
574
|
+
pricingProvider: resolvedPricing.resolvedModel.provider,
|
|
575
|
+
pricingModel: resolvedPricing.resolvedModel.modelId,
|
|
576
|
+
...yamlPricing.long_context_pricing ? { longContextPricing: longContextFromRow(yamlPricing.long_context_pricing) } : {},
|
|
577
|
+
...yamlPricing.speed_tiers ? { speedTiers: speedTiersFromRow(yamlPricing) } : {}
|
|
578
|
+
};
|
|
579
|
+
} catch (error) {
|
|
580
|
+
this.logger.logCostEvent("yaml_model_pricing_error", {
|
|
581
|
+
provider,
|
|
582
|
+
model,
|
|
583
|
+
error: error instanceof Error ? error.message : String(error)
|
|
584
|
+
});
|
|
585
|
+
return null;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
getModelPricing(provider, model) {
|
|
589
|
+
const yamlPricing = this.getModelPricingFromYaml(provider, model);
|
|
590
|
+
if (yamlPricing) {
|
|
591
|
+
this.logger.logCostEvent("pricing_source", {
|
|
592
|
+
provider,
|
|
593
|
+
model,
|
|
594
|
+
source: yamlPricing.pricingSource ?? "yaml"
|
|
595
|
+
});
|
|
596
|
+
return yamlPricing;
|
|
597
|
+
}
|
|
598
|
+
throw new Error(`Model ${model} not found for provider ${provider}`);
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Get tool pricing from YAML (ProviderRegistry)
|
|
602
|
+
* Returns empty object if not available in YAML
|
|
603
|
+
*/
|
|
604
|
+
getToolPricingFromYaml(provider, tools) {
|
|
605
|
+
const pricing = {};
|
|
606
|
+
if (!this.yamlPricingLoaded || !this.yamlPricingAvailable.has(provider)) {
|
|
607
|
+
return pricing;
|
|
608
|
+
}
|
|
609
|
+
try {
|
|
610
|
+
const providerPricing = ProviderRegistry.getProviderPricing(provider);
|
|
611
|
+
if (!providerPricing || !providerPricing.tools) {
|
|
612
|
+
return pricing;
|
|
613
|
+
}
|
|
614
|
+
const yamlTools = providerPricing.tools;
|
|
615
|
+
for (const tool of tools) {
|
|
616
|
+
let yamlTool = yamlTools[tool.name];
|
|
617
|
+
if (!yamlTool) {
|
|
618
|
+
const camelCaseName = tool.name.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
619
|
+
yamlTool = yamlTools[camelCaseName];
|
|
620
|
+
}
|
|
621
|
+
if (yamlTool) {
|
|
622
|
+
pricing[tool.name] = {
|
|
623
|
+
costPerRequest: yamlTool.cost_per_request,
|
|
624
|
+
costPerRead: yamlTool.cost_per_read_1m_tokens,
|
|
625
|
+
costPerWrite: yamlTool.cost_per_write_1m_tokens,
|
|
626
|
+
unit: yamlTool.unit || "request",
|
|
627
|
+
notes: yamlTool.notes,
|
|
628
|
+
availableIn: yamlTool.available_in?.join(",")
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
} catch (error) {
|
|
633
|
+
this.logger.logCostEvent("yaml_tool_pricing_error", {
|
|
634
|
+
provider,
|
|
635
|
+
error: error instanceof Error ? error.message : String(error)
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
return pricing;
|
|
639
|
+
}
|
|
640
|
+
getToolPricing(provider, tools) {
|
|
641
|
+
const yamlPricing = this.getToolPricingFromYaml(provider, tools);
|
|
642
|
+
if (Object.keys(yamlPricing).length > 0) {
|
|
643
|
+
this.logger.logCostEvent("tool_pricing_source", {
|
|
644
|
+
provider,
|
|
645
|
+
toolCount: Object.keys(yamlPricing).length,
|
|
646
|
+
source: "yaml"
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
const pricing = { ...yamlPricing };
|
|
650
|
+
const dynamicTools = this.dynamicToolPricingIndex.get(provider);
|
|
651
|
+
for (const tool of tools) {
|
|
652
|
+
if (pricing[tool.name]) {
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
655
|
+
const dynamic = dynamicTools?.[tool.name];
|
|
656
|
+
if (dynamic) {
|
|
657
|
+
pricing[tool.name] = {
|
|
658
|
+
costPerRequest: dynamic.costPerRequest,
|
|
659
|
+
costPerRead: dynamic.costPerRead,
|
|
660
|
+
costPerWrite: dynamic.costPerWrite,
|
|
661
|
+
unit: dynamic.unit ?? "request",
|
|
662
|
+
notes: dynamic.notes,
|
|
663
|
+
availableIn: void 0
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return pricing;
|
|
668
|
+
}
|
|
669
|
+
getInfrastructurePricing(provider) {
|
|
670
|
+
if (this.yamlPricingLoaded && this.yamlPricingAvailable.has(provider)) {
|
|
671
|
+
try {
|
|
672
|
+
const providerPricing = ProviderRegistry.getProviderPricing(provider);
|
|
673
|
+
if (providerPricing?.infrastructure) {
|
|
674
|
+
const infraCost = providerPricing.infrastructure.premium_execution_per_minute;
|
|
675
|
+
if (infraCost !== void 0) {
|
|
676
|
+
return { costPerMinute: infraCost };
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
} catch (error) {
|
|
680
|
+
this.logger.logCostEvent("yaml_infrastructure_pricing_error", {
|
|
681
|
+
provider,
|
|
682
|
+
error: error instanceof Error ? error.message : String(error)
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
return null;
|
|
687
|
+
}
|
|
688
|
+
calculateToolCosts(toolPricing, tools) {
|
|
689
|
+
let totalCost = 0;
|
|
690
|
+
for (const tool of tools) {
|
|
691
|
+
const pricing = toolPricing[tool.name];
|
|
692
|
+
if (!pricing) continue;
|
|
693
|
+
if (pricing.costPerRequest) {
|
|
694
|
+
totalCost += tool.requests * pricing.costPerRequest;
|
|
695
|
+
}
|
|
696
|
+
if (tool.tokens) {
|
|
697
|
+
const tokenUnits = tool.tokens / 1e6;
|
|
698
|
+
const hasReadPricing = typeof pricing.costPerRead === "number";
|
|
699
|
+
const hasWritePricing = typeof pricing.costPerWrite === "number";
|
|
700
|
+
if (hasReadPricing && hasWritePricing) {
|
|
701
|
+
totalCost += tokenUnits * Math.max(pricing.costPerWrite ?? 0, pricing.costPerRead ?? 0);
|
|
702
|
+
} else if (hasReadPricing) {
|
|
703
|
+
totalCost += tokenUnits * (pricing.costPerRead ?? 0);
|
|
704
|
+
} else if (hasWritePricing) {
|
|
705
|
+
totalCost += tokenUnits * (pricing.costPerWrite ?? 0);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return totalCost;
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Synchronously load pricing data (for test usage)
|
|
713
|
+
*/
|
|
714
|
+
ensurePricingLoadedSync() {
|
|
715
|
+
if (this.yamlPricingLoaded) {
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
try {
|
|
719
|
+
const registry = ProviderRegistry.load();
|
|
720
|
+
this.pricingVersion = registry.version || this.pricingVersion;
|
|
721
|
+
this.yamlPricingLoaded = true;
|
|
722
|
+
const allProviderIds = ProviderRegistry.getAllProviderIds();
|
|
723
|
+
for (const providerId of allProviderIds) {
|
|
724
|
+
const pricing = ProviderRegistry.getProviderPricing(providerId);
|
|
725
|
+
if (pricing) {
|
|
726
|
+
this.yamlPricingAvailable.add(providerId);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
if (!this._dynamicPricingManifest) {
|
|
730
|
+
this.loadDynamicPricingManifest();
|
|
731
|
+
}
|
|
732
|
+
this.logger.logCostEvent("yaml_pricing_loaded_sync", {
|
|
733
|
+
source: "ProviderRegistry",
|
|
734
|
+
providers: Array.from(this.yamlPricingAvailable),
|
|
735
|
+
count: this.yamlPricingAvailable.size
|
|
736
|
+
});
|
|
737
|
+
} catch (error) {
|
|
738
|
+
this.logger.logCostEvent("yaml_pricing_sync_error", {
|
|
739
|
+
error: error instanceof Error ? error.message : String(error)
|
|
740
|
+
});
|
|
741
|
+
throw new Error(`Failed to load pricing data synchronously: ${error}`);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
export {
|
|
747
|
+
resolveAvailableTotalCostUsd,
|
|
748
|
+
isCostBreakdownUnavailable,
|
|
749
|
+
MAX_PLAUSIBLE_PER_MILLION_PRICE,
|
|
750
|
+
per1kToPerMillion,
|
|
751
|
+
UniversalCostCalculator
|
|
752
|
+
};
|
|
753
|
+
//# sourceMappingURL=chunk-5YTEPJJ6.js.map
|