pi-lens 4.4.8 → 4.4.9

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 (163) hide show
  1. package/CHANGELOG-USER.md +31 -0
  2. package/CHANGELOG.md +178 -0
  3. package/README.md +2 -1
  4. package/config/dependency-cruiser-eager-allowlist.json +1 -1
  5. package/dist/{chunk-3O5EII3W.js → chunk-2VZ3VN3N.js} +2 -2
  6. package/dist/{chunk-SDFKOLSF.js → chunk-3HTZDY3C.js} +8 -6
  7. package/dist/{chunk-A5GRLYPZ.js → chunk-3NPWO5UO.js} +7 -13
  8. package/dist/{chunk-AGGUWKRK.js → chunk-47UCC4MM.js} +1 -1
  9. package/dist/chunk-4ENEJHF4.js +198 -0
  10. package/dist/{chunk-WXUDRAG6.js → chunk-5GEYJJHG.js} +10 -12
  11. package/dist/{chunk-HHR7WGCI.js → chunk-5YSEQHJN.js} +3 -3
  12. package/dist/{chunk-L3CLUGDY.js → chunk-6GPB3JLL.js} +3 -3
  13. package/dist/{chunk-5F3XF3SX.js → chunk-7R5GZIA6.js} +6 -6
  14. package/dist/{chunk-CUDD35TW.js → chunk-7UTSNTWM.js} +4 -4
  15. package/dist/{chunk-DYRZGUMA.js → chunk-7YTRG6YW.js} +2 -2
  16. package/dist/{chunk-JZRP4DGP.js → chunk-AACN5GNE.js} +2 -2
  17. package/dist/{chunk-7ANZ7XDD.js → chunk-ACRJ2GZ5.js} +2 -2
  18. package/dist/{chunk-6FIRFP6A.js → chunk-C3YRO3EU.js} +10 -12
  19. package/dist/{chunk-GMROJJRN.js → chunk-CB7PEVOJ.js} +9 -1
  20. package/dist/{chunk-BBET6HD6.js → chunk-CDFJF5YD.js} +1 -1
  21. package/dist/{chunk-NSPVR3FN.js → chunk-CJS6WE66.js} +17 -19
  22. package/dist/{chunk-6YUNI7B5.js → chunk-CM6BDY4E.js} +14 -60
  23. package/dist/{chunk-G5GV2Q7K.js → chunk-CZCAZVTD.js} +16 -2
  24. package/dist/chunk-DGKFWQK4.js +23 -0
  25. package/dist/{chunk-VOP4PJKA.js → chunk-E65WJVI5.js} +7 -9
  26. package/dist/{chunk-TV6RXRYH.js → chunk-EKNYSXFB.js} +8 -10
  27. package/dist/{chunk-4LL2VRNY.js → chunk-EY6LY2HO.js} +16 -18
  28. package/dist/{chunk-MC6VB2E5.js → chunk-F6BEQWAK.js} +17 -5
  29. package/dist/{chunk-R2QQC33W.js → chunk-FGNSESAC.js} +12 -14
  30. package/dist/{chunk-OC7VWJBZ.js → chunk-FRUBVFXV.js} +35 -37
  31. package/dist/{chunk-7CGIDRIK.js → chunk-G22UNQID.js} +14 -16
  32. package/dist/{chunk-L4NEVZ4T.js → chunk-GQTQUNCG.js} +25 -27
  33. package/dist/{chunk-ZKLTNLAW.js → chunk-H3BVMK47.js} +6 -6
  34. package/dist/chunk-H6FLQ5NW.js +28 -0
  35. package/dist/{chunk-2ZE3AUJQ.js → chunk-HEA3EM23.js} +13 -15
  36. package/dist/{chunk-CZL44WFN.js → chunk-HSOBIN22.js} +2 -2
  37. package/dist/{chunk-PKSUMEPT.js → chunk-HYSKJMZK.js} +3 -3
  38. package/dist/{chunk-VN3L2JWZ.js → chunk-IICERRFF.js} +5 -5
  39. package/dist/{chunk-O4N5BQ3T.js → chunk-IILEH3ZC.js} +8 -10
  40. package/dist/{chunk-WC6WRNQT.js → chunk-J3Q2NYJR.js} +2 -2
  41. package/dist/{chunk-SFLHSL5R.js → chunk-JUZ67QZQ.js} +18 -7
  42. package/dist/chunk-KR5VGMVT.js +25 -0
  43. package/dist/{chunk-UHHLR2VY.js → chunk-KV6GQOGN.js} +38 -41
  44. package/dist/{chunk-HUAM7QG3.js → chunk-KXMJLOZF.js} +25 -23
  45. package/dist/{chunk-BUZIQDFS.js → chunk-L4Y3ROKQ.js} +3 -3
  46. package/dist/{chunk-JBP7KESM.js → chunk-L6WBJGQS.js} +1 -1
  47. package/dist/{chunk-35WKJWO5.js → chunk-L7O774U7.js} +14 -14
  48. package/dist/{chunk-BOPDQ7AZ.js → chunk-LAHHGNAY.js} +19 -21
  49. package/dist/{chunk-RGGH6M34.js → chunk-LT62P654.js} +1 -1
  50. package/dist/{chunk-5T5A6YAJ.js → chunk-LWOM6LVS.js} +33 -34
  51. package/dist/{chunk-JYLOYTZD.js → chunk-MKPDIAZH.js} +5 -1
  52. package/dist/{chunk-CM73PPGD.js → chunk-MN635QYA.js} +3 -4
  53. package/dist/{chunk-BQG2QFVO.js → chunk-MQ4PPCJB.js} +21 -29
  54. package/dist/{chunk-HXFUTMX2.js → chunk-MRLH4MYU.js} +2 -2
  55. package/dist/{chunk-XOMGO63G.js → chunk-N56BNAA6.js} +19 -21
  56. package/dist/{chunk-7MAD5ZAY.js → chunk-N5CEGQPG.js} +14 -16
  57. package/dist/{chunk-ZFORSIED.js → chunk-NCLO6E6N.js} +13 -33
  58. package/dist/{chunk-SQC7K3SP.js → chunk-NL5LSKVD.js} +2 -2
  59. package/dist/{chunk-I22THIHI.js → chunk-NMUSOZ2D.js} +10 -12
  60. package/dist/{chunk-4NBWFYWW.js → chunk-NOWH2VA2.js} +8 -33
  61. package/dist/{chunk-NM2NWH55.js → chunk-NUSXS6YB.js} +6 -5
  62. package/dist/{chunk-OZWXLJMX.js → chunk-OSEKJEUU.js} +2 -2
  63. package/dist/{chunk-2BKUFQKR.js → chunk-OUYAUXAT.js} +405 -181
  64. package/dist/{chunk-JPRDTY5S.js → chunk-PBZNYHMM.js} +8 -10
  65. package/dist/{chunk-JE6HKLC7.js → chunk-PIIUNJIT.js} +2 -4
  66. package/dist/{chunk-ZZDIOAAJ.js → chunk-PRHYIA6X.js} +6 -6
  67. package/dist/{chunk-4W52ZKZX.js → chunk-PXQ45SGD.js} +2 -2
  68. package/dist/chunk-Q6JQKWPK.js +25 -0
  69. package/dist/{chunk-PIQQM32Y.js → chunk-QB7T2PHK.js} +2 -2
  70. package/dist/{chunk-HKIL6DCL.js → chunk-QGITU23N.js} +1 -1
  71. package/dist/chunk-QJJKOHLH.js +57 -0
  72. package/dist/{chunk-6LJOJ6EO.js → chunk-QP33NKYC.js} +14 -16
  73. package/dist/{chunk-DIWK3LBC.js → chunk-QVBOXT3L.js} +8 -10
  74. package/dist/{chunk-IYVYZQRL.js → chunk-RNJFRXEN.js} +5 -7
  75. package/dist/{chunk-G6JKM4O7.js → chunk-RNXOWDM6.js} +10 -10
  76. package/dist/{chunk-5RNB4HVK.js → chunk-RTFMDIKV.js} +1 -1
  77. package/dist/{chunk-XWIME22V.js → chunk-SIQHOB6P.js} +11 -13
  78. package/dist/{chunk-T2S3FNNJ.js → chunk-SLSMJPEF.js} +41 -42
  79. package/dist/chunk-T5QSLSMM.js +50 -0
  80. package/dist/chunk-TGQDAG4B.js +88 -0
  81. package/dist/{chunk-6GMGEKQN.js → chunk-THYHUIDR.js} +39 -12
  82. package/dist/{chunk-WMDUT4KH.js → chunk-TMNUTMT5.js} +72 -89
  83. package/dist/{chunk-7TNILKGY.js → chunk-TOE2RRCS.js} +1 -1
  84. package/dist/chunk-TYHPVE5H.js +25 -0
  85. package/dist/chunk-UAKO2M6B.js +73 -0
  86. package/dist/chunk-UC5AXW5Z.js +20 -0
  87. package/dist/chunk-UTJP6WOS.js +28 -0
  88. package/dist/{chunk-FRLAUP2B.js → chunk-UXTQ3QPD.js} +4 -4
  89. package/dist/{chunk-4QG55RRC.js → chunk-V2WDBOLZ.js} +10 -12
  90. package/dist/{chunk-FHEV6T4L.js → chunk-V67D6TMU.js} +8 -10
  91. package/dist/{chunk-VLQ7UKZH.js → chunk-VCRVNLE7.js} +135 -2
  92. package/dist/{chunk-KZ4ALBCH.js → chunk-VO4JFPTV.js} +2 -2
  93. package/dist/{chunk-GIRBSBGL.js → chunk-VWLSU3XV.js} +3 -3
  94. package/dist/{chunk-2453RRJ2.js → chunk-W5E72HJA.js} +59 -22
  95. package/dist/{chunk-VPLBLWFO.js → chunk-W7TY6HYX.js} +1 -1
  96. package/dist/{chunk-SP4TFY5F.js → chunk-WSSLVMDA.js} +11 -13
  97. package/dist/{chunk-PPKECBPP.js → chunk-WTB4GKMH.js} +10 -1
  98. package/dist/{chunk-X35S7HSB.js → chunk-X5BJ3G2P.js} +41 -30
  99. package/dist/{chunk-X66YJ2SS.js → chunk-XKFO2SZV.js} +33 -34
  100. package/dist/{chunk-OWTG6UMO.js → chunk-XLAI7UYY.js} +75 -22
  101. package/dist/{chunk-4B2YFN4U.js → chunk-XO756WE5.js} +45 -33
  102. package/dist/{chunk-VOXTCULR.js → chunk-XVB3Q2PG.js} +2 -4
  103. package/dist/{chunk-XYLC35E4.js → chunk-YOXCCJDF.js} +517 -308
  104. package/dist/{chunk-O2ARHQKF.js → chunk-ZCQBNPRH.js} +2 -2
  105. package/dist/chunk-ZD4KVFXI.js +234 -0
  106. package/dist/{chunk-LSFXZLPW.js → chunk-ZDMFGACN.js} +184 -235
  107. package/dist/{chunk-4BKU7PV3.js → chunk-ZMMHHXSW.js} +1 -1
  108. package/dist/{chunk-OY7WZI7Q.js → chunk-ZPM7ZIFL.js} +6 -6
  109. package/dist/{chunk-R4QWJQ2H.js → chunk-ZVCDHYWZ.js} +9 -11
  110. package/dist/{chunk-RZG472YW.js → chunk-ZZN74OGD.js} +83 -46
  111. package/dist/{chunk-BHWW6FAX.js → chunk-ZZSJAR76.js} +37 -19
  112. package/dist/index.js +4910 -4218
  113. package/dist/mcp/analyze-cli.js +12 -17
  114. package/dist/mcp/cli.js +41 -42
  115. package/dist/mcp/server.js +1451 -648
  116. package/dist/mcp/worker.js +59 -60
  117. package/dist/probes/installer.js +17 -19
  118. package/docs/agent-tools.md +40 -8
  119. package/docs/analysisall.md +1 -1
  120. package/docs/ci-bot-pr-checks.md +7 -5
  121. package/docs/configuration.md +51 -9
  122. package/docs/defect-shapes.md +52 -3
  123. package/docs/environment-variables.md +18 -1
  124. package/docs/features.md +12 -5
  125. package/docs/globalconfig.md +11 -3
  126. package/docs/invariants/lsp-trust-exec.md +9 -2
  127. package/docs/invariants/session-telemetry.md +2 -2
  128. package/docs/language-coverage.md +1 -0
  129. package/docs/lsp-capability-matrix.md +57 -35
  130. package/docs/lsp-idle-eviction.md +4 -1
  131. package/docs/merge-queue-rollout.md +10 -8
  132. package/docs/module-report-read-symbol.md +34 -23
  133. package/docs/pi-lens-fixer.md +11 -1
  134. package/docs/pi-lens-investigator.md +3 -0
  135. package/docs/pi-lens-merge-policy.md +15 -7
  136. package/docs/pi-lens-reviewer.md +1 -1
  137. package/docs/pi-lens-subagent.md +13 -0
  138. package/docs/public-api-stability.md +39 -5
  139. package/docs/release-qa-baseline.md +7 -4
  140. package/docs/schema/pi-lens-config-v1.json +11 -2
  141. package/docs/servercapabilities.md +3 -1
  142. package/docs/settings.md +2 -2
  143. package/docs/word-index.md +3 -2
  144. package/package.json +8 -3
  145. package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
  146. package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
  147. package/scripts/download-grammars.js +3 -2
  148. package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
  149. package/dist/chunk-2TS4GLOJ.js +0 -31
  150. package/dist/chunk-3JAHQBSY.js +0 -27
  151. package/dist/chunk-447YZL4S.js +0 -25
  152. package/dist/chunk-565VRUP4.js +0 -136
  153. package/dist/chunk-57X2CDRX.js +0 -49
  154. package/dist/chunk-GGYOZWHW.js +0 -27
  155. package/dist/chunk-IE5D3RA5.js +0 -58
  156. package/dist/chunk-LPYTPNOJ.js +0 -22
  157. package/dist/chunk-OFNMHPBT.js +0 -89
  158. package/dist/chunk-U3AS2FR6.js +0 -106
  159. package/dist/chunk-W3BGKBBK.js +0 -27
  160. package/dist/chunk-WQV6BI4Q.js +0 -48
  161. package/dist/chunk-YHGYAEFH.js +0 -443
  162. package/dist/chunk-ZONZ6YY3.js +0 -74
  163. package/dist/chunk-ZSM35JF4.js +0 -30
