agentic-qe 3.15.7 → 3.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +305 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/agents/claim-verifier/claim-verifier-service.js +13 -8
- package/dist/bridge/captured-experience-bridge.js +12 -13
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-R2Q4QGXQ.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-OS5G7KMQ.js → agent-booster-wasm-427FRKWG.js} +2 -2
- package/dist/cli/chunks/{agent-handler-PI4I7PME.js → agent-handler-RIYHTHVZ.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-J7TXHX4U.js → agent-memory-branch-WSUCUHOO.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-3RENLQWP.js +2 -0
- package/dist/cli/chunks/{arena-OWUGXKNT.js → arena-KRIBMIXX.js} +2 -2
- package/dist/cli/chunks/{arena-FXESDCFR.js → arena-YAJZX6MC.js} +4 -4
- package/dist/cli/chunks/{audit-EPAWLYIZ.js → audit-7ZNOXWP3.js} +3 -3
- package/dist/cli/chunks/base-67DXSAYM.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-IYVR5EQY.js → better-sqlite3-ZQAT4I6H.js} +2 -2
- package/dist/cli/chunks/{brain-handler-3W2E6TC6.js → brain-handler-452WCPZC.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-HU7VACJ4.js → branch-enumerator-IJFXJRPN.js} +2 -2
- package/dist/cli/chunks/{browser-72XOR6E2.js → browser-CT3MTV6G.js} +2 -2
- package/dist/cli/chunks/browser-workflow-NDXRROWZ.js +2 -0
- package/dist/cli/chunks/{chunk-WXI2STKQ.js → chunk-2BA45H64.js} +2 -2
- package/dist/cli/chunks/{chunk-DGK6GQMO.js → chunk-2HL3UM5P.js} +2 -2
- package/dist/cli/chunks/{chunk-LGBN7TKC.js → chunk-2I2UPJS7.js} +2 -2
- package/dist/cli/chunks/{chunk-ZRLNACPY.js → chunk-2TDIS6YK.js} +2 -2
- package/dist/cli/chunks/{chunk-34JLY3U6.js → chunk-2URBI52G.js} +2 -2
- package/dist/cli/chunks/{chunk-K7W55B7Q.js → chunk-2XITOPYV.js} +2 -2
- package/dist/cli/chunks/{chunk-I7H4IP7T.js → chunk-2YH62JCN.js} +2 -2
- package/dist/cli/chunks/{chunk-HPG7354V.js → chunk-32UTLDNY.js} +2 -2
- package/dist/cli/chunks/{chunk-C2CUPJGR.js → chunk-37BIGMJI.js} +1 -1
- package/dist/cli/chunks/{chunk-2RJYA6WK.js → chunk-3CJCROMW.js} +2 -2
- package/dist/cli/chunks/{chunk-CWPRU7ZI.js → chunk-3LYU7BLY.js} +2 -2
- package/dist/cli/chunks/{chunk-24CENUT4.js → chunk-47TYABPD.js} +3 -3
- package/dist/cli/chunks/{chunk-WUV5RZUI.js → chunk-47V7FQGX.js} +2 -2
- package/dist/cli/chunks/{chunk-IWQQIXHO.js → chunk-4JCY45KV.js} +2 -2
- package/dist/cli/chunks/{chunk-ZTMZFF25.js → chunk-4SUOVLJ6.js} +2 -2
- package/dist/cli/chunks/{chunk-CIFWOMNX.js → chunk-4URT6JO2.js} +1 -1
- package/dist/cli/chunks/{chunk-5Q22XPTH.js → chunk-4V27J6YN.js} +2 -2
- package/dist/cli/chunks/{chunk-SX2YSHE7.js → chunk-4W4DYVSH.js} +1 -1
- package/dist/cli/chunks/chunk-55HRSNGN.js +2 -0
- package/dist/cli/chunks/{chunk-F62EKVVC.js → chunk-5D2I7JUP.js} +2 -2
- package/dist/cli/chunks/{chunk-XXAVQACL.js → chunk-5JWGCIQW.js} +1 -1
- package/dist/cli/chunks/chunk-5LAAZLUC.js +4 -0
- package/dist/cli/chunks/{chunk-EDU72RTW.js → chunk-5NS3USRW.js} +1 -1
- package/dist/cli/chunks/{chunk-BTYKGVJ5.js → chunk-6EPHNJTL.js} +1 -1
- package/dist/cli/chunks/{chunk-JVYPXW6Y.js → chunk-6OOYIO3W.js} +2 -2
- package/dist/cli/chunks/{chunk-PG64YV6C.js → chunk-6PXA2BQJ.js} +58 -58
- package/dist/cli/chunks/{chunk-IARSGAG7.js → chunk-6YL6JOQB.js} +2 -2
- package/dist/cli/chunks/{chunk-LDXQRNTT.js → chunk-72AMFDC7.js} +1 -1
- package/dist/cli/chunks/{chunk-Z3VJLWRR.js → chunk-763SUL4B.js} +2 -2
- package/dist/cli/chunks/{chunk-EL75G2A3.js → chunk-7DMA5NYL.js} +1 -1
- package/dist/cli/chunks/{chunk-J43DV3ME.js → chunk-7JKB3Q7O.js} +1 -1
- package/dist/cli/chunks/{chunk-ONVALAZN.js → chunk-7KII4CQG.js} +2 -2
- package/dist/cli/chunks/{chunk-AAA4SHEG.js → chunk-7QGYJ5OY.js} +1 -1
- package/dist/cli/chunks/{chunk-MMXG3LL6.js → chunk-7QTB5VJZ.js} +2 -2
- package/dist/cli/chunks/{chunk-BB7OLQKO.js → chunk-7X2Y727E.js} +1 -1
- package/dist/cli/chunks/{chunk-VNW5Q2CX.js → chunk-A4RU67VX.js} +2 -2
- package/dist/cli/chunks/{chunk-YFOBQSOW.js → chunk-A6YIH4C4.js} +2 -2
- package/dist/cli/chunks/{chunk-MJJC6HUK.js → chunk-ABFDB4X3.js} +1 -1
- package/dist/cli/chunks/{chunk-MHZPC4HJ.js → chunk-AJ4YDSOI.js} +2 -2
- package/dist/cli/chunks/{chunk-OA4GR3EZ.js → chunk-AOFO4N32.js} +2 -2
- package/dist/cli/chunks/{chunk-EB2PP6X2.js → chunk-AQTVVLNP.js} +1 -1
- package/dist/cli/chunks/chunk-AR2E4B7K.js +6 -0
- package/dist/cli/chunks/{chunk-N4PMPSJJ.js → chunk-AVB5QY2Q.js} +2 -2
- package/dist/cli/chunks/{chunk-HLZATDD2.js → chunk-BHKXMIWX.js} +2 -2
- package/dist/cli/chunks/{chunk-C2MDBBFF.js → chunk-BXO536GT.js} +3 -3
- package/dist/cli/chunks/{chunk-WTLIEBDH.js → chunk-C6RTMTEH.js} +1 -1
- package/dist/cli/chunks/{chunk-MNZFEIE5.js → chunk-CTZJUV5I.js} +1 -1
- package/dist/cli/chunks/{chunk-XEWXYGJI.js → chunk-D6XVGFTI.js} +2 -2
- package/dist/cli/chunks/{chunk-Y4SAWE45.js → chunk-DDPPSSHW.js} +1 -1
- package/dist/cli/chunks/{chunk-KPOPBUUJ.js → chunk-DGTLJNJH.js} +2 -2
- package/dist/cli/chunks/{chunk-6JT73S5B.js → chunk-DINZR5CF.js} +1 -1
- package/dist/cli/chunks/{chunk-HTWIGQL4.js → chunk-EFBLP43U.js} +2 -2
- package/dist/cli/chunks/chunk-ETG7O5E5.js +5 -0
- package/dist/cli/chunks/{chunk-2AYBYXOA.js → chunk-F2SQPP6U.js} +2 -2
- package/dist/cli/chunks/{chunk-V2SAEMZY.js → chunk-F3PQZX44.js} +1 -1
- package/dist/cli/chunks/{chunk-JPHDMHFG.js → chunk-F4JYIRW2.js} +2 -2
- package/dist/cli/chunks/{chunk-REEIFA6A.js → chunk-FJ4VTLLK.js} +2 -2
- package/dist/cli/chunks/{chunk-PTK66HEY.js → chunk-FL3OYGCS.js} +2 -2
- package/dist/cli/chunks/{chunk-PEKDSJBC.js → chunk-FLASM2XB.js} +2 -2
- package/dist/cli/chunks/{chunk-G762PEFO.js → chunk-FV3NHVC7.js} +22 -22
- package/dist/cli/chunks/{chunk-FTTFJ7SJ.js → chunk-FV7VAG74.js} +1 -1
- package/dist/cli/chunks/{chunk-2YVJ5OUL.js → chunk-G3BKZNFL.js} +8 -8
- package/dist/cli/chunks/{chunk-MDC4G323.js → chunk-GBUIG3FS.js} +1 -1
- package/dist/cli/chunks/{chunk-DCJW2DPL.js → chunk-GCWSX2NY.js} +4 -4
- package/dist/cli/chunks/{chunk-VCA6YYII.js → chunk-GII5WVAK.js} +1 -1
- package/dist/cli/chunks/{chunk-HXBAQKMH.js → chunk-GKPQ2GRR.js} +2 -2
- package/dist/cli/chunks/chunk-GR3JYE5A.js +2 -0
- package/dist/cli/chunks/{chunk-ZUMDDMDE.js → chunk-H3KBIWTO.js} +2 -2
- package/dist/cli/chunks/{chunk-ECSLJJOQ.js → chunk-HAROIAJE.js} +1 -1
- package/dist/cli/chunks/{chunk-ICPALF4Q.js → chunk-HCYQHWI2.js} +2 -2
- package/dist/cli/chunks/{chunk-V5NGBQAQ.js → chunk-HGTWAZWU.js} +2 -2
- package/dist/cli/chunks/{chunk-YK3NOC2R.js → chunk-HTZJSQ3C.js} +2 -2
- package/dist/cli/chunks/{chunk-IYQ7XNE5.js → chunk-HWK5L7IJ.js} +2 -2
- package/dist/cli/chunks/{chunk-HSDOOFV7.js → chunk-HZ5NC6U5.js} +1 -1
- package/dist/cli/chunks/{chunk-M63QB466.js → chunk-I6S35FRO.js} +2 -2
- package/dist/cli/chunks/{chunk-LMEU64TR.js → chunk-ICP2ORGI.js} +2 -2
- package/dist/cli/chunks/{chunk-PXZKPUW6.js → chunk-IFEIY3NQ.js} +2 -2
- package/dist/cli/chunks/{chunk-OJEZNLB6.js → chunk-J3DTDJDT.js} +2 -2
- package/dist/cli/chunks/chunk-J3WGK22W.js +2 -0
- package/dist/cli/chunks/{chunk-SQHLC6I5.js → chunk-J5KNRVXR.js} +1 -1
- package/dist/cli/chunks/{chunk-RORZ5O5Z.js → chunk-JAV5WPSY.js} +2 -2
- package/dist/cli/chunks/{chunk-SSP2B2WR.js → chunk-JEP4ULR6.js} +2 -2
- package/dist/cli/chunks/{chunk-6FEQ73BF.js → chunk-JK2ME6IT.js} +2 -2
- package/dist/cli/chunks/chunk-JNNZK7KH.js +2 -0
- package/dist/cli/chunks/{chunk-RXAFLK34.js → chunk-JP4P3P3D.js} +2 -2
- package/dist/cli/chunks/{chunk-JY4AIEZ7.js → chunk-JUVHZG7I.js} +1 -1
- package/dist/cli/chunks/{chunk-UBYCR3O4.js → chunk-JWGRWMZP.js} +2 -2
- package/dist/cli/chunks/{chunk-6BO3WCK7.js → chunk-K5DJXMAA.js} +2 -2
- package/dist/cli/chunks/{chunk-MKFQNCXI.js → chunk-KFUUIAR4.js} +2 -2
- package/dist/cli/chunks/chunk-KHSRIPBP.js +180 -0
- package/dist/cli/chunks/{chunk-UY3REQOK.js → chunk-KIKWJM6J.js} +2 -2
- package/dist/cli/chunks/{chunk-YUC7RJGR.js → chunk-KIXYKUCI.js} +1 -1
- package/dist/cli/chunks/{chunk-IC2WSSD5.js → chunk-KLGYIEJK.js} +3 -3
- package/dist/cli/chunks/{chunk-DVPGBDBP.js → chunk-KR3M44CF.js} +3 -3
- package/dist/cli/chunks/chunk-KTSLTZSG.js +2 -0
- package/dist/cli/chunks/{chunk-Y6A46M3B.js → chunk-KVBEGOJE.js} +2 -2
- package/dist/cli/chunks/{chunk-PZG3542B.js → chunk-L42JPFCC.js} +2 -2
- package/dist/cli/chunks/{chunk-J26GADQE.js → chunk-LCJTEUDC.js} +181 -181
- package/dist/cli/chunks/{chunk-3JD2USUH.js → chunk-LEAKYZ37.js} +2 -2
- package/dist/cli/chunks/{chunk-UCLN6AME.js → chunk-LMU5DUDK.js} +1 -1
- package/dist/cli/chunks/{chunk-EV2BYY6T.js → chunk-MZS32SYS.js} +1 -1
- package/dist/cli/chunks/{chunk-LVEX4GID.js → chunk-N3KEY4XJ.js} +2 -2
- package/dist/cli/chunks/{chunk-XNSQZ3O7.js → chunk-N3NP6PTT.js} +2 -2
- package/dist/cli/chunks/{chunk-QVG4ZDXX.js → chunk-N5PDFGCQ.js} +2 -2
- package/dist/cli/chunks/{chunk-6PKCQXEW.js → chunk-NDKLQW6N.js} +2 -2
- package/dist/cli/chunks/{chunk-6AYRAOCA.js → chunk-NHZIWIQZ.js} +2 -2
- package/dist/cli/chunks/{chunk-H4WHDFB5.js → chunk-NTAD5UX4.js} +2 -2
- package/dist/cli/chunks/{chunk-JYXOFN3E.js → chunk-O3JLOVZX.js} +2 -2
- package/dist/cli/chunks/{chunk-ZLVQSEZK.js → chunk-OCESWNAZ.js} +3 -3
- package/dist/cli/chunks/{chunk-7EX4DEQR.js → chunk-OG2UI6A3.js} +2 -2
- package/dist/cli/chunks/{chunk-3RM46XFP.js → chunk-OXTFSIGN.js} +1 -1
- package/dist/cli/chunks/{chunk-44DPYNPE.js → chunk-OXZLKP6C.js} +1 -1
- package/dist/cli/chunks/{chunk-TU4LIIOP.js → chunk-P2CXVNKK.js} +2 -2
- package/dist/cli/chunks/{chunk-LDZWIV2O.js → chunk-P73W2K7T.js} +1 -1
- package/dist/cli/chunks/{chunk-56ZKQYZY.js → chunk-PBZI2ZPV.js} +3 -3
- package/dist/cli/chunks/{chunk-MNCF643K.js → chunk-PMCRCEW5.js} +2 -2
- package/dist/cli/chunks/{chunk-4G2VNW4C.js → chunk-PVIA2FPD.js} +2 -2
- package/dist/cli/chunks/{chunk-MRHM4COP.js → chunk-PX2B5TS2.js} +2 -2
- package/dist/cli/chunks/{chunk-HZFT3P5B.js → chunk-Q3JVJRVJ.js} +1 -1
- package/dist/cli/chunks/{chunk-GY2SAIXP.js → chunk-QQ5SZH4D.js} +2 -2
- package/dist/cli/chunks/{chunk-LP4AS2E4.js → chunk-QTVWUQTB.js} +1 -1
- package/dist/cli/chunks/{chunk-W4X2VTIY.js → chunk-REUFWGMA.js} +2 -2
- package/dist/cli/chunks/{chunk-FVBFASOD.js → chunk-SNBYYO6F.js} +2 -2
- package/dist/cli/chunks/{chunk-RNYX4CPI.js → chunk-SVHUYVUR.js} +2 -2
- package/dist/cli/chunks/{chunk-AXO7OOOA.js → chunk-THAY7WHO.js} +2 -2
- package/dist/cli/chunks/{chunk-QWLTHFZW.js → chunk-TNMQVG4A.js} +2 -2
- package/dist/cli/chunks/{chunk-JFPXCQNP.js → chunk-TSYQDRNK.js} +1 -1
- package/dist/cli/chunks/{chunk-JK6B3ULP.js → chunk-TUYJ53V4.js} +2 -2
- package/dist/cli/chunks/{chunk-PUECC4WI.js → chunk-UNUTC6TX.js} +2 -2
- package/dist/cli/chunks/{chunk-ED32XJ5R.js → chunk-UOJBR4J3.js} +2 -2
- package/dist/cli/chunks/{chunk-CXTJ47QS.js → chunk-UOWHE77F.js} +2 -2
- package/dist/cli/chunks/{chunk-5KCBX225.js → chunk-UYLYMWV5.js} +2 -2
- package/dist/cli/chunks/{chunk-QNQSM2OG.js → chunk-V5PXQSFS.js} +2 -2
- package/dist/cli/chunks/{chunk-VKPKYMCT.js → chunk-VCMINU7K.js} +2 -2
- package/dist/cli/chunks/{chunk-QQT6QENQ.js → chunk-VQHVHVSF.js} +2 -2
- package/dist/cli/chunks/{chunk-634D2ENF.js → chunk-VRGCKBF7.js} +2 -2
- package/dist/cli/chunks/{chunk-T6W5APYP.js → chunk-VU2EL424.js} +1 -1
- package/dist/cli/chunks/{chunk-JY4WLN3K.js → chunk-VXZJOKOX.js} +2 -2
- package/dist/cli/chunks/{chunk-NZQPP533.js → chunk-VYLM2YV5.js} +3 -3
- package/dist/cli/chunks/{chunk-PQV7E7XH.js → chunk-W32YU3VI.js} +2 -2
- package/dist/cli/chunks/{chunk-RRPYWBFX.js → chunk-W5VJRDDG.js} +2 -2
- package/dist/cli/chunks/{chunk-7UCVYYWL.js → chunk-WGDR2KIR.js} +2 -2
- package/dist/cli/chunks/{chunk-2423JAA5.js → chunk-WRRCQ2UE.js} +1 -1
- package/dist/cli/chunks/{chunk-RCYLCA7E.js → chunk-XDBD4GXO.js} +2 -2
- package/dist/cli/chunks/{chunk-PYHYOKYT.js → chunk-XOLDMK23.js} +2 -2
- package/dist/cli/chunks/{chunk-5KS7HA37.js → chunk-XOVNZT7F.js} +1 -1
- package/dist/cli/chunks/{chunk-5PBRBS7D.js → chunk-XQ3DDY7X.js} +2 -2
- package/dist/cli/chunks/{chunk-4DIZ5BT6.js → chunk-XUIA5KMS.js} +2 -2
- package/dist/cli/chunks/{chunk-G7YTZTGU.js → chunk-XWIUFYM3.js} +1 -1
- package/dist/cli/chunks/{chunk-B7M323VL.js → chunk-XYCKHYBM.js} +2 -2
- package/dist/cli/chunks/{chunk-6OS7HREG.js → chunk-XZJ2O3VC.js} +1 -1
- package/dist/cli/chunks/{chunk-BTIBXGVQ.js → chunk-YRBBBUJX.js} +5 -5
- package/dist/cli/chunks/{chunk-MQ6OF6DU.js → chunk-YZGSJG34.js} +1 -1
- package/dist/cli/chunks/{chunk-XTJMY3KS.js → chunk-YZYDTABJ.js} +1 -1
- package/dist/cli/chunks/{chunk-LQOVA4YX.js → chunk-ZANDSVCK.js} +2 -2
- package/dist/cli/chunks/{chunk-2E3XWKEU.js → chunk-ZBDRLF43.js} +2 -2
- package/dist/cli/chunks/{chunk-UUHIEM2M.js → chunk-ZVSLCEVC.js} +3 -3
- package/dist/cli/chunks/{chunk-Q2T5FXEA.js → chunk-ZXBCCO2H.js} +2 -2
- package/dist/cli/chunks/{ci-5HEXJZ2C.js → ci-7SGRCFPS.js} +2 -2
- package/dist/cli/chunks/{ci-config-WU4NPDAM.js → ci-config-MX3URPZA.js} +2 -2
- package/dist/cli/chunks/{ci-output-BJQVXX5E.js → ci-output-M47NJY6D.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-3BMGTQCB.js → circuit-breaker-5GAK45SW.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-GVDGJWMU.js → claude-flow-setup-YXYSRH4Y.js} +2 -2
- package/dist/cli/chunks/client-ZP3CTVRF.js +2 -0
- package/dist/cli/chunks/{cline-installer-V4MRGWVA.js → cline-installer-DLJ5QD5N.js} +2 -2
- package/dist/cli/chunks/{code-A3TGQPEO.js → code-ONKLMVQ2.js} +25 -24
- package/dist/cli/chunks/{code-index-extractor-YJQSYWD3.js → code-index-extractor-2232LGZN.js} +2 -2
- package/dist/cli/chunks/{codex-installer-7N7UQPAH.js → codex-installer-UOWLYCMH.js} +2 -2
- package/dist/cli/chunks/{completions-PPGVYLZS.js → completions-MHX7GCC7.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-XZTFLYV5.js → complexity-analyzer-43ZUJKZU.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-Z5I57RAH.js → continuedev-installer-6Q5JR4FF.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-F5YZ6BHB.js → copilot-installer-CZUMVHSI.js} +2 -2
- package/dist/cli/chunks/core-handlers-JSRXQWPE.js +2 -0
- package/dist/cli/chunks/{cost-tracker-GO33ZQAP.js → cost-tracker-VS5ZW3XN.js} +2 -2
- package/dist/cli/chunks/{coverage-GSHKLY74.js → coverage-VWKTWZ6D.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-7UKODQWG.js +2 -0
- package/dist/cli/chunks/{cursor-installer-JJ7IVJZB.js → cursor-installer-YIFEMORH.js} +2 -2
- package/dist/cli/chunks/{daemon-IRL7QRNE.js → daemon-SHWJSJW5.js} +7 -7
- package/dist/cli/chunks/daemon-YIFT46FH.js +34 -0
- package/dist/cli/chunks/{dag-attention-scheduler-ORXSUHPA.js → dag-attention-scheduler-TCC2WM46.js} +2 -2
- package/dist/cli/chunks/{detect-RHU62KRI.js → detect-IGTWSQMA.js} +2 -2
- package/dist/cli/chunks/{dist-node-3VKV4Z6C.js → dist-node-TCOTJVQX.js} +2 -2
- package/dist/cli/chunks/{domain-handler-SFIML4FK.js → domain-handler-55ZVYODR.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-CJ4FA3OC.js → domain-plugins-GJRWOHQP.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-BCRKPCAA.js → domain-transfer-6EF75EKU.js} +2 -2
- package/dist/cli/chunks/dream-UDLM6M55.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-VL3HFLPV.js → embed-and-insert-pattern-XAMNIKQL.js} +2 -2
- package/dist/cli/chunks/{eval-GGKRI4P5.js → eval-GO22R4OZ.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-F72TIRQY.js → experience-capture-middleware-F2BRMJ3Y.js} +3 -3
- package/dist/cli/chunks/{fast-paths-7KOOF3MA.js → fast-paths-6RGPYALD.js} +2 -2
- package/dist/cli/chunks/{feature-flags-FNHBTHBH.js → feature-flags-MIWQIOHU.js} +2 -2
- package/dist/cli/chunks/{feature-flags-IOZEWWFU.js → feature-flags-ZGS3KLPH.js} +2 -2
- package/dist/cli/chunks/file-discovery-THWOUQ7Z.js +2 -0
- package/dist/cli/chunks/fleet-ADL57COA.js +44 -0
- package/dist/cli/chunks/{gnn-wrapper-OH2DOQP7.js → gnn-wrapper-ALBJVW6T.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-W67NXTNE.js → heartbeat-handler-ZMM53NDY.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-HGOC5KH3.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-EPSA6AP7.js +2 -0
- package/dist/cli/chunks/hnsw-index-RMFOPYGY.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-6MLLOGOE.js → hnsw-legacy-bridge-RYUJPA7B.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-4UDISJ3G.js → hnswlib-node-XM6XF3YV.js} +2 -2
- package/dist/cli/chunks/{hooks-NOQJWQ4P.js → hooks-X62O7TJO.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-NZ3G4WBX.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-2OD3APVP.js → hypergraph-engine-ZBWUPTVD.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-5AZGMBUM.js → hypergraph-handler-DUMF6SJV.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-WZC6NHFP.js +2 -0
- package/dist/cli/chunks/{init-guard-SMGJ45PW.js → init-guard-S4I2R46S.js} +2 -2
- package/dist/cli/chunks/{init-handler-5T4MP2NM.js → init-handler-L4KJHVWS.js} +6 -6
- package/dist/cli/chunks/init-wizard-422UZYQ5.js +2 -0
- package/dist/cli/chunks/kernel-N7PJ6FCE.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-RLZYLVQJ.js → kilocode-installer-GNNB5FCZ.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-LFZOC7VD.js → kiro-installer-HR6ZAH7T.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-SZCVQF37.js +2 -0
- package/dist/cli/chunks/{learning-XRPGLUWR.js → learning-4IEEOHJS.js} +3 -3
- package/dist/cli/chunks/{llm-router-OMK5HYPH.js → llm-router-ZFMORP36.js} +4 -4
- package/dist/cli/chunks/llm-router-service-4DE5WDUZ.js +2 -0
- package/dist/cli/chunks/{load-XADC7KCU.js → load-ZM43WGDO.js} +2 -2
- package/dist/cli/chunks/load-test-POMIF4Q4.js +2 -0
- package/dist/cli/chunks/{mcp-PIBKSSVU.js → mcp-CRZKZE37.js} +2 -2
- package/dist/cli/chunks/{memory-AP7EZERS.js → memory-W5FZGVAD.js} +5 -5
- package/dist/cli/chunks/memory-backend-4P6AHSOY.js +2 -0
- package/dist/cli/chunks/memory-handlers-NK6NV3GE.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-7JJ2FZ33.js → multi-model-executor-SXXGAQ2G.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-ZZZ6EBYJ.js → opencode-installer-PIRBUAB5.js} +2 -2
- package/dist/cli/chunks/{orchestrator-2H2YKSGJ.js → orchestrator-H5SQCQTB.js} +11 -10
- package/dist/cli/chunks/pattern-null-store-CCHQHGQG.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-7MJJWC2Z.js → pattern-usage-recorder-XZTWDI2T.js} +2 -2
- package/dist/cli/chunks/{pipeline-LIE5BWQY.js → pipeline-5LMLBIJ7.js} +2 -2
- package/dist/cli/chunks/{platform-SMYUNLGX.js → platform-KJDABL5C.js} +2 -2
- package/dist/cli/chunks/{plugin-LJDIXQNT.js → plugin-V4KSBVVM.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-RIDNE5D2.js → prime-radiant-advanced-wasm-JDHTKQAT.js} +2 -2
- package/dist/cli/chunks/project-root-X72FSM2F.js +2 -0
- package/dist/cli/chunks/protocol-executor-QW6XN6QN.js +2 -0
- package/dist/cli/chunks/{protocol-handler-YVM66DLI.js → protocol-handler-BNRONTQV.js} +2 -2
- package/dist/cli/chunks/{prove-ZBDT52GD.js → prove-ELLL6XMX.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-ZD3WF647.js +2 -0
- package/dist/cli/chunks/{quality-DUKXGDDO.js → quality-NH2QA4D4.js} +2 -2
- package/dist/cli/chunks/{quality-gate-SM3RXF4V.js → quality-gate-JTKLF7GW.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-S4U4MKK2.js +2 -0
- package/dist/cli/chunks/{real-embeddings-4QLQZDB5.js → real-embeddings-J3KCKLPB.js} +2 -2
- package/dist/cli/chunks/{ref-validation-M3EO32YQ.js → ref-validation-HNXQRP4F.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-S6Q5OLV5.js → roocode-installer-COJ6CX6S.js} +2 -2
- package/dist/cli/chunks/router-CXZKOOTR.js +2 -0
- package/dist/cli/chunks/routing-feedback-IYFANYY5.js +2 -0
- package/dist/cli/chunks/{routing-handler-55FMUACP.js → routing-handler-WM33ZILE.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-QATKAAPK.js → ruvector-commands-BBLXEA7A.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-HCLQ5WUQ.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-XCLUWOO3.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-RFXFU6JD.js → rvf-migration-coordinator-P7H6HCAG.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-MRT5H3IP.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-PKDVXQAW.js → rvf-store-integrity-R5SPVRFP.js} +2 -2
- package/dist/cli/chunks/safe-db-WFODRGVZ.js +2 -0
- package/dist/cli/chunks/schedule-RO55OQXG.js +2 -0
- package/dist/cli/chunks/scheduler-XXMJCH24.js +2 -0
- package/dist/cli/chunks/{security-CMRB6WA3.js → security-AUDTRX3I.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-YHLLNFHF.js → shared-rvf-adapter-PVDGBGI2.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-4BGDVPQ7.js → shared-rvf-dual-writer-LZ2GMSS2.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-AWRIS4MK.js +2 -0
- package/dist/cli/chunks/{standalone-memory-LUHKQAGM.js → standalone-memory-XNOAI4G4.js} +2 -2
- package/dist/cli/chunks/{status-handler-S6S5PNR7.js → status-handler-K72XZE4T.js} +2 -2
- package/dist/cli/chunks/{structural-health-PQ7NZAJ4.js → structural-health-NF3YY7U5.js} +2 -2
- package/dist/cli/chunks/{sync-S744AEJC.js → sync-UVXA6CT2.js} +2 -2
- package/dist/cli/chunks/{sync-Q6KRQXU6.js → sync-VBD5Y3E2.js} +2 -2
- package/dist/cli/chunks/{task-handler-GAMGEHUW.js → task-handler-24S3WFVJ.js} +13 -7
- package/dist/cli/chunks/task-handlers-GUYW2EPJ.js +9 -0
- package/dist/cli/chunks/{test-FNH67DBK.js → test-XFSGQELD.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-NZA5SHK6.js → test-scheduling-VYUQ4CDE.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-CXKG55JD.js → token-bootstrap-EDK6FNQ3.js} +2 -2
- package/dist/cli/chunks/{token-usage-M7WWEDJX.js → token-usage-VLQ6WO2L.js} +2 -2
- package/dist/cli/chunks/{transformers-2IFMCK6A.js → transformers-TOFMWWNM.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-NMNA6RJC.js → tree-sitter-wasm-parser-MI3NZKUD.js} +2 -2
- package/dist/cli/chunks/{types-N7FWTOLD.js → types-JTWLBAZJ.js} +2 -2
- package/dist/cli/chunks/unified-memory-6JWHV6EF.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-4UANU6NU.js +2 -0
- package/dist/cli/chunks/unified-persistence-KGGNA46H.js +2 -0
- package/dist/cli/chunks/{upgrade-KDB5RGL7.js → upgrade-4ABM72T4.js} +2 -2
- package/dist/cli/chunks/{validate-KMUV5FUA.js → validate-UDJCWKXI.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-ANZWRCJU.js → validate-swarm-TODOUWNN.js} +2 -2
- package/dist/cli/chunks/visual-security-6VZNQLH7.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-SXXC4NMS.js → web-tree-sitter-WBMAJPM5.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-2LWSKMBU.js → windsurf-installer-BTT53TUL.js} +2 -2
- package/dist/cli/chunks/witness-chain-AKKHWEWU.js +2 -0
- package/dist/cli/chunks/{witness-chain-JJMSJFZP.js → witness-chain-TATPXQRK.js} +2 -2
- package/dist/cli/chunks/{witness-chain-repair-OX7VFW6T.js → witness-chain-repair-2HGJGE7O.js} +2 -2
- package/dist/cli/chunks/{witness-chain-verifier-QLSMXHAZ.js → witness-chain-verifier-FRY3LMGH.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-3DS4L7LE.js → witness-key-manager-X7QHQQWL.js} +2 -2
- package/dist/cli/chunks/{workflow-ARWAMHD3.js → workflow-QMZPAWQW.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-4GAW7HNZ.js +2 -0
- package/dist/cli/chunks/{wrappers-J6KGTUSJ.js → wrappers-ZD5NBHYI.js} +2 -2
- package/dist/cli/commands/code.js +8 -0
- package/dist/cli/commands/daemon.js +8 -0
- package/dist/cli/commands/fleet.js +14 -9
- package/dist/cli/handlers/task-handler.js +21 -1
- package/dist/coordination/handlers/code-intelligence-handlers.js +14 -2
- package/dist/coordination/handlers/coverage-collection.js +9 -10
- package/dist/coordination/handlers/coverage-handlers.js +21 -3
- package/dist/coordination/handlers/coverage-runner.d.ts +2 -1
- package/dist/coordination/handlers/coverage-runner.js +9 -2
- package/dist/coordination/handlers/coverage-target.d.ts +13 -3
- package/dist/coordination/handlers/coverage-target.js +224 -7
- package/dist/coordination/handlers/handler-types.d.ts +2 -0
- package/dist/coordination/handlers/test-execution-handlers.js +32 -5
- package/dist/coordination/index.d.ts +2 -2
- package/dist/coordination/index.js +1 -1
- package/dist/coordination/protocols/learning-consolidation-archive.d.ts +39 -0
- package/dist/coordination/protocols/learning-consolidation-archive.js +57 -0
- package/dist/coordination/protocols/learning-consolidation.d.ts +38 -3
- package/dist/coordination/protocols/learning-consolidation.js +130 -58
- package/dist/coordination/queen-coordinator.d.ts +12 -1
- package/dist/coordination/queen-coordinator.js +24 -1
- package/dist/coordination/queen-event-handlers.js +2 -1
- package/dist/coordination/queen-lifecycle.js +9 -0
- package/dist/coordination/queen-task-management.js +113 -40
- package/dist/coordination/queen-types.d.ts +10 -0
- package/dist/coordination/queen-types.js +8 -0
- package/dist/coordination/task-dag/dag-algorithms.d.ts +33 -0
- package/dist/coordination/task-dag/dag-algorithms.js +162 -0
- package/dist/coordination/task-dag/dag-obligations.d.ts +21 -0
- package/dist/coordination/task-dag/dag-obligations.js +83 -0
- package/dist/coordination/task-dag/dag.d.ts +69 -19
- package/dist/coordination/task-dag/dag.js +215 -269
- package/dist/coordination/task-dag/index.d.ts +12 -4
- package/dist/coordination/task-dag/index.js +11 -3
- package/dist/coordination/task-dag/prerequisite-ledger.d.ts +84 -0
- package/dist/coordination/task-dag/prerequisite-ledger.js +252 -0
- package/dist/coordination/task-dag/scheduler.d.ts +19 -9
- package/dist/coordination/task-dag/scheduler.js +36 -12
- package/dist/coordination/task-dag/types.d.ts +160 -1
- package/dist/coordination/task-dag/types.js +2 -1
- package/dist/coordination/task-executability.d.ts +18 -0
- package/dist/coordination/task-executability.js +31 -0
- package/dist/coordination/task-executor.d.ts +1 -0
- package/dist/coordination/task-executor.js +5 -0
- package/dist/domains/code-intelligence/coordinator.js +35 -9
- package/dist/domains/code-intelligence/index-path-guard.d.ts +49 -0
- package/dist/domains/code-intelligence/index-path-guard.js +125 -0
- package/dist/domains/code-intelligence/interfaces.d.ts +12 -0
- package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +6 -0
- package/dist/domains/code-intelligence/services/knowledge-graph.js +42 -5
- package/dist/domains/contract-testing/coordinator.js +3 -1
- package/dist/domains/coverage-analysis/collected-metrics.js +2 -1
- package/dist/domains/defect-intelligence/services/defect-predictor.js +4 -2
- package/dist/domains/learning-optimization/active-patterns.d.ts +55 -0
- package/dist/domains/learning-optimization/active-patterns.js +80 -0
- package/dist/domains/learning-optimization/coordinator-helpers.js +2 -3
- package/dist/domains/learning-optimization/coordinator.d.ts +0 -3
- package/dist/domains/learning-optimization/coordinator.js +50 -106
- package/dist/domains/learning-optimization/index.d.ts +1 -1
- package/dist/domains/learning-optimization/interfaces.d.ts +56 -4
- package/dist/domains/learning-optimization/plugin.js +11 -1
- package/dist/domains/learning-optimization/reward-source.d.ts +37 -0
- package/dist/domains/learning-optimization/reward-source.js +58 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.d.ts +4 -4
- package/dist/domains/learning-optimization/services/learning-coordinator.js +68 -34
- package/dist/domains/learning-optimization/services/metrics-optimizer.d.ts +14 -4
- package/dist/domains/learning-optimization/services/metrics-optimizer.js +129 -63
- package/dist/domains/learning-optimization/services/transfer-specialist.js +25 -15
- package/dist/domains/test-execution/interfaces.d.ts +16 -0
- package/dist/domains/test-execution/services/retry-handler.js +18 -2
- package/dist/domains/test-execution/services/runner-test-cases.d.ts +21 -0
- package/dist/domains/test-execution/services/runner-test-cases.js +69 -0
- package/dist/domains/test-execution/services/test-executor.d.ts +5 -0
- package/dist/domains/test-execution/services/test-executor.js +24 -2
- package/dist/init/fleet-integration.js +2 -0
- package/dist/init/init-wizard-steps.js +2 -0
- package/dist/init/phases/06-code-intelligence.js +2 -0
- package/dist/init/phases/10-workers.js +2 -1
- package/dist/kernel/anti-drift-middleware.d.ts +44 -5
- package/dist/kernel/anti-drift-middleware.js +147 -11
- package/dist/kernel/interfaces.d.ts +5 -0
- package/dist/learning/dream/dream-engine.d.ts +27 -1
- package/dist/learning/dream/dream-engine.js +56 -2
- package/dist/learning/dream/dream-insights-pruner.d.ts +18 -4
- package/dist/learning/dream/dream-insights-pruner.js +99 -11
- package/dist/learning/dream/rvcow-branch-manager.d.ts +8 -0
- package/dist/learning/dream/rvcow-branch-manager.js +8 -0
- package/dist/learning/dream/speculative-dreamer.d.ts +8 -0
- package/dist/learning/dream/speculative-dreamer.js +8 -0
- package/dist/learning/skill-validation-learner.d.ts +2 -0
- package/dist/learning/skill-validation-learner.js +29 -21
- package/dist/mcp/background-workers.d.ts +15 -0
- package/dist/mcp/background-workers.js +77 -0
- package/dist/mcp/bundle.js +511 -484
- package/dist/mcp/entry.js +4 -49
- package/dist/mcp/handlers/domain-handler-configs.d.ts +14 -0
- package/dist/mcp/handlers/domain-handler-configs.js +68 -30
- package/dist/mcp/handlers/handler-factory.js +1 -0
- package/dist/mcp/handlers/task-handlers.js +37 -1
- package/dist/mcp/metrics/metrics-collector.d.ts +11 -9
- package/dist/mcp/metrics/metrics-collector.js +13 -26
- package/dist/mcp/protocol-server.js +8 -3
- package/dist/mcp/tools/learning-optimization/optimize.d.ts +34 -3
- package/dist/mcp/tools/learning-optimization/optimize.js +106 -70
- package/dist/memory/crdt/lww-register.js +11 -1
- package/dist/routing/calibration/ema-calibrator.js +3 -1
- package/dist/shared/base-domain-plugin.d.ts +4 -0
- package/dist/shared/base-domain-plugin.js +6 -0
- package/dist/shared/llm/cache.js +4 -1
- package/dist/shared/security/compliance-patterns.js +3 -1
- package/dist/shared/test-runner-process.d.ts +26 -0
- package/dist/shared/test-runner-process.js +91 -0
- package/dist/shared/types/index.d.ts +9 -0
- package/dist/shared/types/index.js +13 -0
- package/dist/shared/utils/namespaced-search.d.ts +42 -0
- package/dist/shared/utils/namespaced-search.js +53 -0
- package/dist/strange-loop/infra-healing/infra-action-executor.js +7 -3
- package/dist/strange-loop/infra-healing/infra-healing-orchestrator.js +10 -9
- package/dist/workers/daemon.d.ts +7 -0
- package/dist/workers/daemon.js +21 -2
- package/dist/workers/namespaced-keys.d.ts +4 -7
- package/dist/workers/namespaced-keys.js +4 -15
- package/dist/workers/quality-daemon/ci-monitor.js +9 -5
- package/dist/workers/worker-env.d.ts +53 -0
- package/dist/workers/worker-env.js +89 -0
- package/dist/workers/worker-manager.js +4 -0
- package/dist/workers/workers/learning-consolidation.d.ts +20 -0
- package/dist/workers/workers/learning-consolidation.js +57 -23
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-PEOUNYXJ.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-DHKZI5RX.js +0 -2
- package/dist/cli/chunks/base-QZWK3D5P.js +0 -2
- package/dist/cli/chunks/browser-workflow-ITPX72RX.js +0 -2
- package/dist/cli/chunks/chunk-CG5DZCOZ.js +0 -2
- package/dist/cli/chunks/chunk-QJE6ZW2X.js +0 -6
- package/dist/cli/chunks/chunk-T3ZDVU6F.js +0 -5
- package/dist/cli/chunks/chunk-UIYKR2SA.js +0 -2
- package/dist/cli/chunks/chunk-VJRZFWR5.js +0 -2
- package/dist/cli/chunks/chunk-VUFRTGML.js +0 -3
- package/dist/cli/chunks/chunk-YDZJWDR6.js +0 -180
- package/dist/cli/chunks/client-S7GNYTZ5.js +0 -2
- package/dist/cli/chunks/core-handlers-CUEPOQIO.js +0 -2
- package/dist/cli/chunks/cross-domain-router-CXN5QFEV.js +0 -2
- package/dist/cli/chunks/daemon-3DQCKRYO.js +0 -10
- package/dist/cli/chunks/dream-5AUNJW24.js +0 -2
- package/dist/cli/chunks/file-discovery-AYWF357I.js +0 -2
- package/dist/cli/chunks/fleet-QX5KXTRC.js +0 -43
- package/dist/cli/chunks/heartbeat-scheduler-7ZIDVXIP.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-P77OC7FM.js +0 -2
- package/dist/cli/chunks/hnsw-index-3LBOTQAW.js +0 -2
- package/dist/cli/chunks/hybrid-backend-LOM54PDD.js +0 -2
- package/dist/cli/chunks/impact-analyzer-QSDJVBPS.js +0 -2
- package/dist/cli/chunks/init-wizard-MK2325JJ.js +0 -2
- package/dist/cli/chunks/kernel-2NJQQ2KT.js +0 -2
- package/dist/cli/chunks/knowledge-graph-SDISHO62.js +0 -2
- package/dist/cli/chunks/llm-router-service-YTCMRBAN.js +0 -2
- package/dist/cli/chunks/load-test-RPKHLBCC.js +0 -2
- package/dist/cli/chunks/memory-backend-BZXFO4JZ.js +0 -2
- package/dist/cli/chunks/memory-handlers-MOFDNB6E.js +0 -2
- package/dist/cli/chunks/pattern-null-store-4PRPIOR6.js +0 -2
- package/dist/cli/chunks/project-root-NBIQF63D.js +0 -2
- package/dist/cli/chunks/protocol-executor-BRPGIYWQ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-GDZACWKW.js +0 -2
- package/dist/cli/chunks/queen-coordinator-LDKLBPD5.js +0 -2
- package/dist/cli/chunks/router-H5YSIRH2.js +0 -2
- package/dist/cli/chunks/routing-feedback-5R36TJDH.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-TT2DBQQQ.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-BCLFJKSK.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-UXI66OQJ.js +0 -2
- package/dist/cli/chunks/safe-db-MSTD2GDH.js +0 -2
- package/dist/cli/chunks/schedule-KST6KIFD.js +0 -2
- package/dist/cli/chunks/scheduler-FTQS6YK3.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-ZX5QFDMR.js +0 -2
- package/dist/cli/chunks/task-handlers-6CRDEELN.js +0 -9
- package/dist/cli/chunks/unified-memory-2Z2F446J.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-A4EWYPJQ.js +0 -2
- package/dist/cli/chunks/unified-persistence-Z6N6JZFA.js +0 -2
- package/dist/cli/chunks/visual-security-GXYZV7KR.js +0 -2
- package/dist/cli/chunks/witness-chain-52PEIEGK.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-DORMQMG7.js +0 -2
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { v4 as uuidv4 } from 'uuid';
|
|
6
6
|
import { ok, err } from '../../../shared/types/index.js';
|
|
7
7
|
import { toError } from '../../../shared/error-utils.js';
|
|
8
|
-
import { secureRandom } from '../../../shared/utils/crypto-random.js';
|
|
9
8
|
import { rehydrateDates } from '../../../shared/utils/kv-date-rehydrate.js';
|
|
9
|
+
import { partitionByRewardSource } from '../reward-source.js';
|
|
10
10
|
const DEFAULT_CONFIG = {
|
|
11
11
|
defaultConfidenceLevel: 0.95,
|
|
12
12
|
minSamplesForOptimization: 20,
|
|
@@ -14,6 +14,12 @@ const DEFAULT_CONFIG = {
|
|
|
14
14
|
improvementThreshold: 0.05,
|
|
15
15
|
explorationRate: 0.1,
|
|
16
16
|
};
|
|
17
|
+
/** Namespace every optimizer record is written under. */
|
|
18
|
+
const LEARNING_NS = { namespace: 'learning-optimization' };
|
|
19
|
+
/** Share of the most recent experiences held out from fitting (#1099). */
|
|
20
|
+
const HELD_OUT_FRACTION = 0.2;
|
|
21
|
+
/** Relative tolerance within which an observed outcome matches the prediction. */
|
|
22
|
+
const VALIDATION_TOLERANCE = 0.2;
|
|
17
23
|
/**
|
|
18
24
|
* SEC-003: Dangerous keys that could lead to prototype pollution
|
|
19
25
|
*/
|
|
@@ -41,29 +47,54 @@ export class MetricsOptimizerService {
|
|
|
41
47
|
/**
|
|
42
48
|
* Optimize a strategy for a given objective
|
|
43
49
|
*/
|
|
44
|
-
async optimizeStrategy(currentStrategy, objective,
|
|
50
|
+
async optimizeStrategy(currentStrategy, objective, input) {
|
|
45
51
|
try {
|
|
52
|
+
// #1109: fit and validate on measured outcomes only.
|
|
53
|
+
const { measured: experiences, assignedExcluded } = partitionByRewardSource(input);
|
|
46
54
|
if (experiences.length < this.config.minSamplesForOptimization) {
|
|
47
|
-
|
|
55
|
+
const excluded = assignedExcluded > 0
|
|
56
|
+
? ` (${assignedExcluded} with an assigned reward excluded)`
|
|
57
|
+
: '';
|
|
58
|
+
return err(new Error(`Need at least ${this.config.minSamplesForOptimization} measured experiences for optimization${excluded}`));
|
|
48
59
|
}
|
|
49
|
-
//
|
|
50
|
-
|
|
60
|
+
// #1099: fit on the older experiences and validate on the most recent
|
|
61
|
+
// ones, which the fit never saw, so confidence is a held-out measurement
|
|
62
|
+
// rather than a score on the data the optimizer was fitted to.
|
|
63
|
+
const ordered = [...experiences].sort((a, b) => timeOf(a) - timeOf(b));
|
|
64
|
+
const heldOutSize = Math.max(1, Math.floor(ordered.length * HELD_OUT_FRACTION));
|
|
65
|
+
const training = ordered.slice(0, -heldOutSize);
|
|
66
|
+
const heldOut = ordered.slice(-heldOutSize);
|
|
51
67
|
// Generate optimized parameters
|
|
52
|
-
const optimizedParameters = await this.optimizeParameters(currentStrategy.parameters,
|
|
68
|
+
const optimizedParameters = await this.optimizeParameters(currentStrategy.parameters, training, objective);
|
|
53
69
|
// Create optimized strategy
|
|
54
70
|
const optimizedStrategy = {
|
|
55
71
|
name: `${currentStrategy.name}-optimized`,
|
|
56
72
|
parameters: optimizedParameters,
|
|
57
|
-
expectedOutcome: this.predictOutcome(optimizedParameters,
|
|
73
|
+
expectedOutcome: this.predictOutcome(optimizedParameters, training),
|
|
74
|
+
};
|
|
75
|
+
// Validate the fitted expectation against the held-out experiences
|
|
76
|
+
const validationResults = await this.validateOptimization(currentStrategy, optimizedStrategy, heldOut);
|
|
77
|
+
// The optimized strategy has never run, so its improvement cannot be
|
|
78
|
+
// observed. It is modelled as the change in parameter score between the
|
|
79
|
+
// two strategies on the held-out experiences, and labelled an estimate.
|
|
80
|
+
const improvement = this.calculateImprovement(this.scoreParameters(currentStrategy.parameters, heldOut, objective), this.scoreParameters(optimizedParameters, heldOut, objective), objective);
|
|
81
|
+
// Confidence is the share of held-out experiences whose observed
|
|
82
|
+
// outcome matched the fitted expectation.
|
|
83
|
+
const confidence = validationResults.length > 0
|
|
84
|
+
? validationResults.filter((r) => r.passed).length / validationResults.length
|
|
85
|
+
: 0;
|
|
86
|
+
const unmeasured = [];
|
|
87
|
+
if (improvement === undefined)
|
|
88
|
+
unmeasured.push('improvement');
|
|
89
|
+
if (validationResults.length === 0)
|
|
90
|
+
unmeasured.push('confidence');
|
|
91
|
+
const evaluation = {
|
|
92
|
+
method: 'held-out',
|
|
93
|
+
trainingSamples: training.length,
|
|
94
|
+
heldOutSamples: heldOut.length,
|
|
95
|
+
estimated: improvement === undefined ? [] : ['improvement'],
|
|
96
|
+
...(unmeasured.length > 0 ? { unmeasured } : {}),
|
|
58
97
|
};
|
|
59
|
-
// Validate optimization
|
|
60
|
-
const validationResults = await this.validateOptimization(currentStrategy, optimizedStrategy, experiences.slice(-10) // Use recent experiences for validation
|
|
61
|
-
);
|
|
62
|
-
// Calculate improvement
|
|
63
|
-
const optimizedPerformance = this.evaluateStrategyPerformance(optimizedStrategy, experiences, objective);
|
|
64
|
-
const improvement = this.calculateImprovement(currentPerformance, optimizedPerformance, objective);
|
|
65
|
-
// Calculate confidence
|
|
66
|
-
const confidence = this.calculateOptimizationConfidence(experiences.length, improvement, validationResults);
|
|
67
98
|
const domain = this.inferDomainFromExperiences(experiences);
|
|
68
99
|
const result = {
|
|
69
100
|
id: uuidv4(),
|
|
@@ -71,9 +102,10 @@ export class MetricsOptimizerService {
|
|
|
71
102
|
objective,
|
|
72
103
|
currentStrategy,
|
|
73
104
|
optimizedStrategy,
|
|
74
|
-
improvement,
|
|
105
|
+
improvement: improvement ?? 0,
|
|
75
106
|
confidence,
|
|
76
107
|
validationResults,
|
|
108
|
+
evaluation,
|
|
77
109
|
};
|
|
78
110
|
// Store optimization result
|
|
79
111
|
await this.storeOptimizationResult(result);
|
|
@@ -88,9 +120,24 @@ export class MetricsOptimizerService {
|
|
|
88
120
|
*/
|
|
89
121
|
async runABTest(strategyA, strategyB, testConfig) {
|
|
90
122
|
try {
|
|
91
|
-
//
|
|
92
|
-
const metricsA = await this.collectStrategyMetrics(strategyA, testConfig.metric
|
|
93
|
-
const metricsB = await this.collectStrategyMetrics(strategyB, testConfig.metric
|
|
123
|
+
// Recorded observations only (#1099): never pad with simulated samples.
|
|
124
|
+
const metricsA = await this.collectStrategyMetrics(strategyA, testConfig.metric);
|
|
125
|
+
const metricsB = await this.collectStrategyMetrics(strategyB, testConfig.metric);
|
|
126
|
+
// An arm with no recorded sample is never evidence, whatever minSamples says.
|
|
127
|
+
const minSamples = Math.max(1, testConfig.minSamples);
|
|
128
|
+
if (metricsA.length < minSamples || metricsB.length < minSamples) {
|
|
129
|
+
const insufficient = {
|
|
130
|
+
winner: 'inconclusive',
|
|
131
|
+
evidenceStatus: 'insufficient-evidence',
|
|
132
|
+
unmeasured: [testConfig.metric, 'stdDev', 'pValue'],
|
|
133
|
+
strategyAMetrics: { samples: metricsA.length },
|
|
134
|
+
strategyBMetrics: { samples: metricsB.length },
|
|
135
|
+
sampleSizeA: metricsA.length,
|
|
136
|
+
sampleSizeB: metricsB.length,
|
|
137
|
+
};
|
|
138
|
+
await this.storeABTestResult(strategyA, strategyB, insufficient);
|
|
139
|
+
return ok(insufficient);
|
|
140
|
+
}
|
|
94
141
|
// Calculate statistics
|
|
95
142
|
const meanA = this.calculateMean(metricsA);
|
|
96
143
|
const meanB = this.calculateMean(metricsB);
|
|
@@ -100,7 +147,7 @@ export class MetricsOptimizerService {
|
|
|
100
147
|
const pValue = this.calculatePValue(metricsA, metricsB);
|
|
101
148
|
// Determine winner
|
|
102
149
|
let winner;
|
|
103
|
-
if (pValue < 1 - testConfig.confidenceLevel) {
|
|
150
|
+
if (pValue !== undefined && pValue < 1 - testConfig.confidenceLevel) {
|
|
104
151
|
winner = meanA > meanB ? 'A' : 'B';
|
|
105
152
|
}
|
|
106
153
|
else {
|
|
@@ -118,7 +165,10 @@ export class MetricsOptimizerService {
|
|
|
118
165
|
stdDev: stdB,
|
|
119
166
|
samples: metricsB.length,
|
|
120
167
|
},
|
|
121
|
-
|
|
168
|
+
// Neither arm varied, so the t statistic is undefined (#1099).
|
|
169
|
+
...(pValue === undefined
|
|
170
|
+
? { unmeasured: ['pValue'], pValueUnavailableReason: 'zero-variance' }
|
|
171
|
+
: { pValue }),
|
|
122
172
|
sampleSizeA: metricsA.length,
|
|
123
173
|
sampleSizeB: metricsB.length,
|
|
124
174
|
};
|
|
@@ -154,7 +204,8 @@ export class MetricsOptimizerService {
|
|
|
154
204
|
return ok({
|
|
155
205
|
name: 'default-strategy',
|
|
156
206
|
parameters: this.getDefaultParameters(context),
|
|
157
|
-
|
|
207
|
+
// #1099: nothing was measured for the default, so expect nothing.
|
|
208
|
+
expectedOutcome: {},
|
|
158
209
|
});
|
|
159
210
|
}
|
|
160
211
|
// Sort by score and return best
|
|
@@ -168,8 +219,21 @@ export class MetricsOptimizerService {
|
|
|
168
219
|
/**
|
|
169
220
|
* Evaluate strategy performance
|
|
170
221
|
*/
|
|
171
|
-
async evaluateStrategy(strategy,
|
|
222
|
+
async evaluateStrategy(strategy, input) {
|
|
172
223
|
try {
|
|
224
|
+
// #1109: an assigned reward says nothing about how the strategy performed.
|
|
225
|
+
const { measured: experiences, assignedExcluded } = partitionByRewardSource(input);
|
|
226
|
+
if (experiences.length === 0) {
|
|
227
|
+
return ok({
|
|
228
|
+
strategy,
|
|
229
|
+
metrics: {},
|
|
230
|
+
strengths: [],
|
|
231
|
+
weaknesses: [],
|
|
232
|
+
improvementAreas: [],
|
|
233
|
+
evidenceStatus: 'insufficient-evidence',
|
|
234
|
+
...(assignedExcluded > 0 ? { assignedRewardsExcluded: assignedExcluded } : {}),
|
|
235
|
+
});
|
|
236
|
+
}
|
|
173
237
|
// Calculate metrics
|
|
174
238
|
const metrics = {};
|
|
175
239
|
const successRate = this.calculateSuccessRate(experiences);
|
|
@@ -250,12 +314,12 @@ export class MetricsOptimizerService {
|
|
|
250
314
|
*/
|
|
251
315
|
async getMetricsHistory(strategyId, limit = 100) {
|
|
252
316
|
try {
|
|
253
|
-
const keys = await this.
|
|
317
|
+
const keys = await this.searchLearningKeys(`learning:metrics:history:${strategyId}:*`, limit);
|
|
254
318
|
const snapshots = [];
|
|
255
319
|
for (const key of keys) {
|
|
256
320
|
// #493: rehydrate `timestamp` at the kv-read seam — without this,
|
|
257
321
|
// the sort below throws once any snapshot exists in the kv.
|
|
258
|
-
const snapshot = rehydrateDates(await this.memory.get(key), ['timestamp']);
|
|
322
|
+
const snapshot = rehydrateDates(await this.memory.get(key, LEARNING_NS), ['timestamp']);
|
|
259
323
|
if (snapshot) {
|
|
260
324
|
snapshots.push(snapshot);
|
|
261
325
|
}
|
|
@@ -295,15 +359,14 @@ export class MetricsOptimizerService {
|
|
|
295
359
|
// ============================================================================
|
|
296
360
|
// Private Helper Methods
|
|
297
361
|
// ============================================================================
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return count > 0 ? totalScore / count : 0;
|
|
362
|
+
/**
|
|
363
|
+
* Keys matching `pattern` under LEARNING_NS, ready for a namespaced get().
|
|
364
|
+
* In-memory search includes its namespace; SQLite returns a bare key.
|
|
365
|
+
*/
|
|
366
|
+
async searchLearningKeys(pattern, limit) {
|
|
367
|
+
const prefix = `${LEARNING_NS.namespace}:`;
|
|
368
|
+
const found = await this.memory.search(pattern, limit, LEARNING_NS);
|
|
369
|
+
return found.map((key) => (key.startsWith(prefix) ? key.slice(prefix.length) : key));
|
|
307
370
|
}
|
|
308
371
|
async optimizeParameters(currentParams, experiences, objective) {
|
|
309
372
|
const optimized = { ...currentParams };
|
|
@@ -391,11 +454,18 @@ export class MetricsOptimizerService {
|
|
|
391
454
|
}
|
|
392
455
|
async validateOptimization(_current, optimized, validationExperiences) {
|
|
393
456
|
const results = [];
|
|
457
|
+
// Nothing was predicted, so there is nothing to validate.
|
|
458
|
+
const expected = Object.entries(optimized.expectedOutcome);
|
|
459
|
+
if (expected.length === 0)
|
|
460
|
+
return results;
|
|
394
461
|
for (const exp of validationExperiences) {
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
462
|
+
// A metric the experience did not record is not evidence either way.
|
|
463
|
+
const comparable = expected.filter(([key]) => typeof exp.result.outcome[key] === 'number');
|
|
464
|
+
if (comparable.length === 0)
|
|
465
|
+
continue;
|
|
466
|
+
const passed = comparable.every(([key, value]) => {
|
|
467
|
+
const actual = exp.result.outcome[key];
|
|
468
|
+
return Math.abs(actual - value) / Math.max(value, 1) < VALIDATION_TOLERANCE;
|
|
399
469
|
});
|
|
400
470
|
results.push({
|
|
401
471
|
testId: exp.id,
|
|
@@ -405,23 +475,14 @@ export class MetricsOptimizerService {
|
|
|
405
475
|
}
|
|
406
476
|
return results;
|
|
407
477
|
}
|
|
478
|
+
/** Relative change; undefined when there is no baseline to compare with. */
|
|
408
479
|
calculateImprovement(currentPerf, optimizedPerf, objective) {
|
|
409
480
|
if (currentPerf === 0)
|
|
410
|
-
return
|
|
481
|
+
return undefined;
|
|
411
482
|
const diff = optimizedPerf - currentPerf;
|
|
412
483
|
const improvement = objective.direction === 'maximize' ? diff / currentPerf : -diff / currentPerf;
|
|
413
484
|
return Math.max(-1, Math.min(1, improvement));
|
|
414
485
|
}
|
|
415
|
-
calculateOptimizationConfidence(sampleSize, improvement, validationResults) {
|
|
416
|
-
// Base confidence from sample size
|
|
417
|
-
const sampleConfidence = Math.min(1, sampleSize / (this.config.minSamplesForOptimization * 2));
|
|
418
|
-
// Validation pass rate
|
|
419
|
-
const passRate = validationResults.filter((r) => r.passed).length /
|
|
420
|
-
Math.max(validationResults.length, 1);
|
|
421
|
-
// Improvement significance
|
|
422
|
-
const improvementConfidence = Math.abs(improvement) > this.config.improvementThreshold ? 1 : 0.5;
|
|
423
|
-
return sampleConfidence * 0.3 + passRate * 0.5 + improvementConfidence * 0.2;
|
|
424
|
-
}
|
|
425
486
|
inferDomainFromExperiences(experiences) {
|
|
426
487
|
const domainCounts = new Map();
|
|
427
488
|
for (const exp of experiences) {
|
|
@@ -437,22 +498,21 @@ export class MetricsOptimizerService {
|
|
|
437
498
|
}
|
|
438
499
|
return maxDomain;
|
|
439
500
|
}
|
|
440
|
-
|
|
441
|
-
|
|
501
|
+
/**
|
|
502
|
+
* Values of `metric` recorded for this strategy through trackMetrics(),
|
|
503
|
+
* whose strategy id is the strategy name. Only recorded observations are
|
|
504
|
+
* returned; the caller decides whether there are enough (#1099).
|
|
505
|
+
*/
|
|
506
|
+
async collectStrategyMetrics(strategy, metric) {
|
|
507
|
+
const keys = await this.searchLearningKeys(`learning:metrics:history:${strategy.name}:*`, 1000);
|
|
442
508
|
const metrics = [];
|
|
443
509
|
for (const key of keys) {
|
|
444
|
-
const snapshot = await this.memory.get(key);
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
metrics.push(
|
|
510
|
+
const snapshot = await this.memory.get(key, LEARNING_NS);
|
|
511
|
+
const value = snapshot?.metrics[metric];
|
|
512
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
513
|
+
metrics.push(value);
|
|
448
514
|
}
|
|
449
515
|
}
|
|
450
|
-
// If not enough real data, generate simulated data
|
|
451
|
-
while (metrics.length < minSamples) {
|
|
452
|
-
const expected = strategy.expectedOutcome[metric] || 0.5;
|
|
453
|
-
const variation = (secureRandom() - 0.5) * 0.2;
|
|
454
|
-
metrics.push(expected + variation);
|
|
455
|
-
}
|
|
456
516
|
return metrics;
|
|
457
517
|
}
|
|
458
518
|
calculateMean(values) {
|
|
@@ -467,6 +527,7 @@ export class MetricsOptimizerService {
|
|
|
467
527
|
const squaredDiffs = values.map((v) => Math.pow(v - mean, 2));
|
|
468
528
|
return Math.sqrt(squaredDiffs.reduce((a, b) => a + b, 0) / values.length);
|
|
469
529
|
}
|
|
530
|
+
/** Undefined when neither group varies: the test statistic is undefined. */
|
|
470
531
|
calculatePValue(groupA, groupB) {
|
|
471
532
|
// Simplified p-value calculation using Welch's t-test approximation
|
|
472
533
|
const meanA = this.calculateMean(groupA);
|
|
@@ -477,7 +538,7 @@ export class MetricsOptimizerService {
|
|
|
477
538
|
const nB = groupB.length;
|
|
478
539
|
const se = Math.sqrt(varA / nA + varB / nB);
|
|
479
540
|
if (se === 0)
|
|
480
|
-
return
|
|
541
|
+
return undefined;
|
|
481
542
|
const t = Math.abs(meanA - meanB) / se;
|
|
482
543
|
// Approximate p-value using normal distribution
|
|
483
544
|
const pValue = 2 * (1 - this.normalCDF(t));
|
|
@@ -590,7 +651,7 @@ export class MetricsOptimizerService {
|
|
|
590
651
|
}
|
|
591
652
|
async updateAggregatedMetrics(strategyId, metrics) {
|
|
592
653
|
const key = `learning:metrics:aggregated:${strategyId}`;
|
|
593
|
-
const existing = await this.memory.get(key);
|
|
654
|
+
const existing = await this.memory.get(key, LEARNING_NS);
|
|
594
655
|
const aggregated = existing?.metrics || {};
|
|
595
656
|
for (const [metricName, value] of Object.entries(metrics)) {
|
|
596
657
|
// SEC-003: Guard against prototype pollution
|
|
@@ -627,4 +688,9 @@ export class MetricsOptimizerService {
|
|
|
627
688
|
}, { namespace: 'learning-optimization', ttl: 86400 * 7 });
|
|
628
689
|
}
|
|
629
690
|
}
|
|
691
|
+
/** Epoch milliseconds of an experience; kv reads may hand back an ISO string. */
|
|
692
|
+
function timeOf(experience) {
|
|
693
|
+
const ms = new Date(experience.timestamp).getTime();
|
|
694
|
+
return Number.isNaN(ms) ? 0 : ms;
|
|
695
|
+
}
|
|
630
696
|
//# sourceMappingURL=metrics-optimizer.js.map
|
|
@@ -6,6 +6,8 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
6
6
|
import { ok, err, ALL_DOMAINS } from '../../../shared/types/index.js';
|
|
7
7
|
import { toError } from '../../../shared/error-utils.js';
|
|
8
8
|
import { rehydrateDates } from '../../../shared/utils/kv-date-rehydrate.js';
|
|
9
|
+
import { searchAllKeys } from '../../../shared/utils/namespaced-search.js';
|
|
10
|
+
import { LEARNING_NS } from '../active-patterns.js';
|
|
9
11
|
const DEFAULT_CONFIG = {
|
|
10
12
|
maxKnowledgeItems: 1000,
|
|
11
13
|
relevanceThreshold: 0.5,
|
|
@@ -56,32 +58,35 @@ export class TransferSpecialistService {
|
|
|
56
58
|
async queryKnowledge(query) {
|
|
57
59
|
try {
|
|
58
60
|
const results = [];
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
// Secondary domain/type indexes store IDs, not Knowledge objects, and
|
|
62
|
+
// shareKnowledge() need not create them. Read canonical shared records
|
|
63
|
+
// from the same namespace as both writers, then filter and rank before
|
|
64
|
+
// applying the caller's result limit. #1071: every key is read (the
|
|
65
|
+
// config value only sizes the first scan request), so the domain filter
|
|
66
|
+
// sees every item instead of an arbitrary first page.
|
|
67
|
+
const keys = await searchAllKeys(this.memory, 'learning:knowledge:shared:*', {
|
|
68
|
+
retrieve: LEARNING_NS,
|
|
69
|
+
pageSize: this.config.maxKnowledgeItems,
|
|
70
|
+
});
|
|
67
71
|
for (const key of keys) {
|
|
68
72
|
// #493: rehydrate Date fields at the kv-read seam. `createdAt` is
|
|
69
73
|
// consumed by validateRelevance().getTime() and `expiresAt` is
|
|
70
74
|
// compared via `new Date() > knowledge.expiresAt` — both broken
|
|
71
75
|
// when the field is a string after JSON round-trip.
|
|
72
|
-
const knowledge = rehydrateDates(await this.memory.get(key), ['createdAt', 'expiresAt']);
|
|
76
|
+
const knowledge = rehydrateDates(await this.memory.get(key, { namespace: 'learning-optimization' }), ['createdAt', 'expiresAt']);
|
|
73
77
|
if (knowledge && this.matchesQuery(knowledge, query)) {
|
|
74
78
|
results.push(knowledge);
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
|
-
// Sort by relevance score
|
|
78
|
-
|
|
81
|
+
// Sort by relevance score; equal scores fall back to id order so the
|
|
82
|
+
// caller's limit always keeps the same items (#1071).
|
|
83
|
+
results.sort((a, b) => b.relevanceScore - a.relevanceScore || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0));
|
|
79
84
|
// Apply semantic search if embedding provided
|
|
80
85
|
if (query.embedding && query.embedding.length > 0) {
|
|
81
86
|
const vectorResults = await this.memory.vectorSearch(query.embedding, query.limit || 10);
|
|
82
87
|
for (const vr of vectorResults) {
|
|
83
88
|
// #493: rehydrate Date fields at the kv-read seam.
|
|
84
|
-
const knowledge = rehydrateDates(await this.memory.get(vr.key), ['createdAt', 'expiresAt']);
|
|
89
|
+
const knowledge = rehydrateDates(await this.memory.get(vr.key, { namespace: 'learning-optimization' }), ['createdAt', 'expiresAt']);
|
|
85
90
|
if (knowledge &&
|
|
86
91
|
!results.some((r) => r.id === knowledge.id) &&
|
|
87
92
|
this.matchesQuery(knowledge, query)) {
|
|
@@ -253,7 +258,7 @@ export class TransferSpecialistService {
|
|
|
253
258
|
*/
|
|
254
259
|
async getKnowledgeById(id) {
|
|
255
260
|
// #493: rehydrate Date fields at the kv-read seam.
|
|
256
|
-
const knowledge = rehydrateDates(await this.memory.get(`learning:knowledge:shared:${id}
|
|
261
|
+
const knowledge = rehydrateDates(await this.memory.get(`learning:knowledge:shared:${id}`, { namespace: 'learning-optimization' }), ['createdAt', 'expiresAt']);
|
|
257
262
|
return knowledge || null;
|
|
258
263
|
}
|
|
259
264
|
/**
|
|
@@ -261,11 +266,16 @@ export class TransferSpecialistService {
|
|
|
261
266
|
*/
|
|
262
267
|
async bulkTransfer(sourceProject, targetProject, filter) {
|
|
263
268
|
try {
|
|
264
|
-
|
|
269
|
+
// #1071: read project knowledge from the namespace it is written to
|
|
270
|
+
// below, every key, in key order. The scan is a glob (and
|
|
271
|
+
// case-insensitive on SQLite), so keep only this project's own
|
|
272
|
+
// `<prefix><id>` keys: `ALPHA` or `alpha:sub` must not leak into `alpha`.
|
|
273
|
+
const prefix = `learning:knowledge:project:${sourceProject}:`;
|
|
274
|
+
const keys = (await searchAllKeys(this.memory, `${prefix}*`, { retrieve: LEARNING_NS })).filter((key) => key.startsWith(prefix) && !key.slice(prefix.length).includes(':'));
|
|
265
275
|
const results = [];
|
|
266
276
|
for (const key of keys) {
|
|
267
277
|
// #493: rehydrate Date fields at the kv-read seam.
|
|
268
|
-
const knowledge = rehydrateDates(await this.memory.get(key), ['createdAt', 'expiresAt']);
|
|
278
|
+
const knowledge = rehydrateDates(await this.memory.get(key, LEARNING_NS), ['createdAt', 'expiresAt']);
|
|
269
279
|
if (!knowledge)
|
|
270
280
|
continue;
|
|
271
281
|
// Apply filter
|
|
@@ -69,10 +69,26 @@ export interface ITestRunResult {
|
|
|
69
69
|
skipped: number;
|
|
70
70
|
duration: number;
|
|
71
71
|
failedTests: IFailedTest[];
|
|
72
|
+
/**
|
|
73
|
+
* #1110: every test case as listed in the runner's own JSON report. Absent
|
|
74
|
+
* when the runner gave no per-test entries for the whole run (e.g. a
|
|
75
|
+
* summary-line fallback); never synthesized from counts.
|
|
76
|
+
*/
|
|
77
|
+
testCases?: ITestCaseResult[];
|
|
72
78
|
coverage?: ICoverageData;
|
|
73
79
|
/** Per-file coverage data for granular quality assessment */
|
|
74
80
|
fileCoverages?: IFileCoverageData[];
|
|
75
81
|
}
|
|
82
|
+
/** One test case taken verbatim from a runner report (#1110). */
|
|
83
|
+
export interface ITestCaseResult {
|
|
84
|
+
name: string;
|
|
85
|
+
file: string;
|
|
86
|
+
status: 'passed' | 'failed' | 'skipped';
|
|
87
|
+
/** Runner-reported duration in ms; omitted when the runner reported none. */
|
|
88
|
+
duration?: number;
|
|
89
|
+
/** The runner's failure message for a failed test, when it reported one. */
|
|
90
|
+
failureMessage?: string;
|
|
91
|
+
}
|
|
76
92
|
export interface IFileCoverageData {
|
|
77
93
|
path: string;
|
|
78
94
|
line: number;
|
|
@@ -6,7 +6,7 @@ import { LoggerFactory } from '../../../logging/index.js';
|
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { createVitestJsonReport } from '../../../shared/vitest-json-report.js';
|
|
8
8
|
import { jestExactPathPattern, nameFilterArg, runnerFilePath } from '../../../shared/test-runner-args.js';
|
|
9
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
9
|
+
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
10
10
|
import { resolve as resolvePath } from 'node:path';
|
|
11
11
|
import { ok, err } from '../../../shared/types/index.js';
|
|
12
12
|
import { TEST_EXECUTION_CONSTANTS, RETRY_CONSTANTS } from '../../constants.js';
|
|
@@ -14,6 +14,22 @@ import { toError } from '../../../shared/error-utils.js';
|
|
|
14
14
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
15
15
|
import { secureRandom } from '../../../shared/utils/crypto-random.js';
|
|
16
16
|
import { terminateTestRunner, trackTestRunnerExit } from '../../../shared/test-runner-process.js';
|
|
17
|
+
/**
|
|
18
|
+
* Whether a runner-reported test file and the requested target are the same
|
|
19
|
+
* file. Runners report real paths, so a target given through a symlink must be
|
|
20
|
+
* compared by realpath, falling back to the runner path when a file is missing.
|
|
21
|
+
*/
|
|
22
|
+
function sameTestFile(reported, target, cwd) {
|
|
23
|
+
const canonical = (file) => {
|
|
24
|
+
try {
|
|
25
|
+
return realpathSync(resolvePath(cwd, file));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return runnerFilePath(file, cwd);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return canonical(reported) === canonical(target);
|
|
32
|
+
}
|
|
17
33
|
const DEFAULT_RETRY_CONFIG = {
|
|
18
34
|
simulateForTesting: false,
|
|
19
35
|
simulatedRetrySuccessRate: RETRY_CONSTANTS.DEFAULT_FLAKY_PASS_RATE,
|
|
@@ -462,7 +478,7 @@ export class RetryHandlerService {
|
|
|
462
478
|
// Vitest's positional file filter uses prefix matching. A passing
|
|
463
479
|
// sibling must not clear a failure in the requested file (#972).
|
|
464
480
|
const targetPassed = !targetFile || result.testResults?.some((file) => typeof file.name === 'string'
|
|
465
|
-
&&
|
|
481
|
+
&& sameTestFile(file.name, targetFile, this.config.cwd ?? process.cwd())
|
|
466
482
|
&& file.assertionResults?.some(assertion => assertion.status === 'passed'));
|
|
467
483
|
if (exitCode === 0 && result.success !== false
|
|
468
484
|
&& result.numFailedTests === 0 && result.numFailedTestSuites === 0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1110: per-test results read from a Vitest/Jest JSON report.
|
|
3
|
+
*
|
|
4
|
+
* Both runners emit `testResults[].assertionResults[]`. Each entry becomes one
|
|
5
|
+
* test case with the runner's own name, status and duration; nothing is
|
|
6
|
+
* derived from aggregate counts.
|
|
7
|
+
*/
|
|
8
|
+
import type { ITestCaseResult } from '../interfaces';
|
|
9
|
+
/**
|
|
10
|
+
* Test cases listed in a runner JSON report, or undefined when the report
|
|
11
|
+
* has no per-test entries.
|
|
12
|
+
*/
|
|
13
|
+
export declare function testCasesFromRunnerReport(report: {
|
|
14
|
+
testResults?: unknown;
|
|
15
|
+
}, fallbackFile: string): ITestCaseResult[] | undefined;
|
|
16
|
+
/** Concatenate per-run test cases; undefined unless every run listed its tests. */
|
|
17
|
+
export declare function mergeTestCases(runs: ReadonlyArray<{
|
|
18
|
+
testCases?: ITestCaseResult[];
|
|
19
|
+
total: number;
|
|
20
|
+
}>): ITestCaseResult[] | undefined;
|
|
21
|
+
//# sourceMappingURL=runner-test-cases.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1110: per-test results read from a Vitest/Jest JSON report.
|
|
3
|
+
*
|
|
4
|
+
* Both runners emit `testResults[].assertionResults[]`. Each entry becomes one
|
|
5
|
+
* test case with the runner's own name, status and duration; nothing is
|
|
6
|
+
* derived from aggregate counts.
|
|
7
|
+
*/
|
|
8
|
+
const SKIPPED_STATUSES = new Set(['skipped', 'pending', 'todo']);
|
|
9
|
+
/** Upper bound on a reported failure message, so one stack cannot swamp the output. */
|
|
10
|
+
const MAX_FAILURE_MESSAGE_LENGTH = 4000;
|
|
11
|
+
function failureMessageOf(assertion) {
|
|
12
|
+
if (!Array.isArray(assertion.failureMessages))
|
|
13
|
+
return undefined;
|
|
14
|
+
const message = assertion.failureMessages.filter((m) => typeof m === 'string').join('\n').trim();
|
|
15
|
+
if (!message)
|
|
16
|
+
return undefined;
|
|
17
|
+
return message.length > MAX_FAILURE_MESSAGE_LENGTH
|
|
18
|
+
? `${message.slice(0, MAX_FAILURE_MESSAGE_LENGTH)}… [truncated]`
|
|
19
|
+
: message;
|
|
20
|
+
}
|
|
21
|
+
function toStatus(status) {
|
|
22
|
+
if (status === 'passed' || status === 'failed')
|
|
23
|
+
return status;
|
|
24
|
+
return typeof status === 'string' && SKIPPED_STATUSES.has(status) ? 'skipped' : undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Test cases listed in a runner JSON report, or undefined when the report
|
|
28
|
+
* has no per-test entries.
|
|
29
|
+
*/
|
|
30
|
+
export function testCasesFromRunnerReport(report, fallbackFile) {
|
|
31
|
+
if (!Array.isArray(report.testResults))
|
|
32
|
+
return undefined;
|
|
33
|
+
const cases = [];
|
|
34
|
+
for (const fileResult of report.testResults) {
|
|
35
|
+
const file = typeof fileResult?.name === 'string' ? fileResult.name : fallbackFile;
|
|
36
|
+
const assertions = Array.isArray(fileResult?.assertionResults) ? fileResult.assertionResults : [];
|
|
37
|
+
for (const assertion of assertions) {
|
|
38
|
+
// A malformed entry is skipped; the caller's count check then drops the list.
|
|
39
|
+
if (!assertion || typeof assertion !== 'object')
|
|
40
|
+
continue;
|
|
41
|
+
const status = toStatus(assertion.status);
|
|
42
|
+
if (!status)
|
|
43
|
+
continue;
|
|
44
|
+
const name = typeof assertion.fullName === 'string' && assertion.fullName
|
|
45
|
+
? assertion.fullName
|
|
46
|
+
: typeof assertion.title === 'string' ? assertion.title : '';
|
|
47
|
+
if (!name)
|
|
48
|
+
continue;
|
|
49
|
+
const duration = typeof assertion.duration === 'number' && Number.isFinite(assertion.duration)
|
|
50
|
+
? assertion.duration
|
|
51
|
+
: undefined;
|
|
52
|
+
const failureMessage = status === 'failed' ? failureMessageOf(assertion) : undefined;
|
|
53
|
+
cases.push({
|
|
54
|
+
name, file, status,
|
|
55
|
+
...(duration !== undefined ? { duration } : {}),
|
|
56
|
+
...(failureMessage ? { failureMessage } : {}),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return cases.length > 0 ? cases : undefined;
|
|
61
|
+
}
|
|
62
|
+
/** Concatenate per-run test cases; undefined unless every run listed its tests. */
|
|
63
|
+
export function mergeTestCases(runs) {
|
|
64
|
+
if (runs.length === 0 || runs.some(run => run.total > 0 && !run.testCases))
|
|
65
|
+
return undefined;
|
|
66
|
+
const merged = runs.flatMap(run => run.testCases ?? []);
|
|
67
|
+
return merged.length > 0 ? merged : undefined;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=runner-test-cases.js.map
|
|
@@ -127,6 +127,11 @@ export declare class TestExecutorService implements ITestExecutionService {
|
|
|
127
127
|
* Parse vitest JSON output
|
|
128
128
|
*/
|
|
129
129
|
private parseVitestOutput;
|
|
130
|
+
/**
|
|
131
|
+
* #1110: the report's per-test entries, kept only when they account for
|
|
132
|
+
* every counted test; a partial list would misstate the run.
|
|
133
|
+
*/
|
|
134
|
+
private reportedTestCases;
|
|
130
135
|
/**
|
|
131
136
|
* Parse jest JSON output
|
|
132
137
|
*/
|