agentic-qe 3.15.9 → 3.15.10
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 +251 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/a2ui/catalog/component-schemas.js +2 -1
- package/dist/adapters/a2ui/data/json-pointer-resolver.js +10 -5
- package/dist/adapters/a2ui/integration/agui-sync.js +10 -6
- package/dist/adapters/a2ui/integration/surface-state-bridge.js +9 -5
- package/dist/adapters/ag-ui/json-patch.js +10 -6
- package/dist/audit/witness-chain.d.ts +1 -1
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-TR5SLAZC.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-H7ANGXW4.js +2 -0
- package/dist/cli/chunks/{agent-handler-RIYHTHVZ.js → agent-handler-SVXSHEET.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-WSUCUHOO.js → agent-memory-branch-WKQH36XL.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-DXWKCHY2.js +2 -0
- package/dist/cli/chunks/{arena-KRIBMIXX.js → arena-EKOOFVST.js} +2 -2
- package/dist/cli/chunks/{arena-YAJZX6MC.js → arena-OPS36NFZ.js} +4 -4
- package/dist/cli/chunks/{audit-7ZNOXWP3.js → audit-AO5NDZRI.js} +3 -3
- package/dist/cli/chunks/base-GTB6POYE.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-ZQAT4I6H.js → better-sqlite3-TFLVEMMY.js} +2 -2
- package/dist/cli/chunks/{brain-handler-452WCPZC.js → brain-handler-ADBBJPYW.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-IJFXJRPN.js → branch-enumerator-HGHUYYL5.js} +2 -2
- package/dist/cli/chunks/browser-5LU6P4SZ.js +4 -0
- package/dist/cli/chunks/browser-workflow-MSBOLYUY.js +2 -0
- package/dist/cli/chunks/{chunk-UOJBR4J3.js → chunk-2SXBBUM6.js} +2 -2
- package/dist/cli/chunks/{chunk-7JKB3Q7O.js → chunk-2T7RRL6G.js} +1 -1
- package/dist/cli/chunks/{chunk-HCYQHWI2.js → chunk-2XGVTYVX.js} +2 -2
- package/dist/cli/chunks/{chunk-3LYU7BLY.js → chunk-2ZI5FKSF.js} +2 -2
- package/dist/cli/chunks/chunk-2ZMF4NCF.js +4 -0
- package/dist/cli/chunks/{chunk-F3PQZX44.js → chunk-37OWRCUN.js} +1 -1
- package/dist/cli/chunks/{chunk-YRBBBUJX.js → chunk-3P34JFQH.js} +4 -4
- package/dist/cli/chunks/{chunk-ICP2ORGI.js → chunk-3Y7SPD72.js} +2 -2
- package/dist/cli/chunks/{chunk-WGDR2KIR.js → chunk-4G63WT4F.js} +2 -2
- package/dist/cli/chunks/chunk-4SJYIX54.js +3 -0
- package/dist/cli/chunks/chunk-5E6GHSTY.js +3 -0
- package/dist/cli/chunks/{chunk-OXTFSIGN.js → chunk-5LPYV3TK.js} +1 -1
- package/dist/cli/chunks/{chunk-XWIUFYM3.js → chunk-62OAY5KJ.js} +1 -1
- package/dist/cli/chunks/{chunk-VCMINU7K.js → chunk-6C3II5OM.js} +2 -2
- package/dist/cli/chunks/{chunk-EFBLP43U.js → chunk-6GP6W46M.js} +2 -2
- package/dist/cli/chunks/{chunk-4JCY45KV.js → chunk-6KIL6CMD.js} +2 -2
- package/dist/cli/chunks/{chunk-CTZJUV5I.js → chunk-6MVVSSID.js} +1 -1
- package/dist/cli/chunks/{chunk-JEP4ULR6.js → chunk-6P7424AO.js} +2 -2
- package/dist/cli/chunks/{chunk-SVHUYVUR.js → chunk-6PX4OXQO.js} +2 -2
- package/dist/cli/chunks/{chunk-LEAKYZ37.js → chunk-6S3WJGUV.js} +2 -2
- package/dist/cli/chunks/{chunk-7X2Y727E.js → chunk-6TB6YOCZ.js} +1 -1
- package/dist/cli/chunks/{chunk-VU2EL424.js → chunk-6X5DHU6Q.js} +1 -1
- package/dist/cli/chunks/{chunk-DDPPSSHW.js → chunk-6XCMKIZN.js} +1 -1
- package/dist/cli/chunks/{chunk-ZANDSVCK.js → chunk-7LFZ4CHM.js} +2 -2
- package/dist/cli/chunks/{chunk-UYLYMWV5.js → chunk-7OZVZIBE.js} +2 -2
- package/dist/cli/chunks/{chunk-32UTLDNY.js → chunk-7PJIR4ST.js} +2 -2
- package/dist/cli/chunks/{chunk-DINZR5CF.js → chunk-7TB6FK4B.js} +1 -1
- package/dist/cli/chunks/{chunk-KVBEGOJE.js → chunk-7ZCDZHDB.js} +2 -2
- package/dist/cli/chunks/{chunk-55HRSNGN.js → chunk-A55QKKT2.js} +2 -2
- package/dist/cli/chunks/{chunk-LCJTEUDC.js → chunk-ABFFWZPC.js} +428 -433
- package/dist/cli/chunks/{chunk-PVIA2FPD.js → chunk-ACWFKES2.js} +2 -2
- package/dist/cli/chunks/{chunk-2BA45H64.js → chunk-AH3ZD3NJ.js} +2 -2
- package/dist/cli/chunks/{chunk-OG2UI6A3.js → chunk-AI4VYSFS.js} +2 -2
- package/dist/cli/chunks/chunk-APSRPR4W.js +2 -0
- package/dist/cli/chunks/chunk-ATHWDAXB.js +3 -0
- package/dist/cli/chunks/{chunk-TSYQDRNK.js → chunk-B6LTH6YV.js} +2 -2
- package/dist/cli/chunks/chunk-BQUAE3CP.js +3 -0
- package/dist/cli/chunks/{chunk-OCESWNAZ.js → chunk-C522H7XR.js} +54 -33
- package/dist/cli/chunks/{chunk-TUYJ53V4.js → chunk-CESIR27V.js} +2 -2
- package/dist/cli/chunks/{chunk-PBZI2ZPV.js → chunk-CFBEBXLO.js} +3 -3
- package/dist/cli/chunks/{chunk-FJ4VTLLK.js → chunk-CMBLM26R.js} +2 -2
- package/dist/cli/chunks/{chunk-YZYDTABJ.js → chunk-CZ2IF6MC.js} +1 -1
- package/dist/cli/chunks/{chunk-GKPQ2GRR.js → chunk-CZGOSJQ4.js} +2 -2
- package/dist/cli/chunks/{chunk-FL3OYGCS.js → chunk-D6DA2KFD.js} +2 -2
- package/dist/cli/chunks/{chunk-37BIGMJI.js → chunk-DBMNJSBV.js} +1 -1
- package/dist/cli/chunks/{chunk-BHKXMIWX.js → chunk-DE4YJQJF.js} +2 -2
- package/dist/cli/chunks/{chunk-3CJCROMW.js → chunk-DEF34AFL.js} +2 -2
- package/dist/cli/chunks/chunk-DKAC3E3B.js +3 -0
- package/dist/cli/chunks/{chunk-AOFO4N32.js → chunk-DMFTELBS.js} +2 -2
- package/dist/cli/chunks/{chunk-KLGYIEJK.js → chunk-DNRWGATA.js} +10 -10
- package/dist/cli/chunks/{chunk-JWGRWMZP.js → chunk-DT7SIJOA.js} +2 -2
- package/dist/cli/chunks/{chunk-6PXA2BQJ.js → chunk-DURHK377.js} +67 -67
- package/dist/cli/chunks/{chunk-HAROIAJE.js → chunk-EAU5KDFO.js} +1 -1
- package/dist/cli/chunks/{chunk-L42JPFCC.js → chunk-EDLFX4ZB.js} +2 -2
- package/dist/cli/chunks/{chunk-6OOYIO3W.js → chunk-EN2QSKFF.js} +2 -2
- package/dist/cli/chunks/{chunk-UNUTC6TX.js → chunk-ERQKYIP7.js} +2 -2
- package/dist/cli/chunks/{chunk-KFUUIAR4.js → chunk-ESUO3GTJ.js} +2 -2
- package/dist/cli/chunks/{chunk-4V27J6YN.js → chunk-EWFECZ2U.js} +2 -2
- package/dist/cli/chunks/{chunk-4W4DYVSH.js → chunk-FAUCT5KR.js} +3 -3
- package/dist/cli/chunks/{chunk-IFEIY3NQ.js → chunk-FB6TI3BH.js} +2 -2
- package/dist/cli/chunks/{chunk-2TDIS6YK.js → chunk-FBXTQNRH.js} +2 -2
- package/dist/cli/chunks/{chunk-XOLDMK23.js → chunk-FESZBPUB.js} +2 -2
- package/dist/cli/chunks/chunk-FFTPAWM6.js +141 -0
- package/dist/cli/chunks/{chunk-A6YIH4C4.js → chunk-FKL3R5JQ.js} +2 -2
- package/dist/cli/chunks/{chunk-N5PDFGCQ.js → chunk-FPUDRSFJ.js} +2 -2
- package/dist/cli/chunks/{chunk-7QGYJ5OY.js → chunk-FZOWULMH.js} +1 -1
- package/dist/cli/chunks/{chunk-AVB5QY2Q.js → chunk-G3CZCUPM.js} +2 -2
- package/dist/cli/chunks/{chunk-FV3NHVC7.js → chunk-G5I6KGMW.js} +3 -3
- package/dist/cli/chunks/{chunk-N3KEY4XJ.js → chunk-GHBNRMSJ.js} +2 -2
- package/dist/cli/chunks/{chunk-2YH62JCN.js → chunk-GJHWY3ZX.js} +2 -2
- package/dist/cli/chunks/{chunk-ZXBCCO2H.js → chunk-GJMLK5UT.js} +2 -2
- package/dist/cli/chunks/{chunk-NHZIWIQZ.js → chunk-GRCIBCJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-J3DTDJDT.js → chunk-GWZZ7DAO.js} +2 -2
- package/dist/cli/chunks/{chunk-4SUOVLJ6.js → chunk-GZLZCZ42.js} +2 -2
- package/dist/cli/chunks/{chunk-MZS32SYS.js → chunk-H2PYU7MN.js} +1 -1
- package/dist/cli/chunks/{chunk-ABFDB4X3.js → chunk-H32EPIR2.js} +1 -1
- package/dist/cli/chunks/{chunk-KIXYKUCI.js → chunk-H74Q7TJN.js} +1 -1
- package/dist/cli/chunks/chunk-HOZUDE4C.js +2 -0
- package/dist/cli/chunks/{chunk-PMCRCEW5.js → chunk-I33O4BRQ.js} +2 -2
- package/dist/cli/chunks/{chunk-N3NP6PTT.js → chunk-IKISCIGH.js} +2 -2
- package/dist/cli/chunks/{chunk-Q3JVJRVJ.js → chunk-IPJ7Q3AJ.js} +1 -1
- package/dist/cli/chunks/{chunk-WRRCQ2UE.js → chunk-IU2IV4NE.js} +1 -1
- package/dist/cli/chunks/{chunk-QQ5SZH4D.js → chunk-JHIY4VCC.js} +2 -2
- package/dist/cli/chunks/{chunk-W32YU3VI.js → chunk-KG336OV3.js} +2 -2
- package/dist/cli/chunks/{chunk-W5VJRDDG.js → chunk-KI73QCR5.js} +2 -2
- package/dist/cli/chunks/{chunk-HGTWAZWU.js → chunk-KNQ2ERFX.js} +2 -2
- package/dist/cli/chunks/{chunk-SNBYYO6F.js → chunk-KOBVYY6H.js} +2 -2
- package/dist/cli/chunks/{chunk-VQHVHVSF.js → chunk-KSIWGGJI.js} +8 -8
- package/dist/cli/chunks/{chunk-REUFWGMA.js → chunk-LMS3Y7JD.js} +2 -2
- package/dist/cli/chunks/{chunk-LMU5DUDK.js → chunk-LQEURY7C.js} +1 -1
- package/dist/cli/chunks/{chunk-AJ4YDSOI.js → chunk-LRZY4KS2.js} +2 -2
- package/dist/cli/chunks/{chunk-KIKWJM6J.js → chunk-M2QV7PT7.js} +2 -2
- package/dist/cli/chunks/{chunk-TNMQVG4A.js → chunk-MA7JIQ6U.js} +2 -2
- package/dist/cli/chunks/{chunk-I6S35FRO.js → chunk-MG27QY4D.js} +2 -2
- package/dist/cli/chunks/chunk-MNN5J4GU.js +12 -0
- package/dist/cli/chunks/chunk-N6PIIK6G.js +3 -0
- package/dist/cli/chunks/chunk-NAXGWDVM.js +12 -0
- package/dist/cli/chunks/{chunk-XOVNZT7F.js → chunk-NGKNYIQZ.js} +1 -1
- package/dist/cli/chunks/chunk-NNFZUTDH.js +2 -0
- package/dist/cli/chunks/{chunk-ZVSLCEVC.js → chunk-NPPHWFA2.js} +3 -3
- package/dist/cli/chunks/{chunk-JNNZK7KH.js → chunk-NSHU347M.js} +1 -1
- package/dist/cli/chunks/{chunk-PX2B5TS2.js → chunk-NVYIZCSR.js} +2 -2
- package/dist/cli/chunks/{chunk-5NS3USRW.js → chunk-NW5JUCCG.js} +1 -1
- package/dist/cli/chunks/{chunk-KR3M44CF.js → chunk-NZYLNXT6.js} +3 -3
- package/dist/cli/chunks/{chunk-5D2I7JUP.js → chunk-OBAREPDC.js} +2 -2
- package/dist/cli/chunks/{chunk-F4JYIRW2.js → chunk-ODJNUMV3.js} +2 -2
- package/dist/cli/chunks/{chunk-K5DJXMAA.js → chunk-OEKP73MC.js} +2 -2
- package/dist/cli/chunks/{chunk-2URBI52G.js → chunk-OPFGRS5S.js} +2 -2
- package/dist/cli/chunks/{chunk-HZ5NC6U5.js → chunk-OY2AHLSF.js} +1 -1
- package/dist/cli/chunks/{chunk-GII5WVAK.js → chunk-OY3NJNP2.js} +1 -1
- package/dist/cli/chunks/{chunk-P73W2K7T.js → chunk-PCEW6Q2C.js} +1 -1
- package/dist/cli/chunks/{chunk-7QTB5VJZ.js → chunk-PFG6VQ5Z.js} +2 -2
- package/dist/cli/chunks/{chunk-7KII4CQG.js → chunk-PGYMKGOE.js} +2 -2
- package/dist/cli/chunks/{chunk-BXO536GT.js → chunk-PPSAMXYN.js} +3 -3
- package/dist/cli/chunks/chunk-RK73HB2F.js +2 -0
- package/dist/cli/chunks/{chunk-ZBDRLF43.js → chunk-RPHY2DU6.js} +2 -2
- package/dist/cli/chunks/{chunk-XDBD4GXO.js → chunk-RWWOHCMG.js} +25 -20
- package/dist/cli/chunks/{chunk-J5KNRVXR.js → chunk-S75EYIJG.js} +1 -1
- package/dist/cli/chunks/{chunk-ETG7O5E5.js → chunk-SKQUUE4F.js} +5 -5
- package/dist/cli/chunks/chunk-SO45NA4D.js +180 -0
- package/dist/cli/chunks/{chunk-47V7FQGX.js → chunk-SU5H66SD.js} +2 -2
- package/dist/cli/chunks/{chunk-NTAD5UX4.js → chunk-SY2IB442.js} +2 -2
- package/dist/cli/chunks/{chunk-D6XVGFTI.js → chunk-TBLI254A.js} +2 -2
- package/dist/cli/chunks/{chunk-47TYABPD.js → chunk-TNMBRDCA.js} +3 -3
- package/dist/cli/chunks/{chunk-P2CXVNKK.js → chunk-TYFZXDGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-2XITOPYV.js → chunk-U4OICXV2.js} +2 -2
- package/dist/cli/chunks/{chunk-JAV5WPSY.js → chunk-U53ZB4IX.js} +2 -2
- package/dist/cli/chunks/chunk-UARKIZAS.js +2 -0
- package/dist/cli/chunks/{chunk-2HL3UM5P.js → chunk-UCJMVXO4.js} +2 -2
- package/dist/cli/chunks/{chunk-HWK5L7IJ.js → chunk-UHTTW3IT.js} +2 -2
- package/dist/cli/chunks/{chunk-OXZLKP6C.js → chunk-V2M2XCR5.js} +1 -1
- package/dist/cli/chunks/{chunk-YZGSJG34.js → chunk-V2RSNVMW.js} +1 -1
- package/dist/cli/chunks/{chunk-5JWGCIQW.js → chunk-V6JBOIMX.js} +1 -1
- package/dist/cli/chunks/{chunk-JUVHZG7I.js → chunk-VFKF2XO7.js} +1 -1
- package/dist/cli/chunks/{chunk-XQ3DDY7X.js → chunk-VFSYMOAL.js} +2 -2
- package/dist/cli/chunks/{chunk-V5PXQSFS.js → chunk-VJQYDYAJ.js} +2 -2
- package/dist/cli/chunks/{chunk-A4RU67VX.js → chunk-VKRTTFB6.js} +2 -2
- package/dist/cli/chunks/{chunk-H3KBIWTO.js → chunk-VWNFAW2M.js} +2 -2
- package/dist/cli/chunks/{chunk-72AMFDC7.js → chunk-WBM6N6IM.js} +1 -1
- package/dist/cli/chunks/{chunk-XUIA5KMS.js → chunk-WDQ7IEZY.js} +2 -2
- package/dist/cli/chunks/{chunk-FLASM2XB.js → chunk-WDVRE6GN.js} +2 -2
- package/dist/cli/chunks/{chunk-FV7VAG74.js → chunk-WQ4PYWSW.js} +1 -1
- package/dist/cli/chunks/{chunk-DGTLJNJH.js → chunk-WSF24I3D.js} +2 -2
- package/dist/cli/chunks/{chunk-6YL6JOQB.js → chunk-XBVUVFJK.js} +2 -2
- package/dist/cli/chunks/{chunk-VRGCKBF7.js → chunk-XEB3NLJR.js} +2 -2
- package/dist/cli/chunks/{chunk-XYCKHYBM.js → chunk-XFVTGAAJ.js} +2 -2
- package/dist/cli/chunks/{chunk-2I2UPJS7.js → chunk-XLZYRTNO.js} +2 -2
- package/dist/cli/chunks/{chunk-AR2E4B7K.js → chunk-XUZDBQ5X.js} +5 -5
- package/dist/cli/chunks/{chunk-AQTVVLNP.js → chunk-Y76IAYQD.js} +1 -1
- package/dist/cli/chunks/{chunk-UOWHE77F.js → chunk-YAKGBHO4.js} +2 -2
- package/dist/cli/chunks/{chunk-JK2ME6IT.js → chunk-YBSBABOS.js} +2 -2
- package/dist/cli/chunks/{chunk-NDKLQW6N.js → chunk-YCGP5VFP.js} +2 -2
- package/dist/cli/chunks/{chunk-GBUIG3FS.js → chunk-YDAQK5UF.js} +1 -1
- package/dist/cli/chunks/{chunk-HTZJSQ3C.js → chunk-YK3BVZY6.js} +2 -2
- package/dist/cli/chunks/{chunk-GCWSX2NY.js → chunk-YK7JN5N7.js} +4 -4
- package/dist/cli/chunks/{chunk-C6RTMTEH.js → chunk-YKMU4LBV.js} +1 -1
- package/dist/cli/chunks/{chunk-JP4P3P3D.js → chunk-YYTGXD3R.js} +2 -2
- package/dist/cli/chunks/{chunk-763SUL4B.js → chunk-Z2O2YJAF.js} +2 -2
- package/dist/cli/chunks/{chunk-QTVWUQTB.js → chunk-Z7IYW5U7.js} +1 -1
- package/dist/cli/chunks/{chunk-XZJ2O3VC.js → chunk-ZG5666GJ.js} +1 -1
- package/dist/cli/chunks/{chunk-6EPHNJTL.js → chunk-ZXPY654C.js} +1 -1
- package/dist/cli/chunks/{ci-7SGRCFPS.js → ci-MSKMVH5X.js} +2 -2
- package/dist/cli/chunks/{ci-config-MX3URPZA.js → ci-config-7ODMNAUM.js} +2 -2
- package/dist/cli/chunks/{ci-output-M47NJY6D.js → ci-output-FXZ7ZZW3.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-5GAK45SW.js → circuit-breaker-4VOUEPOX.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-YXYSRH4Y.js → claude-flow-setup-7D4SGLM4.js} +2 -2
- package/dist/cli/chunks/client-POSVREVS.js +2 -0
- package/dist/cli/chunks/{cline-installer-DLJ5QD5N.js → cline-installer-WRRT7BGQ.js} +2 -2
- package/dist/cli/chunks/{code-ONKLMVQ2.js → code-ZDJRIL3S.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-2232LGZN.js → code-index-extractor-4S4SHM56.js} +2 -2
- package/dist/cli/chunks/{codex-installer-UOWLYCMH.js → codex-installer-YTRHNDWR.js} +2 -2
- package/dist/cli/chunks/{completions-MHX7GCC7.js → completions-6N64JUXJ.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-43ZUJKZU.js → complexity-analyzer-I4A26VCJ.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-6Q5JR4FF.js → continuedev-installer-IIDR66LB.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-CZUMVHSI.js → copilot-installer-SVVFY3S2.js} +2 -2
- package/dist/cli/chunks/core-handlers-V243GY7X.js +2 -0
- package/dist/cli/chunks/{cost-tracker-VS5ZW3XN.js → cost-tracker-VGFS6IBX.js} +2 -2
- package/dist/cli/chunks/{coverage-VWKTWZ6D.js → coverage-B7MCGNTE.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-N3AIEM3B.js +2 -0
- package/dist/cli/chunks/{cursor-installer-YIFEMORH.js → cursor-installer-UPETT57E.js} +2 -2
- package/dist/cli/chunks/daemon-7BDJHEIJ.js +18 -0
- package/dist/cli/chunks/{daemon-SHWJSJW5.js → daemon-CQFNZLXU.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-TCC2WM46.js → dag-attention-scheduler-PJVABHON.js} +2 -2
- package/dist/cli/chunks/{detect-IGTWSQMA.js → detect-56SKAGWX.js} +2 -2
- package/dist/cli/chunks/{dist-node-TCOTJVQX.js → dist-node-UYTYUMLN.js} +2 -2
- package/dist/cli/chunks/{domain-handler-55ZVYODR.js → domain-handler-YOYLBYJE.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-GJRWOHQP.js → domain-plugins-7TARX2XF.js} +2 -2
- package/dist/cli/chunks/domain-transfer-AKVSBD6E.js +2 -0
- package/dist/cli/chunks/dream-UA7MKOPQ.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-XAMNIKQL.js → embed-and-insert-pattern-IS6HSR66.js} +2 -2
- package/dist/cli/chunks/{eval-GO22R4OZ.js → eval-GNB574IM.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-F2BRMJ3Y.js → experience-capture-middleware-RCAOCKM7.js} +3 -3
- package/dist/cli/chunks/{fast-paths-6RGPYALD.js → fast-paths-KTZ5SF54.js} +2 -2
- package/dist/cli/chunks/{feature-flags-ZGS3KLPH.js → feature-flags-ITX5LQ57.js} +2 -2
- package/dist/cli/chunks/{feature-flags-MIWQIOHU.js → feature-flags-KFHSR5YF.js} +2 -2
- package/dist/cli/chunks/file-discovery-YCMNKZAK.js +2 -0
- package/dist/cli/chunks/fleet-2Y3ZE6CE.js +46 -0
- package/dist/cli/chunks/{gnn-wrapper-ALBJVW6T.js → gnn-wrapper-RLFW3GSX.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-ZMM53NDY.js → heartbeat-handler-EM2URCYZ.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-QH5V6G2P.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-OJNFAGJS.js +2 -0
- package/dist/cli/chunks/hnsw-index-DFUNARVD.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-RYUJPA7B.js → hnsw-legacy-bridge-JMHEOIBH.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-XM6XF3YV.js → hnswlib-node-CBP73QHY.js} +2 -2
- package/dist/cli/chunks/{hooks-X62O7TJO.js → hooks-IP7XE34Z.js} +34 -34
- package/dist/cli/chunks/hybrid-backend-SSGQQEQ2.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-ZBWUPTVD.js → hypergraph-engine-ONAYHU25.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-DUMF6SJV.js → hypergraph-handler-VINJRAID.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-CRGCA7ZD.js +2 -0
- package/dist/cli/chunks/{init-guard-S4I2R46S.js → init-guard-RYVV5R3Z.js} +2 -2
- package/dist/cli/chunks/{init-handler-L4KJHVWS.js → init-handler-MPRGWMOE.js} +6 -6
- package/dist/cli/chunks/init-wizard-NIMZ4J55.js +2 -0
- package/dist/cli/chunks/kernel-JQK7PRAI.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-GNNB5FCZ.js → kilocode-installer-OPD7JBRL.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-HR6ZAH7T.js → kiro-installer-M4OPUNK2.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-YPVVIKEU.js +2 -0
- package/dist/cli/chunks/{learning-4IEEOHJS.js → learning-4UWTQLMF.js} +24 -24
- package/dist/cli/chunks/{llm-router-ZFMORP36.js → llm-router-SQ56FF6Z.js} +4 -4
- package/dist/cli/chunks/llm-router-service-5OGAUOXF.js +2 -0
- package/dist/cli/chunks/{load-ZM43WGDO.js → load-HPHKDGGL.js} +2 -2
- package/dist/cli/chunks/load-test-UKNV5MWW.js +2 -0
- package/dist/cli/chunks/mcp-TELMAC7Z.js +2 -0
- package/dist/cli/chunks/{memory-W5FZGVAD.js → memory-PFQ3KPVJ.js} +5 -5
- package/dist/cli/chunks/memory-backend-ZW4BTRNK.js +2 -0
- package/dist/cli/chunks/memory-handlers-FCXN437E.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-SXXGAQ2G.js → multi-model-executor-3VDRX6TZ.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-PIRBUAB5.js → opencode-installer-PJ576R63.js} +2 -2
- package/dist/cli/chunks/{orchestrator-H5SQCQTB.js → orchestrator-72QP4UU7.js} +63 -19
- package/dist/cli/chunks/pattern-null-store-4DUV6MQC.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-XZTWDI2T.js → pattern-usage-recorder-754YQW7C.js} +2 -2
- package/dist/cli/chunks/pipeline-AVXY4MVB.js +19 -0
- package/dist/cli/chunks/{platform-KJDABL5C.js → platform-3E3DXLYB.js} +2 -2
- package/dist/cli/chunks/{plugin-V4KSBVVM.js → plugin-7FUQAKRE.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-JDHTKQAT.js → prime-radiant-advanced-wasm-NIB4F5NV.js} +2 -2
- package/dist/cli/chunks/project-root-JCAUNL6O.js +2 -0
- package/dist/cli/chunks/protocol-executor-RNZNZP3A.js +2 -0
- package/dist/cli/chunks/{protocol-handler-BNRONTQV.js → protocol-handler-BQRYMUTG.js} +2 -2
- package/dist/cli/chunks/{prove-ELLL6XMX.js → prove-H52QGC6B.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-WK6TQOG2.js +2 -0
- package/dist/cli/chunks/{quality-NH2QA4D4.js → quality-QO4XPAUM.js} +2 -2
- package/dist/cli/chunks/{quality-gate-JTKLF7GW.js → quality-gate-FBKE5E6F.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-4452SXZQ.js +2 -0
- package/dist/cli/chunks/{real-embeddings-J3KCKLPB.js → real-embeddings-RWGOVOXO.js} +2 -2
- package/dist/cli/chunks/{ref-validation-HNXQRP4F.js → ref-validation-LF76ZOBD.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-COJ6CX6S.js → roocode-installer-3BYEBTQ7.js} +2 -2
- package/dist/cli/chunks/router-3DIS5X4R.js +2 -0
- package/dist/cli/chunks/routing-feedback-OPXRCXM7.js +2 -0
- package/dist/cli/chunks/{routing-handler-WM33ZILE.js → routing-handler-DST7BVCU.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-BBLXEA7A.js → ruvector-commands-XE32PGKC.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-JL6T727I.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-V7IBDUCS.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-P7H6HCAG.js → rvf-migration-coordinator-VP32XC75.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-O3UQTEBK.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-R5SPVRFP.js → rvf-store-integrity-SH2AMVI7.js} +2 -2
- package/dist/cli/chunks/safe-db-EVB4ZC7T.js +2 -0
- package/dist/cli/chunks/schedule-ORDDXXY4.js +2 -0
- package/dist/cli/chunks/scheduler-XFLJSFIU.js +2 -0
- package/dist/cli/chunks/{security-AUDTRX3I.js → security-VSPNKCDS.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-PVDGBGI2.js → shared-rvf-adapter-HX6AHL3P.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-LZ2GMSS2.js → shared-rvf-dual-writer-MX4FC2JE.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-Y7B42CJ3.js +2 -0
- package/dist/cli/chunks/{standalone-memory-XNOAI4G4.js → standalone-memory-O4QUTK6L.js} +2 -2
- package/dist/cli/chunks/{status-handler-K72XZE4T.js → status-handler-Z2BP6EOG.js} +2 -2
- package/dist/cli/chunks/{structural-health-NF3YY7U5.js → structural-health-R36WNLQG.js} +2 -2
- package/dist/cli/chunks/sync-2ELWUFQU.js +2 -0
- package/dist/cli/chunks/{sync-VBD5Y3E2.js → sync-QF5Y3EMZ.js} +2 -2
- package/dist/cli/chunks/{task-handler-24S3WFVJ.js → task-handler-43PYE75J.js} +2 -2
- package/dist/cli/chunks/task-handlers-KPWAEMKH.js +9 -0
- package/dist/cli/chunks/{test-XFSGQELD.js → test-UWA377D4.js} +16 -16
- package/dist/cli/chunks/test-runner-process-3XZUYST2.js +2 -0
- package/dist/cli/chunks/{test-scheduling-VYUQ4CDE.js → test-scheduling-YQZPJRRN.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-F7C6UKTC.js +2 -0
- package/dist/cli/chunks/{token-usage-VLQ6WO2L.js → token-usage-DO6WLMXP.js} +2 -2
- package/dist/cli/chunks/{transformers-TOFMWWNM.js → transformers-H5RGFKVO.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-YTBCBHUO.js +2 -0
- package/dist/cli/chunks/{types-JTWLBAZJ.js → types-PJS2FGPF.js} +2 -2
- package/dist/cli/chunks/unified-memory-EHD4VNFW.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-ZODGM4UK.js +2 -0
- package/dist/cli/chunks/unified-persistence-MHSI7ABK.js +2 -0
- package/dist/cli/chunks/{upgrade-4ABM72T4.js → upgrade-4IC4F6AB.js} +2 -2
- package/dist/cli/chunks/{validate-UDJCWKXI.js → validate-DHUWW7PF.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-TODOUWNN.js → validate-swarm-OERQNOX5.js} +2 -2
- package/dist/cli/chunks/visual-security-54MLFKWY.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-WBMAJPM5.js → web-tree-sitter-TV7DMKES.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-BTT53TUL.js → windsurf-installer-QZPWSH37.js} +2 -2
- package/dist/cli/chunks/witness-chain-LC6Q2W27.js +2 -0
- package/dist/cli/chunks/witness-chain-QUIBAF3W.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-RUXIOE7F.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-FRY3LMGH.js → witness-chain-verifier-YXENHB42.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-X7QHQQWL.js → witness-key-manager-HL26AGFO.js} +2 -2
- package/dist/cli/chunks/{workflow-QMZPAWQW.js → workflow-EOVVCN2E.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-UKHEJVSK.js +2 -0
- package/dist/cli/chunks/wrappers-AGODHBOO.js +2 -0
- package/dist/cli/commands/fleet.js +19 -12
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +9 -2
- package/dist/cli/commands/hooks-handlers/session-hooks.js +2 -2
- package/dist/cli/commands/hooks-handlers/stats-hooks.js +3 -2
- package/dist/cli/commands/learning.js +5 -3
- package/dist/cli/commands/ruvector-commands.js +2 -1
- package/dist/cli/commands/test.js +6 -0
- package/dist/cli/utils/ci-output.d.ts +9 -0
- package/dist/cli/utils/fleet-operation.d.ts +32 -0
- package/dist/cli/utils/fleet-operation.js +71 -0
- package/dist/cli/utils/fleet-result.d.ts +31 -0
- package/dist/cli/utils/fleet-result.js +124 -0
- package/dist/context/sources/git-source.js +6 -2
- package/dist/coordination/handlers/code-intelligence-handlers.js +60 -5
- package/dist/coordination/handlers/coverage-handlers.js +10 -1
- package/dist/coordination/handlers/requirements-handlers.js +16 -2
- package/dist/coordination/handlers/security-handlers.js +11 -1
- package/dist/coordination/handlers/test-execution-handlers.js +25 -7
- package/dist/coordination/mincut/queen-integration.d.ts +39 -1
- package/dist/coordination/mincut/queen-integration.js +83 -6
- package/dist/coordination/protocols/learning-consolidation-archive.d.ts +2 -6
- package/dist/coordination/protocols/learning-consolidation-archive.js +4 -27
- package/dist/coordination/protocols/learning-consolidation.d.ts +24 -0
- package/dist/coordination/protocols/learning-consolidation.js +71 -22
- package/dist/coordination/queen-coordinator.d.ts +1 -1
- package/dist/coordination/queen-coordinator.js +19 -7
- package/dist/coordination/queen-event-handlers.js +13 -0
- package/dist/coordination/queen-task-management.d.ts +18 -24
- package/dist/coordination/queen-task-management.js +62 -168
- package/dist/coordination/queen-task-queue.d.ts +41 -0
- package/dist/coordination/queen-task-queue.js +194 -0
- package/dist/coordination/queen-types.d.ts +1 -1
- package/dist/coordination/queen-work-stealing.d.ts +6 -1
- package/dist/coordination/queen-work-stealing.js +7 -4
- package/dist/coordination/result-saver-adapters.d.ts +15 -0
- package/dist/coordination/result-saver-adapters.js +57 -0
- package/dist/coordination/result-saver.d.ts +1 -1
- package/dist/coordination/result-saver.js +8 -5
- package/dist/coordination/yaml-pipeline-loader.js +5 -2
- package/dist/domains/code-intelligence/index-path-guard.d.ts +5 -2
- package/dist/domains/code-intelligence/index-path-guard.js +20 -50
- package/dist/domains/code-intelligence/plugin.js +5 -1
- package/dist/domains/code-intelligence/services/metric-collector/index.d.ts +2 -2
- package/dist/domains/code-intelligence/services/metric-collector/index.js +2 -3
- package/dist/domains/code-intelligence/services/metric-collector/loc-counter.d.ts +1 -1
- package/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +11 -36
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.d.ts +1 -1
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +45 -103
- package/dist/domains/contract-testing/services/api-compatibility.js +7 -6
- package/dist/domains/contract-testing/services/contract-validator.js +6 -4
- package/dist/domains/contract-testing/services/schema-validator.js +8 -5
- package/dist/domains/defect-intelligence/interfaces.d.ts +2 -0
- package/dist/domains/defect-intelligence/plugin.js +11 -2
- package/dist/domains/defect-intelligence/prediction-history.d.ts +27 -0
- package/dist/domains/defect-intelligence/prediction-history.js +68 -0
- package/dist/domains/defect-intelligence/services/defect-predictor.js +25 -10
- package/dist/domains/enterprise-integration/services/message-broker-service.js +3 -2
- package/dist/domains/enterprise-integration/services/odata-service.js +2 -1
- package/dist/domains/enterprise-integration/services/sap-integration-service.js +3 -2
- package/dist/domains/learning-optimization/active-patterns.d.ts +2 -2
- package/dist/domains/learning-optimization/active-patterns.js +2 -2
- package/dist/domains/learning-optimization/coordinator.js +9 -5
- package/dist/domains/learning-optimization/interfaces.d.ts +6 -2
- package/dist/domains/learning-optimization/pattern-archive.d.ts +31 -0
- package/dist/domains/learning-optimization/pattern-archive.js +56 -0
- package/dist/domains/learning-optimization/pattern-consolidation.d.ts +12 -0
- package/dist/domains/learning-optimization/pattern-consolidation.js +41 -0
- package/dist/domains/learning-optimization/reward-source.d.ts +13 -0
- package/dist/domains/learning-optimization/reward-source.js +8 -1
- package/dist/domains/learning-optimization/services/learning-coordinator.d.ts +5 -3
- package/dist/domains/learning-optimization/services/learning-coordinator.js +45 -58
- package/dist/domains/security-compliance/plugin.js +17 -3
- package/dist/domains/security-compliance/sast-path-guard.d.ts +9 -0
- package/dist/domains/security-compliance/sast-path-guard.js +17 -0
- package/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +46 -56
- package/dist/domains/security-compliance/services/scanners/dast-helpers.js +76 -91
- package/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +52 -62
- package/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +21 -1
- package/dist/domains/security-compliance/services/scanners/dast-scanner.js +29 -24
- package/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +4 -1
- package/dist/domains/test-execution/coordinator.d.ts +5 -0
- package/dist/domains/test-execution/coordinator.js +35 -20
- package/dist/domains/test-execution/interfaces.d.ts +25 -0
- package/dist/domains/test-execution/plugin.js +19 -4
- package/dist/domains/test-execution/services/flaky-detector.js +9 -7
- package/dist/domains/test-execution/services/retry-handler.js +46 -7
- package/dist/domains/test-execution/services/runner-test-cases.d.ts +11 -0
- package/dist/domains/test-execution/services/runner-test-cases.js +20 -2
- package/dist/domains/test-execution/services/test-executor.js +8 -8
- package/dist/domains/test-generation/plugin.js +7 -2
- package/dist/domains/test-generation/services/test-data-generator.js +3 -1
- package/dist/domains/visual-accessibility/services/axe-core-audit.js +1 -1
- package/dist/hooks/cross-phase-hooks.js +2 -1
- package/dist/init/phases/10-workers.js +50 -6
- package/dist/integrations/browser/agent-browser/client.js +37 -52
- package/dist/integrations/browser/agent-browser/command-executor.d.ts +33 -27
- package/dist/integrations/browser/agent-browser/command-executor.js +53 -54
- package/dist/integrations/browser/agent-browser/session-manager.d.ts +1 -1
- package/dist/integrations/browser/agent-browser/session-manager.js +8 -9
- package/dist/integrations/browser/web-content-fetcher.js +9 -3
- package/dist/integrations/vibium/client.js +2 -2
- package/dist/integrations/vibium/runtime.d.ts +1 -1
- package/dist/integrations/vibium/runtime.js +14 -11
- package/dist/kernel/unified-memory-schemas.d.ts +3 -2
- package/dist/kernel/unified-memory-schemas.js +3 -2
- package/dist/kernel/unified-memory.js +25 -6
- package/dist/learning/dream/dream-commit.d.ts +65 -0
- package/dist/learning/dream/dream-commit.js +104 -0
- package/dist/learning/dream/dream-engine.d.ts +81 -31
- package/dist/learning/dream/dream-engine.js +225 -168
- package/dist/learning/dream/dream-insights-pruner.d.ts +9 -3
- package/dist/learning/dream/dream-insights-pruner.js +16 -30
- package/dist/learning/dream/index.d.ts +3 -2
- package/dist/learning/dream/index.js +3 -1
- package/dist/learning/dream/rvcow-branch-manager.d.ts +8 -1
- package/dist/learning/dream/rvcow-branch-manager.js +8 -1
- package/dist/learning/dream/speculative-dreamer.d.ts +50 -74
- package/dist/learning/dream/speculative-dreamer.js +64 -111
- package/dist/learning/dream/spreading-activation.d.ts +2 -1
- package/dist/learning/dream/spreading-activation.js +15 -6
- package/dist/learning/experience-capture.d.ts +9 -0
- package/dist/learning/experience-capture.js +18 -4
- package/dist/learning/qe-reasoning-bank-types.d.ts +17 -2
- package/dist/learning/qe-reasoning-bank.js +22 -11
- package/dist/learning/sqlite-persistence.d.ts +6 -0
- package/dist/learning/sqlite-persistence.js +16 -2
- package/dist/learning/usage-outcome.d.ts +68 -0
- package/dist/learning/usage-outcome.js +84 -0
- package/dist/mcp/background-workers.d.ts +13 -1
- package/dist/mcp/background-workers.js +17 -3
- package/dist/mcp/bundle.js +607 -580
- package/dist/mcp/handlers/core-handlers.js +11 -0
- package/dist/mcp/handlers/domain-handler-configs.d.ts +5 -0
- package/dist/mcp/handlers/domain-handler-configs.js +11 -3
- package/dist/mcp/handlers/handler-factory.d.ts +2 -1
- package/dist/mcp/handlers/handler-factory.js +36 -15
- package/dist/mcp/handlers/orchestrate-routes.d.ts +36 -0
- package/dist/mcp/handlers/orchestrate-routes.js +88 -0
- package/dist/mcp/handlers/task-handlers.d.ts +3 -0
- package/dist/mcp/handlers/task-handlers.js +35 -8
- package/dist/mcp/handlers/validation-pipeline-handler.js +6 -2
- package/dist/mcp/protocol-server.js +2 -0
- package/dist/mcp/security/schema-validator.js +3 -2
- package/dist/mcp/tools/code-intelligence/c4.js +11 -1
- package/dist/mcp/tools/coverage-analysis/index.js +31 -2
- package/dist/mcp/tools/learning-optimization/dream.d.ts +8 -8
- package/dist/mcp/tools/learning-optimization/dream.js +38 -34
- package/dist/mcp/tools/learning-optimization/optimize.d.ts +18 -2
- package/dist/mcp/tools/learning-optimization/optimize.js +58 -10
- package/dist/mcp/tools/quality-assessment/gate.js +12 -1
- package/dist/mcp/tools/requirements-validation/quality-criteria.js +9 -2
- package/dist/migration/agent-compat.js +7 -5
- package/dist/migrations/20261018_add_dream_insights_archive.d.ts +27 -0
- package/dist/migrations/20261018_add_dream_insights_archive.js +57 -0
- package/dist/shared/git/git-analyzer.d.ts +49 -0
- package/dist/shared/git/git-analyzer.js +159 -319
- package/dist/shared/git/git-process.d.ts +22 -0
- package/dist/shared/git/git-process.js +37 -0
- package/dist/shared/git/index.d.ts +1 -0
- package/dist/shared/git/index.js +1 -0
- package/dist/shared/io/payload-path-guard.d.ts +75 -0
- package/dist/shared/io/payload-path-guard.js +190 -0
- package/dist/shared/llm/router/agent-router-config.js +2 -1
- package/dist/shared/llm/translation/tool-translator.js +2 -1
- package/dist/shared/test-runner-args.d.ts +5 -0
- package/dist/shared/test-runner-args.js +6 -1
- package/dist/shared/test-runner-process.d.ts +6 -0
- package/dist/shared/test-runner-process.js +14 -0
- package/dist/shared/test-runner-verdict.d.ts +9 -1
- package/dist/shared/test-runner-verdict.js +15 -4
- package/dist/shared/utils/namespaced-search.d.ts +14 -0
- package/dist/shared/utils/namespaced-search.js +19 -1
- package/dist/shared/utils/safe-expression-evaluator.js +4 -3
- package/dist/strange-loop/infra-healing/recovery-playbook.js +13 -3
- package/dist/validation/gate-reexecute.js +7 -4
- package/dist/workers/daemon.js +13 -1
- package/dist/workers/quality-daemon/git-watcher.js +9 -9
- package/dist/workers/workers/defect-predictor.d.ts +8 -3
- package/dist/workers/workers/defect-predictor.js +48 -49
- package/dist/workers/workers/learning-consolidation.d.ts +2 -0
- package/dist/workers/workers/learning-consolidation.js +12 -1
- package/dist/workflows/browser/workflow-loader.js +8 -5
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-R2Q4QGXQ.js +0 -2
- package/dist/cli/chunks/agent-booster-wasm-427FRKWG.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-3RENLQWP.js +0 -2
- package/dist/cli/chunks/base-67DXSAYM.js +0 -2
- package/dist/cli/chunks/browser-CT3MTV6G.js +0 -4
- package/dist/cli/chunks/browser-workflow-NDXRROWZ.js +0 -2
- package/dist/cli/chunks/chunk-4URT6JO2.js +0 -2
- package/dist/cli/chunks/chunk-5LAAZLUC.js +0 -4
- package/dist/cli/chunks/chunk-7DMA5NYL.js +0 -4
- package/dist/cli/chunks/chunk-F2SQPP6U.js +0 -4
- package/dist/cli/chunks/chunk-G3BKZNFL.js +0 -120
- package/dist/cli/chunks/chunk-GR3JYE5A.js +0 -2
- package/dist/cli/chunks/chunk-J3WGK22W.js +0 -2
- package/dist/cli/chunks/chunk-KHSRIPBP.js +0 -180
- package/dist/cli/chunks/chunk-KTSLTZSG.js +0 -2
- package/dist/cli/chunks/chunk-O3JLOVZX.js +0 -4
- package/dist/cli/chunks/chunk-THAY7WHO.js +0 -12
- package/dist/cli/chunks/chunk-VXZJOKOX.js +0 -2
- package/dist/cli/chunks/chunk-VYLM2YV5.js +0 -12
- package/dist/cli/chunks/client-ZP3CTVRF.js +0 -2
- package/dist/cli/chunks/core-handlers-JSRXQWPE.js +0 -2
- package/dist/cli/chunks/cross-domain-router-7UKODQWG.js +0 -2
- package/dist/cli/chunks/daemon-YIFT46FH.js +0 -34
- package/dist/cli/chunks/domain-transfer-6EF75EKU.js +0 -2
- package/dist/cli/chunks/dream-UDLM6M55.js +0 -2
- package/dist/cli/chunks/file-discovery-THWOUQ7Z.js +0 -2
- package/dist/cli/chunks/fleet-ADL57COA.js +0 -44
- package/dist/cli/chunks/heartbeat-scheduler-HGOC5KH3.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-EPSA6AP7.js +0 -2
- package/dist/cli/chunks/hnsw-index-RMFOPYGY.js +0 -2
- package/dist/cli/chunks/hybrid-backend-NZ3G4WBX.js +0 -2
- package/dist/cli/chunks/impact-analyzer-WZC6NHFP.js +0 -2
- package/dist/cli/chunks/init-wizard-422UZYQ5.js +0 -2
- package/dist/cli/chunks/kernel-N7PJ6FCE.js +0 -2
- package/dist/cli/chunks/knowledge-graph-SZCVQF37.js +0 -2
- package/dist/cli/chunks/llm-router-service-4DE5WDUZ.js +0 -2
- package/dist/cli/chunks/load-test-POMIF4Q4.js +0 -2
- package/dist/cli/chunks/mcp-CRZKZE37.js +0 -2
- package/dist/cli/chunks/memory-backend-4P6AHSOY.js +0 -2
- package/dist/cli/chunks/memory-handlers-NK6NV3GE.js +0 -2
- package/dist/cli/chunks/pattern-null-store-CCHQHGQG.js +0 -2
- package/dist/cli/chunks/pipeline-5LMLBIJ7.js +0 -19
- package/dist/cli/chunks/project-root-X72FSM2F.js +0 -2
- package/dist/cli/chunks/protocol-executor-QW6XN6QN.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-ZD3WF647.js +0 -2
- package/dist/cli/chunks/queen-coordinator-S4U4MKK2.js +0 -2
- package/dist/cli/chunks/router-CXZKOOTR.js +0 -2
- package/dist/cli/chunks/routing-feedback-IYFANYY5.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-HCLQ5WUQ.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-XCLUWOO3.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-MRT5H3IP.js +0 -2
- package/dist/cli/chunks/safe-db-WFODRGVZ.js +0 -2
- package/dist/cli/chunks/schedule-RO55OQXG.js +0 -2
- package/dist/cli/chunks/scheduler-XXMJCH24.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-AWRIS4MK.js +0 -2
- package/dist/cli/chunks/sync-UVXA6CT2.js +0 -2
- package/dist/cli/chunks/task-handlers-GUYW2EPJ.js +0 -9
- package/dist/cli/chunks/token-bootstrap-EDK6FNQ3.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-MI3NZKUD.js +0 -2
- package/dist/cli/chunks/unified-memory-6JWHV6EF.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-4UANU6NU.js +0 -2
- package/dist/cli/chunks/unified-persistence-KGGNA46H.js +0 -2
- package/dist/cli/chunks/visual-security-6VZNQLH7.js +0 -2
- package/dist/cli/chunks/witness-chain-AKKHWEWU.js +0 -2
- package/dist/cli/chunks/witness-chain-TATPXQRK.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-2HGJGE7O.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-4GAW7HNZ.js +0 -2
- package/dist/cli/chunks/wrappers-ZD5NBHYI.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{b as C,d as P}from"./chunk-PVIA2FPD.js";import{a as w,d as M}from"./chunk-EFBLP43U.js";import{a as T}from"./chunk-KTSLTZSG.js";import{e as S}from"./chunk-O3JLOVZX.js";import{a as b,e as $}from"./chunk-N3KEY4XJ.js";$();M();import{randomUUID as A}from"crypto";var x={topology:"hierarchical",maxConcurrentSkills:10,maxConcurrentModels:3,timeout:3e5,continueOnFailure:!0,retry:{maxRetries:2,retryDelayMs:1e3}},R=class{config;learner;skillValidator=null;workers=new Map;taskQueue=[];isRunning=!1;constructor(e,t){this.config={...x,...e},this.learner=t}setSkillValidator(e){this.skillValidator=e}async validateSkillsParallel(e,t,i){let s=Date.now(),a=i?.trustTier??3,n=i?.validationLevel??"eval",c=this.determineTopology(e.length,t.length),r=this.createValidationTasks(e,t,a,n),o=await this.executeTasksParallel(r,c),l=new Map;for(let u of o){let p=l.get(u.skill)||[];p.push(u),l.set(u.skill,p)}return await this.recordOutcomesToLearner(o,a,n),l}async validateSkillCrossModel(e,t,i){return(await this.validateSkillsParallel([e],t,i)).get(e)||[]}getSummary(e){let t=[],i=new Map,s=new Map;for(let[c,r]of e){i.set(c,r);for(let o of r){t.push(o);let l=s.get(o.model)||[];l.push(o),s.set(o.model,l)}}let a=t.filter(c=>c.errors.length===0&&c.evalPassRate>=.9).length,n=t.reduce((c,r)=>c+r.durationMs,0);return{totalSkills:i.size,totalModels:s.size,successCount:a,failureCount:t.length-a,overallPassRate:t.length>0?a/t.length:0,totalDurationMs:n,avgDurationMs:t.length>0?n/t.length:0,topology:this.config.topology,bySkill:i,byModel:s,results:t}}determineTopology(e,t){if(this.config.topology){let i=e*t;return i>20&&this.config.topology==="mesh"&&console.warn(`[SwarmSkillValidator] Large workload (${i} tasks) may be more efficient with hierarchical topology`),this.config.topology}return e>5||e>t*2?"hierarchical":t>5&&e<=3?"mesh":"hierarchical"}createValidationTasks(e,t,i,s){let a=[];for(let n of e)for(let c of t)a.push({id:`${n}-${c}-${Date.now()}-${A().slice(0,8)}`,skill:n,model:c,trustTier:i,validationLevel:s,timeout:this.config.timeout,retryCount:0});return a}async executeTasksParallel(e,t){this.isRunning=!0,this.taskQueue=[...e];let i=[],s=t==="hierarchical"?this.config.maxConcurrentSkills:Math.min(this.config.maxConcurrentSkills*this.config.maxConcurrentModels,e.length),a=[];for(let n=0;n<Math.min(s,e.length);n++){let c=`worker-${n}`;this.workers.set(c,{id:c,task:null,status:"idle"}),a.push(this.runWorker(c,i))}return await Promise.all(a),this.isRunning=!1,this.workers.clear(),i}async runWorker(e,t){let i=this.workers.get(e);if(i){for(;this.taskQueue.length>0&&this.isRunning;){let s=this.taskQueue.shift();if(!s)break;i.task=s,i.status="running",i.startTime=Date.now();try{let a=await this.executeValidationTask(s);t.push(a),i.result=a,i.status="completed"}catch(a){let n=this.createErrorResult(s,a);this.config.retry&&s.retryCount<this.config.retry.maxRetries&&this.config.continueOnFailure?(s.retryCount++,this.taskQueue.push(s),await this.delay(this.config.retry.retryDelayMs)):(t.push(n),i.result=n,i.status="failed")}}i.task=null,i.status="idle"}}async executeValidationTask(e){let t=Date.now();if(!this.skillValidator)return this.createSimulatedResult(e,t);let i=new Promise((n,c)=>{setTimeout(()=>c(new Error(`Validation timeout after ${e.timeout}ms`)),e.timeout)}),s=await Promise.race([this.skillValidator(e.skill,e.model,{trustTier:e.trustTier,validationLevel:e.validationLevel,timeout:e.timeout}),i]),a=Date.now()-t;return this.outcomeToResult(s,e,a)}outcomeToResult(e,t,i){let s=e.testCaseResults.filter(c=>c.passed).length,a=e.testCaseResults.length,n=a>0?s/a:e.score;return{skill:t.skill,model:t.model,schemaValid:e.validationLevel!=="schema"||e.passed,validatorPassed:e.validationLevel!=="validator"||e.passed,evalPassRate:n,durationMs:i,errors:e.passed?[]:["Validation failed"],trustTier:t.trustTier,validationLevel:t.validationLevel,retryCount:t.retryCount,timestamp:new Date}}createSimulatedResult(e,t){let i=Date.now()-t+w()*100,s=.85+w()*.15;return{skill:e.skill,model:e.model,schemaValid:!0,validatorPassed:s>.8,evalPassRate:s,durationMs:i,errors:s>.8?[]:["Simulated validation failure"],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}createErrorResult(e,t){let i=b(t);return{skill:e.skill,model:e.model,schemaValid:!1,validatorPassed:!1,evalPassRate:0,durationMs:0,errors:[i],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}async recordOutcomesToLearner(e,t,i){for(let s of e){let a={skillName:s.skill,trustTier:s.trustTier||t,validationLevel:s.validationLevel||i,model:s.model,passed:s.errors.length===0&&s.evalPassRate>=.9,score:s.evalPassRate,testCaseResults:this.createTestCaseResults(s),timestamp:s.timestamp,runId:`swarm-${Date.now()}`,metadata:{duration:s.durationMs,retryCount:s.retryCount}};await this.learner.recordValidationOutcome(a)}}createTestCaseResults(e){return[{testId:`${e.skill}-${e.model}-aggregate`,passed:e.errors.length===0,expectedPatterns:["valid-output"],actualPatterns:e.errors.length===0?["valid-output"]:[],reasoningQuality:e.evalPassRate,executionTimeMs:e.durationMs,category:"swarm-validation",priority:"high",error:e.errors.length>0?e.errors.join("; "):void 0}]}delay(e){return new Promise(t=>setTimeout(t,e))}getConfig(){return{...this.config}}isValidationRunning(){return this.isRunning}getWorkerStatus(){return Array.from(this.workers.values())}cancel(){this.isRunning=!1,this.taskQueue=[]}};function D(y,e){return new R(y,e)}var F=["security-testing","accessibility-testing","api-testing","performance-testing","visual-regression-testing","mutation-testing","contract-testing","chaos-testing","compliance-testing","penetration-testing"],I=["claude-sonnet","claude-haiku","claude-opus"];P();import{readFileSync as E,writeFileSync as L,existsSync as N}from"fs";var O={varianceThreshold:.04,regressionThreshold:.1,minSamples:3,autoUpdateManifest:!1},k=class{constructor(e,t,i={}){this.learner=e;this.manifestPath=t;this.config={...O,...i}}learner;manifestPath;config;async aggregateResults(e){let t=`agg-${Date.now()}`,i=new Date,s=this.buildSkillResultsMap(e),a=this.calculateSummary(s,e),n=await this.detectCrossModelAnomalies(e),c=await this.detectRegressions(e,this.config.regressionThreshold),r=this.generateRecommendations(s,n,c),o={timestamp:i,runId:t,summary:a,skillResults:s,crossModelAnalysis:n,regressions:c,recommendations:r,metadata:{version:"1.0.0",environment:e[0]?.metadata?.environment,generatedBy:"ValidationResultAggregator",inputs:{runIds:e.map(l=>l.runId),models:[...new Set(e.map(l=>l.model))]}}};return this.config.autoUpdateManifest&&await this.updateManifest(o),o}buildSkillResultsMap(e){let t=new Map;for(let i of e)for(let s of i.outcomes){let a=s.skillName;t.has(a)||t.set(a,{skill:a,trustTier:s.trustTier,passRateByModel:new Map,avgPassRate:0,schemaValid:!0,validatorPassed:!0,evalPassed:!0,issues:[],executionTimeMs:0,testCount:0,passedTests:0,failedTests:0});let n=t.get(a),c=s.testCaseResults.filter(r=>r.passed).length/(s.testCaseResults.length||1);n.passRateByModel.set(i.model,c),n.testCount+=s.testCaseResults.length,n.passedTests+=s.testCaseResults.filter(r=>r.passed).length,n.failedTests+=s.testCaseResults.filter(r=>!r.passed).length,n.executionTimeMs+=s.metadata?.duration||0,s.validationLevel==="schema"&&!s.passed&&(n.schemaValid=!1),s.validationLevel==="validator"&&!s.passed&&(n.validatorPassed=!1),s.validationLevel==="eval"&&!s.passed&&(n.evalPassed=!1);for(let r of s.testCaseResults)!r.passed&&r.error&&n.issues.push({skill:a,model:i.model,severity:r.priority==="critical"?"critical":r.priority==="high"?"high":r.priority==="medium"?"medium":"low",type:this.categorizeIssueType(s.validationLevel,r.error),message:r.error,testId:r.testId})}for(let i of t.values()){let s=Array.from(i.passRateByModel.values());i.avgPassRate=s.length>0?s.reduce((a,n)=>a+n,0)/s.length:0}return t}categorizeIssueType(e,t){return t.toLowerCase().includes("timeout")?"timeout":e==="schema"?"schema_failure":e==="validator"?"validator_failure":e==="eval"?"eval_failure":"error"}calculateSummary(e,t){let i=Array.from(e.values()),s=i.filter(n=>n.avgPassRate>=.9).length,a=i.length>0?i.reduce((n,c)=>n+c.avgPassRate,0)/i.length:0;return{totalSkills:i.length,passedSkills:s,failedSkills:i.length-s,avgPassRate:a,totalDurationMs:t.reduce((n,c)=>n+c.durationMs,0),totalTests:i.reduce((n,c)=>n+c.testCount,0),passedTests:i.reduce((n,c)=>n+c.passedTests,0),failedTests:i.reduce((n,c)=>n+c.failedTests,0),modelsUsed:[...new Set(t.map(n=>n.model))]}}async detectCrossModelAnomalies(e){let t=new Map,i=new Map,s=new Map;for(let d of e){t.has(d.model)||(t.set(d.model,[]),i.set(d.model,{totalTests:0,passedTests:0,skillCount:0}));for(let g of d.outcomes){let h=g.testCaseResults.filter(m=>m.passed).length/(g.testCaseResults.length||1);t.get(d.model).push(h);let f=i.get(d.model);f.totalTests+=g.testCaseResults.length,f.passedTests+=g.testCaseResults.filter(m=>m.passed).length,f.skillCount++,s.has(g.skillName)||s.set(g.skillName,{passRates:[],models:[]}),s.get(g.skillName).passRates.push(h),s.get(g.skillName).models.push(d.model)}}let a=[];for(let d of t.values())a.push(...d);let n=a.length>0?a.reduce((d,g)=>d+g,0)/a.length:0,c=a.length>1?a.reduce((d,g)=>d+Math.pow(g-n,2),0)/a.length:0,r=Math.sqrt(c),o=[],l=new Map;for(let[d,g]of t.entries()){let h=g.reduce((v,V)=>v+V,0)/g.length,f=h-n,m=i.get(d);l.set(d,{avgPassRate:h,skillCount:m.skillCount,totalTests:m.totalTests}),Math.abs(f)>this.config.varianceThreshold*2&&o.push({model:d,type:f<0?"low_performance":"high_variance",description:`Model ${d} has ${(f*100).toFixed(1)}% difference from average`,passRate:h,avgPassRate:n,deviation:Math.abs(f)})}let u=[],p=[];for(let[d,g]of s.entries()){if(g.passRates.length<2)continue;let h=g.passRates.reduce((m,v)=>m+v,0)/g.passRates.length;g.passRates.reduce((m,v)=>m+Math.pow(v-h,2),0)/g.passRates.length<this.config.varianceThreshold?u.push(d):p.push(d)}return{variance:c,stdDeviation:r,anomalies:o,consistentSkills:u,inconsistentSkills:p,modelPerformance:l}}async detectRegressions(e,t){let i=[],s=new Set;for(let a of e)for(let n of a.outcomes){let c=`${n.skillName}-${a.model}`;if(s.has(c))continue;s.add(c);let r=await this.learner.getValidationTrends(n.skillName);if(!r)continue;let o=n.testCaseResults.filter(p=>p.passed).length/(n.testCaseResults.length||1),l=r.recentPassRate,u=l-o;u>=t&&i.push({skill:n.skillName,model:a.model,previousPassRate:l,currentPassRate:o,regressionAmount:u,trend:r.overall,possibleCauses:this.analyzePossibleCauses(n,u),severity:this.categorizeRegressionSeverity(u)})}return i.sort((a,n)=>{let c={critical:0,high:1,medium:2,low:3},r=c[a.severity]-c[n.severity];return r!==0?r:n.regressionAmount-a.regressionAmount})}analyzePossibleCauses(e,t){let i=[],s=e.testCaseResults.filter(c=>!c.passed);if(s.length>0){let c=[...new Set(s.map(r=>r.category).filter(Boolean))];c.length>0&&i.push(`Failures in categories: ${c.join(", ")}`)}let a=s.filter(c=>c.priority==="critical");a.length>0&&i.push(`${a.length} critical test(s) failing`);let n=e.testCaseResults.reduce((c,r)=>c+r.reasoningQuality,0)/(e.testCaseResults.length||1);return n<.7&&i.push(`Low reasoning quality score: ${(n*100).toFixed(1)}%`),t>.3&&i.push("Possible model behavior change or prompt drift"),i.length===0&&i.push("No specific cause identified - review test details"),i}categorizeRegressionSeverity(e){return e>=.5?"critical":e>=.3?"high":e>=.15?"medium":"low"}generateRecommendations(e,t,i){let s=[];if(t.inconsistentSkills.length>0&&s.push(`Review ${t.inconsistentSkills.length} skills with inconsistent cross-model behavior: `+t.inconsistentSkills.slice(0,3).join(", ")+(t.inconsistentSkills.length>3?` and ${t.inconsistentSkills.length-3} more`:"")),t.anomalies.some(r=>r.type==="low_performance")){let r=t.anomalies.filter(o=>o.type==="low_performance").map(o=>o.model);s.push(`Investigate low performance on model(s): ${r.join(", ")}`)}let a=i.filter(r=>r.severity==="critical");a.length>0&&s.push(`URGENT: ${a.length} critical regression(s) detected - immediate review required`);let n=Array.from(e.values()).filter(r=>r.avgPassRate<.9);if(n.length>0){let r=n.filter(l=>!l.schemaValid),o=n.filter(l=>!l.validatorPassed);r.length>0&&s.push(`Fix schema validation for: ${r.map(l=>l.skill).slice(0,3).join(", ")}`),o.length>0&&s.push(`Review validator scripts for: ${o.map(l=>l.skill).slice(0,3).join(", ")}`)}return Array.from(e.values()).reduce((r,o)=>r+o.avgPassRate,0)/e.size<.8&&s.push("Overall pass rate below 80% - consider reviewing skill definitions and test expectations"),s.length===0&&s.push("All validations passing - no immediate action required"),s}async updateManifest(e){if(!N(this.manifestPath))throw new Error(`Manifest file not found: ${this.manifestPath}`);let t=C(E(this.manifestPath,"utf-8"));for(let[s,a]of e.skillResults.entries())if(t.skills&&t.skills[s]){let n=t.skills[s];n.validation||(n.validation={}),n.validation.passRate=a.avgPassRate,n.validation.lastValidated=e.timestamp.toISOString(),n.validation.status=a.avgPassRate>=.9?"passing":"failing",n.validation.passRateByModel=Object.fromEntries(a.passRateByModel)}let i=Array.from(e.skillResults.values());t.validationStatus={passing:i.filter(s=>s.avgPassRate>=.9).length,failing:i.filter(s=>s.avgPassRate<.9).length,unknown:0,skipped:t.summary?.tier0||0},t.generatedAt=new Date().toISOString(),t.lastValidationRun={runId:e.runId,timestamp:e.timestamp.toISOString(),avgPassRate:e.summary.avgPassRate,modelsUsed:e.summary.modelsUsed},L(this.manifestPath,JSON.stringify(t,null,2))}generateMarkdownReport(e){let{summary:t,crossModelAnalysis:i,regressions:s,recommendations:a,skillResults:n}=e,c=(t.avgPassRate>=.9||t.avgPassRate>=.7,"`"),r=[];if(r.push(`# Validation Report
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{b as C,d as P}from"./chunk-ACWFKES2.js";import{a as w,d as M}from"./chunk-6GP6W46M.js";import{a as T}from"./chunk-HOZUDE4C.js";import{c as S}from"./chunk-ATHWDAXB.js";import{a as b,e as $}from"./chunk-GHBNRMSJ.js";$();M();import{randomUUID as A}from"crypto";var x={topology:"hierarchical",maxConcurrentSkills:10,maxConcurrentModels:3,timeout:3e5,continueOnFailure:!0,retry:{maxRetries:2,retryDelayMs:1e3}},R=class{config;learner;skillValidator=null;workers=new Map;taskQueue=[];isRunning=!1;constructor(e,t){this.config={...x,...e},this.learner=t}setSkillValidator(e){this.skillValidator=e}async validateSkillsParallel(e,t,i){let s=Date.now(),a=i?.trustTier??3,n=i?.validationLevel??"eval",c=this.determineTopology(e.length,t.length),r=this.createValidationTasks(e,t,a,n),o=await this.executeTasksParallel(r,c),l=new Map;for(let u of o){let p=l.get(u.skill)||[];p.push(u),l.set(u.skill,p)}return await this.recordOutcomesToLearner(o,a,n),l}async validateSkillCrossModel(e,t,i){return(await this.validateSkillsParallel([e],t,i)).get(e)||[]}getSummary(e){let t=[],i=new Map,s=new Map;for(let[c,r]of e){i.set(c,r);for(let o of r){t.push(o);let l=s.get(o.model)||[];l.push(o),s.set(o.model,l)}}let a=t.filter(c=>c.errors.length===0&&c.evalPassRate>=.9).length,n=t.reduce((c,r)=>c+r.durationMs,0);return{totalSkills:i.size,totalModels:s.size,successCount:a,failureCount:t.length-a,overallPassRate:t.length>0?a/t.length:0,totalDurationMs:n,avgDurationMs:t.length>0?n/t.length:0,topology:this.config.topology,bySkill:i,byModel:s,results:t}}determineTopology(e,t){if(this.config.topology){let i=e*t;return i>20&&this.config.topology==="mesh"&&console.warn(`[SwarmSkillValidator] Large workload (${i} tasks) may be more efficient with hierarchical topology`),this.config.topology}return e>5||e>t*2?"hierarchical":t>5&&e<=3?"mesh":"hierarchical"}createValidationTasks(e,t,i,s){let a=[];for(let n of e)for(let c of t)a.push({id:`${n}-${c}-${Date.now()}-${A().slice(0,8)}`,skill:n,model:c,trustTier:i,validationLevel:s,timeout:this.config.timeout,retryCount:0});return a}async executeTasksParallel(e,t){this.isRunning=!0,this.taskQueue=[...e];let i=[],s=t==="hierarchical"?this.config.maxConcurrentSkills:Math.min(this.config.maxConcurrentSkills*this.config.maxConcurrentModels,e.length),a=[];for(let n=0;n<Math.min(s,e.length);n++){let c=`worker-${n}`;this.workers.set(c,{id:c,task:null,status:"idle"}),a.push(this.runWorker(c,i))}return await Promise.all(a),this.isRunning=!1,this.workers.clear(),i}async runWorker(e,t){let i=this.workers.get(e);if(i){for(;this.taskQueue.length>0&&this.isRunning;){let s=this.taskQueue.shift();if(!s)break;i.task=s,i.status="running",i.startTime=Date.now();try{let a=await this.executeValidationTask(s);t.push(a),i.result=a,i.status="completed"}catch(a){let n=this.createErrorResult(s,a);this.config.retry&&s.retryCount<this.config.retry.maxRetries&&this.config.continueOnFailure?(s.retryCount++,this.taskQueue.push(s),await this.delay(this.config.retry.retryDelayMs)):(t.push(n),i.result=n,i.status="failed")}}i.task=null,i.status="idle"}}async executeValidationTask(e){let t=Date.now();if(!this.skillValidator)return this.createSimulatedResult(e,t);let i=new Promise((n,c)=>{setTimeout(()=>c(new Error(`Validation timeout after ${e.timeout}ms`)),e.timeout)}),s=await Promise.race([this.skillValidator(e.skill,e.model,{trustTier:e.trustTier,validationLevel:e.validationLevel,timeout:e.timeout}),i]),a=Date.now()-t;return this.outcomeToResult(s,e,a)}outcomeToResult(e,t,i){let s=e.testCaseResults.filter(c=>c.passed).length,a=e.testCaseResults.length,n=a>0?s/a:e.score;return{skill:t.skill,model:t.model,schemaValid:e.validationLevel!=="schema"||e.passed,validatorPassed:e.validationLevel!=="validator"||e.passed,evalPassRate:n,durationMs:i,errors:e.passed?[]:["Validation failed"],trustTier:t.trustTier,validationLevel:t.validationLevel,retryCount:t.retryCount,timestamp:new Date}}createSimulatedResult(e,t){let i=Date.now()-t+w()*100,s=.85+w()*.15;return{skill:e.skill,model:e.model,schemaValid:!0,validatorPassed:s>.8,evalPassRate:s,durationMs:i,errors:s>.8?[]:["Simulated validation failure"],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}createErrorResult(e,t){let i=b(t);return{skill:e.skill,model:e.model,schemaValid:!1,validatorPassed:!1,evalPassRate:0,durationMs:0,errors:[i],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}async recordOutcomesToLearner(e,t,i){for(let s of e){let a={skillName:s.skill,trustTier:s.trustTier||t,validationLevel:s.validationLevel||i,model:s.model,passed:s.errors.length===0&&s.evalPassRate>=.9,score:s.evalPassRate,testCaseResults:this.createTestCaseResults(s),timestamp:s.timestamp,runId:`swarm-${Date.now()}`,metadata:{duration:s.durationMs,retryCount:s.retryCount}};await this.learner.recordValidationOutcome(a)}}createTestCaseResults(e){return[{testId:`${e.skill}-${e.model}-aggregate`,passed:e.errors.length===0,expectedPatterns:["valid-output"],actualPatterns:e.errors.length===0?["valid-output"]:[],reasoningQuality:e.evalPassRate,executionTimeMs:e.durationMs,category:"swarm-validation",priority:"high",error:e.errors.length>0?e.errors.join("; "):void 0}]}delay(e){return new Promise(t=>setTimeout(t,e))}getConfig(){return{...this.config}}isValidationRunning(){return this.isRunning}getWorkerStatus(){return Array.from(this.workers.values())}cancel(){this.isRunning=!1,this.taskQueue=[]}};function D(y,e){return new R(y,e)}var F=["security-testing","accessibility-testing","api-testing","performance-testing","visual-regression-testing","mutation-testing","contract-testing","chaos-testing","compliance-testing","penetration-testing"],I=["claude-sonnet","claude-haiku","claude-opus"];P();import{readFileSync as E,writeFileSync as L,existsSync as N}from"fs";var O={varianceThreshold:.04,regressionThreshold:.1,minSamples:3,autoUpdateManifest:!1},k=class{constructor(e,t,i={}){this.learner=e;this.manifestPath=t;this.config={...O,...i}}learner;manifestPath;config;async aggregateResults(e){let t=`agg-${Date.now()}`,i=new Date,s=this.buildSkillResultsMap(e),a=this.calculateSummary(s,e),n=await this.detectCrossModelAnomalies(e),c=await this.detectRegressions(e,this.config.regressionThreshold),r=this.generateRecommendations(s,n,c),o={timestamp:i,runId:t,summary:a,skillResults:s,crossModelAnalysis:n,regressions:c,recommendations:r,metadata:{version:"1.0.0",environment:e[0]?.metadata?.environment,generatedBy:"ValidationResultAggregator",inputs:{runIds:e.map(l=>l.runId),models:[...new Set(e.map(l=>l.model))]}}};return this.config.autoUpdateManifest&&await this.updateManifest(o),o}buildSkillResultsMap(e){let t=new Map;for(let i of e)for(let s of i.outcomes){let a=s.skillName;t.has(a)||t.set(a,{skill:a,trustTier:s.trustTier,passRateByModel:new Map,avgPassRate:0,schemaValid:!0,validatorPassed:!0,evalPassed:!0,issues:[],executionTimeMs:0,testCount:0,passedTests:0,failedTests:0});let n=t.get(a),c=s.testCaseResults.filter(r=>r.passed).length/(s.testCaseResults.length||1);n.passRateByModel.set(i.model,c),n.testCount+=s.testCaseResults.length,n.passedTests+=s.testCaseResults.filter(r=>r.passed).length,n.failedTests+=s.testCaseResults.filter(r=>!r.passed).length,n.executionTimeMs+=s.metadata?.duration||0,s.validationLevel==="schema"&&!s.passed&&(n.schemaValid=!1),s.validationLevel==="validator"&&!s.passed&&(n.validatorPassed=!1),s.validationLevel==="eval"&&!s.passed&&(n.evalPassed=!1);for(let r of s.testCaseResults)!r.passed&&r.error&&n.issues.push({skill:a,model:i.model,severity:r.priority==="critical"?"critical":r.priority==="high"?"high":r.priority==="medium"?"medium":"low",type:this.categorizeIssueType(s.validationLevel,r.error),message:r.error,testId:r.testId})}for(let i of t.values()){let s=Array.from(i.passRateByModel.values());i.avgPassRate=s.length>0?s.reduce((a,n)=>a+n,0)/s.length:0}return t}categorizeIssueType(e,t){return t.toLowerCase().includes("timeout")?"timeout":e==="schema"?"schema_failure":e==="validator"?"validator_failure":e==="eval"?"eval_failure":"error"}calculateSummary(e,t){let i=Array.from(e.values()),s=i.filter(n=>n.avgPassRate>=.9).length,a=i.length>0?i.reduce((n,c)=>n+c.avgPassRate,0)/i.length:0;return{totalSkills:i.length,passedSkills:s,failedSkills:i.length-s,avgPassRate:a,totalDurationMs:t.reduce((n,c)=>n+c.durationMs,0),totalTests:i.reduce((n,c)=>n+c.testCount,0),passedTests:i.reduce((n,c)=>n+c.passedTests,0),failedTests:i.reduce((n,c)=>n+c.failedTests,0),modelsUsed:[...new Set(t.map(n=>n.model))]}}async detectCrossModelAnomalies(e){let t=new Map,i=new Map,s=new Map;for(let d of e){t.has(d.model)||(t.set(d.model,[]),i.set(d.model,{totalTests:0,passedTests:0,skillCount:0}));for(let g of d.outcomes){let h=g.testCaseResults.filter(m=>m.passed).length/(g.testCaseResults.length||1);t.get(d.model).push(h);let f=i.get(d.model);f.totalTests+=g.testCaseResults.length,f.passedTests+=g.testCaseResults.filter(m=>m.passed).length,f.skillCount++,s.has(g.skillName)||s.set(g.skillName,{passRates:[],models:[]}),s.get(g.skillName).passRates.push(h),s.get(g.skillName).models.push(d.model)}}let a=[];for(let d of t.values())a.push(...d);let n=a.length>0?a.reduce((d,g)=>d+g,0)/a.length:0,c=a.length>1?a.reduce((d,g)=>d+Math.pow(g-n,2),0)/a.length:0,r=Math.sqrt(c),o=[],l=new Map;for(let[d,g]of t.entries()){let h=g.reduce((v,V)=>v+V,0)/g.length,f=h-n,m=i.get(d);l.set(d,{avgPassRate:h,skillCount:m.skillCount,totalTests:m.totalTests}),Math.abs(f)>this.config.varianceThreshold*2&&o.push({model:d,type:f<0?"low_performance":"high_variance",description:`Model ${d} has ${(f*100).toFixed(1)}% difference from average`,passRate:h,avgPassRate:n,deviation:Math.abs(f)})}let u=[],p=[];for(let[d,g]of s.entries()){if(g.passRates.length<2)continue;let h=g.passRates.reduce((m,v)=>m+v,0)/g.passRates.length;g.passRates.reduce((m,v)=>m+Math.pow(v-h,2),0)/g.passRates.length<this.config.varianceThreshold?u.push(d):p.push(d)}return{variance:c,stdDeviation:r,anomalies:o,consistentSkills:u,inconsistentSkills:p,modelPerformance:l}}async detectRegressions(e,t){let i=[],s=new Set;for(let a of e)for(let n of a.outcomes){let c=`${n.skillName}-${a.model}`;if(s.has(c))continue;s.add(c);let r=await this.learner.getValidationTrends(n.skillName);if(!r)continue;let o=n.testCaseResults.filter(p=>p.passed).length/(n.testCaseResults.length||1),l=r.recentPassRate,u=l-o;u>=t&&i.push({skill:n.skillName,model:a.model,previousPassRate:l,currentPassRate:o,regressionAmount:u,trend:r.overall,possibleCauses:this.analyzePossibleCauses(n,u),severity:this.categorizeRegressionSeverity(u)})}return i.sort((a,n)=>{let c={critical:0,high:1,medium:2,low:3},r=c[a.severity]-c[n.severity];return r!==0?r:n.regressionAmount-a.regressionAmount})}analyzePossibleCauses(e,t){let i=[],s=e.testCaseResults.filter(c=>!c.passed);if(s.length>0){let c=[...new Set(s.map(r=>r.category).filter(Boolean))];c.length>0&&i.push(`Failures in categories: ${c.join(", ")}`)}let a=s.filter(c=>c.priority==="critical");a.length>0&&i.push(`${a.length} critical test(s) failing`);let n=e.testCaseResults.reduce((c,r)=>c+r.reasoningQuality,0)/(e.testCaseResults.length||1);return n<.7&&i.push(`Low reasoning quality score: ${(n*100).toFixed(1)}%`),t>.3&&i.push("Possible model behavior change or prompt drift"),i.length===0&&i.push("No specific cause identified - review test details"),i}categorizeRegressionSeverity(e){return e>=.5?"critical":e>=.3?"high":e>=.15?"medium":"low"}generateRecommendations(e,t,i){let s=[];if(t.inconsistentSkills.length>0&&s.push(`Review ${t.inconsistentSkills.length} skills with inconsistent cross-model behavior: `+t.inconsistentSkills.slice(0,3).join(", ")+(t.inconsistentSkills.length>3?` and ${t.inconsistentSkills.length-3} more`:"")),t.anomalies.some(r=>r.type==="low_performance")){let r=t.anomalies.filter(o=>o.type==="low_performance").map(o=>o.model);s.push(`Investigate low performance on model(s): ${r.join(", ")}`)}let a=i.filter(r=>r.severity==="critical");a.length>0&&s.push(`URGENT: ${a.length} critical regression(s) detected - immediate review required`);let n=Array.from(e.values()).filter(r=>r.avgPassRate<.9);if(n.length>0){let r=n.filter(l=>!l.schemaValid),o=n.filter(l=>!l.validatorPassed);r.length>0&&s.push(`Fix schema validation for: ${r.map(l=>l.skill).slice(0,3).join(", ")}`),o.length>0&&s.push(`Review validator scripts for: ${o.map(l=>l.skill).slice(0,3).join(", ")}`)}return Array.from(e.values()).reduce((r,o)=>r+o.avgPassRate,0)/e.size<.8&&s.push("Overall pass rate below 80% - consider reviewing skill definitions and test expectations"),s.length===0&&s.push("All validations passing - no immediate action required"),s}async updateManifest(e){if(!N(this.manifestPath))throw new Error(`Manifest file not found: ${this.manifestPath}`);let t=C(E(this.manifestPath,"utf-8"));for(let[s,a]of e.skillResults.entries())if(t.skills&&t.skills[s]){let n=t.skills[s];n.validation||(n.validation={}),n.validation.passRate=a.avgPassRate,n.validation.lastValidated=e.timestamp.toISOString(),n.validation.status=a.avgPassRate>=.9?"passing":"failing",n.validation.passRateByModel=Object.fromEntries(a.passRateByModel)}let i=Array.from(e.skillResults.values());t.validationStatus={passing:i.filter(s=>s.avgPassRate>=.9).length,failing:i.filter(s=>s.avgPassRate<.9).length,unknown:0,skipped:t.summary?.tier0||0},t.generatedAt=new Date().toISOString(),t.lastValidationRun={runId:e.runId,timestamp:e.timestamp.toISOString(),avgPassRate:e.summary.avgPassRate,modelsUsed:e.summary.modelsUsed},L(this.manifestPath,JSON.stringify(t,null,2))}generateMarkdownReport(e){let{summary:t,crossModelAnalysis:i,regressions:s,recommendations:a,skillResults:n}=e,c=(t.avgPassRate>=.9||t.avgPassRate>=.7,"`"),r=[];if(r.push(`# Validation Report
|
|
3
3
|
|
|
4
4
|
> ${c} Generated: ${e.timestamp.toISOString()}
|
|
5
5
|
> Run ID: ${e.runId}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
2
|
var r="insufficient-evidence";function s(t,n){let e=n&&typeof n=="object"?n:null;return e&&(e.status===r||e.evidenceStatus===r)?!1:t==="coverage-analysis"?e?.measured===!0:!0}export{s as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
2
|
function r(e,f){if(e==null)return e;let n={...e};for(let t of f){let o=n[t];typeof o=="string"&&(n[t]=new Date(o))}return n}export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{a as p}from"./chunk-ZG5666GJ.js";import{j as m,n as E}from"./chunk-XFVTGAAJ.js";import{v as T}from"./chunk-C522H7XR.js";import{c as V}from"./chunk-EWFECZ2U.js";import k from"node:path";async function y(e){if(e.checklist.requirements.length===0)throw new Error("RequirementChecklist must have a non-empty, constant denominator (ADR-117).");if(!(e.oracle!=null&&e.oracle.baselinePassed===!0&&e.oracle.passed===!0)){let s=e.oracle==null?"oracle did not run":e.oracle.baselinePassed!==!0?"tests did not execute against the reference implementation":"mutation score below threshold";return{verdict:"fail",mechanical:"fail",specCoverage:null,unmet:[],attempts:0,reason:`mechanical gate failed: ${s}`}}if(!await e.judge.preflight())return{verdict:"inconclusive",mechanical:"pass",specCoverage:null,unmet:[],attempts:0,reason:"judge preflight failed: judge tooling did not run \u2014 refusing to report success"};let r=[],n=null,a=[],o=0;for(let s=0;s<2;s++){o++;let u=await e.judge.grade(e.artifact,e.checklist);if(u.ran&&(r.push(u),(n==null||u.coverage>n)&&(n=u.coverage,a=u.unmet),u.coverage>=1))return{verdict:"pass",mechanical:"pass",specCoverage:u.coverage,unmet:[],attempts:o,reason:`spec gate passed at coverage ${u.coverage.toFixed(3)} on attempt ${o}`}}return r.length>=2?{verdict:"fail",mechanical:"pass",specCoverage:n,unmet:a,attempts:o,reason:`spec gate failed: ${r.length} real opinions, best coverage ${(n??0).toFixed(3)} < 1 (${a.length} unmet)`}:{verdict:"inconclusive",mechanical:"pass",specCoverage:n,unmet:a,attempts:o,reason:`spec gate inconclusive: only ${r.length} real opinion(s) obtainable (need 2 to fail) \u2014 retry later, record neither pass nor fail`}}T();import{createHash as R}from"node:crypto";function I(e){let{manifestHash:t,...i}=e;return`sha256:${R("sha256").update(h(i)).digest("hex")}`}function b(e){return`sha256:${R("sha256").update(e).digest("hex")}`}function x(e,t={}){q(e);let i=I(e);if(e.manifestHash!==i)throw new Error(`Verification reach manifestHash mismatch: expected ${i}`);let r=t.now??new Date,n=r.toISOString(),a=e.expiresAt!=null&&r.getTime()>l(e.expiresAt,"expiresAt"),o=e.risks.map(s=>O(s,e,a,r.getTime()));return{manifestId:e.id,manifestHash:e.manifestHash,systemUnderTest:e.systemUnderTest,artifact:structuredClone(e.artifact),coverageVerdict:P(o.map(s=>s.verdict)),risks:o,evaluatedAt:n}}function O(e,t,i,r){let n=new Set,a=new Set,o=new Set,s=new Set,u=new Set;for(let c of e.checks){for(let v of c.limitations)u.add(v);if(S(c,t,i,r)){if(c.reach==="partial"){a.add(c.checkId);continue}if(c.reach==="direct"&&e.requiredObservations.includes(c.channel)&&c.oracleRef===e.requiredOracle){if(c.executionStatus==="failed"){o.add(c.checkId);continue}c.executionStatus==="passed"&&(n.add(c.checkId),s.add(c.channel))}}}let d=e.requiredObservations.filter(c=>!s.has(c)),f=o.size>0?"fail":d.length===0?"pass":e.dispositionWhenUncovered;return{riskId:e.riskId,failureMode:e.failureMode,severity:e.severity,verdict:f,directCheckIds:[...n],partialCheckIds:[...a],failedCheckIds:[...o],uncoveredObservations:d,limitations:[...u],reason:j(f,o,d,i)}}function S(e,t,i,r){if(i||!$(e.target,t.artifact)||e.evidenceClass!=="EXECUTED"||e.executionStatus==="not-run"||e.executionStatus==="unavailable"||!e.observedAt)return!1;let n=l(e.observedAt,`check ${e.checkId} observedAt`),a=l(t.generatedAt,"generatedAt");return!(n<a||n>r||t.expiresAt&&n>l(t.expiresAt,"expiresAt"))}function $(e,t){return e.revision===t.revision&&e.digest===t.digest&&e.environment===t.environment}function P(e){return e.some(t=>t==="fail")?"fail":e.some(t=>t==="human-review")?"human-review":e.some(t=>t==="inconclusive")?"inconclusive":"pass"}function j(e,t,i,r){return r?`verification manifest expired; uncovered: ${i.join(", ")}`:t.size>0?`direct check failed: ${[...t].join(", ")}`:e==="pass"?"all required observation channels have direct executed reach":`required reach is uncovered (${i.join(", ")}); disposition: ${e}`}function q(e){if(!e.id||!e.systemUnderTest)throw new Error("Verification reach manifest requires id and systemUnderTest");if(!e.artifact.revision||!e.artifact.digest||!e.artifact.environment)throw new Error("Verification reach manifest artifact requires revision, digest, and environment");if(l(e.generatedAt,"generatedAt"),e.expiresAt&&l(e.expiresAt,"expiresAt"),e.risks.length===0)throw new Error("Verification reach manifest requires at least one failure mode");let t=new Set;for(let i of e.risks){if(t.has(i.riskId))throw new Error(`Duplicate riskId: ${i.riskId}`);if(t.add(i.riskId),!i.riskId||!i.failureMode||!i.requiredOracle)throw new Error("Each failure mode requires riskId, failureMode, and requiredOracle");if(i.requiredObservations.length===0)throw new Error(`Failure mode ${i.riskId} requires at least one observation channel`)}}function l(e,t){let i=Date.parse(e);if(!Number.isFinite(i))throw new Error(`Invalid ${t} timestamp: ${e}`);return i}function h(e){return Array.isArray(e)?`[${e.map(h).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).filter(([,i])=>i!==void 0).sort(([i],[r])=>i<r?-1:i>r?1:0).map(([i,r])=>`${JSON.stringify(i)}:${h(r)}`).join(",")}}`:JSON.stringify(e)}var U="verification/anchors/qe-anchor-v1.json";async function te(e){let t=J(e.checklistId,e.anchorPath);if(e.verificationManifest&&e.verificationManifest.artifact.digest!==b(e.artifact))throw new Error("Verification reach manifest artifact digest does not match the judged artifact");let i=e.verificationManifest?{kind:"verified",...x(e.verificationManifest)}:{kind:"legacy-unknown",coverageVerdict:"inconclusive",reason:"legacy quality-gate request has no verification reach manifest"},r=i.coverageVerdict,n=await y({oracle:e.oracleResult,artifact:e.artifact,checklist:t,judge:e.judge});return{...n,qualityVerdict:n.verdict,coverageVerdict:r,verdict:F(n.verdict,r),verification:i}}function F(e,t){return e==="fail"||t==="fail"?"fail":e==="pass"&&t==="pass"?"pass":"inconclusive"}function J(e,t){let i=C(t),r=p(i),n=r.items.find(a=>a.id===e);if(!n){let a=r.items.map(o=>o.id).join(", ");throw new Error(`Unknown checklist id "${e}" in anchor ${i}. Available: ${a}`)}return{id:n.id,requirements:n.requirements}}function ie(e){return p(C(e)).items.map(i=>i.id)}function C(e){if(e&&k.isAbsolute(e))return e;let t=V();return k.resolve(t,e??U)}E();var D=6e4,Q=15e3;function N(e){let t=e.timeoutMs??D,i=e.logger??(()=>{}),r=e.model??"frontier",n=e.ping??(async()=>{let a=await w(e.complete("Reply with exactly: OK"),Math.min(Q,t),"judge preflight ping");return typeof a=="string"&&a.trim().length>0});return{async preflight(){try{let a=await n();return a||i(`frontier-judge preflight: provider (${r}) returned empty \u2014 not ready`),a}catch(a){return i(`frontier-judge preflight failed (${r}): ${M(a)}`),!1}},async grade(a,o){let s=o.requirements.length;try{let u=H(a,o),d=await w(e.complete(u),t,"judge grade"),f=G(d,s);if(f==null)return i(`frontier-judge grade: could not parse response for ${o.id}`),{ran:!1,coverage:0,unmet:[]};let c=[...f].sort((g,A)=>g-A).map(g=>o.requirements[g]);return{ran:!0,coverage:(s-c.length)/s,unmet:c}}catch(u){return i(`frontier-judge grade failed for ${o.id} (${r}): ${M(u)}`),{ran:!1,coverage:0,unmet:[]}}}}}function _(e,t={}){let i=t.model??m;return async r=>(await e.chat({messages:[{role:"user",content:r}],model:i,strictModel:!0,preferredProvider:t.preferredProvider,temperature:t.temperature??0,maxTokens:t.maxTokens??1024,timeoutMs:t.timeoutMs,skipCache:!0})).content??""}function ae(e,t={}){let i=t.model??m;return N({complete:_(e,{...t,model:i}),model:i,timeoutMs:t.timeoutMs,logger:t.logger})}function oe(e){return{preflight:()=>!1,grade:()=>({ran:!1,coverage:0,unmet:[]})}}function H(e,t){let i=t.requirements.map((r,n)=>`${n+1}. ${r}`).join(`
|
|
3
3
|
`);return["You are a rigorous, frontier-tier quality oracle grading a software artifact","against a FIXED requirement checklist. Judge only what the artifact actually","verifies \u2014 do not give credit for requirements it merely mentions or leaves",'implicit. A requirement is "met" only if the artifact demonstrably covers it.',"",`Checklist id: ${t.id}`,"Requirements (the denominator is fixed \u2014 grade ALL of them):",i,"","--- ARTIFACT UNDER JUDGEMENT ---",e,"--- END ARTIFACT ---","","Return ONLY a single JSON object, no prose, no markdown fences, of the form:",'{"unmet": [<numbers of requirements NOT met>]}','Use the requirement numbers above. If every requirement is met, return {"unmet": []}.'].join(`
|
|
4
4
|
`)}function G(e,t){let i=L(e);if(i==null||!Array.isArray(i.unmet))return null;let r=i.unmet,n=new Set;for(let a of r){let o=typeof a=="number"?a:typeof a=="string"?Number(a.trim()):NaN;if(!Number.isInteger(o))continue;let s=o-1;s>=0&&s<t&&n.add(s)}return r.length>0&&n.size===0?null:n}function L(e){if(typeof e!="string")return null;let t=e.indexOf("{");if(t===-1)return null;let i=0,r=!1,n=!1;for(let a=t;a<e.length;a++){let o=e[a];if(r){n?n=!1:o==="\\"?n=!0:o==='"'&&(r=!1);continue}if(o==='"')r=!0;else if(o==="{")i++;else if(o==="}"&&(i--,i===0))try{return JSON.parse(e.slice(t,a+1))}catch{return null}}return null}function w(e,t,i){return new Promise((r,n)=>{let a=setTimeout(()=>n(new Error(`${i} timed out after ${t}ms`)),t);e.then(o=>{clearTimeout(a),r(o)},o=>{clearTimeout(a),n(o)})})}function M(e){return e instanceof Error?e.message:String(e)}export{te as a,ie as b,ae as c,oe as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{b as c,d as f,e as g,f as X}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{b as c,d as f,e as g,f as X}from"./chunk-C522H7XR.js";import{createHash as I}from"crypto";import{existsSync as O,readFileSync as b,writeFileSync as D,openSync as F,writeSync as y,closeSync as S}from"fs";X();var U=[`CREATE TABLE IF NOT EXISTS qe_patterns (
|
|
3
3
|
id TEXT PRIMARY KEY, pattern_type TEXT NOT NULL, qe_domain TEXT NOT NULL,
|
|
4
4
|
domain TEXT NOT NULL, name TEXT NOT NULL, description TEXT,
|
|
5
5
|
confidence REAL DEFAULT 0.5, usage_count INTEGER DEFAULT 0,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{d as m}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{d as m}from"./chunk-6GP6W46M.js";import{d as T}from"./chunk-6PX4OXQO.js";T();function p(t,r,o){let e=0,n=t.length;for(;e<n;){let i=e+n>>>1;o(t[i],r)<=0?e=i+1:n=i}return e}function a(t,r,o){let e=p(t,r,o);return t.splice(e,0,r),e}function s(){return(t,r)=>t.createdAt.getTime()-r.createdAt.getTime()}m();export{a,s as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{g,n as f}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{g,n as f}from"./chunk-XFVTGAAJ.js";import{a as l,d as c,e as k}from"./chunk-AI4VYSFS.js";import{b as C}from"./chunk-OY2AHLSF.js";import{randomUUID as T}from"crypto";function b(s){let t=Object.hasOwn(h,s)?h[s]:void 0;if(t)return{input:t.input,output:t.output};let e=g(s);if(e.inputCostPerMillion>0||e.outputCostPerMillion>0)return{input:e.inputCostPerMillion,output:e.outputCostPerMillion}}function w(){return d||(d=new m),d}function x(){d&&(d.dispose(),d=void 0)}var h,m,d,R=C(()=>{f();k();h={"claude-sonnet-5":{input:2,output:10,provider:"claude"},"claude-opus-5":{input:5,output:25,provider:"claude"},"claude-opus-5-5":{input:4,output:20,provider:"claude"},"claude-fable-5-1":{input:10,output:50,provider:"claude"},"claude-fable-5":{input:10,output:50,provider:"claude"},"claude-opus-4-8":{input:5,output:25,provider:"claude"},"claude-opus-4-7":{input:5,output:25,provider:"claude"},"claude-sonnet-4-6":{input:3,output:15,provider:"claude"},"claude-haiku-4-5-20251001":{input:1,output:5,provider:"claude"},"claude-haiku-4-5":{input:1,output:5,provider:"claude"},"claude-opus-4-5-20251101":{input:5,output:25,provider:"claude"},"claude-opus-4-6":{input:5,output:25,provider:"claude"},"claude-sonnet-4-20250514":{input:3,output:15,provider:"claude"},"claude-3-5-haiku-20241022":{input:1,output:5,provider:"claude"},"claude-3-opus-20240229":{input:15,output:75,provider:"claude"},"claude-3-sonnet-20240229":{input:3,output:15,provider:"claude"},"claude-3-haiku-20240307":{input:.25,output:1.25,provider:"claude"},"gpt-6-astra":{input:10,output:50,provider:"openai"},"gpt-6-sol":{input:2,output:10,provider:"openai"},"gpt-6-luna":{input:.1,output:.5,provider:"openai"},"gpt-4o":{input:5,output:15,provider:"openai"},"gpt-4o-mini":{input:.15,output:.6,provider:"openai"},"gpt-4-turbo":{input:10,output:30,provider:"openai"},"gpt-4":{input:30,output:60,provider:"openai"},"gpt-3.5-turbo":{input:.5,output:1.5,provider:"openai"},llama3:{input:0,output:0,provider:"ollama"},"llama3.1":{input:0,output:0,provider:"ollama"},codellama:{input:0,output:0,provider:"ollama"},mistral:{input:0,output:0,provider:"ollama"},mixtral:{input:0,output:0,provider:"ollama"},phi3:{input:0,output:0,provider:"ollama"},qwen2:{input:0,output:0,provider:"ollama"},"anthropic/claude-sonnet-5":{input:2,output:10,provider:"openrouter"},"anthropic/claude-opus-5":{input:5,output:25,provider:"openrouter"},"anthropic/claude-opus-5.5":{input:4,output:20,provider:"openrouter"},"anthropic/claude-haiku-4.5":{input:1,output:5,provider:"openrouter"},"openai/gpt-6-sol":{input:2,output:10,provider:"openrouter"},"openai/gpt-6-luna":{input:.1,output:.5,provider:"openrouter"},"google/gemini-3.8-flash":{input:.75,output:3.75,provider:"openrouter"},"meta-llama/llama-4-maverick":{input:.1875,output:.6525,provider:"openrouter"},"openai/gpt-oss-120b":{input:.15,output:.6,provider:"openrouter"},"qwen/qwen3-coder":{input:.3,output:1,provider:"openrouter"},"anthropic/claude-3.5-sonnet":{input:3,output:15,provider:"openrouter"},"anthropic/claude-3.5-sonnet:beta":{input:3,output:15,provider:"openrouter"},"anthropic/claude-3-opus":{input:15,output:75,provider:"openrouter"},"anthropic/claude-3-sonnet":{input:3,output:15,provider:"openrouter"},"anthropic/claude-3-haiku":{input:.25,output:1.25,provider:"openrouter"},"openai/gpt-4o":{input:5,output:15,provider:"openrouter"},"openai/gpt-4o-mini":{input:.15,output:.6,provider:"openrouter"},"openai/gpt-4-turbo":{input:10,output:30,provider:"openrouter"},"openai/gpt-3.5-turbo":{input:.5,output:1.5,provider:"openrouter"},"google/gemini-pro":{input:.125,output:.375,provider:"openrouter"},"google/gemini-pro-1.5":{input:3.5,output:10.5,provider:"openrouter"},"meta-llama/llama-3.1-70b-instruct":{input:.59,output:.79,provider:"openrouter"},"meta-llama/llama-3.1-8b-instruct":{input:.06,output:.06,provider:"openrouter"},"mistralai/mistral-large":{input:2,output:6,provider:"openrouter"},"mistralai/mixtral-8x7b-instruct":{input:.24,output:.24,provider:"openrouter"},"mistralai/mistral-7b-instruct":{input:.06,output:.06,provider:"openrouter"},"anthropic.claude-opus-4-5-v1:0":{input:15,output:75,provider:"bedrock"},"anthropic.claude-opus-4-v1:0":{input:15,output:75,provider:"bedrock"},"anthropic.claude-sonnet-4-5-v2:0":{input:3,output:15,provider:"bedrock"},"anthropic.claude-sonnet-4-v1:0":{input:3,output:15,provider:"bedrock"},"anthropic.claude-3-5-haiku-v1:0":{input:1,output:5,provider:"bedrock"},"anthropic.claude-3-opus-20240229-v1:0":{input:15,output:75,provider:"bedrock"},"anthropic.claude-3-sonnet-20240229-v1:0":{input:3,output:15,provider:"bedrock"},"anthropic.claude-3-haiku-20240307-v1:0":{input:.25,output:1.25,provider:"bedrock"},"anthropic.claude-3-5-sonnet-20241022-v2:0":{input:3,output:15,provider:"bedrock"},"azure/gpt-4o":{input:5,output:15,provider:"azure-openai"},"azure/gpt-4o-mini":{input:.15,output:.6,provider:"azure-openai"},"azure/gpt-4-turbo":{input:10,output:30,provider:"azure-openai"},"azure/gpt-4":{input:30,output:60,provider:"azure-openai"},"azure/gpt-35-turbo":{input:.5,output:1.5,provider:"azure-openai"},"azure/text-embedding-ada-002":{input:.1,output:0,provider:"azure-openai"},"azure/text-embedding-3-small":{input:.02,output:0,provider:"azure-openai"},"azure/text-embedding-3-large":{input:.13,output:0,provider:"azure-openai"},"gemini-3.8-flash":{input:.75,output:3.75,provider:"gemini"},"gemini-3.5-flash":{input:1.5,output:9,provider:"gemini"},"gemini-3.1-pro-preview":{input:2,output:12,provider:"gemini"},"gemini-2.5-flash":{input:.3,output:2.5,provider:"gemini"},"gemini-2.5-pro":{input:1.25,output:10,provider:"gemini"},"gemini-pro":{input:.5,output:1.5,provider:"gemini"},"gemini-1.0-pro":{input:.5,output:1.5,provider:"gemini"},"gemini-1.5-pro":{input:3.5,output:10.5,provider:"gemini"},"gemini-1.5-pro-latest":{input:3.5,output:10.5,provider:"gemini"},"gemini-1.5-flash":{input:.075,output:.3,provider:"gemini"},"gemini-1.5-flash-latest":{input:.075,output:.3,provider:"gemini"},"gemini-2.0-flash-exp":{input:.075,output:.3,provider:"gemini"},"gemini-ultra":{input:7,output:21,provider:"gemini"},"gemini-1.0-ultra":{input:7,output:21,provider:"gemini"},"text-embedding-004":{input:.025,output:0,provider:"gemini"}};m=class s{records=[];alerts=[];maxRecords;alertCheckInterval;constructor(t=1e4){this.maxRecords=t}static calculateCost(t,e){let o=b(t);if(!o)return{inputCost:0,outputCost:0,totalCost:0,currency:"USD"};let i=e.promptTokens/1e6*o.input+(e.cacheReadTokens??0)/1e6*o.input*.1+(e.cacheCreationTokens??0)/1e6*o.input*1.25,r=e.completionTokens/1e6*o.output;return{inputCost:i,outputCost:r,totalCost:i+r,currency:"USD"}}static getCostPerToken(t){let e=b(t);return e?{input:e.input/1e6,output:e.output/1e6}:{input:0,output:0}}recordUsage(t,e,o,i,r){let p=s.calculateCost(e,o),n={timestamp:new Date,provider:t,model:e,usage:o,cost:p,requestId:i,metadata:r};return this.records.push(n),this.records.length>this.maxRecords&&(this.records=this.records.slice(-this.maxRecords)),this.checkAlerts(),p}getSummary(t){let e=new Date,o=this.getPeriodStart(e,t),i=e,r=this.records.filter(a=>a.timestamp>=o&&a.timestamp<=i),p={claude:0,"claude-code":0,codex:0,openai:0,ollama:0,openrouter:0,bedrock:0,"azure-openai":0,gemini:0,cognitum:0},n=l(),u=0,v=0;for(let a of r)u+=a.cost.totalCost,v+=a.usage.totalTokens,c(p,a.provider,a.cost.totalCost),c(n,a.model,a.cost.totalCost);return{period:t,periodStart:o,periodEnd:i,totalCost:u,byProvider:p,byModel:n,totalTokens:v,totalRequests:r.length}}getCurrentCost(t){return this.getSummary(t).totalCost}getTotalTokens(t){return this.getSummary(t).totalTokens}getUsageByProvider(t,e="all"){let o=this.getPeriodStart(new Date,e),i=this.records.filter(u=>u.provider===t&&u.timestamp>=o),r=l(),p=0,n=0;for(let u of i)p+=u.cost.totalCost,n+=u.usage.totalTokens,r[u.model]||(r[u.model]={cost:0,tokens:0,requests:0}),r[u.model].cost+=u.cost.totalCost,r[u.model].tokens+=u.usage.totalTokens,r[u.model].requests+=1;return{totalCost:p,totalTokens:n,totalRequests:i.length,models:r}}addAlert(t,e,o){let i=`alert-${Date.now()}-${T().slice(0,12)}`;return this.alerts.push({threshold:t,period:e,onThreshold:o,active:!0}),this.alertCheckInterval||(this.alertCheckInterval=setInterval(()=>this.checkAlerts(),6e4)),i}removeAlert(t){return t>=0&&t<this.alerts.length?(this.alerts.splice(t,1),this.alerts.length===0&&this.alertCheckInterval&&(clearInterval(this.alertCheckInterval),this.alertCheckInterval=void 0),!0):!1}getRecords(){return[...this.records]}importRecords(t){for(let e of t)e.timestamp=new Date(e.timestamp),this.records.push(e);this.records.length>this.maxRecords&&(this.records=this.records.slice(-this.maxRecords))}clear(){this.records=[]}getRecentRequests(t=10){return this.records.slice(-t)}estimateCost(t,e,o){return s.calculateCost(t,{promptTokens:e,completionTokens:o,totalTokens:e+o})}wouldExceedLimit(t,e,o,i,r){let p=this.getCurrentCost(r),n=this.estimateCost(t,e,o);return p+n.totalCost>i}dispose(){this.alertCheckInterval&&(clearInterval(this.alertCheckInterval),this.alertCheckInterval=void 0)}getPeriodStart(t,e){let o=new Date(t);switch(e){case"minute":o.setSeconds(0,0),o.setMinutes(o.getMinutes()-1);break;case"hour":o.setMinutes(0,0,0),o.setHours(o.getHours()-1);break;case"day":o.setHours(0,0,0,0);break;case"week":o.setHours(0,0,0,0),o.setDate(o.getDate()-7);break;case"month":o.setHours(0,0,0,0),o.setDate(1);break;case"all":return new Date(0)}return o}checkAlerts(){for(let t of this.alerts){if(!t.active)continue;let e=this.getSummary(t.period);if(e.totalCost>=t.threshold){t.active=!1;try{t.onThreshold(e)}catch(o){console.error("Cost alert callback error:",o)}}}}}});export{h as a,b,m as c,w as d,x as e,R as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{b as h,d as v,f as T}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{b as h,d as v,f as T}from"./chunk-OY2AHLSF.js";var y={};v(y,{DotProductAttention:()=>z,FlashAttention:()=>k,HyperbolicAttention:()=>C,LinearAttention:()=>j,MoEAttention:()=>W,MultiHeadAttention:()=>F,RuvectorLayer:()=>I,SonaEngine:()=>K,TensorCompress:()=>E,default:()=>_,differentiableSearch:()=>L,getCompressionLevel:()=>B,hierarchicalForward:()=>V,init:()=>D,pipeline:()=>q});import{createRequire as A}from"module";var O,g,_,I,E,L,V,B,D,k,z,F,C,j,W,K,q,R=h(()=>{O=A(import.meta.url),g=O("@ruvector/rvf-node"),_=g,{RuvectorLayer:I,TensorCompress:E,differentiableSearch:L,hierarchicalForward:V,getCompressionLevel:B,init:D,FlashAttention:k,DotProductAttention:z,MultiHeadAttention:F,HyperbolicAttention:C,LinearAttention:j,MoEAttention:W,SonaEngine:K,pipeline:q}=g||{}});var Z={};v(Z,{createRvfStore:()=>$,isRvfNativeAvailable:()=>X,openRvfStore:()=>G,openRvfStoreReadonly:()=>U});import{readFileSync as J,writeFileSync as H,copyFileSync as Q,existsSync as Y}from"fs";function c(){if(S)return m;S=!0;try{let s=(R(),T(y));!s.RvfDatabase&&s.default&&s.default.RvfDatabase&&(s=s.default),m=s}catch{m=null}return m}function w(s){return`${s}.idmap.json`}function N(s){let e=w(s),t=new Map,n=new Map,i=1;if(Y(e))try{let r=JSON.parse(J(e,"utf-8"));i=r.nextLabel;for(let[a,p]of r.entries)t.set(a,p),n.set(p,a)}catch{}return{strToNum:t,numToStr:n,nextLabel:i}}function b(s,e,t){let n={nextLabel:t,entries:Array.from(e.entries())};H(w(s),JSON.stringify(n),"utf-8")}function $(s,e){let t=c();if(!t)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let n=t.RvfDatabase.create(s,{dimension:e}),i=n.dimension();return new d(n,s,i,new Map,new Map,1)}function G(s){let e=c();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.open(s),n=t.dimension(),{strToNum:i,numToStr:r,nextLabel:a}=N(s);return new d(t,s,n,i,r,a)}function U(s){let e=c();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.openReadonly(s),n=t.dimension(),{strToNum:i,numToStr:r,nextLabel:a}=N(s);return new d(t,s,n,i,r,a)}function X(){return process.env.AQE_MEMORY_BACKEND==="memory"?!1:c()!==null}var m,S,d,P=h(()=>{m=null,S=!1;d=class s{db;_path;_dimension;strToNum;numToStr;nextLabel;_open;constructor(e,t,n,i,r,a){this.db=e,this._path=t,this._dimension=n,this.strToNum=i,this.numToStr=r,this.nextLabel=a,this._open=!0}ingest(e){if(this.ensureOpen(),e.length===0)return{accepted:0,rejected:0};let t=this._dimension,n=new Float32Array(e.length*t),i=[],r=[];for(let o=0;o<e.length;o++){let{id:u,vector:f,metadata:x}=e[o],l=this.strToNum.get(u);l===void 0&&(l=this.nextLabel++,this.strToNum.set(u,l),this.numToStr.set(l,u)),i.push(l),r.push(x);let M=f instanceof Float32Array?f:new Float32Array(f);n.set(M.subarray(0,t),o*t)}let a;if(r.some(o=>o!==void 0)&&typeof this.db.ingestBatchWithMetadata=="function"){let o=r.map(u=>u?JSON.stringify(u):"");a=this.db.ingestBatchWithMetadata(n,i,o)}else a=this.db.ingestBatch(n,i);return this.persistIdMap(),{accepted:a.accepted,rejected:a.rejected}}has(e){return this.ensureOpen(),this.strToNum.has(e)}search(e,t){this.ensureOpen();let n=e instanceof Float32Array?e:new Float32Array(e);return this.db.query(n,t).map(r=>{let a=this.numToStr.get(r.id);return a===void 0?null:{id:a,distance:r.distance,score:1/(1+r.distance)}}).filter(r=>r!==null)}delete(e){this.ensureOpen();let t=[];for(let i of e){let r=this.strToNum.get(i);r!==void 0&&t.push(r)}if(t.length===0)return 0;let n=this.db.delete(t);for(let i of e){let r=this.strToNum.get(i);r!==void 0&&(this.strToNum.delete(i),this.numToStr.delete(r))}return this.persistIdMap(),n.deleted}fork(e){this.ensureOpen(),Q(this._path,e);let t=new Map(this.strToNum),n=new Map(this.numToStr);b(e,t,this.nextLabel);let r=c().RvfDatabase.open(e);return new s(r,e,this._dimension,t,n,this.nextLabel)}status(){this.ensureOpen();let e=this.db.status(),n=this.db.segments().filter(i=>i.segType==="witness");return{totalVectors:e.totalVectors,totalSegments:e.totalSegments,fileSizeBytes:e.fileSize,epoch:e.currentEpoch,witnessValid:n.length>0,witnessEntries:n.length,deadSpaceRatio:typeof e.deadSpaceRatio=="number"?e.deadSpaceRatio:0}}dimension(){return this._dimension}size(){return this.ensureOpen(),this.db.status().totalVectors}compact(){this.ensureOpen();try{let e=this.db.compact();return e&&typeof e=="object"?{segmentsCompacted:typeof e.segmentsCompacted=="number"?e.segmentsCompacted:0,bytesReclaimed:typeof e.bytesReclaimed=="number"?e.bytesReclaimed:0,epoch:typeof e.epoch=="number"?e.epoch:0}:{segmentsCompacted:0,bytesReclaimed:0,epoch:0}}catch{return null}}close(){this._open&&(this.db.close(),this._open=!1)}isOpen(){return this._open}path(){return this._path}embedKernel(e){return this.ensureOpen(),this.db.embedKernel(0,99,0,e,0,"")}extractKernel(){return this.ensureOpen(),this.db.extractKernel()}verifyWitness(){this.ensureOpen();let e=this.tryNative("verifyWitness");return e?{valid:e.valid??!0,totalEntries:e.totalEntries??0,errors:Array.isArray(e.errors)?e.errors:[]}:{valid:!0,totalEntries:0,errors:[]}}sign(e){this.ensureOpen();let t=this.tryNative("sign",e);return typeof t=="string"?t:null}fileId(){this.ensureOpen();let e=this.tryNative("fileId");return typeof e=="string"?e:null}parentId(){this.ensureOpen();let e=this.tryNative("parentId");return typeof e=="string"?e:null}lineageDepth(){this.ensureOpen();let e=this.tryNative("lineageDepth");return typeof e=="number"?e:0}indexStats(){let e=this.status();return{totalVectors:e.totalVectors,dimension:this._dimension,totalSegments:e.totalSegments,fileSizeBytes:e.fileSizeBytes,epoch:e.epoch,witnessValid:e.witnessValid,witnessEntries:e.witnessEntries,idMapSize:this.strToNum.size}}freeze(){this.ensureOpen();let e=this.tryNative("freeze");return typeof e=="number"?e:0}derive(e){this.ensureOpen();let t=c();if(typeof this.db.derive=="function")try{let n=this.db.derive(e),i=new Map(this.strToNum),r=new Map(this.numToStr);return b(e,i,this.nextLabel),new s(n,e,this._dimension,i,r,this.nextLabel)}catch{}return this.fork(e)}ensureOpen(){if(!this._open)throw new Error("RVF database is closed")}tryNative(e,...t){if(typeof this.db[e]!="function")return null;try{return this.db[e](...t)}catch{return null}}persistIdMap(){b(this._path,this.strToNum,this.nextLabel)}}});export{$ as a,G as b,U as c,X as d,Z as e,P as f};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a as
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{a as D}from"./chunk-5LPYV3TK.js";import{b as L}from"./chunk-ZG5666GJ.js";import{e as w}from"./chunk-37OWRCUN.js";import{b as E,d as V}from"./chunk-ACWFKES2.js";import{b as P,e as Q}from"./chunk-AI4VYSFS.js";import{a as W}from"./chunk-HOZUDE4C.js";import{c as v}from"./chunk-ATHWDAXB.js";import{S as $,j as f}from"./chunk-XLZYRTNO.js";import{b as S,d as j}from"./chunk-EWFECZ2U.js";V();var J=["oracle:test-exec","judge:llm","proxy:structural"],d="proxy:structural";function G(n){return n&&J.includes(n)?n:d}function m(n,e={}){switch(G(n)){case"oracle:test-exec":return!0;case"judge:llm":return e.allowJudgeTier===!0;default:return!1}}import{createHash as M}from"node:crypto";function C(n,e){let t=n.length;if(t===0)return-1/0;let r=e?.iters??2e3,a=e?.alpha??.05,s=(e?.seed??2654435761)>>>0,o=()=>(s=Math.imul(s,1664525)+1013904223>>>0,s/4294967296),c=new Array(r);for(let u=0;u<r;u++){let l=0;for(let h=0;h<t;h++)l+=n[Math.floor(o()*t)];c[u]=l/t}c.sort((u,l)=>u-l);let i=Math.min(Math.floor(a*r),r-1);return c[i]}function x(n,e){let t=Math.min(n.length,e.length),r=new Array(t);for(let a=0;a<t;a++)r[a]=n[a]-e[a];return r}Q();var I=n=>m(n.provenanceTier,{allowJudgeTier:n.allowJudgeTier})?n.candidateHeldOut>n.baselineHeldOut?L(n.candidateAnchorMean,n.baselineAnchorMean,n.anchorTol)?{promote:!0,reason:"held-out gain, no anchor regression, oracle-tier evidence"}:{promote:!1,reason:`anchor regression: ${n.candidateAnchorMean} < ${n.baselineAnchorMean} - ${n.anchorTol}`}:{promote:!1,reason:`held-out ${n.candidateHeldOut} did not beat baseline ${n.baselineHeldOut}`}:{promote:!1,reason:`provenance tier '${n.provenanceTier}' not allowed to promote`},N=8,O=1e-6,U=n=>n.reduce((e,t)=>e+t,0)/n.length,z=n=>{let e=I(n);if(!e.promote)return e;let t=n.candidateHeldOutSamples,r=n.baselineHeldOutSamples;if(!t||!r||t.length===0||t.length!==r.length)return{promote:!1,reason:"significance gate: missing/mismatched paired held-out samples (need equal-length candidate & baseline per-task vectors)"};if(t.length<N)return{promote:!1,reason:`significance gate: only ${t.length} paired samples (< ${N}) \u2014 a bootstrap CI is not meaningful; fail closed rather than certify noise`};if(Math.abs(U(t)-n.candidateHeldOut)>O||Math.abs(U(r)-n.baselineHeldOut)>O)return{promote:!1,reason:"significance gate: sealed sample means do not match the sealed held-out scalars \u2014 inconsistent/forged evaluation"};let a=C(x(t,r));return a>0?{promote:!0,reason:`${e.reason}; paired gain significant (CI low ${a.toFixed(4)} > 0)`}:{promote:!1,reason:`significance gate: paired held-out gain not significant (95% CI lower bound ${a.toFixed(4)} \u2264 0)`}},le=Object.freeze({"accept/v1":I,"accept/v1+sig":z});function T(n){if(n===null||typeof n!="object")return JSON.stringify(n)??"null";if(Array.isArray(n))return`[${n.map(T).join(",")}]`;let e=n;return`{${Object.keys(e).filter(r=>e[r]!==void 0).sort().map(r=>`${JSON.stringify(r)}:${T(e[r])}`).join(",")}}`}var B="aqe:promotion-path-rule:v1+sig",X=n=>m(n.provenanceTier,{allowJudgeTier:n.allowJudgeTier})?n.reward===void 0||n.rewardThreshold===void 0||!(n.reward>=n.rewardThreshold)?{promote:!1,reason:`reward ${n.reward} below threshold ${n.rewardThreshold}`}:n.occurrences===void 0||n.occurrenceThreshold===void 0||!(n.occurrences>=n.occurrenceThreshold)?{promote:!1,reason:`occurrences ${n.occurrences} below threshold ${n.occurrenceThreshold}`}:n.successRate===void 0||n.successRateThreshold===void 0||!(n.successRate>=n.successRateThreshold)?{promote:!1,reason:`success rate ${n.successRate} below threshold ${n.successRateThreshold}`}:n.withinActivityWindow!==!0?{promote:!1,reason:"pattern outside promotion activity window (stale)"}:{promote:!0,reason:"tier allowed; reward/occurrence/success-rate thresholds met; within activity window"}:{promote:!1,reason:`provenance tier '${n.provenanceTier}' not allowed to promote`},Y=n=>m(n.provenanceTier,{allowJudgeTier:n.allowJudgeTier})?n.insightConfidence===void 0||n.insightConfidenceThreshold===void 0||!(n.insightConfidence>=n.insightConfidenceThreshold)?{promote:!1,reason:`insight confidence ${n.insightConfidence} below threshold ${n.insightConfidenceThreshold}`}:n.insightActionable!==!0?{promote:!1,reason:"insight produced no actionable reorganization"}:{promote:!0,reason:"tier allowed; insight confidence meets threshold; actionable"}:{promote:!1,reason:`provenance tier '${n.provenanceTier}' not allowed to apply`},k=Object.freeze({"pattern-promote/v1":X,"dream-apply/v1":Y});function b(n){return M("sha256").update(T(n)).digest("hex")}function _(n){if(!Object.hasOwn(k,n))throw new Error(`Unknown promotion-path rule version '${n}' \u2014 cannot fingerprint an unregistered rule.`);return M("sha256").update(B).update("\0").update(n).digest("hex")}function y(n,e){let t=P(k,n);if(!t)throw new Error(`Unknown promotion-path rule version '${n}' \u2014 refusing to re-execute an unregistered rule.`);return t(e)}function F(n,e={}){let t=[],r=b(n.sealed)===n.sealedHash;r||t.push("sealIntact");let a=!1;try{let c=_(n.ruleVersion);a=n.ruleFingerprint===c&&(e.pinnedRuleFingerprint===void 0||n.ruleFingerprint===e.pinnedRuleFingerprint)}catch{a=!1}a||t.push("gateUnchanged");let s=!1;r&&a&&(s=(y(n.ruleVersion,n.sealed).promote?"promote":"reject")===n.recordedVerdict),s||t.push("gateReExecutes");let o=t.length===0;return{valid:o,checks:{sealIntact:r,gateUnchanged:a,gateReExecutes:s},failures:t,reason:o?"promotion verified: sealed inputs intact, rule unchanged, frozen rule re-execution reproduces the recorded verdict":`promotion INVALID (failed: ${t.join(", ")}) \u2014 the recorded verdict is not reproducible under the frozen rule`}}W();$();var p=v.create("pattern-lifecycle"),K={promotionRewardThreshold:.7,promotionMinOccurrences:w,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3,maxAgeForActivePatterns:90,promotionActivityWindowDays:30,asymmetricLearning:{},allowJudgeTierPromotion:!1},H=5,Z=.9,ee=2;function te(n,e){return e<H||!Number.isFinite(n)?0:Math.min(Math.max(n,0),1)}var R=class{constructor(e,t={}){this.db=e;this.config={...K,...t},this.asymmetricEngine=new D(this.config.asymmetricLearning),this.ensureSchema()}db;config;asymmetricEngine;_witnessChain=null;set witnessChain(e){this._witnessChain=e}_compressionService=null;set compressionService(e){this._compressionService=e}ensureSchema(){try{this.db.prepare(`
|
|
3
3
|
SELECT deprecated_at FROM qe_patterns LIMIT 1
|
|
4
4
|
`).get()}catch(e){p.debug("Adding missing deprecated_at column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
|
|
5
5
|
ALTER TABLE qe_patterns ADD COLUMN deprecated_at TEXT DEFAULT NULL
|
|
@@ -46,7 +46,7 @@ Success Rate: ${(e.successCount/e.count*100).toFixed(1)}%
|
|
|
46
46
|
Typical Actions:
|
|
47
47
|
${t||"N/A"}
|
|
48
48
|
|
|
49
|
-
Pattern extracted from ${e.count} successful experiences.`}getProvenanceTier(e){try{return this.db.prepare("SELECT provenance_tier FROM qe_patterns WHERE id = ?").get(e)?.provenance_tier??d}catch{return d}}checkPromotion(e){let t=this.getPattern(e);if(!t)return{shouldPromote:!1,meetsRewardThreshold:!1,meetsOccurrenceThreshold:!1,meetsSuccessRateThreshold:!1,meetsActivityWindow:!1,currentReward:0,currentOccurrences:0,currentSuccessRate:0,provenanceTier:d,meetsProvenanceTier:!1};let r=t.qualityScore,a=r>=this.config.promotionRewardThreshold,s=t.usageCount>=this.config.promotionMinOccurrences,o=t.successRate>=this.config.promotionMinSuccessRate,c=this.getProvenanceTier(e),i=m(c,{allowJudgeTier:this.config.allowJudgeTierPromotion}),u=this.config.promotionActivityWindowDays*24*60*60*1e3,l=t.lastUsedAt?.getTime()??t.createdAt.getTime(),h=Date.now()-l<u;return{shouldPromote:t.tier==="short-term"&&i&&a&&s&&o&&h,meetsRewardThreshold:a,meetsOccurrenceThreshold:s,meetsSuccessRateThreshold:o,meetsActivityWindow:h,provenanceTier:c,meetsProvenanceTier:i,currentReward:r,currentOccurrences:t.usageCount,currentSuccessRate:t.successRate}}promotePattern(e){let t=this.checkPromotion(e);if(!t.shouldPromote)return!1;let r={provenanceTier:t.provenanceTier,allowJudgeTier:this.config.allowJudgeTierPromotion,reward:t.currentReward,rewardThreshold:this.config.promotionRewardThreshold,occurrences:t.currentOccurrences,occurrenceThreshold:this.config.promotionMinOccurrences,successRate:t.currentSuccessRate,successRateThreshold:this.config.promotionMinSuccessRate,withinActivityWindow:t.meetsActivityWindow},a=y("pattern-promote/v1",r),s={ruleVersion:"pattern-promote/v1",ruleFingerprint:
|
|
49
|
+
Pattern extracted from ${e.count} successful experiences.`}getProvenanceTier(e){try{return this.db.prepare("SELECT provenance_tier FROM qe_patterns WHERE id = ?").get(e)?.provenance_tier??d}catch{return d}}checkPromotion(e){let t=this.getPattern(e);if(!t)return{shouldPromote:!1,meetsRewardThreshold:!1,meetsOccurrenceThreshold:!1,meetsSuccessRateThreshold:!1,meetsActivityWindow:!1,currentReward:0,currentOccurrences:0,currentSuccessRate:0,provenanceTier:d,meetsProvenanceTier:!1};let r=t.qualityScore,a=r>=this.config.promotionRewardThreshold,s=t.usageCount>=this.config.promotionMinOccurrences,o=t.successRate>=this.config.promotionMinSuccessRate,c=this.getProvenanceTier(e),i=m(c,{allowJudgeTier:this.config.allowJudgeTierPromotion}),u=this.config.promotionActivityWindowDays*24*60*60*1e3,l=t.lastUsedAt?.getTime()??t.createdAt.getTime(),h=Date.now()-l<u;return{shouldPromote:t.tier==="short-term"&&i&&a&&s&&o&&h,meetsRewardThreshold:a,meetsOccurrenceThreshold:s,meetsSuccessRateThreshold:o,meetsActivityWindow:h,provenanceTier:c,meetsProvenanceTier:i,currentReward:r,currentOccurrences:t.usageCount,currentSuccessRate:t.successRate}}promotePattern(e){let t=this.checkPromotion(e);if(!t.shouldPromote)return!1;let r={provenanceTier:t.provenanceTier,allowJudgeTier:this.config.allowJudgeTierPromotion,reward:t.currentReward,rewardThreshold:this.config.promotionRewardThreshold,occurrences:t.currentOccurrences,occurrenceThreshold:this.config.promotionMinOccurrences,successRate:t.currentSuccessRate,successRateThreshold:this.config.promotionMinSuccessRate,withinActivityWindow:t.meetsActivityWindow},a=y("pattern-promote/v1",r),s={ruleVersion:"pattern-promote/v1",ruleFingerprint:_("pattern-promote/v1"),sealedHash:b(r),sealed:r,recordedVerdict:a.promote?"promote":"reject"},o=F(s);return!o.valid||!a.promote?(console.warn(`[PatternLifecycle] Refusing to promote ${e}: ${a.reason} (${o.reason})`),!1):(this.db.prepare(`
|
|
50
50
|
UPDATE qe_patterns
|
|
51
51
|
SET tier = 'long-term',
|
|
52
52
|
promotion_date = datetime('now'),
|
|
@@ -56,7 +56,7 @@ Pattern extracted from ${e.count} successful experiences.`}getProvenanceTier(e){
|
|
|
56
56
|
`).run(e),console.log(`[PatternLifecycle] Promoted pattern ${e} to long-term`),!0)}promoteEligiblePatterns(){let e=this.db.prepare(`
|
|
57
57
|
SELECT id FROM qe_patterns
|
|
58
58
|
WHERE tier = 'short-term' AND deprecated_at IS NULL
|
|
59
|
-
`).all(),t=0;for(let{id:r}of e)this.promotePattern(r)&&t++;return{promoted:t,checked:e.length}}runPromotionSweep(){return this.promoteEligiblePatterns()}checkDeprecation(e){let t=this.getPattern(e);if(!t)return{shouldDeprecate:!1,reason:null};if(t.deprecated_at)return{shouldDeprecate:!1,reason:null};let r=t.consecutive_failures||0;if(r>=this.config.deprecationFailureThreshold)return{shouldDeprecate:!0,reason:"failures",consecutiveFailures:r};let a=t.lastUsedAt instanceof Date?t.lastUsedAt.getTime():new Date(t.lastUsedAt).getTime(),s=(Date.now()-a)/(1e3*60*60*24),o=
|
|
59
|
+
`).all(),t=0;for(let{id:r}of e)this.promotePattern(r)&&t++;return{promoted:t,checked:e.length}}runPromotionSweep(){return this.promoteEligiblePatterns()}checkDeprecation(e){let t=this.getPattern(e);if(!t)return{shouldDeprecate:!1,reason:null};if(t.deprecated_at)return{shouldDeprecate:!1,reason:null};let r=t.consecutive_failures||0;if(r>=this.config.deprecationFailureThreshold)return{shouldDeprecate:!0,reason:"failures",consecutiveFailures:r};let a=t.lastUsedAt instanceof Date?t.lastUsedAt.getTime():new Date(t.lastUsedAt).getTime(),s=(Date.now()-a)/(1e3*60*60*24),o=te(t.successRate,t.usageCount),c=this.config.staleDaysThreshold*(1+o*ee);if(s>=c)return{shouldDeprecate:!0,reason:"stale",daysSinceLastUse:s};if(t.confidence<this.config.minActiveConfidence)return{shouldDeprecate:!0,reason:"low_confidence",currentConfidence:t.confidence};let i=t.createdAt instanceof Date?t.createdAt.getTime():new Date(t.createdAt).getTime(),u=(Date.now()-i)/(1e3*60*60*24);return u>=this.config.maxAgeForActivePatterns&&t.usageCount<5?{shouldDeprecate:!0,reason:"age",ageInDays:u}:{shouldDeprecate:!1,reason:null}}deprecatePattern(e,t){let r=this.checkDeprecation(e);if(!r.shouldDeprecate&&!t)return!1;let a=t||r.reason||"manual";this.db.prepare(`
|
|
60
60
|
UPDATE qe_patterns
|
|
61
61
|
SET deprecated_at = datetime('now'),
|
|
62
62
|
updated_at = datetime('now')
|
|
@@ -77,7 +77,7 @@ Pattern extracted from ${e.count} successful experiences.`}getProvenanceTier(e){
|
|
|
77
77
|
updated_at = datetime('now')
|
|
78
78
|
WHERE deprecated_at IS NULL
|
|
79
79
|
AND datetime(COALESCE(last_used_at, created_at)) < datetime(?, 'unixepoch')
|
|
80
|
-
`).run(this.config.minActiveConfidence,t,
|
|
80
|
+
`).run(this.config.minActiveConfidence,t,Z,H,r/1e3);return{updated:a.changes,decayed:a.changes}}recordUsage(e,t){t?this.db.prepare(`
|
|
81
81
|
UPDATE qe_patterns
|
|
82
82
|
SET usage_count = usage_count + 1,
|
|
83
83
|
successful_uses = successful_uses + 1,
|
|
@@ -147,7 +147,7 @@ Pattern extracted from ${e.count} successful experiences.`}getProvenanceTier(e){
|
|
|
147
147
|
)
|
|
148
148
|
`).get(this.config.deprecationFailureThreshold-1,this.config.minActiveConfidence+.1,this.config.staleDaysThreshold-7);return{totalPatterns:e.total||0,activePatterns:e.active||0,deprecatedPatterns:e.deprecated||0,promotedPatterns:e.promoted||0,shortTermPatterns:e.short_term||0,longTermPatterns:e.long_term||0,avgConfidence:e.avg_confidence||0,avgSuccessRate:e.avg_success_rate||0,patternsNearDeprecation:t.count||0}}getPattern(e){let t=this.db.prepare(`
|
|
149
149
|
SELECT * FROM qe_patterns WHERE id = ?
|
|
150
|
-
`).get(e);return t?this.rowToPattern(t):null}rowToPattern(e){return{id:e.id,patternType:e.pattern_type,qeDomain:e.qe_domain,domain:e.domain,name:e.name,description:e.description||"",confidence:e.confidence,usageCount:e.usage_count,successRate:e.success_rate,qualityScore:e.quality_score,tier:e.tier,template:E(e.template_json||"{}"),context:E(e.context_json||"{}"),createdAt:new Date(e.created_at),lastUsedAt:e.last_used_at?new Date(e.last_used_at):new Date(e.created_at),successfulUses:e.successful_uses,reusable:e.reusable===1,reuseCount:e.reuse_count||0,averageTokenSavings:e.average_token_savings||0,deprecated_at:e.deprecated_at??null,consecutive_failures:e.consecutive_failures??0}}};function
|
|
151
|
-
`),a.push("| Time | Event | Summary |"),a.push("|------|-------|---------|"));for(let s of r){let o=s.timestamp.toISOString().split("T")[1]?.slice(0,8)??"00:00:00",c=
|
|
150
|
+
`).get(e);return t?this.rowToPattern(t):null}rowToPattern(e){return{id:e.id,patternType:e.pattern_type,qeDomain:e.qe_domain,domain:e.domain,name:e.name,description:e.description||"",confidence:e.confidence,usageCount:e.usage_count,successRate:e.success_rate,qualityScore:e.quality_score,tier:e.tier,template:E(e.template_json||"{}"),context:E(e.context_json||"{}"),createdAt:new Date(e.created_at),lastUsedAt:e.last_used_at?new Date(e.last_used_at):new Date(e.created_at),successfulUses:e.successful_uses,reusable:e.reusable===1,reuseCount:e.reuse_count||0,averageTokenSavings:e.average_token_savings||0,deprecated_at:e.deprecated_at??null,consecutive_failures:e.consecutive_failures??0}}};function be(n,e){return new R(n,e)}j();import*as g from"fs";import*as A from"path";var ne={"pattern-learned":"\u{1F9E0}","pattern-promoted":"\u2B06\uFE0F","pattern-quarantined":"\u{1F512}","experience-captured":"\u{1F4F8}","search-performed":"\u{1F50D}","reward-assigned":"\u{1F3AF}"},q=class{config;buffer=[];flushTimer=null;constructor(e){this.config={logDir:e?.logDir??S("logs"),enabled:e?.enabled??!0,maxEntriesPerDay:e?.maxEntriesPerDay??500}}log(e){this.config.enabled&&(this.buffer.push(e),this.buffer.length>=10&&this.flush())}flush(){if(this.buffer.length===0)return;let e=new Date().toISOString().split("T")[0],t=A.join(this.config.logDir,`${e}.md`);try{g.mkdirSync(this.config.logDir,{recursive:!0});let r=this.buffer.splice(0,this.buffer.length),a=[];g.existsSync(t)||(a.push(`# AQE Daily Log \u2014 ${e}
|
|
151
|
+
`),a.push("| Time | Event | Summary |"),a.push("|------|-------|---------|"));for(let s of r){let o=s.timestamp.toISOString().split("T")[1]?.slice(0,8)??"00:00:00",c=ne[s.type]??"\u{1F4DD}",i=s.summary.replace(/\\/g,"\\\\").replace(/\|/g,"\\|").replace(/\n/g," ");a.push(`| ${o} | ${c} ${s.type} | ${i} |`)}g.appendFileSync(t,a.join(`
|
|
152
152
|
`)+`
|
|
153
|
-
`)}catch(r){console.debug("[DailyLog] Write failed:",r)}}getTodayLogPath(){let e=new Date().toISOString().split("T")[0];return A.join(this.config.logDir,`${e}.md`)}dispose(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null)}};export{
|
|
153
|
+
`)}catch(r){console.debug("[DailyLog] Write failed:",r)}}getTodayLogPath(){let e=new Date().toISOString().split("T")[0];return A.join(this.config.logDir,`${e}.md`)}dispose(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null)}};export{be as a,q as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
var e=null,f=null,t=null,u=!1;async function W(){return u&&!t?e:t||(t=(async()=>{try{if(process.env.AQE_RVF_MODE==="sqlite-only"||process.env.AQE_MEMORY_BACKEND==="memory")return null;let{isRvfNativeAvailable:d}=await import("./rvf-native-adapter-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
var e=null,f=null,t=null,u=!1;async function W(){return u&&!t?e:t||(t=(async()=>{try{if(process.env.AQE_RVF_MODE==="sqlite-only"||process.env.AQE_MEMORY_BACKEND==="memory")return null;let{isRvfNativeAvailable:d}=await import("./rvf-native-adapter-O3UQTEBK.js");if(!d())return null;let{getUnifiedMemory:v,findProjectRoot:p}=await import("./unified-memory-EHD4VNFW.js"),o=v().getDatabase();if(!o)return null;let{join:m}=await import("node:path"),g=m(process.env.AQE_PROJECT_ROOT??p(),".agentic-qe","brain.rvf"),{RvfDualWriter:R}=await import("./rvf-dual-writer-JL6T727I.js"),l=new R(o,{rvfPath:g,mode:"dual-write",dimensions:384});await l.initialize(),e=l;try{let{getRvfMigrationStage:y}=await import("./feature-flags-KFHSR5YF.js"),a=y();if(a>=2){let{RvfMigrationAdapter:A}=await import("./rvf-migration-adapter-V7IBDUCS.js"),s=new A({stage:a});s.setSqliteDb(o);let{getSharedRvfAdapter:D}=await import("./shared-rvf-adapter-HX6AHL3P.js"),i=D();if(i){let h={ingest:n=>i.ingest(n),search:(n,M)=>i.search(n,M).map(c=>({id:c.id,score:c.score})),delete:n=>i.delete(n),status:()=>i.status(),close:()=>{}};s.setRvfStore(h)}f=s,console.log(`[RVF] Migration adapter active at stage ${a} (${["sqlite-only","hybrid","dual-sqlite","dual-rvf","rvf-primary"][a]})`)}}catch{}return l}catch(r){return(process.env.DEBUG||process.env.AQE_VERBOSE)&&console.debug("[RVF] Dual-writer init failed, degrading to sqlite-only:",r instanceof Error?r.message:r),null}finally{u=!0,t=null,import("./base-GTB6POYE.js").then(({registerRvfResetFn:r})=>r(w)).catch(()=>{})}})(),t)}function S(){return e}function b(){return f}function w(){if(e){try{e.close()}catch{}e=null}f=null,t=null,u=!1}export{W as a,S as b,b as c,w as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{i as t}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{i as t}from"./chunk-WQ4PYWSW.js";function g(e,n,r,a){return{id:t(),type:e,timestamp:new Date,source:n,correlationId:a,payload:r}}var i={TestGenerated:"test-generation.TestGenerated",TestSuiteCreated:"test-generation.TestSuiteCreated",PatternLearned:"test-generation.PatternLearned",GenerationFailed:"test-generation.GenerationFailed"},o={TestRunStarted:"test-execution.TestRunStarted",TestRunCompleted:"test-execution.TestRunCompleted",FlakyTestDetected:"test-execution.FlakyTestDetected",RetryTriggered:"test-execution.RetryTriggered"};function y(e){return!!e&&typeof e=="object"&&e.measured===!0}var s={CoverageReportCreated:"coverage-analysis.CoverageReportCreated",CoverageGapDetected:"coverage-analysis.CoverageGapDetected",RiskZoneIdentified:"coverage-analysis.RiskZoneIdentified"},d={QualityGateEvaluated:"quality-assessment.QualityGateEvaluated",DeploymentApproved:"quality-assessment.DeploymentApproved",DeploymentBlocked:"quality-assessment.DeploymentBlocked"},l={DefectPredicted:"defect-intelligence.DefectPredicted",RootCauseIdentified:"defect-intelligence.RootCauseIdentified",RegressionRiskAnalyzed:"defect-intelligence.RegressionRiskAnalyzed"},c={KnowledgeGraphUpdated:"code-intelligence.KnowledgeGraphUpdated",ImpactAnalysisCompleted:"code-intelligence.ImpactAnalysisCompleted",SemanticSearchCompleted:"code-intelligence.SemanticSearchCompleted",C4DiagramsGenerated:"code-intelligence.C4DiagramsGenerated"},m={VulnerabilityDetected:"security-compliance.VulnerabilityDetected",ComplianceValidated:"security-compliance.ComplianceValidated",SecurityAuditCompleted:"security-compliance.SecurityAuditCompleted"},p={PatternConsolidated:"learning-optimization.PatternConsolidated",TransferCompleted:"learning-optimization.TransferCompleted",OptimizationApplied:"learning-optimization.OptimizationApplied",DreamCycleCompleted:"learning-optimization.dream.completed"},b={...i,...o,...s,...d,...l,...c,...m,...p};export{g as a,i as b,o as c,y as d,s as e,d as f,l as g,c as h,m as i,p as j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{d as s}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{d as s}from"./chunk-ACWFKES2.js";s();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a as $}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{a as $}from"./chunk-LRZY4KS2.js";import{u as V,v as K}from"./chunk-C522H7XR.js";import{i as q}from"./chunk-WQ4PYWSW.js";import{a as N,c as k,d}from"./chunk-NSHU347M.js";import{a as y,b as M,e as Q}from"./chunk-GHBNRMSJ.js";import{f as H}from"./chunk-OY2AHLSF.js";Q();var v={WorkflowStarted:"workflow.WorkflowStarted",WorkflowCompleted:"workflow.WorkflowCompleted",WorkflowFailed:"workflow.WorkflowFailed",WorkflowCancelled:"workflow.WorkflowCancelled",StepStarted:"workflow.StepStarted",StepCompleted:"workflow.StepCompleted",StepFailed:"workflow.StepFailed",StepSkipped:"workflow.StepSkipped",StepAwaitingApproval:"workflow.StepAwaitingApproval",StepApproved:"workflow.StepApproved",StepRejected:"workflow.StepRejected"},T={maxConcurrentWorkflows:10,defaultStepTimeout:6e4,defaultWorkflowTimeout:6e5,enableEventTriggers:!0,persistExecutions:!0};import{createHash as J}from"node:crypto";function R(s){if(["__proto__","constructor","prototype"].includes(s.id))throw new Error(`parallel_output_invalid_path: unsafe step ID ${s.id}`);let e=[{stepId:s.id,path:s.id,segments:[s.id]}];for(let t of Object.values(s.outputMapping??{}).sort()){let i=t.split(".");if(i.some(r=>!r||["__proto__","constructor","prototype"].includes(r)))throw new Error(`parallel_output_invalid_path: ${s.id} maps to ${t}`);e.push({stepId:s.id,path:t,segments:i})}return e}function j(s){let e=s.flatMap(R),t=[];for(let i=0;i<e.length;i++)for(let r=i+1;r<e.length;r++){let o=e[i],a=e[r];if(o.stepId===a.stepId)continue;let n=Math.min(o.segments.length,a.segments.length);o.segments.slice(0,n).every((c,l)=>c===a.segments[l])&&t.push({pathA:o.path,stepA:o.stepId,pathB:a.path,stepB:a.stepId,kind:o.segments.length===a.segments.length?"exact":"ancestor-descendant"})}return t}function L(s){let e=[];for(let t of s){let i=[...Object.values(t.inputMapping??{}),t.condition?.path,t.skipCondition?.path].filter(r=>typeof r=="string");for(let r of i)for(let o of s){if(o.id===t.id)continue;if(r==="results"){e.push({stepId:t.id,sourcePath:r,otherStepId:o.id});continue}if(!r.startsWith("results."))continue;let a=r.slice(8).split(".");R(o).some(c=>{let l=Math.min(a.length,c.segments.length);return c.segments.slice(0,l).every((f,S)=>f===a[S])})&&e.push({stepId:t.id,sourcePath:r,otherStepId:o.id})}}return e}function x(s,e){if(s===null||typeof s=="string"||typeof s=="boolean")return s;if(typeof s=="number")return["number",String(s)];if(typeof s=="bigint")return["bigint",String(s)];if(s===void 0)return["undefined"];if(typeof s!="object")throw new Error("parallel_output_unhashable");if(e.has(s))throw new Error("parallel_output_cyclic");e.add(s);try{if(s instanceof Date)return["date",s.toISOString()];if(s instanceof ArrayBuffer)return["bytes",Buffer.from(s).toString("base64")];if(ArrayBuffer.isView(s))return["bytes",s.constructor.name,Buffer.from(s.buffer,s.byteOffset,s.byteLength).toString("base64")];if(Array.isArray(s))return["array",s.map(i=>x(i,e))];if(s instanceof Set)return["set",[...s].map(r=>x(r,e)).sort((r,o)=>JSON.stringify(r).localeCompare(JSON.stringify(o)))];if(s instanceof Map)return["map",[...s].map(([r,o])=>[x(r,e),x(o,e)]).sort((r,o)=>JSON.stringify(r).localeCompare(JSON.stringify(o)))];let t=s;return["object",Object.keys(t).sort().map(i=>[i,x(t[i],e)])]}finally{e.delete(s)}}function I(s){let e=JSON.stringify(x(s,new Set));return J("sha256").update(e).digest("hex")}var X="qe-coverage-analysis",O=`(agent_id != '${X}' OR (CASE WHEN json_valid(context_json) THEN json_extract(context_json, '$.measured') END) = 1)`;function P(){try{let{getUnifiedMemory:s}=(K(),H(V)),e=s();return e.isInitialized()?e.getDatabase():null}catch{return null}}var Y={id:"quality-gate-check",domain:"quality-assessment",action:"gate-check",async execute(s){let e=typeof s.coverageMin=="number"?s.coverageMin:80,t=typeof s.testsPassingMin=="number"?s.testsPassingMin:90,i=typeof s.maxBugs=="number"?s.maxBugs:5,r=typeof s.currentCoverage=="number"?s.currentCoverage:null,o=typeof s.currentTestsPassingRate=="number"?s.currentTestsPassingRate:null,a=typeof s.currentBugs=="number"?s.currentBugs:null;if(r===null||o===null||a===null){let b=P();if(b)try{if(r===null){let h=b.prepare(`SELECT after_lines FROM coverage_sessions WHERE ${O} ORDER BY created_at DESC LIMIT 1`).get();r=typeof h?.after_lines=="number"?h.after_lines:null}if(o===null){let h=b.prepare(`SELECT COUNT(*) as total,
|
|
3
3
|
SUM(CASE WHEN passed = 1 THEN 1 ELSE 0 END) as passed
|
|
4
4
|
FROM test_outcomes
|
|
5
5
|
WHERE created_at > datetime('now', '-7 days')`).get();o=h&&h.total>0?h.passed/h.total*100:0}a===null&&(a=b.prepare(`SELECT COUNT(*) as bugs FROM test_outcomes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{a as l}from"./chunk-DBMNJSBV.js";import{i as a}from"./chunk-WQ4PYWSW.js";import{a as m}from"./chunk-NSHU347M.js";var u=class{constructor(t,e){this.eventBus=t;this.maxHistorySize=e?.maxHistorySize??1e4,this.eventHistory=new l(this.maxHistorySize),this.correlationTimeout=e?.correlationTimeout??6e4,this.maxEventsPerCorrelation=e?.maxEventsPerCorrelation??100}eventBus;subscriptions=new Map;correlations=new Map;eventHistory;routes=[];domainSubscriptions=new Map;maxHistorySize;correlationTimeout;maxEventsPerCorrelation;initialized=!1;async initialize(){if(!this.initialized){for(let t of m){let e=this.eventBus.subscribeToChannel(t,async i=>{await this.handleIncomingEvent(i)});this.domainSubscriptions.set(t,e)}this.eventBus.subscribe("*",async t=>{m.includes(t.source)||await this.handleIncomingEvent(t)}),this.initialized=!0}}subscribeToDoamin(t,e){let i=`sub_domain_${a()}`;return this.subscriptions.set(i,{id:i,type:"domain",filter:t,handler:e,active:!0}),i}subscribeToEventType(t,e){let i=`sub_type_${a()}`;return this.subscriptions.set(i,{id:i,type:"eventType",filter:t,handler:e,active:!0}),i}unsubscribe(t){let e=this.subscriptions.get(t);return e?(e.active=!1,this.subscriptions.delete(t),!0):!1}async route(t){this.addToHistory(t),t.correlationId&&this.trackCorrelation(t);let i=this.findMatchingSubscriptions(t).map(async o=>{try{await o.handler(t)}catch(n){console.error(`Error in subscription handler ${o.id}:`,n instanceof Error?n.message:n)}}),r=await this.applyRoutes(t);await Promise.allSettled([...i,...r])}getCorrelation(t){let e=this.correlations.get(t);if(e)return{correlationId:e.correlationId,events:[...e.events],domains:new Set(e.domains),startedAt:e.startedAt,lastEventAt:e.lastEventAt,complete:e.complete}}trackCorrelation(t){if(!t.correlationId)return;let e=this.correlations.get(t.correlationId);e||(e={correlationId:t.correlationId,events:[],domains:new Set,startedAt:t.timestamp,lastEventAt:t.timestamp,complete:!1,timeout:null},this.correlations.set(t.correlationId,e)),e.events.length<this.maxEventsPerCorrelation&&(e.events.push(t),e.domains.add(t.source),e.lastEventAt=t.timestamp),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(()=>{e.complete=!0,e.timeout=null},this.correlationTimeout)}aggregate(t,e){let i=this.eventHistory.toArray().filter(s=>s.timestamp>=t&&s.timestamp<=e),r=new Map,o=new Map;for(let s of i)r.set(s.type,(r.get(s.type)??0)+1),o.set(s.source,(o.get(s.source)??0)+1);let n={totalEvents:i.length,uniqueEventTypes:r.size,uniqueDomains:o.size,eventsPerSecond:i.length>0?i.length/((e.getTime()-t.getTime())/1e3):0};return{id:a(),windowStart:t,windowEnd:e,events:i,countByType:r,countByDomain:o,metrics:n}}getHistory(t){let e=this.eventHistory.toArray();return t&&(t.eventTypes?.length&&(e=e.filter(i=>t.eventTypes.includes(i.type))),t.domains?.length&&(e=e.filter(i=>t.domains.includes(i.source))),t.fromTimestamp&&(e=e.filter(i=>i.timestamp>=t.fromTimestamp)),t.toTimestamp&&(e=e.filter(i=>i.timestamp<=t.toTimestamp)),t.limit&&(e=e.slice(-t.limit))),e}addRoute(t){let e=t.priority??0,i=this.routes.findIndex(r=>(r.priority??0)<e);i===-1?this.routes.push(t):this.routes.splice(i,0,t)}removeRoute(t,e){let i=this.routes.findIndex(r=>r.eventPattern===t&&(e===void 0||r.source===e));return i!==-1?(this.routes.splice(i,1),!0):!1}async dispose(){this.subscriptions.clear();for(let t of this.domainSubscriptions.values())t.unsubscribe();this.domainSubscriptions.clear();for(let t of this.correlations.values())t.timeout&&clearTimeout(t.timeout);this.correlations.clear(),this.eventHistory.clear(),this.initialized=!1}async handleIncomingEvent(t){await this.route(t)}findMatchingSubscriptions(t){let e=[];for(let i of this.subscriptions.values())i.active&&(i.type==="domain"&&i.filter===t.source||i.type==="eventType"&&this.matchEventType(t.type,i.filter))&&e.push(i);return e}matchEventType(t,e){if(e==="*")return!0;let i=e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${i}$`).test(t)}async applyRoutes(t){let e=[];for(let i of this.routes){if(!(i.source==="*"||i.source===t.source||Array.isArray(i.source)&&i.source.includes(t.source))||!this.matchEventType(t.type,i.eventPattern)||i.filter&&!i.filter(t))continue;let o=i.transform?i.transform(t):t;for(let n of i.targets)n!==t.source&&e.push(this.eventBus.publish({...o,id:a(),correlationId:t.correlationId??t.id}))}return e}addToHistory(t){this.eventHistory.push(t)}};function y(c,t){return new u(c,t)}export{u as a,y as b};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{a as O,b as j}from"./chunk-7ZCDZHDB.js";import{d as A,e as G}from"./chunk-BQUAE3CP.js";import{e as T,f as N,j as R,k as I,q as J}from"./chunk-2XGVTYVX.js";import{b as S,e as z}from"./chunk-GHBNRMSJ.js";import{b as g}from"./chunk-OY2AHLSF.js";import{createRequire as k}from"node:module";import{existsSync as W}from"node:fs";import{dirname as K,join as V}from"node:path";function B(i,e){return A(i,e,{cwd:process.cwd(),timeout:5e3})}function X(i=process.platform,e=process.execPath,t=W){return O("npm",i,e,t)??["npm",[]]}async function F(){try{return x.resolve("vibium")}catch{try{return k(V(process.cwd(),"package.json")).resolve("vibium")}catch{}let[i,e]=X(),t=(await B(i,[...e,"root","-g"])).trim();return x.resolve(V(t,"vibium"))}}function Y(i){return typeof i?.browser?.start=="function"?i:typeof i?.default?.browser?.start=="function"?i.default:null}async function _(){let i;try{i=await import("vibium")}catch(t){if(t.code!=="ERR_MODULE_NOT_FOUND"&&t.code!=="MODULE_NOT_FOUND")throw t;let r;try{r=await F()}catch(s){throw new Error(`Vibium is not installed; run ${l}`,{cause:s})}i=x(r)}let e=Y(i);if(!e)throw new Error(`Unsupported Vibium API: the installed package exposes no browser.start() (neither as a named nor a default export); run ${l}`);return e}async function P(){try{let i=V(K(await F()),"..","bin","cli.js");return await B(process.execPath,[i,"is-installed"]),!0}catch{return!1}}var l,x,M=g(()=>{"use strict";j();G();l="aqe init --browser-engine (or npm install vibium@^26.8.21)",x=k(import.meta.url)});var U,$=g(()=>{"use strict";U={enabled:!0,headless:!0,timeout:3e4,retryAttempts:3,fallbackEnabled:!0,browserType:"chromium",viewport:{width:1280,height:720},userAgent:"",devtools:!1,slowMo:0,screenshotDir:".agentic-qe/screenshots"}});function Q(i){return i instanceof o}function a(i,e="Unknown Vibium error"){return Q(i)?i:i instanceof Error?new o(i.message||e,"UNKNOWN_ERROR",i):new o(typeof i=="string"?i:e,"UNKNOWN_ERROR")}var o,m,p,v,b,w,d,f,D=g(()=>{"use strict";o=class i extends Error{constructor(t,r,s){super(t);this.code=r;this.cause=s;this.name="VibiumError",Error.captureStackTrace&&Error.captureStackTrace(this,i),s?.stack&&(this.stack+=`
|
|
3
|
+
Caused by: ${s.stack}`)}code;cause},m=class extends o{constructor(e="Vibium MCP server is unavailable",t){super(e,"VIBIUM_UNAVAILABLE",t),this.name="VibiumUnavailableError"}},p=class extends o{constructor(e="Browser operation timed out",t){super(e,"VIBIUM_TIMEOUT",t),this.name="VibiumTimeoutError"}},v=class extends o{selector;constructor(e,t){super(`Element not found: ${e}`,"ELEMENT_NOT_FOUND",t),this.name="VibiumElementNotFoundError",this.selector=e}},b=class extends o{constructor(e="Failed to connect to browser",t){super(e,"CONNECTION_ERROR",t),this.name="VibiumConnectionError"}},w=class extends o{url;statusCode;constructor(e,t,r){let s=t?`Navigation failed: ${e} (HTTP ${t})`:`Navigation failed: ${e}`;super(s,"NAVIGATION_ERROR",r),this.name="VibiumNavigationError",this.url=e,this.statusCode=t}},d=class extends o{constructor(e="Failed to capture screenshot",t){super(e,"SCREENSHOT_ERROR",t),this.name="VibiumScreenshotError"}},f=class extends o{action;selector;constructor(e,t,r){super(`Failed to ${e} element: ${t}`,"INTERACTION_ERROR",r),this.name="VibiumInteractionError",this.action=e,this.selector=t}}});import{randomUUID as Z}from"crypto";async function C(){if(E!==null)return E;try{return E=(await _()).browser,L=!0,E}catch(i){return console.warn("[Vibium] Failed to load vibium package:",i),L=!1,null}}async function H(i,e,t){let r;for(let s=1;s<=e;s++)try{return await i()}catch(n){if(r=S(n),s<e){let u=Math.min(100*Math.pow(2,s-1),2e3);await new Promise(c=>setTimeout(c,u))}}throw new o(`${t} failed after ${e} attempts`,"RETRY_EXHAUSTED",r)}async function h(i,e){let t=Date.now();try{let r=await i();return I()&&console.log(`[Vibium] ${e}: ${Date.now()-t}ms`),r}catch(r){throw I()&&console.log(`[Vibium] ${e} failed: ${Date.now()-t}ms`,r),r}}var E,L,y,q,ee=g(()=>{M();$();D();z();J();E=null,L=!1;y=class{config;currentSession=null;lastHealthCheck=null;_initialized=!1;_available=null;vibeInstance=null;browserInstance=null;constructor(e={}){this.config={...U,...e}}async isAvailable(){if(!this.config.enabled)return!1;if(this._available!==null)return this._available;try{let e=await C();return this._available=e!==null&&await P(),this._available}catch{return this._available=!1,!1}}async getHealth(){let e=new Date;if(!this.config.enabled)return{status:"unavailable",features:["fallback-only"],lastChecked:e,error:"Vibium is disabled by configuration",sessionActive:!1};try{await this.isAvailable()?this.lastHealthCheck={status:this.vibeInstance?"connected":"disconnected",browserType:this.config.browserType,features:["browser-launch","navigation","element-interaction","screenshots","script-evaluation","accessibility-testing"],latencyMs:10,lastChecked:e,sessionActive:this.vibeInstance!==null}:this.lastHealthCheck={status:"unavailable",features:["fallback-only"],lastChecked:e,error:`Vibium runtime or browser payload unavailable; run ${l}`,sessionActive:!1}}catch(t){this.lastHealthCheck={status:"error",features:["fallback-only"],lastChecked:e,error:t instanceof Error?t.message:"Unknown error",sessionActive:!1}}return this.lastHealthCheck}async getSession(){return this.currentSession}async launch(e){if(!T())return{success:!1,error:new m("Browser mode is disabled by feature flags")};let t=async()=>{let r=await C();if(!r)throw new m(`Vibium runtime unavailable; run ${l}`);let s=e?.headless??this.config.headless;if(!await P())throw new m(`Vibium browser payload unavailable; run ${l}`);let n=await r.start({headless:s});try{this.vibeInstance=await n.page(),this.browserInstance=n}catch(c){throw await n.stop(),c}let u={id:this.generateSessionId(),browserType:this.config.browserType,launchedAt:new Date,status:"connected",viewport:e?.viewport??this.config.viewport,headless:s};return this.currentSession=u,u};try{return{success:!0,value:R()?await H(()=>h(t,"browser_launch"),this.config.retryAttempts,"browser_launch"):await h(t,"browser_launch")}}catch(r){return{success:!1,error:a(r,"Failed to launch browser")}}}async quit(){if(!this.vibeInstance)return{success:!1,error:new b("No active browser session")};let e=async()=>{this.vibeInstance&&(await this.browserInstance?.stop(),this.vibeInstance=null,this.browserInstance=null),this.currentSession=null};try{return await h(e,"browser_quit"),{success:!0,value:void 0}}catch(t){return{success:!1,error:a(t,"Failed to quit browser")}}}async navigate(e){this.ensureSession();let t=async()=>{let r=Date.now();await this.vibeInstance.go(e.url);let s="";try{s=await this.vibeInstance.evaluate("document.title")}catch{s="Unknown"}let n={url:e.url,statusCode:200,title:s,durationMs:Date.now()-r,success:!0};return this.currentSession&&(this.currentSession.currentUrl=e.url),n};try{return{success:!0,value:R()?await H(()=>h(t,"page_navigate"),this.config.retryAttempts,"page_navigate"):await h(t,"page_navigate")}}catch(r){return{success:!1,error:new w(e.url,void 0,r instanceof Error?r:void 0)}}}async getPageInfo(){this.ensureSession();try{let e=await this.vibeInstance.evaluate("window.location.href"),t=await this.vibeInstance.evaluate("document.title");return{success:!0,value:{url:e,title:t,viewport:this.config.viewport,loadState:"loaded"}}}catch(e){return{success:!1,error:a(e,"Failed to get page info")}}}async goBack(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.history.back()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to go back")}}}async goForward(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.history.forward()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to go forward")}}}async reload(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.location.reload()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to reload page")}}}async findElement(e){this.ensureSession();try{let t=await this.vibeInstance.find(e.selector,{timeout:e.timeout??this.config.timeout});return{success:!0,value:{selector:e.selector,tagName:t.info.tag,textContent:t.info.text,attributes:{},boundingBox:t.info.box,visible:!0,enabled:!0}}}catch(t){return{success:!1,error:new v(e.selector,t instanceof Error?t:void 0)}}}async findElements(e){this.ensureSession();try{let t=e.selector.replace(/\\/g,"\\\\").replace(/'/g,"\\'");return{success:!0,value:(await this.vibeInstance.evaluate(`
|
|
4
|
+
Array.from(document.querySelectorAll('${t}'))
|
|
5
|
+
.map(el => ({
|
|
6
|
+
tag: el.tagName.toLowerCase(),
|
|
7
|
+
text: el.textContent?.trim() || ''
|
|
8
|
+
}))
|
|
9
|
+
`)).map((n,u)=>({selector:`${e.selector}:nth-child(${u+1})`,tagName:n.tag,textContent:n.text,attributes:{},visible:!0,enabled:!0}))}}catch(t){return{success:!1,error:a(t,"Failed to find elements")}}}async click(e){this.ensureSession();let t=Date.now();try{return await(await this.vibeInstance.find(e.selector,{timeout:e.timeout??this.config.timeout})).click({timeout:e.timeout??this.config.timeout}),{success:!0,value:{success:!0,durationMs:Date.now()-t}}}catch(r){return{success:!1,error:new f("click",e.selector,r instanceof Error?r:void 0)}}}async type(e){this.ensureSession();let t=Date.now();try{let r=await this.vibeInstance.find(e.selector,{timeout:e.timeout??this.config.timeout});if(e.clear){let n=e.selector.replace(/\\/g,"\\\\").replace(/'/g,"\\'");await this.vibeInstance.evaluate(`
|
|
10
|
+
const el = document.querySelector('${n}');
|
|
11
|
+
if (el) el.value = '';
|
|
12
|
+
`)}return await r.type(e.text,{timeout:e.timeout??this.config.timeout}),{success:!0,value:{success:!0,durationMs:Date.now()-t}}}catch(r){return{success:!1,error:new f("type",e.selector,r instanceof Error?r:void 0)}}}async getText(e){this.ensureSession();try{return{success:!0,value:await(await this.vibeInstance.find(e)).text()}}catch(t){return{success:!1,error:a(t,`Failed to get text from ${e}`)}}}async getAttribute(e,t){this.ensureSession();try{return{success:!0,value:await(await this.vibeInstance.find(e)).getAttribute(t)??""}}catch(r){return{success:!1,error:a(r,`Failed to get attribute ${t} from ${e}`)}}}async waitForElement(e,t){this.ensureSession();try{let r=await this.vibeInstance.find(e,{timeout:t?.timeout??this.config.timeout});return{success:!0,value:{selector:e,tagName:r.info.tag,textContent:r.info.text,attributes:{},boundingBox:r.info.box,visible:!0,enabled:!0}}}catch(r){return{success:!1,error:new p(`Element ${e} not found within timeout`,r instanceof Error?r:void 0)}}}async screenshot(e){if(this.ensureSession(),!N())return{success:!1,error:new d("Screenshot capture is disabled by feature flags")};try{let t=await this.vibeInstance.screenshot(),r=t.toString("base64");return e?.path&&await(await import("fs/promises")).writeFile(e.path,t),{success:!0,value:{base64:e?.path?void 0:r,path:e?.path,format:e?.format??"png",dimensions:this.config.viewport,sizeBytes:t.length,capturedAt:new Date}}}catch(t){return{success:!1,error:new d("Failed to capture screenshot",t instanceof Error?t:void 0)}}}async compareScreenshots(e,t,r=.01){try{let s=await import("fs/promises"),n=await s.readFile(e),u=await s.readFile(t),c=n.equals(u);return{success:!0,value:{matches:c,differencePercent:c?0:100,diffRegions:[],comparedAt:new Date}}}catch(s){return{success:!1,error:a(s,"Failed to compare screenshots")}}}async evaluate(e,t){this.ensureSession();try{return{success:!0,value:await this.vibeInstance.evaluate(`(async () => { ${e} })()`)}}catch(r){return{success:!1,error:a(r,"Failed to evaluate script")}}}async checkAccessibility(e){return this.ensureSession(),{success:!1,error:new o("Use axe-core-integration module for accessibility testing. Call injectAxeCore() then runAxeAudit() using client.evaluate().","USE_AXE_CORE_INTEGRATION")}}async initialize(){await C(),this._initialized=!0}async dispose(){if(this.vibeInstance){try{await this.browserInstance?.stop()}catch(e){console.debug("[VibiumClient] Disposal error:",e instanceof Error?e.message:e)}this.vibeInstance=null,this.browserInstance=null}this.currentSession=null,this._initialized=!1,this._available=null}ensureSession(){if(!this.vibeInstance)throw new b("No active browser session. Call launch() first.")}generateSessionId(){return`vibium-session-${Date.now()}-${Z().slice(0,9)}`}},q=class i{static instance=null;client=null;config;constructor(e={}){this.config=e}static getInstance(e){return i.instance||(i.instance=new i(e)),i.instance}static resetInstance(){i.instance?.client&&i.instance.client.dispose(),i.instance=null}async getClient(){return this.client||(this.client=new y(this.config),await this.client.initialize()),this.client}getClientSync(){return this.client||(this.client=new y(this.config)),this.client}getConfig(){return{...this.config}}configure(e){this.config={...this.config,...e},this.client&&(this.client.dispose(),this.client=null)}async dispose(){this.client&&(await this.client.dispose(),this.client=null)}}});export{$ as a,D as b,y as c,q as d,ee as e};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.10");process.exit(0)}
|
|
2
|
+
import{b as f,d as p}from"./chunk-WSF24I3D.js";import{b as y}from"./chunk-OY2AHLSF.js";function D(n){return n.replace(h,(i,e,r,t)=>m(r)?`${e}${r}${e}${t}${e}<REDACTED:sensitive-key>${e}`:i)}function m(n){let i=n.toLowerCase().replace(/[^a-z0-9]/g,"");return k.has(i)||l.some(e=>i.endsWith(e))}function a(n,i=E.maxStringLength){if(typeof n!="string")return R(n);if(n.length>b)return`[REDACTED:size-limit ${n.length} chars]`;let e=n;for(let[r,t]of S)e=e.replace(r,t);return e=D(e),e=f(e,"balanced").text,e.length>i?`${e.slice(0,i)}\u2026[truncated ${e.length-i} chars]`:e}function d(n,i={}){return g(n,{...E,...i},0,[])}function R(n){try{if(n instanceof Error){let i=a(n.stack||`${n.name}: ${n.message}`),e=n.cause;for(let r=0;e!==void 0&&r<3;r++)i+=`
|
|
3
|
+
Caused by: ${e instanceof Error?a(e.stack||`${e.name}: ${e.message}`):JSON.stringify(d(e,{maxDepth:3}))}`,e=e instanceof Error?e.cause:void 0;return i}return typeof n=="string"?a(n):JSON.stringify(d(n,{maxDepth:3}))??String(n)}catch{return"[REDACTED:sanitization-failed]"}}function g(n,i,e,r){try{if(n==null||typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return a(n,i.maxStringLength);if(typeof n=="bigint"||typeof n=="symbol")return n.toString();if(typeof n=="function")return"[function]";let t=n;if(r.includes(t))return"[circular]";if(e>=i.maxDepth)return"[object]";if(ArrayBuffer.isView(t))return`[binary ${t.byteLength} bytes]`;if(t instanceof ArrayBuffer)return`[binary ${t.byteLength} bytes]`;if(t instanceof Date)return Number.isNaN(t.getTime())?"[invalid date]":t.toISOString();if(t instanceof Map||t instanceof Set)return`[${t.constructor.name}(${t.size})]`;let o=[...r,t];if(Array.isArray(t)){let s=t.slice(0,i.maxEntries).map(c=>g(c,i,e+1,o));return t.length>i.maxEntries&&s.push(`[+${t.length-i.maxEntries} more]`),s}return t instanceof Error?x(t,i,e,o):A(t,Object.keys(t),i,e,o)}catch{return"[REDACTED:sanitization-failed]"}}function x(n,i,e,r){let t={name:a(String(n.name),i.maxStringLength),message:a(String(n.message),i.maxStringLength)};typeof n.stack=="string"&&(t.stack=a(n.stack,i.maxStringLength));let o=n.code;(typeof o=="string"||typeof o=="number")&&(t.code=o);let s=n.cause;return s!==void 0&&(t.cause=g(s,i,e+1,r)),t}function A(n,i,e,r,t){let o={};for(let s of i.slice(0,e.maxEntries)){let c=Object.getOwnPropertyDescriptor(n,s);if(!c)continue;if(!("value"in c)){o[s]="[getter]";continue}let u=c.value;if(m(s)&&u!==null&&u!==void 0&&typeof u!="boolean"){o[s]="[REDACTED:sensitive-key]";continue}o[s]=g(u,e,r+1,t)}return i.length>e.maxEntries&&(o["[truncated]"]=`${i.length-e.maxEntries} more keys`),o}var E,b,k,l,S,h,$=y(()=>{"use strict";p();E={maxDepth:6,maxEntries:100,maxStringLength:8192},b=1e6,k=new Set(["auth","dsn","pwd","proxyauthorization","setcookie","sessionid"]),l=["token","secret","password","passwd","passphrase","apikey","privatekey","accesskey","secretkey","credential","credentials","cookie","authorization","sessionid","connectionstring"],S=[[/(:\/\/)[^\s/@:"']*:[^\s/@"']+@/g,"$1<REDACTED:credentials>@"],[/\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi,"$1 <REDACTED:credential>"],[/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{16,}/g,"<REDACTED:api_key>"],[/\b(set-cookie|cookie):\s*[^\n]+/gi,"$1: <REDACTED:cookie>"],[/\b([A-Za-z0-9_-]{0,64}?[_-](?:token|secret|password|passwd))=([^\s&"'#]+)/gi,"$1=<REDACTED:credential>"]],h=/(["'])([A-Za-z0-9_.-]{1,64})\1(\s*:\s*)("(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?|-?\d[\d.eE+-]*)/g});export{a,d as b,R as c,$ as d};
|