@@ -2,41 +2,44 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
2
2
  import {
3
3
  getLazyInstallAttempt,
4
4
  tryLazyInstall
5
- } from "./chunk-MC6VB2E5.js";
5
+ } from "./chunk-F6BEQWAK.js";
6
6
  import {
7
7
  computeImpactCascade
8
- } from "./chunk-PKSUMEPT.js";
8
+ } from "./chunk-HYSKJMZK.js";
9
9
  import {
10
10
  goClient
11
- } from "./chunk-3O5EII3W.js";
11
+ } from "./chunk-2VZ3VN3N.js";
12
12
  import {
13
13
  isTrivyEnabled,
14
14
  resolveSeverityFloor
15
- } from "./chunk-ZKLTNLAW.js";
16
- import {
17
- scannerReportParentDir
18
- } from "./chunk-RGGH6M34.js";
15
+ } from "./chunk-H3BVMK47.js";
19
16
  import {
17
+ IN_FLIGHT_REASON,
18
+ NO_ANALYZER_REASON,
19
+ checkedVerdict,
20
+ emptyDispatchResult,
20
21
  faultIfCutShort,
21
22
  faultResult,
22
23
  faultSkip,
23
24
  findingsResult,
24
25
  finishParsedRun,
25
26
  formatToolFailure,
26
- hasUsableResult,
27
27
  isNotApplicableSkipReason,
28
28
  isRunnerClaimSource,
29
29
  isRunnerSkipReason,
30
+ noPrimaryCheckerReason,
30
31
  parseToolRun,
31
32
  processCutShort,
32
33
  reachedNoVerdict,
33
34
  skipUnlessToolRan,
34
35
  spanOverlapsModifiedRanges,
35
- spawnFailedWithNoOutput
36
- } from "./chunk-RZG472YW.js";
36
+ spawnFailedWithNoOutput,
37
+ unchecked,
38
+ widgetUncheckedReason
39
+ } from "./chunk-ZZN74OGD.js";
37
40
  import {
38
41
  rustClient
39
- } from "./chunk-4W52ZKZX.js";
42
+ } from "./chunk-PXQ45SGD.js";
40
43
  import {
41
44
  coveringLaneAvailable,
42
45
  createAvailabilityChecker,
@@ -52,7 +55,7 @@ import {
52
55
  resolveToolCommand,
53
56
  resolveToolCommandWithInstallFallback,
54
57
  resolveVendorToolCommand
55
- } from "./chunk-ZFORSIED.js";
58
+ } from "./chunk-NCLO6E6N.js";
56
59
  import {
57
60
  biomeConfigArgs,
58
61
  findCompiledClassesDir,
@@ -71,21 +74,21 @@ import {
71
74
  hasYamllintConfig,
72
75
  markdownlintConfigArgs,
73
76
  ruffConfigArgs
74
- } from "./chunk-5F3XF3SX.js";
77
+ } from "./chunk-7R5GZIA6.js";
75
78
  import {
76
79
  importFactProvider
77
- } from "./chunk-FRLAUP2B.js";
80
+ } from "./chunk-UXTQ3QPD.js";
78
81
  import {
79
82
  functionFactProvider
80
- } from "./chunk-6YUNI7B5.js";
83
+ } from "./chunk-CM6BDY4E.js";
81
84
  import {
82
85
  extractFactsFromTree
83
- } from "./chunk-7TNILKGY.js";
86
+ } from "./chunk-TOE2RRCS.js";
84
87
  import {
85
88
  buildOrUpdateGraph,
86
89
  clearReviewGraphWorkspaceCache,
87
90
  fileContentProvider
88
- } from "./chunk-4B2YFN4U.js";
91
+ } from "./chunk-XO756WE5.js";
89
92
  import {
90
93
  MAX_BLOCKING_RULE_COMPLEXITY,
91
94
  PRIMARY_UNAVAILABLE_CAUSE,
@@ -121,11 +124,11 @@ import {
121
124
  tryWarmAttachedCodeActions,
122
125
  tryWarmAttachedDiagnostics,
123
126
  warmAnswerBinding
124
- } from "./chunk-2BKUFQKR.js";
127
+ } from "./chunk-OUYAUXAT.js";
125
128
  import {
126
129
  ANY_POSITION,
127
130
  retainRecordedFindings
128
- } from "./chunk-GIRBSBGL.js";
131
+ } from "./chunk-VWLSU3XV.js";
129
132
  import {
130
133
  mapWithConcurrency
131
134
  } from "./chunk-XIMYZ3JA.js";
