@herbertgao/pi-extensions 2026.11.11 → 2026.11.13

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 (262) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +13 -11
  3. package/THIRD_PARTY_NOTICES.md +3 -3
  4. package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +10 -0
  5. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -4
  6. package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -4
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +22 -15
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +22 -8
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +0 -29
  10. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +5 -2
  11. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +60 -39
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +3 -2
  13. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +0 -40
  14. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-parse.ts +4 -1
  15. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +21 -3
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +15 -0
  17. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  18. package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
  19. package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
  20. package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
  21. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +2 -2
  22. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +1 -1
  23. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/animate.md +17 -0
  24. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique-rubric.md +496 -0
  25. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +12 -504
  26. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/motion-reviewer.md +29 -0
  27. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/hooks.md +3 -3
  28. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-comp.md +24 -0
  29. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-world.md +20 -0
  30. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +5 -34
  31. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/typeset.md +6 -0
  32. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
  33. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
  34. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +17 -18
  35. package/node_modules/@herbertgao/pi-inline-skill-commands/LICENSE +21 -0
  36. package/node_modules/@herbertgao/pi-inline-skill-commands/README.md +33 -0
  37. package/node_modules/@herbertgao/pi-inline-skill-commands/package.json +53 -0
  38. package/node_modules/@herbertgao/pi-inline-skill-commands/src/index.ts +213 -0
  39. package/node_modules/pi-antigravity/README.md +58 -9
  40. package/node_modules/pi-antigravity/docs/reader-guarantees.md +35 -0
  41. package/node_modules/pi-antigravity/package.json +15 -6
  42. package/node_modules/pi-antigravity/src/client/client.ts +63 -14
  43. package/node_modules/pi-antigravity/src/client/enterprise.ts +150 -0
  44. package/node_modules/pi-antigravity/src/client/index.ts +1 -0
  45. package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +7 -0
  46. package/node_modules/pi-antigravity/src/features/generate-image.ts +56 -2
  47. package/node_modules/pi-antigravity/src/features/read-url-content.ts +124 -0
  48. package/node_modules/pi-antigravity/src/image/image.ts +16 -2
  49. package/node_modules/pi-antigravity/src/index.ts +145 -2
  50. package/node_modules/pi-antigravity/src/models/discovery.ts +3 -4
  51. package/node_modules/pi-antigravity/src/models/grouping.ts +39 -15
  52. package/node_modules/pi-antigravity/src/models/models.ts +126 -14
  53. package/node_modules/pi-antigravity/src/stream/stream.ts +189 -30
  54. package/node_modules/pi-antigravity/src/types/types.ts +30 -1
  55. package/node_modules/pi-antigravity/src/usage/usage.ts +58 -0
  56. package/node_modules/pi-antigravity/src/utils/address.ts +180 -0
  57. package/node_modules/pi-antigravity/src/utils/credits.ts +149 -0
  58. package/node_modules/pi-antigravity/src/utils/html.ts +31 -0
  59. package/node_modules/pi-antigravity/src/utils/index.ts +2 -0
  60. package/node_modules/pi-antigravity/src/utils/security.ts +172 -13
  61. package/node_modules/pi-antigravity/src/utils/text.ts +66 -0
  62. package/node_modules/pi-antigravity/src/utils/util.ts +5 -4
  63. package/node_modules/pi-antigravity/src/web-fetch/document.ts +83 -0
  64. package/node_modules/pi-antigravity/src/web-fetch/fences.ts +24 -0
  65. package/node_modules/pi-antigravity/src/web-fetch/header.ts +97 -0
  66. package/node_modules/pi-antigravity/src/web-fetch/index.ts +3 -0
  67. package/node_modules/pi-antigravity/src/web-fetch/inspect.ts +328 -0
  68. package/node_modules/pi-antigravity/src/web-fetch/limits.ts +4 -0
  69. package/node_modules/pi-antigravity/src/web-fetch/markdown.ts +744 -0
  70. package/node_modules/pi-antigravity/src/web-fetch/mdn.ts +164 -0
  71. package/node_modules/pi-antigravity/src/web-fetch/media.ts +11 -0
  72. package/node_modules/pi-antigravity/src/web-fetch/metadata.ts +9 -0
  73. package/node_modules/pi-antigravity/src/web-fetch/representation.ts +93 -0
  74. package/node_modules/pi-antigravity/src/web-fetch/save.ts +71 -0
  75. package/node_modules/pi-antigravity/src/web-fetch/sites.ts +138 -0
  76. package/node_modules/pi-antigravity/src/web-fetch/vendor.d.ts +9 -0
  77. package/node_modules/pi-antigravity/src/web-fetch/web-fetch.ts +957 -0
  78. package/node_modules/pi-antigravity/tsconfig.json +2 -2
  79. package/node_modules/pi-commandcode-provider/CHANGELOG.md +10 -0
  80. package/node_modules/pi-commandcode-provider/README.md +2 -2
  81. package/node_modules/pi-commandcode-provider/package.json +1 -1
  82. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +15 -9
  83. package/node_modules/pi-commandcode-provider/src/oauth.ts +69 -12
  84. package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
  85. package/node_modules/pi-lens/CHANGELOG.md +172 -0
  86. package/node_modules/pi-lens/README.md +103 -217
  87. package/node_modules/pi-lens/dist/{chunk-KXDQD34C.js → chunk-27JQHK7Y.js} +1 -1
  88. package/node_modules/pi-lens/dist/{chunk-W6VLB6LL.js → chunk-2APSZHHI.js} +61 -3
  89. package/node_modules/pi-lens/dist/{chunk-5EEWCJG7.js → chunk-2H5GHZKC.js} +8 -8
  90. package/node_modules/pi-lens/dist/{chunk-TS5EIWEF.js → chunk-2H7NFZ4Q.js} +11 -11
  91. package/node_modules/pi-lens/dist/{chunk-6GWCYEP7.js → chunk-37IDWT6O.js} +64 -16
  92. package/node_modules/pi-lens/dist/{chunk-OEPWTSUG.js → chunk-3PAS2ERX.js} +8 -8
  93. package/node_modules/pi-lens/dist/{chunk-ET3DSSFZ.js → chunk-3PO4YYOX.js} +9 -17
  94. package/node_modules/pi-lens/dist/{chunk-C6V2DSZZ.js → chunk-3QXFUP6T.js} +11 -11
  95. package/node_modules/pi-lens/dist/{chunk-HWMNTQBJ.js → chunk-3TSMQZG6.js} +32 -11
  96. package/node_modules/pi-lens/dist/{chunk-QY6J2FTK.js → chunk-4DAHGU3V.js} +15 -14
  97. package/node_modules/pi-lens/dist/{chunk-PCREZ4HJ.js → chunk-4IZZEN63.js} +33 -34
  98. package/node_modules/pi-lens/dist/{chunk-OYXD2MOM.js → chunk-5HBQL7DH.js} +2 -2
  99. package/node_modules/pi-lens/dist/{chunk-B4FAFEBP.js → chunk-5JB4WENL.js} +1 -1
  100. package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +56 -0
  101. package/node_modules/pi-lens/dist/{chunk-GHATCG2A.js → chunk-6CFSDLHE.js} +22 -18
  102. package/node_modules/pi-lens/dist/{chunk-FVQKX5KI.js → chunk-6E5QLMWI.js} +24 -22
  103. package/node_modules/pi-lens/dist/{chunk-AVBEPUCD.js → chunk-6GLMMGCX.js} +2 -2
  104. package/node_modules/pi-lens/dist/{chunk-YTXFNCVN.js → chunk-74AMPWNC.js} +2 -2
  105. package/node_modules/pi-lens/dist/{chunk-K2GV34T2.js → chunk-7CLWC2UH.js} +26 -37
  106. package/node_modules/pi-lens/dist/{chunk-MOEWCPMC.js → chunk-7DPXUPRF.js} +2 -2
  107. package/node_modules/pi-lens/dist/{chunk-7BEADGAZ.js → chunk-7U36VQL6.js} +2 -2
  108. package/node_modules/pi-lens/dist/{chunk-PPYUBO6Y.js → chunk-7WKVCZI4.js} +1 -1
  109. package/node_modules/pi-lens/dist/{chunk-ILC2B7IJ.js → chunk-7ZVTFLCC.js} +10 -10
  110. package/node_modules/pi-lens/dist/{chunk-IT7MFVGP.js → chunk-ADYQRETD.js} +2 -2
  111. package/node_modules/pi-lens/dist/{chunk-NCDH2JB7.js → chunk-ARTYCUGF.js} +25 -10
  112. package/node_modules/pi-lens/dist/{chunk-Z6WTLVUL.js → chunk-AXAR5ZW2.js} +225 -104
  113. package/node_modules/pi-lens/dist/{chunk-PK3GDU4M.js → chunk-AZG5UJYY.js} +1 -1
  114. package/node_modules/pi-lens/dist/{chunk-NRVWLTOY.js → chunk-B2OXE4AH.js} +60 -21
  115. package/node_modules/pi-lens/dist/{chunk-ORYQGVC3.js → chunk-B42AIWPJ.js} +2 -2
  116. package/node_modules/pi-lens/dist/{chunk-IC4L65U7.js → chunk-BBSDJTOV.js} +12 -13
  117. package/node_modules/pi-lens/dist/{chunk-HJWF7CGW.js → chunk-BKWFDWYM.js} +16 -16
  118. package/node_modules/pi-lens/dist/{chunk-D2ZYRI7M.js → chunk-C5PLBTNR.js} +1 -1
  119. package/node_modules/pi-lens/dist/{chunk-SRXYSLMW.js → chunk-CQY2HEH7.js} +1 -1
  120. package/node_modules/pi-lens/dist/{chunk-7424ANRU.js → chunk-CXQYK4YT.js} +1 -1
  121. package/node_modules/pi-lens/dist/{chunk-HYR25MV3.js → chunk-CZJGAOKL.js} +8 -7
  122. package/node_modules/pi-lens/dist/{chunk-DIIDMDZU.js → chunk-DCA2MXVQ.js} +11 -11
  123. package/node_modules/pi-lens/dist/{chunk-K2LD6YNH.js → chunk-DFKOA74L.js} +9 -9
  124. package/node_modules/pi-lens/dist/{chunk-AYDE7RFV.js → chunk-DI4AZZNY.js} +2 -2
  125. package/node_modules/pi-lens/dist/{chunk-6EXGCXM5.js → chunk-G53LBDNU.js} +99 -5
  126. package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +27 -0
  127. package/node_modules/pi-lens/dist/{chunk-5KLRCUDT.js → chunk-H5API74E.js} +6 -6
  128. package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +27 -0
  129. package/node_modules/pi-lens/dist/{chunk-JRSS6KM4.js → chunk-HIJ4CHFF.js} +2 -2
  130. package/node_modules/pi-lens/dist/{chunk-3MHY4BQY.js → chunk-HIRBC72R.js} +4 -4
  131. package/node_modules/pi-lens/dist/{chunk-F7AMFFVK.js → chunk-HRLF35WL.js} +8 -8
  132. package/node_modules/pi-lens/dist/{chunk-HSTN27NR.js → chunk-I2FYOZNW.js} +9 -9
  133. package/node_modules/pi-lens/dist/{chunk-5FDUKJZO.js → chunk-I3NZVAMN.js} +9 -9
  134. package/node_modules/pi-lens/dist/{chunk-NZINZCHB.js → chunk-INBK3HIT.js} +3 -3
  135. package/node_modules/pi-lens/dist/{chunk-PXGVB2CY.js → chunk-J2ZB5MDS.js} +20 -18
  136. package/node_modules/pi-lens/dist/{chunk-HYDJUVOE.js → chunk-JGUDT5KD.js} +4 -4
  137. package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +88 -0
  138. package/node_modules/pi-lens/dist/{chunk-AZXTLZHE.js → chunk-K4Z7MK6T.js} +169 -165
  139. package/node_modules/pi-lens/dist/{chunk-WTSQKJAR.js → chunk-K7O6AHSJ.js} +10 -10
  140. package/node_modules/pi-lens/dist/{chunk-S6ZQFPOX.js → chunk-KNJH6WJQ.js} +6 -6
  141. package/node_modules/pi-lens/dist/{chunk-SUIZOCSY.js → chunk-KNSOA43J.js} +1 -1
  142. package/node_modules/pi-lens/dist/{chunk-3QMLB4TI.js → chunk-KXGTLAUW.js} +2 -2
  143. package/node_modules/pi-lens/dist/{chunk-OHEUOWYT.js → chunk-KZ732ZVW.js} +1 -1
  144. package/node_modules/pi-lens/dist/{chunk-G3LR6V6N.js → chunk-L6BDRYUK.js} +19 -17
  145. package/node_modules/pi-lens/dist/{chunk-OVPR3GQ6.js → chunk-LGH2HHZG.js} +24 -6
  146. package/node_modules/pi-lens/dist/{chunk-3R3Z54J7.js → chunk-LOEJFTF2.js} +1 -1
  147. package/node_modules/pi-lens/dist/{chunk-HGEE5LDW.js → chunk-LQQNFCQJ.js} +1 -1
  148. package/node_modules/pi-lens/dist/chunk-LVLPA32Q.js +810 -0
  149. package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +73 -0
  150. package/node_modules/pi-lens/dist/{chunk-Z2W5YJBW.js → chunk-MJRGPEQ5.js} +11 -11
  151. package/node_modules/pi-lens/dist/{chunk-3EIZMRXI.js → chunk-MOAVEPC4.js} +10 -10
  152. package/node_modules/pi-lens/dist/{chunk-TOOXNL6M.js → chunk-NGNBJIUO.js} +7 -7
  153. package/node_modules/pi-lens/dist/{chunk-AGEQRJ5A.js → chunk-NHA5K226.js} +1 -1
  154. package/node_modules/pi-lens/dist/{chunk-YLW26OHX.js → chunk-NNEQOC3U.js} +31 -59
  155. package/node_modules/pi-lens/dist/{chunk-ZWZD4TJ5.js → chunk-O2MHF7QM.js} +35 -36
  156. package/node_modules/pi-lens/dist/{chunk-PTJXMYRY.js → chunk-OLWGYBYT.js} +15 -16
  157. package/node_modules/pi-lens/dist/{chunk-JKAVKTMY.js → chunk-OZQQ3AIR.js} +17 -20
  158. package/node_modules/pi-lens/dist/{chunk-6JLNZ6DP.js → chunk-P5MSLVUW.js} +10 -10
  159. package/node_modules/pi-lens/dist/{chunk-OF2YGDUE.js → chunk-PFJLYRO3.js} +37 -38
  160. package/node_modules/pi-lens/dist/chunk-PKWEBMCA.js +2957 -0
  161. package/node_modules/pi-lens/dist/{chunk-JLMS7EMD.js → chunk-PPQHMSPH.js} +16 -15
  162. package/node_modules/pi-lens/dist/{chunk-6EIV3H7O.js → chunk-PQF6YGYB.js} +12 -5
  163. package/node_modules/pi-lens/dist/{chunk-VU2PRGRI.js → chunk-PQXUZYTQ.js} +4 -4
  164. package/node_modules/pi-lens/dist/{chunk-MV6ST2KT.js → chunk-Q7J3JYJ2.js} +13 -12
  165. package/node_modules/pi-lens/dist/{chunk-BMMRLJA4.js → chunk-QE5DJ7MX.js} +27 -10
  166. package/node_modules/pi-lens/dist/{chunk-IZ36G463.js → chunk-QE7BJQ6K.js} +7 -7
  167. package/node_modules/pi-lens/dist/{chunk-E5SSUV2A.js → chunk-QMWKSYWB.js} +4 -4
  168. package/node_modules/pi-lens/dist/{chunk-QJ4T73J5.js → chunk-QV3JPCMK.js} +1 -1
  169. package/node_modules/pi-lens/dist/{chunk-3PMLYGJN.js → chunk-R4L7KZ7R.js} +5 -5
  170. package/node_modules/pi-lens/dist/{chunk-7ZVEFWOE.js → chunk-RIH3UBK4.js} +10 -10
  171. package/node_modules/pi-lens/dist/{chunk-T5EGSBM2.js → chunk-RJ3APNIP.js} +3 -3
  172. package/node_modules/pi-lens/dist/{chunk-AAIVSSUU.js → chunk-S6MCMD27.js} +35 -12
  173. package/node_modules/pi-lens/dist/{chunk-SF7KSXB5.js → chunk-SCU62JLX.js} +6 -6
  174. package/node_modules/pi-lens/dist/{chunk-FDLGJFAE.js → chunk-SDYLT45T.js} +3 -3
  175. package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +27 -0
  176. package/node_modules/pi-lens/dist/{chunk-Y7XMKBFP.js → chunk-TKOFTLGB.js} +34 -26
  177. package/node_modules/pi-lens/dist/chunk-TQWRH25U.js +35 -0
  178. package/node_modules/pi-lens/dist/{chunk-DZSQXG66.js → chunk-TWEOJE3D.js} +277 -62
  179. package/node_modules/pi-lens/dist/{chunk-R67WQ5RY.js → chunk-UN72ZAJ5.js} +8 -8
  180. package/node_modules/pi-lens/dist/{chunk-AD7JDEI6.js → chunk-UNP6Y4JV.js} +16 -16
  181. package/node_modules/pi-lens/dist/{chunk-D6ANA6YU.js → chunk-VGRGW4UL.js} +63 -55
  182. package/node_modules/pi-lens/dist/{chunk-DFAY7JUN.js → chunk-VSQT6IHZ.js} +2 -2
  183. package/node_modules/pi-lens/dist/{chunk-7T64QA5D.js → chunk-VWEBZ2JV.js} +39 -38
  184. package/node_modules/pi-lens/dist/{chunk-HRQTYU2T.js → chunk-W26QZ3OM.js} +1 -1
  185. package/node_modules/pi-lens/dist/{chunk-2HWVG3IM.js → chunk-XDNWR7SG.js} +2 -2
  186. package/node_modules/pi-lens/dist/{chunk-75TVYCQW.js → chunk-XSC3BCN3.js} +5 -5
  187. package/node_modules/pi-lens/dist/{chunk-ME6MF2N2.js → chunk-YCR6ZYTE.js} +1 -1
  188. package/node_modules/pi-lens/dist/{chunk-LD7SXICE.js → chunk-ZI7YHV6I.js} +5 -5
  189. package/node_modules/pi-lens/dist/{chunk-E3PNZDPH.js → chunk-ZQSSO7LO.js} +33 -1
  190. package/node_modules/pi-lens/dist/{chunk-T6PPK3T6.js → chunk-ZULZS2I6.js} +385 -407
  191. package/node_modules/pi-lens/dist/index.js +6508 -5413
  192. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +9 -9
  193. package/node_modules/pi-lens/dist/mcp/cli.js +39 -38
  194. package/node_modules/pi-lens/dist/mcp/server.js +602 -345
  195. package/node_modules/pi-lens/dist/mcp/worker.js +57 -58
  196. package/node_modules/pi-lens/dist/probes/installer.js +19 -17
  197. package/node_modules/pi-lens/docs/architecture.md +113 -0
  198. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +2 -2
  199. package/node_modules/pi-lens/docs/ci.md +18 -4
  200. package/node_modules/pi-lens/docs/defect-shapes.md +41 -3
  201. package/node_modules/pi-lens/docs/dependencies.md +10 -10
  202. package/node_modules/pi-lens/docs/features.md +3 -3
  203. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -1
  204. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +19 -0
  205. package/node_modules/pi-lens/docs/language-coverage.md +39 -0
  206. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +10 -4
  207. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
  208. package/node_modules/pi-lens/docs/pi-lens-fixer.md +4 -0
  209. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -1
  210. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +4 -5
  211. package/node_modules/pi-lens/docs/pi-lens-subagent.md +5 -2
  212. package/node_modules/pi-lens/docs/prose-standard.md +112 -0
  213. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  214. package/node_modules/pi-lens/docs/usage.md +50 -0
  215. package/node_modules/pi-lens/package.json +1 -1
  216. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
  217. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
  218. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
  219. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
  220. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
  221. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
  222. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
  223. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
  224. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
  225. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
  226. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
  227. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
  228. package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
  229. package/node_modules/pi-web-access/CHANGELOG.md +29 -0
  230. package/node_modules/pi-web-access/README.md +35 -15
  231. package/node_modules/pi-web-access/anysearch.ts +7 -3
  232. package/node_modules/pi-web-access/autom.ts +196 -0
  233. package/node_modules/pi-web-access/cloro.ts +254 -0
  234. package/node_modules/pi-web-access/curator-page.ts +7 -1
  235. package/node_modules/pi-web-access/curator-server.ts +3 -0
  236. package/node_modules/pi-web-access/dist/index.js +12931 -12111
  237. package/node_modules/pi-web-access/dist/mcp-cli.js +1188 -416
  238. package/node_modules/pi-web-access/domain-filter-normalization.ts +30 -0
  239. package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +144 -34
  240. package/node_modules/pi-web-access/duckduckgo.ts +11 -3
  241. package/node_modules/pi-web-access/extract.ts +60 -4
  242. package/node_modules/pi-web-access/gemini-search.ts +25 -5
  243. package/node_modules/pi-web-access/index.ts +9 -1
  244. package/node_modules/pi-web-access/package.json +2 -2
  245. package/node_modules/pi-web-access/page-query.ts +12 -3
  246. package/node_modules/pi-web-access/specstream.ts +276 -0
  247. package/node_modules/pi-web-access/tool-activation.ts +21 -6
  248. package/node_modules/pi-web-access/utils.ts +4 -0
  249. package/node_modules/pi-web-access/video-extract.ts +2 -2
  250. package/node_modules/pi-web-access/web-tool-core.ts +24 -5
  251. package/node_modules/pi-web-access/youtube-extract.ts +2 -2
  252. package/package.json +13 -7
  253. package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +0 -72
  254. package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +0 -28
  255. package/node_modules/pi-lens/dist/chunk-7M64NTAK.js +0 -38
  256. package/node_modules/pi-lens/dist/chunk-BEIPWPVR.js +0 -1037
  257. package/node_modules/pi-lens/dist/chunk-D7OEGXDX.js +0 -2417
  258. package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +0 -89
  259. package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +0 -28
  260. package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +0 -56
  261. package/node_modules/pi-lens/dist/chunk-YLHJWAQS.js +0 -256
  262. package/node_modules/pi-lens/dist/chunk-YULIERZW.js +0 -27
