@herbertgao/pi-extensions 2026.11.6 → 2026.11.7

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 (397) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +6 -6
  3. package/THIRD_PARTY_NOTICES.md +2 -2
  4. package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
  5. package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
  6. package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
  7. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +1 -1
  8. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
  9. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
  10. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +71 -56
  11. package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts +1 -4
  12. package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
  13. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +5620 -2946
  14. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  15. package/node_modules/@pi-plugins/fast-mode/package.json +11 -11
  16. package/node_modules/pi-commandcode-provider/CHANGELOG.md +5 -0
  17. package/node_modules/pi-commandcode-provider/README.md +1 -1
  18. package/node_modules/pi-commandcode-provider/package.json +1 -1
  19. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +5 -4
  20. package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -2
  21. package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
  22. package/node_modules/pi-lens/CHANGELOG.md +182 -0
  23. package/node_modules/pi-lens/dist/{chunk-NE4EFHJX.js → chunk-2SD2CGVH.js} +2 -2
  24. package/node_modules/pi-lens/dist/{chunk-7JX3RNG4.js → chunk-34RXPR7M.js} +1 -1
  25. package/node_modules/pi-lens/dist/{chunk-2LVJQU3I.js → chunk-3C6ZZAB2.js} +33 -27
  26. package/node_modules/pi-lens/dist/{chunk-WAA63ZJV.js → chunk-3HZ6MNB2.js} +1 -1
  27. package/node_modules/pi-lens/dist/{chunk-IDCTDKIA.js → chunk-3NVGBFJS.js} +6 -6
  28. package/node_modules/pi-lens/dist/{chunk-B2YUE6YD.js → chunk-3QCI3V6C.js} +11 -11
  29. package/node_modules/pi-lens/dist/{chunk-NL5LSKVD.js → chunk-3R3Z54J7.js} +10 -4
  30. package/node_modules/pi-lens/dist/{chunk-7WJ55KBN.js → chunk-43KD3PPM.js} +1 -1
  31. package/node_modules/pi-lens/dist/{chunk-DVRJBQOJ.js → chunk-4HNBY7S7.js} +20 -19
  32. package/node_modules/pi-lens/dist/chunk-4WWPDMRA.js +22 -0
  33. package/node_modules/pi-lens/dist/{chunk-QL37SGTS.js → chunk-532X3OCZ.js} +18 -16
  34. package/node_modules/pi-lens/dist/{chunk-ZZDVGCGG.js → chunk-5RLEDUUE.js} +9 -9
  35. package/node_modules/pi-lens/dist/{chunk-GUGKKGG7.js → chunk-5YTDZ5WP.js} +3 -3
  36. package/node_modules/pi-lens/dist/{chunk-FOEPIX76.js → chunk-6EIV3H7O.js} +158 -61
  37. package/node_modules/pi-lens/dist/{chunk-E4VXKTBR.js → chunk-6K4X7IIF.js} +164 -172
  38. package/node_modules/pi-lens/dist/{chunk-HSYFLOZY.js → chunk-6RXMQYNU.js} +3 -3
  39. package/node_modules/pi-lens/dist/{chunk-K6WIBVMK.js → chunk-6XNVY3FW.js} +8 -9
  40. package/node_modules/pi-lens/dist/{chunk-ACRJ2GZ5.js → chunk-7424ANRU.js} +2 -2
  41. package/node_modules/pi-lens/dist/{chunk-PTSA6QKL.js → chunk-A4HKPAEN.js} +8 -8
  42. package/node_modules/pi-lens/dist/{chunk-RQRKIRFY.js → chunk-AFNPNHJV.js} +8 -8
  43. package/node_modules/pi-lens/dist/{chunk-3FRI5H4T.js → chunk-AGEQRJ5A.js} +24 -10
  44. package/node_modules/pi-lens/dist/{chunk-MAD4QJTP.js → chunk-AJ62EQIQ.js} +15 -14
  45. package/node_modules/pi-lens/dist/{chunk-FCQSZQAT.js → chunk-AOQKQWZU.js} +14 -5
  46. package/node_modules/pi-lens/dist/{chunk-ZOPXB2KK.js → chunk-AVOUHMCS.js} +111 -107
  47. package/node_modules/pi-lens/dist/{chunk-OTSTS7L2.js → chunk-AYDE7RFV.js} +34 -3
  48. package/node_modules/pi-lens/dist/{chunk-AWQWXSW4.js → chunk-B4FAFEBP.js} +7 -2
  49. package/node_modules/pi-lens/dist/{chunk-SKVNHCT5.js → chunk-B4K6OSLL.js} +49 -42
  50. package/node_modules/pi-lens/dist/{chunk-2ADRLTM2.js → chunk-BBJXIZ3X.js} +3 -3
  51. package/node_modules/pi-lens/dist/chunk-BJDB7PXU.js +25 -0
  52. package/node_modules/pi-lens/dist/{chunk-GTTMQ6XB.js → chunk-BLL4VYGZ.js} +1 -1
  53. package/node_modules/pi-lens/dist/{chunk-CZAWWXP6.js → chunk-BMMRLJA4.js} +7 -5
  54. package/node_modules/pi-lens/dist/{chunk-TN5CWX5D.js → chunk-BN36MQW5.js} +35 -34
  55. package/node_modules/pi-lens/dist/{chunk-IL6PIV33.js → chunk-C2REOMPO.js} +2 -2
  56. package/node_modules/pi-lens/dist/{chunk-XAFZJEXY.js → chunk-C4ICGFEO.js} +23 -23
  57. package/node_modules/pi-lens/dist/chunk-CIA7X2PZ.js +26 -0
  58. package/node_modules/pi-lens/dist/{chunk-SJQUWQR6.js → chunk-D5L7Q57Z.js} +2 -2
  59. package/node_modules/pi-lens/dist/{chunk-XPGH5O74.js → chunk-DBAHJFBU.js} +31 -35
  60. package/node_modules/pi-lens/dist/{chunk-H65TYP6V.js → chunk-DNB4ZQGN.js} +37 -21
  61. package/node_modules/pi-lens/dist/chunk-DPDA3ILA.js +108 -0
  62. package/node_modules/pi-lens/dist/{chunk-QGITU23N.js → chunk-E3PNZDPH.js} +1 -1
  63. package/node_modules/pi-lens/dist/{chunk-KDCIG23C.js → chunk-E6Z3CJT2.js} +13 -9
  64. package/node_modules/pi-lens/dist/{chunk-V7F7JHS5.js → chunk-ECYUBKYX.js} +557 -551
  65. package/node_modules/pi-lens/dist/chunk-F37CCZUA.js +27 -0
  66. package/node_modules/pi-lens/dist/{chunk-KSTQ4VXT.js → chunk-FVEEEEIM.js} +10 -13
  67. package/node_modules/pi-lens/dist/{chunk-GMC4ZGYR.js → chunk-GL6J5R34.js} +5 -5
  68. package/node_modules/pi-lens/dist/{chunk-C6AODRNU.js → chunk-GTNO6F6K.js} +11 -10
  69. package/node_modules/pi-lens/dist/{chunk-KJ3AHOCK.js → chunk-HASJPQBC.js} +10 -10
  70. package/node_modules/pi-lens/dist/{chunk-XVB3Q2PG.js → chunk-HGEE5LDW.js} +3 -2
  71. package/node_modules/pi-lens/dist/{chunk-F6FT6BVQ.js → chunk-HIUVHRLM.js} +35 -34
  72. package/node_modules/pi-lens/dist/{chunk-BRESRQBE.js → chunk-HTUG7ZFK.js} +8 -8
  73. package/node_modules/pi-lens/dist/{chunk-ALIZWXHZ.js → chunk-IBEYUBCM.js} +9 -9
  74. package/node_modules/pi-lens/dist/{chunk-JZQGRARR.js → chunk-IJ55MYO6.js} +15 -12
  75. package/node_modules/pi-lens/dist/{chunk-BGLS5SDN.js → chunk-IT7MFVGP.js} +2 -2
  76. package/node_modules/pi-lens/dist/{chunk-AON2QIJF.js → chunk-ITAPXBIB.js} +20 -17
  77. package/node_modules/pi-lens/dist/{chunk-TLWFZ66Y.js → chunk-JSQK5DH3.js} +4 -4
  78. package/node_modules/pi-lens/dist/{chunk-VCRVNLE7.js → chunk-K2GV34T2.js} +9 -1
  79. package/node_modules/pi-lens/dist/{chunk-QUQY3IME.js → chunk-KBSC5Z3G.js} +9 -8
  80. package/node_modules/pi-lens/dist/{chunk-W4CUK5G6.js → chunk-KDGKKK7A.js} +2 -2
  81. package/node_modules/pi-lens/dist/{chunk-YQA34KAF.js → chunk-KDMJ2DJD.js} +11 -11
  82. package/node_modules/pi-lens/dist/{chunk-SG2JQ2YP.js → chunk-KNP4ENFT.js} +1 -1
  83. package/node_modules/pi-lens/dist/chunk-KX4DF6XX.js +25 -0
  84. package/node_modules/pi-lens/dist/{chunk-4ITEFRDH.js → chunk-LHCDWFDB.js} +37 -145
  85. package/node_modules/pi-lens/dist/{chunk-3HM4BUHR.js → chunk-LHU6NG5Z.js} +16 -15
  86. package/node_modules/pi-lens/dist/{chunk-6I44EDNQ.js → chunk-LIDFFCZZ.js} +17 -15
  87. package/node_modules/pi-lens/dist/{chunk-KFRDFAOE.js → chunk-LPM6NKVI.js} +7 -7
  88. package/node_modules/pi-lens/dist/{chunk-NBM7PNBP.js → chunk-LXE7JAMV.js} +37 -26
  89. package/node_modules/pi-lens/dist/{chunk-UY745U35.js → chunk-ME6MF2N2.js} +1 -1
  90. package/node_modules/pi-lens/dist/{chunk-YT2VR4SL.js → chunk-NLRKB32C.js} +7 -7
  91. package/node_modules/pi-lens/dist/{chunk-QHOTTC4A.js → chunk-NQFXN5U7.js} +2 -2
  92. package/node_modules/pi-lens/dist/{chunk-QUPYLQA4.js → chunk-NR4KQOXZ.js} +14 -9
  93. package/node_modules/pi-lens/dist/{chunk-Y3EHLUPL.js → chunk-NWK7KKNO.js} +4 -4
  94. package/node_modules/pi-lens/dist/{chunk-A5TEJZGJ.js → chunk-O6LCSHHI.js} +1 -1
  95. package/node_modules/pi-lens/dist/{chunk-CTB5BAJI.js → chunk-OC4ZGVMH.js} +17 -14
  96. package/node_modules/pi-lens/dist/{chunk-VPFRU5IG.js → chunk-OP5BMZKK.js} +3 -3
  97. package/node_modules/pi-lens/dist/{chunk-MN635QYA.js → chunk-OYXD2MOM.js} +3 -3
  98. package/node_modules/pi-lens/dist/{chunk-GVWIU7M7.js → chunk-PSUXESQ5.js} +41 -4
  99. package/node_modules/pi-lens/dist/{chunk-J6BR5XN2.js → chunk-QAM2Q3VO.js} +3 -3
  100. package/node_modules/pi-lens/dist/{chunk-6MDM5MQT.js → chunk-QBUSONNE.js} +367 -153
  101. package/node_modules/pi-lens/dist/{chunk-VGTBLTPN.js → chunk-QDZ3ZZMY.js} +18 -66
  102. package/node_modules/pi-lens/dist/{chunk-LT62P654.js → chunk-QJ4T73J5.js} +1 -1
  103. package/node_modules/pi-lens/dist/{chunk-DOUAWKLO.js → chunk-QUZYRDT6.js} +12 -12
  104. package/node_modules/pi-lens/dist/{chunk-UNBRHPHJ.js → chunk-R2UF54ON.js} +17 -15
  105. package/node_modules/pi-lens/dist/{chunk-I32RSMH6.js → chunk-R2VUZZPJ.js} +11 -10
  106. package/node_modules/pi-lens/dist/chunk-R5BNSOIV.js +29 -0
  107. package/node_modules/pi-lens/dist/chunk-RV5VX2XW.js +29 -0
  108. package/node_modules/pi-lens/dist/{chunk-QWTHFFU6.js → chunk-SQBDX6IO.js} +12 -12
  109. package/node_modules/pi-lens/dist/{chunk-CZCAZVTD.js → chunk-SRXYSLMW.js} +2 -2
  110. package/node_modules/pi-lens/dist/{chunk-WS3UFJOU.js → chunk-SUIZOCSY.js} +3 -2
  111. package/node_modules/pi-lens/dist/{chunk-NUSXS6YB.js → chunk-T5EGSBM2.js} +4 -4
  112. package/node_modules/pi-lens/dist/{chunk-QMV2APEH.js → chunk-TBE4OLPA.js} +37 -35
  113. package/node_modules/pi-lens/dist/{chunk-B6HXETWY.js → chunk-TPMBNWHO.js} +28 -26
  114. package/node_modules/pi-lens/dist/{chunk-CYUJB552.js → chunk-TRYOYWWU.js} +18 -12
  115. package/node_modules/pi-lens/dist/{chunk-TJQSYX3J.js → chunk-TTGDTNSN.js} +6 -6
  116. package/node_modules/pi-lens/dist/{chunk-S3WFVG5P.js → chunk-UELHWF5I.js} +137 -126
  117. package/node_modules/pi-lens/dist/chunk-UG4YLCJ5.js +58 -0
  118. package/node_modules/pi-lens/dist/chunk-UQ6OZYTO.js +91 -0
  119. package/node_modules/pi-lens/dist/{chunk-QSCZAP24.js → chunk-UY3WWW5R.js} +4 -4
  120. package/node_modules/pi-lens/dist/chunk-V7IPIAE5.js +74 -0
  121. package/node_modules/pi-lens/dist/{chunk-4NCDHTFI.js → chunk-VDMF7Q2P.js} +10 -10
  122. package/node_modules/pi-lens/dist/{chunk-TYHOEX4V.js → chunk-VI3BJMZO.js} +35 -34
  123. package/node_modules/pi-lens/dist/{chunk-UOO4D2TK.js → chunk-VTXJAO5R.js} +34 -35
  124. package/node_modules/pi-lens/dist/chunk-W6VLB6LL.js +145 -0
  125. package/node_modules/pi-lens/dist/{chunk-NPNFGYLV.js → chunk-WBXCIRVI.js} +19 -2
  126. package/node_modules/pi-lens/dist/{chunk-CB7PEVOJ.js → chunk-WLD6BGON.js} +176 -60
  127. package/node_modules/pi-lens/dist/{chunk-Q2VCKC3X.js → chunk-WMCAEP2K.js} +11 -8
  128. package/node_modules/pi-lens/dist/{chunk-OPFNQBS5.js → chunk-WXMUGUZV.js} +21 -25
  129. package/node_modules/pi-lens/dist/{chunk-46TQJSUE.js → chunk-X33QECRJ.js} +2 -2
  130. package/node_modules/pi-lens/dist/{chunk-HILZE4BQ.js → chunk-YUF4DRYB.js} +396 -306
  131. package/node_modules/pi-lens/dist/{chunk-YF4G5NN5.js → chunk-YVPB5YGO.js} +2 -2
  132. package/node_modules/pi-lens/dist/{chunk-W7TY6HYX.js → chunk-ZRQMENT4.js} +5 -27
  133. package/node_modules/pi-lens/dist/index.js +5573 -4181
  134. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +17 -11
  135. package/node_modules/pi-lens/dist/mcp/cli.js +43 -42
  136. package/node_modules/pi-lens/dist/mcp/server.js +1521 -610
  137. package/node_modules/pi-lens/dist/mcp/worker.js +62 -59
  138. package/node_modules/pi-lens/dist/probes/installer.js +19 -18
  139. package/node_modules/pi-lens/docs/agent-guide.md +3 -1
  140. package/node_modules/pi-lens/docs/agent-tools.md +4 -2
  141. package/node_modules/pi-lens/docs/alignment-families.md +5 -1
  142. package/node_modules/pi-lens/docs/ci.md +120 -0
  143. package/node_modules/pi-lens/docs/configuration.md +21 -3
  144. package/node_modules/pi-lens/docs/custom-rules.md +1 -0
  145. package/node_modules/pi-lens/docs/defect-shapes.md +107 -71
  146. package/node_modules/pi-lens/docs/durable-store-audit-1202.md +1 -1
  147. package/node_modules/pi-lens/docs/engineering-principles.md +46 -12
  148. package/node_modules/pi-lens/docs/environment-variables.md +25 -2
  149. package/node_modules/pi-lens/docs/features.md +1 -1
  150. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -0
  151. package/node_modules/pi-lens/docs/language-coverage.md +1 -1
  152. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +15 -16
  153. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
  154. package/node_modules/pi-lens/docs/module-report-read-symbol.md +2 -2
  155. package/node_modules/pi-lens/docs/pi-lens-fixer.md +3 -2
  156. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -0
  157. package/node_modules/pi-lens/docs/pi-lens-monitor.md +4 -1
  158. package/node_modules/pi-lens/docs/pi-lens-release.md +19 -0
  159. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +8 -2
  160. package/node_modules/pi-lens/docs/public-api-stability.md +41 -6
  161. package/node_modules/pi-lens/docs/rfcs/5138-query-surface.md +121 -0
  162. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  163. package/node_modules/pi-lens/docs/settings.md +9 -0
  164. package/node_modules/pi-lens/docs/word-index.md +9 -10
  165. package/node_modules/pi-lens/package.json +3 -3
  166. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/README.md +2 -0
  167. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/dont-call-system-c.yml +2 -1
  168. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-access-before-action-c.yml +2 -1
  169. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-stat-before-action-c.yml +2 -1
  170. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/insecure-hash-c.yml +2 -1
  171. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/libxml2-audit-parser-c.yml +2 -1
  172. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/null-library-function-c.yml +2 -1
  173. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/sizeof-this-c.yml +2 -1
  174. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/small-key-size-c.yml +2 -1
  175. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/world-writable-file-c.yml +2 -1
  176. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/dont-call-system-cpp.yml +2 -1
  177. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-access-before-action-cpp.yml +2 -1
  178. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-stat-before-action-cpp.yml +2 -1
  179. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/fix-format-security-error-cpp.yml +2 -1
  180. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/insecure-hash-cpp.yml +2 -1
  181. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/libxml2-audit-parser-cpp.yml +2 -1
  182. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/missing-nul-cpp-string-memcpy-cpp.yml +2 -1
  183. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/null-library-function-cpp.yml +2 -1
  184. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/return-c-str-cpp.yml +2 -1
  185. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/sizeof-this-cpp.yml +2 -1
  186. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/small-key-size-cpp.yml +2 -1
  187. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-return-data-cpp.yml +2 -1
  188. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-vector-invalidation-cpp.yml +2 -1
  189. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/string-view-temporary-string-cpp.yml +2 -1
  190. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/world-writable-file-cpp.yml +2 -1
  191. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/httponly-false-csharp.yml +2 -1
  192. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/insecure-binaryformatter-deserialization-csharp.yml +2 -1
  193. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-decode-without-verify-csharp.yml +2 -1
  194. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-hardcoded-secret-csharp.yml +2 -1
  195. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-tokenvalidationparameters-no-expiry-validation-csharp.yml +2 -1
  196. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/networkcredential-hardcoded-secret-python.yml +2 -1
  197. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/npgsqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  198. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/oracleconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  199. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/sqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
  200. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/stacktrace-disclosure-csharp.yml +2 -1
  201. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/use-ecb-mode-csharp.yml +2 -1
  202. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/avoid-bind-to-all-interfaces-go.yml +2 -1
  203. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-cookie-store-hardcoded-session-key-go.yml +2 -1
  204. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-csrf-hardcoded-auth-key-go.yml +2 -1
  205. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/grpc-client-insecure-connection-go.yml +2 -1
  206. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/jwt-go-none-algorithm-go.yml +2 -1
  207. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/missing-ssl-minversion-go.yml +2 -1
  208. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-empty-secret-go.yml +2 -1
  209. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-hardcoded-secret-go.yml +2 -1
  210. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/ssl-v3-is-insecure-go.yml +2 -1
  211. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/tls-with-insecure-cipher-go.yml +2 -1
  212. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/use-of-weak-rsa-key-go.yml +2 -1
  213. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/html/security/plaintext-http-link-html.yml +2 -1
  214. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cbc-padding-oracle-java.yml +2 -1
  215. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-httponly-false-java.yml +2 -1
  216. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-httponly-java.yml +2 -1
  217. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-samesite-java.yml +2 -1
  218. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-secure-flag-java.yml +2 -1
  219. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-secure-flag-false-java.yml +2 -1
  220. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/datanucleus-hardcoded-connection-password-java.yml +2 -1
  221. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/des-is-deprecated-java.yml +2 -1
  222. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/desede-is-deprecated-java.yml +2 -1
  223. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-disallow-doctype-decl-false-java.yml +2 -1
  224. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-general-entities-true-java.yml +2 -1
  225. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-parameter-entities-true-java.yml +2 -1
  226. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/drivermanager-hardcoded-secret-java.yml +2 -1
  227. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/ecb-cipher-java.yml +2 -1
  228. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-connection-password-java.yml +2 -1
  229. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-secret-in-credentials-java.yml +2 -1
  230. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/java-jwt-hardcoded-secret-java.yml +2 -1
  231. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml +2 -1
  232. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisfactory-hardcoded-password-java.yml +2 -1
  233. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-httponly-java.yml +2 -1
  234. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-secure-java.yml +2 -1
  235. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/no-null-cipher-java.yml +2 -1
  236. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/passwordauthentication-hardcoded-password-java.yml +2 -1
  237. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/rsa-no-padding-java.yml +2 -1
  238. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/simple-command-injection-direct-input-java.yml +2 -1
  239. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/system-setproperty-hardcoded-secret-java.yml +2 -1
  240. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/unencrypted-socket-java.yml +2 -1
  241. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-aes-ecb-java.yml +2 -1
  242. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-blowfish-java.yml +2 -1
  243. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-default-aes-java.yml +2 -1
  244. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-digest-utils-java.yml +2 -1
  245. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-java.yml +2 -1
  246. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc2-java.yml +2 -1
  247. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc4-java.yml +2 -1
  248. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-sha1-java.yml +2 -1
  249. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/weak-ssl-context-java.yml +2 -1
  250. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/detect-angular-sce-disabled-javascript.yml +2 -1
  251. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-jwt-hardcoded-secret-javascript.yml +2 -1
  252. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-session-hardcoded-secret-javascript.yml +2 -1
  253. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/jwt-simple-noverify-javascript.yml +2 -1
  254. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-rsa-weak-key-javascript.yml +2 -1
  255. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-empty-password-argument-javascript.yml +2 -1
  256. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-hardcoded-secret-argument-javascript.yml +2 -1
  257. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/des-is-deprecated-kotlin.yml +2 -1
  258. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/desede-is-deprecated-kotlin.yml +2 -1
  259. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/jwt-hardcode-kotlin.yml +2 -1
  260. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/rsa-no-padding-kotlin.yml +2 -1
  261. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml +2 -1
  262. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/openssl-cbc-static-iv-php.yml +2 -1
  263. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/search-active-debug-php.yml +2 -1
  264. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid-mktemp-python.yml +2 -1
  265. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid_app_run_with_bad_host-python.yml +2 -1
  266. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/debug-enabled-python.yml +2 -1
  267. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-django-secret-python.yml +2 -1
  268. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-flask-secret-python.yml +2 -1
  269. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/insecure-cipher-algorithm-rc4-python.yml +2 -1
  270. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/jwt-python-hardcoded-secret-python.yml +2 -1
  271. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/openai-hardcoded-secret-python.yml +2 -1
  272. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-empty-password-python.yml +2 -1
  273. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-hardcoded-secret-python.yml +2 -1
  274. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-empty-password-python.yml +2 -1
  275. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-hardcoded-secret-python.yml +2 -1
  276. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-elasticsearch-hardcoded-bearer-auth-python.yml +2 -1
  277. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-empty-password-python.yml +2 -1
  278. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-hardcoded-secret-python.yml +2 -1
  279. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-empty-password-python.yml +2 -1
  280. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-hardcoded-secret-python.yml +2 -1
  281. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-empty-password-python.yml +2 -1
  282. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-hardcoded-secret-python.yml +2 -1
  283. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-empty-password-python.yml +2 -1
  284. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml +2 -1
  285. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-empty-password-python.yml +2 -1
  286. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-hardcoded-secret-python.yml +2 -1
  287. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-empty-password-python.yml +2 -1
  288. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-hardcoded-secret-python.yml +2 -1
  289. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-empty-password-python.yml +2 -1
  290. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-hardcoded-secret-python.yml +2 -1
  291. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-empty-password-python.yml +2 -1
  292. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-hardcoded-secret-python.yml +2 -1
  293. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-empty-password-python.yml +2 -1
  294. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-hardcoded-secret-python.yml +2 -1
  295. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pyjwt-hardcoded-secret-python.yml +2 -1
  296. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-empty-password-python.yml +2 -1
  297. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-hardcoded-secret-python.yml +2 -1
  298. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-empty-password-python.yml +2 -1
  299. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-hardcoded-secret-python.yml +2 -1
  300. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-empty-password-python.yml +2 -1
  301. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-hardcoded-secret-python.yml +2 -1
  302. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-empty-password-python.yml +2 -1
  303. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-hardcoded-secret-python.yml +2 -1
  304. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-empty-password-python.yml +2 -1
  305. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-hardcoded-secret-python.yml +2 -1
  306. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-oauth-hardcoded-secret-python.yml +2 -1
  307. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-empty-password-python.yml +2 -1
  308. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-hardcoded-secret-python.yml +2 -1
  309. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-urllib3-hardcoded-secret-python.yml +2 -1
  310. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-empty-password-python.yml +2 -1
  311. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-hardcoded-secret-python.yml +2 -1
  312. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/force-ssl-false-ruby.yml +2 -1
  313. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-http-auth-in-controller-ruby.yml +2 -1
  314. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-secret-rsa-passphrase-ruby.yml +2 -1
  315. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/insufficient-rsa-key-size-ruby.yml +2 -1
  316. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-aws-sdk-hardcoded-secret-ruby.yml +2 -1
  317. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-empty-password-ruby.yml +2 -1
  318. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-hardcoded-secret-ruby.yml +2 -1
  319. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-excon-hardcoded-secret-ruby.yml +2 -1
  320. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-faraday-hardcoded-secret-ruby.yml +2 -1
  321. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-empty-password-ruby.yml +2 -1
  322. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-hardcoded-secret-ruby.yml +2 -1
  323. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-empty-password-ruby.yml +2 -1
  324. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-hardcoded-secret-ruby.yml +2 -1
  325. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-octokit-hardcoded-secret-ruby.yml +2 -1
  326. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-empty-password-ruby.yml +2 -1
  327. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-hardcoded-secret-ruby.yml +2 -1
  328. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-empty-password-ruby.yml +2 -1
  329. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-hardcoded-secret-ruby.yml +2 -1
  330. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/empty-password-rust.yml +2 -1
  331. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/hardcoded-password-rust.yml +2 -1
  332. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/postgres-empty-password-rust.yml +2 -1
  333. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/reqwest-accept-invalid-rust.yml +2 -1
  334. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml +2 -1
  335. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/ssl-verify-none-rust.yml +2 -1
  336. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-empty-password-rust.yml +2 -1
  337. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-hardcoded-password-rust.yml +2 -1
  338. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/jwt-scala-hardcode-scala.yml +2 -1
  339. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/scala-jwt-hardcoded-secret-scala.yml +2 -1
  340. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/aes-hardcoded-secret-swift.yml +2 -1
  341. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/blowfish-hardcoded-secret-swift.yml +2 -1
  342. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/chacha20-hardcoded-secret-swift.yml +2 -1
  343. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/insecure-biometrics-swift.yml +2 -1
  344. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/rabbit-hardcoded-secret-swift.yml +2 -1
  345. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/detect-angular-sce-disabled-typescript.yml +2 -1
  346. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/express-session-hardcoded-secret-typescript.yml +2 -1
  347. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/jwt-simple-noverify-typescript.yml +2 -1
  348. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-rsa-weak-key-typescript.yml +2 -1
  349. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-empty-password-argument-typescript.yml +2 -1
  350. package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-hardcoded-secret-argument-typescript.yml +2 -1
  351. package/node_modules/pi-lens/rules/ast-grep-rules/rule-schema.json +1 -1
  352. package/node_modules/pi-lens/rules/ast-grep-rules/rules/c-no-malloc-free.yml +13 -12
  353. package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +11 -10
  354. package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-printf.yml +10 -9
  355. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-defer-func-call-antipattern.yml +14 -13
  356. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-fmt-println.yml +14 -13
  357. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +20 -19
  358. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +14 -13
  359. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +14 -13
  360. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +19 -18
  361. package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-test-functions.yml +14 -13
  362. package/node_modules/pi-lens/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +10 -9
  363. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +12 -11
  364. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +11 -10
  365. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-println.yml +15 -14
  366. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +10 -9
  367. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +10 -9
  368. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-var.yml +11 -10
  369. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +10 -9
  370. package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +10 -9
  371. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-aws-access-key-literal.yml +1 -1
  372. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-compile-call.yml +13 -12
  373. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-flask-secret-key-literal.yml +1 -1
  374. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-hardcoded-password.yml +1 -1
  375. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-marshal-load.yml +12 -11
  376. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-python-sql-string-concat.yml +12 -11
  377. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-requests-verify-false.yml +13 -12
  378. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-secret-in-env-var-name.yml +1 -1
  379. package/node_modules/pi-lens/rules/ast-grep-rules/rules/python-optional-type.yml +9 -8
  380. package/node_modules/pi-lens/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +8 -7
  381. package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-detect-path-traversal.yml +14 -13
  382. package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +8 -7
  383. package/node_modules/pi-lens/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +9 -8
  384. package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/gorm-unbounded-preload.yml +7 -6
  385. package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/shadow-err-variable.yml +6 -5
  386. package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +262 -3
  387. package/node_modules/pi-lens/scripts/lib/latency-log-phases.mjs +125 -0
  388. package/package.json +6 -6
  389. package/node_modules/pi-lens/dist/chunk-3QWVOBZJ.js +0 -73
  390. package/node_modules/pi-lens/dist/chunk-BDR5MEZY.js +0 -25
  391. package/node_modules/pi-lens/dist/chunk-DBS736MA.js +0 -57
  392. package/node_modules/pi-lens/dist/chunk-I74RQGKA.js +0 -88
  393. package/node_modules/pi-lens/dist/chunk-IK4YS3KC.js +0 -25
  394. package/node_modules/pi-lens/dist/chunk-JKOZ2Z4U.js +0 -20
  395. package/node_modules/pi-lens/dist/chunk-TQHOKMVZ.js +0 -28
  396. package/node_modules/pi-lens/dist/chunk-VS2L7QDI.js +0 -25
  397. package/node_modules/pi-lens/dist/chunk-ZPFLHB3R.js +0 -28