@@ -135,11 +138,13 @@ import {
135
138
  disabledPrimaries,
136
139
  getAstGrepRuleSources,
137
140
  isKnownRunnerId,
141
+ isShellcheckDialectSupported,
138
142
  registerRunnerId,
139
143
  resolveAnalysisRoot,
140
144
  resolveSessionConfigRoot,
145
+ resolveShellFileDialect,
141
146
  runnerIdentityPopulated
142
- } from "./chunk-XYLC35E4.js";
147
+ } from "./chunk-YOXCCJDF.js";
143
148
  import {
144
149
  augmentPythonEnvironment,
145
150
  describePythonCompileWithheld,
@@ -148,22 +153,25 @@ import {
148
153
  emitBounded,
149
154
  partitionOutrankedPythonCompileVerdicts,
150
155
  recordPythonCompileVerdictDrop
151
- } from "./chunk-FHEV6T4L.js";
156
+ } from "./chunk-V67D6TMU.js";
157
+ import {
158
+ scannerReportParentDir
159
+ } from "./chunk-LT62P654.js";
152
160
  import {
153
161
  loadProjectSnapshot,
154
162
  readJsonCache,
155
163
  readJsonCacheAsync
156
- } from "./chunk-ZZDIOAAJ.js";
164
+ } from "./chunk-PRHYIA6X.js";
157
165
  import {
158
166
  RUNTIME_CONFIG,
159
167
  exceedsLspSyncLimits,
160
168
  getRunnerTimeoutFloorMs,
161
169
  loadAstGrepNapi
162
- } from "./chunk-35WKJWO5.js";
170
+ } from "./chunk-L7O774U7.js";
163
171
  import {
164
172
  buildModuleGraph,
165
173
  clearModuleGraphCache
166
- } from "./chunk-CUDD35TW.js";
174
+ } from "./chunk-7UTSNTWM.js";
167
175
  import {
168
176
  BUNDLED_QUERIES_ROOT,
169
177
  classifyTreeSitterWasmError,
@@ -183,10 +191,10 @@ import {
183
191
  ruleFilesForLanguage,
184
192
  ruleSourceLanguages,
185
193
  walk
186
- } from "./chunk-BHWW6FAX.js";
194
+ } from "./chunk-ZZSJAR76.js";
187
195
  import {
188
196
  resolvePackagePath
189
- } from "./chunk-HKIL6DCL.js";
197
+ } from "./chunk-QGITU23N.js";
190
198
  import {
191
199
  stripAnsi
192
200
  } from "./chunk-6HWVI6MI.js";
