pi-lens 4.4.10 → 4.4.11

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 (376) hide show
  1. package/CHANGELOG-USER.md +6 -6
  2. package/CHANGELOG.md +182 -0
  3. package/dist/{chunk-NE4EFHJX.js → chunk-2SD2CGVH.js} +2 -2
  4. package/dist/{chunk-7JX3RNG4.js → chunk-34RXPR7M.js} +1 -1
  5. package/dist/{chunk-2LVJQU3I.js → chunk-3C6ZZAB2.js} +33 -27
  6. package/dist/{chunk-WAA63ZJV.js → chunk-3HZ6MNB2.js} +1 -1
  7. package/dist/{chunk-IDCTDKIA.js → chunk-3NVGBFJS.js} +6 -6
  8. package/dist/{chunk-B2YUE6YD.js → chunk-3QCI3V6C.js} +11 -11
  9. package/dist/{chunk-NL5LSKVD.js → chunk-3R3Z54J7.js} +10 -4
  10. package/dist/{chunk-7WJ55KBN.js → chunk-43KD3PPM.js} +1 -1
  11. package/dist/{chunk-DVRJBQOJ.js → chunk-4HNBY7S7.js} +20 -19
  12. package/dist/chunk-4WWPDMRA.js +22 -0
  13. package/dist/{chunk-QL37SGTS.js → chunk-532X3OCZ.js} +18 -16
  14. package/dist/{chunk-ZZDVGCGG.js → chunk-5RLEDUUE.js} +9 -9
  15. package/dist/{chunk-GUGKKGG7.js → chunk-5YTDZ5WP.js} +3 -3
  16. package/dist/{chunk-FOEPIX76.js → chunk-6EIV3H7O.js} +158 -61
  17. package/dist/{chunk-E4VXKTBR.js → chunk-6K4X7IIF.js} +164 -172
  18. package/dist/{chunk-HSYFLOZY.js → chunk-6RXMQYNU.js} +3 -3
  19. package/dist/{chunk-K6WIBVMK.js → chunk-6XNVY3FW.js} +8 -9
  20. package/dist/{chunk-ACRJ2GZ5.js → chunk-7424ANRU.js} +2 -2
  21. package/dist/{chunk-PTSA6QKL.js → chunk-A4HKPAEN.js} +8 -8
  22. package/dist/{chunk-RQRKIRFY.js → chunk-AFNPNHJV.js} +8 -8
  23. package/dist/{chunk-3FRI5H4T.js → chunk-AGEQRJ5A.js} +24 -10
  24. package/dist/{chunk-MAD4QJTP.js → chunk-AJ62EQIQ.js} +15 -14
  25. package/dist/{chunk-FCQSZQAT.js → chunk-AOQKQWZU.js} +14 -5
  26. package/dist/{chunk-ZOPXB2KK.js → chunk-AVOUHMCS.js} +111 -107
  27. package/dist/{chunk-OTSTS7L2.js → chunk-AYDE7RFV.js} +34 -3
  28. package/dist/{chunk-AWQWXSW4.js → chunk-B4FAFEBP.js} +7 -2
  29. package/dist/{chunk-SKVNHCT5.js → chunk-B4K6OSLL.js} +49 -42
  30. package/dist/{chunk-2ADRLTM2.js → chunk-BBJXIZ3X.js} +3 -3
  31. package/dist/chunk-BJDB7PXU.js +25 -0
  32. package/dist/{chunk-GTTMQ6XB.js → chunk-BLL4VYGZ.js} +1 -1
  33. package/dist/{chunk-CZAWWXP6.js → chunk-BMMRLJA4.js} +7 -5
  34. package/dist/{chunk-TN5CWX5D.js → chunk-BN36MQW5.js} +35 -34
  35. package/dist/{chunk-IL6PIV33.js → chunk-C2REOMPO.js} +2 -2
  36. package/dist/{chunk-XAFZJEXY.js → chunk-C4ICGFEO.js} +23 -23
  37. package/dist/chunk-CIA7X2PZ.js +26 -0
  38. package/dist/{chunk-SJQUWQR6.js → chunk-D5L7Q57Z.js} +2 -2
  39. package/dist/{chunk-XPGH5O74.js → chunk-DBAHJFBU.js} +31 -35
  40. package/dist/{chunk-H65TYP6V.js → chunk-DNB4ZQGN.js} +37 -21
  41. package/dist/chunk-DPDA3ILA.js +108 -0
  42. package/dist/{chunk-QGITU23N.js → chunk-E3PNZDPH.js} +1 -1
  43. package/dist/{chunk-KDCIG23C.js → chunk-E6Z3CJT2.js} +13 -9
  44. package/dist/{chunk-V7F7JHS5.js → chunk-ECYUBKYX.js} +557 -551
  45. package/dist/chunk-F37CCZUA.js +27 -0
  46. package/dist/{chunk-KSTQ4VXT.js → chunk-FVEEEEIM.js} +10 -13
  47. package/dist/{chunk-GMC4ZGYR.js → chunk-GL6J5R34.js} +5 -5
  48. package/dist/{chunk-C6AODRNU.js → chunk-GTNO6F6K.js} +11 -10
  49. package/dist/{chunk-KJ3AHOCK.js → chunk-HASJPQBC.js} +10 -10
  50. package/dist/{chunk-XVB3Q2PG.js → chunk-HGEE5LDW.js} +3 -2
  51. package/dist/{chunk-F6FT6BVQ.js → chunk-HIUVHRLM.js} +35 -34
  52. package/dist/{chunk-BRESRQBE.js → chunk-HTUG7ZFK.js} +8 -8
  53. package/dist/{chunk-ALIZWXHZ.js → chunk-IBEYUBCM.js} +9 -9
  54. package/dist/{chunk-JZQGRARR.js → chunk-IJ55MYO6.js} +15 -12
  55. package/dist/{chunk-BGLS5SDN.js → chunk-IT7MFVGP.js} +2 -2
  56. package/dist/{chunk-AON2QIJF.js → chunk-ITAPXBIB.js} +20 -17
  57. package/dist/{chunk-TLWFZ66Y.js → chunk-JSQK5DH3.js} +4 -4
  58. package/dist/{chunk-VCRVNLE7.js → chunk-K2GV34T2.js} +9 -1
  59. package/dist/{chunk-QUQY3IME.js → chunk-KBSC5Z3G.js} +9 -8
  60. package/dist/{chunk-W4CUK5G6.js → chunk-KDGKKK7A.js} +2 -2
  61. package/dist/{chunk-YQA34KAF.js → chunk-KDMJ2DJD.js} +11 -11
  62. package/dist/{chunk-SG2JQ2YP.js → chunk-KNP4ENFT.js} +1 -1
  63. package/dist/chunk-KX4DF6XX.js +25 -0
  64. package/dist/{chunk-4ITEFRDH.js → chunk-LHCDWFDB.js} +37 -145
  65. package/dist/{chunk-3HM4BUHR.js → chunk-LHU6NG5Z.js} +16 -15
  66. package/dist/{chunk-6I44EDNQ.js → chunk-LIDFFCZZ.js} +17 -15
  67. package/dist/{chunk-KFRDFAOE.js → chunk-LPM6NKVI.js} +7 -7
  68. package/dist/{chunk-NBM7PNBP.js → chunk-LXE7JAMV.js} +37 -26
  69. package/dist/{chunk-UY745U35.js → chunk-ME6MF2N2.js} +1 -1
  70. package/dist/{chunk-YT2VR4SL.js → chunk-NLRKB32C.js} +7 -7
  71. package/dist/{chunk-QHOTTC4A.js → chunk-NQFXN5U7.js} +2 -2
  72. package/dist/{chunk-QUPYLQA4.js → chunk-NR4KQOXZ.js} +14 -9
  73. package/dist/{chunk-Y3EHLUPL.js → chunk-NWK7KKNO.js} +4 -4
  74. package/dist/{chunk-A5TEJZGJ.js → chunk-O6LCSHHI.js} +1 -1
  75. package/dist/{chunk-CTB5BAJI.js → chunk-OC4ZGVMH.js} +17 -14
  76. package/dist/{chunk-VPFRU5IG.js → chunk-OP5BMZKK.js} +3 -3
  77. package/dist/{chunk-MN635QYA.js → chunk-OYXD2MOM.js} +3 -3
  78. package/dist/{chunk-GVWIU7M7.js → chunk-PSUXESQ5.js} +41 -4
  79. package/dist/{chunk-J6BR5XN2.js → chunk-QAM2Q3VO.js} +3 -3
  80. package/dist/{chunk-6MDM5MQT.js → chunk-QBUSONNE.js} +367 -153
  81. package/dist/{chunk-VGTBLTPN.js → chunk-QDZ3ZZMY.js} +18 -66
  82. package/dist/{chunk-LT62P654.js → chunk-QJ4T73J5.js} +1 -1
  83. package/dist/{chunk-DOUAWKLO.js → chunk-QUZYRDT6.js} +12 -12
  84. package/dist/{chunk-UNBRHPHJ.js → chunk-R2UF54ON.js} +17 -15
  85. package/dist/{chunk-I32RSMH6.js → chunk-R2VUZZPJ.js} +11 -10
  86. package/dist/chunk-R5BNSOIV.js +29 -0
  87. package/dist/chunk-RV5VX2XW.js +29 -0
  88. package/dist/{chunk-QWTHFFU6.js → chunk-SQBDX6IO.js} +12 -12
  89. package/dist/{chunk-CZCAZVTD.js → chunk-SRXYSLMW.js} +2 -2
  90. package/dist/{chunk-WS3UFJOU.js → chunk-SUIZOCSY.js} +3 -2
  91. package/dist/{chunk-NUSXS6YB.js → chunk-T5EGSBM2.js} +4 -4
  92. package/dist/{chunk-QMV2APEH.js → chunk-TBE4OLPA.js} +37 -35
  93. package/dist/{chunk-B6HXETWY.js → chunk-TPMBNWHO.js} +28 -26
  94. package/dist/{chunk-CYUJB552.js → chunk-TRYOYWWU.js} +18 -12
  95. package/dist/{chunk-TJQSYX3J.js → chunk-TTGDTNSN.js} +6 -6
  96. package/dist/{chunk-S3WFVG5P.js → chunk-UELHWF5I.js} +137 -126
  97. package/dist/chunk-UG4YLCJ5.js +58 -0
  98. package/dist/chunk-UQ6OZYTO.js +91 -0
  99. package/dist/{chunk-QSCZAP24.js → chunk-UY3WWW5R.js} +4 -4
  100. package/dist/chunk-V7IPIAE5.js +74 -0
  101. package/dist/{chunk-4NCDHTFI.js → chunk-VDMF7Q2P.js} +10 -10
  102. package/dist/{chunk-TYHOEX4V.js → chunk-VI3BJMZO.js} +35 -34
  103. package/dist/{chunk-UOO4D2TK.js → chunk-VTXJAO5R.js} +34 -35
  104. package/dist/chunk-W6VLB6LL.js +145 -0
  105. package/dist/{chunk-NPNFGYLV.js → chunk-WBXCIRVI.js} +19 -2
  106. package/dist/{chunk-CB7PEVOJ.js → chunk-WLD6BGON.js} +176 -60
  107. package/dist/{chunk-Q2VCKC3X.js → chunk-WMCAEP2K.js} +11 -8
  108. package/dist/{chunk-OPFNQBS5.js → chunk-WXMUGUZV.js} +21 -25
  109. package/dist/{chunk-46TQJSUE.js → chunk-X33QECRJ.js} +2 -2
  110. package/dist/{chunk-HILZE4BQ.js → chunk-YUF4DRYB.js} +396 -306
  111. package/dist/{chunk-YF4G5NN5.js → chunk-YVPB5YGO.js} +2 -2
  112. package/dist/{chunk-W7TY6HYX.js → chunk-ZRQMENT4.js} +5 -27
  113. package/dist/index.js +5573 -4181
  114. package/dist/mcp/analyze-cli.js +17 -11
  115. package/dist/mcp/cli.js +43 -42
  116. package/dist/mcp/server.js +1521 -610
  117. package/dist/mcp/worker.js +62 -59
  118. package/dist/probes/installer.js +19 -18
  119. package/docs/agent-guide.md +3 -1
  120. package/docs/agent-tools.md +4 -2
  121. package/docs/alignment-families.md +5 -1
  122. package/docs/ci.md +120 -0
  123. package/docs/configuration.md +21 -3
  124. package/docs/custom-rules.md +1 -0
  125. package/docs/defect-shapes.md +107 -71
  126. package/docs/durable-store-audit-1202.md +1 -1
  127. package/docs/engineering-principles.md +46 -12
  128. package/docs/environment-variables.md +25 -2
  129. package/docs/features.md +1 -1
  130. package/docs/invariants/dispatch-runners.md +13 -0
  131. package/docs/language-coverage.md +1 -1
  132. package/docs/lsp-capability-matrix.md +15 -16
  133. package/docs/lsp-idle-eviction.md +1 -1
  134. package/docs/module-report-read-symbol.md +2 -2
  135. package/docs/pi-lens-fixer.md +3 -2
  136. package/docs/pi-lens-merge-policy.md +1 -0
  137. package/docs/pi-lens-monitor.md +4 -1
  138. package/docs/pi-lens-release.md +19 -0
  139. package/docs/pi-lens-reviewer.md +8 -2
  140. package/docs/public-api-stability.md +41 -6
  141. package/docs/rfcs/5138-query-surface.md +121 -0
  142. package/docs/servercapabilities.md +1 -1
  143. package/docs/settings.md +9 -0
  144. package/docs/word-index.md +9 -10
  145. package/package.json +3 -3
  146. package/rules/ast-grep-rules/coderabbit/README.md +2 -0
  147. package/rules/ast-grep-rules/coderabbit/rules/c/security/dont-call-system-c.yml +2 -1
  148. package/rules/ast-grep-rules/coderabbit/rules/c/security/file-access-before-action-c.yml +2 -1
  149. package/rules/ast-grep-rules/coderabbit/rules/c/security/file-stat-before-action-c.yml +2 -1
  150. package/rules/ast-grep-rules/coderabbit/rules/c/security/insecure-hash-c.yml +2 -1
  151. package/rules/ast-grep-rules/coderabbit/rules/c/security/libxml2-audit-parser-c.yml +2 -1
  152. package/rules/ast-grep-rules/coderabbit/rules/c/security/null-library-function-c.yml +2 -1
  153. package/rules/ast-grep-rules/coderabbit/rules/c/security/sizeof-this-c.yml +2 -1
  154. package/rules/ast-grep-rules/coderabbit/rules/c/security/small-key-size-c.yml +2 -1
  155. package/rules/ast-grep-rules/coderabbit/rules/c/security/world-writable-file-c.yml +2 -1
  156. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/dont-call-system-cpp.yml +2 -1
  157. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-access-before-action-cpp.yml +2 -1
  158. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-stat-before-action-cpp.yml +2 -1
  159. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/fix-format-security-error-cpp.yml +2 -1
  160. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/insecure-hash-cpp.yml +2 -1
  161. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/libxml2-audit-parser-cpp.yml +2 -1
  162. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/missing-nul-cpp-string-memcpy-cpp.yml +2 -1
  163. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/null-library-function-cpp.yml +2 -1
  164. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/return-c-str-cpp.yml +2 -1
  165. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/sizeof-this-cpp.yml +2 -1
  166. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/small-key-size-cpp.yml +2 -1
  167. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-return-data-cpp.yml +2 -1
  168. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-vector-invalidation-cpp.yml +2 -1
  169. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/string-view-temporary-string-cpp.yml +2 -1
  170. package/rules/ast-grep-rules/coderabbit/rules/cpp/security/world-writable-file-cpp.yml +2 -1
  171. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/httponly-false-csharp.yml +2 -1
  172. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/insecure-binaryformatter-deserialization-csharp.yml +2 -1
  173. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-decode-without-verify-csharp.yml +2 -1
  174. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-hardcoded-secret-csharp.yml +2 -1
  175. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-tokenvalidationparameters-no-expiry-validation-csharp.yml +2 -1
  176. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/networkcredential-hardcoded-secret-python.yml +2 -1
  177. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/npgsqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  178. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/oracleconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  179. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/sqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  180. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/stacktrace-disclosure-csharp.yml +2 -1
  181. package/rules/ast-grep-rules/coderabbit/rules/csharp/security/use-ecb-mode-csharp.yml +2 -1
  182. package/rules/ast-grep-rules/coderabbit/rules/go/security/avoid-bind-to-all-interfaces-go.yml +2 -1
  183. package/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-cookie-store-hardcoded-session-key-go.yml +2 -1
  184. package/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-csrf-hardcoded-auth-key-go.yml +2 -1
  185. package/rules/ast-grep-rules/coderabbit/rules/go/security/grpc-client-insecure-connection-go.yml +2 -1
  186. package/rules/ast-grep-rules/coderabbit/rules/go/security/jwt-go-none-algorithm-go.yml +2 -1
  187. package/rules/ast-grep-rules/coderabbit/rules/go/security/missing-ssl-minversion-go.yml +2 -1
  188. package/rules/ast-grep-rules/coderabbit/rules/go/security/openai-empty-secret-go.yml +2 -1
  189. package/rules/ast-grep-rules/coderabbit/rules/go/security/openai-hardcoded-secret-go.yml +2 -1
  190. package/rules/ast-grep-rules/coderabbit/rules/go/security/ssl-v3-is-insecure-go.yml +2 -1
  191. package/rules/ast-grep-rules/coderabbit/rules/go/security/tls-with-insecure-cipher-go.yml +2 -1
  192. package/rules/ast-grep-rules/coderabbit/rules/go/security/use-of-weak-rsa-key-go.yml +2 -1
  193. package/rules/ast-grep-rules/coderabbit/rules/html/security/plaintext-http-link-html.yml +2 -1
  194. package/rules/ast-grep-rules/coderabbit/rules/java/security/cbc-padding-oracle-java.yml +2 -1
  195. package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-httponly-false-java.yml +2 -1
  196. package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-httponly-java.yml +2 -1
  197. package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-samesite-java.yml +2 -1
  198. package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-secure-flag-java.yml +2 -1
  199. package/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-secure-flag-false-java.yml +2 -1
  200. package/rules/ast-grep-rules/coderabbit/rules/java/security/datanucleus-hardcoded-connection-password-java.yml +2 -1
  201. package/rules/ast-grep-rules/coderabbit/rules/java/security/des-is-deprecated-java.yml +2 -1
  202. package/rules/ast-grep-rules/coderabbit/rules/java/security/desede-is-deprecated-java.yml +2 -1
  203. package/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-disallow-doctype-decl-false-java.yml +2 -1
  204. package/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-general-entities-true-java.yml +2 -1
  205. package/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-parameter-entities-true-java.yml +2 -1
  206. package/rules/ast-grep-rules/coderabbit/rules/java/security/drivermanager-hardcoded-secret-java.yml +2 -1
  207. package/rules/ast-grep-rules/coderabbit/rules/java/security/ecb-cipher-java.yml +2 -1
  208. package/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-connection-password-java.yml +2 -1
  209. package/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-secret-in-credentials-java.yml +2 -1
  210. package/rules/ast-grep-rules/coderabbit/rules/java/security/java-jwt-hardcoded-secret-java.yml +2 -1
  211. package/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml +2 -1
  212. package/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisfactory-hardcoded-password-java.yml +2 -1
  213. package/rules/ast-grep-rules/coderabbit/rules/java/security/missing-httponly-java.yml +2 -1
  214. package/rules/ast-grep-rules/coderabbit/rules/java/security/missing-secure-java.yml +2 -1
  215. package/rules/ast-grep-rules/coderabbit/rules/java/security/no-null-cipher-java.yml +2 -1
  216. package/rules/ast-grep-rules/coderabbit/rules/java/security/passwordauthentication-hardcoded-password-java.yml +2 -1
  217. package/rules/ast-grep-rules/coderabbit/rules/java/security/rsa-no-padding-java.yml +2 -1
  218. package/rules/ast-grep-rules/coderabbit/rules/java/security/simple-command-injection-direct-input-java.yml +2 -1
  219. package/rules/ast-grep-rules/coderabbit/rules/java/security/system-setproperty-hardcoded-secret-java.yml +2 -1
  220. package/rules/ast-grep-rules/coderabbit/rules/java/security/unencrypted-socket-java.yml +2 -1
  221. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-aes-ecb-java.yml +2 -1
  222. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-blowfish-java.yml +2 -1
  223. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-default-aes-java.yml +2 -1
  224. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-digest-utils-java.yml +2 -1
  225. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-java.yml +2 -1
  226. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc2-java.yml +2 -1
  227. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc4-java.yml +2 -1
  228. package/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-sha1-java.yml +2 -1
  229. package/rules/ast-grep-rules/coderabbit/rules/java/security/weak-ssl-context-java.yml +2 -1
  230. package/rules/ast-grep-rules/coderabbit/rules/javascript/security/detect-angular-sce-disabled-javascript.yml +2 -1
  231. package/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-jwt-hardcoded-secret-javascript.yml +2 -1
  232. package/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-session-hardcoded-secret-javascript.yml +2 -1
  233. package/rules/ast-grep-rules/coderabbit/rules/javascript/security/jwt-simple-noverify-javascript.yml +2 -1
  234. package/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-rsa-weak-key-javascript.yml +2 -1
  235. package/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-empty-password-argument-javascript.yml +2 -1
  236. package/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-hardcoded-secret-argument-javascript.yml +2 -1
  237. package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/des-is-deprecated-kotlin.yml +2 -1
  238. package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/desede-is-deprecated-kotlin.yml +2 -1
  239. package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/jwt-hardcode-kotlin.yml +2 -1
  240. package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/rsa-no-padding-kotlin.yml +2 -1
  241. package/rules/ast-grep-rules/coderabbit/rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml +2 -1
  242. package/rules/ast-grep-rules/coderabbit/rules/php/security/openssl-cbc-static-iv-php.yml +2 -1
  243. package/rules/ast-grep-rules/coderabbit/rules/php/security/search-active-debug-php.yml +2 -1
  244. package/rules/ast-grep-rules/coderabbit/rules/python/security/avoid-mktemp-python.yml +2 -1
  245. package/rules/ast-grep-rules/coderabbit/rules/python/security/avoid_app_run_with_bad_host-python.yml +2 -1
  246. package/rules/ast-grep-rules/coderabbit/rules/python/security/debug-enabled-python.yml +2 -1
  247. package/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-django-secret-python.yml +2 -1
  248. package/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-flask-secret-python.yml +2 -1
  249. package/rules/ast-grep-rules/coderabbit/rules/python/security/insecure-cipher-algorithm-rc4-python.yml +2 -1
  250. package/rules/ast-grep-rules/coderabbit/rules/python/security/jwt-python-hardcoded-secret-python.yml +2 -1
  251. package/rules/ast-grep-rules/coderabbit/rules/python/security/openai-hardcoded-secret-python.yml +2 -1
  252. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-empty-password-python.yml +2 -1
  253. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-hardcoded-secret-python.yml +2 -1
  254. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-empty-password-python.yml +2 -1
  255. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-hardcoded-secret-python.yml +2 -1
  256. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-elasticsearch-hardcoded-bearer-auth-python.yml +2 -1
  257. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-empty-password-python.yml +2 -1
  258. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-hardcoded-secret-python.yml +2 -1
  259. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-empty-password-python.yml +2 -1
  260. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-hardcoded-secret-python.yml +2 -1
  261. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-empty-password-python.yml +2 -1
  262. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-hardcoded-secret-python.yml +2 -1
  263. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-empty-password-python.yml +2 -1
  264. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml +2 -1
  265. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-empty-password-python.yml +2 -1
  266. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-hardcoded-secret-python.yml +2 -1
  267. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-empty-password-python.yml +2 -1
  268. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-hardcoded-secret-python.yml +2 -1
  269. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-empty-password-python.yml +2 -1
  270. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-hardcoded-secret-python.yml +2 -1
  271. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-empty-password-python.yml +2 -1
  272. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-hardcoded-secret-python.yml +2 -1
  273. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-empty-password-python.yml +2 -1
  274. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-hardcoded-secret-python.yml +2 -1
  275. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pyjwt-hardcoded-secret-python.yml +2 -1
  276. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-empty-password-python.yml +2 -1
  277. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-hardcoded-secret-python.yml +2 -1
  278. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-empty-password-python.yml +2 -1
  279. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-hardcoded-secret-python.yml +2 -1
  280. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-empty-password-python.yml +2 -1
  281. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-hardcoded-secret-python.yml +2 -1
  282. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-empty-password-python.yml +2 -1
  283. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-hardcoded-secret-python.yml +2 -1
  284. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-empty-password-python.yml +2 -1
  285. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-hardcoded-secret-python.yml +2 -1
  286. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-oauth-hardcoded-secret-python.yml +2 -1
  287. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-empty-password-python.yml +2 -1
  288. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-hardcoded-secret-python.yml +2 -1
  289. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-urllib3-hardcoded-secret-python.yml +2 -1
  290. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-empty-password-python.yml +2 -1
  291. package/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-hardcoded-secret-python.yml +2 -1
  292. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/force-ssl-false-ruby.yml +2 -1
  293. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-http-auth-in-controller-ruby.yml +2 -1
  294. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-secret-rsa-passphrase-ruby.yml +2 -1
  295. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/insufficient-rsa-key-size-ruby.yml +2 -1
  296. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-aws-sdk-hardcoded-secret-ruby.yml +2 -1
  297. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-empty-password-ruby.yml +2 -1
  298. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-hardcoded-secret-ruby.yml +2 -1
  299. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-excon-hardcoded-secret-ruby.yml +2 -1
  300. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-faraday-hardcoded-secret-ruby.yml +2 -1
  301. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-empty-password-ruby.yml +2 -1
  302. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-hardcoded-secret-ruby.yml +2 -1
  303. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-empty-password-ruby.yml +2 -1
  304. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-hardcoded-secret-ruby.yml +2 -1
  305. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-octokit-hardcoded-secret-ruby.yml +2 -1
  306. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-empty-password-ruby.yml +2 -1
  307. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-hardcoded-secret-ruby.yml +2 -1
  308. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-empty-password-ruby.yml +2 -1
  309. package/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-hardcoded-secret-ruby.yml +2 -1
  310. package/rules/ast-grep-rules/coderabbit/rules/rust/security/empty-password-rust.yml +2 -1
  311. package/rules/ast-grep-rules/coderabbit/rules/rust/security/hardcoded-password-rust.yml +2 -1
  312. package/rules/ast-grep-rules/coderabbit/rules/rust/security/postgres-empty-password-rust.yml +2 -1
  313. package/rules/ast-grep-rules/coderabbit/rules/rust/security/reqwest-accept-invalid-rust.yml +2 -1
  314. package/rules/ast-grep-rules/coderabbit/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml +2 -1
  315. package/rules/ast-grep-rules/coderabbit/rules/rust/security/ssl-verify-none-rust.yml +2 -1
  316. package/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-empty-password-rust.yml +2 -1
  317. package/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-hardcoded-password-rust.yml +2 -1
  318. package/rules/ast-grep-rules/coderabbit/rules/scala/security/jwt-scala-hardcode-scala.yml +2 -1
  319. package/rules/ast-grep-rules/coderabbit/rules/scala/security/scala-jwt-hardcoded-secret-scala.yml +2 -1
  320. package/rules/ast-grep-rules/coderabbit/rules/swift/security/aes-hardcoded-secret-swift.yml +2 -1
  321. package/rules/ast-grep-rules/coderabbit/rules/swift/security/blowfish-hardcoded-secret-swift.yml +2 -1
  322. package/rules/ast-grep-rules/coderabbit/rules/swift/security/chacha20-hardcoded-secret-swift.yml +2 -1
  323. package/rules/ast-grep-rules/coderabbit/rules/swift/security/insecure-biometrics-swift.yml +2 -1
  324. package/rules/ast-grep-rules/coderabbit/rules/swift/security/rabbit-hardcoded-secret-swift.yml +2 -1
  325. package/rules/ast-grep-rules/coderabbit/rules/typescript/security/detect-angular-sce-disabled-typescript.yml +2 -1
  326. package/rules/ast-grep-rules/coderabbit/rules/typescript/security/express-session-hardcoded-secret-typescript.yml +2 -1
  327. package/rules/ast-grep-rules/coderabbit/rules/typescript/security/jwt-simple-noverify-typescript.yml +2 -1
  328. package/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-rsa-weak-key-typescript.yml +2 -1
  329. package/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-empty-password-argument-typescript.yml +2 -1
  330. package/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-hardcoded-secret-argument-typescript.yml +2 -1
  331. package/rules/ast-grep-rules/rule-schema.json +1 -1
  332. package/rules/ast-grep-rules/rules/c-no-malloc-free.yml +13 -12
  333. package/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +11 -10
  334. package/rules/ast-grep-rules/rules/cpp-no-printf.yml +10 -9
  335. package/rules/ast-grep-rules/rules/go-defer-func-call-antipattern.yml +14 -13
  336. package/rules/ast-grep-rules/rules/go-no-fmt-println.yml +14 -13
  337. package/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +20 -19
  338. package/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +14 -13
  339. package/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +14 -13
  340. package/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +19 -18
  341. package/rules/ast-grep-rules/rules/go-test-functions.yml +14 -13
  342. package/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +10 -9
  343. package/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +12 -11
  344. package/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +11 -10
  345. package/rules/ast-grep-rules/rules/kotlin-no-println.yml +15 -14
  346. package/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +10 -9
  347. package/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +10 -9
  348. package/rules/ast-grep-rules/rules/kotlin-no-var.yml +11 -10
  349. package/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +10 -9
  350. package/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +10 -9
  351. package/rules/ast-grep-rules/rules/no-aws-access-key-literal.yml +1 -1
  352. package/rules/ast-grep-rules/rules/no-compile-call.yml +13 -12
  353. package/rules/ast-grep-rules/rules/no-flask-secret-key-literal.yml +1 -1
  354. package/rules/ast-grep-rules/rules/no-hardcoded-password.yml +1 -1
  355. package/rules/ast-grep-rules/rules/no-marshal-load.yml +12 -11
  356. package/rules/ast-grep-rules/rules/no-python-sql-string-concat.yml +12 -11
  357. package/rules/ast-grep-rules/rules/no-requests-verify-false.yml +13 -12
  358. package/rules/ast-grep-rules/rules/no-secret-in-env-var-name.yml +1 -1
  359. package/rules/ast-grep-rules/rules/python-optional-type.yml +9 -8
  360. package/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +8 -7
  361. package/rules/ast-grep-rules/rules/ruby-detect-path-traversal.yml +14 -13
  362. package/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +8 -7
  363. package/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +9 -8
  364. package/rules/ast-grep-rules/rules-disabled/gorm-unbounded-preload.yml +7 -6
  365. package/rules/ast-grep-rules/rules-disabled/shadow-err-variable.yml +6 -5
  366. package/scripts/analyze-pi-lens-logs.mjs +262 -3
  367. package/scripts/lib/latency-log-phases.mjs +125 -0
  368. package/dist/chunk-3QWVOBZJ.js +0 -73
  369. package/dist/chunk-BDR5MEZY.js +0 -25
  370. package/dist/chunk-DBS736MA.js +0 -57
  371. package/dist/chunk-I74RQGKA.js +0 -88
  372. package/dist/chunk-IK4YS3KC.js +0 -25
  373. package/dist/chunk-JKOZ2Z4U.js +0 -20
  374. package/dist/chunk-TQHOKMVZ.js +0 -28
  375. package/dist/chunk-VS2L7QDI.js +0 -25
  376. package/dist/chunk-ZPFLHB3R.js +0 -28
