agentic-qe 3.15.6 → 3.15.8

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.
Files changed (441) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +263 -0
  3. package/README.md +2 -0
  4. package/assets/skills/skills-manifest.json +1 -1
  5. package/dist/cli/bundle.js +8 -6
  6. package/dist/cli/chunks/adapter-FC4EY447.js +2 -0
  7. package/dist/cli/chunks/{agent-booster-wasm-SY7UCLBL.js → agent-booster-wasm-W3V5P7LE.js} +2 -2
  8. package/dist/cli/chunks/{agent-handler-KAMYBU3S.js → agent-handler-2NQFHAWE.js} +2 -2
  9. package/dist/cli/chunks/{agent-memory-branch-2CAW3KUM.js → agent-memory-branch-457ECHHK.js} +2 -2
  10. package/dist/cli/chunks/aqe-learning-engine-AUAL6UBL.js +2 -0
  11. package/dist/cli/chunks/{arena-QCCVIOAH.js → arena-IYBQ3GPY.js} +4 -4
  12. package/dist/cli/chunks/{arena-4OFLJ3R2.js → arena-JV3WSEHU.js} +2 -2
  13. package/dist/cli/chunks/{audit-RBDQJQJB.js → audit-5OS3T3K6.js} +3 -3
  14. package/dist/cli/chunks/base-2XML4WH7.js +2 -0
  15. package/dist/cli/chunks/{better-sqlite3-5JRACCDQ.js → better-sqlite3-IQKBFVAO.js} +2 -2
  16. package/dist/cli/chunks/{brain-handler-W4QIIRT4.js → brain-handler-KA3SGAFM.js} +3 -3
  17. package/dist/cli/chunks/{branch-enumerator-IBNGI572.js → branch-enumerator-QZDU2VOQ.js} +2 -2
  18. package/dist/cli/chunks/{browser-GMSCVAOI.js → browser-ZL7OLKJQ.js} +2 -2
  19. package/dist/cli/chunks/browser-workflow-2IFEUAAK.js +2 -0
  20. package/dist/cli/chunks/{chunk-6HWARQWV.js → chunk-22DOS3PM.js} +2 -2
  21. package/dist/cli/chunks/{chunk-VCONCVSY.js → chunk-2DPHFCMW.js} +2 -2
  22. package/dist/cli/chunks/{chunk-ALCIUWFC.js → chunk-2GSAAUW3.js} +1 -1
  23. package/dist/cli/chunks/{chunk-AX26QJ6T.js → chunk-2JCLACCS.js} +2 -2
  24. package/dist/cli/chunks/{chunk-7XTANLTN.js → chunk-2QRGIEQV.js} +1 -1
  25. package/dist/cli/chunks/{chunk-MP3FSUNB.js → chunk-2UN4JOTN.js} +2 -2
  26. package/dist/cli/chunks/{chunk-CR66HNAE.js → chunk-2ZRNXEVI.js} +1 -1
  27. package/dist/cli/chunks/{chunk-WKDWRRDT.js → chunk-3LFLO2WK.js} +2 -2
  28. package/dist/cli/chunks/{chunk-QLYO3H7E.js → chunk-3N627QRU.js} +2 -2
  29. package/dist/cli/chunks/{chunk-VVF337SV.js → chunk-4C3RYBTT.js} +2 -2
  30. package/dist/cli/chunks/{chunk-MQCTLTGE.js → chunk-4C7KE2EL.js} +2 -2
  31. package/dist/cli/chunks/{chunk-AUN4FG7V.js → chunk-4GUVVGJX.js} +1 -1
  32. package/dist/cli/chunks/{chunk-ZOUEQ6DL.js → chunk-4GYFONJB.js} +1 -1
  33. package/dist/cli/chunks/{chunk-24ZSGYC6.js → chunk-4I35ARWW.js} +1 -1
  34. package/dist/cli/chunks/{chunk-6MXAJBEA.js → chunk-4NTLGGXO.js} +1 -1
  35. package/dist/cli/chunks/{chunk-EF5UHDCG.js → chunk-4TZLZRZ4.js} +1 -1
  36. package/dist/cli/chunks/{chunk-RD5BYLN7.js → chunk-4YUBWU3E.js} +1 -1
  37. package/dist/cli/chunks/{chunk-7TVIX4WL.js → chunk-52YRSWPS.js} +2 -2
  38. package/dist/cli/chunks/{chunk-LAY7NCQK.js → chunk-5DZDLOY6.js} +3 -3
  39. package/dist/cli/chunks/{chunk-34MDMFET.js → chunk-5MBNRTT5.js} +2 -2
  40. package/dist/cli/chunks/{chunk-VAYZ5QIE.js → chunk-5ONJ7AV6.js} +1 -1
  41. package/dist/cli/chunks/{chunk-RV6HSMKJ.js → chunk-5YOO5QSE.js} +1 -1
  42. package/dist/cli/chunks/{chunk-BUTGIVKW.js → chunk-62T7U25U.js} +1 -1
  43. package/dist/cli/chunks/{chunk-66NW3ZB4.js → chunk-6CKTLVYV.js} +2 -2
  44. package/dist/cli/chunks/{chunk-TUDENMAE.js → chunk-6E7EOHMN.js} +2 -2
  45. package/dist/cli/chunks/{chunk-GVRFSXY6.js → chunk-6GIC2263.js} +2 -2
  46. package/dist/cli/chunks/{chunk-KIDOBLUO.js → chunk-767SR7WH.js} +2 -2
  47. package/dist/cli/chunks/{chunk-NBUXM5X6.js → chunk-7C6FMLQR.js} +2 -2
  48. package/dist/cli/chunks/{chunk-4POOJYXA.js → chunk-7CVMT64N.js} +1 -1
  49. package/dist/cli/chunks/{chunk-R363XXGH.js → chunk-7DHSHD5B.js} +2 -2
  50. package/dist/cli/chunks/{chunk-IEPWO4XP.js → chunk-7H3GNRNA.js} +2 -2
  51. package/dist/cli/chunks/{chunk-DQNUPEY5.js → chunk-7SLEUVPZ.js} +2 -2
  52. package/dist/cli/chunks/{chunk-YNG7E26C.js → chunk-7XGM7Q2N.js} +2 -2
  53. package/dist/cli/chunks/{chunk-5MT7DMD7.js → chunk-A2UGPKCS.js} +2 -2
  54. package/dist/cli/chunks/{chunk-2CIDFR2H.js → chunk-A6GCO6ZU.js} +2 -2
  55. package/dist/cli/chunks/{chunk-XFPQIWEH.js → chunk-BEVWCF3Q.js} +3 -3
  56. package/dist/cli/chunks/{chunk-LCCTJ2PC.js → chunk-BLZEOGQE.js} +2 -2
  57. package/dist/cli/chunks/{chunk-6R3FBFCJ.js → chunk-BQUIZ5QT.js} +2 -2
  58. package/dist/cli/chunks/{chunk-ZUTFHGEO.js → chunk-BTMEOZYY.js} +1 -1
  59. package/dist/cli/chunks/{chunk-FU7LNUD7.js → chunk-CDLG3Q2O.js} +2 -2
  60. package/dist/cli/chunks/{chunk-NYS2GUNO.js → chunk-CQ3SBRDP.js} +2 -2
  61. package/dist/cli/chunks/chunk-CQ5G64EA.js +3 -0
  62. package/dist/cli/chunks/{chunk-JCE76MPP.js → chunk-CRUQ6RXU.js} +2 -2
  63. package/dist/cli/chunks/{chunk-XBFQJZWX.js → chunk-D4IBIMWI.js} +2 -2
  64. package/dist/cli/chunks/{chunk-LZWJ5BMP.js → chunk-D4O3TJI7.js} +2 -2
  65. package/dist/cli/chunks/{chunk-AUOSHM63.js → chunk-DAFMHM64.js} +2 -2
  66. package/dist/cli/chunks/{chunk-V3OLS2NG.js → chunk-DCYUHCPK.js} +2 -2
  67. package/dist/cli/chunks/{chunk-F7A2UBZO.js → chunk-DKFSCJEF.js} +2 -2
  68. package/dist/cli/chunks/{chunk-5LST62QR.js → chunk-DN3AKAPY.js} +2 -2
  69. package/dist/cli/chunks/{chunk-OQ4S6B7P.js → chunk-DY37YMMQ.js} +1 -1
  70. package/dist/cli/chunks/{chunk-XQ53PZEF.js → chunk-EUVSSIGR.js} +3 -3
  71. package/dist/cli/chunks/{chunk-6WOZUSSN.js → chunk-FAYXES7R.js} +2 -2
  72. package/dist/cli/chunks/{chunk-GNYOHZVV.js → chunk-FEN2DHFM.js} +1 -1
  73. package/dist/cli/chunks/{chunk-BAYGQRNP.js → chunk-FEPFXXI7.js} +2 -2
  74. package/dist/cli/chunks/{chunk-DLSFT6PO.js → chunk-FJAO4UX2.js} +2 -2
  75. package/dist/cli/chunks/{chunk-22OZIJAD.js → chunk-FWXNFPLS.js} +2 -2
  76. package/dist/cli/chunks/{chunk-X33F7NXH.js → chunk-G6CLO74Q.js} +3 -3
  77. package/dist/cli/chunks/{chunk-HAN4MS5T.js → chunk-G77Q22EN.js} +2 -2
  78. package/dist/cli/chunks/{chunk-5DH5QI7G.js → chunk-GENNJRNK.js} +3 -3
  79. package/dist/cli/chunks/{chunk-LMAEMVPA.js → chunk-GGSTLKY5.js} +1 -1
  80. package/dist/cli/chunks/{chunk-EJ4KZFZN.js → chunk-GSOK4M6V.js} +1 -1
  81. package/dist/cli/chunks/{chunk-DA7DGDTI.js → chunk-HI6OBDDY.js} +2 -2
  82. package/dist/cli/chunks/{chunk-XZ46CI35.js → chunk-HNGNRIZZ.js} +2 -2
  83. package/dist/cli/chunks/{chunk-CLAMMGY3.js → chunk-HXCGV5UJ.js} +2 -2
  84. package/dist/cli/chunks/{chunk-5UPIL62W.js → chunk-I4U7YCXG.js} +3 -3
  85. package/dist/cli/chunks/{chunk-RFDFET3O.js → chunk-I77D65X5.js} +2 -2
  86. package/dist/cli/chunks/{chunk-HEGGV2PT.js → chunk-IJSFZO7P.js} +2 -2
  87. package/dist/cli/chunks/{chunk-GWM4M5NF.js → chunk-IMSRWNWF.js} +1 -1
  88. package/dist/cli/chunks/{chunk-B7RHBKHL.js → chunk-J6LL25QJ.js} +2 -2
  89. package/dist/cli/chunks/{chunk-KYVIOC3C.js → chunk-J7FLNP5L.js} +2 -2
  90. package/dist/cli/chunks/{chunk-YLNYPQDR.js → chunk-J7RCI25Q.js} +1 -1
  91. package/dist/cli/chunks/{chunk-72MQCZSM.js → chunk-JFWQFB3S.js} +2 -2
  92. package/dist/cli/chunks/{chunk-SV5BUYHH.js → chunk-JLTGO5BB.js} +2 -2
  93. package/dist/cli/chunks/{chunk-CCL436IU.js → chunk-JWPYMRIX.js} +14 -6
  94. package/dist/cli/chunks/{chunk-ONPPBLRB.js → chunk-K4N2MBCE.js} +2 -2
  95. package/dist/cli/chunks/{chunk-7SAMMQVS.js → chunk-K5R3WUJP.js} +1 -1
  96. package/dist/cli/chunks/{chunk-GI5HWS4H.js → chunk-KITKQUBX.js} +1 -1
  97. package/dist/cli/chunks/{chunk-7TJZDRDU.js → chunk-KJNUETCB.js} +1 -1
  98. package/dist/cli/chunks/{chunk-JYKQVYX2.js → chunk-KMVFBYJO.js} +2 -2
  99. package/dist/cli/chunks/{chunk-ZSBD4FUX.js → chunk-KMZW2P3R.js} +2 -2
  100. package/dist/cli/chunks/{chunk-PEMSXSP2.js → chunk-KNHLOANK.js} +2 -2
  101. package/dist/cli/chunks/{chunk-47Q7JL3V.js → chunk-KNQUHGNY.js} +2 -2
  102. package/dist/cli/chunks/{chunk-A7ANPS4E.js → chunk-KVMKYUOE.js} +2 -2
  103. package/dist/cli/chunks/{chunk-XBEI2JBA.js → chunk-LHRVSK44.js} +2 -2
  104. package/dist/cli/chunks/{chunk-AJT3XDRD.js → chunk-LPSMVBB3.js} +2 -2
  105. package/dist/cli/chunks/{chunk-ORBODZSO.js → chunk-LVHZK7GW.js} +2 -2
  106. package/dist/cli/chunks/{chunk-ZTB32K5N.js → chunk-LZWBUVCK.js} +3 -3
  107. package/dist/cli/chunks/{chunk-OPDZBRIL.js → chunk-MMY52Y6R.js} +2 -2
  108. package/dist/cli/chunks/{chunk-MQTA6KIO.js → chunk-MUDBF2JC.js} +1 -1
  109. package/dist/cli/chunks/{chunk-GFB6BZWU.js → chunk-MV4S3TEC.js} +2 -2
  110. package/dist/cli/chunks/{chunk-UB6DQGWM.js → chunk-NF63NHJH.js} +2 -2
  111. package/dist/cli/chunks/{chunk-D5N2O5EH.js → chunk-NHOMVBCI.js} +2 -2
  112. package/dist/cli/chunks/{chunk-3NJ7O3OH.js → chunk-NLYUC63R.js} +2 -2
  113. package/dist/cli/chunks/{chunk-4CLDYT36.js → chunk-NQDYOF35.js} +2 -2
  114. package/dist/cli/chunks/{chunk-ORFL3YXB.js → chunk-NW7HTOSN.js} +2 -2
  115. package/dist/cli/chunks/{chunk-FQ5N666N.js → chunk-NWFBF3KT.js} +1 -1
  116. package/dist/cli/chunks/{chunk-P7DXVL2S.js → chunk-NZATJ2C6.js} +2 -2
  117. package/dist/cli/chunks/{chunk-HOEWMEF2.js → chunk-O4RRVTXN.js} +2 -2
  118. package/dist/cli/chunks/{chunk-4KOVHQXK.js → chunk-OCLAMZJG.js} +2 -2
  119. package/dist/cli/chunks/{chunk-TLUIO37P.js → chunk-OJWEZYLR.js} +2 -2
  120. package/dist/cli/chunks/{chunk-A74J23QB.js → chunk-OWBFVAEH.js} +2 -2
  121. package/dist/cli/chunks/{chunk-6T6AHVLF.js → chunk-P2EA62YS.js} +1 -1
  122. package/dist/cli/chunks/{chunk-TL5GV3PR.js → chunk-P4UT4LBE.js} +3 -3
  123. package/dist/cli/chunks/{chunk-IVJIHZSM.js → chunk-PICEGWGB.js} +1 -1
  124. package/dist/cli/chunks/{chunk-ITIJ23K2.js → chunk-PIEKGKW6.js} +2 -2
  125. package/dist/cli/chunks/{chunk-2ZTWPMTK.js → chunk-PJGQ2TKN.js} +2 -2
  126. package/dist/cli/chunks/{chunk-KCB6P463.js → chunk-PPIM7B5G.js} +2 -2
  127. package/dist/cli/chunks/{chunk-L2TDHJR3.js → chunk-PUYQ6EKC.js} +2 -2
  128. package/dist/cli/chunks/{chunk-2IWPJUVV.js → chunk-PWA6XBW4.js} +8 -8
  129. package/dist/cli/chunks/{chunk-XPB5BVU6.js → chunk-PZ7FJ4UG.js} +2 -2
  130. package/dist/cli/chunks/{chunk-SOSJWM3E.js → chunk-QFYUZYRA.js} +4 -4
  131. package/dist/cli/chunks/{chunk-RUTO67PT.js → chunk-R2NHGESM.js} +2 -2
  132. package/dist/cli/chunks/{chunk-K55EAWZ5.js → chunk-RG42LDOB.js} +2 -2
  133. package/dist/cli/chunks/{chunk-JAPBSSFY.js → chunk-RSMPJWQH.js} +1 -1
  134. package/dist/cli/chunks/{chunk-46HBVDMU.js → chunk-SFPGLUXS.js} +1 -1
  135. package/dist/cli/chunks/{chunk-TVLOED6O.js → chunk-SHEVM5PF.js} +2 -2
  136. package/dist/cli/chunks/{chunk-6RDVY26I.js → chunk-SJMZZMHP.js} +2 -2
  137. package/dist/cli/chunks/{chunk-3DJNKNBR.js → chunk-ST7ASEJO.js} +57 -57
  138. package/dist/cli/chunks/{chunk-QS5KZYUZ.js → chunk-SWY6KGMF.js} +2 -2
  139. package/dist/cli/chunks/{chunk-UHHMAKPE.js → chunk-T2TDTBFV.js} +1 -1
  140. package/dist/cli/chunks/{chunk-5HAPS6VD.js → chunk-TC52M542.js} +2 -2
  141. package/dist/cli/chunks/chunk-TMNEK7TP.js +2 -0
  142. package/dist/cli/chunks/{chunk-ELI4GDQO.js → chunk-U3BWBP6B.js} +2 -2
  143. package/dist/cli/chunks/{chunk-CZBIREL5.js → chunk-U7CIY3YR.js} +2 -2
  144. package/dist/cli/chunks/{chunk-X2DR27AY.js → chunk-UDCYQLTD.js} +2 -2
  145. package/dist/cli/chunks/{chunk-CEXNW5TR.js → chunk-UKKFZJME.js} +1 -1
  146. package/dist/cli/chunks/{chunk-5NC7QEJ6.js → chunk-UQLAN5TX.js} +4 -4
  147. package/dist/cli/chunks/{chunk-BIXRTOH3.js → chunk-UTFMMZ57.js} +3 -3
  148. package/dist/cli/chunks/{chunk-YXU35GGD.js → chunk-UTNKMPTC.js} +1 -1
  149. package/dist/cli/chunks/{chunk-HZFK2Z2Z.js → chunk-V4QJ3MMT.js} +1 -1
  150. package/dist/cli/chunks/{chunk-LJCEDTUM.js → chunk-V7VZSNDK.js} +3 -3
  151. package/dist/cli/chunks/{chunk-RLB7K7QP.js → chunk-VKFVJCIH.js} +1 -1
  152. package/dist/cli/chunks/{chunk-5GIJU2ZY.js → chunk-VQRBBR27.js} +2 -2
  153. package/dist/cli/chunks/{chunk-Q2RBOC7V.js → chunk-VVK4ECVJ.js} +2 -2
  154. package/dist/cli/chunks/{chunk-624QRKQX.js → chunk-VWRNG3UK.js} +1 -1
  155. package/dist/cli/chunks/{chunk-F3KS3TAB.js → chunk-VWSGWYRB.js} +2 -2
  156. package/dist/cli/chunks/{chunk-I7WAW7TM.js → chunk-W5A36V3Z.js} +2 -2
  157. package/dist/cli/chunks/chunk-WAWKAYPY.js +2 -0
  158. package/dist/cli/chunks/{chunk-NMY4KTWA.js → chunk-WLXGUQOZ.js} +2 -2
  159. package/dist/cli/chunks/{chunk-7VTKR44N.js → chunk-X3HM7SV4.js} +2 -2
  160. package/dist/cli/chunks/chunk-X6VYQVUM.js +2 -0
  161. package/dist/cli/chunks/{chunk-ZL5LJT7D.js → chunk-X7ZQIFES.js} +2 -2
  162. package/dist/cli/chunks/{chunk-5VUIXDY2.js → chunk-XOOBLZXR.js} +2 -2
  163. package/dist/cli/chunks/{chunk-L4D3TPFP.js → chunk-XZQVC3GD.js} +1 -1
  164. package/dist/cli/chunks/{chunk-BO7UFNYV.js → chunk-Y5ZBF7MA.js} +2 -2
  165. package/dist/cli/chunks/{chunk-ULCHPPW2.js → chunk-YNQPHRUZ.js} +1 -1
  166. package/dist/cli/chunks/{chunk-ZCP4P6O2.js → chunk-YRH7KMTU.js} +2 -2
  167. package/dist/cli/chunks/{chunk-QLKUCMZC.js → chunk-YTYS2XSY.js} +1 -1
  168. package/dist/cli/chunks/{chunk-JPJEAK4G.js → chunk-YUP3APSN.js} +1 -1
  169. package/dist/cli/chunks/{chunk-BXATKI5S.js → chunk-YVWMJZ6O.js} +2 -2
  170. package/dist/cli/chunks/{chunk-PS6WFCA4.js → chunk-Z3LDUPLQ.js} +2 -2
  171. package/dist/cli/chunks/{chunk-FOJRPEIP.js → chunk-ZBI7PJFX.js} +2 -2
  172. package/dist/cli/chunks/{chunk-NHRF3V4B.js → chunk-ZG7UKWBB.js} +2 -2
  173. package/dist/cli/chunks/{chunk-7XUB7U6Z.js → chunk-ZOHS32SI.js} +2 -2
  174. package/dist/cli/chunks/{chunk-RHIQ6QO5.js → chunk-ZOVAZTXE.js} +430 -430
  175. package/dist/cli/chunks/{chunk-7QVPMH25.js → chunk-ZWMFKZEQ.js} +2 -2
  176. package/dist/cli/chunks/{ci-GEJCXMBK.js → ci-7NUCRGWO.js} +2 -2
  177. package/dist/cli/chunks/{ci-config-2ZVV4OXL.js → ci-config-VQVECCFI.js} +2 -2
  178. package/dist/cli/chunks/{ci-output-E45OGVPR.js → ci-output-P7GQ6TKF.js} +2 -2
  179. package/dist/cli/chunks/{circuit-breaker-X73ITYZC.js → circuit-breaker-5YP6N6HE.js} +2 -2
  180. package/dist/cli/chunks/{claude-flow-setup-W4PPH46C.js → claude-flow-setup-W5H7CMU6.js} +2 -2
  181. package/dist/cli/chunks/client-RFUSQRUZ.js +2 -0
  182. package/dist/cli/chunks/{cline-installer-NUEPMWDE.js → cline-installer-OYANSZ54.js} +2 -2
  183. package/dist/cli/chunks/{code-6WQHBS7G.js → code-OMT4UEZI.js} +3 -3
  184. package/dist/cli/chunks/{code-index-extractor-BXQIFIFT.js → code-index-extractor-M2JEWKNF.js} +2 -2
  185. package/dist/cli/chunks/{codex-installer-Z337R2KH.js → codex-installer-YBS6N5O3.js} +2 -2
  186. package/dist/cli/chunks/{completions-F5DMYFHV.js → completions-U7GS5RG6.js} +2 -2
  187. package/dist/cli/chunks/{complexity-analyzer-W2SYPZDI.js → complexity-analyzer-QSXPIUIU.js} +2 -2
  188. package/dist/cli/chunks/{continuedev-installer-ZCHUIFTN.js → continuedev-installer-W5TTT743.js} +2 -2
  189. package/dist/cli/chunks/{copilot-installer-M5JNODXF.js → copilot-installer-KC2RT24C.js} +2 -2
  190. package/dist/cli/chunks/core-handlers-ZC7QB432.js +2 -0
  191. package/dist/cli/chunks/{cost-tracker-LSYTHBHV.js → cost-tracker-OQPVR6V4.js} +2 -2
  192. package/dist/cli/chunks/{coverage-PGMRS5SS.js → coverage-TCO2A2NX.js} +3 -3
  193. package/dist/cli/chunks/cross-domain-router-GRBK7YFZ.js +2 -0
  194. package/dist/cli/chunks/{cursor-installer-XPUA73UW.js → cursor-installer-MH7GWD4L.js} +2 -2
  195. package/dist/cli/chunks/daemon-JER6HE2J.js +12 -0
  196. package/dist/cli/chunks/{daemon-ITKDIYMW.js → daemon-UJEARJZ2.js} +3 -3
  197. package/dist/cli/chunks/{dag-attention-scheduler-T55AXLD6.js → dag-attention-scheduler-F3SUJU5O.js} +2 -2
  198. package/dist/cli/chunks/{detect-DR7J6K4O.js → detect-5QTCRB32.js} +2 -2
  199. package/dist/cli/chunks/{dist-node-LAJJBOUT.js → dist-node-XKZPHDBO.js} +2 -2
  200. package/dist/cli/chunks/{domain-handler-OMSHCRMK.js → domain-handler-V3UEADKW.js} +2 -2
  201. package/dist/cli/chunks/{domain-plugins-EQXSKC5K.js → domain-plugins-7PES4UHZ.js} +2 -2
  202. package/dist/cli/chunks/{domain-transfer-FKRAGVSW.js → domain-transfer-NF7UJW7B.js} +2 -2
  203. package/dist/cli/chunks/dream-VALD726W.js +2 -0
  204. package/dist/cli/chunks/{embed-and-insert-pattern-JZFPCNL3.js → embed-and-insert-pattern-D2HWORHF.js} +2 -2
  205. package/dist/cli/chunks/{eval-JSNNASBW.js → eval-UF2UBAUC.js} +2 -2
  206. package/dist/cli/chunks/{experience-capture-middleware-UPD3IZBK.js → experience-capture-middleware-2OUCEHHM.js} +3 -3
  207. package/dist/cli/chunks/{fast-paths-YNMIBS2E.js → fast-paths-KV5DKKHC.js} +2 -2
  208. package/dist/cli/chunks/{feature-flags-SRLXDKBI.js → feature-flags-6YWMTNO5.js} +2 -2
  209. package/dist/cli/chunks/{feature-flags-VIR7O4L7.js → feature-flags-MTW6NMR3.js} +2 -2
  210. package/dist/cli/chunks/file-discovery-VL73ASNI.js +2 -0
  211. package/dist/cli/chunks/{fleet-K2ED46EL.js → fleet-GJ66QFXK.js} +3 -3
  212. package/dist/cli/chunks/{gnn-wrapper-QCU4ZRYW.js → gnn-wrapper-52V6ANOY.js} +2 -2
  213. package/dist/cli/chunks/{heartbeat-handler-YYQI4WZM.js → heartbeat-handler-X7NHNRC7.js} +4 -4
  214. package/dist/cli/chunks/heartbeat-scheduler-FSX7A3ZA.js +2 -0
  215. package/dist/cli/chunks/hnsw-adapter-UX2QT6RL.js +2 -0
  216. package/dist/cli/chunks/hnsw-index-WRDDAMXH.js +2 -0
  217. package/dist/cli/chunks/{hnsw-legacy-bridge-C5TJSWTZ.js → hnsw-legacy-bridge-DZBE3KMK.js} +2 -2
  218. package/dist/cli/chunks/{hnswlib-node-SE3MJJYS.js → hnswlib-node-2AWWUJAZ.js} +2 -2
  219. package/dist/cli/chunks/{hooks-C572SRDH.js → hooks-XLPVROL3.js} +10 -10
  220. package/dist/cli/chunks/hybrid-backend-O67NGIB5.js +2 -0
  221. package/dist/cli/chunks/{hypergraph-engine-35A6G3M5.js → hypergraph-engine-6TI7YP6P.js} +2 -2
  222. package/dist/cli/chunks/{hypergraph-handler-U2756CWI.js → hypergraph-handler-DBIBBOXS.js} +3 -3
  223. package/dist/cli/chunks/impact-analyzer-6VXWWYWM.js +2 -0
  224. package/dist/cli/chunks/init-guard-OSO6MIDD.js +2 -0
  225. package/dist/cli/chunks/init-handler-7S7IHMUF.js +88 -0
  226. package/dist/cli/chunks/init-wizard-VH34J4TL.js +2 -0
  227. package/dist/cli/chunks/kernel-KJD24NO7.js +2 -0
  228. package/dist/cli/chunks/{kilocode-installer-32PX5YH7.js → kilocode-installer-2KBRFXMA.js} +2 -2
  229. package/dist/cli/chunks/{kiro-installer-C4ROMMUS.js → kiro-installer-5VFR4OQZ.js} +2 -2
  230. package/dist/cli/chunks/knowledge-graph-343O2HEZ.js +2 -0
  231. package/dist/cli/chunks/{learning-GEPVZGJQ.js → learning-G5NHL3DV.js} +20 -20
  232. package/dist/cli/chunks/{llm-router-XRKTTJTX.js → llm-router-4EAPPMHS.js} +4 -4
  233. package/dist/cli/chunks/llm-router-service-2M4BT2AO.js +2 -0
  234. package/dist/cli/chunks/{load-XVH6HW7E.js → load-UYMZPEY6.js} +2 -2
  235. package/dist/cli/chunks/load-test-OTQ2JQ5F.js +2 -0
  236. package/dist/cli/chunks/{mcp-IULSTM4Z.js → mcp-NOTDZBW5.js} +2 -2
  237. package/dist/cli/chunks/{memory-6K7IAU4T.js → memory-QL53YIHP.js} +5 -5
  238. package/dist/cli/chunks/memory-backend-4QSNRRV6.js +2 -0
  239. package/dist/cli/chunks/{memory-handlers-CG6DRLAW.js → memory-handlers-YFFYRSM6.js} +2 -2
  240. package/dist/cli/chunks/{multi-model-executor-VZDUYPLX.js → multi-model-executor-PDDDXF2B.js} +2 -2
  241. package/dist/cli/chunks/{opencode-installer-QUTXKNH4.js → opencode-installer-75D2SKOT.js} +2 -2
  242. package/dist/cli/chunks/{orchestrator-PCKKUWOP.js → orchestrator-3WIZBV4T.js} +5 -5
  243. package/dist/cli/chunks/pattern-null-store-5USH5MNR.js +2 -0
  244. package/dist/cli/chunks/{pattern-usage-recorder-PX5HQVRL.js → pattern-usage-recorder-TEX2JGHA.js} +2 -2
  245. package/dist/cli/chunks/{pipeline-O562GTOG.js → pipeline-7ATPA6LU.js} +2 -2
  246. package/dist/cli/chunks/{platform-PM7Q2AZS.js → platform-WPSKRJE7.js} +2 -2
  247. package/dist/cli/chunks/{plugin-OTYTFGPY.js → plugin-UUFOVVMU.js} +2 -2
  248. package/dist/cli/chunks/{prime-radiant-advanced-wasm-6CFXTHC2.js → prime-radiant-advanced-wasm-PDFSYWKZ.js} +2 -2
  249. package/dist/cli/chunks/project-root-SRTA6TBL.js +2 -0
  250. package/dist/cli/chunks/protocol-executor-4WYPCNBS.js +2 -0
  251. package/dist/cli/chunks/{protocol-handler-PPGNSAOS.js → protocol-handler-3VRYRIQB.js} +2 -2
  252. package/dist/cli/chunks/{prove-WQ3BKRZG.js → prove-2NAUROGF.js} +2 -2
  253. package/dist/cli/chunks/qe-reasoning-bank-I4D6SFS4.js +2 -0
  254. package/dist/cli/chunks/{quality-C5WUU3AA.js → quality-ZIEI2WGA.js} +2 -2
  255. package/dist/cli/chunks/{quality-gate-WSSRKD5U.js → quality-gate-KWJO4SWQ.js} +3 -3
  256. package/dist/cli/chunks/queen-coordinator-24UMTZTE.js +2 -0
  257. package/dist/cli/chunks/{real-embeddings-CFQE7IRQ.js → real-embeddings-TSZ4UIAE.js} +2 -2
  258. package/dist/cli/chunks/{ref-validation-DHKHXVZT.js → ref-validation-DWFFRETJ.js} +2 -2
  259. package/dist/cli/chunks/{roocode-installer-3PPODABV.js → roocode-installer-XTZHLUBO.js} +2 -2
  260. package/dist/cli/chunks/router-AUD4GATI.js +2 -0
  261. package/dist/cli/chunks/routing-feedback-2FE6SIKQ.js +2 -0
  262. package/dist/cli/chunks/{routing-handler-JNXTGT6T.js → routing-handler-GG525TDM.js} +2 -2
  263. package/dist/cli/chunks/{ruvector-commands-6YLROPVP.js → ruvector-commands-QKRJDM7Z.js} +2 -2
  264. package/dist/cli/chunks/rvf-dual-writer-P5LEUF25.js +2 -0
  265. package/dist/cli/chunks/rvf-migration-adapter-ZCYD5YJS.js +2 -0
  266. package/dist/cli/chunks/{rvf-migration-coordinator-4DWB4WRK.js → rvf-migration-coordinator-FF52OS6Q.js} +2 -2
  267. package/dist/cli/chunks/rvf-native-adapter-QGV6BW2W.js +2 -0
  268. package/dist/cli/chunks/{rvf-store-integrity-YKR2ZNBF.js → rvf-store-integrity-M6DXTAZ4.js} +2 -2
  269. package/dist/cli/chunks/safe-db-Q6JUKG2A.js +2 -0
  270. package/dist/cli/chunks/schedule-44OSMGE5.js +2 -0
  271. package/dist/cli/chunks/scheduler-V3HO2QQT.js +2 -0
  272. package/dist/cli/chunks/security-EHXSW22U.js +18 -0
  273. package/dist/cli/chunks/{shared-rvf-adapter-LNRLFP5I.js → shared-rvf-adapter-6EH7UVJL.js} +2 -2
  274. package/dist/cli/chunks/{shared-rvf-dual-writer-GWU6YQNS.js → shared-rvf-dual-writer-WML274E7.js} +2 -2
  275. package/dist/cli/chunks/sqlite-persistence-N5T7DWMR.js +2 -0
  276. package/dist/cli/chunks/{standalone-memory-46KKBSSV.js → standalone-memory-C7QKAXS4.js} +2 -2
  277. package/dist/cli/chunks/{status-handler-35T5FTDQ.js → status-handler-VLI7MRLM.js} +2 -2
  278. package/dist/cli/chunks/{structural-health-P7QPQWLO.js → structural-health-3LPG6MQN.js} +2 -2
  279. package/dist/cli/chunks/{sync-Y43EWBSY.js → sync-4IMMQEPT.js} +2 -2
  280. package/dist/cli/chunks/{sync-W6Z4R4PL.js → sync-JFJEJBVK.js} +2 -2
  281. package/dist/cli/chunks/{task-handler-5CX3ZYT7.js → task-handler-IED3K6E4.js} +2 -2
  282. package/dist/cli/chunks/{task-handlers-DQZGOJNE.js → task-handlers-FH6DNTHW.js} +3 -3
  283. package/dist/cli/chunks/{test-TPP53VVV.js → test-GPKT3CKZ.js} +4 -4
  284. package/dist/cli/chunks/{test-scheduling-WBV4UMQH.js → test-scheduling-Z42XXZP6.js} +3 -3
  285. package/dist/cli/chunks/{token-bootstrap-GIIDXHLC.js → token-bootstrap-HMM3AHXM.js} +2 -2
  286. package/dist/cli/chunks/{token-usage-AKK37RB7.js → token-usage-6Y2ERYIY.js} +2 -2
  287. package/dist/cli/chunks/{transformers-7MASPELS.js → transformers-MB63T2XO.js} +2 -2
  288. package/dist/cli/chunks/{tree-sitter-wasm-parser-YZKD6UGB.js → tree-sitter-wasm-parser-56GDQCMR.js} +2 -2
  289. package/dist/cli/chunks/{types-AZ3BTXDP.js → types-J4J6QV3I.js} +2 -2
  290. package/dist/cli/chunks/unified-memory-RQ3Q4CU3.js +2 -0
  291. package/dist/cli/chunks/unified-memory-hnsw-ZOP5FEYX.js +2 -0
  292. package/dist/cli/chunks/unified-persistence-72OCJJKK.js +2 -0
  293. package/dist/cli/chunks/{upgrade-L7OTDKEK.js → upgrade-U4XU7LFM.js} +2 -2
  294. package/dist/cli/chunks/{validate-O3QVFIGP.js → validate-B57HA4YK.js} +2 -2
  295. package/dist/cli/chunks/{validate-swarm-2UGBGLTX.js → validate-swarm-UPPA4M6T.js} +2 -2
  296. package/dist/cli/chunks/visual-security-7F5UV23J.js +2 -0
  297. package/dist/cli/chunks/{web-tree-sitter-J75IYPRO.js → web-tree-sitter-GDZMUKOZ.js} +2 -2
  298. package/dist/cli/chunks/{windsurf-installer-FQ5DBFCG.js → windsurf-installer-VJRWCHXP.js} +2 -2
  299. package/dist/cli/chunks/witness-chain-KZ57QUFE.js +2 -0
  300. package/dist/cli/chunks/{witness-chain-I7TN4MXZ.js → witness-chain-LFASSMZK.js} +2 -2
  301. package/dist/cli/chunks/{witness-chain-repair-D3NE3NQK.js → witness-chain-repair-TPHN4DXN.js} +2 -2
  302. package/dist/cli/chunks/{witness-chain-verifier-RU2WOP5M.js → witness-chain-verifier-Z23FVABW.js} +2 -2
  303. package/dist/cli/chunks/{witness-key-manager-IHQB2FR5.js → witness-key-manager-745MJ7WO.js} +2 -2
  304. package/dist/cli/chunks/{workflow-6BWTNVV6.js → workflow-T245QNQM.js} +4 -4
  305. package/dist/cli/chunks/workflow-orchestrator-ZNWEUYBN.js +2 -0
  306. package/dist/cli/chunks/{wrappers-URVP25VU.js → wrappers-WCAYIQUX.js} +2 -2
  307. package/dist/cli/commands/learning.js +3 -2
  308. package/dist/cli/commands/security.d.ts +16 -0
  309. package/dist/cli/commands/security.js +76 -9
  310. package/dist/cli/handlers/init-guard.d.ts +21 -1
  311. package/dist/cli/handlers/init-guard.js +51 -8
  312. package/dist/cli/handlers/init-handler.js +57 -56
  313. package/dist/cli/index.js +11 -0
  314. package/dist/cli/utils/ci-output.d.ts +5 -0
  315. package/dist/cli/utils/ci-output.js +8 -0
  316. package/dist/coordination/handlers/security-handlers.js +22 -6
  317. package/dist/coordination/protocols/defect-investigation.js +7 -1
  318. package/dist/coordination/protocols/learning-consolidation.js +6 -12
  319. package/dist/coordination/protocols/security-audit.js +11 -0
  320. package/dist/coordination/result-saver.d.ts +9 -0
  321. package/dist/coordination/result-saver.js +34 -4
  322. package/dist/domains/coverage-analysis/collected-metrics.d.ts +2 -0
  323. package/dist/domains/coverage-analysis/collected-metrics.js +8 -1
  324. package/dist/domains/defect-intelligence/services/defect-predictor.js +9 -6
  325. package/dist/domains/learning-optimization/active-patterns.d.ts +55 -0
  326. package/dist/domains/learning-optimization/active-patterns.js +77 -0
  327. package/dist/domains/learning-optimization/coordinator.js +12 -9
  328. package/dist/domains/learning-optimization/services/learning-coordinator.js +15 -17
  329. package/dist/domains/quality-assessment/interfaces.d.ts +4 -0
  330. package/dist/domains/quality-assessment/quality-evidence.d.ts +1 -1
  331. package/dist/domains/quality-assessment/services/quality-analyzer.js +7 -5
  332. package/dist/domains/quality-assessment/services/quality-gate.js +12 -3
  333. package/dist/domains/security-compliance/dependency-advisory-engine.d.ts +52 -0
  334. package/dist/domains/security-compliance/dependency-advisory-engine.js +113 -0
  335. package/dist/domains/security-compliance/interfaces.d.ts +30 -0
  336. package/dist/domains/security-compliance/plugin.d.ts +7 -1
  337. package/dist/domains/security-compliance/plugin.js +19 -0
  338. package/dist/domains/security-compliance/services/scanners/dependency-resolver.d.ts +71 -0
  339. package/dist/domains/security-compliance/services/scanners/dependency-resolver.js +232 -0
  340. package/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts +21 -6
  341. package/dist/domains/security-compliance/services/scanners/dependency-scanner.js +142 -64
  342. package/dist/domains/security-compliance/services/scanners/lockfile-versions.d.ts +43 -0
  343. package/dist/domains/security-compliance/services/scanners/lockfile-versions.js +248 -0
  344. package/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +30 -2
  345. package/dist/domains/security-compliance/services/security-auditor.d.ts +19 -6
  346. package/dist/domains/security-compliance/services/security-auditor.js +133 -92
  347. package/dist/domains/test-execution/services/retry-handler.js +34 -7
  348. package/dist/domains/test-execution/services/test-executor.d.ts +1 -0
  349. package/dist/domains/test-execution/services/test-executor.js +87 -7
  350. package/dist/kernel/shared-dirs.js +17 -5
  351. package/dist/learning/dream/dream-engine.d.ts +27 -1
  352. package/dist/learning/dream/dream-engine.js +56 -2
  353. package/dist/learning/dream/rvcow-branch-manager.d.ts +8 -0
  354. package/dist/learning/dream/rvcow-branch-manager.js +8 -0
  355. package/dist/learning/dream/speculative-dreamer.d.ts +8 -0
  356. package/dist/learning/dream/speculative-dreamer.js +8 -0
  357. package/dist/mcp/background-workers.d.ts +15 -0
  358. package/dist/mcp/background-workers.js +71 -0
  359. package/dist/mcp/bundle.js +881 -878
  360. package/dist/mcp/entry.js +4 -49
  361. package/dist/mcp/handlers/domain-handler-configs.d.ts +4 -0
  362. package/dist/mcp/handlers/domain-handler-configs.js +5 -1
  363. package/dist/mcp/protocol-server.js +2 -1
  364. package/dist/mcp/types.d.ts +6 -0
  365. package/dist/shared/security/index.d.ts +2 -2
  366. package/dist/shared/security/index.js +1 -1
  367. package/dist/shared/security/osv-client.d.ts +79 -132
  368. package/dist/shared/security/osv-client.js +344 -167
  369. package/dist/shared/security/osv-lookup.d.ts +124 -0
  370. package/dist/shared/security/osv-lookup.js +246 -0
  371. package/dist/shared/security/osv-types.d.ts +119 -0
  372. package/dist/shared/security/osv-types.js +6 -0
  373. package/dist/workers/daemon.d.ts +5 -0
  374. package/dist/workers/daemon.js +16 -2
  375. package/dist/workers/interfaces.d.ts +6 -1
  376. package/dist/workers/namespaced-keys.d.ts +16 -0
  377. package/dist/workers/namespaced-keys.js +24 -0
  378. package/dist/workers/quality-daemon/persistent-memory.d.ts +1 -1
  379. package/dist/workers/quality-daemon/persistent-memory.js +2 -2
  380. package/dist/workers/worker-env.d.ts +45 -0
  381. package/dist/workers/worker-env.js +76 -0
  382. package/dist/workers/worker-manager.js +5 -2
  383. package/dist/workers/workers/defect-predictor.d.ts +25 -8
  384. package/dist/workers/workers/defect-predictor.js +223 -216
  385. package/dist/workers/workers/learning-consolidation.d.ts +20 -0
  386. package/dist/workers/workers/learning-consolidation.js +53 -22
  387. package/dist/workers/workers/performance-baseline.d.ts +24 -9
  388. package/dist/workers/workers/performance-baseline.js +187 -230
  389. package/dist/workers/workers/quality-gate.d.ts +11 -9
  390. package/dist/workers/workers/quality-gate.js +125 -267
  391. package/dist/workers/workers/security-scan-records.d.ts +111 -0
  392. package/dist/workers/workers/security-scan-records.js +128 -0
  393. package/dist/workers/workers/security-scan.d.ts +25 -7
  394. package/dist/workers/workers/security-scan.js +187 -164
  395. package/package.json +2 -2
  396. package/dist/cli/chunks/adapter-PP3XIXDV.js +0 -2
  397. package/dist/cli/chunks/aqe-learning-engine-VDUQJKKY.js +0 -2
  398. package/dist/cli/chunks/base-QSYWWPCE.js +0 -2
  399. package/dist/cli/chunks/browser-workflow-WXXPBSCM.js +0 -2
  400. package/dist/cli/chunks/chunk-45MVRQG4.js +0 -2
  401. package/dist/cli/chunks/chunk-5VZVMO7B.js +0 -3
  402. package/dist/cli/chunks/chunk-EECF4CMA.js +0 -2
  403. package/dist/cli/chunks/client-6XKSQ4JT.js +0 -2
  404. package/dist/cli/chunks/core-handlers-OJYW4Y6M.js +0 -2
  405. package/dist/cli/chunks/cross-domain-router-QVUPQ2SC.js +0 -2
  406. package/dist/cli/chunks/daemon-QBYTCIMH.js +0 -10
  407. package/dist/cli/chunks/dream-3UABDRZJ.js +0 -2
  408. package/dist/cli/chunks/file-discovery-ZFGZTKZ4.js +0 -2
  409. package/dist/cli/chunks/heartbeat-scheduler-MJ6MTPDF.js +0 -2
  410. package/dist/cli/chunks/hnsw-adapter-FQWJCFVW.js +0 -2
  411. package/dist/cli/chunks/hnsw-index-NJYKJUHC.js +0 -2
  412. package/dist/cli/chunks/hybrid-backend-SL7RFID7.js +0 -2
  413. package/dist/cli/chunks/impact-analyzer-5ZJTXPVC.js +0 -2
  414. package/dist/cli/chunks/init-handler-PCLYQUSB.js +0 -88
  415. package/dist/cli/chunks/init-wizard-MQMDSIOF.js +0 -2
  416. package/dist/cli/chunks/kernel-MEJ5GMRH.js +0 -2
  417. package/dist/cli/chunks/knowledge-graph-XUBZSEZE.js +0 -2
  418. package/dist/cli/chunks/llm-router-service-QZAPAEPX.js +0 -2
  419. package/dist/cli/chunks/load-test-OVXIQ3AF.js +0 -2
  420. package/dist/cli/chunks/memory-backend-TRPOMPK4.js +0 -2
  421. package/dist/cli/chunks/pattern-null-store-JWYBRBZG.js +0 -2
  422. package/dist/cli/chunks/project-root-VVSTHIP4.js +0 -2
  423. package/dist/cli/chunks/protocol-executor-PXZCLZD3.js +0 -2
  424. package/dist/cli/chunks/qe-reasoning-bank-42FRS5V3.js +0 -2
  425. package/dist/cli/chunks/queen-coordinator-UI3B7DI6.js +0 -2
  426. package/dist/cli/chunks/router-HYRPWLAY.js +0 -2
  427. package/dist/cli/chunks/routing-feedback-BPZ5R6F3.js +0 -2
  428. package/dist/cli/chunks/rvf-dual-writer-DEKDQ6KO.js +0 -2
  429. package/dist/cli/chunks/rvf-migration-adapter-L53VBS7I.js +0 -2
  430. package/dist/cli/chunks/rvf-native-adapter-I6RUGD2D.js +0 -2
  431. package/dist/cli/chunks/safe-db-KS65XDCP.js +0 -2
  432. package/dist/cli/chunks/schedule-KD2VN6GB.js +0 -2
  433. package/dist/cli/chunks/scheduler-ZH3RMUHY.js +0 -2
  434. package/dist/cli/chunks/security-PWQTGDRU.js +0 -13
  435. package/dist/cli/chunks/sqlite-persistence-6DTVME5D.js +0 -2
  436. package/dist/cli/chunks/unified-memory-FCX7NLFZ.js +0 -2
  437. package/dist/cli/chunks/unified-memory-hnsw-VU5QJK37.js +0 -2
  438. package/dist/cli/chunks/unified-persistence-FM376LGE.js +0 -2
  439. package/dist/cli/chunks/visual-security-EU7Y3X46.js +0 -2
  440. package/dist/cli/chunks/witness-chain-CSEBT52D.js +0 -2
  441. package/dist/cli/chunks/workflow-orchestrator-ALNKOM3N.js +0 -2
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Dependency advisory (OSV) engine for the scan-security task (#1049).
3
+ *
4
+ * Runs the security-compliance DependencyScanner on the project's package.json
5
+ * and turns its outcome into an execution receipt. A failed or partial OSV
6
+ * lookup is a failed/partial engine with the unchecked packages listed, never
7
+ * a completed engine with zero findings.
8
+ */
9
+ import * as fs from 'fs/promises';
10
+ import * as path from 'path';
11
+ export const DEPENDENCY_ADVISORY_ENGINE_ID = 'osv-dependency-advisories';
12
+ /** The package.json for a scan target: the target directory's, else the project root's. */
13
+ export async function findPackageJson(targetPath, env = process.env) {
14
+ let dir = targetPath;
15
+ try {
16
+ if (!(await fs.stat(targetPath)).isDirectory())
17
+ dir = path.dirname(targetPath);
18
+ }
19
+ catch {
20
+ dir = path.dirname(targetPath);
21
+ }
22
+ const candidates = [dir, env.AQE_PROJECT_ROOT ? path.resolve(env.AQE_PROJECT_ROOT) : null];
23
+ for (const candidate of candidates) {
24
+ if (!candidate)
25
+ continue;
26
+ const manifest = path.join(candidate, 'package.json');
27
+ try {
28
+ if ((await fs.stat(manifest)).isFile())
29
+ return manifest;
30
+ }
31
+ catch { /* try next */ }
32
+ }
33
+ return null;
34
+ }
35
+ /** Human message for a dependency scan outcome. */
36
+ export const DEPENDENCY_SCOPE_NOTE = 'direct dependencies of this package.json only; workspace members and transitive dependencies are not checked';
37
+ export function dependencyScanMessage(report) {
38
+ return `${statusMessage(report)} Scope: ${DEPENDENCY_SCOPE_NOTE}.`;
39
+ }
40
+ function statusMessage(report) {
41
+ switch (report.status) {
42
+ case 'complete':
43
+ return report.packagesRequested === 0
44
+ ? `No registry dependencies to check${report.localPackages.length ? ` (${report.localPackages.length} local package(s) excluded)` : ' in package.json'}; nothing to check (complete).`
45
+ : `Dependency advisories checked for all ${report.packagesChecked} package(s): ${report.vulnerabilities} advisory finding(s).`;
46
+ case 'incomplete':
47
+ return (report.uncheckedPackages.length > 0
48
+ ? `Dependency advisories could not be checked for ${report.uncheckedPackages.length} of ${report.packagesRequested} package(s); ` : '') +
49
+ (report.resolutionErrors.length > 0 ? `${report.resolutionErrors.slice(0, 3).join('; ')}; ` : '') +
50
+ `${report.vulnerabilities} finding(s) from the ${report.packagesChecked} checked package(s). Dependency scan is INCOMPLETE, not clean.`;
51
+ case 'failed':
52
+ return `${report.error ?? `Dependency advisories could not be checked for ${report.uncheckedPackages.length} package(s)`}. ` +
53
+ 'Dependency vulnerabilities are UNMEASURED, not zero.';
54
+ default:
55
+ return report.error ?? 'Dependency advisory scan did not run.';
56
+ }
57
+ }
58
+ function notRun(reason, manifest) {
59
+ const base = { status: 'not-run', measured: false, ...(manifest ? { manifest } : {}),
60
+ packagesRequested: 0, packagesChecked: 0, uncheckedPackages: [], localPackages: [],
61
+ resolutionErrors: [], scope: 'direct',
62
+ vulnerabilities: 0, error: reason };
63
+ return {
64
+ engine: { id: DEPENDENCY_ADVISORY_ENGINE_ID, requested: true, required: true, status: 'failed', scope: 'parent-directory',
65
+ ...(manifest ? { target: manifest } : {}), analyzedFiles: 0, ruleCoverage: 'unknown', errors: [reason], limitations: [] },
66
+ vulnerabilities: [],
67
+ report: { ...base, message: dependencyScanMessage(base) },
68
+ };
69
+ }
70
+ /** Run the OSV dependency scan for a target and describe it as an engine receipt. */
71
+ export async function runDependencyAdvisoryScan(scanner, targetPath) {
72
+ const manifest = await findPackageJson(targetPath);
73
+ if (!manifest)
74
+ return notRun('No package.json found for the dependency advisory scan.');
75
+ let scan;
76
+ try {
77
+ scan = await scanner.scanPackageJson(manifest);
78
+ }
79
+ catch (error) {
80
+ return notRun(`Dependency advisory scan failed: ${error instanceof Error ? error.message : String(error)}`, manifest);
81
+ }
82
+ if (!scan.success)
83
+ return notRun(`Dependency advisory scan did not run: ${scan.error.message}`, manifest);
84
+ const value = scan.value;
85
+ const unchecked = value.uncheckedPackages.map((p) => `${p.name}@${p.version}: ${p.reason}`);
86
+ const base = {
87
+ status: value.status, measured: value.measured, manifest, lockfile: value.lockfile ?? null,
88
+ packagesRequested: value.packagesScanned, packagesChecked: value.packagesChecked,
89
+ uncheckedPackages: value.uncheckedPackages, localPackages: value.localPackages ?? [],
90
+ resolutionErrors: value.resolutionErrors ?? [], scope: 'direct',
91
+ vulnerabilities: value.vulnerabilities.length,
92
+ scanId: value.scanId, ...(value.error ? { error: value.error } : {}),
93
+ };
94
+ return {
95
+ engine: {
96
+ id: DEPENDENCY_ADVISORY_ENGINE_ID, requested: true, required: true,
97
+ status: value.status === 'complete' ? 'completed' : value.status === 'incomplete' ? 'partial' : 'failed',
98
+ scope: 'parent-directory', target: manifest, ruleCoverage: 'unknown',
99
+ errors: [...(value.error ? [value.error] : []), ...(value.resolutionErrors ?? []), ...unchecked.slice(0, 20),
100
+ ...(unchecked.length > 20 ? [`... and ${unchecked.length - 20} more unchecked package(s)`] : [])],
101
+ limitations: [
102
+ value.lockfile
103
+ ? `Direct dependencies are checked at the versions ${value.lockfile} resolves (when in sync with package.json); transitive dependencies are not checked.`
104
+ : 'No lockfile: only exact versions in package.json are checked; ranges are reported unchecked. Transitive dependencies are not checked.',
105
+ ...((value.localPackages ?? []).length > 0
106
+ ? [`${value.localPackages.length} local workspace/linked package(s) are not OSV subjects and were excluded.`] : []),
107
+ ],
108
+ },
109
+ vulnerabilities: value.vulnerabilities,
110
+ report: { ...base, message: dependencyScanMessage(base) },
111
+ };
112
+ }
113
+ //# sourceMappingURL=dependency-advisory-engine.js.map
@@ -214,6 +214,36 @@ export interface DependencyScanResult {
214
214
  readonly vulnerabilities: Vulnerability[];
215
215
  readonly outdatedPackages: OutdatedPackage[];
216
216
  readonly summary: ScanSummary;
217
+ /**
218
+ * #1049: whether the advisory lookup covered every dependency. Only
219
+ * 'complete' is a measurement; 'incomplete' findings are real but partial,
220
+ * and 'failed' means no dependency was checked (never "0 vulnerabilities").
221
+ */
222
+ readonly status: 'complete' | 'incomplete' | 'failed';
223
+ /** True only when status is 'complete'. */
224
+ readonly measured: boolean;
225
+ readonly packagesChecked: number;
226
+ readonly uncheckedPackages: UncheckedDependency[];
227
+ /** Why the scan is incomplete/failed; absent when complete. */
228
+ readonly error?: string;
229
+ }
230
+ /** A dependency whose advisories could not be checked, and why (#1049). */
231
+ export interface UncheckedDependency {
232
+ readonly name: string;
233
+ /** The spec as declared in the manifest. */
234
+ readonly version: string;
235
+ readonly reason: string;
236
+ /** Workspace member the dependency belongs to (absent for the scanned package itself). */
237
+ readonly member?: string;
238
+ /** The lockfile-resolved version, when the lockfile has one. */
239
+ readonly lockedVersion?: string;
240
+ }
241
+ /** A local (workspace / linked / file-directory) package: not an OSV subject (#1049). */
242
+ export interface LocalDependency {
243
+ readonly name: string;
244
+ readonly spec: string;
245
+ readonly reason: string;
246
+ readonly member?: string;
217
247
  }
218
248
  export interface PackageSecurityInfo {
219
249
  readonly name: string;
@@ -8,7 +8,7 @@ import { BaseDomainPlugin, TaskHandler } from '../domain-interface.js';
8
8
  import { FilePath } from '../../shared/value-objects/index.js';
9
9
  import type { SecurityAuditOptions, SecurityAuditReport, SecurityPosture, ComplianceReport, ComplianceStandard, SASTResult, DASTResult, Vulnerability, GapAnalysis } from './interfaces.js';
10
10
  import { type IExtendedSecurityComplianceCoordinator, type CoordinatorConfig } from './coordinator.js';
11
- import { type ISecurityScannerService, type SecurityScannerConfig } from './services/security-scanner.js';
11
+ import { type ISecurityScannerService, type SecurityScannerConfig, type DependencyScanResult as OSVDependencyScanResult } from './services/security-scanner.js';
12
12
  import { type ISecurityAuditorService, type SecurityAuditorConfig } from './services/security-auditor.js';
13
13
  import type { HybridRouter } from '../../shared/llm/router/hybrid-router.js';
14
14
  import { type IExtendedComplianceValidationService, type ComplianceValidatorConfig } from './services/compliance-validator.js';
@@ -26,6 +26,11 @@ export interface SecurityComplianceAPI {
26
26
  getSecurityPosture(): Promise<Result<SecurityPosture>>;
27
27
  runSASTScan(files: FilePath[]): Promise<Result<SASTResult>>;
28
28
  runDASTScan(targetUrl: string): Promise<Result<DASTResult>>;
29
+ /**
30
+ * #1049: OSV advisory scan of a package.json. Check `status`: only 'complete'
31
+ * is a measurement; 'incomplete'/'failed' list the unchecked dependencies.
32
+ */
33
+ runDependencyScan(packageJsonPath: string): Promise<Result<OSVDependencyScanResult>>;
29
34
  triageVulnerabilities(vulnerabilities: Vulnerability[]): Promise<Result<{
30
35
  immediate: Vulnerability[];
31
36
  shortTerm: Vulnerability[];
@@ -66,6 +71,7 @@ export declare class SecurityCompliancePlugin extends BaseDomainPlugin {
66
71
  protected onEvent(event: DomainEvent): Promise<void>;
67
72
  private runSecurityAudit;
68
73
  private getSecurityPosture;
74
+ private runDependencyScan;
69
75
  private runSASTScan;
70
76
  private runDASTScan;
71
77
  private triageVulnerabilities;
@@ -49,6 +49,7 @@ export class SecurityCompliancePlugin extends BaseDomainPlugin {
49
49
  getSecurityPosture: this.getSecurityPosture.bind(this),
50
50
  runSASTScan: this.runSASTScan.bind(this),
51
51
  runDASTScan: this.runDASTScan.bind(this),
52
+ runDependencyScan: this.runDependencyScan.bind(this),
52
53
  triageVulnerabilities: this.triageVulnerabilities.bind(this),
53
54
  runComplianceCheck: this.runComplianceCheck.bind(this),
54
55
  getAvailableStandards: this.getAvailableStandards.bind(this),
@@ -209,6 +210,24 @@ export class SecurityCompliancePlugin extends BaseDomainPlugin {
209
210
  return this.handleError(error);
210
211
  }
211
212
  }
213
+ async runDependencyScan(packageJsonPath) {
214
+ this.ensureInitialized();
215
+ try {
216
+ const result = await this.securityScanner.scanPackageJson(packageJsonPath);
217
+ if (result.success && result.value.status === 'complete') {
218
+ this.trackSuccessfulOperation('dependency-scan');
219
+ }
220
+ else {
221
+ this.trackFailedOperation('dependency-scan', result.success
222
+ ? new Error(result.value.error ?? 'Dependency advisory scan incomplete')
223
+ : result.error);
224
+ }
225
+ return result;
226
+ }
227
+ catch (error) {
228
+ return this.handleError(error);
229
+ }
230
+ }
212
231
  async runSASTScan(files) {
213
232
  this.ensureInitialized();
214
233
  try {
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Agentic QE v3 - Dependency resolution for the OSV advisory scan (#1049)
3
+ *
4
+ * Decides, for every direct dependency of a package.json, what can be checked
5
+ * against OSV:
6
+ *
7
+ * - check: a registry package at a concrete version — the lockfile's
8
+ * resolved version when the lockfile is in sync with package.json,
9
+ * else an exact spec. `npm:` aliases resolve to the real package.
10
+ * - local: a workspace / linked / local-directory package. Not an OSV
11
+ * subject; listed separately and never makes a scan incomplete.
12
+ * - unchecked: anything that cannot be matched without guessing — a range
13
+ * with no (in-sync) lockfile resolution, a lockfile out of sync
14
+ * with package.json, git/URL/tarball sources.
15
+ *
16
+ * The lockfile is looked up from the package directory upwards (never above
17
+ * AQE_PROJECT_ROOT or the git root), so scanning a workspace member directly
18
+ * uses the workspace root's lockfile.
19
+ *
20
+ * Workspace member scanning is not part of 3.15.7 (#1057): at a workspace root
21
+ * only the root's own dependencies are checked and the scan is reported as not
22
+ * complete, with a reason; each member can be scanned directly.
23
+ */
24
+ export interface ResolvedDependency {
25
+ /** Dependency name as declared (the alias name for `npm:` aliases). */
26
+ readonly name: string;
27
+ /** Spec as declared in package.json. */
28
+ readonly spec: string;
29
+ /** Lockfile importer the dependency belongs to ('' = the lockfile root). */
30
+ readonly member: string;
31
+ readonly kind: 'check' | 'local' | 'unchecked';
32
+ /** Registry package to check (differs from `name` for aliases). */
33
+ readonly packageName?: string;
34
+ /** Concrete version to check. */
35
+ readonly version?: string;
36
+ /** Lockfile-resolved version, also reported for unchecked packages when known. */
37
+ readonly lockedVersion?: string;
38
+ readonly reason?: string;
39
+ }
40
+ export interface DependencyResolution {
41
+ readonly dependencies: ResolvedDependency[];
42
+ /** Lockfile used (relative to the scanned package.json directory), or null. */
43
+ readonly lockfile: string | null;
44
+ /** A lockfile that exists but could not be read or parsed. */
45
+ readonly error?: string;
46
+ /**
47
+ * Reasons the scan cannot be complete beyond individual packages — today: a
48
+ * workspace root, whose members' dependencies are not scanned (#1057).
49
+ */
50
+ readonly memberErrors: string[];
51
+ }
52
+ /** The reason a workspace root's scan is not complete (#1057). */
53
+ export declare const WORKSPACE_NOT_SCANNED = "workspace member dependencies are not scanned yet (#1057); scan each member directory separately";
54
+ type Manifest = {
55
+ name?: unknown;
56
+ workspaces?: unknown;
57
+ } & Partial<Record<'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies', Record<string, unknown>>>;
58
+ /** All declared dependencies of a manifest (later fields win, as npm resolves them). */
59
+ export declare function declaredDependencies(manifest: Manifest): Record<string, string>;
60
+ /**
61
+ * Resolve a `name -> spec` record with caller-supplied resolved versions
62
+ * (programmatic use; no lockfile on disk). Same rules as `resolveDependencies`.
63
+ */
64
+ export declare function resolveFromRecord(dependencies: Record<string, string>, lockedVersions?: Record<string, string>): ResolvedDependency[];
65
+ /**
66
+ * Resolve the dependencies to check for the package.json at `manifestPath`.
67
+ * @throws when package.json itself cannot be read or parsed.
68
+ */
69
+ export declare function resolveDependencies(manifestPath: string): Promise<DependencyResolution>;
70
+ export {};
71
+ //# sourceMappingURL=dependency-resolver.d.ts.map
@@ -0,0 +1,232 @@
1
+ /**
2
+ * Agentic QE v3 - Dependency resolution for the OSV advisory scan (#1049)
3
+ *
4
+ * Decides, for every direct dependency of a package.json, what can be checked
5
+ * against OSV:
6
+ *
7
+ * - check: a registry package at a concrete version — the lockfile's
8
+ * resolved version when the lockfile is in sync with package.json,
9
+ * else an exact spec. `npm:` aliases resolve to the real package.
10
+ * - local: a workspace / linked / local-directory package. Not an OSV
11
+ * subject; listed separately and never makes a scan incomplete.
12
+ * - unchecked: anything that cannot be matched without guessing — a range
13
+ * with no (in-sync) lockfile resolution, a lockfile out of sync
14
+ * with package.json, git/URL/tarball sources.
15
+ *
16
+ * The lockfile is looked up from the package directory upwards (never above
17
+ * AQE_PROJECT_ROOT or the git root), so scanning a workspace member directly
18
+ * uses the workspace root's lockfile.
19
+ *
20
+ * Workspace member scanning is not part of 3.15.7 (#1057): at a workspace root
21
+ * only the root's own dependencies are checked and the scan is reported as not
22
+ * complete, with a reason; each member can be scanned directly.
23
+ */
24
+ import * as fs from 'fs/promises';
25
+ import * as path from 'path';
26
+ import semver from 'semver';
27
+ import { parse as parseYaml } from 'yaml';
28
+ import { safeJsonParse } from '../../../../shared/safe-json.js';
29
+ import { classifyNpmSpec, exactNpmVersion } from '../../../../shared/security/osv-lookup.js';
30
+ import { LOCKFILES, parseLockfile } from './lockfile-versions.js';
31
+ /** The reason a workspace root's scan is not complete (#1057). */
32
+ export const WORKSPACE_NOT_SCANNED = 'workspace member dependencies are not scanned yet (#1057); scan each member directory separately';
33
+ const OUT_OF_SYNC = 'lockfile out of sync with package.json';
34
+ /** All declared dependencies of a manifest (later fields win, as npm resolves them). */
35
+ export function declaredDependencies(manifest) {
36
+ const out = {};
37
+ for (const field of ['peerDependencies', 'optionalDependencies', 'devDependencies', 'dependencies']) {
38
+ for (const [name, spec] of Object.entries(manifest[field] ?? {})) {
39
+ if (typeof spec === 'string')
40
+ out[name] = spec;
41
+ }
42
+ }
43
+ return out;
44
+ }
45
+ async function readManifest(file) {
46
+ return safeJsonParse(await fs.readFile(file, 'utf-8'));
47
+ }
48
+ async function exists(file) {
49
+ try {
50
+ await fs.access(file);
51
+ return true;
52
+ }
53
+ catch {
54
+ return false;
55
+ }
56
+ }
57
+ async function realOrResolved(p) {
58
+ try {
59
+ return await fs.realpath(p);
60
+ }
61
+ catch {
62
+ return path.resolve(p);
63
+ }
64
+ }
65
+ /**
66
+ * Find the lockfile governing `dir`: walk up, but never above the project root
67
+ * (`AQE_PROJECT_ROOT` when `dir` is inside it) nor above the git root.
68
+ */
69
+ async function findLockfile(dir, env = process.env) {
70
+ let current = await realOrResolved(dir);
71
+ const projectRoot = env.AQE_PROJECT_ROOT ? await realOrResolved(env.AQE_PROJECT_ROOT) : null;
72
+ const boundary = projectRoot && isInside(projectRoot, current) ? projectRoot : null;
73
+ for (;;) {
74
+ for (const file of LOCKFILES) {
75
+ if (await exists(path.join(current, file)))
76
+ return { dir: current, file };
77
+ }
78
+ if (current === boundary || await exists(path.join(current, '.git')))
79
+ return null;
80
+ const parent = path.dirname(current);
81
+ if (parent === current)
82
+ return null;
83
+ current = parent;
84
+ }
85
+ }
86
+ /** Whether `child` is `root` or inside it (both absolute, real paths). */
87
+ function isInside(root, child) {
88
+ const rel = path.relative(root, child);
89
+ return rel === '' || (!rel.startsWith('..') && !path.isAbsolute(rel));
90
+ }
91
+ /** Largest pnpm-workspace.yaml that is read; a larger one counts as a workspace root. */
92
+ const MAX_PNPM_WORKSPACE_BYTES = 1024 * 1024;
93
+ const nonEmptyArray = (v) => Array.isArray(v) && v.length > 0;
94
+ /**
95
+ * A workspace root, detected without expanding any glob: package.json
96
+ * `workspaces` is a non-empty array or an object with a non-empty `packages`,
97
+ * or a pnpm-workspace.yaml declares workspace packages.
98
+ */
99
+ async function isWorkspaceRoot(dir, manifest) {
100
+ const ws = manifest.workspaces;
101
+ if (nonEmptyArray(ws))
102
+ return true;
103
+ if (ws !== null && typeof ws === 'object' && nonEmptyArray(ws.packages))
104
+ return true;
105
+ return pnpmDeclaresPackages(path.join(dir, 'pnpm-workspace.yaml'));
106
+ }
107
+ /**
108
+ * pnpm 10+ keeps project settings (nodeLinker, onlyBuiltDependencies, ...) in
109
+ * pnpm-workspace.yaml even for a single package, so only a file that declares
110
+ * `packages` is a workspace root. Fail closed: an unreadable, oversized,
111
+ * non-regular, dangling or unparsable file, or a `packages` that is not a list,
112
+ * counts as a root. No file, a map without `packages`, or `packages: []` does not.
113
+ */
114
+ async function pnpmDeclaresPackages(file) {
115
+ try {
116
+ await fs.lstat(file);
117
+ }
118
+ catch (e) {
119
+ return e.code !== 'ENOENT';
120
+ }
121
+ let doc;
122
+ try {
123
+ const st = await fs.stat(file); // follows a link; a dangling one throws
124
+ if (!st.isFile() || st.size > MAX_PNPM_WORKSPACE_BYTES)
125
+ return true;
126
+ const text = await fs.readFile(file, 'utf-8');
127
+ doc = parseYaml(text, { uniqueKeys: false, merge: true, maxAliasCount: 100 });
128
+ }
129
+ catch {
130
+ return true;
131
+ }
132
+ if (doc === null || typeof doc !== 'object' || Array.isArray(doc))
133
+ return true;
134
+ if (!Object.prototype.hasOwnProperty.call(doc, 'packages'))
135
+ return false;
136
+ const packages = doc.packages;
137
+ return !Array.isArray(packages) || packages.length > 0;
138
+ }
139
+ /** Resolve one declared dependency of `member`. */
140
+ function resolveOne(name, spec, member, index, localNames) {
141
+ const base = { name, spec, member };
142
+ const kind = classifyNpmSpec(spec);
143
+ if (kind.kind === 'local')
144
+ return { ...base, kind: 'local', reason: 'local package (workspace/link/file directory)' };
145
+ if (kind.kind === 'remote') {
146
+ return { ...base, kind: 'unchecked', reason: `not a registry dependency ("${spec}": git/URL/tarball source); OSV advisories cannot be matched` };
147
+ }
148
+ const packageName = kind.kind === 'alias' ? kind.name : name;
149
+ const rangeSpec = kind.spec;
150
+ const locked = index?.resolve(member, name, spec);
151
+ if (locked?.local || (!locked && localNames.has(name))) {
152
+ return { ...base, kind: 'local', reason: 'workspace package (local source)' };
153
+ }
154
+ if (locked && index) {
155
+ const recorded = index.recordedSpec(member, name);
156
+ const lockedVersion = locked.version ? exactNpmVersion(locked.version) ?? undefined : undefined;
157
+ const specDiffers = recorded === undefined || (recorded !== null && recorded !== spec);
158
+ const unsatisfied = lockedVersion !== undefined && !!semver.validRange(rangeSpec)
159
+ && !semver.satisfies(lockedVersion, rangeSpec, { includePrerelease: true });
160
+ if (specDiffers || unsatisfied) {
161
+ return {
162
+ ...base, kind: 'unchecked', ...(lockedVersion ? { lockedVersion } : {}),
163
+ reason: `${OUT_OF_SYNC} (${index.file} has ${recorded ? `"${recorded}"` : 'no entry'}${lockedVersion ? ` -> ${lockedVersion}` : ''} for "${spec}")`,
164
+ };
165
+ }
166
+ if (lockedVersion) {
167
+ return { ...base, kind: 'check', packageName: locked.realName ?? packageName, version: lockedVersion, lockedVersion };
168
+ }
169
+ }
170
+ const exact = exactNpmVersion(rangeSpec);
171
+ if (exact)
172
+ return { ...base, kind: 'check', packageName, version: exact };
173
+ return { ...base, kind: 'unchecked', reason: `version range "${spec}", no lockfile resolution` };
174
+ }
175
+ /**
176
+ * Resolve a `name -> spec` record with caller-supplied resolved versions
177
+ * (programmatic use; no lockfile on disk). Same rules as `resolveDependencies`.
178
+ */
179
+ export function resolveFromRecord(dependencies, lockedVersions = {}) {
180
+ const index = {
181
+ file: 'package-lock.json',
182
+ members: () => [],
183
+ hasImporter: () => true,
184
+ recordedSpec: () => null,
185
+ resolve: (_importer, name) => (lockedVersions[name] !== undefined ? { version: lockedVersions[name] } : undefined),
186
+ };
187
+ return Object.entries(dependencies).map(([name, spec]) => resolveOne(name, spec, '', index, new Set()));
188
+ }
189
+ /**
190
+ * Resolve the dependencies to check for the package.json at `manifestPath`.
191
+ * @throws when package.json itself cannot be read or parsed.
192
+ */
193
+ export async function resolveDependencies(manifestPath) {
194
+ const manifestDir = path.dirname(path.resolve(manifestPath));
195
+ const manifest = await readManifest(manifestPath);
196
+ let index = null;
197
+ let lockDir = await realOrResolved(manifestDir);
198
+ const realManifestDir = lockDir;
199
+ let lockfile = null;
200
+ let error;
201
+ const found = await findLockfile(manifestDir);
202
+ if (found) {
203
+ const member = path.relative(found.dir, realManifestDir).split(path.sep).join('/');
204
+ try {
205
+ const parsed = parseLockfile(found.file, await fs.readFile(path.join(found.dir, found.file), 'utf-8'));
206
+ const rootManifest = member ? await readManifest(path.join(found.dir, 'package.json')).catch(() => ({})) : manifest;
207
+ // A member scanned directly: the root lockfile covers it if it lists the
208
+ // importer (npm/pnpm) or, for yarn, if the root declares workspaces.
209
+ const covers = member === '' || parsed.hasImporter(member) && (parsed.file !== 'yarn.lock'
210
+ || await isWorkspaceRoot(found.dir, rootManifest));
211
+ if (covers) {
212
+ index = parsed;
213
+ lockDir = found.dir;
214
+ lockfile = path.relative(realManifestDir, path.join(found.dir, found.file)).split(path.sep).join('/');
215
+ }
216
+ }
217
+ catch (e) {
218
+ // #1049 round 4: a malformed lockfile is an error (the scan is not complete), not "no lockfile".
219
+ error = `${path.relative(realManifestDir, path.join(found.dir, found.file)).split(path.sep).join('/')} could not be read or parsed `
220
+ + `(${e instanceof Error ? e.message.slice(0, 120) : 'error'}); versions were not resolved from it`;
221
+ }
222
+ }
223
+ const scannedMember = path.relative(lockDir, realManifestDir).split(path.sep).join('/');
224
+ // #1057: workspace members are not scanned in 3.15.7 — a workspace root is never complete.
225
+ const memberErrors = await isWorkspaceRoot(realManifestDir, manifest) ? [WORKSPACE_NOT_SCANNED] : [];
226
+ const dependencies = [];
227
+ for (const [name, spec] of Object.entries(declaredDependencies(manifest))) {
228
+ dependencies.push(resolveOne(name, spec, scannedMember, index, new Set()));
229
+ }
230
+ return { dependencies, lockfile, memberErrors, ...(error ? { error } : {}) };
231
+ }
232
+ //# sourceMappingURL=dependency-resolver.js.map
@@ -3,6 +3,7 @@
3
3
  * Scans npm dependencies for known vulnerabilities using OSV API
4
4
  */
5
5
  import { Result } from '@shared/types/index.js';
6
+ import { OSVClient } from '@shared/security/index.js';
6
7
  import type { SecurityScannerConfig, DependencyScanResult, MemoryBackend, ScanStatus } from './scanner-types.js';
7
8
  /**
8
9
  * Dependency Scanner - OSV-based Vulnerability Detection
@@ -13,21 +14,33 @@ export declare class DependencyScanner {
13
14
  private readonly memory;
14
15
  private readonly osvClient;
15
16
  private readonly activeScans;
16
- constructor(config: SecurityScannerConfig, memory: MemoryBackend, activeScans?: Map<string, ScanStatus>);
17
+ constructor(config: SecurityScannerConfig, memory: MemoryBackend, activeScans?: Map<string, ScanStatus>, osvClient?: OSVClient);
17
18
  /**
18
- * Scan npm dependencies for known vulnerabilities using OSV API
19
+ * Scan npm dependencies (`name -> spec`) for known vulnerabilities using OSV.
20
+ *
21
+ * #1049: a failed or partial advisory lookup is recorded and returned as
22
+ * `status: 'failed' | 'incomplete'`, `measured: false`, with the unchecked
23
+ * dependencies and the error, never as a clean scan. Findings for the
24
+ * dependencies that were checked are kept.
25
+ *
26
+ * Each dependency is checked at `lockedVersions[name]` when given and
27
+ * consistent with the spec, else only when its spec is an exact version; a
28
+ * range with no resolution is reported unchecked, never guessed.
19
29
  */
20
- scanDependencies(dependencies: Record<string, string>): Promise<Result<DependencyScanResult>>;
30
+ scanDependencies(dependencies: Record<string, string>, lockedVersions?: Record<string, string>): Promise<Result<DependencyScanResult>>;
21
31
  /**
22
- * Scan a package.json file for dependency vulnerabilities
32
+ * Scan a package.json: its direct dependencies, at the versions the lockfile
33
+ * resolves. A manifest with no dependencies is a complete scan of nothing; a
34
+ * workspace root is never complete, since its members are not scanned (#1057).
23
35
  */
24
36
  scanPackageJson(packageJsonPath: string): Promise<Result<DependencyScanResult>>;
25
37
  /**
26
38
  * Get scan status
27
39
  */
28
40
  getScanStatus(scanId: string): Promise<ScanStatus>;
41
+ private runScan;
29
42
  /**
30
- * Convert OSV vulnerabilities to our internal format
43
+ * Convert OSV vulnerabilities of one checked dependency to our internal format
31
44
  */
32
45
  private convertOSVVulnerabilities;
33
46
  /**
@@ -39,7 +52,9 @@ export declare class DependencyScanner {
39
52
  */
40
53
  private calculateSummary;
41
54
  /**
42
- * Store scan results
55
+ * Store the scan record read by the security-scan worker (#1043/#1049).
56
+ * Consumers must treat it as a measurement only when
57
+ * `measured === true && status === 'complete'`.
43
58
  */
44
59
  private storeScanResults;
45
60
  }