@@ -198,33 +206,36 @@ import {
198
206
  scheduleWordIndexPersist,
199
207
  setWordIndexPublishedListener,
200
208
  updateWordIndexDocumentForEdit
201
- } from "./chunk-HUAM7QG3.js";
209
+ } from "./chunk-KXMJLOZF.js";
202
210
  import {
203
211
  WARM_CODE_ACTION_LOOKUP_LIMIT,
204
212
  contentHash
205
- } from "./chunk-CZL44WFN.js";
213
+ } from "./chunk-HSOBIN22.js";
206
214
  import {
207
215
  resolveRunnerPath,
208
216
  toRunnerDisplayPath
209
- } from "./chunk-VPLBLWFO.js";
217
+ } from "./chunk-W7TY6HYX.js";
218
+ import {
219
+ withBudget
220
+ } from "./chunk-MKPDIAZH.js";
210
221
  import {
211
222
  findCommandOnPath,
212
223
  isSpawnableCommand
213
- } from "./chunk-BQG2QFVO.js";
224
+ } from "./chunk-MQ4PPCJB.js";
214
225
  import {
215
226
  logRunnerAdvisoryOnce,
216
227
  resolveRunnerCwd,
217
228
  resolveRunnerCwdWithReason
218
- } from "./chunk-IYVYZQRL.js";
229
+ } from "./chunk-RNJFRXEN.js";
219
230
  import {
220
231
  findLocalBinUpwards,
221
232
  localBinPath
222
- } from "./chunk-VOP4PJKA.js";
233
+ } from "./chunk-E65WJVI5.js";
223
234
  import {
224
235
  createAvailabilityProbeFlight,
225
236
  getIsolatedNpxSpawnOptions,
226
237
  probeToolAsync
227
- } from "./chunk-JBP7KESM.js";
238
+ } from "./chunk-L6WBJGQS.js";
228
239
  import {
229
240
  classifyProbeFailure,
230
241
  createAvailabilityLatch,
@@ -234,12 +245,12 @@ import {
234
245
  logAvailabilityDecision,
235
246
  startHostStallSampler,
236
247
  transientRetryDelayMs
237
- } from "./chunk-JZRP4DGP.js";
248
+ } from "./chunk-AACN5GNE.js";
238
249
  import {
239
250
  getLspCapableKinds,
240
251
  getPrimaryDispatchGroup,
241
252
  resolveLanguageRootForFile
242
- } from "./chunk-SDFKOLSF.js";
253
+ } from "./chunk-3HTZDY3C.js";
243
254
  import {
244
255
  getGlobalPiLensDir,
245
256
  getProjectDataDir,
@@ -248,14 +259,16 @@ import {
248
259
  isTestFile,
249
260
  loadPiLensGlobalConfig,
250
261
  noteSpawnTimeout,
262
+ realIsPidAlive,
251
263
  resolvePiLensFlag,
252
264
  safeSpawnAsync
253
- } from "./chunk-WMDUT4KH.js";
265
+ } from "./chunk-TMNUTMT5.js";
254
266
  import {
255
267
  DOTNET_CSHARP_PROJECT_MARKERS,
256
268
  DOTNET_CSHARP_SOLUTION_MARKERS,
257
- detectFileKind
258
- } from "./chunk-G5GV2Q7K.js";
269
+ detectFileKind,
270
+ isJstsFactFile
271
+ } from "./chunk-CZCAZVTD.js";
259
272
  import {
260
273
  PathKeyedMap,
261
274
  boundedKeyLabel,
@@ -267,42 +280,38 @@ import {
267
280
  reportPiLensConfigRecords,
268
281
  resolveOnePiLensConfigDocument,
269
282
  resolvePiLensConfig
270
- } from "./chunk-X35S7HSB.js";
283
+ } from "./chunk-X5BJ3G2P.js";
271
284
  import {
272
285
  findNearestDirWithAnyBasename,
273
286
  findNearestDirWithMarker,
274
287
  getPiLensGlobalConfigPath
275
- } from "./chunk-SQC7K3SP.js";
288
+ } from "./chunk-NL5LSKVD.js";
276
289
  import {
277
290
  getProjectTrustState,
278
291
  killedForOutputCap,
279
292
  projectTrustDenialReason,
280
293
  truncatedByOutputCap,
281
294
  writeFileAtomic
282
- } from "./chunk-JE6HKLC7.js";
295
+ } from "./chunk-PIIUNJIT.js";
283
296
  import {
297
+ createSubsystemLogger,
284
298
  incrementDegradationCount,
299
+ logExtension,
285
300
  recordDegradationOnce
286
- } from "./chunk-2453RRJ2.js";
287
- import {
288
- createSubsystemLogger,
289
- logExtension
290
- } from "./chunk-WQV6BI4Q.js";
291
- import {
292
- logLatency,
293
- phaseFinished,
294
- phaseStarted
295
- } from "./chunk-565VRUP4.js";
301
+ } from "./chunk-W5E72HJA.js";
296
302
  import {
297
303
  createNdjsonLogger,
298
304
  getGlobalPiLensLogDir,
299
305
  getMaxLogSizeMB,
300
- isTestMode
301
- } from "./chunk-VLQ7UKZH.js";
306
+ isTestMode,
307
+ logLatency,
308
+ phaseFinished,
309
+ phaseStarted
310
+ } from "./chunk-VCRVNLE7.js";
302
311
  import {
303
312
  FactStore,
304
313
  setFactStoreEvictionReporter
305
- } from "./chunk-4BKU7PV3.js";
314
+ } from "./chunk-ZMMHHXSW.js";
306
315
  import {
307
316
  BoundedFifoMap,
308
317
  BoundedLruCache,
@@ -321,10 +330,10 @@ import {
321
330
  relativeInside,
322
331
  toPosix,
323
332
  toProjectRelativePath
324
- } from "./chunk-GMROJJRN.js";
333
+ } from "./chunk-CB7PEVOJ.js";
325
334
 
326
335
  // dist/clients/mcp/analyze.js
327
- import * as fs19 from "node:fs";
336
+ import * as fs18 from "node:fs";
328
337
  import * as path50 from "node:path";
329
338
 
330
339
  // dist/clients/cache-manager.js
@@ -755,12 +764,7 @@ var CacheManager = class {
755
764
  }