@@ -8,25 +8,26 @@ import {
8
8
  resolveTreeSitterLanguage,
9
9
  walk,
10
10
  withTreeSitterRoot
11
- } from "./chunk-CTB5BAJI.js";
11
+ } from "./chunk-OC4ZGVMH.js";
12
12
  import "./chunk-Z54ZSOBZ.js";
13
- import "./chunk-GUGKKGG7.js";
14
- import "./chunk-QGITU23N.js";
15
- import "./chunk-OTSTS7L2.js";
16
- import "./chunk-WAA63ZJV.js";
17
- import "./chunk-NPNFGYLV.js";
18
- import "./chunk-H65TYP6V.js";
19
- import "./chunk-CZCAZVTD.js";
20
- import "./chunk-FOEPIX76.js";
21
- import "./chunk-NL5LSKVD.js";
22
- import "./chunk-7WJ55KBN.js";
13
+ import "./chunk-5YTDZ5WP.js";
14
+ import "./chunk-E3PNZDPH.js";
15
+ import "./chunk-AYDE7RFV.js";
16
+ import "./chunk-3HZ6MNB2.js";
17
+ import "./chunk-WBXCIRVI.js";
18
+ import "./chunk-DNB4ZQGN.js";
19
+ import "./chunk-SRXYSLMW.js";
20
+ import "./chunk-6EIV3H7O.js";
21
+ import "./chunk-3R3Z54J7.js";
22
+ import "./chunk-CIA7X2PZ.js";
23
+ import "./chunk-43KD3PPM.js";
23
24
  import {
24
25
  createSubsystemLogger
25
- } from "./chunk-3FRI5H4T.js";
26
+ } from "./chunk-AGEQRJ5A.js";
26
27
  import "./chunk-S26LC76R.js";
