@iowarp/clio-coder 0.4.4 → 0.4.5
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/CHANGELOG.md +92 -2
- package/CONTRIBUTING.md +25 -15
- package/README.md +340 -27
- package/dist/{acp-WNAYYF4F.js → acp-H3CU2HBQ.js} +25 -24
- package/dist/{agents-3OKXHLOI.js → agents-IXQQZ7BD.js} +77 -77
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-VKNNMGPU.js → auth-R7KYF7N3.js} +38 -38
- package/dist/builtins-CRFDQUVP.js +22 -0
- package/dist/{chunk-TQAHXW6Y.js → chunk-22PQ4TX4.js} +4 -4
- package/dist/{chunk-NEDJ26B5.js → chunk-2GPGAE5W.js} +6 -51
- package/dist/{chunk-IKCO5N3L.js → chunk-2QPI3TR3.js} +3 -3
- package/dist/{chunk-HRQMFLJP.js → chunk-32KJPXAM.js} +6 -6
- package/dist/{chunk-65DEGPJ6.js → chunk-3A3CUMKA.js} +6 -4
- package/dist/{chunk-JCI2ROMZ.js → chunk-3T4DXWP6.js} +7 -7
- package/dist/{chunk-DR52UMZW.js → chunk-3UW3KU4A.js} +2 -2
- package/dist/{chunk-6Q3CYFD3.js → chunk-4SVIVOMC.js} +184 -33
- package/dist/{chunk-W54I7H25.js → chunk-5A6XR3RJ.js} +44 -19
- package/dist/{chunk-YPC6ZR5L.js → chunk-5CMARGPF.js} +119 -5
- package/dist/{chunk-KXDSS5WJ.js → chunk-5CY4Q6QI.js} +4 -4
- package/dist/{chunk-I2DWJ4GM.js → chunk-5DDOTTG4.js} +54 -42
- package/dist/{chunk-D4CJV46V.js → chunk-5GZICIYO.js} +3 -3
- package/dist/{chunk-4IUZQIJ3.js → chunk-5PHVPU4G.js} +2 -2
- package/dist/{chunk-3ODX73FK.js → chunk-5VTJP36Q.js} +4 -4
- package/dist/{chunk-54X7T7DK.js → chunk-5ZMXGW7P.js} +79 -7
- package/dist/chunk-5ZSZEYJK.js +119 -0
- package/dist/{chunk-IXIY2H4R.js → chunk-633EXGZA.js} +5 -5
- package/dist/{chunk-CUSRQKPU.js → chunk-6CDNRHWH.js} +299 -89
- package/dist/{chunk-EBY63B7G.js → chunk-6EXUUOSN.js} +2 -2
- package/dist/{chunk-SVNXH4L2.js → chunk-6ICZKDUC.js} +2 -2
- package/dist/{chunk-JEIYHLOR.js → chunk-6SYEGZI3.js} +12 -12
- package/dist/{chunk-DQOVN6KV.js → chunk-6YA46L5A.js} +4 -4
- package/dist/{chunk-NZMNUPZZ.js → chunk-77CZRFTE.js} +3 -3
- package/dist/{chunk-6PAZTBPA.js → chunk-7HBHHVCK.js} +15 -6
- package/dist/{chunk-25QBEXRS.js → chunk-7TKWWPD7.js} +5 -4
- package/dist/{chunk-2VTFPG5O.js → chunk-7WLRF2U5.js} +2 -2
- package/dist/chunk-7WUZEB2M.js +165 -0
- package/dist/{chunk-3UUXNFEX.js → chunk-7YJWEF2L.js} +61 -34
- package/dist/{chunk-3EBYEESD.js → chunk-A46ILRS2.js} +5 -5
- package/dist/{chunk-UOIZ7DA4.js → chunk-AP7HDJOP.js} +2 -2
- package/dist/{chunk-APJ265NV.js → chunk-B5GGDIHT.js} +146 -146
- package/dist/{chunk-PMZVFWSR.js → chunk-B5ZTR6KZ.js} +2 -2
- package/dist/{chunk-I5FWO7L5.js → chunk-B6UM3OZC.js} +2 -2
- package/dist/{chunk-2CU2H6KE.js → chunk-BBV5TKE6.js} +5 -5
- package/dist/{chunk-4O6MANBS.js → chunk-BS4GAMUB.js} +14 -10
- package/dist/{chunk-S66XZJOF.js → chunk-C27U2TYG.js} +2 -2
- package/dist/{chunk-QZWQA4DE.js → chunk-CBSKDFWL.js} +3 -3
- package/dist/{chunk-2LEAKD4C.js → chunk-CKK25WN3.js} +3 -3
- package/dist/{chunk-BYP5D4HI.js → chunk-CTTI7G3T.js} +2 -2
- package/dist/{chunk-XAKHZX5N.js → chunk-CVDAFGPW.js} +4 -4
- package/dist/{chunk-RKKLTLYB.js → chunk-CXQ37WJH.js} +3 -3
- package/dist/{chunk-GTUD2WMY.js → chunk-DBREN25X.js} +44 -9
- package/dist/{chunk-YNFKXPEC.js → chunk-DIMRLNIC.js} +35 -66
- package/dist/{chunk-NDDGJUXD.js → chunk-DNCE23JJ.js} +2 -2
- package/dist/{chunk-HVDIIIQW.js → chunk-DNHVRBH4.js} +3 -3
- package/dist/{chunk-XULDXHTN.js → chunk-DRD2A54W.js} +102 -50
- package/dist/{chunk-D7E7WCDF.js → chunk-DVNAPPXU.js} +2 -2
- package/dist/{chunk-YXLYO42X.js → chunk-DXVMLM3Z.js} +3 -2
- package/dist/{chunk-5MEZN6CB.js → chunk-DZK63TZJ.js} +6 -6
- package/dist/{chunk-IGLP3ODT.js → chunk-E3BQTQUP.js} +15 -15
- package/dist/{chunk-IWHMRKLL.js → chunk-E3LEPLQ2.js} +2 -2
- package/dist/{chunk-3R73A4XB.js → chunk-ECBHH7LU.js} +3 -3
- package/dist/chunk-ECOMVOHP.js +139 -0
- package/dist/chunk-EFSEIZE6.js +56 -0
- package/dist/{chunk-FEAXX7B6.js → chunk-EHCPSZJF.js} +4 -4
- package/dist/{chunk-4NSRCOYP.js → chunk-EHOSNVVM.js} +3 -2
- package/dist/{chunk-7UGL4MB5.js → chunk-EQEJJ53P.js} +10 -10
- package/dist/{chunk-GWZNEVM2.js → chunk-EWD5P3GK.js} +9 -9
- package/dist/{chunk-6UINWWS6.js → chunk-F34AR6O3.js} +14 -14
- package/dist/{chunk-GHS5EBTQ.js → chunk-FKIOX6DS.js} +29 -20
- package/dist/{chunk-HAXOFFRH.js → chunk-FQOOGXBH.js} +7 -7
- package/dist/{chunk-Y55JBDO5.js → chunk-FSTIBAGM.js} +38 -23
- package/dist/{chunk-ZTJUVLTU.js → chunk-FXFVDPWY.js} +2 -2
- package/dist/{chunk-XPLRXC72.js → chunk-GD55RTIW.js} +3 -3
- package/dist/{chunk-5B2AEOW5.js → chunk-GH5ZR6JP.js} +472 -472
- package/dist/{chunk-TOIVGRUX.js → chunk-GJ24ODAX.js} +5 -5
- package/dist/{chunk-QUFRYSWI.js → chunk-GNQRWTMY.js} +129 -48
- package/dist/{chunk-5ICU3EUH.js → chunk-GVYWZNRK.js} +5 -5
- package/dist/{chunk-GX5WYQO4.js → chunk-GXCCHKN6.js} +6 -6
- package/dist/{chunk-K6T2ZAMZ.js → chunk-HGSLRG33.js} +6 -6
- package/dist/{chunk-26QSH3EJ.js → chunk-HHVJNVUJ.js} +5 -5
- package/dist/{chunk-F4EKGO4N.js → chunk-HL26ADLH.js} +4 -2
- package/dist/{chunk-JT2RFCC5.js → chunk-HR3HPQ76.js} +5 -5
- package/dist/{chunk-ID64D7PE.js → chunk-HXHFDHB6.js} +24 -24
- package/dist/{chunk-ELWDPP3Y.js → chunk-I7VLWRK2.js} +8 -8
- package/dist/{chunk-6OSVSQL5.js → chunk-ICO4TQ2F.js} +7 -5
- package/dist/{chunk-SZAA6XDG.js → chunk-IFDRAD6F.js} +2 -2
- package/dist/{chunk-72YIHOZQ.js → chunk-ILJ7DWGE.js} +9 -9
- package/dist/{chunk-2JH2WHGE.js → chunk-J2FYEQ5L.js} +4 -4
- package/dist/{chunk-BMS5RKQY.js → chunk-JABWPKFY.js} +3 -3
- package/dist/{chunk-QDC3K2U3.js → chunk-K2BLQC5E.js} +3 -3
- package/dist/{chunk-AUPNRN7C.js → chunk-K2HL3GBL.js} +4 -4
- package/dist/{chunk-2ASED4PZ.js → chunk-K6RDB7IA.js} +26 -26
- package/dist/{chunk-FFUPXJC4.js → chunk-KDWLXVMN.js} +23 -24
- package/dist/{chunk-OZNBF4L3.js → chunk-KECNXMDE.js} +2 -2
- package/dist/{chunk-6QOTUPRG.js → chunk-KF6GFW6O.js} +66 -18
- package/dist/{chunk-BTK3SSSK.js → chunk-KMF54VH3.js} +2 -2
- package/dist/chunk-KPRLAMP4.js +32 -0
- package/dist/{chunk-ECH6PKUQ.js → chunk-KQ6IDQIB.js} +2 -2
- package/dist/{chunk-3UNOLWNZ.js → chunk-KTFSFCVN.js} +20 -9
- package/dist/{chunk-57XXR6DR.js → chunk-KYKNBD4Y.js} +24 -23
- package/dist/{chunk-IRXAATOX.js → chunk-L4N3DWNW.js} +3 -3
- package/dist/{chunk-LCGCVYZ4.js → chunk-LQTKDAUO.js} +2 -2
- package/dist/{chunk-U6TMQNSI.js → chunk-LTR5QCLS.js} +4 -4
- package/dist/chunk-LUL5Z66S.js +221 -0
- package/dist/{chunk-ELZVTCGV.js → chunk-LVFANMOH.js} +151 -327
- package/dist/{chunk-H7IXIC72.js → chunk-LY4N4TTL.js} +17 -3
- package/dist/{chunk-VKPAQYEB.js → chunk-LZBMXNLP.js} +5 -5
- package/dist/{chunk-UL3WSD3F.js → chunk-M4KFUXS7.js} +2 -2
- package/dist/{chunk-NXYCB2VD.js → chunk-M6TAYK66.js} +6 -6
- package/dist/{chunk-NEKRRTYW.js → chunk-MC3JSVR6.js} +2 -2
- package/dist/{chunk-CFGTUFWB.js → chunk-MCJKEGHO.js} +2 -2
- package/dist/{chunk-DXKJURES.js → chunk-MDU3C27C.js} +10 -7
- package/dist/{chunk-6XLNIQDB.js → chunk-MYI32N4R.js} +2 -2
- package/dist/{chunk-3GY4F45V.js → chunk-NC4KV7EL.js} +6 -6
- package/dist/{chunk-LLXSDWXS.js → chunk-NF3BK5WR.js} +5 -5
- package/dist/chunk-NTK3WTHM.js +141 -0
- package/dist/{chunk-GYV6VZOC.js → chunk-NTTS3O53.js} +2 -2
- package/dist/{chunk-RZDWV63N.js → chunk-NY6IWDVU.js} +6 -6
- package/dist/{chunk-XXYSBZIQ.js → chunk-O2RQ7LCK.js} +4 -4
- package/dist/{chunk-4BJ5BYCE.js → chunk-O3VV6IVK.js} +2 -2
- package/dist/{chunk-W6GROXXM.js → chunk-O5F25NIE.js} +2 -2
- package/dist/{chunk-NXIMQY5W.js → chunk-ODUTYZIU.js} +5 -5
- package/dist/{chunk-LTIKRKFL.js → chunk-ONRTXOZY.js} +4 -4
- package/dist/{chunk-KFV5L5SK.js → chunk-OQM5IVJY.js} +118 -232
- package/dist/{chunk-XRZT5WY5.js → chunk-P5SC4DLJ.js} +4 -4
- package/dist/{chunk-R6Q67RJH.js → chunk-PECBKCDK.js} +34 -6
- package/dist/{chunk-33YXPOE3.js → chunk-PPEZJWUG.js} +2 -2
- package/dist/{chunk-RXTN6AKH.js → chunk-PWWSIB2A.js} +5 -5
- package/dist/{chunk-2STGEDFV.js → chunk-QEQISF75.js} +2 -2
- package/dist/{chunk-3DPEIQKN.js → chunk-QH3ZTUOA.js} +2 -2
- package/dist/{chunk-YAKGTXEV.js → chunk-QRFXEO6Y.js} +2 -2
- package/dist/{chunk-35MSIRKH.js → chunk-QUIJZSDW.js} +2 -2
- package/dist/{chunk-HHV2GANA.js → chunk-R2P2U3ZS.js} +2 -2
- package/dist/{chunk-2DSOYNFC.js → chunk-R6MAYTMS.js} +7 -7
- package/dist/{chunk-JQLNNIKT.js → chunk-R6MICQYU.js} +6 -6
- package/dist/{chunk-NAI6ZFCY.js → chunk-RLTT5GVY.js} +122 -11
- package/dist/{chunk-DT3LWJOB.js → chunk-RXIOCVBZ.js} +24 -6
- package/dist/{chunk-N56KALIC.js → chunk-S32UQ5GL.js} +61 -34
- package/dist/{chunk-UEPWCCTY.js → chunk-SBZX6ARC.js} +12 -12
- package/dist/chunk-SD7SHNDW.js +15 -0
- package/dist/{chunk-NRO2BJRH.js → chunk-SDWNDICN.js} +10235 -4015
- package/dist/{chunk-UXCU4E3T.js → chunk-SE4ZKILO.js} +6 -6
- package/dist/chunk-SL2RDHKO.js +19 -0
- package/dist/{chunk-NUGM5KR6.js → chunk-SRCEQKQS.js} +2 -2
- package/dist/{chunk-OMQNJVKW.js → chunk-SRZOW5L2.js} +43 -13
- package/dist/{chunk-3M6DQK6S.js → chunk-T334FW2H.js} +7 -7
- package/dist/{chunk-V76WTFTW.js → chunk-T52TPHYC.js} +6 -6
- package/dist/{chunk-I7XBWTYH.js → chunk-T53XI6I7.js} +5 -5
- package/dist/{chunk-2ZSONWVL.js → chunk-T7FDXNRU.js} +13 -13
- package/dist/{chunk-JSD46VO2.js → chunk-TEG3RYVZ.js} +43 -36
- package/dist/{chunk-3I7MS7N2.js → chunk-TK2BMCBZ.js} +2 -2
- package/dist/{chunk-5OIVVPHF.js → chunk-TN5FW4XY.js} +13 -6
- package/dist/{chunk-75W7L2E2.js → chunk-TZ7MFRG4.js} +1041 -162
- package/dist/{chunk-36CT5VVL.js → chunk-U2JOLB7O.js} +126 -77
- package/dist/{chunk-LL4KHSZI.js → chunk-U2MSJ57E.js} +2 -2
- package/dist/{chunk-FTMGRKEF.js → chunk-U44YYLVV.js} +4 -4
- package/dist/{chunk-YECAMM3D.js → chunk-U7H5WRG5.js} +5 -5
- package/dist/{chunk-RQCKCSRL.js → chunk-U7VQ4NI4.js} +22 -22
- package/dist/{chunk-5TUB6SLS.js → chunk-UFYNOQK4.js} +7 -7
- package/dist/{chunk-R346GLFC.js → chunk-UHW5V7HC.js} +2 -2
- package/dist/{chunk-USR47QNF.js → chunk-UL36QJX6.js} +14 -14
- package/dist/{chunk-VIA6RFQZ.js → chunk-UQIVHSE4.js} +4 -4
- package/dist/{chunk-RAY4OVGZ.js → chunk-URBGEOH3.js} +5 -5
- package/dist/chunk-USZA7GWL.js +341 -0
- package/dist/{chunk-YD5GIKET.js → chunk-UTUNT5QL.js} +48 -579
- package/dist/{chunk-ZA4VCIGV.js → chunk-UUQ5G6EZ.js} +60 -41
- package/dist/{chunk-23L32XTI.js → chunk-UXAC2FX4.js} +68 -39
- package/dist/{chunk-VG7TBQIY.js → chunk-V552WL53.js} +68 -4
- package/dist/{chunk-BWH6N36D.js → chunk-VHKTOLEW.js} +272 -42
- package/dist/{chunk-EXLD33WO.js → chunk-VLPTKCKT.js} +24 -9
- package/dist/{chunk-336NSSKI.js → chunk-VNBICSS2.js} +2 -2
- package/dist/{chunk-VAVR4IJY.js → chunk-VQD7NH7Z.js} +3 -3
- package/dist/{chunk-LBMZMYH2.js → chunk-W2RJEH6Q.js} +3 -3
- package/dist/{chunk-7CR24IG7.js → chunk-WDV62RKY.js} +2 -2
- package/dist/{chunk-S6PYF2XF.js → chunk-WFKDPU7U.js} +4 -4
- package/dist/{chunk-BJVFZO5U.js → chunk-WJIMKGD6.js} +7 -7
- package/dist/{chunk-5636DCO5.js → chunk-WLMSOT73.js} +59 -12
- package/dist/{chunk-MXHC5QYU.js → chunk-WTQGRBHV.js} +5 -144
- package/dist/chunk-WXA2CFJO.js +23 -0
- package/dist/{chunk-QSNYB6ZV.js → chunk-XCUDZQLX.js} +3 -3
- package/dist/{chunk-4M6Z5QVF.js → chunk-XXBQKW32.js} +11 -11
- package/dist/{chunk-OEJSLEPW.js → chunk-YEJIG7LN.js} +332 -332
- package/dist/chunk-YGDMBK7O.js +567 -0
- package/dist/{chunk-4WR7VSYB.js → chunk-YYB3MC65.js} +23 -9
- package/dist/{chunk-2IR2NMPA.js → chunk-ZIDFQJRB.js} +2 -2
- package/dist/{chunk-Q4WO54TA.js → chunk-ZMZQEBKI.js} +14 -14
- package/dist/{chunk-6EJMN2Y3.js → chunk-ZTNFYMIO.js} +2 -2
- package/dist/{chunk-WEPFGWHJ.js → chunk-ZZFWWYLX.js} +2 -2
- package/dist/cli/index.js +44 -44
- package/dist/clio-5I2IBFYL.js +26 -0
- package/dist/{code-nav-IJR2DBPR.js → code-nav-YXIAEZVS.js} +48 -32
- package/dist/codewiki/build-worker.js +76 -29
- package/dist/{compile-cache-OQAVB7Y5.js → compile-cache-WJEPUZEJ.js} +4 -4
- package/dist/{components-2TGAI2RC.js → components-TNIKXCBH.js} +13 -13
- package/dist/{config-IUA6OYNS.js → config-Y2JDJ3JJ.js} +210 -124
- package/dist/configure-SML6UBZ5.js +55 -0
- package/dist/{context-4MPR7WKB.js → context-P5YSEO55.js} +125 -121
- package/dist/{context-2DKHWH2T.js → context-QQ53HSGJ.js} +91 -62
- package/dist/{context-BOYF5EJM.js → context-S2EEC3EJ.js} +62 -31
- package/dist/context-clear-TMEQCOTH.js +183 -0
- package/dist/{context-index-HNG3MOME.js → context-index-HP2JFUWA.js} +13 -11
- package/dist/{context-map-COB37XXN.js → context-map-INTXD54D.js} +71 -21
- package/dist/{context-working-set-3I3FYX6Y.js → context-working-set-CNLSQN5K.js} +31 -31
- package/dist/detail-5572VLBO.js +114 -0
- package/dist/{dispatch-runner-RJ5I2F2O.js → dispatch-runner-FRHD6P2O.js} +191 -116
- package/dist/{docs-SPOV3BAN.js → docs-BL7ROUFN.js} +4 -4
- package/dist/{doctor-DKICC2SN.js → doctor-N3LCM2LG.js} +58 -58
- package/dist/{eval-OQOQUDHK.js → eval-BUU3ZOUZ.js} +473 -168
- package/dist/{eval-inventory-Y6QRFOH5.js → eval-inventory-QOYZERXJ.js} +7 -7
- package/dist/evidence-DTGEN456.js +224 -0
- package/dist/{evidence-4DQ25GUQ.js → evidence-SQ5DNFEN.js} +110 -94
- package/dist/{evolve-GSS52E5J.js → evolve-IJNUFZDS.js} +107 -91
- package/dist/{extensions-G7MFLYHT.js → extensions-YVRHX6ZI.js} +16 -16
- package/dist/{fleet-Q37YHHAQ.js → fleet-ZNNVSYFO.js} +147 -147
- package/dist/{fleet-commands-G7E4N7SM.js → fleet-commands-5YE7NPJL.js} +27 -26
- package/dist/{fleet-decisions-O7M6QBA2.js → fleet-decisions-3SBSCTCW.js} +16 -15
- package/dist/{fleet-graph-TOUBW6OW.js → fleet-graph-6HHPWF5T.js} +39 -38
- package/dist/{fleet-inspect-SW33JJNI.js → fleet-inspect-JEYMGCGC.js} +107 -91
- package/dist/{fleet-new-RDVJLHHH.js → fleet-new-RCKGSRDV.js} +3 -3
- package/dist/{fleet-preflight-CV2655TW.js → fleet-preflight-QRSHIIDE.js} +10 -9
- package/dist/{fleet-validate-KESZX2YH.js → fleet-validate-4PM4GDDL.js} +46 -42
- package/dist/{fleet-verify-UQPMTVE3.js → fleet-verify-NJDTHTO3.js} +105 -89
- package/dist/fleet-view-UP2BWQQY.js +117 -0
- package/dist/{init-PXEXQSBF.js → init-S3GZQ5ZF.js} +123 -123
- package/dist/{install-NKNG7KD4.js → install-3RZDDP23.js} +5 -5
- package/dist/{interop-ZG5T62U3.js → interop-YOTGXFJM.js} +25 -25
- package/dist/inventory-K2OZ36YJ.js +117 -0
- package/dist/{library-B2W4N74O.js → library-GJI6W6OK.js} +45 -44
- package/dist/{memory-YCANYS5A.js → memory-OQOXQGYD.js} +107 -93
- package/dist/{models-GERTU3YI.js → models-3IK2Y5WE.js} +63 -62
- package/dist/{monitor-CPNIUULB.js → monitor-FTJLTKCQ.js} +136 -107
- package/dist/{orchestrator-J4BSH4WQ.js → orchestrator-N47O7SFD.js} +1159 -697
- package/dist/{panes-BOHAEGYC.js → panes-7BTYH3XQ.js} +8 -8
- package/dist/{panes-NXSLDQZ2.js → panes-WPOMEMRH.js} +22 -22
- package/dist/{paths-VSUWNC22.js → paths-J3KN7UAO.js} +12 -12
- package/dist/preload-65U34NG6.js +115 -0
- package/dist/{registry-LG64LTF4.js → registry-DESGAXWK.js} +3 -3
- package/dist/{reset-TNWTB5LU.js → reset-MUVQDLNL.js} +20 -20
- package/dist/{resources-4PXNMD5G.js → resources-LM76COAO.js} +41 -40
- package/dist/{run-D6XJ34CN.js → run-3VFZQ33N.js} +162 -156
- package/dist/{share-2NWMJJEE.js → share-4JUB4BL7.js} +43 -42
- package/dist/{skills-KR7WON5G.js → skills-S36AAJHU.js} +47 -46
- package/dist/{skills-eval-O2ZNOLDS.js → skills-eval-G6T57L7M.js} +127 -107
- package/dist/{skills-inventory-ZZOUBK7O.js → skills-inventory-WLM46PJH.js} +41 -40
- package/dist/slash-commands-GBARG3Y7.js +91 -0
- package/dist/{steer-XA25PSCS.js → steer-S7D7IKPU.js} +7 -7
- package/dist/{support-7EMVWYG2.js → support-5VAEC32W.js} +14 -14
- package/dist/{targets-OMH2XCSN.js → targets-N5REUETU.js} +145 -94
- package/dist/tasks-6BVY5YZF.js +36 -0
- package/dist/{terminal-lease-C2J3JYRE.js → terminal-lease-57UEOJKS.js} +12 -11
- package/dist/tools-6OCQ6SVB.js +28 -0
- package/dist/{trace-FXMXUZUF.js → trace-JHLXWUMN.js} +18 -17
- package/dist/{tree-sitter-HGKH6LG4.js → tree-sitter-AQUUOSYM.js} +6 -6
- package/dist/{tui-primitives-K5PASC3O.js → tui-primitives-RCY2HN7G.js} +3 -3
- package/dist/{uninstall-HALS6BLF.js → uninstall-FXYMFFRT.js} +17 -17
- package/dist/{upgrade-MS72RJEP.js → upgrade-4HD5HAIV.js} +40 -39
- package/dist/{usage-NHG6MCJM.js → usage-4GWM2WWP.js} +136 -105
- package/dist/{verifiers-7AUNVXDY.js → verifiers-GSKWKWVG.js} +28 -27
- package/dist/verify-3AS3ULCY.js +30 -0
- package/dist/{version-KGEG7EPO.js → version-RFPKO6T7.js} +4 -4
- package/dist/{web-fetch-V4FKSDAV.js → web-fetch-MQN4FH3X.js} +169 -18
- package/dist/wiki-generate-7BV7XWIY.js +614 -0
- package/dist/{with-panes-BDQEWBRT.js → with-panes-OFTNAR4Y.js} +34 -20
- package/dist/worker/entry.js +99 -88
- package/dist/{workspace-ZJ6BFM3Q.js → workspace-DZ7JADBG.js} +6 -6
- package/docs/README.md +7 -6
- package/docs/architecture/acp.md +10 -0
- package/docs/architecture/architecture.md +5 -5
- package/docs/architecture/context-engine.md +44 -59
- package/docs/architecture/context-working-set.md +7 -9
- package/docs/architecture/dispatch-architecture-rationale.md +1 -1
- package/docs/architecture/evidence-and-memory.md +10 -0
- package/docs/architecture/pi-boundary.md +37 -7
- package/docs/architecture/prompt-envelope-and-tools.md +7 -7
- package/docs/architecture/session-lifecycle.md +4 -4
- package/docs/architecture/worker-dispatch-mechanics.md +4 -0
- package/docs/guide/commands-and-modes.md +49 -36
- package/docs/guide/configuration-and-targets.md +7 -2
- package/docs/guide/configuration-reference.md +13 -3
- package/docs/guide/environment-variables.md +6 -2
- package/docs/guide/fleet-dispatch.md +12 -0
- package/docs/guide/installation-and-lifecycle.md +35 -9
- package/docs/guide/proactive-memory.md +1 -1
- package/docs/guide/skills-marketplace.md +11 -3
- package/docs/guide/tool-usage.md +9 -2
- package/docs/process/development-pipeline.md +10 -10
- package/docs/process/documentation-guide.md +2 -2
- package/docs/process/eval-runner.md +15 -0
- package/docs/process/evals-internal.md +1 -1
- package/docs/process/release-cut-checklist.md +6 -6
- package/evals/README.md +4 -0
- package/evals/behavioral-corpus-grader.mjs +147 -14
- package/evals/behavioral-model-negative-control.yaml +1 -0
- package/evals/behavioral-model.yaml +266 -1
- package/evals/fixtures/docs-retrieval.json +102 -0
- package/evals/fixtures/scalar-decision.json +17 -0
- package/evals/fixtures/scout-citation-pipeline.json +55 -0
- package/evals/fixtures/source-explanation.json +74 -0
- package/evals/fixtures/tool-arguments.json +18 -0
- package/evals/fixtures/tool-surface/read.txt +4 -0
- package/evals/fixtures/tool-surface/subdir/keep.txt +1 -0
- package/evals/no-edit-memory-grader.mjs +149 -0
- package/evals/scalar-decision-grader.py +41 -0
- package/evals/scalar-decision-machinery.ts +145 -0
- package/evals/source-explanation-grader.mjs +118 -0
- package/evals/tool-surface-grader.mjs +53 -0
- package/evals/tool-surface-model.yaml +274 -0
- package/package.json +14 -14
- package/skills/README.md +6 -6
- package/skills/registry.yaml +1 -1
- package/skills/skill-marketplace.json +1 -1
- package/src/cli/bootstrap-generate.ts +6 -0
- package/src/cli/config-inspect.ts +24 -7
- package/src/cli/config-trust.ts +62 -0
- package/src/cli/config.ts +8 -0
- package/src/cli/context-map.ts +75 -14
- package/src/cli/context.ts +46 -17
- package/src/cli/eval.ts +17 -3
- package/src/cli/modes/print.ts +32 -4
- package/src/cli/run.ts +16 -14
- package/src/cli/skills-eval.ts +10 -8
- package/src/cli/steer-channel.ts +31 -18
- package/src/cli/targets.ts +83 -31
- package/src/cli/tasks.ts +10 -1
- package/src/cli/upgrade.ts +9 -6
- package/src/cli/usage.ts +24 -0
- package/src/cli/wiki-generate.ts +239 -96
- package/src/core/bash-exec.ts +43 -15
- package/src/core/bus-events.ts +15 -0
- package/src/core/config.ts +33 -14
- package/src/core/defaults.ts +5 -4
- package/src/core/file-references.ts +11 -1
- package/src/core/incomplete-installation.ts +3 -1
- package/src/core/settings-layers.ts +21 -5
- package/src/core/termination.ts +26 -9
- package/src/core/untrusted-content.ts +16 -0
- package/src/core/workspace-trust.ts +179 -0
- package/src/domains/agents/builtins/coder.md +4 -2
- package/src/domains/agents/builtins/context-bootstrap.md +3 -1
- package/src/domains/agents/builtins/documenter.md +7 -4
- package/src/domains/agents/builtins/researcher.md +1 -0
- package/src/domains/agents/builtins/scout.md +7 -1
- package/src/domains/agents/result-contract.ts +199 -26
- package/src/domains/context/bootstrap-prompt.ts +11 -9
- package/src/domains/context/bootstrap.ts +74 -39
- package/src/domains/context/clio-md.ts +88 -26
- package/src/domains/context/codewiki/build-operation.ts +121 -0
- package/src/domains/context/codewiki/build-worker-protocol.ts +37 -3
- package/src/domains/context/codewiki/build-worker.ts +3 -35
- package/src/domains/context/codewiki/coordinator.ts +36 -6
- package/src/domains/context/codewiki/indexer.ts +59 -19
- package/src/domains/context/contract.ts +6 -2
- package/src/domains/context/extension.ts +72 -10
- package/src/domains/context/fingerprint.ts +39 -34
- package/src/domains/context/index.ts +7 -1
- package/src/domains/context/prompt-context.ts +55 -14
- package/src/domains/context/refresh.ts +9 -57
- package/src/domains/context/wiki/assemble.ts +14 -10
- package/src/domains/context/wiki/evidence.ts +209 -0
- package/src/domains/context/wiki/generate.ts +201 -67
- package/src/domains/context/wiki/meta.ts +10 -2
- package/src/domains/context/wiki/plan-store.ts +70 -14
- package/src/domains/context/wiki/plan.ts +71 -14
- package/src/domains/context/wiki/prompts.ts +42 -1
- package/src/domains/context/wiki/source-content.ts +106 -0
- package/src/domains/context/wiki/staleness.ts +33 -22
- package/src/domains/context/working-set/contract.ts +8 -2
- package/src/domains/context/working-set/engine.ts +17 -4
- package/src/domains/context/working-set/fold.ts +15 -2
- package/src/domains/context/working-set/marker.ts +2 -1
- package/src/domains/context/working-set/project.ts +18 -7
- package/src/domains/context/working-set/recall.ts +82 -56
- package/src/domains/dispatch/active-route-planner.ts +6 -3
- package/src/domains/dispatch/admission-queue.ts +19 -7
- package/src/domains/dispatch/admission.ts +3 -3
- package/src/domains/dispatch/budget-envelope.ts +47 -82
- package/src/domains/dispatch/capacity-lease.ts +57 -19
- package/src/domains/dispatch/contract.ts +10 -2
- package/src/domains/dispatch/event-pump.ts +28 -7
- package/src/domains/dispatch/execution-role.ts +49 -2
- package/src/domains/dispatch/execution-scheduler.ts +2 -0
- package/src/domains/dispatch/extension.ts +190 -105
- package/src/domains/dispatch/fleet-run.ts +20 -0
- package/src/domains/dispatch/gate-role-prompts.ts +4 -2
- package/src/domains/dispatch/parallel-writers.ts +34 -0
- package/src/domains/dispatch/reservation-store.ts +8 -34
- package/src/domains/dispatch/route-approval.ts +3 -3
- package/src/domains/dispatch/route-observer.ts +4 -2
- package/src/domains/dispatch/route-quality.ts +6 -1
- package/src/domains/dispatch/types.ts +4 -3
- package/src/domains/dispatch/worker-spawn.ts +58 -21
- package/src/domains/dispatch/workspace-checkpoint.ts +57 -0
- package/src/domains/eval/compare/behavioral.ts +81 -14
- package/src/domains/eval/compare/compare.ts +15 -5
- package/src/domains/eval/compare/envelope.ts +12 -5
- package/src/domains/eval/metrics/context.ts +24 -1
- package/src/domains/eval/metrics/tracked.ts +4 -28
- package/src/domains/eval/reports/comparison.ts +9 -9
- package/src/domains/eval/runners/clio-run.ts +5 -1
- package/src/domains/eval/schema/suite.ts +2 -0
- package/src/domains/eval/schema/validate.ts +1 -0
- package/src/domains/eval/suites/run.ts +189 -13
- package/src/domains/eval/verifiers/integrity.ts +39 -0
- package/src/domains/eval/verifiers/patch.ts +58 -2
- package/src/domains/eval/workspaces/temp-copy.ts +3 -0
- package/src/domains/evidence/build.ts +4 -2
- package/src/domains/interop/registry.ts +2 -2
- package/src/domains/middleware/hooks-io.ts +45 -26
- package/src/domains/middleware/hooks.ts +6 -0
- package/src/domains/middleware/injection-screen.ts +23 -0
- package/src/domains/middleware/rules.ts +5 -1
- package/src/domains/middleware/stalled-turn.ts +18 -3
- package/src/domains/middleware/task-board-reminder.ts +4 -2
- package/src/domains/middleware/task-nudge.ts +4 -1
- package/src/domains/mux/contract.ts +34 -1
- package/src/domains/mux/dock-controller.ts +8 -1
- package/src/domains/mux/index.ts +1 -0
- package/src/domains/mux/socket-client.ts +13 -3
- package/src/domains/observability/contract.ts +2 -2
- package/src/domains/observability/projection.ts +30 -9
- package/src/domains/prompts/compiler.ts +10 -2
- package/src/domains/prompts/contract.ts +7 -4
- package/src/domains/prompts/extension.ts +28 -64
- package/src/domains/prompts/fragments/identity/clio.md +23 -0
- package/src/domains/prompts/fragments/operating/contract.md +10 -0
- package/src/domains/prompts/fragments/operating/delegation.md +5 -0
- package/src/domains/prompts/fragments/wiki/page.md +28 -15
- package/src/domains/prompts/fragments/wiki/plan.md +4 -4
- package/src/domains/prompts/preload-prefix.ts +31 -0
- package/src/domains/prompts/preload.ts +135 -61
- package/src/domains/providers/auth/backend-file.ts +15 -11
- package/src/domains/providers/auth/storage.ts +3 -5
- package/src/domains/providers/catalog.ts +18 -3
- package/src/domains/providers/runtime-resolution.ts +11 -9
- package/src/domains/providers/runtimes/cloud/openrouter.ts +2 -0
- package/src/domains/resources/skills/promotion.ts +8 -1
- package/src/domains/safety/action-classifier.ts +9 -0
- package/src/domains/safety/autonomy.ts +10 -1
- package/src/domains/safety/contract.ts +5 -1
- package/src/domains/safety/default-path-policy.ts +11 -0
- package/src/domains/safety/extension.ts +11 -2
- package/src/domains/safety/policy-engine.ts +189 -32
- package/src/domains/safety/project-policy.ts +7 -2
- package/src/domains/safety/workspace-trust.ts +43 -0
- package/src/domains/session/compaction/compact.ts +384 -21
- package/src/domains/session/compaction/cut-point.ts +42 -5
- package/src/domains/session/compaction/tokens.ts +9 -1
- package/src/domains/session/decision-board.ts +43 -33
- package/src/domains/session/entries.ts +169 -4
- package/src/domains/session/prompt-manifest.ts +47 -8
- package/src/domains/session/task-board.ts +21 -3
- package/src/domains/user-tasks/handoff.ts +16 -0
- package/src/engine/acp/adapter.ts +44 -12
- package/src/engine/acp/server.ts +1 -0
- package/src/engine/acp/transport.ts +2 -1
- package/src/engine/acp/types.ts +6 -1
- package/src/engine/antigravity/subprocess-runtime.ts +20 -4
- package/src/engine/api-registry.ts +19 -2
- package/src/engine/apis/openai-completions.ts +13 -6
- package/src/engine/apis/output-budget.ts +26 -10
- package/src/engine/claude/sdk-runtime.ts +4 -3
- package/src/engine/env-api-keys.ts +2 -1
- package/src/engine/external-subprocess.ts +14 -3
- package/src/engine/loop-guard.ts +19 -2
- package/src/engine/provider-diagnostics.ts +129 -0
- package/src/engine/provider-payload.ts +3 -1
- package/src/engine/worker-runtime.ts +13 -2
- package/src/engine/worker-tools.ts +5 -1
- package/src/entry/extension-reload.ts +1 -0
- package/src/entry/orchestrator.ts +53 -15
- package/src/interactive/chat-loop-messages.ts +12 -4
- package/src/interactive/chat-loop.ts +115 -45
- package/src/interactive/chat-renderer.ts +60 -0
- package/src/interactive/context-recall-command.ts +2 -1
- package/src/interactive/dispatch-board.ts +17 -2
- package/src/interactive/editor-submit.ts +13 -0
- package/src/interactive/interactive-application.ts +8 -2
- package/src/interactive/interactive-event-projection.ts +7 -1
- package/src/interactive/interactive-presentation.ts +15 -7
- package/src/interactive/interactive-slash-runtime.ts +2 -0
- package/src/interactive/layout.ts +2 -1
- package/src/interactive/model-session-replay.ts +2 -2
- package/src/interactive/overlay-frame.ts +1 -0
- package/src/interactive/overlay-general-openers.ts +3 -1
- package/src/interactive/overlay-session-lifecycle.ts +6 -0
- package/src/interactive/overlays/ask-user.ts +1 -0
- package/src/interactive/overlays/message-picker.ts +1 -1
- package/src/interactive/renderers/tool-execution.ts +17 -1
- package/src/interactive/renderers/worker-entry.ts +25 -10
- package/src/interactive/slash-commands.ts +9 -7
- package/src/interactive/turn-context.ts +221 -53
- package/src/interactive/turn-middleware.ts +3 -1
- package/src/interactive/turn-persistence.ts +3 -0
- package/src/interactive/turn-runtime.ts +11 -2
- package/src/interactive/turn-state.ts +10 -9
- package/src/interactive/watch-pane.ts +18 -4
- package/src/interactive/worker-stream.ts +7 -7
- package/src/tools/agent-tools.ts +6 -3
- package/src/tools/bash.ts +1 -1
- package/src/tools/builtin-tool-catalog.ts +9 -2
- package/src/tools/codewiki/code-nav.ts +4 -10
- package/src/tools/compete-judge-task.ts +71 -0
- package/src/tools/compete-worktrees.ts +34 -0
- package/src/tools/context/index.ts +32 -7
- package/src/tools/context/surface.ts +15 -4
- package/src/tools/decide.ts +1 -1
- package/src/tools/dispatch-admission.ts +12 -1
- package/src/tools/dispatch-arguments.ts +38 -1
- package/src/tools/dispatch-plan.ts +7 -7
- package/src/tools/dispatch-runner.ts +48 -32
- package/src/tools/dispatch-schema.ts +30 -23
- package/src/tools/dispatch-scout-admission.ts +10 -44
- package/src/tools/dispatch-scout.ts +2 -3
- package/src/tools/find.ts +13 -4
- package/src/tools/grep.ts +13 -1
- package/src/tools/ls.ts +7 -1
- package/src/tools/monitor.ts +26 -11
- package/src/tools/network-policy.ts +11 -24
- package/src/tools/observation.ts +39 -2
- package/src/tools/read.ts +112 -15
- package/src/tools/registry.ts +54 -17
- package/src/tools/result-shaping.ts +110 -2
- package/src/tools/tasks.ts +33 -7
- package/src/tools/verify/frontend.ts +67 -30
- package/src/tools/verify/numeric.ts +6 -1
- package/src/tools/web-fetch-network.ts +179 -0
- package/src/tools/web-fetch-surface.ts +2 -1
- package/src/tools/web-fetch.ts +15 -13
- package/src/tools/worker-evidence.ts +27 -0
- package/src/worker/spec-contract.ts +12 -8
- package/dist/builtins-WGALA46I.js +0 -22
- package/dist/chunk-2WZ546HR.js +0 -792
- package/dist/chunk-5PSMVOLM.js +0 -56
- package/dist/chunk-EL24TAU4.js +0 -1560
- package/dist/chunk-IZXGRF7P.js +0 -4048
- package/dist/chunk-JVCV3ICN.js +0 -47
- package/dist/chunk-MNJGS2IN.js +0 -33
- package/dist/chunk-O5CVSAG5.js +0 -122
- package/dist/chunk-ODGTEFFI.js +0 -50
- package/dist/chunk-OQE5J4C6.js +0 -73
- package/dist/chunk-UUVG37B4.js +0 -244
- package/dist/chunk-V6HJFQZE.js +0 -228
- package/dist/clio-QLICPCF5.js +0 -25
- package/dist/configure-VEPX4NMX.js +0 -55
- package/dist/context-clear-S4ZJCQUX.js +0 -182
- package/dist/detail-A7JAVSIG.js +0 -98
- package/dist/evidence-4F5USFKH.js +0 -208
- package/dist/fleet-view-MN2VG4MR.js +0 -101
- package/dist/inventory-C26CFDRR.js +0 -101
- package/dist/preload-P6DGH2PZ.js +0 -13
- package/dist/slash-commands-ZXPJD64J.js +0 -92
- package/dist/tasks-IPAGMEIX.js +0 -36
- package/dist/tools-EFFEAIDP.js +0 -28
- package/dist/verify-FWYGPKMR.js +0 -29
- package/dist/wiki-generate-743CIGJW.js +0 -476
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
EVAL_SUITE_V2_VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5PHVPU4G.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./chunk-V6HJFQZE.js";
|
|
6
|
+
isProjectPreloadClass
|
|
7
|
+
} from "./chunk-5ZSZEYJK.js";
|
|
9
8
|
import {
|
|
10
9
|
discoverAgentRecipes
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EQEJJ53P.js";
|
|
11
|
+
import "./chunk-T7FDXNRU.js";
|
|
12
|
+
import "./chunk-DNCE23JJ.js";
|
|
13
|
+
import "./chunk-U7H5WRG5.js";
|
|
14
|
+
import "./chunk-5VTJP36Q.js";
|
|
12
15
|
import {
|
|
13
16
|
EvalTaskFileError,
|
|
14
17
|
TRUST_STATUS_AXES,
|
|
@@ -21,13 +24,15 @@ import {
|
|
|
21
24
|
formatTrustSummary,
|
|
22
25
|
inspectRunReceiptTrustStatus,
|
|
23
26
|
loadEvalTaskFile,
|
|
27
|
+
loadFragments,
|
|
28
|
+
renderCodewikiDigest,
|
|
24
29
|
summarizeTrustStatus,
|
|
25
30
|
verifyReceiptIntegrity
|
|
26
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-6CDNRHWH.js";
|
|
27
32
|
import {
|
|
28
33
|
listSessionLedgerRefs,
|
|
29
34
|
parseSessionEntries
|
|
30
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-F34AR6O3.js";
|
|
31
36
|
import {
|
|
32
37
|
EVAL_BEHAVIOR_METRIC_DEFINITIONS_V1,
|
|
33
38
|
EVAL_EXECUTION_ENVELOPE_SCHEMA_V1,
|
|
@@ -42,104 +47,109 @@ import {
|
|
|
42
47
|
loadEvalArtifactV4,
|
|
43
48
|
normalizeEvalRunnerKind,
|
|
44
49
|
normalizeEvalSchemaId,
|
|
50
|
+
parseEvalArtifactV4,
|
|
45
51
|
parseEvalBehaviorScenarioV1,
|
|
46
52
|
parseEvalExecutionMatrixDimensionsV1,
|
|
47
53
|
parseEvalVerdictEnvelopeV1,
|
|
48
54
|
renderEvalServingConfiguration,
|
|
49
55
|
sameEvalServingConfiguration,
|
|
50
56
|
writeEvalArtifactV4
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-HVDIIIQW.js";
|
|
57
|
+
} from "./chunk-U44YYLVV.js";
|
|
58
|
+
import "./chunk-O5F25NIE.js";
|
|
59
|
+
import "./chunk-CXQ37WJH.js";
|
|
60
|
+
import {
|
|
61
|
+
shellQuote
|
|
62
|
+
} from "./chunk-SD7SHNDW.js";
|
|
63
|
+
import "./chunk-QH3ZTUOA.js";
|
|
64
|
+
import "./chunk-22PQ4TX4.js";
|
|
65
|
+
import "./chunk-DZK63TZJ.js";
|
|
66
|
+
import "./chunk-DNHVRBH4.js";
|
|
62
67
|
import {
|
|
63
68
|
printError
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
69
|
+
} from "./chunk-3T4DXWP6.js";
|
|
70
|
+
import "./chunk-K2HL3GBL.js";
|
|
71
|
+
import "./chunk-7HBHHVCK.js";
|
|
67
72
|
import {
|
|
68
73
|
createSafetyPolicyEngine
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import "./chunk-
|
|
74
|
+
} from "./chunk-4SVIVOMC.js";
|
|
75
|
+
import "./chunk-NTK3WTHM.js";
|
|
76
|
+
import "./chunk-LY4N4TTL.js";
|
|
71
77
|
import {
|
|
72
78
|
agentSpecFingerprint,
|
|
73
79
|
normalizeAgentSpec
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-
|
|
81
|
-
import "./chunk-
|
|
82
|
-
import "./chunk-
|
|
83
|
-
import "./chunk-
|
|
84
|
-
import
|
|
80
|
+
} from "./chunk-OQM5IVJY.js";
|
|
81
|
+
import "./chunk-LUL5Z66S.js";
|
|
82
|
+
import "./chunk-M6TAYK66.js";
|
|
83
|
+
import "./chunk-KQ6IDQIB.js";
|
|
84
|
+
import "./chunk-MDU3C27C.js";
|
|
85
|
+
import "./chunk-R2P2U3ZS.js";
|
|
86
|
+
import "./chunk-NTTS3O53.js";
|
|
87
|
+
import "./chunk-M4KFUXS7.js";
|
|
88
|
+
import "./chunk-5ZMXGW7P.js";
|
|
89
|
+
import "./chunk-B6UM3OZC.js";
|
|
90
|
+
import {
|
|
91
|
+
ALL_TOOL_NAMES
|
|
92
|
+
} from "./chunk-EHOSNVVM.js";
|
|
93
|
+
import "./chunk-MCJKEGHO.js";
|
|
85
94
|
import {
|
|
86
95
|
extractReasoningTokens
|
|
87
|
-
} from "./chunk-
|
|
88
|
-
import "./chunk-
|
|
89
|
-
import "./chunk-GHS5EBTQ.js";
|
|
96
|
+
} from "./chunk-77CZRFTE.js";
|
|
97
|
+
import "./chunk-FKIOX6DS.js";
|
|
90
98
|
import {
|
|
91
99
|
namingCompatibilityEnvironment
|
|
92
|
-
} from "./chunk-
|
|
93
|
-
import "./chunk-
|
|
100
|
+
} from "./chunk-DVNAPPXU.js";
|
|
101
|
+
import "./chunk-5CY4Q6QI.js";
|
|
102
|
+
import "./chunk-FQOOGXBH.js";
|
|
94
103
|
import {
|
|
95
104
|
InvalidIdError
|
|
96
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-UHW5V7HC.js";
|
|
97
106
|
import {
|
|
98
107
|
normalizeClioCoderEventRecord,
|
|
99
108
|
normalizeClioCoderEventType
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import "./chunk-
|
|
109
|
+
} from "./chunk-KMF54VH3.js";
|
|
110
|
+
import "./chunk-HL26ADLH.js";
|
|
102
111
|
import {
|
|
103
112
|
readCodewiki,
|
|
104
113
|
structuralCodewikiHash
|
|
105
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-W2RJEH6Q.js";
|
|
106
115
|
import {
|
|
107
116
|
detectProjectProfile
|
|
108
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-CVDAFGPW.js";
|
|
109
118
|
import {
|
|
110
119
|
enumerateWorkspaceFiles
|
|
111
|
-
} from "./chunk-
|
|
112
|
-
import "./chunk-
|
|
113
|
-
import "./chunk-
|
|
114
|
-
import "./chunk-
|
|
115
|
-
import "./chunk-
|
|
116
|
-
import "./chunk-
|
|
117
|
-
import "./chunk-
|
|
118
|
-
import "./chunk-
|
|
119
|
-
import "./chunk-
|
|
120
|
-
import "./chunk-
|
|
121
|
-
import "./chunk-
|
|
122
|
-
import "./chunk-
|
|
123
|
-
import "./chunk-
|
|
124
|
-
import "./chunk-
|
|
125
|
-
import "./chunk-
|
|
120
|
+
} from "./chunk-PPEZJWUG.js";
|
|
121
|
+
import "./chunk-WDV62RKY.js";
|
|
122
|
+
import "./chunk-GD55RTIW.js";
|
|
123
|
+
import "./chunk-E3LEPLQ2.js";
|
|
124
|
+
import "./chunk-SE4ZKILO.js";
|
|
125
|
+
import "./chunk-U2MSJ57E.js";
|
|
126
|
+
import "./chunk-C27U2TYG.js";
|
|
127
|
+
import "./chunk-GJ24ODAX.js";
|
|
128
|
+
import "./chunk-LTR5QCLS.js";
|
|
129
|
+
import "./chunk-6EXUUOSN.js";
|
|
130
|
+
import "./chunk-ZTNFYMIO.js";
|
|
131
|
+
import "./chunk-HXHFDHB6.js";
|
|
132
|
+
import "./chunk-VNBICSS2.js";
|
|
133
|
+
import "./chunk-2QPI3TR3.js";
|
|
134
|
+
import "./chunk-TK2BMCBZ.js";
|
|
126
135
|
import {
|
|
127
136
|
require_dist
|
|
128
|
-
} from "./chunk-
|
|
129
|
-
import "./chunk-
|
|
130
|
-
import "./chunk-
|
|
137
|
+
} from "./chunk-B5GGDIHT.js";
|
|
138
|
+
import "./chunk-ZZFWWYLX.js";
|
|
139
|
+
import "./chunk-DXVMLM3Z.js";
|
|
131
140
|
import {
|
|
132
141
|
clioDataDir,
|
|
133
142
|
clioStateDir
|
|
134
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-CTTI7G3T.js";
|
|
135
144
|
import {
|
|
136
145
|
__toESM,
|
|
137
146
|
init_esm_shims
|
|
138
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-ECBHH7LU.js";
|
|
139
148
|
|
|
140
149
|
// src/cli/eval.ts
|
|
141
150
|
init_esm_shims();
|
|
142
|
-
import {
|
|
151
|
+
import { readFile as readFile4 } from "node:fs/promises";
|
|
152
|
+
import { resolve as resolve10 } from "node:path";
|
|
143
153
|
|
|
144
154
|
// src/domains/eval/compare/compare.ts
|
|
145
155
|
init_esm_shims();
|
|
@@ -238,28 +248,33 @@ init_esm_shims();
|
|
|
238
248
|
// src/domains/eval/compare/envelope.ts
|
|
239
249
|
init_esm_shims();
|
|
240
250
|
function compareEvalExecutionEnvelopesV1(identity, baseline, candidate, baselineDimensions, candidateDimensions) {
|
|
251
|
+
const mismatchIdentity = {
|
|
252
|
+
scenarioId: identity.scenarioId,
|
|
253
|
+
role: identity.role,
|
|
254
|
+
target: { id: identity.target.id, model: identity.target.model }
|
|
255
|
+
};
|
|
241
256
|
const leftDimensions = [...baselineDimensions].sort();
|
|
242
257
|
const rightDimensions = [...candidateDimensions].sort();
|
|
243
258
|
if (stableJson(leftDimensions) !== stableJson(rightDimensions)) {
|
|
244
|
-
return { ...
|
|
259
|
+
return { ...mismatchIdentity, fields: ["matrix.dimensions"] };
|
|
245
260
|
}
|
|
246
261
|
if (baseline.some((result) => result.executionEnvelope !== void 0) && baseline.some((result) => result.executionEnvelope === void 0) || candidate.some((result) => result.executionEnvelope !== void 0) && candidate.some((result) => result.executionEnvelope === void 0)) {
|
|
247
|
-
return { ...
|
|
262
|
+
return { ...mismatchIdentity, fields: ["executionEnvelope.missingTrial"] };
|
|
248
263
|
}
|
|
249
264
|
const ignored = new Set(leftDimensions);
|
|
250
265
|
const baselineEnvelopes = uniqueEnvelopes(baseline, ignored);
|
|
251
266
|
const candidateEnvelopes = uniqueEnvelopes(candidate, ignored);
|
|
252
267
|
if (baselineEnvelopes.length === 0 && candidateEnvelopes.length === 0) return null;
|
|
253
268
|
if (baselineEnvelopes.length === 0 || candidateEnvelopes.length === 0) {
|
|
254
|
-
return { ...
|
|
269
|
+
return { ...mismatchIdentity, fields: ["executionEnvelope"] };
|
|
255
270
|
}
|
|
256
271
|
if (baselineEnvelopes.length > 1 || candidateEnvelopes.length > 1) {
|
|
257
|
-
return { ...
|
|
272
|
+
return { ...mismatchIdentity, fields: ["executionEnvelope.withinRunVariance"] };
|
|
258
273
|
}
|
|
259
274
|
const left = baselineEnvelopes[0];
|
|
260
275
|
const right = candidateEnvelopes[0];
|
|
261
276
|
if (left === void 0 || right === void 0 || stableJson(left) === stableJson(right)) return null;
|
|
262
|
-
return { ...
|
|
277
|
+
return { ...mismatchIdentity, fields: differingFields(left, right, ignored) };
|
|
263
278
|
}
|
|
264
279
|
function uniqueEnvelopes(results, ignored) {
|
|
265
280
|
const byIdentity = /* @__PURE__ */ new Map();
|
|
@@ -322,26 +337,45 @@ function stableJson(value) {
|
|
|
322
337
|
|
|
323
338
|
// src/domains/eval/compare/behavioral.ts
|
|
324
339
|
function compareEvalBehaviorMetricsV1(baseline, candidate) {
|
|
325
|
-
const
|
|
326
|
-
const
|
|
340
|
+
const baselineDimensions = baseline.matrix.dimensions ?? [];
|
|
341
|
+
const candidateDimensions = candidate.matrix.dimensions ?? [];
|
|
342
|
+
const varying = new Set(baselineDimensions.filter((dimension) => candidateDimensions.includes(dimension)));
|
|
343
|
+
const baselineGroups = behaviorGroups(baseline, varying);
|
|
344
|
+
const candidateGroups = behaviorGroups(candidate, varying);
|
|
327
345
|
const keys = /* @__PURE__ */ new Set([...baselineGroups.keys(), ...candidateGroups.keys()]);
|
|
328
346
|
const comparisons = [];
|
|
329
347
|
const envelopeMismatches = [];
|
|
330
|
-
const baselineDimensions = baseline.matrix.dimensions ?? [];
|
|
331
|
-
const candidateDimensions = candidate.matrix.dimensions ?? [];
|
|
332
348
|
for (const key of [...keys].sort((left, right) => left.localeCompare(right))) {
|
|
333
349
|
const baselineGroup = baselineGroups.get(key);
|
|
334
350
|
const candidateGroup = candidateGroups.get(key);
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
337
|
-
const
|
|
351
|
+
const group = baselineGroup ?? candidateGroup;
|
|
352
|
+
if (group === void 0) continue;
|
|
353
|
+
const identity = {
|
|
354
|
+
scenarioId: group.scenarioId,
|
|
355
|
+
role: group.role,
|
|
356
|
+
target: { id: group.target.id, model: group.target.model }
|
|
357
|
+
};
|
|
358
|
+
const routes = {
|
|
359
|
+
baselineTargets: baselineGroup?.targets ?? [],
|
|
360
|
+
candidateTargets: candidateGroup?.targets ?? []
|
|
361
|
+
};
|
|
362
|
+
let envelopeMismatch = compareEvalExecutionEnvelopesV1(
|
|
338
363
|
identity,
|
|
339
364
|
baselineGroup?.results ?? [],
|
|
340
365
|
candidateGroup?.results ?? [],
|
|
341
366
|
baselineDimensions,
|
|
342
367
|
candidateDimensions
|
|
343
368
|
);
|
|
344
|
-
if (
|
|
369
|
+
if (routes.baselineTargets.length > 1 || routes.candidateTargets.length > 1) {
|
|
370
|
+
envelopeMismatch = {
|
|
371
|
+
...identity,
|
|
372
|
+
fields: ["behavioralMetrics.ambiguousRouteGroup", ...envelopeMismatch?.fields ?? []]
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
if (envelopeMismatch !== null) {
|
|
376
|
+
envelopeMismatch = { ...envelopeMismatch, ...routes };
|
|
377
|
+
envelopeMismatches.push(envelopeMismatch);
|
|
378
|
+
}
|
|
345
379
|
const comparability = {
|
|
346
380
|
comparable: envelopeMismatch === null,
|
|
347
381
|
mismatchedFields: envelopeMismatch?.fields ?? []
|
|
@@ -349,18 +383,21 @@ function compareEvalBehaviorMetricsV1(baseline, candidate) {
|
|
|
349
383
|
for (const definition of EVAL_BEHAVIOR_METRIC_DEFINITIONS_V1) {
|
|
350
384
|
const baselineDistribution = behaviorDistribution(baselineGroup?.results ?? [], definition);
|
|
351
385
|
const candidateDistribution = behaviorDistribution(candidateGroup?.results ?? [], definition);
|
|
386
|
+
const noiseBand = definition.family === "safety" ? 0 : distributionNoiseBand(baselineDistribution, candidateDistribution);
|
|
352
387
|
comparisons.push({
|
|
353
388
|
scenarioId: identity.scenarioId,
|
|
354
389
|
role: identity.role,
|
|
355
390
|
target: identity.target,
|
|
391
|
+
...routes,
|
|
356
392
|
metric: definition.name,
|
|
357
393
|
family: definition.family,
|
|
358
394
|
direction: definition.direction,
|
|
359
395
|
hardGate: definition.hardGate,
|
|
360
396
|
baseline: baselineDistribution,
|
|
361
397
|
candidate: candidateDistribution,
|
|
362
|
-
change: envelopeMismatch === null ? classifyChange(baselineDistribution.mean, candidateDistribution.mean, definition.direction) : "incomparable",
|
|
398
|
+
change: envelopeMismatch === null ? classifyChange(baselineDistribution.mean, candidateDistribution.mean, definition.direction, noiseBand) : "incomparable",
|
|
363
399
|
meanDelta: subtractNullable(candidateDistribution.mean, baselineDistribution.mean),
|
|
400
|
+
noiseBand,
|
|
364
401
|
varianceChange: envelopeMismatch === null ? classifyChange(baselineDistribution.variance, candidateDistribution.variance, "lower") : "incomparable",
|
|
365
402
|
varianceDelta: subtractNullable(candidateDistribution.variance, baselineDistribution.variance),
|
|
366
403
|
comparability
|
|
@@ -373,6 +410,8 @@ function compareEvalBehaviorMetricsV1(baseline, candidate) {
|
|
|
373
410
|
scenarioId: comparison.scenarioId,
|
|
374
411
|
role: comparison.role,
|
|
375
412
|
target: comparison.target,
|
|
413
|
+
baselineTargets: comparison.baselineTargets,
|
|
414
|
+
candidateTargets: comparison.candidateTargets,
|
|
376
415
|
metric: comparison.metric,
|
|
377
416
|
change: comparison.change
|
|
378
417
|
}
|
|
@@ -388,24 +427,28 @@ function compareEvalBehaviorMetricsV1(baseline, candidate) {
|
|
|
388
427
|
envelopeMismatches
|
|
389
428
|
};
|
|
390
429
|
}
|
|
391
|
-
function classifyChange(baseline, candidate, direction) {
|
|
430
|
+
function classifyChange(baseline, candidate, direction, noiseBand = 0) {
|
|
392
431
|
if (baseline === null || candidate === null) return "incomparable";
|
|
393
|
-
if (baseline
|
|
432
|
+
if (Math.abs(candidate - baseline) <= noiseBand) return "unchanged";
|
|
394
433
|
if (direction === "higher") return candidate > baseline ? "improved" : "regressed";
|
|
395
434
|
return candidate < baseline ? "improved" : "regressed";
|
|
396
435
|
}
|
|
397
|
-
function behaviorGroups(artifact) {
|
|
436
|
+
function behaviorGroups(artifact, varying) {
|
|
398
437
|
const groups = /* @__PURE__ */ new Map();
|
|
399
438
|
for (const result of artifact.results) {
|
|
400
439
|
const behavioral = result.behavioralMetrics;
|
|
401
440
|
if (behavioral === void 0) continue;
|
|
402
|
-
const key = groupKey(behavioral.scenarioId, behavioral.role, behavioral.target);
|
|
441
|
+
const key = groupKey(behavioral.scenarioId, behavioral.role, behavioral.target, varying);
|
|
403
442
|
const group = groups.get(key) ?? {
|
|
404
443
|
scenarioId: behavioral.scenarioId,
|
|
405
444
|
role: behavioral.role,
|
|
406
445
|
target: behavioral.target,
|
|
446
|
+
targets: [],
|
|
407
447
|
results: []
|
|
408
448
|
};
|
|
449
|
+
if (!group.targets.some((target) => target.id === behavioral.target.id && target.model === behavioral.target.model)) {
|
|
450
|
+
group.targets.push(behavioral.target);
|
|
451
|
+
}
|
|
409
452
|
group.results.push(result);
|
|
410
453
|
groups.set(key, group);
|
|
411
454
|
}
|
|
@@ -444,12 +487,21 @@ function behaviorDistribution(results, definition) {
|
|
|
444
487
|
source: definition.source
|
|
445
488
|
};
|
|
446
489
|
}
|
|
447
|
-
function groupKey(scenarioId, role, target) {
|
|
448
|
-
return JSON.stringify([
|
|
490
|
+
function groupKey(scenarioId, role, target, varying) {
|
|
491
|
+
return JSON.stringify([
|
|
492
|
+
scenarioId,
|
|
493
|
+
role,
|
|
494
|
+
varying.has("target") ? null : target.id,
|
|
495
|
+
varying.has("wireModel") ? null : target.model
|
|
496
|
+
]);
|
|
449
497
|
}
|
|
450
498
|
function subtractNullable(left, right) {
|
|
451
499
|
return left === null || right === null ? null : left - right;
|
|
452
500
|
}
|
|
501
|
+
function distributionNoiseBand(baseline, candidate) {
|
|
502
|
+
if (baseline.measured < 2 || candidate.measured < 2 || baseline.unmeasured > 0 || candidate.unmeasured > 0) return 0;
|
|
503
|
+
return 2 * Math.sqrt((baseline.variance ?? 0) / (baseline.measured - 1) + (candidate.variance ?? 0) / (candidate.measured - 1));
|
|
504
|
+
}
|
|
453
505
|
|
|
454
506
|
// src/domains/eval/compare/compare.ts
|
|
455
507
|
var EvalServingConfigurationDriftError = class extends Error {
|
|
@@ -507,7 +559,7 @@ function compareEvalArtifactsV4(baseline, candidate, options = {}) {
|
|
|
507
559
|
}
|
|
508
560
|
function renderEvalComparisonV4(summary) {
|
|
509
561
|
const envelopeFailures = summary.envelopeMismatches.map(
|
|
510
|
-
(mismatch) => ` incomparable envelope: ${mismatch.scenarioId} ${mismatch.role} ${mismatch
|
|
562
|
+
(mismatch) => ` incomparable envelope: ${mismatch.scenarioId} ${mismatch.role} ${renderEvalComparisonRoutesV1(mismatch)} fields=${mismatch.fields.join(",")}`
|
|
511
563
|
);
|
|
512
564
|
const affected = summary.affectedCorpusResults.map(
|
|
513
565
|
(result) => ` affected corpus result: ${result.scenarioId} role=${result.role} changed=${result.changedFields.join(",")}`
|
|
@@ -515,7 +567,7 @@ function renderEvalComparisonV4(summary) {
|
|
|
515
567
|
const scenarioReports = renderRollups("per-scenario baseline/candidate report", summary.scenarioReports);
|
|
516
568
|
const roleReports = renderRollups("per-role baseline/candidate report", summary.roleReports);
|
|
517
569
|
const hardFailures = summary.hardGate.failures.map(
|
|
518
|
-
(failure) => ` hard failure: ${failure.scenarioId} ${failure.role} ${failure
|
|
570
|
+
(failure) => ` hard failure: ${failure.scenarioId} ${failure.role} ${renderEvalComparisonRoutesV1(failure)} ${failure.metric} ${failure.change}`
|
|
519
571
|
);
|
|
520
572
|
const tracked = summary.trackedMetrics.flatMap((row, index) => [
|
|
521
573
|
...index === 0 ? [
|
|
@@ -542,13 +594,12 @@ function renderEvalComparisonV4(summary) {
|
|
|
542
594
|
const behavioral = summary.behavioralMetrics.flatMap((row, index) => [
|
|
543
595
|
...index === 0 ? [
|
|
544
596
|
"behavioral metrics:",
|
|
545
|
-
"scenario role
|
|
597
|
+
"scenario role baseline_target/model -> candidate_target/model family metric baseline_mean baseline_variance baseline_coverage candidate_mean candidate_variance candidate_coverage mean_delta variance_delta noise_band change variance_change comparability gate source"
|
|
546
598
|
] : [],
|
|
547
599
|
[
|
|
548
600
|
row.scenarioId,
|
|
549
601
|
row.role,
|
|
550
|
-
row
|
|
551
|
-
row.target.model ?? "none",
|
|
602
|
+
renderEvalComparisonRoutesV1(row),
|
|
552
603
|
row.family,
|
|
553
604
|
row.metric,
|
|
554
605
|
formatMetric(row.baseline.mean),
|
|
@@ -559,6 +610,7 @@ function renderEvalComparisonV4(summary) {
|
|
|
559
610
|
`${row.candidate.measured}/${row.candidate.observations}`,
|
|
560
611
|
formatSignedMetric(row.meanDelta),
|
|
561
612
|
formatSignedMetric(row.varianceDelta),
|
|
613
|
+
formatMetric(row.noiseBand),
|
|
562
614
|
row.change,
|
|
563
615
|
row.varianceChange,
|
|
564
616
|
row.comparability.comparable ? "comparable" : `incomparable:${row.comparability.mismatchedFields.join(",")}`,
|
|
@@ -586,6 +638,10 @@ function renderEvalComparisonV4(summary) {
|
|
|
586
638
|
""
|
|
587
639
|
].join("\n");
|
|
588
640
|
}
|
|
641
|
+
function renderEvalComparisonRoutesV1(identity) {
|
|
642
|
+
const render = (targets) => targets.map((target) => `${target.id}/${target.model ?? "none"}`).join(",") || "missing";
|
|
643
|
+
return `${render(identity.baselineTargets ?? [identity.target])} -> ${render(identity.candidateTargets ?? [identity.target])}`;
|
|
644
|
+
}
|
|
589
645
|
function behaviorRollups(rows, keyOf) {
|
|
590
646
|
const groups = /* @__PURE__ */ new Map();
|
|
591
647
|
for (const row of rows) groups.set(keyOf(row), [...groups.get(keyOf(row)) ?? [], row]);
|
|
@@ -845,7 +901,7 @@ function renderEvalComparisonReportV1(summary, format2) {
|
|
|
845
901
|
}
|
|
846
902
|
function renderMarkdown(summary) {
|
|
847
903
|
const rows = summary.behavioralMetrics.map(
|
|
848
|
-
(row) => `| ${cell(row.scenarioId)} | ${cell(row.role)} | ${cell(
|
|
904
|
+
(row) => `| ${cell(row.scenarioId)} | ${cell(row.role)} | ${cell(renderEvalComparisonRoutesV1(row))} | ${row.family} | ${row.metric} | ${format(row.baseline.mean)} | ${format(row.baseline.variance)} | ${row.baseline.measured}/${row.baseline.observations} | ${format(row.candidate.mean)} | ${format(row.candidate.variance)} | ${row.candidate.measured}/${row.candidate.observations} | ${format(row.noiseBand)} | ${row.change} | ${row.varianceChange} | ${row.comparability.comparable ? "comparable" : cell(row.comparability.mismatchedFields.join(", "))} | ${row.hardGate ? "hard" : "informational"} |`
|
|
849
905
|
);
|
|
850
906
|
const scenarioRows = summary.scenarioReports.map(
|
|
851
907
|
(report) => `| ${cell(report.id)} | ${changeCounts2(report.metrics)} | ${changeCounts2(report.variance)} |`
|
|
@@ -858,10 +914,10 @@ function renderMarkdown(summary) {
|
|
|
858
914
|
"",
|
|
859
915
|
`Behavioral hard gate: **${summary.hardGate.pass ? "pass" : "fail"}**`,
|
|
860
916
|
...summary.hardGate.failures.map(
|
|
861
|
-
(failure) => `- Hard failure: ${failure.scenarioId} / ${failure.role} / ${failure
|
|
917
|
+
(failure) => `- Hard failure: ${failure.scenarioId} / ${failure.role} / ${renderEvalComparisonRoutesV1(failure)} / ${failure.metric}: ${failure.change}`
|
|
862
918
|
),
|
|
863
919
|
...summary.envelopeMismatches.map(
|
|
864
|
-
(mismatch) => `- Incomparable envelope: ${mismatch.scenarioId} / ${mismatch.role} / ${mismatch
|
|
920
|
+
(mismatch) => `- Incomparable envelope: ${mismatch.scenarioId} / ${mismatch.role} / ${renderEvalComparisonRoutesV1(mismatch)}: ${mismatch.fields.join(", ")}`
|
|
865
921
|
),
|
|
866
922
|
...summary.affectedCorpusResults.map(
|
|
867
923
|
(result) => `- Affected corpus result: ${result.scenarioId} / ${result.role}: ${result.changedFields.join(", ")}`
|
|
@@ -870,8 +926,8 @@ function renderMarkdown(summary) {
|
|
|
870
926
|
`Token delta: ${summary.tokenDelta === null ? "unmeasured" : summary.tokenDelta}`,
|
|
871
927
|
`Wall-time delta ms: ${summary.wallTimeDelta}`,
|
|
872
928
|
"",
|
|
873
|
-
"| Scenario | Role |
|
|
874
|
-
"
|
|
929
|
+
"| Scenario | Role | Baseline -> candidate target/model | Family | Metric | Baseline mean | Baseline variance | Baseline measured | Candidate mean | Candidate variance | Candidate measured | Noise band | Change | Variance | Comparability | Gate |",
|
|
930
|
+
"|---|---|---|---|---|---:|---:|---:|---:|---:|---:|---:|---|---|---|---|",
|
|
875
931
|
...rows,
|
|
876
932
|
"",
|
|
877
933
|
"## Per-scenario baseline/candidate report",
|
|
@@ -896,7 +952,7 @@ function renderJunit(summary) {
|
|
|
896
952
|
);
|
|
897
953
|
const represented = /* @__PURE__ */ new Set();
|
|
898
954
|
const cases = summary.behavioralMetrics.map((row) => {
|
|
899
|
-
const name = `${row.scenarioId}[${row.role}:${row
|
|
955
|
+
const name = `${row.scenarioId}[${row.role}:${renderEvalComparisonRoutesV1(row)}].${row.metric}`;
|
|
900
956
|
const key = JSON.stringify([row.scenarioId, row.role, row.target.id, row.target.model, row.metric]);
|
|
901
957
|
represented.add(key);
|
|
902
958
|
const detail = `change=${row.change} variance=${row.varianceChange} baseline=${format(row.baseline.mean)} candidate=${format(row.candidate.mean)}`;
|
|
@@ -911,13 +967,13 @@ function renderJunit(summary) {
|
|
|
911
967
|
failure.metric
|
|
912
968
|
]);
|
|
913
969
|
if (represented.has(key)) continue;
|
|
914
|
-
const name = `${failure.scenarioId}[${failure.role}:${failure
|
|
970
|
+
const name = `${failure.scenarioId}[${failure.role}:${renderEvalComparisonRoutesV1(failure)}].${failure.metric}`;
|
|
915
971
|
cases.push(
|
|
916
972
|
` <testcase classname="eval.behavior.hard" name="${escapeXml(name)}"><failure message="${escapeXml(failure.change)}">hard behavioral gate</failure></testcase>`
|
|
917
973
|
);
|
|
918
974
|
}
|
|
919
975
|
for (const failure of summary.hardGate.envelopeFailures) {
|
|
920
|
-
const name = `${failure.scenarioId}[${failure.role}:${failure
|
|
976
|
+
const name = `${failure.scenarioId}[${failure.role}:${renderEvalComparisonRoutesV1(failure)}].execution-envelope`;
|
|
921
977
|
cases.push(
|
|
922
978
|
` <testcase classname="eval.behavior.envelope" name="${escapeXml(name)}"><failure message="incomparable">${escapeXml(failure.fields.join(", "))}</failure></testcase>`
|
|
923
979
|
);
|
|
@@ -1261,6 +1317,7 @@ function readVerify(value, path, issues) {
|
|
|
1261
1317
|
return {
|
|
1262
1318
|
commands: readOptionalStringArray(value, "commands", `${path}.commands`, issues),
|
|
1263
1319
|
measure: readOptionalStringArray(value, "measure", `${path}.measure`, issues),
|
|
1320
|
+
protectedFiles: readOptionalStringArray(value, "protectedFiles", `${path}.protectedFiles`, issues),
|
|
1264
1321
|
assertions: readAssertions(value.assertions, `${path}.assertions`, issues),
|
|
1265
1322
|
forbidPaths: readOptionalStringArray(value, "forbidPaths", `${path}.forbidPaths`, issues)
|
|
1266
1323
|
};
|
|
@@ -1481,9 +1538,10 @@ function resolveTargets(targets, options) {
|
|
|
1481
1538
|
|
|
1482
1539
|
// src/domains/eval/suites/run.ts
|
|
1483
1540
|
init_esm_shims();
|
|
1484
|
-
import {
|
|
1541
|
+
import { constants } from "node:fs";
|
|
1542
|
+
import { lstat as lstat3, mkdir, mkdtemp as mkdtemp3, open, readdir, realpath, rm as rm3, writeFile } from "node:fs/promises";
|
|
1485
1543
|
import { tmpdir as tmpdir3 } from "node:os";
|
|
1486
|
-
import { resolve as
|
|
1544
|
+
import { isAbsolute as isAbsolute3, relative as relative4, resolve as resolve9, sep as sep3 } from "node:path";
|
|
1487
1545
|
|
|
1488
1546
|
// src/domains/eval/execution-provenance.ts
|
|
1489
1547
|
init_esm_shims();
|
|
@@ -1644,6 +1702,9 @@ function sha256(value) {
|
|
|
1644
1702
|
|
|
1645
1703
|
// src/domains/eval/metrics/context.ts
|
|
1646
1704
|
init_esm_shims();
|
|
1705
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
1706
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
1707
|
+
import { join } from "node:path";
|
|
1647
1708
|
function collectContextMetrics(cwd) {
|
|
1648
1709
|
try {
|
|
1649
1710
|
const codewiki = readCodewiki(cwd);
|
|
@@ -1651,13 +1712,26 @@ function collectContextMetrics(cwd) {
|
|
|
1651
1712
|
const visiblePaths = new Set(enumerateWorkspaceFiles(cwd));
|
|
1652
1713
|
const artifactSourceFiles = codewiki.files.filter((file) => file.lang !== "config");
|
|
1653
1714
|
const indexedFiles = artifactSourceFiles.filter((file) => visiblePaths.has(file.path)).length;
|
|
1654
|
-
|
|
1715
|
+
let contentValidFiles = 0;
|
|
1716
|
+
let missingFiles = 0;
|
|
1717
|
+
for (const file of artifactSourceFiles) {
|
|
1718
|
+
try {
|
|
1719
|
+
const hash = createHash3("sha256").update(readFileSync2(join(cwd, file.path), "utf8")).digest("hex").slice(0, 16);
|
|
1720
|
+
if (visiblePaths.has(file.path) && file.hash === hash) contentValidFiles += 1;
|
|
1721
|
+
} catch (error) {
|
|
1722
|
+
const code = error.code;
|
|
1723
|
+
if (code === "ENOENT" || code === "ENOTDIR") missingFiles += 1;
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
const staleFiles = artifactSourceFiles.length - contentValidFiles;
|
|
1655
1727
|
const sourceFiles = detectProjectProfile(cwd).sourceFiles;
|
|
1656
1728
|
const digest = renderCodewikiDigest(codewiki);
|
|
1657
1729
|
return {
|
|
1658
1730
|
"context.indexedFiles": indexedFiles,
|
|
1659
1731
|
"context.artifactFiles": artifactSourceFiles.length,
|
|
1660
1732
|
"context.staleFiles": staleFiles,
|
|
1733
|
+
"context.contentValidFiles": contentValidFiles,
|
|
1734
|
+
"context.missingFiles": missingFiles,
|
|
1661
1735
|
"context.coverage": sourceFiles === 0 ? artifactSourceFiles.length === 0 ? 1 : 0 : indexedFiles / sourceFiles,
|
|
1662
1736
|
"context.structuralHash": structuralCodewikiHash(codewiki),
|
|
1663
1737
|
"context.digestTokens": Math.ceil(digest.length / 4)
|
|
@@ -1667,6 +1741,8 @@ function collectContextMetrics(cwd) {
|
|
|
1667
1741
|
"context.indexedFiles": 0,
|
|
1668
1742
|
"context.artifactFiles": 0,
|
|
1669
1743
|
"context.staleFiles": 0,
|
|
1744
|
+
"context.contentValidFiles": 0,
|
|
1745
|
+
"context.missingFiles": 0,
|
|
1670
1746
|
"context.coverage": 0,
|
|
1671
1747
|
"context.structuralHash": null,
|
|
1672
1748
|
"context.digestTokens": 0
|
|
@@ -1769,13 +1845,13 @@ function isRecord3(value) {
|
|
|
1769
1845
|
|
|
1770
1846
|
// src/domains/eval/metrics/invariants.ts
|
|
1771
1847
|
init_esm_shims();
|
|
1772
|
-
import { existsSync, readdirSync, readFileSync as
|
|
1773
|
-
import { join } from "node:path";
|
|
1848
|
+
import { existsSync, readdirSync, readFileSync as readFileSync3 } from "node:fs";
|
|
1849
|
+
import { join as join2 } from "node:path";
|
|
1774
1850
|
function readRunJournal(stateDir) {
|
|
1775
1851
|
if (!existsSync(stateDir)) return null;
|
|
1776
1852
|
return {
|
|
1777
|
-
envelopes: readEnvelopes(
|
|
1778
|
-
...readReceipts(
|
|
1853
|
+
envelopes: readEnvelopes(join2(stateDir, "runs.json")),
|
|
1854
|
+
...readReceipts(join2(stateDir, "receipts"))
|
|
1779
1855
|
};
|
|
1780
1856
|
}
|
|
1781
1857
|
function readEnvelopes(runsPath) {
|
|
@@ -1783,7 +1859,7 @@ function readEnvelopes(runsPath) {
|
|
|
1783
1859
|
if (!existsSync(runsPath)) return envelopes;
|
|
1784
1860
|
let parsed;
|
|
1785
1861
|
try {
|
|
1786
|
-
parsed = JSON.parse(
|
|
1862
|
+
parsed = JSON.parse(readFileSync3(runsPath, "utf8"));
|
|
1787
1863
|
} catch {
|
|
1788
1864
|
return envelopes;
|
|
1789
1865
|
}
|
|
@@ -1804,7 +1880,7 @@ function readReceipts(receiptsDir) {
|
|
|
1804
1880
|
const receipts = [];
|
|
1805
1881
|
for (const name of names) {
|
|
1806
1882
|
try {
|
|
1807
|
-
const parsed = JSON.parse(
|
|
1883
|
+
const parsed = JSON.parse(readFileSync3(join2(receiptsDir, name), "utf8"));
|
|
1808
1884
|
if (isReceiptShaped(parsed)) receipts.push(parsed);
|
|
1809
1885
|
} catch {
|
|
1810
1886
|
}
|
|
@@ -1873,7 +1949,7 @@ function isRootReceipt(receipt) {
|
|
|
1873
1949
|
return receipt.lineage === void 0 || receipt.lineage.rootRunId === receipt.runId;
|
|
1874
1950
|
}
|
|
1875
1951
|
function sessionInvariantMetrics(stateDir) {
|
|
1876
|
-
const sessionDirs = findSessionDirs(
|
|
1952
|
+
const sessionDirs = findSessionDirs(join2(stateDir, "sessions"));
|
|
1877
1953
|
if (sessionDirs.length === 0) return {};
|
|
1878
1954
|
let formatVersion = Number.POSITIVE_INFINITY;
|
|
1879
1955
|
let toolPairsUnmatched = 0;
|
|
@@ -1882,7 +1958,7 @@ function sessionInvariantMetrics(stateDir) {
|
|
|
1882
1958
|
let answeredFromPreCompaction = false;
|
|
1883
1959
|
let turnsAfterCompaction = 0;
|
|
1884
1960
|
for (const sessionDir of sessionDirs) {
|
|
1885
|
-
const transcript = readSessionTranscript(
|
|
1961
|
+
const transcript = readSessionTranscript(join2(sessionDir, "current.jsonl"));
|
|
1886
1962
|
formatVersion = Math.min(formatVersion, transcript.formatVersion);
|
|
1887
1963
|
toolPairsUnmatched += transcript.toolPairsUnmatched;
|
|
1888
1964
|
assistantBetweenCallAndResult += transcript.assistantBetweenCallAndResult;
|
|
@@ -1905,10 +1981,10 @@ function findSessionDirs(sessionsRoot) {
|
|
|
1905
1981
|
const dirs = [];
|
|
1906
1982
|
for (const cwdDir of readdirSync(sessionsRoot, { withFileTypes: true })) {
|
|
1907
1983
|
if (!cwdDir.isDirectory()) continue;
|
|
1908
|
-
const cwdPath =
|
|
1984
|
+
const cwdPath = join2(sessionsRoot, cwdDir.name);
|
|
1909
1985
|
try {
|
|
1910
1986
|
for (const sessionDir of readdirSync(cwdPath, { withFileTypes: true })) {
|
|
1911
|
-
if (sessionDir.isDirectory()) dirs.push(
|
|
1987
|
+
if (sessionDir.isDirectory()) dirs.push(join2(cwdPath, sessionDir.name));
|
|
1912
1988
|
}
|
|
1913
1989
|
} catch {
|
|
1914
1990
|
}
|
|
@@ -1921,7 +1997,7 @@ function findSessionDirs(sessionsRoot) {
|
|
|
1921
1997
|
function readSessionTranscript(path) {
|
|
1922
1998
|
let lines;
|
|
1923
1999
|
try {
|
|
1924
|
-
lines =
|
|
2000
|
+
lines = readFileSync3(path, "utf8").split(/\r?\n/u);
|
|
1925
2001
|
} catch {
|
|
1926
2002
|
return {
|
|
1927
2003
|
formatVersion: 0,
|
|
@@ -2041,7 +2117,7 @@ function isProcessAlive(pid) {
|
|
|
2041
2117
|
}
|
|
2042
2118
|
}
|
|
2043
2119
|
function writeBoundaryInvariantMetrics(stateDir) {
|
|
2044
|
-
const files = findWriteBoundaryVerdicts(
|
|
2120
|
+
const files = findWriteBoundaryVerdicts(join2(stateDir, "write-boundaries"));
|
|
2045
2121
|
if (files.length === 0) return {};
|
|
2046
2122
|
let sealed = true;
|
|
2047
2123
|
let violationsDetected = 0;
|
|
@@ -2072,10 +2148,10 @@ function findWriteBoundaryVerdicts(root) {
|
|
|
2072
2148
|
try {
|
|
2073
2149
|
for (const rootDir of readdirSync(root, { withFileTypes: true })) {
|
|
2074
2150
|
if (!rootDir.isDirectory()) continue;
|
|
2075
|
-
const dir =
|
|
2151
|
+
const dir = join2(root, rootDir.name);
|
|
2076
2152
|
try {
|
|
2077
2153
|
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
2078
|
-
if (entry.isFile() && entry.name.endsWith(".json")) files.push(
|
|
2154
|
+
if (entry.isFile() && entry.name.endsWith(".json")) files.push(join2(dir, entry.name));
|
|
2079
2155
|
}
|
|
2080
2156
|
} catch {
|
|
2081
2157
|
}
|
|
@@ -2087,7 +2163,7 @@ function findWriteBoundaryVerdicts(root) {
|
|
|
2087
2163
|
}
|
|
2088
2164
|
function parseJsonFile(path) {
|
|
2089
2165
|
try {
|
|
2090
|
-
const parsed = JSON.parse(
|
|
2166
|
+
const parsed = JSON.parse(readFileSync3(path, "utf8"));
|
|
2091
2167
|
return isRecord4(parsed) ? parsed : void 0;
|
|
2092
2168
|
} catch {
|
|
2093
2169
|
return void 0;
|
|
@@ -2290,7 +2366,7 @@ function zeroToolCallMetrics() {
|
|
|
2290
2366
|
// src/domains/eval/metrics/tracked.ts
|
|
2291
2367
|
init_esm_shims();
|
|
2292
2368
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
2293
|
-
import { dirname as dirname2, join as
|
|
2369
|
+
import { dirname as dirname2, join as join3 } from "node:path";
|
|
2294
2370
|
function selectEvalLedgerEntries(durable, stream) {
|
|
2295
2371
|
const sessionCalls = assistantCalls(durable).length;
|
|
2296
2372
|
const streamCalls = assistantCalls(stream).length;
|
|
@@ -2314,7 +2390,7 @@ async function readEvalLedgerSnapshot(stateDir) {
|
|
|
2314
2390
|
} catch {
|
|
2315
2391
|
}
|
|
2316
2392
|
try {
|
|
2317
|
-
const manifest = await readFile2(
|
|
2393
|
+
const manifest = await readFile2(join3(dirname2(ref.path), "prompt-manifest.jsonl"), "utf8");
|
|
2318
2394
|
for (const line of manifest.split(/\r?\n/u)) {
|
|
2319
2395
|
const record = parseJsonRecord2(line);
|
|
2320
2396
|
if (record === null) continue;
|
|
@@ -2327,7 +2403,7 @@ async function readEvalLedgerSnapshot(stateDir) {
|
|
|
2327
2403
|
} catch {
|
|
2328
2404
|
}
|
|
2329
2405
|
try {
|
|
2330
|
-
const snapshots = await readFile2(
|
|
2406
|
+
const snapshots = await readFile2(join3(dirname2(ref.path), "context-snapshots.jsonl"), "utf8");
|
|
2331
2407
|
for (const line of snapshots.split(/\r?\n/u)) {
|
|
2332
2408
|
const record = parseJsonRecord2(line);
|
|
2333
2409
|
if (record === null) continue;
|
|
@@ -2580,14 +2656,7 @@ function promptManifestObservation(record) {
|
|
|
2580
2656
|
return contentHash === null ? [] : [{ id: entry.id, contentHash }];
|
|
2581
2657
|
});
|
|
2582
2658
|
const preload = record.projectPreload;
|
|
2583
|
-
const projectPreload =
|
|
2584
|
-
mode: preload.mode,
|
|
2585
|
-
chars: preload.chars,
|
|
2586
|
-
lines: preload.lines,
|
|
2587
|
-
reason: nullableString(preload.reason),
|
|
2588
|
-
nearLimit: preload.nearLimit,
|
|
2589
|
-
label: preload.label
|
|
2590
|
-
} : null;
|
|
2659
|
+
const projectPreload = isProjectPreloadClass(preload) ? preload : null;
|
|
2591
2660
|
return {
|
|
2592
2661
|
systemPromptHash,
|
|
2593
2662
|
thinkingLevel: nullableString(record.thinkingLevel),
|
|
@@ -2611,8 +2680,8 @@ import { isAbsolute, relative, resolve as resolve2, sep } from "node:path";
|
|
|
2611
2680
|
|
|
2612
2681
|
// src/domains/eval/metrics/evidence.ts
|
|
2613
2682
|
init_esm_shims();
|
|
2614
|
-
import { readFileSync as
|
|
2615
|
-
import { join as
|
|
2683
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
2684
|
+
import { join as join4 } from "node:path";
|
|
2616
2685
|
function dispatchScopeMetrics(receipt) {
|
|
2617
2686
|
const scope = receipt.pathScope;
|
|
2618
2687
|
if (scope === void 0) return {};
|
|
@@ -2676,7 +2745,7 @@ function evidenceTrustMetrics(receipt, envelope) {
|
|
|
2676
2745
|
}
|
|
2677
2746
|
function readRunEnvelopeForReceipt(receipt, stateDir) {
|
|
2678
2747
|
try {
|
|
2679
|
-
const parsed = JSON.parse(
|
|
2748
|
+
const parsed = JSON.parse(readFileSync4(join4(stateDir, "runs.json"), "utf8"));
|
|
2680
2749
|
if (!Array.isArray(parsed)) return null;
|
|
2681
2750
|
const row = parsed.find(
|
|
2682
2751
|
(entry) => typeof entry === "object" && entry !== null && entry.id === receipt.runId
|
|
@@ -3073,7 +3142,7 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
3073
3142
|
}
|
|
3074
3143
|
function runShellCommand(command, cwd, timeoutMs, env) {
|
|
3075
3144
|
const started = performance2.now();
|
|
3076
|
-
return new Promise((
|
|
3145
|
+
return new Promise((resolve11) => {
|
|
3077
3146
|
let stdout = "";
|
|
3078
3147
|
let stderr = "";
|
|
3079
3148
|
const metricCapture = createJsonlMetricCapture();
|
|
@@ -3109,7 +3178,7 @@ function runShellCommand(command, cwd, timeoutMs, env) {
|
|
|
3109
3178
|
if (settled) return;
|
|
3110
3179
|
settled = true;
|
|
3111
3180
|
clearTimeout(timer);
|
|
3112
|
-
|
|
3181
|
+
resolve11({
|
|
3113
3182
|
command: commandLine,
|
|
3114
3183
|
exitCode,
|
|
3115
3184
|
stdout,
|
|
@@ -3379,19 +3448,22 @@ function toolBehaviorMetricEntriesFromJsonl(stdout, cwd, readObservation) {
|
|
|
3379
3448
|
const terminals = canonicalFinishes.length > 0 ? canonicalFinishes : executionEnds;
|
|
3380
3449
|
const calls = /* @__PURE__ */ new Map();
|
|
3381
3450
|
const succeeded = /* @__PURE__ */ new Map();
|
|
3451
|
+
const failed = /* @__PURE__ */ new Map();
|
|
3382
3452
|
const blocked = /* @__PURE__ */ new Map();
|
|
3383
3453
|
for (const terminal of terminals) {
|
|
3384
3454
|
const tool = metricToolName(terminal.tool);
|
|
3385
3455
|
calls.set(tool, (calls.get(tool) ?? 0) + 1);
|
|
3386
3456
|
if (terminal.outcome === "ok") succeeded.set(tool, (succeeded.get(tool) ?? 0) + 1);
|
|
3387
3457
|
if (terminal.outcome === "blocked") blocked.set(tool, (blocked.get(tool) ?? 0) + 1);
|
|
3458
|
+
if (terminal.outcome === "error") failed.set(tool, (failed.get(tool) ?? 0) + 1);
|
|
3388
3459
|
}
|
|
3389
|
-
const namedTools = /* @__PURE__ */ new Set([
|
|
3460
|
+
const namedTools = /* @__PURE__ */ new Set([...ALL_TOOL_NAMES, ...calls.keys()]);
|
|
3390
3461
|
const entries = { "tools.read.distinctPaths": readPaths.size };
|
|
3391
3462
|
for (const tool of [...namedTools].sort()) {
|
|
3392
3463
|
entries[`tools.calls.${tool}`] = calls.get(tool) ?? 0;
|
|
3393
3464
|
entries[`tools.succeeded.${tool}`] = succeeded.get(tool) ?? 0;
|
|
3394
3465
|
entries[`tools.blocked.${tool}`] = blocked.get(tool) ?? 0;
|
|
3466
|
+
entries[`tools.failed.${tool}`] = failed.get(tool) ?? 0;
|
|
3395
3467
|
}
|
|
3396
3468
|
if (readObservation !== void 0) {
|
|
3397
3469
|
const allowed = readObservation.allowedPaths.map((path) => normalizeObservedPath(cwd, path));
|
|
@@ -3484,7 +3556,7 @@ function parseContextIndexOutput(stdout) {
|
|
|
3484
3556
|
// src/domains/eval/runners/context-init.ts
|
|
3485
3557
|
init_esm_shims();
|
|
3486
3558
|
import { existsSync as existsSync2, statSync } from "node:fs";
|
|
3487
|
-
import { join as
|
|
3559
|
+
import { join as join5 } from "node:path";
|
|
3488
3560
|
async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, env) {
|
|
3489
3561
|
const extraArgs = runner.args ?? [];
|
|
3490
3562
|
const args = [
|
|
@@ -3517,7 +3589,7 @@ async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, e
|
|
|
3517
3589
|
const effectiveRuntimeKind = stringField3(run, "runtimeKind");
|
|
3518
3590
|
const effectiveThinking = stringField3(run, "thinkingLevel");
|
|
3519
3591
|
const structuredOutputMode = stringField3(run, "structuredOutputMode");
|
|
3520
|
-
const clioMdPath =
|
|
3592
|
+
const clioMdPath = join5(cwd, "CLIO-CODER.md");
|
|
3521
3593
|
const clioMdBytes = existsSync2(clioMdPath) ? statSync(clioMdPath).size : 0;
|
|
3522
3594
|
return {
|
|
3523
3595
|
assignmentId: null,
|
|
@@ -3654,7 +3726,7 @@ function stringField3(value, field) {
|
|
|
3654
3726
|
|
|
3655
3727
|
// src/domains/eval/schema/adapter.ts
|
|
3656
3728
|
init_esm_shims();
|
|
3657
|
-
import { createHash as
|
|
3729
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
3658
3730
|
function adaptSuiteV2ResultToVerdictV1(result, trackedMetrics) {
|
|
3659
3731
|
const machinery = result.pass || result.failureClass === "grader_failed" ? "ok" : "infrastructure_failure";
|
|
3660
3732
|
const outcome = result.pass ? "pass" : "fail";
|
|
@@ -3688,7 +3760,7 @@ function adaptSuiteV2ResultToBehaviorV1(result, verdict, scenario) {
|
|
|
3688
3760
|
observedSources.add(source);
|
|
3689
3761
|
if (!requestedFacts.has(`${source}\0${key}`)) return [];
|
|
3690
3762
|
const serialized = JSON.stringify({ source, key, value });
|
|
3691
|
-
const digest =
|
|
3763
|
+
const digest = createHash4("sha256").update(serialized, "utf8").digest("hex");
|
|
3692
3764
|
const fact = {
|
|
3693
3765
|
id: `metric-${digest.slice(0, 16)}`,
|
|
3694
3766
|
source,
|
|
@@ -3743,12 +3815,93 @@ function forbiddenPathHits(cwd, paths) {
|
|
|
3743
3815
|
return paths.filter((path) => existsSync3(resolve3(cwd, path)));
|
|
3744
3816
|
}
|
|
3745
3817
|
|
|
3818
|
+
// src/domains/eval/verifiers/integrity.ts
|
|
3819
|
+
init_esm_shims();
|
|
3820
|
+
import { createHash as createHash5 } from "node:crypto";
|
|
3821
|
+
import { lstat, readFile as readFile3 } from "node:fs/promises";
|
|
3822
|
+
import { isAbsolute as isAbsolute2, relative as relative2, resolve as resolve4, sep as sep2 } from "node:path";
|
|
3823
|
+
var EvalGraderIntegrityError = class extends Error {
|
|
3824
|
+
};
|
|
3825
|
+
async function protectGraderFiles(cwd, files) {
|
|
3826
|
+
const paths = files.map((file) => {
|
|
3827
|
+
const path = resolve4(cwd, file);
|
|
3828
|
+
const rel = relative2(cwd, path);
|
|
3829
|
+
if (isAbsolute2(file) || rel === ".." || rel.startsWith(`..${sep2}`))
|
|
3830
|
+
throw new EvalGraderIntegrityError(`grader dependency escapes workspace: ${file}`);
|
|
3831
|
+
return path;
|
|
3832
|
+
});
|
|
3833
|
+
const fingerprint = async (path) => {
|
|
3834
|
+
let current = path;
|
|
3835
|
+
while (current !== resolve4(cwd)) {
|
|
3836
|
+
if ((await lstat(current)).isSymbolicLink())
|
|
3837
|
+
throw new EvalGraderIntegrityError(`grader dependency is a symlink: ${path}`);
|
|
3838
|
+
current = resolve4(current, "..");
|
|
3839
|
+
}
|
|
3840
|
+
return createHash5("sha256").update(await readFile3(path)).digest("hex");
|
|
3841
|
+
};
|
|
3842
|
+
const hashes = await Promise.all(paths.map(fingerprint));
|
|
3843
|
+
return async () => {
|
|
3844
|
+
for (const [index, path] of paths.entries()) {
|
|
3845
|
+
try {
|
|
3846
|
+
if (await fingerprint(path) === hashes[index]) continue;
|
|
3847
|
+
} catch {
|
|
3848
|
+
}
|
|
3849
|
+
throw new EvalGraderIntegrityError(`grader dependency changed during trial: ${relative2(cwd, path)}`);
|
|
3850
|
+
}
|
|
3851
|
+
};
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3746
3854
|
// src/domains/eval/verifiers/patch.ts
|
|
3747
3855
|
init_esm_shims();
|
|
3748
3856
|
import { spawnSync } from "node:child_process";
|
|
3857
|
+
import { createHash as createHash6 } from "node:crypto";
|
|
3858
|
+
import { readdirSync as readdirSync2, readFileSync as readFileSync5, readlinkSync } from "node:fs";
|
|
3859
|
+
import { join as join6, resolve as resolve5 } from "node:path";
|
|
3860
|
+
var baselines = /* @__PURE__ */ new Map();
|
|
3861
|
+
function recordPatchBaseline(cwd) {
|
|
3862
|
+
baselines.set(resolve5(cwd), snapshotFiles(cwd));
|
|
3863
|
+
}
|
|
3864
|
+
function forgetPatchBaseline(cwd) {
|
|
3865
|
+
baselines.delete(resolve5(cwd));
|
|
3866
|
+
}
|
|
3867
|
+
function snapshotFiles(cwd) {
|
|
3868
|
+
const files = /* @__PURE__ */ new Map();
|
|
3869
|
+
function walk(dir, prefix) {
|
|
3870
|
+
for (const entry of readdirSync2(dir, { withFileTypes: true })) {
|
|
3871
|
+
if (entry.name === ".git") continue;
|
|
3872
|
+
const path = join6(dir, entry.name);
|
|
3873
|
+
const relative5 = prefix + entry.name;
|
|
3874
|
+
if (entry.isDirectory()) walk(path, `${relative5}/`);
|
|
3875
|
+
else if (entry.isFile() || entry.isSymbolicLink()) {
|
|
3876
|
+
const bytes = entry.isSymbolicLink() ? Buffer.from(readlinkSync(path)) : readFileSync5(path);
|
|
3877
|
+
files.set(relative5, {
|
|
3878
|
+
hash: createHash6("sha256").update(entry.isSymbolicLink() ? "link:" : "file:").update(bytes).digest("hex"),
|
|
3879
|
+
bytes: bytes.length
|
|
3880
|
+
});
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
}
|
|
3884
|
+
walk(cwd, "");
|
|
3885
|
+
return files;
|
|
3886
|
+
}
|
|
3749
3887
|
function collectPatchMetrics(cwd) {
|
|
3888
|
+
const baseline = baselines.get(resolve5(cwd));
|
|
3889
|
+
if (baseline !== void 0) {
|
|
3890
|
+
const current = snapshotFiles(cwd);
|
|
3891
|
+
const changed = [.../* @__PURE__ */ new Set([...baseline.keys(), ...current.keys()])].filter(
|
|
3892
|
+
(path) => baseline.get(path)?.hash !== current.get(path)?.hash
|
|
3893
|
+
);
|
|
3894
|
+
return {
|
|
3895
|
+
// For hash baselines this is changed file content bytes, including deleted
|
|
3896
|
+
// content, rather than a textual Git diff (which cannot represent all files).
|
|
3897
|
+
bytes: changed.reduce((sum2, path) => sum2 + (current.get(path)?.bytes ?? baseline.get(path)?.bytes ?? 0), 0),
|
|
3898
|
+
filesChanged: changed.length,
|
|
3899
|
+
testFilesModified: changed.filter((file) => /(^|\/)(test|tests|spec|__tests__)(\/|$)|\.(test|spec)\./.test(file)).length
|
|
3900
|
+
};
|
|
3901
|
+
}
|
|
3750
3902
|
const diff = spawnSync("git", ["diff", "--", "."], { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] });
|
|
3751
|
-
|
|
3903
|
+
if (diff.status !== 0 || typeof diff.stdout !== "string") return null;
|
|
3904
|
+
const text = diff.stdout;
|
|
3752
3905
|
const files = text.split(/\r?\n/).filter((line) => line.startsWith("diff --git ")).map((line) => line.split(" b/")[1] ?? "");
|
|
3753
3906
|
return {
|
|
3754
3907
|
bytes: Buffer.byteLength(text, "utf8"),
|
|
@@ -3762,10 +3915,10 @@ init_esm_shims();
|
|
|
3762
3915
|
import { spawn as spawn2 } from "node:child_process";
|
|
3763
3916
|
import { mkdtemp, rm } from "node:fs/promises";
|
|
3764
3917
|
import { tmpdir } from "node:os";
|
|
3765
|
-
import { resolve as
|
|
3918
|
+
import { resolve as resolve6 } from "node:path";
|
|
3766
3919
|
async function prepareGitWorkspace(workspace) {
|
|
3767
3920
|
if (workspace.url === void 0) throw new Error("git workspace requires url");
|
|
3768
|
-
const dest = await mkdtemp(
|
|
3921
|
+
const dest = await mkdtemp(resolve6(tmpdir(), "clio-coder-eval-git-"));
|
|
3769
3922
|
try {
|
|
3770
3923
|
await runGit(["clone", "--quiet", workspace.url, dest], process.cwd());
|
|
3771
3924
|
const ref = workspace.checkout ?? workspace.commit;
|
|
@@ -3800,9 +3953,9 @@ function runGit(args, cwd) {
|
|
|
3800
3953
|
// src/domains/eval/workspaces/local.ts
|
|
3801
3954
|
init_esm_shims();
|
|
3802
3955
|
import { access } from "node:fs/promises";
|
|
3803
|
-
import { resolve as
|
|
3956
|
+
import { resolve as resolve7 } from "node:path";
|
|
3804
3957
|
async function prepareLocalWorkspace(baseDir, workspace) {
|
|
3805
|
-
const dir =
|
|
3958
|
+
const dir = resolve7(baseDir, workspace.path ?? ".");
|
|
3806
3959
|
await access(dir);
|
|
3807
3960
|
return { dir, cleanup: async () => {
|
|
3808
3961
|
} };
|
|
@@ -3811,26 +3964,28 @@ async function prepareLocalWorkspace(baseDir, workspace) {
|
|
|
3811
3964
|
// src/domains/eval/workspaces/temp-copy.ts
|
|
3812
3965
|
init_esm_shims();
|
|
3813
3966
|
import { execFile } from "node:child_process";
|
|
3814
|
-
import { cp, lstat, mkdtemp as mkdtemp2, rm as rm2 } from "node:fs/promises";
|
|
3967
|
+
import { cp, lstat as lstat2, mkdtemp as mkdtemp2, rm as rm2 } from "node:fs/promises";
|
|
3815
3968
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
3816
|
-
import { relative as
|
|
3969
|
+
import { relative as relative3, resolve as resolve8 } from "node:path";
|
|
3817
3970
|
import { promisify } from "node:util";
|
|
3818
3971
|
var execFileAsync = promisify(execFile);
|
|
3819
3972
|
var GIT_FILE_LIST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
3820
3973
|
async function prepareTempCopyWorkspace(baseDir, workspace, options = {}) {
|
|
3821
|
-
const source =
|
|
3822
|
-
const dest = await mkdtemp2(
|
|
3974
|
+
const source = resolve8(baseDir, workspace.path ?? ".");
|
|
3975
|
+
const dest = await mkdtemp2(resolve8(options.tempRoot ?? tmpdir2(), "clio-coder-eval-workspace-"));
|
|
3823
3976
|
try {
|
|
3824
3977
|
const selection = await gitCopySelection(source);
|
|
3825
3978
|
const excludes = workspace.excludes ?? [];
|
|
3826
3979
|
const copyWorkspace = options.copy ?? defaultCopy;
|
|
3827
3980
|
await copyWorkspace(source, dest, {
|
|
3828
3981
|
recursive: true,
|
|
3829
|
-
filter: (path) => shouldCopy(
|
|
3982
|
+
filter: (path) => shouldCopy(relative3(source, path), excludes, selection)
|
|
3830
3983
|
});
|
|
3984
|
+
recordPatchBaseline(dest);
|
|
3831
3985
|
return {
|
|
3832
3986
|
dir: dest,
|
|
3833
3987
|
cleanup: async () => {
|
|
3988
|
+
forgetPatchBaseline(dest);
|
|
3834
3989
|
await rm2(dest, { recursive: true, force: true });
|
|
3835
3990
|
}
|
|
3836
3991
|
};
|
|
@@ -3903,16 +4058,16 @@ function normalizeGitPath(path) {
|
|
|
3903
4058
|
return normalized;
|
|
3904
4059
|
}
|
|
3905
4060
|
async function hasGitMarker(source) {
|
|
3906
|
-
let current =
|
|
4061
|
+
let current = resolve8(source);
|
|
3907
4062
|
while (true) {
|
|
3908
4063
|
try {
|
|
3909
|
-
await
|
|
4064
|
+
await lstat2(resolve8(current, ".git"));
|
|
3910
4065
|
return true;
|
|
3911
4066
|
} catch (error) {
|
|
3912
4067
|
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
3913
4068
|
if (code !== "ENOENT" && code !== "ENOTDIR") throw error;
|
|
3914
4069
|
}
|
|
3915
|
-
const parent =
|
|
4070
|
+
const parent = resolve8(current, "..");
|
|
3916
4071
|
if (parent === current) return false;
|
|
3917
4072
|
current = parent;
|
|
3918
4073
|
}
|
|
@@ -3959,7 +4114,8 @@ async function runEvalSuiteV2(loaded, options) {
|
|
|
3959
4114
|
item.repeatIndex,
|
|
3960
4115
|
options.clioEntry,
|
|
3961
4116
|
options.freshWorkspaces === true,
|
|
3962
|
-
options.tempCopy
|
|
4117
|
+
options.tempCopy,
|
|
4118
|
+
resolve9(clioDataDir(), "evals", evalId, "transcripts", String(results.length))
|
|
3963
4119
|
);
|
|
3964
4120
|
spentUsd += resultCostUsd(completed.result);
|
|
3965
4121
|
results.push(completed.result);
|
|
@@ -3996,27 +4152,33 @@ function budgetExhaustedResult(loaded, task, target, repeatIndex, spentUsd, maxC
|
|
|
3996
4152
|
attachExecutionEnvelope(result, task, target, loaded.baseDir, null, emptyLedgerSnapshot());
|
|
3997
4153
|
return result;
|
|
3998
4154
|
}
|
|
3999
|
-
async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry, freshWorkspace, tempCopy) {
|
|
4155
|
+
async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry, freshWorkspace, tempCopy, transcriptDir) {
|
|
4000
4156
|
let workspace = null;
|
|
4001
4157
|
let receipt = null;
|
|
4002
4158
|
let runnerWallTimeMs = 0;
|
|
4159
|
+
let runnerEvidence = null;
|
|
4160
|
+
let retention;
|
|
4003
4161
|
let executionObservation;
|
|
4004
|
-
const stateDir = await mkdtemp3(
|
|
4162
|
+
const stateDir = await mkdtemp3(resolve9(tempCopy?.tempRoot ?? tmpdir3(), "clio-coder-eval-state-"));
|
|
4005
4163
|
try {
|
|
4006
4164
|
workspace = await prepareWorkspace(loaded.baseDir, task, freshWorkspace, tempCopy);
|
|
4007
4165
|
const setup = await runCommandVerifiers(task.workspace.setup ?? [], workspace.dir, task.timeoutMs);
|
|
4008
4166
|
if (!setup.pass) throw new EvalWorkspaceSetupError(setup.exitCode, setup.stderr);
|
|
4167
|
+
if (task.workspace.kind !== "local" || freshWorkspace) recordPatchBaseline(workspace.dir);
|
|
4168
|
+
const checkGraderIntegrity = await protectGraderFiles(workspace.dir, task.verify.protectedFiles ?? []);
|
|
4009
4169
|
const runner = await runTaskRunner(task, target, workspace.dir, clioEntry, {
|
|
4010
4170
|
CLIO_CODER_STATE_DIR: stateDir,
|
|
4011
4171
|
CLIO_CODER_ENTRY: clioEntry
|
|
4012
4172
|
});
|
|
4013
|
-
|
|
4014
|
-
await writeFile(runnerStdoutFile, runner.stdout, "utf8");
|
|
4173
|
+
runnerEvidence = runner;
|
|
4015
4174
|
receipt = runner.receipt ?? null;
|
|
4016
4175
|
runnerWallTimeMs = runner.wallTimeMs;
|
|
4176
|
+
const runnerStdoutFile = resolve9(stateDir, "eval-runner-output.jsonl");
|
|
4177
|
+
await writeFile(runnerStdoutFile, runner.stdout, { encoding: "utf8", mode: 384, flag: "wx" });
|
|
4017
4178
|
const patch = collectPatchMetrics(workspace.dir);
|
|
4018
4179
|
const receiptExitCode = runner.exitCode;
|
|
4019
4180
|
const journalMetrics = invariantMetrics(stateDir, receiptExitCode);
|
|
4181
|
+
await checkGraderIntegrity();
|
|
4020
4182
|
const measurement = await measureTaskOutcome(task, workspace.dir, {
|
|
4021
4183
|
...namingCompatibilityEnvironment(
|
|
4022
4184
|
"CLIO_CODER_EVAL_RUNNER_STDOUT_FILE",
|
|
@@ -4035,14 +4197,18 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry, fresh
|
|
|
4035
4197
|
// The one reading that needs both sides: what the loop reported it
|
|
4036
4198
|
// spent, and what the journal shows it sealed.
|
|
4037
4199
|
...fleetLoopReceiptAgreement(runner.metrics, journalMetrics),
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4200
|
+
...patch === null ? {} : {
|
|
4201
|
+
"patch.bytes": patch.bytes,
|
|
4202
|
+
"patch.filesChanged": patch.filesChanged,
|
|
4203
|
+
"patch.testFilesModified": patch.testFilesModified
|
|
4204
|
+
},
|
|
4041
4205
|
"result.pass": runner.exitCode === 0,
|
|
4042
4206
|
"result.failureClass": runner.exitCode === 0 ? null : "runner_failed",
|
|
4043
4207
|
...measurement.metrics
|
|
4044
4208
|
};
|
|
4209
|
+
await checkGraderIntegrity();
|
|
4045
4210
|
const verifier = await runVerifiers(task, workspace.dir, metrics);
|
|
4211
|
+
await checkGraderIntegrity();
|
|
4046
4212
|
const graderFailed = metrics["task.solved"] === false;
|
|
4047
4213
|
const pass = runner.exitCode === 0 && verifier.pass && !graderFailed;
|
|
4048
4214
|
const failureClass = pass ? null : runner.exitCode !== 0 ? "runner_failed" : !verifier.pass ? verifier.failureClass : "grader_failed";
|
|
@@ -4065,7 +4231,10 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry, fresh
|
|
|
4065
4231
|
...verifier.stderr.length > 0 ? { verifierStderr: verifier.stderr } : {}
|
|
4066
4232
|
}
|
|
4067
4233
|
};
|
|
4068
|
-
|
|
4234
|
+
retention ??= retainSessionLedgers(stateDir, transcriptDir, runnerEvidence?.stdout);
|
|
4235
|
+
const retained = await retention;
|
|
4236
|
+
applyRetainedSessionLedgers(result, retained);
|
|
4237
|
+
const snapshot = retained.errors.length > 0 ? emptyLedgerSnapshot() : await readEvalLedgerSnapshot(stateDir);
|
|
4069
4238
|
const selected = selectEvalLedgerEntries(snapshot.entries, runner.ledgerEntries ?? []);
|
|
4070
4239
|
result.artifacts.trackedMetricSources = JSON.stringify({
|
|
4071
4240
|
assistantCalls: selected.source,
|
|
@@ -4094,10 +4263,10 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry, fresh
|
|
|
4094
4263
|
serving: evalServingObservationFrom(target, receipt ?? null, snapshot.compiledPromptHashes)
|
|
4095
4264
|
};
|
|
4096
4265
|
} catch (error) {
|
|
4097
|
-
const failureClass = error instanceof EvalWorkspaceSetupError ? "setup_failed" : "command_error";
|
|
4266
|
+
const failureClass = error instanceof EvalGraderIntegrityError ? "grader_integrity" : error instanceof EvalWorkspaceSetupError ? "setup_failed" : "command_error";
|
|
4098
4267
|
const result = {
|
|
4099
|
-
assignmentId: null,
|
|
4100
|
-
terminalReceiptDigest: null,
|
|
4268
|
+
assignmentId: runnerEvidence?.assignmentId ?? null,
|
|
4269
|
+
terminalReceiptDigest: runnerEvidence?.terminalReceiptDigest ?? null,
|
|
4101
4270
|
taskId: task.id,
|
|
4102
4271
|
repeatIndex,
|
|
4103
4272
|
target: { id: target.id, model: target.model ?? null, thinking: target.thinking ?? null },
|
|
@@ -4110,11 +4279,15 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry, fresh
|
|
|
4110
4279
|
"latency.wallMs": 0
|
|
4111
4280
|
},
|
|
4112
4281
|
artifacts: {
|
|
4282
|
+
...runnerEvidence?.artifacts,
|
|
4113
4283
|
error: error instanceof Error ? error.message : String(error),
|
|
4114
4284
|
...workspace === null ? {} : { workspace: workspace.dir }
|
|
4115
4285
|
}
|
|
4116
4286
|
};
|
|
4117
|
-
|
|
4287
|
+
retention ??= retainSessionLedgers(stateDir, transcriptDir, runnerEvidence?.stdout);
|
|
4288
|
+
const retained = await retention;
|
|
4289
|
+
applyRetainedSessionLedgers(result, retained);
|
|
4290
|
+
const snapshot = retained.errors.length > 0 ? emptyLedgerSnapshot() : await readEvalLedgerSnapshot(stateDir);
|
|
4118
4291
|
result.verdict = adaptSuiteV2ResultToVerdictV1(
|
|
4119
4292
|
result,
|
|
4120
4293
|
buildEvalTrackedMetrics({
|
|
@@ -4139,6 +4312,7 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry, fresh
|
|
|
4139
4312
|
};
|
|
4140
4313
|
} finally {
|
|
4141
4314
|
try {
|
|
4315
|
+
if (workspace !== null) forgetPatchBaseline(workspace.dir);
|
|
4142
4316
|
await workspace?.cleanup();
|
|
4143
4317
|
} finally {
|
|
4144
4318
|
await rm3(stateDir, { recursive: true, force: true });
|
|
@@ -4328,6 +4502,128 @@ function nullableNonNegativeInteger(value) {
|
|
|
4328
4502
|
function stringArray(value) {
|
|
4329
4503
|
return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
|
|
4330
4504
|
}
|
|
4505
|
+
function applyRetainedSessionLedgers(result, retained) {
|
|
4506
|
+
if (retained.runnerStdoutPath !== void 0) result.artifacts.runnerStdoutFile = retained.runnerStdoutPath;
|
|
4507
|
+
if (retained.paths.length > 0 || retained.errors.length > 0) result.artifacts.sessionLedgers = retained.paths;
|
|
4508
|
+
if (retained.errors.length === 0) return;
|
|
4509
|
+
result.artifacts.sessionLedgerErrors = retained.errors;
|
|
4510
|
+
result.metrics["evidence.retentionComplete"] = false;
|
|
4511
|
+
if (result.pass || result.failureClass === "grader_failed") {
|
|
4512
|
+
result.artifacts.outcomeBeforeEvidenceFailure = result.failureClass ?? "pass";
|
|
4513
|
+
result.pass = false;
|
|
4514
|
+
result.failureClass = "evidence_integrity";
|
|
4515
|
+
result.metrics["result.pass"] = false;
|
|
4516
|
+
result.metrics["result.failureClass"] = "evidence_integrity";
|
|
4517
|
+
}
|
|
4518
|
+
}
|
|
4519
|
+
async function plainLedgerPath(root, path) {
|
|
4520
|
+
const rel = relative4(root, path);
|
|
4521
|
+
if (isAbsolute3(rel) || rel === ".." || rel.startsWith(`..${sep3}`)) throw new Error("unsafe ledger path");
|
|
4522
|
+
let current = root;
|
|
4523
|
+
for (const part of ["", ...rel.split(sep3)]) {
|
|
4524
|
+
current = resolve9(current, part);
|
|
4525
|
+
if ((await lstat3(current)).isSymbolicLink()) throw new Error("unsafe ledger symlink");
|
|
4526
|
+
}
|
|
4527
|
+
}
|
|
4528
|
+
async function readOwnedLedger(root, path) {
|
|
4529
|
+
await plainLedgerPath(root, path);
|
|
4530
|
+
const before = await lstat3(path);
|
|
4531
|
+
if (!before.isFile()) throw new Error("ledger is not a regular file");
|
|
4532
|
+
const file = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
4533
|
+
try {
|
|
4534
|
+
const opened = await file.stat();
|
|
4535
|
+
await plainLedgerPath(root, path);
|
|
4536
|
+
if (opened.dev !== before.dev || opened.ino !== before.ino) throw new Error("ledger changed while opening");
|
|
4537
|
+
return await file.readFile();
|
|
4538
|
+
} finally {
|
|
4539
|
+
await file.close();
|
|
4540
|
+
}
|
|
4541
|
+
}
|
|
4542
|
+
async function transcriptCaptureDirectory(destination) {
|
|
4543
|
+
const base = clioDataDir();
|
|
4544
|
+
await mkdir(base, { recursive: true, mode: 448 });
|
|
4545
|
+
let current = await realpath(base);
|
|
4546
|
+
const rel = relative4(base, destination);
|
|
4547
|
+
if (isAbsolute3(rel) || rel === ".." || rel.startsWith(`..${sep3}`)) throw new Error("unsafe transcript destination");
|
|
4548
|
+
for (const part of rel.split(sep3)) {
|
|
4549
|
+
current = resolve9(current, part);
|
|
4550
|
+
try {
|
|
4551
|
+
await mkdir(current, { mode: 448 });
|
|
4552
|
+
} catch (error) {
|
|
4553
|
+
if (error.code !== "EEXIST") throw error;
|
|
4554
|
+
}
|
|
4555
|
+
const info = await lstat3(current);
|
|
4556
|
+
if (info.isSymbolicLink() || !info.isDirectory()) throw new Error("unsafe transcript destination");
|
|
4557
|
+
}
|
|
4558
|
+
return mkdtemp3(resolve9(current, "capture-"));
|
|
4559
|
+
}
|
|
4560
|
+
async function discoverOwnedLedgers(stateDir, errors) {
|
|
4561
|
+
const root = resolve9(stateDir, "sessions");
|
|
4562
|
+
try {
|
|
4563
|
+
await plainLedgerPath(stateDir, root);
|
|
4564
|
+
} catch (error) {
|
|
4565
|
+
if (error.code === "ENOENT") return [];
|
|
4566
|
+
throw error;
|
|
4567
|
+
}
|
|
4568
|
+
const paths = [];
|
|
4569
|
+
for (const cwd of await readdir(root, { withFileTypes: true })) {
|
|
4570
|
+
if (cwd.isSymbolicLink()) {
|
|
4571
|
+
errors.push("session directory rejected: symlink");
|
|
4572
|
+
continue;
|
|
4573
|
+
}
|
|
4574
|
+
if (!cwd.isDirectory()) continue;
|
|
4575
|
+
const cwdPath = resolve9(root, cwd.name);
|
|
4576
|
+
try {
|
|
4577
|
+
await plainLedgerPath(stateDir, cwdPath);
|
|
4578
|
+
for (const session of await readdir(cwdPath, { withFileTypes: true })) {
|
|
4579
|
+
if (session.isSymbolicLink()) {
|
|
4580
|
+
errors.push("session directory rejected: symlink");
|
|
4581
|
+
continue;
|
|
4582
|
+
}
|
|
4583
|
+
if (session.isDirectory()) paths.push(resolve9(cwdPath, session.name, "current.jsonl"));
|
|
4584
|
+
}
|
|
4585
|
+
} catch {
|
|
4586
|
+
errors.push("session directory unreadable or unsafe");
|
|
4587
|
+
}
|
|
4588
|
+
}
|
|
4589
|
+
return paths.sort();
|
|
4590
|
+
}
|
|
4591
|
+
async function retainSessionLedgers(stateDir, destination, runnerStdout) {
|
|
4592
|
+
const retained = { paths: [], errors: [] };
|
|
4593
|
+
try {
|
|
4594
|
+
const refs = await discoverOwnedLedgers(stateDir, retained.errors);
|
|
4595
|
+
if (refs.length === 0 && !runnerStdout) return retained;
|
|
4596
|
+
const directory = await transcriptCaptureDirectory(destination);
|
|
4597
|
+
if (runnerStdout) {
|
|
4598
|
+
const path = resolve9(directory, "runner-stdout.jsonl");
|
|
4599
|
+
await writeFile(path, runnerStdout, { mode: 384, flag: "wx" });
|
|
4600
|
+
retained.runnerStdoutPath = path;
|
|
4601
|
+
}
|
|
4602
|
+
for (const [index, pathToLedger] of refs.entries()) {
|
|
4603
|
+
try {
|
|
4604
|
+
let content;
|
|
4605
|
+
try {
|
|
4606
|
+
content = await readOwnedLedger(stateDir, pathToLedger);
|
|
4607
|
+
} catch (error) {
|
|
4608
|
+
if (error.code !== "ENOENT") throw error;
|
|
4609
|
+
content = await readOwnedLedger(stateDir, `${pathToLedger}.tmp`);
|
|
4610
|
+
retained.errors.push(`ledger ${index}: incomplete current ledger; temporary evidence retained`);
|
|
4611
|
+
}
|
|
4612
|
+
const path = resolve9(directory, `${index}.jsonl`);
|
|
4613
|
+
await writeFile(path, content, { mode: 384, flag: "wx" });
|
|
4614
|
+
retained.paths.push(path);
|
|
4615
|
+
} catch (error) {
|
|
4616
|
+
const code = error.code;
|
|
4617
|
+
retained.errors.push(
|
|
4618
|
+
`ledger ${index}: retention failed (${code === "ENOENT" ? "missing" : "unsafe or unreadable"})`
|
|
4619
|
+
);
|
|
4620
|
+
}
|
|
4621
|
+
}
|
|
4622
|
+
} catch {
|
|
4623
|
+
retained.errors.push("session ledger retention failed: artifact storage unavailable or unsafe");
|
|
4624
|
+
}
|
|
4625
|
+
return retained;
|
|
4626
|
+
}
|
|
4331
4627
|
|
|
4332
4628
|
// src/cli/eval.ts
|
|
4333
4629
|
var HELP = `clio-coder eval <command>
|
|
@@ -4421,6 +4717,11 @@ function parseEvalArgs(args) {
|
|
|
4421
4717
|
throw new Error(`unknown eval run argument: ${arg}`);
|
|
4422
4718
|
}
|
|
4423
4719
|
if (parsed.command === "report") {
|
|
4720
|
+
if (arg === "--artifact") {
|
|
4721
|
+
parsed.artifact = requiredValue(args, index, "--artifact");
|
|
4722
|
+
index += 1;
|
|
4723
|
+
continue;
|
|
4724
|
+
}
|
|
4424
4725
|
if (arg === "--format") {
|
|
4425
4726
|
parsed.format = reportFormat(requiredValue(args, index, "--format"));
|
|
4426
4727
|
index += 1;
|
|
@@ -4477,7 +4778,9 @@ function parseEvalArgs(args) {
|
|
|
4477
4778
|
if (parsed.command === "run" && parsed.suite === void 0 === (parsed.taskFile === void 0)) {
|
|
4478
4779
|
throw new Error("run requires exactly one of --suite or --task-file");
|
|
4479
4780
|
}
|
|
4480
|
-
if (parsed.command === "report" && parsed.evalId === void 0
|
|
4781
|
+
if (parsed.command === "report" && parsed.evalId === void 0 === (parsed.artifact === void 0)) {
|
|
4782
|
+
throw new Error("report requires exactly one of an eval id or --artifact <path>");
|
|
4783
|
+
}
|
|
4481
4784
|
if (parsed.command === "compare" && parsed.compareIds.length !== 2) {
|
|
4482
4785
|
throw new Error("compare requires <baselineEvalId> <candidateEvalId>");
|
|
4483
4786
|
}
|
|
@@ -4488,7 +4791,7 @@ function parseEvalArgs(args) {
|
|
|
4488
4791
|
}
|
|
4489
4792
|
async function runEvalCommand(args) {
|
|
4490
4793
|
if (args[0] === "inventory") {
|
|
4491
|
-
const { runEvalInventory } = await import("./eval-inventory-
|
|
4794
|
+
const { runEvalInventory } = await import("./eval-inventory-QOYZERXJ.js");
|
|
4492
4795
|
return runEvalInventory(args.slice(1));
|
|
4493
4796
|
}
|
|
4494
4797
|
let parsed;
|
|
@@ -4531,13 +4834,15 @@ async function runEvalRun(parsed) {
|
|
|
4531
4834
|
...resolveOptions,
|
|
4532
4835
|
...parsed.trials ? { trials: parsed.trials } : {}
|
|
4533
4836
|
});
|
|
4534
|
-
const clioEntry =
|
|
4837
|
+
const clioEntry = resolve10(parsed.clioEntry ?? process.argv[1] ?? "dist/cli/index.js");
|
|
4535
4838
|
const artifact = await runEvalSuiteV2(
|
|
4536
4839
|
{ ...loaded, suite },
|
|
4537
4840
|
{ clioEntry, freshWorkspaces: parsed.trials !== void 0 }
|
|
4538
4841
|
);
|
|
4539
4842
|
const artifactPath = await writeEvalArtifactV4(clioDataDir(), artifact, parsed.out);
|
|
4540
4843
|
process.stdout.write(`${renderEvalTextReportV4(artifact)}artifact: ${artifactPath}
|
|
4844
|
+
`);
|
|
4845
|
+
process.stdout.write(`report: clio-coder eval report --artifact ${shellQuote(resolve10(artifactPath))} --format md
|
|
4541
4846
|
`);
|
|
4542
4847
|
const gate = suite.thresholds === void 0 ? null : evaluateGate(artifact, suite.thresholds);
|
|
4543
4848
|
if (gate !== null && !gate.pass) {
|
|
@@ -4558,7 +4863,7 @@ async function runEvalRun(parsed) {
|
|
|
4558
4863
|
async function runEvalReportCommand(parsed) {
|
|
4559
4864
|
try {
|
|
4560
4865
|
const dataDir = clioDataDir();
|
|
4561
|
-
const artifact = await loadEvalArtifactV4(dataDir, parsed.evalId ?? "");
|
|
4866
|
+
const artifact = parsed.artifact === void 0 ? await loadEvalArtifactV4(dataDir, parsed.evalId ?? "") : parseEvalArtifactV4(JSON.parse(await readFile4(parsed.artifact, "utf8")), parsed.artifact);
|
|
4562
4867
|
process.stdout.write(renderArtifactReport(artifact, parsed.format, dataDir));
|
|
4563
4868
|
return 0;
|
|
4564
4869
|
} catch (error) {
|
|
@@ -4663,4 +4968,4 @@ function comparisonFormat(value) {
|
|
|
4663
4968
|
export {
|
|
4664
4969
|
runEvalCommand
|
|
4665
4970
|
};
|
|
4666
|
-
//# sourceMappingURL=eval-
|
|
4971
|
+
//# sourceMappingURL=eval-BUU3ZOUZ.js.map
|