756
765
  isTurnStateOwnerStale(owner) {
757
766
  if (owner.pid > 0 && owner.pid !== process.pid) {
758
- try {
759
- process.kill(owner.pid, 0);
760
- return false;
761
- } catch {
762
- return true;
763
- }
767
+ return !realIsPidAlive(owner.pid);
764
768
  }
765
769
  const lastSeen = Date.parse(owner.lastSeen);
766
770
  return !Number.isFinite(lastSeen) || Date.now() - lastSeen > TURN_OWNER_STALE_MS;
@@ -1327,21 +1331,26 @@ function keptByRulePolicy(d, policyMap, options) {
1327
1331
  function rulePolicyMapFromConfig(rules2) {
1328
1332
  if (!rules2)
1329
1333
  return void 0;
1334
+ const members = (list) => Array.isArray(list) ? list.flatMap((member) => {
1335
+ const trimmed = typeof member === "string" ? member.trim() : "";
1336
+ return trimmed.length > 0 ? [trimmed] : [];
1337
+ }) : [];
1330
1338
  let built;
1331
1339
  for (const [key2, rawEntry] of Object.entries(rules2)) {
1332
1340
  if (!rawEntry || typeof rawEntry !== "object" || Array.isArray(rawEntry)) {
1333
1341
  continue;
1334
1342
  }
1335
1343
  const entry = rawEntry;
1336
- const hasDisable = (entry.disable?.length ?? 0) > 0;
1337
- const hasSelect = (entry.select?.length ?? 0) > 0;
1344
+ const disable = members(entry.disable);
1345
+ const select = members(entry.select);
1338
1346
  const hasIgnorePaths = (entry.ignorePaths?.length ?? 0) > 0;
1339
- if (!hasDisable && !hasSelect && !hasIgnorePaths)
1347
+ if (disable.length === 0 && select.length === 0 && !hasIgnorePaths) {
1340
1348
  continue;
1349
+ }
1341
1350
  built ??= {};
1342
1351
  built[key2] = {
1343
- ...hasDisable ? { disable: entry.disable } : {},
1344
- ...hasSelect ? { select: entry.select } : {},
1352
+ ...disable.length > 0 ? { disable } : {},
1353
+ ...select.length > 0 ? { select } : {},
1345
1354
  ...hasIgnorePaths ? { ignorePaths: entry.ignorePaths } : {}
1346
1355
  };
1347
1356
  }
@@ -1850,6 +1859,13 @@ var LANGUAGE_CAPABILITY_MATRIX = {
1850
1859
  capabilities: ["types", "lint"],
1851
1860
  writeGroups: [primary("haskell")]
1852
1861
  },
1862
+ groovy: {
1863
+ name: "Groovy Diagnostics",
1864
+ // groovy-language-server publishes syntax and unresolved-class errors,
1865
+ // never type errors (#5235), so the row does not claim "types".
1866
+ capabilities: ["lint"],
1867
+ writeGroups: [primary("groovy")]
1868
+ },
1853
1869
  elixir: {
1854
1870
  name: "Elixir Linting",
1855
1871
  capabilities: ["types", "lint"],
@@ -2640,14 +2656,19 @@ function promoteDeltaUnusedToBlockers(diagnostics) {
2640
2656
  }
2641
2657
  function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2642
2658
  if (!ctx.kind)
2643
- return {};
2659
+ return { verdict: unchecked(NO_ANALYZER_REASON, { inapplicable: true }) };
2644
2660
  const lspEnabled = !ctx.pi.getFlag("no-lsp");
2645
2661
  const primary2 = getPrimaryDispatchGroup(ctx.kind, lspEnabled);
2646
2662
  if (!primary2 || primary2.runnerIds.length === 0)
2647
- return { coverage: "unconfigured" };
2663
+ return {
2664
+ verdict: unchecked(noPrimaryCheckerReason(lspEnabled)),
2665
+ coverage: "unconfigured"
2666
+ };
2648
2667
  const relevant = runnerLatencies.filter((r) => primary2.runnerIds.includes(r.runnerId));
2649
2668
  if (relevant.length === 0)
2650
- return {};
2669
+ return {
2670
+ verdict: unchecked("no primary runner ran for this file")
2671
+ };
2651
2672
  const unconfirmedServerIds = [
2652
2673
  ...new Set(relevant.flatMap((r) => r.unconfirmedServerIds ?? []))
2653
2674
  ];
@@ -2667,10 +2688,10 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2667
2688
  statusParts.push(`${markerFor(deferredServerIds)} deferred`);
2668
2689
  if (silentServerIds.length > 0)
2669
2690
  statusParts.push(`${markerFor(silentServerIds)} silent`);
2670
- const unconfirmedStatus2 = `${statusParts.join(", ")} (diagnostics are incomplete)`;
2691
+ const verdict2 = unchecked(`${statusParts.join(", ")} (diagnostics are incomplete)`);
2671
2692
  if (dedupe) {
2672
2693
  if (coverageNoticeSeen.has(onceKey2))
2673
- return { unconfirmedStatus: unconfirmedStatus2 };
2694
+ return { verdict: verdict2 };
2674
2695
  coverageNoticeSeen.add(onceKey2);
2675
2696
  }
2676
2697
  const coverageParts = [];
@@ -2689,21 +2710,23 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2689
2710
  semantic: "warning",
2690
2711
  tool: "pi-lens"
2691
2712
  },
2692
- unconfirmedStatus: unconfirmedStatus2
2713
+ verdict: verdict2
2693
2714
  };
2694
2715
  }
2695
- const primaryHasCoverage = relevant.some(hasUsableResult);
2696
- if (primaryHasCoverage) {
2716
+ const primaryChecked = checkedVerdict("primary", relevant);
2717
+ if (primaryChecked)
2718
+ return { verdict: primaryChecked, coverage: "primary" };
2719
+ const primaryStillInFlight = relevant.some((r) => r.status === "pending" || r.status === "deferred");
2720
+ if (primaryStillInFlight) {
2721
+ const inFlightKey = `in-flight:${ctx.kind}:${ctx.filePath}`;
2722
+ const repeat = dedupe && coverageNoticeSeen.has(inFlightKey);
2723
+ if (dedupe)
2724
+ coverageNoticeSeen.add(inFlightKey);
2697
2725
  return {
2698
- coverage: "primary",
2699
- ...relevant.some((r) => r.runnerId === "lsp" && hasUsableResult(r)) && {
2700
- primaryLspChecked: true
2701
- }
2726
+ verdict: unchecked(IN_FLIGHT_REASON, repeat ? { repeat: true } : {}),
2727
+ coverage: "in_flight"
2702
2728
  };
2703
2729
  }
2704
- const primaryStillInFlight = relevant.some((r) => r.status === "pending" || r.status === "deferred");
2705
- if (primaryStillInFlight)
2706
- return { coverage: "in_flight" };
2707
2730
  const plan = getToolPlan(ctx.kind);
2708
2731
  const fallbackRunnerIds = new Set((plan?.groups ?? []).filter((group) => !group.runnerIds.every((runnerId) => primary2.runnerIds.includes(runnerId))).flatMap((group) => group.runnerIds).filter((runnerId) => !primary2.runnerIds.includes(runnerId)));
2709
2732
  const STRUCTURAL_RUNNERS = /* @__PURE__ */ new Set([
@@ -2714,14 +2737,18 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2714
2737
  "opengrep"
2715
2738
  ]);
2716
2739
  const TYPE_CAPABLE_FALLBACK_RUNNERS = /* @__PURE__ */ new Set(["mypy"]);
2717
- const anyFallbackHasCoverage = runnerLatencies.some((r) => fallbackRunnerIds.has(r.runnerId) && !STRUCTURAL_RUNNERS.has(r.runnerId) && hasUsableResult(r) && (!plan?.capabilities.includes("types") || TYPE_CAPABLE_FALLBACK_RUNNERS.has(r.runnerId)));
2718
- if (anyFallbackHasCoverage)
2719
- return { coverage: "fallback" };
2740
+ const fallbackChecked = checkedVerdict("fallback", runnerLatencies.filter((r) => fallbackRunnerIds.has(r.runnerId) && !STRUCTURAL_RUNNERS.has(r.runnerId) && (!plan?.capabilities.includes("types") || TYPE_CAPABLE_FALLBACK_RUNNERS.has(r.runnerId))));
2741
+ if (fallbackChecked)
2742
+ return { verdict: fallbackChecked, coverage: "fallback" };
2743
+ if (relevant.every((r) => r.runnerId === "lsp" && r.skipReason === "no-files-matched"))
2744
+ return {
2745
+ verdict: unchecked("not analyzed (no language server handles this file)")
2746
+ };
2720
2747
  const cause = combinePrimaryUnavailableCauses(relevant.flatMap((r) => r.primaryUnavailableCause ?? []));
2721
2748
  const deniedRunnerIds = relevant.filter((r) => r.skipReason === DISABLED_BY_CONFIG_SKIP_REASON).map((r) => r.runnerId);
2722
2749
  const deniedNote = `${deniedRunnerIds.join(", ")} disabled in config by dispatch.disabledRunners`;
2723
2750
  const onlySwitchedOff = relevant.every((r) => r.skipReason === DISABLED_BY_CONFIG_SKIP_REASON || isNotApplicableSkipReason(r.skipReason) || r.primaryUnavailableCause === "disabled" || r.primaryUnavailableCause === "disabledFallback");
2724
- const unconfirmedStatus = 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)";
2751
+ const verdict = unchecked(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)");
2725
2752
  if (onlySwitchedOff && (cause === "disabled" || cause === "disabledFallback" || cause === void 0 && deniedRunnerIds.length > 0)) {
2726
2753
  const disabledIds = [
2727
2754
  ...new Set(relevant.flatMap((r) => r.disabledPrimaryServerIds ?? []))
@@ -2732,7 +2759,7 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2732
2759
  ];
2733
2760
  if (dedupe) {
2734
2761
  if (onceKeys.every((key2) => coverageNoticeSeen.has(key2)))
2735
- return { unconfirmedStatus };
2762
+ return { verdict };
2736
2763
  for (const key2 of onceKeys)
2737
2764
  coverageNoticeSeen.add(key2);
2738
2765
  }
@@ -2745,13 +2772,13 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2745
2772
  semantic: "warning",
2746
2773
  tool: "pi-lens"
2747
2774
  },
2748
- unconfirmedStatus
2775
+ verdict
2749
2776
  };
2750
2777
  }
2751
2778
  const onceKey = `${ctx.kind}:${ctx.filePath}`;
2752
2779
  if (dedupe) {
2753
2780
  if (coverageNoticeSeen.has(onceKey))
2754
- return { unconfirmedStatus };
2781
+ return { verdict };
2755
2782
  coverageNoticeSeen.add(onceKey);
2756
2783
  }