@@ -2,51 +2,35 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  getLazyInstallAttempt,
4
4
  tryLazyInstall
5
- } from "./chunk-GMC4ZGYR.js";
5
+ } from "./chunk-GL6J5R34.js";
6
6
  import {
7
7
  computeImpactCascade
8
- } from "./chunk-HSYFLOZY.js";
8
+ } from "./chunk-6RXMQYNU.js";
9
9
  import {
10
10
  goClient
11
- } from "./chunk-QHOTTC4A.js";
11
+ } from "./chunk-NQFXN5U7.js";
12
12
  import {
13
13
  isTrivyEnabled,
14
14
  resolveSeverityFloor
15
- } from "./chunk-OPFNQBS5.js";
15
+ } from "./chunk-WXMUGUZV.js";
16
16
  import {
17
- IN_FLIGHT_REASON,
18
- NO_ANALYZER_REASON,
19
- checkedVerdict,
20
- emptyDispatchResult,
21
17
  faultIfCutShort,
22
- faultResult,
23
- faultSkip,
24
- findingsResult,
25
18
  finishParsedRun,
26
19
  formatToolFailure,
27
- isNotApplicableSkipReason,
28
- isRunnerClaimSource,
29
- isRunnerSkipReason,
30
- noPrimaryCheckerReason,
31
20
  parseToolRun,
32
21
  processCutShort,
33
- reachedNoVerdict,
34
22
  skipUnlessToolRan,
35
- spanOverlapsModifiedRanges,
36
23
  spawnFailedWithNoOutput,
37
- unchecked,
38
- widgetUncheckedReason
39
- } from "./chunk-4ITEFRDH.js";
24
+ spawnTimedOut
25
+ } from "./chunk-LHCDWFDB.js";
40
26
  import {
41
27
  rustClient
42
- } from "./chunk-W4CUK5G6.js";
28
+ } from "./chunk-KDGKKK7A.js";
43
29
  import {
44
30
  coveringLaneAvailable,
45
31
  createAvailabilityChecker,
46
32
  createCwdCachedProbe,
47
- getDispatchAvailabilityGeneration,
48
33
  lspPrimaryCoversFile,
49
- recordAvailabilityProbeOverrun,
50
34
  resolveAdoptedRootCommand,
51
35
  resolveAvailableOrInstall,
52
36
  resolveCommandArgsWithInstallFallback,
@@ -55,10 +39,11 @@ import {
55
39
  resolveToolCommand,
56
40
  resolveToolCommandWithInstallFallback,
57
41
  resolveVendorToolCommand
58
- } from "./chunk-S3WFVG5P.js";
42
+ } from "./chunk-UELHWF5I.js";
59
43
  import {
60
44
  biomeConfigArgs,
61
45
  findCompiledClassesDir,
46
+ findToolConfig,
62
47
  getAutofixCapability,
63
48
  getJstsLintPolicyForCwd,
64
49
  getLinterPolicyForCwd,
@@ -70,25 +55,27 @@ import {
70
55
  hasPhpstanConfig,
71
56
  hasSqlfluffConfig,
72
57
  hasStylelintConfig,
58
+ hasToolConfig,
73
59
  hasVitePlusConfig,
74
60
  hasYamllintConfig,
75
61
  markdownlintConfigArgs,
62
+ readFileContent,
76
63
  ruffConfigArgs
77
- } from "./chunk-HILZE4BQ.js";
64
+ } from "./chunk-YUF4DRYB.js";
78
65
  import {
79
66
  importFactProvider
80
- } from "./chunk-Y3EHLUPL.js";
67
+ } from "./chunk-NWK7KKNO.js";
81
68
  import {
82
69
  functionFactProvider
83
- } from "./chunk-2ADRLTM2.js";
70
+ } from "./chunk-BBJXIZ3X.js";
84
71
  import {
85
72
  extractFactsFromTree
86
- } from "./chunk-GTTMQ6XB.js";
73
+ } from "./chunk-BLL4VYGZ.js";
87
74
  import {
88
75
  buildOrUpdateGraph,
89
76
  clearReviewGraphWorkspaceCache,
90
77
  fileContentProvider
91
- } from "./chunk-2LVJQU3I.js";
78
+ } from "./chunk-3C6ZZAB2.js";
92
79
  import {
93
80
  MAX_BLOCKING_RULE_COMPLEXITY,
94
81
  PRIMARY_UNAVAILABLE_CAUSE,
@@ -121,14 +108,17 @@ import {
121
108
  retagAuxiliaryDiagnostics,
122
109
  touchCompletedConfirmationPolicy,
123
110
  touchCoverageGap,
111
+ trustedCitedOwnerContent,
124
112
  tryWarmAttachedCodeActions,
125
113
  tryWarmAttachedDiagnostics,
126
114
  warmAnswerBinding
127
- } from "./chunk-6MDM5MQT.js";
115
+ } from "./chunk-QBUSONNE.js";
128
116
  import {
129
117
  ANY_POSITION,
118
+ displayedMessage,
119
+ hashText,
130
120
  retainRecordedFindings
131
- } from "./chunk-FCQSZQAT.js";
121
+ } from "./chunk-AOQKQWZU.js";
132
122
  import {
133
123
  mapWithConcurrency
134
124
  } from "./chunk-XIMYZ3JA.js";
@@ -144,7 +134,7 @@ import {
144
134
  resolveSessionConfigRoot,
145
135
  resolveShellFileDialect,
146
136
  runnerIdentityPopulated
147
- } from "./chunk-XPGH5O74.js";
137
+ } from "./chunk-DBAHJFBU.js";
148
138
  import {
149
139
  augmentPythonEnvironment,
150
140
  describePythonCompileWithheld,
@@ -153,25 +143,25 @@ import {
153
143
  emitBounded,
154
144
  partitionOutrankedPythonCompileVerdicts,
155
145
  recordPythonCompileVerdictDrop
156
- } from "./chunk-YT2VR4SL.js";
146
+ } from "./chunk-NLRKB32C.js";
157
147
  import {
158
148
  scannerReportParentDir
159
- } from "./chunk-LT62P654.js";
149
+ } from "./chunk-QJ4T73J5.js";
160
150
  import {
161
151
  loadProjectSnapshot,
162
152
  readJsonCache,
163
153
  readJsonCacheAsync
164
- } from "./chunk-BRESRQBE.js";
154
+ } from "./chunk-HTUG7ZFK.js";
165
155
  import {
166
156
  RUNTIME_CONFIG,
167
157
  exceedsLspSyncLimits,
168
158
  getRunnerTimeoutFloorMs,
169
159
  loadAstGrepNapi
170
- } from "./chunk-QL37SGTS.js";
160
+ } from "./chunk-532X3OCZ.js";
171
161
  import {
172
162
  buildModuleGraph,
173
163
  clearModuleGraphCache
174
- } from "./chunk-K6WIBVMK.js";
164
+ } from "./chunk-6XNVY3FW.js";
175
165
  import {
176
166
  BUNDLED_QUERIES_ROOT,
177
167
  classifyTreeSitterWasmError,
@@ -191,13 +181,10 @@ import {
191
181
  ruleFilesForLanguage,
192
182
  ruleSourceLanguages,
193
183
  walk
194
- } from "./chunk-CTB5BAJI.js";
184
+ } from "./chunk-OC4ZGVMH.js";
195
185
  import {
196
186
  resolvePackagePath
197
- } from "./chunk-QGITU23N.js";
198
- import {
199
- isTypeScriptFile
200
- } from "./chunk-OTSTS7L2.js";
187
+ } from "./chunk-E3PNZDPH.js";
201
188
  import {
202
189
  stripAnsi
203
190
  } from "./chunk-6HWVI6MI.js";
@@ -209,36 +196,57 @@ import {
209
196
  scheduleWordIndexPersist,
210
197
  setWordIndexPublishedListener,
211
198
  updateWordIndexDocumentForEdit
212
- } from "./chunk-NBM7PNBP.js";
199
+ } from "./chunk-LXE7JAMV.js";
200
+ import {
201
+ isTypeScriptFile
202
+ } from "./chunk-AYDE7RFV.js";
203
+ import {
204
+ IN_FLIGHT_REASON,
205
+ NO_ANALYZER_REASON,
206
+ NO_SERVER_REASON,
207
+ checkedVerdict,
208
+ emptyDispatchResult,
209
+ faultResult,
210
+ faultSkip,
211
+ findingsResult,
212
+ isNotApplicableSkipReason,
213
+ isRunnerClaimSource,
214
+ isRunnerSkipReason,
215
+ noPrimaryCheckerReason,
216
+ reachedNoVerdict,
217
+ recordedUnchecked,
218
+ semanticFor,
219
+ spanOverlapsModifiedRanges,
220
+ unchecked
221
+ } from "./chunk-W6VLB6LL.js";
213
222
  import {
214
223
  WARM_CODE_ACTION_LOOKUP_LIMIT,
215
224
  contentHash
216
- } from "./chunk-YF4G5NN5.js";
225
+ } from "./chunk-YVPB5YGO.js";
217
226
  import {
218
227
  resolveRunnerPath,
219
228
  toRunnerDisplayPath
220
- } from "./chunk-W7TY6HYX.js";
229
+ } from "./chunk-ZRQMENT4.js";
221
230
  import {
222
231
  withBudget
223
- } from "./chunk-WAA63ZJV.js";
232
+ } from "./chunk-3HZ6MNB2.js";
224
233
  import {
225
234
  findCommandOnPath,
226
235
  isSpawnableCommand
227
- } from "./chunk-AON2QIJF.js";
236
+ } from "./chunk-ITAPXBIB.js";
228
237
  import {
229
238
  logRunnerAdvisoryOnce,
230
239
  resolveRunnerCwd,
231
240
  resolveRunnerCwdWithReason
232
- } from "./chunk-TLWFZ66Y.js";
241
+ } from "./chunk-JSQK5DH3.js";
233
242
  import {
234
243
  findLocalBinUpwards,
235
244
  localBinPath
236
- } from "./chunk-KSTQ4VXT.js";
245
+ } from "./chunk-FVEEEEIM.js";
237
246
  import {
238
- createAvailabilityProbeFlight,
239
247
  getIsolatedNpxSpawnOptions,
240
248
  probeToolAsync
241
- } from "./chunk-VPFRU5IG.js";
249
+ } from "./chunk-OP5BMZKK.js";
242
250
  import {
243
251
  classifyProbeFailure,
244
252
  createAvailabilityLatch,
@@ -246,14 +254,13 @@ import {
246
254
  describeUnavailability,
247
255
  isLatchingOutcome,
248
256
  logAvailabilityDecision,
249
- startHostStallSampler,
250
- transientRetryDelayMs
251
- } from "./chunk-NPNFGYLV.js";
257
+ startHostStallSampler
258
+ } from "./chunk-WBXCIRVI.js";
252
259
  import {
253
260
  getLspCapableKinds,
254
261
  getPrimaryDispatchGroup,
255
262
  resolveLanguageRootForFile
256
- } from "./chunk-TJQSYX3J.js";
263
+ } from "./chunk-TTGDTNSN.js";
257
264
  import {
258
265
  getGlobalPiLensDir,
259
266
  getProjectDataDir,
@@ -261,17 +268,16 @@ import {
261
268
  isInSpawnTimeoutCooldown,
262
269
  isTestFile,
263
270
  loadPiLensGlobalConfig,
264
- noteSpawnTimeout,
265
271
  realIsPidAlive,
266
272
  resolvePiLensFlag,
267
273
  safeSpawnAsync
268
- } from "./chunk-H65TYP6V.js";
274
+ } from "./chunk-DNB4ZQGN.js";
269
275
  import {
270
276
  DOTNET_CSHARP_PROJECT_MARKERS,
271
277
  DOTNET_CSHARP_SOLUTION_MARKERS,
272
278
  detectFileKind,
273
279
  isJstsFactFile
274
- } from "./chunk-CZCAZVTD.js";
280
+ } from "./chunk-SRXYSLMW.js";
275
281
  import {
276
282
  PathKeyedMap,
277
283
  boundedKeyLabel,
@@ -282,45 +288,45 @@ import {
282
288
  migrationSubject,
283
289
  reportPiLensConfigRecords,
284
290
  resolveOnePiLensConfigDocument,
285
- resolvePiLensConfig
286
- } from "./chunk-FOEPIX76.js";
291
+ resolvePiLensConfig,
292
+ spawnCooldownScope
293
+ } from "./chunk-6EIV3H7O.js";
287
294
  import {
288
- findNearestDirWithAnyBasename,
289
295
  findNearestDirWithMarker,
290
296
  getPiLensGlobalConfigPath
291
- } from "./chunk-NL5LSKVD.js";
297
+ } from "./chunk-3R3Z54J7.js";
292
298
  import {
293
299
  getProjectTrustState,
294
300
  killedForOutputCap,
295
301
  projectTrustDenialReason,
296
302
  truncatedByOutputCap,
297
303
  writeFileAtomic
298
- } from "./chunk-7WJ55KBN.js";
304
+ } from "./chunk-43KD3PPM.js";
299
305
  import {
300
306
  createSubsystemLogger,
301
307
  incrementDegradationCount,
302
308
  logExtension,
303
309
  recordDegradationOnce
304
- } from "./chunk-3FRI5H4T.js";
310
+ } from "./chunk-AGEQRJ5A.js";
305
311
  import {
306
312
  createNdjsonLogger,
307
313
  getGlobalPiLensLogDir,
308
314
  getMaxLogSizeMB,
309
315
  isTestMode,
310
316
  logLatency,
317
+ nonNegativeIntEnv,
311
318
  phaseFinished,
312
319
  phaseStarted
313
- } from "./chunk-VCRVNLE7.js";
320
+ } from "./chunk-K2GV34T2.js";
314
321
  import {
315
322
  FactStore,
316
323
  setFactStoreEvictionReporter
317
- } from "./chunk-A5TEJZGJ.js";
324
+ } from "./chunk-O6LCSHHI.js";
318
325
  import {
319
326
  BoundedFifoMap,
320
327
  BoundedLruCache,
321
328
  direntsHaveMarkerGlobMatch,
322
329
  findLocalToolConfig,
323
- findNearestContaining,
324
330
  isAbsoluteFilePath,
325
331
  isUnderDir,
326
332
  isWindowsPath,
@@ -333,15 +339,16 @@ import {
333
339
  relativeInside,
334
340
  toPosix,
335
341
  toProjectRelativePath
336
- } from "./chunk-CB7PEVOJ.js";
342
+ } from "./chunk-WLD6BGON.js";
337
343
 