@@ -1,18 +1,24 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
+ COLLECT_LATER_THRESHOLD_MS,
4
+ classifyObservedRunner,
3
5
  getLazyInstallAttempt,
6
+ holdFlight,
7
+ observeRunnerLatency,
8
+ runCollectLater,
9
+ runnerFlightKey,
4
10
  tryLazyInstall
5
- } from "./chunk-6EXGCXM5.js";
11
+ } from "./chunk-G53LBDNU.js";
6
12
  import {
7
13
  computeImpactCascade
8
- } from "./chunk-JRSS6KM4.js";
14
+ } from "./chunk-HIJ4CHFF.js";
9
15
  import {
10
16
  goClient
11
- } from "./chunk-MOEWCPMC.js";
17
+ } from "./chunk-7DPXUPRF.js";
12
18
  import {
13
19
  isTrivyEnabled,
14
20
  resolveSeverityFloor
15
- } from "./chunk-HYR25MV3.js";
21
+ } from "./chunk-CZJGAOKL.js";
16
22
  import {
17
23
  faultIfCutShort,
18
24
  finishParsedRun,
@@ -22,15 +28,23 @@ import {
22
28
  skipUnlessToolRan,
23
29
  spawnFailedWithNoOutput,
24
30
  spawnTimedOut
25
- } from "./chunk-FDLGJFAE.js";
31
+ } from "./chunk-SDYLT45T.js";
26
32
  import {
27
33
  rustClient
28
- } from "./chunk-2HWVG3IM.js";
34
+ } from "./chunk-XDNWR7SG.js";
29
35
  import {
36
+ biomeConfigArgs,
30
37
  coveringLaneAvailable,
31
38
  createAvailabilityChecker,
32
39
  createCwdCachedProbe,
40
+ findCompiledClassesDir,
41
+ getAutofixCapability,
42
+ getJstsLintPolicyForCwd,
43
+ getLinterPolicyForCwd,
44
+ getRubocopCommand,
33
45
  lspPrimaryCoversFile,
46
+ markdownlintConfigArgs,
47
+ optionSafeTargetArg,
34
48
  resolveAdoptedRootCommand,
35
49
  resolveAvailableOrInstall,
36
50
  resolveCommandArgsWithInstallFallback,
@@ -38,44 +52,25 @@ import {
38
52
  resolveRunnerCwd as resolveRunnerCwd2,
39
53
  resolveToolCommand,
40
54
  resolveToolCommandWithInstallFallback,
41
- resolveVendorToolCommand
42
- } from "./chunk-BEIPWPVR.js";
43
- import {
44
- biomeConfigArgs,
45
- findCompiledClassesDir,
46
- findToolConfig,
47
- getAutofixCapability,
48
- getJstsLintPolicyForCwd,
49
- getLinterPolicyForCwd,
50
- getRubocopCommand,
51
- hasEslintConfig,
52
- hasGolangciConfig,
53
- hasJavaBuildDescriptor,
54
- hasMypyConfig,
55
- hasPhpstanConfig,
56
- hasSqlfluffConfig,
57
- hasStylelintConfig,
58
- hasToolConfig,
59
- hasVitePlusConfig,
60
- hasYamllintConfig,
61
- markdownlintConfigArgs,
62
- readFileContent,
63
- ruffConfigArgs
64
- } from "./chunk-D7OEGXDX.js";
55
+ resolveVendorToolCommand,
56
+ ruffConfigArgs,
57
+ toolAbsentSkip,
58
+ toolBinaryVerdict
59
+ } from "./chunk-PKWEBMCA.js";
65
60
  import {
66
61
  importFactProvider
67
- } from "./chunk-3MHY4BQY.js";
62
+ } from "./chunk-HIRBC72R.js";
68
63
  import {
69
64
  functionFactProvider
70
- } from "./chunk-VU2PRGRI.js";
65
+ } from "./chunk-PQXUZYTQ.js";
71
66
  import {
72
67
  extractFactsFromTree
73
- } from "./chunk-OHEUOWYT.js";
68
+ } from "./chunk-KZ732ZVW.js";
74
69
  import {
75
70
  buildOrUpdateGraph,
76
71
  clearReviewGraphWorkspaceCache,
77
72
  fileContentProvider
78
- } from "./chunk-QY6J2FTK.js";
73
+ } from "./chunk-4DAHGU3V.js";
79
74
  import {
80
75
  MAX_BLOCKING_RULE_COMPLEXITY,
81
76
  PRIMARY_UNAVAILABLE_CAUSE,
@@ -112,13 +107,13 @@ import {
112
107
  tryWarmAttachedCodeActions,
113
108
  tryWarmAttachedDiagnostics,
114
109
  warmAnswerBinding
115
- } from "./chunk-DZSQXG66.js";
110
+ } from "./chunk-TWEOJE3D.js";
116
111
  import {
117
112
  ANY_POSITION,
118
113
  displayedMessage,
119
114
  hashText,
120
115
  retainRecordedFindings
121
- } from "./chunk-DFAY7JUN.js";
116
+ } from "./chunk-VSQT6IHZ.js";
122
117
  import {
123
118
  mapWithConcurrency
124
119
  } from "./chunk-XIMYZ3JA.js";
@@ -134,7 +129,7 @@ import {
134
129
  resolveSessionConfigRoot,
135
130
  resolveShellFileDialect,
136
131
  runnerIdentityPopulated
137
- } from "./chunk-Z6WTLVUL.js";
132
+ } from "./chunk-AXAR5ZW2.js";
138
133
  import {
139
134
  augmentPythonEnvironment,
140
135
  describePythonCompileWithheld,
@@ -143,25 +138,23 @@ import {
143
138
  emitBounded,
144
139
  partitionOutrankedPythonCompileVerdicts,
145
140
  recordPythonCompileVerdictDrop
146
- } from "./chunk-5EEWCJG7.js";
141
+ } from "./chunk-2H5GHZKC.js";
147
142
  import {
148
143
  scannerReportParentDir
149
- } from "./chunk-QJ4T73J5.js";
144
+ } from "./chunk-QV3JPCMK.js";
150
145
  import {
151
- loadProjectSnapshot,
152
- readJsonCache,
153
- readJsonCacheAsync
154
- } from "./chunk-YLW26OHX.js";
146
+ loadProjectSnapshot
147
+ } from "./chunk-NNEQOC3U.js";
155
148
  import {
156
149
  RUNTIME_CONFIG,
157
150
  exceedsLspSyncLimits,
158
151
  getRunnerTimeoutFloorMs,
159
152
  loadAstGrepNapi
160
- } from "./chunk-NCDH2JB7.js";
153
+ } from "./chunk-ARTYCUGF.js";
161
154
  import {
162
155
  buildModuleGraph,
163
156
  clearModuleGraphCache
164
- } from "./chunk-HYDJUVOE.js";
157
+ } from "./chunk-JGUDT5KD.js";
165
158
  import {
166
159
  BUNDLED_QUERIES_ROOT,
167
160
  classifyTreeSitterWasmError,
@@ -181,10 +174,10 @@ import {
181
174
  ruleFilesForLanguage,
182
175
  ruleSourceLanguages,
183
176
  walk
184
- } from "./chunk-6GWCYEP7.js";
177
+ } from "./chunk-37IDWT6O.js";
185
178
  import {
186
179
  resolvePackagePath
187
- } from "./chunk-E3PNZDPH.js";
180
+ } from "./chunk-ZQSSO7LO.js";
188
181
  import {
189
182
  stripAnsi
190
183
  } from "./chunk-6HWVI6MI.js";
@@ -196,14 +189,20 @@ import {
196
189
  scheduleWordIndexPersist,
197
190
  setWordIndexPublishedListener,
198
191
  updateWordIndexDocumentForEdit
199
- } from "./chunk-6JLNZ6DP.js";
192
+ } from "./chunk-P5MSLVUW.js";
200
193
  import {
201
194
  isTypeScriptFile
202
- } from "./chunk-AYDE7RFV.js";
195
+ } from "./chunk-DI4AZZNY.js";
196
+ import {
197
+ WARM_CODE_ACTION_LOOKUP_LIMIT,
198
+ contentHash
199
+ } from "./chunk-3TSMQZG6.js";
203
200
  import {
204
201
  IN_FLIGHT_REASON,
205
202
  NO_ANALYZER_REASON,
206
203
  NO_SERVER_REASON,
204
+ SKIP_REASON_PHRASE,
205
+ TOOL_UNUSABLE_SKIP_REASONS,
207
206
  checkedVerdict,
208
207
  emptyDispatchResult,
209
208
  faultResult,
@@ -216,13 +215,10 @@ import {
216
215
  reachedNoVerdict,
217
216
  recordedUnchecked,
218
217
  semanticFor,
218
+ skipped,
219
219
  spanOverlapsModifiedRanges,
220
220
  unchecked
221
- } from "./chunk-W6VLB6LL.js";
222
- import {
223
- WARM_CODE_ACTION_LOOKUP_LIMIT,
224
- contentHash
225
- } from "./chunk-HWMNTQBJ.js";
221
+ } from "./chunk-2APSZHHI.js";
226
222
  import {
227
223
  resolveRunnerPath,
228
224
  toRunnerDisplayPath
@@ -230,20 +226,28 @@ import {
230
226
  import {
231
227
  findCommandOnPath,
232
228
  isSpawnableCommand
233
- } from "./chunk-NRVWLTOY.js";
229
+ } from "./chunk-B2OXE4AH.js";
234
230
  import {
231
+ findToolConfig,
232
+ hasToolConfig,
235
233
  logRunnerAdvisoryOnce,
234
+ readFileContent,
236
235
  resolveRunnerCwd,
237
236
  resolveRunnerCwdWithReason
238
- } from "./chunk-YLHJWAQS.js";
237
+ } from "./chunk-LVLPA32Q.js";
239
238
  import {
240
239
  findLocalBinUpwards,
240
+ isLocalBinTrustRefusal,
241
241
  localBinPath
242
- } from "./chunk-OVPR3GQ6.js";
242
+ } from "./chunk-LGH2HHZG.js";
243
243
  import {
244
244
  getIsolatedNpxSpawnOptions,
245
245
  probeToolAsync
246
- } from "./chunk-3QMLB4TI.js";
246
+ } from "./chunk-KXGTLAUW.js";
247
+ import {
248
+ readJsonCache,
249
+ readJsonCacheAsync
250
+ } from "./chunk-TQWRH25U.js";
247
251
  import {
248
252
  classifyProbeFailure,
249
253
  createAvailabilityLatch,
@@ -252,12 +256,12 @@ import {
252
256
  isLatchingOutcome,
253
257
  logAvailabilityDecision,
254
258
  startHostStallSampler
255
- } from "./chunk-AVBEPUCD.js";
259
+ } from "./chunk-6GLMMGCX.js";
256
260
  import {
257
261
  getLspCapableKinds,
258
262
  getPrimaryDispatchGroup,
259
263
  resolveLanguageRootForFile
260
- } from "./chunk-75TVYCQW.js";
264
+ } from "./chunk-XSC3BCN3.js";
261
265
  import {
262
266
  getGlobalPiLensDir,
263
267
  getProjectDataDir,
@@ -268,13 +272,13 @@ import {
268
272
  realIsPidAlive,
269
273
  resolvePiLensFlag,
270
274
  safeSpawnAsync
271
- } from "./chunk-ET3DSSFZ.js";
275
+ } from "./chunk-3PO4YYOX.js";
272
276
  import {
273
277
  DOTNET_CSHARP_PROJECT_MARKERS,
274
278
  DOTNET_CSHARP_SOLUTION_MARKERS,
275
279
  detectFileKind,
276
280
  isJstsFactFile
277
- } from "./chunk-SRXYSLMW.js";
281
+ } from "./chunk-CQY2HEH7.js";
278
282
  import {
279
283
  PathKeyedMap,
280
284
  boundedKeyLabel,
@@ -287,11 +291,11 @@ import {
287
291
  resolveOnePiLensConfigDocument,
288
292
  resolvePiLensConfig,
289
293
  spawnCooldownScope
290
- } from "./chunk-6EIV3H7O.js";
294
+ } from "./chunk-PQF6YGYB.js";
291
295
  import {
292
296
  findNearestDirWithMarker,
293
297
  getPiLensGlobalConfigPath
294
- } from "./chunk-3R3Z54J7.js";
298
+ } from "./chunk-LOEJFTF2.js";
295
299
  import {
296
300
  getProjectTrustState,
297
301
  killedForOutputCap,
@@ -299,13 +303,13 @@ import {
299
303
  truncatedByOutputCap,
300
304
  withBudget,
301
305
  writeFileAtomic
302
- } from "./chunk-HRQTYU2T.js";
306
+ } from "./chunk-W26QZ3OM.js";
303
307
  import {
304
308
  createSubsystemLogger,
305
309
  incrementDegradationCount,
306
310
  logExtension,
307
311
  recordDegradationOnce
308
- } from "./chunk-AGEQRJ5A.js";
312
+ } from "./chunk-NHA5K226.js";
309
313
  import {
310
314
  createNdjsonLogger,
311
315
  getGlobalPiLensLogDir,
@@ -315,7 +319,7 @@ import {
315
319
  nonNegativeIntEnv,
316
320
  phaseFinished,
317
321
  phaseStarted
318
- } from "./chunk-K2GV34T2.js";
322
+ } from "./chunk-7CLWC2UH.js";
319
323
  import {
320
324
  FactStore,
321
325
  setFactStoreEvictionReporter
@@ -324,7 +328,6 @@ import {
324
328
  BoundedFifoMap,
325
329
  BoundedLruCache,
326
330
  direntsHaveMarkerGlobMatch,
327
- findLocalToolConfig,
328
331
  isAbsoluteFilePath,
329
332
  isUnderDir,
330
333
  isWindowsPath,
@@ -335,6 +338,7 @@ import {
335
338
  pathsEqual,
336
339
  realpathOrResolve,
337
340
  relativeInside,
341
+ resolveHostToolPath,
338
342
  toPosix,
339
343
  toProjectRelativePath
340
344
  } from "./chunk-WLD6BGON.js";
@@ -412,8 +416,8 @@ var CacheManager = class {
412
416
  }
413
417
  getTurnFileState(filePath, cwd) {
414
418
  const state = this.readTurnState(cwd);
415
- const key2 = this.toTurnStateKey(filePath, cwd);
416
- return state.files[key2];
419
+ const key = this.toTurnStateKey(filePath, cwd);
420
+ return state.files[key];
417
421
  }
418
422
  // ---- Scanner Cache ----
419
423
  /**
@@ -1197,9 +1201,9 @@ function applyInlineSuppressions(diagnostics, content) {
1197
1201
  const suppressedLine = i + 1;
1198
1202
  const nextLine = i + 2;
1199
1203
  for (const ruleId of rules2) {
1200
- for (const key2 of /* @__PURE__ */ new Set([ruleId, normalizeRuleId(ruleId)])) {
1201
- suppressed.add(`${suppressedLine}:${key2}`);
1202
- suppressed.add(`${nextLine}:${key2}`);
1204
+ for (const key of /* @__PURE__ */ new Set([ruleId, normalizeRuleId(ruleId)])) {
1205
+ suppressed.add(`${suppressedLine}:${key}`);
1206
+ suppressed.add(`${nextLine}:${key}`);
1203
1207
  }
1204
1208
  }
1205
1209
  }