2757
2784
  return {
@@ -2763,7 +2790,7 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
2763
2790
  semantic: "warning",
2764
2791
  tool: "pi-lens"
2765
2792
  },
2766
- unconfirmedStatus
2793
+ verdict
2767
2794
  };
2768
2795
  }
2769
2796
  var latencyReports = [];
@@ -3058,6 +3085,7 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3058
3085
  ...result.failureKind !== void 0 && {
3059
3086
  failureKind: result.failureKind
3060
3087
  },
3088
+ ...result.inconclusive === true && { inconclusive: true },
3061
3089
  ...skipReason !== void 0 && {
3062
3090
  skipReason
3063
3091
  },
@@ -3141,8 +3169,31 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
3141
3169
  coveredRunners
3142
3170
  };
3143
3171
  }
3172
+ function skipGeneratedFile(ctx) {
3173
+ if (ctx.fileRole !== "generated")
3174
+ return void 0;
3175
+ const evidence = ctx.generatedEvidence;
3176
+ const lineShapeMean = ctx.generatedLineShapeMean;
3177
+ if (!generatedSkipRecorded.has(ctx.filePath)) {
3178
+ generatedSkipRecorded.add(ctx.filePath);
3179
+ logLatency({
3180
+ type: "phase",
3181
+ filePath: ctx.filePath,
3182
+ phase: "dispatch_skipped_generated",
3183
+ durationMs: 0,
3184
+ metadata: {
3185
+ evidence: evidence ?? "unknown",
3186
+ ...lineShapeMean !== void 0 && { lineShapeMean }
3187
+ }
3188
+ });
3189
+ }
3190
+ return emptyDispatchResult(unchecked("generated file (not analyzed)", { inapplicable: true }));
3191
+ }
3144
3192
  async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3145
3193
  const _overallStart = Date.now();
3194
+ const generated = skipGeneratedFile(ctx);
3195
+ if (generated)
3196
+ return generated;
3146
3197
  if (ctx.analysisRootMode === "adopted") {
3147
3198
  const planned = groups.flatMap((g) => g.runnerIds);
3148
3199
  groups = filterGroupsForAdoptedRoot(groups);
@@ -3160,47 +3211,9 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3160
3211
  }
3161
3212
  });
3162
3213
  if (groups.length === 0) {
3163
- return {
3164
- diagnostics: [],
3165
- blockers: [],
3166
- warnings: [],
3167
- baselineWarningCount: 0,
3168
- fixed: [],
3169
- resolvedCount: 0,
3170
- output: "",
3171
- blockerOutput: "",
3172
- hasBlockers: false
3173
- };
3214
+ return emptyDispatchResult(unchecked(planned.length > 0 ? "not analyzed (adopted analysis root: no runner is admitted for it)" : "no runner is planned for this file"));
3174
3215
  }
3175
3216
  }
3176
- if (ctx.fileRole === "generated") {
3177
- const evidence = ctx.generatedEvidence;
3178
- const lineShapeMean = ctx.generatedLineShapeMean;
3179
- if (!generatedSkipRecorded.has(ctx.filePath)) {
3180
- generatedSkipRecorded.add(ctx.filePath);
3181
- logLatency({
3182
- type: "phase",
3183
- filePath: ctx.filePath,
3184
- phase: "dispatch_skipped_generated",
3185
- durationMs: 0,
3186
- metadata: {
3187
- evidence: evidence ?? "unknown",
3188
- ...lineShapeMean !== void 0 && { lineShapeMean }
3189
- }
3190
- });
3191
- }
3192
- return {
3193
- diagnostics: [],
3194
- blockers: [],
3195
- warnings: [],
3196
- baselineWarningCount: 0,
3197
- fixed: [],
3198
- resolvedCount: 0,
3199
- output: "",
3200
- blockerOutput: "",
3201
- hasBlockers: false
3202
- };
3203
- }
3204
3217
  const allDiagnostics = [];
3205
3218
  let stopped = false;
3206
3219
  const runnerLatencies = [];
@@ -3328,21 +3341,21 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3328
3341
  provider: ctx.telemetryProvider
3329
3342
  };
3330
3343
  if (fixedItems.length > 0) {
3331
- import("./chunk-4NBWFYWW.js").then(({ appendToWorklog }) => {
3344
+ import("./chunk-NOWH2VA2.js").then(({ appendToWorklog }) => {
3332
3345
  appendToWorklog(ctx.cwd, fixedItems, true, worklogIdentity);
3333
3346
  }).catch(() => {
3334
3347
  });
3335
3348
  }
3336
3349
  const fixableWarnings = warnings.filter((d) => d.fixable);
3337
3350
  if (fixableWarnings.length > 0) {
3338
- import("./chunk-4NBWFYWW.js").then(({ appendToWorklog }) => {
3351
+ import("./chunk-NOWH2VA2.js").then(({ appendToWorklog }) => {
3339
3352
  appendToWorklog(ctx.cwd, fixableWarnings, false, worklogIdentity);
3340
3353
  }).catch(() => {
3341
3354
  });
3342
3355
  }
3343
3356
  const inlineBlockers = blockers;
3344
3357
  const inlineFixed = fixedItems;
3345
- const { notice: coverageNotice, unconfirmedStatus, coverage, primaryLspChecked } = buildCoverageNotice(ctx, runnerLatencies, options?.dedupeCoverageNotice ?? true);
3358
+ const { notice: coverageNotice, verdict, coverage } = buildCoverageNotice(ctx, runnerLatencies, options?.dedupeCoverageNotice ?? true);
3346
3359
  const blockerOutput = formatDiagnostics(inlineBlockers, "blocking");
3347
3360
  let output = blockerOutput;
3348
3361
  output += formatDiagnostics(inlineFixed, "fixed");
@@ -3452,9 +3465,8 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
3452
3465
  collectLaterRunnerIds: [...collectLaterRunnerIds]
3453
3466
  }
3454
3467
  },
3455
- ...unconfirmedStatus !== void 0 && { unconfirmedStatus },
3456
- ...coverage !== void 0 && { coverage },
3457
- ...primaryLspChecked && { primaryLspChecked }
3468
+ verdict,
3469
+ ...coverage !== void 0 && { coverage }
3458
3470
  };
3459
3471
  }
3460
3472
  var RUNNER_TIMEOUT_MS = RUNTIME_CONFIG.dispatch.runnerTimeoutMs;
@@ -3496,15 +3508,13 @@ function failureRowMetadata(result) {
3496
3508
  }