27
- import "./chunk-VCRVNLE7.js";
28
+ import "./chunk-K2GV34T2.js";
28
29
  import "./chunk-LJDODBBZ.js";
29
- import "./chunk-CB7PEVOJ.js";
30
+ import "./chunk-WLD6BGON.js";
30
31
  import "./chunk-NXL4FFQQ.js";
31
32
 
32
33
  // dist/clients/complexity-client.js
@@ -1,20 +1,20 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getProjectDataDir
4
- } from "./chunk-H65TYP6V.js";
4
+ } from "./chunk-DNB4ZQGN.js";
5
5
  import {
6
6
  createNdjsonLogger,
7
7
  getGlobalPiLensLogDir,
8
8
  getProcessSingleton,
9
9
  getTurnId,
10
10
  isTestMode
11
- } from "./chunk-VCRVNLE7.js";
11
+ } from "./chunk-K2GV34T2.js";
12
12
  import {
13
13
  BoundedFifoMap,
14
14
  normalizeFilePath,
15
15
  normalizeMapKey,
16
16
  toPosix
17
- } from "./chunk-CB7PEVOJ.js";
17
+ } from "./chunk-WLD6BGON.js";
18
18
 
19
19
  // dist/clients/hashline-anchor.js
20
20
  var HASHLINE_ANCHOR_LENGTH = 3;