@@ -1242,10 +1246,10 @@ function rulePolicyMapFromResolution(resolution, root) {
1242
1246
  return map;
1243
1247
  }
1244
1248
  const anchored = anchoredIgnorePaths(resolution.documents, root);
1245
- for (const [key2, entry] of Object.entries(map)) {
1249
+ for (const [key, entry] of Object.entries(map)) {
1246
1250
  if (!entry?.ignorePaths)
1247
1251
  continue;
1248
- const paths = anchored.get(key2);
1252
+ const paths = anchored.get(key);
1249
1253
  if (paths && paths.length > 0)
1250
1254
  entry.ignorePaths = paths;
1251
1255
  }
@@ -1261,7 +1265,7 @@ function anchoredIgnorePaths(documents, root) {
1261
1265
  continue;
1262
1266
  const prefix = document.tier === "global" ? void 0 : anchorPrefix(document, root);
1263
1267
  const baseDir = prefix ? nodePath.resolve(root, prefix) : root;
1264
- for (const [key2, rawEntry] of Object.entries(rules2)) {
1268
+ for (const [key, rawEntry] of Object.entries(rules2)) {
1265
1269
  const ignorePaths = rawEntry?.ignorePaths;
1266
1270
  if (!Array.isArray(ignorePaths))
1267
1271
  continue;
@@ -1270,9 +1274,9 @@ function anchoredIgnorePaths(documents, root) {
1270
1274
  if (typeof pattern === "string")
1271
1275
  patterns.push(pattern);
1272
1276
  }
1273
- const scopes = byKey.get(key2) ?? [];
1277
+ const scopes = byKey.get(key) ?? [];
1274
1278
  scopes.push({ baseDir, patterns });
1275
- byKey.set(key2, scopes);
1279
+ byKey.set(key, scopes);
1276
1280
  }
1277
1281
  }
1278
1282
  return byKey;
@@ -1406,7 +1410,7 @@ function rulePolicyMapFromConfig(rules2) {
1406
1410
  return trimmed.length > 0 ? [trimmed] : [];
1407
1411
  }) : [];
1408
1412
  let built;
1409
- for (const [key2, rawEntry] of Object.entries(rules2)) {
1413
+ for (const [key, rawEntry] of Object.entries(rules2)) {
1410
1414
  if (!rawEntry || typeof rawEntry !== "object" || Array.isArray(rawEntry)) {
1411
1415
  continue;
1412
1416
  }
@@ -1418,7 +1422,7 @@ function rulePolicyMapFromConfig(rules2) {
1418
1422
  continue;
1419
1423
  }
1420
1424
  built ??= {};
1421
- built[key2] = {
1425
+ built[key] = {
1422
1426
  ...disable.length > 0 ? { disable } : {},
1423
1427
  ...select.length > 0 ? { select } : {},
1424
1428
  ...hasIgnorePaths ? { ignorePaths: entry.ignorePaths } : {}
@@ -1437,7 +1441,7 @@ function convertLspDiagnostics(diags, filePath, options = {}) {
1437
1441
  4: "hint"
1438
1442
  };
1439
1443
  const severity = severityMap[d.severity] ?? "info";
1440
- const semantic = d.severity === 1 || d.severity === 2 || d.severity === 3 ? semanticFor(severity) : "none";
1444
+ const semantic = d.severity === 1 || d.severity === 2 || d.severity === 3 || d.severity === 4 ? semanticFor(severity) : "none";
1441
1445
  const code = String(d.code ?? "unknown");
1442
1446
  const source = d.source ?? tool;
1443
1447
  const hasSuggestion = options.fixSuggestionByIndex?.has(idx) ?? false;
@@ -1622,10 +1626,10 @@ function expandRenderedIdentities(rendered) {
1622
1626
  const seen = /* @__PURE__ */ new Set();
1623
1627
  for (const [tool, rule] of rendered) {
1624
1628
  for (const candidateTool of [tool, void 0]) {
1625
- const key2 = `${candidateTool ?? ""}\0${rule ?? ""}`;
1626
- if (seen.has(key2))
1629
+ const key = `${candidateTool ?? ""}\0${rule ?? ""}`;
1630
+ if (seen.has(key))
1627
1631
  continue;
1628
- seen.add(key2);
1632
+ seen.add(key);
1629
1633
  out.push({
1630
1634
  ...candidateTool !== void 0 && { tool: candidateTool },
1631
1635
  ...rule !== void 0 && { rule }
@@ -1997,76 +2001,6 @@ function getToolPlan(kind) {
1997
2001
  return TOOL_PLANS[kind];
1998
2002
  }
1999
2003
 
2000
- // dist/clients/dispatch/collect-later-tier.js
2001
- var COLLECT_LATER_THRESHOLD_MS = 5e3;
2002
- var slowRunners = /* @__PURE__ */ new Map();
2003
- function key(projectRoot, runnerId) {
2004
- return `${normalizeMapKey(projectRoot)}\0${runnerId}`;
2005
- }
2006
- function classifyObservedRunner(projectRoot, runnerId) {
2007
- return slowRunners.has(key(projectRoot, runnerId)) ? "collect-later" : "inline";
2008
- }
2009
- function observeRunnerLatency(options) {
2010
- const normalizedProjectRoot = normalizeMapKey(options.projectRoot);
2011
- const runnerKey = key(normalizedProjectRoot, options.runnerId);
2012
- if (options.timedOut === true || options.durationMs > COLLECT_LATER_THRESHOLD_MS) {
2013
- slowRunners.set(runnerKey, {
2014
- projectRoot: normalizedProjectRoot,
2015
- runnerId: options.runnerId
2016
- });
2017
- return "collect-later";
2018
- }
2019
- slowRunners.delete(runnerKey);
2020
- return "inline";
2021
- }
2022
- var flights = /* @__PURE__ */ new Map();
2023
- var DROPPED_BY_RESET = {
2024
- status: "skipped",
2025
- diagnostics: [],
2026
- semantic: "none"
2027
- };
2028
- function runCollectLater(options) {
2029
- const flightKey = key(options.projectRoot, options.runnerId);
2030
- const flight = flights.get(flightKey);
2031
- if (flight) {
2032
- const fileKey = normalizeMapKey(options.filePath);
2033
- const queued = flight.queued.get(fileKey);
2034
- if (queued) {
2035
- queued.start = options.start;
2036
- return { promise: queued.promise, coalesced: true };
2037
- }
2038
- const slot = {
2039
- start: options.start,
2040
- promise: Promise.allSettled([flight.tail]).then(() => startQueued(flightKey, flight, fileKey, slot))
2041
- };
2042
- flight.queued.set(fileKey, slot);
2043
- chain(flightKey, flight, slot.promise);
2044
- return { promise: slot.promise, coalesced: true };
2045
- }
2046
- const promise = options.start();
2047
- const started = { tail: promise, queued: /* @__PURE__ */ new Map() };
2048
- flights.set(flightKey, started);
2049
- chain(flightKey, started, promise);
2050
- return { promise, coalesced: false };
2051
- }
2052
- function startQueued(flightKey, flight, fileKey, slot) {
2053
- if (flights.get(flightKey) !== flight)
2054
- return DROPPED_BY_RESET;
2055
- flight.queued.delete(fileKey);
2056
- return slot.start();
2057
- }
2058
- function chain(flightKey, flight, run) {
2059
- flight.tail = run;
2060
- void Promise.allSettled([run]).then(() => {
2061
- if (flight.tail === run && flights.get(flightKey) === flight)
2062
- flights.delete(flightKey);
2063
- });
2064
- }
2065
- function resetObservedRunnerLatency() {
2066
- slowRunners.clear();
2067
- flights.clear();
2068
- }
2069
-
2070
2004
  // dist/clients/dispatch/pending-runner-findings.js
2071
2005
  var pending = [];
2072
2006
  function settledSnapshot(entry) {
@@ -2235,8 +2169,8 @@ function laneKey(d) {
2235
2169
  function laneCopyStandsFor(lane) {
2236
2170
  const rankByKey = /* @__PURE__ */ new Map();
2237
2171
  for (const d of lane) {
2238
- const key2 = laneKey(d);
2239
- rankByKey.set(key2, Math.max(rankByKey.get(key2) ?? 0, semanticRank(d.semantic)));
2172
+ const key = laneKey(d);
2173
+ rankByKey.set(key, Math.max(rankByKey.get(key) ?? 0, semanticRank(d.semantic)));
2240
2174
  }
2241
2175
  return (d) => (rankByKey.get(laneKey(d)) ?? -1) >= semanticRank(d.semantic);
2242
2176
  }
@@ -2482,8 +2416,8 @@ var commandCheckers = /* @__PURE__ */ new Map();
2482
2416
  async function checkToolAvailability(command) {
2483
2417
  if (!await isSpawnableCommand(command))
2484
2418
  return false;
2485
- const key2 = normalizeCacheKey(command);
2486
- let checker = commandCheckers.get(key2);
2419
+ const key = normalizeCacheKey(command);
2420
+ let checker = commandCheckers.get(key);
2487
2421
  if (!checker) {
2488
2422
  checker = createAvailabilityChecker(command, "", ["--version"], {
2489
2423
  pathOnly: true,
@@ -2492,7 +2426,7 @@ async function checkToolAvailability(command) {
2492
2426
  // durable, cached for the session.
2493
2427
  unclassifiedFailureOutcome: "missing"
2494
2428
  });
2495
- commandCheckers.set(key2, checker);
2429
+ commandCheckers.set(key, checker);
2496
2430
  }
2497
2431
  return checker.isAvailableAsync();
2498
2432
  }
@@ -2580,10 +2514,10 @@ function filterDelta(after, before, copyOf) {
2580
2514
  const ids = new Set(side.map((d) => d.id));
2581
2515
  const lanesByKey = /* @__PURE__ */ new Map();
2582
2516
  for (const d of side) {
2583
- const key2 = copyOf.key(d);
2584
- const lanes = lanesByKey.get(key2) ?? /* @__PURE__ */ new Set();
2517
+ const key = copyOf.key(d);
2518
+ const lanes = lanesByKey.get(key) ?? /* @__PURE__ */ new Set();
2585
2519
  lanes.add(copyOf.lane(d));
2586
- lanesByKey.set(key2, lanes);
2520
+ lanesByKey.set(key, lanes);
2587
2521
  }
2588
2522
  return (d) => {
2589
2523
  if (ids.has(d.id))
@@ -2615,16 +2549,16 @@ function dedupeOverlappingDiagnostics(diagnostics) {
2615
2549
  const byKey = /* @__PURE__ */ new Map();
2616
2550
  for (const d of diagnostics) {
2617
2551
  const defectClass = d.defectClass ?? classifyDiagnostic(d);
2618
- const key2 = findingKey(d, defectClass);
2619
- const current = byKey.get(key2);
2552
+ const key = findingKey(d, defectClass);
2553
+ const current = byKey.get(key);
2620
2554
  if (!current) {
2621
- byKey.set(key2, { ...d, defectClass });
2555
+ byKey.set(key, { ...d, defectClass });
2622
2556
  continue;
2623
2557
  }
2624
2558
  const currScore = semanticRank(current.semantic) * 100 + toolPriority(current.tool, defectClass);
2625
2559
  const nextScore = semanticRank(d.semantic) * 100 + toolPriority(d.tool, defectClass);
2626
2560
  if (nextScore > currScore) {
2627
- byKey.set(key2, { ...d, defectClass });
2561
+ byKey.set(key, { ...d, defectClass });
2628
2562
  }
2629
2563
  }
2630
2564
  return [...byKey.values()];
@@ -2638,15 +2572,15 @@ function mergeFindingClasses(visible, held) {
2638
2572
  const slotByKey = /* @__PURE__ */ new Map();
2639
2573
  const merged = [];
2640
2574
  for (const d of visible) {
2641
- const key2 = findingClassKey(d);
2642
- if (key2 === void 0 || heldKeys.has(key2)) {
2575
+ const key = findingClassKey(d);
2576
+ if (key === void 0 || heldKeys.has(key)) {
2643
2577
  merged.push(d);
2644
2578
  continue;
2645
2579
  }
2646
2580
  const raised = withClassSeverity(d);
2647
- const slot = slotByKey.get(key2);
2581
+ const slot = slotByKey.get(key);
2648
2582
  if (slot === void 0) {
2649
- slotByKey.set(key2, merged.push(raised) - 1);
2583
+ slotByKey.set(key, merged.push(raised) - 1);
2650
2584
  } else if (score(raised) > score(merged[slot])) {
2651
2585
  merged[slot] = raised;
2652
2586
  }
@@ -2678,8 +2612,8 @@ function suppressLintOverlapsWithLsp(diagnostics) {
2678
2612
  return true;
2679
2613
  const line = d.line ?? 1;
2680
2614
  const defectClass = d.defectClass ?? classifyDiagnostic(d);
2681
- const key2 = `${d.filePath}:${line}:${defectClass}`;
2682
- if (lspBySpanClass.has(key2))
2615
+ const key = `${d.filePath}:${line}:${defectClass}`;
2616
+ if (lspBySpanClass.has(key))
2683
2617
  return false;
2684
2618
  if (defectClass === "unknown") {
2685
2619
  return !lspByLine.has(`${d.filePath}:${line}`);
@@ -2821,7 +2755,14 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2821
2755
  const deniedRunnerIds = relevant.filter((r) => r.skipReason === DISABLED_BY_CONFIG_SKIP_REASON).map((r) => r.runnerId);
2822
2756
  const deniedNote = `${deniedRunnerIds.join(", ")} disabled in config by dispatch.disabledRunners`;
2823
2757
  const onlySwitchedOff = relevant.every((r) => r.skipReason === DISABLED_BY_CONFIG_SKIP_REASON || isNotApplicableSkipReason(r.skipReason) || r.primaryUnavailableCause === "disabled" || r.primaryUnavailableCause === "disabledFallback");
2824
- const unavailableReason = cause ? `no primary language server answered (${PRIMARY_UNAVAILABLE_CAUSE[cause]})${deniedRunnerIds.length > 0 ? `; ${deniedNote}` : ""}` : deniedRunnerIds.length > 0 ? onlySwitchedOff ? `not checked (${deniedNote})` : `not fully checked (a language tool is missing, timed out, or failed to run; ${deniedNote})` : "not fully checked (a language tool is missing, timed out, or failed to run)";
2758
+ const statedRows = relevant.filter((r) => r.status === "skipped" && r.skipReason !== void 0);
2759
+ const causesOf = (rows) => [
2760
+ ...new Set(rows.map((r) => `${r.runnerId}: ${SKIP_REASON_PHRASE[r.skipReason]}`))
2761
+ ];
2762
+ const statedCauses = causesOf(statedRows);
2763
+ const everyRowStated = statedRows.length === relevant.length;
2764
+ const unexplainedCauses = causesOf(statedRows.filter((r) => !isNotApplicableSkipReason(r.skipReason)));
2765
+ const unavailableReason = cause ? `no primary language server answered (${PRIMARY_UNAVAILABLE_CAUSE[cause]})${deniedRunnerIds.length > 0 ? `; ${deniedNote}` : ""}` : deniedRunnerIds.length > 0 ? onlySwitchedOff ? `not checked (${deniedNote})` : `not fully checked (a language tool is missing, timed out, or failed to run; ${deniedNote})` : everyRowStated ? `not checked (${statedCauses.join("; ")})` : `not fully checked (a language tool is missing, timed out, or failed to run${unexplainedCauses.length > 0 ? `; ${unexplainedCauses.join("; ")}` : ""})`;
2825
2766
  const verdict = unchecked(unavailableReason);
2826
2767
  if (ctx.analysisRootMode === "adopted") {
2827
2768
  return { verdict: unchecked(`not analyzed (${unavailableReason})`) };
@@ -2835,10 +2776,10 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2835
2776
  ...deniedRunnerIds.map((id) => `disabled-runner:${id}`)
2836
2777
  ];
2837
2778
  if (dedupe) {
2838
- if (onceKeys.every((key2) => coverageNoticeSeen.has(key2)))
2779
+ if (onceKeys.every((key) => coverageNoticeSeen.has(key)))
2839
2780
  return { verdict };
2840
- for (const key2 of onceKeys)
2841
- coverageNoticeSeen.add(key2);
2781
+ for (const key of onceKeys)
2782
+ coverageNoticeSeen.add(key);
2842
2783
  }
2843
2784
  return {
2844
2785
  notice: {
@@ -2861,7 +2802,7 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2861
2802
  return {
2862
2803
  notice: {
2863
2804
  id: `coverage-unavailable:${ctx.kind}:${path4.basename(ctx.filePath)}`,
2864
- message: `Pi-lens ${ctx.kind} analysis unavailable \u2014 a language tool is missing, timed out, or failed to run, or the LSP server isn't ready yet, so this file was not fully checked (not a clean result).${deniedRunnerIds.length > 0 ? ` Runner (${deniedRunnerIds.join(", ")}) is also disabled in config by dispatch.disabledRunners.` : ""}`,
2805
+ message: everyRowStated && deniedRunnerIds.length === 0 ? `Pi-lens ${ctx.kind} analysis unavailable \u2014 ${statedCauses.join("; ")}, so this file was not checked (not a clean result).` : `Pi-lens ${ctx.kind} analysis unavailable \u2014 a language tool is missing, timed out, or failed to run, or the LSP server isn't ready yet, so this file was not fully checked (not a clean result).${unexplainedCauses.length > 0 ? ` Stated: ${unexplainedCauses.join("; ")}.` : ""}${deniedRunnerIds.length > 0 ? ` Runner (${deniedRunnerIds.join(", ")}) is also disabled in config by dispatch.disabledRunners.` : ""}`,
2865
2806
  filePath: ctx.filePath,
2866
2807
  severity: "warning",
2867
2808
  semantic: "warning",
@@ -3034,12 +2975,14 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3034
2975
  }
3035
2976
  const projectRoot = ctx.projectRoot ?? ctx.cwd;
3036
2977
  const runnerCtx = runnerDispatchContext(ctx, runner.id);
3037
- const observedTier = ctx.writeIndex === void 0 ? "inline" : classifyObservedRunner(projectRoot, runner.id);
2978
+ const observedTier = ctx.writeIndex === void 0 ? "inline" : classifyObservedRunner(projectRoot, runner.id, ctx);
3038
2979
  if (observedTier === "collect-later") {
3039
2980
  const markedAtMs = Date.now();
3040
2981
  const run = async () => {
3041
2982
  const startedAtMs = Date.now();
3042
- const result2 = await runRunner(runnerCtx, runner, semantic);
2983
+ const result2 = await runRunner(runnerCtx, runner, semantic, {
2984
+ holdFlightUntilSettled: true
2985
+ });
3043
2986
  const durationMs = Date.now() - startedAtMs;
3044
2987
  observeRunnerTier({
3045
2988
  filePath: ctx.filePath,
@@ -3111,7 +3054,9 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3111
3054
  });
3112
3055
  continue;
3113
3056
  }
3114
- const result = await runRunner(runnerCtx, runner, semantic);
3057
+ const result = await runRunner(runnerCtx, runner, semantic, {
3058
+ dispatch: ctx
3059
+ });
3115
3060
  onRunnerResult?.(runnerId, result);
3116
3061
  const runnerEnd = Date.now();
3117
3062
  const duration = runnerEnd - runnerStart;
@@ -3127,6 +3072,12 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3127
3072
  }
3128
3073
  const skipReason = result.status === "skipped" && isRunnerSkipReason(result.skipReason) ? result.skipReason : void 0;
3129
3074
  const claimSource = result.status === "skipped" && isRunnerClaimSource(result.claimSource) ? result.claimSource : void 0;
3075
+ if (skipReason !== void 0 && TOOL_UNUSABLE_SKIP_REASONS.some((reason) => reason === skipReason))
3076
+ recordDegradationOnce({
3077
+ kind: "runner-skip-cause",
3078
+ subject: `${runnerId}:${skipReason}`,
3079
+ reason: `${runnerId} did not run: ${SKIP_REASON_PHRASE[skipReason]}`
3080
+ });
3130
3081
  latencies.push({
3131
3082
  runnerId,
3132
3083
  startTime: runnerStart,
@@ -3397,14 +3348,14 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3397
3348
  provider: ctx.telemetryProvider
3398
3349
  };
3399
3350
  if (fixedItems.length > 0) {
3400
- import("./chunk-SF7KSXB5.js").then(({ appendToWorklog }) => {
3351
+ import("./chunk-SCU62JLX.js").then(({ appendToWorklog }) => {
3401
3352
  appendToWorklog(ctx.cwd, fixedItems, true, worklogIdentity);
3402
3353
  }).catch(() => {
3403
3354
  });
3404
3355
  }
3405
3356
  const fixableWarnings = warnings.filter((d) => d.fixable);
3406
3357
  if (fixableWarnings.length > 0) {
3407
- import("./chunk-SF7KSXB5.js").then(({ appendToWorklog }) => {
3358
+ import("./chunk-SCU62JLX.js").then(({ appendToWorklog }) => {
3408
3359
  appendToWorklog(ctx.cwd, fixableWarnings, false, worklogIdentity);
3409
3360
  }).catch(() => {
3410
3361
  });
@@ -3587,7 +3538,7 @@ function observeRunnerTier(options) {
3587
3538
  });
3588
3539
  }
3589
3540
  }
3590
- async function runRunner(ctx, runner, defaultSemantic) {
3541
+ async function runRunner(ctx, runner, defaultSemantic, options = {}) {
3591
3542
  if (isInSpawnTimeoutCooldown(runner.id)) {
3592
3543
  recordDegradationOnce({
3593
3544
  kind: "runner-spawn-timeout-cooldown",
@@ -3599,8 +3550,14 @@ async function runRunner(ctx, runner, defaultSemantic) {
3599
3550
  const timeoutMs = Math.max(runner.timeoutMs ?? RUNNER_TIMEOUT_MS, getRunnerTimeoutFloorMs());
3600
3551
  const phaseToken = phaseStarted(runner.id);
3601
3552
  try {
3602
- const outcome = await withBudget(spawnCooldownScope.run({ tool: runner.id, subject: runner.id, phase: "lint" }, () => runner.run(ctx)).then((value) => ({ value })), timeoutMs);
3553
+ const runnerPromise = spawnCooldownScope.run({ tool: runner.id, subject: runner.id, phase: "lint" }, () => runner.run(ctx)).then((value) => ({ value }));
3554
+ if (ctx.writeIndex !== void 0 && !options.holdFlightUntilSettled) {
3555
+ holdFlight(runnerFlightKey(ctx.projectRoot ?? ctx.cwd, runner.id), runnerPromise, options.dispatch);
3556
+ }
3557
+ const outcome = await withBudget(runnerPromise, timeoutMs);
3603
3558
  if (outcome === void 0) {
3559
+ if (options.holdFlightUntilSettled)
3560
+ await Promise.allSettled([runnerPromise]);
3604
3561
  throw new Error(`Runner ${runner.id} timed out after ${timeoutMs}ms`);
3605
3562
  }
3606
3563
  const result = outcome.value;
@@ -4019,8 +3976,8 @@ function cascadeStillPresentSince(filePath, diagnostic, turn) {
4019
3976
  return first !== void 0 && first.turn < turn ? first.turn : void 0;
4020
3977
  }
4021
3978
  function recordDeliveredCascadeNeighbor(filePath, diagnostics, turn, checkedAt) {
4022
- const key2 = normalizeMapKey(filePath);
4023
- const previous = pendingNeighbors.get(key2);
3979
+ const key = normalizeMapKey(filePath);
3980
+ const previous = pendingNeighbors.get(key);
4024
3981
  const errors = /* @__PURE__ */ new Map();
4025
3982
  for (const d of diagnostics) {
4026
3983
  const k = cascadeErrorKey(d);
@@ -4036,10 +3993,10 @@ function recordDeliveredCascadeNeighbor(filePath, diagnostics, turn, checkedAt)
4036
3993
  }
4037
3994
  });
4038
3995
  }
4039
- pendingNeighbors.delete(key2);
3996
+ pendingNeighbors.delete(key);
4040
3997
  if (errors.size === 0)
4041
3998
  return;
4042
- if (pendingNeighbors.set(key2, { filePath, errors, checkedAt }).length > 0) {
3999
+ if (pendingNeighbors.set(key, { filePath, errors, checkedAt }).length > 0) {
4043
4000
  recordDegradationOnce({
4044
4001
  kind: "cascade-pending-neighbors-evicted",
4045
4002
  subject: `cap=${MAX_PENDING_NEIGHBORS}`,
@@ -4048,13 +4005,13 @@ function recordDeliveredCascadeNeighbor(filePath, diagnostics, turn, checkedAt)
4048
4005
  }
4049
4006
  }
4050
4007
  function forgetCascadePendingNeighbor(filePath, observedAt) {
4051
- const key2 = normalizeMapKey(filePath);
4052
- const entry = pendingNeighbors.get(key2);
4008
+ const key = normalizeMapKey(filePath);
4009
+ const entry = pendingNeighbors.get(key);
4053
4010
  if (!entry)
4054
4011
  return;
4055
4012
  if (observedAt !== void 0 && observedAt <= entry.checkedAt)
4056
4013
  return;
4057
- pendingNeighbors.delete(key2);
4014
+ pendingNeighbors.delete(key);
4058
4015
  }
4059
4016
  function listCascadePendingNeighbors() {
4060
4017
  return [...pendingNeighbors.values()].map((entry) => ({
@@ -4101,13 +4058,13 @@ function createDiagnosticTracker() {
4101
4058
  let totalShown = 0;
4102
4059
  let totalAutoFixed = 0;
4103
4060
  let totalAgentFixed = 0;
4104
- const key2 = (filePath, ruleId, line) => `${filePath}:${ruleId}:${line}`;
4061
+ const key = (filePath, ruleId, line) => `${filePath}:${ruleId}:${line}`;
4105
4062
  return {
4106
4063
  trackShown(diagnostics) {
4107
4064
  for (const d of diagnostics) {
4108
4065
  const ruleId = d.rule || d.id || "unknown";
4109
4066
  const line = d.line || 1;
4110
- const k = key2(d.filePath, ruleId, line);
4067
+ const k = key(d.filePath, ruleId, line);
4111
4068
  occurrenceCounts.set(k, (occurrenceCounts.get(k) ?? 0) + 1);
4112
4069
  if (!shown.has(k)) {
4113
4070
  shown.set(k, {
@@ -4187,10 +4144,10 @@ var _evictedSinceLastSweep = 0;
4187
4144
  var MAX_LOGGED_PATHS = 20;
4188
4145
  function pruneExpiredOutstandingTouches(now, guard, reads = /* @__PURE__ */ new Map()) {
4189
4146
  const expired = [];
4190
- for (const [key2, touch] of _outstandingTouches) {
4147
+ for (const [key, touch] of _outstandingTouches) {
4191
4148
  if (now - touch.touchedAt <= OUTSTANDING_TOUCH_MAX_AGE_MS)
4192
4149
  break;
4193
- _outstandingTouches.delete(key2);
4150
+ _outstandingTouches.delete(key);
4194
4151
  _expiredSinceLastSweep++;
4195
4152
  expired.push(touch);
4196
4153
  }
@@ -4297,11 +4254,11 @@ function peekOutstandingCascadeTouches(guard) {
4297
4254
  return;
4298
4255
  let found = 0;
4299
4256
  let clean = 0;
4300
- for (const [key2, touch] of _outstandingTouches) {
4257
+ for (const [key, touch] of _outstandingTouches) {
4301
4258
  const outcome = readTouchedClient(touch, now, reads);
4302
4259
  if (!outcome)
4303
4260
  continue;
4304
- _outstandingTouches.delete(key2);
4261
+ _outstandingTouches.delete(key);
4305
4262
  if (outcome.outcome === "resolved-found")
4306
4263
  found++;
4307
4264
  else
@@ -4370,7 +4327,7 @@ function requirementOf(node, utils, resolving) {
4370
4327
  const of = (child) => requirementOf(child, utils, resolving);
4371
4328
  const parts = [
4372
4329
  ...ownLiterals(node),
4373
- ...RELATIONAL_KEYS.map((key2) => of(node[key2])),
4330
+ ...RELATIONAL_KEYS.map((key) => of(node[key])),
4374
4331
  ...Array.isArray(node.all) ? node.all.map(of) : [],
4375
4332
  Array.isArray(node.any) ? anyOf(node.any.map(of)) : true
4376
4333
  ];
@@ -4533,8 +4490,8 @@ function deliveryRouteForRuleLanguage(ruleLanguage) {
4533
4490
  return "napi";
4534
4491
  return LSP_ONLY_RULE_LANGUAGES.has(ruleLanguage) ? "ast-grep-lsp-cli" : "unclassified";
4535
4492
  }
4536
- function skipRouteFor(key2) {
4537
- return key2.startsWith("mismatch:") ? "napi" : deliveryRouteForRuleLanguage(key2);
4493
+ function skipRouteFor(key) {
4494
+ return key.startsWith("mismatch:") ? "napi" : deliveryRouteForRuleLanguage(key);
4538
4495
  }
4539
4496
  var MAX_MATCHES_PER_RULE = 10;
4540
4497
  var MAX_TOTAL_DIAGNOSTICS = 50;
@@ -4800,7 +4757,7 @@ function evaluateAstGrepRules(filePath, rootNode, cwd, kind, options = {}) {
4800
4757
  const log = options.log;
4801
4758
  const unsupportedLanguageLog = options.unsupportedLanguageLog ?? defaultUnsupportedLanguageLog;
4802
4759
  const diagnostics = [];
4803
- const suppressLinterOverlap = kind === "jsts" && hasEslintConfig(cwd);
4760
+ const suppressLinterOverlap = kind === "jsts" && hasToolConfig("eslint", cwd);
4804
4761
  const fileLang = ruleLanguageForFile(filePath);
4805
4762
  const htmlCollection = fileLang === "html" && options.content !== void 0 && options.sgModule !== void 0 ? collectHtmlScriptInjections(rootNode, options.sgModule) : {
4806
4763
  injections: [],
@@ -4901,11 +4858,11 @@ function evaluateAstGrepRules(filePath, rootNode, cwd, kind, options = {}) {
4901
4858
  if (lang && fileLang && lang !== fileLang) {
4902
4859
  const runsAsTsOnTsx = fileLang === "tsx" && lang === "typescript";
4903
4860
  if (!runsAsTsOnTsx && !runsInsideHtmlScript) {
4904
- const key2 = `mismatch:${lang}->${fileLang}`;
4905
- if (!unsupportedLanguageLog.has(key2)) {
4906
- const ids = newlyUnsupported.get(key2) ?? [];
4861
+ const key = `mismatch:${lang}->${fileLang}`;
4862
+ if (!unsupportedLanguageLog.has(key)) {
4863
+ const ids = newlyUnsupported.get(key) ?? [];
4907
4864
  ids.push(rule.id);
4908
- newlyUnsupported.set(key2, ids);
4865
+ newlyUnsupported.set(key, ids);
4909
4866
  }
4910
4867
  continue;
4911
4868
  }
@@ -5185,18 +5142,18 @@ function recordEntitySnapshotDiff(facts, filePath, nextSnapshot) {
5185
5142
  const added = [];
5186
5143
  const removed = [];
5187
5144
  const modified = [];
5188
- for (const [key2, value] of nextSnapshot.entries()) {
5189
- if (!prev.has(key2))
5190
- added.push(key2);
5191
- else if (prev.get(key2) !== value)
5192
- modified.push(key2);
5145
+ for (const [key, value] of nextSnapshot.entries()) {
5146
+ if (!prev.has(key))
5147
+ added.push(key);
5148
+ else if (prev.get(key) !== value)
5149
+ modified.push(key);
5193
5150
  }
5194
- for (const key2 of prev.keys()) {
5195
- if (!nextSnapshot.has(key2))
5196
- removed.push(key2);
5151
+ for (const key of prev.keys()) {
5152
+ if (!nextSnapshot.has(key))
5153
+ removed.push(key);
5197
5154
  }
5198
5155
  const changedSymbols = [
5199
- ...new Set([...added, ...modified, ...removed].map((key2) => key2.split(":")[1]).filter(Boolean))
5156
+ ...new Set([...added, ...modified, ...removed].map((key) => key.split(":")[1]).filter(Boolean))
5200
5157
  ];
5201
5158
  facts.setBoundedSessionFact(snapshotKey, new Map(nextSnapshot));
5202
5159
  facts.setBoundedSessionFact(changedSymbolsKey, changedSymbols);
@@ -5209,8 +5166,8 @@ function scheduleProviders(providers2) {
5209
5166
  return providers2.slice();
5210
5167
  const factToProvider = /* @__PURE__ */ new Map();
5211
5168
  for (const p of providers2) {
5212
- for (const key2 of p.provides) {
5213
- factToProvider.set(key2, p);
5169
+ for (const key of p.provides) {
5170
+ factToProvider.set(key, p);
5214
5171
  }
5215
5172
  }
5216
5173
  const inDegree = /* @__PURE__ */ new Map();
@@ -5266,7 +5223,7 @@ async function runProviders(ctx) {
5266
5223
  const applicable = providers.filter((p) => p.appliesTo(ctx));
5267
5224
  const ordered = scheduleProviders(applicable);
5268
5225
  for (const provider of ordered) {
5269
- const allPresent = provider.provides.every((key2) => ctx.facts.hasFileFact(ctx.filePath, key2));
5226
+ const allPresent = provider.provides.every((key) => ctx.facts.hasFileFact(ctx.filePath, key));
5270
5227
  if (allPresent)
5271
5228
  continue;
5272
5229
  await provider.run(ctx, ctx.facts);
@@ -5458,7 +5415,7 @@ var actionlintRunner = {
5458
5415
  let cmd = null;
5459
5416
  cmd = await resolveToolCommandWithInstallFallback(cwd, "actionlint");
5460
5417
  if (!cmd)
5461
- return { status: "skipped", diagnostics: [], semantic: "none" };
5418
+ return toolAbsentSkip(cwd, { id: "actionlint" });
5462
5419
  const relativeFilePath = path7.relative(cwd, ctx.filePath) || ctx.filePath;
5463
5420
  const result = await safeSpawnAsync(cmd, ["-format", "{{json .}}", relativeFilePath], {
5464
5421
  cwd,
@@ -5626,7 +5583,7 @@ var biomeCheckJsonRunner = {
5626
5583
  }
5627
5584
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "biome");
5628
5585
  if (!cmd) {
5629
- return { status: "skipped", diagnostics: [], semantic: "none" };
5586
+ return toolAbsentSkip(cwd, { id: "biome" });
5630
5587
  }
5631
5588
  const configArg = biomeConfigArgs(cwd);
5632
5589
  const checkResult = await safeSpawnAsync(cmd, [
@@ -5833,7 +5790,7 @@ var cppCheckRunner = {
5833
5790
  const absPath = path9.resolve(cwd, ctx.filePath);
5834
5791
  const compiler = await resolveCompiler(absPath, cwd);
5835
5792
  if (!compiler) {
5836
- return { status: "skipped", diagnostics: [], semantic: "none" };
5793
+ return toolAbsentSkip(cwd);
5837
5794
  }
5838
5795
  const result = await safeSpawnAsync(compiler.command, compiler.args, {
5839
5796
  cwd,
@@ -5899,10 +5856,10 @@ var credoRunner = {
5899
5856
  async run(ctx) {
5900
5857
  const cwd = resolveRunnerCwd(ctx, "credo");
5901
5858
  if (!credoRunner.requiresConfig?.(cwd)) {
5902
- return { status: "skipped", diagnostics: [], semantic: "none" };
5859
+ return skipped("not-configured");
5903
5860
  }
5904
5861
  if (!await probeCredo(cwd)) {
5905
- return { status: "skipped", diagnostics: [], semantic: "none" };
5862
+ return toolAbsentSkip(cwd, { checker: probeCredo });
5906
5863
  }
5907
5864
  const absPath = path10.resolve(cwd, ctx.filePath);
5908
5865
  const result = await safeSpawnAsync("mix", ["credo", "--format", "json", "--strict", absPath], { timeout: 3e4, cwd });
@@ -6022,7 +5979,7 @@ var cueVetRunner = {
6022
5979
  cmd = await resolveAvailableOrInstall(cue, "cue", cwd);
6023
5980
  }
6024
5981
  if (!cmd)
6025
- return { status: "skipped", diagnostics: [], semantic: "none" };
5982
+ return toolAbsentSkip(cwd, { id: "cue", checker: cue });
6026
5983
  const absPath = path11.resolve(cwd, ctx.filePath);
6027
5984
  const fileDir = path11.dirname(absPath);
6028
5985
  const fileName = path11.basename(absPath);
@@ -6218,7 +6175,7 @@ var dartAnalyzeRunner = {
6218
6175
  const dartAvailable = await dart.isAvailableAsync(cwd);
6219
6176
  const flutterAvailable = !dartAvailable && await flutter.isAvailableAsync(cwd);
6220
6177
  if (!dartAvailable && !flutterAvailable) {
6221
- return { status: "skipped", diagnostics: [], semantic: "none" };
6178
+ return toolAbsentSkip(cwd, { checker: dart });
6222
6179
  }
6223
6180
  const cmd = dartAvailable ? dart.getCommand(cwd) : flutter.getCommand(cwd);
6224
6181
  const args = dartAvailable ? ["analyze", "--format=machine", absPath] : ["analyze", "--machine", absPath];
@@ -6247,7 +6204,6 @@ var dart_analyze_default = dartAnalyzeRunner;
6247
6204
 
6248
6205
  // dist/clients/dispatch/runners/detekt.js
6249
6206
  import * as path13 from "node:path";
6250
- var detekt = createAvailabilityChecker("detekt", ".bat");
6251
6207
  var DETEKT_FIXABLE_RULES = /* @__PURE__ */ new Set([
6252
6208
  // formatting (ktlint wrapper) — every rule supports autocorrect
6253
6209
  "AnnotationOnSeparateLine",
@@ -6355,15 +6311,15 @@ var detektRunner = {
6355
6311
  const cwd = resolveRunnerCwd(ctx, "detekt");
6356
6312
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
6357
6313
  if (policy && !policy.preferredRunners.includes("detekt")) {
6358
- return { status: "skipped", diagnostics: [], semantic: "none" };
6314
+ return skipped("not-preferred");
6359
6315
  }
6360
6316
  const configPath = findToolConfig("detekt", cwd)?.file;
6361
6317
  if (!configPath) {
6362
- return { status: "skipped", diagnostics: [], semantic: "none" };
6318
+ return skipped("not-configured");
6363
6319
  }
6364
- const cmd = await detekt.isAvailableAsync(cwd) ? detekt.getCommand(cwd) : null;
6320
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "detekt");
6365
6321
  if (!cmd)
6366
- return { status: "skipped", diagnostics: [], semantic: "none" };
6322
+ return toolAbsentSkip(cwd, { id: "detekt" });
6367
6323
  const absPath = path13.resolve(cwd, ctx.filePath);
6368
6324
  const result = await safeSpawnAsync(cmd, ["--input", absPath, "--config", configPath], { cwd, timeout: 6e4 });
6369
6325
  const raw = `${result.stdout ?? ""}${result.stderr ?? ""}`;
@@ -6520,11 +6476,11 @@ var dotnetBuildRunner = {
6520
6476
  async run(ctx) {
6521
6477
  const cwd = resolveRunnerCwd(ctx, "dotnet-build");
6522
6478
  if (!await dotnet.isAvailableAsync(cwd)) {
6523
- return { status: "skipped", diagnostics: [], semantic: "none" };
6479
+ return toolAbsentSkip(cwd, { checker: dotnet });
6524
6480
  }
6525
6481
  const cmd = dotnet.getCommand(cwd);
6526
6482
  if (!cmd) {
6527
- return { status: "skipped", diagnostics: [], semantic: "none" };
6483
+ return toolAbsentSkip(cwd, { checker: dotnet });
6528
6484
  }
6529
6485
  const target = findProjectTarget(cwd);
6530
6486
  if (!target) {
@@ -6659,7 +6615,8 @@ var elixirCheckRunner = {
6659
6615
  const absPath = path15.resolve(cwd, ctx.filePath);
6660
6616
  let command;
6661
6617
  let args = [];
6662
- if (hasToolConfig("mix", cwd) && await mix.isAvailableAsync(cwd)) {
6618
+ const mixProject = hasToolConfig("mix", cwd);
6619
+ if (mixProject && await mix.isAvailableAsync(cwd)) {
6663
6620
  command = "mix";
6664
6621
  args = ["compile", "--warnings-as-errors"];
6665
6622
  } else if (await elixirc.isAvailableAsync(cwd)) {
@@ -6669,7 +6626,7 @@ var elixirCheckRunner = {
6669
6626
  args = ["-o", outDir, absPath];
6670
6627
  }
6671
6628
  if (!command) {
6672
- return { status: "skipped", diagnostics: [], semantic: "none" };
6629
+ return toolAbsentSkip(cwd, { checker: mixProject ? mix : elixirc });
6673
6630
  }
6674
6631
  const result = await safeSpawnAsync(command, args, {
6675
6632
  cwd,
@@ -6769,15 +6726,18 @@ var eslintRunner = {
6769
6726
  id: "eslint",
6770
6727
  appliesTo: ["jsts"],
6771
6728
  priority: PRIORITY.LINT_SECONDARY,
6772
- requiresConfig: (cwd) => hasEslintConfig(cwd),
6729
+ requiresConfig: (cwd) => hasToolConfig("eslint", cwd),
6773
6730
  async run(ctx) {
6774
- const cwd = resolveRunnerCwd(ctx, "eslint");
6731
+ const resolution = resolveRunnerCwdWithReason(ctx, "eslint");
6732
+ const cwd = resolution.cwd;
6733
+ const packageDir = resolution.packageDir ?? cwd;
6775
6734
  if (!eslintRunner.requiresConfig?.(cwd)) {
6776
- return { status: "skipped", diagnostics: [], semantic: "none" };
6735
+ return skipped("not-configured");
6777
6736
  }
6778
- const cmd = resolveToolCommand(cwd, "eslint") ?? "eslint";
6779
- if (!await getEslintProbe(cmd)(cwd)) {
6780
- return { status: "skipped", diagnostics: [], semantic: "none" };
6737
+ const cmd = resolveToolCommand(packageDir, "eslint") ?? "eslint";
6738
+ const eslintProbe = getEslintProbe(cmd);
6739
+ if (!await eslintProbe(packageDir)) {
6740
+ return toolAbsentSkip(packageDir, { checker: eslintProbe });
6781
6741
  }
6782
6742
  const result = await safeSpawnAsync(cmd, ["--format", "json", "--no-error-on-unmatched-pattern", ctx.filePath], { timeout: 3e4, cwd });
6783
6743
  const parsed = parseToolRun("eslint", {
@@ -6893,7 +6853,7 @@ var gleamCheckRunner = {
6893
6853
  async run(ctx) {
6894
6854
  const cwd = resolveRunnerCwd(ctx, "gleam-check");
6895
6855
  if (!await gleam.isAvailableAsync(cwd)) {
6896
- return { status: "skipped", diagnostics: [], semantic: "none" };
6856
+ return toolAbsentSkip(cwd, { checker: gleam });
6897
6857
  }
6898
6858
  const cmd = gleam.getCommand(cwd);
6899
6859
  const result = await safeSpawnAsync(cmd, ["check"], {
@@ -7006,7 +6966,7 @@ var goVetRunner = {
7006
6966
  async run(ctx) {
7007
6967
  const goExe = await goClient.findGoPathAsync();
7008
6968
  if (!goExe) {
7009
- return { status: "skipped", diagnostics: [], semantic: "none" };
6969
+ return toolAbsentSkip(ctx.cwd);
7010
6970
  }
7011
6971
  const cwd = resolveRunnerCwd(ctx, "go-vet");
7012
6972
  const fileRel = relativeInside(cwd, ctx.filePath);
@@ -7022,12 +6982,12 @@ var goVetRunner = {
7022
6982
  });
7023
6983
  const raw = stripAnsi(result.stdout + result.stderr);
7024
6984
  const parsableLines = raw.split("\n").filter((line) => /^.+?:\d+:\d+:/.test(line)).join("\n");
7025
- const skipped = skipUnlessToolRan("go-vet", {
6985
+ const skipped2 = skipUnlessToolRan("go-vet", {
7026
6986
  result,
7027
6987
  output: parsableLines
7028
6988
  });
7029
- if (skipped)
7030
- return skipped;
6989
+ if (skipped2)
6990
+ return skipped2;
7031
6991
  if (result.status === 0 && !raw.trim()) {
7032
6992
  return { status: "succeeded", diagnostics: [], semantic: "none" };
7033
6993
  }
@@ -7044,7 +7004,6 @@ var go_vet_default = goVetRunner;
7044
7004
 
7045
7005
  // dist/clients/dispatch/runners/golangci-lint.js
7046
7006
  import * as path19 from "node:path";
7047
- var golangci = createAvailabilityChecker("golangci-lint", ".exe");
7048
7007
  var OTHER_OUTPUT_FORMATS = [
7049
7008
  "text",
7050
7009
  "tab",
@@ -7103,19 +7062,19 @@ var golangciRunner = {
7103
7062
  appliesTo: ["go"],
7104
7063
  priority: PRIORITY.GENERAL_ANALYSIS,
7105
7064
  timeoutMs: 9e4,
7106
- requiresConfig: (cwd) => hasGolangciConfig(cwd),
7065
+ requiresConfig: (cwd) => hasToolConfig("golangci-lint", cwd),
7107
7066
  async run(ctx) {
7108
7067
  const cwd = resolveRunnerCwd(ctx, "golangci-lint");
7109
7068
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
7110
7069
  if (policy && !policy.preferredRunners.includes("golangci-lint")) {
7111
- return { status: "skipped", diagnostics: [], semantic: "none" };
7070
+ return skipped("not-preferred");
7112
7071
  }
7113
7072
  if (!golangciRunner.requiresConfig?.(cwd)) {
7114
- return { status: "skipped", diagnostics: [], semantic: "none" };
7073
+ return skipped("not-configured");
7115
7074
  }
7116
- const cmd = await resolveAvailableOrInstall(golangci, "golangci-lint", cwd);
7075
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "golangci-lint");
7117
7076
  if (!cmd)
7118
- return { status: "skipped", diagnostics: [], semantic: "none" };
7077
+ return toolAbsentSkip(cwd, { id: "golangci-lint" });
7119
7078
  const result = await safeSpawnAsync(cmd, [
7120
7079
  "run",
7121
7080
  "--fix=false",
@@ -7181,11 +7140,11 @@ var hadolintRunner = {
7181
7140
  const cwd = resolveRunnerCwd(ctx, "hadolint");
7182
7141
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
7183
7142
  if (policy && !policy.preferredRunners.includes("hadolint")) {
7184
- return { status: "skipped", diagnostics: [], semantic: "none" };
7143
+ return skipped("not-preferred");
7185
7144
  }
7186
7145
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "hadolint");
7187
7146
  if (!cmd) {
7188
- return { status: "skipped", diagnostics: [], semantic: "none" };
7147
+ return toolAbsentSkip(cwd, { id: "hadolint" });
7189
7148
  }
7190
7149
  const result = await safeSpawnAsync(cmd, ["--format", "json", "--no-fail", path20.resolve(cwd, ctx.filePath)], { cwd });
7191
7150
  const run = parseToolRun("hadolint", {
@@ -7215,7 +7174,6 @@ var hadolint_default = hadolintRunner;
7215
7174
 
7216
7175
  // dist/clients/dispatch/runners/helm-lint.js
7217
7176
  import * as path21 from "node:path";
7218
- var helm = createAvailabilityChecker("helm", ".exe", ["version", "--short"]);
7219
7177
  var inFlightByChartRoot = new PathKeyedMap(normalizeMapKey);
7220
7178
  var HELM_LINT_TIMEOUT_MS = 3e4;
7221
7179
  var MAX_HELM_LINT_OUTPUT_BYTES = 8 * 1024 * 1024;
@@ -7279,9 +7237,9 @@ function failedResult(kind, message) {
7279
7237
  };
7280
7238
  }
7281
7239
  async function lintChart(chartRoot, cwd) {
7282
- const cmd = await resolveAvailableOrInstall(helm, "helm", cwd);
7240
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "helm");
7283
7241
  if (!cmd) {
7284
- const outcome = helm.getOutcome(cwd);
7242
+ const outcome = toolBinaryVerdict("helm", cwd).outcome;
7285
7243
  return {
7286
7244
  status: "failed",
7287
7245
  diagnostics: [],
@@ -7355,8 +7313,6 @@ var helm_lint_default = helmLintRunner;
7355
7313
  // dist/clients/dispatch/runners/helm-render.js
7356
7314
  import * as fs9 from "node:fs";
7357
7315
  import * as path22 from "node:path";
7358
- var helm2 = createAvailabilityChecker("helm", ".exe", ["version", "--short"]);
7359
- var trivy = createAvailabilityChecker("trivy", ".exe");
7360
7316
  var inFlightByChartRoot2 = new PathKeyedMap(normalizeMapKey);
7361
7317
  var RENDER_TIMEOUT_MS = 3e4;
7362
7318
  var TRIVY_TIMEOUT_MS = 45e3;
@@ -7571,7 +7527,7 @@ function parseRenderedTrivyOutput(raw, locate) {
7571
7527
  return { understood: true, diagnostics };
7572
7528
  }
7573
7529
  function helmUnavailableResult(cwd) {
7574
- const verdict = helm2.getVerdict(cwd);
7530
+ const verdict = toolBinaryVerdict("helm", cwd);
7575
7531
  return {
7576
7532
  status: "failed",
7577
7533
  diagnostics: [],
@@ -7714,9 +7670,9 @@ function coverageGap(chartRoot, rule, message) {
7714
7670
  }
7715
7671
  async function runIacPass(options) {
7716
7672
  const { chartRoot, cwd, outputDir } = options;
7717
- const trivyCmd = await resolveAvailableOrInstall(trivy, "trivy", cwd);
7673
+ const trivyCmd = await resolveToolCommandWithInstallFallback(cwd, "trivy");
7718
7674
  if (!trivyCmd) {
7719
- const verdict = trivy.getVerdict(cwd);
7675
+ const verdict = toolBinaryVerdict("trivy", cwd);
7720
7676
  return [
7721
7677
  coverageGap(chartRoot, "iac-pass-unavailable", `Rendered-manifest IaC checks did not run: ${describeUnavailability({
7722
7678
  tool: "trivy",
@@ -7813,7 +7769,7 @@ function discardScratchDir(outputDir, filePath, remove = (target) => fs9.rmSync(
7813
7769
  }
7814
7770
  async function renderAndValidate(chartRoot, cwd, filePath) {
7815
7771
  const startedAt = Date.now();
7816
- const helmCmd = await resolveAvailableOrInstall(helm2, "helm", cwd);
7772
+ const helmCmd = await resolveToolCommandWithInstallFallback(cwd, "helm");
7817
7773
  if (!helmCmd)
7818
7774
  return helmUnavailableResult(cwd);
7819
7775
  const outputDir = fs9.mkdtempSync(path22.join(scannerReportParentDir(), "pi-lens-helm-render-"));
@@ -7997,11 +7953,11 @@ var htmlhintRunner = {
7997
7953
  const cwd = resolveRunnerCwd(ctx, "htmlhint");
7998
7954
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
7999
7955
  if (policy && !policy.preferredRunners.includes("htmlhint")) {
8000
- return { status: "skipped", diagnostics: [], semantic: "none" };
7956
+ return skipped("not-preferred");
8001
7957
  }
8002
7958
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "htmlhint");
8003
7959
  if (!cmd) {
8004
- return { status: "skipped", diagnostics: [], semantic: "none" };
7960
+ return toolAbsentSkip(cwd, { id: "htmlhint" });
8005
7961
  }
8006
7962
  const rulesArg = Object.entries(HTMLHINT_RULES).flatMap(([rule, enabled]) => enabled === true ? [rule] : []).join(",");
8007
7963
  const result = await safeSpawnAsync(cmd, [
@@ -8079,16 +8035,18 @@ var javacRunner = {
8079
8035
  async run(ctx) {
8080
8036
  const cwd = resolveRunnerCwd(ctx, "javac");
8081
8037
  const absPath = path24.resolve(cwd, ctx.filePath);
8082
- if (hasJavaBuildDescriptor(path24.dirname(absPath), ctx.projectRoot ?? ctx.cwd)) {
8038
+ if (hasToolConfig("javaBuild", path24.dirname(absPath), {
8039
+ ceiling: ctx.projectRoot ?? ctx.cwd
8040
+ })) {
8083
8041
  ctx.log?.("javac: skipped \u2014 file is inside a Maven/Gradle project; a classpath-less compile would emit false positives");
8084
8042
  return { status: "skipped", diagnostics: [], semantic: "none" };
8085
8043
  }
8086
8044
  if (!await javac.isAvailableAsync(cwd)) {
8087
- return { status: "skipped", diagnostics: [], semantic: "none" };
8045
+ return toolAbsentSkip(cwd, { checker: javac });
8088
8046
  }
8089
8047
  const cmd = javac.getCommand(cwd);
8090
8048
  if (!cmd) {
8091
- return { status: "skipped", diagnostics: [], semantic: "none" };
8049
+ return toolAbsentSkip(cwd, { checker: javac });
8092
8050
  }
8093
8051
  const result = await safeSpawnAsync(cmd, ["-Xlint:none", "-proc:none", absPath], {
8094
8052
  cwd,
@@ -8193,11 +8151,11 @@ var ktlintRunner = {
8193
8151
  const cwd = resolveRunnerCwd(ctx, "ktlint");
8194
8152
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
8195
8153
  if (policy && !policy.preferredRunners.includes("ktlint")) {
8196
- return { status: "skipped", diagnostics: [], semantic: "none" };
8154
+ return skipped("not-preferred");
8197
8155
  }
8198
8156
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "ktlint");
8199
8157
  if (!cmd)
8200
- return { status: "skipped", diagnostics: [], semantic: "none" };
8158
+ return toolAbsentSkip(cwd, { id: "ktlint" });
8201
8159
  const absPath = path25.resolve(cwd, ctx.filePath);
8202
8160
  const result = await safeSpawnAsync(cmd, ["--reporter=json", absPath], {
8203
8161
  cwd,
@@ -8230,7 +8188,7 @@ var LSP_RUNNER_TIMEOUT_MS = Math.max(LSP_SPAWN_BUDGET_MS, ...LSP_SERVERS.map((se
8230
8188
  function normalizeActionTitle(title) {
8231
8189
  return title.replace(/\s+/g, " ").trim();
8232
8190
  }
8233
- function buildCodeActionSuggestion(actions) {
8191
+ function buildCodeActionSuggestion(actions = []) {
8234
8192
  if (!actions.length)
8235
8193
  return void 0;
8236
8194
  const quickFixes = actions.filter((action) => action.kind?.startsWith("quickfix"));
@@ -8649,20 +8607,26 @@ var markdownlintRunner = {
8649
8607
  const cwd = resolveRunnerCwd(ctx, "markdownlint");
8650
8608
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
8651
8609
  if (policy && !policy.preferredRunners.includes("markdownlint")) {
8652
- return { status: "skipped", diagnostics: [], semantic: "none" };
8610
+ return skipped("not-preferred");
8653
8611
  }
8654
8612
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "markdownlint");
8655
8613
  if (!cmd)
8656
- return { status: "skipped", diagnostics: [], semantic: "none" };
8614
+ return toolAbsentSkip(cwd, { id: "markdownlint" });
8657
8615
  const configArgs = markdownlintConfigArgs(cwd);
8658
- const args = [...configArgs, ctx.filePath];
8616
+ const args = [...configArgs, optionSafeTargetArg(cwd, ctx.filePath)];
8659
8617
  const invocation = markdownlintNoFixInvocation({ command: cmd, cwd, args });
8660
8618
  const result = await safeSpawnAsync(invocation.command, invocation.args, {
8661
8619
  timeout: 15e3,
8662
8620
  cwd
8663
8621
  });
8664
8622
  const raw = `${result.stdout ?? ""}${result.stderr ?? ""}`;
8665
- const run = parseToolRun("markdownlint", { result, output: raw, exitCodes: MARKDOWNLINT_EXIT_CODES }, (out) => parseMarkdownlintOutput(out, ctx.filePath, cwd));
8623
+ const run = parseToolRun(
8624
+ "markdownlint",
8625
+ { result, output: raw, exitCodes: MARKDOWNLINT_EXIT_CODES },
8626
+ // ADR 0009: the finding is attributed to the dispatched path; the parser
8627
+ // resolves the tool's project-relative report against the spawn cwd.
8628
+ (out) => parseMarkdownlintOutput(out, ctx.filePath, cwd)
8629
+ );
8666
8630
  if (run.skipped)
8667
8631
  return run.skipped;
8668
8632
  const diagnostics = run.diagnostics;
@@ -8712,15 +8676,15 @@ var mypyRunner = {
8712
8676
  appliesTo: ["python"],
8713
8677
  priority: PRIORITY.GENERAL_ANALYSIS,
8714
8678
  skipTestFiles: false,
8715
- requiresConfig: (cwd) => hasMypyConfig(cwd),
8679
+ requiresConfig: (cwd) => hasToolConfig("mypy", cwd),
8716
8680
  async run(ctx) {
8717
8681
  const cwd = resolveRunnerCwd(ctx, "mypy");
8718
8682
  if (!mypyRunner.requiresConfig?.(cwd)) {
8719
- return { status: "skipped", diagnostics: [], semantic: "none" };
8683
+ return skipped("not-configured");
8720
8684
  }
8721
8685
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "mypy");
8722
8686
  if (!cmd)
8723
- return { status: "skipped", diagnostics: [], semantic: "none" };
8687
+ return toolAbsentSkip(cwd, { id: "mypy" });
8724
8688
  const result = await safeSpawnAsync(cmd, ["--no-error-summary", "--show-column-numbers", ctx.filePath], { timeout: 3e4, cwd });
8725
8689
  const raw = `${result.stdout ?? ""}${result.stderr ?? ""}`;
8726
8690
  const run = parseToolRun("mypy", { result, output: result.stdout, exitCodes: MYPY_EXIT_CODES }, (out) => parseMypyOutput(out, ctx.filePath, cwd), { parseOutput: raw });
@@ -8753,8 +8717,8 @@ var OXLINT_NO_FILES_REPORT_KEYS = /* @__PURE__ */ new Set([
8753
8717
  function resolveLocalVp(cwd) {
8754
8718
  return localBinPath(findLocalBinUpwards("vp", cwd)) ?? null;
8755
8719
  }
8756
- async function resolveVitePlusCommand(cwd) {
8757
- const local = resolveLocalVp(cwd);
8720
+ async function resolveVitePlusCommand(packageDir, cwd) {
8721
+ const local = resolveLocalVp(packageDir);
8758
8722
  if (local)
8759
8723
  return local;
8760
8724
  const version = await safeSpawnAsync("vp", ["--version"], {
@@ -8769,24 +8733,27 @@ var oxlintRunner = {
8769
8733
  priority: PRIORITY.LINT_SECONDARY,
8770
8734
  skipTestFiles: false,
8771
8735
  async run(ctx) {
8772
- const cwd = resolveRunnerCwd(ctx, "oxlint");
8773
- const policy = getJstsLintPolicyForCwd(cwd);
8736
+ const resolution = resolveRunnerCwdWithReason(ctx, "oxlint");
8737
+ const cwd = resolution.cwd;
8738
+ const packageDir = resolution.packageDir ?? cwd;
8739
+ const policy = getJstsLintPolicyForCwd(packageDir);
8774
8740
  if (!policy.preferredRunners.includes("oxlint")) {
8775
- return { status: "skipped", diagnostics: [], semantic: "none" };
8741
+ return skipped("not-preferred");
8776
8742
  }
8777
8743
  let cmd = null;
8778
8744
  let args;
8779
- if (hasVitePlusConfig(cwd)) {
8780
- cmd = await resolveVitePlusCommand(cwd);
8745
+ if (hasToolConfig("vitePlus", packageDir)) {
8746
+ cmd = await resolveVitePlusCommand(packageDir, cwd);
8781
8747
  }
8748
+ const target = optionSafeTargetArg(cwd, ctx.filePath);
8782
8749
  if (cmd) {
8783
- args = ["lint", "--format", "json", ctx.filePath];
8750
+ args = ["lint", "--format", "json", target];
8784
8751
  } else {
8785
- cmd = await resolveToolCommandWithInstallFallback(cwd, "oxlint");
8786
- args = ["--format", "json", ctx.filePath];
8752
+ cmd = await resolveToolCommandWithInstallFallback(packageDir, "oxlint");
8753
+ args = ["--format", "json", target];
8787
8754
  }
8788
8755
  if (!cmd) {
8789
- return { status: "skipped", diagnostics: [], semantic: "none" };
8756
+ return toolAbsentSkip(packageDir, { id: "oxlint" });
8790
8757
  }
8791
8758
  const result = await safeSpawnAsync(cmd, args, {
8792
8759
  cwd,
@@ -8927,10 +8894,10 @@ function decideOxlintNoFiles(result, stdout, stderr) {
8927
8894
  return { kind: "unconfirmed-no-files", reason: "json-malformed" };
8928
8895
  }
8929
8896
  const keys = Object.keys(report);
8930
- if (keys.some((key2) => !OXLINT_NO_FILES_REPORT_KEYS.has(key2))) {
8897
+ if (keys.some((key) => !OXLINT_NO_FILES_REPORT_KEYS.has(key))) {
8931
8898
  return { kind: "unconfirmed-no-files", reason: "json-unknown-key" };
8932
8899
  }
8933
- if (OXLINT_NO_FILES_REPORT_KEYS.size !== keys.length || [...OXLINT_NO_FILES_REPORT_KEYS].some((key2) => !Object.prototype.hasOwnProperty.call(report, key2))) {
8900
+ if (OXLINT_NO_FILES_REPORT_KEYS.size !== keys.length || [...OXLINT_NO_FILES_REPORT_KEYS].some((key) => !Object.prototype.hasOwnProperty.call(report, key))) {
8934
8901
  return { kind: "unconfirmed-no-files", reason: "json-missing-key" };
8935
8902
  }
8936
8903
  if (!Array.isArray(report.diagnostics) || !isNonnegativeInteger(report.number_of_files) || !isNonnegativeInteger(report.number_of_rules) || !isPositiveInteger(report.threads_count) || !isNonnegativeFinite(report.start_time)) {
@@ -9065,7 +9032,7 @@ var phpLintRunner = {
9065
9032
  const cwd = resolveRunnerCwd(ctx, "php-lint");
9066
9033
  const cmd = ctx.analysisRootMode === "adopted" ? resolveAdoptedRootCommand("php", ctx, cwd) : await php.isAvailableAsync(cwd) ? php.getCommand(cwd) : null;
9067
9034
  if (!cmd)
9068
- return { status: "skipped", diagnostics: [], semantic: "none" };
9035
+ return toolAbsentSkip(cwd, { checker: php });
9069
9036
  const absPath = path30.resolve(cwd, ctx.filePath);
9070
9037
  const result = await safeSpawnAsync(cmd, ["-l", absPath], {
9071
9038
  timeout: 15e3,
@@ -9146,19 +9113,23 @@ var phpstanRunner = {
9146
9113
  appliesTo: ["php"],
9147
9114
  priority: PRIORITY.GENERAL_ANALYSIS,
9148
9115
  skipTestFiles: false,
9149
- requiresConfig: (cwd) => hasPhpstanConfig(cwd),
9116
+ requiresConfig: (cwd) => hasToolConfig("phpstan", cwd),
9150
9117
  async run(ctx) {
9151
9118
  const cwd = resolveRunnerCwd(ctx, "phpstan");
9152
9119
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
9153
9120
  if (policy && !policy.preferredRunners.includes("phpstan")) {
9154
- return { status: "skipped", diagnostics: [], semantic: "none" };
9121
+ return skipped("not-preferred");
9155
9122
  }
9156
9123
  if (!phpstanRunner.requiresConfig?.(cwd)) {
9157
- return { status: "skipped", diagnostics: [], semantic: "none" };
9124
+ return skipped("not-configured");
9158
9125
  }
9159
- const cmd = await resolvePhpstan(cwd);
9126
+ const lookup = await resolvePhpstan(cwd) ?? void 0;
9127
+ const cmd = localBinPath(lookup);
9160
9128
  if (!cmd)
9161
- return { status: "skipped", diagnostics: [], semantic: "none" };
9129
+ return toolAbsentSkip(cwd, {
9130
+ checker: phpstan,
9131
+ trustRefused: isLocalBinTrustRefusal(lookup)
9132
+ });
9162
9133
  const absPath = path31.resolve(cwd, ctx.filePath);
9163
9134
  const result = await safeSpawnAsync(cmd, ["analyse", "--error-format=json", "--no-progress", absPath], { timeout: 3e4, cwd });
9164
9135
  const run = parseToolRun("phpstan", { result, exitCodes: PHPSTAN_EXIT_CODES }, (out) => parsePhpstanJson(out, ctx.filePath, cwd), { parseOutput: result.stdout ?? "" });
@@ -9224,9 +9195,9 @@ ${result.stderr ?? ""}`;
9224
9195
  const diagnostics = parsePrismaValidateOutput(output, ctx.filePath);
9225
9196
  const findings = PRISMA_VALIDATION_REPORT.test(output) ? diagnostics : [];
9226
9197
  if (findings.length === 0) {
9227
- const skipped = skipUnlessToolRan("prisma-validate", { result, output });
9228
- if (skipped)
9229
- return skipped;
9198
+ const skipped2 = skipUnlessToolRan("prisma-validate", { result, output });
9199
+ if (skipped2)
9200
+ return skipped2;
9230
9201
  }
9231
9202
  const cutShort = faultIfCutShort(result, findings);
9232
9203
  if (cutShort)
@@ -9342,6 +9313,17 @@ async function resolvePowerShellCmd() {
9342
9313
  });
9343
9314
  return null;
9344
9315
  }
9316
+ function moduleVerdict(cmd) {
9317
+ const latch = psAnalyzerLatchByCmd.get(cmd);
9318
+ const outcome = latch?.getOutcome() ?? null;
9319
+ return {
9320
+ outcome,
9321
+ cause: latch?.getCause() ?? null,
9322
+ elapsedMs: 0,
9323
+ latched: outcome !== null,
9324
+ retryAtMs: latch?.getRetryAtMs() ?? 0
9325
+ };
9326
+ }
9345
9327
  async function checkModuleAvailable(cmd) {
9346
9328
  let latch = psAnalyzerLatchByCmd.get(cmd);
9347
9329
  if (!latch) {
@@ -9427,9 +9409,9 @@ var psScriptAnalyzerRunner = {
9427
9409
  async run(ctx) {
9428
9410
  const cmd = await resolvePowerShellCmd();
9429
9411
  if (!cmd)
9430
- return { status: "skipped", diagnostics: [], semantic: "none" };
9412
+ return toolAbsentSkip(ctx.cwd);
9431
9413
  if (!await checkModuleAvailable(cmd)) {
9432
- return { status: "skipped", diagnostics: [], semantic: "none" };
9414
+ return toolAbsentSkip(ctx.cwd, { verdict: moduleVerdict(cmd) });
9433
9415
  }
9434
9416
  let execLatch = psExecLatchByCmd.get(cmd);
9435
9417
  if (!execLatch) {
@@ -9475,7 +9457,7 @@ var psScriptAnalyzerRunner = {
9475
9457
  subject: "psscriptanalyzer",
9476
9458
  reason: `PowerShell (${cmd}) -File analysis exited with no status -- crash or signal-killed process`
9477
9459
  });
9478
- return { status: "skipped", diagnostics: [], semantic: "none" };
9460
+ return faultSkip("did-not-run");
9479
9461
  }
9480
9462
  if (result.status !== 0) {
9481
9463
  const stderrText = result.stderr ?? "";
@@ -9501,7 +9483,7 @@ var psScriptAnalyzerRunner = {
9501
9483
  subject: "psscriptanalyzer",
9502
9484
  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"}`
9503
9485
  });
9504
- return { status: "skipped", diagnostics: [], semantic: "none" };
9486
+ return faultSkip("rejected-invocation");
9505
9487
  }
9506
9488
  if (execLatch.read() === null) {
9507
9489
  notePsDecision(execLatch, "psscriptanalyzer-exec", {
@@ -9531,7 +9513,7 @@ var psScriptAnalyzerRunner = {
9531
9513
  subject: "psscriptanalyzer",
9532
9514
  reason: `PowerShell -File analysis for ${cmd} exited 0 but stdout was ${unreadableReason}`
9533
9515
  });
9534
- return { status: "skipped", diagnostics: [], semantic: "none" };
9516
+ return faultSkip("report-missing");
9535
9517
  }
9536
9518
  if (diagnostics.length === 0) {
9537
9519
  return { status: "succeeded", diagnostics: [], semantic: "none" };
@@ -9572,13 +9554,13 @@ var pyrightRunner = {
9572
9554
  cmd = installedPath;
9573
9555
  }
9574
9556
  if (!cmd) {
9575
- const { findCommandAsync } = await import("./chunk-5KLRCUDT.js");
9557
+ const { findCommandAsync } = await import("./chunk-H5API74E.js");
9576
9558
  const foundCmd = await findCommandAsync("pyright");
9577
9559
  if (foundCmd)
9578
9560
  cmd = foundCmd;
9579
9561
  }
9580
9562
  if (!cmd) {
9581
- return { status: "skipped", diagnostics: [], semantic: "none" };
9563
+ return toolAbsentSkip(cwd, { id: "pyright", checker: pyright });
9582
9564
  }
9583
9565
  const pythonEnvironment = await detectPythonEnvironment(cwd);
9584
9566
  const env = augmentPythonEnvironment(process.env, pythonEnvironment);
@@ -9725,11 +9707,14 @@ var rubocopRunner = {
9725
9707
  const cwd = resolveRunnerCwd(ctx, "rubocop");
9726
9708
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
9727
9709
  if (policy && !policy.preferredRunners.includes("rubocop")) {
9728
- return { status: "skipped", diagnostics: [], semantic: "none" };
9710
+ return skipped("not-preferred");
9729
9711
  }
9730
- const resolved = await resolveCommandArgsWithInstallFallback(getRubocopCommand(cwd), "rubocop", cwd, ["--version"], 1e4);
9712
+ let verdict = null;
9713
+ const resolved = await resolveCommandArgsWithInstallFallback(getRubocopCommand(cwd), "rubocop", cwd, ["--version"], 1e4, (found) => {
9714
+ verdict = found;
9715
+ });
9731
9716
  if (!resolved) {
9732
- return { status: "skipped", diagnostics: [], semantic: "none" };
9717
+ return toolAbsentSkip(cwd, { id: "rubocop", verdict });
9733
9718
  }
9734
9719
  const { cmd, args } = resolved;
9735
9720
  const result = await safeSpawnAsync(cmd, [...args, "--format", "json", "--no-color", ctx.filePath], { timeout: 3e4, cwd });
@@ -9747,7 +9732,6 @@ var rubocopRunner = {
9747
9732
  var rubocop_default = rubocopRunner;
9748
9733
 
9749
9734
  // dist/clients/dispatch/runners/ruff.js
9750
- var ruff = createAvailabilityChecker("ruff", ".exe");
9751
9735
  function parseRuffJson(raw, filePath) {
9752
9736
  try {
9753
9737
  const parsed = JSON.parse(raw);
@@ -9785,11 +9769,11 @@ var ruffRunner = {
9785
9769
  const cwd = resolveRunnerCwd2(ctx, "ruff");
9786
9770
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
9787
9771
  if (policy && !policy.preferredRunners.includes("ruff-lint")) {
9788
- return { status: "skipped", diagnostics: [], semantic: "none" };
9772
+ return skipped("not-preferred");
9789
9773
  }
9790
- const cmd = await resolveAvailableOrInstall(ruff, "ruff", cwd);
9774
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "ruff");
9791
9775
  if (!cmd) {
9792
- return { status: "skipped", diagnostics: [], semantic: "none" };
9776
+ return toolAbsentSkip(cwd, { id: "ruff" });
9793
9777
  }
9794
9778
  const configArgs = ruffConfigArgs(cwd);
9795
9779
  const checkResult = await safeSpawnAsync(cmd, [
@@ -9847,7 +9831,7 @@ var rustClippyRunner = {
9847
9831
  async run(ctx) {
9848
9832
  const cargoExe = await rustClient.findCargoPathAsync();
9849
9833
  if (!cargoExe) {
9850
- return { status: "skipped", diagnostics: [], semantic: "none" };
9834
+ return toolAbsentSkip(ctx.cwd);
9851
9835
  }
9852
9836
  const clippyProbe = getClippyProbe(cargoExe);
9853
9837
  if (!await clippyProbe(ctx.cwd)) {
@@ -9868,7 +9852,7 @@ var rustClippyRunner = {
9868
9852
  elapsedMs: 0,
9869
9853
  latched: false
9870
9854
  });
9871
- return { status: "skipped", diagnostics: [], semantic: "none" };
9855
+ return toolAbsentSkip(ctx.cwd, { checker: refreshedProbe });
9872
9856
  }
9873
9857
  }
9874
9858
  const cargoResolution = resolveRunnerCwdWithReason(ctx, "rust-clippy");
@@ -9898,8 +9882,8 @@ var rustClippyRunner = {
9898
9882
  const hasBlocking = diagnostics.some((d) => d.semantic === "blocking");
9899
9883
  const semantic = hasBlocking ? "blocking" : diagnostics.length > 0 ? "warning" : "none";
9900
9884
  if (spawnTimedOut(result)) {
9901
- const skipped = diagnostics.length === 0 ? skipUnlessToolRan("rust-clippy", { result }) : null;
9902
- const cut = skipped ?? faultIfCutShort(result, diagnostics);
9885
+ const skipped2 = diagnostics.length === 0 ? skipUnlessToolRan("rust-clippy", { result }) : null;
9886
+ const cut = skipped2 ?? faultIfCutShort(result, diagnostics);
9903
9887
  if (cut)
9904
9888
  return cut;
9905
9889
  }
@@ -9986,7 +9970,6 @@ var rust_clippy_default = rustClippyRunner;
9986
9970
  import { randomUUID } from "node:crypto";
9987
9971
  import * as fs12 from "node:fs";
9988
9972
  import * as path35 from "node:path";
9989
- var java = createAvailabilityChecker("java", ".exe", ["-version"]);
9990
9973
  var spotbugs = createAvailabilityChecker("spotbugs", ".bat", ["-version"]);
9991
9974
  var MAX_DIAGNOSTICS = 50;
9992
9975
  var MAX_XML_BYTES = 4 * 1024 * 1024;
@@ -10125,6 +10108,7 @@ var spotbugsRunner = {
10125
10108
  id: "spotbugs",
10126
10109
  appliesTo: ["java", "kotlin"],
10127
10110
  priority: PRIORITY.DEEP_LANGUAGE_ANALYSIS,
10111
+ timeoutMs: 12e4,
10128
10112
  async run(ctx) {
10129
10113
  const cwd = resolveRunnerCwd(ctx, "spotbugs");
10130
10114
  const classesDir = findCompiledClassesDir(cwd);
@@ -10132,8 +10116,8 @@ var spotbugsRunner = {
10132
10116
  ctx.log?.("spotbugs: Java project detected but no compiled .class files found \u2014 run `mvn compile` / `gradle build` first");
10133
10117
  return { status: "skipped", diagnostics: [], semantic: "none" };
10134
10118
  }
10135
- if (!await java.isAvailableAsync(cwd)) {
10136
- return { status: "skipped", diagnostics: [], semantic: "none" };
10119
+ if (!await resolveToolCommandWithInstallFallback(cwd, "java")) {
10120
+ return toolAbsentSkip(cwd, { id: "java", runtime: true });
10137
10121
  }
10138
10122
  const signature = classesSignature(classesDir);
10139
10123
  const cached = scanCache.get(classesDir);
@@ -10146,7 +10130,7 @@ var spotbugsRunner = {
10146
10130
  }
10147
10131
  const cmd = await resolveAvailableOrInstall(spotbugs, "spotbugs", cwd);
10148
10132
  if (!cmd)
10149
- return { status: "skipped", diagnostics: [], semantic: "none" };
10133
+ return toolAbsentSkip(cwd, { id: "spotbugs", checker: spotbugs });
10150
10134
  const tmpXml = path35.join(scannerReportParentDir(), `pi-lens-spotbugs-${process.pid}-${randomUUID()}.xml`);
10151
10135
  const result = await safeSpawnAsync(cmd, [
10152
10136
  "-textui",
@@ -10191,9 +10175,6 @@ var spotbugs_default = spotbugsRunner;
10191
10175
  import * as path36 from "node:path";
10192
10176
  var shellcheck = createAvailabilityChecker("shellcheck", ".exe");
10193
10177
  var SHELLCHECK_EXIT_CODES = { ran: [1] };
10194
- function findShellcheckConfig(cwd) {
10195
- return findLocalToolConfig(cwd, [".shellcheckrc"]);
10196
- }
10197
10178
  function parseShellcheckOutput(raw, filePath, cwd) {
10198
10179
  const diagnostics = [];
10199
10180
  const absTarget = path36.resolve(cwd, filePath);
@@ -10279,13 +10260,13 @@ var shellcheckRunner = {
10279
10260
  cmd = managed;
10280
10261
  }
10281
10262
  if (!cmd)
10282
- return { status: "skipped", diagnostics: [], semantic: "none" };
10263
+ return toolAbsentSkip(cwd, { id: "shellcheck", checker: shellcheck });
10283
10264
  const args = ["--format", "json"];
10284
10265
  if (!dialectInfo.shebang && !dialectInfo.directive) {
10285
10266
  args.push("--shell", dialectInfo.dialect);
10286
10267
  }
10287
- const configPath = findShellcheckConfig(ctx.cwd);
10288
- if (!configPath) {
10268
+ const configDir = path36.dirname(path36.resolve(cwd, ctx.filePath));
10269
+ if (!hasToolConfig("shellcheck", configDir)) {
10289
10270
  args.push("--severity", "info");
10290
10271
  }
10291
10272
  args.push(ctx.filePath);
@@ -10347,7 +10328,7 @@ var fishIndentRunner = {
10347
10328
  const cwd = resolveRunnerCwd(ctx, "fish-indent");
10348
10329
  const cmd = ctx.analysisRootMode === "adopted" ? resolveAdoptedRootCommand("fish_indent", ctx, cwd) : await fishIndent.isAvailableAsync(cwd) ? fishIndent.getCommand(cwd) : null;
10349
10330
  if (!cmd)
10350
- return { status: "skipped", diagnostics: [], semantic: "none" };
10331
+ return toolAbsentSkip(cwd, { checker: fishIndent });
10351
10332
  const fishCmd = ctx.analysisRootMode === "adopted" ? resolveAdoptedRootCommand("fish", ctx, cwd) : await fish.isAvailableAsync(cwd) ? fish.getCommand(cwd) : null;
10352
10333
  if (fishCmd) {
10353
10334
  const syntax = await safeSpawnAsync(fishCmd, ["--no-config", "--no-execute", ctx.filePath], { timeout: 1e4, cwd });
@@ -10433,12 +10414,12 @@ var shfmtRunner = {
10433
10414
  } else {
10434
10415
  const installed = await resolveAvailableOrInstall(shfmt, "shfmt", cwd);
10435
10416
  if (!installed) {
10436
- return { status: "skipped", diagnostics: [], semantic: "none" };
10417
+ return toolAbsentSkip(cwd, { id: "shfmt", checker: shfmt });
10437
10418
  }
10438
10419
  cmd = installed;
10439
10420
  }
10440
10421
  if (!cmd)
10441
- return { status: "skipped", diagnostics: [], semantic: "none" };
10422
+ return toolAbsentSkip(cwd, { id: "shfmt", checker: shfmt });
10442
10423
  const result = await safeSpawnAsync(cmd, ["--diff", ctx.filePath], {
10443
10424
  timeout: 1e4,
10444
10425
  cwd
@@ -10473,7 +10454,7 @@ var shfmtRunner = {
10473
10454
  });
10474
10455
  }
10475
10456
  if (!hasToolConfig("editorconfig", cwd)) {
10476
- return { status: "skipped", diagnostics: [], semantic: "none" };
10457
+ return skipped("not-configured");
10477
10458
  }
10478
10459
  const diffOutput = result.stdout ?? result.stderr ?? "";
10479
10460
  let line = 1;
@@ -10555,7 +10536,7 @@ var spellcheckRunner = {
10555
10536
  async run(ctx) {
10556
10537
  const cwd = resolveRunnerCwd2(ctx, "spellcheck/typos");
10557
10538
  if (!await typos.isAvailableAsync(cwd)) {
10558
- return { status: "skipped", diagnostics: [], semantic: "none" };
10539
+ return toolAbsentSkip(cwd, { id: "typos", checker: typos });
10559
10540
  }
10560
10541
  const args = ["--format", "json", ctx.filePath];
10561
10542
  const result = await safeSpawnAsync(typos.getCommand(cwd), args, {
@@ -10670,15 +10651,15 @@ var sqlfluffRunner = {
10670
10651
  const cwd = resolveRunnerCwd(ctx, "sqlfluff");
10671
10652
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
10672
10653
  if (policy && !policy.preferredRunners.includes("sqlfluff")) {
10673
- return { status: "skipped", diagnostics: [], semantic: "none" };
10654
+ return skipped("not-preferred");
10674
10655
  }
10675
- const hasConfig = hasSqlfluffConfig(cwd);
10656
+ const hasConfig = hasToolConfig("sqlfluff", cwd);
10676
10657
  if (!hasConfig) {
10677
10658
  logRunnerAdvisoryOnce(ctx, "sqlfluff", cwd, "sqlfluff: no config detected, using ANSI dialect defaults");
10678
10659
  }
10679
10660
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "sqlfluff");
10680
10661
  if (!cmd)
10681
- return { status: "skipped", diagnostics: [], semantic: "none" };
10662
+ return toolAbsentSkip(cwd, { id: "sqlfluff" });
10682
10663
  const args = ["lint", "--format", "json"];
10683
10664
  if (!hasConfig) {
10684
10665
  args.push("--dialect", "ansi");
@@ -10784,16 +10765,16 @@ var stylelintRunner = {
10784
10765
  const cwd = resolveRunnerCwd(ctx, "stylelint");
10785
10766
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
10786
10767
  if (policy && !policy.preferredRunners.includes("stylelint")) {
10787
- return { status: "skipped", diagnostics: [], semantic: "none" };
10768
+ return skipped("not-preferred");
10788
10769
  }
10789
10770
  const fileDir = path39.dirname(path39.resolve(cwd, ctx.filePath));
10790
- const hasConfig = hasStylelintConfig(fileDir) || hasStylelintConfig(cwd);
10771
+ const hasConfig = hasToolConfig("stylelint", fileDir) || hasToolConfig("stylelint", cwd);
10791
10772
  if (!hasConfig) {
10792
10773
  logRunnerAdvisoryOnce(ctx, "stylelint", cwd, "stylelint: no config detected, running with default rules");
10793
10774
  }
10794
10775
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "stylelint");
10795
10776
  if (!cmd)
10796
- return { status: "skipped", diagnostics: [], semantic: "none" };
10777
+ return toolAbsentSkip(cwd, { id: "stylelint" });
10797
10778
  const result = await safeSpawnAsync(cmd, ["--formatter", "json", ctx.filePath], { timeout: 2e4, cwd });
10798
10779
  const raw = stylelintReport(result.stdout, result.stderr);
10799
10780
  const run = parseToolRun("stylelint", { result, output: raw, exitCodes: STYLELINT_EXIT_CODES }, (out) => parseStylelintJson(out, ctx.filePath, cwd));
@@ -10920,7 +10901,7 @@ var swiftlintRunner = {
10920
10901
  const cwd = resolveRunnerCwd(ctx, "swiftlint");
10921
10902
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "swiftlint");
10922
10903
  if (!cmd)
10923
- return { status: "skipped", diagnostics: [], semantic: "none" };
10904
+ return toolAbsentSkip(cwd, { id: "swiftlint" });
10924
10905
  const result = await safeSpawnAsync(cmd, ["--reporter", "json", path40.resolve(cwd, ctx.filePath)], { cwd, timeout: 15e3 });
10925
10906
  const run = parseToolRun("swiftlint", {
10926
10907
  result,
@@ -11006,7 +10987,7 @@ var taploRunner = {
11006
10987
  const cwd = resolveRunnerCwd(ctx, "taplo");
11007
10988
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
11008
10989
  if (policy && !policy.preferredRunners.includes("taplo")) {
11009
- return { status: "skipped", diagnostics: [], semantic: "none" };
10990
+ return skipped("not-preferred");
11010
10991
  }
11011
10992
  const cover = lspPrimaryCoversFile(ctx, "taplo");
11012
10993
  if (cover && await coveringLaneAvailable(ctx, cover)) {
@@ -11025,12 +11006,16 @@ var taploRunner = {
11025
11006
  coveredBy: { runnerId: "lsp", serverId: cover.serverId }
11026
11007
  };
11027
11008
  }
11028
- let cmd = localBinPath(findLocalBinUpwards("taplo", cwd)) ?? null;
11009
+ const projectTaplo = findLocalBinUpwards("taplo", cwd);
11010
+ let cmd = localBinPath(projectTaplo) ?? null;
11029
11011
  if (!cmd) {
11030
11012
  cmd = await resolveToolCommandWithInstallFallback(cwd, "taplo");
11031
11013
  }
11032
11014
  if (!cmd)
11033
- return { status: "skipped", diagnostics: [], semantic: "none" };
11015
+ return toolAbsentSkip(cwd, {
11016
+ id: "taplo",
11017
+ trustRefused: isLocalBinTrustRefusal(projectTaplo)
11018
+ });
11034
11019
  const absPath = path41.resolve(cwd, ctx.filePath);
11035
11020
  const result = await safeSpawnAsync(cmd, ["check", "--colors", "never", absPath], { cwd, timeout: 15e3 });
11036
11021
  const raw = result.stderr?.trim() ? result.stderr : result.stdout ?? "";
@@ -11105,11 +11090,6 @@ function parseTerragruntOutput(raw, filePath, absPath = path42.resolve(filePath)
11105
11090
  }
11106
11091
  return diagnostics;
11107
11092
  }
11108
- var SKIPPED3 = {
11109
- status: "skipped",
11110
- diagnostics: [],
11111
- semantic: "none"
11112
- };
11113
11093
  var terragruntRunner = {
11114
11094
  id: "terragrunt",
11115
11095
  appliesTo: ["terragrunt"],
@@ -11119,7 +11099,7 @@ var terragruntRunner = {
11119
11099
  const cwd = resolveRunnerCwd(ctx, "terragrunt");
11120
11100
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
11121
11101
  if (policy && !policy.preferredRunners.includes("terragrunt"))
11122
- return SKIPPED3;
11102
+ return skipped("not-preferred");
11123
11103
  let cmd = null;
11124
11104
  if (await terragrunt.isAvailableAsync(cwd)) {
11125
11105
  cmd = terragrunt.getCommand(cwd);
@@ -11129,7 +11109,7 @@ var terragruntRunner = {
11129
11109
  cmd = managed;
11130
11110
  }
11131
11111
  if (!cmd)
11132
- return SKIPPED3;
11112
+ return toolAbsentSkip(cwd, { id: "terragrunt", checker: terragrunt });
11133
11113
  const absPath = path42.resolve(cwd, ctx.filePath);
11134
11114
  const fileDir = path42.dirname(absPath);
11135
11115
  const result = await safeSpawnAsync(cmd, ["hcl", "validate", "--json", "--non-interactive"], { cwd: fileDir, timeout: 3e4 });
@@ -11196,7 +11176,7 @@ var tflintRunner = {
11196
11176
  const cwd = resolveRunnerCwd(ctx, "tflint");
11197
11177
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
11198
11178
  if (policy && !policy.preferredRunners.includes("tflint")) {
11199
- return { status: "skipped", diagnostics: [], semantic: "none" };
11179
+ return skipped("not-preferred");
11200
11180
  }
11201
11181
  let cmd = null;
11202
11182
  if (await tflint.isAvailableAsync(cwd)) {
@@ -11207,7 +11187,7 @@ var tflintRunner = {
11207
11187
  cmd = managed;
11208
11188
  }
11209
11189
  if (!cmd)
11210
- return { status: "skipped", diagnostics: [], semantic: "none" };
11190
+ return toolAbsentSkip(cwd, { id: "tflint", checker: tflint });
11211
11191
  const absPath = path43.resolve(cwd, ctx.filePath);
11212
11192
  const fileDir = path43.dirname(absPath);
11213
11193
  const args = [
@@ -11250,7 +11230,6 @@ var tflint_default = tflintRunner;
11250
11230
  // dist/clients/dispatch/runners/trivy-config.js
11251
11231
  import * as fs13 from "node:fs";
11252
11232
  import * as path44 from "node:path";
11253
- var trivy2 = createAvailabilityChecker("trivy", ".exe");
11254
11233
  function looksLikeKubernetesManifest(content) {
11255
11234
  for (const doc of content.split(/^---\s*$/m)) {
11256
11235
  if (/^apiVersion:\s*\S/m.test(doc) && /^kind:\s*\S/m.test(doc)) {
@@ -11329,6 +11308,7 @@ var trivyConfigRunner = {
11329
11308
  id: "trivy-config",
11330
11309
  appliesTo: ["docker", "yaml", "terraform", "json"],
11331
11310
  priority: PRIORITY.GENERAL_ANALYSIS,
11311
+ timeoutMs: 6e4,
11332
11312
  skipTestFiles: false,
11333
11313
  async run(ctx) {
11334
11314
  const cwd = resolveRunnerCwd(ctx, "trivy-config");
@@ -11353,16 +11333,9 @@ var trivyConfigRunner = {
11353
11333
  return { status: "skipped", diagnostics: [], semantic: "none" };
11354
11334
  }
11355
11335
  }
11356
- let cmd = null;
11357
- if (await trivy2.isAvailableAsync(cwd)) {
11358
- cmd = trivy2.getCommand(cwd);
11359
- } else {
11360
- const managed = await resolveAvailableOrInstall(trivy2, "trivy", cwd);
11361
- if (managed)
11362
- cmd = managed;
11363
- }
11336
+ const cmd = await resolveToolCommandWithInstallFallback(cwd, "trivy");
11364
11337
  if (!cmd)
11365
- return { status: "skipped", diagnostics: [], semantic: "none" };
11338
+ return toolAbsentSkip(cwd, { id: "trivy" });
11366
11339
  const severities = resolveSeverityFloor(cwd).join(",");
11367
11340
  const result = await safeSpawnAsync(cmd, [
11368
11341
  "config",
@@ -11413,9 +11386,6 @@ var trivy_config_default = trivyConfigRunner;
11413
11386
 
11414
11387
  // dist/clients/dispatch/runners/vale.js
11415
11388
  import * as path45 from "node:path";
11416
- function findValeConfig(cwd) {
11417
- return findLocalToolConfig(cwd, [".vale.ini"]);
11418
- }
11419
11389
  function parseValeOutput(raw, filePath, cwd) {
11420
11390
  const diagnostics = [];
11421
11391
  if (!raw.trim())
@@ -11464,15 +11434,15 @@ var valeRunner = {
11464
11434
  appliesTo: ["markdown"],
11465
11435
  priority: PRIORITY.DOC_QUALITY,
11466
11436
  skipTestFiles: false,
11467
- requiresConfig: (cwd) => findValeConfig(cwd) !== void 0,
11437
+ requiresConfig: (cwd) => hasToolConfig("vale", cwd),
11468
11438
  async run(ctx) {
11469
11439
  const cwd = resolveRunnerCwd(ctx, "vale");
11470
11440
  if (!valeRunner.requiresConfig?.(cwd)) {
11471
- return { status: "skipped", diagnostics: [], semantic: "none" };
11441
+ return skipped("not-configured");
11472
11442
  }
11473
11443
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "vale");
11474
11444
  if (!cmd)
11475
- return { status: "skipped", diagnostics: [], semantic: "none" };
11445
+ return toolAbsentSkip(cwd, { id: "vale" });
11476
11446
  const result = await safeSpawnAsync(cmd, ["--output", "JSON", ctx.filePath], { cwd, timeout: 15e3 });
11477
11447
  const run = parseToolRun("vale", {
11478
11448
  result,
@@ -11818,8 +11788,8 @@ async function extractEntitySnapshot(client, filePath, languageId, contentOverri
11818
11788
  const name = match.captures.NAME?.trim();
11819
11789
  if (!name)
11820
11790
  continue;
11821
- const key2 = `${def.kind}:${name}`;
11822
- snapshot.set(key2, `${match.line}:${match.matchedText.slice(0, 400)}`);
11791
+ const key = `${def.kind}:${name}`;
11792
+ snapshot.set(key, `${match.line}:${match.matchedText.slice(0, 400)}`);
11823
11793
  }
11824
11794
  }
11825
11795
  return snapshot;
@@ -12164,26 +12134,34 @@ var yamllintRunner = {
12164
12134
  const cwd = resolveRunnerCwd2(ctx, "yamllint");
12165
12135
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
12166
12136
  if (policy && !policy.preferredRunners.includes("yamllint")) {
12167
- return { status: "skipped", diagnostics: [], semantic: "none" };
12137
+ return skipped("not-preferred");
12168
12138
  }
12169
- const hasConfig = hasYamllintConfig(cwd);
12139
+ const hasConfig = hasToolConfig("yamllint", cwd);
12170
12140
  if (!hasConfig) {
12171
12141
  logRunnerAdvisoryOnce(ctx, "yamllint", cwd, "yamllint: no config detected, running with default rules");
12172
12142
  }
12173
12143
  const cmd = await resolveToolCommandWithInstallFallback(cwd, "yamllint");
12174
12144
  if (!cmd)
12175
- return { status: "skipped", diagnostics: [], semantic: "none" };
12176
- const result = await safeSpawnAsync(cmd, ["-f", "parsable", ctx.filePath], {
12145
+ return toolAbsentSkip(cwd, { id: "yamllint" });
12146
+ const targetRel = relativeInside(cwd, ctx.filePath) ?? ctx.filePath;
12147
+ const result = await safeSpawnAsync(cmd, ["-f", "parsable", "--", targetRel], {
12177
12148
  cwd,
12178
12149
  timeout: 15e3
12179
12150
  });
12180
12151
  const raw = `${result.stdout ?? ""}${result.stderr ?? ""}`;
12181
- const run = parseToolRun("yamllint", {
12182
- result,
12183
- output: result.stdout,
12184
- // EXIT TABLE (yamllint 1.35 docs https://yamllint.readthedocs.io/en/stable/): 0 clean; 1 findings; 2 error; other nonzero rejected.
12185
- exitCodes: { ran: [1, 2] }
12186
- }, (out) => parseYamllintParsable(out, ctx.filePath, cwd), { parseOutput: raw });
12152
+ const run = parseToolRun(
12153
+ "yamllint",
12154
+ {
12155
+ result,
12156
+ output: result.stdout,
12157
+ // EXIT TABLE (yamllint 1.35 docs https://yamllint.readthedocs.io/en/stable/): 0 clean; 1 findings; 2 error; other nonzero rejected.
12158
+ exitCodes: { ran: [1, 2] }
12159
+ },
12160
+ // ADR 0009: the finding is attributed to the dispatched path; the parser
12161
+ // resolves the tool's project-relative report against the spawn cwd.
12162
+ (out) => parseYamllintParsable(out, ctx.filePath, cwd),
12163
+ { parseOutput: raw }
12164
+ );
12187
12165
  if (run.skipped)
12188
12166
  return run.skipped;
12189
12167
  const diagnostics = run.diagnostics;
@@ -12236,7 +12214,7 @@ var zigCheckRunner = {
12236
12214
  async run(ctx) {
12237
12215
  const cwd = resolveRunnerCwd(ctx, "zig-check");
12238
12216
  if (!await zig.isAvailableAsync(cwd)) {
12239
- return { status: "skipped", diagnostics: [], semantic: "none" };
12217
+ return toolAbsentSkip(cwd, { checker: zig });
12240
12218
  }
12241
12219
  const cmd = zig.getCommand(cwd);
12242
12220
  const absPath = path49.resolve(cwd, ctx.filePath);
@@ -13063,7 +13041,7 @@ function withSpotbugsGroup(kind, groups, ctx) {
13063
13041
  return groups;
13064
13042
  if (!ctx.pi.getFlag("lens-spotbugs"))
13065
13043
  return groups;
13066
- if (!hasJavaBuildDescriptor(ctx.cwd) || !findCompiledClassesDir(ctx.cwd)) {
13044
+ if (!hasToolConfig("javaBuild", ctx.cwd) || !findCompiledClassesDir(ctx.cwd)) {
13067
13045
  return groups;
13068
13046
  }
13069
13047
  if (groups.some((group) => group.runnerIds.includes("spotbugs")))
@@ -13157,17 +13135,17 @@ var MAX_FILES = RUNTIME_CONFIG.pipeline.cascadeMaxFiles;
13157
13135
  var MAX_POLICY_INPUT_PER_FILE = MAX_PER_FILE * 4;
13158
13136
  var reverseDepsIndexCache = /* @__PURE__ */ new Map();
13159
13137
  var REVERSE_DEPS_IDLE_EVICT_MS_DEFAULT = 20 * 6e4;
13160
- function deleteReverseDepsEntry(key2) {
13161
- const entry = reverseDepsIndexCache.get(key2);
13138
+ function deleteReverseDepsEntry(key) {
13139
+ const entry = reverseDepsIndexCache.get(key);
13162
13140
  if (entry?.idleTimer !== void 0)
13163
13141
  clearTimeout(entry.idleTimer);
13164
13142
  if (entry)
13165
13143
  entry.idleTimer = void 0;
13166
- reverseDepsIndexCache.delete(key2);
13144
+ reverseDepsIndexCache.delete(key);
13167
13145
  }
13168
13146
  function clearReverseDepsIndexCache() {
13169
- for (const key2 of reverseDepsIndexCache.keys())
13170
- deleteReverseDepsEntry(key2);
13147
+ for (const key of reverseDepsIndexCache.keys())
13148
+ deleteReverseDepsEntry(key);
13171
13149
  }
13172
13150
  var CASCADE_TRANSITIVE_DEPTH = Math.max(1, Number.parseInt(process.env.PI_LENS_CASCADE_TRANSITIVE_DEPTH ?? "2", 10) || 2);
13173
13151
  var CASCADE_GRAPH_KINDS = /* @__PURE__ */ new Set([
@@ -13266,28 +13244,28 @@ function clearWarmWordIndexTimer(entry) {
13266
13244
  clearTimeout(entry.timer);
13267
13245
  entry.timer = void 0;
13268
13246
  }
13269
- function evictWarmWordIndex(key2, entry, reason) {
13270
- if (entry.leases > 0 || warmWordIndexes.get(key2) !== entry)
13247
+ function evictWarmWordIndex(key, entry, reason) {
13248
+ if (entry.leases > 0 || warmWordIndexes.get(key) !== entry)
13271
13249
  return false;
13272
13250
  clearWarmWordIndexTimer(entry);
13273
- warmWordIndexes.delete(key2);
13251
+ warmWordIndexes.delete(key);
13274
13252
  logWordIndex({
13275
13253
  phase: "warm_cache_evicted",
13276
- cwd: key2,
13254
+ cwd: key,
13277
13255
  trigger: "mcp",
13278
13256
  reason
13279
13257
  });
13280
13258
  return true;
13281
13259
  }
13282
- function scheduleWarmWordIndexIdleEviction(key2, entry) {
13260
+ function scheduleWarmWordIndexIdleEviction(key, entry) {
13283
13261
  clearWarmWordIndexTimer(entry);
13284
13262
  const generation = ++entry.generation;
13285
13263
  const timer = setTimeout(() => {
13286
13264
  entry.timer = void 0;
13287
- if (warmWordIndexes.get(key2) !== entry || entry.generation !== generation)
13265
+ if (warmWordIndexes.get(key) !== entry || entry.generation !== generation)
13288
13266
  return;
13289
- if (!evictWarmWordIndex(key2, entry, "idle"))
13290
- scheduleWarmWordIndexIdleEviction(key2, entry);
13267
+ if (!evictWarmWordIndex(key, entry, "idle"))
13268
+ scheduleWarmWordIndexIdleEviction(key, entry);
13291
13269
  }, idleEvictMs());
13292
13270
  timer.unref?.();
13293
13271
  entry.timer = timer;
@@ -13303,10 +13281,10 @@ function usableWarmWordIndex(index) {
13303
13281
  return index?.forward ? index : void 0;
13304
13282
  }
13305
13283
  function acquireWarmWordIndex(cwd) {
13306
- const key2 = path50.resolve(cwd);
13307
- let entry = warmWordIndexes.get(key2);
13284
+ const key = path50.resolve(cwd);
13285
+ let entry = warmWordIndexes.get(key);
13308
13286
  if (!entry) {
13309
- const snapshot = loadProjectSnapshot(key2);
13287
+ const snapshot = loadProjectSnapshot(key);
13310
13288
  const index = usableWarmWordIndex(deserializeWordIndex(snapshot?.wordIndex) ?? void 0);
13311
13289
  entry = {
13312
13290
  index,
@@ -13315,11 +13293,11 @@ function acquireWarmWordIndex(cwd) {
13315
13293
  lastUsedAt: Date.now(),
13316
13294
  generation: 0
13317
13295
  };
13318
- warmWordIndexes.set(key2, entry);
13296
+ warmWordIndexes.set(key, entry);
13319
13297
  }
13320
13298
  entry.leases++;
13321
13299
  entry.lastUsedAt = Date.now();
13322
- scheduleWarmWordIndexIdleEviction(key2, entry);
13300
+ scheduleWarmWordIndexIdleEviction(key, entry);
13323
13301
  enforceWarmWordIndexLruCap();
13324
13302
  let released = false;
13325
13303
  return {
@@ -13330,8 +13308,8 @@ function acquireWarmWordIndex(cwd) {
13330
13308
  released = true;
13331
13309
  entry.leases = Math.max(0, entry.leases - 1);
13332
13310
  entry.lastUsedAt = Date.now();
13333
- if (warmWordIndexes.get(key2) === entry) {
13334
- scheduleWarmWordIndexIdleEviction(key2, entry);
13311
+ if (warmWordIndexes.get(key) === entry) {
13312
+ scheduleWarmWordIndexIdleEviction(key, entry);
13335
13313
  enforceWarmWordIndexLruCap();
13336
13314
  }
13337
13315
  }
@@ -13341,16 +13319,16 @@ function adoptPublishedWarmWordIndex(cwd, published, trigger) {
13341
13319
  const index = usableWarmWordIndex(published);
13342
13320
  if (!index)
13343
13321
  return;
13344
- const key2 = path50.resolve(cwd);
13345
- const entry = warmWordIndexes.get(key2);
13322
+ const key = path50.resolve(cwd);
13323
+ const entry = warmWordIndexes.get(key);
13346
13324
  if (!entry || entry.index)
13347
13325
  return;
13348
13326
  entry.index = index;
13349
13327
  entry.lastUsedAt = Date.now();
13350
- scheduleWarmWordIndexIdleEviction(key2, entry);
13328
+ scheduleWarmWordIndexIdleEviction(key, entry);
13351
13329
  logWordIndex({
13352
13330
  phase: "warm_cache_adopted",
13353
- cwd: key2,
13331
+ cwd: key,
13354
13332
  trigger,
13355
13333
  indexedFileCount: index.docCount,
13356
13334
  tokens: index.postings.size
@@ -13430,8 +13408,9 @@ async function warmLspForFile(absPath, host) {
13430
13408
  } catch {
13431
13409
  }
13432
13410
  }
13433
- async function analyzeFile(filePath, cwd, options = {}) {
13434
- const absPath = path50.isAbsolute(filePath) ? filePath : path50.resolve(cwd, filePath);
13411
+ async function analyzeFile(filePath, workspaceCwd, options = {}) {
13412
+ const cwd = resolveHostToolPath(".", workspaceCwd);
13413
+ const absPath = resolveHostToolPath(filePath, cwd);
13435
13414
  const host = createMcpHost({ "no-delta": true, ...options.flags }, cwd);
13436
13415
  const observedAt = Date.now();
13437
13416
  const analysisRootMode = resolveAnalysisRoot(absPath, cwd);
@@ -13581,7 +13560,6 @@ export {
13581
13560
  stampLineHashes,
13582
13561
  owedByContentOnly,
13583
13562
  getToolPlan,
13584
- resetObservedRunnerLatency,
13585
13563
  requeueRunnerFindings,
13586
13564
  drainPendingRunnerFindings,
13587
13565
  dropStaleRunnerFindings,