3497
3509
  async function runRunner(ctx, runner, defaultSemantic) {
3498
3510
  const timeoutMs = Math.max(runner.timeoutMs ?? RUNNER_TIMEOUT_MS, getRunnerTimeoutFloorMs());
3499
- let timer;
3500
3511
  const phaseToken = phaseStarted(runner.id);
3501
3512
  try {
3502
- const result = await Promise.race([
3503
- runner.run(ctx).finally(() => clearTimeout(timer)),
3504
- new Promise((_, reject) => {
3505
- timer = setTimeout(() => reject(new Error(`Runner ${runner.id} timed out after ${timeoutMs}ms`)), timeoutMs);
3506
- })
3507
- ]);
3513
+ const outcome = await withBudget(runner.run(ctx).then((value) => ({ value })), timeoutMs);
3514
+ if (outcome === void 0) {
3515
+ throw new Error(`Runner ${runner.id} timed out after ${timeoutMs}ms`);
3516
+ }
3517
+ const result = outcome.value;
3508
3518
  const diagnostics = result.diagnostics.map((d) => ({
3509
3519
  ...d,
3510
3520
  filePath: normalizeDiagnosticFilePath(ctx, d.filePath)
@@ -3515,7 +3525,6 @@ async function runRunner(ctx, runner, defaultSemantic) {
3515
3525
  semantic: result.semantic ?? defaultSemantic
3516
3526
  };
3517
3527
  } catch (error) {
3518
- clearTimeout(timer);
3519
3528
  ctx.log(`Runner ${runner.id} failed: ${error}`);
3520
3529
  const message = error instanceof Error ? error.message : String(error);
3521
3530
  return {
@@ -8180,10 +8189,10 @@ var lspRunner = {
8180
8189
  status: "skipped",
8181
8190
  diagnostics: [],
8182
8191
  semantic: "none",
8183
- ...disabledPrimaryServerIds.length > 0 && {
8192
+ ...disabledPrimaryServerIds.length > 0 ? {
8184
8193
  primaryUnavailableCause: "disabled",
8185
8194
  disabledPrimaryServerIds
8186
- }
8195
+ } : { skipReason: "no-files-matched" }
8187
8196
  };
8188
8197
  }
8189
8198
  let lspDiags = [];
@@ -9191,7 +9200,6 @@ var prisma_validate_default = prismaValidateRunner;
9191
9200
 
9192
9201
  // dist/clients/dispatch/runners/psscriptanalyzer.js
9193
9202
  import * as fs14 from "node:fs/promises";
9194
- import * as os from "node:os";
9195
9203
  import * as path33 from "node:path";
9196
9204
  var PS_SCRIPT = `
9197
9205
  param([string]$FilePath)
@@ -9385,7 +9393,7 @@ var psScriptAnalyzerRunner = {
9385
9393
  }
9386
9394
  const cwd = resolveRunnerCwd(ctx, "psscriptanalyzer");
9387
9395
  const absPath = path33.resolve(cwd, ctx.filePath);
9388
- const tmpScript = path33.join(os.tmpdir(), `pi-lens-psa-${process.pid}.ps1`);
9396
+ const tmpScript = path33.join(scannerReportParentDir(), `pi-lens-psa-${process.pid}.ps1`);
9389
9397
  await fs14.writeFile(tmpScript, PS_SCRIPT, "utf-8");
9390
9398
  try {
9391
9399
  const sampler = startHostStallSampler();
@@ -9516,7 +9524,7 @@ var pyrightRunner = {
9516
9524
  cmd = installedPath;
9517
9525
  }
9518
9526
  if (!cmd) {
9519
- const { findCommandAsync } = await import("./chunk-A5GRLYPZ.js");
9527
+ const { findCommandAsync } = await import("./chunk-3NPWO5UO.js");
9520
9528
  const foundCmd = await findCommandAsync("pyright");
9521
9529
  if (foundCmd)
9522
9530
  cmd = foundCmd;
@@ -9921,7 +9929,6 @@ var rust_clippy_default = rustClippyRunner;
9921
9929
  // dist/clients/dispatch/runners/spotbugs.js
9922
9930
  import { randomUUID } from "node:crypto";
9923
9931
  import * as fs15 from "node:fs";
9924
- import * as os2 from "node:os";
9925
9932
  import * as path35 from "node:path";
9926
9933
  var java = createAvailabilityChecker("java", ".exe", ["-version"]);
9927
9934
  var spotbugs = createAvailabilityChecker("spotbugs", ".bat", ["-version"]);
@@ -10084,7 +10091,7 @@ var spotbugsRunner = {
10084
10091
  const cmd = await resolveAvailableOrInstall(spotbugs, "spotbugs", cwd);
10085
10092
  if (!cmd)
10086
10093
  return { status: "skipped", diagnostics: [], semantic: "none" };
10087
- const tmpXml = path35.join(os2.tmpdir(), `pi-lens-spotbugs-${process.pid}-${randomUUID()}.xml`);
10094
+ const tmpXml = path35.join(scannerReportParentDir(), `pi-lens-spotbugs-${process.pid}-${randomUUID()}.xml`);
10088
10095
  const result = await safeSpawnAsync(cmd, [
10089
10096
  "-textui",
10090
10097
  "-xml:withMessages",
@@ -10125,56 +10132,9 @@ var spotbugsRunner = {
10125
10132
  var spotbugs_default = spotbugsRunner;
10126
10133
 
10127
10134
  // dist/clients/dispatch/runners/shellcheck.js
10128
- import * as fs16 from "node:fs";
10129
10135
  import * as path36 from "node:path";
10130
10136
  var shellcheck = createAvailabilityChecker("shellcheck", ".exe");
10131
10137
  var SHELLCHECK_EXIT_CODES = { ran: [1] };
10132
- var SHELLCHECK_DIALECTS = [
10133
- "sh",
10134
- "bash",
10135
- "dash",
10136
- "ksh",
10137
- "busybox"
10138
- ];
10139
- var SHEBANG_REGEXP = /^#!(.+)/;
10140
- var SHEBANG_INTERPRETER_REGEXP = /^[/](?:[^ /]+[/])*(?:env +(?:-S +)?)?([^ /]+)/;
10141
- var SHELLCHECK_SHELL_OR_EMPTY_REGEXP = /^\s*(?:#\s*shellcheck\s+(?:\S+\s+)*shell=(\w+)|#|$)/;
10142
- var DIALECT_SNIFF_BYTES = 4096;
10143
- function parseShebang(content) {
10144
- const match = SHEBANG_REGEXP.exec(content);
10145
- if (!match || !match[1])
10146
- return null;
10147
- const interpreter = SHEBANG_INTERPRETER_REGEXP.exec(match[1].trim());
10148
- if (!interpreter || !interpreter[1])
10149
- return null;
10150
- return interpreter[1].trim();
10151
- }
10152
- function parseShellDirective(content) {
10153
- for (const line of content.split("\n")) {
10154
- const match = SHELLCHECK_SHELL_OR_EMPTY_REGEXP.exec(line);
10155
- if (match === null)
10156
- break;
10157
- if (match[1])
10158
- return match[1].trim();
10159
- }
10160
- return null;
10161
- }
10162
- function resolveShellFileDialect(filePath) {
10163
- let content;
10164
- try {
10165
- content = fs16.readFileSync(filePath)?.subarray(0, DIALECT_SNIFF_BYTES).toString("utf8");
10166
- } catch {
10167
- return { shebang: null, directive: null, dialect: "bash" };
10168
- }
10169
- const directive = parseShellDirective(content);
10170
- const shebang = parseShebang(content);
10171
- const parsed = directive ?? shebang ?? (path36.extname(filePath).toLowerCase() === ".zsh" ? "zsh" : null);
10172
- return {
10173
- shebang,
10174
- directive,
10175
- dialect: parsed ?? "bash"
10176
- };
10177
- }
10178
10138
  function findShellcheckConfig(cwd) {
10179
10139
  return findLocalToolConfig(cwd, [".shellcheckrc"]);
10180
10140
  }
@@ -10246,7 +10206,7 @@ var shellcheckRunner = {
10246
10206
  };
10247
10207
  }
10248
10208
  const dialectInfo = resolveShellFileDialect(ctx.filePath);
10249
- if (!SHELLCHECK_DIALECTS.includes(dialectInfo.dialect)) {
10209
+ if (!isShellcheckDialectSupported(dialectInfo.dialect)) {
10250
10210
  return {
10251
10211
  status: "skipped",
10252
10212
  diagnostics: [],
@@ -11258,7 +11218,7 @@ var tflintRunner = {
11258
11218
  var tflint_default = tflintRunner;
11259
11219
 
11260
11220
  // dist/clients/dispatch/runners/trivy-config.js
11261
- import * as fs17 from "node:fs";
11221
+ import * as fs16 from "node:fs";
11262
11222
  import * as path44 from "node:path";
11263
11223
  var trivy2 = createAvailabilityChecker("trivy", ".exe");
11264
11224
  function looksLikeKubernetesManifest(content) {
@@ -11354,7 +11314,7 @@ var trivyConfigRunner = {
11354
11314
  if (ctx.kind === "yaml" || ctx.kind === "json") {
11355
11315
  let content = "";
11356
11316
  try {
11357
- content = fs17.readFileSync(absPath, "utf-8");
11317
+ content = fs16.readFileSync(absPath, "utf-8");
11358
11318
  } catch {
11359
11319
  return { status: "skipped", diagnostics: [], semantic: "none" };
11360
11320
  }
@@ -11513,7 +11473,7 @@ var vale_default = valeRunner;
11513
11473
  import * as path47 from "node:path";
11514
11474
 
11515
11475
  // dist/clients/cache/rule-cache.js
11516
- import * as fs18 from "node:fs";
11476
+ import * as fs17 from "node:fs";
11517
11477
  import * as path46 from "node:path";
11518
11478
  var CACHE_VERSION = "v7";
11519
11479
  function reportBundledRulesRootHealth() {
@@ -11530,8 +11490,8 @@ var RuleCache = class {
11530
11490
  this.cacheFile = path46.join(this.cacheDir, `${language}-rules-${CACHE_VERSION}.json`);
11531
11491
  }
11532
11492
  ensureCacheDir() {
11533
- if (!fs18.existsSync(this.cacheDir)) {
11534
- fs18.mkdirSync(this.cacheDir, { recursive: true });
11493
+ if (!fs17.existsSync(this.cacheDir)) {
11494
+ fs17.mkdirSync(this.cacheDir, { recursive: true });
11535
11495
  }
11536
11496
  }
11537
11497
  computeRuleHash(ruleFiles) {
@@ -11540,7 +11500,7 @@ var RuleCache = class {
11540
11500
  get(ruleFiles) {
11541
11501
  try {
11542
11502
  this.ensureCacheDir();
11543
- if (!fs18.existsSync(this.cacheFile))
11503
+ if (!fs17.existsSync(this.cacheFile))
11544
11504
  return null;
11545
11505
  const currentHash = this.computeRuleHash(ruleFiles);
11546
11506
  const cached = readJsonCache(this.cacheFile, (parsed) => {
@@ -11578,7 +11538,7 @@ var RuleCache = class {
11578
11538
  const pattern = new RegExp(`^${this.language}-rules-v\\d+\\.json$`);
11579
11539
  let dirents;
11580
11540
  try {
11581
- dirents = fs18.readdirSync(this.cacheDir);
11541
+ dirents = fs17.readdirSync(this.cacheDir);
11582
11542
  } catch {
11583
11543
  return;
11584
11544
  }
@@ -11586,15 +11546,15 @@ var RuleCache = class {
11586
11546
  if (name === currentName || !pattern.test(name))
11587
11547
  continue;
11588
11548
  try {
11589
- fs18.unlinkSync(path46.join(this.cacheDir, name));
11549
+ fs17.unlinkSync(path46.join(this.cacheDir, name));
11590
11550
  } catch {
11591
11551
  }
11592
11552
  }
11593
11553
  }
11594
11554
  clear() {
11595
11555
  try {
11596
- if (fs18.existsSync(this.cacheFile)) {
11597
- fs18.unlinkSync(this.cacheFile);
11556
+ if (fs17.existsSync(this.cacheFile)) {
11557
+ fs17.unlinkSync(this.cacheFile);
11598
11558
  }
11599
11559
  } catch {
11600
11560
  }
@@ -12550,8 +12510,10 @@ var DEFAULT_HIGH_COMPLEXITY_DEPTH_THRESHOLD = 6;
12550
12510
  var highComplexityRule = {
12551
12511
  id: "high-complexity",
12552
12512
  requires: ["file.functionSummaries"],
12513
+ // The function-facts population. Python, Go and Rust wait for the
12514
+ // per-language thresholds (#5089).
12553
12515
  appliesTo(ctx) {
12554
- return /\.tsx?$/.test(ctx.filePath);
12516
+ return isJstsFactFile(ctx.filePath);
12555
12517
  },
12556
12518
  evaluate(ctx, store) {
12557
12519
  const fns = store.getFileFact(ctx.filePath, "file.functionSummaries") ?? [];
@@ -13207,31 +13169,11 @@ async function dispatchLintWithResult(filePath, cwd, pi, modifiedRanges, logCont
13207
13169
  try {
13208
13170
  const kind = ctx.kind;
13209
13171
  if (!kind) {
13210
- return {
13211
- diagnostics: [],
13212
- blockers: [],
13213
- warnings: [],
13214
- baselineWarningCount: 0,
13215
- fixed: [],
13216
- resolvedCount: 0,
13217
- output: "",
13218
- blockerOutput: "",
13219
- hasBlockers: false
13220
- };
13172
+ return emptyDispatchResult(unchecked(NO_ANALYZER_REASON, { inapplicable: true }));
13221
13173
  }
13222
13174
  const groups = withSpotbugsGroup(kind, getDispatchGroupsForKind(kind, pi), ctx);
13223
13175
  if (groups.length === 0) {
13224
- return {
13225
- diagnostics: [],
13226
- blockers: [],
13227
- warnings: [],
13228
- baselineWarningCount: 0,
13229
- fixed: [],
13230
- resolvedCount: 0,
13231
- output: "",
13232
- blockerOutput: "",
13233
- hasBlockers: false
13234
- };
13176
+ return skipGeneratedFile(ctx) ?? emptyDispatchResult(unchecked(noPrimaryCheckerReason(!pi.getFlag("no-lsp"))));
13235
13177
  }
13236
13178
  await runProviders(ctx);
13237
13179
  const result = await dispatchForFile(
@@ -13442,7 +13384,7 @@ async function warmLspForFile(absPath, host) {
13442
13384
  return;
13443
13385
  let content;
13444
13386
  try {
13445
- content = fs19.readFileSync(absPath, "utf8");
13387
+ content = fs18.readFileSync(absPath, "utf8");
13446
13388
  } catch {
13447
13389
  return;
13448
13390
  }
@@ -13485,14 +13427,21 @@ async function analyzeFile(filePath, cwd, options = {}) {
13485
13427
  });
13486
13428
  const durationMs = Date.now() - start;
13487
13429
  if (options.record !== false) {
13488
- recordDiagnostics(normalizeMapKey(absPath), result.diagnostics, void 0, observedAt);
13430
+ recordDiagnostics(
13431
+ normalizeMapKey(absPath),
13432
+ result.diagnostics,
13433
+ void 0,
13434
+ observedAt,
13435
+ // #5258: the footer reads the same verdict the dispatch gave.
13436
+ widgetUncheckedReason(result.verdict)
13437
+ );
13489
13438
  if (result.diagnostics.length > 0) {
13490
13439
  getDiagnosticTracker().trackShown(result.diagnostics);
13491
13440
  }
13492
13441
  }
13493
13442
  if (options.registerTurnState) {
13494
13443
  try {
13495
- const lineCount = fs19.readFileSync(absPath, "utf8").split("\n").length;
13444
+ const lineCount = fs18.readFileSync(absPath, "utf8").split("\n").length;
13496
13445
  new CacheManager().addModifiedRange(absPath, { start: 1, end: lineCount }, true, cwd, options.ownerId ?? MCP_TURN_STATE_OWNER_ID, "mcp");
13497
13446
  } catch {
13498
13447
  }
@@ -13510,7 +13459,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
13510
13459
  try {
13511
13460
  if (warmIndex) {
13512
13461
  try {
13513
- const content = fs19.readFileSync(absPath, "utf8");
13462
+ const content = fs18.readFileSync(absPath, "utf8");
13514
13463
  if (!canWriteAnalysisRoot(analysisRootMode)) {
13515
13464
  emitBounded("adopted_root_writer_skipped", `${absPath}:word-index`, {
13516
13465
  filePath: absPath,