338
344
  // dist/clients/mcp/analyze.js
339
- import * as fs18 from "node:fs";
345
+ import * as fs15 from "node:fs";
340
346
  import * as path50 from "node:path";
341
347
 
342
348
  // dist/clients/cache-manager.js
343
349
  import * as fs from "node:fs";
344
350
  import * as path from "node:path";
351
+ var JSCPD_RESCAN_OTHER_EXTENSIONS = /\.(py|go|rs|rb|java|cs|php|cpp|c|h|hpp|swift|kt)$/;
345
352
  var DEFAULT_MAX_AGE_MS = 30 * 60 * 1e3;
346
353
  var DEFAULT_TURN_STATE = {
347
354
  files: {},
@@ -882,7 +889,7 @@ var CacheManager = class {
882
889
  */
883
890
  getFilesForJscpd(cwd, sessionId) {
884
891
  const state = this.readTurnState(cwd, sessionId);
885
- return Object.keys(state.files).filter((f) => /\.(ts|tsx|js|jsx|mjs|cjs|py|go|rs|rb|java|cs|php|cpp|c|h|hpp|swift|kt)$/.test(f));
892
+ return Object.keys(state.files).filter((f) => isJstsFactFile(f) || JSCPD_RESCAN_OTHER_EXTENSIONS.test(f));
886
893
  }
887
894
  /**
888
895
  * Get files that need madge re-scan (imports changed).
@@ -977,7 +984,7 @@ function createDiagnosticLogger() {
977
984
  }
978
985
 
979
986
  // dist/clients/dispatch/dispatcher.js
980
- import * as fs4 from "node:fs";
987
+ import * as fs3 from "node:fs";
981
988
  import * as path4 from "node:path";
982
989
 
983
990
  // dist/clients/line-alignment.js
@@ -1090,6 +1097,73 @@ function normalizeRuleId(ruleId) {
1090
1097
  }
1091
1098
  return normalized;
1092
1099
  }
1100
+ var FINDING_CLASS_RULES = /* @__PURE__ */ new Map([
1101
+ [
1102
+ "eslint",
1103
+ /* @__PURE__ */ new Map([
1104
+ ["no-unused-vars", "unused-variable"],
1105
+ ["@typescript-eslint/no-unused-vars", "unused-variable"],
1106
+ ["no-undef", "undefined-name"]
1107
+ ])
1108
+ ],
1109
+ [
1110
+ "oxlint",
1111
+ /* @__PURE__ */ new Map([
1112
+ ["no-unused-vars", "unused-variable"],
1113
+ ["no-undef", "undefined-name"]
1114
+ ])
1115
+ ],
1116
+ [
1117
+ "biome",
1118
+ /* @__PURE__ */ new Map([
1119
+ ["lint/correctness/noUnusedVariables", "unused-variable"],
1120
+ ["lint/correctness/noUnusedImports", "unused-import"],
1121
+ ["lint/correctness/noUndeclaredVariables", "undefined-name"]
1122
+ ])
1123
+ ],
1124
+ [
1125
+ "ruff",
1126
+ /* @__PURE__ */ new Map([
1127
+ ["F841", "unused-variable"],
1128
+ ["F401", "unused-import"],
1129
+ ["F821", "undefined-name"]
1130
+ ])
1131
+ ],
1132
+ [
1133
+ "pyright",
1134
+ /* @__PURE__ */ new Map([
1135
+ ["reportUnusedVariable", "unused-variable"],
1136
+ ["reportUnusedImport", "unused-import"],
1137
+ ["reportUndefinedVariable", "undefined-name"]
1138
+ ])
1139
+ ],
1140
+ ["mypy", /* @__PURE__ */ new Map([["name-defined", "undefined-name"]])]
1141
+ ]);
1142
+ var PYRIGHT_LSP_SOURCE = /^(?:Pyright|basedpyright):(.+)$/;
1143
+ function findingClassOf(d) {
1144
+ const rule = d.rule;
1145
+ if (!rule)
1146
+ return void 0;
1147
+ const tool = d.tool;
1148
+ if (tool === "lsp") {
1149
+ const code = PYRIGHT_LSP_SOURCE.exec(rule)?.[1];
1150
+ return code === void 0 ? void 0 : FINDING_CLASS_RULES.get("pyright")?.get(code);
1151
+ }
1152
+ return FINDING_CLASS_RULES.get(tool)?.get(rule);
1153
+ }
1154
+ function findingClassKey(d) {
1155
+ const cls = findingClassOf(d);
1156
+ return cls === void 0 ? void 0 : `${d.filePath}:${d.line ?? 1}:${d.column ?? 1}:class:${cls}`;
1157
+ }
1158
+ function withClassSeverity(d) {
1159
+ if (d.runnerFault === true)
1160
+ return d;
1161
+ if (d.semantic !== "warning" && d.semantic !== "none")
1162
+ return d;
1163
+ if (findingClassOf(d) === void 0)
1164
+ return d;
1165
+ return { ...d, severity: "error", semantic: "blocking" };
1166
+ }
1093
1167
 
1094
1168
  // dist/clients/dispatch/inline-suppressions.js
1095
1169
  var SUPPRESS_RE = /(?:\/\/|#)\s*pi-lens-ignore:\s*(.+)/;
@@ -1143,16 +1217,6 @@ function applyInlineSuppressions(diagnostics, content) {
1143
1217
  });
1144
1218
  }
1145
1219
 
1146
- // dist/clients/dispatch/runners/utils.js
1147
- import * as fs3 from "node:fs";
1148
- function readFileContent(filePath) {
1149
- try {
1150
- return fs3.readFileSync(filePath, "utf-8");
1151
- } catch {
1152
- return void 0;
1153
- }
1154
- }
1155
-
1156
1220
  // dist/clients/dispatch/rule-policy.js
1157
1221
  import * as nodePath from "node:path";
1158
1222
  function resolveDispatchPolicyConfig(root) {
@@ -1375,7 +1439,7 @@ function convertLspDiagnostics(diags, filePath, options = {}) {
1375
1439
  4: "hint"
1376
1440
  };
1377
1441
  const severity = severityMap[d.severity] ?? "info";
1378
- const semantic = d.severity === 1 ? "blocking" : d.severity === 2 ? "warning" : "none";
1442
+ const semantic = d.severity === 1 || d.severity === 2 || d.severity === 3 ? semanticFor(severity) : "none";
1379
1443
  const code = String(d.code ?? "unknown");
1380
1444
  const source = d.source ?? tool;
1381
1445
  const hasSuggestion = options.fixSuggestionByIndex?.has(idx) ?? false;
@@ -1450,7 +1514,7 @@ function applyFindingPolicyByOwner(diagnostics, options) {
1450
1514
  };
1451
1515
  collect(applyFindingPolicy(own, options));
1452
1516
  for (const [owner, group] of byOwner) {
1453
- const content = isWithinIdentity(owner, options.cwd) ? readFileContent(owner) : void 0;
1517
+ const content = trustedCitedOwnerContent(owner, options.cwd, () => readFileContent(owner));
1454
1518
  if (content === void 0) {
1455
1519
  collect({
1456
1520
  kept: applyRulePolicy(group, options.policyMap, {
@@ -1957,8 +2021,52 @@ function observeRunnerLatency(options) {
1957
2021
  slowRunners.delete(runnerKey);
1958
2022
  return "inline";
1959
2023
  }
2024
+ var flights = /* @__PURE__ */ new Map();
2025
+ var DROPPED_BY_RESET = {
2026
+ status: "skipped",
2027
+ diagnostics: [],
2028
+ semantic: "none"
2029
+ };
2030
+ function runCollectLater(options) {
2031
+ const flightKey = key(options.projectRoot, options.runnerId);
2032
+ const flight = flights.get(flightKey);
2033
+ if (flight) {
2034
+ const fileKey = normalizeMapKey(options.filePath);
2035
+ const queued = flight.queued.get(fileKey);
2036
+ if (queued) {
2037
+ queued.start = options.start;
2038
+ return { promise: queued.promise, coalesced: true };
2039
+ }
2040
+ const slot = {
2041
+ start: options.start,
2042
+ promise: Promise.allSettled([flight.tail]).then(() => startQueued(flightKey, flight, fileKey, slot))
2043
+ };
2044
+ flight.queued.set(fileKey, slot);
2045
+ chain(flightKey, flight, slot.promise);
2046
+ return { promise: slot.promise, coalesced: true };
2047
+ }
2048
+ const promise = options.start();
2049
+ const started = { tail: promise, queued: /* @__PURE__ */ new Map() };
2050
+ flights.set(flightKey, started);
2051
+ chain(flightKey, started, promise);
2052
+ return { promise, coalesced: false };
2053
+ }
2054
+ function startQueued(flightKey, flight, fileKey, slot) {
2055
+ if (flights.get(flightKey) !== flight)
2056
+ return DROPPED_BY_RESET;
2057
+ flight.queued.delete(fileKey);
2058
+ return slot.start();
2059
+ }
2060
+ function chain(flightKey, flight, run) {
2061
+ flight.tail = run;
2062
+ void Promise.allSettled([run]).then(() => {
2063
+ if (flight.tail === run && flights.get(flightKey) === flight)
2064
+ flights.delete(flightKey);
2065
+ });
2066
+ }
1960
2067
  function resetObservedRunnerLatency() {
1961
2068
  slowRunners.clear();
2069
+ flights.clear();
1962
2070
  }
1963
2071
 
1964
2072
  // dist/clients/dispatch/pending-runner-findings.js
@@ -2333,7 +2441,6 @@ ${emoji} Auto-fixed ${diagnostics.length} issue(s):
2333
2441
  }
2334
2442
 
2335
2443
  // dist/clients/dispatch/dispatcher.js
2336
- var dispatcherProbeFlights = createAvailabilityProbeFlight({ generation: () => getDispatchAvailabilityGeneration() });
2337
2444
  var RunnerRegistry = class {
2338
2445
  runners = /* @__PURE__ */ new Map();
2339
2446
  register(runner) {
@@ -2372,105 +2479,37 @@ function normalizeCacheKey(cmd) {
2372
2479
  return `session.toolCache.${normalized}`;
2373
2480
  }
2374
2481
  var TOOL_PROBE_TIMEOUT_MS = 5e3;
2375
- function transientRetryKey(command) {
2376
- return `${normalizeCacheKey(command)}.retryAt`;
2377
- }
2378
- function transientAttemptsKey(command) {
2379
- return `${normalizeCacheKey(command)}.transientAttempts`;
2380
- }
2381
- async function checkToolAvailability(command, facts) {
2382
- const key2 = normalizeCacheKey(command);
2383
- const cached = facts.getSessionFact(key2);
2384
- if (cached !== void 0) {
2385
- return cached;
2386
- }
2387
- const retryAt = facts.getSessionFact(transientRetryKey(command));
2388
- if (retryAt !== void 0 && Date.now() < retryAt)
2482
+ var commandCheckers = /* @__PURE__ */ new Map();
2483
+ async function checkToolAvailability(command) {
2484
+ if (!await isSpawnableCommand(command))
2389
2485
  return false;
2390
- if (!await isSpawnableCommand(command)) {
2391
- facts.setSessionFact(key2, false);
2392
- return false;
2393
- }
2394
- try {
2395
- const sampler = startHostStallSampler();
2396
- const startedAt = Date.now();
2397
- let result;
2398
- let hostStallMs;
2399
- let probeJoined = false;
2400
- try {
2401
- const shared = dispatcherProbeFlights.run(`dispatcher:${key2}`, () => probeToolAsync(command, ["--version"], {
2402
- timeout: TOOL_PROBE_TIMEOUT_MS
2403
- }));
2404
- probeJoined = shared.joined;
2405
- result = await shared.promise;
2406
- } finally {
2407
- hostStallMs = sampler.stop();
2408
- }
2409
- const elapsedMs = Date.now() - startedAt;
2410
- recordAvailabilityProbeOverrun(command, key2, elapsedMs, TOOL_PROBE_TIMEOUT_MS, result.failure);
2411
- if (result.status === 0) {
2412
- facts.setSessionFact(key2, true);
2413
- facts.setSessionFact(transientRetryKey(command), 0);
2414
- facts.setSessionFact(transientAttemptsKey(command), 0);
2415
- logAvailabilityDecision({
2416
- tool: command,
2417
- verdict: "available",
2418
- outcome: "success",
2419
- cause: "ok",
2420
- elapsedMs,
2421
- latched: true,
2422
- classifiedBy: probeJoined ? "joined" : "probe",
2423
- hostStallMs,
2424
- budgetMs: TOOL_PROBE_TIMEOUT_MS
2425
- });
2426
- return true;
2427
- }
2428
- const { outcome, cause, evidence } = classifyProbeFailure(result, {
2429
- hostStallMs,
2486
+ const key2 = normalizeCacheKey(command);
2487
+ let checker = commandCheckers.get(key2);
2488
+ if (!checker) {
2489
+ checker = createAvailabilityChecker(command, "", ["--version"], {
2490
+ pathOnly: true,
2491
+ probeTimeout: TOOL_PROBE_TIMEOUT_MS,
2492
+ // A non-zero exit with no typed failure keeps its pre-#1476 meaning:
2493
+ // durable, cached for the session.
2430
2494
  unclassifiedFailureOutcome: "missing"
2431
2495
  });
2432
- let retryAfterMs;
2433
- if (outcome === "transient") {
2434
- const attempts = (facts.getSessionFact(transientAttemptsKey(command)) ?? 0) + 1;
2435
- facts.setSessionFact(transientAttemptsKey(command), attempts);
2436
- retryAfterMs = transientRetryDelayMs(attempts, cause);
2437
- facts.setSessionFact(transientRetryKey(command), Date.now() + retryAfterMs);
2438
- } else {
2439
- facts.setSessionFact(key2, false);
2440
- facts.setSessionFact(transientAttemptsKey(command), 0);
2441
- }
2442
- logAvailabilityDecision({
2443
- tool: command,
2444
- verdict: "unavailable",
2445
- outcome,
2446
- cause,
2447
- elapsedMs,
2448
- latched: outcome !== "transient",
2449
- hostStallMs,
2450
- ...retryAfterMs !== void 0 && { retryAfterMs },
2451
- budgetMs: TOOL_PROBE_TIMEOUT_MS,
2452
- classifiedBy: probeJoined ? "joined" : "probe",
2453
- evidence
2454
- });
2455
- return false;
2456
- } catch {
2457
- facts.setSessionFact(key2, false);
2458
- return false;
2496
+ commandCheckers.set(key2, checker);
2459
2497
  }
2498
+ return checker.isAvailableAsync();
2460
2499
  }
2461
2500
  function readFilePrefix(filePath, maxBytes = 4096) {
2462
2501
  let fd;
2463
2502
  try {
2464
- fd = fs4.openSync(filePath, "r");
2503
+ fd = fs3.openSync(filePath, "r");
2465
2504
  const buffer = Buffer.alloc(maxBytes);
2466
- const bytesRead = fs4.readSync(fd, buffer, 0, maxBytes, 0);
2505
+ const bytesRead = fs3.readSync(fd, buffer, 0, maxBytes, 0);
2467
2506
  return buffer.subarray(0, bytesRead).toString("utf8");
2468
2507
  } catch {
2469
2508
  return void 0;
2470
2509
  } finally {
2471
2510
  if (fd !== void 0) {
2472
2511
  try {
2473
- fs4.closeSync(fd);
2512
+ fs3.closeSync(fd);
2474
2513
  } catch {
2475
2514
  }
2476
2515
  }
@@ -2521,7 +2560,7 @@ function createDispatchContext(filePath, cwd, pi, facts, blockingOnly, modifiedR
2521
2560
  telemetryProvider,
2522
2561
  toolCwdMemo: {},
2523
2562
  async hasTool(command) {
2524
- return checkToolAvailability(command, facts);
2563
+ return checkToolAvailability(command);
2525
2564
  },
2526
2565
  log(message, level) {
2527
2566
  logExtension({
@@ -2591,6 +2630,30 @@ function dedupeOverlappingDiagnostics(diagnostics) {
2591
2630
  }
2592
2631
  return [...byKey.values()];
2593
2632
  }
2633
+ function blocksAsClassMember(d) {
2634
+ return d.semantic !== "blocking" && withClassSeverity(d) !== d;
2635
+ }
2636
+ function mergeFindingClasses(visible, held) {
2637
+ const heldKeys = new Set(held.map(findingClassKey));
2638
+ const score = (d) => semanticRank(d.semantic) * 100 + toolPriority(d.tool, d.defectClass ?? classifyDiagnostic(d));
2639
+ const slotByKey = /* @__PURE__ */ new Map();
2640
+ const merged = [];
2641
+ for (const d of visible) {
2642
+ const key2 = findingClassKey(d);
2643
+ if (key2 === void 0 || heldKeys.has(key2)) {
2644
+ merged.push(d);
2645
+ continue;
2646
+ }
2647
+ const raised = withClassSeverity(d);
2648
+ const slot = slotByKey.get(key2);
2649
+ if (slot === void 0) {
2650
+ slotByKey.set(key2, merged.push(raised) - 1);
2651
+ } else if (score(raised) > score(merged[slot])) {
2652
+ merged[slot] = raised;
2653
+ }
2654
+ }
2655
+ return merged;
2656
+ }
2594
2657
  function suppressLintOverlapsWithLsp(diagnostics) {
2595
2658
  const lspBySpanClass = /* @__PURE__ */ new Set();
2596
2659
  const lspByLine = /* @__PURE__ */ new Set();
@@ -2753,7 +2816,7 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2753
2816
  return { verdict: fallbackChecked, coverage: "fallback" };
2754
2817
  if (relevant.every((r) => r.runnerId === "lsp" && r.skipReason === "no-files-matched"))
2755
2818
  return {
2756
- verdict: unchecked("not analyzed (no language server handles this file)")
2819
+ verdict: unchecked(`not analyzed (${NO_SERVER_REASON})`)
2757
2820
  };
2758
2821
  const cause = combinePrimaryUnavailableCauses(relevant.flatMap((r) => r.primaryUnavailableCause ?? []));
2759
2822
  const deniedRunnerIds = relevant.filter((r) => r.skipReason === DISABLED_BY_CONFIG_SKIP_REASON).map((r) => r.runnerId);
@@ -2971,40 +3034,23 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
2971
3034
  const observedTier = ctx.writeIndex === void 0 ? "inline" : classifyObservedRunner(projectRoot, runner.id);
2972
3035
  if (observedTier === "collect-later") {
2973
3036
  const markedAtMs = Date.now();
2974
- const deferred = runRunner(runnerCtx, runner, semantic).then((result2) => {
2975
- const durationMs = Date.now() - markedAtMs;
2976
- const tier2 = observeRunnerLatency({
3037
+ const run = async () => {
3038
+ const startedAtMs = Date.now();
3039
+ const result2 = await runRunner(runnerCtx, runner, semantic);
3040
+ const durationMs = Date.now() - startedAtMs;
3041
+ observeRunnerTier({
3042
+ filePath: ctx.filePath,
2977
3043
  projectRoot,
2978
3044
  runnerId: runner.id,
3045
+ observedTier,
2979
3046
  durationMs,
2980
- timedOut: result2.failureKind === "timeout"
3047
+ result: result2
2981
3048
  });
2982
- if (tier2 !== observedTier) {
2983
- logLatency({
2984
- type: "phase",
2985
- filePath: ctx.filePath,
2986
- phase: "runner_collect_later_tier_flip",
2987
- durationMs: 0,
2988
- metadata: {
2989
- runnerId: runner.id,
2990
- from: observedTier,
2991
- to: tier2,
2992
- projectRoot
2993
- }
2994
- });
2995
- }
2996
- if (tier2 === "collect-later") {
2997
- incrementDegradationCount({
2998
- kind: "runner-collect-later",
2999
- subject: `${projectRoot}:${runner.id}`,
3000
- reason: `observed ${durationMs}ms, threshold ${COLLECT_LATER_THRESHOLD_MS}ms`
3001
- });
3002
- }
3003
3049
  logLatency({
3004
3050
  type: "runner",
3005
3051
  filePath: ctx.filePath,
3006
3052
  runnerId: runner.id,
3007
- startedAt: new Date(markedAtMs).toISOString(),
3053
+ startedAt: new Date(startedAtMs).toISOString(),
3008
3054
  durationMs,
3009
3055
  status: result2.status,
3010
3056
  diagnosticCount: result2.diagnostics.length,
@@ -3016,6 +3062,12 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3016
3062
  }
3017
3063
  });
3018
3064
  return result2;
3065
+ };
3066
+ const { promise: deferred, coalesced } = runCollectLater({
3067
+ projectRoot,
3068
+ runnerId: runner.id,
3069
+ filePath: ctx.filePath,
3070
+ start: run
3019
3071
  });
3020
3072
  deferRunnerFindings({
3021
3073
  filePath: ctx.filePath,
@@ -3048,7 +3100,11 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3048
3100
  status: "pending",
3049
3101
  diagnosticCount: 0,
3050
3102
  semantic,
3051
- metadata: { tier: "collect-later", delivered: "turn_end" }
3103
+ metadata: {
3104
+ tier: "collect-later",
3105
+ delivered: "turn_end",
3106
+ ...coalesced && { coalesced: true }
3107
+ }
3052
3108
  });
3053
3109
  continue;
3054
3110
  }
@@ -3056,31 +3112,14 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3056
3112
  onRunnerResult?.(runnerId, result);
3057
3113
  const runnerEnd = Date.now();
3058
3114
  const duration = runnerEnd - runnerStart;
3059
- const tier = ctx.writeIndex === void 0 ? "inline" : observeRunnerLatency({
3060
- projectRoot,
3061
- runnerId: runner.id,
3062
- durationMs: duration,
3063
- timedOut: result.failureKind === "timeout"
3064
- });
3065
- if (tier !== observedTier) {
3066
- logLatency({
3067
- type: "phase",
3115
+ if (ctx.writeIndex !== void 0) {
3116
+ observeRunnerTier({
3068
3117
  filePath: ctx.filePath,
3069
- phase: "runner_collect_later_tier_flip",
3070
- durationMs: 0,
3071
- metadata: {
3072
- runnerId: runner.id,
3073
- from: observedTier,
3074
- to: tier,
3075
- projectRoot
3076
- }
3077
- });
3078
- }
3079
- if (tier === "collect-later") {
3080
- incrementDegradationCount({
3081
- kind: "runner-collect-later",
3082
- subject: `${projectRoot}:${runner.id}`,
3083
- reason: `observed ${duration}ms, threshold ${COLLECT_LATER_THRESHOLD_MS}ms`
3118
+ projectRoot,
3119
+ runnerId: runner.id,
3120
+ observedTier,
3121
+ durationMs: duration,
3122
+ result
3084
3123
  });
3085
3124
  }
3086
3125
  const skipReason = result.status === "skipped" && isRunnerSkipReason(result.skipReason) ? result.skipReason : void 0;
@@ -3320,7 +3359,7 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3320
3359
  const filtered = filterDelta(visibleDiagnostics, applyOutputFilters(previousBaseline), { key: (d) => findingKey(d), lane: (d) => d.tool });
3321
3360
  const isNew = new Set(filtered.new);
3322
3361
  heldBackBlockers = visibleDiagnostics.filter((d) => d.semantic === "blocking" && !isNew.has(d));
3323
- stillObserved.push(...promoteDeltaUnusedToBlockers(visibleDiagnostics.flatMap((d) => !isNew.has(d) && d.semantic !== "blocking" && isUnusedValueDiagnostic(d) ? [d] : [])));
3362
+ stillObserved.push(...promoteDeltaUnusedToBlockers(visibleDiagnostics.flatMap((d) => !isNew.has(d) && d.semantic !== "blocking" && (isUnusedValueDiagnostic(d) || blocksAsClassMember(d)) ? [d] : [])).map(withClassSeverity));
3324
3363
  visibleDiagnostics = promoteDeltaUnusedToBlockers(filtered.new);
3325
3364
  resolvedCount = filtered.fixed.length;
3326
3365
  }
@@ -3330,7 +3369,9 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3330
3369
  let preExisting = [];
3331
3370
  if (preEditSeed && seedContent !== void 0) {
3332
3371
  const classified = classifyPreExisting(preEditSeed, [
3333
- ...visibleDiagnostics.filter((d) => d.semantic === "blocking"),
3372
+ // #5416: and a class member the merge below would raise, so the
3373
+ // seed holds it before the raise can block on it.
3374
+ ...visibleDiagnostics.filter((d) => d.semantic === "blocking" || blocksAsClassMember(d)),
3334
3375
  ...heldBackBlockers
3335
3376
  ], seedContent, new Set([...answeredRunnerIds].filter((id) => !inconclusiveRunnerIds.has(id))));
3336
3377
  if (classified.preExisting.length > 0) {
@@ -3341,6 +3382,7 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3341
3382
  }
3342
3383
  ctx.facts.setBoundedSessionFact(seedKey, classified.nextSeed);
3343
3384
  }
3385
+ visibleDiagnostics = mergeFindingClasses(visibleDiagnostics, preExisting);
3344
3386
  if (ctx.deltaMode && baselinePathSafe) {
3345
3387
  ctx.facts.setBoundedSessionFact(baselineAbsKey, [...dedupedDiagnostics]);
3346
3388
  }
@@ -3352,14 +3394,14 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3352
3394
  provider: ctx.telemetryProvider
3353
3395
  };
3354
3396
  if (fixedItems.length > 0) {
3355
- import("./chunk-KFRDFAOE.js").then(({ appendToWorklog }) => {
3397
+ import("./chunk-LPM6NKVI.js").then(({ appendToWorklog }) => {
3356
3398
  appendToWorklog(ctx.cwd, fixedItems, true, worklogIdentity);
3357
3399
  }).catch(() => {
3358
3400
  });
3359
3401
  }
3360
3402
  const fixableWarnings = warnings.filter((d) => d.fixable);
3361
3403
  if (fixableWarnings.length > 0) {
3362
- import("./chunk-KFRDFAOE.js").then(({ appendToWorklog }) => {
3404
+ import("./chunk-LPM6NKVI.js").then(({ appendToWorklog }) => {
3363
3405
  appendToWorklog(ctx.cwd, fixableWarnings, false, worklogIdentity);
3364
3406
  }).catch(() => {
3365
3407
  });
@@ -3517,11 +3559,44 @@ function failureRowMetadata(result) {
3517
3559
  }
3518
3560
  return result.inconclusive === true ? inconclusive : void 0;
3519
3561
  }
3562
+ function observeRunnerTier(options) {
3563
+ const { filePath, projectRoot, runnerId, observedTier, durationMs } = options;
3564
+ const tier = observeRunnerLatency({
3565
+ projectRoot,
3566
+ runnerId,
3567
+ durationMs,
3568
+ timedOut: options.result.failureKind === "timeout"
3569
+ });
3570
+ if (tier !== observedTier) {
3571
+ logLatency({
3572
+ type: "phase",
3573
+ filePath,
3574
+ phase: "runner_collect_later_tier_flip",
3575
+ durationMs: 0,
3576
+ metadata: { runnerId, from: observedTier, to: tier, projectRoot }
3577
+ });
3578
+ }
3579
+ if (tier === "collect-later") {
3580
+ incrementDegradationCount({
3581
+ kind: "runner-collect-later",
3582
+ subject: `${projectRoot}:${runnerId}`,
3583
+ reason: `observed ${durationMs}ms, threshold ${COLLECT_LATER_THRESHOLD_MS}ms`
3584
+ });
3585
+ }
3586
+ }
3520
3587
  async function runRunner(ctx, runner, defaultSemantic) {
3588
+ if (isInSpawnTimeoutCooldown(runner.id)) {
3589
+ recordDegradationOnce({
3590
+ kind: "runner-spawn-timeout-cooldown",
3591
+ subject: runner.id,
3592
+ reason: "skipped: its spawn timed out earlier this session"
3593
+ });
3594
+ return { status: "skipped", diagnostics: [], semantic: "none" };
3595
+ }
3521
3596
  const timeoutMs = Math.max(runner.timeoutMs ?? RUNNER_TIMEOUT_MS, getRunnerTimeoutFloorMs());
3522
3597
  const phaseToken = phaseStarted(runner.id);
3523
3598
  try {
3524
- const outcome = await withBudget(runner.run(ctx).then((value) => ({ value })), timeoutMs);
3599
+ const outcome = await withBudget(spawnCooldownScope.run({ tool: runner.id, subject: runner.id, phase: "lint" }, () => runner.run(ctx)).then((value) => ({ value })), timeoutMs);
3525
3600
  if (outcome === void 0) {
3526
3601
  throw new Error(`Runner ${runner.id} timed out after ${timeoutMs}ms`);
3527
3602
  }
@@ -3552,8 +3627,7 @@ async function runRunner(ctx, runner, defaultSemantic) {
3552
3627
 
3553
3628
  // dist/clients/cascade-budget.js
3554
3629
  function cascadeSettleWaitMs() {
3555
- const raw = Number(process.env.PI_LENS_CASCADE_SETTLE_WAIT_MS);
3556
- return Number.isFinite(raw) && raw >= 0 ? raw : 5e3;
3630
+ return nonNegativeIntEnv("PI_LENS_CASCADE_SETTLE_WAIT_MS", 5e3);
3557
3631
  }
3558
3632
  var MIN_NEIGHBOUR_BUDGET = RUNTIME_CONFIG.pipeline.cascadeMaxFiles;
3559
3633
  var DEFAULT_NEIGHBOUR_BUDGET = 40;
@@ -3852,7 +3926,7 @@ function formatCascadeNeighborDiagnostics(cwd, neighbors, options = {}) {
3852
3926
  const since = options.stillPresentSince?.(neighbor, d);
3853
3927
  const label = since === void 0 ? "" : ` (still present since turn ${since})`;
3854
3928
  out += `
3855
- line ${line}, col ${col}${rule}: ${d.message.split("\n")[0].slice(0, 100)}${label}`;
3929
+ line ${line}, col ${col}${rule}: ${displayedMessage(d.message)}${label}`;
3856
3930
  }
3857
3931
  out += "\n</diagnostics>";
3858
3932
  }
@@ -3939,7 +4013,7 @@ function cascadeErrorKey(diagnostic) {
3939
4013
  }
3940
4014
  function cascadeStillPresentSince(filePath, diagnostic, turn) {
3941
4015
  const first = pendingNeighbors.get(normalizeMapKey(filePath))?.errors.get(cascadeErrorKey(diagnostic));
3942
- return first !== void 0 && first < turn ? first : void 0;
4016
+ return first !== void 0 && first.turn < turn ? first.turn : void 0;
3943
4017
  }
3944
4018
  function recordDeliveredCascadeNeighbor(filePath, diagnostics, turn, checkedAt) {
3945
4019
  const key2 = normalizeMapKey(filePath);
@@ -3947,7 +4021,17 @@ function recordDeliveredCascadeNeighbor(filePath, diagnostics, turn, checkedAt)
3947
4021
  const errors = /* @__PURE__ */ new Map();
3948
4022
  for (const d of diagnostics) {
3949
4023
  const k = cascadeErrorKey(d);
3950
- errors.set(k, previous?.errors.get(k) ?? turn);
4024
+ errors.set(k, {
4025
+ turn: previous?.errors.get(k)?.turn ?? turn,
4026
+ identity: {
4027
+ filePath: d.filePath,
4028
+ message: d.message,
4029
+ ...d.line !== void 0 && { line: d.line },
4030
+ tool: d.tool,
4031
+ ...d.rule !== void 0 && { rule: d.rule },
4032
+ ...d.semantic !== void 0 && { semantic: d.semantic }
4033
+ }
4034
+ });
3951
4035
  }
3952
4036
  pendingNeighbors.delete(key2);
3953
4037
  if (errors.size === 0)
@@ -3973,7 +4057,8 @@ function listCascadePendingNeighbors() {
3973
4057
  return [...pendingNeighbors.values()].map((entry) => ({
3974
4058
  filePath: entry.filePath,
3975
4059
  errorCount: entry.errors.size,
3976
- checkedAt: entry.checkedAt
4060
+ checkedAt: entry.checkedAt,
4061
+ errors: [...entry.errors.values()].map((stored) => stored.identity)
3977
4062
  }));
3978
4063
  }
3979
4064
  function resetCascadePendingNeighbors() {
@@ -4234,7 +4319,7 @@ function peekOutstandingCascadeTouches(guard) {
4234
4319
  var _reconcileOptions = {};
4235
4320
 
4236
4321
  // dist/clients/dispatch/runners/ast-grep-napi.js
4237
- import * as fs5 from "node:fs";
4322
+ import * as fs4 from "node:fs";
4238
4323
  import * as path6 from "node:path";
4239
4324
 
4240
4325
  // dist/clients/dispatch/priorities.js
@@ -4892,7 +4977,7 @@ function evaluateAstGrepRules(filePath, rootNode, cwd, kind, options = {}) {
4892
4977
  }
4893
4978
  const toDiagnostic3 = (position) => {
4894
4979
  const severity = normalizeRuleSeverity(rule.severity);
4895
- const semantic = severity === "error" ? "blocking" : "warning";
4980
+ const semantic = semanticFor(severity);
4896
4981
  const defectClass = classifyDefect(rule.id, "ast-grep-napi", rule.message || rule.id);
4897
4982
  const ruleFix = explicitRuleFixSuggestion(rule);
4898
4983
  return {
@@ -4968,7 +5053,7 @@ var astGrepNapiRunner = {
4968
5053
  if (!sgModule) {
4969
5054
  return { status: "skipped", diagnostics: [], semantic: "none" };
4970
5055
  }
4971
- if (!fs5.existsSync(ctx.filePath)) {
5056
+ if (!fs4.existsSync(ctx.filePath)) {
4972
5057
  return { status: "skipped", diagnostics: [], semantic: "none" };
4973
5058
  }
4974
5059
  const lang = getLang(ctx.filePath, sgModule);
@@ -4977,7 +5062,7 @@ var astGrepNapiRunner = {
4977
5062
  }
4978
5063
  let stats;
4979
5064
  try {
4980
- stats = fs5.statSync(ctx.filePath);
5065
+ stats = fs4.statSync(ctx.filePath);
4981
5066
  } catch {
4982
5067
  return { status: "skipped", diagnostics: [], semantic: "none" };
4983
5068
  }
@@ -4990,7 +5075,7 @@ var astGrepNapiRunner = {
4990
5075
  content = contentFromFacts;
4991
5076
  } else {
4992
5077
  try {
4993
- content = fs5.readFileSync(ctx.filePath, "utf-8");
5078
+ content = fs4.readFileSync(ctx.filePath, "utf-8");
4994
5079
  } catch {
4995
5080
  return { status: "skipped", diagnostics: [], semantic: "none" };
4996
5081
  }
@@ -5307,7 +5392,6 @@ var tryCatchFactProvider = {
5307
5392
 
5308
5393
  // dist/clients/dispatch/runners/actionlint.js
5309
5394
  import path7 from "node:path";
5310
- var actionlint = createAvailabilityChecker("actionlint", ".exe");
5311
5395
  function isGitHubWorkflowFile(filePath) {
5312
5396
  const normalized = toPosix(filePath);
5313
5397
  return /(^|\/)\.github\/workflows\/[^/]+\.ya?ml$/i.test(normalized);
@@ -5369,11 +5453,7 @@ var actionlintRunner = {
5369
5453
  async run(ctx) {
5370
5454
  const cwd = resolveRunnerCwd(ctx, "actionlint");
5371
5455
  let cmd = null;
5372
- if (await actionlint.isAvailableAsync(cwd)) {
5373
- cmd = actionlint.getCommand(cwd);
5374
- } else {
5375
- cmd = await resolveToolCommandWithInstallFallback(cwd, "actionlint");
5376
- }
5456
+ cmd = await resolveToolCommandWithInstallFallback(cwd, "actionlint");
5377
5457
  if (!cmd)
5378
5458
  return { status: "skipped", diagnostics: [], semantic: "none" };
5379
5459
  const relativeFilePath = path7.relative(cwd, ctx.filePath) || ctx.filePath;
@@ -5446,7 +5526,7 @@ function parseBiomeJson(raw, filePath, cwd, fixKindByRule) {
5446
5526
  line: d.location.start.line,
5447
5527
  column: d.location.start.column,
5448
5528
  severity: normalizeBiomeSeverity(d.severity),
5449
- semantic: d.severity === "error" ? "blocking" : "warning",
5529
+ semantic: semanticFor(normalizeBiomeSeverity(d.severity)),
5450
5530
  tool: "biome",
5451
5531
  rule: d.category,
5452
5532
  fixable: isFixable,
@@ -5592,7 +5672,7 @@ var biomeCheckJsonRunner = {
5592
5672
  var biome_check_default = biomeCheckJsonRunner;
5593
5673
 
5594
5674
  // dist/clients/dispatch/runners/cpp-check.js
5595
- import * as fs6 from "node:fs";
5675
+ import * as fs5 from "node:fs";
5596
5676
  import * as path9 from "node:path";
5597
5677
  var compilerCheckers = {
5598
5678
  clang: createAvailabilityChecker("clang", ".exe"),
@@ -5631,7 +5711,7 @@ var CPP_HEADER_EXTENSIONS = /* @__PURE__ */ new Set([
5631
5711
  ]);
5632
5712
  function headerLooksLikeCpp(absPath) {
5633
5713
  try {
5634
- const content = fs6.readFileSync(absPath, "utf-8");
5714
+ const content = fs5.readFileSync(absPath, "utf-8");
5635
5715
  return /\b(namespace|template|class|constexpr|concept|using)\b|std::|\b(public|private|protected)\s*:/.test(content);
5636
5716
  } catch {
5637
5717
  return false;
@@ -5782,7 +5862,6 @@ var cpp_check_default = cppCheckRunner;
5782
5862
 
5783
5863
  // dist/clients/dispatch/runners/credo.js
5784
5864
  import * as path10 from "node:path";
5785
- import * as fs7 from "node:fs";
5786
5865
  var CREDO_PROBE_BUDGET_MS = 1e4;
5787
5866
  var probeCredo = createCwdCachedProbe((cwd) => safeSpawnAsync("mix", ["credo", "--version"], {
5788
5867
  timeout: CREDO_PROBE_BUDGET_MS,
@@ -5807,17 +5886,16 @@ function parseCredoJson(raw, fallbackPath, cwd) {
5807
5886
  return [];
5808
5887
  }
5809
5888
  }
5810
- function hasMixExs(cwd) {
5811
- return fs7.existsSync(path10.join(cwd, "mix.exs"));
5812
- }
5813
5889
  var credoRunner = {
5814
5890
  id: "credo",
5815
5891
  appliesTo: ["elixir"],
5816
5892
  priority: PRIORITY.GENERAL_ANALYSIS,
5817
5893
  skipTestFiles: false,
5894
+ // mix never walks up, so the seam answers for `cwd` alone.
5895
+ requiresConfig: (cwd) => hasToolConfig("mix", cwd),
5818
5896
  async run(ctx) {
5819
5897
  const cwd = resolveRunnerCwd(ctx, "credo");
5820
- if (!hasMixExs(cwd)) {
5898
+ if (!credoRunner.requiresConfig?.(cwd)) {
5821
5899
  return { status: "skipped", diagnostics: [], semantic: "none" };
5822
5900
  }
5823
5901
  if (!await probeCredo(cwd)) {
@@ -5825,13 +5903,11 @@ var credoRunner = {
5825
5903
  }
5826
5904
  const absPath = path10.resolve(cwd, ctx.filePath);
5827
5905
  const result = await safeSpawnAsync("mix", ["credo", "--format", "json", "--strict", absPath], { timeout: 3e4, cwd });
5828
- const output = `${result.stdout ?? ""}${result.stderr ?? ""}`;
5829
5906
  const parsed = parseToolRun("credo", {
5830
5907
  result,
5831
- output,
5832
5908
  // EXIT TABLE (Credo 1.7 measured fixture): 0 clean; 1 findings; 2 error; other nonzero rejected.
5833
5909
  exitCodes: { ran: [1, 2] }
5834
- }, (raw) => parseCredoJson(raw, ctx.filePath, cwd));
5910
+ }, (raw) => parseCredoJson(raw, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
5835
5911
  if (parsed.skipped)
5836
5912
  return parsed.skipped;
5837
5913
  return finishParsedRun({
@@ -5845,7 +5921,7 @@ var credoRunner = {
5845
5921
  var credo_default = credoRunner;
5846
5922
 
5847
5923
  // dist/clients/dispatch/runners/cue-vet.js
5848
- import * as fs8 from "node:fs";
5924
+ import * as fs6 from "node:fs";
5849
5925
  import * as path11 from "node:path";
5850
5926
  var cue = createAvailabilityChecker("cue", ".exe", ["version"]);
5851
5927
  function parseCueVetOutput(raw) {
@@ -5950,7 +6026,7 @@ var cueVetRunner = {
5950
6026
  const singleFileArgs = ["vet", "-c=false", `./${fileName}`];
5951
6027
  let touchedContent = null;
5952
6028
  try {
5953
- touchedContent = fs8.readFileSync(absPath, "utf8");
6029
+ touchedContent = fs6.readFileSync(absPath, "utf8");
5954
6030
  } catch {
5955
6031
  touchedContent = null;
5956
6032
  }
@@ -6118,7 +6194,7 @@ function parseDartMachineOutput(raw, filePath, cwd) {
6118
6194
  line: lineNum || 1,
6119
6195
  column: colNum || 1,
6120
6196
  severity,
6121
- semantic: severity === "error" ? "blocking" : "warning",
6197
+ semantic: semanticFor(severity),
6122
6198
  tool: "dart",
6123
6199
  rule: ruleId,
6124
6200
  defectClass: "style",
@@ -6167,15 +6243,8 @@ var dartAnalyzeRunner = {
6167
6243
  var dart_analyze_default = dartAnalyzeRunner;
6168
6244
 
6169
6245
  // dist/clients/dispatch/runners/detekt.js
6170
- import * as fs9 from "node:fs";
6171
6246
  import * as path13 from "node:path";
6172
6247
  var detekt = createAvailabilityChecker("detekt", ".bat");
6173
- var DETEKT_CONFIG_CANDIDATES = [
6174
- "detekt.yml",
6175
- ".detekt.yml",
6176
- path13.join("config", "detekt", "detekt.yml"),
6177
- path13.join("detekt", "detekt.yml")
6178
- ];
6179
6248
  var DETEKT_FIXABLE_RULES = /* @__PURE__ */ new Set([
6180
6249
  // formatting (ktlint wrapper) — every rule supports autocorrect
6181
6250
  "AnnotationOnSeparateLine",
@@ -6238,20 +6307,16 @@ var DETEKT_FIXABLE_RULES = /* @__PURE__ */ new Set([
6238
6307
  "UnusedPrivateClass",
6239
6308
  "RedundantVisibilityModifierRule"
6240
6309
  ]);
6241
- function findDetektConfig(cwd) {
6242
- for (const candidate of DETEKT_CONFIG_CANDIDATES) {
6243
- const full = path13.join(cwd, candidate);
6244
- if (fs9.existsSync(full))
6245
- return full;
6246
- }
6247
- return void 0;
6248
- }
6249
6310
  function parseDetektOutput(raw, filePath, cwd) {
6250
6311
  const diagnostics = [];
6312
+ if (!raw.trim())
6313
+ return diagnostics;
6314
+ let located = 0;
6251
6315
  const pattern = /^(.+?):(\d+):(\d+): (?:(error|warning): )?(.+?)(?:\s+\[([^\]]+)\])?$/gm;
6252
6316
  const absTarget = path13.resolve(cwd, filePath);
6253
6317
  for (const match of raw.matchAll(pattern)) {
6254
6318
  const [, file, lineStr, colStr, level, message, rule] = match;
6319
+ located += 1;
6255
6320
  if (!pathsEqual(path13.resolve(cwd, file.trim()), absTarget))
6256
6321
  continue;
6257
6322
  const severity = level === "error" ? "error" : "warning";
@@ -6266,7 +6331,7 @@ function parseDetektOutput(raw, filePath, cwd) {
6266
6331
  line: lineNum,
6267
6332
  column: colNum,
6268
6333
  severity,
6269
- semantic: severity === "error" ? "blocking" : "warning",
6334
+ semantic: semanticFor(severity),
6270
6335
  tool: "detekt",
6271
6336
  rule: ruleId,
6272
6337
  defectClass: "style",
@@ -6274,7 +6339,7 @@ function parseDetektOutput(raw, filePath, cwd) {
6274
6339
  fixSuggestion: fixable ? "Run `detekt --auto-correct` to apply the deterministic auto-correction for this rule." : void 0
6275
6340
  });
6276
6341
  }
6277
- return diagnostics;
6342
+ return located > 0 ? diagnostics : null;
6278
6343
  }
6279
6344
  var detektRunner = {
6280
6345
  id: "detekt",
@@ -6282,13 +6347,14 @@ var detektRunner = {
6282
6347
  priority: PRIORITY.GENERAL_ANALYSIS,
6283
6348
  timeoutMs: 9e4,
6284
6349
  skipTestFiles: false,
6350
+ requiresConfig: (cwd) => hasToolConfig("detekt", cwd),
6285
6351
  async run(ctx) {
6286
6352
  const cwd = resolveRunnerCwd(ctx, "detekt");
6287
6353
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
6288
6354
  if (policy && !policy.preferredRunners.includes("detekt")) {
6289
6355
  return { status: "skipped", diagnostics: [], semantic: "none" };
6290
6356
  }
6291
- const configPath = findDetektConfig(cwd);
6357
+ const configPath = findToolConfig("detekt", cwd)?.file;
6292
6358
  if (!configPath) {
6293
6359
  return { status: "skipped", diagnostics: [], semantic: "none" };
6294
6360
  }
@@ -6305,32 +6371,40 @@ var detektRunner = {
6305
6371
  // Exit 1 is a tool error with NO findings (captured broken-config run: an invalid detekt.yml
6306
6372
  // prints InvalidConfigurationError on stderr), and also can follow printed findings (captured
6307
6373
  // findings-then-exit1 run: a non-numeric build.weights value fails after the report). Exit 1 is
6308
- // therefore admitted, and skipWhenParsedNothing skips it only when the parser read no finding,
6309
- // so a printed finding is kept. Any other nonzero exit is rejected.
6374
+ // therefore admitted, and `finishParsedRun` reports it as failed/parser_error only when the
6375
+ // parser read no finding (#5411, was a skip), so a printed finding is kept. Any other nonzero
6376
+ // exit is rejected.
6310
6377
  exitCodes: { ran: [1, 2] }
6311
- }, (out) => parseDetektOutput(out, ctx.filePath, cwd), { skipWhenParsedNothing: true });
6378
+ }, (out) => parseDetektOutput(out, ctx.filePath, cwd));
6312
6379
  if (run.skipped)
6313
6380
  return run.skipped;
6314
- const diagnostics = run.diagnostics;
6315
- if (diagnostics.length === 0) {
6316
- return { status: "succeeded", diagnostics: [], semantic: "none" };
6317
- }
6318
- const hasErrors = diagnostics.some((d) => d.severity === "error");
6319
- const verdict = findingsResult(diagnostics, {
6320
- status: hasErrors ? "failed" : "succeeded",
6321
- semantic: hasErrors ? "blocking" : "warning"
6381
+ const verdict = finishParsedRun({
6382
+ tool: "detekt",
6383
+ ctx,
6384
+ result,
6385
+ diagnostics: run.diagnostics,
6386
+ unreadable: run.unreadable,
6387
+ classify: (diagnostics) => {
6388
+ const hasErrors = diagnostics.some((d) => d.severity === "error");
6389
+ return {
6390
+ status: hasErrors ? "failed" : "succeeded",
6391
+ semantic: hasErrors ? "blocking" : "warning"
6392
+ };
6393
+ }
6322
6394
  });
6395
+ if (run.diagnostics.length === 0)
6396
+ return verdict;
6323
6397
  return result.status === 1 ? { ...verdict, inconclusive: true } : verdict;
6324
6398
  }
6325
6399
  };
6326
6400
  var detekt_default = detektRunner;
6327
6401
 
6328
6402
  // dist/clients/dispatch/runners/dotnet-build.js
6329
- import * as fs10 from "node:fs";
6403
+ import * as fs7 from "node:fs";
6330
6404
  import * as path14 from "node:path";
6331
6405
  var dotnet = createAvailabilityChecker("dotnet", ".exe");
6332
6406
  function findProjectTarget(cwd) {
6333
- const entries = fs10.readdirSync(cwd, { withFileTypes: true });
6407
+ const entries = fs7.readdirSync(cwd, { withFileTypes: true });
6334
6408
  for (const patterns of [
6335
6409
  DOTNET_CSHARP_SOLUTION_MARKERS,
6336
6410
  DOTNET_CSHARP_PROJECT_MARKERS
@@ -6426,7 +6500,7 @@ function parseDotnetBuildOutput(raw, filePath, cwd) {
6426
6500
  line: lineNum,
6427
6501
  column: colNum,
6428
6502
  severity,
6429
- semantic: severity === "error" ? "blocking" : "warning",
6503
+ semantic: semanticFor(severity),
6430
6504
  tool: "dotnet-build",
6431
6505
  rule,
6432
6506
  fixable: false
@@ -6485,13 +6559,10 @@ ${result.stderr ?? ""}`.trim();
6485
6559
  var dotnet_build_default = dotnetBuildRunner;
6486
6560
 
6487
6561
  // dist/clients/dispatch/runners/elixir-check.js
6488
- import * as fs11 from "node:fs";
6562
+ import * as fs8 from "node:fs";
6489
6563
  import * as path15 from "node:path";
6490
6564
  var mix = createAvailabilityChecker("mix", ".bat");
6491
6565
  var elixirc = createAvailabilityChecker("elixirc", ".bat");
6492
- function hasMixExs2(cwd) {
6493
- return fs11.existsSync(path15.join(cwd, "mix.exs"));
6494
- }
6495
6566
  var ELIXIR_SNIPPET_LOCATION = /└─\s+(.+?):(\d+)(?::(\d+))?(?::|$)/;
6496
6567
  function parseElixirOutput(raw, filePath, cwd = process.cwd()) {
6497
6568
  const diagnostics = [];
@@ -6542,7 +6613,7 @@ function parseElixirOutput(raw, filePath, cwd = process.cwd()) {
6542
6613
  line: Number.parseInt(lineStr2, 10) || 1,
6543
6614
  column: Number.parseInt(colStr2 || "1", 10) || 1,
6544
6615
  severity,
6545
- semantic: severity === "error" ? "blocking" : "warning",
6616
+ semantic: semanticFor(severity),
6546
6617
  tool: "elixir-check",
6547
6618
  rule: severity === "error" ? "error" : "warning",
6548
6619
  fixable: false
@@ -6567,7 +6638,7 @@ function parseElixirOutput(raw, filePath, cwd = process.cwd()) {
6567
6638
  line: Number.parseInt(lineStr, 10) || 1,
6568
6639
  column: Number.parseInt(colStr || "1", 10) || 1,
6569
6640
  severity,
6570
- semantic: severity === "error" ? "blocking" : "warning",
6641
+ semantic: semanticFor(severity),
6571
6642
  tool: "elixir-check",
6572
6643
  rule: severity === "error" ? "error" : "warning",
6573
6644
  fixable: false
@@ -6585,12 +6656,12 @@ var elixirCheckRunner = {
6585
6656
  const absPath = path15.resolve(cwd, ctx.filePath);
6586
6657
  let command;
6587
6658
  let args = [];
6588
- if (hasMixExs2(cwd) && await mix.isAvailableAsync(cwd)) {
6659
+ if (hasToolConfig("mix", cwd) && await mix.isAvailableAsync(cwd)) {
6589
6660
  command = "mix";
6590
6661
  args = ["compile", "--warnings-as-errors"];
6591
6662
  } else if (await elixirc.isAvailableAsync(cwd)) {
6592
6663
  const outDir = path15.join(getProjectDataDir(cwd), "elixir-check");
6593
- fs11.mkdirSync(outDir, { recursive: true });
6664
+ fs8.mkdirSync(outDir, { recursive: true });
6594
6665
  command = "elixirc";
6595
6666
  args = ["-o", outDir, absPath];
6596
6667
  }
@@ -6674,7 +6745,7 @@ function parseEslintJson(raw, filePath, cwd) {
6674
6745
  line: msg.line ?? 1,
6675
6746
  column: msg.column ?? 1,
6676
6747
  severity,
6677
- semantic: severity === "error" ? "blocking" : "warning",
6748
+ semantic: semanticFor(severity),
6678
6749
  tool: "eslint",
6679
6750
  rule: msg.ruleId ?? void 0,
6680
6751
  fixable: !!msg.fix,
@@ -6695,10 +6766,10 @@ var eslintRunner = {
6695
6766
  id: "eslint",
6696
6767
  appliesTo: ["jsts"],
6697
6768
  priority: PRIORITY.LINT_SECONDARY,
6769
+ requiresConfig: (cwd) => hasEslintConfig(cwd),
6698
6770
  async run(ctx) {
6699
6771
  const cwd = resolveRunnerCwd(ctx, "eslint");
6700
- const userHasConfig = hasEslintConfig(cwd);
6701
- if (!userHasConfig) {
6772
+ if (!eslintRunner.requiresConfig?.(cwd)) {
6702
6773
  return { status: "skipped", diagnostics: [], semantic: "none" };
6703
6774
  }
6704
6775
  const cmd = resolveToolCommand(cwd, "eslint") ?? "eslint";
@@ -6706,17 +6777,11 @@ var eslintRunner = {
6706
6777
  return { status: "skipped", diagnostics: [], semantic: "none" };
6707
6778
  }
6708
6779
  const result = await safeSpawnAsync(cmd, ["--format", "json", "--no-error-on-unmatched-pattern", ctx.filePath], { timeout: 3e4, cwd });
6709
- const stdout = result.stdout ?? "";
6710
- let raw = stdout;
6711
- if (raw.length === 0 && result.status !== 0) {
6712
- raw = result.stderr || "";
6713
- }
6714
6780
  const parsed = parseToolRun("eslint", {
6715
6781
  result,
6716
- output: raw,
6717
6782
  // EXIT TABLE (ESLint 9.10 docs https://eslint.org/docs/latest/use/command-line-interface): 0 clean; 1 findings; 2 fatal findings/error; other nonzero rejected.
6718
6783
  exitCodes: { ran: [1, 2] }
6719
- }, (rawOutput) => parseEslintJson(rawOutput, ctx.filePath, cwd).diagnostics);
6784
+ }, (rawOutput) => parseEslintJson(rawOutput, ctx.filePath, cwd).diagnostics, { parseStreams: "stdout-else-stderr" });
6720
6785
  if (parsed.skipped)
6721
6786
  return parsed.skipped;
6722
6787
  return finishParsedRun({
@@ -6805,7 +6870,7 @@ function parseGleamOutput(raw, filePath, cwd) {
6805
6870
  line: Number.parseInt(lineStr, 10) || 1,
6806
6871
  column: Number.parseInt(colStr, 10) || 1,
6807
6872
  severity,
6808
- semantic: severity === "error" ? "blocking" : "warning",
6873
+ semantic: semanticFor(severity),
6809
6874
  tool: "gleam",
6810
6875
  rule: "gleam-check",
6811
6876
  fixable: false
@@ -6883,16 +6948,21 @@ function createLineParser(config) {
6883
6948
  const fixable = typeof config.fixable === "function" ? config.fixable(match) : config.fixable ?? false;
6884
6949
  const autoFixAvailable = typeof config.autoFixAvailable === "function" ? config.autoFixAvailable(match) : config.autoFixAvailable ?? false;
6885
6950
  const fixKind = typeof config.fixKind === "function" ? config.fixKind(match) : config.fixKind;
6951
+ const rule = config.extractRule?.(match);
6952
+ const message = config.extractMessage(match);
6886
6953
  diagnostics.push({
6887
- id: config.generateId(match),
6888
- message: config.extractMessage(match),
6954
+ // #5412: a finding with no rule keys its id on its message too. The
6955
+ // line alone gave two go vet findings at one position one id, and the
6956
+ // dispatcher's `findingKey` (rule || id) kept only one of them.
6957
+ id: rule ? config.generateId(match) : `${config.generateId(match)}-${hashText(message)}`,
6958
+ message,
6889
6959
  filePath,
6890
6960
  line: lineNum,
6891
6961
  column: colNum,
6892
6962
  severity,
6893
- semantic: severity === "error" ? "blocking" : "warning",
6963
+ semantic: semanticFor(severity),
6894
6964
  tool: config.tool,
6895
- rule: config.extractRule?.(match),
6965
+ rule,
6896
6966
  defectClass: config.defectClass,
6897
6967
  fixable,
6898
6968
  autoFixAvailable,
@@ -7013,7 +7083,7 @@ function parseGolangciJson(raw, filePath, cwd) {
7013
7083
  line: issue.Pos.Line,
7014
7084
  column: issue.Pos.Column,
7015
7085
  severity,
7016
- semantic: severity === "error" ? "blocking" : "warning",
7086
+ semantic: semanticFor(severity),
7017
7087
  tool: "golangci-lint",
7018
7088
  rule: issue.FromLinter,
7019
7089
  defectClass: "correctness",
@@ -7030,13 +7100,14 @@ var golangciRunner = {
7030
7100
  appliesTo: ["go"],
7031
7101
  priority: PRIORITY.GENERAL_ANALYSIS,
7032
7102
  timeoutMs: 9e4,
7103
+ requiresConfig: (cwd) => hasGolangciConfig(cwd),
7033
7104
  async run(ctx) {
7034
7105
  const cwd = resolveRunnerCwd(ctx, "golangci-lint");
7035
7106
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
7036
7107
  if (policy && !policy.preferredRunners.includes("golangci-lint")) {
7037
7108
  return { status: "skipped", diagnostics: [], semantic: "none" };
7038
7109
  }
7039
- if (!hasGolangciConfig(cwd)) {
7110
+ if (!golangciRunner.requiresConfig?.(cwd)) {
7040
7111
  return { status: "skipped", diagnostics: [], semantic: "none" };
7041
7112
  }
7042
7113
  const cmd = await resolveAvailableOrInstall(golangci, "golangci-lint", cwd);
@@ -7050,13 +7121,11 @@ var golangciRunner = {
7050
7121
  "--show-stats=false",
7051
7122
  ctx.filePath
7052
7123
  ], { timeout: 6e4, cwd });
7053
- const raw = (result.stdout ?? "").length > 0 ? result.stdout ?? "" : result.status !== 0 ? result.stderr || "" : "";
7054
7124
  const parsed = parseToolRun("golangci-lint", {
7055
7125
  result,
7056
- output: raw,
7057
7126
  // EXIT TABLE (golangci-lint v2 docs https://golangci-lint.run/docs/welcome/quick-start/; 2.14.0 exits 1 on findings and 3 on an unknown flag): 0 clean; 1 findings; 2 error; 3 error; 4 error; 5 error; other nonzero rejected.
7058
7127
  exitCodes: { ran: [1, 2, 3, 4, 5] }
7059
- }, (raw2) => parseGolangciJson(raw2, ctx.filePath, cwd));
7128
+ }, (raw) => parseGolangciJson(raw, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
7060
7129
  if (parsed.skipped)
7061
7130
  return parsed.skipped;
7062
7131
  return finishParsedRun({
@@ -7071,7 +7140,6 @@ var golangci_lint_default = golangciRunner;
7071
7140
 
7072
7141
  // dist/clients/dispatch/runners/hadolint.js
7073
7142
  import * as path20 from "node:path";
7074
- var hadolint = createAvailabilityChecker("hadolint", ".exe");
7075
7143
  function parseHadolintOutput(raw, filePath, cwd) {
7076
7144
  try {
7077
7145
  const parsed = JSON.parse(raw);
@@ -7090,7 +7158,7 @@ function parseHadolintOutput(raw, filePath, cwd) {
7090
7158
  line: item.line,
7091
7159
  column: item.column ?? 1,
7092
7160
  severity,
7093
- semantic: severity === "error" ? "blocking" : "warning",
7161
+ semantic: semanticFor(severity),
7094
7162
  tool: "hadolint",
7095
7163
  rule: item.code,
7096
7164
  fixable: false
@@ -7112,12 +7180,7 @@ var hadolintRunner = {
7112
7180
  if (policy && !policy.preferredRunners.includes("hadolint")) {
7113
7181
  return { status: "skipped", diagnostics: [], semantic: "none" };
7114
7182
  }
7115
- let cmd = null;
7116
- if (await hadolint.isAvailableAsync(cwd)) {
7117
- cmd = hadolint.getCommand(cwd);
7118
- } else {
7119
- cmd = await resolveToolCommandWithInstallFallback(cwd, "hadolint");
7120
- }
7183
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "hadolint");
7121
7184
  if (!cmd) {
7122
7185
  return { status: "skipped", diagnostics: [], semantic: "none" };
7123
7186
  }
@@ -7195,7 +7258,7 @@ ${line.trim()}`;
7195
7258
  line: location.line,
7196
7259
  column: 1,
7197
7260
  severity,
7198
- semantic: severity === "error" ? "blocking" : "warning",
7261
+ semantic: semanticFor(severity),
7199
7262
  tool: "helm-lint",
7200
7263
  rule: level.toLowerCase(),
7201
7264
  fixable: false
@@ -7234,15 +7297,18 @@ async function lintChart(chartRoot, cwd) {
7234
7297
  if (truncatedByOutputCap(result)) {
7235
7298
  return failedResult("parser_error", "helm lint output was truncated before parsing completed");
7236
7299
  }
7300
+ const timedOut = spawnTimedOut(result) ? skipUnlessToolRan("helm-lint", { result }) : null;
7301
+ if (timedOut)
7302
+ return timedOut;
7237
7303
  const output = [result.stdout, result.stderr].filter(Boolean).join("\n");
7238
7304
  const diagnostics = parseHelmLintOutput(output, chartRoot);
7239
7305
  const typedFailure = result.spawnFailure?.kind;
7240
7306
  if (typedFailure) {
7241
- const failureKind = typedFailure === "tool-not-found" ? "unavailable" : typedFailure === "timeout" ? "timeout" : typedFailure === "killed" && result.failure === "aborted" ? "aborted" : "server_error";
7307
+ const failureKind = typedFailure === "tool-not-found" ? "unavailable" : typedFailure === "killed" && result.failure === "aborted" ? "aborted" : "server_error";
7242
7308
  return failedResult(failureKind, result.error?.message || `helm lint ${typedFailure}`);
7243
7309
  }
7244
7310
  if (result.failure) {
7245
- return failedResult(result.failure === "timeout" ? "timeout" : result.failure, result.error?.message || `helm lint ${result.failure}`);
7311
+ return failedResult(result.failure, result.error?.message || `helm lint ${result.failure}`);
7246
7312
  }
7247
7313
  const hasErrorDiagnostic = diagnostics.some((diagnostic) => diagnostic.severity === "error");
7248
7314
  if (result.status !== 0 && !hasErrorDiagnostic) {
@@ -7284,7 +7350,7 @@ var helmLintRunner = {
7284
7350
  var helm_lint_default = helmLintRunner;
7285
7351
 
7286
7352
  // dist/clients/dispatch/runners/helm-render.js
7287
- import * as fs12 from "node:fs";
7353
+ import * as fs9 from "node:fs";
7288
7354
  import * as path22 from "node:path";
7289
7355
  var helm2 = createAvailabilityChecker("helm", ".exe", ["version", "--short"]);
7290
7356
  var trivy = createAvailabilityChecker("trivy", ".exe");
@@ -7317,10 +7383,10 @@ function resolveTemplateSource(sourceRef, chartRoot, realChartRoot) {
7317
7383
  if (!isWithinIdentity(candidate, chartRoot))
7318
7384
  return null;
7319
7385
  try {
7320
- if (!fs12.lstatSync(candidate).isFile())
7386
+ if (!fs9.lstatSync(candidate).isFile())
7321
7387
  return null;
7322
- const root = realChartRoot ?? fs12.realpathSync(chartRoot);
7323
- if (!isWithinIdentity(fs12.realpathSync(candidate), root))
7388
+ const root = realChartRoot ?? fs9.realpathSync(chartRoot);
7389
+ if (!isWithinIdentity(fs9.realpathSync(candidate), root))
7324
7390
  return null;
7325
7391
  } catch {
7326
7392
  return null;
@@ -7329,7 +7395,7 @@ function resolveTemplateSource(sourceRef, chartRoot, realChartRoot) {
7329
7395
  }
7330
7396
  function canonicalChartRoot(chartRoot) {
7331
7397
  try {
7332
- return fs12.realpathSync(chartRoot);
7398
+ return fs9.realpathSync(chartRoot);
7333
7399
  } catch {
7334
7400
  return chartRoot;
7335
7401
  }
@@ -7531,6 +7597,10 @@ function failedResult2(kind, message) {
7531
7597
  failureMessage: message.slice(0, 200)
7532
7598
  };
7533
7599
  }
7600
+ function startupFailureResult(kind, render) {
7601
+ const timedOut = kind === "timeout" ? skipUnlessToolRan("helm-render", { result: render }) : null;
7602
+ return timedOut ?? failedResult2(kind, render.error?.message || `helm template ${kind}`);
7603
+ }
7534
7604
  var OUR_RENDER_FLAGS = ["--output-dir"];
7535
7605
  function rejectedOurInvocation(output) {
7536
7606
  if (!output)
@@ -7548,7 +7618,7 @@ function spawnFailureKind(result) {
7548
7618
  const typed = result.spawnFailure?.kind;
7549
7619
  if (typed === "tool-not-found")
7550
7620
  return "unavailable";
7551
- if (typed === "timeout" || result.failure === "timeout")
7621
+ if (spawnTimedOut(result))
7552
7622
  return "timeout";
7553
7623
  if (typed === "killed" || result.failure === "aborted")
7554
7624
  return "aborted";
@@ -7564,7 +7634,7 @@ function collectRenderedFiles(root) {
7564
7634
  const dir = stack.pop();
7565
7635
  let entries;
7566
7636
  try {
7567
- entries = fs12.readdirSync(dir, { withFileTypes: true });
7637
+ entries = fs9.readdirSync(dir, { withFileTypes: true });
7568
7638
  } catch {
7569
7639
  continue;
7570
7640
  }
@@ -7603,7 +7673,7 @@ function readRenderedTree(outputDir, chartRoot) {
7603
7673
  for (const renderedPath of walk2.files) {
7604
7674
  let content;
7605
7675
  try {
7606
- content = fs12.readFileSync(renderedPath, "utf-8");
7676
+ content = fs9.readFileSync(renderedPath, "utf-8");
7607
7677
  } catch {
7608
7678
  unreadable += 1;
7609
7679
  continue;
@@ -7722,7 +7792,7 @@ function logRenderPass(filePath, chartRoot, startedAt, metadata) {
7722
7792
  metadata: { chartRoot, ...metadata }
7723
7793
  });
7724
7794
  }
7725
- function discardScratchDir(outputDir, filePath, remove = (target) => fs12.rmSync(target, { recursive: true, force: true })) {
7795
+ function discardScratchDir(outputDir, filePath, remove = (target) => fs9.rmSync(target, { recursive: true, force: true })) {
7726
7796
  try {
7727
7797
  remove(outputDir);
7728
7798
  } catch (error) {
@@ -7743,7 +7813,7 @@ async function renderAndValidate(chartRoot, cwd, filePath) {
7743
7813
  const helmCmd = await resolveAvailableOrInstall(helm2, "helm", cwd);
7744
7814
  if (!helmCmd)
7745
7815
  return helmUnavailableResult(cwd);
7746
- const outputDir = fs12.mkdtempSync(path22.join(scannerReportParentDir(), "pi-lens-helm-render-"));
7816
+ const outputDir = fs9.mkdtempSync(path22.join(scannerReportParentDir(), "pi-lens-helm-render-"));
7747
7817
  try {
7748
7818
  const render = await safeSpawnAsync(helmCmd, ["template", "pi-lens-render", chartRoot, "--output-dir", outputDir], {
7749
7819
  cwd,
@@ -7769,7 +7839,7 @@ async function renderAndValidate(chartRoot, cwd, filePath) {
7769
7839
  outcome: "runner-failed",
7770
7840
  failureKind: startupFailure
7771
7841
  });
7772
- return failedResult2(startupFailure, render.error?.message || `helm template ${startupFailure}`);
7842
+ return startupFailureResult(startupFailure, render);
7773
7843
  }
7774
7844
  if (render.status !== 0) {
7775
7845
  const ourFlag = rejectedOurInvocation(renderOutput);
@@ -7876,7 +7946,6 @@ var helm_render_default = helmRenderRunner;
7876
7946
 
7877
7947
  // dist/clients/dispatch/runners/htmlhint.js
7878
7948
  import * as path23 from "node:path";
7879
- var htmlhint = createAvailabilityChecker("htmlhint");
7880
7949
  var HTMLHINT_RULES = {
7881
7950
  "tag-pair": true,
7882
7951
  "attr-no-duplication": true,
@@ -7908,7 +7977,7 @@ function parseHtmlhintOutput(raw, filePath, cwd) {
7908
7977
  line: lineNum,
7909
7978
  column: col,
7910
7979
  severity,
7911
- semantic: severity === "error" ? "blocking" : "warning",
7980
+ semantic: semanticFor(severity),
7912
7981
  tool: "htmlhint",
7913
7982
  rule,
7914
7983
  fixable: false
@@ -7927,12 +7996,7 @@ var htmlhintRunner = {
7927
7996
  if (policy && !policy.preferredRunners.includes("htmlhint")) {
7928
7997
  return { status: "skipped", diagnostics: [], semantic: "none" };
7929
7998
  }
7930
- let cmd = null;
7931
- if (await htmlhint.isAvailableAsync(cwd)) {
7932
- cmd = htmlhint.getCommand(cwd);
7933
- } else {
7934
- cmd = await resolveToolCommandWithInstallFallback(cwd, "htmlhint");
7935
- }
7999
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "htmlhint");
7936
8000
  if (!cmd) {
7937
8001
  return { status: "skipped", diagnostics: [], semantic: "none" };
7938
8002
  }
@@ -8053,7 +8117,6 @@ var javac_default = javacRunner;
8053
8117
 
8054
8118
  // dist/clients/dispatch/runners/ktlint.js
8055
8119
  import * as path25 from "node:path";
8056
- var ktlint = createAvailabilityChecker("ktlint", ".exe");
8057
8120
  var KTLINT_EXIT_CODES = { ran: [1, 2, 3] };
8058
8121
  function normalizeKtlintResults(parsed) {
8059
8122
  if (Array.isArray(parsed)) {
@@ -8129,12 +8192,7 @@ var ktlintRunner = {
8129
8192
  if (policy && !policy.preferredRunners.includes("ktlint")) {
8130
8193
  return { status: "skipped", diagnostics: [], semantic: "none" };
8131
8194
  }
8132
- let cmd = null;
8133
- if (await ktlint.isAvailableAsync(cwd)) {
8134
- cmd = ktlint.getCommand(cwd);
8135
- } else {
8136
- cmd = await resolveToolCommandWithInstallFallback(cwd, "ktlint");
8137
- }
8195
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "ktlint");
8138
8196
  if (!cmd)
8139
8197
  return { status: "skipped", diagnostics: [], semantic: "none" };
8140
8198
  const absPath = path25.resolve(cwd, ctx.filePath);
@@ -8465,7 +8523,7 @@ var lsp_default = lspRunner;
8465
8523
  import * as path27 from "node:path";
8466
8524
 
8467
8525
  // dist/clients/dispatch/runners/utils/markdownlint-api.js
8468
- import * as fs13 from "node:fs";
8526
+ import * as fs10 from "node:fs";
8469
8527
  import * as path26 from "node:path";
8470
8528
  var PACKAGE_NAME = "markdownlint-cli2";
8471
8529
  function locateCli2Entry(command) {
@@ -8480,14 +8538,14 @@ function locateCli2Entry(command) {
8480
8538
  candidates.push(path26.dirname(realpathOrResolve(shim)));
8481
8539
  for (const dir of candidates) {
8482
8540
  try {
8483
- const manifest = JSON.parse(fs13.readFileSync(path26.join(dir, "package.json"), "utf8"));
8541
+ const manifest = JSON.parse(fs10.readFileSync(path26.join(dir, "package.json"), "utf8"));
8484
8542
  if (manifest.name !== PACKAGE_NAME)
8485
8543
  continue;
8486
8544
  const root = manifest.exports && typeof manifest.exports === "object" ? manifest.exports["."] : manifest.exports;
8487
8545
  if (typeof root !== "string")
8488
8546
  continue;
8489
8547
  const entry = path26.resolve(dir, root);
8490
- if (fs13.statSync(entry).isFile())
8548
+ if (fs10.statSync(entry).isFile())
8491
8549
  return entry;
8492
8550
  } catch {
8493
8551
  }
@@ -8516,10 +8574,6 @@ function markdownlintNoFixInvocation(options) {
8516
8574
  }
8517
8575
 
8518
8576
  // dist/clients/dispatch/runners/markdownlint.js
8519
- var markdownlint = createAvailabilityChecker("markdownlint-cli2", ".cmd", [
8520
- "--no-globs",
8521
- "-"
8522
- ]);
8523
8577
  var MARKDOWNLINT_EXIT_CODES = { ran: [1] };
8524
8578
  var MARKDOWNLINT_FIXABLE_RULES = /* @__PURE__ */ new Set([
8525
8579
  "MD001",
@@ -8594,18 +8648,9 @@ var markdownlintRunner = {
8594
8648
  if (policy && !policy.preferredRunners.includes("markdownlint")) {
8595
8649
  return { status: "skipped", diagnostics: [], semantic: "none" };
8596
8650
  }
8597
- let cmd = null;
8598
- if (await markdownlint.isAvailableAsync(cwd)) {
8599
- cmd = markdownlint.getCommand(cwd);
8600
- } else {
8601
- cmd = await resolveToolCommandWithInstallFallback(cwd, "markdownlint");
8602
- }
8651
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "markdownlint");
8603
8652
  if (!cmd)
8604
8653
  return { status: "skipped", diagnostics: [], semantic: "none" };
8605
- if (isInSpawnTimeoutCooldown(cmd)) {
8606
- logRunnerAdvisoryOnce(ctx, "markdownlint", cwd, `markdownlint: ${cmd} is cooling down after a spawn timeout \u2014 skipping (one bounded failure budget per edit)`);
8607
- return { status: "skipped", diagnostics: [], semantic: "none" };
8608
- }
8609
8654
  const configArgs = markdownlintConfigArgs(cwd);
8610
8655
  const args = [...configArgs, ctx.filePath];
8611
8656
  const invocation = markdownlintNoFixInvocation({ command: cmd, cwd, args });
@@ -8613,15 +8658,6 @@ var markdownlintRunner = {
8613
8658
  timeout: 15e3,
8614
8659
  cwd
8615
8660
  });
8616
- if (result.failure === "timeout") {
8617
- noteSpawnTimeout({
8618
- tool: "markdownlint",
8619
- command: cmd,
8620
- phase: "lint",
8621
- durationMs: 15e3,
8622
- teardown: result.timeoutTeardown
8623
- });
8624
- }
8625
8661
  const raw = `${result.stdout ?? ""}${result.stderr ?? ""}`;
8626
8662
  const run = parseToolRun("markdownlint", { result, output: raw, exitCodes: MARKDOWNLINT_EXIT_CODES }, (out) => parseMarkdownlintOutput(out, ctx.filePath, cwd));
8627
8663
  if (run.skipped)
@@ -8640,7 +8676,6 @@ var markdownlint_default = markdownlintRunner;
8640
8676
 
8641
8677
  // dist/clients/dispatch/runners/mypy.js
8642
8678
  import * as path28 from "node:path";
8643
- var mypy = createAvailabilityChecker("mypy", "");
8644
8679
  var MYPY_EXIT_CODES = { ran: [1, 2] };
8645
8680
  function parseMypyOutput(raw, fallbackPath, cwd) {
8646
8681
  const diagnostics = [];
@@ -8661,7 +8696,7 @@ function parseMypyOutput(raw, fallbackPath, cwd) {
8661
8696
  line: Number(lineNum),
8662
8697
  column: col ? Number(col) : 1,
8663
8698
  severity,
8664
- semantic: severity === "error" ? "blocking" : "warning",
8699
+ semantic: semanticFor(severity),
8665
8700
  tool: "mypy",
8666
8701
  rule,
8667
8702
  defectClass: "correctness"
@@ -8674,17 +8709,13 @@ var mypyRunner = {
8674
8709
  appliesTo: ["python"],
8675
8710
  priority: PRIORITY.GENERAL_ANALYSIS,
8676
8711
  skipTestFiles: false,
8712
+ requiresConfig: (cwd) => hasMypyConfig(cwd),
8677
8713
  async run(ctx) {
8678
8714
  const cwd = resolveRunnerCwd(ctx, "mypy");
8679
- if (!hasMypyConfig(cwd)) {
8715
+ if (!mypyRunner.requiresConfig?.(cwd)) {
8680
8716
  return { status: "skipped", diagnostics: [], semantic: "none" };
8681
8717
  }
8682
- let cmd = null;
8683
- if (await mypy.isAvailableAsync(cwd)) {
8684
- cmd = mypy.getCommand(cwd);
8685
- } else {
8686
- cmd = await resolveToolCommandWithInstallFallback(cwd, "mypy");
8687
- }
8718
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "mypy");
8688
8719
  if (!cmd)
8689
8720
  return { status: "skipped", diagnostics: [], semantic: "none" };
8690
8721
  const result = await safeSpawnAsync(cmd, ["--no-error-summary", "--show-column-numbers", ctx.filePath], { timeout: 3e4, cwd });
@@ -8748,8 +8779,7 @@ var oxlintRunner = {
8748
8779
  if (cmd) {
8749
8780
  args = ["lint", "--format", "json", ctx.filePath];
8750
8781
  } else {
8751
- const oxlintCmd = resolveToolCommand(cwd, "oxlint") ?? "oxlint";
8752
- cmd = await ctx.hasTool(oxlintCmd) ? oxlintCmd : await resolveToolCommandWithInstallFallback(cwd, "oxlint");
8782
+ cmd = await resolveToolCommandWithInstallFallback(cwd, "oxlint");
8753
8783
  args = ["--format", "json", ctx.filePath];
8754
8784
  }
8755
8785
  if (!cmd) {
@@ -8823,7 +8853,7 @@ function oxlintProcessState(result) {
8823
8853
  const failureKind = result.spawnFailure?.kind;
8824
8854
  if (truncatedByOutputCap(result))
8825
8855
  return "truncated";
8826
- if (result.failure === "timeout" || failureKind === "timeout")
8856
+ if (spawnTimedOut(result))
8827
8857
  return "timeout";
8828
8858
  if (result.failure === "aborted" || failureKind === "killed")
8829
8859
  return "killed";
@@ -8956,7 +8986,7 @@ function parseOxlintJson(raw, filePath, cwd) {
8956
8986
  line: lineNum,
8957
8987
  column: colNum,
8958
8988
  severity,
8959
- semantic: severity === "error" ? "blocking" : "warning",
8989
+ semantic: semanticFor(severity),
8960
8990
  tool: "oxlint",
8961
8991
  rule,
8962
8992
  // Oxlint's help text is rule-specific guidance ("Remove the debugger
@@ -9113,13 +9143,14 @@ var phpstanRunner = {
9113
9143
  appliesTo: ["php"],
9114
9144
  priority: PRIORITY.GENERAL_ANALYSIS,
9115
9145
  skipTestFiles: false,
9146
+ requiresConfig: (cwd) => hasPhpstanConfig(cwd),
9116
9147
  async run(ctx) {
9117
9148
  const cwd = resolveRunnerCwd(ctx, "phpstan");
9118
9149
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
9119
9150
  if (policy && !policy.preferredRunners.includes("phpstan")) {
9120
9151
  return { status: "skipped", diagnostics: [], semantic: "none" };
9121
9152
  }
9122
- if (!hasPhpstanConfig(cwd)) {
9153
+ if (!phpstanRunner.requiresConfig?.(cwd)) {
9123
9154
  return { status: "skipped", diagnostics: [], semantic: "none" };
9124
9155
  }
9125
9156
  const cmd = await resolvePhpstan(cwd);
@@ -9189,12 +9220,14 @@ var prismaValidateRunner = {
9189
9220
  ${result.stderr ?? ""}`;
9190
9221
  const diagnostics = parsePrismaValidateOutput(output, ctx.filePath);
9191
9222
  const findings = PRISMA_VALIDATION_REPORT.test(output) ? diagnostics : [];
9223
+ if (findings.length === 0) {
9224
+ const skipped = skipUnlessToolRan("prisma-validate", { result, output });
9225
+ if (skipped)
9226
+ return skipped;
9227
+ }
9192
9228
  const cutShort = faultIfCutShort(result, findings);
9193
9229
  if (cutShort)
9194
9230
  return cutShort;
9195
- if (diagnostics.length === 0) {
9196
- return { status: "skipped", diagnostics: [], semantic: "none" };
9197
- }
9198
9231
  return finishParsedRun({
9199
9232
  tool: "prisma-validate",
9200
9233
  ctx,
@@ -9211,7 +9244,7 @@ ${result.stderr ?? ""}`;
9211
9244
  var prisma_validate_default = prismaValidateRunner;
9212
9245
 
9213
9246
  // dist/clients/dispatch/runners/psscriptanalyzer.js
9214
- import * as fs14 from "node:fs/promises";
9247
+ import * as fs11 from "node:fs/promises";
9215
9248
  import * as path33 from "node:path";
9216
9249
  var PS_SCRIPT = `
9217
9250
  param([string]$FilePath)
@@ -9376,7 +9409,7 @@ function parsePSAnalyzerOutput(raw, filePath) {
9376
9409
  line: item.Line,
9377
9410
  column: item.Column ?? 1,
9378
9411
  severity,
9379
- semantic: severity === "error" ? "blocking" : "warning",
9412
+ semantic: semanticFor(severity),
9380
9413
  tool: "psscriptanalyzer",
9381
9414
  rule,
9382
9415
  fixable: false
@@ -9406,7 +9439,7 @@ var psScriptAnalyzerRunner = {
9406
9439
  const cwd = resolveRunnerCwd(ctx, "psscriptanalyzer");
9407
9440
  const absPath = path33.resolve(cwd, ctx.filePath);
9408
9441
  const tmpScript = path33.join(scannerReportParentDir(), `pi-lens-psa-${process.pid}.ps1`);
9409
- await fs14.writeFile(tmpScript, PS_SCRIPT, "utf-8");
9442
+ await fs11.writeFile(tmpScript, PS_SCRIPT, "utf-8");
9410
9443
  try {
9411
9444
  const sampler = startHostStallSampler();
9412
9445
  const startedAt = Date.now();
@@ -9435,7 +9468,7 @@ var psScriptAnalyzerRunner = {
9435
9468
  hostStallMs
9436
9469
  });
9437
9470
  incrementDegradationCount({
9438
- kind: "grammar-blocked",
9471
+ kind: "powershell-run-failed",
9439
9472
  subject: "psscriptanalyzer",
9440
9473
  reason: `PowerShell (${cmd}) -File analysis exited with no status -- crash or signal-killed process`
9441
9474
  });
@@ -9461,7 +9494,7 @@ var psScriptAnalyzerRunner = {
9461
9494
  hostStallMs
9462
9495
  });
9463
9496
  incrementDegradationCount({
9464
- kind: "grammar-blocked",
9497
+ kind: "powershell-run-failed",
9465
9498
  subject: "psscriptanalyzer",
9466
9499
  reason: policyDenied ? `PowerShell execution policy blocked -File analysis for ${cmd}: ${stderrText.trim().split("\n")[0] || "SecurityError"}` : `PowerShell -File analysis for ${cmd} exited ${result.status}: ${stderrText.trim().slice(0, 200) || "no stderr"}`
9467
9500
  });
@@ -9491,7 +9524,7 @@ var psScriptAnalyzerRunner = {
9491
9524
  classifiedBy: "caller"
9492
9525
  });
9493
9526
  incrementDegradationCount({
9494
- kind: "grammar-blocked",
9527
+ kind: "powershell-run-failed",
9495
9528
  subject: "psscriptanalyzer",
9496
9529
  reason: `PowerShell -File analysis for ${cmd} exited 0 but stdout was ${unreadableReason}`
9497
9530
  });
@@ -9506,7 +9539,7 @@ var psScriptAnalyzerRunner = {
9506
9539
  semantic: hasErrors ? "blocking" : "warning"
9507
9540
  });
9508
9541
  } finally {
9509
- await fs14.unlink(tmpScript).catch(() => {
9542
+ await fs11.unlink(tmpScript).catch(() => {
9510
9543
  });
9511
9544
  }
9512
9545
  }
@@ -9536,7 +9569,7 @@ var pyrightRunner = {
9536
9569
  cmd = installedPath;
9537
9570
  }
9538
9571
  if (!cmd) {
9539
- const { findCommandAsync } = await import("./chunk-QUQY3IME.js");
9572
+ const { findCommandAsync } = await import("./chunk-KBSC5Z3G.js");
9540
9573
  const foundCmd = await findCommandAsync("pyright");
9541
9574
  if (foundCmd)
9542
9575
  cmd = foundCmd;
@@ -9614,16 +9647,24 @@ function parsePyrightOutput(data, _filePath) {
9614
9647
  const generalDiags = data.generalDiagnostics || [];
9615
9648
  for (const diag of generalDiags) {
9616
9649
  const start = diag.range?.start;
9650
+ const message = diag.message || "Type error";
9651
+ const severity = normalizePyrightSeverity(diag.severity);
9652
+ const line = (start?.line ?? 0) + 1;
9617
9653
  diagnostics.push({
9618
- id: `pyright-${diag.rule || start?.line || "unknown"}`,
9619
- message: diag.message || "Type error",
9654
+ // #5412: a rule-less finding (a syntax error, say) keys its id on its
9655
+ // line and its message, as go vet's id does (`go-vet-<line>-<hash>`).
9656
+ // A message-only id gave two identical messages on different lines one
9657
+ // id, and the delta reads `Diagnostic.id` alone, so the second line was
9658
+ // held back as already seen.
9659
+ id: diag.rule ? `pyright-${diag.rule}` : `pyright-${line}-${hashText(message)}`,
9660
+ message,
9620
9661
  filePath: diag.file || _filePath,
9621
- line: (start?.line ?? 0) + 1,
9662
+ line,
9622
9663
  column: (start?.character ?? 0) + 1,
9623
- severity: normalizePyrightSeverity(diag.severity),
9664
+ severity,
9624
9665
  // Blocking classification stays error-only — reviving the info tier
9625
- // must never widen what fails a turn.
9626
- semantic: diag.severity === "error" ? "blocking" : "warning",
9666
+ // must never widen what fails a turn (`semanticFor`).
9667
+ semantic: semanticFor(severity),
9627
9668
  tool: "pyright",
9628
9669
  rule: diag.rule
9629
9670
  });
@@ -9659,7 +9700,7 @@ function parseRubocopJson(raw, filePath, cwd) {
9659
9700
  line: offense.location.line,
9660
9701
  column: offense.location.column,
9661
9702
  severity,
9662
- semantic: severity === "error" ? "blocking" : "warning",
9703
+ semantic: semanticFor(severity),
9663
9704
  tool: "rubocop",
9664
9705
  rule: offense.cop_name,
9665
9706
  fixable: offense.correctable,
@@ -9689,13 +9730,7 @@ var rubocopRunner = {
9689
9730
  }
9690
9731
  const { cmd, args } = resolved;
9691
9732
  const result = await safeSpawnAsync(cmd, [...args, "--format", "json", "--no-color", ctx.filePath], { timeout: 3e4, cwd });
9692
- const run = parseToolRun("rubocop", {
9693
- result,
9694
- // Classify both streams so stderr-only failures reach the parse-error
9695
- // path, while parseOutput keeps RuboCop's native JSON parser on stdout.
9696
- output: `${result.stdout}${result.stderr}`,
9697
- exitCodes: { ran: [1, 2] }
9698
- }, (output) => parseRubocopJson(output, ctx.filePath, cwd), { parseOutput: result.stdout });
9733
+ const run = parseToolRun("rubocop", { result, exitCodes: { ran: [1, 2] } }, (output) => parseRubocopJson(output, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
9699
9734
  if (run.skipped)
9700
9735
  return run.skipped;
9701
9736
  return finishParsedRun({
@@ -9727,7 +9762,7 @@ function parseRuffJson(raw, filePath) {
9727
9762
  line: item.location?.row ?? 1,
9728
9763
  column: item.location?.column ?? 1,
9729
9764
  severity,
9730
- semantic: severity === "error" ? "blocking" : "warning",
9765
+ semantic: semanticFor(severity),
9731
9766
  tool: "ruff",
9732
9767
  rule: code,
9733
9768
  fixable: toolFixable,
@@ -9763,11 +9798,11 @@ var ruffRunner = {
9763
9798
  ...configArgs,
9764
9799
  ctx.filePath
9765
9800
  ], { cwd, timeout: 3e4 });
9766
- const raw = stripAnsi(checkResult.stdout + checkResult.stderr);
9767
- const run = parseToolRun("ruff", { result: checkResult, output: raw, exitCodes: { ran: [1, 2] } }, (output) => {
9801
+ const run = parseToolRun("ruff", { result: checkResult, exitCodes: { ran: [1, 2] } }, (rawOutput) => {
9802
+ const output = stripAnsi(rawOutput);
9768
9803
  const diagnostics = parseRuffJson(output, ctx.filePath);
9769
9804
  return diagnostics.length > 0 ? diagnostics : parseRuffOutput(output, ctx.filePath, cwd);
9770
- });
9805
+ }, { parseStreams: "stdout-else-stderr" });
9771
9806
  if (run.skipped)
9772
9807
  return run.skipped;
9773
9808
  return finishParsedRun({
@@ -9859,12 +9894,18 @@ var rustClippyRunner = {
9859
9894
  const diagnostics = allDiagnostics.filter((d) => pathsEqual(resolve32(cargoDir, d.filePath), absEdited));
9860
9895
  const hasBlocking = diagnostics.some((d) => d.semantic === "blocking");
9861
9896
  const semantic = hasBlocking ? "blocking" : diagnostics.length > 0 ? "warning" : "none";
9897
+ if (spawnTimedOut(result)) {
9898
+ const skipped = diagnostics.length === 0 ? skipUnlessToolRan("rust-clippy", { result }) : null;
9899
+ const cut = skipped ?? faultIfCutShort(result, diagnostics);
9900
+ if (cut)
9901
+ return cut;
9902
+ }
9862
9903
  if (result.error || result.failure) {
9863
9904
  return {
9864
9905
  status: "failed",
9865
9906
  diagnostics,
9866
9907
  semantic,
9867
- failureKind: result.failure === "timeout" || result.spawnFailure?.kind === "timeout" ? "timeout" : "server_error",
9908
+ failureKind: "server_error",
9868
9909
  rawOutput: raw.substring(0, 500)
9869
9910
  };
9870
9911
  }
@@ -9924,7 +9965,7 @@ function parseClippyOutput(raw, fallbackPath, cargoDir) {
9924
9965
  line: span.line_start || 0,
9925
9966
  column: span.column_start || 0,
9926
9967
  severity: normalizedSeverity,
9927
- semantic: normalizedSeverity === "error" ? "blocking" : "warning",
9968
+ semantic: semanticFor(normalizedSeverity),
9928
9969
  tool: "rust-clippy",
9929
9970
  rule: message.code?.code,
9930
9971
  defectClass: "correctness",
@@ -9940,7 +9981,7 @@ var rust_clippy_default = rustClippyRunner;
9940
9981
 
9941
9982
  // dist/clients/dispatch/runners/spotbugs.js
9942
9983
  import { randomUUID } from "node:crypto";
9943
- import * as fs15 from "node:fs";
9984
+ import * as fs12 from "node:fs";
9944
9985
  import * as path35 from "node:path";
9945
9986
  var java = createAvailabilityChecker("java", ".exe", ["-version"]);
9946
9987
  var spotbugs = createAvailabilityChecker("spotbugs", ".bat", ["-version"]);
@@ -9957,7 +9998,7 @@ function classesSignature(classesDir) {
9957
9998
  break;
9958
9999
  let entries;
9959
10000
  try {
9960
- entries = fs15.readdirSync(dir, { withFileTypes: true });
10001
+ entries = fs12.readdirSync(dir, { withFileTypes: true });
9961
10002
  } catch {
9962
10003
  continue;
9963
10004
  }
@@ -9968,7 +10009,7 @@ function classesSignature(classesDir) {
9968
10009
  } else if (entry.isFile() && entry.name.endsWith(".class")) {
9969
10010
  count++;
9970
10011
  try {
9971
- const m = fs15.statSync(full).mtimeMs;
10012
+ const m = fs12.statSync(full).mtimeMs;
9972
10013
  if (m > newest)
9973
10014
  newest = m;
9974
10015
  } catch {
@@ -10115,7 +10156,7 @@ var spotbugsRunner = {
10115
10156
  ], { cwd, timeout: 12e4 });
10116
10157
  let xml = "";
10117
10158
  try {
10118
- xml = fs15.readFileSync(tmpXml, "utf8");
10159
+ xml = fs12.readFileSync(tmpXml, "utf8");
10119
10160
  } catch {
10120
10161
  if (result.error || (result.status ?? 0) > 1) {
10121
10162
  return {
@@ -10128,7 +10169,7 @@ var spotbugsRunner = {
10128
10169
  return { status: "succeeded", diagnostics: [], semantic: "none" };
10129
10170
  } finally {
10130
10171
  try {
10131
- fs15.rmSync(tmpXml, { force: true });
10172
+ fs12.rmSync(tmpXml, { force: true });
10132
10173
  } catch {
10133
10174
  }
10134
10175
  }
@@ -10181,7 +10222,7 @@ function parseShellcheckOutput(raw, filePath, cwd) {
10181
10222
  line: item.line,
10182
10223
  column: item.column || 1,
10183
10224
  severity,
10184
- semantic: severity === "error" ? "blocking" : "warning",
10225
+ semantic: semanticFor(severity),
10185
10226
  tool: "shellcheck",
10186
10227
  rule: ruleCode,
10187
10228
  fixable: !!item.fix,
@@ -10249,8 +10290,7 @@ var shellcheckRunner = {
10249
10290
  if (result.status === 0 && !result.stdout?.trim()) {
10250
10291
  return { status: "succeeded", diagnostics: [], semantic: "none" };
10251
10292
  }
10252
- const raw = `${result.stdout ?? ""}${result.stderr ?? ""}`;
10253
- const parsed = parseToolRun("shellcheck", { result, output: raw, exitCodes: SHELLCHECK_EXIT_CODES }, (output) => parseShellcheckOutput(output, ctx.filePath, cwd));
10293
+ const parsed = parseToolRun("shellcheck", { result, exitCodes: SHELLCHECK_EXIT_CODES }, (output) => parseShellcheckOutput(output, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
10254
10294
  if (parsed.skipped)
10255
10295
  return parsed.skipped;
10256
10296
  return finishParsedRun({
@@ -10377,9 +10417,6 @@ var fish_indent_default = fishIndentRunner;
10377
10417
 
10378
10418
  // dist/clients/dispatch/runners/shfmt.js
10379
10419
  var shfmt = createAvailabilityChecker("shfmt", ".exe");
10380
- function hasEditorConfig(cwd) {
10381
- return findNearestContaining(cwd, [".editorconfig"]) !== void 0;
10382
- }
10383
10420
  var shfmtRunner = {
10384
10421
  id: "shfmt",
10385
10422
  appliesTo: ["shell"],
@@ -10432,7 +10469,7 @@ var shfmtRunner = {
10432
10469
  semantic: "blocking"
10433
10470
  });
10434
10471
  }
10435
- if (!hasEditorConfig(cwd)) {
10472
+ if (!hasToolConfig("editorconfig", cwd)) {
10436
10473
  return { status: "skipped", diagnostics: [], semantic: "none" };
10437
10474
  }
10438
10475
  const diffOutput = result.stdout ?? result.stderr ?? "";
@@ -10467,6 +10504,7 @@ var typos = createAvailabilityChecker("typos", ".exe");
10467
10504
  var TYPOS_EXIT_CODES = { ran: [2] };
10468
10505
  function parseTyposOutput(raw, filePath, cwd) {
10469
10506
  const diagnostics = [];
10507
+ let readRecords = 0;
10470
10508
  const absTarget = path37.resolve(cwd, filePath);
10471
10509
  if (!raw.trim()) {
10472
10510
  return diagnostics;
@@ -10475,6 +10513,8 @@ function parseTyposOutput(raw, filePath, cwd) {
10475
10513
  for (const line of lines) {
10476
10514
  try {
10477
10515
  const parsed = JSON.parse(line);
10516
+ if (parsed && typeof parsed === "object")
10517
+ readRecords += 1;
10478
10518
  if (!parsed.typo || !parsed.line_num)
10479
10519
  continue;
10480
10520
  if (parsed.path && !pathsEqual(path37.resolve(cwd, parsed.path), absTarget))
@@ -10501,7 +10541,7 @@ function parseTyposOutput(raw, filePath, cwd) {
10501
10541
  void err;
10502
10542
  }
10503
10543
  }
10504
- return diagnostics;
10544
+ return diagnostics.length > 0 || readRecords > 0 ? diagnostics : null;
10505
10545
  }
10506
10546
  var spellcheckRunner = {
10507
10547
  id: "spellcheck",
@@ -10522,13 +10562,13 @@ var spellcheckRunner = {
10522
10562
  const run = parseToolRun("spellcheck", { result, exitCodes: TYPOS_EXIT_CODES }, (out) => parseTyposOutput(out, ctx.filePath, cwd), { parseOutput: `${result.stdout ?? ""}${result.stderr ?? ""}` });
10523
10563
  if (run.skipped)
10524
10564
  return run.skipped;
10525
- const diagnostics = run.diagnostics;
10526
- if (diagnostics.length === 0) {
10527
- return { status: "succeeded", diagnostics: [], semantic: "none" };
10528
- }
10529
- return findingsResult(diagnostics, {
10530
- status: "failed",
10531
- semantic: "warning"
10565
+ return finishParsedRun({
10566
+ tool: "spellcheck",
10567
+ ctx,
10568
+ result,
10569
+ diagnostics: run.diagnostics,
10570
+ unreadable: run.unreadable,
10571
+ classify: () => ({ status: "failed", semantic: "warning" })
10532
10572
  });
10533
10573
  }
10534
10574
  };
@@ -10536,7 +10576,6 @@ var spellcheck_default = spellcheckRunner;
10536
10576
 
10537
10577
  // dist/clients/dispatch/runners/sqlfluff.js
10538
10578
  import * as path38 from "node:path";
10539
- var sqlfluff = createAvailabilityChecker("sqlfluff", ".exe");
10540
10579
  var SQLFLUFF_EXIT_CODES = { ran: [1] };
10541
10580
  var SQLFLUFF_FIXABLE_RULES = /* @__PURE__ */ new Set([
10542
10581
  // Layout — pure formatting
@@ -10634,12 +10673,7 @@ var sqlfluffRunner = {
10634
10673
  if (!hasConfig) {
10635
10674
  logRunnerAdvisoryOnce(ctx, "sqlfluff", cwd, "sqlfluff: no config detected, using ANSI dialect defaults");
10636
10675
  }
10637
- let cmd = null;
10638
- if (await sqlfluff.isAvailableAsync(cwd)) {
10639
- cmd = sqlfluff.getCommand(cwd);
10640
- } else {
10641
- cmd = await resolveToolCommandWithInstallFallback(cwd, "sqlfluff");
10642
- }
10676
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "sqlfluff");
10643
10677
  if (!cmd)
10644
10678
  return { status: "skipped", diagnostics: [], semantic: "none" };
10645
10679
  const args = ["lint", "--format", "json"];
@@ -10668,7 +10702,6 @@ var sqlfluff_default = sqlfluffRunner;
10668
10702
 
10669
10703
  // dist/clients/dispatch/runners/stylelint.js
10670
10704
  import * as path39 from "node:path";
10671
- var stylelint = createAvailabilityChecker("stylelint", ".cmd");
10672
10705
  var STYLELINT_EXIT_CODES = { ran: [1, 2] };
10673
10706
  function stylelintReport(stdout, stderr) {
10674
10707
  for (const stream of [stdout, stderr]) {
@@ -10726,7 +10759,7 @@ function parseStylelintJson(raw, filePath, cwd) {
10726
10759
  line: w.line,
10727
10760
  column: w.column,
10728
10761
  severity,
10729
- semantic: severity === "error" ? "blocking" : "warning",
10762
+ semantic: semanticFor(severity),
10730
10763
  tool: "stylelint",
10731
10764
  rule: w.rule,
10732
10765
  fixable,
@@ -10755,12 +10788,7 @@ var stylelintRunner = {
10755
10788
  if (!hasConfig) {
10756
10789
  logRunnerAdvisoryOnce(ctx, "stylelint", cwd, "stylelint: no config detected, running with default rules");
10757
10790
  }
10758
- let cmd = null;
10759
- if (await stylelint.isAvailableAsync(cwd)) {
10760
- cmd = stylelint.getCommand(cwd);
10761
- } else {
10762
- cmd = await resolveToolCommandWithInstallFallback(cwd, "stylelint");
10763
- }
10791
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "stylelint");
10764
10792
  if (!cmd)
10765
10793
  return { status: "skipped", diagnostics: [], semantic: "none" };
10766
10794
  const result = await safeSpawnAsync(cmd, ["--formatter", "json", ctx.filePath], { timeout: 2e4, cwd });
@@ -10781,7 +10809,6 @@ var stylelint_default = stylelintRunner;
10781
10809
 
10782
10810
  // dist/clients/dispatch/runners/swiftlint.js
10783
10811
  import * as path40 from "node:path";
10784
- var swiftlint = createAvailabilityChecker("swiftlint", ".exe");
10785
10812
  var SWIFTLINT_FIXABLE_RULES = /* @__PURE__ */ new Set([
10786
10813
  "closing_brace",
10787
10814
  "colon",
@@ -10847,7 +10874,7 @@ function parseSwiftLintOutput(raw, filePath, cwd) {
10847
10874
  try {
10848
10875
  const parsed = JSON.parse(raw);
10849
10876
  if (!Array.isArray(parsed))
10850
- return diagnostics;
10877
+ return null;
10851
10878
  for (const item of parsed) {
10852
10879
  if (!item.reason)
10853
10880
  continue;
@@ -10868,7 +10895,7 @@ function parseSwiftLintOutput(raw, filePath, cwd) {
10868
10895
  line: item.line ?? 1,
10869
10896
  column: item.character ?? 1,
10870
10897
  severity,
10871
- semantic: severity === "error" ? "blocking" : "warning",
10898
+ semantic: semanticFor(severity),
10872
10899
  tool: "swiftlint",
10873
10900
  rule: ruleId,
10874
10901
  defectClass: "style",
@@ -10877,7 +10904,7 @@ function parseSwiftLintOutput(raw, filePath, cwd) {
10877
10904
  });
10878
10905
  }
10879
10906
  } catch {
10880
- return diagnostics;
10907
+ return null;
10881
10908
  }
10882
10909
  return diagnostics;
10883
10910
  }
@@ -10888,30 +10915,26 @@ var swiftlintRunner = {
10888
10915
  skipTestFiles: false,
10889
10916
  async run(ctx) {
10890
10917
  const cwd = resolveRunnerCwd(ctx, "swiftlint");
10891
- let cmd = null;
10892
- if (await swiftlint.isAvailableAsync(cwd)) {
10893
- cmd = swiftlint.getCommand(cwd);
10894
- } else {
10895
- cmd = await resolveToolCommandWithInstallFallback(cwd, "swiftlint");
10896
- }
10918
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "swiftlint");
10897
10919
  if (!cmd)
10898
10920
  return { status: "skipped", diagnostics: [], semantic: "none" };
10899
10921
  const result = await safeSpawnAsync(cmd, ["--reporter", "json", path40.resolve(cwd, ctx.filePath)], { cwd, timeout: 15e3 });
10900
10922
  const run = parseToolRun("swiftlint", {
10901
10923
  result,
10902
10924
  // EXIT TABLE (SwiftLint 0.56 measured fixture): 0 clean; 1 findings; 2 error; other nonzero rejected.
10925
+ // 2 is admitted although it is an error: its output is then read by
10926
+ // the parser, and a run that printed nothing parseable is a parse
10927
+ // error (failed/parser_error), never a clean file (#5411).
10903
10928
  exitCodes: { ran: [1, 2] }
10904
10929
  }, (out) => parseSwiftLintOutput(out, ctx.filePath, cwd));
10905
10930
  if (run.skipped)
10906
10931
  return run.skipped;
10907
- const diagnostics = run.diagnostics;
10908
- if (diagnostics.length === 0) {
10909
- return { status: "succeeded", diagnostics: [], semantic: "none" };
10910
- }
10911
- const hasBlocking = diagnostics.some((d) => d.semantic === "blocking");
10912
- return findingsResult(diagnostics, {
10913
- status: hasBlocking ? "failed" : "succeeded",
10914
- semantic: hasBlocking ? "blocking" : "warning"
10932
+ return finishParsedRun({
10933
+ tool: "swiftlint",
10934
+ ctx,
10935
+ result,
10936
+ diagnostics: run.diagnostics,
10937
+ unreadable: run.unreadable
10915
10938
  });
10916
10939
  }
10917
10940
  };
@@ -10919,13 +10942,15 @@ var swiftlint_default = swiftlintRunner;
10919
10942
 
10920
10943
  // dist/clients/dispatch/runners/taplo.js
10921
10944
  import * as path41 from "node:path";
10922
- var taplo = createAvailabilityChecker("taplo", ".exe");
10923
10945
  var TAPLO_EXIT_CODES = { ran: [1] };
10924
10946
  var HEADER_PATTERN = /^\s*(error|warning):(.*)$/;
10925
10947
  var LOCATION_LEAD = "\u250C\u2500";
10926
10948
  var LOCATION_PATTERN = /^\s*┌─\s+(.+?):(\d+):(\d+)$/;
10927
10949
  function parseTaploOutput(raw, filePath, cwd) {
10928
10950
  const diagnostics = [];
10951
+ let located = 0;
10952
+ if (!raw.trim())
10953
+ return diagnostics;
10929
10954
  const absTarget = path41.resolve(cwd, filePath);
10930
10955
  const lines = stripAnsi(raw ?? "").split(/\r?\n/);
10931
10956
  for (let i = 0; i < lines.length; i++) {
@@ -10944,6 +10969,7 @@ function parseTaploOutput(raw, filePath, cwd) {
10944
10969
  const location = LOCATION_PATTERN.exec(lines[j].trimEnd());
10945
10970
  if (!location)
10946
10971
  continue;
10972
+ located += 1;
10947
10973
  if (!pathsEqual(path41.resolve(cwd, location[1].trim()), absTarget))
10948
10974
  continue;
10949
10975
  line = Number.parseInt(location[2], 10) || 1;
@@ -10960,13 +10986,13 @@ function parseTaploOutput(raw, filePath, cwd) {
10960
10986
  line,
10961
10987
  column,
10962
10988
  severity,
10963
- semantic: severity === "error" ? "blocking" : "warning",
10989
+ semantic: semanticFor(severity),
10964
10990
  tool: "taplo",
10965
10991
  rule: `taplo/${severity}`,
10966
10992
  fixable: false
10967
10993
  });
10968
10994
  }
10969
- return diagnostics;
10995
+ return located > 0 ? diagnostics : null;
10970
10996
  }
10971
10997
  var taploRunner = {
10972
10998
  id: "taplo",
@@ -10998,27 +11024,23 @@ var taploRunner = {
10998
11024
  }
10999
11025
  let cmd = localBinPath(findLocalBinUpwards("taplo", cwd)) ?? null;
11000
11026
  if (!cmd) {
11001
- if (await taplo.isAvailableAsync(cwd)) {
11002
- cmd = taplo.getCommand(cwd);
11003
- } else {
11004
- cmd = await resolveToolCommandWithInstallFallback(cwd, "taplo");
11005
- }
11027
+ cmd = await resolveToolCommandWithInstallFallback(cwd, "taplo");
11006
11028
  }
11007
11029
  if (!cmd)
11008
11030
  return { status: "skipped", diagnostics: [], semantic: "none" };
11009
11031
  const absPath = path41.resolve(cwd, ctx.filePath);
11010
11032
  const result = await safeSpawnAsync(cmd, ["check", "--colors", "never", absPath], { cwd, timeout: 15e3 });
11011
11033
  const raw = result.stderr?.trim() ? result.stderr : result.stdout ?? "";
11012
- const run = parseToolRun("taplo", { result, output: raw, exitCodes: TAPLO_EXIT_CODES }, (out) => parseTaploOutput(out, ctx.filePath, cwd), { skipWhenParsedNothing: true });
11034
+ const run = parseToolRun("taplo", { result, output: raw, exitCodes: TAPLO_EXIT_CODES }, (out) => parseTaploOutput(out, ctx.filePath, cwd));
11013
11035
  if (run.skipped)
11014
11036
  return run.skipped;
11015
- const diagnostics = run.diagnostics;
11016
- if (diagnostics.length === 0) {
11017
- return { status: "succeeded", diagnostics: [], semantic: "none" };
11018
- }
11019
- return findingsResult(diagnostics, {
11020
- status: "failed",
11021
- semantic: "blocking"
11037
+ return finishParsedRun({
11038
+ tool: "taplo",
11039
+ ctx,
11040
+ result,
11041
+ diagnostics: run.diagnostics,
11042
+ unreadable: run.unreadable,
11043
+ classify: () => ({ status: "failed", semantic: "blocking" })
11022
11044
  });
11023
11045
  }
11024
11046
  };
@@ -11073,7 +11095,7 @@ function parseTerragruntOutput(raw, filePath, absPath = path42.resolve(filePath)
11073
11095
  line,
11074
11096
  column,
11075
11097
  severity,
11076
- semantic: severity === "error" ? "blocking" : "warning",
11098
+ semantic: semanticFor(severity),
11077
11099
  tool: "terragrunt",
11078
11100
  fixable: false
11079
11101
  });
@@ -11134,13 +11156,6 @@ var terragrunt_default = terragruntRunner;
11134
11156
  // dist/clients/dispatch/runners/tflint.js
11135
11157
  import * as path43 from "node:path";
11136
11158
  var tflint = createAvailabilityChecker("tflint", ".exe");
11137
- var TFLINT_CONFIG = ".tflint.hcl";
11138
- function findTflintConfig(fileDir) {
11139
- if (process.env.TFLINT_CONFIG_FILE)
11140
- return null;
11141
- const dir = findNearestDirWithAnyBasename(fileDir, [TFLINT_CONFIG]);
11142
- return dir ? path43.join(dir, TFLINT_CONFIG) : null;
11143
- }
11144
11159
  function parseTflintOutput(raw, filePath, toolCwd) {
11145
11160
  try {
11146
11161
  const parsed = JSON.parse(raw);
@@ -11158,7 +11173,7 @@ function parseTflintOutput(raw, filePath, toolCwd) {
11158
11173
  line: issue.range.start.line,
11159
11174
  column: issue.range.start.column,
11160
11175
  severity,
11161
- semantic: severity === "error" ? "blocking" : "warning",
11176
+ semantic: semanticFor(severity),
11162
11177
  tool: "tflint",
11163
11178
  rule: issue.rule.name,
11164
11179
  fixable: false
@@ -11197,7 +11212,7 @@ var tflintRunner = {
11197
11212
  "--no-color",
11198
11213
  `--filter=${path43.basename(absPath)}`
11199
11214
  ];
11200
- const configPath = findTflintConfig(fileDir);
11215
+ const configPath = process.env.TFLINT_CONFIG_FILE ? void 0 : findToolConfig("tflint", fileDir)?.file;
11201
11216
  if (configPath)
11202
11217
  args.push(`--config=${configPath}`);
11203
11218
  const result = await safeSpawnAsync(cmd, args, {
@@ -11230,7 +11245,7 @@ var tflintRunner = {
11230
11245
  var tflint_default = tflintRunner;
11231
11246
 
11232
11247
  // dist/clients/dispatch/runners/trivy-config.js
11233
- import * as fs16 from "node:fs";
11248
+ import * as fs13 from "node:fs";
11234
11249
  import * as path44 from "node:path";
11235
11250
  var trivy2 = createAvailabilityChecker("trivy", ".exe");
11236
11251
  function looksLikeKubernetesManifest(content) {
@@ -11326,7 +11341,7 @@ var trivyConfigRunner = {
11326
11341
  if (ctx.kind === "yaml" || ctx.kind === "json") {
11327
11342
  let content = "";
11328
11343
  try {
11329
- content = fs16.readFileSync(absPath, "utf-8");
11344
+ content = fs13.readFileSync(absPath, "utf-8");
11330
11345
  } catch {
11331
11346
  return { status: "skipped", diagnostics: [], semantic: "none" };
11332
11347
  }
@@ -11395,7 +11410,6 @@ var trivy_config_default = trivyConfigRunner;
11395
11410
 
11396
11411
  // dist/clients/dispatch/runners/vale.js
11397
11412
  import * as path45 from "node:path";
11398
- var vale = createAvailabilityChecker("vale", ".exe");
11399
11413
  function findValeConfig(cwd) {
11400
11414
  return findLocalToolConfig(cwd, [".vale.ini"]);
11401
11415
  }
@@ -11406,8 +11420,8 @@ function parseValeOutput(raw, filePath, cwd) {
11406
11420
  const absTarget = path45.resolve(cwd, filePath);
11407
11421
  try {
11408
11422
  const parsed = JSON.parse(raw);
11409
- if (!parsed || typeof parsed !== "object")
11410
- return diagnostics;
11423
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
11424
+ return null;
11411
11425
  for (const [reported, alerts] of Object.entries(parsed)) {
11412
11426
  if (!Array.isArray(alerts))
11413
11427
  continue;
@@ -11430,7 +11444,7 @@ function parseValeOutput(raw, filePath, cwd) {
11430
11444
  line: alert.Line ?? 1,
11431
11445
  column: alert.Span?.[0] ?? 1,
11432
11446
  severity,
11433
- semantic: severity === "error" ? "blocking" : "warning",
11447
+ semantic: semanticFor(severity),
11434
11448
  tool: "vale",
11435
11449
  rule: alert.Check ?? "vale",
11436
11450
  fixable: false
@@ -11438,7 +11452,7 @@ function parseValeOutput(raw, filePath, cwd) {
11438
11452
  }
11439
11453
  }
11440
11454
  } catch {
11441
- return diagnostics;
11455
+ return null;
11442
11456
  }
11443
11457
  return diagnostics;
11444
11458
  }
@@ -11447,35 +11461,32 @@ var valeRunner = {
11447
11461
  appliesTo: ["markdown"],
11448
11462
  priority: PRIORITY.DOC_QUALITY,
11449
11463
  skipTestFiles: false,
11464
+ requiresConfig: (cwd) => findValeConfig(cwd) !== void 0,
11450
11465
  async run(ctx) {
11451
11466
  const cwd = resolveRunnerCwd(ctx, "vale");
11452
- if (!findValeConfig(cwd)) {
11467
+ if (!valeRunner.requiresConfig?.(cwd)) {
11453
11468
  return { status: "skipped", diagnostics: [], semantic: "none" };
11454
11469
  }
11455
- let cmd = null;
11456
- if (await vale.isAvailableAsync(cwd)) {
11457
- cmd = vale.getCommand(cwd);
11458
- } else {
11459
- cmd = await resolveToolCommandWithInstallFallback(cwd, "vale");
11460
- }
11470
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "vale");
11461
11471
  if (!cmd)
11462
11472
  return { status: "skipped", diagnostics: [], semantic: "none" };
11463
11473
  const result = await safeSpawnAsync(cmd, ["--output", "JSON", ctx.filePath], { cwd, timeout: 15e3 });
11464
11474
  const run = parseToolRun("vale", {
11465
11475
  result,
11466
11476
  // EXIT TABLE (Vale 3.9.6 docs https://vale.sh/docs/topics/metrics/): 0 clean; 1 findings; 2 error; other nonzero rejected.
11477
+ // 2 is admitted although it is an error: its output is then read by
11478
+ // the parser, so a run that printed nothing parseable is a parse
11479
+ // error, never a clean file (#5411).
11467
11480
  exitCodes: { ran: [1, 2] }
11468
11481
  }, (raw) => parseValeOutput(raw, ctx.filePath, cwd));
11469
11482
  if (run.skipped)
11470
11483
  return run.skipped;
11471
- const diagnostics = run.diagnostics;
11472
- if (diagnostics.length === 0) {
11473
- return { status: "succeeded", diagnostics: [], semantic: "none" };
11474
- }
11475
- const hasBlocking = diagnostics.some((d) => d.semantic === "blocking");
11476
- return findingsResult(diagnostics, {
11477
- status: hasBlocking ? "failed" : "succeeded",
11478
- semantic: hasBlocking ? "blocking" : "warning"
11484
+ return finishParsedRun({
11485
+ tool: "vale",
11486
+ ctx,
11487
+ result,
11488
+ diagnostics: run.diagnostics,
11489
+ unreadable: run.unreadable
11479
11490
  });
11480
11491
  }
11481
11492
  };
@@ -11485,7 +11496,7 @@ var vale_default = valeRunner;
11485
11496
  import * as path47 from "node:path";
11486
11497
 
11487
11498
  // dist/clients/cache/rule-cache.js
11488
- import * as fs17 from "node:fs";
11499
+ import * as fs14 from "node:fs";
11489
11500
  import * as path46 from "node:path";
11490
11501
  var CACHE_VERSION = "v7";
11491
11502
  function reportBundledRulesRootHealth() {
@@ -11502,8 +11513,8 @@ var RuleCache = class {
11502
11513
  this.cacheFile = path46.join(this.cacheDir, `${language}-rules-${CACHE_VERSION}.json`);
11503
11514
  }
11504
11515
  ensureCacheDir() {
11505
- if (!fs17.existsSync(this.cacheDir)) {
11506
- fs17.mkdirSync(this.cacheDir, { recursive: true });
11516
+ if (!fs14.existsSync(this.cacheDir)) {
11517
+ fs14.mkdirSync(this.cacheDir, { recursive: true });
11507
11518
  }
11508
11519
  }
11509
11520
  computeRuleHash(ruleFiles) {
@@ -11512,7 +11523,7 @@ var RuleCache = class {
11512
11523
  get(ruleFiles) {
11513
11524
  try {
11514
11525
  this.ensureCacheDir();
11515
- if (!fs17.existsSync(this.cacheFile))
11526
+ if (!fs14.existsSync(this.cacheFile))
11516
11527
  return null;
11517
11528
  const currentHash = this.computeRuleHash(ruleFiles);
11518
11529
  const cached = readJsonCache(this.cacheFile, (parsed) => {
@@ -11550,7 +11561,7 @@ var RuleCache = class {
11550
11561
  const pattern = new RegExp(`^${this.language}-rules-v\\d+\\.json$`);
11551
11562
  let dirents;
11552
11563
  try {
11553
- dirents = fs17.readdirSync(this.cacheDir);
11564
+ dirents = fs14.readdirSync(this.cacheDir);
11554
11565
  } catch {
11555
11566
  return;
11556
11567
  }
@@ -11558,15 +11569,15 @@ var RuleCache = class {
11558
11569
  if (name === currentName || !pattern.test(name))
11559
11570
  continue;
11560
11571
  try {
11561
- fs17.unlinkSync(path46.join(this.cacheDir, name));
11572
+ fs14.unlinkSync(path46.join(this.cacheDir, name));
11562
11573
  } catch {
11563
11574
  }
11564
11575
  }
11565
11576
  }
11566
11577
  clear() {
11567
11578
  try {
11568
- if (fs17.existsSync(this.cacheFile)) {
11569
- fs17.unlinkSync(this.cacheFile);
11579
+ if (fs14.existsSync(this.cacheFile)) {
11580
+ fs14.unlinkSync(this.cacheFile);
11570
11581
  }
11571
11582
  } catch {
11572
11583
  }
@@ -11968,7 +11979,7 @@ var treeSitterRunner = {
11968
11979
  const isSeverityBlocking = query.severity === "error" || query.inline_tier === "blocking" || SILENT_ERROR_QUERY_IDS.has(query.id);
11969
11980
  const endLine = line + (match.matchedText.match(/\n/g)?.length ?? 0);
11970
11981
  const outOfScope = ctx.blockingOnly && isSeverityBlocking && !spanOverlapsModifiedRanges(line, endLine, ctx.modifiedRanges);
11971
- const semantic = query.severity === "error" ? "blocking" : query.severity === "warning" ? "warning" : "none";
11982
+ const semantic = semanticFor(query.severity);
11972
11983
  const defectClass = query.defect_class ?? classifyDefect(query.id, "tree-sitter", query.message);
11973
11984
  const suggestion = query.has_fix && query.fix_action ? `${query.fix_action} this statement` : semantic === "blocking" ? defaultFixSuggestion2(defectClass, query.id) : void 0;
11974
11985
  const hasSuggestedFix = !!query.has_fix;
@@ -12115,7 +12126,6 @@ var tree_sitter_default = treeSitterRunner;
12115
12126
 
12116
12127
  // dist/clients/dispatch/runners/yamllint.js
12117
12128
  import * as path48 from "node:path";
12118
- var yamllint = createAvailabilityChecker("yamllint", ".exe");
12119
12129
  function parseYamllintParsable(raw, filePath, cwd) {
12120
12130
  const diagnostics = [];
12121
12131
  const absTarget = path48.resolve(cwd, filePath);
@@ -12135,7 +12145,7 @@ function parseYamllintParsable(raw, filePath, cwd) {
12135
12145
  line: Number(match[2]),
12136
12146
  column: Number(match[3]),
12137
12147
  severity,
12138
- semantic: severity === "error" ? "blocking" : "warning",
12148
+ semantic: semanticFor(severity),
12139
12149
  tool: "yamllint",
12140
12150
  rule: match[6]
12141
12151
  });
@@ -12157,12 +12167,7 @@ var yamllintRunner = {
12157
12167
  if (!hasConfig) {
12158
12168
  logRunnerAdvisoryOnce(ctx, "yamllint", cwd, "yamllint: no config detected, running with default rules");
12159
12169
  }
12160
- let cmd = null;
12161
- if (await yamllint.isAvailableAsync(cwd)) {
12162
- cmd = yamllint.getCommand(cwd);
12163
- } else {
12164
- cmd = await resolveToolCommandWithInstallFallback(cwd, "yamllint");
12165
- }
12170
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "yamllint");
12166
12171
  if (!cmd)
12167
12172
  return { status: "skipped", diagnostics: [], semantic: "none" };
12168
12173
  const result = await safeSpawnAsync(cmd, ["-f", "parsable", ctx.filePath], {
@@ -13214,14 +13219,14 @@ async function dispatchLintWithResult(filePath, cwd, pi, modifiedRanges, logCont
13214
13219
  sessionFacts.endDispatchFor(ctx.filePath);
13215
13220
  }
13216
13221
  }
13217
- async function getAvailableRunners(filePath) {
13222
+ async function getAvailableRunners(filePath, options = {}) {
13218
13223
  const kind = detectFileKind(filePath);
13219
13224
  if (!kind)
13220
13225
  return [];
13221
13226
  const normalizedPath = toPosix(filePath);
13222
13227
  const pathForFilter = normalizedPath.startsWith("/") ? normalizedPath : `/${normalizedPath}`;
13223
- const runners = sessionRunnerRegistry.getForKind(kind, pathForFilter);
13224
- return runners.map((r) => r.id);
13228
+ const { configCwd } = options;
13229
+ return sessionRunnerRegistry.getForKind(kind, pathForFilter).flatMap((r) => configCwd && r.requiresConfig?.(configCwd(r.id)) === false ? [] : [r.id]);
13225
13230
  }
13226
13231
 
13227
13232
  // dist/clients/mcp/host-shim.js
@@ -13400,7 +13405,7 @@ async function warmLspForFile(absPath, host) {
13400
13405
  return;
13401
13406
  let content;
13402
13407
  try {
13403
- content = fs18.readFileSync(absPath, "utf8");
13408
+ content = fs15.readFileSync(absPath, "utf8");
13404
13409
  } catch {
13405
13410
  return;
13406
13411
  }
@@ -13449,7 +13454,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
13449
13454
  void 0,
13450
13455
  observedAt,
13451
13456
  // #5258: the footer reads the same verdict the dispatch gave.
13452
- widgetUncheckedReason(result.verdict)
13457
+ recordedUnchecked(result.verdict)
13453
13458
  );
13454
13459
  if (result.diagnostics.length > 0) {
13455
13460
  getDiagnosticTracker().trackShown(result.diagnostics);
@@ -13457,7 +13462,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
13457
13462
  }
13458
13463
  if (options.registerTurnState) {
13459
13464
  try {
13460
- const lineCount = fs18.readFileSync(absPath, "utf8").split("\n").length;
13465
+ const lineCount = fs15.readFileSync(absPath, "utf8").split("\n").length;
13461
13466
  new CacheManager().addModifiedRange(absPath, { start: 1, end: lineCount }, true, cwd, options.ownerId ?? MCP_TURN_STATE_OWNER_ID, "mcp");
13462
13467
  } catch {
13463
13468
  }
@@ -13475,7 +13480,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
13475
13480
  try {
13476
13481
  if (warmIndex) {
13477
13482
  try {
13478
- const content = fs18.readFileSync(absPath, "utf8");
13483
+ const content = fs15.readFileSync(absPath, "utf8");
13479
13484
  if (!canWriteAnalysisRoot(analysisRootMode)) {
13480
13485
  emitBounded("adopted_root_writer_skipped", `${absPath}:word-index`, {
13481
13486
  filePath: absPath,
@@ -13525,6 +13530,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
13525
13530
  fileKind: latencyReport?.fileKind,
13526
13531
  durationMs,
13527
13532
  hasBlockers: result.hasBlockers,
13533
+ verdict: result.verdict,
13528
13534
  counts: {
13529
13535
  diagnostics: listedDiagnostics.length,
13530
13536
  blockers: result.blockers.length,
@@ -13558,7 +13564,7 @@ export {
13558
13564
  CacheManager,
13559
13565
  getDiagnosticTracker,
13560
13566
  normalizeRuleId,
13561
- readFileContent,
13567
+ findingClassKey,
13562
13568
  applyRulePolicy,
13563
13569
  convertLspDiagnostics,
13564
13570
  applyFindingPolicy,