@@ -97,6 +97,14 @@ var FINDING_ID_HASH_LENGTH = 12;
97
97
  function normalizeMessage(message) {
98
98
  return message.replace(/\s+/g, " ").trim().toLowerCase();
99
99
  }
100
+ var DISPLAYED_MESSAGE_MAX_CHARS = 100;
101
+ function displayedMessage(message) {
102
+ const [firstLine = ""] = message.split("\n");
103
+ return firstLine.slice(0, DISPLAYED_MESSAGE_MAX_CHARS);
104
+ }
105
+ function messageIsCutWhenDisplayed(message) {
106
+ return message.length > DISPLAYED_MESSAGE_MAX_CHARS || message.includes("\n");
107
+ }
100
108
  function findingIdentity(d) {
101
109
  return JSON.stringify([
102
110
  d.tool ?? "",
@@ -182,8 +190,7 @@ var writer = createNdjsonLogger({
182
190
  });
183
191
  var VERBOSE_READ_GUARD_LOG = process.env.PI_LENS_READ_GUARD_VERBOSE === "1" || process.env.PI_LENS_READ_GUARD_LOG === "verbose";
184
192
  var LOG_ALLOWED_EDITS = process.env.PI_LENS_READ_GUARD_LOG_ALLOWS === "1";
185
- var SNAPSHOT_LOG_SETTING = (process.env.PI_LENS_READ_GUARD_LOG_SNAPSHOTS ?? "1").toLowerCase();
186
- var LOG_SNAPSHOT_VALIDATION = !["0", "false", "off"].includes(SNAPSHOT_LOG_SETTING);
193
+ var LOG_SNAPSHOT_VALIDATION = process.env.PI_LENS_READ_GUARD_LOG_SNAPSHOTS !== "0";
187
194
  var MAX_EDIT_BATCH_ITEMS = 100;
188
195
  var generatedCorrelationCounter = 0;
189
196
  var CORRELATION_ID_MAX = 64;
@@ -373,6 +380,8 @@ var RESOLVED_RANGE_CARRY = new BoundedFifoMap(RESOLVED_RANGE_CARRY_LIMIT);
373
380
 
374
381
  export {
375
382
  normalizeMessage,
383
+ displayedMessage,
384
+ messageIsCutWhenDisplayed,
376
385
  findingIdentity,
377
386
  foldedFindingIdentity,
378
387
  ANY_POSITION,
@@ -1,48 +1,54 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  getScratchTreeDirNames
4
- } from "./chunk-SJQUWQR6.js";
4
+ } from "./chunk-D5L7Q57Z.js";
5
5
  import {
6
6
  SecurityScanClient
7
- } from "./chunk-VGTBLTPN.js";
8
- import "./chunk-4ITEFRDH.js";
7
+ } from "./chunk-QDZ3ZZMY.js";
9
8
  import {
10
- resolveOpengrepConfig
11
- } from "./chunk-NE4EFHJX.js";
9
+ runReportScan
10
+ } from "./chunk-DPDA3ILA.js";
11
+ import "./chunk-LHCDWFDB.js";
12
12
  import {
13
- scannerReportParentDir
14
- } from "./chunk-LT62P654.js";
13
+ resolveOpengrepConfig
14
+ } from "./chunk-2SD2CGVH.js";
15
+ import "./chunk-QJ4T73J5.js";
15
16
  import {
16
17
  stripPackRuleIdPrefix
17
- } from "./chunk-SG2JQ2YP.js";
18
- import "./chunk-VPFRU5IG.js";
19
- import "./chunk-NPNFGYLV.js";
18
+ } from "./chunk-KNP4ENFT.js";
19
+ import "./chunk-W6VLB6LL.js";
20
+ import "./chunk-OP5BMZKK.js";
21
+ import "./chunk-WBXCIRVI.js";
20
22
  import {
21
23
  safeSpawnAsync
22
- } from "./chunk-H65TYP6V.js";
23
- import "./chunk-AWQWXSW4.js";
24
- import "./chunk-FOEPIX76.js";
25
- import "./chunk-NL5LSKVD.js";
26
- import "./chunk-7WJ55KBN.js";
24
+ } from "./chunk-DNB4ZQGN.js";
25
+ import "./chunk-B4FAFEBP.js";
26
+ import "./chunk-6EIV3H7O.js";
27
+ import "./chunk-3R3Z54J7.js";
28
+ import "./chunk-43KD3PPM.js";
27
29
  import {
30
+ LEDGER_FIELD_MAX,
28
31
  recordDegradationOnce
29
- } from "./chunk-3FRI5H4T.js";
32
+ } from "./chunk-AGEQRJ5A.js";
30
33
  import "./chunk-S26LC76R.js";
31
- import "./chunk-VCRVNLE7.js";
34
+ import "./chunk-K2GV34T2.js";
32
35
  import "./chunk-LJDODBBZ.js";
33
36
  import {
34
37
  realpathOrResolve
35
- } from "./chunk-CB7PEVOJ.js";
38
+ } from "./chunk-WLD6BGON.js";
36
39
  import "./chunk-NXL4FFQQ.js";
37
40
 
38
41
  // dist/clients/opengrep-client.js
39
- import * as fs from "node:fs";
40
42
  import * as path from "node:path";
41
- import { mkdtempSync } from "node:fs";
42
43
  var EMPTY_RESULT = {
43
44
  success: false,
44
45
  findings: []
45
46
  };
47
+ var OPENGREP_FAILURE_REASONS = {
48
+ "spawn-error": "spawn-failed",
49
+ "no-report": "no-report",
50
+ crashed: "crashed"
51
+ };
46
52
  var SCAN_TIMEOUT_MS = 18e4;
47
53
  var OpengrepClient = class _OpengrepClient extends SecurityScanClient {
48
54
  constructor(verbose = false) {
@@ -82,15 +88,12 @@ var OpengrepClient = class _OpengrepClient extends SecurityScanClient {
82
88
  }
83
89
  return this.dedupeScan(targetDir, () => this.runScan(targetDir));
84
90
  }
85
- async runScan(cwd) {
86
- const scannedAt = (/* @__PURE__ */ new Date()).toISOString();
91
+ runScan(cwd) {
87
92
  const bin = this.binaryPath ?? "opengrep";
88
93
  const resolved = _OpengrepClient.resolveConfig(cwd);
89
94
  const packPath = resolved.source === "pack" ? resolved.configArg : void 0;
90
- const outDir = mkdtempSync(path.join(scannerReportParentDir(), "pi-lens-opengrep-"));
91
- const reportPath = path.join(outDir, "opengrep-report.json");
92
- try {
93
- const result = await safeSpawnAsync(bin, [
95
+ return runReportScan("opengrep", {
96
+ spawn: ({ reportPath }) => safeSpawnAsync(bin, [
94
97
  "scan",
95
98
  "--config",
96
99
  resolved.configArg ?? "auto",
@@ -117,90 +120,91 @@ var OpengrepClient = class _OpengrepClient extends SecurityScanClient {
117
120
  pattern
118
121
  ]),
119
122
  cwd
120
- ], { cwd, timeout: SCAN_TIMEOUT_MS });
121
- if (result.error) {
122
- this.log(`Scan error: ${result.error.message}`);
123
- const reason = `${result.failure ?? "spawn-failed"}: ${result.error.message}`;
124
- this.recordRefusal(cwd, reason, result.status);
123
+ ], { cwd, timeout: SCAN_TIMEOUT_MS }),
124
+ // The report's own content is the verdict, whatever the exit status
125
+ // (#5411: the policy `runReportScan` gives gitleaks and trivy): opengrep
126
+ // runs with `--no-error`, and an error that matters is in the report's
127
+ // `errors`, which `readOpengrepReport` refuses or marks partial.
128
+ parse: (raw, scannedAt, run) => {
129
+ const report = readOpengrepReport(raw);
130
+ if (report.verdict === "refused") {
131
+ this.recordRefusal(cwd, report.reason, run.status);
132
+ return {
133
+ ...EMPTY_RESULT,
134
+ scannedAt,
135
+ reason: "refused",
136
+ summary: report.reason.slice(0, LEDGER_FIELD_MAX)
137
+ };
138
+ }
139
+ if (report.partial) {
140
+ recordDegradationOnce({
141
+ kind: "opengrep-partial-scan",
142
+ subject: cwd,
143
+ reason: report.partial.reason,
144
+ metadata: { status: run.status }
145
+ });
146
+ }
125
147
  return {
126
- ...EMPTY_RESULT,
127
- scannedAt,
128
- reason: "spawn-failed",
129
- summary: reason.slice(0, 200)
148
+ success: true,
149
+ // A warning-level partial report with no scanned paths proves that
150
+ // the producer went cold. A complete empty report still proves a
151
+ // genuine scan, so it is still "analysed" for the render layer's
152
+ // analysed-and-found-nothing state (#2970) — but it carries no
153
+ // FILE-level authority, which `analyzedFiles: []` below is what
154
+ // says.
155
+ analyzed: !report.partial || report.scanned.length > 0,
156
+ // #2962: the set is ALWAYS carried, empty included. "This producer
157
+ // declared its coverage and it was zero files" and "this producer
158
+ // declares no coverage at all" are different facts; dropping the
159
+ // empty array collapses them into the second, and the second is
160
+ // what hands a zero-file scan whole-root retirement authority
161
+ // downstream (`runnerRetirementDecision`, tools/lens-diagnostics.ts).
162
+ analyzedFiles: report.scanned.map((file) => realpathOrResolve(path.resolve(cwd, file))),
163
+ ...report.partial ? { partial: true } : {},
164
+ ...report.partial ? { summary: report.partial.reason } : {},
165
+ ...report.partial && report.scanned.length === 0 ? { reason: "partial-no-paths" } : {},
166
+ // The cached pack is loaded from a path, so Opengrep prefixes its rule
167
+ // ids with it; report the registry-form id instead.
168
+ findings: packPath ? report.findings.map((finding) => ({
169
+ ...finding,
170
+ checkId: stripPackRuleIdPrefix(finding.checkId, packPath)
171
+ })) : report.findings,
172
+ scannedAt
130
173
  };
131
- }
132
- if (!fs.existsSync(reportPath)) {
133
- const reason = (result.stderr ?? "").trim().split("\n")[0] || "no report produced";
134
- this.recordRefusal(cwd, reason, result.status);
135
- return {
136
- ...EMPTY_RESULT,
137
- scannedAt,
138
- reason: "no-report",
139
- summary: reason
140
- };
141
- }
142
- const raw = fs.readFileSync(reportPath, "utf-8");
143
- const report = readOpengrepReport(raw);
144
- if (report.verdict === "refused" || result.status !== 0) {
145
- const reason = report.verdict === "refused" ? report.reason : `opengrep exited with status ${result.status}`;
146
- this.recordRefusal(cwd, reason, result.status);
147
- return {
148
- ...EMPTY_RESULT,
149
- scannedAt,
150
- reason: "refused",
151
- summary: reason.slice(0, 200)
152
- };
153
- }
154
- if (report.partial) {
155
- recordDegradationOnce({
156
- kind: "opengrep-partial-scan",
157
- subject: cwd,
158
- reason: report.partial.reason,
159
- metadata: { status: result.status }
160
- });
161
- }
162
- return {
174
+ },
175
+ fail: (failure) => failure.success ? {
176
+ // A zero exit that wrote no report is an empty run, and it claims
177
+ // no coverage: `analyzed: false` and an empty declared set, so the
178
+ // render layer shows `opengrep — not run (<summary>)` and a zero-file
179
+ // scan never carries whole-root retirement authority (#2962).
163
180
  success: true,
164
- // A warning-level partial report with no scanned paths proves that
165
- // the producer went cold. A complete empty report still proves a
166
- // genuine scan, so it is still "analysed" for the render layer's
167
- // analysed-and-found-nothing state (#2970) — but it carries no
168
- // FILE-level authority, which `analyzedFiles: []` below is what
169
- // says.
170
- analyzed: !report.partial || report.scanned.length > 0,
171
- // #2962: the set is ALWAYS carried, empty included. "This producer
172
- // declared its coverage and it was zero files" and "this producer
173
- // declares no coverage at all" are different facts; dropping the
174
- // empty array collapses them into the second, and the second is
175
- // what hands a zero-file scan whole-root retirement authority
176
- // downstream (`runnerRetirementDecision`, tools/lens-diagnostics.ts).
177
- analyzedFiles: report.scanned.map((file) => realpathOrResolve(path.resolve(cwd, file))),
178
- ...report.partial ? { partial: true } : {},
179
- ...report.partial ? { summary: report.partial.reason } : {},
180
- ...report.partial && report.scanned.length === 0 ? { reason: "partial-no-paths" } : {},
181
- // The cached pack is loaded from a path, so Opengrep prefixes its rule
182
- // ids with it; report the registry-form id instead.
183
- findings: packPath ? report.findings.map((finding) => ({
184
- ...finding,
185
- checkId: stripPackRuleIdPrefix(finding.checkId, packPath)
186
- })) : report.findings,
187
- scannedAt
188
- };
189
- } catch (err) {
190
- const reason = err instanceof Error ? err.message : String(err);
191
- this.recordRefusal(cwd, reason, void 0);
192
- return {
193
- ...EMPTY_RESULT,
194
- scannedAt,
195
- reason: "crashed",
196
- summary: reason.slice(0, 200)
197
- };
198
- } finally {
199
- try {
200
- fs.rmSync(outDir, { recursive: true, force: true });
201
- } catch {
202
- }
203
- }
181
+ analyzed: false,
182
+ analyzedFiles: [],
183
+ findings: [],
184
+ scannedAt: failure.scannedAt,
185
+ summary: failure.summary
186
+ } : {
187
+ success: false,
188
+ findings: [],
189
+ scannedAt: failure.scannedAt,
190
+ reason: OPENGREP_FAILURE_REASONS[failure.outcome],
191
+ summary: this.failureReason(failure)
192
+ },
193
+ recordFailure: (failure) => this.recordRefusal(cwd, this.failureReason(failure), failure.status),
194
+ log: this.log
195
+ });
196
+ }
197
+ /**
198
+ * opengrep's reason for a scan that never reached its parse: the spawn
199
+ * classification beside the spawn error's message when the child never ran,
200
+ * and the lifecycle's own `formatToolFailure` reason (#1816) for every other
201
+ * cell. The result's `summary` and the `opengrep-scan-refused` row carry the
202
+ * same string, so both read it from here.
203
+ */
204
+ failureReason(failure) {
205
+ if (failure.outcome !== "spawn-error")
206
+ return failure.summary;
207
+ return `${failure.spawnFailure ?? "spawn-failed"}: ${failure.errorMessage ?? ""}`.slice(0, LEDGER_FIELD_MAX);
204
208
  }
205
209
  recordRefusal(cwd, reason, status) {
206
210
  recordDegradationOnce({
@@ -1,8 +1,12 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  GROOVY_FILENAMES,
4
+ KIND_EXTENSIONS,
4
5
  SPECIAL_FILENAMES
5
- } from "./chunk-CZCAZVTD.js";
6
+ } from "./chunk-SRXYSLMW.js";
7
+ import {
8
+ compareOrdinal
9
+ } from "./chunk-AGEQRJ5A.js";
6
10
 
7
11
  // dist/clients/language-registry.js
8
12
  var LANGUAGES = [
@@ -371,7 +375,34 @@ var GRAMMAR_TO_EXTENSIONS = Object.freeze((() => {
371
375
  ]));
372
376
  })());
373
377
  function extensionsForLanguageToken(token) {
374
- return GRAMMAR_TO_EXTENSIONS[token] ?? extensionsForLanguage(token);
378
+ return (Object.hasOwn(GRAMMAR_TO_EXTENSIONS, token) ? GRAMMAR_TO_EXTENSIONS[token] : void 0) ?? extensionsForLanguage(token);
379
+ }
380
+ function resolveLanguageScope(token, options = {}) {
381
+ const normalized = token.trim().toLowerCase();
382
+ const byLanguage = extensionsForLanguageToken(normalized);
383
+ const byKind = Object.hasOwn(KIND_EXTENSIONS, normalized) ? KIND_EXTENSIONS[normalized] : void 0;
384
+ const known = byLanguage.length > 0 || BY_ID.has(normalized) || Object.hasOwn(GRAMMAR_TO_EXTENSIONS, normalized);
385
+ if (!known && !byKind) {
386
+ return { refusal: unknownLanguageScopeMessage(token) };
387
+ }
388
+ const extensions = byKind && (!known || options.includeKindExtensions) ? [.../* @__PURE__ */ new Set([...byLanguage, ...byKind])] : byLanguage;
389
+ const named = SPECIAL_FILENAMES.flatMap((entry) => entry.kind === normalized ? [entry.pattern] : []);
390
+ return {
391
+ extensions,
392
+ matches: (file) => {
393
+ const declared = resolveFilenameLanguage(file);
394
+ if (declared && (declared.id === normalized || declared.grammar === normalized)) {
395
+ return true;
396
+ }
397
+ const base = basenameOf(file);
398
+ return named.some((pattern) => pattern.test(base)) || extensions.includes(extensionOf(file));
399
+ }
400
+ };
401
+ }
402
+ function unknownLanguageScopeMessage(token) {
403
+ const kinds = Object.keys(KIND_EXTENSIONS).sort(compareOrdinal).join(", ");
404
+ const ids = LANGUAGES.map((entry) => entry.id).sort(compareOrdinal).join(", ");
405
+ return `Unknown lang: "${token}" \u2014 accepted file kinds: ${kinds}; accepted language ids: ${ids}.`;
375
406
  }
376
407
  function basenameOf(filePath) {
377
408
  const cut = Math.max(filePath.lastIndexOf("/"), filePath.lastIndexOf("\\"));
@@ -467,7 +498,7 @@ var SCAN_LANGUAGE_PRIORITY = [
467
498
  export {
468
499
  lspLanguageId,
469
500
  extensionsForLanguage,
470
- extensionsForLanguageToken,
501
+ resolveLanguageScope,
471
502
  resolveFilenameLanguage,
472
503
  resolveLanguage,
473
504
  isTypeScriptFile,
@@ -1,4 +1,8 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+ import {
3
+ spawnAbortScope,
4
+ spawnCooldownScope
5
+ } from "./chunk-6EIV3H7O.js";
2
6
 
3
7
  // dist/clients/single-flight.js
4
8
  function createSingleFlight(options = {}) {
@@ -28,11 +32,12 @@ function createSingleFlight(options = {}) {
28
32
  generation: currentGeneration(),
29
33
  rerunRequested: false
30
34
  };
35
+ const pass = () => spawnAbortScope.exit(() => spawnCooldownScope.exit(fn));
31
36
  const chain = async () => {
32
- let result = await fn();
37
+ let result = await pass();
33
38
  while (flight.rerunRequested) {
34
39
  flight.rerunRequested = false;
35
- result = await fn();
40
+ result = await pass();
36
41
  }
37
42
  return result;
38
43
  };
@@ -46,6 +46,8 @@ import {
46
46
  getReviewGraphWorkerFallbackReasonForTests,
47
47
  getReviewGraphWorkspaceCacheSnapshot,
48
48
  graphBuildInfoIsTrustworthy,
49
+ graphCheckpointMinIntervalMs,
50
+ graphPersistDebounceMs,
49
51
  graphWasmTrapDetail,
50
52
  isGraphBuildInFlight,
51
53
  isReviewGraphMigrationNeeded,
@@ -53,63 +55,65 @@ import {
53
55
  refreshReviewGraphPersistWorkerHeapStatistics,
54
56
  resetReviewGraphPersistWorkerForTests,
55
57
  reviewGraphCachePath,
58
+ seqFastpathEnabled,
56
59
  terminateReviewGraphPersistWorkerForTests,
57
60
  waitForReviewGraphPersistsForTests
58
- } from "./chunk-2LVJQU3I.js";
61
+ } from "./chunk-3C6ZZAB2.js";
59
62
  import "./chunk-3MED75HT.js";
60
63
  import "./chunk-PKLB2XJL.js";
61
- import "./chunk-6MDM5MQT.js";
62
- import "./chunk-FCQSZQAT.js";
64
+ import "./chunk-QBUSONNE.js";
65
+ import "./chunk-AOQKQWZU.js";
63
66
  import "./chunk-XIMYZ3JA.js";
64
- import "./chunk-XPGH5O74.js";
65
- import "./chunk-NE4EFHJX.js";
66
- import "./chunk-YT2VR4SL.js";
67
- import "./chunk-LT62P654.js";
68
- import "./chunk-BRESRQBE.js";
69
- import "./chunk-XVB3Q2PG.js";
67
+ import "./chunk-DBAHJFBU.js";
68
+ import "./chunk-2SD2CGVH.js";
69
+ import "./chunk-NLRKB32C.js";
70
+ import "./chunk-QJ4T73J5.js";
71
+ import "./chunk-HTUG7ZFK.js";
72
+ import "./chunk-HGEE5LDW.js";
70
73
  import "./chunk-5W3R6LFT.js";
71
- import "./chunk-QL37SGTS.js";
72
- import "./chunk-K6WIBVMK.js";
73
- import "./chunk-ACRJ2GZ5.js";
74
- import "./chunk-WS3UFJOU.js";
75
- import "./chunk-CTB5BAJI.js";
74
+ import "./chunk-532X3OCZ.js";
75
+ import "./chunk-6XNVY3FW.js";
76
+ import "./chunk-7424ANRU.js";
77
+ import "./chunk-SUIZOCSY.js";
78
+ import "./chunk-OC4ZGVMH.js";
76
79
  import "./chunk-Z54ZSOBZ.js";
77
- import "./chunk-GUGKKGG7.js";
78
- import "./chunk-QGITU23N.js";
79
- import "./chunk-OTSTS7L2.js";
80
+ import "./chunk-5YTDZ5WP.js";
81
+ import "./chunk-E3PNZDPH.js";
80
82
  import "./chunk-6HWVI6MI.js";
81
- import "./chunk-SG2JQ2YP.js";
83
+ import "./chunk-KNP4ENFT.js";
82
84
  import "./chunk-CKEQFGLT.js";
83
- import "./chunk-NBM7PNBP.js";
84
- import "./chunk-BGLS5SDN.js";
85
- import "./chunk-YF4G5NN5.js";
86
- import "./chunk-W7TY6HYX.js";
87
- import "./chunk-WAA63ZJV.js";
85
+ import "./chunk-LXE7JAMV.js";
86
+ import "./chunk-IT7MFVGP.js";
87
+ import "./chunk-AYDE7RFV.js";
88
+ import "./chunk-YVPB5YGO.js";
89
+ import "./chunk-ZRQMENT4.js";
90
+ import "./chunk-3HZ6MNB2.js";
88
91
  import "./chunk-2BEMIWEW.js";
89
92
  import "./chunk-IJYGIDF4.js";
90
- import "./chunk-AON2QIJF.js";
91
- import "./chunk-TLWFZ66Y.js";
92
- import "./chunk-KSTQ4VXT.js";
93
- import "./chunk-VPFRU5IG.js";
93
+ import "./chunk-ITAPXBIB.js";
94
+ import "./chunk-JSQK5DH3.js";
95
+ import "./chunk-FVEEEEIM.js";
96
+ import "./chunk-OP5BMZKK.js";
94
97
  import "./chunk-UYXV5NIS.js";
95
- import "./chunk-NPNFGYLV.js";
96
- import "./chunk-TJQSYX3J.js";
97
- import "./chunk-7JX3RNG4.js";
98
- import "./chunk-IDCTDKIA.js";
99
- import "./chunk-IL6PIV33.js";
100
- import "./chunk-H65TYP6V.js";
101
- import "./chunk-AWQWXSW4.js";
98
+ import "./chunk-WBXCIRVI.js";
99
+ import "./chunk-TTGDTNSN.js";
100
+ import "./chunk-34RXPR7M.js";
101
+ import "./chunk-3NVGBFJS.js";
102
+ import "./chunk-C2REOMPO.js";
103
+ import "./chunk-DNB4ZQGN.js";
104
+ import "./chunk-B4FAFEBP.js";
102
105
  import "./chunk-QYF5S6P6.js";
103
- import "./chunk-CZCAZVTD.js";
104
- import "./chunk-FOEPIX76.js";
105
- import "./chunk-NL5LSKVD.js";
106
- import "./chunk-7WJ55KBN.js";
107
- import "./chunk-3FRI5H4T.js";
106
+ import "./chunk-SRXYSLMW.js";
107
+ import "./chunk-6EIV3H7O.js";
108
+ import "./chunk-3R3Z54J7.js";
109
+ import "./chunk-CIA7X2PZ.js";
110
+ import "./chunk-43KD3PPM.js";
111
+ import "./chunk-AGEQRJ5A.js";
108
112
  import "./chunk-S26LC76R.js";
109
- import "./chunk-VCRVNLE7.js";
113
+ import "./chunk-K2GV34T2.js";
110
114
  import "./chunk-LJDODBBZ.js";
111
- import "./chunk-A5TEJZGJ.js";
112
- import "./chunk-CB7PEVOJ.js";
115
+ import "./chunk-O6LCSHHI.js";
116
+ import "./chunk-WLD6BGON.js";
113
117
  import "./chunk-NXL4FFQQ.js";
114
118
  export {
115
119
  GRAPH_PERSIST_MAX_ELEMENTS_DEFAULT,
@@ -158,6 +162,8 @@ export {
158
162
  getReviewGraphWorkerFallbackReasonForTests,
159
163
  getReviewGraphWorkspaceCacheSnapshot,
160
164
  graphBuildInfoIsTrustworthy,
165
+ graphCheckpointMinIntervalMs,
166
+ graphPersistDebounceMs,
161
167
  graphWasmTrapDetail,
162
168
  isGraphBuildInFlight,
163
169
  isReviewGraphMigrationNeeded,
@@ -165,6 +171,7 @@ export {
165
171
  refreshReviewGraphPersistWorkerHeapStatistics,
166
172
  resetReviewGraphPersistWorkerForTests,
167
173
  reviewGraphCachePath,
174
+ seqFastpathEnabled,
168
175
  terminateReviewGraphPersistWorkerForTests,
169
176
  waitForReviewGraphPersistsForTests
170
177
  };
@@ -4,17 +4,17 @@ import {
4
4
  } from "./chunk-ZD4KVFXI.js";
5
5
  import {
6
6
  extractFactsFromTree
7
- } from "./chunk-GTTMQ6XB.js";
7
+ } from "./chunk-BLL4VYGZ.js";
8
8
  import {
9
9
  findOwnerName
10
10
  } from "./chunk-5W3R6LFT.js";
11
11
  import {
12
12
  firstChildOfType,
13
13
  walk
14
- } from "./chunk-CTB5BAJI.js";
14
+ } from "./chunk-OC4ZGVMH.js";
15
15
  import {
16
16
  isJstsFactFile
17
- } from "./chunk-CZCAZVTD.js";
17
+ } from "./chunk-SRXYSLMW.js";
18
18
 
19
19
  // dist/clients/dispatch/facts/function-facts.js
20
20
  var BOUNDARY_PREFIXES = [
@@ -0,0 +1,25 @@
1
+ import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+ import {
3
+ GoClient,
4
+ goClient,
5
+ resetGoAvailability
6
+ } from "./chunk-NQFXN5U7.js";
7
+ import "./chunk-UY3WWW5R.js";
8
+ import "./chunk-OP5BMZKK.js";
9
+ import "./chunk-WBXCIRVI.js";
10
+ import "./chunk-DNB4ZQGN.js";
11
+ import "./chunk-B4FAFEBP.js";
12
+ import "./chunk-6EIV3H7O.js";
13
+ import "./chunk-3R3Z54J7.js";
14
+ import "./chunk-43KD3PPM.js";
15
+ import "./chunk-AGEQRJ5A.js";
16
+ import "./chunk-S26LC76R.js";
17
+ import "./chunk-K2GV34T2.js";
18
+ import "./chunk-LJDODBBZ.js";
19
+ import "./chunk-WLD6BGON.js";
20
+ import "./chunk-NXL4FFQQ.js";
21
+ export {
22
+ GoClient,
23
+ goClient,
24
+ resetGoAvailability
25
+ };
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  withTreeSitterRoot
4
- } from "./chunk-CTB5BAJI.js";
4
+ } from "./chunk-OC4ZGVMH.js";
5
5
 
6
6
  // dist/clients/dispatch/facts/tree-sitter-facts.js
7
7
  var withFactTree = withTreeSitterRoot;